{"modal":{"title":"\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f","body":"<div class=\"row\">\n  \n  <form id=\"login-form\" action=\"https:\/\/romstal.md\/ru\/login\" method=\"post\">\n    <div class=\"col-md-12 col-sm-12 col-xs-12\">\n      <div class=\"form-group \">\n        <label for=\"LoginForm_username\" class=\"required\">E-Mail <span\n                  class=\"required\">*<\/span><\/label>\n        <input placeholder=\"E-Mail\" name=\"email\" id=\"LoginForm_username\" type=\"text\"\/>\n      <\/div>\n    <\/div>\n    <div class=\"col-md-12 col-sm-12 col-xs-12\">\n      <div class=\"form-group\">\n        <label for=\"LoginForm_password\" class=\"required\">\u041f\u0430\u0440\u043e\u043b\u044c <span\n                  class=\"required\">*<\/span><\/label>\n        <input placeholder=\"\u041f\u0430\u0440\u043e\u043b\u044c\" name=\"password\" id=\"LoginForm_password\" type=\"password\">\n      <\/div>\n    <\/div>\n    <div class=\"col-md-12 col-sm-12 col-xs-12\">\n      <div class=\"form-group\">\n        <label>\n          <input type=\"checkbox\" value=\"1\" name=\"subscribe\">\n          \u042f \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0441\u044c \u043d\u0430 \u0440\u0430\u0441\u0441\u044b\u043b\u043a\u0443, \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043b \u0438 \u0441\u043e\u0433\u043b\u0430\u0441\u0435\u043d \u0441  <a href=\"https:\/\/romstal.md\/ru\/index.php?route=information\/information&information_id=3\"\n                                          target=\"_blank\"\n                                          rel=\"noreferrer noopener\">\u043f\u043e\u043b\u0438\u0442\u0438\u043a\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0434\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/a> \n        <\/label>\n      <\/div>\n    <\/div>\n    <div class=\"col-md-12 col-sm-12 col-xs-12 text-center\">\n      <p><input class=\"btn full\" type=\"submit\" name=\"yt0\" value=\"\u0412\u043e\u0439\u0442\u0438\"\/><\/p>\n    <\/div>\n  <\/form>\n  <a id=\"fb-button\" href=\"javascript:void(0)\">\n    <img src=\"\/catalog\/view\/theme\/romstal\/img\/facebook_ico.png\" alt=\"Facebook\">\n  <\/a>\n  <a id=\"g-button\" href=\"javascript:void(0)\">\n    <img src=\"\/catalog\/view\/theme\/romstal\/img\/google_ico.png\" alt=\"Google\">\n  <\/a>\n  <script src=\"https:\/\/apis.google.com\/js\/platform.js?onload=onLoadCallback\" async defer><\/script>\n  <script>function onLoadCallback() {\n      gapi.load('auth2', () => {\n        gapi.auth2.init({client_id: '1095776730487-n08sovsldqeog4njbn4jldogmdlv7s3a.apps.googleusercontent.com'}).\n            attachClickHandler(document.getElementById('g-button'), {}, function(e) {onSignIn(e);},\n                function(e) {});\n      });\n    }\n\n    function facebookLogin() {\n      FB.getLoginStatus(function(e) {\n        FB.api('\/' + e.authResponse.userID + '\/?fields=id,name,email,first_name,last_name', 'GET', {},\n            function(e) {facebookAuth(e);});\n      });\n    }\n\n    function facebookAuth(e) {\n      let n = {\n        social_id: e.id,\n        social_name: 'facebook',\n        email: e.email,\n        name: e.name,\n        firstname: e.first_name,\n        lastname: e.last_name,\n      };\n      e.id && login(n);\n    }\n\n    function onSignIn(e) {\n      let n = {\n        social_id: e.getBasicProfile().getId(),\n        social_name: 'google',\n        email: e.getBasicProfile().getEmail(),\n        name: e.getBasicProfile().getName(),\n        firstname: e.getBasicProfile().getGivenName(),\n        lastname: e.getBasicProfile().getFamilyName(),\n      };\n      n.social_id && login(n);\n    }\n\n    function login(e) {\n      $.ajax({\n        url: '\/index.php?route=account\/login\/social&redirectUrl=' + encodeURIComponent(document.location.href),\n        data: e,\n        method: 'post',\n        dataType: 'json',\n        success: function(n) {\n          'google' === e.social_name ? gapi.auth2.getAuthInstance().\n              signOut().\n              then(function() {\n                n.redirectUrl && (!0 === n.redirectUrl ? document.location.reload() : document.location = n.redirectUrl);\n              }) : n.redirectUrl &&\n              (!0 === n.redirectUrl ? document.location.reload() : document.location = n.redirectUrl);\n        },\n      });\n    }\n\n    window.fbAsyncInit = function() {\n      FB.init({appId: '3121205304566950', xfbml: !0, version: 'v6.0'}), FB.AppEvents.logPageView();\n    }, function(e, n, t) {\n      var o, i = e.getElementsByTagName(n)[0];\n      e.getElementById(t) ||\n      ((o = e.createElement(n)).id = t, o.src = 'https:\/\/connect.facebook.net\/en_US\/sdk.js', i.parentNode.insertBefore(\n          o, i));\n    }(document, 'script', 'facebook-jssdk'), document.getElementById('fb-button').\n        addEventListener('click',\n            function() {FB.login(facebookLogin, {scope: 'email,public_profile', return_scopes: !0});}, !1);<\/script>\n<\/div>\n","footer":"<script>$(function() {\n    $('#btn-recover-password').\n        on('click', function(n) {n.preventDefault(), wsManager.loadComponent('layout').openRecoverPassword();}), $(\n        '#btn-create-account').\n        on('click', function(n) {n.preventDefault(), wsManager.loadComponent('layout').openCreateAccount();});\n  });<\/script>\n<div class=\"col-md-12 col-sm-12 col-xs-12 text-center\">\n  <div class=\"row\">\n    <div class=\"col-md-6 col-sm-6 col-xs-12\">\n      <p>\n        <a id=\"btn-create-account\" href=\"\">\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f<\/a>\n      <\/p>\n    <\/div>\n    <div class=\"col-md-6 col-sm-6 col-xs-12\">\n      <p>\n        <a id=\"btn-recover-password\" href=\"\">\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u043e\u043b\u044f<\/a>\n      <\/p>\n    <\/div>\n  <\/div>\n<\/div>\n"}}