<?php include ("header.php");?>

                <div class="dashboard-body">
                    <div class="d-flex justify-content-between mb-3 align-items-center dashboardBodyNav">
                        
                        <!---->

                        
                    </div>
                                        
 

<style>

.icon {
    margin-right: 14px;
    font-size: 1.05rem !important;
}


.right-side {
    padding: 10px 3px !important;
}

.new_fs .text {
    font-size: 0.95rem !important;
}
          h5 {
              color: #00a7e1!important;
          }
          
    /* User Ranking */

@media (max-width: 700px) {
	.ranking-list {
		max-width: 700px;
		overflow-x: auto;
		background: hsl(var(--white));
	}
}

.invest-details-link {
	height: 40px;
	width: 40px;
	line-height: 40px;
	text-align: center;
	border: 1px solid #c3bfbf;
	border-radius: 50px;
	color: #c3bfbf;
}

.invest-details-link:hover {
	border-color: #a7a7a7;
	color: #a7a7a7;
}

@media (max-width: 768px) {
	.raking-invest {
		display: block !important;
		margin: 0 auto;
		text-align: center;
	}
}

.raking-invest span:first-child {
	margin-bottom: 5px;
}

.raking-invest h5 {
	margin-bottom: 5px;
	color: hsl(var(--base));
}

.raking-common span {
	margin-bottom: 10px;
}

.raking-common h5 {
	color: hsl(var(--base));
}

.invest-badge__list {
	position: absolute;
	width: 100%;
	min-width: 290px;
	left: 205px;
	top: 0;
	opacity: 0;
	background: hsl(var(--base));
	z-index: 1;
	visibility: hidden;
	padding: 20px;
	border-radius: 10px;
	text-align: left;
}
@media (min-width: 1200px) {
    .invest-badge__list { 
        top: -8px;
    }
}

.invest-badge:hover .invest-badge__list {
	opacity: 1;
	visibility: visible
}

.invest-badge__list li span {
	width: 50%;
	font-size: 14px;
	color: hsl(var(--white))
}

@media (max-width: 767px) {
	.invest-badge__subtitle {
		font-size: 12px;
	}
}

.invest-badge__list li span:first-child {
	font-weight: 600;
	color: hsl(var(--white));
}

.invest-badge__list li {
	margin-bottom: 5px;
}


/* invest-badge start here */

.invest-badge {
	padding: 20px;
	border-radius: 10px;
	position: relative;
}

.invest-badge__thumb {
	margin-bottom: 10px;
}

.invest-badge__thumb__mask {
	content: "";
	width: 126px;
	height: 142px;
	display: inline-block;
	background: #747474;
	content: '\00a0';
    -webkit-mask: url('assets/images/user_rankings/shape.png') no-repeat 50% 50%;
    mask-image: url('assets/images/user_rankings/shape.png');
	mask-size: auto;
	-webkit-mask-size: cover;
	mask-size: contain;
	max-width: 100%;
	max-height: 100%;
	z-index: 0;
	line-height: 10;
	position: relative;
	transition: 0.5s;
}

.invest-badge:hover .badge-lock {
	background-color: #cda131;
}

.new {
	background: #cda131!importa;
}

.invest-badge__thumb__mask::before {
	position: absolute;
	content: '';
	width: 100%;
	background: #cda131;
	left: 0;
	bottom: 0;
	z-index: -1;
	transition: .3s linear;
}

.invest-badge:hover .invest-badge__thumb__mask::before {
	height: 100%;
}

.badge-lock img {
	filter: grayscale(100%);
}

.badge-lock::before {
	position: absolute;
	content: '';
	height: 100%;
	width: 100%;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 9;
	opacity: 0.1;
	background-color: transparent;
}

.invest-badge:hover .badge-lock img {
	filter: grayscale(0);
	transition: 0.5s;
}

.badge-lock::after {
    position: absolute;
    content: ''; /* Empty content */
    width: 35px; /* Set the width of your image */
    height: 35px; /* Set the height of your image */
    background: url('assets/images/user_rankings/lock.png') no-repeat center center;
    background-size: cover; /* Adjust the background size to cover the entire element */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    visibility: visible;
    transition: 0.5s;
    z-index: 99;
}



.lockk img {
	filter: grayscale(100%);
}


.badge-lockk img {
	filter: grayscale(100%);
}
 
.badge-lockkk::after {
	position: relative;
	font-family: "Font Awesome 5 Pro";
	font-weight: 900;
	font-size: 20px;
	top: 15%; 
	transform: translate(-50%, -50%);
	visibility: visible;
	transition: 0.5s;
	z-index: 99;
	color: hsl(var(--dark))
} 

.invest-badge:hover .badge-lock::after {
	visibility: hidden;
	opacity: 0;
	top: 60%;
}

.invest-badge__thumb__mask img {
	margin: 0 auto;
	width: 100px;
	height: 100px;
}


.invest-badge__details-3,
.invest-badge__details-4 {
	left: -234px;
	/* right: -92% !important; */
}

@media (max-width: 1199px) {
	.invest-badge__details {
		left: auto !important;
		right: -75% !important;
	}

	.invest-badge__detail_one {
		right: 0 !important;
		left: -75% !important;
	}
}

@media (min-width: 1200px) and (max-width: 1400px) {

	.invest-badge__details-3,
	.invest-badge__details-4 {
		left: -266px !important;
	}

	.invest-badge__details-1,
	.invest-badge__details-2 {
		right: -266px !important;
	}
}

@media (min-width: 1330px) and (max-width: 1400px) {

	.invest-badge__details-3,
	.invest-badge__details-4 {
		left: -252px !important;
	}

	.invest-badge__details-1,
	.invest-badge__details-2 {
		right: -252px !important;
	}
}


@media (max-width: 991px) {

	.invest-badge__details-1,
	.invest-badge__details-3 {
		left: auto !important;
		right: -72% !important;
	}

	.invest-badge__details-2,
	.invest-badge__details-4 {
		right: auto !important;
		left: -73% !important;
	}
}

@media (max-width: 767px) {
	.invest-badge__list {
		left: 0 !important;
		right: auto !important;
		top: 100% !important;
		z-index: 99;
		width: 290px;
	}
}

@media (max-width: 600px) {
	.invest-badge__list {
		left: 50% !important;
		top: 140% !important;
		transform: translate(-50%, -50%);
		z-index: 99;
		width: 290px;
	}

}

.invest-badge__details::before {
	position: absolute;
	content: "";
	width: 15px;
	height: 11px;
	background-color: hsl(var(--base));
	clip-path: polygon(0 0, 50% 100%, 100% 0);
	top: 50%;
    transform: translateY(-50%);
}



@media (min-width: 1200px) {

	.invest-badge__details-1::before,
	.invest-badge__details-2::before {
		left: -13px;
		transform: translateY(-50%) rotate(90deg);
	}

	.invest-badge__details-3::before,
	.invest-badge__details-4::before {
		right: -13px;
		transform:  translateY(-50%) rotate(-90deg);
	}
}

@media (max-width: 1199px) and (min-width:992px) {
	.invest-badge__detail_one::before {
		right: -13px;
		top: 46%;
		transform: translateY(-50%) rotate(-90deg);
	}

	.invest-badge__detail_two::before {
		left: -13px;
		top: 50%;
		transform:  translateY(-50%) rotate(90deg);
	}
}

@media (max-width: 991px) and (min-width:768px) {

	.invest-badge__details-1::before,
	.invest-badge__details-3::before {
		left: -13px;
		transform: rotate(90deg);
	}

	.invest-badge__details-2::before,
	.invest-badge__details-4::before {
		right: -13px;
		transform: rotate(-90deg);
	}
}

@media(max-width:767px) {
	.invest-badge__details::before {
		transform: rotate(180deg);
		top: -10px;
		left: 48%;
	}
}

.invest-badge__thumb__mask::before {
	height: var(--before-height);
}

/* Ranking Section */

.table--responsive {
    max-width: 100%;
    overflow-y: hidden; 
    overflow-x: auto;
    
}

.referral__level__item__inner {
    display: flex;
}

.referral__left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    width: 240px;
}

@media (max-width: 991px) {
    .referral__left {
        width: 180px;
    }
}
.referral__right {
    width: calc(100% - 240px);
    padding-left: 15px;
}
@media (max-width: 991px) {
    .referral__right {
        width: calc(100% - 180px);
    }
}


.referral__level__item__inner .referral__level__thumb {
    width: 40px;
    height: 40px;
    align-self: center;
}

.referral__level__item__inner .referral__level__thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.referral__level__item__inner .referral__level__name,
.referral__level__item__inner .referral__level__profit,
.referral__level__item__inner .referral__level__content {
    padding: 10px 20px;
    background: #f5f6fa;
    -webkit-border-radius: 3px;
    -moz-border-radius: 3px;
    border-radius: 3px;
    color: hsl(var(--heading));
    -webkit-transition: all ease 0.3s;
    -moz-transition: all ease 0.3s;
    transition: all ease 0.3s;
    height: 54px;
    line-height: 38px;
    line-height: 2; 
}
@media (max-width: 991px) {
    .referral__level__item__inner .referral__level__name,
    .referral__level__item__inner .referral__level__profit,
    .referral__level__item__inner .referral__level__content {
        padding: 10px;
    }
}

.referral__level__item__inner .referral__level__name:not(:last-child),
.referral__level__item__inner .referral__level__profit:not(:last-child),
.referral__level__item__inner .referral__level__content:not(:last-child) {
    margin-right: 15px;
}

.referral__level__item__inner .referral__level__profit {
    width: 100px;
}

.referral__level__item__inner .referral__level__content.custom-width {
    transition: all ease 0.3s;
}

.referral__level__item__inner .referral__level__name {
    width: 190px;
    margin-left: 10px;
    font-size: 20px;
}
@media (max-width: 991px) {
    .referral__level__item__inner .referral__level__name {
        width: 130px;
        font-size: 16px;
    }
}

.referral__level__item:hover .referral__level__item__inner .referral__level__content.custom-width {
    max-width: 1000% !important;
    transition: all ease 0.3s;
}

.referral__level__item__inner .referral__level__content__content {
    display: none;
}

.referral__level__item__inner .hover__none {
    display: flex;
}

.referral__level__item {
    position: relative;
}

.wallets__wrapper {
    background: #242731;
    border-radius: 24px;
    padding: 20px;
    padding-bottom: 25px;
}
@media only screen and (max-width: 767px) {
    .wallets__wrapper {
        margin-bottom: 40px;
        padding: 24px;
    }
}

.referral__level__item:not(:last-child) {
    margin-bottom: 15px;
}

.referral__level__item:hover .referral__level__name,
.referral__level__item:hover .referral__level__profit,
.referral__level__item:hover .referral__level__content {
    background: hsl(var(--base));
    color: #fff;
}

.referral__level__item:hover .referral__level__content {
    flex-grow: 1;
}

.referral__level__item:hover .hover__none {
    display: none;
}

.referral__level__item:hover .referral__level__content__content {
    display: flex;
}

.referral__level__item:hover .referral__tooltip {
    opacity: 1;
    visibility: visible;
    -webkit-transform: translateX(-50%);
    -ms-transform: translateX(-50%);
    transform: translateX(-50%);
}

.referral__level__item:nth-last-of-type(3) .referral__tooltip,
.referral__level__item:nth-last-of-type(2) .referral__tooltip,
.referral__level__item:nth-last-of-type(1) .referral__tooltip {
    bottom: 100%;
    top: unset;
    margin-bottom: 5px;
}

.referral__level__item:nth-last-of-type(3) .referral__tooltip::before,
.referral__level__item:nth-last-of-type(2) .referral__tooltip::before,
.referral__level__item:nth-last-of-type(1) .referral__tooltip::before {
    top: 100%;
    bottom: unset;
    clip-path: polygon(50% 100%, 0 0, 100% 0);
}

