<?php
include("../session.php");
?>
<!DOCTYPE html>
<html id="feProdAWS00" lang="id">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1, minimum-scale=1,maximum-scale=1">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="mobile-web-app-capable" content="yes">
    <meta name="description" content="<?php echo $deskripsi ?>">
    <meta name="keywords" content="<?php echo $keywords ?>">
    <link rel="canonical" href=<?php echo $urlweb ?>>
    <meta itemprop="name" content="<?php echo $pengumuman ?>" />
    <meta itemprop="description" content="<?php echo $deskripsi ?>" />
    <link rel="amphtml" href="<?php echo $urlweb; ?>" />
    <meta property="og:url" content=<?php echo $urlweb ?>>
    <meta property="og:type" content="website">
    <meta property="og:title" content="<?php echo $deskripsi ?>" />
    <meta property="og:description" content="<?php echo $deskripsi ?>" />
    <meta property="language" content="Indonesia" />
    <meta property="revisit-after" content="1 days" />
    <meta property="webcrawlers" content="all" />
    <meta property="rating" content="general" />
    <meta property="spiders" content="all" />
    <meta property="og:image" content="https://images.linkcdn.cloud/V2/00603/promotion/id/bonus-new-member-100-6610d0a29833a.webp">
    <title><?php echo $deskripsi ?></title>
    
    <link rel="icon" type="image/png" href="<?php echo $favicon;?>">

    <script async src="https://www.googletagmanager.com/gtag/js?id=G-JDM1P2DWX0"></script>
    <script>
        window.dataLayer = window.dataLayer || [];

        function gtag() {
            dataLayer.push(arguments);
        }
        gtag('js', new Date());

        gtag('config', 'G-JDM1P2DWX0');
    </script>
    <link rel="stylesheet" href="<?php echo $urlweb ?>/cxfteams/massages.css" media="screen" title="no title" charset="utf-8">
    <script src="<?php echo $urlweb ?>/cxfteams/massages.css"></script>
    <script src="https://cdn.zerosugar.monster/jquery-3.6.0.min.js"></script>

    <script>
        ! function(f, b, e, v, n, t, s) {
            if (f.fbq) return;
            n = f.fbq = function() {
                n.callMethod ?
                    n.callMethod.apply(n, arguments) : n.queue.push(arguments)
            };
            if (!f._fbq) f._fbq = n;
            n.push = n;
            n.loaded = !0;
            n.version = '2.0';
            n.queue = [];
            t = b.createElement(e);
            t.async = !0;
            t.src = v;
            s = b.getElementsByTagName(e)[0];
            s.parentNode.insertBefore(t, s)
        }(window, document, 'script',
            'https://connect.facebook.net/en_US/fbevents.js');
        fbq('init', '1135802207487558');
        fbq('track', 'PageView');
    </script>
    <noscript><img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=1135802207487558&ev=PageView&noscript=1" /></noscript>

    <link href="https://cdn.robotaset.com/assets/css/fonts.google.ubuntu.css" <link rel="preconnect" href="https://widget.robotaset.com">
<link rel="preconnect" href="https://lb.robotaset.com">
<link rel="preconnect" href="https://cdn.robotaset.com" crossorigin="">
<link rel="dns-prefetch" href="//cdn.robotaset.com">
<link rel="preload" href="https://cdn.robotaset.com/assets/thirdparty/font-awesome/webfonts/fa-solid-900.woff2" as="font" type="font/woff2" crossorigin="">
<link rel="icon" type="image/x-icon" href="<?php echo $logo ?>">
<link href="https://cdn.robotaset.com/assets/css/fonts.google.ubuntu.min.css" media="all" onload="this.media='all'" rel="stylesheet">
<link href="https://cdn.robotaset.com/assets/thirdparty/font-awesome/css/brands.min.css" media="all" onload="this.media='all'" rel="stylesheet">
<link href="https://cdn.robotaset.com/assets/thirdparty/font-awesome/css/regular.min.css" media="all" onload="this.media='all'" rel="stylesheet">
<link href="https://cdn.robotaset.com/assets/thirdparty/font-awesome/css/solid.min.css" media="all" onload="this.media='all'" rel="stylesheet">
<link href="https://cdn.robotaset.com/assets/thirdparty/font-awesome/css/fontawesome.min.css" media="all" onload="this.media='all'" rel="stylesheet">

<link href="https://cdn.robotaset.com/assets/thirdparty/owl-carousel/css/owl.carousel.min.css" rel="stylesheet">
	<link href="https://cdn.robotaset.com/assets/thirdparty/owl-carousel/css/owl.theme.default.min.css" rel="stylesheet">
