');e.append(i);{t.race.governor.config.hasOwnProperty("storage")||(t.race.governor.config.storage={crt:1e3,cnt:1e3});let e=$(`
`);i.append(e);let a=$('
');e.append(a);let r=t.race.kindling_kindred||t.race.smoldering?t.race.smoldering?"Chrysotile":"Stone":"Plywood",s="Steel";a.append($(`
${F("gov_task_storage_reserve",[t.resource[r].name])} `)),a.append($(`
${F("gov_task_storage_reserve",[t.resource[s].name])} `))}{t.race.governor.config.hasOwnProperty("bal_storage")||(t.race.governor.config.bal_storage={}),t.race.governor.config.bal_storage.hasOwnProperty("adv")||(t.race.governor.config.bal_storage.adv=!1);let e=$(`
${F("gov_task_bal_storage")}
${F("advanced")}
`);i.append(e);let a=$('
');e.append(a),Object.keys(t.resource).forEach((function(e){t.resource[e].stackable?(t.race.governor.config.bal_storage.hasOwnProperty(e)||(t.race.governor.config.bal_storage[e]="2"),a.append($(`
${t.resource[e].name} \n \n 0x \n 1/2 \n 1x \n 2x \n 3x \n 4x \n \n
`))):t.race.governor.config.bal_storage.hasOwnProperty(e)&&delete t.race.governor.config.bal_storage[e]}))}{t.race.governor.config.hasOwnProperty("merc")||(t.race.governor.config.merc={buffer:1,reserve:100});let e=$(`
`);i.append(e);let a=$('
');e.append(a),a.append($(`
${F("gov_task_merc_buffer")} `)),a.append($(`
${F("gov_task_merc_reserve")} `))}{t.race.governor.config.hasOwnProperty("spy")||(t.race.governor.config.spy={reserve:100});let e=$(`
`);i.append(e);let a=$('
');e.append(a),a.append($(`
${F("gov_task_merc_reserve")} `))}{t.race.governor.config.hasOwnProperty("spyop")||(t.race.governor.config.spyop={},Object.keys(t.civic.foreign).forEach((function(e){t.race.governor.config.spyop[e]="gov3"===e?["influence","sabotage"]:["sabotage","incite","influence"]})));let e=$(`
`);i.append(e),Object.keys(t.civic.foreign).forEach((function(a){if(a.substr(3,1)<3&&!t.tech.world_control||"gov3"===a&&t.tech.rival){let r=$("
");e.append(r),r.append(`\n
${F("gov_task_spyop_priority",[ee(a.substring(3))])} \n
\n `);let s=$(`#spyopConfig${a}`);t.race.governor.config.spyop[a].forEach((function(e){s.append(`\n
${F("civics_spy_"+e)} \n `)}))}}))}{t.race.governor.config.hasOwnProperty("tax")||(t.race.governor.config.tax={min:20});let e=$(`
`);i.append(e);let a=$('
');e.append(a),a.append($(`
${F("gov_task_tax_min")} `))}{t.race.governor.config.hasOwnProperty("slave")||(t.race.governor.config.slave={reserve:100});let e=$(`
`);i.append(e);let a=$('
');e.append(a),a.append($(`
${F("gov_task_merc_reserve")} `))}{t.race.governor.config.hasOwnProperty("trash")||(t.race.governor.config.trash={}),["Infernite","Elerium","Copper","Iron"].forEach((function(e){t.race.governor.config.trash.hasOwnProperty(e)&&"object"==typeof t.race.governor.config.trash[e]&&null!==t.race.governor.config.trash[e]||(t.race.governor.config.trash[e]={v:0,s:!0})}));let e=$(`
`);i.append(e);let a=$('
');e.append(a),Object.keys(t.race.governor.config.trash).forEach((function(e){a.append($(`
`))}))}{t.race.governor.config.hasOwnProperty("replicate")||(t.race.governor.config.replicate={}),t.race.governor.config.replicate.hasOwnProperty("pow")||(t.race.governor.config.replicate.pow={on:!1,cap:1e4,buffer:0}),t.race.governor.config.replicate.hasOwnProperty("res")||(t.race.governor.config.replicate.res={que:!0,neg:!0,cap:!0});let e=$(`
${F("gov_task_replicate")}
`);i.append(e);let a=$('
');e.append(a),a.append($(`
${F("gov_task_replicate_auto")}
`)),a.append($(`
${F("gov_task_replicate_pmax")} `)),a.append($(`
${F("gov_task_replicate_buff")} `));let r=$('
');e.append(r),r.append($(`
${F("gov_task_replicate_que")}
`)),r.append($(`
${F("gov_task_replicate_neg")}
`)),r.append($(`
${F("gov_task_replicate_cap")}
`))}sc({el:"#govOffice",data:{t:t.race.governor.tasks,c:t.race.governor.config,r:t.resource},methods:{setTask(e,a){t.race.governor.tasks[`t${a}`]=e,Zi("govtask",{task:e}),sc({el:"#race"},"update")},showTask:e=>Object.values(t.race.governor.tasks).includes(e),activeTask(e){let a=[];return t.race.hasOwnProperty("governor")&&Object.keys(t.race.governor.tasks).forEach((function(e){"none"!==t.race.governor.tasks[e]&&a.push(t.race.governor.tasks[e])})),!a.includes(e)},showStrRes:e=>t.resource[e].display,bStrEx:()=>t.race.governor.config.bal_storage.adv?"m":"",fire(){let e=(10+(t.race.governor.hasOwnProperty("f")?t.race.governor.f:0))**2-50,a="antimatter"===t.race.universe?"AntiPlasmid":"Plasmid";t.prestige[a].count>=e&&(t.prestige[a].count-=e,t.race.governor.candidates=I(10),t.race.governor.hasOwnProperty("f")?t.race.governor.f++:t.race.governor.f=1,delete t.race.governor.g,delete t.race.governor.tasks,Ks(!1,["city-amphitheatre","city-apartment"]),Ri(),Hi(),K())},fireText(){let e=(10+(t.race.governor.hasOwnProperty("f")?t.race.governor.f:0))**2-50;return`
${F("governor_fire")}
${e} ${F("antimatter"===t.race.universe?"resource_AntiPlasmid_plural_name":"resource_Plasmid_plural_name")}
`},trashStrat(e){t.race.governor.config.trash[e].s=!t.race.governor.config.trash[e].s},trashLabel:e=>F(t.race.governor.config.trash[e].s?"gov_task_trash_max":"gov_task_trash_min",[t.resource[e].name])},filters:{label:e=>B[e]?"string"==typeof B[e].name?B[e].name:B[e].name():F(`gov_task_${e}`)}}),Ti("govOffice",(function(){let e="";return Object.keys(A[t.race.governor.g.bg].traits).forEach((function(t){e+=(T[t].hasOwnProperty("effect")?T[t].effect():"")+" "})),e}),{elm:"#govOffice .bg"}),Object.keys(t.civic.foreign).forEach((function(e){!function(e){let a=$(`#spyopConfig${e}`)[0];a&&Sortable.create(a,{onEnd(a){let r=t.race.governor.config.spyop[e];r.splice(a.newDraggableIndex,0,r.splice(a.oldDraggableIndex,1)[0]),t.race.governor.config.spyop[e]=r,K()}})}(e)}))}():function(){let e=$('
');$("#r_govern1").append(e),t.race.hasOwnProperty("governor")&&t.race.governor.hasOwnProperty("candidates")||(t.race.governor={candidates:I(10)}),e.append($(``;return a+=`
${F("tau_red_jeff_effect2",[t.tauceti.overseer?t.tauceti.overseer.working:0])}
`,a+=`
${F("tau_red_jeff_effect3",[e])}
`,a+=`
${F("tau_red_jeff_effect4",[t.tauceti.overseer?t.tauceti.overseer.loyal:0])}
`,a+=`
${F("tau_red_jeff_effect5",[t.tauceti.overseer?t.tauceti.overseer.morale:0])}
`,t.tech.hasOwnProperty("womling_tech")&&(a+=`
${F("tau_red_jeff_effect6",[t.tech.womling_tech])}
`),a+=`
${F("job_farmer")}: ${t.tauceti.womling_farm?t.tauceti.womling_farm.farmers:0}
`,a+=`
${F("job_miner")}: ${t.tauceti.womling_mine?t.tauceti.womling_mine.miners:0}
`,t.tauceti.womling_lab&&(a+=`
${F("job_scientist")}: ${t.tauceti.womling_lab?t.tauceti.womling_lab.scientist:0}
`),a},action:()=>!1},overseer:{id:"tauceti-overseer",title(){return $(this)[0].name()},desc(){return`
${$(this)[0].name()}
${F("space_support",[Xt().red])}
`},name:()=>t.race.womling_lord?F("tau_red_overseer"):t.race.womling_god?F("tau_red_womgod"):F("tau_red_womally"),reqs:{tau_red:5},path:["truepath"],cost:{Money:e=>Xi("overseer",e,6e6,1.28,"tauceti"),Cement:e=>Xi("overseer",e,245e4,1.28,"tauceti"),Alloy:e=>t.race.womling_friend?Xi("overseer",e,185e4,1.28,"tauceti"):0,Neutronium:e=>t.race.womling_lord?Xi("overseer",e,165e3,1.28,"tauceti"):0,Titanium:e=>t.race.womling_god?Xi("overseer",e,225e4,1.28,"tauceti"):0},effect(){let e=`
${F("tau_new_support",[$(this)[0].support(),Xt().red])}
`;return e+=`
${F("tau_red_overseer_effect",[$(this)[0].val()])}
`,e},val(){let e=0;return t.race.womling_lord?e=t.stats.achieve.overlord&&t.stats.achieve.overlord.l>=5?12:10:t.race.womling_god?e=t.stats.achieve.overlord&&t.stats.achieve.overlord.l>=5?6:5:t.race.womling_friend&&(e=t.stats.achieve.overlord&&t.stats.achieve.overlord.l>=5?10:8),t.race.lone_survivor&&(e*=2),e},support:()=>-1,powered:()=>oc(1),action(){return!!Os($(this)[0])&&(t.tauceti.overseer.count++,t.tauceti.orbital_platform.support-$(this)[0].support()<=t.tauceti.orbital_platform.s_max&&t.tauceti.overseer.on++,!0)}},womling_village:{id:"tauceti-womling_village",title:F("tau_red_womling_village"),desc:()=>`
${F("tau_red_womling_village")}
${F("space_support",[Xt().red])}
`,reqs:{tau_red:5},path:["truepath"],cost:{Money:e=>Xi("womling_village",e,1e7,1.28,"tauceti"),Stone:e=>Xi("womling_village",e,225e4,1.28,"tauceti"),Plywood:e=>Xi("womling_village",e,Ye(125e4),1.28,"tauceti"),Wrought_Iron:e=>Xi("womling_village",e,Ye(4e5),1.28,"tauceti")},effect(){let e=t.tech.womling_pop&&t.tech.womling_pop>=2?6:5,a=`
${F("tau_new_support",[$(this)[0].support(),Xt().red])}
`;return a+=`
${F("tau_red_womling_village_effect",[e])}
`,t.tech.tau_junksale&&(a+=`
${F("tau_red_womling_village_effect2",[40,F(`tau_gas2_alien_station_data4_r${t.race.tau_junk_item||0}`)])}
`),a},support:()=>-1,powered:()=>oc(1),action(){return!!Os($(this)[0])&&(t.tauceti.womling_village.count++,t.tauceti.orbital_platform.support-$(this)[0].support()<=t.tauceti.orbital_platform.s_max&&t.tauceti.womling_village.on++,!0)}},womling_farm:{id:"tauceti-womling_farm",title:F("tau_red_womling_farm"),desc:()=>`
${F("tau_red_womling_farm")}
${F("space_support",[Xt().red])}
`,reqs:{tau_red:5},path:["truepath"],cost:{Money:e=>Xi("womling_farm",e,24e6,1.28,"tauceti"),Iron:e=>Xi("womling_farm",e,95e5,1.28,"tauceti"),Water:e=>Xi("womling_farm",e,5e3,1.28,"tauceti")},effect(){let e=t.tech.womling_pop?16:12;t.tech.womling_gene&&(e+=4);let a=t.tauceti.hasOwnProperty("womling_farm")?t.tauceti.womling_farm.farmers:0,r=`
${F("tau_new_support",[$(this)[0].support(),Xt().red])}
`;return r+=`
${F("tau_red_womling_farm_effect",[e])}
`,r+=`
${F("tau_red_womling_employ",[2])}
`,t.tech.isolation&&(r+=`
${F("tau_red_womling_generate",[t.resource.Furs.name])}
`),r+=`
${F("tau_red_womling_farm_effect2",[e/2*a])}
`,r},support:()=>-1,powered:()=>oc(1),action(){return!!Os($(this)[0])&&(t.tauceti.womling_farm.count++,t.tauceti.orbital_platform.support-$(this)[0].support()<=t.tauceti.orbital_platform.s_max&&t.tauceti.womling_farm.on++,!0)}},womling_mine:{id:"tauceti-womling_mine",title:F("tau_red_womling_mine"),desc:()=>`
${F("tau_red_womling_mine")}
${F("space_support",[Xt().red])}
`,reqs:{tau_red:5},path:["truepath"],cost:{Money:e=>Xi("womling_mine",e,125e5,1.28,"tauceti"),Lumber:e=>Xi("womling_mine",e,128e5,1.28,"tauceti"),Steel:e=>Xi("womling_mine",e,45e5,1.28,"tauceti")},effect(){let e=`
${F("tau_new_support",[$(this)[0].support(),Xt().red])}
`;return t.tech.isolation?t.race.lone_survivor?e+=`
${F("tau_red_womling_mine_effect_c",[t.resource.Unobtainium.name,t.resource.Uranium.name,t.resource.Titanium.name,t.resource.Iron.name,t.resource.Copper.name,t.resource.Aluminium.name,t.resource.Neutronium.name,t.resource.Iridium.name])}
`:e+=`
${F("tau_red_womling_mine_effect_b",[t.resource.Unobtainium.name,t.resource.Uranium.name,t.resource.Titanium.name])}
`:e+=`
${F("tau_red_womling_mine_effect_a",[t.resource.Unobtainium.name])}
`,e+=`
${F("tau_red_womling_employ",[6])}
`,e},support:()=>-1,powered:()=>oc(1),action(){return!!Os($(this)[0])&&(t.tauceti.womling_mine.count++,t.resource.Unobtainium.display=!0,t.tauceti.orbital_platform.support-$(this)[0].support()<=t.tauceti.orbital_platform.s_max&&t.tauceti.womling_mine.on++,!0)},flair:()=>F("tau_red_womling_mine_flair")},womling_fun:{id:"tauceti-womling_fun",title(){return $(this)[0].name()},desc(){return`
${$(this)[0].name()}
${F("space_support",[Xt().red])}
`},name:()=>t.race.womling_lord?F("tau_red_womling_fun1"):t.race.womling_god?F("tau_red_womling_fun2"):F("tau_red_womling_fun3"),reqs:{tau_red:6},path:["truepath"],cost:{Money:e=>Xi("womling_fun",e,38e5,1.28,"tauceti"),Food:e=>t.race.womling_friend?Xi("womling_fun",e,175e3,1.28,"tauceti"):0,Lumber:e=>Xi("womling_fun",e,5e5,1.28,"tauceti"),Stone:e=>Xi("womling_fun",e,5e5,1.28,"tauceti"),Furs:e=>t.race.womling_lord||t.race.womling_god?Xi("womling_fun",e,835e3,1.28,"tauceti"):0,Copper:e=>t.race.womling_lord?Xi("womling_fun",e,1125e3,1.28,"tauceti"):0,Alloy:e=>t.race.womling_god?Xi("womling_fun",e,656e3,1.28,"tauceti"):0,Water:e=>t.race.womling_friend?Xi("womling_fun",e,3500,1.28,"tauceti"):0},effect(){let e=`
${F("tau_new_support",[$(this)[0].support(),Xt().red])}
`;return e+=`
${F("tau_red_womling_fun_effect",[$(this)[0].val()])}
`,e},val(){let e=0;return t.race.womling_lord?e=t.stats.achieve.overlord&&t.stats.achieve.overlord.l>=5?24:20:t.race.womling_god?e=t.stats.achieve.overlord&&t.stats.achieve.overlord.l>=5?12:10:t.race.womling_friend&&(e=t.stats.achieve.overlord&&t.stats.achieve.overlord.l>=5?18:15),t.race.lone_survivor&&(e*=2),e},support:()=>-1,powered:()=>oc(1),action(){return!!Os($(this)[0])&&(t.tauceti.womling_fun.count++,t.tauceti.orbital_platform.support-$(this)[0].support()<=t.tauceti.orbital_platform.s_max&&t.tauceti.womling_fun.on++,!0)}},womling_lab:{id:"tauceti-womling_lab",title:F("interstellar_laboratory_title"),desc:()=>`
${F("interstellar_laboratory_title")}
${F("space_support",[Xt().red])}
`,reqs:{tau_red:7},path:["truepath"],cost:{Money:e=>Xi("womling_lab",e,65e6,1.28,"tauceti"),Elerium:e=>Xi("womling_lab",e,1200,1.28,"tauceti"),Orichalcum:e=>Xi("womling_lab",e,25e5,1.28,"tauceti"),Unobtainium:e=>Xi("womling_lab",e,1e4,1.28,"tauceti"),Quantium:e=>Xi("womling_lab",e,Ye(95e3),1.28,"tauceti")},effect(){let e=t.tauceti.hasOwnProperty("overseer")?t.tauceti.overseer.prod:100,a=Math.round(25e3*e/100),r=`
${F("tau_new_support",[$(this)[0].support(),Xt().red])}
`;return r+=`
${F("tau_red_womling_lab_effect",[a])}
`,r+=`
${F("tau_red_womling_employ_single",[1])}
`,r},support:()=>-1,powered:()=>oc(1),action(){return!!Os($(this)[0])&&(t.tauceti.womling_lab.count++,t.tauceti.orbital_platform.support-$(this)[0].support()<=t.tauceti.orbital_platform.s_max&&t.tauceti.womling_lab.on++,!0)}}},tau_gas:{info:{name(e,a){let r=a||"gas_name",s="gas_name"===r?0:1;if(e||t.race[r])switch(e||t.race[r]){case 1:{let e="antimatter"===t.race.universe?"plasmid":"antiplasmid";switch(Math.round(t.stats[e]+s)%3){case 1:return F("tau_planet",[Xt().gas]);case 2:return F("tau_gas_title0a",[Xt().gas]);default:return F("tau_gas_title0b",[Xt().gas])}}case 2:switch(Math.round(t.stats.reset+s)%3){case 1:return F("tau_gas_title1a");case 2:return F("tau_gas_title1b");default:return F("tau_gas_title1c")}case 3:switch(Math.round(t.stats.mad+s)%3){case 1:return F("tau_gas_title2a");case 2:return F("tau_gas_title2b");default:return F("tau_gas_title2c")}case 4:switch(Math.round(t.stats.bioseed+s)%3){case 1:return F("tau_gas_title3a",[di[t.race.gods].solar.gas]);case 2:return F("tau_gas_title3b",[di[t.race.old_gods].name]);default:return F("tau_gas_title3c",[di[t.race.species].name])}case 5:switch(Math.round(t.stats.portals+s)%3){case 1:return F("tau_gas_title4a",[Xt().gas]);case 2:return F("tau_gas_title4b",[Ac("reverse",Xt().gas)]);default:return F("tau_gas_title4c")}case 6:switch(Math.round(t.stats.womling.friend.l+t.stats.womling.lord.l+t.stats.womling.god.l+s)%3){case 1:return F("tau_gas_title5a");case 2:return F("tau_gas_title5b");default:return F("tau_gas_title5c")}case 7:switch(Math.round(t.stats.tdays+s)%3){case 1:return F("tau_gas_title6a");case 2:return F("tau_gas_title6b");default:return F("tau_gas_title6c")}default:return F("gas_name"===r?"tau_gas_title":"tau_gas2_title")}return F("gas_name"===r?"tau_gas_title":"tau_gas2_title")},desc:()=>F("tau_gas_desc")},gas_contest:{id:"tauceti-gas_contest",title:()=>F("tau_gas_contest_title"),desc:()=>F("tau_gas_contest_title"),reqs:{tauceti:5},grant:["tau_gas",1],path:["truepath"],queue_complete:()=>t.tech.tau_gas>=1?0:1,cost:{Money:()=>1e7},effect:()=>t.race.lone_survivor?F("tau_gas_contest_effect_alt"):F("tau_gas_contest_effect"),action(){return!!Os($(this)[0])}},refueling_station:{id:"tauceti-refueling_station",title:()=>F("tau_gas_refueling_station_title"),desc:()=>`
${F("tau_gas_refueling_station_title")}
${F("requires_power")}
`,reqs:{tau_gas:2},path:["truepath"],cost:{Money:e=>Xi("refueling_station",e,68e6,1.28,"tauceti"),Graphene:e=>Xi("refueling_station",e,25e5,1.28,"tauceti"),Unobtainium:e=>Xi("refueling_station",e,5500,1.28,"tauceti"),Mythril:e=>Xi("refueling_station",e,Ye(6e4),1.28,"tauceti")},powered:()=>oc(t.tech.isolation?2:5),effect(){let e=+Pe("refueling_station").toFixed(2),a=Lr(1e4),r=`
${F("space_gas_mining_effect1",[e])}
`;return r+=`
${F("plus_max_resource",[a.toLocaleString(),t.resource.Helium_3.name])}
`,t.tech.tau_whale>=2&&(r+=`
${F("plus_max_resource",[Lr(6500).toLocaleString(),t.resource.Oil.name])}
`),t.tech.isolation&&(r+=`
${F("interstellar_g_factory_effect")}
`),r+=`
${F("minus_power",[$(this)[0].powered()])}
`,r},special:()=>!!t.tech.isolation,action(){return!!Os($(this)[0])&&(t.tauceti.refueling_station.count++,xs($(this)[0]),!0)},post(){2===t.tech.tau_gas&&(t.tech.tau_gas=3,ms())}},ore_refinery:{id:"tauceti-ore_refinery",title:()=>F("tau_gas_ore_refinery_title"),desc:()=>`
${F("tau_gas_ore_refinery_title")}
${F("requires_power")}
`,reqs:{tau_gas:4},path:["truepath"],cost:{Money:e=>Xi("ore_refinery",e,52e6,1.28,"tauceti"),Iridium:e=>Xi("ore_refinery",e,16e5,1.28,"tauceti"),Unobtainium:e=>Xi("ore_refinery",e,800,1.28,"tauceti"),Sheet_Metal:e=>Xi("ore_refinery",e,Ye(118e3),1.28,"tauceti")},powered:()=>oc(t.tech.isolation?2:8),effect(){let e=t.tauceti.hasOwnProperty("ore_refinery")?t.tauceti.ore_refinery.fill:0,a=t.tauceti.hasOwnProperty("ore_refinery")?t.tauceti.ore_refinery.max:0,r=+Pe("ore_refinery").toFixed(2),s=`
${F("tau_gas_ore_refinery_effect",[+e.toFixed(2)])}
`;return s+=`
${F("tau_gas_ore_refinery_effect2",[a])}
`,s+=`
${F("tau_gas_ore_refinery_effect3",[r])}
`,s+=`
${F("interstellar_stellar_forge_effect3",[t.tech.isolation?12:4])}
`,s+=`
${F("minus_power",[$(this)[0].powered()])}
`,s},special:!0,action(){return!!Os($(this)[0])&&(t.tauceti.ore_refinery.count++,t.city.powered&&t.city.power>=$(this)[0].powered()&&(t.tauceti.ore_refinery.on++,t.city.smelter.cap+=t.tech.isolation?12:2,t.city.smelter.Steel+=t.tech.isolation?12:2,t.race.evil?t.city.smelter.Wood+=t.tech.isolation?12:2:t.city.smelter.Oil+=t.tech.isolation?12:2),!0)},post(){3===t.tech.tau_roid&&(t.tech.tau_roid=4,tt(),ms())}},whaling_station:{id:"tauceti-whaling_station",title:()=>F("tau_gas_whaling_station_title"),desc:()=>`
${F("tau_gas_whaling_station_title")}
${F("requires_power")}
`,reqs:{tau_whale:1},path:["truepath"],cost:{Money:e=>Xi("whaling_station",e,72e6,1.28,"tauceti"),Steel:e=>Xi("whaling_station",e,18e5,1.28,"tauceti"),Polymer:e=>Xi("whaling_station",e,955e3,1.28,"tauceti"),Orichalcum:e=>Xi("whaling_station",e,268e3,1.28,"tauceti")},powered:()=>oc(t.tech.isolation?2:6),effect(){let e=t.tauceti.hasOwnProperty("whaling_station")?t.tauceti.whaling_station.fill:0,a=t.tauceti.hasOwnProperty("whaling_station")?t.tauceti.whaling_station.max:0,r=+Pe("whaling_station").toFixed(2),s=`
${F("tau_gas_whaling_station_effect",[+e.toFixed(2)])}
`;return s+=`
${F("tau_gas_whaling_station_effect2",[a])}
`,s+=`
${F("tau_gas_whaling_station_effect3",[r])}
`,s+=`
${F("minus_power",[$(this)[0].powered()])}
`,s},action(){return!!Os($(this)[0])&&(t.tauceti.whaling_station.count++,xs($(this)[0]),!0)},post(){1===t.tech.tau_whale&&(t.tech.tau_whale=2,tt())}},womling_station:{id:"tauceti-womling_station",title:()=>F("tau_gas_womling_station_title"),desc:()=>`
${F("tau_gas_womling_station_desc")}
${F("requires_power")}
`,reqs:{womling_technicians:1},path:["truepath"],cost:{Money:e=>Xi("womling_station",e,1334e5,1.26,"tauceti"),Furs:e=>Xi("womling_station",e,3805e3,1.26,"tauceti"),Aluminium:e=>Xi("womling_station",e,85e5,1.26,"tauceti"),Nano_Tube:e=>Xi("womling_station",e,909e3,1.26,"tauceti")},powered:()=>oc(t.tech.isolation?3:6),effect(){let e=t.tech.isolation?30:8;t.tech.womling_gene&&(e*=1.25);let a=`
${F("tau_gas_womling_station_effect",[e,Ze.tau_gas.info.name()])}
`;return t.race.flier||(a+=`
${F("city_cement_plant_effect1",[la(1)])}
`),a+=`
${F("space_red_fabrication_effect1",[la(1)])}
`,a+=`
${F("minus_power",[$(this)[0].powered()])}
`,a},action(){return!!Os($(this)[0])&&(t.tauceti.womling_station.count++,xs($(this)[0]),!0)}}},tau_roid:{info:{name:()=>F("tau_roid_title"),desc:()=>F("tau_roid_desc"),support:"patrol_ship"},roid_mission:{id:"tauceti-roid_mission",title:()=>F("space_mission_title",[F("tau_roid_title")]),desc:()=>F("space_mission_desc",[F("tau_roid_title")]),reqs:{tauceti:5},grant:["tau_roid",1],path:["truepath"],queue_complete:()=>t.tech.tau_roid>=1?0:1,cost:{Helium_3:(e,t)=>+Yt(125e4).toFixed(0)},effect:()=>F("tau_roid_mission_effect",[F("tau_roid_title")]),action(){return!!Os($(this)[0])&&(Di(F("tau_roid_mission_result"),"info",!1,["progress"]),!0)}},patrol_ship:{id:"tauceti-patrol_ship",title:F("tau_roid_patrol_ship"),desc:()=>`
${F("tau_roid_patrol_ship")}
${F("requires_res",[t.resource.Helium_3.name])}
`,reqs:{tau_roid:3},path:["truepath"],cost:{Money:e=>Xi("patrol_ship",e,45e6,1.25,"tauceti"),Adamantite:e=>Xi("patrol_ship",e,18e5,1.25,"tauceti"),Elerium:e=>Xi("patrol_ship",e,520,1.25,"tauceti"),Stanene:e=>Xi("patrol_ship",e,2675e3,1.25,"tauceti"),Bolognium:e=>Xi("patrol_ship",e,115e4,1.25,"tauceti")},effect(){let e=+Yt($(this)[0].support_fuel().a).toFixed(1),a=`
${F("tau_roid_patrol_ship_security",[$(this)[0].support()])}
`;return a+=`
${F("tau_roid_patrol_ship_effect")}
`,a+=`
${F("spend",[e,t.resource[$(this)[0].support_fuel().r].name])}
`,a},support_fuel:()=>({r:"Helium_3",a:t.tech.isolation?15:250}),support:()=>1,powered:()=>oc(1),refresh:!0,action(){return!!Os($(this)[0])&&(t.tauceti.patrol_ship.count++,t.tauceti.patrol_ship.on++,!0)}},mining_ship:{id:"tauceti-mining_ship",title:F("tau_roid_mining_ship"),desc:()=>`
${F("tau_roid_mining_ship")}
`,reqs:{tau_roid:4},path:["truepath"],cost:{Money:e=>Xi("mining_ship",e,28e6,1.28,"tauceti"),Uranium:e=>Xi("mining_ship",e,12500,1.28,"tauceti"),Titanium:e=>Xi("mining_ship",e,22e5,1.28,"tauceti"),Alloy:e=>Xi("mining_ship",e,175e4,1.28,"tauceti")},effect(){let e=+Yt($(this)[0].support_fuel().a).toFixed(1),a=`
${F("tau_roid_mining_ship_effect",[+Pe("mining_ship").toFixed(2)])}
`;return a+=`
${F("spend",[e,t.resource[$(this)[0].support_fuel().r].name])}
`,a},support_fuel:()=>({r:"Helium_3",a:t.tech.isolation?12:75}),support:()=>-1,powered:()=>oc(1),special:!0,action(){return!!Os($(this)[0])&&(t.tauceti.mining_ship.count++,t.tauceti.mining_ship.on++,!0)}},whaling_ship:{id:"tauceti-whaling_ship",title:F("tau_roid_whaling_ship"),desc:()=>`
${F("tau_roid_whaling_ship")}
`,reqs:{tau_whale:2},path:["truepath"],cost:{Money:e=>Xi("whaling_ship",e,35e6,1.28,"tauceti"),Aluminium:e=>Xi("whaling_ship",e,34e5,1.28,"tauceti"),Neutronium:e=>Xi("whaling_ship",e,168e3,1.28,"tauceti"),Nano_Tube:e=>Xi("whaling_ship",e,8e5,1.28,"tauceti")},effect(){let e=+Yt($(this)[0].support_fuel().a).toFixed(1),a=`
${F("tau_roid_whaling_ship_effect",[+Pe("whaling_ship").toFixed(2)])}
`;return a+=`
${F("spend",[e,t.resource[$(this)[0].support_fuel().r].name])}
`,a},support_fuel:()=>({r:"Helium_3",a:t.tech.isolation?14:90}),support:()=>-1,powered:()=>oc(1),action(){return!!Os($(this)[0])&&(t.tauceti.whaling_ship.count++,t.tauceti.whaling_ship.on++,!0)}}},tau_gas2:{info:{name:e=>Ze.tau_gas.info.name(e||t.race.gas_name2||!1,"gas_name2"),desc:()=>F("tau_gas2_desc",[Ze.tau_gas.info.name()])},gas_contest2:{id:"tauceti-gas_contest2",title:()=>F("tau_gas2_contest_title"),desc:()=>F("tau_gas2_contest_title"),reqs:{tau_gas2:1},grant:["tau_gas2",2],path:["truepath"],queue_complete:()=>t.tech.tau_gas2>=1?0:1,cost:{Money:()=>25e6},effect:()=>F("tau_gas2_contest_effect"),action(){return!!Os($(this)[0])},flair:()=>F("tau_gas2_contest_flair")},alien_station_survey:{id:"tauceti-alien_station_survey",title:F("tau_gas2_alien_station"),desc:F("tau_gas2_alien_station"),reqs:{tau_gas2:3},grant:["tau_gas2",4],path:["truepath"],queue_complete:()=>t.tech.tau_gas3>=4?0:1,cost:{Money:()=>t.race.lone_survivor?15e8:3e9,Helium_3:()=>5e6},effect:()=>F("tau_gas2_alien_station_repair_effect",[Ze.tau_gas2.info.name()]),action(){return!!Os($(this)[0])&&(t.tauceti.alien_station={count:0},Di(F("tau_gas2_alien_station_msg",[Ze.tau_gas2.info.name()]),"info",!1,["progress"]),!0)}},alien_station:{id:"tauceti-alien_station",title:F("tau_gas2_alien_station"),desc:e=>!t.tauceti.hasOwnProperty("alien_station")||t.tauceti.alien_station.count<100||e?`
${F("tau_gas2_alien_station")}
`+(t.tauceti.hasOwnProperty("alien_station")&&t.tauceti.alien_station.count>=100?`
${F("space_dwarf_reactor_desc_req")}
`:`
${F("tau_gas2_alien_station_repair")}
`):`
${F("tau_gas2_alien_station")}
`,reqs:{tau_gas2:4},condition:()=>t.tauceti.alien_station.count<100,path:["truepath"],queue_size:5,queue_complete:()=>100-t.tauceti.alien_station.count,cost:{Money:e=>(e||0)+(t.tauceti.hasOwnProperty("alien_station")?t.tauceti.alien_station.count:0)<100?t.race.lone_survivor?12e6:5e7:0,Aluminium:e=>(e||0)+(t.tauceti.hasOwnProperty("alien_station")?t.tauceti.alien_station.count:0)<100?t.race.lone_survivor?256e3:256e4:0,Polymer:e=>(e||0)+(t.tauceti.hasOwnProperty("alien_station")?t.tauceti.alien_station.count:0)<100?t.race.lone_survivor?198900:989e3:0,Mythril:e=>(e||0)+(t.tauceti.hasOwnProperty("alien_station")?t.tauceti.alien_station.count:0)<100?Ye(125e3):0,Cipher:e=>(e||0)+(t.tauceti.hasOwnProperty("alien_station")?t.tauceti.alien_station.count:0)<100?t.race.lone_survivor?256:2001:0},effect(e){let a="",r=(e||0)+(t.tauceti.hasOwnProperty("alien_station")?t.tauceti.alien_station.count:0);return r<100?(a+=`
${F("tau_gas2_alien_station_repaired",[r])}
`,a):Ze.tau_gas2.alien_space_station.effect(e)},action(){return!!(Os($(this)[0])&&t.tauceti.alien_station.count<100)&&(t.tauceti.alien_station.count++,t.tauceti.alien_station.count>=100&&(t.tech.tau_gas2=5,t.tauceti.alien_space_station={count:1,on:0}),!0)},post(){t.resource.Elerium.diff>=10&&(t.tauceti.alien_space_station.on=1),tt()}},alien_space_station:{id:"tauceti-alien_space_station",title:F("tau_gas2_alien_station"),desc:()=>`
${F("tau_gas2_alien_station")}
${F("space_dwarf_reactor_desc_req")}
`,reqs:{tau_gas2:5},path:["truepath"],cost:{},queue_complete:()=>0,special:()=>!(!t.tech.tau_gas2||6!==t.tech.tau_gas2||t.tech.alien_data&&!(t.tech.alien_data<6)),wiki:!1,effect(){let e=$(this)[0].p_fuel().a,a=`
${F("space_dwarf_reactor_effect1",[-$(this)[0].powered()])}
`;if(t.tech.tau_gas2&&t.tech.tau_gas2>=6&&t.tauceti.alien_space_station.hasOwnProperty("decrypted")){let e=t.race.lone_survivor?1e5:25e6,r=+(t.tauceti.alien_space_station.decrypted/e).toFixed(2);r>100&&(r=100),a+=`
${F("tau_gas2_alien_station_effect",[r])}
`}return a+=`
${F("spend",[e,t.resource[$(this)[0].p_fuel().r].name])}
`,a},p_fuel:()=>({r:"Elerium",a:t.race.lone_survivor?1:10}),powered:()=>cc(-75),action:()=>!1},matrioshka_brain:{id:"tauceti-matrioshka_brain",title:F("tech_matrioshka_brain"),desc:e=>!t.tauceti.hasOwnProperty("matrioshka_brain")||t.tauceti.matrioshka_brain.count<1e3||e?`
${F("tech_matrioshka_brain")}
${F("requires_segmemts",[1e3])}
`:`
${F("tech_matrioshka_brain")}
`,reqs:{tau_gas2:7},condition:()=>!!t.tauceti.matrioshka_brain,path:["truepath"],queue_size:50,queue_complete:()=>1e3-t.tauceti.matrioshka_brain.count,cost:{Money:e=>(e||0)+(t.tauceti.hasOwnProperty("matrioshka_brain")?t.tauceti.matrioshka_brain.count:0)<1e3?2e7:0,Neutronium:e=>(e||0)+(t.tauceti.hasOwnProperty("matrioshka_brain")?t.tauceti.matrioshka_brain.count:0)<1e3?45e3:0,Nano_Tube:e=>(e||0)+(t.tauceti.hasOwnProperty("matrioshka_brain")?t.tauceti.matrioshka_brain.count:0)<1e3?16e4:0,Adamantite:e=>(e||0)+(t.tauceti.hasOwnProperty("matrioshka_brain")?t.tauceti.matrioshka_brain.count:0)<1e3?666e3:0,Stanene:e=>(e||0)+(t.tauceti.hasOwnProperty("matrioshka_brain")?t.tauceti.matrioshka_brain.count:0)<1e3?61600:0,Bolognium:e=>(e||0)+(t.tauceti.hasOwnProperty("matrioshka_brain")?t.tauceti.matrioshka_brain.count:0)<1e3?44e3:0,Unobtainium:e=>(e||0)+(t.tauceti.hasOwnProperty("matrioshka_brain")?t.tauceti.matrioshka_brain.count:0)<1e3?1200:0,Mythril:e=>(e||0)+(t.tauceti.hasOwnProperty("matrioshka_brain")?t.tauceti.matrioshka_brain.count:0)<1e3?Ye(64e3):0},effect(e){let a="",r=(e||0)+(t.tauceti.hasOwnProperty("matrioshka_brain")?t.tauceti.matrioshka_brain.count:0);return r<1e3&&(a+=`
${F("tau_gas2_matrioshka_brain_seg",[1e3-r])}
`),a},action(){return!!(Os($(this)[0])&&t.tauceti.matrioshka_brain.count<1e3)&&(t.tauceti.matrioshka_brain.count++,t.tauceti.matrioshka_brain.count>=1e3&&(t.tech.m_brain=1),!0)}},ignition_device:{id:"tauceti-ignition_device",title:F("tech_ignition_device"),desc:e=>!t.tauceti.hasOwnProperty("ignition_device")||t.tauceti.ignition_device.count<10||e?`
${F("tech_ignition_device")}
${F("requires_segmemts",[10])}
`:`
${F("tech_ignition_device")}
`,reqs:{tau_gas2:8},condition:()=>!!(t.tauceti.ignition_device&&t.tauceti.ignition_device.count<10),path:["truepath"],queue_size:1,queue_complete:()=>10-t.tauceti.ignition_device.count,cost:{Money:e=>(e||0)+(t.tauceti.hasOwnProperty("ignition_device")?t.tauceti.ignition_device.count:0)<10?25e7:0,Uranium:e=>(e||0)+(t.tauceti.hasOwnProperty("ignition_device")?t.tauceti.ignition_device.count:0)<10?5e4:0,Elerium:e=>(e||0)+(t.tauceti.hasOwnProperty("ignition_device")?t.tauceti.ignition_device.count:0)<10?25e3:0,Graphene:e=>(e||0)+(t.tauceti.hasOwnProperty("ignition_device")?t.tauceti.ignition_device.count:0)<10?225e5:0,Orichalcum:e=>(e||0)+(t.tauceti.hasOwnProperty("ignition_device")?t.tauceti.ignition_device.count:0)<10?15e6:0,Quantium:e=>(e||0)+(t.tauceti.hasOwnProperty("ignition_device")?t.tauceti.ignition_device.count:0)<10?Ye(8e6):0},effect(e){let a="",r=(e||0)+(t.tauceti.hasOwnProperty("ignition_device")?t.tauceti.ignition_device.count:0);return r<10&&(a+=`
${F("tau_gas2_ignition_device_seg",[10-r])}
`),a},action(){return!!(Os($(this)[0])&&t.tauceti.ignition_device.count<10)&&(t.tauceti.ignition_device.count++,t.tauceti.ignition_device.count>=10&&(t.tech.m_ignite=1),!0)}},ignite_gas_giant:{id:"tauceti-ignite_gas_giant",title:()=>F("tau_gas2_ignite_gas_giant",[Ze.tau_gas2.info.name()]),desc:()=>F("tau_gas2_ignite_gas_giant",[Ze.tau_gas2.info.name()]),reqs:{tau_gas2:8,m_ignite:1},grant:["m_ignite",2],queue_size:1,queue_complete:()=>!1,path:["truepath"],cost:{Helium_3:()=>75e5},effect(){let e=`
${F("tau_gas2_ignite_gas_giant_effect",[F("tech_matrioshka_brain")])}
`;return t.tech.m_brain?(e+=`
${F("tau_gas2_ignite_gas_giant_effect3")}
`,e+=function(){let e=mc("retire"),a="antimatter"===t.race.universe?F("resource_AntiPlasmid_plural_name"):F("resource_Plasmid_plural_name"),r=t.stats.retire+1===t.stats.matrix?`
${F("tau_star_matrix_skilled",[1])}
`:"";return`
${F("interstellar_ascension_trigger_effect2",[e.plasmid,a])}
${F("interstellar_ascension_trigger_effect2",[e.phage,F("resource_Phage_name")])}
${F("tau_star_matrix_servants",[1])}
${r}`}()):e+=`
${F("tau_gas2_ignite_gas_giant_effect2",[F("tech_matrioshka_brain")])}
`,e},action(){return!(!t.tech.m_brain||!Os($(this)[0])||(function(){M.w&&M.w.terminate(),t.sim||e.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(t))),O(),Zi("reset",{end:"retire"});let a=t.race.species,r=t.race.gods,s=di[a].type,i=t.city.calendar.orbit,c=t.city.biome,o=t.city.ptrait,n=t.city.geology,l=mc("retire");Xc(`biome_${c}`),o.forEach((function(e){Si.hasOwnProperty(e)&&Xc(`atmo_${e}`)})),Xc(`genus_${s}`),t.race.gross_enabled&&t.race.ooze&&"custom"!==t.race.species&&"sludge"!==t.race.species&&Xc("gross"),Xc("retired"),Z(),so(),t.stats.retire++,Fc(),"antimatter"===t.race.universe?(t.prestige.AntiPlasmid.count+=l.plasmid,t.stats.antiplasmid+=l.plasmid):(t.prestige.Plasmid.count+=l.plasmid,t.stats.plasmid+=l.plasmid),t.prestige.Phage.count+=l.phage,t.stats.phage+=l.phage,t.prestige.AICore.count+=l.cores,t.stats.cores+=l.cores;let u=!!t.race.hasOwnProperty("srace")&&t.race.srace,d=t.race.hasOwnProperty("corruption")&&t.race.corruption>1?t.race.corruption-1:0;t.race={species:"protoplasm",gods:a,old_gods:r,universe:t.race.universe,seeded:!1,seed:Math.floor(m(1e4)),ascended:!!t.race.hasOwnProperty("ascended")&&t.race.ascended},d>0&&(t.race.corruption=d),u&&(t.race.srace=u),Q({orbit:i,biome:c,ptrait:o,geology:n}),e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),window.location.reload()}(),0))}}}};for(let e=1;e<9;e++)Ze.tau_gas[`gas_contest-a${e}`]={id:`tauceti-gas_contest-a${e}`,title:()=>Ze.tau_gas.info.name(e),desc:()=>Ze.tau_gas.info.name(e),reqs:{tau_gas:1},grant:["tau_gas",2],path:["truepath"],wiki:!1,queue_complete:()=>t.tech.tau_gas>=2?0:1,cost:{},effect:()=>F(8===e?"tau_gas_contest_reject":"tau_gas_contest_pick",[Ze.tau_gas.info.name(e)]),action(){return!!Os($(this)[0])&&(t.race.gas_name=e,t.tauceti.refueling_station={count:0,on:0},!0)}},Ze.tau_gas2[`gas_contest-b${e}`]={id:`tauceti-gas_contest-b${e}`,title:()=>Ze.tau_gas2.info.name(e),desc:()=>Ze.tau_gas2.info.name(e),reqs:{tau_gas2:2},grant:["tau_gas2",3],path:["truepath"],wiki:!1,queue_complete:()=>t.tech.tau_gas2>=3?0:1,cost:{},effect:()=>F(8===e?"tau_gas2_contest_reject":"tau_gas_contest_pick",[Ze.tau_gas2.info.name(e)]),action(){return!!Os($(this)[0])&&(t.race.gas_name2=e,!0)}};function Ve(){let e=mc("matrix"),a="antimatter"===t.race.universe?F("resource_AntiPlasmid_plural_name"):F("resource_Plasmid_plural_name"),r=t.stats.retire===t.stats.matrix+1?`
${F("tau_star_matrix_skilled",[1])}
`:"";return`
${F("interstellar_ascension_trigger_effect2",[e.plasmid,a])}
${F("interstellar_ascension_trigger_effect2",[e.phage,F("resource_Phage_name")])}
${F("tau_star_matrix_servants",[1])}
${r}`}function Je(){t.tauceti.overseer={count:0,on:0,pop:0,working:0,injured:0,morale:0,loyal:0,prod:0},t.tauceti.womling_village=t.race.lone_survivor?{count:2,on:2}:{count:1,on:1},t.tauceti.womling_mine=t.race.lone_survivor?{count:1,on:1,miners:0}:{count:0,on:0,miners:0},t.tauceti.womling_farm={count:1,on:1,farmers:0},t.tauceti.womling_fun={count:0,on:0}}function Ye(e){return t.tech.womling_tech&&t.tech.womling_recycling&&t.tech.womling_recycling>=1&&(e*=(t.tech.isolation?.97:.98)**t.tech.womling_tech),e}function Xe(){return Qe}function et(){return!!(t.tech.tauceti&&t.tech.tauceti>=4)}function tt(){if(!t.settings.tabLoad&&(1!==t.settings.civTabs||6!==t.settings.spaceTabs))return;let e=$("#tauceti");rc(e),e.append($(`
${F("tab_tauceti")} `)),!t.tech.tauceti||t.tech.tauceti<2||Object.keys(Ze).forEach((function(a){let r=a.replace("tau_","");if(t.settings.tau[`${r}`]){let r="string"==typeof Ze[a].info.name?Ze[a].info.name:Ze[a].info.name(),s="";if(Ze[a].info.hasOwnProperty("prop")&&(s=Ze[a].info.prop()),Ze[a].info.support){let i=Ze[a].info.support;Ze[a].info.hide_support?e.append(`
`):e.append(`
${r} {{ support }}/{{ s_max }} ${s}`),sc({el:`#sr${a}`,data:t.tauceti[i],filters:{filter(){return Ze[a].info.filter(...arguments)}}})}else e.append(`
`);Ti(a,(function(){return"string"==typeof Ze[a].info.desc?Ze[a].info.desc:Ze[a].info.desc()}),{elm:`#${a} h3.name`,classes:"has-background-light has-text-dark"}),Object.keys(Ze[a]).forEach((function(e){"info"!==e&&Gt(Ze,a,e)&&fs(Ze[a][e],"tauceti",e)})),Ze[a].info.hasOwnProperty("extra")&&Ze[a].info.extra(a)}}))}function at(){if((t.settings.tabLoad||2===t.settings.civTabs&&5===t.settings.govTabs)&&(ft(),dt(),rc($("#dwarfShipYard")),t.space.hasOwnProperty("shipyard")&&t.settings.showShipYard)){let e=$("#dwarfShipYard");t.space.shipyard.hasOwnProperty("blueprint")||(t.space.shipyard.blueprint={class:"corvette",armor:"steel",weapon:"railgun",engine:"ion",power:"diesel",sensor:"radar",name:rt()});let a=$('
');e.append(a);let r=$('
');a.append(r),r.append(`
${F("outer_shipyard_registry")} :
`),r.append(`
${F("crew")}
`),r.append(`
${F("power")}
`),r.append(`
${F("firepower")}
`),r.append(`
${F("outer_shipyard_sensors")}
`),r.append(`
${F("speed")}
`),r.append(`
${F("outer_shipyard_fuel")}
`),a.append('
');let s=$('
');a.append(s);let i={class:["corvette","frigate","destroyer","cruiser","battlecruiser","dreadnought","explorer"],power:["solar","diesel","fission","fusion","elerium"],weapon:["railgun","laser","p_laser","plasma","phaser","disruptor"],armor:["steel","alloy","neutronium"],engine:["ion","tie","pulse","photon","vacuum","emdrive"],sensor:["visual","radar","lidar","quantum"]};Object.keys(i).forEach((function(e){let t="";i[e].forEach((function(a,r){t+=`
${F(`outer_shipyard_${e}_${a}`)} `})),s.append(`
\n \n ${F(`outer_shipyard_${e}`)}: {{ b.${e} | lbl('${e}') }} \n ${t}\n `)}));let c=$('
');c.append(`
${F("outer_shipyard_build")} `),c.append(`
${F("outer_shipyard_fleet_details")} `),c.append(`
${F("outer_shipyard_fleet_sort")} `),a.append(c),c.append(`
${F("outer_shipyard_park",[Xt().dwarf])} ${F("outer_shipyard_map")} `),st();let o={template:'
'};sc({el:"#shipPlans",data:{b:t.space.shipyard.blueprint,s:t.space.shipyard},methods:{setVal(e,a){"class"===e&&"explorer"===a?(t.space.shipyard.blueprint.engine="emdrive",t.space.shipyard.blueprint.weapon="railgun",t.tech.syard_armor>=3&&(t.space.shipyard.blueprint.armor="neutronium"),t.tech.syard_sensor>=4&&(t.space.shipyard.blueprint.sensor="quantum"),t.tech.syard_power>=4&&(t.space.shipyard.blueprint.power="elerium")):"class"===e&&"explorer"!==a&&"explorer"===t.space.shipyard.blueprint.class&&(t.space.shipyard.blueprint.engine="ion"),t.space.shipyard.blueprint[e]=a,st()},avail(e,a,r){if(!("class"!==e&&"engine"!==e||!t.tech.tauceti||"emdrive"!==r&&"explorer"!==r))return!0;if("explorer"===t.space.shipyard.blueprint.class){if("weapon"===e)return 1===a;if("engine"===e)return 6===a;if("sensor"===e)return 4===a}return t.tech[`syard_${e}`]>a},crewText:()=>it(t.space.shipyard.blueprint),powerText(){let e=ct(t.space.shipyard.blueprint);return e<0?`
${e}kW `:`${e}kW`},fireText:()=>ot(t.space.shipyard.blueprint),sensorText:()=>mt(t.space.shipyard.blueprint)+"km",speedText(){let e=7.695363719135802*nt(t.space.shipyard.blueprint);return Math.round(e)+"km/s"},fuelText(){let e=lt(t.space.shipyard.blueprint);return e.res?`-${e.burn} ${t.resource[e.res].name}`:"N/A"},build(){if(ct(t.space.shipyard.blueprint)>=0){let e=ut(t.space.shipyard.blueprint),a={};if(Object.keys(e).forEach((function(t){a[t]=function(){return e[t]}})),Os(!1,a)){let e=zc(t.space.shipyard.blueprint);e.location="spc_dwarf",e.xy=vt("spc_dwarf"),e.origin=zc(e.xy),e.destination=zc(e.xy),e.transit=0,e.dist=0,e.damage=0,e.fueled=!1,0===e.name.length&&(e.name=rt());let a=1,r=e.name;for(;t.space.shipyard.ships.filter((e=>e.name===r)).length>0;)a++,r=e.name+` ${a}`;e.name=r,t.space.shipyard.ships.push(e),_t(),st(),t.space.shipyard.blueprint.name=rt()}}},trigModal(){this.$buefy.modal.open({parent:this,component:o});let e=setInterval((function(){$("#modalBox").length>0&&(clearInterval(e),$("#modalBox").append($('
Solar System
')),function(e){let t=$('
').appendTo(e),a={},r={},s=!1;qt={},kt=20,t.append($('
').on("mouseup mouseover mouseout",(()=>s=!1)).on("mousedown",(e=>{s=!0,r.x=e.clientX-qt.x,r.y=e.clientY-qt.y})).on("mousemove",(e=>{s&&(qt.x=e.clientX-r.x,qt.y=e.clientY-r.y,Mt())})).on("wheel",(e=>(e.originalEvent.deltaY<0?(kt/=.8,qt.x=a.x+(qt.x-a.x)/.8,qt.y=a.y+(qt.y-a.y)/.8,Mt()):(kt*=.8,qt.x=a.x+.8*(qt.x-a.x),qt.y=a.y+.8*(qt.y-a.y),Mt()),!1))),$('
').on("click",(()=>{kt/=.8,qt.x=a.x+(qt.x-a.x)/.8,qt.y=a.y+(qt.y-a.y)/.8,Mt()})),$('
').on("click",(()=>{kt*=.8,qt.x=a.x+.8*(qt.x-a.x),qt.y=a.y+.8*(qt.y-a.y),Mt()})));let i=document.getElementById("mapCanvas").getBoundingClientRect();a.x=i.width/2,a.y=i.height/2,qt.x=a.x,qt.y=a.y,Mt()}($("#modalBox")))}),50)},redraw(){_t()}},filters:{lbl:(e,t)=>F(`outer_shipyard_${t}_${e}`)}}),Object.keys(i).forEach((function(e){for(let t=0;t<$(`#shipPlans .${e}`).length;t++)Ti(`shipPlans${e}${t}`,(function(t){let a=$(t.this).attr("data-val");return F(`outer_shipyard_${e}_${a}_desc`)}),{elm:`#shipPlans .${e}.a${t}`,placement:"right"})})),e.append($('
')),_t()}}function rt(){let e=["Trident","Spacewolf","Excalibur","Neptune","Deimos","Phobos","Enterprise","Intrepid","Daedalus","Odyssey","Endurance","Horizon","Hyperion","Icarus","Aurora","Axiom","Nemesis","Normandy","Orion","Prometheus","Vanguard","Discovery","Voyager","Defiant","Titan","Liberty","Destiny","Phoenix","Nautilus","Barracuda","Dolphin","Cuttlefish","Tiger Shark","Stingray","Swordfish","Triton","Dragon","Scorpion","Hagfish","Marlin","Galileo","Raven","Sarcophagus","Excelsior","Scimitar","Vengeance","Nomad","Nova","Olympus","Aegis","Agamemnon","Charon","Achilles","Apollo","Hermes","Hydra","Medusa","Talos","Zeus","Heracles","Cerberus","Acheron","Damocles","Juno","Persephone","Solaris","Victory","Hawk","Fury","Razor","Stinger","Outrider","Falcon","Vulture","Nirvana","Retribution","Swordbreaker","Valkyrie","Athena","Avalon","Merlin","Argonaut","Serenity","Gunstar","Ranger","Tantive","Cygnus","Nostromo","Reliant","Narcissus","Liberator","Sulaco","Infinity","Resolute","Wasp","Hornet","Independence","Gilgamesh","Midway","Concordia","Goliath","Cosmos","Express","Tigers Claw","Oberon","Minnow","Majestic","Spartacus","Colossi","Vigilant","Remorseless","Caelestis","Inquisitor","Atlas","Avenger","Dauntless","Nihilus","Thanatos","Stargazer","Xyzzy","Kraken","Xerxes","Spitfire","McShipFace","Monitor","Merrimack","Constitution","Ghost","Pequod","Arcadia","Corsair","Inferno","Jenny","Revenge","Red October","Jackdaw","Thorn","Caleuche","Valencia","Ourang","Deering","Baychimo","Octavius","Joyita","Lovibond","Celeste","Dutchman"],a=e[Math.rand(0,e.length)];return t.space.shipyard.ships.filter((e=>e.name===a)).length>0&&(a=function(){let e=["al","an","ar","as","at","ea","ed","en","er","es","ha","he","hi","in","is","it","le","me","nd","ne","ng","nt","on","or","ou","re","se","st","te","th","ti","to","ve","wa","all","and","are","but","ent","era","ere","eve","for","had","hat","hen","her","hin","his","ing","ion","ith","not","ome","oul","our","sho","ted","ter","tha","the","thi","tio","uld","ver","was","wit","you"],t=Math.rand(2,5),a="";for(let r=0;r
${t.resource[a].name}${k(e[a])}`):$("#shipYardCosts").append(` | ${t.resource[a].name} ${k(e[a])} `)}))}function it(e){switch(e.class){case"corvette":return la(2);case"frigate":return la(3);case"destroyer":return la(4);case"cruiser":return la(6);case"battlecruiser":return la(8);case"dreadnought":case"explorer":return la(10)}}function ct(e,t){let a=0,r=1,s=1;switch(e.class){case"frigate":r=1.1,s=1.2;break;case"destroyer":r=1.5,s=1.65;break;case"cruiser":r=2,s=2.5;break;case"battlecruiser":r=2.5,s=3.5;break;case"dreadnought":r=5,s=6.5;break;case"explorer":r=6,s=2}switch(e.power){case"solar":a=Math.round(50*r);break;case"diesel":a=Math.round(100*r);break;case"fission":a=Math.round(150*r);break;case"fusion":a=Math.round(("explorer"===e.class||t?174:175)*r);break;case"elerium":a=Math.round(200*r)}switch(a=Math.round(cc(a)),e.weapon){case"railgun":a-=Math.round(10*s);break;case"laser":a-=Math.round(30*s);break;case"p_laser":a-=Math.round(18*s);break;case"plasma":a-=Math.round(50*s);break;case"phaser":a-=Math.round(65*s);break;case"disruptor":a-=Math.round(100*s)}switch(e.engine){case"ion":a-=Math.round(25*s);break;case"tie":a-=Math.round(50*s);break;case"pulse":a-=Math.round(40*s);break;case"photon":a-=Math.round(75*s);break;case"vacuum":a-=Math.round(120*s);break;case"emdrive":a-=Math.round(("explorer"===e.class||t?515:1024)*s)}switch(e.sensor){case"radar":a-=Math.round(10*s);break;case"lidar":a-=Math.round(25*s);break;case"quantum":a-=Math.round(75*s)}return a}function ot(e){let t=0;switch(e.weapon){case"railgun":t=36;break;case"laser":t=64;break;case"p_laser":t=54;break;case"plasma":t=90;break;case"phaser":t=114;break;case"disruptor":t=156}switch(e.class){case"corvette":return t;case"frigate":return Math.round(1.5*t);case"destroyer":return Math.round(2.75*t);case"cruiser":return Math.round(5.5*t);case"battlecruiser":return Math.round(10*t);case"dreadnought":return Math.round(22*t);case"explorer":return Math.round(1.2*t)}}function nt(e){let a=1;switch(e.class){case"corvette":a="neutronium"===e.armor?1.1:1;break;case"frigate":a="neutronium"===e.armor?1.35:1.25;break;case"destroyer":a="neutronium"===e.armor?1.95:1.8;break;case"cruiser":a="neutronium"===e.armor?3.5:3;break;case"battlecruiser":a="neutronium"===e.armor?4.8:4;break;case"dreadnought":a="neutronium"===e.armor?7.5:6;break;case"explorer":a=1}let r="spc_dwarf"===e.location&&i.m_relay&&0===e.transit&&t.space.m_relay&&t.space.m_relay.charged>=1e4?3:1;switch(e.engine){case"ion":return 12/a*r;case"tie":return 22/a*r;case"pulse":return 18/a*r;case"photon":return 30/a*r;case"vacuum":return 42/a*r;case"emdrive":return 37500/a*r}}function lt(e){let t=!1,a=0;switch(e.power){case"diesel":t="Oil",a=8;break;case"fission":t="Uranium",a=.5;break;case"fusion":t="Helium_3",a=12;break;case"elerium":t="Elerium",a=1}switch(e.class){case"frigate":a*=1.25;break;case"destroyer":a*=1.5;break;case"cruiser":a*=2;break;case"battlecruiser":a*=3;break;case"dreadnought":a*=5;break;case"explorer":a*=25}return{res:t,burn:+a.toFixed(2)}}function ut(e){let a={},r=1,s=1,i=1;switch(e.class){case"corvette":a.Money=25e5,a.Aluminium=5e5,r=1,s=1,i=2;break;case"frigate":a.Money=5e6,a.Aluminium=125e4,r=1.1,s=1.09,i=1.5;break;case"destroyer":a.Money=15e6,a.Aluminium=35e5,r=1.2,s=1.18,i=1.2;break;case"cruiser":a.Money=5e7,a.Adamantite=1e6,r=1.3,s=1.25;break;case"battlecruiser":a.Money=125e6,a.Adamantite=26e5,r=1.35,s=1.3,i=.8;break;case"dreadnought":a.Money=5e8,a.Adamantite=8e6,r=1.4,s=1.35,i=.5;break;case"explorer":a.Money=8e8,a.Adamantite=95e5,r=1.45,s=1}switch(e.armor){case"steel":a.Steel=Math.round(35e4**r);break;case"alloy":a.Alloy=Math.round(25e4**r);break;case"neutronium":a.Neutronium=Math.round(1e4**r)}switch(e.engine){case"ion":a.Titanium=Math.round(75e3**s);break;case"tie":a.Titanium=Math.round(15e4**s);break;case"pulse":a.Titanium=Math.round(125e3**s);break;case"photon":a.Titanium=Math.round(21e4**s);break;case"vacuum":a.Titanium=Math.round(3e5**s);break;case"emdrive":a.Titanium=Math.round(125e4**s)}let c=!!["dreadnought","explorer"].includes(e.class);switch(e.power){case"solar":case"diesel":a[c?"Orichalcum":"Copper"]=Math.round(4e4**r),a.Iridium=Math.round(15e3**s);break;case"fission":a[c?"Orichalcum":"Copper"]=Math.round(5e4**r),a.Iridium=Math.round(3e4**s);break;case"fusion":a[c?"Orichalcum":"Copper"]=Math.round(5e4**r),a.Iridium=Math.round(4e4**s);break;case"elerium":a[c?"Orichalcum":"Copper"]=Math.round(6e4**r),a.Iridium=Math.round(55e3**s)}if("explorer"!==e.class)switch(e.sensor){case"radar":a.Money=Math.round(a.Money**1.04);break;case"lidar":a.Money=Math.round(a.Money**1.08);break;case"quantum":a.Money=Math.round(a.Money**1.12)}switch(e.weapon){case"railgun":a.Iron=Math.round(25e3**r);break;case"laser":a.Iridium=Math.round(a.Iridium**1.05),a.Nano_Tube=Math.round(12e3**r);break;case"p_laser":a.Iridium=Math.round(a.Iridium**1.035),a.Nano_Tube=Math.round(12e3**r);break;case"plasma":a.Iridium=Math.round(a.Iridium**1.1),a.Nano_Tube=Math.round(2e4**r);break;case"phaser":a.Iridium=Math.round(a.Iridium**1.15),a.Quantium=Math.round(18e3**r);break;case"disruptor":a.Iridium=Math.round(a.Iridium**1.2),a.Quantium=Math.round(35e3**r)}"explorer"===e.class&&(a.Iron*=10,a.Titanium*=5,a.Iridium*=50);let o=0;t.space.shipyard.ships.forEach((function(t){t.class===e.class&&o++}));let n=1+(o-2)/25*i;return Object.keys(a).forEach((function(t){"explorer"===e.class?a[t]=Math.ceil(a[t]*(3*(o+1))):o<2?a[t]=Math.ceil(a[t]*(0===o?.75:.9)):o>2&&(a[t]=Math.ceil(a[t]*n))})),a}function dt(){let e=$("#shipList")[0];if(e){let t=Sortable.get(e);t&&t.destroy()}}function _t(){if(dt(),rc($("#shipList")),t.tech.isolation)return;let e=$("#shipList");if(t.space.shipyard.sort){let e={spc_dwarf:"a"};t.space.shipyard.ships=t.space.shipyard.ships.sort(((t,a)=>(e[t.location]?e[t.location]:t.location).localeCompare(e[a.location]?e[a.location]:a.location)))}const a=Dt();for(let r=0;r${e}`}}else Object.keys(a).forEach((function(e){if(s.location!==e&&(a[e].info.syndicate()||"spc_dwarf"===e)&&(!t.race.orbit_decayed||t.race.orbit_decayed&&"spc_moon"!==e)){let t="string"==typeof a[e].info.name?a[e].info.name:a[e].info.name();i+=`${t} `}}));let c="tauceti"===s.location?F("tech_era_tauceti"):"string"==typeof a[s.location].info.name?a[s.location].info.name:a[s.location].info.name(),o=`\n \n ${c} \n ${i}\n `;if(t.space.shipyard.expand){let t=`${F(`outer_shipyard_engine_${s.engine}`)} ${F(`outer_shipyard_class_${s.class}`)}`,a=$(`
`),i=$(`${s.name} | ${F("outer_shipyard_scrap")} |
${t} |
${F(`outer_shipyard_weapon_${s.weapon}`)} |
${F(`outer_shipyard_power_${s.power}`)} |
${F(`outer_shipyard_armor_${s.armor}`)} |
${F(`outer_shipyard_sensor_${s.sensor}`)} `),c=$('
'),n=$('
'),l=$(`${o}
`);c.append(`${F("crew")} `),c.append(`${F("firepower")} `),c.append(`${F("outer_shipyard_sensors")} `),c.append(`${F("speed")} `),c.append(`${F("outer_shipyard_fuel")} `),c.append(`${F("outer_shipyard_hull")} `),n.append(` `),a.append(i),a.append(c),a.append(n),a.append(l),e.append(a)}else{let t=$(`
`),a=$('
'),i=$('
'),c=$(`${o}
`);a.append(`${s.name} | `),a.append(`${F("firepower")} `),a.append(`${F("outer_shipyard_sensors")} `),a.append(`${F("speed")} `),a.append(`${F("outer_shipyard_fuel")} `),a.append(`${F("outer_shipyard_hull")} `),i.append(` `),t.append(a),t.append(i),t.append(c),e.append(t)}sc({el:`#shipReg${r}`,data:t.space.shipyard.ships[r],methods:{scrap(e){t.space.shipyard.ships[e]&&"spc_dwarf"===t.space.shipyard.ships[e].location&&(t.space.shipyard.ships.splice(e,1),_t(),st())},scrapAllowed:e=>!(!t.space.shipyard.ships[e]||"spc_dwarf"!==t.space.shipyard.ships[e].location),setLoc(e,a){let r=t.space.shipyard.ships[a];if(e!==r.location){let s=it(r),i=r.transit>0||"spc_dwarf"!==r.location;if(i||t.civic.garrison.workers-t.civic.garrison.crew>=s){let c=pt(r,e),o=yt(r.xy,c),n=nt(r);r.location=e,r.transit=Math.round(o/n),r.dist=Math.round(o/n),r.origin=zc(r.xy),r.destination={x:c.x,y:c.y},i||(t.civic.garrison.crew+=s),_t(),Ei(`ship${a}loc${e}`)}}},crewText:e=>it(t.space.shipyard.ships[e]),fireText:e=>ot(t.space.shipyard.ships[e]),sensorText:e=>mt(t.space.shipyard.ships[e])+"km",speedText(e){let a=7.695363719135802*nt(t.space.shipyard.ships[e]);return Math.round(a)+"km/s"},fuelText(e){let a=lt(t.space.shipyard.ships[e]);return a.res?`${a.burn} ${t.resource[a.res].name}/s`:"N/A"},hullText:e=>100-t.space.shipyard.ships[e].damage+"%",hullDamage:e=>t.space.shipyard.ships[e].damage<=10?"has-text-success":t.space.shipyard.ships[e].damage>=40&&t.space.shipyard.ships[e].damage<65?"has-text-caution":t.space.shipyard.ships[e].damage>=65?"has-text-danger":"",dest(e){let r="explorer"===s.class?F("tech_era_tauceti"):"string"==typeof a[t.space.shipyard.ships[e].location].info.name?a[t.space.shipyard.ships[e].location].info.name:a[t.space.shipyard.ships[e].location].info.name();return F("outer_shipyard_arrive",[r,t.space.shipyard.ships[e].transit])},show:e=>t.space.shipyard.ships[e].transit>0}}),"explorer"===s.class?"tauceti"!==s.location&&Ti(`ship${r}loctauceti`,(function(){return F("transit_time",[Math.round(yt(s.xy,pt(s,"tauceti"))/nt(s))])}),{elm:`#ship${r}loc .tauceti`,placement:"left"}):Object.keys(a).forEach((function(e){(a[e].info.syndicate()||"spc_dwarf"===e)&&s.location!==e&&Ti(`ship${r}loc${e}`,(function(){return F("transit_time",[Math.round(yt(s.xy,pt(s,e))/nt(s))])}),{elm:`#ship${r}loc .${e}`,placement:"left"})}))}!function(){let e=$("#shipList")[0];Sortable.create(e,{onEnd(e){let a=t.space.shipyard.ships;a.splice(e.newDraggableIndex,0,a.splice(e.oldDraggableIndex,1)[0]),t.space.shipyard.ships=a,_t()}})}()}function pt(e,a){if(-2===gt[a].orbit)return vt(a);let r=Math.sqrt((e.xy.x-xt(a))**2+e.xy.y**2),s=nt(e)/225,i=$t(1,a),c=Math.abs(r-gt[a].dist),o=Math.abs(r+gt[a].dist),n=Math.abs(r-gt[a].dist*i),l=Math.abs(r+gt[a].dist*i),u=Math.floor(Math.min(c,n,o,l)/s),d=Math.ceil(Math.max(c,n,o,l)/s);r>=gt[a].dist&&r<=gt[a].dist*i&&(u=0);let _=360/(-1===gt[a].orbit?t.city.calendar.orbit:gt[a].orbit),p=(t.space.position[a]+u*_)%360,h=Math.PI/180;for(let t=u;t<=d;t++){let r=$t(Math.cos(p*h)*gt[a].dist,a);r+=xt(a);let i=Math.sin(p*h)*gt[a].dist;if(Math.sqrt((r-e.xy.x)**2+(i-e.xy.y)**2)/s<=t)return{x:r,y:i};p=(p+_)%360}return vt(a)}function ht(e,a){if(!t.tech.isolation&&t.tech.syndicate&&t.race.truepath&&t.space.syndicate&&t.space.syndicate.hasOwnProperty(e)){let r=1e3,s=0;switch(t.civic.foreign.gov3.hstl<10?s=250-25*t.civic.foreign.gov3.hstl:t.civic.foreign.gov3.hstl>60&&(s=-13*(t.civic.foreign.gov3.hstl-60)),e){case"spc_home":case"spc_moon":case"spc_red":case"spc_hell":r=1250+s;break;case"spc_gas":case"spc_gas_moon":case"spc_belt":r=1020+s;break;case"spc_titan":case"spc_enceladus":case"spc_triton":case"spc_kuiper":case"spc_eris":r=Qr.space[e].info.syndicate_cap()}let o=t.space.syndicate[e],n=0,l=0,u=0;if(t.space.hasOwnProperty("shipyard")&&t.space.shipyard.hasOwnProperty("ships")){if(t.space.shipyard.ships.forEach((function(t){if(t.location===e&&0===t.transit&&t.fueled){let e=ot(t);n+=t.damage>0?Math.round(e*(100-t.damage)/100):e,l+=mt(t)}})),"spc_enceladus"===e&&Math.min(c.operating_base,i.operating_base)>0){let e=Math.min(c.operating_base,i.operating_base);n+=50*e}else"spc_titan"===e&&i.sam>0?n+=25*i.sam:"spc_triton"===e&&i.fob>0&&(n+=500,l+=10);l>100&&(l=Math.round((l-100)/(l-100+200)*100)+100),n=Math.round(n*((l+25)/125)),n>o&&(u=n-o),o=o-n>0?o-n:0}return a?{p:1-+(o/r).toFixed(4),r:o,s:l,o:u}:1-+(o/r).toFixed(4)}return a?{p:1,r:0,s:0,o:0}:1}function mt(e){let t=1;switch(e.class){case"corvette":case"frigate":t=2;break;case"destroyer":case"cruiser":t=1.5;break;case"explorer":t=5;break;default:t=1}switch(e.sensor){case"visual":return 1;case"radar":return 10*t;case"lidar":return 18*t;case"quantum":return 32*t}}const gt={spc_sun:{dist:0,orbit:0,size:2},spc_home:{dist:1,orbit:-1,size:.6},spc_moon:{dist:1.01,orbit:-1,size:.1,moon:!0},spc_red:{dist:1.524,orbit:687,size:.5},spc_hell:{dist:.4,orbit:88,size:.4},spc_venus:{dist:.7,orbit:225,size:.5},spc_gas:{dist:5.203,orbit:4330,size:1.25},spc_gas_moon:{dist:5.204,orbit:4330,size:.2,moon:!0},spc_belt:{dist:2.7,orbit:1642,size:.5,belt:!0},spc_dwarf:{dist:2.77,orbit:1682,size:.5},spc_saturn:{dist:9.539,orbit:10751,size:1.1},spc_titan:{dist:9.536,orbit:10751,size:.2,moon:!0},spc_enceladus:{dist:9.542,orbit:10751,size:.1,moon:!0},spc_uranus:{dist:19.8,orbit:30660,size:1},spc_neptune:{dist:30.08,orbit:60152,size:1},spc_triton:{dist:30.1,orbit:60152,size:.1,moon:!0},spc_kuiper:{dist:39.5,orbit:90498,size:.5,belt:!0},spc_eris:{dist:68,orbit:204060,size:.5,size:.5},tauceti:{dist:752568.8,orbit:-2,size:2}};function ft(){t.space.position||(t.space.position={}),Object.keys(gt).forEach((function(e){t.space.position.hasOwnProperty(e)||(t.space.position[e]=Math.rand(0,360))})),t.space.position.spc_home=t.space.position.spc_moon,t.space.position.spc_gas_moon=t.space.position.spc_gas,t.space.position.spc_titan=t.space.position.spc_enceladus,t.space.position.spc_saturn=t.space.position.spc_titan,t.space.position.spc_neptune=t.space.position.spc_triton}function vt(e){let a=$t(+Math.cos(t.space.position[e]*(Math.PI/180)).toFixed(5)*gt[e].dist,e),r=+Math.sin(t.space.position[e]*(Math.PI/180)).toFixed(5)*gt[e].dist;return a+=xt(e),{x:a,y:r}}function yt(e,t){return Math.ceil(225*Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2))}function bt(e,a){let r=1;switch(t.race.pack_rat&&(r*=1+ui.pack_rat.vars()[1]/100),t.stats.achieve.blackhole&&(r*=1+.05*t.stats.achieve.blackhole.l),t.tech.world_control&&(r*=3),e){case"storehouse":i.titan_spaceport&&(r*=1+.25*i.titan_spaceport),a&&t.tech.shelving&&(r*=2),t.tech.shelving&&t.tech.shelving>=3&&(r*=1.5);case"repository":t.tech.isolation&&(r*=3,t.tech.tp_depot&&(r*=1+t.tech.tp_depot/20))}return r}function wt(){let e=0;return i.ai_colonist&&c.decoder&&(e+=i.ai_colonist*c.decoder*.35),c.shock_trooper&&(e+=2*c.shock_trooper),c.tank&&(e+=2*c.tank),e>100&&(e=100),e}function $t(e,a){if(-2!==gt[a].orbit){let r=1.075+gt[a].dist/100;t.city.ptrait.includes("elliptical")&&(r="spc_home"===a?1.5:1.275+gt[a].dist/100),e*=r}return e}function xt(e){if(-2!==gt[e].orbit){let a=gt[e].dist/3;return t.city.ptrait.includes("elliptical")&&"spc_home"===e&&(a+=.15),"spc_eris"===e&&(a+=25),a}return 0}var kt,qt;function Mt(){let e=document.getElementById("mapCanvas"),a=e.getContext("2d");e.width=e.getBoundingClientRect().width,e.height=e.getBoundingClientRect().height,a.save(),a.fillStyle="#000000",a.fillRect(0,0,e.width,e.height),a.translate(qt.x,qt.y),a.scale(kt,kt);let r={};for(let[e,t]of Object.entries(gt))r[e]=vt(e);a.lineWidth=1/kt,a.strokeStyle="#c0c0c0";for(let[e,r]of Object.entries(gt))if(!r.moon&&-2!==r.orbit){a.beginPath(),r.belt||t.race.orbit_decayed&&"spc_home"===e?a.setLineDash([.01,.01]):a.setLineDash([]);let s=xt(e);a.ellipse(s,0,$t(r.dist,e),r.dist,0,0,2*Math.PI,!0),a.stroke()}a.fillStyle="#0000ff",a.strokeStyle="#0000ff";for(let e of t.space.shipyard.ships)e.transit>0&&(a.beginPath(),a.setLineDash([.1,.4]),a.moveTo(e.xy.x,e.xy.y),a.lineTo(e.destination.x,e.destination.y),a.stroke());for(let[e,s]of Object.entries(gt)){if(t.race.orbit_decayed&&["spc_home","spc_moon"].includes(e))continue;let i="558888";if(Qr.space[e]&&Qr.space[e].info.syndicate()&&t.settings.space[e.substring(4)]){let t=ht(e);i=((Math.round(255*(1-t))<<16)+(Math.round(255*t)<<8)).toString(16).padStart(6,0)}"spc_dwarf"===e?i="7132a8":"spc_sun"!==e&&"tauceti"!==e||(i="f8ff2b"),a.fillStyle="#"+i,a.beginPath();let c=s.size/10;if(s.moon)switch(e){case"spc_moon":a.arc(r[e].x+.05,r[e].y+.05,c,0,2*Math.PI,!0);break;case"spc_titan":a.arc(r[e].x-.2,r[e].y-.2,c,0,2*Math.PI,!0);break;default:a.arc(r[e].x+.2,r[e].y+.2,c,0,2*Math.PI,!0)}else{let t=s.size/10;a.arc(r[e].x,r[e].y,t,0,2*Math.PI,!0)}a.fill()}a.fillStyle="#0000ff",a.strokeStyle="#0000ff";for(let e of t.space.shipyard.ships)e.transit>0&&(a.beginPath(),a.arc(e.xy.x,e.xy.y,.1,0,2*Math.PI,!0),a.fill());a.shadowOffsetX=2,a.shadowOffsetY=2,a.shadowBlur=2,a.shadowColor="rgba(0, 0, 0, 0.5)",a.fillStyle="#009aff",a.font=20/kt+"px serif";for(let e of t.space.shipyard.ships)e.transit>0&&a.fillText(e.name,e.xy.x+.15,e.xy.y-.15);a.fillStyle="#ffa500",a.font=25/kt+"px serif";for(let[e,s]of Object.entries(gt))if(Qr.space[e]&&t.settings.space[e.substring(4)]){if(t.race.orbit_decayed&&["spc_home"].includes(e))continue;let i=Qr.space[e].info.name,c="function"==typeof i?i():i;if(s.moon)switch(e){case"spc_moon":a.fillText(c,r[e].x+.1,r[e].y+.1);break;case"spc_titan":a.fillText(c,r[e].x-.3,r[e].y-.3);break;default:a.fillText(c,r[e].x+.25,r[e].y+.2)}else"spc_sun"===e||a.fillText(c,r[e].x,r[e].y-.2*s.size)}a.restore()}function Pt(e){switch(e){case"city":return t.resource[t.race.species]?t.resource[t.race.species].amount<=5?F("tab_city1"):t.resource[t.race.species].amount<=20?F("tab_city2"):t.resource[t.race.species].amount<=75?F("tab_city3"):t.resource[t.race.species].amount<=250?F("tab_city4"):t.resource[t.race.species].amount<=600?F("tab_city5"):t.resource[t.race.species].amount<=1200?F("tab_city6"):t.resource[t.race.species].amount<=2500?F("tab_city7"):F("tab_city8"):F("tab_city1");case"local_space":return F("sol_system",[t.race.truepath?di[t.race.species].home:Ac("name")]);case"outer_local_space":return F("outer_sol_system",[t.race.truepath?di[t.race.species].home:Ac("name")]);case"old":return F("tab_old_res");case"new":return F("tab_new_res");case"old_sr":return F("tab_old_sr_res");case"new_sr":return F("tab_new_sr_res");default:return F(e)}}function Ot(){t.settings.tabLoad?(Ct("mTabCivil"),Ct("mTabCivic"),Ct("mTabResearch"),Ct("mTabResource"),Ct("mTabArpa"),Ct("mTabStats"),Ct("mTabObserve")):Ct(t.settings.civTabs)}function Ct(e){switch(t.settings.tabLoad?Zi("page_view",{page_title:"Evolve - All Tabs"}):(Gs(),ri(),za(),De(),L(),dt(),rc($("#mTabCivil")),rc($("#mTabCivic")),rc($("#mTabResearch")),rc($("#mTabResource")),rc($("#mTabArpa")),rc($("#mTabStats")),rc($("#mTabObserve"))),e){case 0:t.settings.tabLoad||(Zi("page_view",{page_title:"Evolve - Evolution"}),ts());break;case 1:case"mTabCivil":t.settings.tabLoad||Zi("page_view",{page_title:"Evolve - Civilization"}),$("#mTabCivil").append('\n \n \n {{ \'city\' | label }} \n {{ \'city\' | label }} \n \n \n \n \n {{ \'local_space\' | label }} \n {{ \'local_space\' | label }} \n \n \n \n \n {{ \'tab_interstellar\' | label }} \n {{ \'tab_interstellar\' | label }} \n \n \n \n \n {{ \'tab_galactic\' | label }} \n {{ \'tab_galactic\' | label }} \n \n \n \n \n {{ \'tab_portal\' | label }} \n {{ \'tab_portal\' | label }} \n \n \n \n \n {{ \'outer_local_space\' | label }} \n {{ \'outer_local_space\' | label }} \n \n \n \n \n {{ \'tab_tauceti\' | label }} \n {{ \'tab_tauceti\' | label }} \n \n \n '),sc({el:"#mTabCivil",data:{s:t.settings},methods:{swapTab(e){if(!t.settings.tabLoad)switch(rc($("#city")),rc($("#space")),rc($("#interstellar")),rc($("#galaxy")),rc($("#portal")),rc($("#outerSol")),rc($("#tauCeti")),e){case 0:hs();break;case 1:case 2:case 3:case 5:Rt();break;case 4:$a();break;case 6:tt()}return e}},filters:{label:e=>Pt(e)}}),"protoplasm"!==t.race.species&&(hs(),Rt(),$a(),tt()),t.race.noexport&&("Race"===t.race.noexport?(rc($("#city")),ra()):"Planet"===t.race.noexport&&(rc($("#city")),sa()));break;case 2:case"mTabCivic":t.settings.tabLoad||Zi("page_view",{page_title:"Evolve - Civics"}),$("#mTabCivic").append('\n \n \n {{ \'tab_gov\' | label }} \n {{ \'tab_gov\' | label }} \n \n \n \n \n {{ \'tab_industry\' | label }} \n {{ \'tab_industry\' | label }} \n \n \n \n \n {{ \'tab_power_grid\' | label }} \n {{ \'tab_power_grid\' | label }} \n \n \n \n \n {{ \'tab_military\' | label }} \n {{ \'tab_military\' | label }} \n \n \n \n \n {{ \'tab_mech\' | label }} \n {{ \'tab_mech\' | label }} \n \n \n \n \n {{ \'tab_shipyard\' | label }} \n {{ \'tab_shipyard\' | label }} \n \n \n \n \n {{ \'tab_psychic\' | label }} \n {{ \'tab_psychic\' | label }} \n \n \n '),sc({el:"#mTabCivic",data:{s:t.settings},methods:{swapTab(e){if(!t.settings.tabLoad)switch(ri(),L(),za(),dt(),rc($("#civic")),rc($("#industry")),rc($("#powerGrid")),rc($("#military")),rc($("#mechLab")),rc($("#dwarfShipYard")),rc($("#psychicPowers")),e){case 0:$("#civic").append($('
')),oa(),$("#civics").append($('
')),V(),"protoplasm"===t.race.species||t.race.start_cataclysm||(Y(),fe($("#c_garrison"),!1),se()),t.race.shapeshifter&&qi(!1,!0);break;case 1:Ws();break;case 2:Object.keys(ai()).forEach((function(e){Li(e)})),ti();break;case 3:"protoplasm"===t.race.species||t.race.start_cataclysm||(J(),ka($("#fortress"),!1));break;case 4:"protoplasm"===t.race.species||t.race.start_cataclysm||Sa();break;case 5:t.race.truepath&&"protoplasm"!==t.race.species&&!t.race.start_cataclysm&&at();break;case 6:t.race.psychic&&t.tech.psychic&&"protoplasm"!==t.race.species&&zi()}return e}},filters:{label:e=>Pt(e)}}),Object.keys(ai()).forEach((function(e){Li(e)})),ti(),$("#civic").append($('
')),oa(),$("#civics").append($('
')),V(),"protoplasm"===t.race.species||t.race.start_cataclysm||(J(),fe($("#c_garrison"),!1),ka($("#fortress"),!1),se(),Sa(),t.race.truepath&&at(),t.race.psychic&&t.tech.psychic&&zi()),t.race.shapeshifter&&qi(!1,!0),Ws();break;case 3:case"mTabResearch":t.settings.tabLoad||Zi("page_view",{page_title:"Evolve - Research"}),$("#mTabResearch").append('
\n \n \n \n {{ \'new_sr\' | label }} \n {{ \'new\' | label }} \n \n \n \n \n {{ \'old_sr\' | label }} \n {{ \'old\' | label }} \n \n \n '),sc({el:"#mTabResearch",data:{s:t.settings,rq:t.r_queue},filters:{label:e=>Pt(e)}}),Bs(),"protoplasm"!==t.race.species&&ms();break;case 4:case"mTabResource":t.settings.tabLoad||Zi("page_view",{page_title:"Evolve - Resources"}),$("#mTabResource").append('\n \n \n {{ \'tab_market\' | label }}\n \n \n \n \n {{ \'tab_storage\' | label }}\n \n \n \n \n {{ \'tab_ejector\' | label }}\n \n \n \n \n {{ \'tab_cargo\' | label }}\n \n \n \n \n {{ \'tab_alchemy\' | label }}\n \n \n '),sc({el:"#mTabResource",data:{s:t.settings},methods:{swapTab(e){if(!t.settings.tabLoad)switch(rc($("#market")),rc($("#resStorage")),rc($("#resEjector")),rc($("#resCargo")),rc($("#resAlchemy")),e){case 0:ar("market");break;case 1:ar("storage");break;case 2:ar("ejector");break;case 3:ar("supply");break;case 4:ar("alchemy")}return e}},filters:{label:e=>Pt(e)}}),tr(),a.hasOwnProperty("resource")&&Object.keys(a.resource).forEach((function(e){let r=a.resource[e].color,s=a.resource[e].tradable;if(a.resource[e].stackable){var i=$(`
`);$("#resStorage").append(i),fr(`#stack-${e}`,i,e,r)}s&&(i=$(`
`),$("#market").append(i),ur(`#market-${e}`,i,e,r,!0)),Va[e]&&Ar(e,r),Ja[e]&&Er(e,r),Za[e]&&"magic"===t.race.universe&&(t.resource[e].basic=s,Kr(e,r,s))})),sr();break;case 5:case"mTabArpa":t.settings.tabLoad||Zi("page_view",{page_title:"Evolve - Arpa"}),$("#mTabArpa").append(`\n \n \n \n \n \n \n
`),sc({el:"#mTabArpa",data:{s:t.settings},filters:{label:e=>Pt(e)}}),Oe("Physics"),Oe("Genetics"),Oe("Crispr"),Oe("Blood");break;case 6:case"mTabStats":t.settings.tabLoad||Zi("page_view",{page_title:"Evolve - Stats"}),$("#mTabStats").append('\n \n \n {{ \'tab_stats\' | label }}\n \n \n \n \n {{ \'tab_achieve\' | label }}\n \n \n \n \n {{ \'tab_perks\' | label }}\n \n \n '),sc({el:"#mTabStats",data:{s:t.settings},filters:{label:e=>Pt(e)}}),function(){rc($("#achieve")),rc($("#stats"));let e=$('
');$("#stats").append(e);let a=$('
');$("#perks").append(a);let r=$('
');$("#achieve").append(r),function(){rc($("#statsPanel"));let e=$("#statsPanel");if(e.append(`${F("achieve_stats_overall")}
`),e.append(`${F("achieve_stats_plasmid_earned")} {{ s.plasmid | format }}
`),t.stats.antiplasmid>0&&e.append(`${F("achieve_stats_antiplasmid_earned")} {{ s.antiplasmid | format }}
`),t.stats.phage>0&&e.append(`${F("achieve_stats_phage_earned")} {{ s.phage | format }}
`),t.stats.dark>0&&e.append(`${F("achieve_stats_dark_earned")} {{ s.dark | format }}
`),t.stats.harmony>0&&e.append(`${F("achieve_stats_harmony_earned")} {{ s.harmony | format }}
`),t.stats.blood>0&&e.append(`${F("achieve_stats_blood_earned")} {{ s.blood | format }}
`),t.stats.artifact>0&&e.append(`${F("achieve_stats_artifact_earned")} {{ s.artifact | format }}
`),e.append(`${F("achieve_stats_knowledge_spent")} {{ s.know | t_know | format }}
`),e.append(`${F("achieve_stats_starved_to_death")} {{ s.starved | t_starved | format }}
`),e.append(`${F("achieve_stats_died_in_combat")} {{ s.died | t_died | format }}
`),e.append(`${F("achieve_stats_game_days_played")} {{ s.days | played | format }}
`),t.stats.portals>0&&e.append(`${F("achieve_stats_portals")} {{ s.portals | format }}
`),e.append(`${F("achieve_stats_total_resets")} {{ s.reset | format }}
`),t.stats.mad>0&&e.append(`${F("achieve_stats_mad_resets")} {{ s.mad | format }}
`),t.stats.bioseed>0&&e.append(`${F("achieve_stats_bioseed_resets")} {{ s.bioseed | format }}
`),t.stats.cataclysm>0&&e.append(`${F("achieve_stats_cataclysm_resets")} {{ s.cataclysm | format }}
`),t.stats.blackhole>0&&e.append(`${F("achieve_stats_blackhole_resets")} {{ s.blackhole | format }}
`),t.stats.ascend>0&&e.append(`${F("achieve_stats_ascension_resets")} {{ s.ascend | format }}
`),t.stats.descend>0&&e.append(`${F("achieve_stats_descension_resets")} {{ s.descend | format }}
`),t.stats.aiappoc>0&&e.append(`${F("achieve_stats_aiappoc_resets")} {{ s.aiappoc | format }}
`),t.stats.matrix>0&&e.append(`${F("achieve_stats_matrix_resets")} {{ s.matrix | format }}
`),t.stats.retire>0&&e.append(`${F("achieve_stats_retire_resets")} {{ s.retire | format }}
`),t.stats.eden>0&&e.append(`${F("achieve_stats_eden_resets")} {{ s.eden | format }}
`),t.stats.terraform>0&&e.append(`${F("achieve_stats_terraform_resets")} {{ s.terraform | format }}
`),t.stats.geck>0&&e.append(`${F("achieve_stats_gecks")} {{ s.geck | format }}
`),e.append(`${F("achieve_stats_current_game")}
`),e.append(`${F("achieve_stats_knowledge_spent")} {{ s.know | format }}
`),e.append(`${F("achieve_stats_starved_to_death")} {{ s.starved | format }}
`),e.append(`${F("achieve_stats_died_in_combat")} {{ s.died | format }}
`),e.append(`${F("achieve_stats_attacks_made")} {{ s.attacks | format }}
`),e.append(`${F("achieve_stats_game_days_played")} {{ s.days | format }}
`),t.stats.dkills>0&&e.append(`${F("achieve_stats_demons_kills")} {{ s.dkills | format }}
`),t.stats.sac>0&&e.append(`${F("achieve_stats_sacrificed")} {{ s.sac | format }}
`),t.stats.murders>0&&e.append(`${F("achieve_stats_murders")} {{ s.murders | format }}
`),t.stats.psykill>0&&e.append(`${F("achieve_stats_psymurders")} {{ s.psykill | format }}
`),t.resource.hasOwnProperty("Thermite")&&t.resource.Thermite.amount>0&&e.append(`${F("achieve_stats_thermite")} {{ r.Thermite.amount | res }}
`),Ic().active){let a="";(t.stats.cfood>=13||t.race.cataclysm||t.race.orbit_decayed)&&(a=`${kc(7,12,!0)} `),e.append(`${F("achieve_stats_trickortreat")} {{ s.cfood | format }} ${a}
`)}sc({el:"#statsPanel",data:{s:t.stats,r:t.resource},filters:{played:e=>e+t.stats.tdays,t_know:e=>e+t.stats.tknow,t_starved:e=>e+t.stats.tstarved,t_died:e=>e+t.stats.tdied,format:e=>e.toLocaleString(),res:e=>(+e.toFixed(2)).toLocaleString()}})}(),no(),$("body").hasClass("fool")?to({fool:!0}):to()}();break;case 7:t.settings.tabLoad||Zi("page_view",{page_title:"Evolve - Settings"});break;default:t.settings.tabLoad||Zi("page_view",{page_title:"Evolve - Hell Observation"}),t.portal.observe&&Ga(!0)}$("#popper").length>0&&0===$(`#${$("#popper").data("id")}`).length&&Ei()}const jt={spc_home:{info:{name:()=>di[t.race.species].home,desc:F("space_home_info_desc"),zone:"inner",syndicate:()=>!1},test_launch:{id:"space-test_launch",title:F("space_home_test_launch_title"),desc:F("space_home_test_launch_desc"),reqs:{space:1},grant:["space",2],queue_complete:()=>t.tech.space>=2?0:1,cost:{Money:()=>1e5,Oil:(e,t)=>Jt(7500,!1,t)},effect:F("space_home_test_launch_effect"),action(){if(Os($(this)[0])){if(t.race.truepath){let e=1;if(ue("gov0")||e++,ue("gov1")||e++,ue("gov2")||e++,0!==Math.floor(m(0,e)))return Di(F("space_home_test_launch_action_fail"),"danger",!1,["progress"]),0}return t.space.satellite={count:0},Di(F("space_home_test_launch_action"),"info",!1,["progress"]),!0}return!1}},satellite:{id:"space-satellite",title:F("space_home_satellite_title"),desc:F("space_home_satellite_desc"),reqs:{space:2},cost:{Money:e=>Xi("satellite",e,72e3,1.22),Knowledge:e=>Xi("satellite",e,28e3,1.22),Oil:(e,t)=>Xi("satellite",e,Jt(3200,!1,t),1.22),Alloy:e=>Xi("satellite",e,8e3,1.22)},effect(){let e=t.race.cataclysm||t.race.orbit_decayed?2e3:750;if((t.race.cataclysm||t.race.orbit_decayed)&&t.tech.supercollider){let a=t.tech.particles&&t.tech.particles>=3?5:10;e*=t.tech.supercollider/a+1}let a=t.race.cataclysm?F("space_moon_observatory_title"):t.race.orbit_decayed?F("city_university"):Ts(),r=`${F("space_home_satellite_effect2",[a,t.race.cataclysm?25:t.race.orbit_decayed?12:4])}
`;return`${F("plus_max_resource",[e,F("resource_Knowledge_name")])}
${r}${F("space_home_satellite_effect3",[t.civic.scientist?t.civic.scientist.name:F("job_scientist")])}
`},action(){return!!Os($(this)[0])&&(Nt("satellite"),t.resource.Knowledge.max+=750,!0)}},gps:{id:"space-gps",title:F("space_home_gps_title"),desc:()=>t.space.hasOwnProperty("gps")&&t.space.gps.count<4?`${F("space_home_gps_desc")}
${F("space_home_gps_desc_req")}
`:`${F("space_home_gps_desc")}
`,reqs:{satellite:1},not_trait:["terrifying"],cost:{Money:e=>Xi("gps",e,75e3,1.18),Knowledge:e=>Xi("gps",e,5e4,1.18),Copper:e=>Xi("gps",e,6500,1.18),Oil:(e,t)=>Xi("gps",e,Jt(3500,!1,t),1.18),Titanium:e=>Xi("gps",e,8e3,1.18)},effect:e=>(e||0)+(t.space.hasOwnProperty("gps")?t.space.gps.count:0)<4?F("space_home_gps_effect_req"):`${F("space_home_gps_effect")}
${F("space_home_gps_effect2",[2])}
`,action(){return!!Os($(this)[0])&&(Nt("gps"),!0)}},propellant_depot:{id:"space-propellant_depot",title:F("space_home_propellant_depot_title"),desc:F("space_home_propellant_depot_desc"),reqs:{space_explore:1},cost:{Money:e=>Xi("propellant_depot",e,55e3,1.35),Aluminium:e=>Xi("propellant_depot",e,22e3,1.35),Oil:(e,t)=>Xi("propellant_depot",e,Jt(5500,!1,t),1.35)},effect(){let e=Lr(1250)*(t.tech.world_control?1.5:1);if(t.resource.Helium_3.display){let a=Lr(1e3)*(t.tech.world_control?1.5:1);return`${F("plus_max_resource",[e,F("resource_Oil_name")])}
${F("plus_max_resource",[a,F("resource_Helium_3_name")])}
`}return`${F("plus_max_resource",[e,F("resource_Oil_name")])}
`},action(){return!!Os($(this)[0])&&(Nt("propellant_depot"),t.resource.Oil.max+=Lr(1250)*(t.tech.world_control?1.5:1),t.resource.Helium_3.display&&(t.resource.Helium_3.max+=Lr(1e3)*(t.tech.world_control?1.5:1)),!0)}},nav_beacon:{id:"space-nav_beacon",title:()=>t.race.orbit_decayed?F("space_home_broadcast_beacon_title"):F("space_home_nav_beacon_title"),desc:`${F("space_home_nav_beacon_desc")}
${F("requires_power")}
`,reqs:{luna:2},cost:{Money:e=>Xi("nav_beacon",e,75e3,1.32),Copper:e=>Xi("nav_beacon",e,38e3,1.32),Aluminium:e=>Xi("nav_beacon",e,44e3,1.32),Oil:(e,t)=>Xi("nav_beacon",e,Jt(12500,!1,t),1.32),Iridium:e=>Xi("nav_beacon",e,1200,1.32)},powered:()=>oc(2),powerBalancer:()=>t.tech.luna&&t.tech.luna>=3?[{s:t.space.moon_base.s_max-t.space.moon_base.support},{s:t.space.spaceport.s_max-t.space.spaceport.support}]:[{s:t.space.moon_base.s_max-t.space.moon_base.support}],support:()=>1,effect(){let e="";return t.race.orbit_decayed&&t.tech.broadcast&&(e=`${F("space_red_vr_center_effect1",[t.tech.broadcast/2])}
`),`${t.race.orbit_decayed?"":`${F("space_home_nav_beacon_effect1")}
`}${t.tech.luna>=3?`${F("space_red_spaceport_effect1",[Xt().red,1])}
`:""}${e}${F("space_home_nav_beacon_effect2",[$(this)[0].powered()])}
`},action(){return!!Os($(this)[0])&&(Nt("nav_beacon"),xs($(this)[0]),!0)}}},spc_moon:{info:{name:F("space_moon_info_name"),desc:()=>F("space_moon_info_desc",[di[t.race.species].home]),support:"moon_base",zone:"inner",syndicate:()=>!0},moon_mission:{id:"space-moon_mission",title:F("space_moon_mission_title"),desc:F("space_moon_mission_desc"),reqs:{space:2,space_explore:2},grant:["space",3],queue_complete:()=>t.tech.space>=3?0:1,cost:{Oil:(e,t)=>+Jt(12e3,!1,t).toFixed(0)},effect:F("space_moon_mission_effect"),action(){return!!Os($(this)[0])&&(Di(F("space_moon_mission_action"),"info",!1,["progress"]),t.space.iridium_mine={count:0,on:0},t.space.helium_mine={count:0,on:0},!0)}},moon_base:{id:"space-moon_base",title:F("space_moon_base_title"),desc:()=>`${F("space_moon_base_desc")}
${F("requires_power_combo",[t.resource.Oil.name])}
`,reqs:{space:3},cost:{Money:e=>Xi("moon_base",e,22e3,1.32),Cement:e=>Xi("moon_base",e,18e3,1.32),Alloy:e=>Xi("moon_base",e,7800,1.32),Polymer:e=>Xi("moon_base",e,12500,1.32)},effect(e){let t=Lr(500),a=+Jt($(this)[0].support_fuel().a,!0,e).toFixed(2);return`${F("space_moon_base_effect1")}
${F("plus_max_resource",[t,F("resource_Iridium_name")])}
${F("space_moon_base_effect3",[a,$(this)[0].powered()])}
`},support:()=>2,support_fuel:()=>({r:"Oil",a:2}),powered:()=>oc(4),powerBalancer:()=>[{s:t.space.moon_base.s_max-t.space.moon_base.support}],refresh:!0,action(){if(Os($(this)[0])){if(Nt("moon_base"),xs($(this)[0]),1===t.space.moon_base.count&&(t.tech.moon=1),!t.tech.luna&&(t.tech.luna=1,t.race.truepath)){let e=F("space_moon_base_msg",[ee(3)]);t.civic.foreign.gov3.hstl<10?e=`${e} ${F("space_moon_base_msg_ally")}`:t.civic.foreign.gov3.hstl>60&&(e=`${e} ${F("space_moon_base_msg_hstl")}`),Di(e,"info",!1,["progress"])}return t.race.orbit_decay&&t.race.orbit_decay>t.stats.days+2500&&(t.race.orbit_decay=t.stats.days+2500,Di(F("evo_challenge_orbit_decayed_accelerated",[t.race.orbit_decay-t.stats.days]),"info",!1,["progress"])),!0}return!1}},iridium_mine:{id:"space-iridium_mine",title:F("space_moon_iridium_mine_title"),desc:`${F("space_moon_iridium_mine_desc")}
${F("space_support",[F("space_moon_info_name")])}
`,reqs:{space:3,luna:1},cost:{Money:e=>Xi("iridium_mine",e,42e3,1.35),Lumber:e=>Xi("iridium_mine",e,9e3,1.35),Titanium:e=>Xi("iridium_mine",e,17500,1.35)},effect(){let e=Pe("iridium_mine","iridium"),a=+e.b.toFixed(3),r="";t.race.truepath&&(t.civic.foreign.gov3.hstl<10?r=`${F("space_rival_ally",[+(100*e.g).toFixed(1)])}
`:t.civic.foreign.gov3.hstl>60&&(r=`${F("space_rival_war",[+(100*e.g).toFixed(1)])}
`));let s=t.race.cataclysm?`${F("produce",[+Pe("iridium_mine","coal").toFixed(2),t.resource.Coal.name])}
`:"",i=t.race.cataclysm?`${F("produce",[+(Pe("iridium_mine","coal")/48).toFixed(3),t.resource.Uranium.name])}
`:"";return`${F("space_used_support",[F("space_moon_info_name")])}
${F("space_moon_iridium_mine_effect",[a])}
${r}${s}${i}`},support:()=>-1,powered:()=>oc(1),action(){return!!Os($(this)[0])&&(t.resource.Iridium.display=!0,Nt("iridium_mine"),t.resource.Mythril.display||(t.resource.Mythril.display=!0,ha()),t.space.moon_base.support${F("space_moon_helium_mine_desc")} ${F("space_support",[F("space_moon_info_name")])}
`,reqs:{space:3,luna:1},cost:{Money:e=>Xi("helium_mine",e,38e3,1.35),Aluminium:e=>Xi("helium_mine",e,9e3,1.35),Steel:e=>Xi("helium_mine",e,17500,1.35)},effect(){let e=Lr(100),a=Pe("helium_mine"),r=+a.b.toFixed(3),s="";return t.race.truepath&&(t.civic.foreign.gov3.hstl<10?s=`
${F("space_rival_ally",[+(100*a.g).toFixed(1)])}
`:t.civic.foreign.gov3.hstl>60&&(s=`
${F("space_rival_war",[+(100*a.g).toFixed(1)])}
`)),`
${F("space_used_support",[F("space_moon_info_name")])}
${F("space_moon_helium_mine_effect",[r])}
${s}
${F("plus_max_resource",[e,F("resource_Helium_3_name")])}
`},support:()=>-1,powered:()=>oc(1),action(){return!!Os($(this)[0])&&(t.resource.Helium_3.display=!0,Nt("helium_mine"),t.space.moon_base.support
${F("space_moon_observatory_desc")} `,reqs:{science:9,luna:1},cost:{Money:e=>Xi("observatory",e,2e5,1.28),Knowledge:e=>Xi("observatory",e,69e3,1.28),Stone:e=>Xi("observatory",e,125e3,1.28),Iron:e=>Xi("observatory",e,65e3,1.28),Iridium:e=>Xi("observatory",e,1250,1.28)},effect(){let e="";t.race.cataclysm&&(e=`
`);let a=5e3;t.race.cataclysm&&t.space.satellite&&t.space.satellite.count>0&&(a*=1+.25*t.space.satellite.count);let r=t.race.cataclysm?`
${r}`},support:()=>-1,powered:()=>oc(1),action(){return!!Os($(this)[0])&&(Nt("observatory"),t.space.moon_base.support