# UI_Window_Task_TaskPopupHelper_460.luac
; fn @TaskPopupHelper.lua  line 0-0 np=0 va=1 ms=4 code=36 consts=18 upvals=1 protos=7
;   K[0]='TaskPopupHelper'
;   K[1]='setmetatable'
;   K[2]='canPopScene'
;   K[3]='EPopupScene'
;   K[4]='Main'
;   K[5]=true
;   K[6]='canIgnorePopup'
;   K[7]=false
;   K[8]='BasePopupHelper'
;   K[9]='__index'
;   K[10]='Create'
;   K[11]='TaskPopupHelper'
;   K[12]='Init'
;   K[13]='OnDestroy'
;   K[14]='_OnMainTaskFinished'
;   K[15]='_UpdateState'
;   K[16]='NeedCheckPopup'
;   K[17]='CheckPopup'
;   upvals: _ENV
0000  GETTABUP  R0 = _ENV[K1('setmetatable')]
0001  NEWTABLE  R1 = {} (0 items)
0002  NEWTABLE  R2 = {} (0 items)
0003  GETTABUP  R3 = _ENV[K3('EPopupScene')]
0004  GETTABLE  R3 = R3[K4('Main')]
0005  SETTABLE  R2[R3] = K5(true)
0006  SETTABLE  R1[K2('canPopScene')] = R2
0007  SETTABLE  R1[K6('canIgnorePopup')] = K7(false)
0008  GETTABUP  R2 = _ENV[K8('BasePopupHelper')]
0009  CALL      R0 = call(R0, 1 args, 2 rets)
0010  SETTABUP  _ENV[K0('TaskPopupHelper')] = R0
0011  GETTABUP  R0 = _ENV[K0('TaskPopupHelper')]
0012  GETTABUP  R1 = _ENV[K0('TaskPopupHelper')]
0013  SETTABLE  R0[K9('__index')] = R1
0014  GETTABUP  R0 = _ENV[K0('TaskPopupHelper')]
0015  CLOSURE   R1 = closure proto0
0016  SETTABLE  R0[K10('Create')] = R1
0017  GETTABUP  R0 = _ENV[K11('TaskPopupHelper')]
0018  CLOSURE   R1 = closure proto1
0019  SETTABLE  R0[K12('Init')] = R1
0020  GETTABUP  R0 = _ENV[K11('TaskPopupHelper')]
0021  CLOSURE   R1 = closure proto2
0022  SETTABLE  R0[K13('OnDestroy')] = R1
0023  GETTABUP  R0 = _ENV[K11('TaskPopupHelper')]
0024  CLOSURE   R1 = closure proto3
0025  SETTABLE  R0[K14('_OnMainTaskFinished')] = R1
0026  GETTABUP  R0 = _ENV[K11('TaskPopupHelper')]
0027  CLOSURE   R1 = closure proto4
0028  SETTABLE  R0[K15('_UpdateState')] = R1
0029  GETTABUP  R0 = _ENV[K11('TaskPopupHelper')]
0030  CLOSURE   R1 = closure proto5
0031  SETTABLE  R0[K16('NeedCheckPopup')] = R1
0032  GETTABUP  R0 = _ENV[K11('TaskPopupHelper')]
0033  CLOSURE   R1 = closure proto6
0034  SETTABLE  R0[K17('CheckPopup')] = R1
0035  RETURN    return R0..R-1
; ---------- proto0 [Create] ----------
  ; fn ?  line 9-13 np=0 va=0 ms=3 code=8 consts=3 upvals=1 protos=0
  ;   K[0]='setmetatable'
  ;   K[1]='TaskPopupHelper'
  ;   K[2]='Init'
  ;   upvals: _ENV
  ;   locals: helper(4-8)
  0000  GETTABUP  R0 = _ENV[K0('setmetatable')]
  0001  NEWTABLE  R1 = {} (0 items)
  0002  GETTABUP  R2 = _ENV[K1('TaskPopupHelper')]
  0003  CALL      R0 = call(R0, 1 args, 2 rets)
  0004  SELF      R2 = R0[K2('Init')] (self)
  0005  CALL      R1 = call(R1, 0 args, 1 rets)
  0006  RETURN    return R0..R-1
  0007  RETURN    return R0..R-1