.referral__tooltip {
    position: absolute;
    top: 100%;
    left: 50%;
    -webkit-transform: translateX(-50%) translateY(15px);
    -ms-transform: translateX(-50%) translateY(15px);
    transform: translateX(-50%) translateY(15px);
    width: 100%;
    max-width: 350px;
    padding: 30px;
    text-align: center;
    font-size: 14px;
    line-height: 1.6;
    visibility: hidden;
    opacity: 0;
    -webkit-transition: all ease 0.3s;
    -moz-transition: all ease 0.3s;
    transition: all ease 0.3s;
    z-index: 9;
    border-radius: 3px; 
    margin-top: 5px;


    background: #f5f6fa;
    border: 1px solid #e5e5e5;
    box-shadow: 0px 0px 10px #dbdbdb;
}

.referral__tooltip p {
    color: hsl(var(--dark))
}

.referral__tooltip::before {
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    background: inherit;
    width: 20px;
    height: 15px;
    content: "";
    position: absolute;
    bottom: 99%;
    left: 50%;
    margin-left: -10px;
}

@media screen and (max-width: 424px) {
    .referral__tooltip {
        max-width: 280px;
        padding: 30px 15px;
    }
}

@media (max-width: 424px) {
	.referral__level__name {
		position: absolute;
		top: -20px;
		background-color: transparent !important;
		padding: 0 !important;
		line-height: 1 !important;
		font-size: 15px !important;
	}
	.referral__left {
		width: auto;
	}
	.referral__level__item {
		margin-top: 40px;
	}
	.referral__right {
		width: 100%;
	}
}


[data-theme=dark] .sidebar-menu-list__link {
    color: #000000 !important;
}

.sidebar-menu-list__link {
    text-decoration: none!important;
    position: relative!important;
     padding: 8px 13px !important;
    width: 100%!important;
    color: hsl(var(--body-color))!important;
    font-weight: 400!important;
    border-radius: 25px!important;
}

.sidebar-menu-list__item{
    margin-bottom: 6px;
}
.sidebar-submenu {
    display: none;
}
.sidebar-submenu {
    margin-left: 1rem !important;
    margin-top: .50rem !important;
}

.sidebar-menu-list__item.has-dropdown>a:after {
    position: absolute;
    content: "\f105";
    font-family: "Font Awesome 5 Pro";
    font-weight: 900;
    font-style: normal;
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    text-align: center;
    background: 0 0;
    right: 16px;
    top: 18px;
    transition: 0.1s linear;
    color: hsl(var(--body-color) / 0.6);
}

.sidebar-menu-list__item.has-dropdown.active>a:after {
    transform: rotate(90deg);
    right: 18px;
    color: hsl(var(--base));
}
      </style>
      
      
    <div class="publisher-area">
        <div class="publisher">
            <div class="">
                      
                      <div class="row gy-4 justify-content-center">
               
                                             <div class="col-md-12 mb-4">
                    <div class="wallets__wrapper text-center">
                        <div class="card-body">
                            <div class="row gy-4 align-items-center">
                                <div class="col-lg-4 col-md-6">
                                    
                                    <div class="d-flex align-items-center raking-invest ">
                                        
                                         <div class="badge-lockk">
                                        <img src="assets/images/user_rankings/66a57b3ceb0cc1722121020.png" alt="image"></div>
                                        
                                        <div>
                                            <span>My Deposit</span>
                                            <h5>$0.00 / $5,000.00</h5>
                                                                                                    <span>$5,000.00 Left To Unlock Rank</span>
                                                                                        </div>
                                    </div>
                                </div>
                                <div class="col-lg-2 col-md-6">
                                    <div class="raking-common text-center">
                                        <span>Direct Referral</span>
                                        <h5>0</h5>
                                    </div>
                                </div>
                                <div class="col-lg-3 col-md-6">
                                    <div class="raking-common text-center">
                                        <span>Referral Deposits</span>
                                        <h5>$0.00 / $0.00</h5>
                                    </div>
                                </div>
                                <div class="col-lg-3 col-md-6">
                                    <div class="raking-common text-center">
                                        <span>Bonus</span>
                                        <h5>$200.00</h5>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                        
            <br>
            
            
            <div class="categories__container">
                 <div class="col-md-12">
                <div class="row gy-4">
                                                                                                                            
                                                
                        
                                                                            <div class="col-xl-3 col-lg-4 col-md-6 col-sm-6">
                            <div class="invest-badge text-center">
                                <div class="invest-badge__thumb">
                                    <div class="invest-badge__thumb__mask new " data-progress="100" style="--before-height: 100%;">
                                        <img src="assets/images/user_rankings/66a57bb6dca411722121142.png" alt="image" style="width:100px; height: 100px;">
                                    </div>
                                </div>
                                <div class="wallets__number" style="font-weight: 600; font-size: 20px;">
                                    Iron
                                </div>
                                <!--<p class=invest-badge__subtitle>Just Testing this</p>-->
                                <div class="wallets__wrapper text-center" style="padding: 15px;">
                                
                                
                                    <ul class="invest-badge__details-1 invest-badge__detail_two">
                                    <li class="d-flex "><span style="font-weight: 600;">Level </span>
                                        <span>: 1</span>
                                    </li>
                                    <li class="d-flex "><span style="font-weight: 600;">Minimum Deposit </span>
                                        <span>: $0.00</span>
                                    </li>
                                    <li class="d-flex "><span style="font-weight: 600;">Direct Referral </span>
                                        <span>: 0</span>
                                    </li>
                                    <li class="d-flex "><span style="font-weight: 600;">Referral Deposits </span>
                                        <span>: $0.00</span>
                                    </li>
                                    <li class="d-flex "><span style="font-weight: 600;">Bonus </span>
                                        <span>: $0.00</span>
                                    </li>
                                </ul>
                                </div>
                            </div>
                        </div>
                                                                        
                                                
                                                
                                                
                        
                                                                                
                                                    <div class="col-xl-3 col-lg-4 col-md-6 col-sm-6">
                            <div class="invest-badge text-center">
                                <div class="invest-badge__thumb">
                                    <div class="invest-badge__thumb__mask new  badge-lockk " data-progress="0" style="--before-height: 0%;">
                                        <img src="assets/images/user_rankings/66a57b3ceb0cc1722121020.png" alt="image" style="width:100px; height: 100px;">
                                    </div>
                                </div>
                                <div class="wallets__number" style="font-weight: 600; font-size: 20px;">
                                    Bronze
                                </div>
                                <!--<p class=invest-badge__subtitle>none</p>-->
                                <div class="wallets__wrapper text-center" style="padding: 15px;">
                                
                                
                                    <ul class="invest-badge__details-2 invest-badge__detail_two">
                                    <li class="d-flex "><span style="font-weight: 600;">Level </span>
                                        <span>: 2</span>
                                    </li>
                                    <li class="d-flex "><span style="font-weight: 600;">Minimum Deposit </span>
                                        <span>: $5,000.00</span>
                                    </li>
                                    <li class="d-flex "><span style="font-weight: 600;">Direct Referral </span>
                                        <span>: 0</span>
                                    </li>
                                    <li class="d-flex "><span style="font-weight: 600;">Referral Deposits </span>
                                        <span>: $0.00</span>
                                    </li>
                                    <li class="d-flex "><span style="font-weight: 600;">Bonus </span>
                                        <span>: $200.00</span>
                                    </li>
                                </ul>
                                </div>
                            </div>
                        </div>
                                                                        
                                                
                                                
                                                
                        
                                                                                
                        <div class="col-xl-3 col-lg-4 col-md-6 col-sm-6">
                            <div class="invest-badge text-center">
                                <div class="invest-badge__thumb">
                                    <div class="invest-badge__thumb__mask badge-lock  badge-lockk " data-progress="0" style="--before-height: 0%;">
                                        <img src="assets/images/user_rankings/66a57b3ceb0cc1722121020.png" alt="image" style="width:100px; height: 100px;">
                                    </div>
                                </div>
                                <div class="wallets__number" style="font-weight: 600; font-size: 20px;">
                                    Bronze Pro
                                </div>
                                <!--<p class=invest-badge__subtitle>none</p>-->
                                <div class="wallets__wrapper text-center" style="padding: 15px;">
                                
                                
                                    <ul class="invest-badge__details-3 invest-badge__detail_one">
                                    <li class="d-flex "><span style="font-weight: 600;">Level </span>
                                        <span>: 3</span>
                                    </li>
                                    <li class="d-flex "><span style="font-weight: 600;">Minimum Deposit </span>
                                        <span>: $10,000.00</span>
                                    </li>
                                    <li class="d-flex "><span style="font-weight: 600;">Direct Referral </span>
                                        <span>: 0</span>
                                    </li>
                                    <li class="d-flex "><span style="font-weight: 600;">Referral Deposits </span>
                                        <span>: $0.00</span>
                                    </li>
                                    <li class="d-flex "><span style="font-weight: 600;">Bonus </span>
                                        <span>: $250.00</span>
                                    </li>
                                </ul>
                                </div>
                            </div>
                        </div>
                                                                        
                                                
                                                
                                                
                        
                                                                                
                                                    <div class="col-xl-3 col-lg-4 col-md-6 col-sm-6">
                            <div class="invest-badge text-center">
                                <div class="invest-badge__thumb">
                                    <div class="invest-badge__thumb__mask badge-lock  badge-lockk " data-progress="0" style="--before-height: 0%;">
                                        <img src="assets/images/user_rankings/66928c5d723ca1720880221.png" alt="image" style="width:100px; height: 100px;">
                                    </div>
                                </div>
                                <div class="wallets__number" style="font-weight: 600; font-size: 20px;">
                                    Silver
                                </div>
                                <!--<p class=invest-badge__subtitle>PDT level</p>-->
                                <div class="wallets__wrapper text-center" style="padding: 15px;">
                                
                                
                                    <ul class="invest-badge__details-4 invest-badge__detail_two">
                                    <li class="d-flex "><span style="font-weight: 600;">Level </span>
                                        <span>: 4</span>
                                    </li>
                                    <li class="d-flex "><span style="font-weight: 600;">Minimum Deposit </span>
                                        <span>: $25,000.00</span>
                                    </li>
                                    <li class="d-flex "><span style="font-weight: 600;">Direct Referral </span>
                                        <span>: 0</span>
                                    </li>
                                    <li class="d-flex "><span style="font-weight: 600;">Referral Deposits </span>
                                        <span>: $0.00</span>
                                    </li>
                                    <li class="d-flex "><span style="font-weight: 600;">Bonus </span>
                                        <span>: $1,000.00</span>
                                    </li>
                                </ul>
                                </div>
                            </div>
                        </div>
                                                                        
                                                
                                                
                                                
                        
                                                                                
                                                    <div class="col-xl-3 col-lg-4 col-md-6 col-sm-6">
                            <div class="invest-badge text-center">
                                <div class="invest-badge__thumb">
                                    <div class="invest-badge__thumb__mask badge-lock  badge-lockk " data-progress="0" style="--before-height: 0%;">
                                        <img src="assets/images/user_rankings/66928c5d723ca1720880221.png" alt="image" style="width:100px; height: 100px;">
                                    </div>
                                </div>
                                <div class="wallets__number" style="font-weight: 600; font-size: 20px;">
                                    Silver Pro
                                </div>
                                <!--<p class=invest-badge__subtitle>PDT level</p>-->
                                <div class="wallets__wrapper text-center" style="padding: 15px;">
                                
                                
                                    <ul class="invest-badge__details-1 invest-badge__detail_two">
                                    <li class="d-flex "><span style="font-weight: 600;">Level </span>
                                        <span>: 5</span>
                                    </li>
                                    <li class="d-flex "><span style="font-weight: 600;">Minimum Deposit </span>
                                        <span>: $50,000.00</span>
                                    </li>
                                    <li class="d-flex "><span style="font-weight: 600;">Direct Referral </span>
                                        <span>: 0</span>
                                    </li>
                                    <li class="d-flex "><span style="font-weight: 600;">Referral Deposits </span>
                                        <span>: $0.00</span>
                                    </li>
                                    <li class="d-flex "><span style="font-weight: 600;">Bonus </span>
                                        <span>: $1,300.00</span>
                                    </li>
                                </ul>
                                </div>
                            </div>
                        </div>
                                                                        
                                                
                                                
                                                
                        
                                                                                
                                                    <div class="col-xl-3 col-lg-4 col-md-6 col-sm-6">
                            <div class="invest-badge text-center">
                                <div class="invest-badge__thumb">
                                    <div class="invest-badge__thumb__mask badge-lock  badge-lockk " data-progress="0" style="--before-height: 0%;">
                                        <img src="assets/images/user_rankings/64f904f19bf161694041329.png" alt="image" style="width:100px; height: 100px;">
                                    </div>
                                </div>
                                <div class="wallets__number" style="font-weight: 600; font-size: 20px;">
                                    Gold
                                </div>
                                <!--<p class=invest-badge__subtitle>Double Session
