mirror of
https://github.com/DaanVandenBosch/phantasmal-world.git
synced 2025-04-07 08:48:28 +08:00
1 line
318 KiB
JavaScript
1 line
318 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{"08Mt":function(e,t,n){e.exports=function(){return new Worker(n.p+"788c69b2fb90cbbb55e9.worker.js")}},"2YZa":function(e,t,n){"use strict";n.r(t);var i=n("q1tI"),o=n.n(i),r=n("i8i4"),s=n.n(r),a=n("GGSb"),d=n.n(a),l=n("E6Qj"),u=n.n(l),c=n("BvKs"),_=n("2fM7"),w=n("kMSe"),v=n("2vnA");class p{constructor(e,t){this.x=e,this.y=t}set(e,t){return this.x=e,this.y=t,this}add(e){return this.x+=e.x,this.y+=e.y,this}clone(){return new p(this.x,this.y)}equals(e){return this.x===e.x&&this.y===e.y}}class h{constructor(e,t,n){this.x=e,this.y=t,this.z=n}set(e,t,n){return this.x=e,this.y=t,this.z=n,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}clone(){return new h(this.x,this.y,this.z)}equals(e){return this.x===e.x&&this.y===e.y&&this.z===e.z}}function f(e){const t=Object.values(e),n=t.filter(e=>"number"==typeof e);return n.length?n:t}class m{constructor(e,t){this.values=new Map,this.keys=f(e);for(const e of this.keys)this.values.set(e,t(e))}get(e){return this.values.get(e)}}var g=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};class k{constructor(e,t,n,i,o,r,s){this.id=e,this.name=t,this.min_atp=n,this.max_atp=i,this.ata=o,this.max_grind=r,this.required_atp=s}}class y{constructor(e,t,n,i,o,r,s,a,d,l,u){this.id=e,this.name=t,this.atp=n,this.ata=i,this.min_evp=o,this.max_evp=r,this.min_dfp=s,this.max_dfp=a,this.mst=d,this.hp=l,this.lck=u}}class R{constructor(e,t,n,i,o,r,s,a,d,l,u){this.id=e,this.name=t,this.atp=n,this.ata=i,this.min_evp=o,this.max_evp=r,this.min_dfp=s,this.max_dfp=a,this.mst=d,this.hp=l,this.lck=u}}class b{constructor(e,t){this.id=e,this.name=t}}class N{constructor(e,t){this.id=e,this.name=t}}class E{constructor(e){this.type=e,this.attribute=0,this.hit=0,this.grind=0}get grind_atp(){return 2*this.grind}}g([v.n],E.prototype,"attribute",void 0),g([v.n],E.prototype,"hit",void 0),g([v.n],E.prototype,"grind",void 0),g([v.f],E.prototype,"grind_atp",null);class T{constructor(e,t,n,i,o,r,s){if(!Number.isInteger(e)||e<0)throw new Error(`Expected id to be an integer greater than or equal to 0, got ${e}.`);if(!t)throw new Error("code is required.");if(!n)throw new Error("name is required.");if(!i)throw new Error("simple_name is required.");if(!o)throw new Error("ultimate_name is required.");if(null!=r&&1!==r&&2!==r&&4!==r)throw new Error(`episode should be undefined, 1, 2 or 4, got ${r}.`);if("boolean"!=typeof s)throw new Error("enemy is required.");if(this.id=e,this.code=t,this.simple_name=i,this.ultimate_name=o,this.name=n,this.episode=r,this.enemy=s,T.by_code_map.set(t,this),r){const e=T.by_ep_and_name[r];e&&(e.set(i,this),e.set(o,this))}}static by_code(e){return this.by_code_map.get(e)}static by_name_and_episode(e,t){return U(t),this.by_ep_and_name[t].get(e)}}T.by_code_map=new Map,T.by_ep_and_name=[void 0,new Map,new Map,void 0,new Map],function(){let e=0;T.Unknown=new T(e++,"Unknown","Unknown","Unknown","Unknown",void 0,!1),T.FemaleFat=new T(e++,"FemaleFat","Female Fat","Female Fat","Female Fat",void 0,!1),T.FemaleMacho=new T(e++,"FemaleMacho","Female Macho","Female Macho","Female Macho",void 0,!1),T.FemaleTall=new T(e++,"FemaleTall","Female Tall","Female Tall","Female Tall",void 0,!1),T.MaleDwarf=new T(e++,"MaleDwarf","Male Dwarf","Male Dwarf","Male Dwarf",void 0,!1),T.MaleFat=new T(e++,"MaleFat","Male Fat","Male Fat","Male Fat",void 0,!1),T.MaleMacho=new T(e++,"MaleMacho","Male Macho","Male Macho","Male Macho",void 0,!1),T.MaleOld=new T(e++,"MaleOld","Male Old","Male Old","Male Old",void 0,!1),T.BlueSoldier=new T(e++,"BlueSoldier","Blue Soldier","Blue Soldier","Blue Soldier",void 0,!1),T.RedSoldier=new T(e++,"RedSoldier","Red Soldier","Red Soldier","Red Soldier",void 0,!1),T.Principal=new T(e++,"Principal","Principal","Principal","Principal",void 0,!1),T.Tekker=new T(e++,"Tekker","Tekker","Tekker","Tekker",void 0,!1),T.GuildLady=new T(e++,"GuildLady","Guild Lady","Guild Lady","Guild Lady",void 0,!1),T.Scientist=new T(e++,"Scientist","Scientist","Scientist","Scientist",void 0,!1),T.Nurse=new T(e++,"Nurse","Nurse","Nurse","Nurse",void 0,!1),T.Irene=new T(e++,"Irene","Irene","Irene","Irene",void 0,!1),T.ItemShop=new T(e++,"ItemShop","Item Shop","Item Shop","Item Shop",void 0,!1),T.Nurse2=new T(e++,"Nurse2","Nurse (Ep. II)","Nurse","Nurse",2,!1),T.Hildebear=new T(e++,"Hildebear","Hildebear","Hildebear","Hildelt",1,!0),T.Hildeblue=new T(e++,"Hildeblue","Hildeblue","Hildeblue","Hildetorr",1,!0),T.Hildebear.rare_type=T.Hildeblue,T.RagRappy=new T(e++,"RagRappy","Rag Rappy","Rag Rappy","El Rappy",1,!0),T.AlRappy=new T(e++,"AlRappy","Al Rappy","Al Rappy","Pal Rappy",1,!0),T.RagRappy.rare_type=T.AlRappy,T.Monest=new T(e++,"Monest","Monest","Monest","Mothvist",1,!0),T.Mothmant=new T(e++,"Mothmant","Mothmant","Mothmant","Mothvert",1,!0),T.SavageWolf=new T(e++,"SavageWolf","Savage Wolf","Savage Wolf","Gulgus",1,!0),T.BarbarousWolf=new T(e++,"BarbarousWolf","Barbarous Wolf","Barbarous Wolf","Gulgus-Gue",1,!0),T.Booma=new T(e++,"Booma","Booma","Booma","Bartle",1,!0),T.Gobooma=new T(e++,"Gobooma","Gobooma","Gobooma","Barble",1,!0),T.Gigobooma=new T(e++,"Gigobooma","Gigobooma","Gigobooma","Tollaw",1,!0),T.Dragon=new T(e++,"Dragon","Dragon","Dragon","Sil Dragon",1,!0),T.GrassAssassin=new T(e++,"GrassAssassin","Grass Assassin","Grass Assassin","Crimson Assassin",1,!0),T.PoisonLily=new T(e++,"PoisonLily","Poison Lily","Poison Lily","Ob Lily",1,!0),T.NarLily=new T(e++,"NarLily","Nar Lily","Nar Lily","Mil Lily",1,!0),T.PoisonLily.rare_type=T.NarLily,T.NanoDragon=new T(e++,"NanoDragon","Nano Dragon","Nano Dragon","Nano Dragon",1,!0),T.EvilShark=new T(e++,"EvilShark","Evil Shark","Evil Shark","Vulmer",1,!0),T.PalShark=new T(e++,"PalShark","Pal Shark","Pal Shark","Govulmer",1,!0),T.GuilShark=new T(e++,"GuilShark","Guil Shark","Guil Shark","Melqueek",1,!0),T.PofuillySlime=new T(e++,"PofuillySlime","Pofuilly Slime","Pofuilly Slime","Pofuilly Slime",1,!0),T.PouillySlime=new T(e++,"PouillySlime","Pouilly Slime","Pouilly Slime","Pouilly Slime",1,!0),T.PofuillySlime.rare_type=T.PouillySlime,T.PanArms=new T(e++,"PanArms","Pan Arms","Pan Arms","Pan Arms",1,!0),T.Migium=new T(e++,"Migium","Migium","Migium","Migium",1,!0),T.Hidoom=new T(e++,"Hidoom","Hidoom","Hidoom","Hidoom",1,!0),T.DeRolLe=new T(e++,"DeRolLe","De Rol Le","De Rol Le","Dal Ra Lie",1,!0),T.Dubchic=new T(e++,"Dubchic","Dubchic","Dubchic","Dubchich",1,!0),T.Gilchic=new T(e++,"Gilchic","Gilchic","Gilchic","Gilchich",1,!0),T.Garanz=new T(e++,"Garanz","Garanz","Garanz","Baranz",1,!0),T.SinowBeat=new T(e++,"SinowBeat","Sinow Beat","Sinow Beat","Sinow Blue",1,!0),T.SinowGold=new T(e++,"SinowGold","Sinow Gold","Sinow Gold","Sinow Red",1,!0),T.Canadine=new T(e++,"Canadine","Canadine","Canadine","Canabin",1,!0),T.Canane=new T(e++,"Canane","Canane","Canane","Canune",1,!0),T.Dubswitch=new T(e++,"Dubswitch","Dubswitch","Dubswitch","Dubswitch",1,!0),T.VolOpt=new T(e++,"VolOpt","Vol Opt","Vol Opt","Vol Opt ver.2",1,!0),T.Delsaber=new T(e++,"Delsaber","Delsaber","Delsaber","Delsaber",1,!0),T.ChaosSorcerer=new T(e++,"ChaosSorcerer","Chaos Sorcerer","Chaos Sorcerer","Gran Sorcerer",1,!0),T.DarkGunner=new T(e++,"DarkGunner","Dark Gunner","Dark Gunner","Dark Gunner",1,!0),T.DeathGunner=new T(e++,"DeathGunner","Death Gunner","Death Gunner","Death Gunner",1,!0),T.ChaosBringer=new T(e++,"ChaosBringer","Chaos Bringer","Chaos Bringer","Dark Bringer",1,!0),T.DarkBelra=new T(e++,"DarkBelra","Dark Belra","Dark Belra","Indi Belra",1,!0),T.Dimenian=new T(e++,"Dimenian","Dimenian","Dimenian","Arlan",1,!0),T.LaDimenian=new T(e++,"LaDimenian","La Dimenian","La Dimenian","Merlan",1,!0),T.SoDimenian=new T(e++,"SoDimenian","So Dimenian","So Dimenian","Del-D",1,!0),T.Bulclaw=new T(e++,"Bulclaw","Bulclaw","Bulclaw","Bulclaw",1,!0),T.Bulk=new T(e++,"Bulk","Bulk","Bulk","Bulk",1,!0),T.Claw=new T(e++,"Claw","Claw","Claw","Claw",1,!0),T.DarkFalz=new T(e++,"DarkFalz","Dark Falz","Dark Falz","Dark Falz",1,!0),T.Hildebear2=new T(e++,"Hildebear2","Hildebear (Ep. II)","Hildebear","Hildelt",2,!0),T.Hildeblue2=new T(e++,"Hildeblue2","Hildeblue (Ep. II)","Hildeblue","Hildetorr",2,!0),T.Hildebear2.rare_type=T.Hildeblue2,T.RagRappy2=new T(e++,"RagRappy2","Rag Rappy (Ep. II)","Rag Rappy","El Rappy",2,!0),T.LoveRappy=new T(e++,"LoveRappy","Love Rappy","Love Rappy","Love Rappy",2,!0),T.RagRappy2.rare_type=T.LoveRappy,T.StRappy=new T(e++,"StRappy","St. Rappy","St. Rappy","St. Rappy",2,!0),T.HalloRappy=new T(e++,"HalloRappy","Hallo Rappy","Hallo Rappy","Hallo Rappy",2,!0),T.EggRappy=new T(e++,"EggRappy","Egg Rappy","Egg Rappy","Egg Rappy",2,!0),T.Monest2=new T(e++,"Monest2","Monest (Ep. II)","Monest","Mothvist",2,!0),T.Mothmant2=new T(e++,"Mothmant2","Mothmant","Mothmant","Mothvert",2,!0),T.PoisonLily2=new T(e++,"PoisonLily2","Poison Lily (Ep. II)","Poison Lily","Ob Lily",2,!0),T.NarLily2=new T(e++,"NarLily2","Nar Lily (Ep. II)","Nar Lily","Mil Lily",2,!0),T.PoisonLily2.rare_type=T.NarLily2,T.GrassAssassin2=new T(e++,"GrassAssassin2","Grass Assassin (Ep. II)","Grass Assassin","Crimson Assassin",2,!0),T.Dimenian2=new T(e++,"Dimenian2","Dimenian (Ep. II)","Dimenian","Arlan",2,!0),T.LaDimenian2=new T(e++,"LaDimenian2","La Dimenian (Ep. II)","La Dimenian","Merlan",2,!0),T.SoDimenian2=new T(e++,"SoDimenian2","So Dimenian (Ep. II)","So Dimenian","Del-D",2,!0),T.DarkBelra2=new T(e++,"DarkBelra2","Dark Belra (Ep. II)","Dark Belra","Indi Belra",2,!0),T.BarbaRay=new T(e++,"BarbaRay","Barba Ray","Barba Ray","Barba Ray",2,!0),T.SavageWolf2=new T(e++,"SavageWolf2","Savage Wolf (Ep. II)","Savage Wolf","Gulgus",2,!0),T.BarbarousWolf2=new T(e++,"BarbarousWolf2","Barbarous Wolf (Ep. II)","Barbarous Wolf","Gulgus-Gue",2,!0),T.PanArms2=new T(e++,"PanArms2","Pan Arms (Ep. II)","Pan Arms","Pan Arms",2,!0),T.Migium2=new T(e++,"Migium2","Migium (Ep. II)","Migium","Migium",2,!0),T.Hidoom2=new T(e++,"Hidoom2","Hidoom (Ep. II)","Hidoom","Hidoom",2,!0),T.Dubchic2=new T(e++,"Dubchic2","Dubchic (Ep. II)","Dubchic","Dubchich",2,!0),T.Gilchic2=new T(e++,"Gilchic2","Gilchic (Ep. II)","Gilchic","Gilchich",2,!0),T.Garanz2=new T(e++,"Garanz2","Garanz (Ep. II)","Garanz","Baranz",2,!0),T.Dubswitch2=new T(e++,"Dubswitch2","Dubswitch (Ep. II)","Dubswitch","Dubswitch",2,!0),T.Delsaber2=new T(e++,"Delsaber2","Delsaber (Ep. II)","Delsaber","Delsaber",2,!0),T.ChaosSorcerer2=new T(e++,"ChaosSorcerer2","Chaos Sorcerer (Ep. II)","Chaos Sorcerer","Gran Sorcerer",2,!0),T.GolDragon=new T(e++,"GolDragon","Gol Dragon","Gol Dragon","Gol Dragon",2,!0),T.SinowBerill=new T(e++,"SinowBerill","Sinow Berill","Sinow Berill","Sinow Berill",2,!0),T.SinowSpigell=new T(e++,"SinowSpigell","Sinow Spigell","Sinow Spigell","Sinow Spigell",2,!0),T.Merillia=new T(e++,"Merillia","Merillia","Merillia","Merillia",2,!0),T.Meriltas=new T(e++,"Meriltas","Meriltas","Meriltas","Meriltas",2,!0),T.Mericarol=new T(e++,"Mericarol","Mericarol","Mericarol","Mericarol",2,!0),T.Mericus=new T(e++,"Mericus","Mericus","Mericus","Mericus",2,!0),T.Merikle=new T(e++,"Merikle","Merikle","Merikle","Merikle",2,!0),T.UlGibbon=new T(e++,"UlGibbon","Ul Gibbon","Ul Gibbon","Ul Gibbon",2,!0),T.ZolGibbon=new T(e++,"ZolGibbon","Zol Gibbon","Zol Gibbon","Zol Gibbon",2,!0),T.Gibbles=new T(e++,"Gibbles","Gibbles","Gibbles","Gibbles",2,!0),T.Gee=new T(e++,"Gee","Gee","Gee","Gee",2,!0),T.GiGue=new T(e++,"GiGue","Gi Gue","Gi Gue","Gi Gue",2,!0),T.IllGill=new T(e++,"IllGill","Ill Gill","Ill Gill","Ill Gill",2,!0),T.DelLily=new T(e++,"DelLily","Del Lily","Del Lily","Del Lily",2,!0),T.Epsilon=new T(e++,"Epsilon","Epsilon","Epsilon","Epsilon",2,!0),T.GalGryphon=new T(e++,"GalGryphon","Gal Gryphon","Gal Gryphon","Gal Gryphon",2,!0),T.Deldepth=new T(e++,"Deldepth","Deldepth","Deldepth","Deldepth",2,!0),T.Delbiter=new T(e++,"Delbiter","Delbiter","Delbiter","Delbiter",2,!0),T.Dolmolm=new T(e++,"Dolmolm","Dolmolm","Dolmolm","Dolmolm",2,!0),T.Dolmdarl=new T(e++,"Dolmdarl","Dolmdarl","Dolmdarl","Dolmdarl",2,!0),T.Morfos=new T(e++,"Morfos","Morfos","Morfos","Morfos",2,!0),T.Recobox=new T(e++,"Recobox","Recobox","Recobox","Recobox",2,!0),T.Recon=new T(e++,"Recon","Recon","Recon","Recon",2,!0),T.SinowZoa=new T(e++,"SinowZoa","Sinow Zoa","Sinow Zoa","Sinow Zoa",2,!0),T.SinowZele=new T(e++,"SinowZele","Sinow Zele","Sinow Zele","Sinow Zele",2,!0),T.OlgaFlow=new T(e++,"OlgaFlow","Olga Flow","Olga Flow","Olga Flow",2,!0),T.SandRappy=new T(e++,"SandRappy","Sand Rappy","Sand Rappy","Sand Rappy",4,!0),T.DelRappy=new T(e++,"DelRappy","Del Rappy","Del Rappy","Del Rappy",4,!0),T.SandRappy.rare_type=T.DelRappy,T.Astark=new T(e++,"Astark","Astark","Astark","Astark",4,!0),T.SatelliteLizard=new T(e++,"SatelliteLizard","Satellite Lizard","Satellite Lizard","Satellite Lizard",4,!0),T.Yowie=new T(e++,"Yowie","Yowie","Yowie","Yowie",4,!0),T.MerissaA=new T(e++,"MerissaA","Merissa A","Merissa A","Merissa A",4,!0),T.MerissaAA=new T(e++,"MerissaAA","Merissa AA","Merissa AA","Merissa AA",4,!0),T.MerissaA.rare_type=T.MerissaAA,T.Girtablulu=new T(e++,"Girtablulu","Girtablulu","Girtablulu","Girtablulu",4,!0),T.Zu=new T(e++,"Zu","Zu","Zu","Zu",4,!0),T.Pazuzu=new T(e++,"Pazuzu","Pazuzu","Pazuzu","Pazuzu",4,!0),T.Zu.rare_type=T.Pazuzu,T.Boota=new T(e++,"Boota","Boota","Boota","Boota",4,!0),T.ZeBoota=new T(e++,"ZeBoota","Ze Boota","Ze Boota","Ze Boota",4,!0),T.BaBoota=new T(e++,"BaBoota","Ba Boota","Ba Boota","Ba Boota",4,!0),T.Dorphon=new T(e++,"Dorphon","Dorphon","Dorphon","Dorphon",4,!0),T.DorphonEclair=new T(e++,"DorphonEclair","Dorphon Eclair","Dorphon Eclair","Dorphon Eclair",4,!0),T.Dorphon.rare_type=T.DorphonEclair,T.Goran=new T(e++,"Goran","Goran","Goran","Goran",4,!0),T.PyroGoran=new T(e++,"PyroGoran","Pyro Goran","Pyro Goran","Pyro Goran",4,!0),T.GoranDetonator=new T(e++,"GoranDetonator","Goran Detonator","Goran Detonator","Goran Detonator",4,!0),T.SaintMilion=new T(e++,"SaintMilion","Saint-Milion","Saint-Milion","Saint-Milion",4,!0),T.Shambertin=new T(e++,"Shambertin","Shambertin","Shambertin","Shambertin",4,!0),T.Kondrieu=new T(e++,"Kondrieu","Kondrieu","Kondrieu","Kondrieu",4,!0),T.SaintMilion.rare_type=T.Kondrieu,T.Shambertin.rare_type=T.Kondrieu}();const S=[T.Unknown,T.FemaleFat,T.FemaleMacho,T.FemaleTall,T.MaleDwarf,T.MaleFat,T.MaleMacho,T.MaleOld,T.BlueSoldier,T.RedSoldier,T.Principal,T.Tekker,T.GuildLady,T.Scientist,T.Nurse,T.Irene,T.ItemShop,T.Nurse2,T.Hildebear,T.Hildeblue,T.RagRappy,T.AlRappy,T.Monest,T.Mothmant,T.SavageWolf,T.BarbarousWolf,T.Booma,T.Gobooma,T.Gigobooma,T.Dragon,T.GrassAssassin,T.PoisonLily,T.NarLily,T.NanoDragon,T.EvilShark,T.PalShark,T.GuilShark,T.PofuillySlime,T.PouillySlime,T.PanArms,T.Migium,T.Hidoom,T.DeRolLe,T.Dubchic,T.Gilchic,T.Garanz,T.SinowBeat,T.SinowGold,T.Canadine,T.Canane,T.Dubswitch,T.VolOpt,T.Delsaber,T.ChaosSorcerer,T.DarkGunner,T.DeathGunner,T.ChaosBringer,T.DarkBelra,T.Dimenian,T.LaDimenian,T.SoDimenian,T.Bulclaw,T.Bulk,T.Claw,T.DarkFalz,T.Hildebear2,T.Hildeblue2,T.RagRappy2,T.LoveRappy,T.StRappy,T.HalloRappy,T.EggRappy,T.Monest2,T.Mothmant2,T.PoisonLily2,T.NarLily2,T.GrassAssassin2,T.Dimenian2,T.LaDimenian2,T.SoDimenian2,T.DarkBelra2,T.BarbaRay,T.SavageWolf2,T.BarbarousWolf2,T.PanArms2,T.Migium2,T.Hidoom2,T.Dubchic2,T.Gilchic2,T.Garanz2,T.Dubswitch2,T.Delsaber2,T.ChaosSorcerer2,T.GolDragon,T.SinowBerill,T.SinowSpigell,T.Merillia,T.Meriltas,T.Mericarol,T.Mericus,T.Merikle,T.UlGibbon,T.ZolGibbon,T.Gibbles,T.Gee,T.GiGue,T.IllGill,T.DelLily,T.Epsilon,T.GalGryphon,T.Deldepth,T.Delbiter,T.Dolmolm,T.Dolmdarl,T.Morfos,T.Recobox,T.Recon,T.SinowZoa,T.SinowZele,T.OlgaFlow,T.SandRappy,T.DelRappy,T.Astark,T.SatelliteLizard,T.Yowie,T.MerissaA,T.MerissaAA,T.Girtablulu,T.Zu,T.Pazuzu,T.Boota,T.ZeBoota,T.BaBoota,T.Dorphon,T.DorphonEclair,T.Goran,T.PyroGoran,T.GoranDetonator,T.SaintMilion,T.Shambertin,T.Kondrieu],O=S.filter(e=>e.enemy);class D{constructor(e,t,n,i){if(!Number.isInteger(e)||e<1)throw new Error(`Expected id to be an integer greater than or equal to 1, got ${e}.`);if(!t)throw new Error("code is required.");if(null!=n&&(!Number.isInteger(n)||n<0))throw new Error(`Expected pso_id to be null or an integer greater than or equal to 0, got ${n}.`);if(!i)throw new Error("name is required.");this.id=e,this.code=t,this.pso_id=n,this.name=i}static from_pso_id(e){switch(e){default:return D.Unknown;case 0:return D.PlayerSet;case 1:return D.Particle;case 2:return D.Teleporter;case 3:return D.Warp;case 4:return D.LightCollision;case 5:return D.Item;case 6:return D.EnvSound;case 7:return D.FogCollision;case 8:return D.EventCollision;case 9:return D.CharaCollision;case 10:return D.ElementalTrap;case 11:return D.StatusTrap;case 12:return D.HealTrap;case 13:return D.LargeElementalTrap;case 14:return D.ObjRoomID;case 15:return D.Sensor;case 16:return D.UnknownItem16;case 17:return D.Lensflare;case 18:return D.ScriptCollision;case 19:return D.HealRing;case 20:return D.MapCollision;case 21:return D.ScriptCollisionA;case 22:return D.ItemLight;case 23:return D.RadarCollision;case 24:return D.FogCollisionSW;case 25:return D.BossTeleporter;case 26:return D.ImageBoard;case 27:return D.QuestWarp;case 28:return D.Epilogue;case 29:return D.UnknownItem29;case 30:return D.UnknownItem30;case 31:return D.UnknownItem31;case 32:return D.BoxDetectObject;case 33:return D.SymbolChatObject;case 34:return D.TouchPlateObject;case 35:return D.TargetableObject;case 36:return D.EffectObject;case 37:return D.CountDownObject;case 38:return D.UnknownItem38;case 39:return D.UnknownItem39;case 40:return D.UnknownItem40;case 41:return D.UnknownItem41;case 64:return D.MenuActivation;case 65:return D.TelepipeLocation;case 66:return D.BGMCollision;case 67:return D.MainRagolTeleporter;case 68:return D.LobbyTeleporter;case 69:return D.PrincipalWarp;case 70:return D.ShopDoor;case 71:return D.HuntersGuildDoor;case 72:return D.TeleporterDoor;case 73:return D.MedicalCenterDoor;case 74:return D.Elevator;case 75:return D.EasterEgg;case 76:return D.ValentinesHeart;case 77:return D.ChristmasTree;case 78:return D.ChristmasWreath;case 79:return D.HalloweenPumpkin;case 80:return D.TwentyFirstCentury;case 81:return D.Sonic;case 82:return D.WelcomeBoard;case 83:return D.Firework;case 84:return D.LobbyScreenDoor;case 85:return D.MainRagolTeleporterBattleInNextArea;case 86:return D.LabTeleporterDoor;case 87:return D.Pioneer2InvisibleTouchplate;case 128:return D.ForestDoor;case 129:return D.ForestSwitch;case 130:return D.LaserFence;case 131:return D.LaserSquareFence;case 132:return D.ForestLaserFenceSwitch;case 133:return D.LightRays;case 134:return D.BlueButterfly;case 135:return D.Probe;case 136:return D.RandomTypeBox1;case 137:return D.ForestWeatherStation;case 138:return D.Battery;case 139:return D.ForestConsole;case 140:return D.BlackSlidingDoor;case 141:return D.RicoMessagePod;case 142:return D.EnergyBarrier;case 143:return D.ForestRisingBridge;case 144:return D.SwitchNoneDoor;case 145:return D.EnemyBoxGrey;case 146:return D.FixedTypeBox;case 147:return D.EnemyBoxBrown;case 149:return D.EmptyTypeBox;case 150:return D.LaserFenseEx;case 151:return D.LaserSquareFenceEx;case 192:return D.FloorPanel1;case 193:return D.Caves4ButtonDoor;case 194:return D.CavesNormalDoor;case 195:return D.CavesSmashingPillar;case 196:return D.CavesSign1;case 197:return D.CavesSign2;case 198:return D.CavesSign3;case 199:return D.HexagalTank;case 200:return D.BrownPlatform;case 201:return D.WarningLightObject;case 203:return D.Rainbow;case 204:return D.FloatingJelifish;case 205:return D.FloatingDragonfly;case 206:return D.CavesSwitchDoor;case 207:return D.RobotRechargeStation;case 208:return D.CavesCakeShop;case 209:return D.Caves1SmallRedRock;case 210:return D.Caves1MediumRedRock;case 211:return D.Caves1LargeRedRock;case 212:return D.Caves2SmallRock1;case 213:return D.Caves2MediumRock1;case 214:return D.Caves2LargeRock1;case 215:return D.Caves2SmallRock2;case 216:return D.Caves2MediumRock2;case 217:return D.Caves2LargeRock2;case 218:return D.Caves3SmallRock;case 219:return D.Caves3MediumRock;case 220:return D.Caves3LargeRock;case 222:return D.FloorPanel2;case 223:return D.DestructableRockCaves1;case 224:return D.DestructableRockCaves2;case 225:return D.DestructableRockCaves3;case 256:return D.MinesDoor;case 257:return D.FloorPanel3;case 258:return D.MinesSwitchDoor;case 259:return D.LargeCryoTube;case 260:return D.ComputerLikeCalus;case 261:return D.GreenScreenOpeningAndClosing;case 262:return D.FloatingRobot;case 263:return D.FloatingBlueLight;case 264:return D.SelfDestructingObject1;case 265:return D.SelfDestructingObject2;case 266:return D.SelfDestructingObject3;case 267:return D.SparkMachine;case 268:return D.MinesLargeFlashingCrate;case 304:return D.RuinsSeal;case 320:return D.RuinsTeleporter;case 321:return D.RuinsWarpSiteToSite;case 322:return D.RuinsSwitch;case 323:return D.FloorPanel4;case 324:return D.Ruins1Door;case 325:return D.Ruins3Door;case 326:return D.Ruins2Door;case 327:return D.Ruins11ButtonDoor;case 328:return D.Ruins21ButtonDoor;case 329:return D.Ruins31ButtonDoor;case 330:return D.Ruins4ButtonDoor;case 331:return D.Ruins2ButtonDoor;case 332:return D.RuinsSensor;case 333:return D.RuinsFenceSwitch;case 334:return D.RuinsLaserFence4x2;case 335:return D.RuinsLaserFence6x2;case 336:return D.RuinsLaserFence4x4;case 337:return D.RuinsLaserFence6x4;case 338:return D.RuinsPoisonBlob;case 339:return D.RuinsPilarTrap;case 340:return D.PopupTrapNoTech;case 341:return D.RuinsCrystal;case 342:return D.Monument;case 345:return D.RuinsRock1;case 346:return D.RuinsRock2;case 347:return D.RuinsRock3;case 348:return D.RuinsRock4;case 349:return D.RuinsRock5;case 350:return D.RuinsRock6;case 351:return D.RuinsRock7;case 352:return D.Poison;case 353:return D.FixedBoxTypeRuins;case 354:return D.RandomBoxTypeRuins;case 355:return D.EnemyTypeBoxYellow;case 356:return D.EnemyTypeBoxBlue;case 357:return D.EmptyTypeBoxBlue;case 358:return D.DestructableRock;case 359:return D.PopupTrapsTechs;case 368:return D.FlyingWhiteBird;case 369:return D.Tower;case 370:return D.FloatingRocks;case 371:return D.FloatingSoul;case 372:return D.Butterfly;case 384:return D.LobbyGameMenu;case 385:return D.LobbyWarpObject;case 386:return D.Lobby1EventObjectDefaultTree;case 387:return D.UnknownItem387;case 388:return D.UnknownItem388;case 389:return D.UnknownItem389;case 390:return D.LobbyEventObjectStaticPumpkin;case 391:return D.LobbyEventObject3ChristmasWindows;case 392:return D.LobbyEventObjectRedAndWhiteCurtain;case 393:return D.UnknownItem393;case 394:return D.UnknownItem394;case 395:return D.LobbyFishTank;case 396:return D.LobbyEventObjectButterflies;case 400:return D.UnknownItem400;case 401:return D.GreyWallLow;case 402:return D.SpaceshipDoor;case 403:return D.GreyWallHigh;case 416:return D.TempleNormalDoor;case 417:return D.BreakableWallWallButUnbreakable;case 418:return D.BrokenCilinderAndRubble;case 419:return D.ThreeBrokenWallPiecesOnFloor;case 420:return D.HighBrickCilinder;case 421:return D.LyingCilinder;case 422:return D.BrickConeWithFlatTop;case 423:return D.BreakableTempleWall;case 424:return D.TempleMapDetect;case 425:return D.SmallBrownBrickRisingBridge;case 426:return D.LongRisingBridgeWithPinkHighEdges;case 427:return D.FourSwitchTempleDoor;case 448:return D.FourButtonSpaceshipDoor;case 512:return D.ItemBoxCca;case 513:return D.TeleporterEp2;case 514:return D.CCADoor;case 515:return D.SpecialBoxCCA;case 516:return D.BigCCADoor;case 517:return D.BigCCADoorSwitch;case 518:return D.LittleRock;case 519:return D.Little3StoneWall;case 520:return D.Medium3StoneWall;case 521:return D.SpiderPlant;case 522:return D.CCAAreaTeleporter;case 523:return D.UnknownItem523;case 524:return D.WhiteBird;case 525:return D.OrangeBird;case 527:return D.Saw;case 528:return D.LaserDetect;case 529:return D.UnknownItem529;case 530:return D.UnknownItem530;case 531:return D.Seagull;case 544:return D.Fish;case 545:return D.SeabedDoorWithBlueEdges;case 546:return D.SeabedDoorAlwaysOpenNonTriggerable;case 547:return D.LittleCryotube;case 548:return D.WideGlassWallBreakable;case 549:return D.BlueFloatingRobot;case 550:return D.RedFloatingRobot;case 551:return D.Dolphin;case 552:return D.CaptureTrap;case 553:return D.VRLink;case 576:return D.UnknownItem576;case 640:return D.WarpInBarbaRayRoom;case 672:return D.UnknownItem672;case 688:return D.GeeNest;case 689:return D.LabComputerConsole;case 690:return D.LabComputerConsoleGreenScreen;case 691:return D.ChairYelllowPillow;case 692:return D.OrangeWallWithHoleInMiddle;case 693:return D.GreyWallWithHoleInMiddle;case 694:return D.LongTable;case 695:return D.GBAStation;case 696:return D.TalkLinkToSupport;case 697:return D.InstaWarp;case 698:return D.LabInvisibleObject;case 699:return D.LabGlassWindowDoor;case 700:return D.UnknownItem700;case 701:return D.LabCelingWarp;case 768:return D.Ep4LightSource;case 769:return D.Cacti;case 770:return D.BigBrownRock;case 771:return D.BreakableBrownRock;case 832:return D.UnknownItem832;case 833:return D.UnknownItem833;case 896:return D.PoisonPlant;case 897:return D.UnknownItem897;case 898:return D.UnknownItem898;case 899:return D.OozingDesertPlant;case 901:return D.UnknownItem901;case 902:return D.BigBlackRocks;case 903:return D.UnknownItem903;case 904:return D.UnknownItem904;case 905:return D.UnknownItem905;case 906:return D.UnknownItem906;case 907:return D.FallingRock;case 908:return D.DesertPlantHasCollision;case 909:return D.DesertFixedTypeBoxBreakableCrystals;case 910:return D.UnknownItem910;case 911:return D.BeeHive;case 912:return D.UnknownItem912;case 913:return D.Heat;case 960:return D.TopOfSaintMillionEgg;case 961:return D.UnknownItem961}}}!function(){let e=1;D.Unknown=new D(e++,"Unknown",void 0,"Unknown"),D.PlayerSet=new D(e++,"PlayerSet",0,"Player Set"),D.Particle=new D(e++,"Particle",1,"Particle"),D.Teleporter=new D(e++,"Teleporter",2,"Teleporter"),D.Warp=new D(e++,"Warp",3,"Warp"),D.LightCollision=new D(e++,"LightCollision",4,"Light Collision"),D.Item=new D(e++,"Item",5,"Item"),D.EnvSound=new D(e++,"EnvSound",6,"Env Sound"),D.FogCollision=new D(e++,"FogCollision",7,"Fog Collision"),D.EventCollision=new D(e++,"EventCollision",8,"Event Collision"),D.CharaCollision=new D(e++,"CharaCollision",9,"Chara Collision"),D.ElementalTrap=new D(e++,"ElementalTrap",10,"Elemental Trap"),D.StatusTrap=new D(e++,"StatusTrap",11,"Status Trap"),D.HealTrap=new D(e++,"HealTrap",12,"Heal Trap"),D.LargeElementalTrap=new D(e++,"LargeElementalTrap",13,"Large Elemental Trap"),D.ObjRoomID=new D(e++,"ObjRoomID",14,"Obj Room ID"),D.Sensor=new D(e++,"Sensor",15,"Sensor"),D.UnknownItem16=new D(e++,"UnknownItem16",16,"Unknown Item (16)"),D.Lensflare=new D(e++,"Lensflare",17,"Lensflare"),D.ScriptCollision=new D(e++,"ScriptCollision",18,"Script Collision"),D.HealRing=new D(e++,"HealRing",19,"Heal Ring"),D.MapCollision=new D(e++,"MapCollision",20,"Map Collision"),D.ScriptCollisionA=new D(e++,"ScriptCollisionA",21,"Script Collision A"),D.ItemLight=new D(e++,"ItemLight",22,"Item Light"),D.RadarCollision=new D(e++,"RadarCollision",23,"Radar Collision"),D.FogCollisionSW=new D(e++,"FogCollisionSW",24,"Fog Collision SW"),D.BossTeleporter=new D(e++,"BossTeleporter",25,"Boss Teleporter"),D.ImageBoard=new D(e++,"ImageBoard",26,"Image Board"),D.QuestWarp=new D(e++,"QuestWarp",27,"Quest Warp"),D.Epilogue=new D(e++,"Epilogue",28,"Epilogue"),D.UnknownItem29=new D(e++,"UnknownItem29",29,"Unknown Item (29)"),D.UnknownItem30=new D(e++,"UnknownItem30",30,"Unknown Item (30)"),D.UnknownItem31=new D(e++,"UnknownItem31",31,"Unknown Item (31)"),D.BoxDetectObject=new D(e++,"BoxDetectObject",32,"Box Detect Object"),D.SymbolChatObject=new D(e++,"SymbolChatObject",33,"Symbol Chat Object"),D.TouchPlateObject=new D(e++,"TouchPlateObject",34,"Touch plate Object"),D.TargetableObject=new D(e++,"TargetableObject",35,"Targetable Object"),D.EffectObject=new D(e++,"EffectObject",36,"Effect object"),D.CountDownObject=new D(e++,"CountDownObject",37,"Count Down Object"),D.UnknownItem38=new D(e++,"UnknownItem38",38,"Unknown Item (38)"),D.UnknownItem39=new D(e++,"UnknownItem39",39,"Unknown Item (39)"),D.UnknownItem40=new D(e++,"UnknownItem40",40,"Unknown Item (40)"),D.UnknownItem41=new D(e++,"UnknownItem41",41,"Unknown Item (41)"),D.MenuActivation=new D(e++,"MenuActivation",64,"Menu activation"),D.TelepipeLocation=new D(e++,"TelepipeLocation",65,"Telepipe Location"),D.BGMCollision=new D(e++,"BGMCollision",66,"BGM Collision"),D.MainRagolTeleporter=new D(e++,"MainRagolTeleporter",67,"Main Ragol Teleporter"),D.LobbyTeleporter=new D(e++,"LobbyTeleporter",68,"Lobby Teleporter"),D.PrincipalWarp=new D(e++,"PrincipalWarp",69,"Principal warp"),D.ShopDoor=new D(e++,"ShopDoor",70,"Shop Door"),D.HuntersGuildDoor=new D(e++,"HuntersGuildDoor",71,"Hunter's Guild Door"),D.TeleporterDoor=new D(e++,"TeleporterDoor",72,"Teleporter Door"),D.MedicalCenterDoor=new D(e++,"MedicalCenterDoor",73,"Medical Center Door"),D.Elevator=new D(e++,"Elevator",74,"Elevator"),D.EasterEgg=new D(e++,"EasterEgg",75,"Easter Egg"),D.ValentinesHeart=new D(e++,"ValentinesHeart",76,"Valentines Heart"),D.ChristmasTree=new D(e++,"ChristmasTree",77,"Christmas Tree"),D.ChristmasWreath=new D(e++,"ChristmasWreath",78,"Christmas Wreath"),D.HalloweenPumpkin=new D(e++,"HalloweenPumpkin",79,"Halloween Pumpkin"),D.TwentyFirstCentury=new D(e++,"TwentyFirstCentury",80,"21st Century"),D.Sonic=new D(e++,"Sonic",81,"Sonic"),D.WelcomeBoard=new D(e++,"WelcomeBoard",82,"Welcome Board"),D.Firework=new D(e++,"Firework",83,"Firework"),D.LobbyScreenDoor=new D(e++,"LobbyScreenDoor",84,"Lobby Screen Door"),D.MainRagolTeleporterBattleInNextArea=new D(e++,"MainRagolTeleporterBattleInNextArea",85,"Main Ragol Teleporter (Battle in next area?)"),D.LabTeleporterDoor=new D(e++,"LabTeleporterDoor",86,"Lab Teleporter Door"),D.Pioneer2InvisibleTouchplate=new D(e++,"Pioneer2InvisibleTouchplate",87,"Pioneer 2 Invisible Touchplate"),D.ForestDoor=new D(e++,"ForestDoor",128,"Forest Door"),D.ForestSwitch=new D(e++,"ForestSwitch",129,"Forest Switch"),D.LaserFence=new D(e++,"LaserFence",130,"Laser Fence"),D.LaserSquareFence=new D(e++,"LaserSquareFence",131,"Laser Square Fence"),D.ForestLaserFenceSwitch=new D(e++,"ForestLaserFenceSwitch",132,"Forest Laser Fence Switch"),D.LightRays=new D(e++,"LightRays",133,"Light rays"),D.BlueButterfly=new D(e++,"BlueButterfly",134,"Blue Butterfly"),D.Probe=new D(e++,"Probe",135,"Probe"),D.RandomTypeBox1=new D(e++,"RandomTypeBox1",136,"Random Type Box 1"),D.ForestWeatherStation=new D(e++,"ForestWeatherStation",137,"Forest Weather Station"),D.Battery=new D(e++,"Battery",138,"Battery"),D.ForestConsole=new D(e++,"ForestConsole",139,"Forest Console"),D.BlackSlidingDoor=new D(e++,"BlackSlidingDoor",140,"Black Sliding Door"),D.RicoMessagePod=new D(e++,"RicoMessagePod",141,"Rico Message Pod"),D.EnergyBarrier=new D(e++,"EnergyBarrier",142,"Energy Barrier"),D.ForestRisingBridge=new D(e++,"ForestRisingBridge",143,"Forest Rising Bridge"),D.SwitchNoneDoor=new D(e++,"SwitchNoneDoor",144,"Switch (none door)"),D.EnemyBoxGrey=new D(e++,"EnemyBoxGrey",145,"Enemy Box (Grey)"),D.FixedTypeBox=new D(e++,"FixedTypeBox",146,"Fixed Type Box"),D.EnemyBoxBrown=new D(e++,"EnemyBoxBrown",147,"Enemy Box (Brown)"),D.EmptyTypeBox=new D(e++,"EmptyTypeBox",149,"Empty Type Box"),D.LaserFenseEx=new D(e++,"LaserFenseEx",150,"Laser Fense Ex"),D.LaserSquareFenceEx=new D(e++,"LaserSquareFenceEx",151,"Laser Square Fence Ex"),D.FloorPanel1=new D(e++,"FloorPanel1",192,"Floor Panel 1"),D.Caves4ButtonDoor=new D(e++,"Caves4ButtonDoor",193,"Caves 4 Button door"),D.CavesNormalDoor=new D(e++,"CavesNormalDoor",194,"Caves Normal door"),D.CavesSmashingPillar=new D(e++,"CavesSmashingPillar",195,"Caves Smashing Pillar"),D.CavesSign1=new D(e++,"CavesSign1",196,"Caves Sign 1"),D.CavesSign2=new D(e++,"CavesSign2",197,"Caves Sign 2"),D.CavesSign3=new D(e++,"CavesSign3",198,"Caves Sign 3"),D.HexagalTank=new D(e++,"HexagalTank",199,"Hexagal Tank"),D.BrownPlatform=new D(e++,"BrownPlatform",200,"Brown Platform"),D.WarningLightObject=new D(e++,"WarningLightObject",201,"Warning Light Object"),D.Rainbow=new D(e++,"Rainbow",203,"Rainbow"),D.FloatingJelifish=new D(e++,"FloatingJelifish",204,"Floating Jelifish"),D.FloatingDragonfly=new D(e++,"FloatingDragonfly",205,"Floating Dragonfly"),D.CavesSwitchDoor=new D(e++,"CavesSwitchDoor",206,"Caves Switch Door"),D.RobotRechargeStation=new D(e++,"RobotRechargeStation",207,"Robot Recharge Station"),D.CavesCakeShop=new D(e++,"CavesCakeShop",208,"Caves Cake Shop"),D.Caves1SmallRedRock=new D(e++,"Caves1SmallRedRock",209,"Caves 1 Small Red Rock"),D.Caves1MediumRedRock=new D(e++,"Caves1MediumRedRock",210,"Caves 1 Medium Red Rock"),D.Caves1LargeRedRock=new D(e++,"Caves1LargeRedRock",211,"Caves 1 Large Red Rock"),D.Caves2SmallRock1=new D(e++,"Caves2SmallRock1",212,"Caves 2 Small Rock 1"),D.Caves2MediumRock1=new D(e++,"Caves2MediumRock1",213,"Caves 2 Medium Rock 1"),D.Caves2LargeRock1=new D(e++,"Caves2LargeRock1",214,"Caves 2 Large Rock 1"),D.Caves2SmallRock2=new D(e++,"Caves2SmallRock2",215,"Caves 2 Small Rock 2"),D.Caves2MediumRock2=new D(e++,"Caves2MediumRock2",216,"Caves 2 Medium Rock 2"),D.Caves2LargeRock2=new D(e++,"Caves2LargeRock2",217,"Caves 2 Large Rock 2"),D.Caves3SmallRock=new D(e++,"Caves3SmallRock",218,"Caves 3 Small Rock"),D.Caves3MediumRock=new D(e++,"Caves3MediumRock",219,"Caves 3 Medium Rock"),D.Caves3LargeRock=new D(e++,"Caves3LargeRock",220,"Caves 3 Large Rock"),D.FloorPanel2=new D(e++,"FloorPanel2",222,"Floor Panel 2"),D.DestructableRockCaves1=new D(e++,"DestructableRockCaves1",223,"Destructable Rock (Caves 1)"),D.DestructableRockCaves2=new D(e++,"DestructableRockCaves2",224,"Destructable Rock (Caves 2)"),D.DestructableRockCaves3=new D(e++,"DestructableRockCaves3",225,"Destructable Rock (Caves 3)"),D.MinesDoor=new D(e++,"MinesDoor",256,"Mines Door"),D.FloorPanel3=new D(e++,"FloorPanel3",257,"Floor Panel 3"),D.MinesSwitchDoor=new D(e++,"MinesSwitchDoor",258,"Mines Switch Door"),D.LargeCryoTube=new D(e++,"LargeCryoTube",259,"Large Cryo-Tube"),D.ComputerLikeCalus=new D(e++,"ComputerLikeCalus",260,"Computer (like calus)"),D.GreenScreenOpeningAndClosing=new D(e++,"GreenScreenOpeningAndClosing",261,"Green Screen opening and closing"),D.FloatingRobot=new D(e++,"FloatingRobot",262,"Floating Robot"),D.FloatingBlueLight=new D(e++,"FloatingBlueLight",263,"Floating Blue Light"),D.SelfDestructingObject1=new D(e++,"SelfDestructingObject1",264,"Self Destructing Object 1"),D.SelfDestructingObject2=new D(e++,"SelfDestructingObject2",265,"Self Destructing Object 2"),D.SelfDestructingObject3=new D(e++,"SelfDestructingObject3",266,"Self Destructing Object 3"),D.SparkMachine=new D(e++,"SparkMachine",267,"Spark Machine"),D.MinesLargeFlashingCrate=new D(e++,"MinesLargeFlashingCrate",268,"Mines Large Flashing Crate"),D.RuinsSeal=new D(e++,"RuinsSeal",304,"Ruins Seal"),D.RuinsTeleporter=new D(e++,"RuinsTeleporter",320,"Ruins Teleporter"),D.RuinsWarpSiteToSite=new D(e++,"RuinsWarpSiteToSite",321,"Ruins Warp (Site to site)"),D.RuinsSwitch=new D(e++,"RuinsSwitch",322,"Ruins Switch"),D.FloorPanel4=new D(e++,"FloorPanel4",323,"Floor Panel 4"),D.Ruins1Door=new D(e++,"Ruins1Door",324,"Ruins 1 Door"),D.Ruins3Door=new D(e++,"Ruins3Door",325,"Ruins 3 Door"),D.Ruins2Door=new D(e++,"Ruins2Door",326,"Ruins 2 Door"),D.Ruins11ButtonDoor=new D(e++,"Ruins11ButtonDoor",327,"Ruins 1-1 Button Door"),D.Ruins21ButtonDoor=new D(e++,"Ruins21ButtonDoor",328,"Ruins 2-1 Button Door"),D.Ruins31ButtonDoor=new D(e++,"Ruins31ButtonDoor",329,"Ruins 3-1 Button Door"),D.Ruins4ButtonDoor=new D(e++,"Ruins4ButtonDoor",330,"Ruins 4-Button Door"),D.Ruins2ButtonDoor=new D(e++,"Ruins2ButtonDoor",331,"Ruins 2-Button Door"),D.RuinsSensor=new D(e++,"RuinsSensor",332,"Ruins Sensor"),D.RuinsFenceSwitch=new D(e++,"RuinsFenceSwitch",333,"Ruins Fence Switch"),D.RuinsLaserFence4x2=new D(e++,"RuinsLaserFence4x2",334,"Ruins Laser Fence 4x2"),D.RuinsLaserFence6x2=new D(e++,"RuinsLaserFence6x2",335,"Ruins Laser Fence 6x2"),D.RuinsLaserFence4x4=new D(e++,"RuinsLaserFence4x4",336,"Ruins Laser Fence 4x4"),D.RuinsLaserFence6x4=new D(e++,"RuinsLaserFence6x4",337,"Ruins Laser Fence 6x4"),D.RuinsPoisonBlob=new D(e++,"RuinsPoisonBlob",338,"Ruins poison Blob"),D.RuinsPilarTrap=new D(e++,"RuinsPilarTrap",339,"Ruins Pilar Trap"),D.PopupTrapNoTech=new D(e++,"PopupTrapNoTech",340,"Popup Trap (No Tech)"),D.RuinsCrystal=new D(e++,"RuinsCrystal",341,"Ruins Crystal"),D.Monument=new D(e++,"Monument",342,"Monument"),D.RuinsRock1=new D(e++,"RuinsRock1",345,"Ruins Rock 1"),D.RuinsRock2=new D(e++,"RuinsRock2",346,"Ruins Rock 2"),D.RuinsRock3=new D(e++,"RuinsRock3",347,"Ruins Rock 3"),D.RuinsRock4=new D(e++,"RuinsRock4",348,"Ruins Rock 4"),D.RuinsRock5=new D(e++,"RuinsRock5",349,"Ruins Rock 5"),D.RuinsRock6=new D(e++,"RuinsRock6",350,"Ruins Rock 6"),D.RuinsRock7=new D(e++,"RuinsRock7",351,"Ruins Rock 7"),D.Poison=new D(e++,"Poison",352,"Poison"),D.FixedBoxTypeRuins=new D(e++,"FixedBoxTypeRuins",353,"Fixed Box Type (Ruins)"),D.RandomBoxTypeRuins=new D(e++,"RandomBoxTypeRuins",354,"Random Box Type (Ruins)"),D.EnemyTypeBoxYellow=new D(e++,"EnemyTypeBoxYellow",355,"Enemy Type Box (Yellow)"),D.EnemyTypeBoxBlue=new D(e++,"EnemyTypeBoxBlue",356,"Enemy Type Box (Blue)"),D.EmptyTypeBoxBlue=new D(e++,"EmptyTypeBoxBlue",357,"Empty Type Box (Blue)"),D.DestructableRock=new D(e++,"DestructableRock",358,"Destructable Rock"),D.PopupTrapsTechs=new D(e++,"PopupTrapsTechs",359,"Popup Traps (techs)"),D.FlyingWhiteBird=new D(e++,"FlyingWhiteBird",368,"Flying White Bird"),D.Tower=new D(e++,"Tower",369,"Tower"),D.FloatingRocks=new D(e++,"FloatingRocks",370,"Floating Rocks"),D.FloatingSoul=new D(e++,"FloatingSoul",371,"Floating Soul"),D.Butterfly=new D(e++,"Butterfly",372,"Butterfly"),D.LobbyGameMenu=new D(e++,"LobbyGameMenu",384,"Lobby Game menu"),D.LobbyWarpObject=new D(e++,"LobbyWarpObject",385,"Lobby Warp Object"),D.Lobby1EventObjectDefaultTree=new D(e++,"Lobby1EventObjectDefaultTree",386,"Lobby 1 Event Object (Default Tree)"),D.UnknownItem387=new D(e++,"UnknownItem387",387,"Unknown Item (387)"),D.UnknownItem388=new D(e++,"UnknownItem388",388,"Unknown Item (388)"),D.UnknownItem389=new D(e++,"UnknownItem389",389,"Unknown Item (389)"),D.LobbyEventObjectStaticPumpkin=new D(e++,"LobbyEventObjectStaticPumpkin",390,"Lobby Event Object (Static Pumpkin)"),D.LobbyEventObject3ChristmasWindows=new D(e++,"LobbyEventObject3ChristmasWindows",391,"Lobby Event Object (3 Christmas Windows)"),D.LobbyEventObjectRedAndWhiteCurtain=new D(e++,"LobbyEventObjectRedAndWhiteCurtain",392,"Lobby Event Object (Red and White Curtain)"),D.UnknownItem393=new D(e++,"UnknownItem393",393,"Unknown Item (393)"),D.UnknownItem394=new D(e++,"UnknownItem394",394,"Unknown Item (394)"),D.LobbyFishTank=new D(e++,"LobbyFishTank",395,"Lobby Fish Tank"),D.LobbyEventObjectButterflies=new D(e++,"LobbyEventObjectButterflies",396,"Lobby Event Object (Butterflies)"),D.UnknownItem400=new D(e++,"UnknownItem400",400,"Unknown Item (400)"),D.GreyWallLow=new D(e++,"GreyWallLow",401,"grey wall low"),D.SpaceshipDoor=new D(e++,"SpaceshipDoor",402,"Spaceship Door"),D.GreyWallHigh=new D(e++,"GreyWallHigh",403,"grey wall high"),D.TempleNormalDoor=new D(e++,"TempleNormalDoor",416,"Temple Normal Door"),D.BreakableWallWallButUnbreakable=new D(e++,"BreakableWallWallButUnbreakable",417,'"breakable wall wall, but unbreakable"'),D.BrokenCilinderAndRubble=new D(e++,"BrokenCilinderAndRubble",418,"Broken cilinder and rubble"),D.ThreeBrokenWallPiecesOnFloor=new D(e++,"ThreeBrokenWallPiecesOnFloor",419,"3 broken wall pieces on floor"),D.HighBrickCilinder=new D(e++,"HighBrickCilinder",420,"high brick cilinder"),D.LyingCilinder=new D(e++,"LyingCilinder",421,"lying cilinder"),D.BrickConeWithFlatTop=new D(e++,"BrickConeWithFlatTop",422,"brick cone with flat top"),D.BreakableTempleWall=new D(e++,"BreakableTempleWall",423,"breakable temple wall"),D.TempleMapDetect=new D(e++,"TempleMapDetect",424,"Temple Map Detect"),D.SmallBrownBrickRisingBridge=new D(e++,"SmallBrownBrickRisingBridge",425,"small brown brick rising bridge"),D.LongRisingBridgeWithPinkHighEdges=new D(e++,"LongRisingBridgeWithPinkHighEdges",426,"long rising bridge (with pink high edges)"),D.FourSwitchTempleDoor=new D(e++,"FourSwitchTempleDoor",427,"4 switch temple door"),D.FourButtonSpaceshipDoor=new D(e++,"FourButtonSpaceshipDoor",448,"4 button spaceship door"),D.ItemBoxCca=new D(e++,"ItemBoxCca",512,"item box cca"),D.TeleporterEp2=new D(e++,"TeleporterEp2",513,"Teleporter (Ep 2)"),D.CCADoor=new D(e++,"CCADoor",514,"CCA Door"),D.SpecialBoxCCA=new D(e++,"SpecialBoxCCA",515,"Special Box CCA"),D.BigCCADoor=new D(e++,"BigCCADoor",516,"Big CCA Door"),D.BigCCADoorSwitch=new D(e++,"BigCCADoorSwitch",517,"Big CCA Door Switch"),D.LittleRock=new D(e++,"LittleRock",518,"Little Rock"),D.Little3StoneWall=new D(e++,"Little3StoneWall",519,"Little 3 Stone Wall"),D.Medium3StoneWall=new D(e++,"Medium3StoneWall",520,"Medium 3 stone wall"),D.SpiderPlant=new D(e++,"SpiderPlant",521,"Spider Plant"),D.CCAAreaTeleporter=new D(e++,"CCAAreaTeleporter",522,"CCA Area Teleporter"),D.UnknownItem523=new D(e++,"UnknownItem523",523,"Unknown Item (523)"),D.WhiteBird=new D(e++,"WhiteBird",524,"White Bird"),D.OrangeBird=new D(e++,"OrangeBird",525,"Orange Bird"),D.Saw=new D(e++,"Saw",527,"Saw"),D.LaserDetect=new D(e++,"LaserDetect",528,"Laser Detect"),D.UnknownItem529=new D(e++,"UnknownItem529",529,"Unknown Item (529)"),D.UnknownItem530=new D(e++,"UnknownItem530",530,"Unknown Item (530)"),D.Seagull=new D(e++,"Seagull",531,"Seagull"),D.Fish=new D(e++,"Fish",544,"Fish"),D.SeabedDoorWithBlueEdges=new D(e++,"SeabedDoorWithBlueEdges",545,"Seabed Door (with blue edges)"),D.SeabedDoorAlwaysOpenNonTriggerable=new D(e++,"SeabedDoorAlwaysOpenNonTriggerable",546,"Seabed door (always open, non-triggerable)"),D.LittleCryotube=new D(e++,"LittleCryotube",547,"Little Cryotube"),D.WideGlassWallBreakable=new D(e++,"WideGlassWallBreakable",548,"Wide Glass Wall (breakable)"),D.BlueFloatingRobot=new D(e++,"BlueFloatingRobot",549,"Blue floating robot"),D.RedFloatingRobot=new D(e++,"RedFloatingRobot",550,"Red floating robot"),D.Dolphin=new D(e++,"Dolphin",551,"Dolphin"),D.CaptureTrap=new D(e++,"CaptureTrap",552,"Capture Trap"),D.VRLink=new D(e++,"VRLink",553,"VR link"),D.UnknownItem576=new D(e++,"UnknownItem576",576,"Unknown Item (576)"),D.WarpInBarbaRayRoom=new D(e++,"WarpInBarbaRayRoom",640,"Warp in Barba Ray Room"),D.UnknownItem672=new D(e++,"UnknownItem672",672,"Unknown Item (672)"),D.GeeNest=new D(e++,"GeeNest",688,"Gee Nest"),D.LabComputerConsole=new D(e++,"LabComputerConsole",689,"Lab Computer Console"),D.LabComputerConsoleGreenScreen=new D(e++,"LabComputerConsoleGreenScreen",690,"Lab Computer Console (Green Screen)"),D.ChairYelllowPillow=new D(e++,"ChairYelllowPillow",691,"Chair, Yelllow Pillow"),D.OrangeWallWithHoleInMiddle=new D(e++,"OrangeWallWithHoleInMiddle",692,"orange wall with hole in middle"),D.GreyWallWithHoleInMiddle=new D(e++,"GreyWallWithHoleInMiddle",693,"grey wall with hole in middle"),D.LongTable=new D(e++,"LongTable",694,"long table"),D.GBAStation=new D(e++,"GBAStation",695,"GBA Station"),D.TalkLinkToSupport=new D(e++,"TalkLinkToSupport",696,"Talk (link to support)"),D.InstaWarp=new D(e++,"InstaWarp",697,"insta-warp"),D.LabInvisibleObject=new D(e++,"LabInvisibleObject",698,"Lab Invisible Object"),D.LabGlassWindowDoor=new D(e++,"LabGlassWindowDoor",699,"Lab Glass window Door"),D.UnknownItem700=new D(e++,"UnknownItem700",700,"Unknown Item (700)"),D.LabCelingWarp=new D(e++,"LabCelingWarp",701,"Lab Celing Warp"),D.Ep4LightSource=new D(e++,"Ep4LightSource",768,"Ep4 Light Source"),D.Cacti=new D(e++,"Cacti",769,"cacti"),D.BigBrownRock=new D(e++,"BigBrownRock",770,"Big Brown Rock"),D.BreakableBrownRock=new D(e++,"BreakableBrownRock",771,"Breakable Brown Rock"),D.UnknownItem832=new D(e++,"UnknownItem832",832,"Unknown Item (832)"),D.UnknownItem833=new D(e++,"UnknownItem833",833,"Unknown Item (833)"),D.PoisonPlant=new D(e++,"PoisonPlant",896,"Poison Plant"),D.UnknownItem897=new D(e++,"UnknownItem897",897,"Unknown Item (897)"),D.UnknownItem898=new D(e++,"UnknownItem898",898,"Unknown Item (898)"),D.OozingDesertPlant=new D(e++,"OozingDesertPlant",899,"Oozing Desert Plant"),D.UnknownItem901=new D(e++,"UnknownItem901",901,"Unknown Item (901)"),D.BigBlackRocks=new D(e++,"BigBlackRocks",902,"big black rocks"),D.UnknownItem903=new D(e++,"UnknownItem903",903,"Unknown Item (903)"),D.UnknownItem904=new D(e++,"UnknownItem904",904,"Unknown Item (904)"),D.UnknownItem905=new D(e++,"UnknownItem905",905,"Unknown Item (905)"),D.UnknownItem906=new D(e++,"UnknownItem906",906,"Unknown Item (906)"),D.FallingRock=new D(e++,"FallingRock",907,"Falling Rock"),D.DesertPlantHasCollision=new D(e++,"DesertPlantHasCollision",908,"Desert Plant (has collision)"),D.DesertFixedTypeBoxBreakableCrystals=new D(e++,"DesertFixedTypeBoxBreakableCrystals",909,"Desert Fixed Type Box (Breakable Crystals)"),D.UnknownItem910=new D(e++,"UnknownItem910",910,"Unknown Item (910)"),D.BeeHive=new D(e++,"BeeHive",911,"Bee Hive"),D.UnknownItem912=new D(e++,"UnknownItem912",912,"Unknown Item (912)"),D.Heat=new D(e++,"Heat",913,"Heat"),D.TopOfSaintMillionEgg=new D(e++,"TopOfSaintMillionEgg",960,"Top of saint million egg"),D.UnknownItem961=new D(e++,"UnknownItem961",961,"Unknown Item (961)")}();var P=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};const C=1/512,F=.1;var W;!function(e){e.Ephinea="Ephinea"}(W||(W={}));f(W);var L;!function(e){e[e.I=1]="I",e[e.II=2]="II",e[e.IV=4]="IV"}(L||(L={}));f(L);function U(e){if(null==L[e])throw new Error(`Invalid episode ${e}.`)}var A;!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"}(A||(A={}));const M=f(A);var I;!function(e){e[e.Normal=0]="Normal",e[e.Hard=1]="Hard",e[e.VHard=2]="VHard",e[e.Ultimate=3]="Ultimate"}(I||(I={}));const B=f(I);class x{constructor(e,t,n){if(!Number.isInteger(e)||e<-1)throw new Error(`Expected id to be an integer greater than or equal to -1, got ${e}.`);if(!t)throw new Error("position is required.");if("number"!=typeof n)throw new Error("y_axis_rotation is required.");this.id=e,this.position=t,this.y_axis_rotation=n,this.sin_y_axis_rotation=Math.sin(this.y_axis_rotation),this.cos_y_axis_rotation=Math.cos(this.y_axis_rotation)}}class j{constructor(e,t,n,i,o,r,s,a,d,l,u,c){if(U(r),!s)throw new Error("area_variants is required.");if(!(a&&a instanceof Array))throw new Error("objs is required.");if(!(d&&d instanceof Array))throw new Error("npcs is required.");if(!l)throw new Error("dat_unknowns is required.");if(!u)throw new Error("object_code is required.");if(!c)throw new Error("shop_items is required.");this.set_id(e),this.set_language(t),this.set_name(n),this.set_short_description(i),this.set_long_description(o),this.episode=r,this.area_variants=s,this.objects=a,this.npcs=d,this.dat_unknowns=l,this.object_code=u,this.shop_items=c}get id(){return this._id}set_id(e){if(!Number.isInteger(e)||e<0||e>4294967295)throw new Error("id must be an integer greater than 0 and less than 4294967295.");this._id=e}get language(){return this._language}set_language(e){if(!Number.isInteger(e))throw new Error("language must be an integer.");this._language=e}get name(){return this._name}set_name(e){if(e.length>32)throw new Error("name can't be longer than 32 characters.");this._name=e}get short_description(){return this._short_description}set_short_description(e){if(e.length>128)throw new Error("short_description can't be longer than 128 characters.");this._short_description=e}get long_description(){return this._long_description}set_long_description(e){if(e.length>288)throw new Error("long_description can't be longer than 288 characters.");this._long_description=e}}P([v.n],j.prototype,"_id",void 0),P([v.d],j.prototype,"set_id",null),P([v.n],j.prototype,"_language",void 0),P([v.d],j.prototype,"set_language",null),P([v.n],j.prototype,"_name",void 0),P([v.d],j.prototype,"set_name",null),P([v.n],j.prototype,"_short_description",void 0),P([v.d],j.prototype,"set_short_description",null),P([v.n],j.prototype,"_long_description",void 0),P([v.d],j.prototype,"set_long_description",null),P([v.n],j.prototype,"area_variants",void 0),P([v.n],j.prototype,"objects",void 0),P([v.n],j.prototype,"npcs",void 0);class G{constructor(e,t,n,i,o,r){if(!e)throw new Error("type is required.");if(!Number.isInteger(t)||t<0)throw new Error(`Expected area_id to be a non-negative integer, got ${t}.`);if(!Number.isInteger(n)||n<0)throw new Error(`Expected section_id to be a non-negative integer, got ${n}.`);if(!i)throw new Error("position is required.");if(!o)throw new Error("rotation is required.");if(!r)throw new Error("scale is required.");this.type=e,this.area_id=t,this._section_id=n,this.position=i,this.rotation=o,this.scale=r}get section_id(){return this.section?this.section.id:this._section_id}get section_position(){let{x:e,y:t,z:n}=this.position;if(this.section){const i=e-this.section.position.x,o=t-this.section.position.y,r=n-this.section.position.z,s=-this.section.sin_y_axis_rotation,a=this.section.cos_y_axis_rotation;e=a*i+s*r,t=o,n=-s*i+a*r}return new h(e,t,n)}set section_position(e){let{x:t,y:n,z:i}=e;if(this.section){const e=-this.section.sin_y_axis_rotation,o=this.section.cos_y_axis_rotation,r=e*t+o*i,s=o*t-e*i+this.section.position.x,a=n+this.section.position.y,d=r+this.section.position.z;this.position=new h(s,a,d)}}set_position_and_section(e,t){this.position=e,this.section=t}}P([v.n],G.prototype,"area_id",void 0),P([v.f],G.prototype,"section_id",null),P([v.n.ref],G.prototype,"section",void 0),P([v.n.ref],G.prototype,"position",void 0),P([v.n.ref],G.prototype,"rotation",void 0),P([v.n.ref],G.prototype,"scale",void 0),P([v.f],G.prototype,"section_position",null),P([v.d],G.prototype,"set_position_and_section",null);class K extends G{constructor(e,t,n,i,o,r,s){super(e,t,n,i,o,r),this.type=e,this.unknown=s}}P([v.n],K.prototype,"type",void 0);class z extends G{constructor(e,t,n,i,o,r,s,a,d){super(e,i,o,r,s,a),this.type=e,this.pso_type_id=t,this.pso_skin=n,this.unknown=d}}P([v.n],z.prototype,"type",void 0);class H{constructor(e,t,n,i){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(!i)throw new Error("area_variants is required.");this.id=e,this.name=t,this.order=n,this.area_variants=i}}class V{constructor(e,t){if(this.id=e,this.area=t,this.sections=[],!Number.isInteger(e)||e<0)throw new Error(`Expected id to be a non-negative integer, got ${e}.`)}}P([v.n.shallow],V.prototype,"sections",void 0);class ${constructor(e,t,n,i,o,r){this.difficulty=e,this.section_id=t,this.npc_type=n,this.item_type=i,this.anything_rate=o,this.rare_rate=r,this.rate=o*r}}class q{constructor(e,t,n,i){if(!e)throw new Error("id is required.");if(i<=0)throw new Error("default_time must be greater than zero.");if(!t)throw new Error("name is required.");if(!n)throw new Error("quest is required.");this.id=e,this.name=t,this.episode=n.episode,this.quest=n,this.enemy_counts=n.enemy_counts,this.default_time=i}get time(){return null!=this.user_time?this.user_time:this.default_time}}P([v.n],q.prototype,"user_time",void 0),P([v.f],q.prototype,"time",null);class J{constructor(e,t,n,i){if(this.id=e,this.name=t,this.episode=n,this.enemy_counts=i,!e)throw new Error("id is required.");if(!t)throw new Error("name is required.");if(!i)throw new Error("enemyCounts is required.")}}class Y{constructor(e,t,n,i){this.name=e,this.head_style_count=t,this.hair_styles_count=n,this.hair_styles_with_accessory=i}}class Z{constructor(e,t){this.id=e,this.name=t}}var X,Q=n("phKT"),ee=n.n(Q),te=n("fyUT"),ne=n("LvDl"),ie=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},oe=function(e,t,n,i){return new(n||(n=Promise))(function(o,r){function s(e){try{d(i.next(e))}catch(e){r(e)}}function a(e){try{d(i.throw(e))}catch(e){r(e)}}function d(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}d((i=i.apply(e,t||[])).next())})};!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Nominal=2]="Nominal",e[e.Error=3]="Error",e[e.Reloading=4]="Reloading"}(X||(X={}));class re{constructor(e,t){this._promise=new Promise(e=>e(this._value)),this._state=X.Uninitialized,this._value=e,this._load=t}get value(){return this._state===X.Uninitialized&&Object(ne.defer)(()=>this.load_value()),this._value}set value(e){this._value=e}get promise(){return this._state===X.Uninitialized?this.load_value():this._promise}get state(){return this._state}get is_initialized(){return this._state!==X.Uninitialized}get is_loading(){switch(this._state){case X.Initializing:case X.Reloading:return!0;default:return!1}}get error(){return this._error}load(){return this.load_value()}load_value(){return oe(this,void 0,void 0,function*(){if(this.is_loading)return this._promise;this._state=X.Initializing;try{return this._load&&(this._promise=this._load(),this._value=yield this._promise),this._state=X.Nominal,this._error=void 0,this._value}catch(e){throw this._state=X.Error,this._error=e,e}})}}ie([v.n],re.prototype,"_value",void 0),ie([v.n],re.prototype,"_promise",void 0),ie([v.n],re.prototype,"_state",void 0),ie([v.n],re.prototype,"_error",void 0),ie([v.f],re.prototype,"value",null),ie([v.f],re.prototype,"state",null),ie([v.f],re.prototype,"is_initialized",null),ie([v.f],re.prototype,"is_loading",null),ie([v.f],re.prototype,"error",null);var se=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};class ae{constructor(){this.current_server=W.Ephinea,this.current_tool=this.init_tool(),this.global_keyup_handlers=new Map,this.dispatch_global_keyup=e=>{const t=[];e.ctrlKey&&t.push("Ctrl"),e.shiftKey&&t.push("Shift"),e.altKey&&t.push("Alt"),t.push(e.key.toUpperCase());const n=t.join("-"),i=this.global_keyup_handlers.get(`${this.current_tool} -> ${n}`);i&&i()},Object(v.e)(()=>{window.location.hash=`#/${this.current_tool}`})}on_global_keyup(e,t,n){this.global_keyup_handlers.set(`${e} -> ${t}`,n)}init_tool(){const e=window.location.hash.slice(2);return e.length?e:"viewer"}}se([v.n],ae.prototype,"current_server",void 0),se([v.n],ae.prototype,"current_tool",void 0);const de=new ae;class le extends m{constructor(e){super(W,e)}get current(){return this.get(de.current_server)}}(function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);r>3&&s&&Object.defineProperty(t,n,s)})([v.f],le.prototype,"current",null);var ue=function(e,t,n,i){return new(n||(n=Promise))(function(o,r){function s(e){try{d(i.next(e))}catch(e){r(e)}}function a(e){try{d(i.throw(e))}catch(e){r(e)}}function d(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}d((i=i.apply(e,t||[])).next())})};class ce{constructor(){this.id_to_item_type=[],this.item_types=[],this.load=e=>ue(this,void 0,void 0,function*(){const t=yield fetch(`/assets/itemTypes.${W[e].toLowerCase()}.json`),n=yield t.json(),i=new Array;for(const e of n){let t;switch(e.class){case"weapon":t=new k(e.id,e.name,e.minAtp,e.maxAtp,e.ata,e.maxGrind,e.requiredAtp);break;case"armor":t=new y(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 R(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 b(e.id,e.name);break;case"tool":t=new N(e.id,e.name);break;default:continue}this.id_to_item_type[t.id]=t,i.push(t)}return this.item_types=i,this})}get_by_id(e){return this.id_to_item_type[e]}}(function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);r>3&&s&&Object.defineProperty(t,n,s)})([v.n],ce.prototype,"item_types",void 0);const _e=new le(e=>{const t=new ce;return new re(t,()=>t.load(e))});var we=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};const ve=.2*.9,pe=1.89*ve;class he{constructor(e,t){this.store=e,this.item=t}get shifta_atp(){return this.item.type.min_atp===this.item.type.max_atp?0:this.item.type.max_atp*this.store.shifta_factor}get min_atp(){return this.item.type.min_atp+this.item.grind_atp}get max_atp(){return this.item.type.max_atp+this.item.grind_atp+this.shifta_atp}get final_min_atp(){return this.min_atp+this.store.armor_atp+this.store.shield_atp+this.store.base_atp+this.store.base_shifta_atp}get final_max_atp(){return this.max_atp+this.store.armor_atp+this.store.shield_atp+this.store.base_atp+this.store.base_shifta_atp}get min_normal_damage(){return(this.final_min_atp-this.store.enemy_dfp)*ve}get max_normal_damage(){return(this.final_max_atp-this.store.enemy_dfp)*ve}get avg_normal_damage(){return(this.min_normal_damage+this.max_normal_damage)/2}get min_heavy_damage(){return(this.final_min_atp-this.store.enemy_dfp)*pe}get max_heavy_damage(){return(this.final_max_atp-this.store.enemy_dfp)*pe}get avg_heavy_damage(){return(this.min_heavy_damage+this.max_heavy_damage)/2}}we([v.f],he.prototype,"shifta_atp",null),we([v.f],he.prototype,"min_atp",null),we([v.f],he.prototype,"max_atp",null),we([v.f],he.prototype,"final_min_atp",null),we([v.f],he.prototype,"final_max_atp",null),we([v.f],he.prototype,"min_normal_damage",null),we([v.f],he.prototype,"max_normal_damage",null),we([v.f],he.prototype,"avg_normal_damage",null),we([v.f],he.prototype,"min_heavy_damage",null),we([v.f],he.prototype,"max_heavy_damage",null),we([v.f],he.prototype,"avg_heavy_damage",null);class fe{constructor(){this.char_atp=0,this.mag_pow=0,this.shifta_lvl=0,this.weapons=v.n.array(),this.add_weapon=e=>{this.weapons.push(new he(this,new E(e)))},this.enemy_dfp=0}get weapon_types(){return _e.current.value.item_types.filter(e=>e instanceof k)}get armor_types(){return _e.current.value.item_types.filter(e=>e instanceof y)}get shield_types(){return _e.current.value.item_types.filter(e=>e instanceof R)}get armor_atp(){return this.armor_type?this.armor_type.atp:0}get shield_atp(){return this.shield_type?this.shield_type.atp:0}get base_atp(){return this.char_atp+2*this.mag_pow}get shifta_factor(){return this.shifta_lvl?.013*(this.shifta_lvl-1)+.1:0}get base_shifta_atp(){return this.base_atp*this.shifta_factor}}we([v.f],fe.prototype,"weapon_types",null),we([v.f],fe.prototype,"armor_types",null),we([v.f],fe.prototype,"shield_types",null),we([v.n],fe.prototype,"char_atp",void 0),we([v.n],fe.prototype,"mag_pow",void 0),we([v.f],fe.prototype,"armor_atp",null),we([v.f],fe.prototype,"shield_atp",null),we([v.n],fe.prototype,"shifta_lvl",void 0),we([v.f],fe.prototype,"base_atp",null),we([v.f],fe.prototype,"shifta_factor",null),we([v.f],fe.prototype,"base_shifta_atp",null),we([v.n],fe.prototype,"weapons",void 0),we([v.n],fe.prototype,"armor_type",void 0),we([v.n],fe.prototype,"shield_type",void 0),we([v.n],fe.prototype,"enemy_dfp",void 0);const me=new fe;var ge=n("QCG5"),ke=n.n(ge),ye=n("z9pi"),Re=n.n(ye);class be extends i.PureComponent{render(){return o.a.createElement(ke.a,Object.assign({className:Re.a.main},this.props))}}let Ne=class extends i.Component{constructor(){super(...arguments),this.add_weapon=e=>{if(e){let t=_e.current.value.get_by_id(e.value);me.add_weapon(t)}},this.armor_changed=e=>{if(e){let t=_e.current.value.get_by_id(e.value);me.armor_type=t}else me.armor_type=void 0},this.shield_changed=e=>{if(e){let t=_e.current.value.get_by_id(e.value);me.shield_type=t}else me.shield_type=void 0}}render(){return o.a.createElement("section",null,o.a.createElement("section",null,o.a.createElement("div",null,"Weapons:"),o.a.createElement(be,{placeholder:"Add a weapon",value:void 0,options:me.weapon_types.map(e=>({label:e.name,value:e.id})),onChange:this.add_weapon}),o.a.createElement("table",null,o.a.createElement("thead",null,o.a.createElement("tr",null,o.a.createElement("td",null,"Weapon"),o.a.createElement("td",null,"Min. ATP"),o.a.createElement("td",null,"Max. ATP"),o.a.createElement("td",null,"Grind"),o.a.createElement("td",null,"Grind ATP"),o.a.createElement("td",null,"Shifta ATP"),o.a.createElement("td",null,"Final Min. ATP"),o.a.createElement("td",null,"Final Max. ATP"),o.a.createElement("td",null,"Min. Normal Damage"),o.a.createElement("td",null,"Max. Normal Damage"),o.a.createElement("td",null,"Avg. Normal Damage"),o.a.createElement("td",null,"Min. Heavy Damage"),o.a.createElement("td",null,"Max. Heavy Damage"),o.a.createElement("td",null,"Avg. Heavy Damage"))),o.a.createElement("tbody",null,me.weapons.map((e,t)=>o.a.createElement("tr",{key:t},o.a.createElement("td",null,e.item.type.name),o.a.createElement("td",null,e.item.type.min_atp),o.a.createElement("td",null,e.item.type.max_atp),o.a.createElement("td",null,o.a.createElement(te.a,{size:"small",value:e.item.grind,min:0,max:e.item.type.max_grind,step:1,onChange:t=>e.item.grind=t||0})),o.a.createElement("td",null,e.item.grind_atp),o.a.createElement("td",null,e.shifta_atp.toFixed(1)),o.a.createElement("td",null,e.final_min_atp.toFixed(1)),o.a.createElement("td",null,e.final_max_atp.toFixed(1)),o.a.createElement("td",null,e.min_normal_damage.toFixed(1)),o.a.createElement("td",null,e.max_normal_damage.toFixed(1)),o.a.createElement("td",null,e.avg_normal_damage.toFixed(1)),o.a.createElement("td",null,e.min_heavy_damage.toFixed(1)),o.a.createElement("td",null,e.max_heavy_damage.toFixed(1)),o.a.createElement("td",null,e.avg_heavy_damage.toFixed(1)))))),o.a.createElement("div",null,"Character ATP:"),o.a.createElement(te.a,{value:me.char_atp,min:0,step:1,onChange:e=>me.char_atp=e||0}),o.a.createElement("div",null,"MAG POW:"),o.a.createElement(te.a,{value:me.mag_pow,min:0,max:200,step:1,onChange:e=>me.mag_pow=e||0}),o.a.createElement("div",null,"Armor:"),o.a.createElement(be,{placeholder:"Choose an armor",value:me.armor_type&&me.armor_type.id,options:me.armor_types.map(e=>({label:e.name,value:e.id})),onChange:this.armor_changed}),o.a.createElement("span",null,"Armor ATP: ",me.armor_atp),o.a.createElement("div",null,"Shield:"),o.a.createElement(be,{placeholder:"Choose a shield",value:me.shield_type&&me.shield_type.id,options:me.shield_types.map(e=>({label:e.name,value:e.id})),onChange:this.shield_changed}),o.a.createElement("span",null,"Shield ATP: ",me.shield_atp),o.a.createElement("div",null,"Shifta level:"),o.a.createElement(te.a,{value:me.shifta_lvl,min:0,max:30,step:1,onChange:e=>me.shifta_lvl=e||0}),o.a.createElement("div",null,"Shifta factor:"),o.a.createElement("div",null,me.shifta_factor.toFixed(3)),o.a.createElement("div",null,"Base shifta ATP:"),o.a.createElement("div",null,me.base_shifta_atp.toFixed(2))))}};Ne=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([w.a],Ne);var Ee=n("+KLJ"),Te=n("Te0a"),Se=n.n(Te);class Oe extends i.Component{constructor(){super(...arguments),this.state={has_error:!1}}render(){return this.state.has_error?o.a.createElement("div",{className:Se.a.main},o.a.createElement("div",null,o.a.createElement(Ee.a,{type:"error",message:"Something went wrong."}))):this.props.children}static getDerivedStateFromError(){return{has_error:!0}}}function De(e){const t=t=>o.a.createElement(Oe,null,o.a.createElement(e,Object.assign({},t)));return t.displayName=`${e.displayName}ErrorBoundary`,t}var Pe=n("ZTPi"),Ce=n("PwrP"),Fe=n.n(Ce),We=n("kl6h"),Le=n("wd/R"),Ue=n.n(Le),Ae=n("c7k8"),Me=function(e,t,n,i){return new(n||(n=Promise))(function(o,r){function s(e){try{d(i.next(e))}catch(e){r(e)}}function a(e){try{d(i.throw(e))}catch(e){r(e)}}function d(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}d((i=i.apply(e,t||[])).next())})};const Ie=d.a.get("persistence/Persister");class Be{persist_for_server(e,t,n){this.persist(t+"."+W[e],n)}persist(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch(t){Ie.error(`Couldn't persist ${e}.`,t)}}load_for_server(e,t){return Me(this,void 0,void 0,function*(){return this.load(t+"."+W[e])})}load(e){return Me(this,void 0,void 0,function*(){try{const t=localStorage.getItem(e);return t&&JSON.parse(t)}catch(t){return void Ie.error(`Couldn't load ${e}.`,t)}})}}var xe=function(e,t,n,i){return new(n||(n=Promise))(function(o,r){function s(e){try{d(i.next(e))}catch(e){r(e)}}function a(e){try{d(i.throw(e))}catch(e){r(e)}}function d(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}d((i=i.apply(e,t||[])).next())})};const je="HuntMethodStore.methodUserTimes";const Ge=new class extends Be{persist_method_user_times(e,t){const n={};for(const t of e)null!=t.user_time&&(n[t.id]=t.user_time);this.persist_for_server(t,je,n)}load_method_user_times(e,t){return xe(this,void 0,void 0,function*(){const n=yield this.load_for_server(t,je);if(n)for(const t of e)t.user_time=n[t.id];return e})}};var Ke=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},ze=function(e,t,n,i){return new(n||(n=Promise))(function(o,r){function s(e){try{d(i.next(e))}catch(e){r(e)}}function a(e){try{d(i.throw(e))}catch(e){r(e)}}function d(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}d((i=i.apply(e,t||[])).next())})};const He=d.a.get("stores/HuntMethodStore");class Ve{constructor(){this.methods=new le(e=>new re([],()=>this.load_hunt_methods(e))),this.load_user_times=(e,t)=>ze(this,void 0,void 0,function*(){yield Ge.load_method_user_times(e,t),this.storage_disposer&&this.storage_disposer(),this.storage_disposer=Object(v.e)(()=>this.persist_user_times(e,t))}),this.persist_user_times=(e,t)=>{Ge.persist_method_user_times(e,t)}}load_hunt_methods(e){return ze(this,void 0,void 0,function*(){const t=yield fetch(`/assets/quests.${W[e].toLowerCase()}.json`),n=yield t.json(),i=new Array;for(const e of n){let t=0;const n=new Map;for(const[i,o]of Object.entries(e.enemyCounts)){const e=T.by_code(i);e?(n.set(e,o),t+=o):He.error(`No NpcType found for code ${i}.`)}switch(e.id){case 31:case 34:case 1305:case 1306:case 1307:case 313:case 314:continue}i.push(new q(`q${e.id}`,e.name,new J(e.id,e.name,e.episode,n),/^\d-\d.*/.test(e.name)?.75:t>400?.75:.5))}return yield this.load_user_times(i,e),i})}}Ke([v.n],Ve.prototype,"methods",void 0);const $e=new Ve;var qe=n("Oovq"),Je=n.n(qe);class Ye extends i.Component{constructor(){super(...arguments),this.sort_columns=new Array,this.column_width=({index:e})=>this.props.columns[e].width,this.cell_renderer=({columnIndex:e,rowIndex:t,style:n})=>{const i=this.props.columns[e];let r,s,a;const d=[Je.a.cell];if(e===this.props.columns.length-1&&d.push(Je.a.last_in_row),0===t){if(r=a=i.name,i.sortable){d.push(Je.a.sortable);const e=this.sort_columns[0];e&&e.column===i&&(s=e.direction===Ae.d.ASC?o.a.createElement("svg",{className:Je.a.sort_indictator,width:"18",height:"18",viewBox:"0 0 24 24"},o.a.createElement("path",{d:"M7 14l5-5 5 5z"}),o.a.createElement("path",{d:"M0 0h24v24H0z",fill:"none"})):o.a.createElement("svg",{className:Je.a.sort_indictator,width:"18",height:"18",viewBox:"0 0 24 24"},o.a.createElement("path",{d:"M7 10l5 5 5-5z"}),o.a.createElement("path",{d:"M0 0h24v24H0z",fill:"none"})))}}else if(i.class_name&&d.push(i.class_name),this.props.footer&&t===1+this.props.row_count)d.push(Je.a.footer_cell),r=null==i.footer_value?"":i.footer_value,a=null==i.footer_tooltip?"":i.footer_tooltip;else{const e=this.props.record({index:t-1});r=i.cell_renderer(e),i.tooltip&&(a=i.tooltip(e))}"string"!=typeof r&&d.push(Je.a.custom);const l=0===t&&i.sortable?()=>this.header_clicked(i):void 0;return o.a.createElement("div",{className:d.join(" "),key:`${e}, ${t}`,style:n,title:a,onClick:l},"string"==typeof r?o.a.createElement("span",{className:Je.a.cell_text},r):r,s)},this.header_clicked=e=>{const t=this.sort_columns.findIndex(t=>t.column===e);let n=-1===t?void 0:this.sort_columns.splice(t,1)[0];const i=0===t&&n&&n.direction===Ae.d.ASC?Ae.d.DESC:Ae.d.ASC;this.sort_columns.unshift({column:e,direction:i}),this.sort_columns.splice(10),this.props.sort&&this.props.sort(this.sort_columns)}}render(){return o.a.createElement("div",{className:Je.a.main,style:{width:this.props.width,height:this.props.height}},o.a.createElement(Ae.c,{width:this.props.width,height:this.props.height,rowHeight:26,rowCount:this.props.row_count+1+(this.props.footer?1:0),fixedRowCount:1,overscanRowCount:this.props.overscan_row_count,columnWidth:this.column_width,columnCount:this.props.columns.length,fixedColumnCount:this.props.fixed_column_count,overscanColumnCount:this.props.overscan_column_count,cellRenderer:this.cell_renderer,classNameTopLeftGrid:Je.a.header,classNameTopRightGrid:Je.a.header,updateTigger:this.props.update_trigger}))}}var Ze,Xe=n("teGJ"),Qe=n.n(Xe),et=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};let tt=Ze=class extends i.Component{constructor(){super(...arguments),this.record=({index:e})=>$e.methods.current.value[e],this.sort=e=>{const t=$e.methods.current.value.slice();t.sort((t,n)=>{for(const{column:i,direction:o}of e){let e=0;if("name"===i.key)e=t.name.localeCompare(n.name);else if("episode"===i.key)e=t.episode-n.episode;else if("time"===i.key)e=t.time-n.time;else if(i.key){const o=T.by_code(i.key);o&&(e=(t.enemy_counts.get(o)||0)-(n.enemy_counts.get(o)||0))}if(0!==e)return o===Ae.d.ASC?e:-e}return 0}),$e.methods.current.value=t}}render(){const e=$e.methods.current.value;return o.a.createElement("section",{className:Qe.a.main},o.a.createElement(Ae.a,null,({width:t,height:n})=>o.a.createElement(Ye,{width:t,height:n,row_count:e.length,columns:Ze.columns,fixed_column_count:3,record:this.record,sort:this.sort,update_trigger:$e.methods.current.value})))}};tt.columns=(()=>{const e=[{key:"name",name:"Method",width:250,cell_renderer:e=>e.name,sortable:!0},{key:"episode",name:"Ep.",width:34,cell_renderer:e=>L[e.episode],sortable:!0},{key:"time",name:"Time",width:50,cell_renderer:e=>o.a.createElement(nt,{method:e}),class_name:"integrated",sortable:!0}];for(const t of O)e.push({key:t.code,name:t.name,width:75,cell_renderer:e=>{const n=e.enemy_counts.get(t);return null==n?"":n.toString()},class_name:"number",sortable:!0});return e})(),tt=Ze=et([w.a],tt);let nt=class extends o.a.Component{constructor(){super(...arguments),this.change=e=>{this.props.method.user_time=e.hour()+e.minute()/60}}render(){const e=this.props.method.time,t=Math.floor(e),n=Math.round(60*(e-t));return o.a.createElement(We.a,{className:Qe.a.timepicker,value:Ue()({hour:t,minute:n}),format:"HH:mm",size:"small",allowClear:!1,suffixIcon:o.a.createElement("span",null),onChange:this.change})}};nt=et([w.a],nt);var it=n("lLyO"),ot=n.n(it),rt=function(e,t,n,i){return new(n||(n=Promise))(function(o,r){function s(e){try{d(i.next(e))}catch(e){r(e)}}function a(e){try{d(i.throw(e))}catch(e){r(e)}}function d(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}d((i=i.apply(e,t||[])).next())})};const st="HuntOptimizerStore.wantedItems";const at=new class extends Be{persist_wanted_items(e,t){this.persist_for_server(e,st,t.map(({item_type:e,amount:t})=>({itemTypeId:e.id,amount:t})))}load_wanted_items(e){return rt(this,void 0,void 0,function*(){const t=yield _e.get(e).promise,n=yield this.load_for_server(e,st),i=[];if(n)for(const{itemTypeId:e,itemKindId:o,amount:r}of n){const n=null!=e?t.get_by_id(e):t.get_by_id(o);n&&i.push(new ht(n,r))}return i})}};var dt=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},lt=function(e,t,n,i){return new(n||(n=Promise))(function(o,r){function s(e){try{d(i.next(e))}catch(e){r(e)}}function a(e){try{d(i.throw(e))}catch(e){r(e)}}function d(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}d((i=i.apply(e,t||[])).next())})};const ut=d.a.get("stores/ItemDropStore");class ct{constructor(){this.table=new Array(B.length*M.length*S.length),this.item_type_to_drops=[]}get_drop(e,t,n){return this.table[e*M.length*S.length+t*S.length+n.id]}set_drop(e,t,n,i){this.table[e*M.length*S.length+t*S.length+n.id]=i;let o=this.item_type_to_drops[i.item_type.id];o||(o=[],this.item_type_to_drops[i.item_type.id]=o),o.push(i)}get_drops_for_item_type(e){return this.item_type_to_drops[e]||[]}}class _t{constructor(){this.enemy_drops=new ct}}dt([v.n.ref],_t.prototype,"enemy_drops",void 0);const wt=new le(e=>{const t=new _t;return new re(t,()=>(function(e,t){return lt(this,void 0,void 0,function*(){const n=yield _e.current.promise,i=yield fetch(`/assets/enemyDrops.${W[t].toLowerCase()}.json`),o=yield i.json(),r=new ct;for(const e of o){const t=T.by_code(e.enemy);if(!t){ut.warn(`Couldn't determine NpcType of episode ${e.episode} ${e.enemy}.`);continue}const i=I[e.difficulty],o=n.get_by_id(e.itemTypeId);if(!o){ut.warn(`Couldn't find item kind ${e.itemTypeId}.`);continue}const s=A[e.sectionId];null!=s?r.set_drop(i,s,t,new $(i,s,t,o,e.dropRate,e.rareRate)):ut.warn(`Couldn't find section ID ${e.sectionId}.`)}return e.enemy_drops=r,e})})(t,e))});var vt=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},pt=function(e,t,n,i){return new(n||(n=Promise))(function(o,r){function s(e){try{d(i.next(e))}catch(e){r(e)}}function a(e){try{d(i.throw(e))}catch(e){r(e)}}function d(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}d((i=i.apply(e,t||[])).next())})};class ht{constructor(e,t){this.item_type=e,this.amount=t}}vt([v.n],ht.prototype,"item_type",void 0),vt([v.n],ht.prototype,"amount",void 0);class ft{constructor(e,t){this.wanted_items=e,this.optimal_methods=t}}class mt{constructor(e,t,n,i,o,r,s){this.difficulty=e,this.section_ids=t,this.method_name=n,this.method_episode=i,this.method_time=o,this.runs=r,this.total_time=r*o,this.item_counts=s}}class gt{constructor(){this.wanted_items=v.n.array(),this.optimize=()=>pt(this,void 0,void 0,function*(){if(!this.wanted_items.length)return void(this.result=void 0);const e=new Set(this.wanted_items.filter(e=>e.amount>0).map(e=>e.item_type)),t=yield $e.methods.current.promise,n=(yield wt.current.promise).enemy_drops,i={};for(const e of this.wanted_items)i[e.item_type.name]={min:e.amount};const o={},r=new Map;for(const i of t){const t=new Map;for(const[e,n]of i.enemy_counts.entries()){const i=t.get(e)||0;if(null==e.rare_type)t.set(e,i+n);else{let o,r;e.rare_type===T.Kondrieu?(o=1-F,r=F):(o=1-C,r=C),t.set(e,i+n*o),t.set(e.rare_type,(t.get(e.rare_type)||0)+n*r)}}const s=[t],a=t.get(T.PanArms);if(a){const e=new Map(t);e.delete(T.PanArms),e.set(T.Migium,a),e.set(T.Hidoom,a),s.push(e)}const d=t.get(T.PanArms2);if(d){const e=new Map(t);e.delete(T.PanArms2),e.set(T.Migium2,d),e.set(T.Hidoom2,d),s.push(e)}for(let t=0;t<s.length;t++){const a=s[t],d=1===t;for(const t of B)for(const s of M){const l={time:i.time};let u=!1;for(const[i,o]of a.entries()){const r=n.get_drop(t,s,i);if(r&&e.has(r.item_type)){const e=l[r.item_type.name]||0;l[r.item_type.name]=e+o*r.rate,u=!0}}if(u){const e=this.full_method_name(t,s,i,d);o[e]=l,r.set(e,{method:i,difficulty:t,section_id:s,split_pan_arms:d})}}}}const s=ot.a.Solve({optimize:"time",opType:"min",constraints:i,variables:o});if(!s.feasible)return void(this.result=void 0);const a=[];for(const[t,n]of Object.entries(s)){const i=r.get(t);if(i){const{method:r,difficulty:s,section_id:d,split_pan_arms:l}=i,u=n,c=o[t],_=new Map;for(const[t,n]of Object.entries(c))for(const i of e)if(t===i.name){_.set(i,u*n);break}const w=[];for(const e of M){let t=!0;if(e!==d){const n=o[this.full_method_name(s,e,r,l)];if(n){for(const e of Object.keys(c))if(c[e]!==n[e]){t=!1;break}}else t=!1}t&&w.push(e)}a.push(new mt(s,w,r.name+(l?" (Split Pan Arms)":""),r.episode,r.time,u,_))}}this.result=new ft([...e],a)}),this.initialize_persistence=()=>pt(this,void 0,void 0,function*(){this.wanted_items.replace(yield at.load_wanted_items(de.current_server)),Object(v.e)(()=>{at.persist_wanted_items(de.current_server,this.wanted_items)})}),this.initialize_persistence()}get huntable_item_types(){const e=wt.current.value;return _e.current.value.item_types.filter(t=>e.enemy_drops.get_drops_for_item_type(t.id).length)}full_method_name(e,t,n,i){let o=`${e}\t${t}\t${n.id}`;return i&&(o+="\tspa"),o}}vt([v.f],gt.prototype,"huntable_item_types",null),vt([v.n],gt.prototype,"wanted_items",void 0),vt([v.n],gt.prototype,"result",void 0);const kt=new gt;function yt({section_id:e,size:t=28,title:n}){return o.a.createElement("div",{title:n,style:{display:"inline-block",width:t,height:t,backgroundImage:`url(/assets/images/sectionids/${A[e]}.png)`,backgroundSize:t}})}var Rt=n("KkXH"),bt=n.n(Rt),Nt=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};let Et=class extends i.Component{constructor(){super(...arguments),this.record=({index:e})=>kt.result.optimal_methods[e]}get columns(){const e=kt.result,t=e?e.optimal_methods:[];let n=0,i=0;for(const e of t)n+=e.runs,i+=e.total_time;const r=[{name:"Difficulty",width:75,cell_renderer:e=>I[e.difficulty],footer_value:"Totals:"},{name:"Method",width:200,cell_renderer:e=>e.method_name,tooltip:e=>e.method_name},{name:"Ep.",width:34,cell_renderer:e=>L[e.method_episode]},{name:"Section ID",width:80,cell_renderer:e=>o.a.createElement("div",{className:bt.a.sid_col},e.section_ids.map(e=>o.a.createElement(yt,{section_id:e,key:e,size:20}))),tooltip:e=>e.section_ids.map(e=>A[e]).join(", ")},{name:"Time/Run",width:80,cell_renderer:e=>(function(e){const t=Math.floor(e),n=Math.round(60*(e-t));return`${t.toString().padStart(2,"0")}:${n.toString().padStart(2,"0")}`})(e.method_time),class_name:"number"},{name:"Runs",width:60,cell_renderer:e=>e.runs.toFixed(1),tooltip:e=>e.runs.toString(),footer_value:n.toFixed(1),footer_tooltip:n.toString(),class_name:"number"},{name:"Total Hours",width:90,cell_renderer:e=>e.total_time.toFixed(1),tooltip:e=>e.total_time.toString(),footer_value:i.toFixed(1),footer_tooltip:i.toString(),class_name:"number"}];if(e)for(const n of e.wanted_items){let e=0;for(const i of t)e+=i.item_counts.get(n)||0;r.push({name:n.name,width:80,cell_renderer:e=>{const t=e.item_counts.get(n);return t?t.toFixed(2):""},tooltip:e=>{const t=e.item_counts.get(n);return t?t.toString():""},class_name:"number",footer_value:e.toFixed(2),footer_tooltip:e.toString()})}return r}get update_trigger(){return kt.result}render(){this.update_trigger;const e=kt.result;return o.a.createElement("section",{className:bt.a.main},o.a.createElement("h3",null,"Optimization Result"),o.a.createElement("div",{className:bt.a.table},o.a.createElement(Ae.a,null,({width:t,height:n})=>o.a.createElement(Ye,{width:t,height:n,row_count:e?e.optimal_methods.length:0,columns:this.columns,fixed_column_count:4,record:this.record,footer:null!=e,update_trigger:this.update_trigger}))))}};Nt([v.f],Et.prototype,"columns",null),Nt([v.f],Et.prototype,"update_trigger",null),Et=Nt([w.a],Et);var Tt=n("1KOk"),St=n.n(Tt),Ot=n("2/Rp"),Dt=n("diRs"),Pt=n("JbQv"),Ct=n.n(Pt),Ft=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};let Wt=class extends i.Component{constructor(){super(...arguments),this.state={help_visible:!1},this.add_wanted=e=>{if(e){if(!kt.wanted_items.find(t=>t.item_type.id===e.value)){const t=_e.current.value.get_by_id(e.value);kt.wanted_items.push(new ht(t,1))}}},this.remove_wanted=e=>()=>{const t=kt.wanted_items.findIndex(t=>t===e);-1!==t&&kt.wanted_items.splice(t,1)},this.table_remove_cell_renderer=({rowData:e})=>o.a.createElement(Ot.a,{type:"link",icon:"delete",onClick:this.remove_wanted(e)}),this.no_rows_renderer=()=>o.a.createElement("div",{className:Ct.a.no_rows},o.a.createElement("p",null,'Add some items with the above drop down and click "Optimize" to see the result on the right.')),this.on_help_visible_change=e=>{this.setState({helpVisible:e})}}render(){return kt.wanted_items.slice(0,0),o.a.createElement("section",{className:Ct.a.main},o.a.createElement("h3",null,"Wanted Items",o.a.createElement(Dt.a,{content:o.a.createElement(Lt,null),trigger:"click",visible:this.state.help_visible,onVisibleChange:this.on_help_visible_change},o.a.createElement(Ot.a,{icon:"info-circle",type:"link"}))),o.a.createElement("div",{className:Ct.a.top_bar},o.a.createElement(be,{placeholder:"Add an item",value:void 0,style:{width:200},options:kt.huntable_item_types.map(e=>({label:e.name,value:e.id})),onChange:this.add_wanted}),o.a.createElement(Ot.a,{onClick:kt.optimize,style:{marginLeft:10}},"Optimize")),o.a.createElement("div",{className:Ct.a.table},o.a.createElement(Ae.a,null,({width:e,height:t})=>o.a.createElement(Ae.e,{width:e,height:t,headerHeight:30,rowHeight:30,rowCount:kt.wanted_items.length,rowGetter:({index:e})=>kt.wanted_items[e],noRowsRenderer:this.no_rows_renderer},o.a.createElement(Ae.b,{label:"Amount",dataKey:"amount",width:70,cellRenderer:({rowData:e})=>o.a.createElement(Ut,{wantedItem:e})}),o.a.createElement(Ae.b,{label:"Item",dataKey:"item",width:150,flexGrow:1,cellDataGetter:({rowData:e})=>e.item_type.name}),o.a.createElement(Ae.b,{dataKey:"remove",width:30,cellRenderer:this.table_remove_cell_renderer})))))}};function Lt(){return o.a.createElement("div",{className:Ct.a.help},o.a.createElement("p",null,'Add some items with the drop down and click "Optimize" to see the optimal combination of hunt methods on the right.'),o.a.createElement("p",null,'At the moment a 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.a.createElement("p",null,"Only enemy drops are considered. Box drops are coming."),o.a.createElement("p",null,"The optimal result is calculated using linear optimization. The optimizer takes rare enemies and the fact that pan arms can be split in two into account."))}Wt=Ft([w.a],Wt);let Ut=class extends i.Component{constructor(){super(...arguments),this.wanted_amount_changed=e=>{null!=e&&e>=0&&(this.props.wantedItem.amount=e)}}render(){const e=this.props.wantedItem;return o.a.createElement(te.a,{min:0,max:10,value:e.amount,onChange:this.wanted_amount_changed,size:"small",style:{width:"100%"}})}};function At(){return o.a.createElement("section",{className:St.a.main},o.a.createElement(Wt,null),o.a.createElement(Et,null))}Ut=Ft([w.a],Ut);const Mt=Pe.a.TabPane;var It=n("xGNL"),Bt=n.n(It),xt=function(e,t,n,i){return new(n||(n=Promise))(function(o,r){function s(e){try{d(i.next(e))}catch(e){r(e)}}function a(e){try{d(i.throw(e))}catch(e){r(e)}}function d(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}d((i=i.apply(e,t||[])).next())})};const jt="QuestEditorUiPersister.layout_config";const Gt=new class extends Be{constructor(){super(...arguments),this.persist_layout_config=Object(ne.throttle)(e=>{this.persist(jt,e)},500,{leading:!1,trailing:!0})}load_layout_config(e,t){return xt(this,void 0,void 0,function*(){const n=yield this.load(jt);return n&&this.verify_layout_config(n,e)?n:t})}verify_layout_config(e,t){const n=new Set(t);for(const t of e)if(!this.verify_layout_child(t,n,new Set,!0))return!1;return!0}verify_layout_child(e,t,n,i){if(!e)return!1;if("component"in e){if(!t.has(e.component))return!1;n.add(e.component)}if(e.content)for(const i of e.content)if(!this.verify_layout_child(i,t,n,!1))return!1;return!i||t.size===n.size}};var Kt,zt;!function(e){e[e.Little=0]="Little",e[e.Big=1]="Big"}(Kt||(Kt={}));class Ht{constructor(e,t){this._position=0,this.endianness=e,this.offset=t}get position(){return this._position}get endianness(){return this.little_endian?Kt.Little:Kt.Big}set endianness(e){this.little_endian=e===Kt.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 n=0;n<e;++n)t.push(this.dv.getUint8(this.offset+this._position++));return t}u16_array(e){this.check_size("n",e,2*e);const t=[];for(let n=0;n<e;++n)t.push(this.dv.getUint16(this.offset+this.position,this.little_endian)),this._position+=2;return t}u32_array(e){this.check_size("n",e,4*e);const t=[];for(let n=0;n<e;++n)t.push(this.dv.getUint32(this.offset+this.position,this.little_endian)),this._position+=4;return t}i32_array(e){this.check_size("n",e,4*e);const t=[];for(let n=0;n<e;++n)t.push(this.dv.getInt32(this.offset+this.position,this.little_endian)),this._position+=4;return t}vec2_f32(){return new p(this.f32(),this.f32())}vec3_f32(){return new h(this.f32(),this.f32(),this.f32())}string_ascii(e,t,n){let i=[];for(let o=0;o<e;o++){const r=this.u8();if(t&&0===r){n&&this.seek(e-o-1);break}i.push(r)}return String.fromCodePoint(...i)}string_utf16(e,t,n){let i=[],o=Math.floor(e/2);for(let e=0;e<o;e++){const r=this.u16();if(t&&0===r){n&&this.seek(2*(o-e-1));break}i.push(r)}return String.fromCodePoint(...i)}array_buffer(e=this.size-this.position){this.check_size("size",e,e);const t=this.backing_buffer.slice(this.offset+this.position,this.offset+this.position+e);return this._position+=e,t}copy_to_uint8_array(e,t=this.size-this.position){return this.check_size("size",t,t),e.set(new Uint8Array(this.backing_buffer,this.offset+this.position,t)),this._position+=t,this}check_size(e,t,n){if(n<0||n>this.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.`)}}class Vt extends Ht{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 n=0;n<t;n++)this.write_u16(e[n]);return this}write_u32_array(e){this.ensure_size(4*e.length);const t=e.length;for(let n=0;n<t;n++)this.write_u32(e[n]);return this}write_vec2_f32(e){return this.ensure_size(8),this.dv.setFloat32(this.position,e.x,this.little_endian),this.dv.setFloat32(this.position+4,e.y,this.little_endian),this._position+=8,this}write_vec3_f32(e){return this.ensure_size(12),this.dv.setFloat32(this.position,e.x,this.little_endian),this.dv.setFloat32(this.position+4,e.y,this.little_endian),this.dv.setFloat32(this.position+8,e.z,this.little_endian),this._position+=12,this}write_cursor(e){const t=e.size-e.position;return this.ensure_size(t),e.copy_to_uint8_array(new Uint8Array(this.backing_buffer,this.offset+this.position,t),t),this._position+=t,this}write_string_ascii(e,t){this.ensure_size(t);const n=Math.min(t,e.length);for(let t=0;t<n;t++)this.write_u8(e.codePointAt(t));let i=t-n;for(let e=0;e<i;e++)this.write_u8(0);return this}write_string_utf16(e,t){this.ensure_size(t);const n=Math.floor(t/2),i=Math.min(n,e.length);for(let t=0;t<i;t++)this.write_u16(e.codePointAt(t));let o=n-i;for(let e=0;e<o;e++)this.write_u16(0);return this}ensure_size(e){if(e>this.bytes_left)throw new Error(`${e} Bytes required but only ${this.bytes_left} available.`)}}class $t extends Vt{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}constructor(e,t,n=0,i=e.byteLength-n){super(t,n),this._size=i,this.backing_buffer=e,this.dv=new DataView(e,0,e.byteLength)}take(e){const t=this.offset+this.position,n=new $t(this.backing_buffer,this.endianness,t,e);return this._position+=e,n}}!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"}(zt||(zt={}));const qt={kind:zt.Any},Jt={kind:zt.Byte},Yt={kind:zt.Word},Zt={kind:zt.DWord},Xt={kind:zt.Float},Qt={kind:zt.Label},en={kind:zt.ILabel},tn={kind:zt.DLabel},nn={kind:zt.SLabel},on={kind:zt.String},rn={kind:zt.ILabelVar},sn={kind:zt.RegRef},an={kind:zt.RegRefVar},dn={kind:zt.Pointer},ln=-Math.pow(2,31),un=Math.pow(2,31)-1;Math.pow(2,32);var cn,_n;!function(e){e[e.Read=0]="Read",e[e.Write=1]="Write",e[e.ReadWrite=2]="ReadWrite"}(cn||(cn={}));class wn{constructor(e,t,n){this.type=e,this.doc=t,this.access=n}}!function(e){e[e.Push=0]="Push",e[e.Pop=1]="Pop"}(_n||(_n={}));const vn=[],pn=new Map;class hn{constructor(e,t,n,i,o){this.code=e,this.mnemonic=t,this.doc=n,this.size=this.code<256?1:2,this.params=i,this.stack=o}}hn.NOP=vn[0]=new hn(0,"nop","No operation, does nothing.",[],void 0),hn.RET=vn[1]=new hn(1,"ret","Returns control to caller.",[],void 0),hn.SYNC=vn[2]=new hn(2,"sync","Yields control for the rest of the current frame. Execution will continue the following frame.",[],void 0),hn.EXIT=vn[3]=new hn(3,"exit",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.THREAD=vn[4]=new hn(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 wn(en,void 0,void 0)],void 0),hn.VA_START=vn[5]=new hn(5,"va_start","Initializes a variable argument list.\nMake sure to call va_end after va_start and va_call.",[],void 0),hn.VA_END=vn[6]=new hn(6,"va_end","Restores the registers overwritten by arg_push* instructions.\nCalled after va_call.",[],void 0),hn.VA_CALL=vn[7]=new hn(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 wn(en,void 0,void 0)],void 0),hn.LET=vn[8]=new hn(8,"let","Sets the first register's value to second one's value.",[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.LETI=vn[9]=new hn(9,"leti","Sets a register to the given value.",[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0),new wn(Zt,void 0,void 0)],void 0),hn.LETB=vn[10]=new hn(10,"letb","Sets a register to the given value.",[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Jt,void 0,cn.Write)]},void 0,void 0),new wn(Jt,void 0,void 0)],void 0),hn.LETW=vn[11]=new hn(11,"letw","Sets a register to the given value.",[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Yt,void 0,cn.Write)]},void 0,void 0),new wn(Yt,void 0,void 0)],void 0),hn.LETA=vn[12]=new hn(12,"leta","Sets the first register to the memory address of the second register. Not used by Sega.",[new wn({kind:zt.RegTupRef,register_tuples:[new wn(dn,void 0,cn.Write)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.LETO=vn[13]=new hn(13,"leto","Sets a register to the memory address of the given label. Not used by Sega.",[new wn({kind:zt.RegTupRef,register_tuples:[new wn(dn,void 0,cn.Write)]},void 0,void 0),new wn(Qt,void 0,void 0)],void 0),hn.UNKNOWN_0E=vn[14]=new hn(14,"unknown_0e",void 0,[],void 0),hn.UNKNOWN_0F=vn[15]=new hn(15,"unknown_0f",void 0,[],void 0),hn.SET=vn[16]=new hn(16,"set","Sets a register to 1.",[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.CLEAR=vn[17]=new hn(17,"clear","Sets a register to 0.",[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.REV=vn[18]=new hn(18,"rev","Sets a register to 1 if its current value is 0, otherwise sets it to 0.",[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.ReadWrite)]},void 0,void 0)],void 0),hn.GSET=vn[19]=new hn(19,"gset",void 0,[new wn(Yt,void 0,void 0)],void 0),hn.GCLEAR=vn[20]=new hn(20,"gclear",void 0,[new wn(Yt,void 0,void 0)],void 0),hn.GREV=vn[21]=new hn(21,"grev",void 0,[new wn(Yt,void 0,void 0)],void 0),hn.GLET=vn[22]=new hn(22,"glet",void 0,[new wn(Yt,void 0,void 0)],void 0),hn.GGET=vn[23]=new hn(23,"gget","Sets a register to value of the given flag.",[new wn(Yt,void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Yt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.ADD=vn[24]=new hn(24,"add",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.ADDI=vn[25]=new hn(25,"addi",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0),new wn(Zt,void 0,void 0)],void 0),hn.SUB=vn[26]=new hn(26,"sub",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.SUBI=vn[27]=new hn(27,"subi",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0),new wn(Zt,void 0,void 0)],void 0),hn.MUL=vn[28]=new hn(28,"mul",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.MULI=vn[29]=new hn(29,"muli",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0),new wn(Zt,void 0,void 0)],void 0),hn.DIV=vn[30]=new hn(30,"div",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.DIVI=vn[31]=new hn(31,"divi",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0),new wn(Zt,void 0,void 0)],void 0),hn.AND=vn[32]=new hn(32,"and",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.ANDI=vn[33]=new hn(33,"andi",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0),new wn(Zt,void 0,void 0)],void 0),hn.OR=vn[34]=new hn(34,"or",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.ORI=vn[35]=new hn(35,"ori",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0),new wn(Zt,void 0,void 0)],void 0),hn.XOR=vn[36]=new hn(36,"xor",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.XORI=vn[37]=new hn(37,"xori",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0),new wn(Zt,void 0,void 0)],void 0),hn.MOD=vn[38]=new hn(38,"mod",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.MODI=vn[39]=new hn(39,"modi",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0),new wn(Zt,void 0,void 0)],void 0),hn.JMP=vn[40]=new hn(40,"jmp",void 0,[new wn(en,void 0,void 0)],void 0),hn.CALL=vn[41]=new hn(41,"call",void 0,[new wn(en,void 0,void 0)],void 0),hn.JMP_ON=vn[42]=new hn(42,"jmp_on",void 0,[new wn(en,void 0,void 0),new wn(an,void 0,cn.Read)],void 0),hn.JMP_OFF=vn[43]=new hn(43,"jmp_off",void 0,[new wn(en,void 0,void 0),new wn(an,void 0,cn.Read)],void 0),hn.JMP_E=vn[44]=new hn(44,"jmp_=",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0),new wn(en,void 0,void 0)],void 0),hn.JMPI_E=vn[45]=new hn(45,"jmpi_=",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read)]},void 0,void 0),new wn(Zt,void 0,void 0),new wn(en,void 0,void 0)],void 0),hn.JMP_NE=vn[46]=new hn(46,"jmp_!=",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0),new wn(en,void 0,void 0)],void 0),hn.JMPI_NE=vn[47]=new hn(47,"jmpi_!=",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read)]},void 0,void 0),new wn(Zt,void 0,void 0),new wn(en,void 0,void 0)],void 0),hn.UJMP_G=vn[48]=new hn(48,"ujmp_>",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read)]},void 0,void 0),new wn(en,void 0,void 0)],void 0),hn.UJMPI_G=vn[49]=new hn(49,"ujmpi_>",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read)]},void 0,void 0),new wn(Zt,void 0,void 0),new wn(en,void 0,void 0)],void 0),hn.JMP_G=vn[50]=new hn(50,"jmp_>",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read)]},void 0,void 0),new wn(en,void 0,void 0)],void 0),hn.JMPI_G=vn[51]=new hn(51,"jmpi_>",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read)]},void 0,void 0),new wn(Zt,void 0,void 0),new wn(en,void 0,void 0)],void 0),hn.UJMP_L=vn[52]=new hn(52,"ujmp_<",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read)]},void 0,void 0),new wn(en,void 0,void 0)],void 0),hn.UJMPI_L=vn[53]=new hn(53,"ujmpi_<",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read)]},void 0,void 0),new wn(Zt,void 0,void 0),new wn(en,void 0,void 0)],void 0),hn.JMP_L=vn[54]=new hn(54,"jmp_<",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read)]},void 0,void 0),new wn(en,void 0,void 0)],void 0),hn.JMPI_L=vn[55]=new hn(55,"jmpi_<",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read)]},void 0,void 0),new wn(Zt,void 0,void 0),new wn(en,void 0,void 0)],void 0),hn.UJMP_GE=vn[56]=new hn(56,"ujmp_>=",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read)]},void 0,void 0),new wn(en,void 0,void 0)],void 0),hn.UJMPI_GE=vn[57]=new hn(57,"ujmpi_>=",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read)]},void 0,void 0),new wn(Zt,void 0,void 0),new wn(en,void 0,void 0)],void 0),hn.JMP_GE=vn[58]=new hn(58,"jmp_>=",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read)]},void 0,void 0),new wn(en,void 0,void 0)],void 0),hn.JMPI_GE=vn[59]=new hn(59,"jmpi_>=",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read)]},void 0,void 0),new wn(Zt,void 0,void 0),new wn(en,void 0,void 0)],void 0),hn.UJMP_LE=vn[60]=new hn(60,"ujmp_<=",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read)]},void 0,void 0),new wn(en,void 0,void 0)],void 0),hn.UJMPI_LE=vn[61]=new hn(61,"ujmpi_<=",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read)]},void 0,void 0),new wn(Zt,void 0,void 0),new wn(en,void 0,void 0)],void 0),hn.JMP_LE=vn[62]=new hn(62,"jmp_<=",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read)]},void 0,void 0),new wn(en,void 0,void 0)],void 0),hn.JMPI_LE=vn[63]=new hn(63,"jmpi_<=",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read)]},void 0,void 0),new wn(Zt,void 0,void 0),new wn(en,void 0,void 0)],void 0),hn.SWITCH_JMP=vn[64]=new hn(64,"switch_jmp",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read)]},void 0,void 0),new wn(rn,void 0,void 0)],void 0),hn.SWITCH_CALL=vn[65]=new hn(65,"switch_call",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read)]},void 0,void 0),new wn(rn,void 0,void 0)],void 0),hn.STACK_PUSH=vn[66]=new hn(66,"stack_push",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.STACK_POP=vn[67]=new hn(67,"stack_pop",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.STACK_PUSHM=vn[68]=new hn(68,"stack_pushm","Pushes the values of an arbitrary amount of registers onto the stack.",[new wn(sn,void 0,cn.Read),new wn(Zt,void 0,void 0)],void 0),hn.STACK_POPM=vn[69]=new hn(69,"stack_popm","Pops an arbitrary amount of values from the stack and writes them to registers.",[new wn(sn,void 0,cn.Write),new wn(Zt,void 0,void 0)],void 0),hn.UNKNOWN_46=vn[70]=new hn(70,"unknown_46",void 0,[],void 0),hn.UNKNOWN_47=vn[71]=new hn(71,"unknown_47",void 0,[],void 0),hn.ARG_PUSHR=vn[72]=new hn(72,"arg_pushr","Pushes the value of the given register onto the stack.",[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0)],_n.Push),hn.ARG_PUSHL=vn[73]=new hn(73,"arg_pushl","Pushes the given value onto the stack.",[new wn(Zt,void 0,void 0)],_n.Push),hn.ARG_PUSHB=vn[74]=new hn(74,"arg_pushb","Pushes the given value onto the stack.",[new wn(Jt,void 0,void 0)],_n.Push),hn.ARG_PUSHW=vn[75]=new hn(75,"arg_pushw","Pushes the given value onto the stack.",[new wn(Yt,void 0,void 0)],_n.Push),hn.ARG_PUSHA=vn[76]=new hn(76,"arg_pusha","Pushes the memory address of the given register onto the stack. Not used by Sega.",[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0)],_n.Push),hn.ARG_PUSHO=vn[77]=new hn(77,"arg_pusho","Pushes the memory address of the given label onto the stack. Not used by Sega.",[new wn(Qt,void 0,void 0)],_n.Push),hn.ARG_PUSHS=vn[78]=new hn(78,"arg_pushs","Pushes the given value onto the stack.",[new wn(on,void 0,void 0)],_n.Push),hn.UNKNOWN_4F=vn[79]=new hn(79,"unknown_4f",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.MESSAGE=vn[80]=new hn(80,"message",void 0,[new wn(Zt,void 0,void 0),new wn(on,void 0,void 0)],_n.Pop),hn.LIST=vn[81]=new hn(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 wn({kind:zt.RegTupRef,register_tuples:[new wn(Jt,void 0,cn.Write)]},void 0,void 0),new wn(on,void 0,void 0)],_n.Pop),hn.FADEIN=vn[82]=new hn(82,"fadein",void 0,[],void 0),hn.FADEOUT=vn[83]=new hn(83,"fadeout",void 0,[],void 0),hn.SE=vn[84]=new hn(84,"se",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.BGM=vn[85]=new hn(85,"bgm",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.UNKNOWN_56=vn[86]=new hn(86,"unknown_56",void 0,[],void 0),hn.UNKNOWN_57=vn[87]=new hn(87,"unknown_57",void 0,[],void 0),hn.ENABLE=vn[88]=new hn(88,"enable",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.DISABLE=vn[89]=new hn(89,"disable",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.WINDOW_MSG=vn[90]=new hn(90,"window_msg",void 0,[new wn(on,void 0,void 0)],_n.Pop),hn.ADD_MSG=vn[91]=new hn(91,"add_msg",void 0,[new wn(on,void 0,void 0)],_n.Pop),hn.MESEND=vn[92]=new hn(92,"mesend",void 0,[],void 0),hn.GETTIME=vn[93]=new hn(93,"gettime",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.WINEND=vn[94]=new hn(94,"winend",void 0,[],void 0),hn.UNKNOWN_5F=vn[95]=new hn(95,"unknown_5f",void 0,[],void 0),hn.NPC_CRT_V3=vn[96]=new hn(96,"npc_crt_v3",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.NPC_STOP=vn[97]=new hn(97,"npc_stop",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.NPC_PLAY=vn[98]=new hn(98,"npc_play",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.NPC_KILL=vn[99]=new hn(99,"npc_kill",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.NPC_NONT=vn[100]=new hn(100,"npc_nont",void 0,[],void 0),hn.NPC_TALK=vn[101]=new hn(101,"npc_talk",void 0,[],void 0),hn.NPC_CRP_V3=vn[102]=new hn(102,"npc_crp_v3",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read),new wn(qt,void 0,cn.Read),new wn(qt,void 0,cn.Read),new wn(en,void 0,cn.Read),new wn(qt,void 0,cn.Read),new wn(qt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.UNKNOWN_67=vn[103]=new hn(103,"unknown_67",void 0,[],void 0),hn.CREATE_PIPE=vn[104]=new hn(104,"create_pipe",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.P_HPSTAT_V3=vn[105]=new hn(105,"p_hpstat_v3",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0),new wn(Zt,void 0,void 0)],_n.Pop),hn.P_DEAD_V3=vn[106]=new hn(106,"p_dead_v3",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0),new wn(Zt,"Player slot.",void 0)],_n.Pop),hn.P_DISABLEWARP=vn[107]=new hn(107,"p_disablewarp",void 0,[],void 0),hn.P_ENABLEWARP=vn[108]=new hn(108,"p_enablewarp",void 0,[],void 0),hn.P_MOVE_V3=vn[109]=new hn(109,"p_move_v3",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.P_LOOK=vn[110]=new hn(110,"p_look",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.UNKNOWN_6F=vn[111]=new hn(111,"unknown_6f",void 0,[],void 0),hn.P_ACTION_DISABLE=vn[112]=new hn(112,"p_action_disable",void 0,[],void 0),hn.P_ACTION_ENABLE=vn[113]=new hn(113,"p_action_enable",void 0,[],void 0),hn.DISABLE_MOVEMENT1=vn[114]=new hn(114,"disable_movement1",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.ENABLE_MOVEMENT1=vn[115]=new hn(115,"enable_movement1",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.P_NONCOL=vn[116]=new hn(116,"p_noncol",void 0,[],void 0),hn.P_COL=vn[117]=new hn(117,"p_col",void 0,[],void 0),hn.P_SETPOS=vn[118]=new hn(118,"p_setpos","Sets a player's position.",[new wn(Zt,"Player slot.",void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,"X coordinate.",cn.Read),new wn(Zt,"Y coordinate.",cn.Read),new wn(Zt,"Z coordinate.",cn.Read),new wn(Zt,"Y-axis rotation.",cn.Read)]},void 0,void 0)],_n.Pop),hn.P_RETURN_GUILD=vn[119]=new hn(119,"p_return_guild",void 0,[],void 0),hn.P_TALK_GUILD=vn[120]=new hn(120,"p_talk_guild",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.NPC_TALK_PL_V3=vn[121]=new hn(121,"npc_talk_pl_v3",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.NPC_TALK_KILL=vn[122]=new hn(122,"npc_talk_kill",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.NPC_CRTPK_V3=vn[123]=new hn(123,"npc_crtpk_v3",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.NPC_CRPPK_V3=vn[124]=new hn(124,"npc_crppk_v3",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.NPC_CRPTALK_V3=vn[125]=new hn(125,"npc_crptalk_v3",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.P_LOOK_AT_V1=vn[126]=new hn(126,"p_look_at_v1",void 0,[new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0)],_n.Pop),hn.NPC_CRP_ID_V3=vn[127]=new hn(127,"npc_crp_id_v3",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.CAM_QUAKE=vn[128]=new hn(128,"cam_quake",void 0,[],void 0),hn.CAM_ADJ=vn[129]=new hn(129,"cam_adj",void 0,[],void 0),hn.CAM_ZMIN=vn[130]=new hn(130,"cam_zmin",void 0,[],void 0),hn.CAM_ZMOUT=vn[131]=new hn(131,"cam_zmout",void 0,[],void 0),hn.CAM_PAN_V3=vn[132]=new hn(132,"cam_pan_v3",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read),new wn(Zt,void 0,cn.Read),new wn(Zt,void 0,cn.Read),new wn(Zt,void 0,cn.Read),new wn(Zt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.GAME_LEV_SUPER=vn[133]=new hn(133,"game_lev_super",void 0,[],void 0),hn.GAME_LEV_RESET=vn[134]=new hn(134,"game_lev_reset",void 0,[],void 0),hn.POS_PIPE_V3=vn[135]=new hn(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 wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,"X coordinate.",cn.Read),new wn(Zt,"Y coordinate.",cn.Read),new wn(Zt,"Z coordinate.",cn.Read),new wn(Zt,"Player slot.",cn.Read)]},void 0,void 0)],void 0),hn.IF_ZONE_CLEAR=vn[136]=new hn(136,"if_zone_clear",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read),new wn(Zt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.CHK_ENE_NUM=vn[137]=new hn(137,"chk_ene_num","Retrieves the amount of enemies killed during the quest.",[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.UNHIDE_OBJ=vn[138]=new hn(138,"unhide_obj",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read),new wn(Zt,void 0,cn.Read),new wn(Zt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.UNHIDE_ENE=vn[139]=new hn(139,"unhide_ene",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read),new wn(Zt,void 0,cn.Read),new wn(Zt,void 0,cn.Read),new wn(Zt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.AT_COORDS_CALL=vn[140]=new hn(140,"at_coords_call",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read),new wn(Zt,void 0,cn.Read),new wn(Zt,void 0,cn.Read),new wn(Zt,void 0,cn.Read),new wn(en,void 0,cn.Read)]},void 0,void 0)],void 0),hn.AT_COORDS_TALK=vn[141]=new hn(141,"at_coords_talk",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read),new wn(Zt,void 0,cn.Read),new wn(Zt,void 0,cn.Read),new wn(Zt,void 0,cn.Read),new wn(en,void 0,cn.Read)]},void 0,void 0)],void 0),hn.COL_NPCIN=vn[142]=new hn(142,"col_npcin",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read),new wn(Zt,void 0,cn.Read),new wn(Zt,void 0,cn.Read),new wn(Zt,void 0,cn.Read),new wn(en,void 0,cn.Read)]},void 0,void 0)],void 0),hn.COL_NPCINR=vn[143]=new hn(143,"col_npcinr",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.SWITCH_ON=vn[144]=new hn(144,"switch_on",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.SWITCH_OFF=vn[145]=new hn(145,"switch_off",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.PLAYBGM_EPI=vn[146]=new hn(146,"playbgm_epi",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.SET_MAINWARP=vn[147]=new hn(147,"set_mainwarp",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.SET_OBJ_PARAM=vn[148]=new hn(148,"set_obj_param","Creates a targetable object.",[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,"X coordinate.",cn.Read),new wn(Zt,"Y coordinate.",cn.Read),new wn(Zt,"Z coordinate.",cn.Read),new wn(Zt,"Collision radius.",cn.Read),new wn(en,"Function label.",cn.Read),new wn(Zt,"Vertical position of the cursor.",cn.Read)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Write)]},"Object handle.",void 0)],void 0),hn.SET_FLOOR_HANDLER=vn[149]=new hn(149,"set_floor_handler",void 0,[new wn(Zt,"Floor number.",void 0),new wn(en,"Handler function label.",void 0)],_n.Pop),hn.CLR_FLOOR_HANDLER=vn[150]=new hn(150,"clr_floor_handler",void 0,[new wn(Zt,"Floor number.",void 0)],_n.Pop),hn.COL_PLINAW=vn[151]=new hn(151,"col_plinaw",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.HUD_HIDE=vn[152]=new hn(152,"hud_hide",void 0,[],void 0),hn.HUD_SHOW=vn[153]=new hn(153,"hud_show",void 0,[],void 0),hn.CINE_ENABLE=vn[154]=new hn(154,"cine_enable",void 0,[],void 0),hn.CINE_DISABLE=vn[155]=new hn(155,"cine_disable",void 0,[],void 0),hn.UNKNOWN_9C=vn[156]=new hn(156,"unknown_9c",void 0,[],void 0),hn.UNKNOWN_9D=vn[157]=new hn(157,"unknown_9d",void 0,[],void 0),hn.UNKNOWN_9E=vn[158]=new hn(158,"unknown_9e",void 0,[],void 0),hn.UNKNOWN_9F=vn[159]=new hn(159,"unknown_9f",void 0,[],void 0),hn.UNKNOWN_A0=vn[160]=new hn(160,"unknown_a0",void 0,[],void 0),hn.SET_QT_FAILURE=vn[161]=new hn(161,"set_qt_failure",void 0,[new wn(en,void 0,void 0)],void 0),hn.SET_QT_SUCCESS=vn[162]=new hn(162,"set_qt_success",void 0,[new wn(en,void 0,void 0)],void 0),hn.CLR_QT_FAILURE=vn[163]=new hn(163,"clr_qt_failure",void 0,[],void 0),hn.CLR_QT_SUCCESS=vn[164]=new hn(164,"clr_qt_success",void 0,[],void 0),hn.SET_QT_CANCEL=vn[165]=new hn(165,"set_qt_cancel",void 0,[new wn(en,void 0,void 0)],void 0),hn.CLR_QT_CANCEL=vn[166]=new hn(166,"clr_qt_cancel",void 0,[],void 0),hn.UNKNOWN_A7=vn[167]=new hn(167,"unknown_a7",void 0,[],void 0),hn.PL_WALK_V3=vn[168]=new hn(168,"pl_walk_v3",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.UNKNOWN_A9=vn[169]=new hn(169,"unknown_a9",void 0,[],void 0),hn.UNKNOWN_AA=vn[170]=new hn(170,"unknown_aa",void 0,[],void 0),hn.UNKNOWN_AB=vn[171]=new hn(171,"unknown_ab",void 0,[],void 0),hn.UNKNOWN_AC=vn[172]=new hn(172,"unknown_ac",void 0,[],void 0),hn.UNKNOWN_AD=vn[173]=new hn(173,"unknown_ad",void 0,[],void 0),hn.UNKNOWN_AE=vn[174]=new hn(174,"unknown_ae",void 0,[],void 0),hn.UNKNOWN_AF=vn[175]=new hn(175,"unknown_af",void 0,[],void 0),hn.PL_ADD_MESETA=vn[176]=new hn(176,"pl_add_meseta",void 0,[new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0)],_n.Pop),hn.THREAD_STG=vn[177]=new hn(177,"thread_stg",void 0,[new wn(en,void 0,void 0)],void 0),hn.DEL_OBJ_PARAM=vn[178]=new hn(178,"del_obj_param",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},"Object handle.",void 0)],void 0),hn.ITEM_CREATE=vn[179]=new hn(179,"item_create",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.ITEM_CREATE2=vn[180]=new hn(180,"item_create2",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.ITEM_DELETE=vn[181]=new hn(181,"item_delete",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.ITEM_DELETE2=vn[182]=new hn(182,"item_delete2","Deletes an item from the player's inventory.",[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read),new wn(Zt,void 0,cn.Read),new wn(Zt,void 0,cn.Read)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.ITEM_CHECK=vn[183]=new hn(183,"item_check",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.SETEVT=vn[184]=new hn(184,"setevt",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.GET_DIFFLVL=vn[185]=new hn(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 wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.SET_QT_EXIT=vn[186]=new hn(186,"set_qt_exit",void 0,[new wn(en,void 0,void 0)],void 0),hn.CLR_QT_EXIT=vn[187]=new hn(187,"clr_qt_exit",void 0,[],void 0),hn.UNKNOWN_BC=vn[188]=new hn(188,"unknown_bc",void 0,[],void 0),hn.UNKNOWN_BD=vn[189]=new hn(189,"unknown_bd",void 0,[],void 0),hn.UNKNOWN_BE=vn[190]=new hn(190,"unknown_be",void 0,[],void 0),hn.UNKNOWN_BF=vn[191]=new hn(191,"unknown_bf",void 0,[],void 0),hn.PARTICLE_V3=vn[192]=new hn(192,"particle_v3",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.NPC_TEXT=vn[193]=new hn(193,"npc_text",void 0,[new wn(Zt,void 0,void 0),new wn(on,void 0,void 0)],_n.Pop),hn.NPC_CHKWARP=vn[194]=new hn(194,"npc_chkwarp",void 0,[],void 0),hn.PL_PKOFF=vn[195]=new hn(195,"pl_pkoff",void 0,[],void 0),hn.MAP_DESIGNATE=vn[196]=new hn(196,"map_designate",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.MASTERKEY_ON=vn[197]=new hn(197,"masterkey_on",void 0,[],void 0),hn.MASTERKEY_OFF=vn[198]=new hn(198,"masterkey_off",void 0,[],void 0),hn.WINDOW_TIME=vn[199]=new hn(199,"window_time",void 0,[],void 0),hn.WINEND_TIME=vn[200]=new hn(200,"winend_time",void 0,[],void 0),hn.WINSET_TIME=vn[201]=new hn(201,"winset_time",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.GETMTIME=vn[202]=new hn(202,"getmtime",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.SET_QUEST_BOARD_HANDLER=vn[203]=new hn(203,"set_quest_board_handler",void 0,[new wn(Zt,void 0,void 0),new wn(en,void 0,void 0),new wn(on,void 0,void 0)],_n.Pop),hn.CLEAR_QUEST_BOARD_HANDLER=vn[204]=new hn(204,"clear_quest_board_handler",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.PARTICLE_ID_V3=vn[205]=new hn(205,"particle_id_v3",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read),new wn(Zt,void 0,cn.Read),new wn(Zt,void 0,cn.Read),new wn(Zt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.NPC_CRPTALK_ID_V3=vn[206]=new hn(206,"npc_crptalk_id_v3",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.NPC_LANG_CLEAN=vn[207]=new hn(207,"npc_lang_clean",void 0,[],void 0),hn.PL_PKON=vn[208]=new hn(208,"pl_pkon",void 0,[],void 0),hn.PL_CHK_ITEM2=vn[209]=new hn(209,"pl_chk_item2",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.ENABLE_MAINMENU=vn[210]=new hn(210,"enable_mainmenu",void 0,[],void 0),hn.DISABLE_MAINMENU=vn[211]=new hn(211,"disable_mainmenu",void 0,[],void 0),hn.START_BATTLEBGM=vn[212]=new hn(212,"start_battlebgm",void 0,[],void 0),hn.END_BATTLEBGM=vn[213]=new hn(213,"end_battlebgm",void 0,[],void 0),hn.DISP_MSG_QB=vn[214]=new hn(214,"disp_msg_qb",void 0,[new wn(on,void 0,void 0)],_n.Pop),hn.CLOSE_MSG_QB=vn[215]=new hn(215,"close_msg_qb",void 0,[],void 0),hn.SET_EVENTFLAG_V3=vn[216]=new hn(216,"set_eventflag_v3",void 0,[new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0)],_n.Pop),hn.SYNC_LETI=vn[217]=new hn(217,"sync_leti",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0),new wn(Zt,void 0,void 0)],void 0),hn.SET_RETURNHUNTER=vn[218]=new hn(218,"set_returnhunter",void 0,[],void 0),hn.SET_RETURNCITY=vn[219]=new hn(219,"set_returncity",void 0,[],void 0),hn.LOAD_PVR=vn[220]=new hn(220,"load_pvr",void 0,[],void 0),hn.LOAD_MIDI=vn[221]=new hn(221,"load_midi",void 0,[],void 0),hn.UNKNOWN_DE=vn[222]=new hn(222,"unknown_de",void 0,[],void 0),hn.NPC_PARAM_V3=vn[223]=new hn(223,"npc_param_v3",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0),new wn(Zt,void 0,void 0)],_n.Pop),hn.PAD_DRAGON=vn[224]=new hn(224,"pad_dragon",void 0,[],void 0),hn.CLEAR_MAINWARP=vn[225]=new hn(225,"clear_mainwarp",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.PCAM_PARAM_V3=vn[226]=new hn(226,"pcam_param_v3",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.START_SETEVT_V3=vn[227]=new hn(227,"start_setevt_v3",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0),new wn(Zt,void 0,void 0)],_n.Pop),hn.WARP_ON=vn[228]=new hn(228,"warp_on",void 0,[],void 0),hn.WARP_OFF=vn[229]=new hn(229,"warp_off",void 0,[],void 0),hn.GET_SLOTNUMBER=vn[230]=new hn(230,"get_slotnumber",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.GET_SERVERNUMBER=vn[231]=new hn(231,"get_servernumber",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.SET_EVENTFLAG2=vn[232]=new hn(232,"set_eventflag2",void 0,[new wn(Zt,void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0)],_n.Pop),hn.RES=vn[233]=new hn(233,"res",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.UNKNOWN_EA=vn[234]=new hn(234,"unknown_ea",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0),new wn(Zt,void 0,void 0)],void 0),hn.ENABLE_BGMCTRL=vn[235]=new hn(235,"enable_bgmctrl",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.SW_SEND=vn[236]=new hn(236,"sw_send",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.CREATE_BGMCTRL=vn[237]=new hn(237,"create_bgmctrl",void 0,[],void 0),hn.PL_ADD_MESETA2=vn[238]=new hn(238,"pl_add_meseta2",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.SYNC_REGISTER=vn[239]=new hn(239,"sync_register",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0),new wn(Zt,void 0,void 0)],_n.Pop),hn.SEND_REGWORK=vn[240]=new hn(240,"send_regwork",void 0,[],void 0),hn.LETI_FIXED_CAMERA_V3=vn[241]=new hn(241,"leti_fixed_camera_v3",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read),new wn(Zt,void 0,cn.Read),new wn(Zt,void 0,cn.Read),new wn(Zt,void 0,cn.Read),new wn(Zt,void 0,cn.Read),new wn(Zt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.DEFAULT_CAMERA_POS1=vn[242]=new hn(242,"default_camera_pos1",void 0,[],void 0),hn.UNKNOWN_F3=vn[243]=new hn(243,"unknown_f3",void 0,[],void 0),hn.UNKNOWN_F4=vn[244]=new hn(244,"unknown_f4",void 0,[],void 0),hn.UNKNOWN_F5=vn[245]=new hn(245,"unknown_f5",void 0,[],void 0),hn.UNKNOWN_F6=vn[246]=new hn(246,"unknown_f6",void 0,[],void 0),hn.UNKNOWN_F7=vn[247]=new hn(247,"unknown_f7",void 0,[],void 0),hn.UNKNOWN_F8=vn[248]=new hn(248,"unknown_f8",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.UNKNOWN_F9=vn[249]=new hn(249,"unknown_f9",void 0,[],void 0),hn.GET_GC_NUMBER=vn[250]=new hn(250,"get_gc_number",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.UNKNOWN_FB=vn[251]=new hn(251,"unknown_fb",void 0,[new wn(Yt,void 0,void 0)],void 0),hn.UNKNOWN_FC=vn[252]=new hn(252,"unknown_fc",void 0,[],void 0),hn.UNKNOWN_FD=vn[253]=new hn(253,"unknown_fd",void 0,[],void 0),hn.UNKNOWN_FE=vn[254]=new hn(254,"unknown_fe",void 0,[],void 0),hn.UNKNOWN_FF=vn[255]=new hn(255,"unknown_ff",void 0,[],void 0),hn.UNKNOWN_F800=vn[63488]=new hn(63488,"unknown_f800",void 0,[],void 0),hn.SET_CHAT_CALLBACK=vn[63489]=new hn(63489,"set_chat_callback",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0),new wn(on,void 0,void 0)],_n.Pop),hn.UNKNOWN_F802=vn[63490]=new hn(63490,"unknown_f802",void 0,[],void 0),hn.UNKNOWN_F803=vn[63491]=new hn(63491,"unknown_f803",void 0,[],void 0),hn.UNKNOWN_F804=vn[63492]=new hn(63492,"unknown_f804",void 0,[],void 0),hn.UNKNOWN_F805=vn[63493]=new hn(63493,"unknown_f805",void 0,[],void 0),hn.UNKNOWN_F806=vn[63494]=new hn(63494,"unknown_f806",void 0,[],void 0),hn.UNKNOWN_F807=vn[63495]=new hn(63495,"unknown_f807",void 0,[],void 0),hn.GET_DIFFICULTY_LEVEL2=vn[63496]=new hn(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 wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.GET_NUMBER_OF_PLAYER1=vn[63497]=new hn(63497,"get_number_of_player1","Set the given register to the current number of players. Either 1, 2, 3 or 4.",[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.GET_COORD_OF_PLAYER=vn[63498]=new hn(63498,"get_coord_of_player","Retrieves a player's position.",[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,"X coordinate.",cn.Write),new wn(Zt,"Y coordinate.",cn.Write),new wn(Zt,"Z coordinate.",cn.Write)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,"Player slot.",cn.Read)]},void 0,void 0)],void 0),hn.ENABLE_MAP=vn[63499]=new hn(63499,"enable_map",void 0,[],void 0),hn.DISABLE_MAP=vn[63500]=new hn(63500,"disable_map",void 0,[],void 0),hn.MAP_DESIGNATE_EX=vn[63501]=new hn(63501,"map_designate_ex",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read),new wn(Zt,void 0,cn.Read),new wn(Zt,void 0,cn.Read),new wn(Zt,void 0,cn.Read),new wn(Zt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.UNKNOWN_F80E=vn[63502]=new hn(63502,"unknown_f80e",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.UNKNOWN_F80F=vn[63503]=new hn(63503,"unknown_f80f",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.BA_INITIAL_FLOOR=vn[63504]=new hn(63504,"ba_initial_floor",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.SET_BA_RULES=vn[63505]=new hn(63505,"set_ba_rules",void 0,[],void 0),hn.UNKNOWN_F812=vn[63506]=new hn(63506,"unknown_f812",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.UNKNOWN_F813=vn[63507]=new hn(63507,"unknown_f813",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.UNKNOWN_F814=vn[63508]=new hn(63508,"unknown_f814",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.UNKNOWN_F815=vn[63509]=new hn(63509,"unknown_f815",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.UNKNOWN_F816=vn[63510]=new hn(63510,"unknown_f816",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.UNKNOWN_F817=vn[63511]=new hn(63511,"unknown_f817",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.UNKNOWN_F818=vn[63512]=new hn(63512,"unknown_f818",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.UNKNOWN_F819=vn[63513]=new hn(63513,"unknown_f819",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.UNKNOWN_F81A=vn[63514]=new hn(63514,"unknown_f81a",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.UNKNOWN_F81B=vn[63515]=new hn(63515,"unknown_f81b",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.BA_DISP_MSG=vn[63516]=new hn(63516,"ba_disp_msg",void 0,[new wn(on,void 0,void 0)],_n.Pop),hn.DEATH_LVL_UP=vn[63517]=new hn(63517,"death_lvl_up",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.DEATH_TECH_LVL_UP=vn[63518]=new hn(63518,"death_tech_lvl_up",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.UNKNOWN_F81F=vn[63519]=new hn(63519,"unknown_f81f",void 0,[],void 0),hn.CMODE_STAGE=vn[63520]=new hn(63520,"cmode_stage",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.UNKNOWN_F821=vn[63521]=new hn(63521,"unknown_f821",void 0,[],void 0),hn.UNKNOWN_F822=vn[63522]=new hn(63522,"unknown_f822",void 0,[],void 0),hn.UNKNOWN_F823=vn[63523]=new hn(63523,"unknown_f823",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.UNKNOWN_F824=vn[63524]=new hn(63524,"unknown_f824",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.EXP_MULTIPLICATION=vn[63525]=new hn(63525,"exp_multiplication",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.EXP_DIVISION=vn[63526]=new hn(63526,"exp_division",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.GET_USER_IS_DEAD=vn[63527]=new hn(63527,"get_user_is_dead",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.GO_FLOOR=vn[63528]=new hn(63528,"go_floor","Sends a player to the given floor.",[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,"Player slot.",cn.Read)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,"Floor ID.",cn.Read)]},void 0,void 0)],void 0),hn.UNKNOWN_F829=vn[63529]=new hn(63529,"unknown_f829",void 0,[],void 0),hn.UNKNOWN_F82A=vn[63530]=new hn(63530,"unknown_f82a",void 0,[],void 0),hn.UNLOCK_DOOR2=vn[63531]=new hn(63531,"unlock_door2",void 0,[new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0)],_n.Pop),hn.LOCK_DOOR2=vn[63532]=new hn(63532,"lock_door2",void 0,[new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0)],_n.Pop),hn.IF_SWITCH_NOT_PRESSED=vn[63533]=new hn(63533,"if_switch_not_pressed",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read),new wn(Zt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.IF_SWITCH_PRESSED=vn[63534]=new hn(63534,"if_switch_pressed",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,"Floor ID.",cn.Read),new wn(Zt,"Switch ID.",cn.Read),new wn(Zt,"Will be set to 1 if the switch is pressed, 0 otherwise.",cn.Write)]},void 0,void 0)],void 0),hn.UNKNOWN_F82F=vn[63535]=new hn(63535,"unknown_f82f",void 0,[new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0)],_n.Pop),hn.CONTROL_DRAGON=vn[63536]=new hn(63536,"control_dragon",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.RELEASE_DRAGON=vn[63537]=new hn(63537,"release_dragon",void 0,[],void 0),hn.UNKNOWN_F832=vn[63538]=new hn(63538,"unknown_f832",void 0,[],void 0),hn.UNKNOWN_F833=vn[63539]=new hn(63539,"unknown_f833",void 0,[],void 0),hn.UNKNOWN_F834=vn[63540]=new hn(63540,"unknown_f834",void 0,[],void 0),hn.UNKNOWN_F835=vn[63541]=new hn(63541,"unknown_f835",void 0,[],void 0),hn.UNKNOWN_F836=vn[63542]=new hn(63542,"unknown_f836",void 0,[],void 0),hn.UNKNOWN_F837=vn[63543]=new hn(63543,"unknown_f837",void 0,[],void 0),hn.SHRINK=vn[63544]=new hn(63544,"shrink",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,"Player slot.",cn.Read)]},void 0,void 0)],void 0),hn.UNSHRINK=vn[63545]=new hn(63545,"unshrink",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,"Player slot.",cn.Read)]},void 0,void 0)],void 0),hn.UNKNOWN_F83A=vn[63546]=new hn(63546,"unknown_f83a",void 0,[],void 0),hn.UNKNOWN_F83B=vn[63547]=new hn(63547,"unknown_f83b",void 0,[],void 0),hn.DISPLAY_CLOCK2=vn[63548]=new hn(63548,"display_clock2",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.UNKNOWN_F83D=vn[63549]=new hn(63549,"unknown_f83d",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.DELETE_AREA_TITLE=vn[63550]=new hn(63550,"delete_area_title",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.UNKNOWN_F83F=vn[63551]=new hn(63551,"unknown_f83f",void 0,[],void 0),hn.LOAD_NPC_DATA=vn[63552]=new hn(63552,"load_npc_data",void 0,[],void 0),hn.GET_NPC_DATA=vn[63553]=new hn(63553,"get_npc_data",void 0,[new wn(tn,void 0,void 0)],void 0),hn.UNKNOWN_F842=vn[63554]=new hn(63554,"unknown_f842",void 0,[],void 0),hn.UNKNOWN_F843=vn[63555]=new hn(63555,"unknown_f843",void 0,[],void 0),hn.UNKNOWN_F844=vn[63556]=new hn(63556,"unknown_f844",void 0,[],void 0),hn.UNKNOWN_F845=vn[63557]=new hn(63557,"unknown_f845",void 0,[],void 0),hn.UNKNOWN_F846=vn[63558]=new hn(63558,"unknown_f846",void 0,[],void 0),hn.UNKNOWN_F847=vn[63559]=new hn(63559,"unknown_f847",void 0,[],void 0),hn.GIVE_DAMAGE_SCORE=vn[63560]=new hn(63560,"give_damage_score",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.TAKE_DAMAGE_SCORE=vn[63561]=new hn(63561,"take_damage_score",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.UNK_SCORE_F84A=vn[63562]=new hn(63562,"unk_score_f84a",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.UNK_SCORE_F84B=vn[63563]=new hn(63563,"unk_score_f84b",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.KILL_SCORE=vn[63564]=new hn(63564,"kill_score",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.DEATH_SCORE=vn[63565]=new hn(63565,"death_score",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.UNK_SCORE_F84E=vn[63566]=new hn(63566,"unk_score_f84e",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.ENEMY_DEATH_SCORE=vn[63567]=new hn(63567,"enemy_death_score",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.MESETA_SCORE=vn[63568]=new hn(63568,"meseta_score",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.UNKNOWN_F851=vn[63569]=new hn(63569,"unknown_f851",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.UNKNOWN_F852=vn[63570]=new hn(63570,"unknown_f852",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.REVERSE_WARPS=vn[63571]=new hn(63571,"reverse_warps",void 0,[],void 0),hn.UNREVERSE_WARPS=vn[63572]=new hn(63572,"unreverse_warps",void 0,[],void 0),hn.SET_ULT_MAP=vn[63573]=new hn(63573,"set_ult_map",void 0,[],void 0),hn.UNSET_ULT_MAP=vn[63574]=new hn(63574,"unset_ult_map",void 0,[],void 0),hn.SET_AREA_TITLE=vn[63575]=new hn(63575,"set_area_title",void 0,[new wn(on,void 0,void 0)],_n.Pop),hn.UNKNOWN_F858=vn[63576]=new hn(63576,"unknown_f858",void 0,[],void 0),hn.UNKNOWN_F859=vn[63577]=new hn(63577,"unknown_f859",void 0,[],void 0),hn.EQUIP_ITEM=vn[63578]=new hn(63578,"equip_item",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.UNEQUIP_ITEM=vn[63579]=new hn(63579,"unequip_item",void 0,[new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0)],_n.Pop),hn.UNKNOWN_F85C=vn[63580]=new hn(63580,"unknown_f85c",void 0,[],void 0),hn.UNKNOWN_F85D=vn[63581]=new hn(63581,"unknown_f85d",void 0,[],void 0),hn.UNKNOWN_F85E=vn[63582]=new hn(63582,"unknown_f85e",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.UNKNOWN_F85F=vn[63583]=new hn(63583,"unknown_f85f",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.UNKNOWN_F860=vn[63584]=new hn(63584,"unknown_f860",void 0,[],void 0),hn.UNKNOWN_F861=vn[63585]=new hn(63585,"unknown_f861",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.UNKNOWN_F862=vn[63586]=new hn(63586,"unknown_f862",void 0,[],void 0),hn.UNKNOWN_F863=vn[63587]=new hn(63587,"unknown_f863",void 0,[],void 0),hn.CMODE_RANK=vn[63588]=new hn(63588,"cmode_rank",void 0,[new wn(Zt,void 0,void 0),new wn(on,void 0,void 0)],_n.Pop),hn.AWARD_ITEM_NAME=vn[63589]=new hn(63589,"award_item_name",void 0,[],void 0),hn.AWARD_ITEM_SELECT=vn[63590]=new hn(63590,"award_item_select",void 0,[],void 0),hn.AWARD_ITEM_GIVE_TO=vn[63591]=new hn(63591,"award_item_give_to",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.UNKNOWN_F868=vn[63592]=new hn(63592,"unknown_f868",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Write)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.UNKNOWN_F869=vn[63593]=new hn(63593,"unknown_f869",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Write)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.ITEM_CREATE_CMODE=vn[63594]=new hn(63594,"item_create_cmode",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Write)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.UNKNOWN_F86B=vn[63595]=new hn(63595,"unknown_f86b",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.AWARD_ITEM_OK=vn[63596]=new hn(63596,"award_item_ok",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.UNKNOWN_F86D=vn[63597]=new hn(63597,"unknown_f86d",void 0,[],void 0),hn.UNKNOWN_F86E=vn[63598]=new hn(63598,"unknown_f86e",void 0,[],void 0),hn.BA_SET_LIVES=vn[63599]=new hn(63599,"ba_set_lives",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.BA_SET_TECH_LVL=vn[63600]=new hn(63600,"ba_set_tech_lvl",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.BA_SET_LVL=vn[63601]=new hn(63601,"ba_set_lvl",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.BA_SET_TIME_LIMIT=vn[63602]=new hn(63602,"ba_set_time_limit",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.BOSS_IS_DEAD=vn[63603]=new hn(63603,"boss_is_dead",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.UNKNOWN_F874=vn[63604]=new hn(63604,"unknown_f874",void 0,[],void 0),hn.UNKNOWN_F875=vn[63605]=new hn(63605,"unknown_f875",void 0,[],void 0),hn.UNKNOWN_F876=vn[63606]=new hn(63606,"unknown_f876",void 0,[],void 0),hn.ENABLE_TECHS=vn[63607]=new hn(63607,"enable_techs","Enables technique use for the given player.",[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,"Player slot.",cn.Read)]},void 0,void 0)],void 0),hn.DISABLE_TECHS=vn[63608]=new hn(63608,"disable_techs","Disables technique use for the given player.",[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,"Player slot.",cn.Read)]},void 0,void 0)],void 0),hn.GET_GENDER=vn[63609]=new hn(63609,"get_gender","Retrieves the player's gender. 0 If male, 1 if female.",[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,"Player slot.",cn.Read)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,"Player gender.",cn.Write)]},void 0,void 0)],void 0),hn.GET_CHARA_CLASS=vn[63610]=new hn(63610,"get_chara_class","Retrieves the player's race and character class.",[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,"Player slot.",cn.Read)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,"Player race. 0 If human, 1 if newman, 2 if cast.",cn.Write),new wn(Zt,"Player class. 0 If hunter, 1 if ranger, 2 if force.",cn.Write)]},void 0,void 0)],void 0),hn.TAKE_SLOT_MESETA=vn[63611]=new hn(63611,"take_slot_meseta","Takes an amount of meseta from a player's inventory.",[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,"Player slot.",cn.Read),new wn(Zt,"Amount of meseta to take.",cn.Read)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,"Will be set to 1 if the meseta was taken, 0 otherwise.",cn.Write)]},void 0,void 0)],void 0),hn.UNKNOWN_F87C=vn[63612]=new hn(63612,"unknown_f87c",void 0,[],void 0),hn.UNKNOWN_F87D=vn[63613]=new hn(63613,"unknown_f87d",void 0,[],void 0),hn.UNKNOWN_F87E=vn[63614]=new hn(63614,"unknown_f87e",void 0,[],void 0),hn.READ_GUILDCARD_FLAG=vn[63615]=new hn(63615,"read_guildcard_flag",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Write)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.UNKNOWN_F880=vn[63616]=new hn(63616,"unknown_f880",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.GET_PL_NAME=vn[63617]=new hn(63617,"get_pl_name","Sets the value of <pl_name> to the given player's name.",[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,"Player slot.",cn.Read)]},void 0,void 0)],void 0),hn.UNKNOWN_F882=vn[63618]=new hn(63618,"unknown_f882",void 0,[],void 0),hn.UNKNOWN_F883=vn[63619]=new hn(63619,"unknown_f883",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Write)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.UNKNOWN_F884=vn[63620]=new hn(63620,"unknown_f884",void 0,[],void 0),hn.UNKNOWN_F885=vn[63621]=new hn(63621,"unknown_f885",void 0,[],void 0),hn.UNKNOWN_F886=vn[63622]=new hn(63622,"unknown_f886",void 0,[],void 0),hn.UNKNOWN_F887=vn[63623]=new hn(63623,"unknown_f887",void 0,[],void 0),hn.UNKNOWN_F888=vn[63624]=new hn(63624,"unknown_f888",void 0,[],void 0),hn.UNKNOWN_F889=vn[63625]=new hn(63625,"unknown_f889",void 0,[],void 0),hn.GET_PLAYER_STATUS=vn[63626]=new hn(63626,"get_player_status",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Write)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.SEND_MAIL=vn[63627]=new hn(63627,"send_mail",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0),new wn(on,void 0,void 0)],_n.Pop),hn.ONLINE_CHECK=vn[63628]=new hn(63628,"online_check",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.CHL_SET_TIMERECORD=vn[63629]=new hn(63629,"chl_set_timerecord",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.CHL_GET_TIMERECORD=vn[63630]=new hn(63630,"chl_get_timerecord",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.UNKNOWN_F88F=vn[63631]=new hn(63631,"unknown_f88f",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.UNKNOWN_F890=vn[63632]=new hn(63632,"unknown_f890",void 0,[],void 0),hn.LOAD_ENEMY_DATA=vn[63633]=new hn(63633,"load_enemy_data",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.GET_PHYSICAL_DATA=vn[63634]=new hn(63634,"get_physical_data",void 0,[new wn(Yt,void 0,void 0)],void 0),hn.GET_ATTACK_DATA=vn[63635]=new hn(63635,"get_attack_data",void 0,[new wn(Yt,void 0,void 0)],void 0),hn.GET_RESIST_DATA=vn[63636]=new hn(63636,"get_resist_data",void 0,[new wn(Yt,void 0,void 0)],void 0),hn.GET_MOVEMENT_DATA=vn[63637]=new hn(63637,"get_movement_data",void 0,[new wn(Yt,void 0,void 0)],void 0),hn.UNKNOWN_F896=vn[63638]=new hn(63638,"unknown_f896",void 0,[],void 0),hn.UNKNOWN_F897=vn[63639]=new hn(63639,"unknown_f897",void 0,[],void 0),hn.SHIFT_LEFT=vn[63640]=new hn(63640,"shift_left",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.SHIFT_RIGHT=vn[63641]=new hn(63641,"shift_right",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.GET_RANDOM=vn[63642]=new hn(63642,"get_random",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read),new wn(Zt,void 0,cn.Read)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.RESET_MAP=vn[63643]=new hn(63643,"reset_map","Sets all registers to 0 and resets the quest.",[],void 0),hn.DISP_CHL_RETRY_MENU=vn[63644]=new hn(63644,"disp_chl_retry_menu",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.CHL_REVERSER=vn[63645]=new hn(63645,"chl_reverser",void 0,[],void 0),hn.UNKNOWN_F89E=vn[63646]=new hn(63646,"unknown_f89e",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.UNKNOWN_F89F=vn[63647]=new hn(63647,"unknown_f89f",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.UNKNOWN_F8A0=vn[63648]=new hn(63648,"unknown_f8a0",void 0,[],void 0),hn.UNKNOWN_F8A1=vn[63649]=new hn(63649,"unknown_f8a1",void 0,[],void 0),hn.UNKNOWN_F8A2=vn[63650]=new hn(63650,"unknown_f8a2",void 0,[],void 0),hn.UNKNOWN_F8A3=vn[63651]=new hn(63651,"unknown_f8a3",void 0,[],void 0),hn.UNKNOWN_F8A4=vn[63652]=new hn(63652,"unknown_f8a4",void 0,[],void 0),hn.UNKNOWN_F8A5=vn[63653]=new hn(63653,"unknown_f8a5",void 0,[],void 0),hn.UNKNOWN_F8A6=vn[63654]=new hn(63654,"unknown_f8a6",void 0,[],void 0),hn.UNKNOWN_F8A7=vn[63655]=new hn(63655,"unknown_f8a7",void 0,[],void 0),hn.UNKNOWN_F8A8=vn[63656]=new hn(63656,"unknown_f8a8",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.UNKNOWN_F8A9=vn[63657]=new hn(63657,"unknown_f8a9",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.UNKNOWN_F8AA=vn[63658]=new hn(63658,"unknown_f8aa",void 0,[],void 0),hn.UNKNOWN_F8AB=vn[63659]=new hn(63659,"unknown_f8ab",void 0,[],void 0),hn.UNKNOWN_F8AC=vn[63660]=new hn(63660,"unknown_f8ac",void 0,[],void 0),hn.GET_NUMBER_OF_PLAYER2=vn[63661]=new hn(63661,"get_number_of_player2",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.UNKNOWN_F8AE=vn[63662]=new hn(63662,"unknown_f8ae",void 0,[],void 0),hn.UNKNOWN_F8AF=vn[63663]=new hn(63663,"unknown_f8af",void 0,[],void 0),hn.UNKNOWN_F8B0=vn[63664]=new hn(63664,"unknown_f8b0",void 0,[],void 0),hn.UNKNOWN_F8B1=vn[63665]=new hn(63665,"unknown_f8b1",void 0,[],void 0),hn.UNKNOWN_F8B2=vn[63666]=new hn(63666,"unknown_f8b2",void 0,[],void 0),hn.UNKNOWN_F8B3=vn[63667]=new hn(63667,"unknown_f8b3",void 0,[],void 0),hn.UNKNOWN_F8B4=vn[63668]=new hn(63668,"unknown_f8b4",void 0,[],void 0),hn.UNKNOWN_F8B5=vn[63669]=new hn(63669,"unknown_f8b5",void 0,[],void 0),hn.UNKNOWN_F8B6=vn[63670]=new hn(63670,"unknown_f8b6",void 0,[],void 0),hn.UNKNOWN_F8B7=vn[63671]=new hn(63671,"unknown_f8b7",void 0,[],void 0),hn.UNKNOWN_F8B8=vn[63672]=new hn(63672,"unknown_f8b8",void 0,[],void 0),hn.CHL_RECOVERY=vn[63673]=new hn(63673,"chl_recovery",void 0,[],void 0),hn.UNKNOWN_F8BA=vn[63674]=new hn(63674,"unknown_f8ba",void 0,[],void 0),hn.UNKNOWN_F8BB=vn[63675]=new hn(63675,"unknown_f8bb",void 0,[],void 0),hn.SET_EPISODE=vn[63676]=new hn(63676,"set_episode",void 0,[new wn(Zt,void 0,void 0)],void 0),hn.UNKNOWN_F8BD=vn[63677]=new hn(63677,"unknown_f8bd",void 0,[],void 0),hn.UNKNOWN_F8BE=vn[63678]=new hn(63678,"unknown_f8be",void 0,[],void 0),hn.UNKNOWN_F8BF=vn[63679]=new hn(63679,"unknown_f8bf",void 0,[],void 0),hn.FILE_DL_REQ=vn[63680]=new hn(63680,"file_dl_req",void 0,[new wn(Zt,void 0,void 0),new wn(on,void 0,void 0)],_n.Pop),hn.GET_DL_STATUS=vn[63681]=new hn(63681,"get_dl_status",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.GBA_UNKNOWN4=vn[63682]=new hn(63682,"gba_unknown4",void 0,[],void 0),hn.GET_GBA_STATE=vn[63683]=new hn(63683,"get_gba_state",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.UNKNOWN_F8C4=vn[63684]=new hn(63684,"unknown_f8c4",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.UNKNOWN_F8C5=vn[63685]=new hn(63685,"unknown_f8c5",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.QEXIT=vn[63686]=new hn(63686,"qexit",void 0,[],void 0),hn.USE_ANIMATION=vn[63687]=new hn(63687,"use_animation",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,"Player slot.",cn.Read)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,"Animation ID.",cn.Read),new wn(Zt,"Animation duration in number of frames.",cn.Read)]},void 0,void 0)],void 0),hn.STOP_ANIMATION=vn[63688]=new hn(63688,"stop_animation",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,"Player slot.",cn.Read)]},void 0,void 0)],void 0),hn.RUN_TO_COORD=vn[63689]=new hn(63689,"run_to_coord",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.SET_SLOT_INVINCIBLE=vn[63690]=new hn(63690,"set_slot_invincible",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,"Player slot.",cn.Read)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.UNKNOWN_F8CB=vn[63691]=new hn(63691,"unknown_f8cb",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.SET_SLOT_POISON=vn[63692]=new hn(63692,"set_slot_poison",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,"Player slot.",cn.Read)]},void 0,void 0)],void 0),hn.SET_SLOT_PARALYZE=vn[63693]=new hn(63693,"set_slot_paralyze",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,"Player slot.",cn.Read)]},void 0,void 0)],void 0),hn.SET_SLOT_SHOCK=vn[63694]=new hn(63694,"set_slot_shock",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,"Player slot.",cn.Read)]},void 0,void 0)],void 0),hn.SET_SLOT_FREEZE=vn[63695]=new hn(63695,"set_slot_freeze",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,"Player slot.",cn.Read)]},void 0,void 0)],void 0),hn.SET_SLOT_SLOW=vn[63696]=new hn(63696,"set_slot_slow",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,"Player slot.",cn.Read)]},void 0,void 0)],void 0),hn.SET_SLOT_CONFUSE=vn[63697]=new hn(63697,"set_slot_confuse",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,"Player slot.",cn.Read)]},void 0,void 0)],void 0),hn.SET_SLOT_SHIFTA=vn[63698]=new hn(63698,"set_slot_shifta",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,"Player slot.",cn.Read)]},void 0,void 0)],void 0),hn.SET_SLOT_DEBAND=vn[63699]=new hn(63699,"set_slot_deband",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,"Player slot.",cn.Read)]},void 0,void 0)],void 0),hn.SET_SLOT_JELLEN=vn[63700]=new hn(63700,"set_slot_jellen",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,"Player slot.",cn.Read)]},void 0,void 0)],void 0),hn.SET_SLOT_ZALURE=vn[63701]=new hn(63701,"set_slot_zalure",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,"Player slot.",cn.Read)]},void 0,void 0)],void 0),hn.FLETI_FIXED_CAMERA=vn[63702]=new hn(63702,"fleti_fixed_camera",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0)],_n.Pop),hn.FLETI_LOCKED_CAMERA=vn[63703]=new hn(63703,"fleti_locked_camera",void 0,[new wn(Zt,void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0)],_n.Pop),hn.DEFAULT_CAMERA_POS2=vn[63704]=new hn(63704,"default_camera_pos2",void 0,[],void 0),hn.SET_MOTION_BLUR=vn[63705]=new hn(63705,"set_motion_blur",void 0,[],void 0),hn.SET_SCREEN_BW=vn[63706]=new hn(63706,"set_screen_bw",void 0,[],void 0),hn.UNKNOWN_F8DB=vn[63707]=new hn(63707,"unknown_f8db",void 0,[new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0),new wn(Yt,void 0,void 0)],_n.Pop),hn.NPC_ACTION_STRING=vn[63708]=new hn(63708,"npc_action_string",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read)]},void 0,void 0),new wn(nn,void 0,void 0)],void 0),hn.GET_PAD_COND=vn[63709]=new hn(63709,"get_pad_cond",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Write)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.GET_BUTTON_COND=vn[63710]=new hn(63710,"get_button_cond",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Write)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.FREEZE_ENEMIES=vn[63711]=new hn(63711,"freeze_enemies",void 0,[],void 0),hn.UNFREEZE_ENEMIES=vn[63712]=new hn(63712,"unfreeze_enemies",void 0,[],void 0),hn.FREEZE_EVERYTHING=vn[63713]=new hn(63713,"freeze_everything",void 0,[],void 0),hn.UNFREEZE_EVERYTHING=vn[63714]=new hn(63714,"unfreeze_everything",void 0,[],void 0),hn.RESTORE_HP=vn[63715]=new hn(63715,"restore_hp",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.RESTORE_TP=vn[63716]=new hn(63716,"restore_tp",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.CLOSE_CHAT_BUBBLE=vn[63717]=new hn(63717,"close_chat_bubble",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.MOVE_COORDS_OBJECT=vn[63718]=new hn(63718,"move_coords_object",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.AT_COORDS_CALL_EX=vn[63719]=new hn(63719,"at_coords_call_ex",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.UNKNOWN_F8E8=vn[63720]=new hn(63720,"unknown_f8e8",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.UNKNOWN_F8E9=vn[63721]=new hn(63721,"unknown_f8e9",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.UNKNOWN_F8EA=vn[63722]=new hn(63722,"unknown_f8ea",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.UNKNOWN_F8EB=vn[63723]=new hn(63723,"unknown_f8eb",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.UNKNOWN_F8EC=vn[63724]=new hn(63724,"unknown_f8ec",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.ANIMATION_CHECK=vn[63725]=new hn(63725,"animation_check",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.CALL_IMAGE_DATA=vn[63726]=new hn(63726,"call_image_data",void 0,[new wn(Zt,void 0,void 0),new wn(Yt,void 0,void 0)],_n.Pop),hn.UNKNOWN_F8EF=vn[63727]=new hn(63727,"unknown_f8ef",void 0,[],void 0),hn.TURN_OFF_BGM_P2=vn[63728]=new hn(63728,"turn_off_bgm_p2",void 0,[],void 0),hn.TURN_ON_BGM_P2=vn[63729]=new hn(63729,"turn_on_bgm_p2",void 0,[],void 0),hn.LOAD_UNK_DATA=vn[63730]=new hn(63730,"load_unk_data",void 0,[new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0),new wn(tn,void 0,void 0)],_n.Pop),hn.PARTICLE2=vn[63731]=new hn(63731,"particle2",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0),new wn(Zt,void 0,void 0),new wn(Xt,void 0,void 0)],_n.Pop),hn.UNKNOWN_F8F4=vn[63732]=new hn(63732,"unknown_f8f4",void 0,[],void 0),hn.UNKNOWN_F8F5=vn[63733]=new hn(63733,"unknown_f8f5",void 0,[],void 0),hn.UNKNOWN_F8F6=vn[63734]=new hn(63734,"unknown_f8f6",void 0,[],void 0),hn.UNKNOWN_F8F7=vn[63735]=new hn(63735,"unknown_f8f7",void 0,[],void 0),hn.UNKNOWN_F8F8=vn[63736]=new hn(63736,"unknown_f8f8",void 0,[],void 0),hn.UNKNOWN_F8F9=vn[63737]=new hn(63737,"unknown_f8f9",void 0,[],void 0),hn.UNKNOWN_F8FA=vn[63738]=new hn(63738,"unknown_f8fa",void 0,[],void 0),hn.UNKNOWN_F8FB=vn[63739]=new hn(63739,"unknown_f8fb",void 0,[],void 0),hn.UNKNOWN_F8FC=vn[63740]=new hn(63740,"unknown_f8fc",void 0,[],void 0),hn.UNKNOWN_F8FD=vn[63741]=new hn(63741,"unknown_f8fd",void 0,[],void 0),hn.UNKNOWN_F8FE=vn[63742]=new hn(63742,"unknown_f8fe",void 0,[],void 0),hn.UNKNOWN_F8FF=vn[63743]=new hn(63743,"unknown_f8ff",void 0,[],void 0),hn.UNKNOWN_F900=vn[63744]=new hn(63744,"unknown_f900",void 0,[],void 0),hn.DEC2FLOAT=vn[63745]=new hn(63745,"dec2float",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Xt,void 0,cn.Write)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.FLOAT2DEC=vn[63746]=new hn(63746,"float2dec",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Xt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.FLET=vn[63747]=new hn(63747,"flet",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Xt,void 0,cn.Write)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Xt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.FLETI=vn[63748]=new hn(63748,"fleti",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Xt,void 0,cn.Write)]},void 0,void 0),new wn(Xt,void 0,void 0)],void 0),hn.UNKNOWN_F905=vn[63749]=new hn(63749,"unknown_f905",void 0,[],void 0),hn.UNKNOWN_F906=vn[63750]=new hn(63750,"unknown_f906",void 0,[],void 0),hn.UNKNOWN_F907=vn[63751]=new hn(63751,"unknown_f907",void 0,[],void 0),hn.FADD=vn[63752]=new hn(63752,"fadd",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Xt,void 0,cn.Write)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Xt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.FADDI=vn[63753]=new hn(63753,"faddi",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Xt,void 0,cn.Write)]},void 0,void 0),new wn(Xt,void 0,void 0)],void 0),hn.FSUB=vn[63754]=new hn(63754,"fsub",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Xt,void 0,cn.Write)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Xt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.FSUBI=vn[63755]=new hn(63755,"fsubi",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Xt,void 0,cn.Write)]},void 0,void 0),new wn(Xt,void 0,void 0)],void 0),hn.FMUL=vn[63756]=new hn(63756,"fmul",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Xt,void 0,cn.Write)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Xt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.FMULI=vn[63757]=new hn(63757,"fmuli",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Xt,void 0,cn.Write)]},void 0,void 0),new wn(Xt,void 0,void 0)],void 0),hn.FDIV=vn[63758]=new hn(63758,"fdiv",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Xt,void 0,cn.Write)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Xt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.FDIVI=vn[63759]=new hn(63759,"fdivi",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Xt,void 0,cn.Write)]},void 0,void 0),new wn(Xt,void 0,void 0)],void 0),hn.GET_UNKNOWN_COUNT=vn[63760]=new hn(63760,"get_unknown_count",void 0,[new wn(Zt,void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0)],_n.Pop),hn.GET_STACKABLE_ITEM_COUNT=vn[63761]=new hn(63761,"get_stackable_item_count",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,"Player slot.",cn.Read),new wn(Zt,void 0,cn.Read),new wn(Zt,void 0,cn.Read),new wn(Zt,void 0,cn.Read)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.FREEZE_AND_HIDE_EQUIP=vn[63762]=new hn(63762,"freeze_and_hide_equip",void 0,[],void 0),hn.THAW_AND_SHOW_EQUIP=vn[63763]=new hn(63763,"thaw_and_show_equip",void 0,[],void 0),hn.SET_PALETTEX_CALLBACK=vn[63764]=new hn(63764,"set_palettex_callback",void 0,[new wn(Zt,"Player slot.",void 0),new wn(en,void 0,void 0)],_n.Pop),hn.ACTIVATE_PALETTEX=vn[63765]=new hn(63765,"activate_palettex",void 0,[new wn(Zt,"Player slot.",void 0)],_n.Pop),hn.ENABLE_PALETTEX=vn[63766]=new hn(63766,"enable_palettex",void 0,[new wn(Zt,"Player slot.",void 0)],_n.Pop),hn.RESTORE_PALETTEX=vn[63767]=new hn(63767,"restore_palettex",void 0,[new wn(Zt,"Player slot.",void 0)],_n.Pop),hn.DISABLE_PALETTEX=vn[63768]=new hn(63768,"disable_palettex",void 0,[new wn(Zt,"Player slot.",void 0)],_n.Pop),hn.GET_PALETTEX_ACTIVATED=vn[63769]=new hn(63769,"get_palettex_activated",void 0,[new wn(Zt,"Player slot.",void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0)],_n.Pop),hn.GET_UNKNOWN_PALETTEX_STATUS=vn[63770]=new hn(63770,"get_unknown_palettex_status",void 0,[new wn(Zt,void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0)],_n.Pop),hn.DISABLE_MOVEMENT2=vn[63771]=new hn(63771,"disable_movement2",void 0,[new wn(Zt,"Player slot.",void 0)],_n.Pop),hn.ENABLE_MOVEMENT2=vn[63772]=new hn(63772,"enable_movement2",void 0,[new wn(Zt,"Player slot.",void 0)],_n.Pop),hn.GET_TIME_PLAYED=vn[63773]=new hn(63773,"get_time_played",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.GET_GUILDCARD_TOTAL=vn[63774]=new hn(63774,"get_guildcard_total",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.GET_SLOT_MESETA=vn[63775]=new hn(63775,"get_slot_meseta",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.GET_PLAYER_LEVEL=vn[63776]=new hn(63776,"get_player_level",void 0,[new wn(Zt,"Player slot.",void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0)],_n.Pop),hn.GET_SECTION_ID=vn[63777]=new hn(63777,"get_section_id",void 0,[new wn(Zt,"Player slot.",void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0)],_n.Pop),hn.GET_PLAYER_HP=vn[63778]=new hn(63778,"get_player_hp",void 0,[new wn(Zt,"Player slot.",void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,"Maximum HP.",cn.Write),new wn(Zt,"Current HP.",cn.Write),new wn(Zt,"Maximum TP.",cn.Write),new wn(Zt,"Current TP.",cn.Write)]},void 0,void 0)],_n.Pop),hn.GET_FLOOR_NUMBER=vn[63779]=new hn(63779,"get_floor_number",void 0,[new wn(Zt,"Player slot.",void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0)],_n.Pop),hn.GET_COORD_PLAYER_DETECT=vn[63780]=new hn(63780,"get_coord_player_detect",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,"Player slot.",cn.Read)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Read)]},void 0,void 0)],void 0),hn.READ_GLOBAL_FLAG=vn[63781]=new hn(63781,"read_global_flag",void 0,[new wn(Zt,void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0)],_n.Pop),hn.WRITE_GLOBAL_FLAG=vn[63782]=new hn(63782,"write_global_flag",void 0,[new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0)],_n.Pop),hn.UNKNOWN_F927=vn[63783]=new hn(63783,"unknown_f927",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Write)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.FLOOR_PLAYER_DETECT=vn[63784]=new hn(63784,"floor_player_detect",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write),new wn(Zt,void 0,cn.Write),new wn(Zt,void 0,cn.Write),new wn(Zt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.READ_DISK_FILE=vn[63785]=new hn(63785,"read_disk_file",void 0,[new wn(on,void 0,void 0)],_n.Pop),hn.OPEN_PACK_SELECT=vn[63786]=new hn(63786,"open_pack_select",void 0,[],void 0),hn.ITEM_SELECT=vn[63787]=new hn(63787,"item_select",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.GET_ITEM_ID=vn[63788]=new hn(63788,"get_item_id",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.COLOR_CHANGE=vn[63789]=new hn(63789,"color_change",void 0,[new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0)],_n.Pop),hn.SEND_STATISTIC=vn[63790]=new hn(63790,"send_statistic",void 0,[new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0)],_n.Pop),hn.UNKNOWN_F92F=vn[63791]=new hn(63791,"unknown_f92f",void 0,[new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0)],_n.Pop),hn.CHAT_BOX=vn[63792]=new hn(63792,"chat_box",void 0,[new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0),new wn(on,void 0,void 0)],_n.Pop),hn.CHAT_BUBBLE=vn[63793]=new hn(63793,"chat_bubble",void 0,[new wn(Zt,void 0,void 0),new wn(on,void 0,void 0)],_n.Pop),hn.UNKNOWN_F932=vn[63794]=new hn(63794,"unknown_f932",void 0,[],void 0),hn.UNKNOWN_F933=vn[63795]=new hn(63795,"unknown_f933",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.SCROLL_TEXT=vn[63796]=new hn(63796,"scroll_text",void 0,[new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0),new wn(Xt,void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0),new wn(on,void 0,void 0)],_n.Pop),hn.GBA_UNKNOWN1=vn[63797]=new hn(63797,"gba_unknown1",void 0,[],void 0),hn.GBA_UNKNOWN2=vn[63798]=new hn(63798,"gba_unknown2",void 0,[],void 0),hn.GBA_UNKNOWN3=vn[63799]=new hn(63799,"gba_unknown3",void 0,[],void 0),hn.ADD_DAMAGE_TO=vn[63800]=new hn(63800,"add_damage_to",void 0,[new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0)],_n.Pop),hn.ITEM_DELETE3=vn[63801]=new hn(63801,"item_delete3",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.GET_ITEM_INFO=vn[63802]=new hn(63802,"get_item_info",void 0,[new wn(Zt,void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Write)]},void 0,void 0)],_n.Pop),hn.ITEM_PACKING1=vn[63803]=new hn(63803,"item_packing1",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.ITEM_PACKING2=vn[63804]=new hn(63804,"item_packing2",void 0,[new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0)],_n.Pop),hn.GET_LANG_SETTING=vn[63805]=new hn(63805,"get_lang_setting",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(qt,void 0,cn.Write)]},void 0,void 0)],_n.Pop),hn.PREPARE_STATISTIC=vn[63806]=new hn(63806,"prepare_statistic",void 0,[new wn(Zt,void 0,void 0),new wn(en,void 0,void 0),new wn(en,void 0,void 0)],_n.Pop),hn.KEYWORD_DETECT=vn[63807]=new hn(63807,"keyword_detect",void 0,[],void 0),hn.KEYWORD=vn[63808]=new hn(63808,"keyword",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0),new wn(Zt,"Player slot.",void 0),new wn(on,void 0,void 0)],_n.Pop),hn.GET_GUILDCARD_NUM=vn[63809]=new hn(63809,"get_guildcard_num",void 0,[new wn(Zt,"Player slot.",void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0)],_n.Pop),hn.UNKNOWN_F942=vn[63810]=new hn(63810,"unknown_f942",void 0,[],void 0),hn.UNKNOWN_F943=vn[63811]=new hn(63811,"unknown_f943",void 0,[],void 0),hn.GET_WRAP_STATUS=vn[63812]=new hn(63812,"get_wrap_status",void 0,[new wn(Zt,"Player slot.",void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0)],_n.Pop),hn.INITIAL_FLOOR=vn[63813]=new hn(63813,"initial_floor",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.SIN=vn[63814]=new hn(63814,"sin",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0),new wn(Zt,void 0,void 0)],_n.Pop),hn.COS=vn[63815]=new hn(63815,"cos",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0),new wn(Zt,void 0,void 0)],_n.Pop),hn.UNKNOWN_F948=vn[63816]=new hn(63816,"unknown_f948",void 0,[],void 0),hn.UNKNOWN_F949=vn[63817]=new hn(63817,"unknown_f949",void 0,[],void 0),hn.BOSS_IS_DEAD2=vn[63818]=new hn(63818,"boss_is_dead2",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.UNKNOWN_F94B=vn[63819]=new hn(63819,"unknown_f94b",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.UNKNOWN_F94C=vn[63820]=new hn(63820,"unknown_f94c",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.IS_THERE_CARDBATTLE=vn[63821]=new hn(63821,"is_there_cardbattle",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.UNKNOWN_F94E=vn[63822]=new hn(63822,"unknown_f94e",void 0,[],void 0),hn.UNKNOWN_F94F=vn[63823]=new hn(63823,"unknown_f94f",void 0,[],void 0),hn.BB_P2_MENU=vn[63824]=new hn(63824,"bb_p2_menu",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.BB_MAP_DESIGNATE=vn[63825]=new hn(63825,"bb_map_designate",void 0,[new wn(Jt,void 0,void 0),new wn(Yt,void 0,void 0),new wn(Jt,void 0,void 0),new wn(Jt,void 0,void 0)],void 0),hn.BB_GET_NUMBER_IN_PACK=vn[63826]=new hn(63826,"bb_get_number_in_pack",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0)],void 0),hn.BB_SWAP_ITEM=vn[63827]=new hn(63827,"bb_swap_item",void 0,[new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0),new wn(en,void 0,void 0),new wn(en,void 0,void 0)],_n.Pop),hn.BB_CHECK_WRAP=vn[63828]=new hn(63828,"bb_check_wrap",void 0,[new wn(Zt,void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0)],_n.Pop),hn.BB_EXCHANGE_PD_ITEM=vn[63829]=new hn(63829,"bb_exchange_pd_item",void 0,[new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0),new wn(en,void 0,void 0),new wn(en,void 0,void 0)],_n.Pop),hn.BB_EXCHANGE_PD_SRANK=vn[63830]=new hn(63830,"bb_exchange_pd_srank",void 0,[new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0),new wn(en,void 0,void 0),new wn(en,void 0,void 0)],_n.Pop),hn.BB_EXCHANGE_PD_SPECIAL=vn[63831]=new hn(63831,"bb_exchange_pd_special",void 0,[new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0),new wn(en,void 0,void 0),new wn(en,void 0,void 0)],_n.Pop),hn.BB_EXCHANGE_PD_PERCENT=vn[63832]=new hn(63832,"bb_exchange_pd_percent",void 0,[new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0),new wn(Zt,void 0,void 0),new wn(en,void 0,void 0),new wn(en,void 0,void 0)],_n.Pop),hn.UNKNOWN_F959=vn[63833]=new hn(63833,"unknown_f959",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.UNKNOWN_F95A=vn[63834]=new hn(63834,"unknown_f95a",void 0,[],void 0),hn.UNKNOWN_F95B=vn[63835]=new hn(63835,"unknown_f95b",void 0,[],void 0),hn.BB_EXCHANGE_SLT=vn[63836]=new hn(63836,"bb_exchange_slt",void 0,[new wn(Zt,void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0),new wn(en,void 0,void 0),new wn(en,void 0,void 0)],_n.Pop),hn.BB_EXCHANGE_PC=vn[63837]=new hn(63837,"bb_exchange_pc",void 0,[],void 0),hn.BB_BOX_CREATE_BP=vn[63838]=new hn(63838,"bb_box_create_bp",void 0,[new wn(Zt,void 0,void 0),new wn(Xt,void 0,void 0),new wn(Xt,void 0,void 0)],_n.Pop),hn.BB_EXCHANGE_PT=vn[63839]=new hn(63839,"bb_exchange_pt",void 0,[new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0),new wn({kind:zt.RegTupRef,register_tuples:[new wn(Zt,void 0,cn.Write)]},void 0,void 0),new wn(Zt,void 0,void 0),new wn(en,void 0,void 0),new wn(en,void 0,void 0)],_n.Pop),hn.UNKNOWN_F960=vn[63840]=new hn(63840,"unknown_f960",void 0,[new wn(Zt,void 0,void 0)],_n.Pop),hn.UNKNOWN_F961=vn[63841]=new hn(63841,"unknown_f961",void 0,[],void 0),hn.UNKNOWN_F962=vn[63842]=new hn(63842,"unknown_f962",void 0,[],void 0),hn.UNKNOWN_F963=vn[63843]=new hn(63843,"unknown_f963",void 0,[],void 0),hn.UNKNOWN_F964=vn[63844]=new hn(63844,"unknown_f964",void 0,[],void 0),hn.UNKNOWN_F965=vn[63845]=new hn(63845,"unknown_f965",void 0,[],void 0),hn.UNKNOWN_F966=vn[63846]=new hn(63846,"unknown_f966",void 0,[],void 0),hn.UNKNOWN_F967=vn[63847]=new hn(63847,"unknown_f967",void 0,[],void 0),hn.UNKNOWN_F968=vn[63848]=new hn(63848,"unknown_f968",void 0,[],void 0),hn.UNKNOWN_F969=vn[63849]=new hn(63849,"unknown_f969",void 0,[],void 0),hn.UNKNOWN_F96A=vn[63850]=new hn(63850,"unknown_f96a",void 0,[],void 0),hn.UNKNOWN_F96B=vn[63851]=new hn(63851,"unknown_f96b",void 0,[],void 0),hn.UNKNOWN_F96C=vn[63852]=new hn(63852,"unknown_f96c",void 0,[],void 0),hn.UNKNOWN_F96D=vn[63853]=new hn(63853,"unknown_f96d",void 0,[],void 0),hn.UNKNOWN_F96E=vn[63854]=new hn(63854,"unknown_f96e",void 0,[],void 0),hn.UNKNOWN_F96F=vn[63855]=new hn(63855,"unknown_f96f",void 0,[],void 0),hn.UNKNOWN_F970=vn[63856]=new hn(63856,"unknown_f970",void 0,[],void 0),hn.UNKNOWN_F971=vn[63857]=new hn(63857,"unknown_f971",void 0,[],void 0),hn.UNKNOWN_F972=vn[63858]=new hn(63858,"unknown_f972",void 0,[],void 0),hn.UNKNOWN_F973=vn[63859]=new hn(63859,"unknown_f973",void 0,[],void 0),hn.UNKNOWN_F974=vn[63860]=new hn(63860,"unknown_f974",void 0,[],void 0),hn.UNKNOWN_F975=vn[63861]=new hn(63861,"unknown_f975",void 0,[],void 0),hn.UNKNOWN_F976=vn[63862]=new hn(63862,"unknown_f976",void 0,[],void 0),hn.UNKNOWN_F977=vn[63863]=new hn(63863,"unknown_f977",void 0,[],void 0),hn.UNKNOWN_F978=vn[63864]=new hn(63864,"unknown_f978",void 0,[],void 0),hn.UNKNOWN_F979=vn[63865]=new hn(63865,"unknown_f979",void 0,[],void 0),hn.UNKNOWN_F97A=vn[63866]=new hn(63866,"unknown_f97a",void 0,[],void 0),hn.UNKNOWN_F97B=vn[63867]=new hn(63867,"unknown_f97b",void 0,[],void 0),hn.UNKNOWN_F97C=vn[63868]=new hn(63868,"unknown_f97c",void 0,[],void 0),hn.UNKNOWN_F97D=vn[63869]=new hn(63869,"unknown_f97d",void 0,[],void 0),hn.UNKNOWN_F97E=vn[63870]=new hn(63870,"unknown_f97e",void 0,[],void 0),hn.UNKNOWN_F97F=vn[63871]=new hn(63871,"unknown_f97f",void 0,[],void 0),hn.UNKNOWN_F980=vn[63872]=new hn(63872,"unknown_f980",void 0,[],void 0),hn.UNKNOWN_F981=vn[63873]=new hn(63873,"unknown_f981",void 0,[],void 0),hn.UNKNOWN_F982=vn[63874]=new hn(63874,"unknown_f982",void 0,[],void 0),hn.UNKNOWN_F983=vn[63875]=new hn(63875,"unknown_f983",void 0,[],void 0),hn.UNKNOWN_F984=vn[63876]=new hn(63876,"unknown_f984",void 0,[],void 0),hn.UNKNOWN_F985=vn[63877]=new hn(63877,"unknown_f985",void 0,[],void 0),hn.UNKNOWN_F986=vn[63878]=new hn(63878,"unknown_f986",void 0,[],void 0),hn.UNKNOWN_F987=vn[63879]=new hn(63879,"unknown_f987",void 0,[],void 0),hn.UNKNOWN_F988=vn[63880]=new hn(63880,"unknown_f988",void 0,[],void 0),hn.UNKNOWN_F989=vn[63881]=new hn(63881,"unknown_f989",void 0,[],void 0),hn.UNKNOWN_F98A=vn[63882]=new hn(63882,"unknown_f98a",void 0,[],void 0),hn.UNKNOWN_F98B=vn[63883]=new hn(63883,"unknown_f98b",void 0,[],void 0),hn.UNKNOWN_F98C=vn[63884]=new hn(63884,"unknown_f98c",void 0,[],void 0),hn.UNKNOWN_F98D=vn[63885]=new hn(63885,"unknown_f98d",void 0,[],void 0),hn.UNKNOWN_F98E=vn[63886]=new hn(63886,"unknown_f98e",void 0,[],void 0),hn.UNKNOWN_F98F=vn[63887]=new hn(63887,"unknown_f98f",void 0,[],void 0),hn.UNKNOWN_F990=vn[63888]=new hn(63888,"unknown_f990",void 0,[],void 0),hn.UNKNOWN_F991=vn[63889]=new hn(63889,"unknown_f991",void 0,[],void 0),hn.UNKNOWN_F992=vn[63890]=new hn(63890,"unknown_f992",void 0,[],void 0),hn.UNKNOWN_F993=vn[63891]=new hn(63891,"unknown_f993",void 0,[],void 0),hn.UNKNOWN_F994=vn[63892]=new hn(63892,"unknown_f994",void 0,[],void 0),hn.UNKNOWN_F995=vn[63893]=new hn(63893,"unknown_f995",void 0,[],void 0),hn.UNKNOWN_F996=vn[63894]=new hn(63894,"unknown_f996",void 0,[],void 0),hn.UNKNOWN_F997=vn[63895]=new hn(63895,"unknown_f997",void 0,[],void 0),hn.UNKNOWN_F998=vn[63896]=new hn(63896,"unknown_f998",void 0,[],void 0),hn.UNKNOWN_F999=vn[63897]=new hn(63897,"unknown_f999",void 0,[],void 0),hn.UNKNOWN_F99A=vn[63898]=new hn(63898,"unknown_f99a",void 0,[],void 0),hn.UNKNOWN_F99B=vn[63899]=new hn(63899,"unknown_f99b",void 0,[],void 0),hn.UNKNOWN_F99C=vn[63900]=new hn(63900,"unknown_f99c",void 0,[],void 0),hn.UNKNOWN_F99D=vn[63901]=new hn(63901,"unknown_f99d",void 0,[],void 0),hn.UNKNOWN_F99E=vn[63902]=new hn(63902,"unknown_f99e",void 0,[],void 0),hn.UNKNOWN_F99F=vn[63903]=new hn(63903,"unknown_f99f",void 0,[],void 0),hn.UNKNOWN_F9A0=vn[63904]=new hn(63904,"unknown_f9a0",void 0,[],void 0),hn.UNKNOWN_F9A1=vn[63905]=new hn(63905,"unknown_f9a1",void 0,[],void 0),hn.UNKNOWN_F9A2=vn[63906]=new hn(63906,"unknown_f9a2",void 0,[],void 0),hn.UNKNOWN_F9A3=vn[63907]=new hn(63907,"unknown_f9a3",void 0,[],void 0),hn.UNKNOWN_F9A4=vn[63908]=new hn(63908,"unknown_f9a4",void 0,[],void 0),hn.UNKNOWN_F9A5=vn[63909]=new hn(63909,"unknown_f9a5",void 0,[],void 0),hn.UNKNOWN_F9A6=vn[63910]=new hn(63910,"unknown_f9a6",void 0,[],void 0),hn.UNKNOWN_F9A7=vn[63911]=new hn(63911,"unknown_f9a7",void 0,[],void 0),hn.UNKNOWN_F9A8=vn[63912]=new hn(63912,"unknown_f9a8",void 0,[],void 0),hn.UNKNOWN_F9A9=vn[63913]=new hn(63913,"unknown_f9a9",void 0,[],void 0),hn.UNKNOWN_F9AA=vn[63914]=new hn(63914,"unknown_f9aa",void 0,[],void 0),hn.UNKNOWN_F9AB=vn[63915]=new hn(63915,"unknown_f9ab",void 0,[],void 0),hn.UNKNOWN_F9AC=vn[63916]=new hn(63916,"unknown_f9ac",void 0,[],void 0),hn.UNKNOWN_F9AD=vn[63917]=new hn(63917,"unknown_f9ad",void 0,[],void 0),hn.UNKNOWN_F9AE=vn[63918]=new hn(63918,"unknown_f9ae",void 0,[],void 0),hn.UNKNOWN_F9AF=vn[63919]=new hn(63919,"unknown_f9af",void 0,[],void 0),hn.UNKNOWN_F9B0=vn[63920]=new hn(63920,"unknown_f9b0",void 0,[],void 0),hn.UNKNOWN_F9B1=vn[63921]=new hn(63921,"unknown_f9b1",void 0,[],void 0),hn.UNKNOWN_F9B2=vn[63922]=new hn(63922,"unknown_f9b2",void 0,[],void 0),hn.UNKNOWN_F9B3=vn[63923]=new hn(63923,"unknown_f9b3",void 0,[],void 0),hn.UNKNOWN_F9B4=vn[63924]=new hn(63924,"unknown_f9b4",void 0,[],void 0),hn.UNKNOWN_F9B5=vn[63925]=new hn(63925,"unknown_f9b5",void 0,[],void 0),hn.UNKNOWN_F9B6=vn[63926]=new hn(63926,"unknown_f9b6",void 0,[],void 0),hn.UNKNOWN_F9B7=vn[63927]=new hn(63927,"unknown_f9b7",void 0,[],void 0),hn.UNKNOWN_F9B8=vn[63928]=new hn(63928,"unknown_f9b8",void 0,[],void 0),hn.UNKNOWN_F9B9=vn[63929]=new hn(63929,"unknown_f9b9",void 0,[],void 0),hn.UNKNOWN_F9BA=vn[63930]=new hn(63930,"unknown_f9ba",void 0,[],void 0),hn.UNKNOWN_F9BB=vn[63931]=new hn(63931,"unknown_f9bb",void 0,[],void 0),hn.UNKNOWN_F9BC=vn[63932]=new hn(63932,"unknown_f9bc",void 0,[],void 0),hn.UNKNOWN_F9BD=vn[63933]=new hn(63933,"unknown_f9bd",void 0,[],void 0),hn.UNKNOWN_F9BE=vn[63934]=new hn(63934,"unknown_f9be",void 0,[],void 0),hn.UNKNOWN_F9BF=vn[63935]=new hn(63935,"unknown_f9bf",void 0,[],void 0),hn.UNKNOWN_F9C0=vn[63936]=new hn(63936,"unknown_f9c0",void 0,[],void 0),hn.UNKNOWN_F9C1=vn[63937]=new hn(63937,"unknown_f9c1",void 0,[],void 0),hn.UNKNOWN_F9C2=vn[63938]=new hn(63938,"unknown_f9c2",void 0,[],void 0),hn.UNKNOWN_F9C3=vn[63939]=new hn(63939,"unknown_f9c3",void 0,[],void 0),hn.UNKNOWN_F9C4=vn[63940]=new hn(63940,"unknown_f9c4",void 0,[],void 0),hn.UNKNOWN_F9C5=vn[63941]=new hn(63941,"unknown_f9c5",void 0,[],void 0),hn.UNKNOWN_F9C6=vn[63942]=new hn(63942,"unknown_f9c6",void 0,[],void 0),hn.UNKNOWN_F9C7=vn[63943]=new hn(63943,"unknown_f9c7",void 0,[],void 0),hn.UNKNOWN_F9C8=vn[63944]=new hn(63944,"unknown_f9c8",void 0,[],void 0),hn.UNKNOWN_F9C9=vn[63945]=new hn(63945,"unknown_f9c9",void 0,[],void 0),hn.UNKNOWN_F9CA=vn[63946]=new hn(63946,"unknown_f9ca",void 0,[],void 0),hn.UNKNOWN_F9CB=vn[63947]=new hn(63947,"unknown_f9cb",void 0,[],void 0),hn.UNKNOWN_F9CC=vn[63948]=new hn(63948,"unknown_f9cc",void 0,[],void 0),hn.UNKNOWN_F9CD=vn[63949]=new hn(63949,"unknown_f9cd",void 0,[],void 0),hn.UNKNOWN_F9CE=vn[63950]=new hn(63950,"unknown_f9ce",void 0,[],void 0),hn.UNKNOWN_F9CF=vn[63951]=new hn(63951,"unknown_f9cf",void 0,[],void 0),hn.UNKNOWN_F9D0=vn[63952]=new hn(63952,"unknown_f9d0",void 0,[],void 0),hn.UNKNOWN_F9D1=vn[63953]=new hn(63953,"unknown_f9d1",void 0,[],void 0),hn.UNKNOWN_F9D2=vn[63954]=new hn(63954,"unknown_f9d2",void 0,[],void 0),hn.UNKNOWN_F9D3=vn[63955]=new hn(63955,"unknown_f9d3",void 0,[],void 0),hn.UNKNOWN_F9D4=vn[63956]=new hn(63956,"unknown_f9d4",void 0,[],void 0),hn.UNKNOWN_F9D5=vn[63957]=new hn(63957,"unknown_f9d5",void 0,[],void 0),hn.UNKNOWN_F9D6=vn[63958]=new hn(63958,"unknown_f9d6",void 0,[],void 0),hn.UNKNOWN_F9D7=vn[63959]=new hn(63959,"unknown_f9d7",void 0,[],void 0),hn.UNKNOWN_F9D8=vn[63960]=new hn(63960,"unknown_f9d8",void 0,[],void 0),hn.UNKNOWN_F9D9=vn[63961]=new hn(63961,"unknown_f9d9",void 0,[],void 0),hn.UNKNOWN_F9DA=vn[63962]=new hn(63962,"unknown_f9da",void 0,[],void 0),hn.UNKNOWN_F9DB=vn[63963]=new hn(63963,"unknown_f9db",void 0,[],void 0),hn.UNKNOWN_F9DC=vn[63964]=new hn(63964,"unknown_f9dc",void 0,[],void 0),hn.UNKNOWN_F9DD=vn[63965]=new hn(63965,"unknown_f9dd",void 0,[],void 0),hn.UNKNOWN_F9DE=vn[63966]=new hn(63966,"unknown_f9de",void 0,[],void 0),hn.UNKNOWN_F9DF=vn[63967]=new hn(63967,"unknown_f9df",void 0,[],void 0),hn.UNKNOWN_F9E0=vn[63968]=new hn(63968,"unknown_f9e0",void 0,[],void 0),hn.UNKNOWN_F9E1=vn[63969]=new hn(63969,"unknown_f9e1",void 0,[],void 0),hn.UNKNOWN_F9E2=vn[63970]=new hn(63970,"unknown_f9e2",void 0,[],void 0),hn.UNKNOWN_F9E3=vn[63971]=new hn(63971,"unknown_f9e3",void 0,[],void 0),hn.UNKNOWN_F9E4=vn[63972]=new hn(63972,"unknown_f9e4",void 0,[],void 0),hn.UNKNOWN_F9E5=vn[63973]=new hn(63973,"unknown_f9e5",void 0,[],void 0),hn.UNKNOWN_F9E6=vn[63974]=new hn(63974,"unknown_f9e6",void 0,[],void 0),hn.UNKNOWN_F9E7=vn[63975]=new hn(63975,"unknown_f9e7",void 0,[],void 0),hn.UNKNOWN_F9E8=vn[63976]=new hn(63976,"unknown_f9e8",void 0,[],void 0),hn.UNKNOWN_F9E9=vn[63977]=new hn(63977,"unknown_f9e9",void 0,[],void 0),hn.UNKNOWN_F9EA=vn[63978]=new hn(63978,"unknown_f9ea",void 0,[],void 0),hn.UNKNOWN_F9EB=vn[63979]=new hn(63979,"unknown_f9eb",void 0,[],void 0),hn.UNKNOWN_F9EC=vn[63980]=new hn(63980,"unknown_f9ec",void 0,[],void 0),hn.UNKNOWN_F9ED=vn[63981]=new hn(63981,"unknown_f9ed",void 0,[],void 0),hn.UNKNOWN_F9EE=vn[63982]=new hn(63982,"unknown_f9ee",void 0,[],void 0),hn.UNKNOWN_F9EF=vn[63983]=new hn(63983,"unknown_f9ef",void 0,[],void 0),hn.UNKNOWN_F9F0=vn[63984]=new hn(63984,"unknown_f9f0",void 0,[],void 0),hn.UNKNOWN_F9F1=vn[63985]=new hn(63985,"unknown_f9f1",void 0,[],void 0),hn.UNKNOWN_F9F2=vn[63986]=new hn(63986,"unknown_f9f2",void 0,[],void 0),hn.UNKNOWN_F9F3=vn[63987]=new hn(63987,"unknown_f9f3",void 0,[],void 0),hn.UNKNOWN_F9F4=vn[63988]=new hn(63988,"unknown_f9f4",void 0,[],void 0),hn.UNKNOWN_F9F5=vn[63989]=new hn(63989,"unknown_f9f5",void 0,[],void 0),hn.UNKNOWN_F9F6=vn[63990]=new hn(63990,"unknown_f9f6",void 0,[],void 0),hn.UNKNOWN_F9F7=vn[63991]=new hn(63991,"unknown_f9f7",void 0,[],void 0),hn.UNKNOWN_F9F8=vn[63992]=new hn(63992,"unknown_f9f8",void 0,[],void 0),hn.UNKNOWN_F9F9=vn[63993]=new hn(63993,"unknown_f9f9",void 0,[],void 0),hn.UNKNOWN_F9FA=vn[63994]=new hn(63994,"unknown_f9fa",void 0,[],void 0),hn.UNKNOWN_F9FB=vn[63995]=new hn(63995,"unknown_f9fb",void 0,[],void 0),hn.UNKNOWN_F9FC=vn[63996]=new hn(63996,"unknown_f9fc",void 0,[],void 0),hn.UNKNOWN_F9FD=vn[63997]=new hn(63997,"unknown_f9fd",void 0,[],void 0),hn.UNKNOWN_F9FE=vn[63998]=new hn(63998,"unknown_f9fe",void 0,[],void 0),hn.UNKNOWN_F9FF=vn[63999]=new hn(63999,"unknown_f9ff",void 0,[],void 0),vn.forEach(e=>{pn.set(e.mnemonic,e)});class fn{constructor(e,t){this.opcode=e,this.args=t,this.arg_size=0,this.param_to_args=[];const n=Math.min(e.params.length,t.length);for(let i=0;i<n;i++){const n=e.params[i].type,o=t[i];switch(this.param_to_args[i]=[],n.kind){case zt.ILabelVar:case zt.RegRefVar:this.arg_size++;for(let e=i;e<t.length;e++)this.param_to_args[i].push(t[e]),this.arg_size+=t[e].size;break;default:this.arg_size+=o.size,this.param_to_args[i].push(o)}}this.size=e.size+this.arg_size}}var mn;function gn(e,t){e.seek_end(32);const n=e.u32(),i=e.u32();e.seek(8);const o=e.u32();return e.seek_start(n),{data_offset:o,index:t?function(e,t){const n=e.u16_array(t),i=[];let o=0;for(const t of n){o+=4*t,e.seek_start(o-4);const n=e.u32(),r=e.u32();i.push({offset:r,size:n})}return i}(e,i):[]}}function kn(e){const t=[];for(;e.bytes_left;){const n=e.u32(),i=e.u32();if(i>e.bytes_left)break;t.push({type:n,data:e.take(i)})}return t}!function(e){e[e.Instructions=0]="Instructions",e[e.Data=1]="Data",e[e.String=2]="String"}(mn||(mn={}));const yn=d.a.get("data_formats/parsing/ninja/njcm");var Rn;function bn(e,t){const n=e.u32(),i=e.u32(),o=e.vec3_f32(),r=e.f32(),s=[],a=[];if(n){e.seek_start(n);for(const n of Nn(e,t,!0))if(n.type===Rn.Vertex)for(const e of n.vertices)s[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(i){let n;e.seek_start(i);for(const i of Nn(e,t,!1))if(i.type===Rn.Tiny)n=i.texture_id;else if(i.type===Rn.Strip){for(const e of i.triangle_strips)e.texture_id=n;a.push(...i.triangle_strips)}}return{type:"njcm",vertices:s,meshes:a,collision_sphere_center:o,collision_sphere_radius:r}}function Nn(e,t,n){const i=[];let o=!0;for(;o;){const r=e.u8(),s=e.u8(),a=e.position;let d=0;if(0===r)i.push({type:Rn.Null,type_id:r});else if(1<=r&&r<=3)i.push({type:Rn.Bits,type_id:r});else if(4===r){const n=s,a=e.position;i.push({type:Rn.CachePolygonList,type_id:r,cache_index:n,offset:a}),t[n]=a,o=!1}else if(5===r){const o=s,a=t[o];null!=a&&(e.seek_start(a),i.push(...Nn(e,t,n))),i.push({type:Rn.DrawPolygonList,type_id:r,cache_index:o})}else if(8<=r&&r<=9){d=2;const t=e.u16();i.push({type:Rn.Tiny,type_id:r,flip_u:0!=(128&r),flip_v:0!=(64&r),clamp_u:0!=(32&r),clamp_v:0!=(16&r),mipmap_d_adjust:15&r,filter_mode:t>>>14,super_sample:0!=(64&t),texture_id:8191&t})}else 17<=r&&r<=31?(d=2+2*e.u16(),i.push({type:Rn.Material,type_id:r})):32<=r&&r<=50?(d=2+4*e.u16(),i.push({type:Rn.Vertex,type_id:r,vertices:En(e,r,s)})):56<=r&&r<=58?(d=2+2*e.u16(),i.push({type:Rn.Volume,type_id:r})):64<=r&&r<=75?(d=2+2*e.u16(),i.push({type:Rn.Strip,type_id:r,triangle_strips:Tn(e,r,s)})):255===r?(d=n?2:0,i.push({type:Rn.End,type_id:r}),o=!1):(d=2+2*e.u16(),i.push({type:Rn.Unknown,type_id:r}),yn.warn(`Unknown chunk type ${r} at offset ${a}.`));e.seek_start(a+d)}return i}function En(e,t,n){if(t<32||t>50)return yn.warn(`Unknown vertex chunk type ${t}.`),[];const i=3&n,o=0!=(128&n),r=e.u16(),s=e.u16(),a=[];for(let n=0;n<s;++n){const s={index:r+n,position:e.vec3_f32(),bone_weight:1,bone_weight_status:i,calc_continue:o};if(32===t)e.seek(4);else if(33===t)e.seek(4),s.normal=e.vec3_f32(),e.seek(4);else if(35<=t&&t<=40)37===t?(s.index=r+e.u16(),s.bone_weight=e.u16()/255):e.seek(4);else if(41<=t&&t<=47)s.normal=e.vec3_f32(),t>=42&&(44===t?(s.index=r+e.u16(),s.bone_weight=e.u16()/255):e.seek(4));else if(48<=t&&t<=50){const n=e.u32();s.normal=new h((n>>20&1023)/1023,(n>>10&1023)/1023,(1023&n)/1023),t>=49&&e.seek(4)}a.push(s)}return a}function Tn(e,t,n){const i={ignore_light:0!=(1&n),ignore_specular:0!=(2&n),ignore_ambient:0!=(4&n),use_alpha:0!=(8&n),double_side:0!=(16&n),flat_shading:0!=(32&n),environment_mapping:0!=(64&n)},o=e.u16(),r=o>>>14,s=16383&o;let a=!1,d=!1,l=!1,u=!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:u=!0;break;default:throw new Error(`Unexpected chunk type ID: ${t}.`)}const c=[];for(let t=0;t<s;++t){const t=e.i16(),n=t<1,o=Math.abs(t),s=[];for(let t=0;t<o;++t){const n={index:e.u16()};s.push(n),a&&(n.tex_coords=new p(e.u16()/255,e.u16()/255)),d&&e.seek(4),l&&(n.normal=new h(e.u16()/255,e.u16()/255,e.u16()/255)),u&&e.seek(8),t>=2&&e.seek(2*r)}c.push(Object.assign({},i,{clockwise_winding:n,has_tex_coords:a,has_normal:l,vertices:s}))}return c}!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"}(Rn||(Rn={}));const Sn=d.a.get("data_formats/parsing/ninja/xj");function On(e){e.seek(4);const t=e.u32(),n=e.u32(),i=e.u32(),o=e.u32(),r=e.u32(),s=e.u32(),a={type:"xj",vertices:[],meshes:[],collision_sphere_position:e.vec3_f32(),collision_sphere_radius:e.f32()};return n>=1&&(n>1&&Sn.warn(`Vertex info count of ${n} was larger than expected.`),a.vertices.push(...function(e,t){e.seek_start(t);const n=e.u16();e.seek(2);const i=e.u32(),o=e.u32(),r=e.u32(),s=[];for(let t=0;t<r;++t){e.seek_start(i+t*o);const r=e.vec3_f32();let a,d;switch(n){case 3:a=e.vec3_f32(),d=e.vec2_f32();break;case 4:break;case 5:e.seek(4),d=e.vec2_f32();break;case 6:a=e.vec3_f32();break;case 7:a=e.vec3_f32(),d=e.vec2_f32();break;default:Sn.warn(`Unknown vertex type ${n} with size ${o}.`)}s.push({position:r,normal:a,uv:d})}return s}(e,t))),a.meshes.push(...Dn(e,i,o)),a.meshes.push(...Dn(e,r,s)),a}function Dn(e,t,n){const i=[];for(let o=0;o<n;++o){e.seek_start(t+20*o);const n=e.u32(),r=e.u32(),s=e.u32(),a=e.u32(),d=Pn(e,n,r);e.seek_start(s);const l=e.u16_array(a);i.push({material_properties:d,indices:l})}return i}function Pn(e,t,n){const i={};for(let o=0;o<n;++o){switch(e.seek_start(t+16*o),e.u32()){case 2:i.alpha_src=e.u32(),i.alpha_dst=e.u32();break;case 3:i.texture_id=e.u32();break;case 5:i.diffuse_r=e.u8(),i.diffuse_g=e.u8(),i.diffuse_b=e.u8(),i.diffuse_a=e.u8()}}return i}const Cn=2*Math.PI/65535,Fn=1296255566;class Wn{constructor(e,t,n,i,o,r){this.bone_cache=new Map,this._bone_count=-1,this.evaluation_flags=e,this.model=t,this.position=n,this.rotation=i,this.scale=o,this.children=r}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,n){if(!e.evaluation_flags.skip){const i=n[0]++;if(this.bone_cache.set(i,e),i===t)return e}if(!e.evaluation_flags.break_child_trace)for(const i of e.children){const e=this.get_bone_internal(i,t,n);if(e)return e}}}function Ln(e){return Mn(e,bn,[])}function Un(e){return Mn(e,On,void 0)}function An(e){return In(e,On,void 0)}function Mn(e,t,n){const i=kn(e).filter(e=>e.type===Fn),o=[];for(const e of i)o.push(...In(e.data,t,n));return o}function In(e,t,n){const i=e.u32(),o=0!=(1&i),r=0!=(2&i),s=0!=(4&i),a=0!=(8&i),d=0!=(16&i),l=0!=(32&i),u=0!=(64&i),c=0!=(128&i),_=e.u32(),w=e.f32(),v=e.f32(),p=e.f32(),f=e.i32()*Cn,m=e.i32()*Cn,g=e.i32()*Cn,k=e.f32(),y=e.f32(),R=e.f32(),b=e.u32(),N=e.u32();let E,T,S;return _&&(e.seek_start(_),E=t(e,n)),b?(e.seek_start(b),T=In(e,t,n)):T=[],N?(e.seek_start(N),S=In(e,t,n)):S=[],[new Wn({no_translate:o,no_rotate:r,no_scale:s,hidden:a,break_child_trace:d,zxy_rotation_order:l,skip:u,shape_skip:c},E,new h(w,v,p),new h(f,m,g),new h(k,y,R),T),...S]}function Bn(e,t,n){const i=[];for(let o=0;o<n;o++){e.seek_start(t+16*o);let n=e.u32();e.seek(8),4&e.u32()&&(n=e.seek_start(n).u32()),e.seek_start(n),i.push(...An(e))}return i}var xn=n("Womt");class jn{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 xn.Vector3(this.positions[3*e],this.positions[3*e+1],this.positions[3*e+2])}get_normal(e){return new xn.Vector3(this.normals[3*e],this.normals[3*e+1],this.normals[3*e+2])}add_vertex(e,t,n){this.positions.push(e.x,e.y,e.z),this.normals.push(t.x,t.y,t.z),this.uvs.push(n.x,n.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,n){const i=this.groups[this.groups.length-1],o=null==n?-1:n;i&&i.material_index===o?i.size+=t:(this.groups.push({offset:e,size:t,material_index:o}),this.material_indices.add(o))}build(){const e=new xn.BufferGeometry,t=e.userData;t.created_by_geometry_builder=!0,e.addAttribute("position",new xn.Float32BufferAttribute(this.positions,3)),e.addAttribute("normal",new xn.Float32BufferAttribute(this.normals,3)),e.addAttribute("uv",new xn.Float32BufferAttribute(this.uvs,2)),e.setIndex(new xn.Uint16BufferAttribute(this.indices,1)),this.bone_indices.length&&this.bones.length?(e.addAttribute("skinIndex",new xn.Uint16BufferAttribute(this.bone_indices,4)),e.addAttribute("skinWeight",new xn.Float32BufferAttribute(this.bone_weights,4)),t.bones=this.bones):t.bones=[];const n=new Map;let i=0;for(const e of[...this.material_indices].sort((e,t)=>e-t))n.set(e,i++);for(const t of this.groups)e.addGroup(t.offset,t.size,n.get(t.material_index));return t.normalized_material_indices=n,e.computeBoundingSphere(),e.computeBoundingBox(),e}}function Gn(e){return new xn.Vector3(e.x,e.y,e.z)}const Kn=new xn.Vector3(0,1,0),zn=new xn.Vector2(0,0),Hn=new xn.Vector3(0,0,0),Vn=new xn.Quaternion(0,0,0,1),$n=new xn.Vector3(1,1,1);function qn(e,t){new Zn(t).to_geometry_builder(e)}function Jn(e){return new Zn(new jn).create_buffer_geometry(e)}class Yn{constructor(){this.vertices_stack=[]}put(e){this.vertices_stack.push(e)}get(e){const t=[];for(let n=this.vertices_stack.length-1;n>=0;n--){const i=this.vertices_stack[n][e];i&&t.push(i)}return t}}class Zn{constructor(e){this.vertices=new Yn,this.bone_id=0,this.builder=e}to_geometry_builder(e){this.object_to_geometry(e,void 0,new xn.Matrix4)}create_buffer_geometry(e){return this.to_geometry_builder(e),this.builder.build()}object_to_geometry(e,t,n){const{no_translate:i,no_rotate:o,no_scale:r,hidden:s,break_child_trace:a,zxy_rotation_order:d,skip:l}=e.evaluation_flags,{position:u,rotation:c,scale:_}=e,w=new xn.Euler(c.x,c.y,c.z,d?"ZXY":"ZYX"),v=(new xn.Matrix4).compose(i?Hn:Gn(u),o?Vn:(new xn.Quaternion).setFromEuler(w),r?$n:Gn(_)).premultiply(n);let p;if(l?p=t:((p=new xn.Bone).name=this.bone_id.toString(),p.position.set(u.x,u.y,u.z),p.setRotationFromEuler(w),p.scale.set(_.x,_.y,_.z),this.builder.add_bone(p),t&&t.add(p)),e.model&&!s&&this.model_to_geometry(e.model,v),this.bone_id++,!a)for(const t of e.children)this.object_to_geometry(t,p,v)}model_to_geometry(e,t){!function(e){return"njcm"===e.type}(e)?this.xj_model_to_geometry(e,t):this.njcm_model_to_geometry(e,t)}njcm_model_to_geometry(e,t){const n=(new xn.Matrix3).getNormalMatrix(t),i=e.vertices.map(e=>{const i=Gn(e.position),o=e.normal?Gn(e.normal):new xn.Vector3(0,1,0);return i.applyMatrix4(t),o.applyMatrix3(n),{bone_id:this.bone_id,position:i,normal:o,bone_weight:e.bone_weight,bone_weight_status:e.bone_weight_status,calc_continue:e.calc_continue}});this.vertices.put(i);for(const t of e.meshes){const e=this.builder.index_count;for(let e=0;e<t.vertices.length;++e){const n=t.vertices[e],i=this.vertices.get(n.index);if(i.length){const o=i[0],r=o.normal||n.normal||Kn,s=this.builder.vertex_count;this.builder.add_vertex(o.position,r,t.has_tex_coords?n.tex_coords:zn),e>=2&&(e%2==(t.clockwise_winding?1:0)?(this.builder.add_index(s-2),this.builder.add_index(s-1),this.builder.add_index(s)):(this.builder.add_index(s-2),this.builder.add_index(s),this.builder.add_index(s-1)));const a=[[0,0],[0,0],[0,0],[0,0]];for(let e=i.length-1;e>=0;e--){const t=i[e];a[t.bone_weight_status]=[t.bone_id,t.bone_weight]}for(const[e,t]of a)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 n=this.builder.vertex_count,i=(new xn.Matrix3).getNormalMatrix(t);for(let{position:n,normal:o,uv:r}of e.vertices){const e=Gn(n).applyMatrix4(t),s=(o?Gn(o):new xn.Vector3(0,1,0)).applyMatrix3(i),a=r||zn;this.builder.add_vertex(e,s,a)}let o;for(const t of e.meshes){const e=this.builder.index_count;let i=!1;for(let e=2;e<t.indices.length;++e){const o=n+t.indices[e-2],r=n+t.indices[e-1],s=n+t.indices[e],a=this.builder.get_position(o),d=this.builder.get_position(r),l=this.builder.get_position(s),u=this.builder.get_normal(o),c=this.builder.get_normal(r),_=this.builder.get_normal(s),w=d.clone().sub(a).cross(l.clone().sub(a));i&&w.negate(),(w.dot(u)<0?1:0)+(w.dot(c)<0?1:0)+(w.dot(_)<0?1:0)>=2&&(i=!i),i?(this.builder.add_index(r),this.builder.add_index(o),this.builder.add_index(s)):(this.builder.add_index(o),this.builder.add_index(r),this.builder.add_index(s)),i=!i}null!=t.material_properties.texture_id&&(o=t.material_properties.texture_id),this.builder.add_group(e,this.builder.index_count-e,o)}}}const Xn=[new xn.MeshBasicMaterial({color:8437968,transparent:!0,opacity:.25,visible:!1}),new xn.MeshLambertMaterial({color:10526880,side:xn.DoubleSide}),new xn.MeshLambertMaterial({color:5288048,side:xn.DoubleSide}),new xn.MeshLambertMaterial({color:6307968,side:xn.DoubleSide})],Qn=[new xn.MeshBasicMaterial({color:9490656,wireframe:!0,transparent:!0,opacity:.3,visible:!1}),new xn.MeshBasicMaterial({color:13684944,wireframe:!0}),new xn.MeshBasicMaterial({color:8446112,wireframe:!0}),new xn.MeshBasicMaterial({color:9466032,wireframe:!0})];var ei=function(e,t,n,i){return new(n||(n=Promise))(function(o,r){function s(e){try{d(i.next(e))}catch(e){r(e)}}function a(e){try{d(i.throw(e))}catch(e){r(e)}}function d(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}d((i=i.apply(e,t||[])).next())})};function ti(e){return ei(this,void 0,void 0,function*(){return(yield fetch("/assets"+e)).arrayBuffer()})}class ni{constructor(){this.map=new Map}set(e,t){this.map.set(e,t)}get_or_set(e,t){let n=this.map.get(e);return void 0===n&&(n=t(),this.map.set(e,n)),n}}var ii=function(e,t,n,i){return new(n||(n=Promise))(function(o,r){function s(e){try{d(i.next(e))}catch(e){r(e)}}function a(e){try{d(i.throw(e))}catch(e){r(e)}}function d(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}d((i=i.apply(e,t||[])).next())})};const oi=new ni,ri=new ni;function si(e,t,n){return ii(this,void 0,void 0,function*(){return ri.get_or_set(`${e}-${t}-${n}`,()=>li(e,t,n,"collision").then(e=>(function(e){const t=new xn.Group;for(const n of e.meshes){const e=new xn.Geometry;for(const{x:t,y:i,z:o}of n.vertices)e.vertices.push(new xn.Vector3(t,i,o));for(const{indices:t,flags:i,normal:o}of n.triangles){const n=16&i,r=1&i,s=64&i?3:n?2:r?1:0;e.faces.push(new xn.Face3(t[0],t[1],t[2],new xn.Vector3(o.x,o.y,o.z),void 0,s))}e.computeBoundingBox(),e.computeBoundingSphere();const i=new xn.Mesh(e,Xn);i.renderOrder=1,t.add(i);const o=new xn.Mesh(e,Qn);o.renderOrder=2,t.add(o)}return t})(function(e){const{data_offset:t}=gn(e,!1);e.seek_start(t);const n=e.u32();e.seek_start(n);const i={meshes:[]};for(;e.bytes_left;){const t=e.position,n=e.u32();if(0===n)break;const o={vertices:[],triangles:[]};i.meshes.push(o),e.seek_start(n);const r=e.u32(),s=e.u32(),a=e.u32(),d=e.u32();e.seek_start(s);for(let t=0;t<r;t++){const t=e.f32(),n=e.f32(),i=e.f32();o.vertices.push(new h(t,n,i))}e.seek_start(d);for(let t=0;t<a;t++){const t=e.u16(),n=e.u16(),i=e.u16(),r=e.u16(),s=e.f32(),a=e.f32(),d=e.f32();e.seek(16),o.triangles.push({indices:[t,n,i],flags:r,normal:new h(s,a,d)})}e.seek_start(t+24)}return i}(new $t(e,Kt.Little)))))})}function ai(e,t,n){const i=li(e,t,n,"render").then(e=>(function(e){const t=[],n=new xn.Group;let i=0;for(const o of e.sections){const e=new jn;for(const t of o.objects)qn(t,e);const r=new xn.Mesh(e.build(),new xn.MeshBasicMaterial({color:(new xn.Color).setHSL(i++%7/7,1,.5),transparent:!0,opacity:.25,side:xn.DoubleSide}));if(n.add(r),r.position.set(o.position.x,o.position.y,o.position.z),r.rotation.set(o.rotation.x,o.rotation.y,o.rotation.z),o.id>=0){const e=new x(o.id,o.position,o.rotation.y);t.push(e),r.userData.section=e}}return[t,n]})(function(e){const t=[];e.seek_end(16);const{data_offset:n}=gn(e,!1);e.seek_start(n),e.seek(8);const i=e.u32();e.seek(4);const o=e.u32();for(let n=0;n<i;n++){e.seek_start(o+52*n);const i=e.i32(),r=e.vec3_f32(),s=new h(e.u32()*Cn,e.u32()*Cn,e.u32()*Cn);e.seek(4);const a=e.u32();e.seek(4);const d=e.u32(),l=Bn(e,a,d);t.push({id:i,position:r,rotation:s,objects:l})}return{sections:t}}(new $t(e,Kt.Little))));return{geometry:i.then(([,e])=>e),sections:i.then(([e])=>e)}}const di=[[["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 li(e,t,n,i){return ii(this,void 0,void 0,function*(){return ti(function(e,t,n){const i=di[e-1];if(0<=t&&t<i.length){const[o,r]=i[t];if(0<=n&&n<r){let e;if(1===r)e="";else for(e=String(n);e.length<2;)e="0"+e;return`/maps/map_${o}${e}`}throw new Error(`Unknown variant ${n} of area ${t} in episode ${e}.`)}throw new Error(`Unknown episode ${e} area ${t}.`)}(e,t,n)+("render"===i?"n.rel":"c.rel"))})}function ui(e,t,n,i){const o=new H(e,t,n,[]),r=Array(i).fill(null).map((e,t)=>new V(t,o));return o.area_variants.splice(0,0,...r),o}const ci=new class{constructor(){this.areas=[],this.get_area=(e,t)=>{const n=this.areas[e].find(e=>e.id===t);if(!n)throw new Error(`Area id ${t} for episode ${e} is invalid.`);return n},this.get_variant=(e,t,n)=>{const i=this.get_area(e,t).area_variants[n];if(!i)throw new Error(`Area variant id ${n} for area ${t} of episode ${e} is invalid.`);return i},this.get_area_sections=(e,t,n)=>(function(e,t,n){return ii(this,void 0,void 0,function*(){return oi.get_or_set(`${e}-${t}-${n}`,()=>ai(e,t,n)).sections})})(e,t,n);let e=0;this.areas[L.I]=[ui(0,"Pioneer II",e++,1),ui(1,"Forest 1",e++,1),ui(2,"Forest 2",e++,1),ui(11,"Under the Dome",e++,1),ui(3,"Cave 1",e++,6),ui(4,"Cave 2",e++,5),ui(5,"Cave 3",e++,6),ui(12,"Underground Channel",e++,1),ui(6,"Mine 1",e++,6),ui(7,"Mine 2",e++,6),ui(13,"Monitor Room",e++,1),ui(8,"Ruins 1",e++,5),ui(9,"Ruins 2",e++,5),ui(10,"Ruins 3",e++,5),ui(14,"Dark Falz",e++,1),ui(15,"BA Ruins",e++,3),ui(16,"BA Spaceship",e++,3),ui(17,"Lobby",e++,15)],e=0,this.areas[L.II]=[ui(0,"Lab",e++,1),ui(1,"VR Temple Alpha",e++,3),ui(2,"VR Temple Beta",e++,3),ui(14,"VR Temple Final",e++,1),ui(3,"VR Spaceship Alpha",e++,3),ui(4,"VR Spaceship Beta",e++,3),ui(15,"VR Spaceship Final",e++,1),ui(5,"Central Control Area",e++,1),ui(6,"Jungle Area East",e++,1),ui(7,"Jungle Area North",e++,1),ui(8,"Mountain Area",e++,3),ui(9,"Seaside Area",e++,1),ui(12,"Cliffs of Gal Da Val",e++,1),ui(10,"Seabed Upper Levels",e++,3),ui(11,"Seabed Lower Levels",e++,3),ui(13,"Test Subject Disposal Area",e++,1),ui(16,"Seaside Area at Night",e++,1),ui(17,"Control Tower",e++,5)],e=0,this.areas[L.IV]=[ui(0,"Pioneer II (Ep. IV)",e++,1),ui(1,"Crater Route 1",e++,1),ui(2,"Crater Route 2",e++,1),ui(3,"Crater Route 3",e++,1),ui(4,"Crater Route 4",e++,1),ui(5,"Crater Interior",e++,1),ui(6,"Subterranean Desert 1",e++,3),ui(7,"Subterranean Desert 2",e++,3),ui(8,"Subterranean Desert 3",e++,3),ui(9,"Meteor Impact Site",e++,1)]}};class _i extends Vt{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}constructor(e,t,n=0,i=e.size-n){if(n<0||n>e.size)throw new Error(`Offset ${n} is out of bounds.`);if(i<0||n+i>e.size)throw new Error(`Size ${i} is out of bounds.`);super(t,n),this.buffer=e,this._size=i}take(e){this.check_size("size",e,e);const t=this.offset+this.position,n=new _i(this.buffer,this.endianness,t,e);return this._position+=e,n}ensure_size(e){const t=this.position+e-this._size;t>0&&(this._size+=t,this.buffer.size<this.offset+this._size&&(this.buffer.size=this.offset+this._size))}}class wi{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(t<e);const n=new ArrayBuffer(t);new Uint8Array(n).set(new Uint8Array(this._buffer,0,this.size)),this._buffer=n,this._data_view=new DataView(this._buffer)}}}function vi(e){const t=new pi(e.size,e.endianness);for(;e.bytes_left;){let n=0,i=0;const o=Math.max(0,e.position-Math.min(2048,e.bytes_left));for(let t=e.position-255;t>=o;t--){let o=e.position,r=t,s=0;for(;o+3<e.size&&s<252&&e.u32_at(o)===e.u32_at(r);)s+=4,o+=4,r+=4;for(;o<e.size&&s<255&&e.u8_at(o)===e.u8_at(r);)s++,o++,r++;if(s>=i&&(n=t,i=s,s>=255))break}i<3?t.add_u8(e.u8()):(t.copy(n-e.position,i),e.seek(i))}return t.finalize()}class pi{constructor(e,t){this.flags=0,this.flag_bits_left=0,this.flag_offset=0,this.output=new _i(new wi(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))}}const hi=d.a.get("data_formats/compression/prs/decompress");function fi(e){const t=new mi(e);for(;;)if(1===t.read_flag_bit())t.copy_u8();else{let e,n;if(0===t.read_flag_bit())e=t.read_flag_bit()<<1,e|=t.read_flag_bit(),e+=2,n=t.read_u8()-256;else{if(0===(n=t.read_u16()))break;e=7&n,n>>>=3,0===e?(e=t.read_u8(),e+=1):e+=2,n-=8192}t.offset_copy(n,e)}return t.dst.seek_start(0)}class mi{constructor(e){this.src=e,this.dst=new _i(new wi(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)&&hi.error(`offset was ${e}, should be between -8192 and 0.`),(t<1||t>256)&&hi.error(`length was ${t}, should be between 1 and 256.`);const n=Math.min(-e,t);this.dst.seek(e);const i=this.dst.take(n);this.dst.seek(-e-n);for(let e=0;e<Math.floor(t/n);++e)this.dst.write_cursor(i),i.seek_start(0);this.dst.write_cursor(i.take(t%n))}}var gi;!function(e){e[e.None=0]="None",e[e.Return=1]="Return",e[e.Jump=2]="Jump",e[e.ConditionalJump=3]="ConditionalJump",e[e.Call=4]="Call"}(gi||(gi={}));class ki{constructor(e,t,n,i,o){this.segment=e,this.start=t,this.end=n,this.branch_type=i,this.branch_labels=o,this.from=[],this.to=[]}link_to(e){this.to.includes(e)||(this.to.push(e),e.from.push(this))}index_of_instruction(e){const t=this.segment.instructions.indexOf(e,this.start);return t<this.end?t:-1}}class yi{constructor(){this.blocks=[],this.instructions_to_block=new Map,this.labels_to_block=new Map}get_block_for_instuction(e){return this.instructions_to_block.get(e)}get_block_for_label(e){return this.labels_to_block.get(e)}static create(e){const t=new yi;for(const n of e)this.create_basic_blocks(t,n);return this.link_blocks(t),t}static create_basic_blocks(e,t){const n=t.instructions.length;let i=0,o=!0;for(let r=0;r<n;r++){const s=t.instructions[r];let a,d;switch(s.opcode){case hn.RET:a=gi.Return,d=[];break;case hn.JMP:a=gi.Jump,d=[s.args[0].value];break;case hn.JMP_ON:case hn.JMP_OFF:a=gi.ConditionalJump,d=[s.args[0].value];break;case hn.JMP_E:case hn.JMPI_E:case hn.JMP_NE:case hn.JMPI_NE:case hn.UJMP_G:case hn.UJMPI_G:case hn.JMP_G:case hn.JMPI_G:case hn.UJMP_L:case hn.UJMPI_L:case hn.JMP_L:case hn.JMPI_L:case hn.UJMP_GE:case hn.UJMPI_GE:case hn.JMP_GE:case hn.JMPI_GE:case hn.UJMP_LE:case hn.UJMPI_LE:case hn.JMP_LE:case hn.JMPI_LE:a=gi.ConditionalJump,d=[s.args[2].value];break;case hn.SWITCH_JMP:a=gi.ConditionalJump,d=s.args.slice(1).map(e=>e.value);break;case hn.CALL:case hn.VA_CALL:a=gi.Call,d=[s.args[0].value];break;case hn.SWITCH_CALL:a=gi.Call,d=s.args.slice(1).map(e=>e.value);break;default:if(r===n-1){a=gi.None,d=[];break}continue}const l=new ki(t,i,r+1,a,d);for(let t=l.start;t<l.end;t++)e.instructions_to_block.set(l.segment.instructions[t],l);if(e.blocks.push(l),o){for(const n of t.labels)e.labels_to_block.set(n,l);o=!1}i=r+1}}static link_blocks(e){const t=[];for(let n=0;n<e.blocks.length;n++){const i=e.blocks[n],o=e.blocks[n+1];switch(i.branch_type){case gi.Return:continue;case gi.Call:o&&t.push([i,o]);break;case gi.None:case gi.ConditionalJump:o&&i.link_to(o)}for(const t of i.branch_labels){const n=e.labels_to_block.get(t);n&&i.link_to(n)}}for(const[n,i]of t)Ri(e.labels_to_block,i,n)}}function Ri(e,t,n){for(const i of n.branch_labels){const n=e.get(i);n&&(n.branch_type===gi.Return?n.link_to(t):bi(new Set,t,n))}}function bi(e,t,n){if(!e.has(n)){e.add(n);for(const i of n.to)i.branch_type===gi.Return?i.link_to(t):bi(e,t,i)}}class Ni{constructor(){this.intervals=[]}size(){return this.intervals.reduce((e,t)=>e+t.end-t.start+1,0)}get(e){for(const{start:t,end:n}of this.intervals){const i=n-t+1;if(e<i)return t+e;e-=i}}min(){return this.intervals.length?this.intervals[0].start:void 0}max(){return this.intervals.length?this.intervals[this.intervals.length-1].end:void 0}has(e){for(const t of this.intervals)if(t.start<=e&&e<=t.end)return!0;return!1}set_value(e){return this.intervals=[{start:e,end:e}],this}set_interval(e,t){if(t<e)throw new Error(`Interval upper bound should be greater than or equal to lower bound, got [${e}, ${t}].`);return this.intervals=[{start:e,end:t}],this}scalar_add(e){for(const t of this.intervals)t.start+=e,t.end+=e;return this}scalar_sub(e){return this.scalar_add(-e)}scalar_mul(e){for(const t of this.intervals)t.start*=e,t.end*=e;return this}scalar_div(e){for(const t of this.intervals)t.start=Math.floor(t.start/e),t.end=Math.floor(t.end/e);return this}union(e){let t=0;e:for(const n of e.intervals){for(;t<this.intervals.length;){const e=this.intervals[t];if(n.end<e.start-1){this.intervals.splice(t,0,n),t++;continue e}if(n.start<=e.end+1){e.start=Math.min(e.start,n.start);let i=t;for(;i<this.intervals.length&&n.end>this.intervals[i].start;)e.end=this.intervals[i].end,i++;this.intervals.splice(t+1,i-t-1),e.end=Math.max(e.end,n.end),t++;continue e}t++}this.intervals.push(n)}return this}to_array(){let e=[];for(const{start:t,end:n}of this.intervals)for(let i=t;i<=n;i++)e.push(i);return e}[Symbol.iterator](){const e=this;let t=0,n=NaN;return{next(){let i=!0;return t<e.intervals.length&&(isNaN(n)?(n=e.intervals[t].start,i=!1):n>e.intervals[t].end?++t<e.intervals.length&&(n=e.intervals[t].start,i=!1):i=!1),{done:i,value:n++}}}}}const Ei=d.a.get("scripting/data_flow_analysis/register_value"),Ti=ln,Si=un;Math.pow(2,32);function Oi(e,t,n){const i=e.get_block_for_instuction(t);return i?function e(t,n,i,o,r){if(++t.iterations>100)return Ei.warn("Too many iterations."),(new Ni).set_interval(Ti,Si);for(let s=o-1;s>=i.start;s--){const o=i.segment.instructions[s],a=o.args;switch(o.opcode){case hn.LET:if(a[0].value===r)return e(t,new Set(n),i,s,a[1].value);break;case hn.LETI:case hn.LETB:case hn.LETW:case hn.SYNC_LETI:if(a[0].value===r)return(new Ni).set_value(a[1].value);break;case hn.SET:if(a[0].value===r)return(new Ni).set_value(1);break;case hn.CLEAR:if(a[0].value===r)return(new Ni).set_value(0);break;case hn.REV:if(a[0].value===r){const o=e(t,new Set(n),i,s,r),a=o.size();return 0===a||1===a&&0===o.get(0)?(new Ni).set_value(1):o.has(0)?(new Ni).set_interval(0,1):(new Ni).set_value(0)}break;case hn.ADDI:if(a[0].value===r){const o=e(t,new Set(n),i,s,r);return o.scalar_add(a[1].value)}break;case hn.SUBI:if(a[0].value===r){const o=e(t,new Set(n),i,s,r);return o.scalar_sub(a[1].value)}break;case hn.MULI:if(a[0].value===r){const o=e(t,new Set(n),i,s,r);return o.scalar_mul(a[1].value)}break;case hn.DIVI:if(a[0].value===r){const o=e(t,new Set(n),i,s,r);return o.scalar_div(a[1].value)}break;case hn.IF_ZONE_CLEAR:if(a[0].value===r)return(new Ni).set_interval(0,1);break;case hn.GET_DIFFLVL:if(a[0].value===r)return(new Ni).set_interval(0,2);break;case hn.GET_SLOTNUMBER:if(a[0].value===r)return(new Ni).set_interval(0,3);break;case hn.GET_RANDOM:if(a[1].value===r){const o=e(t,new Set(n),i,s,a[0].value).min()||0,r=Math.max(e(t,new Set(n),i,s,a[0].value+1).max()||0,o+1);return(new Ni).set_interval(o,r-1)}break;case hn.STACK_PUSHM:case hn.STACK_POPM:{const e=a[0].value,t=a[0].value+a[1].value;if(e<=r&&r<t)return(new Ni).set_interval(Ti,Si)}break;default:{const e=o.opcode.params,t=Math.min(a.length,e.length);for(let n=0;n<t;n++){const t=e[n];if(t.type.kind==zt.RegTupRef){const e=a[n].value;let i=0;for(const n of t.type.register_tuples){if((n.access===cn.Write||n.access===cn.ReadWrite)&&e+i===r)return(new Ni).set_interval(Ti,Si);i++}}}}}}const s=new Ni;n.add(i);for(const o of i.from){if(n.has(o)){s.set_interval(Ti,Si);break}s.union(e(t,new Set(n),o,o.end,r))}return s}(new Di,new Set,i,i.index_of_instruction(t),n):new Ni}class Di{constructor(){this.iterations=0}}const Pi=d.a.get("scripting/data_flow_analysis/stack_value"),Ci=ln,Fi=un;function Wi(e,t,n){const i=e.get_block_for_instuction(t);return i?function e(t,n,i,o,r){if(++t.iterations>100)return Pi.warn("Too many iterations."),(new Ni).set_interval(Ci,Fi);for(let e=o-1;e>=i.start;e--){const n=i.segment.instructions[e];if(n.opcode.stack===_n.Pop){r+=n.opcode.params.length;continue}const o=n.args;switch(n.opcode){case hn.ARG_PUSHR:if(0===r)return Oi(t.cfg,n,o[0].value);r--;break;case hn.ARG_PUSHL:case hn.ARG_PUSHB:case hn.ARG_PUSHW:if(0===r)return(new Ni).set_value(o[0].value);r--;break;case hn.ARG_PUSHA:case hn.ARG_PUSHO:case hn.ARG_PUSHS:if(0===r)return(new Ni).set_interval(Ci,Fi);r--}}const s=new Ni;n.add(i);for(const o of i.from){if(n.has(o)){s.set_interval(Ci,Fi);break}s.union(e(t,new Set(n),o,o.end,r))}return s}(new Li(e),new Set,i,i.index_of_instruction(t),n):new Ni}class Li{constructor(e){this.cfg=e,this.iterations=0}}const Ui=d.a.get("data_formats/parsing/quest/bin");class Ai{constructor(e,t,n,i,o,r,s){this.quest_id=e,this.language=t,this.quest_name=n,this.short_description=i,this.long_description=o,this.object_code=r,this.shop_items=s}}const Mi=[];function Ii(e,t=[0],n=!1){const i=e.u32(),o=e.u32(),r=e.u32();e.seek(4);const s=e.u32(),a=e.u32(),d=e.string_utf16(64,!0,!0),l=e.string_utf16(256,!0,!0),u=e.string_utf16(576,!0,!0);r!==e.size&&Ui.warn(`Value ${r} in bin size field does not match actual size ${e.size}.`),e.seek(4);const c=e.u32_array(932),_=Math.floor((e.size-o)/4);e.seek_start(o);const w=e.i32_array(_),v=new xi(w),p=function(e,t,n,i){const o=new Map;!function(e,t,n,i,o){let r;do{r=i.size;for(const[r,s]of n)Gi(i,t,e,r,s,o);const s=[...i.entries()].filter(([,e])=>e.type===mn.Instructions).sort(([e],[t])=>e-t).map(([,e])=>e),a=yi.create(s);n=new Map;for(const e of s)for(const t of e.instructions)for(let e=0;e<t.opcode.params.length;e++){const i=t.opcode.params[e];switch(i.type.kind){case zt.ILabel:ji(a,n,t,e,mn.Instructions);break;case zt.ILabelVar:for(;e<t.args.length;e++)n.set(t.args[e].value,mn.Instructions);break;case zt.DLabel:ji(a,n,t,e,mn.Data);break;case zt.SLabel:ji(a,n,t,e,mn.String);break;case zt.RegTupRef:const o=t.args[e];for(let e=0;e<i.type.register_tuples.length;e++){const r=i.type.register_tuples[e];if(r.type.kind===zt.ILabel){const i=Oi(a,t,o.value+e);if(i.size()<=10)for(const e of i)n.set(e,mn.Instructions)}}}}}while(i.size>r)}(e,t,n.reduce((e,t)=>e.set(t,mn.Instructions),new Map),o,i);const r=[];let s=0;for(;s<e.size;){let n=o.get(s);if(!n){const i=t.get_labels(s);let r;if(i){const n=t.get_info(i[0]);r=n.next?n.next.offset:e.size}else{r=e.size;for(const e of t.labels)if(e.offset>s){r=e.offset;break}}if(e.seek_start(s),Ki(o,e,r,i||[]),n=o.get(s),r<=s){Ui.error(`Next offset ${r} was smaller than or equal to current offset ${s}.`);break}if(!n){Ui.error(`Couldn't create segment for offset ${s}.`);continue}}switch(r.push(n),n.type){case mn.Instructions:for(const e of n.instructions)s+=e.size;break;case mn.Data:s+=n.data.byteLength;break;case mn.String:s+=4*Math.ceil((n.value.length+1)/2);break;default:throw new Error(`${mn[n.type]} not implemented.`)}}for(const{label:e,offset:n}of t.labels){const t=o.get(n);t?t.labels.includes(e)||(t.labels.push(e),t.labels.sort((e,t)=>e-t)):Ui.warn(`Label ${e} with offset ${n} does not point to anything.`)}if(e.size!==s){const t=`Expected to parse ${e.size} bytes but parsed ${s} instead.`;if(!i)throw new Error(t);Ui.error(t)}return r}(e.seek_start(i).take(o-i),v,t,n);return new Ai(s,a,d,l,u,p,c)}function Bi(e){const t=new wi(4652+100*e.object_code.length),n=new _i(t,Kt.Little);if(n.write_u32(4652),n.write_u32(0),n.write_u32(0),n.write_u32(4294967295),n.write_u32(e.quest_id),n.write_u32(e.language),n.write_string_utf16(e.quest_name,64),n.write_string_utf16(e.short_description,256),n.write_string_utf16(e.long_description,576),n.write_u32(0),e.shop_items.length>932)throw new Error(`shop_items can't be larger than 932, was ${e.shop_items.length}.`);n.write_u32_array(e.shop_items);for(let t=e.shop_items.length;t<932;t++)n.write_u32(0);for(;n.position<4652;)n.write_u8(0);const{size:i,label_offsets:o}=function(e,t){const n=e.position,i=[];for(const o of t){for(const t of o.labels)i[t]=e.position-n;if(o.type===mn.Instructions)for(const t of o.instructions){const n=t.opcode;if(2===n.size&&e.write_u8(n.code>>>8),e.write_u8(255&n.code),n.stack!==_n.Pop)for(let i=0;i<n.params.length;i++){const o=n.params[i],r=t.param_to_args[i],[s]=r;switch(o.type.kind){case zt.Byte:s.value>=0?e.write_u8(s.value):e.write_i8(s.value);break;case zt.Word:s.value>=0?e.write_u16(s.value):e.write_i16(s.value);break;case zt.DWord:s.value>=0?e.write_u32(s.value):e.write_i32(s.value);break;case zt.Float:e.write_f32(s.value);break;case zt.Label:case zt.ILabel:case zt.DLabel:case zt.SLabel:e.write_u16(s.value);break;case zt.String:e.write_string_utf16(s.value,s.size);break;case zt.ILabelVar:e.write_u8(r.length),e.write_u16_array(r.map(e=>e.value));break;case zt.RegRef:case zt.RegTupRef:e.write_u8(s.value);break;case zt.RegRefVar:e.write_u8(r.length),e.write_u8_array(r.map(e=>e.value));break;default:throw new Error(`Parameter type ${zt[o.type.kind]} not implemented.`)}}}else if(o.type===mn.String){const t=4*Math.ceil((o.value.length+1)/2);e.write_string_utf16(o.value,t)}else e.write_cursor(new $t(o.data,e.endianness))}return{size:e.position-n,label_offsets:i}}(n,e.object_code);for(let e=0;e<o.length;e++){const t=o[e];null==t?n.write_i32(-1):n.write_i32(t)}const r=n.position;return n.seek_start(4),n.write_u32(4652+i),n.write_u32(r),n.seek_start(0).array_buffer(r)}Mi[mn.Instructions]=2,Mi[mn.String]=1,Mi[mn.Data]=0;class xi{constructor(e){this.labels=[],this.label_map=new Map,this.offset_map=new Map;for(let t=0;t<e.length;t++){const n=e[t];-1!==n&&this.labels.push({label:t,offset:n})}this.labels.sort((e,t)=>e.offset-t.offset||e.label-t.label);for(let e=0;e<this.labels.length;e++){const{label:t,offset:n}=this.labels[e];this.label_map.set(t,{offset:n,index:e});const i=this.offset_map.get(n)||[];i.push(t),this.offset_map.set(n,i)}}get_labels(e){return this.offset_map.get(e)}get_info(e){const t=this.label_map.get(e);if(null==t)return;let n;for(let e=t.index+1;e<this.labels.length&&!((n=this.labels[e]).offset>t.offset);e++)n=void 0;return{offset:t.offset,next:n}}}function ji(e,t,n,i,o){if(n.opcode.stack===_n.Pop){const r=Wi(e,n,n.opcode.params.length-i-1);if(r.size()<=10)for(const e of r){const n=t.get(e);(null==n||Mi[o]>Mi[n])&&t.set(e,o)}}else{const e=n.args[i].value,r=t.get(e);(null==r||Mi[o]>Mi[r])&&t.set(e,o)}}function Gi(e,t,n,i,o,r){try{const s=t.get_info(i);if(null==s)return void Ui.warn(`Label ${i} is not registered in the label table.`);let a,d=e.get(s.offset);if(d){if(d.labels.includes(i)||(d.labels.push(i),d.labels.sort((e,t)=>e-t)),!(Mi[o]>Mi[d.type]))return;a=d.labels}else a=[i];const l=s.next?s.next.offset:n.size;switch(n.seek_start(s.offset),o){case mn.Instructions:!function(e,t,n,i,o,r,s){const a=[],d={type:mn.Instructions,labels:o,instructions:a};e.set(n.position,d);for(;n.position<i;){const e=n.u8();let t;switch(e){case 248:case 249:t=e<<8|n.u8();break;default:t=e}let i=vn[t];try{const e=zi(n,i);a.push(new fn(i,e))}catch(e){if(!s)throw e;Ui.error(`Exception occurred while parsing arguments for instruction ${i.mnemonic}.`,e),a.push(new fn(i,[]))}}if(null!=r){let i;for(let e=a.length-1;e>=0&&(i=a[e].opcode)===hn.NOP;e--);i!==hn.RET&&i!==hn.JMP&&Gi(e,t,n,r,mn.Instructions,s)}}(e,t,n,l,a,s.next&&s.next.label,r);break;case mn.Data:Ki(e,n,l,a);break;case mn.String:!function(e,t,n,i){const o=t.position,r={type:mn.String,labels:i,value:t.string_utf16(n-o,!0,!0)};e.set(o,r)}(e,n,l,a);break;default:throw new Error(`Segment type ${mn[o]} not implemented.`)}}catch(e){if(!r)throw e;Ui.error("Couldn't fully parse object code.",e)}}function Ki(e,t,n,i){const o=t.position,r={type:mn.Data,labels:i,data:t.array_buffer(n-o)};e.set(o,r)}function zi(e,t){const n=[];if(t.stack!==_n.Pop)for(const i of t.params)switch(i.type.kind){case zt.Byte:n.push({value:e.u8(),size:1});break;case zt.Word:n.push({value:e.u16(),size:2});break;case zt.DWord:n.push({value:e.i32(),size:4});break;case zt.Float:n.push({value:e.f32(),size:4});break;case zt.Label:case zt.ILabel:case zt.DLabel:case zt.SLabel:n.push({value:e.u16(),size:2});break;case zt.String:{const t=e.position;n.push({value:e.string_utf16(Math.min(4096,e.bytes_left),!0,!1),size:e.position-t})}break;case zt.ILabelVar:{const t=e.u8();n.push(...e.u16_array(t).map(e=>({value:e,size:2})))}break;case zt.RegRef:case zt.RegTupRef:n.push({value:e.u8(),size:1});break;case zt.RegRefVar:{const t=e.u8();n.push(...e.u8_array(t).map(e=>({value:e,size:1})))}break;default:throw new Error(`Parameter type ${zt[i.type.kind]} not implemented.`)}return n}const Hi=d.a.get("data_formats/parsing/quest/dat"),Vi=68,$i=72;const qi=d.a.get("data_formats/parsing/quest/qst");function Ji(e){let t="PC";const n=e.u8();e.seek(1);const i=e.u8();if(68===n?t="Dreamcast/GameCube":88===n?68===i&&(t="Blue Burst"):166===n&&(t="Dreamcast download"),"Blue Burst"===t){e.seek_start(0);const n=function(e){const t=[];for(let n=0;n<2;++n){e.seek(4);const n=e.u16();e.seek(38);const i=e.string_ascii(16,!0,!0),o=e.u32(),r=e.string_ascii(24,!0,!0);t.push({quest_id:n,file_name:i,file_name_2:r,size:o})}return t}(e),i=function(e,t){const n=new Map;for(;e.bytes_left>=1056;){const i=e.position,o=e.seek(4).u8(),r=e.seek(3).string_ascii(16,!0,!0);let s=n.get(r);if(!s){const e=t.get(r);n.set(r,s={name:r,expected_size:e,cursor:new _i(new wi(e||10240),Kt.Little),chunk_nos:new Set})}s.chunk_nos.has(o)?qi.warn(`File chunk number ${o} of file ${r} was already encountered, overwriting previous chunk.`):s.chunk_nos.add(o);let a=e.seek(1024).u32();e.seek(-1028),a>1024&&(qi.warn(`Data segment size of ${a} is larger than expected maximum size, reading just 1024 bytes.`),a=1024);const d=e.take(a),l=1024*o;if(s.cursor.size=Math.max(l+a,s.cursor.size),s.cursor.seek_start(l).write_cursor(d),e.seek(1032-d.size),e.position!==i+1056)throw new Error(`Read ${e.position-i} file chunk message bytes instead of expected 1056.`)}e.bytes_left&&qi.warn(`${e.bytes_left} Bytes left in file.`);for(const e of n.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&&qi.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 n=0;n<Math.ceil(t/1024);++n)e.chunk_nos.has(n)||qi.warn(`File ${e.name} is missing chunk ${n}.`)}const i=[];for(const e of n.values())i.push({name:e.name,data:e.cursor.seek_start(0).array_buffer()});return i}(e,new Map(n.map(e=>[e.file_name,e.size])));for(const e of i){const t=n.find(t=>t.file_name===e.name);t&&(e.id=t.quest_id,e.name_2=t.file_name_2)}return{version:t,files:i}}qi.error(`Can't parse ${t} QST files.`)}function Yi(e){const t=e.files,n=t.map(e=>88+1056*Math.ceil(e.data.byteLength/1024)).reduce((e,t)=>e+t),i=new ArrayBuffer(n),o=new $t(i,Kt.Little);if(function(e,t){for(const n of t){if(n.name.length>15)throw new Error(`File ${n.name} has a name longer than 15 characters.`);e.write_u16(88),e.write_u16(68),e.write_u16(n.id||0);for(let t=0;t<38;++t)e.write_u8(0);let t;if(e.write_string_ascii(n.name,16),e.write_u32(n.data.byteLength),null==n.name_2){const e=n.name.lastIndexOf(".");t=-1===e?n.name+"_j":n.name.slice(0,e)+"_j"+n.name.slice(e)}else t=n.name_2;if(t.length>24)throw Error(`File ${n.name} has a file_name_2 length (${t}) longer than 24 characters.`);e.write_string_ascii(t,24)}}(o,t),function(e,t){const n=t.map(e=>({no:0,data:new $t(e.data,Kt.Little),name:e.name}));let i=0;for(;i<n.length;)for(const t of n)t.data.bytes_left&&(Zi(e,t.data,t.no++,t.name)||i++);for(const e of n){const t=Math.ceil(e.data.size/1024);if(e.no!==t)throw new Error(`Expected to write ${t} chunks for file "${e.name}" but ${e.no} where written.`)}}(o,t),o.position!==n)throw new Error(`Expected a final file size of ${n}, but got ${o.position}.`);return i}function Zi(e,t,n,i){e.write_u8_array([28,4,19,0]),e.write_u8(n),e.write_u8_array([0,0,0]),e.write_string_ascii(i,16);const o=Math.min(1024,t.bytes_left);e.write_cursor(t.take(o));for(let t=o;t<1024;++t)e.write_u8(0);return e.write_u32(o),e.write_u32(0),t.bytes_left>0}const Xi=d.a.get("data_formats/parsing/quest");function Qi(e,t=!1){const n=Ji(e);if(!n)return;let i,o;for(const e of n.files){const t=e.name.trim().toLowerCase();t.endsWith(".dat")?i=e:t.endsWith(".bin")&&(o=e)}if(!i)return void Xi.error("File contains no DAT file.");if(!o)return void Xi.error("File contains no BIN file.");const r=function(e){const t=[],n=[],i=[];for(;e.bytes_left;){const o=e.u32(),r=e.u32(),s=e.u32(),a=e.u32();if(0===o)break;if(a!==r-16)throw Error(`Malformed DAT file. Expected an entities size of ${r-16}, got ${a}.`);if(1===o){const n=Math.floor(a/Vi),i=e.position;for(let i=0;i<n;++i){const n=e.u16(),i=e.u8_array(10),o=e.u16(),r=e.u8_array(2),a=e.vec3_f32(),d=e.i32()/65535*2*Math.PI,l=e.i32()/65535*2*Math.PI,u=e.i32()/65535*2*Math.PI,c=e.vec3_f32(),_=e.u8_array(16);t.push({type_id:n,section_id:o,position:a,rotation:new h(d,l,u),scale:c,area_id:s,unknown:[i,r,_]})}const r=e.position-i;r!==a&&(Hi.warn(`Read ${r} bytes instead of expected ${a} for entity type ${o} (Object).`),e.seek(a-r))}else if(2===o){const t=Math.floor(a/$i),i=e.position;for(let i=0;i<t;++i){const t=e.u16(),i=e.u8_array(10),o=e.u16(),r=e.u8_array(6),a=e.vec3_f32(),d=e.i32()/65535*2*Math.PI,l=e.i32()/65535*2*Math.PI,u=e.i32()/65535*2*Math.PI,c=e.vec3_f32(),_=e.u8_array(8),w=e.u32(),v=e.u8_array(4);n.push({type_id:t,section_id:o,position:a,rotation:new h(d,l,u),scale:c,skin:w,area_id:s,unknown:[i,r,_,v]})}const r=e.position-i;r!==a&&(Hi.warn(`Read ${r} bytes instead of expected ${a} for entity type ${o} (NPC).`),e.seek(a-r))}else i.push({entity_type:o,total_size:r,area_id:s,entities_size:a,data:e.u8_array(a)})}return{objs:t,npcs:n,unknowns:i}}(fi(new $t(i.data,Kt.Little))),s=Ii(fi(new $t(o.data,Kt.Little)),[0],t);let a=1,d=[];if(s.object_code.length){let e;for(const t of s.object_code)if(t.type===mn.Instructions&&t.labels.includes(0)){e=t;break}e?d=function(e,t,n,i){const o=new Map;for(const t of e.npcs)o.set(t.area_id,0);for(const t of e.objs)o.set(t.area_id,0);const r=n.filter(e=>e.opcode===hn.BB_MAP_DESIGNATE);for(const e of r){const t=e.args[0].value,n=e.args[2].value;o.set(t,n)}const s=new Array;for(const[e,n]of o.entries())try{s.push(ci.get_variant(t,e,n))}catch(e){if(!i)throw e;Xi.error("Unknown area variant.",e)}return s.sort((e,t)=>e.area.order-t.area.order||e.id-t.id)}(r,a=function(e){const t=e.find(e=>e.opcode===hn.SET_EPISODE);if(!t)return Xi.debug("Function 0 has no set_episode instruction."),1;switch(t.args[0].value){default:case 0:return L.I;case 1:return L.II;case 2:return L.IV}}(e.instructions),e.instructions,t):Xi.warn("No instruction for label 0 found.")}else Xi.warn("File contains no instruction labels.");return new j(s.quest_id,s.language,s.quest_name,s.short_description,s.long_description,a,d,r.objs.map(e=>new K(D.from_pso_id(e.type_id),e.area_id,e.section_id,e.position.clone(),e.rotation.clone(),e.scale.clone(),e.unknown)),function(e,t){return t.map(t=>new z(function(e,{type_id:t,scale:n,skin:i,area_id:o}){const r=Math.abs(n.y-1)>1e-5;switch(`${t}, ${i%3}, ${e}`){case"68, 0, 1":return T.Booma;case"68, 1, 1":return T.Gobooma;case"68, 2, 1":return T.Gigobooma;case"99, 0, 1":return T.EvilShark;case"99, 1, 1":return T.PalShark;case"99, 2, 1":return T.GuilShark;case"166, 0, 1":return T.Dimenian;case"166, 0, 2":return T.Dimenian2;case"166, 1, 1":return T.LaDimenian;case"166, 1, 2":return T.LaDimenian2;case"166, 2, 1":return T.SoDimenian;case"166, 2, 2":return T.SoDimenian2;case"214, 0, 2":return T.Mericarol;case"214, 1, 2":return T.Mericus;case"214, 2, 2":return T.Merikle;case"277, 0, 4":return T.Boota;case"277, 1, 4":return T.ZeBoota;case"277, 2, 4":return T.BaBoota;case"279, 0, 4":return T.Goran;case"279, 1, 4":return T.PyroGoran;case"279, 2, 4":return T.GoranDetonator}switch(`${t}, ${i%2}, ${e}`){case"64, 0, 1":return T.Hildebear;case"64, 0, 2":return T.Hildebear2;case"64, 1, 1":return T.Hildeblue;case"64, 1, 2":return T.Hildeblue2;case"65, 0, 1":return T.RagRappy;case"65, 0, 2":return T.RagRappy2;case"65, 0, 4":return T.SandRappy;case"65, 1, 1":return T.AlRappy;case"65, 1, 2":return T.LoveRappy;case"65, 1, 4":return T.DelRappy;case"128, 0, 1":return T.Dubchic;case"128, 0, 2":return T.Dubchic2;case"128, 1, 1":return T.Gilchic;case"128, 1, 2":return T.Gilchic2;case"212, 0, 2":return T.SinowBerill;case"212, 1, 2":return T.SinowSpigell;case"213, 0, 2":return T.Merillia;case"213, 1, 2":return T.Meriltas;case"215, 0, 2":return T.UlGibbon;case"215, 1, 2":return T.ZolGibbon;case"221, 0, 2":return T.Dolmolm;case"221, 1, 2":return T.Dolmdarl;case"224, 0, 2":return o>15?T.Epsilon:T.SinowZoa;case"224, 1, 2":return o>15?T.Epsilon:T.SinowZele;case"274, 0, 4":return T.MerissaA;case"274, 1, 4":return T.MerissaAA;case"276, 0, 4":return T.Zu;case"276, 1, 4":return T.Pazuzu;case"278, 0, 4":return T.Dorphon;case"278, 1, 4":return T.DorphonEclair;case"281, 0, 4":return r?T.SaintMilion:T.Kondrieu;case"281, 1, 4":return r?T.Shambertin:T.Kondrieu}switch(`${t}, ${e}`){case"66, 1":return T.Monest;case"66, 2":return T.Monest2;case"67, 1":return r?T.SavageWolf:T.BarbarousWolf;case"67, 2":return r?T.SavageWolf2:T.BarbarousWolf2;case"96, 1":return T.GrassAssassin;case"96, 2":return T.GrassAssassin2;case"97, 1":return o>15?T.DelLily:r?T.PoisonLily:T.NarLily;case"97, 2":return o>15?T.DelLily:r?T.PoisonLily2:T.NarLily2;case"98, 1":return T.NanoDragon;case"100, 1":return r?T.PofuillySlime:T.PouillySlime;case"101, 1":return T.PanArms;case"101, 2":return T.PanArms2;case"129, 1":return T.Garanz;case"129, 2":return T.Garanz2;case"130, 1":return r?T.SinowBeat:T.SinowGold;case"131, 1":return T.Canadine;case"132, 1":return T.Canane;case"133, 1":return T.Dubswitch;case"133, 2":return T.Dubswitch2;case"160, 1":return T.Delsaber;case"160, 2":return T.Delsaber2;case"161, 1":return T.ChaosSorcerer;case"161, 2":return T.ChaosSorcerer2;case"162, 1":return T.DarkGunner;case"164, 1":return T.ChaosBringer;case"165, 1":return T.DarkBelra;case"165, 2":return T.DarkBelra2;case"167, 1":return T.Bulclaw;case"168, 1":return T.Claw;case"192, 1":return T.Dragon;case"192, 2":return T.GalGryphon;case"193, 1":return T.DeRolLe;case"197, 1":return T.VolOpt;case"200, 1":return T.DarkFalz;case"202, 2":return T.OlgaFlow;case"203, 2":return T.BarbaRay;case"204, 2":return T.GolDragon;case"216, 2":return T.Gibbles;case"217, 2":return T.Gee;case"218, 2":return T.GiGue;case"219, 2":return T.Deldepth;case"220, 2":return T.Delbiter;case"222, 2":return T.Morfos;case"223, 2":return T.Recobox;case"225, 2":return T.IllGill;case"272, 4":return T.Astark;case"273, 4":return r?T.SatelliteLizard:T.Yowie;case"275, 4":return T.Girtablulu}switch(t){case 4:return T.FemaleFat;case 5:return T.FemaleMacho;case 7:return T.FemaleTall;case 10:return T.MaleDwarf;case 11:return T.MaleFat;case 12:return T.MaleMacho;case 13:return T.MaleOld;case 25:return T.BlueSoldier;case 26:return T.RedSoldier;case 27:return T.Principal;case 28:return T.Tekker;case 29:return T.GuildLady;case 30:return T.Scientist;case 31:return T.Nurse;case 32:return T.Irene;case 241:return T.ItemShop;case 254:return T.Nurse2}return T.Unknown}(e,t),t.type_id,t.skin,t.area_id,t.section_id,t.position.clone(),t.rotation.clone(),t.scale.clone(),t.unknown))}(a,r.npcs),r.unknowns,s.object_code,s.shop_items)}function eo(e,t){const n=function({objs:e,npcs:t,unknowns:n}){const i=new wi(e.length*(16+Vi)+t.length*(16+$i)+n.reduce((e,t)=>e+t.total_size,0)),o=new _i(i,Kt.Little),r=Object(ne.groupBy)(e,e=>e.area_id),s=Object.keys(r).map(e=>parseInt(e,10)).sort((e,t)=>e-t);for(const e of s){const t=r[e],n=t.length*Vi;o.write_u32(1),o.write_u32(n+16),o.write_u32(e),o.write_u32(n);for(const e of t){if(3!==e.unknown.length)throw new Error(`unknown should be of length 3, was ${e.unknown.length}`);if(o.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(o.write_u8_array(e.unknown[0]),o.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(o.write_u8_array(e.unknown[1]),o.write_vec3_f32(e.position),o.write_i32(Math.round(e.rotation.x/(2*Math.PI)*65535)),o.write_i32(Math.round(e.rotation.y/(2*Math.PI)*65535)),o.write_i32(Math.round(e.rotation.z/(2*Math.PI)*65535)),o.write_vec3_f32(e.scale),16!==e.unknown[2].length)throw new Error(`unknown[2] should be of length 16, was ${e.unknown[2].length}`);o.write_u8_array(e.unknown[2])}}const a=Object(ne.groupBy)(t,e=>e.area_id),d=Object.keys(a).map(e=>parseInt(e,10)).sort((e,t)=>e-t);for(const e of d){const t=a[e],n=t.length*$i;o.write_u32(2),o.write_u32(n+16),o.write_u32(e),o.write_u32(n);for(const e of t)o.write_u16(e.type_id),o.write_u8_array(e.unknown[0]),o.write_u16(e.section_id),o.write_u8_array(e.unknown[1]),o.write_vec3_f32(e.position),o.write_i32(Math.round(e.rotation.x/(2*Math.PI)*65535)),o.write_i32(Math.round(e.rotation.y/(2*Math.PI)*65535)),o.write_i32(Math.round(e.rotation.z/(2*Math.PI)*65535)),o.write_vec3_f32(e.scale),o.write_u8_array(e.unknown[2]),o.write_u32(e.skin),o.write_u8_array(e.unknown[3])}for(const e of n)o.write_u32(e.entity_type),o.write_u32(e.total_size),o.write_u32(e.area_id),o.write_u32(e.entities_size),o.write_u8_array(e.data);return o.write_u32(0),o.write_u32(0),o.write_u32(0),o.write_u32(0),i}({objs:(i=e.objects,i.map(e=>({type_id:e.type.pso_id,section_id:e.section_id,position:e.section_position.clone(),rotation:e.rotation.clone(),scale:e.scale.clone(),area_id:e.area_id,unknown:e.unknown}))),npcs:to(e.npcs),unknowns:e.dat_unknowns});var i;const o=Bi(new Ai(e.id,e.language,e.name,e.short_description,e.long_description,e.object_code,e.shop_items)),r=t.lastIndexOf("."),s=-1===r?t.slice(0,11):t.slice(0,Math.min(11,r));return Yi({files:[{name:s+".dat",id:e.id,data:vi(new _i(n,Kt.Little)).array_buffer()},{name:s+".bin",id:e.id,data:vi(new $t(o,Kt.Little)).array_buffer()}]})}function to(e){const t=new DataView(new ArrayBuffer(4));return e.map(e=>{const n=function(e){switch(e){default:throw new Error(`Unexpected type ${e.code}.`);case T.Unknown:return;case T.FemaleFat:return{type_id:4,skin:0,regular:!0};case T.FemaleMacho:return{type_id:5,skin:0,regular:!0};case T.FemaleTall:return{type_id:7,skin:0,regular:!0};case T.MaleDwarf:return{type_id:10,skin:0,regular:!0};case T.MaleFat:return{type_id:11,skin:0,regular:!0};case T.MaleMacho:return{type_id:12,skin:0,regular:!0};case T.MaleOld:return{type_id:13,skin:0,regular:!0};case T.BlueSoldier:return{type_id:25,skin:0,regular:!0};case T.RedSoldier:return{type_id:26,skin:0,regular:!0};case T.Principal:return{type_id:27,skin:0,regular:!0};case T.Tekker:return{type_id:28,skin:0,regular:!0};case T.GuildLady:return{type_id:29,skin:0,regular:!0};case T.Scientist:return{type_id:30,skin:0,regular:!0};case T.Nurse:return{type_id:31,skin:0,regular:!0};case T.Irene:return{type_id:32,skin:0,regular:!0};case T.ItemShop:return{type_id:241,skin:0,regular:!0};case T.Nurse2:return{type_id:254,skin:0,regular:!0};case T.Hildebear:return{type_id:64,skin:0,regular:!0};case T.Hildeblue:return{type_id:64,skin:1,regular:!0};case T.RagRappy:return{type_id:65,skin:0,regular:!0};case T.AlRappy:return{type_id:65,skin:1,regular:!0};case T.Monest:return{type_id:66,skin:0,regular:!0};case T.SavageWolf:return{type_id:67,skin:0,regular:!0};case T.BarbarousWolf:return{type_id:67,skin:0,regular:!1};case T.Booma:return{type_id:68,skin:0,regular:!0};case T.Gobooma:return{type_id:68,skin:1,regular:!0};case T.Gigobooma:return{type_id:68,skin:2,regular:!0};case T.Dragon:return{type_id:192,skin:0,regular:!0};case T.GrassAssassin:return{type_id:96,skin:0,regular:!0};case T.PoisonLily:return{type_id:97,skin:0,regular:!0};case T.NarLily:return{type_id:97,skin:1,regular:!0};case T.NanoDragon:return{type_id:98,skin:0,regular:!0};case T.EvilShark:return{type_id:99,skin:0,regular:!0};case T.PalShark:return{type_id:99,skin:1,regular:!0};case T.GuilShark:return{type_id:99,skin:2,regular:!0};case T.PofuillySlime:return{type_id:100,skin:0,regular:!0};case T.PouillySlime:return{type_id:100,skin:0,regular:!1};case T.PanArms:return{type_id:101,skin:0,regular:!0};case T.DeRolLe:return{type_id:193,skin:0,regular:!0};case T.Dubchic:return{type_id:128,skin:0,regular:!0};case T.Gilchic:return{type_id:128,skin:1,regular:!0};case T.Garanz:return{type_id:129,skin:0,regular:!0};case T.SinowBeat:return{type_id:130,skin:0,regular:!0};case T.SinowGold:return{type_id:130,skin:0,regular:!1};case T.Canadine:return{type_id:131,skin:0,regular:!0};case T.Canane:return{type_id:132,skin:0,regular:!0};case T.Dubswitch:return{type_id:133,skin:0,regular:!0};case T.VolOpt:return{type_id:197,skin:0,regular:!0};case T.Delsaber:return{type_id:160,skin:0,regular:!0};case T.ChaosSorcerer:return{type_id:161,skin:0,regular:!0};case T.DarkGunner:return{type_id:162,skin:0,regular:!0};case T.ChaosBringer:return{type_id:164,skin:0,regular:!0};case T.DarkBelra:return{type_id:165,skin:0,regular:!0};case T.Dimenian:return{type_id:166,skin:0,regular:!0};case T.LaDimenian:return{type_id:166,skin:1,regular:!0};case T.SoDimenian:return{type_id:166,skin:2,regular:!0};case T.Bulclaw:return{type_id:167,skin:0,regular:!0};case T.Claw:return{type_id:168,skin:0,regular:!0};case T.DarkFalz:return{type_id:200,skin:0,regular:!0};case T.Hildebear2:return{type_id:64,skin:0,regular:!0};case T.Hildeblue2:return{type_id:64,skin:1,regular:!0};case T.RagRappy2:return{type_id:65,skin:0,regular:!0};case T.LoveRappy:return{type_id:65,skin:1,regular:!0};case T.Monest2:return{type_id:66,skin:0,regular:!0};case T.PoisonLily2:return{type_id:97,skin:0,regular:!0};case T.NarLily2:return{type_id:97,skin:1,regular:!0};case T.GrassAssassin2:return{type_id:96,skin:0,regular:!0};case T.Dimenian2:return{type_id:166,skin:0,regular:!0};case T.LaDimenian2:return{type_id:166,skin:1,regular:!0};case T.SoDimenian2:return{type_id:166,skin:2,regular:!0};case T.DarkBelra2:return{type_id:165,skin:0,regular:!0};case T.BarbaRay:return{type_id:203,skin:0,regular:!0};case T.SavageWolf2:return{type_id:67,skin:0,regular:!0};case T.BarbarousWolf2:return{type_id:67,skin:0,regular:!1};case T.PanArms2:return{type_id:101,skin:0,regular:!0};case T.Dubchic2:return{type_id:128,skin:0,regular:!0};case T.Gilchic2:return{type_id:128,skin:1,regular:!0};case T.Garanz2:return{type_id:129,skin:0,regular:!0};case T.Dubswitch2:return{type_id:133,skin:0,regular:!0};case T.Delsaber2:return{type_id:160,skin:0,regular:!0};case T.ChaosSorcerer2:return{type_id:161,skin:0,regular:!0};case T.GolDragon:return{type_id:204,skin:0,regular:!0};case T.SinowBerill:return{type_id:212,skin:0,regular:!0};case T.SinowSpigell:return{type_id:212,skin:1,regular:!0};case T.Merillia:return{type_id:213,skin:0,regular:!0};case T.Meriltas:return{type_id:213,skin:1,regular:!0};case T.Mericarol:return{type_id:214,skin:0,regular:!0};case T.Mericus:return{type_id:214,skin:1,regular:!0};case T.Merikle:return{type_id:214,skin:2,regular:!0};case T.UlGibbon:return{type_id:215,skin:0,regular:!0};case T.ZolGibbon:return{type_id:215,skin:1,regular:!0};case T.Gibbles:return{type_id:216,skin:0,regular:!0};case T.Gee:return{type_id:217,skin:0,regular:!0};case T.GiGue:return{type_id:218,skin:0,regular:!0};case T.GalGryphon:return{type_id:192,skin:0,regular:!0};case T.Deldepth:return{type_id:219,skin:0,regular:!0};case T.Delbiter:return{type_id:220,skin:0,regular:!0};case T.Dolmolm:return{type_id:221,skin:0,regular:!0};case T.Dolmdarl:return{type_id:221,skin:1,regular:!0};case T.Morfos:return{type_id:222,skin:0,regular:!0};case T.Recobox:return{type_id:223,skin:0,regular:!0};case T.Epsilon:case T.SinowZoa:return{type_id:224,skin:0,regular:!0};case T.SinowZele:return{type_id:224,skin:1,regular:!0};case T.IllGill:return{type_id:225,skin:0,regular:!0};case T.DelLily:return{type_id:97,skin:0,regular:!0};case T.OlgaFlow:return{type_id:202,skin:0,regular:!0};case T.SandRappy:return{type_id:65,skin:0,regular:!0};case T.DelRappy:return{type_id:65,skin:1,regular:!0};case T.Astark:return{type_id:272,skin:0,regular:!0};case T.SatelliteLizard:return{type_id:273,skin:0,regular:!0};case T.Yowie:return{type_id:273,skin:0,regular:!1};case T.MerissaA:return{type_id:274,skin:0,regular:!0};case T.MerissaAA:return{type_id:274,skin:1,regular:!0};case T.Girtablulu:return{type_id:275,skin:0,regular:!0};case T.Zu:return{type_id:276,skin:0,regular:!0};case T.Pazuzu:return{type_id:276,skin:1,regular:!0};case T.Boota:return{type_id:277,skin:0,regular:!0};case T.ZeBoota:return{type_id:277,skin:1,regular:!0};case T.BaBoota:return{type_id:277,skin:2,regular:!0};case T.Dorphon:return{type_id:278,skin:0,regular:!0};case T.DorphonEclair:return{type_id:278,skin:1,regular:!0};case T.Goran:return{type_id:279,skin:0,regular:!0};case T.PyroGoran:return{type_id:279,skin:1,regular:!0};case T.GoranDetonator:return{type_id:279,skin:2,regular:!0};case T.SaintMilion:return{type_id:281,skin:0,regular:!0};case T.Shambertin:return{type_id:281,skin:1,regular:!0};case T.Kondrieu:return{type_id:281,skin:0,regular:!1}}}(e.type)||{type_id:e.pso_type_id,skin:e.pso_skin,regular:!0};t.setFloat32(0,e.scale.y),t.setUint32(0,-8388609&t.getUint32(0)|(n.regular?0:8388608));const i=t.getFloat32(0);let o=new h(e.scale.x,i,e.scale.z);return{type_id:n.type_id,section_id:e.section_id,position:e.section_position.clone(),rotation:e.rotation.clone(),scale:o,skin:n.skin,area_id:e.area_id,unknown:e.unknown}})}var no=function(e,t,n,i){return new(n||(n=Promise))(function(o,r){function s(e){try{d(i.next(e))}catch(e){r(e)}}function a(e){try{d(i.throw(e))}catch(e){r(e)}}function d(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}d((i=i.apply(e,t||[])).next())})};function io(e){return no(this,void 0,void 0,function*(){return new Promise((t,n)=>{const i=new FileReader;i.addEventListener("loadend",()=>{i.result instanceof ArrayBuffer?t(i.result):n(new Error("Couldn't read file."))}),i.readAsArrayBuffer(e)})})}var oo=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};class ro{constructor(e,t,n){this.description=e,this.undo=t,this.redo=n}}class so{get can_undo(){return!!this.current&&this.current.can_undo}get can_redo(){return!!this.current&&this.current.can_redo}get first_undo(){return this.current&&this.current.first_undo}get first_redo(){return this.current&&this.current.first_redo}undo(){return!!this.current&&this.current.undo()}redo(){return!!this.current&&this.current.redo()}}oo([v.n],so.prototype,"current",void 0),oo([v.f],so.prototype,"can_undo",null),oo([v.f],so.prototype,"can_redo",null),oo([v.f],so.prototype,"first_undo",null),oo([v.f],so.prototype,"first_redo",null);const ao=new so;class lo{constructor(e,t,n){this._can_undo=!1,this._can_redo=!1,this.action=new ro(e,t,n)}make_current(){ao.current=this}ensure_not_current(){ao.current===this&&(ao.current=void 0)}get can_undo(){return this._can_undo}set can_undo(e){this._can_undo=e}get can_redo(){return this._can_redo}set can_redo(e){this._can_redo=e}get first_undo(){return this.can_undo?this.action:void 0}get first_redo(){return this.can_redo?this.action:void 0}undo(){return!!this.can_undo&&(this.action.undo(),!0)}redo(){return!!this.can_redo&&(this.action.redo(),!0)}reset(){this._can_undo=!1,this._can_redo=!1}}oo([v.n.ref],lo.prototype,"action",void 0),oo([v.d],lo.prototype,"make_current",null),oo([v.d],lo.prototype,"ensure_not_current",null),oo([v.n],lo.prototype,"_can_undo",void 0),oo([v.n],lo.prototype,"_can_redo",void 0),oo([v.f],lo.prototype,"first_undo",null),oo([v.f],lo.prototype,"first_redo",null),oo([v.d],lo.prototype,"undo",null),oo([v.d],lo.prototype,"redo",null),oo([v.d],lo.prototype,"reset",null);class uo{constructor(){this.stack=v.n.array([],{deep:!1}),this.index=0}make_current(){ao.current=this}ensure_not_current(){ao.current===this&&(ao.current=void 0)}get can_undo(){return this.index>0}get can_redo(){return this.index<this.stack.length}get first_undo(){return this.can_undo?this.stack[this.index-1]:void 0}get first_redo(){return this.can_redo?this.stack[this.index]:void 0}push_action(e,t,n){this.push(new ro(e,t,n))}push(e){this.stack.splice(this.index,this.stack.length-this.index,e),this.index++}pop(){return this.stack.splice(--this.index,1)[0]}undo(){return!!this.can_undo&&(this.stack[--this.index].undo(),!0)}redo(){return!!this.can_redo&&(this.stack[this.index++].redo(),!0)}reset(){this.stack.clear(),this.index=0}}function co(e){if(e===L.II)throw new Error("Episode II not yet supported.");return new j(0,0,"Untitled","Created with phantasmal.world.","Created with phantasmal.world.",e,[ci.get_variant(e,0,0)],[new K(D.MenuActivation,0,10,new h(-16.313568115234375,3,-579.5118408203125),new h(.0009587526218325454,0,0),new h(1,1,1),[[2,0,0,0,0,0,0,64,0,0],[0,0],[1,0,0,0,0,0,0,0,0,0,0,0,128,75,251,140]]),new K(D.MenuActivation,0,10,new h(-393.07318115234375,10,-12.964752197265625),new h(0,0,0),new h(9183549615799121e-56,1.0000011920928955,1),[[2,0,1,0,0,0,1,64,0,0],[0,0],[0,0,0,0,0,0,0,0,0,0,0,0,32,76,251,140]]),new K(D.MenuActivation,0,10,new h(-458.60699462890625,10,-51.270660400390625),new h(0,0,0),new h(1,1,1),[[2,0,2,0,0,0,2,64,0,0],[0,0],[2,0,0,0,0,0,1,0,10,0,0,0,192,76,251,140]]),new K(D.MenuActivation,0,10,new h(-430.19696044921875,10,-24.490447998046875),new h(0,0,0),new h(1,1,1),[[2,0,3,0,0,0,3,64,0,0],[0,0],[3,0,0,0,0,0,0,0,0,0,0,0,96,77,251,140]]),new K(D.PlayerSet,0,10,new h(.995330810546875,0,-37.0010986328125),new h(0,4.712460886831327,0),new h(0,1,1),[[2,0,4,0,0,0,4,64,0,0],[0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,78,251,140]]),new K(D.PlayerSet,0,10,new h(3.0009307861328125,0,-23.99688720703125),new h(0,4.859725289544806,0),new h(1.000000238418579,1,1),[[2,0,5,0,0,0,5,64,0,0],[0,0],[0,0,0,0,0,0,0,0,0,0,0,0,160,78,251,140]]),new K(D.PlayerSet,0,10,new h(2.0015106201171875,0,-50.00386047363281),new h(0,4.565196484117848,0),new h(2.000002384185791,1,1),[[2,0,6,0,0,0,6,64,0,0],[0,0],[0,0,0,0,0,0,0,0,0,0,0,0,64,79,251,140]]),new K(D.PlayerSet,0,10,new h(4.9973907470703125,0,-61.99664306640625),new h(0,4.368843947166543,0),new h(3.0000007152557373,1,1),[[2,0,7,0,0,0,7,64,0,0],[0,0],[0,0,1,0,10,0,0,0,0,0,0,0,224,79,251,140]]),new K(D.MainRagolTeleporter,0,10,new h(132.00314331054688,1.000000238418579,-265.002197265625),new h(0,.49088134237826325,0),new h(1.000000238418579,1,1),[[0,0,87,7,0,0,88,71,0,0],[0,0],[1,0,0,0,0,0,0,0,0,0,0,0,208,128,250,140]]),new K(D.PrincipalWarp,0,10,new h(-228,0,-2020.99951171875),new h(0,2.9452880542695796,0),new h(-10.000004768371582,0,-30.000030517578125),[[2,0,9,0,0,0,9,64,0,0],[0,0],[0,0,0,0,0,0,1,0,0,0,1,0,176,81,251,140]]),new K(D.MenuActivation,0,10,new h(-41.000030517578125,0,42.37322998046875),new h(0,0,0),new h(1,1,1),[[2,0,10,0,0,0,10,64,0,0],[1,0],[4,0,0,0,0,0,0,0,0,0,0,0,224,82,251,140]]),new K(D.MenuActivation,0,10,new h(-479.21673583984375,8.781256675720215,-322.465576171875),new h(6.28328118244177,.0009587526218325454,0),new h(1,1,1),[[2,0,11,0,0,0,11,64,0,0],[0,0],[5,0,0,0,0,0,0,0,0,0,0,0,128,83,251,140]]),new K(D.PrincipalWarp,0,10,new h(-228,0,-351.0015869140625),new h(0,0,0),new h(10.000006675720215,0,-1760.0010986328125),[[2,0,12,0,0,0,12,64,0,0],[0,0],[0,128,0,0,0,0,0,0,0,0,0,0,32,84,251,140]]),new K(D.TelepipeLocation,0,10,new h(-561.88232421875,0,-406.8829345703125),new h(0,0,0),new h(1,1,1),[[2,0,13,0,0,0,13,64,0,0],[0,0],[0,0,0,0,0,0,0,0,0,0,0,0,80,85,251,140]]),new K(D.TelepipeLocation,0,10,new h(-547.8557739257812,0,-444.8822326660156),new h(0,0,0),new h(1,1,1),[[2,0,14,0,0,0,14,64,0,0],[0,0],[1,0,0,0,0,0,0,0,0,0,0,0,16,86,251,140]]),new K(D.TelepipeLocation,0,10,new h(-486.441650390625,0,-497.4501647949219),new h(0,0,0),new h(9183549615799121e-56,1.0000011920928955,1),[[2,0,15,0,0,0,15,64,0,0],[0,0],[3,0,0,0,0,0,0,0,0,0,0,0,208,86,251,140]]),new K(D.TelepipeLocation,0,10,new h(-522.4052734375,0,-474.1882629394531),new h(0,0,0),new h(1,1,1),[[2,0,16,0,0,0,16,64,0,0],[0,0],[2,0,0,0,0,0,1,0,10,0,0,0,144,87,251,140]]),new K(D.MedicalCenterDoor,0,10,new h(-34.49853515625,0,-384.4951171875),new h(0,5.497871034636549,0),new h(3.0000007152557373,1,1),[[2,0,17,0,0,0,17,64,0,0],[0,0],[1,0,0,0,0,0,0,0,0,0,0,0,80,88,251,140]]),new K(D.ShopDoor,0,10,new h(-393.0031433105469,0,-143.49981689453125),new h(0,3.141640591220885,0),new h(3.0000007152557373,1,1),[[2,0,18,0,0,0,18,64,0,0],[0,0],[1,0,0,0,0,0,0,0,0,0,0,0,80,89,251,140]]),new K(D.MenuActivation,0,10,new h(-355.17462158203125,0,-43.15193176269531),new h(0,0,0),new h(1.000000238418579,1,1),[[2,0,19,0,0,0,19,64,0,0],[0,0],[6,0,0,0,0,0,0,0,0,0,0,0,80,90,251,140]]),new K(D.HuntersGuildDoor,0,10,new h(-43.00239562988281,0,-118.00120544433594),new h(0,3.141640591220885,0),new h(3.0000007152557373,1,1),[[2,0,20,0,0,0,20,64,0,0],[0,0],[1,0,0,0,0,0,0,0,0,0,0,0,240,90,251,140]]),new K(D.TeleporterDoor,0,10,new h(26.000823974609375,0,-265.99810791015625),new h(0,3.141640591220885,0),new h(3.0000007152557373,1,1),[[2,0,21,0,0,0,21,64,0,0],[0,0],[1,0,0,0,0,0,0,0,0,0,0,0,240,91,251,140]]),new K(D.PlayerSet,0,10,new h(57.81005859375,0,-268.5472412109375),new h(0,4.712460886831327,0),new h(0,1,1),[[2,0,22,0,0,0,22,64,0,0],[0,0],[1,0,0,0,0,0,0,0,0,0,0,0,240,92,251,140]]),new K(D.PlayerSet,0,10,new h(66.769287109375,0,-252.3748779296875),new h(0,4.712460886831327,0),new h(1.000000238418579,1,1),[[2,0,23,0,0,0,23,64,0,0],[0,0],[1,0,0,0,0,0,0,0,0,0,0,0,144,93,251,140]]),new K(D.PlayerSet,0,10,new h(67.36819458007812,0,-284.9297180175781),new h(0,4.712460886831327,0),new h(2.000000476837158,1,1),[[2,0,24,0,0,0,24,64,0,0],[0,0],[1,0,0,0,0,0,0,0,0,0,0,0,48,94,251,140]]),new K(D.PlayerSet,0,10,new h(77.10488891601562,0,-269.2830505371094),new h(0,4.712460886831327,0),new h(3.0000007152557373,1,1),[[2,0,25,0,0,0,25,64,0,0],[0,0],[1,0,0,0,0,0,0,0,0,0,0,0,208,94,251,140]])],[new z(T.GuildLady,29,0,0,10,new h(-49.0010986328125,0,50.996429443359375),new h(0,2.3562304434156633,0),new h(0,0,0),[[0,0,7,86,0,0,0,0,23,87],[0,0,0,0,0,0],[18,192,124,68,0,128,84,68],[128,238,223,176]]),new z(T.FemaleFat,4,1,0,20,new h(167.99769592285156,0,83.99686431884766),new h(0,3.927050739026106,0),new h(24.000009536743164,0,0),[[0,0,7,88,0,0,0,0,23,89],[0,0,0,0,0,0],[18,0,126,68,6,0,200,66],[128,238,232,48]]),new z(T.MaleDwarf,10,1,0,20,new h(156.0028839111328,0,-49.99967575073242),new h(0,5.497871034636549,0),new h(30.000009536743164,0,0),[[0,0,7,89,0,0,0,0,23,90],[0,0,0,0,0,0],[18,192,125,68,6,0,180,66],[128,238,236,176]]),new z(T.RedSoldier,26,0,0,20,new h(237.9988250732422,0,-14.0001220703125),new h(0,5.497871034636549,0),new h(0,0,0),[[0,0,7,90,0,0,0,0,23,91],[0,0,0,0,0,0],[18,0,127,68,6,0,2,67],[128,238,241,48]]),new z(T.BlueSoldier,25,0,0,20,new h(238.00379943847656,0,63.00413513183594),new h(0,3.927050739026106,0),new h(0,0,0),[[0,0,7,91,0,0,0,0,23,92],[0,0,0,0,0,0],[18,192,126,68,11,0,240,66],[128,238,245,176]]),new z(T.FemaleMacho,5,1,0,20,new h(-2.001882553100586,0,35.0036506652832),new h(0,3.141640591220885,0),new h(26.000009536743164,0,0),[[0,0,7,92,0,0,0,0,23,93],[0,0,0,0,0,0],[18,128,125,68,9,0,160,66],[128,238,250,48]]),new z(T.Scientist,30,1,0,20,new h(-147.0000457763672,0,-7.996537208557129),new h(0,2.577127047485882,0),new h(30.000009536743164,0,0),[[0,0,7,93,0,0,0,0,23,94],[0,0,0,0,0,0],[18,64,125,68,8,0,140,66],[128,238,254,176]]),new z(T.MaleOld,13,1,0,20,new h(-219.99710083007812,0,-100.0008316040039),new h(0,0,0),new h(30.000011444091797,0,0),[[0,0,7,94,0,0,0,0,23,95],[0,0,0,0,0,0],[18,0,125,68,15,0,112,66],[128,239,3,48]]),new z(T.GuildLady,29,0,0,20,new h(-262.5099792480469,0,-24.53999900817871),new h(0,1.963525369513053,0),new h(0,0,0),[[0,0,7,95,0,0,0,0,23,106],[0,0,0,0,0,0],[18,128,124,68,0,0,82,68],[128,239,100,192]]),new z(T.Tekker,28,0,0,30,new h(-43.70983123779297,2.5999999046325684,-52.78248596191406),new h(0,.7854101478052212,0),new h(0,0,0),[[0,0,7,97,0,0,0,0,23,98],[0,0,0,0,0,0],[0,64,124,68,0,128,79,68],[128,239,16,176]]),new z(T.MaleMacho,12,0,0,30,new h(.33990478515625,2.5999999046325684,-84.71995544433594),new h(0,0,0),new h(0,0,0),[[0,0,7,98,0,0,0,0,23,99],[0,0,0,0,0,0],[0,128,123,68,0,0,72,68],[128,239,21,48]]),new z(T.FemaleMacho,5,0,0,30,new h(43.87113952636719,2.5999996662139893,-74.80299377441406),new h(0,-.5645135437350027,0),new h(0,0,0),[[0,0,7,99,0,0,0,0,23,100],[0,0,0,0,0,0],[0,0,124,68,0,0,77,68],[128,239,25,176]]),new z(T.MaleFat,11,0,0,30,new h(75.88380432128906,2.5999996662139893,-42.69328308105469),new h(0,-1.0308508189943528,0),new h(0,0,0),[[0,0,7,100,0,0,0,0,23,101],[0,0,0,0,0,0],[18,192,123,68,0,128,74,68],[128,239,30,48]]),new z(T.FemaleTall,7,1,0,30,new h(16.003997802734375,0,5.995697021484375),new h(0,-1.1781152217078317,0),new h(22.000009536743164,0,0),[[0,0,7,101,0,0,0,0,23,102],[0,0,0,0,0,0],[18,64,127,68,4,0,12,67],[128,239,34,176]]),new z(T.Nurse,31,0,0,40,new h(.3097381591796875,3,-105.3865966796875),new h(0,0,0),new h(0,0,0),[[0,0,7,102,0,0,0,0,23,103],[0,0,0,0,0,0],[0,64,126,68,0,0,87,68],[128,239,39,48]]),new z(T.Nurse,31,1,0,40,new h(53.499176025390625,0,-26.496688842773438),new h(0,5.497871034636549,0),new h(18.000009536743164,0,0),[[0,0,7,103,0,0,0,0,23,104],[0,0,0,0,0,0],[18,128,126,68,7,0,220,66],[128,239,43,176]])],[],[{labels:[0],type:mn.Instructions,instructions:[new fn(hn.SET_EPISODE,[{value:0,size:4}]),new fn(hn.ARG_PUSHL,[{value:0,size:4}]),new fn(hn.ARG_PUSHW,[{value:150,size:2}]),new fn(hn.SET_FLOOR_HANDLER,[]),new fn(hn.BB_MAP_DESIGNATE,[{value:0,size:1},{value:0,size:2},{value:0,size:1},{value:0,size:1}]),new fn(hn.RET,[])]},{labels:[150],type:mn.Instructions,instructions:[new fn(hn.LETI,[{value:60,size:1},{value:237,size:4}]),new fn(hn.LETI,[{value:61,size:1},{value:0,size:4}]),new fn(hn.LETI,[{value:62,size:1},{value:333,size:4}]),new fn(hn.LETI,[{value:63,size:1},{value:-15,size:4}]),new fn(hn.ARG_PUSHL,[{value:0,size:4}]),new fn(hn.ARG_PUSHR,[{value:60,size:1}]),new fn(hn.P_SETPOS,[]),new fn(hn.LETI,[{value:60,size:1},{value:255,size:4}]),new fn(hn.LETI,[{value:61,size:1},{value:0,size:4}]),new fn(hn.LETI,[{value:62,size:1},{value:338,size:4}]),new fn(hn.LETI,[{value:63,size:1},{value:-43,size:4}]),new fn(hn.ARG_PUSHL,[{value:1,size:4}]),new fn(hn.ARG_PUSHR,[{value:60,size:1}]),new fn(hn.P_SETPOS,[]),new fn(hn.LETI,[{value:60,size:1},{value:222,size:4}]),new fn(hn.LETI,[{value:61,size:1},{value:0,size:4}]),new fn(hn.LETI,[{value:62,size:1},{value:322,size:4}]),new fn(hn.LETI,[{value:63,size:1},{value:25,size:4}]),new fn(hn.ARG_PUSHL,[{value:2,size:4}]),new fn(hn.ARG_PUSHR,[{value:60,size:1}]),new fn(hn.P_SETPOS,[]),new fn(hn.LETI,[{value:60,size:1},{value:248,size:4}]),new fn(hn.LETI,[{value:61,size:1},{value:0,size:4}]),new fn(hn.LETI,[{value:62,size:1},{value:323,size:4}]),new fn(hn.LETI,[{value:63,size:1},{value:-20,size:4}]),new fn(hn.ARG_PUSHL,[{value:3,size:4}]),new fn(hn.ARG_PUSHR,[{value:60,size:1}]),new fn(hn.P_SETPOS,[]),new fn(hn.RET,[])]}],[])}oo([v.n],uo.prototype,"stack",void 0),oo([v.n],uo.prototype,"index",void 0),oo([v.d],uo.prototype,"make_current",null),oo([v.d],uo.prototype,"ensure_not_current",null),oo([v.f],uo.prototype,"can_undo",null),oo([v.f],uo.prototype,"can_redo",null),oo([v.f],uo.prototype,"first_undo",null),oo([v.f],uo.prototype,"first_redo",null),oo([v.d],uo.prototype,"push_action",null),oo([v.d],uo.prototype,"push",null),oo([v.d],uo.prototype,"pop",null),oo([v.d],uo.prototype,"undo",null),oo([v.d],uo.prototype,"redo",null),oo([v.d],uo.prototype,"reset",null);var _o=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};const wo=d.a.get("stores/QuestEditorStore");class vo{constructor(){this.debug=!1,this.undo=new uo,this.script_undo=new lo("Text edits",()=>{},()=>{}),this.save_dialog_open=!1,this.toggle_debug=()=>{this.debug=!this.debug},this.set_selected_entity=e=>{e&&this.set_current_area_id(e.area_id),this.selected_entity=e},this.set_current_area_id=e=>{if(this.selected_entity=void 0,null==e)this.current_area=void 0;else if(this.current_quest){const t=this.current_quest.area_variants.find(t=>t.area.id===e);this.current_area=t&&t.area}},this.new_quest=e=>{this.set_quest(co(e))},this.open_file=Object(v.i)(function*(e,t){try{const n=yield io(t),i=Qi(new $t(n,Kt.Little));this.set_quest(i,e)}catch(e){wo.error("Couldn't read file.",e)}}),this.open_save_dialog=()=>{this.save_dialog_filename=this.current_quest_filename?this.current_quest_filename.endsWith(".qst")?this.current_quest_filename.slice(0,-4):this.current_quest_filename:"",this.save_dialog_open=!0},this.close_save_dialog=()=>{this.save_dialog_open=!1},this.set_save_dialog_filename=e=>{this.save_dialog_filename=e},this.save_current_quest_to_file=e=>{if(this.current_quest){const t=eo(this.current_quest,e);e.endsWith(".qst")||(e+=".qst");const n=document.createElement("a");n.href=URL.createObjectURL(new Blob([t],{type:"application/octet-stream"})),n.download=e,document.body.appendChild(n),n.click(),URL.revokeObjectURL(n.href),document.body.removeChild(n)}this.save_dialog_open=!1},this.push_entity_move_action=(e,t,n)=>{this.undo.push_action(`Move ${e.type.name}`,()=>{e.position=t,po.set_selected_entity(e)},()=>{e.position=n,po.set_selected_entity(e)})},this.set_quest=Object(v.i)(function*(e,t){if(this.current_quest_filename=t,e!==this.current_quest)if(this.undo.reset(),this.script_undo.reset(),this.selected_entity=void 0,this.current_quest=e,e&&e.area_variants.length?this.current_area=e.area_variants[0].area:this.current_area=void 0,e)for(const t of e.area_variants){const n=yield ci.get_area_sections(e.episode,t.area.id,t.id);t.sections=n;for(const i of e.objects.filter(e=>e.area_id===t.area.id))try{this.set_section_on_visible_quest_entity(i,n)}catch(e){wo.error(e)}for(const i of e.npcs.filter(e=>e.area_id===t.area.id))try{this.set_section_on_visible_quest_entity(i,n)}catch(e){wo.error(e)}}else wo.error("Couldn't parse quest file.")}),this.set_section_on_visible_quest_entity=(e,t)=>{let{x:n,y:i,z:o}=e.position;const r=t.find(t=>t.id===e.section_id);if(r){const{x:e,y:t,z:s}=r.position,a=r.cos_y_axis_rotation*n+r.sin_y_axis_rotation*o,d=-r.sin_y_axis_rotation*n+r.cos_y_axis_rotation*o;n=a+e,i+=t,o=d+s}else wo.warn(`Section ${e.section_id} not found.`);e.set_position_and_section(new h(n,i,o),r)},de.on_global_keyup("quest_editor","Ctrl-Z",()=>{ao.current!==this.script_undo&&ao.undo()}),de.on_global_keyup("quest_editor","Ctrl-Shift-Z",()=>{ao.current!==this.script_undo&&ao.redo()}),de.on_global_keyup("quest_editor","Ctrl-Alt-D",this.toggle_debug)}}_o([v.n],vo.prototype,"debug",void 0),_o([v.n],vo.prototype,"current_quest_filename",void 0),_o([v.n],vo.prototype,"current_quest",void 0),_o([v.n],vo.prototype,"current_area",void 0),_o([v.n],vo.prototype,"selected_entity",void 0),_o([v.n],vo.prototype,"save_dialog_filename",void 0),_o([v.n],vo.prototype,"save_dialog_open",void 0),_o([v.d],vo.prototype,"toggle_debug",void 0),_o([v.d],vo.prototype,"set_selected_entity",void 0),_o([v.d],vo.prototype,"set_current_area_id",void 0),_o([v.d],vo.prototype,"new_quest",void 0),_o([v.d],vo.prototype,"open_save_dialog",void 0),_o([v.d],vo.prototype,"close_save_dialog",void 0),_o([v.d],vo.prototype,"set_save_dialog_filename",void 0),_o([v.d],vo.prototype,"push_entity_move_action",void 0),_o([v.d],vo.prototype,"set_quest",void 0);const po=new vo;var ho=n("wsa1"),fo=n("08Mt"),mo=n.n(fo);const go=new DataView(new ArrayBuffer(4));function ko(e,t,n){const i=[];for(let r=0;r<e.length;r++){const s=e[r].type,a=t[r];if(null!=a)switch(s.kind){case zt.Float:n?i.push((o=a.value,go.setInt32(0,o),go.getFloat32(0)).toString()):i.push(a.value.toString());break;case zt.ILabelVar:for(;r<t.length;r++)i.push(t[r].value.toString());break;case zt.RegRefVar:for(;r<t.length;r++)i.push("r"+t[r].value);break;case zt.RegRef:case zt.RegTupRef:i.push("r"+a.value);break;case zt.String:i.push(JSON.stringify(a.value));break;default:i.push(a.value.toString())}else i.push("")}var o;return i}class yo{constructor(){this.errors=[],this.worker=new mo.a,this.object_code=[],this.process_worker_message=e=>{const t=e.data;"new_object_code_output"===t.type&&(this.object_code.splice(0,this.object_code.length,...t.object_code),this.errors=t.errors)},this.worker.onmessage=this.process_worker_message}disassemble(e){this.object_code=e;const t=function(e,t=!1){const n=[],i=[];let o;for(const r of e){let e;switch(r.type){case mn.Instructions:e=".code";break;case mn.Data:e=".data";break;case mn.String:e=".string"}o!==r.type&&(o=r.type,n.length&&n.push(""),n.push(e,""));for(const e of r.labels)n.push(`${e}:`);if(r.type===mn.Data){const e=new Uint8Array(r.data);let t=" ";for(let i=0;i<e.length;i++)t+="0x"+e[i].toString(16).padStart(2,"0"),i%16==15?(n.push(t),t=" "):i<e.length-1&&(t+=" ");t.length>4&&n.push(t)}else if(r.type===mn.String)n.push(" "+JSON.stringify(r.value));else for(const e of r.instructions)if(t||e.opcode.stack!==_n.Push){let o=[];e.opcode.stack===_n.Pop?t||(o=ko(e.opcode.params,i.splice(Math.max(0,i.length-e.opcode.params.length),e.opcode.params.length),!0)):o=ko(e.opcode.params,e.args,!1),n.push(" "+e.opcode.mnemonic+(o.length?" "+o.join(", "):""))}else i.push(...e.args)}return n.length&&n.push(""),n}(e),n={type:"new_assembly_input",assembly:t};return this.worker.postMessage(n),t}update_assembly(e){const t={type:"assembly_change_input",changes:e};this.worker.postMessage(t)}dispose(){this.worker.terminate()}}(function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);r>3&&s&&Object.defineProperty(t,n,s)})([v.n],yo.prototype,"errors",void 0);var Ro=n("CWpa"),bo=n.n(Ro);const No=vn.filter(e=>null!=e).map(e=>({label:e.mnemonic,kind:ho.languages.CompletionItemKind.Function,insertText:e.mnemonic})),Eo=[{label:".code",kind:ho.languages.CompletionItemKind.Keyword,insertText:"code"},{label:".data",kind:ho.languages.CompletionItemKind.Keyword,insertText:"data"},{label:".string",kind:ho.languages.CompletionItemKind.Keyword,insertText:"string"}];ho.languages.register({id:"psoasm"}),ho.languages.setMonarchTokensProvider("psoasm",{defaultToken:"invalid",tokenizer:{root:[[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,{token:"string.quote",bracket:"@open",next:"@string"}],[/r\d+/,"predefined"],[/\.[^\s]+/,"keyword"],[/[^\s]+:/,"tag"],[/-?\d+\.\d+/,"number.float"],[/0x[0-9a-fA-F]+/,"number.hex"],[/-?[0-9]+?/,"number"],[/[a-z][a-z0-9_=<>!]*/,"identifier"],[/[ \t\r\n]+/,"white"],[/,/,"delimiter"]],string:[[/[^\\"]+/,"string"],[/\\(?:[n\\"])/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]]}}),ho.languages.registerCompletionItemProvider("psoasm",{provideCompletionItems:(e,t)=>{const n=e.getValueInRange({startLineNumber:t.lineNumber,endLineNumber:t.lineNumber,startColumn:1,endColumn:t.column});return{suggestions:/^\s*([a-z][a-z0-9_=<>!]*)?$/.test(n)?No:/^\s*\.[a-z]+$/.test(n)?Eo:[],incomplete:!1}}}),ho.languages.setLanguageConfiguration("psoasm",{indentationRules:{increaseIndentPattern:/^\s*\d+:/,decreaseIndentPattern:/^\s*(\d+|\.)/},autoClosingPairs:[{open:'"',close:'"'}],surroundingPairs:[{open:'"',close:'"'}]}),ho.editor.defineTheme("phantasmal-world",{base:"vs-dark",inherit:!0,rules:[{token:"",foreground:"e0e0e0",background:"#181818"},{token:"tag",foreground:"99bbff"},{token:"keyword",foreground:"d0a0ff",fontStyle:"bold"},{token:"predefined",foreground:"bbffbb"},{token:"number",foreground:"ffffaa"},{token:"number.hex",foreground:"ddffaa"},{token:"string",foreground:"88ffff"},{token:"string.escape",foreground:"8888ff"}],colors:{"editor.background":"#181818","editor.lineHighlightBackground":"#202020"}});class To extends i.Component{render(){return o.a.createElement("section",{id:"qe-ScriptEditorComponent",className:bo.a.main},o.a.createElement(Ae.a,null,({width:e,height:t})=>o.a.createElement(So,{width:e,height:t})))}}class So extends i.Component{constructor(){super(...arguments),this.div_ref=Object(i.createRef)(),this.disposers=[],this.update_model=()=>{const e=po.current_quest;if(e&&this.editor&&this.assembly_analyser){const t=this.assembly_analyser.disassemble(e.object_code),n=ho.editor.createModel(t.join("\n"),"psoasm");po.script_undo.action=new ro("Text edits",()=>{this.editor&&this.editor.trigger("undo stack","undo",void 0)},()=>{this.editor&&this.editor.trigger("redo stack","redo",void 0)});let i=n.getAlternativeVersionId(),o=i,r=i;const s=n.onDidChangeContent(e=>{const t=n.getAlternativeVersionId();t<o?(po.script_undo.can_redo=!0,t===i&&(po.script_undo.can_undo=!1)):(t<=r?t===r&&(po.script_undo.can_redo=!1):(po.script_undo.can_redo=!1,o>r&&(r=o)),po.script_undo.can_undo=!0),o=t,this.assembly_analyser&&this.assembly_analyser.update_assembly(e.changes)});this.disposers.push(()=>s.dispose()),this.editor.setModel(n),this.editor.updateOptions({readOnly:!1})}else this.editor&&this.editor.updateOptions({readOnly:!0})},this.update_model_markers=()=>{if(!this.editor||!this.assembly_analyser)return;this.assembly_analyser.errors.length;const e=this.editor.getModel();e&&ho.editor.setModelMarkers(e,"psoasm",this.assembly_analyser.errors.map(e=>({severity:ho.MarkerSeverity.Error,message:e.message,startLineNumber:e.line_no,endLineNumber:e.line_no,startColumn:e.col,endColumn:e.col+e.length})))},this.dispose=()=>{if(this.editor){this.editor.dispose();const e=this.editor.getModel();e&&e.dispose(),this.editor=void 0}this.assembly_analyser&&this.assembly_analyser.dispose()}}render(){return o.a.createElement("div",{ref:this.div_ref})}componentDidMount(){this.div_ref.current&&(this.editor=ho.editor.create(this.div_ref.current,{theme:"phantasmal-world",scrollBeyondLastLine:!1,autoIndent:!0,fontSize:14,wordBasedSuggestions:!1,wordWrap:"on",wrappingIndent:"indent"}),this.assembly_analyser=new yo,this.disposers.push(this.dispose,Object(v.e)(this.update_model),Object(v.e)(this.update_model_markers)))}componentWillUnmount(){for(const e of this.disposers.splice(0,this.disposers.length))e()}shouldComponentUpdate(){return!1}UNSAFE_componentWillReceiveProps(e){this.props.width===e.width&&this.props.height===e.height||!this.editor||this.editor.layout(e)}}var Oo=n("viAG"),Do=n.n(Oo);class Po extends i.Component{render(){return o.a.createElement("div",{className:Do.a.main},this.props.children)}}var Co=n("NVW5"),Fo=n.n(Co);let Wo=class extends i.Component{render(){const e=po.selected_entity;let t;if(e){const n=e.section?e.section.id:e.section_id;t=o.a.createElement("table",{className:Fo.a.table},o.a.createElement("tbody",null,o.a.createElement("tr",null,o.a.createElement("th",null,e instanceof z?"NPC":"Object",":"),o.a.createElement("td",null,e.type.name)),o.a.createElement("tr",null,o.a.createElement("th",null,"Section:"),o.a.createElement("td",null,n)),o.a.createElement("tr",null,o.a.createElement("th",{colSpan:2},"World position:")),o.a.createElement(Lo,{entity:e,position_type:"position",coord:"x"}),o.a.createElement(Lo,{entity:e,position_type:"position",coord:"y"}),o.a.createElement(Lo,{entity:e,position_type:"position",coord:"z"}),o.a.createElement("tr",null,o.a.createElement("th",{colSpan:2},"Section position:")),o.a.createElement(Lo,{entity:e,position_type:"section_position",coord:"x"}),o.a.createElement(Lo,{entity:e,position_type:"section_position",coord:"y"}),o.a.createElement(Lo,{entity:e,position_type:"section_position",coord:"z"})))}else t=o.a.createElement(Po,null,"No entity selected.");return o.a.createElement("div",{className:Fo.a.main,tabIndex:-1},t)}};Wo=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([w.a],Wo);class Lo extends i.PureComponent{render(){return o.a.createElement("tr",null,o.a.createElement("th",{className:Fo.a.coord_label},this.props.coord.toUpperCase(),":"),o.a.createElement("td",null,o.a.createElement(Uo,Object.assign({},this.props))))}}class Uo extends i.Component{constructor(){super(...arguments),this.state={value:0,initial_position:new h(0,0,0)},this.focus=()=>{this.setState({initial_position:this.props.entity.position})},this.blur=()=>{this.state.initial_position.equals(this.props.entity.position)||po.push_entity_move_action(this.props.entity,this.state.initial_position,this.props.entity.position)},this.changed=e=>{if(null!=e){const t=this.props.entity,n=this.props.position_type,i=t[n].clone();i[this.props.coord]=e,t[n]=i}}}componentDidMount(){this.start_observing()}componentWillUnmount(){this.disposer&&this.disposer()}componentDidUpdate(e){this.props.entity!==e.entity&&this.start_observing()}render(){return o.a.createElement(te.a,{value:this.state.value,size:"small",precision:3,className:Fo.a.coord,onFocus:this.focus,onBlur:this.blur,onChange:this.changed})}start_observing(){this.disposer&&this.disposer(),this.disposer=Object(v.e)(()=>{this.setState({value:this.props.entity[this.props.position_type][this.props.coord]})},{name:`${this.props.entity.type.code}.${this.props.position_type}.${this.props.coord} changed`,delay:50})}}var Ao=n("kXzj"),Mo=n.n(Ao),Io=n("5rEg"),Bo=n("sa8M"),xo=n.n(Bo);let jo=class extends i.Component{render(){const e=po.current_quest;let t;if(e){const n=e.episode===L.IV?"IV":e.episode===L.II?"II":"I",i=new Map;for(const t of e.npcs){const e=i.get(t.type)||0;i.set(t.type,e+1)}const r=8*(i.get(T.Canane)||0),s=[...i].sort((e,t)=>e[0].id-t[0].id).map(([e,t])=>{const n=e===T.Canadine?r:0;return o.a.createElement("tr",{key:e.id},o.a.createElement("td",null,e.name,":"),o.a.createElement("td",null,t+n))});t=o.a.createElement(o.a.Fragment,null,o.a.createElement("table",null,o.a.createElement("tbody",null,o.a.createElement("tr",null,o.a.createElement("th",null,"Episode:"),o.a.createElement("td",null,n)),o.a.createElement("tr",null,o.a.createElement("th",null,"ID:"),o.a.createElement("td",null,o.a.createElement(te.a,{value:e.id,max:4294967295,min:0,onChange:this.id_changed,size:"small"}))),o.a.createElement("tr",null,o.a.createElement("th",null,"Name:"),o.a.createElement("td",null,o.a.createElement(Io.a,{value:e.name,maxLength:32,onChange:this.name_changed,size:"small"}))),o.a.createElement("tr",null,o.a.createElement("th",{colSpan:2},"Short description:")),o.a.createElement("tr",null,o.a.createElement("td",{colSpan:2},o.a.createElement(Io.a.TextArea,{value:e.short_description,maxLength:128,rows:3,onChange:this.short_description_changed}))),o.a.createElement("tr",null,o.a.createElement("th",{colSpan:2},"Long description:")),o.a.createElement("tr",null,o.a.createElement("td",{colSpan:2},o.a.createElement(Io.a.TextArea,{value:e.long_description,maxLength:288,rows:5,onChange:this.long_description_changed}))))),o.a.createElement("div",{className:xo.a.npc_counts_container},o.a.createElement("table",null,o.a.createElement("thead",null,o.a.createElement("tr",null,o.a.createElement("th",{colSpan:2},"NPC Counts"))),o.a.createElement("tbody",null,s))))}else t=o.a.createElement(Po,null,"No quest loaded.");return o.a.createElement("div",{className:xo.a.main,tabIndex:-1},t)}id_changed(e){const t=po.current_quest;t&&null!=e&&t.set_id(e)}name_changed(e){const t=po.current_quest;t&&t.set_name(e.target.value)}short_description_changed(e){const t=po.current_quest;t&&t.set_short_description(e.target.value)}long_description_changed(e){const t=po.current_quest;t&&t.set_long_description(e.target.value)}};jo=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([w.a],jo);const Go=new xn.MeshLambertMaterial({color:65280,side:xn.DoubleSide}),Ko=new xn.MeshLambertMaterial({color:16711935,side:xn.DoubleSide}),zo=new xn.MeshLambertMaterial({skinning:!0,color:16711935,side:xn.DoubleSide});function Ho(e,t,n=Ko){return Vo(e,t,n,xn.Mesh)}function Vo(e,t,n,i){const{created_by_geometry_builder:o,normalized_material_indices:r,bones:s}=e.userData;let a;if(Array.isArray(t))if(o){a=[Go];for(const[e,i]of r.entries())i>0&&(a[i]=t[e]||n)}else a=t;else a=t||n;const d=new i(e,a);return o&&s.length&&d instanceof xn.SkinnedMesh&&(d.add(s[0]),d.bind(new xn.Skeleton(s))),d}var $o;!function(e){e[e.Normal=0]="Normal",e[e.Hovered=1]="Hovered",e[e.Selected=2]="Selected"}($o||($o={}));const qo=[];qo[$o.Normal]=16776960,qo[$o.Hovered]=16768831,qo[$o.Selected]=16755200;const Jo=[];function Yo(e,t,n){return Xo(e,t,n,qo[$o.Normal],e.type.name)}function Zo(e,t,n){return Xo(e,t,n,Jo[$o.Normal],e.type.code)}function Xo(e,t,n,i,o){const r=new xn.MeshLambertMaterial({color:i,side:xn.DoubleSide}),s=Ho(t,n.length?n.map(e=>new xn.MeshLambertMaterial({map:e,side:xn.DoubleSide,alphaTest:.5})):r,r);s.name=o,s.userData.entity=e;const{x:a,y:d,z:l}=e.position;s.position.set(a,d,l);const u=e.rotation;return s.rotation.set(u.x,u.y,u.z),s}Jo[$o.Normal]=16711680,Jo[$o.Hovered]=16727903,Jo[$o.Selected]=16711764;const Qo=new xn.Vector3(0,-1,0);class er{constructor(e){this.renderer=e,this.raycaster=new xn.Raycaster,this.last_pointer_position=new xn.Vector2(0,0),this.moved_since_last_mouse_down=!1,this.try_highlight_selected=()=>{const e=po.selected_entity,t=this.renderer.get_entity_mesh(e);t&&this.select({entity:e,mesh:t})},this.on_mouse_down=e=>{this.process_event(e),this.stop_transforming();const t=this.pick_entity(this.renderer.pointer_pos_to_device_coords(e));t?(this.renderer.controls.enabled=!1,this.pick=t,this.select(t)):(this.renderer.controls.enabled=!0,this.pick=void 0),this.renderer.schedule_render()},this.on_mouse_up=e=>{this.process_event(e),this.moved_since_last_mouse_down||this.pick||this.deselect(),this.stop_transforming(),this.renderer.controls.enabled=!0,this.renderer.schedule_render()},this.on_mouse_move=e=>{this.process_event(e);const t=this.renderer.pointer_pos_to_device_coords(e);if(this.selected&&this.pick)this.moved_since_last_mouse_down&&(1===e.buttons&&(e.shiftKey?this.translate_vertically(this.selected,this.pick,t):this.translate_horizontally(this.selected,this.pick,t)),this.renderer.schedule_render());else{const e=this.pick_entity(t);this.mark_hovered(e)&&this.renderer.schedule_render()}},this.stop_transforming=()=>{if(this.moved_since_last_mouse_down&&this.selected&&this.pick){const e=this.selected.entity;po.push_entity_move_action(e,this.pick.initial_position,e.position)}this.pick=void 0},Object(v.e)(()=>{const e=po.selected_entity;this.selected&&this.selected.entity===e||(this.stop_transforming(),e?this.try_highlight_selected():this.deselect())})}process_event(e){"mousedown"===e.type?this.moved_since_last_mouse_down=!1:e.offsetX===this.last_pointer_position.x&&e.offsetY===this.last_pointer_position.y||(this.moved_since_last_mouse_down=!0),this.last_pointer_position.set(e.offsetX,e.offsetY)}mark_hovered(e){let t=!1;return this.selected&&nr(e,this.selected)||(nr(e,this.hovered)||(this.hovered&&(tr(this.hovered,$o.Normal),this.hovered=void 0),e&&tr(e,$o.Hovered),t=!0),this.hovered=e),t}select(e){nr(e,this.hovered)&&(this.hovered=void 0),nr(e,this.selected)?this.selected=e:(this.selected&&tr(this.selected,$o.Normal),tr(e,$o.Selected),this.selected=e,po.set_selected_entity(e.entity))}deselect(){this.selected&&tr(this.selected,$o.Normal),this.selected=void 0,po.set_selected_entity(void 0)}translate_vertically(e,t,n){this.raycaster.setFromCamera(n,this.renderer.camera);const i=this.raycaster.ray,o=this.renderer.camera.getWorldDirection(new xn.Vector3).negate(),r=(new xn.Plane).setFromNormalAndCoplanarPoint(new xn.Vector3(o.x,0,o.z).normalize(),e.mesh.position.sub(t.grab_offset)),s=new xn.Vector3;if(i.intersectPlane(r,s)){const n=s.y+t.grab_offset.y,i=n-e.entity.position.y;t.drag_y+=i,t.drag_adjust.y-=i,e.entity.position=new h(e.entity.position.x,n,e.entity.position.z)}}translate_horizontally(e,t,n){const{intersection:i,section:o}=this.pick_terrain(n,t);if(i)e.entity.set_position_and_section(new h(i.point.x,i.point.y+t.drag_y,i.point.z),o);else{this.raycaster.setFromCamera(n,this.renderer.camera);const i=this.raycaster.ray,o=new xn.Plane(new xn.Vector3(0,1,0),-e.entity.position.y+t.grab_offset.y),r=new xn.Vector3;i.intersectPlane(o,r)&&(e.entity.position=new h(r.x+t.grab_offset.x,e.entity.position.y,r.z+t.grab_offset.z))}}pick_entity(e){this.raycaster.setFromCamera(e,this.renderer.camera);const[t]=this.raycaster.intersectObjects(this.renderer.entity_models.children);if(!t)return;const n=t.object.userData.entity,i=t.object.position.clone().sub(t.point),o=i.clone();let r=0;this.raycaster.set(t.object.position,Qo);const[s]=this.raycaster.intersectObjects(this.renderer.collision_geometry.children,!0);return s&&(o.y-=s.distance,r+=s.distance),{mesh:t.object,entity:n,initial_position:n.position,grab_offset:i,drag_adjust:o,drag_y:r}}pick_terrain(e,t){this.raycaster.setFromCamera(e,this.renderer.camera),this.raycaster.ray.origin.add(t.drag_adjust);const n=this.raycaster.intersectObjects(this.renderer.collision_geometry.children,!0);for(const e of n)if(e.face.normal.y>.75)return{intersection:e,section:e.object.userData.section};return{}}}function tr({entity:e,mesh:t},n){const i=e instanceof z?Jo[n]:qo[n];if(t)if(Array.isArray(t.material))for(const e of t.material)n===$o.Normal&&e.map?e.color.set(16777215):e.color.set(i);else t.material.color.set(i)}function nr(e,t){return e&&t?e.entity===t.entity:e===t}const ir=d.a.get("data_formats/parsing/ninja/texture"),or=1213027928,rr=1414682200;function sr(e){const t=kn(e),n=t.find(e=>e.type===or),i=n&&function(e){return{texture_count:e.u16()}}(n.data),o=t.filter(e=>e.type===rr).map(e=>(function(e){const t=e.u32(),n=e.u32(),i=e.u32(),o=e.u16(),r=e.u16(),s=e.u32();e.seek(36);const a=e.array_buffer(s);return{id:i,format:[t,n],width:o,height:r,size:s,data:a}})(e.data));return i?i.texture_count!==o.length&&ir.warn(`Found ${o.length} textures instead of ${i.texture_count} as defined in the header.`):ir.warn("No header found."),{textures:o}}function ar(e){return e.textures.map(dr)}function dr(e){let t,n;switch(e.format[1]){case 6:t=xn.RGBA_S3TC_DXT1_Format,n=e.width*e.height/2;break;case 7:t=xn.RGBA_S3TC_DXT3_Format,n=e.width*e.height;break;default:throw new Error(`Format ${e.format.join(", ")} not supported.`)}const i=new xn.CompressedTexture([{data:new Uint8Array(e.data,0,n),width:e.width,height:e.height}],e.width,e.height,t);return i.minFilter=xn.LinearFilter,i.wrapS=xn.MirroredRepeatWrapping,i.wrapT=xn.MirroredRepeatWrapping,i.needsUpdate=!0,i}var lr=function(e,t,n,i){return new(n||(n=Promise))(function(o,r){function s(e){try{d(i.next(e))}catch(e){r(e)}}function a(e){try{d(i.throw(e))}catch(e){r(e)}}function d(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}d((i=i.apply(e,t||[])).next())})};const ur=d.a.get("loading/entities"),cr=new xn.CylinderBufferGeometry(3,3,20);cr.translate(0,10,0);const _r=new Promise(e=>e(cr)),wr=[],vr=new Promise(e=>e(wr)),pr=new ni;pr.set(T.Unknown,_r);const hr=new ni;hr.set(T.Unknown,vr);const fr=new ni,mr=new ni;for(const e of[D.Unknown,D.PlayerSet,D.FogCollision,D.EventCollision,D.ObjRoomID,D.ScriptCollision,D.ItemLight,D.FogCollisionSW,D.MenuActivation,D.BoxDetectObject,D.SymbolChatObject,D.TouchPlateObject,D.TargetableObject,D.EffectObject,D.CountDownObject,D.TelepipeLocation,D.Pioneer2InvisibleTouchplate,D.TempleMapDetect,D.LabInvisibleObject])fr.set(e,_r),mr.set(e,vr);function gr(e){return lr(this,void 0,void 0,function*(){return pr.get_or_set(e,()=>lr(this,void 0,void 0,function*(){try{const{url:t,data:n}=yield br(e,Er.Geometry),i=new $t(n,Kt.Little),o=t.endsWith(".nj")?Ln(i):Un(i);return o.length?Jn(o[0]):(ur.warn(`Couldn't parse ${t} for ${e.code}.`),cr)}catch(t){return ur.warn(`Couldn't load geometry file for ${e.code}.`,t),cr}}))})}function kr(e){return lr(this,void 0,void 0,function*(){return hr.get_or_set(e,()=>lr(this,void 0,void 0,function*(){try{const{data:t}=yield br(e,Er.Texture);return ar(sr(new $t(t,Kt.Little)))}catch(t){return ur.warn(`Couldn't load texture file for ${e.code}.`,t),wr}}))})}function yr(e){return lr(this,void 0,void 0,function*(){return fr.get_or_set(e,()=>lr(this,void 0,void 0,function*(){try{const{url:t,data:n}=yield Nr(e,Er.Geometry),i=new $t(n,Kt.Little),o=t.endsWith(".nj")?Ln(i):Un(i);return o.length?Jn(o[0]):(ur.warn(`Couldn't parse ${t} for ${e.name}.`),cr)}catch(t){return ur.warn(`Couldn't load geometry file for ${e.name}.`,t),cr}}))})}function Rr(e){return lr(this,void 0,void 0,function*(){return mr.get_or_set(e,()=>lr(this,void 0,void 0,function*(){try{const{data:t}=yield Nr(e,Er.Texture);return ar(sr(new $t(t,Kt.Little)))}catch(t){return ur.warn(`Couldn't load texture file for ${e.name}.`,t),wr}}))})}function br(e,t){return lr(this,void 0,void 0,function*(){const n=function e(t,n){switch(t){case T.Dubswitch:return`/npcs/${t.code}.${n===Er.Geometry?"xj":"xvm"}`;case T.Hildebear2:return e(T.Hildebear,n);case T.Hildeblue2:return e(T.Hildeblue,n);case T.RagRappy2:return e(T.RagRappy,n);case T.Monest2:return e(T.Monest,n);case T.PoisonLily2:return e(T.PoisonLily,n);case T.NarLily2:return e(T.NarLily,n);case T.GrassAssassin2:return e(T.GrassAssassin,n);case T.Dimenian2:return e(T.Dimenian,n);case T.LaDimenian2:return e(T.LaDimenian,n);case T.SoDimenian2:return e(T.SoDimenian,n);case T.DarkBelra2:return e(T.DarkBelra,n);case T.SavageWolf2:return e(T.SavageWolf,n);case T.BarbarousWolf2:return e(T.BarbarousWolf,n);case T.PanArms2:return e(T.PanArms,n);case T.Dubchic2:return e(T.Dubchic,n);case T.Gilchic2:return e(T.Gilchic,n);case T.Garanz2:return e(T.Garanz,n);case T.Dubswitch2:return e(T.Dubswitch,n);case T.Delsaber2:return e(T.Delsaber,n);case T.ChaosSorcerer2:return e(T.ChaosSorcerer,n);default:return`/npcs/${t.code}.${n===Er.Geometry?"nj":"xvm"}`}}(e,t);return{url:n,data:yield ti(n)}})}function Nr(e,t){return lr(this,void 0,void 0,function*(){const n=function(e,t){if(t!==Er.Geometry)return`/objects/${e.pso_id}.xvm`;switch(e){case D.EasterEgg:case D.ChristmasTree:case D.ChristmasWreath:case D.TwentyFirstCentury:case D.Sonic:case D.WelcomeBoard:case D.FloatingJelifish:case D.RuinsSeal:case D.Dolphin:case D.Cacti:case D.BigBrownRock:case D.PoisonPlant:case D.BigBlackRocks:case D.FallingRock:case D.DesertFixedTypeBoxBreakableCrystals:case D.BeeHive:return`/objects/${e.pso_id}.nj`;default:return`/objects/${e.pso_id}.xj`}}(e,t);return{url:n,data:yield ti(n)}})}var Er;!function(e){e[e.Geometry=0]="Geometry",e[e.Texture=1]="Texture"}(Er||(Er={}));var Tr=function(e,t,n,i){return new(n||(n=Promise))(function(o,r){function s(e){try{d(i.next(e))}catch(e){r(e)}}function a(e){try{d(i.throw(e))}catch(e){r(e)}}function d(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}d((i=i.apply(e,t||[])).next())})};const Sr=d.a.get("rendering/QuestModelManager"),Or=new xn.Vector3(0,800,700),Dr=new xn.Vector3(0,0,0),Pr=new xn.Object3D;class Cr{constructor(e){this.renderer=e,this.entity_reaction_disposers=[]}load_models(e,t){return Tr(this,void 0,void 0,function*(){if(this.quest!==e||this.area!==t)if(this.quest=e,this.area=t,this.dispose_entity_reactions(),e&&t)try{const n=e.episode,i=t.id,o=e.area_variants.find(e=>e.area.id===i),r=o&&o.id||0,s=yield si(n,i,r),a=yield function(e,t,n){return ii(this,void 0,void 0,function*(){return oi.get_or_set(`${e}-${t}-${n}`,()=>ai(e,t,n)).geometry})}(n,i,r);if(this.add_sections_to_collision_geometry(s,a),this.quest!==e||this.area!==t)return;this.renderer.collision_geometry=s,this.renderer.render_geometry=a,this.renderer.reset_camera(Or,Dr),this.renderer.reset_entity_models();for(const n of e.npcs)if(n.area_id===t.id){const i=yield gr(n.type),o=yield kr(n.type);if(this.quest!==e||this.area!==t)return;const r=Zo(n,i,o);this.update_entity_geometry(n,r)}for(const n of e.objects)if(n.area_id===t.id){const i=yield yr(n.type),o=yield Rr(n.type);if(this.quest!==e||this.area!==t)return;const r=Yo(n,i,o);this.update_entity_geometry(n,r)}}catch(n){Sr.error(`Couldn't load models for quest ${e.id}, ${t.name}.`,n),this.renderer.collision_geometry=Pr,this.renderer.render_geometry=Pr,this.renderer.reset_entity_models()}else this.renderer.collision_geometry=Pr,this.renderer.render_geometry=Pr,this.renderer.reset_entity_models()})}add_sections_to_collision_geometry(e,t){const n=new xn.Raycaster,i=new xn.Vector3,o=new xn.Vector3(0,-1,0),r=new xn.Vector3(0,1,0);for(const s of e.children){s.geometry.boundingBox.getCenter(i),n.set(i,o);const e=n.intersectObject(t,!0).find(e=>null!=e.object.userData.section);n.set(i,r);const a=n.intersectObject(t,!0).find(e=>null!=e.object.userData.section);let d;if(d=e&&a?e.distance<=a.distance?e:a:e||a){const e=s.userData,t=d.object.userData;e.section=t.section}}}update_entity_geometry(e,t){this.renderer.add_entity_model(t),this.entity_reaction_disposers.push(Object(v.e)(()=>{const{x:n,y:i,z:o}=e.position;t.position.set(n,i,o);const r=e.rotation;t.rotation.set(r.x,r.y,r.z),this.renderer.schedule_render()}))}dispose_entity_reactions(){for(const e of this.entity_reaction_disposers)e()}}var Fr=n("pVCM");Fr.a.install({THREE:Object.assign({},xn,{MOUSE:Object.assign({},xn.MOUSE,{LEFT:xn.MOUSE.RIGHT,RIGHT:xn.MOUSE.LEFT})})});class Wr{constructor(e){this._debug=!1,this.scene=new xn.Scene,this.light_holder=new xn.Group,this.renderer=new xn.WebGLRenderer({antialias:!0}),this.render_scheduled=!1,this.render_stop_scheduled=!1,this.light=new xn.HemisphereLight(16777215,5263440,1.2),this.controls_clock=new xn.Clock,this.schedule_render=()=>{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,this.render_stop_scheduled?this.render_stop_scheduled=!1:(t&&this.render(),requestAnimationFrame(this.call_render))},this.camera=e,this.dom_element.tabIndex=0,this.dom_element.addEventListener("mousedown",this.on_mouse_down),this.dom_element.style.outline="none",this.controls=new Fr.a(e,this.renderer.domElement),this.controls.dampingFactor=1,this.controls.draggingDampingFactor=1,this.scene.background=new xn.Color(1579032),this.light_holder.add(this.light),this.scene.add(this.light_holder),this.renderer.setPixelRatio(window.devicePixelRatio)}get debug(){return this._debug}set debug(e){this._debug=e}get dom_element(){return this.renderer.domElement}set_size(e,t){this.renderer.setSize(e,t),this.schedule_render()}pointer_pos_to_device_coords(e){const t=this.renderer.getSize(new xn.Vector2);return t.width=e.offsetX/t.width*2-1,t.height=e.offsetY/t.height*-2+1,t}start_rendering(){requestAnimationFrame(this.call_render)}stop_rendering(){this.render_stop_scheduled=!0}reset_camera(e,t){this.controls.setLookAt(e.x,e.y,e.z,t.x,t.y,t.z)}render(){this.renderer.render(this.scene,this.camera)}}let Lr;class Ur extends Wr{constructor(){super(new xn.PerspectiveCamera(60,1,10,1e4)),this._collision_geometry=new xn.Object3D,this._render_geometry=new xn.Object3D,this._entity_models=new xn.Object3D,this.entity_to_mesh=new Map;const e=new Cr(this);Object(v.e)(()=>{e.load_models(po.current_quest,po.current_area)}),this.entity_controls=new er(this),this.dom_element.addEventListener("mousedown",this.entity_controls.on_mouse_down),this.dom_element.addEventListener("mouseup",this.entity_controls.on_mouse_up),this.dom_element.addEventListener("mousemove",this.entity_controls.on_mouse_move)}get debug(){return this._debug}set debug(e){this._debug!==e&&(this._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)}get render_geometry(){return this._render_geometry}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}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 xn.Group,this.scene.add(this._entity_models),this.entity_to_mesh.clear()}add_entity_model(e){const t=e.userData.entity;this._entity_models.add(e),this.entity_to_mesh.set(t,e),t===po.selected_entity&&this.entity_controls.try_highlight_selected()}get_entity_mesh(e){return this.entity_to_mesh.get(e)}}class Ar extends i.Component{constructor(){super(...arguments),this.modify_dom=e=>{e&&(this.props.renderer.set_size(this.props.width,this.props.height),e.appendChild(this.props.renderer.dom_element))}}render(){return o.a.createElement("div",{className:"RendererComponent",ref:this.modify_dom})}UNSAFE_componentWillReceiveProps(e){this.props.debug!==e.debug&&(this.props.renderer.debug=!!e.debug),this.props.width===e.width&&this.props.height===e.height||this.props.renderer.set_size(e.width,e.height)}componentDidMount(){this.props.renderer.start_rendering()}componentWillUnmount(){this.props.renderer.stop_rendering(),this.props.on_will_unmount&&this.props.on_will_unmount()}shouldComponentUpdate(){return!1}}let Mr=class extends i.Component{render(){const e=po.debug;return o.a.createElement(Ae.a,null,({width:t,height:n})=>o.a.createElement(Ar,{renderer:(Lr||(Lr=new Ur),Lr),width:t,height:n,debug:e}))}};Mr=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([w.a],Mr);var Ir=n("jsC+"),Br=n("CtXQ"),xr=n("8z0m"),jr=n("kLXV"),Gr=n("Vl3Y"),Kr=n("uyqR"),zr=n.n(Kr),Hr=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};let Vr=class extends i.Component{render(){const e=po.current_quest,t=e?Array.from(e.area_variants).map(e=>e.area):[],n=po.current_area,i=n&&n.id;return o.a.createElement("div",{className:zr.a.main},o.a.createElement(Ir.a,{overlay:o.a.createElement(c.b,{onClick:this.new_quest},o.a.createElement(c.b.Item,{key:L[L.I]},"Episode I")),trigger:["click"]},o.a.createElement(Ot.a,{icon:"file-add"},"New quest",o.a.createElement(Br.a,{type:"down"}))),o.a.createElement(xr.a,{accept:".qst",showUploadList:!1,onChange:this.open_file,customRequest:()=>!1},o.a.createElement(Ot.a,{icon:"file"},"Open file...")),o.a.createElement(Ot.a,{icon:"save",onClick:po.open_save_dialog,disabled:!e},"Save as..."),o.a.createElement(Ot.a,{icon:"undo",onClick:this.undo,title:ao.first_undo?`Undo "${ao.first_undo.description}"`:"Nothing to undo",disabled:!ao.can_undo},"Undo"),o.a.createElement(Ot.a,{icon:"redo",onClick:this.redo,title:ao.first_redo?`Redo "${ao.first_redo.description}"`:"Nothing to redo",disabled:!ao.can_redo},"Redo"),o.a.createElement(_.a,{onChange:po.set_current_area_id,value:i,style:{width:200},disabled:!e},t.map(e=>o.a.createElement(_.a.Option,{key:e.id,value:e.id},e.name))),o.a.createElement($r,null))}new_quest({key:e}){po.new_quest(L[e])}open_file(e){e.file.originFileObj&&po.open_file(e.file.name,e.file.originFileObj)}undo(){ao.undo()}redo(){ao.redo()}};Vr=Hr([w.a],Vr);let $r=class extends i.Component{render(){return o.a.createElement(jr.a,{title:o.a.createElement(o.a.Fragment,null,o.a.createElement(Br.a,{type:"save"})," Save as..."),visible:po.save_dialog_open,onOk:this.ok,onCancel:this.cancel},o.a.createElement(Gr.a,{layout:"vertical"},o.a.createElement(Gr.a.Item,{label:"Name"},o.a.createElement(Io.a,{autoFocus:!0,maxLength:32,value:po.save_dialog_filename,onChange:this.name_changed}))))}name_changed(e){po.set_save_dialog_filename(e.currentTarget.value)}ok(){po.save_current_quest_to_file(po.save_dialog_filename||"untitled")}cancel(){po.close_save_dialog()}};$r=Hr([w.a],$r);var qr=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},Jr=function(e,t,n,i){return new(n||(n=Promise))(function(o,r){function s(e){try{d(i.next(e))}catch(e){r(e)}}function a(e){try{d(i.throw(e))}catch(e){r(e)}}function d(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}d((i=i.apply(e,t||[])).next())})};const Yr=d.a.get("ui/quest_editor/QuestEditorComponent"),Zr=new Map([[jo,"quest_info"],[Mr,"quest_renderer"],[To,"assembly_editor"],[Wo,"entity_info"]]),Xr={settings:{showPopoutIcon:!1},dimensions:{headerHeight:28},labels:{close:"Close",maximise:"Maximise",minimise:"Minimise",popout:"Open in new window"}},Qr=[{type:"row",content:[{title:"Info",type:"react-component",component:Zr.get(jo),isClosable:!1,width:3},{type:"stack",width:9,content:[{title:"3D View",type:"react-component",component:Zr.get(Mr),isClosable:!1},{title:"Script",type:"react-component",component:Zr.get(To),isClosable:!1}]},{title:"Entity",type:"react-component",component:Zr.get(Wo),isClosable:!1,width:2}]}];let es=class extends i.Component{constructor(){super(...arguments),this.layout_element=Object(i.createRef)(),this.focus=e=>{const t=document.getElementById("qe-ScriptEditorComponent");t&&t.compareDocumentPosition(e.target)&Node.DOCUMENT_POSITION_CONTAINED_BY?po.script_undo.make_current():po.undo.make_current()},this.resize=()=>{this.layout&&this.layout.updateSize()}}componentDidMount(){po.undo.make_current(),window.addEventListener("resize",this.resize),setTimeout(()=>Jr(this,void 0,void 0,function*(){if(this.layout_element.current&&!this.layout){const e=yield Gt.load_layout_config([...Zr.values()],Qr),t=Object.assign({},Xr,{content:e});try{this.layout=new Bt.a(t,this.layout_element.current)}catch(e){Yr.warn("Couldn't initialize golden layout with persisted layout.",e),this.layout=new Bt.a(Object.assign({},Xr,{content:Qr}),this.layout_element.current)}for(const[e,t]of Zr)this.layout.registerComponent(t,e);this.layout.on("stateChanged",()=>{this.layout&&Gt.persist_layout_config(this.layout.toConfig().content)}),this.layout.on("stackCreated",e=>{e.on("activeContentItemChanged",e=>{"component"in e.config&&(e.config.component===Zr.get(To)?po.script_undo.make_current():po.undo.make_current())})}),this.layout.init()}}),0)}componentWillUnmount(){po.undo.ensure_not_current(),window.removeEventListener("resize",this.resize),this.layout&&(this.layout.destroy(),this.layout=void 0)}render(){return o.a.createElement("div",{className:Mo.a.main},o.a.createElement(Vr,null),o.a.createElement("div",{className:Mo.a.content,onFocus:this.focus,ref:this.layout_element}))}};es=qr([w.a],es);var ts=n("Sdc0");const ns=1296321870;var is,os;function rs(e,t){return e.u32()===ns?function(e,t){const n=e.u32();return ss(e.take(n),t)}(e,t):(e.seek_start(0),function(e,t){e.seek_end(16);const n=e.u32();e.seek_start(n);const i=e.u32();return e.seek_start(i),function(e,t){e.seek(4);const n=e.u32();return e.seek_start(n),ss(e,t)}(e,t)}(e,t))}function ss(e,t){let n=e.u32();const i=e.u32(),o=e.u16(),r=e.u16(),s=(192&r)>>6,a=15&r,d=[];for(let r=0;r<t;r++){e.seek_start(n),n=n+=8*a;let t={tracks:[]};d.push(t);const r=[],s=[];for(let t=0;t<a;t++)r.push(e.u32());for(let t=0;t<a;t++){const t=e.u32();s.push(t)}if(1&o){e.seek_start(r.shift());const n=s.shift();n&&t.tracks.push({type:os.Position,keyframes:as(e,n)})}if(2&o){e.seek_start(r.shift());const n=s.shift();n&&t.tracks.push({type:os.Rotation,keyframes:ds(e,n,i)})}if(4&o){e.seek_start(r.shift());const n=s.shift();n&&t.tracks.push({type:os.Scale,keyframes:as(e,n)})}}return{motion_data:d,frame_count:i,type:o,interpolation:s,element_count:a}}function as(e,t){const n=[];for(let i=0;i<t;++i)n.push({frame:e.u32(),value:new h(e.f32(),e.f32(),e.f32())});return n}function ds(e,t,n){const i=[],o=e.position;for(let n=0;n<t;++n)i.push({frame:e.u16(),value:new h(e.u16()*Cn,e.u16()*Cn,e.u16()*Cn)});let r=-1;for(const{frame:s}of i){if(s<r||s>=n)return e.seek_start(o),ls(e,t);r=s}return i}function ls(e,t){const n=[];for(let i=0;i<t;++i)n.push({frame:e.u32(),value:new h(e.i32()*Cn,e.i32()*Cn,e.i32()*Cn)});return n}!function(e){e[e.Linear=0]="Linear",e[e.Spline=1]="Spline",e[e.UserFunction=2]="UserFunction"}(is||(is={})),function(e){e[e.Position=0]="Position",e[e.Rotation=1]="Rotation",e[e.Scale=2]="Scale"}(os||(os={}));var us=function(e,t,n,i){return new(n||(n=Promise))(function(o,r){function s(e){try{d(i.next(e))}catch(e){r(e)}}function a(e){try{d(i.throw(e))}catch(e){r(e)}}function d(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}d((i=i.apply(e,t||[])).next())})};function cs(e,t,n){return us(this,void 0,void 0,function*(){return yield ti(function(e,t,n){return`/player/${e}${t}${null==n?"":n}.nj`}(e,t,n))})}const _s=30;function ws(e,t){const n=t.interpolation===is.Spline?xn.InterpolateSmooth:xn.InterpolateLinear,i=[];return t.motion_data.forEach((t,o)=>{const r=e.get_bone(o);r&&t.tracks.forEach(({type:e,keyframes:t})=>{const s=[],a=[];for(const n of t)if(s.push(n.frame/_s),e===os.Rotation){const e=r.evaluation_flags.zxy_rotation_order?"ZXY":"ZYX",t=(new xn.Quaternion).setFromEuler(new xn.Euler(n.value.x,n.value.y,n.value.z,e));a.push(t.x,t.y,t.z,t.w)}else a.push(n.value.x,n.value.y,n.value.z);if(e===os.Rotation)i.push(new xn.QuaternionKeyframeTrack(`.bones[${o}].quaternion`,s,a,n));else{const t=e===os.Position?`.bones[${o}].position`:`.bones[${o}].scale`;i.push(new xn.VectorKeyframeTrack(t,s,a,n))}})}),new xn.AnimationClip("Animation",(t.frame_count-1)/_s,i).optimize()}var vs=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},ps=function(e,t,n,i){return new(n||(n=Promise))(function(o,r){function s(e){try{d(i.next(e))}catch(e){r(e)}}function a(e){try{d(i.throw(e))}catch(e){r(e)}}function d(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}d((i=i.apply(e,t||[])).next())})};const hs=d.a.get("stores/ModelViewerStore"),fs=new Map,ms=new Map;class gs{constructor(){this.models=[new Y("HUmar",1,10,new Set([6])),new Y("HUnewearl",1,10,new Set),new Y("HUcast",5,0,new Set),new Y("HUcaseal",5,0,new Set),new Y("RAmar",1,10,new Set([0,1,2,3,4,5,6,7,8,9])),new Y("RAmarl",1,10,new Set([0,1,2,3,4,5,6,7,8,9])),new Y("RAcast",5,0,new Set),new Y("RAcaseal",5,0,new Set),new Y("FOmar",1,10,new Set([0,1,2,3,4,5,6,7,8,9])),new Y("FOmarl",1,10,new Set([0,1,2,3,4,5,6,7,8,9])),new Y("FOnewm",1,10,new Set([0,1,2,3,4,5,6,7,8,9])),new Y("FOnewearl",1,10,new Set([0,1,2,3,4,5,6,7,8,9]))],this.animations=new Array(572).fill(void 0).map((e,t)=>new Z(t,`Animation ${t+1}`)),this.clock=new xn.Clock,this.current_bone_count=0,this.animation_playing=!1,this.animation_frame_rate=_s,this.animation_frame=0,this.animation_frame_count=0,this.has_skeleton=!1,this.show_skeleton=!1,this.set_animation_frame_rate=Object(v.d)("set_animation_frame_rate",e=>{this.animation&&(this.animation.mixer.timeScale=e/_s,this.animation_frame_rate=e)}),this.set_animation_frame=Object(v.d)("set_animation_frame",e=>{if(this.animation){const t=this.animation_frame_count;e>t&&(e=1),e<1&&(e=t),this.animation.action.time=(e-1)/_s,this.animation_frame=e}}),this.load_model=e=>ps(this,void 0,void 0,function*(){const t=yield this.get_player_ninja_object(e);this.set_model(t,!0,e),this.current_bone_count=64}),this.load_animation=e=>ps(this,void 0,void 0,function*(){const t=yield this.get_nj_motion(e);this.current_model&&this.set_animation(ws(this.current_model,t),e)}),this.load_file=e=>ps(this,void 0,void 0,function*(){try{const t=yield io(e),n=new $t(t,Kt.Little);if(e.name.endsWith(".nj")){const e=Ln(n)[0];this.set_model(e,!0)}else if(e.name.endsWith(".xj")){const e=Un(n)[0];this.set_model(e,!1)}else if(e.name.endsWith(".njm")){if(this.current_model){const e=rs(n,this.current_bone_count);this.set_animation(ws(this.current_model,e))}}else if(e.name.endsWith(".xvm")){if(this.current_model){const e=sr(n);this.set_textures(ar(e))}}else hs.error(`Unknown file extension in filename "${e.name}".`)}catch(e){hs.error("Couldn't read file.",e)}}),this.pause_animation=Object(v.d)("pause_animation",()=>{this.animation&&(this.animation.action.paused=!0,this.animation_playing=!1,this.clock.stop())}),this.toggle_animation_playing=Object(v.d)("toggle_animation_playing",()=>{this.animation&&(this.animation.action.paused=!this.animation.action.paused,this.animation_playing=!this.animation.action.paused,this.animation_playing?this.clock.start():this.clock.stop())}),this.update_animation_frame=Object(v.d)("update_animation_frame",()=>{if(this.animation&&this.animation_playing){const e=this.animation.action.time;this.animation_frame=Math.round(e*_s)+1}}),this.set_animation=Object(v.d)("set_animation",(e,t)=>{if(!(this.current_obj3d&&this.current_obj3d instanceof xn.SkinnedMesh))return;let n;this.animation?(this.animation.mixer.stopAllAction(),n=this.animation.mixer):n=new xn.AnimationMixer(this.current_obj3d),this.animation={player_animation:t,mixer:n,clip:e,action:n.clipAction(e)},this.clock.start(),this.animation.action.play(),this.animation_playing=!0,this.animation_frame_count=Math.round(_s*e.duration)+1}),this.set_model=Object(v.d)("set_model",(e,t,n)=>{this.current_obj3d&&this.animation&&(this.animation.mixer.stopAllAction(),this.animation.mixer.uncacheRoot(this.current_obj3d),this.animation=void 0),this.current_player_model=n,this.current_model=e,this.current_bone_count=e.bone_count(),this.has_skeleton=t,this.set_obj3d()}),this.set_textures=Object(v.d)("set_textures",e=>{this.set_obj3d(e)}),this.set_obj3d=e=>{if(this.current_model){let t;const n=e&&e.map(e=>new xn.MeshLambertMaterial({skinning:this.has_skeleton,map:e,side:xn.DoubleSide,alphaTest:.5})),i=(t=this.has_skeleton?function(e,t,n=zo){return Vo(e,t,n,xn.SkinnedMesh)}(Jn(this.current_model),n):Ho(Jn(this.current_model),n)).geometry.boundingBox,o=i.max.y-i.min.y;t.translateY(-o/2-i.min.y),this.current_obj3d=t}}}add_to_bone(e,t,n){const i=e.get_bone(n);i&&(i.evaluation_flags.hidden=!1,i.evaluation_flags.break_child_trace=!1,i.children.push(t))}get_player_ninja_object(e){return ps(this,void 0,void 0,function*(){let t=fs.get(e.name);return t||(t=this.get_all_assets(e),fs.set(e.name,t),t)})}get_all_assets(e){return ps(this,void 0,void 0,function*(){const t=yield cs(e.name,"Body"),n=Ln(new $t(t,Kt.Little))[0];if(!n)throw new Error(`Couldn't parse body for player class ${e.name}.`);const i=yield cs(e.name,"Head",0),o=Ln(new $t(i,Kt.Little))[0];if(o&&this.add_to_bone(n,o,59),e.hair_styles_count>0){const t=yield cs(e.name,"Hair",0),i=Ln(new $t(t,Kt.Little))[0];if(i&&this.add_to_bone(n,i,59),e.hair_styles_with_accessory.has(0)){const t=yield cs(e.name,"Accessory",0),i=Ln(new $t(t,Kt.Little))[0];i&&this.add_to_bone(n,i,59)}}return n})}get_nj_motion(e){return ps(this,void 0,void 0,function*(){let t=ms.get(e.id);return t||(t=function(e){return us(this,void 0,void 0,function*(){return yield ti(`/player/animation/animation_${e.toString().padStart(3,"0")}.njm`)})}(e.id).then(e=>rs(new $t(e,Kt.Little),this.current_bone_count)),ms.set(e.id,t),t)})}}vs([v.n.ref],gs.prototype,"current_player_model",void 0),vs([v.n.ref],gs.prototype,"current_model",void 0),vs([v.n.ref],gs.prototype,"current_bone_count",void 0),vs([v.n.ref],gs.prototype,"current_obj3d",void 0),vs([v.n.ref],gs.prototype,"animation",void 0),vs([v.n],gs.prototype,"animation_playing",void 0),vs([v.n],gs.prototype,"animation_frame_rate",void 0),vs([v.n],gs.prototype,"animation_frame",void 0),vs([v.n],gs.prototype,"animation_frame_count",void 0),vs([v.n],gs.prototype,"show_skeleton",void 0);const ks=new gs;let ys;class Rs extends Wr{constructor(){super(new xn.PerspectiveCamera(75,1,1,200)),Object(v.e)(()=>{this.set_model(ks.current_obj3d);const e=ks.show_skeleton;this.skeleton_helper&&(this.skeleton_helper.visible=e,this.schedule_render()),ks.animation&&this.schedule_render(),ks.animation_playing||(ks.animation_frame,this.schedule_render())})}set_size(e,t){this.camera.aspect=e/t,this.camera.updateProjectionMatrix(),super.set_size(e,t)}render(){ks.animation&&(ks.animation.mixer.update(ks.clock.getDelta()),ks.update_animation_frame()),this.light_holder.quaternion.copy(this.camera.quaternion),super.render(),ks.animation&&!ks.animation.action.paused&&this.schedule_render()}set_model(e){this.model!==e&&(this.model&&(this.scene.remove(this.model),this.scene.remove(this.skeleton_helper),this.skeleton_helper=void 0),e&&(this.scene.add(e),this.skeleton_helper=new xn.SkeletonHelper(e),this.skeleton_helper.visible=ks.show_skeleton,this.skeleton_helper.material.linewidth=3,this.scene.add(this.skeleton_helper),this.reset_camera(new xn.Vector3(0,10,20),new xn.Vector3(0,0,0))),this.model=e,this.schedule_render())}}var bs=n("efZy"),Ns=n.n(bs);let Es=class extends i.Component{render(){return o.a.createElement("section",{className:Ns.a.main},o.a.createElement("ul",null,ks.animations.map(e=>{const t=ks.animation&&ks.animation.player_animation&&ks.animation.player_animation.id===e.id;return o.a.createElement("li",{key:e.id,className:t?Ns.a.selected:void 0,onClick:()=>ks.load_animation(e)},e.name)})))}};Es=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([w.a],Es);var Ts=n("VXEj"),Ss=n("bv+U"),Os=n.n(Ss);let Ds=class extends i.Component{render(){const e=ks.current_player_model;return o.a.createElement("section",{className:Os.a.main},o.a.createElement(Ts.a,{itemLayout:"horizontal",dataSource:ks.models,size:"small",renderItem:t=>{const n=e===t;return o.a.createElement(Ts.a.Item,{onClick:()=>ks.load_model(t)},o.a.createElement(Ts.a.Item.Meta,{title:o.a.createElement("span",{className:Os.a.model+(n?` ${Os.a.selected}`:"")},t.name)}))}}))}};Ds=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([w.a],Ds);var Ps=n("ncud"),Cs=n.n(Ps),Fs=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};let Ws=class extends i.Component{componentDidMount(){ks.current_model||ks.load_model(ks.models[5])}render(){return o.a.createElement("div",{className:Cs.a.main},o.a.createElement(Ls,null),o.a.createElement("div",{className:Cs.a.content},o.a.createElement(Ds,null),o.a.createElement(Es,null),o.a.createElement("div",{className:Cs.a.renderer},o.a.createElement(Ae.a,null,({width:e,height:t})=>o.a.createElement(Ar,{renderer:(ys||(ys=new Rs),ys),width:e,height:t,on_will_unmount:ks.pause_animation})))))}};Ws=Fs([w.a],Ws);let Ls=class extends i.Component{constructor(){super(...arguments),this.state={filename:void 0},this.load_file=e=>{e.file.originFileObj&&(this.setState({filename:e.file.name}),ks.load_file(e.file.originFileObj))}}render(){return o.a.createElement("div",{className:Cs.a.toolbar},o.a.createElement(xr.a,{accept:".nj, .njm, .xj, .xvm",showUploadList:!1,onChange:this.load_file,customRequest:()=>!1},o.a.createElement(Ot.a,{icon:"file"},this.state.filename||"Open file...")),ks.animation&&o.a.createElement(o.a.Fragment,null,o.a.createElement(Ot.a,{icon:ks.animation_playing?"pause":"caret-right",onClick:ks.toggle_animation_playing},ks.animation_playing?"Pause animation":"Play animation"),o.a.createElement("div",{className:Cs.a.group},o.a.createElement("span",null,"Frame rate:"),o.a.createElement(te.a,{value:ks.animation_frame_rate,onChange:e=>ks.set_animation_frame_rate(e||0),min:1,step:1})),o.a.createElement("div",{className:Cs.a.group},o.a.createElement("span",null,"Frame:"),o.a.createElement(te.a,{value:ks.animation_frame,onChange:e=>ks.set_animation_frame(e||0),step:1}),o.a.createElement("span",null,"/ ",ks.animation_frame_count))),o.a.createElement("div",{className:Cs.a.group},o.a.createElement("span",null,"Show skeleton:"),o.a.createElement(ts.a,{checked:ks.show_skeleton,onChange:e=>ks.show_skeleton=e})))}};Ls=Fs([w.a],Ls);var Us=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},As=function(e,t,n,i){return new(n||(n=Promise))(function(o,r){function s(e){try{d(i.next(e))}catch(e){r(e)}}function a(e){try{d(i.throw(e))}catch(e){r(e)}}function d(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}d((i=i.apply(e,t||[])).next())})};const Ms=d.a.get("stores/TextureViewerStore");class Is{constructor(){this.load_file=e=>As(this,void 0,void 0,function*(){try{const t=yield io(e);this.current_xvm=sr(new $t(t,Kt.Little))}catch(e){Ms.error("Couldn't read file.",e)}})}}Us([v.n.ref],Is.prototype,"current_xvm",void 0);const Bs=new Is,xs=d.a.get("rendering/TextureRenderer");let js;class Gs extends Wr{constructor(){super(new xn.OrthographicCamera(-400,400,300,-300,1,10)),this.quad_meshes=[],this.render_textures=e=>{let t=10*(e.textures.length-1),n=0;for(const i of e.textures)t+=i.width,n=Math.max(n,i.height);let i=-Math.floor(t/2);const o=-Math.floor(n/2);for(const t of e.textures){let e;try{e=dr(t)}catch(e){xs.warn("Couldn't convert XVM texture.",e)}const r=new xn.Mesh(this.create_quad(i,o+Math.floor((n-t.height)/2),t.width,t.height),e?new xn.MeshBasicMaterial({map:e,transparent:!0}):new xn.MeshBasicMaterial({color:16711935}));this.quad_meshes.push(r),this.scene.add(r),i+=10+t.width}},this.controls.azimuthRotateSpeed=0,this.controls.polarRotateSpeed=0,Object(v.e)(()=>{this.scene.remove(...this.quad_meshes);const e=Bs.current_xvm;e&&this.render_textures(e),this.reset_camera(new xn.Vector3(0,0,5),new xn.Vector3),this.schedule_render()})}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)}create_quad(e,t,n,i){const o=new xn.PlaneGeometry(n,i,1,1);return o.faceVertexUvs=[[[new xn.Vector2(0,0),new xn.Vector2(0,1),new xn.Vector2(1,0)],[new xn.Vector2(0,1),new xn.Vector2(1,1),new xn.Vector2(1,0)]]],o.translate(e+n/2,t+i/2,-5),o}}var Ks=n("VTKT"),zs=n.n(Ks);class Hs extends i.Component{render(){return o.a.createElement("section",{className:zs.a.main},o.a.createElement(Vs,null),o.a.createElement("div",{className:zs.a.renderer},o.a.createElement(Ae.a,null,({width:e,height:t})=>o.a.createElement(Ar,{renderer:(js||(js=new Gs),js),width:e,height:t}))))}}let Vs=class extends i.Component{constructor(){super(...arguments),this.state={filename:void 0},this.load_file=e=>{e.file.originFileObj&&(this.setState({filename:e.file.name}),Bs.load_file(e.file.originFileObj))}}render(){return o.a.createElement("div",{className:zs.a.toolbar},o.a.createElement(xr.a,{accept:".xvm",showUploadList:!1,onChange:this.load_file,customRequest:()=>!1},o.a.createElement(Ot.a,{icon:"file"},this.state.filename||"Open file...")))}};Vs=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([w.a],Vs);var $s=n("sDQ7"),qs=n.n($s);var Js=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};const Ys=De(class extends i.Component{render(){return o.a.createElement("section",{className:qs.a.main},o.a.createElement(Pe.a,{type:"card"},o.a.createElement(Pe.a.TabPane,{tab:"Models",key:"models"},o.a.createElement(Ws,null)),o.a.createElement(Pe.a.TabPane,{tab:"Textures",key:"textures"},o.a.createElement(Hs,null))))}}),Zs=De(es),Xs=De(function(){return o.a.createElement("section",{className:Fe.a.main},o.a.createElement(Pe.a,{type:"card"},o.a.createElement(Mt,{tab:"Optimize",key:"optimize"},o.a.createElement(At,null)),o.a.createElement(Mt,{tab:"Methods",key:"methods"},o.a.createElement(tt,null))))}),Qs=De(Ne);let ea=class extends i.Component{constructor(){super(...arguments),this.menu_clicked=e=>{de.current_tool=e.key},this.keyup=e=>{de.dispatch_global_keyup(e)}}componentDidMount(){window.addEventListener("keyup",this.keyup)}componentWillUnmount(){window.removeEventListener("keyup",this.keyup)}render(){let e;switch(de.current_tool){case"viewer":e=o.a.createElement(Ys,null);break;case"quest_editor":e=o.a.createElement(Zs,null);break;case"hunt_optimizer":e=o.a.createElement(Xs,null);break;case"dps_calc":e=o.a.createElement(Qs,null)}return o.a.createElement("div",{className:ee.a.main},o.a.createElement("div",{className:ee.a.navbar},o.a.createElement(c.b,{className:ee.a.heading_menu,onClick:this.menu_clicked,selectedKeys:[de.current_tool],mode:"horizontal"},o.a.createElement(c.b.Item,{key:"viewer"},"Viewer",o.a.createElement("sup",{className:ee.a.beta},"(Beta)")),o.a.createElement(c.b.Item,{key:"quest_editor"},"Quest Editor",o.a.createElement("sup",{className:ee.a.beta},"(Beta)")),o.a.createElement(c.b.Item,{key:"hunt_optimizer"},"Hunt Optimizer")),o.a.createElement("div",{className:ee.a.server_select},o.a.createElement("span",null,"Server:"),o.a.createElement(_.a,{defaultValue:W.Ephinea,style:{width:120}},o.a.createElement(_.a.Option,{value:W.Ephinea},W.Ephinea)))),o.a.createElement("div",{className:ee.a.content},e))}};ea=Js([w.a],ea);n("Rkej"),n("FkOY"),n("R6Hk"),n("88+i"),n("UvNR"),n("k/c8");d.a.useDefaults({defaultLevel:d.a.WARN});const ta=document.createElement("div");ta.id=u.a.phantasmal_world_root,document.body.append(ta),s.a.render(o.a.createElement(ea,null),ta)},RnhZ:function(e,t,n){var i={"./af":"K/tc","./af.js":"K/tc","./ar":"jnO4","./ar-dz":"o1bE","./ar-dz.js":"o1bE","./ar-kw":"Qj4J","./ar-kw.js":"Qj4J","./ar-ly":"HP3h","./ar-ly.js":"HP3h","./ar-ma":"CoRJ","./ar-ma.js":"CoRJ","./ar-sa":"gjCT","./ar-sa.js":"gjCT","./ar-tn":"bYM6","./ar-tn.js":"bYM6","./ar.js":"jnO4","./az":"SFxW","./az.js":"SFxW","./be":"H8ED","./be.js":"H8ED","./bg":"hKrs","./bg.js":"hKrs","./bm":"p/rL","./bm.js":"p/rL","./bn":"kEOa","./bn.js":"kEOa","./bo":"0mo+","./bo.js":"0mo+","./br":"aIdf","./br.js":"aIdf","./bs":"JVSJ","./bs.js":"JVSJ","./ca":"1xZ4","./ca.js":"1xZ4","./cs":"PA2r","./cs.js":"PA2r","./cv":"A+xa","./cv.js":"A+xa","./cy":"l5ep","./cy.js":"l5ep","./da":"DxQv","./da.js":"DxQv","./de":"tGlX","./de-at":"s+uk","./de-at.js":"s+uk","./de-ch":"u3GI","./de-ch.js":"u3GI","./de.js":"tGlX","./dv":"WYrj","./dv.js":"WYrj","./el":"jUeY","./el.js":"jUeY","./en-SG":"zavE","./en-SG.js":"zavE","./en-au":"Dmvi","./en-au.js":"Dmvi","./en-ca":"OIYi","./en-ca.js":"OIYi","./en-gb":"Oaa7","./en-gb.js":"Oaa7","./en-ie":"4dOw","./en-ie.js":"4dOw","./en-il":"czMo","./en-il.js":"czMo","./en-nz":"b1Dy","./en-nz.js":"b1Dy","./eo":"Zduo","./eo.js":"Zduo","./es":"iYuL","./es-do":"CjzT","./es-do.js":"CjzT","./es-us":"Vclq","./es-us.js":"Vclq","./es.js":"iYuL","./et":"7BjC","./et.js":"7BjC","./eu":"D/JM","./eu.js":"D/JM","./fa":"jfSC","./fa.js":"jfSC","./fi":"gekB","./fi.js":"gekB","./fo":"ByF4","./fo.js":"ByF4","./fr":"nyYc","./fr-ca":"2fjn","./fr-ca.js":"2fjn","./fr-ch":"Dkky","./fr-ch.js":"Dkky","./fr.js":"nyYc","./fy":"cRix","./fy.js":"cRix","./ga":"USCx","./ga.js":"USCx","./gd":"9rRi","./gd.js":"9rRi","./gl":"iEDd","./gl.js":"iEDd","./gom-latn":"DKr+","./gom-latn.js":"DKr+","./gu":"4MV3","./gu.js":"4MV3","./he":"x6pH","./he.js":"x6pH","./hi":"3E1r","./hi.js":"3E1r","./hr":"S6ln","./hr.js":"S6ln","./hu":"WxRl","./hu.js":"WxRl","./hy-am":"1rYy","./hy-am.js":"1rYy","./id":"UDhR","./id.js":"UDhR","./is":"BVg3","./is.js":"BVg3","./it":"bpih","./it-ch":"bxKX","./it-ch.js":"bxKX","./it.js":"bpih","./ja":"B55N","./ja.js":"B55N","./jv":"tUCv","./jv.js":"tUCv","./ka":"IBtZ","./ka.js":"IBtZ","./kk":"bXm7","./kk.js":"bXm7","./km":"6B0Y","./km.js":"6B0Y","./kn":"PpIw","./kn.js":"PpIw","./ko":"Ivi+","./ko.js":"Ivi+","./ku":"JCF/","./ku.js":"JCF/","./ky":"lgnt","./ky.js":"lgnt","./lb":"RAwQ","./lb.js":"RAwQ","./lo":"sp3z","./lo.js":"sp3z","./lt":"JvlW","./lt.js":"JvlW","./lv":"uXwI","./lv.js":"uXwI","./me":"KTz0","./me.js":"KTz0","./mi":"aIsn","./mi.js":"aIsn","./mk":"aQkU","./mk.js":"aQkU","./ml":"AvvY","./ml.js":"AvvY","./mn":"lYtQ","./mn.js":"lYtQ","./mr":"Ob0Z","./mr.js":"Ob0Z","./ms":"6+QB","./ms-my":"ZAMP","./ms-my.js":"ZAMP","./ms.js":"6+QB","./mt":"G0Uy","./mt.js":"G0Uy","./my":"honF","./my.js":"honF","./nb":"bOMt","./nb.js":"bOMt","./ne":"OjkT","./ne.js":"OjkT","./nl":"+s0g","./nl-be":"2ykv","./nl-be.js":"2ykv","./nl.js":"+s0g","./nn":"uEye","./nn.js":"uEye","./pa-in":"8/+R","./pa-in.js":"8/+R","./pl":"jVdC","./pl.js":"jVdC","./pt":"8mBD","./pt-br":"0tRk","./pt-br.js":"0tRk","./pt.js":"8mBD","./ro":"lyxo","./ro.js":"lyxo","./ru":"lXzo","./ru.js":"lXzo","./sd":"Z4QM","./sd.js":"Z4QM","./se":"//9w","./se.js":"//9w","./si":"7aV9","./si.js":"7aV9","./sk":"e+ae","./sk.js":"e+ae","./sl":"gVVK","./sl.js":"gVVK","./sq":"yPMs","./sq.js":"yPMs","./sr":"zx6S","./sr-cyrl":"E+lV","./sr-cyrl.js":"E+lV","./sr.js":"zx6S","./ss":"Ur1D","./ss.js":"Ur1D","./sv":"X709","./sv.js":"X709","./sw":"dNwA","./sw.js":"dNwA","./ta":"PeUW","./ta.js":"PeUW","./te":"XLvN","./te.js":"XLvN","./tet":"V2x9","./tet.js":"V2x9","./tg":"Oxv6","./tg.js":"Oxv6","./th":"EOgW","./th.js":"EOgW","./tl-ph":"Dzi0","./tl-ph.js":"Dzi0","./tlh":"z3Vd","./tlh.js":"z3Vd","./tr":"DoHr","./tr.js":"DoHr","./tzl":"z1FC","./tzl.js":"z1FC","./tzm":"wQk9","./tzm-latn":"tT3J","./tzm-latn.js":"tT3J","./tzm.js":"wQk9","./ug-cn":"YRex","./ug-cn.js":"YRex","./uk":"raLr","./uk.js":"raLr","./ur":"UpQW","./ur.js":"UpQW","./uz":"Loxo","./uz-latn":"AQ68","./uz-latn.js":"AQ68","./uz.js":"Loxo","./vi":"KSF8","./vi.js":"KSF8","./x-pseudo":"/X5v","./x-pseudo.js":"/X5v","./yo":"fzPg","./yo.js":"fzPg","./zh-cn":"XDpg","./zh-cn.js":"XDpg","./zh-hk":"SatO","./zh-hk.js":"SatO","./zh-tw":"kOpN","./zh-tw.js":"kOpN"};function o(e){var t=r(e);return n(t)}function r(e){if(!n.o(i,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return i[e]}o.keys=function(){return Object.keys(i)},o.resolve=r,e.exports=o,o.id="RnhZ"}},[["2YZa",2,0,3]]]); |