# UI_UIFramework_BaseActivityBaseWindow_266.luac
; fn @BaseActivityBaseWindow.lua  line 0-0 np=0 va=1 ms=3 code=60 consts=25 upvals=1 protos=16
;   K[0]='BaseActivityBaseWindow'
;   K[1]='setmetatable'
;   K[2]='m_bCloseWhenFinish'
;   K[3]=true
;   K[4]='m_forceWindowOpenedState'
;   K[5]=nil
;   K[6]='m_updateWindowOpenedState'
;   K[7]='BaseWindow'
;   K[8]='__index'
;   K[9]='BeforeOpenCheck'
;   K[10]='_CanOpenWindow'
;   K[11]='Init'
;   K[12]='_LogWindowAction'
;   K[13]='_AddListeners'
;   K[14]='_InitModelData'
;   K[15]='_InitView'
;   K[16]='GetModel'
;   K[17]='GetActivityDefinition'
;   K[18]='_IsModelIdChanged'
;   K[19]='_IsActivityValid'
;   K[20]='_IsActivityCountdownValid'
;   K[21]='_OnStateChanged'
;   K[22]='_CloseWhenNotValid'
;   K[23]='UpdatePerSecond'
;   K[24]='_GetCountDownEndTime'
;   upvals: _ENV
0000  GETTABUP  R0 = _ENV[K1('setmetatable')]
0001  NEWTABLE  R1 = {} (0 items)
0002  SETTABLE  R1[K2('m_bCloseWhenFinish')] = K3(true)
0003  SETTABLE  R1[K4('m_forceWindowOpenedState')] = K5(nil)
0004  SETTABLE  R1[K6('m_updateWindowOpenedState')] = K3(true)
0005  GETTABUP  R2 = _ENV[K7('BaseWindow')]
0006  CALL      R0 = call(R0, 1 args, 2 rets)
0007  SETTABUP  _ENV[K0('BaseActivityBaseWindow')] = R0
0008  GETTABUP  R0 = _ENV[K0('BaseActivityBaseWindow')]
0009  GETTABUP  R1 = _ENV[K0('BaseActivityBaseWindow')]
0010  SETTABLE  R0[K8('__index')] = R1
0011  GETTABUP  R0 = _ENV[K0('BaseActivityBaseWindow')]
0012  CLOSURE   R1 = closure proto0
0013  SETTABLE  R0[K9('BeforeOpenCheck')] = R1
0014  GETTABUP  R0 = _ENV[K0('BaseActivityBaseWindow')]
0015  CLOSURE   R1 = closure proto1
0016  SETTABLE  R0[K10('_CanOpenWindow')] = R1
0017  GETTABUP  R0 = _ENV[K0('BaseActivityBaseWindow')]
0018  CLOSURE   R1 = closure proto2
0019  SETTABLE  R0[K11('Init')] = R1
0020  GETTABUP  R0 = _ENV[K0('BaseActivityBaseWindow')]
0021  CLOSURE   R1 = closure proto3
0022  SETTABLE  R0[K12('_LogWindowAction')] = R1
0023  GETTABUP  R0 = _ENV[K0('BaseActivityBaseWindow')]
0024  CLOSURE   R1 = closure proto4
0025  SETTABLE  R0[K13('_AddListeners')] = R1
0026  GETTABUP  R0 = _ENV[K0('BaseActivityBaseWindow')]
0027  CLOSURE   R1 = closure proto5
0028  SETTABLE  R0[K14('_InitModelData')] = R1
0029  GETTABUP  R0 = _ENV[K0('BaseActivityBaseWindow')]
0030  CLOSURE   R1 = closure proto6
0031  SETTABLE  R0[K15('_InitView')] = R1
0032  GETTABUP  R0 = _ENV[K0('BaseActivityBaseWindow')]
0033  CLOSURE   R1 = closure proto7
0034  SETTABLE  R0[K16('GetModel')] = R1
0035  GETTABUP  R0 = _ENV[K0('BaseActivityBaseWindow')]
0036  CLOSURE   R1 = closure proto8
0037  SETTABLE  R0[K17('GetActivityDefinition')] = R1
0038  GETTABUP  R0 = _ENV[K0('BaseActivityBaseWindow')]
0039  CLOSURE   R1 = closure proto9
0040  SETTABLE  R0[K18('_IsModelIdChanged')] = R1
0041  GETTABUP  R0 = _ENV[K0('BaseActivityBaseWindow')]
0042  CLOSURE   R1 = closure proto10
0043  SETTABLE  R0[K19('_IsActivityValid')] = R1
0044  GETTABUP  R0 = _ENV[K0('BaseActivityBaseWindow')]
0045  CLOSURE   R1 = closure proto11
0046  SETTABLE  R0[K20('_IsActivityCountdownValid')] = R1
0047  GETTABUP  R0 = _ENV[K0('BaseActivityBaseWindow')]
0048  CLOSURE   R1 = closure proto12
0049  SETTABLE  R0[K21('_OnStateChanged')] = R1
0050  GETTABUP  R0 = _ENV[K0('BaseActivityBaseWindow')]
0051  CLOSURE   R1 = closure proto13
0052  SETTABLE  R0[K22('_CloseWhenNotValid')] = R1
0053  GETTABUP  R0 = _ENV[K0('BaseActivityBaseWindow')]
0054  CLOSURE   R1 = closure proto14
0055  SETTABLE  R0[K23('UpdatePerSecond')] = R1
0056  GETTABUP  R0 = _ENV[K0('BaseActivityBaseWindow')]
0057  CLOSURE   R1 = closure proto15
0058  SETTABLE  R0[K24('_GetCountDownEndTime')] = R1
0059  RETURN    return R0..R-1
; ---------- proto0 [BeforeOpenCheck] ----------
  ; fn ?  line 18-21 np=3 va=0 ms=7 code=20 consts=6 upvals=1 protos=0
  ;   K[0]='GM'
  ;   K[1]='ActivityManager'
  ;   K[2]='GetModel'
  ;   K[3]=nil
  ;   K[4]='_CanOpenWindow'
  ;   K[5]='GetId'
  ;   upvals: _ENV
  ;   locals: self(0-20), activityType(0-20), id(0-20), model(5-20)
  0000  GETTABUP  R3 = _ENV[K0('GM')]
  0001  GETTABLE  R3 = R3[K1('ActivityManager')]
  0002  SELF      R4 = R3[K2('GetModel')] (self)
  0003  MOVE      R5 = R0
  0004  CALL      R3 = call(R3, 1 args, 2 rets)
  0005  EQ        if R1 eq K3(nil)   -> -129270
  0006  JMP       (jump)   -> 16
  0007  SELF      R5 = R0[K4('_CanOpenWindow')] (self)
  0008  MOVE      R6 = R0
  0009  CALL      R4 = call(R4, 1 args, 2 rets)
  0010  TEST      if not R4 then   -> -131060
  0011  JMP       (jump)   -> 18
  0012  SELF      R5 = R3[K5('GetId')] (self)
  0013  CALL      R4 = call(R4, 1 args, 1 rets)
  0014  EQ        if R1 eq R2   -> -129006
  0015  JMP       (jump)   -> 17
  0016  LOADBOOL  R4 = false
  0017  LOADBOOL  R4 = true
  0018  RETURN    return R4..R3
  0019  RETURN    return R0..R-1
