import"./lang-handle.946d9bb6.js";import{b as _,c as d,a as Y,P as g,l,S as O,d as x,I as D,e as w,f as z,i as V,h as W,N as J,j as c,k as K,m as X,g as Q,n as Z}from"./report.ceb8f9f0.js";let ee=$(".nav-wrap .language-item");ee.each((t,e)=>{$(e).click(()=>{let n=$(e).html();_({events:"office_sub_tab_btn",optional_params:{tab_name:n}})})});$(".btn-reserve-wrap .btn-reserve").click(()=>{_({events:"office_preregister_btn"})});$(".channel-discord").click(()=>{_({events:"office_follow_us_btn",optional_params:{channel_name:"discord"}})});$(".channel-facebook").click(()=>{_({events:"office_follow_us_btn",optional_params:{channel_name:"fb"}})});$(".channel-twitter").click(()=>{_({events:"office_follow_us_btn",optional_params:{channel_name:"twitter"}})});$(".channel-youtube").click(()=>{_({events:"office_follow_us_btn",optional_params:{channel_name:"youtube"}})});$(".btn-follow-discord").click(()=>{_({events:"office_follow_discord_btn"})});$(document).ready(function(){$(".m-loading").is(":visible")&&d("office_loading_page","cms_vshow")});const te=Y(),v=location.pathname.match("/m.html");let f=!1;$(".dia-btn4").addClass("lock");$(".top-invite").off("click");$(".slide1-btn1").off("click");$(".nav-center").off("click");$(".top-invite").attr("href","javascript:;");$(".slide1-btn1").attr("href","javascript:;");$(".nav-center").attr("href","javascript:;");$(".top-invite").on("click",T);$(".nav-center").on("click",T);$(".slide1-btn1").on("click",()=>{g==="en"?ie():T()});function ne(t){d("office_question_enter_btn","cm_click");const e=document.createElement("a");e.target="_blank",e.href=t,e.click()}let b=!1;async function ie(){b=!0,P()}function T(){b=!1,P()}function E(){if(!se()){v?window==null||window.openDialog("pop10"):window==null||window.openDialog("pop8");return}if(g==="en")return ne(J)}async function P(){if(f)b&&E();else if(l.checkLogin()||await l.login(),l.checkLogin()){if(y(),await A(),k(),f){b?E():ae();return}const n=l.getUser().channel_info.account,a=document.getElementById("unbindphone");a&&(a.value=n),v?window==null||window.openDialog("pop7"):window==null||window.openDialog("pop5")}}let C=null;function R(){C=setTimeout(()=>{j(!1)?$(".dia-btn4").removeClass("lock"):$(".dia-btn4").addClass("lock")},200)}$(".dia-input1").on("blur input propertychange",function(t){const e=$(".dia-input1").val().toString();$(".dia-input1").val($.trim(e)),clearTimeout(C),R()});$(".dia-radio a").on("click",function(t){$(t.target).toggleClass("on"),clearTimeout(C),R()});function j(t=!0){const e=$(".dia-input1").val().toString();return!e||e.length>75||e.match(/[\uD83C-\uDBFF\uDC00-\uDFFF]+/g)||!W(e)?(t&&m("reserve-fail-email"),!1):!!$(".dia-radio a.on").length}let L=!1;$(".dia-btn4").click(()=>{if(j()){if(L)return;L=!0;const e=$(".dia-input1").val().toString(),n=[];$(".dia-radio a").each((a,i)=>{i.classList.contains("on")&&n.push(a+1)}),d("office_email_submit_btn","cm_click",{email:e,game_mode:n}),H(e,{source:"homePage",gameModes:n})}});async function H(t,e){var a;h||await B();const n={biz_id:"1",content:{email:t,modify_ts:new Date().getTime(),location:h,language:O[g]||"en",source:"officialWeb",tags:x,subscribe:1,attributes:{game_mode:e==null?void 0:e.gameModes.map(i=>String(i))}}};try{const i=l.getUser(),o={channel_id:(a=i==null?void 0:i.channel_info)==null?void 0:a.channelId,login_res:i,intl_game_id:D},{data:s}=await w.smartlinkSyncUserByEmail(Object.assign(n,{authParams:o}));if(s.need_captcha){(await te.verifyTXCaptcha({lang:g,appid:z})).data.result===0?H(t,e):(m("reserve-submit-fail"),L=!1);return}return d("office_reserve_ret","cm_click",{ret:s.result,email:t,game_mode:e==null?void 0:e.gameModes}),s.result===0&&await F(t,n.content)?(f=!0,k(),m("reserve-success-msg"),setTimeout(function(){window==null||window.closeDialog(),b&&E(),v?window==null||window.openDialog("pop8"):window==null||window.openDialog("pop6")},500),!0):(m("reserve-submit-fail"),!1)}catch(i){console.log(i)}}function ae(t=""){const e=document.querySelectorAll(".comm-error")[0];if(e){e.classList.add("top","active");const n=(window==null?void 0:window.GLanguage[localStorage.getItem("lang")||"en"])||{};if(v){const a=e.querySelector("span");a.innerText=t||n.lang7}else e.innerText=t||n.lang7;e.style.display="flex",setTimeout(function(){e.style.display="none"},2e3)}}function m(t){["reserve-success-msg","reserve-submit-fail","reserve-fail-privacy","reserve-fail-age","reserve-fail-email"].forEach(n=>{n!==t&&$(`.${t}`).hide()}),$(`.${t}`).addClass("top active"),$(`.${t}`).show(),setTimeout(function(){$(`.${t}`).hide()},2e3)}async function oe(){await l.login(),y(),await A(),k()}window.liPassLogin=oe;async function q(){await l.logout(),y(),window.location.reload()}window.liPassSignOut=q;function y(){if(l.checkLogin()){const e=l.getUser().channel_info.account;$("#login_nickname_span").text(e),$("#unlogin").hide(),$("#logined").show()}else $("#login_nickname_span").text(""),$("#unlogin").show(),$("#logined").hide()}function k(){var t,e;f?($(".nav-center").addClass("on").css("cursor","unset"),$(".top-invite").addClass("on"),$(".slide1-btn1").addClass("on"),$("a[data-login='logined']").show(),$("a[data-login='unlogin']").hide(),g==="en"&&($(".slide1-btn1").removeClass("on"),(t=document.querySelector(".slide1-btn1[data-login='unlogin']"))==null||t.setAttribute("style",""),(e=document.querySelector(".slide1-btn1[data-login='logined']"))==null||e.setAttribute("style","display: none;"))):($(".nav-center").removeClass("on"),$(".top-invite").removeClass("on"),$(".slide1-btn1").removeClass("on"),$("a[data-login='logined']").hide(),$("a[data-login='unlogin']").show())}let h="";async function B(){const t=await V.queryMyRegion();h="999",t.region&&(h=t.region)}async function F(t,e){var o;if(!l.checkLogin())return!1;const n=l.getUser(),a={channel_id:(o=n==null?void 0:n.channel_info)==null?void 0:o.channelId,login_res:n,intl_game_id:D},i=await w.register(Object.assign({type:1,opt_type:0,info:{email:t,ext_info:JSON.stringify({location:e.location,game_mode:e.attributes.game_mode})}},{authParams:a}));return i&&i.data.result==0}async function A(){var t;if(f)return!0;if(l.checkLogin()){const e=l.getUser(),n={channel_id:(t=e==null?void 0:e.channel_info)==null?void 0:t.channelId,login_res:e,intl_game_id:D};let a=null;try{a=await w.getUserInfoV2({type:1,opt_type:0,authParams:n})}catch(s){q();return}f=a&&a.data&&a.data.register_status===1;let i=!1,o={location:"",attributes:{}};try{const s=await w.smartlinkUserInfo({authParams:n,biz_id:1,type:2,value:e.channel_info.account});if(i=s.tag?s.tag.includes(x[0]):!1,s.extra&&s.extra.length)for(let S in s.extra){const I=s.extra[S];o.attributes[I.field_name]=I.field_value}s.country?o.location=s.country:(await B(),o.location=h),console.log(s)}catch(s){console.log(s)}return i&&!f&&F(e.channel_info.account,o),f=f||i,f}}function se(){var t,e;if(l.checkLogin()){const n=l.getUser();return((e=(t=n==null?void 0:n.extra_json)==null?void 0:t.get_status_rsp)==null?void 0:e.adult_check_status)===1}return!0}async function le(){l.checkLogin()&&(y(),await A(),k())}le();$(function(){d("office_web_home_page","cm_vshow"),$(".nav-list a").on("click",t=>{d("office_web_home_sub_tab","cm_click",{btn_name:$(t.currentTarget).find("span").text()})}),$(".nav-center").on("click",()=>{d("office_preregister_btn","cm_click")}),$(".video-box").on("click",()=>{d("office_video_btn","cm_click")}),$(".slide1-btn1").on("click",()=>{d("office_preregister_now_btn","cm_click")}),c(".comm-list a",t=>({events:"office_web_follow_us_btn",optional_params:{channel_name:X(t==null?void 0:t.href)}})),c(".join-test",()=>({events:"office_franchise_btn"})),c("#pop6 .dia-btn1",()=>({events:"office_discord_btn"})),K()&&c("#pop8 .dia-btn1",()=>({events:"office_discord_btn"})),c(".slide1-btn2",()=>({events:"office_steam_wishlist_btn"})),c(".slide1-btn3",()=>({events:"office_ps_wishlist_btn"})),c(".slide1-btn4",()=>({events:"office_download_launcher_btn"})),c(".top_btn a:nth-child(1)",()=>({events:"office_top_sub_item_btn",optional_params:{tab_name:"Customer Service"}})),c(".top_btn a:nth-child(2)",()=>({events:"office_top_sub_item_btn",optional_params:{tab_name:"G.T.I Security"}})),c(".top_btn a:nth-child(3)",()=>({events:"office_top_sub_item_btn",optional_params:{tab_name:"Redemption Center"}})),c(".top_btn a:nth-child(4)",()=>({events:"office_top_sub_item_btn",optional_params:{tab_name:"Access Enquiry"}})),c(".page-main .service",()=>({events:"office_top_sub_item_btn",optional_params:{tab_name:"Customer Service"}})),c(".page-main .security",()=>({events:"office_top_sub_item_btn",optional_params:{tab_name:"G.T.I Security"}})),c(".page-main .center",()=>({events:"office_top_sub_item_btn",optional_params:{tab_name:"Redemption Center"}})),c(".page-main .access",()=>({events:"office_top_sub_item_btn",optional_params:{tab_name:"Access Enquiry"}}))});const ce='<iframe id="yt_v" frameborder="0" allowfullscreen="" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" title="Delta Force: Hawk Ops | Gameplay Showcase: Havoc Warfare" width="100%" height="100%" src="https://www.youtube-nocookie.com/embed/rqnxxgevGf0?rel=0&autoplay=0&origin=https%3A%2F%2Fwww.playdeltaforce.com&enablejsapi=1&widgetid=1"></iframe>',re=function(){window.playVideo=function(){document.querySelector("#vplay-con").innerHTML=ce,window.openDialog("vindex-play")},window.hideVideo=function(){document.querySelector("#vplay-con").innerHTML="",window.closeDialog()}},N=Q(),p=location.pathname.match("/m.html");async function ue(){let t=0;const e=await N.getPreRegUserCount();e.data&&e.data.reserve_number&&(t=e.data.reserve_number),U(t)}function U(t){$(".slide7_num p").text(t.toLocaleString());const e=[0,1e5,5e5,1e6,2e6,5e6,1e7,12e6],n=p?[0,10,27,43,61,78,94,100]:[0,17,30.4,43.8,56.9,70.3,83.6,100];let a=0;for(let i=e.length-1;i>=0;i--)if(t>=e[i]){if(a=n[i],i<e.length-1){const o=Math.floor((t-e[i])/(e[i+1]-e[i])*(n[i+1]-n[i]));a+=o}i===e.length-1&&(a=100);for(let o=0;o<i;o++)$(".slide7_line .prize_li")[o]&&$(".slide7_line .prize_li")[o].classList.add("on");break}$(".slide7-main .line").css(p?"height":"width",a+"%")}window.setReserveNum=U;let u=null;const r={total:0,perpage:20,page:0,totalPage:0};async function fe(){const t={column_name:Z,use_all:!0,all_label_name:"GENERAL",manager_type:"page",perpage:r.perpage,disable_use_default_language:!0};if(u=await N.getNewsManager(t),!u)return;await(u==null?void 0:u.setPage(0)),r.totalPage=u.total_page,de(u),G(u,!0);const e=document.querySelector(".s2-list-load");e&&(r.totalPage<=1&&(e.style.display="none"),e.addEventListener("click",()=>{_e()}))}const M={en:"Read More",fr:"En savoir plus",es:"Saber m\xE1s",ru:"\u041F\u043E\u0434\u0440\u043E\u0431\u043D\u0435\u0435",de:"Mehr erfahren",ar:"\u0645\u0632\u064A\u062F \u0645\u0646 \u0627\u0644\u0642\u0631\u0627\u0621\u0629","zh-tw":"\u95B1\u8B80\u66F4\u591A","zh-cn":"\u9605\u8BFB\u66F4\u591A",th:"\u0E2D\u0E48\u0E32\u0E19\u0E23\u0E32\u0E22\u0E25\u0E30\u0E40\u0E2D\u0E35\u0E22\u0E14\u0E40\u0E1E\u0E34\u0E48\u0E21",vi:"\u0110\u1ECDc th\xEAm",id:"Baca Lebih Lanjut",pt:"Saiba mais",ko:"\uC790\uC138\uD788\uBCF4\uAE30",ja:"\u3082\u3063\u3068\u898B\u308B",tr:"Daha Fazla",ms:"Baca Lagi"};async function de(t){const e=document.querySelector(".slide2-list"),n=localStorage.getItem("lang")||"en",i=t.getNewsListHtml({get_template:o=>` <li> <a href="[link]" target="_blank"> <div class="slide2-bg-box"><img src="[cover]" alt=""></div> <div class="news-type sprites type1"></div> <p class="news-time">[date]</p> <p class="news-title">[title]</p> <p class="news-desc">${o.content_part}</p> <p class="news-more">${M[n]||M.en}</p> </a> </li> `,dateformat:"YYYY/MM/DD",href:"./detail.html"}).opt_list_dom_str_arr.slice(0,3);e.innerHTML=i.join("")}async function G(t,e=!1){const n=p?document.querySelector(".slide2-main ul.slide2-item-list"):document.querySelector(".slide2-news-list ul");e&&(n.innerHTML="");const a=(window==null?void 0:window.GLanguage[localStorage.getItem("lang")||"en"])||{},o=t.getNewsListHtml({get_template:s=>p?` <li class="slide2-news-item"> <a href="[link]" target="_blank"> <p class="title">[title]</p> <p class="time">[date]</p> </a> </li> `:` <li> <a href="[link]" target="_blank"> <div class="img-box"> <img src="[cover]" alt=""></div> <p class="type">${a.lang8}</p> <p class="title">[title]</p> <p class="desc">${s.content_part}</p> <p class="time">[date]</p> </a> </li> `,dateformat:"YYYY/MM/DD",href:p?"./m_detail.html":"./detail.html"}).opt_list_dom_str_arr||[];e?n.innerHTML=o.join(""):$(n).append(o.join(""))}async function _e(){const t=r.page+1;if(t>=0&&t<r.totalPage&&r.page!==t)r.page=t;else return;await u.setPage(r.page),r.page=u.current_page,console.log(r.page);const e=document.querySelector(".s2-list-load");e&&r.totalPage-r.page===1&&(e.style.display="none"),await G(u,!1),setTimeout(()=>{const n=p?document.querySelector(".slide2-main ul.slide2-item-list"):document.querySelector(".slide2-news-list ul");n.scrollTop=n.scrollTop+10})}async function pe(){ue(),fe()}$(function(){pe(),re()});