; ---------- proto1 [Init] ----------
  ; fn ?  line 15-20 np=1 va=0 ms=5 code=17 consts=7 upvals=1 protos=0
  ;   K[0]='_UpdateState'
  ;   K[1]='EventDispatcher'
  ;   K[2]='AddListener'
  ;   K[3]='EEventType'
  ;   K[4]='MainTaskFinished'
  ;   K[5]='_OnMainTaskFinished'
  ;   K[6]='NewContentReleased'
  ;   upvals: _ENV
  ;   locals: self(0-17)
  0000  SELF      R2 = R0[K0('_UpdateState')] (self)
  0001  CALL      R1 = call(R1, 0 args, 1 rets)
  0002  GETTABUP  R1 = _ENV[K1('EventDispatcher')]
  0003  GETTABLE  R1 = R1[K2('AddListener')]
  0004  GETTABUP  R2 = _ENV[K3('EEventType')]
  0005  GETTABLE  R2 = R2[K4('MainTaskFinished')]
  0006  MOVE      R3 = R0
  0007  GETTABLE  R4 = R0[K5('_OnMainTaskFinished')]
  0008  CALL      R1 = call(R1, 0 args, 3 rets)
  0009  GETTABUP  R1 = _ENV[K1('EventDispatcher')]
  0010  GETTABLE  R1 = R1[K2('AddListener')]
  0011  GETTABUP  R2 = _ENV[K3('EEventType')]
  0012  GETTABLE  R2 = R2[K6('NewContentReleased')]
  0013  MOVE      R3 = R0
  0014  GETTABLE  R4 = R0[K0('_UpdateState')]
  0015  CALL      R1 = call(R1, 0 args, 3 rets)
  0016  RETURN    return R0..R-1
; ---------- proto2 [OnDestroy] ----------
  ; fn ?  line 22-24 np=1 va=0 ms=3 code=5 consts=2 upvals=1 protos=0
  ;   K[0]='EventDispatcher'
  ;   K[1]='RemoveTarget'
  ;   upvals: _ENV
  ;   locals: self(0-5)
  0000  GETTABUP  R1 = _ENV[K0('EventDispatcher')]
  0001  GETTABLE  R1 = R1[K1('RemoveTarget')]
  0002  MOVE      R2 = R0
  0003  CALL      R1 = call(R1, 0 args, 1 rets)
  0004  RETURN    return R0..R-1
; ---------- proto3 [_OnMainTaskFinished] ----------
  ; fn ?  line 26-30 np=1 va=0 ms=3 code=17 consts=8 upvals=1 protos=0
  ;   K[0]='_UpdateState'
  ;   K[1]='m_canPopDayClearWindow'
  ;   K[2]='GM'
  ;   K[3]='MainBoardModel'
  ;   K[4]='GetOrderModel'
  ;   K[5]='IsAllCanUnlockGroupFinished'
  ;   K[6]='TaskManager'
  ;   K[7]='CanFinishOngoingTask'
  ;   upvals: _ENV
  ;   locals: self(0-17)
  0000  SELF      R2 = R0[K0('_UpdateState')] (self)
  0001  CALL      R1 = call(R1, 0 args, 1 rets)
  0002  GETTABUP  R1 = _ENV[K2('GM')]
  0003  GETTABLE  R1 = R1[K3('MainBoardModel')]
  0004  SELF      R2 = R1[K4('GetOrderModel')] (self)
  0005  CALL      R1 = call(R1, 1 args, 1 rets)
  0006  SELF      R2 = R1[K5('IsAllCanUnlockGroupFinished')] (self)
  0007  CALL      R1 = call(R1, 1 args, 1 rets)
  0008  TEST      if not R1 then   -> -131062
  0009  JMP       (jump)   -> 15
  0010  GETTABUP  R1 = _ENV[K2('GM')]
  0011  GETTABLE  R1 = R1[K6('TaskManager')]
  0012  SELF      R2 = R1[K7('CanFinishOngoingTask')] (self)
  0013  CALL      R1 = call(R1, 1 args, 1 rets)
  0014  NOT       R1 = not R0
  0015  SETTABLE  R0[K1('m_canPopDayClearWindow')] = R1
  0016  RETURN    return R0..R-1
