<footer class="footer text-center">
	<div class="container">
		<ul class="footer-ul">
			<li><a data-intgrtn-link-agreements="1" href="" class="">Website Agreement</a></li>
			<li><a data-intgrtn-link-agreements="2" href="" class="">Risk Disclaimer</a></li>
			<li><a data-intgrtn-link-agreements="3" href="" class="">Privacy Policy</a></li>
			<li><a data-intgrtn-link-report-abuse="" href="" class="">Report Abuse</a></li>
			<li><a data-intgrtn-link-contact-us="" href="" class="">Contact Us</a></li>
		</ul>
		<div data-intgrtn-agreements="" data-intgrtn-type="4" style="font-size: 12px; padding-top: 20px"></div>
	</div>
</footer>
<script src="js/device.min.js"></script>
<script src="js/swiper-bundle.min.js"></script>
<script src="js/device.min.js"></script>
<script src="js/ion.rangeSlider.min.js"></script>
<script>
    const scrollToCalc = document.querySelector('.scrollToCalc')
    const calculator = document.querySelector('.calculator')
    scrollToCalc.addEventListener('click', e => {
        e.preventDefault()
        calculator.scrollIntoView({
            block: 'center',
            behavior: 'smooth',
        })
    })

    const scrollToForm = document.querySelectorAll('.scrollToForm')
    const form2 = document.getElementById('myform2')

    scrollToForm.forEach(item => {
        item.addEventListener('click', e => {
            e.preventDefault()
            form2.scrollIntoView({
                block: 'center',
                behavior: 'smooth',
            })
        })
    })

    function formatNumber(num) {
        return num.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1 ')
    }

    function changeCounters() {
        setTimeout(function () {
            rand_users_time = Math.floor(Math.random() * 3000 + 1000)
            totalUserCount = Number.parseInt($('.totalUserCount')[0].innerText.split(' ').join(''))
            addProfit = Math.floor(Math.random() * 10 + 1)
            newProfit = totalUserCount * 1 + addProfit
            newProfit = formatNumber(newProfit)
            $('.totalUserCount').html(newProfit)

            activeUserCount = Number.parseInt($('.activeUserCount')[0].innerText.split(' ').join(''))
            isChange = Math.random() > 0.2 ? true : false
            addUser = Math.floor(Math.random() * 4 + 1)
            if (isChange) {
                newActive = activeUserCount * 1 + addUser
                newActive = formatNumber(newActive)
                $('.activeUserCount').html(newActive)
            } else {
                newActive = activeUserCount * 1 - addUser
                newActive = formatNumber(newActive)
                $('.activeUserCount').html(newActive)
            }
            changeCounters()
        }, 2500)
    }
    changeCounters()
</script>
<script>
    var swiper = new Swiper('.mySwiper', {
        slidesPerView: 2,
        spaceBetween: 15,
        allowTouchMove: false,
        autoplay: {
            delay: 3000,
        },
        loop: true,
        breakpoints: {
            1023: {
                slidesPerView: 3,
            },
        },
    })
    var swiperRewiev = new Swiper('.mySwiperReview', {
        effect: 'fade',
        pagination: {
            el: '.swiper-pagination',
            clickable: true,
        },
        autoplay: {
            delay: 5000,
            disableOnInteraction: false,
        },
        loop: true,
        slidesPerView: '1',
    })
    $('.mySwiperReview').on('mouseenter', function(e){
        swiperRewiev.autoplay.stop()
    })
    $('.mySwiperReview').on('mouseleave', function(e){
        swiperRewiev.autoplay.start()

    })

