샤니마스 한글 패치 임시

샤니마스 임시 한글 패치 스크립트

Version au 11/02/2023. Voir la dernière version.

// ==UserScript==
// @name         샤니마스 한글 패치 임시
// @namespace    https://github.com/newbiepr/shinycolors-trans-kr
// @version      1.11.9
// @description  샤니마스 임시 한글 패치 스크립트
// @icon         https://shinycolors.enza.fun/icon_192x192.png
// @author       Source : biuuu
// @match        https://shinycolors.enza.fun/*
// @run-at       document-start
// @grant        GM_xmlhttpRequest
// @grant        GM_registerMenuCommand
// @grant        GM_unregisterMenuCommand
// @connect      api.interpreter.caiyunai.com
// @connect      translate.google.cn
// @connect      fanyi.baidu.com
// ==/UserScript==
!function(){"use strict";const e=(e,t=!1)=>t&&e.startsWith("​")?e:"​"+e;var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},r.exports),r.exports}var n="object"==typeof t&&t&&t.Object===Object&&t,o="object"==typeof self&&self&&self.Object===Object&&self,s=n||o||Function("return this")(),i=s.Symbol,a=Object.prototype,c=a.hasOwnProperty,u=a.toString,l=i?i.toStringTag:void 0;var d=function(e){var t=c.call(e,l),r=e[l];try{e[l]=void 0;var n=!0}catch(e){}var o=u.call(e);return n&&(t?e[l]=r:delete e[l]),o},f=Object.prototype.toString;var p=function(e){return f.call(e)},h=i?i.toStringTag:void 0;var m=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":h&&h in Object(e)?d(e):p(e)},v=Array.isArray;var g=function(e){return null!=e&&"object"==typeof e};var y=function(e){return"string"==typeof e||!v(e)&&g(e)&&"[object String]"==m(e)};var w=function(e){return!0===e||!1===e||g(e)&&"[object Boolean]"==m(e)};var E=function(e,t){return function(r){return e(t(r))}},b=E(Object.getPrototypeOf,Object),k=Function.prototype,S=Object.prototype,_=k.toString,I=S.hasOwnProperty,x=_.call(Object);var A=function(e){if(!g(e)||"[object Object]"!=m(e))return!1;var t=b(e);if(null===t)return!0;var r=I.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&_.call(r)==x};const C={origin:"https://newbiepr.gitlab.io/shinymaskr.gitlab.io",hash:"",localHash:"",version:"1.11.9",story:"normal",timeout:30,font1:"yuanti",font2:"heiti",auto:"off",bgm:"off",dev:!1},T=Object.assign({},C),R=["yuanti","heiti","yuanti2"],j={HEITI_JA:"UDKakugo_SmallPr6-B",HEITI_TRANS:"sczh-heiti,UDKakugo_SmallPr6-B",YUAN_JA:"HummingStd-E",YUAN_TRANS:"sczh-yuanti,HummingStd-E"},M=["origin","font1","font2","timeout","story","auto","bgm","dev"],P=M,O=()=>{j.HEITI_TRANS=`${R.includes(C.font2)?"sczh-":""}${C.font2},${j.HEITI_JA}`,j.YUAN_TRANS=`${R.includes(C.font1)?"sczh-":""}${C.font1},${j.YUAN_JA}`},F=()=>{const e={};P.forEach(t=>{C[t]!==T[t]&&(e[t]=C[t])}),O(),localStorage.setItem("sczh:setting",JSON.stringify(e))},D=()=>{let e=location.hash;e=e.slice(1).replace(/\?tdsourcetag=s_pc(tim|qq)_aiomsg/,""),e.split(";").forEach(e=>{let t=e.split("="),r=decodeURIComponent(t[0].trim()),n=t[1]?decodeURIComponent(t[1].trim()):"";r&&P.includes(r)&&(C[r]=n||T[r],F())})},z={origin:{id:0,title:"서버 바꾸기",callback:()=>{"https://newbiepr.gitlab.io/shinymaskr.gitlab.io"===C.origin?(C.origin="https://shinymaskr.work",alert("서버가 "+C.origin+"으로 교체되었습니다\nf5누르고 재접속 부탁드립니다")):(C.origin="https://newbiepr.gitlab.io/shinymaskr.gitlab.io",alert("서버가 "+C.origin+"으로 교체되었습니다\nf5누르고 재접속 부탁드립니다"))}},story:{normal:"커뮤추출 열기",edit:"커뮤추출 닫기",id:0,callback:()=>{if("normal"===C.story)C.story="edit";else{const e=document.getElementById("btn-close-sczh");e?e.click():C.story="normal"}}},bgm:{on:"백그라운드BGM 끄기",off:"백그라운드BGM 켜기",id:0,callback:()=>{C.bgm="off"!==C.bgm?"off":"on"}},dev:{id:0,titles:["개발자모드 켜기","개발자모드 끄기"],callback:()=>{C.dev=!C.dev}},wiki:{id:0,title:"샤니위키",callback:()=>{window.open("https://shinycolors.info/wiki")}},update:{id:0,title:"업데이트",callback:()=>{window.open(C.origin+"/ShinyColors.user.js")}}},N=e=>{const t=C[e],r=z[e];let n="";if(w(t)){let e=t?1:0;n=r.titles[e]}else n=r.title||r[t];const o=r.id;o&&window.GM_unregisterMenuCommand(o),r.id=window.GM_registerMenuCommand(n,()=>{(0,r.callback)(),F(),B()})},B=()=>{if(!window.GM_registerMenuCommand||!window.GM_unregisterMenuCommand)return;["origin","update","bgm","story","dev","wiki"].forEach(e=>{N(e)})};(()=>{const e=localStorage.getItem("sczh:setting");let t=JSON.parse(e);A(t)||(t={});const{origin:r}=t;/^https?:\/\//.test(r)&&(C.origin=r.trim()),P.forEach(e=>{let r=t[e];y(r)&&(r=r.trim()),(w(r)||r)&&(C[e]=r)}),O()})(),D(),B(),window.addEventListener("hashchange",D);const L=e=>{if(!e)return"";return e.replace(/[\u0020]+$/g,"").replace(/^[\u0020]+/g,"")},$=(e,t=!1)=>{let r=L(e).replace(/(\\r)?\\n/g,"\n").replace(/\\r/g,"\n");return t?r:r.replace(/\n{2,}/g,"\n")},U=e=>e.replace(/\u200b/g," "),H=e=>L(e).replace(/\r/g,"\n").replace(/\n{2,}/g,"\n"),J=(...e)=>{C.dev&&console.info(...e)},W=(...e)=>{console.info(...e)},q=e=>y(e)?e.replace(/\r?\n/g,"\\n").replace(/\r/g,"\\n"):e,G=(e="0.0.0",t="0.0.0")=>{let r=!1;const n=e.split(".").map(e=>parseInt(e,10)),o=t.split(".").map(e=>parseInt(e,10));for(let e=0;e<n.length;e++){(n[e]||0)>(o[e]||0)&&(r=!0)}return r},K=()=>{const e=new Map;return t=>{if(t&&!/^0+$/.test(t)&&"select"!==t){if(e.has(t)){const r=e.get(t);return e.set(t,r+1),`${t}-${r}`}e.set(t,0)}return t}},Y=new Map,Q=(t,r)=>{const{expMap:n,wordMaps:o,textMap:s}=r,i=H(t);let a=i;return i?(null==s?void 0:s.has(i))?e(s.get(i)):(a=((e,t,r=[])=>{if(Y.has(e))return Y.get(e);let n=e;for(let[e,o]of t)n=n.replace(e,(...e)=>{let t=o;for(let n=1;n<e.length-2;n++){let o=e[n],s=!1;r.forEach(e=>{e.has(o)&&(t=t.replace("$"+n,e.get(o)),s=!0)}),s||(t=t.replace("$"+n,e[n]))}return t}),e.lastIndex=0;return e!==n&&Y.set(e,n),n})(i,n,o),i!==a?e(a):t):t},V=(e,t,r)=>{if(!e||!y(e[t]))return;const n=e[t];e[t]=Q(n,r)};var X=function(){this.__data__=[],this.size=0};var Z=function(e,t){return e===t||e!=e&&t!=t};var ee=function(e,t){for(var r=e.length;r--;)if(Z(e[r][0],t))return r;return-1},te=Array.prototype.splice;var re=function(e){var t=this.__data__,r=ee(t,e);return!(r<0)&&(r==t.length-1?t.pop():te.call(t,r,1),--this.size,!0)};var ne=function(e){var t=this.__data__,r=ee(t,e);return r<0?void 0:t[r][1]};var oe=function(e){return ee(this.__data__,e)>-1};var se=function(e,t){var r=this.__data__,n=ee(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};function ie(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ie.prototype.clear=X,ie.prototype.delete=re,ie.prototype.get=ne,ie.prototype.has=oe,ie.prototype.set=se;var ae=ie;var ce=function(){this.__data__=new ae,this.size=0};var ue=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r};var le=function(e){return this.__data__.get(e)};var de=function(e){return this.__data__.has(e)};var fe=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};var pe,he=function(e){if(!fe(e))return!1;var t=m(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},me=s["__core-js_shared__"],ve=(pe=/[^.]+$/.exec(me&&me.keys&&me.keys.IE_PROTO||""))?"Symbol(src)_1."+pe:"";var ge=function(e){return!!ve&&ve in e},ye=Function.prototype.toString;var we=function(e){if(null!=e){try{return ye.call(e)}catch(e){}try{return e+""}catch(e){}}return""},Ee=/^\[object .+?Constructor\]$/,be=Function.prototype,ke=Object.prototype,Se=be.toString,_e=ke.hasOwnProperty,Ie=RegExp("^"+Se.call(_e).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var xe=function(e){return!(!fe(e)||ge(e))&&(he(e)?Ie:Ee).test(we(e))};var Ae=function(e,t){return null==e?void 0:e[t]};var Ce=function(e,t){var r=Ae(e,t);return xe(r)?r:void 0},Te=Ce(s,"Map"),Re=Ce(Object,"create");var je=function(){this.__data__=Re?Re(null):{},this.size=0};var Me=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Pe=Object.prototype.hasOwnProperty;var Oe=function(e){var t=this.__data__;if(Re){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return Pe.call(t,e)?t[e]:void 0},Fe=Object.prototype.hasOwnProperty;var De=function(e){var t=this.__data__;return Re?void 0!==t[e]:Fe.call(t,e)};var ze=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Re&&void 0===t?"__lodash_hash_undefined__":t,this};function Ne(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ne.prototype.clear=je,Ne.prototype.delete=Me,Ne.prototype.get=Oe,Ne.prototype.has=De,Ne.prototype.set=ze;var Be=Ne;var Le=function(){this.size=0,this.__data__={hash:new Be,map:new(Te||ae),string:new Be}};var $e=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var Ue=function(e,t){var r=e.__data__;return $e(t)?r["string"==typeof t?"string":"hash"]:r.map};var He=function(e){var t=Ue(this,e).delete(e);return this.size-=t?1:0,t};var Je=function(e){return Ue(this,e).get(e)};var We=function(e){return Ue(this,e).has(e)};var qe=function(e,t){var r=Ue(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this};function Ge(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ge.prototype.clear=Le,Ge.prototype.delete=He,Ge.prototype.get=Je,Ge.prototype.has=We,Ge.prototype.set=qe;var Ke=Ge;var Ye=function(e,t){var r=this.__data__;if(r instanceof ae){var n=r.__data__;if(!Te||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Ke(n)}return r.set(e,t),this.size=r.size,this};function Qe(e){var t=this.__data__=new ae(e);this.size=t.size}Qe.prototype.clear=ce,Qe.prototype.delete=ue,Qe.prototype.get=le,Qe.prototype.has=de,Qe.prototype.set=Ye;var Ve=Qe;var Xe=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e},Ze=function(){try{var e=Ce(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();var et=function(e,t,r){"__proto__"==t&&Ze?Ze(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r},tt=Object.prototype.hasOwnProperty;var rt=function(e,t,r){var n=e[t];tt.call(e,t)&&Z(n,r)&&(void 0!==r||t in e)||et(e,t,r)};var nt=function(e,t,r,n){var o=!r;r||(r={});for(var s=-1,i=t.length;++s<i;){var a=t[s],c=n?n(r[a],e[a],a,r,e):void 0;void 0===c&&(c=e[a]),o?et(r,a,c):rt(r,a,c)}return r};var ot=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n};var st=function(e){return g(e)&&"[object Arguments]"==m(e)},it=Object.prototype,at=it.hasOwnProperty,ct=it.propertyIsEnumerable,ut=st(function(){return arguments}())?st:function(e){return g(e)&&at.call(e,"callee")&&!ct.call(e,"callee")};var lt=function(){return!1},dt=r((function(e,t){var r=t&&!t.nodeType&&t,n=r&&e&&!e.nodeType&&e,o=n&&n.exports===r?s.Buffer:void 0,i=(o?o.isBuffer:void 0)||lt;e.exports=i})),ft=/^(?:0|[1-9]\d*)$/;var pt=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&ft.test(e))&&e>-1&&e%1==0&&e<t};var ht=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},mt={};mt["[object Float32Array]"]=mt["[object Float64Array]"]=mt["[object Int8Array]"]=mt["[object Int16Array]"]=mt["[object Int32Array]"]=mt["[object Uint8Array]"]=mt["[object Uint8ClampedArray]"]=mt["[object Uint16Array]"]=mt["[object Uint32Array]"]=!0,mt["[object Arguments]"]=mt["[object Array]"]=mt["[object ArrayBuffer]"]=mt["[object Boolean]"]=mt["[object DataView]"]=mt["[object Date]"]=mt["[object Error]"]=mt["[object Function]"]=mt["[object Map]"]=mt["[object Number]"]=mt["[object Object]"]=mt["[object RegExp]"]=mt["[object Set]"]=mt["[object String]"]=mt["[object WeakMap]"]=!1;var vt=function(e){return g(e)&&ht(e.length)&&!!mt[m(e)]};var gt=function(e){return function(t){return e(t)}},yt=r((function(e,t){var r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,s=o&&o.exports===r&&n.process,i=function(){try{var e=o&&o.require&&o.require("util").types;return e||s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=i})),wt=yt&&yt.isTypedArray,Et=wt?gt(wt):vt,bt=Object.prototype.hasOwnProperty;var kt=function(e,t){var r=v(e),n=!r&&ut(e),o=!r&&!n&&dt(e),s=!r&&!n&&!o&&Et(e),i=r||n||o||s,a=i?ot(e.length,String):[],c=a.length;for(var u in e)!t&&!bt.call(e,u)||i&&("length"==u||o&&("offset"==u||"parent"==u)||s&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||pt(u,c))||a.push(u);return a},St=Object.prototype;var _t=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||St)},It=E(Object.keys,Object),xt=Object.prototype.hasOwnProperty;var At=function(e){if(!_t(e))return It(e);var t=[];for(var r in Object(e))xt.call(e,r)&&"constructor"!=r&&t.push(r);return t};var Ct=function(e){return null!=e&&ht(e.length)&&!he(e)};var Tt=function(e){return Ct(e)?kt(e):At(e)};var Rt=function(e,t){return e&&nt(t,Tt(t),e)};var jt=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t},Mt=Object.prototype.hasOwnProperty;var Pt=function(e){if(!fe(e))return jt(e);var t=_t(e),r=[];for(var n in e)("constructor"!=n||!t&&Mt.call(e,n))&&r.push(n);return r};var Ot=function(e){return Ct(e)?kt(e,!0):Pt(e)};var Ft=function(e,t){return e&&nt(t,Ot(t),e)},Dt=r((function(e,t){var r=t&&!t.nodeType&&t,n=r&&e&&!e.nodeType&&e,o=n&&n.exports===r?s.Buffer:void 0,i=o?o.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var r=e.length,n=i?i(r):new e.constructor(r);return e.copy(n),n}}));var zt=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t};var Nt=function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,s=[];++r<n;){var i=e[r];t(i,r,e)&&(s[o++]=i)}return s};var Bt=function(){return[]},Lt=Object.prototype.propertyIsEnumerable,$t=Object.getOwnPropertySymbols,Ut=$t?function(e){return null==e?[]:(e=Object(e),Nt($t(e),(function(t){return Lt.call(e,t)})))}:Bt;var Ht=function(e,t){return nt(e,Ut(e),t)};var Jt=function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e},Wt=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Jt(t,Ut(e)),e=b(e);return t}:Bt;var qt=function(e,t){return nt(e,Wt(e),t)};var Gt=function(e,t,r){var n=t(e);return v(e)?n:Jt(n,r(e))};var Kt=function(e){return Gt(e,Tt,Ut)};var Yt=function(e){return Gt(e,Ot,Wt)},Qt=Ce(s,"DataView"),Vt=Ce(s,"Promise"),Xt=Ce(s,"Set"),Zt=Ce(s,"WeakMap"),er=we(Qt),tr=we(Te),rr=we(Vt),nr=we(Xt),or=we(Zt),sr=m;(Qt&&"[object DataView]"!=sr(new Qt(new ArrayBuffer(1)))||Te&&"[object Map]"!=sr(new Te)||Vt&&"[object Promise]"!=sr(Vt.resolve())||Xt&&"[object Set]"!=sr(new Xt)||Zt&&"[object WeakMap]"!=sr(new Zt))&&(sr=function(e){var t=m(e),r="[object Object]"==t?e.constructor:void 0,n=r?we(r):"";if(n)switch(n){case er:return"[object DataView]";case tr:return"[object Map]";case rr:return"[object Promise]";case nr:return"[object Set]";case or:return"[object WeakMap]"}return t});var ir=sr,ar=Object.prototype.hasOwnProperty;var cr=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&ar.call(e,"index")&&(r.index=e.index,r.input=e.input),r},ur=s.Uint8Array;var lr=function(e){var t=new e.constructor(e.byteLength);return new ur(t).set(new ur(e)),t};var dr=function(e,t){var r=t?lr(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)},fr=/\w*$/;var pr=function(e){var t=new e.constructor(e.source,fr.exec(e));return t.lastIndex=e.lastIndex,t},hr=i?i.prototype:void 0,mr=hr?hr.valueOf:void 0;var vr=function(e){return mr?Object(mr.call(e)):{}};var gr=function(e,t){var r=t?lr(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)};var yr=function(e,t,r){var n=e.constructor;switch(t){case"[object ArrayBuffer]":return lr(e);case"[object Boolean]":case"[object Date]":return new n(+e);case"[object DataView]":return dr(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return gr(e,r);case"[object Map]":return new n;case"[object Number]":case"[object String]":return new n(e);case"[object RegExp]":return pr(e);case"[object Set]":return new n;case"[object Symbol]":return vr(e)}},wr=Object.create,Er=function(){function e(){}return function(t){if(!fe(t))return{};if(wr)return wr(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();var br=function(e){return"function"!=typeof e.constructor||_t(e)?{}:Er(b(e))};var kr=function(e){return g(e)&&"[object Map]"==ir(e)},Sr=yt&&yt.isMap,_r=Sr?gt(Sr):kr;var Ir=function(e){return g(e)&&"[object Set]"==ir(e)},xr=yt&&yt.isSet,Ar=xr?gt(xr):Ir,Cr={};Cr["[object Arguments]"]=Cr["[object Array]"]=Cr["[object ArrayBuffer]"]=Cr["[object DataView]"]=Cr["[object Boolean]"]=Cr["[object Date]"]=Cr["[object Float32Array]"]=Cr["[object Float64Array]"]=Cr["[object Int8Array]"]=Cr["[object Int16Array]"]=Cr["[object Int32Array]"]=Cr["[object Map]"]=Cr["[object Number]"]=Cr["[object Object]"]=Cr["[object RegExp]"]=Cr["[object Set]"]=Cr["[object String]"]=Cr["[object Symbol]"]=Cr["[object Uint8Array]"]=Cr["[object Uint8ClampedArray]"]=Cr["[object Uint16Array]"]=Cr["[object Uint32Array]"]=!0,Cr["[object Error]"]=Cr["[object Function]"]=Cr["[object WeakMap]"]=!1;var Tr=function e(t,r,n,o,s,i){var a,c=1&r,u=2&r,l=4&r;if(n&&(a=s?n(t,o,s,i):n(t)),void 0!==a)return a;if(!fe(t))return t;var d=v(t);if(d){if(a=cr(t),!c)return zt(t,a)}else{var f=ir(t),p="[object Function]"==f||"[object GeneratorFunction]"==f;if(dt(t))return Dt(t,c);if("[object Object]"==f||"[object Arguments]"==f||p&&!s){if(a=u||p?{}:br(t),!c)return u?qt(t,Ft(a,t)):Ht(t,Rt(a,t))}else{if(!Cr[f])return s?t:{};a=yr(t,f,c)}}i||(i=new Ve);var h=i.get(t);if(h)return h;i.set(t,a),Ar(t)?t.forEach((function(o){a.add(e(o,r,n,o,t,i))})):_r(t)&&t.forEach((function(o,s){a.set(s,e(o,r,n,s,t,i))}));var m=d?void 0:(l?u?Yt:Kt:u?Ot:Tt)(t);return Xe(m||t,(function(o,s){m&&(o=t[s=o]),rt(a,s,e(o,r,n,s,t,i))})),a};var Rr=function(e){return Tr(e,5)};const jr=(e,t,r,n)=>{if(C.dev){let o=n;n&&(o=Rr(n));let s,i=r[1];if(i&&(i.headers?s=i:i.params&&(s=i.params),i.query)){let e=[];for(let t in i.query){let r=i.query[t];if("string"!=typeof r&&"function"==typeof r[Symbol.iterator])for(let n in r)e.push(`${t}=${n}`);else e.push(`${t}=${r}`)}r[0]+="?"+e.join("&")}J(`%c${e}%c %c${r[0]}`,...(e=>[`background-color:${e};color:#fff;padding:0 0.3em`,"",`color:${e};text-decoration:underline`])(t),s||"",...n instanceof ArrayBuffer&&0==n.byteLength?[]:["\n=>",o])}},Mr=e=>{const t=e.replace(/{num}/g,"\\d+").replace(/{uuid}/g,"[a-f\\d]{8}-([a-f\\d]{4}-){3}[a-f\\d]{12}");return new RegExp(`^${t}$`)},Pr={get:new Map,post:new Map,patch:new Map,put:new Map,delete:new Map},Or=(e,t,r)=>{if(!r.has(e)){const t=e.includes("{")||e.includes("("),n={handles:[],key:t?Mr(e):e,type:t?"regexp":"string"};r.set(e,n)}const n=r.get(e);Array.isArray(t)?n.handles=n.handles.concat(t):n.handles.push(t)},Fr=(e,t,r)=>{if(Array.isArray(e))for(let n of e)Or(n,t,r);else Or(e,t,r)},Dr=e=>(t,r)=>{const n=Pr[e];if(r)Fr(t,r,n);else{const e=t;for(let[t,r]of e)Fr(t,r,n)}},zr={get:Dr("get"),post:Dr("post"),patch:Dr("patch"),put:Dr("put"),delete:Dr("delete")},Nr={GET:"#009688",PATCH:"#8BC34A",POST:"#3F51B5",PUT:"#9C27B0",DELETE:"#4C27B0"},Br=(e,t,r,n)=>async(...o)=>{var s,i;return jr(e,Nr[e],[t,r],null===(s=o[0])||void 0===s?void 0:s.body),await(async(e,t,r)=>{try{for(let[n,o]of r){let r=!1;if(("string"===o.type&&o.key===t||"regexp"===o.type&&o.key.test(t))&&(r=!0),r){const t=o.handles;for(let r of t)await r(e)}}}catch(e){J(e)}})(null===(i=o[0])||void 0===i?void 0:i.body,t,Pr[e.toLowerCase()]),n(...o)},Lr=Array.prototype.push;Array.prototype.push=function(...e){var t;if("object"==typeof e[0]&&(null===(t=e[0])||void 0===t?void 0:t.method)){const{path:t,method:r,options:n,resolve:o}=e[0];e[0].resolve=Br(r.toUpperCase(),t,n,o)}return Lr.apply(this,e)};const{origin:$r,version:Ur}=C,Hr=async()=>{const e=Math.floor(Date.now()/1e3/60/60/6),t=await fetch(`${$r}/manifest.json?t=${e}`);if(t.ok){const e=await t.json();return e.time=Date.now(),localStorage.setItem("sczh:manifest",JSON.stringify(e)),e}throw new Error(`${t.status} ${t.url}`)},Jr=new Promise((e,t)=>{(async()=>{let e;try{let t=localStorage.getItem("sczh:manifest");t&&(e=JSON.parse(t)),Date.now()-e.time>60*C.cacheTime*1e3&&(e=!1)}catch(e){}return e?G(Ur,e.version)?e=await Hr():setTimeout(Hr,5e3):e=await Hr(),e})().then(t=>{C.newVersion=t.version,C.hashes=t.hashes,e(t)}).catch(t)}),Wr=async(e,t)=>{if(!t){const{hashes:r}=await Jr;t=r[e.replace(/^\/(data\/)?/,"")]}return await(async e=>new Promise((t,r)=>{let n=setTimeout(()=>{r(`불러오기${e}시간초과`)},1e3*C.timeout);fetch(`${$r}${e}`).then(e=>{if(clearTimeout(n),!e.ok)return r(`${e.status} ${e.url}`),"";const t=e.headers.get("content-type");return(null==t?void 0:t.includes("json"))?e.json():e.text()}).then(t).catch(r)}))(`${e}${t?"?v="+t:""}`)};var qr=r((function(e,t){e.exports=function e(){var t="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t?t:{},r=!t.document&&!!t.postMessage,n=r&&/blob:/i.test((t.location||{}).protocol),o={},s=0,i={parse:function(r,n){var a=(n=n||{}).dynamicTyping||!1;if(b(a)&&(n.dynamicTypingFunction=a,a={}),n.dynamicTyping=a,n.transform=!!b(n.transform)&&n.transform,n.worker&&i.WORKERS_SUPPORTED){var c=function(){if(!i.WORKERS_SUPPORTED)return!1;var r,n,a=(r=t.URL||t.webkitURL||null,n=e.toString(),i.BLOB_URL||(i.BLOB_URL=r.createObjectURL(new Blob(["(",n,")();"],{type:"text/javascript"})))),c=new t.Worker(a);return c.onmessage=v,c.id=s++,o[c.id]=c}();return c.userStep=n.step,c.userChunk=n.chunk,c.userComplete=n.complete,c.userError=n.error,n.step=b(n.step),n.chunk=b(n.chunk),n.complete=b(n.complete),n.error=b(n.error),delete n.worker,void c.postMessage({input:r,config:n,workerId:c.id})}var p=null;return"string"==typeof r?p=n.download?new u(n):new d(n):!0===r.readable&&b(r.read)&&b(r.on)?p=new f(n):(t.File&&r instanceof File||r instanceof Object)&&(p=new l(n)),p.stream(r)},unparse:function(e,t){var r=!1,n=!0,o=",",s="\r\n",a='"',c=a+a,u=!1,l=null;!function(){if("object"==typeof t){if("string"!=typeof t.delimiter||i.BAD_DELIMITERS.filter((function(e){return-1!==t.delimiter.indexOf(e)})).length||(o=t.delimiter),("boolean"==typeof t.quotes||"function"==typeof t.quotes||Array.isArray(t.quotes))&&(r=t.quotes),"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(u=t.skipEmptyLines),"string"==typeof t.newline&&(s=t.newline),"string"==typeof t.quoteChar&&(a=t.quoteChar),"boolean"==typeof t.header&&(n=t.header),Array.isArray(t.columns)){if(0===t.columns.length)throw new Error("Option columns is empty");l=t.columns}void 0!==t.escapeChar&&(c=t.escapeChar+a)}}();var d=new RegExp(h(a),"g");if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return p(null,e,u);if("object"==typeof e[0])return p(l||f(e[0]),e,u)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:f(e.data[0])),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),p(e.fields||[],e.data||[],u);throw new Error("Unable to serialize unrecognized input");function f(e){if("object"!=typeof e)return[];var t=[];for(var r in e)t.push(r);return t}function p(e,t,r){var i="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var a=Array.isArray(e)&&0<e.length,c=!Array.isArray(t[0]);if(a&&n){for(var u=0;u<e.length;u++)0<u&&(i+=o),i+=m(e[u],u);0<t.length&&(i+=s)}for(var l=0;l<t.length;l++){var d=a?e.length:t[l].length,f=!1,p=a?0===Object.keys(t[l]).length:0===t[l].length;if(r&&!a&&(f="greedy"===r?""===t[l].join("").trim():1===t[l].length&&0===t[l][0].length),"greedy"===r&&a){for(var h=[],v=0;v<d;v++){var g=c?e[v]:v;h.push(t[l][g])}f=""===h.join("").trim()}if(!f){for(var y=0;y<d;y++){0<y&&!p&&(i+=o);var w=a&&c?e[y]:y;i+=m(t[l][w],y)}l<t.length-1&&(!r||0<d&&!p)&&(i+=s)}}return i}function m(e,t){if(null==e)return"";if(e.constructor===Date)return JSON.stringify(e).slice(1,25);var n=e.toString().replace(d,c);return"boolean"==typeof r&&r||"function"==typeof r&&r(e,t)||Array.isArray(r)&&r[t]||function(e,t){for(var r=0;r<t.length;r++)if(-1<e.indexOf(t[r]))return!0;return!1}(n,i.BAD_DELIMITERS)||-1<n.indexOf(o)||" "===n.charAt(0)||" "===n.charAt(n.length-1)?a+n+a:n}}};if(i.RECORD_SEP=String.fromCharCode(30),i.UNIT_SEP=String.fromCharCode(31),i.BYTE_ORDER_MARK="\ufeff",i.BAD_DELIMITERS=["\r","\n",'"',i.BYTE_ORDER_MARK],i.WORKERS_SUPPORTED=!r&&!!t.Worker,i.NODE_STREAM_INPUT=1,i.LocalChunkSize=10485760,i.RemoteChunkSize=5242880,i.DefaultDelimiter=",",i.Parser=m,i.ParserHandle=p,i.NetworkStreamer=u,i.FileStreamer=l,i.StringStreamer=d,i.ReadableStreamStreamer=f,t.jQuery){var a=t.jQuery;a.fn.parse=function(e){var r=e.config||{},n=[];return this.each((function(e){if("INPUT"!==a(this).prop("tagName").toUpperCase()||"file"!==a(this).attr("type").toLowerCase()||!t.FileReader||!this.files||0===this.files.length)return!0;for(var o=0;o<this.files.length;o++)n.push({file:this.files[o],inputElem:this,instanceConfig:a.extend({},r)})})),o(),this;function o(){if(0!==n.length){var t,r,o,c=n[0];if(b(e.before)){var u=e.before(c.file,c.inputElem);if("object"==typeof u){if("abort"===u.action)return t=c.file,r=c.inputElem,o=u.reason,void(b(e.error)&&e.error({name:"AbortError"},t,r,o));if("skip"===u.action)return void s();"object"==typeof u.config&&(c.instanceConfig=a.extend(c.instanceConfig,u.config))}else if("skip"===u)return void s()}var l=c.instanceConfig.complete;c.instanceConfig.complete=function(e){b(l)&&l(e,c.file,c.inputElem),s()},i.parse(c.file,c.instanceConfig)}else b(e.complete)&&e.complete()}function s(){n.splice(0,1),o()}}}function c(e){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(e){var t=w(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null),this._handle=new p(t),(this._handle.streamer=this)._config=t}.call(this,e),this.parseChunk=function(e,r){if(this.isFirstChunk&&b(this._config.beforeFirstChunk)){var o=this._config.beforeFirstChunk(e);void 0!==o&&(e=o)}this.isFirstChunk=!1,this._halted=!1;var s=this._partialLine+e;this._partialLine="";var a=this._handle.parse(s,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var c=a.meta.cursor;this._finished||(this._partialLine=s.substring(c-this._baseIndex),this._baseIndex=c),a&&a.data&&(this._rowCount+=a.data.length);var u=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(n)t.postMessage({results:a,workerId:i.WORKER_ID,finished:u});else if(b(this._config.chunk)&&!r){if(this._config.chunk(a,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);a=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(a.data),this._completeResults.errors=this._completeResults.errors.concat(a.errors),this._completeResults.meta=a.meta),this._completed||!u||!b(this._config.complete)||a&&a.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),u||a&&a.meta.paused||this._nextChunk(),a}this._halted=!0},this._sendError=function(e){b(this._config.error)?this._config.error(e):n&&this._config.error&&t.postMessage({workerId:i.WORKER_ID,error:e,finished:!1})}}function u(e){var t;(e=e||{}).chunkSize||(e.chunkSize=i.RemoteChunkSize),c.call(this,e),this._nextChunk=r?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),r||(t.onload=E(this._chunkLoaded,this),t.onerror=E(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!r),this._config.downloadRequestHeaders){var e=this._config.downloadRequestHeaders;for(var n in e)t.setRequestHeader(n,e[n])}if(this._config.chunkSize){var o=this._start+this._config.chunkSize-1;t.setRequestHeader("Range","bytes="+this._start+"-"+o)}try{t.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}r&&0===t.status&&this._chunkError()}},this._chunkLoaded=function(){4===t.readyState&&(t.status<200||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:t.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(e){var t=e.getResponseHeader("Content-Range");return null===t?-1:parseInt(t.substring(t.lastIndexOf("/")+1))}(t),this.parseChunk(t.responseText)))},this._chunkError=function(e){var r=t.statusText||e;this._sendError(new Error(r))}}function l(e){var t,r;(e=e||{}).chunkSize||(e.chunkSize=i.LocalChunkSize),c.call(this,e);var n="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,r=e.slice||e.webkitSlice||e.mozSlice,n?((t=new FileReader).onload=E(this._chunkLoaded,this),t.onerror=E(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var e=this._input;if(this._config.chunkSize){var o=Math.min(this._start+this._config.chunkSize,this._input.size);e=r.call(e,this._start,o)}var s=t.readAsText(e,this._config.encoding);n||this._chunkLoaded({target:{result:s}})},this._chunkLoaded=function(e){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function d(e){var t;c.call(this,e=e||{}),this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e,r=this._config.chunkSize;return r?(e=t.substring(0,r),t=t.substring(r)):(e=t,t=""),this._finished=!t,this.parseChunk(e)}}}function f(e){c.call(this,e=e||{});var t=[],r=!0,n=!1;this.pause=function(){c.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){c.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){n&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):r=!0},this._streamData=E((function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),r&&(r=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}}),this),this._streamError=E((function(e){this._streamCleanUp(),this._sendError(e)}),this),this._streamEnd=E((function(){this._streamCleanUp(),n=!0,this._streamData("")}),this),this._streamCleanUp=E((function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)}),this)}function p(e){var t,r,n,o=Math.pow(2,53),s=-o,a=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)(e[-+]?\d+)?\s*$/,c=/(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))/,u=this,l=0,d=0,f=!1,p=!1,v=[],g={data:[],errors:[],meta:{}};if(b(e.step)){var y=e.step;e.step=function(t){if(g=t,S())k();else{if(k(),0===g.data.length)return;l+=t.data.length,e.preview&&l>e.preview?r.abort():(g.data=g.data[0],y(g,u))}}}function E(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function k(){if(g&&n&&(I("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+i.DefaultDelimiter+"'"),n=!1),e.skipEmptyLines)for(var t=0;t<g.data.length;t++)E(g.data[t])&&g.data.splice(t--,1);return S()&&function(){if(g)if(Array.isArray(g.data[0])){for(var t=0;S()&&t<g.data.length;t++)g.data[t].forEach(r);g.data.splice(0,1)}else g.data.forEach(r);function r(t){b(e.transformHeader)&&(t=e.transformHeader(t)),v.push(t)}}(),function(){if(!g||!e.header&&!e.dynamicTyping&&!e.transform)return g;function t(t,r){var n,o=e.header?{}:[];for(n=0;n<t.length;n++){var s=n,i=t[n];e.header&&(s=n>=v.length?"__parsed_extra":v[n]),e.transform&&(i=e.transform(i,s)),i=_(s,i),"__parsed_extra"===s?(o[s]=o[s]||[],o[s].push(i)):o[s]=i}return e.header&&(n>v.length?I("FieldMismatch","TooManyFields","Too many fields: expected "+v.length+" fields but parsed "+n,d+r):n<v.length&&I("FieldMismatch","TooFewFields","Too few fields: expected "+v.length+" fields but parsed "+n,d+r)),o}var r=1;return!g.data.length||Array.isArray(g.data[0])?(g.data=g.data.map(t),r=g.data.length):g.data=t(g.data,0),e.header&&g.meta&&(g.meta.fields=v),d+=r,g}()}function S(){return e.header&&0===v.length}function _(t,r){return n=t,e.dynamicTypingFunction&&void 0===e.dynamicTyping[n]&&(e.dynamicTyping[n]=e.dynamicTypingFunction(n)),!0===(e.dynamicTyping[n]||e.dynamicTyping)?"true"===r||"TRUE"===r||"false"!==r&&"FALSE"!==r&&(function(e){if(a.test(e)){var t=parseFloat(e);if(s<t&&t<o)return!0}return!1}(r)?parseFloat(r):c.test(r)?new Date(r):""===r?null:r):r;var n}function I(e,t,r,n){var o={type:e,code:t,message:r};void 0!==n&&(o.row=n),g.errors.push(o)}this.parse=function(o,s,a){var c=e.quoteChar||'"';if(e.newline||(e.newline=function(e,t){e=e.substring(0,1048576);var r=new RegExp(h(t)+"([^]*?)"+h(t),"gm"),n=(e=e.replace(r,"")).split("\r"),o=e.split("\n"),s=1<o.length&&o[0].length<n[0].length;if(1===n.length||s)return"\n";for(var i=0,a=0;a<n.length;a++)"\n"===n[a][0]&&i++;return i>=n.length/2?"\r\n":"\r"}(o,c)),n=!1,e.delimiter)b(e.delimiter)&&(e.delimiter=e.delimiter(o),g.meta.delimiter=e.delimiter);else{var u=function(t,r,n,o,s){var a,c,u,l;s=s||[",","\t","|",";",i.RECORD_SEP,i.UNIT_SEP];for(var d=0;d<s.length;d++){var f=s[d],p=0,h=0,v=0;u=void 0;for(var g=new m({comments:o,delimiter:f,newline:r,preview:10}).parse(t),y=0;y<g.data.length;y++)if(n&&E(g.data[y]))v++;else{var w=g.data[y].length;h+=w,void 0!==u?0<w&&(p+=Math.abs(w-u),u=w):u=w}0<g.data.length&&(h/=g.data.length-v),(void 0===c||p<=c)&&(void 0===l||l<h)&&1.99<h&&(c=p,a=f,l=h)}return{successful:!!(e.delimiter=a),bestDelimiter:a}}(o,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess);u.successful?e.delimiter=u.bestDelimiter:(n=!0,e.delimiter=i.DefaultDelimiter),g.meta.delimiter=e.delimiter}var l=w(e);return e.preview&&e.header&&l.preview++,t=o,r=new m(l),g=r.parse(t,s,a),k(),f?{meta:{paused:!0}}:g||{meta:{paused:!1}}},this.paused=function(){return f},this.pause=function(){f=!0,r.abort(),t=b(e.chunk)?"":t.substring(r.getCharIndex())},this.resume=function(){u.streamer._halted?(f=!1,u.streamer.parseChunk(t,!0)):setTimeout(u.resume,3)},this.aborted=function(){return p},this.abort=function(){p=!0,r.abort(),g.meta.aborted=!0,b(e.complete)&&e.complete(g),t=""}}function h(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function m(e){var t,r=(e=e||{}).delimiter,n=e.newline,o=e.comments,s=e.step,a=e.preview,c=e.fastMode,u=t=void 0===e.quoteChar?'"':e.quoteChar;if(void 0!==e.escapeChar&&(u=e.escapeChar),("string"!=typeof r||-1<i.BAD_DELIMITERS.indexOf(r))&&(r=","),o===r)throw new Error("Comment character same as delimiter");!0===o?o="#":("string"!=typeof o||-1<i.BAD_DELIMITERS.indexOf(o))&&(o=!1),"\n"!==n&&"\r"!==n&&"\r\n"!==n&&(n="\n");var l=0,d=!1;this.parse=function(e,i,f){if("string"!=typeof e)throw new Error("Input must be a string");var p=e.length,m=r.length,v=n.length,g=o.length,y=b(s),w=[],E=[],k=[],S=l=0;if(!e)return z();if(c||!1!==c&&-1===e.indexOf(t)){for(var _=e.split(n),I=0;I<_.length;I++){if(k=_[I],l+=k.length,I!==_.length-1)l+=n.length;else if(f)return z();if(!o||k.substring(0,g)!==o){if(y){if(w=[],P(k.split(r)),N(),d)return z()}else P(k.split(r));if(a&&a<=I)return w=w.slice(0,a),z(!0)}}return z()}for(var x=e.indexOf(r,l),A=e.indexOf(n,l),C=new RegExp(h(u)+h(t),"g"),T=e.indexOf(t,l);;)if(e[l]!==t)if(o&&0===k.length&&e.substring(l,l+g)===o){if(-1===A)return z();l=A+v,A=e.indexOf(n,l),x=e.indexOf(r,l)}else{if(-1!==x&&(x<A||-1===A)){if(!(x<T)){k.push(e.substring(l,x)),l=x+m,x=e.indexOf(r,l);continue}var R=B(x,T,A);if(R&&void 0!==R.nextDelim){x=R.nextDelim,T=R.quoteSearch,k.push(e.substring(l,x)),l=x+m,x=e.indexOf(r,l);continue}}if(-1===A)break;if(k.push(e.substring(l,A)),D(A+v),y&&(N(),d))return z();if(a&&w.length>=a)return z(!0)}else for(T=l,l++;;){if(-1===(T=e.indexOf(t,T+1)))return f||E.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:w.length,index:l}),F();if(T===p-1)return F(e.substring(l,T).replace(C,t));if(t!==u||e[T+1]!==u){if(t===u||0===T||e[T-1]!==u){-1!==x&&x<T+1&&(x=e.indexOf(r,T+1)),-1!==A&&A<T+1&&(A=e.indexOf(n,T+1));var j=O(-1===A?x:Math.min(x,A));if(e[T+1+j]===r){k.push(e.substring(l,T).replace(C,t)),e[l=T+1+j+m]!==t&&(T=e.indexOf(t,l)),x=e.indexOf(r,l),A=e.indexOf(n,l);break}var M=O(A);if(e.substring(T+1+M,T+1+M+v)===n){if(k.push(e.substring(l,T).replace(C,t)),D(T+1+M+v),x=e.indexOf(r,l),T=e.indexOf(t,l),y&&(N(),d))return z();if(a&&w.length>=a)return z(!0);break}E.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:w.length,index:l}),T++}}else T++}return F();function P(e){w.push(e),S=l}function O(t){var r=0;if(-1!==t){var n=e.substring(T+1,t);n&&""===n.trim()&&(r=n.length)}return r}function F(t){return f||(void 0===t&&(t=e.substring(l)),k.push(t),l=p,P(k),y&&N()),z()}function D(t){l=t,P(k),k=[],A=e.indexOf(n,l)}function z(e){return{data:w,errors:E,meta:{delimiter:r,linebreak:n,aborted:d,truncated:!!e,cursor:S+(i||0)}}}function N(){s(z()),w=[],E=[]}function B(n,o,s){var i={nextDelim:void 0,quoteSearch:void 0},a=e.indexOf(t,o+1);if(o<n&&n<a&&(a<s||-1===s)){var c=e.indexOf(r,a);if(-1===c)return i;a<c&&(a=e.indexOf(t,a+1)),i=B(c,a,s)}else i={nextDelim:n,quoteSearch:o};return i}},this.abort=function(){d=!0},this.getCharIndex=function(){return l}}function v(e){var t=e.data,r=o[t.workerId],n=!1;if(t.error)r.userError(t.error,t.file);else if(t.results&&t.results.data){var s={abort:function(){n=!0,g(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:y,resume:y};if(b(r.userStep)){for(var i=0;i<t.results.data.length&&(r.userStep({data:t.results.data[i],errors:t.results.errors,meta:t.results.meta},s),!n);i++);delete t.results}else b(r.userChunk)&&(r.userChunk(t.results,s,t.file),delete t.results)}t.finished&&!n&&g(t.workerId,t.results)}function g(e,t){var r=o[e];b(r.userComplete)&&r.userComplete(t),r.terminate(),delete o[e]}function y(){throw new Error("Not implemented.")}function w(e){if("object"!=typeof e||null===e)return e;var t=Array.isArray(e)?[]:{};for(var r in e)t[r]=w(e[r]);return t}function E(e,t){return function(){e.apply(t,arguments)}}function b(e){return"function"==typeof e}return n&&(t.onmessage=function(e){var r=e.data;if(void 0===i.WORKER_ID&&r&&(i.WORKER_ID=r.workerId),"string"==typeof r.input)t.postMessage({workerId:i.WORKER_ID,results:i.parse(r.input,r.config),finished:!0});else if(t.File&&r.input instanceof File||r.input instanceof Object){var n=i.parse(r.input,r.config);n&&t.postMessage({workerId:i.WORKER_ID,results:n,finished:!0})}}),(u.prototype=Object.create(c.prototype)).constructor=u,(l.prototype=Object.create(c.prototype)).constructor=l,(d.prototype=Object.create(d.prototype)).constructor=d,(f.prototype=Object.create(c.prototype)).constructor=f,i}()}));const Gr=e=>{try{return qr.parse(e.replace(/^\ufeff/,""),{header:!0}).data}catch(e){return console.log(e),{}}},Kr=(e,t="EMPTY")=>e.sort((e,r)=>{let n=e,o=r;return"EMPTY"!==t&&(n=e[t],o=r[t]),o||(o=""),n||(n=""),o.length>n.length?1:n.length>o.length?-1:0});let Yr=null;const Qr=async e=>{if(!Yr)try{const e=localStorage.getItem("sczh:data");if(!e)return!1;Yr=JSON.parse(e)}catch(e){return console.error(e),!1}if(G(C.version,Yr.version))return Yr=null,localStorage.removeItem("sczh:data"),!1;let t=e;/(\.csv|\.json)/.test(e)||(t=e+".csv");const{hashes:r}=await Jr,n=r[t],o=Yr.hashes[t];return o&&o===n?Yr[e]:(Yr.hashes[t]=n,!1)},Vr=(e,t)=>{Yr&&Yr.hashes||(Yr={hashes:C.hashes,version:C.version});let r=e;/(\.csv|\.json)/.test(e)||(r=e+".csv");const n=C.hashes[r];n&&(Yr.hashes[r]=n),Yr[e]=t;const o=JSON.stringify(Yr);try{localStorage.setItem("sczh:data",o)}catch(e){console.error(e)}},Xr=new Map,Zr=async(e,t)=>{const r=t||e;if(Xr.has(e))return Xr.get(e);let n=await Qr(e);n||(n=await Wr(`/data/${r}.csv`),Vr(e,n));const o=Gr(n);return Xr.set(e,o),o},en=e=>{const t=new Map;let r=!1;const{name:n,path:o}=e,s=e.keys||{},i=s.text||"text",a=s.trans||"trans";return async()=>{if(!r){const s=await Zr(n,o);e.sort&&Kr(s,e.sort),s.forEach(e=>{const r=$(e[i]),n=U($(e[a],!0));r&&n&&t.set(r,n)}),r=!0}return t}},tn=(e,t=[])=>{let r=e.replace(/\./g,"\\.").replace(/\$num/g,"([+-+-]?[0-90-9]{1,10}\\.?[0-90-9]{0,4}?)").replace(/\$percent/g,"([+-+-]?[0-90-9]{1,10}\\.?[0-90-9]{0,4}?[%%])").replace(/\$unknown/g,"([\\s\\S]+)").replace(/\$uk/g,"([\\s\\S]+)").replace(/\$sep/g,"[\\s\\S]?");return t.forEach(e=>{r=r.replace(e.re,e.exp),e.re.lastIndex=0}),new RegExp(r,"gi")},rn=en({name:"name",keys:{text:"name"}}),nn=en({name:"etc/idol-name",keys:{text:"name"}});let on=null;const sn=async(e=!0)=>{if(on)return on;const t=await nn();on=new Map;for(let[r,n]of t){const t=r.split(" "),o=n.split(" ");e&&on.set(t[1],o[1]),on.set(t.join(""),o.join(" ")),on.set(r,o[1])}return on};let an=null;const cn=(t,r)=>{let n=null;const o=((e,...t)=>{let r=null,n=null;return async()=>(n||(n=e(...t)),r||(r=await n),r)})((e=>{let t=!1,r=new Map,n=[],o=new Map;return async()=>{if(!t){const s=await Zr(e),i=await sn(),a=new Map,c=new Map,u=new Map,l=new Map([["name",[...i.keys()]]]),d=[];Kr(s,"text").forEach(e=>{if(null==e?void 0:e.text){const t=$(e.text),r=U($(e.trans,!0)),n=L(e.type);t&&r&&(void 0===n||"text"===n?c.set(t,r):n&&"exp"!==n?(l.has(n)||l.set(n,[]),l.get(n).push((e=>e.replace(/\?/g,"\\?").replace(/\./g,"\\.").replace(/\*/g,"\\*").replace(/\+/g,"\\+").replace(/\(/g,"\\(").replace(/\)/g,"\\)"))(t)),a.set(t,r)):u.set(t.replace(/\[/g,"\\[").replace(/\]/g,"\\]"),r))}});for(let[e,t]of l)d.push({re:new RegExp("\\$"+e,"g"),exp:`(${t.join("|")})`});for(let[e,t]of u){const r=tn(e,d);o.set(r,t)}r=new Map([...c,...a,...i]),n=[a,i],t=!0}return{expMap:o,wordMaps:n,textMap:r}}})(t)),s=e=>async t=>(n||(n=await o(),r&&await r()),e&&e(t),n),i=e=>e.map(e=>{const t=e[1];return Array.isArray(t)?e[1]=t.map(e=>s(e)):e[1]=s(t),e}),a=(e,t)=>{const r=e.match(/(.+?)([++]+)$/);return r?Q(r[1],t)+r[2]:Q(e,t)};return{api:{get(e){zr.get(i(e))},post(e){zr.post(i(e))},put(e){zr.put(i(e))},patch(e){zr.patch(i(e))},delete(e){zr.delete(i(e))}},transItem:(t,r,o=n)=>{if(null==t?void 0:t[r]){let n=a(t[r],o);if(n!==t[r])return t[r]=e(n,!0);n=((e,t)=>e.split("/").map(e=>a(e,t)).join("/"))(t[r],o),n!==t[r]&&(t[r]=e(n,!0))}},getTransItem:e=>(t,r)=>{e(t,r,n)},ensureData:s()}},{api:un,transItem:ln}=cn("skill"),dn=e=>{var t,r;e&&(null===(t=e.skillEffects)||void 0===t||t.forEach(e=>{ln(e,"effectName"),ln(e,"effectDescription")}),null===(r=e.rivalMemoryAppealEffects)||void 0===r||r.forEach(e=>{ln(e,"effectName"),ln(e,"effectDescription")}))},fn=(e,t=!1)=>{e&&(ln(e,"comment"),ln(e,"name"),t&&dn(e),e.linkSkill&&(ln(e.linkSkill,"comment"),ln(e.linkSkill,"name"),t&&dn(e.linkSkill)),e.plusSkill&&(ln(e.plusSkill,"comment"),ln(e.plusSkill,"name")))},pn=e=>{e&&e.forEach(e=>{ln(e,"releaseConditions"),ln(e.passiveSkills,"comment"),ln(e.passiveSkills,"name"),fn(e.skill),fn(e.concertActiveSkill),e.activeSkills&&e.activeSkills.forEach(e=>{fn(e)})})},hn=e=>{e.forEach(e=>{fn(e)})},mn=(e,t=!1)=>{var r,n,o;let s=e.userProduceIdol;s&&(null===(r=s.activeSkills)||void 0===r||r.forEach(e=>{fn(e)}),null===(n=s.passiveSkills)||void 0===n||n.forEach(e=>{fn(e)}),null===(o=s.limitBreaks)||void 0===o||o.forEach(e=>{fn(e)}),t&&pn(s.skillPanels))},vn=e=>{e.forEach(e=>{fn(e.skill,!0)})},gn=e=>{e&&e.forEach(e=>{var t,r,n;null===(t=e.userFesDeck)||void 0===t||t.userFesDeckMembers.forEach(e=>{e.userFesIdol.activeSkills.forEach(e=>{dn(e)})}),null===(r=e.userRaidDeck)||void 0===r||r.userRaidDeckMembers.forEach(e=>{e.userFesIdol.activeSkills.forEach(e=>{fn(e,!0)})}),null===(n=e.rival)||void 0===n||n.rivalSkills.forEach(e=>{dn(e)})})},yn=e=>{pn(e.idol.skillPanels),hn(e.idol.memoryAppeals),(e=>{e.forEach(e=>{fn(e)})})(e.idol.abilities)},wn=e=>{var t,r,n;pn(e.supportIdol.skillPanels),null===(t=e.supportIdol)||void 0===t||null===(r=t.supportIdolActiveSkill)||void 0===r||null===(n=r.activeSkills)||void 0===n||n.forEach(e=>{ln(e,"comment"),ln(e,"name")})},En=e=>{const t=e.userFesIdol;t.activeSkills.forEach(e=>{fn(e)}),fn(t.memoryAppeal),t.passiveSkills.forEach(e=>{ln(e,"comment"),ln(e,"name")})},bn=En,kn=e=>{var t,r,n,o;e.userProduceSupportIdols.forEach(e=>{pn(e.skillPanels)}),mn(e,!0),null===(t=e.userProduceLimitedSkills)||void 0===t||t.forEach(e=>{fn(e.passiveSkills),fn(e.skill)}),pn(null===(r=e.userProduceIdol)||void 0===r||null===(n=r.userIdol)||void 0===n||null===(o=n.idol)||void 0===o?void 0:o.skillPanels)},Sn=e=>{var t;e.userFesIdol&&(e.userFesIdol.activeSkills.forEach(e=>{fn(e,!0)}),fn(e.userFesIdol.memoryAppeal,!0),null===(t=e.userFesIdol.passiveSkills)||void 0===t||t.forEach(e=>{ln(e,"comment"),ln(e,"name"),dn(e)}))},_n=e=>{var t,r,n;null===(t=e.userFesDeck)||void 0===t||t.userFesDeckMembers.forEach(Sn),null===(r=e.userRaidDeck)||void 0===r||r.userRaidDeckMembers.forEach(Sn),null===(n=e.userFesEventDeck)||void 0===n||n.userFesEventDeckMembers.forEach(Sn),vn(e.judges),gn(e.userFesRivals),gn(e.userFesRaidRivals),dn(e.feverActiveSkill)},In=e=>{var t;null===(t=e.fanActiveSkills)||void 0===t||t.forEach(e=>{fn(e,!0)}),e.userProduceSupportIdols.forEach(e=>{fn(e.activeSkill,!0)});let r=e.userProduceIdol;r.activeSkills.forEach(e=>{fn(e,!0)}),fn(r.memoryAppeal,!0),r.passiveSkills.forEach(e=>{fn(e,!0)});let n=e.produceAudition||e.produceConcert;vn(n.judges),(e=>{e.forEach(e=>{dn(e.rivalMemoryAppeal),e.rivalSkills.forEach(e=>{dn(e)})})})(n.rivals),dn(e.feverActiveSkill)},xn=e=>{if(e.gameData)try{let t=JSON.parse(e.gameData);t.produceAudition||t.produceConcert?In(t):(t.userFesDeck||t.userRaidDeck)&&_n(t),e.gameData=JSON.stringify(t)}catch(e){log(e)}},An=e=>{e.userProduceIdol.activeSkills.forEach(e=>{fn(e)})},Cn=e=>{var t,r,n;null===(t=e.userProduceReporterEvent)||void 0===t||null===(r=t.produceReporterEventResult)||void 0===r||null===(n=r.produceReporterEventSkills)||void 0===n||n.forEach(e=>{ln(e,"name")})};un.get([[["userSupportIdols/{num}","userSupportIdols/statusMax","produceTeachingSupportIdols/{num}"],[wn]],["userProduce(Teaching)?SupportIdols/{num}",[e=>{var t,r,n,o;pn(e.skillPanels),null===(t=e.userSupportIdol)||void 0===t||null===(r=t.supportIdol)||void 0===r||null===(n=r.supportIdolActiveSkill)||void 0===n||null===(o=n.activeSkills)||void 0===o||o.forEach(e=>{ln(e,"comment"),ln(e,"name")})}]],["userReserveSupportIdols/userSupportIdol/{num}",[e=>{var t,r,n;pn(e.supportIdol.skillPanels),null===(t=e.supportIdol)||void 0===t||null===(r=t.supportIdolActiveSkill)||void 0===r||null===(n=r.activeSkills)||void 0===n||n.forEach(e=>{ln(e,"comment"),ln(e,"name")})}]],[["userIdols/{num}","userIdols/statusMax","produceTeachingIdols/{num}"],[yn]],[["userProduce(Teaching)?Idols/{num}","userProduceTeachingIdol"],e=>{e.activeSkills.forEach(e=>{fn(e)}),hn(e.userIdol.idol.memoryAppeals)}],["userReserveIdols/userIdol/{num}",e=>{pn(e.idol.skillPanels),hn(e.idol.memoryAppeals)}],["userFesIdols/{num}",En],[["userProduces/skillPanels","userProduceTeachings/skillPanels"],kn],["userDecks/skillPanels",e=>{var t,r,n;e.userSupportIdols.forEach(e=>{pn(e.skillPanels)}),pn(null===(t=e.userIdol)||void 0===t?void 0:t.skillPanels),pn(null===(r=e.userIdol)||void 0===r||null===(n=r.idol)||void 0===n?void 0:n.skillPanels)}],["fes(Match)?Concert/actions/resume",[xn]],["earthUsers/{uuid}/userFesIdols/{num}",bn],["userRaidDecks",e=>{e.userRaidDecks.forEach(e=>{e.userRaidDeckMembers.forEach(e=>{var t;null===(t=e.userFesIdol)||void 0===t||t.activeSkills.forEach(e=>{fn(e)})})})}],["userProduceAbilities",An],["userProduces",[Cn]]]),un.post([["userIdols/{num}/produceExSkills/{num}/actions/set",yn],[["userProduce(Teaching)?s/skillPanels/{num}","userProduces/limitedSkills/{num}"],kn],["userSupportIdols/{num}/produceExSkills/{num}/actions/set",[wn]],[["produces/actions/resume","produces/actions/finish","produceTeachings/resume"],[e=>{e.gameData||mn(e)},xn]],[["produces/actions/resume","produces/actions/next"],[Cn]],["fes(Match|Raid)?Concert/actions/start",[_n]],["fes(Match)?Concert/actions/resume",[xn]],["fesRaidConcert/actions/resume",[e=>{if(e.gameState&&e.gameState.game_data)try{let t=JSON.parse(e.gameState.game_data);t.userRaidDeck&&_n(t),e.gameState.game_data=JSON.stringify(t)}catch(e){log(e)}}]],["fesTowerConcert/actions/start",[_n]],["fesTowerConcert/actions/resume",[e=>{if(e.gameState&&e.gameState.game_data)try{let t=JSON.parse(e.gameState.game_data);t.userFesEventDeck&&_n(t),e.gameState.game_data=JSON.stringify(t)}catch(e){log(e)}}]],[["produce(Teaching)?s/({num}/audition|concert)/actions/start","produceTeachings/(auditions|concerts)/start"],[In]],[["produces/actions/next","produces/actions/resume"],e=>{e.userProduceIdol&&hn(e.userProduceIdol.userIdol.idol.memoryAppeals)}],["userProduceAbilities",An]]),un.patch([["userFesDecks",e=>{e.userFesDecks.forEach(e=>{e.userFesDeckMembers.forEach(Sn)})}],["userSupportIdols/{num}",e=>{wn(e.userSupportIdol)}]]),un.delete([["userProduces/skillPanels/{num}",kn]]);const{api:Tn,transItem:Rn}=cn("etc/ex-skill"),jn=e=>{Rn(e,"name"),Rn(e,"description")},Mn=e=>{e.userIdolProduceExSkills.forEach(e=>{jn(e.produceExSkill)})},Pn=e=>{var t;null===(t=e.userSupportIdolProduceExSkills)||void 0===t||t.forEach(e=>{jn(e.produceExSkill)})},On=e=>{const t=e.userFesIdol;t.userFesIdolProduceExSkills.forEach(e=>{jn(e.produceExSkill)}),t.userFesSupportIdols.forEach(e=>{e.userFesSupportIdolProduceExSkills.forEach(e=>{jn(e.produceExSkill)})})},Fn=On;Tn.get([[["userIdols/produceExSkillTop","userSupportIdols/produceExSkillTop","userIdols/{num}/produceExSkillTop","userSupportIdols/{num}/produceExSkillTop"],e=>{var t,r,n,o,s,i;null===(t=e.userIdols)||void 0===t||t.forEach(e=>{var t;null===(t=e.userIdolProduceExSkills)||void 0===t||t.forEach(e=>{jn(e.produceExSkill)})}),null===(r=e.userSupportIdols)||void 0===r||r.forEach(e=>{var t;null===(t=e.userSupportIdolProduceExSkills)||void 0===t||t.forEach(e=>{jn(e.produceExSkill)})}),null===(n=e.userIdol)||void 0===n||null===(o=n.userIdolProduceExSkills)||void 0===o||o.forEach(e=>{jn(e.produceExSkill)}),null===(s=e.userSupportIdol)||void 0===s||null===(i=s.userSupportIdolProduceExSkills)||void 0===i||i.forEach(e=>{jn(e.produceExSkill)}),e.userProduceExSkills.forEach(e=>{var t;jn(e.produceExSkill),jn(null===(t=e.produceExSkillUpgrade)||void 0===t?void 0:t.produceExSkill)})}],[["userSupportIdols/{num}","userSupportIdols/statusMax","produceTeachingSupportIdols/{num}"],[Pn]],["userProduce(Teaching)?SupportIdols/{num}",[e=>{var t;null===(t=e.userProduceSupportIdolProduceExSkills)||void 0===t||t.forEach(e=>{jn(e.produceExSkill)})}]],[["userIdols/{num}","userIdols/statusMax","produceTeachingIdols/{num}"],[Mn]],[["userProduce(Teaching)?Idols/{num}","userProduceTeachingIdol"],e=>{e.userProduceIdolProduceExSkills.forEach(e=>{jn(e.produceExSkill)})}],["userFesIdols/{num}",On],["earthUsers/{uuid}/userFesIdols/{num}",Fn],["userProducerSkills/summaries",e=>{e.forEach(e=>{jn(e)})}]]),Tn.post([["userIdols/{num}/produceExSkills/{num}/actions/set",Mn],["userSupportIdols/{num}/produceExSkills/{num}/actions/set",[Pn]],["produces/actions/result",[e=>{e.produceExSkillRewards.forEach(e=>{jn(e.produceExSkill)})}]],["business/actions/finish",e=>{e.slots.forEach(e=>{e.businessProduceExSkillRewards.forEach(e=>{jn(e.produceExSkill)})})}],["userProduceExSkills/actions/upgrade",e=>{jn(e.produceExSkill)}]]);const{api:Dn,transItem:zn}=cn("support-skill"),Nn=e=>{null==e||e.forEach(e=>{zn(e,"description"),zn(e,"name")})},Bn=e=>{var t,r;const n=null!==(t=e.userSupportIdol)&&void 0!==t?t:e;Nn(n.acquiredSupportSkills),Nn(n.supportSkills),Nn(null===(r=n.supportIdol)||void 0===r?void 0:r.supportSkills)};Dn.get([[["userSupportIdols/{num}","userSupportIdols/statusMax","produceTeachingSupportIdols/{num}"],[Bn]],["userProduce(Teaching)?SupportIdols/{num}",[Bn]],["userReserveSupportIdols/userSupportIdol/{num}",[Bn]],["produces/{num}/decks",e=>{var t;null===(t=e.userSupportIdols)||void 0===t||t.forEach(e=>{var t;Nn(null===(t=e.supportIdol)||void 0===t?void 0:t.supportSkills)})}]]),Dn.post([["produces/{num}/actions/ready",[e=>{e.userDecks.forEach(e=>{e.userSupportIdols.forEach(e=>{var t;Nn(null===(t=e.supportIdol)||void 0===t?void 0:t.supportSkills)})})}]],["userSupportIdols/{num}/produceExSkills/{num}/actions/set",[Bn]],["produces/actions/(resume|next)",[Bn]],[["produceTeachings/resume","produceTeachings/next"],Bn]]),Dn.patch([["userSupportIdols/{num}",Bn],["produces/{num}/produceItem/consume",e=>{Nn(e.supportSkills)}]]);const{api:Ln,transItem:$n}=cn("etc/idea-note"),Un=e=>{var t;e&&($n(e,"title"),(e=>{$n(e,"title"),$n(e,"comment")})(e.produceIdeaNoteCompleteBonus),null===(t=e.produceIdeaNoteExtraBonuses)||void 0===t||t.forEach(e=>{$n(e,"comment"),$n(e,"condition")}))},Hn=e=>{var t,r;null===(t=e.ideaNoteResult)||void 0===t||null===(r=t.seasonClearBonusIdeaNotes)||void 0===r||r.forEach(e=>{Un(e)})};Ln.get([["userProduceIdeaNotes",e=>{e.forEach(e=>{Un(e.produceIdeaNote)})}]]),Ln.post([["produces/actions/(resume|next)",[e=>{var t;null===(t=e.userProduceIdeaNotes)||void 0===t||t.forEach(e=>{Un(e.produceIdeaNote)})},Hn]],["produces/actions/act",[e=>{var t,r,n;null===(t=e.produceEvents)||void 0===t||t.forEach(e=>{var t;null===(t=e.produceIdeaNotes)||void 0===t||t.forEach(e=>{Un(e)})});let o=null===(r=e.lessonResult)||void 0===r||null===(n=r.userProduceIdeaNote)||void 0===n?void 0:n.produceIdeaNote;Un(o)}]],["produces/actions/endWeek",Hn]]),Ln.patch([["userProduceIdeaNotes/228681479/actions/select",e=>{Un(e.userProduceIdeaNote.produceIdeaNote)}]]);const{api:Jn,transItem:Wn}=cn("etc/grad-skill"),qn=e=>{var t;e&&(Wn(e,"comment"),Wn(e,"name"),Wn(e,"acquireComment"),Wn(e,"releaseComment"),null===(t=e.produceAbilityAcquireConditionComments)||void 0===t||t.forEach(e=>{Wn(e,"name")}))},Gn=e=>{e.userFesIdol.abilities.forEach(e=>{qn(e)})},Kn=Gn,Yn=e=>{var t,r;const n=e=>{e.userFesIdol.abilities.forEach(e=>{qn(e)}),e.userFesIdol.concertAbilities.forEach(e=>{qn(e)})};null===(t=e.userFesDeck)||void 0===t||t.userFesDeckMembers.forEach(n),null===(r=e.userRaidDeck)||void 0===r||r.userRaidDeckMembers.forEach(n)},Qn=e=>{var t,r;const n=e.userProduceIdol;n&&(null===(t=n.abilities)||void 0===t||t.forEach(e=>{qn(e)}),null===(r=n.concertAbilities)||void 0===r||r.forEach(e=>{qn(e)}))},Vn=e=>{if(e.gameData)try{let t=JSON.parse(e.gameData);t.produceAudition||t.produceConcert?Qn(t):(t.userFesDeck||t.userRaidDeck)&&Yn(t),e.gameData=JSON.stringify(t)}catch(e){log(e)}},Xn=e=>{e.userProduceIdol.abilities.forEach(e=>{qn(e)}),e.userProduceAbilities.forEach(e=>{qn(e.ability)})};Jn.get([["userFesIdols/{num}",Gn],["fes(Match)?Concert/actions/resume",[Vn]],["earthUsers/{uuid}/userFesIdols/{num}",Kn],["userProduceAbilities",Xn],[["userProduceAreas"],e=>{var t;null===(t=e.abilities)||void 0===t||t.forEach(e=>{qn(e)})}]]),Jn.post([[["produces/actions/resume","produces/actions/finish","produceTeachings/resume"],[e=>{e.gameData||((e,t=!1)=>{var r;let n=e.userProduceIdol;n&&(null===(r=n.abilities)||void 0===r||r.forEach(e=>{qn(e)}))})(e)},Vn]],["fes(Match|Raid)?Concert/actions/start",[Yn]],["fes(Match)?Concert/actions/resume",[Vn]],["fesRaidConcert/actions/resume",[e=>{if(e.gameState&&e.gameState.game_data)try{let t=JSON.parse(e.gameState.game_data);t.userRaidDeck&&Yn(t),e.gameState.game_data=JSON.stringify(t)}catch(e){log(e)}}]],[["produce(Teaching)?s/({num}/audition|concert)/actions/start","produceTeachings/(auditions|concerts)/start"],[Qn]],["produces/({num}/audition|concert)/actions/(start|finish)",e=>{var t,r;null===(t=e.concertEvent)||void 0===t||null===(r=t.abilities)||void 0===r||r.forEach(e=>{Wn(e,"name")})}],["userProduceAbilities",Xn]]);const{api:Zn,transItem:eo}=cn("etc/landing-point"),to=e=>{e&&(eo(e,"comment"),eo(e,"name"),eo(e,"acquireComment"),eo(e,"releaseComment"))},ro=e=>{eo(e,"title"),e.produceMusicAssignmentClearBonuses.forEach(e=>{eo(e,"title")})},no=e=>{var t,r;eo(e.concertBgm,"songTitle"),eo(e.concertBgm,"newLineSongTitle"),eo(e.feverActiveSkill,"comment"),e.produceMusicProficiencyBonuses.forEach(e=>{var t;eo(e,"description"),e.ability&&(to(e.ability),null===(t=e.ability.produceAbilityAcquireConditionComments)||void 0===t||t.forEach(e=>{eo(e,"name")}))}),null===(t=e.produceMusicAssignments)||void 0===t||t.forEach(ro),null===(r=e.produceMusicProficiencyJudgeStarBonuses)||void 0===r||r.forEach(e=>{eo(e,"description")})},oo=e=>{var t,r,n;no(e.produceMusic),null===(t=e.userProduceMusicAssignments)||void 0===t||t.forEach(e=>{ro(e.produceMusicAssignment)}),null===(r=e.allUserProduceMusicAssignments)||void 0===r||r.forEach(e=>{ro(e.produceMusicAssignment)}),null===(n=e.judgeStarBonuses)||void 0===n||n.forEach(e=>{eo(e,"description")})},so=e=>{var t,r;null===(t=e.userProduceMusicProficiencies)||void 0===t||t.forEach(oo),null===(r=e.activatedProduceMusicAssignmentBonuses)||void 0===r||r.forEach(e=>{var t;null===(t=e.produceMusicAssignmentClearBonuses)||void 0===t||t.forEach(e=>{eo(e,"title")})})},io=e=>{var t;to(e),null===(t=e.skillEffects)||void 0===t||t.forEach(e=>{eo(e,"effectDescription"),eo(e,"effectName")})},ao=e=>{var t,r,n,o;null===(t=e.produceMusic)||void 0===t||null===(r=t.judgeStarBonuses)||void 0===r||r.forEach(e=>{eo(e,"description")}),null===(n=e.userProduceIdol)||void 0===n||null===(o=n.abilities)||void 0===o||o.forEach(io),eo(e.feverActiveSkill,"comment")},co=e=>{var t,r;null===(t=e.userFesIdol)||void 0===t||null===(r=t.abilities)||void 0===r||r.forEach(io)},uo=co;Zn.get([[["userProduceAreas","produceMusics"],e=>{var t;null===(t=e.produceMusics)||void 0===t||t.forEach(no)}],["userProduces",[so]],["userFesIdols/{num}",co],["earthUsers/{uuid}/userFesIdols/{num}",uo]]),Zn.post([[["produces/actions/resume","produces/actions/next"],[so]],["produces/actions/resume",e=>{if(e.gameData)try{let t=JSON.parse(e.gameData);t.produceAudition||t.produceConcert?ao(t):t.userFesDeck||t.userRaidDeck,e.gameData=JSON.stringify(t)}catch(e){log(e)}}],["userProduceMusicProficiencies",e=>{oo(e.userProduceMusicProficiency)}],["produces/concert/actions/start",ao]]),Zn.patch([["userProduceMusicAssignments/{num}",e=>{ro(e.produceMusicAssignment)}]]);const{api:lo,transItem:fo}=cn("etc/festour"),po=e=>{var t;null===(t=e.suggestFesTowerCompleteBonuses)||void 0===t||t.forEach(e=>{vo(e)})},ho=e=>{var t;null===(t=e.suggestFesTowerAreaClearBonuses)||void 0===t||t.forEach(e=>{fo(e.fesTowerBonus,"desc")})},mo=e=>{let t=e.userFesTowerAreaSkipBonus;t&&fo(t.fesTowerBonus,"desc")},vo=e=>{var t;e&&(null===(t=e.userFesTowerCompleteBonuses)||void 0===t||t.forEach(e=>{yo(e)}))},go=e=>{var t;e&&(null===(t=e.fesTowerBonusIdolConditions)||void 0===t||t.forEach(e=>{fo(e,"desc")}))},yo=e=>{var t,r;e&&(null===(t=e.fesTowerCompleteBonus)||void 0===t||null===(r=t.fesTowerBonuses)||void 0===r||r.forEach(e=>{fo(e,"desc")}))},wo=e=>{var t;e&&(null===(t=e.evaluationDetails)||void 0===t||t.forEach(e=>{fo(e,"evaluation")}))},Eo=e=>{var t;e&&(null===(t=e.skillEffects)||void 0===t||t.forEach(e=>{fo(e,"effectDescription")}))},bo=e=>{var t;null===(t=e.userFesTowerAreaClearBonuses)||void 0===t||t.forEach(e=>{fo(e.fesTowerBonus,"desc")})};lo.get([["userFesTowerResults",wo],["userFesTowerAdvantages",[e=>{var t;e&&(null===(t=e.fesTowerAdvantageFilters)||void 0===t||t.forEach(e=>{fo(e,"title")}))},e=>{var t;e&&(null===(t=e.userFesTowerAdvantages)||void 0===t||t.forEach(e=>{fo(e,"name"),fo(e.fesTowerAdvantageEffect,"desc"),fo(e.nextFesTowerAdvantageEffect,"desc"),Eo(Eo)}))}]],["userFesTowerItems",e=>{var t;e&&(null===(t=e.userFesTowerItems)||void 0===t||t.forEach(e=>{fo(e,"name"),fo(e.fesTowerItemLevel,"desc"),fo(e.nextFesTowerItemLevel,"desc")}))}],[["fesTowerBonusIdols"],e=>{var t;null===(t=e.fesTowerBonusIdols)||void 0===t||t.forEach(e=>{go(e)})}]]),lo.post([["userFesTowerResults",wo],["fesTowerEvents/top",[po,ho,mo,vo,e=>{var t;null===(t=e.userFesTowerAreas)||void 0===t||t.forEach(e=>{bo(e)})}]]]),lo.patch([["userFesTowerAdvantages/action/acquire",e=>{e&&(fo(e,"name"),fo(e.fesTowerAdvantageEffect,"desc"),fo(e.nextFesTowerAdvantageEffect,"desc"))}],["userFesTowerItems/action/acquire",e=>{e&&(fo(e,"name"),fo(e.fesTowerItemLevel,"desc"),fo(e.nextFesTowerItemLevel,"desc"))}],["userFesTowerAreas/action/complete",po],["userFesTowerAreas/action/skip",po],[["fesTowerEvents/top","userFesTowers/action/skip"],[po,ho,mo]]]);const{api:ko,transItem:So}=cn("etc/knowhowbook"),_o=e=>{var t;null===(t=e.userKnowHowBooks)||void 0===t||t.forEach(e=>{Io(e)})},Io=e=>{var t;null===(t=e.userKnowHowBookIndividualities)||void 0===t||t.forEach(e=>{xo(e.individuality)})},xo=e=>{e&&(So(e,"name"),So(e,"description"))},Ao=e=>{e&&(So(e,"name"),e.ability&&(So(e.ability,"comment"),So(e.ability,"name")),e.activeSkill&&So(e.activeSkill,"comment"))};ko.get([[["userProduceAreas","userProduces/growths"],e=>{var t;null===(t=e.userProduceGrowths)||void 0===t||t.forEach(e=>{Ao(e.produceGrowth)})}],[["userKnowHowBooks"],_o]]),ko.post([[["produces/actions/endWeek","produces/actions/resume"],e=>{var t;null===(t=e.availableIndividualities)||void 0===t||t.forEach(e=>{xo(e)})}],["produces/actions/result",_o]]);const{api:Co,getTransItem:To,ensureData:Ro}=cn("etc/item-re"),jo=To((t,r,n)=>{if(null==t?void 0:t[r]){let o=t[r].split("\n");o.forEach((e,t)=>{V(o,t,n)});let s=o.join("\n");s!==t[r]&&(t[r]=e(s,!0))}}),Mo=To(V),Po=To((e,t,r)=>{if(null==e?void 0:e[t]){let n=e[t];if(V(e,t,r),e[t]===n){e[t]=e[t].replace("\n","");let o=e[t];V(e,t,r),o===e[t]&&(e[t]=n)}}}),Oo=["produceItem","recoveryItem","exchangeItem","lotteryTicket","evolutionItem","gashaTicket","scoutTicket","enhancementItem","idolEvolutionPiece"],Fo=e=>{var t;null==e||null===(t=e.shopMerchandises)||void 0===t||t.forEach(e=>{var t;Mo(e,"title"),Po(e,"shopTitle"),jo(e,"comment"),null===(t=e.shopContents)||void 0===t||t.forEach(e=>{Mo(e.content,"name"),jo(e.content,"comment")})})},Do=e=>{let t=e;e.userProduceItems&&(t=e.userProduceItems),Array.isArray(t)&&t.forEach(e=>{const t=e[Oo[0]]||e[Oo[1]]||e[Oo[2]]||e[Oo[3]]||e[Oo[4]]||e[Oo[5]]||e[Oo[6]]||e[Oo[7]]||e[Oo[8]];Mo(t,"name"),jo(t,"comment")})},zo=e=>{e.accumulatedPresent.userGameEventAccumulatedPresents.forEach(e=>{e.gameEventAccumulatedPresent.rewards.forEach(e=>{Mo(e.content,"name")})})},No=e=>{var t;null==e||null===(t=e.activeProduceItems)||void 0===t||t.forEach(e=>{Mo(e.produceItem,"name"),jo(e.produceItem,"comment")})};Co.get([[["userShops","userIdolPieceShops"],e=>{e&&(Array.isArray(e.userShops)&&e.userShops.forEach(e=>{Fo(e)}),Array.isArray(e.userEventShops)&&e.userEventShops.forEach(e=>{Fo(e.userShop)}))}],[["userRecoveryItems","userProduceItems","userExchangeItems","userLotteryTickets","userEvolutionItems","userGashaTickets","userScoutTickets","userEnhancementItems","userIdolEvolutionPieces"],Do],[["userPresents\\?limit={num}","userPresentHistories\\?limit={num}"],e=>{Array.isArray(e)&&e.forEach(e=>{Mo(e.content,"name"),Mo(e,"note")})}],["userProduces",No],["missionEvents/{num}/top",zo],["gashaGroups",e=>{var t;null===(t=e.gashaGroups)||void 0===t||t.forEach(e=>{var t;const r=null===(t=e.userGashaTicket)||void 0===t?void 0:t.gashaTicket;Mo(r,"name"),jo(r,"comment")})}],["businessTop",e=>{var t;null===(t=e.userRecoveryItems)||void 0===t||t.forEach(e=>{Mo(e.recoveryItem,"name")})}]]),Co.post([["myPage",e=>{No(e.userProduce)}],["(produceMarathons|fesMarathons|trainingEvents)/{num}/top",zo],["userShops/actions/purchase",e=>{Mo(null==e?void 0:e.shopMerchandise,"title"),jo(null==e?void 0:e.shopMerchandise,"comment")}],["produces/{num}/actions/ready",Do],["userPresents/{num}/actions/receive",e=>{Mo(e.receivedPresent,"Name")}],["userMissions/{num}/actions/receive",e=>{Mo(e.userMission.mission.missionReward.content,"name")}],["userLoginBonuses",e=>{e.userLoginBonuses.forEach(e=>{e.loginBonus.sheets.forEach(e=>{e.rewards.forEach(e=>{Mo(e.content,"name")})})}),e.userTotalBonuses.forEach(e=>{e.rewards.forEach(e=>{Mo(e.content,"name")})})}],["fesTop",e=>{e.lastRankingResult&&Array.isArray(e.lastRankingResult.fesMatchGradeRewards)&&e.lastRankingResult.fesMatchGradeRewards.forEach(e=>{Mo(e.content,"name")})}],["userSelectLoginBonuses/{num}",e=>{e.rewards.forEach(e=>{Mo(e.content,"name")})}],["gashas/{num}/actions/draw",e=>{var t;null===(t=e.acquiredStampRewards)||void 0===t||t.forEach(e=>{Mo(e.content,"name")})}]]),Co.patch([["produces/{num}/produceItem/consume",e=>{var t;const r=null===(t=e.consumeProduceItem)||void 0===t?void 0:t.produceItem;r&&(Mo(r,"name"),jo(r,"comment"))}]]);en({name:"etc/noun-fix",keys:{trans:"fixed"},sort:"text"}),en({name:"etc/caiyun-prefix",keys:{trans:"fixed"},sort:"text"});const Bo=new Map;let Lo=new Map,$o=!1,Uo=null;const Ho=t=>{const r=Gr(t),n=new Map,o=K();return r.forEach(t=>{const r=o(L(t.id)),s=$(t.text),i=$(t.trans,!0),a=L(t.name);s&&i&&(r&&!/^0+$/.test(r)&&"select"!==r?n.set(r,e(i)):"select"===r?n.set(s+"-select",e(i)):n.set(s,e(i))),r&&a&&"info"===r&&n.set("name",a)}),n},Jo=async()=>{if(!$o){(await Zr("comm-story")).forEach(e=>{if(null==e?void 0:e.text){const t=$(e.text),r=$(e.trans,!0);t&&r&&t!==r&&Lo.set(t,r)}}),$o=!0}return Lo};let Wo=null,qo=!1;const Go=en({name:"type-text"}),Ko=async()=>(qo||(Wo=await Go(),qo=!0),Wo);var Yo=function(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var r=[0,0,0,0];return r[3]+=e[3]+t[3],r[2]+=r[3]>>>16,r[3]&=65535,r[2]+=e[2]+t[2],r[1]+=r[2]>>>16,r[2]&=65535,r[1]+=e[1]+t[1],r[0]+=r[1]>>>16,r[1]&=65535,r[0]+=e[0]+t[0],r[0]&=65535,[r[0]<<16|r[1],r[2]<<16|r[3]]},Qo=function(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var r=[0,0,0,0];return r[3]+=e[3]*t[3],r[2]+=r[3]>>>16,r[3]&=65535,r[2]+=e[2]*t[3],r[1]+=r[2]>>>16,r[2]&=65535,r[2]+=e[3]*t[2],r[1]+=r[2]>>>16,r[2]&=65535,r[1]+=e[1]*t[3],r[0]+=r[1]>>>16,r[1]&=65535,r[1]+=e[2]*t[2],r[0]+=r[1]>>>16,r[1]&=65535,r[1]+=e[3]*t[1],r[0]+=r[1]>>>16,r[1]&=65535,r[0]+=e[0]*t[3]+e[1]*t[2]+e[2]*t[1]+e[3]*t[0],r[0]&=65535,[r[0]<<16|r[1],r[2]<<16|r[3]]},Vo=function(e,t){return 32===(t%=64)?[e[1],e[0]]:t<32?[e[0]<<t|e[1]>>>32-t,e[1]<<t|e[0]>>>32-t]:(t-=32,[e[1]<<t|e[0]>>>32-t,e[0]<<t|e[1]>>>32-t])},Xo=function(e,t){return 0===(t%=64)?e:t<32?[e[0]<<t|e[1]>>>32-t,e[1]<<t]:[e[1]<<t-32,0]},Zo=function(e,t){return[e[0]^t[0],e[1]^t[1]]},es=function(e){return e=Zo(e,[0,e[0]>>>1]),e=Qo(e,[4283543511,3981806797]),e=Zo(e,[0,e[0]>>>1]),e=Qo(e,[3301882366,444984403]),e=Zo(e,[0,e[0]>>>1])};let ts="";const rs=()=>{let e="0123456789abcdefghijklmnopqrstuvwxyz",t="";for(let r=0;r<33;r++)t+=e[Math.floor(Math.random()*e.length)];ts=function(e,t){t=t||0;for(var r=(e=e||"").length%16,n=e.length-r,o=[0,t],s=[0,t],i=[0,0],a=[0,0],c=[2277735313,289559509],u=[1291169091,658871167],l=0;l<n;l+=16)i=[255&e.charCodeAt(l+4)|(255&e.charCodeAt(l+5))<<8|(255&e.charCodeAt(l+6))<<16|(255&e.charCodeAt(l+7))<<24,255&e.charCodeAt(l)|(255&e.charCodeAt(l+1))<<8|(255&e.charCodeAt(l+2))<<16|(255&e.charCodeAt(l+3))<<24],a=[255&e.charCodeAt(l+12)|(255&e.charCodeAt(l+13))<<8|(255&e.charCodeAt(l+14))<<16|(255&e.charCodeAt(l+15))<<24,255&e.charCodeAt(l+8)|(255&e.charCodeAt(l+9))<<8|(255&e.charCodeAt(l+10))<<16|(255&e.charCodeAt(l+11))<<24],i=Qo(i,c),i=Vo(i,31),i=Qo(i,u),o=Zo(o,i),o=Vo(o,27),o=Yo(o,s),o=Yo(Qo(o,[0,5]),[0,1390208809]),a=Qo(a,u),a=Vo(a,33),a=Qo(a,c),s=Zo(s,a),s=Vo(s,31),s=Yo(s,o),s=Yo(Qo(s,[0,5]),[0,944331445]);switch(i=[0,0],a=[0,0],r){case 15:a=Zo(a,Xo([0,e.charCodeAt(l+14)],48));case 14:a=Zo(a,Xo([0,e.charCodeAt(l+13)],40));case 13:a=Zo(a,Xo([0,e.charCodeAt(l+12)],32));case 12:a=Zo(a,Xo([0,e.charCodeAt(l+11)],24));case 11:a=Zo(a,Xo([0,e.charCodeAt(l+10)],16));case 10:a=Zo(a,Xo([0,e.charCodeAt(l+9)],8));case 9:a=Zo(a,[0,e.charCodeAt(l+8)]),a=Qo(a,u),a=Vo(a,33),a=Qo(a,c),s=Zo(s,a);case 8:i=Zo(i,Xo([0,e.charCodeAt(l+7)],56));case 7:i=Zo(i,Xo([0,e.charCodeAt(l+6)],48));case 6:i=Zo(i,Xo([0,e.charCodeAt(l+5)],40));case 5:i=Zo(i,Xo([0,e.charCodeAt(l+4)],32));case 4:i=Zo(i,Xo([0,e.charCodeAt(l+3)],24));case 3:i=Zo(i,Xo([0,e.charCodeAt(l+2)],16));case 2:i=Zo(i,Xo([0,e.charCodeAt(l+1)],8));case 1:i=Zo(i,[0,e.charCodeAt(l)]),i=Qo(i,c),i=Vo(i,31),i=Qo(i,u),o=Zo(o,i)}return o=Zo(o,[0,e.length]),s=Zo(s,[0,e.length]),o=Yo(o,s),s=Yo(s,o),o=es(o),s=es(s),o=Yo(o,s),s=Yo(s,o),("00000000"+(o[0]>>>0).toString(16)).slice(-8)+("00000000"+(o[1]>>>0).toString(16)).slice(-8)+("00000000"+(s[0]>>>0).toString(16)).slice(-8)+("00000000"+(s[1]>>>0).toString(16)).slice(-8)}(t,31),localStorage.setItem("sczh:bid",ts)};try{ts=localStorage.getItem("sczh:bid")}catch(e){}ts||rs();var ns=Object.prototype.hasOwnProperty,os=Array.isArray,ss=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),is=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r},as={arrayToObject:is,assign:function(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var o=t[n],s=o.obj[o.prop],i=Object.keys(s),a=0;a<i.length;++a){var c=i[a],u=s[c];"object"==typeof u&&null!==u&&-1===r.indexOf(u)&&(t.push({obj:s,prop:c}),r.push(u))}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(os(r)){for(var n=[],o=0;o<r.length;++o)void 0!==r[o]&&n.push(r[o]);t.obj[t.prop]=n}}}(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function(e,t,r){if(0===e.length)return e;var n=e;if("symbol"==typeof e?n=Symbol.prototype.toString.call(e):"string"!=typeof e&&(n=String(e)),"iso-8859-1"===r)return escape(n).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var o="",s=0;s<n.length;++s){var i=n.charCodeAt(s);45===i||46===i||95===i||126===i||i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122?o+=n.charAt(s):i<128?o+=ss[i]:i<2048?o+=ss[192|i>>6]+ss[128|63&i]:i<55296||i>=57344?o+=ss[224|i>>12]+ss[128|i>>6&63]+ss[128|63&i]:(s+=1,i=65536+((1023&i)<<10|1023&n.charCodeAt(s)),o+=ss[240|i>>18]+ss[128|i>>12&63]+ss[128|i>>6&63]+ss[128|63&i])}return o},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},merge:function e(t,r,n){if(!r)return t;if("object"!=typeof r){if(os(t))t.push(r);else{if(!t||"object"!=typeof t)return[t,r];(n&&(n.plainObjects||n.allowPrototypes)||!ns.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(r);var o=t;return os(t)&&!os(r)&&(o=is(t,n)),os(t)&&os(r)?(r.forEach((function(r,o){if(ns.call(t,o)){var s=t[o];s&&"object"==typeof s&&r&&"object"==typeof r?t[o]=e(s,r,n):t.push(r)}else t[o]=r})),t):Object.keys(r).reduce((function(t,o){var s=r[o];return ns.call(t,o)?t[o]=e(t[o],s,n):t[o]=s,t}),o)}},cs=String.prototype.replace,us=/%20/g,ls={RFC1738:"RFC1738",RFC3986:"RFC3986"},ds=as.assign({default:ls.RFC3986,formatters:{RFC1738:function(e){return cs.call(e,us,"+")},RFC3986:function(e){return String(e)}}},ls),fs=(Date.prototype.toISOString,ds.default);ds.formatters[fs];const ps=async e=>{const t={text:e};try{const e="https://hooks.sla"+"ck.com/services/TN6J76CUB/BNJ2"+"YLNR3/baGxj31D5YxNhL2Q9FcbzaTA";await((e,t)=>{const{method:r="GET",headers:n,data:o}=t;return fetch(e,{body:o,headers:n,method:r,mode:"cors",referrer:"no-referrer"}).then(e=>e.json())})(e,{data:JSON.stringify(t),method:"POST",headers:{accept:"*/*",referer:"https://hooks.slack.com",origin:"https://hooks.slack.com"}});return""}catch(e){return""}},hs=["text","select","comment","title","actionComment","actionComment2","reactionComment","resultLoseComment","resultStartComment","resultWinComment","characterComment","producerComment","comment1","comment2"],ms=["mainText","resultText","name"],vs=(t,r)=>{const n=[],o=[];return t.forEach((t,s)=>{hs.forEach(i=>{let a=H(t[i]);t[i]&&(r.has(a)?t[i]=e(r.get(a)):(n.push({key:i,index:s}),o.push(a)))})}),{textInfo:n,textList:o}};let gs=!1,ys=!1;const ws=async(t,r="default",n)=>{if(!t.length)return;const o=await Ko(),s=await Jo();if(n){const{textInfo:e,textList:r}=vs(t,o);if(!e.length||"……"==r||1==gs||"…………"==r||"………………\n……………………\n…………………………"==r||e.length>9)return;let n=[];r.forEach((e,t)=>{n.push(q(e))});const s=n.join("\n"),i=/[ㄱ-ㅎ|ㅏ-ㅣ|가-힣]/,a=[];["…………","……","………………\n……………………\n…………………………"].forEach(e=>{a.push(q(e))}),i.test(s)||a.includes(n[0])||await ps(s),gs=!0}else if("FesTower"==r){const{textInfo:r,textList:n}=((t,r)=>{const n=[],o=[];return t.forEach((t,s)=>{ms.forEach(i=>{let a=H(t[i]);t[i]&&(r.has(a)?t[i]=e(r.get(a)):(n.push({key:i,index:s}),o.push(a)))})}),{textInfo:n,textList:o}})(t,s);if(!r.length||"……"==n||1==gs||1==ys||"…………"==n||"………………\n……………………\n…………………………"==n||r.length>9)return;let o=[];n.forEach((e,t)=>{o.push("commstory"+q(e))});const i=o.join("\n"),a=/[ㄱ-ㅎ|ㅏ-ㅣ|가-힣]/,c=[];["…………","……","………………\n……………………\n…………………………"].forEach(e=>{c.push(q(e))}),a.test(i)||c.includes(o[0])||await ps(i),1==gs&&(ys=!0),gs=!0}else{const{textInfo:e,textList:r}=vs(t,s);if(!e.length||"……"==r||1==gs||"…………"==r||"………………\n……………………\n…………………………"==r||e.length>9)return;let n=[];r.forEach((e,t)=>{n.push("commstory"+q(e))});const o=n.join("\n"),i=/[ㄱ-ㅎ|ㅏ-ㅣ|가-힣]/,a=[];["…………","……","………………\n……………………\n…………………………"].forEach(e=>{a.push(q(e))}),i.test(o)||a.includes(n[0])||await ps(o),gs=!0}},{api:Es,transItem:bs}=cn("mission",Ro),ks=(e,t)=>{bs(e,t)||("name"===t?Mo(e,t):jo(e,t))};let Ss=!1;const _s=e=>{null==e||e.forEach(e=>{bs(e.mission,"title"),bs(e.mission,"comment"),e.mission.missionReward.content&&(ks(e.mission.missionReward.content,"name"),ks(e.mission.missionReward.content,"comment"))})},Is=e=>{e.forEach(e=>{let t=e.fesRaidAccumulatedReward;bs(t,"title"),bs(t,"comment");let r=t.fesRaidAccumulatedRewardContent;(null==r?void 0:r.content)&&(ks(r.content,"name"),ks(r.content,"comment"))})},xs=(e,t=!0)=>{null==e||e.forEach(e=>{let r=e.mission||e;if(bs(r,"title"),bs(r,"comment"),bs(r,"afterAchievedComment"),bs(r,"beforeAchievedComment"),t){let e=r.lectureMissionReward;(null==e?void 0:e.content)&&(ks(e.content,"name"),ks(e.content,"comment"))}})},As=e=>{var t,r;bs(null===(t=e.userRecommendedMission)||void 0===t?void 0:t.mission,"comment"),bs(null===(r=e.userRecommendedMission)||void 0===r?void 0:r.mission,"title"),e.accumulatedPresent.userGameEventAccumulatedPresents.forEach(e=>{bs(e.gameEventAccumulatedPresent,"comment"),bs(e.gameEventAccumulatedPresent,"title")})},Cs=e=>{var t;null===(t=e.teachingHints)||void 0===t||t.forEach(e=>{var t,r;null===(t=e.userProduceHints)||void 0===t||t.forEach(e=>{bs(e.produceTeachingHint,"title")}),null===(r=e.userProduceTeachingHints)||void 0===r||r.forEach(e=>{bs(e.produceTeachingHint,"title")})})},Ts=e=>{xs(e.lectureMissions)},Rs=e=>{var t;null===(t=e.userIdolRoad)||void 0===t||t.idolRoad.idolRoadRewards.forEach(e=>{ks(e.content,"name"),ks(e.content,"comment")})},js=e=>{null==e||e.forEach(e=>{var t,r;bs(null===(t=e.userMission)||void 0===t?void 0:t.mission,"title"),bs(null===(r=e.userMission)||void 0===r?void 0:r.mission,"comment")})};Es.get([["userMissions",e=>{var t;_s(e.dailyUserMissions),_s(e.weeklyUserMissions),_s(e.fesMatchRankingUserMissions),null===(t=e.eventUserMissions)||void 0===t||t.forEach(e=>{_s(null==e?void 0:e.userMissions)}),_s(e.normalUserMissions),_s(e.specialUserMissions)}],["userJewelGettableMissions",e=>{var t,r,n,o,s,i;js(null===(t=e.dailyWeeklyUserMissions)||void 0===t?void 0:t.userMissionsWithCategory),js(null===(r=e.fesUserMissions)||void 0===r?void 0:r.userMissionsWithCategory),js(null===(n=e.idolUserMissions)||void 0===n?void 0:n.userMissionsWithCategory),js(null===(o=e.otherUserMissions)||void 0===o?void 0:o.userMissionsWithCategory),js(null===(s=e.produceUserMissions)||void 0===s?void 0:s.userMissionsWithCategory),js(null===(i=e.trueEndUserMissions)||void 0===i?void 0:i.userMissionsWithCategory)}],["fesRaidEvents/{num}/rewards",e=>{Is(e.fesRaidBestScoreRewards),Is(e.fesRaidLapRewards),Is(e.fesRaidPointRewards)}],[["userProduces","userProduceTeachings"],[Cs]],["userBeginnerMissions/top",Ts],["idolRoads/top",e=>{var t;xs(e.userMissions,!1),null===(t=e.userIdols)||void 0===t||t.forEach(Rs)}],["missionEvents/{num}/top",[As]],["producerDesk/rewards",e=>{e.producerLevelRewards.forEach(e=>{bs(e,"title"),ks(e.content,"name")})}]]),Es.post([["myPage",[e=>{_s(e.reportUserMissions)},e=>{let t=e.beginnerMission;t&&(t.clearedLectureMission&&xs([t.clearedLectureMission]),t.progressLectureMission&&xs([t.progressLectureMission]))},e=>{var t;(async e=>{if(!e)return;const t=[];for(let r=0;r<e.length;r++){let n=e[r];bs(e,r),n===e[r]&&t.push(n)}if(t.length&&0==Ss)try{const e=t.join("\nPmessage");/[ㄱ-ㅎ|ㅏ-ㅣ|가-힣]/.test(e)||await ps("Pmessage"+e),Ss=!0}catch(e){J(e)}})(null===(t=e.producerDesk)||void 0===t?void 0:t.messages)}]],["(produceMarathons|fesMarathons|trainingEvents)/{num}/top",[As]],[["produceTeachings/resume","produceTeachings/next"],Cs],["userLectureMissions/{num}/actions/receive",Ts],["fesMatchConcert/actions/finish",[e=>{e&&e.fesMatchRankingMission&&bs(e.fesMatchRankingMission.userMission.mission,"title")}]],["producerDesk/top",e=>{e.progresses.forEach(e=>{bs(e,"comment"),bs(e,"title")})}]]),Es.put([["userIdolRoads",e=>{Rs(e.userIdol)}]]);const Ms=new Map;let Ps=!1;const Os=new Map;let Fs=!1;const Ds=async()=>{if(!Fs){let e=await Qr("costumename");e||(e=await Wr("/data/costumename.csv"),Vr("costumename",e));Gr(e).forEach(e=>{const t=$(e.name),r=$(e.trans);t&&r&&t!==r&&Os.set(t,r)}),Fs=!0}return Os};let zs;const Ns=async()=>(zs||(zs=(async()=>{if(!Ps){let e=await Qr("cardname");e||(e=await Wr("/data/cardname.csv"),Vr("cardname",e));Gr(e).forEach(e=>{const t=L(e.name),r=L(e.trans);t&&r&&t!==r&&Ms.set(t,r)}),Ps=!0}return Ms})()),await zs);let Bs=[];const Ls=e=>{if(!e)return;let t=q(e);Bs.includes(t)||Bs.push(t)};(window.unsafeWindow||window).printUnknowCardCostumenames=()=>J(Bs.join("\n"));const $s=(t,r)=>{if(!t||!r||!t.name)return;let n=H(t.name);r.has(t.name)&&(t.name=e(r.get(t.name))),C.dev&&n===t.name&&Ls(n)},Us=(t,r)=>{if(!t||!r||!t.comment)return;let n=H(t.comment);r.has(t.comment)&&(t.comment=e(r.get(t.comment))),C.dev&&n===t.comment&&Ls(n)},Hs=async e=>{const t=await Ns();e.idol&&$s(e.idol,t),e.supportIdol&&$s(e.supportIdol,t),e.userSupportIdol&&$s(e.userSupportIdol.supportIdol,t),e.userProduceSupportIdols&&e.userProduceSupportIdols.forEach((function(e){$s(e.userSupportIdol.supportIdol,t)})),e.userIdol&&$s(e.userIdol.idol,t),e.userProduceIdol&&$s(e.userProduceIdol.userIdol.idol,t),e.userProduce&&e.userProduce.userProduceIdol&&$s(e.userProduce.userProduceIdol.userIdol.idol,t),e.userFesIdol&&$s(e.userFesIdol.idol,t)},Js=async e=>{const t=await Ns(),r=await Ds(),n=new Map([...t,...r]);e.idolCostumes&&e.idolCostumes.forEach((function(e){$s(e,n),Us(e,n)})),e.userFesDecks&&e.userFesDecks.forEach((function(e){e.userFesDeckMembers.forEach((function(e){e.idolCostumes.forEach((function(e){$s(e,n)}))}))}))},Ws=async e=>{const t=await Ns();e.userKnowHowBooks&&e.userKnowHowBooks.forEach((function(e){e.idol&&$s(e.idol,t)}))};zr.get([[["userIdols/{num}","userIdols/statusMax","produceTeachingIdols/{num}"],Hs],[["userSupportIdols/{num}","userSupportIdols/statusMax","produceTeachingSupportIdols/{num}"],Hs],["userProduce(Teaching)?SupportIdols/{num}",Hs],[["userProduce(Teaching)?Idols/{num}","userProduceTeachingIdol"],Hs],["userFesIdols/{num}",Hs],["userProduces",Hs],["userReserveIdols/userIdol/{num}",Hs],["userReserveSupportIdols/userSupportIdol/{num}",Hs],["userKnowHowBooks",Ws],["producerDesk/costumes",async t=>{const r=await Ns(),n=await Ds(),o=new Map([...r,...n]);t&&t.forEach((function(t){$s(t,o),Us(t,o),((t,r)=>{if(!t||!r||!t.releasedConditionComment)return;let n=H(t.releasedConditionComment);r.has(t.releasedConditionComment)&&(t.releasedConditionComment=e(r.get(t.releasedConditionComment))),C.dev&&n===t.releasedConditionComment&&Ls(n)})(t,o)}))}]]),zr.post([[["myPage","produces/actions/(resume|next)"],Hs]]),zr.post([["characterAlbums/characters/{num}",[Js]],["produces/actions/result",Ws]]),zr.patch([["userFesDecks",Js]]),zr.put([["userHomeDecks",Js]]);const qs=new Map,Gs=new Map,Ks=new Map;let Ys=!1;let Qs,Vs,Xs,Zs;const ei=async()=>{Xs||(Xs=(async()=>{if(!Ys){(await Zr("title")).forEach(e=>{if(null==e?void 0:e.text){const t=$(e.text),r=$(e.trans,!0),n=L(e.type)||"text";t&&r&&t!==r&&("exp"===n?Gs.set(t,r):"text"===n&&qs.set(t,r))}});for(let[e,t]of Gs){const r=tn(e);Ks.set(r,t)}Ys=!0}return{textMap:qs,expMap:Ks}})(),Zs=nn()),Qs&&Vs||(Qs=await Xs,Vs=await Zs,Qs.wordMaps=[Vs])};let ti=[];(window.unsafeWindow||window).printUnknowTitles=()=>J(ti.join("\n"));const ri=new Map,ni=(e,t)=>{e&&y(t)&&(ri.has(e)||ri.set(e,t))},oi=(e={},t)=>{let r=e[t];V(e,t,Qs),r===e[t]&&C.dev&&(e=>{if(!e)return;let t=q(e);ti.includes(t)||ti.push(t)})(r)},si=e=>{e.forEach(e=>{oi(e,"name"),e.communications.forEach(e=>{oi(e,"name"),oi(e,"title"),ni(e.id,`${e.name}-${e.title}`)})})};zr.get([[["userSupportIdols/{num}","userSupportIdols/statusMax","produceTeachingSupportIdols/{num}"],async e=>{await ei(),e.supportIdol.produceSupportIdolEvents.forEach(e=>{oi(e,"title"),ni(e.id,e.title)})}],[["userIdols/{num}","userIdols/statusMax","produceTeachingIdols/{num}"],async e=>{await ei(),e.idol.produceAfterEvents.forEach(e=>{oi(e,"title"),ni(e.id,e.title)}),e.idol.produceIdolEvents.forEach(e=>{oi(e,"title"),ni(e.id,e.title)})}],[["characterAlbums","album/top"],async e=>{await ei(),si(e.gameEvents),si(e.specialEvents)}],[["producerDesk/gameEvents/{num}"],[async e=>{await ei(),oi(e.gameEvent,"name")},async e=>{await ei(),oi(e.gameEventStory,"description")}]],[["userMissions"],[async e=>{var t;await ei(),null===(t=e.eventUserMissions)||void 0===t||t.forEach(e=>{oi(null==e?void 0:e.gameEvent,"name")})}]],[["characterPresentSpecialCommunicationEvents/{num}/top"],[async e=>{var t;await ei(),null===(t=e.characterPresentSpecialCommunications)||void 0===t||t.forEach(e=>{var t;oi(e,"title"),null===(t=e.specialCommunicationReleaseConditions)||void 0===t||t.forEach(e=>{oi(null==e?void 0:e.content,"name")})})}]]]),zr.post([["characterAlbums/characters/{num}",async e=>{await ei(),e.albumCommunicationTitles.forEach(e=>{oi(e,"title")}),e.communications.forEach(e=>{oi(e,"title"),ni(e.communicationId,e.title)}),e.voices.forEach(e=>{oi(e,"title"),oi(e,"releasedConditionComment")})}],["produceMarathons/{num}/top",async e=>{await ei(),e.releasedCommunications.forEach(e=>{oi(e,"name"),oi(e,"title"),ni(e.id,`${e.name}-${e.title}`)}),oi(e.gameEvent,"name")}]]);const ii=async t=>{const r=await sn();if(t.userProduceIdol){const n=t.userProduceIdol.userIdol.idol.character;r.has(n.name)&&(n.name=e(r.get(n.name))),r.has(n.firstName)&&(n.firstName=e(r.get(n.firstName)))}},ai=async e=>{var t;await ei(),null===(t=e.produceEvents)||void 0===t||t.forEach(e=>{oi(e,"title"),ni(e.id,e.title)})};zr.post([["myPage",async e=>{var t;await ei(),oi(null==e||null===(t=e.userProduce)||void 0===t?void 0:t.produce,"title")}],["produces/actions/(resume|next)",[ai,ii]],[["produces/actions/resume","produces/actions/finish","produceTeachings/resume"],ai],["produces/actions/act",ai],["produces/({num}/audition|concert)/actions/(start|finish)",ii]]);const ci=async(e,t="comment")=>{if(!e)return;await ws(e,"autoTransText",!0)},ui=async e=>{try{if(e.produceAudition){let t="produceAudition";await ws(e.produceAudition.judges,t,!0)}if(e.produceConcert){let t="produceAudition";await ws(e.produceConcert.judges,t,!0)}e.produceConcertFanSkillComments&&await ci(e.produceConcertFanSkillComments,"comment1")}catch(e){J(e)}},li=async e=>{if(e.judges){let t="fesMatchConcert";await ws(e.judges,t,!0)}},di=async e=>{if(e.topCharacterReaction)try{const t=[...e.topCharacterReaction.moveReactions,...e.topCharacterReaction.skillReleasedReactions,...e.topCharacterReaction.touchExReactions,...e.topCharacterReaction.touchReactions,...e.topCharacterReaction.waitReactions];await ci(t)}catch(e){J(e)}},fi=async e=>{let t=[...e.produceStaffComments||[],...e.produceStaffConcertComments||[],...e.produceStaffFailComments||[],...e.produceStaffSeasonComments||[]];await ci(t)},pi=async e=>{if(e.gameData)try{let t=JSON.parse(e.gameData);t.judges?await li(t):await ui(t),e.gameData=JSON.stringify(t)}catch(e){J(e)}},hi=async e=>{if(e.gameState&&e.gameState.game_data)try{let t=JSON.parse(e.gameState.game_data);t.judges&&await li(t),e.gameState.game_data=JSON.stringify(t)}catch(e){J(e)}},mi=async e=>{if(!e.characterComment)return;let t=[];t=t.concat(e.characterComment),await ci(t)},vi=async e=>{if(e)try{let t=[];e.fesTowerPanelRandom.mainText&&t.push(e.fesTowerPanelRandom),e.fesTowerPanelRandom.fesTowerPanelRandomChoices&&e.fesTowerPanelRandom.fesTowerPanelRandomChoices.forEach(e=>{e.name&&t.push(e)}),await ws(t,"FesTower",!1)}catch(e){J(e)}};zr.get([["userProduces",di],["fes(Match)?Concert/actions/resume",pi]]),zr.post([["myPage",async e=>{try{let t=[];e.userHomeDeck.userHomeDeckAnimationMember&&(t=[...e.userHomeDeck.userHomeDeckAnimationMember.mypageComments]);let r=e.userHomeDeck.userHomeAnimationDeck.userHomeAnimationDeckMembers;r&&r.forEach(e=>{e.mypageComments.forEach(e=>{t.push(e)}),e.mypageConversations.forEach(e=>{e.mypageConversationComments.forEach(e=>{t.push(e)})})}),e.userHomeDeck.userHomeDeckMembers.length&&e.userHomeDeck.userHomeDeckMembers.forEach(e=>{e.mypageComments.forEach(e=>{t.push(e)})}),await ci(t),await(async(e,t)=>{await ei(),e.forEach(e=>{oi(e,t)})})(t,"speakerName")}catch(e){J(e)}}],["fesTop",async e=>{if(e.userFesDeck)try{let t=[],r=e.userFesDeck.userFesDeckMembers;for(let e of r)e.fesTopCharacterReactions.forEach(e=>{t.push(e)});await ci(t)}catch(e){J(e)}}],["produces/actions/(resume|next)",[di,fi,pi,mi,ui,async e=>{try{var t;await ci(null===(t=e.produceReporterEvent)||void 0===t?void 0:t.produceReporterEventAnswers,"comment2")}catch(e){J(e)}}]],["produces/actions/endWeek",fi],["produces/actions/act",async e=>{if(!e.lessonResult)return;let t=e.lessonResult;try{let e=[];t.produceActCutinComment&&(e=e.concat(t.produceActCutinComment)),t.produceRestBoostIdolComment&&(e=e.concat(t.produceRestBoostIdolComment)),t.produceRestBoostSupportIdolComment&&(e=e.concat(t.produceRestBoostSupportIdolComment)),t.produceRestComments&&(e=e.concat(t.produceRestComments)),await ci(e)}catch(e){J(e)}}],["fes(Match|Raid)?Concert/actions/start",li],["fes(Match)?Concert/actions/resume",pi],["fesRaidConcert/actions/resume",hi],["fesTowerConcert/actions/start",li],["fesTowerConcert/actions/resume",hi],["produces/actions/result",async e=>{try{let t=e.characterTrustLevelUpComments;await ci(t)}catch(e){J(e)}}],["userFesTowerPanels/{num}/random",vi],["userFesTowerPanels/{num}/random/actions/choice",async e=>{if(e)try{let t=[];e.fesTowerPanelRandomEffect.resultText&&t.push(e.fesTowerPanelRandomEffect),await ws(t,"FesTower",!1)}catch(e){J(e)}}],["userFesTowerAreas/{num}",async e=>{var t;e&&(null===(t=e.userFesTowerStages)||void 0===t||t.forEach(e=>{e.userFesTowerPanelHistory&&e.userFesTowerPanelHistory.userFesTowerRandomPanelHistory&&vi(e.userFesTowerPanelHistory.userFesTowerRandomPanelHistory)}))}],["produces/({num}/audition|concert)/actions/(start|finish)",[ui,mi]],["userProduceHelperSupportIdols",async e=>{try{let t="helperSupportIdols";await ws([e],t,!0)}catch(e){J(e)}}],["fesTowerEvents/top",async e=>{if(e.userFesTowerEventTopIdols)try{let t=[];e.userFesTowerEventTopIdols.forEach(e=>{t.push(e.fesTowerEventTopCharacterReaction)}),await ci(t)}catch(e){J(e)}}],["produces/concert/actions/start",async e=>{var t,r,n,o;let s=[];s=s.concat(null==e||null===(t=e.userProduceIdol)||void 0===t||null===(r=t.userIdol)||void 0===r||null===(n=r.idol)||void 0===n||null===(o=n.character)||void 0===o?void 0:o.produceConcertFeverCharacterComment),await ci(s)}]]);const{api:gi,transItem:yi}=cn("etc/idol-filter");gi.get([["searchPopupContents",e=>{var t,r,n,o;null===(t=e.businesses)||void 0===t||t.forEach(e=>{yi(e,"name")}),null===(r=e.units)||void 0===r||r.forEach(e=>{yi(e,"name")}),null===(n=e.produces)||void 0===n||n.forEach(e=>{yi(e,"title")}),null===(o=e.characters)||void 0===o||o.forEach(e=>{yi(e,"name"),yi(e,"firstName"),yi(e.unit,"name")}),(e=>{["activeSkills","ideas","idolArrivalTypes","knowHowBooks","supportSkillAttributes","supportSkillEffects"].forEach(t=>{var r;null===(r=e[t])||void 0===r||r.forEach(e=>{yi(e,"label")})})})(e)}]]);const{api:wi,transItem:Ei}=cn("etc/help-title");wi.get([["help",e=>{e&&e.forEach(e=>{var t;Ei(e,"title"),null===(t=e.helpSubGroups)||void 0===t||t.forEach(e=>{Ei(e,"title")})})}]]);zr.get("gashas/{num}/redraws",async e=>{const t=[];e.forEach(e=>{e.comment&&t.push(e.comment)}),await ci(t)}),zr.post([["characterAlbums/characters/{num}",async e=>{const t=[];e.produceIdols.forEach(e=>{e.comment&&t.push(e.comment)}),await ci(t)}],["gashas/{num}/actions/draw",async e=>{var t;const r=[];null===(t=e.gashaDraws)||void 0===t||t.forEach(e=>{e.comment&&r.push(e.comment)}),await ci(r)}]]);zr.post("characterAlbums/characters/{num}",async e=>{if(e.voices){const t=[];e.voices.forEach(e=>{e.characterTrustLevelComment&&t.push(e.characterTrustLevelComment)}),await ci(t)}});const bi=new Map;let ki=!1;const Si=["nameKana","unit","age","bloodType","birthday","starSign","height","weight","figure","arm","place","hobby","specialty","cv"],_i=async()=>{if(!ki){(await Zr("profile-re")).forEach(t=>{if(null==t?void 0:t.id){const r=$(t.id);if(r)if("label"===r){const n=$(t.nameKana).split("|");bi.set(r,new Map(Si.map((t,r)=>[t,e(L(n[r]))])))}else{for(let r in t)t[r]=e($(t[r]));bi.set(r,t)}}}),ki=!0}return bi},Ii=async e=>{const t=(await _i()).get(e.id);for(let r in t)"id"!==r&&e[r]&&("unit"===r?e.unit.name=t[r]:e[r]=t[r])},xi=async e=>{e.beginnerMissionUnits&&e.beginnerMissionUnits.forEach(e=>{e.idols.forEach(e=>{Ii(e.idol.character)})}),e.units&&e.units.forEach(e=>{e.idols.forEach(e=>{Ii(e.character)})})};zr.post("characterAlbums/characters/{num}",async e=>{await Ii(e)}),zr.get("userIdols/{num}",async e=>{const t=e.idol.character;await Ii(t)}),zr.get("userSupportIdols/{num}",async e=>{const t=e.supportIdol.character;await Ii(t)}),zr.get("userFesIdols/{num}",async e=>{const t=e.userFesIdol.idol.character;await Ii(t)}),zr.get("userBeginnerMissions/top",xi),zr.get("tutorialIdols",xi);const Ai=new Map;let Ci=!1;let Ti=null;const Ri=new Map([["AOBA",e=>e&&e.loaders&&e.Text&&e.BLEND_MODES],["SCENARIO",e=>e&&e.default&&e.default.load&&e.default._errorEvent&&e.default._handleError],["PHRASE",e=>{var t,r;return null==e||null===(t=e.default)||void 0===t||null===(r=t._polyglot)||void 0===r?void 0:r.phrases}],["ENCRYPT",e=>{var t;return null==e||null===(t=e.default)||void 0===t?void 0:t.decryptResource}]]),ji=new Map([["AOBA",e=>e],["SCENARIO",e=>e.default],["PHRASE",e=>e.default._polyglot.phrases],["ENCRYPT",e=>e.default]]),Mi=Object.freeze;Object.freeze=new Proxy(Mi,{apply:(e,t,[r])=>r});const Pi=/^function\s\w\((\w)\){var\s(\w)=(\w)\[\1\];if\(void\s0!==\2\)return\s\2\.exports;var\s(\w)=\3\[\1\]={id:\1,loaded:!1,exports:{}};return\s\w\[\1\]\.call\(\4\.exports,\4,\4\.exports,\w\),\4\.loaded=!0,\4\.exports}$/,Oi=Function.prototype.call;let Fi={Reflect:window.Reflect};Function.prototype.call=new Proxy(Oi,{apply(e,t,r){var n;return(null==r||null===(n=r[3])||void 0===n?void 0:n.toString)&&Pi.test(r[3].toString())&&(Ti=r[3],Function.prototype.call=Oi),Fi.Reflect.apply(e,t,r)}});const Di=async e=>{const{moduleId:t}=await Jr;let[r,n]=((e,t)=>{let r,n,o=((e,t)=>{let r=e+t,n=[];for(let o=e-t;o<=r;o++)o>=0&&o!==e&&n.push(o);return n.unshift(e),n})(e,50);for(let e=0;e<o.length;e++){let s;try{s=Ti(o[e])}catch(e){}if(t(s)){r=s,n=o[e];break}}return[r,n]})(t[e],Ri.get(e));return r?ji.get(e)(r):null};let zi=null;const Ni=["concert.skill.betweenString","concert.skill.appealString"];async function Bi(){const t=await Di("PHRASE");if(t){zi=await(async(e=!1)=>{if(!Ci){(await Zr("phrase")).forEach(t=>{if(null==t?void 0:t.id){const r=$(t.id),n=$(t.trans,!0);r&&(e?Ai.set(r,t.trans):n&&Ai.set(r,n))}}),Ci=!0}return Ai})();for(let[r,n]of zi)t[r]=Ni.includes(r)?n:e(n)}}let Li=!1,$i=null;const Ui=en({name:"common"});let Hi=new Map,Ji=new Map;const Wi=[],qi=e=>{e&&e.fontFamily&&(e.fontFamily===j.HEITI_JA?Reflect.set(e,"fontFamily",j.HEITI_TRANS):e.fontFamily===j.YUAN_JA&&Reflect.set(e,"fontFamily",j.YUAN_TRANS))},Gi=(e,t,r)=>{let n=e,o=H(e);return t.has(o)?(n="​"+t.get(o),qi(r)):e.startsWith("​")||(e=>{e&&e.fontFamily&&(e.fontFamily===j.HEITI_TRANS?Reflect.set(e,"fontFamily",j.HEITI_JA):e.fontFamily===j.YUAN_TRANS&&Reflect.set(e,"fontFamily",j.YUAN_JA))})(r),n},Ki=(e,t,r=!1)=>{if(!y(e))return e;let n=e;return e.startsWith("​")?qi(t):e.trim()&&(r?(n=Gi(e,Ji,t),n===e&&(e=>{Wi.push(e),C.dev,setTimeout(()=>Wi.shift(),1e4)})(e)):(e=>{let t=!1;return Wi.forEach(r=>{r.startsWith(e)&&(t=!0)}),t})(e)||e.startsWith("‌")||(n=Gi(e,Hi,t))),n};async function Yi(){const e=await Di("AOBA");try{Hi=await(async()=>{if(!Li){$i=await Ui();const e=await sn();$i=new Map([...e,...$i]),Li=!0}return $i})(),Ji=await Ko()}catch(e){}const t=e.Text.prototype.typeText;e.Text.prototype.typeText=function(...e){const r=e[0];return e[0]=Ki(r,this.style,!0),t.apply(this,e)};const r=e.Text.prototype.updateText;e.Text.prototype.updateText=function(e){if(this.localStyleID!==this._style.styleID&&(this.dirty=!0,this._style.styleID),this.dirty||!e){C.dev,0;const t=Ki(this._text,this._style);return Reflect.set(this,"_text",t),r.call(this,e)}}}const Qi=new Map;let Vi=!1;const Xi=new Map;let Zi=!1;let ea=null;let ta=null;const ra=()=>ta||(ta=(async()=>{if(ea)return ea;try{const e=await fetch("https://newbiepr.gitlab.io/shinymaskr.gitlab.io/data/image/comics/4ko.json?t="+Math.floor(Date.now()/36e5)),t=await e.json();ea=new Map(t)}catch(e){ea=new Map}return ea})(),ta);zr.get([[["comics"],async t=>{await ra(),t.comics.forEach(t=>{const r=parseInt(t.id);if(ea.has(r)){const n=ea.get(r).title;n&&(t.title=e(n))}})}]]);let na=null;const oa=async()=>(na||(na=(async()=>{if(!Vi){(await Zr("image")).forEach(e=>{if(null==e?void 0:e.name){const t=L(e.name),r=L(e.url),n=L(e.version)||"1";t&&r&&Qi.set(t,{url:r,version:n})}}),Vi=!0}return Qi})()),await na);let sa=null;const ia=async()=>(sa||(sa=(async()=>{if(!Zi){(await Zr("file-replace")).forEach(e=>{if(null==e?void 0:e.name){const t=L(e.name),r=L(e.url),n=L(e.version)||"1";t&&r&&Xi.set(t,{url:r,version:n})}}),Zi=!0}return Xi})()),await sa);let aa="";(()=>{try{aa=sessionStorage.getItem("sczh:res-name")}catch(e){}})();(window.unsafeWindow||window).queryImageName=e=>{try{sessionStorage.setItem("sczh:res-name",e)}catch(e){}};let ca=!1;async function ua(){const e=await Di("AOBA"),t=await Di("ENCRYPT");if(ca)return;const r=e.loaders.Resource.prototype._loadElement,n=async function(e){C.dev&&"image"===e&&aa&&this.url.includes(aa)&&(W("%c조회한 이미지:","color:#66ccff"),W(this.url,this.name));try{const t=await oa();if("image"===e){if(t.has(this.name)){const e=t.get(this.name);if(this.url.endsWith("v="+e.version)){const t="image/"+e.url;this.url=`${C.origin}/data/${t}?v=${C.hashes[t]}`,this.crossOrigin=!0}else J("%cimage version not match","color:#fc4175"),J(this.name,this.url)}else"image"===e&&this.originUrl.includes("idols/name")&&(J("%cidol name display!!","color:#fc4175"),J(this.name,this.url));await async function(e){if(/^images\/content\/comics\/(web|limited|special)\/page\/[^_]+_\d+\.jpg/.test(e.name)){const t=parseInt(e.name.match(/page\/[^_]+_(\d+)\.jpg/)[1]);await ra(),ea.has(t)&&(e.url="https://newbiepr.gitlab.io/shinymaskr.gitlab.io/data/image/comics/4ko/"+ea.get(t).name,e.crossOrigin=!0)}}(this)}}catch(e){J("Error during image substitution: ",e)}return r.call(this,e)},o=e.loaders.Resource.prototype._loadXhr,s=async function(){if(t)try{const e=await ia();if(e.has(this.name)){const t=e.get(this.name);if(this.url.endsWith("v="+t.version)){const e="file/"+t.url;this.url=`${C.origin}/data/${e}?v=${C.hashes[e]}`}else J("%cfile version not match","color:#fc4175"),J(this.name,this.url)}}catch(e){J("Error during file substitution: ",e)}return o.call(this)},i=new TextDecoder,a=e.loaders.Resource.prototype._xhrOnLoad,c=async function(){if(t)try{this.TYPE={UNKNOWN:0,JSON:1,XML:2,IMAGE:3,AUDIO:4,VIDEO:5,TEXT:6};const e=await ia();if(e.has(this.name)){const t=e.get(this.name);if(this.reqUrl.endsWith("v="+t.version)){if("json"===this.xhrType||"text"===this.xhrType){let e=i.decode(this.xhr.response);this.xhr=new Proxy(this.xhr,{get(t,r,n){return"response"===r?e:t[r]instanceof Function?Reflect.get(...arguments).bind(t):t[r]}}),this.data="json"===this.xhrType?JSON.parse(e):e,this.type="json"===this.xhrType?this.TYPE.JSON:this.TYPE.TEXT}return this.url=this.originUrl,void this.complete()}}}catch(e){J("Exception in xhrOnLoad: ",e)}a.call(this)};if(t){const e=t.decryptResource,r=function(t){return"string"==typeof t?t:e(t)};t.decryptResource=r}const u=new Proxy(e.loaders.Resource,{construct(e,t,r){var o=Reflect.construct(e,t,r);return new Proxy(o,{get:(e,t,r)=>"_loadElement"==t?n:"_loadXhr"==t?s:"_boundXhrOnLoad"==t?c.bind(e):Reflect.get(e,t,r)})},get:(e,t,r)=>Reflect.get(e,t,r)});Object.defineProperty(e.loaders,"Resource",{value:u}),ca=!0}var la=function(){return s.Date.now()},da=/\s/;var fa=function(e){for(var t=e.length;t--&&da.test(e.charAt(t)););return t},pa=/^\s+/;var ha=function(e){return e?e.slice(0,fa(e)+1).replace(pa,""):e};var ma=function(e){return"symbol"==typeof e||g(e)&&"[object Symbol]"==m(e)},va=/^[-+]0x[0-9a-f]+$/i,ga=/^0b[01]+$/i,ya=/^0o[0-7]+$/i,wa=parseInt;var Ea=function(e){if("number"==typeof e)return e;if(ma(e))return NaN;if(fe(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=fe(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=ha(e);var r=ga.test(e);return r||ya.test(e)?wa(e.slice(2),r?2:8):va.test(e)?NaN:+e},ba=Math.max,ka=Math.min;var Sa=function(e,t,r){var n,o,s,i,a,c,u=0,l=!1,d=!1,f=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var r=n,s=o;return n=o=void 0,u=t,i=e.apply(s,r)}function h(e){return u=e,a=setTimeout(v,t),l?p(e):i}function m(e){var r=e-c;return void 0===c||r>=t||r<0||d&&e-u>=s}function v(){var e=la();if(m(e))return g(e);a=setTimeout(v,function(e){var r=t-(e-c);return d?ka(r,s-(e-u)):r}(e))}function g(e){return a=void 0,f&&n?p(e):(n=o=void 0,i)}function y(){var e=la(),r=m(e);if(n=arguments,o=this,c=e,r){if(void 0===a)return h(c);if(d)return clearTimeout(a),a=setTimeout(v,t),p(c)}return void 0===a&&(a=setTimeout(v,t)),i}return t=Ea(t)||0,fe(r)&&(l=!!r.leading,s=(d="maxWait"in r)?ba(Ea(r.maxWait)||0,t):s,f="trailing"in r?!!r.trailing:f),y.cancel=function(){void 0!==a&&clearTimeout(a),u=0,n=c=o=a=void 0},y.flush=function(){return void 0===a?i:g(la())},y};const _a=`\n  <style>\n  #sczh-story-tool {\n    position: absolute;\n    display: none;\n    background: #ffffff;\n    border-radius: 24px;\n    box-sizing: border-box;\n    font-family: sczh-yuanti;\n    align-items: center;\n    justify-content: center;\n    color: #ff6499;\n    text-shadow: 0 0 6px #fff;\n    cursor: pointer;\n    user-select: none;\n    width: 100px;\n    height: 100px;\n    font-size: 32px;\n    border: 7px solid transparent;\n    border-image: url(${C.origin}/data/image/border.png);\n    border-image-slice: 7;\n    transform-origin: top right;\n    transition: opacity 0.3s;\n  }\n  .story-tool-btns {\n    width: 100%;\n    height: 100%;\n    display: none;\n  }\n  .story-tool-btns .btn-download-sczh,\n  .story-tool-btns label {\n    flex: 1;\n    height: 100%;\n    background: #fff;\n    display: flex;\n    box-sizing: content-box;\n    align-items: center;\n    justify-content: center;\n    cursor: pointer;\n    color: #c0aade;\n    text-shadow: 0 0 6px #fff;\n  }\n  .story-tool-btns .btn-download-sczh:hover {\n    color: #9f66ec;\n  }\n  .story-tool-btns label {\n    color: rgb(242, 156, 199);\n    border-right: 1px solid #c9c9c9;\n  }\n  #sczh-story-tool .btn-close-sczh {\n    height: 25px;\n    width: 50px;\n    background: rgba(0, 0, 0, 0.58);\n    color: #fff;\n    letter-spacing: 2px;\n    position: absolute;\n    right: -25px;\n    top: -20px;\n    border-radius: 4px;\n    display: none;\n    align-items: center;\n    justify-content: center;\n    z-index: 1;\n    font-family: sczh-heiti;\n    font-size: 15px;\n  }\n  #sczh-story-tool:hover {\n    width: 200px;\n  }\n  #sczh-story-tool:hover .story-tool-btns {\n    display: flex;\n  }\n  #sczh-story-tool:hover .btn-close-sczh {\n    display: flex;\n  }\n  #sczh-story-tool:hover > .text-sczh {\n    display: none;\n  }\n  #sczh-story-tool .btn-close-sczh:hover {\n    background: rgba(0, 0, 0, 0.9);\n  }\n  #sczh-story-tool.blur {\n    opacity: 0.2;\n  }\n  .story-tool-btns label:hover {\n    color: #f270b1;\n  }\n  .story-tool-btns .btn-download-sczh:hover,\n  .story-tool-btns label:hover {\n    background-color: #f7f7f7;\n  }\n  </style>\n  <div id="sczh-story-tool"><span class="text-sczh">커뮤</span>\n    <span id="btn-close-sczh" class="btn-close-sczh">닫기</span>\n    <input type="file" style="display:none" id="ipt-preview-sczh" multiple accept=".csv">\n    <div class="story-tool-btns">\n      <label for="ipt-preview-sczh">실험</label>\n      <div id="btn-download-sczh" class="btn-download-sczh">다운</div>\n    </div>\n  </div>\n  `;let Ia=!1;const xa=e=>{if(Ia)return;Ia=!0,document.body.insertAdjacentHTML("beforeend",_a);const t=document.getElementById("sczh-story-tool"),r=Sa(()=>{const r=[.017,.22],n=window.innerHeight,o=window.innerWidth;let s=n,i=o,a=0,c=0;n/o>9/16?(s=9*o/16,a=(n-s)/2):(i=16*n/9,c=(o-i)/2),t.style.right=Math.floor(c+r[0]*i)+"px",t.style.top=Math.floor(a+r[1]*s)+"px",t.style.transform=`scale(${(s/900).toFixed(3)})`,e.name?t.style.display="flex":t.style.display="none"},300);r(),window.addEventListener("resize",r);document.getElementById("btn-download-sczh").addEventListener("click",(function(){if(e.name){((e,t)=>{const r=document.createElement("a");r.download=t,r.style.display="none";const n=new Blob([e],{type:"text/csv"});r.href=URL.createObjectURL(n),document.body.appendChild(r),r.click(),document.body.removeChild(r)})(qr.unparse(e.list),e.filename)}}));document.getElementById("btn-close-sczh").addEventListener("click",(function(){t.style.display="none",C.story="normal",F()}));let n;document.getElementById("ipt-preview-sczh").addEventListener("change",(function(){const t=[...this.files];t.length&&t.forEach(t=>{const r=new FileReader;r.onload=t=>{const r=t.target.result,n=Ho(r);if(n.has("name")){const t=n.get("name");e.preview.set(t,n),(e=>{const t=[...e].slice(-5).map(e=>(e[1]=[...e[1]],e));sessionStorage.setItem("sczh:preview",JSON.stringify(t))})(e.preview),alert(`도입${t}성공`)}},r.readAsText(t)})})),t.addEventListener("mouseenter",()=>{clearTimeout(n),t.classList.remove("blur")});const o=()=>{clearTimeout(n),n=setTimeout(()=>{t.classList.add("blur")},5e3)};t.addEventListener("mouseleave",o),o()},Aa=new Map;let Ca=!1;let Ta=null,Ra=new Map;const ja=async()=>(Ta||(Ta=(async()=>{if(an)return an;const e=await rn(),t=await sn();return an=new Map([...e,...t]),an})(),Ra=(await(async()=>{if(!Ca){(await Zr("speaker-icon")).forEach(e=>{let{name:t,id:r,type:n}=e;t=L(t),r=L(r),n=L(n),t&&r&&Aa.set(r,t)}),Ca=!0}return{iconMap:Aa}})()).iconMap),await Ta);let Ma=!1,Pa=!1;const Oa=(e,t)=>{var r,n,o,s,i,a,c,u,l,d,f,p;return(!Ma||!Pa)&&("idol"===t&&(null===(r=e[0])||void 0===r||null===(n=r["002"])||void 0===n?void 0:n.includes)&&(null===(o=e[0])||void 0===o||null===(s=o["002"])||void 0===s?void 0:s.includes("灯織"))?(Ma=!0,null===(l=e[0])||void 0===l||null===(d=l["002"])||void 0===d?void 0:d.includes("灯織")):(null===(i=e[0])||void 0===i||null===(a=i[901])||void 0===a?void 0:a.includes)&&(null===(c=e[0])||void 0===c||null===(u=c[901])||void 0===u?void 0:u.includes("はづき"))?(Pa=!0,null===(f=e[0])||void 0===f||null===(p=f[901])||void 0===p?void 0:p.includes("はづき")):void 0)},Fa=Object.keys;Object.keys=new Proxy(Fa,{apply(t,r,n){if(Oa(n,"idol")||Oa(n,"staff"))for(let[t,r]of Ra){let o=e(r);Array.isArray(n[0][t])&&!n[0][t].includes(o)&&n[0][t].push(o)}return Reflect.apply(t,r,n)}});const Da=(e,t)=>{let r=e,n="";return/[0-90-9]$/.test(e)&&(n=e.match(/([0-90-9])$/)[1],r=e.slice(0,e.length-1)),t.has(r)?t.get(r)+n:e},za=async t=>{if(t.speaker){const r=await ja();let n=L(t.speaker);if(r.has(n))return t.speaker=e(r.get(n));["&","&"].forEach(e=>{n=((e,t,r)=>{const n=e.split(t);for(let e=0;e<n.length;e++)n[e]=Da(n[e],r);return n.join(t)})(n,e,r)}),n!==t.speaker&&(t.speaker=e(n))}},Na={name:"",filename:"",list:"",preview:new Map};let Ba=!1;const La=async()=>{const t=await Di("SCENARIO"),r=t.load;t.load=async function(...t){const n=await r.apply(this,t),o=t[0];if(!o)return n;if(C.dev&&o.includes("/assets/json/")&&jr("STORY","#ad37c2",t,n),o.includes("/produce_events/")||o.includes("/produce_communications/")||o.includes("/produce_communications_promises/")||o.includes("/produce_communication_promise_results/")||o.includes("/support_skills/")||o.includes("/game_event_communications/")||o.includes("/special_communications/")||o.includes("/mypage_communications/")||o.includes("/produce_communication_cheers/")||o.includes("/produce_communication_auditions/")||o.includes("/business_unit_communication/")||o.includes("/produce_communication_televisions/"))try{if(!Array.isArray(n))return n;const t=o.replace(/^\/assets\/json\//,"");let r;if("edit"===C.story&&(((e,t)=>{const r=t.replace(".json",""),n=(e=>{var t;const r=e.match(/\/(\d+)$/);return null!==(t=null==r?void 0:r[1])&&void 0!==t?t:""})(r);let o=ri.get(n)||r.replace(/\//g,"_");o=o.replace("​","");const s=[];e.forEach(e=>{let t=L(q(e.text));(null==t?void 0:t.trim())?s.push({id:e.id||"0000000000000",name:e.speaker||"",text:t,trans:""}):e.select&&s.push({id:"select",name:"",text:L(q(e.select)),trans:""})}),s.push({id:"info",name:t,text:"",trans:""}),s.push({id:"번역자",name:"",text:"",trans:""}),Na.name=t,Na.filename=o+".csv",Na.list=s})(n,t),xa(Na)),(()=>{if(Ba)return;Ba=!0;const e=sessionStorage.getItem("sczh:preview");if(e)try{const t=JSON.parse(e),r=new Map(t);for(let[e,t]of r)r.set(e,new Map(t));Na.preview=r}catch(e){J(e)}})(),r=Na.preview.has(t)?Na.preview.get(t):await(async e=>{if(!Uo){let e=await Qr("story.json");if(e)Uo=new Map(JSON.parse(e));else{const e=await Wr("/story.json");Uo=new Map(e),Vr("story.json",JSON.stringify(Uo))}}if(Uo.has(e)){if(Bo.has(e))return Bo.get(e);{const t=Uo.get(e),r=await Wr(`/data/story/${t}.csv`),n=Ho(r);return Bo.set(e,n),n}}return!1})(t),r){((t,r,n)=>{const o=K();t.forEach(t=>{if(t.text){const s=o(t.id),i=H(t.text);s&&r.has(""+s)?t.text=r.get(""+s):r.has(i)?t.text=r.get(i):n.has(i)&&(t.text=e(n.get(i)))}if(t.select){const o=H(t.select),s=o+"-select";r.has(s)?t.select=r.get(s):n.has(o)&&(t.select=e(n.get(t.select)))}})})(n,r,await Jo())}else await ws(n,t,!1);for(let e of n)await za(e)}catch(e){J(e)}return n}},$a=e=>{const t=document.createElement("link");t.setAttribute("rel","preload"),t.setAttribute("href",e),t.setAttribute("as","font"),t.setAttribute("type","font/woff2"),t.setAttribute("crossorigin","anonymous"),document.head.appendChild(t)},Ua=(e,t)=>`/data/font/${e}.woff2?v=${t[`font/${e}.woff2`]}`,Ha=async()=>{const e=document.createElement("style"),{hashes:t}=await Jr;e.innerHTML=`\n  @font-face {\n    font-family: "sczh-heiti";\n    src: url("${C.origin}${Ua("heiti",t)}");\n  }\n  @font-face {\n    font-family: "sczh-yuanti";\n    src: url("${C.origin}${Ua("heiti",t)}");\n  }\n  ::-webkit-scrollbar {\n    display: none;\n  }\n  `,"yuanti"===C.font1&&$a(`${C.origin}${Ua("heiti",t)}`),"heiti"===C.font2&&$a(`${C.origin}${Ua("heiti",t)}`),document.head.appendChild(e)};window.addEventListener("blur",(function(e){"on"===C.bgm&&e.stopImmediatePropagation()}),!1),document.addEventListener("visibilitychange",(function(e){"on"===C.bgm&&e.stopImmediatePropagation()}));let Ja=0;const Wa=async()=>{var e;Ti||Ja>=300?(async()=>{try{await Promise.all([ua(),Ha(),Bi(),Yi(),La()])}catch(e){J(e)}})():(await(e=100,new Promise(t=>{setTimeout(t,e)})),Ja++,Ja%10==0&&J(`Waiting: ${Ja/10}s`),await Wa())};"loading"!=document.readyState?Wa():window.unsafeWindow?window.unsafeWindow.addEventListener("DOMContentLoaded",Wa):window.addEventListener("DOMContentLoaded",Wa)}();