Merge the ruleset and four doors into v2

This commit is contained in:
Frederic Jung 2026-10-28 15:45:09 +01:00
commit fa4e30692e
No known key found for this signature in database
43 changed files with 582 additions and 82 deletions

View file

@ -15,9 +15,9 @@ function showTitle(){
<h1>Series<br>of <span>Tubes</span></h1></div>
<p class="tagline">${tr('title.build_an_internet_lay_fiber_between')}</p>${plugHtml(false)}${isPhone()?installRow():''}
${sv?`<div class="btns" style="margin-bottom:6px">${btn(tr('title.continue_name_date',{name:esc(sv.name),date:dateStr(sv.day)}),'cont',{},'pink big')}</div>`:''}
${doorsHtml()}
<label class="f" for="nmIn">${tr('title.name_your_network')}</label><div class="network-name"><input class="t" id="nmIn" maxlength="24" value="${esc(UI.nm)}" autocomplete="off">${btn(tr('common.another_one'),'randomName',{},'ghost sm')}</div>
<label class="f">${tr('title.pick_your_home_city')}</label><div class="starts homes">${starts.map(([c,d])=>`<button class="start ${UI.startCity===c?'on':''}" data-city="${c}" data-act="pickStart" data-args='{"city":"${c}"}'><b>${CITY[c].name}</b><span>${d}</span></button>`).join('')}<label class="start own ${START5.includes(UI.startCity)?'':'on'}" for="homeSel"><b>${tr('title.anywhere_else')}</b><span id="homeWhat">${homeWhat()}</span>${homePick()}</label></div>
<label class="f">${tr('common.mode')}</label><div class="btns">${[['normal',tr('common.normal')],['sandbox',tr('common.sandbox')]].map(([m,l])=>`<button class="b sm modeb ${(UI.mode||'normal')===m?'pink':'ghost'}" data-m="${m}" data-act="modeSet" data-args='{"m":"${m}"}'>${l}</button>`).join('')}${btn(tr('title.scenarios_amp_weekly_challenge'),'scenarios',{},'sm')}</div>
<label class="f" id="homeLbl">${tr('title.pick_your_home_city')}</label><div class="starts homes">${starts.map(([c,d])=>`<button class="start ${UI.startCity===c?'on':''}" data-city="${c}" data-act="pickStart" data-args='{"city":"${c}"}'><b>${CITY[c].name}</b><span>${d}</span></button>`).join('')}<label class="start own ${START5.includes(UI.startCity)?'':'on'}" for="homeSel"><b>${tr('title.anywhere_else')}</b><span id="homeWhat">${homeWhat()}</span>${homePick()}</label></div>
<label class="f" for="langTitle">${tr('common.language')}</label>${langPick('langTitle')}
<div class="btns cta tcta" style="margin-top:16px">${btn(sv?tr('common.start_a_new_network'):tr('common.start_building'),'start',{},'big')}${btn(tr('common.how_to_play'),'help',{},'ghost')}${btn(tr('common.import_a_save'),'importPick',{},'ghost')}${btn(tr('common.settings'),'settings',{},'ghost')}</div><p class="ver">v${APP_VERSION} · <a href="https://github.com/fjaeckel/seriesoftubes" target="_blank" rel="noopener">${tr('title.source_on_github')}</a> · <a href="${SIGNAL}" target="_blank" rel="noopener">${tr('title.chat_on_signal')}</a> · ${tr('title.cookieless_stats_no_tracking')}</p>`);
$('nmIn').addEventListener('input',e=>{UI.nm=e.target.value;});
@ -33,3 +33,12 @@ function whatsNew(returning,force){
${returning&&S?`<p class="note">${tr('title.your_network_name_was_saved_and',{name:esc(S.name)})}</p>`:''}
<div class="btns" style="margin-top:12px">${btn(UI.started?tr('title.back_to_my_network'):tr('common.got_it'),UI.started?'closeModal':'helpClose',{},'pink big')}${notesLong(RELEASE_NOTES)?'':`<a class="b ghost" href="https://github.com/fjaeckel/seriesoftubes/blob/main/CHANGELOG.md" target="_blank" rel="noopener">${tr('common.full_changelog')}</a>`}</div>`);
return true;}
/* The four doors: one game, its rules picked here and locked for the network's life. Normal and Sandbox stay on this
screen (presets / chaos below), Puzzles and Scenarios open their own lists. Choices toggle in place (no re-render). */
const DOORS=[['puzzle','🧩',tr('title.puzzles'),tr('title.one_network_one_knot_no_clock')],['sandbox','🏖️',tr('common.sandbox'),tr('title.a_billion_dollars_and_every_toy')],['normal','📟',tr('common.normal'),tr('title.the_real_game_climb_from_tier')],['scn','🏆',tr('title.scenarios_amp_weekly'),tr('title.hand_built_crises_and_one_world')]];
const doorAct={puzzle:'puzzleDoor',sandbox:'modeSet',normal:'modeSet',scn:'scenarios'};
function doorsHtml(){const m=UI.mode==='sandbox'?'sandbox':'normal',pr=own(PRESETS,UI.preset)&&NORMAL_PRESETS.includes(UI.preset)?UI.preset:'oncall',ch=own(CHAOS,UI.sbChaos)?UI.sbChaos:'none';
return `<label class="f">${tr('title.pick_a_door')}</label><div class="doors">${DOORS.map(([k,i,n,d])=>`<button class="door${k===m?' on':''}" data-door="${k}" data-act="${doorAct[k]}" data-args='${k==='sandbox'||k==='normal'?`{"m":"${k}"}`:'{}'}'><i aria-hidden="true">${i}</i><b>${n}</b><span>${d}</span></button>`).join('')}</div>
<div id="doorNormal"${m==='normal'?'':' hidden'}><label class="f">${tr('title.how_much_trouble')}</label><div class="presets">${NORMAL_PRESETS.map(k=>{const P=PRESETS[k];return `<button class="preset${k===pr?' on':''}" data-preset="${k}" data-act="presetSet" data-args='{"p":"${k}"}'><i aria-hidden="true">${P.i}</i><b>${P.n}</b><span>${P.d}</span><small>${P.x}</small></button>`;}).join('')}</div></div>
<div id="doorSandbox"${m==='sandbox'?'':' hidden'}><label class="f">${tr('title.chaos_in_your_sandbox')}</label><div class="chaos">${Object.entries(CHAOS).map(([k,C])=>`<button class="chs${k===ch?' on':''}" data-chaos="${k}" data-act="chaosSet" data-args='{"c":"${k}"}'><i aria-hidden="true">${C.i}</i><b>${C.n}</b><span>${C.d}</span></button>`).join('')}</div></div>
<p class="note lockn">🔒 ${tr('title.rules_are_picked_once_and_locked')}</p>`;}