; ---------- proto1 [_CanOpenWindow] ----------
  ; fn ?  line 25-28 np=2 va=0 ms=4 code=14 consts=4 upvals=1 protos=0
  ;   K[0]='GetState'
  ;   K[1]='ActivityState'
  ;   K[2]='Started'
  ;   K[3]='Ended'
  ;   upvals: _ENV
  ;   locals: self(0-14), model(0-14), state(2-14)
  0000  SELF      R3 = R1[K0('GetState')] (self)
  0001  CALL      R2 = call(R2, 1 args, 1 rets)
  0002  GETTABUP  R3 = _ENV[K1('ActivityState')]
  0003  GETTABLE  R3 = R3[K2('Started')]
  0004  EQ        if R1 eq R3   -> -130039
  0005  JMP       (jump)   -> 11
  0006  GETTABUP  R3 = _ENV[K1('ActivityState')]
  0007  GETTABLE  R3 = R3[K3('Ended')]
  0008  EQ        if R1 eq R3   -> -130035
  0009  JMP       (jump)   -> 11
  0010  LOADBOOL  R3 = false
  0011  LOADBOOL  R3 = true
  0012  RETURN    return R3..R2
  0013  RETURN    return R0..R-1
; ---------- proto2 [Init] ----------
  ; fn ?  line 33-51 np=4 va=0 ms=7 code=31 consts=17 upvals=1 protos=0
  ;   K[0]='m_activityType'
  ;   K[1]='m_bAutoPop'
  ;   K[2]='m_model'
  ;   K[3]='GM'
  ;   K[4]='ActivityManager'
  ;   K[5]='GetModel'
  ;   K[6]='m_id'
  ;   K[7]='m_activityDefinition'
  ;   K[8]='GetActivityDefinition'
  ;   K[9]='m_updateWindowOpenedState'
  ;   K[10]='SetWindowOpened'
  ;   K[11]='m_forceWindowOpenedState'
  ;   K[12]='_LogWindowAction'
  ;   K[13]='_AddListeners'
  ;   K[14]='_InitModelData'
  ;   K[15]='_InitView'
  ;   K[16]='UpdatePerSecond'
  ;   upvals: _ENV
  ;   locals: self(0-31), activityType(0-31), id(0-31), bAutoPop(0-31)
  0000  SETTABLE  R0[K0('m_activityType')] = R1
  0001  SETTABLE  R0[K1('m_bAutoPop')] = R3
  0002  GETTABUP  R4 = _ENV[K3('GM')]
  0003  GETTABLE  R4 = R4[K4('ActivityManager')]
  0004  SELF      R5 = R4[K5('GetModel')] (self)
  0005  MOVE      R6 = R0
  0006  CALL      R4 = call(R4, 1 args, 2 rets)
  0007  SETTABLE  R0[K2('m_model')] = R4
  0008  SETTABLE  R0[K6('m_id')] = R2
  0009  GETTABLE  R4 = R0[K2('m_model')]
  0010  SELF      R5 = R4[K8('GetActivityDefinition')] (self)
  0011  CALL      R4 = call(R4, 1 args, 1 rets)
  0012  SETTABLE  R0[K7('m_activityDefinition')] = R4
  0013  GETTABLE  R4 = R0[K9('m_updateWindowOpenedState')]
  0014  TEST      if not R4 then   -> -131056
  0015  JMP       (jump)   -> 20
  0016  GETTABLE  R4 = R0[K2('m_model')]
  0017  SELF      R5 = R4[K10('SetWindowOpened')] (self)
  0018  GETTABLE  R6 = R0[K11('m_forceWindowOpenedState')]
  0019  CALL      R4 = call(R4, 0 args, 2 rets)
  0020  SELF      R5 = R0[K12('_LogWindowAction')] (self)
  0021  CALL      R4 = call(R4, 0 args, 1 rets)
  0022  SELF      R5 = R0[K13('_AddListeners')] (self)
  0023  CALL      R4 = call(R4, 0 args, 1 rets)
  0024  SELF      R5 = R0[K14('_InitModelData')] (self)
  0025  CALL      R4 = call(R4, 0 args, 1 rets)
  0026  SELF      R5 = R0[K15('_InitView')] (self)
  0027  CALL      R4 = call(R4, 0 args, 1 rets)
  0028  SELF      R5 = R0[K16('UpdatePerSecond')] (self)
  0029  CALL      R4 = call(R4, 0 args, 1 rets)
  0030  RETURN    return R0..R-1