Account capital security</p>-->
                                <div class="wallets__wrapper text-center" style="padding: 15px;">
                                
                                
                                    <ul class="invest-badge__details-2 invest-badge__detail_one">
                                    <li class="d-flex "><span style="font-weight: 600;">Level </span>
                                        <span>: 6</span>
                                    </li>
                                    <li class="d-flex "><span style="font-weight: 600;">Minimum Deposit </span>
                                        <span>: $100,000.00</span>
                                    </li>
                                    <li class="d-flex "><span style="font-weight: 600;">Direct Referral </span>
                                        <span>: 0</span>
                                    </li>
                                    <li class="d-flex "><span style="font-weight: 600;">Referral Deposits </span>
                                        <span>: $0.00</span>
                                    </li>
                                    <li class="d-flex "><span style="font-weight: 600;">Bonus </span>
                                        <span>: $2,000.00</span>
                                    </li>
                                </ul>
                                </div>
                            </div>
                        </div>
                                                                        
                                                
                                                
                                                
                        
                                                                                
                                                    <div class="col-xl-3 col-lg-4 col-md-6 col-sm-6">
                            <div class="invest-badge text-center">
                                <div class="invest-badge__thumb">
                                    <div class="invest-badge__thumb__mask badge-lock  badge-lockk " data-progress="0" style="--before-height: 0%;">
                                        <img src="assets/images/user_rankings/64f90442649f51694041154.png" alt="image" style="width:100px; height: 100px;">
                                    </div>
                                </div>
                                <div class="wallets__number" style="font-weight: 600; font-size: 20px;">
                                    Gold Pro
                                </div>
                                <!--<p class=invest-badge__subtitle></p>-->
                                <div class="wallets__wrapper text-center" style="padding: 15px;">
                                
                                
                                    <ul class="invest-badge__details-3 invest-badge__detail_two">
                                    <li class="d-flex "><span style="font-weight: 600;">Level </span>
                                        <span>: 7</span>
                                    </li>
                                    <li class="d-flex "><span style="font-weight: 600;">Minimum Deposit </span>
                                        <span>: $250,000.00</span>
                                    </li>
                                    <li class="d-flex "><span style="font-weight: 600;">Direct Referral </span>
                                        <span>: 0</span>
                                    </li>
                                    <li class="d-flex "><span style="font-weight: 600;">Referral Deposits </span>
                                        <span>: $0.00</span>
                                    </li>
                                    <li class="d-flex "><span style="font-weight: 600;">Bonus </span>
                                        <span>: $3,000.00</span>
                                    </li>
                                </ul>
                                </div>
                            </div>
                        </div>
                                                                        
                                                
                                                
                        
                                                                            
                                                
                        
                                                                                
                                                    <div class="col-xl-3 col-lg-4 col-md-6 col-sm-6">
                            <div class="invest-badge text-center">
                                <div class="invest-badge__thumb">
                                    <div class="invest-badge__thumb__mask badge-lock  badge-lockk " data-progress="0" style="--before-height: 0%;">
                                        <img src="assets/images/user_rankings/64f90492d24c51694041234.png" alt="image" style="width:100px; height: 100px;">
                                    </div>
                                </div>
                                <div class="wallets__number" style="font-weight: 600; font-size: 20px;">
                                    Diamond
                                </div>
                                <!--<p class=invest-badge__subtitle></p>-->
                                <div class="wallets__wrapper text-center" style="padding: 15px;">
                                
                                
                                    <ul class="invest-badge__details-4 invest-badge__detail_two">
                                    <li class="d-flex "><span style="font-weight: 600;">Level </span>
                                        <span>: 8</span>
                                    </li>
                                    <li class="d-flex "><span style="font-weight: 600;">Minimum Deposit </span>
                                        <span>: $500,000.00</span>
                                    </li>
                                    <li class="d-flex "><span style="font-weight: 600;">Direct Referral </span>
                                        <span>: 10</span>
                                    </li>
                                    <li class="d-flex "><span style="font-weight: 600;">Referral Deposits </span>
                                        <span>: $250,000.00</span>
                                    </li>
                                    <li class="d-flex "><span style="font-weight: 600;">Bonus </span>
                                        <span>: $20,000.00</span>
                                    </li>
                                </ul>
                                </div>
                            </div>
                        </div>
                                                                        
                                                
                                                
                        
                                                                            
                                                
                        
                                                                                
                                                    <div class="col-xl-3 col-lg-4 col-md-6 col-sm-6">
                            <div class="invest-badge text-center">
                                <div class="invest-badge__thumb">
                                    <div class="invest-badge__thumb__mask badge-lock  badge-lockk " data-progress="0" style="--before-height: 0%;">
                                        <img src="assets/images/user_rankings/64fa504cce3f51694126156.png" alt="image" style="width:100px; height: 100px;">
                                    </div>
                                </div>
                                <div class="wallets__number" style="font-weight: 600; font-size: 20px;">
                                    Ambassador
                                </div>
                                <!--<p class=invest-badge__subtitle></p>-->
                                <div class="wallets__wrapper text-center" style="padding: 15px;">
                                
                                
                                    <ul class="invest-badge__details-1 invest-badge__detail_one">
                                    <li class="d-flex "><span style="font-weight: 600;">Level </span>
                                        <span>: 9</span>
                                    </li>
                                    <li class="d-flex "><span style="font-weight: 600;">Minimum Deposit </span>
                                        <span>: $1,000,000.00</span>
                                    </li>
                                    <li class="d-flex "><span style="font-weight: 600;">Direct Referral </span>
                                        <span>: 12</span>
                                    </li>
                                    <li class="d-flex "><span style="font-weight: 600;">Referral Deposits </span>
                                        <span>: $250,000.00</span>
                                    </li>
                                    <li class="d-flex "><span style="font-weight: 600;">Bonus </span>
                                        <span>: $50,000.00</span>
                                    </li>
                                </ul>
                                </div>
                            </div>
                        </div>
                                    </div>
            </div>
            </div>
          </div>

        </div>
      </div>
      
    </div>
    

<script src="https://code.jquery.com/jquery-3.6.4.min.js" type="text/javascript"></script>

                </div>
                  </div> 
        </div>
    </div>
                    
                    <style>
    .form--control:disabled, .form--control[readonly] {
        background-color: #00000029!important;
    }
    
    .thumb {
    width: 30px!important;
    height: 30px!important;
    margin-bottom: 15px;
    -webkit-border-radius: 50%;
    border: 2px solid #ffffff!important;
    box-shadow: 0 5px 10px 0 rgba(0, 0, 0, 0.2)!important;
}


</style>
<div class="offcanvas offcanvas-end p-5" tabindex="-1" id="deposit-canvas" aria-labelledby="offcanvasLabel">
    <div class="offcanvas-header">
        <h4 class="mb-0 fs-18 offcanvas-title">
            Deposit Preview        </h4>
        <button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas" aria-label="Close" id="close-deposit-canvas">
            <i class="fa fa-times-circle"></i>
        </button>
    </div>
    <div class="offcanvas-body">
        <form onsubmit="if (!window.__cfRLUnblockHandlers) return false; depositController('user/deposit/insert')" method="post" autocomplete="off" id="formDeposit">
            <input type="hidden" name="_token" value="xrir56d07i6w4qiwr8PMfIPeXZZSklIZeSAmE0Xv">            <input type="hidden" name="currency" value="USD">
            
            <div class="form-group">
                <label class="form-label" for="gateway">Gateway</label>
                <select class="form-control form--control form-select" name="gateway" id="gateway">
                    
                        <option selected="" disabled="">Select Payment Gateway</option>
                                                    <option value="1000" data-name="USDT-Erc20" data-currency="USDT" data-src="assets/images/currency/66560535b7d4c1716913461.png">
                                USDT-Erc20
                            </option>
                                                    <option value="1001" data-name="Bitcoin" data-currency="BTC" data-src="assets/images/currency/668eb02db15df1720627245.png">
                                Bitcoin
                            </option>
                                                    <option value="1002" data-name="BNB" data-currency="BNB" data-src="assets/images/currency/6656117aaa2af1716916602.png">
                                BNB
                            </option>
                                                    <option value="1003" data-name="Ethereum" data-currency="ETH" data-src="assets/images/currency/665611337876b1716916531.jpg">
                                Ethereum
                            </option>
                                                    <option value="1004" data-name="Litecoin" data-currency="LTC" data-src="assets/images/currency/6656126be4c161716916843.jpg">
                                Litecoin
                            </option>
                                                    <option value="1005" data-name="Dogecoin" data-currency="DOGE" data-src="assets/images/currency/665611bc7c15c1716916668.jpg">
                                Dogecoin
                            </option>
                                                    <option value="1006" data-name="Bitcoin Cash" data-currency="BCH" data-src="assets/images/currency/66916b14097f31720806164.png">
                                Bitcoin Cash
                            </option>
                                                    <option value="1007" data-name="USDT-Trc20" data-currency="USDT" data-src="assets/images/currency/66560535b7d4c1716913461.png">
                                USDT-Trc20
                            </option>
                                     
                </select>
            </div>
            
            
            <div class="form-group">
                <label class="form-label required">Amount</label>
                <div class="input-group">
                    <input type="number" step="any" class="form--control form-control" name="amount" id="amount" required="" disabled="">
                    <span class="input-group-text text-white deposit-currency-symbol">USD</span>
                </div>
            </div>
            
            
            <input type="hidden" name="wallet_type" value="funding">

            <div class="form-group preview-details d-none" id="preview-details">
                <ul class="list-group list-group-flush">
                    <li class="list-group-item d-flex flex-wrap justify-content-between">
                        <span>Amount</span>
                        <span>
                            <span class="payable fw-bold" id="payable">0</span>
                            <span class="deposit-currency-symbol">USD</span>
                        </span>
                    </li>
                    <li class="list-group-item d-flex flex-wrap justify-content-between">
                        <div class="d-flex">
                            <span>Method:</span>
                            <span class="method_name mx-2"></span>
                            <span class="method_icon"></span>
                        </div>
                        <span>
                            <span class="method_rate fw-bold" id="">0</span>
                            <span class="method_currency"></span>
                        </span>
                    </li>
                    
                </ul>
            </div>
            <input class="methodnew_rate" type="hidden" value="" name="rate">
            <button class="deposit__button btn btn--base w-100" type="submit">Submit</button>
        </form>
        <div class="p-5 text-center empty-gateway  d-none ">
            <img src="assets/images/extra_images/no_money.png">
            
        </div>
    </div>
</div>

<script type="text/javascript">

