const COND_BASE="assets/conduction",COND={ghostWall:9347764,ghostVessel:10792890,opWall:.15,opVessel:.07,opPap:.22,opValve:.1,warm:[.95,.56,.2],front:[1,.86,.46],tube:7031314,hot:[1,.97,.72],pulseSigma:.018,afterGain:.7,afterTau:.15,hotGlow:.6,hv:.045,minAV:.02,bandA:.01,bandV:.008};function condClock(e,n,a){const c=n.rr,u=x=>(x%1+1)%1,h=u(e-n.pOn)*c,g=(n.pOff-n.pOn)*c,i=n.pr,m=n.qrs,p=a?a.times_ms.av_arrival/a.times_ms.atrial_max*g:.39*g;let d=COND.hv;i-p-d<COND.minAV&&(d=Math.max(.01,i-p-COND.minAV));const s=u(n.tOn-n.pOn)*c,w=u(n.tOff-n.pOn)*c;return{e:h,rr:c,pDur:g,PR:i,QRS:m,avArr:p,HV:d,eHis:i-d,ePR:i,eQend:i+m,eTon:s,eToff:w}}const COND_EVENTS=[["sa","\u7AA6\u623F\u7ED3\u53D1\u653E","SA node fires","\u8D77\u640F\u7EC6\u80DE\u81EA\u53D1\u53BB\u6781\u5316\u5230\u9608\u503C\uFF0C\u51B2\u52A8\u4ECE\u4E0A\u8154\u9759\u8109\u53E3\u65C1\u7684\u7AA6\u623F\u7ED3\u53D1\u51FA \u2014\u2014 \u5B83\u662F\u5168\u5FC3\u6700\u5FEB\u7684\u81EA\u5F8B\u70B9\uFF0C\u6240\u4EE5\u7531\u5B83\u5B9A\u5FC3\u7387\u3002","Pacemaker cells drift up to threshold on their own and fire; the SA node, beside the SVC, is the fastest pacemaker, so it sets the heart rate.","SA_NODE"],["atria","\u5FC3\u623F\u53BB\u6781\u5316\uFF08P \u6CE2\uFF09","Atrial depolarisation (P wave)","\u6FC0\u52A8\u4ECE\u53F3\u623F\u6269\u6563\u5230\u5DE6\u623F\uFF08\u7ECF\u623F\u95F4\u9694\u524D\u4E0A\u65B9\u7684 Bachmann \u675F\uFF09\uFF0C\u5FC3\u7535\u56FE\u4E0A\u753B\u51FA P \u6CE2\uFF1B\u7D27\u63A5\u7740\u5FC3\u623F\u6536\u7F29\uFF08\u7B2C 1 \u65F6\u76F8\uFF09\u3002","The impulse spreads across the right atrium and on to the left (via Bachmann's bundle), drawing the P wave; atrial systole follows (phase 1).","SA_NODE"],["av","\u623F\u5BA4\u7ED3\u5EF6\u6401\uFF08PR \u6BB5\uFF09","AV-nodal delay (PR segment)","\u7EA4\u7EF4\u9AA8\u67B6\u628A\u5FC3\u623F\u4E0E\u5FC3\u5BA4\u7EDD\u7F18\uFF0C\u623F\u5BA4\u7ED3\u662F\u552F\u4E00\u901A\u8DEF\uFF1B\u51B2\u52A8\u5728\u8FD9\u91CC\u6162\u4E0B\u6765\u7EA6 0.1 s\uFF0C\u8BA9\u5FC3\u623F\u5148\u628A\u6700\u540E\u4E00\u90E8\u5206\u8840\u6324\u8FDB\u5FC3\u5BA4\u3002","The fibrous skeleton insulates atria from ventricles; the AV node is the only way through. Conduction slows here for about 0.1 s so the atria can top up the ventricles.","AV_NODE"],["hp","\u5E0C\u6C0F\u675F \u2192 \u675F\u652F \u2192 \u6D66\u80AF\u91CE","His bundle \u2192 bundle branches \u2192 Purkinje","\u5168\u5FC3\u4F20\u5F97\u6700\u5FEB\u7684\u4E00\u6BB5\uFF082\u20134 m/s\uFF09\uFF1A\u6CBF\u5BA4\u95F4\u9694\u4E24\u4FA7\u7684\u5DE6\u3001\u53F3\u675F\u652F\u51B2\u5411\u5FC3\u5C16\uFF0C\u518D\u7ECF\u6D66\u80AF\u91CE\u7F51\u94FA\u6EE1\u5FC3\u5185\u819C\u3002\u5FC3\u7535\u56FE\u4E0A\u770B\u4E0D\u5230\uFF0C\u85CF\u5728 PR \u6BB5\u672B\u5C3E\u3002","The fastest pathway in the heart (2\u20134 m/s): down the left and right bundle branches on either side of the septum, then out through the Purkinje network. Invisible on the ECG, hidden at the end of the PR segment.","HIS"],["qrs","\u5FC3\u5BA4\u53BB\u6781\u5316\uFF08QRS \u6CE2\uFF09","Ventricular depolarisation (QRS)","\u4ECE\u5BA4\u95F4\u9694\u5DE6\u5BA4\u9762\u5F00\u59CB\uFF08\u6240\u4EE5\u95F4\u9694\u5148\u7531\u5DE6\u5411\u53F3\u6FC0\u52A8\uFF09\uFF0C\u5FC3\u5C16\u3001\u6E38\u79BB\u58C1\u968F\u540E\uFF0C\u5DE6\u5BA4\u540E\u57FA\u5E95\u90E8\u6700\u540E\uFF1B\u968F\u540E\u8FDB\u5165\u7B49\u5BB9\u6536\u7F29\uFF08\u7B2C 2 \u65F6\u76F8\uFF09\u3002","Starts on the left side of the septum (so the septum activates left to right), then the apex and free walls, the posterobasal LV last; isovolumic contraction follows (phase 2).","PURKINJE"],["st","\u5E73\u53F0\u671F\uFF08ST \u6BB5\uFF09","Plateau (ST segment)","\u5FC3\u5BA4\u808C\u5168\u90E8\u5904\u4E8E\u53BB\u6781\u5316\u72B6\u6001\uFF0C\u9499\u5185\u6D41\u7EF4\u6301\u6536\u7F29\uFF0C\u6B63\u5728\u5C04\u8840\uFF08\u7B2C 3 \u65F6\u76F8\uFF09\u3002","All of the ventricular muscle is depolarised; calcium influx sustains contraction during ejection (phase 3).",null],["twave","\u5FC3\u5BA4\u590D\u6781\uFF08T \u6CE2\uFF09","Ventricular repolarisation (T wave)","\u540E\u6FC0\u52A8\u7684\u5FC3\u5916\u819C\u5148\u590D\u6781\u3001\u5148\u6FC0\u52A8\u7684\u5FC3\u5185\u819C\u540E\u590D\u6781\uFF0C\u6240\u4EE5 T \u6CE2\u4E0E QRS \u540C\u5411\uFF1BT \u6CE2\u672B\u5C3E\u4E3B\u52A8\u8109\u74E3\u5173\u95ED\uFF08S2\uFF09\u3002","The epicardium, activated last, recovers first, so the T wave points the same way as the QRS; the aortic valve shuts at its end (S2).",null],["rest","\u7535\u9759\u606F\uFF08\u8212\u5F20\u671F\uFF09","Electrical rest (diastole)","\u5FC3\u5BA4\u5728\u5145\u76C8\uFF1B\u7AA6\u623F\u7ED3\u7684\u8D77\u640F\u7535\u6D41\u6B63\u5728\u6162\u6162\u628A\u819C\u7535\u4F4D\u63A8\u5411\u4E0B\u4E00\u6B21\u53D1\u653E\u3002","The ventricles are filling; the SA node's pacemaker current is slowly pushing towards the next discharge.","SA_NODE"]];function condEventAt(e){const n=e.e;return n<.02?"sa":n<e.pDur?"atria":n<e.eHis?"av":n<e.ePR?"hp":n<e.eQend?"qrs":n<e.eTon?"st":n<e.eToff?"twave":"rest"}function condUniforms(e){const n=e?window.TSL:null,a=c=>e?n.uniform(c):{value:c};return{actLo:a(new THREE.Vector3),actSize:a(new THREE.Vector3(1,1,1)),uA:a(-1),uFa:a(0),uV:a(-1),uR:a(0),uBandA:a(.1),uBandV:a(.1),eNow:a(-1),pDur:a(.09),aMax:a(1),eHis:a(.11),HV:a(.045),vMin:a(1),vMax:a(2),ePR:a(.15),QRS:a(.08)}}const COND_GHOST_FRAG=`
  {
    vec2 act = texture(actTex, (vCondP - actLo) / actSize).rg;
    float a = uChan < 0.5 ? act.r : act.g;
    float u = uChan < 0.5 ? uA : uV;
    float band = uChan < 0.5 ? uBandA : uBandV;
    float rep = uChan < 0.5 ? uFa : smoothstep(1.0 - a - 0.04, 1.0 - a, uR);
    float keep = (1.0 - rep) * step(0.0, uChan + 0.5) * step(uChan, 1.5);
    float dep = step(a, u);
    float fr = exp(-pow((u - a) / band, 2.0));
    float k = max(fr, 0.55 * dep) * keep;
    gl_FragColor.rgb = mix(gl_FragColor.rgb, uWarm, 0.85 * k) + uFront * (0.35 * fr * keep);
    gl_FragColor.a = mix(gl_FragColor.a, 0.5, k);
  }`,COND_TUBE_FRAG=`
  {
    float x = vCond.x, seg = vCond.y;
    float tr = seg < 1.5 ? x / aMax * pDur : (x < vMin ? eHis + x * (HV / vMin) : ePR + (x - vMin) * (QRS / max(1.0, vMax - vMin)));
    float d = eNow - tr;
    float k = max(exp(-pow(d / uPulse.x, 2.0)), d > 0.0 ? uPulse.y * exp(-d / uPulse.z) : 0.0);
    if (seg > 0.5 && seg < 1.5){
      float charge = clamp(d / max(0.001, eHis - tr), 0.0, 1.0);
      k = eNow < eHis ? step(0.0, d) * (0.3 + 0.65 * charge) : exp(-(eNow - eHis) / 0.03);
    }
    gl_FragColor.rgb = mix(gl_FragColor.rgb, uHot, k) + uHot * (uPulse.w * k);
  }`;function ghostMaterialGL(e,n,a){const c=new THREE.MeshStandardMaterial({color:a.color,roughness:.55,metalness:0,transparent:!0,opacity:a.opacity,depthWrite:!1,side:a.side||THREE.FrontSide}),u={uChan:{value:a.chan},actTex:{value:e},uWarm:{value:new THREE.Vector3(...COND.warm)},uFront:{value:new THREE.Vector3(...COND.front)}};return c.onBeforeCompile=h=>{Object.assign(h.uniforms,n,u),h.vertexShader=h.vertexShader.replace("#include <common>",`#include <common>
varying vec3 vCondP;`).replace("#include <begin_vertex>",`#include <begin_vertex>
  vCondP = position;`),h.fragmentShader=h.fragmentShader.replace("#include <common>",`#include <common>
      uniform highp sampler3D actTex;
      uniform vec3 actLo, actSize, uWarm, uFront;
      uniform float uChan, uA, uFa, uV, uR, uBandA, uBandV;
      varying vec3 vCondP;`).replace("#include <dithering_fragment>","#include <dithering_fragment>"+COND_GHOST_FRAG)},c.customProgramCacheKey=()=>"cond-ghost",c.userData.cond=!0,c}function tubeMaterialGL(e){const n=new THREE.MeshStandardMaterial({color:COND.tube,roughness:.42,metalness:0}),a={uHot:{value:new THREE.Vector3(...COND.hot)},uPulse:{value:new THREE.Vector4(COND.pulseSigma,COND.afterGain,COND.afterTau,COND.hotGlow)}};return n.onBeforeCompile=c=>{Object.assign(c.uniforms,e,a),c.vertexShader=c.vertexShader.replace("#include <common>",`#include <common>
attribute vec2 aCond;
varying vec2 vCond;`).replace("#include <begin_vertex>",`#include <begin_vertex>
  vCond = aCond;`),c.fragmentShader=c.fragmentShader.replace("#include <common>",`#include <common>
      uniform vec3 uHot;
      uniform vec4 uPulse;
      uniform float eNow, pDur, aMax, eHis, HV, vMin, vMax, ePR, QRS;
      varying vec2 vCond;`).replace("#include <dithering_fragment>","#include <dithering_fragment>"+COND_TUBE_FRAG)},n.customProgramCacheKey=()=>"cond-tube",n.userData.cond=!0,n}function ghostMaterialTSL(e,n,a){const c=window.TSL,{float:u,vec3:h,max:g,mix:i,exp:m,step:p,smoothstep:d}=c,s=new THREE.MeshStandardNodeMaterial({color:a.color,roughness:.55,metalness:0,transparent:!0,opacity:a.opacity,depthWrite:!1,side:a.side||THREE.FrontSide}),w=c.materialColor,x=u(a.opacity);if(a.chan<0||a.chan>1)return s.userData.cond=!0,s;const R=c.texture3D(e,c.positionGeometry.sub(n.actLo).div(n.actSize)),l=a.chan===0?R.r:R.g,v=a.chan===0?n.uA:n.uV,T=a.chan===0?n.uBandA:n.uBandV,o=(a.chan===0?n.uFa:d(l.oneMinus().sub(.04),l.oneMinus(),n.uR)).oneMinus(),r=m(v.sub(l).div(T).pow(2).negate()),t=g(r,p(l,v).mul(.55)).mul(o);return s.colorNode=i(w.rgb,h(...COND.warm),t.mul(.85)).add(h(...COND.front).mul(r.mul(o).mul(.35))),s.opacityNode=i(x,u(.5),t),s.userData.cond=!0,s}function tubeMaterialTSL(e){const n=window.TSL,{float:a,vec3:c,max:u,mix:h,exp:g,clamp:i,select:m}=n,p=new THREE.MeshStandardNodeMaterial({color:COND.tube,roughness:.42,metalness:0}),d=n.attribute("aCond","vec2"),s=d.x,w=d.y,x=m(s.lessThan(e.vMin),e.eHis.add(s.mul(e.HV.div(e.vMin))),e.ePR.add(s.sub(e.vMin).mul(e.QRS.div(u(a(1),e.vMax.sub(e.vMin)))))),R=m(w.lessThan(1.5),s.div(e.aMax).mul(e.pDur),x),l=e.eNow.sub(R),v=u(g(l.div(COND.pulseSigma).pow(2).negate()),m(l.greaterThan(0),g(l.div(COND.afterTau).negate()).mul(COND.afterGain),a(0))),T=i(l.div(u(a(.001),e.eHis.sub(R))),0,1),f=m(e.eNow.lessThan(e.eHis),m(l.greaterThan(0),T.mul(.65).add(.3),a(0)),g(e.eNow.sub(e.eHis).div(.03).negate())),o=m(w.greaterThan(.5).and(w.lessThan(1.5)),f,v),r=c(...COND.hot);return p.colorNode=h(n.materialColor.rgb,r,o),p.emissiveNode=r.mul(o.mul(COND.hotGlow)),p.userData.cond=!0,p}async function loadConduction(e,n,a=COND_BASE){const c=!!(window.GFX&&window.GFX.tsl),u=await(await fetch(`${a}/manifest.json`)).json(),[h,g]=await Promise.all([new Promise((o,r)=>new GLTFLoader().load(`${a}/${u.mesh}`,o,t=>{n&&t.total&&n(t.loaded/t.total)},r)),fetch(`${a}/${u.act}`).then(o=>{if(!o.ok)throw new Error(`act.bin ${o.status}`);return o.arrayBuffer()})]),[i,m,p]=u.grid.dims,d=new THREE.Data3DTexture(new Uint8Array(g),i,m,p);d.format=THREE.RGFormat,d.type=THREE.UnsignedByteType,d.minFilter=d.magFilter=THREE.LinearFilter,d.wrapS=d.wrapT=d.wrapR=THREE.ClampToEdgeWrapping,d.unpackAlignment=1,d.needsUpdate=!0;const s=condUniforms(c);s.actLo.value.set(...u.grid.lo),s.actSize.value.set(i*u.grid.h,m*u.grid.h,p*u.grid.h),s.aMax.value=u.times_ms.atrial_max,s.vMin.value=u.times_ms.vent_min,s.vMax.value=u.times_ms.vent_max;const w=o=>c?ghostMaterialTSL(d,s,o):ghostMaterialGL(d,s,o),x={atrial:w({color:COND.ghostWall,opacity:COND.opWall,chan:0}),vent:w({color:COND.ghostWall,opacity:COND.opWall,chan:1}),pap:w({color:COND.ghostWall,opacity:COND.opPap,chan:1}),vessel:w({color:COND.ghostVessel,opacity:COND.opVessel,chan:-1}),valve:w({color:COND.ghostVessel,opacity:COND.opValve,chan:-1,side:THREE.DoubleSide})},R=c?tubeMaterialTSL(s):tubeMaterialGL(s),l=new THREE.Group;l.name="conduction",l.visible=!1;const v=[];h.scene.traverse(o=>{o.isMesh&&v.push(o)});for(const o of v){const r=o.userData&&o.userData.anatomy;o.userData={anatomy:r&&typeof ANATOMY<"u"&&ANATOMY[r]?r:null,condMesh:!0};const t=o.geometry.getAttribute("uv"),S=new Float32Array(t.count*2);for(let b=0;b<t.count;b++)S[2*b]=t.getX(b),S[2*b+1]=1-t.getY(b);o.geometry.setAttribute("aCond",new THREE.BufferAttribute(S,2)),o.material=R,o.castShadow=o.receiveShadow=!1,l.add(o)}(e.userData.clipGroup||e).add(l);const T=()=>{const o=e.userData.parts,r=[];for(const[t,S]of Object.entries(o.chambers.userData.walls))r.push([S,t==="LA"||t==="RA"?"atrial":"vent"]);for(const t of o.papillary.children)t.isMesh&&r.push([t,"pap"]);for(const t of o.vessels.children)t.isMesh&&!t.name.endsWith("_blood")&&r.push([t,"vessel"]);return o.valves.traverse(t=>{t.isMesh&&!t.userData.stencilWriter&&r.push([t,"valve"])}),r},f=new THREE.Vector3;return{man:u,group:l,meshes:v,uniforms:s,setActive(o){for(const[r,t]of T())o?(r.userData.condOrig||(r.userData.condOrig=r.material,r.userData.condShadow=r.castShadow),r.material=x[t],r.castShadow=!1):r.userData.condOrig&&(r.material=r.userData.condOrig,r.castShadow=r.userData.condShadow,delete r.userData.condOrig,delete r.userData.condShadow);l.visible=o},update(o,r){const t=condClock(o,r,u);return s.eNow.value=t.e,s.pDur.value=t.pDur,s.eHis.value=t.eHis,s.HV.value=t.HV,s.ePR.value=t.ePR,s.QRS.value=t.QRS,s.uA.value=t.e/t.pDur,s.uFa.value=Math.min(1,Math.max(0,(t.e-t.ePR)/t.QRS)),s.uV.value=(t.e-t.ePR)/t.QRS,s.uR.value=Math.min(1,Math.max(0,(t.e-t.eTon)/Math.max(.001,t.eToff-t.eTon))),s.uBandA.value=COND.bandA/t.pDur,s.uBandV.value=COND.bandV/t.QRS,{clock:t,event:condEventAt(t)}},pick(o,r,t,S){const b=o.intersectObjects(v,!1)[0];if(b)return b.object.userData.anatomy;if(!S)return null;const y=o.ray,D=Math.tan(THREE.MathUtils.degToRad(r.fov)/2);let E=null,P=14;for(const C of v){const H=C.geometry.attributes.position.count;for(let M=0;M<H;M+=3){C.getVertexPosition(M,f),C.localToWorld(f);const A=f.clone().sub(y.origin).dot(y.direction);if(A<=0)continue;const V=y.distanceToPoint(f)/(2*A*D/t);V<P&&(P=V,E=C)}}return E?E.userData.anatomy:null}}}const COND_SEG={sa:["#b8452f","\u7AA6","SA"],atria:["#d9893a","\u5FC3\u623F","Atria"],av:["#c26b1e","\u623F\u5BA4\u7ED3","AV node"],hp:["#b08a1c","\u5E0C\u2013\u6D66","His\u2013P"],qrs:["#c95a3c","\u5FC3\u5BA4","QRS"],st:["#e2b88f","\u5E73\u53F0","ST"],twave:["#7d93a8","\u590D\u6781","T"]};function condSegments(e){return[["sa",0,.02],["atria",.02,e.pDur],["av",e.pDur,e.eHis],["hp",e.eHis,e.ePR],["qrs",e.ePR,e.eQend],["st",e.eQend,e.eTon],["twave",e.eTon,e.eToff]].map(([a,c,u])=>[a,c,Math.max(c,u)])}function drawCondStrip(e,n,a,c){const u=window.devicePixelRatio||1,h=e.clientWidth,g=e.clientHeight;if(!h||!g)return null;e.width=Math.round(h*u),e.height=Math.round(g*u);const i=e.getContext("2d");i.setTransform(u,0,0,u,0,0),i.clearRect(0,0,h,g);const m=-.03,p=n.eToff+.04,d=l=>(l-m)/(p-m)*h,s=g-18,w=16;i.font=`11px ${getComputedStyle(e).fontFamily}`,i.textBaseline="middle";for(const[l,v,T]of condSegments(n)){const f=d(v),o=d(T),[r,t,S]=COND_SEG[l];i.fillStyle=r,i.globalAlpha=.85,i.fillRect(f,s,Math.max(1,o-f-1),w),i.globalAlpha=1;const b=c==="en"?S:t,y=i.measureText(b).width;y+6<o-f&&(i.fillStyle="#fff",i.fillText(b,f+(o-f-y)/2,s+w/2+.5))}const x=(s-6)*.72,R=(s-10)*.5;i.strokeStyle="#22313f",i.lineWidth=1.4,i.beginPath();for(let l=0;l<=240;l++){const v=m+(p-m)*l/240,T=((a.pOn+v/n.rr)%1+1)%1,f=x-ecgValue(T,a)*R;l?i.lineTo(d(v),f):i.moveTo(d(v),f)}return i.stroke(),n.e<=p&&(i.strokeStyle="#1e3a5f",i.lineWidth=1.2,i.setLineDash([3,2]),i.beginPath(),i.moveTo(d(n.e),2),i.lineTo(d(n.e),s+w),i.stroke(),i.setLineDash([])),{e0:m,e1:p}}function CondPanel({cycleT:e,stateObj:n,bpm:a,lang:c,man:u,loadState:h,loadPct:g,autoSlow:i,onRestoreSpeed:m,onSeek:p,onOpen:d}){const{useRef:s,useEffect:w}=React,x=s(null),R=s(null),l=(r,t)=>c==="en"?t:r,v=ecgTiming(n,a),T=condClock(e,v,u),f=COND_EVENTS.find(r=>r[0]===condEventAt(T));w(()=>{x.current&&(R.current=drawCondStrip(x.current,T,v,c))});const o=r=>{const t=x.current,S=R.current;if(!t||!S)return;const b=t.getBoundingClientRect(),y=(r.clientX-b.left)/b.width,D=S.e0+y*(S.e1-S.e0),E=condSegments(T).find(([,H,M])=>D>=H&&D<M);if(!E)return;const P=(E[1]+E[2])/2;p(((v.pOn+P/T.rr)%1+1)%1);const C=COND_EVENTS.find(H=>H[0]===E[0]);C&&C[5]&&d(C[5])};return React.createElement("div",{className:"ctrl-section cond-sec"},h!=="ready"&&React.createElement("div",{className:"cond-load"},h==="error"?l("\u4F20\u5BFC\u7CFB\u7EDF\u8F7D\u5165\u5931\u8D25\uFF0C\u5237\u65B0\u91CD\u8BD5","Could not load the conduction system; reload to retry"):l(`\u6B63\u5728\u8F7D\u5165\u4F20\u5BFC\u7CFB\u7EDF\u2026 ${g}%`,`Loading the conduction system\u2026 ${g}%`)),React.createElement("div",{className:"ctrl-label"},l("\u4F20\u5BFC\u2013\u5FC3\u7535\u5BF9\u7167\uFF08\u70B9\u8272\u5E26\u8DF3\u5230\u8BE5\u6BB5\uFF09","Conduction vs ECG (tap a band to jump there)")),React.createElement("canvas",{ref:x,className:"cond-strip",onPointerDown:o,"aria-label":l("\u4E00\u62CD\u5FC3\u7535\u56FE\u4E0E\u5404\u6BB5\u4F20\u5BFC\u7684\u5BF9\u7167\u6761","One beat of ECG lined up with each conduction stage")}),f&&React.createElement("div",{className:"cond-event"},React.createElement("b",null,l(f[1],f[2])),React.createElement("span",null,l(f[3],f[4]))),React.createElement("div",{className:"cond-legend"},React.createElement("span",null,React.createElement("i",{className:"sw",style:{background:"#6b4a12"}}),l("\u4F20\u5BFC\u7CFB\u7EDF\uFF08\u4EAE\u9EC4 = \u51B2\u52A8\u7ECF\u8FC7\uFF09","Conduction system (bright = impulse passing)")),React.createElement("span",null,React.createElement("i",{className:"sw",style:{background:"#f28f33"}}),l("\u5DF2\u53BB\u6781\u5316\u7684\u5FC3\u808C","Depolarised muscle")),React.createElement("span",null,React.createElement("i",{className:"sw",style:{background:"#8ea2b4"}}),l("\u9759\u606F / \u5DF2\u590D\u6781","Resting / repolarised"))),i&&React.createElement("div",{className:"cond-slow"},l("\u5DF2\u5207\u5230 \xBC \u901F\uFF0C\u4FBF\u4E8E\u770B\u6E05\u4F20\u5BFC","Slowed to \xBC speed so the conduction is visible"),React.createElement("button",{className:"btn tiny",onClick:m},l("\u6062\u590D 1\xD7","Back to 1\xD7"))),React.createElement("div",{className:"ctrl-note"},l("\u793A\u610F\uFF1A\u7ED3\u6784\u6309\u89E3\u5256\u4F4D\u7F6E\u751F\u6210\u3001\u5C3A\u5BF8\u653E\u5927\uFF1B\u6FC0\u52A8\u987A\u5E8F\u6309\u6559\u79D1\u4E66\uFF0C\u65F6\u957F\u6309\u672C\u72B6\u6001\u5FC3\u7535\u56FE\u3002","Schematic: structures placed by anatomy and enlarged; activation order from textbooks, timing from this state's ECG.")))}Object.assign(window,{loadConduction,condClock,condEventAt,condSegments,COND_EVENTS,CondPanel});