; ---------- proto3 [_LogWindowAction] ----------
  ; fn ?  line 53-55 np=1 va=0 ms=6 code=17 consts=8 upvals=1 protos=0
  ;   K[0]='LogWindowAction'
  ;   K[1]='EBIType'
  ;   K[2]='UIActionType'
  ;   K[3]='Open'
  ;   K[4]='m_bAutoPop'
  ;   K[5]='EBIReferType'
  ;   K[6]='AutoPopup'
  ;   K[7]='UserClick'
  ;   upvals: _ENV
  ;   locals: self(0-17)
  0000  SELF      R2 = R0[K0('LogWindowAction')] (self)
  0001  GETTABUP  R3 = _ENV[K1('EBIType')]
  0002  GETTABLE  R3 = R3[K2('UIActionType')]
  0003  GETTABLE  R3 = R3[K3('Open')]
  0004  NEWTABLE  R4 = {} (1 items)
  0005  GETTABLE  R5 = R0[K4('m_bAutoPop')]
  0006  TEST      if not R5 then   -> -131064
  0007  JMP       (jump)   -> 12
  0008  GETTABUP  R5 = _ENV[K5('EBIReferType')]
  0009  GETTABLE  R5 = R5[K6('AutoPopup')]
  0010  TEST      if not R5 then   -> -131059
  0011  JMP       (jump)   -> 14
  0012  GETTABUP  R5 = _ENV[K5('EBIReferType')]
  0013  GETTABLE  R5 = R5[K7('UserClick')]
  0014  SETLIST   setlist R4[B=1,C=1]
  0015  CALL      R1 = call(R1, 0 args, 3 rets)
  0016  RETURN    return R0..R-1