document.addEventListener('DOMContentLoaded', function () {
    const amountInput = document.getElementById('amount');
    const previewDetails = document.getElementById('preview-details');
    const gatewaySelect = document.getElementById('gatewaySelect');
    const payableElement = document.getElementById('payable');
    const methodNameElement = document.querySelector('.method_name');
    const methodCurrencyElement = document.querySelector('.method_currency');
    const methodRateElement = document.querySelector('.method_rate');
    const methodIconElement = document.querySelector('.method_icon');
    const methodnewElement = document.querySelector('.methodnew_rate');
    
    let rate = 0;
    let toFixDigit = 2;
    let curr = '';
    
    $('select[name="gateway"]').change(function(){
        if ($('select[name="gateway"]').val() !== '') {
            amountInput.disabled = false;
            var selectedOption = $('select[name="gateway"] option:selected');
            var icon = selectedOption.data('src');
            var name = selectedOption.data('name');
            curr = selectedOption.data('currency');

            methodNameElement.textContent = name;
            methodCurrencyElement.textContent = curr;
            methodIconElement.innerHTML = '<img src="' + icon + '" alt="Method Icon" class="thumb">';
            
            if (curr == 'BCH'){
                rate = 0.0023;
                toFixDigit = 3;
            } else if (curr == 'BTC'){
                rate = 0.00001107;
                toFixDigit = 6;
            } else if (curr == 'ETH'){
                rate = 0.0003;
                toFixDigit = 3;
            } else if (curr == 'LTC'){
                rate = 0.0124;
                toFixDigit = 3;
            } else if (curr == 'XRP'){
                rate = 1.3884;
                toFixDigit = 3;
            } else if (curr == 'DOGE'){
                rate = 2.5504;
                toFixDigit = 3;
            } else if (curr == 'USDT' || curr == 'USDT-Trc20'){
                rate = 1;
                toFixDigit = 2;
            } else if (curr == 'BNB'){
                rate = 0.00158;
                toFixDigit = 4;
            }
            
            // Update the payable and method rate based on the selected gateway
            var amount = parseFloat(amountInput.value);
            if (!isNaN(amount) && amount > 0) {
                var payable = amount;
                payableElement.textContent = payable.toLocaleString();
                methodRateElement.textContent = (amount * rate).toFixed(toFixDigit);
                methodnewElement.value = (amount * rate).toFixed(toFixDigit);
                previewDetails.classList.remove('d-none');
            } else {
                previewDetails.classList.add('d-none');
            }
        } else {
            amountInput.disabled = true;
        }
    });

    amountInput.addEventListener('input', function (e) {
        var amount = parseFloat(e.target.value);
        // Always show the preview details
        previewDetails.classList.remove('d-none');

        if (!isNaN(amount) && amount > 0) {
            var payable = amount;
            payableElement.textContent = payable.toLocaleString();
            methodRateElement.textContent = (amount * rate).toFixed(toFixDigit);
            methodnewElement.value = (amount * rate).toFixed(toFixDigit);
        } else {
            // Hide preview details if amount is invalid or zero
            previewDetails.classList.add('d-none');
        }
    });
});


function formatNumberWithCommas(number) {
    return number.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
}



</script>
                    <style>
    .form--control:disabled, .form--control[readonly] {
        background-color: #00000029!important;
    }
    
    .thumb {
    width: 30px!important;
    height: 30px!important;
    margin-bottom: 15px;
    -webkit-border-radius: 50%;
    border: 2px solid #ffffff!important;
    box-shadow: 0 5px 10px 0 rgba(0, 0, 0, 0.2)!important;
}
</style>
<div class="offcanvas offcanvas-end p-3 p-md-5" tabindex="-1" id="withdraw-offcanvas">
    <div class="offcanvas-header">
        <h4 class="mb-0 fs-18 offcanvas-title">
            Withdrawal Preview        </h4>
        <button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas" aria-label="Close" id="close-withdraw-canvas">
            <i class="fa fa-times-circle"></i>
        </button>
    </div>
    <div class="offcanvas-body">
        <form onsubmit="if (!window.__cfRLUnblockHandlers) return false; withdrawController('user/withdraw/withdraw-post')" method="post" autocomplete="off" id="formWithdraw">
            <input type="hidden" name="_token" value="xrir56d07i6w4qiwr8PMfIPeXZZSklIZeSAmE0Xv">            <input type="hidden" name="with_currency" value="USD">
            
             <div class="form-group">
                <label class="form-label" for="wallet">Wallet Type</label>
                <select class="form-control form--control form-select" name="wallet" id="wallet">
                  <option value="1" selected="">Deposit Balance</option>
                  <option value="2">Profit Balance</option>
                </select>
            </div>
            
            <div class="form-group">
                <label class="form-label" for="with_gateway">Gateway</label>
                <select class="form-control form--control form-select" name="with_gateway" id="with_gateway">
              
                        <option selected="" disabled="">Select Payment Gateway</option>
                                                    <option value="1000" data-name="USDT-Erc20" data-currency="USDT" data-src="assets/images/currency/66560535b7d4c1716913461.png">
                                USDT-Erc20
                            </option>
                                                    <option value="1001" data-name="Bitcoin" data-currency="BTC" data-src="assets/images/currency/668eb02db15df1720627245.png">
                                Bitcoin
                            </option>
                                                    <option value="1002" data-name="BNB" data-currency="BNB" data-src="assets/images/currency/6656117aaa2af1716916602.png">
                                BNB
                            </option>
                                                    <option value="1003" data-name="Ethereum" data-currency="ETH" data-src="assets/images/currency/665611337876b1716916531.jpg">
                                Ethereum
                            </option>
                                                    <option value="1004" data-name="Litecoin" data-currency="LTC" data-src="assets/images/currency/6656126be4c161716916843.jpg">
                                Litecoin
                            </option>
                                                    <option value="1005" data-name="Dogecoin" data-currency="DOGE" data-src="assets/images/currency/665611bc7c15c1716916668.jpg">
                                Dogecoin
                            </option>
                                                    <option value="1006" data-name="Bitcoin Cash" data-currency="BCH" data-src="assets/images/currency/66916b14097f31720806164.png">
                                Bitcoin Cash
                            </option>
                                                    <option value="1007" data-name="USDT-Trc20" data-currency="USDT" data-src="assets/images/currency/66560535b7d4c1716913461.png">
                                USDT-Trc20
                            </option>
                                    
                </select>
            </div>
            
            
            <div class="form-group">
                <label class="form-label required">Amount</label>
                <div class="input-group">
                    <input type="number" step="any" class="form--control form-control" name="with_amount" id="with_amount" required="" disabled="">
                    <span class="input-group-text text-white deposit-currency-symbol">USD</span>
                </div>
            </div>
            
            
            <input type="hidden" name="wallet_type" value="funding">

            <div class="form-group with_preview-details d-none" id="with_preview-details">
                <ul class="list-group list-group-flush">
                    <li class="list-group-item d-flex flex-wrap justify-content-between">
                        <span>Amount</span>
                        <span>
                            <span class="payable fw-bold" id="with_payable">0</span>
                            <span class="deposit-currency-symbol">USD</span>
                        </span>
                    </li>
                    <li class="list-group-item d-flex flex-wrap justify-content-between">
                        <div class="d-flex">
                            <span>Method:</span>
                            <span class="with_method_name mx-2"></span>
                            <span class="with_method_icon"></span>
                        </div>
                        <span>
                            <span class="with_method_rate fw-bold" id="">0</span>
                            <span class="with_method_currency"></span>
                        </span>
                    </li>
                    
                     <li class="list-group-item d-flex flex-wrap justify-content-between">
                        <span>Min. Deposit</span>
                        <span>
                            <span class="min fw-bold">50</span>
                            <span class="deposit-currency-symbol">USD</span>
                        </span>
                    </li>
                </ul>
            </div>
            <input class="with_methodnew_rate" type="hidden" value="" name="with_rate">
            <button class="deposit__button btn btn--base w-100" type="submit">Submit</button>
        </form>
        <div class="p-5 text-center empty-gateway  d-none ">
            <img src="assets/images/extra_images/no_money.png">
        </div>
    </div>
</div>

<script type="text/javascript">

document.addEventListener('DOMContentLoaded', function () {
    const amountInput = document.getElementById('with_amount');
    const previewDetails = document.getElementById('with_preview-details');
    const gatewaySelect = document.getElementById('with_gatewaySelect');
    const payableElement = document.getElementById('with_payable');
    const methodNameElement = document.querySelector('.with_method_name');
    const methodCurrencyElement = document.querySelector('.with_method_currency');
    const methodRateElement = document.querySelector('.with_method_rate'); 
    const methodNewElement = document.querySelector('.with_methodnew_rate'); 
    const methodIconElement = document.querySelector('.with_method_icon');
    
    
    let rate = 0;
    let toFixDigit = 2;
    let curr = '';
    
    $('select[name="with_gateway"]').change(function(){

        if ($('select[name="with_gateway"]').val() !== '') {
            console.log('Testing')
            amountInput.disabled = false;
            var selectedOption = $('select[name="with_gateway"] option:selected');
            
            var icon = selectedOption.data('src');
            var name = selectedOption.data('name');
            curr = selectedOption.data('currency');

            methodNameElement.textContent = name;
            methodCurrencyElement.textContent = curr;
            methodIconElement.innerHTML = '<img src="' + icon + '" alt="Method Icon" class="thumb">';
            
            if (curr == 'BCH'){
                rate = 0.0023;
                toFixDigit = 3;
            } else if (curr == 'BTC'){
                rate = 0.00001107;
                toFixDigit = 6;
            } else if (curr == 'ETH'){
                rate = 0.0003;
                toFixDigit = 3;
            } else if (curr == 'LTC'){
                rate = 0.0124;
                toFixDigit = 3;
            } else if (curr == 'XRP'){
                rate = 1.3884;
                toFixDigit = 3;
            } else if (curr == 'DOGE'){
                rate = 2.5504;
                toFixDigit = 3;
            } else if (curr == 'USDT' || curr == 'USDT-Trc20'){
                rate = 1;
                toFixDigit = 2;
            } else if (curr == 'BNB'){
                rate = 0.00158;
                toFixDigit = 4;
            }
            
            // Update the payable and method rate based on the selected gateway
            var amount = parseFloat(amountInput.value);
            if (!isNaN(amount) && amount > 0) {
                var payable = amount;
                payableElement.textContent = payable.toLocaleString();
                methodRateElement.textContent = (amount * rate).toFixed(toFixDigit);
                methodNewElement.value = (amount * rate).toFixed(toFixDigit);
                previewDetails.classList.remove('d-none');
            } else {
                previewDetails.classList.add('d-none');
            }
        } else {
            amountInput.disabled = true;
        }
    });

    amountInput.addEventListener('input', function (e) {
        var amount = parseFloat(e.target.value);
        // Always show the preview details
        previewDetails.classList.remove('d-none');

        if (!isNaN(amount) && amount > 0) {
            var payable = amount;
            payableElement.textContent = payable.toLocaleString();
            methodRateElement.textContent = (amount * rate).toFixed(toFixDigit);
            methodNewElement.value = (amount * rate).toFixed(toFixDigit);
        } else {
            // Hide preview details if amount is invalid or zero
            previewDetails.classList.add('d-none');
        }
    });
});





