diff --git a/index.html b/index.html index 043651c6..1fd9544e 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ Phantasmal World - + - + \ No newline at end of file diff --git a/main.29cfe74e1ad0db8585f4.js b/main.29cfe74e1ad0db8585f4.js deleted file mode 100644 index 3e38d4af..00000000 --- a/main.29cfe74e1ad0db8585f4.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{"+LO4":function(e,t,i){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=o(i("GGSb")).default.get("core/observable/property/AbstractMinimalProperty");t.AbstractMinimalProperty=class{constructor(){this.is_property=!0,this.observers=[]}observe(e,t){return this.observers.includes(e)||this.observers.push(e),t&&t.call_now&&this.call_observer(e,this.val),{dispose:()=>{const t=this.observers.indexOf(e);-1!==t&&this.observers.splice(t,1)}}}emit(e){for(const t of this.observers)this.call_observer(t,e)}call_observer(e,t){try{e({value:this.val,old_value:t})}catch(e){n.error("Observer threw error.",e)}}}},"+oIp":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("xs7i");var n;!function(e){e[e.Unknown=1e3]="Unknown",e[e.PlayerSet=1001]="PlayerSet",e[e.Particle=1002]="Particle",e[e.Teleporter=1003]="Teleporter",e[e.Warp=1004]="Warp",e[e.LightCollision=1005]="LightCollision",e[e.Item=1006]="Item",e[e.EnvSound=1007]="EnvSound",e[e.FogCollision=1008]="FogCollision",e[e.EventCollision=1009]="EventCollision",e[e.CharaCollision=1010]="CharaCollision",e[e.ElementalTrap=1011]="ElementalTrap",e[e.StatusTrap=1012]="StatusTrap",e[e.HealTrap=1013]="HealTrap",e[e.LargeElementalTrap=1014]="LargeElementalTrap",e[e.ObjRoomID=1015]="ObjRoomID",e[e.Sensor=1016]="Sensor",e[e.UnknownItem16=1017]="UnknownItem16",e[e.LensFlare=1018]="LensFlare",e[e.ScriptCollision=1019]="ScriptCollision",e[e.HealRing=1020]="HealRing",e[e.MapCollision=1021]="MapCollision",e[e.ScriptCollisionA=1022]="ScriptCollisionA",e[e.ItemLight=1023]="ItemLight",e[e.RadarCollision=1024]="RadarCollision",e[e.FogCollisionSW=1025]="FogCollisionSW",e[e.BossTeleporter=1026]="BossTeleporter",e[e.ImageBoard=1027]="ImageBoard",e[e.QuestWarp=1028]="QuestWarp",e[e.Epilogue=1029]="Epilogue",e[e.UnknownItem29=1030]="UnknownItem29",e[e.UnknownItem30=1031]="UnknownItem30",e[e.UnknownItem31=1032]="UnknownItem31",e[e.BoxDetectObject=1033]="BoxDetectObject",e[e.SymbolChatObject=1034]="SymbolChatObject",e[e.TouchPlateObject=1035]="TouchPlateObject",e[e.TargetableObject=1036]="TargetableObject",e[e.EffectObject=1037]="EffectObject",e[e.CountDownObject=1038]="CountDownObject",e[e.UnknownItem38=1039]="UnknownItem38",e[e.UnknownItem39=1040]="UnknownItem39",e[e.UnknownItem40=1041]="UnknownItem40",e[e.UnknownItem41=1042]="UnknownItem41",e[e.MenuActivation=1043]="MenuActivation",e[e.TelepipeLocation=1044]="TelepipeLocation",e[e.BGMCollision=1045]="BGMCollision",e[e.MainRagolTeleporter=1046]="MainRagolTeleporter",e[e.LobbyTeleporter=1047]="LobbyTeleporter",e[e.PrincipalWarp=1048]="PrincipalWarp",e[e.ShopDoor=1049]="ShopDoor",e[e.HuntersGuildDoor=1050]="HuntersGuildDoor",e[e.TeleporterDoor=1051]="TeleporterDoor",e[e.MedicalCenterDoor=1052]="MedicalCenterDoor",e[e.Elevator=1053]="Elevator",e[e.EasterEgg=1054]="EasterEgg",e[e.ValentinesHeart=1055]="ValentinesHeart",e[e.ChristmasTree=1056]="ChristmasTree",e[e.ChristmasWreath=1057]="ChristmasWreath",e[e.HalloweenPumpkin=1058]="HalloweenPumpkin",e[e.TwentyFirstCentury=1059]="TwentyFirstCentury",e[e.Sonic=1060]="Sonic",e[e.WelcomeBoard=1061]="WelcomeBoard",e[e.Firework=1062]="Firework",e[e.LobbyScreenDoor=1063]="LobbyScreenDoor",e[e.MainRagolTeleporterBattleInNextArea=1064]="MainRagolTeleporterBattleInNextArea",e[e.LabTeleporterDoor=1065]="LabTeleporterDoor",e[e.Pioneer2InvisibleTouchplate=1066]="Pioneer2InvisibleTouchplate",e[e.ForestDoor=1067]="ForestDoor",e[e.ForestSwitch=1068]="ForestSwitch",e[e.LaserFence=1069]="LaserFence",e[e.LaserSquareFence=1070]="LaserSquareFence",e[e.ForestLaserFenceSwitch=1071]="ForestLaserFenceSwitch",e[e.LightRays=1072]="LightRays",e[e.BlueButterfly=1073]="BlueButterfly",e[e.Probe=1074]="Probe",e[e.RandomTypeBox1=1075]="RandomTypeBox1",e[e.ForestWeatherStation=1076]="ForestWeatherStation",e[e.Battery=1077]="Battery",e[e.ForestConsole=1078]="ForestConsole",e[e.BlackSlidingDoor=1079]="BlackSlidingDoor",e[e.RicoMessagePod=1080]="RicoMessagePod",e[e.EnergyBarrier=1081]="EnergyBarrier",e[e.ForestRisingBridge=1082]="ForestRisingBridge",e[e.SwitchNoneDoor=1083]="SwitchNoneDoor",e[e.EnemyBoxGrey=1084]="EnemyBoxGrey",e[e.FixedTypeBox=1085]="FixedTypeBox",e[e.EnemyBoxBrown=1086]="EnemyBoxBrown",e[e.EmptyTypeBox=1087]="EmptyTypeBox",e[e.LaserFenceEx=1088]="LaserFenceEx",e[e.LaserSquareFenceEx=1089]="LaserSquareFenceEx",e[e.FloorPanel1=1090]="FloorPanel1",e[e.Caves4ButtonDoor=1091]="Caves4ButtonDoor",e[e.CavesNormalDoor=1092]="CavesNormalDoor",e[e.CavesSmashingPillar=1093]="CavesSmashingPillar",e[e.CavesSign1=1094]="CavesSign1",e[e.CavesSign2=1095]="CavesSign2",e[e.CavesSign3=1096]="CavesSign3",e[e.HexagonalTank=1097]="HexagonalTank",e[e.BrownPlatform=1098]="BrownPlatform",e[e.WarningLightObject=1099]="WarningLightObject",e[e.Rainbow=1100]="Rainbow",e[e.FloatingJellyfish=1101]="FloatingJellyfish",e[e.FloatingDragonfly=1102]="FloatingDragonfly",e[e.CavesSwitchDoor=1103]="CavesSwitchDoor",e[e.RobotRechargeStation=1104]="RobotRechargeStation",e[e.CavesCakeShop=1105]="CavesCakeShop",e[e.Caves1SmallRedRock=1106]="Caves1SmallRedRock",e[e.Caves1MediumRedRock=1107]="Caves1MediumRedRock",e[e.Caves1LargeRedRock=1108]="Caves1LargeRedRock",e[e.Caves2SmallRock1=1109]="Caves2SmallRock1",e[e.Caves2MediumRock1=1110]="Caves2MediumRock1",e[e.Caves2LargeRock1=1111]="Caves2LargeRock1",e[e.Caves2SmallRock2=1112]="Caves2SmallRock2",e[e.Caves2MediumRock2=1113]="Caves2MediumRock2",e[e.Caves2LargeRock2=1114]="Caves2LargeRock2",e[e.Caves3SmallRock=1115]="Caves3SmallRock",e[e.Caves3MediumRock=1116]="Caves3MediumRock",e[e.Caves3LargeRock=1117]="Caves3LargeRock",e[e.FloorPanel2=1118]="FloorPanel2",e[e.DestructableRockCaves1=1119]="DestructableRockCaves1",e[e.DestructableRockCaves2=1120]="DestructableRockCaves2",e[e.DestructableRockCaves3=1121]="DestructableRockCaves3",e[e.MinesDoor=1122]="MinesDoor",e[e.FloorPanel3=1123]="FloorPanel3",e[e.MinesSwitchDoor=1124]="MinesSwitchDoor",e[e.LargeCryoTube=1125]="LargeCryoTube",e[e.ComputerLikeCalus=1126]="ComputerLikeCalus",e[e.GreenScreenOpeningAndClosing=1127]="GreenScreenOpeningAndClosing",e[e.FloatingRobot=1128]="FloatingRobot",e[e.FloatingBlueLight=1129]="FloatingBlueLight",e[e.SelfDestructingObject1=1130]="SelfDestructingObject1",e[e.SelfDestructingObject2=1131]="SelfDestructingObject2",e[e.SelfDestructingObject3=1132]="SelfDestructingObject3",e[e.SparkMachine=1133]="SparkMachine",e[e.MinesLargeFlashingCrate=1134]="MinesLargeFlashingCrate",e[e.RuinsSeal=1135]="RuinsSeal",e[e.RuinsTeleporter=1136]="RuinsTeleporter",e[e.RuinsWarpSiteToSite=1137]="RuinsWarpSiteToSite",e[e.RuinsSwitch=1138]="RuinsSwitch",e[e.FloorPanel4=1139]="FloorPanel4",e[e.Ruins1Door=1140]="Ruins1Door",e[e.Ruins3Door=1141]="Ruins3Door",e[e.Ruins2Door=1142]="Ruins2Door",e[e.Ruins11ButtonDoor=1143]="Ruins11ButtonDoor",e[e.Ruins21ButtonDoor=1144]="Ruins21ButtonDoor",e[e.Ruins31ButtonDoor=1145]="Ruins31ButtonDoor",e[e.Ruins4ButtonDoor=1146]="Ruins4ButtonDoor",e[e.Ruins2ButtonDoor=1147]="Ruins2ButtonDoor",e[e.RuinsSensor=1148]="RuinsSensor",e[e.RuinsFenceSwitch=1149]="RuinsFenceSwitch",e[e.RuinsLaserFence4x2=1150]="RuinsLaserFence4x2",e[e.RuinsLaserFence6x2=1151]="RuinsLaserFence6x2",e[e.RuinsLaserFence4x4=1152]="RuinsLaserFence4x4",e[e.RuinsLaserFence6x4=1153]="RuinsLaserFence6x4",e[e.RuinsPoisonBlob=1154]="RuinsPoisonBlob",e[e.RuinsPillarTrap=1155]="RuinsPillarTrap",e[e.PopupTrapNoTech=1156]="PopupTrapNoTech",e[e.RuinsCrystal=1157]="RuinsCrystal",e[e.Monument=1158]="Monument",e[e.RuinsRock1=1159]="RuinsRock1",e[e.RuinsRock2=1160]="RuinsRock2",e[e.RuinsRock3=1161]="RuinsRock3",e[e.RuinsRock4=1162]="RuinsRock4",e[e.RuinsRock5=1163]="RuinsRock5",e[e.RuinsRock6=1164]="RuinsRock6",e[e.RuinsRock7=1165]="RuinsRock7",e[e.Poison=1166]="Poison",e[e.FixedBoxTypeRuins=1167]="FixedBoxTypeRuins",e[e.RandomBoxTypeRuins=1168]="RandomBoxTypeRuins",e[e.EnemyTypeBoxYellow=1169]="EnemyTypeBoxYellow",e[e.EnemyTypeBoxBlue=1170]="EnemyTypeBoxBlue",e[e.EmptyTypeBoxBlue=1171]="EmptyTypeBoxBlue",e[e.DestructableRock=1172]="DestructableRock",e[e.PopupTrapsTechs=1173]="PopupTrapsTechs",e[e.FlyingWhiteBird=1174]="FlyingWhiteBird",e[e.Tower=1175]="Tower",e[e.FloatingRocks=1176]="FloatingRocks",e[e.FloatingSoul=1177]="FloatingSoul",e[e.Butterfly=1178]="Butterfly",e[e.LobbyGameMenu=1179]="LobbyGameMenu",e[e.LobbyWarpObject=1180]="LobbyWarpObject",e[e.Lobby1EventObjectDefaultTree=1181]="Lobby1EventObjectDefaultTree",e[e.UnknownItem387=1182]="UnknownItem387",e[e.UnknownItem388=1183]="UnknownItem388",e[e.UnknownItem389=1184]="UnknownItem389",e[e.LobbyEventObjectStaticPumpkin=1185]="LobbyEventObjectStaticPumpkin",e[e.LobbyEventObject3ChristmasWindows=1186]="LobbyEventObject3ChristmasWindows",e[e.LobbyEventObjectRedAndWhiteCurtain=1187]="LobbyEventObjectRedAndWhiteCurtain",e[e.UnknownItem393=1188]="UnknownItem393",e[e.UnknownItem394=1189]="UnknownItem394",e[e.LobbyFishTank=1190]="LobbyFishTank",e[e.LobbyEventObjectButterflies=1191]="LobbyEventObjectButterflies",e[e.UnknownItem400=1192]="UnknownItem400",e[e.GreyWallLow=1193]="GreyWallLow",e[e.SpaceshipDoor=1194]="SpaceshipDoor",e[e.GreyWallHigh=1195]="GreyWallHigh",e[e.TempleNormalDoor=1196]="TempleNormalDoor",e[e.BreakableWallWallButUnbreakable=1197]="BreakableWallWallButUnbreakable",e[e.BrokenCylinderAndRubble=1198]="BrokenCylinderAndRubble",e[e.ThreeBrokenWallPiecesOnFloor=1199]="ThreeBrokenWallPiecesOnFloor",e[e.HighBrickCylinder=1200]="HighBrickCylinder",e[e.LyingCylinder=1201]="LyingCylinder",e[e.BrickConeWithFlatTop=1202]="BrickConeWithFlatTop",e[e.BreakableTempleWall=1203]="BreakableTempleWall",e[e.TempleMapDetect=1204]="TempleMapDetect",e[e.SmallBrownBrickRisingBridge=1205]="SmallBrownBrickRisingBridge",e[e.LongRisingBridgeWithPinkHighEdges=1206]="LongRisingBridgeWithPinkHighEdges",e[e.FourSwitchTempleDoor=1207]="FourSwitchTempleDoor",e[e.FourButtonSpaceshipDoor=1208]="FourButtonSpaceshipDoor",e[e.ItemBoxCca=1209]="ItemBoxCca",e[e.TeleporterEp2=1210]="TeleporterEp2",e[e.CCADoor=1211]="CCADoor",e[e.SpecialBoxCCA=1212]="SpecialBoxCCA",e[e.BigCCADoor=1213]="BigCCADoor",e[e.BigCCADoorSwitch=1214]="BigCCADoorSwitch",e[e.LittleRock=1215]="LittleRock",e[e.Little3StoneWall=1216]="Little3StoneWall",e[e.Medium3StoneWall=1217]="Medium3StoneWall",e[e.SpiderPlant=1218]="SpiderPlant",e[e.CCAAreaTeleporter=1219]="CCAAreaTeleporter",e[e.UnknownItem523=1220]="UnknownItem523",e[e.WhiteBird=1221]="WhiteBird",e[e.OrangeBird=1222]="OrangeBird",e[e.Saw=1223]="Saw",e[e.LaserDetect=1224]="LaserDetect",e[e.UnknownItem529=1225]="UnknownItem529",e[e.UnknownItem530=1226]="UnknownItem530",e[e.Seagull=1227]="Seagull",e[e.Fish=1228]="Fish",e[e.SeabedDoorWithBlueEdges=1229]="SeabedDoorWithBlueEdges",e[e.SeabedDoorAlwaysOpenNonTriggerable=1230]="SeabedDoorAlwaysOpenNonTriggerable",e[e.LittleCryotube=1231]="LittleCryotube",e[e.WideGlassWallBreakable=1232]="WideGlassWallBreakable",e[e.BlueFloatingRobot=1233]="BlueFloatingRobot",e[e.RedFloatingRobot=1234]="RedFloatingRobot",e[e.Dolphin=1235]="Dolphin",e[e.CaptureTrap=1236]="CaptureTrap",e[e.VRLink=1237]="VRLink",e[e.UnknownItem576=1238]="UnknownItem576",e[e.WarpInBarbaRayRoom=1239]="WarpInBarbaRayRoom",e[e.UnknownItem672=1240]="UnknownItem672",e[e.GeeNest=1241]="GeeNest",e[e.LabComputerConsole=1242]="LabComputerConsole",e[e.LabComputerConsoleGreenScreen=1243]="LabComputerConsoleGreenScreen",e[e.ChairYellowPillow=1244]="ChairYellowPillow",e[e.OrangeWallWithHoleInMiddle=1245]="OrangeWallWithHoleInMiddle",e[e.GreyWallWithHoleInMiddle=1246]="GreyWallWithHoleInMiddle",e[e.LongTable=1247]="LongTable",e[e.GBAStation=1248]="GBAStation",e[e.TalkLinkToSupport=1249]="TalkLinkToSupport",e[e.InstaWarp=1250]="InstaWarp",e[e.LabInvisibleObject=1251]="LabInvisibleObject",e[e.LabGlassWindowDoor=1252]="LabGlassWindowDoor",e[e.UnknownItem700=1253]="UnknownItem700",e[e.LabCeilingWarp=1254]="LabCeilingWarp",e[e.Ep4LightSource=1255]="Ep4LightSource",e[e.Cacti=1256]="Cacti",e[e.BigBrownRock=1257]="BigBrownRock",e[e.BreakableBrownRock=1258]="BreakableBrownRock",e[e.UnknownItem832=1259]="UnknownItem832",e[e.UnknownItem833=1260]="UnknownItem833",e[e.PoisonPlant=1261]="PoisonPlant",e[e.UnknownItem897=1262]="UnknownItem897",e[e.UnknownItem898=1263]="UnknownItem898",e[e.OozingDesertPlant=1264]="OozingDesertPlant",e[e.UnknownItem901=1265]="UnknownItem901",e[e.BigBlackRocks=1266]="BigBlackRocks",e[e.UnknownItem903=1267]="UnknownItem903",e[e.UnknownItem904=1268]="UnknownItem904",e[e.UnknownItem905=1269]="UnknownItem905",e[e.UnknownItem906=1270]="UnknownItem906",e[e.FallingRock=1271]="FallingRock",e[e.DesertPlantHasCollision=1272]="DesertPlantHasCollision",e[e.DesertFixedTypeBoxBreakableCrystals=1273]="DesertFixedTypeBoxBreakableCrystals",e[e.UnknownItem910=1274]="UnknownItem910",e[e.BeeHive=1275]="BeeHive",e[e.UnknownItem912=1276]="UnknownItem912",e[e.Heat=1277]="Heat",e[e.TopOfSaintMillionEgg=1278]="TopOfSaintMillionEgg",e[e.UnknownItem961=1279]="UnknownItem961"}(n=t.ObjectType||(t.ObjectType={})),t.OBJECT_TYPES=[],t.object_data=function(e){return s[e]},t.pso_id_to_object_type=function(e){switch(e){default:return n.Unknown;case 0:return n.PlayerSet;case 1:return n.Particle;case 2:return n.Teleporter;case 3:return n.Warp;case 4:return n.LightCollision;case 5:return n.Item;case 6:return n.EnvSound;case 7:return n.FogCollision;case 8:return n.EventCollision;case 9:return n.CharaCollision;case 10:return n.ElementalTrap;case 11:return n.StatusTrap;case 12:return n.HealTrap;case 13:return n.LargeElementalTrap;case 14:return n.ObjRoomID;case 15:return n.Sensor;case 16:return n.UnknownItem16;case 17:return n.LensFlare;case 18:return n.ScriptCollision;case 19:return n.HealRing;case 20:return n.MapCollision;case 21:return n.ScriptCollisionA;case 22:return n.ItemLight;case 23:return n.RadarCollision;case 24:return n.FogCollisionSW;case 25:return n.BossTeleporter;case 26:return n.ImageBoard;case 27:return n.QuestWarp;case 28:return n.Epilogue;case 29:return n.UnknownItem29;case 30:return n.UnknownItem30;case 31:return n.UnknownItem31;case 32:return n.BoxDetectObject;case 33:return n.SymbolChatObject;case 34:return n.TouchPlateObject;case 35:return n.TargetableObject;case 36:return n.EffectObject;case 37:return n.CountDownObject;case 38:return n.UnknownItem38;case 39:return n.UnknownItem39;case 40:return n.UnknownItem40;case 41:return n.UnknownItem41;case 64:return n.MenuActivation;case 65:return n.TelepipeLocation;case 66:return n.BGMCollision;case 67:return n.MainRagolTeleporter;case 68:return n.LobbyTeleporter;case 69:return n.PrincipalWarp;case 70:return n.ShopDoor;case 71:return n.HuntersGuildDoor;case 72:return n.TeleporterDoor;case 73:return n.MedicalCenterDoor;case 74:return n.Elevator;case 75:return n.EasterEgg;case 76:return n.ValentinesHeart;case 77:return n.ChristmasTree;case 78:return n.ChristmasWreath;case 79:return n.HalloweenPumpkin;case 80:return n.TwentyFirstCentury;case 81:return n.Sonic;case 82:return n.WelcomeBoard;case 83:return n.Firework;case 84:return n.LobbyScreenDoor;case 85:return n.MainRagolTeleporterBattleInNextArea;case 86:return n.LabTeleporterDoor;case 87:return n.Pioneer2InvisibleTouchplate;case 128:return n.ForestDoor;case 129:return n.ForestSwitch;case 130:return n.LaserFence;case 131:return n.LaserSquareFence;case 132:return n.ForestLaserFenceSwitch;case 133:return n.LightRays;case 134:return n.BlueButterfly;case 135:return n.Probe;case 136:return n.RandomTypeBox1;case 137:return n.ForestWeatherStation;case 138:return n.Battery;case 139:return n.ForestConsole;case 140:return n.BlackSlidingDoor;case 141:return n.RicoMessagePod;case 142:return n.EnergyBarrier;case 143:return n.ForestRisingBridge;case 144:return n.SwitchNoneDoor;case 145:return n.EnemyBoxGrey;case 146:return n.FixedTypeBox;case 147:return n.EnemyBoxBrown;case 149:return n.EmptyTypeBox;case 150:return n.LaserFenceEx;case 151:return n.LaserSquareFenceEx;case 192:return n.FloorPanel1;case 193:return n.Caves4ButtonDoor;case 194:return n.CavesNormalDoor;case 195:return n.CavesSmashingPillar;case 196:return n.CavesSign1;case 197:return n.CavesSign2;case 198:return n.CavesSign3;case 199:return n.HexagonalTank;case 200:return n.BrownPlatform;case 201:return n.WarningLightObject;case 203:return n.Rainbow;case 204:return n.FloatingJellyfish;case 205:return n.FloatingDragonfly;case 206:return n.CavesSwitchDoor;case 207:return n.RobotRechargeStation;case 208:return n.CavesCakeShop;case 209:return n.Caves1SmallRedRock;case 210:return n.Caves1MediumRedRock;case 211:return n.Caves1LargeRedRock;case 212:return n.Caves2SmallRock1;case 213:return n.Caves2MediumRock1;case 214:return n.Caves2LargeRock1;case 215:return n.Caves2SmallRock2;case 216:return n.Caves2MediumRock2;case 217:return n.Caves2LargeRock2;case 218:return n.Caves3SmallRock;case 219:return n.Caves3MediumRock;case 220:return n.Caves3LargeRock;case 222:return n.FloorPanel2;case 223:return n.DestructableRockCaves1;case 224:return n.DestructableRockCaves2;case 225:return n.DestructableRockCaves3;case 256:return n.MinesDoor;case 257:return n.FloorPanel3;case 258:return n.MinesSwitchDoor;case 259:return n.LargeCryoTube;case 260:return n.ComputerLikeCalus;case 261:return n.GreenScreenOpeningAndClosing;case 262:return n.FloatingRobot;case 263:return n.FloatingBlueLight;case 264:return n.SelfDestructingObject1;case 265:return n.SelfDestructingObject2;case 266:return n.SelfDestructingObject3;case 267:return n.SparkMachine;case 268:return n.MinesLargeFlashingCrate;case 304:return n.RuinsSeal;case 320:return n.RuinsTeleporter;case 321:return n.RuinsWarpSiteToSite;case 322:return n.RuinsSwitch;case 323:return n.FloorPanel4;case 324:return n.Ruins1Door;case 325:return n.Ruins3Door;case 326:return n.Ruins2Door;case 327:return n.Ruins11ButtonDoor;case 328:return n.Ruins21ButtonDoor;case 329:return n.Ruins31ButtonDoor;case 330:return n.Ruins4ButtonDoor;case 331:return n.Ruins2ButtonDoor;case 332:return n.RuinsSensor;case 333:return n.RuinsFenceSwitch;case 334:return n.RuinsLaserFence4x2;case 335:return n.RuinsLaserFence6x2;case 336:return n.RuinsLaserFence4x4;case 337:return n.RuinsLaserFence6x4;case 338:return n.RuinsPoisonBlob;case 339:return n.RuinsPillarTrap;case 340:return n.PopupTrapNoTech;case 341:return n.RuinsCrystal;case 342:return n.Monument;case 345:return n.RuinsRock1;case 346:return n.RuinsRock2;case 347:return n.RuinsRock3;case 348:return n.RuinsRock4;case 349:return n.RuinsRock5;case 350:return n.RuinsRock6;case 351:return n.RuinsRock7;case 352:return n.Poison;case 353:return n.FixedBoxTypeRuins;case 354:return n.RandomBoxTypeRuins;case 355:return n.EnemyTypeBoxYellow;case 356:return n.EnemyTypeBoxBlue;case 357:return n.EmptyTypeBoxBlue;case 358:return n.DestructableRock;case 359:return n.PopupTrapsTechs;case 368:return n.FlyingWhiteBird;case 369:return n.Tower;case 370:return n.FloatingRocks;case 371:return n.FloatingSoul;case 372:return n.Butterfly;case 384:return n.LobbyGameMenu;case 385:return n.LobbyWarpObject;case 386:return n.Lobby1EventObjectDefaultTree;case 387:return n.UnknownItem387;case 388:return n.UnknownItem388;case 389:return n.UnknownItem389;case 390:return n.LobbyEventObjectStaticPumpkin;case 391:return n.LobbyEventObject3ChristmasWindows;case 392:return n.LobbyEventObjectRedAndWhiteCurtain;case 393:return n.UnknownItem393;case 394:return n.UnknownItem394;case 395:return n.LobbyFishTank;case 396:return n.LobbyEventObjectButterflies;case 400:return n.UnknownItem400;case 401:return n.GreyWallLow;case 402:return n.SpaceshipDoor;case 403:return n.GreyWallHigh;case 416:return n.TempleNormalDoor;case 417:return n.BreakableWallWallButUnbreakable;case 418:return n.BrokenCylinderAndRubble;case 419:return n.ThreeBrokenWallPiecesOnFloor;case 420:return n.HighBrickCylinder;case 421:return n.LyingCylinder;case 422:return n.BrickConeWithFlatTop;case 423:return n.BreakableTempleWall;case 424:return n.TempleMapDetect;case 425:return n.SmallBrownBrickRisingBridge;case 426:return n.LongRisingBridgeWithPinkHighEdges;case 427:return n.FourSwitchTempleDoor;case 448:return n.FourButtonSpaceshipDoor;case 512:return n.ItemBoxCca;case 513:return n.TeleporterEp2;case 514:return n.CCADoor;case 515:return n.SpecialBoxCCA;case 516:return n.BigCCADoor;case 517:return n.BigCCADoorSwitch;case 518:return n.LittleRock;case 519:return n.Little3StoneWall;case 520:return n.Medium3StoneWall;case 521:return n.SpiderPlant;case 522:return n.CCAAreaTeleporter;case 523:return n.UnknownItem523;case 524:return n.WhiteBird;case 525:return n.OrangeBird;case 527:return n.Saw;case 528:return n.LaserDetect;case 529:return n.UnknownItem529;case 530:return n.UnknownItem530;case 531:return n.Seagull;case 544:return n.Fish;case 545:return n.SeabedDoorWithBlueEdges;case 546:return n.SeabedDoorAlwaysOpenNonTriggerable;case 547:return n.LittleCryotube;case 548:return n.WideGlassWallBreakable;case 549:return n.BlueFloatingRobot;case 550:return n.RedFloatingRobot;case 551:return n.Dolphin;case 552:return n.CaptureTrap;case 553:return n.VRLink;case 576:return n.UnknownItem576;case 640:return n.WarpInBarbaRayRoom;case 672:return n.UnknownItem672;case 688:return n.GeeNest;case 689:return n.LabComputerConsole;case 690:return n.LabComputerConsoleGreenScreen;case 691:return n.ChairYellowPillow;case 692:return n.OrangeWallWithHoleInMiddle;case 693:return n.GreyWallWithHoleInMiddle;case 694:return n.LongTable;case 695:return n.GBAStation;case 696:return n.TalkLinkToSupport;case 697:return n.InstaWarp;case 698:return n.LabInvisibleObject;case 699:return n.LabGlassWindowDoor;case 700:return n.UnknownItem700;case 701:return n.LabCeilingWarp;case 768:return n.Ep4LightSource;case 769:return n.Cacti;case 770:return n.BigBrownRock;case 771:return n.BreakableBrownRock;case 832:return n.UnknownItem832;case 833:return n.UnknownItem833;case 896:return n.PoisonPlant;case 897:return n.UnknownItem897;case 898:return n.UnknownItem898;case 899:return n.OozingDesertPlant;case 901:return n.UnknownItem901;case 902:return n.BigBlackRocks;case 903:return n.UnknownItem903;case 904:return n.UnknownItem904;case 905:return n.UnknownItem905;case 906:return n.UnknownItem906;case 907:return n.FallingRock;case 908:return n.DesertPlantHasCollision;case 909:return n.DesertFixedTypeBoxBreakableCrystals;case 910:return n.UnknownItem910;case 911:return n.BeeHive;case 912:return n.UnknownItem912;case 913:return n.Heat;case 960:return n.TopOfSaintMillionEgg;case 961:return n.UnknownItem961}};const s=[];function r(e,i,o,n){t.OBJECT_TYPES.push(e);const r=[];for(const[e,t]of n)r[e]=t;s[e]=Object.freeze({name:o,area_ids:r,pso_id:i})}r(n.Unknown,void 0,"Unknown",[]),r(n.PlayerSet,0,"Player Set",[[o.Episode.I,[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]],[o.Episode.II,[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8,9,0]]]),r(n.Particle,1,"Particle",[[o.Episode.I,[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]],[o.Episode.II,[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8,0]]]),r(n.Teleporter,2,"Teleporter",[[o.Episode.I,[0,1,2,3,4,5,6,7,11,12,13,14]],[o.Episode.II,[0,1,2,3,4,12,13,14,15]],[o.Episode.IV,[1,2,3,4,5,6,7,8,9,0]]]),r(n.Warp,3,"Warp",[[o.Episode.I,[0,1,2,3,4,5,6,7,11,12,13,14,16,17]],[o.Episode.II,[0,1,2,3,4,5,6,7,8,9,10,11,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8,9,0]]]),r(n.LightCollision,4,"Light Collision",[[o.Episode.I,[0,1,2,3,4,5,6,7,8,9,10,15,16,17]],[o.Episode.II,[0,1,2,3,4,5,6,7,8,9,10,11,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8,0]]]),r(n.Item,5,"Item",[]),r(n.EnvSound,6,"Env Sound",[[o.Episode.I,[0,1,2,3,4,5,6,7,8,9,10,16,17]],[o.Episode.II,[0,1,2,3,4,5,6,7,8,9,10,11,13]],[o.Episode.IV,[1,2,3,4,5,6,7,8,0]]]),r(n.FogCollision,7,"Fog Collision",[[o.Episode.I,[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,17]],[o.Episode.II,[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8,0]]]),r(n.EventCollision,8,"Event Collision",[[o.Episode.I,[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,17]],[o.Episode.II,[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8,9,0]]]),r(n.CharaCollision,9,"Chara Collision",[[o.Episode.I,[0,1,2,3,4,5,8,9,10]],[o.Episode.II,[0]],[o.Episode.IV,[0]]]),r(n.ElementalTrap,10,"Elemental Trap",[[o.Episode.I,[1,2,3,4,5,6,7,8,9,10,16,17]],[o.Episode.II,[1,2,3,4,5,6,7,8,9,10,11,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8,9]]]),r(n.StatusTrap,11,"Status Trap",[[o.Episode.I,[1,2,3,4,5,6,7,8,9,10,16,17]],[o.Episode.II,[1,2,3,4,5,6,7,8,9,10,11,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8,9]]]),r(n.HealTrap,12,"Heal Trap",[[o.Episode.I,[1,2,3,4,5,6,7,8,9,10,16,17]],[o.Episode.II,[1,2,3,4,5,6,7,8,9,10,11,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8,9]]]),r(n.LargeElementalTrap,13,"Large Elemental Trap",[[o.Episode.I,[1,2,3,4,5,6,7,8,9,10,16,17]],[o.Episode.II,[1,2,3,4,5,6,7,8,9,10,11,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8,9]]]),r(n.ObjRoomID,14,"Obj Room ID",[[o.Episode.I,[1,2,3,4,5,6,7,8,9,10,11,12,13]],[o.Episode.II,[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8,9]]]),r(n.Sensor,15,"Sensor",[[o.Episode.I,[1,2,4,5,6,7]]]),r(n.UnknownItem16,16,"Unknown Item (16)",[]),r(n.LensFlare,17,"Lens Flare",[[o.Episode.I,[1,2,3,4,8,14]]]),r(n.ScriptCollision,18,"Script Collision",[[o.Episode.I,[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]],[o.Episode.II,[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8,0]]]),r(n.HealRing,19,"Heal Ring",[[o.Episode.I,[1,2,3,4,5,6,7,8,9,10]],[o.Episode.II,[1,2,3,4,5,6,7,8,9,10,11,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.MapCollision,20,"Map Collision",[[o.Episode.I,[0,1,2,3,4,5,8,9,10,16,17]],[o.Episode.II,[0,5,6,7,8,9,10,11,16,17]],[o.Episode.IV,[0]]]),r(n.ScriptCollisionA,21,"Script Collision A",[[o.Episode.I,[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]],[o.Episode.II,[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8,0]]]),r(n.ItemLight,22,"Item Light",[[o.Episode.I,[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]],[o.Episode.II,[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8,0]]]),r(n.RadarCollision,23,"Radar Collision",[[o.Episode.I,[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]],[o.Episode.II,[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.FogCollisionSW,24,"Fog Collision SW",[[o.Episode.I,[1,2,3,4,5,6,7,8,9,10,11,12,13,14]],[o.Episode.II,[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.BossTeleporter,25,"Boss Teleporter",[[o.Episode.I,[0,2,5,7,10]],[o.Episode.II,[0,1,2,3,4,5,6,7,8,9,10,11,16,17]],[o.Episode.IV,[5,6,7,8,0]]]),r(n.ImageBoard,26,"Image Board",[[o.Episode.I,[0]],[o.Episode.II,[0]],[o.Episode.IV,[0]]]),r(n.QuestWarp,27,"Quest Warp",[[o.Episode.I,[1,2,3,4,5,6,7,11,12,13,14]],[o.Episode.IV,[9]]]),r(n.Epilogue,28,"Epilogue",[[o.Episode.I,[14]],[o.Episode.II,[13]],[o.Episode.IV,[9]]]),r(n.UnknownItem29,29,"Unknown Item (29)",[[o.Episode.I,[1]]]),r(n.UnknownItem30,30,"Unknown Item (30)",[[o.Episode.I,[1,2,17]],[o.Episode.II,[1,2,14]],[o.Episode.IV,[1,2,3,4,5]]]),r(n.UnknownItem31,31,"Unknown Item (31)",[[o.Episode.I,[1,2,3,4,5,6,7,8,9,10,16,17]],[o.Episode.II,[1,2,3,4,5,6,7,8,9,10,11,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.BoxDetectObject,32,"Box Detect Object",[[o.Episode.I,[0,1,2,3,4,5,6,7,8,9,10,16,17]],[o.Episode.II,[0,1,2,3,4,5,6,7,8,9,10,11,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8,0]]]),r(n.SymbolChatObject,33,"Symbol Chat Object",[[o.Episode.I,[0,1,2,3,4,5,6,7,8,9,10,16,17]],[o.Episode.II,[0,1,2,3,4,5,6,7,8,9,10,11,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8,0]]]),r(n.TouchPlateObject,34,"Touch plate Object",[[o.Episode.I,[1,2,3,4,5,6,7,8,9,10,16,17]],[o.Episode.II,[1,2,3,4,5,6,7,8,9,10,11,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.TargetableObject,35,"Targetable Object",[[o.Episode.I,[1,2,3,4,5,6,7,8,9,10,16,17]],[o.Episode.II,[1,2,3,4,5,6,7,8,9,10,11,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.EffectObject,36,"Effect object",[[o.Episode.I,[0,1,2,3,4,5,6,7,8,9,10,16,17]],[o.Episode.II,[0,1,2,5,6,7,8,9,10,11,12,13,14,15,16,17]],[o.Episode.IV,[0]]]),r(n.CountDownObject,37,"Count Down Object",[[o.Episode.I,[0,1,2,3,4,5,6,7,8,9,10,16,17]],[o.Episode.II,[0,1,2,3,4,5,6,7,8,9,10,11,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8,0]]]),r(n.UnknownItem38,38,"Unknown Item (38)",[[o.Episode.I,[0,1,2,3,4,5,6,7,8,9,10,16,17]],[o.Episode.II,[0,1,2,3,4,5,6,7,8,9,10,11,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8,0]]]),r(n.UnknownItem39,39,"Unknown Item (39)",[[o.Episode.II,[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.UnknownItem40,40,"Unknown Item (40)",[[o.Episode.I,[0,1,2,4,5,6,7,8,9,10,13,16,17]],[o.Episode.II,[0,1,2,3,4,5,6,7,8,9,10,11,13,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8,0]]]),r(n.UnknownItem41,41,"Unknown Item (41)",[[o.Episode.I,[0,1,2,4,5,6,7,8,9,10,13,16,17]],[o.Episode.II,[0,1,2,3,4,5,6,7,8,9,10,11,13,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8,0]]]),r(n.MenuActivation,64,"Menu activation",[[o.Episode.I,[0]],[o.Episode.II,[0]],[o.Episode.IV,[0]]]),r(n.TelepipeLocation,65,"Telepipe Location",[[o.Episode.I,[0]],[o.Episode.II,[0]],[o.Episode.IV,[0]]]),r(n.BGMCollision,66,"BGM Collision",[[o.Episode.I,[0]],[o.Episode.II,[0]],[o.Episode.IV,[0]]]),r(n.MainRagolTeleporter,67,"Main Ragol Teleporter",[[o.Episode.I,[0]],[o.Episode.II,[0]],[o.Episode.IV,[0]]]),r(n.LobbyTeleporter,68,"Lobby Teleporter",[[o.Episode.I,[0]],[o.Episode.II,[0]],[o.Episode.IV,[0]]]),r(n.PrincipalWarp,69,"Principal warp",[[o.Episode.I,[0]],[o.Episode.II,[0]],[o.Episode.IV,[0]]]),r(n.ShopDoor,70,"Shop Door",[[o.Episode.I,[0]],[o.Episode.IV,[0]]]),r(n.HuntersGuildDoor,71,"Hunter's Guild Door",[[o.Episode.I,[0]],[o.Episode.IV,[0]]]),r(n.TeleporterDoor,72,"Teleporter Door",[[o.Episode.I,[0]],[o.Episode.IV,[0]]]),r(n.MedicalCenterDoor,73,"Medical Center Door",[[o.Episode.I,[0]],[o.Episode.IV,[0]]]),r(n.Elevator,74,"Elevator",[[o.Episode.I,[0]],[o.Episode.IV,[0]]]),r(n.EasterEgg,75,"Easter Egg",[[o.Episode.I,[0]],[o.Episode.II,[0]],[o.Episode.IV,[0]]]),r(n.ValentinesHeart,76,"Valentines Heart",[[o.Episode.I,[0]],[o.Episode.II,[0]],[o.Episode.IV,[0]]]),r(n.ChristmasTree,77,"Christmas Tree",[[o.Episode.I,[0]],[o.Episode.II,[0]],[o.Episode.IV,[0]]]),r(n.ChristmasWreath,78,"Christmas Wreath",[[o.Episode.I,[0]],[o.Episode.II,[0]],[o.Episode.IV,[0]]]),r(n.HalloweenPumpkin,79,"Halloween Pumpkin",[[o.Episode.I,[0]],[o.Episode.II,[0]],[o.Episode.IV,[0]]]),r(n.TwentyFirstCentury,80,"21st Century",[[o.Episode.I,[0]],[o.Episode.II,[0]],[o.Episode.IV,[0]]]),r(n.Sonic,81,"Sonic",[[o.Episode.I,[0]],[o.Episode.II,[0]],[o.Episode.IV,[0]]]),r(n.WelcomeBoard,82,"Welcome Board",[[o.Episode.I,[0]],[o.Episode.II,[0]],[o.Episode.IV,[0]]]),r(n.Firework,83,"Firework",[[o.Episode.I,[0]],[o.Episode.II,[0,16]],[o.Episode.IV,[0]]]),r(n.LobbyScreenDoor,84,"Lobby Screen Door",[[o.Episode.I,[0]],[o.Episode.IV,[0]]]),r(n.MainRagolTeleporterBattleInNextArea,85,"Main Ragol Teleporter (Battle in next area?)",[[o.Episode.I,[0]],[o.Episode.II,[0]],[o.Episode.IV,[0]]]),r(n.LabTeleporterDoor,86,"Lab Teleporter Door",[[o.Episode.II,[0]]]),r(n.Pioneer2InvisibleTouchplate,87,"Pioneer 2 Invisible Touchplate",[[o.Episode.I,[0]],[o.Episode.II,[0]],[o.Episode.IV,[0]]]),r(n.ForestDoor,128,"Forest Door",[[o.Episode.I,[1,2]]]),r(n.ForestSwitch,129,"Forest Switch",[[o.Episode.I,[1,2,3,4,5]],[o.Episode.II,[1,2,3,4]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.LaserFence,130,"Laser Fence",[[o.Episode.I,[1,2,3,4,5,6,7,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.LaserSquareFence,131,"Laser Square Fence",[[o.Episode.I,[1,2,3,4,5,6,7,16,17]],[o.Episode.II,[1,2,3,4,5,6,7,8,9,10,11]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.ForestLaserFenceSwitch,132,"Forest Laser Fence Switch",[[o.Episode.I,[1,2,3,4,5,6,7,16,17]],[o.Episode.II,[1,2,3,4,5,6,7,8,9,10,11,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.LightRays,133,"Light rays",[[o.Episode.I,[1,2]],[o.Episode.II,[5,6,7,8,9]],[o.Episode.IV,[6,7,8]]]),r(n.BlueButterfly,134,"Blue Butterfly",[[o.Episode.I,[1,2]],[o.Episode.IV,[6,7,8]]]),r(n.Probe,135,"Probe",[[o.Episode.I,[1,2]]]),r(n.RandomTypeBox1,136,"Random Type Box 1",[[o.Episode.I,[1,2,3,4,5,6,7]],[o.Episode.II,[10,11,13]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.ForestWeatherStation,137,"Forest Weather Station",[[o.Episode.I,[1,2]]]),r(n.Battery,138,"Battery",[]),r(n.ForestConsole,139,"Forest Console",[[o.Episode.I,[1,2,3,4,5,6,7,8,9,10,16,17]],[o.Episode.II,[1,2,3,4,5,6,7,8,9,10,11,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.BlackSlidingDoor,140,"Black Sliding Door",[[o.Episode.I,[1,2,3]]]),r(n.RicoMessagePod,141,"Rico Message Pod",[[o.Episode.I,[1,2,3,4,5,6,7,8,9,10,13]]]),r(n.EnergyBarrier,142,"Energy Barrier",[[o.Episode.I,[1,2,4,5,6,7]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.ForestRisingBridge,143,"Forest Rising Bridge",[[o.Episode.I,[1,2]]]),r(n.SwitchNoneDoor,144,"Switch (none door)",[[o.Episode.I,[1,2,6,7,16,17]],[o.Episode.II,[1,2,3,4,5,6,7,8,9,10,11,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.EnemyBoxGrey,145,"Enemy Box (Grey)",[[o.Episode.I,[1,2,3,4,5,6,7]],[o.Episode.II,[10,11]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.FixedTypeBox,146,"Fixed Type Box",[[o.Episode.I,[1,2,3,4,5,6,7,11,12,13,14]],[o.Episode.II,[10,11,13]],[o.Episode.IV,[1,2,3,4,6,7,8,9]]]),r(n.EnemyBoxBrown,147,"Enemy Box (Brown)",[[o.Episode.I,[1,2,3,4,5,6,7]],[o.Episode.II,[10,11]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.EmptyTypeBox,149,"Empty Type Box",[[o.Episode.I,[1,2,3,4,5,6,7]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.LaserFenceEx,150,"Laser Fence Ex",[[o.Episode.I,[1,2,3,4,5,6,7,8,9,10,16,17]],[o.Episode.II,[1,2,3,4,5,6,7,8,9,10,11,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.LaserSquareFenceEx,151,"Laser Square Fence Ex",[]),r(n.FloorPanel1,192,"Floor Panel 1",[[o.Episode.I,[3,4,5,16,17]],[o.Episode.II,[1,2,3,4,5,6,7,8,9,10,11,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.Caves4ButtonDoor,193,"Caves 4 Button door",[[o.Episode.I,[3,4,5]]]),r(n.CavesNormalDoor,194,"Caves Normal door",[[o.Episode.I,[3,4,5]]]),r(n.CavesSmashingPillar,195,"Caves Smashing Pillar",[[o.Episode.I,[3,4,5]],[o.Episode.II,[1,2,3,4,17]]]),r(n.CavesSign1,196,"Caves Sign 1",[[o.Episode.I,[4,5]]]),r(n.CavesSign2,197,"Caves Sign 2",[[o.Episode.I,[4,5]]]),r(n.CavesSign3,198,"Caves Sign 3",[[o.Episode.I,[4,5]]]),r(n.HexagonalTank,199,"Hexagonal Tank",[[o.Episode.I,[4,5]]]),r(n.BrownPlatform,200,"Brown Platform",[[o.Episode.I,[4,5]]]),r(n.WarningLightObject,201,"Warning Light Object",[[o.Episode.I,[4,5]],[o.Episode.IV,[5]]]),r(n.Rainbow,203,"Rainbow",[[o.Episode.I,[4]]]),r(n.FloatingJellyfish,204,"Floating Jellyfish",[[o.Episode.I,[4]],[o.Episode.II,[10,11]]]),r(n.FloatingDragonfly,205,"Floating Dragonfly",[[o.Episode.I,[4,16]],[o.Episode.II,[3,4]],[o.Episode.IV,[6,7,8]]]),r(n.CavesSwitchDoor,206,"Caves Switch Door",[[o.Episode.I,[3,4,5]]]),r(n.RobotRechargeStation,207,"Robot Recharge Station",[[o.Episode.I,[3,4,5,6,7]],[o.Episode.II,[17]]]),r(n.CavesCakeShop,208,"Caves Cake Shop",[[o.Episode.I,[5]]]),r(n.Caves1SmallRedRock,209,"Caves 1 Small Red Rock",[[o.Episode.I,[3]]]),r(n.Caves1MediumRedRock,210,"Caves 1 Medium Red Rock",[[o.Episode.I,[3]]]),r(n.Caves1LargeRedRock,211,"Caves 1 Large Red Rock",[[o.Episode.I,[3]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.Caves2SmallRock1,212,"Caves 2 Small Rock 1",[[o.Episode.I,[4]]]),r(n.Caves2MediumRock1,213,"Caves 2 Medium Rock 1",[[o.Episode.I,[4]]]),r(n.Caves2LargeRock1,214,"Caves 2 Large Rock 1",[[o.Episode.I,[4]]]),r(n.Caves2SmallRock2,215,"Caves 2 Small Rock 2",[[o.Episode.I,[4]]]),r(n.Caves2MediumRock2,216,"Caves 2 Medium Rock 2",[[o.Episode.I,[4]]]),r(n.Caves2LargeRock2,217,"Caves 2 Large Rock 2",[[o.Episode.I,[4]]]),r(n.Caves3SmallRock,218,"Caves 3 Small Rock",[[o.Episode.I,[5]]]),r(n.Caves3MediumRock,219,"Caves 3 Medium Rock",[[o.Episode.I,[5]]]),r(n.Caves3LargeRock,220,"Caves 3 Large Rock",[[o.Episode.I,[5]]]),r(n.FloorPanel2,222,"Floor Panel 2",[[o.Episode.I,[1,2,3,4,5,6,7,8,9,10,16,17]],[o.Episode.II,[1,2,3,4,5,6,7,8,9,10,11,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.DestructableRockCaves1,223,"Destructable Rock (Caves 1)",[[o.Episode.I,[3]]]),r(n.DestructableRockCaves2,224,"Destructable Rock (Caves 2)",[[o.Episode.I,[4]]]),r(n.DestructableRockCaves3,225,"Destructable Rock (Caves 3)",[[o.Episode.I,[5]]]),r(n.MinesDoor,256,"Mines Door",[[o.Episode.I,[6,7]]]),r(n.FloorPanel3,257,"Floor Panel 3",[[o.Episode.I,[1,2,6,7,16,17]],[o.Episode.II,[1,2,3,4]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.MinesSwitchDoor,258,"Mines Switch Door",[[o.Episode.I,[6,7]],[o.Episode.IV,[6,7,8]]]),r(n.LargeCryoTube,259,"Large Cryo-Tube",[[o.Episode.I,[6,7]],[o.Episode.II,[17]]]),r(n.ComputerLikeCalus,260,"Computer (like calus)",[[o.Episode.I,[6,7]],[o.Episode.II,[17]]]),r(n.GreenScreenOpeningAndClosing,261,"Green Screen opening and closing",[[o.Episode.I,[6,7]],[o.Episode.II,[17]]]),r(n.FloatingRobot,262,"Floating Robot",[[o.Episode.I,[6,7]]]),r(n.FloatingBlueLight,263,"Floating Blue Light",[[o.Episode.I,[6,7]]]),r(n.SelfDestructingObject1,264,"Self Destructing Object 1",[[o.Episode.I,[6,7]]]),r(n.SelfDestructingObject2,265,"Self Destructing Object 2",[[o.Episode.I,[6,7]]]),r(n.SelfDestructingObject3,266,"Self Destructing Object 3",[[o.Episode.I,[6,7]]]),r(n.SparkMachine,267,"Spark Machine",[[o.Episode.I,[6,7]]]),r(n.MinesLargeFlashingCrate,268,"Mines Large Flashing Crate",[[o.Episode.I,[6,7]]]),r(n.RuinsSeal,304,"Ruins Seal",[[o.Episode.I,[13]]]),r(n.RuinsTeleporter,320,"Ruins Teleporter",[[o.Episode.I,[8,9,10]]]),r(n.RuinsWarpSiteToSite,321,"Ruins Warp (Site to site)",[[o.Episode.I,[8,9,10]]]),r(n.RuinsSwitch,322,"Ruins Switch",[[o.Episode.I,[8,9,10]]]),r(n.FloorPanel4,323,"Floor Panel 4",[[o.Episode.I,[8,9,10]]]),r(n.Ruins1Door,324,"Ruins 1 Door",[[o.Episode.I,[8]]]),r(n.Ruins3Door,325,"Ruins 3 Door",[[o.Episode.I,[10]]]),r(n.Ruins2Door,326,"Ruins 2 Door",[[o.Episode.I,[9]]]),r(n.Ruins11ButtonDoor,327,"Ruins 1-1 Button Door",[[o.Episode.I,[8]]]),r(n.Ruins21ButtonDoor,328,"Ruins 2-1 Button Door",[[o.Episode.I,[9]]]),r(n.Ruins31ButtonDoor,329,"Ruins 3-1 Button Door",[[o.Episode.I,[10]]]),r(n.Ruins4ButtonDoor,330,"Ruins 4-Button Door",[[o.Episode.I,[8,9,10]]]),r(n.Ruins2ButtonDoor,331,"Ruins 2-Button Door",[[o.Episode.I,[8,9,10]]]),r(n.RuinsSensor,332,"Ruins Sensor",[[o.Episode.I,[8,9,10]]]),r(n.RuinsFenceSwitch,333,"Ruins Fence Switch",[[o.Episode.I,[8,9,10]]]),r(n.RuinsLaserFence4x2,334,"Ruins Laser Fence 4x2",[[o.Episode.I,[8,9,10]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.RuinsLaserFence6x2,335,"Ruins Laser Fence 6x2",[[o.Episode.I,[8,9,10]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.RuinsLaserFence4x4,336,"Ruins Laser Fence 4x4",[[o.Episode.I,[8,9,10]]]),r(n.RuinsLaserFence6x4,337,"Ruins Laser Fence 6x4",[[o.Episode.I,[8,9,10]]]),r(n.RuinsPoisonBlob,338,"Ruins poison Blob",[[o.Episode.I,[8,9,10]],[o.Episode.II,[5,6,7,8,9]],[o.Episode.IV,[6,7,8]]]),r(n.RuinsPillarTrap,339,"Ruins Pillar Trap",[[o.Episode.I,[8,9,10]],[o.Episode.II,[1,2,3,4]]]),r(n.PopupTrapNoTech,340,"Popup Trap (No Tech)",[[o.Episode.I,[8,9,10]]]),r(n.RuinsCrystal,341,"Ruins Crystal",[[o.Episode.I,[8,9,10]]]),r(n.Monument,342,"Monument",[[o.Episode.I,[2,4,7]]]),r(n.RuinsRock1,345,"Ruins Rock 1",[[o.Episode.I,[8,9,10]]]),r(n.RuinsRock2,346,"Ruins Rock 2",[[o.Episode.I,[8,9,10]]]),r(n.RuinsRock3,347,"Ruins Rock 3",[[o.Episode.I,[8,9,10]]]),r(n.RuinsRock4,348,"Ruins Rock 4",[[o.Episode.I,[8,9,10]]]),r(n.RuinsRock5,349,"Ruins Rock 5",[[o.Episode.I,[8,9,10]]]),r(n.RuinsRock6,350,"Ruins Rock 6",[[o.Episode.I,[8,9,10]]]),r(n.RuinsRock7,351,"Ruins Rock 7",[[o.Episode.I,[8,9,10]]]),r(n.Poison,352,"Poison",[[o.Episode.I,[8,9,10,13]],[o.Episode.II,[3,4,10,11]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.FixedBoxTypeRuins,353,"Fixed Box Type (Ruins)",[[o.Episode.I,[8,9,10,16,17]],[o.Episode.II,[1,2,3,4,14,15]]]),r(n.RandomBoxTypeRuins,354,"Random Box Type (Ruins)",[[o.Episode.I,[8,9,10,16,17]],[o.Episode.II,[1,2,3,4,14,15]]]),r(n.EnemyTypeBoxYellow,355,"Enemy Type Box (Yellow)",[[o.Episode.I,[8,9,10,16,17]],[o.Episode.II,[1,2,3,4]]]),r(n.EnemyTypeBoxBlue,356,"Enemy Type Box (Blue)",[[o.Episode.I,[8,9,10,16,17]],[o.Episode.II,[1,2,3,4]]]),r(n.EmptyTypeBoxBlue,357,"Empty Type Box (Blue)",[[o.Episode.I,[8,9,10,16,17]],[o.Episode.II,[1,2,3,4]]]),r(n.DestructableRock,358,"Destructable Rock",[[o.Episode.I,[8,9,10]]]),r(n.PopupTrapsTechs,359,"Popup Traps (techs)",[[o.Episode.I,[6,7,8,9,10]],[o.Episode.II,[1,2,3,4,5,6,7,8,9,10,11,16,17]]]),r(n.FlyingWhiteBird,368,"Flying White Bird",[[o.Episode.I,[14,16]],[o.Episode.II,[3,4]]]),r(n.Tower,369,"Tower",[[o.Episode.I,[14]]]),r(n.FloatingRocks,370,"Floating Rocks",[[o.Episode.I,[14]]]),r(n.FloatingSoul,371,"Floating Soul",[[o.Episode.I,[14]]]),r(n.Butterfly,372,"Butterfly",[[o.Episode.I,[14]]]),r(n.LobbyGameMenu,384,"Lobby Game menu",[[o.Episode.I,[15]]]),r(n.LobbyWarpObject,385,"Lobby Warp Object",[[o.Episode.I,[15]]]),r(n.Lobby1EventObjectDefaultTree,386,"Lobby 1 Event Object (Default Tree)",[[o.Episode.I,[15]]]),r(n.UnknownItem387,387,"Unknown Item (387)",[[o.Episode.I,[15]]]),r(n.UnknownItem388,388,"Unknown Item (388)",[[o.Episode.I,[15]]]),r(n.UnknownItem389,389,"Unknown Item (389)",[[o.Episode.I,[15]]]),r(n.LobbyEventObjectStaticPumpkin,390,"Lobby Event Object (Static Pumpkin)",[[o.Episode.I,[15]]]),r(n.LobbyEventObject3ChristmasWindows,391,"Lobby Event Object (3 Christmas Windows)",[[o.Episode.I,[15]]]),r(n.LobbyEventObjectRedAndWhiteCurtain,392,"Lobby Event Object (Red and White Curtain)",[[o.Episode.I,[15]]]),r(n.UnknownItem393,393,"Unknown Item (393)",[[o.Episode.I,[15]]]),r(n.UnknownItem394,394,"Unknown Item (394)",[[o.Episode.I,[15]]]),r(n.LobbyFishTank,395,"Lobby Fish Tank",[[o.Episode.I,[15]]]),r(n.LobbyEventObjectButterflies,396,"Lobby Event Object (Butterflies)",[[o.Episode.I,[15]]]),r(n.UnknownItem400,400,"Unknown Item (400)",[[o.Episode.I,[16]],[o.Episode.II,[3,4]]]),r(n.GreyWallLow,401,"grey wall low",[[o.Episode.I,[16]],[o.Episode.II,[3,4,17]]]),r(n.SpaceshipDoor,402,"Spaceship Door",[[o.Episode.I,[16]],[o.Episode.II,[3,4]]]),r(n.GreyWallHigh,403,"grey wall high",[[o.Episode.I,[16]],[o.Episode.II,[3,4,17]]]),r(n.TempleNormalDoor,416,"Temple Normal Door",[[o.Episode.I,[17]],[o.Episode.II,[1,2]]]),r(n.BreakableWallWallButUnbreakable,417,'"breakable wall wall, but unbreakable"',[[o.Episode.I,[17]],[o.Episode.II,[1,2]]]),r(n.BrokenCylinderAndRubble,418,"Broken cylinder and rubble",[[o.Episode.I,[17]],[o.Episode.II,[1,2]]]),r(n.ThreeBrokenWallPiecesOnFloor,419,"3 broken wall pieces on floor",[[o.Episode.I,[17]],[o.Episode.II,[1,2]]]),r(n.HighBrickCylinder,420,"high brick cylinder",[[o.Episode.I,[17]],[o.Episode.II,[1,2]]]),r(n.LyingCylinder,421,"lying cylinder",[[o.Episode.I,[17]],[o.Episode.II,[1,2]]]),r(n.BrickConeWithFlatTop,422,"brick cone with flat top",[[o.Episode.I,[17]],[o.Episode.II,[1,2]]]),r(n.BreakableTempleWall,423,"breakable temple wall",[[o.Episode.I,[17]],[o.Episode.II,[1,2]]]),r(n.TempleMapDetect,424,"Temple Map Detect",[[o.Episode.I,[17]],[o.Episode.II,[1,2,14]],[o.Episode.IV,[1,2,3,4,5]]]),r(n.SmallBrownBrickRisingBridge,425,"small brown brick rising bridge",[[o.Episode.I,[17]],[o.Episode.II,[1,2]]]),r(n.LongRisingBridgeWithPinkHighEdges,426,"long rising bridge (with pink high edges)",[[o.Episode.I,[17]],[o.Episode.II,[1,2]]]),r(n.FourSwitchTempleDoor,427,"4 switch temple door",[[o.Episode.II,[1,2]]]),r(n.FourButtonSpaceshipDoor,448,"4 button spaceship door",[[o.Episode.II,[3,4]]]),r(n.ItemBoxCca,512,"item box cca",[[o.Episode.II,[5,6,7,8,9,12,16,17]],[o.Episode.IV,[5]]]),r(n.TeleporterEp2,513,"Teleporter (Ep 2)",[[o.Episode.II,[5,6,7,8,9,10,11,12,13,16,17]]]),r(n.CCADoor,514,"CCA Door",[[o.Episode.II,[5,6,7,8,9,16,17]]]),r(n.SpecialBoxCCA,515,"Special Box CCA",[[o.Episode.II,[5,6,7,8,9,12,16,17]],[o.Episode.IV,[1,2,3,4,5]]]),r(n.BigCCADoor,516,"Big CCA Door",[[o.Episode.II,[5]]]),r(n.BigCCADoorSwitch,517,"Big CCA Door Switch",[[o.Episode.II,[5,6,7,8,9,16,17]]]),r(n.LittleRock,518,"Little Rock",[[o.Episode.II,[5,6,7,8,9,16]]]),r(n.Little3StoneWall,519,"Little 3 Stone Wall",[[o.Episode.II,[5,6,7,8,9,16]]]),r(n.Medium3StoneWall,520,"Medium 3 stone wall",[[o.Episode.II,[5,6,7,8,9,16]]]),r(n.SpiderPlant,521,"Spider Plant",[[o.Episode.II,[5,6,7,8,9,16]]]),r(n.CCAAreaTeleporter,522,"CCA Area Teleporter",[[o.Episode.II,[5,6,7,8,9,16,17]]]),r(n.UnknownItem523,523,"Unknown Item (523)",[[o.Episode.II,[5,12]]]),r(n.WhiteBird,524,"White Bird",[[o.Episode.II,[6,7,9,16,17]],[o.Episode.IV,[6,7,8]]]),r(n.OrangeBird,525,"Orange Bird",[[o.Episode.II,[6,7,9,17]]]),r(n.Saw,527,"Saw",[[o.Episode.II,[5,6,7,8,9,10,11,16,17]]]),r(n.LaserDetect,528,"Laser Detect",[[o.Episode.II,[5,6,7,8,9,10,11,16,17]]]),r(n.UnknownItem529,529,"Unknown Item (529)",[[o.Episode.II,[5,6,7]],[o.Episode.IV,[6,7,8]]]),r(n.UnknownItem530,530,"Unknown Item (530)",[[o.Episode.II,[5,6,7,8,9,17]]]),r(n.Seagull,531,"Seagull",[[o.Episode.II,[6,7,8,9,16]],[o.Episode.IV,[6,7,8]]]),r(n.Fish,544,"Fish",[[o.Episode.I,[15]],[o.Episode.II,[6,9,10,11,16]]]),r(n.SeabedDoorWithBlueEdges,545,"Seabed Door (with blue edges)",[[o.Episode.II,[10,11]]]),r(n.SeabedDoorAlwaysOpenNonTriggerable,546,"Seabed door (always open, non-triggerable)",[[o.Episode.II,[10,11]]]),r(n.LittleCryotube,547,"Little Cryotube",[[o.Episode.II,[10,11,17]]]),r(n.WideGlassWallBreakable,548,"Wide Glass Wall (breakable)",[[o.Episode.II,[10,11]]]),r(n.BlueFloatingRobot,549,"Blue floating robot",[[o.Episode.II,[10,11]]]),r(n.RedFloatingRobot,550,"Red floating robot",[[o.Episode.II,[10,11]]]),r(n.Dolphin,551,"Dolphin",[[o.Episode.II,[10,11]]]),r(n.CaptureTrap,552,"Capture Trap",[[o.Episode.II,[5,6,7,8,9,10,11,16,17]]]),r(n.VRLink,553,"VR link",[[o.Episode.II,[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]]]),r(n.UnknownItem576,576,"Unknown Item (576)",[[o.Episode.II,[12]]]),r(n.WarpInBarbaRayRoom,640,"Warp in Barba Ray Room",[[o.Episode.II,[14]]]),r(n.UnknownItem672,672,"Unknown Item (672)",[[o.Episode.II,[15]]]),r(n.GeeNest,688,"Gee Nest",[[o.Episode.I,[8,9,10]],[o.Episode.II,[5,6,7,8,9,16,17]],[o.Episode.IV,[6,7,8]]]),r(n.LabComputerConsole,689,"Lab Computer Console",[[o.Episode.II,[0]]]),r(n.LabComputerConsoleGreenScreen,690,"Lab Computer Console (Green Screen)",[[o.Episode.II,[0]]]),r(n.ChairYellowPillow,691,"Chair, Yellow Pillow",[[o.Episode.II,[0]]]),r(n.OrangeWallWithHoleInMiddle,692,"orange wall with hole in middle",[[o.Episode.II,[0]]]),r(n.GreyWallWithHoleInMiddle,693,"grey wall with hole in middle",[[o.Episode.II,[0]]]),r(n.LongTable,694,"long table",[[o.Episode.II,[0]]]),r(n.GBAStation,695,"GBA Station",[]),r(n.TalkLinkToSupport,696,"Talk (link to support)",[[o.Episode.I,[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]],[o.Episode.II,[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8,0]]]),r(n.InstaWarp,697,"insta-warp",[[o.Episode.I,[0,1,2,3,4,5,6,7,11,12,13,14,16,17]],[o.Episode.II,[0,1,2,3,4,5,6,7,8,9,10,11,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8,9,0]]]),r(n.LabInvisibleObject,698,"Lab Invisible Object",[[o.Episode.I,[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]],[o.Episode.II,[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8,0]]]),r(n.LabGlassWindowDoor,699,"Lab Glass window Door",[[o.Episode.II,[0]]]),r(n.UnknownItem700,700,"Unknown Item (700)",[[o.Episode.II,[13]]]),r(n.LabCeilingWarp,701,"Lab Ceiling Warp",[[o.Episode.II,[0]]]),r(n.Ep4LightSource,768,"Ep4 Light Source",[[o.Episode.IV,[1,2,3,4,5,6,7,8,9]]]),r(n.Cacti,769,"cacti",[[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.BigBrownRock,770,"Big Brown Rock",[[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.BreakableBrownRock,771,"Breakable Brown Rock",[[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.UnknownItem832,832,"Unknown Item (832)",[]),r(n.UnknownItem833,833,"Unknown Item (833)",[]),r(n.PoisonPlant,896,"Poison Plant",[[o.Episode.IV,[6,7,8]]]),r(n.UnknownItem897,897,"Unknown Item (897)",[[o.Episode.IV,[6,7,8]]]),r(n.UnknownItem898,898,"Unknown Item (898)",[[o.Episode.IV,[6,7,8]]]),r(n.OozingDesertPlant,899,"Oozing Desert Plant",[[o.Episode.IV,[6,7,8]]]),r(n.UnknownItem901,901,"Unknown Item (901)",[[o.Episode.IV,[6,7,8]]]),r(n.BigBlackRocks,902,"big black rocks",[[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.UnknownItem903,903,"Unknown Item (903)",[[o.Episode.IV,[6,7,8]]]),r(n.UnknownItem904,904,"Unknown Item (904)",[[o.Episode.IV,[6,7,8]]]),r(n.UnknownItem905,905,"Unknown Item (905)",[]),r(n.UnknownItem906,906,"Unknown Item (906)",[]),r(n.FallingRock,907,"Falling Rock",[[o.Episode.IV,[6,7,8]]]),r(n.DesertPlantHasCollision,908,"Desert Plant (has collision)",[[o.Episode.IV,[6,7,8]]]),r(n.DesertFixedTypeBoxBreakableCrystals,909,"Desert Fixed Type Box (Breakable Crystals)",[[o.Episode.IV,[6,7,8]]]),r(n.UnknownItem910,910,"Unknown Item (910)",[]),r(n.BeeHive,911,"Bee Hive",[[o.Episode.IV,[6,7,8]]]),r(n.UnknownItem912,912,"Unknown Item (912)",[[o.Episode.IV,[6,7,8]]]),r(n.Heat,913,"Heat",[[o.Episode.IV,[6,7,8]]]),r(n.TopOfSaintMillionEgg,960,"Top of saint million egg",[[o.Episode.IV,[9]]]),r(n.UnknownItem961,961,"Unknown Item (961)",[[o.Episode.IV,[9]]]),Object.freeze(t.OBJECT_TYPES),Object.freeze(s)},"/7QA":function(e,t,i){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=i("1Qg8");i("8UJ8");const s=i("LvDl"),r=o(i("GGSb"));function a(e){const t=e;"historyUndo"!==t.inputType&&"historyRedo"!==t.inputType||e.preventDefault()}function d(e){const t=e;t.ctrlKey&&!t.altKey&&"Z"===t.key.toUpperCase()&&t.preventDefault()}function l(e){e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="none")}function _(e){l(e)}function u(e){l(e)}i("XtFL"),i("tjRy"),i("3oCa"),i("OP0w"),r.default.useDefaults({defaultLevel:r.default.WARN}),function(){document.addEventListener("beforeinput",a),document.addEventListener("keydown",d),document.addEventListener("dragenter",l),document.addEventListener("dragover",_),document.addEventListener("drop",u);const e=new n.ApplicationView,t=s.throttle(()=>{e.resize(window.innerWidth,window.innerHeight)},100,{leading:!0,trailing:!0});t(),document.body.append(e.element),window.addEventListener("resize",t)}()},"/Wax":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("9dYx");class n extends o.AbstractWritableCursor{constructor(e,t,i=0,o=e.size-i){if(i<0||i>e.size)throw new Error(`Offset ${i} is out of bounds.`);if(o<0||i+o>e.size)throw new Error(`Size ${o} is out of bounds.`);super(t,i),this.buffer=e,this._size=o}get size(){return this._size}set size(e){e>this._size?this.ensure_size(e-this._size):this._size=e}get backing_buffer(){return this.buffer.backing_buffer}get dv(){return this.buffer.view}take(e){this.check_size("size",e,e);const t=this.offset+this.position,i=new n(this.buffer,this.endianness,t,e);return this._position+=e,i}ensure_size(e){const t=this.position+e-this._size;t>0&&(this._size+=t,this.buffer.sizethis.val=e.value)}bind_bi(e){const t=this.bind_to(e),i=e.bind_to(this);return{dispose(){t.dispose(),i.dispose()}}}}},"0Xme":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("sDu+"),n=i("FXpb"),s=i("jJhE");i("x1yY");const r=i("4VsB");t.Input=class extends o.LabelledControl{constructor(e,t,i,o,s){super(s),this.element=n.el.span({class:`${t} core_Input`}),this._value=new r.WidgetProperty(this,e,this.set_value),this.value=this._value,this.input_element=n.create_element("input",{class:`${o} core_Input_inner`}),this.input_element.type=i,this.input_element.onchange=()=>{this._value.set_val(this.get_value(),{silent:!1})},this.element.append(this.input_element)}set_enabled(e){super.set_enabled(e),this.input_element.disabled=!e}set_attr(e,t,i){if(null==t)return;const o=this.input_element,n=i||(e=>e);s.is_any_property(t)?(o[e]=n(t.val),this.disposable(t.observe(({value:t})=>o[e]=n(t)))):o[e]=n(t)}}},"1Qg8":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("yxQK"),n=i("49yP"),s=i("FXpb"),r=i("nN8q");class a extends r.ResizableWidget{constructor(){super(),this.menu_view=this.disposable(new o.NavigationView),this.main_content_view=this.disposable(new n.MainContentView),this.element=s.el.div({class:"application_ApplicationView"},this.menu_view.element,this.main_content_view.element),this.element.id="root",this.finalize_construction(a.prototype)}resize(e,t){return super.resize(e,t),this.main_content_view.resize(e,t-this.menu_view.height),this}}t.ApplicationView=a},"1aHr":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("w6HN"),n=i("6cU9"),s=i("KVVN"),r=i("c5EP"),a=i("n5fr"),d=i("sv1z"),l=i("ouMO"),_=i("FXpb"),u=i("r+6V"),c=i("xs7i"),p=i("4Mnx"),v=i("4SjJ");class h extends o.ToolBar{constructor(){const e=new u.DropDown("New quest",[c.Episode.I],e=>`Episode ${c.Episode[e]}`,{icon_left:_.Icon.NewFile}),t=new n.FileButton("Open file...",{icon_left:_.Icon.File,accept:".qst",tooltip:"Open a quest file (Ctrl-O)"}),i=new s.Button("Save as...",{icon_left:_.Icon.Save,tooltip:"Save this quest to new file (Ctrl-Shift-S)"}),o=new s.Button("Undo",{icon_left:_.Icon.Undo,tooltip:a.undo_manager.first_undo.map(e=>(e?`Undo "${e.description}"`:"Nothing to undo")+" (Ctrl-Z)")}),w=new s.Button("Redo",{icon_left:_.Icon.Redo,tooltip:a.undo_manager.first_redo.map(e=>(e?`Redo "${e.description}"`:"Nothing to redo")+" (Ctrl-Shift-Z)")}),f=new d.Select(r.quest_editor_store.current_quest.flat_map(e=>e?l.list_property(void 0,...p.area_store.get_areas_for_episode(e.episode)):l.list_property()),e=>{const t=r.quest_editor_store.current_quest.val;if(t){const i=t.entities_per_area.val.get(e.id);return e.name+(i?` (${i})`:"")}return e.name});super({children:[e,t,i,o,w,f]});const E=r.quest_editor_store.current_quest.map(e=>null!=e);this.disposables(e.chosen.observe(({value:e})=>r.quest_editor_store.new_quest(e)),t.files.observe(({value:e})=>{e.length&&r.quest_editor_store.open_file(e[0])}),i.enabled.bind_to(E),i.click.observe(r.quest_editor_store.save_as),o.enabled.bind_to(a.undo_manager.can_undo),o.click.observe(()=>a.undo_manager.undo()),w.enabled.bind_to(a.undo_manager.can_redo),w.click.observe(()=>a.undo_manager.redo()),f.enabled.bind_to(E),f.selected.bind_to(r.quest_editor_store.current_area),f.selected.observe(({value:e})=>r.quest_editor_store.set_current_area(e)),v.gui_store.on_global_keydown(v.GuiTool.QuestEditor,"Ctrl-O",()=>t.click()),v.gui_store.on_global_keydown(v.GuiTool.QuestEditor,"Ctrl-Shift-S",r.quest_editor_store.save_as),v.gui_store.on_global_keydown(v.GuiTool.QuestEditor,"Ctrl-Z",()=>{a.undo_manager.undo()}),v.gui_store.on_global_keydown(v.GuiTool.QuestEditor,"Ctrl-Shift-Z",()=>{a.undo_manager.redo()})),this.finalize_construction(h.prototype)}}t.QuestEditorToolBar=h},"1vWm":function(e,t,i){"use strict";var o=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))((function(n,s){function r(e){try{d(o.next(e))}catch(e){s(e)}}function a(e){try{d(o.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}d((o=o.apply(e,t||[])).next())}))},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=i("nN8q"),r=i("FXpb"),a=i("1aHr"),d=n(i("xGNL")),l=i("zBQr"),_=i("q1Dg");i("88+i"),i("UrNz");const u=i("xyE7"),c=i("W7aE"),p=i("DUCy"),v=i("Yq7v"),h=i("4SjJ"),w=i("c5EP"),f=i("B2O0"),E=i("Jo0o"),m=i("GGSb").get("quest_editor/gui/QuestEditorView"),O=new Map([[_.QuestInfoView,"quest_info"],[u.NpcCountsView,"npc_counts"],[c.QuestRendererView,"quest_renderer"],[p.AsmEditorView,"asm_editor"],[v.EntityInfoView,"entity_info"],[f.NpcListView,"npc_list_view"],[E.ObjectListView,"object_list_view"]]),g={settings:{showPopoutIcon:!1,showMaximiseIcon:!1},dimensions:{headerHeight:24},labels:{close:"Close",maximise:"Maximise",minimise:"Minimise",popout:"Open in new window"}},y=[{type:"row",content:[{type:"stack",width:3,content:[{title:"Info",type:"component",componentName:O.get(_.QuestInfoView),isClosable:!1},{title:"NPC Counts",type:"component",componentName:O.get(u.NpcCountsView),isClosable:!1}]},{type:"stack",width:9,content:[{title:"3D View",type:"component",componentName:O.get(c.QuestRendererView),isClosable:!1},{title:"Script",type:"component",componentName:O.get(p.AsmEditorView),isClosable:!1}]},{type:"stack",width:2,content:[{title:"Entity",type:"component",componentName:O.get(v.EntityInfoView),isClosable:!1},{title:"NPCs",type:"component",componentName:O.get(f.NpcListView),isClosable:!1},{title:"Objects",type:"component",componentName:O.get(E.ObjectListView),isClosable:!1}]}]}];class b extends s.ResizableWidget{constructor(){super(),this.element=r.el.div({class:"quest_editor_QuestEditorView"}),this.tool_bar_view=this.disposable(new a.QuestEditorToolBar),this.layout_element=r.create_element("div",{class:"quest_editor_gl_container"}),this.sub_views=new Map,this.element.append(this.tool_bar_view.element,this.layout_element),this.layout=this.init_golden_layout(),this.disposables(h.gui_store.on_global_keydown(h.GuiTool.QuestEditor,"Ctrl-Alt-D",()=>w.quest_editor_store.debug.val=!w.quest_editor_store.debug.val)),this.finalize_construction(b.prototype)}resize(e,t){super.resize(e,t);const i=Math.max(0,t-this.tool_bar_view.height);return this.layout_element.style.width=`${e}px`,this.layout_element.style.height=`${i}px`,this.layout.then(t=>t.updateSize(e,i)),this}dispose(){super.dispose(),this.layout.then(e=>e.destroy());for(const e of this.sub_views.values())e.dispose();this.sub_views.clear()}init_golden_layout(){return o(this,void 0,void 0,(function*(){const e=yield l.quest_editor_ui_persister.load_layout_config([...O.values()],y);try{return this.attempt_gl_init(Object.assign(Object.assign({},g),{content:e}))}catch(e){return m.warn("Couldn't instantiate golden layout with persisted layout.",e),this.attempt_gl_init(Object.assign(Object.assign({},g),{content:y}))}}))}attempt_gl_init(e){const t=new d.default(e,this.layout_element),i=this;try{for(const[e,o]of O)t.registerComponent(o,(function(t){const n=new e;t.on("close",()=>n.dispose()),t.on("resize",()=>n.resize(t.width,t.height-4)),n.resize(t.width,t.height),i.sub_views.set(o,n),t.getElement().append(n.element)}));return t.on("stateChanged",()=>{this.layout&&l.quest_editor_ui_persister.persist_layout_config(t.toConfig().content)}),t.on("stackCreated",e=>{e.on("activeContentItemChanged",e=>{if("componentName"in e.config){const t=this.sub_views.get(e.config.componentName);t&&t.focus()}})}),t.init(),t}catch(e){throw t.destroy(),e}}}t.QuestEditorView=b},"1z6m":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("TRid"),n=i("FXpb"),s=i("4SjJ");i("Rbar");class r extends o.Widget{constructor(e,t){super(),this.element=n.el.span({class:"application_NavigationButton"}),this.input=n.create_element("input"),this.label=n.create_element("label");const i=s.GuiTool[e];this.input.type="radio",this.input.name="application_NavigationButton",this.input.value=i,this.input.id=`application_NavigationButton_${i}`,this.label.append(t),this.label.htmlFor=`application_NavigationButton_${i}`,this.element.append(this.input,this.label),this.finalize_construction(r.prototype)}set checked(e){this.input.checked=e}}t.NavigationButton=r},"22Lq":function(e,t,i){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=i("ouMO"),s=i("hUhj"),r=i("jJhE"),a=i("oxtq"),d=o(i("GGSb")).default.get("core/observable/property/list/SimpleListProperty");t.SimpleListProperty=class extends s.AbstractProperty{constructor(e,...t){super(),this.is_list_property=!0,this._length=n.property(0),this.value_observers=[],this.list_observers=[],this.length=this._length,this.values=t,this.extract_observables=e}get val(){return this.get_val()}set val(e){this.set_val(e)}get_val(){return this.values}set_val(e){const t=this.values.splice(0,this.values.length,...e);return this.finalize_update({type:a.ListChangeType.ListChange,index:0,removed:t,inserted:e}),t}observe_list(e){return 0===this.value_observers.length&&this.extract_observables&&this.replace_element_observers(0,1/0,this.values),this.list_observers.includes(e)||this.list_observers.push(e),{dispose:()=>{const t=this.list_observers.indexOf(e);if(-1!==t&&this.list_observers.splice(t,1),0===this.list_observers.length){for(const{disposables:e}of this.value_observers)for(const t of e)t.dispose();this.value_observers.splice(0,1/0)}}}}bind_to(e){return a.is_list_property(e)?(this.val=e.val,e.observe_list(e=>{e.type===a.ListChangeType.ListChange&&this.splice(e.index,e.removed.length,...e.inserted)})):(r.is_property(e)&&(this.val=e.val),e.observe(({value:e})=>this.set_val(e)))}bind_bi(e){const t=this.bind_to(e),i=e.bind_to(this);return{dispose(){t.dispose(),i.dispose()}}}update(e){this.splice(0,this.values.length,...e(this.values))}get(e){return this.values[e]}set(e,t){const i=[this.values[e]];this.values[e]=t,this.finalize_update({type:a.ListChangeType.ListChange,index:e,removed:i,inserted:[t]})}push(...e){const t=this.values.length;return this.values.push(...e),this.finalize_update({type:a.ListChangeType.ListChange,index:t,removed:[],inserted:e}),this.length.val}remove(...e){for(const t of e){const e=this.values.indexOf(t);this.values.splice(e,1),this.finalize_update({type:a.ListChangeType.ListChange,index:e,removed:[t],inserted:[]})}}clear(){const e=this.values.splice(0,this.values.length);this.finalize_update({type:a.ListChangeType.ListChange,index:0,removed:e,inserted:[]})}splice(e,t,...i){let o;return o=null==t?this.values.splice(e):this.values.splice(e,t,...i),this.finalize_update({type:a.ListChangeType.ListChange,index:e,removed:o,inserted:i}),o}sort(e){this.values.sort(e),this.finalize_update({type:a.ListChangeType.ListChange,index:0,removed:this.values,inserted:this.values})}finalize_update(e){this.list_observers.length&&this.extract_observables&&e.type===a.ListChangeType.ListChange&&this.replace_element_observers(e.index,e.removed.length,e.inserted);const t=this._length.val;this._length.set_val(this.values.length,{silent:!0});for(const t of this.list_observers)this.call_list_observer(t,e);this.emit(this.values),this._length.set_val(t,{silent:!0}),this._length.set_val(this.values.length,{silent:!1})}call_list_observer(e,t){try{e(t)}catch(e){d.error("Observer threw error.",e)}}replace_element_observers(e,t,i){let o=e;const n=this.value_observers.splice(e,t,...i.map(e=>{const t={index:o,disposables:this.extract_observables(e).map(i=>i.observe(()=>{this.finalize_update({type:a.ListChangeType.ValueChange,updated:[e],index:t.index})}))};return o++,t}));for(const{disposables:e}of n)for(const t of e)t.dispose();const s=i.length-t;for(;o{this.disposed||(this.view=this.disposable(e),this.view.resize(this.width,this.height),this.element.append(e.element))})),this.finalize_construction(s.prototype)}resize(e,t){return super.resize(e,t),this.view&&this.view.resize(e,t),this}}t.LazyWidget=s},"3AeF":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("x4IQ");t.EditLongDescriptionAction=class extends o.QuestEditAction{constructor(){super(...arguments),this.description="Edit long description"}undo(){this.quest.set_long_description(this.old)}redo(){this.quest.set_long_description(this.new)}}},"3CEK":function(e,t,i){"use strict";var o=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))((function(n,s){function r(e){try{d(o.next(e))}catch(e){s(e)}}function a(e){try{d(o.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}d((o=o.apply(e,t||[])).next())}))},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=n(i("GGSb")),r=i("Womt"),a=i("4vnR"),d=i("aEXR"),l=i("Tpfs"),_=i("xpi7"),u=i("c5EP"),c=i("oxtq"),p=i("yQqj"),v=s.default.get("quest_editor/rendering/QuestModelManager"),h=new r.Vector3(0,800,700),w=new r.Vector3(0,0,0),f=new r.Object3D;t.QuestModelManager=class{constructor(e){this.renderer=e,this.disposer=new l.Disposer,this.quest_disposer=this.disposer.add(new l.Disposer),this.quest_or_area_changed=()=>o(this,void 0,void 0,(function*(){const e=u.quest_editor_store.current_quest.val,t=u.quest_editor_store.current_area.val;yield this.area_model_manager.load(e,t),e===u.quest_editor_store.current_quest.val&&t===u.quest_editor_store.current_area.val&&(this.quest_disposer.dispose_all(),this.npc_model_manager.remove_all(),this.object_model_manager.remove_all(),this.renderer.reset_entity_models(),e&&t&&(this.npc_model_manager.add(e.npcs.val.filter(e=>e.area_id===t.id)),this.object_model_manager.add(e.objects.val.filter(e=>e.area_id===t.id)),this.quest_disposer.add_all(e.npcs.observe_list(this.npcs_changed),e.objects.observe_list(this.objects_changed))))})),this.npcs_changed=e=>{const t=u.quest_editor_store.current_area.val;e.type===c.ListChangeType.ListChange&&t&&(this.npc_model_manager.remove(e.removed),this.npc_model_manager.add(e.inserted.filter(e=>e.area_id===t.id)))},this.objects_changed=e=>{const t=u.quest_editor_store.current_area.val;e.type===c.ListChangeType.ListChange&&t&&(this.object_model_manager.remove(e.removed),this.object_model_manager.add(e.inserted.filter(e=>e.area_id===t.id)))},this.area_model_manager=new E(this.renderer),this.npc_model_manager=new m(this.renderer),this.object_model_manager=new m(this.renderer),this.disposer.add_all(u.quest_editor_store.current_quest.observe(this.quest_or_area_changed),u.quest_editor_store.current_area.observe(this.quest_or_area_changed))}dispose(){this.disposer.dispose()}};class E{constructor(e){this.renderer=e,this.raycaster=new r.Raycaster,this.origin=new r.Vector3,this.down=new r.Vector3(0,-1,0),this.up=new r.Vector3(0,1,0)}load(e,t){return o(this,void 0,void 0,(function*(){if(this.quest=e,this.area=t,!e||!t)return this.renderer.collision_geometry=f,void(this.renderer.render_geometry=f);try{const i=e.area_variants.val.find(e=>e.area.id===t.id)||t.area_variants[0],o=e.episode,n=yield d.load_area_collision_geometry(o,i);if(this.should_cancel(e,t))return;const s=yield d.load_area_render_geometry(o,i);if(this.should_cancel(e,t))return;this.add_sections_to_collision_geometry(n,s),this.renderer.collision_geometry=n,this.renderer.render_geometry=s,this.renderer.reset_camera(h,w)}catch(i){v.error(`Couldn't load area models for quest ${e.id}, ${t.name}.`,i),this.renderer.collision_geometry=f,this.renderer.render_geometry=f}}))}should_cancel(e,t){return this.quest!==e||this.area!==t}add_sections_to_collision_geometry(e,t){for(const i of e.children){i.geometry.boundingBox.getCenter(this.origin),this.raycaster.set(this.origin,this.down);const e=this.raycaster.intersectObject(t,!0).find(e=>null!=e.object.userData.section);this.raycaster.set(this.origin,this.up);const o=this.raycaster.intersectObject(t,!0).find(e=>null!=e.object.userData.section);let n;if(n=e&&o?e.distance<=o.distance?e:o:e||o){const e=i.userData,t=n.object.userData;e.section=t.section}}}}class m{constructor(e){this.renderer=e,this.queue=[],this.loaded_entities=[],this.loading=!1}add(e){return o(this,void 0,void 0,(function*(){if(this.queue.push(...e),!this.loading)try{for(this.loading=!0;this.queue.length;){const e=this.queue[0];try{yield this.load(e)}catch(t){v.error(`Couldn't load model for entity ${p.entity_type_to_string(e.type)}.`,t)}finally{const t=this.queue.indexOf(e);-1!==t&&this.queue.splice(t,1)}}}finally{this.loading=!1}}))}remove(e){for(const t of e){const e=this.queue.indexOf(t);-1!==e&&this.queue.splice(e,1);const i=this.loaded_entities.findIndex(e=>e.entity===t);if(-1!==i){const e=this.loaded_entities.splice(i,1)[0];this.renderer.remove_entity_model(e.entity),e.disposer.dispose()}}}remove_all(){for(const{disposer:e}of this.loaded_entities)e.dispose();this.loaded_entities.splice(0,1/0),this.queue.splice(0,1/0)}load(e){return o(this,void 0,void 0,(function*(){const t=yield a.load_entity_geometry(e.type),i=yield a.load_entity_textures(e.type),o=_.create_entity_mesh(e,t,i);this.queue.includes(e)&&this.update_entity_geometry(e,o)}))}update_entity_geometry(e,t){this.renderer.add_entity_model(t),this.loaded_entities.push({entity:e,disposer:new l.Disposer(e.world_position.observe(({value:e})=>{t.position.copy(e),this.renderer.schedule_render()}),e.world_rotation.observe(({value:e})=>{t.rotation.copy(e),this.renderer.schedule_render()}))})}}},"3ONQ":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("yQqj"),n=i("FXpb"),s=i("Womt");let r=void 0;const a=new Map,d=new s.Vector2(0,0);let l=0;function _(e){e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="none"),r&&(r.drag_element.style.transform=`translate(${e.clientX-d.x}px, ${e.clientY-d.y}px)`)}function u(){r&&(r.drag_element.remove(),r=void 0)}t.add_entity_dnd_listener=function(e,t,i){function o(e){r&&i(Object.assign(Object.assign({},r),{event:e}))}a.set(i,o),e.addEventListener(t,o)},t.remove_entity_dnd_listener=function(e,t,i){const o=a.get(i);o&&(a.delete(i),e.removeEventListener(t,o))},t.entity_dnd_source=function(e,t){function i(e){if(e.target instanceof HTMLElement){const i=t(e.target);i?(d.set(e.offsetX,e.offsetY),(r={drag_element:i[0],entity_type:i[1]}).drag_element.style.position="fixed",r.drag_element.style.pointerEvents="none",r.drag_element.style.zIndex="500",r.drag_element.style.top="0",r.drag_element.style.left="0",r.drag_element.style.transform=`translate(${e.clientX-d.x}px, ${e.clientY-d.y}px)`,document.body.append(r.drag_element),e.dataTransfer&&(e.dataTransfer.effectAllowed="copy",e.dataTransfer.setDragImage(n.el.div(),0,0),e.dataTransfer.setData("phantasmal-entity",o.entity_data(r.entity_type).name))):e.preventDefault()}}return e.addEventListener("dragstart",i),1==++l&&(document.addEventListener("dragover",_),document.addEventListener("dragend",u)),{dispose(){e.removeEventListener("dragstart",i),0==--l&&(document.removeEventListener("dragover",_),document.removeEventListener("dragend",u))}}}},"4/Uj":function(e,t,i){"use strict";var o=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))((function(n,s){function r(e){try{d(o.next(e))}catch(e){s(e)}}function a(e){try{d(o.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}d((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const n=i("ouMO"),s=i("yub1"),r=i("Sa3/"),a=i("NRxM"),d=i("bcBH"),l=i("GGSb").get("viewer/stores/TextureStore");class _{constructor(){this._current_xvm=n.property(void 0),this.current_xvm=this._current_xvm,this.load_file=e=>o(this,void 0,void 0,(function*(){try{const t=yield r.read_file(e);this._current_xvm.val=s.parse_xvm(new a.ArrayBufferCursor(t,d.Endianness.Little))}catch(e){l.error("Couldn't read file.",e)}}))}}t.TextureStore=_,t.texture_store=new _},"469Q":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("Womt"),n=i("Ftn7"),s=i("Tpfs"),r=i("iR5r"),a=i("4/Uj"),d=i("GGSb").get("viewer/rendering/TextureRenderer");t.TextureRenderer=class extends n.Renderer{constructor(){super(),this.disposer=new s.Disposer,this.quad_meshes=[],this.camera=new o.OrthographicCamera(-400,400,300,-300,1,10),this.disposer.add_all(a.texture_store.current_xvm.observe(({value:e})=>{this.scene.remove(...this.quad_meshes),e&&this.render_textures(e),this.reset_camera(new o.Vector3(0,0,5),new o.Vector3),this.schedule_render()})),this.init_camera_controls(),this.controls.dollySpeed=-1,this.controls.azimuthRotateSpeed=0,this.controls.polarRotateSpeed=0}set_size(e,t){this.camera.left=-Math.floor(e/2),this.camera.right=Math.ceil(e/2),this.camera.top=Math.floor(t/2),this.camera.bottom=-Math.ceil(t/2),this.camera.updateProjectionMatrix(),super.set_size(e,t)}dispose(){super.dispose(),this.disposer.dispose()}render_textures(e){let t=10*(e.textures.length-1),i=0;for(const o of e.textures)t+=o.width,i=Math.max(i,o.height);let n=-Math.floor(t/2);const s=-Math.floor(i/2);for(const t of e.textures){let e;try{e=r.xvm_texture_to_texture(t)}catch(e){d.warn("Couldn't convert XVM texture.",e)}const a=new o.Mesh(this.create_quad(n,s+Math.floor((i-t.height)/2),t.width,t.height),e?new o.MeshBasicMaterial({map:e,transparent:!0}):new o.MeshBasicMaterial({color:16711935}));this.quad_meshes.push(a),this.scene.add(a),n+=10+t.width}}create_quad(e,t,i,n){const s=new o.PlaneGeometry(i,n,1,1);return s.faceVertexUvs=[[[new o.Vector2(0,0),new o.Vector2(0,1),new o.Vector2(1,0)],[new o.Vector2(0,1),new o.Vector2(1,1),new o.Vector2(1,0)]]],s.translate(e+i/2,t+n/2,-5),s}}},"488w":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("Womt"),n=i("tRdk"),s=i("kwt4"),r=i("vM2b"),a=new o.Vector3(0,1,0),d=new o.Vector2(0,0),l=new o.Vector3(0,0,0),_=new o.Quaternion(0,0,0,1),u=new o.Vector3(1,1,1);t.ninja_object_to_geometry_builder=function(e,t){new p(t).to_geometry_builder(e)},t.ninja_object_to_buffer_geometry=function(e){return new p(new r.GeometryBuilder).create_buffer_geometry(e)};class c{constructor(){this.vertices_stack=[]}put(e){this.vertices_stack.push(e)}get(e){const t=[];for(let i=this.vertices_stack.length-1;i>=0;i--){const o=this.vertices_stack[i][e];o&&t.push(o)}return t}}class p{constructor(e){this.vertices=new c,this.bone_id=0,this.builder=e}to_geometry_builder(e){this.object_to_geometry(e,void 0,new o.Matrix4)}create_buffer_geometry(e){return this.to_geometry_builder(e),this.builder.build()}object_to_geometry(e,t,i){const{no_translate:s,no_rotate:r,no_scale:a,hidden:d,break_child_trace:c,zxy_rotation_order:p,skip:v}=e.evaluation_flags,{position:h,rotation:w,scale:f}=e,E=new o.Euler(w.x,w.y,w.z,p?"ZXY":"ZYX"),m=(new o.Matrix4).compose(s?l:n.vec3_to_threejs(h),r?_:(new o.Quaternion).setFromEuler(E),a?u:n.vec3_to_threejs(f)).premultiply(i);let O;if(v?O=t:((O=new o.Bone).name=this.bone_id.toString(),O.position.set(h.x,h.y,h.z),O.setRotationFromEuler(E),O.scale.set(f.x,f.y,f.z),this.builder.add_bone(O),t&&t.add(O)),e.model&&!d&&this.model_to_geometry(e.model,m),this.bone_id++,!c)for(const t of e.children)this.object_to_geometry(t,O,m)}model_to_geometry(e,t){s.is_njcm_model(e)?this.njcm_model_to_geometry(e,t):this.xj_model_to_geometry(e,t)}njcm_model_to_geometry(e,t){const i=(new o.Matrix3).getNormalMatrix(t),s=e.vertices.map(e=>{const s=n.vec3_to_threejs(e.position),r=e.normal?n.vec3_to_threejs(e.normal):new o.Vector3(0,1,0);return s.applyMatrix4(t),r.applyMatrix3(i),{bone_id:this.bone_id,position:s,normal:r,bone_weight:e.bone_weight,bone_weight_status:e.bone_weight_status,calc_continue:e.calc_continue}});this.vertices.put(s);for(const t of e.meshes){const e=this.builder.index_count;for(let e=0;e=2&&(e%2==(t.clockwise_winding?1:0)?(this.builder.add_index(r-2),this.builder.add_index(r-1),this.builder.add_index(r)):(this.builder.add_index(r-2),this.builder.add_index(r),this.builder.add_index(r-1)));const l=[[0,0],[0,0],[0,0],[0,0]];for(let e=o.length-1;e>=0;e--){const t=o[e];l[t.bone_weight_status]=[t.bone_id,t.bone_weight]}for(const[e,t]of l)this.builder.add_bone_weight(e,t)}}this.builder.add_group(e,this.builder.index_count-e,t.texture_id)}}xj_model_to_geometry(e,t){const i=this.builder.vertex_count,s=(new o.Matrix3).getNormalMatrix(t);for(let{position:i,normal:r,uv:a}of e.vertices){const e=n.vec3_to_threejs(i).applyMatrix4(t),l=(r?n.vec3_to_threejs(r):new o.Vector3(0,1,0)).applyMatrix3(s),_=a||d;this.builder.add_vertex(e,l,_)}let r;for(const t of e.meshes){const e=this.builder.index_count;let o=!1;for(let e=2;e=2&&(o=!o),o?(this.builder.add_index(s),this.builder.add_index(n),this.builder.add_index(r)):(this.builder.add_index(n),this.builder.add_index(s),this.builder.add_index(r)),o=!o}null!=t.material_properties.texture_id&&(r=t.material_properties.texture_id),this.builder.add_group(e,this.builder.index_count-e,r)}}}},"49yP":function(e,t,i){"use strict";var o=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))((function(n,s){function r(e){try{d(o.next(e))}catch(e){s(e)}}function a(e){try{d(o.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}d((o=o.apply(e,t||[])).next())}))},n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const s=i("FXpb"),r=i("4SjJ"),a=i("39ZU"),d=i("nN8q"),l=[[r.GuiTool.Viewer,()=>o(void 0,void 0,void 0,(function*(){return new((yield Promise.resolve().then(()=>n(i("vsj6")))).ViewerView)}))],[r.GuiTool.QuestEditor,()=>o(void 0,void 0,void 0,(function*(){return new((yield Promise.resolve().then(()=>n(i("1vWm")))).QuestEditorView)}))],[r.GuiTool.HuntOptimizer,()=>o(void 0,void 0,void 0,(function*(){return new((yield Promise.resolve().then(()=>n(i("LkpO")))).HuntOptimizerView)}))]];class _ extends d.ResizableWidget{constructor(){super(),this.element=s.el.div({class:"application_MainContentView"}),this.tool_views=new Map(l.map(([e,t])=>[e,this.disposable(new a.LazyWidget(t))])),this.tool_changed=({value:e})=>{for(const e of this.tool_views.values())e.visible.val=!1;const t=this.tool_views.get(e);t&&(t.visible.val=!0)};for(const e of this.tool_views.values())this.element.append(e.element);const e=this.tool_views.get(r.gui_store.tool.val);e&&(e.visible.val=!0),this.disposable(r.gui_store.tool.observe(this.tool_changed)),this.finalize_construction(_.prototype)}resize(e,t){super.resize(e,t);for(const i of this.tool_views.values())i.resize(e,t);return this}}t.MainContentView=_},"4Mnx":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("lPzw"),n=i("bJO5"),s=i("xs7i"),r=i("aEXR"),a=i("SoCI");t.area_store=new class{constructor(){this.areas=[],this.get_areas_for_episode=e=>this.areas[e],this.get_area=(e,t)=>{const i=this.areas[e].find(e=>e.id===t);if(!i)throw new Error(`Area id ${t} for episode ${e} is invalid.`);return i},this.get_variant=(e,t,i)=>{const o=this.get_area(e,t).area_variants[i];if(!o)throw new Error(`Area variant id ${i} for area ${t} of episode ${e} is invalid.`);return o},this.get_area_sections=(e,t)=>r.load_area_sections(e,t);for(const e of s.EPISODES)this.areas[e]=a.get_areas_for_episode(e).map(e=>{const t=new o.AreaModel(e.id,e.name,e.order,[]);for(const i of e.area_variants)t.area_variants.push(new n.AreaVariantModel(i.id,t));return t})}}},"4SjJ":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("ouMO"),n=i("nsCy");var s;!function(e){e[e.Viewer=0]="Viewer",e[e.QuestEditor=1]="QuestEditor",e[e.HuntOptimizer=2]="HuntOptimizer"}(s=t.GuiTool||(t.GuiTool={}));const r=new Map([[s.Viewer,"viewer"],[s.QuestEditor,"quest_editor"],[s.HuntOptimizer,"hunt_optimizer"]]),a=new Map([...r.entries()].map(([e,t])=>[t,e]));t.gui_store=new class{constructor(){this.tool=o.property(s.Viewer),this._server=o.property(n.Server.Ephinea),this.hash_disposer=this.tool.observe(({value:e})=>{window.location.hash=`#/${function(e){const t=r.get(e);if(t)return t;throw new Error(`To string not implemented for ${s[e]}.`)}(e)}`}),this.global_keydown_handlers=new Map,this.dispatch_global_keydown=e=>{const t=[];e.ctrlKey&&t.push("Ctrl"),e.shiftKey&&t.push("Shift"),e.altKey&&t.push("Alt"),t.push(e.key.toUpperCase());const i=t.join("-"),o=this.global_keydown_handlers.get(this.handler_key(this.tool.val,i));o&&(e.preventDefault(),o(e))};const e=window.location.hash.slice(2);this.tool.val=function(e){return a.get(e)}(e)||s.Viewer,this.server=this._server,window.addEventListener("keydown",this.dispatch_global_keydown)}dispose(){this.hash_disposer.dispose(),this.global_keydown_handlers.clear(),window.removeEventListener("keydown",this.dispatch_global_keydown)}on_global_keydown(e,t,i){const o=this.handler_key(e,t);return this.global_keydown_handlers.set(o,i),{dispose:()=>{this.global_keydown_handlers.delete(o)}}}handler_key(e,t){return`${s[e]} -> ${t}`}}},"4VsB":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("0CzU");t.WidgetProperty=class extends o.SimpleProperty{constructor(e,t,i){super(t),this.widget=e,this.set_value=i}set_val(e,t){this.set_value.call(this.widget,e),super.set_val(e,Object.assign({silent:!0},t))}}},"4mUz":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parse_rel=function(e,t){e.seek_end(32);const i=e.u32(),o=e.u32();e.seek(8);const n=e.u32();return e.seek_start(i),{data_offset:n,index:t?function(e,t){const i=e.u16_array(t),o=[];let n=0;for(const t of i){n+=4*t,e.seek_start(n-4);const i=e.u32(),s=e.u32();o.push({offset:s,size:i})}return o}(e,o):[]}}},"4s8/":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.ValueSet=class{constructor(){this.intervals=[]}size(){return this.intervals.reduce((e,t)=>e+t.end-t.start+1,0)}get(e){for(const{start:t,end:i}of this.intervals){const o=i-t+1;if(ethis.intervals[o].start;)e.end=this.intervals[o].end,o++;this.intervals.splice(t+1,o-t-1),e.end=Math.max(e.end,i.end),t++;continue e}t++}this.intervals.push(i)}return this}to_array(){let e=[];for(const{start:t,end:i}of this.intervals)for(let o=t;o<=i;o++)e.push(o);return e}[Symbol.iterator](){const e=this;let t=0,i=NaN;return{next(){let o=!0;return te.intervals[t].end?++te(m)),g=[],y=new Promise(e=>e(g)),b=new a.LoadingCache,D=new a.LoadingCache;for(const e of[w.NpcType.Unknown,w.NpcType.Migium,w.NpcType.Hidoom,w.NpcType.DeathGunner,w.NpcType.StRappy,w.NpcType.HalloRappy,w.NpcType.EggRappy,w.NpcType.Migium2,w.NpcType.Hidoom2,w.NpcType.Recon,h.ObjectType.Unknown,h.ObjectType.PlayerSet,h.ObjectType.Particle,h.ObjectType.LightCollision,h.ObjectType.EnvSound,h.ObjectType.FogCollision,h.ObjectType.EventCollision,h.ObjectType.CharaCollision,h.ObjectType.ObjRoomID,h.ObjectType.LensFlare,h.ObjectType.ScriptCollision,h.ObjectType.MapCollision,h.ObjectType.ScriptCollisionA,h.ObjectType.ItemLight,h.ObjectType.RadarCollision,h.ObjectType.FogCollisionSW,h.ObjectType.ImageBoard,h.ObjectType.UnknownItem29,h.ObjectType.UnknownItem30,h.ObjectType.UnknownItem31,h.ObjectType.MenuActivation,h.ObjectType.BoxDetectObject,h.ObjectType.SymbolChatObject,h.ObjectType.TouchPlateObject,h.ObjectType.TargetableObject,h.ObjectType.EffectObject,h.ObjectType.CountDownObject,h.ObjectType.UnknownItem38,h.ObjectType.UnknownItem39,h.ObjectType.UnknownItem40,h.ObjectType.UnknownItem41,h.ObjectType.TelepipeLocation,h.ObjectType.BGMCollision,h.ObjectType.Pioneer2InvisibleTouchplate,h.ObjectType.TempleMapDetect,h.ObjectType.Firework,h.ObjectType.MainRagolTeleporterBattleInNextArea,h.ObjectType.Rainbow,h.ObjectType.FloatingBlueLight,h.ObjectType.PopupTrapNoTech,h.ObjectType.Poison,h.ObjectType.EnemyTypeBoxYellow,h.ObjectType.EnemyTypeBoxBlue,h.ObjectType.EmptyTypeBoxBlue,h.ObjectType.FloatingRocks,h.ObjectType.FloatingSoul,h.ObjectType.Butterfly,h.ObjectType.UnknownItem400,h.ObjectType.CCAAreaTeleporter,h.ObjectType.UnknownItem523,h.ObjectType.WhiteBird,h.ObjectType.OrangeBird,h.ObjectType.UnknownItem529,h.ObjectType.UnknownItem530,h.ObjectType.Seagull,h.ObjectType.UnknownItem576,h.ObjectType.WarpInBarbaRayRoom,h.ObjectType.UnknownItem672,h.ObjectType.InstaWarp,h.ObjectType.LabInvisibleObject,h.ObjectType.UnknownItem700])b.set(e,O),D.set(e,y);function P(e,t){return o(this,void 0,void 0,(function*(){const i=function e(t,i){if(f.is_npc_type(t))switch(t){case w.NpcType.Dubswitch:return`/npcs/${w.NpcType[t]}.${i===T.Geometry?"xj":"xvm"}`;case w.NpcType.Hildebear2:return e(w.NpcType.Hildebear,i);case w.NpcType.Hildeblue2:return e(w.NpcType.Hildeblue,i);case w.NpcType.RagRappy2:return e(w.NpcType.RagRappy,i);case w.NpcType.Monest2:return e(w.NpcType.Monest,i);case w.NpcType.Mothmant2:return e(w.NpcType.Mothmant,i);case w.NpcType.PoisonLily2:return e(w.NpcType.PoisonLily,i);case w.NpcType.NarLily2:return e(w.NpcType.NarLily,i);case w.NpcType.GrassAssassin2:return e(w.NpcType.GrassAssassin,i);case w.NpcType.Dimenian2:return e(w.NpcType.Dimenian,i);case w.NpcType.LaDimenian2:return e(w.NpcType.LaDimenian,i);case w.NpcType.SoDimenian2:return e(w.NpcType.SoDimenian,i);case w.NpcType.DarkBelra2:return e(w.NpcType.DarkBelra,i);case w.NpcType.SavageWolf2:return e(w.NpcType.SavageWolf,i);case w.NpcType.BarbarousWolf2:return e(w.NpcType.BarbarousWolf,i);case w.NpcType.PanArms2:return e(w.NpcType.PanArms,i);case w.NpcType.Dubchic2:return e(w.NpcType.Dubchic,i);case w.NpcType.Gilchic2:return e(w.NpcType.Gilchic,i);case w.NpcType.Garanz2:return e(w.NpcType.Garanz,i);case w.NpcType.Dubswitch2:return e(w.NpcType.Dubswitch,i);case w.NpcType.Delsaber2:return e(w.NpcType.Delsaber,i);case w.NpcType.ChaosSorcerer2:return e(w.NpcType.ChaosSorcerer,i);default:return`/npcs/${w.NpcType[t]}.${i===T.Geometry?"nj":"xvm"}`}else{if(i!==T.Geometry)return`/objects/${h.object_data(t).pso_id}.xvm`;switch(t){case h.ObjectType.EasterEgg:case h.ObjectType.ChristmasTree:case h.ObjectType.ChristmasWreath:case h.ObjectType.TwentyFirstCentury:case h.ObjectType.Sonic:case h.ObjectType.WelcomeBoard:case h.ObjectType.FloatingJellyfish:case h.ObjectType.RuinsSeal:case h.ObjectType.Dolphin:case h.ObjectType.Cacti:case h.ObjectType.BigBrownRock:case h.ObjectType.PoisonPlant:case h.ObjectType.BigBlackRocks:case h.ObjectType.FallingRock:case h.ObjectType.DesertFixedTypeBoxBreakableCrystals:case h.ObjectType.BeeHive:return`/objects/${h.object_data(t).pso_id}.nj`;default:return`/objects/${h.object_data(t).pso_id}.xj`}}}(e,t);return{url:i,data:yield v.load_array_buffer(i)}}))}var T;t.load_entity_geometry=function(e){return o(this,void 0,void 0,(function*(){return b.get_or_set(e,()=>o(this,void 0,void 0,(function*(){try{const{url:t,data:i}=yield P(e,T.Geometry),o=new l.ArrayBufferCursor(i,d.Endianness.Little),n=t.endsWith(".nj")?u.parse_nj(o):u.parse_xj(o);return n.length?_.ninja_object_to_buffer_geometry(n[0]):(E.warn(`Couldn't parse ${t} for ${f.entity_type_to_string(e)}.`),m)}catch(t){return E.warn(`Couldn't load geometry file for ${f.entity_type_to_string(e)}.`,t),m}})))}))},t.load_entity_textures=function(e){return o(this,void 0,void 0,(function*(){return D.get_or_set(e,()=>o(this,void 0,void 0,(function*(){try{const{data:t}=yield P(e,T.Texture),i=new l.ArrayBufferCursor(t,d.Endianness.Little),o=c.parse_xvm(i);return p.xvm_to_textures(o)}catch(t){return E.warn(`Couldn't load texture file for ${f.entity_type_to_string(e)}.`,t),g}})))}))},t.load_entity_data=P,function(e){e[e.Geometry=0]="Geometry",e[e.Texture=1]="Texture"}(T||(T={}))},"52VV":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("+LO4"),n=i("nEgy");class s extends o.AbstractMinimalProperty{constructor(e,t){super(),this.dependency=e,this.f=t}get val(){return this.get_val()}get_val(){return this.computed_property?this.computed_property.val:this.f(this.dependency.val).val}observe(e){const t=super.observe(e);return null==this.dependency_disposable&&(this.dependency_disposable=this.dependency.observe(()=>{const e=this.val;this.compute_and_observe(),this.emit(e)}),this.compute_and_observe()),this.emit(this.get_val()),{dispose:()=>{t.dispose(),0===this.observers.length&&(this.dependency_disposable.dispose(),this.dependency_disposable=void 0,this.computed_disposable.dispose(),this.computed_disposable=void 0,this.computed_property=void 0)}}}map(e){return new n.DependentProperty([this],()=>e(this.val))}flat_map(e){return new s(this,t=>e(t))}compute_and_observe(){this.computed_disposable&&this.computed_disposable.dispose(),this.computed_property=this.f(this.dependency.val);let e=this.computed_property.val;this.computed_disposable=this.computed_property.observe(()=>{const t=e;e=this.val,this.emit(t)})}}t.FlatMappedProperty=s},"5aKR":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("TRid"),n=i("FXpb"),s=i("7ZX1");i("+BDF");class r extends o.Widget{constructor(e){super(),this.element=n.el.div({class:"quest_editor_DisabledView"}),this.label=this.disposable(new s.Label(e,{enabled:!1})),this.element.append(this.label.element),this.finalize_construction(r.prototype)}}t.DisabledView=r},"6WXA":function(e,t,i){"use strict";var o=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))((function(n,s){function r(e){try{d(o.next(e))}catch(e){s(e)}}function a(e){try{d(o.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}d((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const n=i("4SjJ"),s=i("LvDl"),r=i("M/y3");t.ServerMap=class{constructor(e){this.get_value=s.memoize(e)}get current(){return this._current||(this._current=n.gui_store.server.map(e=>this.get(e))),this._current}get(e){return this.get_value(e)}observe_current(e,t){const i=r.sequential(({value:t})=>o(this,void 0,void 0,(function*(){return e(yield t)})));return this.current.observe(i,t)}}},"6cU9":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("FXpb");i("+Mcu"),i("Tp1L");const n=i("ouMO"),s=i("QmPX");class r extends s.Control{constructor(e,t){super(t),this.element=o.create_element("label",{class:"core_FileButton core_Button"}),this.input=o.create_element("input",{class:"core_FileButton_input core_Button_inner"}),this._files=n.property([]),this.files=this._files,this.input.type="file",this.input.onchange=()=>{this.input.files&&this.input.files.length?this._files.val=[...this.input.files]:this._files.val=[]},t&&t.accept&&(this.input.accept=t.accept);const i=o.el.span({class:"core_FileButton_inner core_Button_inner"});t&&null!=t.icon_left&&i.append(o.el.span({class:"core_FileButton_left core_Button_left"},o.icon(t.icon_left))),i.append(o.el.span({class:"core_Button_center",text:e})),this.element.append(i,this.input),this.disposables(this.enabled.observe(({value:e})=>{this.input.disabled=!e,e?this.element.classList.remove("disabled"):this.element.classList.add("disabled")})),this.finalize_construction(r.prototype)}click(){this.input.click()}}t.FileButton=r},"70mo":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("ouMO"),n=i("Ts/k"),s=i("n5fr"),r=i("GGSb").get("core/undo/UndoStack");t.UndoStack=class{constructor(){this.stack=o.list_property(),this.index=o.property(0),this.can_undo=this.index.map(e=>e>0),this.can_redo=o.map((e,t)=>te?this.stack.get(this.index.val-1):void 0),this.first_redo=this.can_redo.map(e=>e?this.stack.get(this.index.val):void 0),this.undoing_or_redoing=!1}make_current(){s.undo_manager.current.val=this}ensure_not_current(){s.undo_manager.current.val===this&&(s.undo_manager.current.val=n.NOOP_UNDO)}push(e){return this.undoing_or_redoing||(this.stack.splice(this.index.val,1/0,e),this.index.update(e=>e+1)),e}pop(){return this.index.update(e=>e-1),this.stack.splice(this.index.val,1)[0]}undo(){if(this.can_undo.val&&!this.undoing_or_redoing){try{this.undoing_or_redoing=!0,this.index.update(e=>e-1),this.stack.get(this.index.val).undo()}catch(e){r.warn("Error while undoing action.",e)}finally{this.undoing_or_redoing=!1}return!0}return!1}redo(){if(this.can_redo.val&&!this.undoing_or_redoing){try{this.undoing_or_redoing=!0,this.stack.get(this.index.val).redo(),this.index.update(e=>e+1)}catch(e){r.warn("Error while redoing action.",e)}finally{this.undoing_or_redoing=!1}return!0}return!1}reset(){this.stack.clear(),this.index.val=0}}},"7CyS":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("Womt"),n=i("VwSi");t.PSO_FRAME_RATE=30,t.create_animation_clip=function(e,i){const s=i.interpolation===n.NjInterpolation.Spline?o.InterpolateSmooth:o.InterpolateLinear,r=[];return i.motion_data.forEach((i,a)=>{const d=e.get_bone(a);d&&i.tracks.forEach(({type:e,keyframes:i})=>{const l=[],_=[];for(const s of i)if(l.push(s.frame/t.PSO_FRAME_RATE),e===n.NjKeyframeTrackType.Rotation){const e=d.evaluation_flags.zxy_rotation_order?"ZXY":"ZYX",t=(new o.Quaternion).setFromEuler(new o.Euler(s.value.x,s.value.y,s.value.z,e));_.push(t.x,t.y,t.z,t.w)}else _.push(s.value.x,s.value.y,s.value.z);if(e===n.NjKeyframeTrackType.Rotation)r.push(new o.QuaternionKeyframeTrack(`.bones[${a}].quaternion`,l,_,s));else{const t=e===n.NjKeyframeTrackType.Position?`.bones[${a}].position`:`.bones[${a}].scale`;r.push(new o.VectorKeyframeTrack(t,l,_,s))}})}),new o.AnimationClip("Animation",(i.frame_count-1)/t.PSO_FRAME_RATE,r).optimize()}},"7ZX1":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("TRid"),n=i("FXpb");i("ku4b");const s=i("4VsB");class r extends o.Widget{constructor(e,t){super(t),this.element=n.create_element("label",{class:"core_Label"}),this._text=new s.WidgetProperty(this,"",this.set_text),this.text=this._text,"string"==typeof e?this.set_text(e):this.disposable(this._text.bind_to(e)),this.finalize_construction(r.prototype)}set for(e){this.element.htmlFor=e}set_text(e){this.element.textContent=e}}t.Label=r},"8hIv":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=new DataView(new ArrayBuffer(4));t.reinterpret_i32_as_f32=function(e){return o.setInt32(0,e),o.getFloat32(0)},t.reinterpret_f32_as_i32=function(e){return o.setFloat32(0,e),o.getInt32(0)}},"9Onn":function(e,t,i){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=o(i("GGSb")).default.get("data_formats/parsing/ninja/njcm");var s;function r(e,t,i){const o=[];let l=!0;for(;l;){const _=e.u8(),u=e.u8(),c=e.position;let p=0;if(0===_)o.push({type:s.Null,type_id:_});else if(1<=_&&_<=3)o.push({type:s.Bits,type_id:_});else if(4===_){const i=u,n=e.position;o.push({type:s.CachePolygonList,type_id:_,cache_index:i,offset:n}),t[i]=n,l=!1}else if(5===_){const n=u,a=t[n];null!=a&&(e.seek_start(a),o.push(...r(e,t,i))),o.push({type:s.DrawPolygonList,type_id:_,cache_index:n})}else if(8<=_&&_<=9){p=2;const t=e.u16();o.push({type:s.Tiny,type_id:_,flip_u:0!=(128&_),flip_v:0!=(64&_),clamp_u:0!=(32&_),clamp_v:0!=(16&_),mipmap_d_adjust:15&_,filter_mode:t>>>14,super_sample:0!=(64&t),texture_id:8191&t})}else 17<=_&&_<=31?(p=2+2*e.u16(),o.push({type:s.Material,type_id:_})):32<=_&&_<=50?(p=2+4*e.u16(),o.push({type:s.Vertex,type_id:_,vertices:a(e,_,u)})):56<=_&&_<=58?(p=2+2*e.u16(),o.push({type:s.Volume,type_id:_})):64<=_&&_<=75?(p=2+2*e.u16(),o.push({type:s.Strip,type_id:_,triangle_strips:d(e,_,u)})):255===_?(p=i?2:0,o.push({type:s.End,type_id:_}),l=!1):(p=2+2*e.u16(),o.push({type:s.Unknown,type_id:_}),n.warn(`Unknown chunk type ${_} at offset ${c}.`));e.seek_start(c+p)}return o}function a(e,t,i){if(t<32||t>50)return n.warn(`Unknown vertex chunk type ${t}.`),[];const o=3&i,s=0!=(128&i),r=e.u16(),a=e.u16(),d=[];for(let i=0;i=42&&(44===t?(n.index=r+e.u16(),n.bone_weight=e.u16()/255):e.seek(4));else if(48<=t&&t<=50){const i=e.u32();n.normal={x:(i>>20&1023)/1023,y:(i>>10&1023)/1023,z:(1023&i)/1023},t>=49&&e.seek(4)}d.push(n)}return d}function d(e,t,i){const o={ignore_light:0!=(1&i),ignore_specular:0!=(2&i),ignore_ambient:0!=(4&i),use_alpha:0!=(8&i),double_side:0!=(16&i),flat_shading:0!=(32&i),environment_mapping:0!=(64&i)},n=e.u16(),s=n>>>14,r=16383&n;let a=!1,d=!1,l=!1,_=!1;switch(t){case 64:break;case 65:case 66:a=!0;break;case 67:l=!0;break;case 68:case 69:a=!0,l=!0;break;case 70:d=!0;break;case 71:case 72:a=!0,d=!0;break;case 73:break;case 74:case 75:_=!0;break;default:throw new Error(`Unexpected chunk type ID: ${t}.`)}const u=[];for(let t=0;t=2&&e.seek(2*s)}u.push(Object.assign(Object.assign({},o),{clockwise_winding:i,has_tex_coords:a,has_normal:l,vertices:r}))}return u}!function(e){e[e.Unknown=0]="Unknown",e[e.Null=1]="Null",e[e.Bits=2]="Bits",e[e.CachePolygonList=3]="CachePolygonList",e[e.DrawPolygonList=4]="DrawPolygonList",e[e.Tiny=5]="Tiny",e[e.Material=6]="Material",e[e.Vertex=7]="Vertex",e[e.Volume=8]="Volume",e[e.Strip=9]="Strip",e[e.End=10]="End"}(s||(s={})),t.parse_njcm_model=function(e,t){const i=e.u32(),o=e.u32(),n=e.vec3_f32(),a=e.f32(),d=[],l=[];if(i){e.seek_start(i);for(const i of r(e,t,!0))if(i.type===s.Vertex)for(const e of i.vertices)d[e.index]={position:e.position,normal:e.normal,bone_weight:e.bone_weight,bone_weight_status:e.bone_weight_status,calc_continue:e.calc_continue}}if(o){e.seek_start(o);let i=void 0;for(const o of r(e,t,!1))if(o.type===s.Tiny)i=o.texture_id;else if(o.type===s.Strip){for(const e of o.triangle_strips)e.texture_id=i;l.push(...o.triangle_strips)}}return{type:"njcm",vertices:d,meshes:l,collision_sphere_center:n,collision_sphere_radius:a}}},"9Ykw":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parse_iff=function(e){const t=[];for(;e.bytes_left;){const i=e.u32(),o=e.u32();if(o>e.bytes_left)break;t.push({type:i,data:e.take(o)})}return t}},"9dYx":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("GuD3");t.AbstractWritableCursor=class extends o.AbstractCursor{write_u8(e){return this.ensure_size(1),this.dv.setUint8(this._position++,e),this}write_u16(e){return this.ensure_size(2),this.dv.setUint16(this.position,e,this.little_endian),this._position+=2,this}write_u32(e){return this.ensure_size(4),this.dv.setUint32(this.position,e,this.little_endian),this._position+=4,this}write_i8(e){return this.ensure_size(1),this.dv.setInt8(this.position,e),this._position+=1,this}write_i16(e){return this.ensure_size(2),this.dv.setInt16(this.position,e,this.little_endian),this._position+=2,this}write_i32(e){return this.ensure_size(4),this.dv.setInt32(this.position,e,this.little_endian),this._position+=4,this}write_f32(e){return this.ensure_size(4),this.dv.setFloat32(this.position,e,this.little_endian),this._position+=4,this}write_u8_array(e){return this.ensure_size(e.length),new Uint8Array(this.backing_buffer,this.offset+this.position).set(new Uint8Array(e)),this._position+=e.length,this}write_u16_array(e){this.ensure_size(2*e.length);const t=e.length;for(let i=0;ithis.bytes_left)throw new Error(`${e} Bytes required but only ${this.bytes_left} available.`)}}},"9fJw":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.CharacterClassModel=class{constructor(e,t,i,o){this.name=e,this.head_style_count=t,this.hair_styles_count=i,this.hair_styles_with_accessory=o}}},"AF+w":function(e,t,i){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=o(i("GGSb")),s=i("bcBH"),r=i("NRxM"),a=i("/Wax"),d=i("tjEv"),l=n.default.get("core/data_formats/parsing/quest/qst");function _(e,t,i,o){e.write_u8_array([28,4,19,0]),e.write_u8(i),e.write_u8_array([0,0,0]),e.write_string_ascii(o,16);const n=Math.min(1024,t.bytes_left);e.write_cursor(t.take(n));for(let t=n;t<1024;++t)e.write_u8(0);return e.write_u32(n),e.write_u32(0),t.bytes_left>0}t.parse_qst=function(e){let t="PC";const i=e.u8();e.seek(1);const o=e.u8();if(68===i?t="Dreamcast/GameCube":88===i?68===o&&(t="Blue Burst"):166===i&&(t="Dreamcast download"),"Blue Burst"===t){e.seek_start(0);const i=function(e){const t=[];let i,o;for(let n=0;n<4;++n){e.seek(4);const n=e.u16();e.seek(38);const s=e.string_ascii(16,!0,!0),r=e.u32(),a=e.string_ascii(24,!0,!0);if(null!=i&&null!=o&&(n!==i||s.slice(0,5)!==o.slice(0,5))){e.seek(-88);break}i=n,o=s,t.push({quest_id:n,file_name:s,file_name_2:a,size:r})}return t}(e),o=function(e,t){const i=new Map;for(;e.bytes_left>=1056;){const o=e.position,n=e.seek(4).u8(),r=e.seek(3).string_ascii(16,!0,!0);let _=i.get(r);if(!_){const e=t.get(r);i.set(r,_={name:r,expected_size:e,cursor:new a.ResizableBufferCursor(new d.ResizableBuffer(e||10240),s.Endianness.Little),chunk_nos:new Set})}_.chunk_nos.has(n)?l.warn(`File chunk number ${n} of file ${r} was already encountered, overwriting previous chunk.`):_.chunk_nos.add(n);let u=e.seek(1024).u32();e.seek(-1028),u>1024&&(l.warn(`Data segment size of ${u} is larger than expected maximum size, reading just 1024 bytes.`),u=1024);const c=e.take(u),p=1024*n;if(_.cursor.size=Math.max(p+u,_.cursor.size),_.cursor.seek_start(p).write_cursor(c),e.seek(1032-c.size),e.position!==o+1056)throw new Error(`Read ${e.position-o} file chunk message bytes instead of expected 1056.`)}e.bytes_left&&l.warn(`${e.bytes_left} Bytes left in file.`);for(const e of i.values()){e.cursor.seek_start(0),e.chunk_nos=new Set(Array.from(e.chunk_nos.values()).sort((e,t)=>e-t)),null!=e.expected_size&&e.cursor.size!==e.expected_size&&l.warn(`File ${e.name} has an actual size of ${e.cursor.size} instead of the expected size ${e.expected_size}.`);const t=Math.max(e.cursor.size,e.expected_size||0);for(let i=0;i[e.file_name,e.size])));for(const e of o){const t=i.find(t=>t.file_name===e.name);t&&(e.id=t.quest_id,e.name_2=t.file_name_2)}return{version:t,files:o}}l.error(`Can't parse ${t} QST files.`)},t.write_qst=function(e){const t=e.files,i=t.map(e=>88+1056*Math.ceil(e.data.byteLength/1024)).reduce((e,t)=>e+t),o=new ArrayBuffer(i),n=new r.ArrayBufferCursor(o,s.Endianness.Little);if(function(e,t){for(const i of t){if(i.name.length>15)throw new Error(`File ${i.name} has a name longer than 15 characters.`);e.write_u16(88),e.write_u16(68),e.write_u16(i.id||0);for(let t=0;t<38;++t)e.write_u8(0);let t;if(e.write_string_ascii(i.name,16),e.write_u32(i.data.byteLength),null==i.name_2){const e=i.name.lastIndexOf(".");t=-1===e?i.name+"_j":i.name.slice(0,e)+"_j"+i.name.slice(e)}else t=i.name_2;if(t.length>24)throw Error(`File ${i.name} has a file_name_2 length (${t}) longer than 24 characters.`);e.write_string_ascii(t,24)}}(n,t),function(e,t){const i=t.map(e=>({no:0,data:new r.ArrayBufferCursor(e.data,s.Endianness.Little),name:e.name}));let o=0;for(;oe.value);break;case o.Opcode.CALL:case o.Opcode.VA_CALL:_=n.Call,u=[l.args[0].value];break;case o.Opcode.SWITCH_CALL:_=n.Call,u=l.args.slice(1).map(e=>e.value);break;default:if(d===i-1){_=n.None,u=[];break}continue}const c=new s(t,r,d+1,_,u);for(let t=c.start;t{const e=s.quest_editor_store.current_quest.val,t=s.quest_editor_store.current_area.val,i=e?e.episode:r.Episode.I,o=t?t.id:0;this.entities.val=n.NPC_TYPES.filter(e=>{const t=n.npc_data(e);return(null==t.episode||t.episode===i)&&t.area_ids.includes(o)})},this.disposables(s.quest_editor_store.current_quest.observe(this.filter_npcs),s.quest_editor_store.current_area.observe(this.filter_npcs)),this.filter_npcs(),this.finalize_construction(a.prototype)}}t.NpcListView=a},CUby:function(e,t,i){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=o(i("GGSb")),s=i("ZPAt"),r=i("4s8/"),a=n.default.get("quest_editor/scripting/data_flow_analysis/register_value");t.MIN_REGISTER_VALUE=s.MIN_SIGNED_DWORD_VALUE,t.MAX_REGISTER_VALUE=s.MAX_SIGNED_DWORD_VALUE,t.REGISTER_VALUES=Math.pow(2,32),t.register_value=function(e,i,o){const n=e.get_block_for_instruction(i);return n?function e(i,o,n,d,l){if(++i.iterations>100)return a.warn("Too many iterations."),(new r.ValueSet).set_interval(t.MIN_REGISTER_VALUE,t.MAX_REGISTER_VALUE);for(let a=d-1;a>=n.start;a--){const d=n.segment.instructions[a],_=d.args;switch(d.opcode){case s.Opcode.LET:if(_[0].value===l)return e(i,new Set(o),n,a,_[1].value);break;case s.Opcode.LETI:case s.Opcode.LETB:case s.Opcode.LETW:case s.Opcode.SYNC_LETI:if(_[0].value===l)return(new r.ValueSet).set_value(_[1].value);break;case s.Opcode.SET:if(_[0].value===l)return(new r.ValueSet).set_value(1);break;case s.Opcode.CLEAR:if(_[0].value===l)return(new r.ValueSet).set_value(0);break;case s.Opcode.REV:if(_[0].value===l){const t=e(i,new Set(o),n,a,l),s=t.size();return 0===s||1===s&&0===t.get(0)?(new r.ValueSet).set_value(1):t.has(0)?(new r.ValueSet).set_interval(0,1):(new r.ValueSet).set_value(0)}break;case s.Opcode.ADDI:if(_[0].value===l){return e(i,new Set(o),n,a,l).scalar_add(_[1].value)}break;case s.Opcode.SUBI:if(_[0].value===l){return e(i,new Set(o),n,a,l).scalar_sub(_[1].value)}break;case s.Opcode.MULI:if(_[0].value===l){return e(i,new Set(o),n,a,l).scalar_mul(_[1].value)}break;case s.Opcode.DIVI:if(_[0].value===l){return e(i,new Set(o),n,a,l).scalar_div(_[1].value)}break;case s.Opcode.IF_ZONE_CLEAR:if(_[0].value===l)return(new r.ValueSet).set_interval(0,1);break;case s.Opcode.GET_DIFFLVL:if(_[0].value===l)return(new r.ValueSet).set_interval(0,2);break;case s.Opcode.GET_SLOTNUMBER:if(_[0].value===l)return(new r.ValueSet).set_interval(0,3);break;case s.Opcode.GET_RANDOM:if(_[1].value===l){const t=e(i,new Set(o),n,a,_[0].value).min()||0,s=Math.max(e(i,new Set(o),n,a,_[0].value+1).max()||0,t+1);return(new r.ValueSet).set_interval(t,s-1)}break;case s.Opcode.STACK_PUSHM:case s.Opcode.STACK_POPM:{const e=_[0].value,i=_[0].value+_[1].value;if(e<=l&&l{}),this.editor.addCommand(s.KeyMod.CtrlCmd|s.KeyMod.Shift|s.KeyCode.KEY_Z,()=>{}),this.disposables(r.asm_editor_store.did_undo.observe(({value:e})=>{this.editor.trigger(e,"undo",void 0)}),r.asm_editor_store.did_redo.observe(({value:e})=>{this.editor.trigger(e,"redo",void 0)}),r.asm_editor_store.model.observe(({value:e})=>{this.editor.updateOptions({readOnly:null==e}),this.editor.setModel(e||d)},{call_now:!0}),this.editor.onDidFocusEditorWidget(()=>r.asm_editor_store.undo.make_current())),this.finalize_construction(l.prototype)}focus(){this.editor.focus()}resize(e,t){const i=Math.max(0,t-this.tool_bar_view.height);return this.editor.layout({width:e,height:i}),this}}t.AsmEditorView=l},DixV:function(e,t,i){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=o(i("GGSb")),s=i("bcBH"),r=i("AU7j"),a=i("CUby"),d=i("JQxC"),l=i("lg9k"),_=i("ZPAt"),u=i("NRxM"),c=i("/Wax"),p=i("tjEv"),v=n.default.get("data_formats/parsing/quest/bin");class h{constructor(e,t,i,o,n,s,r){this.quest_id=e,this.language=t,this.quest_name=i,this.short_description=o,this.long_description=n,this.object_code=s,this.shop_items=r}}t.BinFile=h;const w=[];w[l.SegmentType.Instructions]=2,w[l.SegmentType.String]=1,w[l.SegmentType.Data]=0,t.parse_bin=function(e,t=[0],i=!1){const o=e.u32(),n=e.u32(),s=e.u32();e.seek(4);const d=e.u32(),u=e.u32(),c=e.string_utf16(64,!0,!0),p=e.string_utf16(256,!0,!0),w=e.string_utf16(576,!0,!0);s!==e.size&&v.warn(`Value ${s} in bin size field does not match actual size ${e.size}.`),e.seek(4);const g=e.u32_array(932),y=Math.floor((e.size-n)/4);e.seek_start(n);const b=e.i32_array(y),D=new f(b),P=function(e,t,i,o){const n=new Map;!function(e,t,i,o,n){let s;do{s=o.size;for(const[s,r]of i)m(o,t,e,s,r,n);const d=[...o.entries()].filter(([,e])=>e.type===l.SegmentType.Instructions).sort(([e],[t])=>e-t).map(([,e])=>e),u=r.ControlFlowGraph.create(d);i=new Map;for(const e of d)for(const t of e.instructions)for(let e=0;es)}(e,t,i.reduce((e,t)=>e.set(t,l.SegmentType.Instructions),new Map),n,o);const s=[];let d=0;for(;dd){s=e.offset;break}}if(e.seek_start(d),O(n,e,s,o||[]),i=n.get(d),s<=d){v.error(`Next offset ${s} was smaller than or equal to current offset ${d}.`);break}if(!i){v.error(`Couldn't create segment for offset ${d}.`);continue}}switch(s.push(i),i.type){case l.SegmentType.Instructions:for(const e of i.instructions)d+=e.size;break;case l.SegmentType.Data:d+=i.data.byteLength;break;case l.SegmentType.String:d+=4*Math.ceil((i.value.length+1)/2);break;default:throw new Error(`${l.SegmentType[i.type]} not implemented.`)}}for(const{label:e,offset:i}of t.labels){const t=n.get(i);t?t.labels.includes(e)||(t.labels.push(e),t.labels.sort((e,t)=>e-t)):v.warn(`Label ${e} with offset ${i} does not point to anything.`)}if(e.size!==d){const t=`Expected to parse ${e.size} bytes but parsed ${d} instead.`;if(!o)throw new Error(t);v.error(t)}return s}(e.seek_start(o).take(n-o),D,t,i);return new h(d,u,c,p,w,P,g)},t.write_bin=function(e){const t=new p.ResizableBuffer(4652+100*e.object_code.length),i=new c.ResizableBufferCursor(t,s.Endianness.Little);if(i.write_u32(4652),i.write_u32(0),i.write_u32(0),i.write_u32(4294967295),i.write_u32(e.quest_id),i.write_u32(e.language),i.write_string_utf16(e.quest_name,64),i.write_string_utf16(e.short_description,256),i.write_string_utf16(e.long_description,576),i.write_u32(0),e.shop_items.length>932)throw new Error(`shop_items can't be larger than 932, was ${e.shop_items.length}.`);i.write_u32_array(e.shop_items);for(let t=e.shop_items.length;t<932;t++)i.write_u32(0);for(;i.position<4652;)i.write_u8(0);const{size:o,label_offsets:n}=function(e,t){const i=e.position,o=[];for(const n of t){for(const t of n.labels)o[t]=e.position-i;if(n.type===l.SegmentType.Instructions)for(const t of n.instructions){const i=t.opcode;if(2===i.size&&e.write_u8(i.code>>>8),e.write_u8(255&i.code),i.stack!==_.StackInteraction.Pop)for(let o=0;o=0?e.write_u8(r.value):e.write_i8(r.value);break;case _.Kind.Word:r.value>=0?e.write_u16(r.value):e.write_i16(r.value);break;case _.Kind.DWord:r.value>=0?e.write_u32(r.value):e.write_i32(r.value);break;case _.Kind.Float:e.write_f32(r.value);break;case _.Kind.Label:case _.Kind.ILabel:case _.Kind.DLabel:case _.Kind.SLabel:e.write_u16(r.value);break;case _.Kind.String:e.write_string_utf16(r.value,r.size);break;case _.Kind.ILabelVar:e.write_u8(s.length),e.write_u16_array(s.map(e=>e.value));break;case _.Kind.RegRef:case _.Kind.RegTupRef:e.write_u8(r.value);break;case _.Kind.RegRefVar:e.write_u8(s.length),e.write_u8_array(s.map(e=>e.value));break;default:throw new Error(`Parameter type ${_.Kind[n.type.kind]} not implemented.`)}}}else if(n.type===l.SegmentType.String){const t=4*Math.ceil((n.value.length+1)/2);e.write_string_utf16(n.value,t)}else e.write_cursor(new u.ArrayBufferCursor(n.data,e.endianness))}return{size:e.position-i,label_offsets:o}}(i,e.object_code);for(let e=0;ee.offset-t.offset||e.label-t.label);for(let e=0;et.offset);e++)i=void 0;return{offset:t.offset,next:i}}}function E(e,t,i,o,n){if(i.opcode.stack===_.StackInteraction.Pop){const s=d.stack_value(e,i,i.opcode.params.length-o-1);if(s.size()<=10)for(const e of s){const i=t.get(e);(null==i||w[n]>w[i])&&t.set(e,n)}}else{const e=i.args[o].value,s=t.get(e);(null==s||w[n]>w[s])&&t.set(e,n)}}function m(e,t,i,o,n,s){try{const r=t.get_info(o);if(null==r)return void v.warn(`Label ${o} is not registered in the label table.`);let a,d=e.get(r.offset);if(d){if(d.labels.includes(o)||(d.labels.push(o),d.labels.sort((e,t)=>e-t)),!(w[n]>w[d.type]))return;a=d.labels}else a=[o];const u=r.next?r.next.offset:i.size;switch(i.seek_start(r.offset),n){case l.SegmentType.Instructions:!function(e,t,i,o,n,s,r){const a=[],d={type:l.SegmentType.Instructions,labels:n,instructions:a};e.set(i.position,d);for(;i.position=0;e--){const t=a[e].opcode;if(t===_.Opcode.RET||t===_.Opcode.JMP){o=!1;break}}o&&m(e,t,i,s,l.SegmentType.Instructions,r)}}(e,t,i,u,a,r.next&&r.next.label,s);break;case l.SegmentType.Data:O(e,i,u,a);break;case l.SegmentType.String:!function(e,t,i,o){const n=t.position,s={type:l.SegmentType.String,labels:o,value:t.string_utf16(i-n,!0,!0)};e.set(n,s)}(e,i,u,a);break;default:throw new Error(`Segment type ${l.SegmentType[n]} not implemented.`)}}catch(e){if(!s)throw e;v.error("Couldn't fully parse object code segment.",e)}}function O(e,t,i,o){const n=t.position,s={type:l.SegmentType.Data,labels:o,data:t.array_buffer(i-n)};e.set(n,s)}function g(e,t){const i=[];if(t.stack!==_.StackInteraction.Pop)for(const o of t.params)switch(o.type.kind){case _.Kind.Byte:i.push({value:e.u8(),size:1});break;case _.Kind.Word:i.push({value:e.u16(),size:2});break;case _.Kind.DWord:i.push({value:e.i32(),size:4});break;case _.Kind.Float:i.push({value:e.f32(),size:4});break;case _.Kind.Label:case _.Kind.ILabel:case _.Kind.DLabel:case _.Kind.SLabel:i.push({value:e.u16(),size:2});break;case _.Kind.String:{const t=e.position;i.push({value:e.string_utf16(Math.min(4096,e.bytes_left),!0,!1),size:e.position-t})}break;case _.Kind.ILabelVar:{const t=e.u8();i.push(...e.u16_array(t).map(e=>({value:e,size:2})))}break;case _.Kind.RegRef:case _.Kind.RegTupRef:i.push({value:e.u8(),size:1});break;case _.Kind.RegRefVar:{const t=e.u8();i.push(...e.u8_array(t).map(e=>({value:e,size:1})))}break;default:throw new Error(`Parameter type ${_.Kind[o.type.kind]} not implemented.`)}return i}},DuVK:function(e,t,i){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=o(i("GGSb")),s=i("LvDl"),r=i("bcBH"),a=i("/Wax"),d=i("tjEv"),l=n.default.get("data_formats/parsing/quest/dat"),_=68,u=72;t.parse_dat=function(e){const t=[],i=[],o=[];for(;e.bytes_left;){const n=e.u32(),s=e.u32(),r=e.u32(),a=e.u32();if(0===n)break;if(a!==s-16)throw Error(`Malformed DAT file. Expected an entities size of ${s-16}, got ${a}.`);if(1===n){const i=Math.floor(a/_),o=e.position;for(let o=0;oe+t.total_size,0)),n=new a.ResizableBufferCursor(o,r.Endianness.Little),l=s.groupBy(e,e=>e.area_id),c=Object.keys(l).map(e=>parseInt(e,10)).sort((e,t)=>e-t);for(const e of c){const t=l[e],i=t.length*_;n.write_u32(1),n.write_u32(i+16),n.write_u32(e),n.write_u32(i);for(const e of t){if(2!==e.unknown.length)throw new Error(`unknown should be of length 2, was ${e.unknown.length}`);if(n.write_u16(e.type_id),6!==e.unknown[0].length)throw new Error(`unknown[0] should be of length 6, was ${e.unknown[0].length}`);if(n.write_u8_array(e.unknown[0]),n.write_u16(e.id),n.write_u16(e.group_id),n.write_u16(e.section_id),2!==e.unknown[1].length)throw new Error(`unknown[1] should be of length 2, was ${e.unknown[1].length}`);if(n.write_u8_array(e.unknown[1]),n.write_vec3_f32(e.position),n.write_i32(Math.round(e.rotation.x/(2*Math.PI)*65535)),n.write_i32(Math.round(e.rotation.y/(2*Math.PI)*65535)),n.write_i32(Math.round(e.rotation.z/(2*Math.PI)*65535)),7!==e.properties.length)throw new Error(`properties should be of length 7, was ${e.properties.length}`);n.write_f32(e.properties[0]),n.write_f32(e.properties[1]),n.write_f32(e.properties[2]),n.write_u32(e.properties[3]),n.write_u32(e.properties[4]),n.write_u32(e.properties[5]),n.write_u32(e.properties[6])}}const p=s.groupBy(t,e=>e.area_id),v=Object.keys(p).map(e=>parseInt(e,10)).sort((e,t)=>e-t);for(const e of v){const t=p[e],i=t.length*u;n.write_u32(2),n.write_u32(i+16),n.write_u32(e),n.write_u32(i);for(const e of t){if(3!==e.unknown.length)throw new Error(`unknown should be of length 3, was ${e.unknown.length}`);if(n.write_u16(e.type_id),10!==e.unknown[0].length)throw new Error(`unknown[0] should be of length 10, was ${e.unknown[0].length}`);if(n.write_u8_array(e.unknown[0]),n.write_u16(e.section_id),6!==e.unknown[1].length)throw new Error(`unknown[1] should be of length 6, was ${e.unknown[1].length}`);if(n.write_u8_array(e.unknown[1]),n.write_vec3_f32(e.position),n.write_i32(Math.round(e.rotation.x/(2*Math.PI)*65535)),n.write_i32(Math.round(e.rotation.y/(2*Math.PI)*65535)),n.write_i32(Math.round(e.rotation.z/(2*Math.PI)*65535)),n.write_vec3_f32(e.scale),n.write_f32(e.npc_id),n.write_f32(e.script_label),n.write_u32(e.roaming),4!==e.unknown[2].length)throw new Error(`unknown[2] should be of length 4, was ${e.unknown[2].length}`);n.write_u8_array(e.unknown[2])}}for(const e of i)n.write_u32(e.entity_type),n.write_u32(e.total_size),n.write_u32(e.area_id),n.write_u32(e.entities_size),n.write_u8_array(e.data);return n.write_u32(0),n.write_u32(0),n.write_u32(0),n.write_u32(0),o}},"E/0a":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("0Xme");class n extends o.Input{constructor(e="",t){if(super(e,"core_TextInput","text","core_TextInput_inner",t),this.preferred_label_position="left",t){const{max_length:e}=t;this.set_attr("maxLength",e)}this.set_value(e),this.finalize_construction(n.prototype)}get_value(){return this.input_element.value}set_value(e){this.input_element.value=e}}t.TextInput=n},ETgL:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("sDu+"),n=i("FXpb");i("C5oP");const s=i("4VsB");class r extends o.LabelledControl{constructor(e="",t){super(t),this.element=n.el.div({class:"core_TextArea"}),this.preferred_label_position="left",this.text_element=n.el.textarea({class:"core_TextArea_inner"}),this._value=new s.WidgetProperty(this,"",this.set_value),t&&(null!=t.max_length&&(this.text_element.maxLength=t.max_length),null!=t.font_family&&(this.text_element.style.fontFamily=t.font_family),null!=t.rows&&(this.text_element.rows=t.rows),null!=t.cols&&(this.text_element.cols=t.cols)),this.value=this._value,this.set_value(e),this.text_element.onchange=()=>this._value.set_val(this.text_element.value,{silent:!1}),this.element.append(this.text_element),this.finalize_construction(r.prototype)}set_value(e){this.text_element.value=e}}t.TextArea=r},Eqai:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("Womt"),n=new o.MeshLambertMaterial({color:65280,side:o.DoubleSide}),s=new o.MeshLambertMaterial({color:16711935,side:o.DoubleSide}),r=new o.MeshLambertMaterial({skinning:!0,color:16711935,side:o.DoubleSide});function a(e,t,i,s){const{created_by_geometry_builder:r,normalized_material_indices:a,bones:d}=e.userData;let l;if(Array.isArray(t))if(r){l=[n];for(const[e,o]of a.entries())o>0&&(l[o]=t[e]||i)}else l=t;else l=t||i;const _=new s(e,l);return r&&d.length&&_ instanceof o.SkinnedMesh&&(_.add(d[0]),_.bind(new o.Skeleton(d))),_}t.create_mesh=function(e,t,i=s){return a(e,t,i,o.Mesh)},t.create_skinned_mesh=function(e,t,i=r){return a(e,t,i,o.SkinnedMesh)}},F0Xh:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("FXpb"),n=i("nN8q");i("bknw");class s extends n.ResizableWidget{constructor(){super(),this.element=o.el.div({class:"hunt_optimizer_HelpView"},o.el.p({text:"Add some items with the combo box on the left to see the optimal combination of hunt methods on the right."}),o.el.p({text:'At the moment a hunt method is simply a quest run-through. Partial quest run-throughs are coming. View the list of methods on the "Methods" tab. Each method takes a certain amount of time, which affects the optimization result. Make sure the times are correct for you.'}),o.el.p({text:"Only enemy drops are considered. Box drops are coming."}),o.el.p({text:"The optimal result is calculated using linear optimization. The optimizer takes into account rare enemies and the fact that pan arms can be split in two."})),this.finalize_construction(s.prototype)}}t.HelpView=s},FNQV:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("nN8q"),n=i("FXpb"),s=i("If1w");i("l8iQ");const r=i("WJtm");class a extends o.ResizableWidget{constructor(){super(),this.element=n.el.div({class:"hunt_optimizer_OptimizerView"}),this.element.append(this.disposable(new s.WantedItemsView).element,this.disposable(new r.OptimizationResultView).element),this.finalize_construction(a.prototype)}}t.OptimizerView=a},FXpb:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("jJhE"),n=i("nsCy"),s=i("oxtq"),r=i("Tpfs");function a(e,t,...i){const o=document.createElement(e);if(t){if(null!=t.class&&(o.className=t.class),null!=t.text&&(o.textContent=t.text),null!=t.title&&(o.title=t.title),null!=t.href&&(o.href=t.href),null!=t.src&&(o.src=t.src),null!=t.width&&(o.width=t.width),null!=t.height&&(o.height=t.height),null!=t.alt&&(o.alt=t.alt),t.data)for(const[e,i]of Object.entries(t.data))o.dataset[e]=i;null!=t.col_span&&(o.colSpan=t.col_span),null!=t.tab_index&&(o.tabIndex=t.tab_index)}return o.append(...i),o}var d;t.el={div:(e,...t)=>a("div",e,...t),span:(e,...t)=>a("span",e,...t),h2:(e,...t)=>a("h2",e,...t),p:(e,...t)=>a("p",e,...t),a:(e,...t)=>{const i=a("a",e,...t);return e&&e.href&&e.href.trimLeft().startsWith("http")&&(i.target="_blank",i.rel="noopener noreferrer"),i},img:(e,...t)=>a("img",e,...t),table:(e,...t)=>a("table",e,...t),thead:(e,...t)=>a("thead",e,...t),tbody:(e,...t)=>a("tbody",e,...t),tfoot:(e,...t)=>a("tfoot",e,...t),tr:(e,...t)=>a("tr",e,...t),th:(e,...t)=>a("th",e,...t),td:(e,...t)=>a("td",e,...t),button:(e,...t)=>a("button",e,...t),textarea:(e,...t)=>a("textarea",e,...t)},t.create_element=a,t.bind_hidden=function(e,t){return o.is_property(t)&&(e.hidden=t.val),t.observe(({value:t})=>e.hidden=t)},function(e){e[e.File=0]="File",e[e.NewFile=1]="NewFile",e[e.Save=2]="Save",e[e.TriangleUp=3]="TriangleUp",e[e.TriangleDown=4]="TriangleDown",e[e.Undo=5]="Undo",e[e.Redo=6]="Redo",e[e.Remove=7]="Remove",e[e.GitHub=8]="GitHub"}(d=t.Icon||(t.Icon={})),t.icon=function(e){let i;switch(e){case d.File:i="fas fa-file";break;case d.NewFile:i="fas fa-file-medical";break;case d.Save:i="fas fa-save";break;case d.TriangleUp:i="fas fa-caret-up";break;case d.TriangleDown:i="fas fa-caret-down";break;case d.Undo:i="fas fa-undo";break;case d.Redo:i="fas fa-redo";break;case d.Remove:i="fas fa-trash-alt";break;case d.GitHub:i="fab fa-github"}return t.el.span({class:i})},t.section_id_icon=function(e,i){const o=t.el.span(),s=i&&i.size;return o.style.display="inline-block",o.style.width=`${s}px`,o.style.height=`${s}px`,o.style.backgroundImage=`url(/assets/images/sectionids/${n.SectionId[e]}.png)`,o.style.backgroundSize=`${s}px`,o.title=n.SectionId[e],o},t.disposable_listener=function(e,t,i,o){return e.addEventListener(t,i,o),{dispose(){e.removeEventListener(t,i)}}},t.bind_children_to=function(e,t,i){const o=new r.Disposer,n=t.observe_list(e=>{e.type===s.ListChangeType.ListChange?a(e.index,e.removed.length,e.inserted):(e.type,s.ListChangeType.ValueChange)});function a(t,n,s){for(let i=0;i{const s=i(e,t+n);return Array.isArray(s)?(o.insert(t+n,s[1]),s[0]):s});if(t>=e.childElementCount)e.append(...r);else for(let i=0;i{this.render_scheduled=!0},this.on_mouse_down=e=>{e.currentTarget&&e.currentTarget.focus()},this.call_render=()=>{const e=this.controls.update(this.controls_clock.getDelta()),t=this.render_scheduled||e;this.render_scheduled=!1,t&&this.render(),this.animation_frame_handle=requestAnimationFrame(this.call_render)},this.dom_element.tabIndex=0,this.dom_element.addEventListener("mousedown",this.on_mouse_down),this.dom_element.style.outline="none",this.scene.background=new a.Color(1579032),this.light_holder.add(this.light),this.scene.add(this.light_holder),this.renderer.setPixelRatio(window.devicePixelRatio),this.renderer.getSize(this.size)}get debug(){return this._debug}set debug(e){this._debug=e}get dom_element(){return this.renderer.domElement}set_size(e,t){this.size.set(e,t),this.renderer.setSize(e,t),this.schedule_render()}pointer_pos_to_device_coords(e){e.set(e.x/this.size.width*2-1,e.y/this.size.height*-2+1)}start_rendering(){this.schedule_render(),this.animation_frame_handle=requestAnimationFrame(this.call_render)}stop_rendering(){null!=this.animation_frame_handle&&(cancelAnimationFrame(this.animation_frame_handle),this.animation_frame_handle=void 0)}reset_camera(e,t){this.controls.setLookAt(e.x,e.y,e.z,t.x,t.y,t.z)}dispose(){this.renderer.dispose(),this.controls.dispose()}init_camera_controls(){this.controls=new s.default(this.camera,this.renderer.domElement),this.controls.dampingFactor=1,this.controls.draggingDampingFactor=1}render(){this.renderer.render(this.scene,this.camera)}}},"G+UN":function(e,t,i){"use strict";var o=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))((function(n,s){function r(e){try{d(o.next(e))}catch(e){s(e)}}function a(e){try{d(o.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}d((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const n=i("x4QM"),s=i("6WXA"),r=i("nsCy");class a{constructor(e,t){this.id_to_item_type=t,this.get_by_id=e=>this.id_to_item_type[e],this.item_types=e}}t.ItemTypeStore=a,t.item_type_stores=new s.ServerMap((function(e){return o(this,void 0,void 0,(function*(){const t=yield fetch(`/assets/itemTypes.${r.Server[e].toLowerCase()}.json`),i=yield t.json(),o=[],s=[];for(const e of i){let t;switch(e.class){case"weapon":t=new n.WeaponItemType(e.id,e.name,e.minAtp,e.maxAtp,e.ata,e.maxGrind,e.requiredAtp);break;case"armor":t=new n.ArmorItemType(e.id,e.name,e.atp,e.ata,e.minEvp,e.maxEvp,e.minDfp,e.maxDfp,e.mst,e.hp,e.lck);break;case"shield":t=new n.ShieldItemType(e.id,e.name,e.atp,e.ata,e.minEvp,e.maxEvp,e.minDfp,e.maxDfp,e.mst,e.hp,e.lck);break;case"unit":t=new n.UnitItemType(e.id,e.name);break;case"tool":t=new n.ToolItemType(e.id,e.name);break;default:continue}s[t.id]=t,o.push(t)}return new a(o,s)}))}))},GN66:function(e,t,i){"use strict";var o=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))((function(n,s){function r(e){try{d(o.next(e))}catch(e){s(e)}}function a(e){try{d(o.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}d((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const n=i("HjM1"),s=i("xs7i"),r=i("j4Ss");class a extends n.TabContainer{constructor(){super({class:"hunt_optimizer_MethodsView",tabs:[{title:"Episode I",key:"episode_1",create_view:function(){return o(this,void 0,void 0,(function*(){return new r.MethodsForEpisodeView(s.Episode.I)}))}},{title:"Episode II",key:"episode_2",create_view:function(){return o(this,void 0,void 0,(function*(){return new r.MethodsForEpisodeView(s.Episode.II)}))}},{title:"Episode IV",key:"episode_4",create_view:function(){return o(this,void 0,void 0,(function*(){return new r.MethodsForEpisodeView(s.Episode.IV)}))}}]}),this.finalize_construction(a.prototype)}}t.MethodsView=a},GXOi:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("/Wax"),n=i("tjEv");t.prs_compress=function(e){const t=new s(e.size,e.endianness);for(;e.bytes_left;){let i=0,o=0;const n=Math.max(0,e.position-Math.min(2048,e.bytes_left));for(let t=e.position-255;t>=n;t--){let n=e.position,s=t,r=0;for(;n+3=o&&(i=t,o=r,r>=255))break}o<3?t.add_u8(e.u8()):(t.copy(i-e.position,o),e.seek(o))}return t.finalize()};class s{constructor(e,t){this.flags=0,this.flag_bits_left=0,this.flag_offset=0,this.output=new o.ResizableBufferCursor(new n.ResizableBuffer(e),t)}add_u8(e){this.write_control_bit(1),this.write_u8(e)}copy(e,t){e>-256&&t<=5?this.short_copy(e,t):this.long_copy(e,t)}finalize(){this.write_control_bit(0),this.write_control_bit(1),this.flags>>>=this.flag_bits_left;const e=this.output.position;return this.output.seek_start(this.flag_offset).write_u8(this.flags).seek_start(e),this.write_u8(0),this.write_u8(0),this.output.seek_start(0)}write_control_bit(e){if(0==this.flag_bits_left--){const e=this.output.position;this.output.seek_start(this.flag_offset).write_u8(this.flags).seek_start(e).write_u8(0),this.flag_offset=e,this.flag_bits_left=7}this.flags>>>=1,e&&(this.flags|=128)}write_u8(e){this.output.write_u8(e)}short_copy(e,t){t-=2,this.write_control_bit(0),this.write_control_bit(0),this.write_control_bit(t>>>1&1),this.write_control_bit(1&t),this.write_u8(255&e)}long_copy(e,t){t<=9?(this.write_control_bit(0),this.write_control_bit(1),this.write_u8(e<<3&248|t-2&7),this.write_u8(e>>5&255)):(this.write_control_bit(0),this.write_control_bit(1),this.write_u8(e<<3&248),this.write_u8(e>>5&255),this.write_u8(t-1))}}},Gc0Z:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("Womt"),n=i("c5EP"),s=i("xpi7"),r=i("IjTL"),a=i("Tpfs"),d=i("yQqj"),l=i("sZ1+"),_=i("3ONQ"),u=i("uaZj"),c=Object.freeze(new o.Vector3(0,0,0)),p=Object.freeze(new o.Vector3(0,1,0)),v=Object.freeze(new o.Vector3(0,-1,0)),h=2*Math.PI,w=new o.Raycaster;var f;t.QuestEntityControls=class{constructor(e){this.renderer=e,this.disposer=new a.Disposer,this.pointer_position=new o.Vector2(0,0),this.pointer_device_position=new o.Vector2(0,0),this.last_pointer_position=new o.Vector2(0,0),this.moved_since_last_pointer_down=!1,this.dispose=()=>{this.renderer.dom_element.removeEventListener("keydown",this.keydown),this.renderer.dom_element.removeEventListener("mousedown",this.mousedown),this.renderer.dom_element.removeEventListener("mousemove",this.mousemove),document.removeEventListener("mousemove",this.mousemove),document.removeEventListener("mouseup",this.mouseup),_.remove_entity_dnd_listener(this.renderer.dom_element,"dragenter",this.dragenter),_.remove_entity_dnd_listener(this.renderer.dom_element,"dragover",this.dragover),_.remove_entity_dnd_listener(this.renderer.dom_element,"dragleave",this.dragleave),_.remove_entity_dnd_listener(this.renderer.dom_element,"drop",this.drop),this.disposer.dispose()},this.mark_selected=e=>{e===this.hovered_mesh&&(this.hovered_mesh=void 0),e!==this.selected_mesh&&(this.selected_mesh&&y(this.selected_mesh,s.ColorType.Normal),y(e,s.ColorType.Selected),this.renderer.schedule_render()),this.selected_mesh=e},this.selected_entity_changed=({value:e})=>{if(this.state.cancel(),e){const t=this.renderer.get_entity_mesh(e);t?this.mark_selected(t):this.unmark_selected()}else this.unmark_selected()},this.keydown=e=>{this.state=this.state.process_event({type:f.KeyDown,key:e.key})},this.mousedown=e=>{this.process_mouse_event(e),this.state=this.state.process_event({type:f.MouseDown,buttons:e.buttons,shift_key:e.shiftKey,pointer_device_position:this.pointer_device_position,moved_since_last_pointer_down:this.moved_since_last_pointer_down,mark_hovered:this.mark_hovered}),this.renderer.dom_element.removeEventListener("mousemove",this.mousemove),document.addEventListener("mousemove",this.mousemove),document.addEventListener("mouseup",this.mouseup)},this.mousemove=e=>{this.process_mouse_event(e),this.state=this.state.process_event({type:f.MouseMove,buttons:e.buttons,shift_key:e.shiftKey,pointer_device_position:this.pointer_device_position,moved_since_last_pointer_down:this.moved_since_last_pointer_down,mark_hovered:this.mark_hovered})},this.mouseup=e=>{this.process_mouse_event(e),this.state=this.state.process_event({type:f.MouseUp,buttons:e.buttons,shift_key:e.shiftKey,pointer_device_position:this.pointer_device_position,moved_since_last_pointer_down:this.moved_since_last_pointer_down,mark_hovered:this.mark_hovered}),this.renderer.dom_element.addEventListener("mousemove",this.mousemove),document.removeEventListener("mousemove",this.mousemove),document.removeEventListener("mouseup",this.mouseup)},this.dragenter=e=>{this.process_mouse_event(e.event),this.state=this.state.process_event({type:f.EntityDragEnter,shift_key:e.event.shiftKey,pointer_device_position:this.pointer_device_position,entity_type:e.entity_type,drag_element:e.drag_element,data_transfer:e.event.dataTransfer,prevent_default:()=>e.event.preventDefault(),stop_propagation:()=>e.event.stopPropagation()})},this.dragover=e=>{this.process_mouse_event(e.event),this.state=this.state.process_event({type:f.EntityDragOver,shift_key:e.event.shiftKey,pointer_device_position:this.pointer_device_position,entity_type:e.entity_type,drag_element:e.drag_element,data_transfer:e.event.dataTransfer,prevent_default:()=>e.event.preventDefault(),stop_propagation:()=>e.event.stopPropagation()})},this.dragleave=e=>{this.process_mouse_event(e.event),this.state=this.state.process_event({type:f.EntityDragLeave,shift_key:e.event.shiftKey,pointer_device_position:this.pointer_device_position,entity_type:e.entity_type,drag_element:e.drag_element,data_transfer:e.event.dataTransfer,prevent_default:()=>e.event.preventDefault(),stop_propagation:()=>e.event.stopPropagation()})},this.drop=e=>{this.process_mouse_event(e.event),this.state=this.state.process_event({type:f.EntityDrop})},this.mark_hovered=e=>{this.selected_mesh&&e===this.selected_mesh||(e!==this.hovered_mesh&&(this.hovered_mesh&&y(this.hovered_mesh,s.ColorType.Normal),e&&y(e,s.ColorType.Hovered),this.renderer.schedule_render()),this.hovered_mesh=e)},this.disposer.add(n.quest_editor_store.selected_entity.observe(this.selected_entity_changed)),e.dom_element.addEventListener("keydown",this.keydown),e.dom_element.addEventListener("mousedown",this.mousedown),e.dom_element.addEventListener("mousemove",this.mousemove),_.add_entity_dnd_listener(e.dom_element,"dragenter",this.dragenter),_.add_entity_dnd_listener(e.dom_element,"dragover",this.dragover),_.add_entity_dnd_listener(e.dom_element,"dragleave",this.dragleave),_.add_entity_dnd_listener(e.dom_element,"drop",this.drop),this.state=new E(e)}process_mouse_event(e){const{left:t,top:i}=this.renderer.dom_element.getBoundingClientRect();this.pointer_position.set(e.clientX-t,e.clientY-i),this.pointer_device_position.copy(this.pointer_position),this.renderer.pointer_pos_to_device_coords(this.pointer_device_position),"mousedown"===e.type?this.moved_since_last_pointer_down=!1:"mousemove"!==e.type&&"mouseup"!==e.type||this.pointer_position.equals(this.last_pointer_position)||(this.moved_since_last_pointer_down=!0),this.last_pointer_position.copy(this.pointer_position)}unmark_selected(){this.selected_mesh&&(y(this.selected_mesh,s.ColorType.Normal),this.renderer.schedule_render()),this.selected_mesh=void 0}},function(e){e[e.KeyDown=0]="KeyDown",e[e.MouseDown=1]="MouseDown",e[e.MouseMove=2]="MouseMove",e[e.MouseUp=3]="MouseUp",e[e.EntityDragEnter=4]="EntityDragEnter",e[e.EntityDragOver=5]="EntityDragOver",e[e.EntityDragLeave=6]="EntityDragLeave",e[e.EntityDrop=7]="EntityDrop"}(f||(f={}));class E{constructor(e){this.renderer=e}process_event(e){switch(e.type){case f.KeyDown:{const t=n.quest_editor_store.selected_entity.val;return t&&"Delete"===e.key&&n.quest_editor_store.remove_entity(t),this}case f.MouseDown:{const t=this.pick_entity(e.pointer_device_position);if(t){if(1===e.buttons)return n.quest_editor_store.set_selected_entity(t.entity),new m(this.renderer,t.entity,t.drag_adjust,t.grab_offset);if(2===e.buttons)return n.quest_editor_store.set_selected_entity(t.entity),new O(this.renderer,t.entity,t.mesh,t.grab_offset)}return this}case f.MouseMove:{const t=this.pick_entity(e.pointer_device_position);return e.mark_hovered(t&&t.mesh),this}case f.MouseUp:return e.moved_since_last_pointer_down||n.quest_editor_store.set_selected_entity(void 0),this;case f.EntityDragEnter:{const t=n.quest_editor_store.current_area.val,i=n.quest_editor_store.current_quest.val;return t&&i?new g(this.renderer,e,i,t):this}default:return this}}cancel(){}pick_entity(e){w.setFromCamera(e,this.renderer.camera);const[t]=w.intersectObjects(this.renderer.entity_models.children);if(!t)return;const i=t.object.userData.entity,o=t.object.position.clone().sub(t.point),n=o.clone();w.set(t.object.position,v);const[s]=w.intersectObjects(this.renderer.collision_geometry.children,!0);return s&&(n.y-=s.distance),{mesh:t.object,entity:i,grab_offset:o,drag_adjust:n}}}class m{constructor(e,t,i,o){this.renderer=e,this.entity=t,this.drag_adjust=i,this.grab_offset=o,this.cancelled=!1,this.initial_section=t.section.val,this.initial_position=t.world_position.val,this.renderer.controls.enabled=!1}process_event(e){switch(e.type){case f.MouseMove:return this.cancelled?new E(this.renderer):(e.moved_since_last_pointer_down&&b(this.renderer,this.entity,this.drag_adjust,this.grab_offset,e.pointer_device_position,e.shift_key),this);case f.MouseUp:return this.renderer.controls.enabled=!0,!this.cancelled&&e.moved_since_last_pointer_down&&n.quest_editor_store.translate_entity(this.entity,this.initial_section,this.entity.section.val,this.initial_position,this.entity.world_position.val,!0),new E(this.renderer);default:return this.cancelled?new E(this.renderer):this}}cancel(){this.cancelled=!0,this.renderer.controls.enabled=!0,this.initial_section&&this.entity.set_section(this.initial_section),this.entity.set_world_position(this.initial_position)}}class O{constructor(e,t,i,o){this.renderer=e,this.entity=t,this.mesh=i,this.cancelled=!1,this.initial_rotation=t.world_rotation.val,this.grab_point=t.world_position.val.clone().sub(o),this.renderer.controls.enabled=!1}process_event(e){switch(e.type){case f.MouseMove:return this.cancelled?new E(this.renderer):(e.moved_since_last_pointer_down&&T(this.renderer,this.entity,this.mesh.quaternion,this.initial_rotation,this.grab_point,e.pointer_device_position),this);case f.MouseUp:return this.renderer.controls.enabled=!0,!this.cancelled&&e.moved_since_last_pointer_down&&n.quest_editor_store.rotate_entity(this.entity,this.initial_rotation,this.entity.world_rotation.val,!0),new E(this.renderer);default:return this.cancelled?new E(this.renderer):this}}cancel(){this.cancelled=!0,this.renderer.controls.enabled=!0,this.entity.set_world_rotation(this.initial_rotation)}}class g{constructor(e,t,i,s){if(this.drag_adjust=new o.Vector3(0,0,0),this.cancelled=!1,this.renderer=e,t.drag_element.style.display="none",t.data_transfer&&(t.data_transfer.dropEffect="copy"),d.is_npc_type(t.entity_type)){const e=l.npc_data(t.entity_type);this.entity=new r.QuestNpcModel(t.entity_type,e.pso_type_id,0,0,e.pso_roaming,s.id,0,new o.Vector3(0,0,0),new o.Euler(0,0,0,"ZXY"),new o.Vector3(1,1,1),[[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0],[0,0,0,0]])}else this.entity=new u.QuestObjectModel(t.entity_type,0,0,s.id,0,new o.Vector3(0,0,0),new o.Euler(0,0,0,"ZXY"),new Map,[[0,0,0,0,0,0],[0,0]]);D(this.renderer,this.entity,this.drag_adjust,c,t.pointer_device_position),i.add_entity(this.entity),n.quest_editor_store.set_selected_entity(this.entity)}process_event(e){switch(e.type){case f.EntityDragOver:return this.cancelled?(e.drag_element.style.display="flex",e.data_transfer&&(e.data_transfer.dropEffect="none"),new E(this.renderer)):(e.stop_propagation(),e.prevent_default(),e.data_transfer&&(e.data_transfer.dropEffect="copy"),b(this.renderer,this.entity,this.drag_adjust,c,e.pointer_device_position,e.shift_key),this);case f.EntityDragLeave:{e.drag_element.style.display="flex";const t=n.quest_editor_store.current_quest.val;return t&&t.remove_entity(this.entity),new E(this.renderer)}case f.EntityDrop:return this.cancelled||n.quest_editor_store.push_create_entity_action(this.entity),new E(this.renderer);default:return this}}cancel(){this.cancelled=!0;const e=n.quest_editor_store.current_quest.val;e&&e.remove_entity(this.entity)}}function y(e,t){const i=e.userData.entity instanceof r.QuestNpcModel?s.NPC_COLORS[t]:s.OBJECT_COLORS[t];if(e)if(Array.isArray(e.material))for(const o of e.material)t===s.ColorType.Normal&&o.map?o.color.set(16777215):o.color.set(i);else e.material.color.set(i)}function b(e,t,i,o,n,s){s?P(e,t,i,o,n):D(e,t,i,o,n)}const D=(()=>{const e=new o.Plane,t=new o.Vector3;return(i,n,s,r,a)=>{const{intersection:d,section:l}=function(e,t,i){w.setFromCamera(t,e.camera),w.ray.origin.add(i);const o=w.intersectObjects(e.collision_geometry.children,!0);for(const e of o)if(e.face.normal.y>.75)return{intersection:e,section:e.object.userData.section};return{}}(i,a,s);d?(n.set_world_position(new o.Vector3(d.point.x,d.point.y+r.y-s.y,d.point.z)),l&&n.set_section(l)):(w.setFromCamera(a,i.camera),e.set(p,-n.world_position.val.y+r.y),w.ray.intersectPlane(e,t)&&n.set_world_position(new o.Vector3(t.x+r.x,n.world_position.val.y,t.z+r.z)))}})(),P=(()=>{const e=new o.Vector3,t=new o.Plane,i=new o.Vector3,n=new o.Vector3;return(s,r,a,d,l)=>{if(w.setFromCamera(l,s.camera),s.camera.getWorldDirection(e),e.negate(),e.y=0,e.normalize(),n.set(r.world_position.val.x,r.world_position.val.y,r.world_position.val.z),n.sub(d),t.setFromNormalAndCoplanarPoint(e,n),w.ray.intersectPlane(t,i)){const e=i.y+d.y,t=e-r.world_position.val.y;a.y-=t,r.set_world_position(new o.Vector3(r.world_position.val.x,e,r.world_position.val.z))}}})(),T=(()=>{const e=new o.Vector3,t=new o.Plane,i=new o.Vector3,n=new o.Vector3,s=new o.Vector3,r=new o.Vector3;return(a,d,l,_,u,c)=>{if(e.copy(p),e.applyQuaternion(l),t.setFromNormalAndCoplanarPoint(e,u),w.setFromCamera(c,a.camera),w.ray.intersectPlane(t,i)){t.projectPoint(d.world_position.val,n),s.subVectors(n,u),r.subVectors(n,i);const a=s.dot(r),l=e.dot(s.cross(r)),c=Math.atan2(l,a);d.set_world_rotation(new o.Euler(_.x,(_.y+c)%h,_.z,"ZXY"))}}})()},GuD3:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("bcBH");t.AbstractCursor=class{constructor(e,t){this._position=0,this.endianness=e,this.offset=t}get position(){return this._position}get endianness(){return this.little_endian?o.Endianness.Little:o.Endianness.Big}set endianness(e){this.little_endian=e===o.Endianness.Little}get bytes_left(){return this.size-this.position}seek(e){return this.seek_start(this.position+e)}seek_start(e){if(e<0||e>this.size)throw new Error(`Offset ${e} is out of bounds.`);return this._position=e,this}seek_end(e){if(e<0||e>this.size)throw new Error(`Offset ${e} is out of bounds.`);return this._position=this.size-e,this}u8(){return this.u8_at(this._position++)}u8_at(e){return this.check_offset(e,1),this.dv.getUint8(this.offset+e)}u16(){const e=this.u16_at(this.position);return this._position+=2,e}u16_at(e){return this.check_offset(e,2),this.dv.getUint16(this.offset+e,this.little_endian)}u32(){const e=this.u32_at(this.position);return this._position+=4,e}u32_at(e){return this.check_offset(e,4),this.dv.getUint32(this.offset+e,this.little_endian)}i8(){return this.i8_at(this._position++)}i8_at(e){return this.check_offset(e,1),this.dv.getInt8(this.offset+e)}i16(){const e=this.i16_at(this.position);return this._position+=2,e}i16_at(e){return this.check_offset(e,2),this.dv.getInt16(this.offset+e,this.little_endian)}i32(){const e=this.i32_at(this.position);return this._position+=4,e}i32_at(e){return this.check_offset(e,4),this.dv.getInt32(this.offset+e,this.little_endian)}f32(){const e=this.f32_at(this.position);return this._position+=4,e}f32_at(e){return this.check_offset(e,4),this.dv.getFloat32(this.offset+e,this.little_endian)}u8_array(e){this.check_size("n",e,e);const t=[];for(let i=0;ithis.size-this.position)throw new Error(`${e} ${t} is out of bounds.`)}check_offset(e,t){if(e<0||e+t>this.size)throw new Error(`Offset ${e} is out of bounds.`)}}},Hdaq:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("FXpb"),n=i("nN8q");i("m5WL");const s=i("4SjJ"),r=i("KUR2"),a=i("tyuj"),d=i("lHpu"),l=i("VRtl"),_=i("Y3Jw"),u=100,c=140;class p extends n.ResizableWidget{constructor(){super(),this.element=o.el.div({class:"viewer_Model3DView"}),this.tool_bar_view=this.disposable(new l.Model3DToolBar),this.model_list_view=this.disposable(new _.Model3DSelectListView(a.model_store.models,a.model_store.current_model)),this.animation_list_view=this.disposable(new _.Model3DSelectListView(a.model_store.animations,a.model_store.current_animation)),this.renderer_view=this.disposable(new r.RendererWidget(new d.Model3DRenderer)),this.animation_list_view.borders=!0,this.element.append(this.tool_bar_view.element,o.el.div({class:"viewer_Model3DView_container"},this.model_list_view.element,this.animation_list_view.element,this.renderer_view.element)),a.model_store.current_model.val=a.model_store.models[5],this.renderer_view.start_rendering(),this.disposable(s.gui_store.tool.observe(({value:e})=>{e===s.GuiTool.Viewer?this.renderer_view.start_rendering():this.renderer_view.stop_rendering()})),this.finalize_construction(p.prototype)}resize(e,t){super.resize(e,t);const i=Math.max(0,t-this.tool_bar_view.height);return this.model_list_view.resize(u,i),this.animation_list_view.resize(c,i),this.renderer_view.resize(Math.max(0,e-u-c),i),this}}t.Model3DView=p},HjM1:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("FXpb"),n=i("39ZU"),s=i("nN8q");i("4AvX");const r=28;class a extends s.ResizableWidget{constructor(e){super(e),this.element=o.el.div({class:"core_TabContainer"}),this.tabs=[],this.bar_element=o.el.div({class:"core_TabContainer_Bar"}),this.panes_element=o.el.div({class:"core_TabContainer_Panes"}),this.bar_mousedown=e=>{if(e.target instanceof HTMLElement){const t=e.target.dataset.key;t&&this.activate(t)}},this.bar_element.onmousedown=this.bar_mousedown;for(const t of e.tabs){const e=o.create_element("span",{class:"core_TabContainer_Tab",text:t.title,data:{key:t.key}});this.bar_element.append(e);const i=new n.LazyWidget(t.create_view);this.tabs.push(Object.assign(Object.assign({},t),{tab_element:e,lazy_view:i})),this.panes_element.append(i.element),this.disposable(i)}this.tabs.length&&this.activate(this.tabs[0].key),this.element.append(this.bar_element,this.panes_element),this.finalize_construction(a.prototype)}resize(e,t){super.resize(e,t),this.bar_element.style.width=`${e}px`,this.bar_element.style.height=`${r}px`;const i=t-r;this.panes_element.style.width=`${e}px`,this.panes_element.style.height=`${i}px`;for(const t of this.tabs)t.lazy_view.resize(e,i);return this}activate(e){for(const t of this.tabs){const i=t.key===e;i?t.tab_element.classList.add("active"):t.tab_element.classList.remove("active"),t.lazy_view.visible.val=i}}}t.TabContainer=a},IMNf:function(e,t,i){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=o(i("GGSb")),s=i("/Wax"),r=i("tjEv"),a=n.default.get("data_formats/compression/prs/decompress");t.prs_decompress=function(e){const t=new d(e);for(;;)if(1===t.read_flag_bit())t.copy_u8();else{let e,i;if(0===t.read_flag_bit())e=t.read_flag_bit()<<1,e|=t.read_flag_bit(),e+=2,i=t.read_u8()-256;else{if(0===(i=t.read_u16()))break;e=7&i,i>>>=3,0===e?(e=t.read_u8(),e+=1):e+=2,i-=8192}t.offset_copy(i,e)}return t.dst.seek_start(0)};class d{constructor(e){this.src=e,this.dst=new s.ResizableBufferCursor(new r.ResizableBuffer(Math.floor(1.5*e.size)),e.endianness),this.flags=0,this.flag_bits_left=0}read_flag_bit(){0===this.flag_bits_left&&(this.flags=this.read_u8(),this.flag_bits_left=8);let e=1&this.flags;return this.flags>>>=1,this.flag_bits_left-=1,e}copy_u8(){this.dst.write_u8(this.read_u8())}read_u8(){return this.src.u8()}read_u16(){return this.src.u16()}offset_copy(e,t){(e<-8192||e>0)&&a.error(`offset was ${e}, should be between -8192 and 0.`),(t<1||t>256)&&a.error(`length was ${t}, should be between 1 and 256.`);const i=Math.min(-e,t);this.dst.seek(e);const o=this.dst.take(i);this.dst.seek(-e-i);for(let e=0;enull!=e?e:this.default_time)}set_user_time(e){return this._user_time.val=e,this}}},If1w:function(e,t,i){"use strict";var o=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))((function(n,s){function r(e){try{d(o.next(e))}catch(e){s(e)}}function a(e){try{d(o.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}d((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const n=i("FXpb");i("XfQH");const s=i("KVVN"),r=i("Tpfs"),a=i("TRid"),d=i("PE7g"),l=i("sMN3"),_=i("Ncr4"),u=i("ouMO");class c extends a.Widget{constructor(){super(),this.element=n.el.div({class:"hunt_optimizer_WantedItemsView"}),this.tbody_element=n.el.tbody(),this.store_disposer=this.disposable(new r.Disposer),this.create_row=e=>{const t=new r.Disposer,i=t.add(new d.NumberInput(e.amount.val,{min:0,step:1}));t.add_all(i.value.bind_to(e.amount),i.value.observe(({value:t})=>e.set_amount(t)));const a=t.add(new s.Button("",{icon_left:n.Icon.Remove}));return t.add(a.click.observe(()=>o(this,void 0,void 0,(function*(){return(yield l.hunt_optimizer_stores.current.val).remove_wanted_item(e)})))),[n.el.tr({},n.el.td({},i.element),n.el.td({text:e.item_type.name}),n.el.td({},a.element)),t]};const e=u.list_property(),t=u.list_property(),i=this.disposable(new _.ComboBox({items:t,to_label:e=>e.name,placeholder_text:"Add an item",filter(i){const o=i.toLowerCase();t.val=e.val.filter(e=>e.name.toLowerCase().includes(o))}}));this.element.append(n.el.h2({text:"Wanted Items"}),i.element,n.el.div({class:"hunt_optimizer_WantedItemsView_table_wrapper"},n.el.table({},this.tbody_element))),this.disposables(l.hunt_optimizer_stores.observe_current(o=>{this.store_disposer.dispose_all(),this.store_disposer.add_all(n.bind_children_to(this.tbody_element,o.wanted_items,this.create_row),i.selected.observe(({value:e})=>{e&&(o.add_wanted_item(e),i.selected.val=void 0)})),e.val=o.huntable_item_types.slice().sort((e,t)=>e.name.localeCompare(t.name)),t.val=e.val},{call_now:!0})),this.finalize_construction(c.prototype)}}t.WantedItemsView=c},IjTL:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("kiqn");t.QuestNpcModel=class extends o.QuestEntityModel{constructor(e,t,i,o,n,s,r,a,d,l,_){if(!Number.isInteger(t))throw new Error("pso_type_id should be an integer.");if(!Number.isFinite(i))throw new Error("npc_id should be a number.");if(!Number.isInteger(o))throw new Error("script_label should be an integer.");if(!Number.isInteger(n))throw new Error("pso_roaming should be an integer.");if(!l)throw new Error("scale is required.");if(!_)throw new Error("unknown is required.");if(3!==_.length)throw new Error(`unknown should be of length 3, was ${_.length}.`);if(10!==_[0].length)throw new Error(`unknown[0] should be of length 10, was ${_[0].length}`);if(6!==_[1].length)throw new Error(`unknown[1] should be of length 6, was ${_[1].length}`);if(4!==_[2].length)throw new Error(`unknown[2] should be of length 4, was ${_[2].length}`);super(e,s,r,a,d),this.pso_type_id=t,this.npc_id=i,this.script_label=o,this.pso_roaming=n,this.unknown=_,this.scale=l}}},JCZi:function(e,t,i){"use strict";var o=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))((function(n,s){function r(e){try{d(o.next(e))}catch(e){s(e)}}function a(e){try{d(o.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}d((o=o.apply(e,t||[])).next())}))},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=i("wsa1"),r=n(i("NUmZ")),a=i("yAUo"),d=i("Q4I3"),l=i("ZPAt"),_=i("ouMO");var u=s.languages.CompletionItemKind;const c=l.OPCODES.filter(e=>null!=e).map(e=>({label:e.mnemonic,kind:u.Function,insertText:e.mnemonic})),p=[{label:".code",kind:u.Keyword,insertText:"code"},{label:".data",kind:u.Keyword,insertText:"data"},{label:".string",kind:u.Keyword,insertText:"string"}];t.AssemblyAnalyser=class{constructor(){this._issues=_.property({warnings:[],errors:[]}),this.issues=this._issues,this.worker=new r.default,this.promises=new Map,this.message_id=0,this.process_worker_message=e=>{const t=e.data;switch(t.type){case a.OutputMessageType.NewObjectCode:this.quest&&(this.quest.object_code.splice(0,this.quest.object_code.length,...t.object_code),this.quest.set_map_designations(t.map_designations),this._issues.val={warnings:t.warnings,errors:t.errors});break;case a.OutputMessageType.SignatureHelp:{const e=this.promises.get(t.id);if(e)if(this.promises.delete(t.id),t.opcode){let i=t.opcode.mnemonic+" ";const o=[];let n=!0;for(const e of t.opcode.params){let t;switch(n?n=!1:i+=", ",e.type.kind){case l.Kind.ILabel:t="FuncLabel";break;case l.Kind.DLabel:t="DataLabel";break;case l.Kind.SLabel:t="StringLabel";break;case l.Kind.ILabelVar:t="...FuncLabel";break;case l.Kind.RegRef:case l.Kind.RegTupRef:t="Register";break;case l.Kind.RegRefVar:t="...Register";break;default:t=l.Kind[e.type.kind]}o.push({label:[i.length,i.length+t.length],documentation:e.doc}),i+=t}const s={signatures:[{label:i,documentation:t.opcode.doc,parameters:o}],activeSignature:0,activeParameter:t.active_param};e.resolve(s)}else e.resolve(void 0)}}},this.worker.onmessage=this.process_worker_message}disassemble(e,t){this.quest=e;const i=d.disassemble(e.object_code,t),o={type:a.InputMessageType.NewAssembly,assembly:i};return this.worker.postMessage(o),i}update_assembly(e){const t={type:a.InputMessageType.AssemblyChange,changes:e.map(e=>({start_line_no:e.range.startLineNumber,start_col:e.range.startColumn,end_line_no:e.range.endLineNumber,end_col:e.range.endColumn,new_text:e.text}))};this.worker.postMessage(t)}provide_completion_items(e){return{suggestions:/^\s*([a-z][a-z0-9_=<>!]*)?$/.test(e)?c:/^\s*\.[a-z]+$/.test(e)?p:[],incomplete:!1}}provide_signature_help(e,t){return o(this,void 0,void 0,(function*(){const i=this.message_id++;return new Promise((o,n)=>{this.promises.set(i,{resolve:o,reject:n});const s={type:a.InputMessageType.SignatureHelp,id:i,line_no:e,col:t};this.worker.postMessage(s),setTimeout(()=>{this.promises.delete(i)&&n(new Error("Signature help timed out."))},5e3)})}))}update_settings(e){const t={type:a.InputMessageType.SettingsChange,settings:e};this.worker.postMessage(t)}dispose(){this.worker.terminate()}}},JQxC:function(e,t,i){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=o(i("GGSb")),s=i("ZPAt"),r=i("4s8/"),a=i("CUby"),d=n.default.get("quest_editor/scripting/data_flow_analysis/stack_value");t.MIN_STACK_VALUE=s.MIN_SIGNED_DWORD_VALUE,t.MAX_STACK_VALUE=s.MAX_SIGNED_DWORD_VALUE,t.stack_value=function(e,i,o){const n=e.get_block_for_instruction(i);return n?function e(i,o,n,l,_){if(++i.iterations>100)return d.warn("Too many iterations."),(new r.ValueSet).set_interval(t.MIN_STACK_VALUE,t.MAX_STACK_VALUE);for(let e=l-1;e>=n.start;e--){const o=n.segment.instructions[e];if(o.opcode.stack===s.StackInteraction.Pop){_+=o.opcode.params.length;continue}const d=o.args;switch(o.opcode){case s.Opcode.ARG_PUSHR:if(0===_)return a.register_value(i.cfg,o,d[0].value);_--;break;case s.Opcode.ARG_PUSHL:case s.Opcode.ARG_PUSHB:case s.Opcode.ARG_PUSHW:if(0===_)return(new r.ValueSet).set_value(d[0].value);_--;break;case s.Opcode.ARG_PUSHA:case s.Opcode.ARG_PUSHO:case s.Opcode.ARG_PUSHS:if(0===_)return(new r.ValueSet).set_interval(t.MIN_STACK_VALUE,t.MAX_STACK_VALUE);_--}}const u=new r.ValueSet;o.add(n);for(const s of n.from){if(o.has(s)){u.set_interval(t.MIN_STACK_VALUE,t.MAX_STACK_VALUE);break}u.union(e(i,new Set(o),s,s.end,_))}return u}(new l(e),new Set,n,n.index_of_instruction(i),o):new r.ValueSet};class l{constructor(e){this.cfg=e,this.iterations=0}}},Jo0o:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("weRg"),n=i("+oIp"),s=i("c5EP"),r=i("xs7i");class a extends o.EntityListView{constructor(){super("quest_editor_ObjectListView"),this.filter_objects=()=>{const e=s.quest_editor_store.current_quest.val,t=s.quest_editor_store.current_area.val,i=e?e.episode:r.Episode.I,o=t?t.id:0;this.entities.val=n.OBJECT_TYPES.filter(e=>{const t=n.object_data(e);if(null==t.area_ids)return!0;const s=t.area_ids[i];return s&&s.includes(o)})},this.disposables(s.quest_editor_store.current_quest.observe(this.filter_objects),s.quest_editor_store.current_area.observe(this.filter_objects)),this.filter_objects(),this.finalize_construction(a.prototype)}}t.ObjectListView=a},"KS+z":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("w6HN"),n=i("oyid"),s=i("S6Bx");class r extends o.ToolBar{constructor(){const e=new n.CheckBox(!0,{label:"Inline args mode",tooltip:s.asm_editor_store.has_issues.map(e=>{let t="Transform arg_push* opcodes to be inline with the opcode the arguments are given to.";return e&&(t+="\nThis mode cannot be toggled because there are issues in the script."),t})});super({children:[e]}),this.disposables(e.checked.bind_to(s.asm_editor_store.inline_args_mode),e.checked.observe(({value:e})=>s.asm_editor_store.set_inline_args_mode(e)),e.enabled.bind_to(s.asm_editor_store.has_issues.map(e=>!e))),this.finalize_construction(r.prototype)}}t.AsmEditorToolBar=r},KUR2:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("nN8q"),n=i("FXpb");class s extends o.ResizableWidget{constructor(e){super(),this.renderer=e,this.element=n.el.div(),this.element.append(e.dom_element),this.disposable(e),this.finalize_construction(s.prototype)}start_rendering(){this.renderer.start_rendering()}stop_rendering(){this.renderer.stop_rendering()}resize(e,t){return super.resize(e,t),this.renderer.set_size(e,t),this}}t.RendererWidget=s},KVVN:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("FXpb");i("Tp1L");const n=i("ouMO"),s=i("QmPX"),r=i("4VsB");class a extends s.Control{constructor(e,t){super(t),this.element=o.el.button({class:"core_Button"});const i=o.el.span({class:"core_Button_inner"});this.center_element=o.el.span({class:"core_Button_center"}),t&&null!=t.icon_left&&i.append(o.el.span({class:"core_Button_left"},o.icon(t.icon_left))),i.append(this.center_element),t&&null!=t.icon_right&&i.append(o.el.span({class:"core_Button_right"},o.icon(t.icon_right))),this._mousedown=n.emitter(),this.mousedown=this._mousedown,this.element.onmousedown=e=>this._mousedown.emit({value:e}),this._mouseup=n.emitter(),this.mouseup=this._mouseup,this.element.onmouseup=e=>this._mouseup.emit({value:e}),this._click=n.emitter(),this.click=this._click,this.element.onclick=e=>this._click.emit({value:e}),this._text=new r.WidgetProperty(this,"",this.set_text),this.text=this._text,"string"==typeof e?this.text.val=e:e&&this.text.bind_to(e),this.element.append(i),this.finalize_construction(a.prototype)}set_enabled(e){super.set_enabled(e),this.element.disabled=!e}set_text(e){this.center_element.textContent=e,this.center_element.hidden=""===e}}t.Button=a},"L/3r":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("ouMO"),n=i("Ts/k"),s=i("n5fr");t.SimpleUndo=class{constructor(e,t,i){this.can_undo=o.property(!1),this.can_redo=o.property(!1),this.action=o.property({description:e,undo:t,redo:i}),this.first_undo=o.map((e,t)=>t?e:void 0,this.action,this.can_undo),this.first_redo=o.map((e,t)=>t?e:void 0,this.action,this.can_redo)}make_current(){s.undo_manager.current.val=this}ensure_not_current(){s.undo_manager.current.val===this&&(s.undo_manager.current.val=n.NOOP_UNDO)}undo(){return!!this.can_undo&&(this.action.val.undo(),!0)}redo(){return!!this.can_redo&&(this.action.val.redo(),!0)}reset(){this.can_undo.val=!1,this.can_redo.val=!1}}},LSoc:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("FXpb"),n=i("TRid"),s=i("ouMO"),r=i("4VsB");i("/xfa");class a extends n.Widget{constructor(e,t,i){super(),this.element=o.el.div({class:"core_Menu",tab_index:-1}),this.inner_element=o.el.div({class:"core_Menu_inner"}),this.mouseup=e=>{if(!(e.target instanceof HTMLElement))return;const t=e.target.dataset.index;null!=t&&this.select_item(parseInt(t,10))},this.keydown=e=>{switch(e.key){case"ArrowDown":this.hover_next();break;case"ArrowUp":this.hover_prev();break;case"Enter":this.select_hovered()}},this.inner_mouseover=e=>{if(e.target&&e.target instanceof HTMLElement){const t=e.target.dataset.index;null!=t&&this.hover_item(parseInt(t,10))}},this.document_mousedown=e=>{!this.visible.val||this.element.contains(e.target)||this.related_element.contains(e.target)||this.visible.set_val(!1,{silent:!1})},this.document_keydown=e=>{"Escape"===e.key&&this.visible.set_val(!1,{silent:!1})},this.visible.val=!1,this.element.onmouseup=this.mouseup,this.element.onkeydown=this.keydown,this.inner_element.onmouseover=this.inner_mouseover,this.element.append(this.inner_element),this.to_label=t,this.items=Array.isArray(e)?s.property(e):e,this.related_element=i,this._selected=new r.WidgetProperty(this,void 0,this.set_selected),this.selected=this._selected,this.disposables(this.items.observe(({value:e})=>{this.inner_element.innerHTML="",this.inner_element.append(...e.map((e,i)=>o.el.div({text:t(e),data:{index:i.toString()}}))),this.hover_item()},{call_now:!0}),o.disposable_listener(document,"mousedown",this.document_mousedown,{capture:!0}),o.disposable_listener(document,"keydown",this.document_keydown)),this.finalize_construction(a.prototype)}hover_next(){this.visible.val=!0,this.hover_item(null!=this.hovered_index?(this.hovered_index+1)%this.items.val.length:0)}hover_prev(){this.visible.val=!0,this.hover_item(this.hovered_index?this.hovered_index-1:this.items.val.length-1)}select_hovered(){null!=this.hovered_index&&this.select_item(this.hovered_index)}set_visible(e){super.set_visible(e),this.visible.val!=e&&(this.hover_item(),this.inner_element.scrollTop=0)}set_selected(){}hover_item(e){this.hovered_element&&this.hovered_element.classList.remove("core_Menu_hovered"),null==e?(this.hovered_index=void 0,this.hovered_element=void 0):(this.hovered_element=this.inner_element.children.item(e),this.hovered_element&&(this.hovered_index=e,this.hovered_element.classList.add("core_Menu_hovered"),this.hovered_element.scrollIntoView({block:"nearest"})))}select_item(e){const t=this.items.val[e];t&&(this.selected.set_val(t,{silent:!1}),this.visible.set_val(!1,{silent:!1}))}}t.Menu=a},LkpO:function(e,t,i){"use strict";var o=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))((function(n,s){function r(e){try{d(o.next(e))}catch(e){s(e)}}function a(e){try{d(o.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}d((o=o.apply(e,t||[])).next())}))},n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const s=i("HjM1");class r extends s.TabContainer{constructor(){super({class:"hunt_optimizer_HuntOptimizerView",tabs:[{title:"Optimize",key:"optimize",create_view:function(){return o(this,void 0,void 0,(function*(){return new((yield Promise.resolve().then(()=>n(i("FNQV")))).OptimizerView)}))}},{title:"Methods",key:"methods",create_view:function(){return o(this,void 0,void 0,(function*(){return new((yield Promise.resolve().then(()=>n(i("GN66")))).MethodsView)}))}},{title:"Help",key:"help",create_view:function(){return o(this,void 0,void 0,(function*(){return new((yield Promise.resolve().then(()=>n(i("F0Xh")))).HelpView)}))}}]}),this.finalize_construction(r.prototype)}}t.HuntOptimizerView=r},"M/y3":function(e,t,i){"use strict";var o=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))((function(n,s){function r(e){try{d(o.next(e))}catch(e){s(e)}}function a(e){try{d(o.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}d((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.sequential=function(e){const t=[];return function(...i){const n=new Promise((e,o)=>t.push({args:i,resolve:e,reject:o}));return 1===t.length&&function(){o(this,void 0,void 0,(function*(){for(;t.length;){const{args:i,resolve:o,reject:n}=t[0];try{o(yield e(...i))}catch(e){n(e)}finally{t.shift()}}}))}(),n}}},NRxM:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("9dYx");class n extends o.AbstractWritableCursor{constructor(e,t,i=0,o=e.byteLength-i){super(t,i),this._size=o,this.backing_buffer=e,this.dv=new DataView(e,0,e.byteLength)}get size(){return this._size}set size(e){if(e>this.backing_buffer.byteLength-this.offset)throw new Error(`Size ${e} is out of bounds.`);this._size=e}take(e){const t=this.offset+this.position,i=new n(this.backing_buffer,this.endianness,t,e);return this._position+=e,i}}t.ArrayBufferCursor=n},NUmZ:function(e,t,i){e.exports=function(){return new Worker(i.p+"128f0cffd6040e7a6005.worker.js")}},Ncr4:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("sDu+"),n=i("FXpb");i("rlVZ"),i("x1yY");const s=i("LSoc"),r=i("ouMO"),a=i("4VsB");class d extends o.LabelledControl{constructor(e){super(e),this.element=n.el.span({class:"core_ComboBox core_Input"}),this.preferred_label_position="left",this.input_element=n.create_element("input"),this.to_label=e.to_label,this._selected=new a.WidgetProperty(this,void 0,this.set_selected),this.selected=this._selected;const t=r.property(!1);this.menu=this.disposable(new s.Menu(e.items,e.to_label,this.element)),this.menu.element.onmousedown=e=>e.preventDefault(),this.input_element.placeholder=e.placeholder_text||"",this.input_element.onmousedown=()=>{t.val=!0},this.input_element.onkeydown=e=>{switch(e.key){case"ArrowDown":e.preventDefault(),this.menu.hover_next();break;case"ArrowUp":e.preventDefault(),this.menu.hover_prev();break;case"Enter":this.menu.select_hovered()}};const i=e.filter;if(i){let e="";this.input_element.onkeyup=()=>{this.input_element.value!==e&&(e=this.input_element.value,i(e),(this.menu.visible.val||e)&&this.menu.hover_next())}}this.input_element.onblur=()=>{t.val=!1};const o=n.el.span({},n.icon(n.Icon.TriangleDown));this.bind_hidden(o,t);const l=n.el.span({},n.icon(n.Icon.TriangleUp));this.bind_hidden(l,t.map(e=>!e));const _=n.el.span({class:"core_ComboBox_button"},o,l);_.onmousedown=e=>{e.preventDefault(),t.val=!t.val},this.element.append(n.el.span({class:"core_ComboBox_inner core_Input_inner"},this.input_element,_),this.menu.element),this.disposables(this.menu.visible.bind_bi(t),t.observe(({value:e})=>{e&&this.menu.hover_next()}),this.menu.selected.observe(({value:e})=>{this.selected.set_val(e,{silent:!1}),this.input_element.focus()})),this.finalize_construction(d.prototype)}set_selected(e){this.input_element.value=e?this.to_label(e):"",this.menu.selected.val=e}}t.ComboBox=d},PE7g:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("0Xme");i("rY5A");class n extends o.Input{constructor(e=0,t={}){super(e,"core_NumberInput","number","core_NumberInput_inner",t),this.preferred_label_position="left";const{min:i,max:o,step:s}=t;this.set_attr("min",i,String),this.set_attr("max",o,String),this.input_element.step="any",this.set_attr("step",s,String),null!=t.round_to&&t.round_to>=0?this.rounding_factor=Math.pow(10,t.round_to):this.rounding_factor=1,this.element.style.width=`${null==t.width?54:t.width}px`,this.set_value(e),this.finalize_construction(n.prototype)}get_value(){return this.input_element.valueAsNumber}set_value(e){this.input_element.valueAsNumber=Math.round(this.rounding_factor*e)/this.rounding_factor}}t.NumberInput=n},"Q+PT":function(e,t,i){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=o(i("GGSb")).default.get("core/observable/SimpleEmitter");t.SimpleEmitter=class{constructor(){this.observers=[]}emit(e){for(const t of this.observers)try{t(e)}catch(e){n.error("Observer threw error.",e)}}observe(e){return this.observers.includes(e)||this.observers.push(e),{dispose:()=>{const t=this.observers.indexOf(e);-1!==t&&this.observers.splice(t,1)}}}}},Q4I3:function(e,t,i){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=i("8hIv"),s=i("lg9k"),r=i("ZPAt"),a=o(i("GGSb")).default.get("quest_editor/scripting/disassembly");function d(e,t){const i=[],o=Math.min(e.length,t.length);for(let n=0;n4&&i.push(t)}else if(a.type===s.SegmentType.String)i.push(" "+JSON.stringify(a.value));else for(const e of a.instructions)if(t||e.opcode.stack!==r.StackInteraction.Push){let n=[];e.opcode.stack===r.StackInteraction.Pop?t||(n=l(e.opcode.params,o.splice(Math.max(0,o.length-e.opcode.params.length),e.opcode.params.length),!0)):n=l(e.opcode.params,d(e.opcode.params,e.args),!1),i.push(" "+e.opcode.mnemonic+(n.length?" "+n.join(", "):""))}else o.push(...d(e.opcode.params,e.args))}return i.length&&i.push(""),a.trace(`disassemble end, line count: ${i.length}`),i}},QmPX:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("TRid");t.Control=class extends o.Widget{}},RMZt:function(e,t,i){"use strict";var o=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))((function(n,s){function r(e){try{d(o.next(e))}catch(e){s(e)}}function a(e){try{d(o.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}d((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const n=i("yfUv"),s=i("ExVU"),r="HuntMethodStore.methodUserTimes";t.hunt_method_persister=new class extends n.Persister{persist_method_user_times(e,t){const i={};for(const t of e)null!=t.user_time.val&&(i[t.id]=t.user_time.val.as("hours"));this.persist_for_server(t,r,i)}load_method_user_times(e,t){return o(this,void 0,void 0,(function*(){const i=yield this.load_for_server(t,r);if(i)for(const t of e){const e=i[t.id];t.set_user_time(null==e?void 0:s.Duration.fromObject({hours:e}))}}))}}},S6Bx:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("wsa1"),n=i("JCZi"),s=i("Tpfs"),r=i("L/3r"),a=i("c5EP"),d=i("hVaW"),l=i("ouMO"),_=new n.AssemblyAnalyser;o.languages.register({id:"psoasm"}),o.languages.setMonarchTokensProvider("psoasm",d.ASM_SYNTAX),o.languages.registerCompletionItemProvider("psoasm",{provideCompletionItems(e,t){const i=e.getValueInRange({startLineNumber:t.lineNumber,endLineNumber:t.lineNumber,startColumn:1,endColumn:t.column});return _.provide_completion_items(i)}}),o.languages.registerSignatureHelpProvider("psoasm",{signatureHelpTriggerCharacters:[" ",","],signatureHelpRetriggerCharacters:[", "],provideSignatureHelp:(e,t)=>_.provide_signature_help(t.lineNumber,t.column)}),o.languages.setLanguageConfiguration("psoasm",{indentationRules:{increaseIndentPattern:/^\s*\d+:/,decreaseIndentPattern:/^\s*(\d+|\.)/},autoClosingPairs:[{open:'"',close:'"'}],surroundingPairs:[{open:'"',close:'"'}],comments:{lineComment:"//"}});class u{constructor(){this.disposer=new s.Disposer,this.model_disposer=this.disposer.add(new s.Disposer),this._model=l.property(void 0),this._did_undo=l.emitter(),this._did_redo=l.emitter(),this._inline_args_mode=l.property(!0),this.model=this._model,this.did_undo=this._did_undo,this.did_redo=this._did_redo,this.undo=new r.SimpleUndo("Text edits",()=>this._did_undo.emit({value:"asm undo"}),()=>this._did_redo.emit({value:"asm undo"})),this.inline_args_mode=this._inline_args_mode,this.has_issues=_.issues.map(e=>e.warnings.length+e.errors.length>0),this.set_inline_args_mode=e=>{this.has_issues.val||(this._inline_args_mode.val=e,_.update_settings({manual_stack:!this.inline_args_mode.val}),this.update_model())},this.quest_changed=()=>{this.update_model()},this.disposer.add_all(a.quest_editor_store.current_quest.observe(this.quest_changed,{call_now:!0}),_.issues.observe(({value:e})=>this.update_model_markers(e),{call_now:!0}))}dispose(){this.disposer.dispose()}setup_editor_model_features(e){let t=e.getAlternativeVersionId(),i=t,o=t;this.model_disposer.add(e.onDidChangeContent(n=>{const s=e.getAlternativeVersionId();so&&(o=i)),this.undo.can_undo.val=!0),i=s,_.update_assembly(n.changes)}))}update_model_markers({warnings:e,errors:t}){const i=this.model.val;i&&o.editor.setModelMarkers(i,"psoasm",e.map(e=>({severity:o.MarkerSeverity.Hint,message:e.message,startLineNumber:e.line_no,endLineNumber:e.line_no,startColumn:e.col,endColumn:e.col+e.length,tags:[o.MarkerTag.Unnecessary]})).concat(t.map(e=>({severity:o.MarkerSeverity.Error,message:e.message,startLineNumber:e.line_no,endLineNumber:e.line_no,startColumn:e.col,endColumn:e.col+e.length}))))}update_model(){this.undo.reset(),this.model_disposer.dispose_all();const e=a.quest_editor_store.current_quest.val;if(e){const t=!this.inline_args_mode.val,i=_.disassemble(e,t),n=this.model_disposer.add(o.editor.createModel(i.join("\n"),"psoasm"));this.setup_editor_model_features(n),this._model.val=n}else this._model.val=void 0}}t.AsmEditorStore=u,t.asm_editor_store=new u},"Sa3/":function(e,t,i){"use strict";var o=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))((function(n,s){function r(e){try{d(o.next(e))}catch(e){s(e)}}function a(e){try{d(o.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}d((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.read_file=function(e){return o(this,void 0,void 0,(function*(){return new Promise((t,i)=>{const o=new FileReader;o.addEventListener("loadend",()=>{o.result instanceof ArrayBuffer?t(o.result):i(new Error("Couldn't read file."))}),o.readAsArrayBuffer(e)})}))}},SoCI:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("xs7i");t.get_areas_for_episode=function(e){return n[e]},t.get_area_variant=function(e,t,i){const o=n[e].find(e=>e.id===t);if(!o)throw new Error(`No area with id ${t}.`);const s=o.area_variants[i];if(!s)throw new Error(`No area variant with id ${i}.`);return s};const n=[];function s(e,t,i,o){const n={id:e,name:t,order:i,area_variants:[]};for(let e=0;e{this.construction_finalized||a.warn(`finalize_construction is never called for ${Object.getPrototypeOf(this).constructor.name}.`)},0)}get id(){return this.element.id}set id(e){this.element.id=e}focus(){this.element.focus()}dispose(){this.element.remove(),this.disposer.dispose(),this.disposed=!0}finalize_construction(e){Object.getPrototypeOf(this)===e&&(this.options.class&&this.element.classList.add(this.options.class),"boolean"==typeof this.options.enabled?this.enabled.val=this.options.enabled:this.options.enabled&&this.enabled.bind_to(this.options.enabled),"string"==typeof this.options.tooltip?this.tooltip.val=this.options.tooltip:this.options.tooltip&&this.tooltip.bind_to(this.options.tooltip),this.construction_finalized=!0)}set_visible(e){this.element.hidden=!e}set_enabled(e){e?this.element.classList.remove("disabled"):this.element.classList.add("disabled")}set_tooltip(e){this.element.title=e}bind_hidden(e,t){this.disposable(s.bind_hidden(e,t))}disposable(e){return this.disposer.add(e)}disposables(...e){this.disposer.add_all(...e)}}},Tpfs:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("GGSb").get("core/observable/Disposer");t.Disposer=class{constructor(...e){this._disposed=!1,this.disposables=e}get length(){return this.disposables.length}get disposed(){return this._disposed}add(e){return this._disposed||this.disposables.push(e),e}insert(e,t){return this._disposed||this.disposables.splice(e,0,t),t}add_all(...e){return this._disposed||this.disposables.push(...e),this}dispose_all(){this.dispose_at(0,this.disposables.length)}dispose(){this.dispose_all(),this._disposed=!0}dispose_at(e,t=1){for(const i of this.disposables.splice(e,t))try{i.dispose()}catch(e){o.warn("Error while disposing.",e)}}}},"Ts/k":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("ouMO"),n=i("n5fr");t.NOOP_UNDO={can_redo:o.property(!1),can_undo:o.property(!1),first_redo:o.property(void 0),first_undo:o.property(void 0),ensure_not_current(){},make_current(){n.undo_manager.current.val=this},redo:()=>!1,reset(){},undo:()=>!1}},VRtl:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("w6HN"),n=i("6cU9"),s=i("oyid"),r=i("PE7g"),a=i("7CyS"),d=i("tyuj"),l=i("7ZX1"),_=i("FXpb");class u extends o.ToolBar{constructor(){const e=new n.FileButton("Open file...",{icon_left:_.Icon.File,accept:".nj, .njm, .xj, .xvm"}),t=new s.CheckBox(!1,{label:"Show skeleton"}),i=new s.CheckBox(!0,{label:"Play animation"}),o=new r.NumberInput(a.PSO_FRAME_RATE,{label:"Frame rate:",min:1,max:240,step:1}),c=new r.NumberInput(1,{label:"Frame:",min:1,max:d.model_store.animation_frame_count,step:1}),p=new l.Label(d.model_store.animation_frame_count.map(e=>`/ ${e}`));super({children:[e,t,i,o,c,p]}),this.disposables(e.files.observe(({value:e})=>{e.length&&d.model_store.load_file(e[0])}),d.model_store.show_skeleton.bind_to(t.checked));const v=d.model_store.current_nj_motion.map(e=>null!=e);this.disposables(i.enabled.bind_to(v),d.model_store.animation_playing.bind_bi(i.checked),o.enabled.bind_to(v),d.model_store.animation_frame_rate.bind_to(o.value),c.enabled.bind_to(v),d.model_store.animation_frame.bind_to(c.value),c.value.bind_to(d.model_store.animation_frame.map(e=>Math.round(e))),p.enabled.bind_to(v)),this.finalize_construction(u.prototype)}}t.Model3DToolBar=u},VwSi:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("kwt4"),n=1296321870;var s;function r(e,t){let i=e.u32();const o=e.u32(),n=e.u16(),r=e.u16(),l=(192&r)>>6,_=15&r,u=[];for(let r=0;r=i)return e.seek_start(s),l(e,t);r=o}return n}function l(e,t){const i=[];for(let n=0;nd.quest_editor_store.undo.make_current(),!0),this.renderer_view.start_rendering(),this.disposables(a.gui_store.tool.observe(({value:e})=>{e===a.GuiTool.QuestEditor?this.renderer_view.start_rendering():this.renderer_view.stop_rendering()})),this.finalize_construction(l.prototype)}resize(e,t){return super.resize(e,t),this.renderer_view.resize(e,t),this}}t.QuestRendererView=l},WJtm:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("TRid"),n=i("FXpb"),s=i("yar8"),r=i("sMN3"),a=i("ouMO"),d=i("nsCy"),l=i("xs7i");i("a0xr");const _=i("ExVU");class u extends o.Widget{constructor(){super(),this.element=n.el.div({class:"hunt_optimizer_OptimizationResultView"},n.el.h2({text:"Ideal Combination of Methods"})),this.disposable(r.hunt_optimizer_stores.observe_current(e=>{this.results_observer&&this.results_observer.dispose(),this.results_observer=e.result.observe(({value:e})=>this.update_table(e),{call_now:!0})},{call_now:!0})),this.finalize_construction(u.prototype)}dispose(){super.dispose(),this.results_observer&&this.results_observer.dispose(),this.table&&this.table.dispose()}update_table(e){this.table&&this.table.dispose();let t=0,i=_.Duration.fromMillis(0);if(e)for(const o of e.optimal_methods)t+=o.runs,i=i.plus(o.total_time);const o=[{title:"Difficulty",fixed:!0,width:80,render_cell:e=>d.Difficulty[e.difficulty],footer:{render_cell:()=>"Totals:"}},{title:"Method",fixed:!0,width:250,render_cell:e=>e.method_name},{title:"Ep.",fixed:!0,width:40,render_cell:e=>l.Episode[e.method_episode]},{title:"Section ID",fixed:!0,width:90,render_cell(e){const t=n.el.span({},...e.section_ids.map(e=>n.section_id_icon(e,{size:17})));return t.style.display="flex",t}},{title:"Time/Run",width:90,text_align:"center",render_cell:e=>e.method_time.toFormat("hh:mm")},{title:"Runs",width:60,text_align:"right",render_cell:e=>e.runs.toFixed(1),tooltip:e=>e.runs.toString(),footer:{render_cell:()=>t.toFixed(1),tooltip:()=>t.toString()}},{title:"Total Hours",width:60,text_align:"right",render_cell:e=>e.total_time.as("hours").toFixed(1),tooltip:e=>e.total_time.as("hours").toString(),footer:{render_cell:()=>i.as("hours").toFixed(1),tooltip:()=>i.as("hours").toString()}}];if(e)for(const t of e.wanted_items){let i=0;for(const o of e.optimal_methods)i+=o.item_counts.get(t)||0;o.push({title:t.name,width:80,text_align:"right",render_cell(e){const i=e.item_counts.get(t);return i?i.toFixed(2):""},tooltip(e){const i=e.item_counts.get(t);return i?i.toString():""},footer:{render_cell:()=>i.toFixed(2),tooltip:()=>i.toString()}})}this.table=new s.Table({class:"hunt_optimizer_OptimizationResultView_table",values:e?a.list_property(void 0,...e.optimal_methods):a.list_property(),columns:o}),this.element.append(this.table.element)}}t.OptimizationResultView=u},X3DM:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("yQqj"),n=i("c5EP");t.RemoveEntityAction=class{constructor(e){this.entity=e,this.description=`Delete ${o.entity_data(e.type).name}`}undo(){const e=n.quest_editor_store.current_quest.val;e&&(e.add_entity(this.entity),n.quest_editor_store.set_selected_entity(this.entity))}redo(){const e=n.quest_editor_store.current_quest.val;e&&e.remove_entity(this.entity)}}},XDYw:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("4mUz");t.parse_area_collision_geometry=function(e){const{data_offset:t}=o.parse_rel(e,!1);e.seek_start(t);const i=e.u32();e.seek_start(i);const n={meshes:[]};for(;e.bytes_left;){const t=e.position,i=e.u32();if(0===i)break;const o={vertices:[],triangles:[]};n.meshes.push(o),e.seek_start(i);const s=e.u32(),r=e.u32(),a=e.u32(),d=e.u32();e.seek_start(r);for(let t=0;t({type:O(e,t),area_id:t.area_id,section_id:t.section_id,position:t.position,rotation:t.rotation,scale:t.scale,unknown:t.unknown,pso_type_id:t.type_id,npc_id:t.npc_id,script_label:Math.round(t.script_label),pso_roaming:t.roaming}))}function O(e,{type_id:t,scale:i,roaming:o,area_id:n}){const s=Math.abs(i.y-1)>1e-5;switch(`${t}, ${o%3}, ${e}`){case"68, 0, 1":return f.NpcType.Booma;case"68, 1, 1":return f.NpcType.Gobooma;case"68, 2, 1":return f.NpcType.Gigobooma;case"99, 0, 1":return f.NpcType.EvilShark;case"99, 1, 1":return f.NpcType.PalShark;case"99, 2, 1":return f.NpcType.GuilShark;case"166, 0, 1":return f.NpcType.Dimenian;case"166, 0, 2":return f.NpcType.Dimenian2;case"166, 1, 1":return f.NpcType.LaDimenian;case"166, 1, 2":return f.NpcType.LaDimenian2;case"166, 2, 1":return f.NpcType.SoDimenian;case"166, 2, 2":return f.NpcType.SoDimenian2;case"214, 0, 2":return f.NpcType.Mericarol;case"214, 1, 2":return f.NpcType.Mericus;case"214, 2, 2":return f.NpcType.Merikle;case"277, 0, 4":return f.NpcType.Boota;case"277, 1, 4":return f.NpcType.ZeBoota;case"277, 2, 4":return f.NpcType.BaBoota;case"279, 0, 4":return f.NpcType.Goran;case"279, 1, 4":return f.NpcType.PyroGoran;case"279, 2, 4":return f.NpcType.GoranDetonator}switch(`${t}, ${o%2}, ${e}`){case"64, 0, 1":return f.NpcType.Hildebear;case"64, 0, 2":return f.NpcType.Hildebear2;case"64, 1, 1":return f.NpcType.Hildeblue;case"64, 1, 2":return f.NpcType.Hildeblue2;case"65, 0, 1":return f.NpcType.RagRappy;case"65, 0, 2":return f.NpcType.RagRappy2;case"65, 0, 4":return f.NpcType.SandRappy;case"65, 1, 1":return f.NpcType.AlRappy;case"65, 1, 2":return f.NpcType.LoveRappy;case"65, 1, 4":return f.NpcType.DelRappy;case"128, 0, 1":return f.NpcType.Dubchic;case"128, 0, 2":return f.NpcType.Dubchic2;case"128, 1, 1":return f.NpcType.Gilchic;case"128, 1, 2":return f.NpcType.Gilchic2;case"212, 0, 2":return f.NpcType.SinowBerill;case"212, 1, 2":return f.NpcType.SinowSpigell;case"213, 0, 2":return f.NpcType.Merillia;case"213, 1, 2":return f.NpcType.Meriltas;case"215, 0, 2":return f.NpcType.UlGibbon;case"215, 1, 2":return f.NpcType.ZolGibbon;case"221, 0, 2":return f.NpcType.Dolmolm;case"221, 1, 2":return f.NpcType.Dolmdarl;case"224, 0, 2":return n>15?f.NpcType.Epsilon:f.NpcType.SinowZoa;case"224, 1, 2":return n>15?f.NpcType.Epsilon:f.NpcType.SinowZele;case"274, 0, 4":return f.NpcType.MerissaA;case"274, 1, 4":return f.NpcType.MerissaAA;case"276, 0, 4":return f.NpcType.Zu;case"276, 1, 4":return f.NpcType.Pazuzu;case"278, 0, 4":return f.NpcType.Dorphon;case"278, 1, 4":return f.NpcType.DorphonEclair;case"281, 0, 4":return s?f.NpcType.SaintMilion:f.NpcType.Kondrieu;case"281, 1, 4":return s?f.NpcType.Shambertin:f.NpcType.Kondrieu}switch(`${t}, ${e}`){case"66, 1":return f.NpcType.Monest;case"66, 2":return f.NpcType.Monest2;case"67, 1":return s?f.NpcType.SavageWolf:f.NpcType.BarbarousWolf;case"67, 2":return s?f.NpcType.SavageWolf2:f.NpcType.BarbarousWolf2;case"96, 1":return f.NpcType.GrassAssassin;case"96, 2":return f.NpcType.GrassAssassin2;case"97, 1":return n>15?f.NpcType.DelLily:s?f.NpcType.PoisonLily:f.NpcType.NarLily;case"97, 2":return n>15?f.NpcType.DelLily:s?f.NpcType.PoisonLily2:f.NpcType.NarLily2;case"98, 1":return f.NpcType.NanoDragon;case"100, 1":return s?f.NpcType.PofuillySlime:f.NpcType.PouillySlime;case"101, 1":return f.NpcType.PanArms;case"101, 2":return f.NpcType.PanArms2;case"129, 1":return f.NpcType.Garanz;case"129, 2":return f.NpcType.Garanz2;case"130, 1":return s?f.NpcType.SinowBeat:f.NpcType.SinowGold;case"131, 1":return f.NpcType.Canadine;case"132, 1":return f.NpcType.Canane;case"133, 1":return f.NpcType.Dubswitch;case"133, 2":return f.NpcType.Dubswitch2;case"160, 1":return f.NpcType.Delsaber;case"160, 2":return f.NpcType.Delsaber2;case"161, 1":return f.NpcType.ChaosSorcerer;case"161, 2":return f.NpcType.ChaosSorcerer2;case"162, 1":return f.NpcType.DarkGunner;case"164, 1":return f.NpcType.ChaosBringer;case"165, 1":return f.NpcType.DarkBelra;case"165, 2":return f.NpcType.DarkBelra2;case"167, 1":return f.NpcType.Bulclaw;case"168, 1":return f.NpcType.Claw;case"192, 1":return f.NpcType.Dragon;case"192, 2":return f.NpcType.GalGryphon;case"193, 1":return f.NpcType.DeRolLe;case"197, 1":return f.NpcType.VolOpt;case"200, 1":return f.NpcType.DarkFalz;case"202, 2":return f.NpcType.OlgaFlow;case"203, 2":return f.NpcType.BarbaRay;case"204, 2":return f.NpcType.GolDragon;case"216, 2":return f.NpcType.Gibbles;case"217, 2":return f.NpcType.Gee;case"218, 2":return f.NpcType.GiGue;case"219, 2":return f.NpcType.Deldepth;case"220, 2":return f.NpcType.Delbiter;case"222, 2":return f.NpcType.Morfos;case"223, 2":return f.NpcType.Recobox;case"225, 2":return f.NpcType.IllGill;case"272, 4":return f.NpcType.Astark;case"273, 4":return s?f.NpcType.SatelliteLizard:f.NpcType.Yowie;case"275, 4":return f.NpcType.Girtablulu}switch(t){case 4:return f.NpcType.FemaleFat;case 5:return f.NpcType.FemaleMacho;case 7:return f.NpcType.FemaleTall;case 10:return f.NpcType.MaleDwarf;case 11:return f.NpcType.MaleFat;case 12:return f.NpcType.MaleMacho;case 13:return f.NpcType.MaleOld;case 25:return f.NpcType.BlueSoldier;case 26:return f.NpcType.RedSoldier;case 27:return f.NpcType.Principal;case 28:return f.NpcType.Tekker;case 29:return f.NpcType.GuildLady;case 30:return f.NpcType.Scientist;case 31:return f.NpcType.Nurse;case 32:return f.NpcType.Irene;case 241:return f.NpcType.ItemShop;case 254:return f.NpcType.Nurse2}return f.NpcType.Unknown}function g(e){const t=new DataView(new ArrayBuffer(4));return e.map(e=>{const i=f.npc_data(e.type),o=null==i.pso_type_id?e.pso_type_id:i.pso_type_id,n=null==i.pso_roaming?e.pso_roaming:i.pso_roaming,s=null==i.pso_regular||i.pso_regular;t.setFloat32(0,e.scale.y),t.setUint32(0,-8388609&t.getUint32(0)|(s?0:8388608));const r=t.getFloat32(0),a={x:e.scale.x,y:r,z:e.scale.z};return{type_id:o,section_id:e.section_id,position:e.position,rotation:e.rotation,scale:a,npc_id:e.npc_id,script_label:e.script_label,roaming:n,area_id:e.area_id,unknown:e.unknown}})}t.parse_quest=function(e,t=!1){const i=w.parse_qst(e);if(!i)return;let o,n;for(const e of i.files){const t=e.name.trim().toLowerCase();t.endsWith(".dat")?o=e:t.endsWith(".bin")&&(n=e)}if(!o)return void E.error("File contains no DAT file.");if(!n)return void E.error("File contains no BIN file.");const a=d.prs_decompress(new l.ArrayBufferCursor(o.data,u.Endianness.Little)),_=p.parse_dat(a),f=_.objs.map(e=>{const t=h.pso_id_to_object_type(e.type_id);return{type:t,id:e.id,group_id:e.group_id,area_id:e.area_id,section_id:e.section_id,position:e.position,rotation:e.rotation,properties:new Map(e.properties.map((e,i)=>3!==i||t!==h.ObjectType.ScriptCollision&&t!==h.ObjectType.ForestConsole&&t!==h.ObjectType.TalkLinkToSupport?4===i&&t===h.ObjectType.RicoMessagePod?["script_label",e]:5===i&&t===h.ObjectType.RicoMessagePod?["script_label_2",e]:[`property_${i}`,e]:["script_label",e])),unknown:e.unknown}}),O=d.prs_decompress(new l.ArrayBufferCursor(n.data,u.Endianness.Little)),g=c.parse_bin(O,function(e,t){const i=new Set([0]);for(const t of e){const e=t.properties.get("script_label");null!=e&&i.add(e);const o=t.properties.get("script_label_2");null!=o&&i.add(o)}for(const e of t)i.add(Math.round(e.script_label));return[...i]}(f,_.npcs),t);let y=v.Episode.I,b=new Map;if(g.object_code.length){let e;for(const t of g.object_code)if(t.type===s.SegmentType.Instructions&&t.labels.includes(0)){e=t;break}e?(y=function(e){const t=e.find(e=>e.opcode===r.Opcode.SET_EPISODE);if(!t)return E.debug("Function 0 has no set_episode instruction."),v.Episode.I;switch(t.args[0].value){default:case 0:return v.Episode.I;case 1:return v.Episode.II;case 2:return v.Episode.IV}}(e.instructions),b=function(e,t,i){const o=new Map;for(const e of i)e.opcode===r.Opcode.BB_MAP_DESIGNATE&&o.set(e.args[0].value,e.args[2].value);return o}(0,0,e.instructions)):E.warn("No instruction for label 0 found.")}else E.warn("File contains no instruction labels.");return{id:g.quest_id,language:g.language,name:g.quest_name,short_description:g.short_description,long_description:g.long_description,episode:y,objects:f,npcs:m(y,_.npcs),dat_unknowns:_.unknowns,object_code:g.object_code,shop_items:g.shop_items,map_designations:b}},t.write_quest_qst=function(e,t){const i=p.write_dat({objs:(o=e.objects,o.map(e=>({type_id:h.object_data(e.type).pso_id,id:e.id,group_id:e.group_id,section_id:e.section_id,position:e.position,rotation:e.rotation,properties:[...e.properties.values()],area_id:e.area_id,unknown:e.unknown}))),npcs:g(e.npcs),unknowns:e.dat_unknowns});var o;const n=c.write_bin(new c.BinFile(e.id,e.language,e.name,e.short_description,e.long_description,e.object_code,e.shop_items)),s=t.lastIndexOf("."),r=-1===s?t.slice(0,11):t.slice(0,Math.min(11,s));return w.write_qst({files:[{name:r+".dat",id:e.id,data:a.prs_compress(new _.ResizableBufferCursor(i,u.Endianness.Little)).array_buffer()},{name:r+".bin",id:e.id,data:a.prs_compress(new l.ArrayBufferCursor(n,u.Endianness.Little)).array_buffer()}]})}},Y3Jw:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("nN8q"),n=i("FXpb");i("8TW1");class s extends o.ResizableWidget{constructor(e,t){super(),this.models=e,this.selected=t,this.element=n.create_element("ul",{class:"viewer_Model3DSelectListView"}),this.list_click=e=>{if(e.target instanceof HTMLLIElement&&e.target.dataset.index){this.selected_element&&this.selected_element.classList.remove("active"),e.target.classList.add("active");const t=parseInt(e.target.dataset.index,10);this.selected_element=e.target,this.selected.val=this.models[t]}},this.element.onclick=this.list_click,e.forEach((e,t)=>{this.element.append(n.create_element("li",{text:e.name,data:{index:t.toString()}}))}),this.disposable(t.observe(({value:e})=>{if(this.selected_element&&(this.selected_element.classList.remove("active"),this.selected_element=void 0),e&&e!==this.selected_model){const t=this.models.indexOf(e);-1!==t&&(this.selected_element=this.element.childNodes[t],this.selected_element.classList.add("active"))}})),this.finalize_construction(s.prototype)}set borders(e){e?(this.element.style.borderLeft="var(--border)",this.element.style.borderRight="var(--border)"):(this.element.style.borderLeft="none",this.element.style.borderRight="none")}}t.Model3DSelectListView=s},YkZX:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("Ftn7"),n=i("Womt"),s=i("c5EP"),r=i("3CEK"),a=i("Tpfs"),d=i("Gc0Z");t.QuestRenderer=class extends o.Renderer{constructor(){super(),this._collision_geometry=new n.Object3D,this._render_geometry=new n.Object3D,this._entity_models=new n.Object3D,this.disposer=new a.Disposer,this.entity_to_mesh=new Map,this.entity_controls=this.disposer.add(new d.QuestEntityControls(this)),this.camera=new n.PerspectiveCamera(60,1,10,1e4),this.disposer.add_all(new r.QuestModelManager(this),s.quest_editor_store.debug.observe(({value:e})=>this.debug=e)),this.init_camera_controls()}get debug(){return super.debug}set debug(e){this.debug!==e&&(super.debug=e,this._render_geometry.visible=e,this.schedule_render())}get collision_geometry(){return this._collision_geometry}set collision_geometry(e){this.scene.remove(this.collision_geometry),this._collision_geometry=e,this.scene.add(e)}set render_geometry(e){this.scene.remove(this._render_geometry),this._render_geometry=e,e.visible=this.debug,this.scene.add(e)}get entity_models(){return this._entity_models}dispose(){super.dispose(),this.disposer.dispose()}set_size(e,t){this.camera.aspect=e/t,this.camera.updateProjectionMatrix(),super.set_size(e,t)}reset_entity_models(){this.scene.remove(this._entity_models),this._entity_models=new n.Group,this.scene.add(this._entity_models),this.entity_to_mesh.clear(),this.schedule_render()}add_entity_model(e){const t=e.userData.entity;this._entity_models.add(e),this.entity_to_mesh.set(t,e),t===s.quest_editor_store.selected_entity.val&&this.entity_controls.mark_selected(e),this.schedule_render()}remove_entity_model(e){const t=this.entity_to_mesh.get(e);t&&(this.entity_to_mesh.delete(e),this._entity_models.remove(t),this.schedule_render())}get_entity_mesh(e){return this.entity_to_mesh.get(e)}}},Yq7v:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("nN8q"),n=i("FXpb"),s=i("5aKR"),r=i("c5EP"),a=i("IjTL"),d=i("yQqj");i("egRq");const l=i("PE7g"),_=i("Tpfs"),u=i("Womt");class c extends o.ResizableWidget{constructor(){super(),this.element=n.el.div({class:"quest_editor_EntityInfoView",tab_index:-1}),this.no_entity_view=new s.DisabledView("No entity selected."),this.table_element=n.el.table(),this.pos_x_element=this.disposable(new l.NumberInput(0,{width:80,round_to:3})),this.pos_y_element=this.disposable(new l.NumberInput(0,{width:80,round_to:3})),this.pos_z_element=this.disposable(new l.NumberInput(0,{width:80,round_to:3})),this.world_pos_x_element=this.disposable(new l.NumberInput(0,{width:80,round_to:3})),this.world_pos_y_element=this.disposable(new l.NumberInput(0,{width:80,round_to:3})),this.world_pos_z_element=this.disposable(new l.NumberInput(0,{width:80,round_to:3})),this.entity_disposer=new _.Disposer;const e=r.quest_editor_store.selected_entity,t=e.map(e=>null==e),i="quest_editor_EntityInfoView_coord";this.table_element.append(n.el.tr({},n.el.th({text:"Type:"}),this.type_element=n.el.td()),n.el.tr({},n.el.th({text:"Name:"}),this.name_element=n.el.td()),n.el.tr({},n.el.th({text:"Section:"}),this.section_id_element=n.el.td()),n.el.tr({},n.el.th({text:"Section position:",col_span:2})),n.el.tr({},n.el.th({text:"X:",class:i}),n.el.td({},this.pos_x_element.element)),n.el.tr({},n.el.th({text:"Y:",class:i}),n.el.td({},this.pos_y_element.element)),n.el.tr({},n.el.th({text:"Z:",class:i}),n.el.td({},this.pos_z_element.element)),n.el.tr({},n.el.th({text:"World position:",col_span:2})),n.el.tr({},n.el.th({text:"X:",class:i}),n.el.td({},this.world_pos_x_element.element)),n.el.tr({},n.el.th({text:"Y:",class:i}),n.el.td({},this.world_pos_y_element.element)),n.el.tr({},n.el.th({text:"Z:",class:i}),n.el.td({},this.world_pos_z_element.element))),this.element.append(this.table_element,this.no_entity_view.element),this.element.addEventListener("focus",()=>r.quest_editor_store.undo.make_current(),!0),this.bind_hidden(this.table_element,t),this.disposables(this.no_entity_view.visible.bind_to(t),e.observe(({value:e})=>{if(this.entity_disposer.dispose_all(),e){this.type_element.innerText=e instanceof a.QuestNpcModel?"NPC":"Object";const t=d.entity_data(e.type).name;this.name_element.innerText=t,this.name_element.title=t,this.entity_disposer.add(e.section_id.observe(({value:e})=>{this.section_id_element.innerText=e.toString()},{call_now:!0})),this.observe(e,e.position,!1,this.pos_x_element,this.pos_y_element,this.pos_z_element),this.observe(e,e.world_position,!0,this.world_pos_x_element,this.world_pos_y_element,this.world_pos_z_element)}})),this.finalize_construction(c.prototype)}dispose(){super.dispose(),this.entity_disposer.dispose()}observe(e,t,i,o,n,s){this.entity_disposer.add_all(t.observe(({value:{x:e,y:t,z:i}})=>{o.value.val=e,n.value.val=t,s.value.val=i},{call_now:!0}),o.value.observe(({value:o})=>r.quest_editor_store.translate_entity(e,e.section.val,e.section.val,t.val,new u.Vector3(o,t.val.y,t.val.z),i)),n.value.observe(({value:o})=>r.quest_editor_store.translate_entity(e,e.section.val,e.section.val,t.val,new u.Vector3(t.val.x,o,t.val.z),i)),s.value.observe(({value:o})=>r.quest_editor_store.translate_entity(e,e.section.val,e.section.val,t.val,new u.Vector3(t.val.x,t.val.y,o),i)))}}t.EntityInfoView=c},Yuai:function(e,t,i){"use strict";var o=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))((function(n,s){function r(e){try{d(o.next(e))}catch(e){s(e)}}function a(e){try{d(o.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}d((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.load_array_buffer=function(e){return o(this,void 0,void 0,(function*(){return(yield fetch("/assets"+e)).arrayBuffer()}))}},ZPAt:function(e,t,i){"use strict";var o,n,s;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Any=0]="Any",e[e.Byte=1]="Byte",e[e.Word=2]="Word",e[e.DWord=3]="DWord",e[e.Float=4]="Float",e[e.Label=5]="Label",e[e.ILabel=6]="ILabel",e[e.DLabel=7]="DLabel",e[e.SLabel=8]="SLabel",e[e.String=9]="String",e[e.ILabelVar=10]="ILabelVar",e[e.RegRef=11]="RegRef",e[e.RegTupRef=12]="RegTupRef",e[e.RegRefVar=13]="RegRefVar",e[e.Pointer=14]="Pointer"}(o=t.Kind||(t.Kind={})),t.TYPE_ANY={kind:o.Any},t.TYPE_BYTE={kind:o.Byte},t.TYPE_WORD={kind:o.Word},t.TYPE_DWORD={kind:o.DWord},t.TYPE_FLOAT={kind:o.Float},t.TYPE_LABEL={kind:o.Label},t.TYPE_I_LABEL={kind:o.ILabel},t.TYPE_D_LABEL={kind:o.DLabel},t.TYPE_S_LABEL={kind:o.SLabel},t.TYPE_STRING={kind:o.String},t.TYPE_I_LABEL_VAR={kind:o.ILabelVar},t.TYPE_REG_REF={kind:o.RegRef},t.TYPE_REG_REF_VAR={kind:o.RegRefVar},t.TYPE_POINTER={kind:o.Pointer},t.MIN_SIGNED_DWORD_VALUE=-Math.pow(2,31),t.MAX_SIGNED_DWORD_VALUE=Math.pow(2,31)-1,t.MIN_UNSIGNED_DWORD_VALUE=0,t.MAX_UNSIGNED_DWORD_VALUE=Math.pow(2,32)-1,t.MIN_DWORD_VALUE=t.MIN_SIGNED_DWORD_VALUE,t.MAX_DWORD_VALUE=t.MAX_UNSIGNED_DWORD_VALUE,function(e){e[e.Read=0]="Read",e[e.Write=1]="Write",e[e.ReadWrite=2]="ReadWrite"}(n=t.ParamAccess||(t.ParamAccess={}));class r{constructor(e,t,i){this.type=e,this.doc=t,this.access=i}}t.Param=r,function(e){e[e.Push=0]="Push",e[e.Pop=1]="Pop"}(s=t.StackInteraction||(t.StackInteraction={})),t.OPCODES=[],t.OPCODES_BY_MNEMONIC=new Map;class a{constructor(e,t,i,o,n){this.code=e,this.mnemonic=t,this.doc=i,this.size=this.code<256?1:2,this.params=o,this.stack=n}}t.Opcode=a,a.NOP=t.OPCODES[0]=new a(0,"nop","No operation, does nothing.",[],void 0),a.RET=t.OPCODES[1]=new a(1,"ret","Returns control to caller.",[],void 0),a.SYNC=t.OPCODES[2]=new a(2,"sync","Yields control for the rest of the current frame. Execution will continue the following frame.",[],void 0),a.EXIT=t.OPCODES[3]=new a(3,"exit",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.THREAD=t.OPCODES[4]=new a(4,"thread","Starts a new thread. Thread execution will start at the given label.\nOften used to check a register every frame. Make sure to yield control with sync when looping.",[new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.VA_START=t.OPCODES[5]=new a(5,"va_start","Initializes a variable argument list.\nMake sure to call va_end after va_start and va_call.",[],void 0),a.VA_END=t.OPCODES[6]=new a(6,"va_end","Restores the registers overwritten by arg_push* instructions.\nCalled after va_call.",[],void 0),a.VA_CALL=t.OPCODES[7]=new a(7,"va_call","Calls the variable argument function at the given label.\nCalled after initializing the argument list with va_start and pushing arguments onto the stack with arg_push* instructions. Make sure to call va_end afterwards.",[new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.LET=t.OPCODES[8]=new a(8,"let","Sets the first register's value to second one's value.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0)],void 0),a.LETI=t.OPCODES[9]=new a(9,"leti","Sets a register to the given value.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],void 0),a.LETB=t.OPCODES[10]=new a(10,"letb","Sets a register to the given value.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_BYTE,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_BYTE,void 0,void 0)],void 0),a.LETW=t.OPCODES[11]=new a(11,"letw","Sets a register to the given value.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_WORD,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_WORD,void 0,void 0)],void 0),a.LETA=t.OPCODES[12]=new a(12,"leta","Sets the first register to the memory address of the second register. Not used by Sega.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_POINTER,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.LETO=t.OPCODES[13]=new a(13,"leto","Sets a register to the memory address of the given label. Not used by Sega.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_POINTER,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_LABEL,void 0,void 0)],void 0),a.UNKNOWN_0E=t.OPCODES[14]=new a(14,"unknown_0e",void 0,[],void 0),a.UNKNOWN_0F=t.OPCODES[15]=new a(15,"unknown_0f",void 0,[],void 0),a.SET=t.OPCODES[16]=new a(16,"set","Sets a register to 1.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.CLEAR=t.OPCODES[17]=new a(17,"clear","Sets a register to 0.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.REV=t.OPCODES[18]=new a(18,"rev","Sets a register to 1 if its current value is 0, otherwise sets it to 0.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.ReadWrite)]},void 0,void 0)],void 0),a.GSET=t.OPCODES[19]=new a(19,"gset",void 0,[new r(t.TYPE_WORD,void 0,void 0)],void 0),a.GCLEAR=t.OPCODES[20]=new a(20,"gclear",void 0,[new r(t.TYPE_WORD,void 0,void 0)],void 0),a.GREV=t.OPCODES[21]=new a(21,"grev",void 0,[new r(t.TYPE_WORD,void 0,void 0)],void 0),a.GLET=t.OPCODES[22]=new a(22,"glet",void 0,[new r(t.TYPE_WORD,void 0,void 0)],void 0),a.GGET=t.OPCODES[23]=new a(23,"gget","Sets a register to value of the given flag.",[new r(t.TYPE_WORD,void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_WORD,void 0,n.Write)]},void 0,void 0)],void 0),a.ADD=t.OPCODES[24]=new a(24,"add",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0)],void 0),a.ADDI=t.OPCODES[25]=new a(25,"addi",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],void 0),a.SUB=t.OPCODES[26]=new a(26,"sub",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0)],void 0),a.SUBI=t.OPCODES[27]=new a(27,"subi",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],void 0),a.MUL=t.OPCODES[28]=new a(28,"mul",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0)],void 0),a.MULI=t.OPCODES[29]=new a(29,"muli",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],void 0),a.DIV=t.OPCODES[30]=new a(30,"div",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0)],void 0),a.DIVI=t.OPCODES[31]=new a(31,"divi",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],void 0),a.AND=t.OPCODES[32]=new a(32,"and",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0)],void 0),a.ANDI=t.OPCODES[33]=new a(33,"andi",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],void 0),a.OR=t.OPCODES[34]=new a(34,"or",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0)],void 0),a.ORI=t.OPCODES[35]=new a(35,"ori",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],void 0),a.XOR=t.OPCODES[36]=new a(36,"xor",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0)],void 0),a.XORI=t.OPCODES[37]=new a(37,"xori",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],void 0),a.MOD=t.OPCODES[38]=new a(38,"mod",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0)],void 0),a.MODI=t.OPCODES[39]=new a(39,"modi",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],void 0),a.JMP=t.OPCODES[40]=new a(40,"jmp",void 0,[new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.CALL=t.OPCODES[41]=new a(41,"call",void 0,[new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.JMP_ON=t.OPCODES[42]=new a(42,"jmp_on",void 0,[new r(t.TYPE_I_LABEL,void 0,void 0),new r(t.TYPE_REG_REF_VAR,void 0,n.Read)],void 0),a.JMP_OFF=t.OPCODES[43]=new a(43,"jmp_off",void 0,[new r(t.TYPE_I_LABEL,void 0,void 0),new r(t.TYPE_REG_REF_VAR,void 0,n.Read)],void 0),a.JMP_E=t.OPCODES[44]=new a(44,"jmp_=",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.JMPI_E=t.OPCODES[45]=new a(45,"jmpi_=",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.JMP_NE=t.OPCODES[46]=new a(46,"jmp_!=",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.JMPI_NE=t.OPCODES[47]=new a(47,"jmpi_!=",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.UJMP_G=t.OPCODES[48]=new a(48,"ujmp_>",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.UJMPI_G=t.OPCODES[49]=new a(49,"ujmpi_>",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.JMP_G=t.OPCODES[50]=new a(50,"jmp_>",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.JMPI_G=t.OPCODES[51]=new a(51,"jmpi_>",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.UJMP_L=t.OPCODES[52]=new a(52,"ujmp_<",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.UJMPI_L=t.OPCODES[53]=new a(53,"ujmpi_<",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.JMP_L=t.OPCODES[54]=new a(54,"jmp_<",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.JMPI_L=t.OPCODES[55]=new a(55,"jmpi_<",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.UJMP_GE=t.OPCODES[56]=new a(56,"ujmp_>=",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.UJMPI_GE=t.OPCODES[57]=new a(57,"ujmpi_>=",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.JMP_GE=t.OPCODES[58]=new a(58,"jmp_>=",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.JMPI_GE=t.OPCODES[59]=new a(59,"jmpi_>=",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.UJMP_LE=t.OPCODES[60]=new a(60,"ujmp_<=",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.UJMPI_LE=t.OPCODES[61]=new a(61,"ujmpi_<=",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.JMP_LE=t.OPCODES[62]=new a(62,"jmp_<=",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.JMPI_LE=t.OPCODES[63]=new a(63,"jmpi_<=",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.SWITCH_JMP=t.OPCODES[64]=new a(64,"switch_jmp",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_I_LABEL_VAR,void 0,void 0)],void 0),a.SWITCH_CALL=t.OPCODES[65]=new a(65,"switch_call",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_I_LABEL_VAR,void 0,void 0)],void 0),a.STACK_PUSH=t.OPCODES[66]=new a(66,"stack_push",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.STACK_POP=t.OPCODES[67]=new a(67,"stack_pop",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.STACK_PUSHM=t.OPCODES[68]=new a(68,"stack_pushm","Pushes the values of an arbitrary amount of registers onto the stack.",[new r(t.TYPE_REG_REF,void 0,n.Read),new r(t.TYPE_DWORD,void 0,void 0)],void 0),a.STACK_POPM=t.OPCODES[69]=new a(69,"stack_popm","Pops an arbitrary amount of values from the stack and writes them to registers.",[new r(t.TYPE_REG_REF,void 0,n.Write),new r(t.TYPE_DWORD,void 0,void 0)],void 0),a.UNKNOWN_46=t.OPCODES[70]=new a(70,"unknown_46",void 0,[],void 0),a.UNKNOWN_47=t.OPCODES[71]=new a(71,"unknown_47",void 0,[],void 0),a.ARG_PUSHR=t.OPCODES[72]=new a(72,"arg_pushr","Pushes the value of the given register onto the stack.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],s.Push),a.ARG_PUSHL=t.OPCODES[73]=new a(73,"arg_pushl","Pushes the given value onto the stack.",[new r(t.TYPE_DWORD,void 0,void 0)],s.Push),a.ARG_PUSHB=t.OPCODES[74]=new a(74,"arg_pushb","Pushes the given value onto the stack.",[new r(t.TYPE_BYTE,void 0,void 0)],s.Push),a.ARG_PUSHW=t.OPCODES[75]=new a(75,"arg_pushw","Pushes the given value onto the stack.",[new r(t.TYPE_WORD,void 0,void 0)],s.Push),a.ARG_PUSHA=t.OPCODES[76]=new a(76,"arg_pusha","Pushes the memory address of the given register onto the stack. Not used by Sega.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],s.Push),a.ARG_PUSHO=t.OPCODES[77]=new a(77,"arg_pusho","Pushes the memory address of the given label onto the stack. Not used by Sega.",[new r(t.TYPE_LABEL,void 0,void 0)],s.Push),a.ARG_PUSHS=t.OPCODES[78]=new a(78,"arg_pushs","Pushes the given value onto the stack.",[new r(t.TYPE_STRING,void 0,void 0)],s.Push),a.UNKNOWN_4F=t.OPCODES[79]=new a(79,"unknown_4f",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.MESSAGE=t.OPCODES[80]=new a(80,"message",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_STRING,void 0,void 0)],s.Pop),a.LIST=t.OPCODES[81]=new a(81,"list","Used to display a list of items and retrieve the item selected by the player.\nList items should be seperated by newlines. The selected item's index will be written to the given register.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_BYTE,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_STRING,void 0,void 0)],s.Pop),a.FADEIN=t.OPCODES[82]=new a(82,"fadein",void 0,[],void 0),a.FADEOUT=t.OPCODES[83]=new a(83,"fadeout",void 0,[],void 0),a.SE=t.OPCODES[84]=new a(84,"se",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.BGM=t.OPCODES[85]=new a(85,"bgm",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_56=t.OPCODES[86]=new a(86,"unknown_56",void 0,[],void 0),a.UNKNOWN_57=t.OPCODES[87]=new a(87,"unknown_57",void 0,[],void 0),a.ENABLE=t.OPCODES[88]=new a(88,"enable",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.DISABLE=t.OPCODES[89]=new a(89,"disable",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.WINDOW_MSG=t.OPCODES[90]=new a(90,"window_msg",void 0,[new r(t.TYPE_STRING,void 0,void 0)],s.Pop),a.ADD_MSG=t.OPCODES[91]=new a(91,"add_msg",void 0,[new r(t.TYPE_STRING,void 0,void 0)],s.Pop),a.MESEND=t.OPCODES[92]=new a(92,"mesend",void 0,[],void 0),a.GETTIME=t.OPCODES[93]=new a(93,"gettime",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.WINEND=t.OPCODES[94]=new a(94,"winend",void 0,[],void 0),a.UNKNOWN_5F=t.OPCODES[95]=new a(95,"unknown_5f",void 0,[],void 0),a.NPC_CRT_V3=t.OPCODES[96]=new a(96,"npc_crt_v3",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.NPC_STOP=t.OPCODES[97]=new a(97,"npc_stop",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.NPC_PLAY=t.OPCODES[98]=new a(98,"npc_play",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.NPC_KILL=t.OPCODES[99]=new a(99,"npc_kill",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.NPC_NONT=t.OPCODES[100]=new a(100,"npc_nont",void 0,[],void 0),a.NPC_TALK=t.OPCODES[101]=new a(101,"npc_talk",void 0,[],void 0),a.NPC_CRP_V3=t.OPCODES[102]=new a(102,"npc_crp_v3",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read),new r(t.TYPE_ANY,void 0,n.Read),new r(t.TYPE_ANY,void 0,n.Read),new r(t.TYPE_I_LABEL,void 0,n.Read),new r(t.TYPE_ANY,void 0,n.Read),new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.UNKNOWN_67=t.OPCODES[103]=new a(103,"unknown_67",void 0,[],void 0),a.CREATE_PIPE=t.OPCODES[104]=new a(104,"create_pipe",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.P_HPSTAT_V3=t.OPCODES[105]=new a(105,"p_hpstat_v3",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.P_DEAD_V3=t.OPCODES[106]=new a(106,"p_dead_v3",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_DWORD,"Player slot.",void 0)],s.Pop),a.P_DISABLEWARP=t.OPCODES[107]=new a(107,"p_disablewarp",void 0,[],void 0),a.P_ENABLEWARP=t.OPCODES[108]=new a(108,"p_enablewarp",void 0,[],void 0),a.P_MOVE_V3=t.OPCODES[109]=new a(109,"p_move_v3",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.P_LOOK=t.OPCODES[110]=new a(110,"p_look",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_6F=t.OPCODES[111]=new a(111,"unknown_6f",void 0,[],void 0),a.P_ACTION_DISABLE=t.OPCODES[112]=new a(112,"p_action_disable",void 0,[],void 0),a.P_ACTION_ENABLE=t.OPCODES[113]=new a(113,"p_action_enable",void 0,[],void 0),a.DISABLE_MOVEMENT1=t.OPCODES[114]=new a(114,"disable_movement1",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.ENABLE_MOVEMENT1=t.OPCODES[115]=new a(115,"enable_movement1",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.P_NONCOL=t.OPCODES[116]=new a(116,"p_noncol",void 0,[],void 0),a.P_COL=t.OPCODES[117]=new a(117,"p_col",void 0,[],void 0),a.P_SETPOS=t.OPCODES[118]=new a(118,"p_setpos","Sets a player's position.",[new r(t.TYPE_DWORD,"Player slot.",void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"X coordinate.",n.Read),new r(t.TYPE_DWORD,"Y coordinate.",n.Read),new r(t.TYPE_DWORD,"Z coordinate.",n.Read),new r(t.TYPE_DWORD,"Y-axis rotation.",n.Read)]},void 0,void 0)],s.Pop),a.P_RETURN_GUILD=t.OPCODES[119]=new a(119,"p_return_guild",void 0,[],void 0),a.P_TALK_GUILD=t.OPCODES[120]=new a(120,"p_talk_guild",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.NPC_TALK_PL_V3=t.OPCODES[121]=new a(121,"npc_talk_pl_v3",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.NPC_TALK_KILL=t.OPCODES[122]=new a(122,"npc_talk_kill",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.NPC_CRTPK_V3=t.OPCODES[123]=new a(123,"npc_crtpk_v3",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.NPC_CRPPK_V3=t.OPCODES[124]=new a(124,"npc_crppk_v3",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.NPC_CRPTALK_V3=t.OPCODES[125]=new a(125,"npc_crptalk_v3",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.P_LOOK_AT_V1=t.OPCODES[126]=new a(126,"p_look_at_v1",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.NPC_CRP_ID_V3=t.OPCODES[127]=new a(127,"npc_crp_id_v3",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.CAM_QUAKE=t.OPCODES[128]=new a(128,"cam_quake",void 0,[],void 0),a.CAM_ADJ=t.OPCODES[129]=new a(129,"cam_adj",void 0,[],void 0),a.CAM_ZMIN=t.OPCODES[130]=new a(130,"cam_zmin",void 0,[],void 0),a.CAM_ZMOUT=t.OPCODES[131]=new a(131,"cam_zmout",void 0,[],void 0),a.CAM_PAN_V3=t.OPCODES[132]=new a(132,"cam_pan_v3",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0)],void 0),a.GAME_LEV_SUPER=t.OPCODES[133]=new a(133,"game_lev_super",void 0,[],void 0),a.GAME_LEV_RESET=t.OPCODES[134]=new a(134,"game_lev_reset",void 0,[],void 0),a.POS_PIPE_V3=t.OPCODES[135]=new a(135,"pos_pipe_v3","Create a telepipe at a specific position for the given player slot that takes players back to Pioneer 2 or the Lab.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"X coordinate.",n.Read),new r(t.TYPE_DWORD,"Y coordinate.",n.Read),new r(t.TYPE_DWORD,"Z coordinate.",n.Read),new r(t.TYPE_DWORD,"Player slot.",n.Read)]},void 0,void 0)],void 0),a.IF_ZONE_CLEAR=t.OPCODES[136]=new a(136,"if_zone_clear",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0)],void 0),a.CHK_ENE_NUM=t.OPCODES[137]=new a(137,"chk_ene_num","Retrieves the amount of enemies killed during the quest.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.UNHIDE_OBJ=t.OPCODES[138]=new a(138,"unhide_obj",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0)],void 0),a.UNHIDE_ENE=t.OPCODES[139]=new a(139,"unhide_ene",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0)],void 0),a.AT_COORDS_CALL=t.OPCODES[140]=new a(140,"at_coords_call",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_I_LABEL,void 0,n.Read)]},void 0,void 0)],void 0),a.AT_COORDS_TALK=t.OPCODES[141]=new a(141,"at_coords_talk",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_I_LABEL,void 0,n.Read)]},void 0,void 0)],void 0),a.COL_NPCIN=t.OPCODES[142]=new a(142,"col_npcin",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_I_LABEL,void 0,n.Read)]},void 0,void 0)],void 0),a.COL_NPCINR=t.OPCODES[143]=new a(143,"col_npcinr",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.SWITCH_ON=t.OPCODES[144]=new a(144,"switch_on",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.SWITCH_OFF=t.OPCODES[145]=new a(145,"switch_off",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.PLAYBGM_EPI=t.OPCODES[146]=new a(146,"playbgm_epi",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.SET_MAINWARP=t.OPCODES[147]=new a(147,"set_mainwarp",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.SET_OBJ_PARAM=t.OPCODES[148]=new a(148,"set_obj_param","Creates a targetable object.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"X coordinate.",n.Read),new r(t.TYPE_DWORD,"Y coordinate.",n.Read),new r(t.TYPE_DWORD,"Z coordinate.",n.Read),new r(t.TYPE_DWORD,"Collision radius.",n.Read),new r(t.TYPE_I_LABEL,"Function label.",n.Read),new r(t.TYPE_DWORD,"Vertical position of the cursor.",n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},"Object handle.",void 0)],void 0),a.SET_FLOOR_HANDLER=t.OPCODES[149]=new a(149,"set_floor_handler",void 0,[new r(t.TYPE_DWORD,"Floor number.",void 0),new r(t.TYPE_I_LABEL,"Handler function label.",void 0)],s.Pop),a.CLR_FLOOR_HANDLER=t.OPCODES[150]=new a(150,"clr_floor_handler",void 0,[new r(t.TYPE_DWORD,"Floor number.",void 0)],s.Pop),a.COL_PLINAW=t.OPCODES[151]=new a(151,"col_plinaw",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.HUD_HIDE=t.OPCODES[152]=new a(152,"hud_hide",void 0,[],void 0),a.HUD_SHOW=t.OPCODES[153]=new a(153,"hud_show",void 0,[],void 0),a.CINE_ENABLE=t.OPCODES[154]=new a(154,"cine_enable",void 0,[],void 0),a.CINE_DISABLE=t.OPCODES[155]=new a(155,"cine_disable",void 0,[],void 0),a.UNKNOWN_9C=t.OPCODES[156]=new a(156,"unknown_9c",void 0,[],void 0),a.UNKNOWN_9D=t.OPCODES[157]=new a(157,"unknown_9d",void 0,[],void 0),a.UNKNOWN_9E=t.OPCODES[158]=new a(158,"unknown_9e",void 0,[],void 0),a.UNKNOWN_9F=t.OPCODES[159]=new a(159,"unknown_9f",void 0,[],void 0),a.UNKNOWN_A0=t.OPCODES[160]=new a(160,"unknown_a0",void 0,[],void 0),a.SET_QT_FAILURE=t.OPCODES[161]=new a(161,"set_qt_failure",void 0,[new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.SET_QT_SUCCESS=t.OPCODES[162]=new a(162,"set_qt_success",void 0,[new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.CLR_QT_FAILURE=t.OPCODES[163]=new a(163,"clr_qt_failure",void 0,[],void 0),a.CLR_QT_SUCCESS=t.OPCODES[164]=new a(164,"clr_qt_success",void 0,[],void 0),a.SET_QT_CANCEL=t.OPCODES[165]=new a(165,"set_qt_cancel",void 0,[new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.CLR_QT_CANCEL=t.OPCODES[166]=new a(166,"clr_qt_cancel",void 0,[],void 0),a.UNKNOWN_A7=t.OPCODES[167]=new a(167,"unknown_a7",void 0,[],void 0),a.PL_WALK_V3=t.OPCODES[168]=new a(168,"pl_walk_v3",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.UNKNOWN_A9=t.OPCODES[169]=new a(169,"unknown_a9",void 0,[],void 0),a.UNKNOWN_AA=t.OPCODES[170]=new a(170,"unknown_aa",void 0,[],void 0),a.UNKNOWN_AB=t.OPCODES[171]=new a(171,"unknown_ab",void 0,[],void 0),a.UNKNOWN_AC=t.OPCODES[172]=new a(172,"unknown_ac",void 0,[],void 0),a.UNKNOWN_AD=t.OPCODES[173]=new a(173,"unknown_ad",void 0,[],void 0),a.UNKNOWN_AE=t.OPCODES[174]=new a(174,"unknown_ae",void 0,[],void 0),a.UNKNOWN_AF=t.OPCODES[175]=new a(175,"unknown_af",void 0,[],void 0),a.PL_ADD_MESETA=t.OPCODES[176]=new a(176,"pl_add_meseta",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.THREAD_STG=t.OPCODES[177]=new a(177,"thread_stg",void 0,[new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.DEL_OBJ_PARAM=t.OPCODES[178]=new a(178,"del_obj_param",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},"Object handle.",void 0)],void 0),a.ITEM_CREATE=t.OPCODES[179]=new a(179,"item_create",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.ITEM_CREATE2=t.OPCODES[180]=new a(180,"item_create2",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.ITEM_DELETE=t.OPCODES[181]=new a(181,"item_delete",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.ITEM_DELETE2=t.OPCODES[182]=new a(182,"item_delete2","Deletes an item from the player's inventory.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.ITEM_CHECK=t.OPCODES[183]=new a(183,"item_check",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.SETEVT=t.OPCODES[184]=new a(184,"setevt",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.GET_DIFFLVL=t.OPCODES[185]=new a(185,"get_difflvl","Sets the given register to the current difficulty. 0 For normal, 1 for hard and 2 for both very hard and ultimate.\nUse get_difficulty_level2 if you want to differentiate between very hard and ultimate.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.SET_QT_EXIT=t.OPCODES[186]=new a(186,"set_qt_exit",void 0,[new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.CLR_QT_EXIT=t.OPCODES[187]=new a(187,"clr_qt_exit",void 0,[],void 0),a.UNKNOWN_BC=t.OPCODES[188]=new a(188,"unknown_bc",void 0,[],void 0),a.UNKNOWN_BD=t.OPCODES[189]=new a(189,"unknown_bd",void 0,[],void 0),a.UNKNOWN_BE=t.OPCODES[190]=new a(190,"unknown_be",void 0,[],void 0),a.UNKNOWN_BF=t.OPCODES[191]=new a(191,"unknown_bf",void 0,[],void 0),a.PARTICLE_V3=t.OPCODES[192]=new a(192,"particle_v3",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.NPC_TEXT=t.OPCODES[193]=new a(193,"npc_text",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_STRING,void 0,void 0)],s.Pop),a.NPC_CHKWARP=t.OPCODES[194]=new a(194,"npc_chkwarp",void 0,[],void 0),a.PL_PKOFF=t.OPCODES[195]=new a(195,"pl_pkoff",void 0,[],void 0),a.MAP_DESIGNATE=t.OPCODES[196]=new a(196,"map_designate",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.MASTERKEY_ON=t.OPCODES[197]=new a(197,"masterkey_on",void 0,[],void 0),a.MASTERKEY_OFF=t.OPCODES[198]=new a(198,"masterkey_off",void 0,[],void 0),a.WINDOW_TIME=t.OPCODES[199]=new a(199,"window_time",void 0,[],void 0),a.WINEND_TIME=t.OPCODES[200]=new a(200,"winend_time",void 0,[],void 0),a.WINSET_TIME=t.OPCODES[201]=new a(201,"winset_time",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.GETMTIME=t.OPCODES[202]=new a(202,"getmtime",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.SET_QUEST_BOARD_HANDLER=t.OPCODES[203]=new a(203,"set_quest_board_handler",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0),new r(t.TYPE_STRING,void 0,void 0)],s.Pop),a.CLEAR_QUEST_BOARD_HANDLER=t.OPCODES[204]=new a(204,"clear_quest_board_handler",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.PARTICLE_ID_V3=t.OPCODES[205]=new a(205,"particle_id_v3",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0)],void 0),a.NPC_CRPTALK_ID_V3=t.OPCODES[206]=new a(206,"npc_crptalk_id_v3",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.NPC_LANG_CLEAN=t.OPCODES[207]=new a(207,"npc_lang_clean",void 0,[],void 0),a.PL_PKON=t.OPCODES[208]=new a(208,"pl_pkon",void 0,[],void 0),a.PL_CHK_ITEM2=t.OPCODES[209]=new a(209,"pl_chk_item2",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.ENABLE_MAINMENU=t.OPCODES[210]=new a(210,"enable_mainmenu",void 0,[],void 0),a.DISABLE_MAINMENU=t.OPCODES[211]=new a(211,"disable_mainmenu",void 0,[],void 0),a.START_BATTLEBGM=t.OPCODES[212]=new a(212,"start_battlebgm",void 0,[],void 0),a.END_BATTLEBGM=t.OPCODES[213]=new a(213,"end_battlebgm",void 0,[],void 0),a.DISP_MSG_QB=t.OPCODES[214]=new a(214,"disp_msg_qb",void 0,[new r(t.TYPE_STRING,void 0,void 0)],s.Pop),a.CLOSE_MSG_QB=t.OPCODES[215]=new a(215,"close_msg_qb",void 0,[],void 0),a.SET_EVENTFLAG_V3=t.OPCODES[216]=new a(216,"set_eventflag_v3",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.SYNC_LETI=t.OPCODES[217]=new a(217,"sync_leti",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],void 0),a.SET_RETURNHUNTER=t.OPCODES[218]=new a(218,"set_returnhunter",void 0,[],void 0),a.SET_RETURNCITY=t.OPCODES[219]=new a(219,"set_returncity",void 0,[],void 0),a.LOAD_PVR=t.OPCODES[220]=new a(220,"load_pvr",void 0,[],void 0),a.LOAD_MIDI=t.OPCODES[221]=new a(221,"load_midi",void 0,[],void 0),a.UNKNOWN_DE=t.OPCODES[222]=new a(222,"unknown_de",void 0,[],void 0),a.NPC_PARAM_V3=t.OPCODES[223]=new a(223,"npc_param_v3",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.PAD_DRAGON=t.OPCODES[224]=new a(224,"pad_dragon",void 0,[],void 0),a.CLEAR_MAINWARP=t.OPCODES[225]=new a(225,"clear_mainwarp",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.PCAM_PARAM_V3=t.OPCODES[226]=new a(226,"pcam_param_v3",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.START_SETEVT_V3=t.OPCODES[227]=new a(227,"start_setevt_v3",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.WARP_ON=t.OPCODES[228]=new a(228,"warp_on",void 0,[],void 0),a.WARP_OFF=t.OPCODES[229]=new a(229,"warp_off",void 0,[],void 0),a.GET_SLOTNUMBER=t.OPCODES[230]=new a(230,"get_slotnumber",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.GET_SERVERNUMBER=t.OPCODES[231]=new a(231,"get_servernumber",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.SET_EVENTFLAG2=t.OPCODES[232]=new a(232,"set_eventflag2",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],s.Pop),a.RES=t.OPCODES[233]=new a(233,"res",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.UNKNOWN_EA=t.OPCODES[234]=new a(234,"unknown_ea",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],void 0),a.ENABLE_BGMCTRL=t.OPCODES[235]=new a(235,"enable_bgmctrl",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.SW_SEND=t.OPCODES[236]=new a(236,"sw_send",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.CREATE_BGMCTRL=t.OPCODES[237]=new a(237,"create_bgmctrl",void 0,[],void 0),a.PL_ADD_MESETA2=t.OPCODES[238]=new a(238,"pl_add_meseta2",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.SYNC_REGISTER=t.OPCODES[239]=new a(239,"sync_register",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.SEND_REGWORK=t.OPCODES[240]=new a(240,"send_regwork",void 0,[],void 0),a.LETI_FIXED_CAMERA_V3=t.OPCODES[241]=new a(241,"leti_fixed_camera_v3",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0)],void 0),a.DEFAULT_CAMERA_POS1=t.OPCODES[242]=new a(242,"default_camera_pos1",void 0,[],void 0),a.UNKNOWN_F3=t.OPCODES[243]=new a(243,"unknown_f3",void 0,[],void 0),a.UNKNOWN_F4=t.OPCODES[244]=new a(244,"unknown_f4",void 0,[],void 0),a.UNKNOWN_F5=t.OPCODES[245]=new a(245,"unknown_f5",void 0,[],void 0),a.UNKNOWN_F6=t.OPCODES[246]=new a(246,"unknown_f6",void 0,[],void 0),a.UNKNOWN_F7=t.OPCODES[247]=new a(247,"unknown_f7",void 0,[],void 0),a.UNKNOWN_F8=t.OPCODES[248]=new a(248,"unknown_f8",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.UNKNOWN_F9=t.OPCODES[249]=new a(249,"unknown_f9",void 0,[],void 0),a.GET_GC_NUMBER=t.OPCODES[250]=new a(250,"get_gc_number",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.UNKNOWN_FB=t.OPCODES[251]=new a(251,"unknown_fb",void 0,[new r(t.TYPE_WORD,void 0,void 0)],void 0),a.UNKNOWN_FC=t.OPCODES[252]=new a(252,"unknown_fc",void 0,[],void 0),a.UNKNOWN_FD=t.OPCODES[253]=new a(253,"unknown_fd",void 0,[],void 0),a.UNKNOWN_FE=t.OPCODES[254]=new a(254,"unknown_fe",void 0,[],void 0),a.UNKNOWN_FF=t.OPCODES[255]=new a(255,"unknown_ff",void 0,[],void 0),a.UNKNOWN_F800=t.OPCODES[63488]=new a(63488,"unknown_f800",void 0,[],void 0),a.SET_CHAT_CALLBACK=t.OPCODES[63489]=new a(63489,"set_chat_callback",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_STRING,void 0,void 0)],s.Pop),a.UNKNOWN_F802=t.OPCODES[63490]=new a(63490,"unknown_f802",void 0,[],void 0),a.UNKNOWN_F803=t.OPCODES[63491]=new a(63491,"unknown_f803",void 0,[],void 0),a.UNKNOWN_F804=t.OPCODES[63492]=new a(63492,"unknown_f804",void 0,[],void 0),a.UNKNOWN_F805=t.OPCODES[63493]=new a(63493,"unknown_f805",void 0,[],void 0),a.UNKNOWN_F806=t.OPCODES[63494]=new a(63494,"unknown_f806",void 0,[],void 0),a.UNKNOWN_F807=t.OPCODES[63495]=new a(63495,"unknown_f807",void 0,[],void 0),a.GET_DIFFICULTY_LEVEL2=t.OPCODES[63496]=new a(63496,"get_difficulty_level2","Sets the given register to the current difficulty. 0 For normal, 1 for hard, 2 for very hard and 3 for ultimate.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.GET_NUMBER_OF_PLAYER1=t.OPCODES[63497]=new a(63497,"get_number_of_player1","Set the given register to the current number of players. Either 1, 2, 3 or 4.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.GET_COORD_OF_PLAYER=t.OPCODES[63498]=new a(63498,"get_coord_of_player","Retrieves a player's position.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"X coordinate.",n.Write),new r(t.TYPE_DWORD,"Y coordinate.",n.Write),new r(t.TYPE_DWORD,"Z coordinate.",n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player slot.",n.Read)]},void 0,void 0)],void 0),a.ENABLE_MAP=t.OPCODES[63499]=new a(63499,"enable_map",void 0,[],void 0),a.DISABLE_MAP=t.OPCODES[63500]=new a(63500,"disable_map",void 0,[],void 0),a.MAP_DESIGNATE_EX=t.OPCODES[63501]=new a(63501,"map_designate_ex",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0)],void 0),a.UNKNOWN_F80E=t.OPCODES[63502]=new a(63502,"unknown_f80e",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_F80F=t.OPCODES[63503]=new a(63503,"unknown_f80f",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.BA_INITIAL_FLOOR=t.OPCODES[63504]=new a(63504,"ba_initial_floor",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.SET_BA_RULES=t.OPCODES[63505]=new a(63505,"set_ba_rules",void 0,[],void 0),a.UNKNOWN_F812=t.OPCODES[63506]=new a(63506,"unknown_f812",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_F813=t.OPCODES[63507]=new a(63507,"unknown_f813",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_F814=t.OPCODES[63508]=new a(63508,"unknown_f814",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_F815=t.OPCODES[63509]=new a(63509,"unknown_f815",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_F816=t.OPCODES[63510]=new a(63510,"unknown_f816",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_F817=t.OPCODES[63511]=new a(63511,"unknown_f817",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_F818=t.OPCODES[63512]=new a(63512,"unknown_f818",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_F819=t.OPCODES[63513]=new a(63513,"unknown_f819",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_F81A=t.OPCODES[63514]=new a(63514,"unknown_f81a",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_F81B=t.OPCODES[63515]=new a(63515,"unknown_f81b",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.BA_DISP_MSG=t.OPCODES[63516]=new a(63516,"ba_disp_msg",void 0,[new r(t.TYPE_STRING,void 0,void 0)],s.Pop),a.DEATH_LVL_UP=t.OPCODES[63517]=new a(63517,"death_lvl_up",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.DEATH_TECH_LVL_UP=t.OPCODES[63518]=new a(63518,"death_tech_lvl_up",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_F81F=t.OPCODES[63519]=new a(63519,"unknown_f81f",void 0,[],void 0),a.CMODE_STAGE=t.OPCODES[63520]=new a(63520,"cmode_stage",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_F821=t.OPCODES[63521]=new a(63521,"unknown_f821",void 0,[],void 0),a.UNKNOWN_F822=t.OPCODES[63522]=new a(63522,"unknown_f822",void 0,[],void 0),a.UNKNOWN_F823=t.OPCODES[63523]=new a(63523,"unknown_f823",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_F824=t.OPCODES[63524]=new a(63524,"unknown_f824",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.EXP_MULTIPLICATION=t.OPCODES[63525]=new a(63525,"exp_multiplication",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.EXP_DIVISION=t.OPCODES[63526]=new a(63526,"exp_division",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.GET_USER_IS_DEAD=t.OPCODES[63527]=new a(63527,"get_user_is_dead",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.GO_FLOOR=t.OPCODES[63528]=new a(63528,"go_floor","Sends a player to the given floor.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player slot.",n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Floor ID.",n.Read)]},void 0,void 0)],void 0),a.UNKNOWN_F829=t.OPCODES[63529]=new a(63529,"unknown_f829",void 0,[],void 0),a.UNKNOWN_F82A=t.OPCODES[63530]=new a(63530,"unknown_f82a",void 0,[],void 0),a.UNLOCK_DOOR2=t.OPCODES[63531]=new a(63531,"unlock_door2",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.LOCK_DOOR2=t.OPCODES[63532]=new a(63532,"lock_door2",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.IF_SWITCH_NOT_PRESSED=t.OPCODES[63533]=new a(63533,"if_switch_not_pressed",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.IF_SWITCH_PRESSED=t.OPCODES[63534]=new a(63534,"if_switch_pressed",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Floor ID.",n.Read),new r(t.TYPE_DWORD,"Switch ID.",n.Read),new r(t.TYPE_DWORD,"Will be set to 1 if the switch is pressed, 0 otherwise.",n.Write)]},void 0,void 0)],void 0),a.UNKNOWN_F82F=t.OPCODES[63535]=new a(63535,"unknown_f82f",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.CONTROL_DRAGON=t.OPCODES[63536]=new a(63536,"control_dragon",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0)],void 0),a.RELEASE_DRAGON=t.OPCODES[63537]=new a(63537,"release_dragon",void 0,[],void 0),a.UNKNOWN_F832=t.OPCODES[63538]=new a(63538,"unknown_f832",void 0,[],void 0),a.UNKNOWN_F833=t.OPCODES[63539]=new a(63539,"unknown_f833",void 0,[],void 0),a.UNKNOWN_F834=t.OPCODES[63540]=new a(63540,"unknown_f834",void 0,[],void 0),a.UNKNOWN_F835=t.OPCODES[63541]=new a(63541,"unknown_f835",void 0,[],void 0),a.UNKNOWN_F836=t.OPCODES[63542]=new a(63542,"unknown_f836",void 0,[],void 0),a.UNKNOWN_F837=t.OPCODES[63543]=new a(63543,"unknown_f837",void 0,[],void 0),a.SHRINK=t.OPCODES[63544]=new a(63544,"shrink",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player slot.",n.Read)]},void 0,void 0)],void 0),a.UNSHRINK=t.OPCODES[63545]=new a(63545,"unshrink",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player slot.",n.Read)]},void 0,void 0)],void 0),a.UNKNOWN_F83A=t.OPCODES[63546]=new a(63546,"unknown_f83a",void 0,[],void 0),a.UNKNOWN_F83B=t.OPCODES[63547]=new a(63547,"unknown_f83b",void 0,[],void 0),a.DISPLAY_CLOCK2=t.OPCODES[63548]=new a(63548,"display_clock2",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0)],void 0),a.UNKNOWN_F83D=t.OPCODES[63549]=new a(63549,"unknown_f83d",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.DELETE_AREA_TITLE=t.OPCODES[63550]=new a(63550,"delete_area_title",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_F83F=t.OPCODES[63551]=new a(63551,"unknown_f83f",void 0,[],void 0),a.LOAD_NPC_DATA=t.OPCODES[63552]=new a(63552,"load_npc_data",void 0,[],void 0),a.GET_NPC_DATA=t.OPCODES[63553]=new a(63553,"get_npc_data",void 0,[new r(t.TYPE_D_LABEL,void 0,void 0)],void 0),a.UNKNOWN_F842=t.OPCODES[63554]=new a(63554,"unknown_f842",void 0,[],void 0),a.UNKNOWN_F843=t.OPCODES[63555]=new a(63555,"unknown_f843",void 0,[],void 0),a.UNKNOWN_F844=t.OPCODES[63556]=new a(63556,"unknown_f844",void 0,[],void 0),a.UNKNOWN_F845=t.OPCODES[63557]=new a(63557,"unknown_f845",void 0,[],void 0),a.UNKNOWN_F846=t.OPCODES[63558]=new a(63558,"unknown_f846",void 0,[],void 0),a.UNKNOWN_F847=t.OPCODES[63559]=new a(63559,"unknown_f847",void 0,[],void 0),a.GIVE_DAMAGE_SCORE=t.OPCODES[63560]=new a(63560,"give_damage_score",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.TAKE_DAMAGE_SCORE=t.OPCODES[63561]=new a(63561,"take_damage_score",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.UNK_SCORE_F84A=t.OPCODES[63562]=new a(63562,"unk_score_f84a",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.UNK_SCORE_F84B=t.OPCODES[63563]=new a(63563,"unk_score_f84b",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.KILL_SCORE=t.OPCODES[63564]=new a(63564,"kill_score",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.DEATH_SCORE=t.OPCODES[63565]=new a(63565,"death_score",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.UNK_SCORE_F84E=t.OPCODES[63566]=new a(63566,"unk_score_f84e",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.ENEMY_DEATH_SCORE=t.OPCODES[63567]=new a(63567,"enemy_death_score",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.MESETA_SCORE=t.OPCODES[63568]=new a(63568,"meseta_score",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.UNKNOWN_F851=t.OPCODES[63569]=new a(63569,"unknown_f851",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.UNKNOWN_F852=t.OPCODES[63570]=new a(63570,"unknown_f852",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.REVERSE_WARPS=t.OPCODES[63571]=new a(63571,"reverse_warps",void 0,[],void 0),a.UNREVERSE_WARPS=t.OPCODES[63572]=new a(63572,"unreverse_warps",void 0,[],void 0),a.SET_ULT_MAP=t.OPCODES[63573]=new a(63573,"set_ult_map",void 0,[],void 0),a.UNSET_ULT_MAP=t.OPCODES[63574]=new a(63574,"unset_ult_map",void 0,[],void 0),a.SET_AREA_TITLE=t.OPCODES[63575]=new a(63575,"set_area_title",void 0,[new r(t.TYPE_STRING,void 0,void 0)],s.Pop),a.UNKNOWN_F858=t.OPCODES[63576]=new a(63576,"unknown_f858",void 0,[],void 0),a.UNKNOWN_F859=t.OPCODES[63577]=new a(63577,"unknown_f859",void 0,[],void 0),a.EQUIP_ITEM=t.OPCODES[63578]=new a(63578,"equip_item",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0)],void 0),a.UNEQUIP_ITEM=t.OPCODES[63579]=new a(63579,"unequip_item",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_F85C=t.OPCODES[63580]=new a(63580,"unknown_f85c",void 0,[],void 0),a.UNKNOWN_F85D=t.OPCODES[63581]=new a(63581,"unknown_f85d",void 0,[],void 0),a.UNKNOWN_F85E=t.OPCODES[63582]=new a(63582,"unknown_f85e",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_F85F=t.OPCODES[63583]=new a(63583,"unknown_f85f",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_F860=t.OPCODES[63584]=new a(63584,"unknown_f860",void 0,[],void 0),a.UNKNOWN_F861=t.OPCODES[63585]=new a(63585,"unknown_f861",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_F862=t.OPCODES[63586]=new a(63586,"unknown_f862",void 0,[],void 0),a.UNKNOWN_F863=t.OPCODES[63587]=new a(63587,"unknown_f863",void 0,[],void 0),a.CMODE_RANK=t.OPCODES[63588]=new a(63588,"cmode_rank",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_STRING,void 0,void 0)],s.Pop),a.AWARD_ITEM_NAME=t.OPCODES[63589]=new a(63589,"award_item_name",void 0,[],void 0),a.AWARD_ITEM_SELECT=t.OPCODES[63590]=new a(63590,"award_item_select",void 0,[],void 0),a.AWARD_ITEM_GIVE_TO=t.OPCODES[63591]=new a(63591,"award_item_give_to",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0)],void 0),a.UNKNOWN_F868=t.OPCODES[63592]=new a(63592,"unknown_f868",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.UNKNOWN_F869=t.OPCODES[63593]=new a(63593,"unknown_f869",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.ITEM_CREATE_CMODE=t.OPCODES[63594]=new a(63594,"item_create_cmode",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.UNKNOWN_F86B=t.OPCODES[63595]=new a(63595,"unknown_f86b",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.AWARD_ITEM_OK=t.OPCODES[63596]=new a(63596,"award_item_ok",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.UNKNOWN_F86D=t.OPCODES[63597]=new a(63597,"unknown_f86d",void 0,[],void 0),a.UNKNOWN_F86E=t.OPCODES[63598]=new a(63598,"unknown_f86e",void 0,[],void 0),a.BA_SET_LIVES=t.OPCODES[63599]=new a(63599,"ba_set_lives",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.BA_SET_TECH_LVL=t.OPCODES[63600]=new a(63600,"ba_set_tech_lvl",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.BA_SET_LVL=t.OPCODES[63601]=new a(63601,"ba_set_lvl",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.BA_SET_TIME_LIMIT=t.OPCODES[63602]=new a(63602,"ba_set_time_limit",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.BOSS_IS_DEAD=t.OPCODES[63603]=new a(63603,"boss_is_dead",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.UNKNOWN_F874=t.OPCODES[63604]=new a(63604,"unknown_f874",void 0,[],void 0),a.UNKNOWN_F875=t.OPCODES[63605]=new a(63605,"unknown_f875",void 0,[],void 0),a.UNKNOWN_F876=t.OPCODES[63606]=new a(63606,"unknown_f876",void 0,[],void 0),a.ENABLE_TECHS=t.OPCODES[63607]=new a(63607,"enable_techs","Enables technique use for the given player.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player slot.",n.Read)]},void 0,void 0)],void 0),a.DISABLE_TECHS=t.OPCODES[63608]=new a(63608,"disable_techs","Disables technique use for the given player.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player slot.",n.Read)]},void 0,void 0)],void 0),a.GET_GENDER=t.OPCODES[63609]=new a(63609,"get_gender","Retrieves the player's gender. 0 If male, 1 if female.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player slot.",n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player gender.",n.Write)]},void 0,void 0)],void 0),a.GET_CHARA_CLASS=t.OPCODES[63610]=new a(63610,"get_chara_class","Retrieves the player's race and character class.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player slot.",n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player race. 0 If human, 1 if newman, 2 if cast.",n.Write),new r(t.TYPE_DWORD,"Player class. 0 If hunter, 1 if ranger, 2 if force.",n.Write)]},void 0,void 0)],void 0),a.TAKE_SLOT_MESETA=t.OPCODES[63611]=new a(63611,"take_slot_meseta","Takes an amount of meseta from a player's inventory.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player slot.",n.Read),new r(t.TYPE_DWORD,"Amount of meseta to take.",n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Will be set to 1 if the meseta was taken, 0 otherwise.",n.Write)]},void 0,void 0)],void 0),a.UNKNOWN_F87C=t.OPCODES[63612]=new a(63612,"unknown_f87c",void 0,[],void 0),a.UNKNOWN_F87D=t.OPCODES[63613]=new a(63613,"unknown_f87d",void 0,[],void 0),a.UNKNOWN_F87E=t.OPCODES[63614]=new a(63614,"unknown_f87e",void 0,[],void 0),a.READ_GUILDCARD_FLAG=t.OPCODES[63615]=new a(63615,"read_guildcard_flag",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.UNKNOWN_F880=t.OPCODES[63616]=new a(63616,"unknown_f880",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.GET_PL_NAME=t.OPCODES[63617]=new a(63617,"get_pl_name","Sets the value of to the given player's name.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player slot.",n.Read)]},void 0,void 0)],void 0),a.UNKNOWN_F882=t.OPCODES[63618]=new a(63618,"unknown_f882",void 0,[],void 0),a.UNKNOWN_F883=t.OPCODES[63619]=new a(63619,"unknown_f883",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.UNKNOWN_F884=t.OPCODES[63620]=new a(63620,"unknown_f884",void 0,[],void 0),a.UNKNOWN_F885=t.OPCODES[63621]=new a(63621,"unknown_f885",void 0,[],void 0),a.UNKNOWN_F886=t.OPCODES[63622]=new a(63622,"unknown_f886",void 0,[],void 0),a.UNKNOWN_F887=t.OPCODES[63623]=new a(63623,"unknown_f887",void 0,[],void 0),a.UNKNOWN_F888=t.OPCODES[63624]=new a(63624,"unknown_f888",void 0,[],void 0),a.UNKNOWN_F889=t.OPCODES[63625]=new a(63625,"unknown_f889",void 0,[],void 0),a.GET_PLAYER_STATUS=t.OPCODES[63626]=new a(63626,"get_player_status",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.SEND_MAIL=t.OPCODES[63627]=new a(63627,"send_mail",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_STRING,void 0,void 0)],s.Pop),a.ONLINE_CHECK=t.OPCODES[63628]=new a(63628,"online_check",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.CHL_SET_TIMERECORD=t.OPCODES[63629]=new a(63629,"chl_set_timerecord",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.CHL_GET_TIMERECORD=t.OPCODES[63630]=new a(63630,"chl_get_timerecord",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.UNKNOWN_F88F=t.OPCODES[63631]=new a(63631,"unknown_f88f",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.UNKNOWN_F890=t.OPCODES[63632]=new a(63632,"unknown_f890",void 0,[],void 0),a.LOAD_ENEMY_DATA=t.OPCODES[63633]=new a(63633,"load_enemy_data",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.GET_PHYSICAL_DATA=t.OPCODES[63634]=new a(63634,"get_physical_data",void 0,[new r(t.TYPE_WORD,void 0,void 0)],void 0),a.GET_ATTACK_DATA=t.OPCODES[63635]=new a(63635,"get_attack_data",void 0,[new r(t.TYPE_WORD,void 0,void 0)],void 0),a.GET_RESIST_DATA=t.OPCODES[63636]=new a(63636,"get_resist_data",void 0,[new r(t.TYPE_WORD,void 0,void 0)],void 0),a.GET_MOVEMENT_DATA=t.OPCODES[63637]=new a(63637,"get_movement_data",void 0,[new r(t.TYPE_WORD,void 0,void 0)],void 0),a.UNKNOWN_F896=t.OPCODES[63638]=new a(63638,"unknown_f896",void 0,[],void 0),a.UNKNOWN_F897=t.OPCODES[63639]=new a(63639,"unknown_f897",void 0,[],void 0),a.SHIFT_LEFT=t.OPCODES[63640]=new a(63640,"shift_left",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0)],void 0),a.SHIFT_RIGHT=t.OPCODES[63641]=new a(63641,"shift_right",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0)],void 0),a.GET_RANDOM=t.OPCODES[63642]=new a(63642,"get_random",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.RESET_MAP=t.OPCODES[63643]=new a(63643,"reset_map","Sets all registers to 0 and resets the quest.",[],void 0),a.DISP_CHL_RETRY_MENU=t.OPCODES[63644]=new a(63644,"disp_chl_retry_menu",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.CHL_REVERSER=t.OPCODES[63645]=new a(63645,"chl_reverser",void 0,[],void 0),a.UNKNOWN_F89E=t.OPCODES[63646]=new a(63646,"unknown_f89e",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_F89F=t.OPCODES[63647]=new a(63647,"unknown_f89f",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.UNKNOWN_F8A0=t.OPCODES[63648]=new a(63648,"unknown_f8a0",void 0,[],void 0),a.UNKNOWN_F8A1=t.OPCODES[63649]=new a(63649,"unknown_f8a1",void 0,[],void 0),a.UNKNOWN_F8A2=t.OPCODES[63650]=new a(63650,"unknown_f8a2",void 0,[],void 0),a.UNKNOWN_F8A3=t.OPCODES[63651]=new a(63651,"unknown_f8a3",void 0,[],void 0),a.UNKNOWN_F8A4=t.OPCODES[63652]=new a(63652,"unknown_f8a4",void 0,[],void 0),a.UNKNOWN_F8A5=t.OPCODES[63653]=new a(63653,"unknown_f8a5",void 0,[],void 0),a.UNKNOWN_F8A6=t.OPCODES[63654]=new a(63654,"unknown_f8a6",void 0,[],void 0),a.UNKNOWN_F8A7=t.OPCODES[63655]=new a(63655,"unknown_f8a7",void 0,[],void 0),a.UNKNOWN_F8A8=t.OPCODES[63656]=new a(63656,"unknown_f8a8",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_F8A9=t.OPCODES[63657]=new a(63657,"unknown_f8a9",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.UNKNOWN_F8AA=t.OPCODES[63658]=new a(63658,"unknown_f8aa",void 0,[],void 0),a.UNKNOWN_F8AB=t.OPCODES[63659]=new a(63659,"unknown_f8ab",void 0,[],void 0),a.UNKNOWN_F8AC=t.OPCODES[63660]=new a(63660,"unknown_f8ac",void 0,[],void 0),a.GET_NUMBER_OF_PLAYER2=t.OPCODES[63661]=new a(63661,"get_number_of_player2",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.UNKNOWN_F8AE=t.OPCODES[63662]=new a(63662,"unknown_f8ae",void 0,[],void 0),a.UNKNOWN_F8AF=t.OPCODES[63663]=new a(63663,"unknown_f8af",void 0,[],void 0),a.UNKNOWN_F8B0=t.OPCODES[63664]=new a(63664,"unknown_f8b0",void 0,[],void 0),a.UNKNOWN_F8B1=t.OPCODES[63665]=new a(63665,"unknown_f8b1",void 0,[],void 0),a.UNKNOWN_F8B2=t.OPCODES[63666]=new a(63666,"unknown_f8b2",void 0,[],void 0),a.UNKNOWN_F8B3=t.OPCODES[63667]=new a(63667,"unknown_f8b3",void 0,[],void 0),a.UNKNOWN_F8B4=t.OPCODES[63668]=new a(63668,"unknown_f8b4",void 0,[],void 0),a.UNKNOWN_F8B5=t.OPCODES[63669]=new a(63669,"unknown_f8b5",void 0,[],void 0),a.UNKNOWN_F8B6=t.OPCODES[63670]=new a(63670,"unknown_f8b6",void 0,[],void 0),a.UNKNOWN_F8B7=t.OPCODES[63671]=new a(63671,"unknown_f8b7",void 0,[],void 0),a.UNKNOWN_F8B8=t.OPCODES[63672]=new a(63672,"unknown_f8b8",void 0,[],void 0),a.CHL_RECOVERY=t.OPCODES[63673]=new a(63673,"chl_recovery",void 0,[],void 0),a.UNKNOWN_F8BA=t.OPCODES[63674]=new a(63674,"unknown_f8ba",void 0,[],void 0),a.UNKNOWN_F8BB=t.OPCODES[63675]=new a(63675,"unknown_f8bb",void 0,[],void 0),a.SET_EPISODE=t.OPCODES[63676]=new a(63676,"set_episode",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],void 0),a.UNKNOWN_F8BD=t.OPCODES[63677]=new a(63677,"unknown_f8bd",void 0,[],void 0),a.UNKNOWN_F8BE=t.OPCODES[63678]=new a(63678,"unknown_f8be",void 0,[],void 0),a.UNKNOWN_F8BF=t.OPCODES[63679]=new a(63679,"unknown_f8bf",void 0,[],void 0),a.FILE_DL_REQ=t.OPCODES[63680]=new a(63680,"file_dl_req",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_STRING,void 0,void 0)],s.Pop),a.GET_DL_STATUS=t.OPCODES[63681]=new a(63681,"get_dl_status",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.GBA_UNKNOWN4=t.OPCODES[63682]=new a(63682,"gba_unknown4",void 0,[],void 0),a.GET_GBA_STATE=t.OPCODES[63683]=new a(63683,"get_gba_state",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.UNKNOWN_F8C4=t.OPCODES[63684]=new a(63684,"unknown_f8c4",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.UNKNOWN_F8C5=t.OPCODES[63685]=new a(63685,"unknown_f8c5",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.QEXIT=t.OPCODES[63686]=new a(63686,"qexit",void 0,[],void 0),a.USE_ANIMATION=t.OPCODES[63687]=new a(63687,"use_animation",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player slot.",n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Animation ID.",n.Read),new r(t.TYPE_DWORD,"Animation duration in number of frames.",n.Read)]},void 0,void 0)],void 0),a.STOP_ANIMATION=t.OPCODES[63688]=new a(63688,"stop_animation",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player slot.",n.Read)]},void 0,void 0)],void 0),a.RUN_TO_COORD=t.OPCODES[63689]=new a(63689,"run_to_coord",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.SET_SLOT_INVINCIBLE=t.OPCODES[63690]=new a(63690,"set_slot_invincible",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player slot.",n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0)],void 0),a.UNKNOWN_F8CB=t.OPCODES[63691]=new a(63691,"unknown_f8cb",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.SET_SLOT_POISON=t.OPCODES[63692]=new a(63692,"set_slot_poison",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player slot.",n.Read)]},void 0,void 0)],void 0),a.SET_SLOT_PARALYZE=t.OPCODES[63693]=new a(63693,"set_slot_paralyze",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player slot.",n.Read)]},void 0,void 0)],void 0),a.SET_SLOT_SHOCK=t.OPCODES[63694]=new a(63694,"set_slot_shock",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player slot.",n.Read)]},void 0,void 0)],void 0),a.SET_SLOT_FREEZE=t.OPCODES[63695]=new a(63695,"set_slot_freeze",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player slot.",n.Read)]},void 0,void 0)],void 0),a.SET_SLOT_SLOW=t.OPCODES[63696]=new a(63696,"set_slot_slow",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player slot.",n.Read)]},void 0,void 0)],void 0),a.SET_SLOT_CONFUSE=t.OPCODES[63697]=new a(63697,"set_slot_confuse",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player slot.",n.Read)]},void 0,void 0)],void 0),a.SET_SLOT_SHIFTA=t.OPCODES[63698]=new a(63698,"set_slot_shifta",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player slot.",n.Read)]},void 0,void 0)],void 0),a.SET_SLOT_DEBAND=t.OPCODES[63699]=new a(63699,"set_slot_deband",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player slot.",n.Read)]},void 0,void 0)],void 0),a.SET_SLOT_JELLEN=t.OPCODES[63700]=new a(63700,"set_slot_jellen",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player slot.",n.Read)]},void 0,void 0)],void 0),a.SET_SLOT_ZALURE=t.OPCODES[63701]=new a(63701,"set_slot_zalure",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player slot.",n.Read)]},void 0,void 0)],void 0),a.FLETI_FIXED_CAMERA=t.OPCODES[63702]=new a(63702,"fleti_fixed_camera",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],s.Pop),a.FLETI_LOCKED_CAMERA=t.OPCODES[63703]=new a(63703,"fleti_locked_camera",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],s.Pop),a.DEFAULT_CAMERA_POS2=t.OPCODES[63704]=new a(63704,"default_camera_pos2",void 0,[],void 0),a.SET_MOTION_BLUR=t.OPCODES[63705]=new a(63705,"set_motion_blur",void 0,[],void 0),a.SET_SCREEN_BW=t.OPCODES[63706]=new a(63706,"set_screen_bw",void 0,[],void 0),a.UNKNOWN_F8DB=t.OPCODES[63707]=new a(63707,"unknown_f8db",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_WORD,void 0,void 0)],s.Pop),a.NPC_ACTION_STRING=t.OPCODES[63708]=new a(63708,"npc_action_string",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_S_LABEL,void 0,void 0)],void 0),a.GET_PAD_COND=t.OPCODES[63709]=new a(63709,"get_pad_cond",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.GET_BUTTON_COND=t.OPCODES[63710]=new a(63710,"get_button_cond",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.FREEZE_ENEMIES=t.OPCODES[63711]=new a(63711,"freeze_enemies",void 0,[],void 0),a.UNFREEZE_ENEMIES=t.OPCODES[63712]=new a(63712,"unfreeze_enemies",void 0,[],void 0),a.FREEZE_EVERYTHING=t.OPCODES[63713]=new a(63713,"freeze_everything",void 0,[],void 0),a.UNFREEZE_EVERYTHING=t.OPCODES[63714]=new a(63714,"unfreeze_everything",void 0,[],void 0),a.RESTORE_HP=t.OPCODES[63715]=new a(63715,"restore_hp",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.RESTORE_TP=t.OPCODES[63716]=new a(63716,"restore_tp",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.CLOSE_CHAT_BUBBLE=t.OPCODES[63717]=new a(63717,"close_chat_bubble",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.MOVE_COORDS_OBJECT=t.OPCODES[63718]=new a(63718,"move_coords_object",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.AT_COORDS_CALL_EX=t.OPCODES[63719]=new a(63719,"at_coords_call_ex",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.UNKNOWN_F8E8=t.OPCODES[63720]=new a(63720,"unknown_f8e8",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.UNKNOWN_F8E9=t.OPCODES[63721]=new a(63721,"unknown_f8e9",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.UNKNOWN_F8EA=t.OPCODES[63722]=new a(63722,"unknown_f8ea",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.UNKNOWN_F8EB=t.OPCODES[63723]=new a(63723,"unknown_f8eb",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.UNKNOWN_F8EC=t.OPCODES[63724]=new a(63724,"unknown_f8ec",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.ANIMATION_CHECK=t.OPCODES[63725]=new a(63725,"animation_check",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.CALL_IMAGE_DATA=t.OPCODES[63726]=new a(63726,"call_image_data",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_WORD,void 0,void 0)],s.Pop),a.UNKNOWN_F8EF=t.OPCODES[63727]=new a(63727,"unknown_f8ef",void 0,[],void 0),a.TURN_OFF_BGM_P2=t.OPCODES[63728]=new a(63728,"turn_off_bgm_p2",void 0,[],void 0),a.TURN_ON_BGM_P2=t.OPCODES[63729]=new a(63729,"turn_on_bgm_p2",void 0,[],void 0),a.LOAD_UNK_DATA=t.OPCODES[63730]=new a(63730,"load_unk_data",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_D_LABEL,void 0,void 0)],s.Pop),a.PARTICLE2=t.OPCODES[63731]=new a(63731,"particle2",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_FLOAT,void 0,void 0)],s.Pop),a.UNKNOWN_F8F4=t.OPCODES[63732]=new a(63732,"unknown_f8f4",void 0,[],void 0),a.UNKNOWN_F8F5=t.OPCODES[63733]=new a(63733,"unknown_f8f5",void 0,[],void 0),a.UNKNOWN_F8F6=t.OPCODES[63734]=new a(63734,"unknown_f8f6",void 0,[],void 0),a.UNKNOWN_F8F7=t.OPCODES[63735]=new a(63735,"unknown_f8f7",void 0,[],void 0),a.UNKNOWN_F8F8=t.OPCODES[63736]=new a(63736,"unknown_f8f8",void 0,[],void 0),a.UNKNOWN_F8F9=t.OPCODES[63737]=new a(63737,"unknown_f8f9",void 0,[],void 0),a.UNKNOWN_F8FA=t.OPCODES[63738]=new a(63738,"unknown_f8fa",void 0,[],void 0),a.UNKNOWN_F8FB=t.OPCODES[63739]=new a(63739,"unknown_f8fb",void 0,[],void 0),a.UNKNOWN_F8FC=t.OPCODES[63740]=new a(63740,"unknown_f8fc",void 0,[],void 0),a.UNKNOWN_F8FD=t.OPCODES[63741]=new a(63741,"unknown_f8fd",void 0,[],void 0),a.UNKNOWN_F8FE=t.OPCODES[63742]=new a(63742,"unknown_f8fe",void 0,[],void 0),a.UNKNOWN_F8FF=t.OPCODES[63743]=new a(63743,"unknown_f8ff",void 0,[],void 0),a.UNKNOWN_F900=t.OPCODES[63744]=new a(63744,"unknown_f900",void 0,[],void 0),a.DEC2FLOAT=t.OPCODES[63745]=new a(63745,"dec2float",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_FLOAT,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0)],void 0),a.FLOAT2DEC=t.OPCODES[63746]=new a(63746,"float2dec",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_FLOAT,void 0,n.Read)]},void 0,void 0)],void 0),a.FLET=t.OPCODES[63747]=new a(63747,"flet",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_FLOAT,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_FLOAT,void 0,n.Read)]},void 0,void 0)],void 0),a.FLETI=t.OPCODES[63748]=new a(63748,"fleti",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_FLOAT,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_FLOAT,void 0,void 0)],void 0),a.UNKNOWN_F905=t.OPCODES[63749]=new a(63749,"unknown_f905",void 0,[],void 0),a.UNKNOWN_F906=t.OPCODES[63750]=new a(63750,"unknown_f906",void 0,[],void 0),a.UNKNOWN_F907=t.OPCODES[63751]=new a(63751,"unknown_f907",void 0,[],void 0),a.FADD=t.OPCODES[63752]=new a(63752,"fadd",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_FLOAT,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_FLOAT,void 0,n.Read)]},void 0,void 0)],void 0),a.FADDI=t.OPCODES[63753]=new a(63753,"faddi",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_FLOAT,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_FLOAT,void 0,void 0)],void 0),a.FSUB=t.OPCODES[63754]=new a(63754,"fsub",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_FLOAT,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_FLOAT,void 0,n.Read)]},void 0,void 0)],void 0),a.FSUBI=t.OPCODES[63755]=new a(63755,"fsubi",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_FLOAT,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_FLOAT,void 0,void 0)],void 0),a.FMUL=t.OPCODES[63756]=new a(63756,"fmul",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_FLOAT,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_FLOAT,void 0,n.Read)]},void 0,void 0)],void 0),a.FMULI=t.OPCODES[63757]=new a(63757,"fmuli",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_FLOAT,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_FLOAT,void 0,void 0)],void 0),a.FDIV=t.OPCODES[63758]=new a(63758,"fdiv",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_FLOAT,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_FLOAT,void 0,n.Read)]},void 0,void 0)],void 0),a.FDIVI=t.OPCODES[63759]=new a(63759,"fdivi",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_FLOAT,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_FLOAT,void 0,void 0)],void 0),a.GET_UNKNOWN_COUNT=t.OPCODES[63760]=new a(63760,"get_unknown_count",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],s.Pop),a.GET_STACKABLE_ITEM_COUNT=t.OPCODES[63761]=new a(63761,"get_stackable_item_count",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player slot.",n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.FREEZE_AND_HIDE_EQUIP=t.OPCODES[63762]=new a(63762,"freeze_and_hide_equip",void 0,[],void 0),a.THAW_AND_SHOW_EQUIP=t.OPCODES[63763]=new a(63763,"thaw_and_show_equip",void 0,[],void 0),a.SET_PALETTEX_CALLBACK=t.OPCODES[63764]=new a(63764,"set_palettex_callback",void 0,[new r(t.TYPE_DWORD,"Player slot.",void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],s.Pop),a.ACTIVATE_PALETTEX=t.OPCODES[63765]=new a(63765,"activate_palettex",void 0,[new r(t.TYPE_DWORD,"Player slot.",void 0)],s.Pop),a.ENABLE_PALETTEX=t.OPCODES[63766]=new a(63766,"enable_palettex",void 0,[new r(t.TYPE_DWORD,"Player slot.",void 0)],s.Pop),a.RESTORE_PALETTEX=t.OPCODES[63767]=new a(63767,"restore_palettex",void 0,[new r(t.TYPE_DWORD,"Player slot.",void 0)],s.Pop),a.DISABLE_PALETTEX=t.OPCODES[63768]=new a(63768,"disable_palettex",void 0,[new r(t.TYPE_DWORD,"Player slot.",void 0)],s.Pop),a.GET_PALETTEX_ACTIVATED=t.OPCODES[63769]=new a(63769,"get_palettex_activated",void 0,[new r(t.TYPE_DWORD,"Player slot.",void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],s.Pop),a.GET_UNKNOWN_PALETTEX_STATUS=t.OPCODES[63770]=new a(63770,"get_unknown_palettex_status",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],s.Pop),a.DISABLE_MOVEMENT2=t.OPCODES[63771]=new a(63771,"disable_movement2",void 0,[new r(t.TYPE_DWORD,"Player slot.",void 0)],s.Pop),a.ENABLE_MOVEMENT2=t.OPCODES[63772]=new a(63772,"enable_movement2",void 0,[new r(t.TYPE_DWORD,"Player slot.",void 0)],s.Pop),a.GET_TIME_PLAYED=t.OPCODES[63773]=new a(63773,"get_time_played",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.GET_GUILDCARD_TOTAL=t.OPCODES[63774]=new a(63774,"get_guildcard_total",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.GET_SLOT_MESETA=t.OPCODES[63775]=new a(63775,"get_slot_meseta",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.GET_PLAYER_LEVEL=t.OPCODES[63776]=new a(63776,"get_player_level",void 0,[new r(t.TYPE_DWORD,"Player slot.",void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],s.Pop),a.GET_SECTION_ID=t.OPCODES[63777]=new a(63777,"get_section_id",void 0,[new r(t.TYPE_DWORD,"Player slot.",void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],s.Pop),a.GET_PLAYER_HP=t.OPCODES[63778]=new a(63778,"get_player_hp",void 0,[new r(t.TYPE_DWORD,"Player slot.",void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Maximum HP.",n.Write),new r(t.TYPE_DWORD,"Current HP.",n.Write),new r(t.TYPE_DWORD,"Maximum TP.",n.Write),new r(t.TYPE_DWORD,"Current TP.",n.Write)]},void 0,void 0)],s.Pop),a.GET_FLOOR_NUMBER=t.OPCODES[63779]=new a(63779,"get_floor_number",void 0,[new r(t.TYPE_DWORD,"Player slot.",void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],s.Pop),a.GET_COORD_PLAYER_DETECT=t.OPCODES[63780]=new a(63780,"get_coord_player_detect",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,"Player slot.",n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.READ_GLOBAL_FLAG=t.OPCODES[63781]=new a(63781,"read_global_flag",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],s.Pop),a.WRITE_GLOBAL_FLAG=t.OPCODES[63782]=new a(63782,"write_global_flag",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_F927=t.OPCODES[63783]=new a(63783,"unknown_f927",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.FLOOR_PLAYER_DETECT=t.OPCODES[63784]=new a(63784,"floor_player_detect",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write),new r(t.TYPE_DWORD,void 0,n.Write),new r(t.TYPE_DWORD,void 0,n.Write),new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.READ_DISK_FILE=t.OPCODES[63785]=new a(63785,"read_disk_file",void 0,[new r(t.TYPE_STRING,void 0,void 0)],s.Pop),a.OPEN_PACK_SELECT=t.OPCODES[63786]=new a(63786,"open_pack_select",void 0,[],void 0),a.ITEM_SELECT=t.OPCODES[63787]=new a(63787,"item_select",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.GET_ITEM_ID=t.OPCODES[63788]=new a(63788,"get_item_id",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.COLOR_CHANGE=t.OPCODES[63789]=new a(63789,"color_change",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.SEND_STATISTIC=t.OPCODES[63790]=new a(63790,"send_statistic",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_F92F=t.OPCODES[63791]=new a(63791,"unknown_f92f",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.CHAT_BOX=t.OPCODES[63792]=new a(63792,"chat_box",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_STRING,void 0,void 0)],s.Pop),a.CHAT_BUBBLE=t.OPCODES[63793]=new a(63793,"chat_bubble",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_STRING,void 0,void 0)],s.Pop),a.UNKNOWN_F932=t.OPCODES[63794]=new a(63794,"unknown_f932",void 0,[],void 0),a.UNKNOWN_F933=t.OPCODES[63795]=new a(63795,"unknown_f933",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.SCROLL_TEXT=t.OPCODES[63796]=new a(63796,"scroll_text",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_FLOAT,void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_STRING,void 0,void 0)],s.Pop),a.GBA_UNKNOWN1=t.OPCODES[63797]=new a(63797,"gba_unknown1",void 0,[],void 0),a.GBA_UNKNOWN2=t.OPCODES[63798]=new a(63798,"gba_unknown2",void 0,[],void 0),a.GBA_UNKNOWN3=t.OPCODES[63799]=new a(63799,"gba_unknown3",void 0,[],void 0),a.ADD_DAMAGE_TO=t.OPCODES[63800]=new a(63800,"add_damage_to",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.ITEM_DELETE3=t.OPCODES[63801]=new a(63801,"item_delete3",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.GET_ITEM_INFO=t.OPCODES[63802]=new a(63802,"get_item_info",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],s.Pop),a.ITEM_PACKING1=t.OPCODES[63803]=new a(63803,"item_packing1",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.ITEM_PACKING2=t.OPCODES[63804]=new a(63804,"item_packing2",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.GET_LANG_SETTING=t.OPCODES[63805]=new a(63805,"get_lang_setting",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],s.Pop),a.PREPARE_STATISTIC=t.OPCODES[63806]=new a(63806,"prepare_statistic",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],s.Pop),a.KEYWORD_DETECT=t.OPCODES[63807]=new a(63807,"keyword_detect",void 0,[],void 0),a.KEYWORD=t.OPCODES[63808]=new a(63808,"keyword",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_DWORD,"Player slot.",void 0),new r(t.TYPE_STRING,void 0,void 0)],s.Pop),a.GET_GUILDCARD_NUM=t.OPCODES[63809]=new a(63809,"get_guildcard_num",void 0,[new r(t.TYPE_DWORD,"Player slot.",void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],s.Pop),a.UNKNOWN_F942=t.OPCODES[63810]=new a(63810,"unknown_f942",void 0,[],void 0),a.UNKNOWN_F943=t.OPCODES[63811]=new a(63811,"unknown_f943",void 0,[],void 0),a.GET_WRAP_STATUS=t.OPCODES[63812]=new a(63812,"get_wrap_status",void 0,[new r(t.TYPE_DWORD,"Player slot.",void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],s.Pop),a.INITIAL_FLOOR=t.OPCODES[63813]=new a(63813,"initial_floor",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.SIN=t.OPCODES[63814]=new a(63814,"sin",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.COS=t.OPCODES[63815]=new a(63815,"cos",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_F948=t.OPCODES[63816]=new a(63816,"unknown_f948",void 0,[],void 0),a.UNKNOWN_F949=t.OPCODES[63817]=new a(63817,"unknown_f949",void 0,[],void 0),a.BOSS_IS_DEAD2=t.OPCODES[63818]=new a(63818,"boss_is_dead2",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.UNKNOWN_F94B=t.OPCODES[63819]=new a(63819,"unknown_f94b",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.UNKNOWN_F94C=t.OPCODES[63820]=new a(63820,"unknown_f94c",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.IS_THERE_CARDBATTLE=t.OPCODES[63821]=new a(63821,"is_there_cardbattle",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.UNKNOWN_F94E=t.OPCODES[63822]=new a(63822,"unknown_f94e",void 0,[],void 0),a.UNKNOWN_F94F=t.OPCODES[63823]=new a(63823,"unknown_f94f",void 0,[],void 0),a.BB_P2_MENU=t.OPCODES[63824]=new a(63824,"bb_p2_menu",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.BB_MAP_DESIGNATE=t.OPCODES[63825]=new a(63825,"bb_map_designate",void 0,[new r(t.TYPE_BYTE,void 0,void 0),new r(t.TYPE_WORD,void 0,void 0),new r(t.TYPE_BYTE,void 0,void 0),new r(t.TYPE_BYTE,void 0,void 0)],void 0),a.BB_GET_NUMBER_IN_PACK=t.OPCODES[63826]=new a(63826,"bb_get_number_in_pack",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.BB_SWAP_ITEM=t.OPCODES[63827]=new a(63827,"bb_swap_item",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],s.Pop),a.BB_CHECK_WRAP=t.OPCODES[63828]=new a(63828,"bb_check_wrap",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],s.Pop),a.BB_EXCHANGE_PD_ITEM=t.OPCODES[63829]=new a(63829,"bb_exchange_pd_item",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],s.Pop),a.BB_EXCHANGE_PD_SRANK=t.OPCODES[63830]=new a(63830,"bb_exchange_pd_srank",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],s.Pop),a.BB_EXCHANGE_PD_SPECIAL=t.OPCODES[63831]=new a(63831,"bb_exchange_pd_special",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],s.Pop),a.BB_EXCHANGE_PD_PERCENT=t.OPCODES[63832]=new a(63832,"bb_exchange_pd_percent",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],s.Pop),a.UNKNOWN_F959=t.OPCODES[63833]=new a(63833,"unknown_f959",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_F95A=t.OPCODES[63834]=new a(63834,"unknown_f95a",void 0,[],void 0),a.UNKNOWN_F95B=t.OPCODES[63835]=new a(63835,"unknown_f95b",void 0,[],void 0),a.BB_EXCHANGE_SLT=t.OPCODES[63836]=new a(63836,"bb_exchange_slt",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],s.Pop),a.BB_EXCHANGE_PC=t.OPCODES[63837]=new a(63837,"bb_exchange_pc",void 0,[],void 0),a.BB_BOX_CREATE_BP=t.OPCODES[63838]=new a(63838,"bb_box_create_bp",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_FLOAT,void 0,void 0),new r(t.TYPE_FLOAT,void 0,void 0)],s.Pop),a.BB_EXCHANGE_PT=t.OPCODES[63839]=new a(63839,"bb_exchange_pt",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],s.Pop),a.UNKNOWN_F960=t.OPCODES[63840]=new a(63840,"unknown_f960",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_F961=t.OPCODES[63841]=new a(63841,"unknown_f961",void 0,[],void 0),a.UNKNOWN_F962=t.OPCODES[63842]=new a(63842,"unknown_f962",void 0,[],void 0),a.UNKNOWN_F963=t.OPCODES[63843]=new a(63843,"unknown_f963",void 0,[],void 0),a.UNKNOWN_F964=t.OPCODES[63844]=new a(63844,"unknown_f964",void 0,[],void 0),a.UNKNOWN_F965=t.OPCODES[63845]=new a(63845,"unknown_f965",void 0,[],void 0),a.UNKNOWN_F966=t.OPCODES[63846]=new a(63846,"unknown_f966",void 0,[],void 0),a.UNKNOWN_F967=t.OPCODES[63847]=new a(63847,"unknown_f967",void 0,[],void 0),a.UNKNOWN_F968=t.OPCODES[63848]=new a(63848,"unknown_f968",void 0,[],void 0),a.UNKNOWN_F969=t.OPCODES[63849]=new a(63849,"unknown_f969",void 0,[],void 0),a.UNKNOWN_F96A=t.OPCODES[63850]=new a(63850,"unknown_f96a",void 0,[],void 0),a.UNKNOWN_F96B=t.OPCODES[63851]=new a(63851,"unknown_f96b",void 0,[],void 0),a.UNKNOWN_F96C=t.OPCODES[63852]=new a(63852,"unknown_f96c",void 0,[],void 0),a.UNKNOWN_F96D=t.OPCODES[63853]=new a(63853,"unknown_f96d",void 0,[],void 0),a.UNKNOWN_F96E=t.OPCODES[63854]=new a(63854,"unknown_f96e",void 0,[],void 0),a.UNKNOWN_F96F=t.OPCODES[63855]=new a(63855,"unknown_f96f",void 0,[],void 0),a.UNKNOWN_F970=t.OPCODES[63856]=new a(63856,"unknown_f970",void 0,[],void 0),a.UNKNOWN_F971=t.OPCODES[63857]=new a(63857,"unknown_f971",void 0,[],void 0),a.UNKNOWN_F972=t.OPCODES[63858]=new a(63858,"unknown_f972",void 0,[],void 0),a.UNKNOWN_F973=t.OPCODES[63859]=new a(63859,"unknown_f973",void 0,[],void 0),a.UNKNOWN_F974=t.OPCODES[63860]=new a(63860,"unknown_f974",void 0,[],void 0),a.UNKNOWN_F975=t.OPCODES[63861]=new a(63861,"unknown_f975",void 0,[],void 0),a.UNKNOWN_F976=t.OPCODES[63862]=new a(63862,"unknown_f976",void 0,[],void 0),a.UNKNOWN_F977=t.OPCODES[63863]=new a(63863,"unknown_f977",void 0,[],void 0),a.UNKNOWN_F978=t.OPCODES[63864]=new a(63864,"unknown_f978",void 0,[],void 0),a.UNKNOWN_F979=t.OPCODES[63865]=new a(63865,"unknown_f979",void 0,[],void 0),a.UNKNOWN_F97A=t.OPCODES[63866]=new a(63866,"unknown_f97a",void 0,[],void 0),a.UNKNOWN_F97B=t.OPCODES[63867]=new a(63867,"unknown_f97b",void 0,[],void 0),a.UNKNOWN_F97C=t.OPCODES[63868]=new a(63868,"unknown_f97c",void 0,[],void 0),a.UNKNOWN_F97D=t.OPCODES[63869]=new a(63869,"unknown_f97d",void 0,[],void 0),a.UNKNOWN_F97E=t.OPCODES[63870]=new a(63870,"unknown_f97e",void 0,[],void 0),a.UNKNOWN_F97F=t.OPCODES[63871]=new a(63871,"unknown_f97f",void 0,[],void 0),a.UNKNOWN_F980=t.OPCODES[63872]=new a(63872,"unknown_f980",void 0,[],void 0),a.UNKNOWN_F981=t.OPCODES[63873]=new a(63873,"unknown_f981",void 0,[],void 0),a.UNKNOWN_F982=t.OPCODES[63874]=new a(63874,"unknown_f982",void 0,[],void 0),a.UNKNOWN_F983=t.OPCODES[63875]=new a(63875,"unknown_f983",void 0,[],void 0),a.UNKNOWN_F984=t.OPCODES[63876]=new a(63876,"unknown_f984",void 0,[],void 0),a.UNKNOWN_F985=t.OPCODES[63877]=new a(63877,"unknown_f985",void 0,[],void 0),a.UNKNOWN_F986=t.OPCODES[63878]=new a(63878,"unknown_f986",void 0,[],void 0),a.UNKNOWN_F987=t.OPCODES[63879]=new a(63879,"unknown_f987",void 0,[],void 0),a.UNKNOWN_F988=t.OPCODES[63880]=new a(63880,"unknown_f988",void 0,[],void 0),a.UNKNOWN_F989=t.OPCODES[63881]=new a(63881,"unknown_f989",void 0,[],void 0),a.UNKNOWN_F98A=t.OPCODES[63882]=new a(63882,"unknown_f98a",void 0,[],void 0),a.UNKNOWN_F98B=t.OPCODES[63883]=new a(63883,"unknown_f98b",void 0,[],void 0),a.UNKNOWN_F98C=t.OPCODES[63884]=new a(63884,"unknown_f98c",void 0,[],void 0),a.UNKNOWN_F98D=t.OPCODES[63885]=new a(63885,"unknown_f98d",void 0,[],void 0),a.UNKNOWN_F98E=t.OPCODES[63886]=new a(63886,"unknown_f98e",void 0,[],void 0),a.UNKNOWN_F98F=t.OPCODES[63887]=new a(63887,"unknown_f98f",void 0,[],void 0),a.UNKNOWN_F990=t.OPCODES[63888]=new a(63888,"unknown_f990",void 0,[],void 0),a.UNKNOWN_F991=t.OPCODES[63889]=new a(63889,"unknown_f991",void 0,[],void 0),a.UNKNOWN_F992=t.OPCODES[63890]=new a(63890,"unknown_f992",void 0,[],void 0),a.UNKNOWN_F993=t.OPCODES[63891]=new a(63891,"unknown_f993",void 0,[],void 0),a.UNKNOWN_F994=t.OPCODES[63892]=new a(63892,"unknown_f994",void 0,[],void 0),a.UNKNOWN_F995=t.OPCODES[63893]=new a(63893,"unknown_f995",void 0,[],void 0),a.UNKNOWN_F996=t.OPCODES[63894]=new a(63894,"unknown_f996",void 0,[],void 0),a.UNKNOWN_F997=t.OPCODES[63895]=new a(63895,"unknown_f997",void 0,[],void 0),a.UNKNOWN_F998=t.OPCODES[63896]=new a(63896,"unknown_f998",void 0,[],void 0),a.UNKNOWN_F999=t.OPCODES[63897]=new a(63897,"unknown_f999",void 0,[],void 0),a.UNKNOWN_F99A=t.OPCODES[63898]=new a(63898,"unknown_f99a",void 0,[],void 0),a.UNKNOWN_F99B=t.OPCODES[63899]=new a(63899,"unknown_f99b",void 0,[],void 0),a.UNKNOWN_F99C=t.OPCODES[63900]=new a(63900,"unknown_f99c",void 0,[],void 0),a.UNKNOWN_F99D=t.OPCODES[63901]=new a(63901,"unknown_f99d",void 0,[],void 0),a.UNKNOWN_F99E=t.OPCODES[63902]=new a(63902,"unknown_f99e",void 0,[],void 0),a.UNKNOWN_F99F=t.OPCODES[63903]=new a(63903,"unknown_f99f",void 0,[],void 0),a.UNKNOWN_F9A0=t.OPCODES[63904]=new a(63904,"unknown_f9a0",void 0,[],void 0),a.UNKNOWN_F9A1=t.OPCODES[63905]=new a(63905,"unknown_f9a1",void 0,[],void 0),a.UNKNOWN_F9A2=t.OPCODES[63906]=new a(63906,"unknown_f9a2",void 0,[],void 0),a.UNKNOWN_F9A3=t.OPCODES[63907]=new a(63907,"unknown_f9a3",void 0,[],void 0),a.UNKNOWN_F9A4=t.OPCODES[63908]=new a(63908,"unknown_f9a4",void 0,[],void 0),a.UNKNOWN_F9A5=t.OPCODES[63909]=new a(63909,"unknown_f9a5",void 0,[],void 0),a.UNKNOWN_F9A6=t.OPCODES[63910]=new a(63910,"unknown_f9a6",void 0,[],void 0),a.UNKNOWN_F9A7=t.OPCODES[63911]=new a(63911,"unknown_f9a7",void 0,[],void 0),a.UNKNOWN_F9A8=t.OPCODES[63912]=new a(63912,"unknown_f9a8",void 0,[],void 0),a.UNKNOWN_F9A9=t.OPCODES[63913]=new a(63913,"unknown_f9a9",void 0,[],void 0),a.UNKNOWN_F9AA=t.OPCODES[63914]=new a(63914,"unknown_f9aa",void 0,[],void 0),a.UNKNOWN_F9AB=t.OPCODES[63915]=new a(63915,"unknown_f9ab",void 0,[],void 0),a.UNKNOWN_F9AC=t.OPCODES[63916]=new a(63916,"unknown_f9ac",void 0,[],void 0),a.UNKNOWN_F9AD=t.OPCODES[63917]=new a(63917,"unknown_f9ad",void 0,[],void 0),a.UNKNOWN_F9AE=t.OPCODES[63918]=new a(63918,"unknown_f9ae",void 0,[],void 0),a.UNKNOWN_F9AF=t.OPCODES[63919]=new a(63919,"unknown_f9af",void 0,[],void 0),a.UNKNOWN_F9B0=t.OPCODES[63920]=new a(63920,"unknown_f9b0",void 0,[],void 0),a.UNKNOWN_F9B1=t.OPCODES[63921]=new a(63921,"unknown_f9b1",void 0,[],void 0),a.UNKNOWN_F9B2=t.OPCODES[63922]=new a(63922,"unknown_f9b2",void 0,[],void 0),a.UNKNOWN_F9B3=t.OPCODES[63923]=new a(63923,"unknown_f9b3",void 0,[],void 0),a.UNKNOWN_F9B4=t.OPCODES[63924]=new a(63924,"unknown_f9b4",void 0,[],void 0),a.UNKNOWN_F9B5=t.OPCODES[63925]=new a(63925,"unknown_f9b5",void 0,[],void 0),a.UNKNOWN_F9B6=t.OPCODES[63926]=new a(63926,"unknown_f9b6",void 0,[],void 0),a.UNKNOWN_F9B7=t.OPCODES[63927]=new a(63927,"unknown_f9b7",void 0,[],void 0),a.UNKNOWN_F9B8=t.OPCODES[63928]=new a(63928,"unknown_f9b8",void 0,[],void 0),a.UNKNOWN_F9B9=t.OPCODES[63929]=new a(63929,"unknown_f9b9",void 0,[],void 0),a.UNKNOWN_F9BA=t.OPCODES[63930]=new a(63930,"unknown_f9ba",void 0,[],void 0),a.UNKNOWN_F9BB=t.OPCODES[63931]=new a(63931,"unknown_f9bb",void 0,[],void 0),a.UNKNOWN_F9BC=t.OPCODES[63932]=new a(63932,"unknown_f9bc",void 0,[],void 0),a.UNKNOWN_F9BD=t.OPCODES[63933]=new a(63933,"unknown_f9bd",void 0,[],void 0),a.UNKNOWN_F9BE=t.OPCODES[63934]=new a(63934,"unknown_f9be",void 0,[],void 0),a.UNKNOWN_F9BF=t.OPCODES[63935]=new a(63935,"unknown_f9bf",void 0,[],void 0),a.UNKNOWN_F9C0=t.OPCODES[63936]=new a(63936,"unknown_f9c0",void 0,[],void 0),a.UNKNOWN_F9C1=t.OPCODES[63937]=new a(63937,"unknown_f9c1",void 0,[],void 0),a.UNKNOWN_F9C2=t.OPCODES[63938]=new a(63938,"unknown_f9c2",void 0,[],void 0),a.UNKNOWN_F9C3=t.OPCODES[63939]=new a(63939,"unknown_f9c3",void 0,[],void 0),a.UNKNOWN_F9C4=t.OPCODES[63940]=new a(63940,"unknown_f9c4",void 0,[],void 0),a.UNKNOWN_F9C5=t.OPCODES[63941]=new a(63941,"unknown_f9c5",void 0,[],void 0),a.UNKNOWN_F9C6=t.OPCODES[63942]=new a(63942,"unknown_f9c6",void 0,[],void 0),a.UNKNOWN_F9C7=t.OPCODES[63943]=new a(63943,"unknown_f9c7",void 0,[],void 0),a.UNKNOWN_F9C8=t.OPCODES[63944]=new a(63944,"unknown_f9c8",void 0,[],void 0),a.UNKNOWN_F9C9=t.OPCODES[63945]=new a(63945,"unknown_f9c9",void 0,[],void 0),a.UNKNOWN_F9CA=t.OPCODES[63946]=new a(63946,"unknown_f9ca",void 0,[],void 0),a.UNKNOWN_F9CB=t.OPCODES[63947]=new a(63947,"unknown_f9cb",void 0,[],void 0),a.UNKNOWN_F9CC=t.OPCODES[63948]=new a(63948,"unknown_f9cc",void 0,[],void 0),a.UNKNOWN_F9CD=t.OPCODES[63949]=new a(63949,"unknown_f9cd",void 0,[],void 0),a.UNKNOWN_F9CE=t.OPCODES[63950]=new a(63950,"unknown_f9ce",void 0,[],void 0),a.UNKNOWN_F9CF=t.OPCODES[63951]=new a(63951,"unknown_f9cf",void 0,[],void 0),a.UNKNOWN_F9D0=t.OPCODES[63952]=new a(63952,"unknown_f9d0",void 0,[],void 0),a.UNKNOWN_F9D1=t.OPCODES[63953]=new a(63953,"unknown_f9d1",void 0,[],void 0),a.UNKNOWN_F9D2=t.OPCODES[63954]=new a(63954,"unknown_f9d2",void 0,[],void 0),a.UNKNOWN_F9D3=t.OPCODES[63955]=new a(63955,"unknown_f9d3",void 0,[],void 0),a.UNKNOWN_F9D4=t.OPCODES[63956]=new a(63956,"unknown_f9d4",void 0,[],void 0),a.UNKNOWN_F9D5=t.OPCODES[63957]=new a(63957,"unknown_f9d5",void 0,[],void 0),a.UNKNOWN_F9D6=t.OPCODES[63958]=new a(63958,"unknown_f9d6",void 0,[],void 0),a.UNKNOWN_F9D7=t.OPCODES[63959]=new a(63959,"unknown_f9d7",void 0,[],void 0),a.UNKNOWN_F9D8=t.OPCODES[63960]=new a(63960,"unknown_f9d8",void 0,[],void 0),a.UNKNOWN_F9D9=t.OPCODES[63961]=new a(63961,"unknown_f9d9",void 0,[],void 0),a.UNKNOWN_F9DA=t.OPCODES[63962]=new a(63962,"unknown_f9da",void 0,[],void 0),a.UNKNOWN_F9DB=t.OPCODES[63963]=new a(63963,"unknown_f9db",void 0,[],void 0),a.UNKNOWN_F9DC=t.OPCODES[63964]=new a(63964,"unknown_f9dc",void 0,[],void 0),a.UNKNOWN_F9DD=t.OPCODES[63965]=new a(63965,"unknown_f9dd",void 0,[],void 0),a.UNKNOWN_F9DE=t.OPCODES[63966]=new a(63966,"unknown_f9de",void 0,[],void 0),a.UNKNOWN_F9DF=t.OPCODES[63967]=new a(63967,"unknown_f9df",void 0,[],void 0),a.UNKNOWN_F9E0=t.OPCODES[63968]=new a(63968,"unknown_f9e0",void 0,[],void 0),a.UNKNOWN_F9E1=t.OPCODES[63969]=new a(63969,"unknown_f9e1",void 0,[],void 0),a.UNKNOWN_F9E2=t.OPCODES[63970]=new a(63970,"unknown_f9e2",void 0,[],void 0),a.UNKNOWN_F9E3=t.OPCODES[63971]=new a(63971,"unknown_f9e3",void 0,[],void 0),a.UNKNOWN_F9E4=t.OPCODES[63972]=new a(63972,"unknown_f9e4",void 0,[],void 0),a.UNKNOWN_F9E5=t.OPCODES[63973]=new a(63973,"unknown_f9e5",void 0,[],void 0),a.UNKNOWN_F9E6=t.OPCODES[63974]=new a(63974,"unknown_f9e6",void 0,[],void 0),a.UNKNOWN_F9E7=t.OPCODES[63975]=new a(63975,"unknown_f9e7",void 0,[],void 0),a.UNKNOWN_F9E8=t.OPCODES[63976]=new a(63976,"unknown_f9e8",void 0,[],void 0),a.UNKNOWN_F9E9=t.OPCODES[63977]=new a(63977,"unknown_f9e9",void 0,[],void 0),a.UNKNOWN_F9EA=t.OPCODES[63978]=new a(63978,"unknown_f9ea",void 0,[],void 0),a.UNKNOWN_F9EB=t.OPCODES[63979]=new a(63979,"unknown_f9eb",void 0,[],void 0),a.UNKNOWN_F9EC=t.OPCODES[63980]=new a(63980,"unknown_f9ec",void 0,[],void 0),a.UNKNOWN_F9ED=t.OPCODES[63981]=new a(63981,"unknown_f9ed",void 0,[],void 0),a.UNKNOWN_F9EE=t.OPCODES[63982]=new a(63982,"unknown_f9ee",void 0,[],void 0),a.UNKNOWN_F9EF=t.OPCODES[63983]=new a(63983,"unknown_f9ef",void 0,[],void 0),a.UNKNOWN_F9F0=t.OPCODES[63984]=new a(63984,"unknown_f9f0",void 0,[],void 0),a.UNKNOWN_F9F1=t.OPCODES[63985]=new a(63985,"unknown_f9f1",void 0,[],void 0),a.UNKNOWN_F9F2=t.OPCODES[63986]=new a(63986,"unknown_f9f2",void 0,[],void 0),a.UNKNOWN_F9F3=t.OPCODES[63987]=new a(63987,"unknown_f9f3",void 0,[],void 0),a.UNKNOWN_F9F4=t.OPCODES[63988]=new a(63988,"unknown_f9f4",void 0,[],void 0),a.UNKNOWN_F9F5=t.OPCODES[63989]=new a(63989,"unknown_f9f5",void 0,[],void 0),a.UNKNOWN_F9F6=t.OPCODES[63990]=new a(63990,"unknown_f9f6",void 0,[],void 0),a.UNKNOWN_F9F7=t.OPCODES[63991]=new a(63991,"unknown_f9f7",void 0,[],void 0),a.UNKNOWN_F9F8=t.OPCODES[63992]=new a(63992,"unknown_f9f8",void 0,[],void 0),a.UNKNOWN_F9F9=t.OPCODES[63993]=new a(63993,"unknown_f9f9",void 0,[],void 0),a.UNKNOWN_F9FA=t.OPCODES[63994]=new a(63994,"unknown_f9fa",void 0,[],void 0),a.UNKNOWN_F9FB=t.OPCODES[63995]=new a(63995,"unknown_f9fb",void 0,[],void 0),a.UNKNOWN_F9FC=t.OPCODES[63996]=new a(63996,"unknown_f9fc",void 0,[],void 0),a.UNKNOWN_F9FD=t.OPCODES[63997]=new a(63997,"unknown_f9fd",void 0,[],void 0),a.UNKNOWN_F9FE=t.OPCODES[63998]=new a(63998,"unknown_f9fe",void 0,[],void 0),a.UNKNOWN_F9FF=t.OPCODES[63999]=new a(63999,"unknown_f9ff",void 0,[],void 0),t.OPCODES.forEach(e=>{t.OPCODES_BY_MNEMONIC.set(e.mnemonic,e)})},Za3H:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("FXpb"),n=i("nN8q"),s=i("6cU9"),r=i("w6HN"),a=i("4/Uj"),d=i("KUR2"),l=i("469Q"),_=i("4SjJ");class u extends n.ResizableWidget{constructor(){super(),this.element=o.el.div({class:"viewer_TextureView"}),this.open_file_button=new s.FileButton("Open file...",{icon_left:o.Icon.File,accept:".xvm"}),this.tool_bar=this.disposable(new r.ToolBar({children:[this.open_file_button]})),this.renderer_view=this.disposable(new d.RendererWidget(new l.TextureRenderer)),this.element.append(this.tool_bar.element,this.renderer_view.element),this.disposable(this.open_file_button.files.observe(({value:e})=>{e.length&&a.texture_store.load_file(e[0])})),this.renderer_view.start_rendering(),this.disposable(_.gui_store.tool.observe(({value:e})=>{e===_.GuiTool.Viewer?this.renderer_view.start_rendering():this.renderer_view.stop_rendering()})),this.finalize_construction(u.prototype)}resize(e,t){return super.resize(e,t),this.renderer_view.resize(e,Math.max(0,t-this.tool_bar.height)),this}}t.TextureView=u},aEXR:function(e,t,i){"use strict";var o=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))((function(n,s){function r(e){try{d(o.next(e))}catch(e){s(e)}}function a(e){try{d(o.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}d((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const n=i("bcBH"),s=i("NRxM"),r=i("XDYw"),a=i("y42t"),d=i("Yuai"),l=i("AUhH"),_=i("eFYZ"),u=new l.LoadingCache,c=new l.LoadingCache;function p(e,t){const i=h(e,t,"render").then(e=>_.area_geometry_to_sections_and_object_3d(a.parse_area_geometry(new s.ArrayBufferCursor(e,n.Endianness.Little)),t));return{geometry:i.then(([,e])=>e),sections:i.then(([e])=>e)}}t.load_area_sections=function(e,t){return o(this,void 0,void 0,(function*(){return u.get_or_set(`${e}-${t.area.id}-${t.id}`,()=>p(e,t)).sections}))},t.load_area_render_geometry=function(e,t){return o(this,void 0,void 0,(function*(){return u.get_or_set(`${e}-${t.area.id}-${t.id}`,()=>p(e,t)).geometry}))},t.load_area_collision_geometry=function(e,t){return o(this,void 0,void 0,(function*(){return c.get_or_set(`${e}-${t.area.id}-${t.id}`,()=>h(e,t,"collision").then(e=>_.area_collision_geometry_to_object_3d(r.parse_area_collision_geometry(new s.ArrayBufferCursor(e,n.Endianness.Little)))))}))};const v=[[["city00_00",1],["forest01",1],["forest02",1],["cave01_",6],["cave02_",5],["cave03_",6],["machine01_",6],["machine02_",6],["ancient01_",5],["ancient02_",5],["ancient03_",5],["boss01",1],["boss02",1],["boss03",1],["darkfalz00",1]],[["labo00_00",1],["ruins01_",3],["ruins02_",3],["space01_",3],["space02_",3],["jungle01_00",1],["jungle02_00",1],["jungle03_00",1],["jungle04_",3],["jungle05_00",1],["seabed01_",3],["seabed02_",3],["boss05",1],["boss06",1],["boss07",1],["boss08",1],["jungle06_00",1],["jungle07_",5]],[],[["city02_00",1],["wilds01_00",1],["wilds01_01",1],["wilds01_02",1],["wilds01_03",1],["crater01_00",1],["desert01_",3],["desert02_",3],["desert03_",3],["boss09_00",1]]];function h(e,t,i){return o(this,void 0,void 0,(function*(){const o=function(e,t){let i=t.area.id,o=t.id;16===i&&1===o&&(i=17,o=1);const n=v[e-1];if(0<=i&&i{this._selected_entity.val=void 0,this._current_area.val=e},this.set_selected_entity=e=>{e&&this.current_quest.val&&(this._current_area.val=c.area_store.get_area(this.current_quest.val.episode,e.area_id)),this._selected_entity.val=e},this.new_quest=e=>{this.set_quest(g.create_new_quest(e))},this.open_file=e=>o(this,void 0,void 0,(function*(){try{const t=yield r.read_file(e),i=a.parse_quest(new d.ArrayBufferCursor(t,l.Endianness.Little));this.set_quest(i&&new s.QuestModel(i.id,i.language,i.name,i.short_description,i.long_description,i.episode,i.map_designations,i.objects.map(e=>new _.QuestObjectModel(e.type,e.id,e.group_id,e.area_id,e.section_id,P.vec3_to_threejs(e.position),new D.Euler(e.rotation.x,e.rotation.y,e.rotation.z,"ZXY"),e.properties,e.unknown)),i.npcs.map(e=>new u.QuestNpcModel(e.type,e.pso_type_id,e.npc_id,e.script_label,e.pso_roaming,e.area_id,e.section_id,P.vec3_to_threejs(e.position),new D.Euler(e.rotation.x,e.rotation.y,e.rotation.z,"ZXY"),P.vec3_to_threejs(e.scale),e.unknown)),i.dat_unknowns,i.object_code,i.shop_items),e.name)}catch(e){R.error("Couldn't read file.",e)}})),this.save_as=()=>{const e=this.current_quest.val;if(!e)return;let t=this.current_quest_filename.val;if(t){const e=t.lastIndexOf(".");-1!==e&&(t=t.slice(0,e))}let i=prompt("File name:",t);if(!i)return;const o=a.write_quest_qst({id:e.id.val,language:e.language.val,name:e.name.val,short_description:e.short_description.val,long_description:e.long_description.val,episode:e.episode,objects:e.objects.val.map(e=>({type:e.type,area_id:e.area_id,section_id:e.section_id.val,position:e.position.val,rotation:e.rotation.val,unknown:e.unknown,id:e.id,group_id:e.group_id,properties:e.properties})),npcs:e.npcs.val.map(e=>({type:e.type,area_id:e.area_id,section_id:e.section_id.val,position:e.position.val,rotation:e.rotation.val,scale:e.scale,unknown:e.unknown,pso_type_id:e.pso_type_id,npc_id:e.npc_id,script_label:e.script_label,pso_roaming:e.pso_roaming})),dat_unknowns:e.dat_unknowns,object_code:e.object_code,shop_items:e.shop_items,map_designations:e.map_designations.val},i);i.endsWith(".qst")||(i+=".qst");const n=document.createElement("a");n.href=URL.createObjectURL(new Blob([o],{type:"application/octet-stream"})),n.download=i,document.body.appendChild(n),n.click(),URL.revokeObjectURL(n.href),document.body.removeChild(n)},this.id_changed=e=>{this.current_quest.val&&this.undo.push(new O.EditIdAction(this.current_quest.val,e)).redo()},this.name_changed=e=>{this.current_quest.val&&this.undo.push(new m.EditNameAction(this.current_quest.val,e)).redo()},this.short_description_changed=e=>{this.current_quest.val&&this.undo.push(new f.EditShortDescriptionAction(this.current_quest.val,e)).redo()},this.long_description_changed=e=>{this.current_quest.val&&this.undo.push(new E.EditLongDescriptionAction(this.current_quest.val,e)).redo()},this.translate_entity=(e,t,i,o,n,s)=>{this.undo.push(new w.TranslateEntityAction(e,t,i,o,n,s)).redo()},this.rotate_entity=(e,t,i,o)=>{this.undo.push(new T.RotateEntityAction(e,t,i,o)).redo()},this.push_create_entity_action=e=>{this.undo.push(new y.CreateEntityAction(e))},this.remove_entity=e=>{this.undo.push(new b.RemoveEntityAction(e)).redo()},this.set_section_on_quest_entity=(e,t)=>{const i=t.find(t=>t.id===e.section_id.val);i?e.set_section(i):R.warn(`Section ${e.section_id.val} not found.`)},this.disposer.add_all(v.gui_store.tool.observe(({value:e})=>{e===v.GuiTool.QuestEditor&&this.undo.make_current()},{call_now:!0}),this.current_quest.flat_map(e=>e?e.npcs:n.property([])).observe(({value:e})=>{const t=this.selected_entity.val;t instanceof u.QuestNpcModel&&!e.includes(t)&&this.set_selected_entity(void 0)}),this.current_quest.flat_map(e=>e?e.objects:n.property([])).observe(({value:e})=>{const t=this.selected_entity.val;t instanceof _.QuestObjectModel&&!e.includes(t)&&this.set_selected_entity(void 0)}))}dispose(){this.disposer.dispose()}set_quest(e,t){return o(this,void 0,void 0,(function*(){if(this.undo.reset(),this._current_area.val=void 0,this._selected_entity.val=void 0,this._current_quest_filename.val=t,this._current_quest.val=e,e){this._current_area.val=c.area_store.get_area(e.episode,0);for(const t of e.area_variants.val){const i=yield c.area_store.get_area_sections(e.episode,t);t.sections.val.splice(0,1/0,...i);for(const o of e.objects.val.filter(e=>e.area_id===t.area.id))try{this.set_section_on_quest_entity(o,i)}catch(e){R.error(e)}for(const o of e.npcs.val.filter(e=>e.area_id===t.area.id))try{this.set_section_on_quest_entity(o,i)}catch(e){R.error(e)}}}else R.error("Couldn't parse quest file.")}))}}t.QuestEditorStore=S,t.quest_editor_store=new S},dx17:function(e,t,i){"use strict";var o=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))((function(n,s){function r(e){try{d(o.next(e))}catch(e){s(e)}}function a(e){try{d(o.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}d((o=o.apply(e,t||[])).next())}))},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=i("nsCy"),r=i("G+UN"),a=i("6WXA"),d=n(i("GGSb")),l=i("sZ1+"),_=i("lC1H"),u=d.default.get("stores/ItemDropStore");class c{constructor(e){this.enemy_drops=e}}t.ItemDropStore=c;class p{constructor(){this.table=[],this.item_type_to_drops=[];for(let e=0;e=0){const e=new r.SectionModel(_.id,a.vec3_to_threejs(_.position),new o.Euler(_.rotation.x,_.rotation.y,_.rotation.z,"ZXY"),t);i.push(e),u.userData.section=e}}return[i,d]}},hUhj:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("nEgy"),n=i("52VV"),s=i("+LO4");t.AbstractProperty=class extends s.AbstractMinimalProperty{map(e){return new o.DependentProperty([this],()=>e(this.val))}flat_map(e){return new n.FlatMappedProperty(this,t=>e(t))}}},hVaW:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ASM_SYNTAX={defaultToken:"invalid",tokenizer:{root:[[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,{token:"string.quote",bracket:"@open",next:"@string"}],[/r\d+/,"predefined"],[/[^\s]+:/,"tag"],[/0x[0-9a-fA-F]+/,"number.hex"],[/-?\d+(\.\d+)?(e-?\d+)?/,"number.float"],[/-?[0-9]+/,"number"],[/\.[^\s]+/,"keyword"],[/[a-z][a-z0-9_=<>!]*/,"identifier"],[/[ \t\r\n]+/,"white"],[/\/\/.*$/,"comment"],[/,/,"delimiter"]],string:[[/[^\\"]+/,"string"],[/\\(?:[n\\"])/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]]}}},iR5r:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("Womt");function n(e){let t,i;switch(e.format[1]){case 6:t=o.RGBA_S3TC_DXT1_Format,i=e.width*e.height/2;break;case 7:t=o.RGBA_S3TC_DXT3_Format,i=e.width*e.height;break;default:throw new Error(`Format ${e.format.join(", ")} not supported.`)}const n=new o.CompressedTexture([{data:new Uint8Array(e.data,0,i),width:e.width,height:e.height}],e.width,e.height,t);return n.minFilter=o.LinearFilter,n.wrapS=o.MirroredRepeatWrapping,n.wrapT=o.MirroredRepeatWrapping,n.needsUpdate=!0,n}t.xvm_to_textures=function(e){return e.textures.map(n)},t.xvm_texture_to_texture=n},j4Ss:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("nN8q"),n=i("FXpb"),s=i("rqwK"),r=i("sZ1+");i("Czz9");const a=i("CpvQ"),d=i("yar8"),l=i("ouMO");class _ extends o.ResizableWidget{constructor(e){super(),this.element=n.el.div({class:"hunt_optimizer_MethodsForEpisodeView"}),this.episode=e,this.enemy_types=r.ENEMY_NPC_TYPES.filter(e=>r.npc_data(e).episode===this.episode);const t=l.list_property(),i=this.disposable(new d.Table({class:"hunt_optimizer_MethodsForEpisodeView_table",values:t,sort:e=>{t.sort((t,i)=>{for(const{column:o,direction:n}of e){let e=0;switch(o.key){case"method":e=t.name.localeCompare(i.name);break;case"time":e=t.time.val.as("minutes")-i.time.val.as("minutes");break;default:{const n=r.NpcType[o.key];n&&(e=(t.enemy_counts.get(n)||0)-(i.enemy_counts.get(n)||0))}}if(0!==e)return n===d.SortDirection.Asc?e:-e}return 0})},columns:[{key:"method",title:"Method",fixed:!0,width:250,sortable:!0,render_cell:e=>e.name},{key:"time",title:"Time",fixed:!0,width:60,input:!0,sortable:!0,render_cell(e,t){const i=t.add(new a.DurationInput(e.time.val));return t.add(i.value.observe(({value:t})=>e.set_user_time(t))),i.element}},...this.enemy_types.map(e=>({key:r.NpcType[e],title:r.npc_data(e).simple_name,width:90,text_align:"right",sortable:!0,render_cell(t){const i=t.enemy_counts.get(e);return null==i?"":i.toString()}}))]}));this.element.append(i.element),this.disposable(s.hunt_method_stores.observe_current(e=>{this.hunt_methods_observer&&this.hunt_methods_observer.dispose(),this.hunt_methods_observer=e.methods.observe(({value:e})=>{t.val=e.filter(e=>e.episode===this.episode)},{call_now:!0})},{call_now:!0})),this.finalize_construction(_.prototype)}dispose(){super.dispose(),this.hunt_methods_observer&&this.hunt_methods_observer.dispose()}}t.MethodsForEpisodeView=_},jJhE:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.is_property=function(e){return e.is_property},t.is_any_property=function(e){return e&&e.is_property}},karJ:function(e,t,i){"use strict";var o=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))((function(n,s){function r(e){try{d(o.next(e))}catch(e){s(e)}}function a(e){try{d(o.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}d((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const n=i("Yuai");t.get_character_class_data=function(e,t,i){return o(this,void 0,void 0,(function*(){return yield n.load_array_buffer(function(e,t,i){return`/player/${e}${t}${null==i?"":i}.nj`}(e,t,i))}))},t.get_character_class_animation_data=function(e){return o(this,void 0,void 0,(function*(){return yield n.load_array_buffer(`/player/animation/animation_${e.toString().padStart(3,"0")}.njm`)}))}},kiqn:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("ouMO"),n=i("Womt");t.QuestEntityModel=class{constructor(e,t,i,n,s){if(this._section=o.property(void 0),null==e)throw new Error("type is required.");if(!Number.isInteger(t))throw new Error("area_id should be an integer.");if(!Number.isInteger(i))throw new Error("section_id should be an integer.");if(!n)throw new Error("position is required.");if(!s)throw new Error("rotation is required.");this.type=e,this.area_id=t,this.section=this._section,this._section_id=o.property(i),this.section_id=this._section_id,this._position=o.property(n),this.position=this._position,this._world_position=o.property(n),this.world_position=this._world_position,this._rotation=o.property(s),this.rotation=this._rotation,this._world_rotation=o.property(s),this.world_rotation=this._world_rotation}set_section(e){if(e.area_variant.area.id!==this.area_id)throw new Error("Quest entities can't be moved across areas.");return this._section.val=e,this._section_id.val=e.id,this.set_position(this.position.val),this.set_rotation(this.rotation.val),this}set_position(e){this._position.val=e;const t=this.section.val;return this._world_position.val=t?e.clone().applyEuler(t.rotation).add(t.position):e,this}set_world_position(e){this._world_position.val=e;const t=this.section.val;return this._position.val=t?e.clone().sub(t.position).applyEuler(t.inverse_rotation):e,this}set_rotation(e){this._rotation.val=e;const t=this.section.val;return this._world_rotation.val=t?(new n.Euler).setFromQuaternion((new n.Quaternion).setFromEuler(t.rotation).multiply((new n.Quaternion).setFromEuler(e)),"ZXY"):e,this}set_world_rotation(e){this._world_rotation.val=e;const t=this.section.val;return this._rotation.val=t?(new n.Euler).setFromQuaternion((new n.Quaternion).setFromEuler(e).multiply((new n.Quaternion).setFromEuler(t.rotation).inverse()),"ZXY"):e,this}}},kwt4:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("9Ykw"),n=i("9Onn"),s=i("q7ag");t.ANGLE_TO_RAD=2*Math.PI/65535;const r=1296255566;t.is_njcm_model=function(e){return"njcm"===e.type},t.is_xj_model=function(e){return"xj"===e.type};class a{constructor(e,t,i,o,n,s){this.bone_cache=new Map,this._bone_count=-1,this.evaluation_flags=e,this.model=t,this.position=i,this.rotation=o,this.scale=n,this.children=s}bone_count(){if(-1===this._bone_count){const e=[0];this.get_bone_internal(this,1/0,e),this._bone_count=e[0]}return this._bone_count}get_bone(e){let t=this.bone_cache.get(e);return void 0===t&&(t=this.get_bone_internal(this,e,[0]),this.bone_cache.set(e,t||null)),t||void 0}get_bone_internal(e,t,i){if(!e.evaluation_flags.skip){const o=i[0]++;if(this.bone_cache.set(o,e),o===t)return e}if(!e.evaluation_flags.break_child_trace)for(const o of e.children){const e=this.get_bone_internal(o,t,i);if(e)return e}}}function d(e,t,i){const n=o.parse_iff(e).filter(e=>e.type===r),s=[];for(const e of n)s.push(...l(e.data,t,i));return s}function l(e,i,o){const n=e.u32(),s=0!=(1&n),r=0!=(2&n),d=0!=(4&n),_=0!=(8&n),u=0!=(16&n),c=0!=(32&n),p=0!=(64&n),v=0!=(128&n),h=e.u32(),w=e.vec3_f32(),f={x:e.i32()*t.ANGLE_TO_RAD,y:e.i32()*t.ANGLE_TO_RAD,z:e.i32()*t.ANGLE_TO_RAD},E=e.vec3_f32(),m=e.u32(),O=e.u32();let g,y,b;return h&&(e.seek_start(h),g=i(e,o)),m?(e.seek_start(m),y=l(e,i,o)):y=[],O?(e.seek_start(O),b=l(e,i,o)):b=[],[new a({no_translate:s,no_rotate:r,no_scale:d,hidden:_,break_child_trace:u,zxy_rotation_order:c,skip:p,shape_skip:v},g,w,f,E,y),...b]}t.NjObject=a,t.parse_nj=function(e){return d(e,n.parse_njcm_model,[])},t.parse_xj=function(e){return d(e,s.parse_xj_model,void 0)},t.parse_xj_object=function(e){return l(e,s.parse_xj_model,void 0)}},lC1H:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.EnemyDrop=class{constructor(e,t,i,o,n,s){this.difficulty=e,this.section_id=t,this.npc_type=i,this.item_type=o,this.anything_rate=n,this.rare_rate=s,this.rate=n*s}}},lHpu:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("Womt"),n=i("tyuj"),s=i("iR5r"),r=i("Eqai"),a=i("488w"),d=i("7CyS"),l=i("Ftn7"),_=i("Tpfs");t.Model3DRenderer=class extends l.Renderer{constructor(){super(),this.disposer=new _.Disposer,this.clock=new o.Clock,this.update_animation_time=!0,this.camera=new o.PerspectiveCamera(75,1,1,200),this.nj_data_or_xvm_changed=()=>{this.mesh&&(this.scene.remove(this.mesh),this.mesh=void 0,this.scene.remove(this.skeleton_helper),this.skeleton_helper=void 0),this.animation&&(this.animation.mixer.stopAllAction(),this.mesh&&this.animation.mixer.uncacheRoot(this.mesh),this.animation=void 0);const e=n.model_store.current_nj_data.val;if(e){const{nj_object:t,has_skeleton:i}=e;let d;const l=n.model_store.current_xvm.val,_=l?s.xvm_to_textures(l):void 0,u=_&&_.map(e=>new o.MeshLambertMaterial({skinning:i,map:e,side:o.DoubleSide,alphaTest:.5})),c=(d=i?r.create_skinned_mesh(a.ninja_object_to_buffer_geometry(t),u):r.create_mesh(a.ninja_object_to_buffer_geometry(t),u)).geometry.boundingBox,p=c.max.y-c.min.y;d.translateY(-p/2-c.min.y),this.mesh=d,this.scene.add(d),this.skeleton_helper=new o.SkeletonHelper(d),this.skeleton_helper.visible=n.model_store.show_skeleton.val,this.skeleton_helper.material.linewidth=3,this.scene.add(this.skeleton_helper),this.reset_camera(new o.Vector3(0,10,20),new o.Vector3(0,0,0))}this.schedule_render()},this.nj_motion_changed=({value:e})=>{let t;this.animation&&(this.animation.mixer.stopAllAction(),t=this.animation.mixer);const i=n.model_store.current_nj_data.val;if(!(this.mesh&&this.mesh instanceof o.SkinnedMesh&&e&&i))return;this.animation||(t=new o.AnimationMixer(this.mesh));const s=d.create_animation_clip(i.nj_object,e);this.animation={mixer:t,clip:s,action:t.clipAction(s)},this.clock.start(),this.animation.action.play(),this.schedule_render()},this.show_skeleton_changed=({value:e})=>{this.skeleton_helper&&(this.skeleton_helper.visible=e,this.schedule_render())},this.animation_playing_changed=({value:e})=>{this.animation&&(this.animation.action.paused=!e,e?(this.clock.start(),this.schedule_render()):this.clock.stop())},this.animation_frame_rate_changed=({value:e})=>{this.animation&&(this.animation.mixer.timeScale=e/d.PSO_FRAME_RATE)},this.animation_frame_changed=({value:e})=>{const t=n.model_store.current_nj_motion.val;if(this.animation&&t){const i=t.frame_count;e>i&&(e=1),e<1&&(e=i),this.update_animation_time&&(this.animation.action.time=(e-1)/d.PSO_FRAME_RATE),this.schedule_render()}},this.disposer.add_all(n.model_store.current_nj_data.observe(this.nj_data_or_xvm_changed),n.model_store.current_xvm.observe(this.nj_data_or_xvm_changed),n.model_store.current_nj_motion.observe(this.nj_motion_changed),n.model_store.show_skeleton.observe(this.show_skeleton_changed),n.model_store.animation_playing.observe(this.animation_playing_changed),n.model_store.animation_frame_rate.observe(this.animation_frame_rate_changed),n.model_store.animation_frame.observe(this.animation_frame_changed)),this.init_camera_controls()}set_size(e,t){this.camera.aspect=e/t,this.camera.updateProjectionMatrix(),super.set_size(e,t)}dispose(){super.dispose(),this.disposer.dispose()}render(){this.animation&&this.animation.mixer.update(this.clock.getDelta()),this.light_holder.quaternion.copy(this.camera.quaternion),super.render(),this.animation&&!this.animation.action.paused&&(this.update_animation_frame(),this.schedule_render())}update_animation_frame(){if(this.animation&&!this.animation.action.paused){const e=this.animation.action.time;this.update_animation_time=!1,n.model_store.animation_frame.val=e*d.PSO_FRAME_RATE+1,this.update_animation_time=!0}}}},lPzw:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.AreaModel=class{constructor(e,t,i,o){if(!Number.isInteger(e)||e<0)throw new Error(`Expected id to be a non-negative integer, got ${e}.`);if(!t)throw new Error("name is required.");if(!o)throw new Error("area_variants is required.");this.id=e,this.name=t,this.order=i,this.area_variants=o}}},lg9k:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("ZPAt");t.Instruction=class{constructor(e,t){this.opcode=e,this.args=t,this.arg_size=0,this.param_to_args=[];const i=Math.min(e.params.length,t.length);for(let n=0;ne.can_undo),this.can_redo=this.current.flat_map(e=>e.can_redo),this.first_undo=this.current.flat_map(e=>e.first_undo),this.first_redo=this.current.flat_map(e=>e.first_redo)}undo(){return this.current.val.undo()}redo(){return this.current.val.redo()}}},nEgy:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("Tpfs"),n=i("+LO4"),s=i("52VV");class r extends n.AbstractMinimalProperty{constructor(e,t){super(),this.dependencies=e,this.f=t,this.dependency_disposables=new o.Disposer}get val(){return this.get_val()}get_val(){return this.dependency_disposables.length?this._val:this.f()}observe(e,t={}){const i=super.observe(e,t);return 0===this.dependency_disposables.length&&(this._val=this.f(),this.dependency_disposables.add_all(...this.dependencies.map(e=>e.observe(()=>{const e=this._val;this._val=this.f(),this.emit(e)})))),this.emit(this._val),{dispose:()=>{i.dispose(),0===this.observers.length&&this.dependency_disposables.dispose_all()}}}map(e){return new r([this],()=>e(this.val))}flat_map(e){return new s.FlatMappedProperty(this,t=>e(t))}}t.DependentProperty=r},nN8q:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("TRid");t.ResizableWidget=class extends o.Widget{constructor(){super(...arguments),this.width=0,this.height=0}resize(e,t){return this.width=e,this.height=t,this.element.style.width=`${e}px`,this.element.style.height=`${t}px`,this}}},nowp:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("ExVU"),n=i("ouMO");t.WantedItemModel=class{constructor(e,t){this.item_type=e,this._amount=n.property(t),this.amount=this._amount}set_amount(e){return this._amount.val=e,this}};t.OptimalResultModel=class{constructor(e,t){this.wanted_items=e,this.optimal_methods=t}};t.OptimalMethodModel=class{constructor(e,t,i,n,s,r,a){this.difficulty=e,this.section_ids=t,this.method_name=i,this.method_episode=n,this.method_time=s,this.runs=r,this.item_counts=a,this.total_time=o.Duration.fromMillis(r*s.as("milliseconds"))}}},nsCy:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("uiJh");var n,s,r;t.RARE_ENEMY_PROB=1/512,t.KONDRIEU_PROB=.1,function(e){e.Ephinea="Ephinea"}(n=t.Server||(t.Server={})),t.Servers=o.enum_values(n),function(e){e[e.Viridia=0]="Viridia",e[e.Greenill=1]="Greenill",e[e.Skyly=2]="Skyly",e[e.Bluefull=3]="Bluefull",e[e.Purplenum=4]="Purplenum",e[e.Pinkal=5]="Pinkal",e[e.Redria=6]="Redria",e[e.Oran=7]="Oran",e[e.Yellowboze=8]="Yellowboze",e[e.Whitill=9]="Whitill"}(s=t.SectionId||(t.SectionId={})),t.SectionIds=o.enum_values(s),function(e){e[e.Normal=0]="Normal",e[e.Hard=1]="Hard",e[e.VHard=2]="VHard",e[e.Ultimate=3]="Ultimate"}(r=t.Difficulty||(t.Difficulty={})),t.Difficulties=o.enum_values(r)},oSIo:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("x4IQ");t.EditShortDescriptionAction=class extends o.QuestEditAction{constructor(){super(...arguments),this.description="Edit short description"}undo(){this.quest.set_short_description(this.old)}redo(){this.quest.set_short_description(this.new)}}},ouMO:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("Q+PT"),n=i("0CzU"),s=i("nEgy"),r=i("22Lq");t.emitter=function(){return new o.SimpleEmitter},t.property=function(e){return new n.SimpleProperty(e)},t.list_property=function(e,...t){return new r.SimpleListProperty(e,...t)},t.add=function(e,t){return e.map(e=>e+t)},t.sub=function(e,t){return e.map(e=>e-t)},t.map=function(e,...t){return new s.DependentProperty(t,()=>e(...t.map(e=>e.val)))}},oxtq:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.ListChange=0]="ListChange",e[e.ValueChange=1]="ValueChange"}(t.ListChangeType||(t.ListChangeType={})),t.is_list_property=function(e){return e.is_list_property},t.is_any_list_property=function(e){return e&&e.is_list_property}},oyid:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("FXpb"),n=i("sDu+"),s=i("4VsB");class r extends n.LabelledControl{constructor(e=!1,t){super(t),this.element=o.create_element("input",{class:"core_CheckBox"}),this.preferred_label_position="right",this._checked=new s.WidgetProperty(this,e,this.set_checked),this.checked=this._checked,this.set_checked(e),this.element.type="checkbox",this.element.onchange=()=>this._checked.set_val(this.element.checked,{silent:!1}),this.finalize_construction(r.prototype)}set_enabled(e){super.set_enabled(e),this.element.disabled=!e}set_checked(e){this.element.checked=e}}t.CheckBox=r},pgiS:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("x4IQ");t.EditNameAction=class extends o.QuestEditAction{constructor(){super(...arguments),this.description="Edit name"}undo(){this.quest.set_name(this.old)}redo(){this.quest.set_name(this.new)}}},poKQ:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("yQqj"),n=i("c5EP");t.CreateEntityAction=class{constructor(e){this.entity=e,this.description=`Create ${o.entity_data(e.type).name}`}undo(){const e=n.quest_editor_store.current_quest.val;e&&e.remove_entity(this.entity)}redo(){const e=n.quest_editor_store.current_quest.val;e&&(e.add_entity(this.entity),n.quest_editor_store.set_selected_entity(this.entity))}}},q1Dg:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("nN8q"),n=i("FXpb"),s=i("c5EP"),r=i("xs7i"),a=i("PE7g"),d=i("Tpfs"),l=i("E/0a"),_=i("ETgL");i("ObFr");const u=i("5aKR");class c extends o.ResizableWidget{constructor(){super(),this.element=n.el.div({class:"quest_editor_QuestInfoView",tab_index:-1}),this.table_element=n.el.table(),this.id_input=this.disposable(new a.NumberInput),this.name_input=this.disposable(new l.TextInput("",{max_length:32})),this.short_description_input=this.disposable(new _.TextArea("",{max_length:128,font_family:'"Courier New", monospace',cols:25,rows:5})),this.long_description_input=this.disposable(new _.TextArea("",{max_length:288,font_family:'"Courier New", monospace',cols:25,rows:10})),this.no_quest_view=new u.DisabledView("No quest loaded."),this.quest_disposer=this.disposable(new d.Disposer);const e=s.quest_editor_store.current_quest,t=e.map(e=>null==e);this.table_element.append(n.el.tr({},n.el.th({text:"Episode:"}),this.episode_element=n.el.td()),n.el.tr({},n.el.th({text:"ID:"}),n.el.td({},this.id_input.element)),n.el.tr({},n.el.th({text:"Name:"}),n.el.td({},this.name_input.element)),n.el.tr({},n.el.th({text:"Short description:",col_span:2})),n.el.tr({},n.el.td({col_span:2},this.short_description_input.element)),n.el.tr({},n.el.th({text:"Long description:",col_span:2})),n.el.tr({},n.el.td({col_span:2},this.long_description_input.element))),this.bind_hidden(this.table_element,t),this.element.append(this.table_element,this.no_quest_view.element),this.element.addEventListener("focus",()=>s.quest_editor_store.undo.make_current(),!0),this.disposables(this.no_quest_view.visible.bind_to(t),e.observe(({value:e})=>{this.quest_disposer.dispose_all(),this.episode_element.textContent=e?r.Episode[e.episode]:"",e&&this.quest_disposer.add_all(this.id_input.value.bind_to(e.id),this.id_input.value.observe(s.quest_editor_store.id_changed),this.name_input.value.bind_to(e.name),this.name_input.value.observe(s.quest_editor_store.name_changed),this.short_description_input.value.bind_to(e.short_description),this.short_description_input.value.observe(s.quest_editor_store.short_description_changed),this.long_description_input.value.bind_to(e.long_description),this.long_description_input.value.observe(s.quest_editor_store.long_description_changed))})),this.finalize_construction(c.prototype)}}t.QuestInfoView=c},q7ag:function(e,t,i){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=o(i("GGSb")).default.get("data_formats/parsing/ninja/xj");function s(e,t,i){const o=[];for(let n=0;n=1&&(i>1&&n.warn(`Vertex info count of ${i} was larger than expected.`),l.vertices.push(...function(e,t){e.seek_start(t);const i=e.u16();e.seek(2);const o=e.u32(),s=e.u32(),r=e.u32(),a=[];for(let t=0;tthis.button_mousedown(),{capture:!0}),this.button.mouseup.observe(()=>this.button_mouseup()),this.menu.selected.observe(({value:e})=>{e&&(this._chosen.emit({value:e}),this.menu.selected.val=void 0)})),this.finalize_construction(d.prototype)}set_enabled(e){super.set_enabled(e),this.button.enabled.val=e}button_mousedown(){this.just_opened=!this.menu.visible.val,this.menu.visible.val=!0}button_mouseup(){this.just_opened?this.menu.focus():this.menu.visible.val=!1,this.just_opened=!1}}t.DropDown=d},rqwK:function(e,t,i){"use strict";var o=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))((function(n,s){function r(e){try{d(o.next(e))}catch(e){s(e)}}function a(e){try{d(o.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}d((o=o.apply(e,t||[])).next())}))},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=n(i("GGSb")),r=i("nsCy"),a=i("sZ1+"),d=i("upFJ"),l=i("IV2v"),_=i("RMZt"),u=i("ExVU"),c=i("ouMO"),p=i("Tpfs"),v=i("6WXA"),h=s.default.get("hunt_optimizer/stores/HuntMethodStore"),w=u.Duration.fromObject({minutes:30}),f=u.Duration.fromObject({minutes:45}),E=u.Duration.fromObject({minutes:45});class m{constructor(e,t){this.disposer=new p.Disposer,this.methods=c.list_property(e=>[e.user_time],...t),this.disposer.add(this.methods.observe_list(()=>_.hunt_method_persister.persist_method_user_times(this.methods.val,e)))}dispose(){this.disposer.dispose()}}t.HuntMethodStore=m,t.hunt_method_stores=new v.ServerMap((function(e){return o(this,void 0,void 0,(function*(){const t=yield fetch(`/assets/quests.${r.Server[e].toLowerCase()}.json`),i=yield t.json(),o=[];for(const e of i){let t=0;const i=new Map;for(const[o,n]of Object.entries(e.enemyCounts)){const e=a.NpcType[o];e?(i.set(e,n),t+=n):h.error(`No NpcType found for code ${o}.`)}switch(e.id){case 31:case 34:case 1305:case 1306:case 1307:case 313:case 314:continue}o.push(new l.HuntMethodModel(`q${e.id}`,e.name,new d.SimpleQuestModel(e.id,e.name,e.episode,i),/^\d-\d.*/.test(e.name)?f:t>400?E:w))}return yield _.hunt_method_persister.load_method_user_times(o,e),new m(e,o)}))}))},"sDu+":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("7ZX1"),n=i("QmPX");t.LabelledControl=class extends n.Control{constructor(e){super(e),this._label_text=e&&e.label}get label(){return this._label||null==this._label_text||(this._label=this.disposable(new o.Label(this._label_text,{enabled:this.enabled.val,tooltip:this.tooltip.val})),this.id||(this.id="core_LabelledControl_id_"+String(s++)),this._label.for=this.id),this._label}set_enabled(e){super.set_enabled(e),this._label&&(this._label.enabled.val=e)}set_tooltip(e){super.set_tooltip(e),this._label&&(this._label.tooltip.val=e)}};let s=0},sMN3:function(e,t,i){"use strict";var o=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))((function(n,s){function r(e){try{d(o.next(e))}catch(e){s(e)}}function a(e){try{d(o.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}d((o=o.apply(e,t||[])).next())}))},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=n(i("lLyO")),r=i("nsCy"),a=i("sZ1+"),d=i("nowp"),l=i("ouMO"),_=i("rqwK"),u=i("dx17"),c=i("G+UN"),p=i("w+Lt"),v=i("6WXA"),h=i("Tpfs");class w{constructor(e,t,i,n){this.server=e,this.item_drop_store=i,this._wanted_items=l.list_property(e=>[e.amount]),this.disposer=new h.Disposer,this.optimize=(e,t)=>{if(!e.length)return;const i=new Set(e.filter(e=>e.amount.val>0).map(e=>e.item_type)),o=this.item_drop_store.enemy_drops,n={};for(const e of this.wanted_items.val)n[e.item_type.name]={min:e.amount.val};const l={},_=new Map;for(const e of t){const t=new Map;for(const[i,o]of e.enemy_counts.entries()){const e=t.get(i)||0,n=a.npc_data(i);if(null==n.rare_type)t.set(i,e+o);else{let s,d;n.rare_type===a.NpcType.Kondrieu?(s=1-r.KONDRIEU_PROB,d=r.KONDRIEU_PROB):(s=1-r.RARE_ENEMY_PROB,d=r.RARE_ENEMY_PROB),t.set(i,e+o*s),t.set(n.rare_type,(t.get(n.rare_type)||0)+o*d)}}const n=[t],s=t.get(a.NpcType.PanArms);if(s){const e=new Map(t);e.delete(a.NpcType.PanArms),e.set(a.NpcType.Migium,s),e.set(a.NpcType.Hidoom,s),n.push(e)}const d=t.get(a.NpcType.PanArms2);if(d){const e=new Map(t);e.delete(a.NpcType.PanArms2),e.set(a.NpcType.Migium2,d),e.set(a.NpcType.Hidoom2,d),n.push(e)}for(let t=0;to(this,void 0,void 0,(function*(){this._wanted_items.val=yield p.hunt_optimizer_persister.load_wanted_items(this.server),this.disposer.add(this._wanted_items.observe(({value:e})=>{p.hunt_optimizer_persister.persist_wanted_items(this.server,e)}))})),this.huntable_item_types=t.item_types.filter(e=>i.enemy_drops.get_drops_for_item_type(e.id).length),this.wanted_items=this._wanted_items,this.result=l.map(this.optimize,this.wanted_items,n.methods),this.initialize_persistence()}dispose(){this.disposer.dispose()}add_wanted_item(e){this._wanted_items.val.find(t=>t.item_type===e)||this._wanted_items.push(new d.WantedItemModel(e,1))}remove_wanted_item(e){this._wanted_items.remove(e)}full_method_name(e,t,i,o){let n=`${e}\t${t}\t${i.id}`;return o&&(n+="\tspa"),n}}t.hunt_optimizer_stores=new v.ServerMap((function(e){return o(this,void 0,void 0,(function*(){return new w(e,yield c.item_type_stores.get(e),yield u.item_drop_stores.get(e),yield _.hunt_method_stores.get(e))}))}))},"sZ1+":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("xs7i");var n;!function(e){e[e.Unknown=0]="Unknown",e[e.FemaleFat=1]="FemaleFat",e[e.FemaleMacho=2]="FemaleMacho",e[e.FemaleTall=3]="FemaleTall",e[e.MaleDwarf=4]="MaleDwarf",e[e.MaleFat=5]="MaleFat",e[e.MaleMacho=6]="MaleMacho",e[e.MaleOld=7]="MaleOld",e[e.BlueSoldier=8]="BlueSoldier",e[e.RedSoldier=9]="RedSoldier",e[e.Principal=10]="Principal",e[e.Tekker=11]="Tekker",e[e.GuildLady=12]="GuildLady",e[e.Scientist=13]="Scientist",e[e.Nurse=14]="Nurse",e[e.Irene=15]="Irene",e[e.ItemShop=16]="ItemShop",e[e.Nurse2=17]="Nurse2",e[e.Hildebear=18]="Hildebear",e[e.Hildeblue=19]="Hildeblue",e[e.RagRappy=20]="RagRappy",e[e.AlRappy=21]="AlRappy",e[e.Monest=22]="Monest",e[e.Mothmant=23]="Mothmant",e[e.SavageWolf=24]="SavageWolf",e[e.BarbarousWolf=25]="BarbarousWolf",e[e.Booma=26]="Booma",e[e.Gobooma=27]="Gobooma",e[e.Gigobooma=28]="Gigobooma",e[e.Dragon=29]="Dragon",e[e.GrassAssassin=30]="GrassAssassin",e[e.PoisonLily=31]="PoisonLily",e[e.NarLily=32]="NarLily",e[e.NanoDragon=33]="NanoDragon",e[e.EvilShark=34]="EvilShark",e[e.PalShark=35]="PalShark",e[e.GuilShark=36]="GuilShark",e[e.PofuillySlime=37]="PofuillySlime",e[e.PouillySlime=38]="PouillySlime",e[e.PanArms=39]="PanArms",e[e.Migium=40]="Migium",e[e.Hidoom=41]="Hidoom",e[e.DeRolLe=42]="DeRolLe",e[e.Dubchic=43]="Dubchic",e[e.Gilchic=44]="Gilchic",e[e.Garanz=45]="Garanz",e[e.SinowBeat=46]="SinowBeat",e[e.SinowGold=47]="SinowGold",e[e.Canadine=48]="Canadine",e[e.Canane=49]="Canane",e[e.Dubswitch=50]="Dubswitch",e[e.VolOpt=51]="VolOpt",e[e.Delsaber=52]="Delsaber",e[e.ChaosSorcerer=53]="ChaosSorcerer",e[e.DarkGunner=54]="DarkGunner",e[e.DeathGunner=55]="DeathGunner",e[e.ChaosBringer=56]="ChaosBringer",e[e.DarkBelra=57]="DarkBelra",e[e.Dimenian=58]="Dimenian",e[e.LaDimenian=59]="LaDimenian",e[e.SoDimenian=60]="SoDimenian",e[e.Bulclaw=61]="Bulclaw",e[e.Bulk=62]="Bulk",e[e.Claw=63]="Claw",e[e.DarkFalz=64]="DarkFalz",e[e.Hildebear2=65]="Hildebear2",e[e.Hildeblue2=66]="Hildeblue2",e[e.RagRappy2=67]="RagRappy2",e[e.LoveRappy=68]="LoveRappy",e[e.StRappy=69]="StRappy",e[e.HalloRappy=70]="HalloRappy",e[e.EggRappy=71]="EggRappy",e[e.Monest2=72]="Monest2",e[e.Mothmant2=73]="Mothmant2",e[e.PoisonLily2=74]="PoisonLily2",e[e.NarLily2=75]="NarLily2",e[e.GrassAssassin2=76]="GrassAssassin2",e[e.Dimenian2=77]="Dimenian2",e[e.LaDimenian2=78]="LaDimenian2",e[e.SoDimenian2=79]="SoDimenian2",e[e.DarkBelra2=80]="DarkBelra2",e[e.BarbaRay=81]="BarbaRay",e[e.SavageWolf2=82]="SavageWolf2",e[e.BarbarousWolf2=83]="BarbarousWolf2",e[e.PanArms2=84]="PanArms2",e[e.Migium2=85]="Migium2",e[e.Hidoom2=86]="Hidoom2",e[e.Dubchic2=87]="Dubchic2",e[e.Gilchic2=88]="Gilchic2",e[e.Garanz2=89]="Garanz2",e[e.Dubswitch2=90]="Dubswitch2",e[e.Delsaber2=91]="Delsaber2",e[e.ChaosSorcerer2=92]="ChaosSorcerer2",e[e.GolDragon=93]="GolDragon",e[e.SinowBerill=94]="SinowBerill",e[e.SinowSpigell=95]="SinowSpigell",e[e.Merillia=96]="Merillia",e[e.Meriltas=97]="Meriltas",e[e.Mericarol=98]="Mericarol",e[e.Mericus=99]="Mericus",e[e.Merikle=100]="Merikle",e[e.UlGibbon=101]="UlGibbon",e[e.ZolGibbon=102]="ZolGibbon",e[e.Gibbles=103]="Gibbles",e[e.Gee=104]="Gee",e[e.GiGue=105]="GiGue",e[e.IllGill=106]="IllGill",e[e.DelLily=107]="DelLily",e[e.Epsilon=108]="Epsilon",e[e.GalGryphon=109]="GalGryphon",e[e.Deldepth=110]="Deldepth",e[e.Delbiter=111]="Delbiter",e[e.Dolmolm=112]="Dolmolm",e[e.Dolmdarl=113]="Dolmdarl",e[e.Morfos=114]="Morfos",e[e.Recobox=115]="Recobox",e[e.Recon=116]="Recon",e[e.SinowZoa=117]="SinowZoa",e[e.SinowZele=118]="SinowZele",e[e.OlgaFlow=119]="OlgaFlow",e[e.SandRappy=120]="SandRappy",e[e.DelRappy=121]="DelRappy",e[e.Astark=122]="Astark",e[e.SatelliteLizard=123]="SatelliteLizard",e[e.Yowie=124]="Yowie",e[e.MerissaA=125]="MerissaA",e[e.MerissaAA=126]="MerissaAA",e[e.Girtablulu=127]="Girtablulu",e[e.Zu=128]="Zu",e[e.Pazuzu=129]="Pazuzu",e[e.Boota=130]="Boota",e[e.ZeBoota=131]="ZeBoota",e[e.BaBoota=132]="BaBoota",e[e.Dorphon=133]="Dorphon",e[e.DorphonEclair=134]="DorphonEclair",e[e.Goran=135]="Goran",e[e.PyroGoran=136]="PyroGoran",e[e.GoranDetonator=137]="GoranDetonator",e[e.SaintMilion=138]="SaintMilion",e[e.Shambertin=139]="Shambertin",e[e.Kondrieu=140]="Kondrieu"}(n=t.NpcType||(t.NpcType={})),t.NPC_TYPES=[],t.ENEMY_NPC_TYPES=[],t.npc_data=function(e){return r[e]},t.name_and_episode_to_npc_type=function(e,t){return o.check_episode(t),s[t].get(e)};const s=[void 0,new Map,new Map,void 0,new Map],r=[];function a(e,i,o,n,a,d,l,_,u,c,p){if(t.NPC_TYPES.push(e),d&&t.ENEMY_NPC_TYPES.push(e),r[e]=Object.freeze({name:i,simple_name:o,ultimate_name:n,episode:a,enemy:d,rare_type:l,area_ids:_,pso_type_id:u,pso_roaming:c,pso_regular:p}),a){const t=s[a];t&&(t.set(o,e),t.set(n,e))}}a(n.Unknown,"Unknown","Unknown","Unknown",void 0,!1,void 0,[],void 0,void 0,void 0),a(n.FemaleFat,"Female Fat","Female Fat","Female Fat",void 0,!1,void 0,[0],4,0,!0),a(n.FemaleMacho,"Female Macho","Female Macho","Female Macho",void 0,!1,void 0,[0],5,0,!0),a(n.FemaleTall,"Female Tall","Female Tall","Female Tall",void 0,!1,void 0,[0],7,0,!0),a(n.MaleDwarf,"Male Dwarf","Male Dwarf","Male Dwarf",void 0,!1,void 0,[0],10,0,!0),a(n.MaleFat,"Male Fat","Male Fat","Male Fat",void 0,!1,void 0,[0],11,0,!0),a(n.MaleMacho,"Male Macho","Male Macho","Male Macho",void 0,!1,void 0,[0],12,0,!0),a(n.MaleOld,"Male Old","Male Old","Male Old",void 0,!1,void 0,[0],13,0,!0),a(n.BlueSoldier,"Blue Soldier","Blue Soldier","Blue Soldier",void 0,!1,void 0,[0],25,0,!0),a(n.RedSoldier,"Red Soldier","Red Soldier","Red Soldier",void 0,!1,void 0,[0],26,0,!0),a(n.Principal,"Principal","Principal","Principal",void 0,!1,void 0,[0],27,0,!0),a(n.Tekker,"Tekker","Tekker","Tekker",void 0,!1,void 0,[0],28,0,!0),a(n.GuildLady,"Guild Lady","Guild Lady","Guild Lady",void 0,!1,void 0,[0],29,0,!0),a(n.Scientist,"Scientist","Scientist","Scientist",void 0,!1,void 0,[0],30,0,!0),a(n.Nurse,"Nurse","Nurse","Nurse",void 0,!1,void 0,[0],31,0,!0),a(n.Irene,"Irene","Irene","Irene",void 0,!1,void 0,[0],32,0,!0),a(n.ItemShop,"Item Shop","Item Shop","Item Shop",void 0,!1,void 0,[0],241,0,!0),a(n.Nurse2,"Nurse (Ep. II)","Nurse","Nurse",2,!1,void 0,[0],254,0,!0),a(n.Hildebear,"Hildebear","Hildebear","Hildelt",1,!0,n.Hildeblue,[1,2],64,0,!0),a(n.Hildeblue,"Hildeblue","Hildeblue","Hildetorr",1,!0,void 0,[1,2],64,1,!0),a(n.RagRappy,"Rag Rappy","Rag Rappy","El Rappy",1,!0,n.AlRappy,[1,2],65,0,!0),a(n.AlRappy,"Al Rappy","Al Rappy","Pal Rappy",1,!0,void 0,[1,2],65,1,!0),a(n.Monest,"Monest","Monest","Mothvist",1,!0,void 0,[1,2],66,0,!0),a(n.Mothmant,"Mothmant","Mothmant","Mothvert",1,!0,void 0,[],void 0,void 0,void 0),a(n.SavageWolf,"Savage Wolf","Savage Wolf","Gulgus",1,!0,void 0,[1,2],67,0,!0),a(n.BarbarousWolf,"Barbarous Wolf","Barbarous Wolf","Gulgus-Gue",1,!0,void 0,[1,2],67,0,!1),a(n.Booma,"Booma","Booma","Bartle",1,!0,void 0,[1,2],68,0,!0),a(n.Gobooma,"Gobooma","Gobooma","Barble",1,!0,void 0,[1,2],68,1,!0),a(n.Gigobooma,"Gigobooma","Gigobooma","Tollaw",1,!0,void 0,[1,2],68,2,!0),a(n.Dragon,"Dragon","Dragon","Sil Dragon",1,!0,void 0,[11],192,0,!0),a(n.GrassAssassin,"Grass Assassin","Grass Assassin","Crimson Assassin",1,!0,void 0,[3,4,5],96,0,!0),a(n.PoisonLily,"Poison Lily","Poison Lily","Ob Lily",1,!0,n.NarLily,[3,4,5],97,0,!0),a(n.NarLily,"Nar Lily","Nar Lily","Mil Lily",1,!0,void 0,[3,4,5],97,1,!0),a(n.NanoDragon,"Nano Dragon","Nano Dragon","Nano Dragon",1,!0,void 0,[3,4,5],98,0,!0),a(n.EvilShark,"Evil Shark","Evil Shark","Vulmer",1,!0,void 0,[3,4,5],99,0,!0),a(n.PalShark,"Pal Shark","Pal Shark","Govulmer",1,!0,void 0,[3,4,5],99,1,!0),a(n.GuilShark,"Guil Shark","Guil Shark","Melqueek",1,!0,void 0,[3,4,5],99,2,!0),a(n.PofuillySlime,"Pofuilly Slime","Pofuilly Slime","Pofuilly Slime",1,!0,n.PouillySlime,[3,4,5],100,0,!0),a(n.PouillySlime,"Pouilly Slime","Pouilly Slime","Pouilly Slime",1,!0,void 0,[3,4,5],100,0,!1),a(n.PanArms,"Pan Arms","Pan Arms","Pan Arms",1,!0,void 0,[3,4,5],101,0,!0),a(n.Migium,"Migium","Migium","Migium",1,!0,void 0,[],void 0,void 0,void 0),a(n.Hidoom,"Hidoom","Hidoom","Hidoom",1,!0,void 0,[],void 0,void 0,void 0),a(n.DeRolLe,"De Rol Le","De Rol Le","Dal Ra Lie",1,!0,void 0,[12],193,0,!0),a(n.Dubchic,"Dubchic","Dubchic","Dubchich",1,!0,void 0,[6,7],128,0,!0),a(n.Gilchic,"Gilchic","Gilchic","Gilchich",1,!0,void 0,[6,7],128,1,!0),a(n.Garanz,"Garanz","Garanz","Baranz",1,!0,void 0,[6,7],129,0,!0),a(n.SinowBeat,"Sinow Beat","Sinow Beat","Sinow Blue",1,!0,void 0,[6,7],130,0,!0),a(n.SinowGold,"Sinow Gold","Sinow Gold","Sinow Red",1,!0,void 0,[6,7],130,0,!1),a(n.Canadine,"Canadine","Canadine","Canabin",1,!0,void 0,[6,7],131,0,!0),a(n.Canane,"Canane","Canane","Canune",1,!0,void 0,[6,7],132,0,!0),a(n.Dubswitch,"Dubswitch","Dubswitch","Dubswitch",1,!0,void 0,[6,7],133,0,!0),a(n.VolOpt,"Vol Opt","Vol Opt","Vol Opt ver.2",1,!0,void 0,[13],197,0,!0),a(n.Delsaber,"Delsaber","Delsaber","Delsaber",1,!0,void 0,[8,9,10],160,0,!0),a(n.ChaosSorcerer,"Chaos Sorcerer","Chaos Sorcerer","Gran Sorcerer",1,!0,void 0,[8,9,10],161,0,!0),a(n.DarkGunner,"Dark Gunner","Dark Gunner","Dark Gunner",1,!0,void 0,[8,9,10],162,0,!0),a(n.DeathGunner,"Death Gunner","Death Gunner","Death Gunner",1,!0,void 0,[],void 0,void 0,void 0),a(n.ChaosBringer,"Chaos Bringer","Chaos Bringer","Dark Bringer",1,!0,void 0,[8,9,10],164,0,!0),a(n.DarkBelra,"Dark Belra","Dark Belra","Indi Belra",1,!0,void 0,[8,9,10],165,0,!0),a(n.Dimenian,"Dimenian","Dimenian","Arlan",1,!0,void 0,[8,9,10],166,0,!0),a(n.LaDimenian,"La Dimenian","La Dimenian","Merlan",1,!0,void 0,[8,9,10],166,1,!0),a(n.SoDimenian,"So Dimenian","So Dimenian","Del-D",1,!0,void 0,[8,9,10],166,2,!0),a(n.Bulclaw,"Bulclaw","Bulclaw","Bulclaw",1,!0,void 0,[8,9,10],167,0,!0),a(n.Bulk,"Bulk","Bulk","Bulk",1,!0,void 0,[],void 0,void 0,void 0),a(n.Claw,"Claw","Claw","Claw",1,!0,void 0,[8,9,10],168,0,!0),a(n.DarkFalz,"Dark Falz","Dark Falz","Dark Falz",1,!0,void 0,[14],200,0,!0),a(n.Hildebear2,"Hildebear (Ep. II)","Hildebear","Hildelt",2,!0,n.Hildeblue2,[1,2],64,0,!0),a(n.Hildeblue2,"Hildeblue (Ep. II)","Hildeblue","Hildetorr",2,!0,void 0,[1,2],64,1,!0),a(n.RagRappy2,"Rag Rappy (Ep. II)","Rag Rappy","El Rappy",2,!0,n.LoveRappy,[1,2],65,0,!0),a(n.LoveRappy,"Love Rappy","Love Rappy","Love Rappy",2,!0,void 0,[1,2],65,1,!0),a(n.StRappy,"St. Rappy","St. Rappy","St. Rappy",2,!0,void 0,[],void 0,void 0,void 0),a(n.HalloRappy,"Hallo Rappy","Hallo Rappy","Hallo Rappy",2,!0,void 0,[],void 0,void 0,void 0),a(n.EggRappy,"Egg Rappy","Egg Rappy","Egg Rappy",2,!0,void 0,[],void 0,void 0,void 0),a(n.Monest2,"Monest (Ep. II)","Monest","Mothvist",2,!0,void 0,[1,2],66,0,!0),a(n.Mothmant2,"Mothmant","Mothmant","Mothvert",2,!0,void 0,[],void 0,void 0,void 0),a(n.PoisonLily2,"Poison Lily (Ep. II)","Poison Lily","Ob Lily",2,!0,n.NarLily2,[1,2],97,0,!0),a(n.NarLily2,"Nar Lily (Ep. II)","Nar Lily","Mil Lily",2,!0,void 0,[1,2],97,1,!0),a(n.GrassAssassin2,"Grass Assassin (Ep. II)","Grass Assassin","Crimson Assassin",2,!0,void 0,[1,2],96,0,!0),a(n.Dimenian2,"Dimenian (Ep. II)","Dimenian","Arlan",2,!0,void 0,[1,2],166,0,!0),a(n.LaDimenian2,"La Dimenian (Ep. II)","La Dimenian","Merlan",2,!0,void 0,[1,2],166,1,!0),a(n.SoDimenian2,"So Dimenian (Ep. II)","So Dimenian","Del-D",2,!0,void 0,[1,2],166,2,!0),a(n.DarkBelra2,"Dark Belra (Ep. II)","Dark Belra","Indi Belra",2,!0,void 0,[1,2],165,0,!0),a(n.BarbaRay,"Barba Ray","Barba Ray","Barba Ray",2,!0,void 0,[14],203,0,!0),a(n.SavageWolf2,"Savage Wolf (Ep. II)","Savage Wolf","Gulgus",2,!0,void 0,[3,4],67,0,!0),a(n.BarbarousWolf2,"Barbarous Wolf (Ep. II)","Barbarous Wolf","Gulgus-Gue",2,!0,void 0,[3,4],67,0,!1),a(n.PanArms2,"Pan Arms (Ep. II)","Pan Arms","Pan Arms",2,!0,void 0,[3,4],101,0,!0),a(n.Migium2,"Migium (Ep. II)","Migium","Migium",2,!0,void 0,[],void 0,void 0,void 0),a(n.Hidoom2,"Hidoom (Ep. II)","Hidoom","Hidoom",2,!0,void 0,[],void 0,void 0,void 0),a(n.Dubchic2,"Dubchic (Ep. II)","Dubchic","Dubchich",2,!0,void 0,[3,4],128,0,!0),a(n.Gilchic2,"Gilchic (Ep. II)","Gilchic","Gilchich",2,!0,void 0,[3,4],128,1,!0),a(n.Garanz2,"Garanz (Ep. II)","Garanz","Baranz",2,!0,void 0,[3,4],129,0,!0),a(n.Dubswitch2,"Dubswitch (Ep. II)","Dubswitch","Dubswitch",2,!0,void 0,[3,4],133,0,!0),a(n.Delsaber2,"Delsaber (Ep. II)","Delsaber","Delsaber",2,!0,void 0,[3,4],160,0,!0),a(n.ChaosSorcerer2,"Chaos Sorcerer (Ep. II)","Chaos Sorcerer","Gran Sorcerer",2,!0,void 0,[3,4],161,0,!0),a(n.GolDragon,"Gol Dragon","Gol Dragon","Gol Dragon",2,!0,void 0,[15],204,0,!0),a(n.SinowBerill,"Sinow Berill","Sinow Berill","Sinow Berill",2,!0,void 0,[5,6,7,8,9,16],212,0,!0),a(n.SinowSpigell,"Sinow Spigell","Sinow Spigell","Sinow Spigell",2,!0,void 0,[5,6,7,8,9,16],212,1,!0),a(n.Merillia,"Merillia","Merillia","Merillia",2,!0,void 0,[5,6,7,8,9,16],213,0,!0),a(n.Meriltas,"Meriltas","Meriltas","Meriltas",2,!0,void 0,[5,6,7,8,9,16],213,1,!0),a(n.Mericarol,"Mericarol","Mericarol","Mericarol",2,!0,void 0,[5,6,7,8,9,16,17],214,0,!0),a(n.Mericus,"Mericus","Mericus","Mericus",2,!0,void 0,[5,6,7,8,9,16,17],214,1,!0),a(n.Merikle,"Merikle","Merikle","Merikle",2,!0,void 0,[5,6,7,8,9,16,17],214,2,!0),a(n.UlGibbon,"Ul Gibbon","Ul Gibbon","Ul Gibbon",2,!0,void 0,[5,6,7,8,9,16],215,0,!0),a(n.ZolGibbon,"Zol Gibbon","Zol Gibbon","Zol Gibbon",2,!0,void 0,[5,6,7,8,9,16],215,1,!0),a(n.Gibbles,"Gibbles","Gibbles","Gibbles",2,!0,void 0,[5,6,7,8,9,16,17],216,0,!0),a(n.Gee,"Gee","Gee","Gee",2,!0,void 0,[5,6,7,8,9,16],217,0,!0),a(n.GiGue,"Gi Gue","Gi Gue","Gi Gue",2,!0,void 0,[5,6,7,8,9,16,17],218,0,!0),a(n.IllGill,"Ill Gill","Ill Gill","Ill Gill",2,!0,void 0,[17],225,0,!0),a(n.DelLily,"Del Lily","Del Lily","Del Lily",2,!0,void 0,[17],97,0,!0),a(n.Epsilon,"Epsilon","Epsilon","Epsilon",2,!0,void 0,[17],224,0,!0),a(n.GalGryphon,"Gal Gryphon","Gal Gryphon","Gal Gryphon",2,!0,void 0,[12],192,0,!0),a(n.Deldepth,"Deldepth","Deldepth","Deldepth",2,!0,void 0,[10,11],219,0,!0),a(n.Delbiter,"Delbiter","Delbiter","Delbiter",2,!0,void 0,[10,11,17],220,0,!0),a(n.Dolmolm,"Dolmolm","Dolmolm","Dolmolm",2,!0,void 0,[10,11],221,0,!0),a(n.Dolmdarl,"Dolmdarl","Dolmdarl","Dolmdarl",2,!0,void 0,[10,11],221,1,!0),a(n.Morfos,"Morfos","Morfos","Morfos",2,!0,void 0,[10,11],222,0,!0),a(n.Recobox,"Recobox","Recobox","Recobox",2,!0,void 0,[10,11,17],223,0,!0),a(n.Recon,"Recon","Recon","Recon",2,!0,void 0,[],void 0,void 0,void 0),a(n.SinowZoa,"Sinow Zoa","Sinow Zoa","Sinow Zoa",2,!0,void 0,[10,11],224,0,!0),a(n.SinowZele,"Sinow Zele","Sinow Zele","Sinow Zele",2,!0,void 0,[10,11],224,1,!0),a(n.OlgaFlow,"Olga Flow","Olga Flow","Olga Flow",2,!0,void 0,[13],202,0,!0),a(n.SandRappy,"Sand Rappy","Sand Rappy","Sand Rappy",4,!0,n.DelRappy,[1,2,3,4,5,6,7,8],65,0,!0),a(n.DelRappy,"Del Rappy","Del Rappy","Del Rappy",4,!0,void 0,[1,2,3,4,5,6,7,8],65,1,!0),a(n.Astark,"Astark","Astark","Astark",4,!0,void 0,[1,2,3,4,5,6,7,8],272,0,!0),a(n.SatelliteLizard,"Satellite Lizard","Satellite Lizard","Satellite Lizard",4,!0,void 0,[1,2,3,4,5,6,7,8],273,0,!0),a(n.Yowie,"Yowie","Yowie","Yowie",4,!0,void 0,[1,2,3,4,5,6,7,8],273,0,!1),a(n.MerissaA,"Merissa A","Merissa A","Merissa A",4,!0,n.MerissaAA,[6,7,8],274,0,!0),a(n.MerissaAA,"Merissa AA","Merissa AA","Merissa AA",4,!0,void 0,[6,7,8],274,1,!0),a(n.Girtablulu,"Girtablulu","Girtablulu","Girtablulu",4,!0,void 0,[6,7,8],275,0,!0),a(n.Zu,"Zu","Zu","Zu",4,!0,n.Pazuzu,[1,2,3,4,5,6,7,8],276,0,!0),a(n.Pazuzu,"Pazuzu","Pazuzu","Pazuzu",4,!0,void 0,[1,2,3,4,5,6,7,8],276,1,!0),a(n.Boota,"Boota","Boota","Boota",4,!0,void 0,[1,2,3,4,5],277,0,!0),a(n.ZeBoota,"Ze Boota","Ze Boota","Ze Boota",4,!0,void 0,[1,2,3,4,5],277,1,!0),a(n.BaBoota,"Ba Boota","Ba Boota","Ba Boota",4,!0,void 0,[1,2,3,4,5],277,2,!0),a(n.Dorphon,"Dorphon","Dorphon","Dorphon",4,!0,n.DorphonEclair,[1,2,3,4,5],278,0,!0),a(n.DorphonEclair,"Dorphon Eclair","Dorphon Eclair","Dorphon Eclair",4,!0,void 0,[1,2,3,4,5],278,1,!0),a(n.Goran,"Goran","Goran","Goran",4,!0,void 0,[6,7,8],279,0,!0),a(n.PyroGoran,"Pyro Goran","Pyro Goran","Pyro Goran",4,!0,void 0,[6,7,8],279,1,!0),a(n.GoranDetonator,"Goran Detonator","Goran Detonator","Goran Detonator",4,!0,void 0,[6,7,8],279,2,!0),a(n.SaintMilion,"Saint-Milion","Saint-Milion","Saint-Milion",4,!0,n.Kondrieu,[9],281,0,!0),a(n.Shambertin,"Shambertin","Shambertin","Shambertin",4,!0,n.Kondrieu,[9],281,1,!0),a(n.Kondrieu,"Kondrieu","Kondrieu","Kondrieu",4,!0,void 0,[9],281,0,!1),Object.freeze(t.NPC_TYPES),Object.freeze(t.ENEMY_NPC_TYPES),Object.freeze(r)},sv1z:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("sDu+"),n=i("FXpb");i("6MRE");const s=i("jJhE"),r=i("KVVN"),a=i("4VsB"),d=i("LSoc");class l extends o.LabelledControl{constructor(e,t,i){super(i),this.element=n.el.div({class:"core_Select"}),this.preferred_label_position="left",this.to_label=t,this.button=this.disposable(new r.Button(" ",{icon_right:n.Icon.TriangleDown})),this.menu=this.disposable(new d.Menu(e,t,this.element)),this.element.append(this.button.element,this.menu.element),this._selected=new a.WidgetProperty(this,void 0,this.set_selected),this.selected=this._selected,this.just_opened=!1,this.disposables(n.disposable_listener(this.button.element,"mousedown",e=>this.button_mousedown(e)),this.button.mouseup.observe(()=>this.button_mouseup()),this.menu.selected.observe(({value:e})=>this._selected.set_val(e,{silent:!1}))),i&&(s.is_any_property(i.selected)?this.selected.bind_to(i.selected):i.selected&&(this.selected.val=i.selected)),this.finalize_construction(l.prototype)}set_enabled(e){super.set_enabled(e),this.button.enabled.val=e}set_selected(e){this.button.text.val=e?this.to_label(e):" ",this.menu.selected.val=e}button_mousedown(e){e.stopPropagation(),this.just_opened=!this.menu.visible.val,this.menu.visible.val=!0}button_mouseup(){this.just_opened?this.menu.focus():this.menu.visible.val=!1,this.just_opened=!1}}t.Select=l},t2oB:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.CharacterClassAnimationModel=class{constructor(e,t){this.id=e,this.name=t}}},tRdk:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("Womt");t.vec3_to_threejs=function(e){return new o.Vector3(e.x,e.y,e.z)}},tjEv:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.ResizableBuffer=class{constructor(e=8192){this._size=0,this._buffer=new ArrayBuffer(e),this._data_view=new DataView(this._buffer)}get size(){return this._size}set size(e){if(e<0)throw new Error("Size should be non-negative.");this.ensure_capacity(e),this._size=e}get capacity(){return this._buffer.byteLength}get backing_buffer(){return this._buffer}get view(){return this._data_view}sub_view(e,t){return new DataView(this._buffer,e,t)}ensure_capacity(e){if(e>this.capacity){let t=this.capacity||e;do{t*=2}while(tnew l.CharacterClassAnimationModel(t,`Animation ${t+1}`)),this.current_model=u.property(void 0),this._current_nj_data=u.property(void 0),this.current_nj_data=this._current_nj_data,this._current_xvm=u.property(void 0),this.current_xvm=this._current_xvm,this.show_skeleton=u.property(!1),this.current_animation=u.property(void 0),this._current_nj_motion=u.property(void 0),this.current_nj_motion=this._current_nj_motion,this.animation_playing=u.property(!0),this.animation_frame_rate=u.property(c.PSO_FRAME_RATE),this.animation_frame=u.property(0),this.animation_frame_count=this.current_nj_motion.map(e=>e?e.frame_count:0),this.disposables=[],this.load_file=e=>o(this,void 0,void 0,(function*(){try{const t=yield _.read_file(e),i=new n.ArrayBufferCursor(t,s.Endianness.Little);if(e.name.endsWith(".nj")){this.current_model.val=void 0;const e=a.parse_nj(i)[0];this.set_current_nj_data({nj_object:e,bone_count:e.bone_count(),has_skeleton:!0})}else if(e.name.endsWith(".xj")){this.current_model.val=void 0;const e=a.parse_xj(i)[0];this.set_current_nj_data({nj_object:e,bone_count:0,has_skeleton:!1})}else if(e.name.endsWith(".njm")){this.current_animation.val=void 0,this._current_nj_motion.val=void 0;const e=this.current_nj_data.val;e&&(this.animation_playing.val=!0,this._current_nj_motion.val=r.parse_njm(i,e.bone_count))}else e.name.endsWith(".xvm")?this.current_model&&(this._current_xvm.val=p.parse_xvm(i)):h.error(`Unknown file extension in filename "${e.name}".`)}catch(e){h.error("Couldn't read file.",e)}})),this.load_model=e=>o(this,void 0,void 0,(function*(){if(this.current_animation.val=void 0,e){const t=yield this.get_nj_object(e);this.set_current_nj_data({nj_object:t,bone_count:e?64:t.bone_count(),has_skeleton:!0})}else this._current_nj_data.val=void 0})),this.load_animation=e=>o(this,void 0,void 0,(function*(){const t=this.current_nj_data.val;t&&e?(this._current_nj_motion.val=yield this.get_nj_motion(e,t.bone_count),this.animation_playing.val=!0):this._current_nj_motion.val=void 0})),this.disposables.push(this.current_model.observe(({value:e})=>this.load_model(e)),this.current_animation.observe(({value:e})=>this.load_animation(e)))}dispose(){this.disposables.forEach(e=>e.dispose())}set_current_nj_data(e){this._current_xvm.val=void 0,this._current_nj_data.val=e}get_nj_object(e){return o(this,void 0,void 0,(function*(){let t=w.get(e.name);return t||(t=this.get_all_nj_objects(e),w.set(e.name,t),t)}))}get_all_nj_objects(e){return o(this,void 0,void 0,(function*(){const t=yield v.get_character_class_data(e.name,"Body"),i=a.parse_nj(new n.ArrayBufferCursor(t,s.Endianness.Little))[0];if(!i)throw new Error(`Couldn't parse body for player class ${e.name}.`);const o=yield v.get_character_class_data(e.name,"Head",0),r=a.parse_nj(new n.ArrayBufferCursor(o,s.Endianness.Little))[0];if(r&&this.add_to_bone(i,r,59),e.hair_styles_count>0){const t=yield v.get_character_class_data(e.name,"Hair",0),o=a.parse_nj(new n.ArrayBufferCursor(t,s.Endianness.Little))[0];if(o&&this.add_to_bone(i,o,59),e.hair_styles_with_accessory.has(0)){const t=yield v.get_character_class_data(e.name,"Accessory",0),o=a.parse_nj(new n.ArrayBufferCursor(t,s.Endianness.Little))[0];o&&this.add_to_bone(i,o,59)}}return i}))}add_to_bone(e,t,i){const o=e.get_bone(i);o&&(o.evaluation_flags.hidden=!1,o.evaluation_flags.break_child_trace=!1,o.children.push(t))}get_nj_motion(e,t){return o(this,void 0,void 0,(function*(){let i=f.get(e.id);return i||(i=v.get_character_class_animation_data(e.id).then(e=>r.parse_njm(new n.ArrayBufferCursor(e,s.Endianness.Little),t)),f.set(e.id,i),i)}))}}t.Model3DStore=E,t.model_store=new E},uaZj:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("kiqn");t.QuestObjectModel=class extends o.QuestEntityModel{constructor(e,t,i,o,n,s,r,a,d){super(e,o,n,s,r),this.id=t,this.group_id=i,this.properties=a,this.unknown=d}}},uiJh:function(e,t,i){"use strict";function o(e){const t=Object.values(e),i=t.filter(e=>"number"==typeof e);return i.length?i:t}Object.defineProperty(t,"__esModule",{value:!0}),t.enum_values=o;t.EnumMap=class{constructor(e,t){this.values=new Map,this.keys=o(e);for(const e of this.keys)this.values.set(e,t(e))}get(e){return this.values.get(e)}}},upFJ:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.SimpleQuestModel=class{constructor(e,t,i,o){if(this.id=e,this.name=t,this.episode=i,this.enemy_counts=o,!e)throw new Error("id is required.");if(!t)throw new Error("name is required.");if(!o)throw new Error("enemyCounts is required.")}}},v2aa:function(e,t,i){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=i("ouMO"),s=i("xs7i"),r=i("uaZj"),a=i("IjTL"),d=o(i("GGSb")),l=i("4Mnx"),_=i("yQqj"),u=d.default.get("quest_editor/model/QuestModel");t.QuestModel=class{constructor(e,t,i,o,r,a,d,_,c,p,v,h){if(this._id=n.property(0),this._language=n.property(0),this._name=n.property(""),this._short_description=n.property(""),this._long_description=n.property(""),this._area_variants=n.list_property(),this.update_area_variants=()=>{const e=new Map;for(const t of this.entities_per_area.val.keys())try{e.set(t,l.area_store.get_variant(this.episode,t,0))}catch(e){u.warn(e)}for(const[t,i]of this.map_designations.val)try{e.set(t,l.area_store.get_variant(this.episode,t,i))}catch(e){u.warn(e)}this._area_variants.val=[...e.values()]},s.check_episode(a),!d)throw new Error("map_designations is required.");if(!Array.isArray(_))throw new Error("objs is required.");if(!Array.isArray(c))throw new Error("npcs is required.");if(!Array.isArray(p))throw new Error("dat_unknowns is required.");if(!Array.isArray(v))throw new Error("object_code is required.");if(!Array.isArray(h))throw new Error("shop_items is required.");this.id=this._id,this.language=this._language,this.name=this._name,this.short_description=this._short_description,this.long_description=this._long_description,this.area_variants=this._area_variants,this.set_id(e),this.set_language(t),this.set_name(i),this.set_short_description(o),this.set_long_description(r),this.episode=a,this._map_designations=n.property(d),this.map_designations=this._map_designations,this._objects=n.list_property(void 0,..._),this.objects=this._objects,this._npcs=n.list_property(void 0,...c),this.npcs=this._npcs,this.dat_unknowns=p,this.object_code=v,this.shop_items=h,this.entities_per_area=n.map((e,t)=>{const i=new Map;for(const t of e)i.set(t.area_id,(i.get(t.area_id)||0)+1);for(const e of t)i.set(e.area_id,(i.get(e.area_id)||0)+1);return i},this.npcs,this.objects),this.entities_per_area.observe(this.update_area_variants),this.map_designations.observe(this.update_area_variants)}set_id(e){if(e<0)throw new Error(`id should be greater than or equal to 0, was ${e}.`);return this._id.val=e,this}set_language(e){if(e<0)throw new Error(`language should be greater than or equal to 0, was ${e}.`);return this._language.val=e,this}set_name(e){if(e.length>32)throw new Error(`name can't be longer than 32 characters, got "${e}".`);return this._name.val=e,this}set_short_description(e){if(e.length>128)throw new Error(`short_description can't be longer than 128 characters, got "${e}".`);return this._short_description.val=e,this}set_long_description(e){if(e.length>288)throw new Error(`long_description can't be longer than 288 characters, got "${e}".`);return this._long_description.val=e,this}set_map_designations(e){return this._map_designations.val=e,this}add_entity(e){if(e instanceof r.QuestObjectModel)this.add_object(e);else{if(!(e instanceof a.QuestNpcModel))throw new Error(`${_.entity_type_to_string(e.type)} not supported.`);this.add_npc(e)}}add_object(e){this._objects.push(e)}add_npc(e){this._npcs.push(e)}remove_entity(e){if(e instanceof r.QuestObjectModel)this._objects.remove(e);else{if(!(e instanceof a.QuestNpcModel))throw new Error(`${_.entity_type_to_string(e.type)} not supported.`);this._npcs.remove(e)}}}},vM2b:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("Womt");t.GeometryBuilder=class{constructor(){this.positions=[],this.normals=[],this.uvs=[],this.indices=[],this.bones=[],this.bone_indices=[],this.bone_weights=[],this.groups=[],this.material_indices=new Set([-1])}get vertex_count(){return this.positions.length/3}get index_count(){return this.indices.length}get_position(e){return new o.Vector3(this.positions[3*e],this.positions[3*e+1],this.positions[3*e+2])}get_normal(e){return new o.Vector3(this.normals[3*e],this.normals[3*e+1],this.normals[3*e+2])}add_vertex(e,t,i){this.positions.push(e.x,e.y,e.z),this.normals.push(t.x,t.y,t.z),this.uvs.push(i.x,i.y)}add_index(e){this.indices.push(e)}add_bone(e){this.bones.push(e)}add_bone_weight(e,t){this.bone_indices.push(e),this.bone_weights.push(t)}add_group(e,t,i){const o=this.groups[this.groups.length-1],n=null==i?-1:i;o&&o.material_index===n?o.size+=t:(this.groups.push({offset:e,size:t,material_index:n}),this.material_indices.add(n))}build(){const e=new o.BufferGeometry,t=e.userData;t.created_by_geometry_builder=!0,e.addAttribute("position",new o.Float32BufferAttribute(this.positions,3)),e.addAttribute("normal",new o.Float32BufferAttribute(this.normals,3)),e.addAttribute("uv",new o.Float32BufferAttribute(this.uvs,2)),e.setIndex(new o.Uint16BufferAttribute(this.indices,1)),this.bone_indices.length&&this.bones.length?(e.addAttribute("skinIndex",new o.Uint16BufferAttribute(this.bone_indices,4)),e.addAttribute("skinWeight",new o.Float32BufferAttribute(this.bone_weights,4)),t.bones=this.bones):t.bones=[];const i=new Map;let n=0;for(const e of[...this.material_indices].sort((e,t)=>e-t))i.set(e,n++);for(const t of this.groups)e.addGroup(t.offset,t.size,i.get(t.material_index));return t.normalized_material_indices=i,e.computeBoundingSphere(),e.computeBoundingBox(),e}}},vsj6:function(e,t,i){"use strict";var o=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))((function(n,s){function r(e){try{d(o.next(e))}catch(e){s(e)}}function a(e){try{d(o.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}d((o=o.apply(e,t||[])).next())}))},n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const s=i("HjM1");class r extends s.TabContainer{constructor(){super({class:"viewer_ViewerView",tabs:[{title:"Models",key:"model",create_view:function(){return o(this,void 0,void 0,(function*(){return new((yield Promise.resolve().then(()=>n(i("Hdaq")))).Model3DView)}))}},{title:"Textures",key:"texture",create_view:function(){return o(this,void 0,void 0,(function*(){return new((yield Promise.resolve().then(()=>n(i("Za3H")))).TextureView)}))}}]}),this.finalize_construction(r.prototype)}}t.ViewerView=r},"w+Lt":function(e,t,i){"use strict";var o=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))((function(n,s){function r(e){try{d(o.next(e))}catch(e){s(e)}}function a(e){try{d(o.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}d((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const n=i("G+UN"),s=i("yfUv"),r=i("nowp"),a="HuntOptimizerStore.wantedItems";t.hunt_optimizer_persister=new class extends s.Persister{persist_wanted_items(e,t){this.persist_for_server(e,a,t.map(({item_type:e,amount:t})=>({itemTypeId:e.id,amount:t.val})))}load_wanted_items(e){return o(this,void 0,void 0,(function*(){const t=yield n.item_type_stores.get(e),i=yield this.load_for_server(e,a),o=[];if(i)for(const{itemTypeId:e,itemKindId:n,amount:s}of i){const i=null!=e?t.get_by_id(e):t.get_by_id(n);i&&o.push(new r.WantedItemModel(i,s))}return o}))}}},w6HN:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("TRid"),n=i("FXpb");i("IQIM");const s=i("sDu+");class r extends o.Widget{constructor(e){if(super(e),this.element=n.create_element("div",{class:"core_ToolBar"}),this.height=33,this.element.style.height=`${this.height}px`,e&&e.children)for(const t of e.children)if(t instanceof s.LabelledControl&&t.label){const e=n.create_element("div",{class:"core_ToolBar_group"});"left"===t.preferred_label_position||"top"===t.preferred_label_position?e.append(t.label.element,t.element):e.append(t.element,t.label.element),this.element.append(e)}else this.element.append(t.element),this.disposable(t);this.finalize_construction(r.prototype)}}t.ToolBar=r},weRg:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("nN8q"),n=i("FXpb");i("ZZ0G");const s=i("yQqj"),r=i("3ONQ"),a=i("xcxG"),d=i("ouMO");t.EntityListView=class extends o.ResizableWidget{constructor(e){super(),this.entities=d.list_property(),this.create_entity_element=(e,t)=>{const i=n.el.div({class:"quest_editor_EntityListView_entity",data:{index:t.toString()}});i.draggable=!0;const o=n.el.img({width:100,height:100});o.style.visibility="hidden",o.style.pointerEvents="none",i.append(o),a.render_entity_to_image(e).then(e=>{o.src=e,o.style.visibility="visible"});const r=n.el.span({text:s.entity_data(e).name});return i.append(r),i};const t=n.el.div({class:"quest_editor_EntityListView_entity_list"});this.element=n.el.div({class:`${e} quest_editor_EntityListView`},t),this.disposables(n.bind_children_to(t,this.entities,this.create_entity_element),r.entity_dnd_source(t,e=>{let i=e;do{const t=e.dataset.index;if(null!=t)return[i.querySelector("img").cloneNode(!0),this.entities.get(parseInt(t,10))];i=i.parentElement}while(i&&i!==t)}))}}},x4IQ:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.QuestEditAction=class{constructor(e,t){this.quest=e,this.new=t.value,this.old=t.old_value}}},x4QM:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("ouMO");t.WeaponItemType=class{constructor(e,t,i,o,n,s,r){this.id=e,this.name=t,this.min_atp=i,this.max_atp=o,this.ata=n,this.max_grind=s,this.required_atp=r}};t.ArmorItemType=class{constructor(e,t,i,o,n,s,r,a,d,l,_){this.id=e,this.name=t,this.atp=i,this.ata=o,this.min_evp=n,this.max_evp=s,this.min_dfp=r,this.max_dfp=a,this.mst=d,this.hp=l,this.lck=_}};t.ShieldItemType=class{constructor(e,t,i,o,n,s,r,a,d,l,_){this.id=e,this.name=t,this.atp=i,this.ata=o,this.min_evp=n,this.max_evp=s,this.min_dfp=r,this.max_dfp=a,this.mst=d,this.hp=l,this.lck=_}};t.UnitItemType=class{constructor(e,t){this.id=e,this.name=t}};t.ToolItemType=class{constructor(e,t){this.id=e,this.name=t}};t.WeaponItem=class{constructor(e){this.type=e,this._attribute=o.property(0),this.attribute=this._attribute,this._hit=o.property(0),this.hit=this._hit,this._grind=o.property(0),this.grind=this._grind,this.grind_atp=this.grind.map(e=>2*e)}};t.ArmorItem=class{constructor(e){this.type=e}};t.ShieldItem=class{constructor(e){this.type=e}};t.UnitItem=class{constructor(e){this.type=e}};t.ToolItem=class{constructor(e){this.type=e}}},xcxG:function(e,t,i){"use strict";var o=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))((function(n,s){function r(e){try{d(o.next(e))}catch(e){s(e)}}function a(e){try{d(o.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}d((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const n=i("Womt"),s=i("4vnR"),r=i("xpi7"),a=i("M/y3"),d=new n.WebGLRenderer({alpha:!0,antialias:!0});d.setSize(100,100);const l=new n.HemisphereLight(16777215,5263440,1.2),_=new n.Scene,u=new n.PerspectiveCamera(30,1,10,1e3),c=new n.Vector3(1,1,2).normalize(),p=1.3/Math.tan(u.fov/180*Math.PI/2),v=new Map;t.render_entity_to_image=function(e){return o(this,void 0,void 0,(function*(){let t=v.get(e);return t||(t=h(e),v.set(e,t)),t}))};const h=a.sequential(e=>o(void 0,void 0,void 0,(function*(){const t=yield s.load_entity_geometry(e),i=yield s.load_entity_textures(e);_.remove(..._.children),_.add(l);const o=r.create_entity_type_mesh(e,t,i);_.add(o);const n=o.geometry.boundingSphere;return u.position.copy(c),u.position.multiplyScalar(n.radius*p),u.lookAt(n.center),d.render(_,u),d.domElement.toDataURL()})))},xpi7:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("Womt"),n=i("Eqai"),s=i("yQqj");var r;function a(e,i,a){const d=new o.MeshLambertMaterial({color:s.is_npc_type(e)?t.NPC_COLORS[r.Normal]:t.OBJECT_COLORS[r.Normal],side:o.DoubleSide}),l=n.create_mesh(i,a.length?a.map(e=>new o.MeshLambertMaterial({map:e,side:o.DoubleSide,alphaTest:.5})):d,d);return l.name=s.entity_type_to_string(e),l}!function(e){e[e.Normal=0]="Normal",e[e.Hovered=1]="Hovered",e[e.Selected=2]="Selected"}(r=t.ColorType||(t.ColorType={})),t.OBJECT_COLORS=[],t.OBJECT_COLORS[r.Normal]=16776960,t.OBJECT_COLORS[r.Hovered]=16768831,t.OBJECT_COLORS[r.Selected]=16755200,t.NPC_COLORS=[],t.NPC_COLORS[r.Normal]=16711680,t.NPC_COLORS[r.Hovered]=16727903,t.NPC_COLORS[r.Selected]=16711764,t.create_entity_type_mesh=a,t.create_entity_mesh=function(e,t,i){const o=a(e.type,t,i);return o.userData.entity=e,o.position.copy(e.world_position.val),o.rotation.copy(e.world_rotation.val),o}},xs7i:function(e,t,i){"use strict";var o;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.I=1]="I",e[e.II=2]="II",e[e.IV=4]="IV"}(o=t.Episode||(t.Episode={})),t.EPISODES=[o.I,o.II,o.IV],t.check_episode=function(e){if(null==o[e])throw new Error(`Invalid episode ${e}.`)}},xyE7:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("nN8q"),n=i("FXpb"),s=i("c5EP"),r=i("sZ1+");i("5sDa");const a=i("5aKR"),d=i("ouMO");class l extends o.ResizableWidget{constructor(){super(),this.element=n.el.div({class:"quest_editor_NpcCountsView"}),this.table_element=n.el.table(),this.no_quest_view=new a.DisabledView("No quest loaded."),this.element.append(this.table_element,this.no_quest_view.element);const e=s.quest_editor_store.current_quest,t=e.map(e=>null==e);this.bind_hidden(this.table_element,t),this.disposables(this.no_quest_view.visible.bind_to(t),e.flat_map(e=>e?e.npcs:d.property([])).observe(({value:e})=>this.update_view(e),{call_now:!0})),this.finalize_construction(l.prototype)}update_view(e){const t=document.createDocumentFragment(),i=new Map;for(const t of e){const e=i.get(t.type)||0;i.set(t.type,e+1)}const o=8*(i.get(r.NpcType.Canane)||0),s=[...i].sort((e,t)=>e[0]-t[0]);for(const[e,i]of s){const s=e===r.NpcType.Canadine?o:0;t.append(n.el.tr({},n.el.th({text:r.npc_data(e).name+":"}),n.el.td({text:String(i+s)})))}this.table_element.innerHTML="",this.table_element.append(t)}}t.NpcCountsView=l},y42t:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("kwt4"),n=i("4mUz");function s(e,t,i){const n=[];for(let s=0;s{const i=new s.Disposer;let o=0;return[n.el.tr({},...this.columns.map((s,a)=>{const d=s.fixed?n.el.th():n.el.td();try{const t=s.render_cell(e,i);d.append(t),s.input&&d.classList.add("input"),s.fixed&&(d.classList.add("fixed"),d.style.left=`${o}px`,o+=s.width||0),d.style.width=`${s.width}px`,s.text_align&&(d.style.textAlign=s.text_align),s.tooltip&&(d.title=s.tooltip(e))}catch(e){r.warn(`Error while rendering cell for index ${t}, column ${a}.`,e)}return d})),i]},this.update_footer=()=>{if(!this.footer_row_element)return;const e=this.columns.length;for(let t=0;t{const i=n.el.th({data:{index:t.toString()}},n.el.span({text:e.title}));return e.fixed&&(i.style.position="sticky",i.style.left=`${l}px`,l+=e.width),i.style.width=`${e.width}px`,e.footer&&(_=!0),i}));const u=e.sort;u&&(o.onmousedown=e=>{if(e.target instanceof HTMLElement){let i=e.target;for(let e=0;e<5&&!i.dataset.index;e++){if(!i.parentElement)return;i=i.parentElement}if(!i.dataset.index)return;const o=parseInt(i.dataset.index,10),n=this.columns[o];if(!n.sortable)return;const s=t.findIndex(e=>e.column===n);if(0===s){const e=t[0];e.direction=e.direction===a.Asc?a.Desc:a.Asc}else-1!==s&&t.splice(s,1),t.unshift({column:n,direction:a.Asc});u(t)}}),i.append(o),this.tbody_element=n.el.tbody(),this.element.append(i,this.tbody_element),_&&(this.footer_row_element=n.el.tr(),this.element.append(n.el.tfoot({},this.footer_row_element)),this.create_footer()),this.disposables(n.bind_children_to(this.tbody_element,this.values,this.create_row),this.values.observe(this.update_footer)),this.finalize_construction(d.prototype)}create_footer(){const e=[];let t=0;for(let i=0;ie.type===a),o=i&&function(e){return{texture_count:e.u16()}}(i.data),n=t.filter(e=>e.type===d).map(e=>(function(e){const t=e.u32(),i=e.u32(),o=e.u32(),n=e.u16(),s=e.u16(),r=e.u32();e.seek(36);const a=e.array_buffer(r);return{id:o,format:[t,i],width:n,height:s,size:r,data:a}})(e.data));return o?o.texture_count!==n.length&&r.warn(`Found ${n.length} textures instead of ${o.texture_count} as defined in the header.`):r.warn("No header found."),{textures:n}}},yxQK:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("FXpb");i("pNch");const n=i("4SjJ"),s=i("TRid"),r=i("1z6m"),a=i("sv1z"),d=i("ouMO"),l=[[n.GuiTool.Viewer,"Viewer"],[n.GuiTool.QuestEditor,"Quest Editor"],[n.GuiTool.HuntOptimizer,"Hunt Optimizer"]];class _ extends s.Widget{constructor(){super(),this.buttons=new Map(l.map(([e,t])=>[e,this.disposable(new r.NavigationButton(e,t))])),this.server_select=this.disposable(new a.Select(d.property(["Ephinea"]),e=>e,{label:"Server:",enabled:!1,selected:"Ephinea",tooltip:"Only Ephinea is supported at the moment"})),this.element=o.el.div({class:"application_NavigationView"},...[...this.buttons.values()].map(e=>e.element),o.el.div({class:"application_NavigationView_spacer"}),o.el.span({class:"application_NavigationView_server"},this.server_select.label.element,this.server_select.element),o.el.a({class:"application_NavigationView_github",href:"https://github.com/DaanVandenBosch/phantasmal-world",title:"GitHub"},o.icon(o.Icon.GitHub))),this.height=30,this.mark_tool_button=e=>{const t=this.buttons.get(e);t&&(t.checked=!0)},this.element.style.height=`${this.height}px`,this.element.onmousedown=this.mousedown,this.mark_tool_button(n.gui_store.tool.val),this.disposable(n.gui_store.tool.observe(({value:e})=>this.mark_tool_button(e))),this.finalize_construction(_.prototype)}mousedown(e){e.target instanceof HTMLLabelElement&&e.target.control instanceof HTMLInputElement&&(n.gui_store.tool.val=n.GuiTool[e.target.control.value])}}t.NavigationView=_},zBQr:function(e,t,i){"use strict";var o=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))((function(n,s){function r(e){try{d(o.next(e))}catch(e){s(e)}}function a(e){try{d(o.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}d((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const n=i("yfUv"),s=i("LvDl"),r="QuestEditorUiPersister.layout_config";class a extends n.Persister{constructor(){super(...arguments),this.persist_layout_config=s.throttle(e=>{this.persist(r,e)},500,{leading:!1,trailing:!0})}load_layout_config(e,t){return o(this,void 0,void 0,(function*(){const i=yield this.load(r);return i&&this.verify_layout_config(i,e)?i:t}))}verify_layout_config(e,t){const i=new Set(t);for(const t of e)if(!this.verify_layout_child(t,i,new Set,!0))return!1;return!0}verify_layout_child(e,t,i,o){if(!e)return!1;if("componentName"in e){if(!t.has(e.componentName))return!1;i.add(e.componentName)}if(e.content)for(const o of e.content)if(!this.verify_layout_child(o,t,i,!1))return!1;return!o||t.size===i.size}}t.QuestEditorUiPersister=a,t.quest_editor_ui_persister=new a}},[["/7QA",2,0,3]]]); \ No newline at end of file diff --git a/main.45d9011d379a98ead017.js b/main.45d9011d379a98ead017.js new file mode 100644 index 00000000..cfb87e5c --- /dev/null +++ b/main.45d9011d379a98ead017.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{"+LO4":function(e,t,i){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=o(i("GGSb")).default.get("core/observable/property/AbstractMinimalProperty");t.AbstractMinimalProperty=class{constructor(){this.is_property=!0,this.observers=[]}observe(e,t){return this.observers.includes(e)||this.observers.push(e),t&&t.call_now&&this.call_observer(e,this.val),{dispose:()=>{const t=this.observers.indexOf(e);-1!==t&&this.observers.splice(t,1)}}}emit(e){for(const t of this.observers)this.call_observer(t,e)}call_observer(e,t){try{e({value:this.val,old_value:t})}catch(e){n.error("Observer threw error.",e)}}}},"+oIp":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("xs7i");var n;!function(e){e[e.Unknown=1e3]="Unknown",e[e.PlayerSet=1001]="PlayerSet",e[e.Particle=1002]="Particle",e[e.Teleporter=1003]="Teleporter",e[e.Warp=1004]="Warp",e[e.LightCollision=1005]="LightCollision",e[e.Item=1006]="Item",e[e.EnvSound=1007]="EnvSound",e[e.FogCollision=1008]="FogCollision",e[e.EventCollision=1009]="EventCollision",e[e.CharaCollision=1010]="CharaCollision",e[e.ElementalTrap=1011]="ElementalTrap",e[e.StatusTrap=1012]="StatusTrap",e[e.HealTrap=1013]="HealTrap",e[e.LargeElementalTrap=1014]="LargeElementalTrap",e[e.ObjRoomID=1015]="ObjRoomID",e[e.Sensor=1016]="Sensor",e[e.UnknownItem16=1017]="UnknownItem16",e[e.LensFlare=1018]="LensFlare",e[e.ScriptCollision=1019]="ScriptCollision",e[e.HealRing=1020]="HealRing",e[e.MapCollision=1021]="MapCollision",e[e.ScriptCollisionA=1022]="ScriptCollisionA",e[e.ItemLight=1023]="ItemLight",e[e.RadarCollision=1024]="RadarCollision",e[e.FogCollisionSW=1025]="FogCollisionSW",e[e.BossTeleporter=1026]="BossTeleporter",e[e.ImageBoard=1027]="ImageBoard",e[e.QuestWarp=1028]="QuestWarp",e[e.Epilogue=1029]="Epilogue",e[e.UnknownItem29=1030]="UnknownItem29",e[e.UnknownItem30=1031]="UnknownItem30",e[e.UnknownItem31=1032]="UnknownItem31",e[e.BoxDetectObject=1033]="BoxDetectObject",e[e.SymbolChatObject=1034]="SymbolChatObject",e[e.TouchPlateObject=1035]="TouchPlateObject",e[e.TargetableObject=1036]="TargetableObject",e[e.EffectObject=1037]="EffectObject",e[e.CountDownObject=1038]="CountDownObject",e[e.UnknownItem38=1039]="UnknownItem38",e[e.UnknownItem39=1040]="UnknownItem39",e[e.UnknownItem40=1041]="UnknownItem40",e[e.UnknownItem41=1042]="UnknownItem41",e[e.MenuActivation=1043]="MenuActivation",e[e.TelepipeLocation=1044]="TelepipeLocation",e[e.BGMCollision=1045]="BGMCollision",e[e.MainRagolTeleporter=1046]="MainRagolTeleporter",e[e.LobbyTeleporter=1047]="LobbyTeleporter",e[e.PrincipalWarp=1048]="PrincipalWarp",e[e.ShopDoor=1049]="ShopDoor",e[e.HuntersGuildDoor=1050]="HuntersGuildDoor",e[e.TeleporterDoor=1051]="TeleporterDoor",e[e.MedicalCenterDoor=1052]="MedicalCenterDoor",e[e.Elevator=1053]="Elevator",e[e.EasterEgg=1054]="EasterEgg",e[e.ValentinesHeart=1055]="ValentinesHeart",e[e.ChristmasTree=1056]="ChristmasTree",e[e.ChristmasWreath=1057]="ChristmasWreath",e[e.HalloweenPumpkin=1058]="HalloweenPumpkin",e[e.TwentyFirstCentury=1059]="TwentyFirstCentury",e[e.Sonic=1060]="Sonic",e[e.WelcomeBoard=1061]="WelcomeBoard",e[e.Firework=1062]="Firework",e[e.LobbyScreenDoor=1063]="LobbyScreenDoor",e[e.MainRagolTeleporterBattleInNextArea=1064]="MainRagolTeleporterBattleInNextArea",e[e.LabTeleporterDoor=1065]="LabTeleporterDoor",e[e.Pioneer2InvisibleTouchplate=1066]="Pioneer2InvisibleTouchplate",e[e.ForestDoor=1067]="ForestDoor",e[e.ForestSwitch=1068]="ForestSwitch",e[e.LaserFence=1069]="LaserFence",e[e.LaserSquareFence=1070]="LaserSquareFence",e[e.ForestLaserFenceSwitch=1071]="ForestLaserFenceSwitch",e[e.LightRays=1072]="LightRays",e[e.BlueButterfly=1073]="BlueButterfly",e[e.Probe=1074]="Probe",e[e.RandomTypeBox1=1075]="RandomTypeBox1",e[e.ForestWeatherStation=1076]="ForestWeatherStation",e[e.Battery=1077]="Battery",e[e.ForestConsole=1078]="ForestConsole",e[e.BlackSlidingDoor=1079]="BlackSlidingDoor",e[e.RicoMessagePod=1080]="RicoMessagePod",e[e.EnergyBarrier=1081]="EnergyBarrier",e[e.ForestRisingBridge=1082]="ForestRisingBridge",e[e.SwitchNoneDoor=1083]="SwitchNoneDoor",e[e.EnemyBoxGrey=1084]="EnemyBoxGrey",e[e.FixedTypeBox=1085]="FixedTypeBox",e[e.EnemyBoxBrown=1086]="EnemyBoxBrown",e[e.EmptyTypeBox=1087]="EmptyTypeBox",e[e.LaserFenceEx=1088]="LaserFenceEx",e[e.LaserSquareFenceEx=1089]="LaserSquareFenceEx",e[e.FloorPanel1=1090]="FloorPanel1",e[e.Caves4ButtonDoor=1091]="Caves4ButtonDoor",e[e.CavesNormalDoor=1092]="CavesNormalDoor",e[e.CavesSmashingPillar=1093]="CavesSmashingPillar",e[e.CavesSign1=1094]="CavesSign1",e[e.CavesSign2=1095]="CavesSign2",e[e.CavesSign3=1096]="CavesSign3",e[e.HexagonalTank=1097]="HexagonalTank",e[e.BrownPlatform=1098]="BrownPlatform",e[e.WarningLightObject=1099]="WarningLightObject",e[e.Rainbow=1100]="Rainbow",e[e.FloatingJellyfish=1101]="FloatingJellyfish",e[e.FloatingDragonfly=1102]="FloatingDragonfly",e[e.CavesSwitchDoor=1103]="CavesSwitchDoor",e[e.RobotRechargeStation=1104]="RobotRechargeStation",e[e.CavesCakeShop=1105]="CavesCakeShop",e[e.Caves1SmallRedRock=1106]="Caves1SmallRedRock",e[e.Caves1MediumRedRock=1107]="Caves1MediumRedRock",e[e.Caves1LargeRedRock=1108]="Caves1LargeRedRock",e[e.Caves2SmallRock1=1109]="Caves2SmallRock1",e[e.Caves2MediumRock1=1110]="Caves2MediumRock1",e[e.Caves2LargeRock1=1111]="Caves2LargeRock1",e[e.Caves2SmallRock2=1112]="Caves2SmallRock2",e[e.Caves2MediumRock2=1113]="Caves2MediumRock2",e[e.Caves2LargeRock2=1114]="Caves2LargeRock2",e[e.Caves3SmallRock=1115]="Caves3SmallRock",e[e.Caves3MediumRock=1116]="Caves3MediumRock",e[e.Caves3LargeRock=1117]="Caves3LargeRock",e[e.FloorPanel2=1118]="FloorPanel2",e[e.DestructableRockCaves1=1119]="DestructableRockCaves1",e[e.DestructableRockCaves2=1120]="DestructableRockCaves2",e[e.DestructableRockCaves3=1121]="DestructableRockCaves3",e[e.MinesDoor=1122]="MinesDoor",e[e.FloorPanel3=1123]="FloorPanel3",e[e.MinesSwitchDoor=1124]="MinesSwitchDoor",e[e.LargeCryoTube=1125]="LargeCryoTube",e[e.ComputerLikeCalus=1126]="ComputerLikeCalus",e[e.GreenScreenOpeningAndClosing=1127]="GreenScreenOpeningAndClosing",e[e.FloatingRobot=1128]="FloatingRobot",e[e.FloatingBlueLight=1129]="FloatingBlueLight",e[e.SelfDestructingObject1=1130]="SelfDestructingObject1",e[e.SelfDestructingObject2=1131]="SelfDestructingObject2",e[e.SelfDestructingObject3=1132]="SelfDestructingObject3",e[e.SparkMachine=1133]="SparkMachine",e[e.MinesLargeFlashingCrate=1134]="MinesLargeFlashingCrate",e[e.RuinsSeal=1135]="RuinsSeal",e[e.RuinsTeleporter=1136]="RuinsTeleporter",e[e.RuinsWarpSiteToSite=1137]="RuinsWarpSiteToSite",e[e.RuinsSwitch=1138]="RuinsSwitch",e[e.FloorPanel4=1139]="FloorPanel4",e[e.Ruins1Door=1140]="Ruins1Door",e[e.Ruins3Door=1141]="Ruins3Door",e[e.Ruins2Door=1142]="Ruins2Door",e[e.Ruins11ButtonDoor=1143]="Ruins11ButtonDoor",e[e.Ruins21ButtonDoor=1144]="Ruins21ButtonDoor",e[e.Ruins31ButtonDoor=1145]="Ruins31ButtonDoor",e[e.Ruins4ButtonDoor=1146]="Ruins4ButtonDoor",e[e.Ruins2ButtonDoor=1147]="Ruins2ButtonDoor",e[e.RuinsSensor=1148]="RuinsSensor",e[e.RuinsFenceSwitch=1149]="RuinsFenceSwitch",e[e.RuinsLaserFence4x2=1150]="RuinsLaserFence4x2",e[e.RuinsLaserFence6x2=1151]="RuinsLaserFence6x2",e[e.RuinsLaserFence4x4=1152]="RuinsLaserFence4x4",e[e.RuinsLaserFence6x4=1153]="RuinsLaserFence6x4",e[e.RuinsPoisonBlob=1154]="RuinsPoisonBlob",e[e.RuinsPillarTrap=1155]="RuinsPillarTrap",e[e.PopupTrapNoTech=1156]="PopupTrapNoTech",e[e.RuinsCrystal=1157]="RuinsCrystal",e[e.Monument=1158]="Monument",e[e.RuinsRock1=1159]="RuinsRock1",e[e.RuinsRock2=1160]="RuinsRock2",e[e.RuinsRock3=1161]="RuinsRock3",e[e.RuinsRock4=1162]="RuinsRock4",e[e.RuinsRock5=1163]="RuinsRock5",e[e.RuinsRock6=1164]="RuinsRock6",e[e.RuinsRock7=1165]="RuinsRock7",e[e.Poison=1166]="Poison",e[e.FixedBoxTypeRuins=1167]="FixedBoxTypeRuins",e[e.RandomBoxTypeRuins=1168]="RandomBoxTypeRuins",e[e.EnemyTypeBoxYellow=1169]="EnemyTypeBoxYellow",e[e.EnemyTypeBoxBlue=1170]="EnemyTypeBoxBlue",e[e.EmptyTypeBoxBlue=1171]="EmptyTypeBoxBlue",e[e.DestructableRock=1172]="DestructableRock",e[e.PopupTrapsTechs=1173]="PopupTrapsTechs",e[e.FlyingWhiteBird=1174]="FlyingWhiteBird",e[e.Tower=1175]="Tower",e[e.FloatingRocks=1176]="FloatingRocks",e[e.FloatingSoul=1177]="FloatingSoul",e[e.Butterfly=1178]="Butterfly",e[e.LobbyGameMenu=1179]="LobbyGameMenu",e[e.LobbyWarpObject=1180]="LobbyWarpObject",e[e.Lobby1EventObjectDefaultTree=1181]="Lobby1EventObjectDefaultTree",e[e.UnknownItem387=1182]="UnknownItem387",e[e.UnknownItem388=1183]="UnknownItem388",e[e.UnknownItem389=1184]="UnknownItem389",e[e.LobbyEventObjectStaticPumpkin=1185]="LobbyEventObjectStaticPumpkin",e[e.LobbyEventObject3ChristmasWindows=1186]="LobbyEventObject3ChristmasWindows",e[e.LobbyEventObjectRedAndWhiteCurtain=1187]="LobbyEventObjectRedAndWhiteCurtain",e[e.UnknownItem393=1188]="UnknownItem393",e[e.UnknownItem394=1189]="UnknownItem394",e[e.LobbyFishTank=1190]="LobbyFishTank",e[e.LobbyEventObjectButterflies=1191]="LobbyEventObjectButterflies",e[e.UnknownItem400=1192]="UnknownItem400",e[e.GreyWallLow=1193]="GreyWallLow",e[e.SpaceshipDoor=1194]="SpaceshipDoor",e[e.GreyWallHigh=1195]="GreyWallHigh",e[e.TempleNormalDoor=1196]="TempleNormalDoor",e[e.BreakableWallWallButUnbreakable=1197]="BreakableWallWallButUnbreakable",e[e.BrokenCylinderAndRubble=1198]="BrokenCylinderAndRubble",e[e.ThreeBrokenWallPiecesOnFloor=1199]="ThreeBrokenWallPiecesOnFloor",e[e.HighBrickCylinder=1200]="HighBrickCylinder",e[e.LyingCylinder=1201]="LyingCylinder",e[e.BrickConeWithFlatTop=1202]="BrickConeWithFlatTop",e[e.BreakableTempleWall=1203]="BreakableTempleWall",e[e.TempleMapDetect=1204]="TempleMapDetect",e[e.SmallBrownBrickRisingBridge=1205]="SmallBrownBrickRisingBridge",e[e.LongRisingBridgeWithPinkHighEdges=1206]="LongRisingBridgeWithPinkHighEdges",e[e.FourSwitchTempleDoor=1207]="FourSwitchTempleDoor",e[e.FourButtonSpaceshipDoor=1208]="FourButtonSpaceshipDoor",e[e.ItemBoxCca=1209]="ItemBoxCca",e[e.TeleporterEp2=1210]="TeleporterEp2",e[e.CCADoor=1211]="CCADoor",e[e.SpecialBoxCCA=1212]="SpecialBoxCCA",e[e.BigCCADoor=1213]="BigCCADoor",e[e.BigCCADoorSwitch=1214]="BigCCADoorSwitch",e[e.LittleRock=1215]="LittleRock",e[e.Little3StoneWall=1216]="Little3StoneWall",e[e.Medium3StoneWall=1217]="Medium3StoneWall",e[e.SpiderPlant=1218]="SpiderPlant",e[e.CCAAreaTeleporter=1219]="CCAAreaTeleporter",e[e.UnknownItem523=1220]="UnknownItem523",e[e.WhiteBird=1221]="WhiteBird",e[e.OrangeBird=1222]="OrangeBird",e[e.Saw=1223]="Saw",e[e.LaserDetect=1224]="LaserDetect",e[e.UnknownItem529=1225]="UnknownItem529",e[e.UnknownItem530=1226]="UnknownItem530",e[e.Seagull=1227]="Seagull",e[e.Fish=1228]="Fish",e[e.SeabedDoorWithBlueEdges=1229]="SeabedDoorWithBlueEdges",e[e.SeabedDoorAlwaysOpenNonTriggerable=1230]="SeabedDoorAlwaysOpenNonTriggerable",e[e.LittleCryotube=1231]="LittleCryotube",e[e.WideGlassWallBreakable=1232]="WideGlassWallBreakable",e[e.BlueFloatingRobot=1233]="BlueFloatingRobot",e[e.RedFloatingRobot=1234]="RedFloatingRobot",e[e.Dolphin=1235]="Dolphin",e[e.CaptureTrap=1236]="CaptureTrap",e[e.VRLink=1237]="VRLink",e[e.UnknownItem576=1238]="UnknownItem576",e[e.WarpInBarbaRayRoom=1239]="WarpInBarbaRayRoom",e[e.UnknownItem672=1240]="UnknownItem672",e[e.GeeNest=1241]="GeeNest",e[e.LabComputerConsole=1242]="LabComputerConsole",e[e.LabComputerConsoleGreenScreen=1243]="LabComputerConsoleGreenScreen",e[e.ChairYellowPillow=1244]="ChairYellowPillow",e[e.OrangeWallWithHoleInMiddle=1245]="OrangeWallWithHoleInMiddle",e[e.GreyWallWithHoleInMiddle=1246]="GreyWallWithHoleInMiddle",e[e.LongTable=1247]="LongTable",e[e.GBAStation=1248]="GBAStation",e[e.TalkLinkToSupport=1249]="TalkLinkToSupport",e[e.InstaWarp=1250]="InstaWarp",e[e.LabInvisibleObject=1251]="LabInvisibleObject",e[e.LabGlassWindowDoor=1252]="LabGlassWindowDoor",e[e.UnknownItem700=1253]="UnknownItem700",e[e.LabCeilingWarp=1254]="LabCeilingWarp",e[e.Ep4LightSource=1255]="Ep4LightSource",e[e.Cacti=1256]="Cacti",e[e.BigBrownRock=1257]="BigBrownRock",e[e.BreakableBrownRock=1258]="BreakableBrownRock",e[e.UnknownItem832=1259]="UnknownItem832",e[e.UnknownItem833=1260]="UnknownItem833",e[e.PoisonPlant=1261]="PoisonPlant",e[e.UnknownItem897=1262]="UnknownItem897",e[e.UnknownItem898=1263]="UnknownItem898",e[e.OozingDesertPlant=1264]="OozingDesertPlant",e[e.UnknownItem901=1265]="UnknownItem901",e[e.BigBlackRocks=1266]="BigBlackRocks",e[e.UnknownItem903=1267]="UnknownItem903",e[e.UnknownItem904=1268]="UnknownItem904",e[e.UnknownItem905=1269]="UnknownItem905",e[e.UnknownItem906=1270]="UnknownItem906",e[e.FallingRock=1271]="FallingRock",e[e.DesertPlantHasCollision=1272]="DesertPlantHasCollision",e[e.DesertFixedTypeBoxBreakableCrystals=1273]="DesertFixedTypeBoxBreakableCrystals",e[e.UnknownItem910=1274]="UnknownItem910",e[e.BeeHive=1275]="BeeHive",e[e.UnknownItem912=1276]="UnknownItem912",e[e.Heat=1277]="Heat",e[e.TopOfSaintMillionEgg=1278]="TopOfSaintMillionEgg",e[e.UnknownItem961=1279]="UnknownItem961"}(n=t.ObjectType||(t.ObjectType={})),t.OBJECT_TYPES=[],t.object_data=function(e){return s[e]},t.pso_id_to_object_type=function(e){switch(e){default:return n.Unknown;case 0:return n.PlayerSet;case 1:return n.Particle;case 2:return n.Teleporter;case 3:return n.Warp;case 4:return n.LightCollision;case 5:return n.Item;case 6:return n.EnvSound;case 7:return n.FogCollision;case 8:return n.EventCollision;case 9:return n.CharaCollision;case 10:return n.ElementalTrap;case 11:return n.StatusTrap;case 12:return n.HealTrap;case 13:return n.LargeElementalTrap;case 14:return n.ObjRoomID;case 15:return n.Sensor;case 16:return n.UnknownItem16;case 17:return n.LensFlare;case 18:return n.ScriptCollision;case 19:return n.HealRing;case 20:return n.MapCollision;case 21:return n.ScriptCollisionA;case 22:return n.ItemLight;case 23:return n.RadarCollision;case 24:return n.FogCollisionSW;case 25:return n.BossTeleporter;case 26:return n.ImageBoard;case 27:return n.QuestWarp;case 28:return n.Epilogue;case 29:return n.UnknownItem29;case 30:return n.UnknownItem30;case 31:return n.UnknownItem31;case 32:return n.BoxDetectObject;case 33:return n.SymbolChatObject;case 34:return n.TouchPlateObject;case 35:return n.TargetableObject;case 36:return n.EffectObject;case 37:return n.CountDownObject;case 38:return n.UnknownItem38;case 39:return n.UnknownItem39;case 40:return n.UnknownItem40;case 41:return n.UnknownItem41;case 64:return n.MenuActivation;case 65:return n.TelepipeLocation;case 66:return n.BGMCollision;case 67:return n.MainRagolTeleporter;case 68:return n.LobbyTeleporter;case 69:return n.PrincipalWarp;case 70:return n.ShopDoor;case 71:return n.HuntersGuildDoor;case 72:return n.TeleporterDoor;case 73:return n.MedicalCenterDoor;case 74:return n.Elevator;case 75:return n.EasterEgg;case 76:return n.ValentinesHeart;case 77:return n.ChristmasTree;case 78:return n.ChristmasWreath;case 79:return n.HalloweenPumpkin;case 80:return n.TwentyFirstCentury;case 81:return n.Sonic;case 82:return n.WelcomeBoard;case 83:return n.Firework;case 84:return n.LobbyScreenDoor;case 85:return n.MainRagolTeleporterBattleInNextArea;case 86:return n.LabTeleporterDoor;case 87:return n.Pioneer2InvisibleTouchplate;case 128:return n.ForestDoor;case 129:return n.ForestSwitch;case 130:return n.LaserFence;case 131:return n.LaserSquareFence;case 132:return n.ForestLaserFenceSwitch;case 133:return n.LightRays;case 134:return n.BlueButterfly;case 135:return n.Probe;case 136:return n.RandomTypeBox1;case 137:return n.ForestWeatherStation;case 138:return n.Battery;case 139:return n.ForestConsole;case 140:return n.BlackSlidingDoor;case 141:return n.RicoMessagePod;case 142:return n.EnergyBarrier;case 143:return n.ForestRisingBridge;case 144:return n.SwitchNoneDoor;case 145:return n.EnemyBoxGrey;case 146:return n.FixedTypeBox;case 147:return n.EnemyBoxBrown;case 149:return n.EmptyTypeBox;case 150:return n.LaserFenceEx;case 151:return n.LaserSquareFenceEx;case 192:return n.FloorPanel1;case 193:return n.Caves4ButtonDoor;case 194:return n.CavesNormalDoor;case 195:return n.CavesSmashingPillar;case 196:return n.CavesSign1;case 197:return n.CavesSign2;case 198:return n.CavesSign3;case 199:return n.HexagonalTank;case 200:return n.BrownPlatform;case 201:return n.WarningLightObject;case 203:return n.Rainbow;case 204:return n.FloatingJellyfish;case 205:return n.FloatingDragonfly;case 206:return n.CavesSwitchDoor;case 207:return n.RobotRechargeStation;case 208:return n.CavesCakeShop;case 209:return n.Caves1SmallRedRock;case 210:return n.Caves1MediumRedRock;case 211:return n.Caves1LargeRedRock;case 212:return n.Caves2SmallRock1;case 213:return n.Caves2MediumRock1;case 214:return n.Caves2LargeRock1;case 215:return n.Caves2SmallRock2;case 216:return n.Caves2MediumRock2;case 217:return n.Caves2LargeRock2;case 218:return n.Caves3SmallRock;case 219:return n.Caves3MediumRock;case 220:return n.Caves3LargeRock;case 222:return n.FloorPanel2;case 223:return n.DestructableRockCaves1;case 224:return n.DestructableRockCaves2;case 225:return n.DestructableRockCaves3;case 256:return n.MinesDoor;case 257:return n.FloorPanel3;case 258:return n.MinesSwitchDoor;case 259:return n.LargeCryoTube;case 260:return n.ComputerLikeCalus;case 261:return n.GreenScreenOpeningAndClosing;case 262:return n.FloatingRobot;case 263:return n.FloatingBlueLight;case 264:return n.SelfDestructingObject1;case 265:return n.SelfDestructingObject2;case 266:return n.SelfDestructingObject3;case 267:return n.SparkMachine;case 268:return n.MinesLargeFlashingCrate;case 304:return n.RuinsSeal;case 320:return n.RuinsTeleporter;case 321:return n.RuinsWarpSiteToSite;case 322:return n.RuinsSwitch;case 323:return n.FloorPanel4;case 324:return n.Ruins1Door;case 325:return n.Ruins3Door;case 326:return n.Ruins2Door;case 327:return n.Ruins11ButtonDoor;case 328:return n.Ruins21ButtonDoor;case 329:return n.Ruins31ButtonDoor;case 330:return n.Ruins4ButtonDoor;case 331:return n.Ruins2ButtonDoor;case 332:return n.RuinsSensor;case 333:return n.RuinsFenceSwitch;case 334:return n.RuinsLaserFence4x2;case 335:return n.RuinsLaserFence6x2;case 336:return n.RuinsLaserFence4x4;case 337:return n.RuinsLaserFence6x4;case 338:return n.RuinsPoisonBlob;case 339:return n.RuinsPillarTrap;case 340:return n.PopupTrapNoTech;case 341:return n.RuinsCrystal;case 342:return n.Monument;case 345:return n.RuinsRock1;case 346:return n.RuinsRock2;case 347:return n.RuinsRock3;case 348:return n.RuinsRock4;case 349:return n.RuinsRock5;case 350:return n.RuinsRock6;case 351:return n.RuinsRock7;case 352:return n.Poison;case 353:return n.FixedBoxTypeRuins;case 354:return n.RandomBoxTypeRuins;case 355:return n.EnemyTypeBoxYellow;case 356:return n.EnemyTypeBoxBlue;case 357:return n.EmptyTypeBoxBlue;case 358:return n.DestructableRock;case 359:return n.PopupTrapsTechs;case 368:return n.FlyingWhiteBird;case 369:return n.Tower;case 370:return n.FloatingRocks;case 371:return n.FloatingSoul;case 372:return n.Butterfly;case 384:return n.LobbyGameMenu;case 385:return n.LobbyWarpObject;case 386:return n.Lobby1EventObjectDefaultTree;case 387:return n.UnknownItem387;case 388:return n.UnknownItem388;case 389:return n.UnknownItem389;case 390:return n.LobbyEventObjectStaticPumpkin;case 391:return n.LobbyEventObject3ChristmasWindows;case 392:return n.LobbyEventObjectRedAndWhiteCurtain;case 393:return n.UnknownItem393;case 394:return n.UnknownItem394;case 395:return n.LobbyFishTank;case 396:return n.LobbyEventObjectButterflies;case 400:return n.UnknownItem400;case 401:return n.GreyWallLow;case 402:return n.SpaceshipDoor;case 403:return n.GreyWallHigh;case 416:return n.TempleNormalDoor;case 417:return n.BreakableWallWallButUnbreakable;case 418:return n.BrokenCylinderAndRubble;case 419:return n.ThreeBrokenWallPiecesOnFloor;case 420:return n.HighBrickCylinder;case 421:return n.LyingCylinder;case 422:return n.BrickConeWithFlatTop;case 423:return n.BreakableTempleWall;case 424:return n.TempleMapDetect;case 425:return n.SmallBrownBrickRisingBridge;case 426:return n.LongRisingBridgeWithPinkHighEdges;case 427:return n.FourSwitchTempleDoor;case 448:return n.FourButtonSpaceshipDoor;case 512:return n.ItemBoxCca;case 513:return n.TeleporterEp2;case 514:return n.CCADoor;case 515:return n.SpecialBoxCCA;case 516:return n.BigCCADoor;case 517:return n.BigCCADoorSwitch;case 518:return n.LittleRock;case 519:return n.Little3StoneWall;case 520:return n.Medium3StoneWall;case 521:return n.SpiderPlant;case 522:return n.CCAAreaTeleporter;case 523:return n.UnknownItem523;case 524:return n.WhiteBird;case 525:return n.OrangeBird;case 527:return n.Saw;case 528:return n.LaserDetect;case 529:return n.UnknownItem529;case 530:return n.UnknownItem530;case 531:return n.Seagull;case 544:return n.Fish;case 545:return n.SeabedDoorWithBlueEdges;case 546:return n.SeabedDoorAlwaysOpenNonTriggerable;case 547:return n.LittleCryotube;case 548:return n.WideGlassWallBreakable;case 549:return n.BlueFloatingRobot;case 550:return n.RedFloatingRobot;case 551:return n.Dolphin;case 552:return n.CaptureTrap;case 553:return n.VRLink;case 576:return n.UnknownItem576;case 640:return n.WarpInBarbaRayRoom;case 672:return n.UnknownItem672;case 688:return n.GeeNest;case 689:return n.LabComputerConsole;case 690:return n.LabComputerConsoleGreenScreen;case 691:return n.ChairYellowPillow;case 692:return n.OrangeWallWithHoleInMiddle;case 693:return n.GreyWallWithHoleInMiddle;case 694:return n.LongTable;case 695:return n.GBAStation;case 696:return n.TalkLinkToSupport;case 697:return n.InstaWarp;case 698:return n.LabInvisibleObject;case 699:return n.LabGlassWindowDoor;case 700:return n.UnknownItem700;case 701:return n.LabCeilingWarp;case 768:return n.Ep4LightSource;case 769:return n.Cacti;case 770:return n.BigBrownRock;case 771:return n.BreakableBrownRock;case 832:return n.UnknownItem832;case 833:return n.UnknownItem833;case 896:return n.PoisonPlant;case 897:return n.UnknownItem897;case 898:return n.UnknownItem898;case 899:return n.OozingDesertPlant;case 901:return n.UnknownItem901;case 902:return n.BigBlackRocks;case 903:return n.UnknownItem903;case 904:return n.UnknownItem904;case 905:return n.UnknownItem905;case 906:return n.UnknownItem906;case 907:return n.FallingRock;case 908:return n.DesertPlantHasCollision;case 909:return n.DesertFixedTypeBoxBreakableCrystals;case 910:return n.UnknownItem910;case 911:return n.BeeHive;case 912:return n.UnknownItem912;case 913:return n.Heat;case 960:return n.TopOfSaintMillionEgg;case 961:return n.UnknownItem961}};const s=[];function r(e,i,o,n){t.OBJECT_TYPES.push(e);const r=[];for(const[e,t]of n)r[e]=t;s[e]=Object.freeze({name:o,area_ids:r,pso_id:i})}r(n.Unknown,void 0,"Unknown",[]),r(n.PlayerSet,0,"Player Set",[[o.Episode.I,[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]],[o.Episode.II,[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8,9,0]]]),r(n.Particle,1,"Particle",[[o.Episode.I,[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]],[o.Episode.II,[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8,0]]]),r(n.Teleporter,2,"Teleporter",[[o.Episode.I,[0,1,2,3,4,5,6,7,11,12,13,14]],[o.Episode.II,[0,1,2,3,4,12,13,14,15]],[o.Episode.IV,[1,2,3,4,5,6,7,8,9,0]]]),r(n.Warp,3,"Warp",[[o.Episode.I,[0,1,2,3,4,5,6,7,11,12,13,14,16,17]],[o.Episode.II,[0,1,2,3,4,5,6,7,8,9,10,11,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8,9,0]]]),r(n.LightCollision,4,"Light Collision",[[o.Episode.I,[0,1,2,3,4,5,6,7,8,9,10,15,16,17]],[o.Episode.II,[0,1,2,3,4,5,6,7,8,9,10,11,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8,0]]]),r(n.Item,5,"Item",[]),r(n.EnvSound,6,"Env Sound",[[o.Episode.I,[0,1,2,3,4,5,6,7,8,9,10,16,17]],[o.Episode.II,[0,1,2,3,4,5,6,7,8,9,10,11,13]],[o.Episode.IV,[1,2,3,4,5,6,7,8,0]]]),r(n.FogCollision,7,"Fog Collision",[[o.Episode.I,[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,17]],[o.Episode.II,[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8,0]]]),r(n.EventCollision,8,"Event Collision",[[o.Episode.I,[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,17]],[o.Episode.II,[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8,9,0]]]),r(n.CharaCollision,9,"Chara Collision",[[o.Episode.I,[0,1,2,3,4,5,8,9,10]],[o.Episode.II,[0]],[o.Episode.IV,[0]]]),r(n.ElementalTrap,10,"Elemental Trap",[[o.Episode.I,[1,2,3,4,5,6,7,8,9,10,16,17]],[o.Episode.II,[1,2,3,4,5,6,7,8,9,10,11,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8,9]]]),r(n.StatusTrap,11,"Status Trap",[[o.Episode.I,[1,2,3,4,5,6,7,8,9,10,16,17]],[o.Episode.II,[1,2,3,4,5,6,7,8,9,10,11,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8,9]]]),r(n.HealTrap,12,"Heal Trap",[[o.Episode.I,[1,2,3,4,5,6,7,8,9,10,16,17]],[o.Episode.II,[1,2,3,4,5,6,7,8,9,10,11,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8,9]]]),r(n.LargeElementalTrap,13,"Large Elemental Trap",[[o.Episode.I,[1,2,3,4,5,6,7,8,9,10,16,17]],[o.Episode.II,[1,2,3,4,5,6,7,8,9,10,11,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8,9]]]),r(n.ObjRoomID,14,"Obj Room ID",[[o.Episode.I,[1,2,3,4,5,6,7,8,9,10,11,12,13]],[o.Episode.II,[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8,9]]]),r(n.Sensor,15,"Sensor",[[o.Episode.I,[1,2,4,5,6,7]]]),r(n.UnknownItem16,16,"Unknown Item (16)",[]),r(n.LensFlare,17,"Lens Flare",[[o.Episode.I,[1,2,3,4,8,14]]]),r(n.ScriptCollision,18,"Script Collision",[[o.Episode.I,[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]],[o.Episode.II,[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8,0]]]),r(n.HealRing,19,"Heal Ring",[[o.Episode.I,[1,2,3,4,5,6,7,8,9,10]],[o.Episode.II,[1,2,3,4,5,6,7,8,9,10,11,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.MapCollision,20,"Map Collision",[[o.Episode.I,[0,1,2,3,4,5,8,9,10,16,17]],[o.Episode.II,[0,5,6,7,8,9,10,11,16,17]],[o.Episode.IV,[0]]]),r(n.ScriptCollisionA,21,"Script Collision A",[[o.Episode.I,[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]],[o.Episode.II,[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8,0]]]),r(n.ItemLight,22,"Item Light",[[o.Episode.I,[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]],[o.Episode.II,[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8,0]]]),r(n.RadarCollision,23,"Radar Collision",[[o.Episode.I,[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]],[o.Episode.II,[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.FogCollisionSW,24,"Fog Collision SW",[[o.Episode.I,[1,2,3,4,5,6,7,8,9,10,11,12,13,14]],[o.Episode.II,[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.BossTeleporter,25,"Boss Teleporter",[[o.Episode.I,[0,2,5,7,10]],[o.Episode.II,[0,1,2,3,4,5,6,7,8,9,10,11,16,17]],[o.Episode.IV,[5,6,7,8,0]]]),r(n.ImageBoard,26,"Image Board",[[o.Episode.I,[0]],[o.Episode.II,[0]],[o.Episode.IV,[0]]]),r(n.QuestWarp,27,"Quest Warp",[[o.Episode.I,[1,2,3,4,5,6,7,11,12,13,14]],[o.Episode.IV,[9]]]),r(n.Epilogue,28,"Epilogue",[[o.Episode.I,[14]],[o.Episode.II,[13]],[o.Episode.IV,[9]]]),r(n.UnknownItem29,29,"Unknown Item (29)",[[o.Episode.I,[1]]]),r(n.UnknownItem30,30,"Unknown Item (30)",[[o.Episode.I,[1,2,17]],[o.Episode.II,[1,2,14]],[o.Episode.IV,[1,2,3,4,5]]]),r(n.UnknownItem31,31,"Unknown Item (31)",[[o.Episode.I,[1,2,3,4,5,6,7,8,9,10,16,17]],[o.Episode.II,[1,2,3,4,5,6,7,8,9,10,11,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.BoxDetectObject,32,"Box Detect Object",[[o.Episode.I,[0,1,2,3,4,5,6,7,8,9,10,16,17]],[o.Episode.II,[0,1,2,3,4,5,6,7,8,9,10,11,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8,0]]]),r(n.SymbolChatObject,33,"Symbol Chat Object",[[o.Episode.I,[0,1,2,3,4,5,6,7,8,9,10,16,17]],[o.Episode.II,[0,1,2,3,4,5,6,7,8,9,10,11,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8,0]]]),r(n.TouchPlateObject,34,"Touch plate Object",[[o.Episode.I,[1,2,3,4,5,6,7,8,9,10,16,17]],[o.Episode.II,[1,2,3,4,5,6,7,8,9,10,11,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.TargetableObject,35,"Targetable Object",[[o.Episode.I,[1,2,3,4,5,6,7,8,9,10,16,17]],[o.Episode.II,[1,2,3,4,5,6,7,8,9,10,11,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.EffectObject,36,"Effect object",[[o.Episode.I,[0,1,2,3,4,5,6,7,8,9,10,16,17]],[o.Episode.II,[0,1,2,5,6,7,8,9,10,11,12,13,14,15,16,17]],[o.Episode.IV,[0]]]),r(n.CountDownObject,37,"Count Down Object",[[o.Episode.I,[0,1,2,3,4,5,6,7,8,9,10,16,17]],[o.Episode.II,[0,1,2,3,4,5,6,7,8,9,10,11,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8,0]]]),r(n.UnknownItem38,38,"Unknown Item (38)",[[o.Episode.I,[0,1,2,3,4,5,6,7,8,9,10,16,17]],[o.Episode.II,[0,1,2,3,4,5,6,7,8,9,10,11,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8,0]]]),r(n.UnknownItem39,39,"Unknown Item (39)",[[o.Episode.II,[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.UnknownItem40,40,"Unknown Item (40)",[[o.Episode.I,[0,1,2,4,5,6,7,8,9,10,13,16,17]],[o.Episode.II,[0,1,2,3,4,5,6,7,8,9,10,11,13,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8,0]]]),r(n.UnknownItem41,41,"Unknown Item (41)",[[o.Episode.I,[0,1,2,4,5,6,7,8,9,10,13,16,17]],[o.Episode.II,[0,1,2,3,4,5,6,7,8,9,10,11,13,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8,0]]]),r(n.MenuActivation,64,"Menu activation",[[o.Episode.I,[0]],[o.Episode.II,[0]],[o.Episode.IV,[0]]]),r(n.TelepipeLocation,65,"Telepipe Location",[[o.Episode.I,[0]],[o.Episode.II,[0]],[o.Episode.IV,[0]]]),r(n.BGMCollision,66,"BGM Collision",[[o.Episode.I,[0]],[o.Episode.II,[0]],[o.Episode.IV,[0]]]),r(n.MainRagolTeleporter,67,"Main Ragol Teleporter",[[o.Episode.I,[0]],[o.Episode.II,[0]],[o.Episode.IV,[0]]]),r(n.LobbyTeleporter,68,"Lobby Teleporter",[[o.Episode.I,[0]],[o.Episode.II,[0]],[o.Episode.IV,[0]]]),r(n.PrincipalWarp,69,"Principal warp",[[o.Episode.I,[0]],[o.Episode.II,[0]],[o.Episode.IV,[0]]]),r(n.ShopDoor,70,"Shop Door",[[o.Episode.I,[0]],[o.Episode.IV,[0]]]),r(n.HuntersGuildDoor,71,"Hunter's Guild Door",[[o.Episode.I,[0]],[o.Episode.IV,[0]]]),r(n.TeleporterDoor,72,"Teleporter Door",[[o.Episode.I,[0]],[o.Episode.IV,[0]]]),r(n.MedicalCenterDoor,73,"Medical Center Door",[[o.Episode.I,[0]],[o.Episode.IV,[0]]]),r(n.Elevator,74,"Elevator",[[o.Episode.I,[0]],[o.Episode.IV,[0]]]),r(n.EasterEgg,75,"Easter Egg",[[o.Episode.I,[0]],[o.Episode.II,[0]],[o.Episode.IV,[0]]]),r(n.ValentinesHeart,76,"Valentines Heart",[[o.Episode.I,[0]],[o.Episode.II,[0]],[o.Episode.IV,[0]]]),r(n.ChristmasTree,77,"Christmas Tree",[[o.Episode.I,[0]],[o.Episode.II,[0]],[o.Episode.IV,[0]]]),r(n.ChristmasWreath,78,"Christmas Wreath",[[o.Episode.I,[0]],[o.Episode.II,[0]],[o.Episode.IV,[0]]]),r(n.HalloweenPumpkin,79,"Halloween Pumpkin",[[o.Episode.I,[0]],[o.Episode.II,[0]],[o.Episode.IV,[0]]]),r(n.TwentyFirstCentury,80,"21st Century",[[o.Episode.I,[0]],[o.Episode.II,[0]],[o.Episode.IV,[0]]]),r(n.Sonic,81,"Sonic",[[o.Episode.I,[0]],[o.Episode.II,[0]],[o.Episode.IV,[0]]]),r(n.WelcomeBoard,82,"Welcome Board",[[o.Episode.I,[0]],[o.Episode.II,[0]],[o.Episode.IV,[0]]]),r(n.Firework,83,"Firework",[[o.Episode.I,[0]],[o.Episode.II,[0,16]],[o.Episode.IV,[0]]]),r(n.LobbyScreenDoor,84,"Lobby Screen Door",[[o.Episode.I,[0]],[o.Episode.IV,[0]]]),r(n.MainRagolTeleporterBattleInNextArea,85,"Main Ragol Teleporter (Battle in next area?)",[[o.Episode.I,[0]],[o.Episode.II,[0]],[o.Episode.IV,[0]]]),r(n.LabTeleporterDoor,86,"Lab Teleporter Door",[[o.Episode.II,[0]]]),r(n.Pioneer2InvisibleTouchplate,87,"Pioneer 2 Invisible Touchplate",[[o.Episode.I,[0]],[o.Episode.II,[0]],[o.Episode.IV,[0]]]),r(n.ForestDoor,128,"Forest Door",[[o.Episode.I,[1,2]]]),r(n.ForestSwitch,129,"Forest Switch",[[o.Episode.I,[1,2,3,4,5]],[o.Episode.II,[1,2,3,4]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.LaserFence,130,"Laser Fence",[[o.Episode.I,[1,2,3,4,5,6,7,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.LaserSquareFence,131,"Laser Square Fence",[[o.Episode.I,[1,2,3,4,5,6,7,16,17]],[o.Episode.II,[1,2,3,4,5,6,7,8,9,10,11]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.ForestLaserFenceSwitch,132,"Forest Laser Fence Switch",[[o.Episode.I,[1,2,3,4,5,6,7,16,17]],[o.Episode.II,[1,2,3,4,5,6,7,8,9,10,11,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.LightRays,133,"Light rays",[[o.Episode.I,[1,2]],[o.Episode.II,[5,6,7,8,9]],[o.Episode.IV,[6,7,8]]]),r(n.BlueButterfly,134,"Blue Butterfly",[[o.Episode.I,[1,2]],[o.Episode.IV,[6,7,8]]]),r(n.Probe,135,"Probe",[[o.Episode.I,[1,2]]]),r(n.RandomTypeBox1,136,"Random Type Box 1",[[o.Episode.I,[1,2,3,4,5,6,7]],[o.Episode.II,[10,11,13]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.ForestWeatherStation,137,"Forest Weather Station",[[o.Episode.I,[1,2]]]),r(n.Battery,138,"Battery",[]),r(n.ForestConsole,139,"Forest Console",[[o.Episode.I,[1,2,3,4,5,6,7,8,9,10,16,17]],[o.Episode.II,[1,2,3,4,5,6,7,8,9,10,11,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.BlackSlidingDoor,140,"Black Sliding Door",[[o.Episode.I,[1,2,3]]]),r(n.RicoMessagePod,141,"Rico Message Pod",[[o.Episode.I,[1,2,3,4,5,6,7,8,9,10,13]]]),r(n.EnergyBarrier,142,"Energy Barrier",[[o.Episode.I,[1,2,4,5,6,7]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.ForestRisingBridge,143,"Forest Rising Bridge",[[o.Episode.I,[1,2]]]),r(n.SwitchNoneDoor,144,"Switch (none door)",[[o.Episode.I,[1,2,6,7,16,17]],[o.Episode.II,[1,2,3,4,5,6,7,8,9,10,11,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.EnemyBoxGrey,145,"Enemy Box (Grey)",[[o.Episode.I,[1,2,3,4,5,6,7]],[o.Episode.II,[10,11]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.FixedTypeBox,146,"Fixed Type Box",[[o.Episode.I,[1,2,3,4,5,6,7,11,12,13,14]],[o.Episode.II,[10,11,13]],[o.Episode.IV,[1,2,3,4,6,7,8,9]]]),r(n.EnemyBoxBrown,147,"Enemy Box (Brown)",[[o.Episode.I,[1,2,3,4,5,6,7]],[o.Episode.II,[10,11]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.EmptyTypeBox,149,"Empty Type Box",[[o.Episode.I,[1,2,3,4,5,6,7]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.LaserFenceEx,150,"Laser Fence Ex",[[o.Episode.I,[1,2,3,4,5,6,7,8,9,10,16,17]],[o.Episode.II,[1,2,3,4,5,6,7,8,9,10,11,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.LaserSquareFenceEx,151,"Laser Square Fence Ex",[]),r(n.FloorPanel1,192,"Floor Panel 1",[[o.Episode.I,[3,4,5,16,17]],[o.Episode.II,[1,2,3,4,5,6,7,8,9,10,11,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.Caves4ButtonDoor,193,"Caves 4 Button door",[[o.Episode.I,[3,4,5]]]),r(n.CavesNormalDoor,194,"Caves Normal door",[[o.Episode.I,[3,4,5]]]),r(n.CavesSmashingPillar,195,"Caves Smashing Pillar",[[o.Episode.I,[3,4,5]],[o.Episode.II,[1,2,3,4,17]]]),r(n.CavesSign1,196,"Caves Sign 1",[[o.Episode.I,[4,5]]]),r(n.CavesSign2,197,"Caves Sign 2",[[o.Episode.I,[4,5]]]),r(n.CavesSign3,198,"Caves Sign 3",[[o.Episode.I,[4,5]]]),r(n.HexagonalTank,199,"Hexagonal Tank",[[o.Episode.I,[4,5]]]),r(n.BrownPlatform,200,"Brown Platform",[[o.Episode.I,[4,5]]]),r(n.WarningLightObject,201,"Warning Light Object",[[o.Episode.I,[4,5]],[o.Episode.IV,[5]]]),r(n.Rainbow,203,"Rainbow",[[o.Episode.I,[4]]]),r(n.FloatingJellyfish,204,"Floating Jellyfish",[[o.Episode.I,[4]],[o.Episode.II,[10,11]]]),r(n.FloatingDragonfly,205,"Floating Dragonfly",[[o.Episode.I,[4,16]],[o.Episode.II,[3,4]],[o.Episode.IV,[6,7,8]]]),r(n.CavesSwitchDoor,206,"Caves Switch Door",[[o.Episode.I,[3,4,5]]]),r(n.RobotRechargeStation,207,"Robot Recharge Station",[[o.Episode.I,[3,4,5,6,7]],[o.Episode.II,[17]]]),r(n.CavesCakeShop,208,"Caves Cake Shop",[[o.Episode.I,[5]]]),r(n.Caves1SmallRedRock,209,"Caves 1 Small Red Rock",[[o.Episode.I,[3]]]),r(n.Caves1MediumRedRock,210,"Caves 1 Medium Red Rock",[[o.Episode.I,[3]]]),r(n.Caves1LargeRedRock,211,"Caves 1 Large Red Rock",[[o.Episode.I,[3]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.Caves2SmallRock1,212,"Caves 2 Small Rock 1",[[o.Episode.I,[4]]]),r(n.Caves2MediumRock1,213,"Caves 2 Medium Rock 1",[[o.Episode.I,[4]]]),r(n.Caves2LargeRock1,214,"Caves 2 Large Rock 1",[[o.Episode.I,[4]]]),r(n.Caves2SmallRock2,215,"Caves 2 Small Rock 2",[[o.Episode.I,[4]]]),r(n.Caves2MediumRock2,216,"Caves 2 Medium Rock 2",[[o.Episode.I,[4]]]),r(n.Caves2LargeRock2,217,"Caves 2 Large Rock 2",[[o.Episode.I,[4]]]),r(n.Caves3SmallRock,218,"Caves 3 Small Rock",[[o.Episode.I,[5]]]),r(n.Caves3MediumRock,219,"Caves 3 Medium Rock",[[o.Episode.I,[5]]]),r(n.Caves3LargeRock,220,"Caves 3 Large Rock",[[o.Episode.I,[5]]]),r(n.FloorPanel2,222,"Floor Panel 2",[[o.Episode.I,[1,2,3,4,5,6,7,8,9,10,16,17]],[o.Episode.II,[1,2,3,4,5,6,7,8,9,10,11,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.DestructableRockCaves1,223,"Destructable Rock (Caves 1)",[[o.Episode.I,[3]]]),r(n.DestructableRockCaves2,224,"Destructable Rock (Caves 2)",[[o.Episode.I,[4]]]),r(n.DestructableRockCaves3,225,"Destructable Rock (Caves 3)",[[o.Episode.I,[5]]]),r(n.MinesDoor,256,"Mines Door",[[o.Episode.I,[6,7]]]),r(n.FloorPanel3,257,"Floor Panel 3",[[o.Episode.I,[1,2,6,7,16,17]],[o.Episode.II,[1,2,3,4]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.MinesSwitchDoor,258,"Mines Switch Door",[[o.Episode.I,[6,7]],[o.Episode.IV,[6,7,8]]]),r(n.LargeCryoTube,259,"Large Cryo-Tube",[[o.Episode.I,[6,7]],[o.Episode.II,[17]]]),r(n.ComputerLikeCalus,260,"Computer (like calus)",[[o.Episode.I,[6,7]],[o.Episode.II,[17]]]),r(n.GreenScreenOpeningAndClosing,261,"Green Screen opening and closing",[[o.Episode.I,[6,7]],[o.Episode.II,[17]]]),r(n.FloatingRobot,262,"Floating Robot",[[o.Episode.I,[6,7]]]),r(n.FloatingBlueLight,263,"Floating Blue Light",[[o.Episode.I,[6,7]]]),r(n.SelfDestructingObject1,264,"Self Destructing Object 1",[[o.Episode.I,[6,7]]]),r(n.SelfDestructingObject2,265,"Self Destructing Object 2",[[o.Episode.I,[6,7]]]),r(n.SelfDestructingObject3,266,"Self Destructing Object 3",[[o.Episode.I,[6,7]]]),r(n.SparkMachine,267,"Spark Machine",[[o.Episode.I,[6,7]]]),r(n.MinesLargeFlashingCrate,268,"Mines Large Flashing Crate",[[o.Episode.I,[6,7]]]),r(n.RuinsSeal,304,"Ruins Seal",[[o.Episode.I,[13]]]),r(n.RuinsTeleporter,320,"Ruins Teleporter",[[o.Episode.I,[8,9,10]]]),r(n.RuinsWarpSiteToSite,321,"Ruins Warp (Site to site)",[[o.Episode.I,[8,9,10]]]),r(n.RuinsSwitch,322,"Ruins Switch",[[o.Episode.I,[8,9,10]]]),r(n.FloorPanel4,323,"Floor Panel 4",[[o.Episode.I,[8,9,10]]]),r(n.Ruins1Door,324,"Ruins 1 Door",[[o.Episode.I,[8]]]),r(n.Ruins3Door,325,"Ruins 3 Door",[[o.Episode.I,[10]]]),r(n.Ruins2Door,326,"Ruins 2 Door",[[o.Episode.I,[9]]]),r(n.Ruins11ButtonDoor,327,"Ruins 1-1 Button Door",[[o.Episode.I,[8]]]),r(n.Ruins21ButtonDoor,328,"Ruins 2-1 Button Door",[[o.Episode.I,[9]]]),r(n.Ruins31ButtonDoor,329,"Ruins 3-1 Button Door",[[o.Episode.I,[10]]]),r(n.Ruins4ButtonDoor,330,"Ruins 4-Button Door",[[o.Episode.I,[8,9,10]]]),r(n.Ruins2ButtonDoor,331,"Ruins 2-Button Door",[[o.Episode.I,[8,9,10]]]),r(n.RuinsSensor,332,"Ruins Sensor",[[o.Episode.I,[8,9,10]]]),r(n.RuinsFenceSwitch,333,"Ruins Fence Switch",[[o.Episode.I,[8,9,10]]]),r(n.RuinsLaserFence4x2,334,"Ruins Laser Fence 4x2",[[o.Episode.I,[8,9,10]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.RuinsLaserFence6x2,335,"Ruins Laser Fence 6x2",[[o.Episode.I,[8,9,10]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.RuinsLaserFence4x4,336,"Ruins Laser Fence 4x4",[[o.Episode.I,[8,9,10]]]),r(n.RuinsLaserFence6x4,337,"Ruins Laser Fence 6x4",[[o.Episode.I,[8,9,10]]]),r(n.RuinsPoisonBlob,338,"Ruins poison Blob",[[o.Episode.I,[8,9,10]],[o.Episode.II,[5,6,7,8,9]],[o.Episode.IV,[6,7,8]]]),r(n.RuinsPillarTrap,339,"Ruins Pillar Trap",[[o.Episode.I,[8,9,10]],[o.Episode.II,[1,2,3,4]]]),r(n.PopupTrapNoTech,340,"Popup Trap (No Tech)",[[o.Episode.I,[8,9,10]]]),r(n.RuinsCrystal,341,"Ruins Crystal",[[o.Episode.I,[8,9,10]]]),r(n.Monument,342,"Monument",[[o.Episode.I,[2,4,7]]]),r(n.RuinsRock1,345,"Ruins Rock 1",[[o.Episode.I,[8,9,10]]]),r(n.RuinsRock2,346,"Ruins Rock 2",[[o.Episode.I,[8,9,10]]]),r(n.RuinsRock3,347,"Ruins Rock 3",[[o.Episode.I,[8,9,10]]]),r(n.RuinsRock4,348,"Ruins Rock 4",[[o.Episode.I,[8,9,10]]]),r(n.RuinsRock5,349,"Ruins Rock 5",[[o.Episode.I,[8,9,10]]]),r(n.RuinsRock6,350,"Ruins Rock 6",[[o.Episode.I,[8,9,10]]]),r(n.RuinsRock7,351,"Ruins Rock 7",[[o.Episode.I,[8,9,10]]]),r(n.Poison,352,"Poison",[[o.Episode.I,[8,9,10,13]],[o.Episode.II,[3,4,10,11]],[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.FixedBoxTypeRuins,353,"Fixed Box Type (Ruins)",[[o.Episode.I,[8,9,10,16,17]],[o.Episode.II,[1,2,3,4,14,15]]]),r(n.RandomBoxTypeRuins,354,"Random Box Type (Ruins)",[[o.Episode.I,[8,9,10,16,17]],[o.Episode.II,[1,2,3,4,14,15]]]),r(n.EnemyTypeBoxYellow,355,"Enemy Type Box (Yellow)",[[o.Episode.I,[8,9,10,16,17]],[o.Episode.II,[1,2,3,4]]]),r(n.EnemyTypeBoxBlue,356,"Enemy Type Box (Blue)",[[o.Episode.I,[8,9,10,16,17]],[o.Episode.II,[1,2,3,4]]]),r(n.EmptyTypeBoxBlue,357,"Empty Type Box (Blue)",[[o.Episode.I,[8,9,10,16,17]],[o.Episode.II,[1,2,3,4]]]),r(n.DestructableRock,358,"Destructable Rock",[[o.Episode.I,[8,9,10]]]),r(n.PopupTrapsTechs,359,"Popup Traps (techs)",[[o.Episode.I,[6,7,8,9,10]],[o.Episode.II,[1,2,3,4,5,6,7,8,9,10,11,16,17]]]),r(n.FlyingWhiteBird,368,"Flying White Bird",[[o.Episode.I,[14,16]],[o.Episode.II,[3,4]]]),r(n.Tower,369,"Tower",[[o.Episode.I,[14]]]),r(n.FloatingRocks,370,"Floating Rocks",[[o.Episode.I,[14]]]),r(n.FloatingSoul,371,"Floating Soul",[[o.Episode.I,[14]]]),r(n.Butterfly,372,"Butterfly",[[o.Episode.I,[14]]]),r(n.LobbyGameMenu,384,"Lobby Game menu",[[o.Episode.I,[15]]]),r(n.LobbyWarpObject,385,"Lobby Warp Object",[[o.Episode.I,[15]]]),r(n.Lobby1EventObjectDefaultTree,386,"Lobby 1 Event Object (Default Tree)",[[o.Episode.I,[15]]]),r(n.UnknownItem387,387,"Unknown Item (387)",[[o.Episode.I,[15]]]),r(n.UnknownItem388,388,"Unknown Item (388)",[[o.Episode.I,[15]]]),r(n.UnknownItem389,389,"Unknown Item (389)",[[o.Episode.I,[15]]]),r(n.LobbyEventObjectStaticPumpkin,390,"Lobby Event Object (Static Pumpkin)",[[o.Episode.I,[15]]]),r(n.LobbyEventObject3ChristmasWindows,391,"Lobby Event Object (3 Christmas Windows)",[[o.Episode.I,[15]]]),r(n.LobbyEventObjectRedAndWhiteCurtain,392,"Lobby Event Object (Red and White Curtain)",[[o.Episode.I,[15]]]),r(n.UnknownItem393,393,"Unknown Item (393)",[[o.Episode.I,[15]]]),r(n.UnknownItem394,394,"Unknown Item (394)",[[o.Episode.I,[15]]]),r(n.LobbyFishTank,395,"Lobby Fish Tank",[[o.Episode.I,[15]]]),r(n.LobbyEventObjectButterflies,396,"Lobby Event Object (Butterflies)",[[o.Episode.I,[15]]]),r(n.UnknownItem400,400,"Unknown Item (400)",[[o.Episode.I,[16]],[o.Episode.II,[3,4]]]),r(n.GreyWallLow,401,"grey wall low",[[o.Episode.I,[16]],[o.Episode.II,[3,4,17]]]),r(n.SpaceshipDoor,402,"Spaceship Door",[[o.Episode.I,[16]],[o.Episode.II,[3,4]]]),r(n.GreyWallHigh,403,"grey wall high",[[o.Episode.I,[16]],[o.Episode.II,[3,4,17]]]),r(n.TempleNormalDoor,416,"Temple Normal Door",[[o.Episode.I,[17]],[o.Episode.II,[1,2]]]),r(n.BreakableWallWallButUnbreakable,417,'"breakable wall wall, but unbreakable"',[[o.Episode.I,[17]],[o.Episode.II,[1,2]]]),r(n.BrokenCylinderAndRubble,418,"Broken cylinder and rubble",[[o.Episode.I,[17]],[o.Episode.II,[1,2]]]),r(n.ThreeBrokenWallPiecesOnFloor,419,"3 broken wall pieces on floor",[[o.Episode.I,[17]],[o.Episode.II,[1,2]]]),r(n.HighBrickCylinder,420,"high brick cylinder",[[o.Episode.I,[17]],[o.Episode.II,[1,2]]]),r(n.LyingCylinder,421,"lying cylinder",[[o.Episode.I,[17]],[o.Episode.II,[1,2]]]),r(n.BrickConeWithFlatTop,422,"brick cone with flat top",[[o.Episode.I,[17]],[o.Episode.II,[1,2]]]),r(n.BreakableTempleWall,423,"breakable temple wall",[[o.Episode.I,[17]],[o.Episode.II,[1,2]]]),r(n.TempleMapDetect,424,"Temple Map Detect",[[o.Episode.I,[17]],[o.Episode.II,[1,2,14]],[o.Episode.IV,[1,2,3,4,5]]]),r(n.SmallBrownBrickRisingBridge,425,"small brown brick rising bridge",[[o.Episode.I,[17]],[o.Episode.II,[1,2]]]),r(n.LongRisingBridgeWithPinkHighEdges,426,"long rising bridge (with pink high edges)",[[o.Episode.I,[17]],[o.Episode.II,[1,2]]]),r(n.FourSwitchTempleDoor,427,"4 switch temple door",[[o.Episode.II,[1,2]]]),r(n.FourButtonSpaceshipDoor,448,"4 button spaceship door",[[o.Episode.II,[3,4]]]),r(n.ItemBoxCca,512,"item box cca",[[o.Episode.II,[5,6,7,8,9,12,16,17]],[o.Episode.IV,[5]]]),r(n.TeleporterEp2,513,"Teleporter (Ep 2)",[[o.Episode.II,[5,6,7,8,9,10,11,12,13,16,17]]]),r(n.CCADoor,514,"CCA Door",[[o.Episode.II,[5,6,7,8,9,16,17]]]),r(n.SpecialBoxCCA,515,"Special Box CCA",[[o.Episode.II,[5,6,7,8,9,12,16,17]],[o.Episode.IV,[1,2,3,4,5]]]),r(n.BigCCADoor,516,"Big CCA Door",[[o.Episode.II,[5]]]),r(n.BigCCADoorSwitch,517,"Big CCA Door Switch",[[o.Episode.II,[5,6,7,8,9,16,17]]]),r(n.LittleRock,518,"Little Rock",[[o.Episode.II,[5,6,7,8,9,16]]]),r(n.Little3StoneWall,519,"Little 3 Stone Wall",[[o.Episode.II,[5,6,7,8,9,16]]]),r(n.Medium3StoneWall,520,"Medium 3 stone wall",[[o.Episode.II,[5,6,7,8,9,16]]]),r(n.SpiderPlant,521,"Spider Plant",[[o.Episode.II,[5,6,7,8,9,16]]]),r(n.CCAAreaTeleporter,522,"CCA Area Teleporter",[[o.Episode.II,[5,6,7,8,9,16,17]]]),r(n.UnknownItem523,523,"Unknown Item (523)",[[o.Episode.II,[5,12]]]),r(n.WhiteBird,524,"White Bird",[[o.Episode.II,[6,7,9,16,17]],[o.Episode.IV,[6,7,8]]]),r(n.OrangeBird,525,"Orange Bird",[[o.Episode.II,[6,7,9,17]]]),r(n.Saw,527,"Saw",[[o.Episode.II,[5,6,7,8,9,10,11,16,17]]]),r(n.LaserDetect,528,"Laser Detect",[[o.Episode.II,[5,6,7,8,9,10,11,16,17]]]),r(n.UnknownItem529,529,"Unknown Item (529)",[[o.Episode.II,[5,6,7]],[o.Episode.IV,[6,7,8]]]),r(n.UnknownItem530,530,"Unknown Item (530)",[[o.Episode.II,[5,6,7,8,9,17]]]),r(n.Seagull,531,"Seagull",[[o.Episode.II,[6,7,8,9,16]],[o.Episode.IV,[6,7,8]]]),r(n.Fish,544,"Fish",[[o.Episode.I,[15]],[o.Episode.II,[6,9,10,11,16]]]),r(n.SeabedDoorWithBlueEdges,545,"Seabed Door (with blue edges)",[[o.Episode.II,[10,11]]]),r(n.SeabedDoorAlwaysOpenNonTriggerable,546,"Seabed door (always open, non-triggerable)",[[o.Episode.II,[10,11]]]),r(n.LittleCryotube,547,"Little Cryotube",[[o.Episode.II,[10,11,17]]]),r(n.WideGlassWallBreakable,548,"Wide Glass Wall (breakable)",[[o.Episode.II,[10,11]]]),r(n.BlueFloatingRobot,549,"Blue floating robot",[[o.Episode.II,[10,11]]]),r(n.RedFloatingRobot,550,"Red floating robot",[[o.Episode.II,[10,11]]]),r(n.Dolphin,551,"Dolphin",[[o.Episode.II,[10,11]]]),r(n.CaptureTrap,552,"Capture Trap",[[o.Episode.II,[5,6,7,8,9,10,11,16,17]]]),r(n.VRLink,553,"VR link",[[o.Episode.II,[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]]]),r(n.UnknownItem576,576,"Unknown Item (576)",[[o.Episode.II,[12]]]),r(n.WarpInBarbaRayRoom,640,"Warp in Barba Ray Room",[[o.Episode.II,[14]]]),r(n.UnknownItem672,672,"Unknown Item (672)",[[o.Episode.II,[15]]]),r(n.GeeNest,688,"Gee Nest",[[o.Episode.I,[8,9,10]],[o.Episode.II,[5,6,7,8,9,16,17]],[o.Episode.IV,[6,7,8]]]),r(n.LabComputerConsole,689,"Lab Computer Console",[[o.Episode.II,[0]]]),r(n.LabComputerConsoleGreenScreen,690,"Lab Computer Console (Green Screen)",[[o.Episode.II,[0]]]),r(n.ChairYellowPillow,691,"Chair, Yellow Pillow",[[o.Episode.II,[0]]]),r(n.OrangeWallWithHoleInMiddle,692,"orange wall with hole in middle",[[o.Episode.II,[0]]]),r(n.GreyWallWithHoleInMiddle,693,"grey wall with hole in middle",[[o.Episode.II,[0]]]),r(n.LongTable,694,"long table",[[o.Episode.II,[0]]]),r(n.GBAStation,695,"GBA Station",[]),r(n.TalkLinkToSupport,696,"Talk (link to support)",[[o.Episode.I,[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]],[o.Episode.II,[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8,0]]]),r(n.InstaWarp,697,"insta-warp",[[o.Episode.I,[0,1,2,3,4,5,6,7,11,12,13,14,16,17]],[o.Episode.II,[0,1,2,3,4,5,6,7,8,9,10,11,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8,9,0]]]),r(n.LabInvisibleObject,698,"Lab Invisible Object",[[o.Episode.I,[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]],[o.Episode.II,[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]],[o.Episode.IV,[1,2,3,4,5,6,7,8,0]]]),r(n.LabGlassWindowDoor,699,"Lab Glass window Door",[[o.Episode.II,[0]]]),r(n.UnknownItem700,700,"Unknown Item (700)",[[o.Episode.II,[13]]]),r(n.LabCeilingWarp,701,"Lab Ceiling Warp",[[o.Episode.II,[0]]]),r(n.Ep4LightSource,768,"Ep4 Light Source",[[o.Episode.IV,[1,2,3,4,5,6,7,8,9]]]),r(n.Cacti,769,"cacti",[[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.BigBrownRock,770,"Big Brown Rock",[[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.BreakableBrownRock,771,"Breakable Brown Rock",[[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.UnknownItem832,832,"Unknown Item (832)",[]),r(n.UnknownItem833,833,"Unknown Item (833)",[]),r(n.PoisonPlant,896,"Poison Plant",[[o.Episode.IV,[6,7,8]]]),r(n.UnknownItem897,897,"Unknown Item (897)",[[o.Episode.IV,[6,7,8]]]),r(n.UnknownItem898,898,"Unknown Item (898)",[[o.Episode.IV,[6,7,8]]]),r(n.OozingDesertPlant,899,"Oozing Desert Plant",[[o.Episode.IV,[6,7,8]]]),r(n.UnknownItem901,901,"Unknown Item (901)",[[o.Episode.IV,[6,7,8]]]),r(n.BigBlackRocks,902,"big black rocks",[[o.Episode.IV,[1,2,3,4,5,6,7,8]]]),r(n.UnknownItem903,903,"Unknown Item (903)",[[o.Episode.IV,[6,7,8]]]),r(n.UnknownItem904,904,"Unknown Item (904)",[[o.Episode.IV,[6,7,8]]]),r(n.UnknownItem905,905,"Unknown Item (905)",[]),r(n.UnknownItem906,906,"Unknown Item (906)",[]),r(n.FallingRock,907,"Falling Rock",[[o.Episode.IV,[6,7,8]]]),r(n.DesertPlantHasCollision,908,"Desert Plant (has collision)",[[o.Episode.IV,[6,7,8]]]),r(n.DesertFixedTypeBoxBreakableCrystals,909,"Desert Fixed Type Box (Breakable Crystals)",[[o.Episode.IV,[6,7,8]]]),r(n.UnknownItem910,910,"Unknown Item (910)",[]),r(n.BeeHive,911,"Bee Hive",[[o.Episode.IV,[6,7,8]]]),r(n.UnknownItem912,912,"Unknown Item (912)",[[o.Episode.IV,[6,7,8]]]),r(n.Heat,913,"Heat",[[o.Episode.IV,[6,7,8]]]),r(n.TopOfSaintMillionEgg,960,"Top of saint million egg",[[o.Episode.IV,[9]]]),r(n.UnknownItem961,961,"Unknown Item (961)",[[o.Episode.IV,[9]]]),Object.freeze(t.OBJECT_TYPES),Object.freeze(s)},"/7QA":function(e,t,i){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=i("1Qg8");i("8UJ8");const s=i("LvDl"),r=o(i("GGSb"));function a(e){const t=e;"historyUndo"!==t.inputType&&"historyRedo"!==t.inputType||e.preventDefault()}function d(e){const t=e;t.ctrlKey&&!t.altKey&&"Z"===t.key.toUpperCase()&&t.preventDefault()}function l(e){e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="none")}function _(e){l(e)}function u(e){l(e)}i("XtFL"),i("tjRy"),i("3oCa"),i("OP0w"),r.default.useDefaults({defaultLevel:r.default.WARN}),function(){document.addEventListener("beforeinput",a),document.addEventListener("keydown",d),document.addEventListener("dragenter",l),document.addEventListener("dragover",_),document.addEventListener("drop",u);const e=new n.ApplicationView,t=s.throttle(()=>{e.resize(window.innerWidth,window.innerHeight)},100,{leading:!0,trailing:!0});t(),document.body.append(e.element),window.addEventListener("resize",t)}()},"/Wax":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("9dYx");class n extends o.AbstractWritableCursor{constructor(e,t,i=0,o=e.size-i){if(i<0||i>e.size)throw new Error(`Offset ${i} is out of bounds.`);if(o<0||i+o>e.size)throw new Error(`Size ${o} is out of bounds.`);super(t,i),this.buffer=e,this._size=o}get size(){return this._size}set size(e){e>this._size?this.ensure_size(e-this._size):this._size=e}get backing_buffer(){return this.buffer.backing_buffer}get dv(){return this.buffer.view}take(e){this.check_size("size",e,e);const t=this.offset+this.position,i=new n(this.buffer,this.endianness,t,e);return this._position+=e,i}ensure_size(e){const t=this.position+e-this._size;t>0&&(this._size+=t,this.buffer.sizethis.val=e.value)}bind_bi(e){const t=this.bind_to(e),i=e.bind_to(this);return{dispose(){t.dispose(),i.dispose()}}}}},"0Xme":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("sDu+"),n=i("FXpb"),s=i("jJhE");i("x1yY");const r=i("4VsB");t.Input=class extends o.LabelledControl{constructor(e,t,i,o,s){super(s),this.element=n.el.span({class:`${t} core_Input`}),this._value=new r.WidgetProperty(this,e,this.set_value),this.value=this._value,this.input_element=n.create_element("input",{class:`${o} core_Input_inner`}),this.input_element.type=i,this.input_element.onchange=()=>{this._value.set_val(this.get_value(),{silent:!1})},this.element.append(this.input_element)}set_enabled(e){super.set_enabled(e),this.input_element.disabled=!e}set_attr(e,t,i){if(null==t)return;const o=this.input_element,n=i||(e=>e);s.is_any_property(t)?(o[e]=n(t.val),this.disposable(t.observe(({value:t})=>o[e]=n(t)))):o[e]=n(t)}}},"1Qg8":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("yxQK"),n=i("49yP"),s=i("FXpb"),r=i("nN8q");class a extends r.ResizableWidget{constructor(){super(),this.menu_view=this.disposable(new o.NavigationView),this.main_content_view=this.disposable(new n.MainContentView),this.element=s.el.div({class:"application_ApplicationView"},this.menu_view.element,this.main_content_view.element),this.element.id="root",this.finalize_construction(a.prototype)}resize(e,t){return super.resize(e,t),this.main_content_view.resize(e,t-this.menu_view.height),this}}t.ApplicationView=a},"1aHr":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("w6HN"),n=i("6cU9"),s=i("KVVN"),r=i("c5EP"),a=i("n5fr"),d=i("sv1z"),l=i("ouMO"),_=i("FXpb"),u=i("r+6V"),c=i("xs7i"),p=i("4Mnx"),v=i("4SjJ");class h extends o.ToolBar{constructor(){const e=new u.DropDown("New quest",[c.Episode.I],e=>`Episode ${c.Episode[e]}`,{icon_left:_.Icon.NewFile}),t=new n.FileButton("Open file...",{icon_left:_.Icon.File,accept:".qst",tooltip:"Open a quest file (Ctrl-O)"}),i=new s.Button("Save as...",{icon_left:_.Icon.Save,tooltip:"Save this quest to new file (Ctrl-Shift-S)"}),o=new s.Button("Undo",{icon_left:_.Icon.Undo,tooltip:a.undo_manager.first_undo.map(e=>(e?`Undo "${e.description}"`:"Nothing to undo")+" (Ctrl-Z)")}),w=new s.Button("Redo",{icon_left:_.Icon.Redo,tooltip:a.undo_manager.first_redo.map(e=>(e?`Redo "${e.description}"`:"Nothing to redo")+" (Ctrl-Shift-Z)")}),f=new d.Select(r.quest_editor_store.current_quest.flat_map(e=>e?l.list_property(void 0,...p.area_store.get_areas_for_episode(e.episode)):l.list_property()),e=>{const t=r.quest_editor_store.current_quest.val;if(t){const i=t.entities_per_area.val.get(e.id);return e.name+(i?` (${i})`:"")}return e.name});super({children:[e,t,i,o,w,f]});const E=r.quest_editor_store.current_quest.map(e=>null!=e);this.disposables(e.chosen.observe(({value:e})=>r.quest_editor_store.new_quest(e)),t.files.observe(({value:e})=>{e.length&&r.quest_editor_store.open_file(e[0])}),i.enabled.bind_to(E),i.click.observe(r.quest_editor_store.save_as),o.enabled.bind_to(a.undo_manager.can_undo),o.click.observe(()=>a.undo_manager.undo()),w.enabled.bind_to(a.undo_manager.can_redo),w.click.observe(()=>a.undo_manager.redo()),f.enabled.bind_to(E),f.selected.bind_to(r.quest_editor_store.current_area),f.selected.observe(({value:e})=>r.quest_editor_store.set_current_area(e)),v.gui_store.on_global_keydown(v.GuiTool.QuestEditor,"Ctrl-O",()=>t.click()),v.gui_store.on_global_keydown(v.GuiTool.QuestEditor,"Ctrl-Shift-S",r.quest_editor_store.save_as),v.gui_store.on_global_keydown(v.GuiTool.QuestEditor,"Ctrl-Z",()=>{a.undo_manager.undo()}),v.gui_store.on_global_keydown(v.GuiTool.QuestEditor,"Ctrl-Shift-Z",()=>{a.undo_manager.redo()})),this.finalize_construction(h.prototype)}}t.QuestEditorToolBar=h},"1vWm":function(e,t,i){"use strict";var o=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))((function(n,s){function r(e){try{d(o.next(e))}catch(e){s(e)}}function a(e){try{d(o.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}d((o=o.apply(e,t||[])).next())}))},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=i("nN8q"),r=i("FXpb"),a=i("1aHr"),d=n(i("xGNL")),l=i("zBQr"),_=i("q1Dg");i("88+i"),i("UrNz");const u=i("xyE7"),c=i("W7aE"),p=i("DUCy"),v=i("Yq7v"),h=i("4SjJ"),w=i("c5EP"),f=i("B2O0"),E=i("Jo0o"),m=i("GGSb").get("quest_editor/gui/QuestEditorView"),O=new Map([[_.QuestInfoView,"quest_info"],[u.NpcCountsView,"npc_counts"],[c.QuestRendererView,"quest_renderer"],[p.AsmEditorView,"asm_editor"],[v.EntityInfoView,"entity_info"],[f.NpcListView,"npc_list_view"],[E.ObjectListView,"object_list_view"]]),g={settings:{showPopoutIcon:!1,showMaximiseIcon:!1},dimensions:{headerHeight:24},labels:{close:"Close",maximise:"Maximise",minimise:"Minimise",popout:"Open in new window"}},y=[{type:"row",content:[{type:"stack",width:3,content:[{title:"Info",type:"component",componentName:O.get(_.QuestInfoView),isClosable:!1},{title:"NPC Counts",type:"component",componentName:O.get(u.NpcCountsView),isClosable:!1}]},{type:"stack",width:9,content:[{title:"3D View",type:"component",componentName:O.get(c.QuestRendererView),isClosable:!1},{title:"Script",type:"component",componentName:O.get(p.AsmEditorView),isClosable:!1}]},{type:"stack",width:2,content:[{title:"Entity",type:"component",componentName:O.get(v.EntityInfoView),isClosable:!1},{title:"NPCs",type:"component",componentName:O.get(f.NpcListView),isClosable:!1},{title:"Objects",type:"component",componentName:O.get(E.ObjectListView),isClosable:!1}]}]}];class b extends s.ResizableWidget{constructor(){super(),this.element=r.el.div({class:"quest_editor_QuestEditorView"}),this.tool_bar_view=this.disposable(new a.QuestEditorToolBar),this.layout_element=r.create_element("div",{class:"quest_editor_gl_container"}),this.sub_views=new Map,this.element.append(this.tool_bar_view.element,this.layout_element),this.layout=this.init_golden_layout(),this.disposables(h.gui_store.on_global_keydown(h.GuiTool.QuestEditor,"Ctrl-Alt-D",()=>w.quest_editor_store.debug.val=!w.quest_editor_store.debug.val)),this.finalize_construction(b.prototype)}resize(e,t){super.resize(e,t);const i=Math.max(0,t-this.tool_bar_view.height);return this.layout_element.style.width=`${e}px`,this.layout_element.style.height=`${i}px`,this.layout.then(t=>t.updateSize(e,i)),this}dispose(){super.dispose(),this.layout.then(e=>e.destroy());for(const e of this.sub_views.values())e.dispose();this.sub_views.clear()}init_golden_layout(){return o(this,void 0,void 0,(function*(){const e=yield l.quest_editor_ui_persister.load_layout_config([...O.values()],y);try{return this.attempt_gl_init(Object.assign(Object.assign({},g),{content:e}))}catch(e){return m.warn("Couldn't instantiate golden layout with persisted layout.",e),this.attempt_gl_init(Object.assign(Object.assign({},g),{content:y}))}}))}attempt_gl_init(e){const t=new d.default(e,this.layout_element),i=this;try{for(const[e,o]of O)t.registerComponent(o,(function(t){const n=new e;t.on("close",()=>n.dispose()),t.on("resize",()=>n.resize(t.width,t.height-4)),n.resize(t.width,t.height),i.sub_views.set(o,n),t.getElement().append(n.element)}));return t.on("stateChanged",()=>{this.layout&&l.quest_editor_ui_persister.persist_layout_config(t.toConfig().content)}),t.on("stackCreated",e=>{e.on("activeContentItemChanged",e=>{if("componentName"in e.config){const t=this.sub_views.get(e.config.componentName);t&&t.focus()}})}),t.init(),t}catch(e){throw t.destroy(),e}}}t.QuestEditorView=b},"1z6m":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("TRid"),n=i("FXpb"),s=i("4SjJ");i("Rbar");class r extends o.Widget{constructor(e,t){super(),this.element=n.el.span({class:"application_NavigationButton"}),this.input=n.create_element("input"),this.label=n.create_element("label");const i=s.GuiTool[e];this.input.type="radio",this.input.name="application_NavigationButton",this.input.value=i,this.input.id=`application_NavigationButton_${i}`,this.label.append(t),this.label.htmlFor=`application_NavigationButton_${i}`,this.element.append(this.input,this.label),this.finalize_construction(r.prototype)}set checked(e){this.input.checked=e}}t.NavigationButton=r},"22Lq":function(e,t,i){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=i("ouMO"),s=i("hUhj"),r=i("jJhE"),a=i("oxtq"),d=o(i("GGSb")).default.get("core/observable/property/list/SimpleListProperty");t.SimpleListProperty=class extends s.AbstractProperty{constructor(e,...t){super(),this.is_list_property=!0,this._length=n.property(0),this.value_observers=[],this.list_observers=[],this.length=this._length,this.values=t,this.extract_observables=e}get val(){return this.get_val()}set val(e){this.set_val(e)}get_val(){return this.values}set_val(e){const t=this.values.splice(0,this.values.length,...e);return this.finalize_update({type:a.ListChangeType.ListChange,index:0,removed:t,inserted:e}),t}observe_list(e){return 0===this.value_observers.length&&this.extract_observables&&this.replace_element_observers(0,1/0,this.values),this.list_observers.includes(e)||this.list_observers.push(e),{dispose:()=>{const t=this.list_observers.indexOf(e);if(-1!==t&&this.list_observers.splice(t,1),0===this.list_observers.length){for(const{disposables:e}of this.value_observers)for(const t of e)t.dispose();this.value_observers.splice(0,1/0)}}}}bind_to(e){return a.is_list_property(e)?(this.val=e.val,e.observe_list(e=>{e.type===a.ListChangeType.ListChange&&this.splice(e.index,e.removed.length,...e.inserted)})):(r.is_property(e)&&(this.val=e.val),e.observe(({value:e})=>this.set_val(e)))}bind_bi(e){const t=this.bind_to(e),i=e.bind_to(this);return{dispose(){t.dispose(),i.dispose()}}}update(e){this.splice(0,this.values.length,...e(this.values))}get(e){return this.values[e]}set(e,t){const i=[this.values[e]];this.values[e]=t,this.finalize_update({type:a.ListChangeType.ListChange,index:e,removed:i,inserted:[t]})}push(...e){const t=this.values.length;return this.values.push(...e),this.finalize_update({type:a.ListChangeType.ListChange,index:t,removed:[],inserted:e}),this.length.val}remove(...e){for(const t of e){const e=this.values.indexOf(t);this.values.splice(e,1),this.finalize_update({type:a.ListChangeType.ListChange,index:e,removed:[t],inserted:[]})}}clear(){const e=this.values.splice(0,this.values.length);this.finalize_update({type:a.ListChangeType.ListChange,index:0,removed:e,inserted:[]})}splice(e,t,...i){let o;return o=null==t?this.values.splice(e):this.values.splice(e,t,...i),this.finalize_update({type:a.ListChangeType.ListChange,index:e,removed:o,inserted:i}),o}sort(e){this.values.sort(e),this.finalize_update({type:a.ListChangeType.ListChange,index:0,removed:this.values,inserted:this.values})}finalize_update(e){this.list_observers.length&&this.extract_observables&&e.type===a.ListChangeType.ListChange&&this.replace_element_observers(e.index,e.removed.length,e.inserted);const t=this._length.val;this._length.set_val(this.values.length,{silent:!0});for(const t of this.list_observers)this.call_list_observer(t,e);this.emit(this.values),this._length.set_val(t,{silent:!0}),this._length.set_val(this.values.length,{silent:!1})}call_list_observer(e,t){try{e(t)}catch(e){d.error("Observer threw error.",e)}}replace_element_observers(e,t,i){let o=e;const n=this.value_observers.splice(e,t,...i.map(e=>{const t={index:o,disposables:this.extract_observables(e).map(i=>i.observe(()=>{this.finalize_update({type:a.ListChangeType.ValueChange,updated:[e],index:t.index})}))};return o++,t}));for(const{disposables:e}of n)for(const t of e)t.dispose();const s=i.length-t;for(;o{this.disposed||(this.view=this.disposable(e),this.view.resize(this.width,this.height),this.element.append(e.element))})),this.finalize_construction(s.prototype)}resize(e,t){return super.resize(e,t),this.view&&this.view.resize(e,t),this}}t.LazyWidget=s},"3AeF":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("x4IQ");t.EditLongDescriptionAction=class extends o.QuestEditAction{constructor(){super(...arguments),this.description="Edit long description"}undo(){this.quest.set_long_description(this.old)}redo(){this.quest.set_long_description(this.new)}}},"3CEK":function(e,t,i){"use strict";var o=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))((function(n,s){function r(e){try{d(o.next(e))}catch(e){s(e)}}function a(e){try{d(o.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}d((o=o.apply(e,t||[])).next())}))},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=n(i("GGSb")),r=i("Womt"),a=i("4vnR"),d=i("aEXR"),l=i("Tpfs"),_=i("xpi7"),u=i("c5EP"),c=i("oxtq"),p=i("yQqj"),v=s.default.get("quest_editor/rendering/QuestModelManager"),h=new r.Vector3(0,800,700),w=new r.Vector3(0,0,0),f=new r.Object3D;t.QuestModelManager=class{constructor(e){this.renderer=e,this.disposer=new l.Disposer,this.quest_disposer=this.disposer.add(new l.Disposer),this.quest_or_area_changed=()=>o(this,void 0,void 0,(function*(){const e=u.quest_editor_store.current_quest.val,t=u.quest_editor_store.current_area.val;yield this.area_model_manager.load(e,t),e===u.quest_editor_store.current_quest.val&&t===u.quest_editor_store.current_area.val&&(this.quest_disposer.dispose_all(),this.npc_model_manager.remove_all(),this.object_model_manager.remove_all(),this.renderer.reset_entity_models(),e&&t&&(this.npc_model_manager.add(e.npcs.val.filter(e=>e.area_id===t.id)),this.object_model_manager.add(e.objects.val.filter(e=>e.area_id===t.id)),this.quest_disposer.add_all(e.npcs.observe_list(this.npcs_changed),e.objects.observe_list(this.objects_changed))))})),this.npcs_changed=e=>{const t=u.quest_editor_store.current_area.val;e.type===c.ListChangeType.ListChange&&t&&(this.npc_model_manager.remove(e.removed),this.npc_model_manager.add(e.inserted.filter(e=>e.area_id===t.id)))},this.objects_changed=e=>{const t=u.quest_editor_store.current_area.val;e.type===c.ListChangeType.ListChange&&t&&(this.object_model_manager.remove(e.removed),this.object_model_manager.add(e.inserted.filter(e=>e.area_id===t.id)))},this.area_model_manager=new E(this.renderer),this.npc_model_manager=new m(this.renderer),this.object_model_manager=new m(this.renderer),this.disposer.add_all(u.quest_editor_store.current_quest.observe(this.quest_or_area_changed),u.quest_editor_store.current_area.observe(this.quest_or_area_changed))}dispose(){this.disposer.dispose()}};class E{constructor(e){this.renderer=e,this.raycaster=new r.Raycaster,this.origin=new r.Vector3,this.down=new r.Vector3(0,-1,0),this.up=new r.Vector3(0,1,0)}load(e,t){return o(this,void 0,void 0,(function*(){if(this.quest=e,this.area=t,!e||!t)return this.renderer.collision_geometry=f,void(this.renderer.render_geometry=f);try{const i=e.area_variants.val.find(e=>e.area.id===t.id)||t.area_variants[0],o=e.episode,n=yield d.load_area_collision_geometry(o,i);if(this.should_cancel(e,t))return;const s=yield d.load_area_render_geometry(o,i);if(this.should_cancel(e,t))return;this.add_sections_to_collision_geometry(n,s),this.renderer.collision_geometry=n,this.renderer.render_geometry=s,this.renderer.reset_camera(h,w)}catch(i){v.error(`Couldn't load area models for quest ${e.id}, ${t.name}.`,i),this.renderer.collision_geometry=f,this.renderer.render_geometry=f}}))}should_cancel(e,t){return this.quest!==e||this.area!==t}add_sections_to_collision_geometry(e,t){for(const i of e.children){i.geometry.boundingBox.getCenter(this.origin),this.raycaster.set(this.origin,this.down);const e=this.raycaster.intersectObject(t,!0).find(e=>null!=e.object.userData.section);this.raycaster.set(this.origin,this.up);const o=this.raycaster.intersectObject(t,!0).find(e=>null!=e.object.userData.section);let n;if(n=e&&o?e.distance<=o.distance?e:o:e||o){const e=i.userData,t=n.object.userData;e.section=t.section}}}}class m{constructor(e){this.renderer=e,this.queue=[],this.loaded_entities=[],this.loading=!1}add(e){return o(this,void 0,void 0,(function*(){if(this.queue.push(...e),!this.loading)try{for(this.loading=!0;this.queue.length;){const e=this.queue[0];try{yield this.load(e)}catch(t){v.error(`Couldn't load model for entity ${p.entity_type_to_string(e.type)}.`,t)}finally{const t=this.queue.indexOf(e);-1!==t&&this.queue.splice(t,1)}}}finally{this.loading=!1}}))}remove(e){for(const t of e){const e=this.queue.indexOf(t);-1!==e&&this.queue.splice(e,1);const i=this.loaded_entities.findIndex(e=>e.entity===t);if(-1!==i){const e=this.loaded_entities.splice(i,1)[0];this.renderer.remove_entity_model(e.entity),e.disposer.dispose()}}}remove_all(){for(const{disposer:e}of this.loaded_entities)e.dispose();this.loaded_entities.splice(0,1/0),this.queue.splice(0,1/0)}load(e){return o(this,void 0,void 0,(function*(){const t=yield a.load_entity_geometry(e.type),i=yield a.load_entity_textures(e.type),o=_.create_entity_mesh(e,t,i);this.queue.includes(e)&&this.update_entity_geometry(e,o)}))}update_entity_geometry(e,t){this.renderer.add_entity_model(t),this.loaded_entities.push({entity:e,disposer:new l.Disposer(e.world_position.observe(({value:e})=>{t.position.copy(e),this.renderer.schedule_render()}),e.world_rotation.observe(({value:e})=>{t.rotation.copy(e),this.renderer.schedule_render()}))})}}},"3ONQ":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("yQqj"),n=i("FXpb"),s=i("Womt");let r=void 0;const a=new Map,d=new s.Vector2(0,0);let l=0;function _(e){e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="none"),r&&(r.drag_element.style.transform=`translate(${e.clientX-d.x}px, ${e.clientY-d.y}px)`)}function u(){r&&(r.drag_element.remove(),r=void 0)}t.add_entity_dnd_listener=function(e,t,i){function o(e){r&&i(Object.assign(Object.assign({},r),{event:e}))}a.set(i,o),e.addEventListener(t,o)},t.remove_entity_dnd_listener=function(e,t,i){const o=a.get(i);o&&(a.delete(i),e.removeEventListener(t,o))},t.entity_dnd_source=function(e,t){function i(e){if(e.target instanceof HTMLElement){const i=t(e.target);i?(d.set(e.offsetX,e.offsetY),(r={drag_element:i[0],entity_type:i[1]}).drag_element.style.position="fixed",r.drag_element.style.pointerEvents="none",r.drag_element.style.zIndex="500",r.drag_element.style.top="0",r.drag_element.style.left="0",r.drag_element.style.transform=`translate(${e.clientX-d.x}px, ${e.clientY-d.y}px)`,document.body.append(r.drag_element),e.dataTransfer&&(e.dataTransfer.effectAllowed="copy",e.dataTransfer.setDragImage(n.el.div(),0,0),e.dataTransfer.setData("phantasmal-entity",o.entity_data(r.entity_type).name))):e.preventDefault()}}return e.addEventListener("dragstart",i),1==++l&&(document.addEventListener("dragover",_),document.addEventListener("dragend",u)),{dispose(){e.removeEventListener("dragstart",i),0==--l&&(document.removeEventListener("dragover",_),document.removeEventListener("dragend",u))}}}},"4/Uj":function(e,t,i){"use strict";var o=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))((function(n,s){function r(e){try{d(o.next(e))}catch(e){s(e)}}function a(e){try{d(o.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}d((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const n=i("ouMO"),s=i("yub1"),r=i("Sa3/"),a=i("NRxM"),d=i("bcBH"),l=i("GGSb").get("viewer/stores/TextureStore");class _{constructor(){this._current_xvm=n.property(void 0),this.current_xvm=this._current_xvm,this.load_file=e=>o(this,void 0,void 0,(function*(){try{const t=yield r.read_file(e);this._current_xvm.val=s.parse_xvm(new a.ArrayBufferCursor(t,d.Endianness.Little))}catch(e){l.error("Couldn't read file.",e)}}))}}t.TextureStore=_,t.texture_store=new _},"469Q":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("Womt"),n=i("Ftn7"),s=i("Tpfs"),r=i("iR5r"),a=i("4/Uj"),d=i("GGSb").get("viewer/rendering/TextureRenderer");t.TextureRenderer=class extends n.Renderer{constructor(){super(),this.disposer=new s.Disposer,this.quad_meshes=[],this.camera=new o.OrthographicCamera(-400,400,300,-300,1,10),this.disposer.add_all(a.texture_store.current_xvm.observe(({value:e})=>{this.scene.remove(...this.quad_meshes),e&&this.render_textures(e),this.reset_camera(new o.Vector3(0,0,5),new o.Vector3),this.schedule_render()})),this.init_camera_controls(),this.controls.dollySpeed=-1,this.controls.azimuthRotateSpeed=0,this.controls.polarRotateSpeed=0}set_size(e,t){this.camera.left=-Math.floor(e/2),this.camera.right=Math.ceil(e/2),this.camera.top=Math.floor(t/2),this.camera.bottom=-Math.ceil(t/2),this.camera.updateProjectionMatrix(),super.set_size(e,t)}dispose(){super.dispose(),this.disposer.dispose()}render_textures(e){let t=10*(e.textures.length-1),i=0;for(const o of e.textures)t+=o.width,i=Math.max(i,o.height);let n=-Math.floor(t/2);const s=-Math.floor(i/2);for(const t of e.textures){let e;try{e=r.xvm_texture_to_texture(t)}catch(e){d.warn("Couldn't convert XVM texture.",e)}const a=new o.Mesh(this.create_quad(n,s+Math.floor((i-t.height)/2),t.width,t.height),e?new o.MeshBasicMaterial({map:e,transparent:!0}):new o.MeshBasicMaterial({color:16711935}));this.quad_meshes.push(a),this.scene.add(a),n+=10+t.width}}create_quad(e,t,i,n){const s=new o.PlaneGeometry(i,n,1,1);return s.faceVertexUvs=[[[new o.Vector2(0,0),new o.Vector2(0,1),new o.Vector2(1,0)],[new o.Vector2(0,1),new o.Vector2(1,1),new o.Vector2(1,0)]]],s.translate(e+i/2,t+n/2,-5),s}}},"488w":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("Womt"),n=i("tRdk"),s=i("kwt4"),r=i("vM2b"),a=new o.Vector3(0,1,0),d=new o.Vector2(0,0),l=new o.Vector3(0,0,0),_=new o.Quaternion(0,0,0,1),u=new o.Vector3(1,1,1);t.ninja_object_to_geometry_builder=function(e,t){new p(t).to_geometry_builder(e)},t.ninja_object_to_buffer_geometry=function(e){return new p(new r.GeometryBuilder).create_buffer_geometry(e)};class c{constructor(){this.vertices_stack=[]}put(e){this.vertices_stack.push(e)}get(e){const t=[];for(let i=this.vertices_stack.length-1;i>=0;i--){const o=this.vertices_stack[i][e];o&&t.push(o)}return t}}class p{constructor(e){this.vertices=new c,this.bone_id=0,this.builder=e}to_geometry_builder(e){this.object_to_geometry(e,void 0,new o.Matrix4)}create_buffer_geometry(e){return this.to_geometry_builder(e),this.builder.build()}object_to_geometry(e,t,i){const{no_translate:s,no_rotate:r,no_scale:a,hidden:d,break_child_trace:c,zxy_rotation_order:p,skip:v}=e.evaluation_flags,{position:h,rotation:w,scale:f}=e,E=new o.Euler(w.x,w.y,w.z,p?"ZXY":"ZYX"),m=(new o.Matrix4).compose(s?l:n.vec3_to_threejs(h),r?_:(new o.Quaternion).setFromEuler(E),a?u:n.vec3_to_threejs(f)).premultiply(i);let O;if(v?O=t:((O=new o.Bone).name=this.bone_id.toString(),O.position.set(h.x,h.y,h.z),O.setRotationFromEuler(E),O.scale.set(f.x,f.y,f.z),this.builder.add_bone(O),t&&t.add(O)),e.model&&!d&&this.model_to_geometry(e.model,m),this.bone_id++,!c)for(const t of e.children)this.object_to_geometry(t,O,m)}model_to_geometry(e,t){s.is_njcm_model(e)?this.njcm_model_to_geometry(e,t):this.xj_model_to_geometry(e,t)}njcm_model_to_geometry(e,t){const i=(new o.Matrix3).getNormalMatrix(t),s=e.vertices.map(e=>{const s=n.vec3_to_threejs(e.position),r=e.normal?n.vec3_to_threejs(e.normal):new o.Vector3(0,1,0);return s.applyMatrix4(t),r.applyMatrix3(i),{bone_id:this.bone_id,position:s,normal:r,bone_weight:e.bone_weight,bone_weight_status:e.bone_weight_status,calc_continue:e.calc_continue}});this.vertices.put(s);for(const t of e.meshes){const e=this.builder.index_count;for(let e=0;e=2&&(e%2==(t.clockwise_winding?1:0)?(this.builder.add_index(r-2),this.builder.add_index(r-1),this.builder.add_index(r)):(this.builder.add_index(r-2),this.builder.add_index(r),this.builder.add_index(r-1)));const l=[[0,0],[0,0],[0,0],[0,0]];for(let e=o.length-1;e>=0;e--){const t=o[e];l[t.bone_weight_status]=[t.bone_id,t.bone_weight]}for(const[e,t]of l)this.builder.add_bone_weight(e,t)}}this.builder.add_group(e,this.builder.index_count-e,t.texture_id)}}xj_model_to_geometry(e,t){const i=this.builder.vertex_count,s=(new o.Matrix3).getNormalMatrix(t);for(let{position:i,normal:r,uv:a}of e.vertices){const e=n.vec3_to_threejs(i).applyMatrix4(t),l=(r?n.vec3_to_threejs(r):new o.Vector3(0,1,0)).applyMatrix3(s),_=a||d;this.builder.add_vertex(e,l,_)}let r;for(const t of e.meshes){const e=this.builder.index_count;let o=!1;for(let e=2;e=2&&(o=!o),o?(this.builder.add_index(s),this.builder.add_index(n),this.builder.add_index(r)):(this.builder.add_index(n),this.builder.add_index(s),this.builder.add_index(r)),o=!o}null!=t.material_properties.texture_id&&(r=t.material_properties.texture_id),this.builder.add_group(e,this.builder.index_count-e,r)}}}},"49yP":function(e,t,i){"use strict";var o=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))((function(n,s){function r(e){try{d(o.next(e))}catch(e){s(e)}}function a(e){try{d(o.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}d((o=o.apply(e,t||[])).next())}))},n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const s=i("FXpb"),r=i("4SjJ"),a=i("39ZU"),d=i("nN8q"),l=[[r.GuiTool.Viewer,()=>o(void 0,void 0,void 0,(function*(){return new((yield Promise.resolve().then(()=>n(i("vsj6")))).ViewerView)}))],[r.GuiTool.QuestEditor,()=>o(void 0,void 0,void 0,(function*(){return new((yield Promise.resolve().then(()=>n(i("1vWm")))).QuestEditorView)}))],[r.GuiTool.HuntOptimizer,()=>o(void 0,void 0,void 0,(function*(){return new((yield Promise.resolve().then(()=>n(i("LkpO")))).HuntOptimizerView)}))]];class _ extends d.ResizableWidget{constructor(){super(),this.element=s.el.div({class:"application_MainContentView"}),this.tool_views=new Map(l.map(([e,t])=>[e,this.disposable(new a.LazyWidget(t))])),this.tool_changed=({value:e})=>{for(const e of this.tool_views.values())e.visible.val=!1;const t=this.tool_views.get(e);t&&(t.visible.val=!0)};for(const e of this.tool_views.values())this.element.append(e.element);const e=this.tool_views.get(r.gui_store.tool.val);e&&(e.visible.val=!0),this.disposable(r.gui_store.tool.observe(this.tool_changed)),this.finalize_construction(_.prototype)}resize(e,t){super.resize(e,t);for(const i of this.tool_views.values())i.resize(e,t);return this}}t.MainContentView=_},"4Mnx":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("lPzw"),n=i("bJO5"),s=i("xs7i"),r=i("aEXR"),a=i("SoCI");t.area_store=new class{constructor(){this.areas=[],this.get_areas_for_episode=e=>this.areas[e],this.get_area=(e,t)=>{const i=this.areas[e].find(e=>e.id===t);if(!i)throw new Error(`Area id ${t} for episode ${e} is invalid.`);return i},this.get_variant=(e,t,i)=>{const o=this.get_area(e,t).area_variants[i];if(!o)throw new Error(`Area variant id ${i} for area ${t} of episode ${e} is invalid.`);return o},this.get_area_sections=(e,t)=>r.load_area_sections(e,t);for(const e of s.EPISODES)this.areas[e]=a.get_areas_for_episode(e).map(e=>{const t=new o.AreaModel(e.id,e.name,e.order,[]);for(const i of e.area_variants)t.area_variants.push(new n.AreaVariantModel(i.id,t));return t})}}},"4SjJ":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("ouMO"),n=i("nsCy");var s;!function(e){e[e.Viewer=0]="Viewer",e[e.QuestEditor=1]="QuestEditor",e[e.HuntOptimizer=2]="HuntOptimizer"}(s=t.GuiTool||(t.GuiTool={}));const r=new Map([[s.Viewer,"viewer"],[s.QuestEditor,"quest_editor"],[s.HuntOptimizer,"hunt_optimizer"]]),a=new Map([...r.entries()].map(([e,t])=>[t,e]));t.gui_store=new class{constructor(){this.tool=o.property(s.Viewer),this._server=o.property(n.Server.Ephinea),this.hash_disposer=this.tool.observe(({value:e})=>{window.location.hash=`#/${function(e){const t=r.get(e);if(t)return t;throw new Error(`To string not implemented for ${s[e]}.`)}(e)}`}),this.global_keydown_handlers=new Map,this.dispatch_global_keydown=e=>{const t=[];e.ctrlKey&&t.push("Ctrl"),e.shiftKey&&t.push("Shift"),e.altKey&&t.push("Alt"),t.push(e.key.toUpperCase());const i=t.join("-"),o=this.global_keydown_handlers.get(this.handler_key(this.tool.val,i));o&&(e.preventDefault(),o(e))};const e=window.location.hash.slice(2);this.tool.val=function(e){return a.get(e)}(e)||s.Viewer,this.server=this._server,window.addEventListener("keydown",this.dispatch_global_keydown)}dispose(){this.hash_disposer.dispose(),this.global_keydown_handlers.clear(),window.removeEventListener("keydown",this.dispatch_global_keydown)}on_global_keydown(e,t,i){const o=this.handler_key(e,t);return this.global_keydown_handlers.set(o,i),{dispose:()=>{this.global_keydown_handlers.delete(o)}}}handler_key(e,t){return`${s[e]} -> ${t}`}}},"4VsB":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("0CzU");t.WidgetProperty=class extends o.SimpleProperty{constructor(e,t,i){super(t),this.widget=e,this.set_value=i}set_val(e,t){this.set_value.call(this.widget,e),super.set_val(e,Object.assign({silent:!0},t))}}},"4mUz":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parse_rel=function(e,t){e.seek_end(32);const i=e.u32(),o=e.u32();e.seek(8);const n=e.u32();return e.seek_start(i),{data_offset:n,index:t?function(e,t){const i=e.u16_array(t),o=[];let n=0;for(const t of i){n+=4*t,e.seek_start(n-4);const i=e.u32(),s=e.u32();o.push({offset:s,size:i})}return o}(e,o):[]}}},"4s8/":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.ValueSet=class{constructor(){this.intervals=[]}size(){return this.intervals.reduce((e,t)=>e+t.end-t.start+1,0)}get(e){for(const{start:t,end:i}of this.intervals){const o=i-t+1;if(ethis.intervals[o].start;)e.end=this.intervals[o].end,o++;this.intervals.splice(t+1,o-t-1),e.end=Math.max(e.end,i.end),t++;continue e}t++}this.intervals.push(i)}return this}to_array(){let e=[];for(const{start:t,end:i}of this.intervals)for(let o=t;o<=i;o++)e.push(o);return e}[Symbol.iterator](){const e=this;let t=0,i=NaN;return{next(){let o=!0;return te.intervals[t].end?++te(m)),g=[],y=new Promise(e=>e(g)),b=new a.LoadingCache,D=new a.LoadingCache;for(const e of[w.NpcType.Unknown,w.NpcType.Migium,w.NpcType.Hidoom,w.NpcType.DeathGunner,w.NpcType.StRappy,w.NpcType.HalloRappy,w.NpcType.EggRappy,w.NpcType.Migium2,w.NpcType.Hidoom2,w.NpcType.Recon,h.ObjectType.Unknown,h.ObjectType.PlayerSet,h.ObjectType.Particle,h.ObjectType.LightCollision,h.ObjectType.EnvSound,h.ObjectType.FogCollision,h.ObjectType.EventCollision,h.ObjectType.CharaCollision,h.ObjectType.ObjRoomID,h.ObjectType.LensFlare,h.ObjectType.ScriptCollision,h.ObjectType.MapCollision,h.ObjectType.ScriptCollisionA,h.ObjectType.ItemLight,h.ObjectType.RadarCollision,h.ObjectType.FogCollisionSW,h.ObjectType.ImageBoard,h.ObjectType.UnknownItem29,h.ObjectType.UnknownItem30,h.ObjectType.UnknownItem31,h.ObjectType.MenuActivation,h.ObjectType.BoxDetectObject,h.ObjectType.SymbolChatObject,h.ObjectType.TouchPlateObject,h.ObjectType.TargetableObject,h.ObjectType.EffectObject,h.ObjectType.CountDownObject,h.ObjectType.UnknownItem38,h.ObjectType.UnknownItem39,h.ObjectType.UnknownItem40,h.ObjectType.UnknownItem41,h.ObjectType.TelepipeLocation,h.ObjectType.BGMCollision,h.ObjectType.Pioneer2InvisibleTouchplate,h.ObjectType.TempleMapDetect,h.ObjectType.Firework,h.ObjectType.MainRagolTeleporterBattleInNextArea,h.ObjectType.Rainbow,h.ObjectType.FloatingBlueLight,h.ObjectType.PopupTrapNoTech,h.ObjectType.Poison,h.ObjectType.EnemyTypeBoxYellow,h.ObjectType.EnemyTypeBoxBlue,h.ObjectType.EmptyTypeBoxBlue,h.ObjectType.FloatingRocks,h.ObjectType.FloatingSoul,h.ObjectType.Butterfly,h.ObjectType.UnknownItem400,h.ObjectType.CCAAreaTeleporter,h.ObjectType.UnknownItem523,h.ObjectType.WhiteBird,h.ObjectType.OrangeBird,h.ObjectType.UnknownItem529,h.ObjectType.UnknownItem530,h.ObjectType.Seagull,h.ObjectType.UnknownItem576,h.ObjectType.WarpInBarbaRayRoom,h.ObjectType.UnknownItem672,h.ObjectType.InstaWarp,h.ObjectType.LabInvisibleObject,h.ObjectType.UnknownItem700])b.set(e,O),D.set(e,y);function P(e,t){return o(this,void 0,void 0,(function*(){const i=function e(t,i){if(f.is_npc_type(t))switch(t){case w.NpcType.Dubswitch:return`/npcs/${w.NpcType[t]}.${i===T.Geometry?"xj":"xvm"}`;case w.NpcType.Hildebear2:return e(w.NpcType.Hildebear,i);case w.NpcType.Hildeblue2:return e(w.NpcType.Hildeblue,i);case w.NpcType.RagRappy2:return e(w.NpcType.RagRappy,i);case w.NpcType.Monest2:return e(w.NpcType.Monest,i);case w.NpcType.Mothmant2:return e(w.NpcType.Mothmant,i);case w.NpcType.PoisonLily2:return e(w.NpcType.PoisonLily,i);case w.NpcType.NarLily2:return e(w.NpcType.NarLily,i);case w.NpcType.GrassAssassin2:return e(w.NpcType.GrassAssassin,i);case w.NpcType.Dimenian2:return e(w.NpcType.Dimenian,i);case w.NpcType.LaDimenian2:return e(w.NpcType.LaDimenian,i);case w.NpcType.SoDimenian2:return e(w.NpcType.SoDimenian,i);case w.NpcType.DarkBelra2:return e(w.NpcType.DarkBelra,i);case w.NpcType.SavageWolf2:return e(w.NpcType.SavageWolf,i);case w.NpcType.BarbarousWolf2:return e(w.NpcType.BarbarousWolf,i);case w.NpcType.PanArms2:return e(w.NpcType.PanArms,i);case w.NpcType.Dubchic2:return e(w.NpcType.Dubchic,i);case w.NpcType.Gilchic2:return e(w.NpcType.Gilchic,i);case w.NpcType.Garanz2:return e(w.NpcType.Garanz,i);case w.NpcType.Dubswitch2:return e(w.NpcType.Dubswitch,i);case w.NpcType.Delsaber2:return e(w.NpcType.Delsaber,i);case w.NpcType.ChaosSorcerer2:return e(w.NpcType.ChaosSorcerer,i);default:return`/npcs/${w.NpcType[t]}.${i===T.Geometry?"nj":"xvm"}`}else{if(i!==T.Geometry)return`/objects/${h.object_data(t).pso_id}.xvm`;switch(t){case h.ObjectType.EasterEgg:case h.ObjectType.ChristmasTree:case h.ObjectType.ChristmasWreath:case h.ObjectType.TwentyFirstCentury:case h.ObjectType.Sonic:case h.ObjectType.WelcomeBoard:case h.ObjectType.FloatingJellyfish:case h.ObjectType.RuinsSeal:case h.ObjectType.Dolphin:case h.ObjectType.Cacti:case h.ObjectType.BigBrownRock:case h.ObjectType.PoisonPlant:case h.ObjectType.BigBlackRocks:case h.ObjectType.FallingRock:case h.ObjectType.DesertFixedTypeBoxBreakableCrystals:case h.ObjectType.BeeHive:return`/objects/${h.object_data(t).pso_id}.nj`;default:return`/objects/${h.object_data(t).pso_id}.xj`}}}(e,t);return{url:i,data:yield v.load_array_buffer(i)}}))}var T;t.load_entity_geometry=function(e){return o(this,void 0,void 0,(function*(){return b.get_or_set(e,()=>o(this,void 0,void 0,(function*(){try{const{url:t,data:i}=yield P(e,T.Geometry),o=new l.ArrayBufferCursor(i,d.Endianness.Little),n=t.endsWith(".nj")?u.parse_nj(o):u.parse_xj(o);return n.length?_.ninja_object_to_buffer_geometry(n[0]):(E.warn(`Couldn't parse ${t} for ${f.entity_type_to_string(e)}.`),m)}catch(t){return E.warn(`Couldn't load geometry file for ${f.entity_type_to_string(e)}.`,t),m}})))}))},t.load_entity_textures=function(e){return o(this,void 0,void 0,(function*(){return D.get_or_set(e,()=>o(this,void 0,void 0,(function*(){try{const{data:t}=yield P(e,T.Texture),i=new l.ArrayBufferCursor(t,d.Endianness.Little),o=c.parse_xvm(i);return p.xvm_to_textures(o)}catch(t){return E.warn(`Couldn't load texture file for ${f.entity_type_to_string(e)}.`,t),g}})))}))},t.load_entity_data=P,function(e){e[e.Geometry=0]="Geometry",e[e.Texture=1]="Texture"}(T||(T={}))},"52VV":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("+LO4"),n=i("nEgy");class s extends o.AbstractMinimalProperty{constructor(e,t){super(),this.dependency=e,this.f=t}get val(){return this.get_val()}get_val(){return this.computed_property?this.computed_property.val:this.f(this.dependency.val).val}observe(e){const t=super.observe(e);return null==this.dependency_disposable&&(this.dependency_disposable=this.dependency.observe(()=>{const e=this.val;this.compute_and_observe(),this.emit(e)}),this.compute_and_observe()),this.emit(this.get_val()),{dispose:()=>{t.dispose(),0===this.observers.length&&(this.dependency_disposable.dispose(),this.dependency_disposable=void 0,this.computed_disposable.dispose(),this.computed_disposable=void 0,this.computed_property=void 0)}}}map(e){return new n.DependentProperty([this],()=>e(this.val))}flat_map(e){return new s(this,t=>e(t))}compute_and_observe(){this.computed_disposable&&this.computed_disposable.dispose(),this.computed_property=this.f(this.dependency.val);let e=this.computed_property.val;this.computed_disposable=this.computed_property.observe(()=>{const t=e;e=this.val,this.emit(t)})}}t.FlatMappedProperty=s},"5aKR":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("TRid"),n=i("FXpb"),s=i("7ZX1");i("+BDF");class r extends o.Widget{constructor(e){super(),this.element=n.el.div({class:"quest_editor_DisabledView"}),this.label=this.disposable(new s.Label(e,{enabled:!1})),this.element.append(this.label.element),this.finalize_construction(r.prototype)}}t.DisabledView=r},"6WXA":function(e,t,i){"use strict";var o=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))((function(n,s){function r(e){try{d(o.next(e))}catch(e){s(e)}}function a(e){try{d(o.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}d((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const n=i("4SjJ"),s=i("LvDl"),r=i("M/y3");t.ServerMap=class{constructor(e){this.get_value=s.memoize(e)}get current(){return this._current||(this._current=n.gui_store.server.map(e=>this.get(e))),this._current}get(e){return this.get_value(e)}observe_current(e,t){const i=r.sequential(({value:t})=>o(this,void 0,void 0,(function*(){return e(yield t)})));return this.current.observe(i,t)}}},"6cU9":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("FXpb");i("+Mcu"),i("Tp1L");const n=i("ouMO"),s=i("QmPX");class r extends s.Control{constructor(e,t){super(t),this.element=o.create_element("label",{class:"core_FileButton core_Button"}),this.input=o.create_element("input",{class:"core_FileButton_input core_Button_inner"}),this._files=n.property([]),this.files=this._files,this.input.type="file",this.input.onchange=()=>{this.input.files&&this.input.files.length?this._files.val=[...this.input.files]:this._files.val=[]},t&&t.accept&&(this.input.accept=t.accept);const i=o.el.span({class:"core_FileButton_inner core_Button_inner"});t&&null!=t.icon_left&&i.append(o.el.span({class:"core_FileButton_left core_Button_left"},o.icon(t.icon_left))),i.append(o.el.span({class:"core_Button_center",text:e})),this.element.append(i,this.input),this.disposables(this.enabled.observe(({value:e})=>{this.input.disabled=!e,e?this.element.classList.remove("disabled"):this.element.classList.add("disabled")})),this.finalize_construction(r.prototype)}click(){this.input.click()}}t.FileButton=r},"70mo":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("ouMO"),n=i("Ts/k"),s=i("n5fr"),r=i("GGSb").get("core/undo/UndoStack");t.UndoStack=class{constructor(){this.stack=o.list_property(),this.index=o.property(0),this.can_undo=this.index.map(e=>e>0),this.can_redo=o.map((e,t)=>te?this.stack.get(this.index.val-1):void 0),this.first_redo=this.can_redo.map(e=>e?this.stack.get(this.index.val):void 0),this.undoing_or_redoing=!1}make_current(){s.undo_manager.current.val=this}ensure_not_current(){s.undo_manager.current.val===this&&(s.undo_manager.current.val=n.NOOP_UNDO)}push(e){return this.undoing_or_redoing||(this.stack.splice(this.index.val,1/0,e),this.index.update(e=>e+1)),e}pop(){return this.index.update(e=>e-1),this.stack.splice(this.index.val,1)[0]}undo(){if(this.can_undo.val&&!this.undoing_or_redoing){try{this.undoing_or_redoing=!0,this.index.update(e=>e-1),this.stack.get(this.index.val).undo()}catch(e){r.warn("Error while undoing action.",e)}finally{this.undoing_or_redoing=!1}return!0}return!1}redo(){if(this.can_redo.val&&!this.undoing_or_redoing){try{this.undoing_or_redoing=!0,this.stack.get(this.index.val).redo(),this.index.update(e=>e+1)}catch(e){r.warn("Error while redoing action.",e)}finally{this.undoing_or_redoing=!1}return!0}return!1}reset(){this.stack.clear(),this.index.val=0}}},"7CyS":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("Womt"),n=i("VwSi");t.PSO_FRAME_RATE=30,t.create_animation_clip=function(e,i){const s=i.interpolation===n.NjInterpolation.Spline?o.InterpolateSmooth:o.InterpolateLinear,r=[];return i.motion_data.forEach((i,a)=>{const d=e.get_bone(a);d&&i.tracks.forEach(({type:e,keyframes:i})=>{const l=[],_=[];for(const s of i)if(l.push(s.frame/t.PSO_FRAME_RATE),e===n.NjKeyframeTrackType.Rotation){const e=d.evaluation_flags.zxy_rotation_order?"ZXY":"ZYX",t=(new o.Quaternion).setFromEuler(new o.Euler(s.value.x,s.value.y,s.value.z,e));_.push(t.x,t.y,t.z,t.w)}else _.push(s.value.x,s.value.y,s.value.z);if(e===n.NjKeyframeTrackType.Rotation)r.push(new o.QuaternionKeyframeTrack(`.bones[${a}].quaternion`,l,_,s));else{const t=e===n.NjKeyframeTrackType.Position?`.bones[${a}].position`:`.bones[${a}].scale`;r.push(new o.VectorKeyframeTrack(t,l,_,s))}})}),new o.AnimationClip("Animation",(i.frame_count-1)/t.PSO_FRAME_RATE,r).optimize()}},"7ZX1":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("TRid"),n=i("FXpb");i("ku4b");const s=i("4VsB");class r extends o.Widget{constructor(e,t){super(t),this.element=n.create_element("label",{class:"core_Label"}),this._text=new s.WidgetProperty(this,"",this.set_text),this.text=this._text,"string"==typeof e?this.set_text(e):this.disposable(this._text.bind_to(e)),this.finalize_construction(r.prototype)}set for(e){this.element.htmlFor=e}set_text(e){this.element.textContent=e}}t.Label=r},"8hIv":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=new DataView(new ArrayBuffer(4));t.reinterpret_i32_as_f32=function(e){return o.setInt32(0,e),o.getFloat32(0)},t.reinterpret_f32_as_i32=function(e){return o.setFloat32(0,e),o.getInt32(0)}},"9Onn":function(e,t,i){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=o(i("GGSb")).default.get("data_formats/parsing/ninja/njcm");var s;function r(e,t,i){const o=[];let l=!0;for(;l;){const _=e.u8(),u=e.u8(),c=e.position;let p=0;if(0===_)o.push({type:s.Null,type_id:_});else if(1<=_&&_<=3)o.push({type:s.Bits,type_id:_});else if(4===_){const i=u,n=e.position;o.push({type:s.CachePolygonList,type_id:_,cache_index:i,offset:n}),t[i]=n,l=!1}else if(5===_){const n=u,a=t[n];null!=a&&(e.seek_start(a),o.push(...r(e,t,i))),o.push({type:s.DrawPolygonList,type_id:_,cache_index:n})}else if(8<=_&&_<=9){p=2;const t=e.u16();o.push({type:s.Tiny,type_id:_,flip_u:0!=(128&_),flip_v:0!=(64&_),clamp_u:0!=(32&_),clamp_v:0!=(16&_),mipmap_d_adjust:15&_,filter_mode:t>>>14,super_sample:0!=(64&t),texture_id:8191&t})}else 17<=_&&_<=31?(p=2+2*e.u16(),o.push({type:s.Material,type_id:_})):32<=_&&_<=50?(p=2+4*e.u16(),o.push({type:s.Vertex,type_id:_,vertices:a(e,_,u)})):56<=_&&_<=58?(p=2+2*e.u16(),o.push({type:s.Volume,type_id:_})):64<=_&&_<=75?(p=2+2*e.u16(),o.push({type:s.Strip,type_id:_,triangle_strips:d(e,_,u)})):255===_?(p=i?2:0,o.push({type:s.End,type_id:_}),l=!1):(p=2+2*e.u16(),o.push({type:s.Unknown,type_id:_}),n.warn(`Unknown chunk type ${_} at offset ${c}.`));e.seek_start(c+p)}return o}function a(e,t,i){if(t<32||t>50)return n.warn(`Unknown vertex chunk type ${t}.`),[];const o=3&i,s=0!=(128&i),r=e.u16(),a=e.u16(),d=[];for(let i=0;i=42&&(44===t?(n.index=r+e.u16(),n.bone_weight=e.u16()/255):e.seek(4));else if(48<=t&&t<=50){const i=e.u32();n.normal={x:(i>>20&1023)/1023,y:(i>>10&1023)/1023,z:(1023&i)/1023},t>=49&&e.seek(4)}d.push(n)}return d}function d(e,t,i){const o={ignore_light:0!=(1&i),ignore_specular:0!=(2&i),ignore_ambient:0!=(4&i),use_alpha:0!=(8&i),double_side:0!=(16&i),flat_shading:0!=(32&i),environment_mapping:0!=(64&i)},n=e.u16(),s=n>>>14,r=16383&n;let a=!1,d=!1,l=!1,_=!1;switch(t){case 64:break;case 65:case 66:a=!0;break;case 67:l=!0;break;case 68:case 69:a=!0,l=!0;break;case 70:d=!0;break;case 71:case 72:a=!0,d=!0;break;case 73:break;case 74:case 75:_=!0;break;default:throw new Error(`Unexpected chunk type ID: ${t}.`)}const u=[];for(let t=0;t=2&&e.seek(2*s)}u.push(Object.assign(Object.assign({},o),{clockwise_winding:i,has_tex_coords:a,has_normal:l,vertices:r}))}return u}!function(e){e[e.Unknown=0]="Unknown",e[e.Null=1]="Null",e[e.Bits=2]="Bits",e[e.CachePolygonList=3]="CachePolygonList",e[e.DrawPolygonList=4]="DrawPolygonList",e[e.Tiny=5]="Tiny",e[e.Material=6]="Material",e[e.Vertex=7]="Vertex",e[e.Volume=8]="Volume",e[e.Strip=9]="Strip",e[e.End=10]="End"}(s||(s={})),t.parse_njcm_model=function(e,t){const i=e.u32(),o=e.u32(),n=e.vec3_f32(),a=e.f32(),d=[],l=[];if(i){e.seek_start(i);for(const i of r(e,t,!0))if(i.type===s.Vertex)for(const e of i.vertices)d[e.index]={position:e.position,normal:e.normal,bone_weight:e.bone_weight,bone_weight_status:e.bone_weight_status,calc_continue:e.calc_continue}}if(o){e.seek_start(o);let i=void 0;for(const o of r(e,t,!1))if(o.type===s.Tiny)i=o.texture_id;else if(o.type===s.Strip){for(const e of o.triangle_strips)e.texture_id=i;l.push(...o.triangle_strips)}}return{type:"njcm",vertices:d,meshes:l,collision_sphere_center:n,collision_sphere_radius:a}}},"9Ykw":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parse_iff=function(e){const t=[];for(;e.bytes_left;){const i=e.u32(),o=e.u32();if(o>e.bytes_left)break;t.push({type:i,data:e.take(o)})}return t}},"9dYx":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("GuD3");t.AbstractWritableCursor=class extends o.AbstractCursor{write_u8(e){return this.ensure_size(1),this.dv.setUint8(this._position++,e),this}write_u16(e){return this.ensure_size(2),this.dv.setUint16(this.position,e,this.little_endian),this._position+=2,this}write_u32(e){return this.ensure_size(4),this.dv.setUint32(this.position,e,this.little_endian),this._position+=4,this}write_i8(e){return this.ensure_size(1),this.dv.setInt8(this.position,e),this._position+=1,this}write_i16(e){return this.ensure_size(2),this.dv.setInt16(this.position,e,this.little_endian),this._position+=2,this}write_i32(e){return this.ensure_size(4),this.dv.setInt32(this.position,e,this.little_endian),this._position+=4,this}write_f32(e){return this.ensure_size(4),this.dv.setFloat32(this.position,e,this.little_endian),this._position+=4,this}write_u8_array(e){return this.ensure_size(e.length),new Uint8Array(this.backing_buffer,this.offset+this.position).set(new Uint8Array(e)),this._position+=e.length,this}write_u16_array(e){this.ensure_size(2*e.length);const t=e.length;for(let i=0;ithis.bytes_left)throw new Error(`${e} Bytes required but only ${this.bytes_left} available.`)}}},"9fJw":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.CharacterClassModel=class{constructor(e,t,i,o){this.name=e,this.head_style_count=t,this.hair_styles_count=i,this.hair_styles_with_accessory=o}}},"AF+w":function(e,t,i){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=o(i("GGSb")),s=i("bcBH"),r=i("NRxM"),a=i("/Wax"),d=i("tjEv"),l=n.default.get("core/data_formats/parsing/quest/qst");function _(e,t,i,o){e.write_u8_array([28,4,19,0]),e.write_u8(i),e.write_u8_array([0,0,0]),e.write_string_ascii(o,16);const n=Math.min(1024,t.bytes_left);e.write_cursor(t.take(n));for(let t=n;t<1024;++t)e.write_u8(0);return e.write_u32(n),e.write_u32(0),t.bytes_left>0}t.parse_qst=function(e){let t="PC";const i=e.u8();e.seek(1);const o=e.u8();if(68===i?t="Dreamcast/GameCube":88===i?68===o&&(t="Blue Burst"):166===i&&(t="Dreamcast download"),"Blue Burst"===t){e.seek_start(0);const i=function(e){const t=[];let i,o;for(let n=0;n<4;++n){e.seek(4);const n=e.u16();e.seek(38);const s=e.string_ascii(16,!0,!0),r=e.u32(),a=e.string_ascii(24,!0,!0);if(null!=i&&null!=o&&(n!==i||s.slice(0,5)!==o.slice(0,5))){e.seek(-88);break}i=n,o=s,t.push({quest_id:n,file_name:s,file_name_2:a,size:r})}return t}(e),o=function(e,t){const i=new Map;for(;e.bytes_left>=1056;){const o=e.position,n=e.seek(4).u8(),r=e.seek(3).string_ascii(16,!0,!0);let _=i.get(r);if(!_){const e=t.get(r);i.set(r,_={name:r,expected_size:e,cursor:new a.ResizableBufferCursor(new d.ResizableBuffer(e||10240),s.Endianness.Little),chunk_nos:new Set})}_.chunk_nos.has(n)?l.warn(`File chunk number ${n} of file ${r} was already encountered, overwriting previous chunk.`):_.chunk_nos.add(n);let u=e.seek(1024).u32();e.seek(-1028),u>1024&&(l.warn(`Data segment size of ${u} is larger than expected maximum size, reading just 1024 bytes.`),u=1024);const c=e.take(u),p=1024*n;if(_.cursor.size=Math.max(p+u,_.cursor.size),_.cursor.seek_start(p).write_cursor(c),e.seek(1032-c.size),e.position!==o+1056)throw new Error(`Read ${e.position-o} file chunk message bytes instead of expected 1056.`)}e.bytes_left&&l.warn(`${e.bytes_left} Bytes left in file.`);for(const e of i.values()){e.cursor.seek_start(0),e.chunk_nos=new Set(Array.from(e.chunk_nos.values()).sort((e,t)=>e-t)),null!=e.expected_size&&e.cursor.size!==e.expected_size&&l.warn(`File ${e.name} has an actual size of ${e.cursor.size} instead of the expected size ${e.expected_size}.`);const t=Math.max(e.cursor.size,e.expected_size||0);for(let i=0;i[e.file_name,e.size])));for(const e of o){const t=i.find(t=>t.file_name===e.name);t&&(e.id=t.quest_id,e.name_2=t.file_name_2)}return{version:t,files:o}}l.error(`Can't parse ${t} QST files.`)},t.write_qst=function(e){const t=e.files,i=t.map(e=>88+1056*Math.ceil(e.data.byteLength/1024)).reduce((e,t)=>e+t),o=new ArrayBuffer(i),n=new r.ArrayBufferCursor(o,s.Endianness.Little);if(function(e,t){for(const i of t){if(i.name.length>15)throw new Error(`File ${i.name} has a name longer than 15 characters.`);e.write_u16(88),e.write_u16(68),e.write_u16(i.id||0);for(let t=0;t<38;++t)e.write_u8(0);let t;if(e.write_string_ascii(i.name,16),e.write_u32(i.data.byteLength),null==i.name_2){const e=i.name.lastIndexOf(".");t=-1===e?i.name+"_j":i.name.slice(0,e)+"_j"+i.name.slice(e)}else t=i.name_2;if(t.length>24)throw Error(`File ${i.name} has a file_name_2 length (${t}) longer than 24 characters.`);e.write_string_ascii(t,24)}}(n,t),function(e,t){const i=t.map(e=>({no:0,data:new r.ArrayBufferCursor(e.data,s.Endianness.Little),name:e.name}));let o=0;for(;oe.value);break;case o.Opcode.CALL:case o.Opcode.VA_CALL:_=n.Call,u=[l.args[0].value];break;case o.Opcode.SWITCH_CALL:_=n.Call,u=l.args.slice(1).map(e=>e.value);break;default:if(d===i-1){_=n.None,u=[];break}continue}const c=new s(t,r,d+1,_,u);for(let t=c.start;t{const e=s.quest_editor_store.current_quest.val,t=s.quest_editor_store.current_area.val,i=e?e.episode:r.Episode.I,o=t?t.id:0;this.entities.val=n.NPC_TYPES.filter(e=>{const t=n.npc_data(e);return(null==t.episode||t.episode===i)&&t.area_ids.includes(o)})},this.disposables(s.quest_editor_store.current_quest.observe(this.filter_npcs),s.quest_editor_store.current_area.observe(this.filter_npcs)),this.filter_npcs(),this.finalize_construction(a.prototype)}}t.NpcListView=a},CUby:function(e,t,i){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=o(i("GGSb")),s=i("ZPAt"),r=i("4s8/"),a=n.default.get("quest_editor/scripting/data_flow_analysis/register_value");t.MIN_REGISTER_VALUE=s.MIN_SIGNED_DWORD_VALUE,t.MAX_REGISTER_VALUE=s.MAX_SIGNED_DWORD_VALUE,t.REGISTER_VALUES=Math.pow(2,32),t.register_value=function(e,i,o){const n=e.get_block_for_instruction(i);return n?function e(i,o,n,d,l){if(++i.iterations>100)return a.warn("Too many iterations."),(new r.ValueSet).set_interval(t.MIN_REGISTER_VALUE,t.MAX_REGISTER_VALUE);for(let a=d-1;a>=n.start;a--){const d=n.segment.instructions[a],_=d.args;switch(d.opcode){case s.Opcode.LET:if(_[0].value===l)return e(i,new Set(o),n,a,_[1].value);break;case s.Opcode.LETI:case s.Opcode.LETB:case s.Opcode.LETW:case s.Opcode.SYNC_LETI:if(_[0].value===l)return(new r.ValueSet).set_value(_[1].value);break;case s.Opcode.SET:if(_[0].value===l)return(new r.ValueSet).set_value(1);break;case s.Opcode.CLEAR:if(_[0].value===l)return(new r.ValueSet).set_value(0);break;case s.Opcode.REV:if(_[0].value===l){const t=e(i,new Set(o),n,a,l),s=t.size();return 0===s||1===s&&0===t.get(0)?(new r.ValueSet).set_value(1):t.has(0)?(new r.ValueSet).set_interval(0,1):(new r.ValueSet).set_value(0)}break;case s.Opcode.ADDI:if(_[0].value===l){return e(i,new Set(o),n,a,l).scalar_add(_[1].value)}break;case s.Opcode.SUBI:if(_[0].value===l){return e(i,new Set(o),n,a,l).scalar_sub(_[1].value)}break;case s.Opcode.MULI:if(_[0].value===l){return e(i,new Set(o),n,a,l).scalar_mul(_[1].value)}break;case s.Opcode.DIVI:if(_[0].value===l){return e(i,new Set(o),n,a,l).scalar_div(_[1].value)}break;case s.Opcode.IF_ZONE_CLEAR:if(_[0].value===l)return(new r.ValueSet).set_interval(0,1);break;case s.Opcode.GET_DIFFLVL:if(_[0].value===l)return(new r.ValueSet).set_interval(0,2);break;case s.Opcode.GET_SLOTNUMBER:if(_[0].value===l)return(new r.ValueSet).set_interval(0,3);break;case s.Opcode.GET_RANDOM:if(_[1].value===l){const t=e(i,new Set(o),n,a,_[0].value).min()||0,s=Math.max(e(i,new Set(o),n,a,_[0].value+1).max()||0,t+1);return(new r.ValueSet).set_interval(t,s-1)}break;case s.Opcode.STACK_PUSHM:case s.Opcode.STACK_POPM:{const e=_[0].value,i=_[0].value+_[1].value;if(e<=l&&l{}),this.editor.addCommand(s.KeyMod.CtrlCmd|s.KeyMod.Shift|s.KeyCode.KEY_Z,()=>{}),this.disposables(r.asm_editor_store.did_undo.observe(({value:e})=>{this.editor.trigger(e,"undo",void 0)}),r.asm_editor_store.did_redo.observe(({value:e})=>{this.editor.trigger(e,"redo",void 0)}),r.asm_editor_store.model.observe(({value:e})=>{this.editor.updateOptions({readOnly:null==e}),this.editor.setModel(e||d)},{call_now:!0}),this.editor.onDidFocusEditorWidget(()=>r.asm_editor_store.undo.make_current())),this.finalize_construction(l.prototype)}focus(){this.editor.focus()}resize(e,t){const i=Math.max(0,t-this.tool_bar_view.height);return this.editor.layout({width:e,height:i}),this}}t.AsmEditorView=l},DixV:function(e,t,i){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=o(i("GGSb")),s=i("bcBH"),r=i("AU7j"),a=i("CUby"),d=i("JQxC"),l=i("lg9k"),_=i("ZPAt"),u=i("NRxM"),c=i("/Wax"),p=i("tjEv"),v=n.default.get("data_formats/parsing/quest/bin");class h{constructor(e,t,i,o,n,s,r){this.quest_id=e,this.language=t,this.quest_name=i,this.short_description=o,this.long_description=n,this.object_code=s,this.shop_items=r}}t.BinFile=h;const w=[];w[l.SegmentType.Instructions]=2,w[l.SegmentType.String]=1,w[l.SegmentType.Data]=0,t.parse_bin=function(e,t=[0],i=!1){const o=e.u32(),n=e.u32(),s=e.u32();e.seek(4);const d=e.u32(),u=e.u32(),c=e.string_utf16(64,!0,!0),p=e.string_utf16(256,!0,!0),w=e.string_utf16(576,!0,!0);s!==e.size&&v.warn(`Value ${s} in bin size field does not match actual size ${e.size}.`),e.seek(4);const g=e.u32_array(932),y=Math.floor((e.size-n)/4);e.seek_start(n);const b=e.i32_array(y),D=new f(b),P=function(e,t,i,o){const n=new Map;!function(e,t,i,o,n){let s;do{s=o.size;for(const[s,r]of i)m(o,t,e,s,r,n);const d=[...o.entries()].filter(([,e])=>e.type===l.SegmentType.Instructions).sort(([e],[t])=>e-t).map(([,e])=>e),u=r.ControlFlowGraph.create(d);i=new Map;for(const e of d)for(const t of e.instructions)for(let e=0;es)}(e,t,i.reduce((e,t)=>e.set(t,l.SegmentType.Instructions),new Map),n,o);const s=[];let d=0;for(;dd){s=e.offset;break}}if(e.seek_start(d),O(n,e,s,o||[]),i=n.get(d),s<=d){v.error(`Next offset ${s} was smaller than or equal to current offset ${d}.`);break}if(!i){v.error(`Couldn't create segment for offset ${d}.`);continue}}switch(s.push(i),i.type){case l.SegmentType.Instructions:for(const e of i.instructions)d+=e.size;break;case l.SegmentType.Data:d+=i.data.byteLength;break;case l.SegmentType.String:d+=4*Math.ceil((i.value.length+1)/2);break;default:throw new Error(`${l.SegmentType[i.type]} not implemented.`)}}for(const{label:e,offset:i}of t.labels){const t=n.get(i);t?t.labels.includes(e)||(t.labels.push(e),t.labels.sort((e,t)=>e-t)):v.warn(`Label ${e} with offset ${i} does not point to anything.`)}if(e.size!==d){const t=`Expected to parse ${e.size} bytes but parsed ${d} instead.`;if(!o)throw new Error(t);v.error(t)}return s}(e.seek_start(o).take(n-o),D,t,i);return new h(d,u,c,p,w,P,g)},t.write_bin=function(e){const t=new p.ResizableBuffer(4652+100*e.object_code.length),i=new c.ResizableBufferCursor(t,s.Endianness.Little);if(i.write_u32(4652),i.write_u32(0),i.write_u32(0),i.write_u32(4294967295),i.write_u32(e.quest_id),i.write_u32(e.language),i.write_string_utf16(e.quest_name,64),i.write_string_utf16(e.short_description,256),i.write_string_utf16(e.long_description,576),i.write_u32(0),e.shop_items.length>932)throw new Error(`shop_items can't be larger than 932, was ${e.shop_items.length}.`);i.write_u32_array(e.shop_items);for(let t=e.shop_items.length;t<932;t++)i.write_u32(0);for(;i.position<4652;)i.write_u8(0);const{size:o,label_offsets:n}=function(e,t){const i=e.position,o=[];for(const n of t){for(const t of n.labels)o[t]=e.position-i;if(n.type===l.SegmentType.Instructions)for(const t of n.instructions){const i=t.opcode;if(2===i.size&&e.write_u8(i.code>>>8),e.write_u8(255&i.code),i.stack!==_.StackInteraction.Pop)for(let o=0;o=0?e.write_u8(r.value):e.write_i8(r.value);break;case _.Kind.Word:r.value>=0?e.write_u16(r.value):e.write_i16(r.value);break;case _.Kind.DWord:r.value>=0?e.write_u32(r.value):e.write_i32(r.value);break;case _.Kind.Float:e.write_f32(r.value);break;case _.Kind.Label:case _.Kind.ILabel:case _.Kind.DLabel:case _.Kind.SLabel:e.write_u16(r.value);break;case _.Kind.String:e.write_string_utf16(r.value,r.size);break;case _.Kind.ILabelVar:e.write_u8(s.length),e.write_u16_array(s.map(e=>e.value));break;case _.Kind.RegRef:case _.Kind.RegTupRef:e.write_u8(r.value);break;case _.Kind.RegRefVar:e.write_u8(s.length),e.write_u8_array(s.map(e=>e.value));break;default:throw new Error(`Parameter type ${_.Kind[n.type.kind]} not implemented.`)}}}else if(n.type===l.SegmentType.String){const t=4*Math.ceil((n.value.length+1)/2);e.write_string_utf16(n.value,t)}else e.write_cursor(new u.ArrayBufferCursor(n.data,e.endianness))}return{size:e.position-i,label_offsets:o}}(i,e.object_code);for(let e=0;ee.offset-t.offset||e.label-t.label);for(let e=0;et.offset);e++)i=void 0;return{offset:t.offset,next:i}}}function E(e,t,i,o,n){if(i.opcode.stack===_.StackInteraction.Pop){const s=d.stack_value(e,i,i.opcode.params.length-o-1);if(s.size()<=10)for(const e of s){const i=t.get(e);(null==i||w[n]>w[i])&&t.set(e,n)}}else{const e=i.args[o].value,s=t.get(e);(null==s||w[n]>w[s])&&t.set(e,n)}}function m(e,t,i,o,n,s){try{const r=t.get_info(o);if(null==r)return void v.warn(`Label ${o} is not registered in the label table.`);let a,d=e.get(r.offset);if(d){if(d.labels.includes(o)||(d.labels.push(o),d.labels.sort((e,t)=>e-t)),!(w[n]>w[d.type]))return;a=d.labels}else a=[o];const u=r.next?r.next.offset:i.size;switch(i.seek_start(r.offset),n){case l.SegmentType.Instructions:!function(e,t,i,o,n,s,r){const a=[],d={type:l.SegmentType.Instructions,labels:n,instructions:a};e.set(i.position,d);for(;i.position=0;e--){const t=a[e].opcode;if(t===_.Opcode.RET||t===_.Opcode.JMP){o=!1;break}}o&&m(e,t,i,s,l.SegmentType.Instructions,r)}}(e,t,i,u,a,r.next&&r.next.label,s);break;case l.SegmentType.Data:O(e,i,u,a);break;case l.SegmentType.String:!function(e,t,i,o){const n=t.position,s={type:l.SegmentType.String,labels:o,value:t.string_utf16(i-n,!0,!0)};e.set(n,s)}(e,i,u,a);break;default:throw new Error(`Segment type ${l.SegmentType[n]} not implemented.`)}}catch(e){if(!s)throw e;v.error("Couldn't fully parse object code segment.",e)}}function O(e,t,i,o){const n=t.position,s={type:l.SegmentType.Data,labels:o,data:t.array_buffer(i-n)};e.set(n,s)}function g(e,t){const i=[];if(t.stack!==_.StackInteraction.Pop)for(const o of t.params)switch(o.type.kind){case _.Kind.Byte:i.push({value:e.u8(),size:1});break;case _.Kind.Word:i.push({value:e.u16(),size:2});break;case _.Kind.DWord:i.push({value:e.i32(),size:4});break;case _.Kind.Float:i.push({value:e.f32(),size:4});break;case _.Kind.Label:case _.Kind.ILabel:case _.Kind.DLabel:case _.Kind.SLabel:i.push({value:e.u16(),size:2});break;case _.Kind.String:{const t=e.position;i.push({value:e.string_utf16(Math.min(4096,e.bytes_left),!0,!1),size:e.position-t})}break;case _.Kind.ILabelVar:{const t=e.u8();i.push(...e.u16_array(t).map(e=>({value:e,size:2})))}break;case _.Kind.RegRef:case _.Kind.RegTupRef:i.push({value:e.u8(),size:1});break;case _.Kind.RegRefVar:{const t=e.u8();i.push(...e.u8_array(t).map(e=>({value:e,size:1})))}break;default:throw new Error(`Parameter type ${_.Kind[o.type.kind]} not implemented.`)}return i}},DuVK:function(e,t,i){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=o(i("GGSb")),s=i("LvDl"),r=i("bcBH"),a=i("/Wax"),d=i("tjEv"),l=n.default.get("data_formats/parsing/quest/dat"),_=68,u=72;t.parse_dat=function(e){const t=[],i=[],o=[];for(;e.bytes_left;){const n=e.u32(),s=e.u32(),r=e.u32(),a=e.u32();if(0===n)break;if(a!==s-16)throw Error(`Malformed DAT file. Expected an entities size of ${s-16}, got ${a}.`);if(1===n){const i=Math.floor(a/_),o=e.position;for(let o=0;oe+t.total_size,0)),n=new a.ResizableBufferCursor(o,r.Endianness.Little),l=s.groupBy(e,e=>e.area_id),c=Object.keys(l).map(e=>parseInt(e,10)).sort((e,t)=>e-t);for(const e of c){const t=l[e],i=t.length*_;n.write_u32(1),n.write_u32(i+16),n.write_u32(e),n.write_u32(i);for(const e of t){if(2!==e.unknown.length)throw new Error(`unknown should be of length 2, was ${e.unknown.length}`);if(n.write_u16(e.type_id),6!==e.unknown[0].length)throw new Error(`unknown[0] should be of length 6, was ${e.unknown[0].length}`);if(n.write_u8_array(e.unknown[0]),n.write_u16(e.id),n.write_u16(e.group_id),n.write_u16(e.section_id),2!==e.unknown[1].length)throw new Error(`unknown[1] should be of length 2, was ${e.unknown[1].length}`);if(n.write_u8_array(e.unknown[1]),n.write_vec3_f32(e.position),n.write_i32(Math.round(e.rotation.x/(2*Math.PI)*65535)),n.write_i32(Math.round(e.rotation.y/(2*Math.PI)*65535)),n.write_i32(Math.round(e.rotation.z/(2*Math.PI)*65535)),7!==e.properties.length)throw new Error(`properties should be of length 7, was ${e.properties.length}`);n.write_f32(e.properties[0]),n.write_f32(e.properties[1]),n.write_f32(e.properties[2]),n.write_u32(e.properties[3]),n.write_u32(e.properties[4]),n.write_u32(e.properties[5]),n.write_u32(e.properties[6])}}const p=s.groupBy(t,e=>e.area_id),v=Object.keys(p).map(e=>parseInt(e,10)).sort((e,t)=>e-t);for(const e of v){const t=p[e],i=t.length*u;n.write_u32(2),n.write_u32(i+16),n.write_u32(e),n.write_u32(i);for(const e of t){if(3!==e.unknown.length)throw new Error(`unknown should be of length 3, was ${e.unknown.length}`);if(n.write_u16(e.type_id),10!==e.unknown[0].length)throw new Error(`unknown[0] should be of length 10, was ${e.unknown[0].length}`);if(n.write_u8_array(e.unknown[0]),n.write_u16(e.section_id),6!==e.unknown[1].length)throw new Error(`unknown[1] should be of length 6, was ${e.unknown[1].length}`);if(n.write_u8_array(e.unknown[1]),n.write_vec3_f32(e.position),n.write_i32(Math.round(e.rotation.x/(2*Math.PI)*65535)),n.write_i32(Math.round(e.rotation.y/(2*Math.PI)*65535)),n.write_i32(Math.round(e.rotation.z/(2*Math.PI)*65535)),n.write_vec3_f32(e.scale),n.write_f32(e.npc_id),n.write_f32(e.script_label),n.write_u32(e.roaming),4!==e.unknown[2].length)throw new Error(`unknown[2] should be of length 4, was ${e.unknown[2].length}`);n.write_u8_array(e.unknown[2])}}for(const e of i)n.write_u32(e.entity_type),n.write_u32(e.total_size),n.write_u32(e.area_id),n.write_u32(e.entities_size),n.write_u8_array(e.data);return n.write_u32(0),n.write_u32(0),n.write_u32(0),n.write_u32(0),o}},"E/0a":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("0Xme");class n extends o.Input{constructor(e="",t){if(super(e,"core_TextInput","text","core_TextInput_inner",t),this.preferred_label_position="left",t){const{max_length:e}=t;this.set_attr("maxLength",e)}this.set_value(e),this.finalize_construction(n.prototype)}get_value(){return this.input_element.value}set_value(e){this.input_element.value=e}}t.TextInput=n},ETgL:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("sDu+"),n=i("FXpb");i("C5oP");const s=i("4VsB");class r extends o.LabelledControl{constructor(e="",t){super(t),this.element=n.el.div({class:"core_TextArea"}),this.preferred_label_position="left",this.text_element=n.el.textarea({class:"core_TextArea_inner"}),this._value=new s.WidgetProperty(this,"",this.set_value),t&&(null!=t.max_length&&(this.text_element.maxLength=t.max_length),null!=t.font_family&&(this.text_element.style.fontFamily=t.font_family),null!=t.rows&&(this.text_element.rows=t.rows),null!=t.cols&&(this.text_element.cols=t.cols)),this.value=this._value,this.set_value(e),this.text_element.onchange=()=>this._value.set_val(this.text_element.value,{silent:!1}),this.element.append(this.text_element),this.finalize_construction(r.prototype)}set_value(e){this.text_element.value=e}}t.TextArea=r},Eqai:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("Womt"),n=new o.MeshLambertMaterial({color:65280,side:o.DoubleSide}),s=new o.MeshLambertMaterial({color:16711935,side:o.DoubleSide}),r=new o.MeshLambertMaterial({skinning:!0,color:16711935,side:o.DoubleSide});function a(e,t,i,s){const{created_by_geometry_builder:r,normalized_material_indices:a,bones:d}=e.userData;let l;if(Array.isArray(t))if(r){l=[n];for(const[e,o]of a.entries())o>0&&(l[o]=t[e]||i)}else l=t;else l=t||i;const _=new s(e,l);return r&&d.length&&_ instanceof o.SkinnedMesh&&(_.add(d[0]),_.bind(new o.Skeleton(d))),_}t.create_mesh=function(e,t,i=s){return a(e,t,i,o.Mesh)},t.create_skinned_mesh=function(e,t,i=r){return a(e,t,i,o.SkinnedMesh)}},F0Xh:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("FXpb"),n=i("nN8q");i("bknw");class s extends n.ResizableWidget{constructor(){super(),this.element=o.el.div({class:"hunt_optimizer_HelpView"},o.el.p({text:"Add some items with the combo box on the left to see the optimal combination of hunt methods on the right."}),o.el.p({text:'At the moment a hunt method is simply a quest run-through. Partial quest run-throughs are coming. View the list of methods on the "Methods" tab. Each method takes a certain amount of time, which affects the optimization result. Make sure the times are correct for you.'}),o.el.p({text:"Only enemy drops are considered. Box drops are coming."}),o.el.p({text:"The optimal result is calculated using linear optimization. The optimizer takes into account rare enemies and the fact that pan arms can be split in two."})),this.finalize_construction(s.prototype)}}t.HelpView=s},FNQV:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("nN8q"),n=i("FXpb"),s=i("If1w");i("l8iQ");const r=i("WJtm");class a extends o.ResizableWidget{constructor(){super(),this.element=n.el.div({class:"hunt_optimizer_OptimizerView"}),this.element.append(this.disposable(new s.WantedItemsView).element,this.disposable(new r.OptimizationResultView).element),this.finalize_construction(a.prototype)}}t.OptimizerView=a},FXpb:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("jJhE"),n=i("nsCy"),s=i("oxtq"),r=i("Tpfs");function a(e,t,...i){const o=document.createElement(e);if(t){if(null!=t.class&&(o.className=t.class),null!=t.text&&(o.textContent=t.text),null!=t.title&&(o.title=t.title),null!=t.href&&(o.href=t.href),null!=t.src&&(o.src=t.src),null!=t.width&&(o.width=t.width),null!=t.height&&(o.height=t.height),null!=t.alt&&(o.alt=t.alt),t.data)for(const[e,i]of Object.entries(t.data))o.dataset[e]=i;null!=t.col_span&&(o.colSpan=t.col_span),null!=t.tab_index&&(o.tabIndex=t.tab_index)}return o.append(...i),o}var d;t.el={div:(e,...t)=>a("div",e,...t),span:(e,...t)=>a("span",e,...t),h2:(e,...t)=>a("h2",e,...t),p:(e,...t)=>a("p",e,...t),a:(e,...t)=>{const i=a("a",e,...t);return e&&e.href&&e.href.trimLeft().startsWith("http")&&(i.target="_blank",i.rel="noopener noreferrer"),i},img:(e,...t)=>a("img",e,...t),table:(e,...t)=>a("table",e,...t),thead:(e,...t)=>a("thead",e,...t),tbody:(e,...t)=>a("tbody",e,...t),tfoot:(e,...t)=>a("tfoot",e,...t),tr:(e,...t)=>a("tr",e,...t),th:(e,...t)=>a("th",e,...t),td:(e,...t)=>a("td",e,...t),button:(e,...t)=>a("button",e,...t),textarea:(e,...t)=>a("textarea",e,...t)},t.create_element=a,t.bind_hidden=function(e,t){return o.is_property(t)&&(e.hidden=t.val),t.observe(({value:t})=>e.hidden=t)},function(e){e[e.File=0]="File",e[e.NewFile=1]="NewFile",e[e.Save=2]="Save",e[e.TriangleUp=3]="TriangleUp",e[e.TriangleDown=4]="TriangleDown",e[e.Undo=5]="Undo",e[e.Redo=6]="Redo",e[e.Remove=7]="Remove",e[e.GitHub=8]="GitHub"}(d=t.Icon||(t.Icon={})),t.icon=function(e){let i;switch(e){case d.File:i="fas fa-file";break;case d.NewFile:i="fas fa-file-medical";break;case d.Save:i="fas fa-save";break;case d.TriangleUp:i="fas fa-caret-up";break;case d.TriangleDown:i="fas fa-caret-down";break;case d.Undo:i="fas fa-undo";break;case d.Redo:i="fas fa-redo";break;case d.Remove:i="fas fa-trash-alt";break;case d.GitHub:i="fab fa-github"}return t.el.span({class:i})},t.section_id_icon=function(e,i){const o=t.el.span(),s=i&&i.size;return o.style.display="inline-block",o.style.width=`${s}px`,o.style.height=`${s}px`,o.style.backgroundImage=`url(/assets/images/sectionids/${n.SectionId[e]}.png)`,o.style.backgroundSize=`${s}px`,o.title=n.SectionId[e],o},t.disposable_listener=function(e,t,i,o){return e.addEventListener(t,i,o),{dispose(){e.removeEventListener(t,i)}}},t.bind_children_to=function(e,t,i){const o=new r.Disposer,n=t.observe_list(e=>{e.type===s.ListChangeType.ListChange?a(e.index,e.removed.length,e.inserted):(e.type,s.ListChangeType.ValueChange)});function a(t,n,s){for(let i=0;i{const s=i(e,t+n);return Array.isArray(s)?(o.insert(t+n,s[1]),s[0]):s});if(t>=e.childElementCount)e.append(...r);else for(let i=0;i{this.render_scheduled=!0},this.on_mouse_down=e=>{e.currentTarget&&e.currentTarget.focus()},this.call_render=()=>{const e=this.controls.update(this.controls_clock.getDelta()),t=this.render_scheduled||e;this.render_scheduled=!1,t&&this.render(),this.animation_frame_handle=requestAnimationFrame(this.call_render)},this.dom_element.tabIndex=0,this.dom_element.addEventListener("mousedown",this.on_mouse_down),this.dom_element.style.outline="none",this.scene.background=new a.Color(1579032),this.light_holder.add(this.light),this.scene.add(this.light_holder),this.renderer.setPixelRatio(window.devicePixelRatio),this.renderer.getSize(this.size)}get debug(){return this._debug}set debug(e){this._debug=e}get dom_element(){return this.renderer.domElement}set_size(e,t){this.size.set(e,t),this.renderer.setSize(e,t),this.schedule_render()}pointer_pos_to_device_coords(e){e.set(e.x/this.size.width*2-1,e.y/this.size.height*-2+1)}start_rendering(){this.schedule_render(),this.animation_frame_handle=requestAnimationFrame(this.call_render)}stop_rendering(){null!=this.animation_frame_handle&&(cancelAnimationFrame(this.animation_frame_handle),this.animation_frame_handle=void 0)}reset_camera(e,t){this.controls.setLookAt(e.x,e.y,e.z,t.x,t.y,t.z)}dispose(){this.renderer.dispose(),this.controls.dispose()}init_camera_controls(){this.controls=new s.default(this.camera,this.renderer.domElement),this.controls.dampingFactor=1,this.controls.draggingDampingFactor=1}render(){this.renderer.render(this.scene,this.camera)}}},"G+UN":function(e,t,i){"use strict";var o=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))((function(n,s){function r(e){try{d(o.next(e))}catch(e){s(e)}}function a(e){try{d(o.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}d((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const n=i("x4QM"),s=i("6WXA"),r=i("nsCy");class a{constructor(e,t){this.id_to_item_type=t,this.get_by_id=e=>this.id_to_item_type[e],this.item_types=e}}t.ItemTypeStore=a,t.item_type_stores=new s.ServerMap((function(e){return o(this,void 0,void 0,(function*(){const t=yield fetch(`/assets/itemTypes.${r.Server[e].toLowerCase()}.json`),i=yield t.json(),o=[],s=[];for(const e of i){let t;switch(e.class){case"weapon":t=new n.WeaponItemType(e.id,e.name,e.minAtp,e.maxAtp,e.ata,e.maxGrind,e.requiredAtp);break;case"armor":t=new n.ArmorItemType(e.id,e.name,e.atp,e.ata,e.minEvp,e.maxEvp,e.minDfp,e.maxDfp,e.mst,e.hp,e.lck);break;case"shield":t=new n.ShieldItemType(e.id,e.name,e.atp,e.ata,e.minEvp,e.maxEvp,e.minDfp,e.maxDfp,e.mst,e.hp,e.lck);break;case"unit":t=new n.UnitItemType(e.id,e.name);break;case"tool":t=new n.ToolItemType(e.id,e.name);break;default:continue}s[t.id]=t,o.push(t)}return new a(o,s)}))}))},GN66:function(e,t,i){"use strict";var o=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))((function(n,s){function r(e){try{d(o.next(e))}catch(e){s(e)}}function a(e){try{d(o.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}d((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const n=i("HjM1"),s=i("xs7i"),r=i("j4Ss");class a extends n.TabContainer{constructor(){super({class:"hunt_optimizer_MethodsView",tabs:[{title:"Episode I",key:"episode_1",create_view:function(){return o(this,void 0,void 0,(function*(){return new r.MethodsForEpisodeView(s.Episode.I)}))}},{title:"Episode II",key:"episode_2",create_view:function(){return o(this,void 0,void 0,(function*(){return new r.MethodsForEpisodeView(s.Episode.II)}))}},{title:"Episode IV",key:"episode_4",create_view:function(){return o(this,void 0,void 0,(function*(){return new r.MethodsForEpisodeView(s.Episode.IV)}))}}]}),this.finalize_construction(a.prototype)}}t.MethodsView=a},GXOi:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("/Wax"),n=i("tjEv");t.prs_compress=function(e){const t=new s(e.size,e.endianness);for(;e.bytes_left;){let i=0,o=0;const n=Math.max(0,e.position-Math.min(2048,e.bytes_left));for(let t=e.position-255;t>=n;t--){let n=e.position,s=t,r=0;for(;n+3=o&&(i=t,o=r,r>=255))break}o<3?t.add_u8(e.u8()):(t.copy(i-e.position,o),e.seek(o))}return t.finalize()};class s{constructor(e,t){this.flags=0,this.flag_bits_left=0,this.flag_offset=0,this.output=new o.ResizableBufferCursor(new n.ResizableBuffer(e),t)}add_u8(e){this.write_control_bit(1),this.write_u8(e)}copy(e,t){e>-256&&t<=5?this.short_copy(e,t):this.long_copy(e,t)}finalize(){this.write_control_bit(0),this.write_control_bit(1),this.flags>>>=this.flag_bits_left;const e=this.output.position;return this.output.seek_start(this.flag_offset).write_u8(this.flags).seek_start(e),this.write_u8(0),this.write_u8(0),this.output.seek_start(0)}write_control_bit(e){if(0==this.flag_bits_left--){const e=this.output.position;this.output.seek_start(this.flag_offset).write_u8(this.flags).seek_start(e).write_u8(0),this.flag_offset=e,this.flag_bits_left=7}this.flags>>>=1,e&&(this.flags|=128)}write_u8(e){this.output.write_u8(e)}short_copy(e,t){t-=2,this.write_control_bit(0),this.write_control_bit(0),this.write_control_bit(t>>>1&1),this.write_control_bit(1&t),this.write_u8(255&e)}long_copy(e,t){t<=9?(this.write_control_bit(0),this.write_control_bit(1),this.write_u8(e<<3&248|t-2&7),this.write_u8(e>>5&255)):(this.write_control_bit(0),this.write_control_bit(1),this.write_u8(e<<3&248),this.write_u8(e>>5&255),this.write_u8(t-1))}}},Gc0Z:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("Womt"),n=i("c5EP"),s=i("xpi7"),r=i("IjTL"),a=i("Tpfs"),d=i("yQqj"),l=i("sZ1+"),_=i("3ONQ"),u=i("uaZj"),c=Object.freeze(new o.Vector3(0,0,0)),p=Object.freeze(new o.Vector3(0,1,0)),v=Object.freeze(new o.Vector3(0,-1,0)),h=2*Math.PI,w=new o.Raycaster;var f;t.QuestEntityControls=class{constructor(e){this.renderer=e,this.disposer=new a.Disposer,this.pointer_position=new o.Vector2(0,0),this.pointer_device_position=new o.Vector2(0,0),this.last_pointer_position=new o.Vector2(0,0),this.moved_since_last_pointer_down=!1,this.dispose=()=>{this.renderer.dom_element.removeEventListener("keydown",this.keydown),this.renderer.dom_element.removeEventListener("mousedown",this.mousedown),this.renderer.dom_element.removeEventListener("mousemove",this.mousemove),document.removeEventListener("mousemove",this.mousemove),document.removeEventListener("mouseup",this.mouseup),this.renderer.dom_element.removeEventListener("mouseleave",this.mouseleave),_.remove_entity_dnd_listener(this.renderer.dom_element,"dragenter",this.dragenter),_.remove_entity_dnd_listener(this.renderer.dom_element,"dragover",this.dragover),_.remove_entity_dnd_listener(this.renderer.dom_element,"dragleave",this.dragleave),_.remove_entity_dnd_listener(this.renderer.dom_element,"drop",this.drop),this.disposer.dispose()},this.mark_selected=e=>{e===this.hovered_mesh&&(this.hovered_mesh=void 0),e!==this.selected_mesh&&(this.selected_mesh&&y(this.selected_mesh,s.ColorType.Normal),y(e,s.ColorType.Selected),this.renderer.schedule_render()),this.selected_mesh=e},this.selected_entity_changed=({value:e})=>{if(this.state.cancel(),e){const t=this.renderer.get_entity_mesh(e);t?this.mark_selected(t):this.unmark_selected()}else this.unmark_selected()},this.keydown=e=>{this.state=this.state.process_event({type:f.KeyDown,key:e.key})},this.mousedown=e=>{this.process_mouse_event(e),this.state=this.state.process_event({type:f.MouseDown,buttons:e.buttons,shift_key:e.shiftKey,pointer_device_position:this.pointer_device_position,moved_since_last_pointer_down:this.moved_since_last_pointer_down,mark_hovered:this.mark_hovered}),this.renderer.dom_element.removeEventListener("mousemove",this.mousemove),document.addEventListener("mousemove",this.mousemove),document.addEventListener("mouseup",this.mouseup)},this.mousemove=e=>{this.process_mouse_event(e),this.state=this.state.process_event({type:f.MouseMove,buttons:e.buttons,shift_key:e.shiftKey,pointer_device_position:this.pointer_device_position,moved_since_last_pointer_down:this.moved_since_last_pointer_down,mark_hovered:this.mark_hovered})},this.mouseup=e=>{this.process_mouse_event(e),this.state=this.state.process_event({type:f.MouseUp,buttons:e.buttons,shift_key:e.shiftKey,pointer_device_position:this.pointer_device_position,moved_since_last_pointer_down:this.moved_since_last_pointer_down,mark_hovered:this.mark_hovered}),this.renderer.dom_element.addEventListener("mousemove",this.mousemove),document.removeEventListener("mousemove",this.mousemove),document.removeEventListener("mouseup",this.mouseup)},this.mouseleave=e=>{this.process_mouse_event(e),this.state=this.state.process_event({type:f.MouseLeave,buttons:e.buttons,shift_key:e.shiftKey,pointer_device_position:this.pointer_device_position,moved_since_last_pointer_down:this.moved_since_last_pointer_down,mark_hovered:this.mark_hovered})},this.dragenter=e=>{this.process_mouse_event(e.event),this.state=this.state.process_event({type:f.EntityDragEnter,shift_key:e.event.shiftKey,pointer_device_position:this.pointer_device_position,entity_type:e.entity_type,drag_element:e.drag_element,data_transfer:e.event.dataTransfer,prevent_default:()=>e.event.preventDefault(),stop_propagation:()=>e.event.stopPropagation()})},this.dragover=e=>{this.process_mouse_event(e.event),this.state=this.state.process_event({type:f.EntityDragOver,shift_key:e.event.shiftKey,pointer_device_position:this.pointer_device_position,entity_type:e.entity_type,drag_element:e.drag_element,data_transfer:e.event.dataTransfer,prevent_default:()=>e.event.preventDefault(),stop_propagation:()=>e.event.stopPropagation()})},this.dragleave=e=>{this.process_mouse_event(e.event),this.state=this.state.process_event({type:f.EntityDragLeave,shift_key:e.event.shiftKey,pointer_device_position:this.pointer_device_position,entity_type:e.entity_type,drag_element:e.drag_element,data_transfer:e.event.dataTransfer,prevent_default:()=>e.event.preventDefault(),stop_propagation:()=>e.event.stopPropagation()})},this.drop=e=>{this.process_mouse_event(e.event),this.state=this.state.process_event({type:f.EntityDrop})},this.mark_hovered=e=>{this.selected_mesh&&e===this.selected_mesh||(e!==this.hovered_mesh&&(this.hovered_mesh&&y(this.hovered_mesh,s.ColorType.Normal),e&&y(e,s.ColorType.Hovered),this.renderer.schedule_render()),this.hovered_mesh=e)},this.disposer.add(n.quest_editor_store.selected_entity.observe(this.selected_entity_changed)),e.dom_element.addEventListener("keydown",this.keydown),e.dom_element.addEventListener("mousedown",this.mousedown),e.dom_element.addEventListener("mousemove",this.mousemove),e.dom_element.addEventListener("mouseleave",this.mouseleave),_.add_entity_dnd_listener(e.dom_element,"dragenter",this.dragenter),_.add_entity_dnd_listener(e.dom_element,"dragover",this.dragover),_.add_entity_dnd_listener(e.dom_element,"dragleave",this.dragleave),_.add_entity_dnd_listener(e.dom_element,"drop",this.drop),this.state=new E(e)}process_mouse_event(e){const{left:t,top:i}=this.renderer.dom_element.getBoundingClientRect();this.pointer_position.set(e.clientX-t,e.clientY-i),this.pointer_device_position.copy(this.pointer_position),this.renderer.pointer_pos_to_device_coords(this.pointer_device_position),"mousedown"===e.type?this.moved_since_last_pointer_down=!1:"mousemove"!==e.type&&"mouseup"!==e.type||this.pointer_position.equals(this.last_pointer_position)||(this.moved_since_last_pointer_down=!0),this.last_pointer_position.copy(this.pointer_position)}unmark_selected(){this.selected_mesh&&(y(this.selected_mesh,s.ColorType.Normal),this.renderer.schedule_render()),this.selected_mesh=void 0}},function(e){e[e.KeyDown=0]="KeyDown",e[e.MouseDown=1]="MouseDown",e[e.MouseMove=2]="MouseMove",e[e.MouseUp=3]="MouseUp",e[e.MouseLeave=4]="MouseLeave",e[e.EntityDragEnter=5]="EntityDragEnter",e[e.EntityDragOver=6]="EntityDragOver",e[e.EntityDragLeave=7]="EntityDragLeave",e[e.EntityDrop=8]="EntityDrop"}(f||(f={}));class E{constructor(e){this.renderer=e}process_event(e){switch(e.type){case f.KeyDown:{const t=n.quest_editor_store.selected_entity.val;return t&&"Delete"===e.key&&n.quest_editor_store.remove_entity(t),this}case f.MouseDown:{const t=this.pick_entity(e.pointer_device_position);if(t){if(1===e.buttons)return n.quest_editor_store.set_selected_entity(t.entity),new m(this.renderer,t.entity,t.drag_adjust,t.grab_offset);if(2===e.buttons)return n.quest_editor_store.set_selected_entity(t.entity),new O(this.renderer,t.entity,t.mesh,t.grab_offset)}return this}case f.MouseMove:{const t=this.pick_entity(e.pointer_device_position);return e.mark_hovered(t&&t.mesh),this}case f.MouseUp:return e.moved_since_last_pointer_down||n.quest_editor_store.set_selected_entity(void 0),this;case f.MouseLeave:return e.mark_hovered(void 0),this;case f.EntityDragEnter:{const t=n.quest_editor_store.current_area.val,i=n.quest_editor_store.current_quest.val;return t&&i?new g(this.renderer,e,i,t):this}default:return this}}cancel(){}pick_entity(e){w.setFromCamera(e,this.renderer.camera);const[t]=w.intersectObjects(this.renderer.entity_models.children);if(!t)return;const i=t.object.userData.entity,o=t.object.position.clone().sub(t.point),n=o.clone();w.set(t.object.position,v);const[s]=w.intersectObjects(this.renderer.collision_geometry.children,!0);return s&&(n.y-=s.distance),{mesh:t.object,entity:i,grab_offset:o,drag_adjust:n}}}class m{constructor(e,t,i,o){this.renderer=e,this.entity=t,this.drag_adjust=i,this.grab_offset=o,this.cancelled=!1,this.initial_section=t.section.val,this.initial_position=t.world_position.val,this.renderer.controls.enabled=!1}process_event(e){switch(e.type){case f.MouseMove:return this.cancelled?new E(this.renderer):(e.moved_since_last_pointer_down&&b(this.renderer,this.entity,this.drag_adjust,this.grab_offset,e.pointer_device_position,e.shift_key),this);case f.MouseUp:return this.renderer.controls.enabled=!0,!this.cancelled&&e.moved_since_last_pointer_down&&n.quest_editor_store.translate_entity(this.entity,this.initial_section,this.entity.section.val,this.initial_position,this.entity.world_position.val,!0),new E(this.renderer);default:return this.cancelled?new E(this.renderer):this}}cancel(){this.cancelled=!0,this.renderer.controls.enabled=!0,this.initial_section&&this.entity.set_section(this.initial_section),this.entity.set_world_position(this.initial_position)}}class O{constructor(e,t,i,o){this.renderer=e,this.entity=t,this.mesh=i,this.cancelled=!1,this.initial_rotation=t.world_rotation.val,this.grab_point=t.world_position.val.clone().sub(o),this.renderer.controls.enabled=!1}process_event(e){switch(e.type){case f.MouseMove:return this.cancelled?new E(this.renderer):(e.moved_since_last_pointer_down&&T(this.renderer,this.entity,this.mesh.quaternion,this.initial_rotation,this.grab_point,e.pointer_device_position),this);case f.MouseUp:return this.renderer.controls.enabled=!0,!this.cancelled&&e.moved_since_last_pointer_down&&n.quest_editor_store.rotate_entity(this.entity,this.initial_rotation,this.entity.world_rotation.val,!0),new E(this.renderer);default:return this.cancelled?new E(this.renderer):this}}cancel(){this.cancelled=!0,this.renderer.controls.enabled=!0,this.entity.set_world_rotation(this.initial_rotation)}}class g{constructor(e,t,i,s){if(this.drag_adjust=new o.Vector3(0,0,0),this.cancelled=!1,this.renderer=e,t.drag_element.style.display="none",t.data_transfer&&(t.data_transfer.dropEffect="copy"),d.is_npc_type(t.entity_type)){const e=l.npc_data(t.entity_type);this.entity=new r.QuestNpcModel(t.entity_type,e.pso_type_id,0,0,e.pso_roaming,s.id,0,new o.Vector3(0,0,0),new o.Euler(0,0,0,"ZXY"),new o.Vector3(1,1,1),[[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0],[0,0,0,0]])}else this.entity=new u.QuestObjectModel(t.entity_type,0,0,s.id,0,new o.Vector3(0,0,0),new o.Euler(0,0,0,"ZXY"),new Map,[[0,0,0,0,0,0],[0,0]]);D(this.renderer,this.entity,this.drag_adjust,c,t.pointer_device_position),i.add_entity(this.entity),n.quest_editor_store.set_selected_entity(this.entity)}process_event(e){switch(e.type){case f.EntityDragOver:return this.cancelled?(e.drag_element.style.display="flex",e.data_transfer&&(e.data_transfer.dropEffect="none"),new E(this.renderer)):(e.stop_propagation(),e.prevent_default(),e.data_transfer&&(e.data_transfer.dropEffect="copy"),b(this.renderer,this.entity,this.drag_adjust,c,e.pointer_device_position,e.shift_key),this);case f.EntityDragLeave:{e.drag_element.style.display="flex";const t=n.quest_editor_store.current_quest.val;return t&&t.remove_entity(this.entity),new E(this.renderer)}case f.EntityDrop:return this.cancelled||n.quest_editor_store.push_create_entity_action(this.entity),new E(this.renderer);default:return this}}cancel(){this.cancelled=!0;const e=n.quest_editor_store.current_quest.val;e&&e.remove_entity(this.entity)}}function y(e,t){const i=e.userData.entity instanceof r.QuestNpcModel?s.NPC_COLORS[t]:s.OBJECT_COLORS[t];if(e)if(Array.isArray(e.material))for(const o of e.material)t===s.ColorType.Normal&&o.map?o.color.set(16777215):o.color.set(i);else e.material.color.set(i)}function b(e,t,i,o,n,s){s?P(e,t,i,o,n):D(e,t,i,o,n)}const D=(()=>{const e=new o.Plane,t=new o.Vector3;return(i,n,s,r,a)=>{const{intersection:d,section:l}=function(e,t,i){w.setFromCamera(t,e.camera),w.ray.origin.add(i);const o=w.intersectObjects(e.collision_geometry.children,!0);for(const e of o)if(e.face.normal.y>.75)return{intersection:e,section:e.object.userData.section};return{}}(i,a,s);d?(n.set_world_position(new o.Vector3(d.point.x,d.point.y+r.y-s.y,d.point.z)),l&&n.set_section(l)):(w.setFromCamera(a,i.camera),e.set(p,-n.world_position.val.y+r.y),w.ray.intersectPlane(e,t)&&n.set_world_position(new o.Vector3(t.x+r.x,n.world_position.val.y,t.z+r.z)))}})(),P=(()=>{const e=new o.Vector3,t=new o.Plane,i=new o.Vector3,n=new o.Vector3;return(s,r,a,d,l)=>{if(w.setFromCamera(l,s.camera),s.camera.getWorldDirection(e),e.negate(),e.y=0,e.normalize(),n.set(r.world_position.val.x,r.world_position.val.y,r.world_position.val.z),n.sub(d),t.setFromNormalAndCoplanarPoint(e,n),w.ray.intersectPlane(t,i)){const e=i.y+d.y,t=e-r.world_position.val.y;a.y-=t,r.set_world_position(new o.Vector3(r.world_position.val.x,e,r.world_position.val.z))}}})(),T=(()=>{const e=new o.Vector3,t=new o.Plane,i=new o.Vector3,n=new o.Vector3,s=new o.Vector3,r=new o.Vector3;return(a,d,l,_,u,c)=>{if(e.copy(p),e.applyQuaternion(l),t.setFromNormalAndCoplanarPoint(e,u),w.setFromCamera(c,a.camera),w.ray.intersectPlane(t,i)){t.projectPoint(d.world_position.val,n),s.subVectors(n,u),r.subVectors(n,i);const a=s.dot(r),l=e.dot(s.cross(r)),c=Math.atan2(l,a);d.set_world_rotation(new o.Euler(_.x,(_.y+c)%h,_.z,"ZXY"))}}})()},GuD3:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("bcBH");t.AbstractCursor=class{constructor(e,t){this._position=0,this.endianness=e,this.offset=t}get position(){return this._position}get endianness(){return this.little_endian?o.Endianness.Little:o.Endianness.Big}set endianness(e){this.little_endian=e===o.Endianness.Little}get bytes_left(){return this.size-this.position}seek(e){return this.seek_start(this.position+e)}seek_start(e){if(e<0||e>this.size)throw new Error(`Offset ${e} is out of bounds.`);return this._position=e,this}seek_end(e){if(e<0||e>this.size)throw new Error(`Offset ${e} is out of bounds.`);return this._position=this.size-e,this}u8(){return this.u8_at(this._position++)}u8_at(e){return this.check_offset(e,1),this.dv.getUint8(this.offset+e)}u16(){const e=this.u16_at(this.position);return this._position+=2,e}u16_at(e){return this.check_offset(e,2),this.dv.getUint16(this.offset+e,this.little_endian)}u32(){const e=this.u32_at(this.position);return this._position+=4,e}u32_at(e){return this.check_offset(e,4),this.dv.getUint32(this.offset+e,this.little_endian)}i8(){return this.i8_at(this._position++)}i8_at(e){return this.check_offset(e,1),this.dv.getInt8(this.offset+e)}i16(){const e=this.i16_at(this.position);return this._position+=2,e}i16_at(e){return this.check_offset(e,2),this.dv.getInt16(this.offset+e,this.little_endian)}i32(){const e=this.i32_at(this.position);return this._position+=4,e}i32_at(e){return this.check_offset(e,4),this.dv.getInt32(this.offset+e,this.little_endian)}f32(){const e=this.f32_at(this.position);return this._position+=4,e}f32_at(e){return this.check_offset(e,4),this.dv.getFloat32(this.offset+e,this.little_endian)}u8_array(e){this.check_size("n",e,e);const t=[];for(let i=0;ithis.size-this.position)throw new Error(`${e} ${t} is out of bounds.`)}check_offset(e,t){if(e<0||e+t>this.size)throw new Error(`Offset ${e} is out of bounds.`)}}},Hdaq:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("FXpb"),n=i("nN8q");i("m5WL");const s=i("4SjJ"),r=i("KUR2"),a=i("tyuj"),d=i("lHpu"),l=i("VRtl"),_=i("Y3Jw"),u=100,c=140;class p extends n.ResizableWidget{constructor(){super(),this.element=o.el.div({class:"viewer_Model3DView"}),this.tool_bar_view=this.disposable(new l.Model3DToolBar),this.model_list_view=this.disposable(new _.Model3DSelectListView(a.model_store.models,a.model_store.current_model)),this.animation_list_view=this.disposable(new _.Model3DSelectListView(a.model_store.animations,a.model_store.current_animation)),this.renderer_view=this.disposable(new r.RendererWidget(new d.Model3DRenderer)),this.animation_list_view.borders=!0,this.element.append(this.tool_bar_view.element,o.el.div({class:"viewer_Model3DView_container"},this.model_list_view.element,this.animation_list_view.element,this.renderer_view.element)),a.model_store.current_model.val=a.model_store.models[5],this.renderer_view.start_rendering(),this.disposable(s.gui_store.tool.observe(({value:e})=>{e===s.GuiTool.Viewer?this.renderer_view.start_rendering():this.renderer_view.stop_rendering()})),this.finalize_construction(p.prototype)}resize(e,t){super.resize(e,t);const i=Math.max(0,t-this.tool_bar_view.height);return this.model_list_view.resize(u,i),this.animation_list_view.resize(c,i),this.renderer_view.resize(Math.max(0,e-u-c),i),this}}t.Model3DView=p},HjM1:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("FXpb"),n=i("39ZU"),s=i("nN8q");i("4AvX");const r=28;class a extends s.ResizableWidget{constructor(e){super(e),this.element=o.el.div({class:"core_TabContainer"}),this.tabs=[],this.bar_element=o.el.div({class:"core_TabContainer_Bar"}),this.panes_element=o.el.div({class:"core_TabContainer_Panes"}),this.bar_mousedown=e=>{if(e.target instanceof HTMLElement){const t=e.target.dataset.key;t&&this.activate(t)}},this.bar_element.onmousedown=this.bar_mousedown;for(const t of e.tabs){const e=o.create_element("span",{class:"core_TabContainer_Tab",text:t.title,data:{key:t.key}});this.bar_element.append(e);const i=new n.LazyWidget(t.create_view);this.tabs.push(Object.assign(Object.assign({},t),{tab_element:e,lazy_view:i})),this.panes_element.append(i.element),this.disposable(i)}this.tabs.length&&this.activate(this.tabs[0].key),this.element.append(this.bar_element,this.panes_element),this.finalize_construction(a.prototype)}resize(e,t){super.resize(e,t),this.bar_element.style.width=`${e}px`,this.bar_element.style.height=`${r}px`;const i=t-r;this.panes_element.style.width=`${e}px`,this.panes_element.style.height=`${i}px`;for(const t of this.tabs)t.lazy_view.resize(e,i);return this}activate(e){for(const t of this.tabs){const i=t.key===e;i?t.tab_element.classList.add("active"):t.tab_element.classList.remove("active"),t.lazy_view.visible.val=i}}}t.TabContainer=a},IMNf:function(e,t,i){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=o(i("GGSb")),s=i("/Wax"),r=i("tjEv"),a=n.default.get("data_formats/compression/prs/decompress");t.prs_decompress=function(e){const t=new d(e);for(;;)if(1===t.read_flag_bit())t.copy_u8();else{let e,i;if(0===t.read_flag_bit())e=t.read_flag_bit()<<1,e|=t.read_flag_bit(),e+=2,i=t.read_u8()-256;else{if(0===(i=t.read_u16()))break;e=7&i,i>>>=3,0===e?(e=t.read_u8(),e+=1):e+=2,i-=8192}t.offset_copy(i,e)}return t.dst.seek_start(0)};class d{constructor(e){this.src=e,this.dst=new s.ResizableBufferCursor(new r.ResizableBuffer(Math.floor(1.5*e.size)),e.endianness),this.flags=0,this.flag_bits_left=0}read_flag_bit(){0===this.flag_bits_left&&(this.flags=this.read_u8(),this.flag_bits_left=8);let e=1&this.flags;return this.flags>>>=1,this.flag_bits_left-=1,e}copy_u8(){this.dst.write_u8(this.read_u8())}read_u8(){return this.src.u8()}read_u16(){return this.src.u16()}offset_copy(e,t){(e<-8192||e>0)&&a.error(`offset was ${e}, should be between -8192 and 0.`),(t<1||t>256)&&a.error(`length was ${t}, should be between 1 and 256.`);const i=Math.min(-e,t);this.dst.seek(e);const o=this.dst.take(i);this.dst.seek(-e-i);for(let e=0;enull!=e?e:this.default_time)}set_user_time(e){return this._user_time.val=e,this}}},If1w:function(e,t,i){"use strict";var o=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))((function(n,s){function r(e){try{d(o.next(e))}catch(e){s(e)}}function a(e){try{d(o.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}d((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const n=i("FXpb");i("XfQH");const s=i("KVVN"),r=i("Tpfs"),a=i("TRid"),d=i("PE7g"),l=i("sMN3"),_=i("Ncr4"),u=i("ouMO");class c extends a.Widget{constructor(){super(),this.element=n.el.div({class:"hunt_optimizer_WantedItemsView"}),this.tbody_element=n.el.tbody(),this.store_disposer=this.disposable(new r.Disposer),this.create_row=e=>{const t=new r.Disposer,i=t.add(new d.NumberInput(e.amount.val,{min:0,step:1}));t.add_all(i.value.bind_to(e.amount),i.value.observe(({value:t})=>e.set_amount(t)));const a=t.add(new s.Button("",{icon_left:n.Icon.Remove}));return t.add(a.click.observe(()=>o(this,void 0,void 0,(function*(){return(yield l.hunt_optimizer_stores.current.val).remove_wanted_item(e)})))),[n.el.tr({},n.el.td({},i.element),n.el.td({text:e.item_type.name}),n.el.td({},a.element)),t]};const e=u.list_property(),t=u.list_property(),i=this.disposable(new _.ComboBox({items:t,to_label:e=>e.name,placeholder_text:"Add an item",filter(i){const o=i.toLowerCase();t.val=e.val.filter(e=>e.name.toLowerCase().includes(o))}}));this.element.append(n.el.h2({text:"Wanted Items"}),i.element,n.el.div({class:"hunt_optimizer_WantedItemsView_table_wrapper"},n.el.table({},this.tbody_element))),this.disposables(l.hunt_optimizer_stores.observe_current(o=>{this.store_disposer.dispose_all(),this.store_disposer.add_all(n.bind_children_to(this.tbody_element,o.wanted_items,this.create_row),i.selected.observe(({value:e})=>{e&&(o.add_wanted_item(e),i.selected.val=void 0)})),e.val=o.huntable_item_types.slice().sort((e,t)=>e.name.localeCompare(t.name)),t.val=e.val},{call_now:!0})),this.finalize_construction(c.prototype)}}t.WantedItemsView=c},IjTL:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("kiqn");t.QuestNpcModel=class extends o.QuestEntityModel{constructor(e,t,i,o,n,s,r,a,d,l,_){if(!Number.isInteger(t))throw new Error("pso_type_id should be an integer.");if(!Number.isFinite(i))throw new Error("npc_id should be a number.");if(!Number.isInteger(o))throw new Error("script_label should be an integer.");if(!Number.isInteger(n))throw new Error("pso_roaming should be an integer.");if(!l)throw new Error("scale is required.");if(!_)throw new Error("unknown is required.");if(3!==_.length)throw new Error(`unknown should be of length 3, was ${_.length}.`);if(10!==_[0].length)throw new Error(`unknown[0] should be of length 10, was ${_[0].length}`);if(6!==_[1].length)throw new Error(`unknown[1] should be of length 6, was ${_[1].length}`);if(4!==_[2].length)throw new Error(`unknown[2] should be of length 4, was ${_[2].length}`);super(e,s,r,a,d),this.pso_type_id=t,this.npc_id=i,this.script_label=o,this.pso_roaming=n,this.unknown=_,this.scale=l}}},JCZi:function(e,t,i){"use strict";var o=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))((function(n,s){function r(e){try{d(o.next(e))}catch(e){s(e)}}function a(e){try{d(o.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}d((o=o.apply(e,t||[])).next())}))},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=i("wsa1"),r=n(i("NUmZ")),a=i("yAUo"),d=i("Q4I3"),l=i("ZPAt"),_=i("ouMO");var u=s.languages.CompletionItemKind;const c=l.OPCODES.filter(e=>null!=e).map(e=>({label:e.mnemonic,kind:u.Function,insertText:e.mnemonic})),p=[{label:".code",kind:u.Keyword,insertText:"code"},{label:".data",kind:u.Keyword,insertText:"data"},{label:".string",kind:u.Keyword,insertText:"string"}];t.AssemblyAnalyser=class{constructor(){this._issues=_.property({warnings:[],errors:[]}),this.issues=this._issues,this.worker=new r.default,this.promises=new Map,this.message_id=0,this.process_worker_message=e=>{const t=e.data;switch(t.type){case a.OutputMessageType.NewObjectCode:this.quest&&(this.quest.object_code.splice(0,this.quest.object_code.length,...t.object_code),this.quest.set_map_designations(t.map_designations),this._issues.val={warnings:t.warnings,errors:t.errors});break;case a.OutputMessageType.SignatureHelp:{const e=this.promises.get(t.id);if(e)if(this.promises.delete(t.id),t.opcode){let i=t.opcode.mnemonic+" ";const o=[];let n=!0;for(const e of t.opcode.params){let t;switch(n?n=!1:i+=", ",e.type.kind){case l.Kind.ILabel:t="FuncLabel";break;case l.Kind.DLabel:t="DataLabel";break;case l.Kind.SLabel:t="StringLabel";break;case l.Kind.ILabelVar:t="...FuncLabel";break;case l.Kind.RegRef:case l.Kind.RegTupRef:t="Register";break;case l.Kind.RegRefVar:t="...Register";break;default:t=l.Kind[e.type.kind]}o.push({label:[i.length,i.length+t.length],documentation:e.doc}),i+=t}const s={signatures:[{label:i,documentation:t.opcode.doc,parameters:o}],activeSignature:0,activeParameter:t.active_param};e.resolve(s)}else e.resolve(void 0)}}},this.worker.onmessage=this.process_worker_message}disassemble(e,t){this.quest=e;const i=d.disassemble(e.object_code,t),o={type:a.InputMessageType.NewAssembly,assembly:i};return this.worker.postMessage(o),i}update_assembly(e){const t={type:a.InputMessageType.AssemblyChange,changes:e.map(e=>({start_line_no:e.range.startLineNumber,start_col:e.range.startColumn,end_line_no:e.range.endLineNumber,end_col:e.range.endColumn,new_text:e.text}))};this.worker.postMessage(t)}provide_completion_items(e){return{suggestions:/^\s*([a-z][a-z0-9_=<>!]*)?$/.test(e)?c:/^\s*\.[a-z]+$/.test(e)?p:[],incomplete:!1}}provide_signature_help(e,t){return o(this,void 0,void 0,(function*(){const i=this.message_id++;return new Promise((o,n)=>{this.promises.set(i,{resolve:o,reject:n});const s={type:a.InputMessageType.SignatureHelp,id:i,line_no:e,col:t};this.worker.postMessage(s),setTimeout(()=>{this.promises.delete(i)&&n(new Error("Signature help timed out."))},5e3)})}))}update_settings(e){const t={type:a.InputMessageType.SettingsChange,settings:e};this.worker.postMessage(t)}dispose(){this.worker.terminate()}}},JQxC:function(e,t,i){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=o(i("GGSb")),s=i("ZPAt"),r=i("4s8/"),a=i("CUby"),d=n.default.get("quest_editor/scripting/data_flow_analysis/stack_value");t.MIN_STACK_VALUE=s.MIN_SIGNED_DWORD_VALUE,t.MAX_STACK_VALUE=s.MAX_SIGNED_DWORD_VALUE,t.stack_value=function(e,i,o){const n=e.get_block_for_instruction(i);return n?function e(i,o,n,l,_){if(++i.iterations>100)return d.warn("Too many iterations."),(new r.ValueSet).set_interval(t.MIN_STACK_VALUE,t.MAX_STACK_VALUE);for(let e=l-1;e>=n.start;e--){const o=n.segment.instructions[e];if(o.opcode.stack===s.StackInteraction.Pop){_+=o.opcode.params.length;continue}const d=o.args;switch(o.opcode){case s.Opcode.ARG_PUSHR:if(0===_)return a.register_value(i.cfg,o,d[0].value);_--;break;case s.Opcode.ARG_PUSHL:case s.Opcode.ARG_PUSHB:case s.Opcode.ARG_PUSHW:if(0===_)return(new r.ValueSet).set_value(d[0].value);_--;break;case s.Opcode.ARG_PUSHA:case s.Opcode.ARG_PUSHO:case s.Opcode.ARG_PUSHS:if(0===_)return(new r.ValueSet).set_interval(t.MIN_STACK_VALUE,t.MAX_STACK_VALUE);_--}}const u=new r.ValueSet;o.add(n);for(const s of n.from){if(o.has(s)){u.set_interval(t.MIN_STACK_VALUE,t.MAX_STACK_VALUE);break}u.union(e(i,new Set(o),s,s.end,_))}return u}(new l(e),new Set,n,n.index_of_instruction(i),o):new r.ValueSet};class l{constructor(e){this.cfg=e,this.iterations=0}}},Jo0o:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("weRg"),n=i("+oIp"),s=i("c5EP"),r=i("xs7i");class a extends o.EntityListView{constructor(){super("quest_editor_ObjectListView"),this.filter_objects=()=>{const e=s.quest_editor_store.current_quest.val,t=s.quest_editor_store.current_area.val,i=e?e.episode:r.Episode.I,o=t?t.id:0;this.entities.val=n.OBJECT_TYPES.filter(e=>{const t=n.object_data(e);if(null==t.area_ids)return!0;const s=t.area_ids[i];return s&&s.includes(o)})},this.disposables(s.quest_editor_store.current_quest.observe(this.filter_objects),s.quest_editor_store.current_area.observe(this.filter_objects)),this.filter_objects(),this.finalize_construction(a.prototype)}}t.ObjectListView=a},"KS+z":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("w6HN"),n=i("oyid"),s=i("S6Bx");class r extends o.ToolBar{constructor(){const e=new n.CheckBox(!0,{label:"Inline args mode",tooltip:s.asm_editor_store.has_issues.map(e=>{let t="Transform arg_push* opcodes to be inline with the opcode the arguments are given to.";return e&&(t+="\nThis mode cannot be toggled because there are issues in the script."),t})});super({children:[e]}),this.disposables(e.checked.bind_to(s.asm_editor_store.inline_args_mode),e.checked.observe(({value:e})=>s.asm_editor_store.set_inline_args_mode(e)),e.enabled.bind_to(s.asm_editor_store.has_issues.map(e=>!e))),this.finalize_construction(r.prototype)}}t.AsmEditorToolBar=r},KUR2:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("nN8q"),n=i("FXpb");class s extends o.ResizableWidget{constructor(e){super(),this.renderer=e,this.element=n.el.div(),this.element.append(e.dom_element),this.disposable(e),this.finalize_construction(s.prototype)}start_rendering(){this.renderer.start_rendering()}stop_rendering(){this.renderer.stop_rendering()}resize(e,t){return super.resize(e,t),this.renderer.set_size(e,t),this}}t.RendererWidget=s},KVVN:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("FXpb");i("Tp1L");const n=i("ouMO"),s=i("QmPX"),r=i("4VsB");class a extends s.Control{constructor(e,t){super(t),this.element=o.el.button({class:"core_Button"});const i=o.el.span({class:"core_Button_inner"});this.center_element=o.el.span({class:"core_Button_center"}),t&&null!=t.icon_left&&i.append(o.el.span({class:"core_Button_left"},o.icon(t.icon_left))),i.append(this.center_element),t&&null!=t.icon_right&&i.append(o.el.span({class:"core_Button_right"},o.icon(t.icon_right))),this._mousedown=n.emitter(),this.mousedown=this._mousedown,this.element.onmousedown=e=>this._mousedown.emit({value:e}),this._mouseup=n.emitter(),this.mouseup=this._mouseup,this.element.onmouseup=e=>this._mouseup.emit({value:e}),this._click=n.emitter(),this.click=this._click,this.element.onclick=e=>this._click.emit({value:e}),this._text=new r.WidgetProperty(this,"",this.set_text),this.text=this._text,"string"==typeof e?this.text.val=e:e&&this.text.bind_to(e),this.element.append(i),this.finalize_construction(a.prototype)}set_enabled(e){super.set_enabled(e),this.element.disabled=!e}set_text(e){this.center_element.textContent=e,this.center_element.hidden=""===e}}t.Button=a},"L/3r":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("ouMO"),n=i("Ts/k"),s=i("n5fr");t.SimpleUndo=class{constructor(e,t,i){this.can_undo=o.property(!1),this.can_redo=o.property(!1),this.action=o.property({description:e,undo:t,redo:i}),this.first_undo=o.map((e,t)=>t?e:void 0,this.action,this.can_undo),this.first_redo=o.map((e,t)=>t?e:void 0,this.action,this.can_redo)}make_current(){s.undo_manager.current.val=this}ensure_not_current(){s.undo_manager.current.val===this&&(s.undo_manager.current.val=n.NOOP_UNDO)}undo(){return!!this.can_undo&&(this.action.val.undo(),!0)}redo(){return!!this.can_redo&&(this.action.val.redo(),!0)}reset(){this.can_undo.val=!1,this.can_redo.val=!1}}},LSoc:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("FXpb"),n=i("TRid"),s=i("ouMO"),r=i("4VsB");i("/xfa");class a extends n.Widget{constructor(e,t,i){super(),this.element=o.el.div({class:"core_Menu",tab_index:-1}),this.inner_element=o.el.div({class:"core_Menu_inner"}),this.mouseup=e=>{if(!(e.target instanceof HTMLElement))return;const t=e.target.dataset.index;null!=t&&this.select_item(parseInt(t,10))},this.keydown=e=>{switch(e.key){case"ArrowDown":this.hover_next();break;case"ArrowUp":this.hover_prev();break;case"Enter":this.select_hovered()}},this.inner_mouseover=e=>{if(e.target&&e.target instanceof HTMLElement){const t=e.target.dataset.index;null!=t&&this.hover_item(parseInt(t,10))}},this.document_mousedown=e=>{!this.visible.val||this.element.contains(e.target)||this.related_element.contains(e.target)||this.visible.set_val(!1,{silent:!1})},this.document_keydown=e=>{"Escape"===e.key&&this.visible.set_val(!1,{silent:!1})},this.visible.val=!1,this.element.onmouseup=this.mouseup,this.element.onkeydown=this.keydown,this.inner_element.onmouseover=this.inner_mouseover,this.element.append(this.inner_element),this.to_label=t,this.items=Array.isArray(e)?s.property(e):e,this.related_element=i,this._selected=new r.WidgetProperty(this,void 0,this.set_selected),this.selected=this._selected,this.disposables(this.items.observe(({value:e})=>{this.inner_element.innerHTML="",this.inner_element.append(...e.map((e,i)=>o.el.div({text:t(e),data:{index:i.toString()}}))),this.hover_item()},{call_now:!0}),o.disposable_listener(document,"mousedown",this.document_mousedown,{capture:!0}),o.disposable_listener(document,"keydown",this.document_keydown)),this.finalize_construction(a.prototype)}hover_next(){this.visible.val=!0,this.hover_item(null!=this.hovered_index?(this.hovered_index+1)%this.items.val.length:0)}hover_prev(){this.visible.val=!0,this.hover_item(this.hovered_index?this.hovered_index-1:this.items.val.length-1)}select_hovered(){null!=this.hovered_index&&this.select_item(this.hovered_index)}set_visible(e){super.set_visible(e),this.visible.val!=e&&(this.hover_item(),this.inner_element.scrollTop=0)}set_selected(){}hover_item(e){this.hovered_element&&this.hovered_element.classList.remove("core_Menu_hovered"),null==e?(this.hovered_index=void 0,this.hovered_element=void 0):(this.hovered_element=this.inner_element.children.item(e),this.hovered_element&&(this.hovered_index=e,this.hovered_element.classList.add("core_Menu_hovered"),this.hovered_element.scrollIntoView({block:"nearest"})))}select_item(e){const t=this.items.val[e];t&&(this.selected.set_val(t,{silent:!1}),this.visible.set_val(!1,{silent:!1}))}}t.Menu=a},LkpO:function(e,t,i){"use strict";var o=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))((function(n,s){function r(e){try{d(o.next(e))}catch(e){s(e)}}function a(e){try{d(o.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}d((o=o.apply(e,t||[])).next())}))},n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const s=i("HjM1");class r extends s.TabContainer{constructor(){super({class:"hunt_optimizer_HuntOptimizerView",tabs:[{title:"Optimize",key:"optimize",create_view:function(){return o(this,void 0,void 0,(function*(){return new((yield Promise.resolve().then(()=>n(i("FNQV")))).OptimizerView)}))}},{title:"Methods",key:"methods",create_view:function(){return o(this,void 0,void 0,(function*(){return new((yield Promise.resolve().then(()=>n(i("GN66")))).MethodsView)}))}},{title:"Help",key:"help",create_view:function(){return o(this,void 0,void 0,(function*(){return new((yield Promise.resolve().then(()=>n(i("F0Xh")))).HelpView)}))}}]}),this.finalize_construction(r.prototype)}}t.HuntOptimizerView=r},"M/y3":function(e,t,i){"use strict";var o=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))((function(n,s){function r(e){try{d(o.next(e))}catch(e){s(e)}}function a(e){try{d(o.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}d((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.sequential=function(e){const t=[];return function(...i){const n=new Promise((e,o)=>t.push({args:i,resolve:e,reject:o}));return 1===t.length&&function(){o(this,void 0,void 0,(function*(){for(;t.length;){const{args:i,resolve:o,reject:n}=t[0];try{o(yield e(...i))}catch(e){n(e)}finally{t.shift()}}}))}(),n}}},NRxM:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("9dYx");class n extends o.AbstractWritableCursor{constructor(e,t,i=0,o=e.byteLength-i){super(t,i),this._size=o,this.backing_buffer=e,this.dv=new DataView(e,0,e.byteLength)}get size(){return this._size}set size(e){if(e>this.backing_buffer.byteLength-this.offset)throw new Error(`Size ${e} is out of bounds.`);this._size=e}take(e){const t=this.offset+this.position,i=new n(this.backing_buffer,this.endianness,t,e);return this._position+=e,i}}t.ArrayBufferCursor=n},NUmZ:function(e,t,i){e.exports=function(){return new Worker(i.p+"128f0cffd6040e7a6005.worker.js")}},Ncr4:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("sDu+"),n=i("FXpb");i("rlVZ"),i("x1yY");const s=i("LSoc"),r=i("ouMO"),a=i("4VsB");class d extends o.LabelledControl{constructor(e){super(e),this.element=n.el.span({class:"core_ComboBox core_Input"}),this.preferred_label_position="left",this.input_element=n.create_element("input"),this.to_label=e.to_label,this._selected=new a.WidgetProperty(this,void 0,this.set_selected),this.selected=this._selected;const t=r.property(!1);this.menu=this.disposable(new s.Menu(e.items,e.to_label,this.element)),this.menu.element.onmousedown=e=>e.preventDefault(),this.input_element.placeholder=e.placeholder_text||"",this.input_element.onmousedown=()=>{t.val=!0},this.input_element.onkeydown=e=>{switch(e.key){case"ArrowDown":e.preventDefault(),this.menu.hover_next();break;case"ArrowUp":e.preventDefault(),this.menu.hover_prev();break;case"Enter":this.menu.select_hovered()}};const i=e.filter;if(i){let e="";this.input_element.onkeyup=()=>{this.input_element.value!==e&&(e=this.input_element.value,i(e),(this.menu.visible.val||e)&&this.menu.hover_next())}}this.input_element.onblur=()=>{t.val=!1};const o=n.el.span({},n.icon(n.Icon.TriangleDown));this.bind_hidden(o,t);const l=n.el.span({},n.icon(n.Icon.TriangleUp));this.bind_hidden(l,t.map(e=>!e));const _=n.el.span({class:"core_ComboBox_button"},o,l);_.onmousedown=e=>{e.preventDefault(),t.val=!t.val},this.element.append(n.el.span({class:"core_ComboBox_inner core_Input_inner"},this.input_element,_),this.menu.element),this.disposables(this.menu.visible.bind_bi(t),t.observe(({value:e})=>{e&&this.menu.hover_next()}),this.menu.selected.observe(({value:e})=>{this.selected.set_val(e,{silent:!1}),this.input_element.focus()})),this.finalize_construction(d.prototype)}set_selected(e){this.input_element.value=e?this.to_label(e):"",this.menu.selected.val=e}}t.ComboBox=d},PE7g:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("0Xme");i("rY5A");class n extends o.Input{constructor(e=0,t={}){super(e,"core_NumberInput","number","core_NumberInput_inner",t),this.preferred_label_position="left";const{min:i,max:o,step:s}=t;this.set_attr("min",i,String),this.set_attr("max",o,String),this.input_element.step="any",this.set_attr("step",s,String),null!=t.round_to&&t.round_to>=0?this.rounding_factor=Math.pow(10,t.round_to):this.rounding_factor=1,this.element.style.width=`${null==t.width?54:t.width}px`,this.set_value(e),this.finalize_construction(n.prototype)}get_value(){return this.input_element.valueAsNumber}set_value(e){this.input_element.valueAsNumber=Math.round(this.rounding_factor*e)/this.rounding_factor}}t.NumberInput=n},"Q+PT":function(e,t,i){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=o(i("GGSb")).default.get("core/observable/SimpleEmitter");t.SimpleEmitter=class{constructor(){this.observers=[]}emit(e){for(const t of this.observers)try{t(e)}catch(e){n.error("Observer threw error.",e)}}observe(e){return this.observers.includes(e)||this.observers.push(e),{dispose:()=>{const t=this.observers.indexOf(e);-1!==t&&this.observers.splice(t,1)}}}}},Q4I3:function(e,t,i){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=i("8hIv"),s=i("lg9k"),r=i("ZPAt"),a=o(i("GGSb")).default.get("quest_editor/scripting/disassembly");function d(e,t){const i=[],o=Math.min(e.length,t.length);for(let n=0;n4&&i.push(t)}else if(a.type===s.SegmentType.String)i.push(" "+JSON.stringify(a.value));else for(const e of a.instructions)if(t||e.opcode.stack!==r.StackInteraction.Push){let n=[];e.opcode.stack===r.StackInteraction.Pop?t||(n=l(e.opcode.params,o.splice(Math.max(0,o.length-e.opcode.params.length),e.opcode.params.length),!0)):n=l(e.opcode.params,d(e.opcode.params,e.args),!1),i.push(" "+e.opcode.mnemonic+(n.length?" "+n.join(", "):""))}else o.push(...d(e.opcode.params,e.args))}return i.length&&i.push(""),a.trace(`disassemble end, line count: ${i.length}`),i}},QmPX:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("TRid");t.Control=class extends o.Widget{}},RMZt:function(e,t,i){"use strict";var o=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))((function(n,s){function r(e){try{d(o.next(e))}catch(e){s(e)}}function a(e){try{d(o.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}d((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const n=i("yfUv"),s=i("ExVU"),r="HuntMethodStore.methodUserTimes";t.hunt_method_persister=new class extends n.Persister{persist_method_user_times(e,t){const i={};for(const t of e)null!=t.user_time.val&&(i[t.id]=t.user_time.val.as("hours"));this.persist_for_server(t,r,i)}load_method_user_times(e,t){return o(this,void 0,void 0,(function*(){const i=yield this.load_for_server(t,r);if(i)for(const t of e){const e=i[t.id];t.set_user_time(null==e?void 0:s.Duration.fromObject({hours:e}))}}))}}},S6Bx:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("wsa1"),n=i("JCZi"),s=i("Tpfs"),r=i("L/3r"),a=i("c5EP"),d=i("hVaW"),l=i("ouMO"),_=new n.AssemblyAnalyser;o.languages.register({id:"psoasm"}),o.languages.setMonarchTokensProvider("psoasm",d.ASM_SYNTAX),o.languages.registerCompletionItemProvider("psoasm",{provideCompletionItems(e,t){const i=e.getValueInRange({startLineNumber:t.lineNumber,endLineNumber:t.lineNumber,startColumn:1,endColumn:t.column});return _.provide_completion_items(i)}}),o.languages.registerSignatureHelpProvider("psoasm",{signatureHelpTriggerCharacters:[" ",","],signatureHelpRetriggerCharacters:[", "],provideSignatureHelp:(e,t)=>_.provide_signature_help(t.lineNumber,t.column)}),o.languages.setLanguageConfiguration("psoasm",{indentationRules:{increaseIndentPattern:/^\s*\d+:/,decreaseIndentPattern:/^\s*(\d+|\.)/},autoClosingPairs:[{open:'"',close:'"'}],surroundingPairs:[{open:'"',close:'"'}],comments:{lineComment:"//"}});class u{constructor(){this.disposer=new s.Disposer,this.model_disposer=this.disposer.add(new s.Disposer),this._model=l.property(void 0),this._did_undo=l.emitter(),this._did_redo=l.emitter(),this._inline_args_mode=l.property(!0),this.model=this._model,this.did_undo=this._did_undo,this.did_redo=this._did_redo,this.undo=new r.SimpleUndo("Text edits",()=>this._did_undo.emit({value:"asm undo"}),()=>this._did_redo.emit({value:"asm undo"})),this.inline_args_mode=this._inline_args_mode,this.has_issues=_.issues.map(e=>e.warnings.length+e.errors.length>0),this.set_inline_args_mode=e=>{this.has_issues.val||(this._inline_args_mode.val=e,_.update_settings({manual_stack:!this.inline_args_mode.val}),this.update_model())},this.quest_changed=()=>{this.update_model()},this.disposer.add_all(a.quest_editor_store.current_quest.observe(this.quest_changed,{call_now:!0}),_.issues.observe(({value:e})=>this.update_model_markers(e),{call_now:!0}))}dispose(){this.disposer.dispose()}setup_editor_model_features(e){let t=e.getAlternativeVersionId(),i=t,o=t;this.model_disposer.add(e.onDidChangeContent(n=>{const s=e.getAlternativeVersionId();so&&(o=i)),this.undo.can_undo.val=!0),i=s,_.update_assembly(n.changes)}))}update_model_markers({warnings:e,errors:t}){const i=this.model.val;i&&o.editor.setModelMarkers(i,"psoasm",e.map(e=>({severity:o.MarkerSeverity.Hint,message:e.message,startLineNumber:e.line_no,endLineNumber:e.line_no,startColumn:e.col,endColumn:e.col+e.length,tags:[o.MarkerTag.Unnecessary]})).concat(t.map(e=>({severity:o.MarkerSeverity.Error,message:e.message,startLineNumber:e.line_no,endLineNumber:e.line_no,startColumn:e.col,endColumn:e.col+e.length}))))}update_model(){this.undo.reset(),this.model_disposer.dispose_all();const e=a.quest_editor_store.current_quest.val;if(e){const t=!this.inline_args_mode.val,i=_.disassemble(e,t),n=this.model_disposer.add(o.editor.createModel(i.join("\n"),"psoasm"));this.setup_editor_model_features(n),this._model.val=n}else this._model.val=void 0}}t.AsmEditorStore=u,t.asm_editor_store=new u},"Sa3/":function(e,t,i){"use strict";var o=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))((function(n,s){function r(e){try{d(o.next(e))}catch(e){s(e)}}function a(e){try{d(o.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}d((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.read_file=function(e){return o(this,void 0,void 0,(function*(){return new Promise((t,i)=>{const o=new FileReader;o.addEventListener("loadend",()=>{o.result instanceof ArrayBuffer?t(o.result):i(new Error("Couldn't read file."))}),o.readAsArrayBuffer(e)})}))}},SoCI:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("xs7i");t.get_areas_for_episode=function(e){return n[e]},t.get_area_variant=function(e,t,i){const o=n[e].find(e=>e.id===t);if(!o)throw new Error(`No area with id ${t}.`);const s=o.area_variants[i];if(!s)throw new Error(`No area variant with id ${i}.`);return s};const n=[];function s(e,t,i,o){const n={id:e,name:t,order:i,area_variants:[]};for(let e=0;e{this.construction_finalized||a.warn(`finalize_construction is never called for ${Object.getPrototypeOf(this).constructor.name}.`)},0)}get id(){return this.element.id}set id(e){this.element.id=e}focus(){this.element.focus()}dispose(){this.element.remove(),this.disposer.dispose(),this.disposed=!0}finalize_construction(e){Object.getPrototypeOf(this)===e&&(this.options.class&&this.element.classList.add(this.options.class),"boolean"==typeof this.options.enabled?this.enabled.val=this.options.enabled:this.options.enabled&&this.enabled.bind_to(this.options.enabled),"string"==typeof this.options.tooltip?this.tooltip.val=this.options.tooltip:this.options.tooltip&&this.tooltip.bind_to(this.options.tooltip),this.construction_finalized=!0)}set_visible(e){this.element.hidden=!e}set_enabled(e){e?this.element.classList.remove("disabled"):this.element.classList.add("disabled")}set_tooltip(e){this.element.title=e}bind_hidden(e,t){this.disposable(s.bind_hidden(e,t))}disposable(e){return this.disposer.add(e)}disposables(...e){this.disposer.add_all(...e)}}},Tpfs:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("GGSb").get("core/observable/Disposer");t.Disposer=class{constructor(...e){this._disposed=!1,this.disposables=e}get length(){return this.disposables.length}get disposed(){return this._disposed}add(e){return this._disposed||this.disposables.push(e),e}insert(e,t){return this._disposed||this.disposables.splice(e,0,t),t}add_all(...e){return this._disposed||this.disposables.push(...e),this}dispose_all(){this.dispose_at(0,this.disposables.length)}dispose(){this.dispose_all(),this._disposed=!0}dispose_at(e,t=1){for(const i of this.disposables.splice(e,t))try{i.dispose()}catch(e){o.warn("Error while disposing.",e)}}}},"Ts/k":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("ouMO"),n=i("n5fr");t.NOOP_UNDO={can_redo:o.property(!1),can_undo:o.property(!1),first_redo:o.property(void 0),first_undo:o.property(void 0),ensure_not_current(){},make_current(){n.undo_manager.current.val=this},redo:()=>!1,reset(){},undo:()=>!1}},VRtl:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("w6HN"),n=i("6cU9"),s=i("oyid"),r=i("PE7g"),a=i("7CyS"),d=i("tyuj"),l=i("7ZX1"),_=i("FXpb");class u extends o.ToolBar{constructor(){const e=new n.FileButton("Open file...",{icon_left:_.Icon.File,accept:".nj, .njm, .xj, .xvm"}),t=new s.CheckBox(!1,{label:"Show skeleton"}),i=new s.CheckBox(!0,{label:"Play animation"}),o=new r.NumberInput(a.PSO_FRAME_RATE,{label:"Frame rate:",min:1,max:240,step:1}),c=new r.NumberInput(1,{label:"Frame:",min:1,max:d.model_store.animation_frame_count,step:1}),p=new l.Label(d.model_store.animation_frame_count.map(e=>`/ ${e}`));super({children:[e,t,i,o,c,p]}),this.disposables(e.files.observe(({value:e})=>{e.length&&d.model_store.load_file(e[0])}),d.model_store.show_skeleton.bind_to(t.checked));const v=d.model_store.current_nj_motion.map(e=>null!=e);this.disposables(i.enabled.bind_to(v),d.model_store.animation_playing.bind_bi(i.checked),o.enabled.bind_to(v),d.model_store.animation_frame_rate.bind_to(o.value),c.enabled.bind_to(v),d.model_store.animation_frame.bind_to(c.value),c.value.bind_to(d.model_store.animation_frame.map(e=>Math.round(e))),p.enabled.bind_to(v)),this.finalize_construction(u.prototype)}}t.Model3DToolBar=u},VwSi:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("kwt4"),n=1296321870;var s;function r(e,t){let i=e.u32();const o=e.u32(),n=e.u16(),r=e.u16(),l=(192&r)>>6,_=15&r,u=[];for(let r=0;r=i)return e.seek_start(s),l(e,t);r=o}return n}function l(e,t){const i=[];for(let n=0;nd.quest_editor_store.undo.make_current(),!0),this.renderer_view.start_rendering(),this.disposables(a.gui_store.tool.observe(({value:e})=>{e===a.GuiTool.QuestEditor?this.renderer_view.start_rendering():this.renderer_view.stop_rendering()})),this.finalize_construction(l.prototype)}resize(e,t){return super.resize(e,t),this.renderer_view.resize(e,t),this}}t.QuestRendererView=l},WJtm:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("TRid"),n=i("FXpb"),s=i("yar8"),r=i("sMN3"),a=i("ouMO"),d=i("nsCy"),l=i("xs7i");i("a0xr");const _=i("ExVU");class u extends o.Widget{constructor(){super(),this.element=n.el.div({class:"hunt_optimizer_OptimizationResultView"},n.el.h2({text:"Ideal Combination of Methods"})),this.disposable(r.hunt_optimizer_stores.observe_current(e=>{this.results_observer&&this.results_observer.dispose(),this.results_observer=e.result.observe(({value:e})=>this.update_table(e),{call_now:!0})},{call_now:!0})),this.finalize_construction(u.prototype)}dispose(){super.dispose(),this.results_observer&&this.results_observer.dispose(),this.table&&this.table.dispose()}update_table(e){this.table&&this.table.dispose();let t=0,i=_.Duration.fromMillis(0);if(e)for(const o of e.optimal_methods)t+=o.runs,i=i.plus(o.total_time);const o=[{title:"Difficulty",fixed:!0,width:80,render_cell:e=>d.Difficulty[e.difficulty],footer:{render_cell:()=>"Totals:"}},{title:"Method",fixed:!0,width:250,render_cell:e=>e.method_name},{title:"Ep.",fixed:!0,width:40,render_cell:e=>l.Episode[e.method_episode]},{title:"Section ID",fixed:!0,width:90,render_cell(e){const t=n.el.span({},...e.section_ids.map(e=>n.section_id_icon(e,{size:17})));return t.style.display="flex",t}},{title:"Time/Run",width:90,text_align:"center",render_cell:e=>e.method_time.toFormat("hh:mm")},{title:"Runs",width:60,text_align:"right",render_cell:e=>e.runs.toFixed(1),tooltip:e=>e.runs.toString(),footer:{render_cell:()=>t.toFixed(1),tooltip:()=>t.toString()}},{title:"Total Hours",width:60,text_align:"right",render_cell:e=>e.total_time.as("hours").toFixed(1),tooltip:e=>e.total_time.as("hours").toString(),footer:{render_cell:()=>i.as("hours").toFixed(1),tooltip:()=>i.as("hours").toString()}}];if(e)for(const t of e.wanted_items){let i=0;for(const o of e.optimal_methods)i+=o.item_counts.get(t)||0;o.push({title:t.name,width:80,text_align:"right",render_cell(e){const i=e.item_counts.get(t);return i?i.toFixed(2):""},tooltip(e){const i=e.item_counts.get(t);return i?i.toString():""},footer:{render_cell:()=>i.toFixed(2),tooltip:()=>i.toString()}})}this.table=new s.Table({class:"hunt_optimizer_OptimizationResultView_table",values:e?a.list_property(void 0,...e.optimal_methods):a.list_property(),columns:o}),this.element.append(this.table.element)}}t.OptimizationResultView=u},X3DM:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("yQqj"),n=i("c5EP");t.RemoveEntityAction=class{constructor(e){this.entity=e,this.description=`Delete ${o.entity_data(e.type).name}`}undo(){const e=n.quest_editor_store.current_quest.val;e&&(e.add_entity(this.entity),n.quest_editor_store.set_selected_entity(this.entity))}redo(){const e=n.quest_editor_store.current_quest.val;e&&e.remove_entity(this.entity)}}},XDYw:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("4mUz");t.parse_area_collision_geometry=function(e){const{data_offset:t}=o.parse_rel(e,!1);e.seek_start(t);const i=e.u32();e.seek_start(i);const n={meshes:[]};for(;e.bytes_left;){const t=e.position,i=e.u32();if(0===i)break;const o={vertices:[],triangles:[]};n.meshes.push(o),e.seek_start(i);const s=e.u32(),r=e.u32(),a=e.u32(),d=e.u32();e.seek_start(r);for(let t=0;t({type:O(e,t),area_id:t.area_id,section_id:t.section_id,position:t.position,rotation:t.rotation,scale:t.scale,unknown:t.unknown,pso_type_id:t.type_id,npc_id:t.npc_id,script_label:Math.round(t.script_label),pso_roaming:t.roaming}))}function O(e,{type_id:t,scale:i,roaming:o,area_id:n}){const s=Math.abs(i.y-1)>1e-5;switch(`${t}, ${o%3}, ${e}`){case"68, 0, 1":return f.NpcType.Booma;case"68, 1, 1":return f.NpcType.Gobooma;case"68, 2, 1":return f.NpcType.Gigobooma;case"99, 0, 1":return f.NpcType.EvilShark;case"99, 1, 1":return f.NpcType.PalShark;case"99, 2, 1":return f.NpcType.GuilShark;case"166, 0, 1":return f.NpcType.Dimenian;case"166, 0, 2":return f.NpcType.Dimenian2;case"166, 1, 1":return f.NpcType.LaDimenian;case"166, 1, 2":return f.NpcType.LaDimenian2;case"166, 2, 1":return f.NpcType.SoDimenian;case"166, 2, 2":return f.NpcType.SoDimenian2;case"214, 0, 2":return f.NpcType.Mericarol;case"214, 1, 2":return f.NpcType.Mericus;case"214, 2, 2":return f.NpcType.Merikle;case"277, 0, 4":return f.NpcType.Boota;case"277, 1, 4":return f.NpcType.ZeBoota;case"277, 2, 4":return f.NpcType.BaBoota;case"279, 0, 4":return f.NpcType.Goran;case"279, 1, 4":return f.NpcType.PyroGoran;case"279, 2, 4":return f.NpcType.GoranDetonator}switch(`${t}, ${o%2}, ${e}`){case"64, 0, 1":return f.NpcType.Hildebear;case"64, 0, 2":return f.NpcType.Hildebear2;case"64, 1, 1":return f.NpcType.Hildeblue;case"64, 1, 2":return f.NpcType.Hildeblue2;case"65, 0, 1":return f.NpcType.RagRappy;case"65, 0, 2":return f.NpcType.RagRappy2;case"65, 0, 4":return f.NpcType.SandRappy;case"65, 1, 1":return f.NpcType.AlRappy;case"65, 1, 2":return f.NpcType.LoveRappy;case"65, 1, 4":return f.NpcType.DelRappy;case"128, 0, 1":return f.NpcType.Dubchic;case"128, 0, 2":return f.NpcType.Dubchic2;case"128, 1, 1":return f.NpcType.Gilchic;case"128, 1, 2":return f.NpcType.Gilchic2;case"212, 0, 2":return f.NpcType.SinowBerill;case"212, 1, 2":return f.NpcType.SinowSpigell;case"213, 0, 2":return f.NpcType.Merillia;case"213, 1, 2":return f.NpcType.Meriltas;case"215, 0, 2":return f.NpcType.UlGibbon;case"215, 1, 2":return f.NpcType.ZolGibbon;case"221, 0, 2":return f.NpcType.Dolmolm;case"221, 1, 2":return f.NpcType.Dolmdarl;case"224, 0, 2":return n>15?f.NpcType.Epsilon:f.NpcType.SinowZoa;case"224, 1, 2":return n>15?f.NpcType.Epsilon:f.NpcType.SinowZele;case"274, 0, 4":return f.NpcType.MerissaA;case"274, 1, 4":return f.NpcType.MerissaAA;case"276, 0, 4":return f.NpcType.Zu;case"276, 1, 4":return f.NpcType.Pazuzu;case"278, 0, 4":return f.NpcType.Dorphon;case"278, 1, 4":return f.NpcType.DorphonEclair;case"281, 0, 4":return s?f.NpcType.SaintMilion:f.NpcType.Kondrieu;case"281, 1, 4":return s?f.NpcType.Shambertin:f.NpcType.Kondrieu}switch(`${t}, ${e}`){case"66, 1":return f.NpcType.Monest;case"66, 2":return f.NpcType.Monest2;case"67, 1":return s?f.NpcType.SavageWolf:f.NpcType.BarbarousWolf;case"67, 2":return s?f.NpcType.SavageWolf2:f.NpcType.BarbarousWolf2;case"96, 1":return f.NpcType.GrassAssassin;case"96, 2":return f.NpcType.GrassAssassin2;case"97, 1":return n>15?f.NpcType.DelLily:s?f.NpcType.PoisonLily:f.NpcType.NarLily;case"97, 2":return n>15?f.NpcType.DelLily:s?f.NpcType.PoisonLily2:f.NpcType.NarLily2;case"98, 1":return f.NpcType.NanoDragon;case"100, 1":return s?f.NpcType.PofuillySlime:f.NpcType.PouillySlime;case"101, 1":return f.NpcType.PanArms;case"101, 2":return f.NpcType.PanArms2;case"129, 1":return f.NpcType.Garanz;case"129, 2":return f.NpcType.Garanz2;case"130, 1":return s?f.NpcType.SinowBeat:f.NpcType.SinowGold;case"131, 1":return f.NpcType.Canadine;case"132, 1":return f.NpcType.Canane;case"133, 1":return f.NpcType.Dubswitch;case"133, 2":return f.NpcType.Dubswitch2;case"160, 1":return f.NpcType.Delsaber;case"160, 2":return f.NpcType.Delsaber2;case"161, 1":return f.NpcType.ChaosSorcerer;case"161, 2":return f.NpcType.ChaosSorcerer2;case"162, 1":return f.NpcType.DarkGunner;case"164, 1":return f.NpcType.ChaosBringer;case"165, 1":return f.NpcType.DarkBelra;case"165, 2":return f.NpcType.DarkBelra2;case"167, 1":return f.NpcType.Bulclaw;case"168, 1":return f.NpcType.Claw;case"192, 1":return f.NpcType.Dragon;case"192, 2":return f.NpcType.GalGryphon;case"193, 1":return f.NpcType.DeRolLe;case"197, 1":return f.NpcType.VolOpt;case"200, 1":return f.NpcType.DarkFalz;case"202, 2":return f.NpcType.OlgaFlow;case"203, 2":return f.NpcType.BarbaRay;case"204, 2":return f.NpcType.GolDragon;case"216, 2":return f.NpcType.Gibbles;case"217, 2":return f.NpcType.Gee;case"218, 2":return f.NpcType.GiGue;case"219, 2":return f.NpcType.Deldepth;case"220, 2":return f.NpcType.Delbiter;case"222, 2":return f.NpcType.Morfos;case"223, 2":return f.NpcType.Recobox;case"225, 2":return f.NpcType.IllGill;case"272, 4":return f.NpcType.Astark;case"273, 4":return s?f.NpcType.SatelliteLizard:f.NpcType.Yowie;case"275, 4":return f.NpcType.Girtablulu}switch(t){case 4:return f.NpcType.FemaleFat;case 5:return f.NpcType.FemaleMacho;case 7:return f.NpcType.FemaleTall;case 10:return f.NpcType.MaleDwarf;case 11:return f.NpcType.MaleFat;case 12:return f.NpcType.MaleMacho;case 13:return f.NpcType.MaleOld;case 25:return f.NpcType.BlueSoldier;case 26:return f.NpcType.RedSoldier;case 27:return f.NpcType.Principal;case 28:return f.NpcType.Tekker;case 29:return f.NpcType.GuildLady;case 30:return f.NpcType.Scientist;case 31:return f.NpcType.Nurse;case 32:return f.NpcType.Irene;case 241:return f.NpcType.ItemShop;case 254:return f.NpcType.Nurse2}return f.NpcType.Unknown}function g(e){const t=new DataView(new ArrayBuffer(4));return e.map(e=>{const i=f.npc_data(e.type),o=null==i.pso_type_id?e.pso_type_id:i.pso_type_id,n=null==i.pso_roaming?e.pso_roaming:i.pso_roaming,s=null==i.pso_regular||i.pso_regular;t.setFloat32(0,e.scale.y),t.setUint32(0,-8388609&t.getUint32(0)|(s?0:8388608));const r=t.getFloat32(0),a={x:e.scale.x,y:r,z:e.scale.z};return{type_id:o,section_id:e.section_id,position:e.position,rotation:e.rotation,scale:a,npc_id:e.npc_id,script_label:e.script_label,roaming:n,area_id:e.area_id,unknown:e.unknown}})}t.parse_quest=function(e,t=!1){const i=w.parse_qst(e);if(!i)return;let o,n;for(const e of i.files){const t=e.name.trim().toLowerCase();t.endsWith(".dat")?o=e:t.endsWith(".bin")&&(n=e)}if(!o)return void E.error("File contains no DAT file.");if(!n)return void E.error("File contains no BIN file.");const a=d.prs_decompress(new l.ArrayBufferCursor(o.data,u.Endianness.Little)),_=p.parse_dat(a),f=_.objs.map(e=>{const t=h.pso_id_to_object_type(e.type_id);return{type:t,id:e.id,group_id:e.group_id,area_id:e.area_id,section_id:e.section_id,position:e.position,rotation:e.rotation,properties:new Map(e.properties.map((e,i)=>3!==i||t!==h.ObjectType.ScriptCollision&&t!==h.ObjectType.ForestConsole&&t!==h.ObjectType.TalkLinkToSupport?4===i&&t===h.ObjectType.RicoMessagePod?["script_label",e]:5===i&&t===h.ObjectType.RicoMessagePod?["script_label_2",e]:[`property_${i}`,e]:["script_label",e])),unknown:e.unknown}}),O=d.prs_decompress(new l.ArrayBufferCursor(n.data,u.Endianness.Little)),g=c.parse_bin(O,function(e,t){const i=new Set([0]);for(const t of e){const e=t.properties.get("script_label");null!=e&&i.add(e);const o=t.properties.get("script_label_2");null!=o&&i.add(o)}for(const e of t)i.add(Math.round(e.script_label));return[...i]}(f,_.npcs),t);let y=v.Episode.I,b=new Map;if(g.object_code.length){let e;for(const t of g.object_code)if(t.type===s.SegmentType.Instructions&&t.labels.includes(0)){e=t;break}e?(y=function(e){const t=e.find(e=>e.opcode===r.Opcode.SET_EPISODE);if(!t)return E.debug("Function 0 has no set_episode instruction."),v.Episode.I;switch(t.args[0].value){default:case 0:return v.Episode.I;case 1:return v.Episode.II;case 2:return v.Episode.IV}}(e.instructions),b=function(e,t,i){const o=new Map;for(const e of i)e.opcode===r.Opcode.BB_MAP_DESIGNATE&&o.set(e.args[0].value,e.args[2].value);return o}(0,0,e.instructions)):E.warn("No instruction for label 0 found.")}else E.warn("File contains no instruction labels.");return{id:g.quest_id,language:g.language,name:g.quest_name,short_description:g.short_description,long_description:g.long_description,episode:y,objects:f,npcs:m(y,_.npcs),dat_unknowns:_.unknowns,object_code:g.object_code,shop_items:g.shop_items,map_designations:b}},t.write_quest_qst=function(e,t){const i=p.write_dat({objs:(o=e.objects,o.map(e=>({type_id:h.object_data(e.type).pso_id,id:e.id,group_id:e.group_id,section_id:e.section_id,position:e.position,rotation:e.rotation,properties:[...e.properties.values()],area_id:e.area_id,unknown:e.unknown}))),npcs:g(e.npcs),unknowns:e.dat_unknowns});var o;const n=c.write_bin(new c.BinFile(e.id,e.language,e.name,e.short_description,e.long_description,e.object_code,e.shop_items)),s=t.lastIndexOf("."),r=-1===s?t.slice(0,11):t.slice(0,Math.min(11,s));return w.write_qst({files:[{name:r+".dat",id:e.id,data:a.prs_compress(new _.ResizableBufferCursor(i,u.Endianness.Little)).array_buffer()},{name:r+".bin",id:e.id,data:a.prs_compress(new l.ArrayBufferCursor(n,u.Endianness.Little)).array_buffer()}]})}},Y3Jw:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("nN8q"),n=i("FXpb");i("8TW1");class s extends o.ResizableWidget{constructor(e,t){super(),this.models=e,this.selected=t,this.element=n.create_element("ul",{class:"viewer_Model3DSelectListView"}),this.list_click=e=>{if(e.target instanceof HTMLLIElement&&e.target.dataset.index){this.selected_element&&this.selected_element.classList.remove("active"),e.target.classList.add("active");const t=parseInt(e.target.dataset.index,10);this.selected_element=e.target,this.selected.val=this.models[t]}},this.element.onclick=this.list_click,e.forEach((e,t)=>{this.element.append(n.create_element("li",{text:e.name,data:{index:t.toString()}}))}),this.disposable(t.observe(({value:e})=>{if(this.selected_element&&(this.selected_element.classList.remove("active"),this.selected_element=void 0),e&&e!==this.selected_model){const t=this.models.indexOf(e);-1!==t&&(this.selected_element=this.element.childNodes[t],this.selected_element.classList.add("active"))}})),this.finalize_construction(s.prototype)}set borders(e){e?(this.element.style.borderLeft="var(--border)",this.element.style.borderRight="var(--border)"):(this.element.style.borderLeft="none",this.element.style.borderRight="none")}}t.Model3DSelectListView=s},YkZX:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("Ftn7"),n=i("Womt"),s=i("c5EP"),r=i("3CEK"),a=i("Tpfs"),d=i("Gc0Z");t.QuestRenderer=class extends o.Renderer{constructor(){super(),this._collision_geometry=new n.Object3D,this._render_geometry=new n.Object3D,this._entity_models=new n.Object3D,this.disposer=new a.Disposer,this.entity_to_mesh=new Map,this.entity_controls=this.disposer.add(new d.QuestEntityControls(this)),this.camera=new n.PerspectiveCamera(60,1,10,1e4),this.disposer.add_all(new r.QuestModelManager(this),s.quest_editor_store.debug.observe(({value:e})=>this.debug=e)),this.init_camera_controls()}get debug(){return super.debug}set debug(e){this.debug!==e&&(super.debug=e,this._render_geometry.visible=e,this.schedule_render())}get collision_geometry(){return this._collision_geometry}set collision_geometry(e){this.scene.remove(this.collision_geometry),this._collision_geometry=e,this.scene.add(e)}set render_geometry(e){this.scene.remove(this._render_geometry),this._render_geometry=e,e.visible=this.debug,this.scene.add(e)}get entity_models(){return this._entity_models}dispose(){super.dispose(),this.disposer.dispose()}set_size(e,t){this.camera.aspect=e/t,this.camera.updateProjectionMatrix(),super.set_size(e,t)}reset_entity_models(){this.scene.remove(this._entity_models),this._entity_models=new n.Group,this.scene.add(this._entity_models),this.entity_to_mesh.clear(),this.schedule_render()}add_entity_model(e){const t=e.userData.entity;this._entity_models.add(e),this.entity_to_mesh.set(t,e),t===s.quest_editor_store.selected_entity.val&&this.entity_controls.mark_selected(e),this.schedule_render()}remove_entity_model(e){const t=this.entity_to_mesh.get(e);t&&(this.entity_to_mesh.delete(e),this._entity_models.remove(t),this.schedule_render())}get_entity_mesh(e){return this.entity_to_mesh.get(e)}}},Yq7v:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("nN8q"),n=i("FXpb"),s=i("5aKR"),r=i("c5EP"),a=i("IjTL"),d=i("yQqj");i("egRq");const l=i("PE7g"),_=i("Tpfs"),u=i("Womt"),c=i("cOX8");class p extends o.ResizableWidget{constructor(){super(),this.element=n.el.div({class:"quest_editor_EntityInfoView",tab_index:-1}),this.no_entity_view=new s.DisabledView("No entity selected."),this.table_element=n.el.table(),this.pos_x_element=this.disposable(new l.NumberInput(0,{width:80,round_to:3})),this.pos_y_element=this.disposable(new l.NumberInput(0,{width:80,round_to:3})),this.pos_z_element=this.disposable(new l.NumberInput(0,{width:80,round_to:3})),this.rot_x_element=this.disposable(new l.NumberInput(0,{width:80,round_to:3})),this.rot_y_element=this.disposable(new l.NumberInput(0,{width:80,round_to:3})),this.rot_z_element=this.disposable(new l.NumberInput(0,{width:80,round_to:3})),this.entity_disposer=new _.Disposer;const e=r.quest_editor_store.selected_entity,t=e.map(e=>null==e),i="quest_editor_EntityInfoView_coord";this.table_element.append(n.el.tr({},n.el.th({text:"Type:"}),this.type_element=n.el.td()),n.el.tr({},n.el.th({text:"Name:"}),this.name_element=n.el.td()),n.el.tr({},n.el.th({text:"Section:"}),this.section_id_element=n.el.td()),n.el.tr({},n.el.th({text:"Position:",col_span:2})),n.el.tr({},n.el.th({text:"X:",class:i}),n.el.td({},this.pos_x_element.element)),n.el.tr({},n.el.th({text:"Y:",class:i}),n.el.td({},this.pos_y_element.element)),n.el.tr({},n.el.th({text:"Z:",class:i}),n.el.td({},this.pos_z_element.element)),n.el.tr({},n.el.th({text:"Rotation:",col_span:2})),n.el.tr({},n.el.th({text:"X:",class:i}),n.el.td({},this.rot_x_element.element)),n.el.tr({},n.el.th({text:"Y:",class:i}),n.el.td({},this.rot_y_element.element)),n.el.tr({},n.el.th({text:"Z:",class:i}),n.el.td({},this.rot_z_element.element))),this.element.append(this.table_element,this.no_entity_view.element),this.element.addEventListener("focus",()=>r.quest_editor_store.undo.make_current(),!0),this.bind_hidden(this.table_element,t),this.disposables(this.no_entity_view.visible.bind_to(t),e.observe(({value:e})=>{if(this.entity_disposer.dispose_all(),e){this.type_element.innerText=e instanceof a.QuestNpcModel?"NPC":"Object";const t=d.entity_data(e.type).name;this.name_element.innerText=t,this.name_element.title=t,this.entity_disposer.add(e.section_id.observe(({value:e})=>{this.section_id_element.innerText=e.toString()},{call_now:!0})),this.observe_entity(e)}})),this.finalize_construction(p.prototype)}dispose(){super.dispose(),this.entity_disposer.dispose()}observe_entity(e){const t=e.position;this.entity_disposer.add_all(t.observe(({value:{x:e,y:t,z:i}})=>{this.pos_x_element.value.val=e,this.pos_y_element.value.val=t,this.pos_z_element.value.val=i},{call_now:!0}),this.pos_x_element.value.observe(({value:i})=>r.quest_editor_store.translate_entity(e,e.section.val,e.section.val,t.val,new u.Vector3(i,t.val.y,t.val.z),!1)),this.pos_y_element.value.observe(({value:i})=>r.quest_editor_store.translate_entity(e,e.section.val,e.section.val,t.val,new u.Vector3(t.val.x,i,t.val.z),!1)),this.pos_z_element.value.observe(({value:i})=>r.quest_editor_store.translate_entity(e,e.section.val,e.section.val,t.val,new u.Vector3(t.val.x,t.val.y,i),!1)));const i=e.rotation;this.entity_disposer.add_all(i.observe(({value:{x:e,y:t,z:i}})=>{this.rot_x_element.value.val=c.rad_to_deg(e),this.rot_y_element.value.val=c.rad_to_deg(t),this.rot_z_element.value.val=c.rad_to_deg(i)},{call_now:!0}),this.rot_x_element.value.observe(({value:t})=>r.quest_editor_store.rotate_entity(e,i.val,new u.Euler(c.deg_to_rad(t),i.val.y,i.val.z,"ZXY"),!1)),this.rot_y_element.value.observe(({value:t})=>r.quest_editor_store.rotate_entity(e,i.val,new u.Euler(i.val.x,c.deg_to_rad(t),i.val.z,"ZXY"),!1)),this.rot_z_element.value.observe(({value:t})=>r.quest_editor_store.rotate_entity(e,i.val,new u.Euler(i.val.x,i.val.y,c.deg_to_rad(t),"ZXY"),!1)))}}t.EntityInfoView=p},Yuai:function(e,t,i){"use strict";var o=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))((function(n,s){function r(e){try{d(o.next(e))}catch(e){s(e)}}function a(e){try{d(o.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}d((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.load_array_buffer=function(e){return o(this,void 0,void 0,(function*(){return(yield fetch("/assets"+e)).arrayBuffer()}))}},ZPAt:function(e,t,i){"use strict";var o,n,s;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Any=0]="Any",e[e.Byte=1]="Byte",e[e.Word=2]="Word",e[e.DWord=3]="DWord",e[e.Float=4]="Float",e[e.Label=5]="Label",e[e.ILabel=6]="ILabel",e[e.DLabel=7]="DLabel",e[e.SLabel=8]="SLabel",e[e.String=9]="String",e[e.ILabelVar=10]="ILabelVar",e[e.RegRef=11]="RegRef",e[e.RegTupRef=12]="RegTupRef",e[e.RegRefVar=13]="RegRefVar",e[e.Pointer=14]="Pointer"}(o=t.Kind||(t.Kind={})),t.TYPE_ANY={kind:o.Any},t.TYPE_BYTE={kind:o.Byte},t.TYPE_WORD={kind:o.Word},t.TYPE_DWORD={kind:o.DWord},t.TYPE_FLOAT={kind:o.Float},t.TYPE_LABEL={kind:o.Label},t.TYPE_I_LABEL={kind:o.ILabel},t.TYPE_D_LABEL={kind:o.DLabel},t.TYPE_S_LABEL={kind:o.SLabel},t.TYPE_STRING={kind:o.String},t.TYPE_I_LABEL_VAR={kind:o.ILabelVar},t.TYPE_REG_REF={kind:o.RegRef},t.TYPE_REG_REF_VAR={kind:o.RegRefVar},t.TYPE_POINTER={kind:o.Pointer},t.MIN_SIGNED_DWORD_VALUE=-Math.pow(2,31),t.MAX_SIGNED_DWORD_VALUE=Math.pow(2,31)-1,t.MIN_UNSIGNED_DWORD_VALUE=0,t.MAX_UNSIGNED_DWORD_VALUE=Math.pow(2,32)-1,t.MIN_DWORD_VALUE=t.MIN_SIGNED_DWORD_VALUE,t.MAX_DWORD_VALUE=t.MAX_UNSIGNED_DWORD_VALUE,function(e){e[e.Read=0]="Read",e[e.Write=1]="Write",e[e.ReadWrite=2]="ReadWrite"}(n=t.ParamAccess||(t.ParamAccess={}));class r{constructor(e,t,i){this.type=e,this.doc=t,this.access=i}}t.Param=r,function(e){e[e.Push=0]="Push",e[e.Pop=1]="Pop"}(s=t.StackInteraction||(t.StackInteraction={})),t.OPCODES=[],t.OPCODES_BY_MNEMONIC=new Map;class a{constructor(e,t,i,o,n){this.code=e,this.mnemonic=t,this.doc=i,this.size=this.code<256?1:2,this.params=o,this.stack=n}}t.Opcode=a,a.NOP=t.OPCODES[0]=new a(0,"nop","No operation, does nothing.",[],void 0),a.RET=t.OPCODES[1]=new a(1,"ret","Returns control to caller.",[],void 0),a.SYNC=t.OPCODES[2]=new a(2,"sync","Yields control for the rest of the current frame. Execution will continue the following frame.",[],void 0),a.EXIT=t.OPCODES[3]=new a(3,"exit",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.THREAD=t.OPCODES[4]=new a(4,"thread","Starts a new thread. Thread execution will start at the given label.\nOften used to check a register every frame. Make sure to yield control with sync when looping.",[new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.VA_START=t.OPCODES[5]=new a(5,"va_start","Initializes a variable argument list.\nMake sure to call va_end after va_start and va_call.",[],void 0),a.VA_END=t.OPCODES[6]=new a(6,"va_end","Restores the registers overwritten by arg_push* instructions.\nCalled after va_call.",[],void 0),a.VA_CALL=t.OPCODES[7]=new a(7,"va_call","Calls the variable argument function at the given label.\nCalled after initializing the argument list with va_start and pushing arguments onto the stack with arg_push* instructions. Make sure to call va_end afterwards.",[new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.LET=t.OPCODES[8]=new a(8,"let","Sets the first register's value to second one's value.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0)],void 0),a.LETI=t.OPCODES[9]=new a(9,"leti","Sets a register to the given value.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],void 0),a.LETB=t.OPCODES[10]=new a(10,"letb","Sets a register to the given value.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_BYTE,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_BYTE,void 0,void 0)],void 0),a.LETW=t.OPCODES[11]=new a(11,"letw","Sets a register to the given value.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_WORD,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_WORD,void 0,void 0)],void 0),a.LETA=t.OPCODES[12]=new a(12,"leta","Sets the first register to the memory address of the second register. Not used by Sega.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_POINTER,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.LETO=t.OPCODES[13]=new a(13,"leto","Sets a register to the memory address of the given label. Not used by Sega.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_POINTER,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_LABEL,void 0,void 0)],void 0),a.UNKNOWN_0E=t.OPCODES[14]=new a(14,"unknown_0e",void 0,[],void 0),a.UNKNOWN_0F=t.OPCODES[15]=new a(15,"unknown_0f",void 0,[],void 0),a.SET=t.OPCODES[16]=new a(16,"set","Sets a register to 1.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.CLEAR=t.OPCODES[17]=new a(17,"clear","Sets a register to 0.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.REV=t.OPCODES[18]=new a(18,"rev","Sets a register to 1 if its current value is 0, otherwise sets it to 0.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.ReadWrite)]},void 0,void 0)],void 0),a.GSET=t.OPCODES[19]=new a(19,"gset",void 0,[new r(t.TYPE_WORD,void 0,void 0)],void 0),a.GCLEAR=t.OPCODES[20]=new a(20,"gclear",void 0,[new r(t.TYPE_WORD,void 0,void 0)],void 0),a.GREV=t.OPCODES[21]=new a(21,"grev",void 0,[new r(t.TYPE_WORD,void 0,void 0)],void 0),a.GLET=t.OPCODES[22]=new a(22,"glet",void 0,[new r(t.TYPE_WORD,void 0,void 0)],void 0),a.GGET=t.OPCODES[23]=new a(23,"gget","Sets a register to value of the given flag.",[new r(t.TYPE_WORD,void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_WORD,void 0,n.Write)]},void 0,void 0)],void 0),a.ADD=t.OPCODES[24]=new a(24,"add",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0)],void 0),a.ADDI=t.OPCODES[25]=new a(25,"addi",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],void 0),a.SUB=t.OPCODES[26]=new a(26,"sub",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0)],void 0),a.SUBI=t.OPCODES[27]=new a(27,"subi",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],void 0),a.MUL=t.OPCODES[28]=new a(28,"mul",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0)],void 0),a.MULI=t.OPCODES[29]=new a(29,"muli",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],void 0),a.DIV=t.OPCODES[30]=new a(30,"div",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0)],void 0),a.DIVI=t.OPCODES[31]=new a(31,"divi",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],void 0),a.AND=t.OPCODES[32]=new a(32,"and",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0)],void 0),a.ANDI=t.OPCODES[33]=new a(33,"andi",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],void 0),a.OR=t.OPCODES[34]=new a(34,"or",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0)],void 0),a.ORI=t.OPCODES[35]=new a(35,"ori",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],void 0),a.XOR=t.OPCODES[36]=new a(36,"xor",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0)],void 0),a.XORI=t.OPCODES[37]=new a(37,"xori",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],void 0),a.MOD=t.OPCODES[38]=new a(38,"mod",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0)],void 0),a.MODI=t.OPCODES[39]=new a(39,"modi",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],void 0),a.JMP=t.OPCODES[40]=new a(40,"jmp",void 0,[new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.CALL=t.OPCODES[41]=new a(41,"call",void 0,[new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.JMP_ON=t.OPCODES[42]=new a(42,"jmp_on",void 0,[new r(t.TYPE_I_LABEL,void 0,void 0),new r(t.TYPE_REG_REF_VAR,void 0,n.Read)],void 0),a.JMP_OFF=t.OPCODES[43]=new a(43,"jmp_off",void 0,[new r(t.TYPE_I_LABEL,void 0,void 0),new r(t.TYPE_REG_REF_VAR,void 0,n.Read)],void 0),a.JMP_E=t.OPCODES[44]=new a(44,"jmp_=",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.JMPI_E=t.OPCODES[45]=new a(45,"jmpi_=",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.JMP_NE=t.OPCODES[46]=new a(46,"jmp_!=",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.JMPI_NE=t.OPCODES[47]=new a(47,"jmpi_!=",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.UJMP_G=t.OPCODES[48]=new a(48,"ujmp_>",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.UJMPI_G=t.OPCODES[49]=new a(49,"ujmpi_>",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.JMP_G=t.OPCODES[50]=new a(50,"jmp_>",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.JMPI_G=t.OPCODES[51]=new a(51,"jmpi_>",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.UJMP_L=t.OPCODES[52]=new a(52,"ujmp_<",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.UJMPI_L=t.OPCODES[53]=new a(53,"ujmpi_<",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.JMP_L=t.OPCODES[54]=new a(54,"jmp_<",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.JMPI_L=t.OPCODES[55]=new a(55,"jmpi_<",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.UJMP_GE=t.OPCODES[56]=new a(56,"ujmp_>=",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.UJMPI_GE=t.OPCODES[57]=new a(57,"ujmpi_>=",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.JMP_GE=t.OPCODES[58]=new a(58,"jmp_>=",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.JMPI_GE=t.OPCODES[59]=new a(59,"jmpi_>=",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.UJMP_LE=t.OPCODES[60]=new a(60,"ujmp_<=",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.UJMPI_LE=t.OPCODES[61]=new a(61,"ujmpi_<=",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.JMP_LE=t.OPCODES[62]=new a(62,"jmp_<=",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.JMPI_LE=t.OPCODES[63]=new a(63,"jmpi_<=",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.SWITCH_JMP=t.OPCODES[64]=new a(64,"switch_jmp",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_I_LABEL_VAR,void 0,void 0)],void 0),a.SWITCH_CALL=t.OPCODES[65]=new a(65,"switch_call",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_I_LABEL_VAR,void 0,void 0)],void 0),a.STACK_PUSH=t.OPCODES[66]=new a(66,"stack_push",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.STACK_POP=t.OPCODES[67]=new a(67,"stack_pop",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.STACK_PUSHM=t.OPCODES[68]=new a(68,"stack_pushm","Pushes the values of an arbitrary amount of registers onto the stack.",[new r(t.TYPE_REG_REF,void 0,n.Read),new r(t.TYPE_DWORD,void 0,void 0)],void 0),a.STACK_POPM=t.OPCODES[69]=new a(69,"stack_popm","Pops an arbitrary amount of values from the stack and writes them to registers.",[new r(t.TYPE_REG_REF,void 0,n.Write),new r(t.TYPE_DWORD,void 0,void 0)],void 0),a.UNKNOWN_46=t.OPCODES[70]=new a(70,"unknown_46",void 0,[],void 0),a.UNKNOWN_47=t.OPCODES[71]=new a(71,"unknown_47",void 0,[],void 0),a.ARG_PUSHR=t.OPCODES[72]=new a(72,"arg_pushr","Pushes the value of the given register onto the stack.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],s.Push),a.ARG_PUSHL=t.OPCODES[73]=new a(73,"arg_pushl","Pushes the given value onto the stack.",[new r(t.TYPE_DWORD,void 0,void 0)],s.Push),a.ARG_PUSHB=t.OPCODES[74]=new a(74,"arg_pushb","Pushes the given value onto the stack.",[new r(t.TYPE_BYTE,void 0,void 0)],s.Push),a.ARG_PUSHW=t.OPCODES[75]=new a(75,"arg_pushw","Pushes the given value onto the stack.",[new r(t.TYPE_WORD,void 0,void 0)],s.Push),a.ARG_PUSHA=t.OPCODES[76]=new a(76,"arg_pusha","Pushes the memory address of the given register onto the stack. Not used by Sega.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],s.Push),a.ARG_PUSHO=t.OPCODES[77]=new a(77,"arg_pusho","Pushes the memory address of the given label onto the stack. Not used by Sega.",[new r(t.TYPE_LABEL,void 0,void 0)],s.Push),a.ARG_PUSHS=t.OPCODES[78]=new a(78,"arg_pushs","Pushes the given value onto the stack.",[new r(t.TYPE_STRING,void 0,void 0)],s.Push),a.UNKNOWN_4F=t.OPCODES[79]=new a(79,"unknown_4f",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.MESSAGE=t.OPCODES[80]=new a(80,"message",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_STRING,void 0,void 0)],s.Pop),a.LIST=t.OPCODES[81]=new a(81,"list","Used to display a list of items and retrieve the item selected by the player.\nList items should be seperated by newlines. The selected item's index will be written to the given register.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_BYTE,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_STRING,void 0,void 0)],s.Pop),a.FADEIN=t.OPCODES[82]=new a(82,"fadein",void 0,[],void 0),a.FADEOUT=t.OPCODES[83]=new a(83,"fadeout",void 0,[],void 0),a.SE=t.OPCODES[84]=new a(84,"se",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.BGM=t.OPCODES[85]=new a(85,"bgm",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_56=t.OPCODES[86]=new a(86,"unknown_56",void 0,[],void 0),a.UNKNOWN_57=t.OPCODES[87]=new a(87,"unknown_57",void 0,[],void 0),a.ENABLE=t.OPCODES[88]=new a(88,"enable",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.DISABLE=t.OPCODES[89]=new a(89,"disable",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.WINDOW_MSG=t.OPCODES[90]=new a(90,"window_msg",void 0,[new r(t.TYPE_STRING,void 0,void 0)],s.Pop),a.ADD_MSG=t.OPCODES[91]=new a(91,"add_msg",void 0,[new r(t.TYPE_STRING,void 0,void 0)],s.Pop),a.MESEND=t.OPCODES[92]=new a(92,"mesend",void 0,[],void 0),a.GETTIME=t.OPCODES[93]=new a(93,"gettime",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.WINEND=t.OPCODES[94]=new a(94,"winend",void 0,[],void 0),a.UNKNOWN_5F=t.OPCODES[95]=new a(95,"unknown_5f",void 0,[],void 0),a.NPC_CRT_V3=t.OPCODES[96]=new a(96,"npc_crt_v3",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.NPC_STOP=t.OPCODES[97]=new a(97,"npc_stop",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.NPC_PLAY=t.OPCODES[98]=new a(98,"npc_play",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.NPC_KILL=t.OPCODES[99]=new a(99,"npc_kill",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.NPC_NONT=t.OPCODES[100]=new a(100,"npc_nont",void 0,[],void 0),a.NPC_TALK=t.OPCODES[101]=new a(101,"npc_talk",void 0,[],void 0),a.NPC_CRP_V3=t.OPCODES[102]=new a(102,"npc_crp_v3",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read),new r(t.TYPE_ANY,void 0,n.Read),new r(t.TYPE_ANY,void 0,n.Read),new r(t.TYPE_I_LABEL,void 0,n.Read),new r(t.TYPE_ANY,void 0,n.Read),new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.UNKNOWN_67=t.OPCODES[103]=new a(103,"unknown_67",void 0,[],void 0),a.CREATE_PIPE=t.OPCODES[104]=new a(104,"create_pipe",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.P_HPSTAT_V3=t.OPCODES[105]=new a(105,"p_hpstat_v3",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.P_DEAD_V3=t.OPCODES[106]=new a(106,"p_dead_v3",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_DWORD,"Player slot.",void 0)],s.Pop),a.P_DISABLEWARP=t.OPCODES[107]=new a(107,"p_disablewarp",void 0,[],void 0),a.P_ENABLEWARP=t.OPCODES[108]=new a(108,"p_enablewarp",void 0,[],void 0),a.P_MOVE_V3=t.OPCODES[109]=new a(109,"p_move_v3",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.P_LOOK=t.OPCODES[110]=new a(110,"p_look",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_6F=t.OPCODES[111]=new a(111,"unknown_6f",void 0,[],void 0),a.P_ACTION_DISABLE=t.OPCODES[112]=new a(112,"p_action_disable",void 0,[],void 0),a.P_ACTION_ENABLE=t.OPCODES[113]=new a(113,"p_action_enable",void 0,[],void 0),a.DISABLE_MOVEMENT1=t.OPCODES[114]=new a(114,"disable_movement1",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.ENABLE_MOVEMENT1=t.OPCODES[115]=new a(115,"enable_movement1",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.P_NONCOL=t.OPCODES[116]=new a(116,"p_noncol",void 0,[],void 0),a.P_COL=t.OPCODES[117]=new a(117,"p_col",void 0,[],void 0),a.P_SETPOS=t.OPCODES[118]=new a(118,"p_setpos","Sets a player's position.",[new r(t.TYPE_DWORD,"Player slot.",void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"X coordinate.",n.Read),new r(t.TYPE_DWORD,"Y coordinate.",n.Read),new r(t.TYPE_DWORD,"Z coordinate.",n.Read),new r(t.TYPE_DWORD,"Y-axis rotation.",n.Read)]},void 0,void 0)],s.Pop),a.P_RETURN_GUILD=t.OPCODES[119]=new a(119,"p_return_guild",void 0,[],void 0),a.P_TALK_GUILD=t.OPCODES[120]=new a(120,"p_talk_guild",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.NPC_TALK_PL_V3=t.OPCODES[121]=new a(121,"npc_talk_pl_v3",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.NPC_TALK_KILL=t.OPCODES[122]=new a(122,"npc_talk_kill",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.NPC_CRTPK_V3=t.OPCODES[123]=new a(123,"npc_crtpk_v3",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.NPC_CRPPK_V3=t.OPCODES[124]=new a(124,"npc_crppk_v3",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.NPC_CRPTALK_V3=t.OPCODES[125]=new a(125,"npc_crptalk_v3",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.P_LOOK_AT_V1=t.OPCODES[126]=new a(126,"p_look_at_v1",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.NPC_CRP_ID_V3=t.OPCODES[127]=new a(127,"npc_crp_id_v3",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.CAM_QUAKE=t.OPCODES[128]=new a(128,"cam_quake",void 0,[],void 0),a.CAM_ADJ=t.OPCODES[129]=new a(129,"cam_adj",void 0,[],void 0),a.CAM_ZMIN=t.OPCODES[130]=new a(130,"cam_zmin",void 0,[],void 0),a.CAM_ZMOUT=t.OPCODES[131]=new a(131,"cam_zmout",void 0,[],void 0),a.CAM_PAN_V3=t.OPCODES[132]=new a(132,"cam_pan_v3",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0)],void 0),a.GAME_LEV_SUPER=t.OPCODES[133]=new a(133,"game_lev_super",void 0,[],void 0),a.GAME_LEV_RESET=t.OPCODES[134]=new a(134,"game_lev_reset",void 0,[],void 0),a.POS_PIPE_V3=t.OPCODES[135]=new a(135,"pos_pipe_v3","Create a telepipe at a specific position for the given player slot that takes players back to Pioneer 2 or the Lab.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"X coordinate.",n.Read),new r(t.TYPE_DWORD,"Y coordinate.",n.Read),new r(t.TYPE_DWORD,"Z coordinate.",n.Read),new r(t.TYPE_DWORD,"Player slot.",n.Read)]},void 0,void 0)],void 0),a.IF_ZONE_CLEAR=t.OPCODES[136]=new a(136,"if_zone_clear",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0)],void 0),a.CHK_ENE_NUM=t.OPCODES[137]=new a(137,"chk_ene_num","Retrieves the amount of enemies killed during the quest.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.UNHIDE_OBJ=t.OPCODES[138]=new a(138,"unhide_obj",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0)],void 0),a.UNHIDE_ENE=t.OPCODES[139]=new a(139,"unhide_ene",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0)],void 0),a.AT_COORDS_CALL=t.OPCODES[140]=new a(140,"at_coords_call",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_I_LABEL,void 0,n.Read)]},void 0,void 0)],void 0),a.AT_COORDS_TALK=t.OPCODES[141]=new a(141,"at_coords_talk",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_I_LABEL,void 0,n.Read)]},void 0,void 0)],void 0),a.COL_NPCIN=t.OPCODES[142]=new a(142,"col_npcin",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_I_LABEL,void 0,n.Read)]},void 0,void 0)],void 0),a.COL_NPCINR=t.OPCODES[143]=new a(143,"col_npcinr",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.SWITCH_ON=t.OPCODES[144]=new a(144,"switch_on",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.SWITCH_OFF=t.OPCODES[145]=new a(145,"switch_off",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.PLAYBGM_EPI=t.OPCODES[146]=new a(146,"playbgm_epi",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.SET_MAINWARP=t.OPCODES[147]=new a(147,"set_mainwarp",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.SET_OBJ_PARAM=t.OPCODES[148]=new a(148,"set_obj_param","Creates a targetable object.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"X coordinate.",n.Read),new r(t.TYPE_DWORD,"Y coordinate.",n.Read),new r(t.TYPE_DWORD,"Z coordinate.",n.Read),new r(t.TYPE_DWORD,"Collision radius.",n.Read),new r(t.TYPE_I_LABEL,"Function label.",n.Read),new r(t.TYPE_DWORD,"Vertical position of the cursor.",n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},"Object handle.",void 0)],void 0),a.SET_FLOOR_HANDLER=t.OPCODES[149]=new a(149,"set_floor_handler",void 0,[new r(t.TYPE_DWORD,"Floor number.",void 0),new r(t.TYPE_I_LABEL,"Handler function label.",void 0)],s.Pop),a.CLR_FLOOR_HANDLER=t.OPCODES[150]=new a(150,"clr_floor_handler",void 0,[new r(t.TYPE_DWORD,"Floor number.",void 0)],s.Pop),a.COL_PLINAW=t.OPCODES[151]=new a(151,"col_plinaw",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.HUD_HIDE=t.OPCODES[152]=new a(152,"hud_hide",void 0,[],void 0),a.HUD_SHOW=t.OPCODES[153]=new a(153,"hud_show",void 0,[],void 0),a.CINE_ENABLE=t.OPCODES[154]=new a(154,"cine_enable",void 0,[],void 0),a.CINE_DISABLE=t.OPCODES[155]=new a(155,"cine_disable",void 0,[],void 0),a.UNKNOWN_9C=t.OPCODES[156]=new a(156,"unknown_9c",void 0,[],void 0),a.UNKNOWN_9D=t.OPCODES[157]=new a(157,"unknown_9d",void 0,[],void 0),a.UNKNOWN_9E=t.OPCODES[158]=new a(158,"unknown_9e",void 0,[],void 0),a.UNKNOWN_9F=t.OPCODES[159]=new a(159,"unknown_9f",void 0,[],void 0),a.UNKNOWN_A0=t.OPCODES[160]=new a(160,"unknown_a0",void 0,[],void 0),a.SET_QT_FAILURE=t.OPCODES[161]=new a(161,"set_qt_failure",void 0,[new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.SET_QT_SUCCESS=t.OPCODES[162]=new a(162,"set_qt_success",void 0,[new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.CLR_QT_FAILURE=t.OPCODES[163]=new a(163,"clr_qt_failure",void 0,[],void 0),a.CLR_QT_SUCCESS=t.OPCODES[164]=new a(164,"clr_qt_success",void 0,[],void 0),a.SET_QT_CANCEL=t.OPCODES[165]=new a(165,"set_qt_cancel",void 0,[new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.CLR_QT_CANCEL=t.OPCODES[166]=new a(166,"clr_qt_cancel",void 0,[],void 0),a.UNKNOWN_A7=t.OPCODES[167]=new a(167,"unknown_a7",void 0,[],void 0),a.PL_WALK_V3=t.OPCODES[168]=new a(168,"pl_walk_v3",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.UNKNOWN_A9=t.OPCODES[169]=new a(169,"unknown_a9",void 0,[],void 0),a.UNKNOWN_AA=t.OPCODES[170]=new a(170,"unknown_aa",void 0,[],void 0),a.UNKNOWN_AB=t.OPCODES[171]=new a(171,"unknown_ab",void 0,[],void 0),a.UNKNOWN_AC=t.OPCODES[172]=new a(172,"unknown_ac",void 0,[],void 0),a.UNKNOWN_AD=t.OPCODES[173]=new a(173,"unknown_ad",void 0,[],void 0),a.UNKNOWN_AE=t.OPCODES[174]=new a(174,"unknown_ae",void 0,[],void 0),a.UNKNOWN_AF=t.OPCODES[175]=new a(175,"unknown_af",void 0,[],void 0),a.PL_ADD_MESETA=t.OPCODES[176]=new a(176,"pl_add_meseta",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.THREAD_STG=t.OPCODES[177]=new a(177,"thread_stg",void 0,[new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.DEL_OBJ_PARAM=t.OPCODES[178]=new a(178,"del_obj_param",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},"Object handle.",void 0)],void 0),a.ITEM_CREATE=t.OPCODES[179]=new a(179,"item_create",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.ITEM_CREATE2=t.OPCODES[180]=new a(180,"item_create2",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.ITEM_DELETE=t.OPCODES[181]=new a(181,"item_delete",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.ITEM_DELETE2=t.OPCODES[182]=new a(182,"item_delete2","Deletes an item from the player's inventory.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.ITEM_CHECK=t.OPCODES[183]=new a(183,"item_check",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.SETEVT=t.OPCODES[184]=new a(184,"setevt",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.GET_DIFFLVL=t.OPCODES[185]=new a(185,"get_difflvl","Sets the given register to the current difficulty. 0 For normal, 1 for hard and 2 for both very hard and ultimate.\nUse get_difficulty_level2 if you want to differentiate between very hard and ultimate.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.SET_QT_EXIT=t.OPCODES[186]=new a(186,"set_qt_exit",void 0,[new r(t.TYPE_I_LABEL,void 0,void 0)],void 0),a.CLR_QT_EXIT=t.OPCODES[187]=new a(187,"clr_qt_exit",void 0,[],void 0),a.UNKNOWN_BC=t.OPCODES[188]=new a(188,"unknown_bc",void 0,[],void 0),a.UNKNOWN_BD=t.OPCODES[189]=new a(189,"unknown_bd",void 0,[],void 0),a.UNKNOWN_BE=t.OPCODES[190]=new a(190,"unknown_be",void 0,[],void 0),a.UNKNOWN_BF=t.OPCODES[191]=new a(191,"unknown_bf",void 0,[],void 0),a.PARTICLE_V3=t.OPCODES[192]=new a(192,"particle_v3",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.NPC_TEXT=t.OPCODES[193]=new a(193,"npc_text",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_STRING,void 0,void 0)],s.Pop),a.NPC_CHKWARP=t.OPCODES[194]=new a(194,"npc_chkwarp",void 0,[],void 0),a.PL_PKOFF=t.OPCODES[195]=new a(195,"pl_pkoff",void 0,[],void 0),a.MAP_DESIGNATE=t.OPCODES[196]=new a(196,"map_designate",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.MASTERKEY_ON=t.OPCODES[197]=new a(197,"masterkey_on",void 0,[],void 0),a.MASTERKEY_OFF=t.OPCODES[198]=new a(198,"masterkey_off",void 0,[],void 0),a.WINDOW_TIME=t.OPCODES[199]=new a(199,"window_time",void 0,[],void 0),a.WINEND_TIME=t.OPCODES[200]=new a(200,"winend_time",void 0,[],void 0),a.WINSET_TIME=t.OPCODES[201]=new a(201,"winset_time",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.GETMTIME=t.OPCODES[202]=new a(202,"getmtime",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.SET_QUEST_BOARD_HANDLER=t.OPCODES[203]=new a(203,"set_quest_board_handler",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0),new r(t.TYPE_STRING,void 0,void 0)],s.Pop),a.CLEAR_QUEST_BOARD_HANDLER=t.OPCODES[204]=new a(204,"clear_quest_board_handler",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.PARTICLE_ID_V3=t.OPCODES[205]=new a(205,"particle_id_v3",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0)],void 0),a.NPC_CRPTALK_ID_V3=t.OPCODES[206]=new a(206,"npc_crptalk_id_v3",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.NPC_LANG_CLEAN=t.OPCODES[207]=new a(207,"npc_lang_clean",void 0,[],void 0),a.PL_PKON=t.OPCODES[208]=new a(208,"pl_pkon",void 0,[],void 0),a.PL_CHK_ITEM2=t.OPCODES[209]=new a(209,"pl_chk_item2",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.ENABLE_MAINMENU=t.OPCODES[210]=new a(210,"enable_mainmenu",void 0,[],void 0),a.DISABLE_MAINMENU=t.OPCODES[211]=new a(211,"disable_mainmenu",void 0,[],void 0),a.START_BATTLEBGM=t.OPCODES[212]=new a(212,"start_battlebgm",void 0,[],void 0),a.END_BATTLEBGM=t.OPCODES[213]=new a(213,"end_battlebgm",void 0,[],void 0),a.DISP_MSG_QB=t.OPCODES[214]=new a(214,"disp_msg_qb",void 0,[new r(t.TYPE_STRING,void 0,void 0)],s.Pop),a.CLOSE_MSG_QB=t.OPCODES[215]=new a(215,"close_msg_qb",void 0,[],void 0),a.SET_EVENTFLAG_V3=t.OPCODES[216]=new a(216,"set_eventflag_v3",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.SYNC_LETI=t.OPCODES[217]=new a(217,"sync_leti",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],void 0),a.SET_RETURNHUNTER=t.OPCODES[218]=new a(218,"set_returnhunter",void 0,[],void 0),a.SET_RETURNCITY=t.OPCODES[219]=new a(219,"set_returncity",void 0,[],void 0),a.LOAD_PVR=t.OPCODES[220]=new a(220,"load_pvr",void 0,[],void 0),a.LOAD_MIDI=t.OPCODES[221]=new a(221,"load_midi",void 0,[],void 0),a.UNKNOWN_DE=t.OPCODES[222]=new a(222,"unknown_de",void 0,[],void 0),a.NPC_PARAM_V3=t.OPCODES[223]=new a(223,"npc_param_v3",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.PAD_DRAGON=t.OPCODES[224]=new a(224,"pad_dragon",void 0,[],void 0),a.CLEAR_MAINWARP=t.OPCODES[225]=new a(225,"clear_mainwarp",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.PCAM_PARAM_V3=t.OPCODES[226]=new a(226,"pcam_param_v3",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.START_SETEVT_V3=t.OPCODES[227]=new a(227,"start_setevt_v3",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.WARP_ON=t.OPCODES[228]=new a(228,"warp_on",void 0,[],void 0),a.WARP_OFF=t.OPCODES[229]=new a(229,"warp_off",void 0,[],void 0),a.GET_SLOTNUMBER=t.OPCODES[230]=new a(230,"get_slotnumber",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.GET_SERVERNUMBER=t.OPCODES[231]=new a(231,"get_servernumber",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.SET_EVENTFLAG2=t.OPCODES[232]=new a(232,"set_eventflag2",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],s.Pop),a.RES=t.OPCODES[233]=new a(233,"res",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.UNKNOWN_EA=t.OPCODES[234]=new a(234,"unknown_ea",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],void 0),a.ENABLE_BGMCTRL=t.OPCODES[235]=new a(235,"enable_bgmctrl",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.SW_SEND=t.OPCODES[236]=new a(236,"sw_send",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.CREATE_BGMCTRL=t.OPCODES[237]=new a(237,"create_bgmctrl",void 0,[],void 0),a.PL_ADD_MESETA2=t.OPCODES[238]=new a(238,"pl_add_meseta2",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.SYNC_REGISTER=t.OPCODES[239]=new a(239,"sync_register",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.SEND_REGWORK=t.OPCODES[240]=new a(240,"send_regwork",void 0,[],void 0),a.LETI_FIXED_CAMERA_V3=t.OPCODES[241]=new a(241,"leti_fixed_camera_v3",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0)],void 0),a.DEFAULT_CAMERA_POS1=t.OPCODES[242]=new a(242,"default_camera_pos1",void 0,[],void 0),a.UNKNOWN_F3=t.OPCODES[243]=new a(243,"unknown_f3",void 0,[],void 0),a.UNKNOWN_F4=t.OPCODES[244]=new a(244,"unknown_f4",void 0,[],void 0),a.UNKNOWN_F5=t.OPCODES[245]=new a(245,"unknown_f5",void 0,[],void 0),a.UNKNOWN_F6=t.OPCODES[246]=new a(246,"unknown_f6",void 0,[],void 0),a.UNKNOWN_F7=t.OPCODES[247]=new a(247,"unknown_f7",void 0,[],void 0),a.UNKNOWN_F8=t.OPCODES[248]=new a(248,"unknown_f8",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.UNKNOWN_F9=t.OPCODES[249]=new a(249,"unknown_f9",void 0,[],void 0),a.GET_GC_NUMBER=t.OPCODES[250]=new a(250,"get_gc_number",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.UNKNOWN_FB=t.OPCODES[251]=new a(251,"unknown_fb",void 0,[new r(t.TYPE_WORD,void 0,void 0)],void 0),a.UNKNOWN_FC=t.OPCODES[252]=new a(252,"unknown_fc",void 0,[],void 0),a.UNKNOWN_FD=t.OPCODES[253]=new a(253,"unknown_fd",void 0,[],void 0),a.UNKNOWN_FE=t.OPCODES[254]=new a(254,"unknown_fe",void 0,[],void 0),a.UNKNOWN_FF=t.OPCODES[255]=new a(255,"unknown_ff",void 0,[],void 0),a.UNKNOWN_F800=t.OPCODES[63488]=new a(63488,"unknown_f800",void 0,[],void 0),a.SET_CHAT_CALLBACK=t.OPCODES[63489]=new a(63489,"set_chat_callback",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_STRING,void 0,void 0)],s.Pop),a.UNKNOWN_F802=t.OPCODES[63490]=new a(63490,"unknown_f802",void 0,[],void 0),a.UNKNOWN_F803=t.OPCODES[63491]=new a(63491,"unknown_f803",void 0,[],void 0),a.UNKNOWN_F804=t.OPCODES[63492]=new a(63492,"unknown_f804",void 0,[],void 0),a.UNKNOWN_F805=t.OPCODES[63493]=new a(63493,"unknown_f805",void 0,[],void 0),a.UNKNOWN_F806=t.OPCODES[63494]=new a(63494,"unknown_f806",void 0,[],void 0),a.UNKNOWN_F807=t.OPCODES[63495]=new a(63495,"unknown_f807",void 0,[],void 0),a.GET_DIFFICULTY_LEVEL2=t.OPCODES[63496]=new a(63496,"get_difficulty_level2","Sets the given register to the current difficulty. 0 For normal, 1 for hard, 2 for very hard and 3 for ultimate.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.GET_NUMBER_OF_PLAYER1=t.OPCODES[63497]=new a(63497,"get_number_of_player1","Set the given register to the current number of players. Either 1, 2, 3 or 4.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.GET_COORD_OF_PLAYER=t.OPCODES[63498]=new a(63498,"get_coord_of_player","Retrieves a player's position.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"X coordinate.",n.Write),new r(t.TYPE_DWORD,"Y coordinate.",n.Write),new r(t.TYPE_DWORD,"Z coordinate.",n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player slot.",n.Read)]},void 0,void 0)],void 0),a.ENABLE_MAP=t.OPCODES[63499]=new a(63499,"enable_map",void 0,[],void 0),a.DISABLE_MAP=t.OPCODES[63500]=new a(63500,"disable_map",void 0,[],void 0),a.MAP_DESIGNATE_EX=t.OPCODES[63501]=new a(63501,"map_designate_ex",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0)],void 0),a.UNKNOWN_F80E=t.OPCODES[63502]=new a(63502,"unknown_f80e",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_F80F=t.OPCODES[63503]=new a(63503,"unknown_f80f",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.BA_INITIAL_FLOOR=t.OPCODES[63504]=new a(63504,"ba_initial_floor",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.SET_BA_RULES=t.OPCODES[63505]=new a(63505,"set_ba_rules",void 0,[],void 0),a.UNKNOWN_F812=t.OPCODES[63506]=new a(63506,"unknown_f812",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_F813=t.OPCODES[63507]=new a(63507,"unknown_f813",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_F814=t.OPCODES[63508]=new a(63508,"unknown_f814",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_F815=t.OPCODES[63509]=new a(63509,"unknown_f815",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_F816=t.OPCODES[63510]=new a(63510,"unknown_f816",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_F817=t.OPCODES[63511]=new a(63511,"unknown_f817",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_F818=t.OPCODES[63512]=new a(63512,"unknown_f818",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_F819=t.OPCODES[63513]=new a(63513,"unknown_f819",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_F81A=t.OPCODES[63514]=new a(63514,"unknown_f81a",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_F81B=t.OPCODES[63515]=new a(63515,"unknown_f81b",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.BA_DISP_MSG=t.OPCODES[63516]=new a(63516,"ba_disp_msg",void 0,[new r(t.TYPE_STRING,void 0,void 0)],s.Pop),a.DEATH_LVL_UP=t.OPCODES[63517]=new a(63517,"death_lvl_up",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.DEATH_TECH_LVL_UP=t.OPCODES[63518]=new a(63518,"death_tech_lvl_up",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_F81F=t.OPCODES[63519]=new a(63519,"unknown_f81f",void 0,[],void 0),a.CMODE_STAGE=t.OPCODES[63520]=new a(63520,"cmode_stage",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_F821=t.OPCODES[63521]=new a(63521,"unknown_f821",void 0,[],void 0),a.UNKNOWN_F822=t.OPCODES[63522]=new a(63522,"unknown_f822",void 0,[],void 0),a.UNKNOWN_F823=t.OPCODES[63523]=new a(63523,"unknown_f823",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_F824=t.OPCODES[63524]=new a(63524,"unknown_f824",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.EXP_MULTIPLICATION=t.OPCODES[63525]=new a(63525,"exp_multiplication",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.EXP_DIVISION=t.OPCODES[63526]=new a(63526,"exp_division",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.GET_USER_IS_DEAD=t.OPCODES[63527]=new a(63527,"get_user_is_dead",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.GO_FLOOR=t.OPCODES[63528]=new a(63528,"go_floor","Sends a player to the given floor.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player slot.",n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Floor ID.",n.Read)]},void 0,void 0)],void 0),a.UNKNOWN_F829=t.OPCODES[63529]=new a(63529,"unknown_f829",void 0,[],void 0),a.UNKNOWN_F82A=t.OPCODES[63530]=new a(63530,"unknown_f82a",void 0,[],void 0),a.UNLOCK_DOOR2=t.OPCODES[63531]=new a(63531,"unlock_door2",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.LOCK_DOOR2=t.OPCODES[63532]=new a(63532,"lock_door2",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.IF_SWITCH_NOT_PRESSED=t.OPCODES[63533]=new a(63533,"if_switch_not_pressed",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.IF_SWITCH_PRESSED=t.OPCODES[63534]=new a(63534,"if_switch_pressed",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Floor ID.",n.Read),new r(t.TYPE_DWORD,"Switch ID.",n.Read),new r(t.TYPE_DWORD,"Will be set to 1 if the switch is pressed, 0 otherwise.",n.Write)]},void 0,void 0)],void 0),a.UNKNOWN_F82F=t.OPCODES[63535]=new a(63535,"unknown_f82f",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.CONTROL_DRAGON=t.OPCODES[63536]=new a(63536,"control_dragon",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0)],void 0),a.RELEASE_DRAGON=t.OPCODES[63537]=new a(63537,"release_dragon",void 0,[],void 0),a.UNKNOWN_F832=t.OPCODES[63538]=new a(63538,"unknown_f832",void 0,[],void 0),a.UNKNOWN_F833=t.OPCODES[63539]=new a(63539,"unknown_f833",void 0,[],void 0),a.UNKNOWN_F834=t.OPCODES[63540]=new a(63540,"unknown_f834",void 0,[],void 0),a.UNKNOWN_F835=t.OPCODES[63541]=new a(63541,"unknown_f835",void 0,[],void 0),a.UNKNOWN_F836=t.OPCODES[63542]=new a(63542,"unknown_f836",void 0,[],void 0),a.UNKNOWN_F837=t.OPCODES[63543]=new a(63543,"unknown_f837",void 0,[],void 0),a.SHRINK=t.OPCODES[63544]=new a(63544,"shrink",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player slot.",n.Read)]},void 0,void 0)],void 0),a.UNSHRINK=t.OPCODES[63545]=new a(63545,"unshrink",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player slot.",n.Read)]},void 0,void 0)],void 0),a.UNKNOWN_F83A=t.OPCODES[63546]=new a(63546,"unknown_f83a",void 0,[],void 0),a.UNKNOWN_F83B=t.OPCODES[63547]=new a(63547,"unknown_f83b",void 0,[],void 0),a.DISPLAY_CLOCK2=t.OPCODES[63548]=new a(63548,"display_clock2",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0)],void 0),a.UNKNOWN_F83D=t.OPCODES[63549]=new a(63549,"unknown_f83d",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.DELETE_AREA_TITLE=t.OPCODES[63550]=new a(63550,"delete_area_title",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_F83F=t.OPCODES[63551]=new a(63551,"unknown_f83f",void 0,[],void 0),a.LOAD_NPC_DATA=t.OPCODES[63552]=new a(63552,"load_npc_data",void 0,[],void 0),a.GET_NPC_DATA=t.OPCODES[63553]=new a(63553,"get_npc_data",void 0,[new r(t.TYPE_D_LABEL,void 0,void 0)],void 0),a.UNKNOWN_F842=t.OPCODES[63554]=new a(63554,"unknown_f842",void 0,[],void 0),a.UNKNOWN_F843=t.OPCODES[63555]=new a(63555,"unknown_f843",void 0,[],void 0),a.UNKNOWN_F844=t.OPCODES[63556]=new a(63556,"unknown_f844",void 0,[],void 0),a.UNKNOWN_F845=t.OPCODES[63557]=new a(63557,"unknown_f845",void 0,[],void 0),a.UNKNOWN_F846=t.OPCODES[63558]=new a(63558,"unknown_f846",void 0,[],void 0),a.UNKNOWN_F847=t.OPCODES[63559]=new a(63559,"unknown_f847",void 0,[],void 0),a.GIVE_DAMAGE_SCORE=t.OPCODES[63560]=new a(63560,"give_damage_score",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.TAKE_DAMAGE_SCORE=t.OPCODES[63561]=new a(63561,"take_damage_score",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.UNK_SCORE_F84A=t.OPCODES[63562]=new a(63562,"unk_score_f84a",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.UNK_SCORE_F84B=t.OPCODES[63563]=new a(63563,"unk_score_f84b",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.KILL_SCORE=t.OPCODES[63564]=new a(63564,"kill_score",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.DEATH_SCORE=t.OPCODES[63565]=new a(63565,"death_score",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.UNK_SCORE_F84E=t.OPCODES[63566]=new a(63566,"unk_score_f84e",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.ENEMY_DEATH_SCORE=t.OPCODES[63567]=new a(63567,"enemy_death_score",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.MESETA_SCORE=t.OPCODES[63568]=new a(63568,"meseta_score",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.UNKNOWN_F851=t.OPCODES[63569]=new a(63569,"unknown_f851",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.UNKNOWN_F852=t.OPCODES[63570]=new a(63570,"unknown_f852",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.REVERSE_WARPS=t.OPCODES[63571]=new a(63571,"reverse_warps",void 0,[],void 0),a.UNREVERSE_WARPS=t.OPCODES[63572]=new a(63572,"unreverse_warps",void 0,[],void 0),a.SET_ULT_MAP=t.OPCODES[63573]=new a(63573,"set_ult_map",void 0,[],void 0),a.UNSET_ULT_MAP=t.OPCODES[63574]=new a(63574,"unset_ult_map",void 0,[],void 0),a.SET_AREA_TITLE=t.OPCODES[63575]=new a(63575,"set_area_title",void 0,[new r(t.TYPE_STRING,void 0,void 0)],s.Pop),a.UNKNOWN_F858=t.OPCODES[63576]=new a(63576,"unknown_f858",void 0,[],void 0),a.UNKNOWN_F859=t.OPCODES[63577]=new a(63577,"unknown_f859",void 0,[],void 0),a.EQUIP_ITEM=t.OPCODES[63578]=new a(63578,"equip_item",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0)],void 0),a.UNEQUIP_ITEM=t.OPCODES[63579]=new a(63579,"unequip_item",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_F85C=t.OPCODES[63580]=new a(63580,"unknown_f85c",void 0,[],void 0),a.UNKNOWN_F85D=t.OPCODES[63581]=new a(63581,"unknown_f85d",void 0,[],void 0),a.UNKNOWN_F85E=t.OPCODES[63582]=new a(63582,"unknown_f85e",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_F85F=t.OPCODES[63583]=new a(63583,"unknown_f85f",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_F860=t.OPCODES[63584]=new a(63584,"unknown_f860",void 0,[],void 0),a.UNKNOWN_F861=t.OPCODES[63585]=new a(63585,"unknown_f861",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_F862=t.OPCODES[63586]=new a(63586,"unknown_f862",void 0,[],void 0),a.UNKNOWN_F863=t.OPCODES[63587]=new a(63587,"unknown_f863",void 0,[],void 0),a.CMODE_RANK=t.OPCODES[63588]=new a(63588,"cmode_rank",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_STRING,void 0,void 0)],s.Pop),a.AWARD_ITEM_NAME=t.OPCODES[63589]=new a(63589,"award_item_name",void 0,[],void 0),a.AWARD_ITEM_SELECT=t.OPCODES[63590]=new a(63590,"award_item_select",void 0,[],void 0),a.AWARD_ITEM_GIVE_TO=t.OPCODES[63591]=new a(63591,"award_item_give_to",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0)],void 0),a.UNKNOWN_F868=t.OPCODES[63592]=new a(63592,"unknown_f868",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.UNKNOWN_F869=t.OPCODES[63593]=new a(63593,"unknown_f869",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.ITEM_CREATE_CMODE=t.OPCODES[63594]=new a(63594,"item_create_cmode",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.UNKNOWN_F86B=t.OPCODES[63595]=new a(63595,"unknown_f86b",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.AWARD_ITEM_OK=t.OPCODES[63596]=new a(63596,"award_item_ok",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.UNKNOWN_F86D=t.OPCODES[63597]=new a(63597,"unknown_f86d",void 0,[],void 0),a.UNKNOWN_F86E=t.OPCODES[63598]=new a(63598,"unknown_f86e",void 0,[],void 0),a.BA_SET_LIVES=t.OPCODES[63599]=new a(63599,"ba_set_lives",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.BA_SET_TECH_LVL=t.OPCODES[63600]=new a(63600,"ba_set_tech_lvl",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.BA_SET_LVL=t.OPCODES[63601]=new a(63601,"ba_set_lvl",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.BA_SET_TIME_LIMIT=t.OPCODES[63602]=new a(63602,"ba_set_time_limit",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.BOSS_IS_DEAD=t.OPCODES[63603]=new a(63603,"boss_is_dead",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.UNKNOWN_F874=t.OPCODES[63604]=new a(63604,"unknown_f874",void 0,[],void 0),a.UNKNOWN_F875=t.OPCODES[63605]=new a(63605,"unknown_f875",void 0,[],void 0),a.UNKNOWN_F876=t.OPCODES[63606]=new a(63606,"unknown_f876",void 0,[],void 0),a.ENABLE_TECHS=t.OPCODES[63607]=new a(63607,"enable_techs","Enables technique use for the given player.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player slot.",n.Read)]},void 0,void 0)],void 0),a.DISABLE_TECHS=t.OPCODES[63608]=new a(63608,"disable_techs","Disables technique use for the given player.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player slot.",n.Read)]},void 0,void 0)],void 0),a.GET_GENDER=t.OPCODES[63609]=new a(63609,"get_gender","Retrieves the player's gender. 0 If male, 1 if female.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player slot.",n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player gender.",n.Write)]},void 0,void 0)],void 0),a.GET_CHARA_CLASS=t.OPCODES[63610]=new a(63610,"get_chara_class","Retrieves the player's race and character class.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player slot.",n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player race. 0 If human, 1 if newman, 2 if cast.",n.Write),new r(t.TYPE_DWORD,"Player class. 0 If hunter, 1 if ranger, 2 if force.",n.Write)]},void 0,void 0)],void 0),a.TAKE_SLOT_MESETA=t.OPCODES[63611]=new a(63611,"take_slot_meseta","Takes an amount of meseta from a player's inventory.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player slot.",n.Read),new r(t.TYPE_DWORD,"Amount of meseta to take.",n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Will be set to 1 if the meseta was taken, 0 otherwise.",n.Write)]},void 0,void 0)],void 0),a.UNKNOWN_F87C=t.OPCODES[63612]=new a(63612,"unknown_f87c",void 0,[],void 0),a.UNKNOWN_F87D=t.OPCODES[63613]=new a(63613,"unknown_f87d",void 0,[],void 0),a.UNKNOWN_F87E=t.OPCODES[63614]=new a(63614,"unknown_f87e",void 0,[],void 0),a.READ_GUILDCARD_FLAG=t.OPCODES[63615]=new a(63615,"read_guildcard_flag",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.UNKNOWN_F880=t.OPCODES[63616]=new a(63616,"unknown_f880",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.GET_PL_NAME=t.OPCODES[63617]=new a(63617,"get_pl_name","Sets the value of to the given player's name.",[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player slot.",n.Read)]},void 0,void 0)],void 0),a.UNKNOWN_F882=t.OPCODES[63618]=new a(63618,"unknown_f882",void 0,[],void 0),a.UNKNOWN_F883=t.OPCODES[63619]=new a(63619,"unknown_f883",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.UNKNOWN_F884=t.OPCODES[63620]=new a(63620,"unknown_f884",void 0,[],void 0),a.UNKNOWN_F885=t.OPCODES[63621]=new a(63621,"unknown_f885",void 0,[],void 0),a.UNKNOWN_F886=t.OPCODES[63622]=new a(63622,"unknown_f886",void 0,[],void 0),a.UNKNOWN_F887=t.OPCODES[63623]=new a(63623,"unknown_f887",void 0,[],void 0),a.UNKNOWN_F888=t.OPCODES[63624]=new a(63624,"unknown_f888",void 0,[],void 0),a.UNKNOWN_F889=t.OPCODES[63625]=new a(63625,"unknown_f889",void 0,[],void 0),a.GET_PLAYER_STATUS=t.OPCODES[63626]=new a(63626,"get_player_status",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.SEND_MAIL=t.OPCODES[63627]=new a(63627,"send_mail",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_STRING,void 0,void 0)],s.Pop),a.ONLINE_CHECK=t.OPCODES[63628]=new a(63628,"online_check",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.CHL_SET_TIMERECORD=t.OPCODES[63629]=new a(63629,"chl_set_timerecord",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.CHL_GET_TIMERECORD=t.OPCODES[63630]=new a(63630,"chl_get_timerecord",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.UNKNOWN_F88F=t.OPCODES[63631]=new a(63631,"unknown_f88f",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.UNKNOWN_F890=t.OPCODES[63632]=new a(63632,"unknown_f890",void 0,[],void 0),a.LOAD_ENEMY_DATA=t.OPCODES[63633]=new a(63633,"load_enemy_data",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.GET_PHYSICAL_DATA=t.OPCODES[63634]=new a(63634,"get_physical_data",void 0,[new r(t.TYPE_WORD,void 0,void 0)],void 0),a.GET_ATTACK_DATA=t.OPCODES[63635]=new a(63635,"get_attack_data",void 0,[new r(t.TYPE_WORD,void 0,void 0)],void 0),a.GET_RESIST_DATA=t.OPCODES[63636]=new a(63636,"get_resist_data",void 0,[new r(t.TYPE_WORD,void 0,void 0)],void 0),a.GET_MOVEMENT_DATA=t.OPCODES[63637]=new a(63637,"get_movement_data",void 0,[new r(t.TYPE_WORD,void 0,void 0)],void 0),a.UNKNOWN_F896=t.OPCODES[63638]=new a(63638,"unknown_f896",void 0,[],void 0),a.UNKNOWN_F897=t.OPCODES[63639]=new a(63639,"unknown_f897",void 0,[],void 0),a.SHIFT_LEFT=t.OPCODES[63640]=new a(63640,"shift_left",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0)],void 0),a.SHIFT_RIGHT=t.OPCODES[63641]=new a(63641,"shift_right",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0)],void 0),a.GET_RANDOM=t.OPCODES[63642]=new a(63642,"get_random",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.RESET_MAP=t.OPCODES[63643]=new a(63643,"reset_map","Sets all registers to 0 and resets the quest.",[],void 0),a.DISP_CHL_RETRY_MENU=t.OPCODES[63644]=new a(63644,"disp_chl_retry_menu",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.CHL_REVERSER=t.OPCODES[63645]=new a(63645,"chl_reverser",void 0,[],void 0),a.UNKNOWN_F89E=t.OPCODES[63646]=new a(63646,"unknown_f89e",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_F89F=t.OPCODES[63647]=new a(63647,"unknown_f89f",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.UNKNOWN_F8A0=t.OPCODES[63648]=new a(63648,"unknown_f8a0",void 0,[],void 0),a.UNKNOWN_F8A1=t.OPCODES[63649]=new a(63649,"unknown_f8a1",void 0,[],void 0),a.UNKNOWN_F8A2=t.OPCODES[63650]=new a(63650,"unknown_f8a2",void 0,[],void 0),a.UNKNOWN_F8A3=t.OPCODES[63651]=new a(63651,"unknown_f8a3",void 0,[],void 0),a.UNKNOWN_F8A4=t.OPCODES[63652]=new a(63652,"unknown_f8a4",void 0,[],void 0),a.UNKNOWN_F8A5=t.OPCODES[63653]=new a(63653,"unknown_f8a5",void 0,[],void 0),a.UNKNOWN_F8A6=t.OPCODES[63654]=new a(63654,"unknown_f8a6",void 0,[],void 0),a.UNKNOWN_F8A7=t.OPCODES[63655]=new a(63655,"unknown_f8a7",void 0,[],void 0),a.UNKNOWN_F8A8=t.OPCODES[63656]=new a(63656,"unknown_f8a8",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_F8A9=t.OPCODES[63657]=new a(63657,"unknown_f8a9",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.UNKNOWN_F8AA=t.OPCODES[63658]=new a(63658,"unknown_f8aa",void 0,[],void 0),a.UNKNOWN_F8AB=t.OPCODES[63659]=new a(63659,"unknown_f8ab",void 0,[],void 0),a.UNKNOWN_F8AC=t.OPCODES[63660]=new a(63660,"unknown_f8ac",void 0,[],void 0),a.GET_NUMBER_OF_PLAYER2=t.OPCODES[63661]=new a(63661,"get_number_of_player2",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.UNKNOWN_F8AE=t.OPCODES[63662]=new a(63662,"unknown_f8ae",void 0,[],void 0),a.UNKNOWN_F8AF=t.OPCODES[63663]=new a(63663,"unknown_f8af",void 0,[],void 0),a.UNKNOWN_F8B0=t.OPCODES[63664]=new a(63664,"unknown_f8b0",void 0,[],void 0),a.UNKNOWN_F8B1=t.OPCODES[63665]=new a(63665,"unknown_f8b1",void 0,[],void 0),a.UNKNOWN_F8B2=t.OPCODES[63666]=new a(63666,"unknown_f8b2",void 0,[],void 0),a.UNKNOWN_F8B3=t.OPCODES[63667]=new a(63667,"unknown_f8b3",void 0,[],void 0),a.UNKNOWN_F8B4=t.OPCODES[63668]=new a(63668,"unknown_f8b4",void 0,[],void 0),a.UNKNOWN_F8B5=t.OPCODES[63669]=new a(63669,"unknown_f8b5",void 0,[],void 0),a.UNKNOWN_F8B6=t.OPCODES[63670]=new a(63670,"unknown_f8b6",void 0,[],void 0),a.UNKNOWN_F8B7=t.OPCODES[63671]=new a(63671,"unknown_f8b7",void 0,[],void 0),a.UNKNOWN_F8B8=t.OPCODES[63672]=new a(63672,"unknown_f8b8",void 0,[],void 0),a.CHL_RECOVERY=t.OPCODES[63673]=new a(63673,"chl_recovery",void 0,[],void 0),a.UNKNOWN_F8BA=t.OPCODES[63674]=new a(63674,"unknown_f8ba",void 0,[],void 0),a.UNKNOWN_F8BB=t.OPCODES[63675]=new a(63675,"unknown_f8bb",void 0,[],void 0),a.SET_EPISODE=t.OPCODES[63676]=new a(63676,"set_episode",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],void 0),a.UNKNOWN_F8BD=t.OPCODES[63677]=new a(63677,"unknown_f8bd",void 0,[],void 0),a.UNKNOWN_F8BE=t.OPCODES[63678]=new a(63678,"unknown_f8be",void 0,[],void 0),a.UNKNOWN_F8BF=t.OPCODES[63679]=new a(63679,"unknown_f8bf",void 0,[],void 0),a.FILE_DL_REQ=t.OPCODES[63680]=new a(63680,"file_dl_req",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_STRING,void 0,void 0)],s.Pop),a.GET_DL_STATUS=t.OPCODES[63681]=new a(63681,"get_dl_status",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.GBA_UNKNOWN4=t.OPCODES[63682]=new a(63682,"gba_unknown4",void 0,[],void 0),a.GET_GBA_STATE=t.OPCODES[63683]=new a(63683,"get_gba_state",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.UNKNOWN_F8C4=t.OPCODES[63684]=new a(63684,"unknown_f8c4",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.UNKNOWN_F8C5=t.OPCODES[63685]=new a(63685,"unknown_f8c5",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.QEXIT=t.OPCODES[63686]=new a(63686,"qexit",void 0,[],void 0),a.USE_ANIMATION=t.OPCODES[63687]=new a(63687,"use_animation",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player slot.",n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Animation ID.",n.Read),new r(t.TYPE_DWORD,"Animation duration in number of frames.",n.Read)]},void 0,void 0)],void 0),a.STOP_ANIMATION=t.OPCODES[63688]=new a(63688,"stop_animation",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player slot.",n.Read)]},void 0,void 0)],void 0),a.RUN_TO_COORD=t.OPCODES[63689]=new a(63689,"run_to_coord",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.SET_SLOT_INVINCIBLE=t.OPCODES[63690]=new a(63690,"set_slot_invincible",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player slot.",n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0)],void 0),a.UNKNOWN_F8CB=t.OPCODES[63691]=new a(63691,"unknown_f8cb",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.SET_SLOT_POISON=t.OPCODES[63692]=new a(63692,"set_slot_poison",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player slot.",n.Read)]},void 0,void 0)],void 0),a.SET_SLOT_PARALYZE=t.OPCODES[63693]=new a(63693,"set_slot_paralyze",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player slot.",n.Read)]},void 0,void 0)],void 0),a.SET_SLOT_SHOCK=t.OPCODES[63694]=new a(63694,"set_slot_shock",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player slot.",n.Read)]},void 0,void 0)],void 0),a.SET_SLOT_FREEZE=t.OPCODES[63695]=new a(63695,"set_slot_freeze",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player slot.",n.Read)]},void 0,void 0)],void 0),a.SET_SLOT_SLOW=t.OPCODES[63696]=new a(63696,"set_slot_slow",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player slot.",n.Read)]},void 0,void 0)],void 0),a.SET_SLOT_CONFUSE=t.OPCODES[63697]=new a(63697,"set_slot_confuse",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player slot.",n.Read)]},void 0,void 0)],void 0),a.SET_SLOT_SHIFTA=t.OPCODES[63698]=new a(63698,"set_slot_shifta",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player slot.",n.Read)]},void 0,void 0)],void 0),a.SET_SLOT_DEBAND=t.OPCODES[63699]=new a(63699,"set_slot_deband",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player slot.",n.Read)]},void 0,void 0)],void 0),a.SET_SLOT_JELLEN=t.OPCODES[63700]=new a(63700,"set_slot_jellen",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player slot.",n.Read)]},void 0,void 0)],void 0),a.SET_SLOT_ZALURE=t.OPCODES[63701]=new a(63701,"set_slot_zalure",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player slot.",n.Read)]},void 0,void 0)],void 0),a.FLETI_FIXED_CAMERA=t.OPCODES[63702]=new a(63702,"fleti_fixed_camera",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],s.Pop),a.FLETI_LOCKED_CAMERA=t.OPCODES[63703]=new a(63703,"fleti_locked_camera",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],s.Pop),a.DEFAULT_CAMERA_POS2=t.OPCODES[63704]=new a(63704,"default_camera_pos2",void 0,[],void 0),a.SET_MOTION_BLUR=t.OPCODES[63705]=new a(63705,"set_motion_blur",void 0,[],void 0),a.SET_SCREEN_BW=t.OPCODES[63706]=new a(63706,"set_screen_bw",void 0,[],void 0),a.UNKNOWN_F8DB=t.OPCODES[63707]=new a(63707,"unknown_f8db",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_WORD,void 0,void 0)],s.Pop),a.NPC_ACTION_STRING=t.OPCODES[63708]=new a(63708,"npc_action_string",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_S_LABEL,void 0,void 0)],void 0),a.GET_PAD_COND=t.OPCODES[63709]=new a(63709,"get_pad_cond",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.GET_BUTTON_COND=t.OPCODES[63710]=new a(63710,"get_button_cond",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.FREEZE_ENEMIES=t.OPCODES[63711]=new a(63711,"freeze_enemies",void 0,[],void 0),a.UNFREEZE_ENEMIES=t.OPCODES[63712]=new a(63712,"unfreeze_enemies",void 0,[],void 0),a.FREEZE_EVERYTHING=t.OPCODES[63713]=new a(63713,"freeze_everything",void 0,[],void 0),a.UNFREEZE_EVERYTHING=t.OPCODES[63714]=new a(63714,"unfreeze_everything",void 0,[],void 0),a.RESTORE_HP=t.OPCODES[63715]=new a(63715,"restore_hp",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.RESTORE_TP=t.OPCODES[63716]=new a(63716,"restore_tp",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.CLOSE_CHAT_BUBBLE=t.OPCODES[63717]=new a(63717,"close_chat_bubble",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.MOVE_COORDS_OBJECT=t.OPCODES[63718]=new a(63718,"move_coords_object",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.AT_COORDS_CALL_EX=t.OPCODES[63719]=new a(63719,"at_coords_call_ex",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.UNKNOWN_F8E8=t.OPCODES[63720]=new a(63720,"unknown_f8e8",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.UNKNOWN_F8E9=t.OPCODES[63721]=new a(63721,"unknown_f8e9",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.UNKNOWN_F8EA=t.OPCODES[63722]=new a(63722,"unknown_f8ea",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.UNKNOWN_F8EB=t.OPCODES[63723]=new a(63723,"unknown_f8eb",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.UNKNOWN_F8EC=t.OPCODES[63724]=new a(63724,"unknown_f8ec",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.ANIMATION_CHECK=t.OPCODES[63725]=new a(63725,"animation_check",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.CALL_IMAGE_DATA=t.OPCODES[63726]=new a(63726,"call_image_data",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_WORD,void 0,void 0)],s.Pop),a.UNKNOWN_F8EF=t.OPCODES[63727]=new a(63727,"unknown_f8ef",void 0,[],void 0),a.TURN_OFF_BGM_P2=t.OPCODES[63728]=new a(63728,"turn_off_bgm_p2",void 0,[],void 0),a.TURN_ON_BGM_P2=t.OPCODES[63729]=new a(63729,"turn_on_bgm_p2",void 0,[],void 0),a.LOAD_UNK_DATA=t.OPCODES[63730]=new a(63730,"load_unk_data",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_D_LABEL,void 0,void 0)],s.Pop),a.PARTICLE2=t.OPCODES[63731]=new a(63731,"particle2",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_FLOAT,void 0,void 0)],s.Pop),a.UNKNOWN_F8F4=t.OPCODES[63732]=new a(63732,"unknown_f8f4",void 0,[],void 0),a.UNKNOWN_F8F5=t.OPCODES[63733]=new a(63733,"unknown_f8f5",void 0,[],void 0),a.UNKNOWN_F8F6=t.OPCODES[63734]=new a(63734,"unknown_f8f6",void 0,[],void 0),a.UNKNOWN_F8F7=t.OPCODES[63735]=new a(63735,"unknown_f8f7",void 0,[],void 0),a.UNKNOWN_F8F8=t.OPCODES[63736]=new a(63736,"unknown_f8f8",void 0,[],void 0),a.UNKNOWN_F8F9=t.OPCODES[63737]=new a(63737,"unknown_f8f9",void 0,[],void 0),a.UNKNOWN_F8FA=t.OPCODES[63738]=new a(63738,"unknown_f8fa",void 0,[],void 0),a.UNKNOWN_F8FB=t.OPCODES[63739]=new a(63739,"unknown_f8fb",void 0,[],void 0),a.UNKNOWN_F8FC=t.OPCODES[63740]=new a(63740,"unknown_f8fc",void 0,[],void 0),a.UNKNOWN_F8FD=t.OPCODES[63741]=new a(63741,"unknown_f8fd",void 0,[],void 0),a.UNKNOWN_F8FE=t.OPCODES[63742]=new a(63742,"unknown_f8fe",void 0,[],void 0),a.UNKNOWN_F8FF=t.OPCODES[63743]=new a(63743,"unknown_f8ff",void 0,[],void 0),a.UNKNOWN_F900=t.OPCODES[63744]=new a(63744,"unknown_f900",void 0,[],void 0),a.DEC2FLOAT=t.OPCODES[63745]=new a(63745,"dec2float",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_FLOAT,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0)],void 0),a.FLOAT2DEC=t.OPCODES[63746]=new a(63746,"float2dec",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_FLOAT,void 0,n.Read)]},void 0,void 0)],void 0),a.FLET=t.OPCODES[63747]=new a(63747,"flet",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_FLOAT,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_FLOAT,void 0,n.Read)]},void 0,void 0)],void 0),a.FLETI=t.OPCODES[63748]=new a(63748,"fleti",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_FLOAT,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_FLOAT,void 0,void 0)],void 0),a.UNKNOWN_F905=t.OPCODES[63749]=new a(63749,"unknown_f905",void 0,[],void 0),a.UNKNOWN_F906=t.OPCODES[63750]=new a(63750,"unknown_f906",void 0,[],void 0),a.UNKNOWN_F907=t.OPCODES[63751]=new a(63751,"unknown_f907",void 0,[],void 0),a.FADD=t.OPCODES[63752]=new a(63752,"fadd",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_FLOAT,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_FLOAT,void 0,n.Read)]},void 0,void 0)],void 0),a.FADDI=t.OPCODES[63753]=new a(63753,"faddi",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_FLOAT,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_FLOAT,void 0,void 0)],void 0),a.FSUB=t.OPCODES[63754]=new a(63754,"fsub",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_FLOAT,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_FLOAT,void 0,n.Read)]},void 0,void 0)],void 0),a.FSUBI=t.OPCODES[63755]=new a(63755,"fsubi",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_FLOAT,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_FLOAT,void 0,void 0)],void 0),a.FMUL=t.OPCODES[63756]=new a(63756,"fmul",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_FLOAT,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_FLOAT,void 0,n.Read)]},void 0,void 0)],void 0),a.FMULI=t.OPCODES[63757]=new a(63757,"fmuli",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_FLOAT,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_FLOAT,void 0,void 0)],void 0),a.FDIV=t.OPCODES[63758]=new a(63758,"fdiv",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_FLOAT,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_FLOAT,void 0,n.Read)]},void 0,void 0)],void 0),a.FDIVI=t.OPCODES[63759]=new a(63759,"fdivi",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_FLOAT,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_FLOAT,void 0,void 0)],void 0),a.GET_UNKNOWN_COUNT=t.OPCODES[63760]=new a(63760,"get_unknown_count",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],s.Pop),a.GET_STACKABLE_ITEM_COUNT=t.OPCODES[63761]=new a(63761,"get_stackable_item_count",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Player slot.",n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read),new r(t.TYPE_DWORD,void 0,n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.FREEZE_AND_HIDE_EQUIP=t.OPCODES[63762]=new a(63762,"freeze_and_hide_equip",void 0,[],void 0),a.THAW_AND_SHOW_EQUIP=t.OPCODES[63763]=new a(63763,"thaw_and_show_equip",void 0,[],void 0),a.SET_PALETTEX_CALLBACK=t.OPCODES[63764]=new a(63764,"set_palettex_callback",void 0,[new r(t.TYPE_DWORD,"Player slot.",void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],s.Pop),a.ACTIVATE_PALETTEX=t.OPCODES[63765]=new a(63765,"activate_palettex",void 0,[new r(t.TYPE_DWORD,"Player slot.",void 0)],s.Pop),a.ENABLE_PALETTEX=t.OPCODES[63766]=new a(63766,"enable_palettex",void 0,[new r(t.TYPE_DWORD,"Player slot.",void 0)],s.Pop),a.RESTORE_PALETTEX=t.OPCODES[63767]=new a(63767,"restore_palettex",void 0,[new r(t.TYPE_DWORD,"Player slot.",void 0)],s.Pop),a.DISABLE_PALETTEX=t.OPCODES[63768]=new a(63768,"disable_palettex",void 0,[new r(t.TYPE_DWORD,"Player slot.",void 0)],s.Pop),a.GET_PALETTEX_ACTIVATED=t.OPCODES[63769]=new a(63769,"get_palettex_activated",void 0,[new r(t.TYPE_DWORD,"Player slot.",void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],s.Pop),a.GET_UNKNOWN_PALETTEX_STATUS=t.OPCODES[63770]=new a(63770,"get_unknown_palettex_status",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],s.Pop),a.DISABLE_MOVEMENT2=t.OPCODES[63771]=new a(63771,"disable_movement2",void 0,[new r(t.TYPE_DWORD,"Player slot.",void 0)],s.Pop),a.ENABLE_MOVEMENT2=t.OPCODES[63772]=new a(63772,"enable_movement2",void 0,[new r(t.TYPE_DWORD,"Player slot.",void 0)],s.Pop),a.GET_TIME_PLAYED=t.OPCODES[63773]=new a(63773,"get_time_played",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.GET_GUILDCARD_TOTAL=t.OPCODES[63774]=new a(63774,"get_guildcard_total",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.GET_SLOT_MESETA=t.OPCODES[63775]=new a(63775,"get_slot_meseta",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.GET_PLAYER_LEVEL=t.OPCODES[63776]=new a(63776,"get_player_level",void 0,[new r(t.TYPE_DWORD,"Player slot.",void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],s.Pop),a.GET_SECTION_ID=t.OPCODES[63777]=new a(63777,"get_section_id",void 0,[new r(t.TYPE_DWORD,"Player slot.",void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],s.Pop),a.GET_PLAYER_HP=t.OPCODES[63778]=new a(63778,"get_player_hp",void 0,[new r(t.TYPE_DWORD,"Player slot.",void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,"Maximum HP.",n.Write),new r(t.TYPE_DWORD,"Current HP.",n.Write),new r(t.TYPE_DWORD,"Maximum TP.",n.Write),new r(t.TYPE_DWORD,"Current TP.",n.Write)]},void 0,void 0)],s.Pop),a.GET_FLOOR_NUMBER=t.OPCODES[63779]=new a(63779,"get_floor_number",void 0,[new r(t.TYPE_DWORD,"Player slot.",void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],s.Pop),a.GET_COORD_PLAYER_DETECT=t.OPCODES[63780]=new a(63780,"get_coord_player_detect",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,"Player slot.",n.Read)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Read)]},void 0,void 0)],void 0),a.READ_GLOBAL_FLAG=t.OPCODES[63781]=new a(63781,"read_global_flag",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],s.Pop),a.WRITE_GLOBAL_FLAG=t.OPCODES[63782]=new a(63782,"write_global_flag",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_F927=t.OPCODES[63783]=new a(63783,"unknown_f927",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.FLOOR_PLAYER_DETECT=t.OPCODES[63784]=new a(63784,"floor_player_detect",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write),new r(t.TYPE_DWORD,void 0,n.Write),new r(t.TYPE_DWORD,void 0,n.Write),new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.READ_DISK_FILE=t.OPCODES[63785]=new a(63785,"read_disk_file",void 0,[new r(t.TYPE_STRING,void 0,void 0)],s.Pop),a.OPEN_PACK_SELECT=t.OPCODES[63786]=new a(63786,"open_pack_select",void 0,[],void 0),a.ITEM_SELECT=t.OPCODES[63787]=new a(63787,"item_select",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.GET_ITEM_ID=t.OPCODES[63788]=new a(63788,"get_item_id",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.COLOR_CHANGE=t.OPCODES[63789]=new a(63789,"color_change",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.SEND_STATISTIC=t.OPCODES[63790]=new a(63790,"send_statistic",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_F92F=t.OPCODES[63791]=new a(63791,"unknown_f92f",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.CHAT_BOX=t.OPCODES[63792]=new a(63792,"chat_box",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_STRING,void 0,void 0)],s.Pop),a.CHAT_BUBBLE=t.OPCODES[63793]=new a(63793,"chat_bubble",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_STRING,void 0,void 0)],s.Pop),a.UNKNOWN_F932=t.OPCODES[63794]=new a(63794,"unknown_f932",void 0,[],void 0),a.UNKNOWN_F933=t.OPCODES[63795]=new a(63795,"unknown_f933",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],void 0),a.SCROLL_TEXT=t.OPCODES[63796]=new a(63796,"scroll_text",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_FLOAT,void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_STRING,void 0,void 0)],s.Pop),a.GBA_UNKNOWN1=t.OPCODES[63797]=new a(63797,"gba_unknown1",void 0,[],void 0),a.GBA_UNKNOWN2=t.OPCODES[63798]=new a(63798,"gba_unknown2",void 0,[],void 0),a.GBA_UNKNOWN3=t.OPCODES[63799]=new a(63799,"gba_unknown3",void 0,[],void 0),a.ADD_DAMAGE_TO=t.OPCODES[63800]=new a(63800,"add_damage_to",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.ITEM_DELETE3=t.OPCODES[63801]=new a(63801,"item_delete3",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.GET_ITEM_INFO=t.OPCODES[63802]=new a(63802,"get_item_info",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],s.Pop),a.ITEM_PACKING1=t.OPCODES[63803]=new a(63803,"item_packing1",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.ITEM_PACKING2=t.OPCODES[63804]=new a(63804,"item_packing2",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.GET_LANG_SETTING=t.OPCODES[63805]=new a(63805,"get_lang_setting",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_ANY,void 0,n.Write)]},void 0,void 0)],s.Pop),a.PREPARE_STATISTIC=t.OPCODES[63806]=new a(63806,"prepare_statistic",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],s.Pop),a.KEYWORD_DETECT=t.OPCODES[63807]=new a(63807,"keyword_detect",void 0,[],void 0),a.KEYWORD=t.OPCODES[63808]=new a(63808,"keyword",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_DWORD,"Player slot.",void 0),new r(t.TYPE_STRING,void 0,void 0)],s.Pop),a.GET_GUILDCARD_NUM=t.OPCODES[63809]=new a(63809,"get_guildcard_num",void 0,[new r(t.TYPE_DWORD,"Player slot.",void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],s.Pop),a.UNKNOWN_F942=t.OPCODES[63810]=new a(63810,"unknown_f942",void 0,[],void 0),a.UNKNOWN_F943=t.OPCODES[63811]=new a(63811,"unknown_f943",void 0,[],void 0),a.GET_WRAP_STATUS=t.OPCODES[63812]=new a(63812,"get_wrap_status",void 0,[new r(t.TYPE_DWORD,"Player slot.",void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],s.Pop),a.INITIAL_FLOOR=t.OPCODES[63813]=new a(63813,"initial_floor",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.SIN=t.OPCODES[63814]=new a(63814,"sin",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.COS=t.OPCODES[63815]=new a(63815,"cos",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_F948=t.OPCODES[63816]=new a(63816,"unknown_f948",void 0,[],void 0),a.UNKNOWN_F949=t.OPCODES[63817]=new a(63817,"unknown_f949",void 0,[],void 0),a.BOSS_IS_DEAD2=t.OPCODES[63818]=new a(63818,"boss_is_dead2",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.UNKNOWN_F94B=t.OPCODES[63819]=new a(63819,"unknown_f94b",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.UNKNOWN_F94C=t.OPCODES[63820]=new a(63820,"unknown_f94c",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.IS_THERE_CARDBATTLE=t.OPCODES[63821]=new a(63821,"is_there_cardbattle",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.UNKNOWN_F94E=t.OPCODES[63822]=new a(63822,"unknown_f94e",void 0,[],void 0),a.UNKNOWN_F94F=t.OPCODES[63823]=new a(63823,"unknown_f94f",void 0,[],void 0),a.BB_P2_MENU=t.OPCODES[63824]=new a(63824,"bb_p2_menu",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.BB_MAP_DESIGNATE=t.OPCODES[63825]=new a(63825,"bb_map_designate",void 0,[new r(t.TYPE_BYTE,void 0,void 0),new r(t.TYPE_WORD,void 0,void 0),new r(t.TYPE_BYTE,void 0,void 0),new r(t.TYPE_BYTE,void 0,void 0)],void 0),a.BB_GET_NUMBER_IN_PACK=t.OPCODES[63826]=new a(63826,"bb_get_number_in_pack",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],void 0),a.BB_SWAP_ITEM=t.OPCODES[63827]=new a(63827,"bb_swap_item",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],s.Pop),a.BB_CHECK_WRAP=t.OPCODES[63828]=new a(63828,"bb_check_wrap",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0)],s.Pop),a.BB_EXCHANGE_PD_ITEM=t.OPCODES[63829]=new a(63829,"bb_exchange_pd_item",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],s.Pop),a.BB_EXCHANGE_PD_SRANK=t.OPCODES[63830]=new a(63830,"bb_exchange_pd_srank",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],s.Pop),a.BB_EXCHANGE_PD_SPECIAL=t.OPCODES[63831]=new a(63831,"bb_exchange_pd_special",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],s.Pop),a.BB_EXCHANGE_PD_PERCENT=t.OPCODES[63832]=new a(63832,"bb_exchange_pd_percent",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],s.Pop),a.UNKNOWN_F959=t.OPCODES[63833]=new a(63833,"unknown_f959",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_F95A=t.OPCODES[63834]=new a(63834,"unknown_f95a",void 0,[],void 0),a.UNKNOWN_F95B=t.OPCODES[63835]=new a(63835,"unknown_f95b",void 0,[],void 0),a.BB_EXCHANGE_SLT=t.OPCODES[63836]=new a(63836,"bb_exchange_slt",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],s.Pop),a.BB_EXCHANGE_PC=t.OPCODES[63837]=new a(63837,"bb_exchange_pc",void 0,[],void 0),a.BB_BOX_CREATE_BP=t.OPCODES[63838]=new a(63838,"bb_box_create_bp",void 0,[new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_FLOAT,void 0,void 0),new r(t.TYPE_FLOAT,void 0,void 0)],s.Pop),a.BB_EXCHANGE_PT=t.OPCODES[63839]=new a(63839,"bb_exchange_pt",void 0,[new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r({kind:o.RegTupRef,register_tuples:[new r(t.TYPE_DWORD,void 0,n.Write)]},void 0,void 0),new r(t.TYPE_DWORD,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0),new r(t.TYPE_I_LABEL,void 0,void 0)],s.Pop),a.UNKNOWN_F960=t.OPCODES[63840]=new a(63840,"unknown_f960",void 0,[new r(t.TYPE_DWORD,void 0,void 0)],s.Pop),a.UNKNOWN_F961=t.OPCODES[63841]=new a(63841,"unknown_f961",void 0,[],void 0),a.UNKNOWN_F962=t.OPCODES[63842]=new a(63842,"unknown_f962",void 0,[],void 0),a.UNKNOWN_F963=t.OPCODES[63843]=new a(63843,"unknown_f963",void 0,[],void 0),a.UNKNOWN_F964=t.OPCODES[63844]=new a(63844,"unknown_f964",void 0,[],void 0),a.UNKNOWN_F965=t.OPCODES[63845]=new a(63845,"unknown_f965",void 0,[],void 0),a.UNKNOWN_F966=t.OPCODES[63846]=new a(63846,"unknown_f966",void 0,[],void 0),a.UNKNOWN_F967=t.OPCODES[63847]=new a(63847,"unknown_f967",void 0,[],void 0),a.UNKNOWN_F968=t.OPCODES[63848]=new a(63848,"unknown_f968",void 0,[],void 0),a.UNKNOWN_F969=t.OPCODES[63849]=new a(63849,"unknown_f969",void 0,[],void 0),a.UNKNOWN_F96A=t.OPCODES[63850]=new a(63850,"unknown_f96a",void 0,[],void 0),a.UNKNOWN_F96B=t.OPCODES[63851]=new a(63851,"unknown_f96b",void 0,[],void 0),a.UNKNOWN_F96C=t.OPCODES[63852]=new a(63852,"unknown_f96c",void 0,[],void 0),a.UNKNOWN_F96D=t.OPCODES[63853]=new a(63853,"unknown_f96d",void 0,[],void 0),a.UNKNOWN_F96E=t.OPCODES[63854]=new a(63854,"unknown_f96e",void 0,[],void 0),a.UNKNOWN_F96F=t.OPCODES[63855]=new a(63855,"unknown_f96f",void 0,[],void 0),a.UNKNOWN_F970=t.OPCODES[63856]=new a(63856,"unknown_f970",void 0,[],void 0),a.UNKNOWN_F971=t.OPCODES[63857]=new a(63857,"unknown_f971",void 0,[],void 0),a.UNKNOWN_F972=t.OPCODES[63858]=new a(63858,"unknown_f972",void 0,[],void 0),a.UNKNOWN_F973=t.OPCODES[63859]=new a(63859,"unknown_f973",void 0,[],void 0),a.UNKNOWN_F974=t.OPCODES[63860]=new a(63860,"unknown_f974",void 0,[],void 0),a.UNKNOWN_F975=t.OPCODES[63861]=new a(63861,"unknown_f975",void 0,[],void 0),a.UNKNOWN_F976=t.OPCODES[63862]=new a(63862,"unknown_f976",void 0,[],void 0),a.UNKNOWN_F977=t.OPCODES[63863]=new a(63863,"unknown_f977",void 0,[],void 0),a.UNKNOWN_F978=t.OPCODES[63864]=new a(63864,"unknown_f978",void 0,[],void 0),a.UNKNOWN_F979=t.OPCODES[63865]=new a(63865,"unknown_f979",void 0,[],void 0),a.UNKNOWN_F97A=t.OPCODES[63866]=new a(63866,"unknown_f97a",void 0,[],void 0),a.UNKNOWN_F97B=t.OPCODES[63867]=new a(63867,"unknown_f97b",void 0,[],void 0),a.UNKNOWN_F97C=t.OPCODES[63868]=new a(63868,"unknown_f97c",void 0,[],void 0),a.UNKNOWN_F97D=t.OPCODES[63869]=new a(63869,"unknown_f97d",void 0,[],void 0),a.UNKNOWN_F97E=t.OPCODES[63870]=new a(63870,"unknown_f97e",void 0,[],void 0),a.UNKNOWN_F97F=t.OPCODES[63871]=new a(63871,"unknown_f97f",void 0,[],void 0),a.UNKNOWN_F980=t.OPCODES[63872]=new a(63872,"unknown_f980",void 0,[],void 0),a.UNKNOWN_F981=t.OPCODES[63873]=new a(63873,"unknown_f981",void 0,[],void 0),a.UNKNOWN_F982=t.OPCODES[63874]=new a(63874,"unknown_f982",void 0,[],void 0),a.UNKNOWN_F983=t.OPCODES[63875]=new a(63875,"unknown_f983",void 0,[],void 0),a.UNKNOWN_F984=t.OPCODES[63876]=new a(63876,"unknown_f984",void 0,[],void 0),a.UNKNOWN_F985=t.OPCODES[63877]=new a(63877,"unknown_f985",void 0,[],void 0),a.UNKNOWN_F986=t.OPCODES[63878]=new a(63878,"unknown_f986",void 0,[],void 0),a.UNKNOWN_F987=t.OPCODES[63879]=new a(63879,"unknown_f987",void 0,[],void 0),a.UNKNOWN_F988=t.OPCODES[63880]=new a(63880,"unknown_f988",void 0,[],void 0),a.UNKNOWN_F989=t.OPCODES[63881]=new a(63881,"unknown_f989",void 0,[],void 0),a.UNKNOWN_F98A=t.OPCODES[63882]=new a(63882,"unknown_f98a",void 0,[],void 0),a.UNKNOWN_F98B=t.OPCODES[63883]=new a(63883,"unknown_f98b",void 0,[],void 0),a.UNKNOWN_F98C=t.OPCODES[63884]=new a(63884,"unknown_f98c",void 0,[],void 0),a.UNKNOWN_F98D=t.OPCODES[63885]=new a(63885,"unknown_f98d",void 0,[],void 0),a.UNKNOWN_F98E=t.OPCODES[63886]=new a(63886,"unknown_f98e",void 0,[],void 0),a.UNKNOWN_F98F=t.OPCODES[63887]=new a(63887,"unknown_f98f",void 0,[],void 0),a.UNKNOWN_F990=t.OPCODES[63888]=new a(63888,"unknown_f990",void 0,[],void 0),a.UNKNOWN_F991=t.OPCODES[63889]=new a(63889,"unknown_f991",void 0,[],void 0),a.UNKNOWN_F992=t.OPCODES[63890]=new a(63890,"unknown_f992",void 0,[],void 0),a.UNKNOWN_F993=t.OPCODES[63891]=new a(63891,"unknown_f993",void 0,[],void 0),a.UNKNOWN_F994=t.OPCODES[63892]=new a(63892,"unknown_f994",void 0,[],void 0),a.UNKNOWN_F995=t.OPCODES[63893]=new a(63893,"unknown_f995",void 0,[],void 0),a.UNKNOWN_F996=t.OPCODES[63894]=new a(63894,"unknown_f996",void 0,[],void 0),a.UNKNOWN_F997=t.OPCODES[63895]=new a(63895,"unknown_f997",void 0,[],void 0),a.UNKNOWN_F998=t.OPCODES[63896]=new a(63896,"unknown_f998",void 0,[],void 0),a.UNKNOWN_F999=t.OPCODES[63897]=new a(63897,"unknown_f999",void 0,[],void 0),a.UNKNOWN_F99A=t.OPCODES[63898]=new a(63898,"unknown_f99a",void 0,[],void 0),a.UNKNOWN_F99B=t.OPCODES[63899]=new a(63899,"unknown_f99b",void 0,[],void 0),a.UNKNOWN_F99C=t.OPCODES[63900]=new a(63900,"unknown_f99c",void 0,[],void 0),a.UNKNOWN_F99D=t.OPCODES[63901]=new a(63901,"unknown_f99d",void 0,[],void 0),a.UNKNOWN_F99E=t.OPCODES[63902]=new a(63902,"unknown_f99e",void 0,[],void 0),a.UNKNOWN_F99F=t.OPCODES[63903]=new a(63903,"unknown_f99f",void 0,[],void 0),a.UNKNOWN_F9A0=t.OPCODES[63904]=new a(63904,"unknown_f9a0",void 0,[],void 0),a.UNKNOWN_F9A1=t.OPCODES[63905]=new a(63905,"unknown_f9a1",void 0,[],void 0),a.UNKNOWN_F9A2=t.OPCODES[63906]=new a(63906,"unknown_f9a2",void 0,[],void 0),a.UNKNOWN_F9A3=t.OPCODES[63907]=new a(63907,"unknown_f9a3",void 0,[],void 0),a.UNKNOWN_F9A4=t.OPCODES[63908]=new a(63908,"unknown_f9a4",void 0,[],void 0),a.UNKNOWN_F9A5=t.OPCODES[63909]=new a(63909,"unknown_f9a5",void 0,[],void 0),a.UNKNOWN_F9A6=t.OPCODES[63910]=new a(63910,"unknown_f9a6",void 0,[],void 0),a.UNKNOWN_F9A7=t.OPCODES[63911]=new a(63911,"unknown_f9a7",void 0,[],void 0),a.UNKNOWN_F9A8=t.OPCODES[63912]=new a(63912,"unknown_f9a8",void 0,[],void 0),a.UNKNOWN_F9A9=t.OPCODES[63913]=new a(63913,"unknown_f9a9",void 0,[],void 0),a.UNKNOWN_F9AA=t.OPCODES[63914]=new a(63914,"unknown_f9aa",void 0,[],void 0),a.UNKNOWN_F9AB=t.OPCODES[63915]=new a(63915,"unknown_f9ab",void 0,[],void 0),a.UNKNOWN_F9AC=t.OPCODES[63916]=new a(63916,"unknown_f9ac",void 0,[],void 0),a.UNKNOWN_F9AD=t.OPCODES[63917]=new a(63917,"unknown_f9ad",void 0,[],void 0),a.UNKNOWN_F9AE=t.OPCODES[63918]=new a(63918,"unknown_f9ae",void 0,[],void 0),a.UNKNOWN_F9AF=t.OPCODES[63919]=new a(63919,"unknown_f9af",void 0,[],void 0),a.UNKNOWN_F9B0=t.OPCODES[63920]=new a(63920,"unknown_f9b0",void 0,[],void 0),a.UNKNOWN_F9B1=t.OPCODES[63921]=new a(63921,"unknown_f9b1",void 0,[],void 0),a.UNKNOWN_F9B2=t.OPCODES[63922]=new a(63922,"unknown_f9b2",void 0,[],void 0),a.UNKNOWN_F9B3=t.OPCODES[63923]=new a(63923,"unknown_f9b3",void 0,[],void 0),a.UNKNOWN_F9B4=t.OPCODES[63924]=new a(63924,"unknown_f9b4",void 0,[],void 0),a.UNKNOWN_F9B5=t.OPCODES[63925]=new a(63925,"unknown_f9b5",void 0,[],void 0),a.UNKNOWN_F9B6=t.OPCODES[63926]=new a(63926,"unknown_f9b6",void 0,[],void 0),a.UNKNOWN_F9B7=t.OPCODES[63927]=new a(63927,"unknown_f9b7",void 0,[],void 0),a.UNKNOWN_F9B8=t.OPCODES[63928]=new a(63928,"unknown_f9b8",void 0,[],void 0),a.UNKNOWN_F9B9=t.OPCODES[63929]=new a(63929,"unknown_f9b9",void 0,[],void 0),a.UNKNOWN_F9BA=t.OPCODES[63930]=new a(63930,"unknown_f9ba",void 0,[],void 0),a.UNKNOWN_F9BB=t.OPCODES[63931]=new a(63931,"unknown_f9bb",void 0,[],void 0),a.UNKNOWN_F9BC=t.OPCODES[63932]=new a(63932,"unknown_f9bc",void 0,[],void 0),a.UNKNOWN_F9BD=t.OPCODES[63933]=new a(63933,"unknown_f9bd",void 0,[],void 0),a.UNKNOWN_F9BE=t.OPCODES[63934]=new a(63934,"unknown_f9be",void 0,[],void 0),a.UNKNOWN_F9BF=t.OPCODES[63935]=new a(63935,"unknown_f9bf",void 0,[],void 0),a.UNKNOWN_F9C0=t.OPCODES[63936]=new a(63936,"unknown_f9c0",void 0,[],void 0),a.UNKNOWN_F9C1=t.OPCODES[63937]=new a(63937,"unknown_f9c1",void 0,[],void 0),a.UNKNOWN_F9C2=t.OPCODES[63938]=new a(63938,"unknown_f9c2",void 0,[],void 0),a.UNKNOWN_F9C3=t.OPCODES[63939]=new a(63939,"unknown_f9c3",void 0,[],void 0),a.UNKNOWN_F9C4=t.OPCODES[63940]=new a(63940,"unknown_f9c4",void 0,[],void 0),a.UNKNOWN_F9C5=t.OPCODES[63941]=new a(63941,"unknown_f9c5",void 0,[],void 0),a.UNKNOWN_F9C6=t.OPCODES[63942]=new a(63942,"unknown_f9c6",void 0,[],void 0),a.UNKNOWN_F9C7=t.OPCODES[63943]=new a(63943,"unknown_f9c7",void 0,[],void 0),a.UNKNOWN_F9C8=t.OPCODES[63944]=new a(63944,"unknown_f9c8",void 0,[],void 0),a.UNKNOWN_F9C9=t.OPCODES[63945]=new a(63945,"unknown_f9c9",void 0,[],void 0),a.UNKNOWN_F9CA=t.OPCODES[63946]=new a(63946,"unknown_f9ca",void 0,[],void 0),a.UNKNOWN_F9CB=t.OPCODES[63947]=new a(63947,"unknown_f9cb",void 0,[],void 0),a.UNKNOWN_F9CC=t.OPCODES[63948]=new a(63948,"unknown_f9cc",void 0,[],void 0),a.UNKNOWN_F9CD=t.OPCODES[63949]=new a(63949,"unknown_f9cd",void 0,[],void 0),a.UNKNOWN_F9CE=t.OPCODES[63950]=new a(63950,"unknown_f9ce",void 0,[],void 0),a.UNKNOWN_F9CF=t.OPCODES[63951]=new a(63951,"unknown_f9cf",void 0,[],void 0),a.UNKNOWN_F9D0=t.OPCODES[63952]=new a(63952,"unknown_f9d0",void 0,[],void 0),a.UNKNOWN_F9D1=t.OPCODES[63953]=new a(63953,"unknown_f9d1",void 0,[],void 0),a.UNKNOWN_F9D2=t.OPCODES[63954]=new a(63954,"unknown_f9d2",void 0,[],void 0),a.UNKNOWN_F9D3=t.OPCODES[63955]=new a(63955,"unknown_f9d3",void 0,[],void 0),a.UNKNOWN_F9D4=t.OPCODES[63956]=new a(63956,"unknown_f9d4",void 0,[],void 0),a.UNKNOWN_F9D5=t.OPCODES[63957]=new a(63957,"unknown_f9d5",void 0,[],void 0),a.UNKNOWN_F9D6=t.OPCODES[63958]=new a(63958,"unknown_f9d6",void 0,[],void 0),a.UNKNOWN_F9D7=t.OPCODES[63959]=new a(63959,"unknown_f9d7",void 0,[],void 0),a.UNKNOWN_F9D8=t.OPCODES[63960]=new a(63960,"unknown_f9d8",void 0,[],void 0),a.UNKNOWN_F9D9=t.OPCODES[63961]=new a(63961,"unknown_f9d9",void 0,[],void 0),a.UNKNOWN_F9DA=t.OPCODES[63962]=new a(63962,"unknown_f9da",void 0,[],void 0),a.UNKNOWN_F9DB=t.OPCODES[63963]=new a(63963,"unknown_f9db",void 0,[],void 0),a.UNKNOWN_F9DC=t.OPCODES[63964]=new a(63964,"unknown_f9dc",void 0,[],void 0),a.UNKNOWN_F9DD=t.OPCODES[63965]=new a(63965,"unknown_f9dd",void 0,[],void 0),a.UNKNOWN_F9DE=t.OPCODES[63966]=new a(63966,"unknown_f9de",void 0,[],void 0),a.UNKNOWN_F9DF=t.OPCODES[63967]=new a(63967,"unknown_f9df",void 0,[],void 0),a.UNKNOWN_F9E0=t.OPCODES[63968]=new a(63968,"unknown_f9e0",void 0,[],void 0),a.UNKNOWN_F9E1=t.OPCODES[63969]=new a(63969,"unknown_f9e1",void 0,[],void 0),a.UNKNOWN_F9E2=t.OPCODES[63970]=new a(63970,"unknown_f9e2",void 0,[],void 0),a.UNKNOWN_F9E3=t.OPCODES[63971]=new a(63971,"unknown_f9e3",void 0,[],void 0),a.UNKNOWN_F9E4=t.OPCODES[63972]=new a(63972,"unknown_f9e4",void 0,[],void 0),a.UNKNOWN_F9E5=t.OPCODES[63973]=new a(63973,"unknown_f9e5",void 0,[],void 0),a.UNKNOWN_F9E6=t.OPCODES[63974]=new a(63974,"unknown_f9e6",void 0,[],void 0),a.UNKNOWN_F9E7=t.OPCODES[63975]=new a(63975,"unknown_f9e7",void 0,[],void 0),a.UNKNOWN_F9E8=t.OPCODES[63976]=new a(63976,"unknown_f9e8",void 0,[],void 0),a.UNKNOWN_F9E9=t.OPCODES[63977]=new a(63977,"unknown_f9e9",void 0,[],void 0),a.UNKNOWN_F9EA=t.OPCODES[63978]=new a(63978,"unknown_f9ea",void 0,[],void 0),a.UNKNOWN_F9EB=t.OPCODES[63979]=new a(63979,"unknown_f9eb",void 0,[],void 0),a.UNKNOWN_F9EC=t.OPCODES[63980]=new a(63980,"unknown_f9ec",void 0,[],void 0),a.UNKNOWN_F9ED=t.OPCODES[63981]=new a(63981,"unknown_f9ed",void 0,[],void 0),a.UNKNOWN_F9EE=t.OPCODES[63982]=new a(63982,"unknown_f9ee",void 0,[],void 0),a.UNKNOWN_F9EF=t.OPCODES[63983]=new a(63983,"unknown_f9ef",void 0,[],void 0),a.UNKNOWN_F9F0=t.OPCODES[63984]=new a(63984,"unknown_f9f0",void 0,[],void 0),a.UNKNOWN_F9F1=t.OPCODES[63985]=new a(63985,"unknown_f9f1",void 0,[],void 0),a.UNKNOWN_F9F2=t.OPCODES[63986]=new a(63986,"unknown_f9f2",void 0,[],void 0),a.UNKNOWN_F9F3=t.OPCODES[63987]=new a(63987,"unknown_f9f3",void 0,[],void 0),a.UNKNOWN_F9F4=t.OPCODES[63988]=new a(63988,"unknown_f9f4",void 0,[],void 0),a.UNKNOWN_F9F5=t.OPCODES[63989]=new a(63989,"unknown_f9f5",void 0,[],void 0),a.UNKNOWN_F9F6=t.OPCODES[63990]=new a(63990,"unknown_f9f6",void 0,[],void 0),a.UNKNOWN_F9F7=t.OPCODES[63991]=new a(63991,"unknown_f9f7",void 0,[],void 0),a.UNKNOWN_F9F8=t.OPCODES[63992]=new a(63992,"unknown_f9f8",void 0,[],void 0),a.UNKNOWN_F9F9=t.OPCODES[63993]=new a(63993,"unknown_f9f9",void 0,[],void 0),a.UNKNOWN_F9FA=t.OPCODES[63994]=new a(63994,"unknown_f9fa",void 0,[],void 0),a.UNKNOWN_F9FB=t.OPCODES[63995]=new a(63995,"unknown_f9fb",void 0,[],void 0),a.UNKNOWN_F9FC=t.OPCODES[63996]=new a(63996,"unknown_f9fc",void 0,[],void 0),a.UNKNOWN_F9FD=t.OPCODES[63997]=new a(63997,"unknown_f9fd",void 0,[],void 0),a.UNKNOWN_F9FE=t.OPCODES[63998]=new a(63998,"unknown_f9fe",void 0,[],void 0),a.UNKNOWN_F9FF=t.OPCODES[63999]=new a(63999,"unknown_f9ff",void 0,[],void 0),t.OPCODES.forEach(e=>{t.OPCODES_BY_MNEMONIC.set(e.mnemonic,e)})},Za3H:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("FXpb"),n=i("nN8q"),s=i("6cU9"),r=i("w6HN"),a=i("4/Uj"),d=i("KUR2"),l=i("469Q"),_=i("4SjJ");class u extends n.ResizableWidget{constructor(){super(),this.element=o.el.div({class:"viewer_TextureView"}),this.open_file_button=new s.FileButton("Open file...",{icon_left:o.Icon.File,accept:".xvm"}),this.tool_bar=this.disposable(new r.ToolBar({children:[this.open_file_button]})),this.renderer_view=this.disposable(new d.RendererWidget(new l.TextureRenderer)),this.element.append(this.tool_bar.element,this.renderer_view.element),this.disposable(this.open_file_button.files.observe(({value:e})=>{e.length&&a.texture_store.load_file(e[0])})),this.renderer_view.start_rendering(),this.disposable(_.gui_store.tool.observe(({value:e})=>{e===_.GuiTool.Viewer?this.renderer_view.start_rendering():this.renderer_view.stop_rendering()})),this.finalize_construction(u.prototype)}resize(e,t){return super.resize(e,t),this.renderer_view.resize(e,Math.max(0,t-this.tool_bar.height)),this}}t.TextureView=u},aEXR:function(e,t,i){"use strict";var o=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))((function(n,s){function r(e){try{d(o.next(e))}catch(e){s(e)}}function a(e){try{d(o.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}d((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const n=i("bcBH"),s=i("NRxM"),r=i("XDYw"),a=i("y42t"),d=i("Yuai"),l=i("AUhH"),_=i("eFYZ"),u=new l.LoadingCache,c=new l.LoadingCache;function p(e,t){const i=h(e,t,"render").then(e=>_.area_geometry_to_sections_and_object_3d(a.parse_area_geometry(new s.ArrayBufferCursor(e,n.Endianness.Little)),t));return{geometry:i.then(([,e])=>e),sections:i.then(([e])=>e)}}t.load_area_sections=function(e,t){return o(this,void 0,void 0,(function*(){return u.get_or_set(`${e}-${t.area.id}-${t.id}`,()=>p(e,t)).sections}))},t.load_area_render_geometry=function(e,t){return o(this,void 0,void 0,(function*(){return u.get_or_set(`${e}-${t.area.id}-${t.id}`,()=>p(e,t)).geometry}))},t.load_area_collision_geometry=function(e,t){return o(this,void 0,void 0,(function*(){return c.get_or_set(`${e}-${t.area.id}-${t.id}`,()=>h(e,t,"collision").then(e=>_.area_collision_geometry_to_object_3d(r.parse_area_collision_geometry(new s.ArrayBufferCursor(e,n.Endianness.Little)))))}))};const v=[[["city00_00",1],["forest01",1],["forest02",1],["cave01_",6],["cave02_",5],["cave03_",6],["machine01_",6],["machine02_",6],["ancient01_",5],["ancient02_",5],["ancient03_",5],["boss01",1],["boss02",1],["boss03",1],["darkfalz00",1]],[["labo00_00",1],["ruins01_",3],["ruins02_",3],["space01_",3],["space02_",3],["jungle01_00",1],["jungle02_00",1],["jungle03_00",1],["jungle04_",3],["jungle05_00",1],["seabed01_",3],["seabed02_",3],["boss05",1],["boss06",1],["boss07",1],["boss08",1],["jungle06_00",1],["jungle07_",5]],[],[["city02_00",1],["wilds01_00",1],["wilds01_01",1],["wilds01_02",1],["wilds01_03",1],["crater01_00",1],["desert01_",3],["desert02_",3],["desert03_",3],["boss09_00",1]]];function h(e,t,i){return o(this,void 0,void 0,(function*(){const o=function(e,t){let i=t.area.id,o=t.id;16===i&&1===o&&(i=17,o=1);const n=v[e-1];if(0<=i&&i{this._selected_entity.val=void 0,this._current_area.val=e},this.set_selected_entity=e=>{e&&this.current_quest.val&&(this._current_area.val=c.area_store.get_area(this.current_quest.val.episode,e.area_id)),this._selected_entity.val=e},this.new_quest=e=>{this.set_quest(g.create_new_quest(e))},this.open_file=e=>o(this,void 0,void 0,(function*(){try{const t=yield r.read_file(e),i=a.parse_quest(new d.ArrayBufferCursor(t,l.Endianness.Little));this.set_quest(i&&new s.QuestModel(i.id,i.language,i.name,i.short_description,i.long_description,i.episode,i.map_designations,i.objects.map(e=>new _.QuestObjectModel(e.type,e.id,e.group_id,e.area_id,e.section_id,P.vec3_to_threejs(e.position),new D.Euler(e.rotation.x,e.rotation.y,e.rotation.z,"ZXY"),e.properties,e.unknown)),i.npcs.map(e=>new u.QuestNpcModel(e.type,e.pso_type_id,e.npc_id,e.script_label,e.pso_roaming,e.area_id,e.section_id,P.vec3_to_threejs(e.position),new D.Euler(e.rotation.x,e.rotation.y,e.rotation.z,"ZXY"),P.vec3_to_threejs(e.scale),e.unknown)),i.dat_unknowns,i.object_code,i.shop_items),e.name)}catch(e){R.error("Couldn't read file.",e)}})),this.save_as=()=>{const e=this.current_quest.val;if(!e)return;let t=this.current_quest_filename.val;if(t){const e=t.lastIndexOf(".");-1!==e&&(t=t.slice(0,e))}let i=prompt("File name:",t);if(!i)return;const o=a.write_quest_qst({id:e.id.val,language:e.language.val,name:e.name.val,short_description:e.short_description.val,long_description:e.long_description.val,episode:e.episode,objects:e.objects.val.map(e=>({type:e.type,area_id:e.area_id,section_id:e.section_id.val,position:e.position.val,rotation:e.rotation.val,unknown:e.unknown,id:e.id,group_id:e.group_id,properties:e.properties})),npcs:e.npcs.val.map(e=>({type:e.type,area_id:e.area_id,section_id:e.section_id.val,position:e.position.val,rotation:e.rotation.val,scale:e.scale,unknown:e.unknown,pso_type_id:e.pso_type_id,npc_id:e.npc_id,script_label:e.script_label,pso_roaming:e.pso_roaming})),dat_unknowns:e.dat_unknowns,object_code:e.object_code,shop_items:e.shop_items,map_designations:e.map_designations.val},i);i.endsWith(".qst")||(i+=".qst");const n=document.createElement("a");n.href=URL.createObjectURL(new Blob([o],{type:"application/octet-stream"})),n.download=i,document.body.appendChild(n),n.click(),URL.revokeObjectURL(n.href),document.body.removeChild(n)},this.id_changed=e=>{this.current_quest.val&&this.undo.push(new O.EditIdAction(this.current_quest.val,e)).redo()},this.name_changed=e=>{this.current_quest.val&&this.undo.push(new m.EditNameAction(this.current_quest.val,e)).redo()},this.short_description_changed=e=>{this.current_quest.val&&this.undo.push(new f.EditShortDescriptionAction(this.current_quest.val,e)).redo()},this.long_description_changed=e=>{this.current_quest.val&&this.undo.push(new E.EditLongDescriptionAction(this.current_quest.val,e)).redo()},this.translate_entity=(e,t,i,o,n,s)=>{this.undo.push(new w.TranslateEntityAction(e,t,i,o,n,s)).redo()},this.rotate_entity=(e,t,i,o)=>{this.undo.push(new T.RotateEntityAction(e,t,i,o)).redo()},this.push_create_entity_action=e=>{this.undo.push(new y.CreateEntityAction(e))},this.remove_entity=e=>{this.undo.push(new b.RemoveEntityAction(e)).redo()},this.set_section_on_quest_entity=(e,t)=>{const i=t.find(t=>t.id===e.section_id.val);i?e.set_section(i):R.warn(`Section ${e.section_id.val} not found.`)},this.disposer.add_all(v.gui_store.tool.observe(({value:e})=>{e===v.GuiTool.QuestEditor&&this.undo.make_current()},{call_now:!0}),this.current_quest.flat_map(e=>e?e.npcs:n.property([])).observe(({value:e})=>{const t=this.selected_entity.val;t instanceof u.QuestNpcModel&&!e.includes(t)&&this.set_selected_entity(void 0)}),this.current_quest.flat_map(e=>e?e.objects:n.property([])).observe(({value:e})=>{const t=this.selected_entity.val;t instanceof _.QuestObjectModel&&!e.includes(t)&&this.set_selected_entity(void 0)}))}dispose(){this.disposer.dispose()}set_quest(e,t){return o(this,void 0,void 0,(function*(){if(this.undo.reset(),this._current_area.val=void 0,this._selected_entity.val=void 0,this._current_quest_filename.val=t,this._current_quest.val=e,e){this._current_area.val=c.area_store.get_area(e.episode,0);for(const t of e.area_variants.val){const i=yield c.area_store.get_area_sections(e.episode,t);t.sections.val.splice(0,1/0,...i);for(const o of e.objects.val.filter(e=>e.area_id===t.area.id))try{this.set_section_on_quest_entity(o,i)}catch(e){R.error(e)}for(const o of e.npcs.val.filter(e=>e.area_id===t.area.id))try{this.set_section_on_quest_entity(o,i)}catch(e){R.error(e)}}}else R.error("Couldn't parse quest file.")}))}}t.QuestEditorStore=S,t.quest_editor_store=new S},cOX8:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=180/Math.PI,n=1/o;t.rad_to_deg=function(e){return e*o},t.deg_to_rad=function(e){return e*n},t.floor_mod=function(e,t){return(e%t+t)%t}},dx17:function(e,t,i){"use strict";var o=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))((function(n,s){function r(e){try{d(o.next(e))}catch(e){s(e)}}function a(e){try{d(o.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}d((o=o.apply(e,t||[])).next())}))},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=i("nsCy"),r=i("G+UN"),a=i("6WXA"),d=n(i("GGSb")),l=i("sZ1+"),_=i("lC1H"),u=d.default.get("stores/ItemDropStore");class c{constructor(e){this.enemy_drops=e}}t.ItemDropStore=c;class p{constructor(){this.table=[],this.item_type_to_drops=[];for(let e=0;e=0){const e=new r.SectionModel(_.id,a.vec3_to_threejs(_.position),new o.Euler(_.rotation.x,_.rotation.y,_.rotation.z,"ZXY"),t);i.push(e),u.userData.section=e}}return[i,d]}},hUhj:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("nEgy"),n=i("52VV"),s=i("+LO4");t.AbstractProperty=class extends s.AbstractMinimalProperty{map(e){return new o.DependentProperty([this],()=>e(this.val))}flat_map(e){return new n.FlatMappedProperty(this,t=>e(t))}}},hVaW:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ASM_SYNTAX={defaultToken:"invalid",tokenizer:{root:[[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,{token:"string.quote",bracket:"@open",next:"@string"}],[/r\d+/,"predefined"],[/[^\s]+:/,"tag"],[/0x[0-9a-fA-F]+/,"number.hex"],[/-?\d+(\.\d+)?(e-?\d+)?/,"number.float"],[/-?[0-9]+/,"number"],[/\.[^\s]+/,"keyword"],[/[a-z][a-z0-9_=<>!]*/,"identifier"],[/[ \t\r\n]+/,"white"],[/\/\/.*$/,"comment"],[/,/,"delimiter"]],string:[[/[^\\"]+/,"string"],[/\\(?:[n\\"])/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]]}}},iR5r:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("Womt");function n(e){let t,i;switch(e.format[1]){case 6:t=o.RGBA_S3TC_DXT1_Format,i=e.width*e.height/2;break;case 7:t=o.RGBA_S3TC_DXT3_Format,i=e.width*e.height;break;default:throw new Error(`Format ${e.format.join(", ")} not supported.`)}const n=new o.CompressedTexture([{data:new Uint8Array(e.data,0,i),width:e.width,height:e.height}],e.width,e.height,t);return n.minFilter=o.LinearFilter,n.wrapS=o.MirroredRepeatWrapping,n.wrapT=o.MirroredRepeatWrapping,n.needsUpdate=!0,n}t.xvm_to_textures=function(e){return e.textures.map(n)},t.xvm_texture_to_texture=n},j4Ss:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("nN8q"),n=i("FXpb"),s=i("rqwK"),r=i("sZ1+");i("Czz9");const a=i("CpvQ"),d=i("yar8"),l=i("ouMO");class _ extends o.ResizableWidget{constructor(e){super(),this.element=n.el.div({class:"hunt_optimizer_MethodsForEpisodeView"}),this.episode=e,this.enemy_types=r.ENEMY_NPC_TYPES.filter(e=>r.npc_data(e).episode===this.episode);const t=l.list_property(),i=this.disposable(new d.Table({class:"hunt_optimizer_MethodsForEpisodeView_table",values:t,sort:e=>{t.sort((t,i)=>{for(const{column:o,direction:n}of e){let e=0;switch(o.key){case"method":e=t.name.localeCompare(i.name);break;case"time":e=t.time.val.as("minutes")-i.time.val.as("minutes");break;default:{const n=r.NpcType[o.key];n&&(e=(t.enemy_counts.get(n)||0)-(i.enemy_counts.get(n)||0))}}if(0!==e)return n===d.SortDirection.Asc?e:-e}return 0})},columns:[{key:"method",title:"Method",fixed:!0,width:250,sortable:!0,render_cell:e=>e.name},{key:"time",title:"Time",fixed:!0,width:60,input:!0,sortable:!0,render_cell(e,t){const i=t.add(new a.DurationInput(e.time.val));return t.add(i.value.observe(({value:t})=>e.set_user_time(t))),i.element}},...this.enemy_types.map(e=>({key:r.NpcType[e],title:r.npc_data(e).simple_name,width:90,text_align:"right",sortable:!0,render_cell(t){const i=t.enemy_counts.get(e);return null==i?"":i.toString()}}))]}));this.element.append(i.element),this.disposable(s.hunt_method_stores.observe_current(e=>{this.hunt_methods_observer&&this.hunt_methods_observer.dispose(),this.hunt_methods_observer=e.methods.observe(({value:e})=>{t.val=e.filter(e=>e.episode===this.episode)},{call_now:!0})},{call_now:!0})),this.finalize_construction(_.prototype)}dispose(){super.dispose(),this.hunt_methods_observer&&this.hunt_methods_observer.dispose()}}t.MethodsForEpisodeView=_},jJhE:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.is_property=function(e){return e.is_property},t.is_any_property=function(e){return e&&e.is_property}},karJ:function(e,t,i){"use strict";var o=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))((function(n,s){function r(e){try{d(o.next(e))}catch(e){s(e)}}function a(e){try{d(o.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}d((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const n=i("Yuai");t.get_character_class_data=function(e,t,i){return o(this,void 0,void 0,(function*(){return yield n.load_array_buffer(function(e,t,i){return`/player/${e}${t}${null==i?"":i}.nj`}(e,t,i))}))},t.get_character_class_animation_data=function(e){return o(this,void 0,void 0,(function*(){return yield n.load_array_buffer(`/player/animation/animation_${e.toString().padStart(3,"0")}.njm`)}))}},kiqn:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("ouMO"),n=i("Womt"),s=i("cOX8"),r=new n.Quaternion,a=new n.Quaternion;function d(e){return e.set(s.floor_mod(e.x,2*Math.PI),s.floor_mod(e.y,2*Math.PI),s.floor_mod(e.z,2*Math.PI))}t.QuestEntityModel=class{constructor(e,t,i,n,s){if(this._section=o.property(void 0),null==e)throw new Error("type is required.");if(!Number.isInteger(t))throw new Error("area_id should be an integer.");if(!Number.isInteger(i))throw new Error("section_id should be an integer.");if(!n)throw new Error("position is required.");if(!s)throw new Error("rotation is required.");this.type=e,this.area_id=t,this.section=this._section,this._section_id=o.property(i),this.section_id=this._section_id,this._position=o.property(n),this.position=this._position,this._world_position=o.property(n),this.world_position=this._world_position,this._rotation=o.property(s),this.rotation=this._rotation,this._world_rotation=o.property(s),this.world_rotation=this._world_rotation}set_section(e){if(e.area_variant.area.id!==this.area_id)throw new Error("Quest entities can't be moved across areas.");return this._section.val=e,this._section_id.val=e.id,this.set_position(this.position.val),this.set_rotation(this.rotation.val),this}set_position(e){this._position.val=e;const t=this.section.val;return this._world_position.val=t?e.clone().applyEuler(t.rotation).add(t.position):e,this}set_world_position(e){this._world_position.val=e;const t=this.section.val;return this._position.val=t?e.clone().sub(t.position).applyEuler(t.inverse_rotation):e,this}set_rotation(e){d(e),this._rotation.val=e;const t=this.section.val;return t?(r.setFromEuler(e),a.setFromEuler(t.rotation),this._world_rotation.val=d((new n.Euler).setFromQuaternion(r.multiply(a),"ZXY"))):this._world_rotation.val=e,this}set_world_rotation(e){d(e),this._world_rotation.val=e;const t=this.section.val;return t?(r.setFromEuler(e),a.setFromEuler(t.rotation),a.inverse(),this._rotation.val=d((new n.Euler).setFromQuaternion(r.multiply(a),"ZXY"))):this._rotation.val=e,this}}},kwt4:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("9Ykw"),n=i("9Onn"),s=i("q7ag");t.ANGLE_TO_RAD=2*Math.PI/65535;const r=1296255566;t.is_njcm_model=function(e){return"njcm"===e.type},t.is_xj_model=function(e){return"xj"===e.type};class a{constructor(e,t,i,o,n,s){this.bone_cache=new Map,this._bone_count=-1,this.evaluation_flags=e,this.model=t,this.position=i,this.rotation=o,this.scale=n,this.children=s}bone_count(){if(-1===this._bone_count){const e=[0];this.get_bone_internal(this,1/0,e),this._bone_count=e[0]}return this._bone_count}get_bone(e){let t=this.bone_cache.get(e);return void 0===t&&(t=this.get_bone_internal(this,e,[0]),this.bone_cache.set(e,t||null)),t||void 0}get_bone_internal(e,t,i){if(!e.evaluation_flags.skip){const o=i[0]++;if(this.bone_cache.set(o,e),o===t)return e}if(!e.evaluation_flags.break_child_trace)for(const o of e.children){const e=this.get_bone_internal(o,t,i);if(e)return e}}}function d(e,t,i){const n=o.parse_iff(e).filter(e=>e.type===r),s=[];for(const e of n)s.push(...l(e.data,t,i));return s}function l(e,i,o){const n=e.u32(),s=0!=(1&n),r=0!=(2&n),d=0!=(4&n),_=0!=(8&n),u=0!=(16&n),c=0!=(32&n),p=0!=(64&n),v=0!=(128&n),h=e.u32(),w=e.vec3_f32(),f={x:e.i32()*t.ANGLE_TO_RAD,y:e.i32()*t.ANGLE_TO_RAD,z:e.i32()*t.ANGLE_TO_RAD},E=e.vec3_f32(),m=e.u32(),O=e.u32();let g,y,b;return h&&(e.seek_start(h),g=i(e,o)),m?(e.seek_start(m),y=l(e,i,o)):y=[],O?(e.seek_start(O),b=l(e,i,o)):b=[],[new a({no_translate:s,no_rotate:r,no_scale:d,hidden:_,break_child_trace:u,zxy_rotation_order:c,skip:p,shape_skip:v},g,w,f,E,y),...b]}t.NjObject=a,t.parse_nj=function(e){return d(e,n.parse_njcm_model,[])},t.parse_xj=function(e){return d(e,s.parse_xj_model,void 0)},t.parse_xj_object=function(e){return l(e,s.parse_xj_model,void 0)}},lC1H:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.EnemyDrop=class{constructor(e,t,i,o,n,s){this.difficulty=e,this.section_id=t,this.npc_type=i,this.item_type=o,this.anything_rate=n,this.rare_rate=s,this.rate=n*s}}},lHpu:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("Womt"),n=i("tyuj"),s=i("iR5r"),r=i("Eqai"),a=i("488w"),d=i("7CyS"),l=i("Ftn7"),_=i("Tpfs");t.Model3DRenderer=class extends l.Renderer{constructor(){super(),this.disposer=new _.Disposer,this.clock=new o.Clock,this.update_animation_time=!0,this.camera=new o.PerspectiveCamera(75,1,1,200),this.nj_data_or_xvm_changed=()=>{this.mesh&&(this.scene.remove(this.mesh),this.mesh=void 0,this.scene.remove(this.skeleton_helper),this.skeleton_helper=void 0),this.animation&&(this.animation.mixer.stopAllAction(),this.mesh&&this.animation.mixer.uncacheRoot(this.mesh),this.animation=void 0);const e=n.model_store.current_nj_data.val;if(e){const{nj_object:t,has_skeleton:i}=e;let d;const l=n.model_store.current_xvm.val,_=l?s.xvm_to_textures(l):void 0,u=_&&_.map(e=>new o.MeshLambertMaterial({skinning:i,map:e,side:o.DoubleSide,alphaTest:.5})),c=(d=i?r.create_skinned_mesh(a.ninja_object_to_buffer_geometry(t),u):r.create_mesh(a.ninja_object_to_buffer_geometry(t),u)).geometry.boundingBox,p=c.max.y-c.min.y;d.translateY(-p/2-c.min.y),this.mesh=d,this.scene.add(d),this.skeleton_helper=new o.SkeletonHelper(d),this.skeleton_helper.visible=n.model_store.show_skeleton.val,this.skeleton_helper.material.linewidth=3,this.scene.add(this.skeleton_helper),this.reset_camera(new o.Vector3(0,10,20),new o.Vector3(0,0,0))}this.schedule_render()},this.nj_motion_changed=({value:e})=>{let t;this.animation&&(this.animation.mixer.stopAllAction(),t=this.animation.mixer);const i=n.model_store.current_nj_data.val;if(!(this.mesh&&this.mesh instanceof o.SkinnedMesh&&e&&i))return;this.animation||(t=new o.AnimationMixer(this.mesh));const s=d.create_animation_clip(i.nj_object,e);this.animation={mixer:t,clip:s,action:t.clipAction(s)},this.clock.start(),this.animation.action.play(),this.schedule_render()},this.show_skeleton_changed=({value:e})=>{this.skeleton_helper&&(this.skeleton_helper.visible=e,this.schedule_render())},this.animation_playing_changed=({value:e})=>{this.animation&&(this.animation.action.paused=!e,e?(this.clock.start(),this.schedule_render()):this.clock.stop())},this.animation_frame_rate_changed=({value:e})=>{this.animation&&(this.animation.mixer.timeScale=e/d.PSO_FRAME_RATE)},this.animation_frame_changed=({value:e})=>{const t=n.model_store.current_nj_motion.val;if(this.animation&&t){const i=t.frame_count;e>i&&(e=1),e<1&&(e=i),this.update_animation_time&&(this.animation.action.time=(e-1)/d.PSO_FRAME_RATE),this.schedule_render()}},this.disposer.add_all(n.model_store.current_nj_data.observe(this.nj_data_or_xvm_changed),n.model_store.current_xvm.observe(this.nj_data_or_xvm_changed),n.model_store.current_nj_motion.observe(this.nj_motion_changed),n.model_store.show_skeleton.observe(this.show_skeleton_changed),n.model_store.animation_playing.observe(this.animation_playing_changed),n.model_store.animation_frame_rate.observe(this.animation_frame_rate_changed),n.model_store.animation_frame.observe(this.animation_frame_changed)),this.init_camera_controls()}set_size(e,t){this.camera.aspect=e/t,this.camera.updateProjectionMatrix(),super.set_size(e,t)}dispose(){super.dispose(),this.disposer.dispose()}render(){this.animation&&this.animation.mixer.update(this.clock.getDelta()),this.light_holder.quaternion.copy(this.camera.quaternion),super.render(),this.animation&&!this.animation.action.paused&&(this.update_animation_frame(),this.schedule_render())}update_animation_frame(){if(this.animation&&!this.animation.action.paused){const e=this.animation.action.time;this.update_animation_time=!1,n.model_store.animation_frame.val=e*d.PSO_FRAME_RATE+1,this.update_animation_time=!0}}}},lPzw:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.AreaModel=class{constructor(e,t,i,o){if(!Number.isInteger(e)||e<0)throw new Error(`Expected id to be a non-negative integer, got ${e}.`);if(!t)throw new Error("name is required.");if(!o)throw new Error("area_variants is required.");this.id=e,this.name=t,this.order=i,this.area_variants=o}}},lg9k:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("ZPAt");t.Instruction=class{constructor(e,t){this.opcode=e,this.args=t,this.arg_size=0,this.param_to_args=[];const i=Math.min(e.params.length,t.length);for(let n=0;ne.can_undo),this.can_redo=this.current.flat_map(e=>e.can_redo),this.first_undo=this.current.flat_map(e=>e.first_undo),this.first_redo=this.current.flat_map(e=>e.first_redo)}undo(){return this.current.val.undo()}redo(){return this.current.val.redo()}}},nEgy:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("Tpfs"),n=i("+LO4"),s=i("52VV");class r extends n.AbstractMinimalProperty{constructor(e,t){super(),this.dependencies=e,this.f=t,this.dependency_disposables=new o.Disposer}get val(){return this.get_val()}get_val(){return this.dependency_disposables.length?this._val:this.f()}observe(e,t={}){const i=super.observe(e,t);return 0===this.dependency_disposables.length&&(this._val=this.f(),this.dependency_disposables.add_all(...this.dependencies.map(e=>e.observe(()=>{const e=this._val;this._val=this.f(),this.emit(e)})))),this.emit(this._val),{dispose:()=>{i.dispose(),0===this.observers.length&&this.dependency_disposables.dispose_all()}}}map(e){return new r([this],()=>e(this.val))}flat_map(e){return new s.FlatMappedProperty(this,t=>e(t))}}t.DependentProperty=r},nN8q:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("TRid");t.ResizableWidget=class extends o.Widget{constructor(){super(...arguments),this.width=0,this.height=0}resize(e,t){return this.width=e,this.height=t,this.element.style.width=`${e}px`,this.element.style.height=`${t}px`,this}}},nowp:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("ExVU"),n=i("ouMO");t.WantedItemModel=class{constructor(e,t){this.item_type=e,this._amount=n.property(t),this.amount=this._amount}set_amount(e){return this._amount.val=e,this}};t.OptimalResultModel=class{constructor(e,t){this.wanted_items=e,this.optimal_methods=t}};t.OptimalMethodModel=class{constructor(e,t,i,n,s,r,a){this.difficulty=e,this.section_ids=t,this.method_name=i,this.method_episode=n,this.method_time=s,this.runs=r,this.item_counts=a,this.total_time=o.Duration.fromMillis(r*s.as("milliseconds"))}}},nsCy:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("uiJh");var n,s,r;t.RARE_ENEMY_PROB=1/512,t.KONDRIEU_PROB=.1,function(e){e.Ephinea="Ephinea"}(n=t.Server||(t.Server={})),t.Servers=o.enum_values(n),function(e){e[e.Viridia=0]="Viridia",e[e.Greenill=1]="Greenill",e[e.Skyly=2]="Skyly",e[e.Bluefull=3]="Bluefull",e[e.Purplenum=4]="Purplenum",e[e.Pinkal=5]="Pinkal",e[e.Redria=6]="Redria",e[e.Oran=7]="Oran",e[e.Yellowboze=8]="Yellowboze",e[e.Whitill=9]="Whitill"}(s=t.SectionId||(t.SectionId={})),t.SectionIds=o.enum_values(s),function(e){e[e.Normal=0]="Normal",e[e.Hard=1]="Hard",e[e.VHard=2]="VHard",e[e.Ultimate=3]="Ultimate"}(r=t.Difficulty||(t.Difficulty={})),t.Difficulties=o.enum_values(r)},oSIo:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("x4IQ");t.EditShortDescriptionAction=class extends o.QuestEditAction{constructor(){super(...arguments),this.description="Edit short description"}undo(){this.quest.set_short_description(this.old)}redo(){this.quest.set_short_description(this.new)}}},ouMO:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("Q+PT"),n=i("0CzU"),s=i("nEgy"),r=i("22Lq");t.emitter=function(){return new o.SimpleEmitter},t.property=function(e){return new n.SimpleProperty(e)},t.list_property=function(e,...t){return new r.SimpleListProperty(e,...t)},t.add=function(e,t){return e.map(e=>e+t)},t.sub=function(e,t){return e.map(e=>e-t)},t.map=function(e,...t){return new s.DependentProperty(t,()=>e(...t.map(e=>e.val)))}},oxtq:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.ListChange=0]="ListChange",e[e.ValueChange=1]="ValueChange"}(t.ListChangeType||(t.ListChangeType={})),t.is_list_property=function(e){return e.is_list_property},t.is_any_list_property=function(e){return e&&e.is_list_property}},oyid:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("FXpb"),n=i("sDu+"),s=i("4VsB");class r extends n.LabelledControl{constructor(e=!1,t){super(t),this.element=o.create_element("input",{class:"core_CheckBox"}),this.preferred_label_position="right",this._checked=new s.WidgetProperty(this,e,this.set_checked),this.checked=this._checked,this.set_checked(e),this.element.type="checkbox",this.element.onchange=()=>this._checked.set_val(this.element.checked,{silent:!1}),this.finalize_construction(r.prototype)}set_enabled(e){super.set_enabled(e),this.element.disabled=!e}set_checked(e){this.element.checked=e}}t.CheckBox=r},pgiS:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("x4IQ");t.EditNameAction=class extends o.QuestEditAction{constructor(){super(...arguments),this.description="Edit name"}undo(){this.quest.set_name(this.old)}redo(){this.quest.set_name(this.new)}}},poKQ:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("yQqj"),n=i("c5EP");t.CreateEntityAction=class{constructor(e){this.entity=e,this.description=`Create ${o.entity_data(e.type).name}`}undo(){const e=n.quest_editor_store.current_quest.val;e&&e.remove_entity(this.entity)}redo(){const e=n.quest_editor_store.current_quest.val;e&&(e.add_entity(this.entity),n.quest_editor_store.set_selected_entity(this.entity))}}},q1Dg:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("nN8q"),n=i("FXpb"),s=i("c5EP"),r=i("xs7i"),a=i("PE7g"),d=i("Tpfs"),l=i("E/0a"),_=i("ETgL");i("ObFr");const u=i("5aKR");class c extends o.ResizableWidget{constructor(){super(),this.element=n.el.div({class:"quest_editor_QuestInfoView",tab_index:-1}),this.table_element=n.el.table(),this.id_input=this.disposable(new a.NumberInput),this.name_input=this.disposable(new l.TextInput("",{max_length:32})),this.short_description_input=this.disposable(new _.TextArea("",{max_length:128,font_family:'"Courier New", monospace',cols:25,rows:5})),this.long_description_input=this.disposable(new _.TextArea("",{max_length:288,font_family:'"Courier New", monospace',cols:25,rows:10})),this.no_quest_view=new u.DisabledView("No quest loaded."),this.quest_disposer=this.disposable(new d.Disposer);const e=s.quest_editor_store.current_quest,t=e.map(e=>null==e);this.table_element.append(n.el.tr({},n.el.th({text:"Episode:"}),this.episode_element=n.el.td()),n.el.tr({},n.el.th({text:"ID:"}),n.el.td({},this.id_input.element)),n.el.tr({},n.el.th({text:"Name:"}),n.el.td({},this.name_input.element)),n.el.tr({},n.el.th({text:"Short description:",col_span:2})),n.el.tr({},n.el.td({col_span:2},this.short_description_input.element)),n.el.tr({},n.el.th({text:"Long description:",col_span:2})),n.el.tr({},n.el.td({col_span:2},this.long_description_input.element))),this.bind_hidden(this.table_element,t),this.element.append(this.table_element,this.no_quest_view.element),this.element.addEventListener("focus",()=>s.quest_editor_store.undo.make_current(),!0),this.disposables(this.no_quest_view.visible.bind_to(t),e.observe(({value:e})=>{this.quest_disposer.dispose_all(),this.episode_element.textContent=e?r.Episode[e.episode]:"",e&&this.quest_disposer.add_all(this.id_input.value.bind_to(e.id),this.id_input.value.observe(s.quest_editor_store.id_changed),this.name_input.value.bind_to(e.name),this.name_input.value.observe(s.quest_editor_store.name_changed),this.short_description_input.value.bind_to(e.short_description),this.short_description_input.value.observe(s.quest_editor_store.short_description_changed),this.long_description_input.value.bind_to(e.long_description),this.long_description_input.value.observe(s.quest_editor_store.long_description_changed))})),this.finalize_construction(c.prototype)}}t.QuestInfoView=c},q7ag:function(e,t,i){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=o(i("GGSb")).default.get("data_formats/parsing/ninja/xj");function s(e,t,i){const o=[];for(let n=0;n=1&&(i>1&&n.warn(`Vertex info count of ${i} was larger than expected.`),l.vertices.push(...function(e,t){e.seek_start(t);const i=e.u16();e.seek(2);const o=e.u32(),s=e.u32(),r=e.u32(),a=[];for(let t=0;tthis.button_mousedown(),{capture:!0}),this.button.mouseup.observe(()=>this.button_mouseup()),this.menu.selected.observe(({value:e})=>{e&&(this._chosen.emit({value:e}),this.menu.selected.val=void 0)})),this.finalize_construction(d.prototype)}set_enabled(e){super.set_enabled(e),this.button.enabled.val=e}button_mousedown(){this.just_opened=!this.menu.visible.val,this.menu.visible.val=!0}button_mouseup(){this.just_opened?this.menu.focus():this.menu.visible.val=!1,this.just_opened=!1}}t.DropDown=d},rqwK:function(e,t,i){"use strict";var o=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))((function(n,s){function r(e){try{d(o.next(e))}catch(e){s(e)}}function a(e){try{d(o.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}d((o=o.apply(e,t||[])).next())}))},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=n(i("GGSb")),r=i("nsCy"),a=i("sZ1+"),d=i("upFJ"),l=i("IV2v"),_=i("RMZt"),u=i("ExVU"),c=i("ouMO"),p=i("Tpfs"),v=i("6WXA"),h=s.default.get("hunt_optimizer/stores/HuntMethodStore"),w=u.Duration.fromObject({minutes:30}),f=u.Duration.fromObject({minutes:45}),E=u.Duration.fromObject({minutes:45});class m{constructor(e,t){this.disposer=new p.Disposer,this.methods=c.list_property(e=>[e.user_time],...t),this.disposer.add(this.methods.observe_list(()=>_.hunt_method_persister.persist_method_user_times(this.methods.val,e)))}dispose(){this.disposer.dispose()}}t.HuntMethodStore=m,t.hunt_method_stores=new v.ServerMap((function(e){return o(this,void 0,void 0,(function*(){const t=yield fetch(`/assets/quests.${r.Server[e].toLowerCase()}.json`),i=yield t.json(),o=[];for(const e of i){let t=0;const i=new Map;for(const[o,n]of Object.entries(e.enemyCounts)){const e=a.NpcType[o];e?(i.set(e,n),t+=n):h.error(`No NpcType found for code ${o}.`)}switch(e.id){case 31:case 34:case 1305:case 1306:case 1307:case 313:case 314:continue}o.push(new l.HuntMethodModel(`q${e.id}`,e.name,new d.SimpleQuestModel(e.id,e.name,e.episode,i),/^\d-\d.*/.test(e.name)?f:t>400?E:w))}return yield _.hunt_method_persister.load_method_user_times(o,e),new m(e,o)}))}))},"sDu+":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("7ZX1"),n=i("QmPX");t.LabelledControl=class extends n.Control{constructor(e){super(e),this._label_text=e&&e.label}get label(){return this._label||null==this._label_text||(this._label=this.disposable(new o.Label(this._label_text,{enabled:this.enabled.val,tooltip:this.tooltip.val})),this.id||(this.id="core_LabelledControl_id_"+String(s++)),this._label.for=this.id),this._label}set_enabled(e){super.set_enabled(e),this._label&&(this._label.enabled.val=e)}set_tooltip(e){super.set_tooltip(e),this._label&&(this._label.tooltip.val=e)}};let s=0},sMN3:function(e,t,i){"use strict";var o=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))((function(n,s){function r(e){try{d(o.next(e))}catch(e){s(e)}}function a(e){try{d(o.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}d((o=o.apply(e,t||[])).next())}))},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=n(i("lLyO")),r=i("nsCy"),a=i("sZ1+"),d=i("nowp"),l=i("ouMO"),_=i("rqwK"),u=i("dx17"),c=i("G+UN"),p=i("w+Lt"),v=i("6WXA"),h=i("Tpfs");class w{constructor(e,t,i,n){this.server=e,this.item_drop_store=i,this._wanted_items=l.list_property(e=>[e.amount]),this.disposer=new h.Disposer,this.optimize=(e,t)=>{if(!e.length)return;const i=new Set(e.filter(e=>e.amount.val>0).map(e=>e.item_type)),o=this.item_drop_store.enemy_drops,n={};for(const e of this.wanted_items.val)n[e.item_type.name]={min:e.amount.val};const l={},_=new Map;for(const e of t){const t=new Map;for(const[i,o]of e.enemy_counts.entries()){const e=t.get(i)||0,n=a.npc_data(i);if(null==n.rare_type)t.set(i,e+o);else{let s,d;n.rare_type===a.NpcType.Kondrieu?(s=1-r.KONDRIEU_PROB,d=r.KONDRIEU_PROB):(s=1-r.RARE_ENEMY_PROB,d=r.RARE_ENEMY_PROB),t.set(i,e+o*s),t.set(n.rare_type,(t.get(n.rare_type)||0)+o*d)}}const n=[t],s=t.get(a.NpcType.PanArms);if(s){const e=new Map(t);e.delete(a.NpcType.PanArms),e.set(a.NpcType.Migium,s),e.set(a.NpcType.Hidoom,s),n.push(e)}const d=t.get(a.NpcType.PanArms2);if(d){const e=new Map(t);e.delete(a.NpcType.PanArms2),e.set(a.NpcType.Migium2,d),e.set(a.NpcType.Hidoom2,d),n.push(e)}for(let t=0;to(this,void 0,void 0,(function*(){this._wanted_items.val=yield p.hunt_optimizer_persister.load_wanted_items(this.server),this.disposer.add(this._wanted_items.observe(({value:e})=>{p.hunt_optimizer_persister.persist_wanted_items(this.server,e)}))})),this.huntable_item_types=t.item_types.filter(e=>i.enemy_drops.get_drops_for_item_type(e.id).length),this.wanted_items=this._wanted_items,this.result=l.map(this.optimize,this.wanted_items,n.methods),this.initialize_persistence()}dispose(){this.disposer.dispose()}add_wanted_item(e){this._wanted_items.val.find(t=>t.item_type===e)||this._wanted_items.push(new d.WantedItemModel(e,1))}remove_wanted_item(e){this._wanted_items.remove(e)}full_method_name(e,t,i,o){let n=`${e}\t${t}\t${i.id}`;return o&&(n+="\tspa"),n}}t.hunt_optimizer_stores=new v.ServerMap((function(e){return o(this,void 0,void 0,(function*(){return new w(e,yield c.item_type_stores.get(e),yield u.item_drop_stores.get(e),yield _.hunt_method_stores.get(e))}))}))},"sZ1+":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("xs7i");var n;!function(e){e[e.Unknown=0]="Unknown",e[e.FemaleFat=1]="FemaleFat",e[e.FemaleMacho=2]="FemaleMacho",e[e.FemaleTall=3]="FemaleTall",e[e.MaleDwarf=4]="MaleDwarf",e[e.MaleFat=5]="MaleFat",e[e.MaleMacho=6]="MaleMacho",e[e.MaleOld=7]="MaleOld",e[e.BlueSoldier=8]="BlueSoldier",e[e.RedSoldier=9]="RedSoldier",e[e.Principal=10]="Principal",e[e.Tekker=11]="Tekker",e[e.GuildLady=12]="GuildLady",e[e.Scientist=13]="Scientist",e[e.Nurse=14]="Nurse",e[e.Irene=15]="Irene",e[e.ItemShop=16]="ItemShop",e[e.Nurse2=17]="Nurse2",e[e.Hildebear=18]="Hildebear",e[e.Hildeblue=19]="Hildeblue",e[e.RagRappy=20]="RagRappy",e[e.AlRappy=21]="AlRappy",e[e.Monest=22]="Monest",e[e.Mothmant=23]="Mothmant",e[e.SavageWolf=24]="SavageWolf",e[e.BarbarousWolf=25]="BarbarousWolf",e[e.Booma=26]="Booma",e[e.Gobooma=27]="Gobooma",e[e.Gigobooma=28]="Gigobooma",e[e.Dragon=29]="Dragon",e[e.GrassAssassin=30]="GrassAssassin",e[e.PoisonLily=31]="PoisonLily",e[e.NarLily=32]="NarLily",e[e.NanoDragon=33]="NanoDragon",e[e.EvilShark=34]="EvilShark",e[e.PalShark=35]="PalShark",e[e.GuilShark=36]="GuilShark",e[e.PofuillySlime=37]="PofuillySlime",e[e.PouillySlime=38]="PouillySlime",e[e.PanArms=39]="PanArms",e[e.Migium=40]="Migium",e[e.Hidoom=41]="Hidoom",e[e.DeRolLe=42]="DeRolLe",e[e.Dubchic=43]="Dubchic",e[e.Gilchic=44]="Gilchic",e[e.Garanz=45]="Garanz",e[e.SinowBeat=46]="SinowBeat",e[e.SinowGold=47]="SinowGold",e[e.Canadine=48]="Canadine",e[e.Canane=49]="Canane",e[e.Dubswitch=50]="Dubswitch",e[e.VolOpt=51]="VolOpt",e[e.Delsaber=52]="Delsaber",e[e.ChaosSorcerer=53]="ChaosSorcerer",e[e.DarkGunner=54]="DarkGunner",e[e.DeathGunner=55]="DeathGunner",e[e.ChaosBringer=56]="ChaosBringer",e[e.DarkBelra=57]="DarkBelra",e[e.Dimenian=58]="Dimenian",e[e.LaDimenian=59]="LaDimenian",e[e.SoDimenian=60]="SoDimenian",e[e.Bulclaw=61]="Bulclaw",e[e.Bulk=62]="Bulk",e[e.Claw=63]="Claw",e[e.DarkFalz=64]="DarkFalz",e[e.Hildebear2=65]="Hildebear2",e[e.Hildeblue2=66]="Hildeblue2",e[e.RagRappy2=67]="RagRappy2",e[e.LoveRappy=68]="LoveRappy",e[e.StRappy=69]="StRappy",e[e.HalloRappy=70]="HalloRappy",e[e.EggRappy=71]="EggRappy",e[e.Monest2=72]="Monest2",e[e.Mothmant2=73]="Mothmant2",e[e.PoisonLily2=74]="PoisonLily2",e[e.NarLily2=75]="NarLily2",e[e.GrassAssassin2=76]="GrassAssassin2",e[e.Dimenian2=77]="Dimenian2",e[e.LaDimenian2=78]="LaDimenian2",e[e.SoDimenian2=79]="SoDimenian2",e[e.DarkBelra2=80]="DarkBelra2",e[e.BarbaRay=81]="BarbaRay",e[e.SavageWolf2=82]="SavageWolf2",e[e.BarbarousWolf2=83]="BarbarousWolf2",e[e.PanArms2=84]="PanArms2",e[e.Migium2=85]="Migium2",e[e.Hidoom2=86]="Hidoom2",e[e.Dubchic2=87]="Dubchic2",e[e.Gilchic2=88]="Gilchic2",e[e.Garanz2=89]="Garanz2",e[e.Dubswitch2=90]="Dubswitch2",e[e.Delsaber2=91]="Delsaber2",e[e.ChaosSorcerer2=92]="ChaosSorcerer2",e[e.GolDragon=93]="GolDragon",e[e.SinowBerill=94]="SinowBerill",e[e.SinowSpigell=95]="SinowSpigell",e[e.Merillia=96]="Merillia",e[e.Meriltas=97]="Meriltas",e[e.Mericarol=98]="Mericarol",e[e.Mericus=99]="Mericus",e[e.Merikle=100]="Merikle",e[e.UlGibbon=101]="UlGibbon",e[e.ZolGibbon=102]="ZolGibbon",e[e.Gibbles=103]="Gibbles",e[e.Gee=104]="Gee",e[e.GiGue=105]="GiGue",e[e.IllGill=106]="IllGill",e[e.DelLily=107]="DelLily",e[e.Epsilon=108]="Epsilon",e[e.GalGryphon=109]="GalGryphon",e[e.Deldepth=110]="Deldepth",e[e.Delbiter=111]="Delbiter",e[e.Dolmolm=112]="Dolmolm",e[e.Dolmdarl=113]="Dolmdarl",e[e.Morfos=114]="Morfos",e[e.Recobox=115]="Recobox",e[e.Recon=116]="Recon",e[e.SinowZoa=117]="SinowZoa",e[e.SinowZele=118]="SinowZele",e[e.OlgaFlow=119]="OlgaFlow",e[e.SandRappy=120]="SandRappy",e[e.DelRappy=121]="DelRappy",e[e.Astark=122]="Astark",e[e.SatelliteLizard=123]="SatelliteLizard",e[e.Yowie=124]="Yowie",e[e.MerissaA=125]="MerissaA",e[e.MerissaAA=126]="MerissaAA",e[e.Girtablulu=127]="Girtablulu",e[e.Zu=128]="Zu",e[e.Pazuzu=129]="Pazuzu",e[e.Boota=130]="Boota",e[e.ZeBoota=131]="ZeBoota",e[e.BaBoota=132]="BaBoota",e[e.Dorphon=133]="Dorphon",e[e.DorphonEclair=134]="DorphonEclair",e[e.Goran=135]="Goran",e[e.PyroGoran=136]="PyroGoran",e[e.GoranDetonator=137]="GoranDetonator",e[e.SaintMilion=138]="SaintMilion",e[e.Shambertin=139]="Shambertin",e[e.Kondrieu=140]="Kondrieu"}(n=t.NpcType||(t.NpcType={})),t.NPC_TYPES=[],t.ENEMY_NPC_TYPES=[],t.npc_data=function(e){return r[e]},t.name_and_episode_to_npc_type=function(e,t){return o.check_episode(t),s[t].get(e)};const s=[void 0,new Map,new Map,void 0,new Map],r=[];function a(e,i,o,n,a,d,l,_,u,c,p){if(t.NPC_TYPES.push(e),d&&t.ENEMY_NPC_TYPES.push(e),r[e]=Object.freeze({name:i,simple_name:o,ultimate_name:n,episode:a,enemy:d,rare_type:l,area_ids:_,pso_type_id:u,pso_roaming:c,pso_regular:p}),a){const t=s[a];t&&(t.set(o,e),t.set(n,e))}}a(n.Unknown,"Unknown","Unknown","Unknown",void 0,!1,void 0,[],void 0,void 0,void 0),a(n.FemaleFat,"Female Fat","Female Fat","Female Fat",void 0,!1,void 0,[0],4,0,!0),a(n.FemaleMacho,"Female Macho","Female Macho","Female Macho",void 0,!1,void 0,[0],5,0,!0),a(n.FemaleTall,"Female Tall","Female Tall","Female Tall",void 0,!1,void 0,[0],7,0,!0),a(n.MaleDwarf,"Male Dwarf","Male Dwarf","Male Dwarf",void 0,!1,void 0,[0],10,0,!0),a(n.MaleFat,"Male Fat","Male Fat","Male Fat",void 0,!1,void 0,[0],11,0,!0),a(n.MaleMacho,"Male Macho","Male Macho","Male Macho",void 0,!1,void 0,[0],12,0,!0),a(n.MaleOld,"Male Old","Male Old","Male Old",void 0,!1,void 0,[0],13,0,!0),a(n.BlueSoldier,"Blue Soldier","Blue Soldier","Blue Soldier",void 0,!1,void 0,[0],25,0,!0),a(n.RedSoldier,"Red Soldier","Red Soldier","Red Soldier",void 0,!1,void 0,[0],26,0,!0),a(n.Principal,"Principal","Principal","Principal",void 0,!1,void 0,[0],27,0,!0),a(n.Tekker,"Tekker","Tekker","Tekker",void 0,!1,void 0,[0],28,0,!0),a(n.GuildLady,"Guild Lady","Guild Lady","Guild Lady",void 0,!1,void 0,[0],29,0,!0),a(n.Scientist,"Scientist","Scientist","Scientist",void 0,!1,void 0,[0],30,0,!0),a(n.Nurse,"Nurse","Nurse","Nurse",void 0,!1,void 0,[0],31,0,!0),a(n.Irene,"Irene","Irene","Irene",void 0,!1,void 0,[0],32,0,!0),a(n.ItemShop,"Item Shop","Item Shop","Item Shop",void 0,!1,void 0,[0],241,0,!0),a(n.Nurse2,"Nurse (Ep. II)","Nurse","Nurse",2,!1,void 0,[0],254,0,!0),a(n.Hildebear,"Hildebear","Hildebear","Hildelt",1,!0,n.Hildeblue,[1,2],64,0,!0),a(n.Hildeblue,"Hildeblue","Hildeblue","Hildetorr",1,!0,void 0,[1,2],64,1,!0),a(n.RagRappy,"Rag Rappy","Rag Rappy","El Rappy",1,!0,n.AlRappy,[1,2],65,0,!0),a(n.AlRappy,"Al Rappy","Al Rappy","Pal Rappy",1,!0,void 0,[1,2],65,1,!0),a(n.Monest,"Monest","Monest","Mothvist",1,!0,void 0,[1,2],66,0,!0),a(n.Mothmant,"Mothmant","Mothmant","Mothvert",1,!0,void 0,[],void 0,void 0,void 0),a(n.SavageWolf,"Savage Wolf","Savage Wolf","Gulgus",1,!0,void 0,[1,2],67,0,!0),a(n.BarbarousWolf,"Barbarous Wolf","Barbarous Wolf","Gulgus-Gue",1,!0,void 0,[1,2],67,0,!1),a(n.Booma,"Booma","Booma","Bartle",1,!0,void 0,[1,2],68,0,!0),a(n.Gobooma,"Gobooma","Gobooma","Barble",1,!0,void 0,[1,2],68,1,!0),a(n.Gigobooma,"Gigobooma","Gigobooma","Tollaw",1,!0,void 0,[1,2],68,2,!0),a(n.Dragon,"Dragon","Dragon","Sil Dragon",1,!0,void 0,[11],192,0,!0),a(n.GrassAssassin,"Grass Assassin","Grass Assassin","Crimson Assassin",1,!0,void 0,[3,4,5],96,0,!0),a(n.PoisonLily,"Poison Lily","Poison Lily","Ob Lily",1,!0,n.NarLily,[3,4,5],97,0,!0),a(n.NarLily,"Nar Lily","Nar Lily","Mil Lily",1,!0,void 0,[3,4,5],97,1,!0),a(n.NanoDragon,"Nano Dragon","Nano Dragon","Nano Dragon",1,!0,void 0,[3,4,5],98,0,!0),a(n.EvilShark,"Evil Shark","Evil Shark","Vulmer",1,!0,void 0,[3,4,5],99,0,!0),a(n.PalShark,"Pal Shark","Pal Shark","Govulmer",1,!0,void 0,[3,4,5],99,1,!0),a(n.GuilShark,"Guil Shark","Guil Shark","Melqueek",1,!0,void 0,[3,4,5],99,2,!0),a(n.PofuillySlime,"Pofuilly Slime","Pofuilly Slime","Pofuilly Slime",1,!0,n.PouillySlime,[3,4,5],100,0,!0),a(n.PouillySlime,"Pouilly Slime","Pouilly Slime","Pouilly Slime",1,!0,void 0,[3,4,5],100,0,!1),a(n.PanArms,"Pan Arms","Pan Arms","Pan Arms",1,!0,void 0,[3,4,5],101,0,!0),a(n.Migium,"Migium","Migium","Migium",1,!0,void 0,[],void 0,void 0,void 0),a(n.Hidoom,"Hidoom","Hidoom","Hidoom",1,!0,void 0,[],void 0,void 0,void 0),a(n.DeRolLe,"De Rol Le","De Rol Le","Dal Ra Lie",1,!0,void 0,[12],193,0,!0),a(n.Dubchic,"Dubchic","Dubchic","Dubchich",1,!0,void 0,[6,7],128,0,!0),a(n.Gilchic,"Gilchic","Gilchic","Gilchich",1,!0,void 0,[6,7],128,1,!0),a(n.Garanz,"Garanz","Garanz","Baranz",1,!0,void 0,[6,7],129,0,!0),a(n.SinowBeat,"Sinow Beat","Sinow Beat","Sinow Blue",1,!0,void 0,[6,7],130,0,!0),a(n.SinowGold,"Sinow Gold","Sinow Gold","Sinow Red",1,!0,void 0,[6,7],130,0,!1),a(n.Canadine,"Canadine","Canadine","Canabin",1,!0,void 0,[6,7],131,0,!0),a(n.Canane,"Canane","Canane","Canune",1,!0,void 0,[6,7],132,0,!0),a(n.Dubswitch,"Dubswitch","Dubswitch","Dubswitch",1,!0,void 0,[6,7],133,0,!0),a(n.VolOpt,"Vol Opt","Vol Opt","Vol Opt ver.2",1,!0,void 0,[13],197,0,!0),a(n.Delsaber,"Delsaber","Delsaber","Delsaber",1,!0,void 0,[8,9,10],160,0,!0),a(n.ChaosSorcerer,"Chaos Sorcerer","Chaos Sorcerer","Gran Sorcerer",1,!0,void 0,[8,9,10],161,0,!0),a(n.DarkGunner,"Dark Gunner","Dark Gunner","Dark Gunner",1,!0,void 0,[8,9,10],162,0,!0),a(n.DeathGunner,"Death Gunner","Death Gunner","Death Gunner",1,!0,void 0,[],void 0,void 0,void 0),a(n.ChaosBringer,"Chaos Bringer","Chaos Bringer","Dark Bringer",1,!0,void 0,[8,9,10],164,0,!0),a(n.DarkBelra,"Dark Belra","Dark Belra","Indi Belra",1,!0,void 0,[8,9,10],165,0,!0),a(n.Dimenian,"Dimenian","Dimenian","Arlan",1,!0,void 0,[8,9,10],166,0,!0),a(n.LaDimenian,"La Dimenian","La Dimenian","Merlan",1,!0,void 0,[8,9,10],166,1,!0),a(n.SoDimenian,"So Dimenian","So Dimenian","Del-D",1,!0,void 0,[8,9,10],166,2,!0),a(n.Bulclaw,"Bulclaw","Bulclaw","Bulclaw",1,!0,void 0,[8,9,10],167,0,!0),a(n.Bulk,"Bulk","Bulk","Bulk",1,!0,void 0,[],void 0,void 0,void 0),a(n.Claw,"Claw","Claw","Claw",1,!0,void 0,[8,9,10],168,0,!0),a(n.DarkFalz,"Dark Falz","Dark Falz","Dark Falz",1,!0,void 0,[14],200,0,!0),a(n.Hildebear2,"Hildebear (Ep. II)","Hildebear","Hildelt",2,!0,n.Hildeblue2,[1,2],64,0,!0),a(n.Hildeblue2,"Hildeblue (Ep. II)","Hildeblue","Hildetorr",2,!0,void 0,[1,2],64,1,!0),a(n.RagRappy2,"Rag Rappy (Ep. II)","Rag Rappy","El Rappy",2,!0,n.LoveRappy,[1,2],65,0,!0),a(n.LoveRappy,"Love Rappy","Love Rappy","Love Rappy",2,!0,void 0,[1,2],65,1,!0),a(n.StRappy,"St. Rappy","St. Rappy","St. Rappy",2,!0,void 0,[],void 0,void 0,void 0),a(n.HalloRappy,"Hallo Rappy","Hallo Rappy","Hallo Rappy",2,!0,void 0,[],void 0,void 0,void 0),a(n.EggRappy,"Egg Rappy","Egg Rappy","Egg Rappy",2,!0,void 0,[],void 0,void 0,void 0),a(n.Monest2,"Monest (Ep. II)","Monest","Mothvist",2,!0,void 0,[1,2],66,0,!0),a(n.Mothmant2,"Mothmant","Mothmant","Mothvert",2,!0,void 0,[],void 0,void 0,void 0),a(n.PoisonLily2,"Poison Lily (Ep. II)","Poison Lily","Ob Lily",2,!0,n.NarLily2,[1,2],97,0,!0),a(n.NarLily2,"Nar Lily (Ep. II)","Nar Lily","Mil Lily",2,!0,void 0,[1,2],97,1,!0),a(n.GrassAssassin2,"Grass Assassin (Ep. II)","Grass Assassin","Crimson Assassin",2,!0,void 0,[1,2],96,0,!0),a(n.Dimenian2,"Dimenian (Ep. II)","Dimenian","Arlan",2,!0,void 0,[1,2],166,0,!0),a(n.LaDimenian2,"La Dimenian (Ep. II)","La Dimenian","Merlan",2,!0,void 0,[1,2],166,1,!0),a(n.SoDimenian2,"So Dimenian (Ep. II)","So Dimenian","Del-D",2,!0,void 0,[1,2],166,2,!0),a(n.DarkBelra2,"Dark Belra (Ep. II)","Dark Belra","Indi Belra",2,!0,void 0,[1,2],165,0,!0),a(n.BarbaRay,"Barba Ray","Barba Ray","Barba Ray",2,!0,void 0,[14],203,0,!0),a(n.SavageWolf2,"Savage Wolf (Ep. II)","Savage Wolf","Gulgus",2,!0,void 0,[3,4],67,0,!0),a(n.BarbarousWolf2,"Barbarous Wolf (Ep. II)","Barbarous Wolf","Gulgus-Gue",2,!0,void 0,[3,4],67,0,!1),a(n.PanArms2,"Pan Arms (Ep. II)","Pan Arms","Pan Arms",2,!0,void 0,[3,4],101,0,!0),a(n.Migium2,"Migium (Ep. II)","Migium","Migium",2,!0,void 0,[],void 0,void 0,void 0),a(n.Hidoom2,"Hidoom (Ep. II)","Hidoom","Hidoom",2,!0,void 0,[],void 0,void 0,void 0),a(n.Dubchic2,"Dubchic (Ep. II)","Dubchic","Dubchich",2,!0,void 0,[3,4],128,0,!0),a(n.Gilchic2,"Gilchic (Ep. II)","Gilchic","Gilchich",2,!0,void 0,[3,4],128,1,!0),a(n.Garanz2,"Garanz (Ep. II)","Garanz","Baranz",2,!0,void 0,[3,4],129,0,!0),a(n.Dubswitch2,"Dubswitch (Ep. II)","Dubswitch","Dubswitch",2,!0,void 0,[3,4],133,0,!0),a(n.Delsaber2,"Delsaber (Ep. II)","Delsaber","Delsaber",2,!0,void 0,[3,4],160,0,!0),a(n.ChaosSorcerer2,"Chaos Sorcerer (Ep. II)","Chaos Sorcerer","Gran Sorcerer",2,!0,void 0,[3,4],161,0,!0),a(n.GolDragon,"Gol Dragon","Gol Dragon","Gol Dragon",2,!0,void 0,[15],204,0,!0),a(n.SinowBerill,"Sinow Berill","Sinow Berill","Sinow Berill",2,!0,void 0,[5,6,7,8,9,16],212,0,!0),a(n.SinowSpigell,"Sinow Spigell","Sinow Spigell","Sinow Spigell",2,!0,void 0,[5,6,7,8,9,16],212,1,!0),a(n.Merillia,"Merillia","Merillia","Merillia",2,!0,void 0,[5,6,7,8,9,16],213,0,!0),a(n.Meriltas,"Meriltas","Meriltas","Meriltas",2,!0,void 0,[5,6,7,8,9,16],213,1,!0),a(n.Mericarol,"Mericarol","Mericarol","Mericarol",2,!0,void 0,[5,6,7,8,9,16,17],214,0,!0),a(n.Mericus,"Mericus","Mericus","Mericus",2,!0,void 0,[5,6,7,8,9,16,17],214,1,!0),a(n.Merikle,"Merikle","Merikle","Merikle",2,!0,void 0,[5,6,7,8,9,16,17],214,2,!0),a(n.UlGibbon,"Ul Gibbon","Ul Gibbon","Ul Gibbon",2,!0,void 0,[5,6,7,8,9,16],215,0,!0),a(n.ZolGibbon,"Zol Gibbon","Zol Gibbon","Zol Gibbon",2,!0,void 0,[5,6,7,8,9,16],215,1,!0),a(n.Gibbles,"Gibbles","Gibbles","Gibbles",2,!0,void 0,[5,6,7,8,9,16,17],216,0,!0),a(n.Gee,"Gee","Gee","Gee",2,!0,void 0,[5,6,7,8,9,16],217,0,!0),a(n.GiGue,"Gi Gue","Gi Gue","Gi Gue",2,!0,void 0,[5,6,7,8,9,16,17],218,0,!0),a(n.IllGill,"Ill Gill","Ill Gill","Ill Gill",2,!0,void 0,[17],225,0,!0),a(n.DelLily,"Del Lily","Del Lily","Del Lily",2,!0,void 0,[17],97,0,!0),a(n.Epsilon,"Epsilon","Epsilon","Epsilon",2,!0,void 0,[17],224,0,!0),a(n.GalGryphon,"Gal Gryphon","Gal Gryphon","Gal Gryphon",2,!0,void 0,[12],192,0,!0),a(n.Deldepth,"Deldepth","Deldepth","Deldepth",2,!0,void 0,[10,11],219,0,!0),a(n.Delbiter,"Delbiter","Delbiter","Delbiter",2,!0,void 0,[10,11,17],220,0,!0),a(n.Dolmolm,"Dolmolm","Dolmolm","Dolmolm",2,!0,void 0,[10,11],221,0,!0),a(n.Dolmdarl,"Dolmdarl","Dolmdarl","Dolmdarl",2,!0,void 0,[10,11],221,1,!0),a(n.Morfos,"Morfos","Morfos","Morfos",2,!0,void 0,[10,11],222,0,!0),a(n.Recobox,"Recobox","Recobox","Recobox",2,!0,void 0,[10,11,17],223,0,!0),a(n.Recon,"Recon","Recon","Recon",2,!0,void 0,[],void 0,void 0,void 0),a(n.SinowZoa,"Sinow Zoa","Sinow Zoa","Sinow Zoa",2,!0,void 0,[10,11],224,0,!0),a(n.SinowZele,"Sinow Zele","Sinow Zele","Sinow Zele",2,!0,void 0,[10,11],224,1,!0),a(n.OlgaFlow,"Olga Flow","Olga Flow","Olga Flow",2,!0,void 0,[13],202,0,!0),a(n.SandRappy,"Sand Rappy","Sand Rappy","Sand Rappy",4,!0,n.DelRappy,[1,2,3,4,5,6,7,8],65,0,!0),a(n.DelRappy,"Del Rappy","Del Rappy","Del Rappy",4,!0,void 0,[1,2,3,4,5,6,7,8],65,1,!0),a(n.Astark,"Astark","Astark","Astark",4,!0,void 0,[1,2,3,4,5,6,7,8],272,0,!0),a(n.SatelliteLizard,"Satellite Lizard","Satellite Lizard","Satellite Lizard",4,!0,void 0,[1,2,3,4,5,6,7,8],273,0,!0),a(n.Yowie,"Yowie","Yowie","Yowie",4,!0,void 0,[1,2,3,4,5,6,7,8],273,0,!1),a(n.MerissaA,"Merissa A","Merissa A","Merissa A",4,!0,n.MerissaAA,[6,7,8],274,0,!0),a(n.MerissaAA,"Merissa AA","Merissa AA","Merissa AA",4,!0,void 0,[6,7,8],274,1,!0),a(n.Girtablulu,"Girtablulu","Girtablulu","Girtablulu",4,!0,void 0,[6,7,8],275,0,!0),a(n.Zu,"Zu","Zu","Zu",4,!0,n.Pazuzu,[1,2,3,4,5,6,7,8],276,0,!0),a(n.Pazuzu,"Pazuzu","Pazuzu","Pazuzu",4,!0,void 0,[1,2,3,4,5,6,7,8],276,1,!0),a(n.Boota,"Boota","Boota","Boota",4,!0,void 0,[1,2,3,4,5],277,0,!0),a(n.ZeBoota,"Ze Boota","Ze Boota","Ze Boota",4,!0,void 0,[1,2,3,4,5],277,1,!0),a(n.BaBoota,"Ba Boota","Ba Boota","Ba Boota",4,!0,void 0,[1,2,3,4,5],277,2,!0),a(n.Dorphon,"Dorphon","Dorphon","Dorphon",4,!0,n.DorphonEclair,[1,2,3,4,5],278,0,!0),a(n.DorphonEclair,"Dorphon Eclair","Dorphon Eclair","Dorphon Eclair",4,!0,void 0,[1,2,3,4,5],278,1,!0),a(n.Goran,"Goran","Goran","Goran",4,!0,void 0,[6,7,8],279,0,!0),a(n.PyroGoran,"Pyro Goran","Pyro Goran","Pyro Goran",4,!0,void 0,[6,7,8],279,1,!0),a(n.GoranDetonator,"Goran Detonator","Goran Detonator","Goran Detonator",4,!0,void 0,[6,7,8],279,2,!0),a(n.SaintMilion,"Saint-Milion","Saint-Milion","Saint-Milion",4,!0,n.Kondrieu,[9],281,0,!0),a(n.Shambertin,"Shambertin","Shambertin","Shambertin",4,!0,n.Kondrieu,[9],281,1,!0),a(n.Kondrieu,"Kondrieu","Kondrieu","Kondrieu",4,!0,void 0,[9],281,0,!1),Object.freeze(t.NPC_TYPES),Object.freeze(t.ENEMY_NPC_TYPES),Object.freeze(r)},sv1z:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("sDu+"),n=i("FXpb");i("6MRE");const s=i("jJhE"),r=i("KVVN"),a=i("4VsB"),d=i("LSoc");class l extends o.LabelledControl{constructor(e,t,i){super(i),this.element=n.el.div({class:"core_Select"}),this.preferred_label_position="left",this.to_label=t,this.button=this.disposable(new r.Button(" ",{icon_right:n.Icon.TriangleDown})),this.menu=this.disposable(new d.Menu(e,t,this.element)),this.element.append(this.button.element,this.menu.element),this._selected=new a.WidgetProperty(this,void 0,this.set_selected),this.selected=this._selected,this.just_opened=!1,this.disposables(n.disposable_listener(this.button.element,"mousedown",e=>this.button_mousedown(e)),this.button.mouseup.observe(()=>this.button_mouseup()),this.menu.selected.observe(({value:e})=>this._selected.set_val(e,{silent:!1}))),i&&(s.is_any_property(i.selected)?this.selected.bind_to(i.selected):i.selected&&(this.selected.val=i.selected)),this.finalize_construction(l.prototype)}set_enabled(e){super.set_enabled(e),this.button.enabled.val=e}set_selected(e){this.button.text.val=e?this.to_label(e):" ",this.menu.selected.val=e}button_mousedown(e){e.stopPropagation(),this.just_opened=!this.menu.visible.val,this.menu.visible.val=!0}button_mouseup(){this.just_opened?this.menu.focus():this.menu.visible.val=!1,this.just_opened=!1}}t.Select=l},t2oB:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.CharacterClassAnimationModel=class{constructor(e,t){this.id=e,this.name=t}}},tRdk:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("Womt");t.vec3_to_threejs=function(e){return new o.Vector3(e.x,e.y,e.z)}},tjEv:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.ResizableBuffer=class{constructor(e=8192){this._size=0,this._buffer=new ArrayBuffer(e),this._data_view=new DataView(this._buffer)}get size(){return this._size}set size(e){if(e<0)throw new Error("Size should be non-negative.");this.ensure_capacity(e),this._size=e}get capacity(){return this._buffer.byteLength}get backing_buffer(){return this._buffer}get view(){return this._data_view}sub_view(e,t){return new DataView(this._buffer,e,t)}ensure_capacity(e){if(e>this.capacity){let t=this.capacity||e;do{t*=2}while(tnew l.CharacterClassAnimationModel(t,`Animation ${t+1}`)),this.current_model=u.property(void 0),this._current_nj_data=u.property(void 0),this.current_nj_data=this._current_nj_data,this._current_xvm=u.property(void 0),this.current_xvm=this._current_xvm,this.show_skeleton=u.property(!1),this.current_animation=u.property(void 0),this._current_nj_motion=u.property(void 0),this.current_nj_motion=this._current_nj_motion,this.animation_playing=u.property(!0),this.animation_frame_rate=u.property(c.PSO_FRAME_RATE),this.animation_frame=u.property(0),this.animation_frame_count=this.current_nj_motion.map(e=>e?e.frame_count:0),this.disposables=[],this.load_file=e=>o(this,void 0,void 0,(function*(){try{const t=yield _.read_file(e),i=new n.ArrayBufferCursor(t,s.Endianness.Little);if(e.name.endsWith(".nj")){this.current_model.val=void 0;const e=a.parse_nj(i)[0];this.set_current_nj_data({nj_object:e,bone_count:e.bone_count(),has_skeleton:!0})}else if(e.name.endsWith(".xj")){this.current_model.val=void 0;const e=a.parse_xj(i)[0];this.set_current_nj_data({nj_object:e,bone_count:0,has_skeleton:!1})}else if(e.name.endsWith(".njm")){this.current_animation.val=void 0,this._current_nj_motion.val=void 0;const e=this.current_nj_data.val;e&&(this.animation_playing.val=!0,this._current_nj_motion.val=r.parse_njm(i,e.bone_count))}else e.name.endsWith(".xvm")?this.current_model&&(this._current_xvm.val=p.parse_xvm(i)):h.error(`Unknown file extension in filename "${e.name}".`)}catch(e){h.error("Couldn't read file.",e)}})),this.load_model=e=>o(this,void 0,void 0,(function*(){if(this.current_animation.val=void 0,e){const t=yield this.get_nj_object(e);this.set_current_nj_data({nj_object:t,bone_count:e?64:t.bone_count(),has_skeleton:!0})}else this._current_nj_data.val=void 0})),this.load_animation=e=>o(this,void 0,void 0,(function*(){const t=this.current_nj_data.val;t&&e?(this._current_nj_motion.val=yield this.get_nj_motion(e,t.bone_count),this.animation_playing.val=!0):this._current_nj_motion.val=void 0})),this.disposables.push(this.current_model.observe(({value:e})=>this.load_model(e)),this.current_animation.observe(({value:e})=>this.load_animation(e)))}dispose(){this.disposables.forEach(e=>e.dispose())}set_current_nj_data(e){this._current_xvm.val=void 0,this._current_nj_data.val=e}get_nj_object(e){return o(this,void 0,void 0,(function*(){let t=w.get(e.name);return t||(t=this.get_all_nj_objects(e),w.set(e.name,t),t)}))}get_all_nj_objects(e){return o(this,void 0,void 0,(function*(){const t=yield v.get_character_class_data(e.name,"Body"),i=a.parse_nj(new n.ArrayBufferCursor(t,s.Endianness.Little))[0];if(!i)throw new Error(`Couldn't parse body for player class ${e.name}.`);const o=yield v.get_character_class_data(e.name,"Head",0),r=a.parse_nj(new n.ArrayBufferCursor(o,s.Endianness.Little))[0];if(r&&this.add_to_bone(i,r,59),e.hair_styles_count>0){const t=yield v.get_character_class_data(e.name,"Hair",0),o=a.parse_nj(new n.ArrayBufferCursor(t,s.Endianness.Little))[0];if(o&&this.add_to_bone(i,o,59),e.hair_styles_with_accessory.has(0)){const t=yield v.get_character_class_data(e.name,"Accessory",0),o=a.parse_nj(new n.ArrayBufferCursor(t,s.Endianness.Little))[0];o&&this.add_to_bone(i,o,59)}}return i}))}add_to_bone(e,t,i){const o=e.get_bone(i);o&&(o.evaluation_flags.hidden=!1,o.evaluation_flags.break_child_trace=!1,o.children.push(t))}get_nj_motion(e,t){return o(this,void 0,void 0,(function*(){let i=f.get(e.id);return i||(i=v.get_character_class_animation_data(e.id).then(e=>r.parse_njm(new n.ArrayBufferCursor(e,s.Endianness.Little),t)),f.set(e.id,i),i)}))}}t.Model3DStore=E,t.model_store=new E},uaZj:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("kiqn");t.QuestObjectModel=class extends o.QuestEntityModel{constructor(e,t,i,o,n,s,r,a,d){super(e,o,n,s,r),this.id=t,this.group_id=i,this.properties=a,this.unknown=d}}},uiJh:function(e,t,i){"use strict";function o(e){const t=Object.values(e),i=t.filter(e=>"number"==typeof e);return i.length?i:t}Object.defineProperty(t,"__esModule",{value:!0}),t.enum_values=o;t.EnumMap=class{constructor(e,t){this.values=new Map,this.keys=o(e);for(const e of this.keys)this.values.set(e,t(e))}get(e){return this.values.get(e)}}},upFJ:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.SimpleQuestModel=class{constructor(e,t,i,o){if(this.id=e,this.name=t,this.episode=i,this.enemy_counts=o,!e)throw new Error("id is required.");if(!t)throw new Error("name is required.");if(!o)throw new Error("enemyCounts is required.")}}},v2aa:function(e,t,i){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=i("ouMO"),s=i("xs7i"),r=i("uaZj"),a=i("IjTL"),d=o(i("GGSb")),l=i("4Mnx"),_=i("yQqj"),u=d.default.get("quest_editor/model/QuestModel");t.QuestModel=class{constructor(e,t,i,o,r,a,d,_,c,p,v,h){if(this._id=n.property(0),this._language=n.property(0),this._name=n.property(""),this._short_description=n.property(""),this._long_description=n.property(""),this._area_variants=n.list_property(),this.update_area_variants=()=>{const e=new Map;for(const t of this.entities_per_area.val.keys())try{e.set(t,l.area_store.get_variant(this.episode,t,0))}catch(e){u.warn(e)}for(const[t,i]of this.map_designations.val)try{e.set(t,l.area_store.get_variant(this.episode,t,i))}catch(e){u.warn(e)}this._area_variants.val=[...e.values()]},s.check_episode(a),!d)throw new Error("map_designations is required.");if(!Array.isArray(_))throw new Error("objs is required.");if(!Array.isArray(c))throw new Error("npcs is required.");if(!Array.isArray(p))throw new Error("dat_unknowns is required.");if(!Array.isArray(v))throw new Error("object_code is required.");if(!Array.isArray(h))throw new Error("shop_items is required.");this.id=this._id,this.language=this._language,this.name=this._name,this.short_description=this._short_description,this.long_description=this._long_description,this.area_variants=this._area_variants,this.set_id(e),this.set_language(t),this.set_name(i),this.set_short_description(o),this.set_long_description(r),this.episode=a,this._map_designations=n.property(d),this.map_designations=this._map_designations,this._objects=n.list_property(void 0,..._),this.objects=this._objects,this._npcs=n.list_property(void 0,...c),this.npcs=this._npcs,this.dat_unknowns=p,this.object_code=v,this.shop_items=h,this.entities_per_area=n.map((e,t)=>{const i=new Map;for(const t of e)i.set(t.area_id,(i.get(t.area_id)||0)+1);for(const e of t)i.set(e.area_id,(i.get(e.area_id)||0)+1);return i},this.npcs,this.objects),this.entities_per_area.observe(this.update_area_variants),this.map_designations.observe(this.update_area_variants)}set_id(e){if(e<0)throw new Error(`id should be greater than or equal to 0, was ${e}.`);return this._id.val=e,this}set_language(e){if(e<0)throw new Error(`language should be greater than or equal to 0, was ${e}.`);return this._language.val=e,this}set_name(e){if(e.length>32)throw new Error(`name can't be longer than 32 characters, got "${e}".`);return this._name.val=e,this}set_short_description(e){if(e.length>128)throw new Error(`short_description can't be longer than 128 characters, got "${e}".`);return this._short_description.val=e,this}set_long_description(e){if(e.length>288)throw new Error(`long_description can't be longer than 288 characters, got "${e}".`);return this._long_description.val=e,this}set_map_designations(e){return this._map_designations.val=e,this}add_entity(e){if(e instanceof r.QuestObjectModel)this.add_object(e);else{if(!(e instanceof a.QuestNpcModel))throw new Error(`${_.entity_type_to_string(e.type)} not supported.`);this.add_npc(e)}}add_object(e){this._objects.push(e)}add_npc(e){this._npcs.push(e)}remove_entity(e){if(e instanceof r.QuestObjectModel)this._objects.remove(e);else{if(!(e instanceof a.QuestNpcModel))throw new Error(`${_.entity_type_to_string(e.type)} not supported.`);this._npcs.remove(e)}}}},vM2b:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("Womt");t.GeometryBuilder=class{constructor(){this.positions=[],this.normals=[],this.uvs=[],this.indices=[],this.bones=[],this.bone_indices=[],this.bone_weights=[],this.groups=[],this.material_indices=new Set([-1])}get vertex_count(){return this.positions.length/3}get index_count(){return this.indices.length}get_position(e){return new o.Vector3(this.positions[3*e],this.positions[3*e+1],this.positions[3*e+2])}get_normal(e){return new o.Vector3(this.normals[3*e],this.normals[3*e+1],this.normals[3*e+2])}add_vertex(e,t,i){this.positions.push(e.x,e.y,e.z),this.normals.push(t.x,t.y,t.z),this.uvs.push(i.x,i.y)}add_index(e){this.indices.push(e)}add_bone(e){this.bones.push(e)}add_bone_weight(e,t){this.bone_indices.push(e),this.bone_weights.push(t)}add_group(e,t,i){const o=this.groups[this.groups.length-1],n=null==i?-1:i;o&&o.material_index===n?o.size+=t:(this.groups.push({offset:e,size:t,material_index:n}),this.material_indices.add(n))}build(){const e=new o.BufferGeometry,t=e.userData;t.created_by_geometry_builder=!0,e.addAttribute("position",new o.Float32BufferAttribute(this.positions,3)),e.addAttribute("normal",new o.Float32BufferAttribute(this.normals,3)),e.addAttribute("uv",new o.Float32BufferAttribute(this.uvs,2)),e.setIndex(new o.Uint16BufferAttribute(this.indices,1)),this.bone_indices.length&&this.bones.length?(e.addAttribute("skinIndex",new o.Uint16BufferAttribute(this.bone_indices,4)),e.addAttribute("skinWeight",new o.Float32BufferAttribute(this.bone_weights,4)),t.bones=this.bones):t.bones=[];const i=new Map;let n=0;for(const e of[...this.material_indices].sort((e,t)=>e-t))i.set(e,n++);for(const t of this.groups)e.addGroup(t.offset,t.size,i.get(t.material_index));return t.normalized_material_indices=i,e.computeBoundingSphere(),e.computeBoundingBox(),e}}},vsj6:function(e,t,i){"use strict";var o=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))((function(n,s){function r(e){try{d(o.next(e))}catch(e){s(e)}}function a(e){try{d(o.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}d((o=o.apply(e,t||[])).next())}))},n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const s=i("HjM1");class r extends s.TabContainer{constructor(){super({class:"viewer_ViewerView",tabs:[{title:"Models",key:"model",create_view:function(){return o(this,void 0,void 0,(function*(){return new((yield Promise.resolve().then(()=>n(i("Hdaq")))).Model3DView)}))}},{title:"Textures",key:"texture",create_view:function(){return o(this,void 0,void 0,(function*(){return new((yield Promise.resolve().then(()=>n(i("Za3H")))).TextureView)}))}}]}),this.finalize_construction(r.prototype)}}t.ViewerView=r},"w+Lt":function(e,t,i){"use strict";var o=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))((function(n,s){function r(e){try{d(o.next(e))}catch(e){s(e)}}function a(e){try{d(o.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}d((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const n=i("G+UN"),s=i("yfUv"),r=i("nowp"),a="HuntOptimizerStore.wantedItems";t.hunt_optimizer_persister=new class extends s.Persister{persist_wanted_items(e,t){this.persist_for_server(e,a,t.map(({item_type:e,amount:t})=>({itemTypeId:e.id,amount:t.val})))}load_wanted_items(e){return o(this,void 0,void 0,(function*(){const t=yield n.item_type_stores.get(e),i=yield this.load_for_server(e,a),o=[];if(i)for(const{itemTypeId:e,itemKindId:n,amount:s}of i){const i=null!=e?t.get_by_id(e):t.get_by_id(n);i&&o.push(new r.WantedItemModel(i,s))}return o}))}}},w6HN:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("TRid"),n=i("FXpb");i("IQIM");const s=i("sDu+");class r extends o.Widget{constructor(e){if(super(e),this.element=n.create_element("div",{class:"core_ToolBar"}),this.height=33,this.element.style.height=`${this.height}px`,e&&e.children)for(const t of e.children)if(t instanceof s.LabelledControl&&t.label){const e=n.create_element("div",{class:"core_ToolBar_group"});"left"===t.preferred_label_position||"top"===t.preferred_label_position?e.append(t.label.element,t.element):e.append(t.element,t.label.element),this.element.append(e)}else this.element.append(t.element),this.disposable(t);this.finalize_construction(r.prototype)}}t.ToolBar=r},weRg:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("nN8q"),n=i("FXpb");i("ZZ0G");const s=i("yQqj"),r=i("3ONQ"),a=i("xcxG"),d=i("ouMO");t.EntityListView=class extends o.ResizableWidget{constructor(e){super(),this.entities=d.list_property(),this.create_entity_element=(e,t)=>{const i=n.el.div({class:"quest_editor_EntityListView_entity",data:{index:t.toString()}});i.draggable=!0;const o=n.el.img({width:100,height:100});o.style.visibility="hidden",o.style.pointerEvents="none",i.append(o),a.render_entity_to_image(e).then(e=>{o.src=e,o.style.visibility="visible"});const r=n.el.span({text:s.entity_data(e).name});return i.append(r),i};const t=n.el.div({class:"quest_editor_EntityListView_entity_list"});this.element=n.el.div({class:`${e} quest_editor_EntityListView`},t),this.disposables(n.bind_children_to(t,this.entities,this.create_entity_element),r.entity_dnd_source(t,e=>{let i=e;do{const t=e.dataset.index;if(null!=t)return[i.querySelector("img").cloneNode(!0),this.entities.get(parseInt(t,10))];i=i.parentElement}while(i&&i!==t)}))}}},x4IQ:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.QuestEditAction=class{constructor(e,t){this.quest=e,this.new=t.value,this.old=t.old_value}}},x4QM:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("ouMO");t.WeaponItemType=class{constructor(e,t,i,o,n,s,r){this.id=e,this.name=t,this.min_atp=i,this.max_atp=o,this.ata=n,this.max_grind=s,this.required_atp=r}};t.ArmorItemType=class{constructor(e,t,i,o,n,s,r,a,d,l,_){this.id=e,this.name=t,this.atp=i,this.ata=o,this.min_evp=n,this.max_evp=s,this.min_dfp=r,this.max_dfp=a,this.mst=d,this.hp=l,this.lck=_}};t.ShieldItemType=class{constructor(e,t,i,o,n,s,r,a,d,l,_){this.id=e,this.name=t,this.atp=i,this.ata=o,this.min_evp=n,this.max_evp=s,this.min_dfp=r,this.max_dfp=a,this.mst=d,this.hp=l,this.lck=_}};t.UnitItemType=class{constructor(e,t){this.id=e,this.name=t}};t.ToolItemType=class{constructor(e,t){this.id=e,this.name=t}};t.WeaponItem=class{constructor(e){this.type=e,this._attribute=o.property(0),this.attribute=this._attribute,this._hit=o.property(0),this.hit=this._hit,this._grind=o.property(0),this.grind=this._grind,this.grind_atp=this.grind.map(e=>2*e)}};t.ArmorItem=class{constructor(e){this.type=e}};t.ShieldItem=class{constructor(e){this.type=e}};t.UnitItem=class{constructor(e){this.type=e}};t.ToolItem=class{constructor(e){this.type=e}}},xcxG:function(e,t,i){"use strict";var o=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))((function(n,s){function r(e){try{d(o.next(e))}catch(e){s(e)}}function a(e){try{d(o.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}d((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const n=i("Womt"),s=i("4vnR"),r=i("xpi7"),a=i("M/y3"),d=new n.WebGLRenderer({alpha:!0,antialias:!0});d.setSize(100,100);const l=new n.HemisphereLight(16777215,5263440,1.2),_=new n.Scene,u=new n.PerspectiveCamera(30,1,10,1e3),c=new n.Vector3(1,1,2).normalize(),p=1.3/Math.tan(u.fov/180*Math.PI/2),v=new Map;t.render_entity_to_image=function(e){return o(this,void 0,void 0,(function*(){let t=v.get(e);return t||(t=h(e),v.set(e,t)),t}))};const h=a.sequential(e=>o(void 0,void 0,void 0,(function*(){const t=yield s.load_entity_geometry(e),i=yield s.load_entity_textures(e);_.remove(..._.children),_.add(l);const o=r.create_entity_type_mesh(e,t,i);_.add(o);const n=o.geometry.boundingSphere;return u.position.copy(c),u.position.multiplyScalar(n.radius*p),u.lookAt(n.center),d.render(_,u),d.domElement.toDataURL()})))},xpi7:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("Womt"),n=i("Eqai"),s=i("yQqj");var r;function a(e,i,a){const d=new o.MeshLambertMaterial({color:s.is_npc_type(e)?t.NPC_COLORS[r.Normal]:t.OBJECT_COLORS[r.Normal],side:o.DoubleSide}),l=n.create_mesh(i,a.length?a.map(e=>new o.MeshLambertMaterial({map:e,side:o.DoubleSide,alphaTest:.5})):d,d);return l.name=s.entity_type_to_string(e),l}!function(e){e[e.Normal=0]="Normal",e[e.Hovered=1]="Hovered",e[e.Selected=2]="Selected"}(r=t.ColorType||(t.ColorType={})),t.OBJECT_COLORS=[],t.OBJECT_COLORS[r.Normal]=16776960,t.OBJECT_COLORS[r.Hovered]=16768831,t.OBJECT_COLORS[r.Selected]=16755200,t.NPC_COLORS=[],t.NPC_COLORS[r.Normal]=16711680,t.NPC_COLORS[r.Hovered]=16727903,t.NPC_COLORS[r.Selected]=16711764,t.create_entity_type_mesh=a,t.create_entity_mesh=function(e,t,i){const o=a(e.type,t,i);return o.userData.entity=e,o.position.copy(e.world_position.val),o.rotation.copy(e.world_rotation.val),o}},xs7i:function(e,t,i){"use strict";var o;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.I=1]="I",e[e.II=2]="II",e[e.IV=4]="IV"}(o=t.Episode||(t.Episode={})),t.EPISODES=[o.I,o.II,o.IV],t.check_episode=function(e){if(null==o[e])throw new Error(`Invalid episode ${e}.`)}},xyE7:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("nN8q"),n=i("FXpb"),s=i("c5EP"),r=i("sZ1+");i("5sDa");const a=i("5aKR"),d=i("ouMO");class l extends o.ResizableWidget{constructor(){super(),this.element=n.el.div({class:"quest_editor_NpcCountsView"}),this.table_element=n.el.table(),this.no_quest_view=new a.DisabledView("No quest loaded."),this.element.append(this.table_element,this.no_quest_view.element);const e=s.quest_editor_store.current_quest,t=e.map(e=>null==e);this.bind_hidden(this.table_element,t),this.disposables(this.no_quest_view.visible.bind_to(t),e.flat_map(e=>e?e.npcs:d.property([])).observe(({value:e})=>this.update_view(e),{call_now:!0})),this.finalize_construction(l.prototype)}update_view(e){const t=document.createDocumentFragment(),i=new Map;for(const t of e){const e=i.get(t.type)||0;i.set(t.type,e+1)}const o=8*(i.get(r.NpcType.Canane)||0),s=[...i].sort((e,t)=>e[0]-t[0]);for(const[e,i]of s){const s=e===r.NpcType.Canadine?o:0;t.append(n.el.tr({},n.el.th({text:r.npc_data(e).name+":"}),n.el.td({text:String(i+s)})))}this.table_element.innerHTML="",this.table_element.append(t)}}t.NpcCountsView=l},y42t:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("kwt4"),n=i("4mUz");function s(e,t,i){const n=[];for(let s=0;s{const i=new s.Disposer;let o=0;return[n.el.tr({},...this.columns.map((s,a)=>{const d=s.fixed?n.el.th():n.el.td();try{const t=s.render_cell(e,i);d.append(t),s.input&&d.classList.add("input"),s.fixed&&(d.classList.add("fixed"),d.style.left=`${o}px`,o+=s.width||0),d.style.width=`${s.width}px`,s.text_align&&(d.style.textAlign=s.text_align),s.tooltip&&(d.title=s.tooltip(e))}catch(e){r.warn(`Error while rendering cell for index ${t}, column ${a}.`,e)}return d})),i]},this.update_footer=()=>{if(!this.footer_row_element)return;const e=this.columns.length;for(let t=0;t{const i=n.el.th({data:{index:t.toString()}},n.el.span({text:e.title}));return e.fixed&&(i.style.position="sticky",i.style.left=`${l}px`,l+=e.width),i.style.width=`${e.width}px`,e.footer&&(_=!0),i}));const u=e.sort;u&&(o.onmousedown=e=>{if(e.target instanceof HTMLElement){let i=e.target;for(let e=0;e<5&&!i.dataset.index;e++){if(!i.parentElement)return;i=i.parentElement}if(!i.dataset.index)return;const o=parseInt(i.dataset.index,10),n=this.columns[o];if(!n.sortable)return;const s=t.findIndex(e=>e.column===n);if(0===s){const e=t[0];e.direction=e.direction===a.Asc?a.Desc:a.Asc}else-1!==s&&t.splice(s,1),t.unshift({column:n,direction:a.Asc});u(t)}}),i.append(o),this.tbody_element=n.el.tbody(),this.element.append(i,this.tbody_element),_&&(this.footer_row_element=n.el.tr(),this.element.append(n.el.tfoot({},this.footer_row_element)),this.create_footer()),this.disposables(n.bind_children_to(this.tbody_element,this.values,this.create_row),this.values.observe(this.update_footer)),this.finalize_construction(d.prototype)}create_footer(){const e=[];let t=0;for(let i=0;ie.type===a),o=i&&function(e){return{texture_count:e.u16()}}(i.data),n=t.filter(e=>e.type===d).map(e=>(function(e){const t=e.u32(),i=e.u32(),o=e.u32(),n=e.u16(),s=e.u16(),r=e.u32();e.seek(36);const a=e.array_buffer(r);return{id:o,format:[t,i],width:n,height:s,size:r,data:a}})(e.data));return o?o.texture_count!==n.length&&r.warn(`Found ${n.length} textures instead of ${o.texture_count} as defined in the header.`):r.warn("No header found."),{textures:n}}},yxQK:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=i("FXpb");i("pNch");const n=i("4SjJ"),s=i("TRid"),r=i("1z6m"),a=i("sv1z"),d=i("ouMO"),l=[[n.GuiTool.Viewer,"Viewer"],[n.GuiTool.QuestEditor,"Quest Editor"],[n.GuiTool.HuntOptimizer,"Hunt Optimizer"]];class _ extends s.Widget{constructor(){super(),this.buttons=new Map(l.map(([e,t])=>[e,this.disposable(new r.NavigationButton(e,t))])),this.server_select=this.disposable(new a.Select(d.property(["Ephinea"]),e=>e,{label:"Server:",enabled:!1,selected:"Ephinea",tooltip:"Only Ephinea is supported at the moment"})),this.element=o.el.div({class:"application_NavigationView"},...[...this.buttons.values()].map(e=>e.element),o.el.div({class:"application_NavigationView_spacer"}),o.el.span({class:"application_NavigationView_server"},this.server_select.label.element,this.server_select.element),o.el.a({class:"application_NavigationView_github",href:"https://github.com/DaanVandenBosch/phantasmal-world",title:"GitHub"},o.icon(o.Icon.GitHub))),this.height=30,this.mark_tool_button=e=>{const t=this.buttons.get(e);t&&(t.checked=!0)},this.element.style.height=`${this.height}px`,this.element.onmousedown=this.mousedown,this.mark_tool_button(n.gui_store.tool.val),this.disposable(n.gui_store.tool.observe(({value:e})=>this.mark_tool_button(e))),this.finalize_construction(_.prototype)}mousedown(e){e.target instanceof HTMLLabelElement&&e.target.control instanceof HTMLInputElement&&(n.gui_store.tool.val=n.GuiTool[e.target.control.value])}}t.NavigationView=_},zBQr:function(e,t,i){"use strict";var o=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))((function(n,s){function r(e){try{d(o.next(e))}catch(e){s(e)}}function a(e){try{d(o.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}d((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const n=i("yfUv"),s=i("LvDl"),r="QuestEditorUiPersister.layout_config";class a extends n.Persister{constructor(){super(...arguments),this.persist_layout_config=s.throttle(e=>{this.persist(r,e)},500,{leading:!1,trailing:!0})}load_layout_config(e,t){return o(this,void 0,void 0,(function*(){const i=yield this.load(r);return i&&this.verify_layout_config(i,e)?i:t}))}verify_layout_config(e,t){const i=new Set(t);for(const t of e)if(!this.verify_layout_child(t,i,new Set,!0))return!1;return!0}verify_layout_child(e,t,i,o){if(!e)return!1;if("componentName"in e){if(!t.has(e.componentName))return!1;i.add(e.componentName)}if(e.content)for(const o of e.content)if(!this.verify_layout_child(o,t,i,!1))return!1;return!o||t.size===i.size}}t.QuestEditorUiPersister=a,t.quest_editor_ui_persister=new a}},[["/7QA",2,0,3]]]); \ No newline at end of file diff --git a/style.86ea69acfb14eb542b77.css b/style.e1a2e61560ed4530bf11.css similarity index 99% rename from style.86ea69acfb14eb542b77.css rename to style.e1a2e61560ed4530bf11.css index 09398dea..6f836a76 100644 --- a/style.86ea69acfb14eb542b77.css +++ b/style.e1a2e61560ed4530bf11.css @@ -327,6 +327,7 @@ vertical-align: top; padding: 3px; border: var(--input-inner-border); + margin: 0; background-color: var(--input-bg-color); color: var(--input-text-color); outline: none;