; ---------- proto4 [_AddListeners] ----------
  ; fn ?  line 57-59 np=1 va=0 ms=5 code=9 consts=5 upvals=1 protos=0
  ;   K[0]='EventDispatcher'
  ;   K[1]='AddListener'
  ;   K[2]='GetActivityDefinition'
  ;   K[3]='StateChangedEvent'
  ;   K[4]='_OnStateChanged'
  ;   upvals: _ENV
  ;   locals: self(0-9)
  0000  GETTABUP  R1 = _ENV[K0('EventDispatcher')]
  0001  GETTABLE  R1 = R1[K1('AddListener')]
  0002  SELF      R3 = R0[K2('GetActivityDefinition')] (self)
  0003  CALL      R2 = call(R2, 1 args, 1 rets)
  0004  GETTABLE  R2 = R2[K3('StateChangedEvent')]
  0005  MOVE      R3 = R0
  0006  GETTABLE  R4 = R0[K4('_OnStateChanged')]
  0007  CALL      R1 = call(R1, 0 args, 3 rets)
  0008  RETURN    return R0..R-1
; ---------- proto5 [_InitModelData] ----------
  ; fn ?  line 62-64 np=1 va=0 ms=2 code=1 consts=0 upvals=0 protos=0
  ;   locals: self(0-1)
  0000  RETURN    return R0..R-1
; ---------- proto6 [_InitView] ----------
  ; fn ?  line 67-69 np=1 va=0 ms=2 code=1 consts=0 upvals=0 protos=0
  ;   locals: self(0-1)
  0000  RETURN    return R0..R-1
; ---------- proto7 [GetModel] ----------
  ; fn ?  line 71-73 np=1 va=0 ms=2 code=3 consts=1 upvals=0 protos=0
  ;   K[0]='m_model'
  ;   locals: self(0-3)
  0000  GETTABLE  R1 = R0[K0('m_model')]
  0001  RETURN    return R1..R0
  0002  RETURN    return R0..R-1
; ---------- proto8 [GetActivityDefinition] ----------
  ; fn ?  line 75-77 np=1 va=0 ms=3 code=6 consts=2 upvals=0 protos=0
  ;   K[0]='GetModel'
  ;   K[1]='GetActivityDefinition'
  ;   locals: self(0-6)
  0000  SELF      R2 = R0[K0('GetModel')] (self)
  0001  CALL      R1 = call(R1, 1 args, 1 rets)
  0002  SELF      R2 = R1[K1('GetActivityDefinition')] (self)
  0003  TAILCALL  tailcall(R1, 0)
  0004  RETURN    return R1..R0
  0005  RETURN    return R0..R-1