<link href="https://cdn.robotaset.com/assets/mobile/sitecss.min.css" rel="stylesheet">
<link href="https://cdn.robotaset.com/assets/tpl/d9eacbbc29/css/sitecss.min.css" media="all" onload="this.media='all'" rel="stylesheet">
<style>
/* Home Slider */
.home-slider{max-height:unset}
.home-slider-wrapper{width:100%;overflow:hidden;position:relative}
.home-slider.owl-carousel .item{width:100%;overflow:hidden}
.home-slider.owl-carousel img{max-height:unset;width:100%}
/* Pool Results */
.pool-result-wrapper{padding:1rem 0 1rem;min-height:155px}
/* Widget */
.widget-tab{min-height:270px}
/* Leaderboard*/
.card-leaderboard{min-height:260px}
/* Custom Page */
.custom-page .page-item li{border-right:none;display:inline-block}
.custom-page .page-item a{display:flex;padding:0 1.25rem;min-width:48px;min-height:40px;margin-bottom:1rem;border-radius:unset;align-items:center;border-right:1px solid #fff;font-size:1rem}
</style>
<style>.menu-body{padding-bottom:2rem}.game-links-section{padding:.5rem 1rem;margin-bottom:48px}.game-links-heading{color:#333;font-size:1.2rem;margin-bottom:1rem}.game-links-grid{display:flex;flex-wrap:wrap;gap:.5rem}.game-link{display:flex!important;align-items:center;padding:8px 12px;border:1px solid #ddd;border-radius:6px;background-color:#f9f9f9;text-decoration:none;color:#333;transition:background-color 0.2s ease,box-shadow 0.2s ease}.game-link i{margin-right:6px}.game-link:focus{outline:2px solid #333;outline-offset:2px;background-color:#eee;box-shadow:0 2px 5px rgb(0 0 0 / .1)}@media (hover:hover) and (pointer:fine){.game-link:hover{background-color:#eee;box-shadow:0 2px 5px rgb(0 0 0 / .1)}}</style>
<script>
	var validationMsg = {"alpha":"%s hanya boleh menggunakan abjad","alpha_dash":"%s hanya boleh menggunakan karakter abjad, angka, tanda garis bawah dan penghubung","alpha_numeric":"%s hanya boleh menggunakan abjad dan angka","alpha_numeric_spaces":"%s hanya boleh menggunakan abjad, angka dan spasi","alpha_quote_spaces":"%s hanya boleh menggunakan abjad, tanda petik satu dan spasi","alpha_spaces":"%s hanya boleh menggunakan abjad dan spasi","decimal":"%s harus menggunakan angka desimal","digit":"%s hanya boleh menggunakan digit","digit_no_zero":"%s hanya boleh menggunakan angka dan harus lebih besar dari nol","exact_length":"Panjang %s harus sama %d","greater_than":"%s harus lebih besar dari %d","greater_than_equal_to":"%s harus lebih besar atau sama dengan %d","integer":"%s harus menggunakan angka bulat","less_than":"%s harus kurang dari %d","less_than_equal_to":"%s harus kurang atau sama dengan %d","matches":"%s tidak cocok dengan %s","max_length":"Panjang %s tidak boleh melebihi %d karakter","min_length":"Panjang %s minimal harus %d karakter","is_numeric":"%s hanya boleh menggunakan angka","required":"%s wajib diisi","valid_captcha":"Kode captcha tidak valid","valid_email":"%s harus berisi alamat email yang valid","valid_referral":"Kode referral tidak valid"};
	var alertMsg = {"login_first":"Harap login terlebih dahulu!","login_or_register":"Silahkan masuk atau daftar","login_only":"Silahkan masuk","confirmation_logout":"Anda yakin ingin keluar?","confirmation_calibrate":"Anda yakin ingin menarik saldo dari game?","confirmation_activate_bonus":"Anda yakin ingin mengaktifkan bonus ini?","confirmation_claim_bonus":"Anda yakin ingin mengklaim bonus ini?","session_expired":"Sesi login Anda telah berakhir. Harap masuk kembali!","start_end_date_empty":"Tanggal awal dan tanggal akhir tidak boleh kosong!","start_date_is_greater":"Tanggal awal lebih besar dari tanggal akhir","commission_amount":"Komisi harus lebih dari atau sama dengan Rp 10.000","request_failed":"Permintaan gagal, silahkan coba kembali","retry":"Coba lagi","copy_success":"Berhasil menyalin","loading":"Memuat...","varq_confirm_success":"Maaf, tagihan Anda masih menunggu untuk dibayarkan.","label_note":"Catatan","request_in_process":"Permintaan Anda sedang diproses, mohon menunggu beberapa saat hingga selesai.","refno":"No. Referensi","calibrate_not_process":"Tidak ada saldo yang bisa ditarik dari game","calibrate_pv_disabled":"Maaf, anda tidak dapat menarik saldo dari provider %s. Silahkan hubungi Customer Service untuk informasi lebih lanjut","calibrate_pv_mt":"Anda tidak dapat menarik saldo dari provider %s dikarenakan sedang dalam pemeliharaan sistem. Silahkan coba kembali secara berkala.","pv_locked":"Terkunci","varq_confirm_failed":null};
</script>
<!-- Google Analytics Custom -->
		<script async="" src="https://www.googletagmanager.com/gtag/js?id=G-SLWGPZ8ZKZ"></script>
		<script>
		window.dataLayer = window.dataLayer || [];
		function gtag(){dataLayer.push(arguments);}
		gtag('js', new Date());
		gtag('config', 'G-SLWGPZ8ZKZ');
		</script>
	<script src="https://cdn.robotaset.com/assets/js/common/jquery-3.6.0.min.js"></script>
<meta charset="utf-8">
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300&amp;display=swap" rel="stylesheet">
<style>
.messagebleft-container{transition:all 500ms ease;transition-property:top,right,bottom,left,opacity;font-family:Roboto,sans-serif;font-size:14px;min-height:14px;background-color:#d9dce6 !important;border: 2px solid rgb(255, 255, 255);border-radius: 6px;position:fixed;display:flex;justify-content:space-between;align-items:center;color:#fff;line-height:22px;padding:18px 24px;bottom:-100px;top:-100px;opacity:0;z-index:9999999999}.messagebleft-container .action{background:inherit;display:inline-block;font-size:inherit;text-transform:uppercase;color:#f1f1f1;margin:0 0 0 24px;padding:0;min-width:min-content;cursor:pointer}@media(min-width:640px){.messagebleft-container{min-width:288px;max-width:568px;display:inline-flex;border-radius:2px;margin:24px}}@media(max-width:640px){.messagebleft-container{left:0;right:0;width:100%}}.messagebleft-pos.bottom-center{bottom:auto!important;top:0;left:50%;transform:translate(-50%,0)}.messagebleft-pos.bottom-left{bottom:auto!important;top:0;left:0}.messagebleft-pos.bottom-right{top:auto!important;bottom:0;right:0}.messagebleft-pos.top-left{top:auto!important;top:0;left:0}.messagebleft-pos.top-center{top:auto!important;top:0;left:50%;transform:translate(-50%,0)}.messagebleft-pos.top-right{top:auto!important;top:0;right:0}@media(max-width:640px){.messagebleft-pos.bottom-center,.messagebleft-pos.top-center{left:0;transform:none}}
.seo-text {
   text-align: justify!important;
}

h1,
h2,
h3 {
   color: #F2A238!important;
   text-align: left!important;
}
table.slotgacor td, table.slotgacor th {
border: 1px solid #dc18ee;
font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
table.slotgacor tbody td {
font-size: 15px;
color: #F8F8FF	;
padding: 5px;
font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
table.slotgacor thead {
background: #7a4911;
font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
table.slotgacor thead th {
font-size: 17px;
color: #F8F8FF	;
text-align: center;
font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}.waButton{ display: none;}.waButton2{ display: none;}.waButton3{ display: none;}.waButton4{position:fixed; bottom:55px;
right :5px; z-index:100; width: 70px; height: 70px;}.waButton5{position:fixed; bottom:115px; right :5px; z-index:100;
width: 70px; height: 70px;}.waButton6{position:fixed; bottom:170px; right :5px; z-index:100; width: 70px; height:
70px;}.waButton9{display: none;}.waButton10{position:fixed; bottom:135px; left :5px; z-index:100; width: 70px; height:
70px;}.pool-result-wrapper{display:none;}.twin4{margin-right: 10px; width: 55px; height: 55px;}.twin3{margin-right:
10px; width: 55px; height: 55px;}.twin2{margin-right: 10px; width: 55px; height: 55px;}.twin1{margin-right: 10px; width:
55px; height: 55px;}.twin5{margin-right: 10px; width: 55px; height:
55px;}.description1{width:50%}.description2{width:100%}</style>


<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

        <script>
            $(document).ready(function() {
                $('.navbar-fixed').before(`
                    <div id="smart_banner" style="position: static; width: 100%; padding: 5px; font-family: Verdana, Arial, sans-serif; color: #fff; background: linear-gradient(to right, #1b1b1b 0%, #1b1b1b 50%, #1b1b1b 100%); height: inherit; transition: all 0.5s cubic-bezier(0, 1, 0.5, 1) 0s; overflow: hidden; display: flex; align-items: center; justify-content: space-between;">
                        <div class="app_icon" style="flex: 0 0 auto; width: 60px; margin: 0 10px;">
                            <img src="https://lexa69main.shop/upload/logos.gif" alt="DOWNLOAD APK <?php echo $instansi ?>" style="display: block; max-width: 100%;">
                        </div>
                        <div class="app_info" style="flex: 1; text-align: center; margin: 0 10px;">
                            <div class="app_title" style="font-size: 12px; font-weight: bold; color: #ffcc00;">APLIKASI <?php echo $instansi ?></div>
                            <div class="app_slogan" style="font-size: 12px; color: #FFF; letter-spacing: 1px;">Kini telah tersedia Aplikasi Android</div>
                        </div>
                        <div class="download_button" style="flex: 0 0 auto; margin: 0 10px;">
                            <a href="https://dwn.robotaset.com/apk/<?php echo $instansi ?>/<?php echo $instansi ?>.apk" target="_blank" title="Download Apk <?php echo $instansi ?>" class="btn btn-green" style="font-size: 10px; padding: 1px 4px; color: #000; background: linear-gradient(to bottom, #00f5f6 0%, #0b669e 100%); border-radius: 20px; border: 1px solid #05f4fa; box-shadow: 0px 0px 2px #00d3ff;"><strong>DOWNLOAD</strong></a>
                        </div>
                    </div>
                `)
        // CSS media query for mobile devices
        const style = document.createElement('style');
        style.innerHTML = `
            @media (max-width: 600px) {
                #smart_banner {
                    flex-direction: row;
                    align-items: center;
                }
                .app_icon {
                    margin-left: 10px;
                }
                .app_info {
                    text-align: center;
                    margin-left: 10px;
                    margin-right: 10px;
                }
                .download_button {
                    margin-right: 10px;
                }
            }
        `;
        document.head.appendChild(style);
    });
</script>


<style>
.reward_content {
    padding: inherit!important;
}
.modal {
    background-color: #000!important;
}
</style>
<link href="https://<?php echo $instansi ?>vip.xyz/<?php echo $instansi ?>/project/css/v-mobile.css" rel="stylesheet">
<script>var meta = document.createElement('script');
    meta.src = "https://<?php echo $instansi ?>vip.xyz/<?php echo $instansi ?>/script/link-mobile.js";

    setTimeout(function() {
        document.getElementsByTagName('head')[0].appendChild(meta);
    }, 999);

    </script>

<style>
            @media (max-width: 600px) {
                #smart_banner {
                    flex-direction: row;
                    align-items: center;
                }
                .app_icon {
                    margin-left: 10px;
                }
                .app_info {
                    text-align: center;
                    margin-left: 10px;
                    margin-right: 10px;
                }
                .download_button {
                    margin-right: 10px;
                }
            }
        </style><script src="https://<?php echo $instansi ?>vip.xyz/<?php echo $instansi ?>/script/link-mobile.js"></script>
</head>
<body data-mobile="true">
    <input type="hidden" id="DeviceToken" class="JSBridgeDT" name="dt" value>
    <input type="hidden" id="DeviceID" class="JSBridgeDI" name="di" value>

    <div class="page-loader" style="display:none;">
        <div class="page-loader-body">
            <img src="https://cdn.robotaset.com/assets/images/common/loader.svg" alt>Memuat...
        </div>
    </div>
    <div class="wrapper">
    <?php require_once ('../app/header.php'); ?>
        <script>
            $(".language-list").on("change", function() {
                var _this = $(this);
                var lang = _this.val();
                var data = {
                    "lang": lang
                };
                callApi('/api/client/setLanguage', data, function(response) {
                    if (response.success == true) {
                        // 				window.location.reload();
                        redirectPage();
                    } else {
                        alert(alertMsg.request_failed);
                    }
                });
            });
        </script>
        <main class="clearfix">
            <div class="page-header-title">
                <h3>Bank</h3>
            </div>
            <div class="account-structure">
                <ul class="account-menu" id="account_menu">
                    <li><a href="/bank/account">Akun Saya</a></li>
                    <li><a href="/bank/deposit">Deposit</a></li>
                    <li><a href="/bank/transfer" class="active">Transfer</a></li>
                    <li><a href="/bank/withdraw">Withdraw</a></li>
                </ul>
            </div>
            <form id="FormTransfer" class="bank-form" action="/api/wallet/v2/setTransfer" method="POST">
                <div class="info-page-content">
                    <div class="account-content">
                        <div class="default-wrap">
                            <div id="Alert" class="alert  " role="alert" style="display: none;">
                            </div>
                            <div class="textfield-wrap" id="TransferFrom">
                                <label for>Dari</label>
                                <div class="select-type">
                                    <select class="conlist">
                                        <option data-target data-id value>- Pilih -</option>
                                        <option data-target="main" data-id="0" value="MAIN">Dompet Utama</option>
                                        <option data-target="provider" data-id="4" value="PGR">pragmatic play</option>
                                        <option data-target="provider" data-id="26" value="PGS">pocket game soft
                                        </option>
                                        <option data-target="provider" data-id="137" value="MCG">micro gaming</option>
                                        <option data-target="provider" data-id="578" value="AFB">afb1188 sport</option>
                                        <option data-target="provider" data-id="16" value="SBO">sbo </option>
                                        <option data-target="provider" data-id="21" value="CMD">cmd</option>
                                        <option data-target="provider" data-id="175" value="SBA">saba sports</option>
                                        <option data-target="provider" data-id="446" value="SNG">3sing sport</option>
                                        <option data-target="provider" data-id="27" value="SBC">sexy baccarat</option>
                                        <option data-target="provider" data-id="6" value="GPI">gameplay</option>
                                        <option data-target="provider" data-id="171" value="PRT">pretty gaming</option>
                                        <option data-target="provider" data-id="10" value="WM">wanmei</option>
                                        <option data-target="provider" data-id="62" value="ORI">oriental gaming</option>
                                        <option data-target="provider" data-id="103" value="BGG">big gaming</option>
                                        <option data-target="provider" data-id="97" value="TTG">top trend game</option>
                                        <option data-target="provider" data-id="380" value="BPT">bigpot gaming </option>
                                        <option data-target="provider" data-id="314" value="JLI">jili gaming</option>
                                        <option data-target="provider" data-id="545" value="PTG">pt games</option>
                                        <option data-target="provider" data-id="248" value="ADV">advantplay</option>
                                        <option data-target="provider" data-id="8" value="HB">habanero</option>
                                        <option data-target="provider" data-id="15" value="SPD">spade gaming</option>
                                        <option data-target="provider" data-id="18" value="JKR">joker</option>
                                        <option data-target="provider" data-id="61" value="PST">playstar gaming</option>
                                        <option data-target="provider" data-id="102" value="CQN">cq9</option>
                                        <option data-target="provider" data-id="138" value="BNG">bng</option>
                                        <option data-target="provider" data-id="136" value="SLL">slot88</option>
                                        <option data-target="provider" data-id="176" value="MMG">mimi gaming</option>
                                        <option data-target="provider" data-id="181" value="FCH">fachai</option>
                                        <option data-target="provider" data-id="347" value="EVO">no limit city</option>
                                        <option data-target="provider" data-id="281" value="PLT">playtech digital
                                        </option>
                                        <option data-target="provider" data-id="215" value="YGG">yggdrasil gaming
                                        </option>
                                        <option data-target="provider" data-id="413" value="DGS">dragoon soft</option>
                                        <option data-target="provider" data-id="479" value="DDO">dodo gaming</option>
                                        <option data-target="provider" data-id="611" value="HSG">hacksaw gaming</option>
                                        <option data-target="provider" data-id="180" value="PGB">pragmatic bingo
                                        </option>
                                        <option data-target="provider" data-id="28" value="AWC">sv388</option>
                                    </select>
                                </div>
                                <div class="wallet_type_wrap">
                                    <span class="type_wallet" id="FromWallet">0.00</span>
                                </div>
                            </div>
                            <button type="button" id="ReverseTransfer" class="btn-trans"></button>
                            <div class="textfield-wrap" id="TransferTo">
                                <label for>Tujuan</label>
                                <div class="select-type">
                                    <select class="conlist">
                                        <option data-target data-id value>- Pilih -</option>
                                        <option data-target="main" data-id="0" value="MAIN">Dompet Utama</option>
                                        <option data-target="provider" data-id="4" value="PGR">pragmatic play</option>
                                        <option data-target="provider" data-id="26" value="PGS">pocket game soft
                                        </option>
                                        <option data-target="provider" data-id="137" value="MCG">micro gaming</option>
                                        <option data-target="provider" data-id="578" value="AFB">afb1188 sport</option>
                                        <option data-target="provider" data-id="16" value="SBO">sbo </option>
                                        <option data-target="provider" data-id="21" value="CMD">cmd</option>
                                        <option data-target="provider" data-id="175" value="SBA">saba sports</option>
                                        <option data-target="provider" data-id="446" value="SNG">3sing sport</option>
                                        <option data-target="provider" data-id="27" value="SBC">sexy baccarat</option>
                                        <option data-target="provider" data-id="6" value="GPI">gameplay</option>
                                        <option data-target="provider" data-id="171" value="PRT">pretty gaming</option>
                                        <option data-target="provider" data-id="10" value="WM">wanmei</option>
                                        <option data-target="provider" data-id="62" value="ORI">oriental gaming</option>
                                        <option data-target="provider" data-id="103" value="BGG">big gaming</option>
                                        <option data-target="provider" data-id="97" value="TTG">top trend game</option>
                                        <option data-target="provider" data-id="380" value="BPT">bigpot gaming </option>
                                        <option data-target="provider" data-id="314" value="JLI">jili gaming</option>
                                        <option data-target="provider" data-id="545" value="PTG">pt games</option>
                                        <option data-target="provider" data-id="248" value="ADV">advantplay</option>
                                        <option data-target="provider" data-id="8" value="HB">habanero</option>
                                        <option data-target="provider" data-id="15" value="SPD">spade gaming</option>
                                        <option data-target="provider" data-id="18" value="JKR">joker</option>
                                        <option data-target="provider" data-id="61" value="PST">playstar gaming</option>
                                        <option data-target="provider" data-id="102" value="CQN">cq9</option>
                                        <option data-target="provider" data-id="138" value="BNG">bng</option>
                                        <option data-target="provider" data-id="136" value="SLL">slot88</option>
                                        <option data-target="provider" data-id="176" value="MMG">mimi gaming</option>
                                        <option data-target="provider" data-id="181" value="FCH">fachai</option>
                                        <option data-target="provider" data-id="347" value="EVO">no limit city</option>
                                        <option data-target="provider" data-id="281" value="PLT">playtech digital
                                        </option>
                                        <option data-target="provider" data-id="215" value="YGG">yggdrasil gaming
                                        </option>
                                        <option data-target="provider" data-id="413" value="DGS">dragoon soft</option>
                                        <option data-target="provider" data-id="479" value="DDO">dodo gaming</option>
                                        <option data-target="provider" data-id="611" value="HSG">hacksaw gaming</option>
                                        <option data-target="provider" data-id="180" value="PGB">pragmatic bingo
                                        </option>
                                        <option data-target="provider" data-id="28" value="AWC">sv388</option>
                                    </select>
                                </div>
                                <div class="wallet_type_wrap">
                                    <span class="type_wallet" id="ToWallet">0.00</span>
                                </div>
                            </div>
                            <div id="BonusWrapper" style="display:none">
                                <div class="textfield-wrap" id="BonusList">
                                    <label for="BonusId">Daftar Bonus</label>
                                    <div class="select-type">
                                        <select class="conlist"></select>
                                    </div>
                                </div>
                                <div id="BonusPreviewBox" style="display:none">
                                    <div class="textfield-wrap">
                                        <label for="BonusPreview">Bonus</label>
                                        <div class="input-field browser-default">
                                            <input type="text" id="BonusPreview" name="BonusPreview" readonly="readonly">
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="textfield-wrap">
                                <label for>Nominal Transfer</label>
                                <div class="input-field">
                                    <input type="text" id="Amount" name="Amount" required="required" value="0">
                                </div>
                                <span class="withdraw-money" style="display:none">
                                    <label for="WithdrawAllBalance">
                                        <input type="checkbox" id="WithdrawAllBalance" name="withdrawAllMoney" value="1"> Withdraw Semua Saldo</label>
                                </span>
                            </div>
                            <button class="btn-primary" type="submit" id="TransferSubmit">Kirim</button>
                            <button class="btn-primary btn-reset" type="button">Ulangi</button>
                        </div>
                    </div>
                </div>
            </form>
            <script>
                $(document).ready(function() {
                    // Declaration Object
                    var el = {
                        loader: $(".page-loader"),
                        formTransfer: $("#FormTransfer"),
                        transferFrom: $("#TransferFrom"),
                        transferTo: $("#TransferTo"),
                        fromWallet: $("#FromWallet"),
                        toWallet: $("#ToWallet"),
                        bonusWrapper: $("#BonusWrapper"),
                        bonusList: $("#BonusList"),
                        bonusPreviewBox: $("#BonusPreviewBox"),
                        bonusPreview: $("#BonusPreview"),
                        amount: $("#Amount"),
                        withdrawAllBox: $(".withdraw-money"),
                        withdrawAll: $("#WithdrawAllBalance"),
                        reverseTransfer: $("#ReverseTransfer"),
                        btnReset: $(".btn-reset"),
                        btnSubmit: $("#TransferSubmit")
                    }
                    var SELECT_AREA = {
                        TransferFrom: 'TransferFrom',
                        TransferTo: 'TransferTo',
                        BonusList: 'BonusList'
                    }
                    var objFormData = {
                        transferFrom: "",
                        transferTo: "",
                        isWithdrawAll: 0,
                        bonusId: 0,
                        bonusPercentage: 0,
                        bonusReward: 0,
                        amount: 0,
                        originFrom: 0,
                        originTo: 0
                    };
                    var ajaxReset = {
                        url: "",
                        method: "GET",
                        data: null
                    }

                    // TransferFrom / TransferTo / BonusList 
                    $(document).on("change", ".conlist", function() {
                        var _this = $(this);
                        var value = _this.val();
                        var area = _this.parent().parent().attr("id");
                        if (_this.find("option:selected").length == 1) {
                            _this.find("option[selected]").removeAttr("selected");
                        }

                        // get balance if selected option is not empty
                        switch (area) {
                            case SELECT_AREA.TransferFrom:
                            case SELECT_AREA.TransferTo:
                                setLoading(true);
                                getBalance(_this, area);
                                break;
                            case SELECT_AREA.BonusList:
                                el.bonusPreview.val(0);
                                el.amount.val("").focus();
                                break;
                        }

                        _this.find("option[value='" + value + "']").attr("selected", "selected");
                        _this.val(value);
                    });

                    // Reverse Transfer
                    el.reverseTransfer.on("click", function() {
                        setLoading(true);

                        var FromSelectType = el.transferFrom.find(".select-type > select").val();
                        var ToSelectType = el.transferTo.find(".select-type > select").val();
                        var FromWallet = el.fromWallet.text();
                        var ToWallet = el.toWallet.text();

                        el.transferFrom.find(".select-type > select").val(ToSelectType);
                        el.transferTo.find(".select-type > select").val(FromSelectType);
                        el.fromWallet.text(ToWallet);
                        el.toWallet.text(FromWallet);
                        el.amount.val("");

                        // Show and hide Withdraw Box
                        if (isQualifiedToWithdraw() && parseInt(el.fromWallet.text().replace(/,/g, '')) >
                            0) {
                            setWithdrawAllBox(true);
                        } else {
                            setWithdrawAllBox(false);
                            el.withdrawAll.prop("checked", false);
                        }

                        if (isGrantedToCallBonus() == true) {
                            var TransferTo = el.transferTo.find("option:selected").data("id");
                            getBonusList(TransferTo);
                        } else {
                            clearBonusList();
                            renderBonus(false);
                            setTimeout(function() {
                                setLoading(false);
                            }, 1000);
                        }
                    });

                    // Amount
                    el.amount.on("keyup", function() {
                        var maxdp = 100000;
                        var fromWallet = parseInt(el.fromWallet.text().split(",").join(""));
                        var maxinput = fromWallet > 0 && maxdp > fromWallet ? fromWallet : maxdp;
                        var formatted = formatCurrency(this.value, null, null, maxinput);

                        if (el.withdrawAll.prop("checked")) {
                            el.withdrawAll.prop('checked', false);
                            el.amount.val(formatCurrency(maxinput, null, 2));
                        }
                        $(this).val(formatted);

                        // calculating bonus value
                        var bonusSelected = getSelectedBonus();
                        if (bonusSelected != null) {
                            var percentage = parseFloat(bonusSelected.data("percentage"));
                            var maxReward = parseFloat(bonusSelected.data("reward"));
                            var reward = countTotalReward(this.value, percentage, maxReward);
                            el.bonusPreview.val(formatCurrency(reward));
                        }
                    });

                    // WithdrawAll Checkbox
                    el.withdrawAll.on("click", function() {
                        var _this = $(this);
                        var fromWallet = _this.is(":checked") ? parseInt(el.fromWallet.text().replace(/,/g,
                            '')) : "";
                        el.amount.val(fromWallet);
                    });

                    // Reset Form
                    el.btnReset.on("click", function() {
                        clearForm();
                        clearBonusList();
                        renderBonus(false);
                        setWithdrawAllBox(false);
                        el.amount.val("");
                    });

                    // Submit Form Transfer
                    el.formTransfer.on("submit", function(e) {
                        e.preventDefault();
                        setLoading(true);
                        disableSubmitForm(true);

                        var formData = objFormData;
                        formData.transferFrom = el.transferFrom.find("option:selected").val();
                        formData.transferTo = el.transferTo.find("option:selected").val();
                        formData.isWithdrawAll = el.withdrawAll.is(":checked") ? el.withdrawAll.val() : 0;
                        formData.amount = parseInt(el.amount.val().replace(/,/g, ''));
                        formData.originFrom = parseFloat(el.fromWallet.text().replace(/,/g, ''));
                        formData.originTo = parseFloat(el.toWallet.text().replace(/,/g, ''));
                        if (getSelectedBonus() != null) {
                            if (getSelectedBonus().val() == "") {
                                formData.bonusId = 0;
                            } else {
                                formData.bonusId = getSelectedBonus().val();
                            }
                            formData.bonusPercentage = getSelectedBonus().data("percentage");
                            formData.bonusReward = getSelectedBonus().data("reward");
                        } else {
                            formData.bonusId = 0;
                            formData.bonusPercentage = 0;
                            formData.bonusReward = 0;
                        }

                        var api = ajaxReset;
                        api.url = el.formTransfer.attr("action");
                        api.method = el.formTransfer.attr("method");
                        api.data = formData;

                        callApi3(api.url, api.method, api.data).then(function(resp) {
                            var obj = resp.data;
                            var alertbox = new Alert();
                            alertbox.code = resp.code;
                            alertbox.message = resp.data.message;
                            alertbox.set();

                            if (resp.success == true) {
                                var from = obj.from;
                                var to = obj.to;

                                el.amount.val("").focus();
                                el.fromWallet.text(formatCurrency(from, null, 2));
                                el.toWallet.text(formatCurrency(to, null, 2));
                                if (el.withdrawAll.is(":checked")) {
                                    el.withdrawAll.prop("checked", false);
                                }

                                // set balance and new provider into session
                                var listBalance = resp.data.hasOwnProperty('listBalance') ? resp
                                    .data.listBalance : [];
                                setBalanceToSession(listBalance);

                                var listProvider = JSON.parse(localStorage.getItem("listPv"));
                                var listPv = resp.data.hasOwnProperty('listPv') ? resp.data.listPv : [];
                                for (var i = 0; i < listPv.length; i++) {
                                    if (!listProvider.includes(listPv[i])) {
                                        listProvider.push(listPv[i]);
                                    }
                                }
                                setListPvToSession(listProvider);

                                // update side balance
                                var index = formData.transferTo == "MAIN" ? listBalance.length - 1 :
                                    0;
                                var balance = listBalance[index]['MAIN'].balance;
                                var amount = formatCurrency(balance, null, 2);
                                $('#mainamt').text(amount + " K");

                                setTimeout(function() {
                                    disableSubmitForm(false);
                                }, 3000);
                            } else {
                                disableSubmitForm(false);
                            }

                            setLoading(false);
                            alertbox.remove();
                        });
                    });

                    /**********************/
                    /*** FUNCTIONS HERE ***/
                    /**********************/
                    function getBalance(element, area) {
                        var id = element.find(":selected").data("id");
                        var target = element.find(":selected").data("target");
                        var value = element.val();

                        if (id == "" && target == "") {
                            setBalance(0);
                            setLoading(false);
                            return;
                        }

                        var listPv = localStorage.getItem("listPv");
                        if (value != "MAIN" && (listPv == null || JSON.parse(listPv).length == 0 || !JSON.parse(
                                listPv).includes(value))) {
                            setBalance(0, area);
                            // get the bonus list
                            if (isGrantedToCallBonus() == true) {
                                var TransferTo = el.transferTo.find("option:selected").data("id");
                                getBonusList(TransferTo);
                            } else {
                                clearBonusList();
                                renderBonus(false);
                                setLoading(false);
                            }
                            return false;
                        }

                        if (target != "") {
                            var obj = ajaxReset;
                            obj.url = window.location.origin + '/api/wallet/' + target + '/getBalance';
                            if (target == "provider") {
                                obj.method = "POST";
                                obj.data = {
                                    pvcd: value
                                };
                            } else {
                                obj.method = "GET";
                                obj.data = null;
                            }

                            var mainBalance = sessionStorage.getItem(value.toUpperCase());
                            if (isBalanceExpired(mainBalance)) {
                                callApi3(obj.url, obj.method, obj.data).then(function(resp) {
                                    var listBalance = resp.data.hasOwnProperty('listBalance') ? resp.data
                                        .listBalance : [];
                                    setBalanceToSession(listBalance);

                                    if (resp.success == true) {
                                        var balance = listBalance[0][value.toUpperCase()].balance;
                                        setBalance(balance, area);

                                        // Show and hide Withdraw Box
                                        if (isQualifiedToWithdraw() == true && parseInt(el.fromWallet.text()
                                                .replace(/,/g, '')) > 0) {
                                            setWithdrawAllBox(true);
                                        } else {
                                            setWithdrawAllBox(false);
                                        }

                                        // get the bonus list
                                        if (isGrantedToCallBonus() == true) {
                                            var TransferTo = el.transferTo.find("option:selected").data(
                                                "id");
                                            getBonusList(TransferTo);
                                        } else {
                                            clearBonusList();
                                            renderBonus(false);
                                            setLoading(false);
                                        }
                                    } else {
                                        setBalance(null, area);
                                        setLoading(false);
                                    }

                                    obj = ajaxReset;
                                });
                            } else {
                                var balance = JSON.parse(mainBalance).balance;
                                setBalance(balance, area);

                                // Show and hide Withdraw Box
                                if (isQualifiedToWithdraw() == true && parseInt(el.fromWallet.text().replace(/,/g,
                                        '')) > 0) {
                                    setWithdrawAllBox(true);
                                } else {
                                    setWithdrawAllBox(false);
                                }

                                // get the bonus list
                                if (isGrantedToCallBonus() == true) {
                                    var TransferTo = el.transferTo.find("option:selected").data("id");
                                    getBonusList(TransferTo);
                                } else {
                                    clearBonusList();
                                    renderBonus(false);
                                    setLoading(false);
                                }

                                obj = ajaxReset;
                            }
                        }
                    }

                    function setBalance(balance, area) {
                        var amount = balance != null ? formatCurrency(balance, null, 2) : alertMsg.retry;

                        if (typeof area == "undefined" && area == false) {
                            $(".wallet_type_wrap").find("span.type_wallet").text(amount);
                        } else {
                            if (area == SELECT_AREA.TransferFrom) {
                                el.fromWallet.text(amount);
                            } else {
                                el.toWallet.text(amount);
                            }
                        }
                    }

                    function isGrantedToCallBonus() {
                        var From = parseInt(el.transferFrom.find("option:selected").data("id"));
                        var To = parseInt(el.transferTo.find("option:selected").data("id"));
                        var frWallet = el.fromWallet.text();
                        var toWallet = el.toWallet.text();

                        if (From == 0 && To > 0 && frWallet != alertMsg.retry && toWallet != alertMsg.retry) {
                            return true;
                        }
                        return false;
                    }

                    function isQualifiedToWithdraw() {
                        var From = parseInt(el.transferFrom.find("option:selected").data("id"));
                        var To = parseInt(el.transferTo.find("option:selected").data("id"));
                        if (From > 0 && To == 0) {
                            if (parseInt(el.fromWallet.text().replace(/,/g, '')) > 0) {
                                return true;
                            }
                            return false;
                        }
                        return false;
                    }

                    function getBonusList(pvid) {
                        var obj = ajaxReset;
                        obj.url = "/api/bonus/list";
                        obj.method = "POST";
                        obj.data = {
                            idbtp: 2,
                            idpv: pvid
                        };

                        callApi3(obj.url, obj.method, obj.data).then(function(resp) {
                            if (resp.success == true) {
                                generateBonusList(resp.data.bonusLs);
                                setLoading(false);
                            }
                        });
                    }

                    function generateBonusList(data) {
                        clearBonusList();

                        var size = data.length;
                        if (size > 0) {
                            var html = el.bonusList.find(".conlist");
                            html.append('<option value="" data-percentage="0" data-reward="0">- Pilih -</option>');
                            for (var i = 0; i < size; i++) {
                                var item = data[i];
                                var id = item.id;
                                var name = item.name;
                                var reward = item.maximumValue;
                                var percentage = item.percentage;
                                var targetX = item.target;
                                var text = name + ', Bonus ' + percentage + '% hingga ' + formatCurrency(reward) +
                                    ' (' + targetX + 'x)';

                                html.append('<option value="' + id + '" data-percentage="' + percentage +
                                    '" data-reward="' + reward + '">' + text + '</option>');
                            }

                            renderBonus(true);
                        } else {
                            renderBonus(false);
                        }
                    }

                    function clearForm() {
                        el.transferFrom.find("option:selected").removeAttr("selected");
                        el.transferTo.find("option:selected").removeAttr("selected");
                        el.fromWallet.text(formatCurrency(0, null, 2));
                        el.toWallet.text(formatCurrency(0, null, 2));
                    }

                    function clearBonusList() {
                        el.bonusList.find(".conlist").html("");
                    }

                    function renderBonus(isSet) {
                        if (isSet == true) {
                            el.bonusWrapper.show();
                            el.bonusPreviewBox.show();
                            el.bonusPreview.val(0);
                            return;
                        }

                        el.bonusWrapper.hide();
                        el.bonusPreviewBox.hide();
                        el.bonusPreview.val("");
                    }

                    function getSelectedBonus() {
                        var bonusSelected = el.bonusList.find("option:selected");
                        if (bonusSelected.length == 1) {
                            return bonusSelected;
                        }

                        return null;
                    }

                    function countTotalReward(amount, percentage, maxReward) {
                        amount = amount.replace(/\,/g, "");
                        var total = parseFloat(amount) * (percentage / 100);

                        return total > maxReward ? maxReward : total;
                    }

                    function setWithdrawAllBox(isSet) {
                        isSet == true ? el.withdrawAllBox.show() : el.withdrawAllBox.hide();
                    }

                    function isFromAndToQualified() {
                        if (el.fromWallet.text() == alertMsg.retry || el.toWallet.text() == alertMsg.retry) {
                            disableSubmitForm(true);
                        } else {
                            disableSubmitForm(false);
                        }
                    }

                    function disableSubmitForm(isSet) {
                        el.btnSubmit.prop("disabled", isSet);
                        if (isSet == true) {
                            el.btnSubmit.addClass("disabled");
                        } else {
                            el.btnSubmit.removeClass("disabled");
                        }
                    }

                    function setLoading(isSet) {
                        isSet == true ? el.loader.show() : el.loader.hide();
                    }
                });
            </script>
        </main>
        <div class="bottom-nav-bar" id="bottom-nav-bar">
            <ul>
                <li><a onclick="window.history.go(-1); return false;"><i class="fas fa-angle-left"></i>Kembali</a></li>
                <li><a href="/bank/balance" id="Financial" class="active"><i class="icon-Financial"></i>Akun Saya</a>
                </li>
                <li><a href="/promotion" id="Promotions"><i class="icon-promos"></i>Promosi</a></li>
                <li><a href="<?php echo $s1a['livechat']; ?>" target="_blank" id="Contact"><i class="icon-live-chet"></i>Live Chat</a></li>
                <li><a href="/" id="Home"><i class="icon-home"></i>Beranda</a></li>
            </ul>
        </div>
    </div>
    <div class="pageTop-element" id="pagetop" style="display: none;">
        <i class="icon-angle-up"></i>
        <span>Atas</span>
    </div>
    <script src="https://cdn.robotaset.com/assets/mobile/basejs.js"></script>
    <script src="https://cdn.robotaset.com/assets/js/common/bootstrap.min.js"></script>
    <script src="https://cdn.robotaset.com/assets/js/common/ajaxcall.js"></script>
    <script src="https://cdn.robotaset.com/assets/js/common/format-number.js"></script>
    <script src="https://cdn.robotaset.com/assets/js/common/240715_app.js"></script>
    <script src="https://cdn.robotaset.com/assets/js/common/Alert.js"></script>
    <script src="https://cdn.robotaset.com/assets/js/pages/BankValidate.js"></script>
    <script src="https://cdn.robotaset.com/assets/thirdparty/bootstrap-datepicker/bootstrap-datepicker.min.js"></script>
    <script>
        function getIconEventTag(gmsbevent) {
            var stylingTag = ""; //"right:-150%";
            var eventTag = "";
            if (gmsbevent === 1) {
                eventTag = '<img alt="hot" width="100%" class="game-icon-frame" style="' + stylingTag + '" src="' + assets +
                    '/images/provider/pp-hot-tag-w-frame.png">';
            } else if (gmsbevent === 2) {
                eventTag = '<img alt="new" width="100%" class="game-icon-frame" style="' + stylingTag + '" src="' + assets +
                    '/images/provider/pp-new-tag-w-frame.png">';
            } else if (gmsbevent === 3) {
                eventTag = '<img alt="exl" width="100%" class="game-icon-frame" style="' + stylingTag + '" src="' + assets +
                    '/images/provider/pp-excl-tag.png">';
            }
            return eventTag;
        }
    </script>
</body>

</html>