import{b7 as V,r as p,O as F,c as M,ca as q,Q as A,aY as a,aT as n,a$ as t,b9 as $,b0 as o,bg as v,bh as m,N as _,bf as S,bc as w,bq as H,bo as O,p as Q,aX as W}from"./index-xnhGKCfe.js";import{_ as X}from"./index.vue_vue_type_style_index_0_lang-9szultRB.js";import{C as Y,R as j}from"./index-BprM6Ssl.js";import{u as G}from"./BettingPopup-BrL_1D5T.js";import{b as J,a as K}from"./main.vue_vue_type_style_index_0_scoped_cf719de6_lang-BLJh8Idj.js";import"./index-BaI210iY.js";import"./index-CPJxzQTf.js";import"./dragon-65oA2ftS.js";import"./useWorkerIntervalFn.hook-BuwsgSxq.js";import"./tips-DJIxz9GI.js";import"./currency-DTUBf2lI.js";import"./countdown-Bkuhrach.js";import"./wingo-D-E9w345.js";/* empty css              *//* empty css              */import"./index-BPVaJMve.js";import"./use-route-ooe9RtXE.js";const U={class:"t"},Z={class:"t-b1"},tt={class:"t-b1-l w"},et={class:"w"},st={class:"t-b1-l lottery"},ot={class:"t-b1-l-n"},at={class:"t-b1-l"},nt={class:"t-b1-l-n"},lt={class:"t-b1-l"},it={class:"t-b1-l-n"},ct={class:"t-b1-l"},rt={class:"t-b1-l-n"},ut={class:"t-b1-l"},dt={class:"t-b1-l-n"},vt={class:"t-b2"},mt=["IssueNumber","Number","Colour","rowId"],_t={class:"t-b2-i"},pt={class:"t-b2-Num"},bt=["id"],gt={key:0,class:"flex-center t-b2-loading",style:{height:"100%"}},ht={key:1,class:"t-b2-empty flex-center"},ft={key:0,class:"t-foot"},yt={class:"t-foot-page"},Ct=V({__name:"trend",setup(Nt){const{historyIssues:T,gameCode:B,historyIssuesTotalPage:z}=G(),k=p([]),r=M(()=>k.value.length?k.value:T.value),b=p([]),i=p(1),L=p(10),g=p(!1),h=p(z.value);function I(){Q(()=>{for(let e=0;e<r.value.length;e++)r.value[e+1]&&E(e,r.value[e],r.value[e+1])})}function E(e,u,f){const y=parseInt(u.number),C=parseInt(f.number),d=document.getElementById("myCanvas"+e);if(d&&d.getContext){const c=d.getContext("2d");c.clearRect(0,0,d.width,d.height),c.beginPath(),c.moveTo(y==0?20:y*29+20,0),c.lineTo(C==0?20:C*29+20,d.height),c.strokeStyle="red",c.stroke(),c.closePath()}}const x=()=>{i.value<2||(i.value--,P())},R=()=>{i.value++,!(i.value>h.value)&&P()},D=async()=>{const{result:e,data:u}=await J({gameCode:B.value,pageNo:i.value,pageSize:10});e&&(b.value=u)},P=async()=>{try{g.value=!0;const{result:e,data:u}=await K({gameCode:B.value,pageNo:i.value,pageSize:L.value});e&&(k.value=u.list||[],i.value=u.pageNo||1,h.value=u.totalPage||0)}catch{}finally{g.value=!1}};return F(async()=>{r.value.length&&I(),await D()}),q(()=>{I()}),A(r,()=>{I()}),(e,u)=>{const f=Y,y=j,C=H,d=X,c=O;return n(),a("div",U,[t("div",Z,[t("div",tt,[t("span",et,o(e.$t("common.w8")),1),t("span",null,o(e.$t("common.w9")),1)]),t("div",st,[t("div",null,o(e.$t("common.w11")),1),t("div",ot,[(n(),a(v,null,m(10,s=>t("div",{key:s},o(s-1),1)),64))])]),t("div",at,[t("div",null,o(e.$t("common.w12")),1),t("div",nt,[(n(!0),a(v,null,m(b.value,(s,l)=>(n(),a("div",{key:"4"+l},o(s.missingCount),1))),128))])]),t("div",lt,[t("div",null,o(e.$t("common.w13")),1),t("div",it,[(n(!0),a(v,null,m(b.value,(s,l)=>(n(),a("div",{key:"2"+l},o(s.avgMissing),1))),128))])]),t("div",ct,[t("div",null,o(e.$t("common.w14")),1),t("div",rt,[(n(!0),a(v,null,m(b.value,(s,l)=>(n(),a("div",{key:"5"+l},o(s.openCount),1))),128))])]),t("div",ut,[t("div",null,o(e.$t("common.w15")),1),t("div",dt,[(n(!0),a(v,null,m(b.value,(s,l)=>(n(),a("div",{key:"3"+l},o(s.maxContinuous),1))),128))])])]),t("div",vt,[(n(!0),a(v,null,m(r.value,(s,l)=>(n(),a("div",{key:l,IssueNumber:s.issueNumber,Number:s.number,Colour:s.colour,rowId:l,class:"t-b2-item"},[_(y,null,{default:S(()=>[_(f,{span:"9"},{default:S(()=>[t("div",_t,o(s.issueNumber),1)]),_:2},1024),_(f,{span:"15"},{default:S(()=>[t("div",pt,[t("canvas",{id:"myCanvas"+l,ref_for:!0,ref:"canvas",class:"line-canvas"},null,8,bt),(n(),a(v,null,m(10,N=>t("div",{class:w(["t-b2-Num-item",Number(s.number)==N-1?"action"+(N-1):""]),key:N},o(N-1),3)),64)),t("div",{class:w(["t-b2-Num-BS",{isB:Number(s.number)>4}])},o(Number(s.number)>4?"B":"S"),3)])]),_:2},1024)]),_:2},1024)],8,mt))),128)),g.value?(n(),a("div",gt,[_(C,{type:"spinner",color:"#FD565C"})])):$("",!0),r.value.length===0&&!g.value?(n(),a("div",ht,[_(d)])):$("",!0)]),r.value.length?(n(),a("div",ft,[t("div",{class:w(["t-foot-previous",{disabled:i.value<=1}]),onClick:x},[_(c,{name:"arrow-left",class:"t-icon",size:"20"})],2),t("div",yt,o(i.value)+"/"+o(h.value),1),t("div",{class:w(["t-foot-next",{disabled:i.value>=h.value}]),onClick:R},[_(c,{name:"arrow",class:"t-icon",size:"20"})],2)])):$("",!0)])}}}),qt=W(Ct,[["__scopeId","data-v-7e57116f"]]);export{qt as default};
