diff --git a/app/bootstrap.php b/app/bootstrap.php index 70b632537a75b..8e901cac9bfb8 100644 --- a/app/bootstrap.php +++ b/app/bootstrap.php @@ -31,8 +31,6 @@ // Sets default autoload mappings, may be overridden in Bootstrap::create \Magento\Framework\App\Bootstrap::populateAutoloader(BP, []); -require_once BP . '/app/functions.php'; - /* Custom umask value may be provided in optional mage_umask file in root */ $umaskFile = BP . '/magento_umask'; $mask = file_exists($umaskFile) ? octdec(file_get_contents($umaskFile)) : 002; diff --git a/app/code/Magento/AdminNotification/composer.json b/app/code/Magento/AdminNotification/composer.json index 0ecdca6bb1d05..ae1b8dc7d14ff 100644 --- a/app/code/Magento/AdminNotification/composer.json +++ b/app/code/Magento/AdminNotification/composer.json @@ -11,7 +11,7 @@ "lib-libxml": "*" }, "type": "magento2-module", - "version": "100.2.3", + "version": "100.2.4", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/AdvancedPricingImportExport/composer.json b/app/code/Magento/AdvancedPricingImportExport/composer.json index 49a6f5379d1c0..458827b9ab18a 100644 --- a/app/code/Magento/AdvancedPricingImportExport/composer.json +++ b/app/code/Magento/AdvancedPricingImportExport/composer.json @@ -13,7 +13,7 @@ "magento/framework": "101.0.*" }, "type": "magento2-module", - "version": "100.2.3", + "version": "100.2.4", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Analytics/composer.json b/app/code/Magento/Analytics/composer.json index f69960e082f84..7edb72db45e52 100644 --- a/app/code/Magento/Analytics/composer.json +++ b/app/code/Magento/Analytics/composer.json @@ -10,7 +10,7 @@ "magento/framework": "101.0.*" }, "type": "magento2-module", - "version": "100.2.2", + "version": "100.2.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Authorization/composer.json b/app/code/Magento/Authorization/composer.json index a3f9f5da95a04..35063d1516784 100644 --- a/app/code/Magento/Authorization/composer.json +++ b/app/code/Magento/Authorization/composer.json @@ -7,7 +7,7 @@ "magento/framework": "101.0.*" }, "type": "magento2-module", - "version": "100.2.1", + "version": "100.2.2", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Authorizenet/composer.json b/app/code/Magento/Authorizenet/composer.json index 0046ba01adbe8..90f19e36777b2 100644 --- a/app/code/Magento/Authorizenet/composer.json +++ b/app/code/Magento/Authorizenet/composer.json @@ -16,7 +16,7 @@ "magento/module-config": "101.0.*" }, "type": "magento2-module", - "version": "100.2.1", + "version": "100.2.2", "license": [ "proprietary" ], diff --git a/app/code/Magento/Backend/Test/Mftf/Page/AdminDashboardPage.xml b/app/code/Magento/Backend/Test/Mftf/Page/AdminDashboardPage.xml new file mode 100644 index 0000000000000..8c258accdf06c --- /dev/null +++ b/app/code/Magento/Backend/Test/Mftf/Page/AdminDashboardPage.xml @@ -0,0 +1,14 @@ + + + + + +
+ + diff --git a/app/code/Magento/Backend/Test/Mftf/Section/AdminMainActionsSection.xml b/app/code/Magento/Backend/Test/Mftf/Section/AdminMainActionsSection.xml index f8d259cc8e490..c56a8768b0adf 100644 --- a/app/code/Magento/Backend/Test/Mftf/Section/AdminMainActionsSection.xml +++ b/app/code/Magento/Backend/Test/Mftf/Section/AdminMainActionsSection.xml @@ -11,5 +11,6 @@
+
diff --git a/app/code/Magento/Backend/Test/Mftf/Section/AdminMenuSection.xml b/app/code/Magento/Backend/Test/Mftf/Section/AdminMenuSection.xml new file mode 100644 index 0000000000000..9d3182b6236a4 --- /dev/null +++ b/app/code/Magento/Backend/Test/Mftf/Section/AdminMenuSection.xml @@ -0,0 +1,19 @@ + + + + +
+ + + + + + +
+
diff --git a/app/code/Magento/Backend/Test/Mftf/Section/AdminMessagesSection.xml b/app/code/Magento/Backend/Test/Mftf/Section/AdminMessagesSection.xml index 84709e92d9bbd..72a00ed6db9b6 100644 --- a/app/code/Magento/Backend/Test/Mftf/Section/AdminMessagesSection.xml +++ b/app/code/Magento/Backend/Test/Mftf/Section/AdminMessagesSection.xml @@ -10,6 +10,6 @@
- +
diff --git a/app/code/Magento/Backend/composer.json b/app/code/Magento/Backend/composer.json index 4494e51b9337c..845bc4ec87402 100644 --- a/app/code/Magento/Backend/composer.json +++ b/app/code/Magento/Backend/composer.json @@ -24,7 +24,7 @@ "magento/module-theme": "100.2.*" }, "type": "magento2-module", - "version": "100.2.5", + "version": "100.2.6", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Backup/composer.json b/app/code/Magento/Backup/composer.json index b45fc8d2a2bef..f0cbb27bd8ab2 100644 --- a/app/code/Magento/Backup/composer.json +++ b/app/code/Magento/Backup/composer.json @@ -9,7 +9,7 @@ "magento/framework": "101.0.*" }, "type": "magento2-module", - "version": "100.2.4", + "version": "100.2.5", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Braintree/composer.json b/app/code/Magento/Braintree/composer.json index 8af2198949f1c..bf85cdd94a474 100644 --- a/app/code/Magento/Braintree/composer.json +++ b/app/code/Magento/Braintree/composer.json @@ -25,7 +25,7 @@ "magento/module-theme": "100.2.*" }, "type": "magento2-module", - "version": "100.2.5", + "version": "100.2.6", "license": [ "proprietary" ], diff --git a/app/code/Magento/Bundle/composer.json b/app/code/Magento/Bundle/composer.json index c9e5f87a1afad..fe883e783d6ff 100644 --- a/app/code/Magento/Bundle/composer.json +++ b/app/code/Magento/Bundle/composer.json @@ -26,7 +26,7 @@ "magento/module-sales-rule": "101.0.*" }, "type": "magento2-module", - "version": "100.2.4", + "version": "100.2.5", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/BundleImportExport/composer.json b/app/code/Magento/BundleImportExport/composer.json index 59698c598419b..b21da5c7ae5b9 100644 --- a/app/code/Magento/BundleImportExport/composer.json +++ b/app/code/Magento/BundleImportExport/composer.json @@ -12,7 +12,7 @@ "magento/framework": "101.0.*" }, "type": "magento2-module", - "version": "100.2.2", + "version": "100.2.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/CacheInvalidate/composer.json b/app/code/Magento/CacheInvalidate/composer.json index 1331114ca50c4..825c9937c16d1 100644 --- a/app/code/Magento/CacheInvalidate/composer.json +++ b/app/code/Magento/CacheInvalidate/composer.json @@ -7,7 +7,7 @@ "magento/framework": "101.0.*" }, "type": "magento2-module", - "version": "100.2.1", + "version": "100.2.2", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Captcha/Observer/CheckGuestCheckoutObserver.php b/app/code/Magento/Captcha/Observer/CheckGuestCheckoutObserver.php deleted file mode 100644 index 7ccaa76b6c7c8..0000000000000 --- a/app/code/Magento/Captcha/Observer/CheckGuestCheckoutObserver.php +++ /dev/null @@ -1,82 +0,0 @@ -_helper = $helper; - $this->_actionFlag = $actionFlag; - $this->captchaStringResolver = $captchaStringResolver; - $this->_typeOnepage = $typeOnepage; - $this->jsonHelper = $jsonHelper; - } - - /** - * Check Captcha On Checkout as Guest Page - * - * @param \Magento\Framework\Event\Observer $observer - * @return $this - */ - public function execute(\Magento\Framework\Event\Observer $observer) - { - $formId = 'guest_checkout'; - $captchaModel = $this->_helper->getCaptcha($formId); - $checkoutMethod = $this->_typeOnepage->getQuote()->getCheckoutMethod(); - if ($checkoutMethod == \Magento\Checkout\Model\Type\Onepage::METHOD_GUEST - && $captchaModel->isRequired() - ) { - $controller = $observer->getControllerAction(); - if (!$captchaModel->isCorrect($this->captchaStringResolver->resolve($controller->getRequest(), $formId))) { - $this->_actionFlag->set('', \Magento\Framework\App\Action\Action::FLAG_NO_DISPATCH, true); - $result = ['error' => 1, 'message' => __('Incorrect CAPTCHA')]; - $controller->getResponse()->representJson($this->jsonHelper->jsonEncode($result)); - } - } - - return $this; - } -} diff --git a/app/code/Magento/Captcha/Observer/CheckRegisterCheckoutObserver.php b/app/code/Magento/Captcha/Observer/CheckRegisterCheckoutObserver.php deleted file mode 100644 index 8e110a9f4653d..0000000000000 --- a/app/code/Magento/Captcha/Observer/CheckRegisterCheckoutObserver.php +++ /dev/null @@ -1,82 +0,0 @@ -_helper = $helper; - $this->_actionFlag = $actionFlag; - $this->captchaStringResolver = $captchaStringResolver; - $this->_typeOnepage = $typeOnepage; - $this->jsonHelper = $jsonHelper; - } - - /** - * Check Captcha On Checkout Register Page - * - * @param \Magento\Framework\Event\Observer $observer - * @return $this - */ - public function execute(\Magento\Framework\Event\Observer $observer) - { - $formId = 'register_during_checkout'; - $captchaModel = $this->_helper->getCaptcha($formId); - $checkoutMethod = $this->_typeOnepage->getQuote()->getCheckoutMethod(); - if ($checkoutMethod == \Magento\Checkout\Model\Type\Onepage::METHOD_REGISTER - && $captchaModel->isRequired() - ) { - $controller = $observer->getControllerAction(); - if (!$captchaModel->isCorrect($this->captchaStringResolver->resolve($controller->getRequest(), $formId))) { - $this->_actionFlag->set('', \Magento\Framework\App\Action\Action::FLAG_NO_DISPATCH, true); - $result = ['error' => 1, 'message' => __('Incorrect CAPTCHA')]; - $controller->getResponse()->representJson($this->jsonHelper->jsonEncode($result)); - } - } - - return $this; - } -} diff --git a/app/code/Magento/Captcha/Test/Mftf/ActionGroup/CaptchaFormsDisplayingActionGroup.xml b/app/code/Magento/Captcha/Test/Mftf/ActionGroup/CaptchaFormsDisplayingActionGroup.xml new file mode 100644 index 0000000000000..9640da9bd2f67 --- /dev/null +++ b/app/code/Magento/Captcha/Test/Mftf/ActionGroup/CaptchaFormsDisplayingActionGroup.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + diff --git a/app/code/Magento/Captcha/Test/Mftf/Data/CaptchaFormsDisplayingData.xml b/app/code/Magento/Captcha/Test/Mftf/Data/CaptchaFormsDisplayingData.xml new file mode 100644 index 0000000000000..45b9e59a5e767 --- /dev/null +++ b/app/code/Magento/Captcha/Test/Mftf/Data/CaptchaFormsDisplayingData.xml @@ -0,0 +1,20 @@ + + + + + + Create user + Login + Forgot password + Contact Us + Change password + Register during Checkout + Check Out as Guest + + diff --git a/app/code/Magento/Captcha/Test/Mftf/Section/AdminCaptchaFormsDisplayingSection.xml b/app/code/Magento/Captcha/Test/Mftf/Section/AdminCaptchaFormsDisplayingSection.xml new file mode 100644 index 0000000000000..6def5f9ccdac9 --- /dev/null +++ b/app/code/Magento/Captcha/Test/Mftf/Section/AdminCaptchaFormsDisplayingSection.xml @@ -0,0 +1,27 @@ + + + + +
+ + + + + + + + + + + + + + +
+
diff --git a/app/code/Magento/Captcha/Test/Mftf/Test/AdminCaptchaFormsDisplayingTest.xml b/app/code/Magento/Captcha/Test/Mftf/Test/AdminCaptchaFormsDisplayingTest.xml new file mode 100644 index 0000000000000..6e330390b372b --- /dev/null +++ b/app/code/Magento/Captcha/Test/Mftf/Test/AdminCaptchaFormsDisplayingTest.xml @@ -0,0 +1,68 @@ + + + + + + + + + + <description value="Captcha forms displaying"/> + <severity value="MAJOR"/> + <testCaseId value="MAGETWO-94364"/> + <group value="captcha"/> + </annotations> + + <!--Login as admin--> + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> + <!--Go to Captcha--> + <actionGroup ref="CaptchaFormsDisplayingActionGroup" stepKey="captchaFormsDisplayingActionGroup"/> + <waitForPageLoad time="30" stepKey="waitForPageLoaded"/> + <!--Verify fields removed--> + <grabTextFrom selector="{{AdminCaptchaFormsDisplayingSection.forms}}" stepKey="formItems"/> + <assertNotContains stepKey="checkoutAsGuest"> + <expectedResult type="string">{{CaptchaData.checkoutAsGuest}}</expectedResult> + <actualResult type="variable">$formItems</actualResult> + </assertNotContains> + <assertNotContains stepKey="register"> + <expectedResult type="string">{{CaptchaData.register}}</expectedResult> + <actualResult type="variable">$formItems</actualResult> + </assertNotContains> + <!--Verify fields existence--> + <grabTextFrom selector="{{AdminCaptchaFormsDisplayingSection.createUser}}" stepKey="createUser"/> + <assertEquals stepKey="createUserFieldIsPresent"> + <expectedResult type="string">{{CaptchaData.createUser}}</expectedResult> + <actualResult type="variable">$createUser</actualResult> + </assertEquals> + <grabTextFrom selector="{{AdminCaptchaFormsDisplayingSection.userLogin}}" stepKey="login"/> + <assertEquals stepKey="loginFieldIsPresent"> + <expectedResult type="string">{{CaptchaData.login}}</expectedResult> + <actualResult type="variable">login</actualResult> + </assertEquals> + <grabTextFrom selector="{{AdminCaptchaFormsDisplayingSection.forgotpassword}}" stepKey="forgotpassword"/> + <assertEquals stepKey="passwordFieldIsPresent"> + <expectedResult type="string">{{CaptchaData.passwd}}</expectedResult> + <actualResult type="variable">$forgotpassword</actualResult> + </assertEquals> + <grabTextFrom selector="{{AdminCaptchaFormsDisplayingSection.contactUs}}" stepKey="contactUs"/> + <assertEquals stepKey="contactUsFieldIsPresent"> + <expectedResult type="string">{{CaptchaData.contactUs}}</expectedResult> + <actualResult type="variable">$contactUs</actualResult> + </assertEquals> + <grabTextFrom selector="{{AdminCaptchaFormsDisplayingSection.userEdit}}" stepKey="userEdit"/> + <assertEquals stepKey="userEditFieldIsPresent"> + <expectedResult type="string">{{CaptchaData.changePasswd}}</expectedResult> + <actualResult type="variable">$userEdit</actualResult> + </assertEquals> + + <!--Roll back configuration--> + <scrollToTopOfPage stepKey="scrollToTop"/> + <click selector="{{AdminCaptchaFormsDisplayingSection.captcha}}" stepKey="clickToCloseCaptcha"/> + </test> +</tests> diff --git a/app/code/Magento/Captcha/Test/Unit/Model/DefaultTest.php b/app/code/Magento/Captcha/Test/Unit/Model/DefaultTest.php index 0500b29f787c2..63e7308eea34c 100644 --- a/app/code/Magento/Captcha/Test/Unit/Model/DefaultTest.php +++ b/app/code/Magento/Captcha/Test/Unit/Model/DefaultTest.php @@ -24,7 +24,7 @@ class DefaultTest extends \PHPUnit\Framework\TestCase 'enable' => '1', 'font' => 'linlibertine', 'mode' => 'after_fail', - 'forms' => 'user_forgotpassword,user_create,guest_checkout,register_during_checkout', + 'forms' => 'user_forgotpassword,user_create', 'failed_attempts_login' => '3', 'failed_attempts_ip' => '1000', 'timeout' => '7', @@ -35,8 +35,6 @@ class DefaultTest extends \PHPUnit\Framework\TestCase 'always_for' => [ 'user_create', 'user_forgotpassword', - 'guest_checkout', - 'register_during_checkout', 'contact_us', ], ]; @@ -363,7 +361,6 @@ public function isShownToLoggedInUserDataProvider() [true, 'contact_us'], [false, 'user_create'], [false, 'user_forgotpassword'], - [false, 'guest_checkout'] ]; } } diff --git a/app/code/Magento/Captcha/Test/Unit/Observer/CheckGuestCheckoutObserverTest.php b/app/code/Magento/Captcha/Test/Unit/Observer/CheckGuestCheckoutObserverTest.php deleted file mode 100644 index d3f29fae8a592..0000000000000 --- a/app/code/Magento/Captcha/Test/Unit/Observer/CheckGuestCheckoutObserverTest.php +++ /dev/null @@ -1,211 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ -declare(strict_types=1); - -namespace Magento\Captcha\Test\Unit\Observer; - -use Magento\Captcha\Model\DefaultModel as CaptchaModel; -use Magento\Captcha\Observer\CheckGuestCheckoutObserver; -use Magento\Captcha\Helper\Data as CaptchaDataHelper; -use Magento\Framework\App\Action\Action; -use Magento\Framework\App\ActionFlag; -use Magento\Captcha\Observer\CaptchaStringResolver; -use Magento\Checkout\Model\Type\Onepage; -use Magento\Framework\App\Request\Http; -use Magento\Framework\App\Response\Http as HttpResponse; -use Magento\Framework\Event\Observer; -use Magento\Framework\Json\Helper\Data as JsonHelper; -use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; -use Magento\Quote\Model\Quote; - -/** - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) - */ -class CheckGuestCheckoutObserverTest extends \PHPUnit\Framework\TestCase -{ - const FORM_ID = 'guest_checkout'; - - /** - * @var CheckGuestCheckoutObserver - */ - private $checkGuestCheckoutObserver; - - /** - * @var ObjectManager - */ - private $objectManager; - - /** - * @var Observer - */ - private $observer; - - /** - * @var HttpResponse|\PHPUnit_Framework_MockObject_MockObject - */ - private $responseMock; - - /** - * @var HttpResponse|\PHPUnit_Framework_MockObject_MockObject - */ - private $requestMock; - - /** - * @var ActionFlag|\PHPUnit_Framework_MockObject_MockObject - */ - private $actionFlagMock; - - /** - * @var CaptchaStringResolver|\PHPUnit_Framework_MockObject_MockObject - */ - private $captchaStringResolverMock; - - /** - * @var JsonHelper|\PHPUnit_Framework_MockObject_MockObject - */ - private $jsonHelperMock; - - /** - * @var CaptchaModel|\PHPUnit_Framework_MockObject_MockObject - */ - private $captchaModelMock; - - /** - * @var Quote|\PHPUnit_Framework_MockObject_MockObject - */ - private $quoteModelMock; - - /** - * @var Action|\PHPUnit_Framework_MockObject_MockObject - */ - private $controllerMock; - - protected function setUp() - { - $onepageModelTypeMock = $this->createMock(Onepage::class); - $captchaHelperMock = $this->createMock(CaptchaDataHelper::class); - $this->objectManager = new ObjectManager($this); - $this->actionFlagMock = $this->createMock(ActionFlag::class); - $this->captchaStringResolverMock = $this->createMock(CaptchaStringResolver::class); - $this->captchaModelMock = $this->createMock(CaptchaModel::class); - $this->quoteModelMock = $this->createMock(Quote::class); - $this->controllerMock = $this->createMock(Action::class); - $this->requestMock = $this->createMock(Http::class); - $this->responseMock = $this->createMock(HttpResponse::class); - $this->observer = new Observer(['controller_action' => $this->controllerMock]); - $this->jsonHelperMock = $this->createMock(JsonHelper::class); - - $this->checkGuestCheckoutObserver = $this->objectManager->getObject( - CheckGuestCheckoutObserver::class, - [ - 'helper' => $captchaHelperMock, - 'actionFlag' => $this->actionFlagMock, - 'captchaStringResolver' => $this->captchaStringResolverMock, - 'typeOnepage' => $onepageModelTypeMock, - 'jsonHelper' => $this->jsonHelperMock - ] - ); - - $captchaHelperMock->expects($this->once()) - ->method('getCaptcha') - ->with(self::FORM_ID) - ->willReturn($this->captchaModelMock); - $onepageModelTypeMock->expects($this->once()) - ->method('getQuote') - ->willReturn($this->quoteModelMock); - } - - public function testCheckGuestCheckoutForRegister() - { - $this->quoteModelMock->expects($this->once()) - ->method('getCheckoutMethod') - ->willReturn(Onepage::METHOD_REGISTER); - $this->captchaModelMock->expects($this->never()) - ->method('isRequired'); - - $this->checkGuestCheckoutObserver->execute($this->observer); - } - - public function testCheckGuestCheckoutWithNoCaptchaRequired() - { - $this->quoteModelMock->expects($this->once()) - ->method('getCheckoutMethod') - ->willReturn(Onepage::METHOD_GUEST); - $this->captchaModelMock->expects($this->once()) - ->method('isRequired') - ->willReturn(false); - $this->captchaModelMock->expects($this->never()) - ->method('isCorrect'); - - $this->checkGuestCheckoutObserver->execute($this->observer); - } - - public function testCheckGuestCheckoutWithIncorrectCaptcha() - { - $captchaValue = 'some_word'; - $encodedJsonValue = '{}'; - - $this->quoteModelMock->expects($this->once()) - ->method('getCheckoutMethod') - ->willReturn(Onepage::METHOD_GUEST); - $this->captchaModelMock->expects($this->once()) - ->method('isRequired') - ->willReturn(true); - $this->controllerMock->expects($this->once()) - ->method('getRequest') - ->willReturn($this->requestMock); - $this->controllerMock->expects($this->once()) - ->method('getResponse') - ->willReturn($this->responseMock); - $this->controllerMock->expects($this->once()) - ->method('getResponse') - ->willReturn($this->responseMock); - $this->captchaStringResolverMock->expects($this->once()) - ->method('resolve') - ->with($this->requestMock, self::FORM_ID) - ->willReturn($captchaValue); - $this->captchaModelMock->expects($this->once()) - ->method('isCorrect') - ->with($captchaValue) - ->willReturn(false); - $this->actionFlagMock->expects($this->once()) - ->method('set') - ->with('', Action::FLAG_NO_DISPATCH, true); - $this->jsonHelperMock->expects($this->once()) - ->method('jsonEncode') - ->willReturn($encodedJsonValue); - $this->responseMock->expects($this->once()) - ->method('representJson') - ->with($encodedJsonValue); - - $this->checkGuestCheckoutObserver->execute($this->observer); - } - - public function testCheckGuestCheckoutWithCorrectCaptcha() - { - $this->quoteModelMock->expects($this->once()) - ->method('getCheckoutMethod') - ->willReturn(Onepage::METHOD_GUEST); - $this->captchaModelMock->expects($this->once()) - ->method('isRequired') - ->willReturn(true); - $this->controllerMock->expects($this->once()) - ->method('getRequest') - ->willReturn($this->requestMock); - $this->captchaStringResolverMock->expects($this->once()) - ->method('resolve') - ->with($this->requestMock, self::FORM_ID) - ->willReturn('some_word'); - $this->captchaModelMock->expects($this->once()) - ->method('isCorrect') - ->with('some_word') - ->willReturn(true); - $this->actionFlagMock->expects($this->never()) - ->method('set'); - - $this->checkGuestCheckoutObserver->execute($this->observer); - } -} diff --git a/app/code/Magento/Captcha/Test/Unit/Observer/CheckRegisterCheckoutObserverTest.php b/app/code/Magento/Captcha/Test/Unit/Observer/CheckRegisterCheckoutObserverTest.php deleted file mode 100644 index 89012ef653838..0000000000000 --- a/app/code/Magento/Captcha/Test/Unit/Observer/CheckRegisterCheckoutObserverTest.php +++ /dev/null @@ -1,211 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ -declare(strict_types=1); - -namespace Magento\Captcha\Test\Unit\Observer; - -use Magento\Captcha\Model\DefaultModel as CaptchaModel; -use Magento\Captcha\Observer\CheckRegisterCheckoutObserver; -use Magento\Captcha\Helper\Data as CaptchaDataHelper; -use Magento\Framework\App\Action\Action; -use Magento\Framework\App\ActionFlag; -use Magento\Captcha\Observer\CaptchaStringResolver; -use Magento\Checkout\Model\Type\Onepage; -use Magento\Framework\App\Request\Http; -use Magento\Framework\App\Response\Http as HttpResponse; -use Magento\Framework\Event\Observer; -use Magento\Framework\Json\Helper\Data as JsonHelper; -use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; -use Magento\Quote\Model\Quote; - -/** - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) - */ -class CheckRegisterCheckoutObserverTest extends \PHPUnit\Framework\TestCase -{ - const FORM_ID = 'register_during_checkout'; - - /** - * @var CheckRegisterCheckoutObserver - */ - private $checkRegisterCheckoutObserver; - - /** - * @var ObjectManager - */ - private $objectManager; - - /** - * @var Observer - */ - private $observer; - - /** - * @var HttpResponse|\PHPUnit_Framework_MockObject_MockObject - */ - private $responseMock; - - /** - * @var HttpResponse|\PHPUnit_Framework_MockObject_MockObject - */ - private $requestMock; - - /** - * @var ActionFlag|\PHPUnit_Framework_MockObject_MockObject - */ - private $actionFlagMock; - - /** - * @var CaptchaStringResolver|\PHPUnit_Framework_MockObject_MockObject - */ - private $captchaStringResolverMock; - - /** - * @var JsonHelper|\PHPUnit_Framework_MockObject_MockObject - */ - private $jsonHelperMock; - - /** - * @var CaptchaModel|\PHPUnit_Framework_MockObject_MockObject - */ - private $captchaModelMock; - - /** - * @var Quote|\PHPUnit_Framework_MockObject_MockObject - */ - private $quoteModelMock; - - /** - * @var Action|\PHPUnit_Framework_MockObject_MockObject - */ - private $controllerMock; - - protected function setUp() - { - $onepageModelTypeMock = $this->createMock(Onepage::class); - $captchaHelperMock = $this->createMock(CaptchaDataHelper::class); - $this->objectManager = new ObjectManager($this); - $this->actionFlagMock = $this->createMock(ActionFlag::class); - $this->captchaStringResolverMock = $this->createMock(CaptchaStringResolver::class); - $this->captchaModelMock = $this->createMock(CaptchaModel::class); - $this->quoteModelMock = $this->createMock(Quote::class); - $this->controllerMock = $this->createMock(Action::class); - $this->requestMock = $this->createMock(Http::class); - $this->responseMock = $this->createMock(HttpResponse::class); - $this->observer = new Observer(['controller_action' => $this->controllerMock]); - $this->jsonHelperMock = $this->createMock(JsonHelper::class); - - $this->checkRegisterCheckoutObserver = $this->objectManager->getObject( - CheckRegisterCheckoutObserver::class, - [ - 'helper' => $captchaHelperMock, - 'actionFlag' => $this->actionFlagMock, - 'captchaStringResolver' => $this->captchaStringResolverMock, - 'typeOnepage' => $onepageModelTypeMock, - 'jsonHelper' => $this->jsonHelperMock - ] - ); - - $captchaHelperMock->expects($this->once()) - ->method('getCaptcha') - ->with(self::FORM_ID) - ->willReturn($this->captchaModelMock); - $onepageModelTypeMock->expects($this->once()) - ->method('getQuote') - ->willReturn($this->quoteModelMock); - } - - public function testCheckRegisterCheckoutForGuest() - { - $this->quoteModelMock->expects($this->once()) - ->method('getCheckoutMethod') - ->willReturn(Onepage::METHOD_GUEST); - $this->captchaModelMock->expects($this->never()) - ->method('isRequired'); - - $this->checkRegisterCheckoutObserver->execute($this->observer); - } - - public function testCheckRegisterCheckoutWithNoCaptchaRequired() - { - $this->quoteModelMock->expects($this->once()) - ->method('getCheckoutMethod') - ->willReturn(Onepage::METHOD_REGISTER); - $this->captchaModelMock->expects($this->once()) - ->method('isRequired') - ->willReturn(false); - $this->captchaModelMock->expects($this->never()) - ->method('isCorrect'); - - $this->checkRegisterCheckoutObserver->execute($this->observer); - } - - public function testCheckRegisterCheckoutWithIncorrectCaptcha() - { - $captchaValue = 'some_word'; - $encodedJsonValue = '{}'; - - $this->quoteModelMock->expects($this->once()) - ->method('getCheckoutMethod') - ->willReturn(Onepage::METHOD_REGISTER); - $this->captchaModelMock->expects($this->once()) - ->method('isRequired') - ->willReturn(true); - $this->controllerMock->expects($this->once()) - ->method('getRequest') - ->willReturn($this->requestMock); - $this->controllerMock->expects($this->once()) - ->method('getResponse') - ->willReturn($this->responseMock); - $this->controllerMock->expects($this->once()) - ->method('getResponse') - ->willReturn($this->responseMock); - $this->captchaStringResolverMock->expects($this->once()) - ->method('resolve') - ->with($this->requestMock, self::FORM_ID) - ->willReturn($captchaValue); - $this->captchaModelMock->expects($this->once()) - ->method('isCorrect') - ->with($captchaValue) - ->willReturn(false); - $this->actionFlagMock->expects($this->once()) - ->method('set') - ->with('', Action::FLAG_NO_DISPATCH, true); - $this->jsonHelperMock->expects($this->once()) - ->method('jsonEncode') - ->willReturn($encodedJsonValue); - $this->responseMock->expects($this->once()) - ->method('representJson') - ->with($encodedJsonValue); - - $this->checkRegisterCheckoutObserver->execute($this->observer); - } - - public function testCheckRegisterCheckoutWithCorrectCaptcha() - { - $this->quoteModelMock->expects($this->once()) - ->method('getCheckoutMethod') - ->willReturn(Onepage::METHOD_REGISTER); - $this->captchaModelMock->expects($this->once()) - ->method('isRequired') - ->willReturn(true); - $this->controllerMock->expects($this->once()) - ->method('getRequest') - ->willReturn($this->requestMock); - $this->captchaStringResolverMock->expects($this->once()) - ->method('resolve') - ->with($this->requestMock, self::FORM_ID) - ->willReturn('some_word'); - $this->captchaModelMock->expects($this->once()) - ->method('isCorrect') - ->with('some_word') - ->willReturn(true); - $this->actionFlagMock->expects($this->never()) - ->method('set'); - - $this->checkRegisterCheckoutObserver->execute($this->observer); - } -} diff --git a/app/code/Magento/Captcha/composer.json b/app/code/Magento/Captcha/composer.json index 7842d7bc68bf1..a8a63e19e67df 100644 --- a/app/code/Magento/Captcha/composer.json +++ b/app/code/Magento/Captcha/composer.json @@ -13,7 +13,7 @@ "zendframework/zend-session": "^2.7.3" }, "type": "magento2-module", - "version": "100.2.2", + "version": "100.2.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Captcha/etc/config.xml b/app/code/Magento/Captcha/etc/config.xml index 71c474de90ff4..dd748dd05ccda 100644 --- a/app/code/Magento/Captcha/etc/config.xml +++ b/app/code/Magento/Captcha/etc/config.xml @@ -53,8 +53,6 @@ <always_for> <user_create>1</user_create> <user_forgotpassword>1</user_forgotpassword> - <guest_checkout>1</guest_checkout> - <register_during_checkout>1</register_during_checkout> <contact_us>1</contact_us> </always_for> </captcha> @@ -77,12 +75,6 @@ <user_forgotpassword> <label>Forgot password</label> </user_forgotpassword> - <guest_checkout> - <label>Check Out as Guest</label> - </guest_checkout> - <register_during_checkout> - <label>Register during Checkout</label> - </register_during_checkout> <contact_us> <label>Contact Us</label> </contact_us> diff --git a/app/code/Magento/Captcha/etc/di.xml b/app/code/Magento/Captcha/etc/di.xml index 955896eb12744..3a929f5e6cc00 100644 --- a/app/code/Magento/Captcha/etc/di.xml +++ b/app/code/Magento/Captcha/etc/di.xml @@ -33,7 +33,6 @@ <arguments> <argument name="formIds" xsi:type="array"> <item name="user_login" xsi:type="string">user_login</item> - <item name="guest_checkout" xsi:type="string">guest_checkout</item> </argument> </arguments> </type> diff --git a/app/code/Magento/Captcha/etc/events.xml b/app/code/Magento/Captcha/etc/events.xml index e3ddd19de2d12..970c0d077260c 100644 --- a/app/code/Magento/Captcha/etc/events.xml +++ b/app/code/Magento/Captcha/etc/events.xml @@ -18,10 +18,6 @@ <event name="admin_user_authenticate_before"> <observer name="captcha" instance="Magento\Captcha\Observer\CheckUserLoginBackendObserver" /> </event> - <event name="controller_action_predispatch_checkout_onepage_saveBilling"> - <observer name="captcha_guest" instance="Magento\Captcha\Observer\CheckGuestCheckoutObserver" /> - <observer name="captcha_register" instance="Magento\Captcha\Observer\CheckRegisterCheckoutObserver" /> - </event> <event name="customer_customer_authenticated"> <observer name="captcha_reset_attempt" instance="Magento\Captcha\Observer\ResetAttemptForFrontendObserver" /> </event> diff --git a/app/code/Magento/Captcha/etc/frontend/di.xml b/app/code/Magento/Captcha/etc/frontend/di.xml index 225e62c8e8203..0c4ab0cda0735 100644 --- a/app/code/Magento/Captcha/etc/frontend/di.xml +++ b/app/code/Magento/Captcha/etc/frontend/di.xml @@ -17,7 +17,6 @@ <arguments> <argument name="formIds" xsi:type="array"> <item name="user_login" xsi:type="string">user_login</item> - <item name="guest_checkout" xsi:type="string">guest_checkout</item> </argument> </arguments> </type> diff --git a/app/code/Magento/Captcha/view/frontend/layout/checkout_index_index.xml b/app/code/Magento/Captcha/view/frontend/layout/checkout_index_index.xml index 4ed56fd56cc3a..7180372f004e5 100644 --- a/app/code/Magento/Captcha/view/frontend/layout/checkout_index_index.xml +++ b/app/code/Magento/Captcha/view/frontend/layout/checkout_index_index.xml @@ -36,29 +36,7 @@ <item name="captcha" xsi:type="array"> <item name="component" xsi:type="string">Magento_Captcha/js/view/checkout/loginCaptcha</item> <item name="displayArea" xsi:type="string">additional-login-form-fields</item> - <item name="formId" xsi:type="string">guest_checkout</item> - <item name="configSource" xsi:type="string">checkoutConfig</item> - </item> - </item> - </item> - </item> - </item> - </item> - </item> - </item> - </item> - <item name="billing-step" xsi:type="array"> - <item name="children" xsi:type="array"> - <item name="payment" xsi:type="array"> - <item name="children" xsi:type="array"> - <item name="customer-email" xsi:type="array"> - <item name="children" xsi:type="array"> - <item name="additional-login-form-fields" xsi:type="array"> - <item name="children" xsi:type="array"> - <item name="captcha" xsi:type="array"> - <item name="component" xsi:type="string">Magento_Captcha/js/view/checkout/loginCaptcha</item> - <item name="displayArea" xsi:type="string">additional-login-form-fields</item> - <item name="formId" xsi:type="string">guest_checkout</item> + <item name="formId" xsi:type="string">user_login</item> <item name="configSource" xsi:type="string">checkoutConfig</item> </item> </item> diff --git a/app/code/Magento/Captcha/view/frontend/web/js/onepage.js b/app/code/Magento/Captcha/view/frontend/web/js/onepage.js deleted file mode 100644 index 7f5f11d20572b..0000000000000 --- a/app/code/Magento/Captcha/view/frontend/web/js/onepage.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ - -/** - * @deprecated since version 2.2.0 - */ -define(['jquery'], function ($) { - 'use strict'; - - $(document).on('login', function () { - var type; - - $('[data-captcha="guest_checkout"], [data-captcha="register_during_checkout"]').hide(); - $('[role="guest_checkout"], [role="register_during_checkout"]').hide(); - type = $('#login\\:guest').is(':checked') ? 'guest_checkout' : 'register_during_checkout'; - $('[role="' + type + '"], [data-captcha="' + type + '"]').show(); - }).on('billingSave', function () { - $('.captcha-reload:visible').trigger('click'); - }); -}); diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminCategoryActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminCategoryActionGroup.xml index 4872c0c5c716c..127b69e5c3dc4 100644 --- a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminCategoryActionGroup.xml +++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminCategoryActionGroup.xml @@ -8,6 +8,7 @@ <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + <!--Create a new category--> <actionGroup name="CreateCategory"> <arguments> @@ -24,6 +25,7 @@ <seeInTitle userInput="{{categoryEntity.name}}" stepKey="seeNewCategoryPageTitle"/> <seeElement selector="{{AdminCategorySidebarTreeSection.categoryInTree(categoryEntity.name)}}" stepKey="seeCategoryInTree"/> </actionGroup> + <!--Actions to delete category--> <actionGroup name="DeleteCategory"> <arguments> @@ -41,6 +43,7 @@ <click selector="{{AdminCategorySidebarTreeSection.expandAll}}" stepKey="expandToSeeAllCategories"/> <dontSee selector="{{AdminCategorySidebarTreeSection.categoryInTree(categoryEntity.name)}}" stepKey="dontSeeCategoryInTree"/> </actionGroup> + <!--Actions to switch store view in category edit page--> <actionGroup name="switchCategoryStoreView"> <arguments> @@ -58,4 +61,30 @@ <click selector="{{AdminCategoryMainActionsSection.categoryStoreViewModalAccept}}" stepKey="selectStoreViewAccept"/> <waitForPageLoad stepKey="waitForStoreViewChangeLoad"/> </actionGroup> + + <!-- Go to admin category page by id --> + <actionGroup name="goToAdminCategoryPageById"> + <arguments> + <argument name="id" type="string"/> + </arguments> + <amOnPage url="{{AdminCategoryEditPage.url(id)}}" stepKey="amOnAdminCategoryPage"/> + <waitForPageLoad stepKey="waitForPageLoad"/> + <see selector="{{AdminHeaderSection.pageTitle}}" userInput="{{id}}" stepKey="seeCategoryPageTitle"/> + </actionGroup> + + <!--Open tab "Products in Category" if she closed--> + <actionGroup name="OpenProductsInCategorySection"> + <scrollTo selector="{{AdminCategorySEOSection.SectionHeader}}" stepKey="scrollToSection"/> + <conditionalClick selector="{{AdminCategoryProductsSection.sectionHeader}}" dependentSelector="{{AdminCategoryProductsSection.tabProductClosed}}" visible="true" stepKey="openProductsInCategory"/> + <waitForPageLoad time="60" stepKey="waitForPageLoad"/> + </actionGroup> + + <actionGroup name="SeeProductInProductCategoryGridForCurrentCategory"> + <arguments> + <argument name="product"/> + </arguments> + <see selector="{{AdminCategoryProductsGridSection.nameColumn}}" userInput="{{product.name}}" stepKey="seeProductNameInGrid"/> + <see selector="{{AdminCategoryProductsGridSection.skuColumn}}" userInput="{{product.sku}}" stepKey="seeProductSkuInGrid"/> + <see selector="{{AdminCategoryProductsGridSection.priceColumn}}" userInput="{{product.price}}" stepKey="seeProductPriceInGrid"/> + </actionGroup> </actionGroups> diff --git a/app/code/Magento/Catalog/Test/Mftf/Page/AdminCategoryEditPage.xml b/app/code/Magento/Catalog/Test/Mftf/Page/AdminCategoryEditPage.xml new file mode 100644 index 0000000000000..68c432a136ac9 --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/Page/AdminCategoryEditPage.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="AdminCategoryEditPage" url="catalog/category/edit/id/{{categoryId}}/" area="admin" module="Magento_Catalog" parameterized="true"> + <section name="AdminCategoryMainActionsSection"/> + <section name="AdminCategoryProductsSection"/> + <section name="AdminCategorySidebarActionSection"/> + <section name="AdminCategorySidebarTreeSection"/> + <section name="AdminCategoryBasicFieldSection"/> + <section name="AdminCategorySEOSection"/> + <section name="AdminCategoryModalSection"/> + </page> +</pages> diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryProductsSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryProductsSection.xml new file mode 100644 index 0000000000000..bf6f3c692b6c3 --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryProductsSection.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminCategoryProductsSection"> + <element name="sectionHeader" type="button" selector="div[data-index='assign_products']" timeout="30"/> + <element name="tabProductClosed" type="block" selector="div[data-index='assign_products'] [data-state-collapsible='closed']"/> + </section> +</sections> diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontCategoryProductSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontCategoryProductSection.xml index 1de234c512339..ccb5ae60db59b 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontCategoryProductSection.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontCategoryProductSection.xml @@ -13,7 +13,7 @@ <element name="ProductPriceByNumber" type="text" selector="//main//li[{{var1}}]//span[@class='price']" parameterized="true"/> <element name="ProductInfoByNumber" type="text" selector="//main//li[{{var1}}]//div[@class='product-item-info']" parameterized="true"/> <element name="ProductAddToCompareByNumber" type="text" selector="//main//li[{{var1}}]//a[contains(@class, 'tocompare')]" parameterized="true"/> - + <element name="productAddToCartByName" type="button" selector="//main//li[.//a[contains(text(), '{{var1}}')]]//a[contains(@class, 'tocart')]" parameterized="true"/> <element name="productTitleByName" type="button" selector="//main//li//a[contains(text(), '{{var1}}')]" parameterized="true"/> <element name="ProductPriceByName" type="text" selector="//main//li[.//a[contains(text(), '{{var1}}')]]//span[@class='price']" parameterized="true"/> <element name="ProductImageByName" type="text" selector="//main//li[.//a[contains(text(), '{{var1}}')]]//img[@class='product-image-photo']" parameterized="true"/> diff --git a/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Category/DeleteTest.php b/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Category/DeleteTest.php index af1ded6987196..196b4df5b47c0 100644 --- a/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Category/DeleteTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Category/DeleteTest.php @@ -71,7 +71,7 @@ protected function setUp() false, true, true, - ['addSuccess'] + ['addSuccessMessage'] ); $this->categoryRepository = $this->createMock(\Magento\Catalog\Api\CategoryRepositoryInterface::class); $context->expects($this->any()) diff --git a/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Category/SaveTest.php b/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Category/SaveTest.php index 53f7fa0ed7e63..74173dc926d97 100644 --- a/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Category/SaveTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Category/SaveTest.php @@ -102,7 +102,7 @@ protected function setUp() false, true, true, - ['addSuccess', 'getMessages'] + ['addSuccessMessage', 'getMessages'] ); $this->save = $this->objectManager->getObject( @@ -392,7 +392,7 @@ public function testExecute($categoryId, $storeId, $parentId) $categoryMock->expects($this->once()) ->method('save'); $this->messageManagerMock->expects($this->once()) - ->method('addSuccess') + ->method('addSuccessMessage') ->with(__('You saved the category.')); $categoryMock->expects($this->at(1)) ->method('getId') diff --git a/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/Action/Attribute/EditTest.php b/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/Action/Attribute/EditTest.php index 5a977b7934670..0ddd89afeac22 100644 --- a/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/Action/Attribute/EditTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/Action/Attribute/EditTest.php @@ -94,7 +94,7 @@ private function prepareContext() $messageManager = $this->getMockBuilder(\Magento\Framework\Message\ManagerInterface::class) ->setMethods([]) ->disableOriginalConstructor()->getMock(); - $messageManager->expects($this->any())->method('addError')->willReturn(true); + $messageManager->expects($this->any())->method('addErrorMessage')->willReturn(true); $this->context = $this->getMockBuilder(\Magento\Backend\App\Action\Context::class) ->setMethods(['getRequest', 'getObjectManager', 'getMessageManager', 'getResultRedirectFactory']) ->disableOriginalConstructor()->getMock(); diff --git a/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/Action/Attribute/SaveTest.php b/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/Action/Attribute/SaveTest.php index c88a008efb19b..de44af7f58afc 100644 --- a/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/Action/Attribute/SaveTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/Action/Attribute/SaveTest.php @@ -250,8 +250,8 @@ public function testExecuteThatProductIdsAreObtainedFromAttributeHelper() ['inventory', [], [7]], ])); - $this->messageManager->expects($this->never())->method('addError'); - $this->messageManager->expects($this->never())->method('addException'); + $this->messageManager->expects($this->never())->method('addErrorMessage'); + $this->messageManager->expects($this->never())->method('addExceptionMessage'); $this->object->execute(); } diff --git a/app/code/Magento/Catalog/composer.json b/app/code/Magento/Catalog/composer.json index 57bb7d1e4ccef..4535e527d2dec 100644 --- a/app/code/Magento/Catalog/composer.json +++ b/app/code/Magento/Catalog/composer.json @@ -34,7 +34,7 @@ "magento/module-catalog-sample-data": "Sample Data version:100.2.*" }, "type": "magento2-module", - "version": "102.0.5", + "version": "102.0.6", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Catalog/view/frontend/web/js/catalog-add-to-cart.js b/app/code/Magento/Catalog/view/frontend/web/js/catalog-add-to-cart.js index fc82b3a49da53..5b77828d3c029 100644 --- a/app/code/Magento/Catalog/view/frontend/web/js/catalog-add-to-cart.js +++ b/app/code/Magento/Catalog/view/frontend/web/js/catalog-add-to-cart.js @@ -161,6 +161,13 @@ define([ .html(res.product.statusText); } self.enableAddToCartButton(form); + }, + + /** @inheritdoc */ + complete: function (res) { + if (res.state() === 'rejected') { + location.reload(); + } } }); }, diff --git a/app/code/Magento/CatalogAnalytics/composer.json b/app/code/Magento/CatalogAnalytics/composer.json index 9a36d7a98c7b2..ead59ef212600 100644 --- a/app/code/Magento/CatalogAnalytics/composer.json +++ b/app/code/Magento/CatalogAnalytics/composer.json @@ -7,7 +7,7 @@ "magento/module-catalog": "102.0.*" }, "type": "magento2-module", - "version": "100.2.1", + "version": "100.2.2", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/CatalogImportExport/composer.json b/app/code/Magento/CatalogImportExport/composer.json index d217a665cf924..39b05acc4e3b6 100644 --- a/app/code/Magento/CatalogImportExport/composer.json +++ b/app/code/Magento/CatalogImportExport/composer.json @@ -16,7 +16,7 @@ "ext-ctype": "*" }, "type": "magento2-module", - "version": "100.2.4", + "version": "100.2.5", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator.php b/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator.php index 30a1cce77cd70..a104f5b098b8e 100644 --- a/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator.php +++ b/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator.php @@ -16,10 +16,12 @@ use Magento\CatalogInventory\Model\Stock; use Magento\Framework\Event\Observer; use Magento\Framework\Exception\LocalizedException; +use Magento\Quote\Model\Quote\Item; /** * @api * @since 100.0.2 + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class QuantityValidator { @@ -66,7 +68,7 @@ public function __construct( * Add error information to Quote Item * * @param \Magento\Framework\DataObject $result - * @param \Magento\Quote\Model\Quote\Item $quoteItem + * @param Item $quoteItem * @param bool $removeError * @return void */ @@ -99,7 +101,7 @@ private function addErrorInfoToQuote($result, $quoteItem) */ public function validate(Observer $observer) { - /* @var $quoteItem \Magento\Quote\Model\Quote\Item */ + /* @var $quoteItem Item */ $quoteItem = $observer->getEvent()->getItem(); if (!$quoteItem || !$quoteItem->getProductId() || @@ -174,31 +176,7 @@ public function validate(Observer $observer) $qty = $product->getTypeInstance()->prepareQuoteItemQty($qty, $product); $quoteItem->setData('qty', $qty); if ($stockStatus) { - $result = $this->stockState->checkQtyIncrements( - $product->getId(), - $qty, - $product->getStore()->getWebsiteId() - ); - if ($result->getHasError()) { - $quoteItem->addErrorInfo( - 'cataloginventory', - Data::ERROR_QTY_INCREMENTS, - $result->getMessage() - ); - - $quoteItem->getQuote()->addErrorInfo( - $result->getQuoteMessageIndex(), - 'cataloginventory', - Data::ERROR_QTY_INCREMENTS, - $result->getQuoteMessage() - ); - } else { - // Delete error from item and its quote, if it was set due to qty problems - $this->_removeErrorsFromQuoteAndItem( - $quoteItem, - Data::ERROR_QTY_INCREMENTS - ); - } + $this->checkOptionsQtyIncrements($quoteItem, $options); } // variable to keep track if we have previously encountered an error in one of the options $removeError = true; @@ -227,10 +205,44 @@ public function validate(Observer $observer) } } + /** + * Verifies product options quantity increments. + * + * @param Item $quoteItem + * @param array $options + * @return void + */ + private function checkOptionsQtyIncrements(Item $quoteItem, array $options) + { + $removeErrors = true; + foreach ($options as $option) { + $result = $this->stockState->checkQtyIncrements( + $option->getProduct()->getId(), + $quoteItem->getData('qty'), + $option->getProduct()->getStore()->getWebsiteId() + ); + if ($result->getHasError()) { + $quoteItem->getQuote()->addErrorInfo( + $result->getQuoteMessageIndex(), + 'cataloginventory', + Data::ERROR_QTY_INCREMENTS, + $result->getQuoteMessage() + ); + + $removeErrors = false; + } + } + + if ($removeErrors) { + // Delete error from item and its quote, if it was set due to qty problems + $this->_removeErrorsFromQuoteAndItem($quoteItem, Data::ERROR_QTY_INCREMENTS); + } + } + /** * Removes error statuses from quote and item, set by this observer * - * @param \Magento\Quote\Model\Quote\Item $item + * @param Item $item * @param int $code * @return void */ diff --git a/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator/Initializer/Option.php b/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator/Initializer/Option.php index b99e43d52f470..5b3a441333432 100644 --- a/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator/Initializer/Option.php +++ b/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator/Initializer/Option.php @@ -9,6 +9,9 @@ use Magento\CatalogInventory\Api\StockStateInterface; use Magento\CatalogInventory\Model\Quote\Item\QuantityValidator\QuoteItemQtyList; +/** + * Class for initialize quote item options. + */ class Option { /** @@ -67,10 +70,6 @@ public function getStockItem( * define that stock item is child for composite product */ $stockItem->setIsChildItem(true); - /** - * don't check qty increments value for option product - */ - $stockItem->setSuppressCheckQtyIncrements(true); return $stockItem; } diff --git a/app/code/Magento/CatalogInventory/Test/Unit/Model/Quote/Item/QuantityValidator/Initializer/OptionTest.php b/app/code/Magento/CatalogInventory/Test/Unit/Model/Quote/Item/QuantityValidator/Initializer/OptionTest.php index eb32c30ab4f86..9ca4496e53172 100644 --- a/app/code/Magento/CatalogInventory/Test/Unit/Model/Quote/Item/QuantityValidator/Initializer/OptionTest.php +++ b/app/code/Magento/CatalogInventory/Test/Unit/Model/Quote/Item/QuantityValidator/Initializer/OptionTest.php @@ -5,6 +5,9 @@ */ namespace Magento\CatalogInventory\Test\Unit\Model\Quote\Item\QuantityValidator\Initializer; +/** + * Class OptionTest + */ class OptionTest extends \PHPUnit\Framework\TestCase { /** @@ -67,6 +70,9 @@ class OptionTest extends \PHPUnit\Framework\TestCase */ protected $websiteId = 111; + /** + * @inheritdoc + */ protected function setUp() { $optionMethods = [ @@ -140,6 +146,9 @@ protected function setUp() ); } + /** + * @return void + */ public function testInitializeWhenResultIsDecimalGetBackordersMessageHasOptionQtyUpdate() { $optionValue = 5; @@ -151,7 +160,6 @@ public function testInitializeWhenResultIsDecimalGetBackordersMessageHasOptionQt $this->optionMock->expects($this->any())->method('getProduct')->will($this->returnValue($this->productMock)); $this->stockItemMock->expects($this->once())->method('setIsChildItem')->with(true); - $this->stockItemMock->expects($this->once())->method('setSuppressCheckQtyIncrements')->with(true); $this->stockItemMock->expects($this->once())->method('getItemId')->will($this->returnValue(true)); $this->stockRegistry @@ -212,6 +220,9 @@ public function testInitializeWhenResultIsDecimalGetBackordersMessageHasOptionQt $this->validator->initialize($this->optionMock, $this->quoteItemMock, $qty); } + /** + * @return void + */ public function testInitializeWhenResultNotDecimalGetBackordersMessageHasOptionQtyUpdate() { $optionValue = 5; @@ -222,7 +233,6 @@ public function testInitializeWhenResultNotDecimalGetBackordersMessageHasOptionQ $this->optionMock->expects($this->any())->method('getProduct')->will($this->returnValue($this->productMock)); $this->stockItemMock->expects($this->once())->method('setIsChildItem')->with(true); - $this->stockItemMock->expects($this->once())->method('setSuppressCheckQtyIncrements')->with(true); $this->stockItemMock->expects($this->once())->method('getItemId')->will($this->returnValue(true)); $this->stockRegistry @@ -267,6 +277,8 @@ public function testInitializeWhenResultNotDecimalGetBackordersMessageHasOptionQ } /** + * @return void + * * @expectedException \Magento\Framework\Exception\LocalizedException * @expectedExceptionMessage The stock item for Product in option is not valid. */ diff --git a/app/code/Magento/CatalogInventory/Test/Unit/Model/Quote/Item/QuantityValidator/Initializer/QuantityValidatorTest.php b/app/code/Magento/CatalogInventory/Test/Unit/Model/Quote/Item/QuantityValidator/Initializer/QuantityValidatorTest.php index 7e2bad0b96354..884908aa1c378 100644 --- a/app/code/Magento/CatalogInventory/Test/Unit/Model/Quote/Item/QuantityValidator/Initializer/QuantityValidatorTest.php +++ b/app/code/Magento/CatalogInventory/Test/Unit/Model/Quote/Item/QuantityValidator/Initializer/QuantityValidatorTest.php @@ -119,6 +119,9 @@ class QuantityValidatorTest extends \PHPUnit\Framework\TestCase */ private $stockStatusMock; + /** + * @inheritdoc + */ protected function setUp() { $objectManagerHelper = new ObjectManager($this); @@ -278,11 +281,13 @@ public function testValidateWithOptions() { $optionMock = $this->getMockBuilder(OptionItem::class) ->disableOriginalConstructor() - ->setMethods(['setHasError', 'getStockStateResult']) + ->setMethods(['setHasError', 'getStockStateResult', 'getProduct']) ->getMock(); $optionMock->expects($this->once()) ->method('getStockStateResult') ->willReturn($this->resultMock); + $optionMock->method('getProduct') + ->willReturn($this->productMock); $this->stockRegistryMock->expects($this->at(0)) ->method('getStockItem') ->willReturn($this->stockItemMock); @@ -319,7 +324,7 @@ public function testValidateWithOptionsAndError() { $optionMock = $this->getMockBuilder(OptionItem::class) ->disableOriginalConstructor() - ->setMethods(['setHasError', 'getStockStateResult']) + ->setMethods(['setHasError', 'getStockStateResult', 'getProduct']) ->getMock(); $this->stockRegistryMock->expects($this->at(0)) ->method('getStockItem') @@ -330,6 +335,8 @@ public function testValidateWithOptionsAndError() $optionMock->expects($this->once()) ->method('getStockStateResult') ->willReturn($this->resultMock); + $optionMock->method('getProduct') + ->willReturn($this->productMock); $options = [$optionMock]; $this->createInitialStub(1); $this->setUpStubForQuantity(1, true); @@ -360,7 +367,7 @@ public function testValidateAndRemoveErrorsFromQuote() { $optionMock = $this->getMockBuilder(OptionItem::class) ->disableOriginalConstructor() - ->setMethods(['setHasError', 'getStockStateResult']) + ->setMethods(['setHasError', 'getStockStateResult', 'getProduct']) ->getMock(); $quoteItem = $this->getMockBuilder(Item::class) ->disableOriginalConstructor() @@ -369,6 +376,8 @@ public function testValidateAndRemoveErrorsFromQuote() $optionMock->expects($this->once()) ->method('getStockStateResult') ->willReturn($this->resultMock); + $optionMock->method('getProduct') + ->willReturn($this->productMock); $this->stockRegistryMock->expects($this->at(0)) ->method('getStockItem') ->willReturn($this->stockItemMock); @@ -544,6 +553,9 @@ private function createInitialStub($qty) ->willReturn($this->resultMock); } + /** + * @return void + */ private function setUpStubForRemoveError() { $quoteItems = [$this->quoteItemMock]; diff --git a/app/code/Magento/CatalogInventory/composer.json b/app/code/Magento/CatalogInventory/composer.json index 2b823cdb9cc08..41fd9db15f15a 100644 --- a/app/code/Magento/CatalogInventory/composer.json +++ b/app/code/Magento/CatalogInventory/composer.json @@ -14,7 +14,7 @@ "magento/module-sales": "101.0.*" }, "type": "magento2-module", - "version": "100.2.4", + "version": "100.2.5", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/CatalogRule/composer.json b/app/code/Magento/CatalogRule/composer.json index 595cd121a1a1c..4067d7044b158 100644 --- a/app/code/Magento/CatalogRule/composer.json +++ b/app/code/Magento/CatalogRule/composer.json @@ -17,7 +17,7 @@ "magento/module-catalog-rule-sample-data": "Sample Data version:100.2.*" }, "type": "magento2-module", - "version": "101.0.4", + "version": "101.0.5", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/CatalogRuleConfigurable/composer.json b/app/code/Magento/CatalogRuleConfigurable/composer.json index ecad2425eccc8..93a937ffcc45e 100644 --- a/app/code/Magento/CatalogRuleConfigurable/composer.json +++ b/app/code/Magento/CatalogRuleConfigurable/composer.json @@ -13,7 +13,7 @@ "magento/module-catalog-rule": "101.0.*" }, "type": "magento2-module", - "version": "100.2.1", + "version": "100.2.2", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/CatalogSearch/composer.json b/app/code/Magento/CatalogSearch/composer.json index 2903ee3789da7..2a72af9cf96a5 100644 --- a/app/code/Magento/CatalogSearch/composer.json +++ b/app/code/Magento/CatalogSearch/composer.json @@ -20,7 +20,7 @@ "magento/module-config": "101.0.*" }, "type": "magento2-module", - "version": "100.2.4", + "version": "100.2.5", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/CatalogUrlRewrite/composer.json b/app/code/Magento/CatalogUrlRewrite/composer.json index a1abf32d21a49..66011fcac287e 100644 --- a/app/code/Magento/CatalogUrlRewrite/composer.json +++ b/app/code/Magento/CatalogUrlRewrite/composer.json @@ -14,7 +14,7 @@ "magento/module-ui": "101.0.*" }, "type": "magento2-module", - "version": "100.2.4", + "version": "100.2.5", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/CatalogWidget/composer.json b/app/code/Magento/CatalogWidget/composer.json index 169d21215cb09..496651a6bfa17 100644 --- a/app/code/Magento/CatalogWidget/composer.json +++ b/app/code/Magento/CatalogWidget/composer.json @@ -14,7 +14,7 @@ "magento/framework": "101.0.*" }, "type": "magento2-module", - "version": "100.2.2", + "version": "100.2.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Checkout/Controller/Cart/Add.php b/app/code/Magento/Checkout/Controller/Cart/Add.php index 6aa489dc8cacc..82085281c93d9 100644 --- a/app/code/Magento/Checkout/Controller/Cart/Add.php +++ b/app/code/Magento/Checkout/Controller/Cart/Add.php @@ -80,6 +80,9 @@ protected function _initProduct() public function execute() { if (!$this->_formKeyValidator->validate($this->getRequest())) { + $this->messageManager->addErrorMessage( + __('Your session has expired') + ); return $this->resultRedirectFactory->create()->setPath('*/*/'); } diff --git a/app/code/Magento/Checkout/Test/Mftf/ActionGroup/CheckoutActionGroup.xml b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/CheckoutActionGroup.xml index b3163ca9c62f5..83dddf0aa8435 100644 --- a/app/code/Magento/Checkout/Test/Mftf/ActionGroup/CheckoutActionGroup.xml +++ b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/CheckoutActionGroup.xml @@ -11,7 +11,8 @@ <!-- Checkout select Check/Money Order payment --> <actionGroup name="CheckoutSelectCheckMoneyOrderPaymentActionGroup"> <waitForElement selector="{{CheckoutPaymentSection.paymentSectionTitle}}" time="30" stepKey="waitForPaymentSectionLoaded"/> - <conditionalClick selector="{{CheckoutPaymentSection.checkMoneyOrderPayment}}" dependentSelector="{{CheckoutPaymentSection.billingAddress}}" visible="false" stepKey="clickCheckMoneyOrderPayment" /> + <waitForElementVisible selector="{{CheckoutPaymentSection.billingAddress}}" time="30" stepKey="waitForBillingAddressDetailsAppears"/> + <conditionalClick selector="{{CheckoutPaymentSection.checkMoneyOrderPayment}}" dependentSelector="{{CheckoutPaymentSection.checkMoneyOrderPayment}}" visible="true" stepKey="clickCheckMoneyOrderPayment"/> </actionGroup> <!-- Checkout place order --> @@ -25,4 +26,27 @@ <see selector="{{CheckoutSuccessMainSection.success}}" userInput="{{orderNumberMessage}}" stepKey="seeOrderNumber"/> <see selector="{{CheckoutSuccessMainSection.success}}" userInput="{{emailYouMessage}}" stepKey="seeEmailYou"/> </actionGroup> + + <!-- Logged in user checkout filling shipping section --> + <actionGroup name="LoggedInUserCheckoutFillingShippingSectionActionGroup"> + <arguments> + <argument name="customerVar"/> + <argument name="customerAddressVar"/> + </arguments> + <waitForElementVisible selector="{{CheckoutShippingSection.firstName}}" stepKey="waitForFirstNameFieldAppears" time="30"/> + <fillField selector="{{CheckoutShippingSection.firstName}}" userInput="{{customerVar.firstname}}" stepKey="enterFirstName"/> + <fillField selector="{{CheckoutShippingSection.lastName}}" userInput="{{customerVar.lastname}}" stepKey="enterLastName"/> + <fillField selector="{{CheckoutShippingSection.street}}" userInput="{{customerAddressVar.street[0]}}" stepKey="enterStreet"/> + <fillField selector="{{CheckoutShippingSection.city}}" userInput="{{customerAddressVar.city}}" stepKey="enterCity"/> + <selectOption selector="{{CheckoutShippingSection.region}}" userInput="{{customerAddressVar.state}}" stepKey="selectRegion"/> + <fillField selector="{{CheckoutShippingSection.postcode}}" userInput="{{customerAddressVar.postcode}}" stepKey="enterPostcode"/> + <fillField selector="{{CheckoutShippingSection.telephone}}" userInput="{{customerAddressVar.telephone}}" stepKey="enterTelephone"/> + <waitForLoadingMaskToDisappear stepKey="waitForLoadingMask"/> + <waitForElementVisible selector="{{CheckoutShippingSection.firstShippingMethod}}" stepKey="waitForSelectFirstShippingMethodAppears"/> + <click selector="{{CheckoutShippingSection.firstShippingMethod}}" stepKey="selectFirstShippingMethod"/> + <waitForElement selector="{{CheckoutShippingSection.next}}" time="30" stepKey="waitForNextButton"/> + <click selector="{{CheckoutShippingSection.next}}" stepKey="clickNext"/> + <waitForElement selector="{{CheckoutPaymentSection.paymentSectionTitle}}" time="30" stepKey="waitForPaymentSectionLoaded"/> + <seeInCurrentUrl url="{{CheckoutPage.url}}/#payment" stepKey="assertCheckoutPaymentUrl"/> + </actionGroup> </actionGroups> diff --git a/app/code/Magento/Checkout/Test/Mftf/ActionGroup/IdentityOfDefaultBillingAndShippingAddressActionGroup.xml b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/IdentityOfDefaultBillingAndShippingAddressActionGroup.xml new file mode 100644 index 0000000000000..c23d860e4660d --- /dev/null +++ b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/IdentityOfDefaultBillingAndShippingAddressActionGroup.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + <!--Assert That Shipping And Billing Address are the same--> + <actionGroup name="AssertThatShippingAndBillingAddressTheSame"> + <!--Make sure that shipping and billing addresses are different--> + <see userInput="Shipping Address" stepKey="seeShippingAddress"/> + <see userInput="Billing Address" stepKey="seeBillingAddress"/> + <!--Get shipping and billing addresses--> + <grabTextFrom selector="{{StorefrontIdentityOfDefaultBillingAndShippingAddressSection.shippingAddress}}" stepKey="shippingAddr"/> + <grabTextFrom selector="{{StorefrontIdentityOfDefaultBillingAndShippingAddressSection.billingAddress}}" stepKey="billingAddr"/> + <assertEquals actual="$billingAddr" expected="$shippingAddr" stepKey="assert"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Checkout/Test/Mftf/Section/StorefrontIdentityOfDefaultBillingAndShippingAddressSection.xml b/app/code/Magento/Checkout/Test/Mftf/Section/StorefrontIdentityOfDefaultBillingAndShippingAddressSection.xml new file mode 100644 index 0000000000000..748db42af3bfe --- /dev/null +++ b/app/code/Magento/Checkout/Test/Mftf/Section/StorefrontIdentityOfDefaultBillingAndShippingAddressSection.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="StorefrontIdentityOfDefaultBillingAndShippingAddressSection"> + <element name="shippingAddress" type="textarea" selector=".box.box-billing-address address"/> + <element name="billingAddress" type="textarea" selector=".box.box-shipping-address address"/> + </section> +</sections> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/IdentityOfDefaultBillingAndShippingAddressTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/IdentityOfDefaultBillingAndShippingAddressTest.xml new file mode 100644 index 0000000000000..b72f238565fd6 --- /dev/null +++ b/app/code/Magento/Checkout/Test/Mftf/Test/IdentityOfDefaultBillingAndShippingAddressTest.xml @@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + <test name="IdentityOfDefaultBillingAndShippingAddressTest"> + <annotations> + <features value="Customer"/> + <title value="Checking assignment of default billing address after placing an order"/> + <description value="In 'Address book' field 'Default Billing Address' should be the same as 'Default Shipping Address'"/> + <severity value="MAJOR"/> + <testCaseId value="MAGETWO-94336"/> + <stories value="MAGETWO-73604: New address is not marked as 'Default Billing'"/> + <group value="customer"/> + </annotations> + + <before> + <!--Create product--> + <createData entity="SimpleSubCategory" stepKey="category"/> + <createData entity="SimpleProduct" stepKey="product"> + <requiredEntity createDataKey="category"/> + </createData> + </before> + + <!--Go to Storefront--> + <amOnPage url="{{StorefrontHomePage.url}}" stepKey="goToStorefront"/> + <waitForPageLoad stepKey="waitForPageLoad1"/> + + <!-- Fill out form for a new user with address --> + <actionGroup ref="SignUpNewUserFromStorefrontActionGroup" stepKey="signUpNewUser"> + <argument name="Customer" value="Simple_US_NY_Customer"/> + </actionGroup> + + <!-- Add simple product to cart --> + <actionGroup ref="AddSimpleProductToCart" stepKey="addProductToCart1"> + <argument name="product" value="$$product$$"/> + </actionGroup> + + <!--Proceed to shipment--> + <amOnPage url="{{CheckoutPage.url}}/" stepKey="goToCheckout"/> + <waitForPageLoad stepKey="waitForShippingSection"/> + + <!--Fill shipment form--> + <actionGroup ref="LoggedInUserCheckoutFillingShippingSectionActionGroup" stepKey="checkoutFillingShippingSection" > + <argument name="customerVar" value="Simple_US_NY_Customer" /> + <argument name="customerAddressVar" value="US_Address_NY" /> + </actionGroup> + + <!--Fill cart data--> + <actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectCheckMoneyOrderPayment" /> + + <actionGroup ref="CheckoutPlaceOrderActionGroup" stepKey="placeorder"> + <argument name="orderNumberMessage" value="CONST.successCheckoutOrderNumberMessage" /> + <argument name="emailYouMessage" value="CONST.successCheckoutEmailYouMessage" /> + </actionGroup> + <!--Go To My Account--> + <amOnPage url="{{StorefrontCustomerDashboardPage.url}}" stepKey="goToMyAccountPage"/> + <waitForPageLoad stepKey="waitForPageLoad2"/> + + <!--Assert That Shipping And Billing Address are the same--> + <actionGroup ref="AssertThatShippingAndBillingAddressTheSame" stepKey="assertThatShippingAndBillingAddressTheSame"/> + + <after> + <!--Delete created Product--> + <deleteData createDataKey="product" stepKey="deleteProduct"/> + <deleteData createDataKey="category" stepKey="deleteCategory"/> + <!--Delete created customer--> + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> + <actionGroup ref="RemoveCustomerFromAdminActionGroup" stepKey="removeCreatedCustomer"> + <argument name="customer" value="Simple_US_NY_Customer"/> + </actionGroup> + <actionGroup ref="logout" stepKey="logout"/> + </after> + </test> +</tests> diff --git a/app/code/Magento/Checkout/Test/Unit/Controller/Cart/AddTest.php b/app/code/Magento/Checkout/Test/Unit/Controller/Cart/AddTest.php new file mode 100644 index 0000000000000..b06000662e093 --- /dev/null +++ b/app/code/Magento/Checkout/Test/Unit/Controller/Cart/AddTest.php @@ -0,0 +1,95 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Checkout\Test\Unit\Controller\Cart; + +use Magento\Checkout\Controller\Cart\Add; +use Magento\Framework\App\RequestInterface; +use Magento\Framework\Controller\Result\RedirectFactory; +use Magento\Framework\Data\Form\FormKey\Validator; +use Magento\Framework\Message\ManagerInterface; +use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper; + +class AddTest extends \PHPUnit\Framework\TestCase +{ + /** + * @var ObjectManagerHelper + */ + private $objectManagerHelper; + + /** + * @var Validator|\PHPUnit_Framework_MockObject_MockObject + */ + private $formKeyValidator; + + /** + * @var RedirectFactory|\PHPUnit_Framework_MockObject_MockObject + */ + private $resultRedirectFactory; + + /** + * @var RequestInterface|\PHPUnit_Framework_MockObject_MockObject + */ + private $request; + + /** + * @var ManagerInterface|\PHPUnit_Framework_MockObject_MockObject + */ + private $messageManager; + + /** + * @var Add|\PHPUnit_Framework_MockObject_MockObject + */ + private $cartAdd; + + /** + * Init mocks for tests. + * + * @return void + */ + public function setUp() + { + $this->formKeyValidator = $this->getMockBuilder(Validator::class) + ->disableOriginalConstructor()->getMock(); + $this->resultRedirectFactory = $this->getMockBuilder(RedirectFactory::class) + ->disableOriginalConstructor()->getMock(); + $this->request = $this->getMockBuilder(RequestInterface::class) + ->disableOriginalConstructor()->getmock(); + $this->messageManager = $this->getMockBuilder(ManagerInterface::class) + ->disableOriginalConstructor()->getMock(); + + $this->objectManagerHelper = new ObjectManagerHelper($this); + $this->cartAdd = $this->objectManagerHelper->getObject( + Add::class, + [ + '_formKeyValidator' => $this->formKeyValidator, + 'resultRedirectFactory' => $this->resultRedirectFactory, + '_request' => $this->request, + 'messageManager' => $this->messageManager, + ] + ); + } + + /** + * Test for method execute. + * + * @return void + */ + public function testExecute() + { + $redirect = $this->getMockBuilder(\Magento\Framework\Controller\Result\Redirect::class) + ->disableOriginalConstructor() + ->getMock(); + $path = '*/*/'; + + $this->formKeyValidator->expects($this->once())->method('validate')->with($this->request)->willReturn(false); + $this->messageManager->expects($this->once())->method('addErrorMessage'); + $this->resultRedirectFactory->expects($this->once())->method('create')->willReturn($redirect); + $redirect->expects($this->once())->method('setPath')->with($path)->willReturnSelf(); + $this->assertEquals($redirect, $this->cartAdd->execute()); + } +} diff --git a/app/code/Magento/Checkout/composer.json b/app/code/Magento/Checkout/composer.json index 9400af352196c..32cb6c53864db 100644 --- a/app/code/Magento/Checkout/composer.json +++ b/app/code/Magento/Checkout/composer.json @@ -26,7 +26,7 @@ "magento/module-cookie": "100.2.*" }, "type": "magento2-module", - "version": "100.2.5", + "version": "100.2.6", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/CheckoutAgreements/composer.json b/app/code/Magento/CheckoutAgreements/composer.json index d54b90d823386..a53558981e2f8 100644 --- a/app/code/Magento/CheckoutAgreements/composer.json +++ b/app/code/Magento/CheckoutAgreements/composer.json @@ -10,7 +10,7 @@ "magento/framework": "101.0.*" }, "type": "magento2-module", - "version": "100.2.1", + "version": "100.2.2", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Cms/composer.json b/app/code/Magento/Cms/composer.json index ea31f1bda59b2..64e97e0a38e18 100644 --- a/app/code/Magento/Cms/composer.json +++ b/app/code/Magento/Cms/composer.json @@ -18,7 +18,7 @@ "magento/module-cms-sample-data": "Sample Data version:100.2.*" }, "type": "magento2-module", - "version": "102.0.5", + "version": "102.0.6", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/CmsUrlRewrite/composer.json b/app/code/Magento/CmsUrlRewrite/composer.json index e86f4c073db74..414dcdf54921d 100644 --- a/app/code/Magento/CmsUrlRewrite/composer.json +++ b/app/code/Magento/CmsUrlRewrite/composer.json @@ -9,7 +9,7 @@ "magento/framework": "101.0.*" }, "type": "magento2-module", - "version": "100.2.1", + "version": "100.2.2", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Config/App/Config/Type/System.php b/app/code/Magento/Config/App/Config/Type/System.php index 07bb0ca8cf748..83c61f90f789a 100644 --- a/app/code/Magento/Config/App/Config/Type/System.php +++ b/app/code/Magento/Config/App/Config/Type/System.php @@ -5,58 +5,46 @@ */ namespace Magento\Config\App\Config\Type; +use Magento\Framework\App\Config\ConfigSourceInterface; use Magento\Framework\App\Config\ConfigTypeInterface; +use Magento\Framework\App\Config\Spi\PostProcessorInterface; +use Magento\Framework\App\Config\Spi\PreProcessorInterface; use Magento\Framework\App\ObjectManager; use Magento\Config\App\Config\Type\System\Reader; use Magento\Framework\Serialize\Serializer\Sensitive as SensitiveSerializer; use Magento\Framework\Serialize\Serializer\SensitiveFactory as SensitiveSerializerFactory; +use Magento\Framework\App\ScopeInterface; +use Magento\Framework\Cache\FrontendInterface; +use Magento\Framework\Serialize\SerializerInterface; +use Magento\Store\Model\Config\Processor\Fallback; +use Magento\Store\Model\ScopeInterface as StoreScope; /** * System configuration type + * * @api * @since 100.1.2 */ class System implements ConfigTypeInterface { const CACHE_TAG = 'config_scopes'; - const CONFIG_TYPE = 'system'; - /** - * @var \Magento\Framework\App\Config\ConfigSourceInterface - */ - private $source; - /** * @var array */ private $data = []; /** - * @var \Magento\Framework\App\Config\Spi\PostProcessorInterface + * @var PostProcessorInterface */ private $postProcessor; /** - * @var \Magento\Framework\App\Config\Spi\PreProcessorInterface - */ - private $preProcessor; - - /** - * @var \Magento\Framework\Cache\FrontendInterface + * @var FrontendInterface */ private $cache; - /** - * @var int - */ - private $cachingNestedLevel; - - /** - * @var \Magento\Store\Model\Config\Processor\Fallback - */ - private $fallback; - /** * @var SensitiveSerializer */ @@ -81,40 +69,37 @@ class System implements ConfigTypeInterface * * @var array */ - private $availableDataScopes = null; + private $availableDataScopes; /** - * @param \Magento\Framework\App\Config\ConfigSourceInterface $source - * @param \Magento\Framework\App\Config\Spi\PostProcessorInterface $postProcessor - * @param \Magento\Store\Model\Config\Processor\Fallback $fallback - * @param \Magento\Framework\Cache\FrontendInterface $cache - * @param \Magento\Framework\Serialize\SerializerInterface $serializer - * @param \Magento\Framework\App\Config\Spi\PreProcessorInterface $preProcessor + * @param ConfigSourceInterface $source + * @param PostProcessorInterface $postProcessor + * @param Fallback $fallback + * @param FrontendInterface $cache + * @param SerializerInterface $serializer + * @param PreProcessorInterface $preProcessor * @param int $cachingNestedLevel * @param string $configType * @param Reader $reader * @param SensitiveSerializerFactory|null $sensitiveFactory * * @SuppressWarnings(PHPMD.ExcessiveParameterList) + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function __construct( - \Magento\Framework\App\Config\ConfigSourceInterface $source, - \Magento\Framework\App\Config\Spi\PostProcessorInterface $postProcessor, - \Magento\Store\Model\Config\Processor\Fallback $fallback, - \Magento\Framework\Cache\FrontendInterface $cache, - \Magento\Framework\Serialize\SerializerInterface $serializer, - \Magento\Framework\App\Config\Spi\PreProcessorInterface $preProcessor, + ConfigSourceInterface $source, + PostProcessorInterface $postProcessor, + Fallback $fallback, + FrontendInterface $cache, + SerializerInterface $serializer, + PreProcessorInterface $preProcessor, $cachingNestedLevel = 1, $configType = self::CONFIG_TYPE, Reader $reader = null, SensitiveSerializerFactory $sensitiveFactory = null ) { - $this->source = $source; $this->postProcessor = $postProcessor; - $this->preProcessor = $preProcessor; $this->cache = $cache; - $this->cachingNestedLevel = $cachingNestedLevel; - $this->fallback = $fallback; $this->configType = $configType; $this->reader = $reader ?: ObjectManager::getInstance() ->get(Reader::class); @@ -149,27 +134,52 @@ public function get($path = '') { if ($path === '') { $this->data = array_replace_recursive($this->loadAllData(), $this->data); + return $this->data; } + + return $this->getWithParts($path); + } + + /** + * Proceed with parts extraction from path. + * + * @param string $path + * @return array|int|string|boolean + */ + private function getWithParts($path) + { $pathParts = explode('/', $path); - if (count($pathParts) === 1 && $pathParts[0] !== 'default') { + + if (count($pathParts) === 1 && $pathParts[0] !== ScopeInterface::SCOPE_DEFAULT) { if (!isset($this->data[$pathParts[0]])) { $data = $this->readData(); $this->data = array_replace_recursive($data, $this->data); } + return $this->data[$pathParts[0]]; } + $scopeType = array_shift($pathParts); - if ($scopeType === 'default') { + + if ($scopeType === ScopeInterface::SCOPE_DEFAULT) { if (!isset($this->data[$scopeType])) { $this->data = array_replace_recursive($this->loadDefaultScopeData($scopeType), $this->data); } + return $this->getDataByPathParts($this->data[$scopeType], $pathParts); } + $scopeId = array_shift($pathParts); + if (!isset($this->data[$scopeType][$scopeId])) { - $this->data = array_replace_recursive($this->loadScopeData($scopeType, $scopeId), $this->data); + $scopeData = $this->loadScopeData($scopeType, $scopeId); + + if (!isset($this->data[$scopeType][$scopeId])) { + $this->data = array_replace_recursive($scopeData, $this->data); + } } + return isset($this->data[$scopeType][$scopeId]) ? $this->getDataByPathParts($this->data[$scopeType][$scopeId], $pathParts) : null; @@ -183,11 +193,13 @@ public function get($path = '') private function loadAllData() { $cachedData = $this->cache->load($this->configType); + if ($cachedData === false) { $data = $this->readData(); } else { $data = $this->serializer->unserialize($cachedData); } + return $data; } @@ -200,12 +212,14 @@ private function loadAllData() private function loadDefaultScopeData($scopeType) { $cachedData = $this->cache->load($this->configType . '_' . $scopeType); + if ($cachedData === false) { $data = $this->readData(); $this->cacheData($data); } else { $data = [$scopeType => $this->serializer->unserialize($cachedData)]; } + return $data; } @@ -219,6 +233,7 @@ private function loadDefaultScopeData($scopeType) private function loadScopeData($scopeType, $scopeId) { $cachedData = $this->cache->load($this->configType . '_' . $scopeType . '_' . $scopeId); + if ($cachedData === false) { if ($this->availableDataScopes === null) { $cachedScopeData = $this->cache->load($this->configType . '_scopes'); @@ -234,6 +249,7 @@ private function loadScopeData($scopeType, $scopeId) } else { $data = [$scopeType => [$scopeId => $this->serializer->unserialize($cachedData)]]; } + return $data; } @@ -257,7 +273,7 @@ private function cacheData(array $data) [self::CACHE_TAG] ); $scopes = []; - foreach (['websites', 'stores'] as $curScopeType) { + foreach ([StoreScope::SCOPE_WEBSITES, StoreScope::SCOPE_STORES] as $curScopeType) { foreach ($data[$curScopeType] ?? [] as $curScopeId => $curScopeData) { $scopes[$curScopeType][$curScopeId] = 1; $this->cache->save( @@ -269,7 +285,7 @@ private function cacheData(array $data) } $this->cache->save( $this->serializer->serialize($scopes), - $this->configType . "_scopes", + $this->configType . '_scopes', [self::CACHE_TAG] ); } @@ -292,6 +308,7 @@ private function getDataByPathParts($data, $pathParts) return null; } } + return $data; } diff --git a/app/code/Magento/Config/Test/Mftf/Page/AdminConfigurationGeneralSectionPage.xml b/app/code/Magento/Config/Test/Mftf/Page/AdminConfigurationGeneralSectionPage.xml new file mode 100644 index 0000000000000..35903fe33d06c --- /dev/null +++ b/app/code/Magento/Config/Test/Mftf/Page/AdminConfigurationGeneralSectionPage.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="AdminConfigurationGeneralSectionPage" url="admin/system_config/edit/section/general/{{group_anchor}}" parameterized="true" area="admin" module="Magento_Config"> + <!--Will be extended in other modules--> + </page> +</pages> diff --git a/app/code/Magento/Config/composer.json b/app/code/Magento/Config/composer.json index 1201c5942b558..e43c9b0382e25 100644 --- a/app/code/Magento/Config/composer.json +++ b/app/code/Magento/Config/composer.json @@ -13,7 +13,7 @@ "magento/module-deploy": "100.2.*" }, "type": "magento2-module", - "version": "101.0.5", + "version": "101.0.6", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/ConfigurableImportExport/composer.json b/app/code/Magento/ConfigurableImportExport/composer.json index 10e6637e7558a..b2070fe7ebc44 100644 --- a/app/code/Magento/ConfigurableImportExport/composer.json +++ b/app/code/Magento/ConfigurableImportExport/composer.json @@ -11,7 +11,7 @@ "magento/framework": "101.0.*" }, "type": "magento2-module", - "version": "100.2.2", + "version": "100.2.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Edit/Button/Save.php b/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Edit/Button/Save.php index 8848fc78dad6d..7f90d96e8a23e 100644 --- a/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Edit/Button/Save.php +++ b/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Edit/Button/Save.php @@ -8,22 +8,12 @@ use Magento\Ui\Component\Control\Container; use Magento\Catalog\Block\Adminhtml\Product\Edit\Button\Generic; use Magento\ConfigurableProduct\Model\Product\Type\Configurable as ConfigurableType; -use Magento\Catalog\Model\Product\Type; /** * Class Save */ class Save extends Generic { - /** - * @var array - */ - private static $availableProductTypes = [ - ConfigurableType::TYPE_CODE, - Type::TYPE_SIMPLE, - Type::TYPE_VIRTUAL - ]; - /** * {@inheritdoc} */ @@ -165,6 +155,6 @@ protected function getSaveAction() */ protected function isConfigurableProduct() { - return in_array($this->getProduct()->getTypeId(), self::$availableProductTypes); + return !$this->getProduct()->isComposite() || $this->getProduct()->getTypeId() === ConfigurableType::TYPE_CODE; } } diff --git a/app/code/Magento/ConfigurableProduct/Test/Unit/Block/Adminhtml/Product/Edit/Button/SaveTest.php b/app/code/Magento/ConfigurableProduct/Test/Unit/Block/Adminhtml/Product/Edit/Button/SaveTest.php index 8df6df53cc065..2d73b61245a4b 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Unit/Block/Adminhtml/Product/Edit/Button/SaveTest.php +++ b/app/code/Magento/ConfigurableProduct/Test/Unit/Block/Adminhtml/Product/Edit/Button/SaveTest.php @@ -38,7 +38,7 @@ protected function setUp() ->disableOriginalConstructor() ->getMock(); $this->productMock = $this->getMockBuilder(ProductInterface::class) - ->setMethods(['isReadonly', 'isDuplicable']) + ->setMethods(['isReadonly', 'isDuplicable', 'isComposite']) ->getMockForAbstractClass(); $this->registryMock->expects(static::any()) diff --git a/app/code/Magento/ConfigurableProduct/composer.json b/app/code/Magento/ConfigurableProduct/composer.json index 4c583d79ce418..33ee30a25b012 100644 --- a/app/code/Magento/ConfigurableProduct/composer.json +++ b/app/code/Magento/ConfigurableProduct/composer.json @@ -24,7 +24,7 @@ "magento/module-product-links-sample-data": "Sample Data version:100.2.*" }, "type": "magento2-module", - "version": "100.2.5", + "version": "100.2.6", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/ConfigurableProductSales/composer.json b/app/code/Magento/ConfigurableProductSales/composer.json index d1fbc142b627f..ca6638924b8c6 100644 --- a/app/code/Magento/ConfigurableProductSales/composer.json +++ b/app/code/Magento/ConfigurableProductSales/composer.json @@ -12,7 +12,7 @@ "magento/module-configurable-product": "100.2.*" }, "type": "magento2-module", - "version": "100.2.2", + "version": "100.2.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Contact/composer.json b/app/code/Magento/Contact/composer.json index 9ceca3bdfa80b..49ac8ec40dbc4 100644 --- a/app/code/Magento/Contact/composer.json +++ b/app/code/Magento/Contact/composer.json @@ -10,7 +10,7 @@ "magento/framework": "101.0.*" }, "type": "magento2-module", - "version": "100.2.2", + "version": "100.2.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Cookie/composer.json b/app/code/Magento/Cookie/composer.json index 23bd37234f939..cc04b0ccd5d7d 100644 --- a/app/code/Magento/Cookie/composer.json +++ b/app/code/Magento/Cookie/composer.json @@ -10,7 +10,7 @@ "magento/module-backend": "100.2.*" }, "type": "magento2-module", - "version": "100.2.1", + "version": "100.2.2", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Cron/composer.json b/app/code/Magento/Cron/composer.json index 5faf1d15e7782..a8c124dc57207 100644 --- a/app/code/Magento/Cron/composer.json +++ b/app/code/Magento/Cron/composer.json @@ -10,7 +10,7 @@ "magento/module-config": "101.0.*" }, "type": "magento2-module", - "version": "100.2.3", + "version": "100.2.4", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/CurrencySymbol/composer.json b/app/code/Magento/CurrencySymbol/composer.json index 3afa8c6338378..da76425436038 100644 --- a/app/code/Magento/CurrencySymbol/composer.json +++ b/app/code/Magento/CurrencySymbol/composer.json @@ -11,7 +11,7 @@ "magento/framework": "101.0.*" }, "type": "magento2-module", - "version": "100.2.1", + "version": "100.2.2", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Customer/Model/Metadata/Form/Date.php b/app/code/Magento/Customer/Model/Metadata/Form/Date.php index b27f6627439e4..6f14b2e6f1dad 100644 --- a/app/code/Magento/Customer/Model/Metadata/Form/Date.php +++ b/app/code/Magento/Customer/Model/Metadata/Form/Date.php @@ -12,7 +12,7 @@ class Date extends AbstractData { /** - * {@inheritdoc} + * @inheritdoc */ public function extractValue(\Magento\Framework\App\RequestInterface $request) { @@ -21,7 +21,7 @@ public function extractValue(\Magento\Framework\App\RequestInterface $request) } /** - * {@inheritdoc} + * @inheritdoc * @SuppressWarnings(PHPMD.CyclomaticComplexity) * @SuppressWarnings(PHPMD.NPathComplexity) */ @@ -95,21 +95,15 @@ public function validateValue($value) } /** - * {@inheritdoc} + * @inheritdoc */ public function compactValue($value) { - if ($value !== false) { - if (empty($value)) { - $value = null; - } - return $value; - } - return false; + return $value; } /** - * {@inheritdoc} + * @inheritdoc */ public function restoreValue($value) { @@ -117,7 +111,7 @@ public function restoreValue($value) } /** - * {@inheritdoc} + * @inheritdoc */ public function outputValue($format = \Magento\Customer\Model\Metadata\ElementFactory::OUTPUT_FORMAT_TEXT) { diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/CustomerActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/CustomerActionGroup.xml index 3f816425a81f7..085c944cd3d3b 100644 --- a/app/code/Magento/Customer/Test/Mftf/ActionGroup/CustomerActionGroup.xml +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/CustomerActionGroup.xml @@ -17,6 +17,5 @@ <fillField stepKey="fillEmail" userInput="{{customer.email}}" selector="{{StorefrontCustomerSignInFormSection.emailField}}"/> <fillField stepKey="fillPassword" userInput="{{customer.password}}" selector="{{StorefrontCustomerSignInFormSection.passwordField}}"/> <click stepKey="clickSignInAccountButton" selector="{{StorefrontCustomerSignInFormSection.signInAccountButton}}"/> - <waitForPageLoad stepKey="pageLoadAfterLogin"/> </actionGroup> </actionGroups> diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/RemoveCustomerFromAdminActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/RemoveCustomerFromAdminActionGroup.xml new file mode 100644 index 0000000000000..a53968a920806 --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/RemoveCustomerFromAdminActionGroup.xml @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + <!--Delete a customer by Email by filtering grid and using delete action--> + <actionGroup name="RemoveCustomerFromAdminActionGroup"> + <arguments> + <argument name="customer"/> + </arguments> + <amOnPage url="{{AdminCustomerPage.url}}" stepKey="navigateToCustomers"/> + <waitForPageLoad stepKey="waitForPageLoad1" /> + <conditionalClick selector="{{AdminCustomerFiltersSection.clearFilters}}" dependentSelector="{{AdminCustomerFiltersSection.clearFilters}}" visible="true" stepKey="clickClearFiltersInitial"/> + <click selector="{{AdminCustomerFiltersSection.filtersButton}}" stepKey="openFilter"/> + <fillField userInput="{{customer.email}}" selector="{{AdminCustomerFiltersSection.emailInput}}" stepKey="filterEmail"/> + <click selector="{{AdminCustomerFiltersSection.apply}}" stepKey="applyFilter"/> + <waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear"/> + <see selector="{{AdminCustomerGridSection.customerGridCell('1', 'Email')}}" userInput="{{customer.email}}" stepKey="seeCustomerInGrid"/> + <click selector="{{AdminCustomerGridSection.multicheckDropdown}}" stepKey="openMulticheckDropdown"/> + <click selector="{{AdminCustomerGridSection.multicheckOption('Select All')}}" stepKey="selectAllProductInFilteredGrid"/> + <click selector="{{AdminCustomerGridSection.bulkActionDropdown}}" stepKey="clickActionDropdown"/> + <click selector="{{AdminCustomerGridSection.bulkActionOption('Delete')}}" stepKey="clickDeleteAction"/> + <waitForElementVisible selector="{{AdminConfirmationModalSection.title}}" stepKey="waitForConfirmModal"/> + <click selector="{{AdminConfirmationModalSection.ok}}" stepKey="confirmProductDelete"/> + <see selector="{{AdminCustomerMessagesSection.successMessage}}" userInput="A total of 1 record(s) were deleted." stepKey="seeSuccessMessage"/> + <conditionalClick selector="{{AdminCustomerFiltersSection.clearFilters}}" dependentSelector="{{AdminCustomerFiltersSection.clearFilters}}" visible="true" stepKey="clickClearFilters"/> + <waitForPageLoad stepKey="waitForPageLoad2"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/SignUpNewUserFromStorefrontActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/SignUpNewUserFromStorefrontActionGroup.xml new file mode 100644 index 0000000000000..a8ee604edee0a --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/SignUpNewUserFromStorefrontActionGroup.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + <actionGroup name="SignUpNewUserFromStorefrontActionGroup"> + <arguments> + <argument name="Customer"/> + </arguments> + <amOnPage url="{{StorefrontHomePage.url}}" stepKey="amOnStorefrontPage"/> + <waitForPageLoad stepKey="waitForStorefrontPage"/> + <click selector="{{StorefrontPanelHeaderSection.createAnAccountLink}}" stepKey="clickOnCreateAccountLink"/> + <fillField userInput="{{Customer.firstname}}" selector="{{StorefrontCustomerCreateFormSection.firstnameField}}" stepKey="fillFirstName"/> + <fillField userInput="{{Customer.lastname}}" selector="{{StorefrontCustomerCreateFormSection.lastnameField}}" stepKey="fillLastName"/> + <fillField userInput="{{Customer.email}}" selector="{{StorefrontCustomerCreateFormSection.emailField}}" stepKey="fillEmail"/> + <fillField userInput="{{Customer.password}}" selector="{{StorefrontCustomerCreateFormSection.passwordField}}" stepKey="fillPassword"/> + <fillField userInput="{{Customer.password}}" selector="{{StorefrontCustomerCreateFormSection.confirmPasswordField}}" stepKey="fillConfirmPassword"/> + <click selector="{{StorefrontCustomerCreateFormSection.createAccountButton}}" stepKey="clickCreateAccountButton"/> + <see userInput="Thank you for registering with Main Website Store." stepKey="seeThankYouMessage"/> + <see userInput="{{Customer.firstname}}" selector="{{StorefrontCustomerDashboardAccountInformationSection.ContactInformation}}" stepKey="seeFirstName"/> + <see userInput="{{Customer.lastname}}" selector="{{StorefrontCustomerDashboardAccountInformationSection.ContactInformation}}" stepKey="seeLastName"/> + <see userInput="{{Customer.email}}" selector="{{StorefrontCustomerDashboardAccountInformationSection.ContactInformation}}" stepKey="seeEmail"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerFiltersSection.xml b/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerFiltersSection.xml index 7d106a35f0e13..5414b449ca470 100644 --- a/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerFiltersSection.xml +++ b/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerFiltersSection.xml @@ -13,5 +13,6 @@ <element name="nameInput" type="input" selector="input[name=name]"/> <element name="emailInput" type="input" selector="input[name=email]"/> <element name="apply" type="button" selector="button[data-action=grid-filter-apply]" timeout="30"/> + <element name="clearFilters" type="button" selector=".admin__data-grid-header button[data-action='grid-filter-reset']" timeout="30"/> </section> </sections> diff --git a/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerGridSection.xml b/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerGridSection.xml index ba2c17051567b..73a53d334db5f 100644 --- a/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerGridSection.xml +++ b/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerGridSection.xml @@ -5,11 +5,15 @@ * See COPYING.txt for license details. */ --> - <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="AdminCustomerGridSection"> <element name="customerGrid" type="text" selector="table[data-role='grid']"/> <element name="firstRowEditLink" type="checkbox" selector="tr[data-repeat-index='0'] .action-menu-item" timeout="30"/> + <element name="customerGridCell" type="text" selector="//div[@data-role='grid-wrapper']//tr[{{row}}+1]//td[count(//div[@data-role='grid-wrapper']//tr//th//span[contains(., '{{column}}')]/../preceding-sibling::th) + 1]//div" parameterized="true"/> + <element name="multicheckDropdown" type="button" selector="div[data-role='grid-wrapper'] th.data-grid-multicheck-cell button.action-multicheck-toggle"/> + <element name="multicheckOption" type="button" selector="//div[@data-role='grid-wrapper']//th[contains(@class, data-grid-multicheck-cell)]//li//span[text() = '{{label}}']" parameterized="true"/> + <element name="bulkActionDropdown" type="button" selector="div.admin__data-grid-header-row.row div.action-select-wrap button.action-select"/> + <element name="bulkActionOption" type="button" selector="//div[contains(@class,'admin__data-grid-header-row') and contains(@class, 'row')]//div[contains(@class, 'action-select-wrap')]//ul/li/span[text() = '{{label}}']" parameterized="true"/> </section> </sections> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AddingProductWithExpiredSessionTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AddingProductWithExpiredSessionTest.xml new file mode 100644 index 0000000000000..7951c91aab61a --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/Test/AddingProductWithExpiredSessionTest.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + <test name="AddingProductWithExpiredSessionTest"> + <annotations> + <title value="Adding a product to cart from category page with an expired session"/> + <features value="Module/ Catalog"/> + <severity value="MAJOR"/> + <testCaseId value="MAGETWO-94337"/> + <stories value="MAGETWO-73443: Adding a product to cart from category page with an expired session does not allow product to be added"/> + <group value="customer"/> + </annotations> + + <before> + <createData entity="_defaultCategory" stepKey="createCategory"/> + <createData entity="_defaultProduct" stepKey="createSimpleProduct"> + <requiredEntity createDataKey="createCategory"/> + </createData> + </before> + + <after> + <!--Delete created product--> + <deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/> + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> + </after> + + <!--Navigate to a category page --> + <amOnPage url="{{StorefrontCategoryPage.url($$createCategory.name$$)}}" stepKey="goToCategoryPage"/> + <waitForPageLoad stepKey="waitForPageLoad"/> + <!-- Remove PHPSESSID and form_key to replicate an expired session--> + <resetCookie userInput="PHPSESSID" stepKey="resetCookieForCart"/> + <resetCookie userInput="form_key" stepKey="resetCookieForCart2"/> + <!-- "Add to Cart" created product--> + <moveMouseOver selector="{{StorefrontCategoryProductSection.ProductInfoByName($$createSimpleProduct.name$$)}}" stepKey="moveMouseOverProduct" /> + <click selector="{{StorefrontCategoryProductSection.productAddToCartByName($$createSimpleProduct.name$$)}}" stepKey="clickAddToCart" /> + <waitForPageLoad stepKey="waitForPageLoad1"/> + + <see stepKey="assertErrorMessage" userInput="Your session has expired"/> + </test> +</tests> diff --git a/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/DateTest.php b/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/DateTest.php index 6329970e0ca9c..553efea38a82b 100644 --- a/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/DateTest.php +++ b/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/DateTest.php @@ -12,6 +12,9 @@ class DateTest extends AbstractFormTestCase /** @var \Magento\Customer\Model\Metadata\Form\Date */ protected $date; + /** + * @inheritdoc + */ protected function setUp() { parent::setUp(); @@ -46,6 +49,9 @@ protected function setUp() ); } + /** + * Test extractValue + */ public function testExtractValue() { $requestMock = $this->getMockBuilder(\Magento\Framework\App\RequestInterface::class) @@ -174,7 +180,7 @@ public function compactAndRestoreValueDataProvider() return [ [1, 1], [false, false], - ['', null], + [null, null], ['test', 'test'], [['element1', 'element2'], ['element1', 'element2']] ]; @@ -191,6 +197,9 @@ public function testRestoreValue($value, $expected) $this->assertSame($expected, $this->date->restoreValue($value)); } + /** + * Test outputValue + */ public function testOutputValue() { $this->assertEquals(null, $this->date->outputValue()); diff --git a/app/code/Magento/Customer/composer.json b/app/code/Magento/Customer/composer.json index 65cb1e257f5b6..e3d8f22088ef6 100644 --- a/app/code/Magento/Customer/composer.json +++ b/app/code/Magento/Customer/composer.json @@ -29,7 +29,7 @@ "magento/module-customer-sample-data": "Sample Data version:100.2.*" }, "type": "magento2-module", - "version": "101.0.5", + "version": "101.0.6", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/CustomerAnalytics/composer.json b/app/code/Magento/CustomerAnalytics/composer.json index 3ce37a3c881ec..d9c428ffcf5b7 100644 --- a/app/code/Magento/CustomerAnalytics/composer.json +++ b/app/code/Magento/CustomerAnalytics/composer.json @@ -7,7 +7,7 @@ "magento/module-customer": "101.0.*" }, "type": "magento2-module", - "version": "100.2.1", + "version": "100.2.2", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/CustomerImportExport/composer.json b/app/code/Magento/CustomerImportExport/composer.json index 1bf1993ff8602..d71be31723043 100644 --- a/app/code/Magento/CustomerImportExport/composer.json +++ b/app/code/Magento/CustomerImportExport/composer.json @@ -12,7 +12,7 @@ "magento/framework": "101.0.*" }, "type": "magento2-module", - "version": "100.2.3", + "version": "100.2.4", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Deploy/composer.json b/app/code/Magento/Deploy/composer.json index 829dda9dea8e7..3c28dc345cba4 100644 --- a/app/code/Magento/Deploy/composer.json +++ b/app/code/Magento/Deploy/composer.json @@ -10,7 +10,7 @@ "magento/module-config": "101.0.*" }, "type": "magento2-module", - "version": "100.2.4", + "version": "100.2.5", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Developer/composer.json b/app/code/Magento/Developer/composer.json index 0a8853064968d..e2236e248cfc3 100644 --- a/app/code/Magento/Developer/composer.json +++ b/app/code/Magento/Developer/composer.json @@ -8,7 +8,7 @@ "magento/module-config": "101.0.*" }, "type": "magento2-module", - "version": "100.2.3", + "version": "100.2.4", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Dhl/Model/Carrier.php b/app/code/Magento/Dhl/Model/Carrier.php index 6262d71c4edcc..55df0748b1f06 100644 --- a/app/code/Magento/Dhl/Model/Carrier.php +++ b/app/code/Magento/Dhl/Model/Carrier.php @@ -1970,6 +1970,6 @@ protected function isDutiable($origCountryId, $destCountryId) return self::DHL_CONTENT_TYPE_NON_DOC == $this->getConfigData('content_type') - && !$this->_isDomestic; + || !$this->_isDomestic; } } diff --git a/app/code/Magento/Dhl/composer.json b/app/code/Magento/Dhl/composer.json index 47bdcff4d6be9..fae1eb9e1454f 100644 --- a/app/code/Magento/Dhl/composer.json +++ b/app/code/Magento/Dhl/composer.json @@ -19,7 +19,7 @@ "magento/module-checkout": "100.2.*" }, "type": "magento2-module", - "version": "100.2.2", + "version": "100.2.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Directory/Test/Mftf/Page/AdminConfigurationGeneralSectionPage.xml b/app/code/Magento/Directory/Test/Mftf/Page/AdminConfigurationGeneralSectionPage.xml new file mode 100644 index 0000000000000..732a27504a97d --- /dev/null +++ b/app/code/Magento/Directory/Test/Mftf/Page/AdminConfigurationGeneralSectionPage.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="AdminConfigurationGeneralSectionPage" url="admin/system_config/edit/section/general/{{group_anchor}}" parameterized="true" area="admin" module="Magento_Config"> + <section name="AdminConfigurationGeneralSectionStateOptionsGroupSection"/> + </page> +</pages> diff --git a/app/code/Magento/Directory/Test/Mftf/Section/AdminConfigurationGeneralSectionStateOptionsGroupSection.xml b/app/code/Magento/Directory/Test/Mftf/Section/AdminConfigurationGeneralSectionStateOptionsGroupSection.xml new file mode 100644 index 0000000000000..e48b2a0a80084 --- /dev/null +++ b/app/code/Magento/Directory/Test/Mftf/Section/AdminConfigurationGeneralSectionStateOptionsGroupSection.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminConfigurationGeneralSectionStateOptionsGroupSection"> + <element name="chooseStateOptionalSelect" type="select" selector="#general_region_display_all"/> + </section> +</sections> diff --git a/app/code/Magento/Directory/composer.json b/app/code/Magento/Directory/composer.json index c2749673cb062..c6de1d1eefe6c 100644 --- a/app/code/Magento/Directory/composer.json +++ b/app/code/Magento/Directory/composer.json @@ -10,7 +10,7 @@ "lib-libxml": "*" }, "type": "magento2-module", - "version": "100.2.4", + "version": "100.2.5", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Downloadable/composer.json b/app/code/Magento/Downloadable/composer.json index 9be657435161b..e737c3121f454 100644 --- a/app/code/Magento/Downloadable/composer.json +++ b/app/code/Magento/Downloadable/composer.json @@ -25,7 +25,7 @@ "magento/module-downloadable-sample-data": "Sample Data version:100.2.*" }, "type": "magento2-module", - "version": "100.2.4", + "version": "100.2.5", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/DownloadableImportExport/composer.json b/app/code/Magento/DownloadableImportExport/composer.json index a91c87f60c065..763eceaea8460 100644 --- a/app/code/Magento/DownloadableImportExport/composer.json +++ b/app/code/Magento/DownloadableImportExport/composer.json @@ -12,7 +12,7 @@ "magento/framework": "101.0.*" }, "type": "magento2-module", - "version": "100.2.1", + "version": "100.2.2", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Eav/Model/ResourceModel/Entity/Attribute/Collection.php b/app/code/Magento/Eav/Model/ResourceModel/Entity/Attribute/Collection.php index c1f693b92d2a1..563f973abda24 100644 --- a/app/code/Magento/Eav/Model/ResourceModel/Entity/Attribute/Collection.php +++ b/app/code/Magento/Eav/Model/ResourceModel/Entity/Attribute/Collection.php @@ -222,7 +222,7 @@ public function setInAllAttributeSetsFilter(array $setIds) $setIds ) ->group('entity_attribute.attribute_id') - ->having('count = ' . count($setIds)); + ->having(new \Zend_Db_Expr('COUNT(*)') . ' = ' . count($setIds)); } //$this->getSelect()->distinct(true); diff --git a/app/code/Magento/Eav/Test/Unit/Model/ResourceModel/Entity/Attribute/CollectionTest.php b/app/code/Magento/Eav/Test/Unit/Model/ResourceModel/Entity/Attribute/CollectionTest.php index 138e1363bb6dd..4a0fd5469767e 100644 --- a/app/code/Magento/Eav/Test/Unit/Model/ResourceModel/Entity/Attribute/CollectionTest.php +++ b/app/code/Magento/Eav/Test/Unit/Model/ResourceModel/Entity/Attribute/CollectionTest.php @@ -150,8 +150,8 @@ public function testSetInAllAttributeSetsFilter() $this->selectMock->expects($this->atLeastOnce())->method('group')->with('entity_attribute.attribute_id') ->willReturnSelf(); - $this->selectMock->expects($this->atLeastOnce())->method('having')->with('count = ' . count($setIds)) - ->willReturnSelf(); + $this->selectMock->expects($this->atLeastOnce())->method('having') + ->with(new \Zend_Db_Expr('COUNT(*)') . ' = ' . count($setIds))->willReturnSelf(); $this->model->setInAllAttributeSetsFilter($setIds); } diff --git a/app/code/Magento/Eav/composer.json b/app/code/Magento/Eav/composer.json index 516bd7c9493b0..2f0a7fa3c79a9 100644 --- a/app/code/Magento/Eav/composer.json +++ b/app/code/Magento/Eav/composer.json @@ -11,7 +11,7 @@ "magento/framework": "101.0.*" }, "type": "magento2-module", - "version": "101.0.4", + "version": "101.0.5", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Email/Controller/Adminhtml/Email/Template/Delete.php b/app/code/Magento/Email/Controller/Adminhtml/Email/Template/Delete.php index 9f248f2cebc3d..eedcf5009ccfa 100644 --- a/app/code/Magento/Email/Controller/Adminhtml/Email/Template/Delete.php +++ b/app/code/Magento/Email/Controller/Adminhtml/Email/Template/Delete.php @@ -22,21 +22,21 @@ public function execute() if (count($template->getSystemConfigPathsWhereCurrentlyUsed()) == 0) { $template->delete(); // display success message - $this->messageManager->addSuccess(__('You deleted the email template.')); + $this->messageManager->addSuccessMessage(__('You deleted the email template.')); $this->_objectManager->get(\Magento\Framework\App\ReinitableConfig::class)->reinit(); // go to grid $this->_redirect('adminhtml/*/'); return; } // display error message - $this->messageManager->addError(__('The email template is currently being used.')); + $this->messageManager->addErrorMessage(__('The email template is currently being used.')); // redirect to edit form $this->_redirect('adminhtml/*/edit', ['id' => $template->getId()]); return; } catch (\Magento\Framework\Exception\LocalizedException $e) { - $this->messageManager->addError($e->getMessage()); + $this->messageManager->addErrorMessage($e->getMessage()); } catch (\Exception $e) { - $this->messageManager->addError( + $this->messageManager->addErrorMessage( __('We can\'t delete email template data right now. Please review log and try again.') ); $this->_objectManager->get(\Psr\Log\LoggerInterface::class)->critical($e); @@ -52,7 +52,7 @@ public function execute() } } // display error message - $this->messageManager->addError(__('We can\'t find an email template to delete.')); + $this->messageManager->addErrorMessage(__('We can\'t find an email template to delete.')); // go to grid $this->_redirect('adminhtml/*/'); } diff --git a/app/code/Magento/Email/Controller/Adminhtml/Email/Template/Preview.php b/app/code/Magento/Email/Controller/Adminhtml/Email/Template/Preview.php index e23cd6cf17eb2..404f97c937167 100644 --- a/app/code/Magento/Email/Controller/Adminhtml/Email/Template/Preview.php +++ b/app/code/Magento/Email/Controller/Adminhtml/Email/Template/Preview.php @@ -21,7 +21,9 @@ public function execute() $this->_view->renderLayout(); $this->getResponse()->setHeader('Content-Security-Policy', "script-src 'none'"); } catch (\Exception $e) { - $this->messageManager->addError(__('An error occurred. The email template can not be opened for preview.')); + $this->messageManager->addErrorMessage( + __('An error occurred. The email template can not be opened for preview.') + ); $this->_redirect('adminhtml/*/'); } } diff --git a/app/code/Magento/Email/Controller/Adminhtml/Email/Template/Save.php b/app/code/Magento/Email/Controller/Adminhtml/Email/Template/Save.php index cf31259b7885d..135506f4068a8 100644 --- a/app/code/Magento/Email/Controller/Adminhtml/Email/Template/Save.php +++ b/app/code/Magento/Email/Controller/Adminhtml/Email/Template/Save.php @@ -22,7 +22,7 @@ public function execute() $template = $this->_initTemplate('id'); if (!$template->getId() && $id) { - $this->messageManager->addError(__('This email template no longer exists.')); + $this->messageManager->addErrorMessage(__('This email template no longer exists.')); $this->_redirect('adminhtml/*/'); return; } @@ -55,7 +55,7 @@ public function execute() $template->save(); $this->_objectManager->get(\Magento\Backend\Model\Session::class)->setFormData(false); - $this->messageManager->addSuccess(__('You saved the email template.')); + $this->messageManager->addSuccessMessage(__('You saved the email template.')); $this->_redirect('adminhtml/*'); } catch (\Exception $e) { $this->_objectManager->get( @@ -64,7 +64,7 @@ public function execute() 'email_template_form_data', $request->getParams() ); - $this->messageManager->addError($e->getMessage()); + $this->messageManager->addErrorMessage($e->getMessage()); $this->_forward('new'); } } diff --git a/app/code/Magento/Email/composer.json b/app/code/Magento/Email/composer.json index 6b96387a80728..bffc825a4c872 100644 --- a/app/code/Magento/Email/composer.json +++ b/app/code/Magento/Email/composer.json @@ -15,7 +15,7 @@ "magento/module-theme": "100.2.*" }, "type": "magento2-module", - "version": "100.2.3", + "version": "100.2.4", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/EncryptionKey/composer.json b/app/code/Magento/EncryptionKey/composer.json index 931fc8888af43..57298d2a9736b 100644 --- a/app/code/Magento/EncryptionKey/composer.json +++ b/app/code/Magento/EncryptionKey/composer.json @@ -8,7 +8,7 @@ "magento/framework": "101.0.*" }, "type": "magento2-module", - "version": "100.2.1", + "version": "100.2.2", "license": [ "proprietary" ], diff --git a/app/code/Magento/Fedex/composer.json b/app/code/Magento/Fedex/composer.json index a28a124552e10..55ff9fb83eb68 100644 --- a/app/code/Magento/Fedex/composer.json +++ b/app/code/Magento/Fedex/composer.json @@ -15,7 +15,7 @@ "lib-libxml": "*" }, "type": "magento2-module", - "version": "100.2.2", + "version": "100.2.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/GiftMessage/composer.json b/app/code/Magento/GiftMessage/composer.json index 49067e3f64a1b..6a098af78e28b 100644 --- a/app/code/Magento/GiftMessage/composer.json +++ b/app/code/Magento/GiftMessage/composer.json @@ -17,7 +17,7 @@ "magento/module-multishipping": "100.2.*" }, "type": "magento2-module", - "version": "100.2.1", + "version": "100.2.2", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/GoogleAdwords/composer.json b/app/code/Magento/GoogleAdwords/composer.json index 6a72acaae8747..da44eb6c785d2 100644 --- a/app/code/Magento/GoogleAdwords/composer.json +++ b/app/code/Magento/GoogleAdwords/composer.json @@ -8,7 +8,7 @@ "magento/framework": "101.0.*" }, "type": "magento2-module", - "version": "100.2.1", + "version": "100.2.2", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/GoogleAnalytics/composer.json b/app/code/Magento/GoogleAnalytics/composer.json index 221eea4b0e09d..a5ab4caff2927 100644 --- a/app/code/Magento/GoogleAnalytics/composer.json +++ b/app/code/Magento/GoogleAnalytics/composer.json @@ -12,7 +12,7 @@ "magento/module-config": "101.0.*" }, "type": "magento2-module", - "version": "100.2.3", + "version": "100.2.4", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/GoogleOptimizer/composer.json b/app/code/Magento/GoogleOptimizer/composer.json index 4ee4ab5f4f7e5..a84645b897298 100644 --- a/app/code/Magento/GoogleOptimizer/composer.json +++ b/app/code/Magento/GoogleOptimizer/composer.json @@ -12,7 +12,7 @@ "magento/module-ui": "101.0.*" }, "type": "magento2-module", - "version": "100.2.2", + "version": "100.2.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/GroupedImportExport/composer.json b/app/code/Magento/GroupedImportExport/composer.json index c8c9c0148b79f..09d5f8894b354 100644 --- a/app/code/Magento/GroupedImportExport/composer.json +++ b/app/code/Magento/GroupedImportExport/composer.json @@ -11,7 +11,7 @@ "magento/framework": "101.0.*" }, "type": "magento2-module", - "version": "100.2.1", + "version": "100.2.2", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/GroupedProduct/composer.json b/app/code/Magento/GroupedProduct/composer.json index 828f65544eb07..c2031fc3332f0 100644 --- a/app/code/Magento/GroupedProduct/composer.json +++ b/app/code/Magento/GroupedProduct/composer.json @@ -21,7 +21,7 @@ "magento/module-grouped-product-sample-data": "Sample Data version:100.2.*" }, "type": "magento2-module", - "version": "100.2.3", + "version": "100.2.4", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/ImportExport/composer.json b/app/code/Magento/ImportExport/composer.json index 2e89ba92a1e10..affe85aed48bd 100644 --- a/app/code/Magento/ImportExport/composer.json +++ b/app/code/Magento/ImportExport/composer.json @@ -12,7 +12,7 @@ "ext-ctype": "*" }, "type": "magento2-module", - "version": "100.2.5", + "version": "100.2.6", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Indexer/composer.json b/app/code/Magento/Indexer/composer.json index a884ca1ca5f0d..1667f8a05a5e8 100644 --- a/app/code/Magento/Indexer/composer.json +++ b/app/code/Magento/Indexer/composer.json @@ -7,7 +7,7 @@ "magento/framework": "101.0.*" }, "type": "magento2-module", - "version": "100.2.3", + "version": "100.2.4", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/InstantPurchase/composer.json b/app/code/Magento/InstantPurchase/composer.json index 6ec2364232169..cd7684254e408 100644 --- a/app/code/Magento/InstantPurchase/composer.json +++ b/app/code/Magento/InstantPurchase/composer.json @@ -2,7 +2,7 @@ "name": "magento/module-instant-purchase", "description": "N/A", "type": "magento2-module", - "version": "100.2.1", + "version": "100.2.2", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Integration/composer.json b/app/code/Magento/Integration/composer.json index 4bc2269af9822..75bd7a04d0dcc 100644 --- a/app/code/Magento/Integration/composer.json +++ b/app/code/Magento/Integration/composer.json @@ -12,7 +12,7 @@ "magento/module-authorization": "100.2.*" }, "type": "magento2-module", - "version": "100.2.3", + "version": "100.2.4", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/LayeredNavigation/composer.json b/app/code/Magento/LayeredNavigation/composer.json index 23d6c79c58443..b8dfc77532784 100644 --- a/app/code/Magento/LayeredNavigation/composer.json +++ b/app/code/Magento/LayeredNavigation/composer.json @@ -8,7 +8,7 @@ "magento/framework": "101.0.*" }, "type": "magento2-module", - "version": "100.2.2", + "version": "100.2.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Marketplace/composer.json b/app/code/Magento/Marketplace/composer.json index 951b51c474e24..5ce8666ec1bb2 100644 --- a/app/code/Magento/Marketplace/composer.json +++ b/app/code/Magento/Marketplace/composer.json @@ -7,7 +7,7 @@ "magento/module-backend": "100.2.*" }, "type": "magento2-module", - "version": "100.2.2", + "version": "100.2.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/MediaStorage/composer.json b/app/code/Magento/MediaStorage/composer.json index a06d12add7b9f..afb290a682274 100644 --- a/app/code/Magento/MediaStorage/composer.json +++ b/app/code/Magento/MediaStorage/composer.json @@ -9,7 +9,7 @@ "magento/framework": "101.0.*" }, "type": "magento2-module", - "version": "100.2.1", + "version": "100.2.2", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Msrp/composer.json b/app/code/Magento/Msrp/composer.json index 05aee8b3ffe53..97bc64e48ce01 100644 --- a/app/code/Magento/Msrp/composer.json +++ b/app/code/Magento/Msrp/composer.json @@ -16,7 +16,7 @@ "magento/module-msrp-sample-data": "Sample Data version:100.2.*" }, "type": "magento2-module", - "version": "100.2.1", + "version": "100.2.2", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Multishipping/composer.json b/app/code/Magento/Multishipping/composer.json index 9fd762d631657..111204915e4c8 100644 --- a/app/code/Magento/Multishipping/composer.json +++ b/app/code/Magento/Multishipping/composer.json @@ -15,7 +15,7 @@ "magento/module-theme": "100.2.*" }, "type": "magento2-module", - "version": "100.2.2", + "version": "100.2.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/NewRelicReporting/composer.json b/app/code/Magento/NewRelicReporting/composer.json index d8bed94a368fa..18a1a2df57336 100644 --- a/app/code/Magento/NewRelicReporting/composer.json +++ b/app/code/Magento/NewRelicReporting/composer.json @@ -13,7 +13,7 @@ "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "100.2.3", + "version": "100.2.4", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Newsletter/Test/Unit/Model/Queue/TransportBuilderTest.php b/app/code/Magento/Newsletter/Test/Unit/Model/Queue/TransportBuilderTest.php index 3452d9821ef5a..427c32e7c9e6c 100644 --- a/app/code/Magento/Newsletter/Test/Unit/Model/Queue/TransportBuilderTest.php +++ b/app/code/Magento/Newsletter/Test/Unit/Model/Queue/TransportBuilderTest.php @@ -8,6 +8,11 @@ use Magento\Framework\App\TemplateTypesInterface; use Magento\Framework\Mail\MessageInterface; +/** + * Tests \Magento\Newsletter\Model\Queue\TransportBuilder. + * + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class TransportBuilderTest extends \PHPUnit\Framework\TestCase { /** @@ -45,6 +50,11 @@ class TransportBuilderTest extends \PHPUnit\Framework\TestCase */ protected $mailTransportFactoryMock; + /** + * @var \Magento\Framework\Mail\MessageInterfaceFactory | \PHPUnit_Framework_MockObject_MockObject + */ + private $messageFactoryMock; + /** * @return void */ @@ -52,7 +62,10 @@ public function setUp() { $objectManagerHelper = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this); $this->templateFactoryMock = $this->createMock(\Magento\Framework\Mail\Template\FactoryInterface::class); - $this->messageMock = $this->createMock(\Magento\Framework\Mail\Message::class); + $this->messageMock = $this->getMockBuilder(\Magento\Framework\Mail\MessageInterface::class) + ->disableOriginalConstructor() + ->setMethods(['setMessageType', 'setSubject', 'setBody']) + ->getMockForAbstractClass(); $this->objectManagerMock = $this->createMock(\Magento\Framework\ObjectManagerInterface::class); $this->senderResolverMock = $this->createMock(\Magento\Framework\Mail\Template\SenderResolverInterface::class); $this->mailTransportFactoryMock = $this->getMockBuilder( @@ -60,6 +73,11 @@ public function setUp() )->disableOriginalConstructor() ->setMethods(['create']) ->getMock(); + $this->messageFactoryMock = $this->getMockBuilder(\Magento\Framework\Mail\MessageInterfaceFactory::class) + ->disableOriginalConstructor() + ->setMethods(['create']) + ->getMockForAbstractClass(); + $this->messageFactoryMock->expects($this->atLeastOnce())->method('create')->willReturn($this->messageMock); $this->builder = $objectManagerHelper->getObject( $this->builderClassName, [ @@ -67,7 +85,8 @@ public function setUp() 'message' => $this->messageMock, 'objectManager' => $this->objectManagerMock, 'senderResolver' => $this->senderResolverMock, - 'mailTransportFactory' => $this->mailTransportFactoryMock + 'mailTransportFactory' => $this->mailTransportFactoryMock, + 'messageFactory' => $this->messageFactoryMock, ] ); } @@ -95,95 +114,33 @@ public function testGetTransport( $vars = ['reason' => 'Reason', 'customer' => 'Customer']; $options = ['area' => 'frontend', 'store' => 1]; $template = $this->createMock(\Magento\Email\Model\Template::class); - $template->expects($this->once())->method('setVars')->with($this->equalTo($vars))->will($this->returnSelf()); - $template->expects( - $this->once() - )->method( - 'setOptions' - )->with( - $this->equalTo($options) - )->will( - $this->returnSelf() - ); - $template->expects($this->once())->method('getSubject')->will($this->returnValue('Email Subject')); - $template->expects($this->once())->method('setData')->with($this->equalTo($data))->will($this->returnSelf()); + $template->expects($this->once())->method('setVars')->with($vars)->willReturnSelf(); + $template->expects($this->once())->method('setOptions')->with($options)->willReturnSelf(); + $template->expects($this->once())->method('getSubject')->willReturn('Email Subject'); + $template->expects($this->once())->method('setData')->with($data)->willReturnSelf(); $template->expects($this->once()) ->method('getProcessedTemplate') ->with($vars) - ->will($this->returnValue($bodyText)); + ->willReturn($bodyText); $template->expects($this->once()) ->method('setTemplateFilter') ->with($filter); - $this->templateFactoryMock->expects( - $this->once() - )->method( - 'get' - )->with( - $this->equalTo('identifier') - )->will( - $this->returnValue($template) - ); + $this->templateFactoryMock->expects($this->once())->method('get')->with('identifier')->willReturn($template); - $this->messageMock->expects( - $this->once() - )->method( - 'setSubject' - )->with( - $this->equalTo('Email Subject') - )->will( - $this->returnSelf() - ); - $this->messageMock->expects( - $this->once() - )->method( - 'setMessageType' - )->with( - $this->equalTo($messageType) - )->will( - $this->returnSelf() - ); - $this->messageMock->expects( - $this->once() - )->method( - 'setBody' - )->with( - $this->equalTo($bodyText) - )->will( - $this->returnSelf() - ); + $this->messageMock->expects($this->once())->method('setSubject')->with('Email Subject')->willReturnSelf(); + $this->messageMock->expects($this->once())->method('setMessageType')->with($messageType)->willReturnSelf(); + $this->messageMock->expects($this->once())->method('setBody')->with($bodyText)->willReturnSelf(); $transport = $this->createMock(\Magento\Framework\Mail\TransportInterface::class); - $this->mailTransportFactoryMock->expects( - $this->at(0) - )->method( - 'create' - )->with( - $this->equalTo(['message' => $this->messageMock]) - )->will( - $this->returnValue($transport) - ); + $this->mailTransportFactoryMock->expects($this->at(0))->method('create') + ->with(['message' => $this->messageMock])->willReturn($transport); - $this->objectManagerMock->expects( - $this->at(0) - )->method( - 'create' - )->with( - $this->equalTo(\Magento\Framework\Mail\Message::class) - )->will( - $this->returnValue($transport) - ); - - $this->builder->setTemplateIdentifier( - 'identifier' - )->setTemplateVars( - $vars - )->setTemplateOptions( - $options - )->setTemplateData( - $data - ); + $this->builder->setTemplateIdentifier('identifier') + ->setTemplateVars($vars) + ->setTemplateOptions($options) + ->setTemplateData($data); $result = $this->builder->getTransport(); diff --git a/app/code/Magento/Newsletter/composer.json b/app/code/Magento/Newsletter/composer.json index 5b3a4ae3561f7..ef6158960aeee 100644 --- a/app/code/Magento/Newsletter/composer.json +++ b/app/code/Magento/Newsletter/composer.json @@ -14,7 +14,7 @@ "magento/framework": "101.0.*" }, "type": "magento2-module", - "version": "100.2.4", + "version": "100.2.5", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/OfflinePayments/composer.json b/app/code/Magento/OfflinePayments/composer.json index b84a064960d7e..b737149d30a94 100644 --- a/app/code/Magento/OfflinePayments/composer.json +++ b/app/code/Magento/OfflinePayments/composer.json @@ -11,7 +11,7 @@ "magento/module-config": "101.0.*" }, "type": "magento2-module", - "version": "100.2.1", + "version": "100.2.2", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/OfflineShipping/composer.json b/app/code/Magento/OfflineShipping/composer.json index f364424736fde..24b5f877c1279 100644 --- a/app/code/Magento/OfflineShipping/composer.json +++ b/app/code/Magento/OfflineShipping/composer.json @@ -19,7 +19,7 @@ "magento/module-offline-shipping-sample-data": "Sample Data version:100.2.*" }, "type": "magento2-module", - "version": "100.2.3", + "version": "100.2.4", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/PageCache/composer.json b/app/code/Magento/PageCache/composer.json index e2557a3e85cf9..d492f3bc23a5f 100644 --- a/app/code/Magento/PageCache/composer.json +++ b/app/code/Magento/PageCache/composer.json @@ -9,7 +9,7 @@ "magento/framework": "101.0.*" }, "type": "magento2-module", - "version": "100.2.2", + "version": "100.2.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Payment/composer.json b/app/code/Magento/Payment/composer.json index bb0bbdac328ae..678aaa01c2ae8 100644 --- a/app/code/Magento/Payment/composer.json +++ b/app/code/Magento/Payment/composer.json @@ -12,7 +12,7 @@ "magento/framework": "101.0.*" }, "type": "magento2-module", - "version": "100.2.3", + "version": "100.2.4", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Paypal/composer.json b/app/code/Magento/Paypal/composer.json index fb9b2f08f730c..281b7084e7f1b 100644 --- a/app/code/Magento/Paypal/composer.json +++ b/app/code/Magento/Paypal/composer.json @@ -26,7 +26,7 @@ "magento/module-checkout-agreements": "100.2.*" }, "type": "magento2-module", - "version": "100.2.3", + "version": "100.2.4", "license": [ "proprietary" ], diff --git a/app/code/Magento/Persistent/composer.json b/app/code/Magento/Persistent/composer.json index 7077d13b5e21d..9debadd193a9d 100644 --- a/app/code/Magento/Persistent/composer.json +++ b/app/code/Magento/Persistent/composer.json @@ -12,7 +12,7 @@ "magento/framework": "101.0.*" }, "type": "magento2-module", - "version": "100.2.1", + "version": "100.2.2", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/ProductAlert/composer.json b/app/code/Magento/ProductAlert/composer.json index fb74623ce4550..11dc94edcbcd3 100644 --- a/app/code/Magento/ProductAlert/composer.json +++ b/app/code/Magento/ProductAlert/composer.json @@ -13,7 +13,7 @@ "magento/module-config": "101.0.*" }, "type": "magento2-module", - "version": "100.2.2", + "version": "100.2.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/ProductVideo/composer.json b/app/code/Magento/ProductVideo/composer.json index 71a73c9d19a6a..811422d160d8d 100644 --- a/app/code/Magento/ProductVideo/composer.json +++ b/app/code/Magento/ProductVideo/composer.json @@ -16,7 +16,7 @@ "magento/module-config": "101.0.*" }, "type": "magento2-module", - "version": "100.2.3", + "version": "100.2.4", "license": [ "proprietary" ], diff --git a/app/code/Magento/Quote/Model/QuoteManagement.php b/app/code/Magento/Quote/Model/QuoteManagement.php index 9bdcb083808ad..e2ee8bbad01b9 100644 --- a/app/code/Magento/Quote/Model/QuoteManagement.php +++ b/app/code/Magento/Quote/Model/QuoteManagement.php @@ -565,6 +565,10 @@ protected function _prepareCustomerQuote($quote) //Make provided address as default shipping address $shippingAddress->setIsDefaultShipping(true); $hasDefaultShipping = true; + if (!$hasDefaultBilling && !$billing->getSaveInAddressBook()) { + $shippingAddress->setIsDefaultBilling(true); + $hasDefaultBilling = true; + } } //save here new customer address $shippingAddress->setCustomerId($quote->getCustomerId()); diff --git a/app/code/Magento/Quote/Model/QuoteValidator.php b/app/code/Magento/Quote/Model/QuoteValidator.php index ac3820c842967..1d5ff86b17429 100644 --- a/app/code/Magento/Quote/Model/QuoteValidator.php +++ b/app/code/Magento/Quote/Model/QuoteValidator.php @@ -12,7 +12,7 @@ use Magento\Framework\Message\Error; use Magento\Quote\Model\Quote as QuoteEntity; use Magento\Quote\Model\Quote\Validator\MinimumOrderAmount\ValidationMessage as OrderAmountValidationMessage; -use Magento\Store\Model\ScopeInterface; +use Magento\Quote\Model\ValidationRules\QuoteValidationRuleInterface; /** * @api @@ -35,20 +35,29 @@ class QuoteValidator */ private $minimumAmountMessage; + /** + * @var QuoteValidationRuleInterface + */ + private $quoteValidationRule; + /** * QuoteValidator constructor. * * @param AllowedCountries|null $allowedCountryReader * @param OrderAmountValidationMessage|null $minimumAmountMessage + * @param QuoteValidationRuleInterface|null $quoteValidationRule */ public function __construct( AllowedCountries $allowedCountryReader = null, - OrderAmountValidationMessage $minimumAmountMessage = null + OrderAmountValidationMessage $minimumAmountMessage = null, + QuoteValidationRuleInterface $quoteValidationRule = null ) { $this->allowedCountryReader = $allowedCountryReader ?: ObjectManager::getInstance() ->get(AllowedCountries::class); $this->minimumAmountMessage = $minimumAmountMessage ?: ObjectManager::getInstance() ->get(OrderAmountValidationMessage::class); + $this->quoteValidationRule = $quoteValidationRule ?: ObjectManager::getInstance() + ->get(QuoteValidationRuleInterface::class); } /** @@ -82,66 +91,24 @@ public function validateBeforeSubmit(QuoteEntity $quote) throw new LocalizedException(__($errors ?: 'Something went wrong. Please try to place the order again.')); } - if (!$quote->isVirtual()) { - $this->validateShippingAddress($quote); - } - - $billingAddress = $quote->getBillingAddress(); - $billingAddress->setStoreId($quote->getStoreId()); - if ($billingAddress->validate() !== true) { - throw new LocalizedException( - __( - 'Please check the billing address information. %1', - implode(' ', $quote->getBillingAddress()->validate()) - ) - ); - } - if (!$quote->getPayment()->getMethod()) { - throw new LocalizedException(__('Please select a valid payment method.')); - } - if (!$quote->validateMinimumAmount($quote->getIsMultiShipping())) { - throw new LocalizedException($this->minimumAmountMessage->getMessage()); + foreach ($this->quoteValidationRule->validate($quote) as $validationResult) { + if ($validationResult->isValid()) { + continue; + } + + $messages = $validationResult->getErrors(); + $defaultMessage = array_shift($messages); + if ($defaultMessage && !empty($messages)) { + $defaultMessage .= ' %1'; + } + if ($defaultMessage) { + throw new LocalizedException(__($defaultMessage, implode(' ', $messages))); + } } return $this; } - /** - * Validates shipping address. - * - * @param Quote $quote - * @throws LocalizedException - */ - private function validateShippingAddress(QuoteEntity $quote) - { - $address = $quote->getShippingAddress(); - $address->setStoreId($quote->getStoreId()); - if ($address->validate() !== true) { - throw new LocalizedException( - __( - 'Please check the shipping address information. %1', - implode(' ', $address->validate()) - ) - ); - } - - // Checks if country id present in the allowed countries list. - if (!in_array( - $address->getCountryId(), - $this->allowedCountryReader->getAllowedCountries(ScopeInterface::SCOPE_STORE, $quote->getStoreId()) - )) { - throw new LocalizedException( - __('Some addresses cannot be used due to country-specific configurations.') - ); - } - - $method = $address->getShippingMethod(); - $rate = $address->getShippingRateByCode($method); - if (!$method || !$rate) { - throw new LocalizedException(__('Please specify a shipping method.')); - } - } - /** * Parses quote error messages and concatenates them into single string. * diff --git a/app/code/Magento/Quote/Model/ValidationRules/AllowedCountryValidationRule.php b/app/code/Magento/Quote/Model/ValidationRules/AllowedCountryValidationRule.php new file mode 100644 index 0000000000000..840e94e3ece1f --- /dev/null +++ b/app/code/Magento/Quote/Model/ValidationRules/AllowedCountryValidationRule.php @@ -0,0 +1,69 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Quote\Model\ValidationRules; + +use Magento\Directory\Model\AllowedCountries; +use Magento\Framework\Validation\ValidationResultFactory; +use Magento\Quote\Model\Quote; + +/** + * @inheritdoc + */ +class AllowedCountryValidationRule implements QuoteValidationRuleInterface +{ + /** + * @var string + */ + private $generalMessage; + + /** + * @var AllowedCountries + */ + private $allowedCountryReader; + + /** + * @var ValidationResultFactory + */ + private $validationResultFactory; + + /** + * @param AllowedCountries $allowedCountryReader + * @param ValidationResultFactory $validationResultFactory + * @param string $generalMessage + */ + public function __construct( + AllowedCountries $allowedCountryReader, + ValidationResultFactory $validationResultFactory, + string $generalMessage = '' + ) { + $this->allowedCountryReader = $allowedCountryReader; + $this->validationResultFactory = $validationResultFactory; + $this->generalMessage = $generalMessage; + } + + /** + * @inheritdoc + */ + public function validate(Quote $quote): array + { + $validationErrors = []; + + if (!$quote->isVirtual()) { + $validationResult = + in_array( + $quote->getShippingAddress()->getCountryId(), + $this->allowedCountryReader->getAllowedCountries() + ); + if (!$validationResult) { + $validationErrors = [__($this->generalMessage)]; + } + } + + return [$this->validationResultFactory->create(['errors' => $validationErrors])]; + } +} diff --git a/app/code/Magento/Quote/Model/ValidationRules/BillingAddressValidationRule.php b/app/code/Magento/Quote/Model/ValidationRules/BillingAddressValidationRule.php new file mode 100644 index 0000000000000..fbacbf1c8d30c --- /dev/null +++ b/app/code/Magento/Quote/Model/ValidationRules/BillingAddressValidationRule.php @@ -0,0 +1,56 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Quote\Model\ValidationRules; + +use Magento\Framework\Validation\ValidationResultFactory; +use Magento\Quote\Model\Quote; + +/** + * @inheritdoc + */ +class BillingAddressValidationRule implements QuoteValidationRuleInterface +{ + /** + * @var string + */ + private $generalMessage; + + /** + * @var ValidationResultFactory + */ + private $validationResultFactory; + + /** + * @param ValidationResultFactory $validationResultFactory + * @param string $generalMessage + */ + public function __construct( + ValidationResultFactory $validationResultFactory, + string $generalMessage = '' + ) { + $this->validationResultFactory = $validationResultFactory; + $this->generalMessage = $generalMessage; + } + + /** + * @inheritdoc + */ + public function validate(Quote $quote): array + { + $validationErrors = []; + $validationResult = $quote->getBillingAddress()->validate(); + if ($validationResult !== true) { + $validationErrors = [__($this->generalMessage)]; + } + if (is_array($validationResult)) { + $validationErrors = array_merge($validationErrors, $validationResult); + } + + return [$this->validationResultFactory->create(['errors' => $validationErrors])]; + } +} diff --git a/app/code/Magento/Quote/Model/ValidationRules/MinimumAmountValidationRule.php b/app/code/Magento/Quote/Model/ValidationRules/MinimumAmountValidationRule.php new file mode 100644 index 0000000000000..34e953be43c74 --- /dev/null +++ b/app/code/Magento/Quote/Model/ValidationRules/MinimumAmountValidationRule.php @@ -0,0 +1,66 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Quote\Model\ValidationRules; + +use Magento\Framework\Validation\ValidationResultFactory; +use Magento\Quote\Model\Quote; +use Magento\Quote\Model\Quote\Validator\MinimumOrderAmount\ValidationMessage; + +/** + * @inheritdoc + */ +class MinimumAmountValidationRule implements QuoteValidationRuleInterface +{ + /** + * @var string + */ + private $generalMessage; + + /** + * @var ValidationMessage + */ + private $amountValidationMessage; + + /** + * @var ValidationResultFactory + */ + private $validationResultFactory; + + /** + * @param ValidationMessage $amountValidationMessage + * @param ValidationResultFactory $validationResultFactory + * @param string $generalMessage + */ + public function __construct( + ValidationMessage $amountValidationMessage, + ValidationResultFactory $validationResultFactory, + string $generalMessage = '' + ) { + $this->amountValidationMessage = $amountValidationMessage; + $this->validationResultFactory = $validationResultFactory; + $this->generalMessage = $generalMessage; + } + + /** + * @inheritdoc + * @throws \Zend_Currency_Exception + */ + public function validate(Quote $quote): array + { + $validationErrors = []; + $validationResult = $quote->validateMinimumAmount($quote->getIsMultiShipping()); + if (!$validationResult) { + if (!$this->generalMessage) { + $this->generalMessage = $this->amountValidationMessage->getMessage(); + } + $validationErrors = [__($this->generalMessage)]; + } + + return [$this->validationResultFactory->create(['errors' => $validationErrors])]; + } +} diff --git a/app/code/Magento/Quote/Model/ValidationRules/PaymentMethodValidationRule.php b/app/code/Magento/Quote/Model/ValidationRules/PaymentMethodValidationRule.php new file mode 100644 index 0000000000000..bf2b813541fb0 --- /dev/null +++ b/app/code/Magento/Quote/Model/ValidationRules/PaymentMethodValidationRule.php @@ -0,0 +1,53 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Quote\Model\ValidationRules; + +use Magento\Framework\Validation\ValidationResultFactory; +use Magento\Quote\Model\Quote; + +/** + * @inheritdoc + */ +class PaymentMethodValidationRule implements QuoteValidationRuleInterface +{ + /** + * @var string + */ + private $generalMessage; + + /** + * @var ValidationResultFactory + */ + private $validationResultFactory; + + /** + * @param ValidationResultFactory $validationResultFactory + * @param string $generalMessage + */ + public function __construct( + ValidationResultFactory $validationResultFactory, + string $generalMessage = '' + ) { + $this->validationResultFactory = $validationResultFactory; + $this->generalMessage = $generalMessage; + } + + /** + * @inheritdoc + */ + public function validate(Quote $quote): array + { + $validationErrors = []; + $validationResult = $quote->getPayment()->getMethod(); + if (!$validationResult) { + $validationErrors = [__($this->generalMessage)]; + } + + return [$this->validationResultFactory->create(['errors' => $validationErrors])]; + } +} diff --git a/app/code/Magento/Quote/Model/ValidationRules/QuoteValidationComposite.php b/app/code/Magento/Quote/Model/ValidationRules/QuoteValidationComposite.php new file mode 100644 index 0000000000000..6a75be3acce89 --- /dev/null +++ b/app/code/Magento/Quote/Model/ValidationRules/QuoteValidationComposite.php @@ -0,0 +1,59 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Quote\Model\ValidationRules; + +use Magento\Quote\Model\Quote; + +/** + * @inheritdoc + */ +class QuoteValidationComposite implements QuoteValidationRuleInterface +{ + /** + * @var QuoteValidationRuleInterface[] + */ + private $validationRules = []; + + /** + * @param QuoteValidationRuleInterface[] $validationRules + * @throws \InvalidArgumentException + */ + public function __construct(array $validationRules) + { + foreach ($validationRules as $validationRule) { + if (!($validationRule instanceof QuoteValidationRuleInterface)) { + throw new \InvalidArgumentException( + sprintf( + 'Instance of the ValidationRuleInterface is expected, got %s instead.', + get_class($validationRule) + ) + ); + } + } + $this->validationRules = $validationRules; + } + + /** + * @inheritdoc + */ + public function validate(Quote $quote): array + { + $aggregateResult = []; + + foreach ($this->validationRules as $validationRule) { + $ruleValidationResult = $validationRule->validate($quote); + foreach ($ruleValidationResult as $item) { + if (!$item->isValid()) { + array_push($aggregateResult, $item); + } + } + } + + return $aggregateResult; + } +} diff --git a/app/code/Magento/Quote/Model/ValidationRules/QuoteValidationRuleInterface.php b/app/code/Magento/Quote/Model/ValidationRules/QuoteValidationRuleInterface.php new file mode 100644 index 0000000000000..1a777e3f1a5fe --- /dev/null +++ b/app/code/Magento/Quote/Model/ValidationRules/QuoteValidationRuleInterface.php @@ -0,0 +1,25 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Quote\Model\ValidationRules; + +use Magento\Framework\Validation\ValidationResult; +use Magento\Quote\Model\Quote; + +/** + * Provides validation of Quote model. + */ +interface QuoteValidationRuleInterface +{ + /** + * Validate Quote model. + * + * @param Quote $quote + * @return ValidationResult[] + */ + public function validate(Quote $quote): array; +} diff --git a/app/code/Magento/Quote/Model/ValidationRules/ShippingAddressValidationRule.php b/app/code/Magento/Quote/Model/ValidationRules/ShippingAddressValidationRule.php new file mode 100644 index 0000000000000..f5eebe241acc9 --- /dev/null +++ b/app/code/Magento/Quote/Model/ValidationRules/ShippingAddressValidationRule.php @@ -0,0 +1,59 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Quote\Model\ValidationRules; + +use Magento\Framework\Validation\ValidationResultFactory; +use Magento\Quote\Model\Quote; + +/** + * @inheritdoc + */ +class ShippingAddressValidationRule implements QuoteValidationRuleInterface +{ + /** + * @var string + */ + private $generalMessage; + + /** + * @var ValidationResultFactory + */ + private $validationResultFactory; + + /** + * @param ValidationResultFactory $validationResultFactory + * @param string $generalMessage + */ + public function __construct( + ValidationResultFactory $validationResultFactory, + string $generalMessage = '' + ) { + $this->validationResultFactory = $validationResultFactory; + $this->generalMessage = $generalMessage; + } + + /** + * @inheritdoc + */ + public function validate(Quote $quote): array + { + $validationErrors = []; + + if (!$quote->isVirtual()) { + $validationResult = $quote->getShippingAddress()->validate(); + if ($validationResult !== true) { + $validationErrors = [__($this->generalMessage)]; + } + if (is_array($validationResult)) { + $validationErrors = array_merge($validationErrors, $validationResult); + } + } + + return [$this->validationResultFactory->create(['errors' => $validationErrors])]; + } +} diff --git a/app/code/Magento/Quote/Model/ValidationRules/ShippingMethodValidationRule.php b/app/code/Magento/Quote/Model/ValidationRules/ShippingMethodValidationRule.php new file mode 100644 index 0000000000000..6df7f663b0630 --- /dev/null +++ b/app/code/Magento/Quote/Model/ValidationRules/ShippingMethodValidationRule.php @@ -0,0 +1,58 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Quote\Model\ValidationRules; + +use Magento\Framework\Validation\ValidationResultFactory; +use Magento\Quote\Model\Quote; + +/** + * @inheritdoc + */ +class ShippingMethodValidationRule implements QuoteValidationRuleInterface +{ + /** + * @var string + */ + private $generalMessage; + + /** + * @var ValidationResultFactory + */ + private $validationResultFactory; + + /** + * @param ValidationResultFactory $validationResultFactory + * @param string $generalMessage + */ + public function __construct( + ValidationResultFactory $validationResultFactory, + string $generalMessage = '' + ) { + $this->validationResultFactory = $validationResultFactory; + $this->generalMessage = $generalMessage; + } + + /** + * @inheritdoc + */ + public function validate(Quote $quote): array + { + $validationErrors = []; + + if (!$quote->isVirtual()) { + $shippingMethod = $quote->getShippingAddress()->getShippingMethod(); + $shippingRate = $quote->getShippingAddress()->getShippingRateByCode($shippingMethod); + $validationResult = $shippingMethod && $shippingRate; + if (!$validationResult) { + $validationErrors = [__($this->generalMessage)]; + } + } + + return [$this->validationResultFactory->create(['errors' => $validationErrors])]; + } +} diff --git a/app/code/Magento/Quote/Test/Unit/Model/QuoteValidatorTest.php b/app/code/Magento/Quote/Test/Unit/Model/QuoteValidatorTest.php index ba70779351804..41a8d73d2de26 100644 --- a/app/code/Magento/Quote/Test/Unit/Model/QuoteValidatorTest.php +++ b/app/code/Magento/Quote/Test/Unit/Model/QuoteValidatorTest.php @@ -92,233 +92,4 @@ public function testCheckQuoteAmountExistingError() $this->quoteValidator->validateQuoteAmount($this->quote, QuoteValidator::MAXIMUM_AVAILABLE_NUMBER + 1) ); } - - public function testCheckQuoteAmountAmountLessThanAvailable() - { - $this->quote->method('getHasError') - ->willReturn(false); - - $this->quote->expects(self::never()) - ->method('setHasError'); - - $this->quote->expects(self::never()) - ->method('addMessage'); - - self::assertSame( - $this->quoteValidator, - $this->quoteValidator->validateQuoteAmount($this->quote, QuoteValidator::MAXIMUM_AVAILABLE_NUMBER - 1) - ); - } - - public function testCheckQuoteAmountAmountGreaterThanAvailable() - { - $this->quote ->method('getHasError') - ->willReturn(false); - - $this->quote->method('setHasError') - ->with(true); - - $this->quote->method('addMessage') - ->with(__('This item price or quantity is not valid for checkout.')); - - self::assertSame( - $this->quoteValidator, - $this->quoteValidator->validateQuoteAmount($this->quote, QuoteValidator::MAXIMUM_AVAILABLE_NUMBER + 1) - ); - } - - /** - * @expectedException \Magento\Framework\Exception\LocalizedException - * @expectedExceptionMessage Please check the shipping address information. - */ - public function testValidateBeforeSubmitThrowsExceptionIfShippingAddressIsInvalid() - { - $shippingAddress = $this->getMockBuilder(Address::class) - ->disableOriginalConstructor() - ->setMethods(['setStoreId', 'validate']) - ->getMock(); - $this->quote->method('getShippingAddress') - ->willReturn($shippingAddress); - $this->quote->method('isVirtual') - ->willReturn(false); - $shippingAddress->expects(self::atLeastOnce()) - ->method('setStoreId') - ->with(self::$storeId); - $shippingAddress->method('validate') - ->willReturn(['Invalid Shipping Address']); - - $this->quoteValidator->validateBeforeSubmit($this->quote); - } - - /** - * @expectedException \Magento\Framework\Exception\LocalizedException - * @expectedExceptionMessage Please specify a shipping method. - */ - public function testValidateBeforeSubmitThrowsExceptionIfShippingRateIsNotSelected() - { - $shippingMethod = 'checkmo'; - $shippingAddress = $this->getMockBuilder(Address::class) - ->disableOriginalConstructor() - ->setMethods(['setStoreId', 'validate', 'getCountryId', 'getShippingMethod', 'getShippingRateByCode']) - ->getMock(); - - $this->allowedCountryReader->method('getAllowedCountries') - ->willReturn(['US' => 'US']); - - $this->quote ->method('getShippingAddress') - ->willReturn($shippingAddress); - $this->quote->method('isVirtual') - ->willReturn(false); - $shippingAddress->expects(self::atLeastOnce()) - ->method('setStoreId') - ->with(self::$storeId); - $shippingAddress->method('validate') - ->willReturn(true); - $shippingAddress->method('getCountryId') - ->willReturn('US'); - $shippingAddress->method('getShippingMethod') - ->willReturn($shippingMethod); - $shippingAddress->method('getShippingRateByCode') - ->with($shippingMethod); - - $this->quoteValidator->validateBeforeSubmit($this->quote); - } - - /** - * @expectedException \Magento\Framework\Exception\LocalizedException - * @expectedExceptionMessage Please check the billing address information. - */ - public function testValidateBeforeSubmitThrowsExceptionIfBillingAddressIsNotValid() - { - $billingAddress = $this->getMockBuilder(Address::class) - ->disableOriginalConstructor() - ->setMethods(['setStoreId', 'validate']) - ->getMock(); - $this->quote->method('getBillingAddress') - ->willReturn($billingAddress); - $this->quote->method('isVirtual') - ->willReturn(true); - $billingAddress->expects(self::atLeastOnce()) - ->method('setStoreId') - ->with(self::$storeId); - $billingAddress->method('validate') - ->willReturn(['Invalid Billing Address']); - - $this->quoteValidator->validateBeforeSubmit($this->quote); - } - - /** - * @expectedException \Magento\Framework\Exception\LocalizedException - * @expectedExceptionMessage Please select a valid payment method. - */ - public function testValidateBeforeSubmitThrowsExceptionIfPaymentMethodIsNotSelected() - { - $payment = $this->createMock(Payment::class); - $billingAddress = $this->getMockBuilder(Address::class) - ->disableOriginalConstructor() - ->setMethods(['setStoreId', 'validate']) - ->getMock(); - $billingAddress->expects(self::atLeastOnce()) - ->method('setStoreId') - ->with(self::$storeId); - $billingAddress->method('validate') - ->willReturn(true); - - $this->quote->method('getBillingAddress') - ->willReturn($billingAddress); - $this->quote->method('getPayment') - ->willReturn($payment); - $this->quote->method('isVirtual') - ->willReturn(true); - - $this->quoteValidator->validateBeforeSubmit($this->quote); - } - - /** - * @expectedException \Magento\Framework\Exception\LocalizedException - * @expectedExceptionMessage Minimum Order Amount Exceeded. - */ - public function testValidateBeforeSubmitThrowsExceptionIfMinimumOrderAmount() - { - $payment = $this->createMock(Payment::class); - $payment->method('getMethod') - ->willReturn('checkmo'); - - $billingAddress = $this->getMockBuilder(Address::class) - ->disableOriginalConstructor() - ->setMethods(['validate', 'setStoreId']) - ->getMock(); - $billingAddress->expects(self::atLeastOnce()) - ->method('setStoreId') - ->with(self::$storeId); - $billingAddress->method('validate') - ->willReturn(true); - - $this->quote->method('getBillingAddress') - ->willReturn($billingAddress); - $this->quote->method('getPayment') - ->willReturn($payment); - $this->quote->method('isVirtual') - ->willReturn(true); - - $this->quote->method('getIsMultiShipping') - ->willReturn(false); - $this->quote->method('validateMinimumAmount') - ->willReturn(false); - - $this->orderAmountValidationMessage->method('getMessage') - ->willReturn(__("Minimum Order Amount Exceeded.")); - - $this->quoteValidator->validateBeforeSubmit($this->quote); - } - - /** - * Test case when country id not present in allowed countries list. - * - * @expectedException \Magento\Framework\Exception\LocalizedException - * @expectedExceptionMessage Some addresses cannot be used due to country-specific configurations. - */ - public function testValidateBeforeSubmitThrowsExceptionIfCountrySpecificConfigurations() - { - $this->allowedCountryReader->method('getAllowedCountries') - ->with('store', self::$storeId) - ->willReturn(['EE' => 'EE']); - - $address = $this->getMockBuilder(Address::class) - ->disableOriginalConstructor() - ->setMethods(['setStoreId', 'validate', 'getCountryId']) - ->getMock(); - $address->expects(self::atLeastOnce()) - ->method('setStoreId') - ->with(self::$storeId); - $address->method('validate') - ->willReturn(true); - $address->method('getCountryId') - ->willReturn('EU'); - - $payment = $this->getMockBuilder(Payment::class) - ->setMethods(['getMethod']) - ->disableOriginalConstructor() - ->getMock(); - $payment->method('getMethod') - ->willReturn(true); - - $billingAddress = $this->getMockBuilder(Address::class) - ->disableOriginalConstructor() - ->setMethods(['validate']) - ->getMock(); - $billingAddress->method('validate') - ->willReturn(true); - - $this->quote->method('getShippingAddress') - ->willReturn($address); - $this->quote->method('isVirtual') - ->willReturn(false); - $this->quote->method('getBillingAddress') - ->willReturn($billingAddress); - $this->quote->method('getPayment') - ->willReturn($payment); - - $this->quoteValidator->validateBeforeSubmit($this->quote); - } } diff --git a/app/code/Magento/Quote/composer.json b/app/code/Magento/Quote/composer.json index 9481442963d6b..0d67eaaf6ec74 100644 --- a/app/code/Magento/Quote/composer.json +++ b/app/code/Magento/Quote/composer.json @@ -23,7 +23,7 @@ "magento/module-webapi": "100.2.*" }, "type": "magento2-module", - "version": "101.0.4", + "version": "101.0.5", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Quote/etc/adminhtml/di.xml b/app/code/Magento/Quote/etc/adminhtml/di.xml new file mode 100644 index 0000000000000..fb6c118fb92e9 --- /dev/null +++ b/app/code/Magento/Quote/etc/adminhtml/di.xml @@ -0,0 +1,20 @@ +<?xml version="1.0"?> +<!-- +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> + <type name="Magento\Quote\Model\ValidationRules\QuoteValidationComposite"> + <arguments> + <argument name="validationRules" xsi:type="array"> + <item name="ShippingAddressValidationRule" xsi:type="object">Magento\Quote\Model\ValidationRules\ShippingAddressValidationRule</item> + <item name="AllowedCountryValidationRule" xsi:type="object">Magento\Quote\Model\ValidationRules\AllowedCountryValidationRule</item> + <item name="ShippingMethodValidationRule" xsi:type="object">Magento\Quote\Model\ValidationRules\ShippingMethodValidationRule</item> + <item name="BillingAddressValidationRule" xsi:type="object">Magento\Quote\Model\ValidationRules\BillingAddressValidationRule</item> + <item name="PaymentMethodValidationRule" xsi:type="object">Magento\Quote\Model\ValidationRules\PaymentMethodValidationRule</item> + </argument> + </arguments> + </type> +</config> diff --git a/app/code/Magento/Quote/etc/di.xml b/app/code/Magento/Quote/etc/di.xml index aa6fafb5dd051..ecc6426855679 100644 --- a/app/code/Magento/Quote/etc/di.xml +++ b/app/code/Magento/Quote/etc/di.xml @@ -41,6 +41,7 @@ <preference for="Magento\Quote\Api\GuestCartTotalManagementInterface" type="Magento\Quote\Model\GuestCart\GuestCartTotalManagement" /> <preference for="Magento\Quote\Api\Data\EstimateAddressInterface" type="Magento\Quote\Model\EstimateAddress" /> <preference for="Magento\Quote\Api\Data\ProductOptionInterface" type="Magento\Quote\Model\Quote\ProductOption" /> + <preference for="Magento\Quote\Model\ValidationRules\QuoteValidationRuleInterface" type="Magento\Quote\Model\ValidationRules\QuoteValidationComposite\Proxy"/> <type name="Magento\Webapi\Controller\Rest\ParamsOverrider"> <arguments> <argument name="paramOverriders" xsi:type="array"> @@ -95,4 +96,41 @@ <plugin name="clean_quote_items_after_product_delete" type="Magento\Quote\Model\Product\Plugin\RemoveQuoteItems"/> <plugin name="update_quote_items_after_product_save" type="Magento\Quote\Model\Product\Plugin\UpdateQuoteItems"/> </type> + <type name="Magento\Quote\Model\ValidationRules\QuoteValidationComposite"> + <arguments> + <argument name="validationRules" xsi:type="array"> + <item name="AllowedCountryValidationRule" xsi:type="object">Magento\Quote\Model\ValidationRules\AllowedCountryValidationRule</item> + <item name="ShippingAddressValidationRule" xsi:type="object">Magento\Quote\Model\ValidationRules\ShippingAddressValidationRule</item> + <item name="ShippingMethodValidationRule" xsi:type="object">Magento\Quote\Model\ValidationRules\ShippingMethodValidationRule</item> + <item name="BillingAddressValidationRule" xsi:type="object">Magento\Quote\Model\ValidationRules\BillingAddressValidationRule</item> + <item name="PaymentMethodValidationRule" xsi:type="object">Magento\Quote\Model\ValidationRules\PaymentMethodValidationRule</item> + <item name="MinimumAmountValidationRule" xsi:type="object">Magento\Quote\Model\ValidationRules\MinimumAmountValidationRule</item> + </argument> + </arguments> + </type> + <type name="Magento\Quote\Model\ValidationRules\AllowedCountryValidationRule"> + <arguments> + <argument name="generalMessage" xsi:type="string" translatable="true">Some addresses can't be used due to the configurations for specific countries.</argument> + </arguments> + </type> + <type name="Magento\Quote\Model\ValidationRules\ShippingAddressValidationRule"> + <arguments> + <argument name="generalMessage" xsi:type="string" translatable="true">Please check the shipping address information.</argument> + </arguments> + </type> + <type name="Magento\Quote\Model\ValidationRules\ShippingMethodValidationRule"> + <arguments> + <argument name="generalMessage" xsi:type="string" translatable="true">The shipping method is missing. Select the shipping method and try again.</argument> + </arguments> + </type> + <type name="Magento\Quote\Model\ValidationRules\BillingAddressValidationRule"> + <arguments> + <argument name="generalMessage" xsi:type="string" translatable="true">Please check the billing address information.</argument> + </arguments> + </type> + <type name="Magento\Quote\Model\ValidationRules\PaymentMethodValidationRule"> + <arguments> + <argument name="generalMessage" xsi:type="string" translatable="true">Enter a valid payment method and try again.</argument> + </arguments> + </type> </config> diff --git a/app/code/Magento/QuoteAnalytics/composer.json b/app/code/Magento/QuoteAnalytics/composer.json index 952b0b6a950ce..65978de6d0785 100644 --- a/app/code/Magento/QuoteAnalytics/composer.json +++ b/app/code/Magento/QuoteAnalytics/composer.json @@ -7,7 +7,7 @@ "magento/module-quote": "101.0.*" }, "type": "magento2-module", - "version": "100.2.1", + "version": "100.2.2", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/ReleaseNotification/composer.json b/app/code/Magento/ReleaseNotification/composer.json index 7b86ff3486965..45452997757cd 100644 --- a/app/code/Magento/ReleaseNotification/composer.json +++ b/app/code/Magento/ReleaseNotification/composer.json @@ -8,7 +8,7 @@ "magento/framework": "101.0.*" }, "type": "magento2-module", - "version": "100.2.2", + "version": "100.2.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Reports/Block/Adminhtml/Grid.php b/app/code/Magento/Reports/Block/Adminhtml/Grid.php index 2bb4dcd1efbf1..a895ef2d75906 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Grid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Grid.php @@ -127,8 +127,8 @@ protected function _prepareCollection() * Validate from and to date */ try { - $from = $this->_localeDate->scopeDate(null, $this->getFilter('report_from'), false); - $to = $this->_localeDate->scopeDate(null, $this->getFilter('report_to'), false); + $from = $this->_localeDate->date($this->getFilter('report_from'), null, false, false); + $to = $this->_localeDate->date($this->getFilter('report_to'), null, false, false); $collection->setInterval($from, $to); } catch (\Exception $e) { diff --git a/app/code/Magento/Reports/composer.json b/app/code/Magento/Reports/composer.json index d532ab9e8aad3..6b5a43f040109 100644 --- a/app/code/Magento/Reports/composer.json +++ b/app/code/Magento/Reports/composer.json @@ -22,7 +22,7 @@ "magento/framework": "101.0.*" }, "type": "magento2-module", - "version": "100.2.5", + "version": "100.2.6", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/RequireJs/composer.json b/app/code/Magento/RequireJs/composer.json index 84d088c4ccd92..4c6afcd77b4fa 100644 --- a/app/code/Magento/RequireJs/composer.json +++ b/app/code/Magento/RequireJs/composer.json @@ -6,7 +6,7 @@ "magento/framework": "101.0.*" }, "type": "magento2-module", - "version": "100.2.2", + "version": "100.2.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Review/composer.json b/app/code/Magento/Review/composer.json index 1b1efcbe4e66a..c6c8c920ed138 100644 --- a/app/code/Magento/Review/composer.json +++ b/app/code/Magento/Review/composer.json @@ -18,7 +18,7 @@ "magento/module-review-sample-data": "Sample Data version:100.2.*" }, "type": "magento2-module", - "version": "100.2.5", + "version": "100.2.6", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/ReviewAnalytics/composer.json b/app/code/Magento/ReviewAnalytics/composer.json index 85f401a5a8968..229b486e3f8d4 100644 --- a/app/code/Magento/ReviewAnalytics/composer.json +++ b/app/code/Magento/ReviewAnalytics/composer.json @@ -7,7 +7,7 @@ "magento/module-review": "100.2.*" }, "type": "magento2-module", - "version": "100.2.1", + "version": "100.2.2", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Robots/composer.json b/app/code/Magento/Robots/composer.json index 8230b11736796..ccf8356419581 100644 --- a/app/code/Magento/Robots/composer.json +++ b/app/code/Magento/Robots/composer.json @@ -10,7 +10,7 @@ "magento/module-theme": "100.2.*" }, "type": "magento2-module", - "version": "100.2.2", + "version": "100.2.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Rss/composer.json b/app/code/Magento/Rss/composer.json index 31b345d66ee81..d75274856e793 100644 --- a/app/code/Magento/Rss/composer.json +++ b/app/code/Magento/Rss/composer.json @@ -9,7 +9,7 @@ "magento/module-customer": "101.0.*" }, "type": "magento2-module", - "version": "100.2.1", + "version": "100.2.2", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Rule/composer.json b/app/code/Magento/Rule/composer.json index 1a12d67070021..2589db8fe86e6 100644 --- a/app/code/Magento/Rule/composer.json +++ b/app/code/Magento/Rule/composer.json @@ -11,7 +11,7 @@ "lib-libxml": "*" }, "type": "magento2-module", - "version": "100.2.2", + "version": "100.2.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminOrderActionGroup.xml b/app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminOrderActionGroup.xml index 838e7196f553d..02f2e108e1dc8 100644 --- a/app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminOrderActionGroup.xml +++ b/app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminOrderActionGroup.xml @@ -17,6 +17,20 @@ <see selector="{{AdminMessagesSection.success}}" userInput="You canceled the order." stepKey="seeCancelSuccessMessage"/> <see selector="{{AdminOrderDetailsInformationSection.orderStatus}}" userInput="Canceled" stepKey="seeOrderStatusCanceled"/> </actionGroup> + + <!--Navigate to create order page (New Order -> Create New Customer)--> + <actionGroup name="navigateToNewOrderPageNewCustomerSingleStore"> + <arguments> + <argument name="storeView" defaultValue="_defaultStore"/> + </arguments> + <amOnPage url="{{AdminOrdersPage.url}}" stepKey="navigateToOrderIndexPage"/> + <waitForPageLoad stepKey="waitForIndexPageLoad"/> + <see selector="{{AdminHeaderSection.pageTitle}}" userInput="Orders" stepKey="seeIndexPageTitle"/> + <click selector="{{OrdersGridSection.createNewOrder}}" stepKey="clickCreateNewOrder"/> + <click selector="{{AdminOrderFormActionSection.createNewCustomer}}" stepKey="clickCreateCustomer"/> + <see selector="{{AdminHeaderSection.pageTitle}}" userInput="Create New Order" stepKey="seeNewOrderPageTitle"/> + </actionGroup> + <!--Check the required fields are actually required--> <actionGroup name="checkRequiredFieldsNewOrderForm"> <seeElement selector="{{AdminOrderFormAccountSection.requiredGroup}}" stepKey="seeCustomerGroupRequired"/> @@ -91,4 +105,33 @@ <click selector="{{AdminOrderCustomersGridSection.customerRowByEmail(customer.email)}}" stepKey="chooseCustomer"/> <waitForPageLoad stepKey="waitForOrderPageLoad"/> </actionGroup> + + <!--Check that customer information is correct in order--> + <actionGroup name="verifyBasicOrderInformation"> + <arguments> + <argument name="customer"/> + <argument name="shippingAddress"/> + <argument name="billingAddress"/> + <argument name="customerGroup" defaultValue="GeneralCustomerGroup"/> + </arguments> + <see selector="{{AdminOrderDetailsInformationSection.customerName}}" userInput="{{customer.firstname}}" stepKey="seeCustomerName"/> + <see selector="{{AdminOrderDetailsInformationSection.customerEmail}}" userInput="{{customer.email}}" stepKey="seeCustomerEmail"/> + <see selector="{{AdminOrderDetailsInformationSection.customerGroup}}" userInput="{{customerGroup.code}}" stepKey="seeCustomerGroup"/> + <see selector="{{AdminOrderAddressInformationSection.billingAddress}}" userInput="{{billingAddress.street[0]}}" stepKey="seeBillingAddressStreet"/> + <see selector="{{AdminOrderAddressInformationSection.billingAddress}}" userInput="{{billingAddress.city}}" stepKey="seeBillingAddressCity"/> + <see selector="{{AdminOrderAddressInformationSection.billingAddress}}" userInput="{{billingAddress.country_id}}" stepKey="seeBillingAddressCountry"/> + <see selector="{{AdminOrderAddressInformationSection.billingAddress}}" userInput="{{billingAddress.postcode}}" stepKey="seeBillingAddressPostcode"/> + <see selector="{{AdminOrderAddressInformationSection.shippingAddress}}" userInput="{{shippingAddress.street[0]}}" stepKey="seeShippingAddressStreet"/> + <see selector="{{AdminOrderAddressInformationSection.shippingAddress}}" userInput="{{shippingAddress.city}}" stepKey="seeShippingAddressCity"/> + <see selector="{{AdminOrderAddressInformationSection.shippingAddress}}" userInput="{{shippingAddress.country_id}}" stepKey="seeShippingAddressCountry"/> + <see selector="{{AdminOrderAddressInformationSection.shippingAddress}}" userInput="{{shippingAddress.postcode}}" stepKey="seeShippingAddressPostcode"/> + </actionGroup> + + <!--Check for product in order items list--> + <actionGroup name="seeProductInItemsOrdered"> + <arguments> + <argument name="product"/> + </arguments> + <see selector="{{AdminOrderItemsOrderedSection.productSkuColumn}}" userInput="{{product.sku}}" stepKey="seeSkuInItemsOrdered"/> + </actionGroup> </actionGroups> diff --git a/app/code/Magento/Sales/Test/Mftf/Data/SalesConfigData.xml b/app/code/Magento/Sales/Test/Mftf/Data/SalesConfigData.xml new file mode 100644 index 0000000000000..035c3949820f6 --- /dev/null +++ b/app/code/Magento/Sales/Test/Mftf/Data/SalesConfigData.xml @@ -0,0 +1,27 @@ +<?xml version="1.0"?> +<!-- +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="EnabledMinimumOrderAmount500" type="sales_minimum_order"> + <requiredEntity type="active">EnableMinimumOrderCheck</requiredEntity> + <requiredEntity type="amount">MinimumOrderAmount500</requiredEntity> + </entity> + <entity name="EnableMinimumOrderCheck" type="active"> + <data key="value">1</data> + </entity> + <entity name="MinimumOrderAmount500" type="amount"> + <data key="value">500</data> + </entity> + + <entity name="DisabledMinimumOrderAmount" type="sales_minimum_order"> + <requiredEntity type="active">DisableMinimumOrderCheck</requiredEntity> + </entity> + <entity name="DisableMinimumOrderCheck" type="active"> + <data key="value">0</data> + </entity> +</entities> diff --git a/app/code/Magento/Sales/Test/Mftf/Metadata/sales_config-meta.xml b/app/code/Magento/Sales/Test/Mftf/Metadata/sales_config-meta.xml new file mode 100644 index 0000000000000..77c8c8fa1c959 --- /dev/null +++ b/app/code/Magento/Sales/Test/Mftf/Metadata/sales_config-meta.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd"> + <operation name="SetSalesMinimumOrder" dataType="sales_minimum_order" type="create" auth="adminFormKey" url="/admin/system_config/save/section/sales/" method="POST" successRegex="/messages-message-success/"> + <object key="groups" dataType="sales_minimum_order"> + <object key="minimum_order" dataType="sales_minimum_order"> + <object key="fields" dataType="sales_minimum_order"> + <object key="active" dataType="active"> + <field key="value">string</field> + </object> + <object key="amount" dataType="amount"> + <field key="value">string</field> + </object> + </object> + </object> + </object> + </operation> +</operations> diff --git a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderAddressInformationSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderAddressInformationSection.xml new file mode 100644 index 0000000000000..a9755bbbc1b61 --- /dev/null +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderAddressInformationSection.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminOrderAddressInformationSection"> + <element name="billingAddress" type="text" selector=".order-billing-address address"/> + <element name="shippingAddress" type="text" selector=".order-shipping-address address"/> + </section> +</sections> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithMinimumAmountEnabledTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithMinimumAmountEnabledTest.xml new file mode 100644 index 0000000000000..e339f8056e96d --- /dev/null +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithMinimumAmountEnabledTest.xml @@ -0,0 +1,79 @@ +<?xml version="1.0"?> +<!-- +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="AdminCreateOrderWithMinimumAmountEnabledTest"> + <annotations> + <features value="Sales"/> + <stories value="Admin create order"/> + <title value="Admin order is not restricted by 'Minimum Order Amount' configuration."/> + <description value="Admin should be able to create an order regardless of the minimum order amount."/> + <severity value="MAJOR"/> + <testCaseId value="MAGETWO-94483"/> + <group value="sales"/> + </annotations> + <before> + <createData entity="EnabledMinimumOrderAmount500" stepKey="enableMinimumOrderAmount"/> + <createData entity="SimpleSubCategory" stepKey="createCategory"/> + <createData entity="_defaultProduct" stepKey="createProduct"> + <requiredEntity createDataKey="createCategory"/> + </createData> + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> + <actionGroup ref="ClearCacheActionGroup" stepKey="clearCacheBefore"/> + </before> + <after> + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> + <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> + <createData entity="DisabledMinimumOrderAmount" stepKey="disableMinimumOrderAmount"/> + <actionGroup ref="ClearCacheActionGroup" stepKey="clearCacheAfter"/> + <actionGroup ref="logout" stepKey="logout"/> + </after> + + <!--Admin creates order--> + <comment userInput="Admin creates order" stepKey="adminCreateOrder"/> + <actionGroup ref="navigateToNewOrderPageNewCustomerSingleStore" stepKey="navigateToNewOrderPage"/> + + <actionGroup ref="addSimpleProductToOrder" stepKey="addSimpleProductToOrder"> + <argument name="product" value="_defaultProduct"/> + </actionGroup> + + <!--Fill customer group information--> + <selectOption selector="{{AdminOrderFormAccountSection.group}}" userInput="{{GeneralCustomerGroup.code}}" stepKey="selectGroup"/> + <fillField selector="{{AdminOrderFormAccountSection.email}}" userInput="{{Simple_US_Customer.email}}" stepKey="fillEmail"/> + + <!--Fill customer address information--> + <actionGroup ref="fillOrderCustomerInformation" stepKey="fillCustomerAddress"> + <argument name="customer" value="Simple_US_Customer"/> + <argument name="address" value="US_Address_TX"/> + </actionGroup> + + <actionGroup ref="orderSelectFlatRateShipping" stepKey="selectFlatRateShipping"/> + + <!--Verify totals on Order page--> + <see selector="{{AdminOrderFormTotalSection.total('Subtotal')}}" userInput="${{AdminOrderSimpleProduct.subtotal}}" stepKey="seeOrderSubTotal"/> + <see selector="{{AdminOrderFormTotalSection.total('Shipping')}}" userInput="${{AdminOrderSimpleProduct.shipping}}" stepKey="seeOrderShipping"/> + <see selector="{{AdminOrderFormTotalSection.grandTotal}}" userInput="${{AdminOrderSimpleProduct.grandTotal}}" stepKey="seeCorrectGrandTotal"/> + + <!--Submit Order and verify information--> + <click selector="{{AdminOrderFormActionSection.submitOrder}}" stepKey="clickSubmitOrder"/> + <seeInCurrentUrl url="{{AdminOrderDetailsPage.url}}" stepKey="seeViewOrderPage"/> + + <see selector="{{AdminMessagesSection.success}}" userInput="You created the order." stepKey="seeSuccessMessage"/> + <see selector="{{AdminOrderDetailsInformationSection.orderStatus}}" userInput="Pending" stepKey="seeOrderPendingStatus"/> + <grabTextFrom selector="|Order # (\d+)|" stepKey="orderId"/> + <assertNotEmpty actual="$orderId" stepKey="assertOrderIdIsNotEmpty"/> + <actionGroup ref="verifyBasicOrderInformation" stepKey="verifyOrderInformation"> + <argument name="customer" value="Simple_US_Customer"/> + <argument name="shippingAddress" value="US_Address_TX"/> + <argument name="billingAddress" value="US_Address_TX"/> + </actionGroup> + <actionGroup ref="seeProductInItemsOrdered" stepKey="seeSimpleProductInItemsOrdered"> + <argument name="product" value="_defaultProduct"/> + </actionGroup> + </test> +</tests> diff --git a/app/code/Magento/Sales/composer.json b/app/code/Magento/Sales/composer.json index f3fda78f89dc1..a0e40d283da68 100644 --- a/app/code/Magento/Sales/composer.json +++ b/app/code/Magento/Sales/composer.json @@ -33,7 +33,7 @@ "magento/module-sales-sample-data": "Sample Data version:100.2.*" }, "type": "magento2-module", - "version": "101.0.4", + "version": "101.0.5", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/SalesAnalytics/composer.json b/app/code/Magento/SalesAnalytics/composer.json index dec1ae1d09ffe..242e2d811a718 100644 --- a/app/code/Magento/SalesAnalytics/composer.json +++ b/app/code/Magento/SalesAnalytics/composer.json @@ -7,7 +7,7 @@ "magento/module-sales": "101.0.*" }, "type": "magento2-module", - "version": "100.2.1", + "version": "100.2.2", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/SalesInventory/composer.json b/app/code/Magento/SalesInventory/composer.json index cc47daf9eb638..4dc2c7b9445b5 100644 --- a/app/code/Magento/SalesInventory/composer.json +++ b/app/code/Magento/SalesInventory/composer.json @@ -10,7 +10,7 @@ "magento/framework": "101.0.*" }, "type": "magento2-module", - "version": "100.2.1", + "version": "100.2.2", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/SalesRule/Test/Mftf/ActionGroup/AdminCreateCartPriceRuleActionGroup.xml b/app/code/Magento/SalesRule/Test/Mftf/ActionGroup/AdminCreateCartPriceRuleActionGroup.xml new file mode 100644 index 0000000000000..26a71e4167ffa --- /dev/null +++ b/app/code/Magento/SalesRule/Test/Mftf/ActionGroup/AdminCreateCartPriceRuleActionGroup.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + <actionGroup name="AdminCreateCartPriceRuleActionGroup"> + <arguments> + <argument name="rule"/> + </arguments> + <amOnPage url="{{AdminCartPriceRulesPage.url}}" stepKey="amOnCartPriceList"/> + <waitForPageLoad stepKey="waitForPriceList"/> + <click selector="{{AdminCartPriceRulesSection.addNewRuleButton}}" stepKey="clickAddNewRule"/> + <fillField selector="{{AdminCartPriceRulesFormSection.ruleName}}" userInput="{{rule.name}}" stepKey="fillRuleName"/> + <selectOption selector="{{AdminCartPriceRulesFormSection.websites}}" userInput="{{rule.websites}}" stepKey="selectWebsites"/> + <selectOption selector="{{AdminCartPriceRulesFormSection.customerGroups}}" parameterArray="[{{rule.customerGroups}}]" stepKey="selectCustomerGroup"/> + <click selector="{{AdminCartPriceRulesFormSection.actionsHeader}}" stepKey="clickToExpandActions"/> + <selectOption selector="{{AdminCartPriceRulesFormSection.apply}}" userInput="{{rule.apply}}" stepKey="selectActionType"/> + <fillField selector="{{AdminCartPriceRulesFormSection.discountAmount}}" userInput="{{rule.discountAmount}}" stepKey="fillDiscountAmount"/> + <click selector="{{AdminCartPriceRulesFormSection.save}}" stepKey="clickSaveButton"/> + <see selector="{{AdminMessagesSection.success}}" userInput="You saved the rule." stepKey="seeSuccessMessage"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/SalesRule/Test/Mftf/Data/SalesRuleData.xml b/app/code/Magento/SalesRule/Test/Mftf/Data/SalesRuleData.xml index f4dc41225997e..d769e18c0cec3 100644 --- a/app/code/Magento/SalesRule/Test/Mftf/Data/SalesRuleData.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Data/SalesRuleData.xml @@ -38,4 +38,11 @@ <requiredEntity type="SalesRuleLabel">SalesRuleLabelDefault</requiredEntity> <requiredEntity type="SalesRuleLabel">SalesRuleLabelStore1</requiredEntity> </entity> + <entity name="TestSalesRule" type="SalesRule"> + <data key="name" unique="suffix">TestSalesRule</data> + <data key="websites">Main Website</data> + <data key="customerGroups">'NOT LOGGED IN', 'General', 'Wholesale', 'Retailer'</data> + <data key="apply">Percent of product price discount</data> + <data key="discountAmount">50</data> + </entity> </entities> diff --git a/app/code/Magento/SalesRule/composer.json b/app/code/Magento/SalesRule/composer.json index d5e1c908a1b52..3751aca28aef2 100644 --- a/app/code/Magento/SalesRule/composer.json +++ b/app/code/Magento/SalesRule/composer.json @@ -25,7 +25,7 @@ "magento/module-sales-rule-sample-data": "Sample Data version:100.2.*" }, "type": "magento2-module", - "version": "101.0.3", + "version": "101.0.4", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/SalesSequence/composer.json b/app/code/Magento/SalesSequence/composer.json index e0cb249340961..8c4993966d4bb 100644 --- a/app/code/Magento/SalesSequence/composer.json +++ b/app/code/Magento/SalesSequence/composer.json @@ -6,7 +6,7 @@ "magento/framework": "101.0.*" }, "type": "magento2-module", - "version": "100.2.1", + "version": "100.2.2", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/SampleData/composer.json b/app/code/Magento/SampleData/composer.json index ed0823367613f..7d9e64740f240 100644 --- a/app/code/Magento/SampleData/composer.json +++ b/app/code/Magento/SampleData/composer.json @@ -9,7 +9,7 @@ "magento/sample-data-media": "Sample Data version:100.2.*" }, "type": "magento2-module", - "version": "100.2.3", + "version": "100.2.4", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Search/Controller/Adminhtml/Synonyms/Delete.php b/app/code/Magento/Search/Controller/Adminhtml/Synonyms/Delete.php index bb476423692d1..9d8b612cefadf 100644 --- a/app/code/Magento/Search/Controller/Adminhtml/Synonyms/Delete.php +++ b/app/code/Magento/Search/Controller/Adminhtml/Synonyms/Delete.php @@ -60,16 +60,18 @@ public function execute() /** @var \Magento\Search\Model\SynonymGroup $synGroupModel */ $synGroupModel = $this->synGroupRepository->get($id); $this->synGroupRepository->delete($synGroupModel); - $this->messageManager->addSuccess(__('The synonym group has been deleted.')); + $this->messageManager->addSuccessMessage(__('The synonym group has been deleted.')); } catch (\Magento\Framework\Exception\LocalizedException $e) { - $this->messageManager->addError($e->getMessage()); + $this->messageManager->addErrorMessage($e->getMessage()); $this->logger->error($e); } catch (\Exception $e) { - $this->messageManager->addError(__('An error was encountered while performing delete operation.')); + $this->messageManager->addErrorMessage( + __('An error was encountered while performing delete operation.') + ); $this->logger->error($e); } } else { - $this->messageManager->addError(__('We can\'t find a synonym group to delete.')); + $this->messageManager->addErrorMessage(__('We can\'t find a synonym group to delete.')); } return $resultRedirect->setPath('*/*/'); diff --git a/app/code/Magento/Search/Controller/Adminhtml/Synonyms/Edit.php b/app/code/Magento/Search/Controller/Adminhtml/Synonyms/Edit.php index 506976247327f..3e6ac0abf2126 100644 --- a/app/code/Magento/Search/Controller/Adminhtml/Synonyms/Edit.php +++ b/app/code/Magento/Search/Controller/Adminhtml/Synonyms/Edit.php @@ -66,7 +66,7 @@ public function execute() // 2. Initial checking if ($groupId && (!$synGroup->getGroupId())) { - $this->messageManager->addError(__('This synonyms group no longer exists.')); + $this->messageManager->addErrorMessage(__('This synonyms group no longer exists.')); /** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */ $resultRedirect = $this->resultRedirectFactory->create(); return $resultRedirect->setPath('*/*/'); diff --git a/app/code/Magento/Search/Controller/Adminhtml/Synonyms/MassDelete.php b/app/code/Magento/Search/Controller/Adminhtml/Synonyms/MassDelete.php index 4add418d95325..f2770f77cc533 100644 --- a/app/code/Magento/Search/Controller/Adminhtml/Synonyms/MassDelete.php +++ b/app/code/Magento/Search/Controller/Adminhtml/Synonyms/MassDelete.php @@ -72,17 +72,17 @@ public function execute() $this->synGroupRepository->delete($synonymGroup); $deletedItems++; } catch (\Exception $e) { - $this->messageManager->addError($e->getMessage()); + $this->messageManager->addErrorMessage($e->getMessage()); } } if ($deletedItems != 0) { if ($collectionSize != $deletedItems) { - $this->messageManager->addError( + $this->messageManager->addErrorMessage( __('Failed to delete %1 synonym group(s).', $collectionSize - $deletedItems) ); } - $this->messageManager->addSuccess( + $this->messageManager->addSuccessMessage( __('A total of %1 synonym group(s) have been deleted.', $deletedItems) ); } diff --git a/app/code/Magento/Search/Controller/Adminhtml/Synonyms/Save.php b/app/code/Magento/Search/Controller/Adminhtml/Synonyms/Save.php index ffa97ceb3e0e1..0ed73fd0cee32 100644 --- a/app/code/Magento/Search/Controller/Adminhtml/Synonyms/Save.php +++ b/app/code/Magento/Search/Controller/Adminhtml/Synonyms/Save.php @@ -59,7 +59,7 @@ public function execute() $synGroup = $this->synGroupRepository->get($synGroupId); if (!$synGroup->getGroupId() && $synGroupId) { - $this->messageManager->addError(__('This synonym group no longer exists.')); + $this->messageManager->addErrorMessage(__('This synonym group no longer exists.')); return $resultRedirect->setPath('*/*/'); } diff --git a/app/code/Magento/Search/Controller/Adminhtml/Term/Delete.php b/app/code/Magento/Search/Controller/Adminhtml/Term/Delete.php index 3a1b80df2ea7e..c7adf32da0fb0 100644 --- a/app/code/Magento/Search/Controller/Adminhtml/Term/Delete.php +++ b/app/code/Magento/Search/Controller/Adminhtml/Term/Delete.php @@ -23,16 +23,16 @@ public function execute() $model = $this->_objectManager->create(\Magento\Search\Model\Query::class); $model->setId($id); $model->delete(); - $this->messageManager->addSuccess(__('You deleted the search.')); + $this->messageManager->addSuccessMessage(__('You deleted the search.')); $resultRedirect->setPath('search/*/'); return $resultRedirect; } catch (\Exception $e) { - $this->messageManager->addError($e->getMessage()); + $this->messageManager->addErrorMessage($e->getMessage()); $resultRedirect->setPath('search/*/edit', ['id' => $this->getRequest()->getParam('id')]); return $resultRedirect; } } - $this->messageManager->addError(__('We can\'t find a search term to delete.')); + $this->messageManager->addErrorMessage(__('We can\'t find a search term to delete.')); $resultRedirect->setPath('search/*/'); return $resultRedirect; } diff --git a/app/code/Magento/Search/Controller/Adminhtml/Term/Edit.php b/app/code/Magento/Search/Controller/Adminhtml/Term/Edit.php index 85e14ae9fe0b0..3ee0ea240377f 100644 --- a/app/code/Magento/Search/Controller/Adminhtml/Term/Edit.php +++ b/app/code/Magento/Search/Controller/Adminhtml/Term/Edit.php @@ -43,7 +43,7 @@ public function execute() if ($id) { $model->load($id); if (!$model->getId()) { - $this->messageManager->addError(__('This search no longer exists.')); + $this->messageManager->addErrorMessage(__('This search no longer exists.')); /** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */ $resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT); $resultRedirect->setPath('search/*'); diff --git a/app/code/Magento/Search/Controller/Adminhtml/Term/MassDelete.php b/app/code/Magento/Search/Controller/Adminhtml/Term/MassDelete.php index b38d883b8faae..f6874078f2f64 100644 --- a/app/code/Magento/Search/Controller/Adminhtml/Term/MassDelete.php +++ b/app/code/Magento/Search/Controller/Adminhtml/Term/MassDelete.php @@ -17,16 +17,16 @@ public function execute() { $searchIds = $this->getRequest()->getParam('search'); if (!is_array($searchIds)) { - $this->messageManager->addError(__('Please select searches.')); + $this->messageManager->addErrorMessage(__('Please select searches.')); } else { try { foreach ($searchIds as $searchId) { $model = $this->_objectManager->create(\Magento\Search\Model\Query::class)->load($searchId); $model->delete(); } - $this->messageManager->addSuccess(__('Total of %1 record(s) were deleted.', count($searchIds))); + $this->messageManager->addSuccessMessage(__('Total of %1 record(s) were deleted.', count($searchIds))); } catch (\Exception $e) { - $this->messageManager->addError($e->getMessage()); + $this->messageManager->addErrorMessage($e->getMessage()); } } /** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */ diff --git a/app/code/Magento/Search/Controller/Adminhtml/Term/Save.php b/app/code/Magento/Search/Controller/Adminhtml/Term/Save.php index 42e9373a20fe2..cd9b1347ed1ed 100644 --- a/app/code/Magento/Search/Controller/Adminhtml/Term/Save.php +++ b/app/code/Magento/Search/Controller/Adminhtml/Term/Save.php @@ -45,12 +45,15 @@ public function execute() $model->addData($data); $model->setIsProcessed(0); $model->save(); - $this->messageManager->addSuccess(__('You saved the search term.')); + $this->messageManager->addSuccessMessage(__('You saved the search term.')); } catch (LocalizedException $e) { - $this->messageManager->addError($e->getMessage()); + $this->messageManager->addErrorMessage($e->getMessage()); return $this->proceedToEdit($data); } catch (\Exception $e) { - $this->messageManager->addException($e, __('Something went wrong while saving the search query.')); + $this->messageManager->addExceptionMessage( + $e, + __('Something went wrong while saving the search query.') + ); return $this->proceedToEdit($data); } } diff --git a/app/code/Magento/Search/Test/Unit/Controller/Adminhtml/Synonyms/DeleteTest.php b/app/code/Magento/Search/Test/Unit/Controller/Adminhtml/Synonyms/DeleteTest.php index a7f71941dc6b2..38c78b986faf4 100644 --- a/app/code/Magento/Search/Test/Unit/Controller/Adminhtml/Synonyms/DeleteTest.php +++ b/app/code/Magento/Search/Test/Unit/Controller/Adminhtml/Synonyms/DeleteTest.php @@ -107,10 +107,10 @@ public function testDeleteAction() $this->repository->expects($this->once())->method('get')->with(10)->willReturn($this->synonymGroupMock); $this->messageManagerMock->expects($this->once()) - ->method('addSuccess') + ->method('addSuccessMessage') ->with(__('The synonym group has been deleted.')); - $this->messageManagerMock->expects($this->never())->method('addError'); + $this->messageManagerMock->expects($this->never())->method('addErrorMessage'); $this->resultRedirectMock->expects($this->once())->method('setPath')->with('*/*/')->willReturnSelf(); @@ -124,10 +124,10 @@ public function testDeleteActionNoId() ->willReturn(null); $this->messageManagerMock->expects($this->once()) - ->method('addError') + ->method('addErrorMessage') ->with(__('We can\'t find a synonym group to delete.')); $this->messageManagerMock->expects($this->never()) - ->method('addSuccess'); + ->method('addSuccessMessage'); $this->resultRedirectMock->expects($this->once()) ->method('setPath') diff --git a/app/code/Magento/Search/Test/Unit/Controller/Adminhtml/Term/MassDeleteTest.php b/app/code/Magento/Search/Test/Unit/Controller/Adminhtml/Term/MassDeleteTest.php index efda8f52fcfe9..60cc958a6187c 100644 --- a/app/code/Magento/Search/Test/Unit/Controller/Adminhtml/Term/MassDeleteTest.php +++ b/app/code/Magento/Search/Test/Unit/Controller/Adminhtml/Term/MassDeleteTest.php @@ -54,7 +54,7 @@ protected function setUp() ->getMockForAbstractClass(); $this->messageManager = $this->getMockBuilder(\Magento\Framework\Message\ManagerInterface::class) ->disableOriginalConstructor() - ->setMethods(['addSuccess', 'addError']) + ->setMethods(['addSuccessMessage', 'addErrorMessage']) ->getMockForAbstractClass(); $this->pageFactory = $this->getMockBuilder(\Magento\Framework\View\Result\PageFactory::class) ->setMethods([]) @@ -107,7 +107,7 @@ public function testExecute() $this->createQuery(0, 1); $this->createQuery(1, 2); $this->messageManager->expects($this->once()) - ->method('addSuccess') + ->method('addSuccessMessage') ->will($this->returnSelf()); $this->resultRedirectMock->expects($this->once()) ->method('setPath') diff --git a/app/code/Magento/Search/Test/Unit/Controller/Adminhtml/Term/SaveTest.php b/app/code/Magento/Search/Test/Unit/Controller/Adminhtml/Term/SaveTest.php index 09ae2c38fe525..28f4b65cd412f 100644 --- a/app/code/Magento/Search/Test/Unit/Controller/Adminhtml/Term/SaveTest.php +++ b/app/code/Magento/Search/Test/Unit/Controller/Adminhtml/Term/SaveTest.php @@ -75,7 +75,7 @@ protected function setUp() $this->messageManager = $this->getMockBuilder(\Magento\Framework\Message\ManagerInterface::class) ->disableOriginalConstructor() - ->setMethods(['addSuccess', 'addError', 'addException']) + ->setMethods(['addSuccessMessage', 'addErrorMessage', 'addExceptionMessage']) ->getMockForAbstractClass(); $this->context->expects($this->any()) ->method('getMessageManager') @@ -143,7 +143,7 @@ public function testExecuteLoadQueryQueryId() $this->query->expects($this->once())->method('getId')->willReturn(false); $this->query->expects($this->once())->method('load')->with($queryId); - $this->messageManager->expects($this->once())->method('addSuccess'); + $this->messageManager->expects($this->once())->method('addSuccessMessage'); $this->redirect->expects($this->once())->method('setPath')->willReturnSelf(); $this->assertSame($this->redirect, $this->controller->execute()); @@ -161,7 +161,7 @@ public function testExecuteLoadQueryQueryIdQueryText() $this->query->expects($this->once())->method('loadByQueryText')->with($queryText); $this->query->expects($this->any())->method('getId')->willReturn($queryId); - $this->messageManager->expects($this->once())->method('addSuccess'); + $this->messageManager->expects($this->once())->method('addSuccessMessage'); $this->redirect->expects($this->once())->method('setPath')->willReturnSelf(); $this->assertSame($this->redirect, $this->controller->execute()); @@ -180,7 +180,7 @@ public function testExecuteLoadQueryQueryIdQueryText2() $this->query->expects($this->any())->method('getId')->willReturn(false); $this->query->expects($this->once())->method('load')->with($queryId); - $this->messageManager->expects($this->once())->method('addSuccess'); + $this->messageManager->expects($this->once())->method('addSuccessMessage'); $this->redirect->expects($this->once())->method('setPath')->willReturnSelf(); $this->assertSame($this->redirect, $this->controller->execute()); @@ -199,7 +199,7 @@ public function testExecuteLoadQueryQueryIdQueryTextException() $this->query->expects($this->once())->method('loadByQueryText')->with($queryText); $this->query->expects($this->any())->method('getId')->willReturn($anotherQueryId); - $this->messageManager->expects($this->once())->method('addError'); + $this->messageManager->expects($this->once())->method('addErrorMessage'); $this->session->expects($this->once())->method('setPageData'); $this->redirect->expects($this->once())->method('setPath')->willReturnSelf(); $this->assertSame($this->redirect, $this->controller->execute()); @@ -216,7 +216,7 @@ public function testExecuteException() $this->query->expects($this->once())->method('setStoreId'); $this->query->expects($this->once())->method('loadByQueryText')->willThrowException(new \Exception()); - $this->messageManager->expects($this->once())->method('addException'); + $this->messageManager->expects($this->once())->method('addExceptionMessage'); $this->session->expects($this->once())->method('setPageData'); $this->redirect->expects($this->once())->method('setPath')->willReturnSelf(); $this->assertSame($this->redirect, $this->controller->execute()); diff --git a/app/code/Magento/Search/composer.json b/app/code/Magento/Search/composer.json index 5bafa7bc96bbe..2b474fdba93dc 100644 --- a/app/code/Magento/Search/composer.json +++ b/app/code/Magento/Search/composer.json @@ -11,7 +11,7 @@ "magento/module-ui": "101.0.*" }, "type": "magento2-module", - "version": "100.2.4", + "version": "100.2.5", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Security/Controller/Adminhtml/Session/LogoutAll.php b/app/code/Magento/Security/Controller/Adminhtml/Session/LogoutAll.php index c533e740b2251..35d8f22d84d51 100644 --- a/app/code/Magento/Security/Controller/Adminhtml/Session/LogoutAll.php +++ b/app/code/Magento/Security/Controller/Adminhtml/Session/LogoutAll.php @@ -38,11 +38,11 @@ public function execute() { try { $this->sessionsManager->logoutOtherUserSessions(); - $this->messageManager->addSuccess(__('All other open sessions for this account were terminated.')); + $this->messageManager->addSuccessMessage(__('All other open sessions for this account were terminated.')); } catch (\Magento\Framework\Exception\LocalizedException $e) { - $this->messageManager->addError($e->getMessage()); + $this->messageManager->addErrorMessage($e->getMessage()); } catch (\Exception $e) { - $this->messageManager->addException($e, __("We couldn't logout because of an error.")); + $this->messageManager->addExceptionMessage($e, __("We couldn't logout because of an error.")); } $this->_redirect('*/*/activity'); } diff --git a/app/code/Magento/Security/Model/Plugin/AuthSession.php b/app/code/Magento/Security/Model/Plugin/AuthSession.php index 64645396dceb6..08a81f12d9cfc 100644 --- a/app/code/Magento/Security/Model/Plugin/AuthSession.php +++ b/app/code/Magento/Security/Model/Plugin/AuthSession.php @@ -82,7 +82,7 @@ private function addUserLogoutNotification() $this->sessionsManager->getCurrentSession()->getStatus() ); } elseif ($message = $this->sessionsManager->getLogoutReasonMessage()) { - $this->messageManager->addError($message); + $this->messageManager->addErrorMessage($message); } return $this; diff --git a/app/code/Magento/Security/Model/Plugin/LoginController.php b/app/code/Magento/Security/Model/Plugin/LoginController.php index ab9c6e2857bce..ba1a18c4f0c06 100644 --- a/app/code/Magento/Security/Model/Plugin/LoginController.php +++ b/app/code/Magento/Security/Model/Plugin/LoginController.php @@ -53,7 +53,7 @@ public function beforeExecute(Login $login) { $logoutReasonCode = $this->securityCookie->getLogoutReasonCookie(); if ($this->isLoginForm($login) && $logoutReasonCode >= 0) { - $this->messageManager->addError( + $this->messageManager->addErrorMessage( $this->sessionsManager->getLogoutReasonMessageByStatus($logoutReasonCode) ); $this->securityCookie->deleteLogoutReasonCookie(); diff --git a/app/code/Magento/Security/Test/Unit/Controller/Adminhtml/Session/LogoutAllTest.php b/app/code/Magento/Security/Test/Unit/Controller/Adminhtml/Session/LogoutAllTest.php index 8c2119bde667e..02335ef55aa93 100644 --- a/app/code/Magento/Security/Test/Unit/Controller/Adminhtml/Session/LogoutAllTest.php +++ b/app/code/Magento/Security/Test/Unit/Controller/Adminhtml/Session/LogoutAllTest.php @@ -74,7 +74,7 @@ public function setUp() $this->messageManager = $this->getMockBuilder(\Magento\Framework\Message\ManagerInterface::class) ->disableOriginalConstructor() - ->setMethods(['addSuccess', 'addError', 'addException']) + ->setMethods(['addSuccessMessage', 'addErrorMessage', 'addExceptionMessage']) ->getMockForAbstractClass(); $this->contextMock->expects($this->any()) ->method('getMessageManager') @@ -132,12 +132,12 @@ public function testExecute() $this->sessionsManager->expects($this->once()) ->method('logoutOtherUserSessions'); $this->messageManager->expects($this->once()) - ->method('addSuccess') + ->method('addSuccessMessage') ->with($successMessage); $this->messageManager->expects($this->never()) - ->method('addError'); + ->method('addErrorMessage'); $this->messageManager->expects($this->never()) - ->method('addException'); + ->method('addExceptionMessage'); $this->responseMock->expects($this->once()) ->method('setRedirect'); $this->actionFlagMock->expects($this->once()) @@ -158,7 +158,7 @@ public function testExecuteLocalizedException() ->method('logoutOtherUserSessions') ->willThrowException(new LocalizedException($phrase)); $this->messageManager->expects($this->once()) - ->method('addError') + ->method('addErrorMessage') ->with($phrase); $this->controller->execute(); } @@ -173,7 +173,7 @@ public function testExecuteException() ->method('logoutOtherUserSessions') ->willThrowException(new \Exception()); $this->messageManager->expects($this->once()) - ->method('addException') + ->method('addExceptionMessage') ->with(new \Exception(), $phrase); $this->controller->execute(); } diff --git a/app/code/Magento/Security/Test/Unit/Model/Plugin/AuthSessionTest.php b/app/code/Magento/Security/Test/Unit/Model/Plugin/AuthSessionTest.php index 5cb06d6143023..0f7f590b71de4 100644 --- a/app/code/Magento/Security/Test/Unit/Model/Plugin/AuthSessionTest.php +++ b/app/code/Magento/Security/Test/Unit/Model/Plugin/AuthSessionTest.php @@ -112,7 +112,7 @@ public function testAroundProlongSessionIsNotActiveAndIsNotAjaxRequest() ->willReturn($errorMessage); $this->messageManagerMock->expects($this->once()) - ->method('addError') + ->method('addErrorMessage') ->with($errorMessage); $this->model->aroundProlong($this->authSessionMock, $proceed); diff --git a/app/code/Magento/Security/Test/Unit/Model/Plugin/LoginControllerTest.php b/app/code/Magento/Security/Test/Unit/Model/Plugin/LoginControllerTest.php index 2bb2bc3cafac7..aa066e23f67cb 100644 --- a/app/code/Magento/Security/Test/Unit/Model/Plugin/LoginControllerTest.php +++ b/app/code/Magento/Security/Test/Unit/Model/Plugin/LoginControllerTest.php @@ -103,7 +103,7 @@ public function testBeforeExecute() ->willReturn($errorMessage); $this->messageManagerMock->expects($this->once()) - ->method('addError') + ->method('addErrorMessage') ->with($errorMessage); $this->securityCookieMock->expects($this->once()) diff --git a/app/code/Magento/Security/composer.json b/app/code/Magento/Security/composer.json index 0ef75d3e2bb8f..5422b6d606551 100644 --- a/app/code/Magento/Security/composer.json +++ b/app/code/Magento/Security/composer.json @@ -11,7 +11,7 @@ "magento/module-customer": "101.0.*" }, "type": "magento2-module", - "version": "100.2.2", + "version": "100.2.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/SendFriend/composer.json b/app/code/Magento/SendFriend/composer.json index df9bdf023a0e9..324465885f82f 100644 --- a/app/code/Magento/SendFriend/composer.json +++ b/app/code/Magento/SendFriend/composer.json @@ -9,7 +9,7 @@ "magento/framework": "101.0.*" }, "type": "magento2-module", - "version": "100.2.1", + "version": "100.2.2", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Shipping/composer.json b/app/code/Magento/Shipping/composer.json index 2935df2e45542..b4e77dfdeb2d9 100644 --- a/app/code/Magento/Shipping/composer.json +++ b/app/code/Magento/Shipping/composer.json @@ -25,7 +25,7 @@ "magento/module-config": "101.0.*" }, "type": "magento2-module", - "version": "100.2.5", + "version": "100.2.6", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Signifyd/composer.json b/app/code/Magento/Signifyd/composer.json index cded060a54518..51e290957ec9a 100644 --- a/app/code/Magento/Signifyd/composer.json +++ b/app/code/Magento/Signifyd/composer.json @@ -17,7 +17,7 @@ "magento/module-config": "101.0.*" }, "type": "magento2-module", - "version": "100.2.2", + "version": "100.2.3", "license": [ "proprietary" ], diff --git a/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Delete.php b/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Delete.php index f0be0fe7ab682..a885aa30dae5e 100644 --- a/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Delete.php +++ b/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Delete.php @@ -61,20 +61,20 @@ public function execute() } $sitemap->delete(); // display success message - $this->messageManager->addSuccess(__('You deleted the sitemap.')); + $this->messageManager->addSuccessMessage(__('You deleted the sitemap.')); // go to grid $this->_redirect('adminhtml/*/'); return; } catch (\Exception $e) { // display error message - $this->messageManager->addError($e->getMessage()); + $this->messageManager->addErrorMessage($e->getMessage()); // go back to edit form $this->_redirect('adminhtml/*/edit', ['sitemap_id' => $id]); return; } } // display error message - $this->messageManager->addError(__('We can\'t find a sitemap to delete.')); + $this->messageManager->addErrorMessage(__('We can\'t find a sitemap to delete.')); // go to grid $this->_redirect('adminhtml/*/'); } diff --git a/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Edit.php b/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Edit.php index 04ab4f8725e0e..111353550b9cd 100644 --- a/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Edit.php +++ b/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Edit.php @@ -41,7 +41,7 @@ public function execute() if ($id) { $model->load($id); if (!$model->getId()) { - $this->messageManager->addError(__('This sitemap no longer exists.')); + $this->messageManager->addErrorMessage(__('This sitemap no longer exists.')); $this->_redirect('adminhtml/*/'); return; } diff --git a/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Generate.php b/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Generate.php index d19b248c8008f..9592ab6f57c55 100644 --- a/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Generate.php +++ b/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Generate.php @@ -52,18 +52,18 @@ public function execute() ); $sitemap->generateXml(); - $this->messageManager->addSuccess( + $this->messageManager->addSuccessMessage( __('The sitemap "%1" has been generated.', $sitemap->getSitemapFilename()) ); } catch (\Magento\Framework\Exception\LocalizedException $e) { - $this->messageManager->addError($e->getMessage()); + $this->messageManager->addErrorMessage($e->getMessage()); } catch (\Exception $e) { - $this->messageManager->addException($e, __('We can\'t generate the sitemap right now.')); + $this->messageManager->addExceptionMessage($e, __('We can\'t generate the sitemap right now.')); } finally { $this->appEmulation->stopEnvironmentEmulation(); } } else { - $this->messageManager->addError(__('We can\'t find a sitemap to generate.')); + $this->messageManager->addErrorMessage(__('We can\'t find a sitemap to generate.')); } // go to grid diff --git a/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Save.php b/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Save.php index 5c38cc68e6ef7..1e0d1cb248f00 100644 --- a/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Save.php +++ b/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Save.php @@ -30,7 +30,7 @@ protected function validatePath(array $data) $validator->setPaths($helper->getValidPaths()); if (!$validator->isValid($path)) { foreach ($validator->getMessages() as $message) { - $this->messageManager->addError($message); + $this->messageManager->addErrorMessage($message); } // save data in session $this->_objectManager->get(\Magento\Backend\Model\Session::class)->setFormData($data); @@ -83,13 +83,13 @@ protected function saveData($data) // save the data $model->save(); // display success message - $this->messageManager->addSuccess(__('You saved the sitemap.')); + $this->messageManager->addSuccessMessage(__('You saved the sitemap.')); // clear previously saved data from session $this->_objectManager->get(\Magento\Backend\Model\Session::class)->setFormData(false); return $model->getId(); } catch (\Exception $e) { // display error message - $this->messageManager->addError($e->getMessage()); + $this->messageManager->addErrorMessage($e->getMessage()); // save data in session $this->_objectManager->get(\Magento\Backend\Model\Session::class)->setFormData($data); } diff --git a/app/code/Magento/Sitemap/Test/Unit/Controller/Adminhtml/Sitemap/SaveTest.php b/app/code/Magento/Sitemap/Test/Unit/Controller/Adminhtml/Sitemap/SaveTest.php index 36e3aa0312627..f77954101df7c 100644 --- a/app/code/Magento/Sitemap/Test/Unit/Controller/Adminhtml/Sitemap/SaveTest.php +++ b/app/code/Magento/Sitemap/Test/Unit/Controller/Adminhtml/Sitemap/SaveTest.php @@ -154,7 +154,7 @@ public function testTryToSaveInvalidDataShouldFailWithErrors() ->willReturnMap([[$helperClass, $helper], [$sessionClass, $session]]); $this->messageManagerMock->expects($this->at(0)) - ->method('addError') + ->method('addErrorMessage') ->withConsecutive( [$messages[0]], [$messages[1]] diff --git a/app/code/Magento/Sitemap/composer.json b/app/code/Magento/Sitemap/composer.json index 08fa3badf78e2..cda61e63e35cf 100644 --- a/app/code/Magento/Sitemap/composer.json +++ b/app/code/Magento/Sitemap/composer.json @@ -18,7 +18,7 @@ "magento/module-config": "101.0.*" }, "type": "magento2-module", - "version": "100.2.4", + "version": "100.2.5", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Store/composer.json b/app/code/Magento/Store/composer.json index 875b4bb03d454..6f2d88d6f6fcb 100644 --- a/app/code/Magento/Store/composer.json +++ b/app/code/Magento/Store/composer.json @@ -14,7 +14,7 @@ "magento/module-deploy": "100.2.*" }, "type": "magento2-module", - "version": "100.2.4", + "version": "100.2.5", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Swagger/composer.json b/app/code/Magento/Swagger/composer.json index b30ea4cfe46b6..0cdf3dadb2b8a 100644 --- a/app/code/Magento/Swagger/composer.json +++ b/app/code/Magento/Swagger/composer.json @@ -6,7 +6,7 @@ "magento/framework": "101.0.*" }, "type": "magento2-module", - "version": "100.2.3", + "version": "100.2.4", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Swagger/view/frontend/web/swagger-ui/js/swagger-ui-bundle.min.js b/app/code/Magento/Swagger/view/frontend/web/swagger-ui/js/swagger-ui-bundle.min.js index 6d9e786f707e5..453934ea53626 100644 --- a/app/code/Magento/Swagger/view/frontend/web/swagger-ui/js/swagger-ui-bundle.min.js +++ b/app/code/Magento/Swagger/view/frontend/web/swagger-ui/js/swagger-ui-bundle.min.js @@ -96,4 +96,4 @@ if(String.fromCodePoint)e.exports=function(e){try{return String.fromCodePoint(e) * Licensed under the MIT License. */ var i,o="";e.exports=r},function(e,t,n){"use strict";e.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},function(e,t,n){"use strict";function r(e,t){e&&Object.keys(e).forEach(function(n){t(e[n],n)})}function i(e,t){return{}.hasOwnProperty.call(e,t)}function o(e,t){var n=[];return r(e,function(e){t(e)&&n.push(e)}),n}function a(e,t,n){function g(e,t){var n=this;this.tag=e,this.attribs=t||{},this.tagPosition=E.length,this.text="",this.updateParentNodeText=function(){if(P.length){P[P.length-1].text+=n.text}}}function y(e){return"string"!=typeof e&&(e+=""),e.replace(/\&/g,"&").replace(/</g,"<").replace(/\>/g,">").replace(/\"/g,""")}function _(e,n){n=n.replace(/[\x00-\x20]+/g,""),n=n.replace(/<\!\-\-.*?\-\-\>/g,"");var r=n.match(/^([a-zA-Z]+)\:/);if(!r)return!!n.match(/^[\/\\]{2}/)&&!t.allowProtocolRelative;var o=r[1].toLowerCase();return i(t.allowedSchemesByTag,e)?-1===t.allowedSchemesByTag[e].indexOf(o):!t.allowedSchemes||-1===t.allowedSchemes.indexOf(o)}function b(e,t){if(!t)return e;var n,r=c(e),i=e.nodes[0];return n=t[i.selector]&&t["*"]?p(c(t[i.selector]),t["*"],function(e,t){if(Array.isArray(e))return e.concat(t)}):t[i.selector]||t["*"],n&&(r.nodes[0].nodes=i.nodes.reduce(w(n),[])),r}function x(e){return e.nodes[0].nodes.reduce(function(e,t){return e.push(t.prop+":"+t.value+";"),e},[]).join("")}function w(e){return function(t,n){if(e.hasOwnProperty(n.prop)){e[n.prop].some(function(e){return e.test(n.value)})&&t.push(n)}return t}}function k(e,t){return t?(e=e.split(/\s+/),e.filter(function(e){return-1!==t.indexOf(e)}).join(" ")):e}var E="";t?(t=u(a.defaults,t),t.parser?t.parser=u(v,t.parser):t.parser=v):(t=a.defaults,t.parser=v);var S,C,A=t.nonTextTags||["script","style","textarea"];t.allowedAttributes&&(S={},C={},r(t.allowedAttributes,function(e,t){S[t]=[];var n=[];e.forEach(function(e){e.indexOf("*")>=0?n.push(l(e).replace(/\\\*/g,".*")):S[t].push(e)}),C[t]=new RegExp("^("+n.join("|")+")$")}));var D={};r(t.allowedClasses,function(e,t){S&&(i(S,t)||(S[t]=[]),S[t].push("class")),D[t]=e});var O,M={};r(t.transformTags,function(e,t){var n;"function"==typeof e?n=e:"string"==typeof e&&(n=a.simpleTransform(e)),"*"===t?O=n:M[t]=n});var T=0,P=[],I={},R={},j=!1,F=0,N=new s.Parser({onopentag:function(e,n){if(j)return void F++;var a=new g(e,n);P.push(a);var s,u=!1,l=!!a.text;i(M,e)&&(s=M[e](e,n),a.attribs=n=s.attribs,void 0!==s.text&&(a.innerText=s.text),e!==s.tagName&&(a.name=e=s.tagName,R[T]=s.tagName)),O&&(s=O(e,n),a.attribs=n=s.attribs,e!==s.tagName&&(a.name=e=s.tagName,R[T]=s.tagName)),t.allowedTags&&-1===t.allowedTags.indexOf(e)&&(u=!0,-1!==A.indexOf(e)&&(j=!0,F=1),I[T]=!0),T++,u||(E+="<"+e,(!S||i(S,e)||S["*"])&&r(n,function(n,s){if(!m.test(s))return void delete a.attribs[s];var u;if(!S||i(S,e)&&-1!==S[e].indexOf(s)||S["*"]&&-1!==S["*"].indexOf(s)||i(C,e)&&C[e].test(s)||C["*"]&&C["*"].test(s)){if(("href"===s||"src"===s)&&_(e,n))return void delete a.attribs[s];if("iframe"===e&&"src"===s){if("//"===n.substring(0,2)){n="https:".concat(n)}try{if(u=d.parse(n),t.allowedIframeHostnames){if(!t.allowedIframeHostnames.find(function(e){return e===u.hostname}))return void delete a.attribs[s]}}catch(e){return void delete a.attribs[s]}}if("srcset"===s)try{if(u=f.parse(n),r(u,function(e){_("srcset",e.url)&&(e.evil=!0)}),u=o(u,function(e){return!e.evil}),!u.length)return void delete a.attribs[s];n=f.stringify(o(u,function(e){return!e.evil})),a.attribs[s]=n}catch(e){return void delete a.attribs[s]}if("class"===s&&(n=k(n,D[e]),!n.length))return void delete a.attribs[s];if("style"===s)try{if(n=x(b(h.parse(e+" {"+n+"}"),t.allowedStyles)),0===n.length)return void delete a.attribs[s]}catch(e){return void delete a.attribs[s]}E+=" "+s,n.length&&(E+='="'+y(n)+'"')}else delete a.attribs[s]}),-1!==t.selfClosing.indexOf(e)?E+=" />":(E+=">",!a.innerText||l||t.textFilter||(E+=a.innerText)))},ontext:function(e){if(!j){var n,r=P[P.length-1];if(r&&(n=r.tag,e=void 0!==r.innerText?r.innerText:e),"script"===n||"style"===n)E+=e;else{var i=y(e);t.textFilter?E+=t.textFilter(i):E+=i}if(P.length){P[P.length-1].text+=e}}},onclosetag:function(e){if(j){if(--F)return;j=!1}var n=P.pop();if(n){if(j=!1,T--,I[T])return delete I[T],void n.updateParentNodeText();if(R[T]&&(e=R[T],delete R[T]),t.exclusiveFilter&&t.exclusiveFilter(n))return void(E=E.substr(0,n.tagPosition));n.updateParentNodeText(),-1===t.selfClosing.indexOf(e)&&(E+="</"+e+">")}}},t.parser);return N.write(e),N.end(),E}var s=n(116),u=n(1200),l=n(825),c=n(824),p=n(827),f=n(1181),h=n(982),d=n(497);e.exports=a;var m=/^[^\0\t\n\f\r \/<=>]+$/,v={decodeEntities:!0};a.defaults={allowedTags:["h3","h4","h5","h6","blockquote","p","a","ul","ol","nl","li","b","i","strong","em","strike","code","hr","br","div","table","thead","caption","tbody","tr","th","td","pre","iframe"],allowedAttributes:{a:["href","name","target"],img:["src"]},selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto"],allowedSchemesByTag:{},allowProtocolRelative:!0},a.simpleTransform=function(e,t,n){return n=void 0===n||n,t=t||{},function(r,i){var o;if(n)for(o in t)i[o]=t[o];else i=t;return{tagName:e,attribs:i}}}},function(e,t,n){(function(e,t){!function(e,n){"use strict";function r(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var r={callback:e,args:t};return l[u]=r,s(u),u++}function i(e){delete l[e]}function o(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(n,r)}}function a(e){if(c)setTimeout(a,0,e);else{var t=l[e];if(t){c=!0;try{o(t)}finally{i(e),c=!1}}}}if(!e.setImmediate){var s,u=1,l={},c=!1,p=e.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(e);f=f&&f.setTimeout?f:e,"[object process]"==={}.toString.call(e.process)?function(){s=function(e){t.nextTick(function(){a(e)})}}():function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?function(){var t="setImmediate$"+Math.random()+"$",n=function(n){n.source===e&&"string"==typeof n.data&&0===n.data.indexOf(t)&&a(+n.data.slice(t.length))};e.addEventListener?e.addEventListener("message",n,!1):e.attachEvent("onmessage",n),s=function(n){e.postMessage(t+n,"*")}}():e.MessageChannel?function(){var e=new MessageChannel;e.port1.onmessage=function(e){a(e.data)},s=function(t){e.port2.postMessage(t)}}():p&&"onreadystatechange"in p.createElement("script")?function(){var e=p.documentElement;s=function(t){var n=p.createElement("script");n.onreadystatechange=function(){a(t),n.onreadystatechange=null,e.removeChild(n),n=null},e.appendChild(n)}}():function(){s=function(e){setTimeout(a,0,e)}}(),f.setImmediate=r,f.clearImmediate=i}}("undefined"==typeof self?void 0===e?this:e:self)}).call(t,n(17),n(33))},function(e,t,n){"use strict";function r(e){return e.sort().filter(function(t,n){return JSON.stringify(t)!==JSON.stringify(e[n-1])})}var i=n(978),o=n(507),a=/^\d+$/;t.parse=function(e){return r(e.split(",").map(function(e){var t={};return e.trim().split(/\s+/).forEach(function(e,n){if(0===n)return t.url=e;var r=e.substring(0,e.length-1),o=e[e.length-1],s=parseInt(r,10),u=parseFloat(r);if("w"===o&&a.test(r))t.width=s;else if("h"===o&&a.test(r))t.height=s;else{if("x"!==o||i(u))throw new Error("Invalid srcset descriptor: "+e+".");t.density=u}}),t}))},t.stringify=function(e){return o(e.map(function(e){if(!e.url)throw new Error("URL is required.");var t=[e.url];return e.width&&t.push(e.width+"w"),e.height&&t.push(e.height+"h"),e.density&&t.push(e.density+"x"),t.join(" ")})).join(", ")}},function(e,t,n){e.exports=n(1183)},function(e,t,n){"use strict";(function(e,r){Object.defineProperty(t,"__esModule",{value:!0});var i,o=n(1184),a=function(e){return e&&e.__esModule?e:{default:e}}(o);i="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:r;var s=(0,a.default)(i);t.default=s}).call(t,n(17),n(72)(e))},function(e,t,n){"use strict";function r(e){var t,n=e.Symbol;return"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";e.exports=2147483647},function(e,t,n){"use strict";var r=n(65),i=n(1185);e.exports=function(e){if((e=r(e))>i)throw new TypeError(e+" exceeds maximum possible timeout");return e}},function(e,t,n){"use strict";(function(t){function r(e){e=e||t.location||{};var n,r={},i=typeof e;if("blob:"===e.protocol)r=new a(unescape(e.pathname),{});else if("string"===i){r=new a(e,{});for(n in d)delete r[n]}else if("object"===i){for(n in e)n in d||(r[n]=e[n]);void 0===r.slashes&&(r.slashes=f.test(e.href))}return r}function i(e){var t=p.exec(e);return{protocol:t[1]?t[1].toLowerCase():"",slashes:!!t[2],rest:t[3]}}function o(e,t){for(var n=(t||"/").split("/").slice(0,-1).concat(e.split("/")),r=n.length,i=n[r-1],o=!1,a=0;r--;)"."===n[r]?n.splice(r,1):".."===n[r]?(n.splice(r,1),a++):a&&(0===r&&(o=!0),n.splice(r,1),a--);return o&&n.unshift(""),"."!==i&&".."!==i||n.push(""),n.join("/")}function a(e,t,n){if(!(this instanceof a))return new a(e,t,n);var s,u,p,f,d,m,v=h.slice(),g=typeof t,y=this,_=0;for("object"!==g&&"string"!==g&&(n=t,t=null),n&&"function"!=typeof n&&(n=c.parse),t=r(t),u=i(e||""),s=!u.protocol&&!u.slashes,y.slashes=u.slashes||s&&t.slashes,y.protocol=u.protocol||t.protocol||"",e=u.rest,u.slashes||(v[2]=[/(.*)/,"pathname"]);_<v.length;_++)f=v[_],p=f[0],m=f[1],p!==p?y[m]=e:"string"==typeof p?~(d=e.indexOf(p))&&("number"==typeof f[2]?(y[m]=e.slice(0,d),e=e.slice(d+f[2])):(y[m]=e.slice(d),e=e.slice(0,d))):(d=p.exec(e))&&(y[m]=d[1],e=e.slice(0,d.index)),y[m]=y[m]||(s&&f[3]?t[m]||"":""),f[4]&&(y[m]=y[m].toLowerCase());n&&(y.query=n(y.query)),s&&t.slashes&&"/"!==y.pathname.charAt(0)&&(""!==y.pathname||""!==t.pathname)&&(y.pathname=o(y.pathname,t.pathname)),l(y.port,y.protocol)||(y.host=y.hostname,y.port=""),y.username=y.password="",y.auth&&(f=y.auth.split(":"),y.username=f[0]||"",y.password=f[1]||""),y.origin=y.protocol&&y.host&&"file:"!==y.protocol?y.protocol+"//"+y.host:"null",y.href=y.toString()}function s(e,t,n){var r=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(n||c.parse)(t)),r[e]=t;break;case"port":r[e]=t,l(t,r.protocol)?t&&(r.host=r.hostname+":"+t):(r.host=r.hostname,r[e]="");break;case"hostname":r[e]=t,r.port&&(t+=":"+r.port),r.host=t;break;case"host":r[e]=t,/:\d+$/.test(t)?(t=t.split(":"),r.port=t.pop(),r.hostname=t.join(":")):(r.hostname=t,r.port="");break;case"protocol":r.protocol=t.toLowerCase(),r.slashes=!n;break;case"pathname":case"hash":if(t){var i="pathname"===e?"/":"#";r[e]=t.charAt(0)!==i?i+t:t}else r[e]=t;break;default:r[e]=t}for(var o=0;o<h.length;o++){var a=h[o];a[4]&&(r[a[1]]=r[a[1]].toLowerCase())}return r.origin=r.protocol&&r.host&&"file:"!==r.protocol?r.protocol+"//"+r.host:"null",r.href=r.toString(),r}function u(e){e&&"function"==typeof e||(e=c.stringify);var t,n=this,r=n.protocol;r&&":"!==r.charAt(r.length-1)&&(r+=":");var i=r+(n.slashes?"//":"");return n.username&&(i+=n.username,n.password&&(i+=":"+n.password),i+="@"),i+=n.host+n.pathname,t="object"==typeof n.query?e(n.query):n.query,t&&(i+="?"!==t.charAt(0)?"?"+t:t),n.hash&&(i+=n.hash),i}var l=n(1178),c=n(1005),p=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\S\s]*)/i,f=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,h=[["#","hash"],["?","query"],["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d+)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],d={hash:1,query:1};a.prototype={set:s,toString:u},a.extractProtocol=i,a.location=r,a.qs=c,e.exports=a}).call(t,n(17))},function(e,t,n){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t){e.exports=function(e){for(var t=[],n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r>=55296&&r<=56319&&n+1<e.length){var i=e.charCodeAt(n+1);if(i>=56320&&i<=57343){var o=1024*(r-55296)+i-56320+65536;t.push(240+Math.floor(o/64/64/64),128+Math.floor(o/64/64)%64,128+Math.floor(o/64)%64,128+o%64),n+=1;continue}}r>=2048?t.push(224+Math.floor(r/64/64),128+Math.floor(r/64)%64,128+r%64):r>=128?t.push(192+Math.floor(r/64),128+r%64):t.push(r)}return t}},function(e,t){!function(){function e(e,t){function n(e,t){return r(e,new RegExp(a.source,"g"),t)}function r(e,t,n){if(!i(e))return n;var r=0,o=0;do{var a=t.exec(e);if(null===a)break;if(!(o<n))break;r+=a[0].length,o++}while(null!==a);return r>=e.length?-1:r}function i(e){return s.test(e)}function o(e,n){void 0==e&&(e=["[^]"]),void 0==n&&(n="g");var r=[];return t.forEach(function(e){r.push(e.source)}),r.push(a.source),r=r.concat(e),new RegExp(r.join("|"),n)}e.findCharIndex=function(e,t){if(t>=e.length)return-1;if(!i(e))return t;for(var n=o(),r=0;null!==n.exec(e)&&!(n.lastIndex>t);)r++;return r},e.findByteIndex=function(e,t){return t>=this.length(e)?-1:r(e,o(),t)},e.charAt=function(e,t){var n=this.findByteIndex(e,t);if(n<0||n>=e.length)return"";var r=e.slice(n,n+8),i=s.exec(r);return null===i?r[0]:i[0]},e.charCodeAt=function(e,t){var r=n(e,t);if(r<0)return NaN;var i=e.charCodeAt(r);if(55296<=i&&i<=56319){return 1024*(i-55296)+(e.charCodeAt(r+1)-56320)+65536}return i},e.fromCharCode=function(e){return e>65535?(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e))):String.fromCharCode(e)},e.indexOf=function(e,t,n){void 0!==n&&null!==n||(n=0);var r=this.findByteIndex(e,n),i=e.indexOf(t,r);return i<0?-1:this.findCharIndex(e,i)},e.lastIndexOf=function(e,t,n){var r;if(void 0===n||null===n)r=e.lastIndexOf(t);else{var i=this.findByteIndex(e,n);r=e.lastIndexOf(t,i)}return r<0?-1:this.findCharIndex(e,r)},e.slice=function(e,t,n){var r,i=this.findByteIndex(e,t);return i<0&&(i=e.length),void 0===n||null===n?r=e.length:(r=this.findByteIndex(e,n))<0&&(r=e.length),e.slice(i,r)},e.substr=function(e,t,n){return t<0&&(t=this.length(e)+t),void 0===n||null===n?this.slice(e,t):this.slice(e,t,t+n)},e.substring=e.slice,e.length=function(e){return this.findCharIndex(e,e.length-1)+1},e.stringToCodePoints=function(e){for(var t=[],n=0;n<e.length&&(codePoint=this.charCodeAt(e,n),codePoint);n++)t.push(codePoint);return t},e.codePointsToString=function(e){for(var t=[],n=0;n<e.length;n++)t.push(this.fromCharCode(e[n]));return t.join("")},e.stringToBytes=function(e){for(var t=[],n=0;n<e.length;n++){for(var r=e.charCodeAt(n),i=[];r>0;)i.push(255&r),r>>=8;1==i.length&&i.push(0),t=t.concat(i.reverse())}return t},e.bytesToString=function(e){for(var t=[],n=0;n<e.length;n+=2){var r=e[n],i=e[n+1],o=r<<8|i;t.push(String.fromCharCode(o))}return t.join("")},e.stringToCharArray=function(e){var t=[],n=o();do{var r=n.exec(e);if(null===r)break;t.push(r[0])}while(null!==r);return t};var a=/[\uD800-\uDBFF][\uDC00-\uDFFF]/,s=o([],"")}var n;void 0!==t&&null!==t?n=t:"undefined"!=typeof window&&null!==window&&(void 0!==window.UtfString&&null!==window.UtfString||(window.UtfString={}),n=window.UtfString);var r=/\uD83C[\uDDE6-\uDDFF]\uD83C[\uDDE6-\uDDFF]/;n.visual={},e(n,[]),e(n.visual,[r])}()},function(e,t,n){(function(t){function n(e,t){function n(){if(!i){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),i=!0}return e.apply(this,arguments)}if(r("noDeprecation"))return e;var i=!1;return n}function r(e){try{if(!t.localStorage)return!1}catch(e){return!1}var n=t.localStorage[e];return null!=n&&"true"===String(n).toLowerCase()}e.exports=n}).call(t,n(17))},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t,n){(function(e,r){function i(e,n){var r={seen:[],stylize:a};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),m(n)?r.showHidden=n:n&&t._extend(r,n),x(r.showHidden)&&(r.showHidden=!1),x(r.depth)&&(r.depth=2),x(r.colors)&&(r.colors=!1),x(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=o),u(r,e,r.depth)}function o(e,t){var n=i.styles[t];return n?"["+i.colors[n][0]+"m"+e+"["+i.colors[n][1]+"m":e}function a(e,t){return e}function s(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}function u(e,n,r){if(e.customInspect&&n&&C(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,e);return _(i)||(i=u(e,i,r)),i}var o=l(e,n);if(o)return o;var a=Object.keys(n),m=s(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(n)),S(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return c(n);if(0===a.length){if(C(n)){var v=n.name?": "+n.name:"";return e.stylize("[Function"+v+"]","special")}if(w(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(E(n))return e.stylize(Date.prototype.toString.call(n),"date");if(S(n))return c(n)}var g="",y=!1,b=["{","}"];if(d(n)&&(y=!0,b=["[","]"]),C(n)){g=" [Function"+(n.name?": "+n.name:"")+"]"}if(w(n)&&(g=" "+RegExp.prototype.toString.call(n)),E(n)&&(g=" "+Date.prototype.toUTCString.call(n)),S(n)&&(g=" "+c(n)),0===a.length&&(!y||0==n.length))return b[0]+g+b[1];if(r<0)return w(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special");e.seen.push(n);var x;return x=y?p(e,n,r,m,a):a.map(function(t){return f(e,n,r,m,t,y)}),e.seen.pop(),h(x,g,b)}function l(e,t){if(x(t))return e.stylize("undefined","undefined");if(_(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return y(t)?e.stylize(""+t,"number"):m(t)?e.stylize(""+t,"boolean"):v(t)?e.stylize("null","null"):void 0}function c(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,n,r,i){for(var o=[],a=0,s=t.length;a<s;++a)T(t,String(a))?o.push(f(e,t,n,r,String(a),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(f(e,t,n,r,i,!0))}),o}function f(e,t,n,r,i,o){var a,s,l;if(l=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]},l.get?s=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(s=e.stylize("[Setter]","special")),T(r,i)||(a="["+i+"]"),s||(e.seen.indexOf(l.value)<0?(s=v(n)?u(e,l.value,null):u(e,l.value,n-1),s.indexOf("\n")>-1&&(s=o?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n"))):s=e.stylize("[Circular]","special")),x(a)){if(o&&i.match(/^\d+$/))return s;a=JSON.stringify(""+i),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function h(e,t,n){var r=0;return e.reduce(function(e,t){return r++,t.indexOf("\n")>=0&&r++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function d(e){return Array.isArray(e)}function m(e){return"boolean"==typeof e}function v(e){return null===e}function g(e){return null==e}function y(e){return"number"==typeof e}function _(e){return"string"==typeof e}function b(e){return"symbol"==typeof e}function x(e){return void 0===e}function w(e){return k(e)&&"[object RegExp]"===D(e)}function k(e){return"object"==typeof e&&null!==e}function E(e){return k(e)&&"[object Date]"===D(e)}function S(e){return k(e)&&("[object Error]"===D(e)||e instanceof Error)}function C(e){return"function"==typeof e}function A(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function D(e){return Object.prototype.toString.call(e)}function O(e){return e<10?"0"+e.toString(10):e.toString(10)}function M(){var e=new Date,t=[O(e.getHours()),O(e.getMinutes()),O(e.getSeconds())].join(":");return[e.getDate(),j[e.getMonth()],t].join(" ")}function T(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var P=/%[sdj%]/g;t.format=function(e){if(!_(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(i(arguments[n]));return t.join(" ")}for(var n=1,r=arguments,o=r.length,a=String(e).replace(P,function(e){if("%%"===e)return"%";if(n>=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),s=r[n];n<o;s=r[++n])v(s)||!k(s)?a+=" "+s:a+=" "+i(s);return a},t.deprecate=function(n,i){function o(){if(!a){if(r.throwDeprecation)throw new Error(i);r.traceDeprecation?console.trace(i):console.error(i),a=!0}return n.apply(this,arguments)}if(x(e.process))return function(){return t.deprecate(n,i).apply(this,arguments)};if(!0===r.noDeprecation)return n;var a=!1;return o};var I,R={};t.debuglog=function(e){if(x(I)&&(I=n.i({NODE_ENV:"production",WEBPACK_INLINE_STYLES:!1}).NODE_DEBUG||""),e=e.toUpperCase(),!R[e])if(new RegExp("\\b"+e+"\\b","i").test(I)){var i=r.pid;R[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,i,n)}}else R[e]=function(){};return R[e]},t.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=d,t.isBoolean=m,t.isNull=v,t.isNullOrUndefined=g,t.isNumber=y,t.isString=_,t.isSymbol=b,t.isUndefined=x,t.isRegExp=w,t.isObject=k,t.isDate=E,t.isError=S,t.isFunction=C,t.isPrimitive=A,t.isBuffer=n(1193);var j=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];t.log=function(){console.log("%s - %s",M(),t.format.apply(t,arguments))},t.inherits=n(1192),t._extend=function(e,t){if(!t||!k(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(t,n(17),n(33))},function(e,t){e.exports=function(){throw new Error("define cannot be used indirect")}},function(e,t,n){"use strict";function r(e){return a(e).map(function(e){return{value:e,type:i(e)}})}function i(e){return u(e)?"ClosingTag":c(e)?"OpeningTag":l(e)?"SelfClosingTag":"Text"}var o=n(1177),a=function(e){return e.split(/(<\/?[^>]+>)/g).filter(function(e){return""!==e.trim()})},s=function(e){return/<[^>!]+>/.test(e)},u=function(e){return/<\/+[^>]+>/.test(e)},l=function(e){return/<[^>]+\/>/.test(e)},c=function(e){return s(e)&&!u(e)&&!l(e)};e.exports=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.indentor,i=t.textNodesOnSameLine,a=0,s=[];n=n||" ";var u=r(e).map(function(e,t,r){var u=e.value,l=e.type;"ClosingTag"===l&&a--;var c=o(n,a),p=c+u;if("OpeningTag"===l&&a++,i){var f=r[t-1],h=r[t-2];"ClosingTag"===l&&"Text"===f.type&&"OpeningTag"===h.type&&(p=""+c+h.value+f.value+u,s.push(t-2,t-1))}return p});return s.forEach(function(e){return u[e]=null}),u.filter(function(e){return!!e}).join("\n")}},function(e,t){function n(e){return e&&e.replace?e.replace(/([&"<>'])/g,function(e,t){return r[t]}):e}var r={"&":"&",'"':""","'":"'","<":"<",">":">"};e.exports=n},function(e,t,n){(function(t){function r(e,n){function r(e){m?t.nextTick(e):e()}function i(e,t){if(void 0!==t&&(f+=t),e&&!h&&(l=l||new c,h=!0),e&&h){var n=f;r(function(){l.emit("data",n)}),f=""}}function o(e,t){s(i,a(e,d,d?1:0),t)}function u(){if(l){var e=f;r(function(){l.emit("data",e),l.emit("end"),l.readable=!1,l.emit("close")})}}"object"!=typeof n&&(n={indent:n});var l=n.stream?new c:null,f="",h=!1,d=n.indent?!0===n.indent?p:n.indent:"",m=!0;return r(function(){m=!1}),n.declaration&&function(e){var t=e.encoding||"UTF-8",n={version:"1.0",encoding:t};e.standalone&&(n.standalone=e.standalone),o({"?xml":{_attr:n}}),f=f.replace("/>","?>")}(n.declaration),e&&e.forEach?e.forEach(function(t,n){var r;n+1===e.length&&(r=u),o(t,r)}):o(e,u),l?(l.readable=!0,l):f}function i(){var e=Array.prototype.slice.call(arguments),t={_elem:a(e)};return t.push=function(e){if(!this.append)throw new Error("not assigned to a parent!");var t=this,n=this._elem.indent;s(this.append,a(e,n,this._elem.icount+(n?1:0)),function(){t.append(!0)})},t.close=function(e){void 0!==e&&this.push(e),this.end&&this.end()},t}function o(e,t){return new Array(t||0).join(e||"")}function a(e,t,n){function r(e){Object.keys(e).forEach(function(t){f.push(u(t,e[t]))})}n=n||0;var i,s=o(t,n),c=e;if("object"==typeof e){if(i=Object.keys(e)[0],(c=e[i])&&c._elem)return c._elem.name=i,c._elem.icount=n,c._elem.indent=t,c._elem.indents=s,c._elem.interrupt=c,c._elem}var p,f=[],h=[];switch(typeof c){case"object":if(null===c)break;c._attr&&r(c._attr),c._cdata&&h.push(("<![CDATA["+c._cdata).replace(/\]\]>/g,"]]]]><![CDATA[>")+"]]>"),c.forEach&&(p=!1,h.push(""),c.forEach(function(e){if("object"==typeof e){"_attr"==Object.keys(e)[0]?r(e._attr):h.push(a(e,t,n+1))}else h.pop(),p=!0,h.push(l(e))}),p||h.push(""));break;default:h.push(l(c))}return{name:i,interrupt:!1,attributes:f,content:h,icount:n,indents:s,indent:t}}function s(e,t,n){function r(){for(;t.content.length;){var r=t.content.shift();if(void 0!==r){if(i(r))return;s(e,r)}}e(!1,(o>1?t.indents:"")+(t.name?"</"+t.name+">":"")+(t.indent&&!n?"\n":"")),n&&n()}function i(t){return!!t.interrupt&&(t.interrupt.append=e,t.interrupt.end=r,t.interrupt=!1,e(!0),!0)}if("object"!=typeof t)return e(!1,t);var o=t.interrupt?1:t.content.length;if(e(!1,t.indents+(t.name?"<"+t.name:"")+(t.attributes.length?" "+t.attributes.join(" "):"")+(o?t.name?">":"":t.name?"/>":"")+(t.indent&&o>1?"\n":"")),!o)return e(!1,t.indent?"\n":"");i(t)||r()}function u(e,t){return e+'="'+l(t)+'"'}var l=n(1197),c=n(493).Stream,p=" ";e.exports=r,e.exports.element=e.exports.Element=i}).call(t,n(33))},function(e,t){function n(e,t,n){return r.yubl(t((n||r.yufull)(e)))}t._getPrivFilters=function(){function e(e){var t=e.split(k,2);return!t[0]||2!==t.length&&e.length===t[0].length?null:t[0]}function t(e,t,n,r){function i(e,n,i,a){return n?(n=Number(n[0]<="9"?n:"0"+n),r?A(n):128===n?"€":130===n?"‚":131===n?"ƒ":132===n?"„":133===n?"…":134===n?"†":135===n?"‡":136===n?"ˆ":137===n?"‰":138===n?"Š":139===n?"‹":140===n?"Œ":142===n?"Ž":145===n?"‘":146===n?"’":147===n?"“":148===n?"”":149===n?"•":150===n?"–":151===n?"—":152===n?"˜":153===n?"™":154===n?"š":155===n?"›":156===n?"œ":158===n?"ž":159===n?"Ÿ":n>=55296&&n<=57343||13===n?"�":o.frCoPt(n)):t[i||a]||e}return t=t||m,n=n||d,void 0===e?"undefined":null===e?"null":e.toString().replace(c,"�").replace(n,i)}function n(e){return"\\"+e.charCodeAt(0).toString(16).toLowerCase()+" "}function r(e){return e.replace(_,function(e){return"-x-"+e})}function i(n){n=o.yufull(t(n));var r=e(n);return r&&w[r.toLowerCase()]?"##"+n:n}var o,a=/</g,s=/"/g,u=/'/g,l=/&/g,c=/\x00/g,p=/(?:^$|[\x00\x09-\x0D "'`=<>])/g,f=/[&<>"'`]/g,h=/(?:\x00|^-*!?>|--!?>|--?!?$|\]>|\]$)/g,d=/&(?:#([xX][0-9A-Fa-f]+|\d+);?|(Tab|NewLine|colon|semi|lpar|rpar|apos|sol|comma|excl|ast|midast|ensp|emsp|thinsp);|(nbsp|amp|AMP|lt|LT|gt|GT|quot|QUOT);?)/g,m={Tab:"\t",NewLine:"\n",colon:":",semi:";",lpar:"(",rpar:")",apos:"'",sol:"/",comma:",",excl:"!",ast:"*",midast:"*",ensp:" ",emsp:" ",thinsp:" ",nbsp:" ",amp:"&",lt:"<",gt:">",quot:'"',QUOT:'"'},v=/^(?:(?!-*expression)#?[-\w]+|[+-]?(?:\d+|\d*\.\d+)(?:r?em|ex|ch|cm|mm|in|px|pt|pc|%|vh|vw|vmin|vmax)?|!important|)$/i,g=/[\x00-\x1F\x7F\[\]{}\\"]/g,y=/[\x00-\x1F\x7F\[\]{}\\']/g,_=/url[\(\u207D\u208D]+/g,b=/['\(\)]/g,x=/\/\/%5[Bb]([A-Fa-f0-9:]+)%5[Dd]/,w={javascript:1,data:1,vbscript:1,mhtml:1,"x-schema":1},k=/(?::|&#[xX]0*3[aA];?|�*58;?|:)/,E=/(?:^[\x00-\x20]+|[\t\n\r\x00]+)/g,S={Tab:"\t",NewLine:"\n"},C=function(e,t,n){return void 0===e?"undefined":null===e?"null":e.toString().replace(t,n)},A=String.fromCodePoint||function(e){return 0===arguments.length?"":e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),e%1024+56320))};return o={frCoPt:function(e){return void 0===e||null===e?"":!isFinite(e=Number(e))||e<=0||e>1114111||e>=1&&e<=8||e>=14&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||11===e||65535==(65535&e)||65534==(65535&e)?"�":A(e)},d:t,yup:function(n){return n=e(n.replace(c,"")),n?t(n,S,null,!0).replace(E,"").toLowerCase():null},y:function(e){return C(e,f,function(e){return"&"===e?"&":"<"===e?"<":">"===e?">":'"'===e?""":"'"===e?"'":"`"})},ya:function(e){return C(e,l,"&")},yd:function(e){return C(e,a,"<")},yc:function(e){return C(e,h,function(e){return"\0"===e?"�":"--!"===e||"--"===e||"-"===e||"]"===e?e+" ":e.slice(0,-1)+" >"})},yavd:function(e){return C(e,s,""")},yavs:function(e){return C(e,u,"'")},yavu:function(e){return C(e,p,function(e){return"\t"===e?" ":"\n"===e?" ":"\v"===e?" ":"\f"===e?" ":"\r"===e?" ":" "===e?" ":"="===e?"=":"<"===e?"<":">"===e?">":'"'===e?""":"'"===e?"'":"`"===e?"`":"�"})},yu:encodeURI,yuc:encodeURIComponent,yubl:function(e){return w[o.yup(e)]?"x-"+e:e},yufull:function(e){return o.yu(e).replace(x,function(e,t){return"//["+t+"]"})},yublf:function(e){return o.yubl(o.yufull(e))},yceu:function(e){return e=t(e),v.test(e)?e:";-x:'"+r(e.replace(y,n))+"';-v:"},yced:function(e){return r(t(e).replace(g,n))},yces:function(e){return r(t(e).replace(y,n))},yceuu:function(e){return i(e).replace(b,function(e){return"'"===e?"\\27 ":"("===e?"%28":"%29"})},yceud:function(e){return i(e)},yceus:function(e){return i(e).replace(u,"\\27 ")}}};var r=t._privFilters=t._getPrivFilters();t.inHTMLData=r.yd,t.inHTMLComment=r.yc,t.inSingleQuotedAttr=r.yavs,t.inDoubleQuotedAttr=r.yavd,t.inUnQuotedAttr=r.yavu,t.uriInSingleQuotedAttr=function(e){return n(e,r.yavs)},t.uriInDoubleQuotedAttr=function(e){return n(e,r.yavd)},t.uriInUnQuotedAttr=function(e){return n(e,r.yavu)},t.uriInHTMLData=r.yufull,t.uriInHTMLComment=function(e){return r.yc(r.yufull(e))},t.uriPathInSingleQuotedAttr=function(e){return n(e,r.yavs,r.yu)},t.uriPathInDoubleQuotedAttr=function(e){return n(e,r.yavd,r.yu)},t.uriPathInUnQuotedAttr=function(e){return n(e,r.yavu,r.yu)},t.uriPathInHTMLData=r.yu,t.uriPathInHTMLComment=function(e){return r.yc(r.yu(e))},t.uriQueryInSingleQuotedAttr=t.uriPathInSingleQuotedAttr,t.uriQueryInDoubleQuotedAttr=t.uriPathInDoubleQuotedAttr,t.uriQueryInUnQuotedAttr=t.uriPathInUnQuotedAttr,t.uriQueryInHTMLData=t.uriPathInHTMLData,t.uriQueryInHTMLComment=t.uriPathInHTMLComment,t.uriComponentInSingleQuotedAttr=function(e){return r.yavs(r.yuc(e))},t.uriComponentInDoubleQuotedAttr=function(e){return r.yavd(r.yuc(e))},t.uriComponentInUnQuotedAttr=function(e){return r.yavu(r.yuc(e))},t.uriComponentInHTMLData=r.yuc,t.uriComponentInHTMLComment=function(e){return r.yc(r.yuc(e))},t.uriFragmentInSingleQuotedAttr=function(e){return r.yubl(r.yavs(r.yuc(e)))},t.uriFragmentInDoubleQuotedAttr=function(e){return r.yubl(r.yavd(r.yuc(e)))},t.uriFragmentInUnQuotedAttr=function(e){return r.yubl(r.yavu(r.yuc(e)))},t.uriFragmentInHTMLData=t.uriComponentInHTMLData,t.uriFragmentInHTMLComment=t.uriComponentInHTMLComment},function(e,t){function n(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var i in n)r.call(n,i)&&(e[i]=n[i])}return e}e.exports=n;var r=Object.prototype.hasOwnProperty},function(e,t,n){(function(){var e,t,r,i,o,a=[].slice;o=n(61),e=n(1202),i=n(1205),t=n(1204),r=n(266),this.make_dumper=function(n,s,u,l){var c;return null==n&&(n=e.Emitter),null==s&&(s=i.Serializer),null==u&&(u=t.Representer),null==l&&(l=r.Resolver),c=[n,s,u,l],function(){function e(e,n){var r,i,o;for(null==n&&(n={}),c[0].call(this,e,n),o=c.slice(1),r=0,i=o.length;r<i;r++)t=o[r],t.call(this,n)}var t;return o.extend.apply(o,[e.prototype].concat(a.call(function(){var e,n,r;for(r=[],e=0,n=c.length;e<n;e++)t=c[e],r.push(t.prototype);return r}()))),e}()},this.Dumper=this.make_dumper()}).call(this)},function(e,t,n){(function(){var e,r,i,o,a=function(e,t){function n(){this.constructor=e}for(var r in t)s.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},s={}.hasOwnProperty,u=[].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1};i=n(127),o=n(61),r=n(45).YAMLError,this.EmitterError=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return a(t,e),t}(r),this.Emitter=function(){function n(e,t){var n;this.stream=e,this.encoding=null,this.states=[],this.state=this.expect_stream_start,this.events=[],this.event=null,this.indents=[],this.indent=null,this.flow_level=0,this.root_context=!1,this.sequence_context=!1,this.mapping_context=!1,this.simple_key_context=!1,this.line=0,this.column=0,this.whitespace=!0,this.indentation=!0,this.open_ended=!1,this.canonical=t.canonical,this.allow_unicode=t.allow_unicode,null==this.canonical&&(this.canonical=!1),null==this.allow_unicode&&(this.allow_unicode=!0),this.best_indent=1<t.indent&&t.indent<10?t.indent:2,this.best_width=t.width>2*this.indent?t.width:80,this.best_line_break="\r"===(n=t.line_break)||"\n"===n||"\r\n"===n?t.line_break:"\n",this.tag_prefixes=null,this.prepared_anchor=null,this.prepared_tag=null,this.analysis=null,this.style=null}var r,a,l;return r="\0 \t\r\n…\u2028\u2029",a={"!":"!","tag:yaml.org,2002:":"!!"},l={"\0":"0","":"a","\b":"b","\t":"t","\n":"n","\v":"v","\f":"f","\r":"r","":"e",'"':'"',"\\":"\\","…":"N"," ":"_","\u2028":"L","\u2029":"P"},n.prototype.dispose=function(){return this.states=[],this.state=null},n.prototype.emit=function(e){var t;for(this.events.push(e),t=[];!this.need_more_events();)this.event=this.events.shift(),this.state(),t.push(this.event=null);return t},n.prototype.need_more_events=function(){var e;return 0===this.events.length||(e=this.events[0],e instanceof i.DocumentStartEvent?this.need_events(1):e instanceof i.SequenceStartEvent?this.need_events(2):e instanceof i.MappingStartEvent&&this.need_events(3))},n.prototype.need_events=function(e){var t,n,r,o,a;for(o=0,a=this.events.slice(1),n=0,r=a.length;n<r;n++)if(t=a[n],t instanceof i.DocumentStartEvent||t instanceof i.CollectionStartEvent?o++:t instanceof i.DocumentEndEvent||t instanceof i.CollectionEndEvent?o--:t instanceof i.StreamEndEvent&&(o=-1),o<0)return!1;return this.events.length<e+1},n.prototype.increase_indent=function(e){return null==e&&(e={}),this.indents.push(this.indent),null==this.indent?this.indent=e.flow?this.best_indent:0:e.indentless?void 0:this.indent+=this.best_indent},n.prototype.expect_stream_start=function(){return this.event instanceof i.StreamStartEvent?(!this.event.encoding||"encoding"in this.stream||(this.encoding=this.event.encoding),this.write_stream_start(),this.state=this.expect_first_document_start):this.error("expected StreamStartEvent, but got",this.event)},n.prototype.expect_nothing=function(){return this.error("expected nothing, but got",this.event)},n.prototype.expect_first_document_start=function(){return this.expect_document_start(!0)},n.prototype.expect_document_start=function(e){var t,n,r,u,l,c,p;if(null==e&&(e=!1),this.event instanceof i.DocumentStartEvent){if((this.event.version||this.event.tags)&&this.open_ended&&(this.write_indicator("...",!0),this.write_indent()),this.event.version&&this.write_version_directive(this.prepare_version(this.event.version)),this.tag_prefixes=o.clone(a),this.event.tags)for(p=function(){var e,t;e=this.event.tags,t=[];for(u in e)s.call(e,u)&&t.push(u);return t}.call(this).sort(),r=0,l=p.length;r<l;r++)n=p[r],c=this.event.tags[n],this.tag_prefixes[c]=n,this.write_tag_directive(this.prepare_tag_handle(n),this.prepare_tag_prefix(c));return t=!e||this.event.explicit||this.canonical||this.event.version||this.event.tags||this.check_empty_document(),t&&(this.write_indent(),this.write_indicator("---",!0),this.canonical&&this.write_indent()),this.state=this.expect_document_root}return this.event instanceof i.StreamEndEvent?(this.open_ended&&(this.write_indicator("...",!0),this.write_indent()),this.write_stream_end(),this.state=this.expect_nothing):this.error("expected DocumentStartEvent, but got",this.event)},n.prototype.expect_document_end=function(){return this.event instanceof i.DocumentEndEvent?(this.write_indent(),this.event.explicit&&(this.write_indicator("...",!0),this.write_indent()),this.flush_stream(),this.state=this.expect_document_start):this.error("expected DocumentEndEvent, but got",this.event)},n.prototype.expect_document_root=function(){return this.states.push(this.expect_document_end),this.expect_node({root:!0})},n.prototype.expect_node=function(e){return null==e&&(e={}),this.root_context=!!e.root,this.sequence_context=!!e.sequence,this.mapping_context=!!e.mapping,this.simple_key_context=!!e.simple_key,this.event instanceof i.AliasEvent?this.expect_alias():this.event instanceof i.ScalarEvent||this.event instanceof i.CollectionStartEvent?(this.process_anchor("&"),this.process_tag(),this.event instanceof i.ScalarEvent?this.expect_scalar():this.event instanceof i.SequenceStartEvent?this.flow_level||this.canonical||this.event.flow_style||this.check_empty_sequence()?this.expect_flow_sequence():this.expect_block_sequence():this.event instanceof i.MappingStartEvent?this.flow_level||this.canonical||this.event.flow_style||this.check_empty_mapping()?this.expect_flow_mapping():this.expect_block_mapping():void 0):this.error("expected NodeEvent, but got",this.event)},n.prototype.expect_alias=function(){return this.event.anchor||this.error("anchor is not specified for alias"),this.process_anchor("*"),this.state=this.states.pop()},n.prototype.expect_scalar=function(){return this.increase_indent({flow:!0}),this.process_scalar(),this.indent=this.indents.pop(),this.state=this.states.pop()},n.prototype.expect_flow_sequence=function(){return this.write_indicator("[",!0,{whitespace:!0}),this.flow_level++,this.increase_indent({flow:!0}),this.state=this.expect_first_flow_sequence_item},n.prototype.expect_first_flow_sequence_item=function(){return this.event instanceof i.SequenceEndEvent?(this.indent=this.indents.pop(),this.flow_level--,this.write_indicator("]",!1),this.state=this.states.pop()):((this.canonical||this.column>this.best_width)&&this.write_indent(),this.states.push(this.expect_flow_sequence_item),this.expect_node({sequence:!0}))},n.prototype.expect_flow_sequence_item=function(){return this.event instanceof i.SequenceEndEvent?(this.indent=this.indents.pop(),this.flow_level--,this.canonical&&(this.write_indicator(",",!1),this.write_indent()),this.write_indicator("]",!1),this.state=this.states.pop()):(this.write_indicator(",",!1),(this.canonical||this.column>this.best_width)&&this.write_indent(),this.states.push(this.expect_flow_sequence_item),this.expect_node({sequence:!0}))},n.prototype.expect_flow_mapping=function(){return this.write_indicator("{",!0,{whitespace:!0}),this.flow_level++,this.increase_indent({flow:!0}),this.state=this.expect_first_flow_mapping_key},n.prototype.expect_first_flow_mapping_key=function(){return this.event instanceof i.MappingEndEvent?(this.indent=this.indents.pop(),this.flow_level--,this.write_indicator("}",!1),this.state=this.states.pop()):((this.canonical||this.column>this.best_width)&&this.write_indent(),!this.canonical&&this.check_simple_key()?(this.states.push(this.expect_flow_mapping_simple_value),this.expect_node({mapping:!0,simple_key:!0})):(this.write_indicator("?",!0),this.states.push(this.expect_flow_mapping_value),this.expect_node({mapping:!0})))},n.prototype.expect_flow_mapping_key=function(){return this.event instanceof i.MappingEndEvent?(this.indent=this.indents.pop(),this.flow_level--,this.canonical&&(this.write_indicator(",",!1),this.write_indent()),this.write_indicator("}",!1),this.state=this.states.pop()):(this.write_indicator(",",!1),(this.canonical||this.column>this.best_width)&&this.write_indent(),!this.canonical&&this.check_simple_key()?(this.states.push(this.expect_flow_mapping_simple_value),this.expect_node({mapping:!0,simple_key:!0})):(this.write_indicator("?",!0),this.states.push(this.expect_flow_mapping_value),this.expect_node({mapping:!0})))},n.prototype.expect_flow_mapping_simple_value=function(){return this.write_indicator(":",!1),this.states.push(this.expect_flow_mapping_key),this.expect_node({mapping:!0})},n.prototype.expect_flow_mapping_value=function(){return(this.canonical||this.column>this.best_width)&&this.write_indent(),this.write_indicator(":",!0),this.states.push(this.expect_flow_mapping_key),this.expect_node({mapping:!0})},n.prototype.expect_block_sequence=function(){var e;return e=this.mapping_context&&!this.indentation,this.increase_indent({indentless:e}),this.state=this.expect_first_block_sequence_item},n.prototype.expect_first_block_sequence_item=function(){return this.expect_block_sequence_item(!0)},n.prototype.expect_block_sequence_item=function(e){return null==e&&(e=!1),!e&&this.event instanceof i.SequenceEndEvent?(this.indent=this.indents.pop(),this.state=this.states.pop()):(this.write_indent(),this.write_indicator("-",!0,{indentation:!0}),this.states.push(this.expect_block_sequence_item),this.expect_node({sequence:!0}))},n.prototype.expect_block_mapping=function(){return this.increase_indent(),this.state=this.expect_first_block_mapping_key},n.prototype.expect_first_block_mapping_key=function(){return this.expect_block_mapping_key(!0)},n.prototype.expect_block_mapping_key=function(e){return null==e&&(e=!1),!e&&this.event instanceof i.MappingEndEvent?(this.indent=this.indents.pop(),this.state=this.states.pop()):(this.write_indent(),this.check_simple_key()?(this.states.push(this.expect_block_mapping_simple_value),this.expect_node({mapping:!0,simple_key:!0})):(this.write_indicator("?",!0,{indentation:!0}),this.states.push(this.expect_block_mapping_value),this.expect_node({mapping:!0})))},n.prototype.expect_block_mapping_simple_value=function(){return this.write_indicator(":",!1),this.states.push(this.expect_block_mapping_key),this.expect_node({mapping:!0})},n.prototype.expect_block_mapping_value=function(){return this.write_indent(),this.write_indicator(":",!0,{indentation:!0}),this.states.push(this.expect_block_mapping_key),this.expect_node({mapping:!0})},n.prototype.check_empty_document=function(){var e;return this.event instanceof i.DocumentStartEvent&&0!==this.events.length&&((e=this.events[0])instanceof i.ScalarEvent&&null==e.anchor&&null==e.tag&&e.implicit&&""===e.value)},n.prototype.check_empty_sequence=function(){return this.event instanceof i.SequenceStartEvent&&this.events[0]instanceof i.SequenceEndEvent},n.prototype.check_empty_mapping=function(){return this.event instanceof i.MappingStartEvent&&this.events[0]instanceof i.MappingEndEvent},n.prototype.check_simple_key=function(){var e;return e=0,this.event instanceof i.NodeEvent&&null!=this.event.anchor&&(null==this.prepared_anchor&&(this.prepared_anchor=this.prepare_anchor(this.event.anchor)),e+=this.prepared_anchor.length),null!=this.event.tag&&(this.event instanceof i.ScalarEvent||this.event instanceof i.CollectionStartEvent)&&(null==this.prepared_tag&&(this.prepared_tag=this.prepare_tag(this.event.tag)),e+=this.prepared_tag.length),this.event instanceof i.ScalarEvent&&(null==this.analysis&&(this.analysis=this.analyze_scalar(this.event.value)),e+=this.analysis.scalar.length),e<128&&(this.event instanceof i.AliasEvent||this.event instanceof i.ScalarEvent&&!this.analysis.empty&&!this.analysis.multiline||this.check_empty_sequence()||this.check_empty_mapping())},n.prototype.process_anchor=function(e){return null==this.event.anchor?void(this.prepared_anchor=null):(null==this.prepared_anchor&&(this.prepared_anchor=this.prepare_anchor(this.event.anchor)),this.prepared_anchor&&this.write_indicator(""+e+this.prepared_anchor,!0),this.prepared_anchor=null)},n.prototype.process_tag=function(){var e;if(e=this.event.tag,this.event instanceof i.ScalarEvent){if(null==this.style&&(this.style=this.choose_scalar_style()),(!this.canonical||null==e)&&(""===this.style&&this.event.implicit[0]||""!==this.style&&this.event.implicit[1]))return void(this.prepared_tag=null);this.event.implicit[0]&&null==e&&(e="!",this.prepared_tag=null)}else if((!this.canonical||null==e)&&this.event.implicit)return void(this.prepared_tag=null);return null==e&&this.error("tag is not specified"),null==this.prepared_tag&&(this.prepared_tag=this.prepare_tag(e)),this.write_indicator(this.prepared_tag,!0),this.prepared_tag=null},n.prototype.process_scalar=function(){var e;switch(null==this.analysis&&(this.analysis=this.analyze_scalar(this.event.value)),null==this.style&&(this.style=this.choose_scalar_style()),e=!this.simple_key_context,this.style){case'"':this.write_double_quoted(this.analysis.scalar,e);break;case"'":this.write_single_quoted(this.analysis.scalar,e);break;case">":this.write_folded(this.analysis.scalar);break;case"|":this.write_literal(this.analysis.scalar);break;default:this.write_plain(this.analysis.scalar,e)}return this.analysis=null,this.style=null},n.prototype.choose_scalar_style=function(){var e;return null==this.analysis&&(this.analysis=this.analyze_scalar(this.event.value)),'"'===this.event.style||this.canonical?'"':this.event.style||!this.event.implicit[0]||this.simple_key_context&&(this.analysis.empty||this.analysis.multiline)||!(this.flow_level&&this.analysis.allow_flow_plain||!this.flow_level&&this.analysis.allow_block_plain)?this.event.style&&(e=this.event.style,u.call("|>",e)>=0)&&!this.flow_level&&!this.simple_key_context&&this.analysis.allow_block?this.event.style:this.event.style&&"'"!==this.event.style||!this.analysis.allow_single_quoted||this.simple_key_context&&this.analysis.multiline?'"':"'":""},n.prototype.prepare_version=function(e){var t,n,r;return t=e[0],n=e[1],r=t+"."+n,1===t?r:this.error("unsupported YAML version",r)},n.prototype.prepare_tag_handle=function(e){var t,n,r,i;for(e||this.error("tag handle must not be empty"),"!"===e[0]&&"!"===e.slice(-1)||this.error("tag handle must start and end with '!':",e),i=e.slice(1,-1),n=0,r=i.length;n<r;n++)"0"<=(t=i[n])&&t<="9"||"A"<=t&&t<="Z"||"a"<=t&&t<="z"||u.call("-_",t)>=0||this.error("invalid character '"+t+"' in the tag handle:",e);return e},n.prototype.prepare_tag_prefix=function(e){var t,n,r,i;for(e||this.error("tag prefix must not be empty"),n=[],i=0,r=+("!"===e[0]);r<e.length;)t=e[r],"0"<=t&&t<="9"||"A"<=t&&t<="Z"||"a"<=t&&t<="z"||u.call("-;/?!:@&=+$,_.~*'()[]",t)>=0?r++:(i<r&&n.push(e.slice(i,r)),i=r+=1,n.push(t));return i<r&&n.push(e.slice(i,r)),n.join("")},n.prototype.prepare_tag=function(e){var t,n,r,i,o,a,l,c,p,f,h,d;if(e||this.error("tag must not be empty"),"!"===e)return e;for(i=null,h=e,p=function(){var e,t;e=this.tag_prefixes,t=[];for(a in e)s.call(e,a)&&t.push(a);return t}.call(this).sort(),o=0,l=p.length;o<l;o++)c=p[o],0===e.indexOf(c)&&("!"===c||c.length<e.length)&&(i=this.tag_prefixes[c],h=e.slice(c.length));for(n=[],f=r=0;r<h.length;)t=h[r],"0"<=t&&t<="9"||"A"<=t&&t<="Z"||"a"<=t&&t<="z"||u.call("-;/?!:@&=+$,_.~*'()[]",t)>=0||"!"===t&&"!"!==i?r++:(f<r&&n.push(h.slice(f,r)),f=r+=1,n.push(t));return f<r&&n.push(h.slice(f,r)),d=n.join(""),i?""+i+d:"!<"+d+">"},n.prototype.prepare_anchor=function(e){var t,n,r;for(e||this.error("anchor must not be empty"),n=0,r=e.length;n<r;n++)"0"<=(t=e[n])&&t<="9"||"A"<=t&&t<="Z"||"a"<=t&&t<="z"||u.call("-_",t)>=0||this.error("invalid character '"+t+"' in the anchor:",e);return e},n.prototype.analyze_scalar=function(t){var n,i,o,a,s,l,c,p,f,h,d,m,v,g,y,_,b,x,w,k,E,S,C,A,D;for(t||new e(t,!0,!1,!1,!0,!0,!0,!1),l=!1,f=!1,_=!1,C=!1,!1,g=!1,v=!1,D=!1,A=!1,c=!1,S=!1,0!==t.indexOf("---")&&0!==t.indexOf("...")||(l=!0,f=!0),b=!0,h=1===t.length||(k=t[1],u.call("\0 \t\r\n…\u2028\u2029",k)>=0),w=!1,x=!1,m=0,m=d=0,y=t.length;d<y;m=++d)p=t[m],0===m?u.call("#,[]{}&*!|>'\"%@`",p)>=0||"-"===p&&h?(f=!0,l=!0):u.call("?:",p)>=0&&(f=!0,h&&(l=!0)):u.call(",?[]{}",p)>=0?f=!0:":"===p?(f=!0,h&&(l=!0)):"#"===p&&b&&(f=!0,l=!0),u.call("\n…\u2028\u2029",p)>=0&&(_=!0),"\n"===p||" "<=p&&p<="~"||("\ufeff"!==p&&("…"===p||" "<=p&&p<="퟿"||""<=p&&p<="�")?(!0,this.allow_unicode||(C=!0)):C=!0)," "===p?(0===m&&(g=!0),m===t.length-1&&(D=!0),x&&(c=!0),x=!1,w=!0):u.call("\n…\u2028\u2029",p)>=0?(0===m&&(v=!0),m===t.length-1&&(A=!0),w&&(S=!0),x=!0,w=!1):(x=!1,w=!1),b=u.call(r,p)>=0,h=m+2>=t.length||(E=t[m+2],u.call(r,E)>=0);return a=!0,i=!0,s=!0,o=!0,n=!0,(g||v||D||A)&&(a=i=!1),D&&(n=!1),c&&(a=i=s=!1),(S||C)&&(a=i=s=n=!1),_&&(a=i=!1),f&&(a=!1),l&&(i=!1),new e(t,!1,_,a,i,s,o,n)},n.prototype.write_stream_start=function(){if(this.encoding&&0===this.encoding.indexOf("utf-16"))return this.stream.write("\ufeff",this.encoding)},n.prototype.write_stream_end=function(){return this.flush_stream()},n.prototype.write_indicator=function(e,t,n){var r;return null==n&&(n={}),r=this.whitespace||!t?e:" "+e,this.whitespace=!!n.whitespace,this.indentation&&(this.indentation=!!n.indentation),this.column+=r.length,this.open_ended=!1,this.stream.write(r,this.encoding)},n.prototype.write_indent=function(){var e,t,n;if(t=null!=(n=this.indent)?n:0,(!this.indentation||this.column>t||this.column===t&&!this.whitespace)&&this.write_line_break(),this.column<t)return this.whitespace=!0,e=new Array(t-this.column+1).join(" "),this.column=t,this.stream.write(e,this.encoding)},n.prototype.write_line_break=function(e){return this.whitespace=!0,this.indentation=!0,this.line+=1,this.column=0,this.stream.write(null!=e?e:this.best_line_break,this.encoding)},n.prototype.write_version_directive=function(e){return this.stream.write("%YAML "+e,this.encoding),this.write_line_break()},n.prototype.write_tag_directive=function(e,t){return this.stream.write("%TAG "+e+" "+t,this.encoding),this.write_line_break()},n.prototype.write_single_quoted=function(e,t){var n,r,i,o,a,s,l,c,p,f;for(null==t&&(t=!0),this.write_indicator("'",!0),p=!1,r=!1,f=a=0;a<=e.length;){if(i=e[a],p)null!=i&&" "===i||(f+1===a&&this.column>this.best_width&&t&&0!==f&&a!==e.length?this.write_indent():(o=e.slice(f,a),this.column+=o.length,this.stream.write(o,this.encoding)),f=a);else if(r){if(null==i||u.call("\n…\u2028\u2029",i)<0){for("\n"===e[f]&&this.write_line_break(),c=e.slice(f,a),s=0,l=c.length;s<l;s++)n=c[s],"\n"===n?this.write_line_break():this.write_line_break(n);this.write_indent(),f=a}}else(null==i||u.call(" \n…\u2028\u2029",i)>=0||"'"===i)&&f<a&&(o=e.slice(f,a),this.column+=o.length,this.stream.write(o,this.encoding),f=a);"'"===i&&(this.column+=2,this.stream.write("''",this.encoding),f=a+1),null!=i&&(p=" "===i,r=u.call("\n…\u2028\u2029",i)>=0),a++}return this.write_indicator("'",!1)},n.prototype.write_double_quoted=function(e,t){var n,r,i,a;for(null==t&&(t=!0),this.write_indicator('"',!0),a=i=0;i<=e.length;)n=e[i],(null==n||u.call('"\\…\u2028\u2029\ufeff',n)>=0||!(" "<=n&&n<="~"||this.allow_unicode&&(" "<=n&&n<="퟿"||""<=n&&n<="�")))&&(a<i&&(r=e.slice(a,i),this.column+=r.length,this.stream.write(r,this.encoding),a=i),null!=n&&(r=n in l?"\\"+l[n]:n<="ÿ"?"\\x"+o.pad_left(o.to_hex(n),"0",2):n<="￿"?"\\u"+o.pad_left(o.to_hex(n),"0",4):"\\U"+o.pad_left(o.to_hex(n),"0",16),this.column+=r.length,this.stream.write(r,this.encoding),a=i+1)),t&&0<i&&i<e.length-1&&(" "===n||a>=i)&&this.column+(i-a)>this.best_width&&(r=e.slice(a,i)+"\\",a<i&&(a=i),this.column+=r.length,this.stream.write(r,this.encoding),this.write_indent(),this.whitespace=!1,this.indentation=!1," "===e[a]&&(r="\\",this.column+=r.length,this.stream.write(r,this.encoding))),i++;return this.write_indicator('"',!1)},n.prototype.write_folded=function(e){var t,n,r,i,o,a,s,l,c,p,f,h,d;for(a=this.determine_block_hints(e),this.write_indicator(">"+a,!0),"+"===a.slice(-1)&&(this.open_ended=!0),this.write_line_break(),l=!0,n=!0,h=!1,d=o=0,f=[];o<=e.length;){if(r=e[o],n){if(null==r||u.call("\n…\u2028\u2029",r)<0){for(l||null==r||" "===r||"\n"!==e[d]||this.write_line_break(),l=" "===r,p=e.slice(d,o),s=0,c=p.length;s<c;s++)t=p[s],"\n"===t?this.write_line_break():this.write_line_break(t);null!=r&&this.write_indent(),d=o}}else h?" "!==r&&(d+1===o&&this.column>this.best_width?this.write_indent():(i=e.slice(d,o),this.column+=i.length,this.stream.write(i,this.encoding)),d=o):(null==r||u.call(" \n…\u2028\u2029",r)>=0)&&(i=e.slice(d,o),this.column+=i.length,this.stream.write(i,this.encoding),null==r&&this.write_line_break(),d=o);null!=r&&(n=u.call("\n…\u2028\u2029",r)>=0,h=" "===r),f.push(o++)}return f},n.prototype.write_literal=function(e){var t,n,r,i,o,a,s,l,c,p,f;for(a=this.determine_block_hints(e),this.write_indicator("|"+a,!0),"+"===a.slice(-1)&&(this.open_ended=!0),this.write_line_break(),n=!0,f=o=0,p=[];o<=e.length;){if(r=e[o],n){if(null==r||u.call("\n…\u2028\u2029",r)<0){for(c=e.slice(f,o),s=0,l=c.length;s<l;s++)t=c[s],"\n"===t?this.write_line_break():this.write_line_break(t);null!=r&&this.write_indent(),f=o}}else(null==r||u.call("\n…\u2028\u2029",r)>=0)&&(i=e.slice(f,o),this.stream.write(i,this.encoding),null==r&&this.write_line_break(),f=o);null!=r&&(n=u.call("\n…\u2028\u2029",r)>=0),p.push(o++)}return p},n.prototype.write_plain=function(e,t){var n,r,i,o,a,s,l,c,p,f,h;if(null==t&&(t=!0),e){for(this.root_context&&(this.open_ended=!0),this.whitespace||(o=" ",this.column+=o.length,this.stream.write(o,this.encoding)),this.whitespace=!1,this.indentation=!1,f=!1,r=!1,h=a=0,p=[];a<=e.length;){if(i=e[a],f)" "!==i&&(h+1===a&&this.column>this.best_width&&t?(this.write_indent(),this.whitespace=!1,this.indentation=!1):(o=e.slice(h,a),this.column+=o.length,this.stream.write(o,this.encoding)),h=a);else if(r){if(u.call("\n…\u2028\u2029",i)<0){for("\n"===e[h]&&this.write_line_break(),c=e.slice(h,a),s=0,l=c.length;s<l;s++)n=c[s],"\n"===n?this.write_line_break():this.write_line_break(n);this.write_indent(),this.whitespace=!1,this.indentation=!1,h=a}}else(null==i||u.call(" \n…\u2028\u2029",i)>=0)&&(o=e.slice(h,a),this.column+=o.length,this.stream.write(o,this.encoding),h=a);null!=i&&(f=" "===i,r=u.call("\n…\u2028\u2029",i)>=0),p.push(a++)}return p}},n.prototype.determine_block_hints=function(e){var t,n,r,i,o;return n="",t=e[0],r=e.length-2,o=e[r++],i=e[r++],u.call(" \n…\u2028\u2029",t)>=0&&(n+=this.best_indent),u.call("\n…\u2028\u2029",i)<0?n+="-":(1===e.length||u.call("\n…\u2028\u2029",o)>=0)&&(n+="+"),n},n.prototype.flush_stream=function(){var e;return"function"==typeof(e=this.stream).flush?e.flush():void 0},n.prototype.error=function(e,n){var r,i;throw n&&(n=null!=(r=null!=n&&null!=(i=n.constructor)?i.name:void 0)?r:o.inspect(n)),new t.EmitterError(e+(n?" "+n:""))},n}(),e=function(){function e(e,t,n,r,i,o,a,s){this.scalar=e,this.empty=t,this.multiline=n,this.allow_flow_plain=r,this.allow_block_plain=i,this.allow_single_quoted=o,this.allow_double_quoted=a,this.allow_block=s}return e}()}).call(this)},function(e,t,n){(function(){var e,t,r,i,o,a,s,u=[].slice;s=n(61),i=n(501),a=n(502),r=n(500),e=n(498),o=n(266),t=n(499),this.make_loader=function(n,l,c,p,f,h){var d;return null==n&&(n=i.Reader),null==l&&(l=a.Scanner),null==c&&(c=r.Parser),null==p&&(p=e.Composer),null==f&&(f=o.Resolver),null==h&&(h=t.Constructor),d=[n,l,c,p,f,h],function(){function e(e){var n,r,i;for(d[0].call(this,e),i=d.slice(1),n=0,r=i.length;n<r;n++)t=i[n],t.call(this)}var t;return s.extend.apply(s,[e.prototype].concat(u.call(function(){var e,n,r;for(r=[],e=0,n=d.length;e<n;e++)t=d[e],r.push(t.prototype);return r}()))),e}()},this.Loader=this.make_loader()}).call(this)},function(e,t,n){(function(){var e,r,i=function(e,t){function n(){this.constructor=e}for(var r in t)o.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},o={}.hasOwnProperty;r=n(94),e=n(45).YAMLError,this.RepresenterError=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return i(t,e),t}(e),this.BaseRepresenter=function(){function e(e){var t;t=null!=e?e:{},this.default_style=t.default_style,this.default_flow_style=t.default_flow_style,this.represented_objects={},this.object_keeper=[],this.alias_key=null}return e.prototype.yaml_representers_types=[],e.prototype.yaml_representers_handlers=[],e.prototype.yaml_multi_representers_types=[],e.prototype.yaml_multi_representers_handlers=[],e.add_representer=function(e,t){return this.prototype.hasOwnProperty("yaml_representers_types")||(this.prototype.yaml_representers_types=[].concat(this.prototype.yaml_representers_types)),this.prototype.hasOwnProperty("yaml_representers_handlers")||(this.prototype.yaml_representers_handlers=[].concat(this.prototype.yaml_representers_handlers)),this.prototype.yaml_representers_types.push(e),this.prototype.yaml_representers_handlers.push(t)},e.add_multi_representer=function(e,t){return this.prototype.hasOwnProperty("yaml_multi_representers_types")||(this.prototype.yaml_multi_representers_types=[].concat(this.prototype.yaml_multi_representers_types)),this.prototype.hasOwnProperty("yaml_multi_representers_handlers")||(this.prototype.yaml_multi_representers_handlers=[].concat(this.prototype.yaml_multi_representers_handlers)),this.prototype.yaml_multi_representers_types.push(e),this.prototype.yaml_multi_representers_handlers.push(t)},e.prototype.represent=function(e){var t;return t=this.represent_data(e),this.serialize(t),this.represented_objects={},this.object_keeper=[],this.alias_key=null},e.prototype.represent_data=function(e){var t,n,i,o,a,s,u;if(this.ignore_aliases(e))this.alias_key=null;else if(-1!==(n=this.object_keeper.indexOf(e))){if(this.alias_key=n,this.alias_key in this.represented_objects)return this.represented_objects[this.alias_key]}else this.alias_key=this.object_keeper.length,this.object_keeper.push(e);if(s=null,t=null===e?"null":typeof e,"object"===t&&(t=e.constructor),-1!==(n=this.yaml_representers_types.lastIndexOf(t))&&(s=this.yaml_representers_handlers[n]),null==s)for(a=this.yaml_multi_representers_types,n=i=0,o=a.length;i<o;n=++i)if(u=a[n],e instanceof u){s=this.yaml_multi_representers_handlers[n];break}return null==s&&(-1!==(n=this.yaml_multi_representers_types.lastIndexOf(void 0))?s=this.yaml_multi_representers_handlers[n]:-1!==(n=this.yaml_representers_types.lastIndexOf(void 0))&&(s=this.yaml_representers_handlers[n])),null!=s?s.call(this,e):new r.ScalarNode(null,""+e)},e.prototype.represent_scalar=function(e,t,n){var i;return null==n&&(n=this.default_style),i=new r.ScalarNode(e,t,null,null,n),null!=this.alias_key&&(this.represented_objects[this.alias_key]=i),i},e.prototype.represent_sequence=function(e,t,n){var i,o,a,s,u,l,c,p;for(p=[],u=new r.SequenceNode(e,p,null,null,n),null!=this.alias_key&&(this.represented_objects[this.alias_key]=u),i=!0,a=0,s=t.length;a<s;a++)o=t[a],l=this.represent_data(o),l instanceof r.ScalarNode||l.style||(i=!1),p.push(l);return null==n&&(u.flow_style=null!=(c=this.default_flow_style)?c:i),u},e.prototype.represent_mapping=function(e,t,n){var i,a,s,u,l,c,p,f;f=[],u=new r.MappingNode(e,f,n),this.alias_key&&(this.represented_objects[this.alias_key]=u),i=!0;for(a in t)o.call(t,a)&&(s=t[a],l=this.represent_data(a),c=this.represent_data(s),l instanceof r.ScalarNode||l.style||(i=!1),c instanceof r.ScalarNode||c.style||(i=!1),f.push([l,c]));return n||(u.flow_style=null!=(p=this.default_flow_style)?p:i),u},e.prototype.ignore_aliases=function(e){return!1},e}(),this.Representer=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return i(n,e),n.prototype.represent_boolean=function(e){return this.represent_scalar("tag:yaml.org,2002:bool",e?"true":"false")},n.prototype.represent_null=function(e){return this.represent_scalar("tag:yaml.org,2002:null","null")},n.prototype.represent_number=function(e){var t,n;return t="tag:yaml.org,2002:"+(e%1==0?"int":"float"),n=e!==e?".nan":Infinity===e?".inf":-Infinity===e?"-.inf":e.toString(),this.represent_scalar(t,n)},n.prototype.represent_string=function(e){return this.represent_scalar("tag:yaml.org,2002:str",e)},n.prototype.represent_array=function(e){return this.represent_sequence("tag:yaml.org,2002:seq",e)},n.prototype.represent_date=function(e){return this.represent_scalar("tag:yaml.org,2002:timestamp",e.toISOString())},n.prototype.represent_object=function(e){return this.represent_mapping("tag:yaml.org,2002:map",e)},n.prototype.represent_undefined=function(e){throw new t.RepresenterError("cannot represent an onbject: "+e)},n.prototype.ignore_aliases=function(e){var t;return null==e||("boolean"==(t=typeof e)||"number"===t||"string"===t)},n}(this.BaseRepresenter),this.Representer.add_representer("boolean",this.Representer.prototype.represent_boolean),this.Representer.add_representer("null",this.Representer.prototype.represent_null),this.Representer.add_representer("number",this.Representer.prototype.represent_number),this.Representer.add_representer("string",this.Representer.prototype.represent_string),this.Representer.add_representer(Array,this.Representer.prototype.represent_array),this.Representer.add_representer(Date,this.Representer.prototype.represent_date),this.Representer.add_representer(Object,this.Representer.prototype.represent_object),this.Representer.add_representer(null,this.Representer.prototype.represent_undefined)}).call(this)},function(e,t,n){(function(){var e,t,r,i,o=function(e,t){function n(){this.constructor=e}for(var r in t)a.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},a={}.hasOwnProperty;t=n(127),r=n(94),i=n(61),e=n(45).YAMLError,this.SerializerError=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t}(e),this.Serializer=function(){function e(e){var t;t=null!=e?e:{},this.encoding=t.encoding,this.explicit_start=t.explicit_start,this.explicit_end=t.explicit_end,this.version=t.version,this.tags=t.tags,this.serialized_nodes={},this.anchors={},this.last_anchor_id=0,this.closed=null}return e.prototype.open=function(){if(null===this.closed)return this.emit(new t.StreamStartEvent(this.encoding)),this.closed=!1;throw this.closed?new SerializerError("serializer is closed"):new SerializerError("serializer is already open")},e.prototype.close=function(){if(null===this.closed)throw new SerializerError("serializer is not opened");if(!this.closed)return this.emit(new t.StreamEndEvent),this.closed=!0},e.prototype.serialize=function(e){if(null===this.closed)throw new SerializerError("serializer is not opened");if(this.closed)throw new SerializerError("serializer is closed");return null!=e&&(this.emit(new t.DocumentStartEvent(void 0,void 0,this.explicit_start,this.version,this.tags)),this.anchor_node(e),this.serialize_node(e),this.emit(new t.DocumentEndEvent(void 0,void 0,this.explicit_end))),this.serialized_nodes={},this.anchors={},this.last_anchor_id=0},e.prototype.anchor_node=function(e){var t,n,i,o,a,s,u,l,c,p,f,h,d,m;if(e.unique_id in this.anchors)return null!=(t=this.anchors)[l=e.unique_id]?t[l]:t[l]=this.generate_anchor(e);if(this.anchors[e.unique_id]=null,e instanceof r.SequenceNode){for(c=e.value,h=[],n=0,s=c.length;n<s;n++)i=c[n],h.push(this.anchor_node(i));return h}if(e instanceof r.MappingNode){for(p=e.value,d=[],o=0,u=p.length;o<u;o++)f=p[o],a=f[0],m=f[1],this.anchor_node(a),d.push(this.anchor_node(m));return d}},e.prototype.generate_anchor=function(e){return"id"+i.pad_left(++this.last_anchor_id,"0",4)},e.prototype.serialize_node=function(e,n,i){var o,a,s,u,l,c,p,f,h,d,m,v,g,y;if(o=this.anchors[e.unique_id],e.unique_id in this.serialized_nodes)return this.emit(new t.AliasEvent(o));if(this.serialized_nodes[e.unique_id]=!0,this.descend_resolver(n,i),e instanceof r.ScalarNode)s=this.resolve(r.ScalarNode,e.value,[!0,!1]),a=this.resolve(r.ScalarNode,e.value,[!1,!0]),l=[e.tag===s,e.tag===a],this.emit(new t.ScalarEvent(o,e.tag,l,e.value,void 0,void 0,e.style));else if(e instanceof r.SequenceNode){for(l=e.tag===this.resolve(r.SequenceNode,e.value,!0),this.emit(new t.SequenceStartEvent(o,e.tag,l,void 0,void 0,e.flow_style)),m=e.value,i=u=0,h=m.length;u<h;i=++u)c=m[i],this.serialize_node(c,e,i);this.emit(new t.SequenceEndEvent)}else if(e instanceof r.MappingNode){for(l=e.tag===this.resolve(r.MappingNode,e.value,!0),this.emit(new t.MappingStartEvent(o,e.tag,l,void 0,void 0,e.flow_style)),v=e.value,p=0,d=v.length;p<d;p++)g=v[p],f=g[0],y=g[1],this.serialize_node(f,e,null),this.serialize_node(y,e,f);this.emit(new t.MappingEndEvent)}return this.ascend_resolver()},e}()}).call(this)},function(e,t,n){(function(){var e,r,i;this.composer=n(498),this.constructor=n(499),e=this.dumper=n(1201),this.errors=n(45),this.events=n(127),r=this.loader=n(1203),this.nodes=n(94),this.parser=n(500),this.reader=n(501),this.resolver=n(266),this.scanner=n(502),this.tokens=n(267),i=n(61),this.scan=function(e,t){var n,i;for(null==t&&(t=r.Loader),n=new t(e),i=[];n.check_token();)i.push(n.get_token());return i},this.parse=function(e,t){var n,i;for(null==t&&(t=r.Loader),n=new t(e),i=[];n.check_event();)i.push(n.get_event());return i},this.compose=function(e,t){var n;return null==t&&(t=r.Loader),n=new t(e),n.get_single_node()},this.compose_all=function(e,t){var n,i;for(null==t&&(t=r.Loader),n=new t(e),i=[];n.check_node();)i.push(n.get_node());return i},this.load=function(e,t){var n;return null==t&&(t=r.Loader),n=new t(e),n.get_single_data()},this.load_all=function(e,t){var n,i;for(null==t&&(t=r.Loader),n=new t(e),i=[];n.check_data();)i.push(n.get_data());return i},this.emit=function(t,n,r,o){var a,s,u,l,c;null==r&&(r=e.Dumper),null==o&&(o={}),s=n||new i.StringStream,a=new r(s,o);try{for(l=0,c=t.length;l<c;l++)u=t[l],a.emit(u)}finally{a.dispose()}return n||s.string},this.serialize=function(n,r,i,o){return null==i&&(i=e.Dumper),null==o&&(o={}),t.serialize_all([n],r,i,o)},this.serialize_all=function(t,n,r,o){var a,s,u,l,c;null==r&&(r=e.Dumper),null==o&&(o={}),s=n||new i.StringStream,a=new r(s,o);try{for(a.open(),u=0,l=t.length;u<l;u++)c=t[u],a.serialize(c);a.close()}finally{a.dispose()}return n||s.string},this.dump=function(n,r,i,o){return null==i&&(i=e.Dumper),null==o&&(o={}),t.dump_all([n],r,i,o)},this.dump_all=function(t,n,r,o){var a,s,u,l,c;null==r&&(r=e.Dumper),null==o&&(o={}),s=n||new i.StringStream,a=new r(s,o);try{for(a.open(),l=0,c=t.length;l<c;l++)u=t[l],a.represent(u);a.close()}finally{a.dispose()}return n||s.string}}).call(this)},function(e,t,n){var r,i,o;!function(n,a){i=[],r=a(),void 0!==(o="function"==typeof r?r.apply(t,i):r)&&(e.exports=o)}(0,function(){"use strict";var e=function(e){return"getComputedStyle"in window&&"smooth"===window.getComputedStyle(e)["scroll-behavior"]};if("undefined"==typeof window||!("document"in window))return{};var t=function(t,n,r){n=n||999,r||0===r||(r=9);var i,o=function(e){i=e},a=function(){clearTimeout(i),o(0)},s=function(e){return Math.max(0,t.getTopOf(e)-r)},u=function(r,i,s){if(a(),0===i||i&&i<0||e(t.body))t.toY(r),s&&s();else{var u=t.getY(),l=Math.max(0,r)-u,c=(new Date).getTime();i=i||Math.min(Math.abs(l),n),function e(){o(setTimeout(function(){var n=Math.min(1,((new Date).getTime()-c)/i),r=Math.max(0,Math.floor(u+l*(n<.5?2*n*n:n*(4-2*n)-1)));t.toY(r),n<1&&t.getHeight()+r<t.body.scrollHeight?e():(setTimeout(a,99),s&&s())},9))}()}},l=function(e,t,n){u(s(e),t,n)},c=function(e,n,i){var o=e.getBoundingClientRect().height,a=t.getTopOf(e)+o,c=t.getHeight(),p=t.getY(),f=p+c;s(e)<p||o+r>c?l(e,n,i):a+r>f?u(a-c+r,n,i):i&&i()},p=function(e,n,r,i){u(Math.max(0,t.getTopOf(e)-t.getHeight()/2+(r||e.getBoundingClientRect().height/2)),n,i)};return{setup:function(e,t){return(0===e||e)&&(n=e),(0===t||t)&&(r=t),{defaultDuration:n,edgeOffset:r}},to:l,toY:u,intoView:c,center:p,stop:a,moving:function(){return!!i},getY:t.getY,getTopOf:t.getTopOf}},n=document.documentElement,r=function(){return window.scrollY||n.scrollTop},i=t({body:document.scrollingElement||document.body,toY:function(e){window.scrollTo(0,e)},getY:r,getHeight:function(){return window.innerHeight||n.clientHeight},getTopOf:function(e){return e.getBoundingClientRect().top+r()-n.offsetTop}});if(i.createScroller=function(e,r,i){return t({body:e,toY:function(t){e.scrollTop=t},getY:function(){return e.scrollTop},getHeight:function(){return Math.min(e.clientHeight,window.innerHeight||n.clientHeight)},getTopOf:function(e){return e.offsetTop}},r,i)},"addEventListener"in window&&!window.noZensmooth&&!e(document.body)){var o="scrollRestoration"in history;o&&(history.scrollRestoration="auto"),window.addEventListener("load",function(){o&&(setTimeout(function(){history.scrollRestoration="manual"},9),window.addEventListener("popstate",function(e){e.state&&"zenscrollY"in e.state&&i.toY(e.state.zenscrollY)},!1)),window.location.hash&&setTimeout(function(){var e=i.setup().edgeOffset;if(e){var t=document.getElementById(window.location.href.split("#")[1]);if(t){var n=Math.max(0,i.getTopOf(t)-e),r=i.getY()-n;0<=r&&r<9&&window.scrollTo(0,n)}}},9)},!1);var a=new RegExp("(^|\\s)noZensmooth(\\s|$)");window.addEventListener("click",function(e){for(var t=e.target;t&&"A"!==t.tagName;)t=t.parentNode;if(!(!t||1!==e.which||e.shiftKey||e.metaKey||e.ctrlKey||e.altKey)){if(o)try{history.replaceState({zenscrollY:i.getY()},"")}catch(e){}var n=t.getAttribute("href")||"";if(0===n.indexOf("#")&&!a.test(t.className)){var r=0,s=document.getElementById(n.substring(1));if("#"!==n){if(!s)return;r=i.getTopOf(s)}e.preventDefault();var u=function(){window.location=n},l=i.setup().edgeOffset;l&&(r=Math.max(0,r-l),u=function(){history.pushState(null,"",n)}),i.toY(r,null,u)}}},!1)}return i})},function(e,t,n){function r(e){return n(i(e))}function i(e){var t=o[e];if(!(t+1))throw new Error("Cannot find module '"+e+"'.");return t}var o={"./all.js":271,"./ast/ast.js":272,"./ast/index.js":273,"./ast/jump-to-path.jsx":274,"./auth/actions.js":168,"./auth/index.js":275,"./auth/reducers.js":276,"./auth/selectors.js":277,"./auth/spec-wrap-actions.js":278,"./configs/actions.js":169,"./configs/index.js":279,"./configs/reducers.js":280,"./configs/selectors.js":281,"./deep-linking/helpers.js":282,"./deep-linking/index.js":283,"./deep-linking/layout-wrap-actions.js":284,"./deep-linking/spec-wrap-actions.js":285,"./download-url.js":286,"./err/actions.js":128,"./err/error-transformers/hook.js":287,"./err/error-transformers/transformers/not-of-type.js":288,"./err/error-transformers/transformers/parameter-oneof.js":289,"./err/error-transformers/transformers/strip-instance.js":290,"./err/index.js":291,"./err/reducers.js":292,"./err/selectors.js":293,"./layout/actions.js":170,"./layout/index.js":294,"./layout/reducers.js":295,"./layout/selectors.js":296,"./logs/index.js":297,"./oas3/actions.js":171,"./oas3/auth-extensions/wrap-selectors.js":298,"./oas3/components/callbacks.jsx":299,"./oas3/components/http-auth.jsx":300,"./oas3/components/index.js":301,"./oas3/components/operation-link.jsx":302,"./oas3/components/operation-servers.jsx":303,"./oas3/components/request-body-editor.jsx":304,"./oas3/components/request-body.jsx":305,"./oas3/components/servers.jsx":306,"./oas3/helpers.js":34,"./oas3/index.js":307,"./oas3/reducers.js":308,"./oas3/selectors.js":309,"./oas3/spec-extensions/selectors.js":310,"./oas3/spec-extensions/wrap-selectors.js":311,"./oas3/wrap-components/auth-item.jsx":312,"./oas3/wrap-components/index.js":313,"./oas3/wrap-components/markdown.js":314,"./oas3/wrap-components/model.jsx":315,"./oas3/wrap-components/online-validator-badge.js":316,"./oas3/wrap-components/parameters.jsx":317,"./oas3/wrap-components/version-stamp.jsx":318,"./samples/fn.js":172,"./samples/index.js":319,"./spec/actions.js":173,"./spec/index.js":320,"./spec/reducers.js":321,"./spec/selectors.js":322,"./spec/wrap-actions.js":323,"./split-pane-mode/components/split-pane-mode.jsx":324,"./split-pane-mode/index.js":325,"./swagger-js/index.js":326,"./util/index.js":327,"./view/index.js":328,"./view/root-injects.js":329};r.keys=function(){return Object.keys(o)},r.resolve=i,e.exports=r,r.id=1208},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){n(505),e.exports=n(504)}])}); -//# sourceMappingURL=swagger-ui-bundle.js.map \ No newline at end of file +//# sourceMappingURL=swagger-ui-bundle.js.map diff --git a/app/code/Magento/Swagger/view/frontend/web/swagger-ui/js/swagger-ui-standalone-preset.min.js b/app/code/Magento/Swagger/view/frontend/web/swagger-ui/js/swagger-ui-standalone-preset.min.js index b24fd08faf240..cd5a1d0859910 100644 --- a/app/code/Magento/Swagger/view/frontend/web/swagger-ui/js/swagger-ui-standalone-preset.min.js +++ b/app/code/Magento/Swagger/view/frontend/web/swagger-ui/js/swagger-ui-standalone-preset.min.js @@ -10,4 +10,4 @@ var i=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,s=Object.pr * @license MIT */ var V=n(134),$=n(232),Z=n(234);e.Buffer=o,e.SlowBuffer=m,e.INSPECT_MAX_BYTES=50,o.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=r(),o.poolSize=8192,o._augment=function(t){return t.__proto__=o.prototype,t},o.from=function(t,e,n){return s(null,t,e,n)},o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0})),o.alloc=function(t,e,n){return u(null,t,e,n)},o.allocUnsafe=function(t){return c(null,t)},o.allocUnsafeSlow=function(t){return c(null,t)},o.isBuffer=function(t){return!(null==t||!t._isBuffer)},o.compare=function(t,e){if(!o.isBuffer(t)||!o.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,i=0,s=Math.min(n,r);i<s;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},o.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(t,e){if(!Z(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return o.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=o.allocUnsafe(e),i=0;for(n=0;n<t.length;++n){var s=t[n];if(!o.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,i),i+=s.length}return r},o.byteLength=y,o.prototype._isBuffer=!0,o.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)x(this,e,e+1);return this},o.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)x(this,e,e+3),x(this,e+1,e+2);return this},o.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)x(this,e,e+7),x(this,e+1,e+6),x(this,e+2,e+5),x(this,e+3,e+4);return this},o.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?F(this,0,t):v.apply(this,arguments)},o.prototype.equals=function(t){if(!o.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===o.compare(this,t)},o.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),"<Buffer "+t+">"},o.prototype.compare=function(t,e,n,r,i){if(!o.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,r>>>=0,i>>>=0,this===t)return 0;for(var s=i-r,a=n-e,u=Math.min(s,a),c=this.slice(r,i),h=t.slice(e,n),l=0;l<u;++l)if(c[l]!==h[l]){s=c[l],a=h[l];break}return s<a?-1:a<s?1:0},o.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},o.prototype.indexOf=function(t,e,n){return g(this,t,e,n,!0)},o.prototype.lastIndexOf=function(t,e,n){return g(this,t,e,n,!1)},o.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return E(this,t,e,n);case"utf8":case"utf-8":return A(this,t,e,n);case"ascii":return S(this,t,e,n);case"latin1":case"binary":return w(this,t,e,n);case"base64":return C(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;o.prototype.slice=function(t,e){var n=this.length;t=~~t,e=void 0===e?n:~~e,t<0?(t+=n)<0&&(t=0):t>n&&(t=n),e<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t);var r;if(o.TYPED_ARRAY_SUPPORT)r=this.subarray(t,e),r.__proto__=o.prototype;else{var i=e-t;r=new o(i,void 0);for(var s=0;s<i;++s)r[s]=this[s+t]}return r},o.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||P(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r},o.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||P(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},o.prototype.readUInt8=function(t,e){return e||P(t,1,this.length),this[t]},o.prototype.readUInt16LE=function(t,e){return e||P(t,2,this.length),this[t]|this[t+1]<<8},o.prototype.readUInt16BE=function(t,e){return e||P(t,2,this.length),this[t]<<8|this[t+1]},o.prototype.readUInt32LE=function(t,e){return e||P(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},o.prototype.readUInt32BE=function(t,e){return e||P(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},o.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||P(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*e)),r},o.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||P(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},o.prototype.readInt8=function(t,e){return e||P(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},o.prototype.readInt16LE=function(t,e){e||P(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt16BE=function(t,e){e||P(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt32LE=function(t,e){return e||P(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},o.prototype.readInt32BE=function(t,e){return e||P(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},o.prototype.readFloatLE=function(t,e){return e||P(t,4,this.length),$.read(this,t,!0,23,4)},o.prototype.readFloatBE=function(t,e){return e||P(t,4,this.length),$.read(this,t,!1,23,4)},o.prototype.readDoubleLE=function(t,e){return e||P(t,8,this.length),$.read(this,t,!0,52,8)},o.prototype.readDoubleBE=function(t,e){return e||P(t,8,this.length),$.read(this,t,!1,52,8)},o.prototype.writeUIntLE=function(t,e,n,r){if(t=+t,e|=0,n|=0,!r){N(this,t,e,n,Math.pow(2,8*n)-1,0)}var i=1,o=0;for(this[e]=255&t;++o<n&&(i*=256);)this[e+o]=t/i&255;return e+n},o.prototype.writeUIntBE=function(t,e,n,r){if(t=+t,e|=0,n|=0,!r){N(this,t,e,n,Math.pow(2,8*n)-1,0)}var i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},o.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,1,255,0),o.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},o.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):O(this,t,e,!0),e+2},o.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):O(this,t,e,!1),e+2},o.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):R(this,t,e,!0),e+4},o.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):R(this,t,e,!1),e+4},o.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);N(this,t,e,n,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o<n&&(s*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+n},o.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);N(this,t,e,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+n},o.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,1,127,-128),o.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},o.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):O(this,t,e,!0),e+2},o.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):O(this,t,e,!1),e+2},o.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):R(this,t,e,!0),e+4},o.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):R(this,t,e,!1),e+4},o.prototype.writeFloatLE=function(t,e,n){return j(this,t,e,!0,n)},o.prototype.writeFloatBE=function(t,e,n){return j(this,t,e,!1,n)},o.prototype.writeDoubleLE=function(t,e,n){return L(this,t,e,!0,n)},o.prototype.writeDoubleBE=function(t,e,n){return L(this,t,e,!1,n)},o.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var i,s=r-n;if(this===t&&n<e&&e<r)for(i=s-1;i>=0;--i)t[i+e]=this[i+n];else if(s<1e3||!o.TYPED_ARRAY_SUPPORT)for(i=0;i<s;++i)t[i+e]=this[i+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+s),e);return s},o.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!o.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0);var s;if("number"==typeof t)for(s=e;s<n;++s)this[s]=t;else{var a=o.isBuffer(t)?t:q(new o(t,r).toString()),u=a.length;for(s=0;s<n-e;++s)this[s+e]=a[s%u]}return this};var tt=/[^+\/0-9A-Za-z-_]/g}).call(e,n(274))},function(t,e,n){n(215),n(219),n(226),n(108),n(210),n(211),n(216),n(220),n(222),n(206),n(207),n(208),n(209),n(212),n(213),n(214),n(217),n(218),n(221),n(223),n(224),n(225),n(202),n(203),n(204),n(205),t.exports=n(13).String},function(t,e,n){n(200),n(108),n(229),n(201),n(227),n(228),t.exports=n(13).Promise},function(t,e,n){n(93),n(92),t.exports=n(164)},function(t,e,n){n(166);var r=n(5).Object;t.exports=function(t,e){return r.create(t,e)}},function(t,e,n){n(167);var r=n(5).Object;t.exports=function(t,e,n){return r.defineProperty(t,e,n)}},function(t,e,n){n(168),t.exports=n(5).Object.getPrototypeOf},function(t,e,n){n(169),t.exports=n(5).Object.setPrototypeOf},function(t,e,n){n(171),n(170),n(172),n(173),t.exports=n(5).Symbol},function(t,e,n){n(92),n(93),t.exports=n(62).f("iterator")},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){t.exports=function(){}},function(t,e,n){var r=n(20),i=n(162),o=n(161);t.exports=function(t){return function(e,n,s){var a,u=r(e),c=i(u.length),h=o(s,c);if(t&&n!=n){for(;c>h;)if((a=u[h++])!=a)return!0}else for(;c>h;h++)if((t||h in u)&&u[h]===n)return t||h||0;return!t&&-1}}},function(t,e,n){var r=n(49),i=n(7)("toStringTag"),o="Arguments"==r(function(){return arguments}()),s=function(t,e){try{return t[e]}catch(t){}};t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=s(e=Object(t),i))?n:o?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},function(t,e,n){var r=n(54),i=n(87),o=n(55);t.exports=function(t){var e=r(t),n=i.f;if(n)for(var s,a=n(t),u=o.f,c=0;a.length>c;)u.call(t,s=a[c++])&&e.push(s);return e}},function(t,e,n){var r=n(6).document;t.exports=r&&r.documentElement},function(t,e,n){var r=n(49);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){var r=n(49);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){"use strict";var r=n(53),i=n(37),o=n(56),s={};n(18)(s,n(7)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(s,{next:i(1,n)}),o(t,e+" Iterator")}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){var r=n(38)("meta"),i=n(19),o=n(10),s=n(11).f,a=0,u=Object.isExtensible||function(){return!0},c=!n(26)(function(){return u(Object.preventExtensions({}))}),h=function(t){s(t,r,{value:{i:"O"+ ++a,w:{}}})},l=function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,r)){if(!u(t))return"F";if(!e)return"E";h(t)}return t[r].i},p=function(t,e){if(!o(t,r)){if(!u(t))return!0;if(!e)return!1;h(t)}return t[r].w},f=function(t){return c&&d.NEED&&u(t)&&!o(t,r)&&h(t),t},d=t.exports={KEY:r,NEED:!1,fastKey:l,getWeak:p,onFreeze:f}},function(t,e,n){var r=n(11),i=n(16),o=n(54);t.exports=n(9)?Object.defineProperties:function(t,e){i(t);for(var n,s=o(e),a=s.length,u=0;a>u;)r.f(t,n=s[u++],e[n]);return t}},function(t,e,n){var r=n(20),i=n(86).f,o={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(t){try{return i(t)}catch(t){return s.slice()}};t.exports.f=function(t){return s&&"[object Window]"==o.call(t)?a(t):i(r(t))}},function(t,e,n){var r=n(17),i=n(5),o=n(26);t.exports=function(t,e){var n=(i.Object||{})[t]||Object[t],s={};s[t]=e(n),r(r.S+r.F*o(function(){n(1)}),"Object",s)}},function(t,e,n){var r=n(19),i=n(16),o=function(t,e){if(i(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{r=n(81)(Function.call,n(85).f(Object.prototype,"__proto__").set,2),r(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return o(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:o}},function(t,e,n){var r=n(59),i=n(50);t.exports=function(t){return function(e,n){var o,s,a=String(i(e)),u=r(n),c=a.length;return u<0||u>=c?t?"":void 0:(o=a.charCodeAt(u),o<55296||o>56319||u+1===c||(s=a.charCodeAt(u+1))<56320||s>57343?t?a.charAt(u):o:t?a.slice(u,u+2):s-56320+(o-55296<<10)+65536)}}},function(t,e,n){var r=n(59),i=Math.max,o=Math.min;t.exports=function(t,e){return t=r(t),t<0?i(t+e,0):o(t,e)}},function(t,e,n){var r=n(59),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,e,n){var r=n(148),i=n(7)("iterator"),o=n(36);t.exports=n(5).getIteratorMethod=function(t){if(void 0!=t)return t[i]||t["@@iterator"]||o[r(t)]}},function(t,e,n){var r=n(16),i=n(163);t.exports=n(5).getIterator=function(t){var e=i(t);if("function"!=typeof e)throw TypeError(t+" is not iterable!");return r(e.call(t))}},function(t,e,n){"use strict";var r=n(146),i=n(154),o=n(36),s=n(20);t.exports=n(84)(Array,"Array",function(t,e){this._t=s(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):"keys"==e?i(0,n):"values"==e?i(0,t[n]):i(0,[n,t[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(t,e,n){var r=n(17);r(r.S,"Object",{create:n(53)})},function(t,e,n){var r=n(17);r(r.S+r.F*!n(9),"Object",{defineProperty:n(11).f})},function(t,e,n){var r=n(91),i=n(88);n(158)("getPrototypeOf",function(){return function(t){return i(r(t))}})},function(t,e,n){var r=n(17);r(r.S,"Object",{setPrototypeOf:n(159).set})},function(t,e){},function(t,e,n){"use strict";var r=n(6),i=n(10),o=n(9),s=n(17),a=n(90),u=n(155).KEY,c=n(26),h=n(58),l=n(56),p=n(38),f=n(7),d=n(62),m=n(61),y=n(149),v=n(152),x=n(16),g=n(19),D=n(20),E=n(60),A=n(37),S=n(53),w=n(157),C=n(85),_=n(11),b=n(54),F=C.f,k=_.f,I=w.f,T=r.Symbol,B=r.JSON,M=B&&B.stringify,P=f("_hidden"),N=f("toPrimitive"),O={}.propertyIsEnumerable,R=h("symbol-registry"),U=h("symbols"),j=h("op-symbols"),L=Object.prototype,z="function"==typeof T,J=r.QObject,X=!J||!J.prototype||!J.prototype.findChild,q=o&&c(function(){return 7!=S(k({},"a",{get:function(){return k(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=F(L,e);r&&delete L[e],k(t,e,n),r&&t!==L&&k(L,e,r)}:k,K=function(t){var e=U[t]=S(T.prototype);return e._k=t,e},Y=z&&"symbol"==typeof T.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof T},W=function(t,e,n){return t===L&&W(j,e,n),x(t),e=E(e,!0),x(n),i(U,e)?(n.enumerable?(i(t,P)&&t[P][e]&&(t[P][e]=!1),n=S(n,{enumerable:A(0,!1)})):(i(t,P)||k(t,P,A(1,{})),t[P][e]=!0),q(t,e,n)):k(t,e,n)},G=function(t,e){x(t);for(var n,r=y(e=D(e)),i=0,o=r.length;o>i;)W(t,n=r[i++],e[n]);return t},H=function(t,e){return void 0===e?S(t):G(S(t),e)},V=function(t){var e=O.call(this,t=E(t,!0));return!(this===L&&i(U,t)&&!i(j,t))&&(!(e||!i(this,t)||!i(U,t)||i(this,P)&&this[P][t])||e)},$=function(t,e){if(t=D(t),e=E(e,!0),t!==L||!i(U,e)||i(j,e)){var n=F(t,e);return!n||!i(U,e)||i(t,P)&&t[P][e]||(n.enumerable=!0),n}},Z=function(t){for(var e,n=I(D(t)),r=[],o=0;n.length>o;)i(U,e=n[o++])||e==P||e==u||r.push(e);return r},Q=function(t){for(var e,n=t===L,r=I(n?j:D(t)),o=[],s=0;r.length>s;)!i(U,e=r[s++])||n&&!i(L,e)||o.push(U[e]);return o};z||(T=function(){if(this instanceof T)throw TypeError("Symbol is not a constructor!");var t=p(arguments.length>0?arguments[0]:void 0),e=function(n){this===L&&e.call(j,n),i(this,P)&&i(this[P],t)&&(this[P][t]=!1),q(this,t,A(1,n))};return o&&X&&q(L,t,{configurable:!0,set:e}),K(t)},a(T.prototype,"toString",function(){return this._k}),C.f=$,_.f=W,n(86).f=w.f=Z,n(55).f=V,n(87).f=Q,o&&!n(52)&&a(L,"propertyIsEnumerable",V,!0),d.f=function(t){return K(f(t))}),s(s.G+s.W+s.F*!z,{Symbol:T});for(var tt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),et=0;tt.length>et;)f(tt[et++]);for(var nt=b(f.store),rt=0;nt.length>rt;)m(nt[rt++]);s(s.S+s.F*!z,"Symbol",{for:function(t){return i(R,t+="")?R[t]:R[t]=T(t)},keyFor:function(t){if(!Y(t))throw TypeError(t+" is not a symbol!");for(var e in R)if(R[e]===t)return e},useSetter:function(){X=!0},useSimple:function(){X=!1}}),s(s.S+s.F*!z,"Object",{create:H,defineProperty:W,defineProperties:G,getOwnPropertyDescriptor:$,getOwnPropertyNames:Z,getOwnPropertySymbols:Q}),B&&s(s.S+s.F*(!z||c(function(){var t=T();return"[null]"!=M([t])||"{}"!=M({a:t})||"{}"!=M(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=e=r[1],(g(e)||void 0!==t)&&!Y(t))return v(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!Y(e))return e}),r[1]=e,M.apply(B,r)}}),T.prototype[N]||n(18)(T.prototype,N,T.prototype.valueOf),l(T,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},function(t,e,n){n(61)("asyncIterator")},function(t,e,n){n(61)("observable")},function(t,e,n){var r=n(1)("unscopables"),i=Array.prototype;void 0==i[r]&&n(14)(i,r,{}),t.exports=function(t){i[r][t]=!0}},function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,e,n){var r=n(44),i=n(32),o=n(107);t.exports=function(t){return function(e,n,s){var a,u=r(e),c=i(u.length),h=o(s,c);if(t&&n!=n){for(;c>h;)if((a=u[h++])!=a)return!0}else for(;c>h;h++)if((t||h in u)&&u[h]===n)return t||h||0;return!t&&-1}}},function(t,e,n){var r=n(40),i=n(182),o=n(181),s=n(12),a=n(32),u=n(198),c={},h={},e=t.exports=function(t,e,n,l,p){var f,d,m,y,v=p?function(){return t}:u(t),x=r(n,l,e?2:1),g=0;if("function"!=typeof v)throw TypeError(t+" is not iterable!");if(o(v)){for(f=a(t.length);f>g;g++)if((y=e?x(s(d=t[g])[0],d[1]):x(t[g]))===c||y===h)return y}else for(m=v.call(t);!(d=m.next()).done;)if((y=i(m,x,d.value,e))===c||y===h)return y};e.BREAK=c,e.RETURN=h},function(t,e,n){t.exports=!n(28)&&!n(29)(function(){return 7!=Object.defineProperty(n(64)("div"),"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},function(t,e,n){var r=n(27);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){var r=n(31),i=n(1)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},function(t,e,n){var r=n(12);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&r(o.call(t)),e}}},function(t,e,n){"use strict";var r=n(187),i=n(102),o=n(67),s={};n(14)(s,n(1)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(s,{next:i(1,n)}),o(t,e+" Iterator")}},function(t,e,n){var r=n(1)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o=[7],s=o[r]();s.next=function(){return{done:n=!0}},o[r]=function(){return s},t(o)}catch(t){}return n}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){var r=n(4),i=n(106).set,o=r.MutationObserver||r.WebKitMutationObserver,s=r.process,a=r.Promise,u="process"==n(27)(s);t.exports=function(){var t,e,n,c=function(){var r,i;for(u&&(r=s.domain)&&r.exit();t;){i=t.fn,t=t.next;try{i()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(u)n=function(){s.nextTick(c)};else if(!o||r.navigator&&r.navigator.standalone)if(a&&a.resolve){var h=a.resolve();n=function(){h.then(c)}}else n=function(){i.call(r,c)};else{var l=!0,p=document.createTextNode("");new o(c).observe(p,{characterData:!0}),n=function(){p.data=l=!l}}return function(r){var i={fn:r,next:void 0};e&&(e.next=i),t||(t=i,n()),e=i}}},function(t,e,n){var r=n(12),i=n(188),o=n(94),s=n(68)("IE_PROTO"),a=function(){},u=function(){var t,e=n(64)("iframe"),r=o.length;for(e.style.display="none",n(95).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write("<script>document.F=Object<\/script>"),t.close(),u=t.F;r--;)delete u.prototype[o[r]];return u()};t.exports=Object.create||function(t,e){var n;return null!==t?(a.prototype=r(t),n=new a,a.prototype=null,n[s]=t):n=u(),void 0===e?n:i(n,e)}},function(t,e,n){var r=n(42),i=n(12),o=n(99);t.exports=n(28)?Object.defineProperties:function(t,e){i(t);for(var n,s=o(e),a=s.length,u=0;a>u;)r.f(t,n=s[u++],e[n]);return t}},function(t,e,n){var r=n(30),i=n(196),o=n(68)("IE_PROTO"),s=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?s:null}},function(t,e,n){var r=n(30),i=n(44),o=n(176)(!1),s=n(68)("IE_PROTO");t.exports=function(t,e){var n,a=i(t),u=0,c=[];for(n in a)n!=s&&r(a,n)&&c.push(n);for(;e.length>u;)r(a,n=e[u++])&&(~o(c,n)||c.push(n));return c}},function(t,e,n){var r=n(22);t.exports=function(t,e,n){for(var i in e)r(t,i,e[i],n);return t}},function(t,e,n){"use strict";var r=n(4),i=n(42),o=n(28),s=n(1)("species");t.exports=function(t){var e=r[t];o&&e&&!e[s]&&i.f(e,s,{configurable:!0,get:function(){return this}})}},function(t,e,n){"use strict";var r=n(43),i=n(8);t.exports=function(t){var e=String(i(this)),n="",o=r(t);if(o<0||o==1/0)throw RangeError("Count can't be negative");for(;o>0;(o>>>=1)&&(e+=e))1&o&&(n+=e);return n}},function(t,e,n){var r=n(2),i=n(8),o=n(29),s=n(195),a="["+s+"]",u="​…",c=RegExp("^"+a+a+"*"),h=RegExp(a+a+"*$"),l=function(t,e,n){var i={},a=o(function(){return!!s[t]()||u[t]()!=u}),c=i[t]=a?e(p):s[t];n&&(i[n]=c),r(r.P+r.F*a,"String",i)},p=l.trim=function(t,e){return t=String(i(t)),1&e&&(t=t.replace(c,"")),2&e&&(t=t.replace(h,"")),t};t.exports=l},function(t,e){t.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},function(t,e,n){var r=n(8);t.exports=function(t){return Object(r(t))}},function(t,e,n){var r=n(21);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var r=n(63),i=n(1)("iterator"),o=n(31);t.exports=n(13).getIteratorMethod=function(t){if(void 0!=t)return t[i]||t["@@iterator"]||o[r(t)]}},function(t,e,n){"use strict";var r=n(174),i=n(185),o=n(31),s=n(44);t.exports=n(97)(Array,"Array",function(t,e){this._t=s(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):"keys"==e?i(0,n):"values"==e?i(0,t[n]):i(0,[n,t[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(t,e,n){"use strict";var r=n(63),i={};i[n(1)("toStringTag")]="z",i+""!="[object z]"&&n(22)(Object.prototype,"toString",function(){return"[object "+r(this)+"]"},!0)},function(t,e,n){"use strict";var r,i,o,s,a=n(98),u=n(4),c=n(40),h=n(63),l=n(2),p=n(21),f=n(39),d=n(175),m=n(177),y=n(104),v=n(106).set,x=n(186)(),g=n(66),D=n(100),E=n(101),A=u.TypeError,S=u.process,w=u.Promise,C="process"==h(S),_=function(){},b=i=g.f,F=!!function(){try{var t=w.resolve(1),e=(t.constructor={})[n(1)("species")]=function(t){t(_,_)};return(C||"function"==typeof PromiseRejectionEvent)&&t.then(_)instanceof e}catch(t){}}(),k=function(t){var e;return!(!p(t)||"function"!=typeof(e=t.then))&&e},I=function(t,e){if(!t._n){t._n=!0;var n=t._c;x(function(){for(var r=t._v,i=1==t._s,o=0;n.length>o;)!function(e){var n,o,s=i?e.ok:e.fail,a=e.resolve,u=e.reject,c=e.domain;try{s?(i||(2==t._h&&M(t),t._h=1),!0===s?n=r:(c&&c.enter(),n=s(r),c&&c.exit()),n===e.promise?u(A("Promise-chain cycle")):(o=k(n))?o.call(n,a,u):a(n)):u(r)}catch(t){u(t)}}(n[o++]);t._c=[],t._n=!1,e&&!t._h&&T(t)})}},T=function(t){v.call(u,function(){var e,n,r,i=t._v,o=B(t);if(o&&(e=D(function(){C?S.emit("unhandledRejection",i,t):(n=u.onunhandledrejection)?n({promise:t,reason:i}):(r=u.console)&&r.error&&r.error("Unhandled promise rejection",i)}),t._h=C||B(t)?2:1),t._a=void 0,o&&e.e)throw e.v})},B=function(t){return 1!==t._h&&0===(t._a||t._c).length},M=function(t){v.call(u,function(){var e;C?S.emit("rejectionHandled",t):(e=u.onrejectionhandled)&&e({promise:t,reason:t._v})})},P=function(t){var e=this;e._d||(e._d=!0,e=e._w||e,e._v=t,e._s=2,e._a||(e._a=e._c.slice()),I(e,!0))},N=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw A("Promise can't be resolved itself");(e=k(t))?x(function(){var r={_w:n,_d:!1};try{e.call(t,c(N,r,1),c(P,r,1))}catch(t){P.call(r,t)}}):(n._v=t,n._s=1,I(n,!1))}catch(t){P.call({_w:n,_d:!1},t)}}};F||(w=function(t){d(this,w,"Promise","_h"),f(t),r.call(this);try{t(c(N,this,1),c(P,this,1))}catch(t){P.call(this,t)}},r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},r.prototype=n(191)(w.prototype,{then:function(t,e){var n=b(y(this,w));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=C?S.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&I(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new r;this.promise=t,this.resolve=c(N,t,1),this.reject=c(P,t,1)},g.f=b=function(t){return t===w||t===s?new o(t):i(t)}),l(l.G+l.W+l.F*!F,{Promise:w}),n(67)(w,"Promise"),n(192)("Promise"),s=n(13).Promise,l(l.S+l.F*!F,"Promise",{reject:function(t){var e=b(this);return(0,e.reject)(t),e.promise}}),l(l.S+l.F*(a||!F),"Promise",{resolve:function(t){return E(a&&this===s?w:this,t)}}),l(l.S+l.F*!(F&&n(184)(function(t){w.all(t).catch(_)})),"Promise",{all:function(t){var e=this,n=b(e),r=n.resolve,i=n.reject,o=D(function(){var n=[],o=0,s=1;m(t,!1,function(t){var a=o++,u=!1;n.push(void 0),s++,e.resolve(t).then(function(t){u||(u=!0,n[a]=t,--s||r(n))},i)}),--s||r(n)});return o.e&&i(o.v),n.promise},race:function(t){var e=this,n=b(e),r=n.reject,i=D(function(){m(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return i.e&&r(i.v),n.promise}})},function(t,e,n){n(41)("match",1,function(t,e,n){return[function(n){"use strict";var r=t(this),i=void 0==n?void 0:n[e];return void 0!==i?i.call(n,r):new RegExp(n)[e](String(r))},n]})},function(t,e,n){n(41)("replace",2,function(t,e,n){return[function(r,i){"use strict";var o=t(this),s=void 0==r?void 0:r[e];return void 0!==s?s.call(r,o,i):n.call(String(o),r,i)},n]})},function(t,e,n){n(41)("search",1,function(t,e,n){return[function(n){"use strict";var r=t(this),i=void 0==n?void 0:n[e];return void 0!==i?i.call(n,r):new RegExp(n)[e](String(r))},n]})},function(t,e,n){n(41)("split",2,function(t,e,r){"use strict";var i=n(96),o=r,s=[].push,a="length";if("c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1)[a]||2!="ab".split(/(?:ab)*/)[a]||4!=".".split(/(.?)(.?)/)[a]||".".split(/()()/)[a]>1||"".split(/.?/)[a]){var u=void 0===/()??/.exec("")[1];r=function(t,e){var n=String(this);if(void 0===t&&0===e)return[];if(!i(t))return o.call(n,t,e);var r,c,h,l,p,f=[],d=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),m=0,y=void 0===e?4294967295:e>>>0,v=new RegExp(t.source,d+"g");for(u||(r=new RegExp("^"+v.source+"$(?!\\s)",d));(c=v.exec(n))&&!((h=c.index+c[0][a])>m&&(f.push(n.slice(m,c.index)),!u&&c[a]>1&&c[0].replace(r,function(){for(p=1;p<arguments[a]-2;p++)void 0===arguments[p]&&(c[p]=void 0)}),c[a]>1&&c.index<n[a]&&s.apply(f,c.slice(1)),l=c[0][a],m=h,f[a]>=y));)v.lastIndex===c.index&&v.lastIndex++;return m===n[a]?!l&&v.test("")||f.push(""):f.push(n.slice(m)),f[a]>y?f.slice(0,y):f}}else"0".split(void 0,0)[a]&&(r=function(t,e){return void 0===t&&0===e?[]:o.call(this,t,e)});return[function(n,i){var o=t(this),s=void 0==n?void 0:n[e];return void 0!==s?s.call(n,o,i):r.call(String(o),n,i)},r]})},function(t,e,n){"use strict";n(3)("anchor",function(t){return function(e){return t(this,"a","name",e)}})},function(t,e,n){"use strict";n(3)("big",function(t){return function(){return t(this,"big","","")}})},function(t,e,n){"use strict";n(3)("blink",function(t){return function(){return t(this,"blink","","")}})},function(t,e,n){"use strict";n(3)("bold",function(t){return function(){return t(this,"b","","")}})},function(t,e,n){"use strict";var r=n(2),i=n(105)(!1);r(r.P,"String",{codePointAt:function(t){return i(this,t)}})},function(t,e,n){"use strict";var r=n(2),i=n(32),o=n(69),s="".endsWith;r(r.P+r.F*n(65)("endsWith"),"String",{endsWith:function(t){var e=o(this,t,"endsWith"),n=arguments.length>1?arguments[1]:void 0,r=i(e.length),a=void 0===n?r:Math.min(i(n),r),u=String(t);return s?s.call(e,u,a):e.slice(a-u.length,a)===u}})},function(t,e,n){"use strict";n(3)("fixed",function(t){return function(){return t(this,"tt","","")}})},function(t,e,n){"use strict";n(3)("fontcolor",function(t){return function(e){return t(this,"font","color",e)}})},function(t,e,n){"use strict";n(3)("fontsize",function(t){return function(e){return t(this,"font","size",e)}})},function(t,e,n){var r=n(2),i=n(107),o=String.fromCharCode,s=String.fromCodePoint;r(r.S+r.F*(!!s&&1!=s.length),"String",{fromCodePoint:function(t){for(var e,n=[],r=arguments.length,s=0;r>s;){if(e=+arguments[s++],i(e,1114111)!==e)throw RangeError(e+" is not a valid code point");n.push(e<65536?o(e):o(55296+((e-=65536)>>10),e%1024+56320))}return n.join("")}})},function(t,e,n){"use strict";var r=n(2),i=n(69);r(r.P+r.F*n(65)("includes"),"String",{includes:function(t){return!!~i(this,t,"includes").indexOf(t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";n(3)("italics",function(t){return function(){return t(this,"i","","")}})},function(t,e,n){"use strict";n(3)("link",function(t){return function(e){return t(this,"a","href",e)}})},function(t,e,n){var r=n(2),i=n(44),o=n(32);r(r.S,"String",{raw:function(t){for(var e=i(t.raw),n=o(e.length),r=arguments.length,s=[],a=0;n>a;)s.push(String(e[a++])),a<r&&s.push(String(arguments[a]));return s.join("")}})},function(t,e,n){var r=n(2);r(r.P,"String",{repeat:n(193)})},function(t,e,n){"use strict";n(3)("small",function(t){return function(){return t(this,"small","","")}})},function(t,e,n){"use strict";var r=n(2),i=n(32),o=n(69),s="".startsWith;r(r.P+r.F*n(65)("startsWith"),"String",{startsWith:function(t){var e=o(this,t,"startsWith"),n=i(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return s?s.call(e,r,n):e.slice(n,n+r.length)===r}})},function(t,e,n){"use strict";n(3)("strike",function(t){return function(){return t(this,"strike","","")}})},function(t,e,n){"use strict";n(3)("sub",function(t){return function(){return t(this,"sub","","")}})},function(t,e,n){"use strict";n(3)("sup",function(t){return function(){return t(this,"sup","","")}})},function(t,e,n){"use strict";n(194)("trim",function(t){return function(){return t(this,3)}})},function(t,e,n){"use strict";var r=n(2),i=n(13),o=n(4),s=n(104),a=n(101);r(r.P+r.R,"Promise",{finally:function(t){var e=s(this,i.Promise||o.Promise),n="function"==typeof t;return this.then(n?function(n){return a(e,t()).then(function(){return n})}:t,n?function(n){return a(e,t()).then(function(){throw n})}:t)}})},function(t,e,n){"use strict";var r=n(2),i=n(66),o=n(100);r(r.S,"Promise",{try:function(t){var e=i.f(this),n=o(t);return(n.e?e.reject:e.resolve)(n.v),e.promise}})},function(t,e,n){for(var r=n(199),i=n(99),o=n(22),s=n(4),a=n(14),u=n(31),c=n(1),h=c("iterator"),l=c("toStringTag"),p=u.Array,f={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},d=i(f),m=0;m<d.length;m++){var y,v=d[m],x=f[v],g=s[v],D=g&&g.prototype;if(D&&(D[h]||a(D,h,p),D[l]||a(D,l,v),u[v]=p,x))for(y in r)D[y]||o(D,y,r[y],!0)}},function(t,e,n){"use strict";function r(t){return t}function i(t,e,n){function i(t,e){var n=x.hasOwnProperty(e)?x[e]:null;A.hasOwnProperty(e)&&a("OVERRIDE_BASE"===n,"ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.",e),t&&a("DEFINE_MANY"===n||"DEFINE_MANY_MERGED"===n,"ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",e)}function c(t,n){if(n){a("function"!=typeof n,"ReactClass: You're attempting to use a component class or function as a mixin. Instead, just use a regular object."),a(!e(n),"ReactClass: You're attempting to use a component as a mixin. Instead, just use a regular object.");var r=t.prototype,o=r.__reactAutoBindPairs;n.hasOwnProperty(u)&&g.mixins(t,n.mixins);for(var s in n)if(n.hasOwnProperty(s)&&s!==u){var c=n[s],h=r.hasOwnProperty(s);if(i(h,s),g.hasOwnProperty(s))g[s](t,c);else{var l=x.hasOwnProperty(s),d="function"==typeof c,m=d&&!l&&!h&&!1!==n.autobind;if(m)o.push(s,c),r[s]=c;else if(h){var y=x[s];a(l&&("DEFINE_MANY_MERGED"===y||"DEFINE_MANY"===y),"ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.",y,s),"DEFINE_MANY_MERGED"===y?r[s]=p(r[s],c):"DEFINE_MANY"===y&&(r[s]=f(r[s],c))}else r[s]=c}}}else;}function h(t,e){if(e)for(var n in e){var r=e[n];if(e.hasOwnProperty(n)){var i=n in g;a(!i,'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.',n);var o=n in t;a(!o,"ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",n),t[n]=r}}}function l(t,e){a(t&&e&&"object"==typeof t&&"object"==typeof e,"mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.");for(var n in e)e.hasOwnProperty(n)&&(a(void 0===t[n],"mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.",n),t[n]=e[n]);return t}function p(t,e){return function(){var n=t.apply(this,arguments),r=e.apply(this,arguments);if(null==n)return r;if(null==r)return n;var i={};return l(i,n),l(i,r),i}}function f(t,e){return function(){t.apply(this,arguments),e.apply(this,arguments)}}function d(t,e){var n=e.bind(t);return n}function m(t){for(var e=t.__reactAutoBindPairs,n=0;n<e.length;n+=2){var r=e[n],i=e[n+1];t[r]=d(t,i)}}function y(t){var e=r(function(t,r,i){this.__reactAutoBindPairs.length&&m(this),this.props=t,this.context=r,this.refs=s,this.updater=i||n,this.state=null;var o=this.getInitialState?this.getInitialState():null;a("object"==typeof o&&!Array.isArray(o),"%s.getInitialState(): must return an object or null",e.displayName||"ReactCompositeComponent"),this.state=o});e.prototype=new S,e.prototype.constructor=e,e.prototype.__reactAutoBindPairs=[],v.forEach(c.bind(null,e)),c(e,D),c(e,t),c(e,E),e.getDefaultProps&&(e.defaultProps=e.getDefaultProps()),a(e.prototype.render,"createClass(...): Class specification must implement a `render` method.");for(var i in x)e.prototype[i]||(e.prototype[i]=null);return e}var v=[],x={mixins:"DEFINE_MANY",statics:"DEFINE_MANY",propTypes:"DEFINE_MANY",contextTypes:"DEFINE_MANY",childContextTypes:"DEFINE_MANY",getDefaultProps:"DEFINE_MANY_MERGED",getInitialState:"DEFINE_MANY_MERGED",getChildContext:"DEFINE_MANY_MERGED",render:"DEFINE_ONCE",componentWillMount:"DEFINE_MANY",componentDidMount:"DEFINE_MANY",componentWillReceiveProps:"DEFINE_MANY",shouldComponentUpdate:"DEFINE_ONCE",componentWillUpdate:"DEFINE_MANY",componentDidUpdate:"DEFINE_MANY",componentWillUnmount:"DEFINE_MANY",updateComponent:"OVERRIDE_BASE"},g={displayName:function(t,e){t.displayName=e},mixins:function(t,e){if(e)for(var n=0;n<e.length;n++)c(t,e[n])},childContextTypes:function(t,e){t.childContextTypes=o({},t.childContextTypes,e)},contextTypes:function(t,e){t.contextTypes=o({},t.contextTypes,e)},getDefaultProps:function(t,e){t.getDefaultProps?t.getDefaultProps=p(t.getDefaultProps,e):t.getDefaultProps=e},propTypes:function(t,e){t.propTypes=o({},t.propTypes,e)},statics:function(t,e){h(t,e)},autobind:function(){}},D={componentDidMount:function(){this.__isMounted=!0}},E={componentWillUnmount:function(){this.__isMounted=!1}},A={replaceState:function(t,e){this.updater.enqueueReplaceState(this,t,e)},isMounted:function(){return!!this.__isMounted}},S=function(){};return o(S.prototype,t.prototype,A),y}var o=n(35),s=n(109),a=n(15),u="mixins";t.exports=i},function(t,e,n){!function(e,n){t.exports=n()}(0,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function r(t,e,n){var r=null,i=function(t,e){n&&n(t,e),r&&r.visit(t,e)},o="function"==typeof n?i:null,s=!1;if(e){s="boolean"==typeof e.comment&&e.comment;var h="boolean"==typeof e.attachComment&&e.attachComment;(s||h)&&(r=new a.CommentHandler,r.attach=h,e.comment=!0,o=i)}var l=!1;e&&"string"==typeof e.sourceType&&(l="module"===e.sourceType);var p;p=e&&"boolean"==typeof e.jsx&&e.jsx?new u.JSXParser(t,e,o):new c.Parser(t,e,o);var f=l?p.parseModule():p.parseScript(),d=f;return s&&r&&(d.comments=r.comments),p.config.tokens&&(d.tokens=p.tokens),p.config.tolerant&&(d.errors=p.errorHandler.errors),d}function i(t,e,n){var i=e||{};return i.sourceType="module",r(t,i,n)}function o(t,e,n){var i=e||{};return i.sourceType="script",r(t,i,n)}function s(t,e,n){var r,i=new h.Tokenizer(t,e);r=[];try{for(;;){var o=i.getNextToken();if(!o)break;n&&(o=n(o)),r.push(o)}}catch(t){i.errorHandler.tolerate(t)}return i.errorHandler.tolerant&&(r.errors=i.errors()),r}Object.defineProperty(e,"__esModule",{value:!0});var a=n(1),u=n(3),c=n(8),h=n(15);e.parse=r,e.parseModule=i,e.parseScript=o,e.tokenize=s;var l=n(2);e.Syntax=l.Syntax,e.version="4.0.0"},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=function(){function t(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return t.prototype.insertInnerComments=function(t,e){if(t.type===r.Syntax.BlockStatement&&0===t.body.length){for(var n=[],i=this.leading.length-1;i>=0;--i){var o=this.leading[i];e.end.offset>=o.start&&(n.unshift(o.comment),this.leading.splice(i,1),this.trailing.splice(i,1))}n.length&&(t.innerComments=n)}},t.prototype.findTrailingComments=function(t){var e=[];if(this.trailing.length>0){for(var n=this.trailing.length-1;n>=0;--n){var r=this.trailing[n];r.start>=t.end.offset&&e.unshift(r.comment)}return this.trailing.length=0,e}var i=this.stack[this.stack.length-1];if(i&&i.node.trailingComments){var o=i.node.trailingComments[0];o&&o.range[0]>=t.end.offset&&(e=i.node.trailingComments,delete i.node.trailingComments)}return e},t.prototype.findLeadingComments=function(t){for(var e,n=[];this.stack.length>0;){var r=this.stack[this.stack.length-1];if(!(r&&r.start>=t.start.offset))break;e=r.node,this.stack.pop()}if(e){for(var i=e.leadingComments?e.leadingComments.length:0,o=i-1;o>=0;--o){var s=e.leadingComments[o];s.range[1]<=t.start.offset&&(n.unshift(s),e.leadingComments.splice(o,1))}return e.leadingComments&&0===e.leadingComments.length&&delete e.leadingComments,n}for(var o=this.leading.length-1;o>=0;--o){var r=this.leading[o];r.start<=t.start.offset&&(n.unshift(r.comment),this.leading.splice(o,1))}return n},t.prototype.visitNode=function(t,e){if(!(t.type===r.Syntax.Program&&t.body.length>0)){this.insertInnerComments(t,e);var n=this.findTrailingComments(e),i=this.findLeadingComments(e);i.length>0&&(t.leadingComments=i),n.length>0&&(t.trailingComments=n),this.stack.push({node:t,start:e.start.offset})}},t.prototype.visitComment=function(t,e){var n="L"===t.type[0]?"Line":"Block",r={type:n,value:t.value};if(t.range&&(r.range=t.range),t.loc&&(r.loc=t.loc),this.comments.push(r),this.attach){var i={comment:{type:n,value:t.value,range:[e.start.offset,e.end.offset]},start:e.start.offset};t.loc&&(i.comment.loc=t.loc),t.type=n,this.leading.push(i),this.trailing.push(i)}},t.prototype.visit=function(t,e){"LineComment"===t.type?this.visitComment(t,e):"BlockComment"===t.type?this.visitComment(t,e):this.attach&&this.visitNode(t,e)},t}();e.CommentHandler=i},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(t,e,n){"use strict";function r(t){var e;switch(t.type){case a.JSXSyntax.JSXIdentifier:e=t.name;break;case a.JSXSyntax.JSXNamespacedName:var n=t;e=r(n.namespace)+":"+r(n.name);break;case a.JSXSyntax.JSXMemberExpression:var i=t;e=r(i.object)+"."+r(i.property)}return e}var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(4),s=n(5),a=n(6),u=n(7),c=n(8),h=n(13),l=n(14);h.TokenName[100]="JSXIdentifier",h.TokenName[101]="JSXText";var p=function(t){function e(e,n,r){return t.call(this,e,n,r)||this}return i(e,t),e.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():t.prototype.parsePrimaryExpression.call(this)},e.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.line,this.scanner.lineStart=this.startMarker.index-this.startMarker.column},e.prototype.finishJSX=function(){this.nextToken()},e.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},e.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},e.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},e.prototype.scanXHTMLEntity=function(t){for(var e="&",n=!0,r=!1,i=!1,s=!1;!this.scanner.eof()&&n&&!r;){var a=this.scanner.source[this.scanner.index];if(a===t)break;if(r=";"===a,e+=a,++this.scanner.index,!r)switch(e.length){case 2:i="#"===a;break;case 3:i&&(s="x"===a,n=s||o.Character.isDecimalDigit(a.charCodeAt(0)),i=i&&!s);break;default:n=n&&!(i&&!o.Character.isDecimalDigit(a.charCodeAt(0))),n=n&&!(s&&!o.Character.isHexDigit(a.charCodeAt(0)))}}if(n&&r&&e.length>2){var u=e.substr(1,e.length-2);i&&u.length>1?e=String.fromCharCode(parseInt(u.substr(1),10)):s&&u.length>2?e=String.fromCharCode(parseInt("0"+u.substr(1),16)):i||s||!l.XHTMLEntities[u]||(e=l.XHTMLEntities[u])}return e},e.prototype.lexJSX=function(){var t=this.scanner.source.charCodeAt(this.scanner.index);if(60===t||62===t||47===t||58===t||61===t||123===t||125===t){var e=this.scanner.source[this.scanner.index++];return{type:7,value:e,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index}}if(34===t||39===t){for(var n=this.scanner.index,r=this.scanner.source[this.scanner.index++],i="";!this.scanner.eof();){var s=this.scanner.source[this.scanner.index++];if(s===r)break;i+="&"===s?this.scanXHTMLEntity(r):s}return{type:8,value:i,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:n,end:this.scanner.index}}if(46===t){var a=this.scanner.source.charCodeAt(this.scanner.index+1),u=this.scanner.source.charCodeAt(this.scanner.index+2),e=46===a&&46===u?"...":".",n=this.scanner.index;return this.scanner.index+=e.length,{type:7,value:e,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:n,end:this.scanner.index}}if(96===t)return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(o.Character.isIdentifierStart(t)&&92!==t){var n=this.scanner.index;for(++this.scanner.index;!this.scanner.eof();){var s=this.scanner.source.charCodeAt(this.scanner.index);if(o.Character.isIdentifierPart(s)&&92!==s)++this.scanner.index;else{if(45!==s)break;++this.scanner.index}}return{type:100,value:this.scanner.source.slice(n,this.scanner.index),lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:n,end:this.scanner.index}}return this.scanner.lex()},e.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;var t=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(t)),t},e.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;for(var t=this.scanner.index,e="";!this.scanner.eof();){var n=this.scanner.source[this.scanner.index];if("{"===n||"<"===n)break;++this.scanner.index,e+=n,o.Character.isLineTerminator(n.charCodeAt(0))&&(++this.scanner.lineNumber,"\r"===n&&"\n"===this.scanner.source[this.scanner.index]&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart;var r={type:101,value:e,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index};return e.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(r)),r},e.prototype.peekJSXToken=function(){var t=this.scanner.saveState();this.scanner.scanComments();var e=this.lexJSX();return this.scanner.restoreState(t),e},e.prototype.expectJSX=function(t){var e=this.nextJSXToken();7===e.type&&e.value===t||this.throwUnexpectedToken(e)},e.prototype.matchJSX=function(t){var e=this.peekJSXToken();return 7===e.type&&e.value===t},e.prototype.parseJSXIdentifier=function(){var t=this.createJSXNode(),e=this.nextJSXToken();return 100!==e.type&&this.throwUnexpectedToken(e),this.finalize(t,new s.JSXIdentifier(e.value))},e.prototype.parseJSXElementName=function(){var t=this.createJSXNode(),e=this.parseJSXIdentifier();if(this.matchJSX(":")){var n=e;this.expectJSX(":");var r=this.parseJSXIdentifier();e=this.finalize(t,new s.JSXNamespacedName(n,r))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var i=e;this.expectJSX(".");var o=this.parseJSXIdentifier();e=this.finalize(t,new s.JSXMemberExpression(i,o))}return e},e.prototype.parseJSXAttributeName=function(){var t,e=this.createJSXNode(),n=this.parseJSXIdentifier();if(this.matchJSX(":")){var r=n;this.expectJSX(":");var i=this.parseJSXIdentifier();t=this.finalize(e,new s.JSXNamespacedName(r,i))}else t=n;return t},e.prototype.parseJSXStringLiteralAttribute=function(){var t=this.createJSXNode(),e=this.nextJSXToken();8!==e.type&&this.throwUnexpectedToken(e);var n=this.getTokenRaw(e);return this.finalize(t,new u.Literal(e.value,n))},e.prototype.parseJSXExpressionAttribute=function(){var t=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var e=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(t,new s.JSXExpressionContainer(e))},e.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},e.prototype.parseJSXNameValueAttribute=function(){var t=this.createJSXNode(),e=this.parseJSXAttributeName(),n=null;return this.matchJSX("=")&&(this.expectJSX("="),n=this.parseJSXAttributeValue()),this.finalize(t,new s.JSXAttribute(e,n))},e.prototype.parseJSXSpreadAttribute=function(){var t=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var e=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(t,new s.JSXSpreadAttribute(e))},e.prototype.parseJSXAttributes=function(){for(var t=[];!this.matchJSX("/")&&!this.matchJSX(">");){var e=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();t.push(e)}return t},e.prototype.parseJSXOpeningElement=function(){var t=this.createJSXNode();this.expectJSX("<");var e=this.parseJSXElementName(),n=this.parseJSXAttributes(),r=this.matchJSX("/");return r&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(t,new s.JSXOpeningElement(e,r,n))},e.prototype.parseJSXBoundaryElement=function(){var t=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var e=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(t,new s.JSXClosingElement(e))}var n=this.parseJSXElementName(),r=this.parseJSXAttributes(),i=this.matchJSX("/");return i&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(t,new s.JSXOpeningElement(n,i,r))},e.prototype.parseJSXEmptyExpression=function(){var t=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.finalize(t,new s.JSXEmptyExpression)},e.prototype.parseJSXExpressionContainer=function(){var t=this.createJSXNode();this.expectJSX("{");var e;return this.matchJSX("}")?(e=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),e=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(t,new s.JSXExpressionContainer(e))},e.prototype.parseJSXChildren=function(){for(var t=[];!this.scanner.eof();){var e=this.createJSXChildNode(),n=this.nextJSXText();if(n.start<n.end){var r=this.getTokenRaw(n),i=this.finalize(e,new s.JSXText(n.value,r));t.push(i)}if("{"!==this.scanner.source[this.scanner.index])break;var o=this.parseJSXExpressionContainer();t.push(o)}return t},e.prototype.parseComplexJSXElement=function(t){for(var e=[];!this.scanner.eof();){t.children=t.children.concat(this.parseJSXChildren());var n=this.createJSXChildNode(),i=this.parseJSXBoundaryElement();if(i.type===a.JSXSyntax.JSXOpeningElement){var o=i;if(o.selfClosing){var u=this.finalize(n,new s.JSXElement(o,[],null));t.children.push(u)}else e.push(t),t={node:n,opening:o,closing:null,children:[]}}if(i.type===a.JSXSyntax.JSXClosingElement){t.closing=i;var c=r(t.opening.name);if(c!==r(t.closing.name)&&this.tolerateError("Expected corresponding JSX closing tag for %0",c),!(e.length>0))break;var u=this.finalize(t.node,new s.JSXElement(t.opening,t.children,t.closing));t=e[e.length-1],t.children.push(u),e.pop()}}return t},e.prototype.parseJSXElement=function(){var t=this.createJSXNode(),e=this.parseJSXOpeningElement(),n=[],r=null;if(!e.selfClosing){var i=this.parseComplexJSXElement({node:t,opening:e,closing:r,children:n});n=i.children,r=i.closing}return this.finalize(t,new s.JSXElement(e,n,r))},e.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var t=this.parseJSXElement();return this.finishJSX(),t},e.prototype.isStartOfExpression=function(){return t.prototype.isStartOfExpression.call(this)||this.match("<")},e}(c.Parser);e.JSXParser=p},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};e.Character={fromCodePoint:function(t){return t<65536?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10))+String.fromCharCode(56320+(t-65536&1023))},isWhiteSpace:function(t){return 32===t||9===t||11===t||12===t||160===t||t>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(t)>=0},isLineTerminator:function(t){return 10===t||13===t||8232===t||8233===t},isIdentifierStart:function(t){return 36===t||95===t||t>=65&&t<=90||t>=97&&t<=122||92===t||t>=128&&n.NonAsciiIdentifierStart.test(e.Character.fromCodePoint(t))},isIdentifierPart:function(t){return 36===t||95===t||t>=65&&t<=90||t>=97&&t<=122||t>=48&&t<=57||92===t||t>=128&&n.NonAsciiIdentifierPart.test(e.Character.fromCodePoint(t))},isDecimalDigit:function(t){return t>=48&&t<=57},isHexDigit:function(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102},isOctalDigit:function(t){return t>=48&&t<=55}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(6),i=function(){function t(t){this.type=r.JSXSyntax.JSXClosingElement,this.name=t}return t}();e.JSXClosingElement=i;var o=function(){function t(t,e,n){this.type=r.JSXSyntax.JSXElement,this.openingElement=t,this.children=e,this.closingElement=n}return t}();e.JSXElement=o;var s=function(){function t(){this.type=r.JSXSyntax.JSXEmptyExpression}return t}();e.JSXEmptyExpression=s;var a=function(){function t(t){this.type=r.JSXSyntax.JSXExpressionContainer,this.expression=t}return t}();e.JSXExpressionContainer=a;var u=function(){function t(t){this.type=r.JSXSyntax.JSXIdentifier,this.name=t}return t}();e.JSXIdentifier=u;var c=function(){function t(t,e){this.type=r.JSXSyntax.JSXMemberExpression,this.object=t,this.property=e}return t}();e.JSXMemberExpression=c;var h=function(){function t(t,e){this.type=r.JSXSyntax.JSXAttribute,this.name=t,this.value=e}return t}();e.JSXAttribute=h;var l=function(){function t(t,e){this.type=r.JSXSyntax.JSXNamespacedName,this.namespace=t,this.name=e}return t}();e.JSXNamespacedName=l;var p=function(){function t(t,e,n){this.type=r.JSXSyntax.JSXOpeningElement,this.name=t,this.selfClosing=e,this.attributes=n}return t}();e.JSXOpeningElement=p;var f=function(){function t(t){this.type=r.JSXSyntax.JSXSpreadAttribute,this.argument=t}return t}();e.JSXSpreadAttribute=f;var d=function(){function t(t,e){this.type=r.JSXSyntax.JSXText,this.value=t,this.raw=e}return t}();e.JSXText=d},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=function(){function t(t){this.type=r.Syntax.ArrayExpression,this.elements=t}return t}();e.ArrayExpression=i;var o=function(){function t(t){this.type=r.Syntax.ArrayPattern,this.elements=t}return t}();e.ArrayPattern=o;var s=function(){function t(t,e,n){this.type=r.Syntax.ArrowFunctionExpression,this.id=null,this.params=t,this.body=e,this.generator=!1,this.expression=n,this.async=!1}return t}();e.ArrowFunctionExpression=s;var a=function(){function t(t,e,n){this.type=r.Syntax.AssignmentExpression,this.operator=t,this.left=e,this.right=n}return t}();e.AssignmentExpression=a;var u=function(){function t(t,e){this.type=r.Syntax.AssignmentPattern,this.left=t,this.right=e}return t}();e.AssignmentPattern=u;var c=function(){function t(t,e,n){this.type=r.Syntax.ArrowFunctionExpression,this.id=null,this.params=t,this.body=e,this.generator=!1,this.expression=n,this.async=!0}return t}();e.AsyncArrowFunctionExpression=c;var h=function(){function t(t,e,n){this.type=r.Syntax.FunctionDeclaration,this.id=t,this.params=e,this.body=n,this.generator=!1,this.expression=!1,this.async=!0}return t}();e.AsyncFunctionDeclaration=h;var l=function(){function t(t,e,n){this.type=r.Syntax.FunctionExpression,this.id=t,this.params=e,this.body=n,this.generator=!1,this.expression=!1,this.async=!0}return t}();e.AsyncFunctionExpression=l;var p=function(){function t(t){this.type=r.Syntax.AwaitExpression,this.argument=t}return t}();e.AwaitExpression=p;var f=function(){function t(t,e,n){var i="||"===t||"&&"===t;this.type=i?r.Syntax.LogicalExpression:r.Syntax.BinaryExpression,this.operator=t,this.left=e,this.right=n}return t}();e.BinaryExpression=f;var d=function(){function t(t){this.type=r.Syntax.BlockStatement,this.body=t}return t}();e.BlockStatement=d;var m=function(){function t(t){this.type=r.Syntax.BreakStatement,this.label=t}return t}();e.BreakStatement=m;var y=function(){function t(t,e){this.type=r.Syntax.CallExpression,this.callee=t,this.arguments=e}return t}();e.CallExpression=y;var v=function(){function t(t,e){this.type=r.Syntax.CatchClause,this.param=t,this.body=e}return t}();e.CatchClause=v;var x=function(){function t(t){this.type=r.Syntax.ClassBody,this.body=t}return t}();e.ClassBody=x;var g=function(){function t(t,e,n){this.type=r.Syntax.ClassDeclaration,this.id=t,this.superClass=e,this.body=n}return t}();e.ClassDeclaration=g;var D=function(){function t(t,e,n){this.type=r.Syntax.ClassExpression,this.id=t,this.superClass=e,this.body=n}return t}();e.ClassExpression=D;var E=function(){function t(t,e){this.type=r.Syntax.MemberExpression,this.computed=!0,this.object=t,this.property=e}return t}();e.ComputedMemberExpression=E;var A=function(){function t(t,e,n){this.type=r.Syntax.ConditionalExpression,this.test=t,this.consequent=e,this.alternate=n}return t}();e.ConditionalExpression=A;var S=function(){function t(t){this.type=r.Syntax.ContinueStatement,this.label=t}return t}();e.ContinueStatement=S;var w=function(){function t(){this.type=r.Syntax.DebuggerStatement}return t}();e.DebuggerStatement=w;var C=function(){function t(t,e){this.type=r.Syntax.ExpressionStatement,this.expression=t,this.directive=e}return t}();e.Directive=C;var _=function(){function t(t,e){this.type=r.Syntax.DoWhileStatement,this.body=t,this.test=e}return t}();e.DoWhileStatement=_;var b=function(){function t(){this.type=r.Syntax.EmptyStatement}return t}();e.EmptyStatement=b;var F=function(){function t(t){this.type=r.Syntax.ExportAllDeclaration,this.source=t}return t}();e.ExportAllDeclaration=F;var k=function(){function t(t){this.type=r.Syntax.ExportDefaultDeclaration,this.declaration=t}return t}();e.ExportDefaultDeclaration=k;var I=function(){function t(t,e,n){this.type=r.Syntax.ExportNamedDeclaration,this.declaration=t,this.specifiers=e,this.source=n}return t}();e.ExportNamedDeclaration=I;var T=function(){function t(t,e){this.type=r.Syntax.ExportSpecifier,this.exported=e,this.local=t}return t}();e.ExportSpecifier=T;var B=function(){function t(t){this.type=r.Syntax.ExpressionStatement,this.expression=t}return t}();e.ExpressionStatement=B;var M=function(){function t(t,e,n){this.type=r.Syntax.ForInStatement,this.left=t,this.right=e,this.body=n,this.each=!1}return t}();e.ForInStatement=M;var P=function(){function t(t,e,n){this.type=r.Syntax.ForOfStatement,this.left=t,this.right=e,this.body=n}return t}();e.ForOfStatement=P;var N=function(){function t(t,e,n,i){this.type=r.Syntax.ForStatement,this.init=t,this.test=e,this.update=n,this.body=i}return t}();e.ForStatement=N;var O=function(){function t(t,e,n,i){this.type=r.Syntax.FunctionDeclaration,this.id=t,this.params=e,this.body=n,this.generator=i,this.expression=!1,this.async=!1}return t}();e.FunctionDeclaration=O;var R=function(){function t(t,e,n,i){this.type=r.Syntax.FunctionExpression,this.id=t,this.params=e,this.body=n,this.generator=i,this.expression=!1,this.async=!1}return t}();e.FunctionExpression=R;var U=function(){function t(t){this.type=r.Syntax.Identifier,this.name=t}return t}();e.Identifier=U;var j=function(){function t(t,e,n){this.type=r.Syntax.IfStatement,this.test=t,this.consequent=e,this.alternate=n}return t}();e.IfStatement=j;var L=function(){function t(t,e){this.type=r.Syntax.ImportDeclaration,this.specifiers=t,this.source=e}return t}();e.ImportDeclaration=L;var z=function(){function t(t){this.type=r.Syntax.ImportDefaultSpecifier,this.local=t}return t}();e.ImportDefaultSpecifier=z;var J=function(){function t(t){this.type=r.Syntax.ImportNamespaceSpecifier,this.local=t}return t}();e.ImportNamespaceSpecifier=J;var X=function(){function t(t,e){this.type=r.Syntax.ImportSpecifier,this.local=t,this.imported=e}return t}();e.ImportSpecifier=X;var q=function(){function t(t,e){this.type=r.Syntax.LabeledStatement,this.label=t,this.body=e}return t}();e.LabeledStatement=q;var K=function(){function t(t,e){this.type=r.Syntax.Literal,this.value=t,this.raw=e}return t}();e.Literal=K;var Y=function(){function t(t,e){this.type=r.Syntax.MetaProperty,this.meta=t,this.property=e}return t}();e.MetaProperty=Y;var W=function(){function t(t,e,n,i,o){this.type=r.Syntax.MethodDefinition,this.key=t,this.computed=e,this.value=n,this.kind=i,this.static=o}return t}();e.MethodDefinition=W;var G=function(){function t(t){this.type=r.Syntax.Program,this.body=t,this.sourceType="module"}return t}();e.Module=G;var H=function(){function t(t,e){this.type=r.Syntax.NewExpression,this.callee=t,this.arguments=e}return t}();e.NewExpression=H;var V=function(){function t(t){this.type=r.Syntax.ObjectExpression,this.properties=t}return t}();e.ObjectExpression=V;var $=function(){function t(t){this.type=r.Syntax.ObjectPattern,this.properties=t}return t}();e.ObjectPattern=$;var Z=function(){function t(t,e,n,i,o,s){this.type=r.Syntax.Property,this.key=e,this.computed=n,this.value=i,this.kind=t,this.method=o,this.shorthand=s}return t}();e.Property=Z;var Q=function(){function t(t,e,n,i){this.type=r.Syntax.Literal,this.value=t,this.raw=e,this.regex={pattern:n,flags:i}}return t}();e.RegexLiteral=Q;var tt=function(){function t(t){this.type=r.Syntax.RestElement,this.argument=t}return t}();e.RestElement=tt;var et=function(){function t(t){this.type=r.Syntax.ReturnStatement,this.argument=t}return t}();e.ReturnStatement=et;var nt=function(){function t(t){this.type=r.Syntax.Program,this.body=t,this.sourceType="script"}return t}();e.Script=nt;var rt=function(){function t(t){this.type=r.Syntax.SequenceExpression,this.expressions=t}return t}();e.SequenceExpression=rt;var it=function(){function t(t){this.type=r.Syntax.SpreadElement,this.argument=t}return t}();e.SpreadElement=it;var ot=function(){function t(t,e){this.type=r.Syntax.MemberExpression,this.computed=!1,this.object=t,this.property=e}return t}();e.StaticMemberExpression=ot;var st=function(){function t(){this.type=r.Syntax.Super}return t}();e.Super=st;var at=function(){function t(t,e){this.type=r.Syntax.SwitchCase,this.test=t,this.consequent=e}return t}();e.SwitchCase=at;var ut=function(){function t(t,e){this.type=r.Syntax.SwitchStatement,this.discriminant=t,this.cases=e}return t}();e.SwitchStatement=ut;var ct=function(){function t(t,e){this.type=r.Syntax.TaggedTemplateExpression,this.tag=t,this.quasi=e}return t}();e.TaggedTemplateExpression=ct;var ht=function(){function t(t,e){this.type=r.Syntax.TemplateElement,this.value=t,this.tail=e}return t}();e.TemplateElement=ht;var lt=function(){function t(t,e){this.type=r.Syntax.TemplateLiteral,this.quasis=t,this.expressions=e}return t}();e.TemplateLiteral=lt;var pt=function(){function t(){this.type=r.Syntax.ThisExpression}return t}();e.ThisExpression=pt;var ft=function(){function t(t){this.type=r.Syntax.ThrowStatement,this.argument=t}return t}();e.ThrowStatement=ft;var dt=function(){function t(t,e,n){this.type=r.Syntax.TryStatement,this.block=t,this.handler=e,this.finalizer=n}return t}();e.TryStatement=dt;var mt=function(){function t(t,e){this.type=r.Syntax.UnaryExpression,this.operator=t,this.argument=e,this.prefix=!0}return t}();e.UnaryExpression=mt;var yt=function(){function t(t,e,n){this.type=r.Syntax.UpdateExpression,this.operator=t,this.argument=e,this.prefix=n}return t}();e.UpdateExpression=yt;var vt=function(){function t(t,e){this.type=r.Syntax.VariableDeclaration,this.declarations=t,this.kind=e}return t}();e.VariableDeclaration=vt;var xt=function(){function t(t,e){this.type=r.Syntax.VariableDeclarator,this.id=t,this.init=e}return t}();e.VariableDeclarator=xt;var gt=function(){function t(t,e){this.type=r.Syntax.WhileStatement,this.test=t,this.body=e}return t}();e.WhileStatement=gt;var Dt=function(){function t(t,e){this.type=r.Syntax.WithStatement,this.object=t,this.body=e}return t}();e.WithStatement=Dt;var Et=function(){function t(t,e){this.type=r.Syntax.YieldExpression,this.argument=t,this.delegate=e}return t}();e.YieldExpression=Et},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9),i=n(10),o=n(11),s=n(7),a=n(12),u=n(2),c=n(13),h=function(){function t(t,e,n){void 0===e&&(e={}),this.config={range:"boolean"==typeof e.range&&e.range,loc:"boolean"==typeof e.loc&&e.loc,source:null,tokens:"boolean"==typeof e.tokens&&e.tokens,comment:"boolean"==typeof e.comment&&e.comment,tolerant:"boolean"==typeof e.tolerant&&e.tolerant},this.config.loc&&e.source&&null!==e.source&&(this.config.source=String(e.source)),this.delegate=n,this.errorHandler=new i.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new a.Scanner(t,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}return t.prototype.throwError=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var i=Array.prototype.slice.call(arguments,1),o=t.replace(/%(\d)/g,function(t,e){return r.assert(e<i.length,"Message reference must be in range"),i[e]}),s=this.lastMarker.index,a=this.lastMarker.line,u=this.lastMarker.column+1;throw this.errorHandler.createError(s,a,u,o)},t.prototype.tolerateError=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var i=Array.prototype.slice.call(arguments,1),o=t.replace(/%(\d)/g,function(t,e){return r.assert(e<i.length,"Message reference must be in range"),i[e]}),s=this.lastMarker.index,a=this.scanner.lineNumber,u=this.lastMarker.column+1;this.errorHandler.tolerateError(s,a,u,o)},t.prototype.unexpectedTokenError=function(t,e){var n,r=e||o.Messages.UnexpectedToken;if(t?(e||(r=2===t.type?o.Messages.UnexpectedEOS:3===t.type?o.Messages.UnexpectedIdentifier:6===t.type?o.Messages.UnexpectedNumber:8===t.type?o.Messages.UnexpectedString:10===t.type?o.Messages.UnexpectedTemplate:o.Messages.UnexpectedToken,4===t.type&&(this.scanner.isFutureReservedWord(t.value)?r=o.Messages.UnexpectedReserved:this.context.strict&&this.scanner.isStrictModeReservedWord(t.value)&&(r=o.Messages.StrictReservedWord))),n=t.value):n="ILLEGAL",r=r.replace("%0",n),t&&"number"==typeof t.lineNumber){var i=t.start,s=t.lineNumber,a=this.lastMarker.index-this.lastMarker.column,u=t.start-a+1;return this.errorHandler.createError(i,s,u,r)}var i=this.lastMarker.index,s=this.lastMarker.line,u=this.lastMarker.column+1;return this.errorHandler.createError(i,s,u,r)},t.prototype.throwUnexpectedToken=function(t,e){throw this.unexpectedTokenError(t,e)},t.prototype.tolerateUnexpectedToken=function(t,e){this.errorHandler.tolerate(this.unexpectedTokenError(t,e))},t.prototype.collectComments=function(){if(this.config.comment){var t=this.scanner.scanComments();if(t.length>0&&this.delegate)for(var e=0;e<t.length;++e){var n=t[e],r=void 0;r={type:n.multiLine?"BlockComment":"LineComment",value:this.scanner.source.slice(n.slice[0],n.slice[1])},this.config.range&&(r.range=n.range),this.config.loc&&(r.loc=n.loc);var i={start:{line:n.loc.start.line,column:n.loc.start.column,offset:n.range[0]},end:{line:n.loc.end.line,column:n.loc.end.column,offset:n.range[1]}};this.delegate(r,i)}}else this.scanner.scanComments()},t.prototype.getTokenRaw=function(t){return this.scanner.source.slice(t.start,t.end)},t.prototype.convertToken=function(t){var e={type:c.TokenName[t.type],value:this.getTokenRaw(t)};if(this.config.range&&(e.range=[t.start,t.end]),this.config.loc&&(e.loc={start:{line:this.startMarker.line,column:this.startMarker.column},end:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}),9===t.type){var n=t.pattern,r=t.flags;e.regex={pattern:n,flags:r}}return e},t.prototype.nextToken=function(){var t=this.lookahead;this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.collectComments(),this.scanner.index!==this.startMarker.index&&(this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart);var e=this.scanner.lex();return this.hasLineTerminator=t.lineNumber!==e.lineNumber,e&&this.context.strict&&3===e.type&&this.scanner.isStrictModeReservedWord(e.value)&&(e.type=4),this.lookahead=e,this.config.tokens&&2!==e.type&&this.tokens.push(this.convertToken(e)),t},t.prototype.nextRegexToken=function(){this.collectComments();var t=this.scanner.scanRegExp();return this.config.tokens&&(this.tokens.pop(),this.tokens.push(this.convertToken(t))),this.lookahead=t,this.nextToken(),t},t.prototype.createNode=function(){return{index:this.startMarker.index,line:this.startMarker.line,column:this.startMarker.column}},t.prototype.startNode=function(t){return{index:t.start,line:t.lineNumber,column:t.start-t.lineStart}},t.prototype.finalize=function(t,e){if(this.config.range&&(e.range=[t.index,this.lastMarker.index]),this.config.loc&&(e.loc={start:{line:t.line,column:t.column},end:{line:this.lastMarker.line,column:this.lastMarker.column}},this.config.source&&(e.loc.source=this.config.source)),this.delegate){var n={start:{line:t.line,column:t.column,offset:t.index},end:{line:this.lastMarker.line,column:this.lastMarker.column,offset:this.lastMarker.index}};this.delegate(e,n)}return e},t.prototype.expect=function(t){var e=this.nextToken();7===e.type&&e.value===t||this.throwUnexpectedToken(e)},t.prototype.expectCommaSeparator=function(){if(this.config.tolerant){var t=this.lookahead;7===t.type&&","===t.value?this.nextToken():7===t.type&&";"===t.value?(this.nextToken(),this.tolerateUnexpectedToken(t)):this.tolerateUnexpectedToken(t,o.Messages.UnexpectedToken)}else this.expect(",")},t.prototype.expectKeyword=function(t){var e=this.nextToken();4===e.type&&e.value===t||this.throwUnexpectedToken(e)},t.prototype.match=function(t){return 7===this.lookahead.type&&this.lookahead.value===t},t.prototype.matchKeyword=function(t){return 4===this.lookahead.type&&this.lookahead.value===t},t.prototype.matchContextualKeyword=function(t){return 3===this.lookahead.type&&this.lookahead.value===t},t.prototype.matchAssign=function(){if(7!==this.lookahead.type)return!1;var t=this.lookahead.value;return"="===t||"*="===t||"**="===t||"/="===t||"%="===t||"+="===t||"-="===t||"<<="===t||">>="===t||">>>="===t||"&="===t||"^="===t||"|="===t},t.prototype.isolateCoverGrammar=function(t){var e=this.context.isBindingElement,n=this.context.isAssignmentTarget,r=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var i=t.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=e,this.context.isAssignmentTarget=n,this.context.firstCoverInitializedNameError=r,i},t.prototype.inheritCoverGrammar=function(t){var e=this.context.isBindingElement,n=this.context.isAssignmentTarget,r=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var i=t.call(this);return this.context.isBindingElement=this.context.isBindingElement&&e,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&n,this.context.firstCoverInitializedNameError=r||this.context.firstCoverInitializedNameError,i},t.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(2===this.lookahead.type||this.match("}")||this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},t.prototype.parsePrimaryExpression=function(){var t,e,n,r=this.createNode();switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),t=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(r,new s.Identifier(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,o.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,e=this.nextToken(),n=this.getTokenRaw(e),t=this.finalize(r,new s.Literal(e.value,n));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,e=this.nextToken(),n=this.getTokenRaw(e),t=this.finalize(r,new s.Literal("true"===e.value,n));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,e=this.nextToken(),n=this.getTokenRaw(e),t=this.finalize(r,new s.Literal(null,n));break;case 10:t=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,t=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":t=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":t=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,e=this.nextRegexToken(),n=this.getTokenRaw(e),t=this.finalize(r,new s.RegexLiteral(e.regex,n,e.pattern,e.flags));break;default:t=this.throwUnexpectedToken(this.nextToken())}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?t=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?t=this.finalize(r,new s.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?t=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),t=this.finalize(r,new s.ThisExpression)):t=this.matchKeyword("class")?this.parseClassExpression():this.throwUnexpectedToken(this.nextToken()));break;default:t=this.throwUnexpectedToken(this.nextToken())}return t},t.prototype.parseSpreadElement=function(){var t=this.createNode();this.expect("...");var e=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(t,new s.SpreadElement(e))},t.prototype.parseArrayInitializer=function(){var t=this.createNode(),e=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),e.push(null);else if(this.match("...")){var n=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),e.push(n)}else e.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(t,new s.ArrayExpression(e))},t.prototype.parsePropertyMethod=function(t){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var e=this.context.strict,n=this.context.allowStrictDirective;this.context.allowStrictDirective=t.simple;var r=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&t.firstRestricted&&this.tolerateUnexpectedToken(t.firstRestricted,t.message),this.context.strict&&t.stricted&&this.tolerateUnexpectedToken(t.stricted,t.message),this.context.strict=e,this.context.allowStrictDirective=n,r},t.prototype.parsePropertyMethodFunction=function(){var t=this.createNode(),e=this.context.allowYield;this.context.allowYield=!1;var n=this.parseFormalParameters(),r=this.parsePropertyMethod(n);return this.context.allowYield=e,this.finalize(t,new s.FunctionExpression(null,n.params,r,!1))},t.prototype.parsePropertyMethodAsyncFunction=function(){var t=this.createNode(),e=this.context.allowYield,n=this.context.await;this.context.allowYield=!1,this.context.await=!0;var r=this.parseFormalParameters(),i=this.parsePropertyMethod(r);return this.context.allowYield=e,this.context.await=n,this.finalize(t,new s.AsyncFunctionExpression(null,r.params,i))},t.prototype.parseObjectPropertyKey=function(){var t,e=this.createNode(),n=this.nextToken();switch(n.type){case 8:case 6:this.context.strict&&n.octal&&this.tolerateUnexpectedToken(n,o.Messages.StrictOctalLiteral);var r=this.getTokenRaw(n);t=this.finalize(e,new s.Literal(n.value,r));break;case 3:case 1:case 5:case 4:t=this.finalize(e,new s.Identifier(n.value));break;case 7:"["===n.value?(t=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):t=this.throwUnexpectedToken(n);break;default:t=this.throwUnexpectedToken(n)}return t},t.prototype.isPropertyKey=function(t,e){return t.type===u.Syntax.Identifier&&t.name===e||t.type===u.Syntax.Literal&&t.value===e},t.prototype.parseObjectProperty=function(t){var e,n=this.createNode(),r=this.lookahead,i=null,a=null,u=!1,c=!1,h=!1,l=!1;if(3===r.type){var p=r.value;this.nextToken(),u=this.match("["),l=!(this.hasLineTerminator||"async"!==p||this.match(":")||this.match("(")||this.match("*")),i=l?this.parseObjectPropertyKey():this.finalize(n,new s.Identifier(p))}else this.match("*")?this.nextToken():(u=this.match("["),i=this.parseObjectPropertyKey());var f=this.qualifiedPropertyName(this.lookahead);if(3===r.type&&!l&&"get"===r.value&&f)e="get",u=this.match("["),i=this.parseObjectPropertyKey(),this.context.allowYield=!1,a=this.parseGetterMethod();else if(3===r.type&&!l&&"set"===r.value&&f)e="set",u=this.match("["),i=this.parseObjectPropertyKey(),a=this.parseSetterMethod();else if(7===r.type&&"*"===r.value&&f)e="init",u=this.match("["),i=this.parseObjectPropertyKey(),a=this.parseGeneratorMethod(),c=!0;else if(i||this.throwUnexpectedToken(this.lookahead),e="init",this.match(":")&&!l)!u&&this.isPropertyKey(i,"__proto__")&&(t.value&&this.tolerateError(o.Messages.DuplicateProtoProperty),t.value=!0),this.nextToken(),a=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))a=l?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),c=!0;else if(3===r.type){var p=this.finalize(n,new s.Identifier(r.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),h=!0;var d=this.isolateCoverGrammar(this.parseAssignmentExpression);a=this.finalize(n,new s.AssignmentPattern(p,d))}else h=!0,a=p}else this.throwUnexpectedToken(this.nextToken());return this.finalize(n,new s.Property(e,i,u,a,c,h))},t.prototype.parseObjectInitializer=function(){var t=this.createNode();this.expect("{");for(var e=[],n={value:!1};!this.match("}");)e.push(this.parseObjectProperty(n)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(t,new s.ObjectExpression(e))},t.prototype.parseTemplateHead=function(){r.assert(this.lookahead.head,"Template literal must start with a template head");var t=this.createNode(),e=this.nextToken(),n=e.value,i=e.cooked;return this.finalize(t,new s.TemplateElement({raw:n,cooked:i},e.tail))},t.prototype.parseTemplateElement=function(){10!==this.lookahead.type&&this.throwUnexpectedToken();var t=this.createNode(),e=this.nextToken(),n=e.value,r=e.cooked;return this.finalize(t,new s.TemplateElement({raw:n,cooked:r},e.tail))},t.prototype.parseTemplateLiteral=function(){var t=this.createNode(),e=[],n=[],r=this.parseTemplateHead();for(n.push(r);!r.tail;)e.push(this.parseExpression()),r=this.parseTemplateElement(),n.push(r);return this.finalize(t,new s.TemplateLiteral(n,e))},t.prototype.reinterpretExpressionAsPattern=function(t){switch(t.type){case u.Syntax.Identifier:case u.Syntax.MemberExpression:case u.Syntax.RestElement:case u.Syntax.AssignmentPattern:break;case u.Syntax.SpreadElement:t.type=u.Syntax.RestElement,this.reinterpretExpressionAsPattern(t.argument);break;case u.Syntax.ArrayExpression:t.type=u.Syntax.ArrayPattern;for(var e=0;e<t.elements.length;e++)null!==t.elements[e]&&this.reinterpretExpressionAsPattern(t.elements[e]);break;case u.Syntax.ObjectExpression:t.type=u.Syntax.ObjectPattern;for(var e=0;e<t.properties.length;e++)this.reinterpretExpressionAsPattern(t.properties[e].value);break;case u.Syntax.AssignmentExpression:t.type=u.Syntax.AssignmentPattern,delete t.operator,this.reinterpretExpressionAsPattern(t.left)}},t.prototype.parseGroupExpression=function(){var t;if(this.expect("("),this.match(")"))this.nextToken(),this.match("=>")||this.expect("=>"),t={type:"ArrowParameterPlaceHolder",params:[],async:!1};else{var e=this.lookahead,n=[];if(this.match("..."))t=this.parseRestElement(n),this.expect(")"),this.match("=>")||this.expect("=>"),t={type:"ArrowParameterPlaceHolder",params:[t],async:!1};else{var r=!1;if(this.context.isBindingElement=!0,t=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var i=[];for(this.context.isAssignmentTarget=!1,i.push(t);2!==this.lookahead.type&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var o=0;o<i.length;o++)this.reinterpretExpressionAsPattern(i[o]);r=!0,t={type:"ArrowParameterPlaceHolder",params:i,async:!1}}else if(this.match("...")){this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),i.push(this.parseRestElement(n)),this.expect(")"),this.match("=>")||this.expect("=>"),this.context.isBindingElement=!1;for(var o=0;o<i.length;o++)this.reinterpretExpressionAsPattern(i[o]);r=!0,t={type:"ArrowParameterPlaceHolder",params:i,async:!1}}else i.push(this.inheritCoverGrammar(this.parseAssignmentExpression));if(r)break}r||(t=this.finalize(this.startNode(e),new s.SequenceExpression(i)))}if(!r){if(this.expect(")"),this.match("=>")&&(t.type===u.Syntax.Identifier&&"yield"===t.name&&(r=!0,t={type:"ArrowParameterPlaceHolder",params:[t],async:!1}),!r)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),t.type===u.Syntax.SequenceExpression)for(var o=0;o<t.expressions.length;o++)this.reinterpretExpressionAsPattern(t.expressions[o]);else this.reinterpretExpressionAsPattern(t);t={type:"ArrowParameterPlaceHolder",params:t.type===u.Syntax.SequenceExpression?t.expressions:[t],async:!1}}this.context.isBindingElement=!1}}}return t},t.prototype.parseArguments=function(){this.expect("(");var t=[];if(!this.match(")"))for(;;){var e=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAssignmentExpression);if(t.push(e),this.match(")"))break;if(this.expectCommaSeparator(),this.match(")"))break}return this.expect(")"),t},t.prototype.isIdentifierName=function(t){return 3===t.type||4===t.type||1===t.type||5===t.type},t.prototype.parseIdentifierName=function(){var t=this.createNode(),e=this.nextToken();return this.isIdentifierName(e)||this.throwUnexpectedToken(e),this.finalize(t,new s.Identifier(e.value))},t.prototype.parseNewExpression=function(){var t=this.createNode(),e=this.parseIdentifierName();r.assert("new"===e.name,"New expression must start with `new`");var n;if(this.match("."))if(this.nextToken(),3===this.lookahead.type&&this.context.inFunctionBody&&"target"===this.lookahead.value){var i=this.parseIdentifierName();n=new s.MetaProperty(e,i)}else this.throwUnexpectedToken(this.lookahead);else{var o=this.isolateCoverGrammar(this.parseLeftHandSideExpression),a=this.match("(")?this.parseArguments():[];n=new s.NewExpression(o,a),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return this.finalize(t,n)},t.prototype.parseAsyncArgument=function(){var t=this.parseAssignmentExpression();return this.context.firstCoverInitializedNameError=null,t},t.prototype.parseAsyncArguments=function(){this.expect("(");var t=[];if(!this.match(")"))for(;;){var e=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAsyncArgument);if(t.push(e),this.match(")"))break;if(this.expectCommaSeparator(),this.match(")"))break}return this.expect(")"),t},t.prototype.parseLeftHandSideExpressionAllowCall=function(){var t=this.lookahead,e=this.matchContextualKeyword("async"),n=this.context.allowIn;this.context.allowIn=!0;var r;for(this.matchKeyword("super")&&this.context.inFunctionBody?(r=this.createNode(),this.nextToken(),r=this.finalize(r,new s.Super),this.match("(")||this.match(".")||this.match("[")||this.throwUnexpectedToken(this.lookahead)):r=this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");var i=this.parseIdentifierName();r=this.finalize(this.startNode(t),new s.StaticMemberExpression(r,i))}else if(this.match("(")){var o=e&&t.lineNumber===this.lookahead.lineNumber;this.context.isBindingElement=!1,this.context.isAssignmentTarget=!1;var a=o?this.parseAsyncArguments():this.parseArguments();if(r=this.finalize(this.startNode(t),new s.CallExpression(r,a)),o&&this.match("=>")){for(var u=0;u<a.length;++u)this.reinterpretExpressionAsPattern(a[u]);r={type:"ArrowParameterPlaceHolder",params:a,async:!0}}}else if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");var i=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),r=this.finalize(this.startNode(t),new s.ComputedMemberExpression(r,i))}else{if(10!==this.lookahead.type||!this.lookahead.head)break;var c=this.parseTemplateLiteral();r=this.finalize(this.startNode(t),new s.TaggedTemplateExpression(r,c))}return this.context.allowIn=n,r},t.prototype.parseSuper=function(){var t=this.createNode();return this.expectKeyword("super"),this.match("[")||this.match(".")||this.throwUnexpectedToken(this.lookahead),this.finalize(t,new s.Super)},t.prototype.parseLeftHandSideExpression=function(){r.assert(this.context.allowIn,"callee of new expression always allow in keyword.");for(var t=this.startNode(this.lookahead),e=this.matchKeyword("super")&&this.context.inFunctionBody?this.parseSuper():this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");var n=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),e=this.finalize(t,new s.ComputedMemberExpression(e,n))}else if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");var n=this.parseIdentifierName();e=this.finalize(t,new s.StaticMemberExpression(e,n))}else{if(10!==this.lookahead.type||!this.lookahead.head)break;var i=this.parseTemplateLiteral();e=this.finalize(t,new s.TaggedTemplateExpression(e,i))}return e},t.prototype.parseUpdateExpression=function(){var t,e=this.lookahead;if(this.match("++")||this.match("--")){var n=this.startNode(e),r=this.nextToken();t=this.inheritCoverGrammar(this.parseUnaryExpression),this.context.strict&&t.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(t.name)&&this.tolerateError(o.Messages.StrictLHSPrefix),this.context.isAssignmentTarget||this.tolerateError(o.Messages.InvalidLHSInAssignment);var i=!0;t=this.finalize(n,new s.UpdateExpression(r.value,t,i)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else if(t=this.inheritCoverGrammar(this.parseLeftHandSideExpressionAllowCall),!this.hasLineTerminator&&7===this.lookahead.type&&(this.match("++")||this.match("--"))){this.context.strict&&t.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(t.name)&&this.tolerateError(o.Messages.StrictLHSPostfix),this.context.isAssignmentTarget||this.tolerateError(o.Messages.InvalidLHSInAssignment),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var a=this.nextToken().value,i=!1;t=this.finalize(this.startNode(e),new s.UpdateExpression(a,t,i))}return t},t.prototype.parseAwaitExpression=function(){var t=this.createNode();this.nextToken();var e=this.parseUnaryExpression();return this.finalize(t,new s.AwaitExpression(e))},t.prototype.parseUnaryExpression=function(){var t;if(this.match("+")||this.match("-")||this.match("~")||this.match("!")||this.matchKeyword("delete")||this.matchKeyword("void")||this.matchKeyword("typeof")){var e=this.startNode(this.lookahead),n=this.nextToken();t=this.inheritCoverGrammar(this.parseUnaryExpression),t=this.finalize(e,new s.UnaryExpression(n.value,t)),this.context.strict&&"delete"===t.operator&&t.argument.type===u.Syntax.Identifier&&this.tolerateError(o.Messages.StrictDelete),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else t=this.context.await&&this.matchContextualKeyword("await")?this.parseAwaitExpression():this.parseUpdateExpression();return t},t.prototype.parseExponentiationExpression=function(){var t=this.lookahead,e=this.inheritCoverGrammar(this.parseUnaryExpression);if(e.type!==u.Syntax.UnaryExpression&&this.match("**")){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var n=e,r=this.isolateCoverGrammar(this.parseExponentiationExpression);e=this.finalize(this.startNode(t),new s.BinaryExpression("**",n,r))}return e},t.prototype.binaryPrecedence=function(t){var e=t.value;return 7===t.type?this.operatorPrecedence[e]||0:4===t.type&&("instanceof"===e||this.context.allowIn&&"in"===e)?7:0},t.prototype.parseBinaryExpression=function(){var t=this.lookahead,e=this.inheritCoverGrammar(this.parseExponentiationExpression),n=this.lookahead,r=this.binaryPrecedence(n);if(r>0){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var i=[t,this.lookahead],o=e,a=this.isolateCoverGrammar(this.parseExponentiationExpression),u=[o,n.value,a],c=[r];;){if((r=this.binaryPrecedence(this.lookahead))<=0)break;for(;u.length>2&&r<=c[c.length-1];){a=u.pop();var h=u.pop();c.pop(),o=u.pop(),i.pop();var l=this.startNode(i[i.length-1]);u.push(this.finalize(l,new s.BinaryExpression(h,o,a)))}u.push(this.nextToken().value),c.push(r),i.push(this.lookahead),u.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var p=u.length-1;for(e=u[p],i.pop();p>1;){var l=this.startNode(i.pop()),h=u[p-1];e=this.finalize(l,new s.BinaryExpression(h,u[p-2],e)),p-=2}}return e},t.prototype.parseConditionalExpression=function(){var t=this.lookahead,e=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var n=this.context.allowIn;this.context.allowIn=!0;var r=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=n,this.expect(":");var i=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new s.ConditionalExpression(e,r,i)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return e},t.prototype.checkPatternParam=function(t,e){switch(e.type){case u.Syntax.Identifier:this.validateParam(t,e,e.name);break;case u.Syntax.RestElement:this.checkPatternParam(t,e.argument);break;case u.Syntax.AssignmentPattern:this.checkPatternParam(t,e.left);break;case u.Syntax.ArrayPattern:for(var n=0;n<e.elements.length;n++)null!==e.elements[n]&&this.checkPatternParam(t,e.elements[n]);break;case u.Syntax.ObjectPattern:for(var n=0;n<e.properties.length;n++)this.checkPatternParam(t,e.properties[n].value)}t.simple=t.simple&&e instanceof s.Identifier},t.prototype.reinterpretAsCoverFormalsList=function(t){var e,n=[t],r=!1;switch(t.type){case u.Syntax.Identifier:break;case"ArrowParameterPlaceHolder":n=t.params,r=t.async;break;default:return null}e={simple:!0,paramSet:{}};for(var i=0;i<n.length;++i){var s=n[i];s.type===u.Syntax.AssignmentPattern?s.right.type===u.Syntax.YieldExpression&&(s.right.argument&&this.throwUnexpectedToken(this.lookahead),s.right.type=u.Syntax.Identifier,s.right.name="yield",delete s.right.argument,delete s.right.delegate):r&&s.type===u.Syntax.Identifier&&"await"===s.name&&this.throwUnexpectedToken(this.lookahead),this.checkPatternParam(e,s),n[i]=s}if(this.context.strict||!this.context.allowYield)for(var i=0;i<n.length;++i){var s=n[i];s.type===u.Syntax.YieldExpression&&this.throwUnexpectedToken(this.lookahead)}if(e.message===o.Messages.StrictParamDupe){var a=this.context.strict?e.stricted:e.firstRestricted;this.throwUnexpectedToken(a,e.message)}return{simple:e.simple,params:n,stricted:e.stricted,firstRestricted:e.firstRestricted,message:e.message}},t.prototype.parseAssignmentExpression=function(){var t;if(!this.context.allowYield&&this.matchKeyword("yield"))t=this.parseYieldExpression();else{var e=this.lookahead,n=e;if(t=this.parseConditionalExpression(),3===n.type&&n.lineNumber===this.lookahead.lineNumber&&"async"===n.value&&(3===this.lookahead.type||this.matchKeyword("yield"))){var r=this.parsePrimaryExpression();this.reinterpretExpressionAsPattern(r),t={type:"ArrowParameterPlaceHolder",params:[r],async:!0}}if("ArrowParameterPlaceHolder"===t.type||this.match("=>")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var i=t.async,a=this.reinterpretAsCoverFormalsList(t);if(a){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var c=this.context.strict,h=this.context.allowStrictDirective;this.context.allowStrictDirective=a.simple;var l=this.context.allowYield,p=this.context.await;this.context.allowYield=!0,this.context.await=i;var f=this.startNode(e);this.expect("=>");var d=void 0;if(this.match("{")){var m=this.context.allowIn;this.context.allowIn=!0,d=this.parseFunctionSourceElements(),this.context.allowIn=m}else d=this.isolateCoverGrammar(this.parseAssignmentExpression);var y=d.type!==u.Syntax.BlockStatement;this.context.strict&&a.firstRestricted&&this.throwUnexpectedToken(a.firstRestricted,a.message),this.context.strict&&a.stricted&&this.tolerateUnexpectedToken(a.stricted,a.message),t=i?this.finalize(f,new s.AsyncArrowFunctionExpression(a.params,d,y)):this.finalize(f,new s.ArrowFunctionExpression(a.params,d,y)),this.context.strict=c,this.context.allowStrictDirective=h,this.context.allowYield=l,this.context.await=p}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(o.Messages.InvalidLHSInAssignment),this.context.strict&&t.type===u.Syntax.Identifier){var v=t;this.scanner.isRestrictedWord(v.name)&&this.tolerateUnexpectedToken(n,o.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(v.name)&&this.tolerateUnexpectedToken(n,o.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(t):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1),n=this.nextToken();var x=n.value,g=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new s.AssignmentExpression(x,t,g)),this.context.firstCoverInitializedNameError=null}}return t},t.prototype.parseExpression=function(){var t=this.lookahead,e=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var n=[];for(n.push(e);2!==this.lookahead.type&&this.match(",");)this.nextToken(),n.push(this.isolateCoverGrammar(this.parseAssignmentExpression));e=this.finalize(this.startNode(t),new s.SequenceExpression(n))}return e},t.prototype.parseStatementListItem=function(){var t;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,4===this.lookahead.type)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,o.Messages.IllegalExportDeclaration),t=this.parseExportDeclaration();break;case"import":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,o.Messages.IllegalImportDeclaration),t=this.parseImportDeclaration();break;case"const":t=this.parseLexicalDeclaration({inFor:!1});break;case"function":t=this.parseFunctionDeclaration();break;case"class":t=this.parseClassDeclaration();break;case"let":t=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:t=this.parseStatement()}else t=this.parseStatement();return t},t.prototype.parseBlock=function(){var t=this.createNode();this.expect("{");for(var e=[];;){if(this.match("}"))break;e.push(this.parseStatementListItem())}return this.expect("}"),this.finalize(t,new s.BlockStatement(e))},t.prototype.parseLexicalBinding=function(t,e){var n=this.createNode(),r=[],i=this.parsePattern(r,t);this.context.strict&&i.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(i.name)&&this.tolerateError(o.Messages.StrictVarName);var a=null;return"const"===t?this.matchKeyword("in")||this.matchContextualKeyword("of")||(this.match("=")?(this.nextToken(),a=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(o.Messages.DeclarationMissingInitializer,"const")):(!e.inFor&&i.type!==u.Syntax.Identifier||this.match("="))&&(this.expect("="),a=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(n,new s.VariableDeclarator(i,a))},t.prototype.parseBindingList=function(t,e){for(var n=[this.parseLexicalBinding(t,e)];this.match(",");)this.nextToken(),n.push(this.parseLexicalBinding(t,e));return n},t.prototype.isLexicalDeclaration=function(){var t=this.scanner.saveState();this.scanner.scanComments();var e=this.scanner.lex();return this.scanner.restoreState(t),3===e.type||7===e.type&&"["===e.value||7===e.type&&"{"===e.value||4===e.type&&"let"===e.value||4===e.type&&"yield"===e.value},t.prototype.parseLexicalDeclaration=function(t){var e=this.createNode(),n=this.nextToken().value;r.assert("let"===n||"const"===n,"Lexical declaration must be either let or const");var i=this.parseBindingList(n,t);return this.consumeSemicolon(),this.finalize(e,new s.VariableDeclaration(i,n))},t.prototype.parseBindingRestElement=function(t,e){var n=this.createNode();this.expect("...");var r=this.parsePattern(t,e);return this.finalize(n,new s.RestElement(r))},t.prototype.parseArrayPattern=function(t,e){var n=this.createNode();this.expect("[");for(var r=[];!this.match("]");)if(this.match(","))this.nextToken(),r.push(null);else{if(this.match("...")){r.push(this.parseBindingRestElement(t,e));break}r.push(this.parsePatternWithDefault(t,e)),this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(n,new s.ArrayPattern(r))},t.prototype.parsePropertyPattern=function(t,e){var n,r,i=this.createNode(),o=!1,a=!1;if(3===this.lookahead.type){var u=this.lookahead;n=this.parseVariableIdentifier();var c=this.finalize(i,new s.Identifier(u.value));if(this.match("=")){t.push(u),a=!0,this.nextToken();var h=this.parseAssignmentExpression();r=this.finalize(this.startNode(u),new s.AssignmentPattern(c,h))}else this.match(":")?(this.expect(":"),r=this.parsePatternWithDefault(t,e)):(t.push(u),a=!0,r=c)}else o=this.match("["),n=this.parseObjectPropertyKey(),this.expect(":"),r=this.parsePatternWithDefault(t,e);return this.finalize(i,new s.Property("init",n,o,r,!1,a))},t.prototype.parseObjectPattern=function(t,e){var n=this.createNode(),r=[];for(this.expect("{");!this.match("}");)r.push(this.parsePropertyPattern(t,e)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(n,new s.ObjectPattern(r))},t.prototype.parsePattern=function(t,e){var n;return this.match("[")?n=this.parseArrayPattern(t,e):this.match("{")?n=this.parseObjectPattern(t,e):(!this.matchKeyword("let")||"const"!==e&&"let"!==e||this.tolerateUnexpectedToken(this.lookahead,o.Messages.LetInLexicalBinding),t.push(this.lookahead),n=this.parseVariableIdentifier(e)),n},t.prototype.parsePatternWithDefault=function(t,e){var n=this.lookahead,r=this.parsePattern(t,e);if(this.match("=")){this.nextToken();var i=this.context.allowYield;this.context.allowYield=!0;var o=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=i,r=this.finalize(this.startNode(n),new s.AssignmentPattern(r,o))}return r},t.prototype.parseVariableIdentifier=function(t){var e=this.createNode(),n=this.nextToken();return 4===n.type&&"yield"===n.value?this.context.strict?this.tolerateUnexpectedToken(n,o.Messages.StrictReservedWord):this.context.allowYield||this.throwUnexpectedToken(n):3!==n.type?this.context.strict&&4===n.type&&this.scanner.isStrictModeReservedWord(n.value)?this.tolerateUnexpectedToken(n,o.Messages.StrictReservedWord):(this.context.strict||"let"!==n.value||"var"!==t)&&this.throwUnexpectedToken(n):(this.context.isModule||this.context.await)&&3===n.type&&"await"===n.value&&this.tolerateUnexpectedToken(n),this.finalize(e,new s.Identifier(n.value))},t.prototype.parseVariableDeclaration=function(t){var e=this.createNode(),n=[],r=this.parsePattern(n,"var");this.context.strict&&r.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(r.name)&&this.tolerateError(o.Messages.StrictVarName);var i=null;return this.match("=")?(this.nextToken(),i=this.isolateCoverGrammar(this.parseAssignmentExpression)):r.type===u.Syntax.Identifier||t.inFor||this.expect("="),this.finalize(e,new s.VariableDeclarator(r,i))},t.prototype.parseVariableDeclarationList=function(t){var e={inFor:t.inFor},n=[];for(n.push(this.parseVariableDeclaration(e));this.match(",");)this.nextToken(),n.push(this.parseVariableDeclaration(e));return n},t.prototype.parseVariableStatement=function(){var t=this.createNode();this.expectKeyword("var");var e=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(t,new s.VariableDeclaration(e,"var"))},t.prototype.parseEmptyStatement=function(){var t=this.createNode();return this.expect(";"),this.finalize(t,new s.EmptyStatement)},t.prototype.parseExpressionStatement=function(){var t=this.createNode(),e=this.parseExpression();return this.consumeSemicolon(),this.finalize(t,new s.ExpressionStatement(e))},t.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(o.Messages.StrictFunction),this.parseStatement()},t.prototype.parseIfStatement=function(){var t,e=this.createNode(),n=null;this.expectKeyword("if"),this.expect("(");var r=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),t=this.finalize(this.createNode(),new s.EmptyStatement)):(this.expect(")"),t=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),n=this.parseIfClause())),this.finalize(e,new s.IfStatement(r,t,n))},t.prototype.parseDoWhileStatement=function(){var t=this.createNode();this.expectKeyword("do");var e=this.context.inIteration;this.context.inIteration=!0;var n=this.parseStatement();this.context.inIteration=e,this.expectKeyword("while"),this.expect("(");var r=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(t,new s.DoWhileStatement(n,r))},t.prototype.parseWhileStatement=function(){var t,e=this.createNode();this.expectKeyword("while"),this.expect("(");var n=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),t=this.finalize(this.createNode(),new s.EmptyStatement);else{this.expect(")");var r=this.context.inIteration;this.context.inIteration=!0,t=this.parseStatement(),this.context.inIteration=r}return this.finalize(e,new s.WhileStatement(n,t))},t.prototype.parseForStatement=function(){var t,e,n=null,r=null,i=null,a=!0,c=this.createNode();if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){n=this.createNode(),this.nextToken();var h=this.context.allowIn;this.context.allowIn=!1;var l=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=h,1===l.length&&this.matchKeyword("in")){var p=l[0];p.init&&(p.id.type===u.Syntax.ArrayPattern||p.id.type===u.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(o.Messages.ForInOfLoopInitializer,"for-in"),n=this.finalize(n,new s.VariableDeclaration(l,"var")),this.nextToken(),t=n,e=this.parseExpression(),n=null}else 1===l.length&&null===l[0].init&&this.matchContextualKeyword("of")?(n=this.finalize(n,new s.VariableDeclaration(l,"var")),this.nextToken(),t=n,e=this.parseAssignmentExpression(),n=null,a=!1):(n=this.finalize(n,new s.VariableDeclaration(l,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){n=this.createNode();var f=this.nextToken().value;if(this.context.strict||"in"!==this.lookahead.value){var h=this.context.allowIn;this.context.allowIn=!1;var l=this.parseBindingList(f,{inFor:!0});this.context.allowIn=h,1===l.length&&null===l[0].init&&this.matchKeyword("in")?(n=this.finalize(n,new s.VariableDeclaration(l,f)),this.nextToken(),t=n,e=this.parseExpression(),n=null):1===l.length&&null===l[0].init&&this.matchContextualKeyword("of")?(n=this.finalize(n,new s.VariableDeclaration(l,f)),this.nextToken(),t=n,e=this.parseAssignmentExpression(),n=null,a=!1):(this.consumeSemicolon(),n=this.finalize(n,new s.VariableDeclaration(l,f)))}else n=this.finalize(n,new s.Identifier(f)),this.nextToken(),t=n,e=this.parseExpression(),n=null}else{var d=this.lookahead,h=this.context.allowIn;if(this.context.allowIn=!1,n=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=h,this.matchKeyword("in"))this.context.isAssignmentTarget&&n.type!==u.Syntax.AssignmentExpression||this.tolerateError(o.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(n),t=n,e=this.parseExpression(),n=null;else if(this.matchContextualKeyword("of"))this.context.isAssignmentTarget&&n.type!==u.Syntax.AssignmentExpression||this.tolerateError(o.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(n),t=n,e=this.parseAssignmentExpression(),n=null,a=!1;else{if(this.match(",")){for(var m=[n];this.match(",");)this.nextToken(),m.push(this.isolateCoverGrammar(this.parseAssignmentExpression));n=this.finalize(this.startNode(d),new s.SequenceExpression(m))}this.expect(";")}}void 0===t&&(this.match(";")||(r=this.parseExpression()),this.expect(";"),this.match(")")||(i=this.parseExpression()));var y;if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),y=this.finalize(this.createNode(),new s.EmptyStatement);else{this.expect(")");var v=this.context.inIteration;this.context.inIteration=!0,y=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=v}return void 0===t?this.finalize(c,new s.ForStatement(n,r,i,y)):a?this.finalize(c,new s.ForInStatement(t,e,y)):this.finalize(c,new s.ForOfStatement(t,e,y))},t.prototype.parseContinueStatement=function(){var t=this.createNode();this.expectKeyword("continue");var e=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier();e=n;var r="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)||this.throwError(o.Messages.UnknownLabel,n.name)}return this.consumeSemicolon(),null!==e||this.context.inIteration||this.throwError(o.Messages.IllegalContinue),this.finalize(t,new s.ContinueStatement(e))},t.prototype.parseBreakStatement=function(){var t=this.createNode();this.expectKeyword("break");var e=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier(),r="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)||this.throwError(o.Messages.UnknownLabel,n.name),e=n}return this.consumeSemicolon(),null!==e||this.context.inIteration||this.context.inSwitch||this.throwError(o.Messages.IllegalBreak),this.finalize(t,new s.BreakStatement(e))},t.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(o.Messages.IllegalReturn);var t=this.createNode();this.expectKeyword("return");var e=!this.match(";")&&!this.match("}")&&!this.hasLineTerminator&&2!==this.lookahead.type,n=e?this.parseExpression():null;return this.consumeSemicolon(),this.finalize(t,new s.ReturnStatement(n))},t.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(o.Messages.StrictModeWith);var t,e=this.createNode();this.expectKeyword("with"),this.expect("(");var n=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),t=this.finalize(this.createNode(),new s.EmptyStatement)):(this.expect(")"),t=this.parseStatement()),this.finalize(e,new s.WithStatement(n,t))},t.prototype.parseSwitchCase=function(){var t,e=this.createNode();this.matchKeyword("default")?(this.nextToken(),t=null):(this.expectKeyword("case"),t=this.parseExpression()),this.expect(":");for(var n=[];;){if(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"))break;n.push(this.parseStatementListItem())}return this.finalize(e,new s.SwitchCase(t,n))},t.prototype.parseSwitchStatement=function(){var t=this.createNode();this.expectKeyword("switch"),this.expect("(");var e=this.parseExpression();this.expect(")");var n=this.context.inSwitch;this.context.inSwitch=!0;var r=[],i=!1;for(this.expect("{");;){if(this.match("}"))break;var a=this.parseSwitchCase();null===a.test&&(i&&this.throwError(o.Messages.MultipleDefaultsInSwitch),i=!0),r.push(a)}return this.expect("}"),this.context.inSwitch=n,this.finalize(t,new s.SwitchStatement(e,r))},t.prototype.parseLabelledStatement=function(){var t,e=this.createNode(),n=this.parseExpression();if(n.type===u.Syntax.Identifier&&this.match(":")){this.nextToken();var r=n,i="$"+r.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,i)&&this.throwError(o.Messages.Redeclaration,"Label",r.name),this.context.labelSet[i]=!0;var a=void 0;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),a=this.parseClassDeclaration();else if(this.matchKeyword("function")){var c=this.lookahead,h=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(c,o.Messages.StrictFunction):h.generator&&this.tolerateUnexpectedToken(c,o.Messages.GeneratorInLegacyContext),a=h}else a=this.parseStatement();delete this.context.labelSet[i],t=new s.LabeledStatement(r,a)}else this.consumeSemicolon(),t=new s.ExpressionStatement(n);return this.finalize(e,t)},t.prototype.parseThrowStatement=function(){var t=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(o.Messages.NewlineAfterThrow);var e=this.parseExpression();return this.consumeSemicolon(),this.finalize(t,new s.ThrowStatement(e))},t.prototype.parseCatchClause=function(){var t=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var e=[],n=this.parsePattern(e),r={},i=0;i<e.length;i++){var a="$"+e[i].value;Object.prototype.hasOwnProperty.call(r,a)&&this.tolerateError(o.Messages.DuplicateBinding,e[i].value),r[a]=!0}this.context.strict&&n.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(o.Messages.StrictCatchVariable),this.expect(")");var c=this.parseBlock();return this.finalize(t,new s.CatchClause(n,c))},t.prototype.parseFinallyClause=function(){return this.expectKeyword("finally"),this.parseBlock()},t.prototype.parseTryStatement=function(){var t=this.createNode();this.expectKeyword("try");var e=this.parseBlock(),n=this.matchKeyword("catch")?this.parseCatchClause():null,r=this.matchKeyword("finally")?this.parseFinallyClause():null;return n||r||this.throwError(o.Messages.NoCatchOrFinally),this.finalize(t,new s.TryStatement(e,n,r))},t.prototype.parseDebuggerStatement=function(){var t=this.createNode();return this.expectKeyword("debugger"),this.consumeSemicolon(),this.finalize(t,new s.DebuggerStatement)},t.prototype.parseStatement=function(){var t;switch(this.lookahead.type){case 1:case 5:case 6:case 8:case 10:case 9:t=this.parseExpressionStatement();break;case 7:var e=this.lookahead.value;t="{"===e?this.parseBlock():"("===e?this.parseExpressionStatement():";"===e?this.parseEmptyStatement():this.parseExpressionStatement();break;case 3:t=this.matchAsyncFunction()?this.parseFunctionDeclaration():this.parseLabelledStatement();break;case 4:switch(this.lookahead.value){case"break":t=this.parseBreakStatement();break;case"continue":t=this.parseContinueStatement();break;case"debugger":t=this.parseDebuggerStatement();break;case"do":t=this.parseDoWhileStatement();break;case"for":t=this.parseForStatement();break;case"function":t=this.parseFunctionDeclaration();break;case"if":t=this.parseIfStatement();break;case"return":t=this.parseReturnStatement();break;case"switch":t=this.parseSwitchStatement();break;case"throw":t=this.parseThrowStatement();break;case"try":t=this.parseTryStatement();break;case"var":t=this.parseVariableStatement();break;case"while":t=this.parseWhileStatement();break;case"with":t=this.parseWithStatement();break;default:t=this.parseExpressionStatement()}break;default:t=this.throwUnexpectedToken(this.lookahead)}return t},t.prototype.parseFunctionSourceElements=function(){var t=this.createNode();this.expect("{");var e=this.parseDirectivePrologues(),n=this.context.labelSet,r=this.context.inIteration,i=this.context.inSwitch,o=this.context.inFunctionBody;for(this.context.labelSet={},this.context.inIteration=!1,this.context.inSwitch=!1,this.context.inFunctionBody=!0;2!==this.lookahead.type&&!this.match("}");)e.push(this.parseStatementListItem());return this.expect("}"),this.context.labelSet=n,this.context.inIteration=r,this.context.inSwitch=i,this.context.inFunctionBody=o,this.finalize(t,new s.BlockStatement(e))},t.prototype.validateParam=function(t,e,n){var r="$"+n;this.context.strict?(this.scanner.isRestrictedWord(n)&&(t.stricted=e,t.message=o.Messages.StrictParamName),Object.prototype.hasOwnProperty.call(t.paramSet,r)&&(t.stricted=e,t.message=o.Messages.StrictParamDupe)):t.firstRestricted||(this.scanner.isRestrictedWord(n)?(t.firstRestricted=e,t.message=o.Messages.StrictParamName):this.scanner.isStrictModeReservedWord(n)?(t.firstRestricted=e,t.message=o.Messages.StrictReservedWord):Object.prototype.hasOwnProperty.call(t.paramSet,r)&&(t.stricted=e,t.message=o.Messages.StrictParamDupe)),"function"==typeof Object.defineProperty?Object.defineProperty(t.paramSet,r,{value:!0,enumerable:!0,writable:!0,configurable:!0}):t.paramSet[r]=!0},t.prototype.parseRestElement=function(t){var e=this.createNode();this.expect("...");var n=this.parsePattern(t);return this.match("=")&&this.throwError(o.Messages.DefaultRestParameter),this.match(")")||this.throwError(o.Messages.ParameterAfterRestParameter),this.finalize(e,new s.RestElement(n))},t.prototype.parseFormalParameter=function(t){for(var e=[],n=this.match("...")?this.parseRestElement(e):this.parsePatternWithDefault(e),r=0;r<e.length;r++)this.validateParam(t,e[r],e[r].value);t.simple=t.simple&&n instanceof s.Identifier,t.params.push(n)},t.prototype.parseFormalParameters=function(t){var e;if(e={simple:!0,params:[],firstRestricted:t},this.expect("("),!this.match(")"))for(e.paramSet={};2!==this.lookahead.type&&(this.parseFormalParameter(e),!this.match(")"))&&(this.expect(","),!this.match(")")););return this.expect(")"),{simple:e.simple,params:e.params,stricted:e.stricted,firstRestricted:e.firstRestricted,message:e.message}},t.prototype.matchAsyncFunction=function(){var t=this.matchContextualKeyword("async");if(t){var e=this.scanner.saveState();this.scanner.scanComments();var n=this.scanner.lex();this.scanner.restoreState(e),t=e.lineNumber===n.lineNumber&&4===n.type&&"function"===n.value}return t},t.prototype.parseFunctionDeclaration=function(t){var e=this.createNode(),n=this.matchContextualKeyword("async");n&&this.nextToken(),this.expectKeyword("function");var r=!n&&this.match("*");r&&this.nextToken();var i,a=null,u=null;if(!t||!this.match("(")){var c=this.lookahead;a=this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(c.value)&&this.tolerateUnexpectedToken(c,o.Messages.StrictFunctionName):this.scanner.isRestrictedWord(c.value)?(u=c,i=o.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(c.value)&&(u=c,i=o.Messages.StrictReservedWord)}var h=this.context.await,l=this.context.allowYield;this.context.await=n,this.context.allowYield=!r;var p=this.parseFormalParameters(u),f=p.params,d=p.stricted;u=p.firstRestricted,p.message&&(i=p.message);var m=this.context.strict,y=this.context.allowStrictDirective;this.context.allowStrictDirective=p.simple;var v=this.parseFunctionSourceElements();return this.context.strict&&u&&this.throwUnexpectedToken(u,i),this.context.strict&&d&&this.tolerateUnexpectedToken(d,i),this.context.strict=m,this.context.allowStrictDirective=y,this.context.await=h,this.context.allowYield=l,n?this.finalize(e,new s.AsyncFunctionDeclaration(a,f,v)):this.finalize(e,new s.FunctionDeclaration(a,f,v,r))},t.prototype.parseFunctionExpression=function(){var t=this.createNode(),e=this.matchContextualKeyword("async");e&&this.nextToken(),this.expectKeyword("function");var n=!e&&this.match("*");n&&this.nextToken();var r,i,a=null,u=this.context.await,c=this.context.allowYield;if(this.context.await=e,this.context.allowYield=!n,!this.match("(")){var h=this.lookahead;a=this.context.strict||n||!this.matchKeyword("yield")?this.parseVariableIdentifier():this.parseIdentifierName(),this.context.strict?this.scanner.isRestrictedWord(h.value)&&this.tolerateUnexpectedToken(h,o.Messages.StrictFunctionName):this.scanner.isRestrictedWord(h.value)?(i=h,r=o.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(h.value)&&(i=h,r=o.Messages.StrictReservedWord)}var l=this.parseFormalParameters(i),p=l.params,f=l.stricted;i=l.firstRestricted,l.message&&(r=l.message);var d=this.context.strict,m=this.context.allowStrictDirective;this.context.allowStrictDirective=l.simple;var y=this.parseFunctionSourceElements();return this.context.strict&&i&&this.throwUnexpectedToken(i,r),this.context.strict&&f&&this.tolerateUnexpectedToken(f,r),this.context.strict=d,this.context.allowStrictDirective=m,this.context.await=u,this.context.allowYield=c,e?this.finalize(t,new s.AsyncFunctionExpression(a,p,y)):this.finalize(t,new s.FunctionExpression(a,p,y,n))},t.prototype.parseDirective=function(){var t=this.lookahead,e=this.createNode(),n=this.parseExpression(),r=n.type===u.Syntax.Literal?this.getTokenRaw(t).slice(1,-1):null;return this.consumeSemicolon(),this.finalize(e,r?new s.Directive(n,r):new s.ExpressionStatement(n))},t.prototype.parseDirectivePrologues=function(){for(var t=null,e=[];;){var n=this.lookahead;if(8!==n.type)break;var r=this.parseDirective();e.push(r);var i=r.directive;if("string"!=typeof i)break;"use strict"===i?(this.context.strict=!0,t&&this.tolerateUnexpectedToken(t,o.Messages.StrictOctalLiteral),this.context.allowStrictDirective||this.tolerateUnexpectedToken(n,o.Messages.IllegalLanguageModeDirective)):!t&&n.octal&&(t=n)}return e},t.prototype.qualifiedPropertyName=function(t){switch(t.type){case 3:case 8:case 1:case 5:case 6:case 4:return!0;case 7:return"["===t.value}return!1},t.prototype.parseGetterMethod=function(){var t=this.createNode(),e=this.context.allowYield;this.context.allowYield=!1;var n=this.parseFormalParameters();n.params.length>0&&this.tolerateError(o.Messages.BadGetterArity);var r=this.parsePropertyMethod(n);return this.context.allowYield=e,this.finalize(t,new s.FunctionExpression(null,n.params,r,!1))},t.prototype.parseSetterMethod=function(){var t=this.createNode(),e=this.context.allowYield;this.context.allowYield=!1;var n=this.parseFormalParameters();1!==n.params.length?this.tolerateError(o.Messages.BadSetterArity):n.params[0]instanceof s.RestElement&&this.tolerateError(o.Messages.BadSetterRestParameter);var r=this.parsePropertyMethod(n);return this.context.allowYield=e,this.finalize(t,new s.FunctionExpression(null,n.params,r,!1))},t.prototype.parseGeneratorMethod=function(){var t=this.createNode(),e=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters();this.context.allowYield=!1;var r=this.parsePropertyMethod(n);return this.context.allowYield=e,this.finalize(t,new s.FunctionExpression(null,n.params,r,!0))},t.prototype.isStartOfExpression=function(){var t=!0,e=this.lookahead.value;switch(this.lookahead.type){case 7:t="["===e||"("===e||"{"===e||"+"===e||"-"===e||"!"===e||"~"===e||"++"===e||"--"===e||"/"===e||"/="===e;break;case 4:t="class"===e||"delete"===e||"function"===e||"let"===e||"new"===e||"super"===e||"this"===e||"typeof"===e||"void"===e||"yield"===e}return t},t.prototype.parseYieldExpression=function(){var t=this.createNode();this.expectKeyword("yield");var e=null,n=!1;if(!this.hasLineTerminator){var r=this.context.allowYield;this.context.allowYield=!1,n=this.match("*"),n?(this.nextToken(),e=this.parseAssignmentExpression()):this.isStartOfExpression()&&(e=this.parseAssignmentExpression()),this.context.allowYield=r}return this.finalize(t,new s.YieldExpression(e,n))},t.prototype.parseClassElement=function(t){var e=this.lookahead,n=this.createNode(),r="",i=null,a=null,u=!1,c=!1,h=!1,l=!1;if(this.match("*"))this.nextToken();else{u=this.match("["),i=this.parseObjectPropertyKey();if("static"===i.name&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(e=this.lookahead,h=!0,u=this.match("["),this.match("*")?this.nextToken():i=this.parseObjectPropertyKey()),3===e.type&&!this.hasLineTerminator&&"async"===e.value){var p=this.lookahead.value;":"!==p&&"("!==p&&"*"!==p&&(l=!0,e=this.lookahead,i=this.parseObjectPropertyKey(),3===e.type&&("get"===e.value||"set"===e.value?this.tolerateUnexpectedToken(e):"constructor"===e.value&&this.tolerateUnexpectedToken(e,o.Messages.ConstructorIsAsync)))}}var f=this.qualifiedPropertyName(this.lookahead);return 3===e.type?"get"===e.value&&f?(r="get",u=this.match("["),i=this.parseObjectPropertyKey(),this.context.allowYield=!1,a=this.parseGetterMethod()):"set"===e.value&&f&&(r="set",u=this.match("["),i=this.parseObjectPropertyKey(),a=this.parseSetterMethod()):7===e.type&&"*"===e.value&&f&&(r="init",u=this.match("["),i=this.parseObjectPropertyKey(),a=this.parseGeneratorMethod(),c=!0),!r&&i&&this.match("(")&&(r="init",a=l?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),c=!0),r||this.throwUnexpectedToken(this.lookahead),"init"===r&&(r="method"),u||(h&&this.isPropertyKey(i,"prototype")&&this.throwUnexpectedToken(e,o.Messages.StaticPrototype),!h&&this.isPropertyKey(i,"constructor")&&(("method"!==r||!c||a&&a.generator)&&this.throwUnexpectedToken(e,o.Messages.ConstructorSpecialMethod),t.value?this.throwUnexpectedToken(e,o.Messages.DuplicateConstructor):t.value=!0,r="constructor")),this.finalize(n,new s.MethodDefinition(i,u,a,r,h))},t.prototype.parseClassElementList=function(){var t=[],e={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():t.push(this.parseClassElement(e));return this.expect("}"),t},t.prototype.parseClassBody=function(){var t=this.createNode(),e=this.parseClassElementList();return this.finalize(t,new s.ClassBody(e))},t.prototype.parseClassDeclaration=function(t){var e=this.createNode(),n=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var r=t&&3!==this.lookahead.type?null:this.parseVariableIdentifier(),i=null;this.matchKeyword("extends")&&(this.nextToken(),i=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var o=this.parseClassBody();return this.context.strict=n,this.finalize(e,new s.ClassDeclaration(r,i,o))},t.prototype.parseClassExpression=function(){var t=this.createNode(),e=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var n=3===this.lookahead.type?this.parseVariableIdentifier():null,r=null;this.matchKeyword("extends")&&(this.nextToken(),r=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var i=this.parseClassBody();return this.context.strict=e,this.finalize(t,new s.ClassExpression(n,r,i))},t.prototype.parseModule=function(){this.context.strict=!0,this.context.isModule=!0;for(var t=this.createNode(),e=this.parseDirectivePrologues();2!==this.lookahead.type;)e.push(this.parseStatementListItem());return this.finalize(t,new s.Module(e))},t.prototype.parseScript=function(){for(var t=this.createNode(),e=this.parseDirectivePrologues();2!==this.lookahead.type;)e.push(this.parseStatementListItem());return this.finalize(t,new s.Script(e))},t.prototype.parseModuleSpecifier=function(){var t=this.createNode();8!==this.lookahead.type&&this.throwError(o.Messages.InvalidModuleSpecifier);var e=this.nextToken(),n=this.getTokenRaw(e);return this.finalize(t,new s.Literal(e.value,n))},t.prototype.parseImportSpecifier=function(){var t,e,n=this.createNode();return 3===this.lookahead.type?(t=this.parseVariableIdentifier(),e=t,this.matchContextualKeyword("as")&&(this.nextToken(),e=this.parseVariableIdentifier())):(t=this.parseIdentifierName(),e=t,this.matchContextualKeyword("as")?(this.nextToken(),e=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(n,new s.ImportSpecifier(e,t))},t.prototype.parseNamedImports=function(){this.expect("{");for(var t=[];!this.match("}");)t.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),t},t.prototype.parseImportDefaultSpecifier=function(){var t=this.createNode(),e=this.parseIdentifierName();return this.finalize(t,new s.ImportDefaultSpecifier(e))},t.prototype.parseImportNamespaceSpecifier=function(){var t=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(o.Messages.NoAsAfterImportNamespace),this.nextToken();var e=this.parseIdentifierName();return this.finalize(t,new s.ImportNamespaceSpecifier(e))},t.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(o.Messages.IllegalImportDeclaration);var t=this.createNode();this.expectKeyword("import");var e,n=[];if(8===this.lookahead.type)e=this.parseModuleSpecifier();else{if(this.match("{")?n=n.concat(this.parseNamedImports()):this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(n.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.match("{")?n=n.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),!this.matchContextualKeyword("from")){var r=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause;this.throwError(r,this.lookahead.value)}this.nextToken(),e=this.parseModuleSpecifier()}return this.consumeSemicolon(),this.finalize(t,new s.ImportDeclaration(n,e))},t.prototype.parseExportSpecifier=function(){var t=this.createNode(),e=this.parseIdentifierName(),n=e;return this.matchContextualKeyword("as")&&(this.nextToken(),n=this.parseIdentifierName()),this.finalize(t,new s.ExportSpecifier(e,n))},t.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(o.Messages.IllegalExportDeclaration);var t=this.createNode();this.expectKeyword("export");var e;if(this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){var n=this.parseFunctionDeclaration(!0);e=this.finalize(t,new s.ExportDefaultDeclaration(n))}else if(this.matchKeyword("class")){var n=this.parseClassDeclaration(!0);e=this.finalize(t,new s.ExportDefaultDeclaration(n))}else if(this.matchContextualKeyword("async")){var n=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression();e=this.finalize(t,new s.ExportDefaultDeclaration(n))}else{this.matchContextualKeyword("from")&&this.throwError(o.Messages.UnexpectedToken,this.lookahead.value);var n=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression();this.consumeSemicolon(),e=this.finalize(t,new s.ExportDefaultDeclaration(n))}else if(this.match("*")){if(this.nextToken(),!this.matchContextualKeyword("from")){var r=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause;this.throwError(r,this.lookahead.value)}this.nextToken();var i=this.parseModuleSpecifier();this.consumeSemicolon(),e=this.finalize(t,new s.ExportAllDeclaration(i))}else if(4===this.lookahead.type){var n=void 0;switch(this.lookahead.value){case"let":case"const":n=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":n=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}e=this.finalize(t,new s.ExportNamedDeclaration(n,[],null))}else if(this.matchAsyncFunction()){var n=this.parseFunctionDeclaration();e=this.finalize(t,new s.ExportNamedDeclaration(n,[],null))}else{var a=[],u=null,c=!1;for(this.expect("{");!this.match("}");)c=c||this.matchKeyword("default"),a.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");if(this.expect("}"),this.matchContextualKeyword("from"))this.nextToken(),u=this.parseModuleSpecifier(),this.consumeSemicolon();else if(c){var r=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause;this.throwError(r,this.lookahead.value)}else this.consumeSemicolon();e=this.finalize(t,new s.ExportNamedDeclaration(null,a,u))}return e},t}();e.Parser=h},function(t,e){"use strict";function n(t,e){if(!t)throw new Error("ASSERT: "+e)}Object.defineProperty(e,"__esModule",{value:!0}),e.assert=n},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){this.errors=[],this.tolerant=!1}return t.prototype.recordError=function(t){this.errors.push(t)},t.prototype.tolerate=function(t){if(!this.tolerant)throw t;this.recordError(t)},t.prototype.constructError=function(t,e){var n=new Error(t);try{throw n}catch(t){Object.create&&Object.defineProperty&&(n=Object.create(t),Object.defineProperty(n,"column",{value:e}))}return n},t.prototype.createError=function(t,e,n,r){var i="Line "+e+": "+r,o=this.constructError(i,n);return o.index=t,o.lineNumber=e,o.description=r,o},t.prototype.throwError=function(t,e,n,r){throw this.createError(t,e,n,r)},t.prototype.tolerateError=function(t,e,n,r){var i=this.createError(t,e,n,r);if(!this.tolerant)throw i;this.recordError(i)},t}();e.ErrorHandler=n},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(t,e,n){"use strict";function r(t){return"0123456789abcdef".indexOf(t.toLowerCase())}function i(t){return"01234567".indexOf(t)}Object.defineProperty(e,"__esModule",{value:!0});var o=n(9),s=n(4),a=n(11),u=function(){function t(t,e){this.source=t,this.errorHandler=e,this.trackComment=!1,this.length=t.length,this.index=0,this.lineNumber=t.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return t.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}},t.prototype.restoreState=function(t){this.index=t.index,this.lineNumber=t.lineNumber,this.lineStart=t.lineStart},t.prototype.eof=function(){return this.index>=this.length},t.prototype.throwUnexpectedToken=function(t){return void 0===t&&(t=a.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,t)},t.prototype.tolerateUnexpectedToken=function(t){void 0===t&&(t=a.Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,t)},t.prototype.skipSingleLineComment=function(t){var e,n,r=[];for(this.trackComment&&(r=[],e=this.index-t,n={start:{line:this.lineNumber,column:this.index-this.lineStart-t},end:{}});!this.eof();){var i=this.source.charCodeAt(this.index);if(++this.index,s.Character.isLineTerminator(i)){if(this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart-1};var o={multiLine:!1,slice:[e+t,this.index-1],range:[e,this.index-1],loc:n};r.push(o)}return 13===i&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,r}}if(this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart};var o={multiLine:!1,slice:[e+t,this.index],range:[e,this.index],loc:n};r.push(o)}return r},t.prototype.skipMultiLineComment=function(){var t,e,n=[];for(this.trackComment&&(n=[],t=this.index-2,e={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var r=this.source.charCodeAt(this.index);if(s.Character.isLineTerminator(r))13===r&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===r){if(47===this.source.charCodeAt(this.index+1)){if(this.index+=2,this.trackComment){e.end={line:this.lineNumber,column:this.index-this.lineStart};var i={multiLine:!0,slice:[t+2,this.index-2],range:[t,this.index],loc:e};n.push(i)}return n}++this.index}else++this.index}if(this.trackComment){e.end={line:this.lineNumber,column:this.index-this.lineStart};var i={multiLine:!0,slice:[t+2,this.index],range:[t,this.index],loc:e};n.push(i)}return this.tolerateUnexpectedToken(),n},t.prototype.scanComments=function(){var t;this.trackComment&&(t=[]);for(var e=0===this.index;!this.eof();){var n=this.source.charCodeAt(this.index);if(s.Character.isWhiteSpace(n))++this.index;else if(s.Character.isLineTerminator(n))++this.index,13===n&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,e=!0;else if(47===n)if(47===(n=this.source.charCodeAt(this.index+1))){this.index+=2;var r=this.skipSingleLineComment(2);this.trackComment&&(t=t.concat(r)),e=!0}else{if(42!==n)break;this.index+=2;var r=this.skipMultiLineComment();this.trackComment&&(t=t.concat(r))}else if(e&&45===n){if(45!==this.source.charCodeAt(this.index+1)||62!==this.source.charCodeAt(this.index+2))break;this.index+=3;var r=this.skipSingleLineComment(3);this.trackComment&&(t=t.concat(r))}else{if(60!==n)break;if("!--"!==this.source.slice(this.index+1,this.index+4))break;this.index+=4;var r=this.skipSingleLineComment(4);this.trackComment&&(t=t.concat(r))}}return t},t.prototype.isFutureReservedWord=function(t){switch(t){case"enum":case"export":case"import":case"super":return!0;default:return!1}},t.prototype.isStrictModeReservedWord=function(t){switch(t){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},t.prototype.isRestrictedWord=function(t){return"eval"===t||"arguments"===t},t.prototype.isKeyword=function(t){switch(t.length){case 2:return"if"===t||"in"===t||"do"===t;case 3:return"var"===t||"for"===t||"new"===t||"try"===t||"let"===t;case 4:return"this"===t||"else"===t||"case"===t||"void"===t||"with"===t||"enum"===t;case 5:return"while"===t||"break"===t||"catch"===t||"throw"===t||"const"===t||"yield"===t||"class"===t||"super"===t;case 6:return"return"===t||"typeof"===t||"delete"===t||"switch"===t||"export"===t||"import"===t;case 7:return"default"===t||"finally"===t||"extends"===t;case 8:return"function"===t||"continue"===t||"debugger"===t;case 10:return"instanceof"===t;default:return!1}},t.prototype.codePointAt=function(t){var e=this.source.charCodeAt(t);if(e>=55296&&e<=56319){var n=this.source.charCodeAt(t+1);if(n>=56320&&n<=57343){e=1024*(e-55296)+n-56320+65536}}return e},t.prototype.scanHexEscape=function(t){for(var e="u"===t?4:2,n=0,i=0;i<e;++i){if(this.eof()||!s.Character.isHexDigit(this.source.charCodeAt(this.index)))return null;n=16*n+r(this.source[this.index++])}return String.fromCharCode(n)},t.prototype.scanUnicodeCodePointEscape=function(){var t=this.source[this.index],e=0;for("}"===t&&this.throwUnexpectedToken();!this.eof()&&(t=this.source[this.index++],s.Character.isHexDigit(t.charCodeAt(0)));)e=16*e+r(t);return(e>1114111||"}"!==t)&&this.throwUnexpectedToken(),s.Character.fromCodePoint(e)},t.prototype.getIdentifier=function(){for(var t=this.index++;!this.eof();){var e=this.source.charCodeAt(this.index);if(92===e)return this.index=t,this.getComplexIdentifier();if(e>=55296&&e<57343)return this.index=t,this.getComplexIdentifier();if(!s.Character.isIdentifierPart(e))break;++this.index}return this.source.slice(t,this.index)},t.prototype.getComplexIdentifier=function(){var t=this.codePointAt(this.index),e=s.Character.fromCodePoint(t);this.index+=e.length;var n;for(92===t&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,n=this.scanUnicodeCodePointEscape()):null!==(n=this.scanHexEscape("u"))&&"\\"!==n&&s.Character.isIdentifierStart(n.charCodeAt(0))||this.throwUnexpectedToken(),e=n);!this.eof()&&(t=this.codePointAt(this.index),s.Character.isIdentifierPart(t));)n=s.Character.fromCodePoint(t),e+=n,this.index+=n.length,92===t&&(e=e.substr(0,e.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,n=this.scanUnicodeCodePointEscape()):null!==(n=this.scanHexEscape("u"))&&"\\"!==n&&s.Character.isIdentifierPart(n.charCodeAt(0))||this.throwUnexpectedToken(),e+=n);return e},t.prototype.octalToDecimal=function(t){var e="0"!==t,n=i(t);return!this.eof()&&s.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(e=!0,n=8*n+i(this.source[this.index++]),"0123".indexOf(t)>=0&&!this.eof()&&s.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(n=8*n+i(this.source[this.index++]))),{code:n,octal:e}},t.prototype.scanIdentifier=function(){var t,e=this.index,n=92===this.source.charCodeAt(e)?this.getComplexIdentifier():this.getIdentifier();if(3!==(t=1===n.length?3:this.isKeyword(n)?4:"null"===n?5:"true"===n||"false"===n?1:3)&&e+n.length!==this.index){var r=this.index;this.index=e,this.tolerateUnexpectedToken(a.Messages.InvalidEscapedReservedWord),this.index=r}return{type:t,value:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},t.prototype.scanPunctuator=function(){var t=this.index,e=this.source[this.index];switch(e){case"(":case"{":"{"===e&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,e="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:e=this.source.substr(this.index,4),">>>="===e?this.index+=4:(e=e.substr(0,3),"==="===e||"!=="===e||">>>"===e||"<<="===e||">>="===e||"**="===e?this.index+=3:(e=e.substr(0,2),"&&"===e||"||"===e||"=="===e||"!="===e||"+="===e||"-="===e||"*="===e||"/="===e||"++"===e||"--"===e||"<<"===e||">>"===e||"&="===e||"|="===e||"^="===e||"%="===e||"<="===e||">="===e||"=>"===e||"**"===e?this.index+=2:(e=this.source[this.index],"<>=!+-*%&|^/".indexOf(e)>=0&&++this.index)))}return this.index===t&&this.throwUnexpectedToken(),{type:7,value:e,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},t.prototype.scanHexLiteral=function(t){for(var e="";!this.eof()&&s.Character.isHexDigit(this.source.charCodeAt(this.index));)e+=this.source[this.index++];return 0===e.length&&this.throwUnexpectedToken(),s.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+e,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},t.prototype.scanBinaryLiteral=function(t){for(var e,n="";!this.eof()&&("0"===(e=this.source[this.index])||"1"===e);)n+=this.source[this.index++];return 0===n.length&&this.throwUnexpectedToken(),this.eof()||(e=this.source.charCodeAt(this.index),(s.Character.isIdentifierStart(e)||s.Character.isDecimalDigit(e))&&this.throwUnexpectedToken()),{type:6,value:parseInt(n,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},t.prototype.scanOctalLiteral=function(t,e){var n="",r=!1;for(s.Character.isOctalDigit(t.charCodeAt(0))?(r=!0,n="0"+this.source[this.index++]):++this.index;!this.eof()&&s.Character.isOctalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];return r||0!==n.length||this.throwUnexpectedToken(),(s.Character.isIdentifierStart(this.source.charCodeAt(this.index))||s.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(n,8),octal:r,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},t.prototype.isImplicitOctalLiteral=function(){for(var t=this.index+1;t<this.length;++t){var e=this.source[t];if("8"===e||"9"===e)return!1;if(!s.Character.isOctalDigit(e.charCodeAt(0)))return!0}return!0},t.prototype.scanNumericLiteral=function(){var t=this.index,e=this.source[t];o.assert(s.Character.isDecimalDigit(e.charCodeAt(0))||"."===e,"Numeric literal must start with a decimal digit or a decimal point");var n="";if("."!==e){if(n=this.source[this.index++],e=this.source[this.index],"0"===n){if("x"===e||"X"===e)return++this.index,this.scanHexLiteral(t);if("b"===e||"B"===e)return++this.index,this.scanBinaryLiteral(t);if("o"===e||"O"===e)return this.scanOctalLiteral(e,t);if(e&&s.Character.isOctalDigit(e.charCodeAt(0))&&this.isImplicitOctalLiteral())return this.scanOctalLiteral(e,t)}for(;s.Character.isDecimalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];e=this.source[this.index]}if("."===e){for(n+=this.source[this.index++];s.Character.isDecimalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];e=this.source[this.index]}if("e"===e||"E"===e)if(n+=this.source[this.index++],e=this.source[this.index],"+"!==e&&"-"!==e||(n+=this.source[this.index++]),s.Character.isDecimalDigit(this.source.charCodeAt(this.index)))for(;s.Character.isDecimalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];else this.throwUnexpectedToken();return s.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseFloat(n),lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},t.prototype.scanStringLiteral=function(){var t=this.index,e=this.source[t];o.assert("'"===e||'"'===e,"String literal must starts with a quote"),++this.index;for(var n=!1,r="";!this.eof();){var i=this.source[this.index++];if(i===e){e="";break}if("\\"===i)if((i=this.source[this.index++])&&s.Character.isLineTerminator(i.charCodeAt(0)))++this.lineNumber,"\r"===i&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index;else switch(i){case"u":if("{"===this.source[this.index])++this.index,r+=this.scanUnicodeCodePointEscape();else{var u=this.scanHexEscape(i);null===u&&this.throwUnexpectedToken(),r+=u}break;case"x":var c=this.scanHexEscape(i);null===c&&this.throwUnexpectedToken(a.Messages.InvalidHexEscapeSequence),r+=c;break;case"n":r+="\n";break;case"r":r+="\r";break;case"t":r+="\t";break;case"b":r+="\b";break;case"f":r+="\f";break;case"v":r+="\v";break;case"8":case"9":r+=i,this.tolerateUnexpectedToken();break;default:if(i&&s.Character.isOctalDigit(i.charCodeAt(0))){var h=this.octalToDecimal(i);n=h.octal||n,r+=String.fromCharCode(h.code)}else r+=i}else{if(s.Character.isLineTerminator(i.charCodeAt(0)))break;r+=i}}return""!==e&&(this.index=t,this.throwUnexpectedToken()),{type:8,value:r,octal:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},t.prototype.scanTemplate=function(){var t="",e=!1,n=this.index,r="`"===this.source[n],i=!1,o=2;for(++this.index;!this.eof();){var u=this.source[this.index++];if("`"===u){o=1,i=!0,e=!0;break}if("$"===u){if("{"===this.source[this.index]){this.curlyStack.push("${"),++this.index,e=!0;break}t+=u}else if("\\"===u)if(u=this.source[this.index++],s.Character.isLineTerminator(u.charCodeAt(0)))++this.lineNumber,"\r"===u&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index;else switch(u){case"n":t+="\n";break;case"r":t+="\r";break;case"t":t+="\t";break;case"u":if("{"===this.source[this.index])++this.index,t+=this.scanUnicodeCodePointEscape();else{var c=this.index,h=this.scanHexEscape(u);null!==h?t+=h:(this.index=c,t+=u)}break;case"x":var l=this.scanHexEscape(u);null===l&&this.throwUnexpectedToken(a.Messages.InvalidHexEscapeSequence),t+=l;break;case"b":t+="\b";break;case"f":t+="\f";break;case"v":t+="\v";break;default:"0"===u?(s.Character.isDecimalDigit(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(a.Messages.TemplateOctalLiteral),t+="\0"):s.Character.isOctalDigit(u.charCodeAt(0))?this.throwUnexpectedToken(a.Messages.TemplateOctalLiteral):t+=u}else s.Character.isLineTerminator(u.charCodeAt(0))?(++this.lineNumber,"\r"===u&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index,t+="\n"):t+=u}return e||this.throwUnexpectedToken(),r||this.curlyStack.pop(),{type:10,value:this.source.slice(n+1,this.index-o),cooked:t,head:r,tail:i,lineNumber:this.lineNumber,lineStart:this.lineStart,start:n,end:this.index}},t.prototype.testRegExp=function(t,e){var n=t,r=this;e.indexOf("u")>=0&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(t,e,n){var i=parseInt(e||n,16);return i>1114111&&r.throwUnexpectedToken(a.Messages.InvalidRegExp),i<=65535?String.fromCharCode(i):"￿"}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"￿"));try{RegExp(n)}catch(t){this.throwUnexpectedToken(a.Messages.InvalidRegExp)}try{return new RegExp(t,e)}catch(t){return null}},t.prototype.scanRegExpBody=function(){var t=this.source[this.index];o.assert("/"===t,"Regular expression literal must start with a slash");for(var e=this.source[this.index++],n=!1,r=!1;!this.eof();)if(t=this.source[this.index++],e+=t,"\\"===t)t=this.source[this.index++],s.Character.isLineTerminator(t.charCodeAt(0))&&this.throwUnexpectedToken(a.Messages.UnterminatedRegExp),e+=t;else if(s.Character.isLineTerminator(t.charCodeAt(0)))this.throwUnexpectedToken(a.Messages.UnterminatedRegExp);else if(n)"]"===t&&(n=!1);else{if("/"===t){r=!0;break}"["===t&&(n=!0)}return r||this.throwUnexpectedToken(a.Messages.UnterminatedRegExp),e.substr(1,e.length-2)},t.prototype.scanRegExpFlags=function(){for(var t="",e="";!this.eof();){var n=this.source[this.index];if(!s.Character.isIdentifierPart(n.charCodeAt(0)))break;if(++this.index,"\\"!==n||this.eof())e+=n,t+=n;else if("u"===(n=this.source[this.index])){++this.index;var r=this.index,i=this.scanHexEscape("u");if(null!==i)for(e+=i,t+="\\u";r<this.index;++r)t+=this.source[r];else this.index=r,e+="u",t+="\\u";this.tolerateUnexpectedToken()}else t+="\\",this.tolerateUnexpectedToken()}return e},t.prototype.scanRegExp=function(){var t=this.index,e=this.scanRegExpBody(),n=this.scanRegExpFlags();return{type:9,value:"",pattern:e,flags:n,regex:this.testRegExp(e,n),lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},t.prototype.lex=function(){if(this.eof())return{type:2,value:"",lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index};var t=this.source.charCodeAt(this.index);return s.Character.isIdentifierStart(t)?this.scanIdentifier():40===t||41===t||59===t?this.scanPunctuator():39===t||34===t?this.scanStringLiteral():46===t?s.Character.isDecimalDigit(this.source.charCodeAt(this.index+1))?this.scanNumericLiteral():this.scanPunctuator():s.Character.isDecimalDigit(t)?this.scanNumericLiteral():96===t||125===t&&"${"===this.curlyStack[this.curlyStack.length-1]?this.scanTemplate():t>=55296&&t<57343&&s.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},t}();e.Scanner=u},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenName={},e.TokenName[1]="Boolean",e.TokenName[2]="<end>",e.TokenName[3]="Identifier",e.TokenName[4]="Keyword",e.TokenName[5]="Null",e.TokenName[6]="Numeric",e.TokenName[7]="Punctuator",e.TokenName[8]="String",e.TokenName[9]="RegularExpression",e.TokenName[10]="Template"},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",lang:"⟨",rang:"⟩"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(10),i=n(12),o=n(13),s=function(){function t(){this.values=[],this.curly=this.paren=-1}return t.prototype.beforeFunctionExpression=function(t){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(t)>=0},t.prototype.isRegexStart=function(){var t=this.values[this.values.length-1],e=null!==t;switch(t){case"this":case"]":e=!1;break;case")":var n=this.values[this.paren-1];e="if"===n||"while"===n||"for"===n||"with"===n;break;case"}":if(e=!1,"function"===this.values[this.curly-3]){var r=this.values[this.curly-4];e=!!r&&!this.beforeFunctionExpression(r)}else if("function"===this.values[this.curly-4]){var r=this.values[this.curly-5];e=!r||!this.beforeFunctionExpression(r)}}return e},t.prototype.push=function(t){7===t.type||4===t.type?("{"===t.value?this.curly=this.values.length:"("===t.value&&(this.paren=this.values.length),this.values.push(t.value)):this.values.push(null)},t}(),a=function(){function t(t,e){this.errorHandler=new r.ErrorHandler,this.errorHandler.tolerant=!!e&&("boolean"==typeof e.tolerant&&e.tolerant),this.scanner=new i.Scanner(t,this.errorHandler),this.scanner.trackComment=!!e&&("boolean"==typeof e.comment&&e.comment),this.trackRange=!!e&&("boolean"==typeof e.range&&e.range),this.trackLoc=!!e&&("boolean"==typeof e.loc&&e.loc),this.buffer=[],this.reader=new s}return t.prototype.errors=function(){return this.errorHandler.errors},t.prototype.getNextToken=function(){if(0===this.buffer.length){var t=this.scanner.scanComments();if(this.scanner.trackComment)for(var e=0;e<t.length;++e){var n=t[e],r=this.scanner.source.slice(n.slice[0],n.slice[1]),i={type:n.multiLine?"BlockComment":"LineComment",value:r};this.trackRange&&(i.range=n.range),this.trackLoc&&(i.loc=n.loc),this.buffer.push(i)}if(!this.scanner.eof()){var s=void 0;this.trackLoc&&(s={start:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},end:{}});var a="/"===this.scanner.source[this.scanner.index]&&this.reader.isRegexStart(),u=a?this.scanner.scanRegExp():this.scanner.lex();this.reader.push(u);var c={type:o.TokenName[u.type],value:this.scanner.source.slice(u.start,u.end)};if(this.trackRange&&(c.range=[u.start,u.end]),this.trackLoc&&(s.end={line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},c.loc=s),9===u.type){var h=u.pattern,l=u.flags;c.regex={pattern:h,flags:l}}this.buffer.push(c)}}return this.buffer.shift()},t}();e.Tokenizer=a}])})},function(t,e){e.read=function(t,e,n,r,i){var o,s,a=8*i-r-1,u=(1<<a)-1,c=u>>1,h=-7,l=n?i-1:0,p=n?-1:1,f=t[e+l];for(l+=p,o=f&(1<<-h)-1,f>>=-h,h+=a;h>0;o=256*o+t[e+l],l+=p,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=r;h>0;s=256*s+t[e+l],l+=p,h-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(f?-1:1);s+=Math.pow(2,r),o-=c}return(f?-1:1)*s*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var s,a,u,c=8*o-i-1,h=(1<<c)-1,l=h>>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:o-1,d=r?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=h):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),e+=s+l>=1?p/u:p*Math.pow(2,1-l),e*u>=2&&(s++,u/=2),s+l>=h?(a=0,s=h):s+l>=1?(a=(e*u-1)*Math.pow(2,i),s+=l):(a=e*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;t[n+f]=255&a,f+=d,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;t[n+f]=255&s,f+=d,s/=256,c-=8);t[n+f-d]|=128*m}},function(t,e,n){!function(e,n){t.exports=n()}(0,function(){"use strict";function t(t,e){e&&(t.prototype=Object.create(e.prototype)),t.prototype.constructor=t}function e(t){return o(t)?t:k(t)}function n(t){return s(t)?t:I(t)}function r(t){return a(t)?t:T(t)}function i(t){return o(t)&&!u(t)?t:B(t)}function o(t){return!(!t||!t[cn])}function s(t){return!(!t||!t[hn])}function a(t){return!(!t||!t[ln])}function u(t){return s(t)||a(t)}function c(t){return!(!t||!t[pn])}function h(t){return t.value=!1,t}function l(t){t&&(t.value=!0)}function p(){}function f(t,e){e=e||0;for(var n=Math.max(0,t.length-e),r=new Array(n),i=0;i<n;i++)r[i]=t[i+e];return r}function d(t){return void 0===t.size&&(t.size=t.__iterate(y)),t.size}function m(t,e){if("number"!=typeof e){var n=e>>>0;if(""+n!==e||4294967295===n)return NaN;e=n}return e<0?d(t)+e:e}function y(){return!0}function v(t,e,n){return(0===t||void 0!==n&&t<=-n)&&(void 0===e||void 0!==n&&e>=n)}function x(t,e){return D(t,e,0)}function g(t,e){return D(t,e,e)}function D(t,e,n){return void 0===t?n:t<0?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}function E(t){this.next=t}function A(t,e,n,r){var i=0===t?e:1===t?n:[e,n];return r?r.value=i:r={value:i,done:!1},r}function S(){return{value:void 0,done:!0}}function w(t){return!!b(t)}function C(t){return t&&"function"==typeof t.next}function _(t){var e=b(t);return e&&e.call(t)}function b(t){var e=t&&(An&&t[An]||t[Sn]);if("function"==typeof e)return e}function F(t){return t&&"number"==typeof t.length}function k(t){return null===t||void 0===t?U():o(t)?t.toSeq():z(t)}function I(t){return null===t||void 0===t?U().toKeyedSeq():o(t)?s(t)?t.toSeq():t.fromEntrySeq():j(t)}function T(t){return null===t||void 0===t?U():o(t)?s(t)?t.entrySeq():t.toIndexedSeq():L(t)}function B(t){return(null===t||void 0===t?U():o(t)?s(t)?t.entrySeq():t:L(t)).toSetSeq()}function M(t){this._array=t,this.size=t.length}function P(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}function N(t){this._iterable=t,this.size=t.length||t.size}function O(t){this._iterator=t,this._iteratorCache=[]}function R(t){return!(!t||!t[Cn])}function U(){return _n||(_n=new M([]))}function j(t){var e=Array.isArray(t)?new M(t).fromEntrySeq():C(t)?new O(t).fromEntrySeq():w(t)?new N(t).fromEntrySeq():"object"==typeof t?new P(t):void 0;if(!e)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+t);return e}function L(t){var e=J(t);if(!e)throw new TypeError("Expected Array or iterable object of values: "+t);return e}function z(t){var e=J(t)||"object"==typeof t&&new P(t);if(!e)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+t);return e}function J(t){return F(t)?new M(t):C(t)?new O(t):w(t)?new N(t):void 0}function X(t,e,n,r){var i=t._cache;if(i){for(var o=i.length-1,s=0;s<=o;s++){var a=i[n?o-s:s];if(!1===e(a[1],r?a[0]:s,t))return s+1}return s}return t.__iterateUncached(e,n)}function q(t,e,n,r){var i=t._cache;if(i){var o=i.length-1,s=0;return new E(function(){var t=i[n?o-s:s];return s++>o?S():A(e,r?t[0]:s-1,t[1])})}return t.__iteratorUncached(e,n)}function K(t,e){return e?Y(e,t,"",{"":t}):W(t)}function Y(t,e,n,r){return Array.isArray(e)?t.call(r,n,T(e).map(function(n,r){return Y(t,n,r,e)})):G(e)?t.call(r,n,I(e).map(function(n,r){return Y(t,n,r,e)})):e}function W(t){return Array.isArray(t)?T(t).map(W).toList():G(t)?I(t).map(W).toMap():t}function G(t){return t&&(t.constructor===Object||void 0===t.constructor)}function H(t,e){if(t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if(t=t.valueOf(),e=e.valueOf(),t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1}return!("function"!=typeof t.equals||"function"!=typeof e.equals||!t.equals(e))}function V(t,e){if(t===e)return!0;if(!o(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||s(t)!==s(e)||a(t)!==a(e)||c(t)!==c(e))return!1;if(0===t.size&&0===e.size)return!0;var n=!u(t);if(c(t)){var r=t.entries();return e.every(function(t,e){var i=r.next().value;return i&&H(i[1],t)&&(n||H(i[0],e))})&&r.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{i=!0;var h=t;t=e,e=h}var l=!0,p=e.__iterate(function(e,r){if(n?!t.has(e):i?!H(e,t.get(r,yn)):!H(t.get(r,yn),e))return l=!1,!1});return l&&t.size===p}function $(t,e){if(!(this instanceof $))return new $(t,e);if(this._value=t,this.size=void 0===e?1/0:Math.max(0,e),0===this.size){if(bn)return bn;bn=this}}function Z(t,e){if(!t)throw new Error(e)}function Q(t,e,n){if(!(this instanceof Q))return new Q(t,e,n);if(Z(0!==n,"Cannot step a Range by 0"),t=t||0,void 0===e&&(e=1/0),n=void 0===n?1:Math.abs(n),e<t&&(n=-n),this._start=t,this._end=e,this._step=n,this.size=Math.max(0,Math.ceil((e-t)/n-1)+1),0===this.size){if(Fn)return Fn;Fn=this}}function tt(){throw TypeError("Abstract")}function et(){}function nt(){}function rt(){}function it(t){return t>>>1&1073741824|3221225471&t}function ot(t){if(!1===t||null===t||void 0===t)return 0;if("function"==typeof t.valueOf&&(!1===(t=t.valueOf())||null===t||void 0===t))return 0;if(!0===t)return 1;var e=typeof t;if("number"===e){if(t!==t||t===1/0)return 0;var n=0|t;for(n!==t&&(n^=4294967295*t);t>4294967295;)t/=4294967295,n^=t;return it(n)}if("string"===e)return t.length>On?st(t):at(t);if("function"==typeof t.hashCode)return t.hashCode();if("object"===e)return ut(t);if("function"==typeof t.toString)return at(t.toString());throw new Error("Value type "+e+" cannot be hashed.")}function st(t){var e=jn[t];return void 0===e&&(e=at(t),Un===Rn&&(Un=0,jn={}),Un++,jn[t]=e),e}function at(t){for(var e=0,n=0;n<t.length;n++)e=31*e+t.charCodeAt(n)|0;return it(e)}function ut(t){var e;if(Mn&&void 0!==(e=kn.get(t)))return e;if(void 0!==(e=t[Nn]))return e;if(!Bn){if(void 0!==(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[Nn]))return e;if(void 0!==(e=ct(t)))return e}if(e=++Pn,1073741824&Pn&&(Pn=0),Mn)kn.set(t,e);else{if(void 0!==Tn&&!1===Tn(t))throw new Error("Non-extensible objects are not allowed as keys.");if(Bn)Object.defineProperty(t,Nn,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(void 0!==t.propertyIsEnumerable&&t.propertyIsEnumerable===t.constructor.prototype.propertyIsEnumerable)t.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},t.propertyIsEnumerable[Nn]=e;else{if(void 0===t.nodeType)throw new Error("Unable to set a non-enumerable property on object.");t[Nn]=e}}return e}function ct(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}function ht(t){Z(t!==1/0,"Cannot perform this action with an infinite size.")}function lt(t){return null===t||void 0===t?At():pt(t)&&!c(t)?t:At().withMutations(function(e){var r=n(t);ht(r.size),r.forEach(function(t,n){return e.set(n,t)})})}function pt(t){return!(!t||!t[Ln])}function ft(t,e){this.ownerID=t,this.entries=e}function dt(t,e,n){this.ownerID=t,this.bitmap=e,this.nodes=n}function mt(t,e,n){this.ownerID=t,this.count=e,this.nodes=n}function yt(t,e,n){this.ownerID=t,this.keyHash=e,this.entries=n}function vt(t,e,n){this.ownerID=t,this.keyHash=e,this.entry=n}function xt(t,e,n){this._type=e,this._reverse=n,this._stack=t._root&&Dt(t._root)}function gt(t,e){return A(t,e[0],e[1])}function Dt(t,e){return{node:t,index:0,__prev:e}}function Et(t,e,n,r){var i=Object.create(zn);return i.size=t,i._root=e,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function At(){return Jn||(Jn=Et(0))}function St(t,e,n){var r,i;if(t._root){var o=h(vn),s=h(xn);if(r=wt(t._root,t.__ownerID,0,void 0,e,n,o,s),!s.value)return t;i=t.size+(o.value?n===yn?-1:1:0)}else{if(n===yn)return t;i=1,r=new ft(t.__ownerID,[[e,n]])}return t.__ownerID?(t.size=i,t._root=r,t.__hash=void 0,t.__altered=!0,t):r?Et(i,r):At()}function wt(t,e,n,r,i,o,s,a){return t?t.update(e,n,r,i,o,s,a):o===yn?t:(l(a),l(s),new vt(e,r,[i,o]))}function Ct(t){return t.constructor===vt||t.constructor===yt}function _t(t,e,n,r,i){if(t.keyHash===r)return new yt(e,r,[t.entry,i]);var o,s=(0===n?t.keyHash:t.keyHash>>>n)&mn,a=(0===n?r:r>>>n)&mn;return new dt(e,1<<s|1<<a,s===a?[_t(t,e,n+fn,r,i)]:(o=new vt(e,r,i),s<a?[t,o]:[o,t]))}function bt(t,e,n,r){t||(t=new p);for(var i=new vt(t,ot(n),[n,r]),o=0;o<e.length;o++){var s=e[o];i=i.update(t,0,void 0,s[0],s[1])}return i}function Ft(t,e,n,r){for(var i=0,o=0,s=new Array(n),a=0,u=1,c=e.length;a<c;a++,u<<=1){var h=e[a];void 0!==h&&a!==r&&(i|=u,s[o++]=h)}return new dt(t,i,s)}function kt(t,e,n,r,i){for(var o=0,s=new Array(dn),a=0;0!==n;a++,n>>>=1)s[a]=1&n?e[o++]:void 0;return s[r]=i,new mt(t,o+1,s)}function It(t,e,r){for(var i=[],s=0;s<r.length;s++){var a=r[s],u=n(a);o(a)||(u=u.map(function(t){return K(t)})),i.push(u)}return Mt(t,e,i)}function Tt(t,e,n){return t&&t.mergeDeep&&o(e)?t.mergeDeep(e):H(t,e)?t:e}function Bt(t){return function(e,n,r){if(e&&e.mergeDeepWith&&o(n))return e.mergeDeepWith(t,n);var i=t(e,n,r);return H(e,i)?e:i}}function Mt(t,e,n){return n=n.filter(function(t){return 0!==t.size}),0===n.length?t:0!==t.size||t.__ownerID||1!==n.length?t.withMutations(function(t){for(var r=e?function(n,r){t.update(r,yn,function(t){return t===yn?n:e(t,n,r)})}:function(e,n){t.set(n,e)},i=0;i<n.length;i++)n[i].forEach(r)}):t.constructor(n[0])}function Pt(t,e,n,r){var i=t===yn,o=e.next();if(o.done){var s=i?n:t,a=r(s);return a===s?t:a}Z(i||t&&t.set,"invalid keyPath");var u=o.value,c=i?yn:t.get(u,yn),h=Pt(c,e,n,r);return h===c?t:h===yn?t.remove(u):(i?At():t).set(u,h)}function Nt(t){return t-=t>>1&1431655765,t=(858993459&t)+(t>>2&858993459),t=t+(t>>4)&252645135,t+=t>>8,127&(t+=t>>16)}function Ot(t,e,n,r){var i=r?t:f(t);return i[e]=n,i}function Rt(t,e,n,r){var i=t.length+1;if(r&&e+1===i)return t[e]=n,t;for(var o=new Array(i),s=0,a=0;a<i;a++)a===e?(o[a]=n,s=-1):o[a]=t[a+s];return o}function Ut(t,e,n){var r=t.length-1;if(n&&e===r)return t.pop(),t;for(var i=new Array(r),o=0,s=0;s<r;s++)s===e&&(o=1),i[s]=t[s+o];return i}function jt(t){var e=qt();if(null===t||void 0===t)return e;if(Lt(t))return t;var n=r(t),i=n.size;return 0===i?e:(ht(i),i>0&&i<dn?Xt(0,i,fn,null,new zt(n.toArray())):e.withMutations(function(t){t.setSize(i),n.forEach(function(e,n){return t.set(n,e)})}))}function Lt(t){return!(!t||!t[Yn])}function zt(t,e){this.array=t,this.ownerID=e}function Jt(t,e){function n(t,e,n){return 0===e?r(t,n):i(t,e,n)}function r(t,n){var r=n===a?u&&u.array:t&&t.array,i=n>o?0:o-n,c=s-n;return c>dn&&(c=dn),function(){if(i===c)return Hn;var t=e?--c:i++;return r&&r[t]}}function i(t,r,i){var a,u=t&&t.array,c=i>o?0:o-i>>r,h=1+(s-i>>r);return h>dn&&(h=dn),function(){for(;;){if(a){var t=a();if(t!==Hn)return t;a=null}if(c===h)return Hn;var o=e?--h:c++;a=n(u&&u[o],r-fn,i+(o<<r))}}}var o=t._origin,s=t._capacity,a=$t(s),u=t._tail;return n(t._root,t._level,0)}function Xt(t,e,n,r,i,o,s){var a=Object.create(Wn);return a.size=e-t,a._origin=t,a._capacity=e,a._level=n,a._root=r,a._tail=i,a.__ownerID=o,a.__hash=s,a.__altered=!1,a}function qt(){return Gn||(Gn=Xt(0,0,fn))}function Kt(t,e,n){if((e=m(t,e))!==e)return t;if(e>=t.size||e<0)return t.withMutations(function(t){e<0?Ht(t,e).set(0,n):Ht(t,0,e+1).set(e,n)});e+=t._origin;var r=t._tail,i=t._root,o=h(xn);return e>=$t(t._capacity)?r=Yt(r,t.__ownerID,0,e,n,o):i=Yt(i,t.__ownerID,t._level,e,n,o),o.value?t.__ownerID?(t._root=i,t._tail=r,t.__hash=void 0,t.__altered=!0,t):Xt(t._origin,t._capacity,t._level,i,r):t}function Yt(t,e,n,r,i,o){var s=r>>>n&mn,a=t&&s<t.array.length;if(!a&&void 0===i)return t;var u;if(n>0){var c=t&&t.array[s],h=Yt(c,e,n-fn,r,i,o);return h===c?t:(u=Wt(t,e),u.array[s]=h,u)}return a&&t.array[s]===i?t:(l(o),u=Wt(t,e),void 0===i&&s===u.array.length-1?u.array.pop():u.array[s]=i,u)}function Wt(t,e){return e&&t&&e===t.ownerID?t:new zt(t?t.array.slice():[],e)}function Gt(t,e){if(e>=$t(t._capacity))return t._tail;if(e<1<<t._level+fn){for(var n=t._root,r=t._level;n&&r>0;)n=n.array[e>>>r&mn],r-=fn;return n}}function Ht(t,e,n){void 0!==e&&(e|=0),void 0!==n&&(n|=0);var r=t.__ownerID||new p,i=t._origin,o=t._capacity,s=i+e,a=void 0===n?o:n<0?o+n:i+n;if(s===i&&a===o)return t;if(s>=a)return t.clear();for(var u=t._level,c=t._root,h=0;s+h<0;)c=new zt(c&&c.array.length?[void 0,c]:[],r),u+=fn,h+=1<<u;h&&(s+=h,i+=h,a+=h,o+=h);for(var l=$t(o),f=$t(a);f>=1<<u+fn;)c=new zt(c&&c.array.length?[c]:[],r),u+=fn;var d=t._tail,m=f<l?Gt(t,a-1):f>l?new zt([],r):d;if(d&&f>l&&s<o&&d.array.length){c=Wt(c,r);for(var y=c,v=u;v>fn;v-=fn){var x=l>>>v&mn;y=y.array[x]=Wt(y.array[x],r)}y.array[l>>>fn&mn]=d}if(a<o&&(m=m&&m.removeAfter(r,0,a)),s>=f)s-=f,a-=f,u=fn,c=null,m=m&&m.removeBefore(r,0,s);else if(s>i||f<l){for(h=0;c;){var g=s>>>u&mn;if(g!==f>>>u&mn)break;g&&(h+=(1<<u)*g),u-=fn,c=c.array[g]}c&&s>i&&(c=c.removeBefore(r,u,s-h)),c&&f<l&&(c=c.removeAfter(r,u,f-h)),h&&(s-=h,a-=h)}return t.__ownerID?(t.size=a-s,t._origin=s,t._capacity=a,t._level=u,t._root=c,t._tail=m,t.__hash=void 0,t.__altered=!0,t):Xt(s,a,u,c,m)}function Vt(t,e,n){for(var i=[],s=0,a=0;a<n.length;a++){var u=n[a],c=r(u);c.size>s&&(s=c.size),o(u)||(c=c.map(function(t){return K(t)})),i.push(c)}return s>t.size&&(t=t.setSize(s)),Mt(t,e,i)}function $t(t){return t<dn?0:t-1>>>fn<<fn}function Zt(t){return null===t||void 0===t?ee():Qt(t)?t:ee().withMutations(function(e){var r=n(t);ht(r.size),r.forEach(function(t,n){return e.set(n,t)})})}function Qt(t){return pt(t)&&c(t)}function te(t,e,n,r){var i=Object.create(Zt.prototype);return i.size=t?t.size:0,i._map=t,i._list=e,i.__ownerID=n,i.__hash=r,i}function ee(){return Vn||(Vn=te(At(),qt()))}function ne(t,e,n){var r,i,o=t._map,s=t._list,a=o.get(e),u=void 0!==a;if(n===yn){if(!u)return t;s.size>=dn&&s.size>=2*o.size?(i=s.filter(function(t,e){return void 0!==t&&a!==e}),r=i.toKeyedSeq().map(function(t){return t[0]}).flip().toMap(),t.__ownerID&&(r.__ownerID=i.__ownerID=t.__ownerID)):(r=o.remove(e),i=a===s.size-1?s.pop():s.set(a,void 0))}else if(u){if(n===s.get(a)[1])return t;r=o,i=s.set(a,[e,n])}else r=o.set(e,s.size),i=s.set(s.size,[e,n]);return t.__ownerID?(t.size=r.size,t._map=r,t._list=i,t.__hash=void 0,t):te(r,i)}function re(t,e){this._iter=t,this._useKeys=e,this.size=t.size}function ie(t){this._iter=t,this.size=t.size}function oe(t){this._iter=t,this.size=t.size}function se(t){this._iter=t,this.size=t.size}function ae(t){var e=Fe(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);return e.flip=function(){return t.reverse()},e},e.has=function(e){return t.includes(e)},e.includes=function(e){return t.has(e)},e.cacheResult=ke,e.__iterateUncached=function(e,n){var r=this;return t.__iterate(function(t,n){return!1!==e(n,t,r)},n)},e.__iteratorUncached=function(e,n){if(e===En){var r=t.__iterator(e,n);return new E(function(){var t=r.next();if(!t.done){var e=t.value[0];t.value[0]=t.value[1],t.value[1]=e}return t})}return t.__iterator(e===Dn?gn:Dn,n)},e}function ue(t,e,n){var r=Fe(t);return r.size=t.size,r.has=function(e){return t.has(e)},r.get=function(r,i){var o=t.get(r,yn);return o===yn?i:e.call(n,o,r,t)},r.__iterateUncached=function(r,i){var o=this;return t.__iterate(function(t,i,s){return!1!==r(e.call(n,t,i,s),i,o)},i)},r.__iteratorUncached=function(r,i){var o=t.__iterator(En,i);return new E(function(){var i=o.next();if(i.done)return i;var s=i.value,a=s[0];return A(r,a,e.call(n,s[1],a,t),i)})},r}function ce(t,e){var n=Fe(t);return n._iter=t,n.size=t.size,n.reverse=function(){return t},t.flip&&(n.flip=function(){var e=ae(t);return e.reverse=function(){return t.flip()},e}),n.get=function(n,r){return t.get(e?n:-1-n,r)},n.has=function(n){return t.has(e?n:-1-n)},n.includes=function(e){return t.includes(e)},n.cacheResult=ke,n.__iterate=function(e,n){var r=this;return t.__iterate(function(t,n){return e(t,n,r)},!n)},n.__iterator=function(e,n){return t.__iterator(e,!n)},n}function he(t,e,n,r){var i=Fe(t);return r&&(i.has=function(r){var i=t.get(r,yn);return i!==yn&&!!e.call(n,i,r,t)},i.get=function(r,i){var o=t.get(r,yn);return o!==yn&&e.call(n,o,r,t)?o:i}),i.__iterateUncached=function(i,o){var s=this,a=0;return t.__iterate(function(t,o,u){if(e.call(n,t,o,u))return a++,i(t,r?o:a-1,s)},o),a},i.__iteratorUncached=function(i,o){var s=t.__iterator(En,o),a=0;return new E(function(){for(;;){var o=s.next();if(o.done)return o;var u=o.value,c=u[0],h=u[1];if(e.call(n,h,c,t))return A(i,r?c:a++,h,o)}})},i}function le(t,e,n){var r=lt().asMutable();return t.__iterate(function(i,o){r.update(e.call(n,i,o,t),0,function(t){return t+1})}),r.asImmutable()}function pe(t,e,n){var r=s(t),i=(c(t)?Zt():lt()).asMutable();t.__iterate(function(o,s){i.update(e.call(n,o,s,t),function(t){return t=t||[],t.push(r?[s,o]:o),t})});var o=be(t);return i.map(function(e){return we(t,o(e))})}function fe(t,e,n,r){var i=t.size;if(void 0!==e&&(e|=0),void 0!==n&&(n===1/0?n=i:n|=0),v(e,n,i))return t;var o=x(e,i),s=g(n,i);if(o!==o||s!==s)return fe(t.toSeq().cacheResult(),e,n,r);var a,u=s-o;u===u&&(a=u<0?0:u);var c=Fe(t);return c.size=0===a?a:t.size&&a||void 0,!r&&R(t)&&a>=0&&(c.get=function(e,n){return e=m(this,e),e>=0&&e<a?t.get(e+o,n):n}),c.__iterateUncached=function(e,n){var i=this;if(0===a)return 0;if(n)return this.cacheResult().__iterate(e,n);var s=0,u=!0,c=0;return t.__iterate(function(t,n){if(!u||!(u=s++<o))return c++,!1!==e(t,r?n:c-1,i)&&c!==a}),c},c.__iteratorUncached=function(e,n){if(0!==a&&n)return this.cacheResult().__iterator(e,n);var i=0!==a&&t.__iterator(e,n),s=0,u=0;return new E(function(){for(;s++<o;)i.next();if(++u>a)return S();var t=i.next();return r||e===Dn?t:e===gn?A(e,u-1,void 0,t):A(e,u-1,t.value[1],t)})},c}function de(t,e,n){var r=Fe(t);return r.__iterateUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterate(r,i);var s=0;return t.__iterate(function(t,i,a){return e.call(n,t,i,a)&&++s&&r(t,i,o)}),s},r.__iteratorUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterator(r,i);var s=t.__iterator(En,i),a=!0;return new E(function(){if(!a)return S();var t=s.next();if(t.done)return t;var i=t.value,u=i[0],c=i[1];return e.call(n,c,u,o)?r===En?t:A(r,u,c,t):(a=!1,S())})},r}function me(t,e,n,r){var i=Fe(t);return i.__iterateUncached=function(i,o){var s=this;if(o)return this.cacheResult().__iterate(i,o);var a=!0,u=0;return t.__iterate(function(t,o,c){if(!a||!(a=e.call(n,t,o,c)))return u++,i(t,r?o:u-1,s)}),u},i.__iteratorUncached=function(i,o){var s=this;if(o)return this.cacheResult().__iterator(i,o);var a=t.__iterator(En,o),u=!0,c=0;return new E(function(){var t,o,h;do{if(t=a.next(),t.done)return r||i===Dn?t:i===gn?A(i,c++,void 0,t):A(i,c++,t.value[1],t);var l=t.value;o=l[0],h=l[1],u&&(u=e.call(n,h,o,s))}while(u);return i===En?t:A(i,o,h,t)})},i}function ye(t,e){var r=s(t),i=[t].concat(e).map(function(t){return o(t)?r&&(t=n(t)):t=r?j(t):L(Array.isArray(t)?t:[t]),t}).filter(function(t){return 0!==t.size});if(0===i.length)return t;if(1===i.length){var u=i[0];if(u===t||r&&s(u)||a(t)&&a(u))return u}var c=new M(i);return r?c=c.toKeyedSeq():a(t)||(c=c.toSetSeq()),c=c.flatten(!0),c.size=i.reduce(function(t,e){if(void 0!==t){var n=e.size;if(void 0!==n)return t+n}},0),c}function ve(t,e,n){var r=Fe(t);return r.__iterateUncached=function(r,i){function s(t,c){var h=this;t.__iterate(function(t,i){return(!e||c<e)&&o(t)?s(t,c+1):!1===r(t,n?i:a++,h)&&(u=!0),!u},i)}var a=0,u=!1;return s(t,0),a},r.__iteratorUncached=function(r,i){var s=t.__iterator(r,i),a=[],u=0;return new E(function(){for(;s;){var t=s.next();if(!1===t.done){var c=t.value;if(r===En&&(c=c[1]),e&&!(a.length<e)||!o(c))return n?t:A(r,u++,c,t);a.push(s),s=c.__iterator(r,i)}else s=a.pop()}return S()})},r}function xe(t,e,n){var r=be(t);return t.toSeq().map(function(i,o){return r(e.call(n,i,o,t))}).flatten(!0)}function ge(t,e){var n=Fe(t);return n.size=t.size&&2*t.size-1,n.__iterateUncached=function(n,r){var i=this,o=0;return t.__iterate(function(t,r){return(!o||!1!==n(e,o++,i))&&!1!==n(t,o++,i)},r),o},n.__iteratorUncached=function(n,r){var i,o=t.__iterator(Dn,r),s=0;return new E(function(){return(!i||s%2)&&(i=o.next(),i.done)?i:s%2?A(n,s++,e):A(n,s++,i.value,i)})},n}function De(t,e,n){e||(e=Ie);var r=s(t),i=0,o=t.toSeq().map(function(e,r){return[r,e,i++,n?n(e,r,t):e]}).toArray();return o.sort(function(t,n){return e(t[3],n[3])||t[2]-n[2]}).forEach(r?function(t,e){o[e].length=2}:function(t,e){o[e]=t[1]}),r?I(o):a(t)?T(o):B(o)}function Ee(t,e,n){if(e||(e=Ie),n){var r=t.toSeq().map(function(e,r){return[e,n(e,r,t)]}).reduce(function(t,n){return Ae(e,t[1],n[1])?n:t});return r&&r[0]}return t.reduce(function(t,n){return Ae(e,t,n)?n:t})}function Ae(t,e,n){var r=t(n,e);return 0===r&&n!==e&&(void 0===n||null===n||n!==n)||r>0}function Se(t,n,r){var i=Fe(t);return i.size=new M(r).map(function(t){return t.size}).min(),i.__iterate=function(t,e){for(var n,r=this.__iterator(Dn,e),i=0;!(n=r.next()).done&&!1!==t(n.value,i++,this););return i},i.__iteratorUncached=function(t,i){var o=r.map(function(t){return t=e(t),_(i?t.reverse():t)}),s=0,a=!1;return new E(function(){var e;return a||(e=o.map(function(t){return t.next()}),a=e.some(function(t){return t.done})),a?S():A(t,s++,n.apply(null,e.map(function(t){return t.value})))})},i}function we(t,e){return R(t)?e:t.constructor(e)}function Ce(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function _e(t){return ht(t.size),d(t)}function be(t){return s(t)?n:a(t)?r:i}function Fe(t){return Object.create((s(t)?I:a(t)?T:B).prototype)}function ke(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):k.prototype.cacheResult.call(this)}function Ie(t,e){return t>e?1:t<e?-1:0}function Te(t){var n=_(t);if(!n){if(!F(t))throw new TypeError("Expected iterable or array-like: "+t);n=_(e(t))}return n}function Be(t,e){var n,r=function(o){if(o instanceof r)return o;if(!(this instanceof r))return new r(o);if(!n){n=!0;var s=Object.keys(t);Ne(i,s),i.size=s.length,i._name=e,i._keys=s,i._defaultValues=t}this._map=lt(o)},i=r.prototype=Object.create($n);return i.constructor=r,r}function Me(t,e,n){var r=Object.create(Object.getPrototypeOf(t));return r._map=e,r.__ownerID=n,r}function Pe(t){return t._name||t.constructor.name||"Record"}function Ne(t,e){try{e.forEach(Oe.bind(void 0,t))}catch(t){}}function Oe(t,e){Object.defineProperty(t,e,{get:function(){return this.get(e)},set:function(t){Z(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})}function Re(t){return null===t||void 0===t?ze():Ue(t)&&!c(t)?t:ze().withMutations(function(e){var n=i(t);ht(n.size),n.forEach(function(t){return e.add(t)})})}function Ue(t){return!(!t||!t[Zn])}function je(t,e){return t.__ownerID?(t.size=e.size,t._map=e,t):e===t._map?t:0===e.size?t.__empty():t.__make(e)}function Le(t,e){var n=Object.create(Qn);return n.size=t?t.size:0,n._map=t,n.__ownerID=e,n}function ze(){return tr||(tr=Le(At()))}function Je(t){return null===t||void 0===t?Ke():Xe(t)?t:Ke().withMutations(function(e){var n=i(t);ht(n.size),n.forEach(function(t){return e.add(t)})})}function Xe(t){return Ue(t)&&c(t)}function qe(t,e){var n=Object.create(er);return n.size=t?t.size:0,n._map=t,n.__ownerID=e,n}function Ke(){return nr||(nr=qe(ee()))}function Ye(t){return null===t||void 0===t?He():We(t)?t:He().unshiftAll(t)}function We(t){return!(!t||!t[rr])}function Ge(t,e,n,r){var i=Object.create(ir);return i.size=t,i._head=e,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function He(){return or||(or=Ge(0))}function Ve(t,e){var n=function(n){t.prototype[n]=e[n]};return Object.keys(e).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(n),t}function $e(t,e){return e}function Ze(t,e){return[e,t]}function Qe(t){return function(){return!t.apply(this,arguments)}}function tn(t){return function(){return-t.apply(this,arguments)}}function en(t){return"string"==typeof t?JSON.stringify(t):String(t)}function nn(){return f(arguments)}function rn(t,e){return t<e?1:t>e?-1:0}function on(t){if(t.size===1/0)return 0;var e=c(t),n=s(t),r=e?1:0;return sn(t.__iterate(n?e?function(t,e){r=31*r+an(ot(t),ot(e))|0}:function(t,e){r=r+an(ot(t),ot(e))|0}:e?function(t){r=31*r+ot(t)|0}:function(t){r=r+ot(t)|0}),r)}function sn(t,e){return e=In(e,3432918353),e=In(e<<15|e>>>-15,461845907),e=In(e<<13|e>>>-13,5),e=(e+3864292196|0)^t,e=In(e^e>>>16,2246822507),e=In(e^e>>>13,3266489909),e=it(e^e>>>16)}function an(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}var un=Array.prototype.slice;t(n,e),t(r,e),t(i,e),e.isIterable=o,e.isKeyed=s,e.isIndexed=a,e.isAssociative=u,e.isOrdered=c,e.Keyed=n,e.Indexed=r,e.Set=i;var cn="@@__IMMUTABLE_ITERABLE__@@",hn="@@__IMMUTABLE_KEYED__@@",ln="@@__IMMUTABLE_INDEXED__@@",pn="@@__IMMUTABLE_ORDERED__@@",fn=5,dn=1<<fn,mn=dn-1,yn={},vn={value:!1},xn={value:!1},gn=0,Dn=1,En=2,An="function"==typeof Symbol&&Symbol.iterator,Sn="@@iterator",wn=An||Sn;E.prototype.toString=function(){return"[Iterator]"},E.KEYS=gn,E.VALUES=Dn,E.ENTRIES=En,E.prototype.inspect=E.prototype.toSource=function(){return this.toString()},E.prototype[wn]=function(){return this},t(k,e),k.of=function(){return k(arguments)},k.prototype.toSeq=function(){return this},k.prototype.toString=function(){return this.__toString("Seq {","}")},k.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},k.prototype.__iterate=function(t,e){return X(this,t,e,!0)},k.prototype.__iterator=function(t,e){return q(this,t,e,!0)},t(I,k),I.prototype.toKeyedSeq=function(){return this},t(T,k),T.of=function(){return T(arguments)},T.prototype.toIndexedSeq=function(){return this},T.prototype.toString=function(){return this.__toString("Seq [","]")},T.prototype.__iterate=function(t,e){return X(this,t,e,!1)},T.prototype.__iterator=function(t,e){return q(this,t,e,!1)},t(B,k),B.of=function(){return B(arguments)},B.prototype.toSetSeq=function(){return this},k.isSeq=R,k.Keyed=I,k.Set=B,k.Indexed=T;var Cn="@@__IMMUTABLE_SEQ__@@";k.prototype[Cn]=!0,t(M,T),M.prototype.get=function(t,e){return this.has(t)?this._array[m(this,t)]:e},M.prototype.__iterate=function(t,e){for(var n=this._array,r=n.length-1,i=0;i<=r;i++)if(!1===t(n[e?r-i:i],i,this))return i+1;return i},M.prototype.__iterator=function(t,e){var n=this._array,r=n.length-1,i=0;return new E(function(){return i>r?S():A(t,i,n[e?r-i++:i++])})},t(P,I),P.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},P.prototype.has=function(t){return this._object.hasOwnProperty(t)},P.prototype.__iterate=function(t,e){for(var n=this._object,r=this._keys,i=r.length-1,o=0;o<=i;o++){var s=r[e?i-o:o];if(!1===t(n[s],s,this))return o+1}return o},P.prototype.__iterator=function(t,e){var n=this._object,r=this._keys,i=r.length-1,o=0;return new E(function(){var s=r[e?i-o:o];return o++>i?S():A(t,s,n[s])})},P.prototype[pn]=!0,t(N,T),N.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var n=this._iterable,r=_(n),i=0;if(C(r))for(var o;!(o=r.next()).done&&!1!==t(o.value,i++,this););return i},N.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var n=this._iterable,r=_(n);if(!C(r))return new E(S);var i=0;return new E(function(){var e=r.next();return e.done?e:A(t,i++,e.value)})},t(O,T),O.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var n=this._iterator,r=this._iteratorCache,i=0;i<r.length;)if(!1===t(r[i],i++,this))return i;for(var o;!(o=n.next()).done;){var s=o.value;if(r[i]=s,!1===t(s,i++,this))break}return i},O.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var n=this._iterator,r=this._iteratorCache,i=0;return new E(function(){if(i>=r.length){var e=n.next();if(e.done)return e;r[i]=e.value}return A(t,i,r[i++])})};var _n;t($,T),$.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},$.prototype.get=function(t,e){return this.has(t)?this._value:e},$.prototype.includes=function(t){return H(this._value,t)},$.prototype.slice=function(t,e){var n=this.size;return v(t,e,n)?this:new $(this._value,g(e,n)-x(t,n))},$.prototype.reverse=function(){return this},$.prototype.indexOf=function(t){return H(this._value,t)?0:-1},$.prototype.lastIndexOf=function(t){return H(this._value,t)?this.size:-1},$.prototype.__iterate=function(t,e){for(var n=0;n<this.size;n++)if(!1===t(this._value,n,this))return n+1;return n},$.prototype.__iterator=function(t,e){var n=this,r=0;return new E(function(){return r<n.size?A(t,r++,n._value):S()})},$.prototype.equals=function(t){return t instanceof $?H(this._value,t._value):V(t)};var bn;t(Q,T),Q.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},Q.prototype.get=function(t,e){return this.has(t)?this._start+m(this,t)*this._step:e},Q.prototype.includes=function(t){var e=(t-this._start)/this._step;return e>=0&&e<this.size&&e===Math.floor(e)},Q.prototype.slice=function(t,e){return v(t,e,this.size)?this:(t=x(t,this.size),e=g(e,this.size),e<=t?new Q(0,0):new Q(this.get(t,this._end),this.get(e,this._end),this._step))},Q.prototype.indexOf=function(t){var e=t-this._start;if(e%this._step==0){var n=e/this._step;if(n>=0&&n<this.size)return n}return-1},Q.prototype.lastIndexOf=function(t){return this.indexOf(t)},Q.prototype.__iterate=function(t,e){for(var n=this.size-1,r=this._step,i=e?this._start+n*r:this._start,o=0;o<=n;o++){if(!1===t(i,o,this))return o+1;i+=e?-r:r}return o},Q.prototype.__iterator=function(t,e){var n=this.size-1,r=this._step,i=e?this._start+n*r:this._start,o=0;return new E(function(){var s=i;return i+=e?-r:r,o>n?S():A(t,o++,s)})},Q.prototype.equals=function(t){return t instanceof Q?this._start===t._start&&this._end===t._end&&this._step===t._step:V(this,t)};var Fn;t(tt,e),t(et,tt),t(nt,tt),t(rt,tt),tt.Keyed=et,tt.Indexed=nt,tt.Set=rt;var kn,In="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){t|=0,e|=0;var n=65535&t,r=65535&e;return n*r+((t>>>16)*r+n*(e>>>16)<<16>>>0)|0},Tn=Object.isExtensible,Bn=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}(),Mn="function"==typeof WeakMap;Mn&&(kn=new WeakMap);var Pn=0,Nn="__immutablehash__";"function"==typeof Symbol&&(Nn=Symbol(Nn));var On=16,Rn=255,Un=0,jn={};t(lt,et),lt.of=function(){var t=un.call(arguments,0);return At().withMutations(function(e){for(var n=0;n<t.length;n+=2){if(n+1>=t.length)throw new Error("Missing value for key: "+t[n]);e.set(t[n],t[n+1])}})},lt.prototype.toString=function(){return this.__toString("Map {","}")},lt.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},lt.prototype.set=function(t,e){return St(this,t,e)},lt.prototype.setIn=function(t,e){return this.updateIn(t,yn,function(){return e})},lt.prototype.remove=function(t){return St(this,t,yn)},lt.prototype.deleteIn=function(t){return this.updateIn(t,function(){return yn})},lt.prototype.update=function(t,e,n){return 1===arguments.length?t(this):this.updateIn([t],e,n)},lt.prototype.updateIn=function(t,e,n){n||(n=e,e=void 0);var r=Pt(this,Te(t),e,n);return r===yn?void 0:r},lt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):At()},lt.prototype.merge=function(){return It(this,void 0,arguments)},lt.prototype.mergeWith=function(t){return It(this,t,un.call(arguments,1))},lt.prototype.mergeIn=function(t){var e=un.call(arguments,1);return this.updateIn(t,At(),function(t){return"function"==typeof t.merge?t.merge.apply(t,e):e[e.length-1]})},lt.prototype.mergeDeep=function(){return It(this,Tt,arguments)},lt.prototype.mergeDeepWith=function(t){var e=un.call(arguments,1);return It(this,Bt(t),e)},lt.prototype.mergeDeepIn=function(t){var e=un.call(arguments,1);return this.updateIn(t,At(),function(t){return"function"==typeof t.mergeDeep?t.mergeDeep.apply(t,e):e[e.length-1]})},lt.prototype.sort=function(t){return Zt(De(this,t))},lt.prototype.sortBy=function(t,e){return Zt(De(this,e,t))},lt.prototype.withMutations=function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},lt.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new p)},lt.prototype.asImmutable=function(){return this.__ensureOwner()},lt.prototype.wasAltered=function(){return this.__altered},lt.prototype.__iterator=function(t,e){return new xt(this,t,e)},lt.prototype.__iterate=function(t,e){var n=this,r=0;return this._root&&this._root.iterate(function(e){return r++,t(e[1],e[0],n)},e),r},lt.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Et(this.size,this._root,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},lt.isMap=pt;var Ln="@@__IMMUTABLE_MAP__@@",zn=lt.prototype;zn[Ln]=!0,zn.delete=zn.remove,zn.removeIn=zn.deleteIn,ft.prototype.get=function(t,e,n,r){for(var i=this.entries,o=0,s=i.length;o<s;o++)if(H(n,i[o][0]))return i[o][1];return r},ft.prototype.update=function(t,e,n,r,i,o,s){for(var a=i===yn,u=this.entries,c=0,h=u.length;c<h&&!H(r,u[c][0]);c++);var p=c<h;if(p?u[c][1]===i:a)return this;if(l(s),(a||!p)&&l(o),!a||1!==u.length){if(!p&&!a&&u.length>=Xn)return bt(t,u,r,i);var d=t&&t===this.ownerID,m=d?u:f(u);return p?a?c===h-1?m.pop():m[c]=m.pop():m[c]=[r,i]:m.push([r,i]),d?(this.entries=m,this):new ft(t,m)}},dt.prototype.get=function(t,e,n,r){void 0===e&&(e=ot(n));var i=1<<((0===t?e:e>>>t)&mn),o=this.bitmap;return 0==(o&i)?r:this.nodes[Nt(o&i-1)].get(t+fn,e,n,r)},dt.prototype.update=function(t,e,n,r,i,o,s){void 0===n&&(n=ot(r));var a=(0===e?n:n>>>e)&mn,u=1<<a,c=this.bitmap,h=0!=(c&u);if(!h&&i===yn)return this;var l=Nt(c&u-1),p=this.nodes,f=h?p[l]:void 0,d=wt(f,t,e+fn,n,r,i,o,s);if(d===f)return this;if(!h&&d&&p.length>=qn)return kt(t,p,c,a,d);if(h&&!d&&2===p.length&&Ct(p[1^l]))return p[1^l];if(h&&d&&1===p.length&&Ct(d))return d;var m=t&&t===this.ownerID,y=h?d?c:c^u:c|u,v=h?d?Ot(p,l,d,m):Ut(p,l,m):Rt(p,l,d,m);return m?(this.bitmap=y,this.nodes=v,this):new dt(t,y,v)},mt.prototype.get=function(t,e,n,r){void 0===e&&(e=ot(n));var i=(0===t?e:e>>>t)&mn,o=this.nodes[i];return o?o.get(t+fn,e,n,r):r},mt.prototype.update=function(t,e,n,r,i,o,s){void 0===n&&(n=ot(r));var a=(0===e?n:n>>>e)&mn,u=i===yn,c=this.nodes,h=c[a];if(u&&!h)return this;var l=wt(h,t,e+fn,n,r,i,o,s);if(l===h)return this;var p=this.count;if(h){if(!l&&--p<Kn)return Ft(t,c,p,a)}else p++;var f=t&&t===this.ownerID,d=Ot(c,a,l,f);return f?(this.count=p,this.nodes=d,this):new mt(t,p,d)},yt.prototype.get=function(t,e,n,r){for(var i=this.entries,o=0,s=i.length;o<s;o++)if(H(n,i[o][0]))return i[o][1];return r},yt.prototype.update=function(t,e,n,r,i,o,s){void 0===n&&(n=ot(r));var a=i===yn;if(n!==this.keyHash)return a?this:(l(s),l(o),_t(this,t,e,n,[r,i]));for(var u=this.entries,c=0,h=u.length;c<h&&!H(r,u[c][0]);c++);var p=c<h;if(p?u[c][1]===i:a)return this;if(l(s),(a||!p)&&l(o),a&&2===h)return new vt(t,this.keyHash,u[1^c]);var d=t&&t===this.ownerID,m=d?u:f(u);return p?a?c===h-1?m.pop():m[c]=m.pop():m[c]=[r,i]:m.push([r,i]),d?(this.entries=m,this):new yt(t,this.keyHash,m)},vt.prototype.get=function(t,e,n,r){return H(n,this.entry[0])?this.entry[1]:r},vt.prototype.update=function(t,e,n,r,i,o,s){var a=i===yn,u=H(r,this.entry[0]);return(u?i===this.entry[1]:a)?this:(l(s),a?void l(o):u?t&&t===this.ownerID?(this.entry[1]=i,this):new vt(t,this.keyHash,[r,i]):(l(o),_t(this,t,e,ot(r),[r,i])))},ft.prototype.iterate=yt.prototype.iterate=function(t,e){for(var n=this.entries,r=0,i=n.length-1;r<=i;r++)if(!1===t(n[e?i-r:r]))return!1},dt.prototype.iterate=mt.prototype.iterate=function(t,e){for(var n=this.nodes,r=0,i=n.length-1;r<=i;r++){var o=n[e?i-r:r];if(o&&!1===o.iterate(t,e))return!1}},vt.prototype.iterate=function(t,e){return t(this.entry)},t(xt,E),xt.prototype.next=function(){for(var t=this._type,e=this._stack;e;){var n,r=e.node,i=e.index++;if(r.entry){if(0===i)return gt(t,r.entry)}else if(r.entries){if(n=r.entries.length-1,i<=n)return gt(t,r.entries[this._reverse?n-i:i])}else if(n=r.nodes.length-1,i<=n){var o=r.nodes[this._reverse?n-i:i];if(o){if(o.entry)return gt(t,o.entry);e=this._stack=Dt(o,e)}continue}e=this._stack=this._stack.__prev}return S()};var Jn,Xn=dn/4,qn=dn/2,Kn=dn/4;t(jt,nt),jt.of=function(){return this(arguments)},jt.prototype.toString=function(){return this.__toString("List [","]")},jt.prototype.get=function(t,e){if((t=m(this,t))>=0&&t<this.size){t+=this._origin;var n=Gt(this,t);return n&&n.array[t&mn]}return e},jt.prototype.set=function(t,e){return Kt(this,t,e)},jt.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},jt.prototype.insert=function(t,e){return this.splice(t,0,e)},jt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=fn,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):qt()},jt.prototype.push=function(){var t=arguments,e=this.size;return this.withMutations(function(n){Ht(n,0,e+t.length);for(var r=0;r<t.length;r++)n.set(e+r,t[r])})},jt.prototype.pop=function(){return Ht(this,0,-1)},jt.prototype.unshift=function(){var t=arguments;return this.withMutations(function(e){Ht(e,-t.length);for(var n=0;n<t.length;n++)e.set(n,t[n])})},jt.prototype.shift=function(){return Ht(this,1)},jt.prototype.merge=function(){return Vt(this,void 0,arguments)},jt.prototype.mergeWith=function(t){return Vt(this,t,un.call(arguments,1))},jt.prototype.mergeDeep=function(){return Vt(this,Tt,arguments)},jt.prototype.mergeDeepWith=function(t){var e=un.call(arguments,1);return Vt(this,Bt(t),e)},jt.prototype.setSize=function(t){return Ht(this,0,t)},jt.prototype.slice=function(t,e){var n=this.size;return v(t,e,n)?this:Ht(this,x(t,n),g(e,n))},jt.prototype.__iterator=function(t,e){var n=0,r=Jt(this,e);return new E(function(){var e=r();return e===Hn?S():A(t,n++,e)})},jt.prototype.__iterate=function(t,e){for(var n,r=0,i=Jt(this,e);(n=i())!==Hn&&!1!==t(n,r++,this););return r},jt.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Xt(this._origin,this._capacity,this._level,this._root,this._tail,t,this.__hash):(this.__ownerID=t,this)},jt.isList=Lt;var Yn="@@__IMMUTABLE_LIST__@@",Wn=jt.prototype;Wn[Yn]=!0,Wn.delete=Wn.remove,Wn.setIn=zn.setIn,Wn.deleteIn=Wn.removeIn=zn.removeIn,Wn.update=zn.update,Wn.updateIn=zn.updateIn,Wn.mergeIn=zn.mergeIn,Wn.mergeDeepIn=zn.mergeDeepIn,Wn.withMutations=zn.withMutations,Wn.asMutable=zn.asMutable,Wn.asImmutable=zn.asImmutable,Wn.wasAltered=zn.wasAltered,zt.prototype.removeBefore=function(t,e,n){if(n===e?1<<e:0===this.array.length)return this;var r=n>>>e&mn;if(r>=this.array.length)return new zt([],t);var i,o=0===r;if(e>0){var s=this.array[r];if((i=s&&s.removeBefore(t,e-fn,n))===s&&o)return this}if(o&&!i)return this;var a=Wt(this,t);if(!o)for(var u=0;u<r;u++)a.array[u]=void 0;return i&&(a.array[r]=i),a},zt.prototype.removeAfter=function(t,e,n){if(n===(e?1<<e:0)||0===this.array.length)return this;var r=n-1>>>e&mn;if(r>=this.array.length)return this;var i;if(e>0){var o=this.array[r];if((i=o&&o.removeAfter(t,e-fn,n))===o&&r===this.array.length-1)return this}var s=Wt(this,t);return s.array.splice(r+1),i&&(s.array[r]=i),s};var Gn,Hn={};t(Zt,lt),Zt.of=function(){return this(arguments)},Zt.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Zt.prototype.get=function(t,e){var n=this._map.get(t);return void 0!==n?this._list.get(n)[1]:e},Zt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):ee()},Zt.prototype.set=function(t,e){return ne(this,t,e)},Zt.prototype.remove=function(t){return ne(this,t,yn)},Zt.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Zt.prototype.__iterate=function(t,e){var n=this;return this._list.__iterate(function(e){return e&&t(e[1],e[0],n)},e)},Zt.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},Zt.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),n=this._list.__ensureOwner(t);return t?te(e,n,t,this.__hash):(this.__ownerID=t,this._map=e,this._list=n,this)},Zt.isOrderedMap=Qt,Zt.prototype[pn]=!0,Zt.prototype.delete=Zt.prototype.remove;var Vn;t(re,I),re.prototype.get=function(t,e){return this._iter.get(t,e)},re.prototype.has=function(t){return this._iter.has(t)},re.prototype.valueSeq=function(){return this._iter.valueSeq()},re.prototype.reverse=function(){var t=this,e=ce(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},re.prototype.map=function(t,e){var n=this,r=ue(this,t,e);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(t,e)}),r},re.prototype.__iterate=function(t,e){var n,r=this;return this._iter.__iterate(this._useKeys?function(e,n){return t(e,n,r)}:(n=e?_e(this):0,function(i){return t(i,e?--n:n++,r)}),e)},re.prototype.__iterator=function(t,e){if(this._useKeys)return this._iter.__iterator(t,e);var n=this._iter.__iterator(Dn,e),r=e?_e(this):0;return new E(function(){var i=n.next();return i.done?i:A(t,e?--r:r++,i.value,i)})},re.prototype[pn]=!0,t(ie,T),ie.prototype.includes=function(t){return this._iter.includes(t)},ie.prototype.__iterate=function(t,e){var n=this,r=0;return this._iter.__iterate(function(e){return t(e,r++,n)},e)},ie.prototype.__iterator=function(t,e){var n=this._iter.__iterator(Dn,e),r=0;return new E(function(){var e=n.next();return e.done?e:A(t,r++,e.value,e)})},t(oe,B),oe.prototype.has=function(t){return this._iter.includes(t)},oe.prototype.__iterate=function(t,e){var n=this;return this._iter.__iterate(function(e){return t(e,e,n)},e)},oe.prototype.__iterator=function(t,e){var n=this._iter.__iterator(Dn,e);return new E(function(){var e=n.next();return e.done?e:A(t,e.value,e.value,e)})},t(se,I),se.prototype.entrySeq=function(){return this._iter.toSeq()},se.prototype.__iterate=function(t,e){var n=this;return this._iter.__iterate(function(e){if(e){Ce(e);var r=o(e);return t(r?e.get(1):e[1],r?e.get(0):e[0],n)}},e)},se.prototype.__iterator=function(t,e){var n=this._iter.__iterator(Dn,e);return new E(function(){for(;;){var e=n.next();if(e.done)return e;var r=e.value;if(r){Ce(r);var i=o(r);return A(t,i?r.get(0):r[0],i?r.get(1):r[1],e)}}})},ie.prototype.cacheResult=re.prototype.cacheResult=oe.prototype.cacheResult=se.prototype.cacheResult=ke,t(Be,et),Be.prototype.toString=function(){return this.__toString(Pe(this)+" {","}")},Be.prototype.has=function(t){return this._defaultValues.hasOwnProperty(t)},Be.prototype.get=function(t,e){if(!this.has(t))return e;var n=this._defaultValues[t];return this._map?this._map.get(t,n):n},Be.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var t=this.constructor;return t._empty||(t._empty=Me(this,At()))},Be.prototype.set=function(t,e){if(!this.has(t))throw new Error('Cannot set unknown key "'+t+'" on '+Pe(this));if(this._map&&!this._map.has(t)){if(e===this._defaultValues[t])return this}var n=this._map&&this._map.set(t,e);return this.__ownerID||n===this._map?this:Me(this,n)},Be.prototype.remove=function(t){if(!this.has(t))return this;var e=this._map&&this._map.remove(t);return this.__ownerID||e===this._map?this:Me(this,e)},Be.prototype.wasAltered=function(){return this._map.wasAltered()},Be.prototype.__iterator=function(t,e){var r=this;return n(this._defaultValues).map(function(t,e){return r.get(e)}).__iterator(t,e)},Be.prototype.__iterate=function(t,e){var r=this;return n(this._defaultValues).map(function(t,e){return r.get(e)}).__iterate(t,e)},Be.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map&&this._map.__ensureOwner(t);return t?Me(this,e,t):(this.__ownerID=t,this._map=e,this)};var $n=Be.prototype;$n.delete=$n.remove,$n.deleteIn=$n.removeIn=zn.removeIn,$n.merge=zn.merge,$n.mergeWith=zn.mergeWith,$n.mergeIn=zn.mergeIn,$n.mergeDeep=zn.mergeDeep,$n.mergeDeepWith=zn.mergeDeepWith,$n.mergeDeepIn=zn.mergeDeepIn,$n.setIn=zn.setIn,$n.update=zn.update,$n.updateIn=zn.updateIn,$n.withMutations=zn.withMutations,$n.asMutable=zn.asMutable,$n.asImmutable=zn.asImmutable,t(Re,rt),Re.of=function(){return this(arguments)},Re.fromKeys=function(t){return this(n(t).keySeq())},Re.prototype.toString=function(){return this.__toString("Set {","}")},Re.prototype.has=function(t){return this._map.has(t)},Re.prototype.add=function(t){return je(this,this._map.set(t,!0))},Re.prototype.remove=function(t){return je(this,this._map.remove(t))},Re.prototype.clear=function(){return je(this,this._map.clear())},Re.prototype.union=function(){var t=un.call(arguments,0);return t=t.filter(function(t){return 0!==t.size}),0===t.length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations(function(e){for(var n=0;n<t.length;n++)i(t[n]).forEach(function(t){return e.add(t)})}):this.constructor(t[0])},Re.prototype.intersect=function(){var t=un.call(arguments,0);if(0===t.length)return this;t=t.map(function(t){return i(t)});var e=this;return this.withMutations(function(n){e.forEach(function(e){t.every(function(t){return t.includes(e)})||n.remove(e)})})},Re.prototype.subtract=function(){var t=un.call(arguments,0);if(0===t.length)return this;t=t.map(function(t){return i(t)});var e=this;return this.withMutations(function(n){e.forEach(function(e){t.some(function(t){return t.includes(e)})&&n.remove(e)})})},Re.prototype.merge=function(){return this.union.apply(this,arguments)},Re.prototype.mergeWith=function(t){var e=un.call(arguments,1);return this.union.apply(this,e)},Re.prototype.sort=function(t){return Je(De(this,t))},Re.prototype.sortBy=function(t,e){return Je(De(this,e,t))},Re.prototype.wasAltered=function(){return this._map.wasAltered()},Re.prototype.__iterate=function(t,e){var n=this;return this._map.__iterate(function(e,r){return t(r,r,n)},e)},Re.prototype.__iterator=function(t,e){return this._map.map(function(t,e){return e}).__iterator(t,e)},Re.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t);return t?this.__make(e,t):(this.__ownerID=t,this._map=e,this)},Re.isSet=Ue;var Zn="@@__IMMUTABLE_SET__@@",Qn=Re.prototype;Qn[Zn]=!0,Qn.delete=Qn.remove,Qn.mergeDeep=Qn.merge,Qn.mergeDeepWith=Qn.mergeWith,Qn.withMutations=zn.withMutations,Qn.asMutable=zn.asMutable,Qn.asImmutable=zn.asImmutable,Qn.__empty=ze,Qn.__make=Le;var tr;t(Je,Re),Je.of=function(){return this(arguments)},Je.fromKeys=function(t){return this(n(t).keySeq())},Je.prototype.toString=function(){return this.__toString("OrderedSet {","}")},Je.isOrderedSet=Xe;var er=Je.prototype;er[pn]=!0,er.__empty=Ke,er.__make=qe;var nr;t(Ye,nt),Ye.of=function(){return this(arguments)},Ye.prototype.toString=function(){return this.__toString("Stack [","]")},Ye.prototype.get=function(t,e){var n=this._head;for(t=m(this,t);n&&t--;)n=n.next;return n?n.value:e},Ye.prototype.peek=function(){return this._head&&this._head.value},Ye.prototype.push=function(){if(0===arguments.length)return this;for(var t=this.size+arguments.length,e=this._head,n=arguments.length-1;n>=0;n--)e={value:arguments[n],next:e};return this.__ownerID?(this.size=t,this._head=e,this.__hash=void 0,this.__altered=!0,this):Ge(t,e)},Ye.prototype.pushAll=function(t){if(t=r(t),0===t.size)return this;ht(t.size);var e=this.size,n=this._head;return t.reverse().forEach(function(t){e++,n={value:t,next:n}}),this.__ownerID?(this.size=e,this._head=n,this.__hash=void 0,this.__altered=!0,this):Ge(e,n)},Ye.prototype.pop=function(){return this.slice(1)},Ye.prototype.unshift=function(){return this.push.apply(this,arguments)},Ye.prototype.unshiftAll=function(t){return this.pushAll(t)},Ye.prototype.shift=function(){return this.pop.apply(this,arguments)},Ye.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):He()},Ye.prototype.slice=function(t,e){if(v(t,e,this.size))return this;var n=x(t,this.size);if(g(e,this.size)!==this.size)return nt.prototype.slice.call(this,t,e);for(var r=this.size-n,i=this._head;n--;)i=i.next;return this.__ownerID?(this.size=r,this._head=i,this.__hash=void 0,this.__altered=!0,this):Ge(r,i)},Ye.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Ge(this.size,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Ye.prototype.__iterate=function(t,e){if(e)return this.reverse().__iterate(t);for(var n=0,r=this._head;r&&!1!==t(r.value,n++,this);)r=r.next;return n},Ye.prototype.__iterator=function(t,e){if(e)return this.reverse().__iterator(t);var n=0,r=this._head;return new E(function(){if(r){var e=r.value;return r=r.next,A(t,n++,e)}return S()})},Ye.isStack=We;var rr="@@__IMMUTABLE_STACK__@@",ir=Ye.prototype;ir[rr]=!0,ir.withMutations=zn.withMutations,ir.asMutable=zn.asMutable,ir.asImmutable=zn.asImmutable,ir.wasAltered=zn.wasAltered;var or;e.Iterator=E,Ve(e,{toArray:function(){ht(this.size);var t=new Array(this.size||0);return this.valueSeq().__iterate(function(e,n){t[n]=e}),t},toIndexedSeq:function(){return new ie(this)},toJS:function(){return this.toSeq().map(function(t){return t&&"function"==typeof t.toJS?t.toJS():t}).__toJS()},toJSON:function(){return this.toSeq().map(function(t){return t&&"function"==typeof t.toJSON?t.toJSON():t}).__toJS()},toKeyedSeq:function(){return new re(this,!0)},toMap:function(){return lt(this.toKeyedSeq())},toObject:function(){ht(this.size);var t={};return this.__iterate(function(e,n){t[n]=e}),t},toOrderedMap:function(){return Zt(this.toKeyedSeq())},toOrderedSet:function(){return Je(s(this)?this.valueSeq():this)},toSet:function(){return Re(s(this)?this.valueSeq():this)},toSetSeq:function(){return new oe(this)},toSeq:function(){return a(this)?this.toIndexedSeq():s(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Ye(s(this)?this.valueSeq():this)},toList:function(){return jt(s(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(t,e){return 0===this.size?t+e:t+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+e},concat:function(){return we(this,ye(this,un.call(arguments,0)))},includes:function(t){return this.some(function(e){return H(e,t)})},entries:function(){return this.__iterator(En)},every:function(t,e){ht(this.size);var n=!0;return this.__iterate(function(r,i,o){if(!t.call(e,r,i,o))return n=!1,!1}),n},filter:function(t,e){return we(this,he(this,t,e,!0))},find:function(t,e,n){var r=this.findEntry(t,e);return r?r[1]:n},forEach:function(t,e){return ht(this.size),this.__iterate(e?t.bind(e):t)},join:function(t){ht(this.size),t=void 0!==t?""+t:",";var e="",n=!0;return this.__iterate(function(r){n?n=!1:e+=t,e+=null!==r&&void 0!==r?r.toString():""}),e},keys:function(){return this.__iterator(gn)},map:function(t,e){return we(this,ue(this,t,e))},reduce:function(t,e,n){ht(this.size);var r,i;return arguments.length<2?i=!0:r=e,this.__iterate(function(e,o,s){i?(i=!1,r=e):r=t.call(n,r,e,o,s)}),r},reduceRight:function(t,e,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return we(this,ce(this,!0))},slice:function(t,e){return we(this,fe(this,t,e,!0))},some:function(t,e){return!this.every(Qe(t),e)},sort:function(t){return we(this,De(this,t))},values:function(){return this.__iterator(Dn)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(t,e){return d(t?this.toSeq().filter(t,e):this)},countBy:function(t,e){return le(this,t,e)},equals:function(t){return V(this,t)},entrySeq:function(){var t=this;if(t._cache)return new M(t._cache);var e=t.toSeq().map(Ze).toIndexedSeq();return e.fromEntrySeq=function(){return t.toSeq()},e},filterNot:function(t,e){return this.filter(Qe(t),e)},findEntry:function(t,e,n){var r=n;return this.__iterate(function(n,i,o){if(t.call(e,n,i,o))return r=[i,n],!1}),r},findKey:function(t,e){var n=this.findEntry(t,e);return n&&n[0]},findLast:function(t,e,n){return this.toKeyedSeq().reverse().find(t,e,n)},findLastEntry:function(t,e,n){return this.toKeyedSeq().reverse().findEntry(t,e,n)},findLastKey:function(t,e){return this.toKeyedSeq().reverse().findKey(t,e)},first:function(){return this.find(y)},flatMap:function(t,e){return we(this,xe(this,t,e))},flatten:function(t){return we(this,ve(this,t,!0))},fromEntrySeq:function(){return new se(this)},get:function(t,e){return this.find(function(e,n){return H(n,t)},void 0,e)},getIn:function(t,e){for(var n,r=this,i=Te(t);!(n=i.next()).done;){var o=n.value;if((r=r&&r.get?r.get(o,yn):yn)===yn)return e}return r},groupBy:function(t,e){return pe(this,t,e)},has:function(t){return this.get(t,yn)!==yn},hasIn:function(t){return this.getIn(t,yn)!==yn},isSubset:function(t){return t="function"==typeof t.includes?t:e(t),this.every(function(e){return t.includes(e)})},isSuperset:function(t){return t="function"==typeof t.isSubset?t:e(t),t.isSubset(this)},keyOf:function(t){return this.findKey(function(e){return H(e,t)})},keySeq:function(){return this.toSeq().map($e).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(t){return this.toKeyedSeq().reverse().keyOf(t)},max:function(t){return Ee(this,t)},maxBy:function(t,e){return Ee(this,e,t)},min:function(t){return Ee(this,t?tn(t):rn)},minBy:function(t,e){return Ee(this,e?tn(e):rn,t)},rest:function(){return this.slice(1)},skip:function(t){return this.slice(Math.max(0,t))},skipLast:function(t){return we(this,this.toSeq().reverse().skip(t).reverse())},skipWhile:function(t,e){return we(this,me(this,t,e,!0))},skipUntil:function(t,e){return this.skipWhile(Qe(t),e)},sortBy:function(t,e){return we(this,De(this,e,t))},take:function(t){return this.slice(0,Math.max(0,t))},takeLast:function(t){return we(this,this.toSeq().reverse().take(t).reverse())},takeWhile:function(t,e){return we(this,de(this,t,e))},takeUntil:function(t,e){return this.takeWhile(Qe(t),e)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=on(this))}});var sr=e.prototype;sr[cn]=!0,sr[wn]=sr.values,sr.__toJS=sr.toArray,sr.__toStringMapper=en,sr.inspect=sr.toSource=function(){return this.toString()},sr.chain=sr.flatMap,sr.contains=sr.includes,Ve(n,{flip:function(){return we(this,ae(this))},mapEntries:function(t,e){var n=this,r=0;return we(this,this.toSeq().map(function(i,o){return t.call(e,[o,i],r++,n)}).fromEntrySeq())},mapKeys:function(t,e){var n=this;return we(this,this.toSeq().flip().map(function(r,i){return t.call(e,r,i,n)}).flip())}});var ar=n.prototype;return ar[hn]=!0,ar[wn]=sr.entries,ar.__toJS=sr.toObject,ar.__toStringMapper=function(t,e){return JSON.stringify(e)+": "+en(t)},Ve(r,{toKeyedSeq:function(){return new re(this,!1)},filter:function(t,e){return we(this,he(this,t,e,!1))},findIndex:function(t,e){var n=this.findEntry(t,e);return n?n[0]:-1},indexOf:function(t){var e=this.keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){var e=this.lastKeyOf(t);return void 0===e?-1:e},reverse:function(){return we(this,ce(this,!1))},slice:function(t,e){return we(this,fe(this,t,e,!1))},splice:function(t,e){var n=arguments.length;if(e=Math.max(0|e,0),0===n||2===n&&!e)return this;t=x(t,t<0?this.count():this.size);var r=this.slice(0,t);return we(this,1===n?r:r.concat(f(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var n=this.findLastEntry(t,e);return n?n[0]:-1},first:function(){return this.get(0)},flatten:function(t){return we(this,ve(this,t,!1))},get:function(t,e){return t=m(this,t),t<0||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find(function(e,n){return n===t},void 0,e)},has:function(t){return(t=m(this,t))>=0&&(void 0!==this.size?this.size===1/0||t<this.size:-1!==this.indexOf(t))},interpose:function(t){return we(this,ge(this,t))},interleave:function(){var t=[this].concat(f(arguments)),e=Se(this.toSeq(),T.of,t),n=e.flatten(!0);return e.size&&(n.size=e.size*t.length),we(this,n)},keySeq:function(){return Q(0,this.size)},last:function(){return this.get(-1)},skipWhile:function(t,e){return we(this,me(this,t,e,!1))},zip:function(){return we(this,Se(this,nn,[this].concat(f(arguments))))},zipWith:function(t){var e=f(arguments);return e[0]=this,we(this,Se(this,t,e))}}),r.prototype[ln]=!0,r.prototype[pn]=!0,Ve(i,{get:function(t,e){return this.has(t)?t:e},includes:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}}),i.prototype.has=sr.includes,i.prototype.contains=i.prototype.includes,Ve(I,n.prototype),Ve(T,r.prototype),Ve(B,i.prototype),Ve(et,n.prototype),Ve(nt,r.prototype),Ve(rt,i.prototype),{Iterable:e,Seq:k,Collection:tt,Map:lt,OrderedMap:Zt,List:jt,Stack:Ye,Set:Re,OrderedSet:Je,Record:Be,Range:Q,Repeat:$,is:H,fromJS:K}})},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e,n){"use strict";var r=n(236);t.exports=r},function(t,e,n){"use strict";function r(t){return function(){throw new Error("Function "+t+" is deprecated and cannot be used.")}}var i=n(238),o=n(237);t.exports.Type=n(0),t.exports.Schema=n(24),t.exports.FAILSAFE_SCHEMA=n(71),t.exports.JSON_SCHEMA=n(111),t.exports.CORE_SCHEMA=n(110),t.exports.DEFAULT_SAFE_SCHEMA=n(34),t.exports.DEFAULT_FULL_SCHEMA=n(47),t.exports.load=i.load,t.exports.loadAll=i.loadAll,t.exports.safeLoad=i.safeLoad,t.exports.safeLoadAll=i.safeLoadAll,t.exports.dump=o.dump,t.exports.safeDump=o.safeDump,t.exports.YAMLException=n(33),t.exports.MINIMAL_SCHEMA=n(71),t.exports.SAFE_SCHEMA=n(34),t.exports.DEFAULT_SCHEMA=n(47),t.exports.scan=r("scan"),t.exports.parse=r("parse"),t.exports.compose=r("compose"),t.exports.addConstructor=r("addConstructor")},function(t,e,n){"use strict";function r(t,e){var n,r,i,o,s,a,u;if(null===e)return{};for(n={},r=Object.keys(e),i=0,o=r.length;i<o;i+=1)s=r[i],a=String(e[s]),"!!"===s.slice(0,2)&&(s="tag:yaml.org,2002:"+s.slice(2)),u=t.compiledTypeMap.fallback[s],u&&N.call(u.styleAliases,a)&&(a=u.styleAliases[a]),n[s]=a;return n}function i(t){var e,n,r;if(e=t.toString(16).toUpperCase(),t<=255)n="x",r=2;else if(t<=65535)n="u",r=4;else{if(!(t<=4294967295))throw new T("code point within a string may not be greater than 0xFFFFFFFF");n="U",r=8}return"\\"+n+I.repeat("0",r-e.length)+e}function o(t){this.schema=t.schema||B,this.indent=Math.max(1,t.indent||2),this.skipInvalid=t.skipInvalid||!1,this.flowLevel=I.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=r(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function s(t,e){for(var n,r=I.repeat(" ",e),i=0,o=-1,s="",a=t.length;i<a;)o=t.indexOf("\n",i),-1===o?(n=t.slice(i),i=a):(n=t.slice(i,o+1),i=o+1),n.length&&"\n"!==n&&(s+=r),s+=n;return s}function a(t,e){return"\n"+I.repeat(" ",t.indent*e)}function u(t,e){var n,r,i;for(n=0,r=t.implicitTypes.length;n<r;n+=1)if(i=t.implicitTypes[n],i.resolve(e))return!0;return!1}function c(t){return t===U||t===O}function h(t){return 32<=t&&t<=126||161<=t&&t<=55295&&8232!==t&&8233!==t||57344<=t&&t<=65533&&65279!==t||65536<=t&&t<=1114111}function l(t){return h(t)&&65279!==t&&t!==Y&&t!==Z&&t!==Q&&t!==et&&t!==rt&&t!==G&&t!==z}function p(t){return h(t)&&65279!==t&&!c(t)&&t!==W&&t!==V&&t!==G&&t!==Y&&t!==Z&&t!==Q&&t!==et&&t!==rt&&t!==z&&t!==X&&t!==K&&t!==j&&t!==nt&&t!==H&&t!==q&&t!==L&&t!==J&&t!==$&&t!==tt}function f(t,e,n,r,i){var o,s,a=!1,u=!1,f=-1!==r,d=-1,m=p(t.charCodeAt(0))&&!c(t.charCodeAt(t.length-1));if(e)for(o=0;o<t.length;o++){if(s=t.charCodeAt(o),!h(s))return ht;m=m&&l(s)}else{for(o=0;o<t.length;o++){if((s=t.charCodeAt(o))===R)a=!0,f&&(u=u||o-d-1>r&&" "!==t[d+1],d=o);else if(!h(s))return ht;m=m&&l(s)}u=u||f&&o-d-1>r&&" "!==t[d+1]}return a||u?" "===t[0]&&n>9?ht:u?ct:ut:m&&!i(t)?st:at}function d(t,e,n,r){t.dump=function(){function i(e){return u(t,e)}if(0===e.length)return"''";if(!t.noCompatMode&&-1!==ot.indexOf(e))return"'"+e+"'";var o=t.indent*Math.max(1,n),a=-1===t.lineWidth?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-o),c=r||t.flowLevel>-1&&n>=t.flowLevel;switch(f(e,c,t.indent,a,i)){case st:return e;case at:return"'"+e.replace(/'/g,"''")+"'";case ut:return"|"+m(e,t.indent)+y(s(e,o));case ct:return">"+m(e,t.indent)+y(s(v(e,a),o));case ht:return'"'+g(e)+'"';default:throw new T("impossible error: invalid scalar style")}}()}function m(t,e){var n=" "===t[0]?String(e):"",r="\n"===t[t.length-1];return n+(!r||"\n"!==t[t.length-2]&&"\n"!==t?r?"":"-":"+")+"\n"}function y(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function v(t,e){for(var n,r,i=/(\n+)([^\n]*)/g,o=function(){var n=t.indexOf("\n");return n=-1!==n?n:t.length,i.lastIndex=n,x(t.slice(0,n),e)}(),s="\n"===t[0]||" "===t[0];r=i.exec(t);){var a=r[1],u=r[2];n=" "===u[0],o+=a+(s||n||""===u?"":"\n")+x(u,e),s=n}return o}function x(t,e){if(""===t||" "===t[0])return t;for(var n,r,i=/ [^ ]/g,o=0,s=0,a=0,u="";n=i.exec(t);)a=n.index,a-o>e&&(r=s>o?s:a,u+="\n"+t.slice(o,r),o=r+1),s=a;return u+="\n",t.length-o>e&&s>o?u+=t.slice(o,s)+"\n"+t.slice(s+1):u+=t.slice(o),u.slice(1)}function g(t){for(var e,n,r,o="",s=0;s<t.length;s++)e=t.charCodeAt(s),e>=55296&&e<=56319&&(n=t.charCodeAt(s+1))>=56320&&n<=57343?(o+=i(1024*(e-55296)+n-56320+65536),s++):(r=it[e],o+=!r&&h(e)?t[s]:r||i(e));return o}function D(t,e,n){var r,i,o="",s=t.tag;for(r=0,i=n.length;r<i;r+=1)C(t,e,n[r],!1,!1)&&(0!==r&&(o+=","+(t.condenseFlow?"":" ")),o+=t.dump);t.tag=s,t.dump="["+o+"]"}function E(t,e,n,r){var i,o,s="",u=t.tag;for(i=0,o=n.length;i<o;i+=1)C(t,e+1,n[i],!0,!0)&&(r&&0===i||(s+=a(t,e)),t.dump&&R===t.dump.charCodeAt(0)?s+="-":s+="- ",s+=t.dump);t.tag=u,t.dump=s||"[]"}function A(t,e,n){var r,i,o,s,a,u="",c=t.tag,h=Object.keys(n);for(r=0,i=h.length;r<i;r+=1)a=t.condenseFlow?'"':"",0!==r&&(a+=", "),o=h[r],s=n[o],C(t,e,o,!1,!1)&&(t.dump.length>1024&&(a+="? "),a+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),C(t,e,s,!1,!1)&&(a+=t.dump,u+=a));t.tag=c,t.dump="{"+u+"}"}function S(t,e,n,r){var i,o,s,u,c,h,l="",p=t.tag,f=Object.keys(n);if(!0===t.sortKeys)f.sort();else if("function"==typeof t.sortKeys)f.sort(t.sortKeys);else if(t.sortKeys)throw new T("sortKeys must be a boolean or a function");for(i=0,o=f.length;i<o;i+=1)h="",r&&0===i||(h+=a(t,e)),s=f[i],u=n[s],C(t,e+1,s,!0,!0,!0)&&(c=null!==t.tag&&"?"!==t.tag||t.dump&&t.dump.length>1024,c&&(t.dump&&R===t.dump.charCodeAt(0)?h+="?":h+="? "),h+=t.dump,c&&(h+=a(t,e)),C(t,e+1,u,!0,c)&&(t.dump&&R===t.dump.charCodeAt(0)?h+=":":h+=": ",h+=t.dump,l+=h));t.tag=p,t.dump=l||"{}"}function w(t,e,n){var r,i,o,s,a,u;for(i=n?t.explicitTypes:t.implicitTypes,o=0,s=i.length;o<s;o+=1)if(a=i[o],(a.instanceOf||a.predicate)&&(!a.instanceOf||"object"==typeof e&&e instanceof a.instanceOf)&&(!a.predicate||a.predicate(e))){if(t.tag=n?a.tag:"?",a.represent){if(u=t.styleMap[a.tag]||a.defaultStyle,"[object Function]"===P.call(a.represent))r=a.represent(e,u);else{if(!N.call(a.represent,u))throw new T("!<"+a.tag+'> tag resolver accepts not "'+u+'" style');r=a.represent[u](e,u)}t.dump=r}return!0}return!1}function C(t,e,n,r,i,o){t.tag=null,t.dump=n,w(t,n,!1)||w(t,n,!0);var s=P.call(t.dump);r&&(r=t.flowLevel<0||t.flowLevel>e);var a,u,c="[object Object]"===s||"[object Array]"===s;if(c&&(a=t.duplicates.indexOf(n),u=-1!==a),(null!==t.tag&&"?"!==t.tag||u||2!==t.indent&&e>0)&&(i=!1),u&&t.usedDuplicates[a])t.dump="*ref_"+a;else{if(c&&u&&!t.usedDuplicates[a]&&(t.usedDuplicates[a]=!0),"[object Object]"===s)r&&0!==Object.keys(t.dump).length?(S(t,e,t.dump,i),u&&(t.dump="&ref_"+a+t.dump)):(A(t,e,t.dump),u&&(t.dump="&ref_"+a+" "+t.dump));else if("[object Array]"===s)r&&0!==t.dump.length?(E(t,e,t.dump,i),u&&(t.dump="&ref_"+a+t.dump)):(D(t,e,t.dump),u&&(t.dump="&ref_"+a+" "+t.dump));else{if("[object String]"!==s){if(t.skipInvalid)return!1;throw new T("unacceptable kind of an object to dump "+s)}"?"!==t.tag&&d(t,t.dump,e,o)}null!==t.tag&&"?"!==t.tag&&(t.dump="!<"+t.tag+"> "+t.dump)}return!0}function _(t,e){var n,r,i=[],o=[];for(b(t,i,o),n=0,r=o.length;n<r;n+=1)e.duplicates.push(i[o[n]]);e.usedDuplicates=new Array(r)}function b(t,e,n){var r,i,o;if(null!==t&&"object"==typeof t)if(-1!==(i=e.indexOf(t)))-1===n.indexOf(i)&&n.push(i);else if(e.push(t),Array.isArray(t))for(i=0,o=t.length;i<o;i+=1)b(t[i],e,n);else for(r=Object.keys(t),i=0,o=r.length;i<o;i+=1)b(t[r[i]],e,n)}function F(t,e){e=e||{};var n=new o(e);return n.noRefs||_(t,n),C(n,0,t,!0,!0)?n.dump+"\n":""}function k(t,e){return F(t,I.extend({schema:M},e))}var I=n(23),T=n(33),B=n(47),M=n(34),P=Object.prototype.toString,N=Object.prototype.hasOwnProperty,O=9,R=10,U=32,j=33,L=34,z=35,J=37,X=38,q=39,K=42,Y=44,W=45,G=58,H=62,V=63,$=64,Z=91,Q=93,tt=96,et=123,nt=124,rt=125,it={};it[0]="\\0",it[7]="\\a",it[8]="\\b",it[9]="\\t",it[10]="\\n",it[11]="\\v",it[12]="\\f",it[13]="\\r",it[27]="\\e",it[34]='\\"',it[92]="\\\\",it[133]="\\N",it[160]="\\_",it[8232]="\\L",it[8233]="\\P";var ot=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],st=1,at=2,ut=3,ct=4,ht=5;t.exports.dump=F,t.exports.safeDump=k},function(t,e,n){"use strict";function r(t){return 10===t||13===t}function i(t){return 9===t||32===t}function o(t){return 9===t||32===t||10===t||13===t}function s(t){return 44===t||91===t||93===t||123===t||125===t}function a(t){var e;return 48<=t&&t<=57?t-48:(e=32|t,97<=e&&e<=102?e-97+10:-1)}function u(t){return 120===t?2:117===t?4:85===t?8:0}function c(t){return 48<=t&&t<=57?t-48:-1}function h(t){return 48===t?"\0":97===t?"":98===t?"\b":116===t?"\t":9===t?"\t":110===t?"\n":118===t?"\v":102===t?"\f":114===t?"\r":101===t?"":32===t?" ":34===t?'"':47===t?"/":92===t?"\\":78===t?"…":95===t?" ":76===t?"\u2028":80===t?"\u2029":""}function l(t){return t<=65535?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10),56320+(t-65536&1023))}function p(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||q,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function f(t,e){return new z(e,new J(t.filename,t.input,t.position,t.line,t.position-t.lineStart))}function d(t,e){throw f(t,e)}function m(t,e){t.onWarning&&t.onWarning.call(null,f(t,e))}function y(t,e,n,r){var i,o,s,a;if(e<n){if(a=t.input.slice(e,n),r)for(i=0,o=a.length;i<o;i+=1)9===(s=a.charCodeAt(i))||32<=s&&s<=1114111||d(t,"expected valid JSON character");else Q.test(a)&&d(t,"the stream contains non-printable characters");t.result+=a}}function v(t,e,n,r){var i,o,s,a;for(L.isObject(n)||d(t,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(n),s=0,a=i.length;s<a;s+=1)o=i[s],K.call(e,o)||(e[o]=n[o],r[o]=!0)}function x(t,e,n,r,i,o,s,a){var u,c;if(i=String(i),null===e&&(e={}),"tag:yaml.org,2002:merge"===r)if(Array.isArray(o))for(u=0,c=o.length;u<c;u+=1)v(t,e,o[u],n);else v(t,e,o,n);else t.json||K.call(n,i)||!K.call(e,i)||(t.line=s||t.line,t.position=a||t.position,d(t,"duplicated mapping key")),e[i]=o,delete n[i];return e}function g(t){var e;e=t.input.charCodeAt(t.position),10===e?t.position++:13===e?(t.position++,10===t.input.charCodeAt(t.position)&&t.position++):d(t,"a line break is expected"),t.line+=1,t.lineStart=t.position}function D(t,e,n){for(var o=0,s=t.input.charCodeAt(t.position);0!==s;){for(;i(s);)s=t.input.charCodeAt(++t.position);if(e&&35===s)do{s=t.input.charCodeAt(++t.position)}while(10!==s&&13!==s&&0!==s);if(!r(s))break;for(g(t),s=t.input.charCodeAt(t.position),o++,t.lineIndent=0;32===s;)t.lineIndent++,s=t.input.charCodeAt(++t.position)}return-1!==n&&0!==o&&t.lineIndent<n&&m(t,"deficient indentation"),o}function E(t){var e,n=t.position;return!(45!==(e=t.input.charCodeAt(n))&&46!==e||e!==t.input.charCodeAt(n+1)||e!==t.input.charCodeAt(n+2)||(n+=3,0!==(e=t.input.charCodeAt(n))&&!o(e)))}function A(t,e){1===e?t.result+=" ":e>1&&(t.result+=L.repeat("\n",e-1))}function S(t,e,n){var a,u,c,h,l,p,f,d,m,v=t.kind,x=t.result;if(m=t.input.charCodeAt(t.position),o(m)||s(m)||35===m||38===m||42===m||33===m||124===m||62===m||39===m||34===m||37===m||64===m||96===m)return!1;if((63===m||45===m)&&(u=t.input.charCodeAt(t.position+1),o(u)||n&&s(u)))return!1;for(t.kind="scalar",t.result="",c=h=t.position,l=!1;0!==m;){if(58===m){if(u=t.input.charCodeAt(t.position+1),o(u)||n&&s(u))break}else if(35===m){if(a=t.input.charCodeAt(t.position-1),o(a))break}else{if(t.position===t.lineStart&&E(t)||n&&s(m))break;if(r(m)){if(p=t.line,f=t.lineStart,d=t.lineIndent,D(t,!1,-1),t.lineIndent>=e){l=!0,m=t.input.charCodeAt(t.position);continue}t.position=h,t.line=p,t.lineStart=f,t.lineIndent=d;break}}l&&(y(t,c,h,!1),A(t,t.line-p),c=h=t.position,l=!1),i(m)||(h=t.position+1),m=t.input.charCodeAt(++t.position)}return y(t,c,h,!1),!!t.result||(t.kind=v,t.result=x,!1)}function w(t,e){var n,i,o;if(39!==(n=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,i=o=t.position;0!==(n=t.input.charCodeAt(t.position));)if(39===n){if(y(t,i,t.position,!0),39!==(n=t.input.charCodeAt(++t.position)))return!0;i=t.position,t.position++,o=t.position}else r(n)?(y(t,i,o,!0),A(t,D(t,!1,e)),i=o=t.position):t.position===t.lineStart&&E(t)?d(t,"unexpected end of the document within a single quoted scalar"):(t.position++,o=t.position);d(t,"unexpected end of the stream within a single quoted scalar")}function C(t,e){var n,i,o,s,c,h;if(34!==(h=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,n=i=t.position;0!==(h=t.input.charCodeAt(t.position));){if(34===h)return y(t,n,t.position,!0),t.position++,!0;if(92===h){if(y(t,n,t.position,!0),h=t.input.charCodeAt(++t.position),r(h))D(t,!1,e);else if(h<256&&it[h])t.result+=ot[h],t.position++;else if((c=u(h))>0){for(o=c,s=0;o>0;o--)h=t.input.charCodeAt(++t.position),(c=a(h))>=0?s=(s<<4)+c:d(t,"expected hexadecimal character");t.result+=l(s),t.position++}else d(t,"unknown escape sequence");n=i=t.position}else r(h)?(y(t,n,i,!0),A(t,D(t,!1,e)),n=i=t.position):t.position===t.lineStart&&E(t)?d(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}d(t,"unexpected end of the stream within a double quoted scalar")}function _(t,e){var n,r,i,s,a,u,c,h,l,p,f,m=!0,y=t.tag,v=t.anchor,g={};if(91===(f=t.input.charCodeAt(t.position)))s=93,c=!1,r=[];else{if(123!==f)return!1;s=125,c=!0,r={}}for(null!==t.anchor&&(t.anchorMap[t.anchor]=r),f=t.input.charCodeAt(++t.position);0!==f;){if(D(t,!0,e),(f=t.input.charCodeAt(t.position))===s)return t.position++,t.tag=y,t.anchor=v,t.kind=c?"mapping":"sequence",t.result=r,!0;m||d(t,"missed comma between flow collection entries"),l=h=p=null,a=u=!1,63===f&&(i=t.input.charCodeAt(t.position+1),o(i)&&(a=u=!0,t.position++,D(t,!0,e))),n=t.line,M(t,e,Y,!1,!0),l=t.tag,h=t.result,D(t,!0,e),f=t.input.charCodeAt(t.position),!u&&t.line!==n||58!==f||(a=!0,f=t.input.charCodeAt(++t.position),D(t,!0,e),M(t,e,Y,!1,!0),p=t.result),c?x(t,r,g,l,h,p):a?r.push(x(t,null,g,l,h,p)):r.push(h),D(t,!0,e),f=t.input.charCodeAt(t.position),44===f?(m=!0,f=t.input.charCodeAt(++t.position)):m=!1}d(t,"unexpected end of the stream within a flow collection")}function b(t,e){var n,o,s,a,u=V,h=!1,l=!1,p=e,f=0,m=!1;if(124===(a=t.input.charCodeAt(t.position)))o=!1;else{if(62!==a)return!1;o=!0}for(t.kind="scalar",t.result="";0!==a;)if(43===(a=t.input.charCodeAt(++t.position))||45===a)V===u?u=43===a?Z:$:d(t,"repeat of a chomping mode identifier");else{if(!((s=c(a))>=0))break;0===s?d(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?d(t,"repeat of an indentation width identifier"):(p=e+s-1,l=!0)}if(i(a)){do{a=t.input.charCodeAt(++t.position)}while(i(a));if(35===a)do{a=t.input.charCodeAt(++t.position)}while(!r(a)&&0!==a)}for(;0!==a;){for(g(t),t.lineIndent=0,a=t.input.charCodeAt(t.position);(!l||t.lineIndent<p)&&32===a;)t.lineIndent++,a=t.input.charCodeAt(++t.position);if(!l&&t.lineIndent>p&&(p=t.lineIndent),r(a))f++;else{if(t.lineIndent<p){u===Z?t.result+=L.repeat("\n",h?1+f:f):u===V&&h&&(t.result+="\n");break}for(o?i(a)?(m=!0,t.result+=L.repeat("\n",h?1+f:f)):m?(m=!1,t.result+=L.repeat("\n",f+1)):0===f?h&&(t.result+=" "):t.result+=L.repeat("\n",f):t.result+=L.repeat("\n",h?1+f:f),h=!0,l=!0,f=0,n=t.position;!r(a)&&0!==a;)a=t.input.charCodeAt(++t.position);y(t,n,t.position,!1)}}return!0}function F(t,e){var n,r,i,s=t.tag,a=t.anchor,u=[],c=!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=u),i=t.input.charCodeAt(t.position);0!==i&&45===i&&(r=t.input.charCodeAt(t.position+1),o(r));)if(c=!0,t.position++,D(t,!0,-1)&&t.lineIndent<=e)u.push(null),i=t.input.charCodeAt(t.position);else if(n=t.line,M(t,e,G,!1,!0),u.push(t.result),D(t,!0,-1),i=t.input.charCodeAt(t.position),(t.line===n||t.lineIndent>e)&&0!==i)d(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break;return!!c&&(t.tag=s,t.anchor=a,t.kind="sequence",t.result=u,!0)}function k(t,e,n){var r,s,a,u,c,h=t.tag,l=t.anchor,p={},f={},m=null,y=null,v=null,g=!1,E=!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=p),c=t.input.charCodeAt(t.position);0!==c;){if(r=t.input.charCodeAt(t.position+1),a=t.line,u=t.position,63!==c&&58!==c||!o(r)){if(!M(t,n,W,!1,!0))break;if(t.line===a){for(c=t.input.charCodeAt(t.position);i(c);)c=t.input.charCodeAt(++t.position);if(58===c)c=t.input.charCodeAt(++t.position),o(c)||d(t,"a whitespace character is expected after the key-value separator within a block mapping"),g&&(x(t,p,f,m,y,null),m=y=v=null),E=!0,g=!1,s=!1,m=t.tag,y=t.result;else{if(!E)return t.tag=h,t.anchor=l,!0;d(t,"can not read an implicit mapping pair; a colon is missed")}}else{if(!E)return t.tag=h,t.anchor=l,!0;d(t,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===c?(g&&(x(t,p,f,m,y,null),m=y=v=null),E=!0,g=!0,s=!0):g?(g=!1,s=!0):d(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,c=r;if((t.line===a||t.lineIndent>e)&&(M(t,e,H,!0,s)&&(g?y=t.result:v=t.result),g||(x(t,p,f,m,y,v,a,u),m=y=v=null),D(t,!0,-1),c=t.input.charCodeAt(t.position)),t.lineIndent>e&&0!==c)d(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return g&&x(t,p,f,m,y,null),E&&(t.tag=h,t.anchor=l,t.kind="mapping",t.result=p),E}function I(t){var e,n,r,i,s=!1,a=!1;if(33!==(i=t.input.charCodeAt(t.position)))return!1;if(null!==t.tag&&d(t,"duplication of a tag property"),i=t.input.charCodeAt(++t.position),60===i?(s=!0,i=t.input.charCodeAt(++t.position)):33===i?(a=!0,n="!!",i=t.input.charCodeAt(++t.position)):n="!",e=t.position,s){do{i=t.input.charCodeAt(++t.position)}while(0!==i&&62!==i);t.position<t.length?(r=t.input.slice(e,t.position),i=t.input.charCodeAt(++t.position)):d(t,"unexpected end of the stream within a verbatim tag")}else{for(;0!==i&&!o(i);)33===i&&(a?d(t,"tag suffix cannot contain exclamation marks"):(n=t.input.slice(e-1,t.position+1),nt.test(n)||d(t,"named tag handle cannot contain such characters"),a=!0,e=t.position+1)),i=t.input.charCodeAt(++t.position);r=t.input.slice(e,t.position),et.test(r)&&d(t,"tag suffix cannot contain flow indicator characters")}return r&&!rt.test(r)&&d(t,"tag name cannot contain such characters: "+r),s?t.tag=r:K.call(t.tagMap,n)?t.tag=t.tagMap[n]+r:"!"===n?t.tag="!"+r:"!!"===n?t.tag="tag:yaml.org,2002:"+r:d(t,'undeclared tag handle "'+n+'"'),!0}function T(t){var e,n;if(38!==(n=t.input.charCodeAt(t.position)))return!1;for(null!==t.anchor&&d(t,"duplication of an anchor property"),n=t.input.charCodeAt(++t.position),e=t.position;0!==n&&!o(n)&&!s(n);)n=t.input.charCodeAt(++t.position);return t.position===e&&d(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function B(t){var e,n,r;if(42!==(r=t.input.charCodeAt(t.position)))return!1;for(r=t.input.charCodeAt(++t.position),e=t.position;0!==r&&!o(r)&&!s(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&d(t,"name of an alias node must contain at least one character"),n=t.input.slice(e,t.position),t.anchorMap.hasOwnProperty(n)||d(t,'unidentified alias "'+n+'"'),t.result=t.anchorMap[n],D(t,!0,-1),!0}function M(t,e,n,r,i){var o,s,a,u,c,h,l,p,f=1,m=!1,y=!1;if(null!==t.listener&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,o=s=a=H===n||G===n,r&&D(t,!0,-1)&&(m=!0,t.lineIndent>e?f=1:t.lineIndent===e?f=0:t.lineIndent<e&&(f=-1)),1===f)for(;I(t)||T(t);)D(t,!0,-1)?(m=!0,a=o,t.lineIndent>e?f=1:t.lineIndent===e?f=0:t.lineIndent<e&&(f=-1)):a=!1;if(a&&(a=m||i),1!==f&&H!==n||(l=Y===n||W===n?e:e+1,p=t.position-t.lineStart,1===f?a&&(F(t,p)||k(t,p,l))||_(t,l)?y=!0:(s&&b(t,l)||w(t,l)||C(t,l)?y=!0:B(t)?(y=!0,null===t.tag&&null===t.anchor||d(t,"alias node should not have any properties")):S(t,l,Y===n)&&(y=!0,null===t.tag&&(t.tag="?")),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):0===f&&(y=a&&F(t,p))),null!==t.tag&&"!"!==t.tag)if("?"===t.tag){for(u=0,c=t.implicitTypes.length;u<c;u+=1)if(h=t.implicitTypes[u],h.resolve(t.result)){t.result=h.construct(t.result),t.tag=h.tag,null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);break}}else K.call(t.typeMap[t.kind||"fallback"],t.tag)?(h=t.typeMap[t.kind||"fallback"][t.tag],null!==t.result&&h.kind!==t.kind&&d(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+h.kind+'", not "'+t.kind+'"'),h.resolve(t.result)?(t.result=h.construct(t.result),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):d(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")):d(t,"unknown tag !<"+t.tag+">");return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||y}function P(t){var e,n,s,a,u=t.position,c=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap={},t.anchorMap={};0!==(a=t.input.charCodeAt(t.position))&&(D(t,!0,-1),a=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==a));){for(c=!0,a=t.input.charCodeAt(++t.position),e=t.position;0!==a&&!o(a);)a=t.input.charCodeAt(++t.position);for(n=t.input.slice(e,t.position),s=[],n.length<1&&d(t,"directive name must not be less than one character in length");0!==a;){for(;i(a);)a=t.input.charCodeAt(++t.position);if(35===a){do{a=t.input.charCodeAt(++t.position)}while(0!==a&&!r(a));break}if(r(a))break;for(e=t.position;0!==a&&!o(a);)a=t.input.charCodeAt(++t.position);s.push(t.input.slice(e,t.position))}0!==a&&g(t),K.call(at,n)?at[n](t,n,s):m(t,'unknown document directive "'+n+'"')}if(D(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,D(t,!0,-1)):c&&d(t,"directives end mark is expected"),M(t,t.lineIndent-1,H,!1,!0),D(t,!0,-1),t.checkLineBreaks&&tt.test(t.input.slice(u,t.position))&&m(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&E(t))return void(46===t.input.charCodeAt(t.position)&&(t.position+=3,D(t,!0,-1)));t.position<t.length-1&&d(t,"end of the stream or a document separator is expected")}function N(t,e){t=String(t),e=e||{},0!==t.length&&(10!==t.charCodeAt(t.length-1)&&13!==t.charCodeAt(t.length-1)&&(t+="\n"),65279===t.charCodeAt(0)&&(t=t.slice(1)));var n=new p(t,e);for(n.input+="\0";32===n.input.charCodeAt(n.position);)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)P(n);return n.documents}function O(t,e,n){var r,i,o=N(t,n);if("function"!=typeof e)return o;for(r=0,i=o.length;r<i;r+=1)e(o[r])}function R(t,e){var n=N(t,e);if(0!==n.length){if(1===n.length)return n[0];throw new z("expected a single document in the stream, but found more")}}function U(t,e,n){if("function"!=typeof e)return O(t,L.extend({schema:X},n));O(t,e,L.extend({schema:X},n))}function j(t,e){return R(t,L.extend({schema:X},e))}for(var L=n(23),z=n(33),J=n(239),X=n(34),q=n(47),K=Object.prototype.hasOwnProperty,Y=1,W=2,G=3,H=4,V=1,$=2,Z=3,Q=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,tt=/[\x85\u2028\u2029]/,et=/[,\[\]\{\}]/,nt=/^(?:!|!!|![a-z\-]+!)$/i,rt=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i,it=new Array(256),ot=new Array(256),st=0;st<256;st++)it[st]=h(st)?1:0,ot[st]=h(st);var at={YAML:function(t,e,n){var r,i,o;null!==t.version&&d(t,"duplication of %YAML directive"),1!==n.length&&d(t,"YAML directive accepts exactly one argument"),r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),null===r&&d(t,"ill-formed argument of the YAML directive"),i=parseInt(r[1],10),o=parseInt(r[2],10),1!==i&&d(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=o<2,1!==o&&2!==o&&m(t,"unsupported YAML version of the document")},TAG:function(t,e,n){var r,i;2!==n.length&&d(t,"TAG directive accepts exactly two arguments"),r=n[0],i=n[1],nt.test(r)||d(t,"ill-formed tag handle (first argument) of the TAG directive"),K.call(t.tagMap,r)&&d(t,'there is a previously declared suffix for "'+r+'" tag handle'),rt.test(i)||d(t,"ill-formed tag prefix (second argument) of the TAG directive"),t.tagMap[r]=i}};t.exports.loadAll=O,t.exports.load=R,t.exports.safeLoadAll=U,t.exports.safeLoad=j},function(t,e,n){"use strict";function r(t,e,n,r,i){this.name=t,this.buffer=e,this.position=n,this.line=r,this.column=i}var i=n(23);r.prototype.getSnippet=function(t,e){var n,r,o,s,a;if(!this.buffer)return null;for(t=t||4,e=e||75,n="",r=this.position;r>0&&-1==="\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(r-1));)if(r-=1,this.position-r>e/2-1){n=" ... ",r+=5;break}for(o="",s=this.position;s<this.buffer.length&&-1==="\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(s));)if((s+=1)-this.position>e/2-1){o=" ... ",s-=5;break}return a=this.buffer.slice(r,s),i.repeat(" ",t)+n+a+o+"\n"+i.repeat(" ",t+this.position-r+n.length)+"^"},r.prototype.toString=function(t){var e,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),t||(e=this.getSnippet())&&(n+=":\n"+e),n},t.exports=r},function(t,e,n){"use strict";function r(t){if(null===t)return!1;var e,n,r=0,i=t.length,o=c;for(n=0;n<i;n++)if(!((e=o.indexOf(t.charAt(n)))>64)){if(e<0)return!1;r+=6}return r%8==0}function i(t){var e,n,r=t.replace(/[\r\n=]/g,""),i=r.length,o=c,s=0,u=[];for(e=0;e<i;e++)e%4==0&&e&&(u.push(s>>16&255),u.push(s>>8&255),u.push(255&s)),s=s<<6|o.indexOf(r.charAt(e));return n=i%4*6,0===n?(u.push(s>>16&255),u.push(s>>8&255),u.push(255&s)):18===n?(u.push(s>>10&255),u.push(s>>2&255)):12===n&&u.push(s>>4&255),a?a.from?a.from(u):new a(u):u}function o(t){var e,n,r="",i=0,o=t.length,s=c;for(e=0;e<o;e++)e%3==0&&e&&(r+=s[i>>18&63],r+=s[i>>12&63],r+=s[i>>6&63],r+=s[63&i]),i=(i<<8)+t[e];return n=o%3,0===n?(r+=s[i>>18&63],r+=s[i>>12&63],r+=s[i>>6&63],r+=s[63&i]):2===n?(r+=s[i>>10&63],r+=s[i>>4&63],r+=s[i<<2&63],r+=s[64]):1===n&&(r+=s[i>>2&63],r+=s[i<<4&63],r+=s[64],r+=s[64]),r}function s(t){return a&&a.isBuffer(t)}var a;try{a=n(135).Buffer}catch(t){}var u=n(0),c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";t.exports=new u("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:i,predicate:s,represent:o})},function(t,e,n){"use strict";function r(t){if(null===t)return!1;var e=t.length;return 4===e&&("true"===t||"True"===t||"TRUE"===t)||5===e&&("false"===t||"False"===t||"FALSE"===t)}function i(t){return"true"===t||"True"===t||"TRUE"===t}function o(t){return"[object Boolean]"===Object.prototype.toString.call(t)}var s=n(0);t.exports=new s("tag:yaml.org,2002:bool",{kind:"scalar",resolve:r,construct:i,predicate:o,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"})},function(t,e,n){"use strict";function r(t){return null!==t&&!(!c.test(t)||"_"===t[t.length-1])}function i(t){var e,n,r,i;return e=t.replace(/_/g,"").toLowerCase(),n="-"===e[0]?-1:1,i=[],"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:e.indexOf(":")>=0?(e.split(":").forEach(function(t){i.unshift(parseFloat(t,10))}),e=0,r=1,i.forEach(function(t){e+=t*r,r*=60}),n*e):n*parseFloat(e,10)}function o(t,e){var n;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(a.isNegativeZero(t))return"-0.0";return n=t.toString(10),h.test(n)?n.replace("e",".e"):n}function s(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||a.isNegativeZero(t))}var a=n(23),u=n(0),c=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),h=/^[-+]?[0-9]+e/;t.exports=new u("tag:yaml.org,2002:float",{kind:"scalar",resolve:r,construct:i,predicate:s,represent:o,defaultStyle:"lowercase"})},function(t,e,n){"use strict";function r(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function i(t){return 48<=t&&t<=55}function o(t){return 48<=t&&t<=57}function s(t){if(null===t)return!1;var e,n=t.length,s=0,a=!1;if(!n)return!1;if(e=t[s],"-"!==e&&"+"!==e||(e=t[++s]),"0"===e){if(s+1===n)return!0;if("b"===(e=t[++s])){for(s++;s<n;s++)if("_"!==(e=t[s])){if("0"!==e&&"1"!==e)return!1;a=!0}return a&&"_"!==e}if("x"===e){for(s++;s<n;s++)if("_"!==(e=t[s])){if(!r(t.charCodeAt(s)))return!1;a=!0}return a&&"_"!==e}for(;s<n;s++)if("_"!==(e=t[s])){if(!i(t.charCodeAt(s)))return!1;a=!0}return a&&"_"!==e}if("_"===e)return!1;for(;s<n;s++)if("_"!==(e=t[s])){if(":"===e)break;if(!o(t.charCodeAt(s)))return!1;a=!0}return!(!a||"_"===e)&&(":"!==e||/^(:[0-5]?[0-9])+$/.test(t.slice(s)))}function a(t){var e,n,r=t,i=1,o=[];return-1!==r.indexOf("_")&&(r=r.replace(/_/g,"")),e=r[0],"-"!==e&&"+"!==e||("-"===e&&(i=-1),r=r.slice(1),e=r[0]),"0"===r?0:"0"===e?"b"===r[1]?i*parseInt(r.slice(2),2):"x"===r[1]?i*parseInt(r,16):i*parseInt(r,8):-1!==r.indexOf(":")?(r.split(":").forEach(function(t){o.unshift(parseInt(t,10))}),r=0,n=1,o.forEach(function(t){r+=t*n,n*=60}),i*r):i*parseInt(r,10)}function u(t){return"[object Number]"===Object.prototype.toString.call(t)&&t%1==0&&!c.isNegativeZero(t)}var c=n(23),h=n(0);t.exports=new h("tag:yaml.org,2002:int",{kind:"scalar",resolve:s,construct:a,predicate:u,represent:{binary:function(t){return"0b"+t.toString(2)},octal:function(t){return"0"+t.toString(8)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return"0x"+t.toString(16).toUpperCase()}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},function(t,e,n){"use strict";function r(t){if(null===t)return!1;try{var e="("+t+")",n=a.parse(e,{range:!0});return"Program"===n.type&&1===n.body.length&&"ExpressionStatement"===n.body[0].type&&"FunctionExpression"===n.body[0].expression.type}catch(t){return!1}}function i(t){var e,n="("+t+")",r=a.parse(n,{range:!0}),i=[];if("Program"!==r.type||1!==r.body.length||"ExpressionStatement"!==r.body[0].type||"FunctionExpression"!==r.body[0].expression.type)throw new Error("Failed to resolve function");return r.body[0].expression.params.forEach(function(t){i.push(t.name)}),e=r.body[0].expression.body.range,new Function(i,n.slice(e[0]+1,e[1]-1))}function o(t){return t.toString()}function s(t){return"[object Function]"===Object.prototype.toString.call(t)}var a;try{a=n(231)}catch(t){"undefined"!=typeof window&&(a=window.esprima)}var u=n(0);t.exports=new u("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:r,construct:i,predicate:s,represent:o})},function(t,e,n){"use strict";function r(t){if(null===t)return!1;if(0===t.length)return!1;var e=t,n=/\/([gim]*)$/.exec(t),r="";if("/"===e[0]){if(n&&(r=n[1]),r.length>3)return!1;if("/"!==e[e.length-r.length-1])return!1}return!0}function i(t){var e=t,n=/\/([gim]*)$/.exec(t),r="";return"/"===e[0]&&(n&&(r=n[1]),e=e.slice(1,e.length-r.length-1)),new RegExp(e,r)}function o(t){var e="/"+t.source+"/";return t.global&&(e+="g"),t.multiline&&(e+="m"),t.ignoreCase&&(e+="i"),e}function s(t){return"[object RegExp]"===Object.prototype.toString.call(t)}var a=n(0);t.exports=new a("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:r,construct:i,predicate:s,represent:o})},function(t,e,n){"use strict";function r(){return!0}function i(){}function o(){return""}function s(t){return void 0===t}var a=n(0);t.exports=new a("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:r,construct:i,predicate:s,represent:o})},function(t,e,n){"use strict";var r=n(0);t.exports=new r("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return null!==t?t:{}}})},function(t,e,n){"use strict";function r(t){return"<<"===t||null===t}var i=n(0);t.exports=new i("tag:yaml.org,2002:merge",{kind:"scalar",resolve:r})},function(t,e,n){"use strict";function r(t){if(null===t)return!0;var e=t.length;return 1===e&&"~"===t||4===e&&("null"===t||"Null"===t||"NULL"===t)}function i(){return null}function o(t){return null===t}var s=n(0);t.exports=new s("tag:yaml.org,2002:null",{kind:"scalar",resolve:r,construct:i,predicate:o,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},function(t,e,n){"use strict";function r(t){if(null===t)return!0;var e,n,r,i,o,u=[],c=t;for(e=0,n=c.length;e<n;e+=1){if(r=c[e],o=!1,"[object Object]"!==a.call(r))return!1;for(i in r)if(s.call(r,i)){if(o)return!1;o=!0}if(!o)return!1;if(-1!==u.indexOf(i))return!1;u.push(i)}return!0}function i(t){return null!==t?t:[]}var o=n(0),s=Object.prototype.hasOwnProperty,a=Object.prototype.toString;t.exports=new o("tag:yaml.org,2002:omap",{kind:"sequence",resolve:r,construct:i})},function(t,e,n){"use strict";function r(t){if(null===t)return!0;var e,n,r,i,o,a=t;for(o=new Array(a.length),e=0,n=a.length;e<n;e+=1){if(r=a[e],"[object Object]"!==s.call(r))return!1;if(i=Object.keys(r),1!==i.length)return!1;o[e]=[i[0],r[i[0]]]}return!0}function i(t){if(null===t)return[];var e,n,r,i,o,s=t;for(o=new Array(s.length),e=0,n=s.length;e<n;e+=1)r=s[e],i=Object.keys(r),o[e]=[i[0],r[i[0]]];return o}var o=n(0),s=Object.prototype.toString;t.exports=new o("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:r,construct:i})},function(t,e,n){"use strict";var r=n(0);t.exports=new r("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return null!==t?t:[]}})},function(t,e,n){"use strict";function r(t){if(null===t)return!0;var e,n=t;for(e in n)if(s.call(n,e)&&null!==n[e])return!1;return!0}function i(t){return null!==t?t:{}}var o=n(0),s=Object.prototype.hasOwnProperty;t.exports=new o("tag:yaml.org,2002:set",{kind:"mapping",resolve:r,construct:i})},function(t,e,n){"use strict";var r=n(0);t.exports=new r("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return null!==t?t:""}})},function(t,e,n){"use strict";function r(t){return null!==t&&(null!==a.exec(t)||null!==u.exec(t))}function i(t){var e,n,r,i,o,s,c,h,l,p,f=0,d=null;if(e=a.exec(t),null===e&&(e=u.exec(t)),null===e)throw new Error("Date resolve error");if(n=+e[1],r=+e[2]-1,i=+e[3],!e[4])return new Date(Date.UTC(n,r,i));if(o=+e[4],s=+e[5],c=+e[6],e[7]){for(f=e[7].slice(0,3);f.length<3;)f+="0";f=+f}return e[9]&&(h=+e[10],l=+(e[11]||0),d=6e4*(60*h+l),"-"===e[9]&&(d=-d)),p=new Date(Date.UTC(n,r,i,o,s,c,f)),d&&p.setTime(p.getTime()-d),p}function o(t){return t.toISOString()}var s=n(0),a=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),u=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");t.exports=new s("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:r,construct:i,instanceOf:Date,represent:o})},function(t,e,n){"use strict";function r(t,e,n,r,i){}t.exports=r},function(t,e,n){"use strict";var r=n(259);t.exports=function(t){return r(t,!1)}},function(t,e,n){"use strict";var r=n(45),i=n(15),o=n(113);t.exports=function(){function t(t,e,n,r,s,a){a!==o&&i(!1,"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")}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e};return n.checkPropTypes=r,n.PropTypes=n,n}},function(t,e,n){"use strict";var r=n(45),i=n(15),o=n(46),s=n(35),a=n(113),u=n(256);t.exports=function(t,e){function n(t){var e=t&&(_&&t[_]||t[b]);if("function"==typeof e)return e}function c(t,e){return t===e?0!==t||1/t==1/e:t!==t&&e!==e}function h(t){this.message=t,this.stack=""}function l(t){function n(n,r,o,s,u,c,l){if(s=s||F,c=c||o,l!==a)if(e)i(!1,"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");else;return null==r[o]?n?new h(null===r[o]?"The "+u+" `"+c+"` is marked as required in `"+s+"`, but its value is `null`.":"The "+u+" `"+c+"` is marked as required in `"+s+"`, but its value is `undefined`."):null:t(r,o,s,u,c)}var r=n.bind(null,!1);return r.isRequired=n.bind(null,!0),r}function p(t){function e(e,n,r,i,o,s){var a=e[n];if(A(a)!==t)return new h("Invalid "+i+" `"+o+"` of type `"+S(a)+"` supplied to `"+r+"`, expected `"+t+"`.");return null}return l(e)}function f(t){function e(e,n,r,i,o){if("function"!=typeof t)return new h("Property `"+o+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var s=e[n];if(!Array.isArray(s)){return new h("Invalid "+i+" `"+o+"` of type `"+A(s)+"` supplied to `"+r+"`, expected an array.")}for(var u=0;u<s.length;u++){var c=t(s,u,r,i,o+"["+u+"]",a);if(c instanceof Error)return c}return null}return l(e)}function d(t){function e(e,n,r,i,o){if(!(e[n]instanceof t)){var s=t.name||F;return new h("Invalid "+i+" `"+o+"` of type `"+C(e[n])+"` supplied to `"+r+"`, expected instance of `"+s+"`.")}return null}return l(e)}function m(t){function e(e,n,r,i,o){for(var s=e[n],a=0;a<t.length;a++)if(c(s,t[a]))return null;return new h("Invalid "+i+" `"+o+"` of value `"+s+"` supplied to `"+r+"`, expected one of "+JSON.stringify(t)+".")}return Array.isArray(t)?l(e):r.thatReturnsNull}function y(t){function e(e,n,r,i,o){if("function"!=typeof t)return new h("Property `"+o+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var s=e[n],u=A(s);if("object"!==u)return new h("Invalid "+i+" `"+o+"` of type `"+u+"` supplied to `"+r+"`, expected an object.");for(var c in s)if(s.hasOwnProperty(c)){var l=t(s,c,r,i,o+"."+c,a);if(l instanceof Error)return l}return null}return l(e)}function v(t){function e(e,n,r,i,o){for(var s=0;s<t.length;s++){if(null==(0,t[s])(e,n,r,i,o,a))return null}return new h("Invalid "+i+" `"+o+"` supplied to `"+r+"`.")}if(!Array.isArray(t))return r.thatReturnsNull;for(var n=0;n<t.length;n++){var i=t[n];if("function"!=typeof i)return o(!1,"Invalid argument supplied to oneOfType. Expected an array of check functions, but received %s at index %s.",w(i),n),r.thatReturnsNull}return l(e)}function x(t){function e(e,n,r,i,o){var s=e[n],u=A(s);if("object"!==u)return new h("Invalid "+i+" `"+o+"` of type `"+u+"` supplied to `"+r+"`, expected `object`.");for(var c in t){var l=t[c];if(l){var p=l(s,c,r,i,o+"."+c,a);if(p)return p}}return null}return l(e)}function g(t){function e(e,n,r,i,o){var u=e[n],c=A(u);if("object"!==c)return new h("Invalid "+i+" `"+o+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");var l=s({},e[n],t);for(var p in l){var f=t[p];if(!f)return new h("Invalid "+i+" `"+o+"` key `"+p+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(e[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(t),null," "));var d=f(u,p,r,i,o+"."+p,a);if(d)return d}return null}return l(e)}function D(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(D);if(null===e||t(e))return!0;var r=n(e);if(!r)return!1;var i,o=r.call(e);if(r!==e.entries){for(;!(i=o.next()).done;)if(!D(i.value))return!1}else for(;!(i=o.next()).done;){var s=i.value;if(s&&!D(s[1]))return!1}return!0;default:return!1}}function E(t,e){return"symbol"===t||("Symbol"===e["@@toStringTag"]||"function"==typeof Symbol&&e instanceof Symbol)}function A(t){var e=typeof t;return Array.isArray(t)?"array":t instanceof RegExp?"object":E(e,t)?"symbol":e}function S(t){if(void 0===t||null===t)return""+t;var e=A(t);if("object"===e){if(t instanceof Date)return"date";if(t instanceof RegExp)return"regexp"}return e}function w(t){var e=S(t);switch(e){case"array":case"object":return"an "+e;case"boolean":case"date":case"regexp":return"a "+e;default:return e}}function C(t){return t.constructor&&t.constructor.name?t.constructor.name:F}var _="function"==typeof Symbol&&Symbol.iterator,b="@@iterator",F="<<anonymous>>",k={array:p("array"),bool:p("boolean"),func:p("function"),number:p("number"),object:p("object"),string:p("string"),symbol:p("symbol"),any:function(){return l(r.thatReturnsNull)}(),arrayOf:f,element:function(){function e(e,n,r,i,o){var s=e[n];if(!t(s)){return new h("Invalid "+i+" `"+o+"` of type `"+A(s)+"` supplied to `"+r+"`, expected a single ReactElement.")}return null}return l(e)}(),instanceOf:d,node:function(){function t(t,e,n,r,i){return D(t[e])?null:new h("Invalid "+r+" `"+i+"` supplied to `"+n+"`, expected a ReactNode.")}return l(t)}(),objectOf:y,oneOf:m,oneOfType:v,shape:x,exact:g};return h.prototype=Error.prototype,k.checkPropTypes=u,k.PropTypes=k,k}},function(t,e){t.exports='---\nurl: "http://petstore.swagger.io/v2/swagger.json"\ndom_id: "#swagger-ui"\nvalidatorUrl: "https://online.swagger.io/validator"\noauth2RedirectUrl: "http://localhost:3200/oauth2-redirect.html"\n'},function(t,e,n){"use strict";function r(t){var e={"=":"=0",":":"=2"};return"$"+(""+t).replace(/[=:]/g,function(t){return e[t]})}function i(t){var e=/(=0|=2)/g,n={"=0":"=","=2":":"};return(""+("."===t[0]&&"$"===t[1]?t.substring(2):t.substring(1))).replace(e,function(t){return n[t]})}var o={escape:r,unescape:i};t.exports=o},function(t,e,n){"use strict";var r=n(48),i=(n(15),function(t){var e=this;if(e.instancePool.length){var n=e.instancePool.pop();return e.call(n,t),n}return new e(t)}),o=function(t,e){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,t,e),r}return new n(t,e)},s=function(t,e,n){var r=this;if(r.instancePool.length){var i=r.instancePool.pop();return r.call(i,t,e,n),i}return new r(t,e,n)},a=function(t,e,n,r){var i=this;if(i.instancePool.length){var o=i.instancePool.pop();return i.call(o,t,e,n,r),o}return new i(t,e,n,r)},u=function(t){var e=this;t instanceof e||r("25"),t.destructor(),e.instancePool.length<e.poolSize&&e.instancePool.push(t)},c=i,h=function(t,e){var n=t;return n.instancePool=[],n.getPooled=e||c,n.poolSize||(n.poolSize=10),n.release=u,n},l={addPoolingTo:h,oneArgumentPooler:i,twoArgumentPooler:o,threeArgumentPooler:s,fourArgumentPooler:a};t.exports=l},function(t,e,n){"use strict";var r=n(35),i=n(114),o=n(264),s=n(265),a=n(25),u=n(266),c=n(267),h=n(268),l=n(271),p=a.createElement,f=a.createFactory,d=a.cloneElement,m=r,y=function(t){return t},v={Children:{map:o.map,forEach:o.forEach,count:o.count,toArray:o.toArray,only:l},Component:i.Component,PureComponent:i.PureComponent,createElement:p,cloneElement:d,isValidElement:a.isValidElement,PropTypes:u,createClass:h,createFactory:f,createMixin:y,DOM:s,version:c,__spread:m};t.exports=v},function(t,e,n){"use strict";function r(t){return(""+t).replace(D,"$&/")}function i(t,e){this.func=t,this.context=e,this.count=0}function o(t,e,n){var r=t.func,i=t.context;r.call(i,e,t.count++)}function s(t,e,n){if(null==t)return t;var r=i.getPooled(e,n);v(t,o,r),i.release(r)}function a(t,e,n,r){this.result=t,this.keyPrefix=e,this.func=n,this.context=r,this.count=0}function u(t,e,n){var i=t.result,o=t.keyPrefix,s=t.func,a=t.context,u=s.call(a,e,t.count++);Array.isArray(u)?c(u,i,n,y.thatReturnsArgument):null!=u&&(m.isValidElement(u)&&(u=m.cloneAndReplaceKey(u,o+(!u.key||e&&e.key===u.key?"":r(u.key)+"/")+n)),i.push(u))}function c(t,e,n,i,o){var s="";null!=n&&(s=r(n)+"/");var c=a.getPooled(e,s,i,o);v(t,u,c),a.release(c)}function h(t,e,n){if(null==t)return t;var r=[];return c(t,r,null,e,n),r}function l(t,e,n){return null}function p(t,e){return v(t,l,null)}function f(t){var e=[];return c(t,e,null,y.thatReturnsArgument),e}var d=n(262),m=n(25),y=n(45),v=n(272),x=d.twoArgumentPooler,g=d.fourArgumentPooler,D=/\/+/g;i.prototype.destructor=function(){this.func=null,this.context=null,this.count=0},d.addPoolingTo(i,x),a.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},d.addPoolingTo(a,g);var E={forEach:s,map:h,mapIntoWithKeyPrefixInternal:c,count:p,toArray:f};t.exports=E},function(t,e,n){"use strict";var r=n(25),i=r.createFactory,o={a:i("a"),abbr:i("abbr"),address:i("address"),area:i("area"),article:i("article"),aside:i("aside"),audio:i("audio"),b:i("b"),base:i("base"),bdi:i("bdi"),bdo:i("bdo"),big:i("big"),blockquote:i("blockquote"),body:i("body"),br:i("br"),button:i("button"),canvas:i("canvas"),caption:i("caption"),cite:i("cite"),code:i("code"),col:i("col"),colgroup:i("colgroup"),data:i("data"),datalist:i("datalist"),dd:i("dd"),del:i("del"),details:i("details"),dfn:i("dfn"),dialog:i("dialog"),div:i("div"),dl:i("dl"),dt:i("dt"),em:i("em"),embed:i("embed"),fieldset:i("fieldset"),figcaption:i("figcaption"),figure:i("figure"),footer:i("footer"),form:i("form"),h1:i("h1"),h2:i("h2"),h3:i("h3"),h4:i("h4"),h5:i("h5"),h6:i("h6"),head:i("head"),header:i("header"),hgroup:i("hgroup"),hr:i("hr"),html:i("html"),i:i("i"),iframe:i("iframe"),img:i("img"),input:i("input"),ins:i("ins"),kbd:i("kbd"),keygen:i("keygen"),label:i("label"),legend:i("legend"),li:i("li"),link:i("link"),main:i("main"),map:i("map"),mark:i("mark"),menu:i("menu"),menuitem:i("menuitem"),meta:i("meta"),meter:i("meter"),nav:i("nav"),noscript:i("noscript"),object:i("object"),ol:i("ol"),optgroup:i("optgroup"),option:i("option"),output:i("output"),p:i("p"),param:i("param"),picture:i("picture"),pre:i("pre"),progress:i("progress"),q:i("q"),rp:i("rp"),rt:i("rt"),ruby:i("ruby"),s:i("s"),samp:i("samp"),script:i("script"),section:i("section"),select:i("select"),small:i("small"),source:i("source"),span:i("span"),strong:i("strong"),style:i("style"),sub:i("sub"),summary:i("summary"),sup:i("sup"),table:i("table"),tbody:i("tbody"),td:i("td"),textarea:i("textarea"),tfoot:i("tfoot"),th:i("th"),thead:i("thead"),time:i("time"),title:i("title"),tr:i("tr"),track:i("track"),u:i("u"),ul:i("ul"),var:i("var"),video:i("video"),wbr:i("wbr"),circle:i("circle"),clipPath:i("clipPath"),defs:i("defs"),ellipse:i("ellipse"),g:i("g"),image:i("image"),line:i("line"),linearGradient:i("linearGradient"),mask:i("mask"),path:i("path"),pattern:i("pattern"),polygon:i("polygon"),polyline:i("polyline"),radialGradient:i("radialGradient"),rect:i("rect"),stop:i("stop"),svg:i("svg"),text:i("text"),tspan:i("tspan")};t.exports=o},function(t,e,n){"use strict";var r=n(25),i=r.isValidElement,o=n(257);t.exports=o(i)},function(t,e,n){"use strict";t.exports="15.6.2"},function(t,e,n){"use strict";var r=n(114),i=r.Component,o=n(25),s=o.isValidElement,a=n(117),u=n(230);t.exports=u(i,s,a)},function(t,e,n){"use strict";function r(t){var e=t&&(i&&t[i]||t[o]);if("function"==typeof e)return e}var i="function"==typeof Symbol&&Symbol.iterator,o="@@iterator";t.exports=r},function(t,e,n){"use strict";var r=function(){};t.exports=r},function(t,e,n){"use strict";function r(t){return o.isValidElement(t)||i("143"),t}var i=n(48),o=n(25);n(15);t.exports=r},function(t,e,n){"use strict";function r(t,e){return t&&"object"==typeof t&&null!=t.key?c.escape(t.key):e.toString(36)}function i(t,e,n,o){var p=typeof t;if("undefined"!==p&&"boolean"!==p||(t=null),null===t||"string"===p||"number"===p||"object"===p&&t.$$typeof===a)return n(o,t,""===e?h+r(t,0):e),1;var f,d,m=0,y=""===e?h:e+l;if(Array.isArray(t))for(var v=0;v<t.length;v++)f=t[v],d=y+r(f,v),m+=i(f,d,n,o);else{var x=u(t);if(x){var g,D=x.call(t);if(x!==t.entries)for(var E=0;!(g=D.next()).done;)f=g.value,d=y+r(f,E++),m+=i(f,d,n,o);else for(;!(g=D.next()).done;){var A=g.value;A&&(f=A[1],d=y+c.escape(A[0])+l+r(f,0),m+=i(f,d,n,o))}}else if("object"===p){var S="",w=String(t);s("31","[object Object]"===w?"object with keys {"+Object.keys(t).join(", ")+"}":w,S)}}return m}function o(t,e,n){return null==t?0:i(t,"",e,n)}var s=n(48),a=(n(115),n(116)),u=n(269),c=(n(15),n(261)),h=(n(46),"."),l=":";t.exports=o},function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAMAAAAM7l6QAAAAYFBMVEUAAABUfwBUfwBUfwBUfwBUfwBUfwBUfwBUfwBUfwBUfwBUfwBUfwBUfwBUfwB0lzB/n0BfhxBpjyC0x4////+qv4CJp1D09++ft3C/z5/K16/U379UfwDf58/q79+Ur2D2RCk9AAAAHXRSTlMAEEAwn9//z3Agv4/vYID/////////////////UMeji1kAAAD8SURBVHgBlZMFAoQwDATRxbXB7f+vPKnlXAZn6k2cf3A9z/PfOC8IIYni5FmmABM8FMhwT17c9hnhiZL1CwvEL1tmPD0qSKq6gaStW/kMXanVmAVRDUlH1OvuuTINo6k90Sxf8qsOtF6g4ff1osP3OnMcV7d4pzdIUtu1oA4V0DZoKmxmlEYvtDUjjS3tmKmqB+pYy8pD1VPf7jPE0I40HHcaBwnue6fGzgyS5tXIU96PV7rkDWHNLV0DK4FkoKmFpN5oUnvi8KoeA2/JXsmXQuokx0siR1G8tLkN6eB9sLwJp/yymcyaP/TrP+RPmbMMixcJVgTR1aUZ93oGXsgXQAaG6EwAAAAASUVORK5CYII="},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){n(120),t.exports=n(121)}])}); -//# sourceMappingURL=swagger-ui-standalone-preset.js.map \ No newline at end of file +//# sourceMappingURL=swagger-ui-standalone-preset.js.map diff --git a/app/code/Magento/SwaggerWebapi/composer.json b/app/code/Magento/SwaggerWebapi/composer.json index 7f9b2f258d6f8..5a72cb88c4f3a 100644 --- a/app/code/Magento/SwaggerWebapi/composer.json +++ b/app/code/Magento/SwaggerWebapi/composer.json @@ -4,10 +4,10 @@ "require": { "php": "~7.0.13|~7.1.0", "magento/framework": "101.0.*", - "magento/module-swagger": "*" + "magento/module-swagger": "100.2.*" }, "type": "magento2-module", - "version": "100.0.0", + "version": "100.2.0", "license": [ "OSL-3.0", "AFL-3.0" @@ -20,4 +20,4 @@ "Magento\\SwaggerWebapi\\": "" } } -} \ No newline at end of file +} diff --git a/app/code/Magento/Swatches/Block/Product/Renderer/Configurable.php b/app/code/Magento/Swatches/Block/Product/Renderer/Configurable.php index dfd3d6ce15f71..4b57849fc7a0b 100644 --- a/app/code/Magento/Swatches/Block/Product/Renderer/Configurable.php +++ b/app/code/Magento/Swatches/Block/Product/Renderer/Configurable.php @@ -46,6 +46,16 @@ class Configurable extends \Magento\ConfigurableProduct\Block\Product\View\Type\ */ const MEDIA_CALLBACK_ACTION = 'swatches/ajax/media'; + /** + * Name of swatch image for json config + */ + const SWATCH_IMAGE_NAME = 'swatchImage'; + + /** + * Name of swatch thumbnail for json config + */ + const SWATCH_THUMBNAIL_NAME = 'swatchThumb'; + /** * @var Product */ @@ -469,4 +479,22 @@ public function getIdentities() return []; } } + + /** + * Get Swatch image size config data. + * + * @return string + */ + public function getJsonSwatchSizeConfig(): string + { + $imageConfig = $this->swatchMediaHelper->getImageConfig(); + $sizeConfig = []; + + $sizeConfig[self::SWATCH_IMAGE_NAME]['width'] = $imageConfig[Swatch::SWATCH_IMAGE_NAME]['width']; + $sizeConfig[self::SWATCH_IMAGE_NAME]['height'] = $imageConfig[Swatch::SWATCH_IMAGE_NAME]['height']; + $sizeConfig[self::SWATCH_THUMBNAIL_NAME]['height'] = $imageConfig[Swatch::SWATCH_THUMBNAIL_NAME]['height']; + $sizeConfig[self::SWATCH_THUMBNAIL_NAME]['width'] = $imageConfig[Swatch::SWATCH_THUMBNAIL_NAME]['width']; + + return $this->jsonEncoder->encode($sizeConfig); + } } diff --git a/app/code/Magento/Swatches/Test/Unit/Block/Product/Renderer/ConfigurableTest.php b/app/code/Magento/Swatches/Test/Unit/Block/Product/Renderer/ConfigurableTest.php index 3786887f1bf7b..dd06a0c7d1974 100644 --- a/app/code/Magento/Swatches/Test/Unit/Block/Product/Renderer/ConfigurableTest.php +++ b/app/code/Magento/Swatches/Test/Unit/Block/Product/Renderer/ConfigurableTest.php @@ -319,4 +319,57 @@ public function testGetMediaCallback() $this->assertEquals($url, $this->configurable->getMediaCallback()); } + + /** + * @param array $imageConfig + * @param array $sizeConfig + * @param string $encodedSizeConfig + * @return void + * @dataProvider getJsonSwatchSizeConfigDataProvider + */ + public function testGetJsonSwatchSizeConfig(array $imageConfig, array $sizeConfig, string $encodedSizeConfig) + { + $this->swatchMediaHelper->expects($this->once()) + ->method('getImageConfig') + ->willReturn($imageConfig); + $this->jsonEncoder->expects($this->once()) + ->method('encode') + ->with($sizeConfig) + ->willReturn($encodedSizeConfig); + + $this->assertEquals($encodedSizeConfig, $this->configurable->getJsonSwatchSizeConfig()); + } + + /** + * @return array + */ + public function getJsonSwatchSizeConfigDataProvider(): array + { + return [ + [ + 'imageConfig' => [ + Swatch::SWATCH_IMAGE_NAME => [ + 'width' => 30, + 'height' => 30, + ], + Swatch::SWATCH_THUMBNAIL_NAME => [ + 'width' => 50, + 'height' => 50, + ], + ], + 'sizeConfig' => [ + Configurable::SWATCH_IMAGE_NAME => [ + 'width' => 30, + 'height' => 30, + ], + Configurable::SWATCH_THUMBNAIL_NAME => [ + 'width' => 50, + 'height' => 50, + ], + ], + 'encodedSizeConfig' => + '{"swatchImage":{"width":30,"height":30},"swatchThumb":{"height":50,"width":50}}', + ], + ]; + } } diff --git a/app/code/Magento/Swatches/composer.json b/app/code/Magento/Swatches/composer.json index 4949931f4db2d..26d6325447b2e 100644 --- a/app/code/Magento/Swatches/composer.json +++ b/app/code/Magento/Swatches/composer.json @@ -19,7 +19,7 @@ "magento/module-swatches-sample-data": "Sample Data version:100.2.*" }, "type": "magento2-module", - "version": "100.2.3", + "version": "100.2.4", "license": [ "proprietary" ], diff --git a/app/code/Magento/Swatches/view/frontend/templates/product/view/renderer.phtml b/app/code/Magento/Swatches/view/frontend/templates/product/view/renderer.phtml index fbd6ff15c006e..3ed87baacef4b 100644 --- a/app/code/Magento/Swatches/view/frontend/templates/product/view/renderer.phtml +++ b/app/code/Magento/Swatches/view/frontend/templates/product/view/renderer.phtml @@ -17,7 +17,8 @@ "jsonSwatchConfig": <?php /* @noEscape */ echo $block->getJsonSwatchConfig(); ?>, "mediaCallback": "<?= /* @escapeNotVerified */ $block->getMediaCallback() ?>", "gallerySwitchStrategy": "<?php /* @escapeNotVerified */ echo $block->getVar('gallery_switch_strategy', - 'Magento_ConfigurableProduct') ?: 'replace'; ?>" + 'Magento_ConfigurableProduct') ?: 'replace'; ?>", + "jsonSwatchImageSizeConfig": <?php /* @noEscape */ echo $block->getJsonSwatchSizeConfig() ?> }, "Magento_Swatches/js/configurable-customer-data": { "swatchOptions": <?php /* @noEscape */ echo $swatchOptions ?> diff --git a/app/code/Magento/Swatches/view/frontend/web/js/swatch-renderer.js b/app/code/Magento/Swatches/view/frontend/web/js/swatch-renderer.js index 3060dfd316929..1aabab8b1d5d6 100644 --- a/app/code/Magento/Swatches/view/frontend/web/js/swatch-renderer.js +++ b/app/code/Magento/Swatches/view/frontend/web/js/swatch-renderer.js @@ -67,6 +67,8 @@ define([ * - option-label (string) * - option-tooltip-thumb * - option-tooltip-value + * - thumb-width + * - thumb-height */ $.widget('mage.SwatchRendererTooltip', { options: { @@ -86,6 +88,8 @@ define([ label = $this.attr('option-label'), thumb = $this.attr('option-tooltip-thumb'), value = $this.attr('option-tooltip-value'), + width = $this.attr('thumb-width'), + height = $this.attr('thumb-height'), $image, $title, $corner; @@ -115,7 +119,9 @@ define([ // Image $image.css({ 'background': 'url("' + thumb + '") no-repeat center', //Background case - 'background-size': 'initial' + 'background-size': 'initial', + 'width': width + 'px', + 'height': height + 'px' }); $image.show(); } else if (type === 1) { @@ -476,6 +482,7 @@ define([ _RenderSwatchOptions: function (config, controlId) { var optionConfig = this.options.jsonSwatchConfig[config.id], optionClass = this.options.classes.optionClass, + sizeConfig = this.options.jsonSwatchImageSizeConfig, moreLimit = parseInt(this.options.numberToShow, 10), moreClass = this.options.classes.moreButton, moreText = this.options.moreButtonText, @@ -492,6 +499,8 @@ define([ value, thumb, label, + width, + height, attr; if (!optionConfig.hasOwnProperty(this.id)) { @@ -507,6 +516,8 @@ define([ type = parseInt(optionConfig[id].type, 10); value = optionConfig[id].hasOwnProperty('value') ? optionConfig[id].value : ''; thumb = optionConfig[id].hasOwnProperty('thumb') ? optionConfig[id].thumb : ''; + width = _.has(sizeConfig, 'swatchThumb') ? sizeConfig.swatchThumb.width : 110; + height = _.has(sizeConfig, 'swatchThumb') ? sizeConfig.swatchThumb.height : 90; label = this.label ? this.label : ''; attr = ' id="' + controlId + '-item-' + id + '"' + @@ -519,7 +530,9 @@ define([ ' aria-label="' + label + '"' + ' option-tooltip-thumb="' + thumb + '"' + ' option-tooltip-value="' + value + '"' + - ' role="option"'; + ' role="option"' + + ' thumb-width="' + width + '"' + + ' thumb-height="' + height + '"'; if (!this.hasOwnProperty('products') || this.products.length <= 0) { attr += ' option-empty="true"'; @@ -538,7 +551,8 @@ define([ } else if (type === 2) { // Image html += '<div class="' + optionClass + ' image" ' + attr + - ' style="background: url(' + value + ') no-repeat center; background-size: initial;">' + '' + + ' style="background: url(' + value + ') no-repeat center; background-size: initial;width:' + + sizeConfig.swatchImage.width + 'px; height:' + sizeConfig.swatchImage.height + 'px">' + '' + '</div>'; } else if (type === 3) { // Clear diff --git a/app/code/Magento/SwatchesLayeredNavigation/composer.json b/app/code/Magento/SwatchesLayeredNavigation/composer.json index b10747614cb90..d3d4cba7af291 100644 --- a/app/code/Magento/SwatchesLayeredNavigation/composer.json +++ b/app/code/Magento/SwatchesLayeredNavigation/composer.json @@ -7,7 +7,7 @@ "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "100.2.1", + "version": "100.2.2", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Tax/composer.json b/app/code/Magento/Tax/composer.json index 6ac542c04e3d4..34c3ec567467a 100644 --- a/app/code/Magento/Tax/composer.json +++ b/app/code/Magento/Tax/composer.json @@ -22,7 +22,7 @@ "magento/module-tax-sample-data": "Sample Data version:100.2.*" }, "type": "magento2-module", - "version": "100.2.5", + "version": "100.2.6", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/TaxImportExport/composer.json b/app/code/Magento/TaxImportExport/composer.json index 9be5e65dd6364..927aac1e59501 100644 --- a/app/code/Magento/TaxImportExport/composer.json +++ b/app/code/Magento/TaxImportExport/composer.json @@ -10,7 +10,7 @@ "magento/framework": "101.0.*" }, "type": "magento2-module", - "version": "100.2.1", + "version": "100.2.2", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Theme/composer.json b/app/code/Magento/Theme/composer.json index dbf28aa03c9fe..d2ac3a95d923d 100644 --- a/app/code/Magento/Theme/composer.json +++ b/app/code/Magento/Theme/composer.json @@ -22,7 +22,7 @@ "magento/module-directory": "100.2.*" }, "type": "magento2-module", - "version": "100.2.5", + "version": "100.2.6", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Translation/composer.json b/app/code/Magento/Translation/composer.json index 398f2506cb1d6..3a39f30a03e50 100644 --- a/app/code/Magento/Translation/composer.json +++ b/app/code/Magento/Translation/composer.json @@ -12,7 +12,7 @@ "magento/module-deploy": "100.2.*" }, "type": "magento2-module", - "version": "100.2.4", + "version": "100.2.5", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Ui/Test/Mftf/Section/AdminMessagesSection.xml b/app/code/Magento/Ui/Test/Mftf/Section/AdminMessagesSection.xml new file mode 100644 index 0000000000000..70b6cb5388645 --- /dev/null +++ b/app/code/Magento/Ui/Test/Mftf/Section/AdminMessagesSection.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminMessagesSection"> + <element name="successMessage" type="text" selector=".message-success"/> + </section> +</sections> diff --git a/app/code/Magento/Ui/composer.json b/app/code/Magento/Ui/composer.json index 0a2295ba9152c..e259c7d8b0639 100644 --- a/app/code/Magento/Ui/composer.json +++ b/app/code/Magento/Ui/composer.json @@ -13,7 +13,7 @@ "magento/module-config": "101.0.*" }, "type": "magento2-module", - "version": "101.0.5", + "version": "101.0.6", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Ups/composer.json b/app/code/Magento/Ups/composer.json index b93d79308b097..8e262c2a82d09 100644 --- a/app/code/Magento/Ups/composer.json +++ b/app/code/Magento/Ups/composer.json @@ -16,7 +16,7 @@ "magento/module-config": "101.0.*" }, "type": "magento2-module", - "version": "100.2.3", + "version": "100.2.4", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/UrlRewrite/composer.json b/app/code/Magento/UrlRewrite/composer.json index 2be712bf1ce5d..8f8b819d1a62a 100644 --- a/app/code/Magento/UrlRewrite/composer.json +++ b/app/code/Magento/UrlRewrite/composer.json @@ -12,7 +12,7 @@ "magento/module-cms-url-rewrite": "100.2.*" }, "type": "magento2-module", - "version": "101.0.4", + "version": "101.0.5", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/User/composer.json b/app/code/Magento/User/composer.json index b9854f9587922..4ff87f2a704a3 100644 --- a/app/code/Magento/User/composer.json +++ b/app/code/Magento/User/composer.json @@ -12,7 +12,7 @@ "magento/framework": "101.0.*" }, "type": "magento2-module", - "version": "101.0.3", + "version": "101.0.4", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Usps/composer.json b/app/code/Magento/Usps/composer.json index 0d01448ca3fb1..dd4231457a774 100644 --- a/app/code/Magento/Usps/composer.json +++ b/app/code/Magento/Usps/composer.json @@ -15,7 +15,7 @@ "lib-libxml": "*" }, "type": "magento2-module", - "version": "100.2.3", + "version": "100.2.4", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Variable/composer.json b/app/code/Magento/Variable/composer.json index 2875f74ef1974..473df42feae8b 100644 --- a/app/code/Magento/Variable/composer.json +++ b/app/code/Magento/Variable/composer.json @@ -9,7 +9,7 @@ "magento/framework": "101.0.*" }, "type": "magento2-module", - "version": "100.2.4", + "version": "100.2.5", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Vault/composer.json b/app/code/Magento/Vault/composer.json index 5c6cff396bc33..b285718b22b50 100644 --- a/app/code/Magento/Vault/composer.json +++ b/app/code/Magento/Vault/composer.json @@ -12,7 +12,7 @@ "magento/module-quote": "101.0.*" }, "type": "magento2-module", - "version": "101.0.3", + "version": "101.0.4", "license": [ "proprietary" ], diff --git a/app/code/Magento/Version/composer.json b/app/code/Magento/Version/composer.json index 7b6880b641d0b..7f015cacb728c 100644 --- a/app/code/Magento/Version/composer.json +++ b/app/code/Magento/Version/composer.json @@ -6,7 +6,7 @@ "magento/framework": "101.0.*" }, "type": "magento2-module", - "version": "100.2.1", + "version": "100.2.2", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Webapi/composer.json b/app/code/Magento/Webapi/composer.json index ca1266b038666..8a0dd448c22e0 100644 --- a/app/code/Magento/Webapi/composer.json +++ b/app/code/Magento/Webapi/composer.json @@ -14,7 +14,7 @@ "magento/module-customer": "101.0.*" }, "type": "magento2-module", - "version": "100.2.3", + "version": "100.2.4", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/WebapiSecurity/composer.json b/app/code/Magento/WebapiSecurity/composer.json index fcc66a64a3f1d..24647ea1f980f 100644 --- a/app/code/Magento/WebapiSecurity/composer.json +++ b/app/code/Magento/WebapiSecurity/composer.json @@ -7,7 +7,7 @@ "magento/framework": "101.0.*" }, "type": "magento2-module", - "version": "100.2.2", + "version": "100.2.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Weee/composer.json b/app/code/Magento/Weee/composer.json index 1c9ba96d00df1..206af1f6d150a 100644 --- a/app/code/Magento/Weee/composer.json +++ b/app/code/Magento/Weee/composer.json @@ -21,7 +21,7 @@ "magento/module-bundle": "100.2.*" }, "type": "magento2-module", - "version": "100.2.2", + "version": "100.2.3", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Widget/Test/Mftf/ActionGroup/AdminCreateWidgetActionGroup.xml b/app/code/Magento/Widget/Test/Mftf/ActionGroup/AdminCreateWidgetActionGroup.xml new file mode 100644 index 0000000000000..b6dfc00c0ff9e --- /dev/null +++ b/app/code/Magento/Widget/Test/Mftf/ActionGroup/AdminCreateWidgetActionGroup.xml @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> + <actionGroup name="AdminCreateProductsListWidgetActionGroup"> + <arguments> + <argument name="widget"/> + </arguments> + <amOnPage url="{{AdminDashboardPage.url}}" stepKey="amOnAdminDashboard"/> + <click selector="{{AdminMenuSection.content}}" stepKey="clickContent"/> + <waitForLoadingMaskToDisappear stepKey="waitForWidgets" /> + <click selector="{{AdminMenuSection.widgets}}" stepKey="clickWidgets"/> + <waitForPageLoad stepKey="waitForWidgetsLoad"/> + <click selector="{{AdminMainActionsSection.add}}" stepKey="addNewWidget"/> + <selectOption selector="{{AdminNewWidgetSection.widgetType}}" userInput="{{widget.type}}" stepKey="setWidgetType"/> + <selectOption selector="{{AdminNewWidgetSection.widgetDesignTheme}}" userInput="{{widget.design_theme}}" stepKey="setWidgetDesignTheme"/> + <click selector="{{AdminNewWidgetSection.continue}}" stepKey="clickContinue"/> + <fillField selector="{{AdminNewWidgetSection.widgetTitle}}" userInput="{{widget.name}}" stepKey="fillTitle"/> + <selectOption selector="{{AdminNewWidgetSection.widgetStoreIds}}" userInput="{{widget.store_ids[0]}}" stepKey="setWidgetStoreIds"/> + <click selector="{{AdminNewWidgetSection.addLayoutUpdate}}" stepKey="clickAddLayoutUpdate"/> + <selectOption selector="{{AdminNewWidgetSection.selectDisplayOn}}" userInput="{{widget.display_on}}" stepKey="setDisplayOn"/> + <waitForAjaxLoad stepKey="waitForLoad"/> + <selectOption selector="{{AdminNewWidgetSection.selectContainer}}" userInput="{{widget.container}}" stepKey="setContainer"/> + <waitForAjaxLoad stepKey="waitForPageLoad"/> + <scrollToTopOfPage stepKey="scrollToTopOfPage"/> + <click selector="{{AdminNewWidgetSection.widgetOptions}}" stepKey="clickWidgetOptions"/> + <click selector="{{AdminNewWidgetSection.addNewCondition}}" stepKey="clickAddNewCondition"/> + <selectOption selector="{{AdminNewWidgetSection.selectCondition}}" userInput="{{widget.condition}}" stepKey="selectCondition"/> + <waitForElement selector="{{AdminNewWidgetSection.ruleParameter}}" stepKey="waitRuleParameter"/> + <click selector="{{AdminNewWidgetSection.ruleParameter}}" stepKey="clickRuleParameter"/> + <click selector="{{AdminNewWidgetSection.openChooser}}" stepKey="clickChooser"/> + <waitForLoadingMaskToDisappear stepKey="waitForLoadChooser"/> + <click selector="{{AdminNewWidgetSection.sortById}}" stepKey="clickSortById"/> + <waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskDisappear"/> + <click selector="{{AdminNewWidgetSection.sortByIdAscend}}" stepKey="clickSortByIdAscend"/> + <waitForLoadingMaskToDisappear stepKey="waitForLoadingMask"/> + <click selector="{{AdminNewWidgetSection.selectAll}}" stepKey="clickSelectAll"/> + <click selector="{{AdminNewWidgetSection.applyParameter}}" stepKey="clickApplyRuleParameter"/> + <click selector="{{AdminMainActionsSection.save}}" stepKey="clickSaveWidget"/> + <waitForPageLoad stepKey="waitForSaveLoad"/> + <see selector="{{AdminMessagesSection.successMessage}}" userInput="The widget instance has been saved" stepKey="seeSuccess"/> + </actionGroup> + <actionGroup name="AdminDeleteWidgetActionGroup"> + <arguments> + <argument name="widget"/> + </arguments> + <amOnPage url="{{AdminWidgetsPage.url}}" stepKey="amOnAdmin"/> + <waitForPageLoad stepKey="waitWidgetsLoad"/> + <fillField selector="{{AdminWidgetsSection.widgetTitleSearch}}" userInput="{{widget.name}}" stepKey="fillTitle"/> + <click selector="{{AdminWidgetsSection.searchButton}}" stepKey="clickContinue"/> + <click selector="{{AdminWidgetsSection.searchResult}}" stepKey="clickSearchResult"/> + <waitForPageLoad stepKey="waitForResultLoad"/> + <click selector="{{AdminMainActionsSection.delete}}" stepKey="clickDelete"/> + <waitForAjaxLoad stepKey="waitForAjaxLoad"/> + <click selector="{{AdminConfirmationModalSection.ok}}" stepKey="confirmDelete"/> + <see selector="{{AdminMessagesSection.successMessage}}" userInput="The widget instance has been deleted" stepKey="seeSuccess"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Widget/Test/Mftf/Data/WidgetsData.xml b/app/code/Magento/Widget/Test/Mftf/Data/WidgetsData.xml new file mode 100644 index 0000000000000..26864c60b6494 --- /dev/null +++ b/app/code/Magento/Widget/Test/Mftf/Data/WidgetsData.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="ProductsListWidget" type="widget"> + <data key="type">Catalog Products List</data> + <data key="design_theme">Magento Luma</data> + <data key="name" unique="suffix">TestWidget</data> + <array key="store_ids"> + <item>All Store Views</item> + </array> + <data key="condition">SKU</data> + <data key="display_on">All Pages</data> + <data key="container">Main Content Area</data> + </entity> +</entities> diff --git a/app/code/Magento/Widget/Test/Mftf/Page/AdminNewWidgetPage.xml b/app/code/Magento/Widget/Test/Mftf/Page/AdminNewWidgetPage.xml new file mode 100644 index 0000000000000..8eb0a5f65318e --- /dev/null +++ b/app/code/Magento/Widget/Test/Mftf/Page/AdminNewWidgetPage.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="AdminNewWidgetPage" url="admin/admin/widget_instance/new/" area="admin" module="Magento_Widget"> + <section name="AdminNewWidgetSection"/> + </page> +</pages> diff --git a/app/code/Magento/Widget/Test/Mftf/Page/AdminWidgetsPage.xml b/app/code/Magento/Widget/Test/Mftf/Page/AdminWidgetsPage.xml new file mode 100644 index 0000000000000..421899ad21646 --- /dev/null +++ b/app/code/Magento/Widget/Test/Mftf/Page/AdminWidgetsPage.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> + <page name="AdminWidgetsPage" url="admin/widget_instance/" area="admin" module="Magento_Widget"> + <section name="AdminWidgetsSection"/> + </page> +</pages> diff --git a/app/code/Magento/Widget/Test/Mftf/Section/AdminNewWidgetSection.xml b/app/code/Magento/Widget/Test/Mftf/Section/AdminNewWidgetSection.xml new file mode 100644 index 0000000000000..b96d3865a6661 --- /dev/null +++ b/app/code/Magento/Widget/Test/Mftf/Section/AdminNewWidgetSection.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminNewWidgetSection"> + <element name="widgetType" type="select" selector="#code"/> + <element name="widgetDesignTheme" type="select" selector="#theme_id"/> + <element name="continue" type="button" selector="#continue_button"/> + <element name="widgetTitle" type="input" selector="#title"/> + <element name="widgetStoreIds" type="select" selector="#store_ids"/> + <element name="addLayoutUpdate" type="button" selector=".action-default.scalable.action-add"/> + <element name="selectDisplayOn" type="select" selector="#widget_instance[0][page_group]"/> + <element name="selectContainer" type="select" selector="#all_pages_0>table>tbody>tr>td:nth-child(1)>div>div>select"/> + <element name="widgetOptions" type="select" selector="#widget_instace_tabs_properties_section"/> + <element name="addNewCondition" type="select" selector=".rule-param.rule-param-new-child"/> + <element name="selectCondition" type="input" selector="#conditions__1__new_child"/> + <element name="ruleParameter" type="select" selector="#conditions__1__children>li:nth-child(1)>span:nth-child(4)>a"/> + <element name="setRuleParameter" type="input" selector="#conditions__1--1__value"/> + <element name="applyParameter" type="button" selector=".rule-param-apply"/> + <element name="openChooser" type="button" selector=".rule-chooser-trigger"/> + <element name="selectAll" type="checkbox" selector=".admin__control-checkbox"/> + <element name="sortById" type="button" selector="th.data-grid-th._sortable.not-sort.col-entity_id"/> + <element name="sortByIdAscend" type="button" selector="th.data-grid-th._sortable._ascend.col-entity_id"/> + </section> +</sections> diff --git a/app/code/Magento/Widget/Test/Mftf/Section/AdminWidgetsSection.xml b/app/code/Magento/Widget/Test/Mftf/Section/AdminWidgetsSection.xml new file mode 100644 index 0000000000000..5a0515d35ad58 --- /dev/null +++ b/app/code/Magento/Widget/Test/Mftf/Section/AdminWidgetsSection.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="AdminWidgetsSection"> + <element name="widgetTitleSearch" type="input" selector="#widgetInstanceGrid_filter_title"/> + <element name="searchButton" type="button" selector=".action-default.scalable.action-secondary"/> + <element name="searchResult" type="text" selector="#widgetInstanceGrid_table>tbody>tr:nth-child(1)"/> + </section> +</sections> diff --git a/app/code/Magento/Widget/Test/Mftf/Section/StorefrontWidgetsSection.xml b/app/code/Magento/Widget/Test/Mftf/Section/StorefrontWidgetsSection.xml new file mode 100644 index 0000000000000..23908626389f9 --- /dev/null +++ b/app/code/Magento/Widget/Test/Mftf/Section/StorefrontWidgetsSection.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> + <section name="StorefrontWidgetsSection"> + <element name="widgetProductsGrid" type="block" selector=".block.widget.block-products-list.grid"/> + <element name="widgetProductName" type="text" selector=".product-item-name"/> + </section> +</sections> diff --git a/app/code/Magento/Widget/composer.json b/app/code/Magento/Widget/composer.json index 7e0a3f21cf458..23ee88072fbd5 100644 --- a/app/code/Magento/Widget/composer.json +++ b/app/code/Magento/Widget/composer.json @@ -16,7 +16,7 @@ "magento/module-widget-sample-data": "Sample Data version:100.2.*" }, "type": "magento2-module", - "version": "101.0.3", + "version": "101.0.4", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Wishlist/Controller/Index/Update.php b/app/code/Magento/Wishlist/Controller/Index/Update.php index cc3f222c83065..332edbedc6ef4 100644 --- a/app/code/Magento/Wishlist/Controller/Index/Update.php +++ b/app/code/Magento/Wishlist/Controller/Index/Update.php @@ -109,6 +109,9 @@ public function execute() } try { $item->setDescription($description)->setQty($qty)->save(); + $this->messageManager->addSuccessMessage( + __('%1 has been updated in your Wish List.', $item->getProduct()->getName()) + ); $updatedItems++; } catch (\Exception $e) { $this->messageManager->addError( diff --git a/app/code/Magento/Wishlist/Test/Mftf/ActionGroup/StorefrontCustomerWishlistActionGroup.xml b/app/code/Magento/Wishlist/Test/Mftf/ActionGroup/StorefrontCustomerWishlistActionGroup.xml index 26efac55dc31b..87a77526e0af5 100644 --- a/app/code/Magento/Wishlist/Test/Mftf/ActionGroup/StorefrontCustomerWishlistActionGroup.xml +++ b/app/code/Magento/Wishlist/Test/Mftf/ActionGroup/StorefrontCustomerWishlistActionGroup.xml @@ -20,6 +20,29 @@ <seeCurrentUrlMatches regex="~/wishlist_id/\d+/$~" stepKey="seeCurrentUrlMatches"/> </actionGroup> + <!-- Add Product to wishlist from the product page and check message --> + <actionGroup name="StorefrontCustomerAddProductToWishlistActionGroup"> + <arguments> + <argument name="productVar"/> + </arguments> + <click selector="{{StorefrontProductInfoMainSection.productAddToWishlist}}" stepKey="addProductToWishlistClickAddToWishlist" /> + <waitForElement selector="{{StorefrontCustomerWishlistSection.successMsg}}" time="30" stepKey="addProductToWishlistWaitForSuccessMessage"/> + <see selector="{{StorefrontCustomerWishlistSection.successMsg}}" userInput="{{productVar.name}} has been added to your Wish List." stepKey="addProductToWishlistSeeProductNameAddedToWishlist"/> + <seeCurrentUrlMatches regex="~/wishlist_id/\d+/$~" stepKey="seeCurrentUrlMatches"/> + </actionGroup> + + <!-- Check product in wishlist --> + <actionGroup name="StorefrontCustomerCheckProductInWishlist"> + <arguments> + <argument name="productVar"/> + </arguments> + <waitForElement selector="{{StorefrontCustomerWishlistProductSection.productTitleByName(productVar.name)}}" time="30" stepKey="assertWishlistProductName"/> + <see userInput="${{productVar.price}}.00" selector="{{StorefrontCustomerWishlistProductSection.productPriceByName(productVar.name)}}" stepKey="assertWishlistProductPrice"/> + <moveMouseOver selector="{{StorefrontCustomerWishlistProductSection.productInfoByName(productVar.name)}}" stepKey="wishlistMoveMouseOverProduct" /> + <seeElement selector="{{StorefrontCustomerWishlistProductSection.productAddToCartByName(productVar.name)}}" stepKey="assertWishlistAddToCart" /> + <seeElement selector="{{StorefrontCustomerWishlistProductSection.productImageByName(productVar.name)}}" stepKey="assertWishlistProductImage" /> + </actionGroup> + <!-- Check product in wishlist sidebar --> <actionGroup name="StorefrontCustomerCheckProductInWishlistSidebar"> <arguments> @@ -50,4 +73,18 @@ <waitForElement selector="{{StorefrontCategoryMainSection.SuccessMsg}}" time="30" stepKey="addProductToCartFromWishlistUsingSidebarWaitForSuccessMessage"/> <see selector="{{StorefrontCategoryMainSection.SuccessMsg}}" userInput="You added {{product.name}} to your shopping cart." stepKey="addProductToCartFromWishlistUsingSidebarSeeProductNameAddedToCartFromWishlist"/> </actionGroup> + + <actionGroup name="StorefrontCustomerEditProductInWishlist"> + <arguments> + <argument name="product"/> + <argument name="description" type="string"/> + <argument name="quantity" type="string"/> + </arguments> + <moveMouseOver selector="{{StorefrontCustomerWishlistProductSection.productInfoByName(product.name)}}" stepKey="mouseOverOnProduct"/> + <fillField selector="{{StorefrontCustomerWishlistProductSection.productDescription(product.name)}}" userInput="{{description}}" stepKey="fillDescription"/> + <fillField selector="{{StorefrontCustomerWishlistProductSection.productQuantity(product.name)}}" userInput="{{quantity}}" stepKey="fillQuantity"/> + <moveMouseOver selector="{{StorefrontCustomerWishlistProductSection.productAddAllToCart}}" stepKey="mouseOver"/> + <click selector="{{StorefrontCustomerWishlistProductSection.productUpdateWishList}}" stepKey="submitUpdateWishlist"/> + <see selector="{{StorefrontMessagesSection.success}}" userInput="{{product.name}} has been updated in your Wish List." stepKey="successMessage"/> + </actionGroup> </actionGroups> diff --git a/app/code/Magento/Wishlist/Test/Mftf/Page/StorefrontCustomerWishlistPage.xml b/app/code/Magento/Wishlist/Test/Mftf/Page/StorefrontCustomerWishlistPage.xml index cf2db7efab6c6..7b7b5e8b39aa6 100644 --- a/app/code/Magento/Wishlist/Test/Mftf/Page/StorefrontCustomerWishlistPage.xml +++ b/app/code/Magento/Wishlist/Test/Mftf/Page/StorefrontCustomerWishlistPage.xml @@ -10,5 +10,6 @@ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd"> <page name="StorefrontCustomerWishlistPage" url="/wishlist/" area="storefront" module="Magento_Wishlist"> <section name="StorefrontCustomerWishlistSection" /> + <section name="StorefrontCustomerWishlistProductSection" /> </page> </pages> diff --git a/app/code/Magento/Wishlist/Test/Mftf/Section/StorefrontCustomerWishlistProductSection.xml b/app/code/Magento/Wishlist/Test/Mftf/Section/StorefrontCustomerWishlistProductSection.xml new file mode 100644 index 0000000000000..88d68a460da74 --- /dev/null +++ b/app/code/Magento/Wishlist/Test/Mftf/Section/StorefrontCustomerWishlistProductSection.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> + <section name="StorefrontCustomerWishlistProductSection"> + <element name="productTitleByName" type="button" selector="//main//li//a[contains(text(), '{{var1}}')]" parameterized="true"/> + <element name="productPriceByName" type="text" selector="//main//li[.//a[contains(text(), '{{var1}}')]]//span[@class='price']" parameterized="true"/> + <element name="productImageByName" type="text" selector="//main//li[.//a[contains(text(), '{{var1}}')]]//img[@class='product-image-photo']" parameterized="true"/> + <element name="productInfoByName" type="text" selector="//main//li[.//a[contains(text(), '{{var1}}')]]//div[@class='product-item-info']" parameterized="true"/> + <element name="productAddToCartByName" type="button" selector="//main//li[.//a[contains(text(), '{{var1}}')]]//button[contains(@class, 'action tocart primary')]" parameterized="true"/> + <element name="productImageByImageName" type="text" selector="//main//li//a//img[contains(@src, '{{var1}}')]" parameterized="true"/> + <element name="productDescription" type="input" selector="//a[contains(text(), '{{productName}}')]/ancestor::div[@class='product-item-info']//textarea[@class='product-item-comment']" parameterized="true"/> + <element name="productQuantity" type="input" selector="//a[contains(text(), '{{productName}}')]/ancestor::div[@class='product-item-info']//input[@class='input-text qty']" parameterized="true"/> + <element name="productUpdateWishList" type="button" selector=".column.main .actions-toolbar .action.update" timeout="30"/> + <element name="productAddAllToCart" type="button" selector=".column.main .actions-toolbar .action.tocart" timeout="30"/> + </section> +</sections> diff --git a/app/code/Magento/Wishlist/Test/Mftf/Section/StorefrontProductInfoMainSection.xml b/app/code/Magento/Wishlist/Test/Mftf/Section/StorefrontProductInfoMainSection.xml new file mode 100644 index 0000000000000..e77c489074069 --- /dev/null +++ b/app/code/Magento/Wishlist/Test/Mftf/Section/StorefrontProductInfoMainSection.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> + <section name="StorefrontProductInfoMainSection"> + <element name="productAddToWishlist" type="button" selector="a.action.towishlist"/> + </section> +</sections> diff --git a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontUpdateWishlistTest.xml b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontUpdateWishlistTest.xml new file mode 100644 index 0000000000000..0171d5414b64c --- /dev/null +++ b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontUpdateWishlistTest.xml @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> + <test name="StorefrontUpdateWishlistTest"> + <annotations> + <title value="Displaying of message after Wish List update"/> + <stories value="MAGETWO-89234: Wishlist update does not return a success message"/> + <description value="Displaying of message after Wish List update"/> + <features value="Wishlist"/> + <severity value="MAJOR"/> + <testCaseId value="MAGETWO-94905"/> + <group value="Wishlist"/> + </annotations> + + <before> + <createData entity="SimpleSubCategory" stepKey="createCategory"/> + <createData entity="SimpleProduct" stepKey="createProduct"> + <requiredEntity createDataKey="createCategory"/> + </createData> + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> + </before> + + <actionGroup ref="CustomerLoginOnStorefront" stepKey="loginToStorefrontAccount"> + <argument name="customer" value="$$createCustomer$$"/> + </actionGroup> + + <actionGroup ref="OpenProductFromCategoryPageActionGroup" stepKey="openProductFromCategory"> + <argument name="category" value="$$createCategory$$"/> + <argument name="product" value="$$createProduct$$"/> + </actionGroup> + + <actionGroup ref="StorefrontCustomerAddProductToWishlistActionGroup" stepKey="addProductToWishlist"> + <argument name="productVar" value="$$createProduct$$"/> + </actionGroup> + + <actionGroup ref="StorefrontCustomerCheckProductInWishlist" stepKey="checkProductInWishlist"> + <argument name="productVar" value="$$createProduct$$"/> + </actionGroup> + + <actionGroup ref="StorefrontCustomerEditProductInWishlist" stepKey="updateProductInWishlist"> + <argument name="product" value="$$createProduct$$"/> + <argument name="description" value="some text"/> + <argument name="quantity" value="2"/> + </actionGroup> + + <after> + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> + <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> + </after> + </test> +</tests> diff --git a/app/code/Magento/Wishlist/composer.json b/app/code/Magento/Wishlist/composer.json index 18ef1c42d24d1..4db0e55d869fc 100644 --- a/app/code/Magento/Wishlist/composer.json +++ b/app/code/Magento/Wishlist/composer.json @@ -23,7 +23,7 @@ "magento/module-wishlist-sample-data": "Sample Data version:100.2.*" }, "type": "magento2-module", - "version": "101.0.3", + "version": "101.0.4", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/WishlistAnalytics/composer.json b/app/code/Magento/WishlistAnalytics/composer.json index af3e114ca8167..820430f6c7d17 100644 --- a/app/code/Magento/WishlistAnalytics/composer.json +++ b/app/code/Magento/WishlistAnalytics/composer.json @@ -7,7 +7,7 @@ "magento/module-wishlist": "101.0.*" }, "type": "magento2-module", - "version": "100.2.1", + "version": "100.2.2", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/design/adminhtml/Magento/backend/composer.json b/app/design/adminhtml/Magento/backend/composer.json index fc6034c74dfae..11f13279b8bc8 100644 --- a/app/design/adminhtml/Magento/backend/composer.json +++ b/app/design/adminhtml/Magento/backend/composer.json @@ -6,7 +6,7 @@ "magento/framework": "101.0.*" }, "type": "magento2-theme", - "version": "100.2.3", + "version": "100.2.4", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/design/adminhtml/Magento/backend/web/css/source/components/_calendar-temp.less b/app/design/adminhtml/Magento/backend/web/css/source/components/_calendar-temp.less index 11b187db3d1e4..416fb2a3071a5 100644 --- a/app/design/adminhtml/Magento/backend/web/css/source/components/_calendar-temp.less +++ b/app/design/adminhtml/Magento/backend/web/css/source/components/_calendar-temp.less @@ -43,7 +43,7 @@ height: @action__height; margin-left: -@action__height; overflow: hidden; - position: absolute; + position: relative; vertical-align: top; z-index: 1; @@ -389,9 +389,15 @@ margin-bottom: -22px; } +/** + * @codingStandardsIgnoreStart + */ .ui-timepicker-div dl .ui_tpicker_time_label { margin-bottom: -25px; } +/** + * @codingStandardsIgnoreEnd + */ .ui-timepicker-div dl dd { margin: 0 10px 10px 65px; diff --git a/app/design/frontend/Magento/blank/composer.json b/app/design/frontend/Magento/blank/composer.json index 13699e87240f6..5219254e42674 100644 --- a/app/design/frontend/Magento/blank/composer.json +++ b/app/design/frontend/Magento/blank/composer.json @@ -6,7 +6,7 @@ "magento/framework": "101.0.*" }, "type": "magento2-theme", - "version": "100.2.3", + "version": "100.2.4", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/design/frontend/Magento/luma/composer.json b/app/design/frontend/Magento/luma/composer.json index 4bd2704ac1dff..19d37d0216064 100644 --- a/app/design/frontend/Magento/luma/composer.json +++ b/app/design/frontend/Magento/luma/composer.json @@ -7,7 +7,7 @@ "magento/framework": "101.0.*" }, "type": "magento2-theme", - "version": "100.2.4", + "version": "100.2.5", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/functions.php b/app/functions.php index 0b5fa4de4100e..4b00d01819f70 100644 --- a/app/functions.php +++ b/app/functions.php @@ -6,17 +6,22 @@ /** * Create value-object \Magento\Framework\Phrase - * + * @deprecated The global function __() is now loaded via Magento Framework, the below require is only + * for backwards compatibility reasons and this file will be removed in a future version + * @see Magento\Framework\Phrase\__.php + * @SuppressWarnings(PHPMD.ShortMethodName) * @return \Magento\Framework\Phrase */ -function __() -{ - $argc = func_get_args(); +if (!function_exists('__')) { + function __() + { + $argc = func_get_args(); - $text = array_shift($argc); - if (!empty($argc) && is_array($argc[0])) { - $argc = $argc[0]; - } + $text = array_shift($argc); + if (!empty($argc) && is_array($argc[0])) { + $argc = $argc[0]; + } - return new \Magento\Framework\Phrase($text, $argc); + return new \Magento\Framework\Phrase($text, $argc); + } } diff --git a/composer.json b/composer.json index 82a49134fae7d..94f5e5edea312 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "magento/magento2ce", "description": "Magento 2 (Open Source)", "type": "project", - "version": "2.2.6-dev", + "version": "2.2.7-dev", "license": [ "OSL-3.0", "AFL-3.0" @@ -85,125 +85,125 @@ "ext-pcntl": "Need for run processes in parallel mode" }, "replace": { - "magento/module-marketplace": "100.2.2", - "magento/module-admin-notification": "100.2.3", - "magento/module-advanced-pricing-import-export": "100.2.3", - "magento/module-analytics": "100.2.2", - "magento/module-authorization": "100.2.1", - "magento/module-authorizenet": "100.2.1", - "magento/module-backend": "100.2.5", - "magento/module-backup": "100.2.4", - "magento/module-braintree": "100.2.5", - "magento/module-bundle": "100.2.4", - "magento/module-bundle-import-export": "100.2.2", - "magento/module-cache-invalidate": "100.2.1", - "magento/module-captcha": "100.2.2", - "magento/module-catalog": "102.0.5", - "magento/module-catalog-analytics": "100.2.1", - "magento/module-catalog-import-export": "100.2.4", - "magento/module-catalog-inventory": "100.2.4", - "magento/module-catalog-rule": "101.0.4", - "magento/module-catalog-rule-configurable": "100.2.1", - "magento/module-catalog-search": "100.2.4", - "magento/module-catalog-url-rewrite": "100.2.4", - "magento/module-catalog-widget": "100.2.2", - "magento/module-checkout": "100.2.5", - "magento/module-checkout-agreements": "100.2.1", - "magento/module-cms": "102.0.5", - "magento/module-cms-url-rewrite": "100.2.1", - "magento/module-config": "101.0.5", - "magento/module-configurable-import-export": "100.2.2", - "magento/module-configurable-product": "100.2.5", - "magento/module-configurable-product-sales": "100.2.2", - "magento/module-contact": "100.2.2", - "magento/module-cookie": "100.2.1", - "magento/module-cron": "100.2.3", - "magento/module-currency-symbol": "100.2.1", - "magento/module-customer": "101.0.5", - "magento/module-customer-analytics": "100.2.1", - "magento/module-customer-import-export": "100.2.3", - "magento/module-deploy": "100.2.4", - "magento/module-developer": "100.2.3", - "magento/module-dhl": "100.2.2", - "magento/module-directory": "100.2.4", - "magento/module-downloadable": "100.2.4", - "magento/module-downloadable-import-export": "100.2.1", - "magento/module-eav": "101.0.4", - "magento/module-email": "100.2.3", - "magento/module-encryption-key": "100.2.1", - "magento/module-fedex": "100.2.2", - "magento/module-gift-message": "100.2.1", - "magento/module-google-adwords": "100.2.1", - "magento/module-google-analytics": "100.2.3", - "magento/module-google-optimizer": "100.2.2", - "magento/module-grouped-import-export": "100.2.1", - "magento/module-grouped-product": "100.2.3", - "magento/module-import-export": "100.2.5", - "magento/module-indexer": "100.2.3", - "magento/module-instant-purchase": "100.2.1", - "magento/module-integration": "100.2.3", - "magento/module-layered-navigation": "100.2.2", - "magento/module-media-storage": "100.2.1", - "magento/module-msrp": "100.2.1", - "magento/module-multishipping": "100.2.2", - "magento/module-new-relic-reporting": "100.2.3", - "magento/module-newsletter": "100.2.4", - "magento/module-offline-payments": "100.2.1", - "magento/module-offline-shipping": "100.2.3", - "magento/module-page-cache": "100.2.2", - "magento/module-payment": "100.2.3", - "magento/module-paypal": "100.2.3", - "magento/module-persistent": "100.2.1", - "magento/module-product-alert": "100.2.2", - "magento/module-product-video": "100.2.3", - "magento/module-quote": "101.0.4", - "magento/module-quote-analytics": "100.2.1", - "magento/module-release-notification": "100.2.2", - "magento/module-reports": "100.2.5", - "magento/module-require-js": "100.2.2", - "magento/module-review": "100.2.5", - "magento/module-review-analytics": "100.2.1", - "magento/module-robots": "100.2.2", - "magento/module-rss": "100.2.1", - "magento/module-rule": "100.2.2", - "magento/module-sales": "101.0.4", - "magento/module-sales-analytics": "100.2.1", - "magento/module-sales-inventory": "100.2.1", - "magento/module-sales-rule": "101.0.3", - "magento/module-sales-sequence": "100.2.1", - "magento/module-sample-data": "100.2.3", - "magento/module-search": "100.2.4", - "magento/module-security": "100.2.2", - "magento/module-send-friend": "100.2.1", - "magento/module-shipping": "100.2.5", - "magento/module-signifyd": "100.2.2", - "magento/module-sitemap": "100.2.4", - "magento/module-store": "100.2.4", - "magento/module-swagger-webapi": "100.0.0", - "magento/module-swagger": "100.2.3", - "magento/module-swatches": "100.2.3", - "magento/module-swatches-layered-navigation": "100.2.1", - "magento/module-tax": "100.2.5", - "magento/module-tax-import-export": "100.2.1", - "magento/module-theme": "100.2.5", - "magento/module-translation": "100.2.4", - "magento/module-ui": "101.0.5", - "magento/module-ups": "100.2.3", - "magento/module-url-rewrite": "101.0.4", - "magento/module-user": "101.0.3", - "magento/module-usps": "100.2.3", - "magento/module-variable": "100.2.4", - "magento/module-vault": "101.0.3", - "magento/module-version": "100.2.1", - "magento/module-webapi": "100.2.3", - "magento/module-webapi-security": "100.2.2", - "magento/module-weee": "100.2.2", - "magento/module-widget": "101.0.3", - "magento/module-wishlist": "101.0.3", - "magento/module-wishlist-analytics": "100.2.1", - "magento/theme-adminhtml-backend": "100.2.3", - "magento/theme-frontend-blank": "100.2.3", - "magento/theme-frontend-luma": "100.2.4", + "magento/module-marketplace": "100.2.3", + "magento/module-admin-notification": "100.2.4", + "magento/module-advanced-pricing-import-export": "100.2.4", + "magento/module-analytics": "100.2.3", + "magento/module-authorization": "100.2.2", + "magento/module-authorizenet": "100.2.2", + "magento/module-backend": "100.2.6", + "magento/module-backup": "100.2.5", + "magento/module-braintree": "100.2.6", + "magento/module-bundle": "100.2.5", + "magento/module-bundle-import-export": "100.2.3", + "magento/module-cache-invalidate": "100.2.2", + "magento/module-captcha": "100.2.3", + "magento/module-catalog": "102.0.6", + "magento/module-catalog-analytics": "100.2.2", + "magento/module-catalog-import-export": "100.2.5", + "magento/module-catalog-inventory": "100.2.5", + "magento/module-catalog-rule": "101.0.5", + "magento/module-catalog-rule-configurable": "100.2.2", + "magento/module-catalog-search": "100.2.5", + "magento/module-catalog-url-rewrite": "100.2.5", + "magento/module-catalog-widget": "100.2.3", + "magento/module-checkout": "100.2.6", + "magento/module-checkout-agreements": "100.2.2", + "magento/module-cms": "102.0.6", + "magento/module-cms-url-rewrite": "100.2.2", + "magento/module-config": "101.0.6", + "magento/module-configurable-import-export": "100.2.3", + "magento/module-configurable-product": "100.2.6", + "magento/module-configurable-product-sales": "100.2.3", + "magento/module-contact": "100.2.3", + "magento/module-cookie": "100.2.2", + "magento/module-cron": "100.2.4", + "magento/module-currency-symbol": "100.2.2", + "magento/module-customer": "101.0.6", + "magento/module-customer-analytics": "100.2.2", + "magento/module-customer-import-export": "100.2.4", + "magento/module-deploy": "100.2.5", + "magento/module-developer": "100.2.4", + "magento/module-dhl": "100.2.3", + "magento/module-directory": "100.2.5", + "magento/module-downloadable": "100.2.5", + "magento/module-downloadable-import-export": "100.2.2", + "magento/module-eav": "101.0.5", + "magento/module-email": "100.2.4", + "magento/module-encryption-key": "100.2.2", + "magento/module-fedex": "100.2.3", + "magento/module-gift-message": "100.2.2", + "magento/module-google-adwords": "100.2.2", + "magento/module-google-analytics": "100.2.4", + "magento/module-google-optimizer": "100.2.3", + "magento/module-grouped-import-export": "100.2.2", + "magento/module-grouped-product": "100.2.4", + "magento/module-import-export": "100.2.6", + "magento/module-indexer": "100.2.4", + "magento/module-instant-purchase": "100.2.2", + "magento/module-integration": "100.2.4", + "magento/module-layered-navigation": "100.2.3", + "magento/module-media-storage": "100.2.2", + "magento/module-msrp": "100.2.2", + "magento/module-multishipping": "100.2.3", + "magento/module-new-relic-reporting": "100.2.4", + "magento/module-newsletter": "100.2.5", + "magento/module-offline-payments": "100.2.2", + "magento/module-offline-shipping": "100.2.4", + "magento/module-page-cache": "100.2.3", + "magento/module-payment": "100.2.4", + "magento/module-paypal": "100.2.4", + "magento/module-persistent": "100.2.2", + "magento/module-product-alert": "100.2.3", + "magento/module-product-video": "100.2.4", + "magento/module-quote": "101.0.5", + "magento/module-quote-analytics": "100.2.2", + "magento/module-release-notification": "100.2.3", + "magento/module-reports": "100.2.6", + "magento/module-require-js": "100.2.3", + "magento/module-review": "100.2.6", + "magento/module-review-analytics": "100.2.2", + "magento/module-robots": "100.2.3", + "magento/module-rss": "100.2.2", + "magento/module-rule": "100.2.3", + "magento/module-sales": "101.0.5", + "magento/module-sales-analytics": "100.2.2", + "magento/module-sales-inventory": "100.2.2", + "magento/module-sales-rule": "101.0.4", + "magento/module-sales-sequence": "100.2.2", + "magento/module-sample-data": "100.2.4", + "magento/module-search": "100.2.5", + "magento/module-security": "100.2.3", + "magento/module-send-friend": "100.2.2", + "magento/module-shipping": "100.2.6", + "magento/module-signifyd": "100.2.3", + "magento/module-sitemap": "100.2.5", + "magento/module-store": "100.2.5", + "magento/module-swagger-webapi": "100.2.0", + "magento/module-swagger": "100.2.4", + "magento/module-swatches": "100.2.4", + "magento/module-swatches-layered-navigation": "100.2.2", + "magento/module-tax": "100.2.6", + "magento/module-tax-import-export": "100.2.2", + "magento/module-theme": "100.2.6", + "magento/module-translation": "100.2.5", + "magento/module-ui": "101.0.6", + "magento/module-ups": "100.2.4", + "magento/module-url-rewrite": "101.0.5", + "magento/module-user": "101.0.4", + "magento/module-usps": "100.2.4", + "magento/module-variable": "100.2.5", + "magento/module-vault": "101.0.4", + "magento/module-version": "100.2.2", + "magento/module-webapi": "100.2.4", + "magento/module-webapi-security": "100.2.3", + "magento/module-weee": "100.2.3", + "magento/module-widget": "101.0.4", + "magento/module-wishlist": "101.0.4", + "magento/module-wishlist-analytics": "100.2.2", + "magento/theme-adminhtml-backend": "100.2.4", + "magento/theme-frontend-blank": "100.2.4", + "magento/theme-frontend-luma": "100.2.5", "magento/language-de_de": "100.2.0", "magento/language-en_us": "100.2.0", "magento/language-es_es": "100.2.0", @@ -211,7 +211,7 @@ "magento/language-nl_nl": "100.2.0", "magento/language-pt_br": "100.2.0", "magento/language-zh_hans_cn": "100.2.0", - "magento/framework": "101.0.5", + "magento/framework": "101.0.6", "trentrichardson/jquery-timepicker-addon": "1.4.3", "components/jquery": "1.11.0", "blueimp/jquery-file-upload": "5.6.14", diff --git a/composer.lock b/composer.lock index c63b89fa16ec2..ea4117fa69c2f 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "0b38b8779bcb06c6518a90750fde31f8", + "content-hash": "7014ac0c4a5c54604e8c1ae1d87d47b2", "packages": [ { "name": "braintree/braintree_php", @@ -204,16 +204,16 @@ }, { "name": "composer/ca-bundle", - "version": "1.1.1", + "version": "1.1.2", "source": { "type": "git", "url": "https://github.com/composer/ca-bundle.git", - "reference": "d2c0a83b7533d6912e8d516756ebd34f893e9169" + "reference": "46afded9720f40b9dc63542af4e3e43a1177acb0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/d2c0a83b7533d6912e8d516756ebd34f893e9169", - "reference": "d2c0a83b7533d6912e8d516756ebd34f893e9169", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/46afded9720f40b9dc63542af4e3e43a1177acb0", + "reference": "46afded9720f40b9dc63542af4e3e43a1177acb0", "shasum": "" }, "require": { @@ -256,7 +256,7 @@ "ssl", "tls" ], - "time": "2018-03-29T19:57:20+00:00" + "time": "2018-08-08T08:57:40+00:00" }, { "name": "composer/composer", @@ -859,16 +859,16 @@ }, { "name": "paragonie/random_compat", - "version": "v2.0.15", + "version": "v2.0.17", "source": { "type": "git", "url": "https://github.com/paragonie/random_compat.git", - "reference": "10bcb46e8f3d365170f6de9d05245aa066b81f09" + "reference": "29af24f25bab834fcbb38ad2a69fa93b867e070d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/10bcb46e8f3d365170f6de9d05245aa066b81f09", - "reference": "10bcb46e8f3d365170f6de9d05245aa066b81f09", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/29af24f25bab834fcbb38ad2a69fa93b867e070d", + "reference": "29af24f25bab834fcbb38ad2a69fa93b867e070d", "shasum": "" }, "require": { @@ -904,7 +904,7 @@ "pseudorandom", "random" ], - "time": "2018-06-08T15:26:40+00:00" + "time": "2018-07-04T16:31:37+00:00" }, { "name": "pelago/emogrifier", @@ -1436,16 +1436,16 @@ }, { "name": "symfony/console", - "version": "v2.8.41", + "version": "v2.8.45", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "e8e59b74ad1274714dad2748349b55e3e6e630c7" + "reference": "0c1fcbb9afb5cff992c982ff99c0434f0146dcfc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/e8e59b74ad1274714dad2748349b55e3e6e630c7", - "reference": "e8e59b74ad1274714dad2748349b55e3e6e630c7", + "url": "https://api.github.com/repos/symfony/console/zipball/0c1fcbb9afb5cff992c982ff99c0434f0146dcfc", + "reference": "0c1fcbb9afb5cff992c982ff99c0434f0146dcfc", "shasum": "" }, "require": { @@ -1493,7 +1493,7 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2018-05-15T21:17:45+00:00" + "time": "2018-07-26T11:13:39+00:00" }, { "name": "symfony/debug", @@ -1554,16 +1554,16 @@ }, { "name": "symfony/event-dispatcher", - "version": "v2.8.41", + "version": "v2.8.45", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "9b69aad7d4c086dc94ebade2d5eb9145da5dac8c" + "reference": "84ae343f39947aa084426ed1138bb96bf94d1f12" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/9b69aad7d4c086dc94ebade2d5eb9145da5dac8c", - "reference": "9b69aad7d4c086dc94ebade2d5eb9145da5dac8c", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/84ae343f39947aa084426ed1138bb96bf94d1f12", + "reference": "84ae343f39947aa084426ed1138bb96bf94d1f12", "shasum": "" }, "require": { @@ -1610,20 +1610,20 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2018-04-06T07:35:03+00:00" + "time": "2018-07-26T09:03:18+00:00" }, { "name": "symfony/filesystem", - "version": "v3.4.11", + "version": "v3.4.15", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "8e03ca3fa52a0f56b87506f38cf7bd3f9442b3a0" + "reference": "285ce5005cb01a0aeaa5b0cf590bd0cc40bb631c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/8e03ca3fa52a0f56b87506f38cf7bd3f9442b3a0", - "reference": "8e03ca3fa52a0f56b87506f38cf7bd3f9442b3a0", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/285ce5005cb01a0aeaa5b0cf590bd0cc40bb631c", + "reference": "285ce5005cb01a0aeaa5b0cf590bd0cc40bb631c", "shasum": "" }, "require": { @@ -1660,20 +1660,20 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2018-05-16T08:49:21+00:00" + "time": "2018-08-10T07:29:05+00:00" }, { "name": "symfony/finder", - "version": "v3.4.11", + "version": "v3.4.15", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "472a92f3df8b247b49ae364275fb32943b9656c6" + "reference": "8a84fcb207451df0013b2c74cbbf1b62d47b999a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/472a92f3df8b247b49ae364275fb32943b9656c6", - "reference": "472a92f3df8b247b49ae364275fb32943b9656c6", + "url": "https://api.github.com/repos/symfony/finder/zipball/8a84fcb207451df0013b2c74cbbf1b62d47b999a", + "reference": "8a84fcb207451df0013b2c74cbbf1b62d47b999a", "shasum": "" }, "require": { @@ -1709,29 +1709,32 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2018-05-16T08:49:21+00:00" + "time": "2018-07-26T11:19:56+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.8.0", + "version": "v1.9.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "7cc359f1b7b80fc25ed7796be7d96adc9b354bae" + "reference": "e3d826245268269cd66f8326bd8bc066687b4a19" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/7cc359f1b7b80fc25ed7796be7d96adc9b354bae", - "reference": "7cc359f1b7b80fc25ed7796be7d96adc9b354bae", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19", + "reference": "e3d826245268269cd66f8326bd8bc066687b4a19", "shasum": "" }, "require": { "php": ">=5.3.3" }, + "suggest": { + "ext-ctype": "For best performance" + }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.8-dev" + "dev-master": "1.9-dev" } }, "autoload": { @@ -1764,20 +1767,20 @@ "polyfill", "portable" ], - "time": "2018-04-30T19:57:29+00:00" + "time": "2018-08-06T14:22:27+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.8.0", + "version": "v1.9.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "3296adf6a6454a050679cde90f95350ad604b171" + "reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/3296adf6a6454a050679cde90f95350ad604b171", - "reference": "3296adf6a6454a050679cde90f95350ad604b171", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/d0cd638f4634c16d8df4508e847f14e9e43168b8", + "reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8", "shasum": "" }, "require": { @@ -1789,7 +1792,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.8-dev" + "dev-master": "1.9-dev" } }, "autoload": { @@ -1823,20 +1826,20 @@ "portable", "shim" ], - "time": "2018-04-26T10:06:28+00:00" + "time": "2018-08-06T14:22:27+00:00" }, { "name": "symfony/process", - "version": "v2.8.41", + "version": "v2.8.45", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "713952f2ccbcc8342ecdbe1cb313d3e2da8aad28" + "reference": "4be278e19064c3492095de50c9e375caae569ae1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/713952f2ccbcc8342ecdbe1cb313d3e2da8aad28", - "reference": "713952f2ccbcc8342ecdbe1cb313d3e2da8aad28", + "url": "https://api.github.com/repos/symfony/process/zipball/4be278e19064c3492095de50c9e375caae569ae1", + "reference": "4be278e19064c3492095de50c9e375caae569ae1", "shasum": "" }, "require": { @@ -1872,20 +1875,20 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2018-05-15T21:17:45+00:00" + "time": "2018-08-03T09:45:57+00:00" }, { "name": "tedivm/jshrink", - "version": "v1.3.0", + "version": "v1.3.1", "source": { "type": "git", "url": "https://github.com/tedious/JShrink.git", - "reference": "68ce379b213741e86f02bf6053b0d26b9f833448" + "reference": "21254058dc3ce6aba6bef458cff4bfa25cf8b198" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tedious/JShrink/zipball/68ce379b213741e86f02bf6053b0d26b9f833448", - "reference": "68ce379b213741e86f02bf6053b0d26b9f833448", + "url": "https://api.github.com/repos/tedious/JShrink/zipball/21254058dc3ce6aba6bef458cff4bfa25cf8b198", + "reference": "21254058dc3ce6aba6bef458cff4bfa25cf8b198", "shasum": "" }, "require": { @@ -1918,7 +1921,7 @@ "javascript", "minifier" ], - "time": "2017-12-08T00:59:56+00:00" + "time": "2018-09-16T00:02:51+00:00" }, { "name": "tubalmartin/cssmin", @@ -2350,16 +2353,16 @@ }, { "name": "zendframework/zend-diactoros", - "version": "1.7.2", + "version": "1.8.6", "source": { "type": "git", "url": "https://github.com/zendframework/zend-diactoros.git", - "reference": "741e7a571836f038de731105f4742ca8a164e43a" + "reference": "20da13beba0dde8fb648be3cc19765732790f46e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-diactoros/zipball/741e7a571836f038de731105f4742ca8a164e43a", - "reference": "741e7a571836f038de731105f4742ca8a164e43a", + "url": "https://api.github.com/repos/zendframework/zend-diactoros/zipball/20da13beba0dde8fb648be3cc19765732790f46e", + "reference": "20da13beba0dde8fb648be3cc19765732790f46e", "shasum": "" }, "require": { @@ -2372,18 +2375,29 @@ "require-dev": { "ext-dom": "*", "ext-libxml": "*", - "phpunit/phpunit": "^5.7.16 || ^6.0.8", + "php-http/psr7-integration-tests": "dev-master", + "phpunit/phpunit": "^5.7.16 || ^6.0.8 || ^7.2.7", "zendframework/zend-coding-standard": "~1.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.7.x-dev", - "dev-develop": "1.8.x-dev", + "dev-master": "1.8.x-dev", + "dev-develop": "1.9.x-dev", "dev-release-2.0": "2.0.x-dev" } }, "autoload": { + "files": [ + "src/functions/create_uploaded_file.php", + "src/functions/marshal_headers_from_sapi.php", + "src/functions/marshal_method_from_sapi.php", + "src/functions/marshal_protocol_version_from_sapi.php", + "src/functions/marshal_uri_from_sapi.php", + "src/functions/normalize_server.php", + "src/functions/normalize_uploaded_files.php", + "src/functions/parse_cookie_header.php" + ], "psr-4": { "Zend\\Diactoros\\": "src/" } @@ -2399,7 +2413,7 @@ "psr", "psr-7" ], - "time": "2018-05-29T16:53:08+00:00" + "time": "2018-09-05T19:29:37+00:00" }, { "name": "zendframework/zend-escaper", @@ -2636,16 +2650,16 @@ }, { "name": "zendframework/zend-http", - "version": "2.8.0", + "version": "2.8.2", "source": { "type": "git", "url": "https://github.com/zendframework/zend-http.git", - "reference": "f48b276ffa11b48dd1ae3c6bc306d6ed7958ef51" + "reference": "2c8aed3d25522618573194e7cc51351f8cd4a45b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-http/zipball/f48b276ffa11b48dd1ae3c6bc306d6ed7958ef51", - "reference": "f48b276ffa11b48dd1ae3c6bc306d6ed7958ef51", + "url": "https://api.github.com/repos/zendframework/zend-http/zipball/2c8aed3d25522618573194e7cc51351f8cd4a45b", + "reference": "2c8aed3d25522618573194e7cc51351f8cd4a45b", "shasum": "" }, "require": { @@ -2687,7 +2701,7 @@ "zend", "zf" ], - "time": "2018-04-26T21:04:50+00:00" + "time": "2018-08-13T18:47:03+00:00" }, { "name": "zendframework/zend-hydrator", @@ -3885,16 +3899,16 @@ "packages-dev": [ { "name": "composer/xdebug-handler", - "version": "1.1.0", + "version": "1.3.0", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "c919dc6c62e221fc6406f861ea13433c0aa24f08" + "reference": "b8e9745fb9b06ea6664d8872c4505fb16df4611c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/c919dc6c62e221fc6406f861ea13433c0aa24f08", - "reference": "c919dc6c62e221fc6406f861ea13433c0aa24f08", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/b8e9745fb9b06ea6664d8872c4505fb16df4611c", + "reference": "b8e9745fb9b06ea6664d8872c4505fb16df4611c", "shasum": "" }, "require": { @@ -3925,7 +3939,7 @@ "Xdebug", "performance" ], - "time": "2018-04-11T15:42:36+00:00" + "time": "2018-08-31T19:07:57+00:00" }, { "name": "doctrine/annotations", @@ -4103,61 +4117,6 @@ ], "time": "2014-09-09T13:34:57+00:00" }, - { - "name": "elasticsearch/elasticsearch", - "version": "v5.3.2", - "source": { - "type": "git", - "url": "https://github.com/elastic/elasticsearch-php.git", - "reference": "4b29a4121e790bbfe690d5ee77da348b62d48eb8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/elastic/elasticsearch-php/zipball/4b29a4121e790bbfe690d5ee77da348b62d48eb8", - "reference": "4b29a4121e790bbfe690d5ee77da348b62d48eb8", - "shasum": "" - }, - "require": { - "guzzlehttp/ringphp": "~1.0", - "php": "^5.6|^7.0", - "psr/log": "~1.0" - }, - "require-dev": { - "cpliakas/git-wrapper": "~1.0", - "doctrine/inflector": "^1.1", - "mockery/mockery": "0.9.4", - "phpunit/phpunit": "^4.7|^5.4", - "sami/sami": "~3.2", - "symfony/finder": "^2.8", - "symfony/yaml": "^2.8" - }, - "suggest": { - "ext-curl": "*", - "monolog/monolog": "Allows for client-level logging and tracing" - }, - "type": "library", - "autoload": { - "psr-4": { - "Elasticsearch\\": "src/Elasticsearch/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Zachary Tong" - } - ], - "description": "PHP Client for Elasticsearch", - "keywords": [ - "client", - "elasticsearch", - "search" - ], - "time": "2017-11-08T17:04:47+00:00" - }, { "name": "friendsofphp/php-cs-fixer", "version": "v2.2.20", @@ -4246,107 +4205,6 @@ "description": "A tool to automatically fix PHP code style", "time": "2018-06-02T17:26:04+00:00" }, - { - "name": "guzzlehttp/ringphp", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/guzzle/RingPHP.git", - "reference": "dbbb91d7f6c191e5e405e900e3102ac7f261bc0b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/RingPHP/zipball/dbbb91d7f6c191e5e405e900e3102ac7f261bc0b", - "reference": "dbbb91d7f6c191e5e405e900e3102ac7f261bc0b", - "shasum": "" - }, - "require": { - "guzzlehttp/streams": "~3.0", - "php": ">=5.4.0", - "react/promise": "~2.0" - }, - "require-dev": { - "ext-curl": "*", - "phpunit/phpunit": "~4.0" - }, - "suggest": { - "ext-curl": "Guzzle will use specific adapters if cURL is present" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Ring\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Provides a simple API and specification that abstracts away the details of HTTP into a single PHP function.", - "time": "2015-05-20T03:37:09+00:00" - }, - { - "name": "guzzlehttp/streams", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/guzzle/streams.git", - "reference": "47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/streams/zipball/47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5", - "reference": "47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Stream\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Provides a simple abstraction over streams of data", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "Guzzle", - "stream" - ], - "time": "2014-10-12T19:18:40+00:00" - }, { "name": "ircmaxell/password-compat", "version": "v1.0.4", @@ -4389,55 +4247,6 @@ ], "time": "2014-11-20T16:49:30+00:00" }, - { - "name": "league/climate", - "version": "2.6.1", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/climate.git", - "reference": "28851c909017424f61cc6a62089316313c645d1c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/climate/zipball/28851c909017424f61cc6a62089316313c645d1c", - "reference": "28851c909017424f61cc6a62089316313c645d1c", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "require-dev": { - "mockery/mockery": "dev-master", - "phpunit/phpunit": "4.1.*" - }, - "type": "library", - "autoload": { - "psr-4": { - "League\\CLImate\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Joe Tannenbaum", - "email": "hey@joe.codes", - "homepage": "http://joe.codes/", - "role": "Developer" - } - ], - "description": "PHP's best friend for the terminal. CLImate allows you to easily output colored text, special formats, and more.", - "keywords": [ - "cli", - "colors", - "command", - "php", - "terminal" - ], - "time": "2015-01-18T14:31:58+00:00" - }, { "name": "lusitanian/oauth", "version": "v0.8.11", @@ -4692,60 +4501,6 @@ "description": "Library for handling version information and constraints", "time": "2017-03-05T17:38:23+00:00" }, - { - "name": "php-amqplib/php-amqplib", - "version": "v2.5.2", - "source": { - "type": "git", - "url": "https://github.com/php-amqplib/php-amqplib.git", - "reference": "eb8f94d97c8e79900accf77343dbd7eca7f58506" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-amqplib/php-amqplib/zipball/eb8f94d97c8e79900accf77343dbd7eca7f58506", - "reference": "eb8f94d97c8e79900accf77343dbd7eca7f58506", - "shasum": "" - }, - "require": { - "ext-bcmath": "*", - "ext-mbstring": "*", - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "3.7.*" - }, - "suggest": { - "ext-sockets": "Use AMQPSocketConnection" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.4-dev" - } - }, - "autoload": { - "psr-4": { - "PhpAmqpLib\\": "PhpAmqpLib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-2.1" - ], - "authors": [ - { - "name": "Alvaro Videla" - } - ], - "description": "This library is a pure PHP implementation of the AMQP protocol. It's been tested against RabbitMQ.", - "homepage": "https://github.com/videlalvaro/php-amqplib/", - "keywords": [ - "message", - "queue", - "rabbitmq" - ], - "time": "2015-08-11T12:30:09+00:00" - }, { "name": "phpdocumentor/reflection-common", "version": "1.0.1", @@ -4966,16 +4721,16 @@ }, { "name": "phpspec/prophecy", - "version": "1.7.6", + "version": "1.8.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712" + "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/33a7e3c4fda54e912ff6338c48823bd5c0f0b712", - "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4ba436b55987b4bf311cb7c6ba82aa528aac0a06", + "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06", "shasum": "" }, "require": { @@ -4987,12 +4742,12 @@ }, "require-dev": { "phpspec/phpspec": "^2.5|^3.2", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5" + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.7.x-dev" + "dev-master": "1.8.x-dev" } }, "autoload": { @@ -5025,7 +4780,7 @@ "spy", "stub" ], - "time": "2018-04-18T13:57:24+00:00" + "time": "2018-08-05T17:53:17+00:00" }, { "name": "phpunit/php-code-coverage", @@ -5419,52 +5174,6 @@ ], "time": "2017-08-03T14:08:16+00:00" }, - { - "name": "react/promise", - "version": "v2.5.1", - "source": { - "type": "git", - "url": "https://github.com/reactphp/promise.git", - "reference": "62785ae604c8d69725d693eb370e1d67e94c4053" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/reactphp/promise/zipball/62785ae604c8d69725d693eb370e1d67e94c4053", - "reference": "62785ae604c8d69725d693eb370e1d67e94c4053", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.8" - }, - "type": "library", - "autoload": { - "psr-4": { - "React\\Promise\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com" - } - ], - "description": "A lightweight implementation of CommonJS Promises/A for PHP", - "keywords": [ - "promise", - "promises" - ], - "time": "2017-03-25T12:08:31+00:00" - }, { "name": "sebastian/code-unit-reverse-lookup", "version": "1.0.1", @@ -6114,118 +5823,6 @@ "homepage": "https://github.com/sebastianbergmann/version", "time": "2016-10-03T07:35:21+00:00" }, - { - "name": "sjparkinson/static-review", - "version": "4.1.1", - "source": { - "type": "git", - "url": "https://github.com/sjparkinson/static-review.git", - "reference": "493c3410cf146a12fca84209bad126c494e125f0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sjparkinson/static-review/zipball/493c3410cf146a12fca84209bad126c494e125f0", - "reference": "493c3410cf146a12fca84209bad126c494e125f0", - "shasum": "" - }, - "require": { - "league/climate": "~2.0", - "php": ">=5.4.0", - "symfony/console": "~2.0", - "symfony/process": "~2.0" - }, - "require-dev": { - "mockery/mockery": "~0.9", - "phpunit/phpunit": "~4.0", - "sensiolabs/security-checker": "~2.0", - "squizlabs/php_codesniffer": "~1.0" - }, - "suggest": { - "sensiolabs/security-checker": "Required for ComposerSecurityReview.", - "squizlabs/php_codesniffer": "Required for PhpCodeSnifferReview." - }, - "bin": [ - "bin/static-review.php" - ], - "type": "library", - "autoload": { - "psr-4": { - "StaticReview\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Samuel Parkinson", - "email": "sam.james.parkinson@gmail.com", - "homepage": "http://samp.im" - } - ], - "description": "An extendable framework for version control hooks.", - "abandoned": "phpro/grumphp", - "time": "2014-09-22T08:40:36+00:00" - }, - { - "name": "solarium/solarium", - "version": "3.8.1", - "source": { - "type": "git", - "url": "https://github.com/solariumphp/solarium.git", - "reference": "c353babec89fdbe8c64054bfec8e77bcb5da6705" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/solariumphp/solarium/zipball/c353babec89fdbe8c64054bfec8e77bcb5da6705", - "reference": "c353babec89fdbe8c64054bfec8e77bcb5da6705", - "shasum": "" - }, - "require": { - "php": ">=5.3.2", - "symfony/event-dispatcher": "~2.3|~3.0" - }, - "require-dev": { - "guzzlehttp/guzzle": "^3.8 || ^6.2", - "phpunit/phpunit": "~3.7", - "satooshi/php-coveralls": "~1.0", - "squizlabs/php_codesniffer": "~1.4", - "zendframework/zendframework1": "~1.12" - }, - "suggest": { - "minimalcode/search": "Query builder compatible with Solarium, allows simplified solr-query handling" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-develop": "3.3.x-dev" - } - }, - "autoload": { - "psr-0": { - "Solarium\\": "library/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "See GitHub contributors", - "homepage": "https://github.com/basdenooijer/solarium/contributors" - } - ], - "description": "PHP Solr client", - "homepage": "http://www.solarium-project.org", - "keywords": [ - "php", - "search", - "solr" - ], - "time": "2017-02-02T13:32:22+00:00" - }, { "name": "squizlabs/php_codesniffer", "version": "3.2.2", @@ -6279,16 +5876,16 @@ }, { "name": "symfony/config", - "version": "v3.4.11", + "version": "v3.4.15", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "73e055cf2e6467715f187724a0347ea32079967c" + "reference": "7b08223b7f6abd859651c56bcabf900d1627d085" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/73e055cf2e6467715f187724a0347ea32079967c", - "reference": "73e055cf2e6467715f187724a0347ea32079967c", + "url": "https://api.github.com/repos/symfony/config/zipball/7b08223b7f6abd859651c56bcabf900d1627d085", + "reference": "7b08223b7f6abd859651c56bcabf900d1627d085", "shasum": "" }, "require": { @@ -6339,20 +5936,20 @@ ], "description": "Symfony Config Component", "homepage": "https://symfony.com", - "time": "2018-05-14T16:49:53+00:00" + "time": "2018-07-26T11:19:56+00:00" }, { "name": "symfony/dependency-injection", - "version": "v3.4.11", + "version": "v3.4.15", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "8a4672aca8db6d807905d695799ea7d83c8e5bba" + "reference": "09d7df7bf06c1393b6afc85875993cbdbdf897a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/8a4672aca8db6d807905d695799ea7d83c8e5bba", - "reference": "8a4672aca8db6d807905d695799ea7d83c8e5bba", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/09d7df7bf06c1393b6afc85875993cbdbdf897a0", + "reference": "09d7df7bf06c1393b6afc85875993cbdbdf897a0", "shasum": "" }, "require": { @@ -6410,20 +6007,20 @@ ], "description": "Symfony DependencyInjection Component", "homepage": "https://symfony.com", - "time": "2018-05-25T11:57:15+00:00" + "time": "2018-08-08T11:42:34+00:00" }, { "name": "symfony/options-resolver", - "version": "v3.4.11", + "version": "v3.4.15", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "f3109a6aedd20e35c3a33190e932c2b063b7b50e" + "reference": "6debc476953a45969ab39afe8dee0b825f356dc7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/f3109a6aedd20e35c3a33190e932c2b063b7b50e", - "reference": "f3109a6aedd20e35c3a33190e932c2b063b7b50e", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/6debc476953a45969ab39afe8dee0b825f356dc7", + "reference": "6debc476953a45969ab39afe8dee0b825f356dc7", "shasum": "" }, "require": { @@ -6464,20 +6061,20 @@ "configuration", "options" ], - "time": "2018-01-11T07:56:07+00:00" + "time": "2018-07-26T08:45:46+00:00" }, { "name": "symfony/polyfill-php54", - "version": "v1.8.0", + "version": "v1.9.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php54.git", - "reference": "6c3a2b84c6025e4ea3f6a19feac35408c64b22e1" + "reference": "412977e090c6a8472dc39d50d1beb7d59495a965" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php54/zipball/6c3a2b84c6025e4ea3f6a19feac35408c64b22e1", - "reference": "6c3a2b84c6025e4ea3f6a19feac35408c64b22e1", + "url": "https://api.github.com/repos/symfony/polyfill-php54/zipball/412977e090c6a8472dc39d50d1beb7d59495a965", + "reference": "412977e090c6a8472dc39d50d1beb7d59495a965", "shasum": "" }, "require": { @@ -6486,7 +6083,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.8-dev" + "dev-master": "1.9-dev" } }, "autoload": { @@ -6522,20 +6119,20 @@ "portable", "shim" ], - "time": "2018-04-26T10:06:28+00:00" + "time": "2018-08-06T14:22:27+00:00" }, { "name": "symfony/polyfill-php55", - "version": "v1.8.0", + "version": "v1.9.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php55.git", - "reference": "a39456128377a85f2c5707fcae458678560cba46" + "reference": "578b8528da843de0fc65ec395900fa3181f2ead7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php55/zipball/a39456128377a85f2c5707fcae458678560cba46", - "reference": "a39456128377a85f2c5707fcae458678560cba46", + "url": "https://api.github.com/repos/symfony/polyfill-php55/zipball/578b8528da843de0fc65ec395900fa3181f2ead7", + "reference": "578b8528da843de0fc65ec395900fa3181f2ead7", "shasum": "" }, "require": { @@ -6545,7 +6142,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.8-dev" + "dev-master": "1.9-dev" } }, "autoload": { @@ -6578,30 +6175,30 @@ "portable", "shim" ], - "time": "2018-04-26T10:06:28+00:00" + "time": "2018-08-06T14:22:27+00:00" }, { "name": "symfony/polyfill-php70", - "version": "v1.8.0", + "version": "v1.9.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php70.git", - "reference": "77454693d8f10dd23bb24955cffd2d82db1007a6" + "reference": "1e24b0c4a56d55aaf368763a06c6d1c7d3194934" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/77454693d8f10dd23bb24955cffd2d82db1007a6", - "reference": "77454693d8f10dd23bb24955cffd2d82db1007a6", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/1e24b0c4a56d55aaf368763a06c6d1c7d3194934", + "reference": "1e24b0c4a56d55aaf368763a06c6d1c7d3194934", "shasum": "" }, "require": { - "paragonie/random_compat": "~1.0|~2.0", + "paragonie/random_compat": "~1.0|~2.0|~9.99", "php": ">=5.3.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.8-dev" + "dev-master": "1.9-dev" } }, "autoload": { @@ -6637,20 +6234,20 @@ "portable", "shim" ], - "time": "2018-04-26T10:06:28+00:00" + "time": "2018-08-06T14:22:27+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.8.0", + "version": "v1.9.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "a4576e282d782ad82397f3e4ec1df8e0f0cafb46" + "reference": "95c50420b0baed23852452a7f0c7b527303ed5ae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/a4576e282d782ad82397f3e4ec1df8e0f0cafb46", - "reference": "a4576e282d782ad82397f3e4ec1df8e0f0cafb46", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/95c50420b0baed23852452a7f0c7b527303ed5ae", + "reference": "95c50420b0baed23852452a7f0c7b527303ed5ae", "shasum": "" }, "require": { @@ -6659,7 +6256,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.8-dev" + "dev-master": "1.9-dev" } }, "autoload": { @@ -6692,20 +6289,20 @@ "portable", "shim" ], - "time": "2018-04-26T10:06:28+00:00" + "time": "2018-08-06T14:22:27+00:00" }, { "name": "symfony/stopwatch", - "version": "v3.4.11", + "version": "v3.4.15", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "eb17cfa072cab26537ac37e9c4ece6c0361369af" + "reference": "deda2765e8dab2fc38492e926ea690f2a681f59d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/eb17cfa072cab26537ac37e9c4ece6c0361369af", - "reference": "eb17cfa072cab26537ac37e9c4ece6c0361369af", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/deda2765e8dab2fc38492e926ea690f2a681f59d", + "reference": "deda2765e8dab2fc38492e926ea690f2a681f59d", "shasum": "" }, "require": { @@ -6741,7 +6338,7 @@ ], "description": "Symfony Stopwatch Component", "homepage": "https://symfony.com", - "time": "2018-02-17T14:55:25+00:00" + "time": "2018-07-26T10:03:52+00:00" }, { "name": "theseer/fdomdocument", diff --git a/dev/tests/acceptance/.gitignore b/dev/tests/acceptance/.gitignore index de6a96d05e7e2..7e27d5178fc48 100755 --- a/dev/tests/acceptance/.gitignore +++ b/dev/tests/acceptance/.gitignore @@ -1,7 +1,10 @@ .idea .env +.htaccess codeception.yml tests/_output/* tests/functional.suite.yml tests/functional/Magento/FunctionalTest/_generated vendor/* +mftf.logm +/utils/ diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ProductTypeSwitchingOnCreationTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ProductTypeSwitchingOnCreationTest.php index 5e871bf6d97a5..3de5b48db6d05 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ProductTypeSwitchingOnCreationTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ProductTypeSwitchingOnCreationTest.php @@ -10,6 +10,7 @@ use Magento\Catalog\Test\Page\Adminhtml\CatalogProductNew; use Magento\Mtf\Fixture\FixtureFactory; use Magento\Mtf\TestCase\Injectable; +use Magento\Downloadable\Test\Block\Adminhtml\Catalog\Product\Edit\Section\Downloadable; /** * Test Creation for ProductTypeSwitchingOnCreation @@ -75,18 +76,66 @@ public function __inject( * * @param string $createProduct * @param string $product + * @param string $actionName * @return array */ - public function test($createProduct, $product) + public function test(string $createProduct, string $product, string $actionName = null) : array { // Steps list($fixture, $dataset) = explode('::', $product); $product = $this->fixtureFactory->createByCode($fixture, ['dataset' => $dataset]); $this->catalogProductIndex->open(); $this->catalogProductIndex->getGridPageActionBlock()->addProduct($createProduct); + if ($actionName) { + $this->performAction($actionName); + } $this->catalogProductNew->getProductForm()->fill($product); $this->catalogProductNew->getFormPageActions()->save($product); return ['product' => $product]; } + + /** + * Perform action. + * + * @param string $actionName + * @throws \Exception + * @return void + */ + protected function performAction(string $actionName) + { + if (method_exists(__CLASS__, $actionName)) { + $this->$actionName(); + } + } + + /** + * Clear downloadable product data. + * + * @return void + */ + protected function clearDownloadableData() + { + $this->catalogProductNew->getProductForm()->openSection('downloadable_information'); + /** @var Downloadable $downloadableInfoTab */ + $downloadableInfoTab = $this->catalogProductNew->getProductForm()->getSection('downloadable_information'); + $downloadableInfoTab->getDownloadableBlock('Links')->clearDownloadableData(); + $downloadableInfoTab->setIsDownloadable('No'); + } + + /** + * Set "Is this downloadable Product?" value. + * + * @param string $downloadable + * @return void + * + * @throws \Exception + */ + protected function setIsDownloadable(string $downloadable = 'Yes') + { + $this->catalogProductNew->getProductForm()->openSection('downloadable_information'); + /** @var Downloadable $downloadableInfoTab */ + $downloadableInfoTab = $this->catalogProductNew->getProductForm()->getSection('downloadable_information'); + $downloadableInfoTab->setIsDownloadable($downloadable); + } } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ProductTypeSwitchingOnCreationTest.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ProductTypeSwitchingOnCreationTest.xml index f45fbc96a738d..7c4824c604e29 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ProductTypeSwitchingOnCreationTest.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ProductTypeSwitchingOnCreationTest.xml @@ -76,7 +76,7 @@ <variation name="ProductTypeSwitchingOnCreationTestVariation9"> <data name="createProduct" xsi:type="string">downloadable</data> <data name="product" xsi:type="string">configurableProduct::not_virtual_for_type_switching</data> - <data name="tag" xsi:type="string">to_maintain:yes</data> + <data name="actionName" xsi:type="string">clearDownloadableData</data> <constraint name="Magento\Catalog\Test\Constraint\AssertProductSaveMessage" /> <constraint name="Magento\Catalog\Test\Constraint\AssertProductInGrid" /> <constraint name="Magento\ConfigurableProduct\Test\Constraint\AssertChildProductsInGrid" /> diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Adminhtml/Catalog/Product/Edit/Section/Downloadable.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Adminhtml/Catalog/Product/Edit/Section/Downloadable.php index ebc19eec9ad53..7a4a14fca1ac9 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Adminhtml/Catalog/Product/Edit/Section/Downloadable.php +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Adminhtml/Catalog/Product/Edit/Section/Downloadable.php @@ -104,4 +104,23 @@ public function setFieldsData(array $fields, SimpleElement $element = null) return $this; } + + /** + * Set "Is this downloadable Product?" value. + * + * @param string $downloadable + * @param SimpleElement|null $element + * @return void + * + * @throws \Exception + */ + public function setIsDownloadable(string $downloadable = 'Yes', SimpleElement $element = null) + { + $context = $element ?: $this->_rootElement; + $isDownloadable = $context->find($this->isDownloadableProduct); + $value = 'Yes' == $downloadable ? '1' : '0'; + if ($isDownloadable->isVisible() && $isDownloadable->getAttribute('value') != $value) { + $isDownloadable->click(); + } + } } diff --git a/dev/tests/integration/testsuite/Magento/CatalogInventory/Model/Quote/Item/QuantityValidatorTest.php b/dev/tests/integration/testsuite/Magento/CatalogInventory/Model/Quote/Item/QuantityValidatorTest.php index 598370f4f4366..44eedb1974b5f 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogInventory/Model/Quote/Item/QuantityValidatorTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogInventory/Model/Quote/Item/QuantityValidatorTest.php @@ -5,12 +5,20 @@ */ namespace Magento\CatalogInventory\Model\Quote\Item; +use Magento\Catalog\Model\Product; +use Magento\Catalog\Model\Product\Attribute\Source\Status; +use Magento\CatalogInventory\Api\Data\StockItemInterface; +use Magento\CatalogInventory\Model\Stock\StockItemRepository; +use Magento\CatalogInventory\Model\StockState; +use Magento\CatalogInventory\Observer\QuantityValidatorObserver; +use Magento\Eav\Model\Config; +use Magento\Framework\Exception\CouldNotSaveException; +use Magento\Framework\Exception\LocalizedException; +use Magento\Quote\Api\Data\CartInterface; +use Magento\Quote\Model\Quote; use Magento\TestFramework\Helper\Bootstrap; use Magento\CatalogInventory\Model\Quote\Item\QuantityValidator\Initializer\Option; use Magento\Framework\Event\Observer; -use Magento\CatalogInventory\Model\StockState; -use Magento\CatalogInventory\Model\Quote\Item\QuantityValidator; -use Magento\CatalogInventory\Observer\QuantityValidatorObserver; use Magento\Framework\Event; use Magento\Catalog\Api\ProductRepositoryInterface; use Magento\Framework\DataObject; @@ -58,6 +66,9 @@ class QuantityValidatorTest extends \PHPUnit\Framework\TestCase */ private $observer; + /** + * @inheritdoc + */ protected function setUp() { /** @var \Magento\Framework\ObjectManagerInterface objectManager */ @@ -82,6 +93,8 @@ protected function setUp() } /** + * @return void + * * @magentoDataFixture Magento/Checkout/_files/quote_with_bundle_product.php * @magentoDbIsolation disabled * @magentoAppIsolation enabled @@ -93,7 +106,7 @@ public function testQuoteWithOptions() /** @var \Magento\Catalog\Api\ProductRepositoryInterface $productRepository */ $productRepository = $this->objectManager->create(ProductRepositoryInterface::class); - /** @var $product \Magento\Catalog\Model\Product */ + /** @var $product Product */ $product = $productRepository->get('bundle-product'); $resultMock = $this->createMock(DataObject::class); $this->stockState->expects($this->any())->method('checkQtyIncrements')->willReturn($resultMock); @@ -107,6 +120,8 @@ public function testQuoteWithOptions() } /** + * @return void + * * @magentoDataFixture Magento/Checkout/_files/quote_with_bundle_product.php * @magentoDbIsolation disabled * @magentoAppIsolation enabled @@ -117,7 +132,7 @@ public function testQuoteWithOptionsWithErrors() $session = $this->objectManager->create(Session::class); /** @var \Magento\Catalog\Api\ProductRepositoryInterface $productRepository */ $productRepository = $this->objectManager->create(ProductRepositoryInterface::class); - /** @var $product \Magento\Catalog\Model\Product */ + /** @var $product Product */ $product = $productRepository->get('bundle-product'); /* @var $quoteItem \Magento\Quote\Model\Quote\Item */ $quoteItem = $this->_getQuoteItemIdByProductId($session->getQuote(), $product->getId()); @@ -132,7 +147,7 @@ public function testQuoteWithOptionsWithErrors() $resultMock->expects($this->any())->method('getHasError')->willReturn(true); $this->setMockStockStateResultToQuoteItemOptions($quoteItem, $resultMock); $this->observer->execute($this->observerMock); - $this->assertCount(2, $quoteItem->getErrorInfos(), 'Expected 2 errors in QuoteItem'); + $this->assertCount(1, $quoteItem->getErrorInfos(), 'Expected 1 error in QuoteItem'); } /** @@ -155,10 +170,98 @@ private function setMockStockStateResultToQuoteItemOptions($quoteItem, $resultMo $this->fail('Test failed since Quote Item does not have Qty options.'); } + /** + * Tests quantity verifications for configurable product. + * + * @param int $quantity - quantity of configurable option. + * @param string $errorMessage - expected error message. + * @return void + * @throws CouldNotSaveException + * @throws LocalizedException + * @dataProvider quantityDataProvider + * @magentoDataFixture Magento/CatalogInventory/_files/configurable_options_advanced_inventory.php + * @magentoDbIsolation enabled + * @magentoAppIsolation enabled + */ + public function testConfigurableWithOptions(int $quantity, string $errorMessage) + { + /** @var ProductRepositoryInterface $productRepository */ + $productRepository = $this->objectManager->create(ProductRepositoryInterface::class); + /** @var Product $product */ + $product = $productRepository->get('configurable'); + $product->setStatus(Status::STATUS_ENABLED) + ->setData('is_salable', true); + $productRepository->save($product); + + /** @var StockItemRepository $stockItemRepository */ + $stockItemRepository = $this->objectManager->create(StockItemRepository::class); + + /** @var StockItemInterface $stockItem */ + $stockItem = $stockItemRepository->get($product->getExtensionAttributes() + ->getStockItem() + ->getItemId()); + $stockItem->setIsInStock(true) + ->setQty(1000); + $stockItemRepository->save($stockItem); + + /** @var Config $eavConfig */ + $eavConfig = $this->objectManager->get(Config::class); + /** @var $attribute */ + $attribute = $eavConfig->getAttribute('catalog_product', 'test_configurable'); + + $request = $this->objectManager->create(DataObject::class); + $request->setData( + [ + 'product_id' => $product->getId(), + 'selected_configurable_option' => 1, + 'super_attribute' => [ + $attribute->getAttributeId() => $attribute->getOptions()[1]->getValue() + ], + 'qty' => $quantity + ] + ); + + if (!empty($errorMessage)) { + $this->expectException(LocalizedException::class); + $this->expectExceptionMessage($errorMessage); + } + + /** @var Quote $cart */ + $cart = $this->objectManager->create(CartInterface::class); + $result = $cart->addProduct($product, $request); + + if (empty($errorMessage)) { + self::assertEquals('Configurable Product', $result->getName()); + } + } + + /** + * Provides request quantity for configurable option and corresponding error message. + * + * @return array + */ + public function quantityDataProvider(): array + { + return [ + [ + 'quantity' => 1, + 'error' => 'The fewest you may purchase is 500.' + ], + [ + 'quantity' => 501, + 'error' => 'You can buy Configurable OptionOption 1 only in quantities of 500 at a time' + ], + [ + 'quantity' => 1000, + 'error' => '' + ], + ]; + } + /** * Gets \Magento\Quote\Model\Quote\Item from \Magento\Quote\Model\Quote by product id * - * @param \Magento\Quote\Model\Quote $quote + * @param Quote $quote * @param $productId * @return \Magento\Quote\Model\Quote\Item */ diff --git a/dev/tests/integration/testsuite/Magento/CatalogInventory/_files/configurable_options_advanced_inventory.php b/dev/tests/integration/testsuite/Magento/CatalogInventory/_files/configurable_options_advanced_inventory.php new file mode 100644 index 0000000000000..901a1d3344480 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/CatalogInventory/_files/configurable_options_advanced_inventory.php @@ -0,0 +1,34 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +use Magento\Catalog\Api\Data\ProductInterface; +use Magento\CatalogInventory\Api\Data\StockItemInterface; +use Magento\CatalogInventory\Api\StockItemRepositoryInterface; +use Magento\TestFramework\Helper\Bootstrap; + +require __DIR__ . '/../../../Magento/ConfigurableProduct/_files/product_configurable.php'; + +$objectManager = Bootstrap::getObjectManager(); + +/** @var StockItemRepositoryInterface $stockItemRepository */ +$stockItemRepository = $objectManager->get(StockItemRepositoryInterface::class); + +/** @var ProductInterface $product */ +$product = $productRepository->get('simple_10'); + +/** @var StockItemInterface $stockItem */ +$stockItem = $product->getExtensionAttributes()->getStockItem(); +$stockItem->setIsInStock(true) + ->setQty(10000) + ->setUseConfigMinSaleQty(false) + ->setMinSaleQty(500) + ->setUseConfigEnableQtyInc(false) + ->setEnableQtyIncrements(true) + ->setUseConfigQtyIncrements(false) + ->setQtyIncrements(500); + +$stockItemRepository->save($stockItem); diff --git a/dev/tests/integration/testsuite/Magento/Eav/Model/ResourceModel/Entity/Attribute/CollectionTest.php b/dev/tests/integration/testsuite/Magento/Eav/Model/ResourceModel/Entity/Attribute/CollectionTest.php index e39f1e2fd8390..4b27309214a56 100644 --- a/dev/tests/integration/testsuite/Magento/Eav/Model/ResourceModel/Entity/Attribute/CollectionTest.php +++ b/dev/tests/integration/testsuite/Magento/Eav/Model/ResourceModel/Entity/Attribute/CollectionTest.php @@ -52,6 +52,21 @@ public function testSetAttributeGroupFilter() $this->assertEquals([$includeGroupId], $groups); } + /** + * Test if getAllIds method return results after using setInAllAttributeSetsFilter method. + * + * @return void + * @covers \Magento\Eav\Model\ResourceModel\Entity\Attribute\Collection::setInAllAttributeSetsFilter() + * @covers \Magento\Eav\Model\ResourceModel\Entity\Attribute\Collection::getAllIds() + */ + public function testSetInAllAttributeSetsFilterWithGetAllIds() + { + $sets = [1]; + $this->_model->setInAllAttributeSetsFilter($sets); + $attributeIds = $this->_model->getAllIds(); + $this->assertGreaterThan(0, count($attributeIds)); + } + /** * Returns array of group ids, present in collection attributes * diff --git a/dev/tests/integration/testsuite/Magento/Quote/Model/QuoteValidatorTest.php b/dev/tests/integration/testsuite/Magento/Quote/Model/QuoteValidatorTest.php index af6c9fbfa9de1..1088d0f4fbeb0 100644 --- a/dev/tests/integration/testsuite/Magento/Quote/Model/QuoteValidatorTest.php +++ b/dev/tests/integration/testsuite/Magento/Quote/Model/QuoteValidatorTest.php @@ -7,10 +7,7 @@ namespace Magento\Quote\Model; -use Magento\Framework\Api\SearchCriteriaBuilder; -use Magento\Quote\Api\CartRepositoryInterface; use Magento\TestFramework\Helper\Bootstrap; -use Magento\TestFramework\ObjectManager; /** * @magentoDbIsolation disabled @@ -25,7 +22,7 @@ class QuoteValidatorTest extends \PHPUnit\Framework\TestCase /** * @var QuoteValidator */ - private $validator; + private $quoteValidator; /** * @inheritdoc @@ -33,39 +30,139 @@ class QuoteValidatorTest extends \PHPUnit\Framework\TestCase protected function setUp() { $this->objectManager = Bootstrap::getObjectManager(); - $this->validator = $this->objectManager->get(QuoteValidator::class); + $this->quoteValidator = $this->objectManager->create(QuoteValidator::class); } /** - * Checks a case when the default website has country restrictions and the quote created - * for the another website with different country restrictions. + * @magentoDataFixture Magento/Quote/_files/quote_tx_flat.php + * @expectedException \Magento\Framework\Exception\LocalizedException + * @expectedExceptionMessage Please check the shipping address information. * - * @magentoDataFixture Magento/Quote/Fixtures/quote_sec_website.php + * @return void */ - public function testValidateBeforeSubmit() + public function testValidateBeforeSubmitShippingAddressInvalid() { - $quote = $this->getQuote('0000032134'); - $this->validator->validateBeforeSubmit($quote); + $quote = $this->objectManager->create(Quote::class); + $quote->load('quote123', 'reserved_order_id'); + $quote->getShippingAddress()->setPostcode(''); + + $this->quoteValidator->validateBeforeSubmit($quote); + } + + /** + * @magentoDataFixture Magento/Quote/_files/quote_tx_flat.php + * @expectedException \Magento\Framework\Exception\LocalizedException + * @expectedExceptionMessage Some addresses can't be used due to the configurations for specific countries. + * + * @return void + */ + public function testValidateBeforeSubmitCountryIsNotAllowed() + { + /** @magentoConfigFixture does not allow to change the value for the website scope */ + $this->objectManager->get( + \Magento\Framework\App\Config\MutableScopeConfigInterface::class + )->setValue( + 'general/country/allow', + 'US', + \Magento\Store\Model\ScopeInterface::SCOPE_WEBSITES + ); + $quote = $this->objectManager->create(Quote::class); + $quote->load('quote123', 'reserved_order_id'); + $quote->getShippingAddress()->setCountryId('AF'); + + $this->quoteValidator->validateBeforeSubmit($quote); + } + + /** + * @magentoDataFixture Magento/Quote/_files/quote_tx_flat.php + * @expectedException \Magento\Framework\Exception\LocalizedException + * @expectedExceptionMessage The shipping method is missing. Select the shipping method and try again. + * + * @return void + */ + public function testValidateBeforeSubmitShippingMethodInvalid() + { + $quote = $this->objectManager->create(Quote::class); + $quote->load('quote123', 'reserved_order_id'); + $quote->getShippingAddress()->setShippingMethod('NONE'); + + $this->quoteValidator->validateBeforeSubmit($quote); } /** - * Gets quote entity by reserved order id. + * @magentoDataFixture Magento/Quote/_files/quote_tx_flat.php + * @expectedException \Magento\Framework\Exception\LocalizedException + * @expectedExceptionMessage Please check the billing address information. * - * @param string $reservedOrderId - * @return Quote + * @return void */ - private function getQuote(string $reservedOrderId): Quote + public function testValidateBeforeSubmitBillingAddressInvalid() { - /** @var SearchCriteriaBuilder $searchCriteriaBuilder */ - $searchCriteriaBuilder = $this->objectManager->get(SearchCriteriaBuilder::class); - $searchCriteria = $searchCriteriaBuilder->addFilter('reserved_order_id', $reservedOrderId) - ->create(); + $quote = $this->objectManager->create(Quote::class); + $quote->load('quote123', 'reserved_order_id'); + $quote->getBillingAddress()->setTelephone(''); - /** @var CartRepositoryInterface $repository */ - $repository = $this->objectManager->get(CartRepositoryInterface::class); - $items = $repository->getList($searchCriteria) - ->getItems(); + $this->quoteValidator->validateBeforeSubmit($quote); + } - return array_pop($items); + /** + * @magentoDataFixture Magento/Quote/_files/quote_tx_flat.php + * @expectedException \Magento\Framework\Exception\LocalizedException + * @expectedExceptionMessage Enter a valid payment method and try again. + * + * @return void + */ + public function testValidateBeforeSubmitPaymentMethodInvalid() + { + $quote = $this->objectManager->create(Quote::class); + $quote->load('quote123', 'reserved_order_id'); + $quote->getPayment()->setMethod(''); + + $this->quoteValidator->validateBeforeSubmit($quote); + } + + /** + * @magentoConfigFixture current_store sales/minimum_order/active 1 + * @magentoConfigFixture current_store sales/minimum_order/amount 100 + * @magentoDataFixture Magento/Quote/_files/quote_tx_flat.php + * @expectedException \Magento\Framework\Exception\LocalizedException + * + * @return void + */ + public function testValidateBeforeSubmitMinimumAmountInvalid() + { + $quote = $this->objectManager->create(Quote::class); + $quote->load('quote123', 'reserved_order_id'); + $quote->getShippingAddress() + ->setBaseSubtotal(0); + $this->quoteValidator->validateBeforeSubmit($quote); + } + + /** + * @magentoDataFixture Magento/Quote/_files/quote_tx_flat.php + * + * @return void + */ + public function testValidateBeforeSubmitWithoutMinimumOrderAmount() + { + $quote = $this->objectManager->create(Quote::class); + $quote->load('quote123', 'reserved_order_id'); + $this->quoteValidator->validateBeforeSubmit($quote); + } + + /** + * @magentoConfigFixture current_store sales/minimum_order/active 1 + * @magentoConfigFixture current_store sales/minimum_order/amount 100 + * @magentoDataFixture Magento/Quote/_files/quote_tx_flat.php + * + * @return void + */ + public function testValidateBeforeSubmitWithMinimumOrderAmount() + { + $quote = $this->objectManager->create(Quote::class); + $quote->load('quote123', 'reserved_order_id'); + $quote->getShippingAddress() + ->setBaseSubtotal(200); + $this->quoteValidator->validateBeforeSubmit($quote); } } diff --git a/dev/tests/integration/testsuite/Magento/Quote/_files/quote_tx_flat.php b/dev/tests/integration/testsuite/Magento/Quote/_files/quote_tx_flat.php new file mode 100644 index 0000000000000..43f5258b56ed3 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Quote/_files/quote_tx_flat.php @@ -0,0 +1,60 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +use Magento\Quote\Api\Data\AddressInterface; +use Magento\Quote\Model\Quote\Address\Rate; +use Magento\TestFramework\Helper\Bootstrap; +use Magento\Quote\Model\Quote; +use Magento\Quote\Model\QuoteRepository; + +/** @var $objectManager \Magento\TestFramework\ObjectManager */ +$objectManager = Bootstrap::getObjectManager(); +/** @var Quote $quote */ +$quote = $objectManager->create(Quote::class); + +/** @var AddressInterface $billingAddress */ +$billingAddress = $objectManager->create(AddressInterface::class); +$billingAddress->setFirstname('Joe') + ->setLastname('Doe') + ->setCountryId('US') + ->setRegion('TX') + ->setCity('Austin') + ->setStreet('1000 West Parmer Line') + ->setPostcode('11501') + ->setTelephone('123456789'); +$quote->setBillingAddress($billingAddress); + +/** @var AddressInterface $shippingAddress */ +$shippingAddress = $objectManager->create(AddressInterface::class); +$shippingAddress->setFirstname('Joe') + ->setLastname('Doe') + ->setCountryId('US') + ->setRegion('TX') + ->setCity('Austin') + ->setStreet('1000 West Parmer Line') + ->setPostcode('11501') + ->setTelephone('123456789'); +$quote->setShippingAddress($shippingAddress); + +$quote->getShippingAddress() + ->setShippingMethod('flatrate_flatrate') + ->setCollectShippingRates(1); +/** @var Rate $shippingRate */ +$shippingRate = $objectManager->create(Rate::class); +$shippingRate->setMethod('flatrate') + ->setCarrier('flatrate') + ->setPrice(5) + ->setCarrierTitle('Flat Rate') + ->setCode('flatrate_flatrate'); +$quote->getShippingAddress() + ->addShippingRate($shippingRate); + +$quote->getPayment()->setMethod('CC'); +$quote->setReservedOrderId('quote123'); +$quote->setStoreId(1); + +/** @var QuoteRepository $quoteRepository */ +$quoteRepository = $objectManager->create(\Magento\Quote\Api\CartRepositoryInterface::class); +$quoteRepository->save($quote); diff --git a/dev/tests/integration/testsuite/Magento/Quote/_files/quote_tx_flat_rollback.php b/dev/tests/integration/testsuite/Magento/Quote/_files/quote_tx_flat_rollback.php new file mode 100644 index 0000000000000..e89bf4c23e2d9 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Quote/_files/quote_tx_flat_rollback.php @@ -0,0 +1,17 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +use Magento\TestFramework\Helper\Bootstrap; +use Magento\Quote\Model\Quote; + +/** @var $objectManager \Magento\TestFramework\ObjectManager */ +$objectManager = Bootstrap::getObjectManager(); +/** @var Quote $quote */ +$quote = $objectManager->create(Quote::class); +$quote->load('quote123', 'reserved_order_id'); +if ($quote->getId()) { + $quote->delete(); +} diff --git a/dev/tests/integration/testsuite/Magento/Reports/Block/Adminhtml/GridTest.php b/dev/tests/integration/testsuite/Magento/Reports/Block/Adminhtml/GridTest.php index bc9d0f895941b..28fcbaaff4dd3 100644 --- a/dev/tests/integration/testsuite/Magento/Reports/Block/Adminhtml/GridTest.php +++ b/dev/tests/integration/testsuite/Magento/Reports/Block/Adminhtml/GridTest.php @@ -5,18 +5,84 @@ */ namespace Magento\Reports\Block\Adminhtml; +use Magento\TestFramework\Helper\Bootstrap; +use Magento\Framework\Locale\ResolverInterface; +use Magento\Framework\App\RequestInterface; +use Magento\Reports\Model\ResourceModel\Product\Sold\Collection\Initial; + /** * Test class for \Magento\Reports\Block\Adminhtml\Grid * @magentoAppArea adminhtml */ class GridTest extends \PHPUnit\Framework\TestCase { - public function testGetDateFormat() + /** + * @var $block \Magento\Reports\Block\Adminhtml\Grid + */ + private $block; + + /** + * @inheritDoc + */ + protected function setUp() { - /** @var $block \Magento\Reports\Block\Adminhtml\Grid */ - $block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( + $this->block = Bootstrap::getObjectManager()->get( \Magento\Reports\Block\Adminhtml\Grid::class ); - $this->assertNotEmpty($block->getDateFormat()); + } + + public function testGetDateFormat() + { + $this->assertNotEmpty($this->block->getDateFormat()); + } + + /** + * Test apply filtering to collection + * + * @param string $from + * @param string $to + * @param string $period + * @param string $locale + * @param int $expected + * @dataProvider getSalesRepresentativeIdDataProvider + */ + public function testGetPreparedCollection($from, $to, $period, $locale, $expected) + { + $encodedFilter = base64_encode('report_from='. $from . '&report_to=' . $to . '&report_period=' . $period); + + $this->block->setVarNameFilter('filtername'); + /** @var $request RequestInterface */ + $request = Bootstrap::getObjectManager()->get(RequestInterface::class); + $request->setParams(['filtername' => $encodedFilter]); + $request->setParams(['locale' => $locale]); + + /** @var $localeResolver ResolverInterface */ + $localeResolver = Bootstrap::getObjectManager()->get(ResolverInterface::class); + $localeResolver->setLocale(); + + /** @var $initialCollection Initial */ + $initialCollection = Bootstrap::getObjectManager()->create( + Initial::class + ); + $this->block->setData(['dataSource' => $initialCollection]); + + /** @var $collection Initial */ + $collection = $this->block->getPreparedCollection(); + $items = $collection->getItems(); + $this->assertCount($expected, $items); + } + + /** + * Data provider for testGetPreparedCollection method. + * + * @return array + */ + public function getSalesRepresentativeIdDataProvider(): array + { + return [ + 'Data for US locale' => ['08/15/2018', '08/20/2018', 'day', 'en_US', 6], + 'Data for Australian locale' => ['15/08/2018', '31/08/2018', 'day', 'en_AU', 17], + 'Data for French locale' => ['20.08.2018', '30.08.2018', 'day', 'fr_FR', 11], + ]; } } diff --git a/dev/tests/unit/framework/bootstrap.php b/dev/tests/unit/framework/bootstrap.php index 68dba4e2ce00c..06aee53dafb14 100644 --- a/dev/tests/unit/framework/bootstrap.php +++ b/dev/tests/unit/framework/bootstrap.php @@ -11,7 +11,6 @@ } require_once __DIR__ . '/autoload.php'; -require BP . '/app/functions.php'; setCustomErrorHandler(); diff --git a/lib/internal/Magento/Framework/Console/Cli.php b/lib/internal/Magento/Framework/Console/Cli.php index fbd9c651347b0..78b8f0c14a5f9 100644 --- a/lib/internal/Magento/Framework/Console/Cli.php +++ b/lib/internal/Magento/Framework/Console/Cli.php @@ -9,7 +9,6 @@ use Magento\Framework\App\DeploymentConfig; use Magento\Framework\App\Filesystem\DirectoryList; use Magento\Framework\App\ProductMetadata; -use Magento\Framework\App\State; use Magento\Framework\Composer\ComposerJsonFinder; use Magento\Framework\Console\Exception\GenerationDirectoryAccessException; use Magento\Framework\Filesystem\Driver\File; @@ -74,7 +73,6 @@ public function __construct($name = 'UNKNOWN', $version = 'UNKNOWN') $this->assertCompilerPreparation(); $this->initObjectManager(); - $this->assertGenerationPermissions(); } catch (\Exception $exception) { $output = new \Symfony\Component\Console\Output\ConsoleOutput(); $output->writeln( @@ -167,33 +165,6 @@ private function initObjectManager() $omProvider->setObjectManager($this->objectManager); } - /** - * Checks whether generation directory is read-only. - * Depends on the current mode: - * production - application will proceed - * default - application will be terminated - * developer - application will be terminated - * - * @return void - * @throws GenerationDirectoryAccessException If generation directory is read-only in developer mode - */ - private function assertGenerationPermissions() - { - /** @var GenerationDirectoryAccess $generationDirectoryAccess */ - $generationDirectoryAccess = $this->objectManager->create( - GenerationDirectoryAccess::class, - ['serviceManager' => $this->serviceManager] - ); - /** @var State $state */ - $state = $this->objectManager->get(State::class); - - if ($state->getMode() !== State::MODE_PRODUCTION - && !$generationDirectoryAccess->check() - ) { - throw new GenerationDirectoryAccessException(); - } - } - /** * Checks whether compiler is being prepared. * diff --git a/lib/internal/Magento/Framework/Exception/AggregateExceptionInterface.php b/lib/internal/Magento/Framework/Exception/AggregateExceptionInterface.php new file mode 100644 index 0000000000000..d7b6f6fce3f8f --- /dev/null +++ b/lib/internal/Magento/Framework/Exception/AggregateExceptionInterface.php @@ -0,0 +1,25 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\Framework\Exception; + +/** + * AggregateExceptionInterface Extension Point introduced to support Multiple Errors returned as a result of Validation + * not mandating to inherit from AbstractAggregateException class + * + * @api + */ +interface AggregateExceptionInterface +{ + /** + * Returns LocalizedException[] array to be compatible with current Implementation in Web API which relies on + * this behavior + * + * @see the \Magento\Framework\Webapi\Exception which receives $errors as a set of Localized Exceptions + * + * @return LocalizedException[] + */ + public function getErrors(); +} diff --git a/lib/internal/Magento/Framework/Mail/Template/TransportBuilder.php b/lib/internal/Magento/Framework/Mail/Template/TransportBuilder.php index 18b241d77a426..a1c7333f41245 100644 --- a/lib/internal/Magento/Framework/Mail/Template/TransportBuilder.php +++ b/lib/internal/Magento/Framework/Mail/Template/TransportBuilder.php @@ -10,6 +10,8 @@ use Magento\Framework\App\TemplateTypesInterface; use Magento\Framework\Mail\MessageInterface; +use Magento\Framework\Mail\MessageInterfaceFactory; +use Magento\Framework\Mail\TransportInterface; use Magento\Framework\Mail\TransportInterfaceFactory; use Magento\Framework\ObjectManagerInterface; @@ -49,7 +51,7 @@ class TransportBuilder /** * Mail Transport * - * @var \Magento\Framework\Mail\TransportInterface + * @var TransportInterface */ protected $transport; @@ -63,48 +65,58 @@ class TransportBuilder /** * Object Manager * - * @var \Magento\Framework\ObjectManagerInterface + * @var ObjectManagerInterface */ protected $objectManager; /** * Message * - * @var \Magento\Framework\Mail\Message + * @var MessageInterface */ protected $message; /** * Sender resolver * - * @var \Magento\Framework\Mail\Template\SenderResolverInterface + * @var SenderResolverInterface */ protected $_senderResolver; /** - * @var \Magento\Framework\Mail\TransportInterfaceFactory + * @var TransportInterfaceFactory */ protected $mailTransportFactory; + /** + * @var MessageInterfaceFactory + */ + private $messageFactory; + /** * @param FactoryInterface $templateFactory * @param MessageInterface $message * @param SenderResolverInterface $senderResolver * @param ObjectManagerInterface $objectManager * @param TransportInterfaceFactory $mailTransportFactory + * @param MessageInterfaceFactory|null $messageFactory + * + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function __construct( FactoryInterface $templateFactory, MessageInterface $message, SenderResolverInterface $senderResolver, ObjectManagerInterface $objectManager, - TransportInterfaceFactory $mailTransportFactory + TransportInterfaceFactory $mailTransportFactory, + MessageInterfaceFactory $messageFactory = null ) { $this->templateFactory = $templateFactory; - $this->message = $message; $this->objectManager = $objectManager; $this->_senderResolver = $senderResolver; $this->mailTransportFactory = $mailTransportFactory; + $this->messageFactory = $messageFactory ?: $this->objectManager->get(MessageInterfaceFactory::class); + $this->message = $this->messageFactory->create(); } /** @@ -222,7 +234,7 @@ public function setTemplateOptions($templateOptions) /** * Get mail transport * - * @return \Magento\Framework\Mail\TransportInterface + * @return TransportInterface */ public function getTransport() { @@ -240,7 +252,7 @@ public function getTransport() */ protected function reset() { - $this->message = $this->objectManager->create(\Magento\Framework\Mail\Message::class); + $this->message = $this->messageFactory->create(); $this->templateIdentifier = null; $this->templateVars = null; $this->templateOptions = null; diff --git a/lib/internal/Magento/Framework/Mail/Test/Unit/Template/TransportBuilderTest.php b/lib/internal/Magento/Framework/Mail/Test/Unit/Template/TransportBuilderTest.php index 927e17c824e33..c3759bc43f81f 100644 --- a/lib/internal/Magento/Framework/Mail/Test/Unit/Template/TransportBuilderTest.php +++ b/lib/internal/Magento/Framework/Mail/Test/Unit/Template/TransportBuilderTest.php @@ -9,6 +9,11 @@ use Magento\Framework\App\TemplateTypesInterface; use Magento\Framework\Mail\MessageInterface; +/** + * Tests \Magento\Framework\Mail\Template\TransportBuilder. + * + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class TransportBuilderTest extends \PHPUnit\Framework\TestCase { /** @@ -41,6 +46,11 @@ class TransportBuilderTest extends \PHPUnit\Framework\TestCase */ protected $senderResolverMock; + /** + * @var \Magento\Framework\Mail\MessageInterfaceFactory| \PHPUnit_Framework_MockObject_MockObject + */ + private $messageFactoryMock; + /** * @var \PHPUnit_Framework_MockObject_MockObject */ @@ -60,7 +70,12 @@ protected function setUp() \Magento\Framework\Mail\TransportInterfaceFactory::class )->disableOriginalConstructor() ->setMethods(['create']) - ->getMock(); + ->getMockForAbstractClass(); + $this->messageFactoryMock = $this->getMockBuilder(\Magento\Framework\Mail\MessageInterfaceFactory::class) + ->disableOriginalConstructor() + ->setMethods(['create']) + ->getMockForAbstractClass(); + $this->messageFactoryMock->expects($this->atLeastOnce())->method('create')->willReturn($this->messageMock); $this->builder = $objectManagerHelper->getObject( $this->builderClassName, [ @@ -68,7 +83,8 @@ protected function setUp() 'message' => $this->messageMock, 'objectManager' => $this->objectManagerMock, 'senderResolver' => $this->senderResolverMock, - 'mailTransportFactory' => $this->mailTransportFactoryMock + 'mailTransportFactory' => $this->mailTransportFactoryMock, + 'messageFactory' => $this->messageFactoryMock, ] ); } @@ -120,11 +136,6 @@ public function testGetTransport($templateType, $messageType, $bodyText, $templa ->with($this->equalTo(['message' => $this->messageMock])) ->willReturn($transport); - $this->objectManagerMock->expects($this->at(0)) - ->method('create') - ->with($this->equalTo(\Magento\Framework\Mail\Message::class)) - ->willReturn($transport); - $this->builder->setTemplateIdentifier('identifier')->setTemplateVars($vars)->setTemplateOptions($options); $this->assertInstanceOf(\Magento\Framework\Mail\TransportInterface::class, $this->builder->getTransport()); } diff --git a/lib/internal/Magento/Framework/Phrase/__.php b/lib/internal/Magento/Framework/Phrase/__.php new file mode 100644 index 0000000000000..a8d69ec622e90 --- /dev/null +++ b/lib/internal/Magento/Framework/Phrase/__.php @@ -0,0 +1,22 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +/** + * Create value-object \Magento\Framework\Phrase + * @SuppressWarnings(PHPMD.ShortMethodName) + * @return \Magento\Framework\Phrase + */ +function __() +{ + $argc = func_get_args(); + + $text = array_shift($argc); + if (!empty($argc) && is_array($argc[0])) { + $argc = $argc[0]; + } + + return new \Magento\Framework\Phrase($text, $argc); +} diff --git a/lib/internal/Magento/Framework/Validation/README.md b/lib/internal/Magento/Framework/Validation/README.md new file mode 100644 index 0000000000000..d49300c47a5da --- /dev/null +++ b/lib/internal/Magento/Framework/Validation/README.md @@ -0,0 +1,10 @@ +Validation Library supporting multiple validation errors returned. + +ValidationResult object supposed to be created by dedicated validator service which makes a validation and checks +whether all entity invariants (business rules that always should be fulfilled) are valid. + +ValidationResult represents a container storing all the validation errors that happened during the entity validation. + +ValidationException exists to be compatible with the Web-API (SOAP and REST) implementation which currently +uses Magento\Framework\Exception\AggregateExceptionInterface returned as a result of ServiceContracts call +to support Multi-Error response. diff --git a/lib/internal/Magento/Framework/Validation/ValidationException.php b/lib/internal/Magento/Framework/Validation/ValidationException.php new file mode 100644 index 0000000000000..d2698b099fad9 --- /dev/null +++ b/lib/internal/Magento/Framework/Validation/ValidationException.php @@ -0,0 +1,58 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\Framework\Validation; + +use Magento\Framework\Exception\AggregateExceptionInterface; +use Magento\Framework\Exception\LocalizedException; +use Magento\Framework\Phrase; + +/** + * Validation exception with possibility to set several error messages + * + * ValidationException exists to be compatible with the Web-API (SOAP and REST) implementation which currently + * uses Magento\Framework\Exception\AggregateExceptionInterface returned as a result of ServiceContracts call + * to support Multi-Error response. + * + * @api + */ +class ValidationException extends LocalizedException implements AggregateExceptionInterface +{ + /** + * @var ValidationResult|null + */ + private $validationResult; + + /** + * @param Phrase $phrase + * @param \Exception $cause + * @param int $code + * @param ValidationResult|null $validationResult + */ + public function __construct( + Phrase $phrase, + \Exception $cause = null, + $code = 0, + ValidationResult $validationResult = null + ) { + parent::__construct($phrase, $cause, $code); + $this->validationResult = $validationResult; + } + + /** + * @inheritdoc + */ + public function getErrors(): array + { + $localizedErrors = []; + if (null !== $this->validationResult) { + foreach ($this->validationResult->getErrors() as $error) { + $localizedErrors[] = new LocalizedException($error); + } + } + + return $localizedErrors; + } +} diff --git a/lib/internal/Magento/Framework/Validation/ValidationResult.php b/lib/internal/Magento/Framework/Validation/ValidationResult.php new file mode 100644 index 0000000000000..739f597e94f33 --- /dev/null +++ b/lib/internal/Magento/Framework/Validation/ValidationResult.php @@ -0,0 +1,50 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\Framework\Validation; + +/** + * ValidationResult object supposed to be created by dedicated validator service which makes a validation and checks + * whether all entity invariants (business rules that always should be fulfilled) are valid. + * + * ValidationResult represents a container storing all the validation errors that happened during the entity validation. + * + * @api + */ +class ValidationResult +{ + /** + * @var array + */ + private $errors = []; + + /** + * @param array $errors + */ + public function __construct(array $errors) + { + $this->errors = $errors; + } + + /** + * Check error existence. If any return boolean true else false. + * + * @return bool + */ + public function isValid(): bool + { + return empty($this->errors); + } + + /** + * Return list of errors. + * + * @return array + */ + public function getErrors(): array + { + return $this->errors; + } +} diff --git a/lib/internal/Magento/Framework/composer.json b/lib/internal/Magento/Framework/composer.json index a4b14fddf29b8..ededfebaf94ab 100644 --- a/lib/internal/Magento/Framework/composer.json +++ b/lib/internal/Magento/Framework/composer.json @@ -2,7 +2,7 @@ "name": "magento/framework", "description": "N/A", "type": "magento2-library", - "version": "101.0.5", + "version": "101.0.6", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/lib/internal/Magento/Framework/registration.php b/lib/internal/Magento/Framework/registration.php index 097f341f75740..2ee7a242dfb20 100644 --- a/lib/internal/Magento/Framework/registration.php +++ b/lib/internal/Magento/Framework/registration.php @@ -9,3 +9,7 @@ 'magento/framework', __DIR__ ); + +if (!function_exists('__')) { + require 'Phrase/__.php'; +} diff --git a/lib/web/mage/adminhtml/form.js b/lib/web/mage/adminhtml/form.js index 32586d2115b30..8f658f8fad738 100644 --- a/lib/web/mage/adminhtml/form.js +++ b/lib/web/mage/adminhtml/form.js @@ -494,8 +494,7 @@ define([ inputs.each(function (item) { // don't touch hidden inputs (and Use Default inputs too), bc they may have custom logic if ((!item.type || item.type != 'hidden') && !($(item.id + '_inherit') && $(item.id + '_inherit').checked) && //eslint-disable-line - !(currentConfig['can_edit_price'] != undefined && !currentConfig['can_edit_price']) && //eslint-disable-line - !item.id.endsWith('_inherit') + !(currentConfig['can_edit_price'] != undefined && !currentConfig['can_edit_price']) //eslint-disable-line ) { item.disabled = false; jQuery(item).removeClass('ignore-validate');