import{r as e,a4 as a,R as t,j as s,k as o,ab as r,b as i,q as n,w as l,v as d,u as m,h as c,n as u,s as w,o as f}from"./vendor-jA_NIjzi.js";import{a1 as v,q as h,F as p,w as g}from"./common-utils-8H8K2JPG.js";import{_ as y,c as b,b as j}from"./common-store-e_1WBubm.js";import{T as _}from"./ThirdPartyGameHead-0VyV5ckr.js";import"./vendor-crypto-Vtl7-GZS.js";import"./vendor-mqtt-lYGapirz.js";import"./SvgIcon-unOD6nfS.js";const I=["src"],T=y({__name:"index",setup(y){let T=null;const q=e(),E=a(),G=t(),L=b(),W=e(""),k=e(""),x=e(""),C=j(),R=e(!1),z=()=>{document.getElementById("three-party-games-iframe-id").src="about:blank";const e=setTimeout((()=>{E.go(-1),clearTimeout(e)}),300)},B=()=>{if(h())p("back");else if(G.query.from){const e=window.location.href.split("#")[0];window.location.href=e+"#"+G.query.from}else E.go(-1)},H=()=>{R.value=window.innerWidth>window.innerHeight};return s((()=>{H(),window.addEventListener("resize",H)})),o((()=>{window.removeEventListener("resize",H)})),s((async()=>{(()=>{if(k.value=window.history.state.title,x.value=window.history.state.thirdGameCode,window.history.state.src)return void(W.value=window.history.state.src);const e=document.getElementById("three-party-games-iframe-id"),a=e.contentDocument||e.contentWindow.document;a.open(),a.write(window.history.state.url),a.close()})(),C.showGlobalLoading(),q.value.addEventListener("load",(()=>{C.clearGlobalLoading(),T=setTimeout((()=>{L.getWalletInfo()}),1500)}))})),r((()=>{T&&(clearTimeout(T),T=null),(async()=>{const e=await v({thirdGameCode:x.value});if(!e.success)return e.message&&w(e.message);await L.getWalletInfo()})()})),(e,a)=>(f(),i("div",{class:u(["three-party-games",{"three-party-games-9d":"玖鼎真人"===k.value}])},[n(_,{title:k.value,landscape:R.value,onClose:B,onRefresh:z},null,8,["title","landscape"]),l(c("iframe",{ref_key:"iframeRef",ref:q,id:"three-party-games-iframe-id",class:u({"three-part-games-iframe":R.value,"three-party-games-iframe-in-telegram":m(g)()}),src:W.value},null,10,I),[[d,!m(C).loading]])],2))}},[["__scopeId","data-v-64e25bd2"],["__file","index.vue"]]);export{T as default};