; ---------- proto9 [_IsModelIdChanged] ----------
  ; fn ?  line 79-81 np=1 va=0 ms=4 code=11 consts=3 upvals=0 protos=0
  ;   K[0]='m_id'
  ;   K[1]='GetModel'
  ;   K[2]='GetId'
  ;   locals: self(0-11)
  0000  GETTABLE  R1 = R0[K0('m_id')]
  0001  SELF      R3 = R0[K1('GetModel')] (self)
  0002  CALL      R2 = call(R2, 1 args, 1 rets)
  0003  SELF      R3 = R2[K2('GetId')] (self)
  0004  CALL      R2 = call(R2, 1 args, 1 rets)
  0005  EQ        if R0 eq R2   -> -130551
  0006  JMP       (jump)   -> 8
  0007  LOADBOOL  R1 = false
  0008  LOADBOOL  R1 = true
  0009  RETURN    return R1..R0
  0010  RETURN    return R0..R-1
; ---------- proto10 [_IsActivityValid] ----------
  ; fn ?  line 84-86 np=1 va=0 ms=3 code=11 consts=3 upvals=0 protos=0
  ;   K[0]='GetModel'
  ;   K[1]='IsActivityOpen'
  ;   K[2]='_IsModelIdChanged'
  ;   locals: self(0-11)
  0000  SELF      R2 = R0[K0('GetModel')] (self)
  0001  CALL      R1 = call(R1, 1 args, 1 rets)
  0002  SELF      R2 = R1[K1('IsActivityOpen')] (self)
  0003  CALL      R1 = call(R1, 1 args, 1 rets)
  0004  TEST      if not R1 then   -> -131066
  0005  JMP       (jump)   -> 9
  0006  SELF      R2 = R0[K2('_IsModelIdChanged')] (self)
  0007  CALL      R1 = call(R1, 1 args, 1 rets)
  0008  NOT       R1 = not R0
  0009  RETURN    return R1..R0
  0010  RETURN    return R0..R-1
; ---------- proto11 [_IsActivityCountdownValid] ----------
  ; fn ?  line 89-91 np=1 va=0 ms=3 code=4 consts=1 upvals=0 protos=0
  ;   K[0]='_IsActivityValid'
  ;   locals: self(0-4)
  0000  SELF      R2 = R0[K0('_IsActivityValid')] (self)
  0001  TAILCALL  tailcall(R1, 0)
  0002  RETURN    return R1..R0
  0003  RETURN    return R0..R-1
; ---------- proto12 [_OnStateChanged] ----------
  ; fn ?  line 93-96 np=1 va=0 ms=3 code=3 consts=1 upvals=0 protos=0
  ;   K[0]='_CloseWhenNotValid'
  ;   locals: self(0-3)
  0000  SELF      R2 = R0[K0('_CloseWhenNotValid')] (self)
  0001  CALL      R1 = call(R1, 0 args, 1 rets)
  0002  RETURN    return R0..R-1
; ---------- proto13 [_CloseWhenNotValid] ----------
  ; fn ?  line 98-102 np=1 va=0 ms=3 code=10 consts=3 upvals=0 protos=0
  ;   K[0]='m_bCloseWhenFinish'
  ;   K[1]='_IsActivityValid'
  ;   K[2]='Close'
  ;   locals: self(0-10)
  0000  GETTABLE  R1 = R0[K0('m_bCloseWhenFinish')]
  0001  TEST      if not R1 then   -> -131069
  0002  JMP       (jump)   -> 9
  0003  SELF      R2 = R0[K1('_IsActivityValid')] (self)
  0004  CALL      R1 = call(R1, 1 args, 1 rets)
  0005  TEST      if not R1 then   -> -131064
  0006  JMP       (jump)   -> 9
  0007  SELF      R2 = R0[K2('Close')] (self)
  0008  CALL      R1 = call(R1, 0 args, 1 rets)
  0009  RETURN    return R0..R-1
