/* Original conceptual teaching scenes. No operational or engineering model. */ (function () { 'use strict'; window.industryRenderers ??= {}; const C={bg:'#101d30',panel:'#182b42',line:'#667c95',ink:'#edf5ff',muted:'#aec1d7',cyan:'#57d4ed',green:'#85e0ad',amber:'#ffd178',red:'#ff8c8c'}; function scene(svg,config,kit,title,subtitle,phases,note){ const {anime,el}=kit, duration=Math.max(3000,Number(config.duration)||6000), unit=duration/6; const tl=anime.createTimeline({autoplay:false,defaults:{ease:'linear'}}); const E=(tag,a={},text='',p=svg)=>el(tag,a,text,p); const rect=(x,y,w,h,fill=C.panel,p=svg,extra={})=>E('rect',{x,y,width:w,height:h,rx:8,fill,...extra},'',p); const text=(x,y,t,size=18,fill=C.ink,p=svg,extra={})=>E('text',{x,y,fill,'font-size':size,'font-family':'system-ui, sans-serif',style:`fill:${fill};font-size:${size}px;font-family:system-ui,sans-serif`,...extra},t,p); const path=(d,color=C.line,width=3,p=svg,extra={})=>E('path',{d,fill:'none',stroke:color,'stroke-width':width,'stroke-linecap':'round','stroke-linejoin':'round',...extra},'',p); const circle=(cx,cy,r,fill=C.cyan,p=svg,extra={})=>E('circle',{cx,cy,r,fill,...extra},'',p); const group=()=>E('g'); const add=(target,props,at=0,len=.75)=>tl.add(target,{...props,duration:unit*len},unit*at); const reveal=(target,at)=>{target.setAttribute('opacity','0.12');add(target,{opacity:[.12,1]},at);return target;}; const draw=(d,at,color=C.cyan,width=4)=>{const p=path(d,color,width);p.setAttribute('pathLength','1');p.setAttribute('stroke-dasharray','1');p.setAttribute('stroke-dashoffset','1');add(p,{'stroke-dashoffset':[1,0]},at);return p;}; rect(0,0,960,540,C.bg,svg,{rx:0}); text(32,39,title,26);text(32,69,subtitle,17,C.muted); path('M32 88 H928',C.line,1); phases.forEach((label,i)=>{const x=32+i*181;rect(x,440,172,44);const bar=rect(x,440,172,4,C.cyan,svg,{rx:0});add(bar,{opacity:[.15,1]},i,.65);text(x+10,469,`${i+1} ${label}`,16);}); text(32,516,note,16,C.muted); const clock=E('g',{'data-clock':'finite'});add(clock,{opacity:[1,1]},0,6); return {svg,config,tl,E,rect,text,path,circle,group,add,reveal,draw,C}; } window.industryRenderers["telecom-congestion-reroute"] = function(svg, config, kit) { const s=scene(svg,config,kit,'NETWORK / ROUTE AROUND A QUEUE','The destination stays fixed while forwarding shifts to an alternate transit path.', ['Forward','Queue','Detect','Reroute','Deliver'],'Conceptual topology • amber = congested segment • cyan = initial route • green = alternate'); const {rect,text,path,circle,group,add,reveal,draw,C}=s; const router=(x,y,name)=>{circle(x,y,29,'#25435e',svg,{stroke:C.line,'stroke-width':2});path(`M${x-15} ${y} H${x+15} M${x} ${y-15} V${y+15} M${x+9} ${y-5} L${x+15} ${y} L${x+9} ${y+5} M${x-5} ${y-9} L${x} ${y-15} L${x+5} ${y-9}`,C.muted,2);text(x-29,y+54,name,16);}; // Client, a routed diamond and a destination rack. rect(39,217,100,68,'#2b465f');rect(48,226,82,46,'#122237');path('M89 286 V302 M65 303 H114',C.muted,4);text(39,328,'Source',17); path('M140 251 H240 M270 222 L440 151 M499 151 L672 222 M270 280 L440 351 M499 351 L672 280 M701 251 H806',C.line,3); router(240,251,'Edge A');router(470,141,'Transit B');router(470,361,'Transit C');router(701,251,'Edge D'); rect(814,191,104,134,'#283e53');[205,241,277].forEach(y=>{rect(825,y,82,27,'#101e30');circle(895,y+13,4,C.green);});text(812,355,'Destination',17); const originalRoute=draw('M140 251 H210 M264 235 L443 153 M498 153 L674 235',0);add(originalRoute,{opacity:[1,.2]},3,1); const p=circle(156,251,7,C.cyan);add(p,{cx:[156,232]},0,.7); // Queue slots explicitly expose finite waiting capacity (no implied rates). const queued=Math.min(4,Math.max(1,Math.round(Number(config.queuePackets)||4))); text(547,115,'Transit queue',17);[0,1,2,3].forEach(i=>{rect(552+i*28,133,22,20,'#263a4e');if(i