View file

@ -16,7 +16,7 @@ function showHelp(){
<dt>${tr('common.embedded_cache')}</dt><dd>${tr('help.a_cdn_s_server_in_your')}</dd>
<dt>DE-KICKS</dt><dd>${tr('help.the_group_behind_several_big')}</dd><dt>${tr('common.remote_peering')}</dt><dd>${tr('help.reach_an_ix_over_a_fabric')}</dd><dt>${tr('common.peering_policy')}</dt><dd>${tr('help.open_peers_with_anyone_selective')}</dd>
<dt>${tr('common.waves')}</dt><dd>${tr('help.your_fiber_links_are_leased_waves')}</dd><dt>${tr('common.95th_percentile')}</dt><dd>${tr('help.transit_bills_sample_your_usage')}</dd><dt>${tr('common.routers')}</dt><dd>${tr('help.each_pop_s_router_model_caps')}</dd><dt>${tr('common.dark_fiber')}</dt><dd>${tr('help.lease_an_iru_or_build_your')}</dd><dt>${tr('common.subsea_cables')}</dt><dd>${tr('help.subsea_waves_can_only_follow_cable')}</dd><dt>${tr('common.latency')}</dt><dd>${tr('help.every_link_has_latency_high')}</dd><dt>${tr('common.noc_dashboard')}</dt><dd>${tr('help.the_chart_button_at_the_top')}</dd><dt>${tr('common.asia')}</dt><dd>${tr('help.a_weird_underserved_market_transit')}</dd><dt>${tr('common.russia')}</dt><dd>${tr('help.moscow_needs_a_mandatory_government')}</dd><dt>${tr('help.events_chains_and_wholesale')}</dt><dd>${tr('help.event_networks_a_final_a_festival')}</dd><dt>${tr('common.bank')}</dt><dd>${tr('help.tap_your_cash_to_open_the')}</dd><dt>${tr('common.lags')}</dt><dd>${tr('help.out_of_port_speed_bundle_up')}</dd><dt>${tr('common.traffic_engineering')}</dt><dd>${tr('help.tap_a_link_to_see_which')}</dd><dt>${tr('common.china')}</dt><dd>${tr('help.mainland_china_needs_a_license_and')}</dd><dt>${tr('common.weird_requirements')}</dt><dd>${tr('help.some_customers_come_with_conditions')}</dd><dt>${tr('common.customer_levels')}</dt><dd>${tr('help.as_your_peak_traffic_and_footprint')}</dd><dt>${tr('help.l2vpn_ddos_protection')}</dt><dd>${tr('help.businesses_may_want_a_private')}</dd><dt>${tr('common.scrubbing_centers')}</dt><dd>${tr('help.build_one_in_as_many_pops')}</dd><dt>${tr('common.nni_fabrics')}</dt><dd>${tr('help.megapork_pocketfabric_and')}</dd>
<dt>${tr('common.conferences')}</dt><dd>${tr('help.nanog_ripe_denog_and_friends_come')}</dd><dt>${tr('common.modes')}</dt><dd>${tr('help.sandbox_gives_you_a_billion_dollars')}</dd><dt>${tr('common.traceroute')}</dt><dd>${tr('help.tap_traceroute_on_any_of_your')}</dd><dt>${tr('common.badges')}</dt><dd>${tr('help.below_your_goals_sits_a_wall')}</dd><dt>${tr('common.the_giants')}</dt><dd>${tr('help.at_customer_level_3_and_4')}</dd><dt>RouteScript</dt><dd>${tr('help.once_auto_te_is_installed_you')}</dd><dt>Auto-TE</dt><dd>${tr('help.traffic_follows_the_shortest_path_by')}</dd><dt>${tr('common.metro_diversity')}</dt><dd>${tr('help.a_pop_is_one_building_until')}</dd><dt>${tr('common.wave_markets')}</dt><dd>${tr('help.what_a_wave_costs_depends_on')}</dd><dt>${tr('common.regional_quirks')}</dt><dd>${tr('help.in_the_gulf_saudi_pops_need')}</dd><dt>${tr('common.boot_times')}</dt><dd>${tr('help.some_routers_take_forever_to_boot')}</dd><dt>${tr('common.failures')}</dt><dd>${tr('help.things_break_all_the_time_fiber')}</dd>
<dt>${tr('common.conferences')}</dt><dd>${tr('help.nanog_ripe_denog_and_friends_come')}</dd><dt>${tr('common.modes')}</dt><dd>${tr('help.one_game_four_doors_puzzles_are')}</dd><dt>${tr('common.traceroute')}</dt><dd>${tr('help.tap_traceroute_on_any_of_your')}</dd><dt>${tr('common.badges')}</dt><dd>${tr('help.below_your_goals_sits_a_wall')}</dd><dt>${tr('common.the_giants')}</dt><dd>${tr('help.at_customer_level_3_and_4')}</dd><dt>RouteScript</dt><dd>${tr('help.once_auto_te_is_installed_you')}</dd><dt>Auto-TE</dt><dd>${tr('help.traffic_follows_the_shortest_path_by')}</dd><dt>${tr('common.metro_diversity')}</dt><dd>${tr('help.a_pop_is_one_building_until')}</dd><dt>${tr('common.wave_markets')}</dt><dd>${tr('help.what_a_wave_costs_depends_on')}</dd><dt>${tr('common.regional_quirks')}</dt><dd>${tr('help.in_the_gulf_saudi_pops_need')}</dd><dt>${tr('common.boot_times')}</dt><dd>${tr('help.some_routers_take_forever_to_boot')}</dd><dt>${tr('common.failures')}</dt><dd>${tr('help.things_break_all_the_time_fiber')}</dd>
<dt>RouteScript</dt><dd>${tr('help.rules_for_your_auto_te_controller')}</dd>
</dl><h3 style="margin:16px 0 0">${tr('help.want_to_know_how_it_really')}</h3>${plugHtml(true)}${chatHtml()}${issueHtml()}</dl><div class="btns" style="margin-top:14px">${btn(UI.started?tr('common.back_to_the_map'):tr('common.got_it'),'helpClose',{},'big')}${RELEASE_NOTES.length?btn(tr('common.what_s_new_in_v',{v:esc(APP_VERSION)}),'whatsNewShow',{},'ghost'):''}${UI.started&&S&&!S.lost?btn(tr('common.start_a_new_network'),'resetAsk',{},'ghost sm'):''}</div><div class="btns" style="margin-top:6px">${UI.started&&S&&!S.lost?btn(tr('common.export_save'),'exportSave',{},'ghost sm'):''}${btn(tr('common.import_a_save'),'importPick',{},'ghost sm')}${btn(tr('common.settings'),'settings',{},'ghost sm')}</div>`);
}

View file

@ -9,7 +9,7 @@ function openLinkModal(a,b){
const mode=UI.lmode==='df'?'df':'wave',tabs=`<div class="seg" style="margin-top:8px">${btn(tr('link_modal.lease_a_wave'),'dfMode',{m:'wave'},mode==='wave'?'pink':'ghost')}${btn(tr('common.dark_fiber'),'dfMode',{m:'df'},mode==='df'?'pink':'ghost')}</div>`;
const head=`<div style="display:flex;align-items:center"><div><div class="eyebrow">${sub?tr('common.subsea_a6be'):tr('common.terrestrial_19e4')} · ${km.toLocaleString()} km</div><h2 style="font-size:26px">${CITY[a].name} → ${CITY[b].name}</h2></div><button class="x" data-act="closeModal" aria-label="${tr('common.close')}">×</button></div>${tabs}`;
if(mode==='df'){openModal(head+dfModalBody(a,b,km,pop));return;}
if(sub&&!cablesOk(a,b).length){const fr=[...new Set(CABLE_PAIRS.filter(c=>c.a===a||c.b===a).map(c=>CITY[c.a===a?c.b:c.a].name))],dry=[a,b].find(c=>!landing(c));openModal(head+`<p class="lead" style="margin-top:10px">${dry?tr('link_modal.no_subsea_cable_lands_in_city',{city:CITY[dry].name,near:CITY[nearLanding(dry)].name}):tr('link_modal.no_subsea_cable_lands_in_both',{a:CITY[a].name,b:CITY[b].name,list:fr.join(', ')})}</p>${S.won&&!ownCabWhy(a,b)?ownCabTeaser(a,b):''}`);return;}
if(sub&&!cablesOk(a,b).length){const fr=[...new Set(CABLE_PAIRS.filter(c=>c.a===a||c.b===a).map(c=>CITY[c.a===a?c.b:c.a].name))],dry=[a,b].find(c=>!landing(c));openModal(head+`<p class="lead" style="margin-top:10px">${dry?tr('link_modal.no_subsea_cable_lands_in_city',{city:CITY[dry].name,near:CITY[nearLanding(dry)].name}):tr('link_modal.no_subsea_cable_lands_in_both',{a:CITY[a].name,b:CITY[b].name,list:fr.join(', ')})}</p>${cabOpen()&&!ownCabWhy(a,b)?ownCabTeaser(a,b):''}`);return;}
if(isSub(a,b)&&S.ev.landban&&S.ev.landban.until>S.day&&[a,b].includes(S.ev.landban.city)){openModal(head+`<p class="lead" style="margin-top:10px">${tr('link_modal.the_landing_permit_dispute_in_city',{city:CITY[S.ev.landban.city].name,n:S.ev.landban.until-S.day})}</p>`);return;}
if(uaePair(a,b)||andesPair(a,b)||rainPair(a,b)||borderPair(a,b))route+=`<p class="note" style="margin-top:8px">${landWhy(a,b)}</p>`;
route+=`<p class="note" style="margin-top:6px">📈 ${esc(marketNote(a,b,sub))}</p>`;

View file

@ -10,7 +10,7 @@ const nearLanding=c=>CITIES.filter(x=>x.id!==c&&landing(x.id)).sort((x,y)=>kmBet
const ownCabKm=(a,b)=>seaRoutes(a,b)[0]?.km||Infinity;
const ownCabCost=km=>Math.round((2*OWNCAB_LAND+km*OWNCAB_KM+DF_SYS.roadm.cost)*hwMul('build'));
const ownCabMo=km=>Math.round(km*OWNCAB_OM)+ampCount(km)*AMP_MO;
const ownCabDays=km=>Math.round(300+km*0.05);
const ownCabDays=km=>leadDays(Math.round(300+km*0.05));
// Marine routing uses the same coastline as the map, in geographic coordinates.
// A quarter-degree grid keeps narrow passages open; edges are checked against
// coastline segments as well as water cells, so diagonal steps cannot cut land.
@ -179,7 +179,7 @@ function seaQuote(a,b,design='standard',upgrades={}){
const base=routes[0]?.km||Infinity,km=route?.km||Infinity;
// Higher survey and permitting costs dominate any savings from shorter glass.
let cost=Math.round(ownCabCost(Math.max(base,km))*D.cost),days=Math.round(ownCabDays(Math.max(base,km))*D.time);
for(const k of Object.keys(SUB_UPGRADES))if(upgrades[k]){cost+=subUpgradeCost({km},k);days+=SUB_UPGRADES[k].days;}
for(const k of Object.keys(SUB_UPGRADES))if(upgrades[k]){cost+=subUpgradeCost({km},k);days+=leadDays(SUB_UPGRADES[k].days);}
const ms=linkLat({a,b,kind:'df',own:true,sub:true,km,seaDesign:design});
return {km,cost,days,ms,pts:route?.pts,shore:route?.shore,cor:!!cor&&route===cor};
}
@ -190,15 +190,17 @@ const seaCab=(a,b)=>isSub(a,b)||(landing(a)&&landing(b)&&cablesFor(a,b).length>0
// one still being laid returns most of the part not laid yet, a working one is yours for good.
const cabBack=l=>{if(!l||l.kind!=='df'||!l.own||!l.sub)return 0;const c=l.paid>0?l.paid:ownCabCost(l.km);if(!subNeed(l.km))return c;
if(l.ready>S.day){const tot=Math.max(1,l.ready-(l.day||0));return Math.round(c*0.75*Math.min(1,(l.ready-S.day)/tot));}return 0;};
// Your own subsea cable is a Tier 1 privilege, or a sandbox toy (open gates).
const cabOpen=()=>!!S.won||gatesOpen();
function ownCabWhy(a,b){if(!seaCab(a,b))return tr('own_cable.this_route_is_on_land_build');
if(!S.won)return tr('own_cable.laying_your_own_subsea_cable_is');
if(!cabOpen())return tr('own_cable.laying_your_own_subsea_cable_is');
for(const c of [a,b])if(!landing(c))return tr('own_cable.city_has_no_cable_landing_station',{city:CITY[c].name});
if(cnCity(a)||cnCity(b))return tr('own_cable.nobody_gives_a_foreign_network_a');
if(!seaReady(a,b))return tr('own_cable.surveying_a_sea_route');
const routes=seaRoutes(a,b);if(!routes.length)return tr('own_cable.no_navigable_sea_route_connects');
const km=Math.min(...routes.map(r=>r.km));if(!subNeed(km))return tr('own_cable.km_km_is_more_than_any',{km:km.toLocaleString(),max:Math.round(SUB_MAXKM()).toLocaleString()});
return '';}
function ownCabTeaser(a,b){const why=ownCabWhy(a,b);return `<div class="btns" style="margin-top:8px">${btn(S.won?tr('modals.lay_your_own_subsea_cable'):tr('modals.your_own_subsea_cable_tier_1'),'ownCab',{},S.won&&!why?'pink':'ghost',!!why)}</div>${why&&S.won?`<p class="note" ${seaSurveyAttr(a,b)}>${esc(why)}</p>`:''}`;}
function ownCabTeaser(a,b){const why=ownCabWhy(a,b);return `<div class="btns" style="margin-top:8px">${btn(cabOpen()?tr('modals.lay_your_own_subsea_cable'):tr('modals.your_own_subsea_cable_tier_1'),'ownCab',{},cabOpen()&&!why?'pink':'ghost',!!why)}</div>${why&&cabOpen()?`<p class="note" ${seaSurveyAttr(a,b)}>${esc(why)}</p>`:''}`;}
function ownCabBody(a,b,pop){const why=ownCabWhy(a,b);if(why)return `<p class="lead" style="margin-top:10px" ${seaSurveyAttr(a,b)}>${esc(why)}</p>${btn(tr('common.back'),'dfSrc',{v:'lease'},'ghost sm')}`;
const design=own(SEA_DESIGNS,UI.seaDesign)?UI.seaDesign:'standard',upgrades={terminal:!!UI.seaterminal,engineering:!!UI.seaengineering},q=seaQuote(a,b,design,upgrades),{km,cost,days}=q,lack=seaLack(km,upgrades),mo=ownCabMo(km),wt=subMaxTier(km),w=Math.round(waveMo(km,true,wt)*waveMarket(a,b,true).m),save=10*w*LT[4].g/LT[wt].g-mo,pay=save>0?Math.ceil(cost/save):0;
return `<p class="lead" style="margin-top:8px">${tr('own_cable.your_very_own_subsea_cable_a')}</p>

View file

@ -11,7 +11,7 @@ function dfModalBody(a,b,km,pop){
const up=(src==='build'?dfBuildCost(km):0)+DF_SYS[sys].cost+amps*AMP_COST+pop,mo=(src==='build'?Math.round(km*0.15):dfLeaseMo(km))+amps*AMP_MO;
const w=Math.round(waveMo(km,false,4));
return `<p class="lead" style="margin-top:8px">${tr('fiber_modals.a_fiber_pair_of_your_own',{km:AMP_EVERY})}</p>
<h4 class="sub4">${tr('common.the_glass')}</h4><div class="seg">${btn(tr('fiber_modals.lease_an_iru_price_mo_ready',{price:fmt$(dfLeaseMo(km))}),'dfSrc',{v:'lease'},src==='lease'?'pink':'ghost')}${sc?btn(S.won?tr('modals.lay_your_own_subsea_cable'):tr('modals.your_own_subsea_cable_tier_1'),'ownCab',{},'ghost',!!ownCabWhy(a,b)):btn(lvl()>=3?tr('fiber_modals.build_your_own_price_n_days',{price:fmt$(dfBuildCost(km)),n:dfBuildDays(km)}):tr('fiber_modals.build_your_own_level_3'),'dfSrc',{v:'build'},src==='build'?'pink':'ghost',lvl()<3)}${sea?btn(S.won?tr('modals.lay_your_own_subsea_cable'):tr('modals.your_own_subsea_cable_tier_1'),'ownCab',{},'ghost',!!ownCabWhy(a,b)):''}</div>${sc?`<p class="note">${tr('fiber_modals.a_fiber_pair_on_cable_km',{cable:esc(CAB[sc.cid].name),km:sc.km.toLocaleString()})}</p>`:''}
<h4 class="sub4">${tr('common.the_glass')}</h4><div class="seg">${btn(tr('fiber_modals.lease_an_iru_price_mo_ready_n',{price:fmt$(dfLeaseMo(km)),n:leadDays(IRU_DAYS)}),'dfSrc',{v:'lease'},src==='lease'?'pink':'ghost')}${sc?btn(cabOpen()?tr('modals.lay_your_own_subsea_cable'):tr('modals.your_own_subsea_cable_tier_1'),'ownCab',{},'ghost',!!ownCabWhy(a,b)):btn(lvl()>=3?tr('fiber_modals.build_your_own_price_n_days',{price:fmt$(dfBuildCost(km)),n:dfBuildDays(km)}):tr('fiber_modals.build_your_own_level_3'),'dfSrc',{v:'build'},src==='build'?'pink':'ghost',lvl()<3)}${sea?btn(cabOpen()?tr('modals.lay_your_own_subsea_cable'):tr('modals.your_own_subsea_cable_tier_1'),'ownCab',{},'ghost',!!ownCabWhy(a,b)):''}</div>${sc?`<p class="note">${tr('fiber_modals.a_fiber_pair_on_cable_km',{cable:esc(CAB[sc.cid].name),km:sc.km.toLocaleString()})}</p>`:''}
${src==='build'?`<p class="note">${tr('fiber_modals.your_own_trench_almost_no_rent')}</p>`:''}
<h4 class="sub4">${tr('common.line_system')}</h4><div class="seg">${Object.keys(DF_SYS).map(k=>btn(`${DF_SYS[k].n} <small>${DF_SYS[k].lvl>lvl()?tr('fiber_modals.level_n',{n:DF_SYS[k].lvl}):fmt$(DF_SYS[k].cost)}</small>`,'dfSys',{v:k},sys===k?'pink':'ghost',DF_SYS[k].lvl>lvl())).join('')}</div>
<p class="note">${esc(DF_SYS[sys].blurb)} ${trn('fiber_modals.plus_n_in_line_amplifier_price',amps,{price:fmt$(AMP_COST),mo:fmt$(AMP_MO)})}</p>${km>reachOn(OPT.tp16.reach,!!sc)?`<p class="note">${tr('fiber_modals.km_km_is_longer_than_any',{km:km.toLocaleString()})}</p>`:''}