</script>
    
                    <div class="p-4"></div>
                   
                    <div class="sticky--footer small--hide--mobile mt-2">
                        <div class="right-side p-2 d-flex justify-content-around">
                            
                            
                            <li>
                                <a href="user/dashboard" class="sidebar-menu-list__link new_fs ">
                                    <span class="icon"><i class="fa-duotone fa-solid fa-house"></i></span>
                                    <span class="text" style="display: none;"><b>Dashboard</b></span>
                                </a>
                            </li>
                            <li id="copytrading_mobile">
                                <a href="user/trader" class="sidebar-menu-list__link new_fs ">
                                   <div class="icon"><span class="wb-icon-copy "></span></div>
                                    <span class="text" style="display: none;"><b>Copy Trading</b></span>
                                </a>
                            </li>
                            
                            
                            <li id="history_mobile">
                                <a href="user/transactions" class="sidebar-menu-list__link new_fs ">
                                 <span class="icon"><i class="fa-duotone fa-solid fa-list-timeline"></i></span>
                                    <span class="text" style="display: none;"><b>All History</b></span>
                                </a>
                            </li>
                            
                            
                            
                            <li id="loyalty_mobile">
                                <a href="#" class="sidebar-menu-list__link new_fs" id="others-menu">
                                   <span class="icon"><i class="fa-duotone fa-solid fa-grid-round-2"></i></span>
                                    <span class="text"></span>
                                </a>
                            </li>
                            
                            
                            <li>
                                <a href="#" class="sidebar-menu-list__link new_fs ">
                                 <span class="icon"></span>
                                    <span class="text" style="display: none;"><b>Support</b></span>
                                </a>
                            </li>
                        </div>
                    </div>
                    
                    <!-- Hidden Menu -->
                    <div id="hide-menu" class="hide-menu">
                        <br>
                        <div class="d-flex justify-content-end" id="close-menu"> 
                        
                        
                        <span class="delete-icon p-3" data-bs-placement="top">
                          <i class="fa-duotone fa-solid fa-xmark fa-xl"></i>
                        </span>
                        
                    </div>
                        
                        
                      
                        <div class="hide-header">
                            
            <li class="sidebar-menu-list__item has-dropdown">
                 <a href="javascript:void(0)" class="sidebar-menu-list__link ">
                       <span class="icon"><i class="fa-duotone fa-solid fa-wallet"></i></span>
                        <span class="text">Payments</span>
                    </a>
                    <div class="sidebar-submenu  ">
                        <ul>
                    
                        
                            <li class="sidebar-menu-item">
                            <a href="user/deposit/history" class="sidebar-menu-list__link ">
                                <span class="text">Deposit</span>
                            </a>
                        </li>
                        
                         <li class="sidebar-menu-list__item ">
                            <a href="user/withdraw/history" class="sidebar-menu-list__link ">
                                <span class="text">Withdraw</span>
                            </a>
                        </li>
    
                        </ul>
                    </div>
            </li>
            
            <li class="sidebar-menu-list__item " id="p2p">
                <a href="user/ranking" class="sidebar-menu-list__link active ">
                   <span class="icon"><i class="fa-duotone fa-solid fa-award"></i></span>
                    <span class="text">Loyalty Status</span>
                </a>
            </li>
                             <li class="sidebar-menu-list__item has-dropdown">
                 <a href="javascript:void(0)" class="sidebar-menu-list__link ">
                       <span class="icon"><i class="fa-duotone fa-solid fa-chart-candlestick"></i></span>
                        <span class="text">Trade History</span>
                    </a>
                    <div class="sidebar-submenu  ">
                        <ul>
                            <li class="sidebar-menu-list__item ">
                <a href="user/trade/history" class="sidebar-menu-list__link  ">
                    <span class="text">Copy Trading History</span>
                </a>
            </li>
            
              <li class="sidebar-menu-list__item ">
                <a href="user/demo/trade/history" class="sidebar-menu-list__link ">
                   
                    <span class="text">Practice History</span>
                </a>
            </li>
    
                        </ul>
                    </div>
            </li>
            
            <li class="sidebar-menu-list__item " id="p2p">
                <a href="user/view-notifications" class="sidebar-menu-list__link  ">
                    <span class="icon"><i class="fa-duotone fa-solid fa-bell"></i></span>
                    <span class="text">All Notifications</span>
                </a>
            </li>
            
            
                   <li class="sidebar-menu-list__item has-dropdown">
                 <a href="javascript:void(0)" class="sidebar-menu-list__link ">
                        <span class="icon"><i class="fa-duotone fa-solid fa-globe"></i></span>
                        <span class="text">Market Tools</span>
                    </a>
                    <div class="sidebar-submenu  ">
                        <ul>
                            <li class="sidebar-menu-list__item ">
                <a href="user/ideas" class="sidebar-menu-list__link  ">
                    <span class="text">Technical Insight</span>
                </a>
            </li>
            
              <li class="sidebar-menu-list__item ">
                <a href="user/education" class="sidebar-menu-list__link ">
                    
                    <span class="text">Trading Courses</span>
                </a>
            </li>
            
               <li class="sidebar-menu-list__item ">
                <a href="user/economic-calendar" class="sidebar-menu-list__link  ">
                    <span class="text">Economic Calendar</span>
                </a>
            </li>
    
                        </ul>
                    </div>
            </li>
            
            
            <li class="sidebar-menu-list__item ">
                <a href="user/settings" class="sidebar-menu-list__link ">
                    <span class="icon"><i class="fa-duotone fa-solid fa-sliders"></i></span>
                    <span class="text">Settings</span>
                </a>
            </li>
            
            
            <li class="sidebar-menu-list__item has-dropdown">
                 <a href="javascript:void(0)" class="sidebar-menu-list__link ">
                        <span class="icon"><i class="fa-duotone fa-solid fa-circle-ellipsis"></i></span>
                        <span class="text">More</span>
                    </a>
                    <div class="sidebar-submenu  ">
                        <ul>
                      
            
              <li class="sidebar-menu-list__item ">
                <a href="user/kyc-form" class="sidebar-menu-list__link ">
                    
                    <span class="text">Account Verification</span>
                </a>
            </li>
            
             <li class="sidebar-menu-list__item ">
                <a href="user/login/history" class="sidebar-menu-list__link ">
                    
                    <span class="text">Login History</span>
                </a>
            </li>
    
                        </ul>
                    </div>
            </li>
            
           
            
            <!--<li class="sidebar-menu-list__item ">-->
            <!--    <a href="user/referrals" class="sidebar-menu-list__link ">-->
            <!--        <span class="icon"><span class="icon-affiliation"></span></span>-->
            <!--        <span class="text">Referrals</span>-->
            <!--    </a>-->
            <!--</li>-->
            
            
            <li class="sidebar-menu-list__item ">
                <a href="user/logout" class="sidebar-menu-list__link">
                   <span class="icon"><i class="fa-duotone fa-solid fa-arrow-right-from-bracket"></i></span>
                    <span class="text">Logout</span>
                </a>
            </li>
            
                       <li class="sidebar-menu-list__item mt-5">
    <div id="google_translate_elementi"></div>
</li>
            
             
                        </div>
                    </div>

                    
                    <div class="modal fade" id="cancelTransactionModal" tabindex="-1" aria-labelledby="cancelTransactionModalLabel" aria-hidden="true">
                  <div class="modal-dialog">
                    <div class="modal-content">
                      <div class="modal-header">
                        <h5 class="modal-title" id="cancelTransactionModalLabel">Are you sure?</h5>
                        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                      </div>
                      <div class="modal-body">
                        This will cancel the transaction!
                      </div>
                      <div class="modal-footer">
                        <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">No, keep it</button>
                        <button type="button" class="btn btn-danger">Yes, cancel it!</button>
                      </div>
                    </div>
                  </div>
                </div>

                
            
        
    
    
     
         <script src="assets/global/js/jquery-3.7.1.min.js" type="text/javascript"></script>
     


    <script src="assets/global/js/bootstrap.bundle.min.js" type="text/javascript"></script>
    <script src="assets/templates/basic/dashboard/js/main.js" type="text/javascript"></script>
    
    <script src="https://cdnjs.cloudflare.com/ajax/libs/intro.js/7.2.0/intro.min.js" type="text/javascript"></script>


    <script type="text/javascript">
        window.allow_decimal = "4";
    </script>

        <link href="assets/global/css/iziToast.min.css" rel="stylesheet">
<link href="assets/global/css/iziToast_custom.css" rel="stylesheet">
<script src="assets/global/js/iziToast.min.js" type="text/javascript"></script>

<script type="text/javascript">
    "use strict";
    const colors = {
        success: '#28c76f',
        error: '#eb2222',
        warning: '#ff9f43',
        info: '#1e9ff2',
    }

    const icons = {
        success: 'fas fa-check-circle',
        error: 'fas fa-times-circle',
        warning: 'fas fa-exclamation-triangle',
        info: 'fas fa-exclamation-circle',
    }

    const notifications = [];
    const errors = [];


    const triggerToaster = (status, message) => {
        iziToast[status]({
            title: status.charAt(0).toUpperCase() + status.slice(1),
            message: message,
            position: "topRight",
            backgroundColor: '#fff',
            icon: icons[status],
            iconColor: colors[status],
            progressBarColor: colors[status],
            titleSize: '1rem',
            messageSize: '1rem',
            titleColor: '#474747',
            messageColor: '#a2a2a2',
            transitionIn: 'obunceInLeft'
        });
    }

    if (notifications.length) {
        notifications.forEach(element => {
            triggerToaster(element[0], element[1]);
        });
    }

    if (errors.length) {
        errors.forEach(error => {
            triggerToaster('error', error);
        });
    }

    function notify(status, message) {
        if (typeof message == 'string') {
            triggerToaster(status, message);
        } else {
            $.each(message, (i, val) => triggerToaster(status, val));
        }
    }
</script>
            <script type="text/javascript">
        (function($) {
            "use strict";

            var elements = $('.invest-badge__thumb__mask');
            console.log('Selected Elements:', elements);

            elements.each(function(index, element) {
                let progress = $(element).data('progress');
                console.log('Progress:', progress);
                element.style.setProperty('--before-height', `${progress}%`);
            });

        })(jQuery);
    </script>
    
    
 

    <script type="text/javascript">
        (function($) {
            "use strict";

            var inputElements = $('[type=text],[type=password],select,textarea');
            $.each(inputElements, function(index, element) {
                element = $(element);
                element.closest('.form-group').find('label').attr('for', element.attr('name'));
                element.attr('id', element.attr('name'))
            });

            $.each($('input, select, textarea'), function(i, element) {
                if (element.hasAttribute('required')) {
                    $(element).closest('.form-group').find('label').addClass('required');
                }
            });

            $('.showFilterBtn').on('click', function() {
                $('.responsive-filter-card').slideToggle();
            });

            Array.from(document.querySelectorAll('table')).forEach(table => {
                let heading = table.querySelectorAll('thead tr th');
                Array.from(table.querySelectorAll('tbody tr')).forEach((row) => {
                    if (row.querySelectorAll('td').length > 1) {
                        Array.from(row.querySelectorAll('td')).forEach((colum, i) => {
                            colum.setAttribute('data-label', heading[i].innerText)
                        });
                    }
                });
            });


            
        })(jQuery);
    </script>
    
         <script src="assets/global/js/jquery-3.7.1.min.js" type="text/javascript"></script>
        
     
     
     <script type="text/javascript">
         function deleteNotification(deleteUrl) {
    Swal.fire({
        title: 'Please wait...',
        imageUrl: 'https://raw.githubusercontent.com/Codelessly/FlutterLoadingGIFs/master/packages/cupertino_activity_indicator.gif',
        imageAlt: 'Loader',
        showConfirmButton: false,
        allowOutsideClick: false,
        imageWidth: 40,
        imageHeight: 40,
         
    });


    fetch(deleteUrl, {
        method: 'GET',
        headers: {
            'X-CSRF-TOKEN': 'xrir56d07i6w4qiwr8PMfIPeXZZSklIZeSAmE0Xv',
            'Content-Type': 'application/json',
        },
    })
    .then(response => response.json())
    .then(data => {
        
        if (data.status_code === 200) {
            
            
            
            Swal.fire({
                icon: 'success',
                title: 'Success',
                text: 'Notification deleted successfully!',
                confirmButtonText: 'OK',
                confirmButtonColor: '#00a7e1',
                showConfirmButton: true,
                allowOutsideClick: true,
                 
            }).then((result) => {
                if (result.isConfirmed || result.isDismissed) {
                   location.reload();
                }
            });
            
            
        } else {
           
            Swal.fire({
                icon: 'error',
                title: 'Error',
                text: 'Failed to delete notification',
            });
        }
    })
    .catch(error => {
        console.error('Error:', error);
        Swal.fire({
            icon: 'error',
            title: 'Error',
            text: 'Failed to delete notification',
        });
    });
}