; ---------- proto14 [UpdatePerSecond] ----------
  ; fn ?  line 104-114 np=1 va=0 ms=8 code=39 consts=18 upvals=1 protos=0
  ;   K[0]='UIUtil'
  ;   K[1]='IsEmptyComponent'
  ;   K[2]='m_countDownText'
  ;   K[3]='_IsActivityCountdownValid'
  ;   K[4]='text'
  ;   K[5]='GM'
  ;   K[6]='GameTextModel'
  ;   K[7]='GetText'
  ;   K[8]='countdown_finished'
  ;   K[9]='math'
  ;   K[10]='max'
  ;   K[11]=0
  ;   K[12]='_GetCountDownEndTime'
  ;   K[13]='GameModel'
  ;   K[14]='GetServerTime'
  ;   K[15]='TimeUtil'
  ;   K[16]='ParseTimeDescription'
  ;   K[17]=2
  ;   upvals: _ENV
  ;   locals: self(0-39), leftDuration(29-38)
  0000  GETTABUP  R1 = _ENV[K0('UIUtil')]
  0001  GETTABLE  R1 = R1[K1('IsEmptyComponent')]
  0002  GETTABLE  R2 = R0[K2('m_countDownText')]
  0003  CALL      R1 = call(R1, 1 args, 1 rets)
  0004  TEST      if not R1 then   -> -131065
  0005  JMP       (jump)   -> 38
  0006  SELF      R2 = R0[K3('_IsActivityCountdownValid')] (self)
  0007  CALL      R1 = call(R1, 1 args, 1 rets)
  0008  TEST      if not R1 then   -> -131061
  0009  JMP       (jump)   -> 18
  0010  GETTABLE  R1 = R0[K2('m_countDownText')]
  0011  GETTABUP  R2 = _ENV[K5('GM')]
  0012  GETTABLE  R2 = R2[K6('GameTextModel')]
  0013  SELF      R3 = R2[K7('GetText')] (self)
  0014  LOADK     R4 = K8 'countdown_finished'
  0015  CALL      R2 = call(R2, 1 args, 2 rets)
  0016  SETTABLE  R1[K4('text')] = R2
  0017  JMP       (jump)   -> 38
  0018  GETTABUP  R1 = _ENV[K9('math')]
  0019  GETTABLE  R1 = R1[K10('max')]
  0020  LOADK     R2 = K11 0
  0021  SELF      R4 = R0[K12('_GetCountDownEndTime')] (self)
  0022  CALL      R3 = call(R3, 1 args, 1 rets)
  0023  GETTABUP  R4 = _ENV[K5('GM')]
  0024  GETTABLE  R4 = R4[K13('GameModel')]
  0025  SELF      R5 = R4[K14('GetServerTime')] (self)
  0026  CALL      R4 = call(R4, 1 args, 1 rets)
  0027  SUB       R3 = R4 sub R3
  0028  CALL      R1 = call(R1, 1 args, 2 rets)
  0029  GETTABLE  R2 = R0[K2('m_countDownText')]
  0030  GETTABUP  R3 = _ENV[K15('TimeUtil')]
  0031  GETTABLE  R3 = R3[K16('ParseTimeDescription')]
  0032  MOVE      R4 = R0
  0033  LOADK     R5 = K17 2
  0034  LOADBOOL  R6 = false
  0035  LOADBOOL  R7 = false
  0036  CALL      R3 = call(R3, 1 args, 4 rets)
  0037  SETTABLE  R2[K4('text')] = R3
  0038  RETURN    return R0..R-1
; ---------- proto15 [_GetCountDownEndTime] ----------
  ; fn ?  line 117-119 np=1 va=0 ms=3 code=6 consts=2 upvals=0 protos=0
  ;   K[0]='GetModel'
  ;   K[1]='GetEndTime'
  ;   locals: self(0-6)
  0000  SELF      R2 = R0[K0('GetModel')] (self)
  0001  CALL      R1 = call(R1, 1 args, 1 rets)
  0002  SELF      R2 = R1[K1('GetEndTime')] (self)
  0003  TAILCALL  tailcall(R1, 0)
  0004  RETURN    return R1..R0
  0005  RETURN    return R0..R-1
