EF2 Changelog

Builds / 1.11.75

Update 1.11.75

Compared with 1.11.74 · published Fri, 03 Jul 2026 02:00:30 GMT · live channel

No summary yet.

Code 67 changes in 37 classes

Minified client code with short names blanked for diffing. Class names are real.

ViewMain 4 hunks, 2298 statements
- const Z5=class{
+ const A4=class t extends Be{
- zt(this,"kindNum",0),zt(this,"wave",0),zt(this,"order",0),zt(this,"position",1),zt(this,"text",""),zt(this,"code",""),zt(this,"maxWave",-1),zt(this,"repeat",9999)}
- getTextKey(){
- return`DIALOGUE_TEXT_${
- this.kindNum}
- `}
- }
- ;
- Kt(Z5,"DialogueVO");
- let t3=Z5;
- const i3=class t{
- constructor(){
- zt(this,"list",[]),zt(this,"waveMap",new Map),zt(this,"playCount",{
- }
- ),zt(this,"playCountLoaded",!1)}
+ super(),zt(this,"_currentView",null),zt(this,"container",new Be),zt(this,"bg"),zt(this,"onLanguageChangeBind"),this.bg=new CM({
+ texture:ZA.getTexture("UI_Ekkorr","UI_Toast_Bg"),leftWidth:8,topHeight:8,rightWidth:8,bottomHeight:8}
+ ),this.addChild(this.bg),this.bg.width=640,this.bg.height=KA.viewMainHeight,this.container.y=40,this.addChild(this.container),UV.getInstance().y=-1,this.addChild(UV.getInstance()),E4.getInstance().y=-20,this.addChild(E4.getInstance()),this.setLanguageChange(!0)}
- setBookData(t){
- if(this.list=[],this.waveMap.clear(),t){
- for(let i=0;
- i<t.length;
- i++){
- const s=t[i],e=new t3;
- e.kindNum=Number(s.kindNum),e.wave=Number(s.wave),e.order=Number(s.order),e.position=Number(s.position)||1,e.text=s.text??"",e.code=s.code??"",e.maxWave=Number(s.maxWave)||-1,e.repeat=Number(s.repeat)||9999,this.list.push(e);
- let n=this.waveMap.get(e.wave);
- n||(n=[],this.waveMap.set(e.wave,n)),n.push(e)}
- for(const t of this.waveMap.values())t.sort((t,i)=>t.order-i.order);
- this.loadPlayCount()}
- }
- async loadPlayCount(){
- if(this.playCountLoaded)return;
- const i=await $A.getData(t.LOCAL_KEY);
- this.playCount=i??{
- }
- ,this.playCountLoaded=!0}
- savePlayCount(){
- $A.saveData(t.LOCAL_KEY,this.playCount)}
- async getByWaveAsync(t){
- return await this.loadPlayCount(),this.getByWave(t)}
- getByWave(t){
- const i=this.waveMap.get(t)??[],s=_L.maxWave,e=[];
- let n=!1;
- for(const h of i)if(!(h.maxWave>0&&s<h.maxWave)){
- if(h.repeat<999){
- const t=this.playCount[h.kindNum]??0;
- if(t>=h.repeat)continue;
- this.playCount[h.kindNum]=t+1,n=!0}
- e.push(h)}
- return n&&this.savePlayCount(),e}
- hasDialogue(t){
- return this.waveMap.has(t)}
+ setExpandedMode(i){
+ i?(this.y=t.EXPANDED_Y,this.bg.height=KA.safeHeight-t.EXPANDED_Y-KA.BOTTOM_MENU_H):(this.y=KA.viewMainY,this.bg.height=KA.viewMainHeight)}
+ static getExpandedListHeight(){
+ return KA.safeHeight-t.EXPANDED_Y-KA.BOTTOM_MENU_H-KA.SUB_MENU_H-KA.RESOURCE_INFO_H}
+ get currentView(){
+ return this._currentView}
+ set currentView(t){
+ null!=this._currentView&&this.container.removeChild(this._currentView),this._currentView=t,null!=this._currentView&&(this.container.addChild(this._currentView),this._currentView.x=0,this._currentView.y=0,F3.showItemsInVertical([this._currentView],20,.3))}
+ setLanguageChange(t){
+ lS.getInstance().removeEventListener("LanguageChange",this.onLanguageChangeBind),t&&(this.onLanguageChangeBind=this.onLanguageChange.bind(this),lS.getInstance().addEventListener("LanguageChange",this.onLanguageChangeBind))}
+ onLanguageChange(t=null){
+ this._currentView&&this._currentView.updateLanguage()}
- Kt(i3,"DialogueDataManager"),zt(i3,"instance"),zt(i3,"LOCAL_KEY",$A.KEY_DIALOGUE_COUNT);
- let s3=i3;
- const e3=class extends tG{
- constructor(t,i=150,s=30){
- super(t,i,s),this.color=QL.RED}
- }
- ;
- Kt(e3,"CommonRedButton");
- let n3=e3;
- const h3=class t extends aG{
- constructor(){
- super(),zt(this,"lblMessage",new YD("",aD.DEFAULT_COLOR,aD.DEFAULT_FONT_OPTION_17)),zt(this,"btnConfirm",new sG("확인")),zt(this,"btnCancel",new n3("취소")),zt(this,"onConfirm",null),zt(this,"onCancel",null),zt(this,"textAlignCenter",!1),this.title="",this.lblMessage.y=90,this.contentContainer.addChild(this.lblMessage,this.btnConfirm,this.btnCancel),this.btnConfirm.onClick=this.onConfirmClick.bind(this),this.btnCancel.onClick=this.onCancelClick.bind(this),this.btnClose.onClick=this.onCancelClick.bind(this),aD.setLabelWrapWidth(this.lblMessage,this.width-60)}
- static getInstance(){
- return this._instance||(this._instance=new t),this._instance}
- onConfirmClick(){
- this.hide();
- let t=this.onConfirm;
- this.onConfirm=null,null!==t&&t()}
- onCancelClick(){
- this.hide();
- let t=this.onCancel;
- this.onCancel=null,null!==t&&t()}
- show(t,i=null,s=null){
- this.onConfirm=i,this.onCancel=s,this.lblMessage.text=t,this.btnConfirm.text=AG.getText("COMMON_1","확인"),this.btnCancel.text=AG.getText("COMMON_2","취소"),this.updateLayout(),super.show()}
- hide(){
- super.hide(),this.title="",this.textAlignCenter=!1}
- updateLayout(){
- if(this.lblMessage.x=.5*(this.width-this.lblMessage.width),this.btnConfirm.x=.5*(this.width-this.btnConfirm.width-this.btnCancel.width-20),this.btnCancel.x=this.btnConfirm.x+this.btnConfirm.width+20,this.btnConfirm.y=this.lblMessage.y+this.lblMessage.height+30,this.btnCancel.y=this.btnConfirm.y,this.height=this.btnConfirm.y+this.btnConfirm.height+40,this.textAlignCenter){
- let t=this.lblMessage.getStyle();
- t.align="center",this.lblMessage.setStyle(t)}
- else{
- let t=this.lblMessage.getStyle();
- t.align="left",this.lblMessage.setStyle(t)}
- }
- getDefaultPositionY(){
- return.3*KA.stageHeight}
- onBackButton(){
- return this.onCancelClick(),!0}
- }
- ;
- Kt(h3,"CommonConfirmPopup"),zt(h3,"_instance");
- let r3=h3;
- const o3=Object.freeze(Object.defineProperty({
- __proto__:null,CommonConfirmPopup:r3}
- ,Symbol.toStringTag,{
- value:"Module"}
- )),a3=class extends Be{
- constructor(){
- super(),zt(this,"icon",new We),zt(this,"bg",new We),zt(this,"cover",new We),zt(this,"star",new We),zt(this,"posList",[30,26,24,19,16,13,9]),this.bg.x=3,this.bg.y=3,this.addChild(this.bg),this.icon.x=3,this.icon.y=3,this.addChild(this.icon),this.cover.x=0,this.cover.y=0,this.addChild(this.cover),this.addChild(this.star),this.setEmpty()}
- setEmpty(){
- this.bg.texture=ZA.getTexture("UI_PET","HeroFrame_1_Bg"),this.cover.texture=ZA.getTexture("UI_PET","HeroFrame_1"),this.icon.visible=!1,this.star.visible=!1}
- setPet(t,i){
- this.icon.visible=!0,this.star.visible=!0,this.icon.alpha=1,this.icon.tint=16777215,this.icon.texture=ZA.getTexture("UI_PET",`UI_PET${
- t}
- `),this.icon.width=this.icon.height=this.cover.width-6,this.icon.x=3,this.icon.y=2;
- const s=Math.max(1,Math.min(i,5));
- this.star.texture=ZA.getTextures("UI_PET","UI_UNIT_RARE")[s-1],this.star.x=this.posList[s-1],this.star.y=this.bg.height-this.star.height,this.bg.texture=ZA.getTexture("UI_PET",`HeroFrame_${
- s}
- _Bg`),this.cover.texture=ZA.getTexture("UI_PET",`HeroFrame_${
- s}
- `)}
- setInactive(t){
- this.icon.visible=!0,this.star.visible=!1,this.icon.texture=ZA.getTexture("UI_PET",`UI_PET${
- t}
- `),this.icon.width=this.icon.height=this.cover.width-6,this.icon.x=3,this.icon.y=2,this.icon.alpha=.9,this.icon.tint=11184810,this.bg.texture=ZA.getTexture("UI_PET","HeroFrame_1_Bg"),this.cover.texture=ZA.getTexture("UI_PET","HeroFrame_1")}
- get width(){
- return this.bg.width}
- get height(){
- return this.bg.height}
- showStar(){
- this.star.visible=!0}
- hideStar(){
- this.star.visible=!1}
- }
- ;
- Kt(a3,"PetIcon");
- let c3=a3;
- var l3=(t=>(t[t.ROSTER=0]="ROSTER",t[t.HERO_LIST=1]="HERO_LIST",t[t.HERO_DETAIL=2]="HERO_DETAIL",t[t.BOOK=3]="BOOK",t[t.SHOP=4]="SHOP",t[t.HERO_PVP=5]="HERO_PVP",t[t.TOWER=6]="TOWER",t[t.TOWER_TEAM=7]="TOWER_TEAM",t))(l3||{
- }
- );
- const u3=class extends Be{
- constructor(){
- super(),zt(this,"icon",new We(ZA.getTexture("UI_Ekkorr","Hero1"))),zt(this,"lblLevel",new YD("Lv.1",16777215,aD.DEFAULT_OUTLINE_FONT_OPTION_18)),zt(this,"lblEnhance",new YD("+1",16777215,aD.DEFAULT_OUTLINE_FONT_OPTION_18)),zt(this,"lblCount",new YD("1",16777215,aD.DEFAULT_OUTLINE_FONT_OPTION_24)),zt(this,"bg",new We(ZA.getTexture("UI_Ekkorr","HeroFrame1"))),zt(this,"cover",new We(ZA.getTexture("UI_Ekkorr","HeroCover1"))),zt(this,"mode",l3.HERO_LIST),zt(this,"trans",new We(ZA.getTexture("UI_Ekkorr","Trans0001"))),zt(this,"_active",!1),this.addChild(this.bg),this.addChild(this.icon),this.addChild(this.cover),this.addChild(this.lblLevel),this.addChild(this.lblEnhance),this.addChild(this.lblCount),this.addChild(this.trans),this.bg.scale.x=.88,this.cover.scale.x=.88,this.icon.height=this.bg.height-4,this.icon.scale.x=this.icon.scale.y,this.icon.x=1,this.icon.y=2,this.lblLevel.textColor=16777215,this.lblLevel.x=(this.icon.width-this.lblLevel.width)/2,this.lblLevel.y=this.bg.height-this.lblLevel.height-1,this.lblCount.textColor=16777215,this.lblCount.x=this.bg.width-this.lblCount.width-38,this.lblCount.y=this.bg.height-this.lblCount.height,this.lblCount.visible=!1,this.lblEnhance.x=this.bg.width-this.lblEnhance.width-2,this.lblEnhance.y=7,this.trans.scale=1.2,this.trans.x=5,this.trans.y=7,this.trans.visible=!1}
- setData(t){
- this.setTextures(t.base,t.grade);
- const i=MV.getInstance().getMaxLevel(t.grade,t.trans);
- this.lblLevel.text=`Lv.${
- t.level}
- `,this.lblLevel.textColor=t.level>=i?16763904:16777215,this.lblEnhance.text=`+${
- t.enhance}
- `,this.lblEnhance.x=this.bg.width-this.lblEnhance.width-30,this.lblLevel.x=(this.bg.width-15-this.lblLevel.width)/2,t.trans>0?(this.trans.visible=!0,this.trans.texture=ZA.getTexture("UI_Ekkorr",`Trans000${
- t.trans}
- `)):this.trans.visible=!1,this.mode===l3.HERO_LIST?(this.lblEnhance.visible=t.enhance>0,this.lblLevel.visible=!0,this.lblCount.visible=!1):this.mode===l3.ROSTER?(this.lblEnhance.visible=!1,this.lblLevel.visible=!1,this.lblCount.visible=!0):this.mode===l3.BOOK||this.mode===l3.SHOP?(this.lblEnhance.visible=!1,this.lblLevel.visible=!1,this.lblCount.visible=!1):this.mode===l3.HERO_PVP?(this.lblEnhance.visible=!1,this.lblLevel.visible=!0,this.lblCount.visible=!1):this.mode===l3.TOWER?(this.lblEnhance.visible=!1,this.lblLevel.visible=!1,this.lblCount.visible=!0,this.trans.visible=!1):this.mode===l3.TOWER_TEAM&&(this.lblEnhance.visible=!1,this.lblLevel.visible=!1,this.lblCount.visible=!1,this.trans.visible=!1)}
- setTextures(t,i){
- t>0?(this.icon.visible=!0,this.icon.texture=ZA.getTexture("UI_Ekkorr",`Hero${
- t}
- `)):this.icon.visible=!1,this.bg.texture=ZA.getTexture("UI_Ekkorr",`HeroFrame${
- i}
- `),this.cover.texture=ZA.getTexture("UI_Ekkorr",`HeroCover${
- i}
- `)}
- setMode(t){
- this.mode=t}
- setNumber(t){
- this.lblCount.text=t.toString()}
- get active(){
- return this._active}
- set active(t){
- this._active=t,t?(this.bg.tint=16777215,this.cover.tint=16777215,this.icon.tint=16777215,this.trans.tint=16777215,this.lblCount.textColor=16777215):(this.bg.tint=3355443,this.cover.tint=3355443,this.icon.tint=3355443,this.trans.tint=3355443,this.lblCount.textColor=3355443)}
- showBackground(){
- this.bg.visible=!0}
- hideBackground(){
- this.bg.visible=!1}
- showIcon(){
- this.icon.visible=!0}
- hideIcon(){
- this.icon.visible=!1}
- showLevel(){
- this.lblLevel.visible=!0}
- hideLevel(){
- this.lblLevel.visible=!1}
- showEnhance(){
- this.lblEnhance.visible=!0}
- hideEnhance(){
- this.lblEnhance.visible=!1}
- setCountText(t){
- this.lblCount.text=t,this.lblCount.visible=!0,this.lblCount.x=(this.bg.width-15-this.lblCount.width)/2}
- hideTrans(){
- this.trans.visible=!1}
- setTransAlpha(t){
- this.trans.alpha=t}
- setDataWithKindNum(t,i=0){
- if(t>0){
- const i=vx.getInstance().getBookVO(t);
- if(!i)return;
- this.setTextures(i.base,i.grade)}
- else this.setTextures(0,1);
- i>0?(this.trans.visible=!0,this.trans.texture=ZA.getTexture("UI_Ekkorr",`Trans000${
- i}
- `)):this.trans.visible=!1,this.lblEnhance.visible=!1,this.lblLevel.visible=!1,this.lblCount.visible=!1}
- }
- ;
- Kt(u3,"HeroIcon");
- let d3=u3;
- var f3=(t=>(t.gem="gem",t.redGem="redGem",t.gold="gold",t.medal="medal",t.honorCoin="honorCoin",t.guildPoint="guildPoint",t.guildCoin="guildCoin",t.raidCoin="raidCoin",t.hammer="hammer",t.hero="hero",t.instant="instant",t.ticket="ticket",t.trans="trans",t.pet="pet",t.petTicket="petTicket",t.petSelect="petSelect",t.heroGacha="heroGacha",t.heroSelect="heroSelect",t.heroTrans="heroTrans",t.treasure="treasure",t.treasureGacha="treasureGacha",t.treasureTrans="treasureTrans",t))(f3||{
- }
- );
- const p3=class extends Be{
- constructor(){
- super(),zt(this,"bg"),zt(this,"img"),zt(this,"heroIcon"),zt(this,"petIcon"),zt(this,"lblNum"),zt(this,"_type",""),zt(this,"_amount",0),zt(this,"_grade",-1),zt(this,"_kindNum",-1),zt(this,"_subType",""),this.bg=new We(ZA.getTexture("UI_Ekkorr","Frame_Reward_01")),this.addChild(this.bg),this.img=new We(ZA.getTexture("UI_Ekkorr","UI_SHOP_GEM")),this.addChild(this.img),this.heroIcon=new d3,this.heroIcon.visible=!1,this.heroIcon.height=this.bg.height,this.heroIcon.scale.x=this.heroIcon.scale.y,this.addChild(this.heroIcon),this.petIcon=new c3,this.petIcon.visible=!1,this.petIcon.scale=.9,this.addChild(this.petIcon);
- const t=aD.DEFAULT_OUTLINE_FONT_OPTION_18;
- t.fill=aD.COLOR_WHITE,t.fontSize=18,this.lblNum=new YD("1",t.fill,t),this.addChild(this.lblNum),this.updateLayout()}
- get width(){
- return this.heroIcon.visible?this.heroIcon.width:this.bg.width}
- get height(){
- return this.heroIcon.visible?this.heroIcon.height:this.bg.height}
- updateLayout(){
- const t=this.bg.width,i=this.bg.height;
- this.img.x=.5*(t-this.img.width),this.img.y=.5*(i-this.img.height)-3,this.heroIcon.visible?this.lblNum.x=.5*(this.heroIcon.width-this.lblNum.width)-7:this.lblNum.x=.5*(t-this.lblNum.width),this.lblNum.y=i-this.lblNum.height}
- get type(){
- return this._type}
- get amount(){
- return this._amount}
- get grade(){
- return this._grade}
- get kindNum(){
- return this._kindNum}
- get subType(){
- return this._subType}
- setData(t,i,s=-1,e=-1,n=""){
- this._type=t,this._amount=i,this._grade=s,this._kindNum=e,this._subType=n,this.img.visible=!1,this.bg.visible=!1,this.heroIcon.visible=!1,this.petIcon.visible=!1;
- let h=1,r="",o="UI_Ekkorr";
- t==f3.gem?(r="UI_SHOP_GEM",h=.85):t==f3.redGem?(r="UI_SHOP_RED_GEM",h=.83):t==f3.gold?(r="m_gold",h=.7):t==f3.honorCoin?(r="UI_COIN_Big",h=.8):t==f3.guildCoin||t==f3.guildPoint?(r="GUILD_COIN",h=1.6):t==f3.raidCoin?(r="RaidCoin_on",h=1.5):t==f3.hammer?(r="Icon_Hammer",o="UI",h=1.5):"dungeonTicket"==t?(r="DungeonTick",h=.8):t==f3.hero?(this.heroIcon.setDataWithKindNum(e),this.heroIcon.visible=!0):t==f3.ticket&&n==f3.heroGacha?r="Ticket_HeroGacha":t==f3.ticket&&n==f3.heroSelect?(r="Ticket_HeroSelect",h=.85):t==f3.trans&&n==f3.hero?r=9==this._grade?"Ticket_HeroTrans2":"Ticket_HeroTrans":t==f3.pet?(this.petIcon.setPet(e,1),this.petIcon.visible=!0):t==f3.petTicket||n==f3.petTicket||t==f3.ticket&&n==f3.pet?(r="PetTick",h=.9):t==f3.petSelect||n==f3.petSelect||t==f3.ticket&&n==f3.petSelect?(r="Ticket_PetSelect",h=.9):t==f3.ticket&&n==f3.treasureGacha?(r="Ticket_TreasureGacha",h=.95):t==f3.trans&&n==f3.treasure&&(r=7===this._grade?"Ticket_TreasureTrans7":"Ticket_TreasureTrans6"),r&&(this.img.scale=h,this.img.texture=ZA.getTexture(o,r),this.img.visible=!0,this.bg.visible=!0),this.lblNum.text=String(i),this.updateLayout()}
- setDataFrom(t){
- if(!t||!t.type||!t.amount)return;
- let i=String(t.type),s=Number(t.amount),e="grade"in t?Number(t.grade):-1,n="kindNum"in t?Number(t.kindNum):-1,h="";
- "subType"in t&&(h=t.subType),this.setData(i,s,e,n,h)}
- reset(){
- this._type="",this._amount=0,this._grade=-1,this._kindNum=-1,this._subType=""}
- }
- ;
- Kt(p3,"RewardItem");
- let g3=p3;
- var m3,w3,v3=(t=>(t.EMPTY="",t.UNKNOWN="UNKNOWN",t.VERIFIED="VERIFIED",t.SUPERVISED="SUPERVISED",t.SUPERVISED_APPROVAL_PENDING="SUPERVISED_APPROVAL_PENDING",t.SUPERVISED_APPROVAL_DENIED="SUPERVISED_APPROVAL_DENIED",t.SHARED="SHARED",t.DECLINED="DECLINED",t.UNSUPPORTED="UNSUPPORTED",t))(v3||{
- }
- );
- (w3=m3||(m3={
- }
- )).Unimplemented="UNIMPLEMENTED",w3.Unavailable="UNAVAILABLE";
- const b3=class extends Error{
- constructor(t,i,s){
- super(t),this.message=t,this.code=i,this.data=s}
- }
- ;
- Kt(b3,"CapacitorException");
- let y3=b3;
- const _3=Kt(t=>{
- var i,s;
- return(null==t?void 0:t.androidBridge)?"android":(null===(s=null===(i=null==t?void 0:t.webkit)||void 0===i?void 0:i.messageHandlers)||void 0===s?void 0:s.bridge)?"ios":"web"}
- ,"getPlatformId"),M3=Kt(t=>{
- const i=t.CapacitorCustomPlatform||null,s=t.Capacitor||{
- }
- ,e=s.Plugins=s.Plugins||{
- }
- ,n=Kt(()=>null!==i?i.name:_3(t),"getPlatform"),h=Kt(()=>"web"!==n(),"isNativePlatform"),r=Kt(t=>{
- const i=c.get(t);
- return!!(null==i?void 0:i.platforms.has(n()))||!!o(t)}
- ,"isPluginAvailable"),o=Kt(t=>{
- var i;
- return null===(i=s.PluginHeaders)||void 0===i?void 0:i.find(i=>i.name===t)}
- ,"getPluginHeader"),a=Kt(i=>t.console.error(i),"handleError"),c=new Map,l=Kt((t,h={
- }
- )=>{
- const r=c.get(t);
- if(r)return r.proxy;
- const a=n(),l=o(t);
- let u;
- const d=Kt(async()=>(!u&&a in h?u=u="function"==typeof h[a]?await h[a]():h[a]:null!==i&&!u&&"web"in h&&(u=u="function"==typeof h.web?await h.web():h.web),u),"loadPluginImplementation"),f=Kt((i,e)=>{
- var n,h;
- if(!l){
- if(i)return null===(h=i[e])||void 0===h?void 0:h.bind(i);
- throw new y3(`"${
- t}
- " plugin is not implemented on ${
- a}
- `,m3.Unimplemented)}
- {
- const h=null==l?void 0:l.methods.find(t=>e===t.name);
- if(h)return"promise"===h.rtype?i=>s.nativePromise(t,e.toString(),i):(i,n)=>s.nativeCallback(t,e.toString(),i,n);
- if(i)return null===(n=i[e])||void 0===n?void 0:n.bind(i)}
- }
- ,"createPluginMethod"),p=Kt(i=>{
- let s;
- const e=Kt((...e)=>{
- const n=d().then(n=>{
- const h=f(n,i);
- if(h){
- const t=h(...e);
- return s=null==t?void 0:t.remove,t}
- throw new y3(`"${
- t}
- .${
- i}
- ()" is not implemented on ${
- a}
- `,m3.Unimplemented)}
- );
- return"addListener"===i&&(n.remove=async()=>s()),n}
- ,"wrapper");
- return e.toString=()=>`${
- i.toString()}
- () {
-  [capacitor code] }
- `,Object.defineProperty(e,"name",{
- value:i,writable:!1,configurable:!1}
- ),e}
- ,"createPluginMethodWrapper"),g=p("addListener"),m=p("removeListener"),w=Kt((t,i)=>{
- const s=g({
- eventName:t}
- ,i),e=Kt(async()=>{
- const e=await s;
- m({
- eventName:t,callbackId:e}
- ,i)}
- ,"remove"),n=new Promise(t=>s.then(()=>t({
- remove:e}
- )));
- return n.remove=async()=>{
- await e()}
- ,n}
- ,"addListenerNative"),v=new Proxy({
- }
- ,{
- get(t,i){
- switch(i){
- case"$$typeof":return;
- case"toJSON":return()=>({
- }
- );
- case"addListener":return l?w:g;
- case"removeListener":return m;
- default:return p(i)}
- }
- }
- );
- return e[t]=v,c.set(t,{
- name:t,proxy:v,platforms:new Set([...Object.keys(h),...l?[a]:[]])}
- ),v}
- ,"registerPlugin");
- return s.convertFileSrc||(s.convertFileSrc=t=>t),s.getPlatform=n,s.handleError=a,s.isNativePlatform=h,s.isPluginAvailable=r,s.registerPlugin=l,s.Exception=y3,s.DEBUG=!!s.DEBUG,s.isLoggingEnabled=!!s.isLoggingEnabled,s}
- ,"createCapacitor"),E3=Kt(t=>t.Capacitor=M3(t),"initCapacitorGlobal")("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{
- }
- ),A3=E3.registerPlugin,S3=class{
- constructor(){
- this.listeners={
- }
- ,this.retainedEventArguments={
- }
- ,this.windowListeners={
- }
- }
- addListener(t,i){
- let s=!1;
- this.listeners[t]||(this.listeners[t]=[],s=!0),this.listeners[t].push(i);
- const e=this.windowListeners[t];
- e&&!e.registered&&this.addWindowListener(e),s&&this.sendRetainedArgumentsForEvent(t);
- const n=Kt(async()=>this.removeListener(t,i),"remove");
- return Promise.resolve({
- remove:n}
- )}
- async removeAllListeners(){
- this.listeners={
- }
- ;
- for(const t in this.windowListeners)this.removeWindowListener(this.windowListeners[t]);
- this.windowListeners={
- }
- }
- notifyListeners(t,i,s){
- const e=this.listeners[t];
- if(e)e.forEach(t=>t(i));
- else if(s){
- let s=this.retainedEventArguments[t];
- s||(s=[]),s.push(i),this.retainedEventArguments[t]=s}
- }
- hasListeners(t){
- var i;
- return!!(null===(i=this.listeners[t])||void 0===i?void 0:i.length)}
- registerWindowListener(t,i){
- this.windowListeners[i]={
- registered:!1,windowEventName:t,pluginEventName:i,handler:Kt(t=>{
- this.notifyListeners(i,t)}
- ,"handler")}
- }
- unimplemented(t="not implemented"){
- return new E3.Exception(t,m3.Unimplemented)}
- unavailable(t="not available"){
- return new E3.Exception(t,m3.Unavailable)}
- async removeListener(t,i){
- const s=this.listeners[t];
- if(!s)return;
- const e=s.indexOf(i);
- this.listeners[t].splice(e,1),this.listeners[t].length||this.removeWindowListener(this.windowListeners[t])}
- addWindowListener(t){
- window.addEventListener(t.windowEventName,t.handler),t.registered=!0}
- removeWindowListener(t){
- t&&(window.removeEventListener(t.windowEventName,t.handler),t.registered=!1)}
- sendRetainedArgumentsForEvent(t){
- const i=this.retainedEventArguments[t];
- i&&(delete this.retainedEventArguments[t],i.forEach(i=>{
- this.notifyListeners(t,i)}
- ))}
- }
- ;
- Kt(S3,"WebPlugin");
- let T3=S3;
- const C3=Kt(t=>encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),"encode$6"),k3=Kt(t=>t.replace(/(%[\dA-F]{
- 2}
- )+/gi,decodeURIComponent),"decode$8"),O3=class extends T3{
- async getCookies(){
- const t=document.cookie,i={
- }
- ;
- return t.split(";
- ").forEach(t=>{
- if(t.length<=0)return;
- let[s,e]=t.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");
- s=k3(s).trim(),e=k3(e).trim(),i[s]=e}
- ),i}
- async setCookie(t){
- try{
- const i=C3(t.key),s=C3(t.value),e=t.expires?`;
-  expires=${
- t.expires.replace("expires=","")}
- `:"",n=(t.path||"/").replace("path=",""),h=null!=t.url&&t.url.length>0?`domain=${
- t.url}
- `:"";
- document.cookie=`${
- i}
- =${
- s||""}
- ${
- e}
- ;
-  path=${
- n}
- ;
-  ${
- h}
- ;
- `}
- catch(i){
- return Promise.reject(i)}
- }
- async deleteCookie(t){
- try{
- document.cookie=`${
- t.key}
- =;
-  Max-Age=0`}
- catch(i){
- return Promise.reject(i)}
- }
- async clearCookies(){
- try{
- const t=document.cookie.split(";
- ")||[];
- for(const i of t)document.cookie=i.replace(/^ +/,"").replace(/=.*/,`=;
- expires=${
- (new Date).toUTCString()}
- ;
- path=/`)}
- catch(t){
- return Promise.reject(t)}
- }
- async clearAllCookies(){
- try{
- await this.clearCookies()}
- catch(t){
- return Promise.reject(t)}
- }
- }
- ;
- Kt(O3,"CapacitorCookiesPluginWeb");
- let I3=O3;
- A3("CapacitorCookies",{
- web:Kt(()=>new I3,"web")}
- );
- const x3=Kt(async t=>new Promise((i,s)=>{
- const e=new FileReader;
- e.onload=()=>{
- const t=e.result;
- i(t.indexOf(",")>=0?t.split(",")[1]:t)}
- ,e.onerror=t=>s(t),e.readAsDataURL(t)}
- ),"readBlobAsBase64"),N3=Kt((t={
- }
- )=>{
- const i=Object.keys(t);
- return Object.keys(t).map(t=>t.toLocaleLowerCase()).reduce((s,e,n)=>(s[e]=t[i[n]],s),{
- }
- )}
- ,"normalizeHttpHeaders"),P3=Kt((t,i=!0)=>t?Object.entries(t).reduce((t,s)=>{
- const[e,n]=s;
- let h,r;
- return Array.isArray(n)?(r="",n.forEach(t=>{
- h=i?encodeURIComponent(t):t,r+=`${
- e}
- =${
- h}
- &`}
- ),r.slice(0,-1)):(h=i?encodeURIComponent(n):n,r=`${
- e}
- =${
- h}
- `),`${
- t}
- &${
- r}
- `}
- ,"").substr(1):null,"buildUrlParams"),R3=Kt((t,i={
- }
- )=>{
- const s=Object.assign({
- method:t.method||"GET",headers:t.headers}
- ,i),e=N3(t.headers)["content-type"]||"";
- if("string"==typeof t.data)s.body=t.data;
- else if(e.includes("application/x-www-form-urlencoded")){
- const i=new URLSearchParams;
- for(const[s,e]of Object.entries(t.data||{
- }
- ))i.set(s,e);
- s.body=i.toString()}
- else if(e.includes("multipart/form-data")||t.data instanceof FormData){
- const i=new FormData;
- if(t.data instanceof FormData)t.data.forEach((t,s)=>{
- i.append(s,t)}
- );
- else for(const s of Object.keys(t.data))i.append(s,t.data[s]);
- s.body=i;
- const e=new Headers(s.headers);
- e.delete("content-type"),s.headers=e}
- else(e.includes("application/json")||"object"==typeof t.data)&&(s.body=JSON.stringify(t.data));
- return s}
- ,"buildRequestInit"),D3=class extends T3{
- async request(t){
- const i=R3(t,t.webFetchExtra),s=P3(t.params,t.shouldEncodeUrlParams),e=s?`${
- t.url}
- ?${
- s}
- `:t.url,n=await fetch(e,i),h=n.headers.get("content-type")||"";
- let r,o,{
- responseType:a="text"}
- =n.ok?t:{
- }
- ;
- switch(h.includes("application/json")&&(a="json"),a){
- case"arraybuffer":case"blob":o=await n.blob(),r=await x3(o);
- break;
- case"json":r=await n.json();
- break;
- default:r=await n.text()}
- const c={
- }
- ;
- return n.headers.forEach((t,i)=>{
- c[i]=t}
- ),{
- data:r,headers:c,status:n.status,url:n.url}
- }
- async get(t){
- return this.request(Object.assign(Object.assign({
- }
- ,t),{
- method:"GET"}
- ))}
- async post(t){
- return this.request(Object.assign(Object.assign({
- }
- ,t),{
- method:"POST"}
- ))}
- async put(t){
- return this.request(Object.assign(Object.assign({
- }
- ,t),{
- method:"PUT"}
- ))}
- async patch(t){
- return this.request(Object.assign(Object.assign({
- }
- ,t),{
- method:"PATCH"}
- ))}
- async delete(t){
- return this.request(Object.assign(Object.assign({
- }
- ,t),{
- method:"DELETE"}
- ))}
- }
- ;
- Kt(D3,"CapacitorHttpPluginWeb");
- let L3=D3;
- var G3,B3,U3,F3;
- A3("CapacitorHttp",{
- web:Kt(()=>new L3,"web")}
- ),(B3=G3||(G3={
- }
- )).Dark="DARK",B3.Light="LIGHT",B3.Default="DEFAULT",(F3=U3||(U3={
- }
- )).StatusBar="StatusBar",F3.NavigationBar="NavigationBar";
- const H3=class extends T3{
- async setStyle(){
- this.unavailable("not available for web")}
- async setAnimation(){
- this.unavailable("not available for web")}
- async show(){
- this.unavailable("not available for web")}
- async hide(){
- this.unavailable("not available for web")}
- }
- ;
- Kt(H3,"SystemBarsPluginWeb");
- let W3=H3;
- A3("SystemBars",{
- web:Kt(()=>new W3,"web")}
- );
- const j3=Object.freeze(Object.defineProperty({
- __proto__:null,Capacitor:E3,CapacitorException:y3,get ExceptionCode(){
- return m3}
- ,get SystemBarType(){
- return U3}
- ,get SystemBarsStyle(){
- return G3}
- ,WebPlugin:T3,buildRequestInit:R3,registerPlugin:A3}
- ,Symbol.toStringTag,{
- value:"Module"}
- )),$3=A3("PlayAgeSignals"),V3=class t{
- constructor(){
- zt(this,"ageLower",-1),zt(this,"ageUpper",-1),zt(this,"userStatus",null),zt(this,"ageRangeResult",null),zt(this,"errorMessage",null),zt(this,"requestAgeRangeCallback",null)}
- static getInstance(){
- return t.instance||(t.instance=new t),t.instance}
- async requestAgeRange(t){
- this.requestAgeRangeCallback=t,this.ageLower=-1,this.ageUpper=-1,this.ageRangeResult=null;
- try{
- const t=await $3.check();
- if(this.ageRangeResult=t,this.debug("Play Age Signals API - success"),this.debug(t),this.addExtras("_requestAgeRange_result",JSON.stringify(t)),1==t.status){
- const i=parseInt(String(t.ageLower));
- 0==isNaN(i)&&(this.ageLower=i);
- const s=parseInt(String(t.ageUpper));
- 0==isNaN(s)&&(this.ageUpper=s),null==t.userStatus?this.userStatus=v3.VERIFIED:""==t.userStatus?this.userStatus=v3.UNKNOWN:this.userStatus=t.userStatus,this.onRequestAgeRangeCallback(!0)}
- else t.errorMessage.toLowerCase().includes("not yet implemented")?(this.userStatus=v3.VERIFIED,this.errorMessage=null,this.onRequestAgeRangeCallback(!0)):(this.userStatus=v3.UNKNOWN,this.errorMessage=this.getMessageFromErrorCode(t.errorCode,t.errorMessage),this.onRequestAgeRangeCallback(!1))}
- catch(i){
- this.debug("Play Age Signals API - fail"),this.debug(i),this.addExtras("_requestAgeRange_error",JSON.stringify(i)),this.onRequestAgeRangeCallback(!1)}
- }
- checkApproved(t){
- return this.debug(""),this.debug("AgeRangeObjectAOS, checkApproved()"),this.debug(" -> this.userStatus : "+this.userStatus),this.debug(" -> this.ageUpper : "+this.ageUpper),this.debug(" -> ageUpperLimit : "+t),this.addExtras("_checkApproved_userStatus",""+this.userStatus),this.addExtras("_checkApproved_ageUpper",""+this.ageUpper),this.addExtras("_checkApproved_ageUpperLimit",""+t),null==this.userStatus?{
- approved:!1,errorMessage:AG.getText("AGE_RANGE_3","현재 사용 중인 기기 또는 OS 환경에서는 연령 정보를 확인할 수 없어, 일부 기능이 ‘안전 모드’로 제한됩니다.")+" (N)"}
- :this.userStatus==v3.UNKNOWN?{
- approved:!1,errorMessage:AG.getText("AGE_RANGE_3","현재 사용 중인 기기 또는 OS 환경에서는 연령 정보를 확인할 수 없어, 일부 기능이 ‘안전 모드’로 제한됩니다.")+" (U)"}
- :this.userStatus==v3.VERIFIED||this.userStatus!=v3.SUPERVISED_APPROVAL_DENIED&&this.userStatus!=v3.SUPERVISED_APPROVAL_PENDING||this.ageUpper>t?{
- approved:!0,errorMessage:""}
- :{
- approved:!1,errorMessage:AG.getText("AGE_RANGE_23","이 기능은 보호자 승인 전까지 이용할 수 없습니다.")}
- }
- async isEligibleForAgeFeatures(){
- return null}
- getMessageFromErrorCode(t,i){
- let s=AG.getText("AGE_RANGE_3","현재 사용 중인 기기 또는 OS 환경에서는 연령 정보를 확인할 수 없어, 일부 기능이 ‘안전 모드’로 제한됩니다.");
- switch(t){
- case"API_NOT_AVAILABLE":s=AG.getText("AGE_RANGE_3","현재 사용 중인 기기 또는 OS 환경에서는 연령 정보를 확인할 수 없어, 일부 기능이 ‘안전 모드’로 제한됩니다.")+" (NA)";
- break;
- case"PLAY_STORE_NOT_FOUND":s=AG.getText("AGE_RANGE_14","이 기기에서 Play 스토어를 찾을 수 없습니다. 설치 또는 활성화 후 다시 시도해 주세요.");
- break;
- case"NETWORK_ERROR":s=AG.getText("AGE_RANGE_15","네트워크 연결에 문제가 있습니다. 인터넷 상태를 확인해 주세요.");
- break;
- case"PLAY_SERVICES_NOT_FOUND":s=AG.getText("AGE_RANGE_16","Google Play 서비스가 없거나 사용할 수 없습니다. 설치 및 활성화 여부를 확인해 주세요.");
- break;
- case"CANNOT_BIND_TO_SERVICE":s=AG.getText("AGE_RANGE_17","Play 스토어 서비스에 연결할 수 없습니다. Play 스토어 앱 업데이트 후 다시 시도해 주세요.");
- break;
- case"PLAY_STORE_VERSION_OUTDATED":s=AG.getText("AGE_RANGE_18","Play 스토어 앱 버전이 오래되었습니다. 최신 버전으로 업데이트해 주세요.");
- break;
- case"PLAY_SERVICES_VERSION_OUTDATED":s=AG.getText("AGE_RANGE_19","Google Play 서비스 버전이 오래되었거나 지원되지 않습니다. 업데이트해 주세요.");
- break;
- case"CLIENT_TRANSIENT_ERROR":s=AG.getText("AGE_RANGE_20","일시적인 오류가 발생했습니다. 잠시 후 다시 시도해 주세요.");
- break;
- case"APP_NOT_OWNED":s=AG.getText("AGE_RANGE_21","이 앱은 Google Play에서 설치되지 않았습니다. Google Play에서 정식 버전을 설치해 주세요.");
- break;
- case"INTERNAL_ERROR":s=AG.getText("AGE_RANGE_22","알 수 없는 오류가 발생했습니다.(IE) 다시 시도해 주세요. 계속 발생한다면 고객센터에 문의해 주세요.");
- break;
- case"SDK_VERSION_OUTDATED":s=AG.getText("AGE_RANGE_22","알 수 없는 오류가 발생했습니다.(SVO) 다시 시도해 주세요. 계속 발생한다면 고객센터에 문의해 주세요.")}
- return TL.getInstance().development&&(s+="\n"+i),s}
- onRequestAgeRangeCallback(t){
- const i=this.requestAgeRangeCallback;
- this.requestAgeRangeCallback=null,i&&i(t)}
- addExtras(t,i){
- wP.addExtraParams(t,i)}
- debug(t){
- TL.getInstance().development}
- }
- ;
- Kt(V3,"AgeRangeObjectAOS"),zt(V3,"instance");
- let K3=V3;
- const z3=A3("DeclaredAgeRangePlugin"),q3=class t{
- constructor(){
- zt(this,"ageLower",-1),zt(this,"ageUpper",-1),zt(this,"userStatus",null),zt(this,"ageRangeResult",null),zt(this,"errorMessage",null),zt(this,"requestAgeRangeCallback",null)}
- static getInstance(){
- return t.instance||(t.instance=new t),t.instance}
- async requestAgeRange(t){
- this.requestAgeRangeCallback=t,this.ageRangeResult=null,this.ageLower=-1,this.ageUpper=-1;
- let i=!0;
- const s=EL.getInstance().getClientData("AGE_RANGE_IGNORE_ELIGIBLE_IOS");
- if(s&&"Y"==s&&(i=!1),i)try{
- const t=await z3.isEligibleForAgeFeatures();
- if(this.debug("Declared Age Range API / isEligibleForAgeFeatures - success"),this.debug(t),this.addExtras("_isEligibleForAgeFeatures_result",JSON.stringify(t)),t&&"status"in t&&"eligible"in t&&1==t.status&&0==t.eligible)return this.userStatus=v3.VERIFIED,void this.onRequestAgeRangeCallback(!0)}
- catch(e){
- this.debug("Declared Age Range API / isEligibleForAgeFeatures - error"),this.debug(JSON.stringify(e)),this.addExtras("_isEligibleForAgeFeatures_error",JSON.stringify(e))}
- try{
- let t=[13,16,18],i=EL.getInstance().getClientData("AGE_RANGE_AGE_GATE_IOS");
- i&&(t=ZI.convertToNumber(i.split("|")));
- const s=await z3.requestAgeRange({
- ageGates:t}
- );
- if(this.ageRangeResult=s,this.debug("Declared Age Range API / requestAgeRange - success"),this.debug(s),this.addExtras("_requestAgeRange_result",JSON.stringify(s)),1==s.status){
- const t=parseInt(String(s.lowerBound));
- 0==isNaN(t)&&(this.ageLower=t);
- const i=parseInt(String(s.upperBound));
- 0==isNaN(i)&&(this.ageUpper=i),null==s.userStatus||""==s.userStatus?this.userStatus=v3.UNKNOWN:this.userStatus=s.userStatus.toUpperCase(),this.onRequestAgeRangeCallback(!0)}
- else s.errorMessage.toLowerCase().includes("not yet implemented")?(this.userStatus=v3.VERIFIED,this.errorMessage=null,this.onRequestAgeRangeCallback(!0)):(this.userStatus=v3.UNKNOWN,this.errorMessage=this.getMessageFromErrorCode(s.errorCode,s.errorMessage),this.onRequestAgeRangeCallback(!1))}
- catch(e){
- this.debug("Declared Age Range API / requestAgeRange - error"),this.debug(e),this.addExtras("_requestAgeRange_error",JSON.stringify(e)),this.onRequestAgeRangeCallback(!1)}
- }
- checkApproved(t){
- return this.debug(""),this.debug("AgeRangeObjectIOS, checkApproved()"),this.debug(" -> this.userStatus : "+this.userStatus),this.debug(" -> this.ageUpper : "+this.ageUpper),this.debug(" -> ageUpperLimit : "+t),this.addExtras("_checkApproved_userStatus",""+this.userStatus),this.addExtras("_checkApproved_ageUpper",""+this.ageUpper),this.addExtras("_checkApproved_ageUpperLimit",""+t),null==this.userStatus?{
- approved:!1,errorMessage:AG.getText("AGE_RANGE_3","현재 사용 중인 기기 또는 OS 환경에서는 연령 정보를 확인할 수 없어, 일부 기능이 ‘안전 모드’로 제한됩니다.")+" (N)"}
- :this.userStatus==v3.UNKNOWN?{
- approved:!1,errorMessage:AG.getText("AGE_RANGE_3","현재 사용 중인 기기 또는 OS 환경에서는 연령 정보를 확인할 수 없어, 일부 기능이 ‘안전 모드’로 제한됩니다.")+" (U)"}
- :this.userStatus==v3.UNSUPPORTED?{
- approved:!1,errorMessage:AG.getText("AGE_RANGE_3","현재 사용 중인 기기 또는 OS 환경에서는 연령 정보를 확인할 수 없어, 일부 기능이 ‘안전 모드’로 제한됩니다.")+" (U2)"}
- :this.userStatus==v3.VERIFIED?{
- approved:!0,errorMessage:""}
- :this.userStatus==v3.DECLINED?{
- approved:!1,errorMessage:AG.getText("AGE_RANGE_9","연령 정보 제공에 동의하지 않아 일부 기능이 제한됩니다.")}
- :this.ageUpper>t?{
- approved:!0,errorMessage:""}
- :{
- approved:!1,errorMessage:AG.getText("AGE_RANGE_6","연령 기준에 따라 이 기능의 이용이 제한됩니다.")}
- }
- async isEligibleForAgeFeatures(){
- this.debug(""),this.debug("AgeRangeObjectIOS, isEligibleForAgeFeatures()");
- try{
- const t=await z3.isEligibleForAgeFeatures();
- return this.debug("AgeRangeObjectIOS, isEligibleForAgeFeatures() - success"),this.debug(t),t}
- catch(t){
- this.debug("AgeRangeObjectIOS, isEligibleForAgeFeatures() - error"),this.debug(t)}
- return null}
- getMessageFromErrorCode(t,i){
- let s=AG.getText("AGE_RANGE_3","현재 사용 중인 기기 또는 OS 환경에서는 연령 정보를 확인할 수 없어, 일부 기능이 ‘안전 모드’로 제한됩니다.");
- return"NOT_AVAILABLE"===t&&(s=AG.getText("AGE_RANGE_3","현재 사용 중인 기기 또는 OS 환경에서는 연령 정보를 확인할 수 없어, 일부 기능이 ‘안전 모드’로 제한됩니다.")+" (NA)"),TL.getInstance().development&&(s+="\n"+i),s}
- onRequestAgeRangeCallback(t){
- const i=this.requestAgeRangeCallback;
- this.requestAgeRangeCallback=null,i&&i(t)}
- addExtras(t,i){
- wP.addExtraParams(t,i)}
- debug(t){
- TL.getInstance().development}
- }
- ;
- Kt(q3,"AgeRangeObjectIOS"),zt(q3,"instance");
- let X3=q3;
- const Y3=class t{
- constructor(){
- zt(this,"_activated",!0),zt(this,"_ageRangeYn","Y"),zt(this,"_ageRangeStartDate",null),zt(this,"_ageUpperLimit",15)}
- static getInstance(){
- return this._instance||(this._instance=new t),this._instance}
- get activated(){
- return this._activated}
- setConfig(t){
- this.debug(""),this.debug("AgeRangeManager, setConfig()"),this.debug(t);
- const i=EL.getInstance();
- if("capacitor"!=i.envPlatform)return void(this._activated=!1);
- if(!t)return;
- if(this.debug(t),i.isGoogleClientKr()){
- if("AGE_RANGE_YN_AOS_KR"in t&&(this._ageRangeYn=t.AGE_RANGE_YN_AOS_KR,"N"==this._ageRangeYn))return void(this._activated=!1)}
- else if(i.isGoogleClient()){
- if("AGE_RANGE_YN_AOS_GB"in t&&(this._ageRangeYn=t.AGE_RANGE_YN_AOS_GB,"N"==this._ageRangeYn))return void(this._activated=!1)}
- else if(i.isAppleClientKr()){
- if("AGE_RANGE_YN_IOS_KR"in t&&(this._ageRangeYn=t.AGE_RANGE_YN_IOS_KR,"N"==this._ageRangeYn))return void(this._activated=!1)}
- else if(i.isAppleClient()&&"AGE_RANGE_YN_IOS_GB"in t&&(this._ageRangeYn=t.AGE_RANGE_YN_IOS_GB,"N"==this._ageRangeYn))return void(this._activated=!1);
- let s="2026-03-01T00:00:00.000Z";
- i.isGoogleClientKr()||i.isAppleClientKr()?"AGE_RANGE_START_DATE_KR"in t&&(s=t.AGE_RANGE_START_DATE_KR):"AGE_RANGE_START_DATE_GB"in t&&(s=t.AGE_RANGE_START_DATE_GB);
- try{
- this._ageRangeStartDate=new Date(s),gP.serverTime<this._ageRangeStartDate.getTime()?this._activated=!1:this._activated=!0}
- catch(n){
- this._activated=!1}
- let e=15;
- "AGE_RANGE_UPPER_LIMIT"in t&&(e=parseInt(t.AGE_RANGE_UPPER_LIMIT),isNaN(e)&&(e=15)),this._ageUpperLimit=e}
- updateConfig(){
- this.debug(""),this.debug("AgeRangeManager, updateConfig()"),this.debug(" -> this._ageRangeStartDate : "+this._ageRangeStartDate),this.debug(" -> 1 > this._activated : "+this._activated),this.debug(" -> UserInfoManager.regDate : "+_L.regTime),null!=this._ageRangeStartDate&&(this._activated&&new Date(_L.regTime).getTime()<this._ageRangeStartDate.getTime()&&(this._activated=!1),this.debug(" -> 2 > this._activated : "+this._activated),this.debug(""))}
- getObject(){
- const t=EL.getInstance();
- return t.isAppleClientKr()||t.isAppleClient()?X3.getInstance():t.isGoogleClientKr()||t.isGoogleClient()?K3.getInstance():null}
- checkApproved(){
- if(this.debug(""),this.debug("AgeRangeManager, checkApproved()"),this.debug(" -> this._activated : "+this._activated),this.debug(" -> this._ageRangeYn : "+this._ageRangeYn),this.debug(" -> this._ageRangeStartDate : "+this._ageRangeStartDate),this.debug(" -> this._ageUpperLimit : "+this._ageUpperLimit),this.debug(""),0==this._activated)return{
- approved:!0,errorMessage:""}
- ;
- const t=this.getObject();
- return t?t.checkApproved(this._ageUpperLimit):{
- approved:!0,errorMessage:""}
- }
- requestAgeRange(t){
- if(this.debug(""),this.debug("AgeRangeManager, requestAgeRange()"),this.debug(" -> this._activated : "+this._activated),0==this._activated)return this.debug("AgeRangeManager, requestAgeRange() - 1"),void(null!=t&&t(!1));
- const i=this.getObject();
- i?(this.debug("AgeRangeManager, requestAgeRange() - 2"),i.requestAgeRange(t)):(this.debug("AgeRangeManager, requestAgeRange() - 3"),null!=t&&t(!1))}
- async isEligibleForAgeFeatures(){
- if(this.debug(""),this.debug("AgeRangeManager, isEligibleForAgeFeatures()"),this.debug(" -> this._activated : "+this._activated),0==this._activated)return this.debug("AgeRangeManager, isEligibleForAgeFeatures() - 1"),null;
- const t=this.getObject();
- return t?(this.debug("AgeRangeManager, isEligibleForAgeFeatures() - 2"),await t.isEligibleForAgeFeatures()):(this.debug("AgeRangeManager, isEligibleForAgeFeatures() - 3"),null)}
- debug(t){
- TL.getInstance().development}
- }
- ;
- Kt(Y3,"AgeRangeManager"),zt(Y3,"_instance");
- let J3=Y3;
- const Q3=class t extends iP{
- static getInstance(){
- return this._instance||(this._instance=new t),this._instance}
- constructor(){
- super(),this.sp.x=.5*-this.sp.width,this.sp.y=.5*-this.sp.height}
- getTextures(){
- return ZA.getTextures("Loading","loading_circle_elf_60f_")}
- }
- ;
- Kt(Q3,"PaymentLoadingEffect2"),zt(Q3,"_instance");
- let Z3=Q3;
- const t6=class t extends aG{
- constructor(){
- super(),zt(this,"lblMessage",new YD("",aD.DEFAULT_COLOR,aD.DEFAULT_OUTLINE_FONT_OPTION_17)),zt(this,"btnConfirm",new sG("확인")),zt(this,"onConfirm",null),this.title="",this.lblMessage.y=90,this.contentContainer.addChild(this.lblMessage,this.btnConfirm);
- let t=this.lblMessage.getStyle();
- t.align="center",this.lblMessage.setStyle(t),aD.setLabelWrapWidth(this.lblMessage,500),this.btnConfirm.onClick=this.onConfirmClick.bind(this)}
- static getInstance(){
- return this._instance||(this._instance=new t),this._instance}
- onConfirmClick(){
- this.hide();
- let t=this.onConfirm;
- this.onConfirm=null,null!==t&&t()}
- show(t,i=null){
- this.onConfirm=i,this.lblMessage.text=t,this.btnConfirm.text=AG.getText("COMMON_1","확인"),this.updateLayout(),super.show()}
- hide(){
- super.hide(),this.title="",this.btnClose.visible=!0}
- updateLayout(){
- this.lblMessage.x=.5*(this.width-this.lblMessage.width),this.btnConfirm.x=.5*(this.width-this.btnConfirm.width),this.btnConfirm.y=this.lblMessage.y+this.lblMessage.height+30,this.height=this.btnConfirm.y+this.btnConfirm.height+40}
- getDefaultPositionY(){
- return.3*KA.stageHeight}
- hideCloseBtn(){
- this.btnClose.visible=!1}
- onBackButton(){
- return this.onConfirmClick(),!0}
- }
- ;
- Kt(t6,"CommonMessagePopup"),zt(t6,"_instance");
- let i6=t6;
- const s6=class t{
- constructor(){
- zt(this,"_productId",-1)}
- static getInstance(){
- return t.instance||(t.instance=new t),t.instance}
- get productId(){
- return this._productId}
- async buyProduct(t){
- const i=Q2.getInstance().getByProductId(t);
- if(!i)return;
- let s="",e="";
- const n=_L.currentServer,h=EL.getInstance();
- if(h.isGoogleClient()||h.isAppleClient()?2==n&&(s=AG.getText("COMMON_546","[오늘도 환생 2] 국내 버전에서 결제를 이용해 주세요."),e=h.isGoogleClient()?h.getGoogleKrLink():h.getAppleKrLink()):(h.isGoogleClientKr()||h.isAppleClientKr())&&3==n&&(s=AG.getText("COMMON_545","[Endless Frontier 2] 글로벌 버전에서 결제를 이용해 주세요."),e=h.isGoogleClientKr()?h.getGoogleGbLink():h.getAppleGbLink()),s){
- const t=i6.getInstance();
- return t.hideCloseBtn(),void t.show(s,()=>{
- e&&window.open(e,"_blank")}
- )}
- if(i.usdPrice>=90)try{
- const t=J3.getInstance().checkApproved();
- if(0==t.approved)return void mG.getInstance().show(t.errorMessage)}
- catch(r){
- const t=AG.getText("AGE_RANGE_3","현재 사용 중인 기기 또는 OS 환경에서는 연령 정보를 확인할 수 없어, 일부 기능이 ‘안전 모드’로 제한됩니다.");
- return void mG.getInstance().show(t)}
- if(-1==this._productId){
- Z3.getInstance().show(),this._productId=t;
- try{
- const s=BL();
- if(0==s.supportsPurchase())return void(await this.testBuyProduct(t));
- let e=s.platformType;
- if("capacitor"==e){
- const{
- Capacitor:t}
- =await Jt(async()=>{
- const{
- Capacitor:t}
- =await Promise.resolve().then(()=>j3);
- return{
- Capacitor:t}
- }
- ,void 0);
- "ios"===t.getPlatform()?e="apple":"android"===t.getPlatform()&&(e="google")}
- const n=Q2.getInstance().getStoreProductIdByProductId(this._productId);
- await hD.getInstance().shop.paymentAttempt(this._productId,e,n);
- const h="toss"===s.platformType?i.sku:String(i.productId);
- if(!h)return void this.onPaymentCancel();
- const o=await s.purchase(h,i.price);
- if(!o.success)return this.onPaymentCancel(),void("USER_CANCELED"!==o.error&&mG.getInstance().showError(o.error||"결제 실패"));
- this.trackPurchase(t);
- const a=this._productId;
- let c;
- try{
- c=structuredClone(i)}
- catch(r){
- c=JSON.parse(JSON.stringify(i))}
- if(this.onPaymentCancel(),o.serverData){
- const t=o.serverData;
- _L.setUserInfo(t,!1),UV.getInstance().updateAll(),t.products&&Q2.getInstance().setProducts(t.products)}
- const l=Q2.getInstance().getRewardMessage(o.rewardTypes);
- mG.getInstance().show(l),lS.getInstance().dispatchCustomEvent("PaymentSuccess",{
- productId:a,productVo:c}
- );
- let u=!1;
- for(const t of c.rewards)"instant"==t.type&&"petTicket"==t.subType&&(u=!0);
- u&&this.updatePetTicket()}
- catch(r){
- this.onPaymentCancel(),mG.getInstance().show((null==r?void 0:r.message)||"결제 오류")}
- }
- else mG.getInstance().show(AG.getText("COMMON_112","진행중인 결제가 완료된 후에 시도해 주세요."))}
- async trackPurchase(t){
- const i=Q2.getInstance().getByProductId(t);
- if(!i)return;
- const s=EL.getInstance();
- if("capacitor"==s.envPlatform){
- const{
- appsFlyer:n,withTimeoutAf:h}
- =await Jt(async()=>{
- const{
- appsFlyer:t,withTimeoutAf:i}
- =await Promise.resolve().then(()=>Woi);
- return{
- appsFlyer:t,withTimeoutAf:i}
- }
- ,void 0),r=s.getTimeoutMilliSeconds();
- try{
- let s=i.usdPrice;
- 0==s&&(s=Q2.getInstance().getUsdPriceByKrwPrice(i.price)),await h(n.trackPurchase(String(t),i.usdPrice,"USD"),"af_in_app_purchase",r)}
- catch(e){
- }
- const{
- AnalyticsManager:o}
- =await Jt(async()=>{
- const{
- AnalyticsManager:t}
- =await Promise.resolve().then(()=>qoi);
- return{
- AnalyticsManager:t}
- }
- ,void 0);
- o.getInstance().trackPurchase(i.productId,i.usdPrice,"USD")}
- }
- async testBuyProduct(t){
- var i;
- try{
- const e=await hD.getInstance().shop.testBuyProduct(t),n=this._productId,h=Q2.getInstance().getByProductId(t);
- let r;
- try{
- r=structuredClone(h)}
- catch(s){
- r=JSON.parse(JSON.stringify(h))}
- if(this.onPaymentCancel(),!(null==e?void 0:e.success))return void mG.getInstance().show((null==e?void 0:e.error)||"테스트 구매 실패");
- e.body&&(_L.setUserInfo(e.body,!1),UV.getInstance().updateAll(),e.body.products&&Q2.getInstance().setProducts(e.body.products));
- const o=Q2.getInstance().getRewardMessage(null==(i=e.body)?void 0:i.rewardTypes);
- mG.getInstance().show(o),lS.getInstance().dispatchCustomEvent("PaymentSuccess",{
- productId:n,productVo:r}
- );
- let a=!1;
- for(const t of r.rewards)"instant"==t.type&&"petTicket"==t.subType&&(a=!0);
- a&&this.updatePetTicket()}
- catch(s){
- this.onPaymentCancel(),mG.getInstance().show((null==s?void 0:s.message)||"테스트 구매 오류")}
- }
- onPaymentCancel(){
- this._productId=-1,Z3.getInstance().hide()}
- async updatePetTicket(){
- const{
- SpiritLandDataManager:t}
- =await Jt(async()=>{
- const{
- SpiritLandDataManager:t}
- =await Promise.resolve().then(()=>bL);
- return{
- SpiritLandDataManager:t}
- }
- ,void 0);
- t.getInstance().isDataLoaded=!1}
- }
- ;
- Kt(s6,"InAppPurchaseManager"),zt(s6,"instance");
- let e6=s6;
- const n6=class extends Be{
- constructor(){
- super(),zt(this,"bg"),zt(this,"icon"),zt(this,"lbl"),zt(this,"line"),zt(this,"icon2"),zt(this,"lbl2"),this.bg=new CM({
- texture:ZA.getTexture("UI_Ekkorr","Popup_Bg_04"),leftWidth:12,topHeight:12,rightWidth:12,bottomHeight:12}
- ),this.bg.width=530,this.bg.height=100,this.addChild(this.bg),this.icon=new We(ZA.getTexture("UI_Ekkorr","UNIT_NPC_2")),this.icon.scale=.7,this.icon.x=10,this.icon.y=10,this.addChild(this.icon);
- const t=aD.DEFAULT_FONT_OPTION_17;
- t.fill=aD.DEFAULT_COLOR,t.fontWeight="normal",this.lbl=new YD("",t.fill,t),this.lbl.x=this.icon.x+this.icon.width+10,this.lbl.y=20,this.addChild(this.lbl),aD.setLabelWrapWidth(this.lbl,this.bg.width-this.lbl.x-10),this.line=new We(ZA.getTexture("UI_Ekkorr","blackRect")),this.line.width=this.bg.width-40,this.line.height=1,this.line.x=.5*(this.bg.width-this.line.width),this.addChild(this.line),this.icon2=new We(ZA.getTexture("UI_Ekkorr","UNIT_NPC_1")),this.icon2.scale=this.icon.scale,this.icon2.x=this.icon.x,this.icon2.y=this.icon.y,this.addChild(this.icon2),this.lbl2=new YD("",t.fill,t),this.lbl2.x=this.lbl.x,this.lbl2.y=this.lbl.y,this.addChild(this.lbl2),aD.setLabelWrapWidth(this.lbl2,this.bg.width-this.lbl2.x-10)}
- get width(){
- return this.bg.width}
- get height(){
- return this.bg.height}
- setData(){
- const t=Kt((t,i)=>AG.getText(t,i),"_t"),i=Kt((t,i,s)=>AG.getValueReplace(t,"##",i,s),"_tv"),s=[`# ${
- t("GAME_916","전문 비서 (이오스)")}
- `,`  - ${
- i("GAME_917",4,"영웅 모집 : 1시간마다 4명")}
- `,`  - ${
- t("GAME_918","영웅 슬롯 :")}
-  96`,`  - ${
- i("GAME_919","15~30","자원 : 1시간마다 15~30개의 보석과 명예코인 획득")}
- `];
- this.lbl.text=s.join("\n");
- const e=[`# ${
- t("GAME_915","일반 비서 (로라)")}
- `,`  - ${
- i("GAME_917",2,"영웅 모집 : 1시간마다 2명")}
- `,`  - ${
- t("GAME_918","영웅 슬롯 :")}
-  24`,`  - ${
- i("GAME_919","7~15","자원 : 1시간마다 7~15개의 보석과 명예코인 획득")}
- `];
- this.lbl2.text=e.join("\n"),this.line.y=this.lbl.y+this.lbl.height+20,this.icon2.y=this.lbl2.y=this.line.y+20;
- const n=Math.max(this.lbl2.y+this.lbl2.height+this.lbl.y,this.icon2.y+this.icon2.height+this.icon.y);
- this.bg.height=n}
- }
- ;
- Kt(n6,"ShopGuideSecretary");
- let h6=n6;
- const r6=class extends aG{
- constructor(){
- super(),zt(this,"lblName",new YD("",16777215,aD.DEFAULT_OUTLINE_FONT_OPTION_17)),zt(this,"lblDesc",new YD("",13421772,aD.DEFAULT_DESC_FONT_OPTION_16)),zt(this,"lblRewardsTitle",new YD("",16750848,aD.DEFAULT_OUTLINE_FONT_OPTION_17)),zt(this,"rewardContainer",new Be),zt(this,"rewardPool",[]),zt(this,"activeCount",0),zt(this,"btnBuy"),zt(this,"btnRedGem"),zt(this,"guideSecretary"),zt(this,"data",null),zt(this,"purchasing",!1),zt(this,"requestPending",!1),this.outSideClickHide=!0;
- for(let t=0;
- t<5;
- t++){
- const t=new g3;
- t.visible=!1,this.rewardPool.push(t),this.rewardContainer.addChild(t)}
- this.contentContainer.addChild(this.lblName,this.lblDesc,this.lblRewardsTitle,this.rewardContainer),aD.setLabelWrapWidth(this.lblDesc,this.width-60),this.btnBuy=new zV("구매",120),this.btnBuy.color=QL.BROWN,this.btnBuy.height=55,this.btnBuy.width=120,this.addChild(this.btnBuy),this.btnBuy.onClick=this.onBuyClick.bind(this),this.btnRedGem=new UB("UI_RED_GEM_ICON","0"),this.btnRedGem.color=QL.BROWN,this.btnRedGem.height=this.btnBuy.height,this.btnRedGem.width=this.btnBuy.width,this.addChild(this.btnRedGem),this.btnRedGem.onClick=this.onRedGemClick.bind(this),this.btnBuy.visible=!1,this.btnRedGem.visible=!1}
- showProduct(t){
- this.data=null,this.outSideClickHide=!0,this.update(t),this.btnBuy.visible=!1,this.btnRedGem.visible=!1,this.updateLayout(),super.show()}
- buyProduct(t){
- this.data=t,this.outSideClickHide=!1,this.update(t);
- const i=Q2.getInstance();
- this.btnBuy.text=i.getPriceStr(t.productId),this.btnRedGem.text=String(i.getRedGemPrice(t.productId)),this.btnBuy.visible=!0,this.btnRedGem.visible=!0,this.updateLayout(),super.show()}
- update(t){
- const i=AG.getText(`PRODUCT_NAME_${
- t.id}
- `,t.name??""),s=Math.max(60,this.width-60);
- if(aD.setLabelWrapWidth(this.lblName,s),aD.setLabelWrapWidth(this.lblDesc,s),this.title=i,this.lblName.text=i,t.descriptionLangIds){
- const i=t.descriptionLangIds.split("|").map(t=>AG.getText(t.trim(),""));
- this.lblDesc.text=i.filter(t=>t).join("\n")||t.descriptions||""}
- else this.lblDesc.text=(t.descriptions??"").replace(/\\n/g,"\n");
- const e=(t.rewards??[]).map(t=>"instant"===t.type&&"dungeonTicket"===t.subType?{
- ...t,type:"dungeonTicket"}
- :t).filter(t=>"buff"!==t.type&&"bonusGem"!==t.type&&"pass"!==t.type);
- this.buildRewards(e);
- const n=e.length>0;
- this.lblRewardsTitle.visible=!1,this.rewardContainer.visible=n,t.productId==Y2.Secretary||t.productId==Y2.Secretary_Day30?(this.guideSecretary||(this.guideSecretary=new h6,this.addChild(this.guideSecretary)),this.guideSecretary.setData(),this.guideSecretary.visible=!0):this.guideSecretary&&(this.guideSecretary.visible=!1)}
- buildRewards(t){
- for(const e of this.rewardPool)e.visible=!1;
- this.activeCount=Math.min(t.length,this.rewardPool.length);
- for(let e=0;
- e<this.activeCount;
- e++){
- const i=this.rewardPool[e];
- i.setDataFrom(t[e]),i.visible=!0}
- let i=0;
- for(let e=0;
- e<this.activeCount;
- e++)i+=this.rewardPool[e].width;
- i+=10*Math.max(0,this.activeCount-1);
- let s=.5*(this.width-i);
- for(let e=0;
- e<this.activeCount;
- e++)this.rewardPool[e].x=s,s+=this.rewardPool[e].width+10}
- updateLayout(){
- this.lblName.x=Math.max(30,.5*(this.width-this.lblName.width)),this.lblName.y=80,this.lblDesc.x=Math.max(30,.5*(this.width-this.lblDesc.width)),this.lblDesc.y=this.lblName.y+this.lblName.height+12,this.rewardContainer.y=this.lblDesc.y+this.lblDesc.height+20,this.btnRedGem.x=.5*(this.width-this.btnRedGem.width-this.btnBuy.width-20),this.btnBuy.x=this.btnRedGem.x+this.btnRedGem.width+20;
- const t=this.activeCount>0?this.rewardPool[0].height:0;
- let i=this.rewardContainer.y+t+45;
- this.guideSecretary&&this.guideSecretary.visible&&(this.guideSecretary.x=.5*(this.width-this.guideSecretary.width),this.guideSecretary.y=this.lblDesc.y+this.lblDesc.height+20,i+=this.guideSecretary.height),this.btnBuy.visible&&(this.btnBuy.y=i,this.btnRedGem.y=i,i+=this.btnBuy.height+40),this.height=i}
- async onBuyClick(){
- try{
- if(!this.data)return;
- if(this.purchasing)return;
- this.purchasing=!0,await e6.getInstance().buyProduct(this.data.productId),this.purchasing=!1}
- catch(wgt){
- this.purchasing=!1}
- finally{
- this.hide()}
- }
- async onRedGemClick(){
- if(!this.data)return;
- const t=Q2.getInstance(),i=t.getRedGemPrice(this.data.productId);
- if(_L.redGem<i)return void mG.getInstance().show(AG.getText("GAME_952","붉은 보석이 부족합니다."));
- const s=AG.getValueReplace("GAME_950","##",t.getRedGemPrice(this.data.productId),"붉은 보석 ##개를 소모하여 상품을 구매하시겠습니까?"),e=r3.getInstance();
- e.setPositonRatioY(.45),e.show(s,this.onRedGemConfirm.bind(this))}
- async onRedGemConfirm(){
- var t;
- if(!this.data)return;
- if(1==this.requestPending)return;
- this.setRequestPending(!0);
- let i=await hD.getInstance().shop.confirmRedGemPayment(this.data.productId,!0);
- if(0==i.success)return this.setRequestPending(!1),void mG.getInstance().showError(i);
- this.hide(),this.setRequestPending(!1);
- const s=this.data.productId,e=Q2.getInstance().getByProductId(s);
- let n;
- try{
- n=structuredClone(e)}
- catch(o){
- n=JSON.parse(JSON.stringify(e))}
- i.body&&(_L.setUserInfo(i.body,!1),i.body.products&&Q2.getInstance().setProducts(i.body.products));
- const h=Q2.getInstance().getRewardMessage(null==(t=i.body)?void 0:t.rewardTypes);
- mG.getInstance().show(h),lS.getInstance().dispatchCustomEvent("PaymentSuccess",{
- productId:s,productVo:n}
- );
- let r=!1;
- for(const a of n.rewards)"instant"==a.type&&"petTicket"==a.subType&&(r=!0);
- r&&this.updatePetTicket()}
- async updatePetTicket(){
- const{
- SpiritLandDataManager:t}
- =await Jt(async()=>{
- const{
- SpiritLandDataManager:t}
- =await Promise.resolve().then(()=>bL);
- return{
- SpiritLandDataManager:t}
- }
- ,void 0);
- t.getInstance().isDataLoaded=!1}
- setRequestPending(t){
- this.requestPending=t}
- }
- ;
- Kt(r6,"BaseShopProductPopup");
- let o6=r6;
- const a6=class t extends o6{
- constructor(){
- super(),zt(this,"image"),zt(this,"timeContainer"),zt(this,"timeBg"),zt(this,"timeIcon"),zt(this,"timeLbl"),zt(this,"endTime",-1),zt(this,"count",0),zt(this,"onEnterUpdate",Kt(()=>{
- ++this.count<60||(this.count=0,this.refresh())}
- ,"onEnterUpdate")),zt(this,"onPaymentSuccessBind"),this.timeContainer=new Be,this.addChild(this.timeContainer),this.timeBg=new CM({
- texture:ZA.getTexture("UI_Ekkorr","Progress_Bar_Bg_LightGreen"),leftWidth:20,topHeight:13,rightWidth:20,bottomHeight:13}
- ),this.timeBg.alpha=.5,this.timeBg.width=160,this.timeContainer.addChild(this.timeBg),this.timeIcon=new We(ZA.getTexture("UI_Ekkorr","Icon_Time02")),this.timeIcon.x=20,this.timeContainer.addChild(this.timeIcon);
- const t=aD.DEFAULT_FONT_OPTION_18;
- t.fill=aD.COLOR_WHITE,t.stroke={
- color:"#000000",width:3,join:"round"}
- ,this.timeLbl=new YD("00:00:00",t.fill,t),this.timeLbl.x=this.timeIcon.x+this.timeIcon.width+10,this.timeLbl.y=.5*(this.timeBg.height-this.timeLbl.height),this.timeContainer.addChild(this.timeLbl)}
- static getInstance(){
- return this._instance||(this._instance=new t),this._instance}
- async buyProduct2(t,i){
- const s=Q2.getInstance().getByProductId(t);
- if(s){
- if(this.endTime=i,this.refresh(),GM.getInstance().add(this.onEnterUpdate,this),!this.image){
- this.image=new We,this.addChildAt(this.image,0);
- const{
- AssetPathManager:t}
- =await Jt(async()=>{
- const{
- AssetPathManager:t}
- =await Promise.resolve().then(()=>JA);
- return{
- AssetPathManager:t}
- }
- ,void 0),{
- Assets:i}
- =await Jt(async()=>{
- const{
- Assets:t}
- =await Promise.resolve().then(()=>xM);
- return{
- Assets:t}
- }
- ,void 0),s=t.getAssetPath("CharShopProduct.png"),e=await i.load(s);
- this.image.texture=e,this.image.x=.5*(this.width-this.image.width),this.image.y=-this.image.height}
- this.buyProduct(s),this.setPaymentSuccess(!0)}
- }
- refresh(){
- if(ix.time<this.endTime){
- this.timeLbl.text=uU.displayTime(.001*(this.endTime-ix.time));
- const t=this.timeBg.width-2*this.timeIcon.x-this.timeIcon.width;
- this.timeLbl.x=this.timeIcon.x+this.timeIcon.width+.5*(t-this.timeLbl.width)}
- else this.hide()}
- hide(){
- super.hide(),this.setPaymentSuccess(!1),GM.getInstance().remove(this.onEnterUpdate,this)}
- updateLayout(){
- super.updateLayout();
- const t=this.activeCount>0?this.rewardPool[0].height:0;
- let i=this.rewardContainer.y+t+30;
- this.guideSecretary&&this.guideSecretary.visible&&(this.guideSecretary.x=.5*(this.width-this.guideSecretary.width),this.guideSecretary.y=this.lblDesc.y+this.lblDesc.height+20,i+=this.guideSecretary.height),this.timeContainer&&(this.timeContainer.x=.5*(this.width-this.timeContainer.width),this.timeContainer.y=i,i+=this.timeContainer.height+45),this.btnBuy.visible&&(this.btnBuy.y=i,this.btnRedGem.y=i,i+=this.btnBuy.height+40),this.height=i}
- setPaymentSuccess(t){
- lS.getInstance().removeEventListener("PaymentSuccess",this.onPaymentSuccessBind),t&&(this.onPaymentSuccessBind=this.onPaymentSuccess.bind(this),lS.getInstance().addEventListener("PaymentSuccess",this.onPaymentSuccessBind))}
- onPaymentSuccess(t){
- var i;
- let s=-1;
- t&&t.detail&&"productId"in t.detail&&(s=t.detail.productId),s===(null==(i=this.data)?void 0:i.productId)&&this.hide()}
- }
- ;
- Kt(a6,"ShopProductPopupWithTimer"),zt(a6,"_instance");
- let c6=a6;
- const l6=class t extends Be{
- constructor(){
- super(),zt(this,"items",[]),zt(this,"itemPool",[]),zt(this,"onPaymentSuccessBind")}
- static getInstance(){
- return null==this.instance&&(this.instance=new t),this.instance}
- add(t,i){
- if(-1!==this.items.findIndex(i=>i.productId===t))return;
- let s;
- this.itemPool.length>0?(s=this.itemPool.pop(),s.reset()):s=new f6("Shop_Shortcut_01"),s.setData(t,i),s.onEndTime=()=>{
- this.onItemEndTime()}
- ,s.onClick=(t,i)=>{
- c6.getInstance().buyProduct2(t,i)}
- ,this.addChild(s),this.items.push(s),this.items.length>0&&this.setPaymentSuccess(!0),this.alignItems()}
- alignItems(){
- let t=0;
- const i=this.items.length;
- for(let s=0;
- s<i;
- ++s)this.items[s].y=t,t+=this.items[s].height+5}
- onItemEndTime(){
- this.update(-1),this.alignItems()}
- setPaymentSuccess(t){
- lS.getInstance().removeEventListener("PaymentSuccess",this.onPaymentSuccessBind),t&&(this.onPaymentSuccessBind=this.onPaymentSuccess.bind(this),lS.getInstance().addEventListener("PaymentSuccess",this.onPaymentSuccessBind))}
- onPaymentSuccess(t){
- let i=-1;
- t&&t.detail&&"productId"in t.detail&&(i=t.detail.productId),-1!==i&&this.update(i)}
- update(t){
- const i=this.items.findIndex(i=>i.productId===t);
- if(-1===i)return;
- const s=this.items[i];
- s.reset(),s.removeFromParent(),this.items.splice(i,1),this.itemPool.push(s),0==this.items.length&&this.setPaymentSuccess(!1)}
- }
- ;
- Kt(l6,"ShopProductGroup"),zt(l6,"instance");
- let u6=l6;
- const d6=class extends mB{
- constructor(t,i=1){
- super("UI_Ekkorr",t,i),zt(this,"container"),zt(this,"timeBg"),zt(this,"timeLbl"),zt(this,"_productId",-1),zt(this,"_endTime",-1),zt(this,"count",0),zt(this,"onEnterUpdate",Kt(()=>{
- ++this.count<60||(this.count=0,this.update())}
- ,"onEnterUpdate")),zt(this,"onEndTime",null),this.container=new Be,this.addChild(this.container),this.container.x=this.bg.x,this.container.y=this.bg.y,this.bg.x=0,this.bg.y=0,this.container.addChild(this.bg),this.timeBg=new CM({
- texture:ZA.getTexture("UI_Ekkorr","Progress_Bar_Bg"),leftWidth:20,topHeight:13,rightWidth:20,bottomHeight:13}
- ),this.timeBg.alpha=.7,this.timeBg.width=70,this.timeBg.x=this.bg.x-.5*this.timeBg.width,this.timeBg.y=this.bg.y+.5*this.bg.height-.75*this.timeBg.height,this.container.addChild(this.timeBg);
- const s=aD.DEFAULT_FONT_OPTION_15;
- s.fill=aD.COLOR_WHITE,s.stroke={
- color:"#000000",width:3,join:"round"}
- ,this.timeLbl=new YD("00:00:00",s.fill,s),this.timeLbl.x=this.timeBg.x+.5*(this.timeBg.width-this.timeLbl.width),this.timeLbl.y=this.timeBg.y+.5*(this.timeBg.height-this.timeLbl.height)-1,this.container.addChild(this.timeLbl)}
- get productId(){
- return this._productId}
- get endTime(){
- return this._endTime}
- setData(t,i){
- this._productId=t,this._endTime=i,this.update(),GM.getInstance().add(this.onEnterUpdate,this)}
- update(){
- if(ix.time<this._endTime)this.timeLbl.text=uU.displayTime(.001*(this._endTime-ix.time)),this.timeLbl.x=this.timeBg.x+.5*(this.timeBg.width-this.timeLbl.width);
- else{
- const t=this.onEndTime;
- this.reset(),t&&t()}
- }
- reset(){
- this._endTime=-1,this._productId=-1,this.onEndTime=null,GM.getInstance().remove(this.onEnterUpdate,this)}
- onDown(){
- this.container.scale.set(.9*this.iconScale)}
- onUp(){
- this.container.scale.set(1*this.iconScale),KL.getInstance().playSFX(KL.SFX_NORMAL_CLICK),WL(),this.onClick&&this.onClick(this._productId,this._endTime)}
- }
- ;
- Kt(d6,"ShopProductItem");
- let f6=d6;
- var p6=(t=>(t.ACCOUNT_CREATE="ACCOUNT_CREATE",t))(p6||{
- }
- );
- const g6=class t{
- static getInstance(){
- return this._instance||(this._instance=new t),this._instance}
- doAccountCreate(){
- const t=Q2.getInstance(),i=t.getTargetingByType(p6.ACCOUNT_CREATE);
- if(!i)return;
- const s=t.getByProductId(i[0]);
- if(!s||!s.active)return;
- let e=new Date(_L.regTime);
- const n=EL.getInstance().getClientData("PRODUCT_START_TIME_29");
- if(n){
- let t=new Date(n);
- e.getTime()<t.getTime()&&(e=t)}
- const h=s.targeting.durationMinutes??0;
- let r=e.getTime()+60*h*1e3;
- r<ix.time||t.isAvailableForPurchase(s)&&u6.getInstance().add(s.productId,r)}
- }
- ;
- Kt(g6,"ShopProductTrigger"),zt(g6,"_instance");
- let m6=g6;
- const w6=class t{
- static get opened(){
- return!1}
- static async getMyReferralCode(){
- if(this._referralCode)return this._referralCode;
- if(this.requestPending1)return this._referralCode;
- this.requestPending1=!0;
- const t=await hD.getInstance().referral.getMyReferralCode();
- try{
- const i=new URL(t);
- Array.from(i.searchParams.keys()).length>0&&(this._referralCode=t)}
- catch(i){
- }
- return this.requestPending1=!1,this._referralCode}
- static async getMyReferralStatus(t,i=!1){
- this.requestPending2||(this.requestPending2=!0,this.setStatusData({
- totalReferrals:10,qualifiedReferrals:7,claimed:2,milestoneRewards:[{
- milestone:10,weaponGrade:3}
- ,{
- milestone:20,weaponGrade:3}
- ,{
- milestone:30,weaponGrade:3}
- ,{
- milestone:40,weaponGrade:4}
- ,{
- milestone:50,weaponGrade:4}
- ]}
- ),this.requestPending2=!1,lS.getInstance().dispatchCustomEvent("ReferralStatus"))}
- static setStatusData(t){
- this._totalReferrals=Number(t.totalReferrals),this._qualifiedReferrals=Number(t.qualifiedReferrals),this._claimed=Number(t.claimed);
- const i=t.milestoneRewards;
- if(0==this.rewardList.length&&"length"in i){
- const t=i[i.length-1].milestone;
- for(let i=0;
- i<t;
- ++i)this.rewardList.push([{
- type:"gem",amount:this.GEM_PER_FRIEND}
- ]);
- const s=i.length;
- for(let e=0;
- e<s;
- ++e){
- const t=Number(i[e].milestone),s=Number(i[e].weaponGrade);
- this.rewardList[t-1].push({
- type:"weapon",amount:1,grade:s}
- )}
- }
- }
- static get totalReferrals(){
- return this._totalReferrals}
- static get qualifiedReferrals(){
- return this._qualifiedReferrals}
- static get claimed(){
- return this._claimed}
- static getRewardList(){
- return this.rewardList}
- static async claimRewards(i){
- if(this.requestPending3)return;
- this.requestPending3=!0;
- const s=await hD.getInstance().referral.claimReward(i,!0);
- if(0==s.success){
- this.requestPending3=!1,lS.getInstance().dispatchCustomEvent("ReferralStatus");
- let e=s.errorMessage;
- const n=s.error;
- return"INSUFFICIENT_REFERRAL"==n?e=AG.getValueReplaceMulti("GAME_145",["##","@@"],[t.FRIEND_LEVEL,i]):"ALREADY_CLAIMED"==n&&(e=AG.getText("COMMON_276","이미 보상을 받았습니다.")),void mG.getInstance().show(e)}
- "status"in s.body&&this.setStatusData(s.body.status),this.requestPending3=!1,lS.getInstance().dispatchCustomEvent("ReferralStatus",s)}
- static hasReward(){
- return this.claimed<this.qualifiedReferrals}
- }
- ;
- Kt(w6,"FriendInviteManager"),zt(w6,"FRIEND_LEVEL",50),zt(w6,"GEM_PER_FRIEND",100),zt(w6,"_referralCode",""),zt(w6,"requestPending1",!1),zt(w6,"requestPending2",!1),zt(w6,"_totalReferrals",0),zt(w6,"_qualifiedReferrals",0),zt(w6,"_claimed",0),zt(w6,"rewardList",[]),zt(w6,"requestPending3",!1);
- let v6=w6;
- var b6=(t=>(t.GAME="GAME",t.PAYMENT="PAYMENT",t))(b6||{
- }
- );
- const y6=class{
- constructor(){
- zt(this,"index",-1),zt(this,"id"),zt(this,"gameId"),zt(this,"title"),zt(this,"content"),zt(this,"rewards"),zt(this,"receivedAt"),zt(this,"createdAt"),zt(this,"mailType"),zt(this,"typeArray"),zt(this,"subTypeArray"),zt(this,"amountArray"),zt(this,"gradeArray"),zt(this,"kindNumArray"),this.index=-1,this.id=-1,this.gameId="",this.title="",this.content="",this.rewards=[],this.createdAt=null,this.receivedAt=null,this.mailType="",this.typeArray=[],this.subTypeArray=[],this.amountArray=[],this.gradeArray=[],this.kindNumArray=[]}
- setData(t,i){
- t&&(this.id=Number(t.id),this.gameId=String(t.gameId),this.title=t.title,this.content=t.content,this.rewards=t.rewards,this.createdAt=t.createdAt,t.receivedAt?this.receivedAt=t.receivedAt:this.receivedAt=null,this.mailType=i,this.typeArray.length=0,this.subTypeArray.length=0,this.amountArray.length=0,this.gradeArray.length=0,this.kindNumArray.length=0)}
- get hasReward(){
- return!(!this.rewards||0==this.rewards.length)&&Object.values(this.rewards).some(t=>!!t&&("number"==typeof t?t>0:!!t))}
- get hasClaimableReward(){
- return this.hasReward&&null==this.receivedAt}
- get isDeletable(){
- return null!=this.receivedAt}
- reset(){
- this.index=-1,this.id=-1,this.gameId="",this.title="",this.content="",this.rewards.length=0,this.createdAt=null,this.receivedAt=null,this.mailType="",this.typeArray.length=0,this.subTypeArray.length=0,this.amountArray.length=0,this.gradeArray.length=0,this.kindNumArray.length=0}
- }
- ;
- Kt(y6,"MailVO");
- let _6=y6;
- const M6=class{
- static async getMailList(t=1){
- let i=await hD.getInstance().mail.list(t,this.pageSize);
- 0!=i.success?t>this.page?this.setData(i.body,!0):this.setData(i.body):lS.getInstance().dispatchCustomEvent("MailUpdate")}
- static setData(t,i=!1){
- let s,e,n,h;
- if(t.mailList){
- const r=t.mailList;
- for(0==i?(h=[...this.gameList],this.gameList.length=0):h=[],e=r.length,s=0;
- s<e;
- ++s){
- r[s].content=this.filterContent(r[s].content);
- const t=Number(r[s].id),i=h.findIndex(i=>i.id===t);
- -1===i?n=this.getMailEmptyVO():(n=h.splice(i,1)[0],n.reset()),n.setData(r[s],b6.GAME),this.gameList.push(n),this.gameMailMap[n.id]=n}
- this.addListPool(h)}
- if(t.paymentMailList){
- const r=t.paymentMailList;
- for(0==i?(h=[...this.paymentList],this.paymentList.length=0):h=[],e=r.length,s=0;
- s<e;
- ++s){
- r[s].content=this.filterContent(r[s].content);
- const t=Number(r[s].id),i=h.findIndex(i=>i.id===t);
- -1===i?n=this.getMailEmptyVO():(n=h.splice(i,1)[0],n.reset()),n.setData(r[s],b6.PAYMENT),this.paymentList.push(n),this.paymentMailMap[n.id]=n,n.index=this.paymentList.length}
- this.addListPool(h)}
- "mailTotal"in t&&(this.mailsTotal=Number(t.mailTotal)),"mailTotalPages"in t&&(this.mailTotalPages=Number(t.mailTotalPages)),"paymentTotal"in t&&(this.paymentMailsTotal=Number(t.paymentTotal)),"paymentTotalPages"in t&&(this.paymentTotalPages=Number(t.paymentTotalPages)),this.updatePage(),this.updateNeeded=!1,lS.getInstance().dispatchCustomEvent("MailUpdate"),this.log()}
- static filterContent(t){
- return t.replace(/\r\n/g,"\n")}
- static onMailDeleteAndUpdate(t){
- t==b6.PAYMENT?(this.paymentMailsTotal>0&&this.paymentMailsTotal--,this.paymentTotalPages=Math.floor((this.paymentMailsTotal-1)/this.pageSize)+1):(this.mailsTotal>0&&this.mailsTotal--,this.mailTotalPages=Math.floor((this.mailsTotal-1)/this.pageSize)+1),this.updatePage()}
- static updatePage(){
- const t=Math.max(this.gameList.length,this.paymentList.length);
- this.page=Math.floor((t-1)/this.pageSize)+1,this.page<1&&(this.page=1)}
- static log(){
- }
- static getGameMailWithId(t){
- return this.gameMailMap[t]}
- static getPaymentMailWithId(t){
- return this.paymentMailMap[t]}
- static getMailCount(t){
- return t==b6.PAYMENT?this.paymentList.length:this.gameList.length}
- static getMailTotal(t){
- return t==b6.PAYMENT?this.paymentMailsTotal:this.mailsTotal}
- static getMailTotalPage(t){
- return t==b6.PAYMENT?this.paymentTotalPages:this.mailTotalPages}
- static isAllMailLoaded(t){
- let i=0,s=0,e=0;
- return t==b6.PAYMENT?(i=this.paymentList.length,s=this.paymentMailsTotal,e=this.paymentTotalPages):(i=this.gameList.length,s=this.mailsTotal,e=this.mailTotalPages),!(Math.floor((i-1)/this.pageSize)+1<e||i<s)}
- static getPage(){
- return this.page}
- static getPageSize(){
- return this.pageSize}
- static getDisplaySize(){
- return this.displaySize}
- static setDisplaySize(t){
- t>0&&(this.displaySize=t)}
- static getMailEmptyVO(){
- if(this.mailPool.length>0){
- let t=this.mailPool.pop();
- return t?t.reset():t=new _6,t}
- return new _6}
- static addPool(t){
- t&&(t.reset(),this.mailPool.push(t))}
- static addListPool(t){
- if(!t)return;
- let i;
- const s=t.length;
- for(let e=0;
- e<s;
- ++e)i=t[e],i&&(i.reset(),this.mailPool.push(i))}
- static removeGameMail(t){
- const i=this.gameList.findIndex(i=>i.id===t);
- -1!==i&&(this.gameList.splice(i,1),this.addPool(this.gameMailMap[t]),delete this.gameMailMap[t])}
- static removePaymentMail(t){
- const i=this.paymentList.findIndex(i=>i.id===t);
- -1!==i&&(this.paymentList.splice(i,1),this.addPool(this.paymentMailMap[t]),delete this.paymentMailMap[t])}
- static get hasDeletableGameMail(){
- return-1!==this.gameList.findIndex(t=>!0===t.isDeletable)}
- static get hasDeletablePaymentMail(){
- return-1!==this.paymentList.findIndex(t=>!0===t.isDeletable)}
- static get hasDeletableMail(){
- return this.hasClaimableGameReward||this.hasClaimablePaymentReward}
- static get hasClaimableReward(){
- return this.hasClaimableGameReward||this.hasClaimablePaymentReward}
- static get hasClaimableGameReward(){
- return this.checkClaimableReward(this.gameList)}
- static get hasClaimablePaymentReward(){
- return this.checkClaimableReward(this.paymentList)}
- static checkClaimableReward(t){
- const i=t.length;
- for(let s=0;
- s<i;
- ++s)if(t[s].hasClaimableReward)return!0;
- return!1}
- }
- ;
- Kt(M6,"MailManager"),zt(M6,"updateNeeded",!0),zt(M6,"mailPool",[]),zt(M6,"gameList",[]),zt(M6,"paymentList",[]),zt(M6,"gameMailMap",{
- }
- ),zt(M6,"paymentMailMap",{
- }
- ),zt(M6,"mailsTotal",0),zt(M6,"mailTotalPages",0),zt(M6,"paymentMailsTotal",0),zt(M6,"paymentTotalPages",0),zt(M6,"page",1),zt(M6,"pageSize",20),zt(M6,"displaySize",8);
- let E6=M6;
- var A6=(t=>(t.NOT_PURCHASE="NOT_PURCHASE",t.CREATED="CREATED",t.PENDING="PENDING",t.COMPLETED="COMPLETED",t.FAILED="FAILED",t))(A6||{
- }
- );
- const S6=class{
- constructor(){
- zt(this,"id",-1),zt(this,"productId",-1),zt(this,"paybackType",""),zt(this,"paybackValue",-1),zt(this,"status",""),zt(this,"paidbackAt",null)}
- }
- ;
- Kt(S6,"PaybackEventUserVO");
- let T6=S6;
- const C6=class{
- constructor(){
- zt(this,"id",-1),zt(this,"title",""),zt(this,"description",[]),zt(this,"startTime",null),zt(this,"endTime",null),zt(this,"paybackEndTime",null)}
- }
- ;
- Kt(C6,"PaybackEventVO");
- let k6=C6;
- const O6=class{
- static get opened(){
- return!1}
- static async getPaybackEvent(t,i=!1){
- let s=await hD.getInstance().payback.getPaybackEvent(t,i);
- s=this.getTestData(),0!=s.success?(this.setData(s.body),lS.getInstance().dispatchCustomEvent("PaybackEvent")):lS.getInstance().dispatchCustomEvent("PaybackEvent")}
- static setData(t){
- this.setPaybackEventData(t),this.setPaybackUserData(t)}
- static setPaybackEventData(t){
- if(!t||!t.paybackEvent)return void(this.paybackEvent.id=0);
- const i=t.paybackEvent;
- this.paybackEvent.id=Number(i.id),this.paybackEvent.title=String(i.title),this.paybackEvent.description=String(i.description).split("|"),this.paybackEvent.startTime=new Date(i.startTime),this.paybackEvent.endTime=new Date(i.endTime),this.paybackEvent.paybackEndTime=new Date(i.paybackEndTime)}
- static getEventDurationStr(t){
- const i={
- startTimeStr:"",endTimeStr:"",paybackEndTimeStr:""}
- ,s="YYYY-MM-DD";
- let e="00:00:00";
- if(t.startTime){
- const n=t.startTime,h=s.replace("YYYY",String(n.getUTCFullYear())).replace("MM",uU.digit(n.getUTCMonth()+1)).replace("DD",uU.digit(n.getUTCDate()));
- e=`${
- uU.digit(n.getUTCHours())}
- :${
- uU.digit(n.getUTCMinutes())}
- :${
- uU.digit(n.getUTCSeconds())}
- `,i.startTimeStr=h}
- let n="23:59:59";
- if(t.endTime){
- const e=t.endTime,h=s.replace("YYYY",String(e.getUTCFullYear())).replace("MM",uU.digit(e.getUTCMonth()+1)).replace("DD",uU.digit(e.getUTCDate()));
- n=`${
- uU.digit(e.getUTCHours())}
- :${
- uU.digit(e.getUTCMinutes())}
- :${
- uU.digit(e.getUTCSeconds())}
- `,i.endTimeStr=h}
- let h="23:59:59";
- if(t.paybackEndTime){
- const e=t.paybackEndTime,n=s.replace("YYYY",String(e.getUTCFullYear())).replace("MM",uU.digit(e.getUTCMonth()+1)).replace("DD",uU.digit(e.getUTCDate()));
- h=`${
- uU.digit(e.getUTCHours())}
- :${
- uU.digit(e.getUTCMinutes())}
- :${
- uU.digit(e.getUTCSeconds())}
- `,i.paybackEndTimeStr=n}
- return"00:00:00"==e&&"23:59:59"==n&&"23:59:59"==h||(i.startTimeStr+=" "+e,i.endTimeStr+=" "+n,i.paybackEndTimeStr+=" "+h),i}
- static setPaybackUserData(t){
- if(!t||!t.paybacks)return;
- const i=t.paybacks,s=i.length;
- if(0==this.paybacks.length)for(let h=0;
- h<s;
- ++h)this.paybacks.push(new T6);
- let e,n;
- for(let h=0;
- h<s;
- ++h)e=i[h],n=this.paybacks[h],n.id=Number(e.id),n.productId=Number(e.productId),n.paybackType=String(e.paybackType),n.paybackValue=Number(e.paybackValue),n.status=String(e.status),n.paidbackAt=new Date(String(e.paidbackAt))}
- static isEventEnded(){
- const t=this.paybackEvent;
- return t.id<0||!t.endTime||!(gP.serverTime<t.endTime.getTime())}
- static isPaybackEnded(){
- const t=this.paybackEvent;
- return t.id<0||!t.paybackEndTime||!(gP.serverTime<t.paybackEndTime.getTime())}
- static hasReward(){
- if(1==this.isPaybackEnded())return!1;
- let t;
- const i=this.paybacks.length;
- for(let s=0;
- s<i;
- ++s)if(t=this.paybacks[s],t.status==A6.CREATED||t.status==A6.FAILED)return!0;
- return!1}
- static getTestData(){
- return{
- header:{
- sts:1771417950938}
- ,body:{
- paybackEvent:{
- id:7,gameId:"smith",active:1,subId:3,title:"PAYBACK_T1",description:"PAYBACK_H1|PAYBACK_H2|PAYBACK_H3|PAYBACK_H4|PAYBACK_H5|PAYBACK_H6",startTime:"2026-02-17T00:00:00.000Z",endTime:"2026-02-20T21:59:59.000Z",paybackEndTime:"2026-02-20T23:59:59.000Z"}
- ,paybacks:[{
- id:21,gameId:"smith",subId:3,step:1,productId:111,reqProductId:0,paybackType:"slx",paybackValue:299,status:"COMPLETED",paidbackAt:null}
- ,{
- id:22,gameId:"smith",subId:3,step:2,productId:112,reqProductId:111,paybackType:"slx",paybackValue:998,status:"CREATED",paidbackAt:null}
- ,{
- id:23,gameId:"smith",subId:3,step:3,productId:113,reqProductId:112,paybackType:"slx",paybackValue:4995,status:"NOT_PURCHASE",paidbackAt:null}
- ,{
- id:24,gameId:"smith",subId:3,step:4,productId:114,reqProductId:113,paybackType:"slx",paybackValue:9990,status:"NOT_PURCHASE",paidbackAt:null}
- ,{
- id:25,gameId:"smith",subId:3,step:5,productId:115,reqProductId:114,paybackType:"slx",paybackValue:19980,status:"NOT_PURCHASE",paidbackAt:null}
- ,{
- id:26,gameId:"smith",subId:3,step:6,productId:116,reqProductId:115,paybackType:"slx",paybackValue:49950,status:"NOT_PURCHASE",paidbackAt:null}
- ,{
- id:27,gameId:"smith",subId:3,step:7,productId:117,reqProductId:116,paybackType:"slx",paybackValue:99900,status:"NOT_PURCHASE",paidbackAt:null}
- ]}
- ,_success_:!0,_ok_:!0,_status_:201}
- }
- }
- ;
- Kt(O6,"PaybackEventManager"),zt(O6,"paybackEvent",new k6),zt(O6,"paybacks",[]);
- let I6=O6;
- const x6=class extends Be{
- constructor(t=552,i=106,s="Banner"){
- super(),zt(this,"banner"),zt(this,"bannerName",""),zt(this,"sheetName","Banner"),zt(this,"_width",552),zt(this,"_height",106),zt(this,"_imageWidth",-1),zt(this,"_imageHeight",-1),zt(this,"_autoResize",!1),this._width=t,this._height=i,this.sheetName=s,this.banner=new We,this.addChild(this.banner)}
- get width(){
- return this._width}
- get height(){
- return this._height}
- get imageWidth(){
- return this._imageWidth}
- get imageHeight(){
- return this._imageHeight}
- get autoResize(){
- return this._autoResize}
- set autoResize(t){
- t!=this._autoResize&&(this._autoResize=t,this._imageWidth<0||this._imageHeight<0||(this._autoResize?(this.banner.width=this._width,this.banner.height=this._height):(this.banner.width=this._imageWidth,this.banner.height=this._imageHeight)))}
- async update(t,i=-1,s=-1,e="Banner"){
- if(t==this.bannerName)return;
- if(this.bannerName=t,this.sheetName=e,!1===ZA.hasSheet(this.sheetName)){
- const t="ktx2";
- await ZA.generateTexture(this.sheetName,t,!1)}
- let n=ZA.getTexture(this.sheetName,this.bannerName);
- this.banner.texture=n,this._imageWidth=n.width,this._imageHeight=n.height,this._autoResize?(this.banner.width=this._width,this.banner.height=this._height):(this.banner.width=this._imageWidth,this.banner.height=this._imageHeight)}
- }
- ;
- Kt(x6,"BannerImage");
- let N6=x6;
- const P6=class t extends Be{
- static getInstance(){
- return this._instance||(this._instance=new t),this._instance}
- constructor(){
- super()}
- }
- ;
- Kt(P6,"RewardLayer"),zt(P6,"_instance");
- let R6=P6;
- const D6=class extends mB{
- constructor(){
- super("UI_Ekkorr","Btn_Delete",1)}
- get activated(){
- return this._activated}
- set activated(t){
- t!=this._activated&&(this._activated=t,this._activated?this.bg.texture=ZA.getTexture("UI_Ekkorr","Btn_Delete"):this.bg.texture=ZA.getTexture("UI_Ekkorr","Btn_Delete_Gray"))}
- }
- ;
- Kt(D6,"MailDeleteAllButton");
- let L6=D6;
- const G6=class t extends Be{
- constructor(i){
- super(),zt(this,"bg"),zt(this,"lbl"),zt(this,"container"),zt(this,"_width",100),zt(this,"_minWidth",100),zt(this,"_height",58),zt(this,"_textSize",19),zt(this,"_activated",!0),zt(this,"_activatedTextColor",16777215),zt(this,"_deactivatedTextColor",10066329),zt(this,"_outlineText",!1),zt(this,"_resizable",!1),zt(this,"_padding",20),zt(this,"_color",t.COLOR_SAND_BROWN),zt(this,"onClick"),zt(this,"redDot"),this.container=new Be,this.addChild(this.container),this.bg=new CM({
- texture:ZA.getTexture("UI_Ekkorr",this._color),leftWidth:40,topHeight:27,rightWidth:40,bottomHeight:29}
- ),this.bg.width=this._width,this.bg.height=this._height,this.container.addChild(this.bg);
- const s=aD.LABEL_OPTION_NO_DROP_SHADOW;
- s.fill=aD.COLOR_WHITE,s.fontSize=this._textSize,this.lbl=new YD(i,s.fill,s),this.container.addChild(this.lbl),this.updateLayout(),this.eventMode="dynamic",this.on("pointerdown",this.onDown,this),this.on("pointerup",this.onUp,this),this.on("pointerupoutside",this.onUp,this),this.on("pointertap",this.onTap,this),this.container.pivot.set(.5*this._width,.5*this._height)}
- updateLayout(){
- this._resizable?aD.setLabelWrapWidth(this.lbl,5*this._width):aD.setLabelWrapWidth(this.lbl,this._width),this.lbl.x=.5*(this._width-this.lbl.width),this.lbl.y=.5*(this._height-this.lbl.height),this.container.x=.5*this._width,this.container.y=.5*this._height}
- get width(){
- return this._width}
- set width(t){
- t!=this._width&&(this._resizable&&t<this._minWidth&&(t=this._minWidth),this._width=t,this.bg.width=this._width,this.container.pivot.set(.5*this._width,.5*this._height),this.updateLayout())}
- get minWidth(){
- return this._minWidth}
- set minWidth(t){
- t!=this._minWidth&&(this._minWidth=t,this._resizable&&this._width<this._minWidth&&(this.width=this._minWidth))}
- get height(){
- return this._height}
- set height(t){
- t!=this._height&&(this._height=t,this.bg.height=this._height,this.container.pivot.set(.5*this._width,.5*this._height),this.updateLayout())}
- get text(){
- return this.lbl.text}
- set text(t){
- this.lbl.text=t,this._resizable&&(this.width=this.lbl.width+2*this._padding),this.updateLayout()}
- get textSize(){
- return this._textSize}
- set textSize(t){
- t!=this._textSize&&(this._textSize=t,this.lbl.textSize=this._textSize,this.updateLayout())}
- get activated(){
- return this._activated}
- set activated(t){
- t!=this._activated&&(this._activated=t,this._activated,this.updateTextColor())}
- get activatedTextColor(){
- return this._activatedTextColor}
- set activatedTextColor(t){
- t!=this._activatedTextColor&&(this._activatedTextColor=t,this.updateTextColor())}
- get deactivatedTextColor(){
- return this._deactivatedTextColor}
- set deactivatedTextColor(t){
- t!=this._deactivatedTextColor&&(this._deactivatedTextColor=t,this.updateTextColor())}
- updateTextColor(){
- 1==this._activated?this.lbl.textColor=this._activatedTextColor:this.lbl.textColor=this._deactivatedTextColor}
- get outlineText(){
- return this._outlineText}
- set outlineText(t){
- if(t==this._outlineText)return;
- this._outlineText=t;
- const i=this.lbl.getStyle();
- this._outlineText?(delete i.stroke,i.stroke={
- color:"#000000",width:4,join:"round"}
- ):delete i.stroke,this.lbl.setStyle(i),this.updateLayout()}
- get resizable(){
- return this._resizable}
- set resizable(t){
- t!=this._resizable&&(this._resizable=t,this.width=this.lbl.width+2*this._padding,this.updateLayout())}
- getStyle(){
- return this.lbl.getStyle()}
- setStyle(t){
- this.lbl.setStyle(t)}
- setTexture(t){
- if(t)try{
- this.bg.texture=t.texture,this.bg.leftWidth=t.leftWidth,this.bg.topHeight=t.topHeight,this.bg.rightWidth=t.rightWidth,this.bg.bottomHeight=t.bottomHeight}
- catch(i){
- }
- }
- get color(){
- return this._color}
- set color(t){
- if(t!=this._color){
- this._color=t;
- try{
- this.bg.texture=ZA.getTexture("UI_Ekkorr",this._color)}
- catch(i){
- }
- }
- }
- onDown(t){
- 0!=this._activated&&(this.container.scale=.9)}
- onUp(t){
- 0!=this._activated&&(this.container.scale=1)}
- onTap(t){
- 0!=this._activated&&(KL.getInstance().playSFX(KL.SFX_NORMAL_CLICK),WL(),this.onClick&&this.onClick())}
- showRedDot(){
- this.redDot||(this.redDot=new YL,this.container.addChild(this.redDot)),this.redDot.show(),this.updateRedDot()}
- hideRedDot(){
- this.redDot&&this.redDot.hide()}
- updateRedDot(){
- this.redDot&&(this.redDot.x=this.bg.x+this.bg.width-this.redDot.width-12,this.redDot.y=this.bg.y-3)}
- }
- ;
- Kt(G6,"CommonButton2"),zt(G6,"COLOR_SAND_BROWN","Btn_Sand_Brown"),zt(G6,"COLOR_ORANGE","Btn_Orange"),zt(G6,"COLOR_GRAY","Btn_Gray");
- let B6=G6;
- const U6=class extends B6{
- constructor(t){
- super(t),zt(this,"bgOff"),zt(this,"_selected",!0),this.minWidth=180,this.resizable=!0,this.outlineText=!0,this.bgOff=new CM({
- texture:ZA.getTexture("UI_Ekkorr","Btn_Gray"),leftWidth:40,topHeight:27,rightWidth:40,bottomHeight:29}
- ),this.bgOff.width=this._width,this.bgOff.height=this._height,this.container.addChildAt(this.bgOff,0),this.bg.visible=this._selected,this.bgOff.visible=!this._selected}
- get selected(){
- return this._selected}
- set selected(t){
- t!=this._selected&&(this._selected=t,this._selected?(this.bg.visible=!0,this.bgOff.visible=!1):(this.bg.visible=!1,this.bgOff.visible=!0))}
- onTap(t){
- this._selected||super.onTap(t)}
- }
- ;
- Kt(U6,"MailMenuButton");
- let F6=U6;
- const H6=class extends iP{
- constructor(){
- super(),this.sp.x=.5*-this.sp.width,this.sp.y=.5*-this.sp.height,this.offsetX=2,this.scale=.5}
- getTextures(){
- return ZA.getTextures("Loading","loading_circle_60f_")}
- }
- ;
- Kt(H6,"MailLoading");
- let W6=H6;
- const j6=class extends Be{
- constructor(){
- super(),zt(this,"yPrev",0),zt(this,"yHome",0),zt(this,"vy",0),zt(this,"yMax",0),zt(this,"yMin",0),zt(this,"yMouse",0),zt(this,"yOffset",140),zt(this,"min",0),zt(this,"max",0),zt(this,"dragSensorDistance",20),zt(this,"_isDragging",!1),zt(this,"onDragStart",null),zt(this,"onDragEnd",null),this.eventMode="static",this.on("pointerdown",this.onDown,this)}
- get isDragging(){
- return this._isDragging}
- onDown(t){
- this.min>this.max||(this.yMin=this.min,this.yMax=this.max,this.yPrev=this.yHome=this.yMouse=t.globalY,this.off("pointermove",this.onMove,this),this.on("pointermove",this.onMove,this),this.off("pointerup",this.onUp,this),this.on("pointerup",this.onUp,this),this.off("pointerupoutside",this.onUp,this),this.on("pointerupoutside",this.onUp,this),GM.getInstance().remove(this.onFlickEnter,this),GM.getInstance().add(this.onDragEnter,this))}
- onDragEnter(){
- 0==this._isDragging&&Math.abs(this.yMouse-this.yHome)>this.dragSensorDistance&&(this._isDragging=!0,this.onDragStartCallback()),0!=this._isDragging&&(this.vy=this.yMouse-this.yPrev,this.y==this.yMin&&this.vy<0||this.y==this.yMax&&this.vy>0||(this.y+=this.vy,this.y>this.yMax&&(this.y=this.yMax),this.y<this.yMin&&(this.y=this.yMin),this.yPrev=this.yMouse))}
- onMove(t){
- this.yMouse=t.globalY}
- onUp(t){
- 1==this._isDragging&&(this.vy=2*this.vy,GM.getInstance().add(this.onFlickEnter,this),this._isDragging=!1,this.onDragEndCallback()),GM.getInstance().remove(this.onDragEnter,this),this.off("pointermove",this.onMove,this),this.off("pointerup",this.onUp,this),this.off("pointerupoutside",this.onUp,this)}
- onFlickEnter(){
- this.vy*=.98,this.y==this.yMin&&this.vy<0||this.y==this.yMax&&this.vy>0?GM.getInstance().remove(this.onFlickEnter,this):(this.y+=this.vy,this.y>this.yMax&&(this.y=this.yMax),this.y<this.yMin&&(this.y=this.yMin),Math.abs(this.vy)<1&&GM.getInstance().remove(this.onFlickEnter,this))}
- onDragStartCallback(){
- this.onDragStart&&this.onDragStart()}
- onDragEndCallback(){
- this.onDragEnd&&this.onDragEnd()}
- setScroll(t){
- let i=this.max-t;
- i<this.min&&(i=this.min),this.y=i}
- }
- ;
- Kt(j6,"DraggableContainer");
- let $6=j6;
- const V6=class extends Be{
- constructor(){
- super(),zt(this,"bg"),zt(this,"lbl"),zt(this,"count",0),zt(this,"duration",180),this.bg=new CM({
- texture:ZA.getTexture("UI_Ekkorr","UI_Toast_Bg"),leftWidth:6,topHeight:6,rightWidth:6,bottomHeight:6}
- ),this.bg.alpha=.7,this.bg.width=640,this.bg.height=50,this.addChild(this.bg),this.lbl=new YD("Toast",aD.DEFAULT_COLOR),this.lbl.x=.5*(this.bg.width-this.lbl.width),this.lbl.y=25,this.addChild(this.lbl),this.eventMode="none"}
- show(t,i,s=aD.DEFAULT_COLOR,e=null,n=!0,h=180,r=.7){
- this.lbl.text=t,aD.setLabelWrapWidth(this.lbl,this.bg.width-10),this.lbl.textColor=s,this.lbl.x=.5*(this.bg.width-this.lbl.width),this.bg.height=this.lbl.height+2*this.lbl.y,this.y=i-this.height,this.duration=h,this.bg.alpha=r,null==e&&(e=qD.getInstance()),e&&e.addChild(this),1==n&&this.startCheckHide(),i5.showItemsInVertical([this])}
- hide(){
- this.parent&&this.parent.removeChild(this)}
- get width(){
- return this.bg.width}
- get height(){
- return this.bg.height}
- startCheckHide(){
- this.count=0,GM.getInstance().add(this.checkHide,this)}
- checkHide(){
- ++this.count>this.duration&&(this.count=0,this.count=0,this.hide(),GM.getInstance().remove(this.checkHide,this))}
- }
- ;
- Kt(V6,"BaseToast");
- let K6=V6;
- const z6=class t extends K6{
- static getInstance(){
- return this._instance||(this._instance=new t),this._instance}
- constructor(){
- super()}
- }
- ;
- Kt(z6,"Toast"),zt(z6,"_instance");
- let q6=z6;
- const X6=class t{
- constructor(){
- zt(this,"requestPending",!1),zt(this,"obj",{
- }
- ),zt(this,"objByType",{
- }
- ),zt(this,"types",[])}
- static getInstance(){
- return null==this.instance&&(this.instance=new t),this.instance}
- async getInventory(t,i=!1){
- if(this.requestPending)return;
- this.requestPending=!0;
- let s=await hD.getInstance().user.getInventory(t,i);
- if(0==s.success)return this.requestPending=!1,void lS.getInstance().dispatchCustomEvent("UserInventory");
- this.setData(s.body),this.requestPending=!1}
- setData(t){
- if(!t||!t.inventory)return;
- this.obj={
- }
- ,this.objByType={
- }
- ,this.obj.all=[],this.types[0]="all",this.types.length=1;
- const i=t.inventory;
- let s,e,n;
- const h=i.length;
- for(let r=0;
- r<h;
- ++r){
- if(s=i[r].type.toString(),e="subType"in i[r]?i[r].subType.toString():"",n="","ticket"==s)switch(e){
- case"heroGacha":case"heroSelect":n="hero";
- break;
- case"pet":case"petSelect":n="pet";
- break;
- case"treasureGacha":n="relic"}
- ""!=n&&(e&&(this.objByType[`${
- s}
- _${
- e}
- `]=i[r]),i[r].inventoryType=n,this.obj[n]||(this.obj[n]=[]),this.obj[n].push(i[r]),this.obj.all.push(i[r]),this.types.includes(n)||this.types.push(n))}
- lS.getInstance().dispatchCustomEvent("UserInventory")}
- getTypes(){
- return this.types}
- getListWithType(t){
- return this.obj[t]}
- getDataWithTypeAndSubType(t,i){
- return this.objByType[`${
- t}
- _${
- i}
- `]}
- }
- ;
- Kt(X6,"InventoryManager"),zt(X6,"instance");
- let Y6=X6;
- var J6=(t=>(t.all="all",t.hero="hero",t.relic="relic",t.pet="pet",t))(J6||{
- }
- );
- const Q6=class t{
- constructor(){
- zt(this,"data",{
- hero5:0,hero7:0,treasure5:0,treasure6:0,treasure7:0,treasure8:0,treasure9:0}
- )}
- static getInstance(){
- return null==this.instance&&(this.instance=new t),this.instance}
- setData(t){
- if(t)for(const i in this.data)i in t&&(this.data[i]=Number(t[i]))}
- getHeroTransTicket(t=5){
- const i=`hero${
- t}
- `;
- return i in this.data?this.data[i]:0}
- getTreasureTransTicket(t=6){
- const i=`treasure${
- t}
- `;
- return i in this.data?this.data[i]:0}
- }
- ;
- Kt(Q6,"TransTicketManager"),zt(Q6,"instance");
- let Z6=Q6;
- const t4=class t extends AB{
- constructor(){
- super(),zt(this,"lblDesc"),zt(this,"btnConfirm"),zt(this,"icons",[]),this.outSideClickHide=!0,this.title=AG.getValueReplace("GAME_181","##",5,"5성 병사 뽑기"),this.lblDesc=new YD("",13421772,aD.DEFAULT_FONT_OPTION_16),this.lblDesc.align="center",this.contentContainer.addChild(this.lblDesc),this.btnConfirm=new QL(AG.getText("COMMON_1","확인")),this.btnConfirm.color=QL.GREEN,this.btnConfirm.width=160,this.btnConfirm.height=50,this.btnConfirm.onClick=()=>this.hide(),this.contentContainer.addChild(this.btnConfirm)}
- static getInstance(){
- return this._instance||(this._instance=new t),this._instance}
- async showGuide(){
- this.title=AG.getValueReplace("GAME_181","##",5,"5성 병사 뽑기"),this.btnConfirm.text=AG.getText("COMMON_1","확인");
- const t=vx.getInstance().bookList.filter(t=>5===t.grade&&0===t.evolStage&&t.canPurchase&&t.honor>=2&&t.kindNum<1e3);
- this.update(t,this.title),await this.loadImage(),super.show()}
- showGuideOfHeroGacha(){
- this.title=AG.getText("GAME_764","5성 영웅 확정권"),this.btnConfirm.text=AG.getText("COMMON_1","확인");
- const t=vx.getInstance(),i=t.honorNumberMax,s=t.bookList.filter(t=>5===t.grade&&0===t.evolStage&&t.canPurchase&&(t.honor>=1&&t.honor<i||t.honor<1)&&t.kindNum<1e3);
- this.update(s,this.title),super.show()}
- update(t,i){
- var s,e;
- for(const p of this.icons)this.contentContainer.removeChild(p);
- this.icons=[];
- const n=t.length,h=n>0?(100/n).toFixed(2):"0",r=AG.getText("GAME_602","아래 병사 중 랜덤한 병사를 획득합니다.")+" "+AG.getText("COMMON_475","획득 확률은 모두 동일합니다.")+`\n(${
- AG.getText("COMMON_476","개별 획득 확률")}
-  : ${
- h}
- %(=1/${
- n}
- ))`;
- this.lblDesc.text=r;
- for(let p=0;
- p<t.length;
- p++){
- const i=new d3;
- i.scale=.7,i.setDataWithKindNum(t[p].kindNum),this.contentContainer.addChild(i),this.icons.push(i)}
- const o=(null==(s=this.icons[0])?void 0:s.width)??70,a=(null==(e=this.icons[0])?void 0:e.height)??70,c=Math.ceil(t.length/4),l=4*o+15;
- this.width=520,this.title=i,aD.setLabelWrapWidth(this.lblDesc,this.width-55),this.lblDesc.x=.5*(this.width-this.lblDesc.width),this.lblDesc.y=65;
- const u=this.lblDesc.y+this.lblDesc.height+15,d=.5*(this.width-l)+5;
- for(let p=0;
- p<this.icons.length;
- p++){
- const t=p%4,i=Math.floor(p/4);
- this.icons[p].x=d+t*(o+5),this.icons[p].y=u+i*(a+2)}
- const f=u+c*(a+2)+35;
- this.btnConfirm.x=.5*(this.width-this.btnConfirm.width),this.btnConfirm.y=f,this.height=f+this.btnConfirm.height+30,this.btnClose.x=this.width-this.btnClose.width-12}
- }
- ;
- Kt(t4,"HeroDrawGuidePopup"),zt(t4,"_instance");
- let i4=t4;
- const s4=class extends Be{
- constructor(){
- super(),zt(this,"icon",new We(ZA.getTexture("UI_Ekkorr","UI_T001"))),zt(this,"bg",new We(ZA.getTexture("UI_Ekkorr","HeroFrame_1_Bg"))),zt(this,"cover",new We(ZA.getTexture("UI_Ekkorr","HeroFrame_1"))),zt(this,"lblEnhance",new YD("+0",16776960,aD.DEFAULT_OUTLINE_FONT_OPTION_16)),zt(this,"posList",[30,26,24,19,16,13,9]),zt(this,"star",new We(ZA.getTextures("UI_Ekkorr","UI_UNIT_RARE")[3])),zt(this,"trans",new We(ZA.getTexture("UI_Ekkorr","Trans0001"))),this.icon.x=3,this.icon.y=3,this.bg.x=3,this.bg.y=3,this.addChild(this.bg),this.addChild(this.icon),this.cover.x=0,this.cover.y=0,this.addChild(this.cover),this.star.x=this.posList[3],this.star.y=this.bg.height-this.star.height,this.addChild(this.star),this.icon.x=.5*(this.bg.height-this.icon.height),this.icon.y=.5*(this.bg.height-this.icon.height),this.lblEnhance.x=this.bg.width-this.lblEnhance.width-1,this.lblEnhance.y=3,this.addChild(this.lblEnhance),this.trans.scale=1.2,this.trans.x=5,this.trans.y=7,this.trans.visible=!1,this.addChild(this.trans)}
- setVO(t){
- this.icon.texture=ZA.getTexture("UI_Ekkorr",`UI_T${
- uU.addZeros(3,t.kindNum)}
- `),this.icon.width=this.icon.height=this.cover.width-6,this.icon.x=3,this.icon.y=2,this.lblEnhance.text=`+${
- t.enhance}
- `,this.star.texture=ZA.getTextures("UI_Ekkorr","UI_UNIT_RARE")[t.grade-1],this.star.x=this.posList[t.grade-1],this.bg.texture=ZA.getTexture("UI_Ekkorr",`HeroFrame_${
- t.grade}
- _Bg`),this.cover.texture=ZA.getTexture("UI_Ekkorr",`HeroFrame_${
- t.grade}
- `),t.trans&&t.trans>0?(this.trans.texture=ZA.getTexture("UI_Ekkorr",`Trans000${
- t.trans}
- `),this.trans.visible=!0):this.trans.visible=!1}
- hideTrans(){
- this.trans.visible=!1}
- showTrans(t){
- t<=0?this.trans.visible=!1:(this.trans.texture=ZA.getTexture("UI_Ekkorr",`Trans000${
- t}
- `),this.trans.visible=!0)}
- setDataWithKindNum(t){
- const i=Wx.getInstance().getBookDataByKindNum(t);
- i&&this.setVO(i)}
- hideFrame(){
- this.bg.visible=!1,this.cover.visible=!1}
- showFrame(){
- this.bg.visible=!0,this.cover.visible=!0}
- get width(){
- return this.bg.width}
- get height(){
- return this.bg.height}
- hideEnhance(){
- this.lblEnhance.visible=!1}
- showEnhance(){
- this.lblEnhance.visible=!0}
- }
- ;
- Kt(s4,"TreasureIcon");
- let e4=s4;
- const n4=class t extends AB{
- constructor(){
- super(),zt(this,"lblDesc"),zt(this,"btnConfirm"),zt(this,"icons",[]),this.outSideClickHide=!0,this.title=AG.getValueReplace("GAME_184","##",6,"6성 유물 뽑기"),this.lblDesc=new YD("",13421772,aD.DEFAULT_FONT_OPTION_16),this.lblDesc.align="center",this.contentContainer.addChild(this.lblDesc),this.btnConfirm=new QL(AG.getText("COMMON_1","확인")),this.btnConfirm.color=QL.GREEN,this.btnConfirm.width=160,this.btnConfirm.height=50,this.btnConfirm.onClick=()=>this.hide(),this.contentContainer.addChild(this.btnConfirm)}
- static getInstance(){
- return this._instance||(this._instance=new t),this._instance}
- async showGuide(){
- this.title=AG.getText("GAME_218","유물 뽑기권"),this.btnConfirm.text=AG.getText("COMMON_1","확인");
- const t=Wx.getInstance().bookList.filter(t=>6===t.grade);
- this.update(t,this.title),await this.loadImage(),super.show()}
- showGuideOfTreasureGacha(){
- this.title=AG.getText("GAME_218","유물 뽑기권"),this.btnConfirm.text=AG.getText("COMMON_1","확인");
- const t=Wx.getInstance().bookList.filter(t=>6===t.grade);
- this.update(t,this.title),super.show()}
- update(t,i){
- var s,e;
- for(const g of this.icons)this.contentContainer.removeChild(g);
- this.icons=[];
- const n=Wx.getInstance(),h=new Set;
- for(const g of n.equipedList)h.add(g.kindNum);
- for(const g of n.ownedList)h.add(g.kindNum);
- const r=t.filter(t=>!h.has(t.kindNum)).length;
- let o=AG.getText("GAME_603","아래 유물 중 랜덤한 유물을 획득합니다.")+" "+AG.getText("COMMON_475","획득 확률은 모두 동일합니다.");
- if(r>0){
- const t=(100/r).toFixed(2);
- o+=`\n(${
- AG.getText("COMMON_476","개별 획득 확률")}
-  : ${
- t}
- %(=1/${
- r}
- ))`}
- this.lblDesc.text=o;
- for(let g=0;
- g<t.length;
- g++){
- const i=new e4;
- i.scale=.75,i.setDataWithKindNum(t[g].kindNum),i.hideEnhance(),i.alpha=h.has(t[g].kindNum)?.35:1,this.contentContainer.addChild(i),this.icons.push(i)}
- const a=(null==(s=this.icons[0])?void 0:s.width)??70,c=(null==(e=this.icons[0])?void 0:e.height)??70,l=Math.ceil(t.length/7),u=7*a-12;
- this.width=520,this.title=i,aD.setLabelWrapWidth(this.lblDesc,this.width-40),this.lblDesc.x=.5*(this.width-this.lblDesc.width),this.lblDesc.y=65;
- const d=this.lblDesc.y+this.lblDesc.height+15,f=.5*(this.width-u)+5;
- for(let g=0;
- g<this.icons.length;
- g++){
- const t=g%7,i=Math.floor(g/7);
- this.icons[g].x=f+t*(a+-2),this.icons[g].y=d+i*(c+2)}
- const p=d+l*(c+2)+10;
- this.btnConfirm.x=.5*(this.width-this.btnConfirm.width),this.btnConfirm.y=p,this.height=p+this.btnConfirm.height+30,this.btnClose.x=this.width-this.btnClose.width-12}
- }
- ;
- Kt(n4,"TreasureDrawGuidePopup"),zt(n4,"_instance");
- let h4=n4;
- const r4=class t{
- constructor(){
- zt(this,"battlePoolMap",{
- }
- ),zt(this,"seasonSetMap",{
- }
- ),zt(this,"rewardMap",{
- }
- ),zt(this,"seasonSetKindNum",0),zt(this,"seasonNumber",0),zt(this,"seasonEndTime",0),zt(this,"currentFloor",0),zt(this,"floorStars",[]),zt(this,"ticket",0),zt(this,"maxTicket",5),zt(this,"ticketTime",0),zt(this,"currentBattleFloor",0),zt(this,"bookLoaded",!1)}
- static getInstance(){
- return null==this.instance&&(this.instance=new t),this.instance}
- setBattlePoolData(t){
- if(this.battlePoolMap={
- }
- ,t)for(const i of t){
- const t=new c4;
- t.kindNum=i.kindNum,t.difficulty=i.difficulty,t.enemyKindNums=i.enemyKindNums||"",t.enemyTrans=i.enemyTrans||"",t.enemyShields=i.enemyShields||"",t.enemyLevels=i.enemyLevels||"",t.tribes=i.tribes,t.gradeMax=i.gradeMax,t.femaleExclude=i.femaleExclude,t.maleExclude=i.maleExclude,t.rangeExclude=i.rangeExclude,t.meleeExclude=i.meleeExclude,t.airExclude=i.airExclude,t.star1=i.star1,t.star2=i.star2,t.star3=i.star3,this.battlePoolMap[t.kindNum]=t}
- }
- setSeasonSetData(t){
- if(this.seasonSetMap={
- }
- ,t)for(const i of t){
- const t=new u4;
- t.kindNum=i.kindNum,t.battleIDs=i.battleIDs,this.seasonSetMap[t.kindNum]=t}
- }
- setRewardData(t){
- if(this.rewardMap={
- }
- ,t)for(const i of t){
- const t=new f4;
- t.floor=i.floor,t.gem1=i.gem1,t.gem2=i.gem2,t.gem3=i.gem3,t.honor1=i.honor1,t.honor2=i.honor2,t.honor3=i.honor3,this.rewardMap[t.floor]=t}
- }
- setData(t){
- for(this.seasonSetKindNum=t.seasonSetKindNum,this.seasonNumber=t.seasonNumber||0,this.seasonEndTime=t.seasonEndTime?new Date(t.seasonEndTime).getTime():0,this.currentFloor=t.currentFloor,this.floorStars=t.floorStars||[];
- this.floorStars.length<30;
- )this.floorStars.push(0);
- this.ticket=t.ticket,this.maxTicket=t.maxTicket,this.ticketTime=new Date(t.ticketTime).getTime()+1e3,this.currentBattleFloor=t.currentBattleFloor}
- getFloorList(){
- const t=this.seasonSetMap[this.seasonSetKindNum];
- if(!t)return[];
- const i=t.battleIDs.split("|").map(Number),s=[],e=Math.min(this.currentFloor+1,30);
- for(let n=0;
- n<e;
- n++){
- const t=this.battlePoolMap[i[n]];
- if(!t)continue;
- const e=new g4;
- e.floor=n+1,e.stars=this.floorStars[n]||0,e.battleVO=t,e.reward=this.rewardMap[n+1],e.isCleared=this.floorStars[n]>0,e.isNext=n+1===this.currentFloor+1,s.push(e)}
- return s}
- getFloorListReversed(){
- return this.getFloorList().reverse()}
- getBattlePool(t){
- return this.battlePoolMap[t]}
- buildFloorVO(t){
- if(t<1||t>30)return null;
- const i=this.seasonSetMap[this.seasonSetKindNum];
- if(!i)return null;
- const s=i.battleIDs.split("|").map(Number),e=t-1;
- if(e>=s.length)return null;
- const n=this.battlePoolMap[s[e]];
- if(!n)return null;
- const h=new g4;
- return h.floor=t,h.stars=this.floorStars[e]||0,h.battleVO=n,h.reward=this.rewardMap[t],h.isCleared=this.floorStars[e]>0,h.isNext=t===this.currentFloor+1,h}
- getReward(t){
- return this.rewardMap[t]}
- }
- ;
- Kt(r4,"TowerDataManager"),zt(r4,"instance");
- let o4=r4;
- const a4=class{
- constructor(){
- zt(this,"kindNum",0),zt(this,"difficulty",0),zt(this,"enemyKindNums",""),zt(this,"enemyTrans",""),zt(this,"enemyShields",""),zt(this,"enemyLevels",""),zt(this,"tribes","0"),zt(this,"gradeMax",0),zt(this,"femaleExclude","N"),zt(this,"maleExclude","N"),zt(this,"rangeExclude","N"),zt(this,"meleeExclude","N"),zt(this,"airExclude","N"),zt(this,"star1",0),zt(this,"star2",0),zt(this,"star3",0)}
- static parseEnemies(t){
- const i=new Array(20).fill(null);
- if(!t||!t.enemyKindNums)return i;
- const s=String(t.enemyKindNums).split("|"),e=Math.min(s.length,20);
- for(let n=0;
- n<e;
- n++){
- const t=s[n].trim();
- if(!t||"0"===t)continue;
- const e=t.indexOf("-"),h=e>=0?t.substring(0,e):t,r=e>=0?t.substring(e+1):"0",o=Number(h);
- o>0&&(i[n]={
- kindNum:o,trans:Number(r)||0}
- )}
- return i}
- static stringifyEnemies(t,i){
- let s=-1;
- for(let n=19;
- n>=0;
- n--)if((t[n]??-1)>0){
- s=n;
- break}
- if(s<0)return"";
- const e=[];
- for(let n=0;
- n<=s;
- n++){
- const s=t[n]??-1;
- s<=0?e.push("0"):e.push(`${
- s}
- -${
- i[n]??0}
- `)}
- return e.join("|")}
- }
- ;
- Kt(a4,"TowerBattlePoolVO");
- let c4=a4;
- const l4=class{
- constructor(){
- zt(this,"kindNum",0),zt(this,"battleIDs","")}
- }
- ;
- Kt(l4,"TowerSeasonSetVO");
- let u4=l4;
- const d4=class{
- constructor(){
- zt(this,"floor",0),zt(this,"gem1",0),zt(this,"gem2",0),zt(this,"gem3",0),zt(this,"honor1",0),zt(this,"honor2",0),zt(this,"honor3",0)}
- }
- ;
- Kt(d4,"TowerRewardVO");
- let f4=d4;
- const p4=class{
- constructor(){
- zt(this,"floor",0),zt(this,"stars",0),zt(this,"battleVO"),zt(this,"reward"),zt(this,"isCleared",!1),zt(this,"isNext",!1)}
- }
- ;
- Kt(p4,"TowerFloorVO");
- let g4=p4;
- const m4=class t{
- constructor(){
- zt(this,"lastFetchTime",0),zt(this,"hasData",!1),zt(this,"dungeonRechargeMs",0),zt(this,"towerRechargeMs",0),zt(this,"towerSnapshot",null),zt(this,"pvpSnapshot",null),zt(this,"dailyRankingSnapshot",null)}
- static getInstance(){
- return this.instance||(this.instance=new t),this.instance}
- setSummary(t){
- if(t){
- if(this.hasData=!0,this.lastFetchTime=ix.time,t.dungeon){
- this.dungeonRechargeMs=t.dungeon.ticketRechargeMs??0;
- const i=Rx.getInstance();
- i.ticket=t.dungeon.ticket??i.ticket,i.maxTicket=t.dungeon.maxTicket??i.maxTicket,t.dungeon.ticketTime&&(i.ticketTime=new Date(t.dungeon.ticketTime).getTime()+1e3)}
- if(t.tower){
- this.towerRechargeMs=t.tower.ticketRechargeMs??0;
- const i=o4.getInstance();
- i.seasonNumber>0&&(i.ticket=t.tower.ticket??i.ticket,i.maxTicket=t.tower.maxTicket??i.maxTicket,t.tower.ticketTime&&(i.ticketTime=new Date(t.tower.ticketTime).getTime()+1e3),void 0!==t.tower.currentFloor&&(i.currentFloor=t.tower.currentFloor),void 0!==t.tower.seasonNumber&&(i.seasonNumber=t.tower.seasonNumber),t.tower.seasonEndTime&&(i.seasonEndTime=new Date(t.tower.seasonEndTime).getTime())),this.towerSnapshot={
- seasonNumber:t.tower.seasonNumber??0,seasonEndTime:t.tower.seasonEndTime?new Date(t.tower.seasonEndTime).getTime():0,currentFloor:t.tower.currentFloor??0,ticket:t.tower.ticket??0,maxTicket:t.tower.maxTicket??0,ticketTime:t.tower.ticketTime?new Date(t.tower.ticketTime).getTime():0}
- }
- this.pvpSnapshot=t.pvp??null,this.dailyRankingSnapshot=t.dailyRanking??null}
- }
- has(){
- return this.hasData}
- isStale(t){
- return!this.hasData||ix.time-this.lastFetchTime>=t}
- getDungeon(){
- if(!this.hasData)return null;
- const t=Rx.getInstance();
- return{
- ticket:t.ticket,maxTicket:t.maxTicket,ticketTime:t.ticketTime,ticketRechargeMs:this.dungeonRechargeMs}
- }
- getTower(){
- if(!this.hasData)return null;
- const t=o4.getInstance();
- return t.seasonNumber>0?{
- seasonNumber:t.seasonNumber,seasonEndTime:t.seasonEndTime,currentFloor:t.currentFloor,ticket:t.ticket,maxTicket:t.maxTicket,ticketTime:t.ticketTime,ticketRechargeMs:this.towerRechargeMs}
- :this.towerSnapshot?{
- ...this.towerSnapshot,ticketRechargeMs:this.towerRechargeMs}
- :null}
- getPvp(){
- return this.pvpSnapshot}
- updatePvpTicket(t,i){
- this.pvpSnapshot&&(this.pvpSnapshot.ticket=t,void 0!==i&&(this.pvpSnapshot.ticketTime=i))}
- getDailyRanking(){
- return this.dailyRankingSnapshot}
- updateDailyRanking(t,i){
- this.dailyRankingSnapshot?(this.dailyRankingSnapshot.joined=t,this.dailyRankingSnapshot.score=i):this.dailyRankingSnapshot={
- joined:t,score:i,date:""}
- }
- invalidate(){
- this.lastFetchTime=0}
- }
- ;
- Kt(m4,"BattleSummaryManager"),zt(m4,"instance");
- let w4=m4;
- const v4=class extends Be{
- constructor(){
- super()}
- get className(){
- return""}
- updateLanguage(){
- }
- }
- ;
- Kt(v4,"BaseSubView");
- let b4=v4;
- const y4=class t extends JV{
- static getInstance(){
- return null==this.instance&&(this.instance=new t),this.instance}
- constructor(){
- super(),this.currentSubView=Pht.getInstance()}
- setData(){
- Pht.getInstance().setData(),this.currentSubView=Pht.getInstance()}
- get className(){
- return"BattleView"}
- }
- ;
- Kt(y4,"BattleView"),zt(y4,"instance");
- let _4=y4;
- const M4=class t extends QL{
- constructor(t,i=120,s=50){
- super(t),zt(this,"index",-1),zt(this,"bg2"),zt(this,"indicator"),zt(this,"minWidth",120),zt(this,"_selected",!0),zt(this,"padding",50),zt(this,"_autoResize",!0),zt(this,"_allowMultiline",!1),this.minWidth=i,this.padding=s,this.container.removeChild(this.bg),this.lbl.textSize=18,this._activatedTextColor=YD.LIGHT_BROWN,this.updateTextColor(),this.bg2=new CM({
- texture:ZA.getTexture("UI_Ekkorr","Base_Tooltip"),leftWidth:9,topHeight:9,rightWidth:9,bottomHeight:10}
- ),this.bg2.width=101,this.bg2.height=45,this.bg2.x=.5*-this.bg2.width,this.bg2.y=.5*-this.bg2.height,this.container.addChildAt(this.bg2,0),this.indicator=new CM({
- texture:ZA.getTexture("UI_Ekkorr","SelectedBar"),leftWidth:5,topHeight:1,rightWidth:5,bottomHeight:1}
- ),this.container.addChild(this.indicator),this.container.x=.5*this.bg2.width,this.container.y=.5*this.bg2.height,this.width=100,this.height=44,this._autoResize&&(this.text=t),this.updateHitArea(),this.selected=!1}
- updateHitArea(){
- null!=this.bg2&&(this._hitArea.width=this.bg2.width,this._hitArea.height=this.bg2.height,this.hitArea=this._hitArea)}
- get width(){
- return this.bg2.width-2*t.TRANSPARENT_BORDER}
- set width(i){
- i<this.minWidth&&(i=this.minWidth);
- const s=t.TRANSPARENT_BORDER;
- this.bg2.width=i+2*s,this.bg2.x=.5*-this.bg2.width,this.lbl.x=.5*-this.lbl.width,this.container.x=.5*i,this.indicator.width=i-16,this.indicator.x=.5*-this.indicator.width,this.updateHitArea()}
- set height(i){
- const s=t.TRANSPARENT_BORDER;
- this.bg2.height=i+2*s,this.bg2.y=.5*-this.bg2.height,this.lbl.y=.5*-this.lbl.height,this.container.y=.5*i,this.indicator.y=this.bg2.y+this.bg2.height-this.indicator.height-10,this.updateHitArea()}
- get height(){
- return this.bg2.height-2*t.TRANSPARENT_BORDER}
- get selected(){
- return this._selected}
- set selected(t){
- t!=this._selected&&(this._selected=t,1==this._selected?(this.indicator.visible=!0,this.activatedTextColor=aD.COLOR_ORANGE):(this.indicator.visible=!1,this.activatedTextColor=aD.DEFAULT_COLOR))}
- get autoResize(){
- return this._autoResize}
- set autoResize(t){
- this._autoResize=t}
- get allowMultiline(){
- return this._allowMultiline}
- set allowMultiline(t){
- this._allowMultiline!==t&&(this._allowMultiline=t,this.lbl.text&&(this.text=this.lbl.text))}
- applyMultilineLayout(i){
- const s=Math.max(40,this.width-2*t.MULTILINE_SIDE_PAD);
- if(this.lbl.setWrapWidth(0),this.lbl.lineHeight=0,this.lbl.text=i,this.lbl.width<=s)return this.lbl.x=.5*-this.lbl.width,void(this.lbl.y=.5*-this.lbl.height);
- this.lbl.align="center",this.lbl.lineHeight=Math.floor(this.lbl.textSize*t.MULTILINE_LINE_HEIGHT_RATIO)+t.MULTILINE_LINE_HEIGHT_EXTRA,this.lbl.setWrapWidth(s),this.lbl.text=i,this.lbl.x=.5*-this.lbl.width,this.lbl.y=.5*-this.lbl.height+t.MULTILINE_Y_OFFSET}
- setCompactStyle(t,i){
- this.lbl.textSize=t,this.padding=i,this._autoResize=!0,this.lbl.setWrapWidth(0),this.text=this.lbl.text}
- setMultilineMode(t,i,s=16){
- this._autoResize=!1,this.lbl.textSize=s,this.width=t,this.height=i;
- const e=Math.max(40,t-10);
- this.lbl.setWrapWidth(e),this.lbl.align="center",this.lbl.x=.5*-this.lbl.width,this.lbl.y=.5*-this.lbl.height}
- fitWithinWidth(t,i=50){
- this._autoResize=!1;
- const s=this.lbl.text;
- this.lbl.setWrapWidth(0),this.lbl.textSize=18,this.lbl.text=s,this.width=t,this.height=i;
- const e=Math.max(40,t-10);
- if(this.lbl.width<=e)return this.lbl.x=.5*-this.lbl.width,void(this.lbl.y=.5*-this.lbl.height);
- for(let n=17;
- n>=12;
- n--)if(this.lbl.textSize=n,this.lbl.text=s,this.lbl.width<=e)return this.lbl.x=.5*-this.lbl.width,void(this.lbl.y=.5*-this.lbl.height);
- this.lbl.textSize=12,this.lbl.setWrapWidth(e),this.lbl.align="center",this.lbl.text=s,this.lbl.x=.5*-this.lbl.width,this.lbl.y=.5*-this.lbl.height}
- set text(t){
- super.text=t,this._autoResize?this.width=this.lbl.width+this.padding:this._allowMultiline?this.applyMultilineLayout(t):this.lbl.x=.5*-this.lbl.width}
- updateEventTag(t,i){
- this.eventTag&&(this.eventTag.scale=.7,this.eventTag.x=this.bg2.x+this.bg2.width-this.eventTag.width+t,this.eventTag.y=this.bg2.y+i)}
- }
- ;
- Kt(M4,"SubMenuButton"),zt(M4,"TRANSPARENT_BORDER",3),zt(M4,"MULTILINE_SIDE_PAD",10),zt(M4,"MULTILINE_LINE_HEIGHT_RATIO",.85),zt(M4,"MULTILINE_LINE_HEIGHT_EXTRA",2),zt(M4,"MULTILINE_Y_OFFSET",-2);
+ Kt(A4,"ViewMain"),zt(A4,"instance"),zt(A4,"EXPANDED_Y",320);
CastleSubView 2 hunks, 1018 statements
- const Bti=class t extends b4{
- constructor(){
- super(),zt(this,"list"),this.list=new ZV(Gti,640,KA.listHeight),this.list.x=0,this.list.y=Zti.getInstance().height,this.addChild(this.list),this.addChild(Zti.getInstance()),this.on("added",this.onAdded,this),this.on("removed",this.onRemoved,this)}
- static getInstance(){
- return null==t.instance&&(t.instance=new t),t.instance}
- setMultiLevel(t){
- let i=this.list.getItemList();
- if(t)for(let s=0;
- s<i.length;
- s++)i[s].showMultiLevel();
- else for(let s=0;
- s<i.length;
- s++)i[s].hideMultiLevel()}
- onAdded(){
- GM.getInstance().add(this.onFrame,this),this.updateSecretaryClaimable()}
- onRemoved(){
- GM.getInstance().remove(this.onFrame,this),HV.getInstance().unregisterListItemsGetter("Castle"),Gti.cleanup(),this.updateSecretaryClaimable()}
- getListItems(){
- return this.list.getItemList()}
- onFrame(){
- var t;
- if(null==(null==(t=this.parent)?void 0:t.parent))return GM.getInstance().remove(this.onFrame,this),void Gti.cleanup()}
- setData(){
- HV.getInstance().registerListItemsGetter(()=>this.getListItems(),"Castle"),Zti.getInstance().updateLanguage();
- let t=[],i=wN.getInstance().bookList.length;
- for(let s=0;
- s<i;
- s++){
- let i=wN.getInstance().bookList[s];
- 1==i.type&&t.push(i)}
- this.list.dataProvider=t,this.setMultiLevel(!1)}
- get className(){
- return"CastleSubView"}
- async updateSecretaryClaimable(){
- const t=await bti.getInstance().checkClaimable();
- Zti.getInstance().updateCitadel(t)}
- updateLanguage(){
- this.setData(),Zti.getInstance().updateLanguage()}
- }
- ;
- Kt(Bti,"CastleSubView"),zt(Bti,"instance");
- let Uti=Bti;
- const Fti=class t extends JV{
- static getInstance(){
- return null==this.instance&&(this.instance=new t),this.instance}
- constructor(){
- super()}
- setData(){
- Uti.getInstance().setData(),this.currentSubView=Uti.getInstance()}
- get className(){
- return"CastleView"}
- }
- ;
- Kt(Fti,"CastleView"),zt(Fti,"instance");
- let Hti=Fti;
+ super(),zt(this,"list"),this.list=new R3(cti,640,KA.listHeight),this.list.x=0,this.list.y=_ti.getInstance().height,this.addChild(this.list),this.addChild(_ti.getInstance()),this.on("added",this.onAdded,this),this.on("removed",this.onRemoved,this)}
+ static getInstance(){
+ return null==t.instance&&(t.instance=new t),t.instance}
+ setMultiLevel(t){
+ let i=this.list.getItemList();
+ if(t)for(let s=0;
+ s<i.length;
+ s++)i[s].showMultiLevel();
+ else for(let s=0;
+ s<i.length;
+ s++)i[s].hideMultiLevel()}
+ onAdded(){
+ GM.getInstance().add(this.onFrame,this),this.updateSecretaryClaimable()}
+ onRemoved(){
+ GM.getInstance().remove(this.onFrame,this),HV.getInstance().unregisterListItemsGetter("Castle"),cti.cleanup(),this.updateSecretaryClaimable()}
+ getListItems(){
+ return this.list.getItemList()}
+ onFrame(){
+ var t;
+ if(null==(null==(t=this.parent)?void 0:t.parent))return GM.getInstance().remove(this.onFrame,this),void cti.cleanup()}
+ setData(){
+ HV.getInstance().registerListItemsGetter(()=>this.getListItems(),"Castle"),_ti.getInstance().updateLanguage();
+ let t=[],i=wN.getInstance().bookList.length;
+ for(let s=0;
+ s<i;
+ s++){
+ let i=wN.getInstance().bookList[s];
+ 1==i.type&&t.push(i)}
+ this.list.dataProvider=t,this.setMultiLevel(!1)}
+ get className(){
+ return"CastleSubView"}
+ async updateSecretaryClaimable(){
+ const t=await V9t.getInstance().checkClaimable();
+ _ti.getInstance().updateCitadel(t)}
+ updateLanguage(){
+ this.setData(),_ti.getInstance().updateLanguage()}
+ }
+ ;
+ Kt(Mti,"CastleSubView"),zt(Mti,"instance");
+ let Eti=Mti;
+ const Ati=class t extends x6{
+ static getInstance(){
+ return null==this.instance&&(this.instance=new t),this.instance}
+ constructor(){
+ super()}
+ setData(){
+ Eti.getInstance().setData(),this.currentSubView=Eti.getInstance()}
+ get className(){
+ return"CastleView"}
+ }
+ ;
+ Kt(Ati,"CastleView"),zt(Ati,"instance");
+ let Sti=Ati;
+ const Tti=class extends Be{
+ constructor(){
+ super(),zt(this,"bg",new QD),zt(this,"bar",new QD),zt(this,"lblTime",new YD("00:00",16777215,aD.DEFAULT_OUTLINE_FONT_OPTION_17)),zt(this,"lblGold",new GB("UI_GOLD","0",16777215,aD.DEFAULT_OUTLINE_FONT_OPTION_17)),zt(this,"barWidth",340),zt(this,"vo",new oL),this.bg.x=0,this.bg.y=0,this.bg.width=this.barWidth,this.bg.height=20,this.bg.setIndex(6),this.addChild(this.bg),this.bar.x=0,this.bar.y=0,this.bar.width=this.barWidth,this.bar.height=20,this.bar.setIndex(0),this.addChild(this.bar),this.lblTime.x=this.barWidth-60,this.lblTime.y=.5*(this.bg.height-this.lblTime.height),this.addChild(this.lblTime),this.lblGold.x=-3,this.lblGold.y=.5*(this.bg.height-this.lblGold.height),this.addChild(this.lblGold),this.lblTime.text="00:00",this.lblGold.text="0"}
+ setData(t){
+ this.vo=t,t.isOpen?(this.lblTime.text=uU.displayTimeAsMMSS(t.getRemainTime()),this.lblGold.text=$D.displayLargeNumberAsAlphabet(t.gold),this.bar.width=this.barWidth*t.getProgress(),this.setActivated(!0)):(this.lblTime.text=uU.displayTimeAsMMSS(Math.ceil(.001*t.effectiveDurationMs)),this.lblGold.text=$D.displayLargeNumberAsAlphabet(t.previewGold),this.bar.width=0,this.setActivated(!1))}
+ setActivated(t){
+ t?(this.lblGold.texture=ZA.getTexture("UI_Ekkorr","UI_GOLD"),this.lblTime.textColor=aD.DEFAULT_COLOR,this.lblGold.textColor=aD.DEFAULT_COLOR,this.bar.setIndex(4)):(this.lblGold.texture=ZA.getTexture("UI_Ekkorr","UI_GRAY_GOLD"),this.lblTime.textColor=8421504,this.lblGold.textColor=8421504,this.bar.setIndex(6))}
+ }
+ ;
+ Kt(Tti,"QuestProgress");
+ let Cti=Tti;
+ const kti=class t extends O6{
+ constructor(){
+ super(),zt(this,"list"),zt(this,"lastGoldForCanOpen",-1),zt(this,"lastBuffVer",-1),zt(this,"frameCnt",0),this.list=new R3(Pti,640,KA.listHeight),this.list.x=0,this.list.y=jti.getInstance().height,this.addChild(this.list),this.addChild(jti.getInstance()),this.on("added",this.onAdded,this),this.on("removed",this.onRemoved,this)}
+ static getInstance(){
+ return null==t.instance&&(t.instance=new t),t.instance}
+ onAdded(){
+ GM.getInstance().add(this.onFrame,this)}
+ onRemoved(){
+ GM.getInstance().remove(this.onFrame,this),HV.getInstance().unregisterListItemsGetter("Quest")}
+ onFrame(){
+ var i;
+ if(null==(null==(i=this.parent)?void 0:i.parent))return;
+ const s=this.list.getItemList(),e=s.length;
+ for(let t=0;
+ t<e;
+ t++){
+ const i=s[t],e=i.vo;
+ if(null!=e&&0!=i.visible){
+ if(!e.isOpen)break;
+ i.updateProgress()}
+ }
+ if(++this.frameCnt<t.FRAME_SKIP)return;
+ this.frameCnt=0;
+ const n=KN.getInstance().version;
+ if(this.lastBuffVer!==n){
+ this.lastBuffVer=n;
+ for(let t=0;
+ t<e;
+ t++){
+ const i=s[t];
+ null!=i.vo&&i.update()}
+ }
+ jti.getInstance().refreshGold();
+ const h=_L.gold;
+ if(h!==this.lastGoldForCanOpen){
+ let t=0;
+ for(let i=0;
+ i<e;
+ i++){
+ const e=s[i],n=e.vo;
+ if(null!=n&&0!=e.visible&&!n.isOpen){
+ if(!n.canOpen)break;
+ {
+ t+=n.effectiveOpenGold;
+ const i=h>=t;
+ if(e.btnOpen.activated!==i&&(e.btnOpen.activated=i,e.btnOpen.iconLabel.texture=ZA.getTexture("UI_Ekkorr",i?"UI_GOLD":"UI_GRAY_GOLD"),e.updateCache()),!i)break}
+ }
+ }
+ this.lastGoldForCanOpen=h}
+ UV.getInstance().updateGold()}
+ setData(){
+ HV.getInstance().registerListItemsGetter(()=>this.getListItems(),"Quest"),this.lastGoldForCanOpen=-1,this.lastBuffVer=KN.getInstance().version;
+ let t=[],i=hL.getInstance().list.length;
+ for(let s=0;
+ s<i;
+ s++){
+ let i=hL.getInstance().list[s];
+ t.push(i)}
+ this.list.dataProvider=t,this.onAdded()}
+ setMultiLevel(t){
+ let i=this.list.getItemList();
+ if(t)for(let s=0;
+ s<i.length;
+ s++)i[s].showMultiLevel();
+ else for(let s=0;
+ s<i.length;
+ s++)i[s].hideMultiLevel()}
+ scrollToTop(){
+ this.list.showTopItem()}
+ getListItems(){
+ return this.list.getItemList()}
+ get className(){
+ return"QuestSubView"}
+ }
+ ;
+ Kt(kti,"QuestSubView"),zt(kti,"instance"),zt(kti,"FRAME_SKIP",10);
+ let Oti=kti;
+ const Iti=class t extends aG{
+ constructor(){
+ super(),zt(this,"icon",new We(ZA.getTexture("UI_Ekkorr","Quest_1"))),zt(this,"bgLevel",new We(ZA.getTexture("UI_Ekkorr","Quest_bg"))),zt(this,"lblLevel",new YD("Lv.1",16777215,aD.DEFAULT_OUTLINE_FONT_OPTION_18)),zt(this,"lblName",new YD("",16777215,aD.DEFAULT_OUTLINE_FONT_OPTION_17)),zt(this,"lblGold",new GB("UI_GOLD","0",16777215,aD.DEFAULT_OUTLINE_FONT_OPTION_16)),zt(this,"lblDuration",new GB("Icon_Time02","0",16777215,aD.DEFAULT_OUTLINE_FONT_OPTION_16)),zt(this,"lblBuffTitle",new YD("[ 버프 ]",16763904,aD.DEFAULT_OUTLINE_FONT_OPTION_16)),zt(this,"lblBuffGold",new YD("",11206570,aD.DEFAULT_OUTLINE_FONT_OPTION_16)),zt(this,"lblBuffDuration",new YD("",11206570,aD.DEFAULT_OUTLINE_FONT_OPTION_16)),zt(this,"lblBuffOpenGold",new YD("",11206570,aD.DEFAULT_OUTLINE_FONT_OPTION_16)),zt(this,"lblBuffUpgrade",new YD("",11206570,aD.DEFAULT_OUTLINE_FONT_OPTION_16)),this.contentContainer.addChild(this.icon,this.bgLevel,this.lblLevel,this.lblName,this.lblGold,this.lblDuration,this.lblBuffTitle,this.lblBuffGold,this.lblBuffDuration,this.lblBuffOpenGold,this.lblBuffUpgrade),this.outSideClickHide=!0}
+ static getInstance(){
+ return this._instance||(this._instance=new t),this._instance}
+ formatLarge(t){
+ return $D.displayLargeNumberAsAlphabet(t)}
+ showQuest(t){
+ this.title=AG.getText("GAME_326","퀘스트 정보"),this.icon.texture=ZA.getTexture("UI_Ekkorr",`Quest_${
+ t.kindNum}
+ `),this.icon.x=25,this.icon.y=65;
+ const i=this.icon.width,s=this.icon.height;
+ this.bgLevel.x=this.icon.x+1,this.bgLevel.y=this.icon.y+s-23,this.lblLevel.text=`Lv.${
+ this.formatLarge(t.level)}
+ `,this.lblLevel.x=this.bgLevel.x+4,this.lblLevel.y=this.icon.y+this.icon.height-26,this.lblName.text=t.kindNum+". "+AG.getText(t.getNameKey(),t.name),this.lblName.x=this.icon.x+i+15,this.lblName.y=this.icon.y+10,this.lblGold.text=$D.displayLargeNumberAsAlphabet(t.gold),this.lblGold.x=this.lblName.x,this.lblGold.y=this.lblName.y+this.lblName.height+8,this.lblDuration.iconScale=.7;
+ const e=.001*t.effectiveDurationMs;
+ this.lblDuration.text=uU.displayTimeAsMMSS(e),this.lblDuration.x=this.lblGold.x+this.lblGold.width+20,this.lblDuration.y=this.lblGold.y;
+ const n=KN.getInstance(),h=this.icon.y+s,r=this.lblGold.y+this.lblGold.height;
+ let o=Math.max(h,r)+15;
+ this.lblBuffTitle.text=`[ ${
+ AG.getText("GAME_167","버프")}
+  ]`,this.lblBuffTitle.x=30,this.lblBuffTitle.y=o,o+=this.lblBuffTitle.height+8;
+ const a=n.getGameplayMultiplier(xN.QuestGoldGain),c=Math.floor(100*(a-1));
+ this.lblBuffGold.text=`${
+ AG.getText("GAME_327","퀘스트 획득 골드")}
+  : +${
+ this.formatLarge(c)}
+ %`,this.lblBuffGold.x=32,this.lblBuffGold.y=o,o+=this.lblBuffGold.height+5;
+ const l=n.getGameplayMultiplier(xN.QuestCompleteTime),u=Math.floor(100*(l-1));
+ this.lblBuffDuration.text=`${
+ AG.getText("GAME_266","퀘스트 시간 단축")}
+  : +${
+ this.formatLarge(u)}
+ %`,this.lblBuffDuration.x=32,this.lblBuffDuration.y=o,o+=this.lblBuffDuration.height+5;
+ const d=n.getGameplayMultiplier(xN.QuestOpenGold),f=Math.floor(100*(d-1));
+ this.lblBuffOpenGold.text=`${
+ AG.getText("GAME_267","퀘스트 오픈 비용 감소")}
+  : +${
+ this.formatLarge(f)}
+ %`,this.lblBuffOpenGold.x=32,this.lblBuffOpenGold.y=o,o+=this.lblBuffOpenGold.height+5;
+ const p=n.getGameplayMultiplier(xN.QuestUpgradeGold),g=Math.floor(100*(p-1));
+ this.lblBuffUpgrade.text=`${
+ AG.getText("GAME_328","퀘스트 레벨업 비용 감소")}
+  : +${
+ this.formatLarge(g)}
+ %`,this.lblBuffUpgrade.x=32,this.lblBuffUpgrade.y=o,o+=this.lblBuffUpgrade.height+20,this.height=o,super.show()}
+ getDefaultPositionY(){
+ return.5*KA.stageHeight}
+ onBackButton(){
+ return this.hide(),!0}
+ }
+ ;
+ Kt(Iti,"QuestDetailPopup"),zt(Iti,"_instance");
+ let xti=Iti;
+ const Nti=class t extends XI{
+ constructor(){
+ super(),zt(this,"bg"),zt(this,"lblName",new YD("광부 ",16777215,aD.DEFAULT_OUTLINE_FONT_OPTION_17)),zt(this,"lblLevel",new YD("(0/5)",16777215,aD.DEFAULT_OUTLINE_FONT_OPTION_18)),zt(this,"lblGold",new GB("UI_GOLD","100",16711680,aD.DEFAULT_OUTLINE_FONT_OPTION_17)),zt(this,"lblCost",new GB("UI_GOLD","100",16711680,aD.DEFAULT_OUTLINE_FONT_OPTION_17)),zt(this,"btnOpen",new kU("UI_GOLD","100","10",.8,120,55)),zt(this,"progress",new Cti),zt(this,"icon",new R6("Quest_1","UI_Ekkorr")),zt(this,"rapidClickCount",0),zt(this,"lastRapidClickTime",0),zt(this,"btn10",new kU("UI_GOLD","100","+10")),zt(this,"btn100",new kU("UI_GOLD","1000","+100")),zt(this,"btn1000",new kU("UI_GOLD","10000","+1000")),zt(this,"multiLevelContainer",new Be),zt(this,"isMultiLevel",!1),zt(this,"lastGoldValue",-1),zt(this,"frameRunning",!1),zt(this,"hideTimer",null),zt(this,"bgLevel"),zt(this,"mainContainer",new Be),zt(this,"vo"),zt(this,"cnt",0),this.bg=new CM({
+ texture:ZA.getTexture("UI_Ekkorr","Popup_List_02"),leftWidth:140,topHeight:30,rightWidth:20,bottomHeight:30}
+ ),this.bg.x=5,this.bg.width=630,this.bg.height=80,this.mainContainer.addChild(this.bg),this.icon.scale=1,this.icon.x=6,this.icon.y=.5*(this.bg.height-this.icon.height),this.mainContainer.addChild(this.icon),this.bgLevel=new We(ZA.getTexture("UI_Ekkorr","Quest_bg")),this.bgLevel.x=7,this.bgLevel.y=this.bg.height-23,this.mainContainer.addChild(this.bgLevel),this.lblName.x=135,this.lblName.y=13,this.mainContainer.addChild(this.lblName),this.lblLevel.textColor=16777215,this.lblLevel.x=11,this.lblLevel.y=this.bg.height-this.lblLevel.height-1,this.mainContainer.addChild(this.lblLevel),this.btnOpen.textLabel.textSize=15,this.btnOpen.textAlign="left",this.btnOpen.iconScale=.7,this.btnOpen.labelOrder=kU.TEXT_FIRST,this.btnOpen.color=kU.BROWN,this.btnOpen.height=60,this.btnOpen.width=120,this.btnOpen.x=this.bg.width-this.btnOpen.width-6,this.btnOpen.y=.5*(this.bg.height-this.btnOpen.height)-2,this.mainContainer.addChild(this.btnOpen),this.btnOpen.on("pointertap",()=>this.onUpgrade(1),this),this.btn10.labelOrder=kU.TEXT_FIRST,this.btn10.textLabel.textSize=15,this.btn10.textAlign="left",this.btn10.iconScale=.7,this.btn10.color=kU.BROWN,this.btn10.height=62,this.btn10.width=115,this.btn10.x=this.btnOpen.x-this.btn10.width-5,this.btn10.y=.5*(this.bg.height-this.btn10.height)-2,this.btn10.on("pointertap",()=>{
+ const t=this.getMultiLevelUnits(),i=this.getNextIncrement(this.vo.level,t.u1);
+ this.onUpgrade(i)}
+ ,this),this.multiLevelContainer.addChild(this.btn10),this.btn100.labelOrder=kU.TEXT_FIRST,this.btn100.textLabel.textSize=15,this.btn100.textAlign="left",this.btn100.iconScale=.7,this.btn100.color=kU.BROWN,this.btn100.height=62,this.btn100.width=115,this.btn100.x=this.btn10.x-this.btn100.width-5,this.btn100.y=.5*(this.bg.height-this.btn100.height)-2,this.btn100.on("pointertap",()=>{
+ const t=this.getMultiLevelUnits(),i=this.getNextIncrement(this.vo.level,t.u2);
+ this.onUpgrade(i)}
+ ,this),this.multiLevelContainer.addChild(this.btn100),this.btn1000.labelOrder=kU.TEXT_FIRST,this.btn1000.textLabel.textSize=15,this.btn1000.textAlign="left",this.btn1000.iconScale=.7,this.btn1000.color=kU.BROWN,this.btn1000.height=62,this.btn1000.width=115,this.btn1000.x=this.btn100.x-this.btn1000.width-5,this.btn1000.y=.5*(this.bg.height-this.btn1000.height)-2,this.btn1000.on("pointertap",()=>{
+ const t=this.getMultiLevelUnits(),i=this.getNextIncrement(this.vo.level,t.u3);
+ this.onUpgrade(i)}
+ ,this),this.multiLevelContainer.addChild(this.btn1000),this.multiLevelContainer.visible=!1,this.progress.x=this.lblName.x,this.progress.y=45,this.addChild(this.mainContainer),this.addChild(this.progress),this.addChild(this.multiLevelContainer),aD.setLabelWrapWidth(this.lblName,this.btnOpen.x-this.lblName.x-5)}
+ onClick(t,i){
+ this.vo&&this.vo.isOpen&&(this.multiLevelContainer.visible||t<this.btnOpen.x-40&&xti.getInstance().showQuest(this.vo))}
+ getNextIncrement(t,i){
+ if(i<=0||!Number.isFinite(i)||!Number.isFinite(t))return 0;
+ const s=t%i;
+ return 0===s?i:i-s}
+ getMultiLevelUnits(){
+ let t=0;
+ if(this.vo){
+ const i=this.vo.effectiveMaxLv,s=i-this.vo.level,e=_L.gold,n=[i,Math.floor(i/10),Math.floor(i/100),Math.floor(i/1e3),Math.floor(i/1e4),Math.floor(i/1e5),Math.floor(i/1e6),Math.floor(i/1e7),Math.floor(i/1e8),Math.floor(i/1e9),Math.floor(i/1e10),1e3,500],h=Array.from(new Set(n)).filter(t=>t>=500).sort((t,i)=>i-t);
+ for(const r of h){
+ const i=Math.min(r,s);
+ if(!(i<=0)&&e>=this.vo.getTotalLevelUpGold(this.vo.level+i)){
+ t=r;
+ break}
+ }
+ }
+ return{
+ u1:10,u2:100,u3:t}
+ }
+ onMultiLevel(){
+ this.isMultiLevel=!this.isMultiLevel,this.isMultiLevel?this.showMultiLevel():this.hideMultiLevel()}
+ onUpgrade(i=1){
+ if(!Number.isFinite(i)||i<=0)return;
+ if(this.vo&&!Number.isFinite(this.vo.level))return;
+ if(1===i){
+ const t=Date.now();
+ t-this.lastRapidClickTime<500?this.rapidClickCount++:this.rapidClickCount=1,this.lastRapidClickTime=t,this.rapidClickCount>=3&&!this.multiLevelContainer.visible&&(this.rapidClickCount=0,this.onMultiLevel())}
+ if(0==this.vo.canOpen&&0==this.vo.isOpen)return void mG.getInstance().show(AG.getText("GAME_55","이전 퀘스트를 먼저 오픈해주세요."));
+ if(0==this.vo.isOpen){
+ const i=hL.getInstance().getCumulativeOpenCost(this.vo.kindNum);
+ return _L.gold<i?void vV.getInstance().showMessage(AG.getText("COMMON_359","골드가 부족합니다.")):(_L.gold-=i,UV.getInstance().updateGold(),hL.getInstance().openQuestsUpTo(this.vo.kindNum),Oti.getInstance().setData(),jti.getInstance().setData(),t.markDirtyAndSchedule(),HV.getInstance().onConditionChanged(),void NV.get().play(this,12,.5*(this.bg.height-104)))}
+ if(this.vo.level>=this.vo.effectiveMaxLv)return void vV.getInstance().showMessage(AG.getText("COMMON_369","최대 레벨입니다."));
+ const s=Math.min(this.vo.level+i,this.vo.effectiveMaxLv),e=this.vo.getTotalLevelUpGold(s);
+ _L.gold<e?vV.getInstance().showMessage(AG.getText("COMMON_359","골드가 부족합니다.")):(_L.gold-=e,UV.getInstance().updateGold(),this.vo.level=s,this.setData(this.vo),hL.getInstance().updateGoldPerSec(),jti.getInstance().setData(),t.markDirtyAndSchedule(),HV.getInstance().onConditionChanged(),this.isMultiLevel&&this.resetHideTimer(),NV.get().play(this,12,.5*(this.bg.height-104)))}
+ static markDirtyAndSchedule(){
+ t.isDirty=!0,null!==t.updateTimer&&clearTimeout(t.updateTimer),t.updateTimer=setTimeout(()=>{
+ t.sendToServer(),t.updateTimer=null,t.isDirty=!1,Oti.getInstance().setMultiLevel(!1)}
+ ,t.DEBOUNCE_DELAY)}
+ static async sendToServer(){
+ if(!t.isDirty)return;
+ const i=hL.getInstance().list.filter(t=>Number.isFinite(t.level)&&t.level>0),s=i.map(t=>t.kindNum).join("|"),e=i.map(t=>t.level).join("|"),n=t.encodeLastCollectTimes(i),h=await hD.getInstance().quest.updateQuest(s,e,_L.goldPerSec,n);
+ if(!1===h.success){
+ const t=await hD.getInstance().quest.getQuest();
+ return t.success&&(_L.setUserInfo(t.body.user),UV.getInstance().updateAll(),Oti.getInstance().setData()),void mG.getInstance().showError(h)}
+ _L.setUserInfo(h.body.user),UV.getInstance().updateAll(),Oti.getInstance().setData()}
+ static encodeLastCollectTimes(t){
+ if(0===t.length)return"";
+ t.forEach(t=>t.clampLastCollectTime());
+ const i=Math.floor(t[0].lastCollectTime/1e3),s=[i.toString()];
+ for(let e=1;
+ e<t.length;
+ e++){
+ const n=i-Math.floor(t[e].lastCollectTime/1e3);
+ s.push(n.toString())}
+ return s.join("|")}
+ static cleanup(){
+ null!==t.updateTimer&&(clearTimeout(t.updateTimer),t.updateTimer=null),t.isDirty&&(t.sendToServer(),t.isDirty=!1)}
+ setData(t){
+ this.isMultiLevel&&this.vo&&this.vo!==t&&this.hideMultiLevel(),this.data=t,this.vo=t,this.update()}
+ update(){
+ let t=this.vo;
+ if(this.lblName.text=this.data.kindNum+". "+AG.getText(t.getNameKey(),t.name),this.lblName.y=23-.5*this.lblName.height,this.lblGold.text=$D.displayLargeNumberAsAlphabet(t.gold),this.lblLevel.text=`Lv.${
+ $D.displayLargeNumberAsAlphabet(t.level)}
+ `,this.lblCost.text=$D.displayLargeNumberAsAlphabet(t.getLevelUpGold()),this.icon.iconName=`Quest_${
+ t.kindNum}
+ `,this.progress.setData(t),t.canOpen||t.isOpen)if(t.canOpen){
+ const i=hL.getInstance().getCumulativeOpenCost(t.kindNum),s=_L.gold>=i;
+ this.btnOpen.iconText=$D.displayLargeNumberAsAlphabet(i),this.btnOpen.iconLabel.texture=ZA.getTexture("UI_Ekkorr",s?"UI_GOLD":"UI_GRAY_GOLD"),this.btnOpen.text=AG.getText("COMMON_44","오픈"),this.btnOpen.activated=s,this.lblName.textColor=aD.COLOR_GRAY,this.progress.setActivated(!1),this.icon.tint=4473924,this.lblLevel.textColor=4473924,this.stopButtonUpdateInterval()}
+ else this.lblName.textColor=aD.DEFAULT_COLOR,this.progress.setActivated(!0),this.icon.tint=16777215,t.level>=t.effectiveMaxLv?(this.btnOpen.text="max",this.btnOpen.iconText="",this.btnOpen.iconLabel.texture=ZA.getTexture("UI_Ekkorr","UI_GRAY_GOLD"),this.btnOpen.activated=!1,this.lblLevel.textColor=16763904):(this.btnOpen.iconLabel.texture=ZA.getTexture("UI_Ekkorr","UI_GOLD"),this.btnOpen.iconText=$D.displayLargeNumberAsAlphabet(t.getLevelUpGold()),this.btnOpen.text="+"+$D.displayLargeNumberAsAlphabet(t.effectiveIncGold),this.lblLevel.textColor=16777215,this.btnOpen.activated=!0),this.updateMultiLevelButtons(),this.startButtonUpdateInterval();
+ else this.btnOpen.iconText=$D.displayLargeNumberAsAlphabet(t.effectiveOpenGold),this.btnOpen.iconLabel.texture=ZA.getTexture("UI_Ekkorr","UI_GRAY_GOLD"),this.btnOpen.text=AG.getText("COMMON_44","오픈"),this.lblName.textColor=aD.COLOR_GRAY,this.btnOpen.activated=!1,this.icon.tint=4473924,this.lblLevel.textColor=4473924,this.progress.setActivated(!1),this.stopButtonUpdateInterval();
+ this.updateCache()}
+ updateCache(){
+ }
+ clearCache(){
+ }
+ updateMultiLevelButtons(){
+ if(!this.vo||!this.vo.isOpen)return;
+ const t=this.vo.effectiveMaxLv-this.vo.level,{
+ u1:i,u2:s,u3:e}
+ =this.getMultiLevelUnits(),n=Math.min(this.getNextIncrement(this.vo.level,i),t),h=n>0?this.vo.getTotalLevelUpGold(this.vo.level+n):0;
+ this.btn10.text=n>0?`+${
+ $D.displayLargeNumberAsAlphabet(n)}
+ `:"max",this.btn10.iconText=n>0?$D.displayLargeNumberAsAlphabet(h):"",this.btn10.iconLabel.texture=ZA.getTexture("UI_Ekkorr",n>0?"UI_GOLD":"UI_GRAY_GOLD"),this.btn10.activated=n>0&&_L.gold>=h;
+ const r=Math.min(this.getNextIncrement(this.vo.level,s),t),o=r>0?this.vo.getTotalLevelUpGold(this.vo.level+r):0;
+ this.btn100.text=r>0?`+${
+ $D.displayLargeNumberAsAlphabet(r)}
+ `:"max",this.btn100.iconText=r>0?$D.displayLargeNumberAsAlphabet(o):"",this.btn100.iconLabel.texture=ZA.getTexture("UI_Ekkorr",r>0?"UI_GOLD":"UI_GRAY_GOLD"),this.btn100.activated=r>0&&_L.gold>=o;
+ let a=0;
+ if(e>0){
+ a=Math.min(this.getNextIncrement(this.vo.level,e),t);
+ const i=a>0?this.vo.getTotalLevelUpGold(this.vo.level+a):0;
+ this.btn1000.text=a>0?`+${
+ $D.displayLargeNumberAsAlphabet(a)}
+ `:"max",this.btn1000.iconText=a>0?$D.displayLargeNumberAsAlphabet(i):"",this.btn1000.iconLabel.texture=ZA.getTexture("UI_Ekkorr",a>0?"UI_GOLD":"UI_GRAY_GOLD"),this.btn1000.activated=a>0&&_L.gold>=i}
+ this.btn1000.visible=e>s&&a>=500}
+ showMultiLevel(){
+ this.vo&&this.vo.isOpen&&(this.isMultiLevel=!0,this.multiLevelContainer.visible=!0,this.startButtonUpdateInterval(),this.resetHideTimer())}
+ hideMultiLevel(){
+ this.isMultiLevel=!1,this.multiLevelContainer.visible=!1,this.clearHideTimer()}
+ resetHideTimer(){
+ this.clearHideTimer(),this.hideTimer=setTimeout(()=>{
+ this.hideMultiLevel()}
+ ,t.HIDE_DELAY)}
+ clearHideTimer(){
+ null!==this.hideTimer&&(clearTimeout(this.hideTimer),this.hideTimer=null)}
+ onFrame(){
+ var t,i,s,e;
+ if(this.cnt-- >0)return;
+ if(null==(null==(e=null==(s=null==(i=null==(t=this.parent)?void 0:t.parent)?void 0:i.parent)?void 0:s.parent)?void 0:e.parent))return void this.stopButtonUpdateInterval();
+ this.cnt=30;
+ const n=_L.gold;
+ if(n!==this.lastGoldValue){
+ if(this.lastGoldValue=n,this.vo&&this.vo.isOpen){
+ if(this.vo.level>=this.vo.effectiveMaxLv)return this.btnOpen.activated=!1,void this.updateCache();
+ const t=n>=this.vo.getLevelUpGold();
+ this.btnOpen.activated!==t&&(this.btnOpen.activated=t,this.updateCache())}
+ this.multiLevelContainer.visible&&this.vo&&this.vo.isOpen&&this.updateMultiLevelButtons()}
+ }
+ startButtonUpdateInterval(){
+ this.frameRunning||(this.frameRunning=!0,this.lastGoldValue=_L.gold,GM.getInstance().add(this.onFrame,this))}
+ stopButtonUpdateInterval(){
+ GM.getInstance().remove(this.onFrame,this),this.lastGoldValue=-1,this.frameRunning=!1}
+ updateProgress(){
+ this.progress.setData(this.vo);
+ const t=this.btnOpen.activated;
+ this.vo.level>=this.vo.effectiveMaxLv?this.btnOpen.activated=!1:this.btnOpen.activated=_L.gold>=this.vo.getLevelUpGold(),t!==this.btnOpen.activated&&this.updateCache()}
+ get height(){
+ return this.bg.height+2}
+ }
+ ;
+ Kt(Nti,"QuestItemRenderer"),zt(Nti,"HIDE_DELAY",5e3),zt(Nti,"updateTimer",null),zt(Nti,"DEBOUNCE_DELAY",3e3),zt(Nti,"isDirty",!1);
+ let Pti=Nti;
+ const Rti=class t{
+ constructor(){
+ zt(this,"timer",null),zt(this,"_enabled",!1)}
+ static getInstance(){
+ return this.instance||(this.instance=new t),this.instance}
+ get enabled(){
+ return this._enabled}
+ async loadSetting(){
+ const i=await $A.getQuestAutoEnabled();
+ _L.maxWave<t.UNLOCK_WAVE?this._enabled=!1:(this._enabled=!0===i,this._enabled&&this.startTimer())}
+ setEnabled(t){
+ this._enabled!==t&&(this._enabled=t,$A.setQuestAutoEnabled(t),t?(this.startTimer(),this.tick()):this.stopTimer())}
+ startTimer(){
+ null==this.timer&&(this.timer=setInterval(()=>this.tick(),t.TICK_INTERVAL_MS))}
+ stopTimer(){
+ null!=this.timer&&(clearInterval(this.timer),this.timer=null)}
+ tick(){
+ if(!this._enabled)return;
+ if(hL.pausedAt>0)return;
+ let t=!1;
+ for(let i=0;
+ i<50;
+ i++){
+ const i=this.pickNextAction();
+ if(!i)break;
+ "open"===i.type?this.doOpen(i.vo):this.doLevelUp(i.vo,i.targetLevel),t=!0}
+ t&&(Oti.getInstance().setData(),jti.getInstance().setData(),Pti.markDirtyAndSchedule(),HV.getInstance().onConditionChanged())}
+ pickNextAction(){
+ const i=hL.getInstance(),s=_L.gold;
+ for(const t of i.list){
+ if(!t.isOpen)continue;
+ if(t.level>=t.effectiveMaxLv)continue;
+ const i=t.getTotalLevelUpGold(t.effectiveMaxLv);
+ if(i>0&&s>=i)return{
+ type:"levelup",vo:t,targetLevel:t.effectiveMaxLv}
+ }
+ const e=i.list.find(t=>t.canOpen&&!t.isOpen);
+ if(e&&s>=e.effectiveOpenGold*t.OPEN_BUDGET_MULT)return{
+ type:"open",vo:e}
+ ;
+ let n=null,h=0;
+ for(const t of i.list){
+ if(!t.isOpen)continue;
+ if(t.level>=t.effectiveMaxLv)continue;
+ const i=t.getLevelUpGold();
+ if(i<=0||s<i)continue;
+ const e=.001*t.effectiveDurationMs;
+ if(e<=0)continue;
+ const r=t.effectiveIncGold/e/i;
+ r>h&&(h=r,n=t)}
+ return n?{
+ type:"levelup",vo:n,targetLevel:n.level+1}
+ :null}
+ doOpen(t){
+ const i=t.effectiveOpenGold;
+ _L.gold<i||(_L.gold-=i,UV.getInstance().updateGold(),hL.getInstance().openQuestsUpTo(t.kindNum))}
+ doLevelUp(t,i){
+ if(t.level>=t.effectiveMaxLv)return;
+ const s=Math.min(i,t.effectiveMaxLv);
+ if(s<=t.level)return;
+ const e=t.getTotalLevelUpGold(s);
+ e<=0||_L.gold<e||(_L.gold-=e,UV.getInstance().updateGold(),t.level=s,hL.getInstance().updateGoldPerSec())}
+ }
+ ;
+ Kt(Rti,"QuestAutoController"),zt(Rti,"instance"),zt(Rti,"TICK_INTERVAL_MS",3e3),zt(Rti,"OPEN_BUDGET_MULT",1.5),zt(Rti,"UNLOCK_WAVE",100);
+ let Dti=Rti;
+ const Lti=class t extends Be{
+ constructor(i,s,e,n,h,r=200,o=70){
+ super(),zt(this,"bg",new qL),zt(this,"container",new Be),zt(this,"leftIcon"),zt(this,"rewardLabel"),zt(this,"countLabel"),zt(this,"timeLabel"),zt(this,"_color",-1),zt(this,"_activated",!0),zt(this,"onClick"),this.bg.width=r,this.bg.height=o,this.bg.x=0,this.bg.y=0,this.leftIcon=new We(ZA.getTexture("UI_Ekkorr",i)),this.rewardLabel=new GB(s,e,aD.DEFAULT_COLOR,aD.MENU_LABEL_OPTION2),this.rewardLabel.iconScale=.72,this.countLabel=new YD(n,6737151,aD.MENU_LABEL_OPTION2),this.timeLabel=new YD(h,aD.DEFAULT_COLOR,aD.MENU_LABEL_OPTION2),this.container.x=0,this.container.y=0,this.container.addChild(this.bg),this.container.addChild(this.leftIcon),this.container.addChild(this.rewardLabel),this.container.addChild(this.countLabel),this.container.addChild(this.timeLabel),this.addChild(this.container),this.updateLayout(),this.eventMode="static",this.on("pointerdown",this.onDown,this),this.on("pointerup",this.onUp,this),this.on("pointerupoutside",this.onUp,this),this.on("pointertap",this.onTap,this),this.color=t.BROWN,this.hitArea=new Pi(0,0,this.bg.width,this.bg.height)}
+ updateLayout(){
+ const t=.5*this.bg.height;
+ this.bg.height,this.leftIcon.scale.set(.7),this.leftIcon.x=12,this.leftIcon.y=t-.5*this.leftIcon.height;
+ const i=this.leftIcon.x+this.leftIcon.width+4,s=this.bg.width-6-i,e=t-.5*(this.rewardLabel.height+-4+this.countLabel.height);
+ this.rewardLabel.x=i+.5*(s-this.rewardLabel.width),this.rewardLabel.y=e;
+ const n=i+.5*(s-(this.countLabel.width+4+this.timeLabel.width)),h=e+this.rewardLabel.height+-4+2;
+ this.countLabel.x=n,this.countLabel.y=h,this.timeLabel.x=this.countLabel.x+this.countLabel.width+4,this.timeLabel.y=h}
+ set color(t){
+ t!==this._color&&(this._color=t,this.bg.setIndex(this._color))}
+ get color(){
+ return this._color}
+ set activated(i){
+ this._activated=i,i?this.bg.setIndex(this._color):this.bg.setIndex(t.GRAY)}
+ get activated(){
+ return this._activated}
+ set rewardText(t){
+ this.rewardLabel.text=t,this.updateLayout()}
+ set countText(t){
+ this.countLabel.text=t,this.updateLayout()}
+ set timeText(t){
+ this.timeLabel.text=t,this.updateLayout()}
+ set leftIconName(t){
+ this.leftIcon.texture=ZA.getTexture("UI_Ekkorr",t),this.updateLayout()}
+ set rewardIconName(t){
+ this.rewardLabel.texture=ZA.getTexture("UI_Ekkorr",t),this.updateLayout()}
+ set width(t){
+ this.bg.width=t,this.updateLayout(),this.hitArea=new Pi(0,0,this.bg.width,this.bg.height)}
+ get width(){
+ return this.bg.width}
+ set height(t){
+ this.bg.height=t,this.updateLayout(),this.hitArea=new Pi(0,0,this.bg.width,this.bg.height)}
+ get height(){
+ return this.bg.height}
+ onDown(t){
+ this._activated&&(this.container.pivot.set(.5*this.bg.width,.5*this.bg.height),this.container.x=.5*this.bg.width,this.container.y=.5*this.bg.height,this.container.scale=.9)}
+ onUp(t){
+ this._activated&&(this.container.scale=1,this.container.pivot.set(0,0),this.container.x=0,this.container.y=0)}
+ onTap(t){
+ this._activated&&(KL.getInstance().playSFX(KL.SFX_NORMAL_CLICK),WL(),null!=this.onClick&&this.onClick())}
+ }
+ ;
+ Kt(Lti,"QuestBoxRewardButton"),zt(Lti,"RED",0),zt(Lti,"GREEN",1),zt(Lti,"BROWN",2),zt(Lti,"LIGHT_GREEN",3),zt(Lti,"VIOLET",4),zt(Lti,"BLUE",5),zt(Lti,"GRAY",6),zt(Lti,"ORANGE",7);
+ let Gti=Lti;
+ const Bti=class t extends aG{
+ constructor(){
+ super(),zt(this,"lblMessage",new YD("",aD.DEFAULT_COLOR,aD.ERROR_POPUP_LABEL_OPTION)),zt(this,"checkBox",new s1t),zt(this,"lblCheck",new YD("더 이상 물어보지 않기",aD.DEFAULT_COLOR,aD.DEFAULT_OUTLINE_FONT_OPTION_16)),zt(this,"btnConfirm",new sG("확인")),zt(this,"btnCancel",new lK("취소")),zt(this,"onConfirm",null),zt(this,"onCancel",null),this.title=AG.getText("GAME_618","골드구매"),this.lblMessage.y=90,this.contentContainer.addChild(this.lblMessage,this.checkBox,this.lblCheck,this.btnConfirm,this.btnCancel),this.btnConfirm.onClick=this.onConfirmClick.bind(this),this.btnCancel.onClick=this.onCancelClick.bind(this),this.btnClose.onClick=this.onCancelClick.bind(this)}
+ static getInstance(){
+ return this._instance||(this._instance=new t),this._instance}
+ static async shouldSkipConfirm(){
+ return"Y"===await $A.getQuestGoldBuySkipConfirm()}
+ static async setSkipConfirm(t){
+ await $A.saveQuestGoldBuySkipConfirm(t?"Y":"N")}
+ onConfirmClick(){
+ t.setSkipConfirm(this.checkBox.selected).catch(t=>{
+ }
+ ),this.hide();
+ const i=this.onConfirm;
+ this.onConfirm=null,this.onCancel=null,i&&i()}
+ onCancelClick(){
+ this.hide();
+ const t=this.onCancel;
+ this.onConfirm=null,this.onCancel=null,t&&t()}
+ show(t,i=null,s=null){
+ this.onConfirm=i,this.onCancel=s,this.lblMessage.text=t,this.title=AG.getText("GAME_618","골드구매"),this.lblCheck.text=AG.getText("COMMON_19","오늘 하루 보지 않기"),this.btnConfirm.text=AG.getText("COMMON_1","확인"),this.btnCancel.text=AG.getText("COMMON_2","취소"),this.checkBox.selected=!1,this.updateLayout(),super.show()}
+ updateLayout(){
+ this.lblMessage.x=.5*(this.width-this.lblMessage.width);
+ const t=this.checkBox.width+8+this.lblCheck.width,i=.5*(this.width-t);
+ this.checkBox.x=i,this.checkBox.y=this.lblMessage.y+this.lblMessage.height+20,this.lblCheck.x=this.checkBox.x+this.checkBox.width+8,this.lblCheck.y=this.checkBox.y+.5*(this.checkBox.height-this.lblCheck.height),this.btnConfirm.x=.5*(this.width-this.btnConfirm.width-this.btnCancel.width-20),this.btnCancel.x=this.btnConfirm.x+this.btnConfirm.width+20,this.btnConfirm.y=this.checkBox.y+this.checkBox.height+24,this.btnCancel.y=this.btnConfirm.y,this.height=this.btnConfirm.y+this.btnConfirm.height+40}
+ getDefaultPositionY(){
+ return.3*KA.stageHeight}
+ onBackButton(){
+ return this.onCancelClick(),!0}
+ }
+ ;
+ Kt(Bti,"QuestGoldBuyConfirmPopup"),zt(Bti,"_instance");
+ let Uti=Bti;
+ const Fti=class t extends AB{
+ constructor(){
+ super(),zt(this,"lblGuide"),this.lblGuide=new YD("",aD.DEFAULT_COLOR,aD.DEFAULT_FONT_OPTION_16),aD.setLabelWrapWidth(this.lblGuide,this.width-60),this.contentContainer.addChild(this.lblGuide),this.outSideClickHide=!0}
+ static getInstance(){
+ return this._instance||(this._instance=new t),this._instance}
+ async showGuide(){
+ this.title=AG.getText("GAME_387","퀘스트 안내");
+ const t=[`1. ${
+ AG.getText("GAME_388","퀘스트는 환생하면 초기화 됩니다.")}
+ `,`2. ${
+ AG.getText("GAME_389","초반에는 30층 이상에서 환생만 해도 퀘스트 관련된 버프가 증가합니다. (퀘스트 획득량 50% 증가, 퀘스트 시간 20% 단축, 퀘스트 오픈비용 20% 감소)")}
+ `,`3. ${
+ AG.getText("GAME_390","좋은 [유물]을 획득하면, 강력한 퀘스트 버프를 얻을 수 있습니다. [던전]을 빠르게 공략해서, 좋은 [유물]을 획득하세요.")}
+ `];
+ this.lblGuide.text=t.join("\n\n"),this.lblGuide.x=30,this.lblGuide.y=80,this.height=this.lblGuide.y+this.lblGuide.height+40,await this.loadImage(),super.show()}
+ getDefaultPositionY(){
+ return.4*KA.stageHeight}
+ onBackButton(){
+ return this.hide(),!0}
+ }
+ ;
+ Kt(Fti,"QuestGuidePopup"),zt(Fti,"_instance");
+ let Hti=Fti;
+ const Wti=class t extends D4{
+ constructor(){
+ super(),zt(this,"btnGold",new UB("UI_GemGold","100")),zt(this,"btnBox",new Gti("UI-GOLD-BOX","UI_GOLD","0","0/5","(00:00)",145,46)),zt(this,"btnGuide"),zt(this,"autoContainer",new Be),zt(this,"lblAuto",new YD("자동:",12303291,aD.DEFAULT_OUTLINE_FONT_OPTION_16)),zt(this,"lblAutoState",new YD("OFF",16737894,aD.DEFAULT_OUTLINE_FONT_OPTION_16)),zt(this,"boxRequesting",!1),zt(this,"requesting",!1),zt(this,"boxTickerStarted",!1),zt(this,"boxTickerFrame",0),zt(this,"lastShownCount",-1),zt(this,"lastShownTime",""),this.lblTitle.textSize=17,this.setTitle(AG.getText("GAME_1","퀘스트")),this.closeBtn.visible=!1,this.btnBox.x=this.bg.width-this.btnBox.width-6,this.btnBox.y=.5*(this.bg.height-this.btnBox.height)-2,this.addChild(this.btnBox),this.btnGold.color=UB.BROWN,this.btnGold.width=155,this.btnGold.height=46,this.btnGold.x=this.btnBox.x-this.btnGold.width-6,this.btnGold.y=.5*(this.bg.height-this.btnGold.height)-2,this.addChild(this.btnGold),this.btnGold.onClick=this.onGoldClick.bind(this),this.btnBox.onClick=this.onGoldBoxClick.bind(this),this.btnGuide=new mB("UI_Ekkorr","UI_Alarm"),this.btnGuide.x=this.lblTitle.x+this.lblTitle.width+3,this.btnGuide.y=this.lblTitle.y+.5*(this.lblTitle.height-this.btnGuide.height)+2,this.addChild(this.btnGuide),this.btnGuide.on("pointertap",()=>{
+ Hti.getInstance().showGuide()}
+ ),this.autoContainer.addChild(this.lblAuto),this.lblAutoState.x=this.lblAuto.width+5,this.autoContainer.addChild(this.lblAutoState),this.autoContainer.x=10,this.autoContainer.y=this.lblTitle.y+this.lblTitle.height-1,this.autoContainer.eventMode="static",this.autoContainer.cursor="pointer",this.autoContainer.on("pointertap",this.onToggleAuto.bind(this)),this.addChild(this.autoContainer),Dti.getInstance().loadSetting().then(()=>this.refreshAutoLabel())}
+ static getInstance(){
+ return null==t.instance&&(t.instance=new t),t.instance}
+ onToggleAuto(){
+ if(_L.maxWave<t.AUTO_UNLOCK_WAVE)return void vV.getInstance().showMessage(AG.getValueReplace("GAME_633","##",100,"최고 WAVE 100 이상에서 환생 후 이용가능합니다."));
+ const i=Dti.getInstance();
+ i.setEnabled(!i.enabled),this.refreshAutoLabel()}
+ refreshAutoLabel(){
+ const t=Dti.getInstance().enabled;
+ this.lblAutoState.text=t?"ON":"OFF",this.lblAutoState.textColor=t?16750899:8947848}
+ async onGoldBoxClick(){
+ if(this.boxRequesting)return;
+ const t=XN.getInstance();
+ if(t.getCount()<=0)return void vV.getInstance().showMessage(AG.getText("GAME_632","골드 상자가 비었습니다."));
+ const i=hL.getInstance().goldPerSec*t.rewardSec;
+ this.boxRequesting=!0;
+ const s=await hD.getInstance().user.useGoldBox();
+ if(this.boxRequesting=!1,!s||!1===s.success)return void mG.getInstance().showError(s);
+ const e=s.body;
+ XN.getInstance().setData({
+ count:e.count,max:e.max,nextInSec:e.nextInSec,rewardSec:t.rewardSec}
+ ),_L.updateGold(i),UV.getInstance().celebrateGold(i),this.refreshBoxButton()}
+ async onGoldClick(){
+ if(!this.requesting)if(_L.gem<100)vV.getInstance().showMessage(AG.getText("COMMON_352","보석이 부족합니다."));
+ else{
+ this.requesting=!0,this.btnGold.enabled=!1,this.btnGold.activated=!1;
+ try{
+ if(await Uti.shouldSkipConfirm())return void(await this.executeBuyGold());
+ const t=60*hL.getInstance().goldPerSec*10,i=$D.displayLargeNumberAsAlphabet(t),s=AG.getValueReplace("GAME_619","##",i,`보석 100개를 이용해서,\n골드 ${
+ i}
+ 를 구매하시겠습니까?`);
+ await new Promise(t=>{
+ Uti.getInstance().show(s,()=>t(!0),()=>t(!1))}
+ )&&await this.executeBuyGold()}
+ finally{
+ this.requesting=!1,this.btnGold.enabled=!0,this.btnGold.activated=!0}
+ }
+ }
+ async executeBuyGold(){
+ _L.updateGem(-100),UV.getInstance().updateGem();
+ const t=60*hL.getInstance().goldPerSec*10,i=await hD.getInstance().user.buyGold();
+ if(!i||!1===i.success)return _L.updateGem(100),UV.getInstance().updateGem(),void mG.getInstance().showError(i);
+ _L.updateGold(t),UV.getInstance().celebrateGold(t)}
+ setData(){
+ this.setTitle(AG.getText("GAME_1","퀘스트")),this.lblAuto.text=AG.getText("COMMON_483","자동")+":",this.lblAutoState.x=this.lblAuto.width+5,this.btnGuide.x=this.lblTitle.x+this.lblTitle.width+3,this.btnGuide.y=this.lblTitle.y+.5*(this.lblTitle.height-this.btnGuide.height)+2;
+ const i=_L.maxWave>=t.GOLD_BUY_UNLOCK_WAVE;
+ this.btnGold.visible=i,this.btnBox.visible=i,this.refreshGold(),this.refreshBoxButton(),this.startBoxTicker()}
+ refreshGold(){
+ hL.getInstance().updateGoldPerSec();
+ const t=hL.getInstance().goldPerSec,i=60*t*10;
+ this.btnGold.text=$D.displayLargeNumberAsAlphabet(i);
+ const s=t*XN.getInstance().rewardSec;
+ this.btnBox.rewardText=$D.displayLargeNumberAsAlphabet(s)}
+ refreshBoxButton(){
+ const t=XN.getInstance(),i=t.getCount();
+ this.btnBox.countText=`${
+ i}
+ /${
+ t.max}
+ `,i>=t.max?this.btnBox.timeText="(max)":this.btnBox.timeText=`(${
+ t.getNextInSecFormatted()}
+ )`}
+ startBoxTicker(){
+ this.boxTickerStarted||(this.boxTickerStarted=!0,this.boxTickerFrame=0,GM.getInstance().add(this.onBoxTick,this))}
+ onBoxTick(){
+ if(this.boxTickerFrame++,this.boxTickerFrame<30)return;
+ this.boxTickerFrame=0;
+ const t=XN.getInstance(),i=t.getCount(),s=i>=t.max?"(max)":`(${
+ t.getNextInSecFormatted()}
+ )`;
+ i!==this.lastShownCount&&(this.lastShownCount=i,this.btnBox.countText=`${
+ i}
+ /${
+ t.max}
+ `),s!==this.lastShownTime&&(this.lastShownTime=s,this.btnBox.timeText=s)}
+ }
+ ;
+ Kt(Wti,"QuestSubMenu"),zt(Wti,"instance"),zt(Wti,"AUTO_UNLOCK_WAVE",100),zt(Wti,"GOLD_BUY_UNLOCK_WAVE",50);
+ let jti=Wti;
+ const $ti=class t extends x6{
+ static getInstance(){
+ return null==this.instance&&(this.instance=new t),this.instance}
+ constructor(){
+ super(),this.currentSubView=Oti.getInstance()}
+ setData(){
+ jti.getInstance().setData(),Oti.getInstance().setData(),this.currentSubView=Oti.getInstance()}
+ get className(){
+ return"QuestView"}
+ updateLanguage(){
+ this.setData()}
+ }
+ ;
+ Kt($ti,"QuestView"),zt($ti,"instance");
+ let Vti=$ti;
+ const Kti=class extends Be{
+ constructor(t=0){
+ super(),zt(this,"bg"),zt(this,"icon"),zt(this,"line"),zt(this,"index",0),zt(this,"arrNormalNames",["menu_icon_01_on","menu_icon_03_on","menu_icon_02_on","menu_icon_04_on","menu_icon_05_on","menu_icon_06_on"]),zt(this,"lblTitle",new YD("SHOP",16777215,aD.BOTTOM_MENU_FONT_OPTION)),zt(this,"container",new Be),zt(this,"_selected",!1),zt(this,"onClick",Kt(()=>{
+ }
+ ,"onClick")),zt(this,"orgScale",1),zt(this,"onMotionComplete",null),zt(this,"eventTag"),zt(this,"lockIcon"),zt(this,"redDot"),this.index=t,this.createUI()}
+ createUI(){
+ this.bg=new CM({
+ texture:ZA.getTexture("UI_Ekkorr","UI_MAIN_MENU_BG_ON"),leftWidth:10,topHeight:10,rightWidth:10,bottomHeight:10}
+ ),this.addChild(this.bg),this.bg.width=640/6,this.icon=new We(ZA.getTexture("UI_Ekkorr",this.arrNormalNames[this.index])),this.addChild(this.icon),this.icon.x=.5*(this.bg.width-this.icon.width),this.icon.y=.5*(this.bg.height-10-this.icon.height),this.lblTitle.x=.5*(this.bg.width-this.lblTitle.width),this.lblTitle.y=40,this.bg.eventMode="static",this.bg.hitArea=new Pi(0,0,this.bg.width,this.bg.height),this.bg.on("pointerdown",this.onLobbyClick,this),this.addChild(this.bg),this.addChild(this.icon),this.addChild(this.lblTitle),this.icon.eventMode="none",this.lblTitle.eventMode="none"}
+ get height(){
+ return 70}
+ set title(t){
+ this.lblTitle.text=t,this.lblTitle.x=.5*(this.bg.width-this.lblTitle.width)}
+ set selected(t){
+ this._selected=t,t?(this.bg.texture=ZA.getTexture("UI_Ekkorr","UI_MAIN_MENU_BG_ON"),this.icon.tint=16777215,this.lblTitle.tint=16777215,this.up()):(this.bg.texture=ZA.getTexture("UI_Ekkorr","UI_MAIN_MENU_BG_OFF"),this.icon.tint=6710886,this.lblTitle.tint=4473924,this.down()),this.updateEventTagState()}
+ up(){
+ }
+ down(){
+ }
+ onLobbyClick(){
+ this.onClick(this.index)}
+ getIcon(){
+ return this.icon}
+ startMotion(t=null,i=1.2,s=null){
+ this.onMotionComplete=s;
+ const e=this.icon;
+ e.scale.x=e.scale.y=this.orgScale*i,GM.getInstance().add(this.executeMotion,this)}
+ executeMotion(){
+ const t=this.icon,i=this.orgScale;
+ t.scale.x=t.scale.y+=.2*(this.orgScale-t.scale.y),Math.abs(t.scale.x-i)<.03&&(GM.getInstance().remove(this.executeMotion,this),t.scale.x=t.scale.y=i,this.onMotionComplete&&(this.onMotionComplete(),this.onMotionComplete=null))}
+ showEventTag(t=0,i=0){
+ this.eventTag||(this.eventTag=new We(ZA.getTexture("UI_Ekkorr","UI_Event")),this.addChild(this.eventTag)),this.eventTag.visible=!0,this.updateEventTag(t,i)}
+ hideEventTag(){
+ this.eventTag&&(this.eventTag.visible=!1)}
+ updateEventTag(t,i){
+ this.eventTag&&(this.eventTag.x=this.width-this.eventTag.width+t,this.eventTag.y=this.y+i,this.updateEventTagState())}
+ updateEventTagState(){
+ this.eventTag&&0!=this.eventTag.visible&&(this._selected?this.eventTag.tint=16777215:this.eventTag.tint=6710886)}
+ getEventTagVisible(){
+ return!!this.eventTag&&this.eventTag.visible}
+ showLockIcon(t=0,i=0){
+ this.lockIcon||(this.lockIcon=new We(ZA.getTexture("UI_Ekkorr","Icon_Lock")),this.addChild(this.lockIcon)),this.lockIcon.visible=!0,this.updateLockIcon(t,i)}
+ hideLockIcon(){
+ this.lockIcon&&(this.lockIcon.visible=!1)}
+ updateLockIcon(t,i){
+ this.lockIcon&&(this.lockIcon.x=this.width-this.lockIcon.width+t,this.lockIcon.y=this.y+i,this.updateLockIconState())}
+ updateLockIconState(){
+ this.lockIcon&&0!=this.lockIcon.visible&&(this.lockIcon.tint=16777215)}
+ getLockIconVisible(){
+ return!!this.lockIcon&&this.lockIcon.visible}
+ showRedDot(){
+ this.redDot||(this.redDot=new We(ZA.getTexture("UI_Ekkorr","red_dot_ani_30f_0001"))),this.updateRedDot(),this.addChild(this.redDot)}
+ hideRedDot(){
+ this.redDot&&this.redDot.removeFromParent()}
+ updateRedDot(){
+ this.redDot&&(this.redDot.x=this.bg.x+this.bg.width-this.redDot.width-15,this.redDot.y=0)}
+ getRedDotActivated(){
+ return!!this.redDot&&!!this.redDot.parent}
+ }
+ ;
+ Kt(Kti,"BottomMenu");
+ let zti=Kti;
+ const qti=class t extends Be{
+ constructor(){
+ super(),zt(this,"menuNames",["Quest","Heroes","Castle","Artifacts","Battle","Shop"]),zt(this,"menus",[]),zt(this,"onLanguageChangeBind"),zt(this,"heroPoint",new mi),zt(this,"heroPointInitialized",!1),zt(this,"castlePoint",new mi),zt(this,"castlePointInitialized",!1),zt(this,"battlePoint",new mi),zt(this,"battlePointInitialized",!1),zt(this,"shopPoint",new mi),zt(this,"shopPointInitialized",!1),zt(this,"count",0),zt(this,"onAssistantClaimBind"),this.createUI(),this.setLanguageChange(!0),this.updateLanguage(),VV.getInstance().registerBottomMenuGetter(()=>{
+ const t=this.getMenu(1);
+ return{
+ parent:this,btn:{
+ x:t.x,y:t.y,width:t.width,height:t.height}
+ }
+ }
+ ),HV.getInstance().registerBottomMenuGetter(t=>{
+ const i=this.getMenu(t);
+ if(!i)return null;
+ const s=i.getGlobalPosition(),e=this.parent;
+ if(!e)return null;
+ const n=e.toLocal(s);
+ return{
+ parent:e,btn:{
+ x:n.x,y:n.y,width:i.width,height:i.height}
+ }
+ }
+ ),this.on("added",this.onAdded),this.on("removed",this.onRemoved)}
+ static getInstance(){
+ return null==this.instance&&(this.instance=new t),this.instance}
+ onAdded(){
+ this.onEnterUpdate(),this.setEnterUpdate(!0),this.setAssistantClaim(!0)}
+ onRemoved(){
+ this.setEnterUpdate(!1),this.setAssistantClaim(!1)}
+ createUI(){
+ for(let t=0;
+ t<6;
+ t++){
+ let i=new zti(t);
+ i.x=640/6*t,i.y=0,this.addChild(i),this.menus.push(i),i.title=this.menuNames[t],i.eventMode="static",i.on("pointerdown",this.onMenuClick.bind(this))}
+ this.menuClick(this.menus[0])}
+ onMenuClick(t){
+ let i=t.currentTarget;
+ this.menuClick(i)}
+ async onMenuClickByIndex(t){
+ try{
+ let i=this.menus[t];
+ if(i.index==AV.currentIndex)return;
+ this.menuClick(i)}
+ catch(i){
+ }
+ }
+ async menuClick(t){
+ if(WL(),KL.getInstance().playSFX(KL.SFX_NORMAL_CLICK),UV.getInstance().setMode(GV.NORMAL),LV.getInstance().children.length>0&&mnt.getInstance().hideAllPvPPopups(),-1!=Zti.getInstance().bottomMenuUnlockList.indexOf(t.index)){
+ switch(0==t.index&&Zti.getInstance().isRunning&&VV.getInstance().currentTarget==this&&(VV.getInstance().hideFromTarget(),Zti.getInstance().showQuestHelpPopup()),1==t.index&&Zti.getInstance().isRunning&&Zti.getInstance().showHeroHelpPopup(),t.index){
+ case 0:S4.getInstance().setExpandedMode(!1),Vti.getInstance().setData(),S4.getInstance().currentView=Vti.getInstance();
+ break;
+ case 1:S4.getInstance().setExpandedMode(!1),w9.getInstance().setData(),S4.getInstance().currentView=w9.getInstance();
+ break;
+ case 2:S4.getInstance().setExpandedMode(!1),Sti.getInstance().setData(),S4.getInstance().currentView=Sti.getInstance();
+ break;
+ case 3:const t=Wx.getInstance().unlockWave;
+ if(_L.maxWave<t)return void vV.getInstance().showMessage(AG.getValueReplace("GAME_35","##",t,`${
+ t}
+  wave 이상에서 개방됩니다.`));
+ S4.getInstance().setExpandedMode(!1),sht.getInstance().setData(),S4.getInstance().currentView=sht.getInstance();
+ break;
+ case 4:if(_L.maxWave<50)return void vV.getInstance().showMessage(AG.getValueReplace("GAME_35","##",50,"최고 기록이 50 wave를 넘은 이후에 개방됩니다.")+"\n"+AG.getValueReplace("GAME_36","##",50,"50 wave 넘어서 환생해주세요."));
+ S4.getInstance().setExpandedMode(!1),P6.getInstance().setData(),S4.getInstance().currentView=P6.getInstance();
+ break;
+ case 5:if(0==hK.getInstance().isReviewShop()&&_L.maxWave<10&&_L.wave<10)return void vV.getInstance().showMessage(AG.getValueReplace("GAME_34","##",10,"10 wave 이상에서 개방됩니다."));
+ S4.getInstance().setExpandedMode(!1),S8.getInstance().setData(),S4.getInstance().currentView=S8.getInstance()}
+ AV.currentIndex=t.index,this.menus.forEach(t=>t.selected=!1),t.selected=!0,HV.getInstance().onMenuChanged()}
+ else if(3==t.index){
+ const t=Wx.getInstance().unlockWave;
+ if(_L.maxWave<t)return void vV.getInstance().showMessage(AG.getValueReplace("GAME_35","##",t,`${
+ t}
+  wave 이상에서 개방됩니다.`))}
+ else if(4==t.index){
+ if(_L.maxWave<50)return void vV.getInstance().showMessage(AG.getValueReplace("GAME_35","##",50,"최고 기록이 50 wave를 넘은 이후에 개방됩니다.")+"\n"+AG.getValueReplace("GAME_36","##",50,"50 wave 넘어서 환생해주세요."))}
+ else if(5==t.index&&0==hK.getInstance().isReviewShop()&&_L.maxWave<10&&_L.wave<10)return void vV.getInstance().showMessage(AG.getValueReplace("GAME_34","##",10,"10 wave 이상에서 개방됩니다."))}
+ setMenuSelected(t){
+ try{
+ let i=this.menus[t];
+ if(i.index==AV.currentIndex)return;
+ AV.currentIndex=i.index,this.menus.forEach(t=>t.selected=!1),i.selected=!0}
+ catch(i){
+ }
+ }
+ get height(){
+ return 70}
+ getMenu(t){
+ return this.menus[t]}
+ setLanguageChange(t){
+ lS.getInstance().removeEventListener("LanguageChange",this.onLanguageChangeBind),t&&(this.onLanguageChangeBind=this.onLanguageChange.bind(this),lS.getInstance().addEventListener("LanguageChange",this.onLanguageChangeBind))}
+ onLanguageChange(t=null){
+ this.updateLanguage()}
+ updateLanguage(){
+ this.menuNames=[AG.getText("GAME_1","퀘스트"),AG.getText("GAME_3","영웅"),AG.getText("GAME_2","성"),AG.getText("GAME_4","유물"),AG.getText("GAME_70","전투"),AG.getText("COMMON_356","상점")];
+ const t=this.menus.length;
+ for(let i=0;
+ i<t;
+ ++i)this.menus[i].title=this.menuNames[i]}
+ getHeroPoint(){
+ if(0==this.heroPointInitialized){
+ this.heroPointInitialized=!0;
+ const t=this.menus[1];
+ this.heroPoint.x=this.x+t.x+.5*t.width,this.heroPoint.y=this.y+t.y+.5*t.height}
+ return this.heroPoint}
+ getCastlePoint(){
+ if(0==this.castlePointInitialized){
+ this.castlePointInitialized=!0;
+ const t=this.menus[2];
+ this.castlePoint.x=this.x+t.x+.5*t.width,this.castlePoint.y=this.y+t.y+.5*t.height}
+ return this.castlePoint}
+ getBattlePoint(){
+ if(0==this.battlePointInitialized){
+ this.battlePointInitialized=!0;
+ const t=this.menus[4];
+ this.battlePoint.x=this.x+t.x+.5*t.width,this.battlePoint.y=this.y+t.y+.5*t.height}
+ return this.battlePoint}
+ getShopPoint(){
+ if(0==this.shopPointInitialized){
+ this.shopPointInitialized=!0;
+ const t=this.menus[5];
+ this.shopPoint.x=this.x+t.x+.5*t.width,this.shopPoint.y=this.y+t.y+.5*t.height}
+ return this.shopPoint}
+ startHeroMotion(t=null,i=1.2){
+ this.menus[1].startMotion(t,i)}
+ startCastleMotion(t=null,i=1.2){
+ this.menus[2].startMotion(t,i)}
+ startBattleMotion(t=null,i=1.2){
+ this.menus[4].startMotion(t,i)}
+ startShopMotion(t=null,i=1.2){
+ this.menus[5].startMotion(t,i)}
+ setEnterUpdate(t){
+ GM.getInstance().remove(this.onEnter,this),t&&GM.getInstance().add(this.onEnter,this)}
+ onEnter(){
+ ++this.count>60&&(this.count=0,this.onEnterUpdate())}
+ async onEnterUpdate(){
+ fU.isValidEvent(pU.HERO_RESET_EVENT)?this.getMenu(1).showEventTag(-3,2):this.getMenu(1).hideEventTag(),fU.isValidEvent(pU.PAYMENT_EVENT)&&fU.currentPaymentSpecialEvent?this.getMenu(5).showEventTag(-3,2):this.getMenu(5).hideEventTag(),await this.updateSecretaryClaimable()}
+ async updateSecretaryClaimable(){
+ const t=await V9t.getInstance().checkClaimable();
+ t?this.getMenu(2).showRedDot():this.getMenu(2).hideRedDot(),C8.getInstance().isCastleSubView()&&_ti.getInstance().updateCitadel(t)}
+ setAssistantClaim(t){
+ lS.getInstance().removeEventListener("AssistantClaim",this.onAssistantClaimBind),t&&(this.onAssistantClaimBind=this.onAssistantClaim.bind(this),lS.getInstance().addEventListener("AssistantClaim",this.onAssistantClaimBind))}
+ onAssistantClaim(t){
+ this.updateSecretaryClaimable()}
+ hideLockIconsTo(t){
+ this.menus.forEach(t=>t.showLockIcon(-10)),t.forEach(t=>{
+ this.getMenu(t).hideLockIcon()}
+ )}
+ }
+ ;
+ Kt(qti,"BottomMenus"),zt(qti,"instance");
+ let Xti=qti;
+ const Yti=class t extends Be{
+ constructor(){
+ super(),zt(this,"frameLeft"),zt(this,"frameRight"),zt(this,"npcIcon"),zt(this,"lblName"),zt(this,"lblMessage"),zt(this,"bg"),zt(this,"timeCount",0),zt(this,"isFadingOut",!1),zt(this,"currentPosition",1),zt(this,"queue",[]),zt(this,"textureLoaded",!1),zt(this,"onCompleteHandler",null),this.eventMode="none",this.bg=new QD,this.bg.alpha=.6,this.bg.setIndex(7),this.addChild(this.bg),this.frameLeft=new We,this.addChild(this.frameLeft),this.npcIcon=new We,this.addChild(this.npcIcon),this.lblName=new YD("",16768324,aD.DEFAULT_OUTLINE_FONT_OPTION_17),this.addChild(this.lblName),this.lblMessage=new YD("",aD.COLOR_WHITE,aD.DEFAULT_FONT_OPTION_16),this.addChild(this.lblMessage),this.frameRight=new We,this.addChild(this.frameRight)}
+ static getInstance(){
+ return null==this.instance&&(this.instance=new t),this.instance}
+ static getNpcName(i){
+ if(i.length>=2){
+ const s=i.substring(0,2);
+ if(t.NPC_NAMES[s])return AG.getText(`DIALOGUE_NPC_${
+ s}
+ `,t.NPC_NAMES[s])}
+ const s=i.substring(0,1);
+ return AG.getText(`DIALOGUE_NPC_${
+ s}
+ `,t.NPC_NAMES[s])??""}
+ async showDialogues(i){
+ if(0!==i.length&&KD.getInstance().npcDialogue){
+ if(await this.waitForPopupsClosed(),!this.textureLoaded){
+ const i="ktx2";
+ await ZA.generateTexture(t.SHEET,i,!1),this.textureLoaded=!0}
+ this.queue.push(...i),this.timeCount<=0&&this.playNext()}
+ }
+ waitForPopupsClosed(){
+ return new Promise(t=>{
+ if(!IL.getInstance().hasPopup)return void t();
+ const i=Kt(()=>{
+ IL.getInstance().hasPopup||(GM.getInstance().remove(i,this),t())}
+ ,"check");
+ GM.getInstance().add(i,this)}
+ )}
+ async show(i,s,e=360,n=1){
+ if(!this.textureLoaded){
+ const i="ktx2";
+ await ZA.generateTexture(t.SHEET,i,!1),this.textureLoaded=!0}
+ this.showCurrent(i,s,e,n)}
+ playNext(){
+ if(0===this.queue.length)return;
+ const i=this.queue.shift(),s=AG.getText(i.getTextKey(),i.text);
+ this.showCurrent(i.code,s,t.DURATION_PER_DIALOGUE,i.position)}
+ showCurrent(i,s,e,n=1){
+ const h=t.SHEET;
+ this.currentPosition=n,this.frameLeft.visible=!1,this.frameRight.visible=!1,this.npcIcon.texture=ZA.getTexture(h,i);
+ const r=125/this.npcIcon.texture.height;
+ this.npcIcon.scale.set(r),this.lblName.text=t.getNpcName(i),aD.setLabelWrapWidth(this.lblMessage,480),this.lblMessage.text=s,this.relayout(),this.alpha=0,this.timeCount=e,this.isFadingOut=!1,GM.getInstance().remove(this.onFrame,this),GM.getInstance().add(this.onFrame,this),O9t.getInstance().addChild(this)}
+ relayout(){
+ const i=t.PAD,s=2===this.currentPosition,e=520,n=this.lblMessage.height+2*i+16,h=this.npcIcon.scale.x,r=this.npcIcon.texture.width*h,o=this.npcIcon.texture.height*h;
+ this.bg.width=e,this.bg.height=n,this.bg.x=0,this.bg.y=0;
+ const a=-o;
+ s?(this.npcIcon.scale.x=-Math.abs(h),this.npcIcon.x=e-i,this.npcIcon.y=a,this.lblName.x=this.npcIcon.x-r-this.lblName.width+6,this.lblName.y=-this.lblName.height-4,this.lblMessage.x=.5*(e-this.lblMessage.width),this.lblMessage.y=.5*(n-this.lblMessage.height)):(this.npcIcon.scale.x=Math.abs(h),this.npcIcon.x=i,this.npcIcon.y=a,this.lblName.x=this.npcIcon.x+r-6,this.lblName.y=-this.lblName.height-4,this.lblMessage.x=.5*(e-this.lblMessage.width),this.lblMessage.y=.5*(n-this.lblMessage.height)),this.x=.5*(KA.stageWidth-e),this.y=460}
+ onFrame(){
+ IL.getInstance().hasPopup?this.visible=!1:(this.visible=!0,this.alpha<1&&!this.isFadingOut&&(this.alpha+=1/t.FADE_IN_FRAMES,this.alpha>1&&(this.alpha=1)),this.timeCount<=t.FADE_OUT_FRAMES&&!this.isFadingOut&&(this.isFadingOut=!0),this.isFadingOut&&(this.alpha-=1/t.FADE_OUT_FRAMES,this.alpha<0&&(this.alpha=0)),this.timeCount--,this.timeCount<=0&&(GM.getInstance().remove(this.onFrame,this),this.queue.length>0?this.playNext():(this.parent&&this.parent.removeChild(this),this.onCompleteHandler&&(this.onCompleteHandler(),this.onCompleteHandler=null))))}
+ }
+ ;
+ Kt(Yti,"NpcDialogueToast"),zt(Yti,"instance"),zt(Yti,"SHEET","Dialogue"),zt(Yti,"PAD",8),zt(Yti,"NPC_NAMES",{
+ S:"정령",L:"성주",CH:"오크 부족장",SC:"오크 정찰병",CP:"휴먼 기사단장",LI:"리치 사령관",EC:"엘프 지휘관"}
+ ),zt(Yti,"DURATION_PER_DIALOGUE",300),zt(Yti,"FADE_IN_FRAMES",10),zt(Yti,"FADE_OUT_FRAMES",30);
+ let Jti=Yti;
+ const Qti=class t{
+ constructor(){
+ zt(this,"isOpened",!0),zt(this,"savedIndex",0),zt(this,"tutorialIndex",0),zt(this,"enableMissionGuide",!0),zt(this,"bottomMenuUnlockList",[0,1,2,3,4,5]),zt(this,"isHelpHeroPopupped",!1),zt(this,"isHelpQuestPopupped",!1),zt(this,"isHelpRevivePopupped",!1)}
+ static getInstance(){
+ return this.instance||(this.instance=new t),this.instance}
+ async init(){
+ }
+ get isRunning(){
+ return 0!=this.isOpened&&this.tutorialIndex>0}
+ async startTutorial(){
+ 0!=this.isOpened&&(_L.numRevive>0||(this.savedIndex=Number(await $A.getTutorialID()??0),_L.wave>this.savedIndex?1==_L.wave?(this.enableMissionGuide=!1,this.tutorialIndex!=t.TUTORIAL_INDEX_WAVE0&&(this.tutorialIndex=t.TUTORIAL_INDEX_WAVE0,await this.startTutorialWave0())):2==_L.wave?(this.enableMissionGuide=!1,this.tutorialIndex=_L.wave,await this.startTutorialWave2()):3==_L.wave?(this.enableMissionGuide=!1,this.tutorialIndex=t.TUTORIAL_INDEX_WAVE3,await this.startTutorialWave3()):(this.enableMissionGuide=!0,this.tutorialIndex=_L.wave,this.startTutorialWaveEtc()):1==_L.wave?(this.bottomMenuUnlockList=[2],Xti.getInstance().onMenuClickByIndex(2),Xti.getInstance().hideLockIconsTo(this.bottomMenuUnlockList),_9t.getInstance().opened=!1,this.enableMissionGuide=!1):2==_L.wave?(this.bottomMenuUnlockList=[1,2],Xti.getInstance().hideLockIconsTo(this.bottomMenuUnlockList)):3==_L.wave?(this.bottomMenuUnlockList=[0,1,2],Xti.getInstance().hideLockIconsTo(this.bottomMenuUnlockList),this.enableMissionGuide=!0,HV.getInstance().init()):(this.bottomMenuUnlockList=[0,1,2],Xti.getInstance().hideLockIconsTo(this.bottomMenuUnlockList))))}
+ async startTutorialWave0(){
+ this.bottomMenuUnlockList=[2],Xti.getInstance().onMenuClickByIndex(2),Xti.getInstance().hideLockIconsTo(this.bottomMenuUnlockList),_9t.getInstance().opened=!1,WG.getInstance().stop(),hL.getInstance().stopUpdate(),Jti.getInstance().onCompleteHandler=this.onTurotial0Toast1Complete.bind(this);
+ const t=AG.getText("DIALOGUE_TEXT_75","윽.. 머리야.. 여긴 어디지? 뭔가 익숙한데...");
+ Jti.getInstance().show("L_FRO",t)}
+ onTurotial0Toast1Complete(){
+ const t=sK.getInstance().getMainList();
+ t&&(w4.getInstance().onHideHandler=this.onHelpCastlePopupHide.bind(this),w4.getInstance().showWith(t[0].main,2,!0,!1))}
+ onHelpCastlePopupHide(){
+ zii.getInstance().startTutorial0Wave(),Jti.getInstance().onCompleteHandler=this.onTurotial0Toast2Complete.bind(this);
+ const t=AG.getText("DIALOGUE_TEXT_76","저 슬라임 녀석들.. 성을 공격하러 오는 것 같은데?");
+ Jti.getInstance().show("L_SUR",t)}
+ onTurotial0Toast2Complete(){
+ WG.getInstance().stop(),this.bottomMenuUnlockList.push(1),Xti.getInstance().hideLockIconsTo(this.bottomMenuUnlockList);
+ const t=Xti.getInstance().getMenu(1),i=Xti.getInstance().getHeroPoint();
+ XV.getInstance().show(i.x,i.y,t.width,t.height)}
+ showHeroHelpPopup(){
+ this.isHelpHeroPopupped||this.tutorialIndex==t.TUTORIAL_INDEX_WAVE0&&(XV.getInstance().hide(),setTimeout(()=>{
+ const t=sK.getInstance().getMainList();
+ t&&(w4.getInstance().onHideHandler=this.highlightHeroRosterButton.bind(this),w4.getInstance().showWith(t[1].main,0,!0,!1),this.isHelpHeroPopupped=!0)}
+ ,100))}
+ highlightHeroRosterButton(){
+ const t=W9.getInstance().btnRoaster,i=W9.getInstance().getBtnRosterPoint();
+ XV.getInstance().show(i.x+.5*t.width,i.y+.5*t.height,t.width,t.height)}
+ highlightHeroHireButton(){
+ const t=K9.getInstance().getItems();
+ if(t.length<1)return void this.highlightHeroHireCloseButton();
+ const i=t[0].btnHire,s=K9.getInstance().getBtnHirePoint();
+ XV.getInstance().show(s.x+.5*i.width,s.y+.5*i.height,i.width,i.height)}
+ highlightHeroHireCloseButton(){
+ const t=q9.getInstance().btnClose,i=q9.getInstance().getBtnClosePoint();
+ XV.getInstance().show(i.x+.5*t.width,i.y+.5*t.height,t.width,t.height)}
+ clearTutorialWave0(){
+ XV.getInstance().hide(),WG.getInstance().start()}
+ async endTutorialWave0(){
+ await $A.saveTutorialID(String(t.TUTORIAL_INDEX_WAVE0)),this.savedIndex=1}
+ async startTutorialWave2(){
+ this.bottomMenuUnlockList=[1,2],Xti.getInstance().hideLockIconsTo(this.bottomMenuUnlockList),Xti.getInstance().onMenuClickByIndex(1),_9t.getInstance().opened=!1}
+ async startTutorialWave3(){
+ if(this.bottomMenuUnlockList=[1,2],Xti.getInstance().hideLockIconsTo(this.bottomMenuUnlockList),_9t.getInstance().opened=!1,KD.getInstance().npcDialogue){
+ const t=[],i=new JV;
+ i.code="L_SAD",i.text=AG.getText("DIALOGUE_TEXT_5","영웅들을 무장시키고 성벽을 보강하려니... 생각보다 자금이 턱없이 부족하군."),i.position=1,t.push(i);
+ const s=new JV;
+ s.code="S_SMI",s.text=AG.getText("DIALOGUE_TEXT_6","이해합니다, 성주임. 마침 성주님의 명성을 듣고 도움을 청하는 이들이 줄을 섰답니다. [퀘스트]를 해결해 주시면 그들은 기꺼이 금화를 내놓을 거예요."),s.position=2,t.push(s),Jti.getInstance().onCompleteHandler=this.onTurotial3ToastComplete.bind(this),t.length>0&&Jti.getInstance().showDialogues(t)}
+ else this.onTurotial3ToastComplete()}
+ onTurotial3ToastComplete(){
+ this.bottomMenuUnlockList=[0,1,2],Xti.getInstance().hideLockIconsTo(this.bottomMenuUnlockList),hL.getInstance().startUpdate();
+ const t=Xti.getInstance().getMenu(0),i={
+ x:t.x,y:t.y,width:t.width,height:t.height}
+ ;
+ VV.getInstance().showOnTarget(Xti.getInstance(),i)}
+ showQuestHelpPopup(){
+ this.isHelpQuestPopupped||setTimeout(()=>{
+ const t=sK.getInstance().getMainList();
+ t&&(w4.getInstance().onHideHandler=this.endTutorialWave3.bind(this),w4.getInstance().showWith(t[2].main,0,!0,!1),this.isHelpQuestPopupped=!0)}
+ ,100)}
+ async endTutorialWave3(){
+ await $A.saveTutorialID(String(t.TUTORIAL_INDEX_WAVE3)),this.savedIndex=t.TUTORIAL_INDEX_WAVE3,this.enableMissionGuide=!0,HV.getInstance().init(),Mz.getInstance().doAccountCreate()}
+ async startTutorialWaveEtc(){
+ _9t.getInstance().opened=!1,_L.wave>=10?this.bottomMenuUnlockList=[0,1,2,5]:this.bottomMenuUnlockList=[0,1,2],Xti.getInstance().hideLockIconsTo(this.bottomMenuUnlockList)}
+ async startTutorialRevive(){
+ if(0!=this.isOpened&&0==this.isHelpRevivePopupped){
+ const t=sK.getInstance().getMainList();
+ t&&(w4.getInstance().onHideHandler=this.endTutorialRevive.bind(this),w4.getInstance().showWith(t[3].main,0,!0,!1),this.isHelpRevivePopupped=!0)}
+ }
+ async endTutorialRevive(){
+ this.bottomMenuUnlockList=[0,1,2,3,4,5],Xti.getInstance().hideLockIconsTo(this.bottomMenuUnlockList),await $A.saveTutorialID(String(t.TUTORIAL_INDEX_REVIVE))}
+ async showHeroHelpPopupByPresent(t){
+ if(t<5||t>7)return;
+ const i=sK.getInstance().getMainList();
+ i&&(w4.getInstance().onHideHandler=this.endTutorialWave3.bind(this),w4.getInstance().showWith(i[t].main,0,!0,!1),this.isHelpQuestPopupped=!0)}
+ }
+ ;
+ Kt(Qti,"TutorialController"),zt(Qti,"instance"),zt(Qti,"TUTORIAL_INDEX_WAVE0",1),zt(Qti,"TUTORIAL_INDEX_WAVE3",3),zt(Qti,"TUTORIAL_INDEX_REVIVE",100);
+ let Zti=Qti;
+ const tii=class t extends aG{
+ constructor(){
DialogueLayer 2 hunks, 987 statements
- const v9t=class extends aS{
- constructor(){
- super()}
- }
- ;
- Kt(v9t,"DialogueLayer");
- let b9t=v9t;
- const y9t=Object.freeze(Object.defineProperty({
- __proto__:null,DialogueLayer:b9t}
- ,Symbol.toStringTag,{
- value:"Module"}
- )),_9t=class t extends Be{
- constructor(){
- super(),zt(this,"frameLeft"),zt(this,"frameRight"),zt(this,"npcIcon"),zt(this,"lblName"),zt(this,"lblMessage"),zt(this,"bg"),zt(this,"timeCount",0),zt(this,"isFadingOut",!1),zt(this,"currentPosition",1),zt(this,"queue",[]),zt(this,"textureLoaded",!1),zt(this,"onCompleteHandler",null),this.eventMode="none",this.bg=new QD,this.bg.alpha=.6,this.bg.setIndex(7),this.addChild(this.bg),this.frameLeft=new We,this.addChild(this.frameLeft),this.npcIcon=new We,this.addChild(this.npcIcon),this.lblName=new YD("",16768324,aD.DEFAULT_OUTLINE_FONT_OPTION_17),this.addChild(this.lblName),this.lblMessage=new YD("",aD.COLOR_WHITE,aD.DEFAULT_FONT_OPTION_16),this.addChild(this.lblMessage),this.frameRight=new We,this.addChild(this.frameRight)}
- static getInstance(){
- return null==this.instance&&(this.instance=new t),this.instance}
- static getNpcName(i){
- if(i.length>=2){
- const s=i.substring(0,2);
- if(t.NPC_NAMES[s])return AG.getText(`DIALOGUE_NPC_${
- s}
- `,t.NPC_NAMES[s])}
- const s=i.substring(0,1);
- return AG.getText(`DIALOGUE_NPC_${
- s}
- `,t.NPC_NAMES[s])??""}
- async showDialogues(i){
- if(0!==i.length&&KD.getInstance().npcDialogue){
- if(await this.waitForPopupsClosed(),!this.textureLoaded){
- const i="ktx2";
- await ZA.generateTexture(t.SHEET,i,!1),this.textureLoaded=!0}
- this.queue.push(...i),this.timeCount<=0&&this.playNext()}
- }
- waitForPopupsClosed(){
- return new Promise(t=>{
- if(!IL.getInstance().hasPopup)return void t();
- const i=Kt(()=>{
- IL.getInstance().hasPopup||(GM.getInstance().remove(i,this),t())}
- ,"check");
- GM.getInstance().add(i,this)}
- )}
- async show(i,s,e=360,n=1){
- if(!this.textureLoaded){
- const i="ktx2";
- await ZA.generateTexture(t.SHEET,i,!1),this.textureLoaded=!0}
- this.showCurrent(i,s,e,n)}
- playNext(){
- if(0===this.queue.length)return;
- const i=this.queue.shift(),s=AG.getText(i.getTextKey(),i.text);
- this.showCurrent(i.code,s,t.DURATION_PER_DIALOGUE,i.position)}
- showCurrent(i,s,e,n=1){
- const h=t.SHEET;
- this.currentPosition=n,this.frameLeft.visible=!1,this.frameRight.visible=!1,this.npcIcon.texture=ZA.getTexture(h,i);
- const r=125/this.npcIcon.texture.height;
- this.npcIcon.scale.set(r),this.lblName.text=t.getNpcName(i),aD.setLabelWrapWidth(this.lblMessage,480),this.lblMessage.text=s,this.relayout(),this.alpha=0,this.timeCount=e,this.isFadingOut=!1,GM.getInstance().remove(this.onFrame,this),GM.getInstance().add(this.onFrame,this),b9t.getInstance().addChild(this)}
- relayout(){
- const i=t.PAD,s=2===this.currentPosition,e=520,n=this.lblMessage.height+2*i+16,h=this.npcIcon.scale.x,r=this.npcIcon.texture.width*h,o=this.npcIcon.texture.height*h;
- this.bg.width=e,this.bg.height=n,this.bg.x=0,this.bg.y=0;
- const a=-o;
- s?(this.npcIcon.scale.x=-Math.abs(h),this.npcIcon.x=e-i,this.npcIcon.y=a,this.lblName.x=this.npcIcon.x-r-this.lblName.width+6,this.lblName.y=-this.lblName.height-4,this.lblMessage.x=.5*(e-this.lblMessage.width),this.lblMessage.y=.5*(n-this.lblMessage.height)):(this.npcIcon.scale.x=Math.abs(h),this.npcIcon.x=i,this.npcIcon.y=a,this.lblName.x=this.npcIcon.x+r-6,this.lblName.y=-this.lblName.height-4,this.lblMessage.x=.5*(e-this.lblMessage.width),this.lblMessage.y=.5*(n-this.lblMessage.height)),this.x=.5*(KA.stageWidth-e),this.y=460}
- onFrame(){
- IL.getInstance().hasPopup?this.visible=!1:(this.visible=!0,this.alpha<1&&!this.isFadingOut&&(this.alpha+=1/t.FADE_IN_FRAMES,this.alpha>1&&(this.alpha=1)),this.timeCount<=t.FADE_OUT_FRAMES&&!this.isFadingOut&&(this.isFadingOut=!0),this.isFadingOut&&(this.alpha-=1/t.FADE_OUT_FRAMES,this.alpha<0&&(this.alpha=0)),this.timeCount--,this.timeCount<=0&&(GM.getInstance().remove(this.onFrame,this),this.queue.length>0?this.playNext():(this.parent&&this.parent.removeChild(this),this.onCompleteHandler&&(this.onCompleteHandler(),this.onCompleteHandler=null))))}
- }
- ;
- Kt(_9t,"NpcDialogueToast"),zt(_9t,"instance"),zt(_9t,"SHEET","Dialogue"),zt(_9t,"PAD",8),zt(_9t,"NPC_NAMES",{
- S:"정령",L:"성주",CH:"오크 부족장",SC:"오크 정찰병",CP:"휴먼 기사단장",LI:"리치 사령관",EC:"엘프 지휘관"}
- ),zt(_9t,"DURATION_PER_DIALOGUE",300),zt(_9t,"FADE_IN_FRAMES",10),zt(_9t,"FADE_OUT_FRAMES",30);
- let M9t=_9t;
- const E9t=class t{
- constructor(){
- zt(this,"isOpened",!0),zt(this,"savedIndex",0),zt(this,"tutorialIndex",0),zt(this,"enableMissionGuide",!0),zt(this,"bottomMenuUnlockList",[0,1,2,3,4,5]),zt(this,"isHelpHeroPopupped",!1),zt(this,"isHelpQuestPopupped",!1),zt(this,"isHelpRevivePopupped",!1)}
- static getInstance(){
- return this.instance||(this.instance=new t),this.instance}
- async init(){
- }
- get isRunning(){
- return 0!=this.isOpened&&this.tutorialIndex>0}
- async startTutorial(){
- 0!=this.isOpened&&(_L.numRevive>0||(this.savedIndex=Number(await $A.getTutorialID()??0),_L.wave>this.savedIndex?1==_L.wave?(this.enableMissionGuide=!1,this.tutorialIndex!=t.TUTORIAL_INDEX_WAVE0&&(this.tutorialIndex=t.TUTORIAL_INDEX_WAVE0,await this.startTutorialWave0())):2==_L.wave?(this.enableMissionGuide=!1,this.tutorialIndex=_L.wave,await this.startTutorialWave2()):3==_L.wave?(this.enableMissionGuide=!1,this.tutorialIndex=t.TUTORIAL_INDEX_WAVE3,await this.startTutorialWave3()):(this.enableMissionGuide=!0,this.tutorialIndex=_L.wave,this.startTutorialWaveEtc()):1==_L.wave?(this.bottomMenuUnlockList=[2],Q9t.getInstance().onMenuClickByIndex(2),Q9t.getInstance().hideLockIconsTo(this.bottomMenuUnlockList),w9t.getInstance().opened=!1,this.enableMissionGuide=!1):2==_L.wave?(this.bottomMenuUnlockList=[1,2],Q9t.getInstance().hideLockIconsTo(this.bottomMenuUnlockList)):3==_L.wave?(this.bottomMenuUnlockList=[0,1,2],Q9t.getInstance().hideLockIconsTo(this.bottomMenuUnlockList),this.enableMissionGuide=!0,HV.getInstance().init()):(this.bottomMenuUnlockList=[0,1,2],Q9t.getInstance().hideLockIconsTo(this.bottomMenuUnlockList))))}
- async startTutorialWave0(){
- this.bottomMenuUnlockList=[2],Q9t.getInstance().onMenuClickByIndex(2),Q9t.getInstance().hideLockIconsTo(this.bottomMenuUnlockList),w9t.getInstance().opened=!1,WG.getInstance().stop(),hL.getInstance().stopUpdate(),M9t.getInstance().onCompleteHandler=this.onTurotial0Toast1Complete.bind(this);
- const t=AG.getText("DIALOGUE_TEXT_75","윽.. 머리야.. 여긴 어디지? 뭔가 익숙한데...");
- M9t.getInstance().show("L_FRO",t)}
- onTurotial0Toast1Complete(){
- const t=L5.getInstance().getMainList();
- t&&($5.getInstance().onHideHandler=this.onHelpCastlePopupHide.bind(this),$5.getInstance().showWith(t[0].main,2,!0,!1))}
- onHelpCastlePopupHide(){
- zii.getInstance().startTutorial0Wave(),M9t.getInstance().onCompleteHandler=this.onTurotial0Toast2Complete.bind(this);
- const t=AG.getText("DIALOGUE_TEXT_76","저 슬라임 녀석들.. 성을 공격하러 오는 것 같은데?");
- M9t.getInstance().show("L_SUR",t)}
- onTurotial0Toast2Complete(){
- WG.getInstance().stop(),this.bottomMenuUnlockList.push(1),Q9t.getInstance().hideLockIconsTo(this.bottomMenuUnlockList);
- const t=Q9t.getInstance().getMenu(1),i=Q9t.getInstance().getHeroPoint();
- Q5.getInstance().show(i.x,i.y,t.width,t.height)}
- showHeroHelpPopup(){
- this.isHelpHeroPopupped||this.tutorialIndex==t.TUTORIAL_INDEX_WAVE0&&(Q5.getInstance().hide(),setTimeout(()=>{
- const t=L5.getInstance().getMainList();
- t&&($5.getInstance().onHideHandler=this.highlightHeroRosterButton.bind(this),$5.getInstance().showWith(t[1].main,0,!0,!1),this.isHelpHeroPopupped=!0)}
- ,100))}
- highlightHeroRosterButton(){
- const t=B9.getInstance().btnRoaster,i=B9.getInstance().getBtnRosterPoint();
- Q5.getInstance().show(i.x+.5*t.width,i.y+.5*t.height,t.width,t.height)}
- highlightHeroHireButton(){
- const t=W9.getInstance().getItems();
- if(t.length<1)return void this.highlightHeroHireCloseButton();
- const i=t[0].btnHire,s=W9.getInstance().getBtnHirePoint();
- Q5.getInstance().show(s.x+.5*i.width,s.y+.5*i.height,i.width,i.height)}
- highlightHeroHireCloseButton(){
- const t=$9.getInstance().btnClose,i=$9.getInstance().getBtnClosePoint();
- Q5.getInstance().show(i.x+.5*t.width,i.y+.5*t.height,t.width,t.height)}
- clearTutorialWave0(){
- Q5.getInstance().hide(),WG.getInstance().start()}
- async endTutorialWave0(){
- await $A.saveTutorialID(String(t.TUTORIAL_INDEX_WAVE0)),this.savedIndex=1}
- async startTutorialWave2(){
- this.bottomMenuUnlockList=[1,2],Q9t.getInstance().hideLockIconsTo(this.bottomMenuUnlockList),Q9t.getInstance().onMenuClickByIndex(1),w9t.getInstance().opened=!1}
- async startTutorialWave3(){
- if(this.bottomMenuUnlockList=[1,2],Q9t.getInstance().hideLockIconsTo(this.bottomMenuUnlockList),w9t.getInstance().opened=!1,KD.getInstance().npcDialogue){
- const t=[],i=new t3;
- i.code="L_SAD",i.text=AG.getText("DIALOGUE_TEXT_5","영웅들을 무장시키고 성벽을 보강하려니... 생각보다 자금이 턱없이 부족하군."),i.position=1,t.push(i);
- const s=new t3;
- s.code="S_SMI",s.text=AG.getText("DIALOGUE_TEXT_6","이해합니다, 성주임. 마침 성주님의 명성을 듣고 도움을 청하는 이들이 줄을 섰답니다. [퀘스트]를 해결해 주시면 그들은 기꺼이 금화를 내놓을 거예요."),s.position=2,t.push(s),M9t.getInstance().onCompleteHandler=this.onTurotial3ToastComplete.bind(this),t.length>0&&M9t.getInstance().showDialogues(t)}
- else this.onTurotial3ToastComplete()}
- onTurotial3ToastComplete(){
- this.bottomMenuUnlockList=[0,1,2],Q9t.getInstance().hideLockIconsTo(this.bottomMenuUnlockList),hL.getInstance().startUpdate();
- const t=Q9t.getInstance().getMenu(0),i={
- x:t.x,y:t.y,width:t.width,height:t.height}
- ;
- VV.getInstance().showOnTarget(Q9t.getInstance(),i)}
- showQuestHelpPopup(){
- this.isHelpQuestPopupped||setTimeout(()=>{
- const t=L5.getInstance().getMainList();
- t&&($5.getInstance().onHideHandler=this.endTutorialWave3.bind(this),$5.getInstance().showWith(t[2].main,0,!0,!1),this.isHelpQuestPopupped=!0)}
- ,100)}
- async endTutorialWave3(){
- await $A.saveTutorialID(String(t.TUTORIAL_INDEX_WAVE3)),this.savedIndex=t.TUTORIAL_INDEX_WAVE3,this.enableMissionGuide=!0,HV.getInstance().init(),m6.getInstance().doAccountCreate()}
- async startTutorialWaveEtc(){
- w9t.getInstance().opened=!1,_L.wave>=10?this.bottomMenuUnlockList=[0,1,2,5]:this.bottomMenuUnlockList=[0,1,2],Q9t.getInstance().hideLockIconsTo(this.bottomMenuUnlockList)}
- async startTutorialRevive(){
- if(0!=this.isOpened&&0==this.isHelpRevivePopupped){
- const t=L5.getInstance().getMainList();
- t&&($5.getInstance().onHideHandler=this.endTutorialRevive.bind(this),$5.getInstance().showWith(t[3].main,0,!0,!1),this.isHelpRevivePopupped=!0)}
- }
- async endTutorialRevive(){
- this.bottomMenuUnlockList=[0,1,2,3,4,5],Q9t.getInstance().hideLockIconsTo(this.bottomMenuUnlockList),await $A.saveTutorialID(String(t.TUTORIAL_INDEX_REVIVE))}
- async showHeroHelpPopupByPresent(t){
- if(t<5||t>7)return;
- const i=L5.getInstance().getMainList();
- i&&($5.getInstance().onHideHandler=this.endTutorialWave3.bind(this),$5.getInstance().showWith(i[t].main,0,!0,!1),this.isHelpQuestPopupped=!0)}
- }
- ;
- Kt(E9t,"TutorialController"),zt(E9t,"instance"),zt(E9t,"TUTORIAL_INDEX_WAVE0",1),zt(E9t,"TUTORIAL_INDEX_WAVE3",3),zt(E9t,"TUTORIAL_INDEX_REVIVE",100);
- let A9t=E9t;
- const S9t=class t extends Be{
- constructor(){
- super(),zt(this,"bg",new QD),zt(this,"lblText",new YD("",aD.COLOR_WHITE,aD.DEFAULT_DESC_FONT_OPTION_16)),zt(this,"btnChat",new s5("Btn_Guild_Chatting","UI_Ekkorr")),zt(this,"btnHelp"),zt(this,"messages",[]),zt(this,"currentIndex",0),zt(this,"BG_WIDTH",640),zt(this,"BG_HEIGHT",20),zt(this,"SCROLL_SPEED",.8),zt(this,"VISIBLE_WIDTH",640),zt(this,"chatUnlockTick",0),zt(this,"onLanguageChangeBind"),zt(this,"textY",-1),zt(this,"update",Kt(()=>{
- !this.btnChat.visible&&++this.chatUnlockTick>=60&&(this.chatUnlockTick=0,_L.maxWave>=t.CHAT_UNLOCK_WAVE&&(this.btnChat.visible=!0),A9t.getInstance().isOpened?(this.btnHelp.visible=!0,this.btnHelp.x=this.BG_WIDTH-this.btnHelp.width+6,this.btnChat.x=this.btnHelp.x-this.btnChat.width+10):(this.btnHelp.visible=!1,this.btnChat.x=this.BG_WIDTH-this.btnChat.width+6)),0!==this.messages.length&&(this.lblText.x-=this.SCROLL_SPEED,this.lblText.x+this.lblText.width<0&&(this.currentIndex=(this.currentIndex+1)%this.messages.length,this.showCurrentMessage()))}
- ,"update")),this.bg.width=this.BG_WIDTH,this.bg.height=this.BG_HEIGHT,this.bg.alpha=.4,this.bg.setIndex(7),this.addChild(this.bg),this.lblText.textColor=aD.COLOR_WHITE,this.lblText.wordWrap=!1,this.addChild(this.lblText),this.btnHelp=new mB("UI_Ekkorr","Btn_help_p"),this.btnHelp.x=this.BG_WIDTH-this.btnHelp.width+6,this.btnHelp.y=.5*(this.BG_HEIGHT-this.btnHelp.height)+4,this.btnHelp.onClick=this.onHelpBtnClick.bind(this),this.addChild(this.btnHelp),this.btnChat.scale=1,this.btnChat.x=this.btnHelp.x-this.btnChat.width+10,this.btnChat.y=this.btnHelp.y,this.btnChat.onClick=this.onChatBtn.bind(this),this.btnChat.visible=_L.maxWave>=t.CHAT_UNLOCK_WAVE,this.addChild(this.btnChat),dn.shared.add(this.update,this),this.setLanguageChange(!0)}
- static getInstance(){
- return null==this.instance&&(this.instance=new t),this.instance}
- async onChatBtn(){
- if(n5())return C5.getInstance().show(),void M5.getInstance().start();
- const t=await hD.getInstance().guild.getMyMembership(!0);
- ED.setMembershipData(t.body),C5.getInstance().show(),M5.getInstance().start()}
- onHelpBtnClick(){
- q5.getInstance().show()}
- setLanguageChange(t){
- lS.getInstance().removeEventListener("LanguageChange",this.onLanguageChangeBind),t&&(this.onLanguageChangeBind=this.onLanguageChange.bind(this),lS.getInstance().addEventListener("LanguageChange",this.onLanguageChangeBind))}
- onLanguageChange(t=null){
- this.refreshMessages()}
- refreshMessages(){
- this.messages=x5.getInstance().getFilteredMessages(),this.currentIndex=0,this.showCurrentMessage()}
- showCurrentMessage(){
- 0!==this.messages.length&&(this.lblText.text=this.messages[this.currentIndex],this.lblText.x=this.VISIBLE_WIDTH+15,this.textY<0&&(this.textY=.5*(this.BG_HEIGHT-this.lblText.height)),this.lblText.y=this.textY)}
- setMessages(t){
- this.messages=t,this.currentIndex=0,this.showCurrentMessage()}
- addMessage(t){
- this.messages.push(t)}
- clearMessages(){
- this.messages=[],this.currentIndex=0,this.lblText.text=""}
- destroy(){
- dn.shared.remove(this.update,this),this.setLanguageChange(!1),super.destroy()}
- }
- ;
- Kt(S9t,"MessageInfo"),zt(S9t,"instance"),zt(S9t,"CHAT_UNLOCK_WAVE",50);
- let T9t=S9t;
- const C9t=class t extends Be{
- constructor(){
- super(),zt(this,"_currentView",null),zt(this,"container",new Be),zt(this,"bg"),zt(this,"onLanguageChangeBind"),this.bg=new CM({
- texture:ZA.getTexture("UI_Ekkorr","UI_Toast_Bg"),leftWidth:8,topHeight:8,rightWidth:8,bottomHeight:8}
- ),this.addChild(this.bg),this.bg.width=640,this.bg.height=KA.viewMainHeight,this.container.y=40,this.addChild(this.container),UV.getInstance().y=-1,this.addChild(UV.getInstance()),T9t.getInstance().y=-20,this.addChild(T9t.getInstance()),this.setLanguageChange(!0)}
- static getInstance(){
- return null==this.instance&&(this.instance=new t),this.instance}
- setExpandedMode(i){
- i?(this.y=t.EXPANDED_Y,this.bg.height=KA.safeHeight-t.EXPANDED_Y-KA.BOTTOM_MENU_H):(this.y=KA.viewMainY,this.bg.height=KA.viewMainHeight)}
- static getExpandedListHeight(){
- return KA.safeHeight-t.EXPANDED_Y-KA.BOTTOM_MENU_H-KA.SUB_MENU_H-KA.RESOURCE_INFO_H}
- get currentView(){
- return this._currentView}
- set currentView(t){
- null!=this._currentView&&this.container.removeChild(this._currentView),this._currentView=t,null!=this._currentView&&(this.container.addChild(this._currentView),this._currentView.x=0,this._currentView.y=0,i5.showItemsInVertical([this._currentView],20,.3))}
- setLanguageChange(t){
- lS.getInstance().removeEventListener("LanguageChange",this.onLanguageChangeBind),t&&(this.onLanguageChangeBind=this.onLanguageChange.bind(this),lS.getInstance().addEventListener("LanguageChange",this.onLanguageChangeBind))}
- onLanguageChange(t=null){
- this._currentView&&this._currentView.updateLanguage()}
- }
- ;
- Kt(C9t,"ViewMain"),zt(C9t,"instance"),zt(C9t,"EXPANDED_Y",320);
- let k9t=C9t;
- const O9t=class extends Be{
- constructor(){
- super(),zt(this,"bg",new QD),zt(this,"bar",new QD),zt(this,"lblTime",new YD("00:00",16777215,aD.DEFAULT_OUTLINE_FONT_OPTION_17)),zt(this,"lblGold",new GB("UI_GOLD","0",16777215,aD.DEFAULT_OUTLINE_FONT_OPTION_17)),zt(this,"barWidth",340),zt(this,"vo",new oL),this.bg.x=0,this.bg.y=0,this.bg.width=this.barWidth,this.bg.height=20,this.bg.setIndex(6),this.addChild(this.bg),this.bar.x=0,this.bar.y=0,this.bar.width=this.barWidth,this.bar.height=20,this.bar.setIndex(0),this.addChild(this.bar),this.lblTime.x=this.barWidth-60,this.lblTime.y=.5*(this.bg.height-this.lblTime.height),this.addChild(this.lblTime),this.lblGold.x=-3,this.lblGold.y=.5*(this.bg.height-this.lblGold.height),this.addChild(this.lblGold),this.lblTime.text="00:00",this.lblGold.text="0"}
- setData(t){
- this.vo=t,t.isOpen?(this.lblTime.text=uU.displayTimeAsMMSS(t.getRemainTime()),this.lblGold.text=$D.displayLargeNumberAsAlphabet(t.gold),this.bar.width=this.barWidth*t.getProgress(),this.setActivated(!0)):(this.lblTime.text=uU.displayTimeAsMMSS(Math.ceil(.001*t.effectiveDurationMs)),this.lblGold.text=$D.displayLargeNumberAsAlphabet(t.previewGold),this.bar.width=0,this.setActivated(!1))}
- setActivated(t){
- t?(this.lblGold.texture=ZA.getTexture("UI_Ekkorr","UI_GOLD"),this.lblTime.textColor=aD.DEFAULT_COLOR,this.lblGold.textColor=aD.DEFAULT_COLOR,this.bar.setIndex(4)):(this.lblGold.texture=ZA.getTexture("UI_Ekkorr","UI_GRAY_GOLD"),this.lblTime.textColor=8421504,this.lblGold.textColor=8421504,this.bar.setIndex(6))}
- }
- ;
- Kt(O9t,"QuestProgress");
- let I9t=O9t;
- const x9t=class t extends b4{
- constructor(){
- super(),zt(this,"list"),zt(this,"lastGoldForCanOpen",-1),zt(this,"lastBuffVer",-1),zt(this,"frameCnt",0),this.list=new ZV(L9t,640,KA.listHeight),this.list.x=0,this.list.y=K9t.getInstance().height,this.addChild(this.list),this.addChild(K9t.getInstance()),this.on("added",this.onAdded,this),this.on("removed",this.onRemoved,this)}
- static getInstance(){
- return null==t.instance&&(t.instance=new t),t.instance}
- onAdded(){
- GM.getInstance().add(this.onFrame,this)}
- onRemoved(){
- GM.getInstance().remove(this.onFrame,this),HV.getInstance().unregisterListItemsGetter("Quest")}
- onFrame(){
- var i;
- if(null==(null==(i=this.parent)?void 0:i.parent))return;
- const s=this.list.getItemList(),e=s.length;
- for(let t=0;
- t<e;
- t++){
- const i=s[t],e=i.vo;
- if(null!=e&&0!=i.visible){
- if(!e.isOpen)break;
- i.updateProgress()}
- }
- if(++this.frameCnt<t.FRAME_SKIP)return;
- this.frameCnt=0;
- const n=KN.getInstance().version;
- if(this.lastBuffVer!==n){
- this.lastBuffVer=n;
- for(let t=0;
- t<e;
- t++){
- const i=s[t];
- null!=i.vo&&i.update()}
- }
- K9t.getInstance().refreshGold();
- const h=_L.gold;
- if(h!==this.lastGoldForCanOpen){
- let t=0;
- for(let i=0;
- i<e;
- i++){
- const e=s[i],n=e.vo;
- if(null!=n&&0!=e.visible&&!n.isOpen){
- if(!n.canOpen)break;
- {
- t+=n.effectiveOpenGold;
- const i=h>=t;
- if(e.btnOpen.activated!==i&&(e.btnOpen.activated=i,e.btnOpen.iconLabel.texture=ZA.getTexture("UI_Ekkorr",i?"UI_GOLD":"UI_GRAY_GOLD"),e.updateCache()),!i)break}
- }
- }
- this.lastGoldForCanOpen=h}
- UV.getInstance().updateGold()}
- setData(){
- HV.getInstance().registerListItemsGetter(()=>this.getListItems(),"Quest"),this.lastGoldForCanOpen=-1,this.lastBuffVer=KN.getInstance().version;
- let t=[],i=hL.getInstance().list.length;
- for(let s=0;
- s<i;
- s++){
- let i=hL.getInstance().list[s];
- t.push(i)}
- this.list.dataProvider=t,this.onAdded()}
- setMultiLevel(t){
- let i=this.list.getItemList();
- if(t)for(let s=0;
- s<i.length;
- s++)i[s].showMultiLevel();
- else for(let s=0;
- s<i.length;
- s++)i[s].hideMultiLevel()}
- scrollToTop(){
- this.list.showTopItem()}
- getListItems(){
- return this.list.getItemList()}
- get className(){
- return"QuestSubView"}
- }
- ;
- Kt(x9t,"QuestSubView"),zt(x9t,"instance"),zt(x9t,"FRAME_SKIP",10);
- let N9t=x9t;
- const P9t=class t extends aG{
- constructor(){
- super(),zt(this,"icon",new We(ZA.getTexture("UI_Ekkorr","Quest_1"))),zt(this,"bgLevel",new We(ZA.getTexture("UI_Ekkorr","Quest_bg"))),zt(this,"lblLevel",new YD("Lv.1",16777215,aD.DEFAULT_OUTLINE_FONT_OPTION_18)),zt(this,"lblName",new YD("",16777215,aD.DEFAULT_OUTLINE_FONT_OPTION_17)),zt(this,"lblGold",new GB("UI_GOLD","0",16777215,aD.DEFAULT_OUTLINE_FONT_OPTION_16)),zt(this,"lblDuration",new GB("Icon_Time02","0",16777215,aD.DEFAULT_OUTLINE_FONT_OPTION_16)),zt(this,"lblBuffTitle",new YD("[ 버프 ]",16763904,aD.DEFAULT_OUTLINE_FONT_OPTION_16)),zt(this,"lblBuffGold",new YD("",11206570,aD.DEFAULT_OUTLINE_FONT_OPTION_16)),zt(this,"lblBuffDuration",new YD("",11206570,aD.DEFAULT_OUTLINE_FONT_OPTION_16)),zt(this,"lblBuffOpenGold",new YD("",11206570,aD.DEFAULT_OUTLINE_FONT_OPTION_16)),zt(this,"lblBuffUpgrade",new YD("",11206570,aD.DEFAULT_OUTLINE_FONT_OPTION_16)),this.contentContainer.addChild(this.icon,this.bgLevel,this.lblLevel,this.lblName,this.lblGold,this.lblDuration,this.lblBuffTitle,this.lblBuffGold,this.lblBuffDuration,this.lblBuffOpenGold,this.lblBuffUpgrade),this.outSideClickHide=!0}
- static getInstance(){
- return this._instance||(this._instance=new t),this._instance}
- formatLarge(t){
- return $D.displayLargeNumberAsAlphabet(t)}
- showQuest(t){
- this.title=AG.getText("GAME_326","퀘스트 정보"),this.icon.texture=ZA.getTexture("UI_Ekkorr",`Quest_${
- t.kindNum}
- `),this.icon.x=25,this.icon.y=65;
- const i=this.icon.width,s=this.icon.height;
- this.bgLevel.x=this.icon.x+1,this.bgLevel.y=this.icon.y+s-23,this.lblLevel.text=`Lv.${
- this.formatLarge(t.level)}
- `,this.lblLevel.x=this.bgLevel.x+4,this.lblLevel.y=this.icon.y+this.icon.height-26,this.lblName.text=t.kindNum+". "+AG.getText(t.getNameKey(),t.name),this.lblName.x=this.icon.x+i+15,this.lblName.y=this.icon.y+10,this.lblGold.text=$D.displayLargeNumberAsAlphabet(t.gold),this.lblGold.x=this.lblName.x,this.lblGold.y=this.lblName.y+this.lblName.height+8,this.lblDuration.iconScale=.7;
- const e=.001*t.effectiveDurationMs;
- this.lblDuration.text=uU.displayTimeAsMMSS(e),this.lblDuration.x=this.lblGold.x+this.lblGold.width+20,this.lblDuration.y=this.lblGold.y;
- const n=KN.getInstance(),h=this.icon.y+s,r=this.lblGold.y+this.lblGold.height;
- let o=Math.max(h,r)+15;
- this.lblBuffTitle.text=`[ ${
- AG.getText("GAME_167","버프")}
-  ]`,this.lblBuffTitle.x=30,this.lblBuffTitle.y=o,o+=this.lblBuffTitle.height+8;
- const a=n.getGameplayMultiplier(xN.QuestGoldGain),c=Math.floor(100*(a-1));
- this.lblBuffGold.text=`${
- AG.getText("GAME_327","퀘스트 획득 골드")}
-  : +${
- this.formatLarge(c)}
- %`,this.lblBuffGold.x=32,this.lblBuffGold.y=o,o+=this.lblBuffGold.height+5;
- const l=n.getGameplayMultiplier(xN.QuestCompleteTime),u=Math.floor(100*(l-1));
- this.lblBuffDuration.text=`${
- AG.getText("GAME_266","퀘스트 시간 단축")}
-  : +${
- this.formatLarge(u)}
- %`,this.lblBuffDuration.x=32,this.lblBuffDuration.y=o,o+=this.lblBuffDuration.height+5;
- const d=n.getGameplayMultiplier(xN.QuestOpenGold),f=Math.floor(100*(d-1));
- this.lblBuffOpenGold.text=`${
- AG.getText("GAME_267","퀘스트 오픈 비용 감소")}
-  : +${
- this.formatLarge(f)}
- %`,this.lblBuffOpenGold.x=32,this.lblBuffOpenGold.y=o,o+=this.lblBuffOpenGold.height+5;
- const p=n.getGameplayMultiplier(xN.QuestUpgradeGold),g=Math.floor(100*(p-1));
- this.lblBuffUpgrade.text=`${
- AG.getText("GAME_328","퀘스트 레벨업 비용 감소")}
-  : +${
- this.formatLarge(g)}
- %`,this.lblBuffUpgrade.x=32,this.lblBuffUpgrade.y=o,o+=this.lblBuffUpgrade.height+20,this.height=o,super.show()}
- getDefaultPositionY(){
- return.5*KA.stageHeight}
- onBackButton(){
- return this.hide(),!0}
- }
- ;
- Kt(P9t,"QuestDetailPopup"),zt(P9t,"_instance");
- let R9t=P9t;
- const D9t=class t extends XI{
- constructor(){
- super(),zt(this,"bg"),zt(this,"lblName",new YD("광부 ",16777215,aD.DEFAULT_OUTLINE_FONT_OPTION_17)),zt(this,"lblLevel",new YD("(0/5)",16777215,aD.DEFAULT_OUTLINE_FONT_OPTION_18)),zt(this,"lblGold",new GB("UI_GOLD","100",16711680,aD.DEFAULT_OUTLINE_FONT_OPTION_17)),zt(this,"lblCost",new GB("UI_GOLD","100",16711680,aD.DEFAULT_OUTLINE_FONT_OPTION_17)),zt(this,"btnOpen",new kU("UI_GOLD","100","10",.8,120,55)),zt(this,"progress",new I9t),zt(this,"icon",new s5("Quest_1","UI_Ekkorr")),zt(this,"rapidClickCount",0),zt(this,"lastRapidClickTime",0),zt(this,"btn10",new kU("UI_GOLD","100","+10")),zt(this,"btn100",new kU("UI_GOLD","1000","+100")),zt(this,"btn1000",new kU("UI_GOLD","10000","+1000")),zt(this,"multiLevelContainer",new Be),zt(this,"isMultiLevel",!1),zt(this,"lastGoldValue",-1),zt(this,"frameRunning",!1),zt(this,"hideTimer",null),zt(this,"bgLevel"),zt(this,"mainContainer",new Be),zt(this,"vo"),zt(this,"cnt",0),this.bg=new CM({
- texture:ZA.getTexture("UI_Ekkorr","Popup_List_02"),leftWidth:140,topHeight:30,rightWidth:20,bottomHeight:30}
- ),this.bg.x=5,this.bg.width=630,this.bg.height=80,this.mainContainer.addChild(this.bg),this.icon.scale=1,this.icon.x=6,this.icon.y=.5*(this.bg.height-this.icon.height),this.mainContainer.addChild(this.icon),this.bgLevel=new We(ZA.getTexture("UI_Ekkorr","Quest_bg")),this.bgLevel.x=7,this.bgLevel.y=this.bg.height-23,this.mainContainer.addChild(this.bgLevel),this.lblName.x=135,this.lblName.y=13,this.mainContainer.addChild(this.lblName),this.lblLevel.textColor=16777215,this.lblLevel.x=11,this.lblLevel.y=this.bg.height-this.lblLevel.height-1,this.mainContainer.addChild(this.lblLevel),this.btnOpen.textLabel.textSize=15,this.btnOpen.textAlign="left",this.btnOpen.iconScale=.7,this.btnOpen.labelOrder=kU.TEXT_FIRST,this.btnOpen.color=kU.BROWN,this.btnOpen.height=60,this.btnOpen.width=120,this.btnOpen.x=this.bg.width-this.btnOpen.width-6,this.btnOpen.y=.5*(this.bg.height-this.btnOpen.height)-2,this.mainContainer.addChild(this.btnOpen),this.btnOpen.on("pointertap",()=>this.onUpgrade(1),this),this.btn10.labelOrder=kU.TEXT_FIRST,this.btn10.textLabel.textSize=15,this.btn10.textAlign="left",this.btn10.iconScale=.7,this.btn10.color=kU.BROWN,this.btn10.height=62,this.btn10.width=115,this.btn10.x=this.btnOpen.x-this.btn10.width-5,this.btn10.y=.5*(this.bg.height-this.btn10.height)-2,this.btn10.on("pointertap",()=>{
- const t=this.getMultiLevelUnits(),i=this.getNextIncrement(this.vo.level,t.u1);
- this.onUpgrade(i)}
- ,this),this.multiLevelContainer.addChild(this.btn10),this.btn100.labelOrder=kU.TEXT_FIRST,this.btn100.textLabel.textSize=15,this.btn100.textAlign="left",this.btn100.iconScale=.7,this.btn100.color=kU.BROWN,this.btn100.height=62,this.btn100.width=115,this.btn100.x=this.btn10.x-this.btn100.width-5,this.btn100.y=.5*(this.bg.height-this.btn100.height)-2,this.btn100.on("pointertap",()=>{
- const t=this.getMultiLevelUnits(),i=this.getNextIncrement(this.vo.level,t.u2);
- this.onUpgrade(i)}
- ,this),this.multiLevelContainer.addChild(this.btn100),this.btn1000.labelOrder=kU.TEXT_FIRST,this.btn1000.textLabel.textSize=15,this.btn1000.textAlign="left",this.btn1000.iconScale=.7,this.btn1000.color=kU.BROWN,this.btn1000.height=62,this.btn1000.width=115,this.btn1000.x=this.btn100.x-this.btn1000.width-5,this.btn1000.y=.5*(this.bg.height-this.btn1000.height)-2,this.btn1000.on("pointertap",()=>{
- const t=this.getMultiLevelUnits(),i=this.getNextIncrement(this.vo.level,t.u3);
- this.onUpgrade(i)}
- ,this),this.multiLevelContainer.addChild(this.btn1000),this.multiLevelContainer.visible=!1,this.progress.x=this.lblName.x,this.progress.y=45,this.addChild(this.mainContainer),this.addChild(this.progress),this.addChild(this.multiLevelContainer),aD.setLabelWrapWidth(this.lblName,this.btnOpen.x-this.lblName.x-5)}
- onClick(t,i){
- this.vo&&this.vo.isOpen&&(this.multiLevelContainer.visible||t<this.btnOpen.x-40&&R9t.getInstance().showQuest(this.vo))}
- getNextIncrement(t,i){
- if(i<=0||!Number.isFinite(i)||!Number.isFinite(t))return 0;
- const s=t%i;
- return 0===s?i:i-s}
- getMultiLevelUnits(){
- let t=0;
- if(this.vo){
- const i=this.vo.effectiveMaxLv,s=i-this.vo.level,e=_L.gold,n=[i,Math.floor(i/10),Math.floor(i/100),Math.floor(i/1e3),Math.floor(i/1e4),Math.floor(i/1e5),Math.floor(i/1e6),Math.floor(i/1e7),Math.floor(i/1e8),Math.floor(i/1e9),Math.floor(i/1e10),1e3,500],h=Array.from(new Set(n)).filter(t=>t>=500).sort((t,i)=>i-t);
- for(const r of h){
- const i=Math.min(r,s);
- if(!(i<=0)&&e>=this.vo.getTotalLevelUpGold(this.vo.level+i)){
- t=r;
- break}
- }
- }
- return{
- u1:10,u2:100,u3:t}
- }
- onMultiLevel(){
- this.isMultiLevel=!this.isMultiLevel,this.isMultiLevel?this.showMultiLevel():this.hideMultiLevel()}
- onUpgrade(i=1){
- if(!Number.isFinite(i)||i<=0)return;
- if(this.vo&&!Number.isFinite(this.vo.level))return;
- if(1===i){
- const t=Date.now();
- t-this.lastRapidClickTime<500?this.rapidClickCount++:this.rapidClickCount=1,this.lastRapidClickTime=t,this.rapidClickCount>=3&&!this.multiLevelContainer.visible&&(this.rapidClickCount=0,this.onMultiLevel())}
- if(0==this.vo.canOpen&&0==this.vo.isOpen)return void mG.getInstance().show(AG.getText("GAME_55","이전 퀘스트를 먼저 오픈해주세요."));
- if(0==this.vo.isOpen){
- const i=hL.getInstance().getCumulativeOpenCost(this.vo.kindNum);
- return _L.gold<i?void vV.getInstance().showMessage(AG.getText("COMMON_359","골드가 부족합니다.")):(_L.gold-=i,UV.getInstance().updateGold(),hL.getInstance().openQuestsUpTo(this.vo.kindNum),N9t.getInstance().setData(),K9t.getInstance().setData(),t.markDirtyAndSchedule(),HV.getInstance().onConditionChanged(),void NV.get().play(this,12,.5*(this.bg.height-104)))}
- if(this.vo.level>=this.vo.effectiveMaxLv)return void vV.getInstance().showMessage(AG.getText("COMMON_369","최대 레벨입니다."));
- const s=Math.min(this.vo.level+i,this.vo.effectiveMaxLv),e=this.vo.getTotalLevelUpGold(s);
- _L.gold<e?vV.getInstance().showMessage(AG.getText("COMMON_359","골드가 부족합니다.")):(_L.gold-=e,UV.getInstance().updateGold(),this.vo.level=s,this.setData(this.vo),hL.getInstance().updateGoldPerSec(),K9t.getInstance().setData(),t.markDirtyAndSchedule(),HV.getInstance().onConditionChanged(),this.isMultiLevel&&this.resetHideTimer(),NV.get().play(this,12,.5*(this.bg.height-104)))}
- static markDirtyAndSchedule(){
- t.isDirty=!0,null!==t.updateTimer&&clearTimeout(t.updateTimer),t.updateTimer=setTimeout(()=>{
- t.sendToServer(),t.updateTimer=null,t.isDirty=!1,N9t.getInstance().setMultiLevel(!1)}
- ,t.DEBOUNCE_DELAY)}
- static async sendToServer(){
- if(!t.isDirty)return;
- const i=hL.getInstance().list.filter(t=>Number.isFinite(t.level)&&t.level>0),s=i.map(t=>t.kindNum).join("|"),e=i.map(t=>t.level).join("|"),n=t.encodeLastCollectTimes(i),h=await hD.getInstance().quest.updateQuest(s,e,_L.goldPerSec,n);
- if(!1===h.success){
- const t=await hD.getInstance().quest.getQuest();
- return t.success&&(_L.setUserInfo(t.body.user),UV.getInstance().updateAll(),N9t.getInstance().setData()),void mG.getInstance().showError(h)}
- _L.setUserInfo(h.body.user),UV.getInstance().updateAll(),N9t.getInstance().setData()}
- static encodeLastCollectTimes(t){
- if(0===t.length)return"";
- t.forEach(t=>t.clampLastCollectTime());
- const i=Math.floor(t[0].lastCollectTime/1e3),s=[i.toString()];
- for(let e=1;
- e<t.length;
- e++){
- const n=i-Math.floor(t[e].lastCollectTime/1e3);
- s.push(n.toString())}
- return s.join("|")}
- static cleanup(){
- null!==t.updateTimer&&(clearTimeout(t.updateTimer),t.updateTimer=null),t.isDirty&&(t.sendToServer(),t.isDirty=!1)}
- setData(t){
- this.isMultiLevel&&this.vo&&this.vo!==t&&this.hideMultiLevel(),this.data=t,this.vo=t,this.update()}
- update(){
- let t=this.vo;
- if(this.lblName.text=this.data.kindNum+". "+AG.getText(t.getNameKey(),t.name),this.lblName.y=23-.5*this.lblName.height,this.lblGold.text=$D.displayLargeNumberAsAlphabet(t.gold),this.lblLevel.text=`Lv.${
- $D.displayLargeNumberAsAlphabet(t.level)}
- `,this.lblCost.text=$D.displayLargeNumberAsAlphabet(t.getLevelUpGold()),this.icon.iconName=`Quest_${
- t.kindNum}
- `,this.progress.setData(t),t.canOpen||t.isOpen)if(t.canOpen){
- const i=hL.getInstance().getCumulativeOpenCost(t.kindNum),s=_L.gold>=i;
- this.btnOpen.iconText=$D.displayLargeNumberAsAlphabet(i),this.btnOpen.iconLabel.texture=ZA.getTexture("UI_Ekkorr",s?"UI_GOLD":"UI_GRAY_GOLD"),this.btnOpen.text=AG.getText("COMMON_44","오픈"),this.btnOpen.activated=s,this.lblName.textColor=aD.COLOR_GRAY,this.progress.setActivated(!1),this.icon.tint=4473924,this.lblLevel.textColor=4473924,this.stopButtonUpdateInterval()}
- else this.lblName.textColor=aD.DEFAULT_COLOR,this.progress.setActivated(!0),this.icon.tint=16777215,t.level>=t.effectiveMaxLv?(this.btnOpen.text="max",this.btnOpen.iconText="",this.btnOpen.iconLabel.texture=ZA.getTexture("UI_Ekkorr","UI_GRAY_GOLD"),this.btnOpen.activated=!1,this.lblLevel.textColor=16763904):(this.btnOpen.iconLabel.texture=ZA.getTexture("UI_Ekkorr","UI_GOLD"),this.btnOpen.iconText=$D.displayLargeNumberAsAlphabet(t.getLevelUpGold()),this.btnOpen.text="+"+$D.displayLargeNumberAsAlphabet(t.effectiveIncGold),this.lblLevel.textColor=16777215,this.btnOpen.activated=!0),this.updateMultiLevelButtons(),this.startButtonUpdateInterval();
- else this.btnOpen.iconText=$D.displayLargeNumberAsAlphabet(t.effectiveOpenGold),this.btnOpen.iconLabel.texture=ZA.getTexture("UI_Ekkorr","UI_GRAY_GOLD"),this.btnOpen.text=AG.getText("COMMON_44","오픈"),this.lblName.textColor=aD.COLOR_GRAY,this.btnOpen.activated=!1,this.icon.tint=4473924,this.lblLevel.textColor=4473924,this.progress.setActivated(!1),this.stopButtonUpdateInterval();
- this.updateCache()}
- updateCache(){
- }
- clearCache(){
- }
- updateMultiLevelButtons(){
- if(!this.vo||!this.vo.isOpen)return;
- const t=this.vo.effectiveMaxLv-this.vo.level,{
- u1:i,u2:s,u3:e}
- =this.getMultiLevelUnits(),n=Math.min(this.getNextIncrement(this.vo.level,i),t),h=n>0?this.vo.getTotalLevelUpGold(this.vo.level+n):0;
- this.btn10.text=n>0?`+${
- $D.displayLargeNumberAsAlphabet(n)}
- `:"max",this.btn10.iconText=n>0?$D.displayLargeNumberAsAlphabet(h):"",this.btn10.iconLabel.texture=ZA.getTexture("UI_Ekkorr",n>0?"UI_GOLD":"UI_GRAY_GOLD"),this.btn10.activated=n>0&&_L.gold>=h;
- const r=Math.min(this.getNextIncrement(this.vo.level,s),t),o=r>0?this.vo.getTotalLevelUpGold(this.vo.level+r):0;
- this.btn100.text=r>0?`+${
- $D.displayLargeNumberAsAlphabet(r)}
- `:"max",this.btn100.iconText=r>0?$D.displayLargeNumberAsAlphabet(o):"",this.btn100.iconLabel.texture=ZA.getTexture("UI_Ekkorr",r>0?"UI_GOLD":"UI_GRAY_GOLD"),this.btn100.activated=r>0&&_L.gold>=o;
- let a=0;
- if(e>0){
- a=Math.min(this.getNextIncrement(this.vo.level,e),t);
- const i=a>0?this.vo.getTotalLevelUpGold(this.vo.level+a):0;
- this.btn1000.text=a>0?`+${
- $D.displayLargeNumberAsAlphabet(a)}
- `:"max",this.btn1000.iconText=a>0?$D.displayLargeNumberAsAlphabet(i):"",this.btn1000.iconLabel.texture=ZA.getTexture("UI_Ekkorr",a>0?"UI_GOLD":"UI_GRAY_GOLD"),this.btn1000.activated=a>0&&_L.gold>=i}
- this.btn1000.visible=e>s&&a>=500}
- showMultiLevel(){
- this.vo&&this.vo.isOpen&&(this.isMultiLevel=!0,this.multiLevelContainer.visible=!0,this.startButtonUpdateInterval(),this.resetHideTimer())}
- hideMultiLevel(){
- this.isMultiLevel=!1,this.multiLevelContainer.visible=!1,this.clearHideTimer()}
- resetHideTimer(){
- this.clearHideTimer(),this.hideTimer=setTimeout(()=>{
- this.hideMultiLevel()}
- ,t.HIDE_DELAY)}
- clearHideTimer(){
- null!==this.hideTimer&&(clearTimeout(this.hideTimer),this.hideTimer=null)}
- onFrame(){
- var t,i,s,e;
- if(this.cnt-- >0)return;
- if(null==(null==(e=null==(s=null==(i=null==(t=this.parent)?void 0:t.parent)?void 0:i.parent)?void 0:s.parent)?void 0:e.parent))return void this.stopButtonUpdateInterval();
- this.cnt=30;
- const n=_L.gold;
- if(n!==this.lastGoldValue){
- if(this.lastGoldValue=n,this.vo&&this.vo.isOpen){
- if(this.vo.level>=this.vo.effectiveMaxLv)return this.btnOpen.activated=!1,void this.updateCache();
- const t=n>=this.vo.getLevelUpGold();
- this.btnOpen.activated!==t&&(this.btnOpen.activated=t,this.updateCache())}
- this.multiLevelContainer.visible&&this.vo&&this.vo.isOpen&&this.updateMultiLevelButtons()}
- }
- startButtonUpdateInterval(){
- this.frameRunning||(this.frameRunning=!0,this.lastGoldValue=_L.gold,GM.getInstance().add(this.onFrame,this))}
- stopButtonUpdateInterval(){
- GM.getInstance().remove(this.onFrame,this),this.lastGoldValue=-1,this.frameRunning=!1}
- updateProgress(){
- this.progress.setData(this.vo);
- const t=this.btnOpen.activated;
- this.vo.level>=this.vo.effectiveMaxLv?this.btnOpen.activated=!1:this.btnOpen.activated=_L.gold>=this.vo.getLevelUpGold(),t!==this.btnOpen.activated&&this.updateCache()}
- get height(){
- return this.bg.height+2}
- }
- ;
- Kt(D9t,"QuestItemRenderer"),zt(D9t,"HIDE_DELAY",5e3),zt(D9t,"updateTimer",null),zt(D9t,"DEBOUNCE_DELAY",3e3),zt(D9t,"isDirty",!1);
- let L9t=D9t;
- const G9t=class t{
- constructor(){
- zt(this,"timer",null),zt(this,"_enabled",!1)}
- static getInstance(){
- return this.instance||(this.instance=new t),this.instance}
- get enabled(){
- return this._enabled}
- async loadSetting(){
- const i=await $A.getQuestAutoEnabled();
- _L.maxWave<t.UNLOCK_WAVE?this._enabled=!1:(this._enabled=!0===i,this._enabled&&this.startTimer())}
- setEnabled(t){
- this._enabled!==t&&(this._enabled=t,$A.setQuestAutoEnabled(t),t?(this.startTimer(),this.tick()):this.stopTimer())}
- startTimer(){
- null==this.timer&&(this.timer=setInterval(()=>this.tick(),t.TICK_INTERVAL_MS))}
- stopTimer(){
- null!=this.timer&&(clearInterval(this.timer),this.timer=null)}
- tick(){
- if(!this._enabled)return;
- if(hL.pausedAt>0)return;
- let t=!1;
- for(let i=0;
- i<50;
- i++){
- const i=this.pickNextAction();
- if(!i)break;
- "open"===i.type?this.doOpen(i.vo):this.doLevelUp(i.vo,i.targetLevel),t=!0}
- t&&(N9t.getInstance().setData(),K9t.getInstance().setData(),L9t.markDirtyAndSchedule(),HV.getInstance().onConditionChanged())}
- pickNextAction(){
- const i=hL.getInstance(),s=_L.gold;
- for(const t of i.list){
- if(!t.isOpen)continue;
- if(t.level>=t.effectiveMaxLv)continue;
- const i=t.getTotalLevelUpGold(t.effectiveMaxLv);
- if(i>0&&s>=i)return{
- type:"levelup",vo:t,targetLevel:t.effectiveMaxLv}
- }
- const e=i.list.find(t=>t.canOpen&&!t.isOpen);
- if(e&&s>=e.effectiveOpenGold*t.OPEN_BUDGET_MULT)return{
- type:"open",vo:e}
- ;
- let n=null,h=0;
- for(const t of i.list){
- if(!t.isOpen)continue;
- if(t.level>=t.effectiveMaxLv)continue;
- const i=t.getLevelUpGold();
- if(i<=0||s<i)continue;
- const e=.001*t.effectiveDurationMs;
- if(e<=0)continue;
- const r=t.effectiveIncGold/e/i;
- r>h&&(h=r,n=t)}
- return n?{
- type:"levelup",vo:n,targetLevel:n.level+1}
- :null}
- doOpen(t){
- const i=t.effectiveOpenGold;
- _L.gold<i||(_L.gold-=i,UV.getInstance().updateGold(),hL.getInstance().openQuestsUpTo(t.kindNum))}
- doLevelUp(t,i){
- if(t.level>=t.effectiveMaxLv)return;
- const s=Math.min(i,t.effectiveMaxLv);
- if(s<=t.level)return;
- const e=t.getTotalLevelUpGold(s);
- e<=0||_L.gold<e||(_L.gold-=e,UV.getInstance().updateGold(),t.level=s,hL.getInstance().updateGoldPerSec())}
- }
- ;
- Kt(G9t,"QuestAutoController"),zt(G9t,"instance"),zt(G9t,"TICK_INTERVAL_MS",3e3),zt(G9t,"OPEN_BUDGET_MULT",1.5),zt(G9t,"UNLOCK_WAVE",100);
- let B9t=G9t;
- const U9t=class t extends Be{
- constructor(i,s,e,n,h,r=200,o=70){
- super(),zt(this,"bg",new qL),zt(this,"container",new Be),zt(this,"leftIcon"),zt(this,"rewardLabel"),zt(this,"countLabel"),zt(this,"timeLabel"),zt(this,"_color",-1),zt(this,"_activated",!0),zt(this,"onClick"),this.bg.width=r,this.bg.height=o,this.bg.x=0,this.bg.y=0,this.leftIcon=new We(ZA.getTexture("UI_Ekkorr",i)),this.rewardLabel=new GB(s,e,aD.DEFAULT_COLOR,aD.MENU_LABEL_OPTION2),this.rewardLabel.iconScale=.72,this.countLabel=new YD(n,6737151,aD.MENU_LABEL_OPTION2),this.timeLabel=new YD(h,aD.DEFAULT_COLOR,aD.MENU_LABEL_OPTION2),this.container.x=0,this.container.y=0,this.container.addChild(this.bg),this.container.addChild(this.leftIcon),this.container.addChild(this.rewardLabel),this.container.addChild(this.countLabel),this.container.addChild(this.timeLabel),this.addChild(this.container),this.updateLayout(),this.eventMode="static",this.on("pointerdown",this.onDown,this),this.on("pointerup",this.onUp,this),this.on("pointerupoutside",this.onUp,this),this.on("pointertap",this.onTap,this),this.color=t.BROWN,this.hitArea=new Pi(0,0,this.bg.width,this.bg.height)}
- updateLayout(){
- const t=.5*this.bg.height;
- this.bg.height,this.leftIcon.scale.set(.7),this.leftIcon.x=12,this.leftIcon.y=t-.5*this.leftIcon.height;
- const i=this.leftIcon.x+this.leftIcon.width+4,s=this.bg.width-6-i,e=t-.5*(this.rewardLabel.height+-4+this.countLabel.height);
- this.rewardLabel.x=i+.5*(s-this.rewardLabel.width),this.rewardLabel.y=e;
- const n=i+.5*(s-(this.countLabel.width+4+this.timeLabel.width)),h=e+this.rewardLabel.height+-4+2;
- this.countLabel.x=n,this.countLabel.y=h,this.timeLabel.x=this.countLabel.x+this.countLabel.width+4,this.timeLabel.y=h}
- set color(t){
- t!==this._color&&(this._color=t,this.bg.setIndex(this._color))}
- get color(){
- return this._color}
- set activated(i){
- this._activated=i,i?this.bg.setIndex(this._color):this.bg.setIndex(t.GRAY)}
- get activated(){
- return this._activated}
- set rewardText(t){
- this.rewardLabel.text=t,this.updateLayout()}
- set countText(t){
- this.countLabel.text=t,this.updateLayout()}
- set timeText(t){
- this.timeLabel.text=t,this.updateLayout()}
- set leftIconName(t){
- this.leftIcon.texture=ZA.getTexture("UI_Ekkorr",t),this.updateLayout()}
- set rewardIconName(t){
- this.rewardLabel.texture=ZA.getTexture("UI_Ekkorr",t),this.updateLayout()}
- set width(t){
- this.bg.width=t,this.updateLayout(),this.hitArea=new Pi(0,0,this.bg.width,this.bg.height)}
- get width(){
- return this.bg.width}
- set height(t){
- this.bg.height=t,this.updateLayout(),this.hitArea=new Pi(0,0,this.bg.width,this.bg.height)}
- get height(){
- return this.bg.height}
- onDown(t){
- this._activated&&(this.container.pivot.set(.5*this.bg.width,.5*this.bg.height),this.container.x=.5*this.bg.width,this.container.y=.5*this.bg.height,this.container.scale=.9)}
- onUp(t){
- this._activated&&(this.container.scale=1,this.container.pivot.set(0,0),this.container.x=0,this.container.y=0)}
- onTap(t){
- this._activated&&(KL.getInstance().playSFX(KL.SFX_NORMAL_CLICK),WL(),null!=this.onClick&&this.onClick())}
- }
- ;
- Kt(U9t,"QuestBoxRewardButton"),zt(U9t,"RED",0),zt(U9t,"GREEN",1),zt(U9t,"BROWN",2),zt(U9t,"LIGHT_GREEN",3),zt(U9t,"VIOLET",4),zt(U9t,"BLUE",5),zt(U9t,"GRAY",6),zt(U9t,"ORANGE",7);
- let F9t=U9t;
- const H9t=class t extends aG{
- constructor(){
- super(),zt(this,"lblMessage",new YD("",aD.DEFAULT_COLOR,aD.ERROR_POPUP_LABEL_OPTION)),zt(this,"checkBox",new Q0t),zt(this,"lblCheck",new YD("더 이상 물어보지 않기",aD.DEFAULT_COLOR,aD.DEFAULT_OUTLINE_FONT_OPTION_16)),zt(this,"btnConfirm",new sG("확인")),zt(this,"btnCancel",new n3("취소")),zt(this,"onConfirm",null),zt(this,"onCancel",null),this.title=AG.getText("GAME_618","골드구매"),this.lblMessage.y=90,this.contentContainer.addChild(this.lblMessage,this.checkBox,this.lblCheck,this.btnConfirm,this.btnCancel),this.btnConfirm.onClick=this.onConfirmClick.bind(this),this.btnCancel.onClick=this.onCancelClick.bind(this),this.btnClose.onClick=this.onCancelClick.bind(this)}
- static getInstance(){
- return this._instance||(this._instance=new t),this._instance}
- static async shouldSkipConfirm(){
- return"Y"===await $A.getQuestGoldBuySkipConfirm()}
- static async setSkipConfirm(t){
- await $A.saveQuestGoldBuySkipConfirm(t?"Y":"N")}
- onConfirmClick(){
- t.setSkipConfirm(this.checkBox.selected).catch(t=>{
- }
- ),this.hide();
- const i=this.onConfirm;
- this.onConfirm=null,this.onCancel=null,i&&i()}
- onCancelClick(){
- this.hide();
- const t=this.onCancel;
- this.onConfirm=null,this.onCancel=null,t&&t()}
- show(t,i=null,s=null){
- this.onConfirm=i,this.onCancel=s,this.lblMessage.text=t,this.title=AG.getText("GAME_618","골드구매"),this.lblCheck.text=AG.getText("COMMON_19","오늘 하루 보지 않기"),this.btnConfirm.text=AG.getText("COMMON_1","확인"),this.btnCancel.text=AG.getText("COMMON_2","취소"),this.checkBox.selected=!1,this.updateLayout(),super.show()}
- updateLayout(){
- this.lblMessage.x=.5*(this.width-this.lblMessage.width);
- const t=this.checkBox.width+8+this.lblCheck.width,i=.5*(this.width-t);
- this.checkBox.x=i,this.checkBox.y=this.lblMessage.y+this.lblMessage.height+20,this.lblCheck.x=this.checkBox.x+this.checkBox.width+8,this.lblCheck.y=this.checkBox.y+.5*(this.checkBox.height-this.lblCheck.height),this.btnConfirm.x=.5*(this.width-this.btnConfirm.width-this.btnCancel.width-20),this.btnCancel.x=this.btnConfirm.x+this.btnConfirm.width+20,this.btnConfirm.y=this.checkBox.y+this.checkBox.height+24,this.btnCancel.y=this.btnConfirm.y,this.height=this.btnConfirm.y+this.btnConfirm.height+40}
- getDefaultPositionY(){
- return.3*KA.stageHeight}
- onBackButton(){
- return this.onCancelClick(),!0}
- }
- ;
- Kt(H9t,"QuestGoldBuyConfirmPopup"),zt(H9t,"_instance");
- let W9t=H9t;
- const j9t=class t extends AB{
- constructor(){
- super(),zt(this,"lblGuide"),this.lblGuide=new YD("",aD.DEFAULT_COLOR,aD.DEFAULT_FONT_OPTION_16),aD.setLabelWrapWidth(this.lblGuide,this.width-60),this.contentContainer.addChild(this.lblGuide),this.outSideClickHide=!0}
- static getInstance(){
- return this._instance||(this._instance=new t),this._instance}
- async showGuide(){
- this.title=AG.getText("GAME_387","퀘스트 안내");
- const t=[`1. ${
- AG.getText("GAME_388","퀘스트는 환생하면 초기화 됩니다.")}
- `,`2. ${
- AG.getText("GAME_389","초반에는 30층 이상에서 환생만 해도 퀘스트 관련된 버프가 증가합니다. (퀘스트 획득량 50% 증가, 퀘스트 시간 20% 단축, 퀘스트 오픈비용 20% 감소)")}
- `,`3. ${
- AG.getText("GAME_390","좋은 [유물]을 획득하면, 강력한 퀘스트 버프를 얻을 수 있습니다. [던전]을 빠르게 공략해서, 좋은 [유물]을 획득하세요.")}
- `];
- this.lblGuide.text=t.join("\n\n"),this.lblGuide.x=30,this.lblGuide.y=80,this.height=this.lblGuide.y+this.lblGuide.height+40,await this.loadImage(),super.show()}
- getDefaultPositionY(){
- return.4*KA.stageHeight}
- onBackButton(){
- return this.hide(),!0}
- }
- ;
- Kt(j9t,"QuestGuidePopup"),zt(j9t,"_instance");
- let $9t=j9t;
- const V9t=class t extends XV{
- constructor(){
- super(),zt(this,"btnGold",new UB("UI_GemGold","100")),zt(this,"btnBox",new F9t("UI-GOLD-BOX","UI_GOLD","0","0/5","(00:00)",145,46)),zt(this,"btnGuide"),zt(this,"autoContainer",new Be),zt(this,"lblAuto",new YD("자동:",12303291,aD.DEFAULT_OUTLINE_FONT_OPTION_16)),zt(this,"lblAutoState",new YD("OFF",16737894,aD.DEFAULT_OUTLINE_FONT_OPTION_16)),zt(this,"boxRequesting",!1),zt(this,"requesting",!1),zt(this,"boxTickerStarted",!1),zt(this,"boxTickerFrame",0),zt(this,"lastShownCount",-1),zt(this,"lastShownTime",""),this.lblTitle.textSize=17,this.setTitle(AG.getText("GAME_1","퀘스트")),this.closeBtn.visible=!1,this.btnBox.x=this.bg.width-this.btnBox.width-6,this.btnBox.y=.5*(this.bg.height-this.btnBox.height)-2,this.addChild(this.btnBox),this.btnGold.color=UB.BROWN,this.btnGold.width=155,this.btnGold.height=46,this.btnGold.x=this.btnBox.x-this.btnGold.width-6,this.btnGold.y=.5*(this.bg.height-this.btnGold.height)-2,this.addChild(this.btnGold),this.btnGold.onClick=this.onGoldClick.bind(this),this.btnBox.onClick=this.onGoldBoxClick.bind(this),this.btnGuide=new mB("UI_Ekkorr","UI_Alarm"),this.btnGuide.x=this.lblTitle.x+this.lblTitle.width+3,this.btnGuide.y=this.lblTitle.y+.5*(this.lblTitle.height-this.btnGuide.height)+2,this.addChild(this.btnGuide),this.btnGuide.on("pointertap",()=>{
- $9t.getInstance().showGuide()}
- ),this.autoContainer.addChild(this.lblAuto),this.lblAutoState.x=this.lblAuto.width+5,this.autoContainer.addChild(this.lblAutoState),this.autoContainer.x=10,this.autoContainer.y=this.lblTitle.y+this.lblTitle.height-1,this.autoContainer.eventMode="static",this.autoContainer.cursor="pointer",this.autoContainer.on("pointertap",this.onToggleAuto.bind(this)),this.addChild(this.autoContainer),B9t.getInstance().loadSetting().then(()=>this.refreshAutoLabel())}
- static getInstance(){
- return null==t.instance&&(t.instance=new t),t.instance}
- onToggleAuto(){
- if(_L.maxWave<t.AUTO_UNLOCK_WAVE)return void vV.getInstance().showMessage(AG.getValueReplace("GAME_633","##",100,"최고 WAVE 100 이상에서 환생 후 이용가능합니다."));
- const i=B9t.getInstance();
- i.setEnabled(!i.enabled),this.refreshAutoLabel()}
- refreshAutoLabel(){
- const t=B9t.getInstance().enabled;
- this.lblAutoState.text=t?"ON":"OFF",this.lblAutoState.textColor=t?16750899:8947848}
- async onGoldBoxClick(){
- if(this.boxRequesting)return;
- const t=XN.getInstance();
- if(t.getCount()<=0)return void vV.getInstance().showMessage(AG.getText("GAME_632","골드 상자가 비었습니다."));
- const i=hL.getInstance().goldPerSec*t.rewardSec;
- this.boxRequesting=!0;
- const s=await hD.getInstance().user.useGoldBox();
- if(this.boxRequesting=!1,!s||!1===s.success)return void mG.getInstance().showError(s);
- const e=s.body;
- XN.getInstance().setData({
- count:e.count,max:e.max,nextInSec:e.nextInSec,rewardSec:t.rewardSec}
- ),_L.updateGold(i),UV.getInstance().celebrateGold(i),this.refreshBoxButton()}
- async onGoldClick(){
- if(!this.requesting)if(_L.gem<100)vV.getInstance().showMessage(AG.getText("COMMON_352","보석이 부족합니다."));
- else{
- this.requesting=!0,this.btnGold.enabled=!1,this.btnGold.activated=!1;
- try{
- if(await W9t.shouldSkipConfirm())return void(await this.executeBuyGold());
- const t=60*hL.getInstance().goldPerSec*10,i=$D.displayLargeNumberAsAlphabet(t),s=AG.getValueReplace("GAME_619","##",i,`보석 100개를 이용해서,\n골드 ${
- i}
- 를 구매하시겠습니까?`);
- await new Promise(t=>{
- W9t.getInstance().show(s,()=>t(!0),()=>t(!1))}
- )&&await this.executeBuyGold()}
- finally{
- this.requesting=!1,this.btnGold.enabled=!0,this.btnGold.activated=!0}
- }
- }
- async executeBuyGold(){
- _L.updateGem(-100),UV.getInstance().updateGem();
- const t=60*hL.getInstance().goldPerSec*10,i=await hD.getInstance().user.buyGold();
- if(!i||!1===i.success)return _L.updateGem(100),UV.getInstance().updateGem(),void mG.getInstance().showError(i);
- _L.updateGold(t),UV.getInstance().celebrateGold(t)}
- setData(){
- this.setTitle(AG.getText("GAME_1","퀘스트")),this.lblAuto.text=AG.getText("COMMON_483","자동")+":",this.lblAutoState.x=this.lblAuto.width+5,this.btnGuide.x=this.lblTitle.x+this.lblTitle.width+3,this.btnGuide.y=this.lblTitle.y+.5*(this.lblTitle.height-this.btnGuide.height)+2;
- const i=_L.maxWave>=t.GOLD_BUY_UNLOCK_WAVE;
- this.btnGold.visible=i,this.btnBox.visible=i,this.refreshGold(),this.refreshBoxButton(),this.startBoxTicker()}
- refreshGold(){
- hL.getInstance().updateGoldPerSec();
- const t=hL.getInstance().goldPerSec,i=60*t*10;
- this.btnGold.text=$D.displayLargeNumberAsAlphabet(i);
- const s=t*XN.getInstance().rewardSec;
- this.btnBox.rewardText=$D.displayLargeNumberAsAlphabet(s)}
- refreshBoxButton(){
- const t=XN.getInstance(),i=t.getCount();
- this.btnBox.countText=`${
- i}
- /${
- t.max}
- `,i>=t.max?this.btnBox.timeText="(max)":this.btnBox.timeText=`(${
- t.getNextInSecFormatted()}
- )`}
- startBoxTicker(){
- this.boxTickerStarted||(this.boxTickerStarted=!0,this.boxTickerFrame=0,GM.getInstance().add(this.onBoxTick,this))}
- onBoxTick(){
- if(this.boxTickerFrame++,this.boxTickerFrame<30)return;
- this.boxTickerFrame=0;
- const t=XN.getInstance(),i=t.getCount(),s=i>=t.max?"(max)":`(${
- t.getNextInSecFormatted()}
- )`;
- i!==this.lastShownCount&&(this.lastShownCount=i,this.btnBox.countText=`${
- i}
- /${
- t.max}
- `),s!==this.lastShownTime&&(this.lastShownTime=s,this.btnBox.timeText=s)}
- }
- ;
- Kt(V9t,"QuestSubMenu"),zt(V9t,"instance"),zt(V9t,"AUTO_UNLOCK_WAVE",100),zt(V9t,"GOLD_BUY_UNLOCK_WAVE",50);
- let K9t=V9t;
- const z9t=class t extends JV{
- static getInstance(){
- return null==this.instance&&(this.instance=new t),this.instance}
- constructor(){
- super(),this.currentSubView=N9t.getInstance()}
- setData(){
- K9t.getInstance().setData(),N9t.getInstance().setData(),this.currentSubView=N9t.getInstance()}
- get className(){
- return"QuestView"}
- updateLanguage(){
- this.setData()}
- }
- ;
- Kt(z9t,"QuestView"),zt(z9t,"instance");
- let q9t=z9t;
- const X9t=class extends Be{
- constructor(t=0){
- super(),zt(this,"bg"),zt(this,"icon"),zt(this,"line"),zt(this,"index",0),zt(this,"arrNormalNames",["menu_icon_01_on","menu_icon_03_on","menu_icon_02_on","menu_icon_04_on","menu_icon_05_on","menu_icon_06_on"]),zt(this,"lblTitle",new YD("SHOP",16777215,aD.BOTTOM_MENU_FONT_OPTION)),zt(this,"container",new Be),zt(this,"_selected",!1),zt(this,"onClick",Kt(()=>{
- }
- ,"onClick")),zt(this,"orgScale",1),zt(this,"onMotionComplete",null),zt(this,"eventTag"),zt(this,"lockIcon"),zt(this,"redDot"),this.index=t,this.createUI()}
- createUI(){
- this.bg=new CM({
- texture:ZA.getTexture("UI_Ekkorr","UI_MAIN_MENU_BG_ON"),leftWidth:10,topHeight:10,rightWidth:10,bottomHeight:10}
- ),this.addChild(this.bg),this.bg.width=640/6,this.icon=new We(ZA.getTexture("UI_Ekkorr",this.arrNormalNames[this.index])),this.addChild(this.icon),this.icon.x=.5*(this.bg.width-this.icon.width),this.icon.y=.5*(this.bg.height-10-this.icon.height),this.lblTitle.x=.5*(this.bg.width-this.lblTitle.width),this.lblTitle.y=40,this.bg.eventMode="static",this.bg.hitArea=new Pi(0,0,this.bg.width,this.bg.height),this.bg.on("pointerdown",this.onLobbyClick,this),this.addChild(this.bg),this.addChild(this.icon),this.addChild(this.lblTitle),this.icon.eventMode="none",this.lblTitle.eventMode="none"}
- get height(){
- return 70}
- set title(t){
- this.lblTitle.text=t,this.lblTitle.x=.5*(this.bg.width-this.lblTitle.width)}
- set selected(t){
- this._selected=t,t?(this.bg.texture=ZA.getTexture("UI_Ekkorr","UI_MAIN_MENU_BG_ON"),this.icon.tint=16777215,this.lblTitle.tint=16777215,this.up()):(this.bg.texture=ZA.getTexture("UI_Ekkorr","UI_MAIN_MENU_BG_OFF"),this.icon.tint=6710886,this.lblTitle.tint=4473924,this.down()),this.updateEventTagState()}
- up(){
- }
- down(){
- }
- onLobbyClick(){
- this.onClick(this.index)}
- getIcon(){
- return this.icon}
- startMotion(t=null,i=1.2,s=null){
- this.onMotionComplete=s;
- const e=this.icon;
- e.scale.x=e.scale.y=this.orgScale*i,GM.getInstance().add(this.executeMotion,this)}
- executeMotion(){
- const t=this.icon,i=this.orgScale;
- t.scale.x=t.scale.y+=.2*(this.orgScale-t.scale.y),Math.abs(t.scale.x-i)<.03&&(GM.getInstance().remove(this.executeMotion,this),t.scale.x=t.scale.y=i,this.onMotionComplete&&(this.onMotionComplete(),this.onMotionComplete=null))}
- showEventTag(t=0,i=0){
- this.eventTag||(this.eventTag=new We(ZA.getTexture("UI_Ekkorr","UI_Event")),this.addChild(this.eventTag)),this.eventTag.visible=!0,this.updateEventTag(t,i)}
- hideEventTag(){
- this.eventTag&&(this.eventTag.visible=!1)}
- updateEventTag(t,i){
- this.eventTag&&(this.eventTag.x=this.width-this.eventTag.width+t,this.eventTag.y=this.y+i,this.updateEventTagState())}
- updateEventTagState(){
- this.eventTag&&0!=this.eventTag.visible&&(this._selected?this.eventTag.tint=16777215:this.eventTag.tint=6710886)}
- getEventTagVisible(){
- return!!this.eventTag&&this.eventTag.visible}
- showLockIcon(t=0,i=0){
- this.lockIcon||(this.lockIcon=new We(ZA.getTexture("UI_Ekkorr","Icon_Lock")),this.addChild(this.lockIcon)),this.lockIcon.visible=!0,this.updateLockIcon(t,i)}
- hideLockIcon(){
- this.lockIcon&&(this.lockIcon.visible=!1)}
- updateLockIcon(t,i){
- this.lockIcon&&(this.lockIcon.x=this.width-this.lockIcon.width+t,this.lockIcon.y=this.y+i,this.updateLockIconState())}
- updateLockIconState(){
- this.lockIcon&&0!=this.lockIcon.visible&&(this.lockIcon.tint=16777215)}
- getLockIconVisible(){
- return!!this.lockIcon&&this.lockIcon.visible}
- showRedDot(){
- this.redDot||(this.redDot=new We(ZA.getTexture("UI_Ekkorr","red_dot_ani_30f_0001"))),this.updateRedDot(),this.addChild(this.redDot)}
- hideRedDot(){
- this.redDot&&this.redDot.removeFromParent()}
- updateRedDot(){
- this.redDot&&(this.redDot.x=this.bg.x+this.bg.width-this.redDot.width-15,this.redDot.y=0)}
- getRedDotActivated(){
- return!!this.redDot&&!!this.redDot.parent}
- }
- ;
- Kt(X9t,"BottomMenu");
- let Y9t=X9t;
- const J9t=class t extends Be{
- constructor(){
- super(),zt(this,"menuNames",["Quest","Heroes","Castle","Artifacts","Battle","Shop"]),zt(this,"menus",[]),zt(this,"onLanguageChangeBind"),zt(this,"heroPoint",new mi),zt(this,"heroPointInitialized",!1),zt(this,"castlePoint",new mi),zt(this,"castlePointInitialized",!1),zt(this,"battlePoint",new mi),zt(this,"battlePointInitialized",!1),zt(this,"shopPoint",new mi),zt(this,"shopPointInitialized",!1),zt(this,"count",0),zt(this,"onAssistantClaimBind"),this.createUI(),this.setLanguageChange(!0),this.updateLanguage(),VV.getInstance().registerBottomMenuGetter(()=>{
- const t=this.getMenu(1);
- return{
- parent:this,btn:{
- x:t.x,y:t.y,width:t.width,height:t.height}
- }
- }
- ),HV.getInstance().registerBottomMenuGetter(t=>{
- const i=this.getMenu(t);
- if(!i)return null;
- const s=i.getGlobalPosition(),e=this.parent;
- if(!e)return null;
- const n=e.toLocal(s);
- return{
- parent:e,btn:{
- x:n.x,y:n.y,width:i.width,height:i.height}
- }
- }
- ),this.on("added",this.onAdded),this.on("removed",this.onRemoved)}
- static getInstance(){
- return null==this.instance&&(this.instance=new t),this.instance}
- onAdded(){
- this.onEnterUpdate(),this.setEnterUpdate(!0),this.setAssistantClaim(!0)}
- onRemoved(){
- this.setEnterUpdate(!1),this.setAssistantClaim(!1)}
- createUI(){
- for(let t=0;
- t<6;
- t++){
- let i=new Y9t(t);
- i.x=640/6*t,i.y=0,this.addChild(i),this.menus.push(i),i.title=this.menuNames[t],i.eventMode="static",i.on("pointerdown",this.onMenuClick.bind(this))}
- this.menuClick(this.menus[0])}
- onMenuClick(t){
- let i=t.currentTarget;
- this.menuClick(i)}
- async onMenuClickByIndex(t){
- try{
- let i=this.menus[t];
- if(i.index==AV.currentIndex)return;
- this.menuClick(i)}
- catch(i){
- }
- }
- async menuClick(t){
- if(WL(),KL.getInstance().playSFX(KL.SFX_NORMAL_CLICK),UV.getInstance().setMode(GV.NORMAL),LV.getInstance().children.length>0&&dnt.getInstance().hideAllPvPPopups(),-1!=A9t.getInstance().bottomMenuUnlockList.indexOf(t.index)){
- switch(0==t.index&&A9t.getInstance().isRunning&&VV.getInstance().currentTarget==this&&(VV.getInstance().hideFromTarget(),A9t.getInstance().showQuestHelpPopup()),1==t.index&&A9t.getInstance().isRunning&&A9t.getInstance().showHeroHelpPopup(),t.index){
- case 0:k9t.getInstance().setExpandedMode(!1),q9t.getInstance().setData(),k9t.getInstance().currentView=q9t.getInstance();
- break;
- case 1:k9t.getInstance().setExpandedMode(!1),f9.getInstance().setData(),k9t.getInstance().currentView=f9.getInstance();
- break;
- case 2:k9t.getInstance().setExpandedMode(!1),Hti.getInstance().setData(),k9t.getInstance().currentView=Hti.getInstance();
- break;
- case 3:const t=Wx.getInstance().unlockWave;
- if(_L.maxWave<t)return void vV.getInstance().showMessage(AG.getValueReplace("GAME_35","##",t,`${
- t}
-  wave 이상에서 개방됩니다.`));
- k9t.getInstance().setExpandedMode(!1),Qnt.getInstance().setData(),k9t.getInstance().currentView=Qnt.getInstance();
- break;
- case 4:if(_L.maxWave<50)return void vV.getInstance().showMessage(AG.getValueReplace("GAME_35","##",50,"최고 기록이 50 wave를 넘은 이후에 개방됩니다.")+"\n"+AG.getValueReplace("GAME_36","##",50,"50 wave 넘어서 환생해주세요."));
- k9t.getInstance().setExpandedMode(!1),_4.getInstance().setData(),k9t.getInstance().currentView=_4.getInstance();
- break;
- case 5:if(0==Q2.getInstance().isReviewShop()&&_L.maxWave<10&&_L.wave<10)return void vV.getInstance().showMessage(AG.getValueReplace("GAME_34","##",10,"10 wave 이상에서 개방됩니다."));
- k9t.getInstance().setExpandedMode(!1),_8.getInstance().setData(),k9t.getInstance().currentView=_8.getInstance()}
- AV.currentIndex=t.index,this.menus.forEach(t=>t.selected=!1),t.selected=!0,HV.getInstance().onMenuChanged()}
- else if(3==t.index){
- const t=Wx.getInstance().unlockWave;
- if(_L.maxWave<t)return void vV.getInstance().showMessage(AG.getValueReplace("GAME_35","##",t,`${
- t}
-  wave 이상에서 개방됩니다.`))}
- else if(4==t.index){
- if(_L.maxWave<50)return void vV.getInstance().showMessage(AG.getValueReplace("GAME_35","##",50,"최고 기록이 50 wave를 넘은 이후에 개방됩니다.")+"\n"+AG.getValueReplace("GAME_36","##",50,"50 wave 넘어서 환생해주세요."))}
- else if(5==t.index&&0==Q2.getInstance().isReviewShop()&&_L.maxWave<10&&_L.wave<10)return void vV.getInstance().showMessage(AG.getValueReplace("GAME_34","##",10,"10 wave 이상에서 개방됩니다."))}
- setMenuSelected(t){
- try{
- let i=this.menus[t];
- if(i.index==AV.currentIndex)return;
- AV.currentIndex=i.index,this.menus.forEach(t=>t.selected=!1),i.selected=!0}
- catch(i){
- }
- }
- get height(){
- return 70}
- getMenu(t){
- return this.menus[t]}
- setLanguageChange(t){
- lS.getInstance().removeEventListener("LanguageChange",this.onLanguageChangeBind),t&&(this.onLanguageChangeBind=this.onLanguageChange.bind(this),lS.getInstance().addEventListener("LanguageChange",this.onLanguageChangeBind))}
- onLanguageChange(t=null){
- this.updateLanguage()}
- updateLanguage(){
- this.menuNames=[AG.getText("GAME_1","퀘스트"),AG.getText("GAME_3","영웅"),AG.getText("GAME_2","성"),AG.getText("GAME_4","유물"),AG.getText("GAME_70","전투"),AG.getText("COMMON_356","상점")];
- const t=this.menus.length;
- for(let i=0;
- i<t;
- ++i)this.menus[i].title=this.menuNames[i]}
- getHeroPoint(){
- if(0==this.heroPointInitialized){
- this.heroPointInitialized=!0;
- const t=this.menus[1];
- this.heroPoint.x=this.x+t.x+.5*t.width,this.heroPoint.y=this.y+t.y+.5*t.height}
- return this.heroPoint}
- getCastlePoint(){
- if(0==this.castlePointInitialized){
- this.castlePointInitialized=!0;
- const t=this.menus[2];
- this.castlePoint.x=this.x+t.x+.5*t.width,this.castlePoint.y=this.y+t.y+.5*t.height}
- return this.castlePoint}
- getBattlePoint(){
- if(0==this.battlePointInitialized){
- this.battlePointInitialized=!0;
- const t=this.menus[4];
- this.battlePoint.x=this.x+t.x+.5*t.width,this.battlePoint.y=this.y+t.y+.5*t.height}
- return this.battlePoint}
- getShopPoint(){
- if(0==this.shopPointInitialized){
- this.shopPointInitialized=!0;
- const t=this.menus[5];
- this.shopPoint.x=this.x+t.x+.5*t.width,this.shopPoint.y=this.y+t.y+.5*t.height}
- return this.shopPoint}
- startHeroMotion(t=null,i=1.2){
- this.menus[1].startMotion(t,i)}
- startCastleMotion(t=null,i=1.2){
- this.menus[2].startMotion(t,i)}
- startBattleMotion(t=null,i=1.2){
- this.menus[4].startMotion(t,i)}
- startShopMotion(t=null,i=1.2){
- this.menus[5].startMotion(t,i)}
- setEnterUpdate(t){
- GM.getInstance().remove(this.onEnter,this),t&&GM.getInstance().add(this.onEnter,this)}
- onEnter(){
- ++this.count>60&&(this.count=0,this.onEnterUpdate())}
- async onEnterUpdate(){
- fU.isValidEvent(pU.HERO_RESET_EVENT)?this.getMenu(1).showEventTag(-3,2):this.getMenu(1).hideEventTag(),fU.isValidEvent(pU.PAYMENT_EVENT)&&fU.currentPaymentSpecialEvent?this.getMenu(5).showEventTag(-3,2):this.getMenu(5).hideEventTag(),await this.updateSecretaryClaimable()}
- async updateSecretaryClaimable(){
- const t=await bti.getInstance().checkClaimable();
- t?this.getMenu(2).showRedDot():this.getMenu(2).hideRedDot(),E8.getInstance().isCastleSubView()&&Zti.getInstance().updateCitadel(t)}
- setAssistantClaim(t){
- lS.getInstance().removeEventListener("AssistantClaim",this.onAssistantClaimBind),t&&(this.onAssistantClaimBind=this.onAssistantClaim.bind(this),lS.getInstance().addEventListener("AssistantClaim",this.onAssistantClaimBind))}
- onAssistantClaim(t){
- this.updateSecretaryClaimable()}
- hideLockIconsTo(t){
- this.menus.forEach(t=>t.showLockIcon(-10)),t.forEach(t=>{
- this.getMenu(t).hideLockIcon()}
- )}
- }
- ;
- Kt(J9t,"BottomMenus"),zt(J9t,"instance");
- let Q9t=J9t;
- const hti=class t{
+ const k9t=class extends aS{
+ constructor(){
+ super()}
+ }
+ ;
+ Kt(k9t,"DialogueLayer");
+ let O9t=k9t;
+ const I9t=Object.freeze(Object.defineProperty({
+ __proto__:null,DialogueLayer:O9t}
+ ,Symbol.toStringTag,{
+ value:"Module"}
+ )),x9t=class t{
BasePopup3 1 hunks, 693 statements
+ let F3=U3;
+ const H3=class extends Be{
+ constructor(){
+ super(),zt(this,"top"),zt(this,"bottom"),zt(this,"bg"),zt(this,"bgContainer"),zt(this,"btnClose",new nG),zt(this,"txtTitle"),zt(this,"topOverlap",12),zt(this,"bottomOverlap",15),zt(this,"_width",574),zt(this,"_height",868),zt(this,"_positionY",-1),zt(this,"outSideClickHide",!1),zt(this,"onPointerDownHandler"),this.createBG(),this.onPointerDownHandler=this.onPointerDown.bind(this)}
+ createBG(){
+ this.bgContainer=new Be,this.addChild(this.bgContainer),this.bg=new CM({
+ texture:ZA.getTexture("UI_Ekkorr","Popup_Frame"),leftWidth:30,topHeight:30,rightWidth:30,bottomHeight:30}
+ ),this.bg.width=this._width,this.bgContainer.addChild(this.bg),this.top=new CM({
+ texture:ZA.getTexture("UI_Ekkorr","Base_Title_up"),leftWidth:200,topHeight:54,rightWidth:200,bottomHeight:14}
+ ),this.bgContainer.addChild(this.top),this.bottom=new CM({
+ texture:ZA.getTexture("UI_Ekkorr","Base_Title_Down"),leftWidth:200,topHeight:27,rightWidth:200,bottomHeight:16}
+ ),this.bgContainer.addChild(this.bottom),this.bottom.eventMode="none",this.top.x=.5*(this.bg.width-this.top.width),this.bottom.x=.5*(this.bg.width-this.bottom.width),this.bottom.y=this._height-this.bottom.height,this.bg.y=this.top.height-this.topOverlap,this.bg.height=this.bottom.y-this.bg.y+this.bottomOverlap,this.btnClose.x=this.top.x+this.top.width-this.btnClose.width-35,this.btnClose.y=18,this.addChild(this.btnClose),this.btnClose.onClick=this.onCloseBtnClick.bind(this),this.txtTitle=new YD("",16777215,aD.DEFAULT_OUTLINE_FONT_OPTION_20),this.txtTitle.x=.5*(this.top.width-this.txtTitle.width),this.txtTitle.y=22,this.addChild(this.txtTitle),aD.setLabelWrapWidth(this.txtTitle,this._width-40)}
+ setTitle(t){
+ this.txtTitle.text=t,this.txtTitle.x=.5*(this.top.width-this.txtTitle.width),this.txtTitle.y=22}
+ show(t="",i=null,s=null){
+ this.pivot.set(this.width/2,this.height/2),this.position.set(320,this.getPositionY()),this.scale.set(.1),HI.to(this.scale,{
+ x:1,y:1,duration:.2,ease:"back.out",onComplete:Kt(()=>{
+ this.onShowMotionComplete()}
+ ,"onComplete")}
+ ),IL.getInstance().addPopup(this)}
+ onShowMotionComplete(){
+ KA.stage.on("pointertap",this.onPointerDownHandler)}
+ hide(){
+ this.parent&&HI.to(this.scale,{
+ x:.8,y:.8,duration:.15,ease:"back.in",onComplete:Kt(()=>{
+ this.onHideMotionComplete()}
+ ,"onComplete")}
+ )}
+ onHideMotionComplete(){
+ this.hideImmediately()}
+ hideImmediately(){
+ IL.getInstance().removePopup(this),KA.stage.off("pointertap",this.onPointerDownHandler),this.resetPostionY()}
+ onCloseBtnClick(){
+ this.hide()}
+ get width(){
+ return this._width}
+ set width(t){
+ t!=this._width&&(this._width=t,this.bg.width=this._width,this.top.width=this._width+20,this.bottom.width=this._width+20,this.top.x=.5*(this._width-this.top.width),this.bottom.x=.5*(this._width-this.bottom.width),this.txtTitle&&(aD.setLabelWrapWidth(this.txtTitle,this._width-40),this.txtTitle.x=.5*(this.top.width-this.txtTitle.width),this.txtTitle.y=22),this.btnClose&&(this.btnClose.x=this.top.x+this.top.width-this.btnClose.width-35))}
+ get height(){
+ return this._height}
+ set height(t){
+ t!=this._height&&(this._height=t,this.bottom.y=this._height-this.bottom.height,this.bg.height=this.bottom.y-this.bg.y+this.bottomOverlap)}
+ getBaseX(){
+ return this.bg.x}
+ getBaseY(){
+ return this.bg.y}
+ getPositionY(){
+ return-1===this._positionY&&(this._positionY=this.getDefaultPositionY()),this._positionY}
+ getDefaultPositionY(){
+ return Math.floor((KA.safeHeight-this.height)*(3/7))+.5*this.height}
+ resetPostionY(){
+ this._positionY=this.getDefaultPositionY()}
+ setPositonRatioY(t){
+ this._positionY=KA.stageHeight*t}
+ onPointerDown(t){
+ 0!=this.outSideClickHide&&(this.getPopupBounds().containsPoint(t.global.x,t.global.y)||this.hide())}
+ getPopupBounds(){
+ return this.bgContainer&&this.bgContainer.parent&&this.bgContainer.visible?this.bgContainer.getBounds():this.getBounds()}
+ onBackButton(){
+ return!!(this.btnClose&&this.btnClose.parent&&this.btnClose.visible)&&(this.onCloseBtnClick(),!0)}
+ }
+ ;
+ Kt(H3,"BasePopup3");
+ let W3=H3;
+ const j3=class extends W3{
+ constructor(){
+ super(),this.width=KA.stageWidth-20,this.height=KA.safeHeight-yii.getInstance().height-Xti.getInstance().height}
+ getDefaultPositionY(){
+ return Math.floor(yii.getInstance().height+.5*this._height)}
+ }
+ ;
+ Kt(j3,"BaseViewPopup");
+ let $3=j3;
+ const V3=class extends mB{
+ constructor(){
+ super("UI_Ekkorr","Btn_Delete",1)}
+ get activated(){
+ return this._activated}
+ set activated(t){
+ t!=this._activated&&(this._activated=t,this._activated?this.bg.texture=ZA.getTexture("UI_Ekkorr","Btn_Delete"):this.bg.texture=ZA.getTexture("UI_Ekkorr","Btn_Delete_Gray"))}
+ }
+ ;
+ Kt(V3,"MailDeleteAllButton");
+ let K3=V3;
+ const z3=class t extends Be{
+ constructor(i){
+ super(),zt(this,"bg"),zt(this,"lbl"),zt(this,"container"),zt(this,"_width",100),zt(this,"_minWidth",100),zt(this,"_height",58),zt(this,"_textSize",19),zt(this,"_activated",!0),zt(this,"_activatedTextColor",16777215),zt(this,"_deactivatedTextColor",10066329),zt(this,"_outlineText",!1),zt(this,"_resizable",!1),zt(this,"_padding",20),zt(this,"_color",t.COLOR_SAND_BROWN),zt(this,"onClick"),zt(this,"redDot"),this.container=new Be,this.addChild(this.container),this.bg=new CM({
+ texture:ZA.getTexture("UI_Ekkorr",this._color),leftWidth:40,topHeight:27,rightWidth:40,bottomHeight:29}
+ ),this.bg.width=this._width,this.bg.height=this._height,this.container.addChild(this.bg);
+ const s=aD.LABEL_OPTION_NO_DROP_SHADOW;
+ s.fill=aD.COLOR_WHITE,s.fontSize=this._textSize,this.lbl=new YD(i,s.fill,s),this.container.addChild(this.lbl),this.updateLayout(),this.eventMode="dynamic",this.on("pointerdown",this.onDown,this),this.on("pointerup",this.onUp,this),this.on("pointerupoutside",this.onUp,this),this.on("pointertap",this.onTap,this),this.container.pivot.set(.5*this._width,.5*this._height)}
+ updateLayout(){
+ this._resizable?aD.setLabelWrapWidth(this.lbl,5*this._width):aD.setLabelWrapWidth(this.lbl,this._width),this.lbl.x=.5*(this._width-this.lbl.width),this.lbl.y=.5*(this._height-this.lbl.height),this.container.x=.5*this._width,this.container.y=.5*this._height}
+ get width(){
+ return this._width}
+ set width(t){
+ t!=this._width&&(this._resizable&&t<this._minWidth&&(t=this._minWidth),this._width=t,this.bg.width=this._width,this.container.pivot.set(.5*this._width,.5*this._height),this.updateLayout())}
+ get minWidth(){
+ return this._minWidth}
+ set minWidth(t){
+ t!=this._minWidth&&(this._minWidth=t,this._resizable&&this._width<this._minWidth&&(this.width=this._minWidth))}
+ get height(){
+ return this._height}
+ set height(t){
+ t!=this._height&&(this._height=t,this.bg.height=this._height,this.container.pivot.set(.5*this._width,.5*this._height),this.updateLayout())}
+ get text(){
+ return this.lbl.text}
+ set text(t){
+ this.lbl.text=t,this._resizable&&(this.width=this.lbl.width+2*this._padding),this.updateLayout()}
+ get textSize(){
+ return this._textSize}
+ set textSize(t){
+ t!=this._textSize&&(this._textSize=t,this.lbl.textSize=this._textSize,this.updateLayout())}
+ get activated(){
+ return this._activated}
+ set activated(t){
+ t!=this._activated&&(this._activated=t,this._activated,this.updateTextColor())}
+ get activatedTextColor(){
+ return this._activatedTextColor}
+ set activatedTextColor(t){
+ t!=this._activatedTextColor&&(this._activatedTextColor=t,this.updateTextColor())}
+ get deactivatedTextColor(){
+ return this._deactivatedTextColor}
+ set deactivatedTextColor(t){
+ t!=this._deactivatedTextColor&&(this._deactivatedTextColor=t,this.updateTextColor())}
+ updateTextColor(){
+ 1==this._activated?this.lbl.textColor=this._activatedTextColor:this.lbl.textColor=this._deactivatedTextColor}
+ get outlineText(){
+ return this._outlineText}
+ set outlineText(t){
+ if(t==this._outlineText)return;
+ this._outlineText=t;
+ const i=this.lbl.getStyle();
+ this._outlineText?(delete i.stroke,i.stroke={
+ color:"#000000",width:4,join:"round"}
+ ):delete i.stroke,this.lbl.setStyle(i),this.updateLayout()}
+ get resizable(){
+ return this._resizable}
+ set resizable(t){
+ t!=this._resizable&&(this._resizable=t,this.width=this.lbl.width+2*this._padding,this.updateLayout())}
+ getStyle(){
+ return this.lbl.getStyle()}
+ setStyle(t){
+ this.lbl.setStyle(t)}
+ setTexture(t){
+ if(t)try{
+ this.bg.texture=t.texture,this.bg.leftWidth=t.leftWidth,this.bg.topHeight=t.topHeight,this.bg.rightWidth=t.rightWidth,this.bg.bottomHeight=t.bottomHeight}
+ catch(i){
+ }
+ }
+ get color(){
+ return this._color}
+ set color(t){
+ if(t!=this._color){
+ this._color=t;
+ try{
+ this.bg.texture=ZA.getTexture("UI_Ekkorr",this._color)}
+ catch(i){
+ }
+ }
+ }
+ onDown(t){
+ 0!=this._activated&&(this.container.scale=.9)}
+ onUp(t){
+ 0!=this._activated&&(this.container.scale=1)}
+ onTap(t){
+ 0!=this._activated&&(KL.getInstance().playSFX(KL.SFX_NORMAL_CLICK),WL(),this.onClick&&this.onClick())}
+ showRedDot(){
+ this.redDot||(this.redDot=new YL,this.container.addChild(this.redDot)),this.redDot.show(),this.updateRedDot()}
+ hideRedDot(){
+ this.redDot&&this.redDot.hide()}
+ updateRedDot(){
+ this.redDot&&(this.redDot.x=this.bg.x+this.bg.width-this.redDot.width-12,this.redDot.y=this.bg.y-3)}
+ }
+ ;
+ Kt(z3,"CommonButton2"),zt(z3,"COLOR_SAND_BROWN","Btn_Sand_Brown"),zt(z3,"COLOR_ORANGE","Btn_Orange"),zt(z3,"COLOR_GRAY","Btn_Gray");
+ let q3=z3;
+ const X3=class extends q3{
+ constructor(t){
+ super(t),zt(this,"bgOff"),zt(this,"_selected",!0),this.minWidth=180,this.resizable=!0,this.outlineText=!0,this.bgOff=new CM({
+ texture:ZA.getTexture("UI_Ekkorr","Btn_Gray"),leftWidth:40,topHeight:27,rightWidth:40,bottomHeight:29}
+ ),this.bgOff.width=this._width,this.bgOff.height=this._height,this.container.addChildAt(this.bgOff,0),this.bg.visible=this._selected,this.bgOff.visible=!this._selected}
+ get selected(){
+ return this._selected}
+ set selected(t){
+ t!=this._selected&&(this._selected=t,this._selected?(this.bg.visible=!0,this.bgOff.visible=!1):(this.bg.visible=!1,this.bgOff.visible=!0))}
+ onTap(t){
+ this._selected||super.onTap(t)}
+ }
+ ;
+ Kt(X3,"MailMenuButton");
+ let Y3=X3;
+ const J3=class extends iP{
+ constructor(){
+ super(),this.sp.x=.5*-this.sp.width,this.sp.y=.5*-this.sp.height,this.offsetX=2,this.scale=.5}
+ getTextures(){
+ return ZA.getTextures("Loading","loading_circle_60f_")}
+ }
+ ;
+ Kt(J3,"MailLoading");
+ let Q3=J3;
+ const Z3=class extends Be{
+ constructor(){
+ super(),zt(this,"yPrev",0),zt(this,"yHome",0),zt(this,"vy",0),zt(this,"yMax",0),zt(this,"yMin",0),zt(this,"yMouse",0),zt(this,"yOffset",140),zt(this,"min",0),zt(this,"max",0),zt(this,"dragSensorDistance",20),zt(this,"_isDragging",!1),zt(this,"onDragStart",null),zt(this,"onDragEnd",null),this.eventMode="static",this.on("pointerdown",this.onDown,this)}
+ get isDragging(){
+ return this._isDragging}
+ onDown(t){
+ this.min>this.max||(this.yMin=this.min,this.yMax=this.max,this.yPrev=this.yHome=this.yMouse=t.globalY,this.off("pointermove",this.onMove,this),this.on("pointermove",this.onMove,this),this.off("pointerup",this.onUp,this),this.on("pointerup",this.onUp,this),this.off("pointerupoutside",this.onUp,this),this.on("pointerupoutside",this.onUp,this),GM.getInstance().remove(this.onFlickEnter,this),GM.getInstance().add(this.onDragEnter,this))}
+ onDragEnter(){
+ 0==this._isDragging&&Math.abs(this.yMouse-this.yHome)>this.dragSensorDistance&&(this._isDragging=!0,this.onDragStartCallback()),0!=this._isDragging&&(this.vy=this.yMouse-this.yPrev,this.y==this.yMin&&this.vy<0||this.y==this.yMax&&this.vy>0||(this.y+=this.vy,this.y>this.yMax&&(this.y=this.yMax),this.y<this.yMin&&(this.y=this.yMin),this.yPrev=this.yMouse))}
+ onMove(t){
+ this.yMouse=t.globalY}
+ onUp(t){
+ 1==this._isDragging&&(this.vy=2*this.vy,GM.getInstance().add(this.onFlickEnter,this),this._isDragging=!1,this.onDragEndCallback()),GM.getInstance().remove(this.onDragEnter,this),this.off("pointermove",this.onMove,this),this.off("pointerup",this.onUp,this),this.off("pointerupoutside",this.onUp,this)}
+ onFlickEnter(){
+ this.vy*=.98,this.y==this.yMin&&this.vy<0||this.y==this.yMax&&this.vy>0?GM.getInstance().remove(this.onFlickEnter,this):(this.y+=this.vy,this.y>this.yMax&&(this.y=this.yMax),this.y<this.yMin&&(this.y=this.yMin),Math.abs(this.vy)<1&&GM.getInstance().remove(this.onFlickEnter,this))}
+ onDragStartCallback(){
+ this.onDragStart&&this.onDragStart()}
+ onDragEndCallback(){
+ this.onDragEnd&&this.onDragEnd()}
+ setScroll(t){
+ let i=this.max-t;
+ i<this.min&&(i=this.min),this.y=i}
+ }
+ ;
+ Kt(Z3,"DraggableContainer");
+ let t6=Z3;
+ const i6=class extends Be{
+ constructor(){
+ super(),zt(this,"bg"),zt(this,"lbl"),zt(this,"count",0),zt(this,"duration",180),this.bg=new CM({
+ texture:ZA.getTexture("UI_Ekkorr","UI_Toast_Bg"),leftWidth:6,topHeight:6,rightWidth:6,bottomHeight:6}
+ ),this.bg.alpha=.7,this.bg.width=640,this.bg.height=50,this.addChild(this.bg),this.lbl=new YD("Toast",aD.DEFAULT_COLOR),this.lbl.x=.5*(this.bg.width-this.lbl.width),this.lbl.y=25,this.addChild(this.lbl),this.eventMode="none"}
+ show(t,i,s=aD.DEFAULT_COLOR,e=null,n=!0,h=180,r=.7){
+ this.lbl.text=t,aD.setLabelWrapWidth(this.lbl,this.bg.width-10),this.lbl.textColor=s,this.lbl.x=.5*(this.bg.width-this.lbl.width),this.bg.height=this.lbl.height+2*this.lbl.y,this.y=i-this.height,this.duration=h,this.bg.alpha=r,null==e&&(e=qD.getInstance()),e&&e.addChild(this),1==n&&this.startCheckHide(),F3.showItemsInVertical([this])}
+ hide(){
+ this.parent&&this.parent.removeChild(this)}
+ get width(){
+ return this.bg.width}
+ get height(){
+ return this.bg.height}
+ startCheckHide(){
+ this.count=0,GM.getInstance().add(this.checkHide,this)}
+ checkHide(){
+ ++this.count>this.duration&&(this.count=0,this.count=0,this.hide(),GM.getInstance().remove(this.checkHide,this))}
+ }
+ ;
+ Kt(i6,"BaseToast");
+ let s6=i6;
+ const e6=class t extends s6{
+ static getInstance(){
+ return this._instance||(this._instance=new t),this._instance}
+ constructor(){
+ super()}
+ }
+ ;
+ Kt(e6,"Toast"),zt(e6,"_instance");
+ let n6=e6;
+ const h6=class t{
+ constructor(){
+ zt(this,"requestPending",!1),zt(this,"obj",{
+ }
+ ),zt(this,"objByType",{
+ }
+ ),zt(this,"types",[])}
+ static getInstance(){
+ return null==this.instance&&(this.instance=new t),this.instance}
+ async getInventory(t,i=!1){
+ if(this.requestPending)return;
+ this.requestPending=!0;
+ let s=await hD.getInstance().user.getInventory(t,i);
+ if(0==s.success)return this.requestPending=!1,void lS.getInstance().dispatchCustomEvent("UserInventory");
+ this.setData(s.body),this.requestPending=!1}
+ setData(t){
+ if(!t||!t.inventory)return;
+ this.obj={
+ }
+ ,this.objByType={
+ }
+ ,this.obj.all=[],this.types[0]="all",this.types.length=1;
+ const i=t.inventory;
+ let s,e,n;
+ const h=i.length;
+ for(let r=0;
+ r<h;
+ ++r){
+ if(s=i[r].type.toString(),e="subType"in i[r]?i[r].subType.toString():"",n="","ticket"==s)switch(e){
+ case"heroGacha":case"heroSelect":n="hero";
+ break;
+ case"pet":case"petSelect":n="pet";
+ break;
+ case"treasureGacha":n="relic"}
+ ""!=n&&(e&&(this.objByType[`${
+ s}
+ _${
+ e}
+ `]=i[r]),i[r].inventoryType=n,this.obj[n]||(this.obj[n]=[]),this.obj[n].push(i[r]),this.obj.all.push(i[r]),this.types.includes(n)||this.types.push(n))}
+ lS.getInstance().dispatchCustomEvent("UserInventory")}
+ getTypes(){
+ return this.types}
+ getListWithType(t){
+ return this.obj[t]}
+ getDataWithTypeAndSubType(t,i){
+ return this.objByType[`${
+ t}
+ _${
+ i}
+ `]}
+ }
+ ;
+ Kt(h6,"InventoryManager"),zt(h6,"instance");
+ let r6=h6;
+ var o6=(t=>(t.all="all",t.hero="hero",t.relic="relic",t.pet="pet",t))(o6||{
+ }
+ );
+ const a6=class t{
+ constructor(){
+ zt(this,"data",{
+ hero5:0,hero7:0,treasure5:0,treasure6:0,treasure7:0,treasure8:0,treasure9:0}
+ )}
+ static getInstance(){
+ return null==this.instance&&(this.instance=new t),this.instance}
+ setData(t){
+ if(t)for(const i in this.data)i in t&&(this.data[i]=Number(t[i]))}
+ getHeroTransTicket(t=5){
+ const i=`hero${
+ t}
+ `;
+ return i in this.data?this.data[i]:0}
+ getTreasureTransTicket(t=6){
+ const i=`treasure${
+ t}
+ `;
+ return i in this.data?this.data[i]:0}
+ }
+ ;
+ Kt(a6,"TransTicketManager"),zt(a6,"instance");
+ let c6=a6;
+ const l6=class t extends AB{
+ constructor(){
+ super(),zt(this,"lblDesc"),zt(this,"btnConfirm"),zt(this,"icons",[]),this.outSideClickHide=!0,this.title=AG.getValueReplace("GAME_181","##",5,"5성 병사 뽑기"),this.lblDesc=new YD("",13421772,aD.DEFAULT_FONT_OPTION_16),this.lblDesc.align="center",this.contentContainer.addChild(this.lblDesc),this.btnConfirm=new QL(AG.getText("COMMON_1","확인")),this.btnConfirm.color=QL.GREEN,this.btnConfirm.width=160,this.btnConfirm.height=50,this.btnConfirm.onClick=()=>this.hide(),this.contentContainer.addChild(this.btnConfirm)}
+ static getInstance(){
+ return this._instance||(this._instance=new t),this._instance}
+ async showGuide(){
+ this.title=AG.getValueReplace("GAME_181","##",5,"5성 병사 뽑기"),this.btnConfirm.text=AG.getText("COMMON_1","확인");
+ const t=vx.getInstance().bookList.filter(t=>5===t.grade&&0===t.evolStage&&t.canPurchase&&t.honor>=2&&t.kindNum<1e3);
+ this.update(t,this.title),await this.loadImage(),super.show()}
+ showGuideOfHeroGacha(){
+ this.title=AG.getText("GAME_764","5성 영웅 확정권"),this.btnConfirm.text=AG.getText("COMMON_1","확인");
+ const t=vx.getInstance(),i=t.honorNumberMax,s=t.bookList.filter(t=>5===t.grade&&0===t.evolStage&&t.canPurchase&&(t.honor>=1&&t.honor<i||t.honor<1)&&t.kindNum<1e3);
+ this.update(s,this.title),super.show()}
+ update(t,i){
+ var s,e;
+ for(const p of this.icons)this.contentContainer.removeChild(p);
+ this.icons=[];
+ const n=t.length,h=n>0?(100/n).toFixed(2):"0",r=AG.getText("GAME_602","아래 병사 중 랜덤한 병사를 획득합니다.")+" "+AG.getText("COMMON_475","획득 확률은 모두 동일합니다.")+`\n(${
+ AG.getText("COMMON_476","개별 획득 확률")}
+  : ${
+ h}
+ %(=1/${
+ n}
+ ))`;
+ this.lblDesc.text=r;
+ for(let p=0;
+ p<t.length;
+ p++){
+ const i=new vK;
+ i.scale=.7,i.setDataWithKindNum(t[p].kindNum),this.contentContainer.addChild(i),this.icons.push(i)}
+ const o=(null==(s=this.icons[0])?void 0:s.width)??70,a=(null==(e=this.icons[0])?void 0:e.height)??70,c=Math.ceil(t.length/4),l=4*o+15;
+ this.width=520,this.title=i,aD.setLabelWrapWidth(this.lblDesc,this.width-55),this.lblDesc.x=.5*(this.width-this.lblDesc.width),this.lblDesc.y=65;
+ const u=this.lblDesc.y+this.lblDesc.height+15,d=.5*(this.width-l)+5;
+ for(let p=0;
+ p<this.icons.length;
+ p++){
+ const t=p%4,i=Math.floor(p/4);
+ this.icons[p].x=d+t*(o+5),this.icons[p].y=u+i*(a+2)}
+ const f=u+c*(a+2)+35;
+ this.btnConfirm.x=.5*(this.width-this.btnConfirm.width),this.btnConfirm.y=f,this.height=f+this.btnConfirm.height+30,this.btnClose.x=this.width-this.btnClose.width-12}
+ }
+ ;
+ Kt(l6,"HeroDrawGuidePopup"),zt(l6,"_instance");
+ let u6=l6;
+ const d6=class extends Be{
+ constructor(){
+ super(),zt(this,"icon",new We(ZA.getTexture("UI_Ekkorr","UI_T001"))),zt(this,"bg",new We(ZA.getTexture("UI_Ekkorr","HeroFrame_1_Bg"))),zt(this,"cover",new We(ZA.getTexture("UI_Ekkorr","HeroFrame_1"))),zt(this,"lblEnhance",new YD("+0",16776960,aD.DEFAULT_OUTLINE_FONT_OPTION_16)),zt(this,"posList",[30,26,24,19,16,13,9]),zt(this,"star",new We(ZA.getTextures("UI_Ekkorr","UI_UNIT_RARE")[3])),zt(this,"trans",new We(ZA.getTexture("UI_Ekkorr","Trans0001"))),this.icon.x=3,this.icon.y=3,this.bg.x=3,this.bg.y=3,this.addChild(this.bg),this.addChild(this.icon),this.cover.x=0,this.cover.y=0,this.addChild(this.cover),this.star.x=this.posList[3],this.star.y=this.bg.height-this.star.height,this.addChild(this.star),this.icon.x=.5*(this.bg.height-this.icon.height),this.icon.y=.5*(this.bg.height-this.icon.height),this.lblEnhance.x=this.bg.width-this.lblEnhance.width-1,this.lblEnhance.y=3,this.addChild(this.lblEnhance),this.trans.scale=1.2,this.trans.x=5,this.trans.y=7,this.trans.visible=!1,this.addChild(this.trans)}
+ setVO(t){
+ this.icon.texture=ZA.getTexture("UI_Ekkorr",`UI_T${
+ uU.addZeros(3,t.kindNum)}
+ `),this.icon.width=this.icon.height=this.cover.width-6,this.icon.x=3,this.icon.y=2,this.lblEnhance.text=`+${
+ t.enhance}
+ `,this.star.texture=ZA.getTextures("UI_Ekkorr","UI_UNIT_RARE")[t.grade-1],this.star.x=this.posList[t.grade-1],this.bg.texture=ZA.getTexture("UI_Ekkorr",`HeroFrame_${
+ t.grade}
+ _Bg`),this.cover.texture=ZA.getTexture("UI_Ekkorr",`HeroFrame_${
+ t.grade}
+ `),t.trans&&t.trans>0?(this.trans.texture=ZA.getTexture("UI_Ekkorr",`Trans000${
+ t.trans}
+ `),this.trans.visible=!0):this.trans.visible=!1}
+ hideTrans(){
+ this.trans.visible=!1}
+ showTrans(t){
+ t<=0?this.trans.visible=!1:(this.trans.texture=ZA.getTexture("UI_Ekkorr",`Trans000${
+ t}
+ `),this.trans.visible=!0)}
+ setDataWithKindNum(t){
+ const i=Wx.getInstance().getBookDataByKindNum(t);
+ i&&this.setVO(i)}
+ hideFrame(){
+ this.bg.visible=!1,this.cover.visible=!1}
+ showFrame(){
+ this.bg.visible=!0,this.cover.visible=!0}
+ get width(){
+ return this.bg.width}
+ get height(){
+ return this.bg.height}
+ hideEnhance(){
+ this.lblEnhance.visible=!1}
+ showEnhance(){
+ this.lblEnhance.visible=!0}
+ }
+ ;
+ Kt(d6,"TreasureIcon");
+ let f6=d6;
+ const p6=class t extends AB{
+ constructor(){
+ super(),zt(this,"lblDesc"),zt(this,"btnConfirm"),zt(this,"icons",[]),this.outSideClickHide=!0,this.title=AG.getValueReplace("GAME_184","##",6,"6성 유물 뽑기"),this.lblDesc=new YD("",13421772,aD.DEFAULT_FONT_OPTION_16),this.lblDesc.align="center",this.contentContainer.addChild(this.lblDesc),this.btnConfirm=new QL(AG.getText("COMMON_1","확인")),this.btnConfirm.color=QL.GREEN,this.btnConfirm.width=160,this.btnConfirm.height=50,this.btnConfirm.onClick=()=>this.hide(),this.contentContainer.addChild(this.btnConfirm)}
+ static getInstance(){
+ return this._instance||(this._instance=new t),this._instance}
+ async showGuide(){
+ this.title=AG.getText("GAME_218","유물 뽑기권"),this.btnConfirm.text=AG.getText("COMMON_1","확인");
+ const t=Wx.getInstance().bookList.filter(t=>6===t.grade);
+ this.update(t,this.title),await this.loadImage(),super.show()}
+ showGuideOfTreasureGacha(){
+ this.title=AG.getText("GAME_218","유물 뽑기권"),this.btnConfirm.text=AG.getText("COMMON_1","확인");
+ const t=Wx.getInstance().bookList.filter(t=>6===t.grade);
+ this.update(t,this.title),super.show()}
+ update(t,i){
+ var s,e;
+ for(const g of this.icons)this.contentContainer.removeChild(g);
+ this.icons=[];
+ const n=Wx.getInstance(),h=new Set;
+ for(const g of n.equipedList)h.add(g.kindNum);
+ for(const g of n.ownedList)h.add(g.kindNum);
+ const r=t.filter(t=>!h.has(t.kindNum)).length;
+ let o=AG.getText("GAME_603","아래 유물 중 랜덤한 유물을 획득합니다.")+" "+AG.getText("COMMON_475","획득 확률은 모두 동일합니다.");
+ if(r>0){
+ const t=(100/r).toFixed(2);
+ o+=`\n(${
+ AG.getText("COMMON_476","개별 획득 확률")}
+  : ${
+ t}
+ %(=1/${
+ r}
+ ))`}
+ this.lblDesc.text=o;
+ for(let g=0;
+ g<t.length;
+ g++){
+ const i=new f6;
+ i.scale=.75,i.setDataWithKindNum(t[g].kindNum),i.hideEnhance(),i.alpha=h.has(t[g].kindNum)?.35:1,this.contentContainer.addChild(i),this.icons.push(i)}
+ const a=(null==(s=this.icons[0])?void 0:s.width)??70,c=(null==(e=this.icons[0])?void 0:e.height)??70,l=Math.ceil(t.length/7),u=7*a-12;
+ this.width=520,this.title=i,aD.setLabelWrapWidth(this.lblDesc,this.width-40),this.lblDesc.x=.5*(this.width-this.lblDesc.width),this.lblDesc.y=65;
+ const d=this.lblDesc.y+this.lblDesc.height+15,f=.5*(this.width-u)+5;
+ for(let g=0;
+ g<this.icons.length;
+ g++){
+ const t=g%7,i=Math.floor(g/7);
+ this.icons[g].x=f+t*(a+-2),this.icons[g].y=d+i*(c+2)}
+ const p=d+l*(c+2)+10;
+ this.btnConfirm.x=.5*(this.width-this.btnConfirm.width),this.btnConfirm.y=p,this.height=p+this.btnConfirm.height+30,this.btnClose.x=this.width-this.btnClose.width-12}
+ }
+ ;
+ Kt(p6,"TreasureDrawGuidePopup"),zt(p6,"_instance");
+ let g6=p6;
+ const m6=class t{
+ constructor(){
+ zt(this,"battlePoolMap",{
+ }
+ ),zt(this,"seasonSetMap",{
+ }
+ ),zt(this,"rewardMap",{
+ }
+ ),zt(this,"seasonSetKindNum",0),zt(this,"seasonNumber",0),zt(this,"seasonEndTime",0),zt(this,"currentFloor",0),zt(this,"floorStars",[]),zt(this,"ticket",0),zt(this,"maxTicket",5),zt(this,"ticketTime",0),zt(this,"currentBattleFloor",0),zt(this,"bookLoaded",!1)}
+ static getInstance(){
+ return null==this.instance&&(this.instance=new t),this.instance}
+ setBattlePoolData(t){
+ if(this.battlePoolMap={
+ }
+ ,t)for(const i of t){
+ const t=new b6;
+ t.kindNum=i.kindNum,t.difficulty=i.difficulty,t.enemyKindNums=i.enemyKindNums||"",t.enemyTrans=i.enemyTrans||"",t.enemyShields=i.enemyShields||"",t.enemyLevels=i.enemyLevels||"",t.tribes=i.tribes,t.gradeMax=i.gradeMax,t.femaleExclude=i.femaleExclude,t.maleExclude=i.maleExclude,t.rangeExclude=i.rangeExclude,t.meleeExclude=i.meleeExclude,t.airExclude=i.airExclude,t.star1=i.star1,t.star2=i.star2,t.star3=i.star3,this.battlePoolMap[t.kindNum]=t}
+ }
+ setSeasonSetData(t){
+ if(this.seasonSetMap={
+ }
+ ,t)for(const i of t){
+ const t=new _6;
+ t.kindNum=i.kindNum,t.battleIDs=i.battleIDs,this.seasonSetMap[t.kindNum]=t}
+ }
+ setRewardData(t){
+ if(this.rewardMap={
+ }
+ ,t)for(const i of t){
+ const t=new E6;
+ t.floor=i.floor,t.gem1=i.gem1,t.gem2=i.gem2,t.gem3=i.gem3,t.honor1=i.honor1,t.honor2=i.honor2,t.honor3=i.honor3,this.rewardMap[t.floor]=t}
+ }
+ setData(t){
+ for(this.seasonSetKindNum=t.seasonSetKindNum,this.seasonNumber=t.seasonNumber||0,this.seasonEndTime=t.seasonEndTime?new Date(t.seasonEndTime).getTime():0,this.currentFloor=t.currentFloor,this.floorStars=t.floorStars||[];
+ this.floorStars.length<30;
+ )this.floorStars.push(0);
+ this.ticket=t.ticket,this.maxTicket=t.maxTicket,this.ticketTime=new Date(t.ticketTime).getTime()+1e3,this.currentBattleFloor=t.currentBattleFloor}
+ getFloorList(){
+ const t=this.seasonSetMap[this.seasonSetKindNum];
+ if(!t)return[];
+ const i=t.battleIDs.split("|").map(Number),s=[],e=Math.min(this.currentFloor+1,30);
+ for(let n=0;
+ n<e;
+ n++){
+ const t=this.battlePoolMap[i[n]];
+ if(!t)continue;
+ const e=new S6;
+ e.floor=n+1,e.stars=this.floorStars[n]||0,e.battleVO=t,e.reward=this.rewardMap[n+1],e.isCleared=this.floorStars[n]>0,e.isNext=n+1===this.currentFloor+1,s.push(e)}
+ return s}
+ getFloorListReversed(){
+ return this.getFloorList().reverse()}
+ getBattlePool(t){
+ return this.battlePoolMap[t]}
+ buildFloorVO(t){
+ if(t<1||t>30)return null;
+ const i=this.seasonSetMap[this.seasonSetKindNum];
+ if(!i)return null;
+ const s=i.battleIDs.split("|").map(Number),e=t-1;
+ if(e>=s.length)return null;
+ const n=this.battlePoolMap[s[e]];
+ if(!n)return null;
+ const h=new S6;
+ return h.floor=t,h.stars=this.floorStars[e]||0,h.battleVO=n,h.reward=this.rewardMap[t],h.isCleared=this.floorStars[e]>0,h.isNext=t===this.currentFloor+1,h}
+ getReward(t){
+ return this.rewardMap[t]}
+ }
+ ;
+ Kt(m6,"TowerDataManager"),zt(m6,"instance");
+ let w6=m6;
+ const v6=class{
+ constructor(){
+ zt(this,"kindNum",0),zt(this,"difficulty",0),zt(this,"enemyKindNums",""),zt(this,"enemyTrans",""),zt(this,"enemyShields",""),zt(this,"enemyLevels",""),zt(this,"tribes","0"),zt(this,"gradeMax",0),zt(this,"femaleExclude","N"),zt(this,"maleExclude","N"),zt(this,"rangeExclude","N"),zt(this,"meleeExclude","N"),zt(this,"airExclude","N"),zt(this,"star1",0),zt(this,"star2",0),zt(this,"star3",0)}
+ static parseEnemies(t){
+ const i=new Array(20).fill(null);
+ if(!t||!t.enemyKindNums)return i;
+ const s=String(t.enemyKindNums).split("|"),e=Math.min(s.length,20);
+ for(let n=0;
+ n<e;
+ n++){
+ const t=s[n].trim();
+ if(!t||"0"===t)continue;
+ const e=t.indexOf("-"),h=e>=0?t.substring(0,e):t,r=e>=0?t.substring(e+1):"0",o=Number(h);
+ o>0&&(i[n]={
+ kindNum:o,trans:Number(r)||0}
+ )}
+ return i}
+ static stringifyEnemies(t,i){
+ let s=-1;
+ for(let n=19;
+ n>=0;
+ n--)if((t[n]??-1)>0){
+ s=n;
+ break}
+ if(s<0)return"";
+ const e=[];
+ for(let n=0;
+ n<=s;
+ n++){
+ const s=t[n]??-1;
+ s<=0?e.push("0"):e.push(`${
+ s}
+ -${
+ i[n]??0}
+ `)}
+ return e.join("|")}
+ }
+ ;
+ Kt(v6,"TowerBattlePoolVO");
+ let b6=v6;
+ const y6=class{
+ constructor(){
+ zt(this,"kindNum",0),zt(this,"battleIDs","")}
+ }
+ ;
+ Kt(y6,"TowerSeasonSetVO");
+ let _6=y6;
+ const M6=class{
+ constructor(){
+ zt(this,"floor",0),zt(this,"gem1",0),zt(this,"gem2",0),zt(this,"gem3",0),zt(this,"honor1",0),zt(this,"honor2",0),zt(this,"honor3",0)}
+ }
+ ;
+ Kt(M6,"TowerRewardVO");
+ let E6=M6;
+ const A6=class{
+ constructor(){
+ zt(this,"floor",0),zt(this,"stars",0),zt(this,"battleVO"),zt(this,"reward"),zt(this,"isCleared",!1),zt(this,"isNext",!1)}
+ }
+ ;
+ Kt(A6,"TowerFloorVO");
+ let S6=A6;
+ const T6=class t{
+ constructor(){
+ zt(this,"lastFetchTime",0),zt(this,"hasData",!1),zt(this,"dungeonRechargeMs",0),zt(this,"towerRechargeMs",0),zt(this,"towerSnapshot",null),zt(this,"pvpSnapshot",null),zt(this,"dailyRankingSnapshot",null)}
+ static getInstance(){
+ return this.instance||(this.instance=new t),this.instance}
+ setSummary(t){
+ if(t){
+ if(this.hasData=!0,this.lastFetchTime=ix.time,t.dungeon){
+ this.dungeonRechargeMs=t.dungeon.ticketRechargeMs??0;
+ const i=Rx.getInstance();
+ i.ticket=t.dungeon.ticket??i.ticket,i.maxTicket=t.dungeon.maxTicket??i.maxTicket,t.dungeon.ticketTime&&(i.ticketTime=new Date(t.dungeon.ticketTime).getTime()+1e3)}
+ if(t.tower){
+ this.towerRechargeMs=t.tower.ticketRechargeMs??0;
+ const i=w6.getInstance();
+ i.seasonNumber>0&&(i.ticket=t.tower.ticket??i.ticket,i.maxTicket=t.tower.maxTicket??i.maxTicket,t.tower.ticketTime&&(i.ticketTime=new Date(t.tower.ticketTime).getTime()+1e3),void 0!==t.tower.currentFloor&&(i.currentFloor=t.tower.currentFloor),void 0!==t.tower.seasonNumber&&(i.seasonNumber=t.tower.seasonNumber),t.tower.seasonEndTime&&(i.seasonEndTime=new Date(t.tower.seasonEndTime).getTime())),this.towerSnapshot={
+ seasonNumber:t.tower.seasonNumber??0,seasonEndTime:t.tower.seasonEndTime?new Date(t.tower.seasonEndTime).getTime():0,currentFloor:t.tower.currentFloor??0,ticket:t.tower.ticket??0,maxTicket:t.tower.maxTicket??0,ticketTime:t.tower.ticketTime?new Date(t.tower.ticketTime).getTime():0}
+ }
+ this.pvpSnapshot=t.pvp??null,this.dailyRankingSnapshot=t.dailyRanking??null}
+ }
+ has(){
+ return this.hasData}
+ isStale(t){
+ return!this.hasData||ix.time-this.lastFetchTime>=t}
+ getDungeon(){
+ if(!this.hasData)return null;
+ const t=Rx.getInstance();
+ return{
+ ticket:t.ticket,maxTicket:t.maxTicket,ticketTime:t.ticketTime,ticketRechargeMs:this.dungeonRechargeMs}
+ }
+ getTower(){
+ if(!this.hasData)return null;
+ const t=w6.getInstance();
+ return t.seasonNumber>0?{
+ seasonNumber:t.seasonNumber,seasonEndTime:t.seasonEndTime,currentFloor:t.currentFloor,ticket:t.ticket,maxTicket:t.maxTicket,ticketTime:t.ticketTime,ticketRechargeMs:this.towerRechargeMs}
+ :this.towerSnapshot?{
+ ...this.towerSnapshot,ticketRechargeMs:this.towerRechargeMs}
+ :null}
+ getPvp(){
+ return this.pvpSnapshot}
+ updatePvpTicket(t,i){
+ this.pvpSnapshot&&(this.pvpSnapshot.ticket=t,void 0!==i&&(this.pvpSnapshot.ticketTime=i))}
+ getDailyRanking(){
+ return this.dailyRankingSnapshot}
+ updateDailyRanking(t,i){
+ this.dailyRankingSnapshot?(this.dailyRankingSnapshot.joined=t,this.dailyRankingSnapshot.score=i):this.dailyRankingSnapshot={
+ joined:t,score:i,date:""}
+ }
+ invalidate(){
+ this.lastFetchTime=0}
+ }
+ ;
+ Kt(T6,"BattleSummaryManager"),zt(T6,"instance");
+ let C6=T6;
+ const k6=class extends Be{
+ constructor(){
+ super()}
+ get className(){
+ return""}
+ updateLanguage(){
+ }
+ }
+ ;
+ Kt(k6,"BaseSubView");
+ let O6=k6;
+ const I6=class extends Be{
+ constructor(){
+ super(),zt(this,"container",new Be),zt(this,"_currentSubView",null),this.addChild(this.container)}
+ get currentSubView(){
+ return this._currentSubView}
+ set currentSubView(t){
+ this._currentSubView!==t&&(null!=this._currentSubView&&this.removeChild(this._currentSubView),this._currentSubView=t,null!=this._currentSubView&&(this.addChild(this._currentSubView),this._currentSubView.x=0))}
+ get className(){
+ return""}
+ updateLanguage(){
+ this._currentSubView&&this._currentSubView.updateLanguage()}
+ }
+ ;
+ Kt(I6,"BaseView");
+ let x6=I6;
+ const N6=class t extends x6{
+ static getInstance(){
+ return null==this.instance&&(this.instance=new t),this.instance}
+ constructor(){
+ super(),this.currentSubView=Ght.getInstance()}
+ setData(){
+ Ght.getInstance().setData(),this.currentSubView=Ght.getInstance()}
+ get className(){
+ return"BattleView"}
+ }
+ ;
+ Kt(N6,"BattleView"),zt(N6,"instance");
CapacitorCookiesPluginWeb 1 hunks, 517 statements
- Kt(qV,"BaseSubMenu");
+ Kt(DK,"CapacitorCookiesPluginWeb");
+ let LK=DK;
+ IK("CapacitorCookies",{
+ web:Kt(()=>new LK,"web")}
+ );
+ const GK=Kt(async t=>new Promise((i,s)=>{
+ const e=new FileReader;
+ e.onload=()=>{
+ const t=e.result;
+ i(t.indexOf(",")>=0?t.split(",")[1]:t)}
+ ,e.onerror=t=>s(t),e.readAsDataURL(t)}
+ ),"readBlobAsBase64"),BK=Kt((t={
+ }
+ )=>{
+ const i=Object.keys(t);
+ return Object.keys(t).map(t=>t.toLocaleLowerCase()).reduce((s,e,n)=>(s[e]=t[i[n]],s),{
+ }
+ )}
+ ,"normalizeHttpHeaders"),UK=Kt((t,i=!0)=>t?Object.entries(t).reduce((t,s)=>{
+ const[e,n]=s;
+ let h,r;
+ return Array.isArray(n)?(r="",n.forEach(t=>{
+ h=i?encodeURIComponent(t):t,r+=`${
+ e}
+ =${
+ h}
+ &`}
+ ),r.slice(0,-1)):(h=i?encodeURIComponent(n):n,r=`${
+ e}
+ =${
+ h}
+ `),`${
+ t}
+ &${
+ r}
+ `}
+ ,"").substr(1):null,"buildUrlParams"),FK=Kt((t,i={
+ }
+ )=>{
+ const s=Object.assign({
+ method:t.method||"GET",headers:t.headers}
+ ,i),e=BK(t.headers)["content-type"]||"";
+ if("string"==typeof t.data)s.body=t.data;
+ else if(e.includes("application/x-www-form-urlencoded")){
+ const i=new URLSearchParams;
+ for(const[s,e]of Object.entries(t.data||{
+ }
+ ))i.set(s,e);
+ s.body=i.toString()}
+ else if(e.includes("multipart/form-data")||t.data instanceof FormData){
+ const i=new FormData;
+ if(t.data instanceof FormData)t.data.forEach((t,s)=>{
+ i.append(s,t)}
+ );
+ else for(const s of Object.keys(t.data))i.append(s,t.data[s]);
+ s.body=i;
+ const e=new Headers(s.headers);
+ e.delete("content-type"),s.headers=e}
+ else(e.includes("application/json")||"object"==typeof t.data)&&(s.body=JSON.stringify(t.data));
+ return s}
+ ,"buildRequestInit"),HK=class extends NK{
+ async request(t){
+ const i=FK(t,t.webFetchExtra),s=UK(t.params,t.shouldEncodeUrlParams),e=s?`${
+ t.url}
+ ?${
+ s}
+ `:t.url,n=await fetch(e,i),h=n.headers.get("content-type")||"";
+ let r,o,{
+ responseType:a="text"}
+ =n.ok?t:{
+ }
+ ;
+ switch(h.includes("application/json")&&(a="json"),a){
+ case"arraybuffer":case"blob":o=await n.blob(),r=await GK(o);
+ break;
+ case"json":r=await n.json();
+ break;
+ default:r=await n.text()}
+ const c={
+ }
+ ;
+ return n.headers.forEach((t,i)=>{
+ c[i]=t}
+ ),{
+ data:r,headers:c,status:n.status,url:n.url}
+ }
+ async get(t){
+ return this.request(Object.assign(Object.assign({
+ }
+ ,t),{
+ method:"GET"}
+ ))}
+ async post(t){
+ return this.request(Object.assign(Object.assign({
+ }
+ ,t),{
+ method:"POST"}
+ ))}
+ async put(t){
+ return this.request(Object.assign(Object.assign({
+ }
+ ,t),{
+ method:"PUT"}
+ ))}
+ async patch(t){
+ return this.request(Object.assign(Object.assign({
+ }
+ ,t),{
+ method:"PATCH"}
+ ))}
+ async delete(t){
+ return this.request(Object.assign(Object.assign({
+ }
+ ,t),{
+ method:"DELETE"}
+ ))}
+ }
+ ;
+ Kt(HK,"CapacitorHttpPluginWeb");
+ let WK=HK;
+ var jK,$K,VK,KK;
+ IK("CapacitorHttp",{
+ web:Kt(()=>new WK,"web")}
+ ),($K=jK||(jK={
+ }
+ )).Dark="DARK",$K.Light="LIGHT",$K.Default="DEFAULT",(KK=VK||(VK={
+ }
+ )).StatusBar="StatusBar",KK.NavigationBar="NavigationBar";
+ const zK=class extends NK{
+ async setStyle(){
+ this.unavailable("not available for web")}
+ async setAnimation(){
+ this.unavailable("not available for web")}
+ async show(){
+ this.unavailable("not available for web")}
+ async hide(){
+ this.unavailable("not available for web")}
+ }
+ ;
+ Kt(zK,"SystemBarsPluginWeb");
+ let qK=zK;
+ IK("SystemBars",{
+ web:Kt(()=>new qK,"web")}
+ );
+ const XK=Object.freeze(Object.defineProperty({
+ __proto__:null,Capacitor:OK,CapacitorException:TK,get ExceptionCode(){
+ return MK}
+ ,get SystemBarType(){
+ return VK}
+ ,get SystemBarsStyle(){
+ return jK}
+ ,WebPlugin:NK,buildRequestInit:FK,registerPlugin:IK}
+ ,Symbol.toStringTag,{
+ value:"Module"}
+ )),YK=IK("PlayAgeSignals"),JK=class t{
+ constructor(){
+ zt(this,"ageLower",-1),zt(this,"ageUpper",-1),zt(this,"userStatus",null),zt(this,"ageRangeResult",null),zt(this,"errorMessage",null),zt(this,"requestAgeRangeCallback",null)}
+ static getInstance(){
+ return t.instance||(t.instance=new t),t.instance}
+ async requestAgeRange(t){
+ this.requestAgeRangeCallback=t,this.ageLower=-1,this.ageUpper=-1,this.ageRangeResult=null;
+ try{
+ const t=await YK.check();
+ if(this.ageRangeResult=t,this.debug("Play Age Signals API - success"),this.debug(t),this.addExtras("_requestAgeRange_result",JSON.stringify(t)),1==t.status){
+ const i=parseInt(String(t.ageLower));
+ 0==isNaN(i)&&(this.ageLower=i);
+ const s=parseInt(String(t.ageUpper));
+ 0==isNaN(s)&&(this.ageUpper=s),null==t.userStatus?this.userStatus=AK.VERIFIED:""==t.userStatus?this.userStatus=AK.UNKNOWN:this.userStatus=t.userStatus,this.onRequestAgeRangeCallback(!0)}
+ else t.errorMessage.toLowerCase().includes("not yet implemented")?(this.userStatus=AK.VERIFIED,this.errorMessage=null,this.onRequestAgeRangeCallback(!0)):(this.userStatus=AK.UNKNOWN,this.errorMessage=this.getMessageFromErrorCode(t.errorCode,t.errorMessage),this.onRequestAgeRangeCallback(!1))}
+ catch(i){
+ this.debug("Play Age Signals API - fail"),this.debug(i),this.addExtras("_requestAgeRange_error",JSON.stringify(i)),this.onRequestAgeRangeCallback(!1)}
+ }
+ checkApproved(t){
+ return this.debug(""),this.debug("AgeRangeObjectAOS, checkApproved()"),this.debug(" -> this.userStatus : "+this.userStatus),this.debug(" -> this.ageUpper : "+this.ageUpper),this.debug(" -> ageUpperLimit : "+t),this.addExtras("_checkApproved_userStatus",""+this.userStatus),this.addExtras("_checkApproved_ageUpper",""+this.ageUpper),this.addExtras("_checkApproved_ageUpperLimit",""+t),null==this.userStatus?{
+ approved:!1,errorMessage:AG.getText("AGE_RANGE_3","현재 사용 중인 기기 또는 OS 환경에서는 연령 정보를 확인할 수 없어, 일부 기능이 ‘안전 모드’로 제한됩니다.")+" (N)"}
+ :this.userStatus==AK.UNKNOWN?{
+ approved:!1,errorMessage:AG.getText("AGE_RANGE_3","현재 사용 중인 기기 또는 OS 환경에서는 연령 정보를 확인할 수 없어, 일부 기능이 ‘안전 모드’로 제한됩니다.")+" (U)"}
+ :this.userStatus==AK.VERIFIED||this.userStatus!=AK.SUPERVISED_APPROVAL_DENIED&&this.userStatus!=AK.SUPERVISED_APPROVAL_PENDING||this.ageUpper>t?{
+ approved:!0,errorMessage:""}
+ :{
+ approved:!1,errorMessage:AG.getText("AGE_RANGE_23","이 기능은 보호자 승인 전까지 이용할 수 없습니다.")}
+ }
+ async isEligibleForAgeFeatures(){
+ return null}
+ getMessageFromErrorCode(t,i){
+ let s=AG.getText("AGE_RANGE_3","현재 사용 중인 기기 또는 OS 환경에서는 연령 정보를 확인할 수 없어, 일부 기능이 ‘안전 모드’로 제한됩니다.");
+ switch(t){
+ case"API_NOT_AVAILABLE":s=AG.getText("AGE_RANGE_3","현재 사용 중인 기기 또는 OS 환경에서는 연령 정보를 확인할 수 없어, 일부 기능이 ‘안전 모드’로 제한됩니다.")+" (NA)";
+ break;
+ case"PLAY_STORE_NOT_FOUND":s=AG.getText("AGE_RANGE_14","이 기기에서 Play 스토어를 찾을 수 없습니다. 설치 또는 활성화 후 다시 시도해 주세요.");
+ break;
+ case"NETWORK_ERROR":s=AG.getText("AGE_RANGE_15","네트워크 연결에 문제가 있습니다. 인터넷 상태를 확인해 주세요.");
+ break;
+ case"PLAY_SERVICES_NOT_FOUND":s=AG.getText("AGE_RANGE_16","Google Play 서비스가 없거나 사용할 수 없습니다. 설치 및 활성화 여부를 확인해 주세요.");
+ break;
+ case"CANNOT_BIND_TO_SERVICE":s=AG.getText("AGE_RANGE_17","Play 스토어 서비스에 연결할 수 없습니다. Play 스토어 앱 업데이트 후 다시 시도해 주세요.");
+ break;
+ case"PLAY_STORE_VERSION_OUTDATED":s=AG.getText("AGE_RANGE_18","Play 스토어 앱 버전이 오래되었습니다. 최신 버전으로 업데이트해 주세요.");
+ break;
+ case"PLAY_SERVICES_VERSION_OUTDATED":s=AG.getText("AGE_RANGE_19","Google Play 서비스 버전이 오래되었거나 지원되지 않습니다. 업데이트해 주세요.");
+ break;
+ case"CLIENT_TRANSIENT_ERROR":s=AG.getText("AGE_RANGE_20","일시적인 오류가 발생했습니다. 잠시 후 다시 시도해 주세요.");
+ break;
+ case"APP_NOT_OWNED":s=AG.getText("AGE_RANGE_21","이 앱은 Google Play에서 설치되지 않았습니다. Google Play에서 정식 버전을 설치해 주세요.");
+ break;
+ case"INTERNAL_ERROR":s=AG.getText("AGE_RANGE_22","알 수 없는 오류가 발생했습니다.(IE) 다시 시도해 주세요. 계속 발생한다면 고객센터에 문의해 주세요.");
+ break;
+ case"SDK_VERSION_OUTDATED":s=AG.getText("AGE_RANGE_22","알 수 없는 오류가 발생했습니다.(SVO) 다시 시도해 주세요. 계속 발생한다면 고객센터에 문의해 주세요.")}
+ return TL.getInstance().development&&(s+="\n"+i),s}
+ onRequestAgeRangeCallback(t){
+ const i=this.requestAgeRangeCallback;
+ this.requestAgeRangeCallback=null,i&&i(t)}
+ addExtras(t,i){
+ wP.addExtraParams(t,i)}
+ debug(t){
+ TL.getInstance().development}
+ }
+ ;
+ Kt(JK,"AgeRangeObjectAOS"),zt(JK,"instance");
+ let QK=JK;
+ const ZK=IK("DeclaredAgeRangePlugin"),tz=class t{
+ constructor(){
+ zt(this,"ageLower",-1),zt(this,"ageUpper",-1),zt(this,"userStatus",null),zt(this,"ageRangeResult",null),zt(this,"errorMessage",null),zt(this,"requestAgeRangeCallback",null)}
+ static getInstance(){
+ return t.instance||(t.instance=new t),t.instance}
+ async requestAgeRange(t){
+ this.requestAgeRangeCallback=t,this.ageRangeResult=null,this.ageLower=-1,this.ageUpper=-1;
+ let i=!0;
+ const s=EL.getInstance().getClientData("AGE_RANGE_IGNORE_ELIGIBLE_IOS");
+ if(s&&"Y"==s&&(i=!1),i)try{
+ const t=await ZK.isEligibleForAgeFeatures();
+ if(this.debug("Declared Age Range API / isEligibleForAgeFeatures - success"),this.debug(t),this.addExtras("_isEligibleForAgeFeatures_result",JSON.stringify(t)),t&&"status"in t&&"eligible"in t&&1==t.status&&0==t.eligible)return this.userStatus=AK.VERIFIED,void this.onRequestAgeRangeCallback(!0)}
+ catch(e){
+ this.debug("Declared Age Range API / isEligibleForAgeFeatures - error"),this.debug(JSON.stringify(e)),this.addExtras("_isEligibleForAgeFeatures_error",JSON.stringify(e))}
+ try{
+ let t=[13,16,18],i=EL.getInstance().getClientData("AGE_RANGE_AGE_GATE_IOS");
+ i&&(t=ZI.convertToNumber(i.split("|")));
+ const s=await ZK.requestAgeRange({
+ ageGates:t}
+ );
+ if(this.ageRangeResult=s,this.debug("Declared Age Range API / requestAgeRange - success"),this.debug(s),this.addExtras("_requestAgeRange_result",JSON.stringify(s)),1==s.status){
+ const t=parseInt(String(s.lowerBound));
+ 0==isNaN(t)&&(this.ageLower=t);
+ const i=parseInt(String(s.upperBound));
+ 0==isNaN(i)&&(this.ageUpper=i),null==s.userStatus||""==s.userStatus?this.userStatus=AK.UNKNOWN:this.userStatus=s.userStatus.toUpperCase(),this.onRequestAgeRangeCallback(!0)}
+ else s.errorMessage.toLowerCase().includes("not yet implemented")?(this.userStatus=AK.VERIFIED,this.errorMessage=null,this.onRequestAgeRangeCallback(!0)):(this.userStatus=AK.UNKNOWN,this.errorMessage=this.getMessageFromErrorCode(s.errorCode,s.errorMessage),this.onRequestAgeRangeCallback(!1))}
+ catch(e){
+ this.debug("Declared Age Range API / requestAgeRange - error"),this.debug(e),this.addExtras("_requestAgeRange_error",JSON.stringify(e)),this.onRequestAgeRangeCallback(!1)}
+ }
+ checkApproved(t){
+ return this.debug(""),this.debug("AgeRangeObjectIOS, checkApproved()"),this.debug(" -> this.userStatus : "+this.userStatus),this.debug(" -> this.ageUpper : "+this.ageUpper),this.debug(" -> ageUpperLimit : "+t),this.addExtras("_checkApproved_userStatus",""+this.userStatus),this.addExtras("_checkApproved_ageUpper",""+this.ageUpper),this.addExtras("_checkApproved_ageUpperLimit",""+t),null==this.userStatus?{
+ approved:!1,errorMessage:AG.getText("AGE_RANGE_3","현재 사용 중인 기기 또는 OS 환경에서는 연령 정보를 확인할 수 없어, 일부 기능이 ‘안전 모드’로 제한됩니다.")+" (N)"}
+ :this.userStatus==AK.UNKNOWN?{
+ approved:!1,errorMessage:AG.getText("AGE_RANGE_3","현재 사용 중인 기기 또는 OS 환경에서는 연령 정보를 확인할 수 없어, 일부 기능이 ‘안전 모드’로 제한됩니다.")+" (U)"}
+ :this.userStatus==AK.UNSUPPORTED?{
+ approved:!1,errorMessage:AG.getText("AGE_RANGE_3","현재 사용 중인 기기 또는 OS 환경에서는 연령 정보를 확인할 수 없어, 일부 기능이 ‘안전 모드’로 제한됩니다.")+" (U2)"}
+ :this.userStatus==AK.VERIFIED?{
+ approved:!0,errorMessage:""}
+ :this.userStatus==AK.DECLINED?{
+ approved:!1,errorMessage:AG.getText("AGE_RANGE_9","연령 정보 제공에 동의하지 않아 일부 기능이 제한됩니다.")}
+ :this.ageUpper>t?{
+ approved:!0,errorMessage:""}
+ :{
+ approved:!1,errorMessage:AG.getText("AGE_RANGE_6","연령 기준에 따라 이 기능의 이용이 제한됩니다.")}
+ }
+ async isEligibleForAgeFeatures(){
+ this.debug(""),this.debug("AgeRangeObjectIOS, isEligibleForAgeFeatures()");
+ try{
+ const t=await ZK.isEligibleForAgeFeatures();
+ return this.debug("AgeRangeObjectIOS, isEligibleForAgeFeatures() - success"),this.debug(t),t}
+ catch(t){
+ this.debug("AgeRangeObjectIOS, isEligibleForAgeFeatures() - error"),this.debug(t)}
+ return null}
+ getMessageFromErrorCode(t,i){
+ let s=AG.getText("AGE_RANGE_3","현재 사용 중인 기기 또는 OS 환경에서는 연령 정보를 확인할 수 없어, 일부 기능이 ‘안전 모드’로 제한됩니다.");
+ return"NOT_AVAILABLE"===t&&(s=AG.getText("AGE_RANGE_3","현재 사용 중인 기기 또는 OS 환경에서는 연령 정보를 확인할 수 없어, 일부 기능이 ‘안전 모드’로 제한됩니다.")+" (NA)"),TL.getInstance().development&&(s+="\n"+i),s}
+ onRequestAgeRangeCallback(t){
+ const i=this.requestAgeRangeCallback;
+ this.requestAgeRangeCallback=null,i&&i(t)}
+ addExtras(t,i){
+ wP.addExtraParams(t,i)}
+ debug(t){
+ TL.getInstance().development}
+ }
+ ;
+ Kt(tz,"AgeRangeObjectIOS"),zt(tz,"instance");
+ let iz=tz;
+ const sz=class t{
+ constructor(){
+ zt(this,"_activated",!0),zt(this,"_ageRangeYn","Y"),zt(this,"_ageRangeStartDate",null),zt(this,"_ageUpperLimit",15)}
+ static getInstance(){
+ return this._instance||(this._instance=new t),this._instance}
+ get activated(){
+ return this._activated}
+ setConfig(t){
+ this.debug(""),this.debug("AgeRangeManager, setConfig()"),this.debug(t);
+ const i=EL.getInstance();
+ if("capacitor"!=i.envPlatform)return void(this._activated=!1);
+ if(!t)return;
+ if(this.debug(t),i.isGoogleClientKr()){
+ if("AGE_RANGE_YN_AOS_KR"in t&&(this._ageRangeYn=t.AGE_RANGE_YN_AOS_KR,"N"==this._ageRangeYn))return void(this._activated=!1)}
+ else if(i.isGoogleClient()){
+ if("AGE_RANGE_YN_AOS_GB"in t&&(this._ageRangeYn=t.AGE_RANGE_YN_AOS_GB,"N"==this._ageRangeYn))return void(this._activated=!1)}
+ else if(i.isAppleClientKr()){
+ if("AGE_RANGE_YN_IOS_KR"in t&&(this._ageRangeYn=t.AGE_RANGE_YN_IOS_KR,"N"==this._ageRangeYn))return void(this._activated=!1)}
+ else if(i.isAppleClient()&&"AGE_RANGE_YN_IOS_GB"in t&&(this._ageRangeYn=t.AGE_RANGE_YN_IOS_GB,"N"==this._ageRangeYn))return void(this._activated=!1);
+ let s="2026-03-01T00:00:00.000Z";
+ i.isGoogleClientKr()||i.isAppleClientKr()?"AGE_RANGE_START_DATE_KR"in t&&(s=t.AGE_RANGE_START_DATE_KR):"AGE_RANGE_START_DATE_GB"in t&&(s=t.AGE_RANGE_START_DATE_GB);
+ try{
+ this._ageRangeStartDate=new Date(s),gP.serverTime<this._ageRangeStartDate.getTime()?this._activated=!1:this._activated=!0}
+ catch(n){
+ this._activated=!1}
+ let e=15;
+ "AGE_RANGE_UPPER_LIMIT"in t&&(e=parseInt(t.AGE_RANGE_UPPER_LIMIT),isNaN(e)&&(e=15)),this._ageUpperLimit=e}
+ updateConfig(){
+ this.debug(""),this.debug("AgeRangeManager, updateConfig()"),this.debug(" -> this._ageRangeStartDate : "+this._ageRangeStartDate),this.debug(" -> 1 > this._activated : "+this._activated),this.debug(" -> UserInfoManager.regDate : "+_L.regTime),null!=this._ageRangeStartDate&&(this._activated&&new Date(_L.regTime).getTime()<this._ageRangeStartDate.getTime()&&(this._activated=!1),this.debug(" -> 2 > this._activated : "+this._activated),this.debug(""))}
+ getObject(){
+ const t=EL.getInstance();
+ return t.isAppleClientKr()||t.isAppleClient()?iz.getInstance():t.isGoogleClientKr()||t.isGoogleClient()?QK.getInstance():null}
+ checkApproved(){
+ if(this.debug(""),this.debug("AgeRangeManager, checkApproved()"),this.debug(" -> this._activated : "+this._activated),this.debug(" -> this._ageRangeYn : "+this._ageRangeYn),this.debug(" -> this._ageRangeStartDate : "+this._ageRangeStartDate),this.debug(" -> this._ageUpperLimit : "+this._ageUpperLimit),this.debug(""),0==this._activated)return{
+ approved:!0,errorMessage:""}
+ ;
+ const t=this.getObject();
+ return t?t.checkApproved(this._ageUpperLimit):{
+ approved:!0,errorMessage:""}
+ }
+ requestAgeRange(t){
+ if(this.debug(""),this.debug("AgeRangeManager, requestAgeRange()"),this.debug(" -> this._activated : "+this._activated),0==this._activated)return this.debug("AgeRangeManager, requestAgeRange() - 1"),void(null!=t&&t(!1));
+ const i=this.getObject();
+ i?(this.debug("AgeRangeManager, requestAgeRange() - 2"),i.requestAgeRange(t)):(this.debug("AgeRangeManager, requestAgeRange() - 3"),null!=t&&t(!1))}
+ async isEligibleForAgeFeatures(){
+ if(this.debug(""),this.debug("AgeRangeManager, isEligibleForAgeFeatures()"),this.debug(" -> this._activated : "+this._activated),0==this._activated)return this.debug("AgeRangeManager, isEligibleForAgeFeatures() - 1"),null;
+ const t=this.getObject();
+ return t?(this.debug("AgeRangeManager, isEligibleForAgeFeatures() - 2"),await t.isEligibleForAgeFeatures()):(this.debug("AgeRangeManager, isEligibleForAgeFeatures() - 3"),null)}
+ debug(t){
+ TL.getInstance().development}
+ }
+ ;
+ Kt(sz,"AgeRangeManager"),zt(sz,"_instance");
+ let ez=sz;
+ const nz=class t extends iP{
+ static getInstance(){
+ return this._instance||(this._instance=new t),this._instance}
+ constructor(){
+ super(),this.sp.x=.5*-this.sp.width,this.sp.y=.5*-this.sp.height}
+ getTextures(){
+ return ZA.getTextures("Loading","loading_circle_elf_60f_")}
+ }
+ ;
+ Kt(nz,"PaymentLoadingEffect2"),zt(nz,"_instance");
+ let hz=nz;
+ const rz=class t extends aG{
+ constructor(){
+ super(),zt(this,"lblMessage",new YD("",aD.DEFAULT_COLOR,aD.DEFAULT_OUTLINE_FONT_OPTION_17)),zt(this,"btnConfirm",new sG("확인")),zt(this,"onConfirm",null),this.title="",this.lblMessage.y=90,this.contentContainer.addChild(this.lblMessage,this.btnConfirm);
+ let t=this.lblMessage.getStyle();
+ t.align="center",this.lblMessage.setStyle(t),aD.setLabelWrapWidth(this.lblMessage,500),this.btnConfirm.onClick=this.onConfirmClick.bind(this)}
+ static getInstance(){
+ return this._instance||(this._instance=new t),this._instance}
+ onConfirmClick(){
+ this.hide();
+ let t=this.onConfirm;
+ this.onConfirm=null,null!==t&&t()}
+ show(t,i=null){
+ this.onConfirm=i,this.lblMessage.text=t,this.btnConfirm.text=AG.getText("COMMON_1","확인"),this.updateLayout(),super.show()}
+ hide(){
+ super.hide(),this.title="",this.btnClose.visible=!0}
+ updateLayout(){
+ this.lblMessage.x=.5*(this.width-this.lblMessage.width),this.btnConfirm.x=.5*(this.width-this.btnConfirm.width),this.btnConfirm.y=this.lblMessage.y+this.lblMessage.height+30,this.height=this.btnConfirm.y+this.btnConfirm.height+40}
+ getDefaultPositionY(){
+ return.3*KA.stageHeight}
+ hideCloseBtn(){
+ this.btnClose.visible=!1}
+ onBackButton(){
+ return this.onConfirmClick(),!0}
+ }
+ ;
+ Kt(rz,"CommonMessagePopup"),zt(rz,"_instance");
+ let oz=rz;
+ const az=class t{
+ constructor(){
+ zt(this,"_productId",-1)}
+ static getInstance(){
+ return t.instance||(t.instance=new t),t.instance}
+ get productId(){
+ return this._productId}
+ async buyProduct(t){
+ const i=hK.getInstance().getByProductId(t);
+ if(!i)return;
+ let s="",e="";
+ const n=_L.currentServer,h=EL.getInstance();
+ if(h.isGoogleClient()||h.isAppleClient()?2==n&&(s=AG.getText("COMMON_546","[오늘도 환생 2] 국내 버전에서 결제를 이용해 주세요."),e=h.isGoogleClient()?h.getGoogleKrLink():h.getAppleKrLink()):(h.isGoogleClientKr()||h.isAppleClientKr())&&3==n&&(s=AG.getText("COMMON_545","[Endless Frontier 2] 글로벌 버전에서 결제를 이용해 주세요."),e=h.isGoogleClientKr()?h.getGoogleGbLink():h.getAppleGbLink()),s){
+ const t=oz.getInstance();
+ return t.hideCloseBtn(),void t.show(s,()=>{
+ e&&window.open(e,"_blank")}
+ )}
+ if(i.usdPrice>=90)try{
+ const t=ez.getInstance().checkApproved();
+ if(0==t.approved)return void mG.getInstance().show(t.errorMessage)}
+ catch(r){
+ const t=AG.getText("AGE_RANGE_3","현재 사용 중인 기기 또는 OS 환경에서는 연령 정보를 확인할 수 없어, 일부 기능이 ‘안전 모드’로 제한됩니다.");
+ return void mG.getInstance().show(t)}
+ if(-1==this._productId){
+ hz.getInstance().show(),this._productId=t;
+ try{
+ const s=BL();
+ if(0==s.supportsPurchase())return void(await this.testBuyProduct(t));
+ let e=s.platformType;
+ if("capacitor"==e){
+ const{
+ Capacitor:t}
+ =await Jt(async()=>{
+ const{
+ Capacitor:t}
+ =await Promise.resolve().then(()=>XK);
+ return{
+ Capacitor:t}
+ }
+ ,void 0);
+ "ios"===t.getPlatform()?e="apple":"android"===t.getPlatform()&&(e="google")}
+ const n=hK.getInstance().getStoreProductIdByProductId(this._productId);
+ await hD.getInstance().shop.paymentAttempt(this._productId,e,n);
+ const h="toss"===s.platformType?i.sku:String(i.productId);
+ if(!h)return void this.onPaymentCancel();
+ const o=await s.purchase(h,i.price);
+ if(!o.success)return this.onPaymentCancel(),void("USER_CANCELED"!==o.error&&mG.getInstance().showError(o.error||"결제 실패"));
+ this.trackPurchase(t);
+ const a=this._productId;
+ let c;
+ try{
+ c=structuredClone(i)}
+ catch(r){
+ c=JSON.parse(JSON.stringify(i))}
+ if(this.onPaymentCancel(),o.serverData){
+ const t=o.serverData;
+ _L.setUserInfo(t,!1),UV.getInstance().updateAll(),t.products&&hK.getInstance().setProducts(t.products)}
+ const l=hK.getInstance().getRewardMessage(o.rewardTypes);
+ mG.getInstance().show(l),lS.getInstance().dispatchCustomEvent("PaymentSuccess",{
+ productId:a,productVo:c}
+ );
+ let u=!1;
+ for(const t of c.rewards)"instant"==t.type&&"petTicket"==t.subType&&(u=!0);
+ u&&this.updatePetTicket()}
+ catch(r){
+ this.onPaymentCancel(),mG.getInstance().show((null==r?void 0:r.message)||"결제 오류")}
+ }
+ else mG.getInstance().show(AG.getText("COMMON_112","진행중인 결제가 완료된 후에 시도해 주세요."))}
+ async trackPurchase(t){
+ const i=hK.getInstance().getByProductId(t);
+ if(!i)return;
+ const s=EL.getInstance();
+ if("capacitor"==s.envPlatform){
+ const{
+ appsFlyer:n,withTimeoutAf:h}
+ =await Jt(async()=>{
+ const{
+ appsFlyer:t,withTimeoutAf:i}
+ =await Promise.resolve().then(()=>Woi);
+ return{
+ appsFlyer:t,withTimeoutAf:i}
+ }
+ ,void 0),r=s.getTimeoutMilliSeconds();
+ try{
+ let s=i.usdPrice;
+ 0==s&&(s=hK.getInstance().getUsdPriceByKrwPrice(i.price)),await h(n.trackPurchase(String(t),i.usdPrice,"USD"),"af_in_app_purchase",r)}
+ catch(e){
+ }
+ const{
+ AnalyticsManager:o}
+ =await Jt(async()=>{
+ const{
+ AnalyticsManager:t}
+ =await Promise.resolve().then(()=>qoi);
+ return{
+ AnalyticsManager:t}
+ }
+ ,void 0);
+ o.getInstance().trackPurchase(i.productId,i.usdPrice,"USD")}
+ }
+ async testBuyProduct(t){
+ var i;
+ try{
+ const e=await hD.getInstance().shop.testBuyProduct(t),n=this._productId,h=hK.getInstance().getByProductId(t);
+ let r;
+ try{
+ r=structuredClone(h)}
+ catch(s){
+ r=JSON.parse(JSON.stringify(h))}
+ if(this.onPaymentCancel(),!(null==e?void 0:e.success))return void mG.getInstance().show((null==e?void 0:e.error)||"테스트 구매 실패");
+ e.body&&(_L.setUserInfo(e.body,!1),UV.getInstance().updateAll(),e.body.products&&hK.getInstance().setProducts(e.body.products));
+ const o=hK.getInstance().getRewardMessage(null==(i=e.body)?void 0:i.rewardTypes);
+ mG.getInstance().show(o),lS.getInstance().dispatchCustomEvent("PaymentSuccess",{
+ productId:n,productVo:r}
+ );
+ let a=!1;
+ for(const t of r.rewards)"instant"==t.type&&"petTicket"==t.subType&&(a=!0);
+ a&&this.updatePetTicket()}
+ catch(s){
+ this.onPaymentCancel(),mG.getInstance().show((null==s?void 0:s.message)||"테스트 구매 오류")}
+ }
+ onPaymentCancel(){
+ this._productId=-1,hz.getInstance().hide()}
+ async updatePetTicket(){
+ const{
+ SpiritLandDataManager:t}
+ =await Jt(async()=>{
+ const{
+ SpiritLandDataManager:t}
+ =await Promise.resolve().then(()=>bL);
+ return{
+ SpiritLandDataManager:t}
+ }
+ ,void 0);
+ t.getInstance().isDataLoaded=!1}
+ }
+ ;
+ Kt(az,"InAppPurchaseManager"),zt(az,"instance");
MailVO 1 hunks, 409 statements
- const Z2=Object.freeze(Object.defineProperty({
- __proto__:null,ShopDataManager:Q2}
- ,Symbol.toStringTag,{
- value:"Module"}
- )),t5=class{
+ var _3=(t=>(t.GAME="GAME",t.PAYMENT="PAYMENT",t))(_3||{
+ }
+ );
+ const M3=class{
+ constructor(){
+ zt(this,"index",-1),zt(this,"id"),zt(this,"gameId"),zt(this,"title"),zt(this,"content"),zt(this,"rewards"),zt(this,"receivedAt"),zt(this,"createdAt"),zt(this,"mailType"),zt(this,"typeArray"),zt(this,"subTypeArray"),zt(this,"amountArray"),zt(this,"gradeArray"),zt(this,"kindNumArray"),this.index=-1,this.id=-1,this.gameId="",this.title="",this.content="",this.rewards=[],this.createdAt=null,this.receivedAt=null,this.mailType="",this.typeArray=[],this.subTypeArray=[],this.amountArray=[],this.gradeArray=[],this.kindNumArray=[]}
+ setData(t,i){
+ t&&(this.id=Number(t.id),this.gameId=String(t.gameId),this.title=t.title,this.content=t.content,this.rewards=t.rewards,this.createdAt=t.createdAt,t.receivedAt?this.receivedAt=t.receivedAt:this.receivedAt=null,this.mailType=i,this.typeArray.length=0,this.subTypeArray.length=0,this.amountArray.length=0,this.gradeArray.length=0,this.kindNumArray.length=0)}
+ get hasReward(){
+ return!(!this.rewards||0==this.rewards.length)&&Object.values(this.rewards).some(t=>!!t&&("number"==typeof t?t>0:!!t))}
+ get hasClaimableReward(){
+ return this.hasReward&&null==this.receivedAt}
+ get isDeletable(){
+ return null!=this.receivedAt}
+ reset(){
+ this.index=-1,this.id=-1,this.gameId="",this.title="",this.content="",this.rewards.length=0,this.createdAt=null,this.receivedAt=null,this.mailType="",this.typeArray.length=0,this.subTypeArray.length=0,this.amountArray.length=0,this.gradeArray.length=0,this.kindNumArray.length=0}
+ }
+ ;
+ Kt(M3,"MailVO");
+ let E3=M3;
+ const A3=class{
+ static async getMailList(t=1){
+ let i=await hD.getInstance().mail.list(t,this.pageSize);
+ 0!=i.success?t>this.page?this.setData(i.body,!0):this.setData(i.body):lS.getInstance().dispatchCustomEvent("MailUpdate")}
+ static setData(t,i=!1){
+ let s,e,n,h;
+ if(t.mailList){
+ const r=t.mailList;
+ for(0==i?(h=[...this.gameList],this.gameList.length=0):h=[],e=r.length,s=0;
+ s<e;
+ ++s){
+ r[s].content=this.filterContent(r[s].content);
+ const t=Number(r[s].id),i=h.findIndex(i=>i.id===t);
+ -1===i?n=this.getMailEmptyVO():(n=h.splice(i,1)[0],n.reset()),n.setData(r[s],_3.GAME),this.gameList.push(n),this.gameMailMap[n.id]=n}
+ this.addListPool(h)}
+ if(t.paymentMailList){
+ const r=t.paymentMailList;
+ for(0==i?(h=[...this.paymentList],this.paymentList.length=0):h=[],e=r.length,s=0;
+ s<e;
+ ++s){
+ r[s].content=this.filterContent(r[s].content);
+ const t=Number(r[s].id),i=h.findIndex(i=>i.id===t);
+ -1===i?n=this.getMailEmptyVO():(n=h.splice(i,1)[0],n.reset()),n.setData(r[s],_3.PAYMENT),this.paymentList.push(n),this.paymentMailMap[n.id]=n,n.index=this.paymentList.length}
+ this.addListPool(h)}
+ "mailTotal"in t&&(this.mailsTotal=Number(t.mailTotal)),"mailTotalPages"in t&&(this.mailTotalPages=Number(t.mailTotalPages)),"paymentTotal"in t&&(this.paymentMailsTotal=Number(t.paymentTotal)),"paymentTotalPages"in t&&(this.paymentTotalPages=Number(t.paymentTotalPages)),this.updatePage(),this.updateNeeded=!1,lS.getInstance().dispatchCustomEvent("MailUpdate"),this.log()}
+ static filterContent(t){
+ return t.replace(/\r\n/g,"\n")}
+ static onMailDeleteAndUpdate(t){
+ t==_3.PAYMENT?(this.paymentMailsTotal>0&&this.paymentMailsTotal--,this.paymentTotalPages=Math.floor((this.paymentMailsTotal-1)/this.pageSize)+1):(this.mailsTotal>0&&this.mailsTotal--,this.mailTotalPages=Math.floor((this.mailsTotal-1)/this.pageSize)+1),this.updatePage()}
+ static updatePage(){
+ const t=Math.max(this.gameList.length,this.paymentList.length);
+ this.page=Math.floor((t-1)/this.pageSize)+1,this.page<1&&(this.page=1)}
+ static log(){
+ }
+ static getGameMailWithId(t){
+ return this.gameMailMap[t]}
+ static getPaymentMailWithId(t){
+ return this.paymentMailMap[t]}
+ static getMailCount(t){
+ return t==_3.PAYMENT?this.paymentList.length:this.gameList.length}
+ static getMailTotal(t){
+ return t==_3.PAYMENT?this.paymentMailsTotal:this.mailsTotal}
+ static getMailTotalPage(t){
+ return t==_3.PAYMENT?this.paymentTotalPages:this.mailTotalPages}
+ static isAllMailLoaded(t){
+ let i=0,s=0,e=0;
+ return t==_3.PAYMENT?(i=this.paymentList.length,s=this.paymentMailsTotal,e=this.paymentTotalPages):(i=this.gameList.length,s=this.mailsTotal,e=this.mailTotalPages),!(Math.floor((i-1)/this.pageSize)+1<e||i<s)}
+ static getPage(){
+ return this.page}
+ static getPageSize(){
+ return this.pageSize}
+ static getDisplaySize(){
+ return this.displaySize}
+ static setDisplaySize(t){
+ t>0&&(this.displaySize=t)}
+ static getMailEmptyVO(){
+ if(this.mailPool.length>0){
+ let t=this.mailPool.pop();
+ return t?t.reset():t=new E3,t}
+ return new E3}
+ static addPool(t){
+ t&&(t.reset(),this.mailPool.push(t))}
+ static addListPool(t){
+ if(!t)return;
+ let i;
+ const s=t.length;
+ for(let e=0;
+ e<s;
+ ++e)i=t[e],i&&(i.reset(),this.mailPool.push(i))}
+ static removeGameMail(t){
+ const i=this.gameList.findIndex(i=>i.id===t);
+ -1!==i&&(this.gameList.splice(i,1),this.addPool(this.gameMailMap[t]),delete this.gameMailMap[t])}
+ static removePaymentMail(t){
+ const i=this.paymentList.findIndex(i=>i.id===t);
+ -1!==i&&(this.paymentList.splice(i,1),this.addPool(this.paymentMailMap[t]),delete this.paymentMailMap[t])}
+ static get hasDeletableGameMail(){
+ return-1!==this.gameList.findIndex(t=>!0===t.isDeletable)}
+ static get hasDeletablePaymentMail(){
+ return-1!==this.paymentList.findIndex(t=>!0===t.isDeletable)}
+ static get hasDeletableMail(){
+ return this.hasClaimableGameReward||this.hasClaimablePaymentReward}
+ static get hasClaimableReward(){
+ return this.hasClaimableGameReward||this.hasClaimablePaymentReward}
+ static get hasClaimableGameReward(){
+ return this.checkClaimableReward(this.gameList)}
+ static get hasClaimablePaymentReward(){
+ return this.checkClaimableReward(this.paymentList)}
+ static checkClaimableReward(t){
+ const i=t.length;
+ for(let s=0;
+ s<i;
+ ++s)if(t[s].hasClaimableReward)return!0;
+ return!1}
+ }
+ ;
+ Kt(A3,"MailManager"),zt(A3,"updateNeeded",!0),zt(A3,"mailPool",[]),zt(A3,"gameList",[]),zt(A3,"paymentList",[]),zt(A3,"gameMailMap",{
+ }
+ ),zt(A3,"paymentMailMap",{
+ }
+ ),zt(A3,"mailsTotal",0),zt(A3,"mailTotalPages",0),zt(A3,"paymentMailsTotal",0),zt(A3,"paymentTotalPages",0),zt(A3,"page",1),zt(A3,"pageSize",20),zt(A3,"displaySize",8);
+ let S3=A3;
+ var T3=(t=>(t.NOT_PURCHASE="NOT_PURCHASE",t.CREATED="CREATED",t.PENDING="PENDING",t.COMPLETED="COMPLETED",t.FAILED="FAILED",t))(T3||{
+ }
+ );
+ const C3=class{
+ constructor(){
+ zt(this,"id",-1),zt(this,"productId",-1),zt(this,"paybackType",""),zt(this,"paybackValue",-1),zt(this,"status",""),zt(this,"paidbackAt",null)}
+ }
+ ;
+ Kt(C3,"PaybackEventUserVO");
+ let k3=C3;
+ const O3=class{
+ constructor(){
+ zt(this,"id",-1),zt(this,"title",""),zt(this,"description",[]),zt(this,"startTime",null),zt(this,"endTime",null),zt(this,"paybackEndTime",null)}
+ }
+ ;
+ Kt(O3,"PaybackEventVO");
+ let I3=O3;
+ const x3=class{
+ static get opened(){
+ return!1}
+ static async getPaybackEvent(t,i=!1){
+ let s=await hD.getInstance().payback.getPaybackEvent(t,i);
+ s=this.getTestData(),0!=s.success?(this.setData(s.body),lS.getInstance().dispatchCustomEvent("PaybackEvent")):lS.getInstance().dispatchCustomEvent("PaybackEvent")}
+ static setData(t){
+ this.setPaybackEventData(t),this.setPaybackUserData(t)}
+ static setPaybackEventData(t){
+ if(!t||!t.paybackEvent)return void(this.paybackEvent.id=0);
+ const i=t.paybackEvent;
+ this.paybackEvent.id=Number(i.id),this.paybackEvent.title=String(i.title),this.paybackEvent.description=String(i.description).split("|"),this.paybackEvent.startTime=new Date(i.startTime),this.paybackEvent.endTime=new Date(i.endTime),this.paybackEvent.paybackEndTime=new Date(i.paybackEndTime)}
+ static getEventDurationStr(t){
+ const i={
+ startTimeStr:"",endTimeStr:"",paybackEndTimeStr:""}
+ ,s="YYYY-MM-DD";
+ let e="00:00:00";
+ if(t.startTime){
+ const n=t.startTime,h=s.replace("YYYY",String(n.getUTCFullYear())).replace("MM",uU.digit(n.getUTCMonth()+1)).replace("DD",uU.digit(n.getUTCDate()));
+ e=`${
+ uU.digit(n.getUTCHours())}
+ :${
+ uU.digit(n.getUTCMinutes())}
+ :${
+ uU.digit(n.getUTCSeconds())}
+ `,i.startTimeStr=h}
+ let n="23:59:59";
+ if(t.endTime){
+ const e=t.endTime,h=s.replace("YYYY",String(e.getUTCFullYear())).replace("MM",uU.digit(e.getUTCMonth()+1)).replace("DD",uU.digit(e.getUTCDate()));
+ n=`${
+ uU.digit(e.getUTCHours())}
+ :${
+ uU.digit(e.getUTCMinutes())}
+ :${
+ uU.digit(e.getUTCSeconds())}
+ `,i.endTimeStr=h}
+ let h="23:59:59";
+ if(t.paybackEndTime){
+ const e=t.paybackEndTime,n=s.replace("YYYY",String(e.getUTCFullYear())).replace("MM",uU.digit(e.getUTCMonth()+1)).replace("DD",uU.digit(e.getUTCDate()));
+ h=`${
+ uU.digit(e.getUTCHours())}
+ :${
+ uU.digit(e.getUTCMinutes())}
+ :${
+ uU.digit(e.getUTCSeconds())}
+ `,i.paybackEndTimeStr=n}
+ return"00:00:00"==e&&"23:59:59"==n&&"23:59:59"==h||(i.startTimeStr+=" "+e,i.endTimeStr+=" "+n,i.paybackEndTimeStr+=" "+h),i}
+ static setPaybackUserData(t){
+ if(!t||!t.paybacks)return;
+ const i=t.paybacks,s=i.length;
+ if(0==this.paybacks.length)for(let h=0;
+ h<s;
+ ++h)this.paybacks.push(new k3);
+ let e,n;
+ for(let h=0;
+ h<s;
+ ++h)e=i[h],n=this.paybacks[h],n.id=Number(e.id),n.productId=Number(e.productId),n.paybackType=String(e.paybackType),n.paybackValue=Number(e.paybackValue),n.status=String(e.status),n.paidbackAt=new Date(String(e.paidbackAt))}
+ static isEventEnded(){
+ const t=this.paybackEvent;
+ return t.id<0||!t.endTime||!(gP.serverTime<t.endTime.getTime())}
+ static isPaybackEnded(){
+ const t=this.paybackEvent;
+ return t.id<0||!t.paybackEndTime||!(gP.serverTime<t.paybackEndTime.getTime())}
+ static hasReward(){
+ if(1==this.isPaybackEnded())return!1;
+ let t;
+ const i=this.paybacks.length;
+ for(let s=0;
+ s<i;
+ ++s)if(t=this.paybacks[s],t.status==T3.CREATED||t.status==T3.FAILED)return!0;
+ return!1}
+ static getTestData(){
+ return{
+ header:{
+ sts:1771417950938}
+ ,body:{
+ paybackEvent:{
+ id:7,gameId:"smith",active:1,subId:3,title:"PAYBACK_T1",description:"PAYBACK_H1|PAYBACK_H2|PAYBACK_H3|PAYBACK_H4|PAYBACK_H5|PAYBACK_H6",startTime:"2026-02-17T00:00:00.000Z",endTime:"2026-02-20T21:59:59.000Z",paybackEndTime:"2026-02-20T23:59:59.000Z"}
+ ,paybacks:[{
+ id:21,gameId:"smith",subId:3,step:1,productId:111,reqProductId:0,paybackType:"slx",paybackValue:299,status:"COMPLETED",paidbackAt:null}
+ ,{
+ id:22,gameId:"smith",subId:3,step:2,productId:112,reqProductId:111,paybackType:"slx",paybackValue:998,status:"CREATED",paidbackAt:null}
+ ,{
+ id:23,gameId:"smith",subId:3,step:3,productId:113,reqProductId:112,paybackType:"slx",paybackValue:4995,status:"NOT_PURCHASE",paidbackAt:null}
+ ,{
+ id:24,gameId:"smith",subId:3,step:4,productId:114,reqProductId:113,paybackType:"slx",paybackValue:9990,status:"NOT_PURCHASE",paidbackAt:null}
+ ,{
+ id:25,gameId:"smith",subId:3,step:5,productId:115,reqProductId:114,paybackType:"slx",paybackValue:19980,status:"NOT_PURCHASE",paidbackAt:null}
+ ,{
+ id:26,gameId:"smith",subId:3,step:6,productId:116,reqProductId:115,paybackType:"slx",paybackValue:49950,status:"NOT_PURCHASE",paidbackAt:null}
+ ,{
+ id:27,gameId:"smith",subId:3,step:7,productId:117,reqProductId:116,paybackType:"slx",paybackValue:99900,status:"NOT_PURCHASE",paidbackAt:null}
+ ]}
+ ,_success_:!0,_ok_:!0,_status_:201}
+ }
+ }
+ ;
+ Kt(x3,"PaybackEventManager"),zt(x3,"paybackEvent",new I3),zt(x3,"paybacks",[]);
+ let N3=x3;
+ const P3=class extends Be{
+ constructor(t,i=640,s=400,e=2){
+ super(),zt(this,"itemHeight",0),zt(this,"listWidth",0),zt(this,"listHeight",0),zt(this,"totalHeight",0),zt(this,"_height",0),zt(this,"ySpace",0),zt(this,"dragging",!1),zt(this,"startY",0),zt(this,"scrollY",0),zt(this,"velocity",0),zt(this,"touchData",null),zt(this,"itemList",[]),zt(this,"container",new Be),zt(this,"_dataProvider",[]),zt(this,"_dataLen",0),zt(this,"activePointerId",-1),zt(this,"itemClass"),zt(this,"maskBox"),zt(this,"bg"),zt(this,"onPointDownHandler"),zt(this,"onPointUpHandler"),zt(this,"onPointMoveHandler"),zt(this,"_activated",!1),zt(this,"recycleList",[]),zt(this,"yPrev",0),zt(this,"yHome",0),zt(this,"yMouse",0),zt(this,"vy",0),zt(this,"longTouchTime",0),zt(this,"longTouchPoint",new mi),zt(this,"longTouchStarted",!1),zt(this,"onDragStart"),zt(this,"dragSensingDistance",20),this.listWidth=i,this.listHeight=s,this.ySpace=e,this.itemHeight=(new t).height,this.itemClass=t,this.bg=new VI(i,s,16751001),this.bg.alpha=0,this.addChild(this.bg),this.eventMode="static",this.addChild(this.container),this.maskBox=new VI(i,s),this.addChild(this.maskBox),this.container.mask=this.maskBox,this.activateEvents=this.activateEvents.bind(this),this.deactivateEvents=this.deactivateEvents.bind(this),this.onPointDownHandler=this.onPointerDown.bind(this),this.onPointUpHandler=this.onPointerUp.bind(this),this.onPointMoveHandler=this.onPointerMove.bind(this),this.on("added",this.activateEvents),this.on("removed",this.deactivateEvents)}
+ activateEvents(){
+ this.on("pointerdown",this.onPointDownHandler)}
+ deactivateEvents(){
+ this.off("pointerdown",this.onPointDownHandler),KA.stage.off("pointermove",this.onPointMoveHandler),KA.app.canvas.removeEventListener("pointerup",this.onPointUpHandler)}
+ set activated(t){
+ this._activated=t;
+ let i=this.itemList.length;
+ for(let s=0;
+ s<i;
+ s++)t?this.itemList[s].emit("activated",this.itemList[s]):this.itemList[s].emit("deactivated",this.itemList[s])}
+ get activated(){
+ return this._activated}
+ set dataProvider(t){
+ this._dataProvider=t,this._dataLen=t.length,this.totalHeight=this._dataLen*(this.itemHeight+this.ySpace)+2,this.createListItem()}
+ executeShowingMotion(){
+ let t,i=0,s=0,e=0;
+ for(let n=0;
+ n<this._dataLen;
+ n++)t=this.itemList[n],i=this.container.y+t.y,i+this.itemHeight<0||i>this.listHeight?t.visible=!1:(t.visible=!0,s++,t.alpha=0,e=t.y,t.y=e+30+15*s,HI.to(t,{
+ y:e,alpha:1,duration:.25,delay:2*s/60,ease:"power2.out"}
+ ))}
+ removeAll(){
+ for(let t=this.itemList.length-1;
+ t>=0;
+ t--)this.container.removeChild(this.itemList[t]),this.recycleList.unshift(this.itemList[t]);
+ this.itemList.length=0}
+ clearAllCache(){
+ for(const t of this.itemList)t.clearCache()}
+ createListItem(){
+ this.removeAll();
+ let t,i=0;
+ for(let s=0;
+ s<this._dataLen;
+ s++)t=this.recycleList.length>0?this.recycleList.shift():new this.itemClass,t.y=i,this.container.addChildAt(t,0),(t.y+this.container.y+this.itemHeight+10>0||t.y+this.container.y<this.listHeight)&&(t.index=s,t.data=this._dataProvider[s],t.setData(this._dataProvider[s])),this.itemList.push(t),t.list=this,i+=this.itemHeight+this.ySpace;
+ this._height=i,i+this.container.y<this.listHeight&&i>this.listHeight&&(this.container.y=this.listHeight-i);
+ for(let s=0;
+ s<this._dataLen;
+ s++){
+ const t=this.itemList[s],i=this.container.y+t.y;
+ (i+this.itemHeight<0||i>this.listHeight)&&(t.visible=!1)}
+ }
+ showTopItem(){
+ this.container.y=0,this.updateListItem()}
+ scrollTo(t){
+ t<0&&(t=0);
+ var i=-(this.itemHeight+this.ySpace)*t;
+ this.listHeight>this.totalHeight?i=0:i<this.listHeight-this.totalHeight&&this.listHeight<this.totalHeight&&(i=this.listHeight-this.totalHeight),this.container.y=i,this.updateListItem()}
+ updateItemData(){
+ let t=this.itemList.length;
+ for(let i=0;
+ i<t;
+ i++)this.itemList[i].setData(this.itemList[i].data)}
+ updateListItem(){
+ let t,i=0;
+ for(let s=0;
+ s<this._dataLen;
+ s++)t=this.itemList[s],i=this.container.y+t.y,i+this.itemHeight<0||i>this.listHeight?t.visible=!1:(t.visible=!0,null==t.data&&(t.index=s,t.data=this._dataProvider[s],t.setData(this._dataProvider[s])))}
+ onPointerDown(t){
+ this.activePointerId=t.pointerId,this.dragging=!1,this.yMouse=this.yPrev=this.yHome=t.globalY,this.vy=0,this.longTouchTime=0,this.longTouchPoint=this.toLocal(t.global),GM.getInstance().add(this.onDragEnter,this),GM.getInstance().remove(this.onFlickEnter,this),KA.stage.on("pointermove",this.onPointMoveHandler),KA.app.canvas.addEventListener("pointerup",this.onPointUpHandler)}
+ onDragEnter(){
+ if(0==this.dragging&&0==this.longTouchStarted&&++this.longTouchTime>50){
+ this.longTouchStarted=!0;
+ let t=this.longTouchPoint,i=Math.floor((t.y-this.container.y)/(this.itemHeight+this.ySpace));
+ i<this._dataLen&&null!=this.itemList[i]&&null!=this.itemList[i].onLongClick&&this.itemList[i].onLongClick(t.x,(t.y-this.container.y)%(this.itemHeight+this.ySpace))}
+ if(0==this.dragging&&Math.abs(this.yMouse-this.yHome)>this.dragSensingDistance&&(this.yPrev=this.yMouse,this.dragging=!0,this.onDragStart&&this.onDragStart()),1==this.longTouchStarted)return;
+ if(0==this.dragging)return;
+ const t=this.yMouse-this.yPrev;
+ this.vy=.6*this.vy+.4*t,this.container.y>0||this.container.y<this.listHeight-this.totalHeight?this.container.y+=.3*t:this.container.y+=t,this.yPrev=this.yMouse,this.updateListItem()}
+ onFlickEnter(){
+ this.vy*=.975,this.container.y>=0||this.container.y<=0&&this.listHeight>=this.totalHeight?(this.vy*=.8,this.container.y+=.35*(0-this.container.y),Math.abs(this.vy)<.5&&Math.abs(this.container.y)<1&&(this.container.y=0,GM.getInstance().remove(this.onFlickEnter,this))):this.container.y<this.listHeight-this.totalHeight&&this.listHeight<this.totalHeight?(this.vy*=.8,this.container.y+=.35*(this.listHeight-this.totalHeight-this.container.y),Math.abs(this.vy)<.5&&Math.abs(this.container.y-this.listHeight+this.totalHeight)<1&&(this.container.y=this.listHeight-this.totalHeight,GM.getInstance().remove(this.onFlickEnter,this),0==Math.abs(this.vy)&&this.onEndOfList())):(this.container.y+=this.vy,Math.abs(this.vy)<.5&&GM.getInstance().remove(this.onFlickEnter,this)),this.updateListItem()}
+ onEndOfList(){
+ }
+ onPointerMove(t){
+ t.pointerId===this.activePointerId&&(this.yMouse=t.globalY)}
+ onPointerUp(t){
+ if(t.pointerId===this.activePointerId){
+ if(this.activePointerId=-1,1==this.dragging)Math.abs(this.vy)<10?this.vy=3*this.vy:this.vy=2.5*this.vy,GM.getInstance().add(this.onFlickEnter,this);
+ else if(0==this.longTouchStarted){
+ let t=this.longTouchPoint,i=Math.floor((t.y-this.container.y)/(this.itemHeight+this.ySpace));
+ i<this._dataLen&&null!=this.itemList[i]&&null!=this.itemList[i].onClick&&this.itemList[i].onClick(t.x,(t.y-this.container.y)%(this.itemHeight+this.ySpace))}
+ this.longTouchStarted=!1,GM.getInstance().remove(this.onDragEnter,this),KA.stage.off("pointermove",this.onPointMoveHandler),KA.app.canvas.removeEventListener("pointerup",this.onPointUpHandler)}
+ }
+ updateScroll(){
+ this.container.y=this.scrollY,this.clampScroll()}
+ clampScroll(){
+ const t=-(this.itemList.length*(this.itemHeight+this.ySpace)+(this.itemList.length-1)*this.ySpace-this.listHeight);
+ this.container.y>0?this.container.y=0:this.container.y<t&&(this.container.y=t)}
+ getItemList(){
+ return this.itemList}
+ getListWidth(){
+ return this.listWidth}
+ setListWidth(t,i=!0){
+ if(t==this.listWidth)return;
+ if(this.listWidth=t,this.bg.width=this.listWidth,this.maskBox.width=this.listWidth,0==i)return;
+ let s=0;
+ const e=this.itemList.length;
+ for(let h=0;
+ h<e;
+ ++h)if(0==this.itemList[h].visible){
+ s=h-1;
+ break}
+ const n=s*(this.itemHeight+this.ySpace)-this.ySpace;
+ this.listHeight>n&&this.updateListItem()}
+ getListHeight(){
+ return this.listHeight}
+ setListHeight(t,i=!0){
+ if(t===this.listHeight)return;
+ if(this.listHeight=t,this.bg.height=this.listHeight,this.maskBox.height=this.listHeight,0==i)return;
+ let s=0;
+ const e=this.itemList.length;
+ for(let h=0;
+ h<e;
+ ++h)if(0==this.itemList[h].visible){
+ s=h-1;
+ break}
+ const n=s*(this.itemHeight+this.ySpace)-this.ySpace;
+ this.listHeight>n&&this.updateListItem()}
+ getItemHeight(){
+ return this.itemHeight}
+ getTotalHeight(){
+ return this.totalHeight}
+ getContainerY(){
+ return this.container.y}
+ getYSpace(){
+ return this.ySpace}
+ getContainer(){
+ return this.container}
+ getDataLen(){
+ return this._dataLen}
+ }
+ ;
+ Kt(P3,"ListOld");
+ let R3=P3;
+ const D3=class extends Be{
+ constructor(t=552,i=106,s="Banner"){
+ super(),zt(this,"banner"),zt(this,"bannerName",""),zt(this,"sheetName","Banner"),zt(this,"_width",552),zt(this,"_height",106),zt(this,"_imageWidth",-1),zt(this,"_imageHeight",-1),zt(this,"_autoResize",!1),this._width=t,this._height=i,this.sheetName=s,this.banner=new We,this.addChild(this.banner)}
+ get width(){
+ return this._width}
+ get height(){
+ return this._height}
+ get imageWidth(){
+ return this._imageWidth}
+ get imageHeight(){
+ return this._imageHeight}
+ get autoResize(){
+ return this._autoResize}
+ set autoResize(t){
+ t!=this._autoResize&&(this._autoResize=t,this._imageWidth<0||this._imageHeight<0||(this._autoResize?(this.banner.width=this._width,this.banner.height=this._height):(this.banner.width=this._imageWidth,this.banner.height=this._imageHeight)))}
+ async update(t,i=-1,s=-1,e="Banner"){
+ if(t==this.bannerName)return;
+ if(this.bannerName=t,this.sheetName=e,!1===ZA.hasSheet(this.sheetName)){
+ const t="ktx2";
+ await ZA.generateTexture(this.sheetName,t,!1)}
+ let n=ZA.getTexture(this.sheetName,this.bannerName);
+ this.banner.texture=n,this._imageWidth=n.width,this._imageHeight=n.height,this._autoResize?(this.banner.width=this._width,this.banner.height=this._height):(this.banner.width=this._imageWidth,this.banner.height=this._imageHeight)}
+ }
+ ;
+ Kt(D3,"BannerImage");
+ let L3=D3;
+ const G3=class t extends Be{
+ static getInstance(){
+ return this._instance||(this._instance=new t),this._instance}
+ constructor(){
+ super()}
+ }
+ ;
+ Kt(G3,"RewardLayer"),zt(G3,"_instance");
+ let B3=G3;
+ const U3=class{
ClickAniLayer 2 hunks, 356 statements
+ constructor(){
+ super(),zt(this,"blocker"),zt(this,"allowRect"),zt(this,"highlightBorder"),zt(this,"dimParts",[]),this.createUI()}
+ createUI(){
+ for(let t=0;
+ t<4;
+ t++){
+ const t=new Gf;
+ t.alpha=.5,t.rect(0,0,1,1).fill(0),this.dimParts.push(t),this.addChild(t)}
+ this.blocker=new Gf,this.blocker.rect(0,0,640,KA.stageHeight).fill(0),this.blocker.alpha=0,this.blocker.eventMode="static",this.addChild(this.blocker),this.highlightBorder=new Gf,this.addChild(this.highlightBorder),this.allowRect=new Pi(0,0,0,0),this.setBlockerEnabled(!1)}
+ setClickArea(t,i,s,e){
+ this.allowRect=new Pi(t,i,s,e),this.updateDim(),this.blocker.hitArea={
+ contains:Kt((t,i)=>!this.allowRect.contains(t,i),"contains")}
+ ,this.setBlockerEnabled(!0)}
+ setBlockerEnabled(t){
+ this.blocker.eventMode=t?"static":"none";
+ for(const i of this.dimParts)i.visible=t;
+ this.highlightBorder.visible=t}
+ updateDim(){
+ const t=KA.stageHeight,{
+ x:i,y:s,width:e,height:n}
+ =this.allowRect;
+ this.dimParts[0].clear().rect(0,0,640,s).fill(0),this.dimParts[1].clear().rect(0,s,i,n).fill(0),this.dimParts[2].clear().rect(i+e,s,640-(i+e),n).fill(0),this.dimParts[3].clear().rect(0,s+n,640,t-(s+n)).fill(0),this.highlightBorder.clear().rect(i,s,e,n).stroke({
+ color:16776960,width:3}
+ )}
+ }
+ ;
+ Kt(KV,"ClickAniLayer");
+ let zV=KV;
+ const qV=class t extends Be{
+ constructor(){
+ super(),zt(this,"sp"),zt(this,"textures",[]),this.textures=ZA.getTextures("ClickHand","ClickHand"),this.sp=new jf(this.textures),this.addChild(this.sp),this.eventMode="none"}
+ static getInstance(){
+ return null==this.instance&&(this.instance=new t),this.instance}
+ isPlaying(){
+ return!!this.parent}
+ show(t,i,s,e,n=0,h=0){
+ this.x=t,this.y=i,zV.getInstance().setClickArea(t-.5*s+n,i-.5*e+h,s,e),this.isPlaying()||(this.sp.animationSpeed=.65,this.sp.play(),zV.getInstance().addChild(this))}
+ hide(){
+ zV.getInstance().setBlockerEnabled(!1),this.sp.stop(),this.parent&&this.removeFromParent()}
+ }
+ ;
+ Kt(qV,"ClickAniEffect"),zt(qV,"instance");
+ let XV=qV;
+ const YV=class{
+ constructor(){
+ zt(this,"kindNum",0),zt(this,"wave",0),zt(this,"order",0),zt(this,"position",1),zt(this,"text",""),zt(this,"code",""),zt(this,"maxWave",-1),zt(this,"repeat",9999)}
+ getTextKey(){
+ return`DIALOGUE_TEXT_${
+ this.kindNum}
+ `}
+ }
+ ;
+ Kt(YV,"DialogueVO");
+ let JV=YV;
+ const QV=class t{
+ constructor(){
+ zt(this,"list",[]),zt(this,"waveMap",new Map),zt(this,"playCount",{
+ }
+ ),zt(this,"playCountLoaded",!1)}
+ static getInstance(){
+ return null==this.instance&&(this.instance=new t),this.instance}
+ setBookData(t){
+ if(this.list=[],this.waveMap.clear(),t){
+ for(let i=0;
+ i<t.length;
+ i++){
+ const s=t[i],e=new JV;
+ e.kindNum=Number(s.kindNum),e.wave=Number(s.wave),e.order=Number(s.order),e.position=Number(s.position)||1,e.text=s.text??"",e.code=s.code??"",e.maxWave=Number(s.maxWave)||-1,e.repeat=Number(s.repeat)||9999,this.list.push(e);
+ let n=this.waveMap.get(e.wave);
+ n||(n=[],this.waveMap.set(e.wave,n)),n.push(e)}
+ for(const t of this.waveMap.values())t.sort((t,i)=>t.order-i.order);
+ this.loadPlayCount()}
+ }
+ async loadPlayCount(){
+ if(this.playCountLoaded)return;
+ const i=await $A.getData(t.LOCAL_KEY);
+ this.playCount=i??{
+ }
+ ,this.playCountLoaded=!0}
+ savePlayCount(){
+ $A.saveData(t.LOCAL_KEY,this.playCount)}
+ async getByWaveAsync(t){
+ return await this.loadPlayCount(),this.getByWave(t)}
+ getByWave(t){
+ const i=this.waveMap.get(t)??[],s=_L.maxWave,e=[];
+ let n=!1;
+ for(const h of i)if(!(h.maxWave>0&&s<h.maxWave)){
+ if(h.repeat<999){
+ const t=this.playCount[h.kindNum]??0;
+ if(t>=h.repeat)continue;
+ this.playCount[h.kindNum]=t+1,n=!0}
+ e.push(h)}
+ return n&&this.savePlayCount(),e}
+ hasDialogue(t){
+ return this.waveMap.has(t)}
+ }
+ ;
+ Kt(QV,"DialogueDataManager"),zt(QV,"instance"),zt(QV,"LOCAL_KEY",$A.KEY_DIALOGUE_COUNT);
+ let ZV=QV;
+ const tK=[[1,1,1,"성","성은 우리가 지켜야하는 기지입니다","HELP_TITLE_1","HELP_1"],[2,1,2,"성","성이 파괴되면, 환생하여 다시 진행해야 합니다.","HELP_TITLE_1","HELP_2"],[3,1,3,"성","신전에서 생명의 비술을 연구하면, 성이 파괴되어도 이어할 수 있습니다.","HELP_TITLE_1","HELP_4"],[4,1,4,"성","성은 훈장을 사용하여 영구히 유지되는 강화를 진행할 수 있습니다.","HELP_TITLE_1","HELP_3"],[5,2,1,"영웅","영웅은 최전방에서 성을 보호하고 적을 물리치는 아군입니다.","HELP_TITLE_2","HELP_5"],[6,2,2,"영웅","병영에서 배치를 통해 출전시킨 영웅만 전투에 나서게 됩니다. 대기중인 영웅들을 지금 출전시켜 보세요!","HELP_TITLE_2","HELP_6"],[7,3,1,"퀘스트","퀘스트를 통해 골드를 획득할 수 있습니다.","HELP_TITLE_3","HELP_7"],[8,3,2,"퀘스트","게이지가 찰때마다 골드를 획득합니다.","HELP_TITLE_3","HELP_8"],[9,3,3,"퀘스트","레벨업을 하면, 획득하는 골드가 늘어납니다.","HELP_TITLE_3","HELP_9"],[10,3,4,"퀘스트","다음 단계 퀘스트를 오픈하면, 더 많은 골드를 획득할 수 있습니다.","HELP_TITLE_3","HELP_10"],[11,4,1,"환생","성이 파괴되면, 환생을 해야합니다.","GAME_5","HELP_11"],[12,4,2,"환생","10 wave 이상에서는 언제든 환생을 할 수 있습니다.","HELP_TITLE_4","HELP_12"],[13,4,3,"환생","환생을 하면, ( 훈장 )을 얻게 됩니다.","HELP_TITLE_4","HELP_13"],[14,4,4,"환생","( 훈장 )은 게임에서 가장 중요한 재화로, 영웅과 성을 강화하는데 사용됩니다.","HELP_TITLE_4","HELP_14"],[15,4,5,"환생","높은 웨이브에서 환생할수록 (훈장)을 더 많이 획득할 수 있습니다.","HELP_TITLE_4","HELP_15"],[16,5,1,"기사단","기사단 레벨은 최고 도달 웨이브를 기준으로 산정됩니다. (100 웨이브당 1 레벨)","HELP_TITLE_5","HELP_16"],[17,5,2,"기사단","무한랭킹전/던전 등에서 영웅의 레벨은 기사단 레벨을 기준으로 결정됩니다.","HELP_TITLE_5","HELP_17"],[18,6,1,"영웅 - 사제","사제에게는 ( 신의 은총 )이라는 스킬이 있습니다.","HELP_TITLE_6","HELP_18"],[19,6,2,"영웅 - 사제","( 신의 은총 )은 확률적으로 발동하는데, 2분 동안 게임 속도를 300% 올려줍니다.","HELP_TITLE_6","HELP_19"],[20,6,3,"영웅 - 사제","사제를 여러명 가질수록, (신의 은총) 스킬이 발동할 확률이 높아집니다.","HELP_TITLE_6","HELP_20"],[21,7,1,"영웅 - 페어리","엘프의 비술은 확률적으로 웨이브를 1씩 건너뛰는 스킬을 가지고 있습니다.","HELP_TITLE_7","HELP_21"],[22,7,2,"영웅 - 페어리","페어리는 엘프의 비술 스킬을 가지고 있습니다.","HELP_TITLE_7","HELP_22"],[23,7,3,"영웅 - 페어리","페어리를 많이 보유할수록, 웨이브를 1씩 건너뛰어 빠르게 전진할 수 있습니다.","HELP_TITLE_7","HELP_23"],[24,8,1,"영웅 - 암흑 궁병","암흑 궁병은 환생시, 시작 웨이브를 올려주는 스킬을 가지고 있습니다.","HELP_TITLE_8","HELP_24"],[25,8,2,"영웅 - 암흑 궁병","암흑 궁병을 많이 보유할수록, 환생후 높은 웨이브에서 시작할 수 있습니다.","HELP_TITLE_8","HELP_25"],[26,8,3,"영웅 - 암흑 궁병","( 암흑궁병을 10명 배치하고, 1000층에서 환생하면, 500층에서 시작합니다. )","HELP_TITLE_8","HELP_26"]],iK=class t{
+ constructor(){
+ zt(this,"items"),this.items=tK.map(([t,i,s,e,n,h,r])=>({
+ kindNum:t,main:i,sub:s,title:AG.getText(h,e),desc:AG.getText(r,n)}
+ ))}
+ static getInstance(){
+ return null==this.instance&&(this.instance=new t),this.instance}
+ getMainList(){
+ const t=new Set,i=[];
+ for(const s of this.items)t.has(s.main)||(t.add(s.main),i.push(s));
+ return i}
+ getSubsByMain(t){
+ return this.items.filter(i=>i.main===t).sort((t,i)=>t.sub-i.sub)}
+ getIconName(t){
+ return{
+ 1:"Icon_Help_Castle",2:"Icon_Help_Hero",3:"Icon_Help_Quest",4:"Icon_Help_Revive",5:"Icon_Help_Knight",6:"Icon_Help_Prist",7:"Icon_Help_Pairy",8:"Icon_Help_DarkArche"}
+ [t]??`Help_${
+ t}
+ _1`}
+ getImageName(t,i){
+ return`Help_${
+ t}
+ _${
+ i}
+ `}
+ }
+ ;
+ Kt(iK,"HelpDataManager"),zt(iK,"instance",null);
+ let sK=iK;
+ var eK=(t=>(t[t.Secretary=7001]="Secretary",t[t.Secretary_Day30=7002]="Secretary_Day30",t))(eK||{
+ }
+ );
+ const nK=class t{
+ constructor(){
+ zt(this,"_unlockWave",10),zt(this,"_productBookEnableYn",""),zt(this,"_nextMarketYn",""),zt(this,"allProducts",[]),zt(this,"packageList",[]),zt(this,"periodList",[]),zt(this,"normalList",[]),zt(this,"wavePassList",[]),zt(this,"reviewShopList",[]),zt(this,"requestPending",!1),zt(this,"_productIdsWithHammer",null),zt(this,"objTargeting",{
+ }
+ )}
+ static getInstance(){
+ return this.instance||(this.instance=new t),this.instance}
+ get unlockWave(){
+ return this._unlockWave}
+ get productBookEnableYn(){
+ if(""==this._productBookEnableYn){
+ const t=EL.getInstance().getClientData("PRODUCT_BOOK_ENABLE");
+ this._productBookEnableYn=t&&"Y"==t?"Y":"N"}
+ return this._productBookEnableYn}
+ get nextMarketYn(){
+ if(""==this._nextMarketYn){
+ const t=EL.getInstance().getClientData("NEXT_MARKET_YN");
+ this._nextMarketYn=t&&"N"==t?"N":"Y"}
+ return this._nextMarketYn}
+ async getProducts(t,i=!0){
+ return"Y"==this.productBookEnableYn?this.getAvailProducts(t,i):this.loadProducts(t,i)}
+ setProducts(t){
+ "Y"==this.productBookEnableYn?this.setAvailProducts(t):this.setData(t)}
+ async loadProducts(t,i=!0){
+ if(1==this.requestPending)return!1;
+ this.setRequestPending(!0);
+ const s=await hD.getInstance().shop.getProducts(!0);
+ return s.success?(this.setData(s.body),this.setRequestPending(!1),!0):(this.setRequestPending(!1),!1)}
+ async getAvailProducts(t,i=!0){
+ if(1==this.requestPending)return!1;
+ this.setRequestPending(!0);
+ const s=await hD.getInstance().shop.getAvailProducts(t,i);
+ return s.success?(this.setAvailProducts(s.body),this.setRequestPending(!1),!0):(this.setRequestPending(!1),!1)}
+ setAvailProducts(t){
+ if(!t)return;
+ const i=[];
+ for(const s of t)if("id"in s&&"count"in s){
+ const t=Number(s.id),e=Number(s.count),n=this.getById(t);
+ n&&(i.push(t),n.active=1,n.purchaseCount=e)}
+ for(const s of this.allProducts)i.includes(s.id)||(s.active=0)}
+ setRequestPending(t){
+ this.requestPending=t}
+ setData(t){
+ var i;
+ if(!t)return;
+ if(this.allProducts=[],this.packageList=[],this.periodList=[],this.normalList=[],this.wavePassList.length=0,this.reviewShopList.length=0,!t)return;
+ for(const e of t){
+ const t={
+ id:e.id??0,productId:e.productId??0,name:e.name??"",sku:e.sku??"",googleId:e.googleId??"",appleId:e.appleId??"",googleIdKr:e.googleIdKr??"",appleIdKr:e.appleIdKr??"",main:e.main??0,sub:e.sub??0,sub2:e.sub2??0,payback:e.payback??0,currency:e.currency??"",price:e.price??0,usdPrice:e.usdPrice??0,slxPrice:e.slxPrice??0,amount:e.amount??e.price??0,maxPurchase:e.maxPurchase??0,frequency:e.frequency??0,rewards:e.rewards??[],iconNames:e.iconNames??"",descriptions:e.descriptions??"",descriptionLangIds:e.descriptionLangIds??"",imageURL:e.imageURL??"",purchaseCount:0,active:e.active??0,targeting:e.targeting}
+ ;
+ if(this.allProducts.push(t),t.targeting){
+ const s=(null==(i=t.targeting.triggerEvent)?void 0:i.type)??"";
+ s&&(this.objTargeting[s]||(this.objTargeting[s]=[]),this.objTargeting[s].push(t.productId))}
+ else if(0==t.main)switch(t.sub){
+ case 0:this.packageList.push(t);
+ break;
+ case 1:this.periodList.push(t);
+ break;
+ case 2:this.normalList.push(t)}
+ else 1==t.main?0===t.sub&&this.wavePassList.push(t):-1==t.main&&this.reviewShopList.push(t)}
+ this.periodList.sort((t,i)=>{
+ var s,e,n,h;
+ let r=(null==(s=t.rewards)?void 0:s.some(t=>"yes"===t.subscribe||"assistant"===t.subType))?0:1,o=(null==(e=i.rewards)?void 0:e.some(t=>"yes"===t.subscribe||"assistant"===t.subType))?0:1;
+ return r!=o||(r=(null==(n=t.rewards)?void 0:n.some(t=>"buff"===t.type&&"speed"===t.subType))?0:1,o=(null==(h=i.rewards)?void 0:h.some(t=>"buff"===t.type&&"speed"===t.subType))?0:1),r-o}
+ );
+ const s=this.getByProductId(eK.Secretary);
+ s&&this.reviewShopList.unshift(s)}
+ getAll(){
+ return this.allProducts}
+ getById(t){
+ return this.allProducts.find(i=>i.id===t)}
+ getByProductId(t){
+ return this.allProducts.find(i=>i.productId===t)}
+ getProductIdByStoreProductId(t){
+ if(!t)return 0;
+ for(const i of this.allProducts)if(i.googleId===t||i.googleIdKr===t||i.appleId===t||i.appleIdKr===t||i.sku===t)return i.productId;
+ return 0}
+ getStoreProductIdByProductId(t){
+ const i=this.getByProductId(t);
+ if(!i)return"";
+ const s=EL.getInstance();
+ if("toss"==s.envPlatform)return i.sku;
+ if("capacitor"==s.envPlatform){
+ if(s.isGoogleClientKr())return i.googleIdKr;
+ if(s.isAppleClientKr())return i.appleIdKr;
+ if(s.isGoogleClient())return i.googleId;
+ if(s.isAppleClient())return i.appleId}
+ return""}
+ getWavePassList(){
+ return this.wavePassList}
+ getPriceStr(i){
+ const s=t.getInstance().getByProductId(i);
+ if(!s)return"";
+ let e=`$${
+ s.usdPrice}
+ `;
+ const n=EL.getInstance();
+ if(0==s.usdPrice||n.isTossClient()||n.isGoogleClientKr())e="usd"===s.currency?`$${
+ s.price}
+ `:`₩${
+ Math.round(s.price).toLocaleString()}
+ `;
+ else if(n.isAppleClientKr()){
+ let t;
+ try{
+ t=JSON.parse(n.getClientData("IN_APP_SHOP_APPLE_KR_PRICE"))}
+ catch(h){
+ t={
+ .99:"1100",1.99:"3300",2.99:"4400",4.99:"7700",7.99:"11000",9.99:"17000",14.99:"25000",19.99:"33000",24.99:"44000",29.99:"49000",34.99:"55000",49.99:"77000",99.99:"149000"}
+ }
+ e=`₩${
+ Math.round(t[String(s.usdPrice)]).toLocaleString()}
+ `}
+ return e}
+ getRedGemPrice(i){
+ const s=t.getInstance().getByProductId(i);
+ return s?Math.round(100*s.usdPrice):0}
+ isAvailableForPurchaseWithProductId(t){
+ const i=this.getByProductId(t);
+ return!!i&&this.isAvailableForPurchase(i)}
+ isAvailableForPurchase(t){
+ return!!t&&("N"==this.productBookEnableYn||0==t.maxPurchase||t.purchaseCount<t.maxPurchase)}
+ isSubscriptionProductWithProductId(t){
+ const i=this.getByProductId(t);
+ return!!i&&this.isSubscriptionProduct(i)}
+ isSubscriptionProduct(t){
+ if(!t)return!1;
+ const i=t.rewards;
+ return!!Array.isArray(i)&&i.some(t=>"yes"===(null==t?void 0:t.subscribe))}
+ isReviewShop(){
+ const t=EL.getInstance();
+ if(1==t.isAppleClientKr()||1==t.isAppleClient()){
+ const t=EL.getInstance().getClientData("IN_APP_SHOP_REVIEW");
+ return!(!t||"Y"!=t)}
+ return!1}
+ getUsdPriceByKrwPrice(t){
+ let i=0;
+ switch(t){
+ case 1100:i=.99;
+ break;
+ case 3300:i=1.99;
+ break;
+ case 4400:i=2.99;
+ break;
+ case 6600:i=4.99;
+ break;
+ case 14e3:case 14300:i=9.99;
+ break;
+ case 22e3:i=14.99;
+ break;
+ case 28600:case 29e3:i=19.99;
+ break;
+ case 33e3:i=24.99;
+ break;
+ case 44e3:i=29.99;
+ break;
+ case 48400:case 49e3:i=34.99;
+ break;
+ case 66e3:i=49.99;
+ break;
+ case 148500:case 149e3:i=99.99}
+ return i}
+ getRewardMessage(t){
+ if(!t||0===t.length)return AG.getText("GAME_347","상품이 지급되었습니다.");
+ const i=[];
+ return t.includes("buff:ads")&&i.push(AG.getText("GAME_348","광고 제거 상품이 적용되었습니다.")),t.includes("buff:speed")&&i.push(AG.getText("GAME_349","2배속 상품이 적용되었습니다.")),t.includes("buff:assistant")&&i.push(AG.getText("GAME_1242","전문비서가 고용되었습니다.")),t.includes("pass")&&i.push(AG.getText("GAME_350","WAVE 패스가 활성화되었습니다.")),t.includes("mail")&&i.push(AG.getText("GAME_351","상품이 메일로 전송되었습니다.")),0==i.length&&i.push(AG.getText("GAME_347","상품이 지급되었습니다.")),i.join("\n")}
+ getProductIdsWithHammer(){
+ if(!this._productIdsWithHammer){
+ let t;
+ this._productIdsWithHammer=[];
+ const i=this.allProducts.length;
+ for(let s=0;
+ s<i;
+ ++s){
+ if(t=this.allProducts[s],!t||!t.rewards)continue;
+ let i=!1;
+ const e=t.rewards.length;
+ for(let s=0;
+ s<e;
+ ++s)if("hammer"===t.rewards[s].type){
+ i=!0;
+ break}
+ i&&this._productIdsWithHammer.push(t.productId)}
+ }
+ return this._productIdsWithHammer}
+ getTargetingByType(t){
+ return this.objTargeting[t]}
+ }
+ ;
+ Kt(nK,"ShopDataManager"),zt(nK,"instance");
+ let hK=nK;
+ const rK=Object.freeze(Object.defineProperty({
+ __proto__:null,ShopDataManager:hK}
+ ,Symbol.toStringTag,{
+ value:"Module"}
+ )),oK=class extends tG{
- const X5=class extends aS{
- constructor(){
- super(),zt(this,"blocker"),zt(this,"allowRect"),zt(this,"highlightBorder"),zt(this,"dimParts",[]),this.createUI()}
- createUI(){
- for(let t=0;
- t<4;
- t++){
- const t=new Gf;
- t.alpha=.5,t.rect(0,0,1,1).fill(0),this.dimParts.push(t),this.addChild(t)}
- this.blocker=new Gf,this.blocker.rect(0,0,640,KA.stageHeight).fill(0),this.blocker.alpha=0,this.blocker.eventMode="static",this.addChild(this.blocker),this.highlightBorder=new Gf,this.addChild(this.highlightBorder),this.allowRect=new Pi(0,0,0,0),this.setBlockerEnabled(!1)}
- setClickArea(t,i,s,e){
- this.allowRect=new Pi(t,i,s,e),this.updateDim(),this.blocker.hitArea={
- contains:Kt((t,i)=>!this.allowRect.contains(t,i),"contains")}
- ,this.setBlockerEnabled(!0)}
- setBlockerEnabled(t){
- this.blocker.eventMode=t?"static":"none";
- for(const i of this.dimParts)i.visible=t;
- this.highlightBorder.visible=t}
- updateDim(){
- const t=KA.stageHeight,{
- x:i,y:s,width:e,height:n}
- =this.allowRect;
- this.dimParts[0].clear().rect(0,0,640,s).fill(0),this.dimParts[1].clear().rect(0,s,i,n).fill(0),this.dimParts[2].clear().rect(i+e,s,640-(i+e),n).fill(0),this.dimParts[3].clear().rect(0,s+n,640,t-(s+n)).fill(0),this.highlightBorder.clear().rect(i,s,e,n).stroke({
- color:16776960,width:3}
- )}
- }
- ;
- Kt(X5,"ClickAniLayer");
- let Y5=X5;
PetIcon 1 hunks, 351 statements
- updateLanguage(){
+ showStar(){
+ this.star.visible=!0}
+ hideStar(){
+ this.star.visible=!1}
+ }
+ ;
+ Kt(pK,"PetIcon");
+ let gK=pK;
+ var mK=(t=>(t[t.ROSTER=0]="ROSTER",t[t.HERO_LIST=1]="HERO_LIST",t[t.HERO_DETAIL=2]="HERO_DETAIL",t[t.BOOK=3]="BOOK",t[t.SHOP=4]="SHOP",t[t.HERO_PVP=5]="HERO_PVP",t[t.TOWER=6]="TOWER",t[t.TOWER_TEAM=7]="TOWER_TEAM",t))(mK||{
+ }
+ );
+ const wK=class extends Be{
+ constructor(){
+ super(),zt(this,"icon",new We(ZA.getTexture("UI_Ekkorr","Hero1"))),zt(this,"lblLevel",new YD("Lv.1",16777215,aD.DEFAULT_OUTLINE_FONT_OPTION_18)),zt(this,"lblEnhance",new YD("+1",16777215,aD.DEFAULT_OUTLINE_FONT_OPTION_18)),zt(this,"lblCount",new YD("1",16777215,aD.DEFAULT_OUTLINE_FONT_OPTION_24)),zt(this,"bg",new We(ZA.getTexture("UI_Ekkorr","HeroFrame1"))),zt(this,"cover",new We(ZA.getTexture("UI_Ekkorr","HeroCover1"))),zt(this,"mode",mK.HERO_LIST),zt(this,"trans",new We(ZA.getTexture("UI_Ekkorr","Trans0001"))),zt(this,"_active",!1),this.addChild(this.bg),this.addChild(this.icon),this.addChild(this.cover),this.addChild(this.lblLevel),this.addChild(this.lblEnhance),this.addChild(this.lblCount),this.addChild(this.trans),this.bg.scale.x=.88,this.cover.scale.x=.88,this.icon.height=this.bg.height-4,this.icon.scale.x=this.icon.scale.y,this.icon.x=1,this.icon.y=2,this.lblLevel.textColor=16777215,this.lblLevel.x=(this.icon.width-this.lblLevel.width)/2,this.lblLevel.y=this.bg.height-this.lblLevel.height-1,this.lblCount.textColor=16777215,this.lblCount.x=this.bg.width-this.lblCount.width-38,this.lblCount.y=this.bg.height-this.lblCount.height,this.lblCount.visible=!1,this.lblEnhance.x=this.bg.width-this.lblEnhance.width-2,this.lblEnhance.y=7,this.trans.scale=1.2,this.trans.x=5,this.trans.y=7,this.trans.visible=!1}
+ setData(t){
+ this.setTextures(t.base,t.grade);
+ const i=MV.getInstance().getMaxLevel(t.grade,t.trans);
+ this.lblLevel.text=`Lv.${
+ t.level}
+ `,this.lblLevel.textColor=t.level>=i?16763904:16777215,this.lblEnhance.text=`+${
+ t.enhance}
+ `,this.lblEnhance.x=this.bg.width-this.lblEnhance.width-30,this.lblLevel.x=(this.bg.width-15-this.lblLevel.width)/2,t.trans>0?(this.trans.visible=!0,this.trans.texture=ZA.getTexture("UI_Ekkorr",`Trans000${
+ t.trans}
+ `)):this.trans.visible=!1,this.mode===mK.HERO_LIST?(this.lblEnhance.visible=t.enhance>0,this.lblLevel.visible=!0,this.lblCount.visible=!1):this.mode===mK.ROSTER?(this.lblEnhance.visible=!1,this.lblLevel.visible=!1,this.lblCount.visible=!0):this.mode===mK.BOOK||this.mode===mK.SHOP?(this.lblEnhance.visible=!1,this.lblLevel.visible=!1,this.lblCount.visible=!1):this.mode===mK.HERO_PVP?(this.lblEnhance.visible=!1,this.lblLevel.visible=!0,this.lblCount.visible=!1):this.mode===mK.TOWER?(this.lblEnhance.visible=!1,this.lblLevel.visible=!1,this.lblCount.visible=!0,this.trans.visible=!1):this.mode===mK.TOWER_TEAM&&(this.lblEnhance.visible=!1,this.lblLevel.visible=!1,this.lblCount.visible=!1,this.trans.visible=!1)}
+ setTextures(t,i){
+ t>0?(this.icon.visible=!0,this.icon.texture=ZA.getTexture("UI_Ekkorr",`Hero${
+ t}
+ `)):this.icon.visible=!1,this.bg.texture=ZA.getTexture("UI_Ekkorr",`HeroFrame${
+ i}
+ `),this.cover.texture=ZA.getTexture("UI_Ekkorr",`HeroCover${
+ i}
+ `)}
+ setMode(t){
+ this.mode=t}
+ setNumber(t){
+ this.lblCount.text=t.toString()}
+ get active(){
+ return this._active}
+ set active(t){
+ this._active=t,t?(this.bg.tint=16777215,this.cover.tint=16777215,this.icon.tint=16777215,this.trans.tint=16777215,this.lblCount.textColor=16777215):(this.bg.tint=3355443,this.cover.tint=3355443,this.icon.tint=3355443,this.trans.tint=3355443,this.lblCount.textColor=3355443)}
+ showBackground(){
+ this.bg.visible=!0}
+ hideBackground(){
+ this.bg.visible=!1}
+ showIcon(){
+ this.icon.visible=!0}
+ hideIcon(){
+ this.icon.visible=!1}
+ showLevel(){
+ this.lblLevel.visible=!0}
+ hideLevel(){
+ this.lblLevel.visible=!1}
+ showEnhance(){
+ this.lblEnhance.visible=!0}
+ hideEnhance(){
+ this.lblEnhance.visible=!1}
+ setCountText(t){
+ this.lblCount.text=t,this.lblCount.visible=!0,this.lblCount.x=(this.bg.width-15-this.lblCount.width)/2}
+ hideTrans(){
+ this.trans.visible=!1}
+ setTransAlpha(t){
+ this.trans.alpha=t}
+ setDataWithKindNum(t,i=0){
+ if(t>0){
+ const i=vx.getInstance().getBookVO(t);
+ if(!i)return;
+ this.setTextures(i.base,i.grade)}
+ else this.setTextures(0,1);
+ i>0?(this.trans.visible=!0,this.trans.texture=ZA.getTexture("UI_Ekkorr",`Trans000${
+ i}
+ `)):this.trans.visible=!1,this.lblEnhance.visible=!1,this.lblLevel.visible=!1,this.lblCount.visible=!1}
+ }
+ ;
+ Kt(wK,"HeroIcon");
+ let vK=wK;
+ var bK=(t=>(t.gem="gem",t.redGem="redGem",t.gold="gold",t.medal="medal",t.honorCoin="honorCoin",t.guildPoint="guildPoint",t.guildCoin="guildCoin",t.raidCoin="raidCoin",t.hammer="hammer",t.hero="hero",t.instant="instant",t.ticket="ticket",t.trans="trans",t.pet="pet",t.petTicket="petTicket",t.petSelect="petSelect",t.heroGacha="heroGacha",t.heroSelect="heroSelect",t.heroTrans="heroTrans",t.treasure="treasure",t.treasureGacha="treasureGacha",t.treasureTrans="treasureTrans",t))(bK||{
+ }
+ );
+ const yK=class extends Be{
+ constructor(){
+ super(),zt(this,"bg"),zt(this,"img"),zt(this,"heroIcon"),zt(this,"petIcon"),zt(this,"lblNum"),zt(this,"_type",""),zt(this,"_amount",0),zt(this,"_grade",-1),zt(this,"_kindNum",-1),zt(this,"_subType",""),this.bg=new We(ZA.getTexture("UI_Ekkorr","Frame_Reward_01")),this.addChild(this.bg),this.img=new We(ZA.getTexture("UI_Ekkorr","UI_SHOP_GEM")),this.addChild(this.img),this.heroIcon=new vK,this.heroIcon.visible=!1,this.heroIcon.height=this.bg.height,this.heroIcon.scale.x=this.heroIcon.scale.y,this.addChild(this.heroIcon),this.petIcon=new gK,this.petIcon.visible=!1,this.petIcon.scale=.9,this.addChild(this.petIcon);
+ const t=aD.DEFAULT_OUTLINE_FONT_OPTION_18;
+ t.fill=aD.COLOR_WHITE,t.fontSize=18,this.lblNum=new YD("1",t.fill,t),this.addChild(this.lblNum),this.updateLayout()}
+ get width(){
+ return this.heroIcon.visible?this.heroIcon.width:this.bg.width}
+ get height(){
+ return this.heroIcon.visible?this.heroIcon.height:this.bg.height}
+ updateLayout(){
+ const t=this.bg.width,i=this.bg.height;
+ this.img.x=.5*(t-this.img.width),this.img.y=.5*(i-this.img.height)-3,this.heroIcon.visible?this.lblNum.x=.5*(this.heroIcon.width-this.lblNum.width)-7:this.lblNum.x=.5*(t-this.lblNum.width),this.lblNum.y=i-this.lblNum.height}
+ get type(){
+ return this._type}
+ get amount(){
+ return this._amount}
+ get grade(){
+ return this._grade}
+ get kindNum(){
+ return this._kindNum}
+ get subType(){
+ return this._subType}
+ setData(t,i,s=-1,e=-1,n=""){
+ this._type=t,this._amount=i,this._grade=s,this._kindNum=e,this._subType=n,this.img.visible=!1,this.bg.visible=!1,this.heroIcon.visible=!1,this.petIcon.visible=!1;
+ let h=1,r="",o="UI_Ekkorr";
+ t==bK.gem?(r="UI_SHOP_GEM",h=.85):t==bK.redGem?(r="UI_SHOP_RED_GEM",h=.83):t==bK.gold?(r="m_gold",h=.7):t==bK.honorCoin?(r="UI_COIN_Big",h=.8):t==bK.guildCoin||t==bK.guildPoint?(r="GUILD_COIN",h=1.6):t==bK.raidCoin?(r="RaidCoin_on",h=1.5):t==bK.hammer?(r="Icon_Hammer",o="UI",h=1.5):"dungeonTicket"==t?(r="DungeonTick",h=.8):t==bK.hero?(this.heroIcon.setDataWithKindNum(e),this.heroIcon.visible=!0):t==bK.ticket&&n==bK.heroGacha?r="Ticket_HeroGacha":t==bK.ticket&&n==bK.heroSelect?(r="Ticket_HeroSelect",h=.85):t==bK.trans&&n==bK.hero?r=9==this._grade?"Ticket_HeroTrans2":"Ticket_HeroTrans":t==bK.pet?(this.petIcon.setPet(e,1),this.petIcon.visible=!0):t==bK.petTicket||n==bK.petTicket||t==bK.ticket&&n==bK.pet?(r="PetTick",h=.9):t==bK.petSelect||n==bK.petSelect||t==bK.ticket&&n==bK.petSelect?(r="Ticket_PetSelect",h=.9):t==bK.ticket&&n==bK.treasureGacha?(r="Ticket_TreasureGacha",h=.95):t==bK.trans&&n==bK.treasure&&(r=7===this._grade?"Ticket_TreasureTrans7":"Ticket_TreasureTrans6"),r&&(this.img.scale=h,this.img.texture=ZA.getTexture(o,r),this.img.visible=!0,this.bg.visible=!0),this.lblNum.text=String(i),this.updateLayout()}
+ setDataFrom(t){
+ if(!t||!t.type||!t.amount)return;
+ let i=String(t.type),s=Number(t.amount),e="grade"in t?Number(t.grade):-1,n="kindNum"in t?Number(t.kindNum):-1,h="";
+ "subType"in t&&(h=t.subType),this.setData(i,s,e,n,h)}
+ reset(){
+ this._type="",this._amount=0,this._grade=-1,this._kindNum=-1,this._subType=""}
+ }
+ ;
+ Kt(yK,"RewardItem");
+ let _K=yK;
+ var MK,EK,AK=(t=>(t.EMPTY="",t.UNKNOWN="UNKNOWN",t.VERIFIED="VERIFIED",t.SUPERVISED="SUPERVISED",t.SUPERVISED_APPROVAL_PENDING="SUPERVISED_APPROVAL_PENDING",t.SUPERVISED_APPROVAL_DENIED="SUPERVISED_APPROVAL_DENIED",t.SHARED="SHARED",t.DECLINED="DECLINED",t.UNSUPPORTED="UNSUPPORTED",t))(AK||{
+ }
+ );
+ (EK=MK||(MK={
+ }
+ )).Unimplemented="UNIMPLEMENTED",EK.Unavailable="UNAVAILABLE";
+ const SK=class extends Error{
+ constructor(t,i,s){
+ super(t),this.message=t,this.code=i,this.data=s}
+ }
+ ;
+ Kt(SK,"CapacitorException");
+ let TK=SK;
+ const CK=Kt(t=>{
+ var i,s;
+ return(null==t?void 0:t.androidBridge)?"android":(null===(s=null===(i=null==t?void 0:t.webkit)||void 0===i?void 0:i.messageHandlers)||void 0===s?void 0:s.bridge)?"ios":"web"}
+ ,"getPlatformId"),kK=Kt(t=>{
+ const i=t.CapacitorCustomPlatform||null,s=t.Capacitor||{
+ }
+ ,e=s.Plugins=s.Plugins||{
+ }
+ ,n=Kt(()=>null!==i?i.name:CK(t),"getPlatform"),h=Kt(()=>"web"!==n(),"isNativePlatform"),r=Kt(t=>{
+ const i=c.get(t);
+ return!!(null==i?void 0:i.platforms.has(n()))||!!o(t)}
+ ,"isPluginAvailable"),o=Kt(t=>{
+ var i;
+ return null===(i=s.PluginHeaders)||void 0===i?void 0:i.find(i=>i.name===t)}
+ ,"getPluginHeader"),a=Kt(i=>t.console.error(i),"handleError"),c=new Map,l=Kt((t,h={
+ }
+ )=>{
+ const r=c.get(t);
+ if(r)return r.proxy;
+ const a=n(),l=o(t);
+ let u;
+ const d=Kt(async()=>(!u&&a in h?u=u="function"==typeof h[a]?await h[a]():h[a]:null!==i&&!u&&"web"in h&&(u=u="function"==typeof h.web?await h.web():h.web),u),"loadPluginImplementation"),f=Kt((i,e)=>{
+ var n,h;
+ if(!l){
+ if(i)return null===(h=i[e])||void 0===h?void 0:h.bind(i);
+ throw new TK(`"${
+ t}
+ " plugin is not implemented on ${
+ a}
+ `,MK.Unimplemented)}
+ {
+ const h=null==l?void 0:l.methods.find(t=>e===t.name);
+ if(h)return"promise"===h.rtype?i=>s.nativePromise(t,e.toString(),i):(i,n)=>s.nativeCallback(t,e.toString(),i,n);
+ if(i)return null===(n=i[e])||void 0===n?void 0:n.bind(i)}
+ }
+ ,"createPluginMethod"),p=Kt(i=>{
+ let s;
+ const e=Kt((...e)=>{
+ const n=d().then(n=>{
+ const h=f(n,i);
+ if(h){
+ const t=h(...e);
+ return s=null==t?void 0:t.remove,t}
+ throw new TK(`"${
+ t}
+ .${
+ i}
+ ()" is not implemented on ${
+ a}
+ `,MK.Unimplemented)}
+ );
+ return"addListener"===i&&(n.remove=async()=>s()),n}
+ ,"wrapper");
+ return e.toString=()=>`${
+ i.toString()}
+ () {
+  [capacitor code] }
+ `,Object.defineProperty(e,"name",{
+ value:i,writable:!1,configurable:!1}
+ ),e}
+ ,"createPluginMethodWrapper"),g=p("addListener"),m=p("removeListener"),w=Kt((t,i)=>{
+ const s=g({
+ eventName:t}
+ ,i),e=Kt(async()=>{
+ const e=await s;
+ m({
+ eventName:t,callbackId:e}
+ ,i)}
+ ,"remove"),n=new Promise(t=>s.then(()=>t({
+ remove:e}
+ )));
+ return n.remove=async()=>{
+ await e()}
+ ,n}
+ ,"addListenerNative"),v=new Proxy({
+ }
+ ,{
+ get(t,i){
+ switch(i){
+ case"$$typeof":return;
+ case"toJSON":return()=>({
+ }
+ );
+ case"addListener":return l?w:g;
+ case"removeListener":return m;
+ default:return p(i)}
+ }
+ }
+ );
+ return e[t]=v,c.set(t,{
+ name:t,proxy:v,platforms:new Set([...Object.keys(h),...l?[a]:[]])}
+ ),v}
+ ,"registerPlugin");
+ return s.convertFileSrc||(s.convertFileSrc=t=>t),s.getPlatform=n,s.handleError=a,s.isNativePlatform=h,s.isPluginAvailable=r,s.registerPlugin=l,s.Exception=TK,s.DEBUG=!!s.DEBUG,s.isLoggingEnabled=!!s.isLoggingEnabled,s}
+ ,"createCapacitor"),OK=Kt(t=>t.Capacitor=kK(t),"initCapacitorGlobal")("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{
+ }
+ ),IK=OK.registerPlugin,xK=class{
+ constructor(){
+ this.listeners={
+ }
+ ,this.retainedEventArguments={
+ }
+ ,this.windowListeners={
+ }
+ }
+ addListener(t,i){
+ let s=!1;
+ this.listeners[t]||(this.listeners[t]=[],s=!0),this.listeners[t].push(i);
+ const e=this.windowListeners[t];
+ e&&!e.registered&&this.addWindowListener(e),s&&this.sendRetainedArgumentsForEvent(t);
+ const n=Kt(async()=>this.removeListener(t,i),"remove");
+ return Promise.resolve({
+ remove:n}
+ )}
+ async removeAllListeners(){
+ this.listeners={
+ }
+ ;
+ for(const t in this.windowListeners)this.removeWindowListener(this.windowListeners[t]);
+ this.windowListeners={
+ }
+ }
+ notifyListeners(t,i,s){
+ const e=this.listeners[t];
+ if(e)e.forEach(t=>t(i));
+ else if(s){
+ let s=this.retainedEventArguments[t];
+ s||(s=[]),s.push(i),this.retainedEventArguments[t]=s}
+ }
+ hasListeners(t){
+ var i;
+ return!!(null===(i=this.listeners[t])||void 0===i?void 0:i.length)}
+ registerWindowListener(t,i){
+ this.windowListeners[i]={
+ registered:!1,windowEventName:t,pluginEventName:i,handler:Kt(t=>{
+ this.notifyListeners(i,t)}
+ ,"handler")}
+ }
+ unimplemented(t="not implemented"){
+ return new OK.Exception(t,MK.Unimplemented)}
+ unavailable(t="not available"){
+ return new OK.Exception(t,MK.Unavailable)}
+ async removeListener(t,i){
+ const s=this.listeners[t];
+ if(!s)return;
+ const e=s.indexOf(i);
+ this.listeners[t].splice(e,1),this.listeners[t].length||this.removeWindowListener(this.windowListeners[t])}
+ addWindowListener(t){
+ window.addEventListener(t.windowEventName,t.handler),t.registered=!0}
+ removeWindowListener(t){
+ t&&(window.removeEventListener(t.windowEventName,t.handler),t.registered=!1)}
+ sendRetainedArgumentsForEvent(t){
+ const i=this.retainedEventArguments[t];
+ i&&(delete this.retainedEventArguments[t],i.forEach(i=>{
+ this.notifyListeners(t,i)}
+ ))}
+ }
+ ;
+ Kt(xK,"WebPlugin");
+ let NK=xK;
+ const PK=Kt(t=>encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),"encode$6"),RK=Kt(t=>t.replace(/(%[\dA-F]{
+ 2}
+ )+/gi,decodeURIComponent),"decode$8"),DK=class extends NK{
+ async getCookies(){
+ const t=document.cookie,i={
+ }
+ ;
+ return t.split(";
+ ").forEach(t=>{
+ if(t.length<=0)return;
+ let[s,e]=t.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");
+ s=RK(s).trim(),e=RK(e).trim(),i[s]=e}
+ ),i}
+ async setCookie(t){
+ try{
+ const i=PK(t.key),s=PK(t.value),e=t.expires?`;
+  expires=${
+ t.expires.replace("expires=","")}
+ `:"",n=(t.path||"/").replace("path=",""),h=null!=t.url&&t.url.length>0?`domain=${
+ t.url}
+ `:"";
+ document.cookie=`${
+ i}
+ =${
+ s||""}
+ ${
+ e}
+ ;
+  path=${
+ n}
+ ;
+  ${
+ h}
+ ;
+ `}
+ catch(i){
+ return Promise.reject(i)}
+ }
+ async deleteCookie(t){
+ try{
+ document.cookie=`${
+ t.key}
+ =;
+  Max-Age=0`}
+ catch(i){
+ return Promise.reject(i)}
+ }
+ async clearCookies(){
+ try{
+ const t=document.cookie.split(";
+ ")||[];
+ for(const i of t)document.cookie=i.replace(/^ +/,"").replace(/=.*/,`=;
+ expires=${
+ (new Date).toUTCString()}
+ ;
+ path=/`)}
+ catch(t){
+ return Promise.reject(t)}
+ }
+ async clearAllCookies(){
+ try{
+ await this.clearCookies()}
+ catch(t){
+ return Promise.reject(t)}
BaseShopProductPopup 7 hunks, 335 statements
- constructor(t,i=640,s=400,e=2){
- super(),zt(this,"itemHeight",0),zt(this,"listWidth",0),zt(this,"listHeight",0),zt(this,"totalHeight",0),zt(this,"_height",0),zt(this,"ySpace",0),zt(this,"dragging",!1),zt(this,"startY",0),zt(this,"scrollY",0),zt(this,"velocity",0),zt(this,"touchData",null),zt(this,"itemList",[]),zt(this,"container",new Be),zt(this,"_dataProvider",[]),zt(this,"_dataLen",0),zt(this,"activePointerId",-1),zt(this,"itemClass"),zt(this,"maskBox"),zt(this,"bg"),zt(this,"onPointDownHandler"),zt(this,"onPointUpHandler"),zt(this,"onPointMoveHandler"),zt(this,"_activated",!1),zt(this,"recycleList",[]),zt(this,"yPrev",0),zt(this,"yHome",0),zt(this,"yMouse",0),zt(this,"vy",0),zt(this,"longTouchTime",0),zt(this,"longTouchPoint",new mi),zt(this,"longTouchStarted",!1),zt(this,"onDragStart"),zt(this,"dragSensingDistance",20),this.listWidth=i,this.listHeight=s,this.ySpace=e,this.itemHeight=(new t).height,this.itemClass=t,this.bg=new VI(i,s,16751001),this.bg.alpha=0,this.addChild(this.bg),this.eventMode="static",this.addChild(this.container),this.maskBox=new VI(i,s),this.addChild(this.maskBox),this.container.mask=this.maskBox,this.activateEvents=this.activateEvents.bind(this),this.deactivateEvents=this.deactivateEvents.bind(this),this.onPointDownHandler=this.onPointerDown.bind(this),this.onPointUpHandler=this.onPointerUp.bind(this),this.onPointMoveHandler=this.onPointerMove.bind(this),this.on("added",this.activateEvents),this.on("removed",this.deactivateEvents)}
- activateEvents(){
- this.on("pointerdown",this.onPointDownHandler)}
- deactivateEvents(){
- this.off("pointerdown",this.onPointDownHandler),KA.stage.off("pointermove",this.onPointMoveHandler),KA.app.canvas.removeEventListener("pointerup",this.onPointUpHandler)}
- set activated(t){
- this._activated=t;
- let i=this.itemList.length;
+ constructor(){
+ super(),zt(this,"lblName",new YD("",16777215,aD.DEFAULT_OUTLINE_FONT_OPTION_17)),zt(this,"lblDesc",new YD("",13421772,aD.DEFAULT_DESC_FONT_OPTION_16)),zt(this,"lblRewardsTitle",new YD("",16750848,aD.DEFAULT_OUTLINE_FONT_OPTION_17)),zt(this,"rewardContainer",new Be),zt(this,"rewardPool",[]),zt(this,"activeCount",0),zt(this,"btnBuy"),zt(this,"btnRedGem"),zt(this,"guideSecretary"),zt(this,"data",null),zt(this,"purchasing",!1),zt(this,"requestPending",!1),this.outSideClickHide=!0;
- s<i;
- s++)t?this.itemList[s].emit("activated",this.itemList[s]):this.itemList[s].emit("deactivated",this.itemList[s])}
- get activated(){
- return this._activated}
- set dataProvider(t){
- this._dataProvider=t,this._dataLen=t.length,this.totalHeight=this._dataLen*(this.itemHeight+this.ySpace)+2,this.createListItem()}
- executeShowingMotion(){
- let t,i=0,s=0,e=0;
- for(let n=0;
- n<this._dataLen;
- n++)t=this.itemList[n],i=this.container.y+t.y,i+this.itemHeight<0||i>this.listHeight?t.visible=!1:(t.visible=!0,s++,t.alpha=0,e=t.y,t.y=e+30+15*s,HI.to(t,{
- y:e,alpha:1,duration:.25,delay:2*s/60,ease:"power2.out"}
- ))}
- removeAll(){
- for(let t=this.itemList.length-1;
- t>=0;
- t--)this.container.removeChild(this.itemList[t]),this.recycleList.unshift(this.itemList[t]);
- this.itemList.length=0}
- clearAllCache(){
- for(const t of this.itemList)t.clearCache()}
- createListItem(){
- this.removeAll();
- let t,i=0;
- for(let s=0;
- s<this._dataLen;
- s++)t=this.recycleList.length>0?this.recycleList.shift():new this.itemClass,t.y=i,this.container.addChildAt(t,0),(t.y+this.container.y+this.itemHeight+10>0||t.y+this.container.y<this.listHeight)&&(t.index=s,t.data=this._dataProvider[s],t.setData(this._dataProvider[s])),this.itemList.push(t),t.list=this,i+=this.itemHeight+this.ySpace;
- this._height=i,i+this.container.y<this.listHeight&&i>this.listHeight&&(this.container.y=this.listHeight-i);
- for(let s=0;
- s<this._dataLen;
+ t<5;
- const t=this.itemList[s],i=this.container.y+t.y;
- (i+this.itemHeight<0||i>this.listHeight)&&(t.visible=!1)}
- }
- showTopItem(){
- this.container.y=0,this.updateListItem()}
- scrollTo(t){
- t<0&&(t=0);
- var i=-(this.itemHeight+this.ySpace)*t;
- this.listHeight>this.totalHeight?i=0:i<this.listHeight-this.totalHeight&&this.listHeight<this.totalHeight&&(i=this.listHeight-this.totalHeight),this.container.y=i,this.updateListItem()}
- updateItemData(){
- let t=this.itemList.length;
+ const t=new _K;
+ t.visible=!1,this.rewardPool.push(t),this.rewardContainer.addChild(t)}
+ this.contentContainer.addChild(this.lblName,this.lblDesc,this.lblRewardsTitle,this.rewardContainer),aD.setLabelWrapWidth(this.lblDesc,this.width-60),this.btnBuy=new aK("구매",120),this.btnBuy.color=QL.BROWN,this.btnBuy.height=55,this.btnBuy.width=120,this.addChild(this.btnBuy),this.btnBuy.onClick=this.onBuyClick.bind(this),this.btnRedGem=new UB("UI_RED_GEM_ICON","0"),this.btnRedGem.color=QL.BROWN,this.btnRedGem.height=this.btnBuy.height,this.btnRedGem.width=this.btnBuy.width,this.addChild(this.btnRedGem),this.btnRedGem.onClick=this.onRedGemClick.bind(this),this.btnBuy.visible=!1,this.btnRedGem.visible=!1}
+ showProduct(t){
+ this.data=null,this.outSideClickHide=!0,this.update(t),this.btnBuy.visible=!1,this.btnRedGem.visible=!1,this.updateLayout(),super.show()}
+ buyProduct(t){
+ this.data=t,this.outSideClickHide=!1,this.update(t);
+ const i=hK.getInstance();
+ this.btnBuy.text=i.getPriceStr(t.productId),this.btnRedGem.text=String(i.getRedGemPrice(t.productId)),this.btnBuy.visible=!0,this.btnRedGem.visible=!0,this.updateLayout(),super.show()}
+ update(t){
+ const i=AG.getText(`PRODUCT_NAME_${
+ t.id}
+ `,t.name??""),s=Math.max(60,this.width-60);
+ if(aD.setLabelWrapWidth(this.lblName,s),aD.setLabelWrapWidth(this.lblDesc,s),this.title=i,this.lblName.text=i,t.descriptionLangIds){
+ const i=t.descriptionLangIds.split("|").map(t=>AG.getText(t.trim(),""));
+ this.lblDesc.text=i.filter(t=>t).join("\n")||t.descriptions||""}
+ else this.lblDesc.text=(t.descriptions??"").replace(/\\n/g,"\n");
+ const e=(t.rewards??[]).map(t=>"instant"===t.type&&"dungeonTicket"===t.subType?{
+ ...t,type:"dungeonTicket"}
+ :t).filter(t=>"buff"!==t.type&&"bonusGem"!==t.type&&"pass"!==t.type);
+ this.buildRewards(e);
+ const n=e.length>0;
+ this.lblRewardsTitle.visible=!1,this.rewardContainer.visible=n,t.productId==eK.Secretary||t.productId==eK.Secretary_Day30?(this.guideSecretary||(this.guideSecretary=new uz,this.addChild(this.guideSecretary)),this.guideSecretary.setData(),this.guideSecretary.visible=!0):this.guideSecretary&&(this.guideSecretary.visible=!1)}
+ buildRewards(t){
+ for(const e of this.rewardPool)e.visible=!1;
+ this.activeCount=Math.min(t.length,this.rewardPool.length);
- i<t;
- i++)this.itemList[i].setData(this.itemList[i].data)}
- updateListItem(){
- let t,i=0;
- for(let s=0;
- s<this._dataLen;
- s++)t=this.itemList[s],i=this.container.y+t.y,i+this.itemHeight<0||i>this.listHeight?t.visible=!1:(t.visible=!0,null==t.data&&(t.index=s,t.data=this._dataProvider[s],t.setData(this._dataProvider[s])))}
- onPointerDown(t){
- this.activePointerId=t.pointerId,this.dragging=!1,this.yMouse=this.yPrev=this.yHome=t.globalY,this.vy=0,this.longTouchTime=0,this.longTouchPoint=this.toLocal(t.global),GM.getInstance().add(this.onDragEnter,this),GM.getInstance().remove(this.onFlickEnter,this),KA.stage.on("pointermove",this.onPointMoveHandler),KA.app.canvas.addEventListener("pointerup",this.onPointUpHandler)}
- onDragEnter(){
- if(0==this.dragging&&0==this.longTouchStarted&&++this.longTouchTime>50){
- this.longTouchStarted=!0;
- let t=this.longTouchPoint,i=Math.floor((t.y-this.container.y)/(this.itemHeight+this.ySpace));
- i<this._dataLen&&null!=this.itemList[i]&&null!=this.itemList[i].onLongClick&&this.itemList[i].onLongClick(t.x,(t.y-this.container.y)%(this.itemHeight+this.ySpace))}
- if(0==this.dragging&&Math.abs(this.yMouse-this.yHome)>this.dragSensingDistance&&(this.yPrev=this.yMouse,this.dragging=!0,this.onDragStart&&this.onDragStart()),1==this.longTouchStarted)return;
- if(0==this.dragging)return;
- const t=this.yMouse-this.yPrev;
- this.vy=.6*this.vy+.4*t,this.container.y>0||this.container.y<this.listHeight-this.totalHeight?this.container.y+=.3*t:this.container.y+=t,this.yPrev=this.yMouse,this.updateListItem()}
- onFlickEnter(){
- this.vy*=.975,this.container.y>=0||this.container.y<=0&&this.listHeight>=this.totalHeight?(this.vy*=.8,this.container.y+=.35*(0-this.container.y),Math.abs(this.vy)<.5&&Math.abs(this.container.y)<1&&(this.container.y=0,GM.getInstance().remove(this.onFlickEnter,this))):this.container.y<this.listHeight-this.totalHeight&&this.listHeight<this.totalHeight?(this.vy*=.8,this.container.y+=.35*(this.listHeight-this.totalHeight-this.container.y),Math.abs(this.vy)<.5&&Math.abs(this.container.y-this.listHeight+this.totalHeight)<1&&(this.container.y=this.listHeight-this.totalHeight,GM.getInstance().remove(this.onFlickEnter,this),0==Math.abs(this.vy)&&this.onEndOfList())):(this.container.y+=this.vy,Math.abs(this.vy)<.5&&GM.getInstance().remove(this.onFlickEnter,this)),this.updateListItem()}
- onEndOfList(){
- }
- onPointerMove(t){
- t.pointerId===this.activePointerId&&(this.yMouse=t.globalY)}
- onPointerUp(t){
- if(t.pointerId===this.activePointerId){
- if(this.activePointerId=-1,1==this.dragging)Math.abs(this.vy)<10?this.vy=3*this.vy:this.vy=2.5*this.vy,GM.getInstance().add(this.onFlickEnter,this);
- else if(0==this.longTouchStarted){
- let t=this.longTouchPoint,i=Math.floor((t.y-this.container.y)/(this.itemHeight+this.ySpace));
- i<this._dataLen&&null!=this.itemList[i]&&null!=this.itemList[i].onClick&&this.itemList[i].onClick(t.x,(t.y-this.container.y)%(this.itemHeight+this.ySpace))}
- this.longTouchStarted=!1,GM.getInstance().remove(this.onDragEnter,this),KA.stage.off("pointermove",this.onPointMoveHandler),KA.app.canvas.removeEventListener("pointerup",this.onPointUpHandler)}
- }
- updateScroll(){
- this.container.y=this.scrollY,this.clampScroll()}
- clampScroll(){
- const t=-(this.itemList.length*(this.itemHeight+this.ySpace)+(this.itemList.length-1)*this.ySpace-this.listHeight);
- this.container.y>0?this.container.y=0:this.container.y<t&&(this.container.y=t)}
- getItemList(){
- return this.itemList}
- getListWidth(){
- return this.listWidth}
- setListWidth(t,i=!0){
- if(t==this.listWidth)return;
- if(this.listWidth=t,this.bg.width=this.listWidth,this.maskBox.width=this.listWidth,0==i)return;
+ e<this.activeCount;
+ e++){
+ const i=this.rewardPool[e];
+ i.setDataFrom(t[e]),i.visible=!0}
- h<e;
- ++h)if(0==this.itemList[h].visible){
- s=h-1;
- break}
- const n=s*(this.itemHeight+this.ySpace)-this.ySpace;
- this.listHeight>n&&this.updateListItem()}
- getListHeight(){
- return this.listHeight}
- setListHeight(t,i=!0){
- if(t===this.listHeight)return;
- if(this.listHeight=t,this.bg.height=this.listHeight,this.maskBox.height=this.listHeight,0==i)return;
- let s=0;
- const e=this.itemList.length;
+ e<this.activeCount;
+ e++)i+=this.rewardPool[e].width;
+ i+=10*Math.max(0,this.activeCount-1);
+ let s=.5*(this.width-i);
- h<e;
- ++h)if(0==this.itemList[h].visible){
- s=h-1;
- break}
- const n=s*(this.itemHeight+this.ySpace)-this.ySpace;
- this.listHeight>n&&this.updateListItem()}
- getItemHeight(){
- return this.itemHeight}
- getTotalHeight(){
- return this.totalHeight}
- getContainerY(){
- return this.container.y}
- getYSpace(){
- return this.ySpace}
- getContainer(){
- return this.container}
- getDataLen(){
- return this._dataLen}
+ e<this.activeCount;
+ e++)this.rewardPool[e].x=s,s+=this.rewardPool[e].width+10}
+ updateLayout(){
+ this.lblName.x=Math.max(30,.5*(this.width-this.lblName.width)),this.lblName.y=80,this.lblDesc.x=Math.max(30,.5*(this.width-this.lblDesc.width)),this.lblDesc.y=this.lblName.y+this.lblName.height+12,this.rewardContainer.y=this.lblDesc.y+this.lblDesc.height+20,this.btnRedGem.x=.5*(this.width-this.btnRedGem.width-this.btnBuy.width-20),this.btnBuy.x=this.btnRedGem.x+this.btnRedGem.width+20;
+ const t=this.activeCount>0?this.rewardPool[0].height:0;
+ let i=this.rewardContainer.y+t+45;
+ this.guideSecretary&&this.guideSecretary.visible&&(this.guideSecretary.x=.5*(this.width-this.guideSecretary.width),this.guideSecretary.y=this.lblDesc.y+this.lblDesc.height+20,i+=this.guideSecretary.height),this.btnBuy.visible&&(this.btnBuy.y=i,this.btnRedGem.y=i,i+=this.btnBuy.height+40),this.height=i}
+ async onBuyClick(){
+ try{
+ if(!this.data)return;
+ if(this.purchasing)return;
+ this.purchasing=!0,await cz.getInstance().buyProduct(this.data.productId),this.purchasing=!1}
+ catch(_gt){
+ this.purchasing=!1}
+ finally{
+ this.hide()}
+ }
+ async onRedGemClick(){
+ if(!this.data)return;
+ const t=hK.getInstance(),i=t.getRedGemPrice(this.data.productId);
+ if(_L.redGem<i)return void mG.getInstance().show(AG.getText("GAME_952","붉은 보석이 부족합니다."));
+ const s=AG.getValueReplace("GAME_950","##",t.getRedGemPrice(this.data.productId),"붉은 보석 ##개를 소모하여 상품을 구매하시겠습니까?"),e=dK.getInstance();
+ e.setPositonRatioY(.45),e.show(s,this.onRedGemConfirm.bind(this))}
+ async onRedGemConfirm(){
+ var t;
+ if(!this.data)return;
+ if(1==this.requestPending)return;
+ this.setRequestPending(!0);
+ let i=await hD.getInstance().shop.confirmRedGemPayment(this.data.productId,!0);
+ if(0==i.success)return this.setRequestPending(!1),void mG.getInstance().showError(i);
+ this.hide(),this.setRequestPending(!1);
+ const s=this.data.productId,e=hK.getInstance().getByProductId(s);
+ let n;
+ try{
+ n=structuredClone(e)}
+ catch(o){
+ n=JSON.parse(JSON.stringify(e))}
+ i.body&&(_L.setUserInfo(i.body,!1),i.body.products&&hK.getInstance().setProducts(i.body.products));
+ const h=hK.getInstance().getRewardMessage(null==(t=i.body)?void 0:t.rewardTypes);
+ mG.getInstance().show(h),lS.getInstance().dispatchCustomEvent("PaymentSuccess",{
+ productId:s,productVo:n}
+ );
+ let r=!1;
+ for(const a of n.rewards)"instant"==a.type&&"petTicket"==a.subType&&(r=!0);
+ r&&this.updatePetTicket()}
+ async updatePetTicket(){
+ const{
+ SpiritLandDataManager:t}
+ =await Jt(async()=>{
+ const{
+ SpiritLandDataManager:t}
+ =await Promise.resolve().then(()=>bL);
+ return{
+ SpiritLandDataManager:t}
+ }
+ ,void 0);
+ t.getInstance().isDataLoaded=!1}
+ setRequestPending(t){
+ this.requestPending=t}
- Kt(QV,"ListOld");
+ Kt(dz,"BaseShopProductPopup");
+ let fz=dz;
+ const pz=class t extends fz{
+ constructor(){
+ super(),zt(this,"image"),zt(this,"timeContainer"),zt(this,"timeBg"),zt(this,"timeIcon"),zt(this,"timeLbl"),zt(this,"endTime",-1),zt(this,"count",0),zt(this,"onEnterUpdate",Kt(()=>{
+ ++this.count<60||(this.count=0,this.refresh())}
+ ,"onEnterUpdate")),zt(this,"onPaymentSuccessBind"),this.timeContainer=new Be,this.addChild(this.timeContainer),this.timeBg=new CM({
+ texture:ZA.getTexture("UI_Ekkorr","Progress_Bar_Bg_LightGreen"),leftWidth:20,topHeight:13,rightWidth:20,bottomHeight:13}
+ ),this.timeBg.alpha=.5,this.timeBg.width=160,this.timeContainer.addChild(this.timeBg),this.timeIcon=new We(ZA.getTexture("UI_Ekkorr","Icon_Time02")),this.timeIcon.x=20,this.timeContainer.addChild(this.timeIcon);
+ const t=aD.DEFAULT_FONT_OPTION_18;
+ t.fill=aD.COLOR_WHITE,t.stroke={
+ color:"#000000",width:3,join:"round"}
+ ,this.timeLbl=new YD("00:00:00",t.fill,t),this.timeLbl.x=this.timeIcon.x+this.timeIcon.width+10,this.timeLbl.y=.5*(this.timeBg.height-this.timeLbl.height),this.timeContainer.addChild(this.timeLbl)}
+ static getInstance(){
+ return this._instance||(this._instance=new t),this._instance}
+ async buyProduct2(t,i){
+ const s=hK.getInstance().getByProductId(t);
+ if(s){
+ if(this.endTime=i,this.refresh(),GM.getInstance().add(this.onEnterUpdate,this),!this.image){
+ this.image=new We,this.addChildAt(this.image,0);
+ const{
+ AssetPathManager:t}
+ =await Jt(async()=>{
+ const{
+ AssetPathManager:t}
+ =await Promise.resolve().then(()=>JA);
+ return{
+ AssetPathManager:t}
+ }
+ ,void 0),{
+ Assets:i}
+ =await Jt(async()=>{
+ const{
+ Assets:t}
+ =await Promise.resolve().then(()=>xM);
+ return{
+ Assets:t}
+ }
+ ,void 0),s=t.getAssetPath("CharShopProduct.png"),e=await i.load(s);
+ this.image.texture=e,this.image.x=.5*(this.width-this.image.width),this.image.y=-this.image.height}
+ this.buyProduct(s),this.setPaymentSuccess(!0)}
+ }
+ refresh(){
+ if(ix.time<this.endTime){
+ this.timeLbl.text=uU.displayTime(.001*(this.endTime-ix.time));
+ const t=this.timeBg.width-2*this.timeIcon.x-this.timeIcon.width;
+ this.timeLbl.x=this.timeIcon.x+this.timeIcon.width+.5*(t-this.timeLbl.width)}
+ else this.hide()}
+ hide(){
+ super.hide(),this.setPaymentSuccess(!1),GM.getInstance().remove(this.onEnterUpdate,this)}
+ updateLayout(){
+ super.updateLayout();
+ const t=this.activeCount>0?this.rewardPool[0].height:0;
+ let i=this.rewardContainer.y+t+30;
+ this.guideSecretary&&this.guideSecretary.visible&&(this.guideSecretary.x=.5*(this.width-this.guideSecretary.width),this.guideSecretary.y=this.lblDesc.y+this.lblDesc.height+20,i+=this.guideSecretary.height),this.timeContainer&&(this.timeContainer.x=.5*(this.width-this.timeContainer.width),this.timeContainer.y=i,i+=this.timeContainer.height+45),this.btnBuy.visible&&(this.btnBuy.y=i,this.btnRedGem.y=i,i+=this.btnBuy.height+40),this.height=i}
+ setPaymentSuccess(t){
+ lS.getInstance().removeEventListener("PaymentSuccess",this.onPaymentSuccessBind),t&&(this.onPaymentSuccessBind=this.onPaymentSuccess.bind(this),lS.getInstance().addEventListener("PaymentSuccess",this.onPaymentSuccessBind))}
+ onPaymentSuccess(t){
+ var i;
+ let s=-1;
+ t&&t.detail&&"productId"in t.detail&&(s=t.detail.productId),s===(null==(i=this.data)?void 0:i.productId)&&this.hide()}
+ }
+ ;
+ Kt(pz,"ShopProductPopupWithTimer"),zt(pz,"_instance");
+ let gz=pz;
+ const mz=class t extends Be{
+ constructor(){
+ super(),zt(this,"items",[]),zt(this,"itemPool",[]),zt(this,"onPaymentSuccessBind")}
+ static getInstance(){
+ return null==this.instance&&(this.instance=new t),this.instance}
+ add(t,i){
+ if(-1!==this.items.findIndex(i=>i.productId===t))return;
+ let s;
+ this.itemPool.length>0?(s=this.itemPool.pop(),s.reset()):s=new bz("Shop_Shortcut_01"),s.setData(t,i),s.onEndTime=()=>{
+ this.onItemEndTime()}
+ ,s.onClick=(t,i)=>{
+ gz.getInstance().buyProduct2(t,i)}
+ ,this.addChild(s),this.items.push(s),this.items.length>0&&this.setPaymentSuccess(!0),this.alignItems()}
+ alignItems(){
+ let t=0;
+ const i=this.items.length;
+ for(let s=0;
+ s<i;
+ ++s)this.items[s].y=t,t+=this.items[s].height+5}
+ onItemEndTime(){
+ this.update(-1),this.alignItems()}
+ setPaymentSuccess(t){
+ lS.getInstance().removeEventListener("PaymentSuccess",this.onPaymentSuccessBind),t&&(this.onPaymentSuccessBind=this.onPaymentSuccess.bind(this),lS.getInstance().addEventListener("PaymentSuccess",this.onPaymentSuccessBind))}
+ onPaymentSuccess(t){
+ let i=-1;
+ t&&t.detail&&"productId"in t.detail&&(i=t.detail.productId),-1!==i&&this.update(i)}
+ update(t){
+ const i=this.items.findIndex(i=>i.productId===t);
+ if(-1===i)return;
+ const s=this.items[i];
+ s.reset(),s.removeFromParent(),this.items.splice(i,1),this.itemPool.push(s),0==this.items.length&&this.setPaymentSuccess(!1)}
+ }
+ ;
+ Kt(mz,"ShopProductGroup"),zt(mz,"instance");
+ let wz=mz;
+ const vz=class extends mB{
+ constructor(t,i=1){
+ super("UI_Ekkorr",t,i),zt(this,"container"),zt(this,"timeBg"),zt(this,"timeLbl"),zt(this,"_productId",-1),zt(this,"_endTime",-1),zt(this,"count",0),zt(this,"onEnterUpdate",Kt(()=>{
+ ++this.count<60||(this.count=0,this.update())}
+ ,"onEnterUpdate")),zt(this,"onEndTime",null),this.container=new Be,this.addChild(this.container),this.container.x=this.bg.x,this.container.y=this.bg.y,this.bg.x=0,this.bg.y=0,this.container.addChild(this.bg),this.timeBg=new CM({
+ texture:ZA.getTexture("UI_Ekkorr","Progress_Bar_Bg"),leftWidth:20,topHeight:13,rightWidth:20,bottomHeight:13}
+ ),this.timeBg.alpha=.7,this.timeBg.width=70,this.timeBg.x=this.bg.x-.5*this.timeBg.width,this.timeBg.y=this.bg.y+.5*this.bg.height-.75*this.timeBg.height,this.container.addChild(this.timeBg);
+ const s=aD.DEFAULT_FONT_OPTION_15;
+ s.fill=aD.COLOR_WHITE,s.stroke={
+ color:"#000000",width:3,join:"round"}
+ ,this.timeLbl=new YD("00:00:00",s.fill,s),this.timeLbl.x=this.timeBg.x+.5*(this.timeBg.width-this.timeLbl.width),this.timeLbl.y=this.timeBg.y+.5*(this.timeBg.height-this.timeLbl.height)-1,this.container.addChild(this.timeLbl)}
+ get productId(){
+ return this._productId}
+ get endTime(){
+ return this._endTime}
+ setData(t,i){
+ this._productId=t,this._endTime=i,this.update(),GM.getInstance().add(this.onEnterUpdate,this)}
+ update(){
+ if(ix.time<this._endTime)this.timeLbl.text=uU.displayTime(.001*(this._endTime-ix.time)),this.timeLbl.x=this.timeBg.x+.5*(this.timeBg.width-this.timeLbl.width);
+ else{
+ const t=this.onEndTime;
+ this.reset(),t&&t()}
+ }
+ reset(){
+ this._endTime=-1,this._productId=-1,this.onEndTime=null,GM.getInstance().remove(this.onEnterUpdate,this)}
+ onDown(){
+ this.container.scale.set(.9*this.iconScale)}
+ onUp(){
+ this.container.scale.set(1*this.iconScale),KL.getInstance().playSFX(KL.SFX_NORMAL_CLICK),WL(),this.onClick&&this.onClick(this._productId,this._endTime)}
+ }
+ ;
+ Kt(vz,"ShopProductItem");
+ let bz=vz;
+ var yz=(t=>(t.ACCOUNT_CREATE="ACCOUNT_CREATE",t))(yz||{
+ }
+ );
+ const _z=class t{
+ static getInstance(){
+ return this._instance||(this._instance=new t),this._instance}
+ doAccountCreate(){
+ const t=hK.getInstance(),i=t.getTargetingByType(yz.ACCOUNT_CREATE);
+ if(!i)return;
+ const s=t.getByProductId(i[0]);
+ if(!s||!s.active)return;
+ let e=new Date(_L.regTime);
+ const n=EL.getInstance().getClientData("PRODUCT_START_TIME_29");
+ if(n){
+ let t=new Date(n);
+ e.getTime()<t.getTime()&&(e=t)}
+ const h=s.targeting.durationMinutes??0;
+ let r=e.getTime()+60*h*1e3;
+ r<ix.time||t.isAvailableForPurchase(s)&&wz.getInstance().add(s.productId,r)}
+ }
+ ;
+ Kt(_z,"ShopProductTrigger"),zt(_z,"_instance");
FriendInviteManager 5 hunks, 193 statements
- ));
- var Y2=(t=>(t[t.Secretary=7001]="Secretary",t[t.Secretary_Day30=7002]="Secretary_Day30",t))(Y2||{
- }
- );
- const J2=class t{
- constructor(){
- zt(this,"_unlockWave",10),zt(this,"_productBookEnableYn",""),zt(this,"_nextMarketYn",""),zt(this,"allProducts",[]),zt(this,"packageList",[]),zt(this,"periodList",[]),zt(this,"normalList",[]),zt(this,"wavePassList",[]),zt(this,"reviewShopList",[]),zt(this,"requestPending",!1),zt(this,"_productIdsWithHammer",null),zt(this,"objTargeting",{
- }
- )}
- static getInstance(){
- return this.instance||(this.instance=new t),this.instance}
- get unlockWave(){
- return this._unlockWave}
- get productBookEnableYn(){
- if(""==this._productBookEnableYn){
- const t=EL.getInstance().getClientData("PRODUCT_BOOK_ENABLE");
- this._productBookEnableYn=t&&"Y"==t?"Y":"N"}
- return this._productBookEnableYn}
- get nextMarketYn(){
- if(""==this._nextMarketYn){
- const t=EL.getInstance().getClientData("NEXT_MARKET_YN");
- this._nextMarketYn=t&&"N"==t?"N":"Y"}
- return this._nextMarketYn}
- async getProducts(t,i=!0){
- return"Y"==this.productBookEnableYn?this.getAvailProducts(t,i):this.loadProducts(t,i)}
- setProducts(t){
- "Y"==this.productBookEnableYn?this.setAvailProducts(t):this.setData(t)}
- async loadProducts(t,i=!0){
- if(1==this.requestPending)return!1;
- this.setRequestPending(!0);
- const s=await hD.getInstance().shop.getProducts(!0);
- return s.success?(this.setData(s.body),this.setRequestPending(!1),!0):(this.setRequestPending(!1),!1)}
- async getAvailProducts(t,i=!0){
- if(1==this.requestPending)return!1;
- this.setRequestPending(!0);
- const s=await hD.getInstance().shop.getAvailProducts(t,i);
- return s.success?(this.setAvailProducts(s.body),this.setRequestPending(!1),!0):(this.setRequestPending(!1),!1)}
- setAvailProducts(t){
- if(!t)return;
- const i=[];
- for(const s of t)if("id"in s&&"count"in s){
- const t=Number(s.id),e=Number(s.count),n=this.getById(t);
- n&&(i.push(t),n.active=1,n.purchaseCount=e)}
- for(const s of this.allProducts)i.includes(s.id)||(s.active=0)}
- setRequestPending(t){
- this.requestPending=t}
- setData(t){
- var i;
- if(!t)return;
- if(this.allProducts=[],this.packageList=[],this.periodList=[],this.normalList=[],this.wavePassList.length=0,this.reviewShopList.length=0,!t)return;
- for(const e of t){
- const t={
- id:e.id??0,productId:e.productId??0,name:e.name??"",sku:e.sku??"",googleId:e.googleId??"",appleId:e.appleId??"",googleIdKr:e.googleIdKr??"",appleIdKr:e.appleIdKr??"",main:e.main??0,sub:e.sub??0,sub2:e.sub2??0,payback:e.payback??0,currency:e.currency??"",price:e.price??0,usdPrice:e.usdPrice??0,slxPrice:e.slxPrice??0,amount:e.amount??e.price??0,maxPurchase:e.maxPurchase??0,frequency:e.frequency??0,rewards:e.rewards??[],iconNames:e.iconNames??"",descriptions:e.descriptions??"",descriptionLangIds:e.descriptionLangIds??"",imageURL:e.imageURL??"",purchaseCount:0,active:e.active??0,targeting:e.targeting}
- ;
- if(this.allProducts.push(t),t.targeting){
- const s=(null==(i=t.targeting.triggerEvent)?void 0:i.type)??"";
- s&&(this.objTargeting[s]||(this.objTargeting[s]=[]),this.objTargeting[s].push(t.productId))}
- else if(0==t.main)switch(t.sub){
- case 0:this.packageList.push(t);
- break;
- case 1:this.periodList.push(t);
- break;
- case 2:this.normalList.push(t)}
- else 1==t.main?0===t.sub&&this.wavePassList.push(t):-1==t.main&&this.reviewShopList.push(t)}
- this.periodList.sort((t,i)=>{
- var s,e,n,h;
- let r=(null==(s=t.rewards)?void 0:s.some(t=>"yes"===t.subscribe||"assistant"===t.subType))?0:1,o=(null==(e=i.rewards)?void 0:e.some(t=>"yes"===t.subscribe||"assistant"===t.subType))?0:1;
- return r!=o||(r=(null==(n=t.rewards)?void 0:n.some(t=>"buff"===t.type&&"speed"===t.subType))?0:1,o=(null==(h=i.rewards)?void 0:h.some(t=>"buff"===t.type&&"speed"===t.subType))?0:1),r-o}
- );
- const s=this.getByProductId(Y2.Secretary);
- s&&this.reviewShopList.unshift(s)}
- getAll(){
- return this.allProducts}
- getById(t){
- return this.allProducts.find(i=>i.id===t)}
- getByProductId(t){
- return this.allProducts.find(i=>i.productId===t)}
- getProductIdByStoreProductId(t){
- if(!t)return 0;
- for(const i of this.allProducts)if(i.googleId===t||i.googleIdKr===t||i.appleId===t||i.appleIdKr===t||i.sku===t)return i.productId;
- return 0}
- getStoreProductIdByProductId(t){
- const i=this.getByProductId(t);
- if(!i)return"";
- const s=EL.getInstance();
- if("toss"==s.envPlatform)return i.sku;
- if("capacitor"==s.envPlatform){
- if(s.isGoogleClientKr())return i.googleIdKr;
- if(s.isAppleClientKr())return i.appleIdKr;
- if(s.isGoogleClient())return i.googleId;
- if(s.isAppleClient())return i.appleId}
- return""}
- getWavePassList(){
- return this.wavePassList}
- getPriceStr(i){
- const s=t.getInstance().getByProductId(i);
- if(!s)return"";
- let e=`$${
- s.usdPrice}
- `;
- const n=EL.getInstance();
- return(0==s.usdPrice||n.isTossClient()||n.isGoogleClientKr()||n.isAppleClientKr())&&(e="usd"===s.currency?`$${
- s.price}
- `:`₩${
- Math.round(s.price).toLocaleString()}
- `),e}
- getRedGemPrice(i){
- const s=t.getInstance().getByProductId(i);
- return s?Math.round(100*s.usdPrice):0}
- isAvailableForPurchaseWithProductId(t){
- const i=this.getByProductId(t);
- return!!i&&this.isAvailableForPurchase(i)}
- isAvailableForPurchase(t){
- return!!t&&("N"==this.productBookEnableYn||0==t.maxPurchase||t.purchaseCount<t.maxPurchase)}
- isSubscriptionProductWithProductId(t){
- const i=this.getByProductId(t);
- return!!i&&this.isSubscriptionProduct(i)}
- isSubscriptionProduct(t){
- if(!t)return!1;
- const i=t.rewards;
- return!!Array.isArray(i)&&i.some(t=>"yes"===(null==t?void 0:t.subscribe))}
- isReviewShop(){
- const t=EL.getInstance();
- if(1==t.isAppleClientKr()||1==t.isAppleClient()){
- const t=EL.getInstance().getClientData("IN_APP_SHOP_REVIEW");
- return!(!t||"Y"!=t)}
+ )),b3=class t{
+ static get opened(){
- getUsdPriceByKrwPrice(t){
- let i=0;
- switch(t){
- case 1100:i=.99;
- break;
- case 3300:i=1.99;
- break;
- case 4400:i=2.99;
- break;
- case 6600:i=4.99;
- break;
- case 14e3:case 14300:i=9.99;
- break;
- case 22e3:i=14.99;
- break;
- case 28600:case 29e3:i=19.99;
- break;
- case 33e3:i=24.99;
- break;
- case 44e3:i=29.99;
- break;
- case 48400:case 49e3:i=34.99;
- break;
- case 66e3:i=49.99;
- break;
- case 148500:case 149e3:i=99.99}
- return i}
- getRewardMessage(t){
- if(!t||0===t.length)return AG.getText("GAME_347","상품이 지급되었습니다.");
- const i=[];
- return t.includes("buff:ads")&&i.push(AG.getText("GAME_348","광고 제거 상품이 적용되었습니다.")),t.includes("buff:speed")&&i.push(AG.getText("GAME_349","2배속 상품이 적용되었습니다.")),t.includes("buff:assistant")&&i.push(AG.getText("GAME_1242","전문비서가 고용되었습니다.")),t.includes("pass")&&i.push(AG.getText("GAME_350","WAVE 패스가 활성화되었습니다.")),t.includes("mail")&&i.push(AG.getText("GAME_351","상품이 메일로 전송되었습니다.")),0==i.length&&i.push(AG.getText("GAME_347","상품이 지급되었습니다.")),i.join("\n")}
- getProductIdsWithHammer(){
- if(!this._productIdsWithHammer){
- let t;
- this._productIdsWithHammer=[];
- const i=this.allProducts.length;
+ static async getMyReferralCode(){
+ if(this._referralCode)return this._referralCode;
+ if(this.requestPending1)return this._referralCode;
+ this.requestPending1=!0;
+ const t=await hD.getInstance().referral.getMyReferralCode();
+ try{
+ const i=new URL(t);
+ Array.from(i.searchParams.keys()).length>0&&(this._referralCode=t)}
+ catch(i){
+ }
+ return this.requestPending1=!1,this._referralCode}
+ static async getMyReferralStatus(t,i=!1){
+ this.requestPending2||(this.requestPending2=!0,this.setStatusData({
+ totalReferrals:10,qualifiedReferrals:7,claimed:2,milestoneRewards:[{
+ milestone:10,weaponGrade:3}
+ ,{
+ milestone:20,weaponGrade:3}
+ ,{
+ milestone:30,weaponGrade:3}
+ ,{
+ milestone:40,weaponGrade:4}
+ ,{
+ milestone:50,weaponGrade:4}
+ ]}
+ ),this.requestPending2=!1,lS.getInstance().dispatchCustomEvent("ReferralStatus"))}
+ static setStatusData(t){
+ this._totalReferrals=Number(t.totalReferrals),this._qualifiedReferrals=Number(t.qualifiedReferrals),this._claimed=Number(t.claimed);
+ const i=t.milestoneRewards;
+ if(0==this.rewardList.length&&"length"in i){
+ const t=i[i.length-1].milestone;
+ for(let i=0;
+ i<t;
+ ++i)this.rewardList.push([{
+ type:"gem",amount:this.GEM_PER_FRIEND}
+ ]);
+ const s=i.length;
- if(t=this.allProducts[s],!t||!t.rewards)continue;
- let i=!1;
- const e=t.rewards.length;
- for(let s=0;
- s<e;
- ++s)if("hammer"===t.rewards[s].type){
- i=!0;
- break}
- i&&this._productIdsWithHammer.push(t.productId)}
+ const t=Number(i[e].milestone),s=Number(i[e].weaponGrade);
+ this.rewardList[t-1].push({
+ type:"weapon",amount:1,grade:s}
+ )}
- return this._productIdsWithHammer}
- getTargetingByType(t){
- return this.objTargeting[t]}
+ }
+ static get totalReferrals(){
+ return this._totalReferrals}
+ static get qualifiedReferrals(){
+ return this._qualifiedReferrals}
+ static get claimed(){
+ return this._claimed}
+ static getRewardList(){
+ return this.rewardList}
+ static async claimRewards(i){
+ if(this.requestPending3)return;
+ this.requestPending3=!0;
+ const s=await hD.getInstance().referral.claimReward(i,!0);
+ if(0==s.success){
+ this.requestPending3=!1,lS.getInstance().dispatchCustomEvent("ReferralStatus");
+ let e=s.errorMessage;
+ const n=s.error;
+ return"INSUFFICIENT_REFERRAL"==n?e=AG.getValueReplaceMulti("GAME_145",["##","@@"],[t.FRIEND_LEVEL,i]):"ALREADY_CLAIMED"==n&&(e=AG.getText("COMMON_276","이미 보상을 받았습니다.")),void mG.getInstance().show(e)}
+ "status"in s.body&&this.setStatusData(s.body.status),this.requestPending3=!1,lS.getInstance().dispatchCustomEvent("ReferralStatus",s)}
+ static hasReward(){
+ return this.claimed<this.qualifiedReferrals}
- Kt(J2,"ShopDataManager"),zt(J2,"instance");
+ Kt(b3,"FriendInviteManager"),zt(b3,"FRIEND_LEVEL",50),zt(b3,"GEM_PER_FRIEND",100),zt(b3,"_referralCode",""),zt(b3,"requestPending1",!1),zt(b3,"requestPending2",!1),zt(b3,"_totalReferrals",0),zt(b3,"_qualifiedReferrals",0),zt(b3,"_claimed",0),zt(b3,"rewardList",[]),zt(b3,"requestPending3",!1);
HelpDataManager 1 hunks, 108 statements
- const R5=[[1,1,1,"성","성은 우리가 지켜야하는 기지입니다","HELP_TITLE_1","HELP_1"],[2,1,2,"성","성이 파괴되면, 환생하여 다시 진행해야 합니다.","HELP_TITLE_1","HELP_2"],[3,1,3,"성","신전에서 생명의 비술을 연구하면, 성이 파괴되어도 이어할 수 있습니다.","HELP_TITLE_1","HELP_4"],[4,1,4,"성","성은 훈장을 사용하여 영구히 유지되는 강화를 진행할 수 있습니다.","HELP_TITLE_1","HELP_3"],[5,2,1,"영웅","영웅은 최전방에서 성을 보호하고 적을 물리치는 아군입니다.","HELP_TITLE_2","HELP_5"],[6,2,2,"영웅","병영에서 배치를 통해 출전시킨 영웅만 전투에 나서게 됩니다. 대기중인 영웅들을 지금 출전시켜 보세요!","HELP_TITLE_2","HELP_6"],[7,3,1,"퀘스트","퀘스트를 통해 골드를 획득할 수 있습니다.","HELP_TITLE_3","HELP_7"],[8,3,2,"퀘스트","게이지가 찰때마다 골드를 획득합니다.","HELP_TITLE_3","HELP_8"],[9,3,3,"퀘스트","레벨업을 하면, 획득하는 골드가 늘어납니다.","HELP_TITLE_3","HELP_9"],[10,3,4,"퀘스트","다음 단계 퀘스트를 오픈하면, 더 많은 골드를 획득할 수 있습니다.","HELP_TITLE_3","HELP_10"],[11,4,1,"환생","성이 파괴되면, 환생을 해야합니다.","GAME_5","HELP_11"],[12,4,2,"환생","10 wave 이상에서는 언제든 환생을 할 수 있습니다.","HELP_TITLE_4","HELP_12"],[13,4,3,"환생","환생을 하면, ( 훈장 )을 얻게 됩니다.","HELP_TITLE_4","HELP_13"],[14,4,4,"환생","( 훈장 )은 게임에서 가장 중요한 재화로, 영웅과 성을 강화하는데 사용됩니다.","HELP_TITLE_4","HELP_14"],[15,4,5,"환생","높은 웨이브에서 환생할수록 (훈장)을 더 많이 획득할 수 있습니다.","HELP_TITLE_4","HELP_15"],[16,5,1,"기사단","기사단 레벨은 최고 도달 웨이브를 기준으로 산정됩니다. (100 웨이브당 1 레벨)","HELP_TITLE_5","HELP_16"],[17,5,2,"기사단","무한랭킹전/던전 등에서 영웅의 레벨은 기사단 레벨을 기준으로 결정됩니다.","HELP_TITLE_5","HELP_17"],[18,6,1,"영웅 - 사제","사제에게는 ( 신의 은총 )이라는 스킬이 있습니다.","HELP_TITLE_6","HELP_18"],[19,6,2,"영웅 - 사제","( 신의 은총 )은 확률적으로 발동하는데, 2분 동안 게임 속도를 300% 올려줍니다.","HELP_TITLE_6","HELP_19"],[20,6,3,"영웅 - 사제","사제를 여러명 가질수록, (신의 은총) 스킬이 발동할 확률이 높아집니다.","HELP_TITLE_6","HELP_20"],[21,7,1,"영웅 - 페어리","엘프의 비술은 확률적으로 웨이브를 1씩 건너뛰는 스킬을 가지고 있습니다.","HELP_TITLE_7","HELP_21"],[22,7,2,"영웅 - 페어리","페어리는 엘프의 비술 스킬을 가지고 있습니다.","HELP_TITLE_7","HELP_22"],[23,7,3,"영웅 - 페어리","페어리를 많이 보유할수록, 웨이브를 1씩 건너뛰어 빠르게 전진할 수 있습니다.","HELP_TITLE_7","HELP_23"],[24,8,1,"영웅 - 암흑 궁병","암흑 궁병은 환생시, 시작 웨이브를 올려주는 스킬을 가지고 있습니다.","HELP_TITLE_8","HELP_24"],[25,8,2,"영웅 - 암흑 궁병","암흑 궁병을 많이 보유할수록, 환생후 높은 웨이브에서 시작할 수 있습니다.","HELP_TITLE_8","HELP_25"],[26,8,3,"영웅 - 암흑 궁병","( 암흑궁병을 10명 배치하고, 1000층에서 환생하면, 500층에서 시작합니다. )","HELP_TITLE_8","HELP_26"]],D5=class t{
- constructor(){
- zt(this,"items"),this.items=R5.map(([t,i,s,e,n,h,r])=>({
- kindNum:t,main:i,sub:s,title:AG.getText(h,e),desc:AG.getText(r,n)}
- ))}
- static getInstance(){
- return null==this.instance&&(this.instance=new t),this.instance}
- getMainList(){
- const t=new Set,i=[];
- for(const s of this.items)t.has(s.main)||(t.add(s.main),i.push(s));
- return i}
- getSubsByMain(t){
- return this.items.filter(i=>i.main===t).sort((t,i)=>t.sub-i.sub)}
- getIconName(t){
- return{
- 1:"Icon_Help_Castle",2:"Icon_Help_Hero",3:"Icon_Help_Quest",4:"Icon_Help_Revive",5:"Icon_Help_Knight",6:"Icon_Help_Prist",7:"Icon_Help_Pairy",8:"Icon_Help_DarkArche"}
- [t]??`Help_${
- t}
- _1`}
- getImageName(t,i){
- return`Help_${
- t}
- _${
- i}
- `}
- }
- ;
- Kt(D5,"HelpDataManager"),zt(D5,"instance",null);
- let L5=D5;
- const G5=class extends Be{
- constructor(){
- super(),zt(this,"top"),zt(this,"bottom"),zt(this,"bg"),zt(this,"bgContainer"),zt(this,"btnClose",new nG),zt(this,"txtTitle"),zt(this,"topOverlap",12),zt(this,"bottomOverlap",15),zt(this,"_width",574),zt(this,"_height",868),zt(this,"_positionY",-1),zt(this,"outSideClickHide",!1),zt(this,"onPointerDownHandler"),this.createBG(),this.onPointerDownHandler=this.onPointerDown.bind(this)}
- createBG(){
- this.bgContainer=new Be,this.addChild(this.bgContainer),this.bg=new CM({
- texture:ZA.getTexture("UI_Ekkorr","Popup_Frame"),leftWidth:30,topHeight:30,rightWidth:30,bottomHeight:30}
- ),this.bg.width=this._width,this.bgContainer.addChild(this.bg),this.top=new CM({
- texture:ZA.getTexture("UI_Ekkorr","Base_Title_up"),leftWidth:200,topHeight:54,rightWidth:200,bottomHeight:14}
- ),this.bgContainer.addChild(this.top),this.bottom=new CM({
- texture:ZA.getTexture("UI_Ekkorr","Base_Title_Down"),leftWidth:200,topHeight:27,rightWidth:200,bottomHeight:16}
- ),this.bgContainer.addChild(this.bottom),this.bottom.eventMode="none",this.top.x=.5*(this.bg.width-this.top.width),this.bottom.x=.5*(this.bg.width-this.bottom.width),this.bottom.y=this._height-this.bottom.height,this.bg.y=this.top.height-this.topOverlap,this.bg.height=this.bottom.y-this.bg.y+this.bottomOverlap,this.btnClose.x=this.top.x+this.top.width-this.btnClose.width-35,this.btnClose.y=18,this.addChild(this.btnClose),this.btnClose.onClick=this.onCloseBtnClick.bind(this),this.txtTitle=new YD("",16777215,aD.DEFAULT_OUTLINE_FONT_OPTION_20),this.txtTitle.x=.5*(this.top.width-this.txtTitle.width),this.txtTitle.y=22,this.addChild(this.txtTitle),aD.setLabelWrapWidth(this.txtTitle,this._width-40)}
- setTitle(t){
- this.txtTitle.text=t,this.txtTitle.x=.5*(this.top.width-this.txtTitle.width),this.txtTitle.y=22}
- show(t="",i=null,s=null){
- this.pivot.set(this.width/2,this.height/2),this.position.set(320,this.getPositionY()),this.scale.set(.1),HI.to(this.scale,{
- x:1,y:1,duration:.2,ease:"back.out",onComplete:Kt(()=>{
- this.onShowMotionComplete()}
- ,"onComplete")}
- ),IL.getInstance().addPopup(this)}
- onShowMotionComplete(){
- KA.stage.on("pointertap",this.onPointerDownHandler)}
- hide(){
- this.parent&&HI.to(this.scale,{
- x:.8,y:.8,duration:.15,ease:"back.in",onComplete:Kt(()=>{
- this.onHideMotionComplete()}
- ,"onComplete")}
- )}
- onHideMotionComplete(){
- this.hideImmediately()}
- hideImmediately(){
- IL.getInstance().removePopup(this),KA.stage.off("pointertap",this.onPointerDownHandler),this.resetPostionY()}
- onCloseBtnClick(){
- this.hide()}
- get width(){
- return this._width}
- set width(t){
- t!=this._width&&(this._width=t,this.bg.width=this._width,this.top.width=this._width+20,this.bottom.width=this._width+20,this.top.x=.5*(this._width-this.top.width),this.bottom.x=.5*(this._width-this.bottom.width),this.txtTitle&&(aD.setLabelWrapWidth(this.txtTitle,this._width-40),this.txtTitle.x=.5*(this.top.width-this.txtTitle.width),this.txtTitle.y=22),this.btnClose&&(this.btnClose.x=this.top.x+this.top.width-this.btnClose.width-35))}
- get height(){
- return this._height}
- set height(t){
- t!=this._height&&(this._height=t,this.bottom.y=this._height-this.bottom.height,this.bg.height=this.bottom.y-this.bg.y+this.bottomOverlap)}
- getBaseX(){
- return this.bg.x}
- getBaseY(){
- return this.bg.y}
- getPositionY(){
- return-1===this._positionY&&(this._positionY=this.getDefaultPositionY()),this._positionY}
- getDefaultPositionY(){
- return Math.floor((KA.safeHeight-this.height)*(3/7))+.5*this.height}
- resetPostionY(){
- this._positionY=this.getDefaultPositionY()}
- setPositonRatioY(t){
- this._positionY=KA.stageHeight*t}
- onPointerDown(t){
- 0!=this.outSideClickHide&&(this.getPopupBounds().containsPoint(t.global.x,t.global.y)||this.hide())}
- getPopupBounds(){
- return this.bgContainer&&this.bgContainer.parent&&this.bgContainer.visible?this.bgContainer.getBounds():this.getBounds()}
- onBackButton(){
- return!!(this.btnClose&&this.btnClose.parent&&this.btnClose.visible)&&(this.onCloseBtnClick(),!0)}
- }
- ;
- Kt(G5,"BasePopup3");
- let B5=G5;
- const U5=class extends B5{
- constructor(){
- super(),this.width=KA.stageWidth-20,this.height=KA.safeHeight-yii.getInstance().height-Q9t.getInstance().height}
- getDefaultPositionY(){
- return Math.floor(yii.getInstance().height+.5*this._height)}
- }
- ;
- Kt(U5,"BaseViewPopup");
- let F5=U5;
- const H5=class extends s5{
- constructor(){
- super("UI_Close3","UI_Ekkorr"),this.width=45,this.height=45}
- }
- ;
- Kt(H5,"CommonCloseButton");
- let W5=H5;
CommonCloseButton 1 hunks, 68 statements
- ,"IconButton"),J),e5=null;
+ ,"IconButton"),J);
+ const D6=class extends R6{
+ constructor(){
+ super("UI_Close3","UI_Ekkorr"),this.width=45,this.height=45}
+ }
+ ;
+ Kt(D6,"CommonCloseButton");
+ let L6=D6;
+ const G6=class t extends QL{
+ constructor(t,i=120,s=50){
+ super(t),zt(this,"index",-1),zt(this,"bg2"),zt(this,"indicator"),zt(this,"minWidth",120),zt(this,"_selected",!0),zt(this,"padding",50),zt(this,"_autoResize",!0),zt(this,"_allowMultiline",!1),this.minWidth=i,this.padding=s,this.container.removeChild(this.bg),this.lbl.textSize=18,this._activatedTextColor=YD.LIGHT_BROWN,this.updateTextColor(),this.bg2=new CM({
+ texture:ZA.getTexture("UI_Ekkorr","Base_Tooltip"),leftWidth:9,topHeight:9,rightWidth:9,bottomHeight:10}
+ ),this.bg2.width=101,this.bg2.height=45,this.bg2.x=.5*-this.bg2.width,this.bg2.y=.5*-this.bg2.height,this.container.addChildAt(this.bg2,0),this.indicator=new CM({
+ texture:ZA.getTexture("UI_Ekkorr","SelectedBar"),leftWidth:5,topHeight:1,rightWidth:5,bottomHeight:1}
+ ),this.container.addChild(this.indicator),this.container.x=.5*this.bg2.width,this.container.y=.5*this.bg2.height,this.width=100,this.height=44,this._autoResize&&(this.text=t),this.updateHitArea(),this.selected=!1}
+ updateHitArea(){
+ null!=this.bg2&&(this._hitArea.width=this.bg2.width,this._hitArea.height=this.bg2.height,this.hitArea=this._hitArea)}
+ get width(){
+ return this.bg2.width-2*t.TRANSPARENT_BORDER}
+ set width(i){
+ i<this.minWidth&&(i=this.minWidth);
+ const s=t.TRANSPARENT_BORDER;
+ this.bg2.width=i+2*s,this.bg2.x=.5*-this.bg2.width,this.lbl.x=.5*-this.lbl.width,this.container.x=.5*i,this.indicator.width=i-16,this.indicator.x=.5*-this.indicator.width,this.updateHitArea()}
+ set height(i){
+ const s=t.TRANSPARENT_BORDER;
+ this.bg2.height=i+2*s,this.bg2.y=.5*-this.bg2.height,this.lbl.y=.5*-this.lbl.height,this.container.y=.5*i,this.indicator.y=this.bg2.y+this.bg2.height-this.indicator.height-10,this.updateHitArea()}
+ get height(){
+ return this.bg2.height-2*t.TRANSPARENT_BORDER}
+ get selected(){
+ return this._selected}
+ set selected(t){
+ t!=this._selected&&(this._selected=t,1==this._selected?(this.indicator.visible=!0,this.activatedTextColor=aD.COLOR_ORANGE):(this.indicator.visible=!1,this.activatedTextColor=aD.DEFAULT_COLOR))}
+ get autoResize(){
+ return this._autoResize}
+ set autoResize(t){
+ this._autoResize=t}
+ get allowMultiline(){
+ return this._allowMultiline}
+ set allowMultiline(t){
+ this._allowMultiline!==t&&(this._allowMultiline=t,this.lbl.text&&(this.text=this.lbl.text))}
+ applyMultilineLayout(i){
+ const s=Math.max(40,this.width-2*t.MULTILINE_SIDE_PAD);
+ if(this.lbl.setWrapWidth(0),this.lbl.lineHeight=0,this.lbl.text=i,this.lbl.width<=s)return this.lbl.x=.5*-this.lbl.width,void(this.lbl.y=.5*-this.lbl.height);
+ this.lbl.align="center",this.lbl.lineHeight=Math.floor(this.lbl.textSize*t.MULTILINE_LINE_HEIGHT_RATIO)+t.MULTILINE_LINE_HEIGHT_EXTRA,this.lbl.setWrapWidth(s),this.lbl.text=i,this.lbl.x=.5*-this.lbl.width,this.lbl.y=.5*-this.lbl.height+t.MULTILINE_Y_OFFSET}
+ setCompactStyle(t,i){
+ this.lbl.textSize=t,this.padding=i,this._autoResize=!0,this.lbl.setWrapWidth(0),this.text=this.lbl.text}
+ setMultilineMode(t,i,s=16){
+ this._autoResize=!1,this.lbl.textSize=s,this.width=t,this.height=i;
+ const e=Math.max(40,t-10);
+ this.lbl.setWrapWidth(e),this.lbl.align="center",this.lbl.x=.5*-this.lbl.width,this.lbl.y=.5*-this.lbl.height}
+ fitWithinWidth(t,i=50){
+ this._autoResize=!1;
+ const s=this.lbl.text;
+ this.lbl.setWrapWidth(0),this.lbl.textSize=18,this.lbl.text=s,this.width=t,this.height=i;
+ const e=Math.max(40,t-10);
+ if(this.lbl.width<=e)return this.lbl.x=.5*-this.lbl.width,void(this.lbl.y=.5*-this.lbl.height);
+ for(let n=17;
+ n>=12;
+ n--)if(this.lbl.textSize=n,this.lbl.text=s,this.lbl.width<=e)return this.lbl.x=.5*-this.lbl.width,void(this.lbl.y=.5*-this.lbl.height);
+ this.lbl.textSize=12,this.lbl.setWrapWidth(e),this.lbl.align="center",this.lbl.text=s,this.lbl.x=.5*-this.lbl.width,this.lbl.y=.5*-this.lbl.height}
+ set text(t){
+ super.text=t,this._autoResize?this.width=this.lbl.width+this.padding:this._allowMultiline?this.applyMultilineLayout(t):this.lbl.x=.5*-this.lbl.width}
+ updateEventTag(t,i){
+ this.eventTag&&(this.eventTag.scale=.7,this.eventTag.x=this.bg2.x+this.bg2.width-this.eventTag.width+t,this.eventTag.y=this.bg2.y+i)}
+ }
+ ;
+ Kt(G6,"SubMenuButton"),zt(G6,"TRANSPARENT_BORDER",3),zt(G6,"MULTILINE_SIDE_PAD",10),zt(G6,"MULTILINE_LINE_HEIGHT_RATIO",.85),zt(G6,"MULTILINE_LINE_HEIGHT_EXTRA",2),zt(G6,"MULTILINE_Y_OFFSET",-2);
+ let B6=G6,U6=null;
CommonConfirmPopup 1 hunks, 56 statements
- super(),zt(this,"bg",new QD),zt(this,"closeBtn",new We(ZA.getTexture("UI_Ekkorr","UI_Close3"))),zt(this,"lblTitle",new YD("Title",16777215,aD.DEFAULT_OUTLINE_FONT_OPTION_20)),this.bg.setIndex(6),this.bg.width=640,this.bg.height=60,this.bg.y=-1,this.addChild(this.bg),this.closeBtn.width=50,this.closeBtn.height=50,this.closeBtn.visible=!1,this.closeBtn.x=this.bg.width-this.closeBtn.width-5,this.closeBtn.y=.5*(this.bg.height-this.closeBtn.height),this.addChild(this.closeBtn),this.lblTitle.x=10,this.lblTitle.y=10,this.addChild(this.lblTitle)}
- setTitle(t){
- this.lblTitle.text=t}
+ super(),zt(this,"lblMessage",new YD("",aD.DEFAULT_COLOR,aD.DEFAULT_FONT_OPTION_17)),zt(this,"btnConfirm",new sG("확인")),zt(this,"btnCancel",new lK("취소")),zt(this,"onConfirm",null),zt(this,"onCancel",null),zt(this,"textAlignCenter",!1),this.title="",this.lblMessage.y=90,this.contentContainer.addChild(this.lblMessage,this.btnConfirm,this.btnCancel),this.btnConfirm.onClick=this.onConfirmClick.bind(this),this.btnCancel.onClick=this.onCancelClick.bind(this),this.btnClose.onClick=this.onCancelClick.bind(this),aD.setLabelWrapWidth(this.lblMessage,this.width-60)}
+ static getInstance(){
+ return this._instance||(this._instance=new t),this._instance}
+ onConfirmClick(){
+ this.hide();
+ let t=this.onConfirm;
+ this.onConfirm=null,null!==t&&t()}
+ onCancelClick(){
+ this.hide();
+ let t=this.onCancel;
+ this.onCancel=null,null!==t&&t()}
+ show(t,i=null,s=null){
+ this.onConfirm=i,this.onCancel=s,this.lblMessage.text=t,this.btnConfirm.text=AG.getText("COMMON_1","확인"),this.btnCancel.text=AG.getText("COMMON_2","취소"),this.updateLayout(),super.show()}
+ hide(){
+ super.hide(),this.title="",this.textAlignCenter=!1}
+ updateLayout(){
+ if(this.lblMessage.x=.5*(this.width-this.lblMessage.width),this.btnConfirm.x=.5*(this.width-this.btnConfirm.width-this.btnCancel.width-20),this.btnCancel.x=this.btnConfirm.x+this.btnConfirm.width+20,this.btnConfirm.y=this.lblMessage.y+this.lblMessage.height+30,this.btnCancel.y=this.btnConfirm.y,this.height=this.btnConfirm.y+this.btnConfirm.height+40,this.textAlignCenter){
+ let t=this.lblMessage.getStyle();
+ t.align="center",this.lblMessage.setStyle(t)}
+ else{
+ let t=this.lblMessage.getStyle();
+ t.align="left",this.lblMessage.setStyle(t)}
+ }
+ getDefaultPositionY(){
+ return.3*KA.stageHeight}
+ onBackButton(){
+ return this.onCancelClick(),!0}
+ }
+ ;
+ Kt(uK,"CommonConfirmPopup"),zt(uK,"_instance");
+ let dK=uK;
+ const fK=Object.freeze(Object.defineProperty({
+ __proto__:null,CommonConfirmPopup:dK}
+ ,Symbol.toStringTag,{
+ value:"Module"}
+ )),pK=class extends Be{
+ constructor(){
+ super(),zt(this,"icon",new We),zt(this,"bg",new We),zt(this,"cover",new We),zt(this,"star",new We),zt(this,"posList",[30,26,24,19,16,13,9]),this.bg.x=3,this.bg.y=3,this.addChild(this.bg),this.icon.x=3,this.icon.y=3,this.addChild(this.icon),this.cover.x=0,this.cover.y=0,this.addChild(this.cover),this.addChild(this.star),this.setEmpty()}
+ setEmpty(){
+ this.bg.texture=ZA.getTexture("UI_PET","HeroFrame_1_Bg"),this.cover.texture=ZA.getTexture("UI_PET","HeroFrame_1"),this.icon.visible=!1,this.star.visible=!1}
+ setPet(t,i){
+ this.icon.visible=!0,this.star.visible=!0,this.icon.alpha=1,this.icon.tint=16777215,this.icon.texture=ZA.getTexture("UI_PET",`UI_PET${
+ t}
+ `),this.icon.width=this.icon.height=this.cover.width-6,this.icon.x=3,this.icon.y=2;
+ const s=Math.max(1,Math.min(i,5));
+ this.star.texture=ZA.getTextures("UI_PET","UI_UNIT_RARE")[s-1],this.star.x=this.posList[s-1],this.star.y=this.bg.height-this.star.height,this.bg.texture=ZA.getTexture("UI_PET",`HeroFrame_${
+ s}
+ _Bg`),this.cover.texture=ZA.getTexture("UI_PET",`HeroFrame_${
+ s}
+ `)}
+ setInactive(t){
+ this.icon.visible=!0,this.star.visible=!1,this.icon.texture=ZA.getTexture("UI_PET",`UI_PET${
+ t}
+ `),this.icon.width=this.icon.height=this.cover.width-6,this.icon.x=3,this.icon.y=2,this.icon.alpha=.9,this.icon.tint=11184810,this.bg.texture=ZA.getTexture("UI_PET","HeroFrame_1_Bg"),this.cover.texture=ZA.getTexture("UI_PET","HeroFrame_1")}
+ get width(){
+ return this.bg.width}
ShopGuideSecretary 2 hunks, 33 statements
- super(),zt(this,"container",new Be),zt(this,"_currentSubView",null),this.addChild(this.container)}
- get currentSubView(){
- return this._currentSubView}
- set currentSubView(t){
- this._currentSubView!==t&&(null!=this._currentSubView&&this.removeChild(this._currentSubView),this._currentSubView=t,null!=this._currentSubView&&(this.addChild(this._currentSubView),this._currentSubView.x=0))}
- get className(){
- return""}
- updateLanguage(){
- this._currentSubView&&this._currentSubView.updateLanguage()}
+ super(),zt(this,"bg"),zt(this,"icon"),zt(this,"lbl"),zt(this,"line"),zt(this,"icon2"),zt(this,"lbl2"),this.bg=new CM({
+ texture:ZA.getTexture("UI_Ekkorr","Popup_Bg_04"),leftWidth:12,topHeight:12,rightWidth:12,bottomHeight:12}
+ ),this.bg.width=530,this.bg.height=100,this.addChild(this.bg),this.icon=new We(ZA.getTexture("UI_Ekkorr","UNIT_NPC_2")),this.icon.scale=.7,this.icon.x=10,this.icon.y=10,this.addChild(this.icon);
+ const t=aD.DEFAULT_FONT_OPTION_17;
+ t.fill=aD.DEFAULT_COLOR,t.fontWeight="normal",this.lbl=new YD("",t.fill,t),this.lbl.x=this.icon.x+this.icon.width+10,this.lbl.y=20,this.addChild(this.lbl),aD.setLabelWrapWidth(this.lbl,this.bg.width-this.lbl.x-10),this.line=new We(ZA.getTexture("UI_Ekkorr","blackRect")),this.line.width=this.bg.width-40,this.line.height=1,this.line.x=.5*(this.bg.width-this.line.width),this.addChild(this.line),this.icon2=new We(ZA.getTexture("UI_Ekkorr","UNIT_NPC_1")),this.icon2.scale=this.icon.scale,this.icon2.x=this.icon.x,this.icon2.y=this.icon.y,this.addChild(this.icon2),this.lbl2=new YD("",t.fill,t),this.lbl2.x=this.lbl.x,this.lbl2.y=this.lbl.y,this.addChild(this.lbl2),aD.setLabelWrapWidth(this.lbl2,this.bg.width-this.lbl2.x-10)}
+ get width(){
+ return this.bg.width}
+ get height(){
+ return this.bg.height}
+ setData(){
+ const t=Kt((t,i)=>AG.getText(t,i),"_t"),i=Kt((t,i,s)=>AG.getValueReplace(t,"##",i,s),"_tv"),s=[`# ${
+ t("GAME_916","전문 비서 (이오스)")}
+ `,`  - ${
+ i("GAME_917",4,"영웅 모집 : 1시간마다 4명")}
+ `,`  - ${
+ t("GAME_918","영웅 슬롯 :")}
+  96`,`  - ${
+ i("GAME_919","15~30","자원 : 1시간마다 15~30개의 보석과 명예코인 획득")}
+ `];
+ this.lbl.text=s.join("\n");
+ const e=[`# ${
+ t("GAME_915","일반 비서 (로라)")}
+ `,`  - ${
+ i("GAME_917",2,"영웅 모집 : 1시간마다 2명")}
+ `,`  - ${
+ t("GAME_918","영웅 슬롯 :")}
+  24`,`  - ${
+ i("GAME_919","7~15","자원 : 1시간마다 7~15개의 보석과 명예코인 획득")}
+ `];
+ this.lbl2.text=e.join("\n"),this.line.y=this.lbl.y+this.lbl.height+20,this.icon2.y=this.lbl2.y=this.line.y+20;
+ const n=Math.max(this.lbl2.y+this.lbl2.height+this.lbl.y,this.icon2.y+this.icon2.height+this.icon.y);
+ this.bg.height=n}
- Kt(YV,"BaseView");
+ Kt(lz,"ShopGuideSecretary");
MessageInfo 3 hunks, 26 statements
- super(),zt(this,"sp"),zt(this,"textures",[]),this.textures=ZA.getTextures("ClickHand","ClickHand"),this.sp=new jf(this.textures),this.addChild(this.sp),this.eventMode="none"}
+ super(),zt(this,"bg",new QD),zt(this,"lblText",new YD("",aD.COLOR_WHITE,aD.DEFAULT_DESC_FONT_OPTION_16)),zt(this,"btnChat",new R6("Btn_Guild_Chatting","UI_Ekkorr")),zt(this,"btnHelp"),zt(this,"messages",[]),zt(this,"currentIndex",0),zt(this,"BG_WIDTH",640),zt(this,"BG_HEIGHT",20),zt(this,"SCROLL_SPEED",.8),zt(this,"VISIBLE_WIDTH",640),zt(this,"chatUnlockTick",0),zt(this,"onLanguageChangeBind"),zt(this,"textY",-1),zt(this,"update",Kt(()=>{
+ !this.btnChat.visible&&++this.chatUnlockTick>=60&&(this.chatUnlockTick=0,_L.maxWave>=t.CHAT_UNLOCK_WAVE&&(this.btnChat.visible=!0),Zti.getInstance().isOpened?(this.btnHelp.visible=!0,this.btnHelp.x=this.BG_WIDTH-this.btnHelp.width+6,this.btnChat.x=this.btnHelp.x-this.btnChat.width+10):(this.btnHelp.visible=!1,this.btnChat.x=this.BG_WIDTH-this.btnChat.width+6)),0!==this.messages.length&&(this.lblText.x-=this.SCROLL_SPEED,this.lblText.x+this.lblText.width<0&&(this.currentIndex=(this.currentIndex+1)%this.messages.length,this.showCurrentMessage()))}
+ ,"update")),this.bg.width=this.BG_WIDTH,this.bg.height=this.BG_HEIGHT,this.bg.alpha=.4,this.bg.setIndex(7),this.addChild(this.bg),this.lblText.textColor=aD.COLOR_WHITE,this.lblText.wordWrap=!1,this.addChild(this.lblText),this.btnHelp=new mB("UI_Ekkorr","Btn_help_p"),this.btnHelp.x=this.BG_WIDTH-this.btnHelp.width+6,this.btnHelp.y=.5*(this.BG_HEIGHT-this.btnHelp.height)+4,this.btnHelp.onClick=this.onHelpBtnClick.bind(this),this.addChild(this.btnHelp),this.btnChat.scale=1,this.btnChat.x=this.btnHelp.x-this.btnChat.width+10,this.btnChat.y=this.btnHelp.y,this.btnChat.onClick=this.onChatBtn.bind(this),this.btnChat.visible=_L.maxWave>=t.CHAT_UNLOCK_WAVE,this.addChild(this.btnChat),dn.shared.add(this.update,this),this.setLanguageChange(!0)}
- isPlaying(){
- return!!this.parent}
- show(t,i,s,e,n=0,h=0){
- this.x=t,this.y=i,Y5.getInstance().setClickArea(t-.5*s+n,i-.5*e+h,s,e),this.isPlaying()||(this.sp.animationSpeed=.65,this.sp.play(),Y5.getInstance().addChild(this))}
- hide(){
- Y5.getInstance().setBlockerEnabled(!1),this.sp.stop(),this.parent&&this.removeFromParent()}
+ async onChatBtn(){
+ if(F6())return c4.getInstance().show(),void n4.getInstance().start();
+ const t=await hD.getInstance().guild.getMyMembership(!0);
+ ED.setMembershipData(t.body),c4.getInstance().show(),n4.getInstance().start()}
+ onHelpBtnClick(){
+ _4.getInstance().show()}
+ setLanguageChange(t){
+ lS.getInstance().removeEventListener("LanguageChange",this.onLanguageChangeBind),t&&(this.onLanguageChangeBind=this.onLanguageChange.bind(this),lS.getInstance().addEventListener("LanguageChange",this.onLanguageChangeBind))}
+ onLanguageChange(t=null){
+ this.refreshMessages()}
+ refreshMessages(){
+ this.messages=f4.getInstance().getFilteredMessages(),this.currentIndex=0,this.showCurrentMessage()}
+ showCurrentMessage(){
+ 0!==this.messages.length&&(this.lblText.text=this.messages[this.currentIndex],this.lblText.x=this.VISIBLE_WIDTH+15,this.textY<0&&(this.textY=.5*(this.BG_HEIGHT-this.lblText.height)),this.lblText.y=this.textY)}
+ setMessages(t){
+ this.messages=t,this.currentIndex=0,this.showCurrentMessage()}
+ addMessage(t){
+ this.messages.push(t)}
+ clearMessages(){
+ this.messages=[],this.currentIndex=0,this.lblText.text=""}
+ destroy(){
+ dn.shared.remove(this.update,this),this.setLanguageChange(!1),super.destroy()}
- Kt(J5,"ClickAniEffect"),zt(J5,"instance");
+ Kt(M4,"MessageInfo"),zt(M4,"instance"),zt(M4,"CHAT_UNLOCK_WAVE",50);
ShopPayItemRendererStage 1 hunks, 15 statements
- e||(e="Package_1"),this.icon.texture=ZA.getTexture("UI_Ekkorr",e);
- let n=this.getPriceStr(i);
- this.btnBuy.text=0==n?Q2.getInstance().getPriceStr(i.productId):`₩${
- Math.round(n).toLocaleString()}
- `,this.btnBuy.x=this.bg.width-this.btnBuy.width-10}
- getPriceStr(t){
- if(!t)return 0;
- const i=EL.getInstance();
- if(1==i.isAppleClient())return 0;
- const s=i.getClientData("IN_APP_SHOP_REVIEW_P1"),e=i.getClientData("IN_APP_SHOP_REVIEW_P2");
- if(!s||!e)return 0;
- const n=ZI.convertToNumber(s.split("|")),h=ZI.convertToNumber(e.split("|"));
- if(0==n.length||0==h.length)return 0;
- const r=n.findIndex(i=>i==t.usdPrice);
- return-1==r?0:r<h.length?h[r]:0}
+ e||(e="Package_1"),this.icon.texture=ZA.getTexture("UI_Ekkorr",e),this.btnBuy.text=hK.getInstance().getPriceStr(i.productId),this.btnBuy.x=this.bg.width-this.btnBuy.width-10}
BaseSubMenu 1 hunks, 13 statements
+ super(),zt(this,"bg",new QD),zt(this,"closeBtn",new We(ZA.getTexture("UI_Ekkorr","UI_Close3"))),zt(this,"lblTitle",new YD("Title",16777215,aD.DEFAULT_OUTLINE_FONT_OPTION_20)),this.bg.setIndex(6),this.bg.width=640,this.bg.height=60,this.bg.y=-1,this.addChild(this.bg),this.closeBtn.width=50,this.closeBtn.height=50,this.closeBtn.visible=!1,this.closeBtn.x=this.bg.width-this.closeBtn.width-5,this.closeBtn.y=.5*(this.bg.height-this.closeBtn.height),this.addChild(this.closeBtn),this.lblTitle.x=10,this.lblTitle.y=10,this.addChild(this.lblTitle)}
+ setTitle(t){
+ this.lblTitle.text=t}
+ get height(){
+ return this.bg.height}
+ updateLanguage(){
+ }
+ }
+ ;
+ Kt(R4,"BaseSubMenu");
+ let D4=R4;
+ const L4=class extends _K{
+ constructor(){
CommonRedButton 1 hunks, 7 statements
+ constructor(t,i=150,s=30){
+ super(t,i,s),this.color=QL.RED}
+ }
+ ;
+ Kt(cK,"CommonRedButton");
+ let lK=cK;
+ const uK=class t extends aG{
PVPBattleStatus 6 hunks, 6 statements
- const cet=640,uet=320,det=30,fet=[4500223,2280703,8974079,6741452,4521898,2289373,5618687,7842559,10079487,11197951],pet=[16729156,16746496,16763904,15623714,16733542,16724872,16737860,15615010,16746564,16755302],get=new Sg({
+ const pet=640,get=320,met=30,wet=[4500223,2280703,8974079,6741452,4521898,2289373,5618687,7842559,10079487,11197951],vet=[16729156,16746496,16763904,15623714,16733542,16724872,16737860,15615010,16746564,16755302],bet=new Sg({
- text:"무한랭킹전 1일차 [ A 리그 ]",style:get}
+ text:"무한랭킹전 1일차 [ A 리그 ]",style:bet}
- t++)this.allyRows.push(this._buildRow(t,0,Aet)),this.enemyRows.push(this._buildRow(t,uet,Tet))}
+ t++)this.allyRows.push(this._buildRow(t,0,Oet)),this.enemyRows.push(this._buildRow(t,get,Iet))}
- h.rect(i,e,uet,det).fill({
+ h.rect(i,e,get,met).fill({
- return c.x=i+uet-35,c.y=e+Math.floor((det-c.height)/2),this.addChild(c),{
+ return c.x=i+get-35,c.y=e+Math.floor((met-c.height)/2),this.addChild(c),{
- this._allyBarsG.clear(),this._enemyBarsG.clear(),this._updateColumn(this.allyRows,e,h,0,fet,this._allyBarsG),this._updateColumn(this.enemyRows,n,r,uet,pet,this._enemyBarsG)}
+ this._allyBarsG.clear(),this._enemyBarsG.clear(),this._updateColumn(this.allyRows,e,h,0,wet,this._allyBarsG),this._updateColumn(this.enemyRows,n,r,get,vet,this._enemyBarsG)}
CapacitorBridge 2 hunks, 6 statements
- const t=-1,i=n.productId;
+ const t=e.getInstance().getProductIdByStoreProductId(n.productId);
+ if(t<=0)continue;
+ const i=n.productId;
- const t=-1,i=n.productId;
+ const t=e.getInstance().getProductIdByStoreProductId(n.productId);
+ if(t<=0)continue;
+ const i=n.productId;
SHA256 3 hunks, 3 statements
- ...rTt,...aTt,...lTt,...dTt,...gTt,...STt,...kTt,...xTt,...LTt}
+ ...lTt,...dTt,...pTt,...mTt,...bTt,...OTt,...NTt,...DTt,...FTt}
- ...bCt,..._Ct}
+ ...ECt,...SCt}
- utf8:QCt,"utf-8":QCt,hex:KCt.base16,latin1:ZCt,ascii:ZCt,binary:ZCt,...KCt}
+ utf8:skt,"utf-8":skt,hex:YCt.base16,latin1:ekt,ascii:ekt,binary:ekt,...YCt}
SuiProvider 3 hunks, 3 statements
- namespace:jLt.NameSpaceKeyAptos,addresses:s,methods:[...VLt.AptosMethods],extra:h}
+ namespace:zLt.NameSpaceKeyAptos,addresses:s,methods:[...XLt.AptosMethods],extra:h}
- namespace:QLt.NameSpaceKeyTON,addresses:o,methods:[...iGt.TONMethods],extra:a,data:{
+ namespace:sGt.NameSpaceKeyTON,addresses:o,methods:[...hGt.TONMethods],extra:a,data:{
- namespace:hGt.NameSpaceKeySui,addresses:i,methods:[...aGt.SuiMethods],extra:s}
+ namespace:cGt.NameSpaceKeySui,addresses:i,methods:[...dGt.SuiMethods],extra:s}
MineRewardInfoItemRenderer 2 hunks, 2 statements
- ),this.bg.alpha=.05,this.bg.width=530,this.bg.height=75,this.addChild(this.bg),this.item=new Qst,this.addChild(this.item),this.amountBg=new CM({
+ ),this.bg.alpha=.05,this.bg.width=530,this.bg.height=75,this.addChild(this.bg),this.item=new set,this.addChild(this.item),this.amountBg=new CM({
- ),this.amountBg.width=200,this.amountBg.height=this.bg.height,this.amountBg.x=this.item.width+5,this.addChild(this.amountBg),this.amountLbl=new YD("0",16777215),this.amountLbl.x=this.amountBg.x+.5*(this.amountBg.width-this.amountLbl.width),this.amountLbl.y=.5*(this.amountBg.height-this.amountLbl.height),this.addChild(this.amountLbl),this.bonusGem=new Qst,this.bonusGem.x=this.amountBg.x+this.amountBg.width+5,this.addChild(this.bonusGem),this.bonusHonorCoin=new Qst,this.bonusHonorCoin.x=this.bonusGem.x+this.bonusGem.width+5,this.addChild(this.bonusHonorCoin)}
+ ),this.amountBg.width=200,this.amountBg.height=this.bg.height,this.amountBg.x=this.item.width+5,this.addChild(this.amountBg),this.amountLbl=new YD("0",16777215),this.amountLbl.x=this.amountBg.x+.5*(this.amountBg.width-this.amountLbl.width),this.amountLbl.y=.5*(this.amountBg.height-this.amountLbl.height),this.addChild(this.amountLbl),this.bonusGem=new set,this.bonusGem.x=this.amountBg.x+this.amountBg.width+5,this.addChild(this.bonusGem),this.bonusHonorCoin=new set,this.bonusHonorCoin.x=this.bonusGem.x+this.bonusGem.width+5,this.addChild(this.bonusHonorCoin)}
VersionManager 1 hunks, 1 statements
- Kt(zA,"VersionManager"),zt(zA,"gameId","ef2"),zt(zA,"appVersion","1.11.74");
+ Kt(zA,"VersionManager"),zt(zA,"gameId","ef2"),zt(zA,"appVersion","1.11.75");
ListOld 1 hunks, 1 statements
- const e=this.itemList.length;
MineFossilIcon 1 hunks, 1 statements
- let Qst=Jst;
+ let set=iet;
MineRewardPopup 1 hunks, 1 statements
- let set=iet;
+ let ret=het;
MinePopup 1 hunks, 1 statements
- set.getInstance().show()}
+ ret.getInstance().show()}
Sr 1 hunks, 1 statements
- ...t,...tft(i)}
+ ...t,...nft(i)}
Ma 1 hunks, 1 statements
- ...uwt,coercer:Kt((t,i)=>Emt(t,dwt)?uwt.coercer(fwt(t,i),i):uwt.coercer(t,i),"coercer")}
+ ...gwt,coercer:Kt((t,i)=>Cmt(t,mwt)?gwt.coercer(wwt(t,i),i):gwt.coercer(t,i),"coercer")}
Yp 1 hunks, 1 statements
- const e=126,n=[71,73,70,56,55,97,...i,246,0,0,255,255,255,...zAt(381,0),44,0,0,0,0,...i,0,7],h=Math.floor(s.length/e);
+ const e=126,n=[71,73,70,56,55,97,...i,246,0,0,255,255,255,...JAt(381,0),44,0,0,0,0,...i,0,7],h=Math.floor(s.length/e);
SuiStandardProvider 1 hunks, 1 statements
- namespace:nPt.NameSpaceKeyEip155,addresses:i,methods:[...oPt.Eip55Methods],extra:s}
+ namespace:aPt.NameSpaceKeyEip155,addresses:i,methods:[...uPt.Eip55Methods],extra:s}
AppReadyEvent 1 hunks, 1 statements
- return ORt||(ORt=[...ERt]),ORt}
+ return PRt||(PRt=[...CRt]),PRt}
SolProvider 1 hunks, 1 statements
- namespace:RLt.NameSpaceKeySOL,addresses:i,methods:[...BLt.SOLANAMethods],extra:s}
+ namespace:BLt.NameSpaceKeySOL,addresses:i,methods:[...WLt.SOLANAMethods],extra:s}
OkxwalletInjectConnector 1 hunks, 1 statements
- namespace:dGt.NameSpaceKeyBtc,addresses:i,methods:[...pGt.BtcMethods],extra:s}
+ namespace:mGt.NameSpaceKeyBtc,addresses:i,methods:[...vGt.BtcMethods],extra:s}
TcRootElement 1 hunks, 1 statements
- return aqt()||(t.push(new ASt.OKXAppConnector),t.push(new ASt.OKXWalletAppConnector)),rqt()&&t.push(new ASt.OkxwalletInjectConnector),t.push(...lqt()),t}
+ return dqt()||(t.push(new kSt.OKXAppConnector),t.push(new kSt.OKXWalletAppConnector)),lqt()&&t.push(new kSt.OkxwalletInjectConnector),t.push(...pqt()),t}
BattleController 1 hunks, 1 statements
- this.skippedWave>0&&!this.shownDialogueWaves.has(this.skippedWave)&&(t.push(...s3.getInstance().getByWave(this.skippedWave)),this.shownDialogueWaves.add(this.skippedWave)),this.shownDialogueWaves.has(_L.wave)||(t.push(...s3.getInstance().getByWave(_L.wave)),this.shownDialogueWaves.add(_L.wave)),t.length>0&&M9t.getInstance().showDialogues(t)}
+ this.skippedWave>0&&!this.shownDialogueWaves.has(this.skippedWave)&&(t.push(...ZV.getInstance().getByWave(this.skippedWave)),this.shownDialogueWaves.add(this.skippedWave)),this.shownDialogueWaves.has(_L.wave)||(t.push(...ZV.getInstance().getByWave(_L.wave)),this.shownDialogueWaves.add(_L.wave)),t.length>0&&Jti.getInstance().showDialogues(t)}