function readallNotification(Url) {
    Swal.fire({
        title: 'Please wait...',
        imageUrl: 'https://raw.githubusercontent.com/Codelessly/FlutterLoadingGIFs/master/packages/cupertino_activity_indicator.gif',
        imageAlt: 'Loader',
        showConfirmButton: false,
        allowOutsideClick: false,
        imageWidth: 40,
        imageHeight: 40,
         
    });

    fetch(Url, {
        method: 'GET',
        headers: {
            'X-CSRF-TOKEN': 'xrir56d07i6w4qiwr8PMfIPeXZZSklIZeSAmE0Xv',
            'Content-Type': 'application/json',
        },
    })
    .then(response => response.json())
    .then(data => {
        if (data.status_code === 200) {
            Swal.fire({
                icon: 'success',
                text: data.message,
                confirmButtonText: 'OK',
                confirmButtonColor: '#00a7e1',
                allowOutsideClick: true,
                allowEscapeKey: true,
                 
            }).then((result) => {
                if (result.isConfirmed || result.isDismissed) {
                     location.reload(); 
                }
            });
        } else {
            Swal.fire({
                icon: 'error',
                title: 'Error',
                text: 'Failed to load Api',
                confirmButtonText: 'OK',
                confirmButtonColor: '#00a7e1',
                allowOutsideClick: true,
                allowEscapeKey: true,
                 
            }).then((result) => {
                if (result.isConfirmed || result.isDismissed) {
                    
                }
            });
        }
    })
    .catch(error => {
        console.error('Error:', error);
        Swal.fire({
            icon: 'error',
            title: 'Error',
            text: 'Failed to load api',
            confirmButtonText: 'OK',
            confirmButtonColor: '#00a7e1',
            allowOutsideClick: true,
            allowEscapeKey: true,
             
        }).then((result) => {
            if (result.isConfirmed || result.isDismissed) {
                
            }
        });
    });
}

function nviewNotification(Url) {
    Swal.fire({
        title: 'Please wait...',
        imageUrl: 'https://raw.githubusercontent.com/Codelessly/FlutterLoadingGIFs/master/packages/cupertino_activity_indicator.gif',
        imageAlt: 'Loader',
        showConfirmButton: false,
        allowOutsideClick: false,
        imageWidth: 40,
        imageHeight: 40,
         
    });

    fetch(Url, {
        method: 'GET',
        headers: {
            'X-CSRF-TOKEN': 'xrir56d07i6w4qiwr8PMfIPeXZZSklIZeSAmE0Xv',
            'Content-Type': 'application/json',
        },
    })
    .then(response => response.json())
    .then(data => {
        if (data.status_code === 200) {
            Swal.fire({
                text: data.message,
                confirmButtonText: 'OK',
                confirmButtonColor: '#00a7e1',
                allowOutsideClick: true,
                allowEscapeKey: true,
                 
            }).then((result) => {
                if (result.isConfirmed || result.isDismissed) {
                   
                }
            });
        } else {
            Swal.fire({
                icon: 'error',
                title: 'Error',
                text: 'Failed to delete notification',
                confirmButtonText: 'OK',
                confirmButtonColor: '#00a7e1',
                allowOutsideClick: true,
                allowEscapeKey: true,
                 
            }).then((result) => {
                if (result.isConfirmed || result.isDismissed) {
                    
                }
            });
        }
    })
    .catch(error => {
        console.error('Error:', error);
        Swal.fire({
            icon: 'error',
            title: 'Error',
            text: 'Failed to delete notification',
            confirmButtonText: 'OK',
            confirmButtonColor: '#00a7e1',
            allowOutsideClick: true,
            allowEscapeKey: true,
             
        }).then((result) => {
            if (result.isConfirmed || result.isDismissed) {
                
            }
        });
    });
}

function viewNotification(Url) {
    Swal.fire({
        title: 'Please wait...',
        imageUrl: 'https://raw.githubusercontent.com/Codelessly/FlutterLoadingGIFs/master/packages/cupertino_activity_indicator.gif',
        imageAlt: 'Loader',
        showConfirmButton: false,
        allowOutsideClick: false,
        imageWidth: 40,
        imageHeight: 40,
         
    });

    fetch(Url, {
        method: 'GET',
        headers: {
            'X-CSRF-TOKEN': 'xrir56d07i6w4qiwr8PMfIPeXZZSklIZeSAmE0Xv',
            'Content-Type': 'application/json',
        },
    })
    .then(response => response.json())
    .then(data => {
        if (data.status_code === 200) {
            Swal.fire({
                text: data.message,
                confirmButtonText: 'OK',
                allowOutsideClick: false,
                allowEscapeKey: false,
                 
            }).then((result) => {
                if (result.isConfirmed || result.isDismissed) {
                   location.reload();
                }
            });
        } else {
            Swal.fire({
                icon: 'error',
                title: 'Error',
                text: 'Failed to view notification',
                confirmButtonText: 'OK',
                confirmButtonColor: '#00a7e1',
                allowOutsideClick: false,
                allowEscapeKey: false,
                 
            }).then((result) => {
                if (result.isConfirmed || result.isDismissed) {
                   location.reload(); 
                }
            });
        }
    })
    .catch(error => {
        console.error('Error:', error);
        Swal.fire({
            icon: 'error',
            title: 'Error',
            text: 'Failed to delete notification',
            confirmButtonText: 'OK',
            confirmButtonColor: '#00a7e1',
            allowOutsideClick: false,
            allowEscapeKey: false,
             
            footer: '<span style="font-size: 12px;">Page will reload after clicking OK or closing this message.</span>',
        }).then((result) => {
            if (result.isConfirmed || result.isDismissed) {
                
            }
        });
    });
}


function depositController(url) {
    // Prevent default form submission
    event.preventDefault();

    Swal.fire({
        title: 'Please wait...',
        imageUrl: 'https://raw.githubusercontent.com/Codelessly/FlutterLoadingGIFs/master/packages/cupertino_activity_indicator.gif',
        imageAlt: 'Loader',
        showConfirmButton: false,
        allowOutsideClick: false,
        imageWidth: 40,
        imageHeight: 40,
    });

    // Serialize form data
    const formData = new FormData(document.querySelector('#formDeposit'));

    fetch(url, {
        method: 'POST',
        headers: {
            'X-CSRF-TOKEN': 'xrir56d07i6w4qiwr8PMfIPeXZZSklIZeSAmE0Xv',
        },
        body: formData,
    })
    .then(response => {
        if (!response.ok) {
            throw new Error('Network response was not ok');
        }
        return response.json();
    })
    .then(data => {
        const message = data.message || 'Error processing API.';
        const finalamo = data.finalamo;
        const curname = data.curname;
        const walletAddress = data.walletAddress;
        const transactionId = data.id;
        const usercur = data.usercur;

        if (data.status_code === 200) {
            Swal.fire({
                html: `<div class="col-md-12" style="padding: 5px!important; z-index: !important;"><div class=""><div class="popup-content"><p class="">Your deposit order of <strong class="text-primary fw-bold" style="color: #00a7e1!important;"> ${message} ${usercur}</strong> has been placed.</p> 
                <br>
                <p style="text-align: left;">Please send <strong class="text-primary fw-bold" style="color: #00a7e1!important;"> ${finalamo} ${curname}</strong> to the address below. The amount will appear in your account only after transaction is approved.</p><div class="gaps-1x"></div>
                    <center><div class="pay-wallet-address pay-wallet-eth">
                        
                       <br>
                        <div class="row guttar-1px guttar-vr-12px">
                            
                            <div class="col-12">

    
        <div class="row fake-class pl-sm-3">
        <div class="col-5">                               <span><img src="https://api.qrserver.com/v1/create-qr-code/?color=000000&amp;bgcolor=FFFFFF&amp;data=${walletAddress}&amp;qzone=1&amp;margin=0&amp;size=400x400&amp;ecc=L%22%20alt=%22qr%20code%22%20/%3E" width="80%"></span>
                                           
  </div>

      <div class="col-7">                      <p class="text-center text-sm-left "></p><p>Send Amount:</p>
                                        <h5 class="text-primary fw-bold"><strong class="fw-bold" style="cursor:pointer; color: #00a7e1!important;" onclick="copyWalletAmountAddressToMyClipboard('copymoreAmount')">${finalamo} ${curname}  </strong><span class=" " id=""><span style="font-size:13px" class=""></span></span></h5>
                                     
                               <p></p>
                                    
  <div style="font-size: 1rem; color: #d68f00;">Make Payment Within <i class="fa-duotone fa-solid fa-timer"></i>24hours</div>                                  
                                </div>  </div>  </div>                                   <div class="col-12"><br><p class=" text-sm-left guttar-1px">Wallet Address:</p><p></p>
                                    <div class="copy-wrap">
                        
                        
         <input type="text" style="display:none" name="cat" class="" id="copymoreAmount" value="${finalamo}" >                       
                                
                                <div class="popup__wrap mt-2">
    <div class="input-group">
        <input type="text" name="amount_withdraw" class="popup__input form-control form--control" id="copymoreURL" value="${walletAddress}" readonly="">
        <a class="input-group-text" style="cursor:pointer;background-color: #00a7e1; color: white;" onclick="copyWalletAddressToMyClipboard('copymoreURL')"><i class="fa-duotone fa-solid fa-copy"></i></a>
                
    </div>
</div>
                                    </div>
                                
                                
                                    
                                    

                            
                            </div>
                        </div>
                    </div> 
                
                
                             <!-- Countdown -->
                            
                    </center>
                             
               
             
                
               <div class="note note-danger note-plane">
                    <br>
                   <p style="
    text-align: left;
"><i class="fa-duotone fa-solid fa-circle-info"></i> Kindly make sure to check that your are sending to above generated wallet address, to avoid loss of funds.</p>
                </div> 
                
               <center>
               <br>
       
                              <a type="button" style="color: red;" onclick="cancelTransactiono('${transactionId}')"> Cancel Transaction</a>
                          </center>
            </div>
            
               
               
                                        
                                            </div>
            
                                        </div>
                                       
                                        <div class=" container" style="background-color: #1c34466e;padding: 20px 20px !important;margin: 20px 0px auto;border-radius: 17px;">
                <p style="
    text-align: left;
">Don't have ${curname} wallet? Click below to purchase from our trusted crypto partners.</p>
               <center> <div class="just-center cta-sectiona">
                    <a href="https://crypto.com/" title="Crypto.com" target="_blank" class="app-download-button">
                    <button type="button" style="display: inline-block;background-color: #000;border-radius: 1em;color: #000;font-size: 1em;padding: .625em .625em;">
                    <img src="https://freepngimg.com/save/168836-currency-crypto-digital-free-hd-image/2000x458" width="50%" style="
    width: 700px;
"></button>
                    </a>
                    <a href="https://www.bitstamp.net/" title="Bitstamp" target="_blank" class="app-download-button">
                    <button type="button" style="display: inline-block;background-color: #000;border-radius: 1em;color: #fff;font-size: 1em;padding: .625em .625em;">
                    <img src="https://bitcoinsensus.com/wp-content/uploads/2023/12/bitstamp.png" width="50%" style="
    width: 500px;
"></button>
                    </a>
                </div>
                </div></center>`,
                confirmButtonText: 'Close',
                allowOutsideClick: false,
                confirmButtonColor: '#00a7e1',
                allowEscapeKey: false,
                showCancelButton: false,
                cancelButtonText: 'Cancel Transaction',
                cancelButtonColor: '#d33',
                didOpen: () => {
                    let countdownTime = 86400; 
                    const countdownElement = document.getElementById('countdown-timer');

                    const countdownInterval = setInterval(() => {
                        const minutes = Math.floor(countdownTime / 60);
                        const seconds = countdownTime % 60;
                            
                             countdownElement.innerHTML = `Make Payment Within 24hours`;
                             
                      //  countdownElement.innerHTML = `Make Payment Within: ${minutes}:${seconds < 10 ? '0' : ''}${seconds}`;

                        countdownTime--;

                        if (countdownTime < 0) {
                            clearInterval(countdownInterval);
                            Swal.close(); 
                        }
                    }, 1000);
                },
            }).then((result) => {
                if (result.isConfirmed) {
                    
                window.location.href = "user/deposit/history";

                }
                // } else {
                //     Swal.fire({
                //         title: 'Are you sure?',
                //         text: 'This will cancel the transaction!',
                //         icon: 'warning',
                //         showCancelButton: true,
                //         allowOutsideClick: false,
                //         allowEscapeKey: false,
                //         confirmButtonColor: '#00a7e1',
                //         cancelButtonColor: '#d33',
                //         confirmButtonText: 'Yes, cancel it!',
                //         cancelButtonText: 'No, keep it'
                //     }).then((result) => {
                //         if (result.isConfirmed) {
                //             const routeUrl = `user/deposit/delete/:transactionId`.replace(':transactionId', transactionId);
                       
                //             fetch(routeUrl, {
                //                 method: 'GET',
                //                 headers: {
                //                     'X-CSRF-TOKEN': 'xrir56d07i6w4qiwr8PMfIPeXZZSklIZeSAmE0Xv',
                //                     'Content-Type': 'application/json',
                //                 },
                //             })
                //             .then(response => {
                //                 if (response.ok) {
                //                     return response.json();
                //                 } else {
                //                     throw new Error('Transaction cancellation failed');
                //                 }
                //             })
                //             .then(data => {
                //                 if (data.status_code === 200) {
                //                     Swal.fire({
                //                         icon: 'success',
                //                         text: 'Transaction Cancelled Successfully!',
                //                         confirmButtonText: 'OK',
                //                         confirmButtonColor: '#00a7e1',
                //                         allowOutsideClick: false,
                //                         allowEscapeKey: false,
                //                     }).then((result) => {
                //                         if (result.isConfirmed || result.isDismissed) {
                //                             location.reload();
                //                         }
                //                     });
                //                     } else {
                //                         Swal.fire({
                //                             icon: 'error',
                //                             text: 'Transaction Cancellation failed!',
                //                             confirmButtonText: 'OK',
                //                             confirmButtonColor: '#00a7e1',
                //                             allowOutsideClick: true,
                //                             allowEscapeKey: true,
                //                         });
                //                     }
                //                 })
                //                 .catch(error => {
                //                     Swal.fire({
                //                         icon: 'error',
                //                         text: 'Error Calling Api, Retry!',
                //                         confirmButtonText: 'OK',
                //                         confirmButtonColor: '#00a7e1',
                //                         allowOutsideClick: true,
                //                         allowEscapeKey: true,
                //                     });
                //                 });
                            
                //                             }
                //                         });
                //                     }
                                });
                            } else {
                            Swal.fire({
                                icon: 'error',
                                title: 'Error',
                                text: message,
                                confirmButtonText: 'OK',
                                confirmButtonColor: '#00a7e1',
                                allowOutsideClick: true,
                                allowEscapeKey: true,
                            }).then((result) => {
                                if (result.isConfirmed || result.isDismissed) {
                                    // Handle error confirmation result
                                }
                            });
                        }
                    })
                    .catch(error => {
                        console.error('Error:', error);
                
                        let errorMessage = "An unexpected error occurred. Please try again.";
                
                        if (error.message) {
                            errorMessage = error.message;
                        }
                
                        Swal.fire({
                            icon: 'error',
                            title: 'Error',
                            text: errorMessage,
                            confirmButtonText: 'OK',
                            confirmButtonColor: '#00a7e1',
                            allowOutsideClick: true,
                            allowEscapeKey: true,
                        }).then((result) => {
                            // Handle error confirmation result
                            if (result.isConfirmed || result.isDismissed) {
                                // Handle error confirmation result
                            }
                        });
                    });
                }

