1!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("ko")):"function"==typeof define&&define.amd?define(["ko"],t):"object"==typeof exports?exports.pxpFrontend=t(require("ko")):(e.pxpFrontend=e.pxpFrontend||{},e.pxpFrontend.authManager=t(e.ko))}(self,(e=>(()=>{"use strict";var t={9797:(e,t,i)=>{i.r(t),i.d(t,{default:()=>n});const n='<script type="text/html" id="authLoginView">\r\n <div class="alert alert-danger" data-bind="visible: !!errorMessage(), html: errorMessage"></div>\r\n <div class="auth-container">\r\n <div class="auth-container__fieldset gray_fieldset" data-bind="css: { \'loading-wheel\':isLoading }">\r\n \x3c!--external services--\x3e\r\n <div class="auth-external-providers-container" data-bind="component: \r\n { name: \'externalServices\', params: { dataStore: dataStoreService, list:currentSettings.ExternalServices, \r\n resourceStrings:{title:currentSettings.RequestedStrings.signInExternalServicesTitle, \r\n orText:currentSettings.RequestedStrings.orText }} }"></div>\r\n \x3c!--external services--\x3e\r\n <div class="auth-container__auth-tab-container" data-bind="visible: isLoginTypeChangeable()">\r\n <a href="javascript:void(0);" data-bind="click: switchToEmail, css: {\'selected\': isEmailAuth}" class="auth-tab tab-email">\r\n <span class="auth-tab__title" data-bind="html: currentSettings.RequestedStrings.emailTabLabel"></span>\r\n <span class="auth-tab__border btn"></span>\r\n </a>\r\n <a href="javascript:void(0);" data-bind="click: switchToPhone, css: {\'selected\': isPhoneAuth}" class="auth-tab tab-phone">\r\n <span class="auth-tab__title" data-bind="html: currentSettings.RequestedStrings.phoneTabLabel"></span>\r\n <span class="auth-tab__border btn"></span>\r\n </a>\r\n </div>\r\n <div class="pxp-alert-wrapper" data-bind="visible:isPasswordNotValid">\r\n <span class="pxp-alert pxp-alert-error" data-bind="html: currentSettings.RequestedStrings.signInFailNewMessage"></span>\r\n </div>\r\n <div class="pxp-alert-wrapper" data-bind="visible:isFormatNotValid">\r\n <span class="pxp-alert pxp-alert-error" data-bind="html: currentSettings.RequestedStrings.signInNotValidMessage"></span>\r\n </div>\r\n <div class="auth-container__fields-list">\r\n <div class="field-list__item" data-bind="visible: isEmailAuth">\r\n <div class="filed-item__wrapper">\r\n <label class="filed-item__label" for="txtEmail" data-bind="html: currentSettings.RequestedStrings.emailLabel"></label>\r\n <div class="filed-item-wrapper__input">\r\n <input type="text" name="email" autocomplete="email" id="txtEmail" class="input_with_icon" \r\n autofocus data-bind="value: dataStoreService.email, enable: !isLoading(), valueUpdate: \'input\', hasFocus: isEmailInputFocus" />\r\n </div>\r\n </div>\r\n \x3c!-- ko if: isErrorMessagesVisible --\x3e\r\n <div class="field_validation" data-bind="visible: isEmailConflictState">\r\n <span data-bind="html: currentSettings.RequestedStrings.userNotExistsWarn"></span>. \r\n <a href="javascript:void(0)" data-bind="click: switchRegisterMode, html: currentSettings.RequestedStrings.signUpLabel"></a>\r\n </div>\r\n <div class="field_validation" data-bind="visible: isEmailNotValid">\r\n <span data-bind="html: currentSettings.RequestedStrings.emailNotValidMessage"></span>\r\n </div>\r\n \x3c!-- /ko --\x3e\r\n </div>\r\n <div class="field-list__item field_with_phone" data-bind="visible: isPhoneAuth">\r\n <div class="filed-item__wrapper">\r\n <label class="filed-item__label" for="txtPhone" data-bind="html: currentSettings.RequestedStrings.phoneLabel"></label>\r\n <div class="filed-item-wrapper__input">\r\n <input type="tel" name="phone" autocomplete="phone" id="txtPhone" class="input_with_icon"\r\n data-bind="\r\n phoneinput: { value: dataStoreService.ph
1one, rule: dataStoreService.phoneRule },\r\n enable: !isLoading(),\r\n hasFocus: isPhoneInputFocus,\r\n event: {\r\n input: dataStoreService.markPhoneDirty,\r\n paste: dataStoreService.markPhoneDirty,\r\n blur: function(){ dataStoreService.touchPhone(); validatePhone(); }\r\n }" />\r\n </div>\r\n </div>\r\n \x3c!-- ko if: isErrorMessagesVisible --\x3e\r\n <div class="field_validation" data-bind="visible: showPhoneConflictState">\r\n <span data-bind="html: currentSettings.RequestedStrings.userNotExistsWarn"></span>. \r\n <a href="javascript:void(0)" data-bind="click: switchRegisterMode, html: currentSettings.RequestedStrings.signUpLabel"></a>\r\n </div>\r\n\r\n <div class="field_validation" data-bind="visible: showPhoneEmpty">\r\n <span data-bind="html: currentSettings.RequestedStrings.phoneEmptyMessage"></span>\r\n </div>\r\n\r\n <div class="field_validation" data-bind="visible: showPhoneNotValid">\r\n <span data-bind="html: currentSettings.RequestedStrings.phoneFormatInvalidMessage"></span>\r\n </div>\r\n \x3c!-- /ko --\x3e\r\n </div>\r\n \x3c!--Password fileds--\x3e\r\n <div data-bind="component: { name: \'passwordUnveiler\', params: { password: dataStoreService.password, \r\n passwordType: passwordType, mask: passwordMask, localization: currentSettings.RequestedStrings, isFocus: isPasswordInputFocus } }"></div>\r\n <div class="field-list__item">\r\n <div class="filed-item__wrapper">\r\n <span class="checkbox">\r\n <input type="checkbox" id="chkPersistLogin" data-bind="checked: dataStoreService.isPersistLogin" />\r\n <label for="chkPersistLogin" data-bind="html: currentSettings.RequestedStrings.persistLoginLabel"></label>\r\n </span>\r\n </div>\r\n </div>\r\n <div data-bind="component: {name: \'recaptcha\', params: { isRecaptchaPassed: isRecaptchaPassed, \r\n isVisible: isRecaptchaRequired, widgetId: recaptchaWidgetId, recaptchaSiteKey: currentSettings.RecaptchaSiteKey, isYandexCaptcha:currentSettings.IsYandexCaptcha}}"></div>\r\n </div>\r\n \r\n <div class="auth-container__buttons">\r\n <a href="javascript:void(0);" class="semilink auth-btn" data-bind="visible: isTelegramLinkForPhonePageVisible, click: goToTelegram, html: currentSettings.RequestedStrings.getTelegramCode"></a>\r\n <a href="javascript:void(0);" class="semilink auth-btn" data-bind="visible: isMaxLinkForPhonePageVisible, click: goToMax, html: currentSettings.RequestedStrings.getMaxCode"></a>\r\n\r\n <div class="auth-button__code-wrapper" data-bind="visible: getCodeButtonIsAvailable">\r\n <a href="javascript:void(0);" class="semilink auth-btn" data-bind="click: getNewCode, html: authCodeMessage, visible: isCodeLinkVisible"></a>\r\n <div class="auth-code__timer" data-bind="visible: !isCodeLinkVisible()">\r\n <span class="auth-code-timer__message" data-bind="html: currentSettings.RequestedStrings.temporaryPasswordMessage">\r\n </span> <span><b data-bind="html:sentToLogin"></b></span>\r\n <div class="auth-code-timer__repeat">\r\n <a href="javascript:void(0);" class="semilink auth-code-timer__link" data-bind="click: getNewCode, \r\n html: currentSettings.RequestedStrings.getAuthCodeRepeatButtonLabel, visible: !timer.isEnable()"></a>
1\r\n <span class="auth-code-timer__count" data-bind="visible: timer.isEnable">\r\n <span class="timer-count__message" data-bind="html: currentSettings.RequestedStrings.getAuthCodeMessageRepeat"></span>\r\n \r\n <span class="timer-count__time" data-bind="html: timer.time"></span>\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class="auth-button__code-wrapper" data-bind="visible: isDeliveryErrorVisible">\r\n <div class="auth-code__timer">\r\n <span class="auth-code-timer__message" data-bind="html: currentSettings.RequestedStrings.codeDeliveryError"></span>\r\n </div>\r\n <br>\r\n <a href="javascript:void(0);" class="semilink auth-btn" data-bind="click: goToTelegram, html: currentSettings.RequestedStrings.getTelegramCode"></a>\r\n </div>\r\n <div class="auth-button__control-wrapper">\r\n <button class="btn btn-enter" data-bind="click: proceedNext, enable: isValidated">\r\n <span data-bind="html: currentSettings.RequestedStrings.signInLabel"></span>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n<\/script>'},3186:(e,t,i)=>{i.r(t),i.d(t,{default:()=>n});const n='\x3c!--ko if: isAuthSwitchersVisible --\x3e\r\n<h1 data-bind="html: currentSettings.RequestedStrings.userIntroduce"></h1>\r\n<div class="checkout-pagination">\r\n <div class="checkout-mode-tab checkout-mode-tab-register" data-bind="html: currentSettings.RequestedStrings.signUpTabLabel, click: switchSignUp"></div>\r\n <div class="checkout-mode-tab checkout-mode-tab-signin" data-bind="html: currentSettings.RequestedStrings.signInTabLabel, click: switchSignIn"></div>\r\n</div>\r\n\x3c!-- /ko --\x3e\r\n\x3c!--ko if: currentStage --\x3e\r\n<div data-bind="with: currentStage">\r\n <div id="authorisationContainer" data-bind="template: {name: templateTitle}"></div>\r\n</div>\r\n\x3c!-- /ko --\x3e\r\n'},9592:(e,t,i)=>{i.r(t),i.d(t,{default:()=>n});const n='<script type="text/html" id="authProfileView">\r\n <div id="approvalContainer" class="auth-container" data-bind="css: {\'loading-wheel\':isLoading}">\r\n <div class="auth-container__fields-list">\r\n <div class="pxp-alert-wrapper" data-bind="visible:successMessageIsShowed">\r\n <span class="pxp-alert pxp-alert-success" data-bind="html:currentSettings.RequestedStrings.sendedToSavedMessage"></span>\r\n </div>\r\n <div class="pxp-alert-wrapper" data-bind="visible:errorMessageIsShowed">\r\n <span class="pxp-alert pxp-alert-error" data-bind="html:currentSettings.RequestedStrings.approvalHeaderTitle"></span>\r\n </div>\r\n <div class="pxp-alert-wrapper" data-bind="visible:approvedMessageForPhoneIsShowed">\r\n <span class="pxp-alert pxp-alert-error" data-bind="html: currentSettings.RequestedStrings.getPhoneAlreadyExistsMessage"></span>\r\n </div>\r\n <div class="pxp-alert-wrapper" data-bind="visible:approvedMessageForEmailIsShowed">\r\n <span class="pxp-alert pxp-alert-error" data-bind="html: currentSettings.RequestedStrings.getEmailAlreadyExistsMessage"></span>\r\n </div>\r\n <div class="field-list__item">\r\n <label for="txtLastName" data-bind="html: currentSettings.RequestedStrings.lastNameLabel"></label>\r\n <input type="text" id="txtLastName" data-bind="value: dataStoreService.lastName, valueUpdate: \'input\'" />\r\n </div>\r\n <div class="pxp-alert-wrapper" data-bind="visible: lastNameEmptyIsShowed">\r\n <span class="pxp-alert pxp-alert-error" data-bind="html: currentSettings.RequestedStrings.lastNameEmptyMessage"></span>\r\n </div>\r\n <div class="field-list__item">\r\n <label for="txtFirstName" data-bind="html: currentSettings.RequestedStrings.firstNameLabel"></label>\r\n <input type="text" id="txtFirstName" data-bind="value: dataStoreService.firstName, valueUpdate: \'input\'" />\r\n </div>\r\n <div class="pxp-alert-wrapper" data-bind="visible: firstNameEmptyIsShowed">
1\r\n <span class="pxp-alert pxp-alert-error" data-bind="html: currentSettings.RequestedStrings.firstNameEmptyMessage"></span>\r\n </div>\r\n <div class="field-list__item" data-bind="visible:currentSettings.IsMiddleNameEnabled">\r\n <label for="txtMiddleName" data-bind="html: currentSettings.RequestedStrings.middleNameLabel"></label>\r\n <input type="text" id="txtMiddleName" data-bind="value: dataStoreService.middleName, valueUpdate: \'input\'" />\r\n </div>\r\n <div class="field-list__item">\r\n <label for="txtEmail" data-bind="html: currentSettings.RequestedStrings.emailLabel"></label>\r\n <input type="text" id="txtEmail" data-bind="value: email, valueUpdate: \'input\'" />\r\n <span class="pxp-alert pxp-alert-warning" data-bind="visible:emailExpression.expressionResult">\r\n <a href="javascript:void(0)" class="semilink" data-bind="click:showEmailConfirmationModal"><span data-bind="html:currentSettings.RequestedStrings.getApprovalMessageForEmail"></span></a>\r\n </span>\r\n </div>\r\n <div class="pxp-alert-wrapper" data-bind="visible: emailEmptyIsShowed">\r\n <span class="pxp-alert pxp-alert-error" data-bind="html: currentSettings.RequestedStrings.emailEmptyMessage"></span>\r\n </div>\r\n <div class="field-list__item">\r\n <label for="txtPhone" data-bind="html: currentSettings.RequestedStrings.phoneLabel"></label>\r\n <input type="tel" id="txtPhone" data-bind="phoneinput: phone" />\r\n <span class="pxp-alert pxp-alert-warning" data-bind="visible:isPhoneApprovalButtonVisible">\r\n <a href="javascript:void(0)" class="semilink" data-bind="click:showPhoneConfirmationModal"><span data-bind="html:currentSettings.RequestedStrings.getApprovalMessageForPhone"></span></a>\r\n </span>\r\n </div>\r\n <div class="pxp-alert-wrapper" data-bind="visible: phoneNotSavedIsShowed">\r\n <span class="pxp-alert pxp-alert-error" data-bind="html: currentSettings.RequestedStrings.phoneNotSavedMessage"></span>\r\n </div>\r\n <div class="pxp-alert-wrapper" data-bind="visible: phoneEmptyIsShowed">\r\n <span class="pxp-alert pxp-alert-error" data-bind="html: currentSettings.RequestedStrings.phoneEmptyMessage"></span>\r\n </div>\r\n \x3c!-- ko component: {\r\n name: "customFields",\r\n params: { isRegister: false, userFields: dataStoreService.customFieldsSet }\r\n } --\x3e\r\n \x3c!-- /ko --\x3e\r\n <div class="field-list__item">\r\n \x3c!-- ko if: currentSettings.IsSubscriptionSuggesting --\x3e\r\n <span class="checkbox">\r\n <input type="checkbox" id="chkIsSubscription" data-bind="checked: dataStoreService.isSubscriptionActive" />\r\n <label for="chkIsSubscription" data-bind="html: currentSettings.RequestedStrings.acceptEmailsLabel"></label>\r\n </span>\r\n \x3c!-- /ko --\x3e\r\n <span class="checkbox">\r\n <input type="checkbox" id="chkIsSystemSubscription" data-bind="checked: dataStoreService.isSystemNotificationsEnabled" />\r\n <label for="chkIsSystemSubscription" data-bind="html: currentSettings.RequestedStrings.acceptSystemEmailsLabel"></label>\r\n </span>\r\n </div>\r\n </div> \r\n <div class="profile-wrapper-buttons">\r\n <div class="row">\r\n <div class="col-md-5">\r\n <div class="profile-delete">\r\n <a href="javascript:void(0);" class="semilink" data-bind="click:showDeleteProfileModal, html:currentSettings.RequestedStrings.deleteAccountModalTitle"></a>\r\n </div>\r\n </div>\r\n <div class="col-md-7">\r\n <div class="buttons">\r\n <button data-bind="click: saveSettings, html: currentSettings.RequestedStrings.saveLabel"></button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n<\/script>'},9697:(e,t,i)=>{i.r(t),i.d(t,{default:()=>n});const n='<script type="text/html" id="authRegisterView">\r\n<div class="auth-container">\r\n<div class="auth-container__fieldset gray_fieldset" data-bind="css: {\'loading-wheel\':isLoading}">\r\n\x3c!--external services--\x3e\r\n<div class="auth-external-providers-container" data-bind="component: {name: \'externalServices\', params: { dataStore: dataStoreService,list:currentSettings.Exter
1nalServices, resourceStrings:{title:currentSettings.RequestedStrings.signInExternalServicesTitle, orText:currentSettings.RequestedStrings.orText }} }"></div>\r\n\x3c!--external services--\x3e\r\n<div class="pxp-alert-wrapper" data-bind="visible:isAccountConflictState">\r\n <span class="pxp-alert pxp-alert-error" data-bind="html: accountConflictStateMessage"></span>\r\n</div>\r\n<div class="auth-container__fields-list">\r\n <div class="field-list__item field_with_phone">\r\n <div class="filed-item__wrapper">\r\n \x3c!-- ko if: currentSettings.IsPhoneRequired --\x3e\r\n <style>\r\n #phone:after {\r\n content: \'*\';\r\n color: #ff0000;\r\n }\r\n </style>\r\n <label id="phone" class="filed-item__label" for="txtPhone" data-bind="html: currentSettings.RequestedStrings.phoneLabel"></label>\r\n \x3c!-- /ko--\x3e\r\n \x3c!-- ko ifnot: currentSettings.IsPhoneRequired --\x3e\r\n <label class="filed-item__label" for="txtPhone" data-bind="html: currentSettings.RequestedStrings.phoneLabel"></label>\r\n \x3c!-- /ko--\x3e\r\n <div class="filed-item-wrapper__input">\r\n <input type="tel" name="phone" id="txtPhone" class="input_with_icon" data-bind="phoneinput: {value: dataStoreService.phone, rule: dataStoreService.phoneRule}, enable: !isLoading(),\r\n event: {\r\n input: dataStoreService.markPhoneDirty,\r\n paste: dataStoreService.markPhoneDirty,\r\n blur: function () {\r\n dataStoreService.touchPhone();\r\n validatePhone();\r\n }\r\n }" />\r\n </div>\r\n </div>\r\n <div class="field_validation" data-bind="visible: showPhoneNotValid">\r\n <span data-bind="html: currentSettings.RequestedStrings.phoneFormatInvalidMessage"></span>\r\n </div>\r\n </div>\r\n\r\n \x3c!-- ko if: isPhoneValidation --\x3e\r\n \x3c!-- ko ifnot: isUserDemandedCode --\x3e\r\n <div class="field-list__item auth-send-sms">\r\n <a href="javascript:void(0);" class="semilink auth-btn" data-bind="click: getNewCode, html: currentSettings.RequestedStrings.getAuthCodeMessageForPhoneRegistration"></a>\r\n </div>\r\n \x3c!-- /ko--\x3e\r\n \x3c!-- ko if: isUserDemandedCode --\x3e\r\n <div class="field-list__item">\r\n <div class="auth-code__timer">\r\n <span class="auth-code-timer__message" data-bind="html:currentSettings.RequestedStrings.temporaryPasswordMessage"></span> <span><b data-bind="html:sentToLogin"></b></span>\r\n <div class="auth-code-timer__repeat">\r\n <a href="javascript:void(0);" class="semilink auth-code-timer__link" data-bind="click: getNewCode, html: currentSettings.RequestedStrings.getAuthCodeRepeatButtonLabel, visible: !timer.isEnable()"></a>\r\n <span class="auth-code-timer__count" data-bind="visible: timer.isEnable">\r\n <span class="timer-count__message" data-bind="html:currentSettings.RequestedStrings.getAuthCodeMessageRepeat"></span> <span class="timer-count__time" data-bind="html:timer.time"></span>\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class="field-list__item auth-phone-code">\r\n <div class="filed-item__wrapper">\r\n <label class="filed-item__label" for="txtCode" data-bind="html: currentSettings.RequestedStrings.phoneCodeLabel"></label>\r\n <div class="filed-item-wrapper__input">\r\n <input type="text" name="code" autocomplete="code" id="txtCode" class="input_with_icon" data-bind="value: dataStoreService.password, valueUpdate: \'input\'" />\r\n </div>\r\n </div>\r\n </div>\r\n \x3c!-- /ko--\x3e\r\n \x3c!-- /ko--\x3e\r\n\r\n <div class="field-list__item">\r\n <div class="filed-item__wrapper">\r\n \x3c!-- ko if: currentSettings.IsEmailRequired --\x3e\r\n <style>\r\n #email:after {\r\n content: \'*\';\r\n color: #ff0000;\r\n }\r\n </style>\r\n <label id="email" class="filed-item__label" for="txtEmail" data-bind="html: currentSettings.RequestedStrings.emailLabel"></label>\r\n \x3c!-- /ko--\x3e\r\n \x3c!-- ko ifnot: currentSettings.IsEmailRequired --\x3e\r\n <label class="filed-item__label" for="txtEmail" data-bind="html: currentSettings.RequestedStrings.emailLabel"></label>\r\n \x3c!-- /ko--\x3e\r\n <div class="filed-item-wrapper__input">\r\n <input type="text" name="email" id="txtEmail" class="input_with_icon" data-bind="value: dataStoreService.email, enable: !isLoading(), valueUpdate: \'input\'" />\r\n </div>\r\n </div>\r\n </div>\r\n\r\n \x3c!-- ko if: isEmailValidation --\x3e\r\n \x3c!-- ko ifnot: isUserDemandedCode --\x3e\r\n <div class="field-list__item auth-send-sms">\r\n <a href="javascript:void(0);" class="semilink auth-btn" data-bind="click: getNewEmailCode, html: currentSettings.RequestedStrings.getAuthCodeMessageForEmail"></a>\r\n </div>\r\n \x3c!-- /ko--\x3e\r\n \x3c!-- ko if: isUserDemandedCode --\x3e\r\n <div class="field-list__item">\r\n <div class="auth-code__timer">
1\r\n <span class="auth-code-timer__message" data-bind="html:currentSettings.RequestedStrings.temporaryPasswordMessage"></span> <span><b data-bind="html:sentToLogin"></b></span>\r\n <div class="auth-code-timer__repeat">\r\n <a href="javascript:void(0);" class="semilink auth-code-timer__link" data-bind="click: getNewEmailCode, html: currentSettings.RequestedStrings.getAuthCodeRepeatButtonLabel, visible: !timer.isEnable()"></a>\r\n <span class="auth-code-timer__count" data-bind="visible: timer.isEnable">\r\n <span class="timer-count__message" data-bind="html:currentSettings.RequestedStrings.getAuthCodeMessageRepeat"></span> <span class="timer-count__time" data-bind="html:timer.time"></span>\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class="field-list__item auth-phone-code">\r\n <div class="filed-item__wrapper">\r\n <label class="filed-item__label" for="txtCode" data-bind="html: currentSettings.RequestedStrings.emailCodeLabel"></label>\r\n <div class="filed-item-wrapper__input">\r\n <input type="text" name="code" autocomplete="code" id="txtCode" class="input_with_icon" data-bind="value: dataStoreService.password, valueUpdate: \'input\'" />\r\n </div>\r\n </div>\r\n </div>\r\n \x3c!-- /ko--\x3e\r\n \x3c!-- /ko--\x3e\r\n <div class="field-list__item">\r\n <div class="filed-item__wrapper">\r\n \x3c!-- ko if: currentSettings.IsNameRequired --\x3e\r\n <style>\r\n #firstname:after {\r\n content: \'*\';\r\n color: #ff0000;\r\n }\r\n </style>\r\n <label id="firstname" class="filed-item__label" for="txtFirstName" data-bind="html: currentSettings.RequestedStrings.firstNameLabel"></label>\r\n \x3c!-- /ko--\x3e\r\n \x3c!-- ko ifnot: currentSettings.IsNameRequired --\x3e\r\n <label class="filed-item__label" for="txtFirstName" data-bind="html: currentSettings.RequestedStrings.firstNameLabel"></label>\r\n \x3c!-- /ko--\x3e\r\n <div class="filed-item-wrapper__input">\r\n <input type="text" name="given-name" autocomplete="given-name" id="txtFirstName" class="input_with_icon" data-bind="cyrillic: dataStoreService.firstName, iscyrillic: currentSettings.IsCyrillicRequired, valueUpdate: \'input\'" />\r\n </div>\r\n </div>\r\n </div>\r\n <div class="field-list__item">\r\n <div class="filed-item__wrapper">\r\n \x3c!-- ko if: currentSettings.IsLastNameRequired --\x3e\r\n <style>\r\n #lastname:after {\r\n content: \'*\';\r\n color: #ff0000;\r\n }\r\n </style>\r\n <label id="lastname" class="filed-item__label" for="txtLastName" data-bind="html: currentSettings.RequestedStrings.lastNameLabel"></label>\r\n \x3c!-- /ko--\x3e\r\n \x3c!-- ko ifnot: currentSettings.IsLastNameRequired --\x3e\r\n <label class="filed-item__label" for="txtLastName" data-bind="html: currentSettings.RequestedStrings.lastNameLabel"></label>\r\n \x3c!-- /ko--\x3e\r\n <div class="filed-item-wrapper__input">\r\n <input type="text" name="family-name" autocomplete="family-name" id="txtLastName" class="input_with_icon" data-bind="cyrillic: dataStoreService.lastName, iscyrillic: currentSettings.IsCyrillicRequired, valueUpdate: \'input\'" />\r\n </div>\r\n </div>\r\n </div>\r\n <div class="field-list__item" data-bind="visible:currentSettings.IsMiddleNameEnabled">\r\n <div class="filed-item__wrapper">\r\n <label class="filed-item__label" for="txtMiddleName" data-bind="html: currentSettings.RequestedStrings.middleNameLabel"></label>\r\n <div class="filed-item-wrapper__input">\r\n <input type="text" name="additional-name" autocomplete="additional-name" id="txtMiddleName" class="input_with_icon" data-bind="cyrillic: dataStoreService.middleName, iscyrillic: currentSettings.IsCyrillicRequired, valueUpdate: \'input\'" />\r\n </div>\r\n </div>\r\n </div>\r\n\r\n \x3c!-- ko if: isRecaptchaValidation --\x3e\r\n <div data-bind="component: {name: \'passwordUnveiler\', params: { password: dataStoreService.password, mask: passwordMask, localization: currentSettings.RequestedStrings, passwordConfirm: currentSettings.IsPasswordConfirmationEnabled, passConfirmValue: null, passwordsIsEqual:passwordsIsEqual } }"></div>\r\n \x3c!-- /ko --\x3e\r\n <div class="field-list__item" data-bind="visible: !dataStoreService.isAffiliatePredefined() && currentSettings.IsAffiliatesEnabled">\r\n <div class="filed-item__wrapper">\r\n <label class="filed-item__label" for="txtPartnerCode" data-bind="html: currentSettings.RequestedStrings.partnerCode"></label>\r\n <div class="filed-item-wrapper__input">\r\n <input type="text" id="txtPartnerCode" class="input_with_icon" data-bind="value: dataStoreService.affiliateCode, valueUpdate: \'input\', enable: !dataStoreService.isAffiliatePredefined()" />\r\n </div>\r\n </div>\r\n </div>\r\n <div class="field-list__item" data-bind="visible: currentSettings.isSubscriptionSuggesting">\r\n <div class="filed-item__wrapper">
1\r\n <span class="checkbox">\r\n <label for="chkAcceptEmails" data-bind="html: currentSettings.RequestedStrings.acceptEmailsLabel"></label>\r\n <input type="checkbox" id="chkAcceptEmails" data-bind="checked: dataStoreService.isSubscriptionActive" />\r\n </span>\r\n </div>\r\n </div>\r\n\r\n \x3c!-- ko if: currentSettings.IsSubscriptionSuggesting --\x3e\r\n <div class="field-list__item">\r\n <div class="filed-item__wrapper">\r\n <span class="checkbox">\r\n <input type="checkbox" id="chkIsSubscription" data-bind="checked: dataStoreService.isSubscriptionActive" />\r\n <label for="chkIsSubscription" data-bind="html: currentSettings.RequestedStrings.acceptEmailsLabel"></label>\r\n </span>\r\n </div>\r\n </div>\r\n \x3c!-- /ko --\x3e\r\n\r\n <div class="field-list__item" data-bind="visible: !dataStoreService.refCompanyId() && currentSettings.ModuleAvailability == 0">\r\n <div class="filed-item__wrapper">\r\n <span class="checkbox">\r\n <input type="checkbox" id="chkIsUserCompany" data-bind="checked: dataStoreService.isUserCompany" />\r\n <label for="chkIsUserCompany" data-bind="html: currentSettings.RequestedStrings.signUpAsBusiness"></label>\r\n </span>\r\n </div>\r\n </div>\r\n <div class="field-list__item" data-bind="visible: dataStoreService.isUserCompany">\r\n <div class="filed-item__wrapper">\r\n <div class="filed-item-wrapper__input" id="companyRegistrationBlock" data-bind="component: {name: \'companyRegistration\',\r\n params: {company: dataStoreService.company, companyId: dataStoreService.refCompanyId(),\r\n companyNotFound: currentSettings.RequestedStrings.companyNotFoundTitle, isExternalCompanyValidationDisabled: currentSettings.IsExternalCompanyValidationDisabled, requestedStrings: currentSettings.RequestedStrings }}"></div>\r\n </div>\r\n </div>\r\n \x3c!-- ko component: { name: "customFields", params: { isRegister: true, userFields: dataStoreService.customFieldsSet, isBeforeSubmitButton: true } } --\x3e\x3c!-- /ko --\x3e\r\n \x3c!-- ko if: isRecaptchaValidation --\x3e\r\n <div data-bind="component: {name: \'recaptcha\', params: {isRecaptchaPassed: isRecaptchaPassed, isVisible: isRecaptchaRequired, widgetId: recaptchaWidgetId, recaptchaSiteKey: currentSettings.RecaptchaSiteKey,isYandexCaptcha:currentSettings.IsYandexCaptcha }}"></div>\r\n \x3c!-- /ko --\x3e\r\n</div>\r\n <div class="alert alert-danger" data-bind="visible: !!errorMessage(), html: errorMessage"></div>\r\n \x3c!-- ko if: currentSettings.IsAgreementRequired --\x3e\r\n <div class="agreement-text" style="font-size: 14px">\r\n <style>\r\n #Agreements:after {\r\n content: \'*\';\r\n color: #ff0000;\r\n }\r\n </style>\r\n <div id="Agreements" data-bind="html: currentSettings.UserAgreement" style="margin: 0 0 6px 0"></div>\r\n <ul>\r\n <li>\r\n <label><input id="checkboxPersonalDataAgreement" style="margin: 4px 6px;" type="checkbox" data-bind="checked: personalDataAgreementChecked" /><span data-bind="html: currentSettings.PersonalDataAgreement"></span></label>\r\n </li>\r\n <li>\r\n <label><input id="checkboxNotificationAgreement" style="margin: 4px 6px;" type="checkbox" data-bind="checked: notificationAgreementChecked" /><span data-bind="html: currentSettings.NotificationAgreement"></span></label>\r\n </li>\r\n <li>\r\n <label><input id="checkboxThirdPartiesAgreement" style="margin: 4px 6px;" type="checkbox" data-bind="checked: thirdPartiesAgreementChecked" /><span data-bind="html: currentSettings.ThirdPartiesAgreement"></span></label>\r\n </li>\r\n \x3c!-- ko if: isMultifoto --\x3e\r\n <li>\r\n <label><input id="checkboxDiscountNotificationAgreement" style="margin: 4px 6px;" type="checkbox" data-bind="checked: DiscountNotificationAgreementChecked" /><span data-bind="html: currentSettings.DiscountNotificationAgreement"></span></label>\r\n </li>\r\n \x3c!-- /ko --\x3e\r\n </ul>\r\n </div>\r\n \x3c!-- /ko --\x3e\r\n <div class="auth-container__buttons">\r\n <div class="auth-button__control-wrapper">\r\n <button class="btn" data-bind="click: proceedNext, enable: isValidated, html: currentSettings.RequestedStrings.signUpLabel"></button>\r\n </div>\r\n </div>\r\n \x3c!-- ko component: { name: "customFields", params: { isRegister: true, userFields: dataStoreService.customFieldsSet, isBeforeSubmitButton: fal
1se } } --\x3e\x3c!-- /ko --\x3e\r\n \x3c!-- ko ifnot: currentSettings.IsAgreementRequired --\x3e\r\n <div class="agreement-text" data-bind="html: currentSettings.UserAgreement" style="font-size: 14px"></div>\r\n \x3c!-- /ko --\x3e\r\n </div>\r\n </div>\r\n<\/script>'},9735:(e,t,i)=>{i.r(t),i.d(t,{default:()=>n});const n='<script type="text/html" id="authRestoreRequestView">\r\n <div class="alert alert-danger" data-bind="visible: !!errorMessage(), html: errorMessage"></div>\r\n <div class="auth-container" data-bind="css: {\'loading-wheel\':isLoading}">\r\n <h2 class="auth-container__title" data-bind="html: currentSettings.RequestedStrings.passwordRecoveryTitle"></h2>\r\n <fieldset class="auth-container__fieldset">\r\n <div class="auth-container__auth-tab-container" data-bind="visible: isLoginTypeChangeable()">\r\n <a href="javascript:void(0);" data-bind="click: switchToEmail, css: {\'selected\': (dataStoreService.loginMode() == 1)}, html: currentSettings.RequestedStrings.emailTabLabel" class="auth-tab tab-email"></a>\r\n <a href="javascript:void(0);" data-bind="click: switchToPhone, css: {\'selected\': (dataStoreService.loginMode() == 0)}, html: currentSettings.RequestedStrings.phoneTabLabel" class="auth-tab tab-phone"></a>\r\n </div>\r\n\r\n <div class="auth-container__fields-list">\r\n <div class="field-list__item" data-bind="visible: dataStoreService.loginMode() == 1">\r\n <div class="filed-item__wrapper">\r\n <label for="txtEmail" data-bind="html: currentSettings.RequestedStrings.emailLabel"></label>\r\n <div class="filed-item-wrapper__input">\r\n <input type="text" id="txtEmail" data-bind="value: dataStoreService.email, enable: !isLoading(), valueUpdate: \'input\', event: {blur: function() {checkAccount(1)}}" />\r\n <span class="field-item-wrapper__icon">\r\n <i class="icon icon_mail"></i>\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class="field-list__item" data-bind="visible: dataStoreService.loginMode() == 0">\r\n <div class="filed-item__wrapper">\r\n <label for="txtPhone" data-bind="html: currentSettings.RequestedStrings.phoneLabel"></label>\r\n <div class="filed-item-wrapper__input">\r\n <input type="text" id="txtPhone" data-bind="phoneinput: dataStoreService.phone, enable: !isLoading(), event: {blur: function() {checkAccount(0)}}" />\r\n <span class="field-item-wrapper__icon">\r\n <i class="icon icon_phone"></i>\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class="field-list__item">\r\n <div class="filed-item__wrapper">\r\n <label for="txtPassword" data-bind="html: currentSettings.RequestedStrings.verificationCodeLabel"></label>\r\n <div class="filed-item-wrapper__input">\r\n <input id="txtPassword" data-bind="masked: dataStoreService.password, mask: passwordMask, enable: !isLoading(), valueUpdate: \'input\', attr: {type: passwordType}, event: {keypress: onEnterKeyPressed}" />\r\n <span class="field-item-wrapper__icon">\r\n <i class="icon icon_mail"></i>\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class="auth-container__buttons">\r\n <a href="javascript:void(0);" class="semilink auth-btn-left"\r\n data-bind="click: resetCancel, html: currentSettings.RequestedStrings.buttonsCancel">\r\n </a>\r\n <a href="javascript:void(0);" class="semilink auth-btn-left"\r\n data-bind="click: getNewCode, html: currentSettings.RequestedStrings.getAuthCodeMessage, visible: isCodeLinkVisible()">\r\n </a>\r\n <button class="btn" data-bind="click: proceedNext, enable: isValidated, html: currentSettings.RequestedStrings.nextLabel"></button>\r\n </div>\r\n </fieldset>\r\n </div>\r\n<\/script>'},265:(e,t,i)=>{i.r(t),i.d(t,{default:()=>n});const n='<script type="text/html" id="authShoppingView">\r\n <div id="approvalContainer" class="auth-container" data-bind="css: {\'loading-wheel\':isLoading}">\r\n <div class="auth-container__fieldset gray_fieldset">\r\n <h4>
1\r\n <span data-bind="html: currentSettings.RequestedStrings.approvalHeaderTitle"></span>\r\n </h4>\r\n <div class="auth-container__fields-list">\r\n <div class="field-list__item" data-bind="visible: isNameRequired">\r\n <label for="txtFirstName" data-bind="html: currentSettings.RequestedStrings.firstNameLabel"></label>\r\n <input type="text" id="txtFirstName" class="input_with_icon" data-bind="cyrillic: dataStoreService.firstName, value: dataStoreService.firstName, iscyrillic: currentSettings.IsCyrillicRequired, valueUpdate: \'input\'" />\r\n </div>\r\n <div class="field-list__item" data-bind="visible: isNameRequired">\r\n <label for="txtLastName" data-bind="html: currentSettings.RequestedStrings.lastNameLabel"></label>\r\n <input type="text" id="txtLastName" class="input_with_icon" data-bind="cyrillic: dataStoreService.lastName, value: dataStoreService.lastName, iscyrillic: currentSettings.IsCyrillicRequired, valueUpdate: \'input\'" />\r\n </div>\r\n <div class="pxp-alert-wrapper" data-bind="visible: !isEmailCodeValid()">\r\n <span class="pxp-alert pxp-alert-error" data-bind="html: currentSettings.RequestedStrings.invalidAuthCodeWarning"></span>\r\n </div>\r\n <div class="field-list__item" data-bind="visible: isEmailRequired() || !emailExpression.isApproved() && emailExpression.isApprovalRequired() && emailExpression.expressionResult()">\r\n <div class="row">\r\n <div class="col-xs-12 col-sm-6">\r\n <label for="txtEmail" data-bind="html: currentSettings.RequestedStrings.emailLabel"></label>\r\n <input type="text" id="txtEmail" class="input_with_icon" data-bind="value: email, valueUpdate: \'input\', enable:isEmailRequired" />\r\n </div>\r\n <div class="col-xs-12 col-sm-6">\r\n <label class="hidden-xs"> </label>\r\n <div style="margin: 8px 0 0 0;">\r\n <a class="semilink" href="javascript:void(0);" data-bind="html: currentSettings.RequestedStrings.getEmailCodeLabel, click: function() { getNewCode(1) },visible: !timerTwo.isEnable()"></a>\r\n <div data-bind="visible:timerTwo.isEnable">\r\n <span data-bind="html:currentSettings.RequestedStrings.getAuthCodeMessageRepeat"></span> <span data-bind="html:timerTwo.time"></span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class="field-list__item" data-bind="visible: isEmailCodeFieldVisible">\r\n <label for="txtEmailCode" data-bind="html: currentSettings.RequestedStrings.emailCodeLabel"></label>\r\n <input type="text" id="txtEmailCode" class="input_with_icon"data-bind="masked: emailCode, mask: \'####\', valueUpdate: \'input\', event: {keyup: function() { verifyAccount(1) }}, hasFocus:isEmailCodeFieldFocused" />\r\n </div>\r\n <div class="pxp-alert-wrapper" data-bind="visible: !isPhoneCodeValid()">\r\n <span class="pxp-alert pxp-alert-error" data-bind="html: currentSettings.RequestedStrings.invalidAuthCodeWarning"></span>\r\n </div>\r\n <div class="field-list__item" data-bind="visible: isPhoneRequired() || !phoneExpression.isApproved() && phoneExpression.isApprovalRequired() && phoneExpression.expressionResult()">\r\n <div class="row">\r\n <div class="col-xs-12 col-sm-6">\r\n <label for="txtPhone" data-bind="html: currentSettings.RequestedStrings.phoneLabel"></label>\r\n <input type="text" id="txtPhone" class="input_with_icon" data-bind="phoneinput: phone, valueUpdate: \'input\', enable:isPhoneRequired" />\r\n </div>\r\n <div class="col-xs-12 col-sm-6">\r\n <label class="hidden-xs"> </label>\r\n <div style="margin: 8px 0 0 0;">\r\n <a class="semilink" href="javascript:void(0);" data-bind="html: currentSettings.RequestedStrings.getPhoneCodeLabel, click: function() { getNewCode(0) }, visible: !timer.isEnable()"></a>\r\n <div data-bind="visible:timer.isEnable">
1\r\n <span data-bind="html:currentSettings.RequestedStrings.getAuthCodeMessageRepeat"></span> <span data-bind="html:timer.time"></span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class="field-list__item" data-bind="visible: isPhoneCodeFieldVisible">\r\n <label for="txtPhoneCode" data-bind="html: currentSettings.RequestedStrings.phoneCodeLabel"></label>\r\n <input type="text" id="txtPhoneCode" class="input_with_icon" data-bind="masked: phoneCode, mask: \'####\', valueUpdate: \'input\', event: {keyup: function() { verifyAccount(0) }}, hasFocus:isPhoneCodeFieldFocused" />\r\n </div>\r\n <div data-bind="component: {name: \'recaptcha\', params: {isRecaptchaPassed: isRecaptchaPassed, isVisible: isRecaptchaRequired, widgetId: recaptchaWidgetId, recaptchaSiteKey: currentSettings.RecaptchaSiteKey,isYandexCaptcha:currentSettings.IsYandexCaptcha }}"></div>\r\n </div>\r\n <div class="buttons">\r\n <a href="javascript:void(0);" class="semilink skip" style="float: left" data-bind="click: skipStage, html: currentSettings.RequestedStrings.skipStageLabel"></a>\r\n <button data-bind="click: proceedNext, enable: isSubmitButtonEnable, html: currentSettings.RequestedStrings.nextLabel" style="float: none;position: static !important;"></button>\r\n </div>\r\n </div>\r\n </div>\r\n<\/script>'},8515:(e,t,i)=>{i.r(t),i.d(t,{default:()=>n});const n='<div class="modal-wrapper" data-bind="css: {\'loading-wheel\': isLoading }">\r\n <div class="container">\r\n <fieldset style="margin:0;padding:0">\r\n <div class="row">\r\n <div class="form-group clearfix">\r\n <div class="col-xs-12 col-sm-5">\r\n <label data-bind="html: currentSettings.RequestedStrings.authCodeLabel, attr: { for:inputId }"></label>\r\n <input type="text" class="text" data-bind="masked: code, mask: \'####\', valueUpdate: \'input\', attr: { id:inputId }, hasFocus:isCodeInputFocused" />\r\n </div>\r\n <div class="col-xs-12 col-sm-7">\r\n <label class="hidden-xs"> </label>\r\n <div style="margin-top: 10px">\r\n <a href="javascript:void(0);" class="semilink" data-bind="click: getCode, html: currentSettings.RequestedStrings.getAuthCodeRepeatButtonLabel, visible: !timer.isEnable(), style:{color:isRecaptchaRequired()? \'#bfbfbf\':\'\', cursor:isRecaptchaRequired()? \'not-allowed\':\'\'}"></a>\r\n <span data-bind="visible: timer.isEnable">\r\n <span data-bind="html:currentSettings.RequestedStrings.getAuthCodeMessageRepeat"></span> <span data-bind="html:timer.time"></span>\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class="col-md-12">\r\n <div class="text-muted small help-block" style="min-height:0" data-bind="visible:!isRecaptchaRequired()">\r\n <span data-bind="html:currentSettings.RequestedStrings.sendedToPhoneMessage"></span> <span><b data-bind="html:value"></b></span>\r\n </div>\r\n <div class="help-block">\r\n <div class="pxp-alert-wrapper" data-bind="visible:isVerificationCodeError">\r\n <span class="pxp-alert pxp-alert-error" data-bind="html: currentSettings.RequestedStrings.invalidAuthCodeWarning"></span>\r\n </div>\r\n <div data-bind="component: {name: \'recaptcha\', params: {isRecaptchaPassed: isRecaptchaPassed, isVisible: isRecaptchaRequired, widgetId: recaptchaWidgetId, recaptchaSiteKey: currentSettings.RecaptchaSiteKey, recaptchaToken: dataStoreService.recaptchaToken, isYandexCaptcha:currentSettings.IsYandexCaptcha}}"></div>\r\n </div>\r\n </div>\r\n </div>\r\n </fieldset>\r\n </div>\r\n <div class="buttons">\r\n <div class="inner">\r\n <div class="ok">\r\n <button type="button" data-bind="html:currentSettings.RequestedStrings.nextLabel, enable:isValidated, click:confirmData" style="float:none"></button>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n'},6504:(e,t,i)=>{i.r(t),i.d(t,{default:()=>n});const n='<div class="modal-wrapper">\r\n <div class="container">\r\n <div class="templateConfirm">\r\n <div class="agree">\r\n <p class="agree_text" data-bind="html:requestedStrings.deleteAccountButtonNotification"></p>
1\r\n <span class="checkbox agree_checkbox">\r\n <input id="chkIsDeleteProfile" type="checkbox" data-bind="checked:userIsSure">\r\n <label for="chkIsDeleteProfile" data-bind="html:requestedStrings.accountDeletingConfirmation"></label>\r\n </span>\r\n </div>\r\n </div>\r\n <div class="buttons">\r\n <div class="inner">\r\n <div class="ok">\r\n <button type="button" data-bind="html:requestedStrings.deleteAccountButtonTitle, enable:buttonIsEnabled, click:deleteUserAccount"></button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n'},5073:(e,t,i)=>{i.r(t),i.d(t,{default:()=>n});const n='\x3c!-- ko if: showForm()--\x3e\r\n\x3c!-- ko if: isChanged() --\x3e\r\n<label data-bind="html: requestedStrings.companyExternalRegistrationTitle"></label>\r\n<input class="input_with_icon" autocomplete="off" type="text" id="companyName" data-bind="textInput: inputValue,\r\n event:{click: showHint}, hasFocus: isFocused" />\r\n<div data-bind="visible: isExternalCompanyValidation">\r\n <label data-bind="html: requestedStrings.companyRegistrationInn"></label>\r\n <input class="input_with_icon" autocomplete="off" type="text" id="companyINN" data-bind="textInput: innInputValue" />\r\n</div>\r\n<div id="user-company-hint" data-bind="visible: isVisible, css:{ \'loading-wheel\' : isLoading}">\r\n \x3c!-- ko if: companies().length >= 1 --\x3e\r\n <div data-bind="foreach:companies">\r\n \x3c!-- ko if: Status === "LIQUIDATED" --\x3e\r\n <div class="hint-list-element" style="text-decoration: line-through" data-bind="click: $parent.onChildClick">\r\n <div style="font-weight:bold" data-bind="html: Title"></div>\r\n <div data-bind="html: TitleLabel"></div>\r\n </div>\r\n \x3c!-- /ko --\x3e\r\n \x3c!-- ko ifnot: Status === "LIQUIDATED" --\x3e\r\n <div class="hint-list-element" data-bind="click: $parent.onChildClick">\r\n <div style="font-weight:bold" data-bind="html: Title"></div>\r\n <div data-bind="html: TitleLabel"></div>\r\n </div>\r\n \x3c!-- /ko --\x3e\r\n </div>\r\n \x3c!-- /ko --\x3e\r\n \x3c!-- ko if: companies().length < 1--\x3e\r\n <div class="hint-list-element">\r\n <div style="font-weight:bold" data-bind="html: companyNotFound">No result</div>\r\n </div>\r\n \x3c!-- /ko --\x3e\r\n</div>\r\n\x3c!-- /ko --\x3e\r\n\x3c!-- ko if: !isChanged() --\x3e\r\n<div class="company-wrapper">\r\n <div class="company-title-label" data-bind="html:inputValue"></div>\r\n <a class="semilink" data-bind="click: change">ÐзмениÑÑ</a>\r\n <div data-bind="html:addedValue"></div>\r\n</div>\r\n\x3c!-- /ko --\x3e\r\n<div class="create-payer-checkbox create-payer">\r\n <input class="payer-visible" type="checkbox" id="payerVisible" data-bind="checked: isPayerVisible" />\r\n <label for="payerVisible" data-bind="html: requestedStrings.companyCreatePayer"></label>\r\n</div>\r\n<div class="create-payer-data-company" data-bind="visible: isPayerVisible, with:dadataCompany">\r\n <div>\r\n <label for="payerTitle" data-bind="html: $parent.requestedStrings.companyRegistrationTitle"></label>\r\n <input class="input_with_icon" type="text" id="payerTitle" data-bind="value:Title" />\r\n </div>\r\n <div>\r\n <label for="payerINN" data-bind="html: $parent.requestedStrings.companyRegistrationInn">INN</label>\r\n <input class="input_with_icon" type="text" id="payerINN" data-bind="value:INN" />\r\n </div>\r\n <div>\r\n <label for="payerOGRN" data-bind="html: $parent.requestedStrings.companyOgrn"></label>\r\n <input class="input_with_icon" type="text" id="payerOGRN" data-bind="value:OGRN" />\r\n </div>\r\n <div>\r\n <label for="payerKPP" data-bind="html: $parent.requestedStrings.companyKpp"></label>\r\n <input class="input_with_icon" type="text" id="payerKPP" data-bind="value:KPP" />\r\n </div>\r\n <div>\r\n <label for="payerLegal" data-bind="html: $parent.requestedStrings.companyLegalAddress"></label>\r\n <input class="input_with_icon" type="text" id="payerLegal" data-bind="value:LegalAddress" />\r\n </div>\r\n</div>\r\n\x3c!-- /ko--\x3e'},588:(e,t,i)=>{i.r(t),i.d(t,{default:()=>n});const n='\x3c!-- ko foreach: customFieldsCollection --\x3e\r\n\x3c!-- ko if: !!showOnRegistration || !$parent.isRegister --\x3e\r\n<div class="field-list__item">\r\n <div class="filed-item__wrapper">\r\n \x3c!-- ko if: type == 5 && !$parent.isBeforeSubmitButton --\x3e\r\n <div class="custom-field custom-field--right">\r\n <div class="custom-field__disclaimer" style="text-align: right">
1\r\n <span class="custom-field__label-text" data-bind="html: (label || \'\'), css: { \'required\': isRequired }"></span>\r\n </div>\r\n </div>\r\n \x3c!-- /ko --\x3e\r\n \x3c!-- ko if: $parent.isBeforeSubmitButton --\x3e\r\n \x3c!-- ko if: type == 2 --\x3e\r\n <span class="checkbox custom-field__checkbox-row">\r\n <input type="checkbox" class="custom-field__checkbox-input"\r\n data-bind="attr: { id: \'chk\' + id }, disable: isReadOnly, checked: selectedValue" />\r\n <label class="custom-field__checkbox-label" data-bind="attr: { for: \'chk\' + id }">\r\n <span class="custom-field__label-text"\r\n data-bind="html: (label || \'\'), css: { \'required\': isRequired }"></span>\r\n </label>\r\n </span>\r\n \x3c!-- /ko --\x3e\r\n \x3c!-- ko if: type == 3 --\x3e\r\n <label class="filed-item__label custom-field__label custom-field__label--block">\r\n <span class="custom-field__label-text" data-bind="html: (label || \'\'), css: { \'required\': isRequired }"></span>\r\n </label>\r\n <select class="text custom-field__select"\r\n data-bind="disable: isReadOnly,\r\n css:{ required: isRequired }, options: optionList, value: selectedValue"></select>\r\n \x3c!-- /ko --\x3e\r\n \x3c!-- ko if: type == 1 --\x3e\r\n <label class="filed-item__label custom-field__label">\r\n <span class="custom-field__label-text" data-bind="html: (label || \'\'), css: { \'required\': isRequired }"></span>\r\n </label>\r\n <textarea class="filed-item__textarea text custom-field__textarea"\r\n maxlength="256"\r\n data-bind="disable: isReadOnly,css:{ required: isRequired },textInput: selectedValue"></textarea>\r\n \x3c!-- /ko --\x3e\r\n \x3c!-- ko if: type == 4 --\x3e\r\n <label class="filed-item__label custom-field__label">\r\n <span class="custom-field__label-text" data-bind="html: (label || \'\'), css: { \'required\': isRequired }"></span>\r\n </label>\r\n \x3c!-- ko component: { name: \'dateSelector\', params: { selectedDate: selectedValue } } --\x3e\r\n \x3c!-- /ko --\x3e\r\n \x3c!-- /ko --\x3e\r\n \x3c!-- ko if: type == 0 --\x3e\r\n <label class="filed-item__label custom-field__label">\r\n <span class="custom-field__label-text" data-bind="html: (label || \'\'), css: { \'required\': isRequired }"></span>\r\n </label>\r\n <div class="filed-item-wrapper__input">\r\n <input type="text"\r\n maxlength="50"\r\n class="input_with_icon text custom-field__input"\r\n data-bind="disable: isReadOnly,css:{ required: isRequired },textInput: selectedValue" />\r\n </div>\r\n \x3c!-- /ko --\x3e\r\n \x3c!-- /ko --\x3e\r\n </div>\r\n</div>\r\n\x3c!-- /ko --\x3e\r\n\x3c!-- /ko --\x3e\r\n'},8074:(e,t,i)=>{i.r(t),i.d(t,{default:()=>n});const n='<div class="auth-external-providers-wrapper" data-bind="visible:isVisible">\r\n <div class="auth-external-providers-list" data-bind="foreach:providers">\r\n <a href="javascript://void(0)" data-bind="attr: { class: itemClass}, click: $parent.open">\r\n <i data-bind="attr:{ class: iconClass}"></i>\r\n </a>\r\n </div>\r\n <div class="auth-external-providers-wrapper__break-block">\r\n <span class="break-block__elem" data-bind="text:resourceStrings.orText"></span>\r\n </div>\r\n</div>\r\n\r\n'},5730:(e,t,i)=>{i.r(t),i.d(t,{default:()=>n});const n='<div class="field-list__item">\r\n <div class="filed-item__wrapper">\r\n <style>\r\n #txtPasswordLabel:after {\r\n content: \'*\';\r\n color: #ff0000;\r\n }\r\n </style>\r\n <label class="filed-item__label" id="txtPasswordLabel" for="txtPassword" data-bind="html: localization.passwordLabel"></label>\r\n <div class="filed-item-wrapper__input">\r\n <input id="txtPassword" name="password" autocomplete="password" class="input_with_icon" data-bind="event: { blur:checkoutPasswordsEquel }, masked: password, mask: mask, valueUpdate: \'input\', attr: {type:inputType}, hasFocus:isFocus" />
1\r\n <span class="field-item-wrapper__password-unveiler" data-bind="click:showedPassword, css:{\'icon_eye_hide\' : passwordIsShown, \'icon_eye_show\' : !passwordIsShown()}, attr:{title:title}"></span>\r\n </div>\r\n </div>\r\n</div>\r\n\x3c!-- ko if : passwordConfirm --\x3e\r\n<div class="field-list__item">\r\n <div class="filed-item__wrapper">\r\n <label class="filed-item__label" for="txtPassword" data-bind="html: localization.passwordConfirmationLabel"></label>\r\n <div class="filed-item-wrapper__input">\r\n <input id="txtConfirm" name="password" autocomplete="password" class="input_with_icon" data-bind="event: {blur:checkoutPasswordsEquel}, valueUpdate: \'input\', attr: {type:inputType}, value: passwordConfirmValue" />\r\n </div>\r\n </div>\r\n <div class="field_validation" data-bind="visible:!passwordsIsEqual()">\r\n <span data-bind="html: localization.passwordsAreDifferentLabel"></span>\r\n </div>\r\n</div>\r\n\x3c!-- /ko --\x3e'},7708:(e,t,i)=>{i.r(t),i.d(t,{default:()=>n});const n='<div class="date-input" style="display: flex; margin: 0 -8px; padding-top: 5px;">\r\n <div class="date-day" style="flex: 1;">\r\n <select style="width: 100%;height: 33px;font-size: 13px;padding-left: 3px;background: #fff;border: 1px solid #bbb; border-radius: 5px;\r\n box-shadow: inset #eee 0 1px 2px;"data-bind="options: daysAvailable, value: day"></select>\r\n </div>\r\n <div class="date-month" style="flex: 1.6;">\r\n <select style="width: 100%;height: 33px;font-size: 13px;padding-left: 3px;background: #fff;border: 1px solid #bbb; border-radius: 5px;\r\n box-shadow: inset #eee 0 1px 2px;" data-bind="options: localizedMonths,optionsValue: \'monthVal\',optionsText: \'monthName\',value: month"></select>\r\n </div>\r\n\r\n <div class="date-year" style="flex: 1;">\r\n <select style="width: 100%;height: 33px;font-size: 13px;padding-left: 3px;background: #fff;border: 1px solid #bbb;\r\n border-radius: 5px; box-shadow: inset #eee 0 1px 2px;" data-bind="options: yearsAvailable, value: year"></select>\r\n </div>\r\n</div>'},6621:(e,t,i)=>{i.r(t),i.d(t,{default:()=>n});const n='<div class="recaptcha-wrapper" style="margin: 15px 0 0 0;">\r\n <div class="recaptcha-container" \r\n data-bind="attr: {id: uniqueId }, css: {\'loading-wheel\': isLoading}, visible:isVisible" \r\n style="position:relative;\r\n width: 304px; \r\n height: 100px;"></div>\r\n</div>'},9303:(e,t)=>{var i;Object.defineProperty(t,"__esModule",{value:!0}),t.AuthStatusCode=void 0,(i=t.AuthStatusCode||(t.AuthStatusCode={}))[i.LoginIsWrong=1]="LoginIsWrong",i[i.Rejected=3]="Rejected",i[i.InvalidData=4]="InvalidData",i[i.RecaptchaRequired=5]="RecaptchaRequired",i[i.Accepted=200]="Accepted",i[i.Continue=202]="Continue"},2894:(e,t)=>{var i;Object.defineProperty(t,"__esModule",{value:!0}),t.ContactApprovalStatus=void 0,(i=t.ContactApprovalStatus||(t.ContactApprovalStatus={}))[i.None=0]="None",i[i.Processing=1]="Processing",i[i.InvalidPhone=40]="InvalidPhone",i[i.Approved=255]="Approved"},2228:(e,t)=>{var i;Object.defineProperty(t,"__esModule",{value:!0}),t.InputFieldType=void 0,(i=t.InputFieldType||(t.InputFieldType={}))[i.TextBox=0]="TextBox",i[i.TextArea=1]="TextArea",i[i.Checkbox=2]="Checkbox",i[i.Select=3]="Select",i[i.Date=4]="Date",i[i.Note=5]="Note"},659:(e,t)=>{var i;Object.defineProperty(t,"__esModule",{value:!0}),t.ContentDeliveryType=void 0,(i=t.ContentDeliveryType||(t.ContentDeliveryType={}))[i.Phone=0]="Phone",i[i.Email=1]="Email"},6962:(e,t)=>{var i;Object.defineProperty(t,"__esModule",{value:!0}),t.ManagerType=void 0,(i=t.ManagerType||(t.ManagerType={}))[i.Login=0]="Login",i[i.Profile=1]="Profile",i[i.Register=2]="Register",i[i.Restore=3]="Restore",i[i.ShoppingCart=4]="ShoppingCart"},8990:(e,t)=>{var i;Object.defineProperty(t,"__esModule",{value:!0}),t.PixlparkAuthenticationType=void 0,(i=t.PixlparkAuthenticationType||(t.PixlparkAuthenticationType={}))[i.AllUsers=0]="AllUsers",i[i.OnlyIndividual=1]="OnlyIndividual",i[i.OnlyLegal=2]="OnlyLegal"},3053:(e,t)=>
1{Object.defineProperty(t,"__esModule",{value:!0}),t.AuthRequestModel=void 0;t.AuthRequestModel=function(e,t,i,n,a){this.login=e,this.securityStamp=t,this.photolabId=n,this.contentDeliveryType=i,this.recaptchaToken=a}},7661:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InitRequestModel=void 0;t.InitRequestModel=function(e,t,i,n){this.LanguageId=t,this.SignedUserId=i,this.PhotolabId=e,this.UserCompanyId=n}},7714:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RegisterRequestModel=void 0;t.RegisterRequestModel=function(e,t,i,n,a,r,s,o,l,d,c,u,p,h,v,m,g,S){this.phone=e,this.email=t,this.affiliateCode=c,this.companyId=d,this.userCustomFields=s,this.companyCustomFields=p,this.photolabId=n,this.contentDeliveryType=a,this.isRegister=r,this.isPersistLogin=i,this.isSubscriptionActive=o,this.isSystemNotificationsEnabled=g,this.company=l,this.isUserCompany=u,this.emailSecurityStamp=v,this.phoneSecurityStamp=h,this.recaptchaToken=m,this.wfolioUserId=S}},5365:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UserCustomFieldValue=void 0;t.UserCustomFieldValue=function(e,t){this.FieldId=e,this.Value=t}},9444:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.VerifyRequestModel=void 0;t.VerifyRequestModel=function(e,t,i,n,a,r,s){this.userId=e,this.login=t,this.securityStamp=i,this.password=n,this.photolabId=s,this.recaptchaToken=a,this.contentDeliveryType=r}},2599:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AuthInitResponse=void 0;var n=i(7582),a=function(e){function t(t){var i=e.call(this,t.securityStamp,t.statusCode)||this;return i.IsFastLoginEnabled=t.isFastLoginEnabled,i.IsSmsIntegrationDisabled=t.isSmsIntegrationDisabled,i.IsSmsTemplateEnabled=t.isSmsTemplateEnabled,i.IsCyrillicRequired=t.isCyrillicRequired,i.IsPasswordConfirmationEnabled=t.isPasswordConfirmationEnabled,i.IsEmailTabActive=t.isEmailTabActive,i.IsPhoneTabActive=t.isPhoneTabActive,i.IsEmailRequired=t.isEmailRequired,i.IsSubscriptionSuggesting=t.isSubscriptionSuggesting,i.IsMiddleNameEnabled=t.isMiddleNameEnabled,i.IsPhoneRequired=t.isPhoneRequired,i.IsPhoneApproval=t.isPhoneApproval,i.IsEmailApproval=t.isEmailApproval,i.IsPhoneDefaultLogin=t.isPhoneDefaultLogin,i.IsAffiliatesEnabled=t.isAffiliatesEnabled,i.IsNameRequired=t.isNameRequired,i.IsLastNameRequired=t.isLastNameRequired,i.IsAgreementRequired=t.isAgreementRequired,i.UserAgreement=t.userAgreement,i.SendingPesonalData=t.sendingPersonalData,i.PersonalDataAgreement=t.personalDataAgreement,i.NotificationAgreement=t.notificationAgreement,i.ThirdPartiesAgreement=t.thirdPartiesAgreement,i.DiscountNotificationAgreement=t.discountNotificationAgreement,i.CompanyTitle=t.companyTitle,i.ModuleAvailability=t.moduleAvailability,i.PhoneMask=t.phoneMask,i.UserCustomFields=t.userCustomFields,i.CompanyCustomFields=t.companyCustomFields,i.IsCaptchaEnabled=t.isCaptchaEnabled,i.RecaptchaSiteKey=t.recaptchaSiteKey,i.IsYandexCaptcha=t.isYandexCaptcha,i.RequestedStrings=t.requestedStrings,i.ExternalServices=t.externalServices,i.IsExternalCompanyValidationDisabled=t.isExternalCompanyValidationDisabled,i.AllowRegisterWithoutMiddleName=t.allowRegisterWithoutMiddleName,i.IsWfolioVisible=t.isWfolioVisible,i}return(0,n.__extends)(t,e),t}(i(4404).AuthResponseBase);t.AuthInitResponse=a},4404:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AuthResponseBase=void 0;t.AuthResponseBase=function(e,t){this.SecurityStamp=e,this.StatusCode=t,this.Description=""}},3487:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RegisterResponse=void 0;var n=i(7582),a=function(e){function t(t,i,n,a,r,s,o,l,d,c,u,p,h,v,m,g,S,b,f){var y=e.call(this,c,u)||this;return y.Email=i,y.Phone=n,y.FirstName=a,y.LastName=r,y.UserCustomFields=l,y.IsSubscriptionEnabled=d,y.IsSystemNotificationsEnabled=v,y.PhoneApprovalStatus=s,y.EmailApprovalStatus=o,y.UserId=t,y.MiddleName=p,y.IsAccountExists=h,y.IsUserBelongsToAnotherPhotolab=m,y.UserRegisteredPhotolabTitle=g,y.IsUserFoundByEmail=S,y.IsUserFoundByPhone=b,y.WfolioUserId=f,y}return(0,n.__extends)(t,e),t}(i(4404).AuthResponseBase);t.RegisterResponse=a},1397:(e,t,i)=>
1{Object.defineProperty(t,"__esModule",{value:!0}),t.UserCustomField=void 0;var n=i(2228),a=i(5365),r=function(){function e(e,t,i,a,r,s,o,l,d){this.toFieldValue=this.toFieldValue.bind(this),this.id=e,this.label=t,this.type=i,this.isRequired=a,this.isReadOnly=r,this.showOnRegistration=s,this.showOnPersonalAccount=o,this.predefinedValue=l,this.selectedValue=ko.observable(l),this.optionList=[],this.isDirty=!1,i==n.InputFieldType.Select&&(d?(this.optionList=d.split(","),"string"==typeof l&&this.selectedValue(l)):this.selectedValue(this.optionList[0]))}return e.prototype.toFieldValue=function(){var e;return new a.UserCustomFieldValue(this.id,null===(e=this.selectedValue())||void 0===e?void 0:e.toString())},e}();t.UserCustomField=r},9982:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AuthProcessingService=void 0;var n=i(7582),a=i(9444),r=i(7714),s=i(3053),o=i(3487),l=i(7661),d=i(2599),c=i(1397),u=i(7027),p=i(659),h=i(8990),v=i(6962),m=i(9303),g=i(2894),S=function(){function e(e){var t,i=this;this.getCode=this.getCode.bind(this),this.pingAccount=this.pingAccount.bind(this),this.verifyLogin=this.verifyLogin.bind(this),this.registerUser=this.registerUser.bind(this),this.fillPingData=this.fillPingData.bind(this),this.getRegisterResponse=this.getRegisterResponse.bind(this),this.getInitResponse=this.getInitResponse.bind(this),this.getCustomValues=this.getCustomValues.bind(this),this.approveAccount=this.approveAccount.bind(this),this.refreshPingData=this.refreshPingData.bind(this),this.getRecaptchaToken=this.getRecaptchaToken.bind(this),this.dataStoreService=e,this.isPingRequired={},this.dataStoreService.email.subscribe((function(e){e&&(i.isPingRequired[p.ContentDeliveryType.Email]=!0)})),this.dataStoreService.phone.subscribe((function(e){!e||e.indexOf("_")>=0||(i.isPingRequired[p.ContentDeliveryType.Phone]=!0)})),this.requestToken=null===(t=document.getElementsByName("__RequestVerificationToken")[0])||void 0===t?void 0:t.value,this.verifyCache={},this.initResponse=null}return e.prototype.getAuthInitData=function(){var e=this;return new Promise((function(t,i){var n,a;if(null==e.initResponse){var r="";(null===(n=u.pxpGlobal.user)||void 0===n?void 0:n.isAnonymous)||(r=null!=(null===(a=u.pxpGlobal.user)||void 0===a?void 0:a.userId)?u.pxpGlobal.user.userId.toString():"");var s=e.getCookie("userCompanyId"),o=new XMLHttpRequest;if(o.open("POST","/api/account/login/authInit"),o.setRequestHeader("Content-Type","application/json"),e.requestToken){o.setRequestHeader("Token",e.requestToken),o.onreadystatechange=function(){var n,a;if(o.readyState===XMLHttpRequest.DONE)if(o.status>199&&o.status<300){e.initResponse=e.getInitResponse(o.responseText),null===(a=null===(n=e.dataStoreService)||void 0===n?void 0:n.company())||void 0===a||a.Title(e.initResponse.CompanyTitle),e.dataStoreService.refCompanyId(s);var r=e.getCookie("affiliateCode");e.dataStoreService.affiliateCode(r),e.dataStoreService.isAffiliatePredefined(!!r),e.dataStoreService.lastStatusCode(e.initResponse.StatusCode),e.dataStoreService.isUserCompany(e.initResponse.ModuleAvailability==h.PixlparkAuthenticationType.OnlyLegal||null!=e.initResponse.CompanyTitle),e.dataStoreService.userCustomFields(e.initResponse.UserCustomFields),e.dataStoreService.companyCustomFields(e.initResponse.CompanyCustomFields),e.dataStoreService.isEmailApproval(e.initResponse.IsEmailApproval),t(e.initResponse)}else i(Error(o.statusText))};var d=new l.InitRequestModel(e.dataStoreService.photolabId,e.dataStoreService.languageId,r,s);o.send(JSON.stringify(d))}else i(Error("anti forgery token not found"))}else t(e.initResponse)}))},e.prototype.checkDeliveryState=function(e,t){return(0,n.__awaiter)(this,void 0,Promise,(function(){return(0,n.__generator)(this,(function(i){switch(i.label){case 0:return[4,fetch("/api/account/login/deliveryState",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({MessageId:e,DeliveryType:t})})];case 1:return[4,i.sent().json()];case 2:return[2,i.sent()]}}))}))},e.prototype.getTelegramBotName=function(e){return(0,n.__awaiter)(this,void 0,Promise,(function(){var t,i,a;return(0,n.__generator)(this,(function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),[4,fetch("/api/telegram/"+e+"/botName",{headers:{"Content-Type":"application/json"}})];case 1:return[4,(t=n.sent()).json()];case 2:return i=n.sent(),200!==t.status?[2,null]:[2,i];case 3:return a=n.sent(),console.log(a),[2,null];case 4:return[2]}}
1))}))},e.prototype.getMaxBotName=function(e){return(0,n.__awaiter)(this,void 0,Promise,(function(){var t,i,a;return(0,n.__generator)(this,(function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),[4,fetch("/api/max/"+e+"/botName",{headers:{"Content-Type":"application/json"}})];case 1:return[4,(t=n.sent()).json()];case 2:return i=n.sent(),200!==t.status?[2,null]:[2,i];case 3:return a=n.sent(),console.log(a),[2,null];case 4:return[2]}}))}))},e.prototype.fillPingData=function(e,t){this.dataStoreService.lastStatusCode(t.StatusCode),this.dataStoreService.isEmailRequired(t.IsEmailRequired),this.dataStoreService.isPhoneRequired(t.IsPhoneRequired),this.dataStoreService.isNameRequired(t.IsNameRequired),e==p.ContentDeliveryType.Email?(this.dataStoreService.isEmailExists(t.IsAccountExists),this.dataStoreService.emailApprovalStatus(t.EmailApprovalStatus),this.dataStoreService.emailSecurityStamp=t.SecurityStamp):(this.dataStoreService.isPhoneExists(t.IsAccountExists),this.dataStoreService.phoneApprovalStatus(t.PhoneApprovalStatus),this.dataStoreService.phoneSecurityStamp=t.SecurityStamp)},e.prototype.pingAccount=function(e,t){var i=this;return new Promise((function(n,a){if((void 0===i.isPingRequired[t]||i.isPingRequired[t])&&e){var r=t==p.ContentDeliveryType.Email?i.dataStoreService.emailSecurityStamp:i.dataStoreService.phoneSecurityStamp,s=new XMLHttpRequest;s.open("GET","/api/account/login/ping?photolabId="+i.dataStoreService.photolabId+"&input="+encodeURIComponent(e)+"&loginType="+t+"&stamp="+encodeURIComponent(r)),s.setRequestHeader("Content-Type","application/json"),i.requestToken?(s.setRequestHeader("Token",i.requestToken),s.onreadystatechange=function(){if(s.readyState===XMLHttpRequest.DONE)if(s.status>199&&s.status<300){var e=JSON.parse(s.responseText);i.fillPingData(t,e),n(e)}else a(JSON.parse(s.responseText))},s.send()):a(Error("anti forgery token not found"))}else a("login is empty")}))},e.prototype.getCode=function(e,t,i,n){var a=this;return void 0===n&&(n=!1),new Promise((function(r,o){a.refreshPingData(e,t).then((function(l){if(l.IsAccountExists||n)if(l.IsAccountExists&&n)o("exists");else{var d=new XMLHttpRequest;if(d.open("POST","/api/account/login/getCode"),d.setRequestHeader("Content-Type","application/json"),a.requestToken){d.setRequestHeader("Token",a.requestToken),d.onreadystatechange=function(){if(d.readyState===XMLHttpRequest.DONE)if(d.status>199&&d.status<300){var e=JSON.parse(d.responseText);a.dataStoreService.lastStatusCode(e.StatusCode),t==p.ContentDeliveryType.Phone?a.dataStoreService.phoneSecurityStamp=e.SecurityStamp:a.dataStoreService.emailSecurityStamp=e.SecurityStamp,r(e)}else o(JSON.parse(d.responseText))};var c=t==p.ContentDeliveryType.Phone?a.dataStoreService.phoneSecurityStamp:a.dataStoreService.emailSecurityStamp,u=new s.AuthRequestModel(e,c,t,a.dataStoreService.photolabId,a.getRecaptchaToken(i));d.send(JSON.stringify(u))}else o(Error("anti forgery token not found"))}else o("not_exists")}),(function(e){console.log("Internal error "+e)}))}))},e.prototype.proceedVerificationResponse=function(e,t){return this.dataStoreService.lastStatusCode(t.StatusCode),e==p.ContentDeliveryType.Phone?this.dataStoreService.phoneSecurityStamp=t.SecurityStamp:this.dataStoreService.emailSecurityStamp=t.SecurityStamp,t},e.prototype.verifyLogin=function(e,t,i,n){var r=this;return new Promise((function(s,o){var l="l"+e+"w"+t+"v"+i+"d"+n;if(r.verifyCache[l])s(r.proceedVerificationResponse(n,r.verifyCache[l]));else{var d=new XMLHttpRequest;if(d.open("POST","/api/account/login/verifyLogin"),d.setRequestHeader("Content-Type","application/json"),r.requestToken){d.setRequestHeader("Token",r.requestToken),d.onreadystatechange=function(){if(d.readyState===XMLHttpRequest.DONE)if(d.status>199&&d.status<300){var e=JSON.parse(d.responseText);r.verifyCache[l]=e,s(r.proceedVerificationResponse(n,e)),s(e)}else o(JSON.parse(d.responseText))};var c=n==p.ContentDeliveryType.Phone?r.dataStoreService.phoneSecurityStamp:r.dataStoreService.emailSecurityStamp,u=new a.VerifyRequestModel(r.dataStoreService.userId,e,c,i,r.getRecaptchaToken(t),n,r.dataStoreService.ph
1otolabId);d.send(JSON.stringify(u))}else o(Error("anti forgery token not found"))}}))},e.prototype.updateAccount=function(e){var t=this;return new Promise((function(i,n){var a=new XMLHttpRequest;if(a.open("POST","/api/account/login/updateAccount"),a.setRequestHeader("Content-Type","application/json"),t.requestToken){a.setRequestHeader("Token",t.requestToken),a.onreadystatechange=function(){if(a.readyState===XMLHttpRequest.DONE)if(a.status>199&&a.status<300){var e=t.getRegisterResponse(a.responseText);t.dataStoreService.lastStatusCode(e.StatusCode),i(e)}else n(JSON.parse(a.responseText))};var s=t.dataStoreService.wfolioUserId(),o=null==s||s.length<1?null:+s,l=new r.RegisterRequestModel(t.dataStoreService.phone(),t.dataStoreService.email(),t.dataStoreService.isPersistLogin(),t.dataStoreService.photolabId,p.ContentDeliveryType.Email,t.dataStoreService.requestedManager()==v.ManagerType.Register,t.getCustomValues(t.dataStoreService.userCustomFields()),t.dataStoreService.isSubscriptionActive(),t.dataStoreService.company(),t.dataStoreService.refCompanyId(),t.dataStoreService.affiliateCode(),t.dataStoreService.isUserCompany(),t.getCustomValues(t.dataStoreService.companyCustomFields()),t.dataStoreService.phoneSecurityStamp,t.dataStoreService.emailSecurityStamp,t.getRecaptchaToken(e),t.dataStoreService.isSystemNotificationsEnabled(),o);l.firstName=t.dataStoreService.firstName(),l.lastName=t.dataStoreService.lastName(),l.middleName=t.dataStoreService.middleName(),a.send(ko.toJSON(l))}else n(Error("anti forgery token not found"))}))},e.prototype.deleteAccount=function(){return new Promise((function(e,t){var i,n=new XMLHttpRequest,a=null===(i=u.pxpGlobal.frontend)||void 0===i?void 0:i.frontendId;n.open("POST","/api/account/deleteAccount?photolabId="+a,!0),n.setRequestHeader("Content-type","application/json; charset=utf-8"),n.onreadystatechange=function(){n.status>199&&n.status<300?e():403==n.status&&t(JSON.parse(n.response))},n.send()}))},e.prototype.getRestoreUrl=function(e,t,i,n){var r=this;return new Promise((function(s,o){var l=new XMLHttpRequest;if(l.open("POST","/api/account/login/restorepassword"),l.setRequestHeader("Content-Type","application/json"),r.requestToken){l.setRequestHeader("Token",r.requestToken),l.onreadystatechange=function(){if(l.readyState===XMLHttpRequest.DONE)if(l.status>199&&l.status<300){var e=JSON.parse(l.responseText);r.dataStoreService.lastStatusCode(e.StatusCode),n==p.ContentDeliveryType.Phone?r.dataStoreService.phoneSecurityStamp=e.SecurityStamp:r.dataStoreService.emailSecurityStamp=e.SecurityStamp,s(e)}else o(JSON.parse(l.responseText))};var d=n==p.ContentDeliveryType.Phone?r.dataStoreService.phoneSecurityStamp:r.dataStoreService.emailSecurityStamp,c=new a.VerifyRequestModel(r.dataStoreService.userId,e,d,i,r.getRecaptchaToken(t),n,r.dataStoreService.photolabId);l.send(JSON.stringify(c))}else o(Error("anti forgery token not found"))}))},e.prototype.registerUser=function(e){var t=this;return new Promise((function(i,n){var a=new XMLHttpRequest;if(a.open("POST","/api/account/login/registerUser"),a.setRequestHeader("Content-Type","application/json"),t.requestToken){a.setRequestHeader("Token",t.requestToken),a.onreadystatechange=function(){if(a.readyState===XMLHttpRequest.DONE)if(a.status>199&&a.status<300){var e=t.getRegisterResponse(a.responseText);if(t.dataStoreService.requestedManager()==v.ManagerType.Register&&e.IsUserBelongsToAnotherPhotolab){var r={key:"belongs",title:e.UserRegisteredPhotolabTitle,foundByEmail:e.IsUserFoundByEmail,foundByPhone:e.IsUserFoundByPhone};return void n(r)}if(t.dataStoreService.requestedManager()==v.ManagerType.Register&&e.IsAccountExists)return void n(r={key:"exists"});t.dataStoreService.lastStatusCode(e.StatusCode),t.dataStoreService.loginMode()==p.ContentDeliveryType.Phone?t.dataStoreService.phoneSecurityStamp=e.SecurityStamp:t.dataStoreService.emailSecurityStamp=e.SecurityStamp,e.StatusCode>=200&&(t.dataStoreService.userId=e.UserId,t.dataStoreService.phone(e.Phone),t.dataStoreService.email(e.Email),t.dataStoreService.firstName(e.FirstName),t.dataStoreService.lastName(e.LastName),t.dataStoreService.middleName(e.MiddleName),t.dataStoreService.ph
1oneApprovalStatus(e.PhoneApprovalStatus),t.dataStoreService.emailApprovalStatus(e.EmailApprovalStatus)),i(e)}else n(JSON.parse(a.responseText))};var s=t.dataStoreService.phone().replace(/[+\s()\-_]/g,""),o=t.dataStoreService.email();t.dataStoreService.requestedManager()==v.ManagerType.Login&&(t.dataStoreService.loginMode()==p.ContentDeliveryType.Phone?o="":s="");var l=new r.RegisterRequestModel(s,o,t.dataStoreService.isPersistLogin(),t.dataStoreService.photolabId,t.dataStoreService.loginMode(),t.dataStoreService.requestedManager()==v.ManagerType.Register,t.getCustomValues(t.dataStoreService.userCustomFields()),t.dataStoreService.isSubscriptionActive(),t.dataStoreService.company(),t.dataStoreService.refCompanyId(),t.dataStoreService.affiliateCode(),t.dataStoreService.isUserCompany(),t.getCustomValues(t.dataStoreService.companyCustomFields()),t.dataStoreService.phoneSecurityStamp,t.dataStoreService.emailSecurityStamp,t.getRecaptchaToken(e),t.dataStoreService.isSystemNotificationsEnabled(),null);l.firstName=t.dataStoreService.firstName(),l.lastName=t.dataStoreService.lastName(),l.middleName=t.dataStoreService.middleName(),l.password=t.dataStoreService.password(),console.log(l),a.send(ko.toJSON(l))}else n(Error("anti forgery token not found"))}))},e.prototype.getLoggedInUserData=function(){var e=this;return new Promise((function(t,i){var n=new XMLHttpRequest;n.open("POST","/api/account/login/getloggedinuserdata?photolabId="+e.dataStoreService.photolabId),n.setRequestHeader("Content-Type","application/json"),e.requestToken?(n.setRequestHeader("Token",e.requestToken),n.onreadystatechange=function(){var a,r;if(n.readyState===XMLHttpRequest.DONE)if(n.status>199&&n.status<300){var s=e.getRegisterResponse(n.responseText);e.dataStoreService.lastStatusCode(s.StatusCode),e.dataStoreService.phone(s.Phone),e.dataStoreService.email(s.Email),e.dataStoreService.firstName(s.FirstName),e.dataStoreService.lastName(s.LastName),e.dataStoreService.middleName(s.MiddleName),e.dataStoreService.isSubscriptionActive(s.IsSubscriptionEnabled),e.dataStoreService.isSystemNotificationsEnabled(s.IsSystemNotificationsEnabled),e.dataStoreService.phoneApprovalStatus(s.PhoneApprovalStatus),e.dataStoreService.emailApprovalStatus(s.EmailApprovalStatus),e.dataStoreService.wfolioUserId(null!==(r=null===(a=s.WfolioUserId)||void 0===a?void 0:a.toString())&&void 0!==r?r:""),s.Email&&e.dataStoreService.isEmailExists(!0),s.Phone&&e.dataStoreService.isPhoneExists(!0),t(s)}else i(JSON.parse(n.responseText))},n.send()):i(Error("anti forgery token not found"))}))},e.prototype.getCustomValues=function(e){return e.map((function(e){return e.toFieldValue()}))},e.prototype.getRegisterResponse=function(e){if(!e)return new o.RegisterResponse(0,"","","","",g.ContactApprovalStatus.None,g.ContactApprovalStatus.None,[],!1,"",m.AuthStatusCode.Rejected,"",!1,!1,!1,"",!1,!1,null);var t=JSON.parse(e);if(t.CustomFields)for(var i=0;i<t.CustomFields.length;i++)for(var n=t.CustomFields[i].FieldId,a=this.dataStoreService.userCustomFields().length,r=0;r<a;r++)if(this.dataStoreService.userCustomFields()[r].id==n){var s=2==this.dataStoreService.userCustomFields()[r].type?"true"==t.CustomFields[i].Value:t.CustomFields[i].Value;this.dataStoreService.userCustomFields()[r].selectedValue(s)}return new o.RegisterResponse(t.UserId,t.Email,t.Phone,t.FirstName,t.LastName,t.PhoneApprovalStatus,t.EmailApprovalStatus,this.dataStoreService.userCustomFields(),t.IsSubscriptionEnabled,t.SecurityStamp,t.StatusCode,t.MiddleName,t.IsAccountExists,t.IsSystemNotificationsEnabled,t.IsUserBelongsToAnotherPhotolab,t.UserRegisteredPhotolabTitle,t.IsUserFoundByEmail,t.IsUserFoundByPhone,t.WfolioUserId)},e.prototype.getInitResponse=function(e){var t,i;if(!e)return new d.AuthInitResponse({securityStamp:"",statusCode:m.AuthStatusCode.Rejected,isFastLoginEnabled:!1,isSmsIntegrationDisabled:!0,isSmsTemplateEnabled:!1,isCyrillicRequired:!1,isPasswordConfirmationEnabled:!1,isEmailTabActive:!1,isPhoneTabActive:!1,isEmailRequired:!1,isSubscriptionSuggesting:!1,isMiddleNameEnabled:!1,isPhoneRequired:!1,isPhoneApproval:!1,isEmailApproval:!1,isPhoneDefaultLogin:!1,isAffiliatesEnabled:!1,isNameRequired:!1,isLastNameRequired:!1,userAgreement:"",sendingPersonalData:"",personalDataAgreement:"",notificationAgreement:"",thirdPartiesAgreement:"",discountNotificationAgreement:"",isAgreementRequired:!1,companyTitle:"",moduleAvailability:h.PixlparkAuthenticationType.AllUsers,phoneMask:"",userCustomFields:[],companyCustomFields:[],isCaptchaEnabled:!1,recaptchaSiteKey:"",requestedStrings:{},externalServices:[],isExternalCompanyValidationDisabled:!1,allowRegisterWithoutMiddleName:!0,isWfolioVisible:!1,isYandexCaptcha:!1});var n=JSON.parse(e),a=[];if(n.UserCustomFields)for(var r=0;r<n.UserCustomFields.length;r++){var s=2==n.UserCustomFields[r].Type?"true"==n.UserCustomFields[r].Value:n.UserCustomFields[r].Value;a.push(new c.UserCustomField(n.UserCustomFields[r].Id,n.UserCustomFields[r].Label,n.UserCustomFields[r].Type,n.UserCustomFields[r].IsRequired,n.UserCustomFields[r].IsReadOnly,n.UserCustomFields[r].ShowOnRegistration,n.UserCustomFields[r].ShowOnPersonalAccount,s,n.UserCustomFields[r].PossibleValues))}var o=[];if(n.CompanyCustomFields)for(r=0;r<n.CompanyCustomFields.length;r++)s=2==n.CompanyCustomFields[r].Type?"true"==n.CompanyCustomFields[r].Value:n.CompanyCustomFields[r].Value,o.push(new c.UserCustomField(n.CompanyCustomFields[r].Id,n.CompanyCustomFields[r].Label,n.CompanyCustomFields[r].Type,n.CompanyCustomFields[r].IsRequired,n.CompanyCustomFields[r].IsReadOnly,n.CompanyCustomFields[r].ShowOnRegistration,n.CompanyCustomFields[r].ShowOnPersonalAccount,s,null!==(i=null===(t=n.CompanyCustomFields[r])||void 0===t?void 0:t.PossibleValues)&&void 0!==i?i:null));return new d.AuthInitResponse({securityStamp:n.SecurityStamp,statusCode:n.StatusCode,isFastLoginEnabled:n.IsFastLoginEnabled,isSmsIntegrationDisabled:n.IsSmsIntegrationDisabled,isSmsTemplateEnabled:n.IsSmsTemplateEnabled,isCyrillicRequired:n.IsCyrillicRequired,isPasswordConfirmationEnabled:n.IsPasswordConfirmationEnabled,isEmailTabActive:n.IsEmailTabActive,isPhoneTabActive:n.IsPhoneTabActive,isEmailRequired:n.IsEmailRequired,isSubscriptionSuggesting:n.IsSubscriptionSuggesting,isMiddleNameEnabled:n.IsMiddleNameEnabled,isPhoneRequired:n.IsPhoneRequired,isPhoneApproval:n.IsPhoneApproval,isEmailApproval:n.IsEmailApproval,isPhoneDefaultLogin:n.IsPhoneDefaultLogin,isAffiliatesEnabled:n.IsAffiliatesEnabled,isNameRequired:n.IsNameRequired,isLastNameRequired:n.IsLastNameRequired,userAgreement:n.UserAgreement,sendingPersonalData:n.SendingPesonalData,personalDataAgreement:n.PersonalDataAgreement,notificationAgreement:n.NotificationAgreement,thirdPartiesAgreement:n.ThirdPartiesAgreement,discountNotificationAgreement:n.DiscountNotificationAgreement,isAgreementRequired:n.IsAgreementRequired,companyTitle:n.CompanyTitle,moduleAvailability:n.ModuleAvailability,phoneMask:n.PhoneMask,userCustomFields:a,companyCustomFields:o,isCaptchaEnabled:n.IsCaptchaEnabled,recaptchaSiteKey:n.RecaptchaSiteKey,isYandexCaptcha:n.IsYandexCaptcha,requestedStrings:n.RequestedStrings,externalServices:n.ExternalServices,isExternalCompanyValidationDisabled:n.IsExternalCompanyValidationDisabled,allowRegisterWithoutMiddleName:n.AllowRegisterWithoutMiddleName,isWfolioVisible:n.IsWfolioVisible})},e.prototype.approveAccount=function(e,t,i,n){var r=this;return new Promise((function(s,o){var l=new XMLHttpRequest;if(l.open("POST","/api/account/login/approveAccount"),l.setRequestHeader("Content-Type","application/json"),r.requestToken){l.setRequestHeader("Token",r.requestToken),l.onreadystatechange=function(){if(l.readyState===XMLHttpRequest.DONE)if(l.status>199&&l.status<300){var e=JSON.parse(l.responseText);r.dataStoreService.lastStatusCode(e.StatusCode),n==p.ContentDeliveryType.Phone?(e.StatusCode==m.AuthStatusCode.Accepted&&r.dataStoreService.ph
1oneApprovalStatus(g.ContactApprovalStatus.Approved),r.dataStoreService.phoneSecurityStamp=e.SecurityStamp):(e.StatusCode==m.AuthStatusCode.Accepted&&r.dataStoreService.emailApprovalStatus(g.ContactApprovalStatus.Approved),r.dataStoreService.emailSecurityStamp=e.SecurityStamp),s(e)}else o(JSON.parse(l.responseText))};var d=n==p.ContentDeliveryType.Phone?r.dataStoreService.phoneSecurityStamp:r.dataStoreService.emailSecurityStamp,c=new a.VerifyRequestModel(r.dataStoreService.userId,e,d,t,r.getRecaptchaToken(i),n,r.dataStoreService.photolabId);l.send(JSON.stringify(c))}else o(Error("anti forgery token not found"))}))},e.prototype.refreshPingData=function(e,t){var i=this,n=this.pingAccount(e,t);return n.then((function(e){console.log(e),e.StatusCode!=m.AuthStatusCode.Accepted&&(console.log(e),i.dataStoreService.isFailed(!0))}),(function(e){})),n},e.prototype.getCookie=function(e){var t=document.cookie.match(new RegExp("(?:^|; )"+e.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,"\\$1")+"=([^;]*)"));return t?decodeURIComponent(t[1]):""},e.prototype.getRecaptchaToken=function(e){var t="";return window.grecaptcha&&(e||"0"==e)&&(t=window.grecaptcha.getResponse(e),window.grecaptcha.reset(e)),t},e}();t.AuthProcessingService=S},6598:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DataStoreService=void 0;var n=i(7027),a=i(2894),r=i(659),s=function(){function e(e){var t,i,s,o,l,d,c=this;if(this.markPhoneDirty=function(){return c.phoneDirty(!0)},this.touchPhone=function(){return c.phoneTouched(!0)},this.resetPhoneFlags=function(){c.phoneDirty(!1),c.phoneTouched(!1)},this.photolabId=null!==(i=null===(t=null===n.pxpGlobal||void 0===n.pxpGlobal?void 0:n.pxpGlobal.frontend)||void 0===t?void 0:t.frontendId)&&void 0!==i?i:0,this.languageId=null!==(o=null===(s=null===n.pxpGlobal||void 0===n.pxpGlobal?void 0:n.pxpGlobal.frontend)||void 0===s?void 0:s.languageId)&&void 0!==o?o:0,0===this.photolabId||0===this.languageId)throw new Error("pxp photolab is null");this.emailSecurityStamp="",this.phoneSecurityStamp="",this.isAnonymous=null==(null===n.pxpGlobal||void 0===n.pxpGlobal?void 0:n.pxpGlobal.user)||n.pxpGlobal.user.isAnonymous||!n.pxpGlobal.user.userId,this.userId=this.isAnonymous?0:null!==(d=null===(l=null===n.pxpGlobal||void 0===n.pxpGlobal?void 0:n.pxpGlobal.user)||void 0===l?void 0:l.userId)&&void 0!==d?d:0,this.requestedManager=ko.observable(e),this.loginMode=ko.observable(r.ContentDeliveryType.Email),this.phone=ko.observable(""),this.phoneRule=ko.observable(null),this.phoneTouched=ko.observable(!1),this.phoneDirty=ko.observable(!1),this.email=ko.observable(""),this.wfolioUserId=ko.observable(""),this.firstName=ko.observable(""),this.lastName=ko.observable(""),this.agreement=ko.observable(""),this.middleName=ko.observable(""),this.password=ko.observable(""),this.isAffiliatePredefined=ko.observable(!1),this.affiliateCode=ko.observable(""),this.refCompanyId=ko.observable(""),this.isNameRequired=ko.observable(!1),this.isEmailRequired=ko.observable(!1),this.isPhoneRequired=ko.observable(!1),this.isPhoneExists=ko.observable(!1),this.isEmailExists=ko.observable(!1),this.isPersistLogin=ko.observable(!1),this.isEmailApproval=ko.observable(!1),this.phoneApprovalStatus=ko.observable(a.ContactApprovalStatus.None),this.emailApprovalStatus=ko.observable(a.ContactApprovalStatus.None),this.userCustomFields=ko.observableArray(),this.companyCustomFields=ko.observableArray(),this.company=ko.observable(),this.isUserCompany=ko.observable(!1),this.isSubscriptionActive=ko.observable(!0),this.isSystemNotificationsEnabled=ko.observable(!0),this.lastStatusCode=ko.observable(),this.isFailed=ko.observable(!1),this.isSucceed=ko.observable(!1),this.currentLogin=ko.pureComputed(this._currentLoginComp,this),this.customFieldsSet=ko.pureComputed(this._customFieldsSetComp,this)}return e.prototype._customFieldsSetComp=function(){return this.isUserCompany()?this.companyCustomFields():this.userCustomFields()},e.prototype._currentLoginComp=function(){switch(this.loginMode()){case r.ContentDeliveryType.Phone:return this.phone();case r.ContentDeliveryType.Email:return this.email()}return""},e}();t.DataStoreService=s},8908:(e,t,i)=>
1{Object.defineProperty(t,"__esModule",{value:!0}),t.LoginManager=void 0;var n=i(7582),a=i(2304),r=i(8974),s=function(e){function t(t,i,n,a){return e.call(this,t,n,a,[new r.LoginStageModel(i,t,n,a)])||this}return(0,n.__extends)(t,e),t.prototype.subscribeModelEvents=function(e){var t=this;return e.isSucceed.subscribe((function(e){e&&t.dataStoreService.isSucceed(!0)})),e},t}(a.StageManagerBase);t.LoginManager=s},6572:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ProfileManager=void 0;var n=i(7582),a=i(2304),r=i(3578),s=function(e){function t(t,i,n,a){return e.call(this,t,n,a,[new r.ProfileStageModel(i,t,n,a)])||this}return(0,n.__extends)(t,e),t.prototype.subscribeModelEvents=function(e){var t=this;return e.isSucceed.subscribe((function(e){e&&t.dataStoreService.isSucceed(!0)})),e},t}(a.StageManagerBase);t.ProfileManager=s},7768:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RegisterManager=void 0;var n=i(7582),a=i(2304),r=i(6373),s=function(e){function t(t,i,n,a){return e.call(this,t,n,a,[new r.RegisterStageModel(i,t,n,a)])||this}return(0,n.__extends)(t,e),t.prototype.subscribeModelEvents=function(e){var t=this;return e.isSucceed.subscribe((function(e){t.dataStoreService.isSucceed(!0)})),e},t}(a.StageManagerBase);t.RegisterManager=s},6670:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RestoreManager=void 0;var n=i(7582),a=i(2304),r=i(3811),s=function(e){function t(t,i,n,a){return e.call(this,t,n,a,[new r.PasswordChangeRequestStageModel(i,t,n,a)])||this}return(0,n.__extends)(t,e),t.prototype.subscribeModelEvents=function(e){return e.isSucceed.subscribe((function(e){})),e},t}(a.StageManagerBase);t.RestoreManager=s},8716:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ShoppingCartManager=void 0;var n=i(7582),a=i(2304),r=i(4689),s=function(e){function t(t,i,n,a){return e.call(this,t,n,a,[new r.ShoppingStageModel(i,t,n,a)])||this}return(0,n.__extends)(t,e),t.prototype.subscribeModelEvents=function(e){var t=this;return e.isSucceed.subscribe((function(e){e&&t.dataStoreService.isSucceed(!0)})),e},t}(a.StageManagerBase);t.ShoppingCartManager=s},2304:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StageManagerBase=void 0;var n=i(8104),a=function(){function e(e,t,i,a){var r=this;this.subscribeModelEvents=this.subscribeModelEvents.bind(this),this.switchCurrentStage=this.switchCurrentStage.bind(this),this.dataStoreService=e,this.currentSettings=t,this.container=i,this.currentStageNumber=n.observable(0),this.stages=[];for(var s=0;s<a.length;s++)this.stages.push(this.subscribeModelEvents(a[s]));this.currentStage=n.observable(this.stages[0]),this.currentStageNumber.subscribe((function(e){r.currentStage(r.stages[e])})),this.isStageChanging=!1}return e.prototype.switchCurrentStage=function(e){this.isStageChanging||e==this.currentStageNumber()||e<0||e>this.stages.length-1||(this.isStageChanging=!0,0===e&&(this.dataStoreService.emailSecurityStamp="",this.dataStoreService.phoneSecurityStamp=""),this.stages[e].resetStage(),this.currentStageNumber(e),this.isStageChanging=!1,this.currentStage().confirm())},e}();t.StageManagerBase=a},80:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ApprovalStageModelBase=void 0;var n=i(7582),a=i(8104),r=i(960),s=i(7253),o=i(2894),l=i(9303),d=function(e){function t(t,i,n,l,d,c){var u=e.call(this,t,i,n,l,d,c)||this;return u.proceedNext=u.proceedNext.bind(u),u.confirm=u.confirm.bind(u),u.skipStage=u.skipStage.bind(u),u.show=u.show.bind(u),u.email=a.observable(u.dataStoreService.email()),u.phone=a.observable(u.dataStoreService.phone()),u.isNameRequired=a.observable(!1),u.isEmailRequired=a.observable(u.currentSettings.IsEmailRequired&&!u.dataStoreService.email()),u.isPhoneRequired=a.observable(u.currentSettings.IsPhoneRequired&&!u.dataStoreService.phone()),u.isWaitingForTimerReset=a.observable(!1),u.emailCode=a.observable(""),u.phoneCode=a.observable(""),u.isLoading=a.observable(!0),u.emailExpression=new r.ApprovalExpression(u.dataStoreService.emailApprovalStatus,u.dataStoreService.isEmailExists,u.currentSettings.IsEmailApproval,!0,d),u.phone
1Expression=new r.ApprovalExpression(u.dataStoreService.phoneApprovalStatus,u.dataStoreService.isPhoneExists,u.currentSettings.IsPhoneApproval,!u.currentSettings.IsSmsIntegrationDisabled,d),u.timerTwo=new s.pxpTimer,u.isPhoneApprovalAvailable=a.observable(u.phoneExpression.isApprovalAvailable()),u.email.subscribe((function(e){u.emailExpression.isLoginChanged(e!==u.dataStoreService.email()),u.emailExpression.isAlwaysShown&&(u.emailExpression.isLoginChanged()?u.emailExpression.isAccountExists(!1):u.emailExpression.isAccountExists(!0)),u.isAccountConflictState(!1)})),u.phone.subscribe((function(e){var t=/[^\d]+/g,i=e?e.replace(t,""):e,n=u.dataStoreService.phone(),a=n?n.replace(t,""):n;u.phoneExpression.isLoginChanged(i!==a),u.phoneExpression.isAlwaysShown&&(u.phoneExpression.isLoginChanged()?(u.phoneExpression.isAccountExists(!1),u.phoneExpression.currentApprovalStatus(o.ContactApprovalStatus.None)):u.phoneExpression.isAccountExists(!0)),u.isAccountConflictState(!1),u.isPhoneApprovalAvailable(!0)})),u.dataStoreService.userCustomFields().forEach((function(e){var t=e.selectedValue.subscribe((function(){e.isDirty=!0,t.dispose()}))})),u.isValidated=a.computed((function(){return!(u.isNameRequired()&&(!u.dataStoreService.firstName()||!u.dataStoreService.lastName())||u.isPhoneRequired()&&!u.phone()||u.isEmailRequired()&&!u.email()||u.phoneExpression.expressionResult()&&(u.currentSettings.IsPhoneApproval||u.phoneExpression.isLoginChanged()&&u.dataStoreService.isPhoneExists())&&(!(u.phoneCode().indexOf("_")<0)||!u.phoneCode())||u.emailExpression.expressionResult()&&(u.currentSettings.IsEmailApproval||u.emailExpression.isLoginChanged()&&u.dataStoreService.isEmailExists())&&(!(u.emailCode().indexOf("_")<0)||!u.emailCode()))})),u.dataStoreService.userId>0?u.authProcessingService.getLoggedInUserData().then((function(e){u.isLoading(!1),e.StatusCode<200?console.log("processing error "+e.StatusCode+": msg "+e.Description):(u.email(u.dataStoreService.email()),u.emailExpression.isLoginChanged(!1),u.phone(u.dataStoreService.phone()),u.phoneExpression.isLoginChanged(!1),u.isEmailRequired(u.currentSettings.IsEmailRequired&&!u.dataStoreService.email()),u.isPhoneRequired(u.currentSettings.IsPhoneRequired&&!u.dataStoreService.phone()),u.isNameRequired(u.currentSettings.IsNameRequired&&(!u.dataStoreService.firstName()||!u.dataStoreService.lastName())))}),(function(e){console.log(e)})):u.isLoading(!1),u}return(0,n.__extends)(t,e),t.prototype.proceedNext=function(){var e=this;this.dataStoreService.phone(this.phone()),this.dataStoreService.email(this.email()),this.authProcessingService.updateAccount(this.recaptchaWidgetId()).then((function(t){if(e.isLoading(!1),t.StatusCode<200)return console.log("processing error "+t.StatusCode+": msg "+t.Description),void(t.StatusCode===l.AuthStatusCode.InvalidData||void 0!==e.currentSettings&&e.dataStoreService.isFailed(!0));e.isSucceed(!0)}),(function(t){console.log(t),e.isLoading(!1),e.dataStoreService.isFailed(!0)}))},t.prototype.skipStage=function(){this.dataStoreService.isSucceed(!0)},t.prototype.confirm=function(){},t.prototype.show=function(){if(!(this.isNameRequired()||this.isEmailRequired()||this.isPhoneRequired()||this.emailExpression.expressionResult()||this.phoneExpression.expressionResult()))return this.isLoading(!0),void this.proceedNext();this.isLoading(!1),this.isEmailRequired()||this.emailExpression.expressionResult()||"function"==typeof this.dataStoreService.email.valueHasMutated&&this.dataStoreService.email.valueHasMutated(),this.isPhoneRequired()||this.phoneExpression.expressionResult()||"function"==typeof this.dataStoreService.phone.valueHasMutated&&this.dataStoreService.phone.valueHasMutated()},t.prototype.resetStage=function(){this.isSucceed(!1),this.isReturned(!1)},t}(s.BaseStageModel);t.ApprovalStageModelBase=d},7253:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.pxpTimer=t.BaseStageModel=void 0;var n=i(9303),a=i(6962),r=function(){function e(e,t,i,r,o,l){var d=this;this.returnBack=this.returnBack.bind(this),null==document.getElementById(o)&&r.appendChild(document.createRange().createContextualFragment(l)),this.currentSettings=i,this.templateTitle=o,this.authProcessingService=e,this.dataStoreService=t,this.isRecaptchaPassed=ko.observable(!1),this.recaptchaWidgetId=ko.observable(""),this.isLoading=ko.observable(!1),this.isSucceed=ko.observable(!1),this.isReturned=ko.observable(!1),this.isAccountConflictState=ko.observable(!1),this.isRecaptchaRequired=ko.computed((function(){var e=d.dataStoreService.lastStatusCode(),t=d.dataStoreService.requestedManager(),i=d.currentSettings.IsCaptchaEnabled&&(e==n.AuthStatusCode.RecaptchaRequired||t==a.ManagerType.Register);return i&&d.isRecaptchaPassed(!1),i})),this.isPhoneConflictState=ko.pureComputed((function(){return d.isAccountConflictState()}),this),this.isEmailConflictState=ko.pureComputed((function(){return d.isAccountConflictState()}
1),this),this.dataStoreService.phone.subscribe((function(e){e&&d.isAccountConflictState()&&d.isAccountConflictState(!1)})),this.dataStoreService.email.subscribe((function(e){e&&d.isAccountConflictState()&&d.isAccountConflictState(!1)})),this.timer=new s}return e.prototype.returnBack=function(){this.isReturned(!0)},e}();t.BaseStageModel=r;var s=function(){function e(e){var t=this;this.start=this.start.bind(this),this.stop=this.stop.bind(this),this.timeCount=e||120,this.counter=ko.observable(0),this.isEnable=ko.pureComputed((function(){return 0!==t.counter()}),this),this.time=ko.pureComputed((function(){var e=t.counter();return[e%3600/60,e%60].map((function(e){return("0"+Math.floor(e)).slice(-2)})).join(":")}),this)}return e.prototype.start=function(){var e=this;if(0===this.counter()){this.counter(this.timeCount);var t=setInterval((function(){0!=e.counter()?e.counter(e.counter()-1):clearInterval(t)}),1e3)}},e.prototype.stop=function(){this.counter(0)},e}();t.pxpTimer=s},8974:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LoginStageModel=void 0;var n=i(7582),a=i(9797),r=i(7253),s=i(659),o=i(9303),l=i(6962),d=i(7027),c=function(e){function t(t,i,n,r){var o=e.call(this,t,i,n,r,"authLoginView",a.default)||this;return o.onEnterKeyPressed=o.onEnterKeyPressed.bind(o),o.proceedNext=o.proceedNext.bind(o),o.confirm=o.confirm.bind(o),o.resetStage=o.resetStage.bind(o),o.switchToEmail=o.switchToEmail.bind(o),o.switchToPhone=o.switchToPhone.bind(o),o.getNewCode=o.getNewCode.bind(o),o.switchRegisterMode=o.switchRegisterMode.bind(o),o.forgotPassword=o.forgotPassword.bind(o),o.passwordType="password",o.passwordMask="",o.isLoginTypeChangeable=ko.observable(o.currentSettings.IsEmailTabActive&&o.currentSettings.IsPhoneTabActive),o.isFastLoginModeActive=ko.observable(!1),o.isPasswordRecovery=ko.observable(!1),o.isCodeLinkVisible=ko.observable(!0),o.errorMessage=ko.observable(""),o.isPasswordNotValid=ko.observable(!1),o.isFormatNotValid=ko.observable(!1),o.passConfirm=ko.observable(""),o.getCodeButtonIsPressed=ko.observable(!1),o.sentToLogin=ko.observable(""),o.isEmailInputFocus=ko.observable(!1),o.isPhoneInputFocus=ko.observable(!1),o.isPasswordInputFocus=ko.observable(!1),o.isTriedToContinue=ko.observable(!1),o.isPhoneEmpty=ko.observable(!1),o.isPhoneNotValid=ko.observable(!1),o.isDeliveryError=ko.observable(!1),o.telegramBotName=ko.observable(null),o.maxBotName=ko.observable(null),o.codeMessageId=null,o.codeMessageSource=null,o.isTelegramLinkForPhonePageVisible=ko.pureComputed((function(){return o._isPhoneAuthComp()&&o.currentSettings.ExternalServices.includes("telegram")&&null!==o.telegramBotName()}),o),o.isMaxLinkForPhonePageVisible=ko.pureComputed((function(){return o._isPhoneAuthComp()&&o.currentSettings.ExternalServices.includes("MAX")&&null!==o.maxBotName()}),o),o.isPhoneTried=ko.pureComputed((function(){return o.dataStoreService.phoneDirty()||o.dataStoreService.phoneTouched()})),o.showPhoneEmpty=ko.pureComputed((function(){return o.isPhoneTried()&&ko.unwrap(o.isPhoneEmpty)})),o.showPhoneNotValid=ko.pureComputed((function(){return o.isPhoneTried()&&ko.unwrap(o.isPhoneNotValid)})),o.showPhoneConflictState=ko.pureComputed((function(){return o.isPhoneTried()&&ko.unwrap(o.isPhoneConflictState)})),o.isEmailAuth=ko.pureComputed(o._isEmailAuthComp,o),o.isPhoneAuth=ko.pureComputed(o._isPhoneAuthComp,o),o.isEmailEmpty=ko.pureComputed(o._isEmailEmptyComp,o),o.isEmailNotValid=ko.pureComputed(o._isEmailNotValidComp,o),o.isValidated=ko.pureComputed(o._isValidatedComp,o),o.loginModeSwitchLabel=ko.pureComputed(o._loginModeSwitchLabelComp,o),o.authCodeMessage=ko.pureComputed(o._authCodeMessageComp,o),o.getCodeButtonIsAvailable=ko.pureComputed(o._getCodeButtonIsAvailableComp,o),o.isErrorMessagesVisible=ko.pureComputed(o._isErrorMessagesVisibleComp,o),o.isDeliveryErrorVisible=ko.pureComputed((function(){return o.isDeliveryError()&&o.currentSettings.ExternalServices.includes("telegram")&&!!o.telegramBotName()||o.currentSettings.ExternalServices.includes("max")&&!!o.maxBotName()}),o),o.dataStoreService.currentLogin.subscribe((function(){o.isTriedToContinue()&&o.isTriedToContinue(!1)})),o.dataStoreService.loginMode(!o.currentSettings.IsPhoneTabActive||!o.currentSettings.IsPhoneDefaultLogin&&o.currentSettings.IsEmailTabActive?s.ContentDeliveryType.Email:s.ContentDeliveryType.Phone),o.authProcessingService.getTelegramBotName(d.pxpGlobal.frontend.frontendId).then((function(e){return o.telegramBotName(e)})),o.authProcessingService.getMaxBotName(d.pxpGlobal.frontend.frontendId).then((function(e){return o.maxBotName(e)})),o}return(0,n.__extends)(t,e),t.prototype.goToTelegram=function(){window.open("https://t.me/"+this.telegramBotName()+"?start=code","_blank","noopener,noreferrer,width=600,height=400")},t.prototype.goToMax=function(){window.open("https://web.max.ru/"+this.maxBotName()+"?start=code")},t.prototype.getNewCode=function(){var e=this;this.isLoading()||this.timer.isEnable()||(this.isLoading(!0),this.isTriedToContinue(!0),this.isErrorMessagesVisible()?this.isLoading(!1):(this.getCodeButtonIsPressed(!0),this.sentToLogin(this.dataStoreService.currentLogin()),this.authProcessingService.getCode(this.dataStoreService.currentLogin(),this.dataStoreService.loginMode(),"").then((function(t){if(e.isCodeLinkVisible(!1),e.timer.start(),e.isPasswordInputFocus(!0),t.StatusCode<200&&t.StatusCode!=o.AuthStatusCode.RecaptchaRequired)return console.log("processing error "+t.StatusCode+": msg "+t.Description),void e.dataStoreService.isFailed(!0);e.codeMessageId=t.VerificationCodeInfo.MessageId,e.codeMessageSource=t.VerificationCodeInfo.C
1ontentDeliveryType;var i=setInterval((function(){return e.getNewCodeMessageState(i)}),5e3)}),(function(t){"not_exists"!=t?console.log(t):e.isAccountConflictState(!0)})).then((function(){e.isLoading(!1)}))))},t.prototype.getNewCodeMessageState=function(e){return(0,n.__awaiter)(this,void 0,void 0,(function(){return(0,n.__generator)(this,(function(t){switch(t.label){case 0:return[4,this.authProcessingService.checkDeliveryState(this.codeMessageId,this.codeMessageSource)];case 1:return t.sent().Failed&&(clearInterval(e),this.isDeliveryError(!0)),[2]}}))}))},t.prototype.switchToEmail=function(){this.isEmailAuth()||(this.getCodeButtonIsPressed(!1),this.dataStoreService.loginMode(s.ContentDeliveryType.Email),this.isEmailInputFocus(!0),this.isAccountConflictState(!1),this.isPasswordNotValid(!1),this.isFormatNotValid(!1))},t.prototype.switchToPhone=function(){this.isPhoneAuth()||(this.getCodeButtonIsPressed(!1),this.dataStoreService.loginMode(s.ContentDeliveryType.Phone),this.isPhoneInputFocus(!0),this.isAccountConflictState(!1),this.isPasswordNotValid(!1),this.isFormatNotValid(!1))},t.prototype.onEnterKeyPressed=function(e,t){return 13===t.keyCode&&this.proceedNext(),!0},t.prototype.switchRegisterMode=function(){this.dataStoreService.requestedManager(l.ManagerType.Register);var e=document.getElementsByClassName("checkout-singin-register-wrapper")[0];e.classList.remove("active-signin"),e.classList.add("active-register")},t.prototype.proceedNext=function(){var e=this;if(!this.isLoading()){if(this.isLoading(!0),!this.isValidated()||this.isEmailNotValid())return this.isLoading(!1),void this.isFormatNotValid(!0);if(this.isTriedToContinue(!0),this.isErrorMessagesVisible())this.isLoading(!1);else{var t=this.dataStoreService.email().trim(),i=this.dataStoreService.password().trim();this.dataStoreService.email(t),this.dataStoreService.password(i);var n=this.dataStoreService.phone();this.authProcessingService.registerUser(this.recaptchaWidgetId()).then((function(i){i.StatusCode<200?(e.dataStoreService.email(t),e.dataStoreService.phone(n),e.isPasswordNotValid(!0),e.isFormatNotValid(!1)):e.isSucceed(!0)}),(function(t){"exists"!=t?console.log(t):e.isAccountConflictState(!0)})).then((function(){e.isLoading(!1)}))}}},t.prototype.forgotPassword=function(){this.dataStoreService.requestedManager(l.ManagerType.Restore)},t.prototype.validatePhone=function(){this.isPhoneEmpty(this._isPhoneEmpty()),this.isPhoneNotValid(this._isPhoneNotValidComp())},t.prototype.resetStage=function(){this.isSucceed(!1),this.isReturned(!1)},t.prototype.confirm=function(){},t.prototype._isEmailAuthComp=function(){return this.dataStoreService.loginMode()===s.ContentDeliveryType.Email},t.prototype._isPhoneAuthComp=function(){return this.dataStoreService.loginMode()===s.ContentDeliveryType.Phone},t.prototype._isEmailEmptyComp=function(){var e;if(!this.isEmailAuth())return!1;var t=null===(e=this.dataStoreService.email())||void 0===e?void 0:e.trim();return null==t||0===t.length},t.prototype._isPhoneEmpty=function(){var e;if(!this.isPhoneAuth())return!1;var t=null===(e=this.dataStoreService.phone())||void 0===e?void 0:e.trim();return null==t||0===t.length||t.replace(/[_-\s\(\)\+]/gi,"")==this.currentSettings.PhoneMask.replace(/[_-\s\(\)\+#]/gi,"")},t.prototype._isPhoneNotValidComp=function(){return!!this.isPhoneAuth()&&(this.isPhoneEmpty(),!1)},t.prototype._isEmailNotValidComp=function(){if(!this.isEmailAuth())return!1;if(this.isEmailEmpty())return!0;var e=this.dataStoreService.email().trim();return!/.*\@.*\..*/g.test(e)},t.prototype._loginModeSwitchLabelComp=function(){return this.isFastLoginModeActive()?this.currentSettings.RequestedStrings.fillPassword:this.currentSettings.RequestedStrings.quickLogin},t.prototype._isValidatedComp=function(){if(this.isErrorMessagesVisible())return!1;var e=this.dataStoreService.password(),t=this.dataStoreService.currentLogin();return null!=t&&t.length>0&&null!=e&&e.length>0&&(this.isRecaptchaPassed()||!this.isRecaptchaRequired())},t.prototype._authCodeMessageComp=function(){return this.isEmailAuth()?this.currentSettings.RequestedStrings.getAuthCodeMessageForEmail:this.isPhoneAuth()?this.currentSettings.RequestedStrings.getAuthCodeMessageForPhone:""},t.prototype._getCodeButtonIsAvailableComp=function(){return(!this.isPhoneAuth()||this.currentSettings.IsSmsTemplateEnabled)&&(this.isEmailAuth()||!this.currentSettings.IsSmsIntegrationDisabled)&&!this.isDeliveryErrorVisible()},t.prototype._isErrorMessagesVisibleComp=function(){return this.isTriedToContinue()&&this.isEmailAuth()&&(this.isEmailConflictState()||this.isEmailNotValid())||this.isPhoneAuth()&&(this.isPhoneConflictState()||this.isPhoneEmpty()||this.isPhoneNotValid())},t}(r.BaseStageModel);t.LoginStageModel=c},3811:(e,t,i)=>
1{Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordChangeRequestStageModel=void 0;var n=i(7582),a=i(9735),r=i(7253),s=i(8104),o=i(659),l=i(9303),d=i(6962),c=function(e){function t(t,i,n,r){var o=e.call(this,t,i,n,r,"authRestoreRequestView",a.default)||this;return o.onEnterKeyPressed=o.onEnterKeyPressed.bind(o),o.proceedNext=o.proceedNext.bind(o),o.confirm=o.confirm.bind(o),o.resetStage=o.resetStage.bind(o),o.switchToEmail=o.switchToEmail.bind(o),o.switchToPhone=o.switchToPhone.bind(o),o.getNewCode=o.getNewCode.bind(o),o.switchRegisterMode=o.switchRegisterMode.bind(o),o.resetCancel=o.resetCancel.bind(o),o.isLoginTypeChangeable=s.observable(o.currentSettings.IsEmailTabActive&&o.currentSettings.IsPhoneTabActive),o.isPasswordRecovery=s.observable(!1),o.isCodeLinkVisible=s.observable(!0),o.errorMessage=s.observable(""),o.passConfirm=s.observable(""),o.passwordType=s.observable("password"),o.passwordMask="####",o.currentSettings.IsFastLoginEnabled&&(o.passwordType=s.observable("text")),o.isValidated=s.pureComputed((function(){var e=!!o.dataStoreService.password();return(e=(e=e&&(!o.dataStoreService.isPhoneRequired()||!!o.dataStoreService.phone()||!o.dataStoreService.isEmailRequired()||!!o.dataStoreService.email()))&&(!o.dataStoreService.isNameRequired()||!!o.dataStoreService.firstName()&&!!o.dataStoreService.lastName()))&&!!o.dataStoreService.currentLogin()})),o}return(0,n.__extends)(t,e),t.prototype.checkAccount=function(e){var t,i=this;if(e==o.ContentDeliveryType.Email)t=this.dataStoreService.email();else if((t=this.dataStoreService.phone()).indexOf("_")>=0)return;t&&!this.isLoading()&&this.authProcessingService.pingAccount(t,e).then((function(e){i.isLoading(!1),e.StatusCode!=l.AuthStatusCode.Accepted&&(console.log(e),i.dataStoreService.isFailed(!0))}),(function(e){console.log(e),i.isLoading(!1)}))},t.prototype.getNewCode=function(){var e=this;this.isLoading()||(this.isLoading(!0),this.isCodeLinkVisible(!1),this.authProcessingService.getCode(this.dataStoreService.currentLogin(),this.dataStoreService.loginMode(),"").then((function(t){if(e.isLoading(!1),setTimeout((function(){e.isCodeLinkVisible(!0)}),5e3),t.StatusCode<200)return console.log("processing error "+t.StatusCode+": msg "+t.Description),void e.dataStoreService.isFailed(!0)}),(function(t){"exists"!=t?console.log(t):e.isAccountConflictState(!0)})))},t.prototype.switchToEmail=function(){this.dataStoreService.loginMode()!=o.ContentDeliveryType.Email&&this.dataStoreService.loginMode(o.ContentDeliveryType.Email)},t.prototype.switchToPhone=function(){this.dataStoreService.loginMode()!=o.ContentDeliveryType.Phone&&this.dataStoreService.loginMode(o.ContentDeliveryType.Phone)},t.prototype.onEnterKeyPressed=function(e,t){return 13===t.keyCode&&this.proceedNext(),!0},t.prototype.switchRegisterMode=function(){this.dataStoreService.requestedManager(d.ManagerType.Register)},t.prototype.proceedNext=function(){var e=this;this.isValidated()&&!this.isLoading()&&this.authProcessingService.getRestoreUrl(this.dataStoreService.currentLogin(),this.recaptchaWidgetId(),this.dataStoreService.password(),this.dataStoreService.loginMode()).then((function(t){e.isLoading(!1),t.StatusCode<200?(console.log("processing error "+t.StatusCode+": msg "+t.Description),e.dataStoreService.isFailed(!0)):(window.location.replace(t.Description),e.isSucceed(!0))}),(function(t){console.log(t),e.isLoading(!1)}))},t.prototype.resetCancel=function(){this.dataStoreService.requestedManager(d.ManagerType.Login)},t.prototype.resetStage=function(){this.isSucceed(!1),this.isReturned(!1)},t.prototype.confirm=function(){},t}(r.BaseStageModel);t.PasswordChangeRequestStageModel=c},3578:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ProfileStageModel=void 0;var n=i(7582),a=i(9592),r=i(80),s=i(5496),o=i(474),l=i(659),d=i(2894),c=i(2228),u=function(e){function t(t,i,n,r){var s=e.call(this,t,i,n,r,"authProfileView",a.default)||this;return s._createPofileModals=s._createPofileModals.bind(s),s._showSuccesMessage=s._showSuccesMessage.bind(s),s.showPhoneConfirmationModal=s.showPhoneConfirmationModal.bind(s),s.showEmailConfirmationModal=s.showEmailConfirmationModal.bind(s),s.showDeleteProfileModal=s.showDeleteProfileModal.bind(s),s.saveSettings=s.saveSettings.bind(s),s.isAcceptEmails=ko.observable(!1),s.isAdvertCheckboxVisible=ko.observable(!1),s.successMessageIsShowed=ko.observable(!1),s.errorMessageIsShowed=ko.observable(!1),s.lastNameEmptyIsShowed=ko.observable(!1),s.firstNameEmptyIsShowed=ko.observable(!1),s.emailEmptyIsShowed=ko.observable(!1),s.phoneEmptyIsShowed=ko.observable(!1),s.phoneNotSavedIsShowed=ko.observable(!1),s.approvedMessageForPhoneIsShowed=ko.observable(!1),s.approvedMessageForEmailIsShowed=ko.observable(!1),s.modals=s._createPofileModals(),s.isPhoneApprovalButtonVisible=ko.pureComputed((function(){return s.isPhoneApprovalAvailable()&&s.phoneExpression.expressionResult()})),s}return(0,n.__extends)(t,e),t.prototype._createPofileModals=function(){if(!this.modals){var e={currentSettings:this.currentSettings,code:this.phoneCode,value:this.phone,authProcessingService:this.authProcessingService,type:l.ContentDeliveryType.Phone,dataStoreService:this.dataStoreService,isRecaptchaPassed:this.isRecaptchaPassed,isRecaptchaRequired:this.isRecaptchaRequired},t={currentSettings:this.currentSettings,code:this.emailCode,value:this.email,authProcessingService:this.authProcessingService,type:l.ContentDeliveryType.Email,dataStoreService:this.dataStoreService,isRecaptchaPassed:this.isRecaptchaPassed,isRecaptchaRequired:this.isRecaptchaRequired};return{deleteAccount:new s.DeleteAccountModal(this.currentSettings.RequestedStrings,this.authProcessingService),dataConfirmationPhone:new o.DataConfirmationModal(e),dataConfirmationEmail
1:new o.DataConfirmationModal(t)}}},t.prototype._showSuccesMessage=function(){var e=this;this.isLoading(!1),this.successMessageIsShowed(!0),setTimeout((function(){return e.successMessageIsShowed(!1)}),1e4)},t.prototype._showErrorMessage=function(){var e=this;this.isLoading(!1),this.errorMessageIsShowed(!0),setTimeout((function(){return e.errorMessageIsShowed(!1)}),1e4)},t.prototype.saveSettings=function(){var e,t,i=this;this.firstNameEmptyIsShowed(0==this.dataStoreService.firstName().length),this.lastNameEmptyIsShowed(0==this.dataStoreService.lastName().length),this.emailEmptyIsShowed(0==this.email().length),this.phoneEmptyIsShowed(0==this.phone().length),0!=this.dataStoreService.firstName().length&&0!=this.dataStoreService.lastName().length&&0!=this.phone().length&&0!=this.email().length&&(this.isLoading(!0),this.authProcessingService.pingAccount(this.email(),l.ContentDeliveryType.Email).then((function(t){i.isAccountConflictState(!t.IsAccountExists),i.emailExpression.isLoginChanged()&&t.IsAccountExists?(i.approvedMessageForEmailIsShowed(!0),i.isLoading(!1)):i.approvedMessageForEmailIsShowed(!1),e=!i.emailExpression.isLoginChanged()||i.emailExpression.isLoginChanged()&&!t.IsAccountExists||i.emailExpression.isLoginChanged()&&t.IsAccountExists&&i.emailExpression.currentApprovalStatus()==d.ContactApprovalStatus.Approved})).then((function(){i.authProcessingService.pingAccount(i.phone(),l.ContentDeliveryType.Phone).then((function(e){i.isAccountConflictState(!e.IsAccountExists),i.phoneExpression.isLoginChanged()&&e.IsAccountExists?(i.isPhoneApprovalAvailable(!1),i.approvedMessageForPhoneIsShowed(!0),i.isLoading(!1)):(i.isPhoneApprovalAvailable(!0),i.approvedMessageForPhoneIsShowed(!1)),t=!i.phoneExpression.isLoginChanged()||!i.phoneExpression.isApprovalAvailable()||!e.IsAccountExists||i.phoneExpression.isLoginChanged()&&e.IsAccountExists&&i.phoneExpression.isApprovalAvailable()&&i.phoneExpression.currentApprovalStatus()==d.ContactApprovalStatus.Approved})).then((function(){var n=new Array;i.dataStoreService.userCustomFields().forEach((function(e){e.isDirty&&n.push(e)}));var a=!0;n.forEach((function(e){e.type!==c.InputFieldType.Checkbox?e.isRequired&&""==e.selectedValue().toString().trim()&&(a=!1):e.isRequired&&0==Boolean(e.selectedValue())&&(a=!1)})),a||i._showErrorMessage(),a&&e&&!i.approvedMessageForEmailIsShowed()&&t&&!i.approvedMessageForPhoneIsShowed()&&(i.proceedNext(),i._showSuccesMessage(),i.phoneNotSavedIsShowed(i.phone()!=i.dataStoreService.phone())),i.isLoading(!1)}))})),this.isLoading(!1))},t.prototype.showDeleteProfileModal=function(){var e;null===(e=this.modals)||void 0===e||e.deleteAccount.show()},t.prototype.showPhoneConfirmationModal=function(){var e;if(this.phone().length)return this.phone()!=this.dataStoreService.phone()?(this.isPhoneApprovalAvailable(!1),this.phoneNotSavedIsShowed(!0)):void(null===(e=this.modals)||void 0===e||e.dataConfirmationPhone.showField())},t.prototype.showEmailConfirmationModal=function(){var e;this.email().length&&(null===(e=this.modals)||void 0===e||e.dataConfirmationEmail.showField())},t}(r.ApprovalStageModelBase);t.ProfileStageModel=u},6373:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RegisterStageModel=void 0;var n=i(7582),a=i(9697),r=i(7253),s=i(6962),o=i(659),l=i(9303),d=i(2228),c=i(7027),u=function(e){function t(t,i,n,r){var s,o=e.call(this,t,i,n,r,"authRegisterView",a.default)||this;return o.validatePhone=function(){o._isPhoneValid()},o.onEnterKeyPressed=o.onEnterKeyPressed.bind(o),o.proceedNext=o.proceedNext.bind(o),o.confirm=o.confirm.bind(o),o.resetStage=o.resetStage.bind(o),o.switchRegisterMode=o.switchRegisterMode.bind(o),o.getNewCode=o.getNewCode.bind(o),o.isPhoneNotValid=ko.observable(!1),o.passwordMask="",o.passwordsIsEqual=ko.observable(!0),o.isUserDemandedCode=ko.observable(!1),o.errorMessage=ko.observable(""),o.sentToLogin=ko.observable(""),o.accountConflictStateMessage=ko.observable(""),o.isMultifoto=ko.observable(1054==(null===(s=null===c.pxpGlobal||void 0===c.pxpGlobal?void 0:c.pxpGlobal.frontend)||void 0===s?void 0:s.accountId)),o.personalDataAgreementChecked=ko.observable(!1),o.notificationAgreementChecked=ko.observable(!1),o.thirdPartiesAgreementChecked=ko.observable(!1),o.DiscountNotificationAgreementChecked=ko.observable(!1),o.isAgreementRequired=ko.observable(
1o.currentSettings.IsAgreementRequired),o.isPhoneValidation=ko.pureComputed(o._isPhoneValidationComp,o),o.isPhoneTried=ko.pureComputed((function(){return o.dataStoreService.phoneDirty()||o.dataStoreService.phoneTouched()})),o.showPhoneNotValid=ko.pureComputed((function(){return o.isPhoneTried()&&o.isPhoneNotValid()})),o.isEmailValidation=ko.pureComputed(o._isEmailValidationComp,o),o.isRecaptchaValidation=ko.pureComputed(o._isRecaptchaValidationComp,o),o.isValidated=ko.pureComputed(o._isValidComp,o),o}return(0,n.__extends)(t,e),t.prototype.onEnterKeyPressed=function(e,t){return 13===t.keyCode&&this.proceedNext(),!0},t.prototype.switchRegisterMode=function(){this.dataStoreService.requestedManager(s.ManagerType.Login)},t.prototype.getNewCode=function(){var e=this;if(!this.isLoading()&&!this.timer.isEnable()){this.isLoading(!0);var t=this.dataStoreService.phone(),i=null==t||""===t.trim();this.sentToLogin(t),this.errorMessage(i?this.currentSettings.RequestedStrings.spamPhone:""),i?this.isLoading(!1):this.authProcessingService.getCode(this.dataStoreService.phone(),o.ContentDeliveryType.Phone,"",!0).then((function(t){if(t.StatusCode<200&&t.StatusCode!=l.AuthStatusCode.RecaptchaRequired)return console.log("processing error "+t.StatusCode+": msg "+t.Description),void(3==t.StatusCode?e.errorMessage(e.currentSettings.RequestedStrings.tryLater):e.errorMessage(e.currentSettings.RequestedStrings.spamPhone));e.isUserDemandedCode(!0),e.timer.start()}),(function(t){"not_exists"!=t&&console.log(t),"exists"==t&&e.accountConflictStateMessage(e.currentSettings.RequestedStrings.userExistsWarn),e.isAccountConflictState(!0)})).then((function(){e.isLoading(!1)}))}},t.prototype.getNewEmailCode=function(){var e=this;if(!this.isLoading()&&!this.timer.isEnable()){this.isLoading(!0);var t=this.dataStoreService.email(),i=null==t||""===t.trim();this.sentToLogin(t),this.errorMessage(i?this.currentSettings.RequestedStrings.spamEmail:""),i?this.isLoading(!1):this.authProcessingService.getCode(this.dataStoreService.email(),o.ContentDeliveryType.Email,"",!0).then((function(t){if(t.StatusCode<200&&t.StatusCode!=l.AuthStatusCode.RecaptchaRequired)return console.log("processing error "+t.StatusCode+": msg "+t.Description),void e.errorMessage(e.currentSettings.RequestedStrings.spamEmail);e.isUserDemandedCode(!0),e.timer.start()}),(function(t){"not_exists"!=t&&console.log(t),"exists"==t&&e.accountConflictStateMessage(e.currentSettings.RequestedStrings.userExistsWarn),e.isAccountConflictState(!0)})).then((function(){e.isLoading(!1)}))}},t.prototype.proceedNext=function(){var e,t,i,n,a=this;if(!this.isLoading()){this.isLoading(!0);var r=null===(t=(e=this.dataStoreService).email)||void 0===t?void 0:t.call(e).trim(),s=null===(n=(i=this.dataStoreService).password)||void 0===n?void 0:n.call(i).trim();this.dataStoreService.email(r),this.dataStoreService.password(s),this.isValidated()?(this.dataStoreService.isSystemNotificationsEnabled(!this.isMultifoto()||this.DiscountNotificationAgreementChecked()),this.authProcessingService.registerUser(this.recaptchaWidgetId()).then((function(e){e.StatusCode<200&&e.StatusCode!=l.AuthStatusCode.RecaptchaRequired?a.errorMessage(a.currentSettings.RequestedStrings.spamPhone):e.StatusCode>=200&&a.isSucceed(!0)}),(function(e){switch(e.key){case"belongs":a.isAccountConflictState(!0);var t="";e.foundByEmail&&e.foundByPhone?t=a.currentSettings.RequestedStrings.getEmailAndPhoneAlreadyExistsMessage+" ":e.foundByEmail?t=a.currentSettings.RequestedStrings.getEmailAlreadyExistsMessageShort+" ":e.foundByPhone&&(t=a.currentSettings.RequestedStrings.getPhoneAlreadyExistsMessageShort+" "),t+=a.currentSettings.RequestedStrings.userBelongsToAnotherPhotolabWarn.replace("{0}",e.title),a.accountConflictStateMessage(t);break;case"exists":a.isAccountConflictState(!0),a.accountConflictStateMessage(a.currentSettings.RequestedStrings.userExistsWarn);break;default:console.log(e)}})).then((function(){a.isLoading(!1)}))):this.isLoading(!1)}},t.prototype.resetStage=function(){this.isSucceed(!1),this.isReturned(!1)},t.prototype.confirm=function(){},t.prototype._isPhoneValidationComp=function(){return!1},t.prototype._isEmailValidationComp=function(){return!1},t.prototype._isPhoneValid=function(){return this.isPhoneNotValid(!1),!1},t.prototype._isRecaptchaValidationComp=function(){return!this._isPhoneValidationComp()&&!this._isEmailValidationComp()},t.prototype._isValidComp=function(){var e,t,i,n=this.dataStoreService.customFieldsSet().filter((function(e){return e.showOnRegistration&&e.isRequired&&e.type!==d.InputFieldType.Note}));i=n.every((function(e){return e.type===d.InputFieldType.Checkbox?!0===Boolean(e.selectedValue()):e.selectedValue()&&""!=e.selectedValue().toString().trim()}));var a=!!this.dataStoreService.password();if(a=(a=(a=(a=a&&(!this.currentSettings.IsPhoneRequired||!!this.dataStoreService.ph
1one()&&!this._isPhoneValid()))&&(!this.currentSettings.IsEmailRequired||!!this.dataStoreService.email()))&&(!this.currentSettings.IsNameRequired||!(""==this.dataStoreService.firstName().trim())))&&(!this.currentSettings.IsLastNameRequired||!(""==this.dataStoreService.lastName().trim())),this.isPhoneValidation()){var r=null===(e=this.dataStoreService.password())||void 0===e?void 0:e.trim();a=a&&null!=r&&""!==r}this.isEmailValidation()&&(r=null===(t=this.dataStoreService.password())||void 0===t?void 0:t.trim(),a=a&&null!=r&&""!==r);var s=this.dataStoreService.company();if(this.isRecaptchaValidation()&&(a=(a=a&&(!this.currentSettings.IsPasswordConfirmationEnabled||this.passwordsIsEqual()))&&(this.isRecaptchaPassed()||!this.isRecaptchaRequired())),""===this.dataStoreService.refCompanyId()){var o="",l="";null!=s&&(o="function"==typeof s.Title?s.Title():s.Title,l="function"==typeof s.INN?s.INN():s.INN),a=(a=a&&(!this.dataStoreService.isUserCompany()||null!=s&&o.length>0&&l.length>0))&&(i||0==n.length)}return this.isAgreementRequired()&&(a=a&&this.personalDataAgreementChecked()&&this.notificationAgreementChecked()&&this.thirdPartiesAgreementChecked()),a},t}(r.BaseStageModel);t.RegisterStageModel=u},4689:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ShoppingStageModel=void 0;var n=i(7582),a=i(265),r=i(80),s=i(659),o=i(9303),l=function(e){function t(t,i,n,r){var s=e.call(this,t,i,n,r,"authShoppingView",a.default)||this;return s.verifyAccount=s.verifyAccount.bind(s),s.getNewCode=s.getNewCode.bind(s),s._showCodeField=s._showCodeField.bind(s),s.isEmailCodeValid=ko.observable(!0),s.isPhoneCodeValid=ko.observable(!0),s.isEmailCodeSended=ko.observable(!1),s.isPhoneCodeSended=ko.observable(!1),s.isPhoneCodeFieldFocused=ko.observable(!1),s.isEmailCodeFieldFocused=ko.observable(!1),s.isPhoneCodeFieldVisible=ko.pureComputed(s._isPhoneCodeFieldVisibleComp,s),s.isEmailCodeFieldVisible=ko.pureComputed(s._isEmailCodeFieldVisibleComp,s),s.isSubmitButtonEnable=ko.pureComputed(s._isSubmitButtonEnableComp,s),s.phoneCode.subscribe((function(){s.isPhoneCodeValid(!0)}),s),s.emailCode.subscribe((function(){s.isEmailCodeValid(!0)}),s),s}return(0,n.__extends)(t,e),t.prototype.getNewCode=function(e){var t=this;if(!this.isLoading()){this.isLoading(!0);var i="";switch(e){case s.ContentDeliveryType.Phone:var n=this.phone().trim();if(this.timer.isEnable()||null==n||0===n.length)return void this.isLoading(!1);i=n,this.timer.start();break;case s.ContentDeliveryType.Email:var a=this.email();if(this.timerTwo.isEnable()||null==a||0===a.length)return void this.isLoading(!1);i=a,this.timerTwo.start()}this.authProcessingService.getCode(i,e,this.recaptchaWidgetId()).then((function(i){t._showCodeField(e),i.StatusCode<200&&console.log("processing error "+i.StatusCode+": msg "+i.Description)}),(function(e){"exists"==e?t.isAccountConflictState(!0):console.log(e)})).then((function(){t.isLoading(!1)}))}},t.prototype.verifyAccount=function(e){var t,i,n,a,r=this;if(!this.isLoading()){this.isLoading(!0);var l="",d="";switch(e){case s.ContentDeliveryType.Phone:l=null===(t=this.phone())||void 0===t?void 0:t.trim(),d=null===(i=this.phoneCode())||void 0===i?void 0:i.trim();break;case s.ContentDeliveryType.Email:l=null===(n=this.email())||void 0===n?void 0:n.trim(),d=null===(a=this.emailCode())||void 0===a?void 0:a.trim()}null==l||0===l.length||null==d||0===d.length||d.indexOf("_")>=0?this.isLoading(!1):this.authProcessingService.verifyLogin(l,this.recaptchaWidgetId(),d,e).then((function(t){if(t.StatusCode==o.AuthStatusCode.InvalidData)switch(e){case s.ContentDeliveryType.Phone:r.isPhoneCodeValid(!1);break;case s.ContentDeliveryType.Email:r.isEmailCodeValid(!1)}else t.StatusCode<200&&t.StatusCode!=o.AuthStatusCode.RecaptchaRequired&&(console.log("processing error "+t.StatusCode+": msg "+t.Description),r.dataStoreService.isFailed(!0))}),(function(e){console.log(e)})).then((function(){r.isLoading(!1)}))}},t.prototype._showCodeField=function(e){switch(e){case s.ContentDeliveryType.Phone:this.isPhoneCodeSended(!0),this.isPhoneCodeFieldFocused(!0);break;case s.ContentDeliveryType.Email:this.isEmailCodeSended(!0),this.isEmailCodeFieldFocused(!0)}},t.prototype._isPhoneCodeFieldVisibleComp=function(){return!this.phoneExpression.isApproved()&&(this.phoneExpression.isApprovalRequired()||this.isPhoneRequired())&&this.isPhoneCodeSended()},t.prototype._isEmailCodeFieldVisibleComp=function(){return!this.emailExpression.isApproved()&&(this.emailExpression.isApprovalRequired()||this.isEmailRequired())&&this.isEmailCodeSended()},t.prototype._isSubmitButtonEnableComp=function(){return this.isValidated()&&this.isEmailCodeValid()&&this.isPhoneCodeValid()&&(!this.emailExpression.isApprovalRequired()||!this.emailExpression.isApproved()&&this.isEmailCodeSended())&&(!this.phoneExpression.isApprovalRequired()||!this.phoneExpression.isApproved()&&this.isPhoneCodeSended())},t}(r.ApprovalStageModelBase);t.ShoppingStageModel=l},474:(e,t,i)=>
1{Object.defineProperty(t,"__esModule",{value:!0}),t.DataConfirmationModal=void 0;var n=i(7582),a=i(9299),r=i(8515),s=i(7253),o=i(659),l=i(9303),d=function(e){function t(t){var i=this,n=ko.utils.parseHtmlFragment(r.default)[0],a={title:t.currentSettings.RequestedStrings.verificationCodeLabel,wrapp:!0};return(i=e.call(this,n,a)||this).confirmData=i.confirmData.bind(i),i.getCode=i.getCode.bind(i),i._handlers=t,i.currentSettings=i._handlers.currentSettings,i.code=i._handlers.code,i.value=i._handlers.value,i.type=i._handlers.type,i.timer=new s.pxpTimer(120),i.isFirstSend=ko.observable(!0),i.isLoading=ko.observable(!1),i.isVerificationCodeError=ko.observable(!1),i.isCodeInputFocused=ko.observable(!1),i.isRecaptchaPassed=i._handlers.isRecaptchaPassed,i.isRecaptchaRequired=i._handlers.isRecaptchaRequired,i.authProcessingService=i._handlers.authProcessingService,i.dataStoreService=i._handlers.dataStoreService,i.inputId=i._handlers.type==o.ContentDeliveryType.Email?"txtEmailCode":"txtPhoneCode",i.recaptchaWidgetId=ko.observable(""),i.isValidated=ko.pureComputed((function(){var e=i.isRecaptchaPassed()||!i.isRecaptchaRequired();return i.code().length?i.code().indexOf("_")<0&&e:!!i.code().length&&e}),i),i.isValidated.subscribe((function(e){e&&i.confirmData()}),i),i.isRecaptchaPassed.subscribe((function(e){e&&i.getCode()}),i),document.body.appendChild(i.modalElement),ko.applyBindings(i,i.modalElement),i}return(0,n.__extends)(t,e),t.prototype._resetFocus=function(){document.activeElement instanceof HTMLElement&&document.activeElement.blur()},t.prototype.getCode=function(){this.isShown&&(this.timer.isEnable()||(this._resetFocus(),this.isCodeInputFocused(!0),this.timer.start(),this._handlers.authProcessingService.getCode(this.value(),this.type,this.recaptchaWidgetId())))},t.prototype.confirmData=function(){var e=this;this.isLoading(!0),this.isVerificationCodeError(!1),this.authProcessingService.approveAccount(this.value(),this.code(),this.recaptchaWidgetId(),this.type).then((function(t){t.StatusCode>199&&t.StatusCode<300&&e.hide(),t.StatusCode==l.AuthStatusCode.InvalidData&&e.isVerificationCodeError(!0),e.isLoading(!1)}),(function(t){console.log(t),e.isLoading(!0)}))},t.prototype.showField=function(){this.value()&&(this.show(),this._resetFocus(),this.isCodeInputFocused(!0),this.isFirstSend()&&(this.isFirstSend(!1),this.getCode()))},t}(a.Modal);t.DataConfirmationModal=d},5496:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DeleteAccountModal=void 0;var n=i(7582),a=i(9299),r=i(6504),s=function(e){function t(t,i){var n=this,a=ko.utils.parseHtmlFragment(r.default)[0],s={title:t.deleteAccountModalTitle,wrapp:!0};return(n=e.call(this,a,s)||this).deleteUserAccount=n.deleteUserAccount.bind(n),n.authProcessingService=i,n.requestedStrings=t,n.accountIsDeleting=ko.observable(!1),n.userIsSure=ko.observable(!1),n.buttonIsEnabled=ko.pureComputed((function(){return n.userIsSure()&&!n.accountIsDeleting()}),n),document.body.appendChild(n.modalElement),ko.applyBindings(n,n.modalElement),n}return(0,n.__extends)(t,e),t.prototype.deleteUserAccount=function(){this.userIsSure&&(this.accountIsDeleting(!0),this.authProcessingService.deleteAccount().then((function(e){window.location.reload()}),(function(e){alert(e)})))},t}(a.Modal);t.DeleteAccountModal=s},960:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ApprovalExpression=void 0;var n=i(2894);t.ApprovalExpression=function(e,t,i,a,r){var s=this;this.currentApprovalStatus=e,this.isAlwaysShown="authProfileView"==r,this.isAccountExists=t,this.isLoginChanged=ko.observable(!1),this.isApprovalRequired=ko.observable(i),this.isApprovalAvailable=ko.observable(a),this.isApproved=ko.pureComputed((function(){return s.currentApprovalStatus()==n.ContactApprovalStatus.Approved})),this.expressionResult=ko.computed((function(){return(!s.isAlwaysShown||s.isAccountExists()||s.isLoginChanged())&&(!s.isAlwaysShown||!s.isApproved()||s.isLoginChanged())&&(s.isAlwaysShown||s.isAccountExists()||s.isApprovalRequired())&&(s.isAlwaysShown||!s.isLoginChanged())&&(s.isAccountExists()||!s.isApproved())&&s.isApprovalAvailable()}))}},2277:(e,t,i)=>
1{Object.defineProperty(t,"__esModule",{value:!0}),t.CompanyRegistration=void 0;var n=i(7582),a=i(5074),r=i(7027),s=new a.ObjectCache,o=function(){function e(e){var t=this;this._inputChange=this._inputChange.bind(this),this.onChildClick=this.onChildClick.bind(this),this.change=this.change.bind(this),this.showHint=this.showHint.bind(this),this.isChanged=ko.observable(0==e.companyId.length),this.isVisible=ko.observable(!1),this.isFocused=ko.observable(!1),this.isLoading=ko.observable(!1),this.isPayerVisible=ko.observable(!1),this.isExternalCompanyValidation=ko.observable(e.isExternalCompanyValidationDisabled),this.requestedStrings=e.requestedStrings,this.showForm=ko.observable(null==e.company());var i={Index:0,INN:ko.observable(""),OGRN:ko.observable(""),KPP:ko.observable(""),LegalAddress:ko.observable(""),Title:ko.observable(""),TitleLabel:"",Status:""};this.dadataCompany=ko.observable(i),this.dadataCompany.subscribe((function(t){e.company(t)})),this.dadataCompany().INN.subscribe((function(i){e.company(t.dadataCompany())})),this.dadataCompany().Title.subscribe((function(i){e.company(t.dadataCompany())})),this.addedValue=ko.observable(null!=this.dadataCompany()?this.dadataCompany().TitleLabel:""),this.inputValue=ko.observable(null!=this.dadataCompany()?this.dadataCompany().Title():""),this.innInputValue=ko.observable(null!=this.dadataCompany()?this.dadataCompany().INN():""),this.companyNotFound=ko.observable(e.companyNotFound),document.addEventListener("click",(function(e){"companyName"!=e.target.id&&t.isVisible(!1)})),this.companies=ko.observableArray(),this.inputValue.subscribe((function(){t._inputChange()})),this.innInputValue.subscribe((function(){t._inputChange()})),this.isChanged.subscribe((function(e){t.isFocused(e)})),this.inputValue.extend({rateLimit:{timeout:200,method:"notifyWhenChangesStop"}})}return e.prototype._inputChange=function(){var t=this;if(this.isExternalCompanyValidation())return this.dadataCompany().INN(this.innInputValue()),void this.dadataCompany().Title(this.inputValue());0!=this.inputValue().length&&(this.isLoading(!0),this.isVisible(!0),e.getCompaniesFromDadata(this.inputValue()).then((function(e){null==e||0==e.length?t.companies.removeAll():t.companies(e),t.isLoading(!1)})))},e.prototype.onChildClick=function(e){void 0!==event&&event.stopPropagation(),this.inputValue("string"==typeof e.Title?e.Title:e.Title()),this.addedValue(e.TitleLabel),this.dadataCompany(e),this.isVisible(!1),this.isChanged(!1)},e.prototype.change=function(){void 0!==event&&event.stopPropagation(),this.isChanged(!0)},e.prototype.showHint=function(){this.inputValue().length>0&&this.isVisible(!0)},e.getCompaniesFromDadata=function(e){return(0,n.__awaiter)(this,void 0,Promise,(function(){var t,i;return(0,n.__generator)(this,(function(n){return t=JSON.stringify(e),null!==(i=s.get(t))?[2,Promise.resolve(i)]:[2,new Promise((function(i,n){var a=new XMLHttpRequest;a.open("GET","/api/user/validateAndGetFromDadata?query="+e+"&photolabId="+r.pxpGlobal.frontend.frontendId),a.onreadystatechange=function(){if(a.readyState===XMLHttpRequest.DONE)if(a.status>199&&a.status<300){var e=JSON.parse(a.responseText);s.set(t,e),i(e)}else n(a.responseText)},a.send()}))]}))}))},e}();t.CompanyRegistration=o},1070:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CustomFieldsModel=void 0;var n=i(8104),a=i(7708),r=i(5727);n.components.register("dateSelector",{viewModel:{createViewModel:function(e){return new r.DateSelectorModel(e)}},template:a.default});t.CustomFieldsModel=function(e){this.customFieldsCollection=e.userFields,this.isRegister=e.isRegister,this.isBeforeSubmitButton=e.isBeforeSubmitButton}},9560:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ExternalServicesItem=t.ExternalServicesModel=void 0;var n=i(7027),a=i(4339),r=i(8509),s=function(){function e(e){var t=this;this._openedWindow=null,this.open=function(e){var i,s;if(null!=e)if(e instanceof r.TelegramExternalServicesItem)e.launchTg();else if(e instanceof a.MaxExternalServicesItem)e.loginWithMax();else{t._openedWindow&&t._openedWindow.close(),t._openedWindow=null;var o=null!==(s=null===(i=n.pxpGlobal.frontend)||void 0===i?void 0:i.slug)&&void 0!==s&&s?"/"+n.pxpGlobal.frontend.slug:"",l="?returnUrl="+window.location.origin+o+"/account/afterlogin",d=""+window.location.origin+o+e.link+l,c=window.innerWidth,u=window.innerHeight,p=Math.min(c,600),h=Math.min(u,650),v=u/2-h/2,m=c/2-p/2-8.5;t._openedWindow=window.open(d,"_blank","height="+h+",width="+p+",scrollbars=yes,top="+v+",left="+m)}},this.dispose=function(){t._openedWindow&&t._openedWindow.close(),window.removeEventListener("message",t._onMessageHandler,!1)},this._onMessageHandler=function(e){if(e.origin===window.location.origin)try{var i=JSON.parse(e.data);if(console.log(i),"afterlogin"===i.event){t._openedWindow&&t._openedWindow.close();var n=i;if(n.userInfo.IsAnonymous||0==n.userInfo.UserId)return void t._dataStoreService.isFailed(!0);t._dataStoreService.userId=n.userInfo.UserId,t._dataStoreService.isSucceed(!0)}}catch(e){}},this._onMessageHandler=this._onMessageHandler.bind(this),this._initList=this._initList.bind(this),this.dispose=this.dispose.bind(this),this.open=this.open.bind(this),this._dataStoreService=e.dataStore,this._initList=this._initList.bind(this),this.isVisible=e.list.length>0,this.providers=this._initList(e.list),this.resourceStrings=e.resourceStrings,window.addEventListener("message",this._onMessageHandler,!1)}return e.prototype._initList=function(e){if(!e.length)return null;for(var t=[],i=0;i<e.length;i++){var n=e[i];
1if("instagram"!==n){var s="telegram"===n?new r.TelegramExternalServicesItem(n):"MAX"===n?new a.MaxExternalServicesItem(n):new o(n);t.push(s)}}return t},e}();t.ExternalServicesModel=s;var o=function(e){this.itemClass="auth-external-providers__item auth-external-providers_"+e,this.iconClass="auth-external-icon auth-external-icon_"+e,this.link="/account/login/"+e};t.ExternalServicesItem=o},4339:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MaxExternalServicesItem=void 0;var n=i(7582),a=i(7027),r=function(e){function t(t){var i=e.call(this,t)||this;return i.maxAuthTimer=null,i}return(0,n.__extends)(t,e),t.prototype.loginWithMax=function(){return(0,n.__awaiter)(this,void 0,Promise,(function(){var e,t=this;return(0,n.__generator)(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.getBotLink()];case 1:return e=i.sent(),window.open(e.link,"_blank","noopener,noreferrer"),this.maxAuthTimer=window.setInterval((function(){return(0,n.__awaiter)(t,void 0,void 0,(function(){var t;return(0,n.__generator)(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.getAuthStatus(e.token)];case 1:return"Pending"===(t=i.sent()).status?[2]:"Expired"===t.status?(this.stopMaxAuthTimer(),[2]):"Consumed"===t.status?(this.stopMaxAuthTimer(),window.location.href="/",[2]):"Completed"!==t.status?[3,3]:(this.stopMaxAuthTimer(),[4,this.finalizeAuth(e.token)]);case 2:i.sent()&&(window.location.href="/"),i.label=3;case 3:return[3,5];case 4:return i.sent(),this.stopMaxAuthTimer(),console.error("Error while trying to auth with max"),[3,5];case 5:return[2]}}
1))}))}),1500),[3,3];case 2:return i.sent(),this.stopMaxAuthTimer(),console.error("Error while trying to auth with max"),[3,3];case 3:return[2]}}))}))},t.prototype.stopMaxAuthTimer=function(){null!==this.maxAuthTimer&&(window.clearInterval(this.maxAuthTimer),this.maxAuthTimer=null)},t.prototype.getBotLink=function(){return(0,n.__awaiter)(this,void 0,Promise,(function(){var e,t,i;return(0,n.__generator)(this,(function(n){switch(n.label){case 0:return e=a.pxpGlobal.frontend.origin+"api/max/"+a.pxpGlobal.frontend.frontendId+"/auth-start",[4,fetch(e,{method:"POST",credentials:"include"})];case 1:if(!(t=n.sent()).ok)throw new Error("Unable to start login with MAX");return[4,t.json()];case 2:return i=n.sent(),console.log(i),[2,i]}}))}))},t.prototype.getAuthStatus=function(e){return(0,n.__awaiter)(this,void 0,Promise,(function(){var t;return(0,n.__generator)(this,(function(i){switch(i.label){case 0:return t=a.pxpGlobal.frontend.origin+"api/max/"+a.pxpGlobal.frontend.frontendId+"/auth-status?token="+e,[4,fetch(t,{method:"GET",credentials:"include"})];case 1:return[4,i.sent().json()];case 2:return[2,i.sent()]}}))}))},t.prototype.finalizeAuth=function(e){return(0,n.__awaiter)(this,void 0,Promise,(function(){var t;return(0,n.__generator)(this,(function(i){switch(i.label){case 0:return t=a.pxpGlobal.frontend.origin+"api/max/"+a.pxpGlobal.frontend.frontendId+"/auth-finalize?token="+e,[4,fetch(t,{method:"POST",credentials:"include"})];case 1:return i.sent().ok?[2,!0]:[2,!1]}}))}))},t}((function(e){this.itemClass="auth-external-providers__item auth-external-providers_"+e,this.iconClass="auth-external-icon auth-external-icon_"+e,this.link="/account/login/"+e}));t.MaxExternalServicesItem=r},8509:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TelegramExternalServicesItem=void 0;var n=i(7582),a=i(7027),r=function(e){function t(t){return e.call(this,t)||this}return(0,n.__extends)(t,e),t.prototype.launchTg=function(){return(0,n.__awaiter)(this,void 0,void 0,(function(){var e,t=this;return(0,n.__generator)(this,(function(i){switch(i.label){case 0:return[4,this.getBotId()];case 1:return e=i.sent(),window.Telegram.Login.auth({bot_id:e,request_access:"write"},(function(e){e||window.location.replace(a.pxpGlobal.frontend.origin+"/account/login"),t.onTelegramAuth(e)})),[2]}}))}))},t.prototype.getBotId=function(){return(0,n.__awaiter)(this,void 0,void 0,(function(){var e,t;return(0,n.__generator)(this,(function(i){switch(i.label){case 0:return e=a.pxpGlobal.frontend.origin+"api/telegram/"+a.pxpGlobal.frontend.frontendId+"/bot-id",[4,fetch(e)];case 1:return[4,i.sent().json()];case 2:return t=i.sent(),console.log(t),[2,t]}}))}))},t.prototype.tryBind=function(e,t){return(0,n.__awaiter)(this,void 0,void 0,(function(){var i,r,s;return(0,n.__generator)(this,(function(n){switch(n.label){case 0:i=a.pxpGlobal.frontend.origin+"api/externalproviders/telegram/bind?photolabId="+e,r={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)},n.label=1;case 1:return n.trys.push([1,3,,4]),[4,fetch(i,r)];case 2:return[2,n.sent()];case 3:if((s=n.sent())instanceof Response)return[2,s];throw s;case 4:return[2]}}
1))}))},t.prototype.tryLogin=function(e,t){return(0,n.__awaiter)(this,void 0,void 0,(function(){var i,r,s;return(0,n.__generator)(this,(function(n){switch(n.label){case 0:i=a.pxpGlobal.frontend.origin+"api/externalproviders/telegam/log-reg?photolabId="+e,r={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),credentials:"include"},n.label=1;case 1:return n.trys.push([1,3,,4]),[4,fetch(i,r)];case 2:return[2,n.sent()];case 3:if((s=n.sent())instanceof Response)return[2,s];throw s;case 4:return[2]}}))}))},t.prototype.onTelegramAuth=function(e){var t;return(0,n.__awaiter)(this,void 0,void 0,(function(){var i,r;return(0,n.__generator)(this,(function(n){switch(n.label){case 0:return(null===(t=a.pxpGlobal.user)||void 0===t?void 0:t.userId)?[4,this.tryBind(a.pxpGlobal.frontend.frontendId,e)]:[3,2];case 1:switch((i=n.sent()).status){case 200:return window.location.reload(),[2];case 404:case 400:case 409:break;default:return alert("ÐеизвеÑÑнÑй ÑÑаÑÑÑ Ð¾Ñибки: "+i.status),[2]}return[2];case 2:return[4,this.tryLogin(a.pxpGlobal.frontend.frontendId,e)];case 3:switch((r=n.sent()).status){case 200:return window.location.reload(),[2];case 201:return window.location.replace(a.pxpGlobal.frontend.origin+"/account"),[2];case 400:return[2];default:return alert("ÐеизвеÑÑнÑй ÑÑаÑÑÑ Ð¾Ñибки: "+r.status),[2]}return[2]}}
1))}))},t}((function(e){this.itemClass="auth-external-providers__item auth-external-providers_"+e,this.iconClass="auth-external-icon auth-external-icon_"+e,this.link="/account/login/"+e}));t.TelegramExternalServicesItem=r},7432:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordUnveilerModel=void 0;var i=function(){function e(e){var t=this;this.showedPassword=this.showedPassword.bind(this),this.mask=e.mask,this.password=e.password,this.localization=e.localization,this.passwordIsShown=ko.observable(!1),this.passwordConfirm=e.passwordConfirm||!1,this.passwordConfirmValue=e.passConfirmValue||ko.observable(""),this.passwordsIsEqual=e.passwordsIsEqual||ko.observable(!0),this.isFocus=e.isFocus,this.inputType=ko.pureComputed((function(){return t.passwordIsShown()?"text":"password"}),this),this.title=ko.pureComputed((function(){return t.passwordIsShown()?t.localization.hidePasswordTitle:t.localization.showPasswordTitle}),this)}return e.prototype.showedPassword=function(){this.passwordIsShown(!this.passwordIsShown())},e.prototype.checkoutPasswordsEquel=function(){var e=this.passwordConfirmValue();if(null!=e&&0!==e.length){var t=this.password()===e;this.passwordsIsEqual(t)}},e}();t.PasswordUnveilerModel=i},7027:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.pxpGlobal=void 0,(0,i(9021).default)(),t.pxpGlobal={frontend:"undefined"!=typeof pxp&&void 0!==pxp.frontend?pxp.frontend:new Object,user:"undefined"!=typeof pxp&&void 0!==pxp.user?pxp.user:null,productInfo:"undefined"!=typeof pxp&&void 0!==pxp.productInfo?pxp.productInfo:null,override:"undefined"!=typeof pxp&&void 0!==pxp.override?pxp.override:null,utilities:"undefined"!=typeof pxp&&void 0!==pxp.utilities?pxp.utilities:new Object,phoneRules:"undefined"!=typeof pxp&&void 0!==pxp.phoneRules?pxp.phoneRules:[{PhoneMask:"+7 (###) ## ##-###",ExtMask:" #######",RuleTitle:"7",RuleValue:""}]}},3987:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Guid=void 0;var i=function(){function e(){}return e.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))},e}();t.Guid=i},9299:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Modal=void 0;var i=function(){function e(e,t){if(null==e||!(e instanceof Element))throw new Error("Modal: domElement is null or not DOMElement");this.show=this.show.bind(this),this.hide=this.hide.bind(this),this._createModal=this._createModal.bind(this),this._createOverlay=this._createOverlay.bind(this),this.config=t,void 0===this.config&&(this.config=new Object),void 0===this.config.lockBody&&(this.config.lockBody=!0),void 0===this.config.wrapp&&(this.config.wrapp=!1),void 0===this.config.clickOnOverlay&&(this.config.clickOnOverlay=!0),void 0===this.config.id&&(this.config.id=""),this.baseZindex=2e3,this.isShown=!1,this.scrollPosition=0,this.scrollBarWidth=window.innerWidth-document.body.clientWidth,this.overflowState="",this.initialPadding="";var i="pxpModalOverlay",n=document.getElementById(i);this.overlayElement=null!==n?n:this._createOverlay(i),this.config.clickOnOverlay&&this.overlayElement.addEventListener("click",this.hide),this.modalElement=this._createModal(e);var a=this.modalElement.style.zIndex?this.modalElement.style.zIndex:"0",r=parseInt(a)||this.baseZindex+1;this.modalElement.style.zIndex=r.toString()}return e.prototype._createModal=function(e){var t,i;if(!(null===(t=this.config)||void 0===t?void 0:t.wrapp))return e;var n=document.createElement("div"),a=document.createElement("h4"),r=document.createElement("span"),s=document.createElement("button");return a.className="modal-title",s.type="button",s.innerHTML="×",s.className="button-close",s.addEventListener("click",this.hide),(null===(i=this.config)||void 0===i?void 0:i.title)?r.innerText=this.config.title:r.textContent="Â ",a.appendChild(r),a.appendChild(s),n.className="pxp-modal modal-box",this.config.id&&(n.id=this.config.id),n.style.display="none",n.appendChild(a),n.appendChild(e),n},e.prototype._createOverlay=function(e){var t=document.createElement("div");return t.setAttribute("id",e),t.className=e,t.style.zIndex=this.baseZindex.toString(),t.style.height="100%",t.style.width="100%",t.style.position="fixed",t.style.left="0",t.style.top="0",t.style.display="none",t.style.backgroundColor="#000",t.style.opacity="0.5",t.style.msUserSelect="none",t.style.webkitUserSelect="none",t.style.userSelect="none",t.addEventListener("click",this.hide),document.body.insertBefore(t,document.body.firstChild),t},e.prototype.show=function(){var e;this.isShown||(this._createOverlay,this.isShown=!0,(null===(e=this.config)||void 0===e?void 0:e.lockBody)&&(this.overflowState=document.body.style.overflow,this.initialPadding=document.body.style.paddingRight,this.scrollPosition=void 0!==window.scrollY?window.scrollY:window.pageYOffset,document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.width="100%",document.body.style.marginTop=-this.scrollPosition+"px",document.body.style.paddingRight=this.scrollBarWidth+"px",document.body.style.overscrollBehaviorX="none",document.documentElement.style.overscrollBehaviorX="none",document.addEventListener("touchmove",this.lockScroll)),this.overlayElement.style.display="block",this.modalElement.style.display="block")},e.prototype.lockScroll=function(){document.body.scrollTop=0},e.prototype.hide=function(){var e;this.isShown&&(this.isShown=!1,(null===(e=this.config)||void 0===e?void 0:e.lockBody)&&(document.body.style.overflow=null!=this.overflowState?this.overflowState:"",document.body.style.paddingRight=null!=this.initialPadding?this.initialPadding:"",document.body.style.position="relative",document.body.style.marginTop="",document.body.style.width="",document.removeEventListener("touchmove",this.lockScroll),window.scrollTo(0,this.scrollPosition)),this.overlayElement.style.display="none",this.modalElement.style.display="none")},e}();t.Modal=i},8797:(e,t)=>
1{Object.defineProperty(t,"__esModule",{value:!0}),t.NumberParser=void 0;var i=function(){function e(){}return e.parseToInt=function(e){if(null==e)return 0;if("string"!=typeof e)return e;if(0===e.length)return 0;var t=parseInt(this.replaceCommas(e));return isNaN(t)?0:this.checkValueSizeInt(t)},e.parseToFloat=function(e){if(null==e)return 0;if("string"!=typeof e)return e;if(0===e.length)return 0;var t=parseFloat(this.replaceCommas(e));return isNaN(t)?0:this.checkValueSizeFloat(t)},e.parseToDecimal=function(e){if(null==e)return 0;if("string"!=typeof e)return e;if(0===e.length)return 0;var t=parseFloat(this.replaceCommas(e));return isNaN(t)?0:this.checkValueSizeDecimal(t)},e.replaceCommas=function(e){return e.toString().replace(/,/g,".")},e.checkValueSizeInt=function(e){var t=-1e9,i=1e9;return e<t?t:e>i?i:e},e.checkValueSizeFloat=function(e){var t=-1e38,i=1e38;return e<t?t:e>i?i:e},e.checkValueSizeDecimal=function(e){var t=-1e28,i=1e28;return e<t?t:e>i?i:e},e}();t.NumberParser=i},5074:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectCache=void 0;var i=function(e){this.value=e,this.dateAdded=(new Date).getTime()},n=function(){function e(e){this._cache=new Map,this.get=this.get.bind(this),this.set=this.set.bind(this),this.cleanUp=this.cleanUp.bind(this),e&&e>=1&&(this._timeToLiveInMs=6e4*e,setInterval(this.cleanUp,5e3))}return e.prototype.cleanUp=function(){if(this._timeToLiveInMs){var e=this._cache,t=(new Date).getTime()-this._timeToLiveInMs,i=[];if(e.forEach((function(e,n){e.dateAdded<t&&i.push(n)})),i.length>0){console.log("removing expired items",i);for(var n=0;n<i.length;n++)e.delete(i[n])}}},e.prototype.clear=function(e){this._cache.delete(e)},e.prototype.clearAll=function(){var e=this._cache,t=[];if(e.forEach((function(e,i){t.push(i)})),t.length>0)for(var i=0;i<t.length;i++)e.delete(t[i])},e.prototype.get=function(e){if("string"!=typeof e)throw"Key is not a string";var t=this._cache.get(e);return void 0===t?null:t.value},e.prototype.getValueOrUndefined=function(e){if("string"!=typeof e)throw"Key is not a string";var t=this._cache.get(e);return void 0===t?void 0:t.value},e.prototype.getOrSet=function(e,t){var i=this.get(e);return null!=i||(i=t(),this.set(e,i)),i},e.prototype.set=function(e,t){if("string"!=typeof e)throw"Key is not a string";this._cache.set(e,new i(t))},e}();t.ObjectCache=n},576:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Url=void 0;var n=i(7582),a=i(5074),r=function(){function e(){}return e.loadScriptAsync=function(e){return new Promise((function(t,i){var n=document.createElement("script");n.src=e,n.async=!0,n.onload=function(){t()};var a=document.getElementsByTagName("script")[0];null!==a.parentNode&&a.parentNode.insertBefore(n,a)}))},e.loadStyleAsync=function(e){return new Promise((function(t,i){var n=document.createElement("link");n.href=e,n.rel="stylesheet",n.onload=function(){t()};var a=document.getElementsByTagName("link")[0];(null==a?void 0:a.parentNode)?a.parentNode.insertBefore(n,a):document.head.appendChild(n)}))},e.loadStylesSync=function(t){return(0,n.__awaiter)(this,void 0,Promise,(function(){var i,a=this;return(0,n.__generator)(this,(function(r){return i=function(e,t){return(0,n.__awaiter)(a,void 0,void 0,(function(){var i,a,r;return(0,n.__generator)(this,(function(n){switch(n.label){case 0:i=0,a=e,n.label=1;case 1:return i<a.length?(r=a[i],[4,t(r)]):[3,4];case 2:n.sent(),n.label=3;case 3:return i++,[3,1];case 4:return[2]}}
1))}))},[2,i(t,e.loadStyleAsync)]}))}))},e._isJqueryAlreadyLoaded=function(e){return/(^|\/)jquery[-.]\d[^/]*\.js(\?|$)/i.test(e)&&"function"==typeof window.jQuery},e.loadScriptSync=function(t){return(0,n.__awaiter)(this,void 0,Promise,(function(){var i,a=this;return(0,n.__generator)(this,(function(r){return i=function(t,i){return(0,n.__awaiter)(a,void 0,void 0,(function(){var a,r,s;return(0,n.__generator)(this,(function(n){switch(n.label){case 0:a=0,r=t,n.label=1;case 1:return a<r.length?(s=r[a],e._isJqueryAlreadyLoaded(s)?[3,3]:[4,i(s)]):[3,4];case 2:n.sent(),n.label=3;case 3:return a++,[3,1];case 4:return[2]}}))}))},[2,i(t,e.loadScriptAsync)]}))}))},e.getQueryModel=function(e){var t=this.getQueryString(e);if(null==t||""===t.trim())return null;try{return JSON.parse(t)}catch(e){return null}},e.getQueryString=function(e){var t=window.location.href;e=e.replace(/[\[\]]/g,"\\$&");var i=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)").exec(t);return i?i[2]?decodeURIComponent(i[2].replace(/\+/g," ")):"":null},e.updateQueryString=function(e,t,i){void 0===i&&(i=null),i||(i=window.location.href);var n,a=new RegExp("([?&])"+e+"=.*?(&|#|$)(.*)","gi");if(a.test(i))return null!=t?i.replace(a,"$1"+e+"="+t+"$2$3"):(n=i.split("#"),i=n[0].replace(a,"$1$3").replace(/(&|\?)$/,""),void 0!==n[1]&&null!==n[1]&&(i+="#"+n[1]),i);if(null!=t){var r=-1!==i.indexOf("?")?"&":"?";return n=i.split("#"),i=n[0]+r+e+"="+t,void 0!==n[1]&&null!==n[1]&&(i+="#"+n[1]),i}return i},e.base64ImageToBlobUrl=function(e,t){if(t){var i=this._blobCache.get(e);if(null!==i)return i}var n;n=e.split(",")[0].indexOf("base64")>=0?atob(e.split(",")[1]):unescape(e.split(",")[1]);for(var a=e.split(",")[0].split(":")[1].split(";")[0],r=new Uint8Array(n.length),s=0;s<n.length;s++)r[s]=n.charCodeAt(s);var o=window.URL||window.webkitURL,l=new Blob([r],{type:a}),d=o.createObjectURL(l);return t&&this._blobCache.set(e,d),d},e.getLinkWithDataFromUrl=function(e){if(null==e||0===e.length)return"";var t=this.getQueryString("q");null!=t&&(e=this.updateQueryString("q",t,e));var i=this.getQueryString("oq");null!=i&&(e=this.updateQueryString("oq",i,e));var n=this.getQueryString("p");null!=n&&(e=this.updateQueryString("p",n,e));var a=this.getQueryString("w");null!=a&&(e=this.updateQueryString("w",a,e));var r=this.getQueryString("ws");null!=r&&(e=this.updateQueryString("ws",r,e));var s=this.getQueryString("as");null!=s&&(e=this.updateQueryString("as",s,e));var o=this.getQueryString("ps");null!=o&&(e=this.updateQueryString("ps",o,e));var l=this.getQueryString("hp");null!=l&&(e=this.updateQueryString("hp",l,e));var d=this.getQueryString("ax");null!=d&&(e=this.updateQueryString("ax",d,e));var c=this.getQueryString("s");null!=c&&(e=this.updateQueryString("s",c,e));var u=this.getQueryString("sf");null!=u&&(e=this.updateQueryString("sf",u,e));var p=this.getQueryString("wfolio");return null!=p&&(e=this.updateQueryString("wfolio",p,e)),e},e.getAdditionalDataFromUrl=function(){var e="",t=this.getQueryString("q");null!=t&&(e+="&q="+t);var i=this.getQueryString("oq");null!=i&&(e+="&oq="+i);var n=this.getQueryString("p");null!=n&&(e+="&p="+n);var a=this.getQueryString("w");null!=a&&(e+="&w="+a);var r=this.getQueryString("ws");null!=r&&(e+="&ws="+r);var s=this.getQueryString("as");null!=s&&(e+="&as="+s);var o=this.getQueryString("hp");null!=o&&(e+="&hp="+o);var l=this.getQueryString("ps");null!=l&&(e+="&ps="+l);var d=this.getQueryString("ax");null!=d&&(e+="&ax="+d);var c=this.getQueryString("s");null!=c&&(e+="&s="+c);var u=this.getQueryString("sf");null!=u&&(e+="&sf="+u);var p=this.getQueryString("wfolio");return null!=p&&(e="&wfolio="+p),e},e._blobCache=new a.ObjectCache,e}();t.Url=r},5727:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DateSelectorModel=void 0;var n=i(3496);t.DateSelectorModel=function(e){var t,i=this;this.syncSelectedDate=function(){i.params.selectedDate(i.month()+"/"+i.day()+"/"+i.year())},this.onDayChange=function(e){i.params.selectedDate(i.month()+"/"+e+"/"+i.year())},this.onMonthChange=function(e){i.params.selectedDate(e+"/"+i.day()+"/"+i.year())},this.onYearChange=function(e){i.params.selectedDate(i.month()+"/"+i.day()+"/"+e)},this.params=e;
1var a,r=e.selectedDate&&e.selectedDate();if(r){var s=r.split(".");if(3===s.length){var o=parseInt(s[0],10),l=parseInt(s[1],10),d=parseInt(s[2],10);a=new Date(d,l-1,o)}else a=new Date(r)}else a=new Date;this.day=ko.observable(a.getDate()),this.month=ko.observable(a.getMonth()+1),this.year=ko.observable(a.getFullYear()),this.day.subscribe(this.syncSelectedDate),this.month.subscribe(this.syncSelectedDate),this.year.subscribe(this.syncSelectedDate),this.syncSelectedDate();for(var c=null!==(t=document.documentElement.getAttribute("lang"))&&void 0!==t?t:"ru-RU",u=[],p=1;p<13;p++)u.push(new n.MonthModel(p,new Date(2025,p-1,1).toLocaleString(c,{month:"long"})));this.localizedMonths=ko.observableArray(u);var h=[];for(p=1;p<32;p++)h.push(p);this.daysAvailable=ko.observableArray(h);var v=[],m=(new Date).getFullYear();for(p=0;p<100;p++)v.push(m-p);this.yearsAvailable=ko.observableArray(v)}},3496:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MonthModel=void 0;t.MonthModel=function(e,t){this.monthVal=e,this.monthName=t}},9755:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RecaptchaModel=void 0;var n=i(3987),a=i(576),r=function(){function e(e){var t,i,a=this;this.appendScript=this.appendScript.bind(this),this.registerCallback=this.registerCallback.bind(this),this.isYandex=e.isYandexCaptcha,this.recaptchaLanguage=null!==(t=document.documentElement.getAttribute("lang"))&&void 0!==t?t:"ru";var r=this.recaptchaLanguage.indexOf("-");r>0&&(this.recaptchaLanguage=this.recaptchaLanguage.substr(0,r)),this.widgetId=ko.observable(""),this.widgetId.subscribe(e.widgetId);var s=n.Guid.newGuid().replace(/[^a-zA-Z0-9]+/g,"");/^\d/.test(s)&&(s="r"+s),this.uniqueId=s,this.isSucceed=ko.observable(!1),this.isSucceed.subscribe(e.isRecaptchaPassed),this.isVisible=null!==(i=e.isVisible)&&void 0!==i?i:ko.observable(!0),this.isLoading=ko.observable(!1),this.siteKey=e.recaptchaSiteKey,this.isVisible.subscribe((function(e){e?(a.registerCallback(),a.appendScript().then((function(){var e;null===(e=window[a.uniqueId])||void 0===e||e.call(window)}))):a.isSucceed(!1)})),this.isVisible()&&(this.registerCallback(),this.appendScript().then((function(){var e;null===(e=window[a.uniqueId])||void 0===e||e.call(window)})))}return e.prototype.appendScript=function(){var e=this;return new Promise((function(t){if(!e.isYandex){if(window.grecaptcha)return t();a.Url.loadScriptAsync("https://www.google.com/recaptcha/api.js?render=explicit&hl="+e.recaptchaLanguage).then((function(){var e=setInterval((function(){var i;(null===(i=window.grecaptcha)||void 0===i?void 0:i.render)&&(clearInterval(e),t())}),300)}))}if(e.isYandex){if(window.smartCaptcha)return t();a.Url.loadScriptAsync("https://smartcaptcha.cloud.yandex.ru/captcha.js").then((function(){var e=setInterval((function(){var i;(null===(i=window.smartCaptcha)||void 0===i?void 0:i.render)&&(clearInterval(e),t())}),300)}))}}))},e.prototype.registerCallback=function(){var e=this,t=document.createElement("div"),i=function(t){if(e.isSucceed(!0),e.isSucceed.notifySubscribers(!0),e.isYandex&&t){var i=document.getElementById("smart-token");i||((i=document.createElement("input")).type="hidden",i.name="smart-token",i.id="smart-token",document.body.appendChild(i)),i.value=t}};window[this.uniqueId]=function(){if(!e.isLoading()){e.isLoading(!0);var n=setInterval((function(){var a,r,s=document.getElementById(e.uniqueId);if(s&&!(s.childNodes.length>0)){if(!e.isYandex&&(null===(a=window.grecaptcha)||void 0===a?void 0:a.render)){clearInterval(n),s.appendChild(t);var o=window.grecaptcha.render(t,{sitekey:e.siteKey,callback:i});e.widgetId(o)}e.isYandex&&(null===(r=window.smartCaptcha)||void 0===r?void 0:r.render)&&(clearInterval(n),s.appendChild(t),t.style.transform="scale(0.8)",t.style.transformOrigin="0 0",window.smartCaptcha.render(t,{sitekey:e.siteKey,callback:i}))}}),100);setTimeout((function(){return e.isLoading(!1)}),500)}}},e}();t.RecaptchaModel=r},7853:()=>{if(!ko.bindingHandlers.cyrillic){var e=/[^а-ÑÑÐ-ЯÐ0-9\-_\s]+/g;ko.bindingHandlers.cyrillic={init:function(t,i,n){ko.utils.registerEventHandler(t,"change",(function(){var a=i(),r=t.value,s=n.get("iscyrillic");if(r&&s){for(;0==r.indexOf(" ")||r.lastIndexOf(" ")==r.length-1;)0==r.indexOf(" ")&&(r=r.substring(1)),r.lastIndexOf(" ")==r.length-1&&(r=r.substring(0,r.length-1));r=r.replace(e,""),t.value!=r&&(t.value=r)}a(r)}))}}}},8103:(e,t,i)=>
1{Object.defineProperty(t,"__esModule",{value:!0});var n=i(8797);t.default=function(){null==ko.bindingHandlers.integerValueValidator&&(ko.bindingHandlers.integerValueValidator={init:function(e,t,i,a,r){var s=e,o=t(),l=function(){var e,t=s.value,i=t.replace(/\D*/gim,""),a=n.NumberParser.parseToInt(i);if(t.length!==i.length)return s.value=a.toString(),void(o()===a?null===(e=o.valueHasMutated)||void 0===e||e.call(o):o(a));var r=n.NumberParser.parseToInt(t);o(r)};(null==a?void 0:a.isAdminExternalCalc)||e.addEventListener("keyup",l),e.addEventListener("focusout",l);var d=o();s.value=null==d?"":d.toString()},update:function(e,t,i,a,r){var s=e,o=t(),l=n.NumberParser.parseToInt(s.value),d=o();null!=d?l!==d&&(s===document.activeElement&&l<d||(s.value=d.toString())):s!==document.activeElement&&(s.value="")}})}},8869:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){null==ko.bindingHandlers.masked&&(ko.bindingHandlers.masked={init:function(e,t,i,n,a){function r(e,t){if(e.setSelectionRange)e.focus(),e.setSelectionRange(t,t);else if(e.createTextRange){var i=e.createTextRange();i.collapse(!0),i.moveEnd("character",t),i.moveStart("character",t),i.select()}}ko.utils.registerEventHandler(e,"focus",(function(){if(e.dataset.ismasked){var t=e.value,i=t.indexOf("_")>-1?t.indexOf("_"):t.length;r(e,i)}})),ko.utils.registerEventHandler(e,"keyup",(function(){var i=t(),n=e.value;if(i(n),e.dataset.ismasked){var a=n.indexOf("_")>-1?n.indexOf("_"):n.length;r(e,a)}})),ko.bindingHandlers.textInput.init(e,t,i,n,a)},update:function(e,t,i){var n=ko.unwrap(t())||"",a=ko.unwrap(i().mask),r=e.dataset.ismasked;!a&&r?(delete e.dataset.ismasked,$(e).unmask()):a&&!r&&(e.dataset.ismasked="true",$(e).mask(a)),e.value=n}})}},1236:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=i(576),a=i(7027);t.default=function(){if(null==ko.bindingHandlers.recaptcha){var e,t,i=!1,r=new Array,s=new Array,o=window;ko.bindingHandlers.recaptcha={init:function(c,u,p,h,v){var m,g=u(),S=function(n,a){if(i)!function(t,i){if(void 0!==e&&void 0!==o.smartCaptcha){i.innerHTML="";var n=document.createElement("div");i.appendChild(n),n.style.transform="scale(0.8)",n.style.transformOrigin="0 0";var a=new ResizeObserver((function(){var e=n.getBoundingClientRect().height;i.style.height=e+"px",i.parentElement&&i.parentElement.classList.contains("quickorder-footer__recaptcha")&&(i.parentElement.style.height=e+"px")}));a.observe(n),ko.utils.domNodeDisposal.addDisposeCallback(i,(function(){a.disconnect()})),o.smartCaptcha.render(n,{sitekey:e,hideShield:!0,callback:function(e){localStorage.setItem("recaptchaId",e),t(!0),t.notifySubscribers()},"expired-callback":function(){localStorage.removeItem("recaptchaId"),t(!1),t.notifySubscribers()},"error-callback":function(){localStorage.removeItem("recaptchaId"),t(!1),t.notifySubscribers()}})}else console.log("no smart capctha script")}(n,a);else if(void 0!==t&&void 0!==o.grecaptcha){if(void 0===o.grecaptcha.render)return s.push(r.bind(this,n,a)),void(1===s.length&&o.grecaptcha.ready(d));r(n,a)}function r(e,i){if(arguments.length){i.innerHTML="";var n=document.createElement("div"),a=setTimeout(s,10),r=function(){clearTimeout(a),a=setTimeout(s,10)}.bind(this);i.appendChild(n),window.addEventListener("click",r),window.addEventListener("scroll",r),document.addEventListener("resize",r),r()}function s(){var i,a,s,l,d,c;a=(i=n.getBoundingClientRect()).left,s=i.right,l=i.width,d=i.top,c=window.innerHeight||document.documentElement.clientHeight,(0!==a||0!==s||0!==l)&&d>=0&&d<c&&(o.grecaptcha.render(n,{sitekey:t,callback:f.bind(null,e),"expired-callback":y.bind(null,e),"error-callback":x.bind(null,e)}),window.removeEventListener("click",r),window.removeEventListener("scroll",r),document.removeEventListener("resize",r))}}}.bind(this,g,c);if(console.log("captcha loading"),void 0===t)return m=function(){b(S)},void $.getJSON(a.pxpGlobal.frontend.origin+"/api/account/login/getCaptchaParams",(function(n){t=n.SiteKey,(i=n.IsYandexCaptcha)&&(e=n.SiteKey),m()}));function b(e){if(i){if(void 0===o.smartCaptcha)return void 0===o.pxpBindigsYandexCaptchaOnloadHandlers&&(o.pxpBindigsYandexCaptchaOnloadHandlers=l),r.push(e),void(1===r.length&&n.Url.loadScriptAsync("https://smartcaptcha.yandexcloud.net/captcha.js?render=onload&onload=pxpBindigsYandexCaptchaOnloadHandlers"))}else if(void 0===o.grecaptcha)return void 0===o.pxpBindigsRecaptchaOnloadHandlers&&(o.pxpBindigsRecaptchaOnloadHandlers=l),r.push(e),void(1===r.length&&n.Url.loadScriptAsync("https://www.google.com/recaptcha/api.js?s=1&onload=pxpBindigsRecaptchaOnloadHandlers"));e()}function f(e,t){localStorage.setItem("recaptchaId",t),e(!0),e.notifySubscribers()}function y(e,t){localStorage.removeItem("recaptchaId"),e(!1),e.notifySubscribers()}function x(e,t){localStorage.removeItem("recaptchaId"),e(!1),e.notifySubscribers()}b(S)}}}function l(){var e,t=r.length;for(e=0;e<t;++e)r[e]();r.splice(0,r.length)}function d(){var e,t=s.length;for(e=0;e<t;++e)s[e]();s.splice(0,s.length)}}},8036:(e,t)=>
1{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){ko.extenders.numeric=function(e,t){var i=ko.pureComputed({read:e,write:function(i){var n=e();e(0);var a=isNaN(i)?n:i,r=a;if(null==t?void 0:t.precision){var s=null==(null==t?void 0:t.precision)?1:Math.pow(10,t.precision);r=Math.round(a*s)/s}null!=(null==t?void 0:t.maxValue)&&r>t.maxValue&&(r=t.maxValue),e(r),a!==n&&e.notifySubscribers(r)}}).extend({notify:"always"});return i(e()),i}}},9021:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=i(1236),a=i(8103),r=i(8869),s=i(8036);t.default=function(){(0,n.default)(),(0,a.default)(),(0,r.default)(),(0,s.default)()}},8104:t=>{t.exports=e},7582:(e,t,i)=>{i.r(t),i.d(t,{__addDisposableResource:()=>N,__assign:()=>r,__asyncDelegator:()=>k,__asyncGenerator:()=>C,__asyncValues:()=>R,__await:()=>w,__awaiter:()=>v,__classPrivateFieldGet:()=>A,__classPrivateFieldIn:()=>q,__classPrivateFieldSet:()=>T,__createBinding:()=>g,__decorate:()=>o,__disposeResources:()=>V,__esDecorate:()=>d,__exportStar:()=>S,__extends:()=>a,__generator:()=>m,__importDefault:()=>M,__importStar:()=>
vendor: 7,254 bytes, line 1
1I,__makeTemplateObject:()=>E,__metadata:()=>h,__param:()=>l,__propKey:()=>u,__read:()=>f,__rest:()=>s,__runInitializers:()=>c,__setFunctionName:()=>p,__spread:()=>y,__spreadArray:()=>_,__spreadArrays:()=>x,__values:()=>b,default:()=>F});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},n(e,t)};function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var r=function(){return r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},r.apply(this,arguments)};function s(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(i[n[a]]=e[n[a]])}return i}function o(e,t,i,n){var a,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}function l(e,t){return function(i,n){t(i,n,e)}}function d(e,t,i,n,a,r){function s(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var o,l=n.kind,d="getter"===l?"get":"setter"===l?"set":"value",c=!t&&e?n.static?e:e.prototype:null,u=t||(c?Object.getOwnPropertyDescriptor(c,n.name):{}),p=!1,h=i.length-1;h>=0;h--){var v={};for(var m in n)v[m]="access"===m?{}:n[m];for(var m in n.access)v.access[m]=n.access[m];v.addInitializer=function(e){if(p)throw new TypeError("Cannot add initializers after decoration has completed");r.push(s(e||null))};var g=(0,i[h])("accessor"===l?{get:u.get,set:u.set}:u[d],v);if("accessor"===l){if(void 0===g)continue;if(null===g||"object"!=typeof g)throw new TypeError("Object expected");(o=s(g.get))&&(u.get=o),(o=s(g.set))&&(u.set=o),(o=s(g.init))&&a.unshift(o)}else(o=s(g))&&("field"===l?a.unshift(o):u[d]=o)}c&&Object.defineProperty(c,n.name,u),p=!0}function c(e,t,i){for(var n=arguments.length>2,a=0;a<t.length;a++)i=n?t[a].call(e,i):t[a].call(e);return n?i:void 0}function u(e){return"symbol"==typeof e?e:"".concat(e)}function p(e,t,i){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:i?"".concat(i," ",t):t})}function h(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function v(e,t,i,n){return new(i||(i=Promise))((function(a,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function o(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,o)}l((n=n.apply(e,t||[])).next())}))}function m(e,t){var i,n,a,r,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return r={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function o(o){return function(l){return function(o){if(i)throw new TypeError("Generator is already executing.");for(;r&&(r=0,o[0]&&(s=0)),s;)try{if(i=1,n&&(a=2&o[0]?n.return:o[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,o[1])).done)return a;switch(n=0,a&&(o=[2&o[0],a.value]),o[0]){case 0:case 1:a=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((a=(a=s.trys).length>0&&a[a.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]<a[3])){s.label=o[1];break}if(6===o[0]&&s.label<a[1]){s.label=a[1],a=o;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(o);break}a[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{i=a=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,l])}}}var g=Object.create?function(e,t,i,n){void 0===n&&(n=i);var a=Object.getOwnPropertyDescriptor(t,i);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,a)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]};function S(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||g(t,e,i)}function b(e){var t="function"==typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function f(e,t){var i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,a,r=i.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=r.next()).done;)s.push(n.value)}catch(e){a={error:e}}finally{try{n&&!n.done&&(i=r.return)&&i.call(r)}finally{if(a)throw a.error}}return s}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(f(arguments[t]));return e}function x(){for(var e=0,t=0,i=arguments.length;t<i;t++)e+=arguments[t].length;var n=Array(e),a=0;for(t=0;t<i;t++)for(var r=arguments[t],s=0,o=r.length;s<o;s++,a++)n[a]=r[s];return n}function _(e,t,i){if(i||2===arguments.length)for(var n,a=0,r=t.length;a<r;a++)!n&&a in t||(n||(n=Array.prototype.slice.call(t,0,a)),n[a]=t[a]);return e.concat(n||Array.prototype.slice.call(t))}function w(e){return this instanceof w?(this.v=e,this):new w(e)}function C(e,t,i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,a=i.apply(e,t||[]),r=[];return n={},s("next"),s("throw"),s("return"),n[Symbol.asyncIterator]=function(){return this},n;function s(e){a[e]&&(n[e]=function(t){return new Promise((function(i,n){r.push([e,t,i,n])>1||o(e,t)}))})}function o(e,t){try{(i=a[e](t)).value instanceof w?Promise.resolve(i.value.v).then(l,d):c(r[0][2],i)}catch(e){c(r[0][3],e)}var i}function l(e){o("next",e)}function d(e){o("throw",e)}function c(e,t){e(t),r.shift(),r.length&&o(r[0][0],r[0][1])}}function k(e){var t,i;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,a){t[n]=e[n]?function(t){return(i=!i)?{value:w(e[n](t)),done:!1}:a?a(t):t}:a}}function R(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,i=e[Symbol.asyncIterator];return i?i.call(e):(e=b(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(i){t[i]=e[i]&&function(t){return new Promise((function(n,a){!function(e,t,i,n){Promise.resolve(n).then((function(t){e({value:t,done:i})}),t)}(n,a,(t=e[i](t)).done,t.value)}))}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var P=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};
1function I(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)"default"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&g(t,e,i);return P(t,e),t}function M(e){return e&&e.__esModule?e:{default:e}}function A(e,t,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(e):n?n.value:t.get(e)}function T(e,t,i,n,a){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!a)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?a.call(e,i):a?a.value=i:t.set(e,i),i}function q(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function N(e,t,i){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var n;if(i){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose]}if("function"!=typeof n)throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:n,async:i})}else i&&e.stack.push({async:!0});return t}var L="function"==typeof SuppressedError?SuppressedError:function(e,t,i){var n=new Error(i);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function V(e){function t(t){e.error=e.hasError?new L(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function i(){for(;e.stack.length;){var n=e.stack.pop();try{var a=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(a).then(i,(function(e){return t(e),i()}))}catch(e){t(e)}}if(e.hasError)throw e.error}()}const F={__extends:a,__assign:r,__rest:s,__decorate:o,__param:l,__metadata:h,__awaiter:v,__generator:m,__createBinding:g,__exportStar:S,__values:b,__read:f,__spread:y,__spreadArrays:x,__spreadArray:_,__await:w,__asyncGenerator:C,__asyncDelegator:k,__asyncValues:R,__makeTemplateOb
1ject:E,__importStar:I,__importDefault:M,__classPrivateFieldGet:A,__classPrivateFieldSet:T,__classPrivateFieldIn:q,__addDisposableResource:N,__disposeResources:V}}},i={};function n(e){var a=i[e];if(void 0!==a)return a.exports;var r=i[e]={exports:{}};return t[e](r,r.exports,n),r.exports}n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return(()=>{var e=a;Object.defineProperty(e,"__esModule",{value:!0}),e.AuthManager=void 0,n(7853);var t=n(9982),i=n(3186),r=n(588),s=n(5730),o=n(8074),l=n(6621),d=n(5073),c=n(6598),u=n(8908),p=n(7768),h=n(6670),v=n(1070),m=n(7432),g=n(9560),S=n(9755),b=n(2277),f=n(8716),y=n(6572),x=n(6962);ko.components.register("customFields",{viewModel:{createViewModel:function(e){return new v.CustomFieldsModel(e)}},template:r.default}),ko.components.register("passwordUnveiler",{viewModel:{createViewModel:function(e){return new m.PasswordUnveilerModel(e)}},template:s.default}),ko.components.register("externalServices",{viewModel:{createViewModel:function(e){return new g.ExternalServicesModel(e)}},template:o.default}),ko.components.register("recaptcha",{viewModel:{createViewModel:function(e){return new S.RecaptchaModel(e)}},template:l.default}),ko.components.register("companyRegistration",{viewModel:{createViewModel:function(e){return new b.CompanyRegistration(e)}},template:d.default});var _=function(){function e(e){var n=this;this._onChangeAvailableProceedNextButtonCollection=[],this.proceedInitResponse=this.proceedInitResponse.bind(this),this.switchManager=this.switchManager.bind(this),this.switchSignUp=this.switchSignUp.bind(this),this.switchSignIn=this.switchSignIn.bind(this),this.onChangeAvailableProceedNextButton=this.onChangeAvailableProceedNextButton.bind(this),this.dataStoreService=new c.DataStoreService(e.initManager),this.processingService=new t.AuthProcessingService(this.dataStoreService),this.currentSettings=void 0,this.currentManager=ko.observable(),this.htmlMainTemplate=i.default,this.container=e.container,this.onSucceed=e.onSucceed,this.onFailed=e.onFailed,this.onReady=e.onReady;var a=this.processingService.getAuthInitData();this.isAuthSwitchersVisible=ko.pureComputed((function(){return n.dataStoreService.requestedManager()==x.ManagerType.Register||n.dataStoreService.requestedManager()==x.ManagerType.Login})),this.dataStoreService.isSucceed.subscribe((function(e){if(e){var t=new CustomEvent("pxpUserLoggedIn",{detail:{userId:n.dataStoreService.userId}});document.dispatchEvent(t)}n.onSucceed(n.dataStoreService.userId,n.dataStoreService.loginMode())})),this.dataStoreService.isFailed.subscribe((function(){n.onFailed()})),this.dataStoreService.requestedManager(e.initManager),this.dataStoreService.requestedManager.subscribe((function(e){n.switchManager(e)})),!this.dataStoreService.userId||e.initManager!=x.ManagerType.Register&&e.initManager!=x.ManagerType.Login||(console.log("Insufficient action. Redirect to target page..."),this.onSucceed(this.dataStoreService.userId,this.dataStoreService.loginMode())),a.then((function(e){n.proceedInitResponse(e)}),(function(e){console.log(e)}))}return Object.defineProperty(e.prototype,"currentStage",{get:function(){var e=this;return null!=this._currentStage?this._currentStage:this._currentStage=ko.pureComputed((function(){var t,i;return null!==(i=null===(t=e.currentManager())||void 0===t?void 0:t.currentStage())&&void 0!==i?i:null}))},enumerable:!1,configurable:!0}),e.prototype.onChangeAvailableProceedNextButton=function(e){-1==this._onChangeAvailableProceedNextButtonCollection.indexOf(e)&&this._onChangeAvailableProceedNextButtonCollection.push(e)},e.prototype.switchManager=function(e){if(this.currentSettings)switch(e){case x.ManagerType.Login:this.currentManager(new u.LoginManager(this.dataStoreService,this.processingService,this.currentSettings,this.container));break;case x.ManagerType.Profile:this.currentManager(new y.ProfileManager(this.dataStoreService,this.processingService,this.currentSettings,this.container));break;case x.ManagerType.ShoppingCart:this.currentManager(new f.ShoppingCartManager(this.dataStoreService,this.processingService,this.currentSettings,this.container));break;case x.ManagerType.Register:this.currentManager(new p.RegisterManager(this.dataStoreService,this.processingService,this.currentSettings,this.container));break;case x.ManagerType.Restore:this.currentManager(new h.RestoreManager(this.dataStoreService,this.processingService,this.currentSettings,this.container));break;default:console.log("unknown manager requested",e)}},e.prototype.switchSignUp=function(){this.dataStoreService.requestedManager(x.ManagerType.Register);var e=document.getElementsByClassName("checkout-singin-register-wrapper")[0];e.classList.remove("active-signin"),e.classList.add("active-register")},e.prototype.switchSignIn=function(){if(this.dataStoreService.requestedManager()!=x.ManagerType.Login){this.dataStoreService.requestedManager(x.ManagerType.Login);var e=document.getElementsByClassName("checkout-singin-register-wrapper")[0];e.classList.remove("active-register"),e.classList.add("active-signin")}},e.prototype.proceedInitResponse=function(e){var t;this.currentSettings=e;var i=document.getElementsByClassName("checkout-singin-register-wrapper")[0];this.isAuthSwitchersVisible()&&(i||((i=document.createElement("div")).classList.add("checkout-singin-register-wrapper"),this.dataStoreService.requestedManager()==x.ManagerType.Register?i.classList.add("active-register"):this.dataStoreService.requestedManager()==x.ManagerType.Login&&i.classList.add("active-signin"),null===(t=this.container.parentElement)||void 0===t||t.insertBefore(i,this.container),i.appendChild(this.container)));try{this.container.appendChild(document.createRange().createContextualFragment(this.htmlMainTemplate))}catch(e){$(this.htmlMainTemplate).appendTo(this.container)}this.switchManager(this.dataStoreService.requestedManager()),ko.cleanNode(this.container),ko.applyBindings(this,this.container),"function"==typeof this.onReady&&this.onReady()},e}();e.AuthManager=_})(),a})()));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.