Greasy Fork is available in English.

샤니마스 한글 패치 임시

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

// ==UserScript==
// @name         샤니마스 한글 패치 임시
// @namespace    https://github.com/newbiepr/shinycolors-trans-kr
// @version      1.11.44
// @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,l=a.toString,u=i?i.toStringTag:void 0;var d=function(e){var t=c.call(e,u),r=e[u];try{e[u]=void 0;var n=!0}catch(e){}var o=l.call(e);return n&&(t?e[u]=r:delete e[u]),o},p=Object.prototype.toString;var h=function(e){return p.call(e)},f=i?i.toStringTag:void 0;var m=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":f&&f in Object(e)?d(e):h(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,I=k.toString,_=S.hasOwnProperty,x=I.call(Object);var T=function(e){if(!g(e)||"[object Object]"!=m(e))return!1;var t=b(e);if(null===t)return!0;var r=_.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&I.call(r)==x};const C={origin:"https://newbiepr.gitlab.io/shinymaskr.gitlab.io",hash:"",localHash:"",version:"1.11.44",story:"normal",timeout:30,font1:"yuanti",font2:"heiti",auto:"off",bgm:"off",dev:!1},A=Object.assign({},C),M=["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"},P=["origin","font1","font2","timeout","story","auto","bgm","dev"],R=P,F=()=>{j.HEITI_TRANS=`${M.includes(C.font2)?"sczh-":""}${C.font2},${j.HEITI_JA}`,j.YUAN_TRANS=`${M.includes(C.font1)?"sczh-":""}${C.font1},${j.YUAN_JA}`},O=()=>{const e={};R.forEach(t=>{C[t]!==A[t]&&(e[t]=C[t])}),F(),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&&R.includes(r)&&(C[r]=n||A[r],O())})},N={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")}}},B=e=>{const t=C[e],r=N[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)(),O(),L()})},L=()=>{if(!window.GM_registerMenuCommand||!window.GM_unregisterMenuCommand)return;["origin","update","bgm","story","dev","wiki"].forEach(e=>{B(e)})};(()=>{const e=localStorage.getItem("sczh:setting");let t=JSON.parse(e);T(t)||(t={});const{origin:r}=t;/^https?:\/\//.test(r)&&(C.origin=r.trim()),R.forEach(e=>{let r=t[e];y(r)&&(r=r.trim()),(w(r)||r)&&(C[e]=r)}),F()})(),D(),L(),window.addEventListener("hashchange",D);const z=e=>{if(!e)return"";return e.replace(/[\u0020]+$/g,"").replace(/^[\u0020]+/g,"")},$=(e,t=!1)=>{let r=z(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=>z(e).replace(/\r/g,"\n").replace(/\n{2,}/g,"\n"),W=(...e)=>{C.dev&&console.info(...e)},J=(...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},Y=()=>{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}},K=new Map,X=(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=((t,r,n=[])=>{if(K.has(t))return K.get(t);let o=t;for(let[t,s]of r)o=o.replace(t,(...t)=>{let r=t[t.length-2],o=t[t.length-1],i=s;"/"!=o[r-1]&&"\n"!=o[r-1]||(i=e(i));for(let e=1;e<t.length-2;e++){let r=t[e],o=!1;n.forEach(t=>{t.has(r)&&(i=i.replace("$"+e,t.get(r)),o=!0)}),o||(i=i.replace("$"+e,t[e]))}return i}),t.lastIndex=0;return t!==o&&K.set(t,o),o})(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]=X(n,r)};var Q=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=Q,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 le=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r};var ue=function(e){return this.__data__.get(e)};var de=function(e){return this.__data__.has(e)};var pe=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};var he,fe=function(e){if(!pe(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=(he=/[^.]+$/.exec(me&&me.keys&&me.keys.IE_PROTO||""))?"Symbol(src)_1."+he:"";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,Ie=ke.hasOwnProperty,_e=RegExp("^"+Se.call(Ie).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var xe=function(e){return!(!pe(e)||ge(e))&&(fe(e)?_e:Ee).test(we(e))};var Te=function(e,t){return null==e?void 0:e[t]};var Ce=function(e,t){var r=Te(e,t);return xe(r)?r:void 0},Ae=Ce(s,"Map"),Me=Ce(Object,"create");var je=function(){this.__data__=Me?Me(null):{},this.size=0};var Pe=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Re=Object.prototype.hasOwnProperty;var Fe=function(e){var t=this.__data__;if(Me){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return Re.call(t,e)?t[e]:void 0},Oe=Object.prototype.hasOwnProperty;var De=function(e){var t=this.__data__;return Me?void 0!==t[e]:Oe.call(t,e)};var Ne=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Me&&void 0===t?"__lodash_hash_undefined__":t,this};function Be(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])}}Be.prototype.clear=je,Be.prototype.delete=Pe,Be.prototype.get=Fe,Be.prototype.has=De,Be.prototype.set=Ne;var Le=Be;var ze=function(){this.size=0,this.__data__={hash:new Le,map:new(Ae||ae),string:new Le}};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 We=function(e){return Ue(this,e).get(e)};var Je=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=ze,Ge.prototype.delete=He,Ge.prototype.get=We,Ge.prototype.has=Je,Ge.prototype.set=qe;var Ye=Ge;var Ke=function(e,t){var r=this.__data__;if(r instanceof ae){var n=r.__data__;if(!Ae||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Ye(n)}return r.set(e,t),this.size=r.size,this};function Xe(e){var t=this.__data__=new ae(e);this.size=t.size}Xe.prototype.clear=ce,Xe.prototype.delete=le,Xe.prototype.get=ue,Xe.prototype.has=de,Xe.prototype.set=Ke;var Ve=Xe;var Qe=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,lt=st(function(){return arguments}())?st:function(e){return g(e)&&at.call(e,"callee")&&!ct.call(e,"callee")};var ut=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)||ut;e.exports=i})),pt=/^(?:0|[1-9]\d*)$/;var ht=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&pt.test(e))&&e>-1&&e%1==0&&e<t};var ft=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)&&ft(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&&lt(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 l in e)!t&&!bt.call(e,l)||i&&("length"==l||o&&("offset"==l||"parent"==l)||s&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||ht(l,c))||a.push(l);return a},St=Object.prototype;var It=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||St)},_t=E(Object.keys,Object),xt=Object.prototype.hasOwnProperty;var Tt=function(e){if(!It(e))return _t(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&&ft(e.length)&&!fe(e)};var At=function(e){return Ct(e)?kt(e):Tt(e)};var Mt=function(e,t){return e&&nt(t,At(t),e)};var jt=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t},Pt=Object.prototype.hasOwnProperty;var Rt=function(e){if(!pe(e))return jt(e);var t=It(e),r=[];for(var n in e)("constructor"!=n||!t&&Pt.call(e,n))&&r.push(n);return r};var Ft=function(e){return Ct(e)?kt(e,!0):Rt(e)};var Ot=function(e,t){return e&&nt(t,Ft(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 Nt=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t};var Bt=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 Lt=function(){return[]},zt=Object.prototype.propertyIsEnumerable,$t=Object.getOwnPropertySymbols,Ut=$t?function(e){return null==e?[]:(e=Object(e),Bt($t(e),(function(t){return zt.call(e,t)})))}:Lt;var Ht=function(e,t){return nt(e,Ut(e),t)};var Wt=function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e},Jt=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Wt(t,Ut(e)),e=b(e);return t}:Lt;var qt=function(e,t){return nt(e,Jt(e),t)};var Gt=function(e,t,r){var n=t(e);return v(e)?n:Wt(n,r(e))};var Yt=function(e){return Gt(e,At,Ut)};var Kt=function(e){return Gt(e,Ft,Jt)},Xt=Ce(s,"DataView"),Vt=Ce(s,"Promise"),Qt=Ce(s,"Set"),Zt=Ce(s,"WeakMap"),er=we(Xt),tr=we(Ae),rr=we(Vt),nr=we(Qt),or=we(Zt),sr=m;(Xt&&"[object DataView]"!=sr(new Xt(new ArrayBuffer(1)))||Ae&&"[object Map]"!=sr(new Ae)||Vt&&"[object Promise]"!=sr(Vt.resolve())||Qt&&"[object Set]"!=sr(new Qt)||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},lr=s.Uint8Array;var ur=function(e){var t=new e.constructor(e.byteLength);return new lr(t).set(new lr(e)),t};var dr=function(e,t){var r=t?ur(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)},pr=/\w*$/;var hr=function(e){var t=new e.constructor(e.source,pr.exec(e));return t.lastIndex=e.lastIndex,t},fr=i?i.prototype:void 0,mr=fr?fr.valueOf:void 0;var vr=function(e){return mr?Object(mr.call(e)):{}};var gr=function(e,t){var r=t?ur(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 ur(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 hr(e);case"[object Set]":return new n;case"[object Symbol]":return vr(e)}},wr=Object.create,Er=function(){function e(){}return function(t){if(!pe(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||It(e)?{}:Er(b(e))};var kr=function(e){return g(e)&&"[object Map]"==ir(e)},Sr=yt&&yt.isMap,Ir=Sr?gt(Sr):kr;var _r=function(e){return g(e)&&"[object Set]"==ir(e)},xr=yt&&yt.isSet,Tr=xr?gt(xr):_r,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 Ar=function e(t,r,n,o,s,i){var a,c=1&r,l=2&r,u=4&r;if(n&&(a=s?n(t,o,s,i):n(t)),void 0!==a)return a;if(!pe(t))return t;var d=v(t);if(d){if(a=cr(t),!c)return Nt(t,a)}else{var p=ir(t),h="[object Function]"==p||"[object GeneratorFunction]"==p;if(dt(t))return Dt(t,c);if("[object Object]"==p||"[object Arguments]"==p||h&&!s){if(a=l||h?{}:br(t),!c)return l?qt(t,Ot(a,t)):Ht(t,Mt(a,t))}else{if(!Cr[p])return s?t:{};a=yr(t,p,c)}}i||(i=new Ve);var f=i.get(t);if(f)return f;i.set(t,a),Tr(t)?t.forEach((function(o){a.add(e(o,r,n,o,t,i))})):Ir(t)&&t.forEach((function(o,s){a.set(s,e(o,r,n,s,t,i))}));var m=d?void 0:(u?l?Kt:Yt:l?Ft:At)(t);return Qe(m||t,(function(o,s){m&&(o=t[s=o]),rt(a,s,e(o,r,n,s,t,i))})),a};var Mr=function(e){return Ar(e,5)};const jr=(e,t,r,n)=>{if(C.dev){let o=n;n&&(o=Mr(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(null!=r)if("string"!=typeof r&&"function"==typeof r[Symbol.iterator])for(let n in r)e.push(`${t}=${r[n]}`);else e.push(`${t}=${r}`)}r[0]+="?"+e.join("&")}W(`%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])}},Pr=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}$`)},Rr={get:new Map,post:new Map,patch:new Map,put:new Map,delete:new Map},Fr=(e,t,r)=>{if(!r.has(e)){const t=e.includes("{")||e.includes("("),n={handles:[],key:t?Pr(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)},Or=(e,t,r)=>{if(Array.isArray(e))for(let n of e)Fr(n,t,r);else Fr(e,t,r)},Dr=e=>(t,r)=>{const n=Rr[e];if(r)Or(t,r,n);else{const e=t;for(let[t,r]of e)Or(t,r,n)}},Nr={get:Dr("get"),post:Dr("post"),patch:Dr("patch"),put:Dr("put"),delete:Dr("delete")},Br={GET:"#009688",PATCH:"#8BC34A",POST:"#3F51B5",PUT:"#9C27B0",DELETE:"#4C27B0"},Lr=(e,t,r,n)=>async(...o)=>{var s,i;return jr(e,Br[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){W(e)}})(null===(i=o[0])||void 0===i?void 0:i.body,t,Rr[e.toLowerCase()]),n(...o)},zr=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=Lr(r.toUpperCase(),t,n,o)}return zr.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}`)},Wr=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)}),Jr=async(e,t)=>{if(!t){const{hashes:r}=await Wr;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 h=null;return"string"==typeof r?h=n.download?new l(n):new d(n):!0===r.readable&&b(r.read)&&b(r.on)?h=new p(n):(t.File&&r instanceof File||r instanceof Object)&&(h=new u(n)),h.stream(r)},unparse:function(e,t){var r=!1,n=!0,o=",",s="\r\n",a='"',c=a+a,l=!1,u=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||(l=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");u=t.columns}void 0!==t.escapeChar&&(c=t.escapeChar+a)}}();var d=new RegExp(f(a),"g");if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return h(null,e,l);if("object"==typeof e[0])return h(u||p(e[0]),e,l)}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:p(e.data[0])),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),h(e.fields||[],e.data||[],l);throw new Error("Unable to serialize unrecognized input");function p(e){if("object"!=typeof e)return[];var t=[];for(var r in e)t.push(r);return t}function h(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 l=0;l<e.length;l++)0<l&&(i+=o),i+=m(e[l],l);0<t.length&&(i+=s)}for(var u=0;u<t.length;u++){var d=a?e.length:t[u].length,p=!1,h=a?0===Object.keys(t[u]).length:0===t[u].length;if(r&&!a&&(p="greedy"===r?""===t[u].join("").trim():1===t[u].length&&0===t[u][0].length),"greedy"===r&&a){for(var f=[],v=0;v<d;v++){var g=c?e[v]:v;f.push(t[u][g])}p=""===f.join("").trim()}if(!p){for(var y=0;y<d;y++){0<y&&!h&&(i+=o);var w=a&&c?e[y]:y;i+=m(t[u][w],y)}u<t.length-1&&(!r||0<d&&!h)&&(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=h,i.NetworkStreamer=l,i.FileStreamer=u,i.StringStreamer=d,i.ReadableStreamStreamer=p,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 l=e.before(c.file,c.inputElem);if("object"==typeof l){if("abort"===l.action)return t=c.file,r=c.inputElem,o=l.reason,void(b(e.error)&&e.error({name:"AbortError"},t,r,o));if("skip"===l.action)return void s();"object"==typeof l.config&&(c.instanceConfig=a.extend(c.instanceConfig,l.config))}else if("skip"===l)return void s()}var u=c.instanceConfig.complete;c.instanceConfig.complete=function(e){b(u)&&u(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 h(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 l=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(n)t.postMessage({results:a,workerId:i.WORKER_ID,finished:l});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||!l||!b(this._config.complete)||a&&a.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),l||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 l(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 u(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 p(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 h(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))/,l=this,u=0,d=0,p=!1,h=!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;u+=t.data.length,e.preview&&u>e.preview?r.abort():(g.data=g.data[0],y(g,l))}}}function E(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function k(){if(g&&n&&(_("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=I(s,i),"__parsed_extra"===s?(o[s]=o[s]||[],o[s].push(i)):o[s]=i}return e.header&&(n>v.length?_("FieldMismatch","TooManyFields","Too many fields: expected "+v.length+" fields but parsed "+n,d+r):n<v.length&&_("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 I(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 _(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(f(t)+"([^]*?)"+f(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 l=function(t,r,n,o,s){var a,c,l,u;s=s||[",","\t","|",";",i.RECORD_SEP,i.UNIT_SEP];for(var d=0;d<s.length;d++){var p=s[d],h=0,f=0,v=0;l=void 0;for(var g=new m({comments:o,delimiter:p,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;f+=w,void 0!==l?0<w&&(h+=Math.abs(w-l),l=w):l=w}0<g.data.length&&(f/=g.data.length-v),(void 0===c||h<=c)&&(void 0===u||u<f)&&1.99<f&&(c=h,a=p,u=f)}return{successful:!!(e.delimiter=a),bestDelimiter:a}}(o,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess);l.successful?e.delimiter=l.bestDelimiter:(n=!0,e.delimiter=i.DefaultDelimiter),g.meta.delimiter=e.delimiter}var u=w(e);return e.preview&&e.header&&u.preview++,t=o,r=new m(u),g=r.parse(t,s,a),k(),p?{meta:{paused:!0}}:g||{meta:{paused:!1}}},this.paused=function(){return p},this.pause=function(){p=!0,r.abort(),t=b(e.chunk)?"":t.substring(r.getCharIndex())},this.resume=function(){l.streamer._halted?(p=!1,l.streamer.parseChunk(t,!0)):setTimeout(l.resume,3)},this.aborted=function(){return h},this.abort=function(){h=!0,r.abort(),g.meta.aborted=!0,b(e.complete)&&e.complete(g),t=""}}function f(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,l=t=void 0===e.quoteChar?'"':e.quoteChar;if(void 0!==e.escapeChar&&(l=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 u=0,d=!1;this.parse=function(e,i,p){if("string"!=typeof e)throw new Error("Input must be a string");var h=e.length,m=r.length,v=n.length,g=o.length,y=b(s),w=[],E=[],k=[],S=u=0;if(!e)return N();if(c||!1!==c&&-1===e.indexOf(t)){for(var I=e.split(n),_=0;_<I.length;_++){if(k=I[_],u+=k.length,_!==I.length-1)u+=n.length;else if(p)return N();if(!o||k.substring(0,g)!==o){if(y){if(w=[],R(k.split(r)),B(),d)return N()}else R(k.split(r));if(a&&a<=_)return w=w.slice(0,a),N(!0)}}return N()}for(var x=e.indexOf(r,u),T=e.indexOf(n,u),C=new RegExp(f(l)+f(t),"g"),A=e.indexOf(t,u);;)if(e[u]!==t)if(o&&0===k.length&&e.substring(u,u+g)===o){if(-1===T)return N();u=T+v,T=e.indexOf(n,u),x=e.indexOf(r,u)}else{if(-1!==x&&(x<T||-1===T)){if(!(x<A)){k.push(e.substring(u,x)),u=x+m,x=e.indexOf(r,u);continue}var M=L(x,A,T);if(M&&void 0!==M.nextDelim){x=M.nextDelim,A=M.quoteSearch,k.push(e.substring(u,x)),u=x+m,x=e.indexOf(r,u);continue}}if(-1===T)break;if(k.push(e.substring(u,T)),D(T+v),y&&(B(),d))return N();if(a&&w.length>=a)return N(!0)}else for(A=u,u++;;){if(-1===(A=e.indexOf(t,A+1)))return p||E.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:w.length,index:u}),O();if(A===h-1)return O(e.substring(u,A).replace(C,t));if(t!==l||e[A+1]!==l){if(t===l||0===A||e[A-1]!==l){-1!==x&&x<A+1&&(x=e.indexOf(r,A+1)),-1!==T&&T<A+1&&(T=e.indexOf(n,A+1));var j=F(-1===T?x:Math.min(x,T));if(e[A+1+j]===r){k.push(e.substring(u,A).replace(C,t)),e[u=A+1+j+m]!==t&&(A=e.indexOf(t,u)),x=e.indexOf(r,u),T=e.indexOf(n,u);break}var P=F(T);if(e.substring(A+1+P,A+1+P+v)===n){if(k.push(e.substring(u,A).replace(C,t)),D(A+1+P+v),x=e.indexOf(r,u),A=e.indexOf(t,u),y&&(B(),d))return N();if(a&&w.length>=a)return N(!0);break}E.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:w.length,index:u}),A++}}else A++}return O();function R(e){w.push(e),S=u}function F(t){var r=0;if(-1!==t){var n=e.substring(A+1,t);n&&""===n.trim()&&(r=n.length)}return r}function O(t){return p||(void 0===t&&(t=e.substring(u)),k.push(t),u=h,R(k),y&&B()),N()}function D(t){u=t,R(k),k=[],T=e.indexOf(n,u)}function N(e){return{data:w,errors:E,meta:{delimiter:r,linebreak:n,aborted:d,truncated:!!e,cursor:S+(i||0)}}}function B(){s(N()),w=[],E=[]}function L(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=L(c,a,s)}else i={nextDelim:n,quoteSearch:o};return i}},this.abort=function(){d=!0},this.getCharIndex=function(){return u}}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})}}),(l.prototype=Object.create(c.prototype)).constructor=l,(u.prototype=Object.create(c.prototype)).constructor=u,(d.prototype=Object.create(d.prototype)).constructor=d,(p.prototype=Object.create(c.prototype)).constructor=p,i}()}));const Gr=e=>{try{return qr.parse(e.replace(/^\ufeff/,""),{header:!0}).data}catch(e){return console.log(e),{}}},Yr=(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 Kr=null;const Xr=async e=>{if(!Kr)try{const e=localStorage.getItem("sczh:data");if(!e)return!1;Kr=JSON.parse(e)}catch(e){return console.error(e),!1}if(G(C.version,Kr.version))return Kr=null,localStorage.removeItem("sczh:data"),!1;let t=e;/(\.csv|\.json)/.test(e)||(t=e+".csv");const{hashes:r}=await Wr,n=r[t],o=Kr.hashes[t];return o&&o===n?Kr[e]:(Kr.hashes[t]=n,!1)},Vr=(e,t)=>{Kr&&Kr.hashes||(Kr={hashes:C.hashes,version:C.version});let r=e;/(\.csv|\.json)/.test(e)||(r=e+".csv");const n=C.hashes[r];n&&(Kr.hashes[r]=n),Kr[e]=t;const o=JSON.stringify(Kr);try{localStorage.setItem("sczh:data",o)}catch(e){console.error(e)}},Qr=new Map,Zr=async(e,t)=>{const r=t||e;if(Qr.has(e))return Qr.get(e);let n=await Xr(e);n||(n=await Jr(`/data/${r}.csv`),Vr(e,n));const o=Gr(n);return Qr.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&&Yr(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={"true,true":null,"true,false":null,"false,true":null,"false,false":null};const sn=async(e=!0,t=!1)=>{let r=`${e},${t}`,n=on[r];if(n)return n;const o=await nn();n=on[r]=new Map;for(let[r,s]of o){const o=r.split(" "),i=s.split(" ");e&&o.length>1&&n.set(o[1],i[1]),n.set(o.join(""),i.length>1&&t?i[1]:i.join(" ")),i.length>1&&n.set(r,t?i[1]:s)}return n};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,l=new Map,u=new Map([["name",[...i.keys()]]]),d=[];Yr(s,"text").forEach(e=>{if(null==e?void 0:e.text){const t=$(e.text),r=U($(e.trans,!0)),n=z(e.type);t&&r&&(void 0===n||"text"===n?c.set(t,r):n&&"exp"!==n?(u.has(n)||u.set(n,[]),u.get(n).push((e=>e.replace(/\?/g,"\\?").replace(/\./g,"\\.").replace(/\*/g,"\\*").replace(/\+/g,"\\+").replace(/\(/g,"\\(").replace(/\)/g,"\\)"))(t)),a.set(t,r)):l.set(t.replace(/\[/g,"\\[").replace(/\]/g,"\\]"),r))}});for(let[e,t]of u)d.push({re:new RegExp("\\$"+e,"g"),exp:`(${t.join("|")})`});for(let[e,t]of l){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?X(r[1],t)+r[2]:X(e,t)};return{api:{get(e){Nr.get(i(e))},post(e){Nr.post(i(e))},put(e){Nr.put(i(e))},patch(e){Nr.patch(i(e))},delete(e){Nr.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:ln,transItem:un}=cn("skill"),dn=e=>{var t,r;e&&(null===(t=e.skillEffects)||void 0===t||t.forEach(e=>{un(e,"effectName"),un(e,"effectDescription")}),null===(r=e.rivalMemoryAppealEffects)||void 0===r||r.forEach(e=>{un(e,"effectName"),un(e,"effectDescription")}))},pn=/\[조건 ?: ?(.*)\]$/g,hn=(e,t=!1)=>{if(e){var r,n;if(un(e,"comment"),un(e,"name"),t&&dn(e),e.linkSkill&&(un(e.linkSkill,"comment"),un(e.linkSkill,"name"),t&&dn(e.linkSkill)),e.plusSkill)un(e.plusSkill,"comment"),un(e.plusSkill,"name"),e.plusSkill.comment=null===(r=e.plusSkill)||void 0===r?void 0:r.comment.replace(pn,"​[조건: ​$1]");if(e.exchangeSkill)un(e.exchangeSkill,"comment"),un(e.exchangeSkill,"name"),e.exchangeSkill.comment=null===(n=e.exchangeSkill)||void 0===n?void 0:n.comment.replace(pn,"​[조건: ​$1]")}},fn=e=>{e&&e.forEach(e=>{un(e,"releaseConditions"),un(e.passiveSkills,"comment"),un(e.passiveSkills,"name"),hn(e.skill),hn(e.concertActiveSkill),e.activeSkills&&e.activeSkills.forEach(e=>{hn(e)})})},mn=e=>{null==e||e.forEach(e=>{hn(e)})},vn=(e,t=!1)=>{var r,n,o;let s=e.userProduceIdol;s&&(null===(r=s.activeSkills)||void 0===r||r.forEach(e=>{hn(e)}),null===(n=s.passiveSkills)||void 0===n||n.forEach(e=>{hn(e)}),null===(o=s.limitBreaks)||void 0===o||o.forEach(e=>{hn(e)}),t&&fn(s.skillPanels))},gn=e=>{e.forEach(e=>{hn(e.skill,!0)})},yn=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=>{hn(e,!0)})}),null===(n=e.rival)||void 0===n||n.rivalSkills.forEach(e=>{dn(e)})})},wn=e=>{var t,r,n;(null==e?void 0:e.supportIdol)&&(fn(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=>{un(e,"comment"),un(e,"name")}))},En=e=>{const t=e.userFesIdol;t.activeSkills.forEach(e=>{hn(e)}),hn(t.memoryAppeal),t.passiveSkills.forEach(e=>{un(e,"comment"),un(e,"name")})},bn=En,kn=e=>{var t,r,n,o;e.userProduceSupportIdols.forEach(e=>{fn(e.skillPanels)}),vn(e,!0),null===(t=e.userProduceLimitedSkills)||void 0===t||t.forEach(e=>{hn(e.passiveSkills),hn(e.skill)}),fn(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=>{hn(e,!0)}),hn(e.userFesIdol.memoryAppeal,!0),null===(t=e.userFesIdol.passiveSkills)||void 0===t||t.forEach(e=>{un(e,"comment"),un(e,"name"),dn(e)}))},In=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),gn(e.judges),yn(e.userFesRivals),yn(e.userFesRaidRivals),dn(e.feverActiveSkill)},_n=e=>{var t;null===(t=e.fanActiveSkills)||void 0===t||t.forEach(e=>{hn(e,!0)}),e.userProduceSupportIdols.forEach(e=>{hn(e.activeSkill,!0)});let r=e.userProduceIdol;r.activeSkills.forEach(e=>{hn(e,!0)}),hn(r.memoryAppeal,!0),r.passiveSkills.forEach(e=>{hn(e,!0)});let n=e.produceAudition||e.produceConcert;gn(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?_n(t):(t.userFesDeck||t.userRaidDeck)&&In(t),e.gameData=JSON.stringify(t)}catch(e){log(e)}},Tn=e=>{e.userProduceIdol.activeSkills.forEach(e=>{hn(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=>{un(e,"name")})},An=e=>{var t,r,n,o,s;null==e||null===(t=e.userFesDeck)||void 0===t||null===(r=t.userFesDeckMembers)||void 0===r||r.forEach(Sn),null==e||null===(n=e.userFesRivals)||void 0===n||null===(o=n[0])||void 0===o||null===(s=o.userFesDeckMembers)||void 0===s||s.forEach(Sn)},Mn=e=>{var t,r,n;e.userProduceIdol&&mn(null==e||null===(t=e.userProduceIdol)||void 0===t||null===(r=t.userIdol)||void 0===r||null===(n=r.idol)||void 0===n?void 0:n.memoryAppeals)};ln.get([[["userSupportIdols/{num}","userSupportIdols/statusMax","produceTeachingSupportIdols/{num}"],[wn]],["userProduce(Teaching)?SupportIdols/{num}",[e=>{var t,r,n,o;fn(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=>{un(e,"comment"),un(e,"name")})}]],["userReserveSupportIdols/userSupportIdol/{num}",[e=>{var t,r,n;fn(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=>{un(e,"comment"),un(e,"name")})}]],[["userIdols/{num}","userIdols/statusMax","produceTeachingIdols/{num}"],[e=>{(null==e?void 0:e.idol)&&(fn(e.idol.skillPanels),mn(e.idol.memoryAppeals),(e=>{e.forEach(e=>{hn(e)})})(e.idol.abilities))}]],[["userProduce(Teaching)?Idols/{num}","userProduceTeachingIdol"],e=>{e.activeSkills.forEach(e=>{hn(e)}),mn(e.userIdol.idol.memoryAppeals)}],["userReserveIdols/userIdol/{num}",e=>{fn(e.idol.skillPanels),mn(e.idol.memoryAppeals)}],["userFesIdols/{num}",En],[["userProduces/skillPanels","userProduceTeachings/skillPanels"],kn],["userDecks/skillPanels",e=>{var t,r,n;e.userSupportIdols.forEach(e=>{fn(e.skillPanels)}),fn(null===(t=e.userIdol)||void 0===t?void 0:t.skillPanels),fn(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=>{hn(e)})})})}],["userProduceAbilities",Tn],["userProduces",[Cn]],["userJointFesDecks",e=>{e.userJointFesDecks.forEach(e=>{e.userFesDeckMembers.forEach(Sn)})}],["jointFes/areas/{num}/stages",e=>{var t;null==e||null===(t=e.stages)||void 0===t||t.forEach(e=>{var t,r;return null==e||null===(t=e.rivalFesDeck)||void 0===t||null===(r=t.userFesDeckMembers)||void 0===r?void 0:r.forEach(Sn)})}],["jointFesConcerts/actions/ready",e=>{var t,r,n;null==e||null===(t=e.stage)||void 0===t||null===(r=t.rivalFesDeck)||void 0===r||null===(n=r.userFesDeckMembers)||void 0===n||n.forEach(Sn)}],["jointFesConcerts/actions/resume",An],["tutorialProduces/actions/(next|resume)",Mn],["produceTeachings/1/ready",e=>{var t;null==e||null===(t=e.produceTeachingIdols)||void 0===t||t.forEach(e=>un(e,"comment"))}]]),ln.post([[["userProduce(Teaching)?s/skillPanels/{num}","userProduces/limitedSkills/{num}"],kn],[["produces/actions/resume","produces/actions/finish","produceTeachings/resume"],[e=>{e.gameData||vn(e)},xn]],[["produces/actions/resume","produces/actions/next"],[Cn]],["fes(Match|Raid)?Concert/actions/start",[In]],["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&&In(t),e.gameState.game_data=JSON.stringify(t)}catch(e){log(e)}}]],["fesTowerConcert/actions/start",[In]],["fesTowerConcert/actions/resume",[e=>{if(e.gameState&&e.gameState.game_data)try{let t=JSON.parse(e.gameState.game_data);t.userFesEventDeck&&In(t),e.gameState.game_data=JSON.stringify(t)}catch(e){log(e)}}]],[["produce(Teaching)?s/({num}/audition|concert)/actions/start","produceTeachings/(auditions|concerts)/start"],[_n]],[["(tutorialP|p)roduces/actions/(next|resume)","produceTeachings/(next|resume)"],Mn],["userProduceAbilities",Tn],["jointFesConcerts/actions/start",An]]),ln.patch([["userFesDecks",e=>{e.userFesDecks.forEach(e=>{e.userFesDeckMembers.forEach(Sn)})}],["userSupportIdols/{num}",e=>{wn(e.userSupportIdol)}]]),ln.delete([["userProduces/skillPanels/{num}",kn]]);const{api:jn,transItem:Pn}=cn("etc/ex-skill"),Rn=e=>{e&&Pn(e,"description")},Fn=e=>{e.userIdolProduceExSkills.forEach(e=>{Rn(e.produceExSkill)})},On=e=>{var t;null===(t=e.userSupportIdolProduceExSkills)||void 0===t||t.forEach(e=>{Rn(e.produceExSkill)})},Dn=e=>{const t=e.userFesIdol;t.userFesIdolProduceExSkills.forEach(e=>{Rn(e.produceExSkill)}),t.userFesSupportIdols.forEach(e=>{e.userFesSupportIdolProduceExSkills.forEach(e=>{Rn(e.produceExSkill)})})},Nn=Dn,Bn=(e,t,r)=>{if(!e||!e[t])return;let n=r.get(e[t]);n&&(e[t]=n)};jn.get([[["userIdols/produceExSkillTop","userSupportIdols/produceExSkillTop","userIdols/{num}/produceExSkillTop","userSupportIdols/{num}/produceExSkillTop"],async e=>{var t,r,n,o,s,i,a,c,l,u;let d=await sn();null===(t=e.userIdols)||void 0===t||t.forEach(e=>{var t;null===(t=e.userIdolProduceExSkills)||void 0===t||t.forEach(e=>{Rn(e.produceExSkill)})}),null===(r=e.userSupportIdols)||void 0===r||r.forEach(e=>{var t;null===(t=e.userSupportIdolProduceExSkills)||void 0===t||t.forEach(e=>{Rn(e.produceExSkill)})}),null===(n=e.userIdol)||void 0===n||null===(o=n.userIdolProduceExSkills)||void 0===o||o.forEach(e=>{Rn(e.produceExSkill)}),null===(s=e.userSupportIdol)||void 0===s||null===(i=s.userSupportIdolProduceExSkills)||void 0===i||i.forEach(e=>{Rn(e.produceExSkill)}),null===(a=e.userProduceExSkills)||void 0===a||a.forEach(e=>{var t;Rn(e.produceExSkill),Rn(null===(t=e.produceExSkillUpgrade)||void 0===t?void 0:t.produceExSkill)}),null===(c=e.userSupportIdolExSkills)||void 0===c||c.forEach(e=>{var t;Rn(e.produceExSkill),Rn(null===(t=e.produceExSkillUpgrade)||void 0===t?void 0:t.produceExSkill)}),null===(l=e.characters)||void 0===l||l.forEach(e=>Bn(e,"firstName",d)),null===(u=e.userIdols)||void 0===u||u.forEach(e=>{var t;return Bn(null===(t=e.idol)||void 0===t?void 0:t.character,"firstName",d)})}],[["userSupportIdols/{num}","userSupportIdols/statusMax","produceTeachingSupportIdols/{num}"],[On]],["userProduce(Teaching)?SupportIdols/{num}",[e=>{var t;null===(t=e.userProduceSupportIdolProduceExSkills)||void 0===t||t.forEach(e=>{Rn(e.produceExSkill)})}]],[["userIdols/{num}","userIdols/statusMax","produceTeachingIdols/{num}"],[Fn]],[["userProduce(Teaching)?Idols/{num}"],e=>{var t;null===(t=e.userProduceIdolProduceExSkills)||void 0===t||t.forEach(e=>{Rn(e.produceExSkill)})}],["userFesIdols/{num}",Dn],["earthUsers/{uuid}/userFesIdols/{num}",Nn],["userProducerSkills/summaries",e=>{e.forEach(e=>{Rn(e)})}],["userSupportIdols/produceExSkills",e=>{var t;null==e||null===(t=e.produceExSkills)||void 0===t||t.forEach(e=>{Rn(e)})}]]),jn.post([["userIdols/{num}/produceExSkills/{num}/actions/set",Fn],["userSupportIdols/{num}/produceExSkills/{num}/actions/set",[On]],["produces/actions/result",[e=>{e.produceExSkillRewards.forEach(e=>{Rn(e.produceExSkill)})}]],["business/actions/finish",e=>{e.slots.forEach(e=>{e.businessProduceExSkillRewards.forEach(e=>{Rn(e.produceExSkill)})})}],["userProduceExSkills/actions/upgrade",e=>{var t;Rn(e.produceExSkill),Rn(null===(t=e.produceExSkillUpgrade)||void 0===t?void 0:t.produceExSkill)}]]);const{api:Ln,transItem:zn}=cn("support-skill"),$n=e=>{null==e||e.forEach(e=>{zn(e,"description"),zn(e,"name")})},Un=e=>{var t,r,n;const o=null!==(t=e.userSupportIdol)&&void 0!==t?t:e;$n(o.acquiredSupportSkills),$n(o.supportSkills),$n(null===(r=o.supportIdol)||void 0===r?void 0:r.supportSkills),Hn(null==o||null===(n=o.supportIdol)||void 0===n?void 0:n.fightSkill)},Hn=e=>{var t;e&&(zn(e,"comment"),zn(e,"name"),null==e||null===(t=e.skills)||void 0===t||t.forEach(e=>zn(null==e?void 0:e.skill,"name")))},Wn=e=>{var t,r;null==e||null===(t=e.userFesDeck)||void 0===t||null===(r=t.userFesDeckMembers)||void 0===r||r.forEach(e=>{var t,r;return Hn(null==e||null===(t=e.userFightSupportIdol)||void 0===t||null===(r=t.supportIdol)||void 0===r?void 0:r.fightSkill)})};Ln.get([[["userSupportIdols/{num}","userSupportIdols/statusMax","produceTeachingSupportIdols/{num}"],[Un]],["userProduce(Teaching)?SupportIdols/{num}",[Un]],["userReserveSupportIdols/userSupportIdol/{num}",[Un]],["produces/{num}/decks",e=>{var t;null===(t=e.userSupportIdols)||void 0===t||t.forEach(e=>{var t;$n(null===(t=e.supportIdol)||void 0===t?void 0:t.supportSkills)})}],["userJointFesDecks",e=>{e.userJointFesDecks.forEach(e=>{e.userFesDeckMembers.forEach(e=>{var t,r;return Hn(null==e||null===(t=e.userFightSupportIdol)||void 0===t||null===(r=t.supportIdol)||void 0===r?void 0:r.fightSkill)})})}],["jointFesConcerts/actions/resume",Wn],["userSupportIdols",e=>{e.forEach(e=>{var t;return Hn(null==e||null===(t=e.supportIdol)||void 0===t?void 0:t.fightSkill)})}]]),Ln.post([["produces/{num}/actions/ready",[e=>{e.userDecks.forEach(e=>{e.userSupportIdols.forEach(e=>{var t;$n(null===(t=e.supportIdol)||void 0===t?void 0:t.supportSkills)})})}]],["userSupportIdols/{num}/produceExSkills/{num}/actions/set",[Un]],["produces/actions/(resume|next)",[Un]],[["produceTeachings/resume","produceTeachings/next"],Un],["jointFesConcerts/actions/start",Wn]]),Ln.patch([["userSupportIdols/{num}",Un],["produces/{num}/produceItem/consume",e=>{$n(e.supportSkills)}]]);const{api:Jn,transItem:qn}=cn("etc/idea-note"),Gn=e=>{var t;e&&(qn(e,"title"),(e=>{qn(e,"title"),qn(e,"comment")})(e.produceIdeaNoteCompleteBonus),null===(t=e.produceIdeaNoteExtraBonuses)||void 0===t||t.forEach(e=>{qn(e,"comment"),qn(e,"condition")}))},Yn=e=>{var t,r;null===(t=e.ideaNoteResult)||void 0===t||null===(r=t.seasonClearBonusIdeaNotes)||void 0===r||r.forEach(e=>{Gn(e)})};Jn.get([["userProduceIdeaNotes",e=>{e.forEach(e=>{Gn(e.produceIdeaNote)})}]]),Jn.post([["produces/actions/(resume|next)",[e=>{var t;null===(t=e.userProduceIdeaNotes)||void 0===t||t.forEach(e=>{Gn(e.produceIdeaNote)})},Yn]],["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=>{Gn(e)})});let o=null===(r=e.lessonResult)||void 0===r||null===(n=r.userProduceIdeaNote)||void 0===n?void 0:n.produceIdeaNote;Gn(o)}]],["produces/actions/endWeek",Yn]]),Jn.patch([["userProduceIdeaNotes/228681479/actions/select",e=>{Gn(e.userProduceIdeaNote.produceIdeaNote)}]]);const{api:Kn,transItem:Xn}=cn("etc/grad-skill"),Vn=e=>{var t;e&&(Xn(e,"comment"),Xn(e,"name"),Xn(e,"acquireComment"),Xn(e,"releaseComment"),null===(t=e.produceAbilityAcquireConditionComments)||void 0===t||t.forEach(e=>{Xn(e,"name")}))},Qn=e=>{e.userFesIdol.abilities.forEach(e=>{Vn(e)})},Zn=Qn,eo=e=>{var t,r;const n=e=>{e.userFesIdol.abilities.forEach(e=>{Vn(e)}),e.userFesIdol.concertAbilities.forEach(e=>{Vn(e)})};null===(t=e.userFesDeck)||void 0===t||t.userFesDeckMembers.forEach(n),null===(r=e.userRaidDeck)||void 0===r||r.userRaidDeckMembers.forEach(n)},to=e=>{var t,r;const n=e.userProduceIdol;n&&(null===(t=n.abilities)||void 0===t||t.forEach(e=>{Vn(e)}),null===(r=n.concertAbilities)||void 0===r||r.forEach(e=>{Vn(e)}))},ro=e=>{if(e.gameData)try{let t=JSON.parse(e.gameData);t.produceAudition||t.produceConcert?to(t):(t.userFesDeck||t.userRaidDeck)&&eo(t),e.gameData=JSON.stringify(t)}catch(e){log(e)}},no=e=>{e.userProduceIdol.abilities.forEach(e=>{Vn(e)}),e.userProduceAbilities.forEach(e=>{Vn(e.ability)})};Kn.get([["userFesIdols/{num}",Qn],["fes(Match)?Concert/actions/resume",[ro]],["earthUsers/{uuid}/userFesIdols/{num}",Zn],["userProduceAbilities",no],[["userProduceAreas"],e=>{var t;null===(t=e.abilities)||void 0===t||t.forEach(e=>{Vn(e)})}],["jointFesConcerts/actions/resume",eo]]),Kn.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=>{Vn(e)}))})(e)},ro]],["fes(Match|Raid)?Concert/actions/start",[eo]],["jointFesConcerts/actions/start",eo],["fes(Match)?Concert/actions/resume",[ro]],["fesRaidConcert/actions/resume",[e=>{if(e.gameState&&e.gameState.game_data)try{let t=JSON.parse(e.gameState.game_data);t.userRaidDeck&&eo(t),e.gameState.game_data=JSON.stringify(t)}catch(e){log(e)}}]],[["produce(Teaching)?s/({num}/audition|concert)/actions/start","produceTeachings/(auditions|concerts)/start"],[to]],["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=>{Xn(e,"name")})}],["userProduceAbilities",no]]);const{api:oo,transItem:so}=cn("etc/landing-point"),io=e=>{e&&(so(e,"comment"),so(e,"name"),so(e,"acquireComment"),so(e,"releaseComment"))},ao=e=>{so(e,"title"),e.produceMusicAssignmentClearBonuses.forEach(e=>{so(e,"title")})},co=e=>{var t,r;so(e.concertBgm,"songTitle"),so(e.concertBgm,"newLineSongTitle"),so(e.feverActiveSkill,"comment"),e.produceMusicProficiencyBonuses.forEach(e=>{var t;so(e,"description"),e.ability&&(io(e.ability),null===(t=e.ability.produceAbilityAcquireConditionComments)||void 0===t||t.forEach(e=>{so(e,"name")}))}),null===(t=e.produceMusicAssignments)||void 0===t||t.forEach(ao),null===(r=e.produceMusicProficiencyJudgeStarBonuses)||void 0===r||r.forEach(e=>{so(e,"description")})},lo=e=>{var t,r,n;co(e.produceMusic),null===(t=e.userProduceMusicAssignments)||void 0===t||t.forEach(e=>{ao(e.produceMusicAssignment)}),null===(r=e.allUserProduceMusicAssignments)||void 0===r||r.forEach(e=>{ao(e.produceMusicAssignment)}),null===(n=e.judgeStarBonuses)||void 0===n||n.forEach(e=>{so(e,"description")})},uo=e=>{var t,r;null===(t=e.userProduceMusicProficiencies)||void 0===t||t.forEach(lo),null===(r=e.activatedProduceMusicAssignmentBonuses)||void 0===r||r.forEach(e=>{var t;null===(t=e.produceMusicAssignmentClearBonuses)||void 0===t||t.forEach(e=>{so(e,"title")})})},po=e=>{var t;io(e),null===(t=e.skillEffects)||void 0===t||t.forEach(e=>{so(e,"effectDescription"),so(e,"effectName")})},ho=e=>{var t,r,n,o;null===(t=e.produceMusic)||void 0===t||null===(r=t.judgeStarBonuses)||void 0===r||r.forEach(e=>{so(e,"description")}),null===(n=e.userProduceIdol)||void 0===n||null===(o=n.abilities)||void 0===o||o.forEach(po),so(e.feverActiveSkill,"comment")},fo=e=>{var t,r;null===(t=e.userFesIdol)||void 0===t||null===(r=t.abilities)||void 0===r||r.forEach(po)},mo=fo;oo.get([[["userProduceAreas","produceMusics"],e=>{var t;null===(t=e.produceMusics)||void 0===t||t.forEach(co)}],["userProduces",[uo]],["userFesIdols/{num}",fo],["earthUsers/{uuid}/userFesIdols/{num}",mo]]),oo.post([[["produces/actions/resume","produces/actions/next"],[uo]],["produces/actions/resume",e=>{if(e.gameData)try{let t=JSON.parse(e.gameData);t.produceAudition||t.produceConcert?ho(t):t.userFesDeck||t.userRaidDeck,e.gameData=JSON.stringify(t)}catch(e){log(e)}}],["userProduceMusicProficiencies",e=>{lo(e.userProduceMusicProficiency)}],["produces/concert/actions/start",ho]]),oo.patch([["userProduceMusicAssignments/{num}",e=>{ao(e.produceMusicAssignment)}]]);const{api:vo,transItem:go}=cn("etc/match-live"),yo=function(e){var t;e&&(go(e,"name"),go(e,"desc"),go(null==e?void 0:e.produce,"title"),null==e||null===(t=e.achievements)||void 0===t||t.forEach(e=>go(e,"name")))},wo=e=>{var t;yo(null==e?void 0:e.jointFesVenue),null==e||null===(t=e.userStageMissions)||void 0===t||t.forEach(e=>go(null==e?void 0:e.mission,"comment"))};vo.get([["jointFes/trophies",e=>{var t,r;null==e||null===(t=e.trophies)||void 0===t||t.forEach(e=>go(e,"comment")),null==e||null===(r=e.trophies)||void 0===r||r.forEach(e=>go(e,"name"))}],["jointFes/areas/{num}/stages",e=>{var t;null==e||null===(t=e.stages)||void 0===t||t.forEach(yo)}],["jointFesConcerts/actions/ready",e=>{yo(null==e?void 0:e.stage)}],["jointFesConcerts/actions/resume",wo],["facilities",e=>{var t,r;null==e||null===(t=e.userFacilities)||void 0===t||t.forEach((function(e){var t,r;go(null==e?void 0:e.facility,"name"),null==e||null===(t=e.facility)||void 0===t||null===(r=t.facilityEffects)||void 0===r||r.forEach(e=>go(e,"comment"))})),null==e||null===(r=e.userFacilityItems)||void 0===r||r.forEach(e=>(go(null==e?void 0:e.facilityItem,"comment"),go(null==e?void 0:e.facilityItem,"name")))}]]),vo.post([["jointFesConcerts/actions/start",wo]]);const{api:Eo,transItem:bo}=cn("etc/festour"),ko=e=>{var t;null===(t=e.suggestFesTowerCompleteBonuses)||void 0===t||t.forEach(e=>{_o(e)})},So=e=>{var t;null===(t=e.suggestFesTowerAreaClearBonuses)||void 0===t||t.forEach(e=>{bo(e.fesTowerBonus,"desc")})},Io=e=>{let t=e.userFesTowerAreaSkipBonus;t&&bo(t.fesTowerBonus,"desc")},_o=e=>{var t;e&&(null===(t=e.userFesTowerCompleteBonuses)||void 0===t||t.forEach(e=>{To(e)}))},xo=e=>{var t;e&&(null===(t=e.fesTowerBonusIdolConditions)||void 0===t||t.forEach(e=>{bo(e,"desc")}))},To=e=>{var t,r;e&&(null===(t=e.fesTowerCompleteBonus)||void 0===t||null===(r=t.fesTowerBonuses)||void 0===r||r.forEach(e=>{bo(e,"desc")}))},Co=e=>{var t;e&&(null===(t=e.evaluationDetails)||void 0===t||t.forEach(e=>{bo(e,"evaluation")}))},Ao=e=>{var t;e&&(null===(t=e.skillEffects)||void 0===t||t.forEach(e=>{bo(e,"effectDescription")}))},Mo=e=>{var t;null===(t=e.userFesTowerAreaClearBonuses)||void 0===t||t.forEach(e=>{bo(e.fesTowerBonus,"desc")})};Eo.get([["userFesTowerResults",Co],["userFesTowerAdvantages",[e=>{var t;e&&(null===(t=e.fesTowerAdvantageFilters)||void 0===t||t.forEach(e=>{bo(e,"title")}))},e=>{var t;e&&(null===(t=e.userFesTowerAdvantages)||void 0===t||t.forEach(e=>{bo(e,"name"),bo(e.fesTowerAdvantageEffect,"desc"),bo(e.nextFesTowerAdvantageEffect,"desc"),Ao(Ao)}))}]],["userFesTowerItems",e=>{var t;e&&(null===(t=e.userFesTowerItems)||void 0===t||t.forEach(e=>{bo(e,"name"),bo(e.fesTowerItemLevel,"desc"),bo(e.nextFesTowerItemLevel,"desc")}))}],[["fesTowerBonusIdols"],e=>{var t;null===(t=e.fesTowerBonusIdols)||void 0===t||t.forEach(e=>{xo(e)})}]]),Eo.post([["userFesTowerResults",Co],["fesTowerEvents/top",[ko,So,Io,_o,e=>{var t;null===(t=e.userFesTowerAreas)||void 0===t||t.forEach(e=>{Mo(e)})}]]]),Eo.patch([["userFesTowerAdvantages/action/acquire",e=>{e&&(bo(e,"name"),bo(e.fesTowerAdvantageEffect,"desc"),bo(e.nextFesTowerAdvantageEffect,"desc"))}],["userFesTowerItems/action/acquire",e=>{e&&(bo(e,"name"),bo(e.fesTowerItemLevel,"desc"),bo(e.nextFesTowerItemLevel,"desc"))}],["userFesTowerAreas/action/complete",ko],["userFesTowerAreas/action/skip",ko],[["fesTowerEvents/top","userFesTowers/action/skip"],[ko,So,Io]]]);const{api:jo,transItem:Po}=cn("etc/knowhowbook"),Ro=e=>{var t,r;null===(t=e.userKnowHowBooks)||void 0===t||t.forEach(e=>{Fo(e)}),null===(r=e.individualities)||void 0===r||r.forEach(e=>{Oo(e)})},Fo=e=>{var t;null===(t=e.userKnowHowBookIndividualities)||void 0===t||t.forEach(e=>{Oo(e.individuality)})},Oo=e=>{e&&(Po(e,"name"),Po(e,"description"))},Do=e=>{e&&(Po(e,"name"),e.ability&&(Po(e.ability,"comment"),Po(e.ability,"name")),e.activeSkill&&Po(e.activeSkill,"comment"))};jo.get([[["userProduceAreas","userProduces/growths"],e=>{var t;null===(t=e.userProduceGrowths)||void 0===t||t.forEach(e=>{Do(e.produceGrowth)})}],[["userKnowHowBooks"],Ro]]),jo.post([[["produces/actions/endWeek","produces/actions/resume"],e=>{var t;null===(t=e.availableIndividualities)||void 0===t||t.forEach(e=>{Oo(e)})}],["produces/actions/result",Ro]]);const{api:No,getTransItem:Bo,ensureData:Lo}=cn("etc/item-re"),zo=Bo((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))}}),$o=Bo(V),Uo=Bo((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)}}}),Ho=["produceItem","recoveryItem","exchangeItem","lotteryTicket","evolutionItem","gashaTicket","scoutTicket","enhancementItem","idolEvolutionPiece"],Wo=e=>{var t;const r="skin"==(null==e?void 0:e.category)||"ticket_exchange"==(null==e?void 0:e.category);null==e||null===(t=e.shopMerchandises)||void 0===t||t.forEach(e=>{var t;(zo(e,"comment"),r)||($o(e,"title"),Uo(e,"shopTitle"),null===(t=e.shopContents)||void 0===t||t.forEach(e=>{$o(e.content,"name"),zo(e.content,"comment")}))})},Jo=e=>{let t=e;e.userProduceItems&&(t=e.userProduceItems),Array.isArray(t)&&t.forEach(e=>{const t=e[Ho[0]]||e[Ho[1]]||e[Ho[2]]||e[Ho[3]]||e[Ho[4]]||e[Ho[5]]||e[Ho[6]]||e[Ho[7]]||e[Ho[8]];$o(t,"name"),zo(t,"comment")})},qo=e=>{e.accumulatedPresent.userGameEventAccumulatedPresents.forEach(e=>{e.gameEventAccumulatedPresent.rewards.forEach(e=>{$o(e.content,"name")})})},Go=e=>{var t;null==e||null===(t=e.activeProduceItems)||void 0===t||t.forEach(e=>{$o(e.produceItem,"name"),zo(e.produceItem,"comment")})};No.get([[["userShops","userIdolPieceShops"],e=>{e&&(Array.isArray(e.userShops)&&e.userShops.forEach(e=>{Wo(e)}),Array.isArray(e.userEventShops)&&e.userEventShops.forEach(e=>{Wo(e.userShop)}))}],[["userRecoveryItems","userProduceItems","userExchangeItems","userLotteryTickets","userEvolutionItems","userGashaTickets","userScoutTickets","userEnhancementItems","userIdolEvolutionPieces"],Jo],[["userPresents\\?limit={num}","userPresentHistories\\?limit={num}"],e=>{Array.isArray(e)&&e.forEach(e=>{$o(e.content,"name"),$o(e,"note")})}],["userProduces",Go],["missionEvents/{num}/top",qo],["gashaGroups",e=>{var t;null===(t=e.gashaGroups)||void 0===t||t.forEach(e=>{var t;null===(t=e.userGashaTickets)||void 0===t||t.forEach(e=>{const t=e.gashaTicket;$o(t,"name"),zo(t,"comment")})})}],["businessTop",e=>{var t;null===(t=e.userRecoveryItems)||void 0===t||t.forEach(e=>{$o(e.recoveryItem,"name")})}],["userMissions",e=>{var t,r;null==e||null===(t=e.monthlyPassportBanner)||void 0===t||null===(r=t.nextStampRewards)||void 0===r||r.forEach(e=>$o(null==e?void 0:e.content,"name"))}],["userMemorialItems",e=>{e.forEach(e=>{$o(null==e?void 0:e.memorialItem,"name"),zo(null==e?void 0:e.memorialItem,"comment")})}],["characterPresentSpecialCommunicationEvents/{num}/top",e=>{var t;null==e||null===(t=e.characterPresentSpecialCommunications)||void 0===t||t.forEach(e=>{e.characterPresentSpecialCommunicationReleaseRewards.forEach(e=>{$o(e.content,"name"),zo(e.content,"comment")})})}]]),No.post([["myPage",e=>{Go(e.userProduce)}],["(produceMarathons|fesMarathons|trainingEvents)/{num}/top",qo],["userShops/actions/purchase",e=>{$o(null==e?void 0:e.shopMerchandise,"title"),zo(null==e?void 0:e.shopMerchandise,"comment")}],["produces/{num}/actions/ready",Jo],["userPresents/{num}/actions/receive",e=>{$o(e.receivedPresent,"Name")}],["userMissions/{num}/actions/receive",e=>{$o(e.userMission.mission.missionReward.content,"name")}],["userLoginBonuses",e=>{e.userLoginBonuses.forEach(e=>{e.loginBonus.sheets.forEach(e=>{e.rewards.forEach(e=>{$o(e.content,"name")})})}),e.userTotalBonuses.forEach(e=>{e.rewards.forEach(e=>{$o(e.content,"name")})})}],["fesTop",e=>{e.lastRankingResult&&Array.isArray(e.lastRankingResult.fesMatchGradeRewards)&&e.lastRankingResult.fesMatchGradeRewards.forEach(e=>{$o(e.content,"name")})}],["userSelectLoginBonuses/{num}",e=>{e.rewards.forEach(e=>{$o(e.content,"name")})}],["gashas/{num}/actions/draw",e=>{var t;null===(t=e.acquiredStampRewards)||void 0===t||t.forEach(e=>{$o(e.content,"name")})}]]),No.patch([["produces/{num}/produceItem/consume",e=>{var t;const r=null===(t=e.consumeProduceItem)||void 0===t?void 0:t.produceItem;r&&($o(r,"name"),zo(r,"comment"))}]]),No.put([["userHomeDecks",e=>{var t,r,n,o,s;null==e||null===(t=e.userHomeDeckBackgroundEffects)||void 0===t||t.forEach(e=>$o(null==e?void 0:e.homeDeckBackgroundEffect,"name")),null==e||null===(r=e.userHomeDeckBackgroundImages)||void 0===r||r.forEach(e=>$o(null==e?void 0:e.homeDeckBackgroundImage,"name")),null==e||null===(n=e.userHomeDeckBgms)||void 0===n||n.forEach(e=>$o(null==e?void 0:e.homeDeckBgm,"name")),null==e||null===(o=e.userHomeDeck)||void 0===o||null===(s=o.userHomeAnimationDecks)||void 0===s||s.forEach(e=>{$o(null==e?void 0:e.homeDeckBgm,"name"),$o(null==e?void 0:e.homeDeckBackgroundImage,"name"),$o(null==e?void 0:e.homeDeckBackgroundEffect,"name")})}]]);en({name:"etc/noun-fix",keys:{trans:"fixed"},sort:"text"}),en({name:"etc/caiyun-prefix",keys:{trans:"fixed"},sort:"text"});const Yo=new Map;let Ko=new Map,Xo=!1,Vo=null;const Qo=t=>{const r=Gr(t),n=new Map,o=Y();return r.forEach(t=>{const r=o(z(t.id)),s=$(t.text),i=$(t.trans,!0),a=z(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},Zo=async()=>{if(!Xo){(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&&Ko.set(t,r)}}),Xo=!0}return Ko};let es=null,ts=!1;const rs=en({name:"type-text"}),ns=async()=>(ts||(es=await rs(),ts=!0),es);var os=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]]},ss=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]]},is=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])},as=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]},cs=function(e,t){return[e[0]^t[0],e[1]^t[1]]},ls=function(e){return e=cs(e,[0,e[0]>>>1]),e=ss(e,[4283543511,3981806797]),e=cs(e,[0,e[0]>>>1]),e=ss(e,[3301882366,444984403]),e=cs(e,[0,e[0]>>>1])};let us="";const ds=()=>{let e="0123456789abcdefghijklmnopqrstuvwxyz",t="";for(let r=0;r<33;r++)t+=e[Math.floor(Math.random()*e.length)];us=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],l=[1291169091,658871167],u=0;u<n;u+=16)i=[255&e.charCodeAt(u+4)|(255&e.charCodeAt(u+5))<<8|(255&e.charCodeAt(u+6))<<16|(255&e.charCodeAt(u+7))<<24,255&e.charCodeAt(u)|(255&e.charCodeAt(u+1))<<8|(255&e.charCodeAt(u+2))<<16|(255&e.charCodeAt(u+3))<<24],a=[255&e.charCodeAt(u+12)|(255&e.charCodeAt(u+13))<<8|(255&e.charCodeAt(u+14))<<16|(255&e.charCodeAt(u+15))<<24,255&e.charCodeAt(u+8)|(255&e.charCodeAt(u+9))<<8|(255&e.charCodeAt(u+10))<<16|(255&e.charCodeAt(u+11))<<24],i=ss(i,c),i=is(i,31),i=ss(i,l),o=cs(o,i),o=is(o,27),o=os(o,s),o=os(ss(o,[0,5]),[0,1390208809]),a=ss(a,l),a=is(a,33),a=ss(a,c),s=cs(s,a),s=is(s,31),s=os(s,o),s=os(ss(s,[0,5]),[0,944331445]);switch(i=[0,0],a=[0,0],r){case 15:a=cs(a,as([0,e.charCodeAt(u+14)],48));case 14:a=cs(a,as([0,e.charCodeAt(u+13)],40));case 13:a=cs(a,as([0,e.charCodeAt(u+12)],32));case 12:a=cs(a,as([0,e.charCodeAt(u+11)],24));case 11:a=cs(a,as([0,e.charCodeAt(u+10)],16));case 10:a=cs(a,as([0,e.charCodeAt(u+9)],8));case 9:a=cs(a,[0,e.charCodeAt(u+8)]),a=ss(a,l),a=is(a,33),a=ss(a,c),s=cs(s,a);case 8:i=cs(i,as([0,e.charCodeAt(u+7)],56));case 7:i=cs(i,as([0,e.charCodeAt(u+6)],48));case 6:i=cs(i,as([0,e.charCodeAt(u+5)],40));case 5:i=cs(i,as([0,e.charCodeAt(u+4)],32));case 4:i=cs(i,as([0,e.charCodeAt(u+3)],24));case 3:i=cs(i,as([0,e.charCodeAt(u+2)],16));case 2:i=cs(i,as([0,e.charCodeAt(u+1)],8));case 1:i=cs(i,[0,e.charCodeAt(u)]),i=ss(i,c),i=is(i,31),i=ss(i,l),o=cs(o,i)}return o=cs(o,[0,e.length]),s=cs(s,[0,e.length]),o=os(o,s),s=os(s,o),o=ls(o),s=ls(s),o=os(o,s),s=os(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",us)};try{us=localStorage.getItem("sczh:bid")}catch(e){}us||ds();var ps=Object.prototype.hasOwnProperty,hs=Array.isArray,fs=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),ms=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},vs={arrayToObject:ms,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],l=s[c];"object"==typeof l&&null!==l&&-1===r.indexOf(l)&&(t.push({obj:s,prop:c}),r.push(l))}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(hs(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+=fs[i]:i<2048?o+=fs[192|i>>6]+fs[128|63&i]:i<55296||i>=57344?o+=fs[224|i>>12]+fs[128|i>>6&63]+fs[128|63&i]:(s+=1,i=65536+((1023&i)<<10|1023&n.charCodeAt(s)),o+=fs[240|i>>18]+fs[128|i>>12&63]+fs[128|i>>6&63]+fs[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(hs(t))t.push(r);else{if(!t||"object"!=typeof t)return[t,r];(n&&(n.plainObjects||n.allowPrototypes)||!ps.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(r);var o=t;return hs(t)&&!hs(r)&&(o=ms(t,n)),hs(t)&&hs(r)?(r.forEach((function(r,o){if(ps.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 ps.call(t,o)?t[o]=e(t[o],s,n):t[o]=s,t}),o)}},gs=String.prototype.replace,ys=/%20/g,ws={RFC1738:"RFC1738",RFC3986:"RFC3986"},Es=vs.assign({default:ws.RFC3986,formatters:{RFC1738:function(e){return gs.call(e,ys,"+")},RFC3986:function(e){return String(e)}}},ws),bs=(Date.prototype.toISOString,Es.default);Es.formatters[bs];const ks=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""}},Ss=["text","select","comment","title","actionComment","actionComment2","reactionComment","resultLoseComment","resultStartComment","resultWinComment","characterComment","producerComment","comment1","comment2"],Is=["mainText","resultText","name"],_s=(t,r)=>{const n=[],o=[];return t.forEach((t,s)=>{Ss.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 xs=!1,Ts=!1;const Cs=async(t,r="default",n)=>{if(!t||!t.length)return;const o=await ns(),s=await Zo();if(n){const{textInfo:e,textList:r}=_s(t,o);if(!e.length||"……"==r||1==xs||"…………"==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 ks(s),xs=!0}else if("FesTower"==r){const{textInfo:r,textList:n}=((t,r)=>{const n=[],o=[];return t.forEach((t,s)=>{Is.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==xs||1==Ts||"…………"==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 ks(i),1==xs&&(Ts=!0),xs=!0}else{const{textInfo:e,textList:r}=_s(t,s);if(!e.length||"……"==r||1==xs||"…………"==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 ks(o),xs=!0}},{api:As,transItem:Ms}=cn("mission",Lo),js=(e,t)=>{Ms(e,t)||("name"===t?$o(e,t):zo(e,t))};let Ps=!1;const Rs=e=>{null==e||e.forEach(e=>{Ms(e.mission,"title"),Ms(e.mission,"comment"),e.mission.missionReward.content&&(js(e.mission.missionReward.content,"name"),js(e.mission.missionReward.content,"comment"))})},Fs=e=>{e.forEach(e=>{let t=e.fesRaidAccumulatedReward;Ms(t,"title"),Ms(t,"comment");let r=t.fesRaidAccumulatedRewardContent;(null==r?void 0:r.content)&&(js(r.content,"name"),js(r.content,"comment"))})},Os=(e,t=!0)=>{null==e||e.forEach(e=>{let r=(null==e?void 0:e.mission)||e;if(Ms(r,"title"),Ms(r,"comment"),Ms(r,"afterAchievedComment"),Ms(r,"beforeAchievedComment"),Ms(r,"lockComment1"),Ms(r,"lockComment2"),t){let e=null==r?void 0:r.lectureMissionReward;(null==e?void 0:e.content)&&(js(e.content,"name"),js(e.content,"comment"))}})},Ds=e=>{var t,r;Ms(null===(t=e.userRecommendedMission)||void 0===t?void 0:t.mission,"comment"),Ms(null===(r=e.userRecommendedMission)||void 0===r?void 0:r.mission,"title"),e.accumulatedPresent.userGameEventAccumulatedPresents.forEach(e=>{Ms(e.gameEventAccumulatedPresent,"comment"),Ms(e.gameEventAccumulatedPresent,"title")})},Ns=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=>{Ms(e.produceTeachingHint,"title")}),null===(r=e.userProduceTeachingHints)||void 0===r||r.forEach(e=>{Ms(e.produceTeachingHint,"title")})})},Bs=e=>{var t,r;Os(e.lectureMissions),null==e||null===(t=e.beginnerMission)||void 0===t||null===(r=t.lectureMissionGroups)||void 0===r||r.forEach(e=>Ms(e,"label"))},Ls=e=>{var t;null===(t=e.userIdolRoad)||void 0===t||t.idolRoad.idolRoadRewards.forEach(e=>{js(e.content,"name"),js(e.content,"comment")})},zs=e=>{null==e||e.forEach(e=>{var t,r;Ms(null===(t=e.userMission)||void 0===t?void 0:t.mission,"title"),Ms(null===(r=e.userMission)||void 0===r?void 0:r.mission,"comment")})},$s=e=>{e&&(e.clearedBeginnerLectureMissions&&Os(e.clearedBeginnerLectureMissions,!0),e.clearedWingLectureMission&&Os([e.clearedWingLectureMission],!0))};As.get([["userMissions",e=>{var t;Rs(e.dailyUserMissions),Rs(e.weeklyUserMissions),Rs(e.fesMatchRankingUserMissions),null===(t=e.eventUserMissions)||void 0===t||t.forEach(e=>{Rs(null==e?void 0:e.userMissions)}),Rs(e.normalUserMissions),Rs(e.specialUserMissions)}],["userJewelGettableMissions",e=>{var t,r,n,o,s,i;zs(null===(t=e.dailyWeeklyUserMissions)||void 0===t?void 0:t.userMissionsWithCategory),zs(null===(r=e.fesUserMissions)||void 0===r?void 0:r.userMissionsWithCategory),zs(null===(n=e.idolUserMissions)||void 0===n?void 0:n.userMissionsWithCategory),zs(null===(o=e.otherUserMissions)||void 0===o?void 0:o.userMissionsWithCategory),zs(null===(s=e.produceUserMissions)||void 0===s?void 0:s.userMissionsWithCategory),zs(null===(i=e.trueEndUserMissions)||void 0===i?void 0:i.userMissionsWithCategory)}],["fesRaidEvents/{num}/rewards",e=>{Fs(e.fesRaidBestScoreRewards),Fs(e.fesRaidLapRewards),Fs(e.fesRaidPointRewards)}],[["userProduces","userProduceTeachings"],[Ns]],["userBeginnerMissions/top",Bs],["idolRoads/top",e=>{var t;Os(e.userMissions,!1),null===(t=e.userIdols)||void 0===t||t.forEach(Ls)}],["missionEvents/{num}/top",[Ds]],["producerDesk/rewards",e=>{e.producerLevelRewards.forEach(e=>{Ms(e,"title"),js(e.content,"name")})}],["userProduces/skillPanels",e=>{e&&Os([e.progressLectureMission])}],[["idolPortals","userBeginnerMissions/top"],$s]]),As.post([["myPage",[e=>{Rs(e.reportUserMissions)},e=>{let t=e.beginnerMission;t&&(t.clearedLectureMission&&Os([t.clearedLectureMission]),t.progressLectureMission&&Os([t.progressLectureMission]),t.clearedBeginnerLectureMissions&&Os(t.clearedBeginnerLectureMissions,!0),t.clearedWingLectureMission&&Os([t.clearedWingLectureMission],!0))},e=>{var t;(async e=>{if(!e)return;const t=[];for(let r=0;r<e.length;r++){let n=e[r];Ms(e,r),n===e[r]&&t.push(n)}if(t.length&&0==Ps)try{const e=t.join("\nPmessage");/[ㄱ-ㅎ|ㅏ-ㅣ|가-힣]/.test(e)||await ks("Pmessage"+e),Ps=!0}catch(e){W(e)}})(null===(t=e.producerDesk)||void 0===t?void 0:t.messages)}]],["(produceMarathons|fesMarathons|trainingEvents)/{num}/top",[Ds]],[["produceTeachings/resume","produceTeachings/next"],Ns],["userLectureMissions/{num}/actions/receive",Bs],["fesMatchConcert/actions/finish",[e=>{e&&e.fesMatchRankingMission&&Ms(e.fesMatchRankingMission.userMission.mission,"title")}]],["producerDesk/top",e=>{e.progresses.forEach(e=>{Ms(e,"comment"),Ms(e,"title")})}],[["userFesDecks","fesTop","userShops/actions/purchase"],$s]]),As.put([["userIdolRoads",e=>{Ls(e.userIdol)}]]),As.patch([["user(Support)?Idols/{num}/actions/evolve",$s],["userSupportIdols/{num}",$s]]);const Us=new Map;let Hs=!1;const Ws=async()=>{if(!Hs){let e=await Xr("cardname");e||(e=await Jr("/data/cardname.csv"),Vr("cardname",e));Gr(e).forEach(e=>{const t=z(e.name),r=z(e.trans);t&&r&&t!==r&&Us.set(t,r)}),Hs=!0}return Us},Js=new Map;let qs=!1;const Gs=async()=>{if(!qs){let e=await Xr("costumename");e||(e=await Jr("/data/costumename.csv"),Vr("costumename",e));Gr(e).forEach(e=>{const t=$(e.name),r=$(e.trans);t&&r&&t!==r&&Js.set(t,r)}),qs=!0}return Js};let Ys;const Ks=async()=>(Ys||(Ys=Ws()),await Ys);let Xs=[];const Vs=e=>{if(!e)return;if(/^[\x00-\x7F×『』/☆ⅠⅡⅢⅣⅤⅥⅦO①-⑳!?’ …・()♡&〈〉]+$/.test(e))return;let t=q(e);Xs.includes(t)||Xs.push(t)};let Qs;const Zs=async()=>{if(Qs)return Qs;let e=await Ks(),t=await Gs();return Qs=new Map([...e,...t])};(window.unsafeWindow||window).printUnknowCardCostumenames=()=>W(Xs.join("\n"));const ei=(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&&Vs(n)},ti=(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&&Vs(n)},ri=(t,r,n)=>{const o=H(null==t?void 0:t[r]);if(!o||!n)return;let s=null;if(n.has(o)&&(s=n.get(o),t[r]=e(s)),C.dev){const e=o;s||Vs(e)}return s},ni=async e=>{const t=await Ks();e.idol&&ei(e.idol,t),e.supportIdol&&ei(e.supportIdol,t),e.userSupportIdol&&ei(e.userSupportIdol.supportIdol,t),e.userProduceSupportIdols&&e.userProduceSupportIdols.forEach((function(e){ei(e.userSupportIdol.supportIdol,t)})),e.userIdol&&ei(e.userIdol.idol,t),e.userProduceIdol&&ei(e.userProduceIdol.userIdol.idol,t),e.userProduce&&e.userProduce.userProduceIdol&&ei(e.userProduce.userProduceIdol.userIdol.idol,t),e.userFesIdol&&ei(e.userFesIdol.idol,t)},oi=async e=>{const t=await Zs();e.idolCostumes&&e.idolCostumes.forEach((function(e){ei(e,t),ti(e,t)})),e.userFesDecks&&e.userFesDecks.forEach((function(e){e.userFesDeckMembers.forEach((function(e){e.idolCostumes.forEach((function(e){ei(e,t)}))}))}))},si=async e=>{const t=await Ks();e.userKnowHowBooks&&e.userKnowHowBooks.forEach((function(e){e.idol&&ei(e.idol,t)})),e.idols&&e.idols.forEach((function(e){ei(e,t)}))};Nr.get([[["userIdols/{num}","userIdols/statusMax","produceTeachingIdols/{num}"],ni],[["userSupportIdols/{num}","userSupportIdols/statusMax","produceTeachingSupportIdols/{num}","userProduceTeachingIdol","userProduceTeachingSupportIdols/{num}"],ni],["userProduce(Teaching)?SupportIdols/{num}",ni],[["userProduce(Teaching)?Idols/{num}","userProduceTeachingIdol"],ni],["userFesIdols/{num}",ni],["userProduces",ni],["userReserveIdols/userIdol/{num}",ni],["userReserveSupportIdols/userSupportIdol/{num}",ni],["userKnowHowBooks",si],["producerDesk/costumes",async t=>{const r=await Zs();t&&t.forEach((function(t){let n=t.name;ei(t,r),ti(t,r),((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&&Vs(n)})(t,r),t.isSkin&&n!=t.name&&(t.name=t.name.replace(/【(.*)】(.*)/g,"【​$1】$2"))}))}],["userShops",[async e=>{var t;const r=await Gs();r&&(null==e||null===(t=e.userShops)||void 0===t||t.filter(e=>"skin"==(null==e?void 0:e.category)).forEach((function(e){var t,n;const o=null==e||null===(t=e.title)||void 0===t?void 0:t.startsWith("【復刻】");o&&(e.title=e.title.substring(4));const s=ri(e,"title",r);o&&s&&(e.title=e.title.replace(s,"【복각】 "+s)),null===(n=e.shopMerchandises)||void 0===n||n.forEach((function(e){var t,n,o,s,i;ri(null==e||null===(t=e.shopContents)||void 0===t||null===(n=t[0])||void 0===n?void 0:n.content,"comment",r),ri(null==e||null===(o=e.shopContents)||void 0===o||null===(s=o[0])||void 0===s?void 0:s.content,"name",r),(null==e||null===(i=e.shopTitle)||void 0===i?void 0:i.includes("】\n"))&&(e.shopTitle=e.shopTitle.replace("】\n","】"),ri(e,"shopTitle",r),e.shopTitle=e.shopTitle.replace(/】 ?/,"】\n"))}))})))},async e=>{var t;const r=await Ws();r&&(null==e||null===(t=e.userShops)||void 0===t||t.filter(e=>"ticket_exchange"==(null==e?void 0:e.category)).forEach((function(e){var t;null==e||null===(t=e.shopMerchandises)||void 0===t||t.forEach((function(e){var t,n,o,s;ri(null==e||null===(t=e.shopContents)||void 0===t||null===(n=t[0])||void 0===n?void 0:n.content,"name",r),(null==e||null===(o=e.shopTitle)||void 0===o?void 0:o.includes("】\n"))?(e.shopTitle=e.shopTitle.replace("】\n","】"),ri(e,"shopTitle",r),e.shopTitle=e.shopTitle.replace(/】 ?/,"】\n")):(null==e||null===(s=e.shopTitle)||void 0===s?void 0:s.includes("\n"))&&(e.shopTitle=e.shopTitle.replace("\n",""),ri(e,"shopTitle",r),e.shopTitle=e.shopTitle.replace(/】 ?/,"】\n")),ri(e,"title",r)}))})))}]],["gashaGroups/{num}/rates",async t=>{const r=await Ks();null==t||t.forEach(t=>{t.contents.forEach(t=>{r.has(t.contentName)&&(t.contentName=e(r.get(t.contentName)))})})}],["userBeginnerMissions/top",async e=>{var t;const r=await Ks();null==e||null===(t=e.beginnerMissionUnits)||void 0===t||t.forEach(e=>{var t;null==e||null===(t=e.idols)||void 0===t||t.forEach(e=>{var t;ei(null==e?void 0:e.idol,r),null==e||null===(t=e.supportIdols)||void 0===t||t.forEach(e=>ei(e,r))})})}],["produceTeachings/1/ready",async e=>{var t;const r=await Ks();null==e||null===(t=e.produceTeachingIdols)||void 0===t||t.forEach(e=>ei(null==e?void 0:e.idol,r))}],["scoutIdols/{num}",async e=>{let t=await Ks();null==e||e.forEach(e=>{(null==e?void 0:e.idol)?ei(null==e?void 0:e.idol,t):(null==e?void 0:e.supportIdol)&&ei(null==e?void 0:e.supportIdol,t)})}],[["userIdols/produceExSkillTop","userSupportIdols/produceExSkillTop"],async e=>{var t,r;null==e||null===(t=e.userIdols)||void 0===t||t.forEach(e=>ni(e)),null==e||null===(r=e.userSupportIdols)||void 0===r||r.forEach(e=>ni(e))}]]),Nr.post([[["myPage","produces/actions/(resume|next|finish)"],ni]]),Nr.post([["characterAlbums/characters/{num}",[oi]],["produces/actions/result",si],["produces/1/actions/ready",async e=>{var t;const r=await Zs();r&&(null==e||null===(t=e.userDecks)||void 0===t||t.forEach(e=>{var t,n,o,s;ri(null==e||null===(t=e.userIdol)||void 0===t?void 0:t.idolCostume,"name",r),null==e||null===(n=e.userIdol)||void 0===n||null===(o=n.idolCostumes)||void 0===o||o.forEach(e=>ri(e,"name",r)),null==e||null===(s=e.userSupportIdols)||void 0===s||s.forEach(e=>{var t;ri(null==e?void 0:e.idolCostume,"name",r),null==e||null===(t=e.idolCostumes)||void 0===t||t.forEach(e=>ri(e,"name",r))})}))}],["userBeginnerMissions",async e=>{var t;const r=await Ks();ei(null==e||null===(t=e.beginnerMissionTargetUserIdol)||void 0===t?void 0:t.idol,r)}],["produces/actions/(resume|endWeek)",async t=>{if(null==t?void 0:t.helperSupportIdolOptions){let r=await Ks();t.helperSupportIdolOptions.forEach(t=>{var n;if(!(null==t||null===(n=t.supportIdol)||void 0===n?void 0:n.name))return;let o=t.supportIdol,s=r.get(o.name);if(!s)return;let i=/【(?<cardName>.*)】 ?(?<familyName>[^ ]+ )?(?<givenName>[^ ]+)$/.exec(s);i&&(o.name=`【${e(i.groups.cardName)}】${e(i.groups.givenName)}`)})}}]]),Nr.patch([["userFesDecks",oi],["userIdols/{num}/actions/evolve",async e=>{const t=await Ks();ei(null==e?void 0:e.idol,t)}]]),Nr.put([["userHomeDecks",oi]]);const ii=new Map,ai=new Map,ci=new Map;let li=!1;let ui,di,pi,hi;const fi=async()=>{pi||(pi=(async()=>{if(!li){(await Zr("title")).forEach(e=>{if(null==e?void 0:e.text){const t=$(e.text),r=$(e.trans,!0),n=z(e.type)||"text";t&&r&&t!==r&&("exp"===n?ai.set(t,r):"text"===n&&ii.set(t,r))}});for(let[e,t]of ai){const r=tn(e);ci.set(r,t)}li=!0}return{textMap:ii,expMap:ci}})(),hi=nn()),ui&&di||(ui=await pi,di=await hi,ui.wordMaps=[di])},mi=e=>e[e.length-1];let vi;const gi=async()=>{if(vi)return vi;await fi();let e,t;return vi=new Map([...di].map(r=>([e,t]=r,[mi(e.split(" ")),mi(t.split(" "))])))};let yi=[];(window.unsafeWindow||window).printUnknowTitles=()=>W(yi.join("\n"));const wi=new Map,Ei=(e,t)=>{e&&y(t)&&(wi.has(e)||wi.set(e,t))},bi=(e={},t)=>{let r=e[t];V(e,t,ui),r===e[t]&&C.dev&&(e=>{if(!e)return;if(!e||/^[\x00-\x7F×『』/☆ⅠⅡⅢⅣⅤⅥⅦO①-⑳!?’ …・()♡&〈〉]+$/.test(e))return;let t=q(e);yi.includes(t)||yi.push(t)})(r)},ki=e=>{e.forEach(e=>{bi(e,"name"),e.communications.forEach(e=>{bi(e,"name"),bi(e,"title"),Ei(e.id,`${e.name}-${e.title}`)})})},Si=async e=>{await fi(),e.idol.produceAfterEvents.forEach(e=>{bi(e,"title"),Ei(e.id,e.title)}),e.idol.produceIdolEvents.forEach(e=>{bi(e,"title"),Ei(e.id,e.title)})},Ii=async e=>{await fi(),e.supportIdol.produceSupportIdolEvents.forEach(e=>{bi(e,"title"),Ei(e.id,e.title)})};Nr.get([[["userSupportIdols/{num}","userSupportIdols/statusMax","produceTeachingSupportIdols/{num}"],Ii],[["userIdols/{num}","userIdols/statusMax","produceTeachingIdols/{num}"],Si],[["characterAlbums","album/top"],async e=>{await fi(),ki(e.gameEvents),ki(e.specialEvents)}],[["producerDesk/gameEvents/{num}"],[async e=>{await fi(),bi(e.gameEvent,"name")},async e=>{await fi(),bi(e.gameEventStory,"description")}]],[["userMissions"],[async e=>{var t;await fi(),null===(t=e.eventUserMissions)||void 0===t||t.forEach(e=>{bi(null==e?void 0:e.gameEvent,"name")})}]],[["characterPresentSpecialCommunicationEvents/{num}/top"],[async e=>{var t;await fi(),null===(t=e.characterPresentSpecialCommunications)||void 0===t||t.forEach(e=>{var t;bi(e,"title"),e.title.startsWith("​")&&(e.title=e.title.replace("】","】​")),null===(t=e.specialCommunicationReleaseConditions)||void 0===t||t.forEach(e=>{var t,r;bi(null==e?void 0:e.content,"name"),(null==e||null===(t=e.content)||void 0===t||null===(r=t.name)||void 0===r?void 0:r.startsWith("​"))&&(e.content.name=e.content.name.replace("】 ","】​"))})})}]],[["userProduceSupportIdols/{num}","userProduceTeachingSupportIdols/{num}"],async e=>{(null==e?void 0:e.userSupportIdol)&&await Ii(e.userSupportIdol)}],[["userProduceIdols/{num}","userProduceTeachingIdol"],async e=>{(null==e?void 0:e.userIdol)&&await Si(e.userIdol)}]]),Nr.post([["characterAlbums/characters/{num}",async e=>{await fi();const t=await gi();e.firstName=t.get(e.firstName),e.albumCommunicationTitles.forEach(e=>{bi(e,"title")}),e.communications.forEach(e=>{bi(e,"title"),Ei(e.communicationId,e.title)}),e.voices.forEach(e=>{bi(e,"title"),bi(e,"releasedConditionComment")})}],["produceMarathons/{num}/top",async e=>{await fi(),e.releasedCommunications.forEach(e=>{bi(e,"name"),bi(e,"title"),Ei(e.id,`${e.name}-${e.title}`)}),bi(e.gameEvent,"name")}]]),Nr.patch([["userIdols/{num}/actions/evolve",async e=>{var t;await fi(),null==e||null===(t=e.idolEvolutionRewards)||void 0===t||t.filter(e=>"mypage_comment"==e.contentType).forEach(e=>bi(null==e?void 0:e.content,"voiceName"))}]]);const _i=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)))}},xi=e=>{e&&(bi(e,"title"),Ei(e.id,e.title))},Ti=async e=>{var t,r;await fi(),null===(t=e.produceEvents)||void 0===t||t.forEach(xi),null===(r=e.produceConcertEvents)||void 0===r||r.forEach(xi)};Nr.get([["tutorialProduces/actions/resume",Ti]]),Nr.post([["myPage",async e=>{var t,r;await fi(),bi(null==e||null===(t=e.userProduce)||void 0===t?void 0:t.produce,"title"),bi(null==e||null===(r=e.userProduce)||void 0===r?void 0:r.produceDifficulty,"name")}],["produces/actions/(resume|next)",[Ti,_i]],["produces/actions/finish",_i],[["produces/actions/finish","produces/actions/act","produceTeachings/resume","produces/{num}/audition/actions/finish","tutorialProduces/actions/next","produceTeachings/next","produceTeachings/act"],Ti],["produces/actions/result",async e=>{await fi(),xi(e.produceAfterEvent)}],["produces/({num}/audition|concert)/actions/(start|finish)",_i]]);const Ci=async(e,t="comment")=>{if(!e)return;await Cs(e,"autoTransText",!0)},Ai=async e=>{try{if(e.produceAudition){let t="produceAudition";await Cs(e.produceAudition.judges,t,!0)}if(e.produceConcert){let t="produceAudition";await Cs(e.produceConcert.judges,t,!0)}e.produceConcertFanSkillComments&&await Ci(e.produceConcertFanSkillComments,"comment1")}catch(e){W(e)}},Mi=async e=>{if(e.judges){let t="fesMatchConcert";await Cs(e.judges,t,!0)}},ji=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){W(e)}},Pi=async e=>{let t=[...e.produceStaffComments||[],...e.produceStaffConcertComments||[],...e.produceStaffFailComments||[],...e.produceStaffSeasonComments||[]];await Ci(t)},Ri=async e=>{if(e.gameData)try{let t=JSON.parse(e.gameData);t.judges?await Mi(t):await Ai(t),e.gameData=JSON.stringify(t)}catch(e){W(e)}},Fi=async e=>{if(e.gameState&&e.gameState.game_data)try{let t=JSON.parse(e.gameState.game_data);t.judges&&await Mi(t),e.gameState.game_data=JSON.stringify(t)}catch(e){W(e)}},Oi=async e=>{if(!e.characterComment)return;let t=[];t=t.concat(e.characterComment),await Ci(t)},Di=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 Cs(t,"FesTower",!1)}catch(e){W(e)}};Nr.get([["userProduces",ji],["fes(Match)?Concert/actions/resume",Ri]]),Nr.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 fi(),e.forEach(e=>{bi(e,t)})})(t,"speakerName")}catch(e){W(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){W(e)}}],["produces/actions/(resume|next)",[ji,Pi,Ri,Oi,Ai,async e=>{try{var t;await Ci(null===(t=e.produceReporterEvent)||void 0===t?void 0:t.produceReporterEventAnswers,"comment2")}catch(e){W(e)}}]],["produces/actions/endWeek",Pi],[["produces/actions/act","produceTeachings/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){W(e)}}],["fes(Match|Raid)?Concert/actions/start",Mi],["fes(Match)?Concert/actions/resume",Ri],["fesRaidConcert/actions/resume",Fi],["fesTowerConcert/actions/start",Mi],["fesTowerConcert/actions/resume",Fi],["produces/actions/result",async e=>{try{let t=e.characterTrustLevelUpComments;await Ci(t)}catch(e){W(e)}}],["userFesTowerPanels/{num}/random",Di],["userFesTowerPanels/{num}/random/actions/choice",async e=>{if(e)try{let t=[];e.fesTowerPanelRandomEffect.resultText&&t.push(e.fesTowerPanelRandomEffect),await Cs(t,"FesTower",!1)}catch(e){W(e)}}],["userFesTowerAreas/{num}",async e=>{var t;e&&(null===(t=e.userFesTowerStages)||void 0===t||t.forEach(e=>{e.userFesTowerPanelHistory&&e.userFesTowerPanelHistory.userFesTowerRandomPanelHistory&&Di(e.userFesTowerPanelHistory.userFesTowerRandomPanelHistory)}))}],["produces/({num}/audition|concert)/actions/(start|finish)",[Ai,Oi]],["userProduceHelperSupportIdols",async e=>{try{let t="helperSupportIdols";await Cs([e],t,!0)}catch(e){W(e)}}],["fesTowerEvents/top",async e=>{if(e.userFesTowerEventTopIdols)try{let t=[];e.userFesTowerEventTopIdols.forEach(e=>{t.push(e.fesTowerEventTopCharacterReaction)}),await Ci(t)}catch(e){W(e)}}],["produces/concert/actions/start",async e=>{var t,r,n,o;let s=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;s&&await Ci([s])}]]);const{api:Ni,transItem:Bi}=cn("etc/idol-filter");Ni.get([["searchPopupContents",e=>{var t,r,n,o;null===(t=e.businesses)||void 0===t||t.forEach(e=>{Bi(e,"name")}),null===(r=e.units)||void 0===r||r.forEach(e=>{Bi(e,"name")}),null===(n=e.produces)||void 0===n||n.forEach(e=>{Bi(e,"title")}),null===(o=e.characters)||void 0===o||o.forEach(e=>{Bi(e,"name"),Bi(e,"firstName"),Bi(e.unit,"name")}),(e=>{["activeSkills","ideas","idolArrivalTypes","knowHowBooks","supportSkillAttributes","supportSkillEffects","fightSkills"].forEach(t=>{var r;null===(r=e[t])||void 0===r||r.forEach(e=>{Bi(e,"label")})})})(e)}]]);const{api:Li,transItem:zi}=cn("etc/help-title");Li.get([["help",e=>{e&&e.forEach(e=>{var t;zi(e,"title"),null===(t=e.helpSubGroups)||void 0===t||t.forEach(e=>{zi(e,"title")})})}]]);Nr.get("gashas/{num}/redraws",async e=>{const t=[];e.forEach(e=>{e.comment&&t.push(e.comment)}),await Ci(t)}),Nr.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)}],["gashas/{num}/actions/purchase",async e=>{let t=[];e.forEach(e=>{e.comment&&t.push(e.comment)}),await Ci(t)}]]);Nr.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 $i=new Map;let Ui=!1;const Hi=["nameKana","unit","age","bloodType","birthday","starSign","height","weight","figure","arm","place","hobby","specialty","cv"],Wi=async()=>{if(!Ui){(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("|");$i.set(r,new Map(Hi.map((t,r)=>[t,e(z(n[r]))])))}else{for(let r in t)t[r]=e($(t[r]));$i.set(r,t)}}}),Ui=!0}return $i},Ji=async(t,r=!1)=>{const n=await sn(!0,r);n.has(t.name)&&(t.name=e(n.get(t.name))),n.has(t.firstName)&&(t.firstName=e(n.get(t.firstName)))},qi=async e=>{if(!e)return;const t=(await Wi()).get(e.id);for(let r in t){if("age"===r){if("academic_year"!==e.ageType||!e.age)continue;e.age=t.age}"id"!==r&&e[r]&&("unit"===r?e.unit.name=t[r]:e[r]=t[r])}},Gi=async e=>{e.beginnerMissionUnits&&e.beginnerMissionUnits.forEach(e=>{e.idols.forEach(e=>{qi(e.idol.character)})}),e.units&&e.units.forEach(e=>{e.idols.forEach(e=>{qi(e.character),Ji(e.character)})})};Nr.post("characterAlbums/characters/{num}",async e=>{await qi(e)}),Nr.get(["userIdols/{num}","userIdols/statusMax","produceTeachingIdols/{num}"],async e=>{const t=e.idol.character;await qi(t)}),Nr.get("userProduceTeachingIdol",async e=>{var t,r;qi(null==e||null===(t=e.userIdol)||void 0===t||null===(r=t.idol)||void 0===r?void 0:r.character)}),Nr.get("userProduceTeachingSupportIdols/{num}",async e=>{var t,r;qi(null==e||null===(t=e.userSupportIdol)||void 0===t||null===(r=t.supportIdol)||void 0===r?void 0:r.character)}),Nr.get(["userSupportIdols/{num}","userSupportIdols/statusMax","produceTeachingSupportIdols/{num}"],async e=>{const t=e.supportIdol.character;await qi(t)}),Nr.get("userFesIdols/{num}",async e=>{const t=e.userFesIdol.idol.character;await qi(t),await Ji(t)}),Nr.get("userBeginnerMissions/top",Gi),Nr.get("tutorialIdols",Gi),Nr.get("gameTop",async e=>{null==e||e.mypageCommunicationSettings.forEach(e=>{var t;null==e||null===(t=e.userMypageCommunicationSettings)||void 0===t||t.forEach(e=>{Ji(null==e?void 0:e.character)})})}),Nr.get("characterPresentSpecialCommunicationEvents/{num}/top",async e=>{e.characterPresentSpecialCommunications.forEach(e=>{Ji(e.character,!0)})}),Nr.post("myPage",async e=>{e.producerBirthdayCommuCharacters.forEach(e=>{Ji(e)})});const Yi=new Map;let Ki=!1;let Xi=null;const Vi=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}],["TEXTPLAYER",e=>{var t,r;return(null==e||null===(t=e.default)||void 0===t||null===(r=t.prototype)||void 0===r?void 0:r.play)&&e.default.prototype.showAll}],["WEBP",e=>{var t;return null==e||null===(t=e.default)||void 0===t?void 0:t.isSupportedWebP}]]),Qi=new Map([["AOBA",e=>e],["SCENARIO",e=>e.default],["PHRASE",e=>e.default._polyglot.phrases],["ENCRYPT",e=>e.default],["TEXTPLAYER",e=>e.default],["WEBP",e=>e.default]]),Zi=Object.freeze;Object.freeze=new Proxy(Zi,{apply:(e,t,[r])=>r});const ea=/^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}$/,ta=Function.prototype.call;let ra={Reflect:window.Reflect};Function.prototype.call=new Proxy(ta,{apply(e,t,r){var n;return(null==r||null===(n=r[3])||void 0===n?void 0:n.toString)&&ea.test(r[3].toString())&&(Xi=r[3],Function.prototype.call=ta),ra.Reflect.apply(e,t,r)}});const na=async e=>{const{moduleId:t}=await Wr;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=Xi(o[e])}catch(e){}if(t(s)){r=s,n=o[e];break}}return[r,n]})(t[e],Vi.get(e));return r?Qi.get(e)(r):null};let oa=null,sa=[];(window.unsafeWindow||window).printUnknownPhrases=()=>W(qr.unparse(sa));const ia=["concert.skill.betweenString","concert.skill.appealString"];async function aa(){const t=await na("PHRASE");if(t){0,oa=await(async(e=!1)=>{if(!Ki){(await Zr("phrase")).forEach(t=>{if(null==t?void 0:t.id){const r=$(t.id),n=$(t.trans,!0);r&&(e?Yi.set(r,t.trans):n&&Yi.set(r,n))}}),Ki=!0}return Yi})();for(let[r,n]of oa)t[r]=ia.includes(r)?n:e(n)}}let ca=!1,la=null;const ua=en({name:"common"});let da=new Map,pa=new Map;const ha=[],fa=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))},ma=(e,t,r)=>{let n=e,o=H(e);return t.has(o)?(n="​"+t.get(o),fa(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},va=(e,t,r=!1)=>{if(!y(e))return e;let n=e;return e.startsWith("​")?fa(t):e.trim()&&(r?(n=ma(e,pa,t),n===e&&(e=>{ha.push(e),C.dev,setTimeout(()=>ha.shift(),1e4)})(e)):(e=>{let t=!1;return ha.forEach(r=>{r.startsWith(e)&&(t=!0)}),t})(e)||e.startsWith("‌")||(n=ma(e,da,t))),n};async function ga(){const t=await na("AOBA");try{da=await(async()=>{if(!ca){la=await ua();const e=await sn();la=new Map([...e,...la]),ca=!0}return la})(),pa=await ns()}catch(e){}const r=t.Text.prototype.typeText;t.Text.prototype.typeText=function(...e){const t=e[0];return e[0]=va(t,this.style,!0),r.apply(this,e)};const n=t.Text.prototype.updateText;t.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=va(this._text,this._style);return Reflect.set(this,"_text",t),n.call(this,e)}};const o=await na("TEXTPLAYER");if(o){const t=o.prototype.play;o.prototype.play=function(r,...n){if(C.dev,!r.startsWith("​")){let t=H(r),n=da.get(t);n&&(r=e(n))}t.call(this,r,...n)}}}const ya=new Map;let wa=!1;const Ea=new Map;let ba=!1;let ka=null;let Sa=null;const Ia=()=>Sa||(Sa=(async()=>{if(ka)return ka;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();ka=new Map(t)}catch(e){ka=new Map}return ka})(),Sa);Nr.get([[["comics"],async t=>{await Ia(),t.comics.forEach(t=>{const r=parseInt(t.id);if(ka.has(r)){const n=ka.get(r).title;n&&(t.title=e(n))}})}]]);let _a=null;const xa=async()=>(_a||(_a=(async()=>{if(!wa){(await Zr("image")).forEach(e=>{if(null==e?void 0:e.name){const t=z(e.name),r=z(e.url),n=z(e.version)||"1";t&&r&&ya.set(t,{url:r,version:n})}}),wa=!0}return ya})()),await _a);let Ta=null;const Ca=async()=>(Ta||(Ta=(async()=>{if(!ba){(await Zr("file-replace")).forEach(e=>{if(null==e?void 0:e.name){const t=z(e.name),r=z(e.url),n=z(e.version)||"1";t&&r&&Ea.set(t,{url:r,version:n})}}),ba=!0}return Ea})()),await Ta);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 Ma=!1;async function ja(){const e=await na("AOBA"),t=await na("ENCRYPT"),{isSupportedWebP:r,toWebPUrl:n}=await na("WEBP");if(Ma)return;const o=e.loaders.Resource.prototype._loadElement,s=async function(e){C.dev&&"image"===e&&Aa&&this.url.includes(Aa)&&(J("%c조회한 이미지:","color:#66ccff"),J(this.url,this.name));try{const t=await xa();if("image"===e){if(t.has(this.name)){const e=t.get(this.name);if(this.url.endsWith("v="+e.version)){let t="image/"+e.url;if(r()&&!t.startsWith("tips/")&&C.hashes[t]){let e=n(t);C.hashes[e]&&(t=e)}this.url=`${C.origin}/data/${t}?v=${C.hashes[t]}`,this.crossOrigin=!0}else W("%cimage version not match","color:#fc4175"),W(this.name,this.url)}else"image"===e&&this.originUrl.includes("idols/name")&&(W("%cidol name display!!","color:#fc4175"),W(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 Ia(),ka.has(t)&&(e.url="https://newbiepr.gitlab.io/shinymaskr.gitlab.io/data/image/comics/4ko/"+ka.get(t).name,e.crossOrigin=!0)}}(this)}}catch(e){W("Error during image substitution: ",e)}return o.call(this,e)},i=e.loaders.Resource.prototype._loadXhr,a=async function(){if(t)try{const e=await Ca();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 W("%cfile version not match","color:#fc4175"),W(this.name,this.url)}}catch(e){W("Error during file substitution: ",e)}return i.call(this)},c=new TextDecoder,l=e.loaders.Resource.prototype._xhrOnLoad,u=async function(){if(t)try{this.TYPE={UNKNOWN:0,JSON:1,XML:2,IMAGE:3,AUDIO:4,VIDEO:5,TEXT:6};const e=await Ca();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=c.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){W("Exception in xhrOnLoad: ",e)}l.call(this)};if(t){const e=t.decryptResource,r=function(t){return"string"==typeof t?t:e(t)};t.decryptResource=r}const d=new Proxy(e.loaders.Resource,{construct(e,t,r){var n=Reflect.construct(e,t,r);return new Proxy(n,{get:(e,t,r)=>"_loadElement"==t?s:"_loadXhr"==t?a:"_boundXhrOnLoad"==t?u.bind(e):Reflect.get(e,t,r)})},get:(e,t,r)=>Reflect.get(e,t,r)});Object.defineProperty(e.loaders,"Resource",{value:d}),Ma=!0}var Pa=function(){return s.Date.now()},Ra=/\s/;var Fa=function(e){for(var t=e.length;t--&&Ra.test(e.charAt(t)););return t},Oa=/^\s+/;var Da=function(e){return e?e.slice(0,Fa(e)+1).replace(Oa,""):e};var Na=function(e){return"symbol"==typeof e||g(e)&&"[object Symbol]"==m(e)},Ba=/^[-+]0x[0-9a-f]+$/i,La=/^0b[01]+$/i,za=/^0o[0-7]+$/i,$a=parseInt;var Ua=function(e){if("number"==typeof e)return e;if(Na(e))return NaN;if(pe(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=pe(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Da(e);var r=La.test(e);return r||za.test(e)?$a(e.slice(2),r?2:8):Ba.test(e)?NaN:+e},Ha=Math.max,Wa=Math.min;var Ja=function(e,t,r){var n,o,s,i,a,c,l=0,u=!1,d=!1,p=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function h(t){var r=n,s=o;return n=o=void 0,l=t,i=e.apply(s,r)}function f(e){return l=e,a=setTimeout(v,t),u?h(e):i}function m(e){var r=e-c;return void 0===c||r>=t||r<0||d&&e-l>=s}function v(){var e=Pa();if(m(e))return g(e);a=setTimeout(v,function(e){var r=t-(e-c);return d?Wa(r,s-(e-l)):r}(e))}function g(e){return a=void 0,p&&n?h(e):(n=o=void 0,i)}function y(){var e=Pa(),r=m(e);if(n=arguments,o=this,c=e,r){if(void 0===a)return f(c);if(d)return clearTimeout(a),a=setTimeout(v,t),h(c)}return void 0===a&&(a=setTimeout(v,t)),i}return t=Ua(t)||0,pe(r)&&(u=!!r.leading,s=(d="maxWait"in r)?Ha(Ua(r.maxWait)||0,t):s,p="trailing"in r?!!r.trailing:p),y.cancel=function(){void 0!==a&&clearTimeout(a),l=0,n=c=o=a=void 0},y.flush=function(){return void 0===a?i:g(Pa())},y};const qa=`\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 Ga=!1;const Ya=e=>{if(Ga)return;Ga=!0,document.body.insertAdjacentHTML("beforeend",qa);const t=document.getElementById("sczh-story-tool"),r=Ja(()=>{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",O()}));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=Qo(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()},Ka=new Map;let Xa=!1;let Va=null,Qa=new Map;const Za=async()=>(Va||(Va=(async()=>{if(an)return an;const e=await rn(),t=await sn();return an=new Map([...e,...t]),an})(),Qa=(await(async()=>{if(!Xa){(await Zr("speaker-icon")).forEach(e=>{let{name:t,id:r,type:n}=e;t=z(t),r=z(r),n=z(n),t&&r&&Ka.set(r,t)}),Xa=!0}return{iconMap:Ka}})()).iconMap),await Va);let ec=!1,tc=!1;const rc=(e,t)=>{var r,n,o,s,i,a,c,l,u,d,p,h;return(!ec||!tc)&&("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("灯織"))?(ec=!0,null===(u=e[0])||void 0===u||null===(d=u["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===(l=c[901])||void 0===l?void 0:l.includes("はづき"))?(tc=!0,null===(p=e[0])||void 0===p||null===(h=p[901])||void 0===h?void 0:h.includes("はづき")):void 0)},nc=Object.keys;Object.keys=new Proxy(nc,{apply(t,r,n){if(rc(n,"idol")||rc(n,"staff"))for(let[t,r]of Qa){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 oc=(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},sc=async t=>{if(t.speaker){const r=await Za();let n=z(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]=oc(n[e],r);return n.join(t)})(n,e,r)}),n!==t.speaker&&(t.speaker=e(n))}},ic={name:"",filename:"",list:"",preview:new Map};let ac=!1;const cc=async()=>{const t=await na("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=wi.get(n)||r.replace(/\//g,"_");o=o.replace("​","");const s=[];e.forEach(e=>{let t=z(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:z(q(e.select)),trans:""})}),s.push({id:"info",name:t,text:"",trans:""}),s.push({id:"번역자",name:"",text:"",trans:""}),ic.name=t,ic.filename=o+".csv",ic.list=s})(n,t),Ya(ic)),(()=>{if(ac)return;ac=!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));ic.preview=r}catch(e){W(e)}})(),r=ic.preview.has(t)?ic.preview.get(t):await(async e=>{if(!Vo){let e=await Xr("story.json");if(e)Vo=new Map(JSON.parse(e));else{const e=await Jr("/story.json");Vo=new Map(e),Vr("story.json",JSON.stringify(Vo))}}if(Vo.has(e)){if(Yo.has(e))return Yo.get(e);{const t=Vo.get(e),r=await Jr(`/data/story/${t}.csv`),n=Qo(r);return Yo.set(e,n),n}}return!1})(t),r){((t,r,n)=>{const o=Y();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 Zo())}else await Cs(n,t,!1);for(let e of n)await sc(e)}catch(e){W(e)}return n}},lc=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)},uc=(e,t)=>`/data/font/${e}.woff2?v=${t[`font/${e}.woff2`]}`,dc=async()=>{const e=document.createElement("style"),{hashes:t}=await Wr;e.innerHTML=`\n  @font-face {\n    font-family: "sczh-heiti";\n    src: url("${C.origin}${uc("heiti",t)}");\n  }\n  @font-face {\n    font-family: "sczh-yuanti";\n    src: url("${C.origin}${uc("heiti",t)}");\n  }\n  ::-webkit-scrollbar {\n    display: none;\n  }\n  `,"yuanti"===C.font1&&lc(`${C.origin}${uc("heiti",t)}`),"heiti"===C.font2&&lc(`${C.origin}${uc("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 pc=0;const hc=async()=>{var e;Xi||pc>=300?(async()=>{try{await Promise.all([ja(),dc(),aa(),ga(),cc()])}catch(e){W(e)}})():(await(e=100,new Promise(t=>{setTimeout(t,e)})),pc++,pc%10==0&&W(`Waiting: ${pc/10}s`),await hc())};"loading"!=document.readyState?hc():window.unsafeWindow?window.unsafeWindow.addEventListener("DOMContentLoaded",hc):window.addEventListener("DOMContentLoaded",hc)}();