</script>
<script>
    window.intgrtnInit = function () {
        var path = "/";
        if (window.location.pathname.split("/")[2]) {
            path = "/" + window.location.pathname.split("/")[1] + "/";
        }
        window.intgrtn.setOptions({
            cookies: {
                path: path
            },
            forms: {
                signup: {
                    buttons: {
                        generatePassword: {
                            show: true,
                            text: "Generate",
                        },
                    },
                },
            },
        });
        window.intgrtn.events.on("get.project.details.success", function (response) {
            var currencySymbol = response.data.client.location.currency.symbol ? response.data.client.location.currency.symbol : '$';
            $('[data-visitor-currency-symbol]').text(currencySymbol);
            const depositRange = document.querySelector('.control__dep')
            const daysRange = document.querySelector('.control__days')
            const resultSum = document.querySelector('.output__earn')
            const resultRev = document.querySelector('.output__revenue')
            const resultProf = document.querySelector('.output__profitability')

            function updateAllInputResults() {
                const sum = depositRange.value
                const days = daysRange.value
                let coeficient = days / 12
                let profitability = sum / 4

                if (days > 30) {
                    coeficient *= 8
                    profitability *= 2
                }

                coeficient++

                resultSum.innerText = `${currencySymbol}${Math.round(sum * 8 * coeficient)
                    .toString()
                    .replace(/\B(?=(\d{3})+(?!\d))/g, ' ')}`
                resultRev.innerText = `${currencySymbol}${(Math.round(sum * 8 * coeficient) - sum)
                    .toString()
                    .replace(/\B(?=(\d{3})+(?!\d))/g, ' ')}`
                resultProf.innerText = `${Math.round(profitability)}%`
            }

            $('.control__dep').ionRangeSlider({
                min: 250,
                max: 10000,
                from: 5250,
                prefix: currencySymbol,
                onChange: function (data) {
                    updateAllInputResults(data)
                },
            })

            $('.control__days').ionRangeSlider({
                min: 1,
                max: 90,
                from: 45,
                postfix: ' days',
                onChange: function (data) {
                    updateAllInputResults(data)
                },
            })

            var names = [
                'Jenny W.',
                'Annette B.',
                'Cameron W.',
                'Guy H.',
                'Wade W.',
                'Leslie A.',
                'Jerome B.',
                'Darlene R.',
                'Conrad H.',
                'Ahmet Ö.',
                'Melanie E.',
                'Isaac G.',
                'Jörgen B.',
                'Hannah van D.',
                'Maria L.',
                'Rosella N.',
                'Kang Jun R.',
                'Archie M.',
                'Bruno M.',
                'Dario M.',
                'Olga H.',
                'Ricardo F.',
                'Paulina G.',
            ]
            var city = [
                'Argentina',
                'Brazil',
                'Canada',
                'Cyprus',
                'Germany',
                'Greece',
                'India',
                'Poland',
                'Germany',
                'Turkey',
                'Greece',
                'Peru',
                'Sweden',
                'Netherlands',
                'France',
                'New Zeland',
                'Singapore',
                'Australia',
                'Portugal',
                'Italy',
                'Czech Republic',
                'Spain',
                'Poland',
            ]

            var avatars = [
                'images/OAKOkFmkw_Z6BzH.jpg',
                'images/EVLe8yAzUnCxCx5.jpg',
                'images/SNe7CgdZxyvmZu_.jpg',
                'images/tv_JRhTRcAtJhX_.jpg',
                'images/FiUYgpGL7G9mHMC.jpg',
                'images/X05ZjtVteEDS2q3.jpg',
                'images/GGOr4oztGw2qyO8.jpg',
                'images/nYN1UrOVyxmhtyp.jpg',
                'images/MeOptekjkdRQVRP.jpg',
                'images/2QffdI3TESVo1TQ.jpg',
                'images/o2gov5Sc3dWHW5G.jpg',
                'images/LR9mlFwnjiW9h9y.jpg',
                'images/JIb9YIgPzPmrC4f.jpg',
                'images/Kdg5WtJdu0rzXLO.jpg',
                'images/z5CKYG4kGQA5aDY.jpg',
                'images/A2vPqrRF3Y3joWe.jpg',
                'images/OXusSc49ot5h_vx.jpg',
                'images/dDFfDs4woOuavtX.jpg',
                'images/qfAW0_0uGQNUfFD.jpg',
                'images/r0GSZQ4O3AAq3sY.jpg',
                'images/n566ycPRWTo4Nof.jpg',
                'images/VI7WHFUlnAeELrp.jpg',
                'images/IgIHWr7QzfVafEy.jpg'
            ]

            var cryptoCurrency = [
                'ETH/LTC',
                'EOS/ETH',
                'EOS/ETH',
                'BTC/ETH',
                'EOS/ETH',
                'EOS/ETH',
                'BTC/ETH',
                'ETH/LTC',
                'ETH/LTC',
                'EOS/ETH',
                'EOS/ETH',
                'BTC/ETH',
                'EOS/ETH',
                'EOS/ETH',
                'BTC/ETH',
                'ETH/LTC',
                'EOS/ETH',
                'EOS/ETH',
                'BTC/ETH',
                'EOS/ETH',
                'EOS/ETH',
                'BTC/ETH',
                'ETH/BTC',
            ]

            function getRandomArbitrary(min, max) {
                return Math.random() * (max - min) + min
            }

            $(document).ready(function () {
                const totalEl = names.length
                const paintElTotal = 8
                for (var i = 0; i < paintElTotal; i++) {
                    templatateRow(i)
                }
                let currEl = paintElTotal

                setInterval(function () {
                    templatateRow(currEl)
                    currEl++
                    if (currEl >= totalEl) {
                        currEl = 0
                    }
                    $('.table_row').last().remove()
                }, 3000)
            })

            function templatateRow(index) {
                let minute = new Date().getMinutes() - 1
                if (minute < 10) {
                    minute = `0${minute}`
                }
                let sec = Math.floor(getRandomArbitrary(0, 60))
                if (sec < 10) {
                    sec = `0${sec}`
                }
                let todayProfit = parseFloat(getRandomArbitrary(450, 2000)).toFixed(0)
                let tradeTime = new Date().getHours() + ':' + minute + ':' + sec

                if ($(document).width() <= 767) {
                    table_row = $(' <div class="table_row"></div>')
                    table_row.append(
                        $(
                            `<div class="column first-column"> <img src="${avatars[index]}" alt="avatar" /><div><p>${names[index]}</p><p>${cryptoCurrency[index]}</p></div>
        </div>`
                        )
                    )
                    table_row.append(
                        $(`<div class="column center-column"><p class="profit">${city[index]}</p><p class="today">${tradeTime}</p></div>`)
                    )
                    table_row.append(
                        $(
                            `<div class="column last-column"><p class="cryptoCurrency">${currencySymbol} ${todayProfit}</p><p class="status">Completed</p></div>`
                        )
                    )
                    $('.table_template').prepend(table_row)
                    return table_row
                }
                table_row = $(' <div class="table_row"></div>')
                table_row.append(
                    $(
                        `<div class="column column-1"> <img src="${avatars[index]}" alt="avatar" /><p>${names[index]}</p></div>`
                    )
                )
                table_row.append($(`<p class="column column-2">${city[index]}</p>`))
                table_row.append($(`<p class="column column-3">${currencySymbol} ${todayProfit}</p>`))
                table_row.append($(`<p class="column column-4">${cryptoCurrency[index]}</p>`))
                table_row.append($(`<p class="column column-5">${tradeTime}</p>`))
                table_row.append($(`<div class="column column-6"><img src="images/3JndEM7Ttkj0XKD.svg"
                                        alt="tiket" class="tiket"><p>Completed</p></div>`))

                $('.table_template').prepend(table_row)
                return table_row
            }
        });

        window.intgrtn.events.on('parse.data.tags.form.signup.success', function () {
            $('.intgrtn-input-holder-first-name, .intgrtn-input-holder-last-name').append('<img alt="" class="input__icon" loading="lazy" src="images/1c_yO_QHoBYQPoj.svg">');
            $('.intgrtn-input-holder-email').append('<img alt="" class="input__icon" loading="lazy" src="images/j2q0wctZiB_7NkO.svg">');
            $('.intgrtn-input-holder-phone').append('<img alt="" class="input__icon phone__icon" loading="lazy" src="images/93Z0W_6J2rq3YWT.svg">');
        });
    };



    (function (d) {
        if (window.intgrtn) {
            return;
        }
        var s = d.createElement("script");
        var date = new Date();
        s.src = "<?php echo $trackingUrl?>/api/v2/integration/app.js?v=1" + date.getFullYear().toString() + date.getMonth().toString() + date.getDate().toString() + date.getHours().toString() + Math.round(date.getMinutes() / 10).toString();
        d.getElementsByTagName("head")[0].appendChild(s);
    }(document));
</script>
