-
Notifications
You must be signed in to change notification settings - Fork 5
/
spaitable.min.js
1 lines (1 loc) · 11.3 KB
/
spaitable.min.js
1
$(function(){$.PACKAGED_VOLUMES={Abaddon:5e4,"Abaddon Kador Edition":5e4,"Abaddon Tash-Murkon Edition":5e4,Absolution:15e3,Adrestia:1e4,Aeon:13e5,Algos:5e3,"Aliastra Catalyst":5e3,"Amarr Media Shuttle":500,"Amarr Police Frigate":2500,"Amarr Shuttle":500,Anathema:2500,Anshar:13e5,Apocalypse:5e4,"Apocalypse Blood Raider Edition":5e4,"Apocalypse Imperial Issue":5e4,"Apocalypse Kador Edition":5e4,"Apocalypse Navy Issue":5e4,"Apocalypse Tash-Murkon Edition":5e4,Apotheosis:500,Arazu:1e4,Arbitrator:1e4,Archon:13e5,Ares:2500,Ark:13e5,Armageddon:5e4,"Armageddon Imperial Issue":5e4,"Armageddon Navy Issue":5e4,Ashimmu:1e4,Astarte:15e3,Astero:2500,Atron:2500,Augoror:1e4,"Augoror Navy Issue":1e4,Avatar:1e7,Badger:2e4,Bantam:2500,Barghest:5e4,Basilisk:1e4,Bellicose:1e4,Bestower:2e4,"Bestower Tash-Murkon Edition":2e4,Bhaalgorn:5e4,Bifrost:5e3,Blackbird:1e4,Blade:2500,Bowhead:13e5,Breacher:2500,Broadsword:1e4,Brutix:15e3,"Brutix Navy Issue":15e3,"Brutix Serpentis Edition":15e3,Burst:2500,Bustard:2e4,Buzzard:2500,"Caldari Media Shuttle":500,"Caldari Navy Hookbill":2500,"Caldari Shuttle":500,Cambion:2500,Capsule:500,"Capsule - Genolution 'Auroral' 197-variant":500,Caracal:1e4,"Caracal Navy Issue":1e4,"Caracal Nugoeihuvi Edition":1e4,"Caracal Wiyrkomi Edition":1e4,Catalyst:5e3,"Catalyst Serpentis Edition":5e3,Celestis:1e4,Cerberus:1e4,Chameleon:1e4,Charon:13e5,Cheetah:2500,Chimera:13e5,Chremoas:2500,"Civilian Amarr Shuttle":500,"Civilian Caldari Shuttle":500,"Civilian Gallente Shuttle":500,"Civilian Minmatar Shuttle":500,Claw:2500,Claymore:15e3,Cockroach:2500,Coercer:5e3,"Coercer Blood Raiders Edition":5e3,"Concord Army Battleship":5e4,"Concord Army Frigate":2500,"Concord Police Battleship":5e4,"Concord Police Cruiser":1e4,"Concord Police Frigate":2500,"Concord Special Ops Battleship":5e4,"Concord Special Ops Frigate":2500,"Concord SWAT Battleship":5e4,"Concord SWAT Frigate":2500,Condor:2500,Confessor:5e3,Corax:5e3,Cormorant:5e3,"Cormorant Guristas Edition":5e3,"Council Diplomatic Shuttle":500,Covetor:3750,Crane:2e4,Crow:2500,Crucifier:2500,"Crucifier Navy Issue":2500,Cruor:2500,Crusader:2500,Curse:1e4,Cyclone:15e3,"Cyclone Thukker Tribe Edition":15e3,Cynabal:1e4,Dagger:2500,Damnation:15e3,Daredevil:2500,Deacon:2500,Deimos:1e4,Devoter:1e4,Devourer:2500,Dominix:5e4,"Dominix Navy Issue":5e4,"Dominix Quafe Edition":5e4,Dragoon:5e3,Drake:15e3,"Drake Navy Issue":15e3,Dramiel:2500,Eagle:1e4,Echelon:2500,Echo:2500,Endurance:2500,Enyo:2500,Eos:15e3,Epithal:2e4,Erebus:1e7,Erinye:2500,Eris:5e3,Etana:1e4,Executioner:2500,Exequror:1e4,"Exequror Navy Issue":1e4,Falcon:1e4,"Federation Navy Comet":2500,Fenrir:13e5,Ferox:15e3,"Ferox Guristas Edition":15e3,Fiend:1e4,Flycatcher:5e3,Freki:2500,Fury:2500,"Gallente Media Shuttle":500,"Gallente Police Ship":2500,"Gallente Shuttle":500,Garmur:2500,Gatherer:2500,Gila:1e4,Gnosis:15e3,"Gold Magnate":2500,Golem:5e4,"Golem Guristas Edition":5e4,"Golem Kaalakiota Edition":5e4,"Golem Nugoeihuvi Edition":5e4,"Goru's Shuttle":500,Griffin:2500,"Griffin Navy Issue":2500,Guardian:1e4,"Guardian-Vexor":1e4,"Guristas Shuttle":500,Harbinger:15e3,"Harbinger Navy Issue":15e3,Harpy:2500,Hawk:2500,Hecate:5e3,Hel:13e5,Helios:2500,Hematos:2500,Heretic:5e3,Heron:2500,Hoarder:2e4,Hound:2500,Huginn:1e4,Hulk:3750,Hurricane:15e3,"Hurricane Fleet Issue":15e3,Hyena:2500,Hyperion:5e4,"Hyperion Aliastra Edition":5e4,"Hyperion Inner Zone Shipping Edition":5e4,Ibis:2500,Imicus:2500,Immolator:2500,"Immovable Enigma":2500,Imp:2500,Impairor:2500,Impel:2e4,"Imperial Navy Slicer":2500,Incursus:2500,"Incursus Aliastra Edition":2500,"Incursus Inner Zone Shipping Edition":2500,"Inner Zone Shipping Catalyst":5e3,"Inner Zone Shipping Imicus":2500,Inquisitor:2500,"Intaki Syndicate Catalyst":5e3,"InterBus Catalyst":5e3,"InterBus Shuttle":500,Ishkur:2500,Ishtar:1e4,"Iteron Inner Zone Shipping Edition":2e4,"Iteron Mark V":2e4,Jackdaw:5e3,Jaguar:2500,Keres:2500,Kestrel:2500,"Khanid Navy Frigate":2500,Kirin:2500,Kishar:2500,Kitsune:2500,Kronos:5e4,"Kronos Inner Zone Shipping Edition":5e4,"Kronos Police Edition":5e4,"Kronos Quafe Edition":5e4,Kryos:2e4,Lachesis:1e4,Legion:5e3,Leopard:500,Leviathan:1e7,Loki:5e3,Lynx:2500,Machariel:5e4,Mackinaw:3750,"Mackinaw ORE Development Edition":3750,Maelstrom:5e4,"Maelstrom Krusual Edition":5e4,"Maelstrom Nefantar Edition":5e4,Magnate:2500,Magus:5e3,Malediction:2500,Malice:2500,Maller:1e4,Mammoth:2e4,"Mammoth Nefantar Edition":2e4,Manticore:2500,Mastodon:2e4,Maulus:2500,"Maulus Navy Issue":2500,Medusa:2500,Megathron:5e4,"Megathron Federate Issue":5e4,"Megathron Inner Zone Shipping Edition":5e4,"Megathron Navy Issue":5e4,"Megathron Police Edition":5e4,"Megathron Quafe Edition":5e4,Merlin:2500,"Merlin Nugoeihuvi Edition":2500,"Merlin Wiyrkomi Edition":2500,Miasmos:2e4,"Miasmos Amastris Edition":2e4,"Miasmos Quafe Ultra Edition":2e4,"Miasmos Quafe Ultramarine Edition":2e4,Mimir:1e4,"Minmatar Media Shuttle":500,"Minmatar Peacekeeper Ship":2500,"Minmatar Shuttle":500,Moa:1e4,Moracha:1e4,"Mordus Frigate":2500,Moros:13e5,"Moros Interbus Edition":13e5,Muninn:1e4,Myrmidon:15e3,Naga:15e3,Naglfar:13e5,"Naglfar Justice Edition":13e5,Nation:13e5,Navitas:2500,"Nefantar Thrasher":5e3,Nemesis:2500,Nereus:2e4,Nestor:5e4,Nidhoggur:13e5,Nighthawk:15e3,Nightmare:5e4,Noctis:2e4,Nomad:13e5,Nyx:13e5,Obelisk:13e5,Occator:2e4,Omen:1e4,"Omen Kador Edition":1e4,"Omen Navy Issue":1e4,"Omen Tash-Murkon Edition":1e4,Oneiros:1e4,Onyx:1e4,"Opux Dragoon Yacht":1e4,"Opux Luxury Yacht":1e4,Oracle:15e3,Orca:5e5,"Orca ORE Development Edition":5e5,Orthrus:1e4,Osprey:1e4,"Osprey Navy Issue":1e4,Paladin:5e4,"Paladin Blood Raider Edition":5e4,"Paladin Kador Edition":5e4,"Paladin Tash-Murkon Edition":5e4,Panther:5e4,Phantasm:1e4,Phobos:1e4,Phoenix:13e5,"Phoenix Wiyrkomi Edition":13e5,Pilgrim:1e4,"Polaris Centurion Frigate":2500,"Polaris Centurion TEST":2500,"Polaris Enigma Frigate":2500,"Polaris Inspector Frigate":2500,"Polaris Legatus Frigate":2500,"Police Pursuit Comet":2500,Pontifex:5e3,Primae:2e4,Probe:2500,Procurer:3750,Prophecy:15e3,"Prophecy Blood Raiders Edition":15e3,Prorator:2e4,Prospect:2500,Proteus:5e3,Providence:13e5,Prowler:2e4,Punisher:2500,"Punisher Kador Edition":2500,"Punisher Tash-Murkon Edition":2500,Purifier:2500,"Quafe Catalyst":5e3,Ragnarok:1e7,Rapier:1e4,Raptor:2500,Rattlesnake:5e4,"Rattlesnake Victory Edition":5e4,Raven:5e4,"Raven Guristas Edition":5e4,"Raven Kaalakiota Edition":5e4,"Raven Navy Issue":5e4,"Raven Nugoeihuvi Edition":5e4,"Raven State Issue":5e4,Reaper:2500,Redeemer:5e4,"Republic Fleet Firetail":2500,Retribution:2500,Retriever:3750,Revelation:13e5,"Revelation Sarum Edition":13e5,Revenant:13e5,Rhea:13e5,Rifter:2500,"Rifter Krusual Edition":2500,"Rifter Nefantar Edition":2500,Rokh:5e4,"Rokh Nugoeihuvi Edition":5e4,"Rokh Wiyrkomi Edition":5e4,Rook:1e4,Rorqual:13e5,"Rorqual ORE Development Edition":13e5,Rupture:1e4,Sabre:5e3,Sacrilege:1e4,"Sarum Magnate":2500,Scalpel:2500,Scimitar:1e4,Scorpion:5e4,"Scorpion Ishukone Watch":5e4,"Scorpion Navy Issue":5e4,Scythe:1e4,"Scythe Fleet Issue":1e4,Sentinel:2500,Sigil:2e4,"Silver Magnate":2500,Sin:5e4,Skiff:3750,Slasher:2500,Sleipnir:15e3,"SOCT 1":2500,"SOCT 2":2500,Stabber:1e4,"Stabber Fleet Issue":1e4,"Stabber Krusual Edition":1e4,"Stabber Nefantar Edition":1e4,Stiletto:2500,Stork:5e3,Stratios:1e4,"Stratios Emergency Responder":1e4,Succubus:2500,"Sukuuvestaa Heron":2500,Svipul:5e3,Swordspine:2500,Taipan:2500,Talos:15e3,Talwar:5e3,Taranis:2500,"Tash-Murkon Magnate":2500,Tayra:2e4,"Tayra Wiyrkomi Edition":2e4,Tempest:5e4,"Tempest Fleet Issue":5e4,"Tempest Justice Edition":5e4,"Tempest Krusual Edition":5e4,"Tempest Nefantar Edition":5e4,"Tempest Tribal Issue":5e4,Tengu:5e3,Thalia:2500,Thanatos:13e5,Thorax:1e4,"Thorax Aliastra Edition":1e4,"Thorax Inner Zone Shipping Edition":1e4,Thrasher:5e3,"Thrasher Thukker Tribe Edition":5e3,Tormentor:2500,Tornado:15e3,Tristan:2500,"Tristan Quafe Edition":2500,Typhoon:5e4,"Typhoon Fleet Issue":5e4,Utu:2500,Vagabond:1e4,Vangel:1e4,Vargur:5e4,"Vargur Justice Edition":5e4,"Vargur Krusual Edition":5e4,"Vargur Nefantar Edition":5e4,Velator:2500,Vengeance:2500,Venture:2500,Vexor:1e4,"Vexor Navy Issue":1e4,"Vexor Quafe Edition":1e4,"Vherokior Probe":2500,Viator:2e4,"Victorieux Luxury Yacht":1e4,Vigil:2500,"Vigil Fleet Issue":2500,Vigilant:1e4,Vindicator:5e4,Violator:2500,Vulture:15e3,Whiptail:2500,Widow:5e4,Wolf:2500,Worm:2500,Wreathe:2e4,Wyvern:13e5,Zealot:1e4,Zephyr:500},$.COLLAT_AMOUNT=.02,$.C4C_COST=400,$.JITA_COST=300,$.LOCAL_FADE_COST=100,$.formatNumber=function(e){var a=e.split("."),i=a[0];x2=a.length>1?"."+a[1]:"";for(var r=/(\d+)(\d{3})/;r.test(i);)i=i.replace(r,"$1,$2");return i+x2},$.formatNumberToString=function(e){return $.formatNumber(e.toFixed(2).toString())},$.shipmentVolume=function(){var e=$("th :nth-child(5)").text();return parseFloat(e.substr(0,e.length-2).replace(/[^\d\.]/g,""))},$.isPackageableShips=function(){return $(".line-item-row").is(function(e,a){return $.itemIsPackable($(a).children(":nth-child(2)").text().trim())})},$.itemIsPackable=function(e){return $.PACKAGED_VOLUMES.hasOwnProperty(e)},$.computePackagedVolumes=function(){var e=0,a=0;$(".line-item-row").each(function(i,r){var t=$(r).children(":nth-child(2)").text().trim();if($.itemIsPackable(t)){var o=parseFloat($(r).children(":nth-child(1)").text().replace(/,/g,"")),n=parseFloat($(r).children(":nth-child(3)").text().replace(/,/g,"")),s=$.PACKAGED_VOLUMES[t];e+=n*o,a+=s*o;var l=parseFloat($(r).children(":nth-child(4)").children(":nth-child(1)").text().replace(/,/g,"")),u=parseFloat($(r).children(":nth-child(4)").children(":nth-child(3)").text().replace(/,/g,"")),d=l/s,c=u/s;$(r).children(":nth-child(3)").text($.formatNumberToString(s)),$(r).children(":nth-child(6)").html($.formatNumberToString(d)+"<br/>"+$.formatNumberToString(c))}});var i=$.shipmentVolume()-e+a;$("th :nth-child(5)").html($.formatNumberToString(i)+"m<sup>3</sup>"),$("#ships-warning h4").text("PACKAGED SHIPS"),$("#package-toggle").hide(),$.computeShippingCosts()},$.computeShippingCosts=function(){var e=parseFloat($("th .nowrap:nth-child(1)").html().replace(/,/g,"")),a=parseFloat($("th :nth-child(3)").html().replace(/,/g,"")),i=$.shipmentVolume(),r=e*$.COLLAT_AMOUNT,t=a*$.COLLAT_AMOUNT;$("#c4cNoCollatReward").text($.formatNumberToString(i*$.C4C_COST)),$("#c4cSellReward").text($.formatNumberToString(i*$.C4C_COST+r)),$("#c4cBuyReward").text($.formatNumberToString(i*$.C4C_COST+t)),$("#jitaNoCollatReward").text($.formatNumberToString(i*$.JITA_COST)),$("#jitaSellReward").text($.formatNumberToString(i*$.JITA_COST+r)),$("#jitaBuyReward").text($.formatNumberToString(i*$.JITA_COST+t)),$("#localFadeNoCollatReward").text($.formatNumberToString(i*$.LOCAL_FADE_COST)),$("#localFadeSellReward").text($.formatNumberToString(i*$.LOCAL_FADE_COST+r)),$("#localFadeBuyReward").text($.formatNumberToString(i*$.LOCAL_FADE_COST+t)),$(".sellAmount").each(function(a,i){$(i).text($.formatNumberToString(e))}),$(".buyAmount").each(function(e,i){$(i).text($.formatNumberToString(a))})},$(".copyable").click(function(){$(this).text(parseFloat($(this).text().replace(/,/g,"")));var e,a;window.getSelection&&document.createRange?(a=window.getSelection(),e=document.createRange(),e.selectNodeContents(this),a.removeAllRanges(),a.addRange(e)):document.selection&&document.body.createTextRange&&(e=document.body.createTextRange(),e.moveToElementText(this),e.select());var i=this;$(".copyable").each(function(e,a){a!=i&&$(a).text($.formatNumber($(this).text()))})}),$("#package-toggle").click($.computePackagedVolumes),$.computeShippingCosts(),$.isPackageableShips()&&($("#package-toggle").show(),$("#ships-warning").show())});