function copyWalletAddressToClipboard(contentId) {
    
    const walletAddress = document.getElementById(contentId);
    walletAddress.select();
    walletAddress.setSelectionRange(0, 99999);
    document.execCommand('copy');
    Swal.fire({
        icon: 'success',
        text: 'Copied to clipboard!',
        confirmButtonText: 'OK',
        confirmButtonColor: '#00a7e1',
    });
}

function cancelTransactiono(transactionId) {
  // Create the modal dynamically
  const modalHtml = `
    <div class="modal fade" id="cancelTransactionModal_${transactionId}" tabindex="-1" aria-labelledby="cancelTransactionModalLabel" aria-hidden="true">
      <div class="modal-dialog modal-dialog-centered">
        <div class="modal-content">
          <div class="modal-header">
            <h5 class="modal-title" id="cancelTransactionModalLabel">Are you sure?</h5>
            <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
          </div>
          <div class="modal-body">
            This will cancel the transaction!
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">No, keep it</button>
            <button type="button" class="btn btn-danger" onclick="cancelTransactionio('${transactionId}', 'cancelTransactionModal_${transactionId}')">Yes, cancel it!</button>
          </div>
        </div>
      </div>
    </div>
  `;

  // Append the modal to the body
  document.body.insertAdjacentHTML('beforeend', modalHtml);

  // Show the modal
  $(`#cancelTransactionModal_${transactionId}`).modal('show');

  // Remove the modal from the DOM after it's hidden
  $(`#cancelTransactionModal_${transactionId}`).on('hidden.bs.modal', function () {
    $(this).remove();
  });
}

function copyWalletAddressToMyClipboard(contentId) {
    
    const walletAddress = document.getElementById(contentId);
    walletAddress.select();
    walletAddress.setSelectionRange(0, 99999);
    document.execCommand('copy');
    alert('Wallet Address Copied');
}


function copyWalletAmountAddressToMyClipboard(contentId) {
    
    const walletAmount = document.getElementById(contentId);
    walletAmount.select();
    walletAmount.setSelectionRange(0, 99999);
    document.execCommand('copy');
    alert('Amount Copied');
}


function cancelTransactionio(transactionId, modalId) {
    
     $(`#${modalId}`).modal('hide');
     
  const url = `user/deposit/delete/:transactionId`.replace(':transactionId', transactionId);
  fetch(url, {
    method: 'GET',
    headers: {
      'X-CSRF-TOKEN': 'xrir56d07i6w4qiwr8PMfIPeXZZSklIZeSAmE0Xv',
      'Content-Type': 'application/json',
    },
  })
  .then(response => {
    if (response.ok) {
      return response.json();
    } else {
      throw new Error('Transaction cancellation failed');
    }
  })
  .then(data => {
    if (data.status_code === 200) {
      Swal.fire({
        icon: 'success',
        text: 'Transaction Cancelled Successfully!',
        confirmButtonText: 'OK',
        confirmButtonColor: '#00a7e1',
        allowOutsideClick: false,
        allowEscapeKey: false,
      }).then((result) => {
        if (result.isConfirmed || result.isDismissed) {
          // Close the modal
         
          location.reload();
        }
      });
    } else {
      Swal.fire({
        icon: 'error',
        text: 'Transaction Cancellation failed!',
        confirmButtonText: 'OK',
        confirmButtonColor: '#00a7e1',
        allowOutsideClick: true,
        allowEscapeKey: true,
      });
    }
  })
  .catch(error => {
    Swal.fire({
      icon: 'error',
      text: 'Error Calling Api, Retry!',
      confirmButtonText: 'OK',
      confirmButtonColor: '#00a7e1',
      allowOutsideClick: true,
      allowEscapeKey: true,
    });
  });
}


function cancelTransaction(url) {
    Swal.fire({
        title: 'Are you sure?',
        text: 'This will cancel the transaction!',
        icon: 'warning',
        showCancelButton: true,
        confirmButtonColor: '#00a7e1',
        cancelButtonColor: '#d33',
        confirmButtonText: 'Yes, cancel it!',
        cancelButtonText: 'No, keep it'
    }).then((result) => {
        if (result.isConfirmed) {
            fetch(url, {
                method: 'GET',
                headers: {
                    'X-CSRF-TOKEN': 'xrir56d07i6w4qiwr8PMfIPeXZZSklIZeSAmE0Xv',
                    'Content-Type': 'application/json',
                },
            })
            .then(response => {
                if (response.ok) {
                    return response.json();
                } else {
                    throw new Error('Transaction cancellation failed');
                }
            })
            .then(data => {
                if (data.status_code === 200) {
                    Swal.fire({
                        icon: 'success',
                        text: 'Transaction Cancelled Successfully!',
                        confirmButtonText: 'OK',
                        confirmButtonColor: '#00a7e1',
                        allowOutsideClick: false,
                        allowEscapeKey: false,
                    }).then((result) => {
                        if (result.isConfirmed || result.isDismissed) {
                            location.reload();
                        }
                    });
                } else {
                    Swal.fire({
                        icon: 'error',
                        text: 'Transaction Cancellation failed!',
                        confirmButtonText: 'OK',
                        confirmButtonColor: '#00a7e1',
                        allowOutsideClick: true,
                        allowEscapeKey: true,
                    });
                }
            })
            .catch(error => {
                Swal.fire({
                    icon: 'error',
                    text: 'Error Calling Api, Retry!',
                    confirmButtonText: 'OK',
                    confirmButtonColor: '#00a7e1',
                    allowOutsideClick: true,
                    allowEscapeKey: true,
                });
            });
        }
    });
}

function withdrawController(url) {

    event.preventDefault();

    Swal.fire({
        title: 'Please wait...',
        imageUrl: 'https://raw.githubusercontent.com/Codelessly/FlutterLoadingGIFs/master/packages/cupertino_activity_indicator.gif',
        imageAlt: 'Loader',
        showConfirmButton: false,
        allowOutsideClick: false,
        imageWidth: 40,
        imageHeight: 40,
         
    });

    // Serialize form data
    const formData = new FormData(document.querySelector('#formWithdraw'));

    fetch(url, {
        method: 'POST',
        headers: {
            'X-CSRF-TOKEN': 'xrir56d07i6w4qiwr8PMfIPeXZZSklIZeSAmE0Xv', 
        },
        body: formData,
    })
    .then(response => {
        if (!response.ok) {
            throw new Error('Network response was not ok');
        }
        return response.json();
    })
    .then(data => {
        const message = data.message || 'Error processing API.';
        const withId = data.id;
        const wallet = data.gateway;
        const amount = data.amount;
        const rate = data.rate;
        const meth_code = data.meth_code;

        if (data.status_code === 200) {
            showCustomModal(message, withId, wallet, amount, rate, meth_code);
        } else {
            showErrorModal(message);
        }
    })
    .catch(error => {
        console.error('Error:', error);
        showErrorModal('Error processing request');
    });
}

