// ==UserScript==
// @name 三国杀打小抄
// @namespace https://greasyfork.org/scripts/448004
// @version 2.9.26.3
// @author 小麦 孤独尊
// @description 打小抄支持网页版和微端,微端文件请加群 830137048
// @icon https://i0.hdslb.com/bfs/new_dyn/17ec41a0ca79633b77399065ab80da3f2138912.png
// @match *://game.4399iw2.com/yxsgs/*
// @match *://my.4399.com/yxsgs/*
// @match *://*.sanguosha.com/*
// @match *://web.kuaiwan.com/kwsgsn/*
// @match *://wan.baidu.com/microend?gameId=19793595/*
// @match *://www.7k7k.com/special/sgs/?*
// @grant none
// @run-at document-start
// ==/UserScript==
(function () {
'use strict';
var e,t,n,i=Object.freeze,a=Object.defineProperty,s=(e,t,n)=>(((e,t,n)=>{t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;})(e,"symbol"!=typeof t?t+"":t,n),n);function o(e,t=null,n=!0){let i;return i||"undefined"==typeof localStorage||(i=localStorage.getItem(e)),i?JSON.parse(i):t}async function l(e,t,n=!0){"undefined"!=typeof localStorage&&localStorage.setItem(e,JSON.stringify(t));}async function r(e,t=!0){"undefined"!=typeof localStorage&&localStorage.removeItem(e);}function d(e,t=0){let n="";const i=" ".repeat(t);if(Array.isArray(e)){e.every((e=>"object"!=typeof e||!e))?n+=`${i}${e.join("\t")}\n`:(n+=`${i}<ol>\n`,e.forEach((e=>{n+=`${i} <li>\n`,n+=d(e,t+2),n+=`${i} </li>\n`;})),n+=`${i}</ol>\n`);}else if("object"==typeof e&&null!==e){if(Object.values(e).every((e=>"object"!=typeof e||!e)))n+=`${i}${Object.entries(e).map((([e,t])=>`<strong>${e}:</strong> ${t}`)).join(", ")}\n`;else {n+=`${i}<ul>\n`;for(const a in e)n+=`${i} <li>\n`,n+=`${i} <strong>${a}:</strong>\n`,n+=d(e[a],t+2),n+=`${i} </li>\n`;n+=`${i}</ul>\n`;}}else n+=`${i} ${e}\n`;return n}const c=[];let u=!1,p=null;function h(e,t="acTooltip",n=1e4,i="",a=null,s=!1){s?function(e,t,n,i){let a=document.getElementById(t);a||(a=document.createElement("div"),a.id=t,a.className="ac-tooltip "+i,document.body.appendChild(a));a.innerHTML=e,a.className="ac-tooltip "+i,setTimeout((()=>{a.classList.remove("hide"),a.classList.add("show"),a.style.top="20px";}),50),p&&clearTimeout(p);p=setTimeout((()=>g(t)),n);}(e,t,n,i):(c.push({text:e,id:t,duration:n,className:i,clickCallback:a}),u||f());}function m(e){(null==ChannelUtils?void 0:ChannelUtils.openQQBuy)&&ChannelUtils.openQQBuy({ret:!0,msg:e});}function f(e){if(0===c.length)return void(u=!1);u=!0;const{text:t,id:n,duration:i,className:a,clickCallback:s}=c.shift();let o=document.getElementById(n);o&&o.remove();let l=n+"-"+(new Date).getTime(),r=document.createElement("div");r.id=l,r.className="ac-tooltip "+a,r.innerHTML=t,document.body.appendChild(r),s&&"function"==typeof s&&r.addEventListener("click",s),setTimeout((()=>{r.classList.remove("hide"),r.classList.add("show"),r.style.top="20px";}),50),i?setTimeout((()=>{g(l),f();}),i):u=!1;}function g(e){let t=document.getElementById(e);t&&(t.classList.remove("show"),t.classList.add("hide"),setTimeout((()=>{t&&t.remove();}),300));}var y,v,b,w,k,x=function(e){return String.raw(n||(n=i(a(t=['\n<html><head><meta charset="utf-8" /><title>战绩胜率统计</title><style>\ntable { margin-right: 8px; border-collapse: collapse; }\nth, td { text-align: center; border: 1px solid black; font-size: 24px; box-sizing: border-box; }\ntd { padding: 2px 5px; }\n.nav, thead { background: white; position: sticky;; }\n.rate { margin: 5px; font-size: 28px;}\n.button { display: none; } \n.button[name=mode] ~ .label { display: inline-block; font-size: 30px; user-select: none; border: solid 1px black; border-radius: 5px; padding: 5px; margin: 5px; }\nth .button ~ .label { display: inline-block; width: 100%; height: 100%;}\nth .button:checked ~ .label::after { content: "↓"; }\nth.reverse .button:checked ~ .label::after { content: "↑"; }\n.button:checked ~ .label { background: rgb(64,160,255); } \n.s0 { background: white; }\n.s1 { background: rgb(221,0,0); }\n.s2 { background: rgb(255, 200, 0); }\n.s3 { background: rgb(0, 136, 68); }\n.s4 { background: rgb(0, 94, 183); }\n.s5 { background: rgb(255, 0, 255); }\n</style></head><body style="margin: 0 8px;">\n<div class="nav" style="top: 0; height: 136px; z-index: 3"><div id="modeTab"></div><div id="summary"></div></div>\n<div style="display: flex; align-items: flex-start; flex-wrap: wrap;"><table id="detail"><thead style="top: 135px; z-index: 1"></thead><tbody></tbody></table>\n<table id="record"><thead style="top: 135px; z-index: 2"></thead><tbody></tbody></table></div>\n\n<script>\nconst data = Object.entries(',").reduce((acc,[mode, records]) => {\nacc[mode] = Object.entries(records).reverse().map(([time, record]) => ({timestamp:parseInt(time), time: new Date(time*1000).toISOString().slice(0,16).replace('T',' '), ...record, durationstr: formatSeconds(record.duration)}));\nreturn acc;\n},{});\nconst modeName = {1: '八人标准', 2: '六人身份', 3: '八人军争', 4: '应变身份', 5: '八人至尊', 6: '身份老友房', 7: '国战', 8: '应变国战', 9: '国战老友房', 10: '新1V1', 11: '欢乐', 12: '应变欢乐', 13: '欢乐老友房', 14: '统率', 15: '4V4演武', 16: '应变演武', 17: '欢乐演武', 18: '国战演武', 19: '统率排位', 20: '欢乐排位', 21: '智斗三国', 22: '欢乐新手', 23: '欢乐新手', 24: '六人新手', 25: '六人新手', 26: '排位赛', 27: '主公杀', 28: '1v1面杀练习场', 29: '五人匹配', 30: '排位赛', 31: '欢乐33', 32: '33老友房', 33: '武将试炼', 34: '武将试炼', 35: '斗地主', 36: '线上赛事', 37: '山河图', 38: '王战练习', 39: 'SCL练习', 40: '斗地主练习', 42: '八人匹配', 43: '个人挑战1V1', 44: '单骑无双'};\nconst sfName = {5:{0: '综合', 1: '主公', 2: '忠臣', 3: '反贼', 4: '内奸'},7:{0: '综合', 1: '魏国', 2: '蜀国', 3: '吴国', 4: '群雄', 5:'晋国'},26:{0:'综合',2:'先手',3:'后手'},35:{0:'综合',1:'地主',3:'农民'},44:{0:'综合',1:'先手',4:'后手'}};\ncolors=['white','rgb(221,0,0)','rgb(255, 200, 0)','rgb(0, 136, 68)','rgb(0, 94, 183)','rgb(255, 0, 255)','black'];\nconst modeTab = document.getElementById('modeTab');\n[26,35,44,5,7].forEach(mode => {\nif(mode in data) modeTab.innerHTML += '<label><input type=\"radio\" class=\"button\" name=\"mode\" value=\"'+mode+'\" onclick=\"reSet()\"><span class=\"label\">'+modeName[mode]+'</span></label>';\n}); modeTab.innerHTML += ' (更多功能敬请期待…)';\ndocument.querySelector('#record thead').innerHTML = '<tr onclick=\"recordSort(event)\">'+['时间','武将','身份','胜负','时长'].map((name,i)=>'<th'+(i?'':' class=\"reverse\"')+'><label><input type=\"radio\" class=\"button\" name=\"record\" onchange=\"recordSort(event)\" '+(i?'':'checked')+'><span class=\"label\">'+name+'</span></label></th>').join('')+'</tr>';\nfunction reSet() {\nvar i, tabcontent, tablinks;\nwindow.mode = document.querySelector('#modeTab input[name=\"mode\"]:checked')?.value\nwindow.guozhanQ = modeName[mode].includes('国战');\nwindow.records = data[mode].filter(record => record.shenfen).sort();\nlet summary = Array.from({length:10},(_,i)=>[0,0,0,i]);\nlet detail = records.reduce((acc, record) => {\n summary[0][record.result] += 1;\n summary[0][2] += record.duration;\n summary[record.shenfen][record.result] += 1;\n record.general.forEach((g,n)=>{\n if(!acc[g]) acc[g] = Array.from({length:10},(_,i)=>[0,0,0,i]);\n acc[g][0][record.result] += 1;\n acc[g][0][2] += record.duration;\n acc[g][guozhanQ?(n+1):record.shenfen][record.result] += 1;\n });\n return acc;\n},{});\nsummary = summary.filter(s=>s[0]+s[1]>0);\nlet sf = guozhanQ?[0,1,2]:summary.map(s=>s[3]);\ndocument.querySelector('#detail thead').innerHTML = '<tr><th rowspan=2>武将</th>'+sf.map(sf=>'<th colspan=4 style=\"background:'+colors[sf]+';\">'+(guozhanQ?{0:'综合',1:'主将',2:'副将'}[sf]:sfName[window.mode][sf])+'</th>').join('')+'<th rowspan=2 onclick=\"detailSort(event)\"><label><input type=\"radio\" class=\"button\" name=\"detail\" onchange=\"detailSort(event)\"><span class=\"label\">平均时长</span></label></th></tr><tr onclick=\"detailSort(event)\">'+sf.flatMap((sf,i)=>['胜率','出场','胜场','败场'].map((name,j)=>'<th class=\"reverse\"><label><input type=\"radio\" class=\"button\" name=\"detail\" onchange=\"detailSort(event)\" '+(i==0&&j==1?'checked':'')+'><span class=\"label\">'+name+'</span></label></th>')).join('')+'</tr>';\nwindow.detail = Object.keys(detail).map(general=>{\n let rate = detail[general].filter(s=>sf.includes(s[3]));\n rate.forEach(s=>{ s[4] = s[0]+s[1]; s[5] = 100*s[0]/s[4]; s[2] = s[2]/s[4]; });\n return ({general, rate});\n});\nlet summaryDiv = document.getElementById('summary');\nsummaryDiv.innerHTML = '';\nsummary.forEach(([win,lose,time,sf])=>{ summaryDiv.innerHTML += '<span class=\"rate\" style=\"color:'+colors[guozhanQ?[6,4,1,3,2,5][sf]:sf||6]+';\">'+sfName[window.mode][sf]+'胜率'+((100*win/(win+lose)).toFixed(2)+'%').replace(/(.0)?0%/,'%')+'('+win+'胜:'+lose+'负)</span>'; });\ndetailSort();\nrecordSort();\n}\n\nfunction detailSort(event,sf=0,key=4,reverse=true) {\nif(event){\n event.stopPropagation();\n let element = event?.target;\n if (element.nodeName !== 'INPUT') return;\n while (element && element.nodeName !== 'TH') {\n element = element.parentElement;\n }\n if (element?.parentElement?.parentElement?.parentElement?.id == 'detail'){\n if(element.rowSpan>1) {sf = 0; key = 2; }\n else {\n sf = Math.floor(element.cellIndex/4);\n key = [5,4,0,1][element.cellIndex%4];\n }\n reverse = element.classList.toggle('reverse');\n }\n}\nwindow.detail = window.detail?.sort((a,b)=>{ a=a.rate[sf][key];b=b.rate[sf][key]; return isNaN(a)&&isNaN(b)?0:isNaN(a)?-1:isNaN(b)?1:a-b; });\nif(reverse) window.detail = window.detail?.reverse();\ndocument.querySelector('#detail tbody').innerHTML = window.detail?.map(({general, rate})=>'<tr><td>'+general+'</td>'+rate.map(s=>'<td>'+(s[4]?(s[5].toFixed(2)+'%').replace(/(.0)?0%/,'%'):'')+'</td><td>'+s[4]+'</td><td>'+s[0]+'</td><td>'+s[1]+'</td>').join('')+'<td>'+formatSeconds(rate[0][2])+'</td></tr>')?.join('');\n}\n\nfunction recordSort(event,key='timestamp', reverse=true) {\nif(event){\n event.stopPropagation();\n let element = event?.target;\n if (element.nodeName !== 'INPUT') return;\n while (element && element.nodeName !== 'TH') {\n element = element.parentElement;\n }\n if (element?.parentElement?.parentElement?.parentElement?.id == 'record'){\n key = ['timestamp','general','shenfen','result','duration'][element.cellIndex]??key;\n reverse = element.classList.toggle('reverse');\n }\n}\nif(key!=='general') window.records = window.records?.sort((a,b)=>a[key]-b[key]);\nelse window.records = window.records?.sort((a,b)=>a[key][0].localeCompare(b[key][0]));\nif(reverse) window.records = window.records?.reverse();\ndocument.querySelector('#record tbody').innerHTML = window.records?.map(record => '<tr><td>'+record.time+'</td><td>'+record.general.join(' ')+'</td><td>'+sfName[window.mode][record.shenfen]+'</td><td>'+(record.result?'失败':'胜利')+'</td><td>'+record.durationstr+'</td></tr>')?.join('');\n}\n\nfunction formatSeconds(seconds) {\nconst hrs = Math.floor(seconds / 3600).toString().padStart(2, '0');\nconst mins = Math.floor((seconds % 3600) / 60).toString().padStart(2, '0');\nconst secs = Math.floor((seconds % 60)).toString().padStart(2, '0');\nreturn (seconds>=3600?(hrs+':'):'')+mins+':'+secs;\n}\n\ndocument.querySelector('#modeTab input[name=\"mode\"]').click();\n<\/script></body></html>"],"raw",{value:i(s||t.slice())}))),e);var t,s;},S="jsjiami.com.v7";function I(e,t){const n=W();return I=function(t,i){let a=n[t-=363];if(void 0===I.OatddE){const t=function(e,t){let n,i,a=[],s=0,o="";for(e=function(e){let t="",n="";for(let i,a,s=0,o=0;a=e.charAt(o++);~a&&(i=s%4?64*i+a:a,s++%4)?t+=String.fromCharCode(255&i>>(-2*s&6)):0)a="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(a);for(let i=0,a=t.length;i<a;i++)n+="%"+("00"+t.charCodeAt(i).toString(16)).slice(-2);return decodeURIComponent(n)}(e),i=0;i<256;i++)a[i]=i;for(i=0;i<256;i++)s=(s+a[i]+t.charCodeAt(i%t.length))%256,n=a[i],a[i]=a[s],a[s]=n;i=0,s=0;for(let l=0;l<e.length;l++)i=(i+1)%256,s=(s+a[i])%256,n=a[i],a[i]=a[s],a[s]=n,o+=String.fromCharCode(e.charCodeAt(l)^a[(a[i]+a[s])%256]);return o};I.QiBVCj=t,e=arguments,I.OatddE=!0;}const s=t+n[0],o=e[s];return o?a=o:(void 0===I.aRmuUR&&(I.aRmuUR=!0),a=I.QiBVCj(a,i),e[s]=a),a},I(e,t)}function W(){const e=[S,"dQxjsBTjSKiDaJNmyiwl.DIVcVohmxd.JJvqMg7u==","W7ZdMSoPASow","W4PdW73dPYqKWPyUs8ojm3m9W4xcMcG","W6BcThVcVNxcMmopWRu","W6JcOCkXymosWP11W6hcLKu","d8oKw8ouW57dISkuWO/dQG","hfRdNrGV","nJdcVhfCWOm7","DSoTWQjJWOG","W7KmzrtdVW","uwm7W4/cL8oTv0i","WP7dTmkHWQnZ","W6BdSNOCimojrG","dcSoWP19k2xcHxdcOSk6WPu","ASoTe8oFWP9OW68vAa","iKRdQItdTZJcRG","W5XGW6NdOqa","i8otWQVdOSovWRyyWQe","kGyIWP8zumkCgdZdPCkdW5JdQCkn","iSo5WOpcOdX2W7JcSghdMY7dPW","imkUm0VdUq","WQO9orebiCkghCoxECkXvtZcHSobBmk9","Cmk8W4hdTKucW4hcKhNdRctdPa","W6qnudBdRa","k3VdPaldRq","vHiPodbZyq","W5pcKCkjWO3dTW","yaOodXy","W6pcV8kpWPpdUG","WRldGSouW5yBkSoTdG","W5ldICoCDmom","W41tW57dIte","WORcOmoxW4xcGW","fSoHWRRcQGq","W6SjWPdcKNlcJ8otmJSrW4pcRNFcJSkJWOtcPSo/","b1VdJdaZ","lMGtWPldG8k8W7/cPW","vbqOhdn8Bmk5","pc9lW7fo","W6pdJ8o2WQtdLW","W7JdPvHZjrynWRRdNxZcVSk9","vJWjltq","a8kRWRZcNmo6m8oh","W7/cP8ksWOFdTG","W7dcImkUWRldOCoAW7BcRSoO","h2ddGruBWP8DamktFCoKsSouv8oP","55AU5Bg45OUH5y6V5l+L55AV","n8k7m0pdTa","CCovmb0OvSoOW6VcQmkwW67dStS","W77cG8k0WPldV8o3W4/cHSokkbxcNGK3","dbbtW7f5xCoYyG","W7m/lCoIW7a","nmkRnK7dQrmp","W7n0W77dHYG","W6dcHCkeDmoy","h8o/qCouW5ddSSkyWOy","W7xcGCkfWPldIG","W7e8BG/dVq","oSowCmocW54","W5i/sJ7dTq","aCkHfSoir8k3WRv9W6H8","W7q8oSoPW6W","W7yiWRlcMgpcPSoRgJm","kCkJnKBdJW","zmo3WO5TWQbzD8onaYRcHuxdGa","6BMA55Qx5BcY5yYh5B2x5zkVW7FdLSoUua","W4uWa8oTW6/cO8oA","W4OQWP7dTSkY","lSk/W7qyixpdJf/cQG","WRFcG8oVW6xcQG","fbhcVuzf","f8kEgCozrW","W5iTWP7cQ1W","u8kqWOCssMNcH1bytmkltse","6BIM55QH5lME5ysS5Bkv5y2W5yU455MB6ikv5yIA6igl5y+455wV776u","imkseeVdIdRdHSknW5pcQSkIlJO","W44/fmoKW73cQmojW54","W67cRNBcTmkt","W5VcTCkdv8o9","W67dHwbEFgWyWQS","hmkIjMZdOW","eIbVW5rY","u8o3WP1uWPq","kqy6WRSm","fSoWWRNdKmom","W7y2sX3dOG","W6ddNMDxANifWRBdMG","W73cQ8k/ymoy"].concat(["ifFdUYG","5PYV6iER5ysm5l+P5y6K5P+y","nciSWQz+x8oH","W4pdG1BdNmkv","W41MW4VdSJC","W6GhWQ7cKW","BmkMWRq0ygdcJeBdQSkUga","w2zjW4znavRcSfBcMG","k8knz0bPj8keW7pcOa","5ysj5l+i6yAl6AsA5O+15PYk5y6B5PY1","55Q45lU06ygT5yQD5BEz5yAN6zs0","FmkkWPOmxW","WOmces/dKSoaWOPDoCoPW5D5jSoHDSovgW","W7hdP3CrnG","WRCVaqtdJa","W7ldQxpdQCks","W53dTCkoWPtdJmoMW6FcMSkoWP8l","WOFcQ8ovW4hcImoDW4NcTSkB","iSo5WOpcOdzEW5/cLh/dHJNdRdm","mSkRk03dLc8UwSoUW5tdVIiIDSol","WOVdN8oUWRLd","W7SpWQ/cNhpcGSoAmW","WORcPmopW4xcICoWW6K","juVdVcBdVJhcR8k/","jw8nWPZdLmkJW7/cP1pcOCoe","zmkGWROHsq","x0q9W4ZcPG","55Ml6iow44gj5AY26zUd5O6d5PYi5BYM5zcI","WPiRaGCQ","CSoUWP9sWRi","EGO+jXq","W6msBYVdQI5rWQe","k3quWPZdO8k/W67cKeVcV8oEx8kY","jConWQxcNXe","WOmWnIhdRW","n8kCduRdLq","W7pdPMSpkSo/v8kOuSo+W5b+E1tdTL4","WRBdN8oyW5KugCoa","WO7dG8omWRflWQ0+","yr/dHmoUW4O","CmkTWQ0lz3ZcMuFdT8kTdW","lmoIWPtcPXvFW4ZcOG","W6pdVNXqsW","WP/dGmo0W6aB","W4/dT8kyWPqvW7LOWQK","lW49WQbn","nIGYWOjM","W60gWOVdHCk2jwq","6ysb6As05O+n5P6l5y2o5l6e6AUM","WRNcKmo1W6hcTq","zgJdQcCpWQ0NvKZdLKe","xmo2q8kDgCoIWPfDW7X6W4pcJa","W7tcSwxcT8kH","WQmPiXOMjCkSiCokBSkorXBcNSolzW","eSo4xmoqW4ddLSkPWQ/dGW","omkxtxrT","6ysF6AEL5O2u5P+G5lQ/5PEq5yYE55wv","5P6N5zcb5Bsl5l+t6AMBEM7dS0tKUORMLAFLJ7xKV6NNLzK","uXu+hJP1Bq","WPBcLSoZW4lcRW","EgCQW7JcTa","WQ7dJmkwWOHx","W4i5eSoVW7FcO8ok","zYWcWPZdLCo9W6NcT13cOSoFtW","W7JcUayxFMig","vWGYetvEAmkWna","W6ikWQVdKmk+","o8kYyLz3","hbHtW7S","nmksfK/dLsVdTW","g8oPWPNcHbG","ise3WOb6","lSo7F8oqW4i","jCo2WQddICoJ","dXXuW5v3vmo6y8kAW5yMy0VdJq","W7tdNCo7C8oZjLu","W5hdICoBW6ZLKk7LJkFLH5FMRQRKVydPQy8","W5zouWhdLmovWO5hga","WOpcLCkwxSob","W4uDiSo7W5C","WQzpdw/dVYLRWQDqCG","jCkmzKfOmmk5W5O","W63dMmoKWOy","cruzWQHD","WQVcOr8Tr1mpWP7dSh/cMmker8keW5RdLCoZ","nM7dMshdTW","W41iW6VdPZmIWPa","W4hdNSoBD8on","W5BdHmoMWQ3dVa"].concat(["uLaoW57cUW","l8kgfSo+wq","mYK6WQzPwCoNWP/cPCk8WRddIhuvcry","6zYF6kwc5yAS5l2+5yYx5PYhW4bbW6RdPoAjT+EvJowXMUAjLEwfLos6Qq","WQTFW6RcVf/cVmo+ns4","jCkiC31H","iSoOWPpcIGjuW4xcS0tdHJ7dUZ5mW4BcNq","W63dMmoKWOBdK8kIeM/dH8oKbCo2","W49oW6RdGZaTWP0+","uMuNW4RcHSoEw0i","hmk6W6KuW7/dJSopW6K","W5RcKeFcJmkG","5yA55l6T6yEV6As85O295P2g5y6H5P2w","jWhcO1nF","W6ihWPFdPCkLdLJdJdy","W73dICowBmo9","WRtdGSojW5u3cCofmmomW7VdQSk5","r8kGWRK/Cq","xJpdHmo/","W4yYAmkhoq","5ysT5lY45y6k5P2p6iwVyCkOWQL6","W5FcQCkYuSoQ","hmkCneZdMG","mmk0WOZcJCow","W5RcK0dcISk7","mZGQWOXDu8o9WQlcH8kZWQRdKNKpcq","WR7dSxXd5zgD5y2d5yA/5Q+L5l2K6AIr","DCo3WOLQ","jSo8rhhcTW","WPZcNmobW6xcKG","WRpcKSkoz8owW4ag","WONcTConW7pcQa","WQBdG8oCW4Gli8oqn8ogW5K","EvaEW7ZcVq","u2u6W6VcLmoIwG","WQNdMSoqWPPO","nupdVcW","nSo5DmoeW7a","WPLlW7tdTZWfWRS","WOtdHCohWRDsWOaoW4zF","cmkZWRddSa","WR5BW4hdSCkYaNVdLHa","hcSFWObgf3tcUNdcTCkBWOPx","hwKiWP/dHa","pdBcT3DfWQ4ltMS","oYmWWOzTDmoDWQBcPq","n8ogWP3dOSof","WRFcJ8kcAmozW6WM","WQmPiXOVk8k2jSolAW","aJaEWPbtj33cV3BcVq","6ysr6Ask5O+15P+15BAg5ywc6zwg","WQpcHSkvzq","WPNdHmoGWOfVWPSUW7L6WQ0O","WOBdJCoUWRzl","tCkEWOi","W7NdPf17iruVWQddOflcLSk8","zSkqWOikxa","i8kwFuPzamkKW63cM8k3W7NdPJa","d8k7i8ojAG","WQxcUGGQCuGIWPi","WPedhcZdVW","aXuNWQbp","mSo/tCogW5LCWOKKfW","W7GdWQJcUh3cI8osmHeeW7xcSM3cNG","55sF5Bk95OMl5l6R5zo5W6SiWQC55PAu6zQX5yUS5l+755wx","5P+c5zkT5y2u5l+36AM25lQv5AA0W4FcTCk/wq","o8oGtN7cSWpdKNq","FSk2WRqlugdcIhddR8kZfwm9","WQNcVa4HE0mH","W57cM8kCW6iwWRSGW6PkWPeJ","jCkwyeL/oCkzW64","vXyHjsS","W4PsW63dJraUWOWjCmojngqW","W6JdHx1DwLuLWQJdOqyAWONcIa","W7FcLx/cG8kh","WO5odSk0hW","W63dMmoKWOBdMCk4b1ldLmocemoQW6S","55se55wg5Bgh5OIQ5yAe5lIQ","mmoAWQ7dN8ogWRi","pHC3WQGbASkffd/dTa","WPn4mCk7fa","xrWYeq","W7NcRmk1z8oaWQTL","W7pcQSk+yCozWOzvW43cQa","iG01WRiuw8kwga","bbTuW7zS"]));return (W=function(){return e})()}async function C(e=!1){const t=I,n={wGpCR:function(e,t){return e(t)},cIPQs:function(e){return e()},CZIfG:function(e){return e()},MoFqB:t(616,"6qs6"),aGSau:"酒馆挂机可用",yQksl:t(517,"9K$6"),YFTAP:function(e,t){return e+t},dxfPJ:function(e,t){return e*t},bOhbq:function(e,t){return e*t},fARPe:function(e,t){return e!==t},UmMep:function(e,t,n,i){return e(t,n,i)},zYODi:function(e,t){return e*t},RnZnl:function(e,t){return e!==t},UXdDV:t(529,"nOds"),ySSnr:t(558,"6qs6"),RfTPW:".status",rYzAh:t(484,"aQUk"),ZivDg:t(608,"HhG]"),kfGdk:"3|0|5|7|2|4|1|6|8",atQcA:function(e,t){return e(t)},mmYCy:t(448,"A1Oq"),tmHDg:t(465,"yxV7"),KIgqL:t(401,"z3L0"),JwIZd:function(e,t){return e(t)},ftGkc:t(469,"V*^0"),WrqUs:t(588,"V*^0"),EBvam:t(450,"*h*["),PwUrG:function(e,t){return e(t)},dKcZb:function(e,t){return e<=t},zATps:t(583,"mQw2"),fIYrv:"autoHGSwitch",fEyXJ:t(378,"q^Es"),yNyJm:t(433,"Oj#X"),VugVv:function(e,t){return e-t},pAjEP:function(e,t){return e*t},jNubS:function(e,t){return e*t},obfML:function(e,t){return e+t},gkzXz:function(e,t){return e+t},MmbVA:function(e,t){return e===t},vDoxB:t(619,"cEI]"),IkdEV:t(574,"V*^0"),AIdTr:function(e,t){return e!==t},TVkaU:t(460,"qK85"),WUNEO:function(e,t){return e+t},unRLl:function(e,t){return e<=t},gZFpN:t(571,"AQ&z"),gpvWR:t(430,"5lOK"),lgEEY:"酒馆挂机可限时体验",aKwBz:function(e,t){return e<=t},OBknW:t(553,"aQUk"),iLmUf:function(e,t){return e>=t},ViQFS:t(609,"(TYL"),dZpad:function(e,t){return e<=t},BPGRr:t(398,"nOds"),dLUwK:t(587,"A1Oq"),znHEP:t(422,"aQUk"),GQOVm:function(e,t){return e!==t},xSHfU:t(525,"G)z!"),SXgae:t(407,"Oj#X"),vagEM:"LkEnB"};let i=await ke[t(564,"X@Gi")](),a=n[t(504,"HhG]")](i,n[t(394,"M$$!")](o,n[t(404,"MpYM")],0,!1)),s=document[t(613,"8()@")](n[t(387,"54uO")]),r=document[t(613,"8()@")](n.fIYrv),d=document[t(382,"sDML")](n.fEyXJ),c=document.getElementById(n[t(368,"q^Es")]),u=n[t(415,"*h*[")](ue[t(600,"CS(t")],n[t(623,"sDML")](n.pAjEP(n[t(463,"mQw2")](6,24),3600),1e3)),p=new Date(n[t(596,"G)z!")](ue.trialTime,288e5))[t(562,"yxV7")]()[t(492,"AQ&z")](0,10);if(ue[t(580,"23nI")][25242]=new Date(n[t(515,"23nI")](i,5184e5))[t(496,"G)z!")](),s[t(369,"aQUk")]=!1,ue.v)if(n[t(410,"WUrj")](n[t(494,"V*^0")],t(595,"XPsU")))_0xf1e524.onchange="",_0x51720b[t(605,"A1Oq")]=!0,_0x170edd[t(557,"P&bo")]=!1,_0x2762e2.innerHTML="需要公会包月<br>或界小抄共享";else {s[t(518,"u]uk")]=!1,r.disabled=!1;let e=n[t(606,"z[ZR")];d.innerHTML!==e&&(n[t(511,"MpYM")](n[t(584,"WUrj")],n[t(371,"XPsU")])?(_0x25135d[t(423,"AQ&z")]((e=>{e!==this&&(e.checked=!1);})),_0x5dc847(n[t(611,"u]uk")](_0x1bbc35,this[t(607,")KuG")][t(519,"A1Oq")]),n.wGpCR(_0x1ab6c8,this[t(490,"fmTt")][t(542,"tS0J")]),this[t(443,"Af1k")][t(456,"fmTt")])):(m(n.aGSau),a="v",n[t(366,"70AI")](l,t(526,"tS0J"),n[t(470,"Af1k")](i,1e3*n.jNubS(n[t(447,"A1Oq")](7,24),3600)),!1),d.innerHTML=e));}else if(n.unRLl(i,ue.guildVIP[ue[t(540,"P&bo")]])){let e="公会包月至<br>"+new Date(ue[t(412,"mQw2")][ue.guildID])[t(367,"*Csz")]();n[t(374,"XC$m")](d[t(593,"54uO")],e)&&(n[t(531,"54uO")](t(545,"yxV7"),n[t(510,"A1Oq")])?n.cIPQs(_0x2a757e):(n[t(622,"XC$m")](m,n[t(372,"9K$6")](ue.guildName,n[t(541,"Af1k")])),d[t(554,"HkDh")]=e));}else if(i<=17284896e5){let e="10月9日前<br>限时免费用";n[t(384,"M$$!")](d[t(429,"23nI")],e)&&(m(n[t(389,"sDML")]),s[t(512,"AQ&z")](n.WrqUs,(()=>{n.CZIfG(ne);}),{once:!0}),d.innerHTML=e);}else if(n[t(418,"D26w")](i,u))if(n[t(403,"HkDh")](t(396,"fmTt"),t(534,"WUrj")))_0x5086a7[t(426,"*Csz")](n[t(547,"CS(t")]);else {let e=t(478,"zo$K");n[t(425,"u]uk")](d[t(395,"*Csz")],e)&&(n[t(481,"A1Oq")](n[t(532,"06^q")],"Whhle")?(n.atQcA(m,t(477,"8()@")),d[t(572,"(TYL")]=e):(n.wGpCR(_0xa0a683,n[t(391,"(TYL")]),_0x4e3a47="v",_0x4a9da0(n.yQksl,n.YFTAP(_0x2d9848,n.dxfPJ(n.dxfPJ(n[t(601,"q^Es")](7,24),3600),1e3)),!1),_0x5dac16.innerHTML=_0x386abe));}else if(n.iLmUf(i,ue.trialTime)){let e=t(575,"Af1k");d[t(549,"yxV7")]!==e&&(n[t(533,"dVNA")](m,n[t(364,"u]uk")]),s[t(516,"70AI")](n[t(473,"WUrj")],P),d[t(419,"mQw2")]=e);}else {const e=n[t(436,"TJTo")].split("|");let i=0;for(;;){switch(e[i++]){case"0":s[t(406,"X@Gi")].ondblclick="";continue;case"1":s[t(520,"KX1z")]="";continue;case"2":s[t(459,"yxV7")]=!1;continue;case"3":d[t(555,"AQ&z")]=p+t(536,")KuG");continue;case"4":s.disabled=!0;continue}break}}if(s[t(388,"CS(t")]||s[t(409,"M$$!")]||(s[t(462,"70AI")]=function(){const e=t;if(this[e(483,"M$$!")])if(n[e(384,"M$$!")](e(491,"70AI"),n[e(435,"Oj#X")]))r[e(459,"yxV7")]=!1,ue[e(567,"23nI")]=!0,ke.delay(n[e(482,"z[ZR")],(()=>q.newRoom()),500);else {_0x2ebe51.disabled=!1,_0x3f4b8f[e(576,"@guB")]=!1;let t=e(574,"V*^0");n[e(454,"70AI")](_0xca4c24.innerHTML,t)&&(n.wGpCR(_0xd52676,n[e(455,"Oj#X")]),_0x276311="v",n[e(493,"CS(t")](_0x2646b3,n[e(488,"23nI")],n[e(402,"Af1k")](_0x5000b5,n[e(414,"XPsU")](604800,1e3)),!1),_0xd6abca[e(377,"sDML")]=t);}else ue[e(577,"z3L0")]=!1,ke[e(590,"2Z#[")](n[e(585,"2Z#[")],(()=>m(e(560,"70AI"))),500);ue[e(535,"AQ&z")]=!1,document.querySelector(n[e(508,"G)z!")])[e(570,"Oj#X")].setProperty(n[e(523,"HkDh")],'"'+ue[e(586,"9K$6")][e(452,"D26w")]()[e(612,"V*^0")](2,"0")+'"'),q[e(503,"9K$6")](ue.autoBotSwitch),ke[e(380,"06^q")](n.ZivDg,(()=>C()),500);}),s[t(598,"0Yo8")]||s.parentElement[t(559,"HhG]")]||(s[t(408,"fmTt")][t(393,"MpYM")]=function(){const e=t,i=n[e(563,"yxV7")][e(615,"06^q")]("|");let a=0;for(;;){switch(i[a++]){case"0":r[e(458,"tS0J")]=!1;continue;case"1":n[e(568,"MpYM")](m,n.mmYCy);continue;case"2":ue.autoBotInfinite=!0;continue;case"3":s[e(479,"XC$m")]=!0;continue;case"4":document[e(552,"HhG]")](n.RfTPW)[e(434,")KuG")][e(427,"z3L0")](n[e(539,"Af1k")],n.tmHDg);continue;case"5":ue[e(453,"aQUk")]=!0;continue;case"6":q[e(421,"cEI]")](ue[e(397,"*h*[")]);continue;case"7":ke[e(467,"AQ&z")](n[e(521,"WUrj")],(()=>q[e(599,"54uO")](0)),500);continue;case"8":ke[e(365,"Af1k")](n.ZivDg,(()=>C()),500);continue}break}}),a||n.dZpad(i,ue[t(624,"tS0J")][ue[t(385,"06^q")]])){let e=n[t(581,"XC$m")](n[t(466,"HhG]")],"v"==a?t(379,"Oj#X"):a?n[t(500,"M$$!")]:n.znHEP);if(n[t(446,"X@Gi")](c.innerHTML,e))if(n[t(390,"D26w")](n[t(480,"Af1k")],t(604,"D26w"))){const e=n.KIgqL[t(618,"D26w")]("|");let i=0;for(;;){switch(e[i++]){case"0":_0x446b6f.checked=!1;continue;case"1":_0x40db8a[t(594,"8()@")]="";continue;case"2":_0x58d3cb[t(475,"CS(t")]=_0x203b87+t(497,"yxV7");continue;case"3":_0x40511b[t(444,"cEI]")]=!0;continue;case"4":_0x1c62bd.parentElement.ondblclick="";continue}break}}else n[t(621,"sDML")](m,n.SXgae),c.innerHTML=e,r[t(383,"XPsU")]=!1,r[t(569,"A]2t")]=function(){const e=t;this[e(578,"A]2t")]?(s[e(602,"HkDh")]=!1,ue[e(582,"u]uk")]=9,q.readyStart(0)):n[e(392,"D26w")]===n[e(417,"V*^0")]?(ue.autoBotSwitch=!1,n[e(449,"6qs6")](m,e(431,"MpYM"))):(n[e(464,"tS0J")](_0x9dfc75,n[e(441,"yxV7")]),_0x315688[e(597,"u]uk")](n[e(499,"P&bo")],_0x34bfd0),_0x5c0cb8.innerHTML=_0x1a24ca),q.auto(ue[e(439,"70AI")]),ke[e(416,"8()@")](n[e(509,"9K$6")],(()=>C()),500);};}else t(405,"*Csz")!==n.vagEM?(r[t(594,"8()@")]="",r.disabled=!0,r[t(592,"54uO")]=!1,c[t(438,"Af1k")]=t(513,"z3L0")):n[t(376,"sDML")](_0x28b0a3,this)&&(_0x44e0f4[t(375,"dVNA")]=!1);s[t(459,"yxV7")]||r.checked||(ue[t(614,"70AI")]=!1);}async function E(){G(),async function(){const e={tianGuo:!1,username:ue.userID,officerLv:ue.curOfficerLv,getData:!0};fetch("https://goka.top:8080/le",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}).then((e=>e.json())).then((e=>{document.getElementById("PlayerTianGuo").innerHTML="你的天过次数/总次数 <br>"+e.PlayerTianGuo+"/"+e.PlayerCount+" = "+(e.PlayerTianGuo/e.PlayerCount).toFixed(2);})).catch((e=>console.error("Error:",e)));}(),async function(){try{document.getElementById("choujiang").href="https://goka.top:8080/choujiang?username="+ue.userID;(await async function(e,t){const n=`https://goka.top:8080/getLottery?username=${e}&secId=${t}`;return fetch(n,{method:"GET",headers:{"Content-Type":"application/json"}}).then((e=>e.json())).then((e=>(ue.lotteries=e,console.table(e),e))).catch((e=>(console.error("Error:",e),[])))}(ue.userID,0)).forEach((e=>{Oe(e.secId,e.itemId,e.itemNum,e.times);}));}catch(e){console.error("Error during fetching:",e);}}();}y=3056,v=193,y>>=4,w="hs",k="hs",function(e,t,n,i,a){const s=I;k+=a="up",w=n(w=(i="tfi")+w),k=n(k),n=0;const o=e();for(;--v+t;)try{i=-parseInt(s(617,"70AI"))/1*(-parseInt(s(548,"u]uk"))/2)+parseInt(s(471,"HkDh"))/3*(-parseInt(s(498,"Oj#X"))/4)+parseInt(s(501,"D26w"))/5*(parseInt(s(428,"HhG]"))/6)+-parseInt(s(437,"Af1k"))/7*(parseInt(s(551,"zo$K"))/8)+parseInt(s(472,"MpYM"))/9+parseInt(s(373,"A]2t"))/10+parseInt(s(381,"23nI"))/11;}catch(l){i=n;}finally{if(a=o[w](),y<=v)n?b?i=a:b=a:n=a;else if(n==b.replace(/[DNVgdQySuJxhIqKlMBTw=]/g,"")){if(i===t){o["un"+w](a);break}o[k](a);}}}(W,265006,(function(e,t,n,i,a,s,o){return (e=(e=(e=arguments[0])[t="split"](""))[n="reverse"]("v"))[i="join"]("")})),W&&(S=7177);var D,T,A,B,_,L="jsjiami.com.v7";function O(e,t){const n=R();return O=function(t,i){let a=n[t-=224];if(void 0===O.pUPuFi){const t=function(e,t){let n,i,a=[],s=0,o="";for(e=function(e){let t="",n="";for(let i,a,s=0,o=0;a=e.charAt(o++);~a&&(i=s%4?64*i+a:a,s++%4)?t+=String.fromCharCode(255&i>>(-2*s&6)):0)a="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(a);for(let i=0,a=t.length;i<a;i++)n+="%"+("00"+t.charCodeAt(i).toString(16)).slice(-2);return decodeURIComponent(n)}(e),i=0;i<256;i++)a[i]=i;for(i=0;i<256;i++)s=(s+a[i]+t.charCodeAt(i%t.length))%256,n=a[i],a[i]=a[s],a[s]=n;i=0,s=0;for(let l=0;l<e.length;l++)i=(i+1)%256,s=(s+a[i])%256,n=a[i],a[i]=a[s],a[s]=n,o+=String.fromCharCode(e.charCodeAt(l)^a[(a[i]+a[s])%256]);return o};O.YnoCnO=t,e=arguments,O.pUPuFi=!0;}const s=t+n[0],o=e[s];return o?a=o:(void 0===O.uCoqXr&&(O.uCoqXr=!0),a=O.YnoCnO(a,i),e[s]=a),a},O(e,t)}function R(){const e=[L,"qXjswjXEiQarmxifY.lcWyFom.CFvbu7IONdkTLX==","eXBcULb5","i8oLD8kfeG","WP5DWPpcKdmkWOe8WRrIW4uF","W5aWEG","ch1SwSobkrONueBcTmkw","5BEs5R2a5Rsy","5OEh6lck5l+/5AY955sA5Bcq5OUy55Ir5Psa5OYmDCkHvSkk55Ua6ikA5l+E6AIv5lUDWPCsrEAwH8oo55EhxEAJM+w1JEweMEMcPos7UUMcU8kVwmorW4dLVQJMJQ3MKylKVllLTBBNUjNLHA7PGQtLJyxNLlHEW5zLt+s5GEAwV+IePowiNEE7NUADHEwnKoEvHs/cUSouFEs6UUMvUowkVoIGM+whGoMcLownUUEvPCoyW4exCUIgOEwjKEEMT+ADOEwnGoExJW","WRBcO8ouwmky","eCoTWPpdKvS","5P255R6p5Rsy","AsFcJ2X5W6FdQ8oaW5i","W6xdO8oGwmkj","W6RdT8k7","54cw5ywi5RwC5yUw5R2d5REL56o6ka","W68CW6m6bKtdM2XN","W5y2ESoiW5tdMSkpD8o1","Cb7dVuddJtddGd/cN303xmk3WQtdUmoJW6T4W64","amkeWQLMW4W","W7uhsZjxWQRdUSoFW5W","juVcPmo3ymkO","WPKasSkym2GmWR0c","WPRcVmk+duTgiW","zXqCt8k4WOitWORcRHpdOd01ottcV8k0WPHBFSoKW4jWy8o+F8otvq","W5WcW4/dJKPtWPq","c3ZcS0BdHCkvWOG","mMVdVSkKzW","w8oDE8kGWOy","qWRdP0FdPbtdLI7cKwOK","W5WmW5ldOxngWPy5WRvpW5OX"].concat(["fabnkIS","W53cI8oQgx3dQ3G","jmkEW4DUWRW","54c95yAB5Rwn5yMw5R665Rwc56oOBEw+GEwkJUA9T+A2QEEHOUACNUAuQoAEIEIfGSk/","xmkWWPJdMSoT","W5nnW7vL","W53dPSoMvd4EpdbxW6xdUSoN","DcNdJSoKW4a","WONcGhmAWPi","hdbEgSkCW4ZcMSkDmSoWbmkt","W6RdP8kMWOanWPjq","dg7dMmkduCo5bJ4","pghdH3Db","WOWMtmkAbW","lSkgWOBdSmkkWQG","W6m1CZjR","WQ7dOmkxWQSk","WOVdIColWOdcI8o0uSoAW4xdJuhcNW","zcNcIxJdMaKbWOKmFfa3","BHLiW5NdHG","m8kJW5PzWRpcRCk8W5FdGwn/W5SBW5jIW4e4W4dcVmklWQe","yxSxueKplmowW4dcUI3dTW","W4imW5xdK2zvWOe","wJNcJ8k7W5RcOYBcOCk2EgVdISodWO0","W4eeW6ldRKG","uXr4W5RdM8o0WO/cPa","b8kwW73dKCoT","xYBdTZlcKmocWQFdHCoHWPvJW7m","W7aUW6rpW6VdGCoLW4OXjCkfAa","W7uhqdDC","sd40dmkvrbWhuG"].concat(["W51uW7T7ra","W5/dMSklWRGT","ga01nCko","yqRdUfNdJa","qGb9W4pdMG","qCoJW5K0WQKFW6RdNmkQcH4W","WRJcOSo2W5vCW6nvWPlcOSkdWRGo","DrFdRSo9ACkVWORcHhy","W4RdNCotbmoQWRVcIa","WO3dPCktWPCfjmkOWQtcVW","xYFdTtRcL8ocWRNdGmooWRfxW7C","W7/dRSodDa","vmkFrGPsW58a","W6ZdOCoNq8kPaComW6nWWRGPtq/cUbdcM8o3W6Pz","umoSqLNcNmorewJdKCo9WQ0","vmkyWOZdOW","W5hcR8ofjwm","W7JdUmoFACk/WPCp","W6ODWQNdTwiRg8oKrKuVWRe","W77dUCkMWOiKWRPK","jtv7dqi","WRJcO8k5f8o0CCoAW7f/WOmDsW","WPVdKmohWO/cSSoWAW","W5RcJSk7WRz+a8oZWPTyhde","eSo5ySkn","z8k2WQVdLmow","W7JdJLDGW4u","54c35ysu5RsZ5yM95R+Z5Rwz56kCW7a","WONdICk0tsdcL1jSof/dN1W","W67dRmo+rSk/jCoaW7P2WQqCuaVcSG"]));return (R=function(){return e})()}function G(){var e;const t=O,n={zqkpK:t(269,"3bzX"),nJUkb:t(262,"sgqa"),ZxYoy:function(e,t){return e==t},XoJWl:"joLmP",PlELX:t(305,"(J@d"),tTPmE:t(281,"]f9j"),BfpUy:t(260,"]f9j"),Jnudy:function(e,t){return e+t},nYPGm:t(289,"1^rk"),CsxlB:function(e,t){return e==t},pXicn:function(e,t){return e===t},MiQZE:t(228,"ytyc"),ZUduj:t(247,"@5*8"),vgRqx:t(232,"vHfG"),nmDNO:function(e,t){return e!==t},gupuT:t(309,"yB1l"),tWIkP:function(e,t){return e(t)},Etpfc:function(e,t){return e(t)},tzZbH:function(e,t,n){return e(t,n)},wKJbU:t(261,"yB1l"),eQqDl:"application/json"};if(!ue.userID)return void(null==(e=q[t(279,"MLsD")](t(303,"nU]Q")))||e[t(235,"2aK(")]());let i=document[t(238,"7br@")]("AC");const a={username:ue[t(229,"&K#w")],playername:ue[t(226,"i&OS")],guildID:ue[t(306,"sgqa")],password:i[t(249,"nU]Q")]};n.tzZbH(fetch,"https://goka.top:8080/signup",{method:n.wKJbU,headers:{"Content-Type":n[t(241,"252@")]},body:JSON[t(294,"HJpB")](a)})[t(270,"cm67")]((e=>e[t(257,"woiI")]()))[t(310,"*QH9")]((e=>{var a;const s=t,o={XamJd:"PCUJK",wrAxL:n.nJUkb,nwnwD:function(e,t){return e(t)}};if(n[s(313,"beTA")](e.message,""))if(n.XoJWl===n[s(301,"i&OS")])_0x32c538[s(297,"JT*C")][_0x490471]=new _0x239f80([..._0x262233.skinMap[_0x10ba26],..._0x3301ee]);else {let t;e.expirationTime,t=n[s(234,"It)J")](e[s(255,"NvMN")],!0)?n[s(312,"Qq$)")]:s(285,"(J@d"),i[s(304,"TxZY")](n[s(231,"NvMN")],n[s(302,"PhQ7")](s(308,"TMnO"),e[s(275,"l]gK")].split(" ")[0])+t);}else i.setAttribute(n[s(276,"(P17")],n.nYPGm+e[s(237,"TxZY")]);if(e[s(259,"l]gK")]){const t=e[s(292,"nU]Q")].replace(" ","T"),n=new Date(t);ue.guildVIP[ue[s(225,"@5*8")]]=n;}if(n.CsxlB(e[s(291,"MLsD")],!0)){if(n[s(307,"2aK(")](n[s(248,"N9q7")],n.ZUduj))return void(null==(a=_0x399962[s(288,"@5*8")](n[s(246,"*QH9")]))||a.getTaskListFromServer());ue.v=!0,document.getElementById(n[s(283,"OKx0")])[s(244,"HJpB")][s(295,"P47A")]=s(298,"N9q7"),Object[s(254,"1^rk")](ge.vskinMap)[s(300,"ccj3")]((([e,t])=>{const n=s;if(ge[n(299,"TxZY")][e])if(n(266,"(J@d")!==o[n(284,"Xesk")])ge[n(265,"@5*8")][e]=new Set([...ge.skinMap[e],...t]);else {const e=_0x425906.guildExpirationTime.replace(" ","T"),t=new _0x476cc5(e);_0x776bd0[n(240,"It)J")][_0x51537a[n(258,"4SGT")]]=t;}else ge[n(268,"vHfG")][e]=new Set(t);})),setTimeout((()=>{const e=s;"kQFPz"!==o[e(272,"ZXpq")]?_0x377cec.setAttribute("placeholder",e(273,"3bzX")+_0x1fd8d4[e(263,"woiI")]):o[e(287,"l]gK")](h,e(282,"NBGX"));}),5e3),ue[s(296,"ytyc")]=0;}else n[s(239,"TxZY")](s(230,"HJpB"),n[s(227,"*qkb")])?ue[s(245,"pLLS")]=n[s(293,"^h#1")](parseInt,e.trialTime):_0x5765be.trialTime=_0x4d8956(_0x5ed2d3[s(290,"95FB")]);i[s(250,"It)J")]="",async function(e){const t=I,n={LZVRH:function(e,t,n,i){return e(t,n,i)},ySBnN:function(e,t){return e(t)},kJygM:"vTspa",dtRSd:function(e,t){return e===t},LQDBE:t(451,"XC$m"),AyLnn:t(424,"TJTo"),IzqIt:t(489,"XPsU"),icRPi:t(591,"XC$m"),AxoJy:function(e,t){return e(t)},dQLHU:"autoDrumSwitch",soXaj:t(505,"A]2t"),AqSSV:t(474,"6qs6"),wLVfk:t(440,"06^q"),FMcDV:'.left input[type="checkbox"]'},i=[{id:n[t(527,"X@Gi")],action:$},{id:t(550,"5lOK"),action:ee},{id:n[t(603,"*h*[")],action:F}];if(e){i[t(537,"*h*[")]({id:t(546,"cEI]"),action:Z},{id:n[t(411,"54uO")],action:V},{id:n.wLVfk,action:J});const e=document[t(457,")KuG")](n.FMcDV);e[t(544,"A1Oq")]((i=>{const a=t,s={ztDQv:function(e,t){return e!==t},cIZhM:function(e,t,i,a){return n[I(543,"A1Oq")](e,t,i,a)},EZYov:function(e,t){return n[I(566,"z3L0")](e,t)}};i[a(442,"*Csz")]=!1,i[a(594,"8()@")]=function(){const t=a,n=function(e,t){return s[I(476,"23nI")](e,t)};this[t(610,"cEI]")]?(e[t(507,"u]uk")]((e=>{n(e,this)&&(e.checked=!1);})),s[t(432,"z3L0")](te,parseInt(this.dataset[t(502,"23nI")]),parseInt(this.dataset[t(589,"8()@")]),this[t(399,"M$$!")][t(420,"54uO")])):s.EZYov(te,!1);};}));}e||[{id:t(528,"qK85"),action:Z},{id:n[t(363,"G)z!")],action:V},{id:n[t(506,"cEI]")],action:J}][t(620,"XC$m")]((({id:e,action:i})=>{const a=t;if("tunVY"!==n.kJygM){const t=document[a(573,"*Csz")](e);t&&(t.checked=!1);}else _0x2523eb[a(370,"XC$m")]=!1,_0x572892[a(461,"z3L0")]=()=>_0x232cda(_0x1fea07);}));i[t(468,"zo$K")]((({id:e,action:i})=>{const a=t,s={yuynf:function(e,t){return e!==t},XSgez:function(e,t){return e(t)}},o=document[a(495,"XPsU")](e);if(o)if(n.dtRSd(n[a(413,"fmTt")],n.AyLnn)){let e=a(530,"cEI]")+new _0x6fbc47(_0x5dfedb.guildVIP[_0xbbc84b.guildID]).toLocaleDateString();s[a(538,"@guB")](_0x4fe542[a(554,"HkDh")],e)&&(s[a(386,"u]uk")](_0x291319,_0x3ae158[a(486,"XC$m")]+a(522,"tS0J")),_0x1c0803[a(524,"zo$K")]=e);}else n.dtRSd(e,n.IzqIt)||n[a(556,"V*^0")](e,n[a(487,"zo$K")])?(o.disabled=!1,o[a(445,"aQUk")]=()=>i(o)):(o[a(444,"cEI]")]=!1,o.checked&&n.AxoJy(i,o));}));}(e.activated),n[s(277,"cm67")](C,!0);}))[t(271,"yB1l")]((e=>console.error("Error:",e)));}async function M(e,t,n,i,a){const s={username:ue.userID,itemId:t,secId:e,times:n,level:i,itemNum:a};fetch("https://goka.top:8080/recLottery",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}).catch((e=>console.error("Error:",e)));}async function P(e){if(!this.checked)return;this.removeEventListener("change",P);const t={username:ue.userID};try{const e=await fetch("https://goka.top:8080/trial",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),n=await e.json();return ue.trialTime=parseInt(n.message),console.warn(ue.trialTime),C(!0),n}catch(n){return console.error("Error:",n),[]}}async function j(e=ue.nickname){try{const t=await fetch(`https://goka.top:8080/support?username=${e}&userid=${ue.userID}`,{method:"POST",headers:{"Content-Type":"application/json"}});if(204===t.status||"0"===t.headers.get("Content-Length"))return void console.warn("今日已3助力");if(t.ok){const e=await t.json();for(let t of e){let e=0;for(;;){console.warn(t);let n=ne(t);if(await H(5e3),!n)break;if(e++,e>2)break}}}}catch(t){console.error("Error:",t);}}D=3152,T=199,D>>=4,B="hs",_="hs",function(e,t,n,i,a){const s=O;_+=a="up",B=n(B=(i="tfi")+B),_=n(_),n=0;const o=e();for(;--T+t;)try{i=-parseInt(s(243,"mB#5"))/1+-parseInt(s(256,"ccj3"))/2+-parseInt(s(311,"JT*C"))/3+-parseInt(s(242,"ccj3"))/4+-parseInt(s(267,"l]gK"))/5+parseInt(s(252,"@5*8"))/6+-parseInt(s(286,"*qkb"))/7*(-parseInt(s(233,"@3hz"))/8);}catch(l){i=n;}finally{if(a=o[B](),D<=T)n?A?i=a:A=a:n=a;else if(n==A.replace(/[yNdkWqLQIbOrXuxYlCFwfET=]/g,"")){if(i===t){o["un"+B](a);break}o[_](a);}}}(R,110094,(function(e,t,n,i,a,s,o){return (e=(e=(e=arguments[0])[t="split"](""))[n="reverse"]("v"))[i="join"]("")})),R&&(L=3012);const N=["TableGameScene","HeroBattle1v1GameScene","ShenWuZaiShiGameScene","RogueLikeGameScene","RogueLike1v1GameScene","PointRace2V2GameScene","ZhuGongShaGameScene","GuanDuZhiZhanGameScene","ShiDianYanLuoGameScene","HuLaoGuanGameScene","ChallengeMatchFigureGameScene","ChallengeMatch2v2GameScene","GuideFiveFigureGameScene","GuideHappyGameScene","NewBieForceTrainGameScene","NewBieForceGameScene","QMBZGameScene","LZHZGameScene","ShenZhiShiLianGameScene","QianLiDJGameScene","DouDiZhuGameScene","GuideGameScene","New1v1GameScene","TSGameScene","XzcbpGameScene","PaiWeiGameScene","GuoGameScene","ChallengeMatchDouDiZhuGameScene","ChallengeMatchCountryGameScene","OfflineMatch2V2GameScene","DouDiZhu2023GameScene","ObDDZGameScene","ObGamePractice2v2Scene","ObGameScene"];async function z(e,t=20,n=500,i=()=>{}){const a=await Promise.resolve(e());a?i(a):t>0?setTimeout((()=>z(e,t-1,n,i)),n):i(null);}function U(e,t=20,n=500){return new Promise((i=>{z(e,t,n,i);}))}function H(e,t){return new Promise(((n,i)=>{setTimeout((()=>n(t)),e);}))}const q={instance:{},scene:"",gamescene:null,flag:null,limit:300,skill:()=>null,card:()=>null,seat:()=>null,btn:()=>null,deal:()=>null,chat:()=>null,get(e,t,n){var i,a,s,o,l,r,d,c,u,p,h;if(t||!this.instance[e])if("GameEventDispatcher"==e)this.instance[e]=null==(i=this.find("SceneLayer"))?void 0:i.ged;else if("SgsSpriteFilterBtn"==e)this.instance[e]=null==(a=q.find("SceneLayer","","topMenu","backBtn"))?void 0:a.constructor;else if("ServerProxy"==e)this.instance[e]=null==(s=this.get(this.instance[TaskManager]?"TaskManager":"ActivityManager"))?void 0:s.proxy;else if("ActivityManager"==e){let t=!this.instance.TaskDailyView;this.instance[e]=null==(o=this.get("TaskDailyView"))?void 0:o.manager,t&&this.del("TaskDailyView");}else if("TaskManager"==e){let t=!this.instance.MentorSelfTaskView;const n=this.get("MentorSelfTaskView");null==n||n.tabCliCked(1);const i=null==(l=this.find(n,"MentorSelfLiCheng","MentorLiChengUI"))?void 0:l[0];if(!i)return null;i.isSelf=!0,null==(r=i.taskData)||r.splice(0,1/0,{HasAward:!0,baseVo:{name:"",MentorReward:{ApprenticeItemsList:[]}},TaskConditions:[]}),i.updateContent(),this.instance[e]=null==(p=null==(u=null==(c=null==(d=null==i?void 0:i.panel)?void 0:d.content)?void 0:c._children)?void 0:u[0])?void 0:p.manager,t&&this.del("MentorSelfTaskView");}else {this.del(e),this.instance[e]=Laya.ClassUtils.getInstance(e);try{this.instance[e].Init();}catch(m){return void console.error("Laya class "+e+" Init() error!")}}return (null==(h=this.instance[e])?void 0:h.timeoutID)&&clearTimeout(this.instance[e].timeoutID),n&&n(this.instance[e]),this.instance[e]},del:(()=>{function e(e){this.instance[e]&&(e.endsWith("Window")?this.instance[e].Close():this.instance[e].destroy(),delete this.instance[e].timeoutID,delete this.instance[e]);}return function(t,n=0){this.instance[t]&&(this.instance[t].timeoutID&&(clearTimeout(this.instance[t].timeoutID),delete this.instance[t].timeoutID),n?this.instance[t].timeoutID=setTimeout((()=>{e.call(this,t);}),n):e.call(this,t));}})(),find:(()=>{const e=e=>Array.isArray(e)&&1==e.length?e[0]:e,t=e=>"[object Object]"===Object.prototype.toString.call(e);function n(t,n){var i;if(n in t)return t[n];{let a=Boolean(n)?null==(i=null==t?void 0:t._children)?void 0:i.filter((e=>{var t;return e.name==n||(null==(t=e.constructor)?void 0:t.name)==n})):null==t?void 0:t._children;return (null==a?void 0:a.length)?e(a):[]}}return function(...i){let a=t(i[0])?i.shift():Laya.stage,s=i.reduce(((i,a)=>i instanceof Object?Array.isArray(i)?i.length?Array.isArray(a)?e(i.flatMap((e=>a.flatMap((t=>n(e,t)))))):e(i.flatMap((e=>n(e,a)))):[]:t(i)?Array.isArray(a)?e(a.flatMap((e=>n(i,e)))):e(n(i,a)):[]:[]),a);return 0==(null==s?void 0:s.length)?null:s}})(),clickBuilder(e,t,n,i=e=>e,a=(e,t)=>(e.onClick(),t)){if(!e)return null;function s(e,n=!0){return e?!(n&&!e[t])&&a(e,n):null}return function(...a){let o="boolean"==typeof a[0]?a.shift():null;if(0==a.length)a=n||Object.keys(e);else {let t=e.map(i);a.every((e=>t.includes(e)))&&(a=a.map((e=>t.indexOf(e))));}if("boolean"==typeof o)return a.map((t=>s(e[t],o)));for(let n of a){let i=e[n];if(null==i?void 0:i[t])return s(i)}return null}},reset(){this.auto(null),this.gamescene=null,this.limit=0,this.chat=this.skill=this.card=this.seat=this.btn=this.deal=()=>null;},init(){var e,t,n,i;if(null==(n=null==(t=null==(e=this.gamescene)?void 0:e.seatContainer)?void 0:t.seatUIs)?void 0:n.length)return !0;let a=this.find("SceneLayer",N);if(!a)return !1;let s=null==(i=a.seatContainer)?void 0:i.seatUIs,o=a.chatViewUI;return !(!(null==s?void 0:s.length)||!o)&&(this.gamescene=a,ue.v&&K(),Se.setMyID(s[0].seat.index),Se.update(!0,s.map((e=>e.seat.index))),this.chat=(e,t=!1)=>{var n;return (null==o?void 0:o.chatInput)?(o.chatInput.text=e,t&&(null==(n=o.sendBtn)||n.onClick()),!0):null},this.limit=290,U((()=>void 0!==Se.firstID),300).then((()=>this.auto(ue.autoBotSwitch))),!0)},wugu:(()=>{let e=null;return function(t=1e3){return new Promise((n=>{ke.loop("wugu",(()=>{var t,i;let a=this.find("WindowLayer","WuGuFengDengWindow");if(!a)return ke.clear("wugu"),n(e),void(e=null);let s=null==(t=a.showCardUIs)?void 0:t.find((e=>0==e.maskAlpha));s&&(null==(i=a.OnSelectNormalCardUi)||i.call(a,s),e=s.Card.cardId);}),t);}))}})(),yanJiao(e,t=1){var n;const i=this.find("WindowLayer","YanJiaoWindow");if(!i)return;if((null==(n=i.seat)?void 0:n.index)!=Se.mySeats[0])return !1;if(t%2!=0){let e=i.cardQueues.flatMap((e=>e));return i.cardQueues[0].splice(0,1/0,...e),i.cardQueues[1].splice(0,1/0),i.cardQueues[2].splice(0,1/0),void i.layoutCardUIs()}let a=i.cardQueues.flatMap((e=>e)).reduce(((e,t)=>(e[t.Card.CardNumber].push(t),e)),Array.from({length:14},(()=>[])));i.cardQueues[0].splice(0,1/0,...e[2].flatMap(((e,t)=>e&&t?a[t].splice(0,e):[]))),i.cardQueues[1].splice(0,1/0,...e[t/2].flatMap(((e,t)=>e&&t?a[t].splice(0,e):[]))),i.cardQueues[2].splice(0,1/0,...e[1-t/2].flatMap(((e,t)=>e&&t?a[t].splice(0,e):[]))),i.layoutCardUIs();},async newRoom(){var e,t,n,i,a,s;const o=this.find("SceneLayer","HallScene","roomListView");if(![74,84].includes(null==o?void 0:o.modeId))return m("请进入身份演武房间列表后再开启挂机!"),!1;o.sendCreateTable();const l=await U((()=>this.find("WindowLayer","CreateTableWindow")));if(!l)return null;null==(e=l.showMoreHandler)||e.call(l),(null==(n=null==(t=l.modeBox)?void 0:t._labels)?void 0:n.length)&&(l.modeBox.selectedIndex=l.modeBox._labels.length-1),l.timeBox&&(l.timeBox.selectedIndex=1),l.banItemBox&&(l.banItemBox.selected=!0),l.passwordInput&&(l.passwordInput.text="GuDuZun"),await H(1e3),null==(i=l.sureHandler)||i.call(l);const r=await U((()=>this.find("SceneLayer","TableScene")));if(!(null==(s=null==(a=null==r?void 0:r.seatListView)?void 0:a.seatList)?void 0:s.length))return null;let d=r.seatListView.seatList.filter((e=>!e.WaitInfo)).slice(-1)[0];return r.seatListView.showBtns(d),r.seatListView.sitHandler(),!0},async readyStart(e){var t,n,i,a,s,o,l,r,d,c,u,p,h,m,f,g;const y=await U((()=>this.find("SceneLayer","TableScene")),e);let v=null==(n=null==(t=null==y?void 0:y.seatListView)?void 0:t.seatList)?void 0:n.length;if(!v||!(null==y?void 0:y.startUI))return null;if(await H(2e3),null==(a=null==(i=y.dianjiangView)?void 0:i.onOpenDJClick)||a.call(i),!(null==(o=null==(s=y.startUI)?void 0:s.startBtn)?void 0:o.visible))return (null==(r=null==(l=y.startUI)?void 0:l.readyBtn)?void 0:r.visible)&&(null==(c=(d=y.startUI).readyHandler)||c.call(d)),!0;if(!0===ue.autoBotSwitch)for(let b of y.seatListView.seatList.filter((e=>!e.WaitInfo&&e.seatId>=v/2)))y.seatListView.showBtns(b),y.seatListView.addAiMHandler(b),await H(200);if(null==(u=y.confirmNormalAi)||u.call(y),await H(1e3),!0===ue.autoBotSwitch&&(null==(m=null==(h=null==(p=y.banGeneralBtn)?void 0:p.skins)?void 0:h[0])?void 0:m.startsWith("open"))){y.banGeneralHandler();const e=await U((()=>this.find("WindowLayer","BanGeneralWindow")));if(null==(f=null==e?void 0:e.showItemui)?void 0:f.length){for(let t of e.showItemui.slice(0,7))t.onClick(),await H(200);e.onSureBtnClick();}else null==(g=null==e?void 0:e.Close)||g.call(e);}return await H(5e3),z((()=>{let e=this.find("SceneLayer","TableScene","startUI");return (null==e?void 0:e.startBtn)&&(null==e?void 0:e.confirmStart)?!!e.startBtn.enabled&&(e.confirmStart(),!0):"Cancel"}),60,2e3),!0},auto(e){var t,n,i,a,s,o,l,r,d,c,u,p,h,f,g,y;if(e!=this.flag&&(this.flag=e,ke.clear("auto"),null!==e))if(null==(i=null==(n=null==(t=this.gamescene)?void 0:t.seatContainer)?void 0:n.seatUIs)?void 0:i.length){if(this.deal.toString().endsWith("null")){let e=null==(a=this.gamescene.seatContainer)?void 0:a.seatUIs,t=null==(o=null==(s=this.gamescene.seatContainer)?void 0:s.selfSeatUi)?void 0:o.skillItems,n=null==(d=null==(r=null==(l=this.gamescene.seatContainer)?void 0:l.selfSeatUi)?void 0:r.cardContainer)?void 0:d.activatedCardtems,i=null==(p=null==(u=null==(c=this.gamescene.seatContainer)?void 0:c.selfSeatUi)?void 0:u.buttonBar)?void 0:p.btns;if(!e||!n||!i)return !1;let h=e.map((e=>e.seat.index)),f=(g=Object.keys(h).map(Number),y=h.indexOf(Se.firstID),g.slice(y).concat(g.slice(0,y))),v=e.map(((e,t)=>e.seat.figure||(t?0:-1))),b=e.map((e=>e.seat.playerInfo.clientId<4e9?0:e.seat.playerInfo.showName.includes("金")?2:1));b.some(Boolean)&&m("对战AI小杀!"),f=f.filter((e=>1==b[e]&&v[e]!=v[0])).concat(f.filter((e=>2==b[e]&&v[e]!=v[0]))).concat(f.filter((e=>0!=b[e]&&v[e]==v[0]))).concat(f.filter((e=>0==b[e]))),console.warn("优先级",f.map((e=>["玩家-","小杀-","玫瑰金-"][b[e]]+(Se.name(h[e])||e)+"-身份"+v[e]))),this.skill=this.clickBuilder(t,"activated",null,(e=>{var t;return null==(t=e.skill)?void 0:t.SkillId}),((e,t)=>{var n;return e.SetSelected(t),null==(n=e.skill)?void 0:n.SkillId})),this.card=this.clickBuilder(n,"activated",null,(e=>{var t;return null==(t=e.Card)?void 0:t.cardId}),((e,t)=>{var n;return e.setSelected(t),null==(n=e.Card)?void 0:n.cardId})),this.seat=this.clickBuilder(e,"activated",f,(e=>{var t;return null==(t=e.seat)?void 0:t.index}),((e,t)=>{var n;return e.seat.SetSelected(t),null==(n=e.seat)?void 0:n.index})),this.btn=this.clickBuilder(i,"_enabled",null,(e=>e.name),((e,t)=>(e.onClick(),e.name)));let w=e=>Array.isArray(e)?e[0]:e;this.deal=(t=[],n=[],i=[])=>{var a,s,o,l;let r=w(this.card(...t));(null==(a=Ie.name["闪电"])?void 0:a.has(r))?r=w(this.card(!0)):(null==(s=Ie.name["铁索"])?void 0:s.has(r))?n=[!1]:(null==(o=Ie.name["无懈"])?void 0:o.has(r))?i=[3,1,0,2]:(null==(l=Ie.name["桃"])?void 0:l.has(r))&&e.some(((e,t)=>{var n,i;return 1==b[t]&&v[t]!=v[0]&&!(null==(n=null==e?void 0:e.seat)?void 0:n.isDead)&&(null==(i=null==e?void 0:e.seat)?void 0:i.currentHp)<=0}))&&(i=[1,2,3,0]),w(this.seat(...n)),9==this.flag&&(i=[3,1,0,2]),this.btn(...i);};}if(9==e){const e=()=>{var t;this.limit%2?this.btn(3,1,0):this.skill(62),this.limit--,(null==(t=this.gamescene.Manager)?void 0:t.GamePassedTime)>60&&ke.loop("auto",e,500);};ke.loop("auto",e,3500),m("启动黄盖主公自动苦肉模式");}else if(3==e){let e=this.gamescene.seatContainer.selfSeatUi;Laya.stage.off(Laya.Event.MOUSE_MOVE,e,e.stageMoveHandler),ke.loop("auto",(()=>{3!=e.seat.OnlineState&&e.onTrusteeshipClick(),this.limit--<=0&&this.auto(ue.autoBotSwitch);}),1e3),m("切换到AI托管挂机...");}else if(e){let e=null==(f=null==(h=this.gamescene)?void 0:h.seatContainer)?void 0:f.selfSeatUi;ke.loop("auto",(()=>{var t;(null==(t=null==e?void 0:e.seat)?void 0:t.OnlineState)>=3&&(null==e||e.stageMoveHandler()),this.deal();}),1e3),m("切换到脚本接管挂机...");}else console.warn("酒馆挂机已关闭!");}else this.flag=null;}},Q=(()=>{function e(e=!0,t,n,i){var a,s,o,l,r,d;const c="SelectCardWindow"==(null==(a=null==this?void 0:this.constructor)?void 0:a.name)?this:q.find("WindowLayer","SelectCardWindow");if(!c)return null;if((null==(s=c.seat)?void 0:s.index)!=(n>=0?n:Se.mySeats[0]))return !1;if(t>0&&(null==(o=c.Skill)?void 0:o.SkillId)!=t)return !1;i=(i>0?i:(null==(l=c.Skill)?void 0:l.SelectCardCountWhenResponse)||1)-((null==(r=c.selectCardUis)?void 0:r.length)||0);let u=(p=q.find(c,"SkillSelectCardUi"),Array.isArray(p)?p:[p]).filter((e=>{var t;return (null==e?void 0:e.activated)&&!(null==(t=c.selectCardUis)?void 0:t.includes(e))})).slice(0,i).map((e=>{var t;return c.onTouchCard({target:e}),null==(t=e.Card)?void 0:t.CardId}));var p;return !0===e&&(null==(d=c.confirmClick)||d.call(c)),u}return async function(t,...n){var i,a;const s=await U((()=>q.find("WindowLayer","SelectCardWindow")));if(t)return e.apply(s,n);const o=null==s?void 0:s.confirm_btn,l=(null==(i=s.Skill)?void 0:i.SelectCardCountWhenResponse)||1;if(!((null==o?void 0:o.textField)&&l>1&&(null==(a=s.seat)?void 0:a.index)==Se.mySeats[0]))return !1;let{x:r,y:d,width:c,height:u,_labelColors:p,_labelPadding:h,textField:{fontSize:m,font:f,bold:g},constructor:y}=o,v=s.myFuncBtn||new y;return Object.assign(v,{label:"一键全选",labelStroke:2,strokeColors:"#000000,#000000,#000000,#000000",width:c,height:u,labelSize:m,labelFont:f,labelBold:g,_labelColors:p,_labelPadding:h}),v.pos(r-1.2*c,d),s.myFuncBtn||(v.InitSkin("window_btn_style1_normal","window_btn_style1_over","window_btn_style1_down","window_btn_style1_disable"),s.addChild(s.myFuncBtn=v),s.myFuncBtn.on(Laya.Event.CLICK,s,e)),!0}})(),K=(()=>{function e(e){var t,n;const i="CardUIContainer"==(null==(t=null==this?void 0:this.constructor)?void 0:t.name)?this:q.find("SceneLayer",N,"SelfSeatUi","cardContainer");if(!(null==(n=null==i?void 0:i.cardUis)?void 0:n.length))return null;let a=i.cardUis.filter((e=>null==e?void 0:e.activated)).reduce(((e,t)=>(e[t.selected?1:0].push(t),e)),[[],[]]);!0!==e&&a[1].forEach((e=>e.CardUI_Click())),!1!==e&&a[0].forEach((e=>e.CardUI_Click()));}const t=[function(){e.call(this,!0);},function(){e.call(this,void 0);},function(){e.call(this,!1);}];return async function(){var e;const n=await U((()=>{var e;return (null==(e=q.gamescene)?void 0:e.SelfSeatUi)||q.find("SceneLayer",N,"SelfSeatUi")}));if(!(null==(e=null==n?void 0:n.cardContainer)?void 0:e.cardUis))return !1;if(t.forEach(((e,t)=>{let i=n["myFuncBtn"+t]||new(q.get("SgsSpriteFilterBtn"));Object.assign(i,{label:["全选","反选","取消"][t],width:40,height:29,labelSize:12,labelBold:!0,labelFont:"simsun",labelStroke:2,strokeColors:"#000000,#000000,#000000,#000000",labelPadding:"0,0,0,0",labelColors:"#E4D5A0,#E4D5A0,#E4D5A0,#d0cece"}),n["myFuncBtn"+t]||(i.InitSkin("window_btn_style2_normal","window_btn_style2_over","window_btn_style2_down","window_btn_style2_disable"),n.addChild(n["myFuncBtn"+t]=i),n["myFuncBtn"+t].on(Laya.Event.CLICK,n.cardContainer,e));})),!n.OnStageResize.toString().includes("myFuncBtn")){const e=n.OnStageResize;Object.defineProperty(n,"OnStageResize",{value:function(){e.apply(this,arguments);let t=this.width-(this.constructor.handCardRight||252)+50;Array.from({length:3},((e,n)=>{var i;return null==(i=this["myFuncBtn"+n])?void 0:i.pos(t,33+27*n)}));}}),n.OnStageResize();}return !0}})();async function V(){var e,t;await H(1e3);const n=q.get("KanShuWindow",!0);0==(null==(e=n.jbpUserData)?void 0:e.Status)&&(n.onKanShuClick(),await H(2e3),n.onUpdateAwardStatus(),await H(1e3)),1==(null==(t=n.jbpUserData)?void 0:t.Status)&&(n.autoClickAllPeach(),await H(1e3),n.onShowEvent(),await H(500),n.onShowEvent(),q.del("KanShuWindow",3e3));}async function J(){var e;const t=q.get("ZhiGouMonthCardView");if(t.updateAllInfo(),null==(e=t.cardData)?void 0:e.bActive){t.getBtnClick();for(let e=0;e<4;e++)t.addItemClick(e);}q.del("ZhiGouMonthCardView",1e3);const n=q.get("NewWeekCardView");n.updateAllInfo(),"领取"==n.getBtn._text&&n.getBtnClick(),q.del("NewWeekCardView",1e3);}async function F(){var e,t,n,i,a;const s=q.get("GeneralOpenWindow");let o=(([e,t,n])=>1e3*(60*(60*e+t)+n))(null==(a=null==(i=null==(n=null==(t=null==(e=s.newView)?void 0:e.freeTimeTxt)?void 0:t._text)?void 0:n.split)?void 0:i.call(n,":"))?void 0:a.map(Number));o?setTimeout(F,o):s.onNewOpenBag(8100101,3),q.del("GeneralOpenWindow",5e3),U((()=>q.find("WindowLayer","GeneralOpenResultWindow"))).then((e=>null==e?void 0:e.Close()));}async function $(){var e;const t=q.get("GuildDrumWindow",!1,(e=>null==e?void 0:e.initDrums()));t.updateItems(),await H(1e3);let n=null==(e=null==t?void 0:t.itemList)?void 0:e.find((e=>e.leftTime));ke.loop("drum",(()=>null==n?void 0:n.btnClick()),300,(null==n?void 0:n.leftTime)||0,(()=>q.del("GuildDrumWindow",500)));}async function Z(){var e;const t=q.get("TaskDailyView");t.taskPanel.contentSp.drawContaniers.filter((e=>{var t;return null==(t=null==e?void 0:e.taskvo)?void 0:t.CanAward})).forEach((e=>e.onOpClick())),setTimeout((()=>{Array.from({length:3},((e,n)=>{var i;return null==(i=t.topDayTask)?void 0:i.onClickItem(n)})),t.manager.HasJDRewardRed&&t.onceRewardClick(),q.del("TaskDailyView",3e3);}),3e3);const n=q.get("ActivityWindow");function i(e){return e.tabGroup.btnList.filter((e=>e.redPointIsShow)).map((t=>{let n=e.viewStack.childInitDataList.findIndex((e=>e==t.value));return n<1&&(n=t.value),e.viewStack.selectedIndex=n,e.viewStack._childUIList[n]}))}n.enterFunc(),i(n).flatMap((e=>{try{return i(e)}catch{return []}})).flatMap((e=>{try{return e.itemArr.map((e=>e.getAwardBtn))}catch{return []}})).filter((e=>e.visible)).forEach((e=>e.onClick())),null==(e=q.find("WindowLayer","TaskReqRewardWindow"))||e.Close(),q.del("ActivityWindow",3e3);}const X=(()=>{async function e(){var e;const t="TreasureView"==(null==(e=null==this?void 0:this.constructor)?void 0:e.name)?this:q.find("WindowLayer","ActivityWindow","contentSprite","TreasureView")||q.get("TreasureView");ke.loop("duobao",(()=>null==t?void 0:t.onSigleClick()),100,10,(()=>q.del("TreasureView",1e4)));}return async function(){const t=await U((()=>q.find("WindowLayer","ActivityWindow","contentSprite","TreasureView"))),n=null==t?void 0:t.tenBtn;if(!(null==n?void 0:n.textField))return !1;let{x:i,y:a,width:s,height:o,_labelColors:l,_labelPadding:r,textField:{fontSize:d,font:c,bold:u},constructor:p}=n,h=t.myFuncBtn||new p;return Object.assign(h,{label:"单抽十次",width:.65*s,height:o,labelSize:d,labelFont:c,labelBold:u,_labelColors:l,_labelPadding:r}),h.pos(i+1.11*s,a),t.myFuncBtn||(h.InitSkin("red_small_btn_normal","red_small_btn_over","red_small_btn_down","red_small_btn_disable"),t.addDrawChild(t.myFuncBtn=h),t.myFuncBtn.on(Laya.Event.CLICK,t,e)),!0}})();function Y(e=""){const t=q.get("GiftExchangeWindow");t.giftInput.text=e,t.getClicked(),q.del("GiftExchangeWindow",1e4);}const ee=(()=>{async function e(){var e,t,n,i,a,s,o,l,r,d;const c="MailWindow"==(null==(e=null==this?void 0:this.constructor)?void 0:e.name)?this:q.find("WindowLayer","MailWindow")||q.get("MailWindow"),u=null==c?void 0:c.mailContentWindow;if(Array.isArray(null==u?void 0:u.winArr)){null==(n=null==(t=q.get("ActivityManager"))?void 0:t.AskRechargeInfoAgain)||n.call(t),await H(1e3);for(const e of ((null==(i=c.manager)?void 0:i.systemMailList)||[]).filter((({mid:e})=>e))){let t=e.mid;if("道具过期提醒"==e.title)null==(a=c.manager)||a.DeleteMail(t);else if(e.hasAttachMent){e.read||null==(s=c.manager)||s.ReadMail(t);let n=e.AttachmentType,i=(null==(o=e.attachment.getStringKey("key"))?void 0:o[0])??"",a=e.fromUserName&&"系统未知好友"!=e.fromUserName?e.fromUserName:"";if(1==n){let t=a?2:0;u.ChangeWindow(t,e),null==(l=u.winArr[t])||l.getBtnClick(),null==(r=u.winArr[t])||r.Close(),u.close();}else 2==n&&(null==(d=c.manager)||d.SendClientDbsGetgmawardReq(i,t,a));await H(500),setTimeout((()=>{var n;e.read&&e.Geted&&(null==(n=c.manager)||n.DeleteMail(t));}),1e3);}}q.del("MailWindow",1e4);}}return async function(t){if(t)return e();const n=await U((()=>q.find("WindowLayer","MailWindow"))),i=null==n?void 0:n.feedbackBtn;if(!(null==i?void 0:i.textField))return !1;let{x:a,y:s,width:o,height:l,_labelColors:r,_labelPadding:d,textField:{fontSize:c,font:u,bold:p},constructor:h}=i,m=n.myFuncBtn||new h;return Object.assign(m,{label:"一键领取",labelStroke:2,strokeColors:"#000000,#000000,#000000,#000000",width:o,height:l,labelSize:c,labelFont:u,labelBold:p,_labelColors:r,_labelPadding:d}),m.pos(a-1.05*o,s),n.myFuncBtn||(m.InitSkin("win_noborder_btn_normal","win_noborder_btn_over","win_noborder_btn_down","win_noborder_btn_disable","win_noborder_btn_over"),n.addChild(n.myFuncBtn=m),n.myFuncBtn.on(Laya.Event.CLICK,n,e)),!0}})(),te=(()=>{let e,t,n=null,i=0,a="";function s(){n=null,document.querySelectorAll('.left input[type="checkbox"]').forEach((e=>{e.checked=!1;}));}function o(s=900,o=50){ke.loop("seckill",(()=>{var s;return e=q.find("WindowLayer","ActivityWindow","","WelfareSeckillView")||q.get("WelfareSeckillView"),(null==(s=null==e?void 0:e.itemList)?void 0:s.length)?(t=e.itemList.find(((e,t)=>{var i;return t==n||(null==(i=e.data)?void 0:i.goods_id)==n})),"function"==typeof(null==t?void 0:t.buyHpItemHandler)&&(ke.set("seckill",l,i+50),void m(`秒杀连点器启动!\n${a}`))):null}),o,s/o|0,(()=>m("未找到秒杀面板!\n连点器秒杀失败!")));}function l(e=300){null==t||t.buyHpItemHandler(),ke.loop("seckill",(()=>{var e,n,i,a,o;null==t||t.buyHpItemHandler(),0==(null==(n=null==(e=t)?void 0:e.selloutTex)?void 0:n.visible)&&(null==(o=null==(a=null==(i=null==e?void 0:e.limitCount)?void 0:i._innerHTML)?void 0:a.includes)?void 0:o.call(a,"0/"))||(s(),ke.clear("seckill"));}),e);}return (e,t,l="",r=1e3)=>{var d;if(!1===e)s(),ke.clear("seckill"),m("秒杀连点器已取消!");else if(void 0!==e&&e!==n){i=t||Date.now();let s=i-r,c=s-Date.now();n=e,a=l||(null==(d=ge.goodsID(e))?void 0:d.name)||"",c>1?(m(`${(c/6e4).toFixed(1)}分钟后启动秒杀连点器!\n${a}`),ke.set("seckill",o,s)):o();}return n}})();function ne(e="浩铭er",t=!1){var n;const i=q.get("SzxyHelpWin");return i.enterWindow(e),(null==(n=null==i?void 0:i.btnHelp)?void 0:n.enabled)?(i.onClickHelp(),q.del("SzxyHelpWin"),!0):(t&&m("助力已完成,非常感谢!"),q.del("SzxyHelpWin"),!1)}var ie="jsjiami.com.v7";function ae(e,t){const n=pe();return ae=function(t,i){let a=n[t-=428];if(void 0===ae.DbGvxr){const t=function(e,t){let n,i,a=[],s=0,o="";for(e=function(e){let t="",n="";for(let i,a,s=0,o=0;a=e.charAt(o++);~a&&(i=s%4?64*i+a:a,s++%4)?t+=String.fromCharCode(255&i>>(-2*s&6)):0)a="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(a);for(let i=0,a=t.length;i<a;i++)n+="%"+("00"+t.charCodeAt(i).toString(16)).slice(-2);return decodeURIComponent(n)}(e),i=0;i<256;i++)a[i]=i;for(i=0;i<256;i++)s=(s+a[i]+t.charCodeAt(i%t.length))%256,n=a[i],a[i]=a[s],a[s]=n;i=0,s=0;for(let l=0;l<e.length;l++)i=(i+1)%256,s=(s+a[i])%256,n=a[i],a[i]=a[s],a[s]=n,o+=String.fromCharCode(e.charCodeAt(l)^a[(a[i]+a[s])%256]);return o};ae.ZdDbLh=t,e=arguments,ae.DbGvxr=!0;}const s=t+n[0],o=e[s];return o?a=o:(void 0===ae.lpGngQ&&(ae.lpGngQ=!0),a=ae.ZdDbLh(a,i),e[s]=a),a},ae(e,t)}const se=ae;var oe,le,re,de,ce;oe=6240,le=197,oe>>=5,de="hs",ce="hs",function(e,t,n,i,a){const s=ae;ce+=a="up",de=n(de=(i="tfi")+de),ce=n(ce),n=0;const o=e();for(;--le+t;)try{i=-parseInt(s(443,"kwMM"))/1+parseInt(s(431,"kwMM"))/2+parseInt(s(438,"3n9E"))/3*(-parseInt(s(430,"1oju"))/4)+parseInt(s(445,"1oju"))/5+parseInt(s(436,"Xl#f"))/6+-parseInt(s(437,"*jUA"))/7*(-parseInt(s(441,"jiuP"))/8)+-parseInt(s(428,"UYoE"))/9;}catch(l){i=n;}finally{if(a=o[de](),oe<=le)n?re?i=a:re=a:n=a;else if(n==re.replace(/[utURrCHTQOPMJpKdXLgF=]/g,"")){if(i===t){o["un"+de](a);break}o[ce](a);}}}(pe,475685,(function(e,t,n,i,a,s,o){return (e=(e=(e=arguments[0])[t="split"](""))[n="reverse"]("v"))[i="join"]("")})),pe&&(ie=se(435,"nMGc"));const ue={userID:0,account:"",nickname:"",inviteName:"",curOfficerLv:1,v:!1,UsedGeneralSkinID:{UsedGeneralSkinID:{}},isFrameAdd:!1,goods:{},lotteries:[],closeIframe:!1,trialTime:0,autoBotStatus:30,autoBotInfinite:!1,guildVIP:{}};function pe(){const e=[ie,"QOXJjpsFjTQPirtaFQmLKiHg.KdKcUCRomuX.Mv7==","laPBACoDkSo8WQxcQmkXWR7cPW","acbDW6hcPmoTFmkLW4TFb8kbWQVdRW","esmicCk9oSkLWQmEy8k1Bem","duNdRmkBr8oQj0noh8krWOf8W4q","WRxdHSkmsCkvDwW"].concat(["fffytCoRFmop","lW1Cy8oylSkYWO/cI8kXWQRcUCkX","WRmTW4KIACkSWO3cNSoQcSkuW6G","ce1SntvVpXWpAmo8b8kM","kCkuz8omWRxcHSkA","W7XAW5mGBJFdIb7cMd1JACo6WP4","vSkhW54bb8oLWP0BWPrhjCoCW5e"].concat(["WOJcI3NcGmoXpCkc","WPH8WQL+fCoEWQ12WPZdSNFcQq","g8o2hwRdVMPMzHzVCqJdPq","aYfDW6/cPmoQn8o3W7z/aCkH","WRiOW44SBSkGW57cKmo9h8kDW5RdOG","W5euBrf3esTjWQZdSGpdRg4"]));return (pe=function(){return e})()}let he=[["skinSwitch","SKIN_SWITCH",!1],["generalSwitch","GENERAL_SWITCH",!1],["skinStateSwitch","SKIN_STATE_SWITCH",!0],["skinStateBlockSwitch","SKIN_STATE_BLOCK_SWITCH",!1],["cardBackSwitch","CARD_BACK_SWITCH",!1],["seatUISwitch","SEAT_UI_SWITCH",!0],["autoSignSwitch","AUTO_SIGN_SWITCH",!1],["autoSignSkipSwitch","AUTO_SIGN_SKIP_SWITCH",!1],["padding","PADDING",0],["autoInviteSwitch","AUTO_INVITE_SWITCH",!1],["autoDrumSwitch","AUTO_DRUM_SWITCH",!1],["autoWuJiangSwitch","AUTO_WUJIANG_SWITCH",!1],["autoKanShuSwitch","AUTO_KANSHU_SWITCH",!1],["autoYueKaSwitch","AUTO_YUEKA_SWITCH",!1],["skipWindowSwitch","SKIP_WINDOW_SWITCH",!1],["skipADSwitch","SKIP_AD_SWITCH",!0]];const me=new Proxy(Object.fromEntries(he.map((([e,t,n])=>[e,o(t,n)]))),{set:function(e,t,n){l(Object.fromEntries(he)[t]??t,n);let i={};return i.username=ue.userID,i.settingKey=t,i.value=n,je(async function(e){try{await fetch("https://goka.top:8080/setting",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});}catch(t){console.error("Error:",t);}}(i),300),e[t]=n,"padding"==t&&(window.padding=n),!0}}),fe={seatWidthPercent:.3,firstUpdateSeatUI:!1,scoreFrameTotal:10,scoreFrameIndex:0,paddingLeft:10,paddingRight:15,paddingTop:30,paddingBottom:0,paddingLeftTopExtra:0,selectStarted:!1,leftRightTop:20,stackCardAreaHeight:0,stackCardAreaY:0,MAX_SEAT_WIDTH:149,inPopFirstTarget:!1,unscaledWidth:146,unscaledHeight:172,MAX_HEIGHT:180,MAX_WIDTH:150,scale:1,selfSeatUiUnscaledHeight:178,rightBarWidth:221,seatUIs:[],cities:[]},ge={},ye={};function ve(e){Object.assign(ye,e);}const be=o("gameRecord",{}),we={},ke={tasks:{},shift:0,overdue:!0,async now(){if(!this.overdue)return Date.now()+this.shift;this.overdue=!1,this.delay("timer",(()=>{this.overdue=!0;}),18e5);const e=["https://worldtimeapi.org/api/timezone/Etc/UTC","https://timeapi.io/api/Time/current/zone?timeZone=UTC"];for(const n of e)try{const e=await fetch(n);if(!e.ok){console.error(`Error fetching time from ${n}: ${e.statusText}`);continue}const t=await e.json();let i;return t.utc_datetime?i=new Date(t.utc_datetime).getTime():t.currentTime&&(i=new Date(t.dateTime).getTime()),this.shift=i-Date.now(),i}catch(t){console.error(`Error fetching time from ${n}:`,t);continue}return m("使用当前电脑时间"),Date.now()+this.shift},loop(e,t,n,i=1/0,a){return this.clear(e),this.tasks[e]=setInterval((()=>{t(),--i<=0&&(this.clear(e),"function"==typeof a&&a());}),n),this.tasks[e]},delay(e,t,n){return this.clear(e),this.tasks[e]=setTimeout((()=>{this.clear(e),t();}),n),this.tasks[e]},set(e,t,n=this.now(),i=18e5){(async function a(){this.clear(e);const s=await this.now(),o=n-s;o>1?this.tasks[e]=setTimeout(a.bind(this),o<i?o:i):t();}).call(this);},clear(e){Array.isArray(e)||(e=[e]),e.filter((e=>this.tasks[e])).map((e=>(clearTimeout(this.tasks[e]),clearInterval(this.tasks[e]),this.tasks[e]=void 0,e)));}},xe=new Proxy({turn:0,round:0,phase:0,currentID:void 0,isGameStart:!0,isPassed:!1,spellSpace:{},domContainer:["temp","phase","round","turn","game","long"].reduce(((e,t,n)=>(e[t]=e[n]=[],e)),{}),end(e){(this.isGameStart&&!this.isPassed||!1===e)&&(this.isGameStart=!1,this.isPassed=!0,fe.seatUIs=[],fe.friendGeneral=0,Et(null),document.getElementById("task").click(),q.reset(),document.getElementById("createSkinIframe").style.display="none",document.querySelectorAll(".mizhu").forEach((e=>e.style.display="none")),console.warn("游戏已结束!")),e&&this.isPassed&&(this.isPassed=!1,this.turn=0,this.round=0,this.phase=0,this.currentID=void 0,this.spellSpace={},Se.reset(),console.warn("游戏已重置!游戏即将开始!"),z((()=>q.init())));},ready(e){this.end(!0),Se.cardList=e;let t=ge.cardIDsOrder.filter((t=>e.includes(t))),n=t.concat(e.filter((e=>!t.includes(e)))).filter(Boolean);Ie.init(n),De.init(n,"2-255"),Se.isGuoZhan=e.includes(1150),Se.isDouDiZhu=e.includes(13005),Se.isShanHeTu=e.includes(20100),function(){for(let e=0;e<2;e++)_t(0,e);for(let e=1;e<=3;e++)document.getElementById("type"+e).innerHTML="";for(let e of document.getElementsByClassName("order-body"))e.innerHTML="",e.title="一二三四五六七八"[e.id.slice(-1)]??e.title;for(let e in Ie.name){let t=document.getElementById("type"+Ae[[...Ie.name[e]][0]].type),n=document.createElement("button");n.id=e,n.className="cardType",n.innerText=e,n.onclick=()=>{Ie.queryone("name",e);},t.appendChild(n);}fe.seatUIs=[],ze(),Ke();}(),console.warn("牌堆初始化完成");},start(){!this.isGameStart&&Se.size&&(this.isGameStart=!0,this.isPassed=!1,console.warn("游戏开始!["+Se.seatIDs+"] > "+Se.mySeats),function(){for(let e=0;e<=7;e++){let t="or"+(e+1);document.getElementById(t).style.display="block";}}(),function(e){for(let t=7;t>=e;t--){let e="or"+(t+1);document.getElementById(e).style.display="none";}}(Se.size),Et(),De.draw());},enter(e,t,n){var i,a,s,o,l,r,d,c,u,p,h;if(e>0)this.turn=e,this.round=0,this.clear("turn"),document.getElementById("jinzhi").innerHTML="下一次锦织所需牌:1",1==e&&(this.clear("game"),this.start());else {0==t?(this.currentID=n,this.round++,this.phase=0,[7011,3090,2143,3271].forEach((e=>delete this.spellSpace[e])),document.getElementById("suit").innerText="",document.getElementById("boTu").innerText="",document.getElementById("result").innerHTML="",this.clear("round"),!0===ue.autoBotSwitch&&q.limit>0&&(null==(o=null==(s=null==(a=null==(i=q.gamescene)?void 0:i.topMenu)?void 0:a.areaServerLabel)?void 0:s.text)?void 0:o.includes("身份"))&&(this.currentID==(null==(p=null==(u=null==(c=null==(d=null==(r=null==(l=q.gamescene)?void 0:l.seatContainer)?void 0:r.seatUIs)?void 0:d.filter((e=>e.seat.currentHp>0)))?void 0:c.map((e=>e.seat.index)))?void 0:u.slice(-1))?void 0:p[0])?q.auto(3):this.currentID!=Se.mySeats[0]&&q.auto(!0))):this.phase++,this.clear("phase");let e=document.getElementById("phrase"),m=parseInt(null==(h=e.innerText.match(/\(([0-9])\)$/))?void 0:h[1]);this.phase==m?e.innerText=e.innerText.replace(/(回合)?(.{2,3})(阶段)? ?\(([0-9])\)$/,`$2>${["开始时","准备","判定","摸牌","出牌","弃牌","结束","结束时","结束后"][t]}($4)`):e.innerText=`${["回合开始时","准备阶段","判定阶段","摸牌阶段","出牌阶段","弃牌阶段","结束阶段","回合结束时","回合结束后"][t]} (${this.phase})`;}},clear(e,t,n){let i=this.domContainer[e];for(let a=i.length-1;a>=0;a--)void 0===n&&t!==i[a].SpellID&&i[a].count--,i[a].count>0&&(t!==i[a].SpellID||n!==i[a].SeatID)||(i[a].element.remove(),i.splice(a,1));}},{ownKeys:e=>Reflect.ownKeys(e.spellSpace),getOwnPropertyDescriptor:(e,t)=>Object.getOwnPropertyDescriptor(e.spellSpace,t),deleteProperty:(e,t)=>Reflect.deleteProperty(e.spellSpace,t),get:(e,t,n)=>t in e?e[t]:Reflect.get(e.spellSpace,t,n),set:(e,t,n,i)=>(t in e?e[t]=n:Reflect.set(e.spellSpace,t,n,i),!0)}),Se={cardList:[],seatIDs:[],orderIDs:[],mySeats:[],generals:{},shift:0,isShanHeTu:!1,isGuoZhan:!1,isDouDiZhu:!1,size:void 0,firstID:void 0,seatPos:()=>[0,1,2,3,4,5,6,7],reset(){this.cardList=[],this.seatIDs=[],this.orderIDs=[],this.mySeats=[],this.generals={},this.shift=0,this.isShanHeTu=!1,this.isGuoZhan=!1,this.isDouDiZhu=!1,this.size=void 0,this.firstID=void 0,this.dealCard=(e,t)=>{e=parseInt(e),this.orderIDs.includes(e)||(void 0===this.firstID&&(this.firstID=e,console.warn("[PubGsCMoveCard]先手位置:"+e)),this.orderIDs.push(e),t>0&&!this.mySeats.includes(e)&&(this.mySeats.length?this.mySeats.push(e):this.setMyID(e)),this.update(!1,this.orderIDs)),this.orderIDs.length==this.length&&(this.dealCard=()=>null);};},getOrder(e){let t=this.seatIDs.indexOf(this.firstID??this.seatIDs[0])%this.size,n=this.seatIDs.indexOf(parseInt(e));if(-1!==n)return (n-t+this.size)%this.size},getIndex(e){let t=(this.seatIDs.indexOf(this.mySeats[0])+this.shift)%this.size,n=this.seatIDs.indexOf(parseInt(e));if(n<0)return;let i=(n-t+this.size)%this.size;return this.seatPos()[i]},getID(e){let t=(this.seatIDs.indexOf(this.mySeats[0])+this.shift)%this.size,n=this.seatPos().indexOf(parseInt(e));if(n<0)return;let i=(n+t+this.size)%this.size;return this.seatIDs[i]},sequence(e){let t=this.seatIDs.indexOf(e);return -1===t?[]:this.seatIDs.slice(t).concat(this.seatIDs.slice(0,t))},update(e,t=this.orderIDs){if((t=t.slice()).length>this.seatIDs.length||t.length==this.seatIDs.length&&!1!==e)this.seatIDs=t,this.size=t.length;else if(e){for(let e=t.length;e<this.size;e++)t.push(((t[e-1]??-1)+1)%this.size);this.seatIDs=t,this.size=t.length;}this.seatIDs.forEach((e=>{let t=this.getOrder(e),n=document.getElementById(t+1);if(!n)return;let i=Se.name(e);n.style.setProperty("--No-content",`"${i}"`);}));},setMyID(e){var t;if(void 0!==e&&this.mySeats[0]!==e){let n=this.mySeats.indexOf(e);n>-1&&this.mySeats.splice(n,1),this.mySeats.unshift(e),(null==(t=this.generals[e])?void 0:t.length)&&this.generals[e].forEach(((e,t)=>_t(e,t)));}},setGeneral(e,t,n=0,i=!1){if(!ge.generalDict[t])return;this.generals[e]||(this.generals[e]=Array(this.isGuoZhan?2:1).fill(0)),this.generals[e][n]=t;let a=this.getOrder(e),s=document.getElementById(a+1);s&&(s.style.setProperty("--No-content",`"${Se.name(e)}"`),this.mySeats[0]!=e||i||_t(t,n));},find(e,t,n=!1){var i;return Array.isArray(t)||(t=[t]),null==(i=this.generals[e])?void 0:i.find((e=>t.find((t=>{var i;return n?null==(i=ge.skinMap[e])?void 0:i.has(t):e==t}))))},name(e,t){var n;let i=this.getOrder(e),a=null==(n=this.generals[e])?void 0:n.map((e=>ge.generalDict[e]));return ((null==a?void 0:a.some(Boolean))?a.map((e=>e||"暗")).join("丨"):"一二三四五六七八"[i]+"号位")+(t?"":"丨"+"一二三四五六七八"[i])}},Ie=new Proxy({name:{},color:Array.from({length:7},(()=>new Set)),number:Array.from({length:14},(()=>new Set)),query:new Set,select:{name:new Set,color:new Set,number:new Set},cards:[],QCARD:class{constructor(e,t,n,i,a){this.id=e,this.name=t,this.color=n,this.number=i,this.type=a,this.key=-1;}plot(e){let t=this._button;if(!t){if(t=this._button=document.createElement("button"),t.className=this.color<=2?"shoupai R":"shoupai",!this.id)return t;t.id="Qcard"+this.id,t.innerHTML=`<span>${Be(this.color)+_e(this.number)}</span><br>${this.name.substring(0,2)}`;}return this.key===e&&1!=e||(this.key=e,t.style.backgroundColor=0===e?"":1===e?"cyan":"#887",t.title=0===e?"牌堆":2===e?"弃牌堆":Ce.findKZ(this.id).zones.map((e=>{let[t,n,i]=e.split("-").map((e=>parseInt(e)));return De.name(n,t,null,i,i)})).join("/")),t}},[Symbol.iterator]:function*(){for(let e of this.cards)void 0!==e&&(yield e);},init(e){this.name={},this.color=Array.from({length:7},(()=>new Set)),this.number=Array.from({length:14},(()=>new Set)),this.type=Array.from({length:4},(()=>new Set)),this.query=new Set,this.select={name:new Set,color:new Set,number:new Set},this.cards=[],e.forEach((e=>{let{name:t,color:n,number:i,type:a}=Ae[e];t in this.name||(this.name[t]=new Set),this.name[t].add(e),this.color[n].add(e),this.number[i].add(e),this.type[a].add(e),3==n&&i>=2&&i<=9&&this.number[0].add(e),t.match(/^(冰|火|雷)?杀$/)&&this.color[Math.ceil(n/2)+4].add(e),this.cards[e]=new this.QCARD(e,t,n,i,a);}));},onquery(e,t){if(this.select[e].delete(t)){if(this.select[e].size)return Array.from(this[e][t]).forEach((e=>this.query.delete(e))),void this.draw()}else this.select[e].add(t);this.query=["name","number","color"].filter((e=>this.select[e].size)).reduce(((e,t)=>new Set(Array.from(this.select[t]).flatMap((e=>Array.from(this[t][e]))).filter((t=>!e.size||e.has(t))))),new Set),this.draw();},queryone(e,t){this.query=new Set(Array.from(this[e][t])),this.draw();},draw(){const e=document.getElementById("cardTypeDetail");if(e.innerHTML="",0==this.query.size)return;let t=new Set(De.unknown),n=new Set(De.qipai),i=ge.cardIDsOrder.filter((e=>this.query.has(e))).reduce(((e,i)=>(t.has(i)?e[0].push(i):n.has(i)?e[2].push(i):e[1].push(i),e)),[[],[],[]]);[0,1,2].forEach((t=>i[t].forEach((n=>e.appendChild(this.cards[n].plot(t))))));}},{get(e,t,n){return "number"==typeof t||"string"==typeof t&&!isNaN(t)?e.cards[t]:Reflect.get(...arguments)}}),We=class e{static label(t){if(e.groups.has(t))return e.groups.get(t);const n=e.LABELs.shift();return e.groups.set(t,n),n}constructor(t,n=null,i="12-255",a=null,s=null){var o;this._key=t,this.zone=i,this.id=n??(null==(o=this.next)?void 0:o.id)??this.key,this.next=a,this.prev=s,e.nodes.has(t)||e.nodes.set(t,new Set),e.nodes.get(t).add(this);}get head(){let e=this;for(;e.prev;)e=e.prev;return e}get end(){let e=this;for(;e.next;)e=e.next;return e}get key(){return this._key}set key(t){this._key!=t&&(e.nodes.get(this._key).delete(this),this._key=t,e.nodes.has(t)||e.nodes.set(t,new Set),e.nodes.get(t).add(this));}static get(t){return e.nodes.has(t)?Array.from(e.nodes.get(t)):[]}static init(t,n){return e.key=0,e.nodes=new Map,e.groups=new Map([[0,"?"]]),e.LABELs=Array.from({length:62},((e,t)=>String.fromCharCode(t+65))),t.map((t=>new e(0,t,n)))}toString(){return this.next?this.prev?this.key+"<"+this.next.toString():this.zone+":"+this.key+"<"+this.next.toString():"["+this.id+"]"+(this.key>0?Ae[this.id].ncn:"?")}plot(t){var n;if(this.key<0&&this.key%2==0&&this.next)return this.next.plot(t);let i=this._button;return i||(i=this._button=document.createElement("button"),i.className="shoupai"),i.disabled=this.key<=0&&this.key%2==0,(t||this.key!=(null==(n=null==i?void 0:i.dataset)?void 0:n.key)||this.key<=0&&e.label(this.key)!=i.innerHTML)&&(i.className="shoupai",i.id="card"+this.id,i.dataset.key=this.key,this.key>0?(i.classList.remove("G"),Ae[this.id].color>2?i.classList.remove("R"):Ae[this.id].color>0&&i.classList.add("R"),i.style.color="",i.style.fontSize="",i.title=new De("unknown").cards.has(this)?e.findKZ(this.id).zones.map((e=>{let[t,n,i]=e.split("-").map((e=>parseInt(e)));return De.name(n,t,null,i,i)})).join("/"):Ae[this.id].ncn,i.innerHTML=`<span>${Ae[this.id].cn}</span><br>${Ae[this.id].name.substring(0,2)}`):(i.classList.add("G"),i.innerHTML="?")),i}swap(e){if(!e||e==this)return this;for([this.key,e.key]=[e.key,this.key],[this.id,e.id]=[e.id,this.id],[this.next,e.next]=[e.next,this.next],this.next&&(this.next.prev=this),e.next&&(e.next.prev=e);e.prev&&e.prev.id!==e.id;)e.prev.id=e.id,e=e.prev;for(e.plot(!0),De.draw(e.zone),e=this;e.prev&&e.prev.id!==e.id;)e.prev.id=e.id,e=e.prev;return e.plot(!0),De.draw(e.zone),this}create(t){const n=new e(this.key,this.id,this.zone,this.next,this);return this.key=t,this.next&&(this.next.prev=n),this.next=n,this}delete(){let t=!1;if(this.next){let n=this.next;return this.key=n.key,this.id=n.id,this.next=n.next,n.next?n.next.prev=this:new De("unknown").cards.delete(n)&&(t=!0,this.prev&&new De("unknown").cards.add(this)),e.nodes.get(n.key).delete(n),t}return 0===this.key?(this.key=this.id,Ot(this.id,this.key),!0):null}destroy(t){let n=!1,i=this.key;for(;i<0;)this.delete()&&(n=!0),e.unpack(i)&&(n=!0),i=this.key;return this.key!=t&&(this.key=t??this.id,Ot(this.id,this.key)),this.prev?e.unpack(this.prev.key):(this.plot(!0),De.draw(this.zone)),n&&De.draw("unknown"),this}identify(t,n=null){if(null!==n&&console.count("REidentify"+n+">"+this),this.id==t)return this.key>0||(n&&(this.end.id=n),this.destroy()),this;let i,a=new Set([this.key]),s=[[this.key,[]]];for(;s.length>0;){let[n,o]=s.shift();if(i=e.find(n,t),i){o.concat(i).reduce(((e,t)=>e.swap(t).next),this);break}for(let t of e.get(n).filter((e=>e.next)))a.has(t.next.key)||(a.add(t.next.key),s.push([t.next.key,o.concat(t)]));}if(i){if(n){let e=this;for(e.id=n;e.next;)e=e.next,e.id=n;}return this.destroy(),this}return t>0?this.identify(0,t):(console.error("identify error: "+(t>0?t:n)+">"+this),null)}static move(t,n){return Array.isArray(t)||(t=[t]),null==t||t.forEach((e=>e.zone=n)),Array.from(new Set(null==t?void 0:t.map((e=>e.key)))).filter((e=>e<=0)).map((t=>e.unpack(t))).length?De.draw("unknown"):Array.from(new Set(null==t?void 0:t.map((e=>e.key)))).filter((e=>e>0&&Ie.query.has(e))).forEach((e=>{Ie[e].plot("2-255"==n?2:1);})),t}static pack(t,n,i){if(!((null==t?void 0:t.length)>1&&(null==t?void 0:t.every((e=>e)))))return;let a,s=new Set(t.map((e=>e.key)));if(1===s.size)return [...s][0];if(e.key=e.key-1,i){if(1===new Set(t.map((e=>e.head.zone))).size)return null;let n=Array.from(e.nodes.keys()).filter((e=>e<0));for(let t=0;t>=e.key;t--)if(!n.includes(2*t-1)&&!n.includes(2*t-2)){a=2*t-i;break}n.filter((e=>e>a)).sort(((e,t)=>e-t)).forEach((t=>{e.get(t).forEach((e=>{e.key=e.key-2,e.head.plot(!0);}));})),a=-i;}else a=2*e.key-(n?2:1);return t.forEach((e=>{e.create(a),new De("unknown").cards.delete(e),n||new De("unknown").cards.add(e.end);})),De.draw("unknown"),a}static unpack(t){if(t>0)return !0;const n=e.get(t);let i=new Set(n.map((e=>{var t;return null==(t=e.next)?void 0:t.key}))),a=new Set(n.map((e=>e.head.zone)));if(1===n.length||!a.has("1-255")&&(1===a.size||1===i.size&&0!==t)){e.groups.has(t)&&(e.LABELs.unshift(e.groups.get(t)),e.groups.delete(t));let i=n.map((e=>e.delete())).some(Boolean);return Array.from(new Set(n.filter((e=>e.prev)).map((e=>e.prev.key)))).forEach((t=>e.unpack(t))),n.filter((e=>!e.prev)).forEach((e=>e.plot(!0))),Array.from(a).forEach((e=>De.draw(e))),i}return !1}static find(t,n){let i=e.get(t).find((e=>e.id==n));if(void 0===i&&0!=t){let a=e.get(0).find((e=>e.id==n));a&&(i=e.get(t).find((e=>0==e.end.key)),void 0!==i&&a.swap(i.end));}return i}static findIDs(t,n=!1,i=new Set,a=new Set){return a.add(t),t>0||!n&&0==t?i.add(t):(n||t%2!=0)&&e.get(t).forEach((t=>{if(t.next){let s=t.next.key;a.has(s)||e.findIDs(s,n,i,a);}else n&&i.add(t.id);})),Array.from(i)}static findKZ(t,n=!1,i=new Set,a=new Set){let s=t;return !(s instanceof e)&&t>0&&(s=e.get(t)[0]),s instanceof e||(s=e.get(0).find((e=>e.id==t))),s instanceof e&&(n||0!=s.key?(a.add(s.head.zone),i.has(s.key)||(i.add(s.key),(s.key<0||n&&0==s.key)&&e.get(s.key).forEach((t=>{t!=s&&e.findKZ(t,n,i,a);}))),s.prev&&e.findKZ(s.prev,n,i,a)):(a.add(""),i.add(0))),{keys:Array.from(i),zones:Array.from(a)}}};s(We,"key",NaN),s(We,"nodes",new Map),s(We,"groups",new Map([[0,"?"]])),s(We,"LABELs",Array.from({length:50},((e,t)=>String.fromCodePoint(t<20?9312+t:t<35?12861+t:12942+t))));let Ce=We;const Ee=class e{static get paidui(){return Array.from(new Set(Array.from(Ce.get(0),(({id:e})=>e)).concat((e.obj["1-255"]??[]).map((({id:e})=>e)))))}static get qipai(){return (e.obj["2-255"]??[]).filter((({key:e})=>e>0)).map((({id:e})=>e))}static get unknown(){return Array.from(Ce.get(0),(({id:e})=>e))}static shoupai(t){return (e.obj["5-"+t]??[]).filter((({key:e})=>e>0)).map((({id:e})=>e))}constructor(t,n=5,i=null,a=null,s=null,o=null){var l;"number"==typeof t?(this.id=t,this.zone=n,0==this.id&&[0,1,2,3,9,12].includes(this.zone)&&(this.id=255),9==this.zone&&(this.zone=1),4==this.zone&&(this.id=this.id+"-"+(o||s||0)),8==this.zone&&(this.id="-"+(s||o||0)),this.zoneID=this.zone+"-"+this.id):"string"==typeof t?[this.zoneID,this.zone,this.id]=t.match(/(.*?)-(.*)/)??[t,t,""]:null==(l=null==t?void 0:t.every)||l.call(t,(e=>e instanceof Ce)),this.zoneID in e.obj||(e.obj[this.zoneID]=[]),this.pos=(65280===i||1===i?1:0===i||-1===i?-1:0)*(1==this.zone?-1:1),1!=n&&(this.pos=0),this.count=a;}show(t=[]){if(isNaN(Ce.key))return [];if(Array.isArray(t)||(t=[t]),0==t.filter((e=>e>0)).length)return [];let n=[],i=t.slice();if(-1==this.pos)n=this.cards.slice(0,t.length).map((e=>e.identify(i.shift())));else if(1==this.pos)n=this.cards.slice(-t.length).map((e=>e.identify(i.shift())));else if(1!=this.zone){let e=i.map((e=>Ce.findKZ(e,!0).keys));this.cards.slice().sort(((e,t)=>t.key-e.key)).some((t=>{if(0==i.filter((e=>e>0)).length)return !0;e.some(((e,a)=>{if(e.includes(t.key))return n[a]=t.identify(i[a]),e.length=0,i[a]=null,!0}));})),i.forEach(((e,t)=>{var i,a,s,o;if(e&&(n[t]=null==(i=this.cards.find((e=>0==e.id)))?void 0:i.identify(e),void 0===n[t]&&(n[t]=null==(a=this.cards.find((e=>0==e.key)))?void 0:a.identify(e)),void 0===n[t])){let i=Ce.get(e)[0];i?(n[t]=null==(o=null==(s=this.cards.find((e=>!n.includes(e))))?void 0:s.swap(i))?void 0:o.identify(e),console.error(this.zoneID+"SWAP Card ["+e+"] Shown")):(n[t]=new Ce(e,e,this.zoneID),12!=this.zone&&console.error(this.zoneID+" No Card ["+e+"] Shown"));}}));}return e.draw(this.zoneID),n}remove(t=[],n,i){if(isNaN(Ce.key))return [];Array.isArray(t)||(t=[t]),i&&(this.count=i);let a=[],s=t.slice();if(-1==this.pos)a=this.cards.splice(0,this.count);else if(1==this.pos)a=this.cards.splice(-this.count);else if(t.filter((e=>e>0)).length>0){let e=s.map((e=>Ce.findKZ(e,!0).keys));this.cards.slice().reverse().sort(((e,t)=>t.key-e.key)).some((t=>{if(0==s.filter((e=>e>0)).length)return !0;e.some(((e,n)=>{if(e.includes(t.key))return a[n]=this.cards.splice(this.cards.indexOf(t),1)[0],e.length=0,s[n]=null,!0}));})),s.forEach(((e,t)=>{var n;if(!e)return;let i=this.cards.findIndex((e=>0==e.id));if(-1===i&&(i=this.cards.findIndex((e=>0==e.key))),i>-1)a[t]=this.cards.splice(i,1)[0];else {let i=Ce.get(e)[0],s=this.cards.findIndex((e=>!a.includes(e)));i&&s>=0?(a[t]=null==(n=this.cards.splice(s,1)[0])?void 0:n.swap(i),console.error(this.zoneID+"SWAP Card ["+e+"] Moved")):(a[t]=new Ce(e,e,this.zoneID),12!=this.zone&&console.error(this.zoneID+" No Card ["+e+"] Moved"));}}));}else if(this.count==this.length||1==this.size)a=this.cards.splice(0,this.count);else if(1==this.zone||2==this.zone){var o=[...this.cards.filter((e=>e.key<=0)).sort(((e,t)=>t.key-e.key)),...this.cards.filter((e=>e.key>0))];if([11104,3488,862].includes(n)){var l=new Set(o.map((e=>e.key)));11104==n?l=new Set(Array.from(l).filter((e=>Ce.get(e).some((e=>{var t;return null==(t=Ie.type[3])?void 0:t.has(e.id)}))))):3488==n?l=new Set(Array.from(l).filter((e=>Ce.get(e).some((e=>{var t,n,i;return (null==(t=Ie.name["雷杀"])?void 0:t.has(e.id))||(null==(n=Ie.name["火杀"])?void 0:n.has(e.id))||(null==(i=Ie.name["冰杀"])?void 0:i.has(e.id))}))))):862==n&&(l=new Set(Array.from(l).filter((e=>Ce.get(e).some((e=>Ie.number[6].has(e.id))))))),o=o.filter((e=>l.has(e.key)));}a=o.slice(0,this.count),a.some((e=>e.key>0||e.key%2))&&Ce.pack(o,!0),a.forEach((e=>this.cards.splice(this.cards.indexOf(e),1)));}else Ce.pack(this.cards),a=this.cards.splice(0,this.count);return a.length!=this.count&&Array.from({length:this.count-a.length},(()=>(console.error(this.zoneID+" New Card Moved"),a.push(new Ce(0,0,this.zoneID))))),t.filter((e=>e>0)).length==this.count?t.forEach(((e,t)=>{var n;return null==(n=a[t])?void 0:n.identify(e)})):a.filter((e=>e.key>0)).length==this.count&&a.forEach((({id:e},n)=>{t[n]=e;})),e.draw(this.zoneID),a}add(t){if(!isNaN(Ce.key))return -1==this.pos?e.obj[this.zoneID]=Ce.move(t,this.zoneID).reverse().concat(this.cards):e.obj[this.zoneID]=this.cards.concat(Ce.move(t,this.zoneID)),e.draw(this.zoneID),t}set(t){isNaN(Ce.key)||(e.obj[this.zoneID]=Ce.move(t,this.zoneID),e.draw(this.zoneID));}get cards(){return e.obj[this.zoneID]??[]}get length(){var e;return (null==(e=this.cards)?void 0:e.length)??0}get size(){var e;return new Set((null==(e=this.cards)?void 0:e.map((e=>e.key)))??[]).size}static init(t,n){e.obj={unknown:new Set},e.obj[n]=Ce.init(t,n);}static draw(t){var n,i;if(isNaN(Ce.key))return;if(void 0===t)return void Object.keys(e.obj).filter((e=>"5"==e.split("-")[0])).forEach((t=>e.draw(t)));let a=null,s=null,[o,l,r]=(null==(n=t.split("-"))?void 0:n.map(Number))??[];if("unknown"==t)a="knownCards";else if(1==o)a="paiduiCards";else if(5==o)a=String(Se.getOrder(l)+1);else {if(4!=o||!(r in ge.markSpell))return;a="mark"+t;}s=document.getElementById(a);let d=Array.from(e.obj[t]??[]);if("unknown"==t&&(Array.from(new Set(d.map((e=>e.head.zone)))).forEach((t=>e.draw(t))),Ie.draw()),d&&0!=d.filter((e=>e.key>0||e.key%2!=0)).length){if(s)s.querySelectorAll(":scope>.shoupai").forEach((e=>e.remove()));else {if(4!=o)return;null==(i=document.getElementById(String(Se.getOrder(l)+1)))||i.insertAdjacentHTML("beforeend",`<div id="${a}" class="markedCard"><span class = 'mark'>${ge.markSpell[r]}</span></div>`),s=document.getElementById(a);}"1-255"!=t&&d.sort(((e,t)=>e.key>0&&t.key>0?0:t.key-e.key)),4==o&&(s=s.firstElementChild||s);var c=1;d.map((e=>e.plot("unknown"==t))).reverse().forEach(((e,n,i)=>{var a,l;if(e.dataset.key==(null==(l=null==(a=i[n+1])?void 0:a.dataset)?void 0:l.key))c++;else {c>1&&(e.style.fontSize="",e.innerHTML=`<span>${e.innerHTML}×</span><br>${c}`);let n=parseInt(e.dataset.key);if(n<0){let i=Ce.findIDs(n).sort(((e,t)=>e>0&&t>0?0:t-e));e.title=c+"张:"+i.map((e=>Ae[e].ncn)).join("/"),"1-255"!==t&&i.length<5&&(e.style.fontSize="",e.innerHTML=i.map((e=>{var t,n;return (null==(n=null==(t=Ce.get(e)[0])?void 0:t.plot())?void 0:n.outerHTML)||""})).join(""));}4==o?s.insertAdjacentElement("afterend",e):s.insertAdjacentElement("afterbegin",e),c=1;}}));}else s&&(s.classList.contains("markedCard")?s.remove():s.querySelectorAll(":scope>.shoupai").forEach((e=>e.remove())));}static name(e,t,n,i,a){var s;let o;if(isNaN(t))return "?";if(1==t&&0==e)return "牌堆(游戏开始前) ";if(1==t&&255==e)o="牌堆";else if(2==t)o="弃牌堆";else if(3==t)o="处理区";else if(4==t)o="标记";else if(5==t)o="手牌";else if(6==t)o="装备";else if(7==t)o="判定区";else if(8==t)o="弹窗";else {if(9==t)return "洗牌";10==t?o="交换临时区":11==t?o="弃牌临时区":12==t?o="回收区":0==t&&(o="游戏外");}return ([0,1,2,3,8,11,12].includes(t)?"":Se.name(e,!0))+([4,8].includes(t)?"["+(null==(s=ge.spellDict[8==t?a:i||a||0])?void 0:s.name)+"]":"")+(o??"zone"+t)+({0:"底",65280:"顶",65282:"*"}[n]??(n?":"+n:""))}};s(Ee,"obj",{unknown:new Set});let De=Ee;const Te={"乐不思蜀":"乐","兵粮寸断":"兵","八卦阵":"八卦","爪黄飞电":"爪黄+1","的卢":"的卢+1","绝影":"绝影+1","骅骝":"骅骝+1","赤兔":"赤兔-1","大宛":"大宛-1","紫骍":"紫骍-1","紫騂":"紫骍-1","诸葛连弩":"连弩","木牛流马":"木马","顺手牵羊":"顺手","万箭齐发":"万箭","五谷丰登":"五谷","无中生有":"无中","过河拆桥":"过拆","桃园结义":"桃园","无懈可击":"无懈","南蛮入侵":"南蛮","借刀杀人":"借刀","铁索连环":"铁索","随机应变":"随机","远交近攻":"远交","以逸待劳":"逸劳","知己知彼":"知己","逐近弃远":"逐近","洞烛先机":"洞烛","出其不意":"出其","水淹七军":"水淹","无懈可击·国":"国无","挟天子以令诸侯":"挟令","方天画戟":"方天戟","雌雄双股剑":"雌雄剑","青龙偃月刀":"青龙刀","丈八蛇矛":"丈八矛","朱雀羽扇":"朱雀扇","白银狮子":"白银狮","三尖两刃刀":"三尖刀","乌铁锁链":"乌铁链","五行鹤翎扇":"五行扇","太公阴符":"太公符","无双方天戟":"无双戟","束发紫金冠":"紫金冠","玲珑狮蛮带":"玲珑带","红棉百花袍":"百花袍","红锦百花袍":"百花袍","四乘粮舆":"四乘舆","铁蒺玄舆":"铁蒺舆","飞轮战舆":"飞轮舆","鬼龙斩月刀":"鬼龙刀","国风玉袍":"国风袍","赤炎镇魂琴":"赤炎琴","奇门八阵":"奇门阵","绝尘金戈":"绝尘+1","修罗炼狱戟":"修罗戟","虚妄之冕":"虚妄冕","赤血青峰":"赤青锋","赤血青锋":"赤青锋","鸾凤和鸣剑":"鸾凤剑","七彩神鹿":"神鹿-1","金乌落日弓":"金乌弓","刑天破军斧":"刑天斧","长安大舰":"长安-2","禅让诏书":"诏书","镔铁双戟":"镔铁戟","继往开来":"继往","攻守兼备":"攻守","进退自如":"进退","洪荒之力":"洪荒","同舟共济":"同舟","力争上游":"力争","逆水行舟":"逆水","撒豆成兵":"撒豆","移花接木":"移花","联军盛宴":"联军","调虎离山":"调虎","火烧连营":"火烧","勠力同心":"勠力","调剂盐梅":"调剂","声东击西":"声东","增兵减灶":"增兵","草木皆兵":"草木","唯我独尊":"独尊","弃甲曳兵":"弃甲","金蝉脱壳":"金蝉","故步自封":"自封","金鼓笙旗":"金鼓","党同伐异":"伐异","燎原之火":"燎原","八卦阵(复制)":"八卦","仁王盾(复制)":"仁王盾","藤甲(复制)":"藤甲","白银狮子(复制)":"白银狮","商鞅变法":"变法","真龙长剑":"真龙剑","传国玉玺":"玉玺","厚积形":"厚积","桎梏形":"桎梏","盈冲形":"盈冲","背水形":"背水","整肃形":"整肃","寸兵形":"寸兵","雄黄酒":"酒"},Ae=new Proxy({cards:{0:{name:"",type:0,color:0,number:0,ncn:"?",cn:"0",c:"",n:0}},[Symbol.iterator]:function*(){for(let e in this.cards)yield this.cards[e];}},{get:function(e,t){var n;if(t in e)return e[t];if(!e.cards[t])if(null==(n=ge.cardDict)?void 0:n[t]){let{name:n,type:i,color:a,number:s,subType:o}=ge.cardDict[t],l=Be(a),r=_e(s);e.cards[t]={name:{6:"火杀",7:"雷杀",11:"冰杀",12:"闪闪"}[o]||Te[n]||n,type:parseInt(i),color:parseInt(a),number:parseInt(s),ncn:n+l+r,cn:l+r,c:l,n:r};}else e.cards[t]=e.cards[0];return e.cards[t]}});function Be(e){return ["","♥","♦","♠","♣"][e]??""}function _e(e,t=!0){return t&&1==parseInt(e)?"A":{1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"J",12:"Q",13:"K"}[e]??""}async function Le(e,t){m("复制成功!");var n={1:"⒈",2:"⒉",3:"⒊",4:"⒋",5:"⒌",6:"⒍",7:"⒎",8:"⒏",9:"⒐",J:"Ⓙ",Q:"Ⓠ",K:"Ⓚ","+":" ",10:"⒑"};if(t&&Object.keys(n).forEach((t=>{e=e.replaceAll(t,n[t]);})),q.chat(e),window.clipboardData&&window.clipboardData.setData)return window.clipboardData.setData("Text",e);if(document.queryCommandSupported&&document.queryCommandSupported("copy")){var i=document.createElement("textarea");i.textContent=e,i.style.position="fixed",document.body.appendChild(i),i.select();try{return document.execCommand("copy")}catch(a){return console.warn("Copy to clipboard failed.",a),prompt("Copy to clipboard: Ctrl+C, Enter",e)}finally{document.body.removeChild(i);}}}function Oe(e,t,n,i){var a;if(null==document.getElementById("sec"+e)){let t=document.getElementById("lottery");const n=document.createElement("div"),a=document.createElement("div");a.innerHTML=ge.secId[e].Name+" 次数:"+i+"<br>",a.id="sec"+e+"+times",n.id="sec"+e,n.append(a),t.append(n),t.append(document.createElement("hr"));}if(void 0!==document.getElementById("sec"+e)&&null==document.getElementById(e+"+"+t)){document.getElementById("sec"+e+"+times").innerHTML=ge.secId[e].Name+" 次数:"+i+"<br>";let s=document.getElementById("sec"+e);const o=document.createElement("div");o.className="suit";const l=document.createElement("span"),r=document.createElement("span");l.innerText=(null==(a=ge.goodsID(t))?void 0:a.name)+" * ",r.innerText=n,l.id=e+"+"+t,r.id=e+"+"+t+"+number",o.append(l),o.append(r),s.appendChild(o);}else if(void 0!==document.getElementById(e)&&null!=document.getElementById(e+"+"+t)){document.getElementById("sec"+e+"+times").innerHTML=ge.secId[e].Name+" 次数:"+i+"<br>";let a=document.getElementById(e+"+"+t+"+number"),s=parseInt(a.innerText);s+=n,a.innerText=s;}}function Re(e){let t=document.getElementById("lastUseCard");const n=document.createElement("div");for(const a of e){if("0"==a)continue;var i=document.createElement("button");i.className=Ae[a].color<=2?"shoupai R":"shoupai";let e=document.createElement("span");e.innerText=Ae[a].cn,i.appendChild(e),i.appendChild(document.createElement("br")),i.innerHTML+=Ae[a].name.substring(0,2),n.append(i);}t.innerHTML=n.innerHTML;}const Ge=new MutationObserver((e=>{e.forEach((e=>{const t=e.target,n=document.getElementById(t.id),i=document.getElementById("s"+t.id);if(i&&n&&("childList"===e.type||"attributes"===e.type)){const e=t.innerHTML;if(i.dataset.lastContent!==e){if(i){const e=t.cloneNode(!0);i.innerHTML=e.innerHTML,Pe(i);}i.dataset.lastContent=e;}}}));})),Me={attributes:!0,childList:!0,subtree:!0};function Pe(e){e&&e instanceof HTMLElement&&(e.scrollHeight>40?e.classList.add("show-ellipsis"):e.classList.remove("show-ellipsis"));}function je(e,t){let n;return function(...i){clearTimeout(n),n=setTimeout((()=>e.apply(this,i)),t);}}const Ne=je((()=>{requestAnimationFrame((()=>{document.querySelectorAll(".sorder-body").forEach((e=>{Pe(e);}));}));}),500);function ze(){const e=document.getElementById("seatUI");for(let t of fe.seatUIs)if(t.posY&&t.posX&&void 0!==t.actualSeatID)if(null==document.getElementById("sor"+t.actualSeatID)){const n=document.createElement("div");n.className="sorderContainer",n.id="sor"+t.actualSeatID,n.style.top=t.posY+"px",n.style.left=t.posX+"px",n.style.width=(fe.unscaledWidth+fe.paddingRight)*fe.scale+"px";const i=document.createElement("div");i.className="sorder-body",i.classList.add("sNo"+t.actualSeatID),i.id="s"+t.actualSeatID,n.appendChild(i);const a=document.getElementById(t.actualSeatID);a&&(Ge.observe(a,Me),e.appendChild(n));}else {const e=document.getElementById("sor"+t.actualSeatID);e.style.top=t.posY+"px",e.style.left=t.posX+"px",e.style.width=(fe.unscaledWidth+fe.paddingRight)*fe.scale+"px";}if(0==fe.seatUIs.length){Ge.disconnect();for(let e=1;e<=8;e++){const t=document.getElementById("sor"+e);t&&t.remove();}}}async function Ue(e,t){for(let i of e){const{x:e,y:t}=ge.Rcity[i.id],n=fe.centerX+e*SystemContext.gameScale/window.devicePixelRatio+"px",a=fe.centerY+t*SystemContext.gameScale/window.devicePixelRatio+"px";if(null==document.getElementById("city"+i.id+i.event)){const e=document.createElement("div");if(e.id="city"+i.id+i.event,e.className="city",e.style.position="absolute",e.style.fontSize="15px",e.style.left=n,e.style.top=a,void 0!==ge.Rfight[i.event]){let t=[];for(let e of ge.Rfight[i.event].generals){let n=e.start?"[先行]":"",[i,a]=$e(e,we.difficulty);a?t.push('<span style="color: rgb(240, 65, 85); font-weight: bolder">'+e.generalname+n+" "+i.join(" ")+"</span>"):t.push(e.generalname+n);}e.innerHTML=t.join("<br>").replace(/\n/g," ")+"<hr>"+ge.Rfight[i.event].get.replace(/\n/g,"<br>");}else {let t=[];for(let e=1;e<4;e++){let n=i.event+e.toString(),a=[];if(ge.Rchoose[n])if(ge.Rchoose[n].generals)for(let e of ge.Rchoose[n].generals){let t=e.start?"[先行]":"",[n,i]=$e(e,we.difficulty);i?a.push('<span style="color: rgb(240, 65, 85); font-weight: bolder">'+e.generalname+" "+t+n.join(" ")+"</span>"):a.push(e.generalname+t);}else a.push(ge.Rchoose[n].lost)&&a.push("");t.push(a);}e.innerHTML=(ge.Rchoose[i.event+"1"]?(""==ge.Rchoose[i.event+"1"].lost?"":t[0].join("<br>").replace(/\n/g," ")+"<hr>")+ge.Rchoose[i.event+"1"].get.replace(/\n/g,"<br>"):"")+(ge.Rchoose[i.event+"2"]?"<hr>"+(""==ge.Rchoose[i.event+"2"].lost?"":t[1].join("<br>").replace(/\n/g," ")+"<hr>")+ge.Rchoose[i.event+"2"].get.replace(/\n/g,"<br>"):"")+(ge.Rchoose[i.event+"3"]?"<hr>"+(""==ge.Rchoose[i.event+"3"].lost?"":t[2].join("<br>").replace(/\n/g," ")+"<hr>")+ge.Rchoose[i.event+"3"].get.replace(/\n/g,"<br>"):"");}document.getElementById("rogueUI").appendChild(e);}else {const e=document.getElementById("city"+i.id+i.event);e.style.left=n,e.style.top=a;}}const n=e.map((e=>"city"+e.id+e.event));document.querySelectorAll("div.city").forEach((e=>{n.includes(e.id)||e.remove();}));}function He(e,t="点击复制",n=!0,i=!1,a=null){let s=document.createElement("button");return s.className="calRes",s.title=t,s.disabled=i,s.innerText=e,s.onclick=()=>{Le(e,n),s.innerText="复制成功",setTimeout((()=>{s.textContent=e;}),500);},s}async function qe(e){let t=e.slice().sort(((e,t)=>e-t)),n=[];!function e(i,a,s){if(13!==s){if(!(s>13))for(let n=a;n<t.length;n++)n>a&&t[n]===t[n-1]||(i.push(t[n]),e(i,n+1,s+t[n]),i.pop());}else n.push(i.slice());}([],0,0);let i=document.getElementById("result");i.innerHTML="";for(let a of n.sort(((e,t)=>t.length-e.length)))if(i.appendChild(He(a.map((e=>_e(e,!1))).join("+"))),i.children.length>=15)break;""===i.innerHTML&&(i.innerHTML='<span class="textRes">【资援】无解!</span>');}async function Qe(e,t){function n(e,t,i,a,s){if(i.length!==s+1){for(let o=a;o<e.length;o++)o>a&&e[o]===e[o-1]||(i.push(e[o]),i[0]+=e[o],n(e,t,i,o+1,s),i[0]-=i.pop());return t}t.push([...i,...i.reduce(((e,t)=>(e.splice(e.indexOf(t),1),e)),e.slice())]);}let i=document.getElementById("result");if(i.innerHTML="",!(null==e?void 0:e.length)||!(null==t?void 0:t.length))return;let a=Math.max(e.length,t.length);e.sort(((e,t)=>e-t)),t.sort(((e,t)=>e-t));for(let l=2;l<=a;l++){let s=n(e,[],[0],0,l);n(t,[],[0],0,l).forEach((e=>s.forEach((t=>{e[0]>t[0]&&e.slice(1,l+1).every((e=>!t.slice(1,l+1).includes(e)))&&(a<3||Array.from({length:l}).some(((n,i)=>e[i+1]<t[i+1])))&&i.appendChild(He(e.slice(1,l+1).map((e=>_e(e)))+"→"+t.slice(1,l+1).map((e=>_e(e))),"点击复制",!1));}))));}let s=Array.from(new Set(t)),o=Array.from(new Set(e));s.forEach((e=>{let t=o.filter((t=>t<e));t.length&&i.appendChild(He(_e(e)+"→"+t.map((e=>_e(e))).join("/"),"点击复制",!1));})),""===i.innerHTML&&(i.innerHTML='<span class="textRes">【易城】无法交换!</span>');}async function Ke(e){var t,n,i;if(!(null==e?void 0:e.allData))return fe.cities=[],Ue(fe.cities),document.getElementById("centerUI").classList.remove("show"),void document.getElementById("centerUI").classList.add("hide");const a=document.getElementById("centerUI");a.classList.remove("hide"),a.classList.add("show");let s=e.allData,o=s.shopData,l=s.chapterData,r=s.generalpool;if(o){o.bShow=!0;let e=[];if(o.itemId&&ge.Rplot)for(let t of o.itemId)ge.Rplot[t]&&e.push(ge.Rplot[t].name);!function(e){var t=document.getElementById("storeDetail");t.innerText="",0==e.length&&(e=["暂无集市数据"]);for(let n of e){let e=document.createElement("button");e.className="storeDetail",e.innerText=n,t.append(e);}}(e);}if(r&&r.general_change&&r.general_change.length>0){h(`小抄提示:可换将为${r.general_change.map((e=>ge.generalDict[e]||`Unknown (${e})`)).reverse().join(", ")}`,"acTooltip",1e4,"green",null,!0);}let d=s.seasonData,c=d&&d.difficulty;c&&(we.difficulty=c),we.general=(null==(n=null==(t=s.gameData)?void 0:t.myGeneral)?void 0:n.uGeneralId)??0,we.itemId=(null==(i=s.gameData)?void 0:i.itemId)??[],l&&l.locations&&(fe.cities=l.locations.map((e=>({id:e.location,event:e.event}))),ge.Rcity&&Ue(fe.cities));}window.addEventListener("resize",Ne);const Ve=(()=>{class e{constructor(){this.id=0,this.goods_id=0,this.goods_cnt=0,this.price_type=0,this.price_num=0,this.stock=0,this.buy_limit=0,this.ori_price=0,this.all_bought_cnt=0,this.self_bought_cnt=0;}Read(e){this.id=e.readUnsignedByte(),this.goods_id=e.readUnsignedInt(),this.goods_cnt=e.readUnsignedInt(),this.price_type=e.readUnsignedByte(),this.price_num=e.readUnsignedInt(),this.stock=e.readUnsignedInt(),this.buy_limit=e.readUnsignedByte(),this.ori_price=e.readUnsignedInt();}UpdateDate(e){this.goods_id=e.goods_id,this.goods_cnt=e.goods_cnt,this.price_type=e.price_type,this.price_num=e.price_num,this.stock=e.stock,this.buy_limit=e.buy_limit,this.ori_price=e.ori_price,this.all_bought_cnt=e.all_bought_cnt,this.self_bought_cnt=e.self_bought_cnt;}}let t=!1;return async n=>{if(t)return null;const i=document.querySelectorAll('.left input[type="checkbox"]');let a=function(t){t.position=0;let n=[],i=t.readBoolean();if(t.Data.length<=1)return null;let a=t.readUnsignedInt(),s=t.readUnsignedInt(),o=new Date(1e3*a).toISOString().slice(5,16).replace("T"," "),l=new Date(1e3*s).toISOString().slice(5,16).replace("T"," "),r=t.readUnsignedInt();for(let d=0;d<r;d++){let i=new e;i.Read(t);let a=n.find((e=>e.id==i.id));a?a.UpdateDate(i):n.push(i);}r=t.readUnsignedInt();for(let e=0;e<r;e++){let e=t.readUnsignedInt(),i=t.readUnsignedInt(),a=n.find((t=>t.id==e));a&&(a.all_bought_cnt=i);}r=t.readUnsignedInt();for(let e=0;e<r;e++){let e=t.readUnsignedInt(),i=t.readUnsignedInt(),a=n.find((t=>t.id==e));a&&(a.self_bought_cnt=i);}return {commonVo:n,start_time:a,end_time:s,start:o,end:l,next:i}}(n);if(!a)return null;let{commonVo:s,start_time:o,end_time:l,start:r,end:d,next:c}=a;if(c)return;o=1e3*(o-28800);let u=s.map((({goods_id:e,goods_cnt:t,price_type:n,price_num:a,stock:s,buy_limit:l,ori_price:c,all_bought_cnt:u,self_bought_cnt:p},h)=>{var m;let f=a+["","通用元宝","元宝","银两"][n]+": "+(null==(m=ge.goodsID(e))?void 0:m.name)+(t>1?"*"+t:""),g=`${r} ~ ${d} 共${s}个`,y=u>=s||p>=l;return Object.assign(i[h].dataset??{},{goods_id:e,start_time:o,goods:f}),{goods_id:e,goods:f,title:g,disabled:y}})),p=document.getElementsByClassName("right")[0];p&&(p.innerHTML=u.map((({goods:e,title:t,disabled:n})=>`<span class="secKillDetailText${n?" gray":""}" title="${t}">${e}</span>`)).join(""));let h=p.start-6e4;return h>Date.now()&&ke.set("miaosha",(()=>{m(`${r}\n秒杀即将开始!\n`+u.map((({goods:e})=>e)).join("\n")),t=!0,setTimeout((()=>{t=!1;}),66666);}),h),n.Size==n.position}})();let Je=["巳蛇","灵动","八门","盾弓","智迟","持盈","卫主","不死","刚烈","觉醒","悲鸣","断肠","节命","先机","悲鸣","忘魂","雅士","挥泪","不屈","封冻","灵躯","武魂","已蛇"];const Fe={getspell:0,getspell_ZD:1,getspell_KN:2,getspell_EM:3,getspell_LY:4};function $e(e,t){let n=[],i=!1,a=function(e){switch(Math.floor((e-1)/5)){case 0:default:return "getspell";case 1:return "getspell_ZD";case 2:return "getspell_KN";case 3:return "getspell_EM";case 4:return "getspell_LY"}}(t);const s=Fe[a];let o=Object.keys(Fe).filter((e=>Fe[e]<=s)).map((t=>e[t])).filter(Boolean).join(";");o=null==o?void 0:o.split(";").map((e=>{var t;return (null==(t=ge.spellDict[e])?void 0:t.name)||"无收录技能"}));for(let l of o)Je.includes(l)&&(n.push(l),i=!0);return [n,i]}var Ze=[],Xe=[],Ye={290:"推锋",766:"匡弼"},et=[],tt={},nt={},it={},at=new Map,st=()=>({name:"加载中"}),ot=[],lt={},rt={},dt={},ct={},ut={},pt={};async function ht(e){return new Promise((t=>JSZipUtils.getBinaryContent("test.sanguosha.com"===window.location.host?"https://test.sanguosha.com/h5/res/config//Config_w.sgs":"https://web.sanguosha.com/220/h5_2/res/config/Config_w.sgs?v="+window.resourceVersion,((n,i)=>JSZip.loadAsync(i).then((async n=>{var i,a,s=(a=new Date).getFullYear().toString()+(a.getMonth()+1).toString().padStart(2,"0")+a.getDate().toString().padStart(2,"0");let d=["sys_playcard","cha_spell","character","hd_roguelike","hd_1v1_rogue","sys_h5_shop","sys_gs_dbs_fs_goodsbaseinfo","sys_server_item_drops_templete_config","sys_h5_dbs_clientserverpub","cha_gs_dbs_fs_skininfo","gn_dbs_quest","sys_h5_quest","sys_h5_task","ff_dbs_lottery_new","ff_exchange_new","sys_treasure_chest","gn_dbs_giftbag","ff_tiangong","ff_chess"];var c=await Promise.all(d.map((e=>n.file(e+".sgs").async("arraybuffer").then((e=>JSON.parse((new TextDecoder).decode(new Zlib.Gunzip(CtrUtil.Ctr.Ofb_Dec(e)).decompress()))))))).then((e=>d.reduce(((t,n,i)=>(t[n+".sgs"]=e[i],t)),{})));function u(e,t){if("object"!=typeof e)return e;let n={};for(let i in e){n[t.get(i)||i]=e[i];}return n}var p,m=new Map([["id","编号"],["name","名称"],["time","时间"],["desc","说明"],["reward","奖励"],["price","价格"],["max","限购"],["effect","效果"],["info","信息"]]),f=c["sys_gs_dbs_fs_goodsbaseinfo.sgs"].root.goodslist.goods.reduce(((e,t)=>(e.set(t.a,t),e)),new Map),g=c["sys_gs_dbs_fs_goodsbaseinfo.sgs"].root.abbreviation.field.reduce(((e,{Short:t,Long:n})=>(e.set(t,n),e)),new Map),y=c["sys_server_item_drops_templete_config.sgs"].AllDrop.DropTemplete.DropGroup.DropItem.reduce(((e,t)=>(e.has(t.a)||e.set(t.a,[]),e.get(t.a).push(t.d),e)),new Map);p={},st=function(e){if(e=parseInt(e),p[e])return p[e];let t=u(f.get(e),g),n=c["sys_h5_shop.sgs"].root.itemtips.find((({a:t})=>t==e)),i=t.usedeffect&&k(t.usedeffect);return p[e]={...t,...n&&{info:n.e},...i&&{effect:i}}};var v={};function b(e){var t;let n=null==e?void 0:e.replace(/([^0-9,\.])/g,"").split(",").map((e=>parseInt(e)));return (null==n?void 0:n.length)<2?e:(v[n[0]]??(v[n[0]]=null==(t=f.get(n[0]))?void 0:t.b)??n[0])+(parseInt(n[1])>1?"*"+n[1]:"")}var w={};function k(e){let t=parseInt(e);if(1e3!=t&&Math.abs(t)>0)return w[t]??(w[t]=(y.get(Math.abs(t))??[]).map((e=>{var t;return (null==(t=f.get(e))?void 0:t.b)??k(e)})).join(t>0?"/":"&"))}et=c["cha_spell.sgs"].GameSpells.spell.reduce(((e,{a:t,c:n,o:i})=>{var a,s;let o={name:n,spellid:t,desc:(null==(s=null==(a=null==i?void 0:i.replace(/<[^\<\>]*>/g,""))?void 0:a.replace(/#.*/g,""))?void 0:s.replace(/[;\n]+$/g,""))||""};return (o.desc.includes("暗置")||o.desc.includes("扣置")||o.desc.includes("移出"))&&(Ye[t]=Te[o.name]??o.name),e[t]=o,e}),[]);let x=c["sys_playcard.sgs"].abbreviation.reduce(((e,{Short:t,Long:n})=>(e.set(t,n),e)),new Map);if(Ze=c["sys_playcard.sgs"].GamePlayCards.card.map((e=>u(e,x))).reduce(((e,t)=>{var n,i;return e[t.id]={...t,name:t.name??(null==(n=et[t.spellId])?void 0:n.name),desc:null==(i=et[t.spellId])?void 0:i.desc},e}),[]),Xe=c["sys_playcard.sgs"].GamePlayCards.card.sort(((e,t)=>e.c-t.c||e.d-t.d||e.h-t.h||e.m-t.m||e.g-t.g||e.f-t.f||e.a-t.a)).map((({a:e})=>e)),at=new Map(c["cha_gs_dbs_fs_skininfo.sgs"].generalskin.items.item.map((e=>[String(e.a),[e.a,e.c,e.v||e.q,e.r]])).reverse()),nt=c["cha_gs_dbs_fs_skininfo.sgs"].root.manu.item.reduce(((e,{skinID:t,name:n,skinlevel:i,dongPoint:a})=>{let s=parseInt(t/100);return e[s]||(e[s]={}),e[s][t]={level:{"0,0":"普通","0,1":"稀有","0,2":"史诗","0,3":"传说","0,4":"限定"}[i]||"未知",name:n,state:void 0!==a},e}),{}),Object.entries(c["cha_gs_dbs_fs_skininfo.sgs"].generalskin.speciaSkin.filter((e=>String(e.skinID).includes("_"))).reduce(((e,t)=>{let[n,i]=t.skinID.split("_");return e[n]?e[n].push(i):e[n]=[i],e}),{})).forEach((([e,t])=>{var n,i;null==(n=at.get(e))||n.push(t);let a=parseInt(e/100),s=null==(i=nt[a])?void 0:i[e];s&&(delete nt[a][e],t.forEach((t=>{nt[a][e+"_"+t]={...s,name:s.name+t};})));})),tt=c["character.sgs"].GameCharacters.character.reduce(((e,{a:t,ai:n,b:i})=>(e[t]=(n||"")+(null==i?void 0:i.replaceAll("&","")),e)),{}),c["character.sgs"].GameCharacters.character.forEach((({a:e,v:t})=>{if("string"!=typeof t)return void(it[e]=new Set([e]));let n=[e,...t.split(";").map((e=>parseInt(e)))],i=n.find((e=>e in it));if(i){let e=it[i];n.filter((t=>!e.has(t))).forEach((t=>(it[t]=e).add(t)));}else {let e=new Set(n);n.forEach((t=>it[t]=e));}})),pt=c["character.sgs"].WuJiangs.Spgroup.reduce(((e,t)=>{const n=t.spgenerals?t.spgenerals.split(",").map(Number):[];return n.forEach((t=>{e[t]=new Set(n);})),e}),{}),ut=c["ff_tiangong.sgs"].root.Common.reduce(((e,t)=>(e[t.Id]=t,e)),{}),"string"!=typeof e){!async function(e,t){let n=o("CDK");n||(n=[]);let i=e.filter((e=>!n.includes(e)));await H(1e4);for(let o of i)h(`找到兑换码!<br>${o}<br>点击该通知即可兑换`,"ac-tooltip",1e4,"green",(function(){!n.includes(o)&&n.push(o),l("CDK",n),Y(o);}));var a=document.getElementById(t);a.innerText="",0==e.length&&"CDK"==t&&(e=["所有兑换码已经兑换","迟点再看看吧"],r("CDK"));for(let o of e){let e=document.createElement("button");e.className="calRes",e.innerText=o,e.onmousedown=function(){Y(o),e.innerText="已兑换",setTimeout((()=>{e.textContent=o;}),"500");},a.append(e);var s=document.createElement("br");a.append(s);}}(c["gn_dbs_giftbag.sgs"].giftsys.gifts.giftsItem.Item.filter((e=>e.allServerWord&&!e.platform&&(!e.level||"[min-0][max-201]"==e.level)&&e.endtime>=s&&e.begintime<=s)).sort(((e,t)=>e.endtime-t.endtime)).map((({c_allServerWord:e,allServerWord:t})=>e||t)).filter(Boolean),"CDK");}if(Object.assign(ge,{cardDict:Ze,cardIDsOrder:Xe,markSpell:Ye,spellDict:et,generalDict:tt,skinDict:nt,skinMap:it,bigSkin:at,goodsID:st,secId:ut}),"string"==typeof e&&"roge"!=e||async function(n,i){lt=n.Root.Level.reduce(((e,{cityID:t,cityname:n,citypic:i,citycoordinate:a,startshow:s})=>{let[o,l]=a.split(",").map(Number);return e[t]={x:o,y:-l,boss:s,name:n??(null==i?void 0:i.replace(/^city_([0-9])_(.+)*\.png$/,((e,t,n)=>({"1jjy":"将军营","1jl":"箭楼","1wl":"望楼","1fht1":"烽火台(左)","1ck":"仓库","1yf":"营房","1fht2":"烽火台(右)","1sjc":"神君祠","2xsj":"西市集","2wl":"望楼","2dsj":"东市集","2wk":"武库","2hgl":"挥公陵","2sdg":"舜帝宫","2gcm":"干城门","2ywt":"演武台","3ds":"东市","3gg":"桂宫","3bg":"北宫","3wyg":"未央宫","3wk":"武库","3mgg":"明光宫","3clg":"长乐宫","4js":"金市","4lyt":"凌云台","4hly":"华林园","4tc":"太仓","4tx":"碳墟","4smm":"司马门","4wk":"武库","4sz":"石址","5my":"梅园","5fhl":"凤凰林","5lt":"龙亭","5wk":"武库","5wl":"望楼","5cm":"城门","5ql":"谯楼","5clg":"陈留宫","6jkg":"建康宫","6ql":"戚里","6wl":"望楼","6ycq":"邺城桥","6ywt":"演武台","6sg":"书馆","6wfl":"万福楼","6wk":"武库","6tqt":"铜雀台"}[t+n]??e))))},e}),{}),n.Root.Tactics.forEach((({plot:e,plotname:t,plotdesc:n,school:i,money:a,level:s})=>{ot[e]={name:t.replaceAll("·",""),desc:n.replaceAll(" ",""),school:i,money:a,level:s,type:2};})),n.Root.Spell.forEach((({id:e,spellid:t,money:n,level:i})=>{var a,s;ot[e]={name:null==(a=et[t])?void 0:a.name,desc:null==(s=et[t])?void 0:s.desc,spellid:t,money:n,level:i,type:3};})),n.Root.Card.forEach((({id:e,cardid:t,isequip:n,money:i,level:a})=>{var s=Ze[t];ot[e]={name:{6:"火杀",7:"雷杀",11:"冰杀",12:"闪闪"}[s.subType]??s.name,desc:s.desc,color:s.color,number:s.number,money:i,level:a,type:4+n,rType:100*(10*s.type+s.subType)+n};}));var a,s=n.Root.Roundid.reduce(((e,{useSeason:t})=>t)),o=new Map,l=n.Root.Text.reduce(((e,{ID:t,text:n})=>(e[t]=n,e)),[]);n.Root.General=(a=n.root.abbreviation.reduce(((e,{Short:t,Long:n})=>(e.set(t,n),e)),new Map),n.Root.General.map((e=>u(e,a)))),n.Root.Adventure.forEach((e=>{e.chapname=l[e.chapname]??e.chapname;}));let r=n.Root.RewardGroup.reduce(((e,{reward:t,rewarddesc:n,allreward:i,abandonmoney:a})=>{var s,o;return e[t]=(a?a+"铜币/":"")+(null==(o=null==(s=null==i?void 0:i.split(";"))?void 0:s.flatMap((e=>null==e?void 0:e.split(","))))?void 0:o.map((e=>["随机","普通","稀有","史诗","传说"][e])).join("/"))+n.replace("多选一","自选"),e}),n.Root.Other.reduce(((e,{reward:t,rewardname:n})=>(e[t]=n,e)),{}));var d=n.Root.Chapter.reduce(((e,{seasonID:t,chapter:n,cityName:i,bosslocation:a,location:s})=>(s.split(";").forEach((a=>{e[a]=`${t}-${n}${i}`;})),e[a]=`${t}-${n}${i}BOSS`,e)),{}),c=n.Root.General.reduce(((e,t)=>(e[t.generalgroup]||(e[t.generalgroup]=[]),e[t.generalgroup].push(t),t.generalname=t.generalname.replace("&",""),e)),{});n.Root.General.forEach((e=>{e.GeneralRank||(e.GeneralRank=0),e.JumpStage&&(e.next=(([e,t])=>c[e][t-1]??c[e][0])(e.JumpStage.split(";"))),e.info={general:e.generalname,hp:e.hp,maxhp:e.maxhp,card:e.cardnum,draw:e.draw,sha:1+e.exshatimes,armor:e.armor,getarmor:e.getarmor,...e.next?{next:e.next.generalname}:{}},e.spells=["","_ZD","_KN","_EM","_LY"].flatMap(((t,n)=>{var i;return ((null==(i=e["getspell"+t])?void 0:i.split(";"))??[]).map((e=>et[e])).filter(Boolean).map((e=>({...e,level:n})))})),e.spell=e.spells.map((({name:e})=>e)).join(","),e.cards=["","_ZD","_KN","_EM","_LY"].flatMap(((t,n)=>{var i,a;return [...(null==(i=e["carddesc"+t])?void 0:i.split(";"))??[],...(null==(a=e["equip"+t])?void 0:a.split(";"))??[]].map((e=>Ze[e])).filter(Boolean).map((({id:e})=>({id:e,ncn:Ae[e].ncn,level:n})))})),e.card=e.cards.map((({ncn:e})=>e)).join(",");})),dt=n.Root.Fight.reduce(((e,t)=>{function n(e,i,a=!1){e&&(t.fight+=g(e.info),t.lost+=(e.start?"[先手]":"")+e.generalname,e.next?(t.lost+=">",e.next.stage=i,e.next.info.pre=e.generalname,t.generals.push(e.next),n(e.next,i+1,a)):a||(t.fight+="+",t.lost+=" "));}if(t.generals=[...c[t.Ggroup]??[]],t.fight="",t.lost="",t.startnum){let e=t.generals.find((e=>e.generalID==t.startnum));e&&(e.start=!0);}return t.generals.forEach(((e,t,i)=>n(e,1,t==i.length-1))),t.get=t.itemgroup+"铜币\n"+(t.rewarditem?String(t.rewarditem).split(";"):[]).concat(String(t.reward).split(";")).map((e=>r[e])).join("\n"),t.text=l[t.text]??t.text,t.name=l[t.name]??t.name,e[t.fightID]=t,e}),[]);for(let e in c)e in dt||(dt[e]={generals:c[e]});if(rt=n.Root.Choose.reduce(((e,t)=>{var i,a,s;return 7==t.type?(e[t.effectID]=dt[t.event1],o.set(t.event1,null==(i=n.Root.Adventure.find((e=>e.ID===parseInt(t.effectID/10))))?void 0:i.chapname)):3==t.type&&"2"==t.event1?e[t.effectID]={get:"营地"}:e[t.effectID]={lost:(s=f(t.lostitem,t.lostnum,t.effectID),s?"失去 "+s:s),get:(a=f(t.getitem,t.getnum,t.effectID),a&&t.showitem?a.replace("随机","特定"):a)},e}),[]),Object.assign(ge,{Rfight:dt,Rchoose:rt,Rcity:lt,vskinMap:pt,Rplot:ot}),!e||"roge"==e){var p=Object.entries(c).reduce(((e,[t,n])=>{var i,a,s,l,r;let d=t.length<6?t.slice(-3):"99"!==t.slice(0,2)?t.slice(-5,-2)+">":"*"+t.slice(-2),c=t.length<6?t.slice(0,-3)-2:"99"!==t.slice(0,2)?t.slice(0,-5)-2:t.slice(-3,-2)-t.slice(-4,-3)+9;if(["新年大吉"].includes((null==(i=dt[t])?void 0:i.name)??(null==(a=dt[parseInt(d)+4e3])?void 0:a.name)))return e;e[d]||(e[d]={fight:(null==(s=dt[t])?void 0:s.name)??(null==(l=dt[parseInt(d)+4e3])?void 0:l.name)??"",generals:{}}),o.has(t)&&(e[d].event=o.get(t));let u=e[d].generals;return ((null==(r=dt[t])?void 0:r.generals)??n).forEach((e=>{let t=(d.startsWith("*")?c:"")+(e.stage||"")+"#"+e.generalID;for(;;){if(u[t]){if(u[t].levels.includes(c)){t+="@";continue}}else u[t]={general:(e.info.pre?">":"")+e.generalname+(e.info.next?">":""),info:g(e.info),levels:[],start:[],infos:{},spell:{},card:{},ad:{}};break}let n=u[t];c%10<6&&c<20&&(n.levels.push(c),e.start&&n.start.push(c)),n.infos[c]=e.info,e.otherad&&(n.ad[c]=e.otherad),e.spells&&e.spells.forEach((e=>{n.spell[e.spellid]||(n.spell[e.spellid]={...e,levels:[],level:void 0}),c%10<6&&c<20&&n.spell[e.spellid].levels.push(c+(e.level??0));})),e.cards&&e.cards.forEach((e=>{n.card[e.id]||(n.card[e.id]={name:e.ncn,levels:[],level:void 0}),c%10<6&&c<20&&n.card[e.id].levels.push(c+(e.level??0));}));})),e}),{});Object.entries(p).forEach((([e,t])=>{p[e].shift=e.startsWith("*")&&1==Math.min(...Object.values(t.generals).flatMap((e=>e.levels)))?1:0,t.generals=Object.values(t.generals).map((t=>(t.level=Math.min(...t.levels.sort(((e,t)=>t-e)))-p[e].shift,t.level=t.level,t.spell=Object.values(t.spell).map((n=>{let i=Math.min(...n.levels.sort(((e,t)=>t-e)));var a;return n.levels.some(((e,n,i)=>e<10&&!i.includes(e+10)&&(t.levels.includes(e+10)||2==t.levels.length&&t.levels.includes(10))))&&(n.level=[i]),n.levels.some((e=>e<10))&&((a=n.levels.filter(((e,t,n)=>e>=10&&!n.includes(e-10)))).length&&(n.level=[i,a[a.length-1]])),n.level=(n.level??i)-p[e].shift,delete n.levels,delete n.spellid,n})).sort(((e,t)=>{let n=e=>e[1]>=10?e[1]:e[0]??e;return n(e.level)%10-n(t.level)%10||n(e.level)-n(t.level)})),t.card=Object.values(t.card).map((n=>{let i=Math.min(...n.levels.sort(((e,t)=>t-e)));var a;return n.levels.some(((e,n,i)=>e<10&&!i.includes(e+10)&&(t.levels.includes(e+10)||2==t.levels.length&&t.levels.includes(10))))&&(n.level=[i]),n.levels.some((e=>e<10))&&((a=n.levels.filter(((e,t,n)=>e>=10&&!n.includes(e-10)))).length&&(n.level=[i,a[a.length-1]])),n.level=(n.level??i)-p[e].shift,delete n.levels,n})).sort(((e,t)=>{let n=e=>e[1]>=10?e[1]:e[0]??e;return n(e.level)%10-n(t.level)%10||n(e.level)-n(t.level)})),t.card.length||delete t.card,t.info=Object.values(t.infos).reduce(((e,t)=>(Object.keys(e).forEach((n=>{t[n]>e[n]&&(e[n]=t[n]);})),e)),{hp:0,card:0,draw:0,sha:0}),Object.keys(t.ad).length?Object.keys(t.ad).sort(((e,t)=>t-e)).forEach(((e,n,i)=>{(e>=10&&t.ad[e]==t.ad[e%10]||t.ad[e]==t.ad[i[n+1]])&&delete t.ad[e];})):delete t.ad,t.start.length?t.start=Math.min(...t.start):delete t.start,delete t.infos,delete t.levels,t))).sort(((e,t)=>e.level-t.level));}));var h=n.Root.UniversalGroup.filter((e=>void 0!==e.fightgroup)).reduce(((e,t)=>{e[t.fightID]||(e[t.fightID]={});let n=String(t.fightgroup).slice(-3);return e[t.fightID][n]||(e[t.fightID][n]=[]),e[t.fightID][n].push(t),e}),{}),m=Array.from(Array.from(n.Root.Level.reduce(((e,{cityID:t,eventfight:n,universalfight:i,startshow:a})=>{var s,o;function l(n){if(!n||0==n.length)return;let i=e.get(n);i?i.includes(d[t])||i.push(d[t]):e.set(n,[d[t]]);}return l(i),l(null==(o=null==(s=null==n?void 0:n.split(";"))?void 0:s.map((e=>e.slice(-3))))?void 0:o.filter(((e,t,n)=>!n.slice(t+1).includes(e)))),e}),new Map).entries()).reduce(((e,[t,n])=>{let i=n.length>1&&new Set(n.map((e=>e.slice(0,3)))).size<2?n.map(((e,t)=>e.slice(t?3:0))).join("/"):String(n);return e.get(i)||e.set(i,new Set),(h[t]?Object.keys(h[t]):t).forEach((t=>e.get(i).add(t))),e}),new Map).entries()).reduce(((e,[t,n])=>(e[t]=Array.from(n,(e=>p[e])),e)),{});ct.jsbs=JSON.stringify(Object.entries(m).filter((e=>e[0].includes(s+"-"))).reduce(((e,[t,n])=>{let i=t.slice(2);return e[i]||(e[i]=[]),n.forEach((t=>{"新年大吉"!=t.fight&&e[i].push(t);})),e}),{})),ct.jsft=JSON.stringify(Object.values(p).filter((e=>["天涯故交","招兵买马","万众敬仰"].includes(e.event)&&e.shift||["突来危机","擂台比武","战事推演","为民除害","赛前演习","宵小叫嚣"].includes(e.event))).reduce(((e,{event:t,generals:n,fight:i})=>(e[t]||(e[t]=[]),e[t].push({...i?{fight:i}:{},generals:n}),e)),{})),ct.wscd=JSON.stringify(Object.values(i.Card.map((({CitationID:e,money:t})=>({...ot[e],money:t}))).reduce(((e,{level:t,money:n,name:i,color:a,number:s,desc:o,rType:l})=>{let r=t+i+s;return e[r]||(e[r]={cl:[],level:n,name:i,number:s,type:l,desc:o}),e[r].cl.push(a),e}),{})).sort(mt("type","level"))),ct.wssp=JSON.stringify(i.Spell.map((({CitationID:e,money:t})=>({...ot[e],money:t}))).sort(mt("money","level","spellid")).map((({level:e,money:t,name:n,desc:i})=>({level:t,name:n,desc:i})))),ct.wszf=JSON.stringify(i.Tactics.map((({CitationID:e,money:t})=>({...ot[e],money:t}))).filter((e=>{var t;return (e.name=null==(t=e.name)?void 0:t.replace("·新",""))&&!e.name.includes("废弃")&&!e.desc.includes("备用")&&!/(游戏|战斗)开始/.test(e.desc)})).sort(((e,t)=>!e.money^!t.money?e.money?1:-1:0!=e.name.slice(0,2).localeCompare(t.name.slice(0,2))?e.name.slice(0,2).localeCompare(t.name.slice(0,2)):mt("money","level","name.length")(e,t))).map((({level:e,money:t,name:n,desc:i})=>({level:t,name:n,desc:i}))).filter(((e,t,n)=>JSON.stringify(e)!=JSON.stringify(n[t+1])))),ct.jssp=JSON.stringify(ot.filter((e=>3==(null==e?void 0:e.type))).sort(mt("level","money","spellid")).map((({level:e,money:t,name:n,desc:i})=>({name:n,level:e,desc:i})))),ct.jscd=JSON.stringify(Object.values(ot.filter((e=>(null==e?void 0:e.type)>=4)).reduce(((e,{level:t,money:n,name:i,color:a,number:s,type:o,desc:l,rType:r})=>{let d=t+i+s,c=[33,34].includes(Math.floor(r/100))||"诸葛连弩"==i&&4==t;return e[d]||(e[d]={cl:[],level:c?0:t,money:n,name:i,number:s,type:r+(c?6:0),desc:l}),e[d].cl.push(a),e}),{})).sort(mt("type","level","money")).sort(((e,t)=>e.level>0&&0==t.level?-1:0))),ct.jssd=JSON.stringify(n.Root.seed.sort(mt("level","seed")).map((({name:e,desc:t,level:n,huchijineng:i})=>{var a,s,o;let l=null==(a=null==t?void 0:t.match(/.*获得【([^【】]*)】.*/))?void 0:a[1];return l&&(t+=(null==(s=et[i])?void 0:s.desc)??(null==(o=et.find((e=>(null==e?void 0:e.name)==l)))?void 0:o.desc)),{name:e,level:n,desc:t}}))),ct.jssc=JSON.stringify(n.Root.school.map((({school:e,name:t,effect:n,needputong:i,needxiyou:a,needshishi:s,needchuanshuo:o})=>({school:e,name:t,need:[i,a,s,o],desc:ot[n].desc.replaceAll(" ","")})))).replace("(","(").replace(")",")").replace(")",")"),ct.jszf=JSON.stringify(ot.filter((e=>2==(null==e?void 0:e.type))).filter((e=>(e.school=parseInt(e.school||100),e.name=e.name.replace("·新",""),!e.name.includes("废弃")&&!e.desc.includes("备用")&&!e.name.includes("套装")))).sort(((e,t)=>0!=e.name.slice(0,2).localeCompare(t.name.slice(0,2))?e.name.slice(0,2).localeCompare(t.name.slice(0,2)):mt("level","money","name.length")(e,t))).map((({level:e,money:t,name:n,desc:i,school:a})=>({...a<100?{school:a}:{},name:n,level:e,desc:i}))).filter(((e,t,n)=>JSON.stringify(e)!=JSON.stringify(n[t+1])))),ct.jstf=JSON.stringify(n.Root.saijitianfu.filter((e=>e.seasonID==s)).reduce(((e,{tfid:t,ceng:n,type:i,cost:a,plot:s,preposition:o})=>(e[t]={id:t,x:i,y:n,cost:a,pre:(null==o?void 0:o.split(/,|;/))??[],...ot[s]},e)),[{id:0,x:0,y:0,cost:0,pre:[],name:"",level:0,type:0}])),t(ct);}function f(e,t,i){var a,s,l;return e?e.includes(",")?(([e,t])=>["随机","普通","稀有","史诗","传说"][t]+{2:"战法",3:"技能",4:"手牌",5:"装备"}[e])(e.split(",")):r[e]?(t>1?t:"")+r[e]:ot[e]?null==(a=ot[e])?void 0:a.name:c[e]?(o.set(e,null==(s=n.Root.Adventure.find((e=>e.ID===parseInt(i/10))))?void 0:s.chapname),c[e].map((e=>e.generalname)).join("\n")):null==(l=n.Root.Card.find((t=>t.id==e)))?void 0:l.name:""}function g({general:e,hp:t,maxhp:n,armor:i,getarmor:a,card:s,draw:o,sha:l,next:r,pre:d}){return (d?">":"")+e+t+(n!==t?"/"+n:"")+"血"+s+"牌摸"+o+"杀"+l+(r?">":"")}}(c["hd_roguelike.sgs"],c["hd_1v1_rogue.sgs"]),"string"!=typeof e||"guanxing"==e){let n=function(e,t,i="https://web.sanguosha.com/220/h5_2/res/runtime/pc/general/big/bigSkin/"){let a=i+e+".png";return fetch(a).then((s=>s.ok?{name:t,desc:`<a target="_blank" href="${a}"><img src="${a.replace("bigSkin","static").replace("big/s","seat/s")}"></a>`}:i.includes("seat")?void 0:n(e,t,i.replace("big/s","seat/s").replace("bigSkin","static"))))};ge.gxjson={"结果为推演和预测,请以最终公告为准!更新时间":(new Date).toLocaleString(),"【充值消费】":[]};let a=c["gn_dbs_quest.sgs"].TaskAll.Task.filter((({_attributes:e})=>e.clientTimeStart>=String(s))).map((({_attributes:e,Reward:t})=>{let n=",";return t.SelectReward&&(t=t.SelectReward,n="/"),t.RewardItem.length||(t.RewardItem=[t.RewardItem]),{id:e.id,time:e.timeStart.slice(0,8)+"—"+e.timeEnd.slice(0,8),desc:"【"+e.name+"】"+e.desc,reward:t.RewardItem.map((({_attributes:e})=>b(e.itemId+","+e.count))).join(n)}})).concat(c["sys_h5_quest.sgs"].root.Task.filter((e=>e.ClientTimeStart>=String(s))).map((({Id:e,Name:t,Desc:n,Rewards:i,Count:a,ClientTimeStart:s,ExtraRewards:o,ClientTimeEnd:l,SelectRewards:r})=>{let d=r?"/":",";return {id:e,time:s.slice(0,8)+"—"+l.slice(0,8),desc:"【"+t+"】"+n,reward:[i+","+a,...(null==o?void 0:o.split(";"))??[]].map(b).join(d)}}))),o=c["sys_h5_task.sgs"].TaskAll.TaskNode.filter((({duration:e,quest_id:t})=>t&&(!e||(null==e?void 0:e.replace(new RegExp(".*?(?<![0-9])([0-9]{8}T[0-9]{6})?.*"),"$1"))>=String(s)))).reduce(((e,{duration:t,quest_id:n,name:i})=>{var s,o;let l=n.split(";").map((e=>parseInt(e))).filter((e=>e>0)),r=((null==(o=t||(null==(s=a.find((({id:e,time:t})=>l.includes(e)&&t)))?void 0:s.time))?void 0:o.slice(0,8))+"·【"+(null==i?void 0:i.replace(/.*盲盒.*/,"盲盒福利"))+"】").replace(/.*(充值|消费).*/,"【充值消费】");return l.forEach((t=>{""!=t&&(e[t]=r);})),e}),{});a.forEach((({id:e,...t})=>{let n=o[e]??String(s)+"·【其它任务】";ge.gxjson[n]||(ge.gxjson[n]=[]),ge.gxjson[n].push(t);})),(C=c["ff_dbs_lottery_new.sgs"].root.ShopGoods.filter((({timeRange:e})=>(null==e?void 0:e.replace(new RegExp(".*?(?<![0-9])([0-9]{8}T[0-9]{6}).*"),"$1"))>=String(s))).map((({Id:e,counts:t,exchangecount:n,timeRange:i})=>({time:null==i?void 0:i.replace(/.*?([0-9]+)T[0-9]+,([0-9]+)T[0-9]+/,((e,t,n)=>t+"-"+n)),desc:"消耗·星石币*"+n,reward:b(e+","+t)})))).length>1&&(ge.gxjson[(null==(E=C[0].time)?void 0:E.slice(0,8))+"·兑换【占星秘宝】"]=C),c["ff_exchange_new.sgs"].root.Common.filter((({duration:e})=>(null==e?void 0:e.replace(new RegExp(".*?(?<![0-9])([0-9]{8}T[0-9]{6}).*"),"$1"))>=String(s))).forEach((({itemid:e,goods:t,rewardstype:n,duration:i})=>ge.gxjson[i.slice(0,8)+"·【"+st(e).name+"】兑换"]=t.sort(((e,t)=>t.exchangecount1-e.exchangecount1)).map((({exchangecount1:t,Id2:n,counts:a,limitcounts:s,itemid2:o,exchangecount2:l})=>{let r=String(a).split(";");return {time:i.slice(0,8)+"—"+i.slice(16,24),desc:"消耗·"+b((o??e)+","+(l??t))+(s?",限"+s+"次":""),reward:String(n).split(";").map(((e,t)=>b(e+","+r[t]))).join("/")}})))),c["sys_treasure_chest.sgs"].root.Common.filter((({duration:e})=>(null==e?void 0:e.replace(new RegExp(".*?(?<![0-9])([0-9]{8}T[0-9]{6}).*"),"$1"))>=String(s))).forEach((({itemid:e,rewards:t,duration:n})=>ge.gxjson[n.slice(0,8)+"·开启【"+st(e).name+"】"]=t.map((t=>({time:n.slice(0,8)+"—"+n.slice(16,24),desc:"开启·"+b(e+","+t.counts),reward:JSON.stringify(t).split(/,"goodsid[0-9]+":" *([0-9,;]+) *"/).filter((e=>(null==e?void 0:e.search(/([0-9]+,[0-9]+);?([0-9]+,[0-9]+)?/))>=0)).map((e=>e.replace(/([0-9]+,[0-9]+);?([0-9]+,[0-9]+)?/,((e,t,n)=>b(t)+(n?"["+b(n)+"]":""))))).join(2==t.rewardstype?"/":",")})))));let l=[],r=[],d=[],p=c["sys_h5_dbs_clientserverpub.sgs"].client.DuoBao[0].item.filter((({BeginTime:e})=>e>String(s))).flatMap((({DropId:e,ExchangeId:t,BeginTime:n,EndTime:i})=>{let a=n.slice(0,8)+"-"+i.slice(0,8),s=(y.get(Math.abs(e))??[]).map(st).filter((({name:e})=>!["夺宝碎片","夺宝重置券","绑定元宝","桃花","功勋","武将包","皮肤包","稀有皮肤包","豪华皮肤包","普通将印宝箱","稀有将印宝箱","史诗将印宝箱","大将军印"].includes(e))),o=s.map((({ID:e})=>e)),l=(y.get(Math.abs(t))??[]).map(st).filter((({ID:e,name:t,TypeID:n})=>o.includes(e)||!(43==n&&(null==t?void 0:t.endsWith("动态套装"))||36==n&&(null==t?void 0:t.startsWith("文和乱武*"))||25==n&&["赵襄","沙摩柯(SP)","孙尚香(界限突破)"].includes(t)||["枭雄金印","水晶碎片","圣魂玄晶","史诗皮肤锦囊","传说皮肤锦囊","至臻皮肤礼盒","谋定水晶自选礼盒"].includes(t)))).map((({ID:e,name:t})=>{let n=s.findIndex((({name:e})=>e==t));return n>=0&&o.splice(n,1,e),e}));return Array.from(new Set([...o,...l])).map(st).map((({ID:e,TypeID:t,PicID:n,name:i,returngoods:s,usedeffect:r,info:c,fragment:u})=>{var p;let h={time:a,name:i,price:[...o.includes(e)?["四角"]:[],...l.includes(e)&&u?[u+"夺宝碎片"]:[]].join("/"),...(m=["祈福灯","圣魂玄晶","枭雄金印"].includes(i)?"":s&&"0"!=s&&s.split(";").filter((e=>(null==e?void 0:e.search(/[0-9]+,[0-9]+/))>=0)).map(b).join(";")||(null==r?void 0:r.search(/^([0-9]+,[0-9]+;?)+$/))>=0&&r.replace(/([0-9]+),[0-9,]+/g,b)||r&&k(r)||c,m&&{desc:m})};var m;return (36==t||(null==(p=h.name)?void 0:p.search(/\*[^0-9]/))>=0)&&d.push({name:i,res:n}),h}))}));p.length&&(ge.gxjson["夺宝行动"]=p,p=p.map((({name:e})=>e)));let h=c["sys_gs_dbs_fs_goodsbaseinfo.sgs"].root.goodslist.goods.filter((e=>{var t;return (null==(t=e.x)?void 0:t.replace(new RegExp(".*?(?<![0-9])([0-9]{8}T[0-9]{6}).*"),"$1"))>=String(s)&&834901!=e.a})).map((({a:e,ah:t,l:n})=>{if(n&&n.replace(/([0-9]+),[0-9,]+/g,((e,n)=>(t||[100301,200101,1325201].includes(parseInt(n))||l.push(parseInt(n)),e))),!t)return e;r.push(e);})).filter(Boolean).concat(l).sort(((e,t)=>e-t)).filter(((e,t,n)=>0==t||e!=n[t-1]));Array.from(new Set(c["cha_gs_dbs_fs_skininfo.sgs"].root.manu.item.filter((e=>e.SellTime>String(s))).map((e=>e.baseID)).concat(h.concat(h.filter(((e,t,n)=>e-n[t-1]>1e3&&n[t+1]-e<1e3)).map((e=>c["sys_gs_dbs_fs_goodsbaseinfo.sgs"].root.goodslist.goods.filter((t=>t.a-e>0&&t.a-e<1e4)).map((e=>e.a)))).reduce(((e,t)=>[...e,...t]),[])).sort(((e,t)=>e-t))))).map((e=>st(e))).filter((e=>e&&![...p,"夺宝碎片","夺宝重置券","绑定元宝","桃花","功勋","武将包","皮肤包","稀有皮肤包","豪华皮肤包","普通将印宝箱","稀有将印宝箱","史诗将印宝箱","大将军印"].includes(e.name))).forEach((({ID:e,TypeID:t,PicID:n,name:i,maxBuyCount:a,yuanbao:s,returngoods:o,SellTime:l,usedeffect:r,info:c,yuanbaoonly:u,fragment:p,exchange:h,shopvisual:m})=>{var f;let g={...l&&{time:l.replace(/.*?([0-9]+)T[0-9]+;([0-9]+)T[0-9]+/,((e,t,n)=>t+"-"+n))},name:i,...(null==h?void 0:h.includes(","))?{price:b(h)}:m&&999999!=s&&{price:u?s+"通用元宝":s+"元宝",...a&&((e,t)=>parseInt(e)>0?{max:t+"个/"+(1==e?"":e)+"天"}:{})(...a.split(";"))},...(y=["祈福灯","圣魂玄晶","枭雄金印"].includes(i)?"":o&&"0"!=o&&o.split(";").filter((e=>(null==e?void 0:e.search(/[0-9]+,[0-9]+/))>=0)).map(b).join(";")||(null==r?void 0:r.search(/^([0-9]+,[0-9]+;?)+$/))>=0&&r.replace(/([0-9]+),[0-9,]+/g,b)||r&&k(r)||c,y&&{desc:y})};var y;(36==t||(null==(f=g.name)?void 0:f.search(/\*[^0-9]/))>=0)&&d.push({name:i,res:n}),String(g.price).includes("夺宝")||String(g.price).includes("灵宝")?(ge.gxjson["夺宝行动"]||(ge.gxjson["夺宝行动"]=[]),ge.gxjson["夺宝行动"].push(g)):g.max?(ge.gxjson["限购礼包"]||(ge.gxjson["限购礼包"]=[]),ge.gxjson["限购礼包"].push(g)):(ge.gxjson["其它道具"]||(ge.gxjson["其它道具"]=[]),ge.gxjson["其它道具"].push(g));})),null==(i=ge.gxjson["其它道具"])||i.sort(((e,t)=>e.price&&!t.price?-1:1)),r.length&&(ge.gxjson["祈福武将"]=Object.entries(r.map((e=>st(e))).filter((({returngoods:e})=>{var t;return 25==(null==(t=st(e.split(";")[1].split(",")[0]))?void 0:t.TypeID)})).reduce(((e,{name:t,lotteryPrice:n})=>(e[n]||(e[n]=[]),e[n].push(t.replace("武将","").replace(/\(.*?\)/g,"")),e)),{})).sort(((e,t)=>t[0]-e[0])).map((([e,t])=>({price:e+"同心结",reward:t.join("/")})))),(W=c["ff_tiangong.sgs"].root.Drop.reduce(((e,{Id:t,ItemId:n,MaxCount:i})=>{var a;return e[t]||(e[t]=[]),a=b(n+","+i),["欢乐豆","手气卡","点将卡","灵宝经","换将卡","诏令天","校尉将","朱砂*","灵宝经","桃花*","功勋*","传世玉","大将军","夺宝券","水晶碎","圣魂玄"].includes(a.slice(0,3))||e[t].push(a),e}),[]).reduce(((e,t)=>{if(t){let n=e.find((({reward:e})=>t.includes(e)));n&&(n.reward=t.join(","));}return e}),c["ff_tiangong.sgs"].root.Common.slice().reverse().reduce(((e,{Id:t,Name:n,bigrewards:i,Duration2:a})=>{let o=parseInt(a.slice(0,8))+1;if(o<parseInt(s))return e;let l=e.find((({name:e})=>e==n));return l?l.time+=";"+o:e.push({name:n,reward:tt[i],time:String(o)}),e}),[]).reverse())).length&&(ge.gxjson["祈愿台"]=W);const f=(I={},function(e){return I[e]?I[e]:I[e]=c["ff_chess.sgs"].root.NewChess.filter((({PlanId2:t})=>t==e)).reduce(((e,{MaxFloors:t})=>e+parseInt(t)),0)});S=c["ff_chess.sgs"].root.Common.reduce(((e,{GrandPrize:t,PlanID2:n,duration2:i})=>{var a;let o=parseInt(i.slice(0,8))+1;return o<parseInt(s)||e.push({reward:null==(a=st(t))?void 0:a.name,"预估价格":f(n)/2|0,time:o+"-"+i.slice(16,24)}),e}),[]),S.length&&(ge.gxjson["绘卷"]=S),ge.gxjson["新品皮肤"]=d.map((({name:e})=>({name:e}))),Object.entries(ge.gxjson).forEach((([e,t])=>ge.gxjson[e]=Array.isArray(t)?t.map((e=>u(e,m))):u(t,m))),e&&"guanxing"!=e||t(Promise.all(d.map((({name:e,res:t})=>n(t,e)))).then((e=>ge.gxjson["新品皮肤"]=e.filter(Boolean))).then((()=>(Object.entries(ge.gxjson).forEach((([e,t])=>ge.gxjson[e]=Array.isArray(t)?t.map((e=>u(e,m))):u(t,m))),ge.gxjson))));}var S,I,W,C,E;t(c),console.warn("[initMap] Config_w 解析完成");}))))))}function mt(...e){return new Function("_a","_b","return "+e.map((e=>"((_a."+e+")-(_b."+e+"))")).join("||"))}Object.assign(ge,{cardDict:Ze,cardIDsOrder:Xe,spellDict:et,generalDict:tt,skinDict:nt,skinMap:it,bigSkin:at,goodsID:st,rogejson:ct,gxjson:{},Rfight:dt,Rchoose:rt,Rcity:lt,secId:ut,vskinMap:pt,Rplot:ot});var ft='<head><title>三国杀打小抄</title><meta charset="UTF-8"><style>::-webkit-scrollbar{width:5px;height:12px}::-webkit-scrollbar-track{border:1px solid #050505}::-webkit-scrollbar-thumb{background:#5f563f}::-webkit-scrollbar-thumb:hover{background:#2c2c2c}.body{width:100%;margin:0;padding:0;font-size:13px;width:100%;background:#23201d;background-size:cover;color:#f2de9c;display:flex;flex-direction:column;margin:1px;user-select:none;max-width:100vw;overflow-x:hidden;font-size:13px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Tahoma,Arial,sans-serif}.nav{width:100%;background:#23201d;text-align:center}.nav1{font-weight:bolder;height:20px;width:100%;color:#f2de9c;background:#23201d;margin-right:15px;display:block}#nav1:empty{display:none}.nav2{height:20px;width:49%;float:right;text-align:center;color:#f2de9c;background:#23201d;margin-left:3px;border:1px solid #f2de9c;display:block;border-radius:5px}.nav2:hover{color:#f2de9c;background:#372820;border:1px solid #f2de9c}.nav2:focus{background:#372820;box-shadow:1px 1px 3px #f2de9c}.content{margin:1px}.AC-head{font-weight:bolder;height:66px;width:13%;float:right;text-align:center;color:#f2de9c;background:#23201d;margin:1px;border-radius:5px;border:1px #23201d solid;box-shadow:1px 0 3px;overflow:hidden}.AC-head:hover{background:#372820;border:1px #23201d solid;animation:blink 2s;animation-iteration-count:infinite}.AC-body{height:60px;width:79%;float:left;box-shadow:1px 0 3px;border:1px #23201d solid;color:#f2de9c;margin:1px;overflow:hidden;border-radius:5px;background:#23201d;resize:none}.invite-body{height:40px;width:92%;float:left;display:flex;box-shadow:1px 0 3px;border:1px #23201d solid;color:#f2de9c;margin:5px;overflow:hidden;border-radius:5px;background:#23201d;resize:none}.orderContainer{text-align:right;vertical-align:bottom}.order-head{font-weight:bolder;width:10%;height:25px;float:left;text-align:center;color:#f2de9c;margin-left:3px}.order-body:empty{height:35px}.order-body{position:relative;padding:5px;height:auto;width:94%;display:block;box-shadow:1px 1px 3px;z-index:1;margin:1px;overflow:hidden;border-radius:5px}.order-body:after{text-align:center;content:var(--No-content, \'座位号丨武将\');position:absolute;bottom:0;right:5px;z-index:-1;font:800 20px \'Arial Black\';-webkit-text-fill-color:transparent;-webkit-text-stroke-width:1px}.knownShouPai{border:1px #23201d solid;animation:blink 2s;animation-iteration-count:infinite}.knownCardsInHand{text-align:center;position:relative;overflow:hidden;display:none;height:auto}.knownCards:empty{text-align:center;position:relative;overflow:hidden;display:none}.knownCards{width:94%;text-align:center;position:relative;overflow:hidden;height:auto}@keyframes blink{50%{border-color:#f2de9c}}.paiduiCards:after{text-align:center;content:\'牌堆\';position:absolute;bottom:0;right:5px;z-index:-1;font:800 20px \'Arial Black\';-webkit-text-fill-color:transparent;-webkit-text-stroke-width:1px}.knownCards{padding:5px;height:auto;width:94%;float:right;display:block;box-shadow:1px 1px 3px;margin:1px;overflow:hidden;border-radius:5px}.knownCards:after{text-align:center;content:\'场上手牌\';position:absolute;bottom:0;right:5px;z-index:-1;font:800 20px \'Arial Black\';-webkit-text-fill-color:transparent;-webkit-text-stroke-width:1px}#quanBian:after{text-align:center;content:\'权变牌\';position:absolute;bottom:0;right:5px;z-index:-1;font:800 20px \'Arial Black\';-webkit-text-fill-color:transparent;-webkit-text-stroke-width:1px}#yanXi:after{text-align:center;content:\'宴戏牌\';position:absolute;bottom:0;right:5px;z-index:-1;font:800 20px \'Arial Black\';-webkit-text-fill-color:transparent;-webkit-text-stroke-width:1px}.cardTypeDetail:after{text-align:center;content:\'牌堆类型详情\';position:absolute;bottom:0;right:5px;z-index:-1;font:800 20px \'Arial Black\';-webkit-text-fill-color:transparent;-webkit-text-stroke-width:1px}.ding{text-align:center;width:100%;position:relative;height:auto;display:none}.dingCards{text-align:center;position:relative;height:auto;min-height:60px;display:none}.dingCards:after{content:\'第一张为牌堆顶\';position:absolute;bottom:0;right:5px;z-index:-1;font:800 20px \'Arial Black\';-webkit-text-fill-color:transparent;-webkit-text-stroke-width:1px}.di{text-align:center;width:100%;position:relative;height:auto;display:none}.diCards{text-align:center;position:relative;height:auto;min-height:60px;display:none}.diCards:after{content:\'第一张为牌堆底\';position:absolute;bottom:0;right:5px;z-index:-1;font:800 20px \'Arial Black\';-webkit-text-fill-color:transparent;-webkit-text-stroke-width:1px}.cardDetail{width:100%;overflow:hidden;display:block}.type{width:100%;float:left}.cardTypeContainer{width:100%;overflow:hidden;display:block}.type-head{width:10%;float:left;text-align:center;color:#f2de9c;margin-left:3px;display:block;overflow:hidden;cursor:pointer}.type-body{padding:5px;width:94%;display:block;box-shadow:1px 1px 3px;margin:1px;overflow:hidden;border-radius:5px}.cardType{font-size:12px;width:25%;height:22px;float:left;text-align:center;border:1px;margin:0;background:#d2c8a0;box-shadow:inset 1px 1px 1px #000}.cardType:hover{color:#f2de9c;background:#372820;border:1px #23201d solid;animation:blink 2s;animation-iteration-count:infinite}.storeDetail{font-size:12px;width:50%;height:22px;float:left;text-align:center;border:1px;margin:0;background:#d2c8a0;box-shadow:inset 1px 1px 1px #000}.detail{width:100%;float:left;overflow:hidden}.detail-head{width:10%;height:25px;float:left;text-align:center;color:#f2de9c;margin-left:3px}.detail-body{min-height:40px;padding:5px;width:94%;float:left;display:block;box-shadow:1px 1px 3px;margin:1px;border-radius:5px;overflow:hidden}.panel-header{background:#23201d;color:#f2de9c;padding:3px;text-align:left;border:none;width:100%;cursor:pointer;display:flex;align-items:center;border-radius:5px;border:1px transparent solid}.triangle{width:0;height:0;border-top:6px solid transparent;border-bottom:6px solid transparent;border-left:6px solid #f2de9c;margin-right:10px;transition:transform .3s ease}.panel-content{max-height:0;width:100%;float:left;display:block;color:#f2de9c;margin:1px;overflow:hidden;border-radius:5px;background:#23201d;transition:max-height .3s ease-out}.panel-header.active .triangle{transform:rotate(90deg)}.panel-header.active{color:#f2de9c;background:#372820}.panel-header:hover{color:#f2de9c;background:#372820;border:1px #23201d solid;animation:blink 2s;animation-iteration-count:infinite}.r{color:#f04155}.suitRec{width:50%;float:right;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI Emoji",Tahoma,Arial,sans-serif;text-shadow:1px 0 0 rgba(255,255,255,.7),0 1px 0 rgba(255,255,255,.7),-1px 0 0 rgba(255,255,255,.7),0 -1px 0 rgba(255,255,255,.7)}.suit{width:50%;float:left}.phrase{float:left}.face{width:12.5%;display:block;float:left}.face:hover{width:12.5%;display:block;float:left;background:#f2de9c}#shandian{width:100%;float:left}.function{width:50%;margin:1px}.jizhan{width:100%;float:left}.yanjiao{width:50%;float:left}.yanjiaospan{border:1px solid #0000;box-sizing:border-box}.yanjiaospan:hover{border:1px solid #f2de9c;cursor:pointer}.calRes{width:98%;height:20px;float:left;text-align:center;color:#f2de9c;background:#23201d;border:1px solid #f2de9c;display:block;border-radius:5px;font-size:13px;margin:1px}.secKillDetailText{width:100%;height:26px;float:left;text-align:center;color:#f2de9c;background:#23201d;display:block;border-radius:5px;line-height:26px;margin-top:17px}.calRes:not(:disabled):hover{font-size:12px;color:#f2de9c;background:#372820;border:1px #23201d solid;animation:blink 2s;animation-iteration-count:infinite}.mizhuBTN{width:48%;height:20px;text-align:center;color:#f2de9c;background:#23201d;border:1px solid #f2de9c;display:block;border-radius:5px}.mizhuBTN:hover{color:#f2de9c;background:#372820;border:1px #23201d solid;animation:blink 2s;animation-iteration-count:infinite}.mizhu{width:100%;height:20px;float:left;text-align:center;color:#f2de9c;background:#23201d;margin-left:3px;border:1px solid #f2de9c;display:block;border-radius:5px}.mizhu:hover{color:#f2de9c;background:#372820;border:1px #23201d solid;animation:blink 2s;animation-iteration-count:infinite}#mySeatID1{width:48%}#mySeatID2{width:48%}.res{width:100%;float:left}a:link,a:visited{color:inherit;text-decoration:none;display:inline-flex;text-decoration:underline;border-radius:5px;cursor:pointer;align-items:center;justify-content:center}a:hover{color:#f2de9c;background:#372820;border:1px #23201d solid;animation:blink 2s;animation-iteration-count:infinite}#donate{position:relative;color:#f2de9c;display:block;text-align:center}.uuid{position:relative;color:#f2de9c;display:block;text-align:center;cursor:pointer}.uuid:hover{color:#f2de9c;background:#372820;border:1px #23201d solid;animation:blink 2s;animation-iteration-count:infinite}.uuid:active{background:#372820}.width{width:100%;height:5px;clear:both}.switch-container{display:flex}.switch{position:relative;display:block;margin-left:10px;width:56px;height:26px}.switch input{opacity:0;width:0;height:0}.slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background:#23201d;-webkit-transition:.4s;transition:.4s;border-radius:34px;border:1px solid #f2de9c}.slider:before{position:absolute;content:"";height:20px;width:20px;left:2px;bottom:2px;background-color:#f2de9c;-webkit-transition:.4s;transition:.4s;border-radius:50%}input:checked+.slider{background-color:#372820}input:focus+.slider{box-shadow:0 0 1px #372820}input:checked+.slider:before{-webkit-transform:translateX(32px);-ms-transform:translateX(32px);transform:translateX(32px)}.status{position:absolute;top:50%;transform:translateY(-50%);left:5px;color:#555}.explanation{margin:0 10px;display:flex;width:100%}input:checked+.slider+.status:before{content:\'开\'}input:checked+.slider+#autoBotStatus:before{content:var(--bot-status, \'30\');color:#f2de9c}input+.slider+#autoBotStatus:before{content:var(--bot-status, \'关\')}input+.slider+.status:before{content:"关"}.calRes:disabled{background-color:#ccc;color:#666;cursor:not-allowed}.markedCard{display:inline-flex;align-items:center;border-radius:5px;border:1px solid #000;width:auto;background-color:#372820;color:#f2de9c}.mark{writing-mode:vertical-rl;margin-right:0;color:#f2de9c}.markedCard>.mark:only-child{display:none}.shoupai{color:#000;--shoupai-width:33px;padding:0;font-weight:bolder;margin-right:calc(32px - var(--shoupai-width));float:left;width:var(--shoupai-width);min-width:var(--shoupai-width);height:38px;border:1px solid #000;text-align:center;background:rgba(210,200,160,.5);border-radius:5px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI Emoji",\'Noto Color Emoji\';white-space:nowrap;text-shadow:1px 0 0 rgba(255,255,255,.7),0 1px 0 rgba(255,255,255,.7),-1px 0 0 rgba(255,255,255,.7),0 -1px 0 rgba(255,255,255,.7);font-size:13px}.shoupai.R{color:red}.shoupai.G{background:0}.shoupai.G .shoupai{background:0;pointer-events:none}.order-body:not(#paiduiCards) .shoupai:disabled{display:none}.order-body:not(#paiduiCards) .shoupai.G{width:auto}.left{width:30%;float:left}.right{width:70%;float:right}input[type=checkbox]:disabled+.slider{background-color:gray;cursor:not-allowed}.question-mark{display:inline-block;position:relative;width:15px;height:15px;line-height:15px;text-align:center;border:1px solid #f2de9c;border-radius:50%;margin-left:2px;transition:background-color .3s}.question-mark:hover{background-color:#372820;cursor:pointer}.tooltip{position:relative;background-color:#333;text-align:center;padding:5px;border-radius:5px;max-width:200px;white-space:pre-line;z-index:10000000001;opacity:0;pointer-events:none;transition:opacity .1s ease-in-out;color:#f2de9c;font-size:13px}.tooltip.visible{opacity:1;pointer-events:auto}.tooltip.top{margin-left:50px}#sidebarHint{position:fixed;top:0;right:0;width:25px;height:100%;background-color:rgba(55,40,32,.8);color:#f2de9c;display:none;justify-content:center;align-items:center;font-size:20px;writing-mode:vertical-rl;text-orientation:upright}</style><script async src="https://www.googletagmanager.com/gtag/js?id=G-5C3C11THB3"><\/script><script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","G-5C3C11THB3")<\/script></head><div class="body"><div class="nav"><div id="nav1"></div><div class="nav1" id="phrase">当前阶段提示</div></div><div class="content" id="content"><div class="orderAndShouPai" id="orderAndShouPai"><button class="panel-header"><span class="triangle"></span> <b>武将手牌</b></button><div class="panel-content order" id="button"><div class="orderContainer" id="or1"><div class="order-body No1" id="1" style="--No-content:\'神诸葛亮丨一\'"><button class="shoupai">♣Q<br>测试</button> <button class="shoupai">♣Q<br>测试</button> <button class="shoupai">♣Q<br>测试</button> <button class="shoupai">♣Q<br>测试</button><div class="markedCard"><span class="mark">木马</span> <button class="shoupai G">♥10<br>测试</button> <button class="shoupai R">♦K<br>测试</button></div><button class="shoupai">♣Q<br>测试</button> <button class="shoupai">♣Q<br>测试</button> <button class="shoupai">♣Q<br>测试</button> <button class="shoupai">♣Q<br>测试</button></div></div><div class="orderContainer" id="or2"><div class="order-body No2" id="2" style="--No-content:\'卧龙诸葛丨二\'"><button class="shoupai G">♥10<br>暗牌</button> <button class="shoupai G">♥10<br>样式</button></div></div><div class="orderContainer" id="or3" style="--No-content:\'天候孔明丨三\'"><div class="order-body No3" id="3"></div></div><div class="orderContainer" id="or4" style="--No-content:\'诸葛亮丨四\'"><div class="order-body No4" id="4"></div></div><div class="orderContainer" id="or5" style="--No-content:\'武诸葛亮丨五\'"><div class="order-body No5" id="5"></div></div><div class="orderContainer" id="or6" style="--No-content:\'卧龙凤雏丨六\'"><div class="order-body No6" id="6"></div></div><div class="orderContainer" id="or7" style="--No-content:\'界卧龙诸葛丨七\'"><div class="order-body No7" id="7"></div></div><div class="orderContainer" id="or8" style="--No-content:\'界诸葛亮丨八\'"><div class="order-body No8" id="8"></div></div></div><div><div class="orderContainer"><div class="knownCards" id="knownCards"></div></div><div class="orderContainer"><div class="order-body paiduiCards" id="paiduiCards"></div></div><div class="orderContainer"><div class="knownCards quanBianYanXi" id="quanBian"></div><div class="knownCards quanBianYanXi" id="yanXi"></div></div></div></div><div class="width"></div><div class="cardDetail" id="cardDetail"><div class="space"></div><div class="detail"><div class="detail-body"><div class="suit r" id="heart">♥红桃 × 0</div><div class="suit" id="spade">♠黑桃 × 0</div><div class="suit" id="club">♣梅花 × 0</div><div class="suit r" id="diamond">♦方片 × 0</div><div class="suit r" id="hongsha">红杀 × 0</div><div class="suit" id="heisha" n>黑杀 × 0</div><div class="sha" id="sha">剩余出杀次数:指记入次数的杀</div><span>乱击/权变</span><div class="suitRec" id="suit"></div><br><span>博图</span><div class="suitRec" id="boTu"></div><br><span>上一张使用的牌</span><br><button class="shoupai R" id="lastUseCard">^^<br>•ω•</button><br><br><br><div id="guhuo" style="display:none">蛊惑牌</div><div class="function jizhan" id="jinzhi"></div><div class="function yanjiao" id="yanjiao">严教小抄</div><button class="function mizhuBTN" id="mizhu">糜竺小抄</button> <button class="function mizhu mySeatID" id="mySeatID1">座位:1</button> <button class="function mizhu mySeatID" id="mySeatID2">座位:2</button><div class="function res" id="result">结果样式:1 1 1 1 = 4</div></div></div><div class="width"></div><div class="type"><div class="cardTypeContainer"><div class="type-body type1" id="type1"><button class="cardType" id="test1">小抄</button> <button class="cardType">开发</button> <button class="cardType">小伙伴</button></div></div><div class="cardTypeContainer"><div class="type-body type2" id="type2"><button class="cardType">霜迟</button> <button class="cardType">孤独尊</button> <button class="cardType">无所谓</button> <button class="cardType">埃城</button> <button class="cardType">辉弥</button> <button class="cardType">天野</button> <button class="cardType">人富</button></div></div><div class="cardTypeContainer"><div class="type-body type3" id="type3"></div></div><div class="orderContainer"><div class="knownCards cardTypeDetail" id="cardTypeDetail"></div></div></div></div><div class="width"></div><div class="width"></div><div class="laya" id="laya"><div class="space"></div><button class="panel-header laya-header"><span class="triangle"></span> <b>快捷操作</b></button><div class="panel-content" id="layaDiv"><div class="switch-container"><div id="autoBotSwitchContainer"><span class="explanation">自动挂机<span class="question-mark" data-tooltip="AI接管挂机刷酒馆30亲密度 自动创建演武房间开始对战 建议点将张辽禁将只留标风 禁用其它SP武将可提高胜率 到身份演武房间列表后开启 打开开关即可助力脚本作者 领取限时至十月九日的体验 界小抄用户可以无限制使用 开关数字表示酒馆剩余时间 双击打开官阶百胜无尽挂机 ">?</span></span> <label class="switch"><input id="autoBotSwitch" type="checkbox" disabled="disabled"> <span class="slider"></span> <span class="status" id="autoBotStatus"></span></label></div><div><span class="explanation" id="autoExplanation"></span></div></div><div class="switch-container"><div><span class="explanation">盖主速刷<span class="question-mark" data-tooltip="主公点将黄盖一分钟苦肉自杀速刷 可用来刷武将百胜战功和官阶任务 保证已激活的账号在 7 天内登录过 一:登录小号创建自选身份密码房 二:多开大号加入房间点自动挂机 三:大号需双击自动挂机开始锁定 四:小号点将黄盖,打开盖主速刷 五:大号准备并保持两窗口在前台 ">?</span></span> <label class="switch"><input id="autoHGSwitch" type="checkbox" disabled="disabled"> <span class="slider"></span> <span class="status" id="autoHGStatus"></span></label></div><div><span class="explanation" id="autoHGExplanation"></span></div></div><div class="switch-container"><div><span class="explanation">加入互助<span class="question-mark" data-tooltip="点击加入小抄互相助力小组 每天自动助力三位小抄玩家 同时收到三位小抄玩家助力 默认为小抄给当前玩家助力 右侧可输入想要助力的玩家 “再”打开《加入互助》开关 该玩家可收到三个小抄助力 ">?</span></span> <label class="switch"><input id="autoInviteSwitch" type="checkbox"> <span class="slider"></span> <span class="status"></span></label></div><div><textarea class="invite-body" type="text" id="inviteName" required maxlength="10" size="10" placeholder="大西瓜"></textarea></div></div><button class="calRes" id="guanxing">自助观星</button> <button class="calRes" id="mail" disabled="disabled">一键领取邮箱物品</button> <button class="calRes" id="task" disabled="disabled">一键领取所有任务奖励</button></div></div><div class="store" id="store"><div class="space"></div><button class="panel-header"><span class="triangle"></span> <b>集市</b></button><div class="panel-content" id="storeDetail"><button class="storeDetail">集市霸王·壹300</button> <button class="storeDetail">集市霸王·贰200</button> <button class="storeDetail">集市霸王·叁100</button> <button class="storeDetail">会员商店·肆1100</button> <button class="storeDetail">稳定承载1100</button> <button class="storeDetail">极奢1100</button></div></div><div class="secKill" id="secKill"><div class="space"></div><button class="panel-header"><span class="triangle"></span> <b>秒杀连点器(悬停查看详情)</b></button><div class="panel-content" id="secKillDetail"><div class="left"><br><div><label class="switch" title="秒杀连点器,界小抄可用,不保证成功率"><input id="secKillItem1Switch" type="checkbox" disabled="disabled"> <span class="slider"></span> <span class="status"></span></label></div><br><div><label class="switch" title="秒杀连点器,界小抄可用,不保证成功率"><input id="secKillItem2Switch" type="checkbox" disabled="disabled"> <span class="slider"></span> <span class="status"></span></label></div><br><div><label class="switch" title="秒杀连点器,界小抄可用,不保证成功率"><input id="secKillItem3Switch" type="checkbox" disabled="disabled"> <span class="slider"></span> <span class="status"></span></label></div><br></div><div class="right"><span class="secKillDetailText">暂无数据</span> <span class="secKillDetailText">暂无数据</span> <span class="secKillDetailText">暂无数据</span></div></div></div><div class="chat" id="chat"><div class="space"></div><button class="panel-header"><span class="triangle"></span> <b>聊天(点击自动输入)</b></button><div class="panel-content chat-body"></div></div><div class="CDK"><button class="panel-header"><span class="triangle"></span> <b>兑换码(点击即兑换)</b></button><div class="panel-content"><div class="function res" id="CDK"><button class="calRes">小麦好帅</button></div></div></div><div class="tianguo"><button class="panel-header"><span class="triangle"></span> <b>统计</b></button><div class="panel-content"><button id="gamerecord" class="calRes" style="text-align:center">战绩胜率统计</button><div id="PlayerTianGuo" style="text-align:center">你的天过次数/总次数</div><div><div id="lottery"><a href="https://goka.top:8080/choujiang?username=" target="_blank" id="choujiang">点击查看祈愿台数据</a></div></div></div></div><button class="panel-header"><span class="triangle"></span> <b>设置</b></button><div class="setting panel-content"><div class="switch-container"><div><span class="explanation">皮肤体验<span class="question-mark" data-tooltip="该功能仅限于体验皮肤 喜欢还请购买支持画师 此功能随时失效!!!">?</span></span> <label class="switch"><input id="skinSwitch" type="checkbox"> <span class="slider"></span> <span class="status"></span></label></div><div id="skinStateButton" style="display:none"><span class="explanation">动态皮肤</span> <label class="switch"><input id="skinStateSwitch" type="checkbox"> <span class="slider"></span> <span class="status"></span></label></div><div><span class="explanation">屏蔽动态<span class="question-mark" data-tooltip="屏蔽其他人的动态皮肤 电脑卡顿的话可以打开">?</span></span> <label class="switch"><input id="skinStateBlockSwitch" type="checkbox"> <span class="slider"></span> <span class="status"></span></label></div></div><div class="switch-container"><div style="display:none"><span class="explanation">金色卡背</span> <label class="switch"><input id="cardBackSwitch" type="checkbox"> <span class="slider"></span> <span class="status"></span></label></div><div><span class="explanation">明牌框框 <span class="question-mark" data-tooltip="明牌展示在武将下面">? </span></span><label class="switch"><input id="seatUISwitch" type="checkbox"> <span class="slider"></span> <span class="status"></span></label></div><div><span class="explanation">五阶特效 <span class="question-mark" data-tooltip="其他角色显示五阶特效">? </span></span><label class="switch"><input id="generalSwitch" type="checkbox"> <span class="slider"></span> <span class="status"></span></label></div></div><div class="switch-container"><div><span class="explanation">自动签到 <span class="question-mark" data-tooltip="自动领取打卡签到的奖励">? </span></span><label class="switch"><input id="autoSignSwitch" type="checkbox"> <span class="slider"></span> <span class="status"></span></label></div><div><span class="explanation">跳体验卡 <span class="question-mark" data-tooltip="签到会有体验武将 如领取会污染将池 开启按钮跳过领取 月底记得手动领取">? </span></span><label class="switch"><input id="autoSignSkipSwitch" type="checkbox"> <span class="slider"></span> <span class="status"></span></label></div></div><div class="switch-container"><div><span class="explanation">领武将包<span class="question-mark" data-tooltip="每天登录,自动领取免费的武将包">?</span></span> <label class="switch"><input id="autoWuJiangSwitch" type="checkbox" disabled="disabled"> <span class="slider"></span> <span class="status"></span></label></div><div><span class="explanation">公会三敲<span class="question-mark" data-tooltip="每天自动公会三敲 无惧公会长的诫厉">?</span></span> <label class="switch"><input id="autoDrumSwitch" type="checkbox" disabled="disabled"> <span class="slider"></span> <span class="status"></span></label></div></div><div class="switch-container"><div><span class="explanation">月卡奖励<span class="question-mark" data-tooltip="自动领取月卡奖励">?</span></span> <label class="switch"><input id="autoYueKaSwitch" type="checkbox" disabled="disabled"> <span class="slider"></span> <span class="status"></span></label></div><div><span class="explanation">自动砍树<span class="question-mark" data-tooltip="每天登录自动砍树">?</span></span> <label class="switch"><input id="autoKanShuSwitch" type="checkbox" disabled="disabled"> <span class="slider"></span> <span class="status"></span></label></div></div><div class="switch-container"><div><span class="explanation">跳过弹窗<span class="question-mark" data-tooltip="跳过领取武将、MVP结算、出货弹窗 加快氪金速度">?</span></span> <label class="switch"><input id="skipWindowSwitch" type="checkbox"> <span class="slider"></span> <span class="status"></span></label></div></div></div><div class="width"></div><div class="ACContainer"><textarea class="AC-body" type="text" id="AC" name="AC" required placeholder="点击添加激活码 当前激活码未激活"></textarea> <button class="AC-head" type="submit" id="ACSubmit">激活</button></div><div style="text-align:center"><a href="https://afdian.com/@yimadaO_o" target="_blank">开发不易 如您喜欢 不妨支持小抄</a><div class="width"></div><a href="http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=cKPpLOOYkYcmay553CQWorRDL_8k1k9I&authKey=HrTX0FsXhf4f1H5BCJqTqAUJ7YzgVwhi2TEvvVqMpv1Hhsfrm9AtKlJ7Znfnr%2FK5&noverify=0&group_code=830137048" target="_blank">加群一起玩</a><div class="width"></div><a href="https://support.qq.com/products/664780/" target="_blank">提需求</a><div class="width"></div><a href="https://greasyfork.org/zh-CN/scripts/448004-%E4%B8%89%E5%9B%BD%E6%9D%80%E6%89%93%E5%B0%8F%E6%8A%84/versions" target="_blank">查看历史更新</a><div class="width"></div><div class="uuid id" id="uuid">id:</div><div class="width"></div><div class="uuid nickName" id="nickName">昵称:</div><div class="width"></div><div class="uuid guildID" id="guildID">公会数字ID:</div><div class="width"></div><div class="width"></div></div></div><script><\/script></div>';const gt='<head> <meta charset="UTF-8"> <style type="text/css"> ::-webkit-scrollbar { width: 5px; height: 12px; } ::-webkit-scrollbar-track { border: 1px solid rgb(5, 5, 5); } ::-webkit-scrollbar-thumb { background: rgb(95, 86, 63); } ::-webkit-scrollbar-thumb:hover { background: rgb(44, 44, 44); } .container { display: flex; /* Enables flexbox layout */ flex-wrap: wrap; /* Allows items to wrap to the next line */ /*gap: 20px; !* Optional: space between items *!*/ padding: 0; } .skinList { /*width: 110px; !* Set a fixed width for images *!*/ height: auto; /* Maintain aspect ratio */ user-select: none; } .skinContainer { /*width: 100px; !* Set a fixed width for images *!*/ padding: 10px; position: relative; display: inline-block; height: auto; /* Maintain aspect ratio */ border: 2px solid transparent; /* Default: no border */ transition: border-color 0.3s ease; /* Smooth transition */ } .overlay-text { position: relative; display: block; text-align: center; /* Center the text horizontally */ /*background: rgba(0, 0, 0, 0.5); !* Optional: background color for better readability *!*/ color: #f2de9c; /* Text color */ /*padding: 5px; !* Padding around the text *!*/ font-size: 13px; /*border-radius: 4px; !* Optional: rounded corners *!*/ } .skinContainer:hover { border-color: #f2de9c; /* Change the border color on hover */ } </style></head><body><div class="container" id="container0"> <div class="skinContainer"> <span class="overlay-text">史诗</span> <img class="skinList" id="102" src="https://web.sanguosha.com/220/h5_2/res/runtime/pc/general/seat/static/11211.png"> </div> <div class="skinContainer"> <span class="overlay-text">史诗</span> <img class="skinList" id="103" src="https://web.sanguosha.com/220/h5_2/res/runtime/pc/general/seat/static/11211.png"> </div> <div class="skinContainer"> <span class="overlay-text">史诗</span> <img class="skinList" id="104" src="https://web.sanguosha.com/220/h5_2/res/runtime/pc/general/seat/static/11211.png"> </div> \x3c!-- Add more divs with images as needed --\x3e</div><br><br><div class="container" id="container1"> <div class="skinContainer"> <span class="overlay-text">史诗</span> <img class="skinList" id="102" src="https://web.sanguosha.com/220/h5_2/res/runtime/pc/general/seat/static/11211.png"> </div> <div class="skinContainer"> <span class="overlay-text">史诗</span> <img class="skinList" id="103" src="https://web.sanguosha.com/220/h5_2/res/runtime/pc/general/seat/static/11211.png"> </div> <div class="skinContainer"> <span class="overlay-text">史诗</span> <img class="skinList" id="104" src="https://web.sanguosha.com/220/h5_2/res/runtime/pc/general/seat/static/11211.png"> </div> \x3c!-- Add more divs with images as needed --\x3e</div></body></html>';let yt=null;const vt=" 2.9.26.3",bt="增加设置记录功能,一次设置,到处能用<br>\n 增加多个校准时间,秒杀更准<br>\n 增加开关,跳过弹窗,氪金更快<br>\n 统计栏增加战绩记录功能<br>\n 界小抄可记录更多的战绩";var wt=null==(t=null==(e=document.getElementById("createSkinIframeSource"))?void 0:e.contentWindow)?void 0:t.document;function kt(){window.innerWidth=document.documentElement.clientWidth-window.padding;}function xt(){window.dispatchEvent(new Event("resize"));}let St;function It(){St&&clearTimeout(St),St=setTimeout((()=>{!function(){if(!SystemContext)return;fe.width=SystemContext.gameWidth*SystemContext.gameScale|0,fe.height=SystemContext.gameHeight*SystemContext.gameScale|0,fe.scale=SystemContext.gameScale,fe.seatUIs&&fe.seatUIs.length>0&&(Ct(),ze());let e={width:(SystemContext.gameWidth*SystemContext.gameScale|0)/window.devicePixelRatio,height:(SystemContext.gameHeight*SystemContext.gameScale|0)/window.devicePixelRatio};me.padding&&document.getElementById("createIframe")?(document.getElementById("bgDiv").style.width=document.documentElement.clientWidth+"px",document.getElementById("createIframe").style.height="100%",document.getElementById("createIframe").style.right="0px",document.getElementById("createIframe").style.top="0px"):document.getElementById("bgDiv").style.width=document.documentElement.clientWidth+"px";let t=document.getElementById("cusBGDiv"),n=document.getElementById("sgsBgVideo"),i=document.getElementById("sgsBgIMG"),a=document.getElementById("seatUI"),s=document.getElementById("rogueUI"),o=document.getElementById("centerUI"),l=((window.innerHeight*window.devicePixelRatio-SystemContext.gameScale*SystemContext.gameHeight)/(2*window.devicePixelRatio)+SystemContext.gameScale*SystemContext.gameHeight/2)/window.devicePixelRatio;t&&(t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,t.style.left=window.innerWidth/2+"px",t.style.top=l+"px");n.width=e.width,n.height=e.height,n.style.left=window.innerWidth/2+"px",n.style.top=l+"px",i.width=e.width,i.height=e.height,a.style.width=`${e.width}px`,a.style.height=`${e.height}px`,a.style.left=window.innerWidth/2+"px",a.style.top=l+"px",s.style.width=`${e.width}px`,s.style.height=`${e.height}px`,s.style.left=window.innerWidth/2+"px",s.style.top=l+"px",fe.centerX=window.innerWidth>e.width?e.width/2:window.innerWidth/2,fe.centerY=e.height/2,o.style.left=210*SystemContext.gameScale/window.devicePixelRatio+"px",o.style.top=52*SystemContext.gameScale/window.devicePixelRatio+"px",fe.cities.length>0&&Ue(fe.cities);}(),St=null;}),500);}async function Wt(e=!1){var t,n,i,a,s,o,c;if(e&&(null==(t=document.getElementById("injectCSS"))||t.remove(),null==(n=document.getElementById("seatUI"))||n.remove(),null==(i=document.getElementById("rogueUI"))||i.remove(),null==(a=document.getElementById("cusBGDiv"))||a.remove(),null==(s=document.getElementById("createIframe"))||s.remove(),null==(o=document.getElementById("createSkinIframe"))||o.remove(),ue.isFrameAdd=!1),!ue.isFrameAdd){window.addEventListener("resize",It),SystemContext._gameScreenType=SystemContext.gameScreenType,SystemContext._gameScale=SystemContext.gameScale,Object.defineProperty(SystemContext,"gameScreenType",{get:function(){return this._gameScreenType},set:function(e){this._gameScreenType!==e&&(this._gameScreenType=e,window.dispatchEvent(new Event("SGSresize")));}}),Object.defineProperty(SystemContext,"gameScale",{get:function(){return this._gameScale},set:function(e){this._gameScale!==e&&(this._gameScale=e,window.dispatchEvent(new Event("SGSresize")));}}),window.addEventListener("SGSresize",xt);try{document.getElementById("bgDiv").firstElementChild.draggable=!1,null==(c=document.querySelector("link[rel=stylesheet]"))||c.remove();}catch{}return function(){const e=new Image;let t="https://web.sanguosha.com/220/h5_2/res/assets/bigPng/propGet.png";e.src=t,e.onload=function(){const e=document.createElement("style");e.id="injectCSS",e.textContent=`\n :root {\n --my-background-image: url('${t}');\n }\n .sorderContainer {\n font-size: 13px; /* 默认字体大小,可以根据需要调整 */\n width: 100%;\n display: flex; /* 使用Flexbox布局 */\n align-items: center; /* 垂直居中对齐子元素 */\n width: 146px;\n z-index: 10000000000;\n // color: #f2de9c;\n user-select: none;\n text-align: left;\n transition: height 200ms;\n position: fixed;\n transformOrigin = 0 0\n }\n \n .sorder-head {\n display: flex; /* 使用Flexbox */\n align-items: center; /* 垂直居中 */\n justify-content: center; /* 水平居中 */\n font-weight: bolder;\n width: 10%;\n height: 25px;\n text-align: center;\n color: #f2de9c;\n margin-left: 3px;\n }\n \n \n .sorder-body {\n pointer-events: auto; /* 子元素可以接收鼠标事件 */\n height: auto;\n width: 100%;\n float: right;\n display: flex;\n flex-wrap: wrap; /* 允许内容自动换行 */\n overflow: hidden;\n z-index: 1;\n max-height: 48px; /* 设置一行内容的高度 */\n }\n\n /* 使用 ::after 模拟省略号 */\n .sorder-body.show-ellipsis::after {\n content: '...';\n position: absolute;\n bottom: 0;\n left: 50%;\n transform: translateX(-50%);\n text-align: center;\n color: #f2de9c;\n font-weight: bold;\n height: 20px;\n background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgb(0 0 0 / 80%));\n width: inherit;\n }\n\n /* 鼠标悬停时显示完整内容并隐藏省略号 */\n .sorder-body:hover {\n max-height: none;\n overflow: visible;\n }\n\n .sorder-body:hover::after {\n display: none;\n }\n\n .sorder-body:not(#paiduiCards) .shoupai:disabled { \n display: none;\n } \n .sorder-body:not(#paiduiCards) .shoupai.G {\n width: auto;\n } \n \n @keyframes fadeInLeftToRight {\n 0% {\n clip-path: inset(0 100% 0 0);\n opacity: 0;\n }\n 100% {\n clip-path: inset(0 0 0 0);\n opacity: 1;\n }\n }\n \n @keyframes fadeOutRightToLeft {\n 0% {\n clip-path: inset(0 0 0 0);\n opacity: 1;\n }\n 100% {\n clip-path: inset(0 100% 0 0);\n opacity: 0;\n }\n }\n \n .ac-tooltip {\n position: fixed;\n top: 100px;\n left: 50%;\n background-color: transparent;\n background-image: var(--my-background-image);\n cursor: pointer;\n background-size: 100% 100%;\n color: #F44336;\n font-size: 16px;\n border-radius: 4px;\n z-index: 9999;\n overflow: hidden;\n white-space: nowrap;\n padding: 16px 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n opacity: 0;\n visibility: hidden;\n transform: translateX(0);\n transition: opacity 1s ease-in-out, visibility 1s ease-in-out; \n }\n .ac-tooltip.green {\n background-color: transparent;\n color: #f2de9c;\n }\n .city{\n visibility: hidden;\n transition: opacity 1s ease-in-out, visibility 1s ease-in-out; \n background-color: rgba(55, 52, 39, 0.7);\n color: #f2de9c;\n align-items: center;\n justify-content: center;\n border-radius: 5px;\n text-align: center;\n flex-direction: column; /* 使flex布局垂直排列 */\n padding: 5px\n }\n hr {\n width: 100%;\n margin: 0\n }\n \n @keyframes blink {\n 50% {\n border-color: #f2de9c;\n }\n }\n .centerUI {\n width: 18px;\n height: 18px;\n background-color: #4e251f;\n border-radius: 4px;\n display: flex;\n border: 1px solid rgb(110 107 91);\n justify-content: center;\n align-items: center;\n cursor: pointer;\n box-shadow: 0 2px 4px rgba(0,0,0,0.3);\n visibility: hidden;\n }\n \n .centerUI::after {\n content: "!";\n font-family: Arial, sans-serif;\n font-size: 15px;\n color: #ffffff;\n font-weight: bold;\n }\n .centerUI:hover {\n background-color: rgb(134 74 58);\n }\n .show {\n animation: fadeInLeftToRight 1s forwards, blink 2s infinite;\n visibility: visible;\n }\n .hide {\n animation: fadeOutRightToLeft 1s forwards;\n visibility: hidden;\n }\n .window {\n width: 1024px;\n height: 600px;\n border: 2px solid #333;\n border-radius: 8px;\n box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);\n position: relative;\n background-color: #f5f5f5;\n overflow: hidden;\n }\n\n .window-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n background-color: #23201d;\n color: white;\n padding: 5px;\n cursor: move;\n }\n\n .window-header .title {\n font-weight: bold;\n padding-left: 10px;\n }\n\n .window-header .controls {\n display: flex;\n gap: 5px;\n }\n\n .window-header .controls button {\n background: transparent;\n border: none;\n color: white;\n cursor: pointer;\n padding: 5px;\n }\n\n .window-header .controls button:hover {\n background-color: rgba(255, 255, 255, 0.2);\n }\n\n .window-content {\n width: 100%;\n height: calc(100% - 40px);\n border: none;\n }\n\n .fullscreen {\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n z-index: 1000;\n }\n \n `,document.head.appendChild(e);};}(),function(){var e=document.createElement("div");e.id="seatUI",e.style.position="absolute",e.style.top="50%",e.style.left="50%",e.style.transform="translate(-50%, -50%)",e.style.pointerEvents="none",e.style.display="";var t=document.createElement("div");t.id="rogueUI",t.style.position="absolute",t.style.top="50%",t.style.left="50%",t.style.transform="translate(-50%, -50%)",t.style.pointerEvents="none",t.style.display="",me.seatUISwitch?e.style.display="block":(e.style.display="none",document.querySelectorAll("#seatUI > *:not(.city)").forEach((e=>e.style.display="none")));var n=document.createElement("div");n.id="centerUI",n.className="centerUI",n.style.position="absolute",n.style.pointerEvents="auto",n.onmouseover=function(){document.querySelectorAll("div.city").forEach((e=>{e.classList.remove("hide"),e.classList.add("show");}));},n.onmouseout=function(){document.querySelectorAll("div.city").forEach((e=>{e.classList.remove("show"),e.classList.add("hide");}));},t.appendChild(n),document.body.appendChild(e),document.body.appendChild(t);}(),function(){var e=document.getElementById("bgDiv");if(e){var t=document.createElement("div");t.id="cusBGDiv",t.style.position="absolute",t.style.top="50%",t.style.left="50%",t.style.transform="translate(-50%, -50%)",t.style.zIndex="0",t.style.pointerEvents="none";var n=document.createElement("video");n.className="bg-ani",n.id="sgsBgVideo",n.autoplay=!0,n.loop=!0,n.muted=!0,n.preload="auto",n.style.setProperty("object-fit","fill","important");var i=document.createElement("img");i.className="bg-ani",i.id="sgsBgIMG",i.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",i.style.zIndex="1",i.style.position="absolute",i.style.top="0",i.style.left="0",t.appendChild(n),t.appendChild(i),e.appendChild(t),window.dispatchEvent(new Event("resize"));}}(),function(){let e=document.getElementById("createIframe");if(!e){e=document.createElement("div"),e.id="createIframe",e.id="createIframe",e.className="createIframe",e.style.position="fixed",e.style.overflow="hidden",e.style.resize="vertical",e.style.top="31px",e.style.right="155px",e.style.width="230px",e.style.height="500px",e.style.zIndex="10000000000",e.style.display="flex",e.style.flexDirection="column",e.style.color="#f2de9c",e.style.background="rgb(35, 32, 29)",e.style.userSelect="none",e.style.textAlign="left",e.style.transition="height 200ms",e.style.borderRadius="8px",e.style.transformOrigin="top right",e.style.transform="translate(0px, 0px)";var t=document.createElement("p");t.id="header",t.className="header",t.style.margin="1px",t.style.userSelect="none",t.style.cursor="grab",t.style.display="flex",t.style.alignItems="center",t.style.fontSize="20px",t.style.borderRadius="5px";var n=document.createElement("span");n.id="title",n.style="margin-right: auto;",n.innerText="三国杀打小抄"+vt,e.appendChild(t),e.onmouseover=function(){document.querySelectorAll("div.city").forEach((e=>{e.classList.remove("hide"),e.classList.add("show");}));},e.onmouseout=function(){document.querySelectorAll("div.city").forEach((e=>{e.classList.remove("show"),e.classList.add("hide");}));};var i=document.createElement("button");i.innerText="-",i.id="toggle-me",i.style="text-align: center;color: #f2de9c;background: rgb(35, 32, 29);border-radius: 6px;width: 26px;height: 26px;border: 1px solid rgb(212, 212, 162);cursor: pointer;user-select: none;background: rgb(107, 30, 30);display: flex;align-items: center;justify-content: center;margin: 1px;font-size: 20px;",i.type="button",i.addEventListener("mouseover",(function(){i.style.backgroundColor="rgb(130, 30, 30)";})),i.addEventListener("mouseout",(function(){i.style.backgroundColor="rgb(107, 30, 30)";})),t.appendChild(n),t.appendChild(i),localStorage.getItem("DXCVersion")!=vt&&(h(`小抄已经更新到${vt}<br>${bt}`,"acTooltip",1e4,"green"),localStorage.setItem("DXCVersion",vt)),document.body.appendChild(e),yt=document.createElement("div"),yt.style="border: none;width: 230px;height: 100%;margin: 0px;overflow-y: auto;overflow-x: hidden;",yt.id="iframe-source",e.append(yt),yt.innerHTML=ft;yt.querySelectorAll("script").forEach((e=>{const t=document.createElement("script");e.src?(t.src=e.src,t.async=e.async):t.textContent=e.textContent,document.body.appendChild(t),e.remove();}));document.querySelectorAll(".panel-header").forEach((e=>{e.addEventListener("click",(function(){const e=this.nextElementSibling;this.classList.toggle("active"),e.style.maxHeight?e.style.maxHeight=null:e.style.maxHeight=e.scrollHeight+"px";}));})),document.querySelectorAll(".laya-header")[0].click(),document.querySelectorAll(".question-mark").forEach((function(e){e.addEventListener("mouseenter",(function(t){let n=document.createElement("div");n.classList.add("tooltip","top"),n.textContent=e.getAttribute("data-tooltip"),document.body.appendChild(n);const i=e.getBoundingClientRect();n.style.left=i.left+window.scrollX+i.width/2-n.offsetWidth/2+"px",n.style.top=i.top+window.scrollY-n.offsetHeight-8+"px",n.classList.add("visible"),e.addEventListener("mouseleave",(function(){n.classList.remove("visible"),setTimeout((()=>{n.remove();}),100);}));}));}));}a=document.createElement("div"),a.id="sidebarHint",a.innerText="拖到这里变为变为侧边栏,再次拖动取消侧边栏",document.body.appendChild(a),function(){function e(e,t,n){var i=e.target,a=i.checked;n=i.id;me[n]=a,"skinSwitch"==n&&1==a?document.getElementById("skinStateButton").style.display="block":"skinSwitch"==n&&0==a&&(document.getElementById("skinStateButton").style.display="none"),"seatUISwitch"==n&&1==a?document.getElementById("seatUI").style.display="block":"seatUISwitch"==n&&0==a&&(document.getElementById("seatUI").style.display="none");}if((t=document.getElementById("toggle-me")).onclick=function(){ue.closeIframe=!ue.closeIframe,ue.closeIframe?(document.getElementById("iframe-source").style.display="none",t.innerText="+",document.getElementById("createIframe").style.height="30px",document.getElementById("createIframe").style.opacity="0.6",document.getElementById("createIframe").style.width="75px",document.getElementById("title").innerText="小抄",document.getElementById("createIframe").style.resize="none",me.padding&&(me.padding=0,window.dispatchEvent(new Event("resize")),At=0,Bt=0,draggable.style.transform=`translate(${At}px, ${Bt}px)`)):(document.getElementById("iframe-source").style.display="block",t.innerText="-",document.getElementById("createIframe").style.height="500px",document.getElementById("createIframe").style.opacity="1",document.getElementById("createIframe").style.width="230px",document.getElementById("title").innerText="三国杀打小抄"+vt,document.getElementById("createIframe").style.resize="vertical");},document.getElementById("autoInviteSwitch").addEventListener("change",(e=>{var t;if(e.target.checked){var n=null==(t=document.getElementById("inviteName"))?void 0:t.value;"string"==typeof n&&0!==n.length&&(ue.inviteName=n,l("INVITE_NAME",ue.inviteName),m(`为目前机器所有账号绑定助力${ue.inviteName},如需更改/删除,更改/删除昵称重新打开开关`)),j(ue.inviteName.trim()||ue.nickname);}else r("INVITE_NAME");})),document.getElementById("guanxing").onmousedown=function(){Tt(Dt(d(ge.gxjson),"myWindowGuanXing","观星"));},document.getElementById("gamerecord").onclick=async function(){for(this.disabled=!0,function(e,t=[26,35,44,5,7]){const n=q.get("SevenDayResultWindow");n.uuid=e,ye.req=new Set(t),setTimeout((()=>{Array.from(ye.req,(e=>n.sendReq(e))),q.del("SevenDayResultWindow",1e3);}),0);}(ue.userID);ye.req;)await H(500);this.disabled=!1,ue.v&&await async function(e=ue.userID){return fetch(`https://goka.top:8080/gameRecords/get?username=${e}`,{method:"GET",headers:{"Content-Type":"application/json"}}).then((e=>e.json())).then((e=>(ve(e),e))).catch((e=>(console.error("Error:",e),[])))}();Tt(Dt(x(JSON.stringify(ye)),"myWindowGameRecord","游戏记录"));},document.getElementById("mizhu").onmousedown=function(){let e=document.querySelectorAll(".mizhu");Se.mySeats.length<=1?(e.forEach((e=>e.style.display="none")),qe(Array.from(De.shoupai(Se.mySeats[0]),(e=>Ae[e].number)))):Se.mySeats.forEach(((t,n)=>{e[n].style.display="block",e[n].innerText=Se.name(t),e[n].onclick=()=>{qe(Array.from(De.shoupai(t),(e=>Ae[e].number)));},0==n&&e[n].click();}));},0==window.padding){console.warn("closesidebar");var t=document.getElementById("toggle-me");console.warn("toggle"),t.click();}window.dispatchEvent(new Event("resize")),document.querySelectorAll(".switch").forEach((t=>t.addEventListener("change",e))),document.getElementById("ACSubmit").onclick=G;}(),function(){const e=document.getElementById("header"),t=document.getElementById("createIframe"),n=document.getElementById("sidebarHint");let i=!1,a=0,s=0,o=0,l=0,r=!1;const d=n=>{e.style.cursor="grabbing",i=!0,a=n.clientX||n.touches[0].clientX,s=n.clientY||n.touches[0].clientY,t.style.userSelect="none",t.style.willChange="transform",document.addEventListener("mousemove",c),document.addEventListener("mouseup",u),document.addEventListener("touchmove",c),document.addEventListener("touchend",u);};function c(e){if(!i)return;n.style.display="flex";const d=e.clientX||e.touches[0].clientX,c=e.clientY||e.touches[0].clientY;o+=d-a,l+=c-s,me.padding&&(me.padding=0,t.style.height="500px",window.dispatchEvent(new Event("resize"))),r||(r=!0,requestAnimationFrame((()=>{t.style.transform=`translate(${o}px, ${l}px)`,r=!1;}))),window.innerWidth-d<25?n.style.backgroundColor="rgba(55, 40, 32, 1)":n.style.backgroundColor="rgba(55, 40, 32, 0.8)",a=d,s=c;}function u(a){if(n.style.display="none",e.style.cursor="grab",i=!1,document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",u),document.removeEventListener("touchmove",c),document.removeEventListener("touchend",u),t.style.willChange="auto",window.innerWidth-(a.clientX||a.touches[0].clientX)<25&&"header"===e.id&&!me.padding){if(ue.closeIframe){document.getElementById("toggle-me").click();}me.padding=232,window.dispatchEvent(new Event("resize")),o=0,l=0,t.style.transform=`translate(${o}px, ${l}px)`;}}e.addEventListener("mousedown",d),e.addEventListener("touchstart",d);}(),function(){for(let e=11;e<=60;e++){const t=`https://web.sanguosha.com/220/h5_2/res/runtime/pc/Face/${e}.png`,n=document.createElement("img");n.src=t,n.classList.add("face"),n.onmousedown=()=>Le(`#${e}`,!1),document.getElementsByClassName("chat-body")[0].appendChild(n);}["昏君,昏君啊","主公,别开枪,自己人","能不能快一点儿呀,兵贵神速啊","小内再不跳,后面还怎么玩儿啊","小内啊,您老悠着点儿","不好意思,刚才卡了","你可以打的再烂一点儿吗","哥们儿,给力点儿行吗","你们怎么忍心就这么让我酱油了","我,我惹你们了吗","姑娘,你真是条汉子","三十六计,走为上,容我去去便回","人心散了,队伍不好带啊","风吹鸡蛋壳,牌去人安乐","哥,交个朋友吧","妹子,交个朋友吧","我从未见过如此厚颜无耻之人","你随便杀,闪不了算我输","这波不亏","请收下我的膝盖","你咋不上天呢","放开我的队友,冲我来","见证奇迹的时刻到了"].forEach(((e,t)=>{const n=document.createElement("span");n.classList.add("calRes"),n.textContent=e,n.onmousedown=()=>Le(`${e}`,!1),document.getElementsByClassName("chat-body")[0].appendChild(n);}));}();var a;}(),function(){let e=document.getElementById("createSkinIframe");if(!e){e=document.createElement("div"),e.id="createSkinIframe",e.className="createSkinIframe",e.style=" display: inline-block; z-index: 10000000000; display: none; width: 710px; height:500px; position: fixed; top: 0; bottom: 0; left: 0; right: 17%; background: rgb(35,32,29); margin: auto;";var t=document.createElement("p");t.id="header",t.className="header",t.innerText="请选择要替换的皮肤",t.style="style:display:inline-block;margin:1px;user-select:none;text-align:center;color: #f2de9c; cursor: pointer",(n=document.createElement("btn")).innerText="×",n.id="btnSkin",n.style="text-align:center;color: #f2de9c;background: rgb(40,40,40);border-radius:5px;margin-left:3px;border: 1px solid rgb(212,212,162);cursor: pointer;user-select:none;background: rgb(107,30,30);",t.append(n),e.appendChild(t),document.body.appendChild(e),yt=document.createElement("iframe"),yt.style="border: none; width: 710px; height:475px;margin: 0px;cursor: grab;",yt.id="createSkinIframeSource",e.append(yt),(wt=yt.contentWindow.document).open(),wt.write(gt),wt.close();}var n;(n=document.getElementById("btnSkin")).onmousedown=function(){document.getElementById("createSkinIframe").style.display="none";};}(),ue.isFrameAdd=!0,ht(!0)}}function Ct(){const e={ScaledHeight:fe.selfSeatUiUnscaledHeight*fe.scale};let t=fe.unscaledWidth*fe.scale,n=fe.unscaledHeight*fe.scale;fe.ScaleWidth=t,fe.ScaleHeight=n;let i=fe.height,a=fe.width;var s,o,l=e.ScaledHeight,r=fe.seatUIs.length;if(1!=r){s=t,o=n;var d,c,u=(d=fe.seatUIs).length-1,p=0,h=0;u<3?p=u:3==u?p=1:4==u||6==u?p=2:5!=u&&7!=u||(p=3),h=u-(c=u-p>>1)-p,Se.isShanHeTu&&3==r&&1==fe.friendGeneral&&(p=1,h=1);var m,f,g=1,y=0,v=0,b=0,w=0,k=fe.rightBarWidth*fe.scale;if(c>0){var x=s,S=o*c;for(b=.25*(i-l-S)|0,fe.verticalGap=b,S+=(c-1)*b,m=g+c,y=a-x-fe.paddingRight*fe.scale-k-0,v=(i-l-S-fe.paddingTop*fe.scale-fe.paddingBottom>>1)+(fe.paddingTop+10)*fe.scale+S+fe.leftRightTop;g<m;g+=1)v-=n,(f=d[g]).posX=(y-5|0)/window.devicePixelRatio,f.posY=(v+n|0)/window.devicePixelRatio,f.DisplayLocation="Right",v-=b;}if(p>0){var I=s*p;for(w=.07*(a-k-I)|0,fe.horizontalGap=w,m=g+p,y=(a-(I+=(p-1)*w)-k)/2+I+(a<=1600?fe.paddingLeftTopExtra:0),v=(fe.paddingTop+10)*fe.scale;g<m;g+=1)y-=t,(f=d[g]).posX=(y|0)/window.devicePixelRatio,f.posY=(v+n|0)/window.devicePixelRatio,f.DisplayLocation="Top",y-=w;}if(h>0){var W=o*h;for(W+=(h-1)*(b=.25*(i-l-W)|0),m=g+h,y=fe.paddingLeft*fe.scale,v=(i-l-W-fe.paddingTop*fe.scale-fe.paddingBottom>>1)+(fe.paddingTop+10)*fe.scale+fe.leftRightTop;g<m;g+=1)(f=d[g])&&(f.DisplayLocation="Left",f.posX=(y+0|0)/window.devicePixelRatio,f.posY=(v+n|0)/window.devicePixelRatio),v+=o+b;}}}function Et(e){if(fe.seatUIs=[],ze(),null===e)return;let t=Se.sequence(Se.mySeats[0]);fe.seatUIs=t.map((e=>({actualSeatID:Se.getOrder(e)+1}))),Ct(),ze();}function Dt(e,t,n){let i=document.getElementById("myWindow"+t);if(i)return i.style.display="block",i;const a=document.createElement("div");a.classList.add("window"),a.id=t;const s=document.createElement("div");s.classList.add("window-header");const o=document.createElement("div");o.classList.add("title"),o.innerText=n;const l=document.createElement("div");l.classList.add("controls");const r=document.createElement("button");r.innerText="⬜";const d=document.createElement("button");d.innerText="❌",l.appendChild(r),l.appendChild(d),s.appendChild(o),s.appendChild(l);const c=document.createElement("iframe");return c.classList.add("window-content"),c.srcdoc=`\n <html>\n <head><meta charset="utf-8" /><title>${t}</title></head>\n <body>${e}</body>\n </html>\n `,a.appendChild(s),a.appendChild(c),document.body.appendChild(a),{windowDiv:a,maximizeBtn:r,closeBtn:d}}function Tt(e){const{windowDiv:t,maximizeBtn:n,closeBtn:i}=e;let a=!1;n.addEventListener("click",(()=>{a?t.classList.remove("fullscreen"):t.classList.add("fullscreen"),a=!a;})),i.addEventListener("click",(()=>{t.style.display="none";}));}let At=0,Bt=0;function _t(e,t=0){let n=wt.getElementById("container"+t);n&&n.name!=e&&(n.name=e,n.innerHTML="",e&&(n.append(Lt(0,e)),Array.from(ge.skinMap[e]??[e]).forEach((t=>{if(ge.skinDict[t])if(1876941565==ue.userID||1145364533==ue.userID)for(let i=1;i<=15;i++){const a=t+i.toString().padStart(2,"0"),{name:s="",level:o="",state:l=!1}=ge.skinDict[t][a]||{};n.append(Lt(a,e,`${s}<br>${o} ${l?"动态":"静态"}`));}else Object.entries(ge.skinDict[t]).forEach((([t,{name:i,level:a,state:s}])=>{n.append(Lt(t,e,`${i}<br>${a} ${s?"动态":"静态"}`));}));}))));}function Lt(e,t,n="原画<br>静态"){var i=document.createElement("div"),a=document.createElement("img"),s=document.createElement("span");return s.className="overlay-text",s.innerHTML=n,i.className="skinContainer",a.id=e,a.className="skinList",a.src=0===e?"https://web.sanguosha.com/220/h5_2/res/runtime/pc/general/seat/static/generalface_"+t+".png":"https://web.sanguosha.com/220/h5_2/res/runtime/pc/general/seat/static/"+e+".png",a.onerror=function(){this.style.display="none",this.parentNode.style.display="none";},a.onclick=function(e){var n;e.stopPropagation(),ue.UsedGeneralSkinID.UsedGeneralSkinID[t]!=this.id&&(ue.UsedGeneralSkinID.UsedGeneralSkinID[t]=this.id,l(ue.account+"::UsedGeneralSkinID",ue.UsedGeneralSkinID)),document.getElementById("createSkinIframe").style.display="none",null==(n=q.find("WindowLayer","ChangeSkinWindow"))||n.Close();},i.appendChild(s),i.appendChild(a),i}function Ot(e,t){let{name:n,number:i,color:a}=Ae[e??0];if(!(void 0===e||e&&n&&void 0!==Ie.name[n]))return;let s=De.unknown;(e?[n]:Object.keys(Ie.name)).forEach((e=>{let t=s.filter((t=>Ie.name[e].has(t))).length,n=document.getElementById(e);n.textContent=t>1?t+e:e,n.disabled=t<=0;})),(e?[5,6].filter((t=>Ie.color[t].has(e))).concat(a):[1,2,3,4,5,6]).forEach((e=>{var t;let n=s.filter((t=>Ie.color[e].has(t))).length,i=document.getElementById(["","heart","club","spade","diamond","hongsha","heisha"][e]);i.innerHTML=null==(t=i.innerHTML)?void 0:t.replace(/-?[0-9]+/,String(n));})),e?Ie.query.has(e)&&Ie[e].plot(0==t?0:1):Ie.draw();}var Rt=[1562902854,1678425373];const Gt=function(){const e="function"==typeof window.requestIdleCallback;return console.warn("Use IdleCallback",e),function(t,n=500){if(e){const e=window.requestIdleCallback(t),i=setTimeout((()=>{window.cancelIdleCallback(e),t();}),n);return ()=>clearTimeout(i)}return setTimeout(t,0)}}();function Mt(e){var t,n,i,a,s,r,d,c,u,p,h,f,g,y,v,b,w,k,x,S,I,W;if(!e)return;if(null==(t=e.startsWith)?void 0:t.call(e,"SwitchScene"))Gt((()=>{var t,n;let i=q.scene=e.slice(e.lastIndexOf("-")+1);xe.end(N.includes(i)),document.getElementById("task").click(),"TableScene"==i?ue.autoBotSwitch&&ke.delay("auto",(()=>z((()=>ue.autoBotSwitch&&q.readyStart()),20)),8e3):"HallScene"==i?!0===ue.autoBotSwitch&&(m("5秒后开始酒馆自动挂机"),ke.delay("auto",(()=>z((()=>!0===ue.autoBotSwitch&&q.newRoom()),10,1e3)),5e3)):["NewPaiWeiScene","DouDiZhu2023Scene","RogueLike1v1Scene","RogueLikeBigMapScene"].some((t=>e.endsWith(t)))&&(!0===ue.autoBotSwitch&&(null==(t=document.getElementById("autoBotSwitch"))||t.click()),9===ue.autoBotSwitch&&(null==(n=document.getElementById("autoHGSwitch"))||n.click()));}));else if(null==(n=e.endsWith)?void 0:n.call(e,"View"))"TreasureView"==e&&X();else if(null==(i=e.endsWith)?void 0:i.call(e,"Window"))"MailWindow"==e?ee():"ChangeSkinWindow"==e?me.skinSwitch&&wt.getElementsByClassName("skinList").length>0&&(document.getElementById("createSkinIframe").style.display="inline-block"):"SelectSkinWindow"==e?9!=ue.autoBotSwitch&&U((()=>q.find("WindowLayer",e))).then((e=>null==e?void 0:e.Close())):"SelectCardWindow"==e?!0===q.flag?Q(!0,!0):ue.v&&Q():"WuGuFengDengWindow"==e&&!0===q.flag?q.wugu():["SelectGeneralWindow","SelectGeneralHappyWindow"].includes(e)&&ue.autoBotSwitch?setTimeout((()=>{U((()=>q.find("WindowLayer",e))).then((e=>{var t;if(!(null==(t=null==e?void 0:e.generalUis)?void 0:t.length))return;let n=-1,i=null;e.generalUis.some((e=>{var t;if(null==e?void 0:e.dianJiangSk)return i=e;let a=(null==(t=null==e?void 0:e.generalInfo)?void 0:t.quality)||0;a>n&&(n=a,i=e);})),null==i||i.sureBtnClick(),9!=ue.autoBotSwitch&&setTimeout((()=>null==i?void 0:i.sureBtnClick()),500);}));}),3e3):me.skipWindowSwitch&&["GeneralOpenResultWindow","GetPropSpecialWindow","GameMvpWindow"].includes(e)?z((()=>U((()=>q.find(null,e)),10).then((e=>{if(Array.isArray(e))e.forEach((e=>null==e?void 0:e.Close()));else {if(!(null==e?void 0:e.Close))return "done";e.Close();}})))):"AdPushWindow"==e&&U((()=>q.find("WindowLayer",e))).then((e=>e.curViewList[0].closeClicker()),m("小抄已经为你跳过广告和祈愿台出货播报"));else if(void 0===e.className)return;let{ProtoObj:C,className:D,SeatID:T,SrcSeatID:A,targetSeatID:B,SpellID:_,Param:L,Params:O,Datas:R,DataCount:G,CardCount:P,CardIDs:K,FromID:V,FromZone:J,FromPosition:F,FromZoneParam:$,ToID:Z,ToZone:Y,ToPosition:te,ToZoneParam:ne,MoveType:ie,Type:ae}=e;var se;if(!ue.userID&&e.userID&&["ClientLoginRep","ClientUserDataCounterNtf","ClinetNetSpeedNtf","SmsgUpdateTaskListToClient","ClientGuildMemberChangeNtf"].includes(D)&&(Object.assign(ue,{userID:e.userID,nickname:e.Nickname||ue.nickname||"",account:e.Account||localStorage.LastUserName||localStorage.SGS_LASTLOGIN_ACCOUNT||localStorage.SGS_LASTLOGIN_ACCOUNT1||ue.account||""}),ue.UsedGeneralSkinID=o(ue.account+"::UsedGeneralSkinID",ue.UsedGeneralSkinID),Rt.includes(ue.userID)&&(window.SGSMODULE=[]),me.autoSignSwitch&&async function(e=!1){await H(1e4);const t=q.get("DailySignNewView",!1);if(2==(null==t?void 0:t.signState))for(let n=0;n<t.itemList.length;n++){let i=t.itemList[n].baseData.ID;9020101!=i&&i.toString().startsWith("90")&&e||1==t.itemList[n].type&&(t.itemList[n].OnSignClick(),m("自动签到已完成<br>如需关闭,可在小抄设置中关闭"),await H(500));}for(let n=0;n<t.totalItemList.length;n++)3==t.totalItemList[n].type&&t.totalItemList[n].OnSignClick()&&await H(500);q.del("DailySignNewView",1e4);}(me.autoSignSkipSwitch),se=ue.userID,be[se]?ve(be[se]):be[se]=ye,Promise.all([Wt(),U((()=>{var e;const t=q.get("QldjChooseRuleWindow");let{clientId:n,nickname:i,guildID:a,guildName:s,Level:o,vipLevel:l}=(null==(e=null==t?void 0:t.seat)?void 0:e.playerInfo)||{};return q.del("QldjChooseRuleWindow"),n!=ue.userID||!i||!s&&a?null:(Object.assign(ue,{nickname:i,guildID:a,guildName:s,Level:o,vipLevel:l}),i)}),30,1e3)]).then((()=>{!async function(e=ue.userID){try{const t=await fetch(`https://goka.top:8080/setting?username=${e}`,{method:"GET",headers:{"Content-Type":"application/json"}});if(!t.ok)throw new Error(`Failed to fetch settings: ${t.statusText}`);const n=await t.json(),i={};return n.forEach((e=>{i[e.settingKey]=e.value;})),he.forEach((([e,t,n])=>{const a=document.getElementById(e);a&&(a.checked=o(t)??"true"===(null==i?void 0:i[e])??n);})),i}catch(t){return console.error("Error fetching settings:",t),{}}}(ue.userID);let e=document.getElementById("uuid");e.innerText="id:"+ue.userID,e.onclick=function(){Le(ue.userID,!1),e.innerText="复制成功",setTimeout((()=>{e.textContent="id:"+ue.userID;}),"500");};let t=document.getElementById("nickName");t.innerText="昵称:"+ue.nickname,t.onclick=function(){Le(ue.nickname,!1),t.innerText="复制成功",setTimeout((()=>{t.textContent="昵称:"+ue.nickname;}),"500");},document.getElementById("guildID").innerText="公会数字ID:"+ue.guildID,E(),document.getElementById("inviteName").setAttribute("placeholder",ue.nickname||""),o("INVITE_NAME")&&o("INVITE_NAME")!=ue.Nickname&&(document.getElementById("inviteName").value=o("INVITE_NAME")),me.autoInviteSwitch&&async function(e=2e4){var t;let n=0;for(;!ue.nickname||!ue.userID;)if(await new Promise((e=>setTimeout(e,2e3))),n+=2e3,n>=e)return void m("没办法获取到昵称用于助力 请重新登录");j((null==(t=ue.inviteName)?void 0:t.trim())||ue.nickname);}();}))),"ClientGeneralSkinRep"==D){void 0===Se.mySeats[0]&&5==ae&&e.ClientID<10&&(Se.setMyID(e.ClientID),Et());let t=e.GeneralSkinList[0],n=Se.find(Se.mySeats[0],t.GeneralID,!0);if(t.GeneralID!=n&&me.skinStateBlockSwitch&&(t.state=0),me.skinSwitch&&n){if([46,479].includes(t.GeneralID)&&(document.getElementById("sgsBgIMG").src="https://web.sanguosha.com/10/pc/res/assets/runtime/general/maxBig/604701.png",setTimeout((function(){document.getElementById("sgsBgIMG").src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";}),2e4)),ue.UsedGeneralSkinID.UsedGeneralSkinID[n]){let[e,i]=String(ue.UsedGeneralSkinID.UsedGeneralSkinID[n]).split("_").map((e=>parseInt(e)));t.SkinID=e,t.skin_type=i||0;}t.state=me.skinStateSwitch?1:0;}}else if("MsgReconnectGame"==D);else if("ClientOfficerInfoRep"==D)ue.curOfficerLv=e.curOfficerLv;else if("decodeSSCChatmsgNtf"==D)11==C.scene&&(C.scene=2);else if("ClientRoleGeneralStarRep"==D)me.generalSwitch&&(e.Star>=0&&(e.Star=4),C.star>=0&&(C.star=4));else if("ClientGameRecordInfoRep"==D)(null==C?void 0:C.query_uid)==ue.userID&&[26,35,44,5,7].includes(null==C?void 0:C.id)&&(null==(a=null==ye?void 0:ye.req)||a.delete(C.id),0==(null==(s=ye.req)?void 0:s.size)&&delete ye.req,(null==(r=null==C?void 0:C.all_record)?void 0:r.length)&&async function(e,t){let n=ye[e];n||(ye[e]=n={});let i=!1;t.forEach((({figure:e,game_result:t,game_time:a,game_over_time:s,used_general:o,label_mode:l})=>{255==t||n[s]||(n[s]={shenfen:e,result:t||0,duration:a,general:null==o?void 0:o.map((e=>ge.generalDict[e]||e))},i=!0);})),i&&!ye.req&&l("gameRecord",be);try{ue.v&&await fetch("https://goka.top:8080/gameRecords/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({[ue.userID]:ye})});}catch(a){console.error("Error:",a);}}(C.id||0,C.all_record));else if("DbsCcUserGoodshintNtf"==D)2010==ae&&"object"==typeof e.GoodsList&&(ue.goods=e.GoodsList);else if("decodeClientSecretInfoRep"==D){if(Object.keys(ue.goods).length>0){ge.currentSec=C.secId;for(let e of ue.goods)Oe(ge.currentSec,e.GoodsBaseID,e.ChangeCount,C.openTime),M(C.secId,e.GoodsBaseID,C.openTime,C.levelId,e.ChangeCount);}}else if("decodeClientTavernInfoRep"==D){let e=(null==(d=null==C?void 0:C.tavern_info)?void 0:d.day_quest_finished_cnt)??0;if(ue.autoBotStatus=30-e,ue.autoBotInfinite||document.querySelector(".status").style.setProperty("--bot-status",`"${ue.autoBotStatus.toString().padStart(2,"0")}"`),e>=30){let t=document.getElementById("autoBotSwitch");(null==t?void 0:t.checked)&&!ue.autoBotInfinite&&t.click(),m(`今日已获得亲密度:${e}<br>恭喜你完成任务~`);}else e>0&&m(`今日已获得亲密度:${e}还差 ${30-e} 亲密度<br>继续努力吧~`);}else if("ClientSecKillInfoRep"==D)Ve(e.Data);else if("decodeRogueLikeDataSync"==D)Ke(C);else if("ClientActivitysetDataRep"==D)Gt((()=>{Ke();}));else if("SmsgGamePlayerDead"==D)!0!==ue.autoBotSwitch||ue.autoBotInfinite||T!=Se.mySeats[0]||setTimeout((()=>{var e,t,n,i,a;(null==(n=null==(t=null==(e=q.gamescene)?void 0:e.seatContainer)?void 0:t.seatUIs)?void 0:n.reduce(((e,t,n,i)=>{var a,s,o,l,r;return e+((null==(a=null==t?void 0:t.seat)?void 0:a.figure)==i[0].seat.figure||(null==(l=null==(o=null==(s=null==t?void 0:t.seat)?void 0:s.playerInfo)?void 0:o.showName)?void 0:l.includes("金"))?1:-1)*(null==(r=null==t?void 0:t.seat)?void 0:r.currentHp)}),0))<0&&(null==(a=null==(i=q.gamescene)?void 0:i.topMenu)||a.onClickBack(),U((()=>q.find("PromptLayer","ConfirmWindow"))).then((e=>{var t;if("退出游戏"!=(null==(t=null==e?void 0:e.confirmData)?void 0:t.title))return;e.checkBox.selected=!0;let n=e.confirmData.buttonArr.find((e=>"确定"==e.label));n.callBack&&n.thisObject&&n.callBack.apply(n.thisObject,n.callBackParams),e.confirmData.clickClose&&e.RemoveFromParent();})));}),1e4);else if("MsgGameDealCharacter"==D){if(1099193522==ue.userID&&"undefined"!=typeof Allows&&void 0!==ae&&1==ae){var oe=Math.floor(Math.random()*Allows.length+1);document.getElementById("title").innerText="选"+oe;}}else if("GsCModifyUserseatNtf"==D)e.IsGameStart&&(Se.update(!1,e.Infos.map((e=>parseInt(e.SeatID)||0))),console.warn(D,"游戏人数:"+Se.size+", 我的座位:"+Se.mySeats,e.Infos));else if("decodeGsClientUserSeatFlagNtf"==D)Se.update(!1,C.seatinfo.map((e=>parseInt(e.seat_id)||0))),console.warn(D,"游戏人数:"+Se.size+", 我的座位:"+Se.mySeats,C.seatinfo);else if("GsCUpdateRoleDataNtf"==D)void 0===Se.mySeats[0]&&58===e.StateID&&(Se.setMyID(T),console.warn(D,"游戏人数:"+Se.size+", 我的座位:"+Se.mySeats,Se.seatIDs));else if("GsCFirstPhaseRole"==D)void 0!==T&&(Se.firstID=T,console.warn("先手位置:"+Se.firstID));else if("MsgGameRoundNtf"==D)e.isPassed?(xe.isPassed=e.isPassed,ze()):Se.size||(Se.size=8,Se.update(!0));else if("MsgGameOver"==D||"ClientRecommendShopItemRep"==D||"ClientLeavetableRep"==D);else if("decodeRougeBaseInfoRep"==D)fe.friendGeneral=(null==(c=null==C?void 0:C.friendGeneral)?void 0:c.length)??fe.friendGeneral;else if("MsgGamePlayCardNtf"==D)xe.ready(e.CardList);else if("SmsgGameSetCharacter"==D)void 0===Se.mySeats[0]&&Se.isDouDiZhu&&1==e.Infos.length&&Se.setMyID(e.Infos[0].SeatID),e.Infos.forEach((({SeatID:e,CharacterID:t})=>{Se.setGeneral(e,t);}));else if("GsCGuoZhanSetCharacter"==D)null==(u=e.GeneralData)||u.forEach((({index:e,cardID:t})=>{Se.setGeneral(T,t,e);}));else if("MsgGameTurnNtf"==D)xe.enter(e.TurnCnt);else if("GsCGamephaseNtf"==D)xe.enter(null,e.Round,T);else if("GsCUpdateRoleDataExNtf"==D)xe.currentID==T&&1==e.DataID&&Array.isArray(e.Datas)&&(document.getElementById("sha").innerText="剩余出杀次数:"+Math.max(0,R[2]-R[1]));else if("ClientHappyGetFriendHandcardRep"==D)Se.find(e.seatId,[7004,2087,3048])&&new De(e.seatId).show(e.Cards);else if("PubGsCUseCard"==D)Se.mySeats[0]==T&&Re([e.CardID]),xe.currentID==T&&Se.find(xe.currentID,[7003,2086,3047])&&1==e.useType&&1!=e.fromZone&&!e.isSend?(xe.spellSpace[7011]||(xe.spellSpace[7011]={count:0,color:new Set}),3!=Ae[e.CardID].type&&xe.spellSpace[7011].count++,xe.spellSpace[7011].color.add(Ae[e.CardID].c),document.getElementById("suit").innerHTML="["+xe.spellSpace[7011].count+"]"+Array.from(xe.spellSpace[7011].color).join("")):xe.currentID==T&&Se.find(xe.currentID,[330,1068])&&1==e.useType&&!e.isSend&&(document.getElementById("suit").innerHTML=Ae[e.CardID].cn);else if("PubGsCUseSpell"==D)Se.mySeats[0]==T&&1==K.length&&Re(K),2143==_?(xe.spellSpace[_]||(xe.spellSpace[_]=new Set),K.forEach((e=>xe.spellSpace[_].add(Ae[e].c))),document.getElementById("suit").innerHTML=Array.from(xe.spellSpace[_]).join("")):[3157,3511].includes(_)&&0!=K.filter((e=>e>0)).length&&(A==Se.mySeats[0]||ue.v)?xe[_]=K:([3193,3185,3138].includes(_)||3161==_)&&xe.phase--;else if("GsCRoleOptTargetNtf"==D)if(945==_&&0==L&&(null==O?void 0:O.length)>0)!async function(e,t=!1){function n(e,...t){let n=e.slice();for(let i=0;i<n.length;i++){for(let e=0;e<t.length;e++)if(n[i]-=t[e][i],n[i]<0)return !1;if(i>0&&n[i]>=2)return 0}return n}let i=e.reduce(((e,t)=>(e[0]++,e[t]++,e)),Array(14).fill(0)),a=Math.floor(i[14]/2),s=new Map([[0,[Array(14).fill(0)]]]);for(let r=1;r<=13;r++){let e=i[r];if(0!=e)for(let t of Array.from(s.keys()).sort(((e,t)=>t-e))){let n=s.get(t);for(let i=1;i<=e;i++){let e=t+r*i;if(e>a)break;s.has(e)||s.set(e,[]);for(let t=0;t<n.length;t++){let a=n[t].slice();a[0]+=i,a[r]+=i,s.get(e).push(a);}}}}s.delete(0);let o=new Map;for(let r of Array.from(s.keys()).sort(((e,t)=>t-e))){let e=s.get(r);for(let t=0;t<e.length;t++)for(let a=t;a<e.length;a++){let s=n(i,e[t],e[a]);s&&(o.has(s[0])||o.set(s[0],[]),e[t][0]<=e[a][0]?o.get(s[0]).push([e[t],e[a],s]):o.get(s[0]).push([e[a],e[t],s]));}}let l=document.getElementById("result");l.innerHTML="",Array.from(o.keys()).sort(((e,t)=>e-t)).some((e=>{if(o.get(e).sort(((e,t)=>e[0][0]-t[0][0])).forEach((([e,n,i])=>{let a=document.createElement("button");a.className="calRes";let s=document.createElement("span"),o=document.createElement("span");s.innerText=e.flatMap(((e,t)=>t>0?Array(e).fill(_e(t,!1)):[])).join("+"),o.innerText=n.flatMap(((e,t)=>t>0?Array(e).fill(_e(t,!1)):[])).join("+"),a.appendChild(s),a.insertAdjacentHTML("beforeend","<span>=</span>"),a.appendChild(o),a.title="点击复制",a.onclick=function(){Le(this.innerText,!0);},t&&(a.title="点击“=”左侧或右侧的数字,将被点击一侧的数字分配给自己,另一侧的分配给张昌蒲",s.className="yanjiaospan",o.className="yanjiaospan",s.onclick=function(t){t.stopPropagation(),q.yanJiao([e,n,i],2);},o.onclick=function(t){t.stopPropagation(),q.yanJiao([e,n,i],0);}),l.appendChild(a);})),l.children.length>=5)return !0})),""===l.innerHTML?l.innerHTML='<span class="textRes">【严教】无解!</span>':t&&l.insertAdjacentHTML("afterbegin","界小抄:点下方数字可以自动分配牌<br>点击想要分配给自己的一组数字即可");}(O.map((e=>Ae[e].number)),ue.v&&T==Se.mySeats[0]);else if(3440==_&&Se.mySeats.includes(T)&&0==L&&(null==O?void 0:O.length)>0)28==ae?Qe(O.map((e=>Ae[e].number)),new De(T).cards.map((e=>Ae[e.id].number))):Qe();else if(11003==_&&0==L&&(null==O?void 0:O.length)>0&&A!=Se.mySeats[0]&&me.v)document.getElementById("result").innerHTML='<span class="textRes"> 【锻造】<br>'+O.map((e=>Ae[e].ncn)).join("<br>")+"</span>";else if(976==_&&L)document.getElementById("jinzhi").innerHTML="下一次锦织所需牌:"+(L+1);else if([7016,7017].includes(_)&&(null==O?void 0:O.length)>0&&(A==Se.mySeats[0]||ue.v)){xe[_]=O.slice();let e=Array.from(new Set(new De(L).cards.map((({key:e})=>e)))).sort(((e,t)=>t-e)),t=Array.from(new Set(new De(255,1).cards.slice(0,Se.isGuoZhan?void 0:2).map((({key:e})=>e)))).sort(((e,t)=>t-e)),{yes:n,no:i}=O.reduce(((n,i)=>{let{keys:a}=Ce.findKZ(i);return void 0!==e.find((e=>a.includes(e)))&&n.yes.push(i),void 0!==t.find((e=>a.includes(e)))&&n.no.push(i),n}),{yes:[],no:[]}),a=document.getElementById("result");2==i.length?n=O.filter((e=>!i.includes(e))):1==n.length&&(i=O.filter((e=>!n.includes(e)))),1==n.length||2==n.length?(a.innerHTML='<span class="textRes">【宴戏】'+n.map((e=>Ae[e].ncn)).join("/")+"</span>",xe[_]=n.concat(O.filter((e=>!n.includes(e))))):a.innerHTML='<span class="textRes">【宴戏】未知</span>';let s=new De(L).show(xe[_][0]).concat(new De(255,1,Se.isGuoZhan?null:1).show(xe[_].slice(-2)));3==n.length?Ce.pack(s):1==n.length?Ce.pack(s.slice(1,3)):2==n.length&&(Ce.pack(s.slice(0,2)),Ce.pack(s.slice(1,3))),O.forEach((e=>{a.innerHTML+='<span class="textRes'+(n.length<3&&n.includes(e)?" textRes":"")+'">'+Ae[e].ncn+":"+[[n,"手牌"],[i,"牌堆"]].filter((([t,n])=>t.includes(e))).map((([e,t])=>t)).join("/")+"</span><br>";}));}else [4,5,921,372,811,357,3119,501,3437].includes(_)&&(null==O?void 0:O.length)>0||[851,361,774,3310].includes(_)&&0==L&&(null==O?void 0:O.length)>0?void 0!==B&&255!==B&&new De(B).show(O):943==_&&0==L&&1==(null==O?void 0:O.length)?new De(255,1,1).show(O):898==_&&0==L&&(null==O?void 0:O.length)>2?void 0!==A&&255!==A&&new De(A).show(O.slice(1,O[0]+1)):(987==_||988==_)&&1==L&&(null==O?void 0:O.length)>2?void 0===B||255===B||A!=Se.mySeats[0]&&!ue.v||new De(B).show(O.slice(-O[1])):3266==_&&0==L&&(null==O?void 0:O.length)>0?void 0===B||A!=Se.mySeats[0]&&!ue.v||new De(B,255==B?1:5,1).show(O.filter(((e,t)=>t%3==1))):3483==_&&1==L?(null==O?void 0:O.length)>2&&void 0!==B&&255!==B?new De(B).show(O.slice(-O[1])):O[0]>0&&(xe[_]=O[0]):(7010==_||7011==_)&&(null==O?void 0:O.length)>0&&255==B?(xe.spellSpace[7009]=O.slice(),(A==Se.mySeats[0]||ue.v)&&Ce.pack(new De(255,1,1).show(O))):2900==_&&28==ae&&Se.setGeneral(B,O[2],O[1],!0);else if("CGsRoleSpellOptRep"==D)2022==_?Se.setGeneral(T,R[0],R[1],!0):7009==_?(null==(p=xe[7009])||p.pop(),(null==(h=xe[7009])?void 0:h.length)||new De(255,1,1).show(R)):3336==_?new De(255,1,-1).show(null==(f=null==R?void 0:R.slice())?void 0:f.reverse()):R.length>0&&15==_&&10==ae&&async function(e){let t={tianGuo:e,username:ue.userID,officerLv:ue.curOfficerLv,getData:!1};fetch("https://goka.top:8080/le",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).then((e=>e.json())).then((e=>{document.getElementById("PlayerTianGuo").innerHTML="你的天过次数/总次数 <br>"+e.PlayerTianGuo+"/"+e.PlayerCount+" = "+(e.PlayerTianGuo/e.PlayerCount).toFixed(2);})).catch((e=>console.error("Error:",e)));}(1==Ae[R[0]].color);else if("PubGsCMoveCard"==D){if(K=K.slice(),0===P||0===ie||11===Y||e.isSend)return;if(713==_&&21==ie&&P==K.length-2){let e=K.splice(0,1)[0];K.splice(e,1);}K.filter((e=>e>0)).length!=P&&0!=K.filter((e=>e>0)).length&&(console.error("PubGsCMoveCard error: 明暗牌混合:["+K+"]"),console.error(e),K=[]),1==J&&65282==F&&[3208,7011].includes(_)&&(F=65280,K.reverse()),1==J&&65282==F&&13==ie&&1==P&&(F=65280),1==J&&65282==F&&4==Y&&8==ie&&795==_&&1==P&&(F=65280),1==J&&65282==F&&5==Y&&3101==_&&1==P&&(F=0),1==J&&65282==F&&5==Y&&!Se.isGuoZhan&&[7016,7017].includes(_)&&1==P&&(F=65280),1==Y&&255==Z&&65280==te&&(K=K.filter((e=>4400!=e&&4401!=e)));var le=new De(V,J,F,P,_,$),re=new De(Z,Y,te,P,_,ne);if(12==Y||12==J)12!=Y?re.add(K.concat(Array(P-K.length).fill(0)).map((e=>new Ce(e,e,re.zoneID)))):12!=J&&0!=J&&le.remove(K,_);else if(5==J&&1==Y&&0==Z)re.add(le.remove(K.filter((e=>e>0))).map((e=>e.destroy(0))));else if(2==J&&9==Y&&0==V&&0==Z)xe.isGameStart&&!xe.isPassed&&Ce.pack(Ce.get(0).map((e=>e.destroy())),!1,1),re.set(re.cards.concat(le.cards.map((e=>e.destroy(0))))),le.set([]),Ot(),xe.isPassed=!1;else if(255!==ie){if(1==J&&5==Y&&Se.dealCard(Z,K[0]),2==Y&&(xe.spellSpace[3090]||(xe.spellSpace[3090]=new Set),K.forEach((e=>xe.spellSpace[3090].add(Ae[e].c))),document.getElementById("boTu").innerHTML=Array.from(xe.spellSpace[3090]).join("")),[441,3492].includes(_)&&8==Y&&6==ie&&async function(e,t){if(!(null==e?void 0:e.length))return;let n=e.slice().sort(((e,t)=>e-t)),i=[];!function e(a,s,o){if(!(o>13)){i.unshift(a.slice()),t&&(i[0].K=13===o?a.length:0);for(let t=s;t<n.length;t++)t>s&&n[t]===n[t-1]||(a.push(n[t]),e(a,t+1,o+n[t]),a.pop());}}([],0,0);let a=document.getElementById("result");a.innerHTML="";for(let s of i.filter(((e,t,n)=>!n.some((t=>e.length<t.length&&e.every((e=>t.includes(e))))))).sort(((e,t)=>t.K-e.K||t.length-e.length)))a.appendChild(He(s.map((e=>_e(e,!1))).join("+"))),t&&s.K&&a.lastChild.classList.add("textRes");}(K.map((e=>Ae[e].number)),3492==_&&ue.v),3033==_&&1==J&&8==Y&&1==K.filter((e=>e>0)).length){let e=Ae[K[0]].number,t=0,n=0,i=0;De.paidui.forEach((a=>{let s=Ae[a].number;s===e?i++:s>e?t++:n++;})),document.getElementById("result").innerHTML='<span class="textRes">【吉占】猜'+(t>n?"大":"小")+'</span><br><span class="textRes">跟'+e+"比,"+t+"张大\t\t"+n+"张小\t\t"+i+"平</span>";}if(3329==_&&V==xe.currentID){let e=Ae[K[0]].number,t=De.paidui,n=["无中","洞烛","顺手","过拆","逐近","决斗","南蛮","万箭","出其","水淹","随机","洪荒","同舟","力争","移花"].flatMap((e=>t.filter((t=>{var n;return null==(n=Ie.name[e])?void 0:n.has(t)})))).reduce(((t,n)=>{let i=Ae[n].number;return i>e?t.g++:i<e?t.l++:t.e++,t}),{g:0,l:0,e:0}),i=["五谷","桃园","火攻","借刀","撒豆"].flatMap((e=>t.filter((t=>{var n;return null==(n=Ie.name[e])?void 0:n.has(t)})))).reduce(((t,n)=>{let i=Ae[n].number;return i>e?t.g++:i<e?t.l++:t.e++,t}),{g:0,l:0,e:0});document.getElementById("result").innerHTML='<span class="textRes">【和衷】'+(n.g>n.l?"大":n.g<n.l?"小":i.g>i.l?"大":i.g<i.l?"小":"平")+'</span><br><span class="textRes">'+n.g+"."+i.g+"大\t\t"+n.l+"."+i.l+"小</span>";}else 3488==_&&5==J&&5==Y&&21==ie&&1==K.filter((e=>e>0)).length?(xe[_]||(xe[_]={}),xe[_][V]=K.find((e=>e>0))):3488==_&&5==J&&10==Y&&11==ie&&0==K.filter((e=>e>0)).length?(K[0]=(null==(g=xe[_])?void 0:g[V])||0,xe[_].stack=K[0]):3488!=_||10!=J||1!=Y&&2!=Y||11!=ie||0!=K.filter((e=>e>0)).length||(K[0]=(null==(y=xe[_])?void 0:y.stack)||0,null==(v=xe[_])||delete v.stack);if([3157,3511].includes(_)&&2==J&&5==Y&&P==(null==(b=xe[_])?void 0:b.length)&&0==K.filter((e=>e>0)).length&&xe[_].forEach(((e,t)=>K[t]=e)),[7016,7017].includes(_)&&5==Y&&1==P&&(A==Se.mySeats[0]||ue.v)&&(K[0]&&(null==(w=xe[_])?void 0:w.includes(K[0]))?xe[_].splice(xe[_].indexOf(K[0]),1):5==J||2==(null==(k=xe[_])?void 0:k.length)||1==(null==(x=xe[_])?void 0:x.length)?K[0]=(null==(S=xe[_])?void 0:S.shift())||0:Se.isGuoZhan),V!=Z||J!=Y||F!=te&&1==Y||$!=ne&&4==Y)if(3208==_&&10==J&&5==Y&&0===K.filter((e=>e>0)).length)le.pos=-1,Ce.pack(le.cards.slice(0,le.length-1)),re.add(le.remove(K));else if(3483==_)if(10==J&&10==Y)0===K.filter((e=>e>0)).length&&(le.pos=-1,re.pos=1),re.add(le.remove(K));else if(1==J&&10==Y&&65282==F)xe[_]&&Ce.pack(le.cards.slice(0,xe[_])),0==K.filter((e=>e>0)).length&&(le.pos=-1),re.add(le.remove(K));else if(5==J&&10==Y)xe[_]=re.add(le.remove(K));else if(10==J&&1==Y&&65282==F){if(0==K.filter((e=>e>0)).length&&(null==(I=xe[_])?void 0:I.length)==P&&xe[_].every((e=>le.cards.includes(e)))){let e=xe[_].flatMap((e=>le.cards.splice(le.cards.indexOf(e),1)));Ce.pack(re.add(e));let t=e.map((e=>e.key));t.every((e=>e>0))&&K.splice(0,P,...t);}else re.add(le.remove(K));delete xe[_];}else re.add(le.remove(K));else if(780==_&&5==J&&65282==F&&1==P)if(5==Y&&V==xe.currentID)xe[_]=re.add(le.remove(K))[0];else if(1==Y&&V!=xe.currentID&&le.cards.includes(xe[_])){let e=null==(W=re.add(le.cards.splice(le.cards.indexOf(xe[_]),1))[0])?void 0:W.key;e>0&&0==K.filter((e=>e>0)).length&&(K[0]=e),delete xe[_];}else re.add(le.remove(K));else re.add(le.remove(K,_));else le.show(K);}}}function Pt(){let e=Array.prototype.slice.call(arguments);try{return "INIT"===e[0]?(window.WDVerSion="1.0.0",window.padding=me.padding||0,window.addEventListener("resize",kt),new Promise(((e,t)=>{!function t(){var n;"undefined"!=typeof JSZipUtils&&"undefined"!=typeof CtrUtil&&void 0!==(null==(n=null==CtrUtil?void 0:CtrUtil.Ctr)?void 0:n.Ofb_Dec)&&"undefined"!=typeof SystemContext&&document.getElementById("bgDiv")?Wt(!0).then(e):setTimeout(t,1e3);}();}))):"EXIT"===e[0]?(window.removeEventListener("resize",kt),window.removeEventListener("resize",It),window.removeEventListener("SGSresize",xt),null==(t=document.getElementById("injectCSS"))||t.remove(),null==(n=document.getElementById("seatUI"))||n.remove(),null==(i=document.getElementById("rogueUI"))||i.remove(),null==(a=document.getElementById("cusBGDiv"))||a.remove(),null==(s=document.getElementById("createIframe"))||s.remove(),null==(o=document.getElementById("createSkinIframe"))||o.remove(),ue.isFrameAdd=!1,!0):Mt(e[e.length-1])}catch(l){console.error(l.message),console.error(l.stack);const[,e,t]=l.stack.match(/(\d+):(\d+)/);console.error("Line:",e),console.error("Column:",t),m("小抄GG了,联系作者解决");}var t,n,i,a,s,o;}"undefined"!=typeof SGSMODULE&&(Object.defineProperty(window.console,"log",{get:()=>console.info,set(){}}),window.SGSMODULE.forEach((e=>e("EXIT"))),delete window.SGSMODULE),console.info("%c三国杀打小抄","font-weight: bold; color: white; background-color: #525288; padding: 1px 4px; border-radius: 4px;"),window.SGSMODULE=[],Object.defineProperty(window.console,"log",{get:()=>function(...e){(window._debug||window.isLogAllClass)&&console.debug(...e),window.SGSMODULE.forEach((t=>null==t?void 0:t(...e)));},set(){}}),Pt("INIT").then((e=>{e&&window.SGSMODULE.push(Pt);}));
})();