; ---------- proto4 [_UpdateState] ----------
  ; fn ?  line 32-36 np=1 va=0 ms=3 code=33 consts=9 upvals=1 protos=0
  ;   K[0]='m_canClaimProgressReward'
  ;   K[1]='GM'
  ;   K[2]='TaskManager'
  ;   K[3]='CanClaimProgressReward'
  ;   K[4]='m_canPopChapterFinishWindow'
  ;   K[5]='IsOngoingChapterProgressFinished'
  ;   K[6]='HasPopedChapterFinishWin'
  ;   K[7]='m_canPopNewChapterWindow'
  ;   K[8]='IsLastChapter'
  ;   upvals: _ENV
  ;   locals: self(0-33)
  0000  GETTABLE  R1 = R0[K0('m_canClaimProgressReward')]
  0001  TEST      if not R1 then   -> -131068
  0002  JMP       (jump)   -> 7
  0003  GETTABUP  R1 = _ENV[K1('GM')]
  0004  GETTABLE  R1 = R1[K2('TaskManager')]
  0005  SELF      R2 = R1[K3('CanClaimProgressReward')] (self)
  0006  CALL      R1 = call(R1, 1 args, 1 rets)
  0007  SETTABLE  R0[K0('m_canClaimProgressReward')] = R1
  0008  GETTABUP  R1 = _ENV[K1('GM')]
  0009  GETTABLE  R1 = R1[K2('TaskManager')]
  0010  SELF      R2 = R1[K5('IsOngoingChapterProgressFinished')] (self)
  0011  CALL      R1 = call(R1, 1 args, 1 rets)
  0012  TEST      if not R1 then   -> -131058
  0013  JMP       (jump)   -> 19
  0014  GETTABUP  R1 = _ENV[K1('GM')]
  0015  GETTABLE  R1 = R1[K2('TaskManager')]
  0016  SELF      R2 = R1[K6('HasPopedChapterFinishWin')] (self)
  0017  CALL      R1 = call(R1, 1 args, 1 rets)
  0018  NOT       R1 = not R0
  0019  SETTABLE  R0[K4('m_canPopChapterFinishWindow')] = R1
  0020  GETTABUP  R1 = _ENV[K1('GM')]
  0021  GETTABLE  R1 = R1[K2('TaskManager')]
  0022  SELF      R2 = R1[K5('IsOngoingChapterProgressFinished')] (self)
  0023  CALL      R1 = call(R1, 1 args, 1 rets)
  0024  TEST      if not R1 then   -> -131046
  0025  JMP       (jump)   -> 31
  0026  GETTABUP  R1 = _ENV[K1('GM')]
  0027  GETTABLE  R1 = R1[K2('TaskManager')]
  0028  SELF      R2 = R1[K8('IsLastChapter')] (self)
  0029  CALL      R1 = call(R1, 1 args, 1 rets)
  0030  NOT       R1 = not R0
  0031  SETTABLE  R0[K7('m_canPopNewChapterWindow')] = R1
  0032  RETURN    return R0..R-1
; ---------- proto5 [NeedCheckPopup] ----------
  ; fn ?  line 38-40 np=1 va=0 ms=2 code=18 consts=6 upvals=0 protos=0
  ;   K[0]='m_canClaimProgressReward'
  ;   K[1]='m_canPopChapterFinishWindow'
  ;   K[2]='m_canPopNewChapterWindow'
  ;   K[3]='m_nextWin'
  ;   K[4]=nil
  ;   K[5]='m_canPopDayClearWindow'
  ;   locals: self(0-18)
  0000  GETTABLE  R1 = R0[K0('m_canClaimProgressReward')]
  0001  TEST      if not R1 then   -> -131068
  0002  JMP       (jump)   -> 16
  0003  GETTABLE  R1 = R0[K1('m_canPopChapterFinishWindow')]
  0004  TEST      if not R1 then   -> -131065
  0005  JMP       (jump)   -> 16
  0006  GETTABLE  R1 = R0[K2('m_canPopNewChapterWindow')]
  0007  TEST      if not R1 then   -> -131062
  0008  JMP       (jump)   -> 16
  0009  GETTABLE  R1 = R0[K3('m_nextWin')]
  0010  EQ        if R0 eq K4(nil)   -> -130288
  0011  JMP       (jump)   -> 15
  0012  GETTABLE  R1 = R0[K5('m_canPopDayClearWindow')]
  0013  JMP       (jump)   -> 16
  0014  LOADBOOL  R1 = false
  0015  LOADBOOL  R1 = true
  0016  RETURN    return R1..R0
  0017  RETURN    return R0..R-1