function showCustomModal(message, withId, wallet, amount, rate, meth_code) {
    Swal.fire({
        html: `
            <div class="col-md-12" style="padding: 10px!important; z-index: !important;">
                <div class="my-4">
                    <div class="popup-content">
                        <p style="font-size: 0.9rem;">Provide the below information and re-check the information before submitting. The withdrawal amount will be sent to the given information.</p>
                        <br>
                        <p style="font-size: 0.9rem;">Ensure that the information is correct. Otherwise, the authority will not be responsible for any economic loss. The processing may take some time. Once the amount is sent, the system's admin will approve the request.</p>
                        <div class="gaps-1x"></div>
                        <center>
                            <div class="pay-wallet-address pay-wallet-eth">
                                <br>
                                <div class="row guttar-1px guttar-vr-15px">
                                    <div class="col-12">
                                        <div class="fake-class pl-sm-3">
                                            <p class="text-center text-sm-left guttar-1px" style="font-size: 0.9rem;">Please note that we will not be liable for any loss arising from YOU entering wrong withdrawal details.</p>
                                            <div class="copy-wrap">
                                                <br>
                                                <div class="popup__wrap">
                                                    <form id="walletForm" autocomplete="off">
                                                        <label><strong>Your ${message} Wallet Address</strong></label>
                                                        <br>
                                                        <input type="text" step="any" name="wallet_address" class="popup__input form-control form--control" required>
                                                        <input type="hidden" name="wallet" value="${wallet}" class="popup__input form-control form--control" required>
                                                        <input type="hidden" name="gateway" value="${message}" class="popup__input form-control form--control" required>
                                                        <input type="hidden" name="rate" value="${rate}" class="popup__input form-control form--control" required>
                                                        <input type="hidden" name="with_amount" value="${amount}" class="popup__input form-control form--control" required>
                                                        <input type="hidden" name="meth_code" value="${meth_code}" class="popup__input form-control form--control" required>
                                                    </form>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </center>
                        <div class="gaps-2x"></div>
                        <div class="gaps-1x"></div>
                    </div>
                </div>
            </div>
        `,
        showCancelButton: false,
        confirmButtonText: 'Submit',
        allowOutsideClick: false,
        allowEscapeKey: false,
        preConfirm: () => {
            const walletAddress = document.querySelector('#walletForm [name="wallet_address"]').value;
            const wallet = document.querySelector('#walletForm [name="wallet"]').value;
            const gateway = document.querySelector('#walletForm [name="gateway"]').value;
            const rate = document.querySelector('#walletForm [name="rate"]').value;
            const with_amount = document.querySelector('#walletForm [name="with_amount"]').value;
            const meth_code = document.querySelector('#walletForm [name="meth_code"]').value;

            return new Promise((resolve, reject) => {
                if (walletAddress.trim() !== '') {
                    Swal.showLoading();

                    const routeUrl = `user/withdraw/view-preview`;
                    fetch(routeUrl, {
                        method: 'POST',
                        headers: {
                            'Content-Type': 'application/json',
                            'X-CSRF-TOKEN': 'xrir56d07i6w4qiwr8PMfIPeXZZSklIZeSAmE0Xv',
                        },
                        body: JSON.stringify({ wallet_address: walletAddress, wallet: wallet, gateway: gateway, rate: rate, with_amount: with_amount, meth_code: meth_code }),
                    })
                    .then(response => {
                        if (!response.ok) {
                            throw new Error('Network response was not ok');
                        }
                        return response.json();
                    })
                    .then(data => {
                        if (data.status_code === 200) {
                            Swal.fire({
                                icon: 'success',
                                text: 'Withdraw successful, kindly wait for approval!',
                                confirmButtonText: 'OK',
                                confirmButtonColor: '#00a7e1',
                                allowOutsideClick: false,
                                allowEscapeKey: false,
                            }).then((result) => {
                                if (result.isConfirmed || result.isDismissed) {
                                     window.location.href = "user/withdraw/history";
                                }
                            });
                        } else {
                            Swal.fire({
                                icon: 'error',
                                text: data.message,
                                confirmButtonText: 'OK',
                                confirmButtonColor: '#d33',
                                allowOutsideClick: false,
                                allowEscapeKey: false,
                            });
                        }
                    })
                    .catch(error => {
                        Swal.fire({
                            icon: 'error',
                            text: 'An unexpected error occurred. Please try again.',
                            confirmButtonText: 'OK',
                            confirmButtonColor: '#d33',
                            allowOutsideClick: false,
                            allowEscapeKey: false,
                        });
                        console.error('Error:', error);
                    });
                } else {
                    reject('Please enter a valid wallet address');
                }
            });
        },
    })
    .then((result) => {
        if (result.isConfirmed || result.isDismissed) {
            window.location.href = "user/withdraw/history";
        }
    });
}



function showErrorModal(errorMessage) {
    Swal.fire({
        icon: 'error',
        title: 'Error',
        text: errorMessage,
        confirmButtonText: 'OK',
        confirmButtonColor: '#00a7e1',
        allowOutsideClick: true,
        allowEscapeKey: true,
         
    });
}
     </script>
     
     
     
    <script type="text/javascript">
        "use strict";
        (function($) {

           $('.depositBtn').on('click', function(e) {
                $('#deposit-canvas').addClass('show');
            });
            
            $('#close-deposit-canvas').on('click', function() {
                $('#deposit-canvas').removeClass('show');
            });

            $('.withdrawBtn').on('click', function(e) {
               $('#withdraw-offcanvas').addClass('show');
            });
            
            
            $('#close-withdraw-canvas').on('click', function(e) {
               $('#withdraw-offcanvas').removeClass('show');
            });

            $('.transferBtn').on('click', function(e) {
                canvasShow("transfer-offcanvas");
            });

            
        })(jQuery);
    </script>
     
     
<script type="text/javascript">
document.getElementById('others-menu').addEventListener('click', function() {
    document.getElementById('hide-menu').classList.add('show');
});

document.getElementById('close-menu').addEventListener('click', function() {
    document.getElementById('hide-menu').classList.remove('show');
});
</script>

    

<script src="https://cdn.jsdelivr.net/npm/popper.js@1.12.9/dist/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous" type="text/javascript"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous" type="text/javascript"></script>

<div class="hide--desktop"><!-- Smartsupp Live Chat script --> <script type="text/javascript"> var _smartsupp = _smartsupp || {}; _smartsupp.key = '2f028f0414eb0a3f23246c71d545b4df7806f9fb'; window.smartsupp||(function(d) {   var s,c,o=smartsupp=function(){ o._.push(arguments)};o._=[];   s=d.getElementsByTagName('script')[0];c=d.createElement('script');   c.type='text/javascript';c.charset='utf-8';c.async=true;   c.src='https://www.smartsuppchat.com/loader.js?';s.parentNode.insertBefore(c,s); })(document); </script></div>

 
<script defer="" src="https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015" integrity="sha512-ZpsOmlRQV6y907TI0dKBHq9Md29nnaEIPlkf84rnaERnq6zvWvPUqr2ft8M1aS28oN72PdrCzSjY4U6VaAw1EQ==" data-cf-beacon="{&quot;rayId&quot;:&quot;8e2719184bdd948c&quot;,&quot;version&quot;:&quot;2024.10.5&quot;,&quot;r&quot;:1,&quot;token&quot;:&quot;e88c02f5f4904215bf000c76be9e9160&quot;,&quot;serverTiming&quot;:{&quot;name&quot;:{&quot;cfExtPri&quot;:true,&quot;cfL4&quot;:true,&quot;cfSpeedBrain&quot;:true,&quot;cfCacheStatus&quot;:true}}}" crossorigin="anonymous"></script><div id="goog-gt-tt" class="VIpgJd-yAWNEb-L7lbkb skiptranslate" style="border-radius: 12px; margin: 0 0 0 -23px; padding: 0; font-family: 'Google Sans', Arial, sans-serif;" data-id=""><div id="goog-gt-vt" class="VIpgJd-yAWNEb-hvhgNd"><div class=" VIpgJd-yAWNEb-hvhgNd-l4eHX-i3jM8c"><img src="https://fonts.gstatic.com/s/i/productlogos/translate/v14/24px.svg" width="24" height="24" alt=""></div><div class=" VIpgJd-yAWNEb-hvhgNd-k77Iif-i3jM8c"><div class="VIpgJd-yAWNEb-hvhgNd-IuizWc" dir="ltr">Original text</div><div id="goog-gt-original-text" class="VIpgJd-yAWNEb-nVMfcd-fmcmS VIpgJd-yAWNEb-hvhgNd-axAV1"></div></div><div class="VIpgJd-yAWNEb-hvhgNd-N7Eqid ltr"><div class="VIpgJd-yAWNEb-hvhgNd-N7Eqid-B7I4Od ltr" dir="ltr"><div class="VIpgJd-yAWNEb-hvhgNd-UTujCb">Rate this translation</div><div class="VIpgJd-yAWNEb-hvhgNd-eO9mKe">Your feedback will be used to help improve Google Translate</div></div><div class="VIpgJd-yAWNEb-hvhgNd-xgov5 ltr"><button id="goog-gt-thumbUpButton" type="button" class="VIpgJd-yAWNEb-hvhgNd-bgm6sf" title="Good translation" aria-label="Good translation" aria-pressed="false"><span id="goog-gt-thumbUpIcon"><svg width="24" height="24" viewBox="0 0 24 24" focusable="false" class="VIpgJd-yAWNEb-hvhgNd-THI6Vb NMm5M"><path d="M21 7h-6.31l.95-4.57.03-.32c0-.41-.17-.79-.44-1.06L14.17 0S7.08 6.85 7 7H2v13h16c.83 0 1.54-.5 1.84-1.22l3.02-7.05c.09-.23.14-.47.14-.73V9c0-1.1-.9-2-2-2zM7 18H4V9h3v9zm14-7l-3 7H9V8l4.34-4.34L12 9h9v2z"></path></svg></span><span id="goog-gt-thumbUpIconFilled"><svg width="24" height="24" viewBox="0 0 24 24" focusable="false" class="VIpgJd-yAWNEb-hvhgNd-THI6Vb NMm5M"><path d="M21 7h-6.31l.95-4.57.03-.32c0-.41-.17-.79-.44-1.06L14.17 0S7.08 6.85 7 7v13h11c.83 0 1.54-.5 1.84-1.22l3.02-7.05c.09-.23.14-.47.14-.73V9c0-1.1-.9-2-2-2zM5 7H1v13h4V7z"></path></svg></span></button><button id="goog-gt-thumbDownButton" type="button" class="VIpgJd-yAWNEb-hvhgNd-bgm6sf" title="Poor translation" aria-label="Poor translation" aria-pressed="false"><span id="goog-gt-thumbDownIcon"><svg width="24" height="24" viewBox="0 0 24 24" focusable="false" class="VIpgJd-yAWNEb-hvhgNd-THI6Vb NMm5M"><path d="M3 17h6.31l-.95 4.57-.03.32c0 .41.17.79.44 1.06L9.83 24s7.09-6.85 7.17-7h5V4H6c-.83 0-1.54.5-1.84 1.22l-3.02 7.05c-.09.23-.14.47-.14.73v2c0 1.1.9 2 2 2zM17 6h3v9h-3V6zM3 13l3-7h9v10l-4.34 4.34L12 15H3v-2z"></path></svg></span><span id="goog-gt-thumbDownIconFilled"><svg width="24" height="24" viewBox="0 0 24 24" focusable="false" class="VIpgJd-yAWNEb-hvhgNd-THI6Vb NMm5M"><path d="M3 17h6.31l-.95 4.57-.03.32c0 .41.17.79.44 1.06L9.83 24s7.09-6.85 7.17-7V4H6c-.83 0-1.54.5-1.84 1.22l-3.02 7.05c-.09.23-.14.47-.14.73v2c0 1.1.9 2 2 2zm16 0h4V4h-4v13z"></path></svg></span></button></div></div><div id="goog-gt-votingHiddenPane" class="VIpgJd-yAWNEb-hvhgNd-aXYTce"><form id="goog-gt-votingForm" action="//translate.googleapis.com/translate_voting?client=te" method="post" target="votingFrame" class="VIpgJd-yAWNEb-hvhgNd-aXYTce"><input type="text" name="sl" id="goog-gt-votingInputSrcLang"><input type="text" name="tl" id="goog-gt-votingInputTrgLang"><input type="text" name="query" id="goog-gt-votingInputSrcText"><input type="text" name="gtrans" id="goog-gt-votingInputTrgText"><input type="text" name="vote" id="goog-gt-votingInputVote"></form><iframe name="votingFrame" frameborder="0"></iframe></div></div></div>



<div class="VIpgJd-ZVi9od-aZ2wEe-wOHMyf"><div class="VIpgJd-ZVi9od-aZ2wEe-OiiCO"><svg xmlns="http://www.w3.org/2000/svg" class="VIpgJd-ZVi9od-aZ2wEe" width="96px" height="96px" viewBox="0 0 66 66"><circle class="VIpgJd-ZVi9od-aZ2wEe-Jt5cK" fill="none" stroke-width="6" stroke-linecap="round" cx="33" cy="33" r="30"></circle></svg></div></div><iframe frameborder="0" class="VIpgJd-ZVi9od-xl07Ob-OEVmcd skiptranslate" title="Language Translate Widget" style="visibility: visible; box-sizing: content-box; width: 288px; height: 263px; display: none;"></iframe><iframe id="chat-application-iframe" title="Smartsupp" aria-hidden="true" style="display: block; position: fixed; top: 0px; left: 0px; width: 1px; height: 1px; opacity: 0; border: none; z-index: -1; pointer-events: none;"></iframe><div id="smartsupp-widget-container">  <div style="border-radius: 9999px; box-shadow: rgba(0, 0, 0, 0.06) 0px 1px 6px, rgba(0, 0, 0, 0.12) 0px 2px 32px; color-scheme: normal; height: 56px; position: fixed; bottom: 24px; left: initial; right: 12px; z-index: 10000000; width: 109px;" data-testid="widgetButtonFrame"><iframe id="widgetButtonFrame" title="Smartsupp widget button" style="position: absolute; width: 100%; height: 100%; border: none; display: block; text-align: left; margin: 0px; padding: 0px; top: 0px; left: 0px; opacity: 1;" allowfullscreen="" scrolling="no"></iframe></div>  </div></body></html>