(()=>{var O,r=null,ue,he,me,fe,pe,ge,t={none:"none",flex:"flex",block:"block",inlineBlock:"inline-block",grid:"grid"},D=()=>new Date,Ie=100,Ne="🎃",te="male",Ae=1e4,ke=5e4,xe=5e3,Oe=1e4,U=60,$=60,L=60,W=5,K=1,oe="total_lucky_point",_e="user_avatar",ye="user_name",be="user_description",I="user_birthday",ve="user_level",ae="game_time",de="read_time",G="last_check_in_date",le="post_like",Se="visitor_number",e="user_info",T="site_info",g="user_lucky_point",N="user_avatar",F="user_name",H="user_signature",X="user_birthday",Q="user_level",Z="user_game_time",p="user_read_time",ee="user_last_check_in_date",_="user_last_login_date",E="user_last_time_click_btn_share_site",k="user_last_time_click_btn_read_plus",M="user_last_time_click_btn_post_like",ie="user_gender",Y="post_like_number",V="site_visitor_number",ce={lottery_yes:{en:"Yes","zh-cn":"是","zh-tw":"是"},lottery_no:{en:"No","zh-cn":"否","zh-tw":"否"},lottery_open:{en:"Open","zh-cn":"开盘","zh-tw":"開盤"},lottery_close:{en:"Close","zh-cn":"封盘","zh-tw":"封盤"},lottery_bonus:{en:"Bonus","zh-cn":"兑奖","zh-tw":"兌獎"},lottery_stop:{en:"Stop","zh-cn":"结束","zh-tw":"結束"},read:{en:"read","zh-cn":"阅读","zh-tw":"閱讀"},male:{en:"Male","zh-cn":"男","zh-tw":"男"},female:{en:"Female","zh-cn":"女","zh-tw":"女"},game:{en:"game","zh-cn":"游戏","zh-tw":"遊戲"},personalized_signature:{en:"personalized signature","zh-cn":"个性签名","zh-tw":"個性簽名"},username:{en:"username","zh-cn":"用户名","zh-tw":"用戶名"},happy:{en:"happy","zh-cn":"快乐","zh-tw":"快樂"},exercise:{en:"exercise","zh-cn":"运动","zh-tw":"運動"},sports:{en:"sports","zh-cn":"运动","zh-tw":"運動"},dating:{en:"dating","zh-cn":"约会","zh-tw":"約會"},laugh:{en:"laugh","zh-cn":"大笑","zh-tw":"大笑"},rich:{en:"rich","zh-cn":"暴富","zh-tw":"暴富"},match:{en:"match","zh-cn":"配对","zh-tw":"配對"},healthy:{en:"healthy","zh-cn":"健康","zh-tw":"健康"},show_love:{en:"Show love","zh-cn":"表白","zh-tw":"表白"},cry:{en:"cry","zh-cn":"哭泣","zh-tw":"哭泣"},sad:{en:"sad","zh-cn":"难过","zh-tw":"難過"},disappointment:{en:"disappointment","zh-cn":"失望","zh-tw":"失望"},poor:{en:"poor","zh-cn":"贫穷","zh-tw":"貧窮"},squabble:{en:"squabble","zh-cn":"争吵","zh-tw":"爭吵"},fight:{en:"fight","zh-cn":"打斗","zh-tw":"打斗"},mad:{en:"mad","zh-cn":"生气","zh-tw":"生氣"},waste_time:{en:"waste time","zh-cn":"浪费时间","zh-tw":"浪費時間"},exhausted:{en:"exhausted","zh-cn":"疲惫","zh-tw":"疲憊"},risky_behavior:{en:"risky behavior","zh-cn":"危险行为","zh-tw":"危險行為"},share_site:{en:"Check this out! 🚀 Visit shakagame.com for amazing content!","zh-cn":"我刚发现了一个有趣的网站！🚀 访问 shakagame.com 获取精彩内容！","zh-tw":"我剛發現了一個有趣的網站！🚀 訪問 shakagame.com 獲取精彩內容！"},time_second:{en:"s","zh-cn":"秒","zh-tw":"秒"},five_in_a_row_playing:{en:"Playing...","zh-cn":"对战中...","zh-tw":"對戰中..."},five_in_a_row_user_win_label:{en:"Congratulation You Win, 🧧 + ","zh-cn":"恭喜你赢啦, 🧧 + ","zh-tw":"恭喜你贏啦, 🧧 + "},five_in_a_row_ai_win_label:{en:"🤖 AI Win, try again and defeat it","zh-cn":"🤖 机器人赢啦, 继续加油战胜它","zh-tw":"🤖 機器人贏啦, 繼續加油戰勝它"},draw_lots_kind_best:{en:"上","zh-cn":"上","zh-tw":"上"},draw_lots_kind_ok:{en:"中","zh-cn":"中","zh-tw":"中"},draw_lots_kind_bad:{en:"下","zh-cn":"下","zh-tw":"下"}};function d(e,t=!1,n=1){const s=`${e}.webm`,o=`${e}.mp3`;return new Howl({src:[s,o],loop:t,volume:n})}O=d("/audio/share/select-121244",!1,.4),ue=d("/audio/share/invalid-185098",!1,.4),he=d("/audio/share/count_down_4s-125125",!1,.3),me=d("/audio/share/win-218995",!1,.3),fe=d("/audio/share/success-1-6297",!1,.3),pe=d("/audio/share/lose-6008",!1,.3),ge=d("/audio/share/080205_life-lost-game-over-89697",!1,.5);function c(e){try{const t=localStorage.getItem(e);return t?JSON.parse(t):r}catch{return console.error(`Error read data from localStorage key: ${e}`),r}}function v(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch{console.error(`Error write data to localStorage key: ${e}`)}}function je(){try{localStorage.clear()}catch(e){console.error("Error remove all data from localStorage",e)}}function l(e,t){const n=c(e);return n&&n.hasOwnProperty(t)?n[t]:(console.warn(`Key ${t} not found under ${e}`),r)}function h(e,t,n){const s=c(e)||{};s[t]=n,v(e,s)}function we(){document.querySelectorAll(".in_page_tips .close").forEach(e=>{e.addEventListener("click",t=>{e.closest(".in_page_tips").style.display="none",t.stopPropagation()})})}function J(e,t){return Math.floor(Math.random()*(t-e+1))+e}function u(e=new Date){const t=e.getFullYear(),n=String(e.getMonth()+1).padStart(2,"0"),s=String(e.getDate()).padStart(2,"0");return`${t}-${n}-${s}`}function Ce(){const e=new Date;return e.setDate(e.getDate()-1),u(e)}function Ee(){const e=window.location.href,t=["en","zh-cn","zh-tw"];for(const n of t)if(e.includes(`/${n}/`))return n;return"en"}function b(e){const n=Ee(),t=ce[e];return t?t[n]||t.en:(console.log(`No ID "${e}" found in site_i18n_data.`),e)}function a(e,t){e.style.display=t}function re(e,t,n){e.addEventListener("click",()=>a(t,n))}function Me(e=100){const n=document.getElementById("btnBackToTop");if(!n)return;const s=()=>{a(n,window.scrollY>e?t.block:t.none)},o=()=>{window.scrollTo({top:0,behavior:"smooth"})};window.addEventListener("scroll",s),n.addEventListener("click",o)}function Fe(){const e=document.querySelector(".menu-icon"),t=document.querySelector(".menu");if(!e||!t)return;e.addEventListener("click",e=>{t.classList.toggle("active"),e.stopPropagation()})}function Te(){const t=c(e);if(!t){const t={[g]:Ie,[N]:Ne,[F]:`${b("username")}`,[H]:b("personalized_signature"),[X]:Ce(),[Q]:0,[Z]:0,[p]:0,[ee]:r,[_]:u(),[E]:r,[k]:r,[M]:r,[ie]:te};v(e,t)}}function ze(){const e=c(T);if(!e){const e={[Y]:J(Ae,ke),[V]:J(xe,Oe)};v(T,e)}}function De(){const t=c(oe);if(t){const t=localStorage.getItem(G)===""?r:u(new Date(localStorage.getItem(G))),n=localStorage.getItem(I)===""?r:u(new Date(localStorage.getItem(I))),s={[g]:c(oe),[N]:localStorage.getItem(_e),[F]:localStorage.getItem(ye),[H]:localStorage.getItem(be),[X]:n,[Q]:c(ve),[Z]:c(ae),[p]:c(de),[ee]:t,[_]:u(),[E]:r,[k]:r,[M]:r,[ie]:te},o={[Y]:c(le),[V]:c(Se)};je(),v(e,s),v(T,o)}}function ne(t){const n=parseFloat(l(e,g))||0;if(isNaN(t)){console.error(`Invalid value provided: ${t}`);return}const s=(n+parseFloat(t)).toFixed(1);h(e,g,s)}function Le(t){if(typeof t!="number"||isNaN(t)){console.error("Invalid value:",t);return}const n=parseInt(l(e,p))||0,s=Math.max(n+t,0);h(e,p,s)}function Re(){const t=document.querySelector(".var_user_avatar");t&&(t.textContent=l(e,N))}function Pe(){const t=document.querySelector(".var_user_name");t&&(t.textContent=l(e,F))}function He(){const t=document.querySelector(".var_user_lucky_point");t&&(t.textContent=l(e,g))}function se(){const t=document.querySelector(".var_user_read_time");t&&(t.textContent=l(e,p))}function Be(){const t=document.querySelector(".btn_share_site");t&&t.addEventListener("click",()=>{O.play(),navigator.clipboard.writeText(b("share_site"));const s=document.querySelector(".var_bonus_lucky_point_click_btn_share_site"),o=document.querySelector(".var_interval_click_btn_share_site");s.textContent=W,o.textContent=U;const t=l(e,E),n=D();(!t||n-new Date(t)>U*1e3)&&(ne(W),h(e,E,n.toISOString()))})}function Ve(){const t=l(e,_);t!=u()&&h(e,_,u())}function $e(){const contentRose=document.querySelector(".content_rose");if(contentRose){let p2=function(e,t,s){if(s>60)return[S(e*7)*(13+5/(.2+P(t*4,4)))-S(t)*50,t*f+50,625+C(e*7)*(13+5/(.2+P(t*4,4)))+t*400,e*1-t/2,e];if(A=e*2-1,B=t*2-1,A*A+B*B<1)return s>37?(n=(j=s&1)?6:4,o=.5/(e+.01)+C(t*125)*3-e*300,w=t*h,[o*C(n)+w*S(n)+j*610-390,o*S(n)-w*C(n)+550-j*350,1180+C(B+A)*99-j*300,.4-e*.1+P(1-B*B,-h*6)*.15-e*t*.4+C(e+t)/5+P(C((o*(e+1)+(B>0?w:-w))/25),30)*.1*(1-B*B),o/1e3+.7-o*w*3e-6]):s>32?(s=s*1.16-.15,o=e*45-20,w=t*t*h,z=o*S(s)+w*C(s)+620,[o*C(s)-w*S(s),28+C(B*.5)*99-t*t*t*60-z/2-h,z,(t*t*.3+P(1-A*A,7)*.15+.3)*t,t*.7]):(o=A*(2-t)*(80-s*2),w=99-C(A)*120-C(t)*(-h-s*4.9)+C(P(1-t,7))*50+s*2,z=o*S(s)+w*C(s)+700,[o*C(s)-w*S(s),B*99-C(P(t,7))*50-s/3-z/1.35+450,z,(1-t/1.2)*.9+e*.1,P(1-t,20)/4+.05])};var a,c,h,p=p2;const canvas=contentRose.querySelector(".canvas_rose");with(canvas.innerHTML="",c=canvas,a=c.getContext("2d"),c.width=c.height=f=600,h=-250,document.body.clientWidth,m=Math)C=cos,S=sin,P=pow,R=random;setInterval(function(){for(i=0;i<1e4;i++)(s=p2(R(),R(),i%46/.74))&&(z=s[2],x=~~(s[0]*f/z-h),y=~~(s[1]*f/z-h),!m[q=y*f+x]|m[q]>z&&(m[q]=z,a.fillStyle="rgb("+~(s[3]*h)+","+~(s[4]*h)+","+~(s[3]*s[3]*-80)+")",a.fillRect(x,y,1,1)))},0)}}function We(){const e=document.querySelector(".rose_icon");if(e){const n=e.querySelector(".popup_rose");re(e,n,t.flex),$e(),n.addEventListener("click",e=>{a(n,t.none),e.stopPropagation()})}}function Ue(){const e=document.querySelectorAll(".var_i18n_time_second");e.forEach(e=>{e.textContent=b("time_second")})}function Ke(){const t=document.querySelector(".btn_read_plus");t&&t.addEventListener("click",()=>{O.play();const s=document.querySelector(".var_interval_click_btn_read_plus");s.textContent=L;const t=l(e,k),n=D();(!t||n-new Date(t)>L*1e3)&&(Le(1),h(e,k,n.toISOString()),se())})}function qe(){const t=document.querySelector(".btn_post_like");t&&t.addEventListener("click",()=>{O.play();const s=document.querySelector(".var_bonus_lucky_point_click_btn_post_like"),o=document.querySelector(".var_interval_click_btn_post_like");s.textContent=K,o.textContent=$;const t=l(e,M),n=D();(!t||n-new Date(t)>$*1e3)&&(ne(K),h(e,M,n.toISOString()))})}window.addEventListener("click",e=>{const n=document.querySelectorAll(".popup_box");n.forEach(n=>{e.target===n&&a(n,t.none)})}),Ye();function Ye(e=3){const n=document.querySelectorAll(".info_icon");n.forEach(n=>{const s=n.querySelector(".popup_info");s&&n.addEventListener("click",n=>{a(s,t.flex),n.stopPropagation(),setTimeout(()=>a(s,t.none),e*1e3)})})}Ge();function Ge(){const e=document.querySelectorAll(".info_icon_btn");e.forEach(e=>{const n=e.querySelector(".popup_tips"),s=n?n.querySelector(".btn_get_it"):null;n&&s&&(e.addEventListener("click",()=>{a(n,t.flex)}),s.addEventListener("click",e=>{a(n,t.none),e.stopPropagation()}))})}Xe();function Xe(){const e=document.querySelectorAll(".tips_icon");e.forEach(e=>{const n=e.querySelector(".popup_tips"),s=n?n.querySelector(".btn_get_it"):null;n&&s&&(e.addEventListener("click",()=>{a(n,t.flex)}),s.addEventListener("click",e=>{a(n,t.none),e.stopPropagation()}))})}Qe();function Qe(){const e=document.querySelectorAll(".tips_icon_force_close");e.forEach(e=>{const n=e.querySelector(".popup_tips"),s=n?n.querySelector(".btn_get_it"):null;n&&s&&(e.addEventListener("click",e=>{a(n,t.flex),e.stopPropagation()}),s.addEventListener("click",e=>{a(n,t.none),e.stopPropagation()}))})}Fe(),De(),Te(),ze(),Me(),He(),Be(),Ve(),We(),Ue(),Re(),Pe(),se(),Ke(),qe(),we()})()