; ---------- proto6 [CheckPopup] ----------
  ; fn ?  line 42-87 np=1 va=0 ms=8 code=87 consts=27 upvals=1 protos=0
  ;   K[0]='m_canClaimProgressReward'
  ;   K[1]=false
  ;   K[2]='UIPrefabConfigName'
  ;   K[3]='TaskGroupFinishWindow'
  ;   K[4]='m_canPopChapterFinishWindow'
  ;   K[5]='GM'
  ;   K[6]='TaskManager'
  ;   K[7]='SetPopedChapterFinishWin'
  ;   K[8]='IsLastChapter'
  ;   K[9]='SetNeedCheckPopup'
  ;   K[10]='m_nextWin'
  ;   K[11]='TaskClearWindow'
  ;   K[12]='m_canPopDayClearWindow'
  ;   K[13]='ChapterFinishWindow'
  ;   K[14]='m_canPopNewChapterWindow'
  ;   K[15]='TryStartNewChapter'
  ;   K[16]='IsAutoRun'
  ;   K[17]='AnimatedRewardWindow'
  ;   K[18]='m_nextParam'
  ;   K[19]='table'
  ;   K[20]='pack'
  ;   K[21]='chapter_reward_title'
  ;   K[22]='ERewardScene'
  ;   K[23]='Other'
  ;   K[24]='ChapterUnlockWindow'
  ;   K[25]='OrderDayClearWindow'
  ;   K[26]=nil
  ;   upvals: _ENV
  ;   locals: self(0-87), startNew(39-69), arrChapterUnlockRewards(39-69), win(80-86), param(81-86)
  0000  GETTABLE  R1 = R0[K0('m_canClaimProgressReward')]
  0001  TEST      if not R1 then   -> -131069
  0002  JMP       (jump)   -> 7
  0003  SETTABLE  R0[K0('m_canClaimProgressReward')] = K1(false)
  0004  GETTABUP  R1 = _ENV[K2('UIPrefabConfigName')]
  0005  GETTABLE  R1 = R1[K3('TaskGroupFinishWindow')]
  0006  RETURN    return R1..R0
  0007  GETTABLE  R1 = R0[K4('m_canPopChapterFinishWindow')]
  0008  TEST      if not R1 then   -> -131062
  0009  JMP       (jump)   -> 31
  0010  SETTABLE  R0[K4('m_canPopChapterFinishWindow')] = K1(false)
  0011  GETTABUP  R1 = _ENV[K5('GM')]
  0012  GETTABLE  R1 = R1[K6('TaskManager')]
  0013  SELF      R2 = R1[K7('SetPopedChapterFinishWin')] (self)
  0014  CALL      R1 = call(R1, 0 args, 1 rets)
  0015  GETTABUP  R1 = _ENV[K5('GM')]
  0016  GETTABLE  R1 = R1[K6('TaskManager')]
  0017  SELF      R2 = R1[K8('IsLastChapter')] (self)
  0018  CALL      R1 = call(R1, 1 args, 1 rets)
  0019  TEST      if not R1 then   -> -131051
  0020  JMP       (jump)   -> 28
  0021  SELF      R2 = R0[K9('SetNeedCheckPopup')] (self)
  0022  LOADBOOL  R3 = true
  0023  CALL      R1 = call(R1, 0 args, 2 rets)
  0024  GETTABUP  R1 = _ENV[K2('UIPrefabConfigName')]
  0025  GETTABLE  R1 = R1[K11('TaskClearWindow')]
  0026  SETTABLE  R0[K10('m_nextWin')] = R1
  0027  SETTABLE  R0[K12('m_canPopDayClearWindow')] = K1(false)
  0028  GETTABUP  R1 = _ENV[K2('UIPrefabConfigName')]
  0029  GETTABLE  R1 = R1[K13('ChapterFinishWindow')]
  0030  RETURN    return R1..R0
  0031  GETTABLE  R1 = R0[K14('m_canPopNewChapterWindow')]
  0032  TEST      if not R1 then   -> -131038
  0033  JMP       (jump)   -> 69
  0034  SETTABLE  R0[K14('m_canPopNewChapterWindow')] = K1(false)
  0035  GETTABUP  R1 = _ENV[K5('GM')]
  0036  GETTABLE  R1 = R1[K6('TaskManager')]
  0037  SELF      R2 = R1[K15('TryStartNewChapter')] (self)
  0038  CALL      R1 = call(R1, 2 args, 1 rets)
  0039  TEST      if not R1 then   -> -131031
  0040  JMP       (jump)   -> 69
  0041  TEST      if not R2 then   -> -131029
  0042  JMP       (jump)   -> 62
  0043  GETTABUP  R3 = _ENV[K16('IsAutoRun')]
  0044  CALL      R3 = call(R3, 1 args, 0 rets)
  0045  TEST      if not R3 then   -> -131024
  0046  JMP       (jump)   -> 62
  0047  SELF      R4 = R0[K9('SetNeedCheckPopup')] (self)
  0048  LOADBOOL  R5 = true
  0049  CALL      R3 = call(R3, 0 args, 2 rets)
  0050  GETTABUP  R3 = _ENV[K2('UIPrefabConfigName')]
  0051  GETTABLE  R3 = R3[K17('AnimatedRewardWindow')]
  0052  SETTABLE  R0[K10('m_nextWin')] = R3
  0053  GETTABUP  R3 = _ENV[K19('table')]
  0054  GETTABLE  R3 = R3[K20('pack')]
  0055  MOVE      R4 = R0
  0056  LOADK     R5 = K21 'chapter_reward_title'
  0057  LOADBOOL  R6 = true
  0058  GETTABUP  R7 = _ENV[K22('ERewardScene')]
  0059  GETTABLE  R7 = R7[K23('Other')]
  0060  CALL      R3 = call(R3, 1 args, 4 rets)
  0061  SETTABLE  R0[K18('m_nextParam')] = R3
  0062  GETTABUP  R3 = _ENV[K2('UIPrefabConfigName')]
  0063  GETTABLE  R3 = R3[K24('ChapterUnlockWindow')]
  0064  GETTABUP  R4 = _ENV[K19('table')]
  0065  GETTABLE  R4 = R4[K20('pack')]
  0066  MOVE      R5 = R0
  0067  CALL      R4 = call(R4, -1 args, 1 rets)
  0068  RETURN    return R3..R2
  0069  GETTABLE  R1 = R0[K12('m_canPopDayClearWindow')]
  0070  TEST      if not R1 then   -> -131000
  0071  JMP       (jump)   -> 76
  0072  SETTABLE  R0[K12('m_canPopDayClearWindow')] = K1(false)
  0073  GETTABUP  R1 = _ENV[K2('UIPrefabConfigName')]
  0074  GETTABLE  R1 = R1[K25('OrderDayClearWindow')]
  0075  RETURN    return R1..R0
  0076  GETTABLE  R1 = R0[K10('m_nextWin')]
  0077  TEST      if not R1 then   -> -130993
  0078  JMP       (jump)   -> 86
  0079  GETTABLE  R1 = R0[K10('m_nextWin')]
  0080  GETTABLE  R2 = R0[K18('m_nextParam')]
  0081  SETTABLE  R0[K10('m_nextWin')] = K26(nil)
  0082  SETTABLE  R0[K18('m_nextParam')] = K26(nil)
  0083  MOVE      R3 = R0
  0084  MOVE      R4 = R0
  0085  RETURN    return R3..R2
  0086  RETURN    return R0..R-1
