PageSourceSearch

https://openelectricity.org.au/_app/immutable/nodes/40.CBXdiF5L.js

js openelectricity.org.au collected 2026-10-02 04:11:07 UTC 7,303 bytes, 3 lines download raw bytes

1import"../chunks/DsnmJJEf.js";import{p as ze,m as J,aJ as ce,d as pe,t as p,h as t,a as n,e as Ge,s as i,l as f,f as c,c as s,r as a,i as Je,u as ve}from"../chunks/CrZWGQw6.js";import{d as Ke,s as l,a as We}from"../chunks/Cf9b1Pg_.js";import{i as K}from"../chunks/Dm50tvsH.js";import{e as y,i as me}from"../chunks/DvQYBH6E.js";import{e as qe,r as ue,a as W,s as q}from"../chunks/CfLjgYS-.js";import{b as _e}from"../chunks/CElzeSkq.js";import"../chunks/Ciqn2WuZ.js";import{M as Qe}from"../chunks/DrsoFkGA.js";import{g as Ve}from"../chunks/CJs61MB3.js";import{f as Xe}from"../chunks/DpT7U2b2.js";import{S as Ye,g as ge,D as be}from"../chunks/BSMHJVw3.js";var Ze=c("<option> </option>"),et=c('<span class="rounded-full bg-light-warm-grey px-3 py-1 text-mid-grey">Showing production values</span>'),tt=c('<span class="rounded-full bg-amber-100 px-3 py-1 text-amber-800">Adjusted — production shown underneath for comparison</span> <button type="button" class="cursor-pointer rounded-full border border-mid-warm-grey/60 px-3 py-1 text-dark-grey transition-colors hover:bg-light-warm-grey"> </button>',1),at=c('<th class="px-4 py-3 font-medium"> </th>'),rt=c(`<span class="mt-1 inline-block rounded-full bg-light-warm-grey px-2 py-0.5 text-xxs text-mid-grey" title="Sliders don't apply to this fuel tech — it uses its own spread"> </span>`),st=c('<div class="h-10 flex-1"></div>'),ot=c('<div class="h-3 flex-1"></div>'),it=c('<div class="mt-1 flex overflow-hidden rounded border border-black/10 opacity-90" title="Production"></div>'),dt=c('<td class="px-4 py-3 align-middle"><div class="flex overflow-hidden rounded border border-black/10"></div> <!></td>'),lt=c('<tr><td class="px-4 py-3 align-middle"><div class="font-medium text-dark-grey"> </div> <div class="font-mono text-xs text-mid-grey"> </div> <!></td><td class="px-4 py-3 align-middle"><div class="h-10 w-14 rounded border border-black/10"></div> <div class="mt-1 font-mono text-xs text-mid-grey"> </div></td><!></tr>'),nt=c(`<!> <div class="min-h-screen bg-light-warm-grey"><header class="sticky top-0 z-10 flex flex-wrap items-center gap-x-8 gap-y-3 border-b border-mid-warm-grey/40 bg-white px-6 py-4"><div><h1 class="m-0 text-lg font-semibold text-dark-grey">Fuel Tech Shades</h1> <p class="m-0 text-xs text-mid-grey">How <code>generateUnitShades</code> splits a fuel tech colour across same-tech units</p></div> <div class="flex flex-wrap items-center gap-x-6 gap-y-2 text-xs text-dark-grey"><label class="flex items-center gap-2"><span class="w-14">Darken</span> <input type="range" min="0" max="3" step="0.1" class="w-36"/> <span class="w-8 font-mono"> </span></label> <label class="flex items-center gap-2"><span class="w-14">Brighten</span> <input type="range" min="0" max="3" step="0.1" class="w-36"/> <span class="w-8 font-mono"> </span></label> <label class="flex items-center gap-2"><span>Mode</span> <select class="rounded border border-mid-warm-grey/60 px-2 py-1"></select></label></div> <div class="ml-auto flex items-center gap-3 text-xs"><!></div></header> <main class="mx-auto max-w-7xl px-6 py-8"><div class="overflow-x-auto rounded-lg border border-mid-warm-grey/40 bg-white"><table class="w-full border-collapse text-sm"><thead><tr class="border-b border-mid-warm-grey/40 text-left text-xs text-mid-grey"><th class="px-4 py-3 font-medium">Fuel tech</th><th class="px-4 py-3 font-medium">Base</th><!></tr></thead><tbody class="divide-y divide-mid-warm-grey/40"></tbody></table></div> <p class="mt-4 text-xs text-mid-grey">The split takes the base colour, builds a dark endpoint with <code> </code> and a light endpoint with <code> </code>, then samples <code> </code>-interpolated steps between them — unit 1 is darkest, the last unit is
2			lightest. Fuel techs badged <em>override</em> use their own spread in production (<code>SHADE_SPREADS</code>) — e.g. coal_black is near-black, so it anchors at the base and spreads upward only; the
3			thin strip under their preview always shows the production output. Production formula: <code>generateUnitShades</code> in <code>src/lib/components/charts/facility/helpers.js</code>.</p></main></div>`,1);function wt(he,xe){ze(xe,!0);const S=be.darken,D=be.brighten,T="lab",fe=["coal_black","coal_brown","gas_steam","gas_ccgt","gas_ccgt_ccs","gas_ocgt","gas_recip","gas_wcmg","distillate","bioenergy_biogas","bioenergy_biomass","hydro","pumps","wind","wind_offshore","solar_utility","solar_rooftop","solar_thermal","battery","battery_charging","battery_discharging","nuclear"],$=[2,3,4,5,6,8],ye=["lab","lch","rgb","hsl"];let v=J(ce(S)),m=J(ce(D)),_=J(T),Q=ve(()=>t(v)===S&&t(m)===D&&t(_)===T);function we(){f(v,S,!0),f(m,D,!0),f(_,T)}const ke=fe.map(e=>{const r=Ve(e),o=Ye[e];return{code:e,label:Xe[e]||e,base:r,override:o,production:$.map(d=>ge(r,d,o))}});let Se=ve(()=>ke.map(e=>({...e,splits:$.map((r,o)=>({count:r,preview:ge(e.base,r,{darken:t(v),brighten:t(m)},t(_)),production:e.production[o]}))})));var V=nt(),X=pe(V);Qe(X,{title:"Fuel Tech Shades",description:"Preview the fuel tech primary colours and the unit shade splits used on facility charts.",image:"/img/preview.jpg"});var Y=i(X,2),E=s(Y),P=i(s(E),2),A=s(P),F=i(s(A),2);ue(F);var Z=i(F,2),De=s(Z,!0);a(Z),a(A);var R=i(A,2),O=i(s(R),2);ue(O);var ee=i(O,2),Te=s(ee,!0);a(ee),a(R);var te=i(R,2),U=i(s(te),2);y(U,20,()=>ye,e=>e,(e,r)=>{var o=Ze(),d=s(o,!0);a(o);var g={};p(()=>
3{l(d,r),g!==(g=r)&&(o.value=(o.__value=r)??"")}),n(e,o)}),a(U),a(te),a(P);var ae=i(P,2),$e=s(ae);{var Ee=e=>{var r=et();n(e,r)},Pe=e=>{var r=tt(),o=i(pe(r),2),d=s(o);a(o),p(()=>l(d,`Reset to production (${S??""} / ${D??""} / lab)`)),We("click",o,we),n(e,r)};K($e,e=>{t(Q)?e(Ee):e(Pe,-1)})}a(ae),a(E);var re=i(E,2),N=s(re),se=s(N),H=s(se),oe=s(H),Ae=i(s(oe),2);y(Ae,16,()=>$,e=>e,(e,r)=>{var o=at(),d=s(o);a(o),p(()=>l(d,`${r??""} units`)),n(e,o)}),a(oe),a(H);var ie=i(H);y(ie,21,()=>t(Se),e=>e.code,(e,r)=>{var o=lt(),d=s(o),g=s(d),Ue=s(g,!0);a(g);var C=i(g,2),Ne=s(C,!0);a(C);var He=i(C,2);{var Ie=u=>{var b=rt(),w=s(b);a(b),p(()=>l(w,`override ${t(r).override.darken??""} / ${t(r).override.brighten??""}`)),n(u,b)};K(He,u=>{t(r).override&&u(Ie)})}a(d);var L=i(d),j=s(L),ne=i(j,2),Me=s(ne,!0);a(ne),a(L);var Ce=i(L);y(Ce,17,()=>t(r).splits,u=>u.count,(u,b)=>{var w=dt(),B=s(w);y(B,21,()=>t(b).preview,me,(k,h,z)=>{var x=st();p(()=>{W(x,`background-color: ${t(h)??""}; min-width: 14px;`),q(x,"title",`Unit ${z+1} · ${t(h)??""}`)}),n(k,x)}),a(B);var Le=i(B,2);{var je=k=>{var h=it();y(h,21,()=>t(b).production,me,(z,x,Be)=>{var G=ot();p(()=>{W(G,`background-color: ${t(x)??""}; min-width: 14px;`),q(G,"title",`Production unit ${Be+1} · ${t(x)??""}`)}),n(z,G)}),a(h),n(k,h)};K(Le,k=>{(!t(Q)||t(r).override)&&k(je)})}a(w),n(u,w)}),a(o),p(()=>{l(Ue,t(r).label),l(Ne,t(r).code),W(j,`background-color: ${t(r).base??""};`),q(j,"title",`${t(r).code??""} · ${t(r).base??""}`),l(Me,t(r).base)}),n(e,o)}),a(ie),a(se),a(N);var de=i(N,2),I=i(s(de)),Fe=s(I);a(I);var M=i(I,2),Re=s(M);a(M);var le=i(M,2),Oe=s(le,!0);a(le),Je(9),a(de),a(re),a(Y),p((e,r,o,d)=>{l(De,e),l(Te,r),l(Fe,`darken(${o??""})`),l(Re,`brighten(${d??""})`),l(Oe,t(_))},[()=>t(v).toFixed(1),()=>t(m).toFixed(1),()=>t(v).toFixed(1),()=>t(m).toFixed(1)]),_e(F,()=>t(v),e=>f(v,e)),_e(O,()=>t(m),e=>f(m,e)),qe(U,()=>t(_),e=>f(_,e)),n(he,V),Ge()}Ke(["click"]);export{wt as component};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.