brainsmatics 1.0.36 → 1.0.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{deflate-cf12336f.mjs → deflate-6b7e91c2.mjs} +1 -1
- package/dist/{deflate-483cff19.js → deflate-9ed87e70.js} +1 -1
- package/dist/{index-b1bda944.js → index-516b3d02.js} +2 -2
- package/dist/{index-7c0d3276.mjs → index-5df04217.mjs} +3 -3
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{lerc-cd60c241.mjs → lerc-69ccf783.mjs} +1 -1
- package/dist/{lerc-1cc6b21c.js → lerc-9ebd5b90.js} +1 -1
- package/package.json +1 -1
|
@@ -4308,7 +4308,7 @@ echarts.use([`+U+"]);":"Unknown series "+N))}return}if(f==="tooltip"){if(b){proc
|
|
|
4308
4308
|
}
|
|
4309
4309
|
`,transparent:!1,depthWrite:!1,depthTest:!1}),de=new ey(_n,Oe);de.translateX(qo.current),de.translateY(To.current),de.translateZ(_o.current),de.myMeshType="neuronSphere",de.name=`${Qe}-${_t.line[0].start_name}`,de.userData.color="#1771FF",de.myMeshType="neuronSphere",de.name=`${Qe}-${_t.line[0].start_name}`,de.userData.color="#1771FF",On(de),Et.add(de),Et.name=`swcPointGroup${Qe}`,ut.current.push(Et),Ce.current.add(Et);let Ke=1;for(let Ge=0;Ge<_t.line.length;Ge++){let et=[],Ut=[_t.position[0].x,_t.position[0].y,_t.position[0].z];for(let Kt=_t.line[Ge].start;Kt<=_t.line[Ge].end;Kt++){Kt===_t.line[Ge].start&&(Ut=[_t.position[Kt].x,_t.position[Kt].y,_t.position[Kt].z]);let In=_t.position[Kt].x,Dt=_t.position[Kt].y,Mt=_t.position[Kt].z;(Math.sqrt((In-Ut[0])*(In-Ut[0])+(Dt-Ut[1])*(Dt-Ut[1])+(Mt-Ut[2])*(Mt-Ut[2]))>Ke||Kt===_t.line[Ge].end||Kt===_t.line[Ge].start)&&(et.push(new me(In,Dt,Mt)),Ut=[In,Dt,Mt])}let dn=new ba(new Wi().setFromPoints(et),new yh({color:Pt}));dn.myMeshType="SWC",bt.add(dn)}bt.scale.set(Bo.current,Bo.current,Bo.current),bt.translateX(qo.current),bt.translateY(To.current),bt.translateZ(_o.current),bt.name=Qe,bt.myMeshType="SWC",q.current[Qe]=bt,Ce.current.add(q.current[Qe]),Rt&&Rt()})},Kn=function(je){return je.replace("/","_").replace(" ","_")},Ti=(je,gt,Qe)=>{var Rt;Qe.color=gt;let Pt=Ce.current.children.find(Vt=>Vt.name==Qe.name);if(s=="vessel")i.current[Qe.name]&&Pt&&Pt.traverse(function(Vt){(Vt instanceof ba||Vt instanceof Dn)&&Vt.material.color.set(Qe.color)});else if(s=="fbx"){if(Vo.current[Qe.name]&&Pt){const Vt=Qe.color.slice(0,7),_t=Qe.color.slice(7,9),bt=parseInt(_t,16)/255;Pt.traverse(function(Et){Et instanceof Dn&&(Et.material.color.set(Vt),_t&&(Et.material.transparent=!0,Et.material.opacity=bt))})}}else if(s=="soma")ne.current.includes(Qe.name)&&Pt&&Pt.traverse(function(Vt){Vt instanceof ey&&(Vt.material.uniforms.color.value=Un(Qe.color))});else if(s=="swc"){if(q.current[Qe.name]&&Pt){let bt=new URL(window.location.href),Et=new URLSearchParams(bt.search);rn.current[Qe.name]=Qe.color.replace("#","!"),Et.set("neuronsColor",encodeURIComponent(JSON.stringify(rn.current))),bt.search=Et.toString(),window.history.replaceState({},"",bt),Pt.traverse(function(_n){_n instanceof ba&&_n.material.color.set(Qe.color)})}Ce.current.traverse(bt=>{if(bt.myMeshType==="neuronSphere"&&bt.userData.type=="end"&&Qe.name===bt.name.split("-")[0]){let Et=Qe.color;bt.material.uniforms.color.value=new Yr(Et),bt.userData.color=Et}});let[Vt,_t]=qt(st.current,Qe.name);for(let bt in _t){let Et=bt;bt.indexOf("_")>-1&&(Et=bt.split("_")[0]);let _n=(Rt=st.current[`${Et}`])==null?void 0:Rt.find(gr=>gr.name===Qe.name);_n&&(_n.color=Qe.color)}Ce.current.traverse(bt=>{if(bt.name==="lineNameMesh"&&bt.userData.type=="end"&&Qe.name===bt.userData.wholeName.split("-")[0]){let Et=Qe.color;bt.material.color.set(Et),bt.userData.initColor=Et}})}},Vr=w.useCallback((je,gt,Qe,Pt,Rt)=>{je.stopPropagation();let Vt=new URL(window.location.href),_t=new URLSearchParams(Vt.search),bt=gt,Et=E0e(bt,Q.current),gr=jS(bt,Q.current).children,Oe=U+"/data/"+pe.current+"/"+Kn(bt)+".FBX";for(var de=0;de<Et.length;de++){if(lt(Et[de],!0),we.includes(Et[de])){Ie(et=>et.filter(Ut=>Ut!==Et[de]));const Ge=JSON.stringify(we.filter(et=>et!==Et[de]));_t.set("regionsExpanded",Ge)}ne.current=ne.current.filter(Ge=>Ge!==Et[de])}if(we.includes(bt)){Ie(et=>et.filter(Ut=>Ut!==bt));const Ge=JSON.stringify(we.filter(et=>et!==bt));_t.set("regionsExpanded",Ge),ne.current.includes(bt)||ne.current.push(bt),Vo.current[bt]?(Ce.current.remove(Vo.current[bt]),Vo.current[bt].children[0].material.color.set(Pt),Ce.current.add(Vo.current[bt]),hg.current&&(Ce.current.remove(ts.current[bt]),ts.current[bt].children[0].material.color.set(Pt),Ce.current.add(ts.current[bt]))):qh(Oe,bt,Pt,.6,parseInt(Rt));for(var de=0;de<gr.length;de++)ne.current=ne.current.filter(Ut=>Ut!==gr[de].name),lt(gr[de].name,!0),dt.current=0,delete Y.current[gr[de].name]}else{const Ge=document.getElementById("spinner"),et=JSON.stringify([...we,bt]);_t.set("regionsExpanded",et),Ie(Ut=>[...Ut,bt]),Ge&&(Ge.style.display="block"),Vo.current[bt]?(Ce.current.remove(Vo.current[bt]),Vo.current[bt].children[0].material.color.set("#DBDBDB"),Ce.current.add(Vo.current[bt]),hg.current&&(Ce.current.remove(ts.current[bt]),ts.current[bt].children[0].material.color.set("#DBDBDB"),Ce.current.add(ts.current[bt]))):qh(Oe,bt,"#DBDBDB",.6,parseInt(Rt)),ne.current=ne.current.filter(Ut=>Ut!==bt);for(var de=0;de<gr.length;de++)if(gr[de]["3D"]){let dn=parseInt(gr[de].z),Kt=gr[de].color,In=U+"/data/"+pe.current+"/"+Kn(gr[de].name)+".FBX";ne.current.push(gr[de].name),ai(In,gr[de].name,Kt,.6,dn,function(){Ge&&(Ge.style.display="none")})}}g(ne.current);const Ke=JSON.stringify(ne.current);_t.set("regionsChecked",Ke),Vt.search=_t.toString(),window.history.replaceState({},"",Vt)},[m,f,we]),br=(je,gt,Qe)=>{if(gt===ne.current[0]&&x)return;const Pt=ne.current.indexOf(gt);if(Pt!==-1){x&&(je.target.style.color="black"),g(bt=>bt.filter(Et=>Et!==gt)),ne.current.splice(Pt,1);let Rt=new URL(window.location.href),Vt=new URLSearchParams(Rt.search);const _t=JSON.stringify(ne.current);s==="fbx"?Vt.set("regionsChecked",_t):s==="vessel"&&Vt.set("vesselsChecked",_t),Rt.search=Vt.toString(),window.history.replaceState({},"",Rt),lt(gt,!0)}else{x&&(je.target.style.color="red"),ne.current.push(gt),g([...ne.current]);let Rt=new URL(window.location.href),Vt=new URLSearchParams(Rt.search);const _t=JSON.stringify(ne.current);s==="fbx"?Vt.set("regionsChecked",_t):s==="vessel"&&Vt.set("vesselsChecked",_t),Rt.search=Vt.toString(),window.history.replaceState({},"",Rt);let bt=U+"/data/FBX/"+gt+".FBX";qh(bt,gt,Qe,.8,0)}if(b){const Rt=b.current.indexOf(gt);Rt>-1?b.current.splice(Rt,1):b.current.push(gt)}},ir=w.useMemo(()=>{var Rt,Vt;let je=re&&re.split(" ")[0]||"",gt=typeof G=="string"?G.split(" ")[0]:"",Qe=["MO","MOs","MOp","CP","Isocortex"];if(s=="swc"){let _t=[],bt=[];if(E&>){let Et=((Rt=E[gt])==null?void 0:Rt.axon)||[];_t=[..._t,...Et]}if(E&&je){let Et=((Vt=E[je])==null?void 0:Vt.soma)||[];bt=[...bt,...Et]}if(gt&&je){let Et=new Set(_t),_n=new Set(bt);ht.current=[...Et].filter(gr=>_n.has(gr))}else gt?ht.current=_t:je&&(ht.current=bt)}const Pt=_t=>_t&&_t.map((bt,Et)=>{A7.push(bt),bt.nameflag?bt.key=bt.nameflag:bt.key=bt.name;let _n=bt.name;if(localStorage.getItem("lang")=="zh_cn"&&bt.cname&&(_n=bt.cname),s==="vessel"){const Ge=LT(bt.key,n);Ge[Ge.length-1]}bt.path||(s==="vessel"?bt.path=U+"/data/Vessel/":s==="fbx"&&(bt.path=U+"/data/FBX/"));const gr=at.reduce((Ge,et)=>{const[Ut,dn]=et.split(":");return Ge[Ut]=dn,Ge},{}),Oe=(Ge,et)=>Ge in gr?gr[Ge]===et[Ge]:!0;let de;const Ke=G&&bt["3D"]&&_n.toLowerCase().indexOf(G.toLowerCase())!==-1||x&&ne.current.slice(1).includes(_n)||s=="vessel"&&G&&_n.toLowerCase().indexOf(G.toLowerCase())!==-1;if(s==="fbx"||s==="vessel")return de=w.createElement("span",{style:{display:"flex",alignItems:"center"},onClick:Ge=>Ge.stopPropagation()},w.createElement(oL,{format:"rgb",defaultValue:bt.color,onChange:(Ge,et)=>Ti(Ge,et,bt)}),w.createElement(_a,{placement:"right",title:bt.fullname},w.createElement("div",{onClick:Ge=>br(Ge,bt.key,bt.color),style:Ke?{color:"red",whiteSpace:"nowrap"}:{color:"black",whiteSpace:"nowrap"}},_n)),mn.includes(bt.name)?w.createElement(_a,{placement:"right",title:p("5000.6041")||"新标注"},w.createElement("svg",{className:"svgleft",width:"20px",height:"20px",viewBox:"0 0 200 200",version:"1.1",style:{marginLeft:"8px"},xmlns:"http://www.w3.org/2000/svg"},w.createElement("g",{id:"#1296dbff"},w.createElement("path",{fill:"#1296db",opacity:"1.00",d:" M 12.39 0.00 L 187.60 0.00 C 193.55 1.76 198.40 6.33 200.00 12.39 L 200.00 197.03 C 197.21 200.36 192.66 199.74 189.30 197.68 C 160.70 182.89 131.92 168.44 103.27 153.76 C 100.74 151.94 97.96 153.23 95.58 154.56 C 79.92 162.65 64.11 170.45 48.45 178.54 C 34.57 185.85 20.35 192.53 6.55 200.00 L 4.06 200.00 C 2.44 198.91 1.07 197.50 0.00 195.87 L 0.00 12.40 C 1.80 6.43 6.41 1.77 12.39 0.00 M 68.04 50.93 C 67.96 68.97 68.00 87.02 68.01 105.06 C 67.45 108.62 71.21 112.26 74.72 110.75 C 77.57 109.92 78.36 106.64 78.30 104.03 C 78.31 90.37 78.34 76.71 78.25 63.05 C 93.63 78.23 108.28 94.13 123.37 109.59 C 124.85 111.28 127.53 111.57 129.39 110.34 C 131.68 109.12 132.04 106.39 132.00 104.06 C 131.96 86.01 132.08 67.96 131.94 49.91 C 132.41 46.10 127.58 43.22 124.42 45.37 C 121.60 46.80 121.73 50.30 121.67 53.00 C 121.74 66.29 121.62 79.57 121.76 92.85 C 107.86 78.88 94.47 64.40 80.64 50.36 C 78.20 48.09 75.99 44.09 72.08 44.90 C 69.30 45.36 67.87 48.32 68.04 50.93 Z"})))):null,D!=null&&D.includes("neurons")&&Qe.includes(bt.name)&&(N=="task3D"||N=="3Dneurons")?w.createElement(_a,{placement:"right",title:p("5000.6040")||"投射丰富"},w.createElement("svg",{width:"20px",height:"20px",viewBox:"0 0 200 200",style:{marginLeft:"5px"},version:"1.1",xmlns:"http://www.w3.org/2000/svg",onClick:()=>{R==null||R.current.tabChange(7),setTimeout(()=>{L&&L(bt.name)},50)}},w.createElement("g",{id:"#1296dbff"},w.createElement("path",{fill:"#1296db",opacity:"1.00",d:" M 161.22 29.23 C 170.61 22.47 184.66 24.19 192.68 32.31 C 197.08 36.53 199.12 42.53 200.00 48.42 L 200.00 51.57 C 199.07 58.41 196.19 65.28 190.43 69.42 C 182.96 75.76 171.77 76.37 163.24 71.84 C 157.18 68.92 153.36 63.05 150.76 57.07 C 143.17 57.08 135.57 56.74 127.99 57.09 C 125.64 57.08 124.07 59.04 122.49 60.48 C 109.60 73.80 96.19 86.60 83.39 100.00 C 96.19 113.40 109.60 126.20 122.49 139.52 C 124.07 140.96 125.64 142.92 127.98 142.91 C 135.58 143.26 143.19 142.92 150.80 142.94 C 152.36 139.60 153.87 136.15 156.39 133.41 C 161.32 127.99 168.67 124.81 176.01 125.13 C 183.62 125.37 191.06 129.33 195.32 135.66 C 200.14 142.64 201.01 152.08 197.83 159.90 C 193.64 169.75 182.73 176.08 172.08 174.81 C 162.13 173.99 153.99 166.24 150.70 157.12 C 141.45 156.77 132.19 157.20 122.94 156.99 C 119.96 157.25 117.95 154.84 116.03 152.98 C 102.37 138.97 88.30 125.36 74.64 111.35 C 72.74 109.58 70.92 107.06 68.05 107.07 C 61.80 106.71 55.54 107.06 49.29 107.12 C 46.34 115.79 38.83 122.99 29.63 124.43 C 19.13 126.37 7.56 120.75 2.99 111.02 C -1.82 101.38 0.34 88.66 8.45 81.45 C 16.25 74.63 28.64 72.73 37.60 78.39 C 43.12 81.56 46.99 86.86 49.37 92.67 C 55.88 92.61 62.41 93.06 68.91 92.61 C 70.92 92.57 72.27 90.88 73.65 89.65 C 87.81 75.15 102.36 61.03 116.53 46.53 C 118.28 44.79 120.23 42.76 122.94 43.01 C 132.21 42.82 141.49 43.18 150.76 42.93 C 153.10 37.64 156.28 32.47 161.22 29.23 Z"})))):null,w.createElement("div",{ref:Et==0?u:null,style:{width:20,height:20,marginLeft:8}},bt.children&&y&&(N=="task3D"||N=="3Dlabel")?w.createElement(_a,{placement:"right",title:we.includes(bt.key)?"Assemle":"Expand"},we.includes(bt.key)?w.createElement("svg",{width:"20px",height:"20px",viewBox:"0 0 128 128",version:"1.1",xmlns:"http://www.w3.org/2000/svg",onClick:Ge=>Vr(Ge,bt.key,`${bt.key}`,bt.color,bt.z)},w.createElement("g",{id:"#1296dbff"},w.createElement("path",{fill:"#1296db",opacity:"1.00",d:" M 63.29 5.38 C 64.77 5.01 66.21 5.93 67.59 6.37 C 76.47 10.42 84.89 15.45 93.99 19.03 C 96.79 20.32 100.17 21.53 101.43 24.64 C 103.43 28.57 100.65 33.35 96.69 34.67 C 89.18 37.63 82.15 41.64 74.68 44.70 C 70.42 46.40 65.85 50.45 61.12 47.92 C 51.83 43.67 42.87 38.75 33.64 34.38 C 30.76 33.08 27.65 31.24 27.03 27.85 C 26.96 24.60 28.32 20.85 31.64 19.65 C 42.33 15.22 52.50 9.55 63.29 5.38 Z"}),w.createElement("path",{fill:"#1296db",opacity:"1.00",d:" M 15.39 56.26 C 17.98 55.30 20.40 57.34 22.69 58.29 C 30.72 62.68 39.29 66.09 47.05 70.95 C 50.29 72.73 50.08 76.80 50.06 79.98 C 49.82 91.26 50.26 102.56 49.87 113.83 C 48.69 117.23 44.23 120.17 40.62 118.42 C 31.59 115.01 22.81 110.92 14.00 106.99 C 9.42 104.95 9.09 99.37 8.97 95.04 C 9.05 85.36 8.92 75.67 9.02 66.00 C 8.93 61.81 11.32 57.64 15.39 56.26 Z"}),w.createElement("path",{fill:"#1296db",opacity:"1.00",d:" M 109.45 56.37 C 113.43 54.97 117.33 58.88 118.67 62.35 C 119.44 66.85 118.87 71.46 119.00 76.00 C 118.77 84.93 119.77 94.00 117.79 102.80 C 117.39 105.12 115.10 106.29 113.17 107.17 C 105.54 110.54 97.93 113.93 90.31 117.31 C 88.05 118.18 85.69 119.33 83.20 118.99 C 80.27 117.96 77.59 115.38 77.99 112.02 C 77.99 100.34 77.98 88.66 78.00 76.98 C 77.80 73.81 79.74 70.88 82.64 69.66 C 91.60 65.29 100.43 60.62 109.45 56.37 Z"})),w.createElement("g",{id:"#8da6d9ff"},w.createElement("path",{fill:"#8da6d9",opacity:"1.00",d:" M 10.48 33.45 C 14.12 32.46 17.23 35.20 20.36 36.61 C 22.35 38.00 25.96 38.81 25.77 41.84 C 25.91 43.53 23.62 44.66 22.18 43.98 C 18.23 42.43 14.41 40.41 10.91 38.01 C 9.31 36.99 10.24 34.90 10.48 33.45 Z"}),w.createElement("path",{fill:"#8da6d9",opacity:"1.00",d:" M 113.64 33.62 C 114.86 32.90 116.24 33.28 117.54 33.44 C 117.65 34.89 118.71 37.04 117.12 38.02 C 113.32 40.46 109.32 42.77 105.00 44.17 C 102.38 44.63 101.22 40.71 103.32 39.38 C 106.46 36.98 110.08 35.28 113.64 33.62 Z"}),w.createElement("path",{fill:"#8da6d9",opacity:"1.00",d:" M 32.35 44.38 C 36.95 44.43 40.98 47.92 44.91 50.13 C 47.61 51.34 45.87 56.15 43.02 55.20 C 38.83 53.64 34.78 51.46 31.23 48.74 C 29.51 47.51 30.52 44.85 32.35 44.38 Z"}),w.createElement("path",{fill:"#8da6d9",opacity:"1.00",d:" M 83.15 50.18 C 86.59 47.86 90.26 45.76 94.16 44.30 C 96.46 43.58 97.45 46.12 97.82 47.88 C 94.55 50.84 90.52 52.76 86.56 54.60 C 85.18 55.35 83.62 54.93 82.16 54.82 C 82.08 53.21 81.21 51.03 83.15 50.18 Z"}),w.createElement("path",{fill:"#8da6d9",opacity:"1.00",d:" M 51.49 55.43 C 56.19 54.55 59.78 58.65 64.01 59.97 C 68.18 58.57 71.82 54.46 76.48 55.50 C 76.69 56.83 77.25 58.23 76.74 59.58 C 73.79 61.91 70.21 63.25 67.06 65.27 C 66.80 69.37 67.00 73.50 66.42 77.57 C 64.81 77.78 63.19 77.76 61.59 77.55 C 61.00 73.47 61.20 69.34 60.94 65.24 C 57.78 63.24 54.16 61.96 51.27 59.56 C 50.53 58.23 51.26 56.78 51.49 55.43 Z"}),w.createElement("path",{fill:"#8da6d9",opacity:"1.00",d:" M 61.61 84.44 C 63.20 84.05 64.82 84.09 66.42 84.44 C 67.10 89.77 67.19 95.20 66.42 100.53 C 64.82 101.13 63.15 101.18 61.52 100.63 C 60.93 95.26 60.78 89.80 61.61 84.44 Z"}),w.createElement("path",{fill:"#8da6d9",opacity:"1.00",d:" M 61.65 108.59 C 62.39 106.51 65.30 107.03 66.52 108.37 C 67.25 112.72 67.03 117.20 66.40 121.55 C 64.81 122.00 63.19 122.00 61.60 121.55 C 61.04 117.28 60.56 112.81 61.65 108.59 Z"}))):w.createElement("svg",{width:"20px",height:"20px",viewBox:"0 0 128 128",version:"1.1",xmlns:"http://www.w3.org/2000/svg",onClick:Ge=>Vr(Ge,bt.key,`${bt.key}`,bt.color,bt.z)},w.createElement("g",{id:"#1296dbff"},w.createElement("path",{fill:"#1296db",opacity:"1.00",d:" M 61.53 12.67 C 65.46 11.54 69.30 13.51 72.75 15.18 C 79.87 18.83 87.26 21.90 94.40 25.50 C 98.14 27.43 102.24 28.74 105.61 31.32 C 108.79 33.88 107.69 39.53 104.04 41.12 C 97.03 44.96 89.48 47.73 82.40 51.44 C 77.12 53.83 71.95 56.48 66.60 58.70 C 63.66 60.17 60.60 58.42 57.90 57.25 C 46.68 51.71 35.19 46.70 23.99 41.12 C 19.70 39.29 19.26 32.55 23.58 30.52 C 32.09 25.74 41.21 22.17 49.92 17.78 C 53.73 15.95 57.45 13.86 61.53 12.67 Z"}),w.createElement("path",{fill:"#1296db",opacity:"1.00",d:" M 19.32 48.10 C 22.27 47.30 25.07 49.17 27.71 50.24 C 36.66 54.75 45.89 58.69 54.87 63.12 C 56.99 64.25 59.54 65.55 60.07 68.13 C 60.64 70.71 60.51 73.37 60.53 76.00 C 60.40 86.34 60.51 96.69 60.51 107.03 C 60.44 109.78 60.34 113.19 57.72 114.82 C 54.77 117.03 51.17 114.98 48.27 113.77 C 39.28 109.37 30.16 105.24 21.11 100.97 C 19.03 99.85 16.43 98.92 15.46 96.58 C 14.66 93.80 14.87 90.85 14.82 87.99 C 14.97 77.31 14.77 66.62 14.88 55.94 C 14.74 52.76 16.06 49.18 19.32 48.10 Z"}),w.createElement("path",{fill:"#1296db",opacity:"1.00",d:" M 105.40 48.21 C 108.42 46.98 112.09 49.16 112.66 52.32 C 113.43 56.16 113.11 60.11 113.15 64.00 C 113.03 73.34 113.25 82.69 113.10 92.04 C 113.14 95.16 112.21 98.70 109.04 100.01 C 99.09 104.78 89.00 109.29 79.06 114.12 C 76.54 115.15 73.59 116.72 70.92 115.21 C 67.85 113.76 67.50 110.02 67.50 107.03 C 67.51 95.68 67.56 84.34 67.48 72.99 C 67.64 70.22 67.28 66.64 70.01 64.96 C 74.57 61.94 79.73 60.01 84.64 57.66 C 91.64 54.70 98.21 50.72 105.40 48.21 Z"})))):null)),bt.title=de,bt.key=bt.name,bt["3D"]==!1&&(bt.disabled=!0),x||we.includes(bt.name)?bt.disableCheckbox=!0:bt.disableCheckbox=!1,bt.children&&(bt.children=Pt(bt.children)),bt;if(s=="swc"){if(gt||je)return ht.current&&ht.current.includes(_n)&&Oe("strain",bt)&&Oe("age",bt)&&Oe("weight",bt)&&Oe("gender",bt)&&Oe("injected_viruses",bt)&&Oe("imaging_system",bt)&&Oe("species",bt)?(bt.title=bt.name,bt.key=bt.name,bt.color=bt.color?bt.color:"#045404",!Ln||bt.show?bt:null):null}else{const Ge=G&&_n.toLowerCase().indexOf(G.toLowerCase())!==-1;return de=w.createElement(_a,{placement:"right",title:bt.fullname},w.createElement("span",{style:{display:"flex",alignItems:"center"},onClick:et=>et.stopPropagation()},bt.children&&s=="swc"?null:w.createElement(oL,{disabled:s=="swc",format:"rgb",defaultValue:s=="swc"?"#045404":bt.color,onChange:(et,Ut)=>Ti(et,Ut,bt)}),w.createElement("div",{style:Ge?{color:"red"}:{}},_n))),bt.title=de,bt.key=bt.name,bt.children&&(bt.children=Pt(bt.children)),bt}});return Pt(n).filter(Boolean)},[G,n,re,we,x,y,M,ee,at,E,Ln,N]),li=(je,gt)=>{g(_t=>[..._t,je]),ne.current.push(je);let Qe=new URL(window.location.href),Pt=new URLSearchParams(Qe.search);const Rt=JSON.stringify(ne.current);Pt.set("neuronsChecked",Rt),Qe.search=Pt.toString(),window.history.replaceState({},"",Qe);let Vt=Sr(ir,je);fetch(Vt.path).then(_t=>_t.json()).then(_t=>{Cn(_t)}),q.current[je]?(St({name:je,color:gt}),ct(!0)):sr(Vt.path,6,je,Vt.color,function(){ms(je,Vt.color),St({name:je,color:gt}),ct(!0)})},$i=[{title:"Name",dataIndex:"name"},{title:"Color",dataIndex:"Picker",width:50,render:(je,gt)=>(rn[gt.name]&&(gt.color=rn[gt.name]),w.createElement(oL,{disabled:!gt.show,format:"rgb",defaultValue:gt.color?gt.color:"#045404",onChange:(Qe,Pt)=>Ti(Qe,Pt,gt)}))},{title:"Ana.",dataIndex:"Ana",align:"center",render:(je,gt)=>w.createElement(_a,{placement:"right",title:p("5000.7008")||"分析"},w.createElement("svg",{width:"20px",height:"20px",viewBox:"0 0 200 200",version:"1.1",xmlns:"http://www.w3.org/2000/svg",cursor:"pointer",pointerEvents:gt.show?"auto":"none",onClick:Qe=>{li(gt.name,gt.color)}},w.createElement("g",{id:"#515151ff"},w.createElement("path",{fill:"#515151",opacity:"1.00",d:" M 93.31 23.38 C 99.84 22.59 106.48 23.11 113.05 23.06 C 116.47 22.96 118.74 26.28 119.64 29.16 C 119.69 72.38 119.68 115.62 119.65 158.85 C 118.76 161.25 117.05 164.47 114.01 164.31 C 107.36 164.33 100.70 164.43 94.05 164.27 C 90.19 163.42 89.10 158.51 89.04 155.07 C 88.96 114.37 88.99 73.66 89.03 32.95 C 88.88 29.39 89.91 25.14 93.31 23.38 Z"}),w.createElement("path",{fill:"#515151",opacity:"1.00",d:" M 154.30 33.38 C 160.49 32.55 166.82 33.20 173.07 33.01 C 177.49 32.53 180.75 36.93 180.68 41.00 C 180.64 79.96 180.71 118.92 180.65 157.87 C 180.10 160.67 178.42 164.46 175.00 164.30 C 168.35 164.35 161.68 164.43 155.03 164.26 C 150.70 163.82 149.84 158.51 149.68 155.00 C 149.66 117.67 149.67 80.35 149.67 43.02 C 149.50 39.30 150.67 35.07 154.30 33.38 Z"}),w.createElement("path",{fill:"#515151",opacity:"1.00",d:" M 31.38 68.42 C 36.43 66.93 41.81 67.98 47.00 67.67 C 50.60 67.83 55.31 66.86 57.74 70.26 C 59.28 71.73 58.83 74.05 59.00 75.97 C 58.96 103.34 59.07 130.71 58.95 158.08 C 59.30 161.45 56.33 164.46 52.99 164.32 C 46.66 164.36 40.33 164.36 34.01 164.32 C 30.72 164.36 27.65 161.48 28.05 158.09 C 27.95 130.37 28.00 102.64 28.03 74.92 C 27.75 72.28 28.89 69.58 31.38 68.42 Z"}),w.createElement("path",{fill:"#515151",opacity:"1.00",d:" M 7.94 174.89 C 8.70 174.83 10.24 174.70 11.01 174.64 C 47.00 174.68 83.00 174.65 119.00 174.66 C 146.00 174.78 173.01 174.42 200.00 174.84 L 200.00 184.15 C 198.66 184.25 197.33 184.31 196.00 184.35 C 134.33 184.34 72.67 184.34 11.01 184.35 C 10.24 184.29 8.70 184.17 7.94 184.11 C 7.49 181.06 7.48 177.94 7.94 174.89 Z"}))))},{title:"Path",dataIndex:"img",align:"center",width:50,render:(je,gt)=>w.createElement(_a,{placement:"right",title:p("5000.6003")||"投射路径"},w.createElement("svg",{width:"20px",height:"20px",viewBox:"0 0 200 200",version:"1.1",xmlns:"http://www.w3.org/2000/svg",cursor:"pointer",pointerEvents:gt.show?"auto":"none",onClick:Qe=>{Qt(gt.name)}},w.createElement("g",{id:"#1296dbff"},w.createElement("path",{fill:T&>.name in T.current?"#1296db":"#515151",opacity:"1.00",d:" M 49.85 22.81 C 59.71 14.23 76.52 14.87 85.29 24.74 C 87.48 27.08 88.68 30.09 90.41 32.73 C 91.80 33.49 93.46 33.21 94.98 33.33 C 111.66 33.26 128.35 33.27 145.03 33.31 C 156.32 33.34 168.08 37.82 175.15 46.90 C 184.45 58.34 185.39 75.18 179.31 88.32 C 175.60 95.86 169.21 102.22 161.27 105.20 C 155.18 107.71 148.53 108.28 142.00 108.29 C 112.98 108.27 83.95 108.30 54.93 108.29 C 47.32 108.11 39.18 111.60 35.74 118.72 C 31.96 126.77 32.58 137.41 38.92 144.04 C 43.19 148.73 49.91 149.96 55.98 150.00 C 72.33 150.03 88.68 149.95 105.04 150.04 C 106.56 150.01 108.10 150.00 109.60 149.65 C 111.78 145.95 113.50 141.75 117.13 139.15 C 126.54 131.15 141.94 131.52 150.80 140.19 C 153.70 142.84 155.15 146.56 157.28 149.78 C 164.10 150.58 171.02 149.34 177.82 150.39 C 184.67 152.33 185.10 163.99 178.15 166.09 C 171.31 167.70 164.18 165.87 157.29 167.06 C 155.14 170.31 153.62 174.04 150.68 176.70 C 140.24 186.50 121.13 185.09 112.96 173.05 C 111.06 170.87 110.76 166.29 107.04 166.72 C 93.69 166.66 80.35 166.74 67.00 166.71 C 57.97 166.58 48.53 167.54 39.99 163.97 C 31.40 160.72 23.97 154.20 20.28 145.72 C 13.84 131.17 16.41 112.32 28.35 101.31 C 36.18 93.81 47.48 91.52 58.00 91.71 C 87.34 91.67 116.69 91.78 146.03 91.68 C 153.59 91.69 161.48 87.76 164.60 80.60 C 168.03 72.44 167.24 61.77 160.57 55.44 C 156.20 51.22 149.90 49.98 144.02 50.00 C 128.01 49.96 112.00 50.06 95.99 49.95 C 94.12 49.98 92.23 49.93 90.41 50.34 C 88.22 54.05 86.50 58.25 82.87 60.85 C 73.46 68.85 58.08 68.47 49.22 59.81 C 46.25 57.21 44.85 53.43 42.73 50.21 C 35.91 49.42 28.99 50.67 22.20 49.60 C 15.26 47.64 14.91 36.10 21.94 33.95 C 28.72 32.23 35.86 34.16 42.71 32.94 C 44.97 29.49 46.61 25.52 49.85 22.81 M 63.32 34.12 C 56.99 36.45 57.07 46.16 62.70 49.22 C 65.17 50.16 68.00 50.11 70.52 49.39 C 73.84 47.68 75.46 43.66 74.83 40.07 C 74.41 34.85 67.77 32.10 63.32 34.12 M 130.37 150.45 C 125.27 151.88 123.75 158.64 126.14 162.91 C 128.25 166.43 133.18 167.23 136.81 165.90 C 141.61 164.64 142.31 158.29 140.69 154.36 C 139.16 150.30 134.12 149.42 130.37 150.45 Z"}))))},{title:"Src.",dataIndex:"source",align:"center",width:50,render:(je,gt)=>{const Qe=gt.type;return w.createElement(_a,{placement:"right",title:p("5000.6038",{name:Qe})||'数据来源"'+Qe+'"'},w.createElement("a",{href:gt.url,target:"_blank"},w.createElement("img",{src:gt.image,width:"20px",height:"20px"})))}}],Ri=je=>{for(var gt=window.location.search.substring(1),Qe=gt.split("&"),Pt=0;Pt<Qe.length;Pt++){var Rt=Qe[Pt].split("=");if(Rt[0]==je)return Rt[1]}return!1},ii=(je,gt)=>{let Pt=jS(sg(je,gt),gt).children;for(var Rt=[],Vt=0;Vt<Pt.length;Vt++)Pt[Vt]["3D"]&&Rt.push(Pt[Vt].name);return Rt},xi=()=>{const je=Object.keys(Y.current);Object.keys(Y.current).length!==0&&Xi(je,Y.current,.2,0,void 0,!0)};w.useEffect(()=>{xi()},[f]);const ai=(je,gt,Qe,Pt,Rt,Vt)=>{var _t=new ka;if(_t.setFromAxisAngle(new me(1,0,0),Math.PI/2),!Vo.current[gt]){var bt=new aH;Pt=Pt||.1,bt.load(je,function(Et){Et.scale.set(Bo.current,Bo.current,Bo.current),Et.applyQuaternion(_t),Rt&&Et.translateY(Rt*Bo.current*.1),Et.children[0].material.transparent=!0,Et.children[0].material.opacity=Pt,Et.children[0].material.depthTest=!1,Et.children[0].material.color.set(Qe);let _n=Et.clone();if(gt!="Brain"){var gr=new ri,Oe=new me(1,0,0);gr.set(1-2*Oe.x*Oe.x,-2*Oe.x*Oe.y,-2*Oe.x*Oe.z,0,-2*Oe.x*Oe.y,1-2*Oe.y*Oe.y,-2*Oe.y*Oe.z,0,-2*Oe.x*Oe.z,-2*Oe.y*Oe.z,1-2*Oe.z*Oe.z,0,0,0,0,1),_n.applyMatrix4(gr),_n.translateX(-qo.current),_n.translateY(_o.current),_n.translateZ(-To.current),_n.name=gt,_n.myMeshType="FBX",_n.children[0].name=gt,_n.children[0].myMeshType="FBX",ts.current[gt]=_n,hg.current&&Ce.current.add(_n)}Et.translateX(qo.current),Et.translateY(_o.current),Et.translateZ(-To.current),Et.name=gt,Et.myMeshType="FBX",Et.children[0].name=gt,Et.children[0].myMeshType="FBX",Vo.current[gt]=Et,Ce.current.add(Vo.current[gt]);var de=new me,Ke=new rs().setFromObject(Et);Ke.getCenter(de);var Ge=new me;Ke.getSize(Ge);var et=Ge.x*Ge.y*Ge.z;RT.current[gt]=[de,et];for(var Ut=LT(gt,Q.current),dn=0;dn<Ut.length;dn++)if(o!=null&&o.current&&Y.current[Ut[dn]])if(te.current||se.current){Et.translateOnAxis(Y==null?void 0:Y.current[Ut[dn]].axis,o.current*(Y==null?void 0:Y.current[Ut[dn]].length));var Kt=Y==null?void 0:Y.current[Ut[dn]].axis.clone();Kt.x=Kt.x*-1,_n.translateOnAxis(Kt,o.current*(Y==null?void 0:Y.current[Ut[dn]].length))}else{var Kt=Y[Ut[dn]].axis.clone();Kt.x=Kt.x*-1,_n.translateOnAxis(Kt,o.current*(Y==null?void 0:Y.current[Ut[dn]].length)),Et.translateOnAxis(Y==null?void 0:Y.current[Ut[dn]].axis,o.current*(Y==null?void 0:Y.current[Ut[dn]].length))}Vo.current[gt]=Et;let In=ii(gt,Q.current);for(var Dt=!0,Mt=0;Mt<In.length;Mt++)In[Mt]in Vo.current||(Dt=!1);if(Dt){for(var jr=0,Mt=0;Mt<In.length;Mt++){var Ur=In[Mt];if(!te.current)if(se.current){let Ei=new me(0,0,5);Y.current[Ur]={axis:RT.current[Ur][0].clone().sub(Ei).applyAxisAngle(new me(1,0,0),-1*Math.PI/2).normalize(),length:Math.cbrt(RT.current[Ur][1])}}else he.current;jr=jr+Y.current[Ur].length}if(!(se.current||te.current))for(Mt=0;Mt<In.length;Mt++)Y.current[In[Mt]].length=Y.current[In[Mt]].length/jr*In.length;var ar=setInterval(function(){if(o!=null&&o.current&&dt.current<(o==null?void 0:o.current)){dt.current=dt.current+.2;let Yn;dt.current>(o==null?void 0:o.current)&&(Yn=(o==null?void 0:o.current)-dt.current+.2,dt.current=o.current),Xi(In,Y.current,.2,0,Yn)}else dt.current=0,clearInterval(ar)},20)}Vt&&Vt()})}},Xi=(je,gt,Qe,Pt,Rt,Vt=!1)=>{var _t,bt;if(te.current||se.current)var Et=.2;else var Et=Qe;for(var _n in je){var gr=je[_n];_t=Vo.current[gr],bt=ts.current[gr];var Oe=gt[gr].axis,de=Oe.clone();de.x=de.x*-1;var Ke=gt[gr].length;if(Vt&&o){Vo.current[je[_n]].locationLength=o==null?void 0:o.current,Vo.current[je[_n]].position.set(0,0,0),Vo.current[je[_n]].translateX(qo.current),Vo.current[je[_n]].translateY(_o.current),Vo.current[je[_n]].translateZ(-To.current),Vo.current[je[_n]].translateOnAxis(Oe,(o==null?void 0:o.current)*Ke),ts.current[je[_n]].position.set(0,0,0),ts.current[je[_n]].translateX(-qo.current),ts.current[je[_n]].translateY(_o.current),ts.current[je[_n]].translateZ(-To.current),ts.current[je[_n]].locationLength=o==null?void 0:o.current,ts.current[je[_n]].translateOnAxis(de,(o==null?void 0:o.current)*Ke);continue}switch(Pt){case 0:Rt?(Vo.current[je[_n]].translateOnAxis(Oe,Rt*Ke),ts.current[je[_n]].translateOnAxis(de,Rt*Ke)):(Vo.current[je[_n]].translateOnAxis(Oe,Et*Ke),ts.current[je[_n]].translateOnAxis(de,Et*Ke));break;case 1:Et<=0?(_t.translateOnAxis(Oe,-1*Math.sqrt(Math.abs(Et*Ke))),bt.translateOnAxis(de,-1*Math.sqrt(Math.abs(Et*Ke)))):(_t.translateOnAxis(Oe,Math.sqrt(Et*Ke)),bt.translateOnAxis(de,Math.sqrt(Et*Ke)));break;case 2:Et<=0?(_t.translateOnAxis(Oe,-1*Math.pow(Et,2)*Ke),bt.translateOnAxis(de,-1*Math.pow(Et,2)*Ke)):(_t.translateOnAxis(Oe,Math.pow(Et,2)*Ke),bt.translateOnAxis(de,Math.pow(Et,2)*Ke));break}}},Ba=je=>{for(let gt=0;gt<je.length;gt++){const Qe=je[gt],{key:Pt,cname:Rt}=Qe;localStorage.getItem("lang")=="zh_cn"&&Rt?ke.current.push({key:Pt,title:Rt}):ke.current.push({key:Pt,title:Pt}),Qe.children&&Ba(Qe.children)}},Wa=je=>{const{value:gt}=je.target;if(gt!=""){Ue.current=!1,A7=[];const Qe=ke.current.map(Rt=>Rt.title.toLowerCase().indexOf(gt.toLowerCase())>-1?sg(Rt.key,n):null).filter((Rt,Vt,_t)=>!!(Rt&&_t.indexOf(Rt)===Vt));let Pt=[];for(let Rt in Qe){let Vt=Qe[Rt];if(Vt){let _t=LT(Vt,n);gt.length===1?(_t.length>2&&(_t=_t.slice(_t.length-3,_t.length)),Pt.push(..._t)):Pt.push(Vt,..._t)}}Pt.filter((Rt,Vt,_t)=>!!(Rt&&_t.indexOf(Rt)===Vt)),F(Pt),W(!0),J(gt)}else F(ce.current),J(""),Ue.current=!0},ja=(je,gt)=>(...Pt)=>{clearTimeout(j.current),j.current=setTimeout(()=>{je(...Pt)},gt)},Ks=ja(Wa,50),Ao=je=>{F(je),A7=[],W(!1)},ms=(je,gt)=>{q.current[je]&&q.current[je].children[0].material.color.set(gt)},Pr=w.useCallback((je,gt,Qe,Pt)=>{let Rt=je,Vt="",_t;if(s!=="swc"){if(Rt=gt.node.name,Vt=gt.node.path,_t=gt.node.color,Rt===ne.current[0]&&S===2)return;if(b){const Ke=b.current.indexOf(Rt);Ke>-1?b.current.splice(Ke,1):ne.current.length!==0&&b.current.push(Rt)}let Et=m.findIndex(Ke=>Ke==Rt),_n=JSON.parse(JSON.stringify(m));Et>-1?_n.splice(Et,1):_n.push(Rt),g(_n),ne.current=_n;let gr=new URL(window.location.href),Oe=new URLSearchParams(gr.search);const de=JSON.stringify(_n);s==="fbx"?Oe.set("regionsChecked",de):s==="vessel"&&Oe.set("vesselsChecked",de),gr.search=Oe.toString(),window.history.replaceState({},"",gr)}const bt=document.getElementById("spinner");switch(s){case"vessel":{Rt=="Unnamed vein"&&(Rt="Unnamed_Vein");let Et=Vt+Rt+".js";gt.checked?(Om=!0,bt&&(bt.style.display="block"),Lr(Et,8,_t,Rt,function(){bt&&(bt.style.display="none")})):(Om=!1,bt&&(bt.style.display="none"),Gr(Rt));break}case"swc":{if(Qe)if(Pt){let Et=gt.map(_n=>new Promise((gr,Oe)=>{if(gt)if(q.current[_n.name])gr("");else{g(Ut=>[...Ut,_n.name]);let de=new URL(window.location.href),Ke=new URLSearchParams(de.search);const Ge=[...m,_n.name],et=JSON.stringify(Ge);Ke.set("neuronsChecked",et),de.search=Ke.toString(),window.history.replaceState({},"",de),bt&&(bt.style.display="block"),sr(_n.path,6,_n.name,_n.color,function(){ms(_n.name,"#045404"),gr("")})}else{Om=!1,Nn(_n.name);let de=new URL(window.location.href),Ke=new URLSearchParams(de.search);const et=JSON.stringify([]);Ke.set("neuronsChecked",et),de.search=Ke.toString(),window.history.replaceState({},"",de),gr("")}}));Promise.all(Et).then(()=>{bt&&(bt.style.display="none")})}else{ne.current.push(je.name),bt&&(bt.style.display="block"),g(Oe=>[...Oe,je.name]);let Et=new URL(window.location.href),_n=new URLSearchParams(Et.search);const gr=JSON.stringify(ne.current);_n.set("neuronsChecked",gr),Et.search=_n.toString(),window.history.replaceState({},"",Et),sr(je.path,6,je.name,je.color,function(){ms(je.name,"#045404"),bt&&(bt.style.display="none")})}else if(Pt)gt.forEach(Et=>{if(gt){g(de=>de.filter(Ke=>Ke!==Et.name)),ne.current=ne.current.filter(de=>de!==Et.name),Nn(Et.name);let _n=new URL(window.location.href),gr=new URLSearchParams(_n.search);const Oe=JSON.stringify(ne.current);if(gr.set("neuronsChecked",Oe),_n.search=gr.toString(),window.history.replaceState({},"",_n),T&&Et.name in T.current){le(de=>de.filter(Ke=>Ke!==Et.name));for(let de in T.current[Et.name])Ce.current.remove(T.current[Et.name][de]);delete T.current[Et.name]}}});else{if(T&&je.name in T.current){le(Oe=>Oe.filter(de=>de!==je.name));for(let Oe in T.current[je.name])Ce.current.remove(T.current[je.name][Oe]);delete T.current[je.name]}Nn(je.name),ne.current=ne.current.filter(Oe=>Oe!==je.name),g(Oe=>Oe.filter(de=>de!==je.name));let Et=new URL(window.location.href),_n=new URLSearchParams(Et.search);const gr=JSON.stringify(ne.current);_n.set("neuronsChecked",gr),Et.search=_n.toString(),window.history.replaceState({},"",Et)}break}case"soma":{S0e(Rt,ir).forEach(_n=>{gt.checked?(Om=!0,q.current[Rt]||(h!=null&&h.current?Rn(Vt,_n.color,Rt):Rn(U+"/data/json/"+Rt,_n.color,Rt))):(Om=!1,Nn(Rt))});break}case"fbx":{let Et=parseInt(gt.node.z),_n=U+"/data/FBX/"+Kn(Rt)+".FBX";gt.checked?(bt&&(bt.style.display="block"),qh(_n,Rt,_t,.8,Et,"FBX",function(){bt&&(bt.style.display="none")})):lt(Rt)}}},[m]),hi=()=>{if(Q.current.length>0&&s!=="swc"&&m.length>0&&(s==="fbx"||s==="vessel"))return new Promise((je,gt)=>{const Qe=document.getElementById("spinner");let Pt=0;for(let Rt=0;Rt<m.length;Rt++){let Vt=jS(m[Rt],Q.current);if(Vt){let _t={node:{...Vt,checked:!0}};if(s==="fbx"){let bt=U+"/data/FBX/"+Kn(Vt.key)+".FBX";qh(bt,Vt.key,Vt.color,.8,Vt.z,"FBX",function(){Qe&&(Qe.style.display="none"),Pt+=1,Pt===m.length&&je("")})}else if(s==="vessel"){let bt=Vt.name,Et=_t.node.path;bt=="Unnamed vein"&&(bt="Unnamed_Vein");let _n=Et+bt+".js";Om=!0,Qe&&(Qe.style.display="block"),Lr(_n,8,Vt.color,bt,function(){Qe&&(Qe.style.display="none"),Pt+=1,Pt===m.length&&je("")})}}}}).then(je=>{if(mse){let gt=JSON.parse(mse);for(let Qe=0;Qe<gt.length;Qe++){let Pt=jS(gt[Qe],Q.current);Pt&&Vr({stopPropagation:()=>{}},Pt.key,`${Pt.key}`,Pt.color,Pt.z)}}})},Ot=()=>{if(M7&&JSON.parse(M7).length!=0){const je=document.getElementById("spinner"),gt=JSON.parse(M7);let Qe=0;je&&(je.style.display="block");for(let Pt=0;Pt<gt.length;Pt++){let Rt=n.find(Vt=>Vt.name===gt[Pt]);Rt&&(rn.current[gt[Pt]]?Rt.color=rn.current[gt[Pt]].replace("!","#"):Rt.color="#045404",sr(Rt.path,6,Rt.name,Rt.color,function(){if(ms(Rt.name,Rt.color),yse){const Vt=JSON.parse(yse);for(let _t=0;_t<Vt.length;_t++)Rt.name==Vt[_t]&&Qt(Rt.name)}Qe++,Qe===gt.length&&je&&(je.style.display="none")}))}}};w.useEffect(()=>{!At.current&&n&&n.length>0&&(Ot(),hi(),At.current=!1)},[n]);const lt=(je,gt=!1)=>{Vo.current[je]&&(Ce.current.remove(Vo.current[je]),Vo.current[je].children[0].geometry.dispose(),gt&&delete Vo.current[je]),ts.current[je]&&(Ce.current.remove(ts.current[je]),ts.current[je].children[0].geometry.dispose(),gt&&delete ts.current[je]),Y.current[je]&>&&delete Y.current[je]},qt=(je,gt)=>{const Qe={},Pt={};for(const Rt in je){const Vt=je[Rt];for(const _t of Vt)if(_t.name==gt){if(_t.color==="#1771FF"){Qe[Rt]={point:_t.point,color:_t.color,type:_t.type};break}if(_t.color==="#A7B5A1"){Qe[Rt]={point:_t.point,color:_t.color,type:_t.type};break}Qe[Rt]={point:_t.point,color:_t.color,type:_t.type}}}for(const Rt in je){const Vt=je[Rt];for(const _t of Vt)if(_t.name==gt){if(_t.type=="cell"){Pt[Rt]={point:_t.point,color:_t.color,type:_t.type};break}_t.type==="end"&&(_t.point[0]<570?Pt[Rt]={point:_t.point,color:_t.color,type:_t.type}:Pt[Rt+"_111"]={point:_t.point,color:_t.color,type:_t.type}),!Pt[Rt]&&!Pt[Rt+"_111"]&&_t.point[0]<570&&(Pt[Rt]={point:_t.point,color:_t.color,type:_t.type})}}return[Qe,Pt]},qe=(je,gt)=>{if(Object.keys(je).length>0){const Qe=Ai.current.position;let Pt=Ce.current.getObjectByName("DR-anterior"),Rt=0;Pt&&(Rt=Qe.distanceTo(Pt.position));for(let Vt in je){let{point:_t,color:bt,type:Et}=je[Vt];swt.load(U+"/fonts/helvetiker_bold.typeface.json",function(_n){const gr=new s0e(Vt.replace("_111",""),{font:_n,size:.3,height:.01}),Oe=new js({color:bt,specular:0,shininess:0}),de=new Dn(gr,Oe),Ke=Rt<6?.2:Rt<9?.3:.5;de.scale.set(Ke,Ke,Ke),de.position.set(_t[0]*.01,_t[1]*.01,_t[2]*.01),de.name="lineNameMesh",de.userData.name=Vt.replace("_111",""),de.userData.wholeName=`${gt}-${Vt.replace("_111","")}`,de.userData.initColor=bt,de.userData.type=Et,de.translateY(To.current),de.translateZ(_o.current),de.translateX(qo.current),gr.center(),T!=null&&T.current&&T.current[gt].push(de),Ce.current.add(de)})}}else setTimeout(()=>{const[Qe,Pt]=qt(st.current,gt);qe(Pt,gt)},100)},Qt=(je,gt,Qe)=>{let Pt=new URL(window.location.href),Rt=new URLSearchParams(Pt.search),Vt,_t;if(Qe?[Vt,_t]=qt(Qe,je):[Vt,_t]=qt(st.current,je),T!=null&&T.current){const bt=document.getElementById("spinner");if(je in T.current){for(let _n in T.current[je])le(gr=>gr.filter(Oe=>Oe!==je)),Ce.current.remove(T.current[je][_n]);const Et=ee.filter(_n=>_n!==je);Rt.set("neuronsText",JSON.stringify(Et)),delete T.current[je]}else{if(T.current[je]=[],le(Et=>[...Et,je]),Rt.set("neuronsText",JSON.stringify([...ee,je])),!(je in q.current)){g(gr=>[...gr,je]),ne.current=[...ne.current,je];const Et=JSON.stringify(ne.current);Rt.set("neuronsChecked",Et);let _n=Sr(ir,je);if(bt&&(bt.style.display="block"),!q.current[je]){let gr=_n.color;_n.path&&gr&&sr(_n.path,6,je,gr,function(){gr&&ms(je,gr),bt&&(bt.style.display="none")})}}qe(_t,je)}Pt.search=Rt.toString(),window.history.replaceState({},"",Pt)}},Nn=je=>{q.current[je]&&(Ce.current.remove(q.current[je]),q.current[je]=null,delete q.current[je]);const gt=Ce.current.getObjectByName(`swcPointGroup${je}`);gt&&Ce.current.remove(gt)},Rr=je=>je.map(gt=>({value:gt.name+" "+gt.fullname,title:w.createElement(_a,{placement:"right",title:gt.fullname},w.createElement("div",{style:{whiteSpace:"nowrap",display:"flex",alignItems:"center",lineHeight:"2.4"}},gt.name," ",gt.fullname)),children:gt.children?Rr(gt.children):void 0})),Gr=je=>{Ce.current.remove(Tm),Ce.current.remove(Pc),i.current[je]&&(Ce.current.remove(i.current[je].contentobj),i.current[je].contentobj.traverse(function(gt){gt.type=="Mesh"&&(gt.geometry.dispose(),gt.geometry=null)}),i.current[je].contentmaterial.dispose(),i.current[je].contentmaterial=null,i.current[je]=null,delete i.current[je])},Lr=(je,gt,Qe,Pt,Rt)=>{i.current[Pt]?(Ce.current.add(i.current[Pt].obj),Rt&&Rt()):fetch(je).then(Vt=>Vt.json()).then(Vt=>{var _t=new Vu,bt=new Qme({color:Qe}),Et=!1;Vt.line.length>1e4&&(Et=!0);let _n=1;for(let Oe=0;Oe<Vt.line.length;Oe++)Vt.line[Oe].layer>_n&&(_n=Vt.line[Oe].layer);_n++;for(let Oe=0;Oe<Vt.line.length;Oe++){let de=(_n-Vt.line[Oe].layer)*20/_n,Ke=0,Ge=[];for(let Mt=Vt.line[Oe].start;Mt<=Vt.line[Oe].end;Mt++){let jr=Vt.position[Mt].x,Ur=Vt.position[Mt].y,ar=Vt.position[Mt].z;Ke++,Ge.push(new me(jr,Ur,ar))}let et=new Gme(Ge);Ke=Et?Math.ceil(Ke/5):Ke;const Ut=new hL,dn=new Dn(new eH(et,Ke,de,gt,!1),bt);dn.scale.set(1,1,1),Ut.addLevel(dn,0);const Kt=80,In=[Ge[0]];for(let Mt=1;Mt<Ge.length;Mt++){const jr=In[In.length-1],Ur=Ge[Mt];(jr.distanceTo(Ur)>Kt||Mt===Ge.length-1)&&In.push(Ur)}const Dt=new ba(new Wi().setFromPoints(In),new yh({color:Qe}));Dt.scale.set(1,1,1),Ut.addLevel(Dt,10),Ut.name=Pt,Ut.myMeshType="Vessel",Ut.autoUpdate=!1,_t.add(Ut)}_t.scale.set(Bo.current*.1,Bo.current*.1,Bo.current*.1),_t.translateX(qo.current),_t.translateY(To.current),_t.translateZ(_o.current),_t.name=Pt,_t.myMeshType="Vessel",Ce.current.add(_t);let gr={contentobj:_t,contentmaterial:bt};i.current[Pt]=gr,Rt&&Rt()})},Un=je=>{je=je.replace("#","");const gt=parseInt(je.slice(0,2),16),Qe=parseInt(je.slice(2,4),16),Pt=parseInt(je.slice(4,6),16),Rt=gt/255,Vt=Qe/255,_t=Pt/255;return new me(Rt,Vt,_t)},Rn=(je,gt,Qe,Pt)=>{fetch(je).then(Rt=>Rt.json()).then(Rt=>{let Vt=new ey,_t=new Wi,bt=[];for(let _n=0;_n<Rt.position.length;_n++){let gr=Rt.position[_n].split(","),Oe=gr[0],de=gr[1],Ke=gr[2];bt.push(Oe*Bo.current*.099,de*Bo.current*.099,Ke*Bo.current*.099)}_t.setAttribute("position",new ha(bt,3)),Un(gt);let Et=new Kz({size:fe.current/100,color:new Yr(gt)});Vt=new ey(_t,Et),Vt.translateX(qo.current),Vt.translateY(To.current),Vt.translateZ(_o.current-.45),Vt.name=Qe,q.current[Qe]=Vt,Ce.current.add(Vt)}),Pt&&Pt()},rr=je=>{He.current=!0;let gt=new URL(window.location.href),Qe=new URLSearchParams(gt.search);Qe.set("neuronsProjects",JSON.stringify(je)),gt.search=Qe.toString(),window.history.replaceState({},"",gt),je!=""?J(je):(J(je),F(ce.current))},Wt=ja(rr,50),vn=je=>{He.current=!0;let gt=new URL(window.location.href),Qe=new URLSearchParams(gt.search);Qe.set("neuronsSomaLocates",JSON.stringify(je)),gt.search=Qe.toString(),window.history.replaceState({},"",gt),je!=""?Z(je):(Z(je),F(ce.current))},Gn=ja(vn,50),Zn=()=>{let je=[Vo.current,ts.current,Y.current];for(let Rt of je)for(let Vt in Rt)Vt!="Brain"&<(Vt,!0);le([]),Object.keys(q.current).forEach(Rt=>{for(let Vt in T==null?void 0:T.current[Rt])Ce.current.remove(T==null?void 0:T.current[Rt][Vt]);Nn(Rt)}),Object.keys(i.current).forEach(Rt=>{Gr(Rt)}),g([]),T&&(T.current={}),ne.current=[];let gt=new URL(window.location.href),Qe=new URLSearchParams(gt.search);const Pt=JSON.stringify(ne.current);s==="fbx"?Qe.set("regionsChecked",Pt):s==="vessel"?Qe.set("vesselsChecked",Pt):s==="swc"&&(Qe.set("neuronsChecked",Pt),Qe.set("neuronsText",Pt)),gt.search=Qe.toString(),window.history.replaceState({},"",gt)},tr=(je,gt)=>{let Qe=0;for(const Pt of je.toLowerCase())if(Pt===gt[Qe]&&(Qe++,Qe===gt.length))return!0;return!1},ci=je=>{if(je){const gt=je.toLowerCase(),Qe=be.current.map(Pt=>{const Rt=Pt.name&&Pt.name.toLowerCase()===gt,Vt=Pt.fullname&&tr(Pt.fullname,gt);return{...Pt,matchPriority:Rt?1:Vt?2:3}}).filter(Pt=>Pt.matchPriority<3).sort((Pt,Rt)=>Pt.matchPriority-Rt.matchPriority).map(Pt=>({value:`${Pt.name} ${Pt.fullname}`,label:`${Pt.name} ${Pt.fullname}`}));oe(Qe)}else oe([])};w.useEffect(()=>{He.current&&(re?Me.current&&Me.current.focus():Fe.current&&Fe.current.focus())},[re]),w.useEffect(()=>{He.current&&(G?Te.current&&Te.current.focus():Ae.current&&Ae.current.focus())},[G]);const Sr=(je,gt)=>{let Qe=null,Pt=null;for(let Rt=0;Rt<je.length;Rt++)if(je[Rt].name==gt)return Qe=je[Rt].path,Pt=je[Rt].color,{path:Qe,color:Pt};return{path:Qe,color:Pt}},aa={emptyText:w.createElement(Pm,{description:w.createElement("div",{style:{color:"#ccc"}},"Neurons that meet the filter criteria entered in the input boxes above will be displayed here.")})},Xa={selectedRowKeys:m,onSelectAll:(je,gt,Qe)=>{Pr(gt,Qe,je,!0)},onSelect:(je,gt,Qe)=>{Pr(je,Qe,gt,!1)},getCheckboxProps:je=>({name:je.name})},Ca=je=>{let gt=new URL(window.location.href),Qe=new URLSearchParams(gt.search);const Pt=JSON.stringify(je);Qe.set("neuronsFilterInfo",Pt),gt.search=Qe.toString(),window.history.replaceState({},"",gt),Pe(je)},Mo=je=>{Se(je)};return w.createElement("div",{ref:c,style:{transition:"all ease-in 0.5s"}},s==="swc"?w.createElement(w.Fragment,null,re?w.createElement(L9,{ref:Me,style:{width:"100%",marginBottom:8},options:ue,placeholder:p("5000.5040")||"Input the region that soma locates",onSearch:ci,onChange:Gn,value:re}):w.createElement(lL,{ref:Fe,showSearch:!0,style:{width:"100%",marginBottom:8},value:re,dropdownStyle:{maxHeight:400,overflow:"hidden"},placeholder:p("5000.5040")||"Input the region that soma locates",allowClear:!0,treeDefaultExpandAll:!1,onChange:vn,onSearch:vn,treeData:Rr(r)}),G?w.createElement(L9,{ref:Te,style:{width:"100%",marginBottom:8},options:ue,placeholder:p("5000.5041")||"Input the region that neuron projects",onSearch:ci,onChange:Wt,value:G}):w.createElement(lL,{showSearch:!0,ref:Ae,style:{width:"100%"},value:G,dropdownStyle:{maxHeight:400,overflow:"hidden",marginBottom:8},placeholder:p("5000.5041")||"Input the region that neuron projects",allowClear:!0,treeDefaultExpandAll:!1,onChange:rr,onSearch:rr,treeData:Rr(r)}),k&&w.createElement(w.Fragment,null,w.createElement(lL,{treeData:pt,value:at,onChange:Ca,treeCheckable:!0,placeholder:"Filter by data information",style:{width:"100%",marginTop:8}}),w.createElement(bo,{style:{marginTop:"5px"}},w.createElement(ob,{onChange:je=>{fr(je.target.checked)}},p("7000.7025")||"只展示可用神经元"),w.createElement(bo,{style:{fontStyle:"italic",marginTop:"5px"}},p("7000.7026")||"点击Color按钮,修改神经元颜色;点击Ana.按钮,显示神经元投射路径分析结果;点击Path按钮,在主界面显示神经元经过的脑结构;Src按钮展示了神经元数据的来源"))),w.createElement("div",null,w.createElement(Os,{className:"Echart",open:rt,onOk:()=>{ct(!1)},onCancel:()=>{ct(!1)},width:"auto",footer:null},w.createElement(F2,{activeKey:Ht,onChange:Mo},w.createElement(I7,{tab:p("5000.7009")||"神经元末梢分布",key:"1"},yt&&w.createElement(ra,null,"Isocortex"),w.createElement(df,{ref:Ye,className:"Isocortex",Name:"Isocortex",t:p,data_change:ft,data_c:st.current,col:["RSPv_","FRP_","MOp_","MOs_","SSp_","SSp-n_","SSp-bfd_","SSp-ll_","SSp-m_","SSp-ul_","SSp-tr_","SSp-un_","SSs_","GU_","VISC_","AUDd_","AUDp_","AUDpo_","AUDv_","VISal_","VISam_","VISl_","VISp_","VISpl_","VISpm_","VISli_","VISpor_","ACAd_","ACAv_","PL_","ILA_","ORB_","AId_","AIp_","AIv_","RSPagl_","RSPd_","PTLp_","TEa_","PERI_","ECT_"],row:["1","2/3","5","6a","6b"]}),Tt&&w.createElement(ra,null,"HPF"),w.createElement(df,{ref:Tn[0],className:"HPF",Name:"HPF",t:p,data_change:ft,data_c:st.current,col:["CA1_","CA1_dd","CA1_d","CA1_i","CA1_v","CA1_vv","CA2_dd","CA2_d","CA2_i","CA2_v","CA2_vv","CA3_dd","CA3_d","CA3_i","CA3_v","CA3_vv"],row:["so","sp","slu","sr","slm"]}),w.createElement(df,{ref:Tn[1],className:"HPF",Name:"HPF",t:p,data_change:ft,data_c:st.current,col:["DG_d","DG_i","DG_V"],row:["mo","sg","po"]}),w.createElement(df,{ref:Tn[2],className:"HPF",Name:"HPF",t:p,data_change:ft,data_c:st.current,col:["SUBd_1","SUBv_1","SUBd_2","SUBv_2","SUBd_3","SUBv_3","SUBd_4","SUBv_4","SUBd_","SUBv_"],row:["sp","sr","m"]}),pn&&w.createElement(ra,null,"CNU"),w.createElement(df,{ref:lr,className:"CNU",Name:"CNU",t:p,data_change:ft,data_c:st.current,col:["CP_","ACBv_","ACBd_","FS_","OTisl_","OTislm_","OT1","OT2","OT3","LSc","LSr_","SF","SH","AAA","BA","CEAc","CEAm","IA","MEAad","MEAav","MEApd","MEApv","GPe","GPi","SI","MA","NDB","TRS","PALc","BSTse","BAC"],row:["_"]}),zn&&w.createElement(ra,null,"OLF"),w.createElement(df,{ref:Hn[0],className:"OLF",Name:"OLF",t:p,data_change:ft,data_c:st.current,col:["MOB_","AOB_","AON_","TTv_","TTd_","DP_","PIR_","NLOT_","NLOT_","COAa_","COApm_","COApl_","PAA_","TR_"],row:["gr","mi","ipl","opl","gl"]}),w.createElement(df,{ref:Hn[1],className:"OLF",Name:"OLF",t:p,data_change:ft,data_c:st.current,col:["MOB_","AOB_","AON_","TTv_","TTd_","DP_","PIR_","NLOT_","NLOT_","COAa_","COApm_","COApl_","PAA_","TR_"],row:["1","2","3","4","5","6a","2/3"]}),Ft&&w.createElement(ra,null,"TH"),w.createElement(df,{ref:Ze,className:"TH",Name:"TH",t:p,data_change:ft,data_c:st.current,col:["VAL","VM","VPL","VPLpc","VPM","VPMpc","PoT","SPFm","SPFp","SPA","PP","MGd","MGv","MGm","LGdsh","LGdco","LGdip","LP","PO","POL","SGN","Eth","REth","AV","AMd","AMv","AD","IAM","IAD","LD","IMD","MDc","MDl","MDm","SMT","PR","PVT","PT","RE","Xi","RH","CM","PCN","CL","PF","PIL","RT","IGL","IntG","LGvl","LGvm","SubG","MH","LH","PIN"],row:["_"]}),tn&&w.createElement(ra,null,"HY"),w.createElement(df,{ref:Je,className:"HY",Name:"HY",t:p,data_change:ft,data_c:st.current,col:["SO","NC","PVHam","PVHmm","PVHpmm","PVHpml","PVHap","PVHmpd","PVHpv","PVa","PVi","ARH","ADP","AHA","AVP","DMHa","DMHp","DMHv","MEPO","MPO","OV","PD","PS","PSCH","PVp","PVpo","SBPV","SCH","SFO","VMPO","VLPO","AVPV","AHNa","AHNc","AHNd","AHNp","LM","MMme","MMl","MMm","MMp","MMd","SUMm","SUMl","TMd","TMv","MPNc","MPNl","MPNm","PMd","PMv","PVHdp","PVHf","PVHlp","PVHmpv","VMHa","VMHc","VMHdm","VMHvl","PH","LHA","LPO","PST","PSTN","RCH","PeF","STN","TU","A13","FF","ZIr","ZIc","ZId","ZIv","ME"],row:["_"]}),Ar&&w.createElement(ra,null,"MB"),w.createElement(df,{ref:vt,className:"MB",Name:"MB",t:p,data_change:ft,data_c:st.current,col:["SCop","SCsg","SCzo","ICc","ICd","ICe","NB","SAG","PBG","MEV","SCO","SNr","VTA","RR","MRNm","MRNmg","MRNp","SCdg","SCdw","SCiw","SCig-a","SCig-b","SCig-c","PRC","INC","ND","Su3","PAGdm","PAGl","PAGvl","PAGdl","PAGvm","APN","MPT","NOT","NPC","OP","PPT","RPF","InCo","CUN","RN","III","MA3","EW","IV","PA4","VTN","AT","LT","DT","MT","SNl","SNc","PPN","IF","IPR","IPC","IPA","IPL","IPI","IPDM","IPDL","IPRL","RL","CLI","DR"],row:["_"]}),cn&&w.createElement(ra,null,"HB"),w.createElement(df,{ref:wt,className:"HB",Name:"HB",t:p,data_change:ft,data_c:st.current,col:["NLLd","NLLh","NLLv","PSV","KF","PBlc","PBld","PBle","PBls","PBlv","PBme","PBmm","PBmv","POR","SOCm","SOCl","B","DTN","LTN","PDTg","PCG","PG","PRNc","PRNv","SG","SSN","SUT","TRN","V","P5","Acs5","PC5","I5","CSl","CSm","LC","LDT","NI","PRNr","RPO","SLC","SLD","AP","CNlam","CNspg","DCO","VCO","CU","GR","ECU","NTB","NTSce","NTSco","NTSge","NTSl","NTSm","SPVC","SPVI","SPVOcdm","SPVOmdmd","SPVOmdmv","SPVOrdm","SPVOvl","Pa5","z","VI","ACVI","VII","ACVII","EV","AMBd","AMBv","DMX","ECO","GRN","ICB","IO","LRNm","LRNp","ISN","LIN","IRN","MARN","MDRNd","MDRNv","PARN","PAS","PGRNd","PGRNl","NIS","NR","PRP","PMR","PPYd","PPYs","LAV","MV","SPIV","SUV","XII","x","y","RM","RPA","RO"],row:["_"]}),Yt&&w.createElement(ra,null,"CB"),w.createElement(df,{ref:ur[0],className:"CB",Name:"CB",t:p,data_change:ft,data_c:st.current,col:["LING_","LING_","CENT2_","CENT2_","CENT3_","CENT3_","CUL4/5_","CUL4/5_","DEC_","DEC_","FOTU_","FOTU_","PYR_","PYR_","UVU_","UVU_","NOD_","NOD_","SIM_","SIM_","ANcr1_","ANcr1_","ANcr2_","ANcr2_","PRM_","PRM_","COPY_","COPY_","PFL_","PFL_","FL_","FL_","IP","DN"],row:["gr","mo"]}),w.createElement(df,{ref:ur[1],className:"CB",Name:"CB",t:p,data_change:ft,data_c:st.current,col:["FN","IP","DN","VeCB"],row:["_"]})),w.createElement(I7,{tab:p("5000.7011")||"神经元投射模式",key:"2"},r?w.createElement(awt,{data:Zt,fbxTreeDatas:r}):null),w.createElement(I7,{tab:p("5000.7012")||"投射长度分布",key:"3"},yt&&w.createElement(ra,null,"Isocortex"),w.createElement(hf,{t:p,data_change:ft,data_c:Zt,col:["RSPv_","FRP_","MOp_","MOs_","SSp_","SSp-n_","SSp-bfd_","SSp-ll_","SSp-m_","SSp-ul_","SSp-tr_","SSp-un_","SSs_","GU_","VISC_","AUDd_","AUDp_","AUDpo_","AUDv_","VISal_","VISam_","VISl_","VISp_","VISpl_","VISpm_","VISli_","VISpor_","ACAd_","ACAv_","PL_","ILA_","ORB_","AId_","AIp_","AIv_","RSPagl_","RSPd_","PTLp_","TEa_","PERI_","ECT_"],row:["1","2/3","5","6a","6b"]}),Tt&&w.createElement(ra,null,"HPF"),w.createElement(hf,{t:p,data_change:ft,data_c:Zt,col:["CA1_d","CA1_i","CA1_v","CA1_","CA3_dd","CA3_d","CA3_i","CA3_v","CA3_vv","CA2_"],row:["so","sp","slu","sr","slm"]}),w.createElement(hf,{t:p,data_change:ft,data_c:Zt,col:["DG_d","DG_i","DG_V"],row:["mo","sg","po"]}),w.createElement(hf,{t:p,data_change:ft,data_c:Zt,col:["SUBd_1","SUBv_1","SUBd_2","SUBv_2","SUBd_3","SUBv_3","SUBd_4","SUBv_4","SUBd_","SUBv_"],row:["sp","sr","m"]}),pn&&w.createElement(ra,null,"CNU"),w.createElement(hf,{t:p,data_change:ft,data_c:Zt,col:["CP_","ACBv_","ACBd_","FS_","OTisl_","OTislm_","OT1","OT2","OT3","LSc","LSr_","SF","SH","AAA","BA","CEAc","CEAm","IA","MEAad","MEAav","MEApd","MEApv","GPe","GPi","SI","MA","NDB","TRS","PALc","BSTse","BAC"],row:["_"]}),zn&&w.createElement(ra,null,"OLF"),w.createElement(hf,{t:p,data_change:ft,data_c:Zt,col:["MOB_","AOB_","AON_","TTv_","TTd_","DP_","PIR_","NLOT_","NLOT_","COAa_","COApm_","COApl_","PAA_","TR_"],row:["gr","mi","ipl","opl","gl"]}),w.createElement(hf,{t:p,data_change:ft,data_c:Zt,col:["MOB_","AOB_","AON_","TTv_","TTd_","DP_","PIR_","NLOT_","NLOT_","COAa_","COApm_","COApl_","PAA_","TR_"],row:["1","2","3","4","5","6a","2/3"]}),Ft&&w.createElement(ra,null,"TH"),w.createElement(hf,{t:p,data_change:ft,data_c:Zt,col:["VAL","VM","VPL","VPLpc","VPM","VPMpc","PoT","SPFm","SPFp","SPA","PP","MGd","MGv","MGm","LGdsh","LGdco","LGdip","LP","PO","POL","SGN","Eth","REth","AV","AMd","AMv","AD","IAM","IAD","LD","IMD","MDc","MDl","MDm","SMT","PR","PVT","PT","RE","Xi","RH","CM","PCN","CL","PF","PIL","RT","IGL","IntG","LGvl","LGvm","SubG","MH","LH","PIN"],row:["_"]}),tn&&w.createElement(ra,null,"HY"),w.createElement(hf,{t:p,data_change:ft,data_c:Zt,col:["SO","NC","PVHam","PVHmm","PVHpmm","PVHpml","PVHap","PVHmpd","PVHpv","PVa","PVi","ARH","ADP","AHA","AVP","DMHa","DMHp","DMHv","MEPO","MPO","OV","PD","PS","PSCH","PVp","PVpo","SBPV","SCH","SFO","VMPO","VLPO","AVPV","AHNa","AHNc","AHNd","AHNp","LM","MMme","MMl","MMm","MMp","MMd","SUMm","SUMl","TMd","TMv","MPNc","MPNl","MPNm","PMd","PMv","PVHdp","PVHf","PVHlp","PVHmpv","VMHa","VMHc","VMHdm","VMHvl","PH","LHA","LPO","PST","PSTN","RCH","PeF","STN","TU","A13","FF","ZIr","ZIc","ZId","ZIv","ME"],row:["_"]}),Ar&&w.createElement(ra,null,"MB"),w.createElement(hf,{t:p,data_change:ft,data_c:Zt,col:["SCop","SCsg","SCzo","ICc","ICd","ICe","NB","SAG","PBG","MEV","SCO","SNr","VTA","RR","MRNm","MRNmg","MRNp","SCdg","SCdw","SCiw","SCig-a","SCig-b","SCig-c","PRC","INC","ND","Su3","PAGdm","PAGl","PAGvl","PAGdl","PAGvm","APN","MPT","NOT","NPC","OP","PPT","RPF","InCo","CUN","RN","III","MA3","EW","IV","PA4","VTN","AT","LT","DT","MT","SNl","SNc","PPN","IF","IPR","IPC","IPA","IPL","IPI","IPDM","IPDL","IPRL","RL","CLI","DR"],row:["_"]}),cn&&w.createElement(ra,null,"HB"),w.createElement(hf,{t:p,data_change:ft,data_c:Zt,col:["NLLd","NLLh","NLLv","PSV","KF","PBlc","PBld","PBle","PBls","PBlv","PBme","PBmm","PBmv","POR","SOCm","SOCl","B","DTN","LTN","PDTg","PCG","PG","PRNc","PRNv","SG","SSN","SUT","TRN","V","P5","Acs5","PC5","I5","CSl","CSm","LC","LDT","NI","PRNr","RPO","SLC","SLD","AP","CNlam","CNspg","DCO","VCO","CU","GR","ECU","NTB","NTSce","NTSco","NTSge","NTSl","NTSm","SPVC","SPVI","SPVOcdm","SPVOmdmd","SPVOmdmv","SPVOrdm","SPVOvl","Pa5","z","VI","ACVI","VII","ACVII","EV","AMBd","AMBv","DMX","ECO","GRN","ICB","IO","LRNm","LRNp","ISN","LIN","IRN","MARN","MDRNd","MDRNv","PARN","PAS","PGRNd","PGRNl","NIS","NR","PRP","PMR","PPYd","PPYs","LAV","MV","SPIV","SUV","XII","x","y","RM","RPA","RO"],row:["_"]}),Yt&&w.createElement(ra,null,"CB"),w.createElement(hf,{t:p,data_change:ft,data_c:Zt,col:["LING_","LING_","CENT2_","CENT2_","CENT3_","CENT3_","CUL4/5_","CUL4/5_","DEC_","DEC_","FOTU_","FOTU_","PYR_","PYR_","UVU_","UVU_","NOD_","NOD_","SIM_","SIM_","ANcr1_","ANcr1_","ANcr2_","ANcr2_","PRM_","PRM_","COPY_","COPY_","PFL_","PFL_","FL_","FL_","IP","DN"],row:["gr","mo"]}),w.createElement(hf,{t:p,data_change:ft,data_c:Zt,col:["FN","IP","DN","VeCB"],row:["_"]})))),w.createElement(_z,{className:"SwcTable",rowSelection:Xa,columns:$i,dataSource:ir,locale:aa}))):w.createElement(w.Fragment,null,w.createElement(owt,{style:{marginBottom:8},placeholder:"Search",onChange:Ks}),w.createElement(b_,{showLine:!0,onExpand:Ao,defaultExpandParent:!0,expandedKeys:B,onCheck:Pr,checkable:!0,selectable:!1,treeData:ir,checkedKeys:m,checkStrictly:!0,autoExpandParent:K,style:{paddingLeft:"2px"}})))});let cwt=new URL(window.location.href),uwt=new URLSearchParams(cwt.search),xse=uwt.get("brainContourOpacity");const dwt=t=>{const{regionData:e}=t,[n,r]=w.useState(!1);return w.useEffect(()=>{let i=xse?JSON.parse(xse):.3;Nm({filepath:e+"/data/FBX/outline.FBX",index:"Brain",color:"0xcccccc",opacity:i,offsetZ:0,R:1,callback:function(){r(!1)}})},[]),w.createElement("div",{id:"spinner",style:{position:"absolute",zIndex:999,left:0,top:0,width:"100%",height:"100%",display:`${n?"block":"none"}`,opacity:.7,backgroundColor:"#ffffff"}},w.createElement("div",{style:{position:"absolute",zIndex:999,left:"50%",top:"50%",fontWeight:"bold",textAlign:"center"}},w.createElement(pz,{spinning:!0,size:"large"}),w.createElement("br",null),"Loading....wait..."))};(function(t){if(t.TextEncoder&&t.TextDecoder)return!1;function e(r="utf-8"){if(r!=="utf-8")throw new RangeError(`Failed to construct 'TextEncoder': The encoding label provided ('${r}') is invalid.`)}Object.defineProperty(e.prototype,"encoding",{value:"utf-8"}),e.prototype.encode=function(r,i={stream:!1}){if(i.stream)throw new Error("Failed to encode: the 'stream' option is unsupported.");let a=0;const o=r.length;let s=0,c=Math.max(32,o+(o>>1)+7),u=new Uint8Array(c>>3<<3);for(;a<o;){let d=r.charCodeAt(a++);if(d>=55296&&d<=56319){if(a<o){const f=r.charCodeAt(a);(f&64512)===56320&&(++a,d=((d&1023)<<10)+(f&1023)+65536)}if(d>=55296&&d<=56319)continue}if(s+4>u.length){c+=8,c*=1+a/r.length*2,c=c>>3<<3;const f=new Uint8Array(c);f.set(u),u=f}if(d&4294967168)if(!(d&4294965248))u[s++]=d>>6&31|192;else if(!(d&4294901760))u[s++]=d>>12&15|224,u[s++]=d>>6&63|128;else if(!(d&4292870144))u[s++]=d>>18&7|240,u[s++]=d>>12&63|128,u[s++]=d>>6&63|128;else continue;else{u[s++]=d;continue}u[s++]=d&63|128}return u.slice(0,s)};function n(r="utf-8",i={fatal:!1}){if(r!=="utf-8")throw new RangeError(`Failed to construct 'TextDecoder': The encoding label provided ('${r}') is invalid.`);if(i.fatal)throw new Error("Failed to construct 'TextDecoder': the 'fatal' option is unsupported.")}Object.defineProperty(n.prototype,"encoding",{value:"utf-8"}),Object.defineProperty(n.prototype,"fatal",{value:!1}),Object.defineProperty(n.prototype,"ignoreBOM",{value:!1}),n.prototype.decode=function(r,i={stream:!1}){if(i.stream)throw new Error("Failed to decode: the 'stream' option is unsupported.");const a=new Uint8Array(r);let o=0;const s=a.length,c=[];for(;o<s;){const u=a[o++];if(u===0)break;if(!(u&128))c.push(u);else if((u&224)===192){const d=a[o++]&63;c.push((u&31)<<6|d)}else if((u&240)===224){const d=a[o++]&63,f=a[o++]&63;c.push((u&31)<<12|d<<6|f)}else if((u&248)===240){const d=a[o++]&63,f=a[o++]&63,h=a[o++]&63;let p=(u&7)<<18|d<<12|f<<6|h;p>65535&&(p-=65536,c.push(p>>>10&1023|55296),p=56320|p&1023),c.push(p)}}return String.fromCharCode.apply(null,c)},t.TextEncoder=e,t.TextDecoder=n})(typeof window<"u"?window:typeof self<"u"?self:globalThis);function Sse(t,e="utf8"){return new TextDecoder(e).decode(t)}const fwt=new TextEncoder;function hwt(t){return fwt.encode(t)}const pwt=1024*8,vwt=(()=>{const t=new Uint8Array(4),e=new Uint32Array(t.buffer);return!((e[0]=1)&t[0])})(),R7={int8:globalThis.Int8Array,uint8:globalThis.Uint8Array,int16:globalThis.Int16Array,uint16:globalThis.Uint16Array,int32:globalThis.Int32Array,uint32:globalThis.Uint32Array,uint64:globalThis.BigUint64Array,int64:globalThis.BigInt64Array,float32:globalThis.Float32Array,float64:globalThis.Float64Array};class RN{constructor(e=pwt,n={}){let r=!1;typeof e=="number"?e=new ArrayBuffer(e):(r=!0,this.lastWrittenByte=e.byteLength);const i=n.offset?n.offset>>>0:0,a=e.byteLength-i;let o=i;(ArrayBuffer.isView(e)||e instanceof RN)&&(e.byteLength!==e.buffer.byteLength&&(o=e.byteOffset+i),e=e.buffer),r?this.lastWrittenByte=a:this.lastWrittenByte=0,this.buffer=e,this.length=a,this.byteLength=a,this.byteOffset=o,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,o,a),this._mark=0,this._marks=[]}available(e=1){return this.offset+e<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(e=1){return this.offset+=e,this}back(e=1){return this.offset-=e,this}seek(e){return this.offset=e,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){const e=this._marks.pop();if(e===void 0)throw new Error("Mark stack empty");return this.seek(e),this}rewind(){return this.offset=0,this}ensureAvailable(e=1){if(!this.available(e)){const r=(this.offset+e)*2,i=new Uint8Array(r);i.set(new Uint8Array(this.buffer)),this.buffer=i.buffer,this.length=this.byteLength=r,this._data=new DataView(this.buffer)}return this}readBoolean(){return this.readUint8()!==0}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(e=1){return this.readArray(e,"uint8")}readArray(e,n){const r=R7[n].BYTES_PER_ELEMENT*e,i=this.byteOffset+this.offset,a=this.buffer.slice(i,i+r);if(this.littleEndian===vwt&&n!=="uint8"&&n!=="int8"){const s=new Uint8Array(this.buffer.slice(i,i+r));s.reverse();const c=new R7[n](s.buffer);return this.offset+=r,c.reverse(),c}const o=new R7[n](a);return this.offset+=r,o}readInt16(){const e=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,e}readUint16(){const e=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,e}readInt32(){const e=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,e}readUint32(){const e=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,e}readFloat32(){const e=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,e}readFloat64(){const e=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,e}readBigInt64(){const e=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,e}readBigUint64(){const e=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,e}readChar(){return String.fromCharCode(this.readInt8())}readChars(e=1){let n="";for(let r=0;r<e;r++)n+=this.readChar();return n}readUtf8(e=1){return Sse(this.readBytes(e))}decodeText(e=1,n="utf-8"){return Sse(this.readBytes(e),n)}writeBoolean(e){return this.writeUint8(e?255:0),this}writeInt8(e){return this.ensureAvailable(1),this._data.setInt8(this.offset++,e),this._updateLastWrittenByte(),this}writeUint8(e){return this.ensureAvailable(1),this._data.setUint8(this.offset++,e),this._updateLastWrittenByte(),this}writeByte(e){return this.writeUint8(e)}writeBytes(e){this.ensureAvailable(e.length);for(let n=0;n<e.length;n++)this._data.setUint8(this.offset++,e[n]);return this._updateLastWrittenByte(),this}writeInt16(e){return this.ensureAvailable(2),this._data.setInt16(this.offset,e,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeUint16(e){return this.ensureAvailable(2),this._data.setUint16(this.offset,e,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeInt32(e){return this.ensureAvailable(4),this._data.setInt32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeUint32(e){return this.ensureAvailable(4),this._data.setUint32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat32(e){return this.ensureAvailable(4),this._data.setFloat32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat64(e){return this.ensureAvailable(8),this._data.setFloat64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigInt64(e){return this.ensureAvailable(8),this._data.setBigInt64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigUint64(e){return this.ensureAvailable(8),this._data.setBigUint64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeChar(e){return this.writeUint8(e.charCodeAt(0))}writeChars(e){for(let n=0;n<e.length;n++)this.writeUint8(e.charCodeAt(n));return this}writeUtf8(e){return this.writeBytes(hwt(e))}toArray(){return new Uint8Array(this.buffer,this.byteOffset,this.lastWrittenByte)}_updateLastWrittenByte(){this.offset>this.lastWrittenByte&&(this.lastWrittenByte=this.offset)}}function gwt(t){if(t.compression!==1)throw new Error("missing mandatory StripByteCounts field in compressed image");const e=t.rowsPerStrip*t.width*t.samplesPerPixel*(t.bitsPerSample/8);return new Array(t.stripOffsets.length).fill(e)}function mwt(t,e,n){let r=0;for(;r<t.length;){for(let i=n;i<e*n;i+=n)for(let a=0;a<n;a++)t[r+i+a]=t[r+i+a]+t[r+i-(n-a)]&255;r+=e*n}}function ywt(t,e,n){let r=0;for(;r<t.length;){for(let i=n;i<e*n;i+=n)for(let a=0;a<n;a++)t[r+i+a]=t[r+i+a]+t[r+i-(n-a)]&65535;r+=e*n}}const EB={33434:"ExposureTime",33437:"FNumber",34850:"ExposureProgram",34852:"SpectralSensitivity",34855:"ISOSpeedRatings",34856:"OECF",34864:"SensitivityType",34865:"StandardOutputSensitivity",34866:"RecommendedExposureIndex",34867:"ISOSpeed",34868:"ISOSpeedLatitudeyyy",34869:"ISOSpeedLatitudezzz",36864:"ExifVersion",36867:"DateTimeOriginal",36868:"DateTimeDigitized",37121:"ComponentsConfiguration",37122:"CompressedBitsPerPixel",37377:"ShutterSpeedValue",37378:"ApertureValue",37379:"BrightnessValue",37380:"ExposureBiasValue",37381:"MaxApertureValue",37382:"SubjectDistance",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37386:"FocalLength",37396:"SubjectArea",37500:"MakerNote",37510:"UserComment",37520:"SubsecTime",37521:"SubsecTimeOriginal",37522:"SubsecTimeDigitized",40960:"FlashpixVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",40964:"RelatedSoundFile",41483:"FlashEnergy",41484:"SpatialFrequencyResponse",41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:"FocalPlaneResolutionUnit",41492:"SubjectLocation",41493:"ExposureIndex",41495:"SensingMethod",41728:"FileSource",41729:"SceneType",41730:"CFAPattern",41985:"CustomRendered",41986:"ExposureMode",41987:"WhiteBalance",41988:"DigitalZoomRatio",41989:"FocalLengthIn35mmFilm",41990:"SceneCaptureType",41991:"GainControl",41992:"Contrast",41993:"Saturation",41994:"Sharpness",41995:"DeviceSettingDescription",41996:"SubjectDistanceRange",42016:"ImageUniqueID",42032:"CameraOwnerName",42033:"BodySerialNumber",42034:"LensSpecification",42035:"LensMake",42036:"LensModel",42037:"LensSerialNumber",42240:"Gamma"},UEe={};for(const t in EB)UEe[EB[t]]=Number(t);const bwt=Object.freeze(Object.defineProperty({__proto__:null,tagsById:EB,tagsByName:UEe},Symbol.toStringTag,{value:"Module"})),CB={0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude",5:"GPSAltitudeRef",6:"GPSAltitude",7:"GPSTimeStamp",8:"GPSSatellites",9:"GPSStatus",10:"GPSMeasureMode",11:"GPSDOP",12:"GPSSpeedRef",13:"GPSSpeed",14:"GPSTrackRef",15:"GPSTrack",16:"GPSImgDirectionRef",17:"GPSImgDirection",18:"GPSMapDatum",19:"GPSDestLatitudeRef",20:"GPSDestLatitude",21:"GPSDestLongitudeRef",22:"GPSDestLongitude",23:"GPSDestBearingRef",24:"GPSDestBearing",25:"GPSDestDistanceRef",26:"GPSDestDistance",27:"GPSProcessingMethod",28:"GPSAreaInformation",29:"GPSDateStamp",30:"GPSDifferential",31:"GPSHPositioningError"},kEe={};for(const t in CB)kEe[CB[t]]=Number(t);const xwt=Object.freeze(Object.defineProperty({__proto__:null,tagsById:CB,tagsByName:kEe},Symbol.toStringTag,{value:"Module"})),wB={254:"NewSubfileType",255:"SubfileType",256:"ImageWidth",257:"ImageLength",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",263:"Threshholding",264:"CellWidth",265:"CellLength",266:"FillOrder",270:"ImageDescription",271:"Make",272:"Model",273:"StripOffsets",274:"Orientation",277:"SamplesPerPixel",278:"RowsPerStrip",279:"StripByteCounts",280:"MinSampleValue",281:"MaxSampleValue",282:"XResolution",283:"YResolution",284:"PlanarConfiguration",288:"FreeOffsets",289:"FreeByteCounts",290:"GrayResponseUnit",291:"GrayResponseCurve",296:"ResolutionUnit",305:"Software",306:"DateTime",315:"Artist",316:"HostComputer",320:"ColorMap",338:"ExtraSamples",33432:"Copyright",269:"DocumentName",285:"PageName",286:"XPosition",287:"YPosition",292:"T4Options",293:"T6Options",297:"PageNumber",301:"TransferFunction",317:"Predictor",318:"WhitePoint",319:"PrimaryChromaticities",321:"HalftoneHints",322:"TileWidth",323:"TileLength",324:"TileOffsets",325:"TileByteCounts",326:"BadFaxLines",327:"CleanFaxData",328:"ConsecutiveBadFaxLines",330:"SubIFDs",332:"InkSet",333:"InkNames",334:"NumberOfInks",336:"DotRange",337:"TargetPrinter",339:"SampleFormat",340:"SMinSampleValue",341:"SMaxSampleValue",342:"TransferRange",343:"ClipPath",344:"XClipPathUnits",345:"YClipPathUnits",346:"Indexed",347:"JPEGTables",351:"OPIProxy",400:"GlobalParametersIFD",401:"ProfileType",402:"FaxProfile",403:"CodingMethods",404:"VersionYear",405:"ModeNumber",433:"Decode",434:"DefaultImageColor",512:"JPEGProc",513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",515:"JPEGRestartInterval",517:"JPEGLosslessPredictors",518:"JPEGPointTransforms",519:"JPEGQTables",520:"JPEGDCTables",521:"JPEGACTables",529:"YCbCrCoefficients",530:"YCbCrSubSampling",531:"YCbCrPositioning",532:"ReferenceBlackWhite",559:"StripRowCounts",700:"XMP",32781:"ImageID",34732:"ImageLayer",32932:"WangAnnotatio",33445:"MDFileTag",33446:"MDScalePixel",33447:"MDColorTable",33448:"MDLabName",33449:"MDSampleInfo",33450:"MDPrepDate",33451:"MDPrepTime",33452:"MDFileUnits",33550:"ModelPixelScaleTag",33723:"IPTC",33918:"INGRPacketDataTag",33919:"INGRFlagRegisters",33920:"IrasBTransformationMatrix",33922:"ModelTiepointTag",34264:"ModelTransformationTag",34377:"Photoshop",34665:"ExifIFD",34675:"ICCProfile",34735:"GeoKeyDirectoryTag",34736:"GeoDoubleParamsTag",34737:"GeoAsciiParamsTag",34853:"GPSIFD",34908:"HylaFAXFaxRecvParams",34909:"HylaFAXFaxSubAddress",34910:"HylaFAXFaxRecvTime",37724:"ImageSourceData",40965:"InteroperabilityIFD",42112:"GDAL_METADATA",42113:"GDAL_NODATA",50215:"OceScanjobDescription",50216:"OceApplicationSelector",50217:"OceIdentificationNumber",50218:"OceImageLogicCharacteristics",50706:"DNGVersion",50707:"DNGBackwardVersion",50708:"UniqueCameraModel",50709:"LocalizedCameraModel",50710:"CFAPlaneColor",50711:"CFALayout",50712:"LinearizationTable",50713:"BlackLevelRepeatDim",50714:"BlackLevel",50715:"BlackLevelDeltaH",50716:"BlackLevelDeltaV",50717:"WhiteLevel",50718:"DefaultScale",50719:"DefaultCropOrigin",50720:"DefaultCropSize",50721:"ColorMatrix1",50722:"ColorMatrix2",50723:"CameraCalibration1",50724:"CameraCalibration2",50725:"ReductionMatrix1",50726:"ReductionMatrix2",50727:"AnalogBalance",50728:"AsShotNeutral",50729:"AsShotWhiteXY",50730:"BaselineExposure",50731:"BaselineNoise",50732:"BaselineSharpness",50733:"BayerGreenSplit",50734:"LinearResponseLimit",50735:"CameraSerialNumber",50736:"LensInfo",50737:"ChromaBlurRadius",50738:"AntiAliasStrength",50740:"DNGPrivateData",50741:"MakerNoteSafety",50778:"CalibrationIlluminant1",50779:"CalibrationIlluminant2",50780:"BestQualityScale",50784:"AliasLayerMetadata"},FEe={};for(const t in wB)FEe[wB[t]]=Number(t);const Swt=Object.freeze(Object.defineProperty({__proto__:null,tagsById:wB,tagsByName:FEe},Symbol.toStringTag,{value:"Module"})),Ese={standard:Swt,exif:bwt,gps:xwt};class VEe{constructor(e){if(!e)throw new Error("missing kind");this.data=new Uint8Array,this.fields=new Map,this.kind=e,this._hasMap=!1,this._map={}}get(e){if(typeof e=="number")return this.fields.get(e);if(typeof e=="string")return this.fields.get(Ese[this.kind].tagsByName[e]);throw new Error("expected a number or string")}get map(){if(!this._hasMap){const e=Ese[this.kind].tagsById;for(const n of this.fields.keys())e[n]&&(this._map[e[n]]=this.fields.get(n));this._hasMap=!0}return this._map}}const BEe=new Map([[1,[1,Cse]],[2,[1,wwt]],[3,[2,Twt]],[4,[4,_wt]],[5,[8,Iwt]],[6,[1,Awt]],[7,[1,Cse]],[8,[2,Mwt]],[9,[4,Rwt]],[10,[8,Lwt]],[11,[4,Owt]],[12,[8,Pwt]]]);function Ewt(t,e){const n=BEe.get(t);if(!n)throw new Error(`type not found: ${t}`);return n[0]*e}function Cwt(t,e,n){const r=BEe.get(e);if(!r)throw new Error(`type not found: ${e}`);return r[1](t,n)}function Cse(t,e){if(e===1)return t.readUint8();const n=new Uint8Array(e);for(let r=0;r<e;r++)n[r]=t.readUint8();return n}function wwt(t,e){const n=[];let r="";for(let i=0;i<e;i++){const a=String.fromCharCode(t.readUint8());a==="\0"?(n.push(r),r=""):r+=a}return n.length===1?n[0]:n}function Twt(t,e){if(e===1)return t.readUint16();const n=new Uint16Array(e);for(let r=0;r<e;r++)n[r]=t.readUint16();return n}function _wt(t,e){if(e===1)return t.readUint32();const n=new Uint32Array(e);for(let r=0;r<e;r++)n[r]=t.readUint32();return n}function Iwt(t,e){if(e===1)return t.readUint32()/t.readUint32();const n=new Array(e);for(let r=0;r<e;r++)n[r]=t.readUint32()/t.readUint32();return n}function Awt(t,e){if(e===1)return t.readInt8();const n=new Int8Array(e);for(let r=0;r<e;r++)n[r]=t.readInt8();return n}function Mwt(t,e){if(e===1)return t.readInt16();const n=new Int16Array(e);for(let r=0;r<e;r++)n[r]=t.readInt16();return n}function Rwt(t,e){if(e===1)return t.readInt32();const n=new Int32Array(e);for(let r=0;r<e;r++)n[r]=t.readInt32();return n}function Lwt(t,e){if(e===1)return t.readInt32()/t.readInt32();const n=new Array(e);for(let r=0;r<e;r++)n[r]=t.readInt32()/t.readInt32();return n}function Owt(t,e){if(e===1)return t.readFloat32();const n=new Float32Array(e);for(let r=0;r<e;r++)n[r]=t.readFloat32();return n}function Pwt(t,e){if(e===1)return t.readFloat64();const n=new Float64Array(e);for(let r=0;r<e;r++)n[r]=t.readFloat64();return n}const Nwt=256,wse=257,Tse=258,_se=9;let Py=[];function Dwt(){if(Py.length===0){for(let e=0;e<256;e++)Py.push([e]);const t=[];for(let e=256;e<4096;e++)Py.push(t)}}const Uwt=[511,1023,2047,4095],kwt=[0,0,0,0,0,0,0,0,0,511,1023,2047,4095];class Fwt{constructor(e){this.nextData=0,this.nextBits=0,this.bytePointer=0,this.tableLength=Tse,this.currentBitLength=_se,this.stripArray=new Uint8Array(e.buffer,e.byteOffset,e.byteLength),this.outData=new RN(e.byteLength),this.initializeTable()}decode(){let e=0,n=0;for(;(e=this.getNextCode())!==wse;)if(e===Nwt){if(this.initializeTable(),e=this.getNextCode(),e===wse)break;this.writeString(this.stringFromCode(e)),n=e}else if(this.isInTable(e))this.writeString(this.stringFromCode(e)),this.addStringToTable(this.stringFromCode(n).concat(this.stringFromCode(e)[0])),n=e;else{const i=this.stringFromCode(n).concat(this.stringFromCode(n)[0]);this.writeString(i),this.addStringToTable(i),n=e}const r=this.outData.toArray();return new DataView(r.buffer,r.byteOffset,r.byteLength)}initializeTable(){Dwt(),this.tableLength=Tse,this.currentBitLength=_se}writeString(e){this.outData.writeBytes(e)}stringFromCode(e){return Py[e]}isInTable(e){return e<this.tableLength}addStringToTable(e){if(Py[this.tableLength++]=e,Py.length>4096)throw Py=[],new Error("LZW decoding error. Please open an issue at https://github.com/image-js/tiff/issues/new/choose (include a test image).");this.tableLength===kwt[this.currentBitLength]&&this.currentBitLength++}getNextCode(){this.nextData=this.nextData<<8|this.stripArray[this.bytePointer++]&255,this.nextBits+=8,this.nextBits<this.currentBitLength&&(this.nextData=this.nextData<<8|this.stripArray[this.bytePointer++]&255,this.nextBits+=8);const e=this.nextData>>this.nextBits-this.currentBitLength&Uwt[this.currentBitLength-9];return this.nextBits-=this.currentBitLength,this.bytePointer>this.stripArray.length?257:e}}function Vwt(t){return new Fwt(t).decode()}const Bwt=/^(\d{4}):(\d{2}):(\d{2}) (\d{2}):(\d{2}):(\d{2})$/;class Ise extends VEe{constructor(){super("standard")}get size(){return this.width*this.height}get width(){return this.imageWidth}get height(){return this.imageLength}get components(){return this.samplesPerPixel}get date(){const e=new Date,n=Bwt.exec(this.dateTime);if(n===null)throw new Error(`invalid dateTime: ${this.dateTime}`);return e.setFullYear(Number(n[1]),Number(n[2])-1,Number(n[3])),e.setHours(Number(n[4]),Number(n[5]),Number(n[6])),e}get newSubfileType(){return this.get("NewSubfileType")}get imageWidth(){return this.get("ImageWidth")}get imageLength(){return this.get("ImageLength")}get bitsPerSample(){const e=this.get("BitsPerSample");return e&&typeof e!="number"?e[0]:e}get alpha(){const e=this.extraSamples;return e?e[0]!==0:!1}get associatedAlpha(){const e=this.extraSamples;return e?e[0]===1:!1}get extraSamples(){return pR(this.get("ExtraSamples"))}get compression(){return this.get("Compression")||1}get type(){return this.get("PhotometricInterpretation")}get fillOrder(){return this.get("FillOrder")||1}get documentName(){return this.get("DocumentName")}get imageDescription(){return this.get("ImageDescription")}get stripOffsets(){return pR(this.get("StripOffsets"))}get orientation(){return this.get("Orientation")}get samplesPerPixel(){return this.get("SamplesPerPixel")||1}get rowsPerStrip(){return this.get("RowsPerStrip")}get stripByteCounts(){return pR(this.get("StripByteCounts"))}get minSampleValue(){return this.get("MinSampleValue")||0}get maxSampleValue(){return this.get("MaxSampleValue")||2**this.bitsPerSample-1}get xResolution(){return this.get("XResolution")}get yResolution(){return this.get("YResolution")}get planarConfiguration(){return this.get("PlanarConfiguration")||1}get resolutionUnit(){return this.get("ResolutionUnit")||2}get dateTime(){return this.get("DateTime")}get predictor(){return this.get("Predictor")||1}get sampleFormat(){return pR(this.get("SampleFormat")||1)[0]}get sMinSampleValue(){return this.get("SMinSampleValue")||this.minSampleValue}get sMaxSampleValue(){return this.get("SMaxSampleValue")||this.maxSampleValue}get palette(){const e=2**this.bitsPerSample,n=this.get("ColorMap");if(!n)return;if(n.length!==3*e)throw new Error(`ColorMap size must be ${e}`);const r=[];for(let i=0;i<e;i++)r.push([n[i],n[i+e],n[i+2*e]]);return r}}function pR(t){return typeof t=="number"?[t]:t}/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */const $wt=4,Ase=0,Mse=1,zwt=2;function XE(t){let e=t.length;for(;--e>=0;)t[e]=0}const Hwt=0,$Ee=1,Gwt=2,Wwt=3,jwt=258,yW=29,nA=256,J_=nA+1+yW,M2=30,bW=19,zEe=2*J_+1,Ny=15,L7=16,Xwt=7,xW=256,HEe=16,GEe=17,WEe=18,TB=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),FL=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),Zwt=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),jEe=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Kwt=512,ng=new Array((J_+2)*2);XE(ng);const ZT=new Array(M2*2);XE(ZT);const Q_=new Array(Kwt);XE(Q_);const eI=new Array(jwt-Wwt+1);XE(eI);const SW=new Array(yW);XE(SW);const w4=new Array(M2);XE(w4);function O7(t,e,n,r,i){this.static_tree=t,this.extra_bits=e,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=t&&t.length}let XEe,ZEe,KEe;function P7(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}const YEe=t=>t<256?Q_[t]:Q_[256+(t>>>7)],tI=(t,e)=>{t.pending_buf[t.pending++]=e&255,t.pending_buf[t.pending++]=e>>>8&255},Zd=(t,e,n)=>{t.bi_valid>L7-n?(t.bi_buf|=e<<t.bi_valid&65535,tI(t,t.bi_buf),t.bi_buf=e>>L7-t.bi_valid,t.bi_valid+=n-L7):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=n)},Zp=(t,e,n)=>{Zd(t,n[e*2],n[e*2+1])},qEe=(t,e)=>{let n=0;do n|=t&1,t>>>=1,n<<=1;while(--e>0);return n>>>1},Ywt=t=>{t.bi_valid===16?(tI(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=t.bi_buf&255,t.bi_buf>>=8,t.bi_valid-=8)},qwt=(t,e)=>{const n=e.dyn_tree,r=e.max_code,i=e.stat_desc.static_tree,a=e.stat_desc.has_stree,o=e.stat_desc.extra_bits,s=e.stat_desc.extra_base,c=e.stat_desc.max_length;let u,d,f,h,p,v,y=0;for(h=0;h<=Ny;h++)t.bl_count[h]=0;for(n[t.heap[t.heap_max]*2+1]=0,u=t.heap_max+1;u<zEe;u++)d=t.heap[u],h=n[n[d*2+1]*2+1]+1,h>c&&(h=c,y++),n[d*2+1]=h,!(d>r)&&(t.bl_count[h]++,p=0,d>=s&&(p=o[d-s]),v=n[d*2],t.opt_len+=v*(h+p),a&&(t.static_len+=v*(i[d*2+1]+p)));if(y!==0){do{for(h=c-1;t.bl_count[h]===0;)h--;t.bl_count[h]--,t.bl_count[h+1]+=2,t.bl_count[c]--,y-=2}while(y>0);for(h=c;h!==0;h--)for(d=t.bl_count[h];d!==0;)f=t.heap[--u],!(f>r)&&(n[f*2+1]!==h&&(t.opt_len+=(h-n[f*2+1])*n[f*2],n[f*2+1]=h),d--)}},JEe=(t,e,n)=>{const r=new Array(Ny+1);let i=0,a,o;for(a=1;a<=Ny;a++)i=i+n[a-1]<<1,r[a]=i;for(o=0;o<=e;o++){let s=t[o*2+1];s!==0&&(t[o*2]=qEe(r[s]++,s))}},Jwt=()=>{let t,e,n,r,i;const a=new Array(Ny+1);for(n=0,r=0;r<yW-1;r++)for(SW[r]=n,t=0;t<1<<TB[r];t++)eI[n++]=r;for(eI[n-1]=r,i=0,r=0;r<16;r++)for(w4[r]=i,t=0;t<1<<FL[r];t++)Q_[i++]=r;for(i>>=7;r<M2;r++)for(w4[r]=i<<7,t=0;t<1<<FL[r]-7;t++)Q_[256+i++]=r;for(e=0;e<=Ny;e++)a[e]=0;for(t=0;t<=143;)ng[t*2+1]=8,t++,a[8]++;for(;t<=255;)ng[t*2+1]=9,t++,a[9]++;for(;t<=279;)ng[t*2+1]=7,t++,a[7]++;for(;t<=287;)ng[t*2+1]=8,t++,a[8]++;for(JEe(ng,J_+1,a),t=0;t<M2;t++)ZT[t*2+1]=5,ZT[t*2]=qEe(t,5);XEe=new O7(ng,TB,nA+1,J_,Ny),ZEe=new O7(ZT,FL,0,M2,Ny),KEe=new O7(new Array(0),Zwt,0,bW,Xwt)},QEe=t=>{let e;for(e=0;e<J_;e++)t.dyn_ltree[e*2]=0;for(e=0;e<M2;e++)t.dyn_dtree[e*2]=0;for(e=0;e<bW;e++)t.bl_tree[e*2]=0;t.dyn_ltree[xW*2]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},eCe=t=>{t.bi_valid>8?tI(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},Rse=(t,e,n,r)=>{const i=e*2,a=n*2;return t[i]<t[a]||t[i]===t[a]&&r[e]<=r[n]},N7=(t,e,n)=>{const r=t.heap[n];let i=n<<1;for(;i<=t.heap_len&&(i<t.heap_len&&Rse(e,t.heap[i+1],t.heap[i],t.depth)&&i++,!Rse(e,r,t.heap[i],t.depth));)t.heap[n]=t.heap[i],n=i,i<<=1;t.heap[n]=r},Lse=(t,e,n)=>{let r,i,a=0,o,s;if(t.sym_next!==0)do r=t.pending_buf[t.sym_buf+a++]&255,r+=(t.pending_buf[t.sym_buf+a++]&255)<<8,i=t.pending_buf[t.sym_buf+a++],r===0?Zp(t,i,e):(o=eI[i],Zp(t,o+nA+1,e),s=TB[o],s!==0&&(i-=SW[o],Zd(t,i,s)),r--,o=YEe(r),Zp(t,o,n),s=FL[o],s!==0&&(r-=w4[o],Zd(t,r,s)));while(a<t.sym_next);Zp(t,xW,e)},_B=(t,e)=>{const n=e.dyn_tree,r=e.stat_desc.static_tree,i=e.stat_desc.has_stree,a=e.stat_desc.elems;let o,s,c=-1,u;for(t.heap_len=0,t.heap_max=zEe,o=0;o<a;o++)n[o*2]!==0?(t.heap[++t.heap_len]=c=o,t.depth[o]=0):n[o*2+1]=0;for(;t.heap_len<2;)u=t.heap[++t.heap_len]=c<2?++c:0,n[u*2]=1,t.depth[u]=0,t.opt_len--,i&&(t.static_len-=r[u*2+1]);for(e.max_code=c,o=t.heap_len>>1;o>=1;o--)N7(t,n,o);u=a;do o=t.heap[1],t.heap[1]=t.heap[t.heap_len--],N7(t,n,1),s=t.heap[1],t.heap[--t.heap_max]=o,t.heap[--t.heap_max]=s,n[u*2]=n[o*2]+n[s*2],t.depth[u]=(t.depth[o]>=t.depth[s]?t.depth[o]:t.depth[s])+1,n[o*2+1]=n[s*2+1]=u,t.heap[1]=u++,N7(t,n,1);while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],qwt(t,e),JEe(n,c,t.bl_count)},Ose=(t,e,n)=>{let r,i=-1,a,o=e[0*2+1],s=0,c=7,u=4;for(o===0&&(c=138,u=3),e[(n+1)*2+1]=65535,r=0;r<=n;r++)a=o,o=e[(r+1)*2+1],!(++s<c&&a===o)&&(s<u?t.bl_tree[a*2]+=s:a!==0?(a!==i&&t.bl_tree[a*2]++,t.bl_tree[HEe*2]++):s<=10?t.bl_tree[GEe*2]++:t.bl_tree[WEe*2]++,s=0,i=a,o===0?(c=138,u=3):a===o?(c=6,u=3):(c=7,u=4))},Pse=(t,e,n)=>{let r,i=-1,a,o=e[0*2+1],s=0,c=7,u=4;for(o===0&&(c=138,u=3),r=0;r<=n;r++)if(a=o,o=e[(r+1)*2+1],!(++s<c&&a===o)){if(s<u)do Zp(t,a,t.bl_tree);while(--s!==0);else a!==0?(a!==i&&(Zp(t,a,t.bl_tree),s--),Zp(t,HEe,t.bl_tree),Zd(t,s-3,2)):s<=10?(Zp(t,GEe,t.bl_tree),Zd(t,s-3,3)):(Zp(t,WEe,t.bl_tree),Zd(t,s-11,7));s=0,i=a,o===0?(c=138,u=3):a===o?(c=6,u=3):(c=7,u=4)}},Qwt=t=>{let e;for(Ose(t,t.dyn_ltree,t.l_desc.max_code),Ose(t,t.dyn_dtree,t.d_desc.max_code),_B(t,t.bl_desc),e=bW-1;e>=3&&t.bl_tree[jEe[e]*2+1]===0;e--);return t.opt_len+=3*(e+1)+5+5+4,e},eTt=(t,e,n,r)=>{let i;for(Zd(t,e-257,5),Zd(t,n-1,5),Zd(t,r-4,4),i=0;i<r;i++)Zd(t,t.bl_tree[jEe[i]*2+1],3);Pse(t,t.dyn_ltree,e-1),Pse(t,t.dyn_dtree,n-1)},tTt=t=>{let e=4093624447,n;for(n=0;n<=31;n++,e>>>=1)if(e&1&&t.dyn_ltree[n*2]!==0)return Ase;if(t.dyn_ltree[9*2]!==0||t.dyn_ltree[10*2]!==0||t.dyn_ltree[13*2]!==0)return Mse;for(n=32;n<nA;n++)if(t.dyn_ltree[n*2]!==0)return Mse;return Ase};let Nse=!1;const nTt=t=>{Nse||(Jwt(),Nse=!0),t.l_desc=new P7(t.dyn_ltree,XEe),t.d_desc=new P7(t.dyn_dtree,ZEe),t.bl_desc=new P7(t.bl_tree,KEe),t.bi_buf=0,t.bi_valid=0,QEe(t)},tCe=(t,e,n,r)=>{Zd(t,(Hwt<<1)+(r?1:0),3),eCe(t),tI(t,n),tI(t,~n),n&&t.pending_buf.set(t.window.subarray(e,e+n),t.pending),t.pending+=n},rTt=t=>{Zd(t,$Ee<<1,3),Zp(t,xW,ng),Ywt(t)},iTt=(t,e,n,r)=>{let i,a,o=0;t.level>0?(t.strm.data_type===zwt&&(t.strm.data_type=tTt(t)),_B(t,t.l_desc),_B(t,t.d_desc),o=Qwt(t),i=t.opt_len+3+7>>>3,a=t.static_len+3+7>>>3,a<=i&&(i=a)):i=a=n+5,n+4<=i&&e!==-1?tCe(t,e,n,r):t.strategy===$wt||a===i?(Zd(t,($Ee<<1)+(r?1:0),3),Lse(t,ng,ZT)):(Zd(t,(Gwt<<1)+(r?1:0),3),eTt(t,t.l_desc.max_code+1,t.d_desc.max_code+1,o+1),Lse(t,t.dyn_ltree,t.dyn_dtree)),QEe(t),r&&eCe(t)},aTt=(t,e,n)=>(t.pending_buf[t.sym_buf+t.sym_next++]=e,t.pending_buf[t.sym_buf+t.sym_next++]=e>>8,t.pending_buf[t.sym_buf+t.sym_next++]=n,e===0?t.dyn_ltree[n*2]++:(t.matches++,e--,t.dyn_ltree[(eI[n]+nA+1)*2]++,t.dyn_dtree[YEe(e)*2]++),t.sym_next===t.sym_end);var oTt=nTt,sTt=tCe,lTt=iTt,cTt=aTt,uTt=rTt,dTt={_tr_init:oTt,_tr_stored_block:sTt,_tr_flush_block:lTt,_tr_tally:cTt,_tr_align:uTt};const fTt=(t,e,n,r)=>{let i=t&65535|0,a=t>>>16&65535|0,o=0;for(;n!==0;){o=n>2e3?2e3:n,n-=o;do i=i+e[r++]|0,a=a+i|0;while(--o);i%=65521,a%=65521}return i|a<<16|0};var nI=fTt;const hTt=()=>{let t,e=[];for(var n=0;n<256;n++){t=n;for(var r=0;r<8;r++)t=t&1?3988292384^t>>>1:t>>>1;e[n]=t}return e},pTt=new Uint32Array(hTt()),vTt=(t,e,n,r)=>{const i=pTt,a=r+n;t^=-1;for(let o=r;o<a;o++)t=t>>>8^i[(t^e[o])&255];return t^-1};var Dc=vTt,oE={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},rA={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:gTt,_tr_stored_block:IB,_tr_flush_block:mTt,_tr_tally:i0,_tr_align:yTt}=dTt,{Z_NO_FLUSH:a0,Z_PARTIAL_FLUSH:bTt,Z_FULL_FLUSH:xTt,Z_FINISH:ph,Z_BLOCK:Dse,Z_OK:ru,Z_STREAM_END:Use,Z_STREAM_ERROR:rv,Z_DATA_ERROR:STt,Z_BUF_ERROR:D7,Z_DEFAULT_COMPRESSION:ETt,Z_FILTERED:CTt,Z_HUFFMAN_ONLY:vR,Z_RLE:wTt,Z_FIXED:TTt,Z_DEFAULT_STRATEGY:_Tt,Z_UNKNOWN:ITt,Z_DEFLATED:LN}=rA,ATt=9,MTt=15,RTt=8,LTt=29,OTt=256,AB=OTt+1+LTt,PTt=30,NTt=19,DTt=2*AB+1,UTt=15,co=3,Km=258,iv=Km+co+1,kTt=32,sE=42,EW=57,MB=69,RB=73,LB=91,OB=103,Dy=113,dT=666,gd=1,ZE=2,Cb=3,KE=4,FTt=3,Uy=(t,e)=>(t.msg=oE[e],e),kse=t=>t*2-(t>4?9:0),Dm=t=>{let e=t.length;for(;--e>=0;)t[e]=0},VTt=t=>{let e,n,r,i=t.w_size;e=t.hash_size,r=e;do n=t.head[--r],t.head[r]=n>=i?n-i:0;while(--e);e=i,r=e;do n=t.prev[--r],t.prev[r]=n>=i?n-i:0;while(--e)};let BTt=(t,e,n)=>(e<<t.hash_shift^n)&t.hash_mask,o0=BTt;const yf=t=>{const e=t.state;let n=e.pending;n>t.avail_out&&(n=t.avail_out),n!==0&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+n),t.next_out),t.next_out+=n,e.pending_out+=n,t.total_out+=n,t.avail_out-=n,e.pending-=n,e.pending===0&&(e.pending_out=0))},If=(t,e)=>{mTt(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,yf(t.strm)},Fo=(t,e)=>{t.pending_buf[t.pending++]=e},_w=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=e&255},PB=(t,e,n,r)=>{let i=t.avail_in;return i>r&&(i=r),i===0?0:(t.avail_in-=i,e.set(t.input.subarray(t.next_in,t.next_in+i),n),t.state.wrap===1?t.adler=nI(t.adler,e,i,n):t.state.wrap===2&&(t.adler=Dc(t.adler,e,i,n)),t.next_in+=i,t.total_in+=i,i)},nCe=(t,e)=>{let n=t.max_chain_length,r=t.strstart,i,a,o=t.prev_length,s=t.nice_match;const c=t.strstart>t.w_size-iv?t.strstart-(t.w_size-iv):0,u=t.window,d=t.w_mask,f=t.prev,h=t.strstart+Km;let p=u[r+o-1],v=u[r+o];t.prev_length>=t.good_match&&(n>>=2),s>t.lookahead&&(s=t.lookahead);do if(i=e,!(u[i+o]!==v||u[i+o-1]!==p||u[i]!==u[r]||u[++i]!==u[r+1])){r+=2,i++;do;while(u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&r<h);if(a=Km-(h-r),r=h-Km,a>o){if(t.match_start=e,o=a,a>=s)break;p=u[r+o-1],v=u[r+o]}}while((e=f[e&d])>c&&--n!==0);return o<=t.lookahead?o:t.lookahead},lE=t=>{const e=t.w_size;let n,r,i;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-iv)&&(t.window.set(t.window.subarray(e,e+e-r),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,t.insert>t.strstart&&(t.insert=t.strstart),VTt(t),r+=e),t.strm.avail_in===0)break;if(n=PB(t.strm,t.window,t.strstart+t.lookahead,r),t.lookahead+=n,t.lookahead+t.insert>=co)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=o0(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=o0(t,t.ins_h,t.window[i+co-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<co)););}while(t.lookahead<iv&&t.strm.avail_in!==0)},rCe=(t,e)=>{let n=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,r,i,a,o=0,s=t.strm.avail_in;do{if(r=65535,a=t.bi_valid+42>>3,t.strm.avail_out<a||(a=t.strm.avail_out-a,i=t.strstart-t.block_start,r>i+t.strm.avail_in&&(r=i+t.strm.avail_in),r>a&&(r=a),r<n&&(r===0&&e!==ph||e===a0||r!==i+t.strm.avail_in)))break;o=e===ph&&r===i+t.strm.avail_in?1:0,IB(t,0,0,o),t.pending_buf[t.pending-4]=r,t.pending_buf[t.pending-3]=r>>8,t.pending_buf[t.pending-2]=~r,t.pending_buf[t.pending-1]=~r>>8,yf(t.strm),i&&(i>r&&(i=r),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+i),t.strm.next_out),t.strm.next_out+=i,t.strm.avail_out-=i,t.strm.total_out+=i,t.block_start+=i,r-=i),r&&(PB(t.strm,t.strm.output,t.strm.next_out,r),t.strm.next_out+=r,t.strm.avail_out-=r,t.strm.total_out+=r)}while(o===0);return s-=t.strm.avail_in,s&&(s>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=s&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-s,t.strm.next_in),t.strstart),t.strstart+=s,t.insert+=s>t.w_size-t.insert?t.w_size-t.insert:s),t.block_start=t.strstart),t.high_water<t.strstart&&(t.high_water=t.strstart),o?KE:e!==a0&&e!==ph&&t.strm.avail_in===0&&t.strstart===t.block_start?ZE:(a=t.window_size-t.strstart,t.strm.avail_in>a&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,a+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),a>t.strm.avail_in&&(a=t.strm.avail_in),a&&(PB(t.strm,t.window,t.strstart,a),t.strstart+=a,t.insert+=a>t.w_size-t.insert?t.w_size-t.insert:a),t.high_water<t.strstart&&(t.high_water=t.strstart),a=t.bi_valid+42>>3,a=t.pending_buf_size-a>65535?65535:t.pending_buf_size-a,n=a>t.w_size?t.w_size:a,i=t.strstart-t.block_start,(i>=n||(i||e===ph)&&e!==a0&&t.strm.avail_in===0&&i<=a)&&(r=i>a?a:i,o=e===ph&&t.strm.avail_in===0&&r===i?1:0,IB(t,t.block_start,r,o),t.block_start+=r,yf(t.strm)),o?Cb:gd)},U7=(t,e)=>{let n,r;for(;;){if(t.lookahead<iv){if(lE(t),t.lookahead<iv&&e===a0)return gd;if(t.lookahead===0)break}if(n=0,t.lookahead>=co&&(t.ins_h=o0(t,t.ins_h,t.window[t.strstart+co-1]),n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),n!==0&&t.strstart-n<=t.w_size-iv&&(t.match_length=nCe(t,n)),t.match_length>=co)if(r=i0(t,t.strstart-t.match_start,t.match_length-co),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=co){t.match_length--;do t.strstart++,t.ins_h=o0(t,t.ins_h,t.window[t.strstart+co-1]),n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart;while(--t.match_length!==0);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=o0(t,t.ins_h,t.window[t.strstart+1]);else r=i0(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(r&&(If(t,!1),t.strm.avail_out===0))return gd}return t.insert=t.strstart<co-1?t.strstart:co-1,e===ph?(If(t,!0),t.strm.avail_out===0?Cb:KE):t.sym_next&&(If(t,!1),t.strm.avail_out===0)?gd:ZE},aS=(t,e)=>{let n,r,i;for(;;){if(t.lookahead<iv){if(lE(t),t.lookahead<iv&&e===a0)return gd;if(t.lookahead===0)break}if(n=0,t.lookahead>=co&&(t.ins_h=o0(t,t.ins_h,t.window[t.strstart+co-1]),n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=co-1,n!==0&&t.prev_length<t.max_lazy_match&&t.strstart-n<=t.w_size-iv&&(t.match_length=nCe(t,n),t.match_length<=5&&(t.strategy===CTt||t.match_length===co&&t.strstart-t.match_start>4096)&&(t.match_length=co-1)),t.prev_length>=co&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-co,r=i0(t,t.strstart-1-t.prev_match,t.prev_length-co),t.lookahead-=t.prev_length-1,t.prev_length-=2;do++t.strstart<=i&&(t.ins_h=o0(t,t.ins_h,t.window[t.strstart+co-1]),n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart);while(--t.prev_length!==0);if(t.match_available=0,t.match_length=co-1,t.strstart++,r&&(If(t,!1),t.strm.avail_out===0))return gd}else if(t.match_available){if(r=i0(t,0,t.window[t.strstart-1]),r&&If(t,!1),t.strstart++,t.lookahead--,t.strm.avail_out===0)return gd}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(r=i0(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<co-1?t.strstart:co-1,e===ph?(If(t,!0),t.strm.avail_out===0?Cb:KE):t.sym_next&&(If(t,!1),t.strm.avail_out===0)?gd:ZE},$Tt=(t,e)=>{let n,r,i,a;const o=t.window;for(;;){if(t.lookahead<=Km){if(lE(t),t.lookahead<=Km&&e===a0)return gd;if(t.lookahead===0)break}if(t.match_length=0,t.lookahead>=co&&t.strstart>0&&(i=t.strstart-1,r=o[i],r===o[++i]&&r===o[++i]&&r===o[++i])){a=t.strstart+Km;do;while(r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&i<a);t.match_length=Km-(a-i),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=co?(n=i0(t,1,t.match_length-co),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(n=i0(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),n&&(If(t,!1),t.strm.avail_out===0))return gd}return t.insert=0,e===ph?(If(t,!0),t.strm.avail_out===0?Cb:KE):t.sym_next&&(If(t,!1),t.strm.avail_out===0)?gd:ZE},zTt=(t,e)=>{let n;for(;;){if(t.lookahead===0&&(lE(t),t.lookahead===0)){if(e===a0)return gd;break}if(t.match_length=0,n=i0(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,n&&(If(t,!1),t.strm.avail_out===0))return gd}return t.insert=0,e===ph?(If(t,!0),t.strm.avail_out===0?Cb:KE):t.sym_next&&(If(t,!1),t.strm.avail_out===0)?gd:ZE};function Op(t,e,n,r,i){this.good_length=t,this.max_lazy=e,this.nice_length=n,this.max_chain=r,this.func=i}const fT=[new Op(0,0,0,0,rCe),new Op(4,4,8,4,U7),new Op(4,5,16,8,U7),new Op(4,6,32,32,U7),new Op(4,4,16,16,aS),new Op(8,16,32,32,aS),new Op(8,16,128,128,aS),new Op(8,32,128,256,aS),new Op(32,128,258,1024,aS),new Op(32,258,258,4096,aS)],HTt=t=>{t.window_size=2*t.w_size,Dm(t.head),t.max_lazy_match=fT[t.level].max_lazy,t.good_match=fT[t.level].good_length,t.nice_match=fT[t.level].nice_length,t.max_chain_length=fT[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=co-1,t.match_available=0,t.ins_h=0};function GTt(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=LN,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(DTt*2),this.dyn_dtree=new Uint16Array((2*PTt+1)*2),this.bl_tree=new Uint16Array((2*NTt+1)*2),Dm(this.dyn_ltree),Dm(this.dyn_dtree),Dm(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(UTt+1),this.heap=new Uint16Array(2*AB+1),Dm(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*AB+1),Dm(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const iA=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.status!==sE&&e.status!==EW&&e.status!==MB&&e.status!==RB&&e.status!==LB&&e.status!==OB&&e.status!==Dy&&e.status!==dT?1:0},iCe=t=>{if(iA(t))return Uy(t,rv);t.total_in=t.total_out=0,t.data_type=ITt;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap===2?EW:e.wrap?sE:Dy,t.adler=e.wrap===2?0:1,e.last_flush=-2,gTt(e),ru},aCe=t=>{const e=iCe(t);return e===ru&&HTt(t.state),e},WTt=(t,e)=>iA(t)||t.state.wrap!==2?rv:(t.state.gzhead=e,ru),oCe=(t,e,n,r,i,a)=>{if(!t)return rv;let o=1;if(e===ETt&&(e=6),r<0?(o=0,r=-r):r>15&&(o=2,r-=16),i<1||i>ATt||n!==LN||r<8||r>15||e<0||e>9||a<0||a>TTt||r===8&&o!==1)return Uy(t,rv);r===8&&(r=9);const s=new GTt;return t.state=s,s.strm=t,s.status=sE,s.wrap=o,s.gzhead=null,s.w_bits=r,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=i+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+co-1)/co),s.window=new Uint8Array(s.w_size*2),s.head=new Uint16Array(s.hash_size),s.prev=new Uint16Array(s.w_size),s.lit_bufsize=1<<i+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new Uint8Array(s.pending_buf_size),s.sym_buf=s.lit_bufsize,s.sym_end=(s.lit_bufsize-1)*3,s.level=e,s.strategy=a,s.method=n,aCe(t)},jTt=(t,e)=>oCe(t,e,LN,MTt,RTt,_Tt),XTt=(t,e)=>{if(iA(t)||e>Dse||e<0)return t?Uy(t,rv):rv;const n=t.state;if(!t.output||t.avail_in!==0&&!t.input||n.status===dT&&e!==ph)return Uy(t,t.avail_out===0?D7:rv);const r=n.last_flush;if(n.last_flush=e,n.pending!==0){if(yf(t),t.avail_out===0)return n.last_flush=-1,ru}else if(t.avail_in===0&&kse(e)<=kse(r)&&e!==ph)return Uy(t,D7);if(n.status===dT&&t.avail_in!==0)return Uy(t,D7);if(n.status===sE&&n.wrap===0&&(n.status=Dy),n.status===sE){let i=LN+(n.w_bits-8<<4)<<8,a=-1;if(n.strategy>=vR||n.level<2?a=0:n.level<6?a=1:n.level===6?a=2:a=3,i|=a<<6,n.strstart!==0&&(i|=kTt),i+=31-i%31,_w(n,i),n.strstart!==0&&(_w(n,t.adler>>>16),_w(n,t.adler&65535)),t.adler=1,n.status=Dy,yf(t),n.pending!==0)return n.last_flush=-1,ru}if(n.status===EW){if(t.adler=0,Fo(n,31),Fo(n,139),Fo(n,8),n.gzhead)Fo(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),Fo(n,n.gzhead.time&255),Fo(n,n.gzhead.time>>8&255),Fo(n,n.gzhead.time>>16&255),Fo(n,n.gzhead.time>>24&255),Fo(n,n.level===9?2:n.strategy>=vR||n.level<2?4:0),Fo(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(Fo(n,n.gzhead.extra.length&255),Fo(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(t.adler=Dc(t.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=MB;else if(Fo(n,0),Fo(n,0),Fo(n,0),Fo(n,0),Fo(n,0),Fo(n,n.level===9?2:n.strategy>=vR||n.level<2?4:0),Fo(n,FTt),n.status=Dy,yf(t),n.pending!==0)return n.last_flush=-1,ru}if(n.status===MB){if(n.gzhead.extra){let i=n.pending,a=(n.gzhead.extra.length&65535)-n.gzindex;for(;n.pending+a>n.pending_buf_size;){let s=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+s),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>i&&(t.adler=Dc(t.adler,n.pending_buf,n.pending-i,i)),n.gzindex+=s,yf(t),n.pending!==0)return n.last_flush=-1,ru;i=0,a-=s}let o=new Uint8Array(n.gzhead.extra);n.pending_buf.set(o.subarray(n.gzindex,n.gzindex+a),n.pending),n.pending+=a,n.gzhead.hcrc&&n.pending>i&&(t.adler=Dc(t.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=RB}if(n.status===RB){if(n.gzhead.name){let i=n.pending,a;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(t.adler=Dc(t.adler,n.pending_buf,n.pending-i,i)),yf(t),n.pending!==0)return n.last_flush=-1,ru;i=0}n.gzindex<n.gzhead.name.length?a=n.gzhead.name.charCodeAt(n.gzindex++)&255:a=0,Fo(n,a)}while(a!==0);n.gzhead.hcrc&&n.pending>i&&(t.adler=Dc(t.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=LB}if(n.status===LB){if(n.gzhead.comment){let i=n.pending,a;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(t.adler=Dc(t.adler,n.pending_buf,n.pending-i,i)),yf(t),n.pending!==0)return n.last_flush=-1,ru;i=0}n.gzindex<n.gzhead.comment.length?a=n.gzhead.comment.charCodeAt(n.gzindex++)&255:a=0,Fo(n,a)}while(a!==0);n.gzhead.hcrc&&n.pending>i&&(t.adler=Dc(t.adler,n.pending_buf,n.pending-i,i))}n.status=OB}if(n.status===OB){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(yf(t),n.pending!==0))return n.last_flush=-1,ru;Fo(n,t.adler&255),Fo(n,t.adler>>8&255),t.adler=0}if(n.status=Dy,yf(t),n.pending!==0)return n.last_flush=-1,ru}if(t.avail_in!==0||n.lookahead!==0||e!==a0&&n.status!==dT){let i=n.level===0?rCe(n,e):n.strategy===vR?zTt(n,e):n.strategy===wTt?$Tt(n,e):fT[n.level].func(n,e);if((i===Cb||i===KE)&&(n.status=dT),i===gd||i===Cb)return t.avail_out===0&&(n.last_flush=-1),ru;if(i===ZE&&(e===bTt?yTt(n):e!==Dse&&(IB(n,0,0,!1),e===xTt&&(Dm(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),yf(t),t.avail_out===0))return n.last_flush=-1,ru}return e!==ph?ru:n.wrap<=0?Use:(n.wrap===2?(Fo(n,t.adler&255),Fo(n,t.adler>>8&255),Fo(n,t.adler>>16&255),Fo(n,t.adler>>24&255),Fo(n,t.total_in&255),Fo(n,t.total_in>>8&255),Fo(n,t.total_in>>16&255),Fo(n,t.total_in>>24&255)):(_w(n,t.adler>>>16),_w(n,t.adler&65535)),yf(t),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?ru:Use)},ZTt=t=>{if(iA(t))return rv;const e=t.state.status;return t.state=null,e===Dy?Uy(t,STt):ru},KTt=(t,e)=>{let n=e.length;if(iA(t))return rv;const r=t.state,i=r.wrap;if(i===2||i===1&&r.status!==sE||r.lookahead)return rv;if(i===1&&(t.adler=nI(t.adler,e,n,0)),r.wrap=0,n>=r.w_size){i===0&&(Dm(r.head),r.strstart=0,r.block_start=0,r.insert=0);let c=new Uint8Array(r.w_size);c.set(e.subarray(n-r.w_size,n),0),e=c,n=r.w_size}const a=t.avail_in,o=t.next_in,s=t.input;for(t.avail_in=n,t.next_in=0,t.input=e,lE(r);r.lookahead>=co;){let c=r.strstart,u=r.lookahead-(co-1);do r.ins_h=o0(r,r.ins_h,r.window[c+co-1]),r.prev[c&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=c,c++;while(--u);r.strstart=c,r.lookahead=co-1,lE(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=co-1,r.match_available=0,t.next_in=o,t.input=s,t.avail_in=a,r.wrap=i,ru};var YTt=jTt,qTt=oCe,JTt=aCe,QTt=iCe,e_t=WTt,t_t=XTt,n_t=ZTt,r_t=KTt,i_t="pako deflate (from Nodeca project)",KT={deflateInit:YTt,deflateInit2:qTt,deflateReset:JTt,deflateResetKeep:QTt,deflateSetHeader:e_t,deflate:t_t,deflateEnd:n_t,deflateSetDictionary:r_t,deflateInfo:i_t};const a_t=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var o_t=function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const n=e.shift();if(n){if(typeof n!="object")throw new TypeError(n+"must be non-object");for(const r in n)a_t(n,r)&&(t[r]=n[r])}}return t},s_t=t=>{let e=0;for(let r=0,i=t.length;r<i;r++)e+=t[r].length;const n=new Uint8Array(e);for(let r=0,i=0,a=t.length;r<a;r++){let o=t[r];n.set(o,i),i+=o.length}return n},ON={assign:o_t,flattenChunks:s_t};let sCe=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{sCe=!1}const rI=new Uint8Array(256);for(let t=0;t<256;t++)rI[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;rI[254]=rI[254]=1;var l_t=t=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(t);let e,n,r,i,a,o=t.length,s=0;for(i=0;i<o;i++)n=t.charCodeAt(i),(n&64512)===55296&&i+1<o&&(r=t.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),s+=n<128?1:n<2048?2:n<65536?3:4;for(e=new Uint8Array(s),a=0,i=0;a<s;i++)n=t.charCodeAt(i),(n&64512)===55296&&i+1<o&&(r=t.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),n<128?e[a++]=n:n<2048?(e[a++]=192|n>>>6,e[a++]=128|n&63):n<65536?(e[a++]=224|n>>>12,e[a++]=128|n>>>6&63,e[a++]=128|n&63):(e[a++]=240|n>>>18,e[a++]=128|n>>>12&63,e[a++]=128|n>>>6&63,e[a++]=128|n&63);return e};const c_t=(t,e)=>{if(e<65534&&t.subarray&&sCe)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let n="";for(let r=0;r<e;r++)n+=String.fromCharCode(t[r]);return n};var u_t=(t,e)=>{const n=e||t.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(t.subarray(0,e));let r,i;const a=new Array(n*2);for(i=0,r=0;r<n;){let o=t[r++];if(o<128){a[i++]=o;continue}let s=rI[o];if(s>4){a[i++]=65533,r+=s-1;continue}for(o&=s===2?31:s===3?15:7;s>1&&r<n;)o=o<<6|t[r++]&63,s--;if(s>1){a[i++]=65533;continue}o<65536?a[i++]=o:(o-=65536,a[i++]=55296|o>>10&1023,a[i++]=56320|o&1023)}return c_t(a,i)},d_t=(t,e)=>{e=e||t.length,e>t.length&&(e=t.length);let n=e-1;for(;n>=0&&(t[n]&192)===128;)n--;return n<0||n===0?e:n+rI[t[n]]>e?n:e},iI={string2buf:l_t,buf2string:u_t,utf8border:d_t};function f_t(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var lCe=f_t;const cCe=Object.prototype.toString,{Z_NO_FLUSH:h_t,Z_SYNC_FLUSH:p_t,Z_FULL_FLUSH:v_t,Z_FINISH:g_t,Z_OK:T4,Z_STREAM_END:m_t,Z_DEFAULT_COMPRESSION:y_t,Z_DEFAULT_STRATEGY:b_t,Z_DEFLATED:x_t}=rA;function CW(t){this.options=ON.assign({level:y_t,method:x_t,chunkSize:16384,windowBits:15,memLevel:8,strategy:b_t},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new lCe,this.strm.avail_out=0;let n=KT.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(n!==T4)throw new Error(oE[n]);if(e.header&&KT.deflateSetHeader(this.strm,e.header),e.dictionary){let r;if(typeof e.dictionary=="string"?r=iI.string2buf(e.dictionary):cCe.call(e.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(e.dictionary):r=e.dictionary,n=KT.deflateSetDictionary(this.strm,r),n!==T4)throw new Error(oE[n]);this._dict_set=!0}}CW.prototype.push=function(t,e){const n=this.strm,r=this.options.chunkSize;let i,a;if(this.ended)return!1;for(e===~~e?a=e:a=e===!0?g_t:h_t,typeof t=="string"?n.input=iI.string2buf(t):cCe.call(t)==="[object ArrayBuffer]"?n.input=new Uint8Array(t):n.input=t,n.next_in=0,n.avail_in=n.input.length;;){if(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),(a===p_t||a===v_t)&&n.avail_out<=6){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(i=KT.deflate(n,a),i===m_t)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=KT.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===T4;if(n.avail_out===0){this.onData(n.output);continue}if(a>0&&n.next_out>0){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(n.avail_in===0)break}return!0};CW.prototype.onData=function(t){this.chunks.push(t)};CW.prototype.onEnd=function(t){t===T4&&(this.result=ON.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};const gR=16209,S_t=16191;var E_t=function(e,n){let r,i,a,o,s,c,u,d,f,h,p,v,y,m,g,x,b,S,E,T,M,L,R,O;const N=e.state;r=e.next_in,R=e.input,i=r+(e.avail_in-5),a=e.next_out,O=e.output,o=a-(n-e.avail_out),s=a+(e.avail_out-257),c=N.dmax,u=N.wsize,d=N.whave,f=N.wnext,h=N.window,p=N.hold,v=N.bits,y=N.lencode,m=N.distcode,g=(1<<N.lenbits)-1,x=(1<<N.distbits)-1;e:do{v<15&&(p+=R[r++]<<v,v+=8,p+=R[r++]<<v,v+=8),b=y[p&g];t:for(;;){if(S=b>>>24,p>>>=S,v-=S,S=b>>>16&255,S===0)O[a++]=b&65535;else if(S&16){E=b&65535,S&=15,S&&(v<S&&(p+=R[r++]<<v,v+=8),E+=p&(1<<S)-1,p>>>=S,v-=S),v<15&&(p+=R[r++]<<v,v+=8,p+=R[r++]<<v,v+=8),b=m[p&x];n:for(;;){if(S=b>>>24,p>>>=S,v-=S,S=b>>>16&255,S&16){if(T=b&65535,S&=15,v<S&&(p+=R[r++]<<v,v+=8,v<S&&(p+=R[r++]<<v,v+=8)),T+=p&(1<<S)-1,T>c){e.msg="invalid distance too far back",N.mode=gR;break e}if(p>>>=S,v-=S,S=a-o,T>S){if(S=T-S,S>d&&N.sane){e.msg="invalid distance too far back",N.mode=gR;break e}if(M=0,L=h,f===0){if(M+=u-S,S<E){E-=S;do O[a++]=h[M++];while(--S);M=a-T,L=O}}else if(f<S){if(M+=u+f-S,S-=f,S<E){E-=S;do O[a++]=h[M++];while(--S);if(M=0,f<E){S=f,E-=S;do O[a++]=h[M++];while(--S);M=a-T,L=O}}}else if(M+=f-S,S<E){E-=S;do O[a++]=h[M++];while(--S);M=a-T,L=O}for(;E>2;)O[a++]=L[M++],O[a++]=L[M++],O[a++]=L[M++],E-=3;E&&(O[a++]=L[M++],E>1&&(O[a++]=L[M++]))}else{M=a-T;do O[a++]=O[M++],O[a++]=O[M++],O[a++]=O[M++],E-=3;while(E>2);E&&(O[a++]=O[M++],E>1&&(O[a++]=O[M++]))}}else if(S&64){e.msg="invalid distance code",N.mode=gR;break e}else{b=m[(b&65535)+(p&(1<<S)-1)];continue n}break}}else if(S&64)if(S&32){N.mode=S_t;break e}else{e.msg="invalid literal/length code",N.mode=gR;break e}else{b=y[(b&65535)+(p&(1<<S)-1)];continue t}break}}while(r<i&&a<s);E=v>>3,r-=E,v-=E<<3,p&=(1<<v)-1,e.next_in=r,e.next_out=a,e.avail_in=r<i?5+(i-r):5-(r-i),e.avail_out=a<s?257+(s-a):257-(a-s),N.hold=p,N.bits=v};const oS=15,Fse=852,Vse=592,Bse=0,k7=1,$se=2,C_t=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),w_t=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),T_t=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),__t=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),I_t=(t,e,n,r,i,a,o,s)=>{const c=s.bits;let u=0,d=0,f=0,h=0,p=0,v=0,y=0,m=0,g=0,x=0,b,S,E,T,M,L=null,R;const O=new Uint16Array(oS+1),N=new Uint16Array(oS+1);let U=null,k,D,V;for(u=0;u<=oS;u++)O[u]=0;for(d=0;d<r;d++)O[e[n+d]]++;for(p=c,h=oS;h>=1&&O[h]===0;h--);if(p>h&&(p=h),h===0)return i[a++]=1<<24|64<<16|0,i[a++]=1<<24|64<<16|0,s.bits=1,0;for(f=1;f<h&&O[f]===0;f++);for(p<f&&(p=f),m=1,u=1;u<=oS;u++)if(m<<=1,m-=O[u],m<0)return-1;if(m>0&&(t===Bse||h!==1))return-1;for(N[1]=0,u=1;u<oS;u++)N[u+1]=N[u]+O[u];for(d=0;d<r;d++)e[n+d]!==0&&(o[N[e[n+d]]++]=d);if(t===Bse?(L=U=o,R=20):t===k7?(L=C_t,U=w_t,R=257):(L=T_t,U=__t,R=0),x=0,d=0,u=f,M=a,v=p,y=0,E=-1,g=1<<p,T=g-1,t===k7&&g>Fse||t===$se&&g>Vse)return 1;for(;;){k=u-y,o[d]+1<R?(D=0,V=o[d]):o[d]>=R?(D=U[o[d]-R],V=L[o[d]-R]):(D=32+64,V=0),b=1<<u-y,S=1<<v,f=S;do S-=b,i[M+(x>>y)+S]=k<<24|D<<16|V|0;while(S!==0);for(b=1<<u-1;x&b;)b>>=1;if(b!==0?(x&=b-1,x+=b):x=0,d++,--O[u]===0){if(u===h)break;u=e[n+o[d]]}if(u>p&&(x&T)!==E){for(y===0&&(y=p),M+=f,v=u-y,m=1<<v;v+y<h&&(m-=O[v+y],!(m<=0));)v++,m<<=1;if(g+=1<<v,t===k7&&g>Fse||t===$se&&g>Vse)return 1;E=x&T,i[E]=p<<24|v<<16|M-a|0}}return x!==0&&(i[M+x]=u-y<<24|64<<16|0),s.bits=p,0};var YT=I_t;const A_t=0,uCe=1,dCe=2,{Z_FINISH:zse,Z_BLOCK:M_t,Z_TREES:mR,Z_OK:wb,Z_STREAM_END:R_t,Z_NEED_DICT:L_t,Z_STREAM_ERROR:wh,Z_DATA_ERROR:fCe,Z_MEM_ERROR:hCe,Z_BUF_ERROR:O_t,Z_DEFLATED:Hse}=rA,PN=16180,Gse=16181,Wse=16182,jse=16183,Xse=16184,Zse=16185,Kse=16186,Yse=16187,qse=16188,Jse=16189,_4=16190,Hv=16191,F7=16192,Qse=16193,V7=16194,ele=16195,tle=16196,nle=16197,rle=16198,yR=16199,bR=16200,ile=16201,ale=16202,ole=16203,sle=16204,lle=16205,B7=16206,cle=16207,ule=16208,Gs=16209,pCe=16210,vCe=16211,P_t=852,N_t=592,D_t=15,U_t=D_t,dle=t=>(t>>>24&255)+(t>>>8&65280)+((t&65280)<<8)+((t&255)<<24);function k_t(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Gb=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.mode<PN||e.mode>vCe?1:0},gCe=t=>{if(Gb(t))return wh;const e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=e.wrap&1),e.mode=PN,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(P_t),e.distcode=e.distdyn=new Int32Array(N_t),e.sane=1,e.back=-1,wb},mCe=t=>{if(Gb(t))return wh;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,gCe(t)},yCe=(t,e)=>{let n;if(Gb(t))return wh;const r=t.state;return e<0?(n=0,e=-e):(n=(e>>4)+5,e<48&&(e&=15)),e&&(e<8||e>15)?wh:(r.window!==null&&r.wbits!==e&&(r.window=null),r.wrap=n,r.wbits=e,mCe(t))},bCe=(t,e)=>{if(!t)return wh;const n=new k_t;t.state=n,n.strm=t,n.window=null,n.mode=PN;const r=yCe(t,e);return r!==wb&&(t.state=null),r},F_t=t=>bCe(t,U_t);let fle=!0,$7,z7;const V_t=t=>{if(fle){$7=new Int32Array(512),z7=new Int32Array(32);let e=0;for(;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(YT(uCe,t.lens,0,288,$7,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;YT(dCe,t.lens,0,32,z7,0,t.work,{bits:5}),fle=!1}t.lencode=$7,t.lenbits=9,t.distcode=z7,t.distbits=5},xCe=(t,e,n,r)=>{let i;const a=t.state;return a.window===null&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new Uint8Array(a.wsize)),r>=a.wsize?(a.window.set(e.subarray(n-a.wsize,n),0),a.wnext=0,a.whave=a.wsize):(i=a.wsize-a.wnext,i>r&&(i=r),a.window.set(e.subarray(n-r,n-r+i),a.wnext),r-=i,r?(a.window.set(e.subarray(n-r,n),0),a.wnext=r,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=i))),0},B_t=(t,e)=>{let n,r,i,a,o,s,c,u,d,f,h,p,v,y,m=0,g,x,b,S,E,T,M,L;const R=new Uint8Array(4);let O,N;const U=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Gb(t)||!t.output||!t.input&&t.avail_in!==0)return wh;n=t.state,n.mode===Hv&&(n.mode=F7),o=t.next_out,i=t.output,c=t.avail_out,a=t.next_in,r=t.input,s=t.avail_in,u=n.hold,d=n.bits,f=s,h=c,L=wb;e:for(;;)switch(n.mode){case PN:if(n.wrap===0){n.mode=F7;break}for(;d<16;){if(s===0)break e;s--,u+=r[a++]<<d,d+=8}if(n.wrap&2&&u===35615){n.wbits===0&&(n.wbits=15),n.check=0,R[0]=u&255,R[1]=u>>>8&255,n.check=Dc(n.check,R,2,0),u=0,d=0,n.mode=Gse;break}if(n.head&&(n.head.done=!1),!(n.wrap&1)||(((u&255)<<8)+(u>>8))%31){t.msg="incorrect header check",n.mode=Gs;break}if((u&15)!==Hse){t.msg="unknown compression method",n.mode=Gs;break}if(u>>>=4,d-=4,M=(u&15)+8,n.wbits===0&&(n.wbits=M),M>15||M>n.wbits){t.msg="invalid window size",n.mode=Gs;break}n.dmax=1<<n.wbits,n.flags=0,t.adler=n.check=1,n.mode=u&512?Jse:Hv,u=0,d=0;break;case Gse:for(;d<16;){if(s===0)break e;s--,u+=r[a++]<<d,d+=8}if(n.flags=u,(n.flags&255)!==Hse){t.msg="unknown compression method",n.mode=Gs;break}if(n.flags&57344){t.msg="unknown header flags set",n.mode=Gs;break}n.head&&(n.head.text=u>>8&1),n.flags&512&&n.wrap&4&&(R[0]=u&255,R[1]=u>>>8&255,n.check=Dc(n.check,R,2,0)),u=0,d=0,n.mode=Wse;case Wse:for(;d<32;){if(s===0)break e;s--,u+=r[a++]<<d,d+=8}n.head&&(n.head.time=u),n.flags&512&&n.wrap&4&&(R[0]=u&255,R[1]=u>>>8&255,R[2]=u>>>16&255,R[3]=u>>>24&255,n.check=Dc(n.check,R,4,0)),u=0,d=0,n.mode=jse;case jse:for(;d<16;){if(s===0)break e;s--,u+=r[a++]<<d,d+=8}n.head&&(n.head.xflags=u&255,n.head.os=u>>8),n.flags&512&&n.wrap&4&&(R[0]=u&255,R[1]=u>>>8&255,n.check=Dc(n.check,R,2,0)),u=0,d=0,n.mode=Xse;case Xse:if(n.flags&1024){for(;d<16;){if(s===0)break e;s--,u+=r[a++]<<d,d+=8}n.length=u,n.head&&(n.head.extra_len=u),n.flags&512&&n.wrap&4&&(R[0]=u&255,R[1]=u>>>8&255,n.check=Dc(n.check,R,2,0)),u=0,d=0}else n.head&&(n.head.extra=null);n.mode=Zse;case Zse:if(n.flags&1024&&(p=n.length,p>s&&(p=s),p&&(n.head&&(M=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(a,a+p),M)),n.flags&512&&n.wrap&4&&(n.check=Dc(n.check,r,p,a)),s-=p,a+=p,n.length-=p),n.length))break e;n.length=0,n.mode=Kse;case Kse:if(n.flags&2048){if(s===0)break e;p=0;do M=r[a+p++],n.head&&M&&n.length<65536&&(n.head.name+=String.fromCharCode(M));while(M&&p<s);if(n.flags&512&&n.wrap&4&&(n.check=Dc(n.check,r,p,a)),s-=p,a+=p,M)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=Yse;case Yse:if(n.flags&4096){if(s===0)break e;p=0;do M=r[a+p++],n.head&&M&&n.length<65536&&(n.head.comment+=String.fromCharCode(M));while(M&&p<s);if(n.flags&512&&n.wrap&4&&(n.check=Dc(n.check,r,p,a)),s-=p,a+=p,M)break e}else n.head&&(n.head.comment=null);n.mode=qse;case qse:if(n.flags&512){for(;d<16;){if(s===0)break e;s--,u+=r[a++]<<d,d+=8}if(n.wrap&4&&u!==(n.check&65535)){t.msg="header crc mismatch",n.mode=Gs;break}u=0,d=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),t.adler=n.check=0,n.mode=Hv;break;case Jse:for(;d<32;){if(s===0)break e;s--,u+=r[a++]<<d,d+=8}t.adler=n.check=dle(u),u=0,d=0,n.mode=_4;case _4:if(n.havedict===0)return t.next_out=o,t.avail_out=c,t.next_in=a,t.avail_in=s,n.hold=u,n.bits=d,L_t;t.adler=n.check=1,n.mode=Hv;case Hv:if(e===M_t||e===mR)break e;case F7:if(n.last){u>>>=d&7,d-=d&7,n.mode=B7;break}for(;d<3;){if(s===0)break e;s--,u+=r[a++]<<d,d+=8}switch(n.last=u&1,u>>>=1,d-=1,u&3){case 0:n.mode=Qse;break;case 1:if(V_t(n),n.mode=yR,e===mR){u>>>=2,d-=2;break e}break;case 2:n.mode=tle;break;case 3:t.msg="invalid block type",n.mode=Gs}u>>>=2,d-=2;break;case Qse:for(u>>>=d&7,d-=d&7;d<32;){if(s===0)break e;s--,u+=r[a++]<<d,d+=8}if((u&65535)!==(u>>>16^65535)){t.msg="invalid stored block lengths",n.mode=Gs;break}if(n.length=u&65535,u=0,d=0,n.mode=V7,e===mR)break e;case V7:n.mode=ele;case ele:if(p=n.length,p){if(p>s&&(p=s),p>c&&(p=c),p===0)break e;i.set(r.subarray(a,a+p),o),s-=p,a+=p,c-=p,o+=p,n.length-=p;break}n.mode=Hv;break;case tle:for(;d<14;){if(s===0)break e;s--,u+=r[a++]<<d,d+=8}if(n.nlen=(u&31)+257,u>>>=5,d-=5,n.ndist=(u&31)+1,u>>>=5,d-=5,n.ncode=(u&15)+4,u>>>=4,d-=4,n.nlen>286||n.ndist>30){t.msg="too many length or distance symbols",n.mode=Gs;break}n.have=0,n.mode=nle;case nle:for(;n.have<n.ncode;){for(;d<3;){if(s===0)break e;s--,u+=r[a++]<<d,d+=8}n.lens[U[n.have++]]=u&7,u>>>=3,d-=3}for(;n.have<19;)n.lens[U[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,O={bits:n.lenbits},L=YT(A_t,n.lens,0,19,n.lencode,0,n.work,O),n.lenbits=O.bits,L){t.msg="invalid code lengths set",n.mode=Gs;break}n.have=0,n.mode=rle;case rle:for(;n.have<n.nlen+n.ndist;){for(;m=n.lencode[u&(1<<n.lenbits)-1],g=m>>>24,x=m>>>16&255,b=m&65535,!(g<=d);){if(s===0)break e;s--,u+=r[a++]<<d,d+=8}if(b<16)u>>>=g,d-=g,n.lens[n.have++]=b;else{if(b===16){for(N=g+2;d<N;){if(s===0)break e;s--,u+=r[a++]<<d,d+=8}if(u>>>=g,d-=g,n.have===0){t.msg="invalid bit length repeat",n.mode=Gs;break}M=n.lens[n.have-1],p=3+(u&3),u>>>=2,d-=2}else if(b===17){for(N=g+3;d<N;){if(s===0)break e;s--,u+=r[a++]<<d,d+=8}u>>>=g,d-=g,M=0,p=3+(u&7),u>>>=3,d-=3}else{for(N=g+7;d<N;){if(s===0)break e;s--,u+=r[a++]<<d,d+=8}u>>>=g,d-=g,M=0,p=11+(u&127),u>>>=7,d-=7}if(n.have+p>n.nlen+n.ndist){t.msg="invalid bit length repeat",n.mode=Gs;break}for(;p--;)n.lens[n.have++]=M}}if(n.mode===Gs)break;if(n.lens[256]===0){t.msg="invalid code -- missing end-of-block",n.mode=Gs;break}if(n.lenbits=9,O={bits:n.lenbits},L=YT(uCe,n.lens,0,n.nlen,n.lencode,0,n.work,O),n.lenbits=O.bits,L){t.msg="invalid literal/lengths set",n.mode=Gs;break}if(n.distbits=6,n.distcode=n.distdyn,O={bits:n.distbits},L=YT(dCe,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,O),n.distbits=O.bits,L){t.msg="invalid distances set",n.mode=Gs;break}if(n.mode=yR,e===mR)break e;case yR:n.mode=bR;case bR:if(s>=6&&c>=258){t.next_out=o,t.avail_out=c,t.next_in=a,t.avail_in=s,n.hold=u,n.bits=d,E_t(t,h),o=t.next_out,i=t.output,c=t.avail_out,a=t.next_in,r=t.input,s=t.avail_in,u=n.hold,d=n.bits,n.mode===Hv&&(n.back=-1);break}for(n.back=0;m=n.lencode[u&(1<<n.lenbits)-1],g=m>>>24,x=m>>>16&255,b=m&65535,!(g<=d);){if(s===0)break e;s--,u+=r[a++]<<d,d+=8}if(x&&!(x&240)){for(S=g,E=x,T=b;m=n.lencode[T+((u&(1<<S+E)-1)>>S)],g=m>>>24,x=m>>>16&255,b=m&65535,!(S+g<=d);){if(s===0)break e;s--,u+=r[a++]<<d,d+=8}u>>>=S,d-=S,n.back+=S}if(u>>>=g,d-=g,n.back+=g,n.length=b,x===0){n.mode=lle;break}if(x&32){n.back=-1,n.mode=Hv;break}if(x&64){t.msg="invalid literal/length code",n.mode=Gs;break}n.extra=x&15,n.mode=ile;case ile:if(n.extra){for(N=n.extra;d<N;){if(s===0)break e;s--,u+=r[a++]<<d,d+=8}n.length+=u&(1<<n.extra)-1,u>>>=n.extra,d-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=ale;case ale:for(;m=n.distcode[u&(1<<n.distbits)-1],g=m>>>24,x=m>>>16&255,b=m&65535,!(g<=d);){if(s===0)break e;s--,u+=r[a++]<<d,d+=8}if(!(x&240)){for(S=g,E=x,T=b;m=n.distcode[T+((u&(1<<S+E)-1)>>S)],g=m>>>24,x=m>>>16&255,b=m&65535,!(S+g<=d);){if(s===0)break e;s--,u+=r[a++]<<d,d+=8}u>>>=S,d-=S,n.back+=S}if(u>>>=g,d-=g,n.back+=g,x&64){t.msg="invalid distance code",n.mode=Gs;break}n.offset=b,n.extra=x&15,n.mode=ole;case ole:if(n.extra){for(N=n.extra;d<N;){if(s===0)break e;s--,u+=r[a++]<<d,d+=8}n.offset+=u&(1<<n.extra)-1,u>>>=n.extra,d-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){t.msg="invalid distance too far back",n.mode=Gs;break}n.mode=sle;case sle:if(c===0)break e;if(p=h-c,n.offset>p){if(p=n.offset-p,p>n.whave&&n.sane){t.msg="invalid distance too far back",n.mode=Gs;break}p>n.wnext?(p-=n.wnext,v=n.wsize-p):v=n.wnext-p,p>n.length&&(p=n.length),y=n.window}else y=i,v=o-n.offset,p=n.length;p>c&&(p=c),c-=p,n.length-=p;do i[o++]=y[v++];while(--p);n.length===0&&(n.mode=bR);break;case lle:if(c===0)break e;i[o++]=n.length,c--,n.mode=bR;break;case B7:if(n.wrap){for(;d<32;){if(s===0)break e;s--,u|=r[a++]<<d,d+=8}if(h-=c,t.total_out+=h,n.total+=h,n.wrap&4&&h&&(t.adler=n.check=n.flags?Dc(n.check,i,h,o-h):nI(n.check,i,h,o-h)),h=c,n.wrap&4&&(n.flags?u:dle(u))!==n.check){t.msg="incorrect data check",n.mode=Gs;break}u=0,d=0}n.mode=cle;case cle:if(n.wrap&&n.flags){for(;d<32;){if(s===0)break e;s--,u+=r[a++]<<d,d+=8}if(n.wrap&4&&u!==(n.total&4294967295)){t.msg="incorrect length check",n.mode=Gs;break}u=0,d=0}n.mode=ule;case ule:L=R_t;break e;case Gs:L=fCe;break e;case pCe:return hCe;case vCe:default:return wh}return t.next_out=o,t.avail_out=c,t.next_in=a,t.avail_in=s,n.hold=u,n.bits=d,(n.wsize||h!==t.avail_out&&n.mode<Gs&&(n.mode<B7||e!==zse))&&xCe(t,t.output,t.next_out,h-t.avail_out),f-=t.avail_in,h-=t.avail_out,t.total_in+=f,t.total_out+=h,n.total+=h,n.wrap&4&&h&&(t.adler=n.check=n.flags?Dc(n.check,i,h,t.next_out-h):nI(n.check,i,h,t.next_out-h)),t.data_type=n.bits+(n.last?64:0)+(n.mode===Hv?128:0)+(n.mode===yR||n.mode===V7?256:0),(f===0&&h===0||e===zse)&&L===wb&&(L=O_t),L},$_t=t=>{if(Gb(t))return wh;let e=t.state;return e.window&&(e.window=null),t.state=null,wb},z_t=(t,e)=>{if(Gb(t))return wh;const n=t.state;return n.wrap&2?(n.head=e,e.done=!1,wb):wh},H_t=(t,e)=>{const n=e.length;let r,i,a;return Gb(t)||(r=t.state,r.wrap!==0&&r.mode!==_4)?wh:r.mode===_4&&(i=1,i=nI(i,e,n,0),i!==r.check)?fCe:(a=xCe(t,e,n,n),a?(r.mode=pCe,hCe):(r.havedict=1,wb))};var G_t=mCe,W_t=yCe,j_t=gCe,X_t=F_t,Z_t=bCe,K_t=B_t,Y_t=$_t,q_t=z_t,J_t=H_t,Q_t="pako inflate (from Nodeca project)",rg={inflateReset:G_t,inflateReset2:W_t,inflateResetKeep:j_t,inflateInit:X_t,inflateInit2:Z_t,inflate:K_t,inflateEnd:Y_t,inflateGetHeader:q_t,inflateSetDictionary:J_t,inflateInfo:Q_t};function eIt(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var tIt=eIt;const SCe=Object.prototype.toString,{Z_NO_FLUSH:nIt,Z_FINISH:rIt,Z_OK:aI,Z_STREAM_END:H7,Z_NEED_DICT:G7,Z_STREAM_ERROR:iIt,Z_DATA_ERROR:hle,Z_MEM_ERROR:aIt}=rA;function aA(t){this.options=ON.assign({chunkSize:1024*64,windowBits:15,to:""},t||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,e.windowBits===0&&(e.windowBits=-15)),e.windowBits>=0&&e.windowBits<16&&!(t&&t.windowBits)&&(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(e.windowBits&15||(e.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new lCe,this.strm.avail_out=0;let n=rg.inflateInit2(this.strm,e.windowBits);if(n!==aI)throw new Error(oE[n]);if(this.header=new tIt,rg.inflateGetHeader(this.strm,this.header),e.dictionary&&(typeof e.dictionary=="string"?e.dictionary=iI.string2buf(e.dictionary):SCe.call(e.dictionary)==="[object ArrayBuffer]"&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(n=rg.inflateSetDictionary(this.strm,e.dictionary),n!==aI)))throw new Error(oE[n])}aA.prototype.push=function(t,e){const n=this.strm,r=this.options.chunkSize,i=this.options.dictionary;let a,o,s;if(this.ended)return!1;for(e===~~e?o=e:o=e===!0?rIt:nIt,SCe.call(t)==="[object ArrayBuffer]"?n.input=new Uint8Array(t):n.input=t,n.next_in=0,n.avail_in=n.input.length;;){for(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),a=rg.inflate(n,o),a===G7&&i&&(a=rg.inflateSetDictionary(n,i),a===aI?a=rg.inflate(n,o):a===hle&&(a=G7));n.avail_in>0&&a===H7&&n.state.wrap>0&&t[n.next_in]!==0;)rg.inflateReset(n),a=rg.inflate(n,o);switch(a){case iIt:case hle:case G7:case aIt:return this.onEnd(a),this.ended=!0,!1}if(s=n.avail_out,n.next_out&&(n.avail_out===0||a===H7))if(this.options.to==="string"){let c=iI.utf8border(n.output,n.next_out),u=n.next_out-c,d=iI.buf2string(n.output,c);n.next_out=u,n.avail_out=r-u,u&&n.output.set(n.output.subarray(c,c+u),0),this.onData(d)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(!(a===aI&&s===0)){if(a===H7)return a=rg.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,!0;if(n.avail_in===0)break}}return!0};aA.prototype.onData=function(t){this.chunks.push(t)};aA.prototype.onEnd=function(t){t===aI&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=ON.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function wW(t,e){const n=new aA(e);if(n.push(t),n.err)throw n.msg||oE[n.err];return n.result}function oIt(t,e){return e=e||{},e.raw=!0,wW(t,e)}var sIt=aA,lIt=wW,cIt=oIt,uIt=wW,dIt=rA,fIt={Inflate:sIt,inflate:lIt,inflateRaw:cIt,ungzip:uIt,constants:dIt};const{Inflate:yMt,inflate:hIt,inflateRaw:bMt,ungzip:xMt}=fIt;var ECe=hIt;function pIt(t){const e=new Uint8Array(t.buffer,t.byteOffset,t.byteLength),n=ECe(e);return new DataView(n.buffer,n.byteOffset,n.byteLength)}const vIt={ignoreImageData:!1};class CCe extends RN{constructor(e){super(e),this._nextIFD=0}get isMultiPage(){let e=0;for(this.decodeHeader();this._nextIFD;)if(e++,this.decodeIFD({ignoreImageData:!0},!0),e===2)return!0;if(e===1)return!1;throw qv("ifdCount",e)}get pageCount(){let e=0;for(this.decodeHeader();this._nextIFD;)e++,this.decodeIFD({ignoreImageData:!0},!0);if(e>0)return e;throw qv("ifdCount",e)}decode(e={}){const{pages:n}=e;xIt(n);const r=n?Math.max(...n):1/0;e={...vIt,...e};const i=[];this.decodeHeader();let a=0;for(;this._nextIFD;){if(n){if(n.includes(a)?i.push(this.decodeIFD(e,!0)):this.decodeIFD({ignoreImageData:!0},!0),a===r)break}else i.push(this.decodeIFD(e,!0));a++}if(a<r&&r!==1/0)throw new RangeError(`Index ${r} is out of bounds. The stack only contains ${a} images.`);return i}decodeHeader(){const e=this.readUint16();if(e===18761)this.setLittleEndian();else if(e===19789)this.setBigEndian();else throw new Error(`invalid byte order: 0x${e.toString(16)}`);if(this.readUint16()!==42)throw new Error("not a TIFF file");this._nextIFD=this.readUint32()}decodeIFD(e,n){this.seek(this._nextIFD);let r;if(n)r=new Ise;else{if(!e.kind)throw new Error("kind is missing");r=new VEe(e.kind)}const i=this.readUint16();for(let a=0;a<i;a++)this.decodeIFDEntry(r);if(!e.ignoreImageData){if(!(r instanceof Ise))throw new Error("must be a tiff ifd");this.decodeImageData(r)}return this._nextIFD=this.readUint32(),r}decodeIFDEntry(e){const n=this.offset,r=this.readUint16(),i=this.readUint16(),a=this.readUint32();if(i<1||i>12){this.skip(4);return}Ewt(i,a)>4&&this.seek(this.readUint32());const s=Cwt(this,i,a);if(e.fields.set(r,s),r===34665||r===34853){const c=this.offset;let u="exif";r===34665?u="exif":r===34853&&(u="gps"),this._nextIFD=s,e[u]=this.decodeIFD({kind:u,ignoreImageData:!0},!1),this.offset=c}this.seek(n),this.skip(12)}decodeImageData(e){const n=e.orientation;if(n&&n!==1)throw qv("orientation",n);switch(e.type){case 0:case 1:case 2:case 3:this.readStripData(e);break;default:throw qv("image type",e.type)}if(this.applyPredictor(e),this.convertAlpha(e),e.type===0){const i=2**e.bitsPerSample-1;for(let a=0;a<e.data.length;a++)e.data[a]=i-e.data[a]}}readStripData(e){const n=e.width,r=e.height,i=e.bitsPerSample,a=e.sampleFormat,o=n*r*e.samplesPerPixel,s=gIt(o,i,a),u=e.rowsPerStrip*n*e.samplesPerPixel,d=e.stripOffsets,f=e.stripByteCounts||gwt(e);let h=o,p=0;for(let v=0;v<d.length;v++){const y=new DataView(this.buffer,this.byteOffset+d[v],f[v]),m=h>u?u:h;h-=m;let g=y;switch(e.compression){case 1:break;case 5:{g=Vwt(y);break}case 8:{g=pIt(y);break}case 2:throw qv("Compression","CCITT Group 3");case 32773:throw qv("Compression","PackBits");default:throw qv("Compression",e.compression)}p=this.fillUncompressed(i,a,s,g,p,m)}e.data=s}fillUncompressed(e,n,r,i,a,o){if(e===8)return mIt(r,i,a,o);if(e===16)return yIt(r,i,a,o,this.isLittleEndian());if(e===32&&n===3)return bIt(r,i,a,o,this.isLittleEndian());throw qv("bitDepth",e)}applyPredictor(e){const n=e.bitsPerSample;switch(e.predictor){case 1:break;case 2:{if(n===8)mwt(e.data,e.width,e.components);else if(n===16)ywt(e.data,e.width,e.components);else throw new Error(`Horizontal differencing is only supported for images with a bit depth of ${n}`);break}default:throw new Error(`invalid predictor: ${e.predictor}`)}}convertAlpha(e){if(e.alpha&&e.associatedAlpha){const{data:n,components:r,maxSampleValue:i}=e;for(let a=0;a<n.length;a+=r){const o=n[a+r-1];for(let s=0;s<r-1;s++)n[a+s]=Math.round(n[a+s]*i/o)}}}}function gIt(t,e,n){if(e===8)return new Uint8Array(t);if(e===16)return new Uint16Array(t);if(e===32&&n===3)return new Float32Array(t);throw qv("bit depth / sample format",`${e} / ${n}`)}function mIt(t,e,n,r){for(let i=0;i<r;i++)t[n++]=e.getUint8(i);return n}function yIt(t,e,n,r,i){for(let a=0;a<r*2;a+=2)t[n++]=e.getUint16(a,i);return n}function bIt(t,e,n,r,i){for(let a=0;a<r*4;a+=4)t[n++]=e.getFloat32(a,i);return n}function qv(t,e){return new Error(`Unsupported ${t}: ${e}`)}function xIt(t){if(t){for(const e of t)if(e<0||!Number.isInteger(e))throw new RangeError(`Index ${e} is invalid. Must be a positive integer.`)}}function W7(t,e){return new CCe(t).decode(e)}function ple(t){return new CCe(t).pageCount}function gu(t){return(e,...n)=>SIt(t,e,n)}function YE(t,e){return gu(wCe(t,e).get)}const{apply:SIt,construct:SMt,defineProperty:EMt,get:CMt,getOwnPropertyDescriptor:wCe,getPrototypeOf:TW,has:wMt,ownKeys:EIt,set:TMt,setPrototypeOf:_Mt}=Reflect,{iterator:oA,species:IMt,toStringTag:CIt,for:AMt}=Symbol,wIt=Object,{create:_W,defineProperty:TIt,freeze:MMt,is:RMt}=wIt,_It=Array,IIt=_It.prototype,TCe=IIt[oA],AIt=gu(TCe),_Ce=ArrayBuffer,MIt=_Ce.prototype;YE(MIt,"byteLength");const vle=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:null;vle&&YE(vle.prototype,"byteLength");const ICe=TW(Uint8Array);ICe.from;const Td=ICe.prototype;Td[oA];gu(Td.keys);gu(Td.values);gu(Td.entries);gu(Td.set);gu(Td.reverse);gu(Td.fill);gu(Td.copyWithin);gu(Td.sort);gu(Td.slice);gu(Td.subarray);YE(Td,"buffer");YE(Td,"byteOffset");YE(Td,"length");YE(Td,CIt);const RIt=Uint8Array,ACe=Uint16Array,IW=Uint32Array,LIt=Float32Array,oI=TW([][oA]()),MCe=gu(oI.next),OIt=gu(function*(){}().next),PIt=TW(oI),NIt=DataView.prototype,DIt=gu(NIt.getUint16),AW=WeakMap,RCe=AW.prototype,LCe=gu(RCe.get),UIt=gu(RCe.set),OCe=new AW,kIt=_W(null,{next:{value:function(){const e=LCe(OCe,this);return MCe(e)}},[oA]:{value:function(){return this}}});function FIt(t){if(t[oA]===TCe&&oI.next===MCe)return t;const e=_W(kIt);return UIt(OCe,e,AIt(t)),e}const VIt=new AW,BIt=_W(PIt,{next:{value:function(){const e=LCe(VIt,this);return OIt(e)},writable:!0,configurable:!0}});for(const t of EIt(oI))t!=="next"&&TIt(BIt,t,wCe(oI,t));const PCe=new _Ce(4),$It=new LIt(PCe),zIt=new IW(PCe),Pp=new ACe(512),Np=new RIt(512);for(let t=0;t<256;++t){const e=t-127;e<-24?(Pp[t]=0,Pp[t|256]=32768,Np[t]=24,Np[t|256]=24):e<-14?(Pp[t]=1024>>-e-14,Pp[t|256]=1024>>-e-14|32768,Np[t]=-e-1,Np[t|256]=-e-1):e<=15?(Pp[t]=e+15<<10,Pp[t|256]=e+15<<10|32768,Np[t]=13,Np[t|256]=13):e<128?(Pp[t]=31744,Pp[t|256]=64512,Np[t]=24,Np[t|256]=24):(Pp[t]=31744,Pp[t|256]=64512,Np[t]=13,Np[t|256]=13)}const MW=new IW(2048);for(let t=1;t<1024;++t){let e=t<<13,n=0;for(;!(e&8388608);)e<<=1,n-=8388608;e&=-8388609,n+=947912704,MW[t]=e|n}for(let t=1024;t<2048;++t)MW[t]=939524096+(t-1024<<13);const qE=new IW(64);for(let t=1;t<31;++t)qE[t]=t<<23;qE[31]=1199570944;qE[32]=2147483648;for(let t=33;t<63;++t)qE[t]=2147483648+(t-32<<23);qE[63]=3347054592;const NCe=new ACe(64);for(let t=1;t<64;++t)t!==32&&(NCe[t]=1024);function HIt(t){const e=t>>10;return zIt[0]=MW[NCe[e]+(t&1023)]+qE[e],$It[0]}function DCe(t,e,...n){return HIt(DIt(t,e,...FIt(n)))}var R2={},GIt={get exports(){return R2},set exports(t){R2=t}};function UCe(t,e,n){const r=n&&n.debug||!1;r&&console.log("[xml-utils] getting "+e+" in "+t);const i=typeof t=="object"?t.outer:t,a=i.slice(0,i.indexOf(">")+1),o=['"',"'"];for(let s=0;s<o.length;s++){const c=o[s],u=e+"\\="+c+"([^"+c+"]*)"+c;r&&console.log("[xml-utils] pattern:",u);const f=new RegExp(u).exec(a);if(r&&console.log("[xml-utils] match:",f),f)return f[1]}}GIt.exports=UCe;R2.default=UCe;var I4={},WIt={get exports(){return I4},set exports(t){I4=t}},A4={},jIt={get exports(){return A4},set exports(t){A4=t}},M4={},XIt={get exports(){return M4},set exports(t){M4=t}};function kCe(t,e,n){const i=new RegExp(e).exec(t.slice(n));return i?n+i.index:-1}XIt.exports=kCe;M4.default=kCe;var R4={},ZIt={get exports(){return R4},set exports(t){R4=t}};function FCe(t,e,n){const i=new RegExp(e).exec(t.slice(n));return i?n+i.index+i[0].length-1:-1}ZIt.exports=FCe;R4.default=FCe;var L4={},KIt={get exports(){return L4},set exports(t){L4=t}};function VCe(t,e){const n=new RegExp(e,"g"),r=t.match(n);return r?r.length:0}KIt.exports=VCe;L4.default=VCe;const YIt=M4,j7=R4,gle=L4;function BCe(t,e,n){const r=n&&n.debug||!1,i=!(n&&typeof n.nested===!1),a=n&&n.startIndex||0;r&&console.log("[xml-utils] starting findTagByName with",e," and ",n);const o=YIt(t,`<${e}[
|
|
4310
4310
|
>/]`,a);if(r&&console.log("[xml-utils] start:",o),o===-1)return;const s=t.slice(o+e.length);let c=j7(s,"^[^<]*[ /]>",0);const u=c!==-1&&s[c-1]==="/";if(r&&console.log("[xml-utils] selfClosing:",u),u===!1)if(i){let p=0,v=1,y=0;for(;(c=j7(s,"[ /]"+e+">",p))!==-1;){const m=s.substring(p,c+1);if(v+=gle(m,"<"+e+`[
|
|
4311
|
-
>]`),y+=gle(m,"</"+e+">"),y>=v)break;p=c}}else c=j7(s,"[ /]"+e+">",0);const d=o+e.length+c+1;if(r&&console.log("[xml-utils] end:",d),d===-1)return;const f=t.slice(o,d);let h;return u?h=null:h=f.slice(f.indexOf(">")+1,f.lastIndexOf("<")),{inner:h,outer:f,start:o,end:d}}jIt.exports=BCe;A4.default=BCe;const qIt=A4;function $Ce(t,e,n){const r=[],i=n&&n.debug||!1,a=n&&typeof n.nested=="boolean"?n.nested:!0;let o=n&&n.startIndex||0,s;for(;s=qIt(t,e,{debug:i,startIndex:o});)a?o=s.start+1+e.length:o=s.end,r.push(s);return i&&console.log("findTagsByName found",r.length,"tags"),r}WIt.exports=$Ce;I4.default=$Ce;const qT={315:"Artist",258:"BitsPerSample",265:"CellLength",264:"CellWidth",320:"ColorMap",259:"Compression",33432:"Copyright",306:"DateTime",338:"ExtraSamples",266:"FillOrder",289:"FreeByteCounts",288:"FreeOffsets",291:"GrayResponseCurve",290:"GrayResponseUnit",316:"HostComputer",270:"ImageDescription",257:"ImageLength",256:"ImageWidth",271:"Make",281:"MaxSampleValue",280:"MinSampleValue",272:"Model",254:"NewSubfileType",274:"Orientation",262:"PhotometricInterpretation",284:"PlanarConfiguration",296:"ResolutionUnit",278:"RowsPerStrip",277:"SamplesPerPixel",305:"Software",279:"StripByteCounts",273:"StripOffsets",255:"SubfileType",263:"Threshholding",282:"XResolution",283:"YResolution",326:"BadFaxLines",327:"CleanFaxData",343:"ClipPath",328:"ConsecutiveBadFaxLines",433:"Decode",434:"DefaultImageColor",269:"DocumentName",336:"DotRange",321:"HalftoneHints",346:"Indexed",347:"JPEGTables",285:"PageName",297:"PageNumber",317:"Predictor",319:"PrimaryChromaticities",532:"ReferenceBlackWhite",339:"SampleFormat",340:"SMinSampleValue",341:"SMaxSampleValue",559:"StripRowCounts",330:"SubIFDs",292:"T4Options",293:"T6Options",325:"TileByteCounts",323:"TileLength",324:"TileOffsets",322:"TileWidth",301:"TransferFunction",318:"WhitePoint",344:"XClipPathUnits",286:"XPosition",529:"YCbCrCoefficients",531:"YCbCrPositioning",530:"YCbCrSubSampling",345:"YClipPathUnits",287:"YPosition",37378:"ApertureValue",40961:"ColorSpace",36868:"DateTimeDigitized",36867:"DateTimeOriginal",34665:"Exif IFD",36864:"ExifVersion",33434:"ExposureTime",41728:"FileSource",37385:"Flash",40960:"FlashpixVersion",33437:"FNumber",42016:"ImageUniqueID",37384:"LightSource",37500:"MakerNote",37377:"ShutterSpeedValue",37510:"UserComment",33723:"IPTC",34675:"ICC Profile",700:"XMP",42112:"GDAL_METADATA",42113:"GDAL_NODATA",34377:"Photoshop",33550:"ModelPixelScale",33922:"ModelTiepoint",34264:"ModelTransformation",34735:"GeoKeyDirectory",34736:"GeoDoubleParams",34737:"GeoAsciiParams",50674:"LercParameters"},$p={};for(const t in qT)qT.hasOwnProperty(t)&&($p[qT[t]]=parseInt(t,10));const JIt=[$p.BitsPerSample,$p.ExtraSamples,$p.SampleFormat,$p.StripByteCounts,$p.StripOffsets,$p.StripRowCounts,$p.TileByteCounts,$p.TileOffsets,$p.SubIFDs],X7={1:"BYTE",2:"ASCII",3:"SHORT",4:"LONG",5:"RATIONAL",6:"SBYTE",7:"UNDEFINED",8:"SSHORT",9:"SLONG",10:"SRATIONAL",11:"FLOAT",12:"DOUBLE",13:"IFD",16:"LONG8",17:"SLONG8",18:"IFD8"},xa={};for(const t in X7)X7.hasOwnProperty(t)&&(xa[X7[t]]=parseInt(t,10));const pf={WhiteIsZero:0,BlackIsZero:1,RGB:2,Palette:3,TransparencyMask:4,CMYK:5,YCbCr:6,CIELab:8,ICCLab:9},QIt={Unspecified:0,Assocalpha:1,Unassalpha:2},eAt={Version:0,AddCompression:1},tAt={None:0,Deflate:1,Zstandard:2},nAt={1024:"GTModelTypeGeoKey",1025:"GTRasterTypeGeoKey",1026:"GTCitationGeoKey",2048:"GeographicTypeGeoKey",2049:"GeogCitationGeoKey",2050:"GeogGeodeticDatumGeoKey",2051:"GeogPrimeMeridianGeoKey",2052:"GeogLinearUnitsGeoKey",2053:"GeogLinearUnitSizeGeoKey",2054:"GeogAngularUnitsGeoKey",2055:"GeogAngularUnitSizeGeoKey",2056:"GeogEllipsoidGeoKey",2057:"GeogSemiMajorAxisGeoKey",2058:"GeogSemiMinorAxisGeoKey",2059:"GeogInvFlatteningGeoKey",2060:"GeogAzimuthUnitsGeoKey",2061:"GeogPrimeMeridianLongGeoKey",2062:"GeogTOWGS84GeoKey",3072:"ProjectedCSTypeGeoKey",3073:"PCSCitationGeoKey",3074:"ProjectionGeoKey",3075:"ProjCoordTransGeoKey",3076:"ProjLinearUnitsGeoKey",3077:"ProjLinearUnitSizeGeoKey",3078:"ProjStdParallel1GeoKey",3079:"ProjStdParallel2GeoKey",3080:"ProjNatOriginLongGeoKey",3081:"ProjNatOriginLatGeoKey",3082:"ProjFalseEastingGeoKey",3083:"ProjFalseNorthingGeoKey",3084:"ProjFalseOriginLongGeoKey",3085:"ProjFalseOriginLatGeoKey",3086:"ProjFalseOriginEastingGeoKey",3087:"ProjFalseOriginNorthingGeoKey",3088:"ProjCenterLongGeoKey",3089:"ProjCenterLatGeoKey",3090:"ProjCenterEastingGeoKey",3091:"ProjCenterNorthingGeoKey",3092:"ProjScaleAtNatOriginGeoKey",3093:"ProjScaleAtCenterGeoKey",3094:"ProjAzimuthAngleGeoKey",3095:"ProjStraightVertPoleLongGeoKey",3096:"ProjRectifiedGridAngleGeoKey",4096:"VerticalCSTypeGeoKey",4097:"VerticalCitationGeoKey",4098:"VerticalDatumGeoKey",4099:"VerticalUnitsGeoKey"};function rAt(t,e){const{width:n,height:r}=t,i=new Uint8Array(n*r*3);let a;for(let o=0,s=0;o<t.length;++o,s+=3)a=256-t[o]/e*256,i[s]=a,i[s+1]=a,i[s+2]=a;return i}function iAt(t,e){const{width:n,height:r}=t,i=new Uint8Array(n*r*3);let a;for(let o=0,s=0;o<t.length;++o,s+=3)a=t[o]/e*256,i[s]=a,i[s+1]=a,i[s+2]=a;return i}function aAt(t,e){const{width:n,height:r}=t,i=new Uint8Array(n*r*3),a=e.length/3,o=e.length/3*2;for(let s=0,c=0;s<t.length;++s,c+=3){const u=t[s];i[c]=e[u]/65536*256,i[c+1]=e[u+a]/65536*256,i[c+2]=e[u+o]/65536*256}return i}function oAt(t){const{width:e,height:n}=t,r=new Uint8Array(e*n*3);for(let i=0,a=0;i<t.length;i+=4,a+=3){const o=t[i],s=t[i+1],c=t[i+2],u=t[i+3];r[a]=255*((255-o)/256)*((255-u)/256),r[a+1]=255*((255-s)/256)*((255-u)/256),r[a+2]=255*((255-c)/256)*((255-u)/256)}return r}function sAt(t){const{width:e,height:n}=t,r=new Uint8ClampedArray(e*n*3);for(let i=0,a=0;i<t.length;i+=3,a+=3){const o=t[i],s=t[i+1],c=t[i+2];r[a]=o+1.402*(c-128),r[a+1]=o-.34414*(s-128)-.71414*(c-128),r[a+2]=o+1.772*(s-128)}return r}const lAt=.95047,cAt=1,uAt=1.08883;function dAt(t){const{width:e,height:n}=t,r=new Uint8Array(e*n*3);for(let i=0,a=0;i<t.length;i+=3,a+=3){const o=t[i+0],s=t[i+1]<<24>>24,c=t[i+2]<<24>>24;let u=(o+16)/116,d=s/500+u,f=u-c/200,h,p,v;d=lAt*(d*d*d>.008856?d*d*d:(d-16/116)/7.787),u=cAt*(u*u*u>.008856?u*u*u:(u-16/116)/7.787),f=uAt*(f*f*f>.008856?f*f*f:(f-16/116)/7.787),h=d*3.2406+u*-1.5372+f*-.4986,p=d*-.9689+u*1.8758+f*.0415,v=d*.0557+u*-.204+f*1.057,h=h>.0031308?1.055*h**(1/2.4)-.055:12.92*h,p=p>.0031308?1.055*p**(1/2.4)-.055:12.92*p,v=v>.0031308?1.055*v**(1/2.4)-.055:12.92*v,r[a]=Math.max(0,Math.min(1,h))*255,r[a+1]=Math.max(0,Math.min(1,p))*255,r[a+2]=Math.max(0,Math.min(1,v))*255}return r}const zCe=new Map;function D0(t,e){Array.isArray(t)||(t=[t]),t.forEach(n=>zCe.set(n,e))}async function fAt(t){const e=zCe.get(t.Compression);if(!e)throw new Error(`Unknown compression method identifier: ${t.Compression}`);const n=await e();return new n(t)}D0([void 0,1],()=>Promise.resolve().then(()=>require("./raw-9c0f4034.js")).then(t=>t.default));D0(5,()=>Promise.resolve().then(()=>require("./lzw-f00e8c8c.js")).then(t=>t.default));D0(6,()=>{throw new Error("old style JPEG compression is not supported.")});D0(7,()=>Promise.resolve().then(()=>require("./jpeg-f3c7cefc.js")).then(t=>t.default));D0([8,32946],()=>Promise.resolve().then(()=>require("./deflate-483cff19.js")).then(t=>t.default));D0(32773,()=>Promise.resolve().then(()=>require("./packbits-58fd9c05.js")).then(t=>t.default));D0(34887,()=>Promise.resolve().then(()=>require("./lerc-1cc6b21c.js")).then(async t=>(await t.zstd.init(),t)).then(t=>t.default));D0(50001,()=>Promise.resolve().then(()=>require("./webimage-bc81928d.js")).then(t=>t.default));function NN(t,e,n,r=1){return new(Object.getPrototypeOf(t)).constructor(e*n*r)}function hAt(t,e,n,r,i){const a=e/r,o=n/i;return t.map(s=>{const c=NN(s,r,i);for(let u=0;u<i;++u){const d=Math.min(Math.round(o*u),n-1);for(let f=0;f<r;++f){const h=Math.min(Math.round(a*f),e-1),p=s[d*e+h];c[u*r+f]=p}}return c})}function L2(t,e,n){return(1-n)*t+n*e}function pAt(t,e,n,r,i){const a=e/r,o=n/i;return t.map(s=>{const c=NN(s,r,i);for(let u=0;u<i;++u){const d=o*u,f=Math.floor(d),h=Math.min(Math.ceil(d),n-1);for(let p=0;p<r;++p){const v=a*p,y=v%1,m=Math.floor(v),g=Math.min(Math.ceil(v),e-1),x=s[f*e+m],b=s[f*e+g],S=s[h*e+m],E=s[h*e+g],T=L2(L2(x,b,y),L2(S,E,y),d%1);c[u*r+p]=T}}return c})}function vAt(t,e,n,r,i,a="nearest"){switch(a.toLowerCase()){case"nearest":return hAt(t,e,n,r,i);case"bilinear":case"linear":return pAt(t,e,n,r,i);default:throw new Error(`Unsupported resampling method: '${a}'`)}}function gAt(t,e,n,r,i,a){const o=e/r,s=n/i,c=NN(t,r,i,a);for(let u=0;u<i;++u){const d=Math.min(Math.round(s*u),n-1);for(let f=0;f<r;++f){const h=Math.min(Math.round(o*f),e-1);for(let p=0;p<a;++p){const v=t[d*e*a+h*a+p];c[u*r*a+f*a+p]=v}}}return c}function mAt(t,e,n,r,i,a){const o=e/r,s=n/i,c=NN(t,r,i,a);for(let u=0;u<i;++u){const d=s*u,f=Math.floor(d),h=Math.min(Math.ceil(d),n-1);for(let p=0;p<r;++p){const v=o*p,y=v%1,m=Math.floor(v),g=Math.min(Math.ceil(v),e-1);for(let x=0;x<a;++x){const b=t[f*e*a+m*a+x],S=t[f*e*a+g*a+x],E=t[h*e*a+m*a+x],T=t[h*e*a+g*a+x],M=L2(L2(b,S,y),L2(E,T,y),d%1);c[u*r*a+p*a+x]=M}}}return c}function yAt(t,e,n,r,i,a,o="nearest"){switch(o.toLowerCase()){case"nearest":return gAt(t,e,n,r,i,a);case"bilinear":case"linear":return mAt(t,e,n,r,i,a);default:throw new Error(`Unsupported resampling method: '${o}'`)}}function bAt(t,e,n){let r=0;for(let i=e;i<n;++i)r+=t[i];return r}function NB(t,e,n){switch(t){case 1:if(e<=8)return new Uint8Array(n);if(e<=16)return new Uint16Array(n);if(e<=32)return new Uint32Array(n);break;case 2:if(e===8)return new Int8Array(n);if(e===16)return new Int16Array(n);if(e===32)return new Int32Array(n);break;case 3:switch(e){case 16:case 32:return new Float32Array(n);case 64:return new Float64Array(n)}break}throw Error("Unsupported data format/bitsPerSample")}function xAt(t,e){return(t===1||t===2)&&e<=32&&e%8===0?!1:!(t===3&&(e===16||e===32||e===64))}function SAt(t,e,n,r,i,a,o){const s=new DataView(t),c=n===2?o*a:o*a*r,u=n===2?1:r,d=NB(e,i,c),f=parseInt("1".repeat(i),2);if(e===1){let h;n===1?h=r*i:h=i;let p=a*h;p&7&&(p=p+7&-8);for(let v=0;v<o;++v){const y=v*p;for(let m=0;m<a;++m){const g=y+m*u*i;for(let x=0;x<u;++x){const b=g+x*i,S=(v*a+m)*u+x,E=Math.floor(b/8),T=b%8;if(T+i<=8)d[S]=s.getUint8(E)>>8-i-T&f;else if(T+i<=16)d[S]=s.getUint16(E)>>16-i-T&f;else if(T+i<=24){const M=s.getUint16(E)<<8|s.getUint8(E+2);d[S]=M>>24-i-T&f}else d[S]=s.getUint32(E)>>32-i-T&f}}}}return d.buffer}class EAt{constructor(e,n,r,i,a,o){this.fileDirectory=e,this.geoKeys=n,this.dataView=r,this.littleEndian=i,this.tiles=a?{}:null,this.isTiled=!e.StripOffsets;const s=e.PlanarConfiguration;if(this.planarConfiguration=typeof s>"u"?1:s,this.planarConfiguration!==1&&this.planarConfiguration!==2)throw new Error("Invalid planar configuration.");this.source=o}getFileDirectory(){return this.fileDirectory}getGeoKeys(){return this.geoKeys}getWidth(){return this.fileDirectory.ImageWidth}getHeight(){return this.fileDirectory.ImageLength}getSamplesPerPixel(){return typeof this.fileDirectory.SamplesPerPixel<"u"?this.fileDirectory.SamplesPerPixel:1}getTileWidth(){return this.isTiled?this.fileDirectory.TileWidth:this.getWidth()}getTileHeight(){return this.isTiled?this.fileDirectory.TileLength:typeof this.fileDirectory.RowsPerStrip<"u"?Math.min(this.fileDirectory.RowsPerStrip,this.getHeight()):this.getHeight()}getBlockWidth(){return this.getTileWidth()}getBlockHeight(e){return this.isTiled||(e+1)*this.getTileHeight()<=this.getHeight()?this.getTileHeight():this.getHeight()-e*this.getTileHeight()}getBytesPerPixel(){let e=0;for(let n=0;n<this.fileDirectory.BitsPerSample.length;++n)e+=this.getSampleByteSize(n);return e}getSampleByteSize(e){if(e>=this.fileDirectory.BitsPerSample.length)throw new RangeError(`Sample index ${e} is out of range.`);return Math.ceil(this.fileDirectory.BitsPerSample[e]/8)}getReaderForSample(e){const n=this.fileDirectory.SampleFormat?this.fileDirectory.SampleFormat[e]:1,r=this.fileDirectory.BitsPerSample[e];switch(n){case 1:if(r<=8)return DataView.prototype.getUint8;if(r<=16)return DataView.prototype.getUint16;if(r<=32)return DataView.prototype.getUint32;break;case 2:if(r<=8)return DataView.prototype.getInt8;if(r<=16)return DataView.prototype.getInt16;if(r<=32)return DataView.prototype.getInt32;break;case 3:switch(r){case 16:return function(i,a){return DCe(this,i,a)};case 32:return DataView.prototype.getFloat32;case 64:return DataView.prototype.getFloat64}break}throw Error("Unsupported data format/bitsPerSample")}getSampleFormat(e=0){return this.fileDirectory.SampleFormat?this.fileDirectory.SampleFormat[e]:1}getBitsPerSample(e=0){return this.fileDirectory.BitsPerSample[e]}getArrayForSample(e,n){const r=this.getSampleFormat(e),i=this.getBitsPerSample(e);return NB(r,i,n)}async getTileOrStrip(e,n,r,i,a){const o=Math.ceil(this.getWidth()/this.getTileWidth()),s=Math.ceil(this.getHeight()/this.getTileHeight());let c;const{tiles:u}=this;this.planarConfiguration===1?c=n*o+e:this.planarConfiguration===2&&(c=r*o*s+n*o+e);let d,f;this.isTiled?(d=this.fileDirectory.TileOffsets[c],f=this.fileDirectory.TileByteCounts[c]):(d=this.fileDirectory.StripOffsets[c],f=this.fileDirectory.StripByteCounts[c]);const h=(await this.source.fetch([{offset:d,length:f}],a))[0];let p;return u===null||!u[c]?(p=(async()=>{let v=await i.decode(this.fileDirectory,h);const y=this.getSampleFormat(),m=this.getBitsPerSample();return xAt(y,m)&&(v=SAt(v,y,this.planarConfiguration,this.getSamplesPerPixel(),m,this.getTileWidth(),this.getBlockHeight(n))),v})(),u!==null&&(u[c]=p)):p=u[c],{x:e,y:n,sample:r,data:await p}}async _readRaster(e,n,r,i,a,o,s,c,u){const d=this.getTileWidth(),f=this.getTileHeight(),h=this.getWidth(),p=this.getHeight(),v=Math.max(Math.floor(e[0]/d),0),y=Math.min(Math.ceil(e[2]/d),Math.ceil(h/d)),m=Math.max(Math.floor(e[1]/f),0),g=Math.min(Math.ceil(e[3]/f),Math.ceil(p/f)),x=e[2]-e[0];let b=this.getBytesPerPixel();const S=[],E=[];for(let L=0;L<n.length;++L)this.planarConfiguration===1?S.push(bAt(this.fileDirectory.BitsPerSample,0,n[L])/8):S.push(0),E.push(this.getReaderForSample(n[L]));const T=[],{littleEndian:M}=this;for(let L=m;L<g;++L)for(let R=v;R<y;++R){let O;this.planarConfiguration===1&&(O=this.getTileOrStrip(R,L,0,a,u));for(let N=0;N<n.length;++N){const U=N,k=n[N];this.planarConfiguration===2&&(b=this.getSampleByteSize(k),O=this.getTileOrStrip(R,L,k,a,u));const D=O.then(V=>{const B=V.data,F=new DataView(B),j=this.getBlockHeight(V.y),K=V.y*f,W=V.x*d,G=K+j,J=(V.x+1)*d,re=E[U],Z=Math.min(j,j-(G-e[3]),p-K),q=Math.min(d,d-(J-e[2]),h-W);for(let ne=Math.max(0,e[1]-K);ne<Z;++ne)for(let Y=Math.max(0,e[0]-W);Y<q;++Y){const te=(ne*d+Y)*b,fe=re.call(F,te+S[U],M);let se;i?(se=(ne+K-e[1])*x*n.length+(Y+W-e[0])*n.length+U,r[se]=fe):(se=(ne+K-e[1])*x+Y+W-e[0],r[U][se]=fe)}});T.push(D)}}if(await Promise.all(T),o&&e[2]-e[0]!==o||s&&e[3]-e[1]!==s){let L;return i?L=yAt(r,e[2]-e[0],e[3]-e[1],o,s,n.length,c):L=vAt(r,e[2]-e[0],e[3]-e[1],o,s,c),L.width=o,L.height=s,L}return r.width=o||e[2]-e[0],r.height=s||e[3]-e[1],r}async readRasters({window:e,samples:n=[],interleave:r,pool:i=null,width:a,height:o,resampleMethod:s,fillValue:c,signal:u}={}){const d=e||[0,0,this.getWidth(),this.getHeight()];if(d[0]>d[2]||d[1]>d[3])throw new Error("Invalid subsets");const f=d[2]-d[0],h=d[3]-d[1],p=f*h,v=this.getSamplesPerPixel();if(!n||!n.length)for(let x=0;x<v;++x)n.push(x);else for(let x=0;x<n.length;++x)if(n[x]>=v)return Promise.reject(new RangeError(`Invalid sample index '${n[x]}'.`));let y;if(r){const x=this.fileDirectory.SampleFormat?Math.max.apply(null,this.fileDirectory.SampleFormat):1,b=Math.max.apply(null,this.fileDirectory.BitsPerSample);y=NB(x,b,p*n.length),c&&y.fill(c)}else{y=[];for(let x=0;x<n.length;++x){const b=this.getArrayForSample(n[x],p);Array.isArray(c)&&x<c.length?b.fill(c[x]):c&&!Array.isArray(c)&&b.fill(c),y.push(b)}}const m=i||await fAt(this.fileDirectory);return await this._readRaster(d,n,y,r,m,a,o,s,u)}async readRGB({window:e,interleave:n=!0,pool:r=null,width:i,height:a,resampleMethod:o,enableAlpha:s=!1,signal:c}={}){const u=e||[0,0,this.getWidth(),this.getHeight()];if(u[0]>u[2]||u[1]>u[3])throw new Error("Invalid subsets");const d=this.fileDirectory.PhotometricInterpretation;if(d===pf.RGB){let g=[0,1,2];if(this.fileDirectory.ExtraSamples!==QIt.Unspecified&&s){g=[];for(let x=0;x<this.fileDirectory.BitsPerSample.length;x+=1)g.push(x)}return this.readRasters({window:e,interleave:n,samples:g,pool:r,width:i,height:a,resampleMethod:o,signal:c})}let f;switch(d){case pf.WhiteIsZero:case pf.BlackIsZero:case pf.Palette:f=[0];break;case pf.CMYK:f=[0,1,2,3];break;case pf.YCbCr:case pf.CIELab:f=[0,1,2];break;default:throw new Error("Invalid or unsupported photometric interpretation.")}const h={window:u,interleave:!0,samples:f,pool:r,width:i,height:a,resampleMethod:o,signal:c},{fileDirectory:p}=this,v=await this.readRasters(h),y=2**this.fileDirectory.BitsPerSample[0];let m;switch(d){case pf.WhiteIsZero:m=rAt(v,y);break;case pf.BlackIsZero:m=iAt(v,y);break;case pf.Palette:m=aAt(v,p.ColorMap);break;case pf.CMYK:m=oAt(v);break;case pf.YCbCr:m=sAt(v);break;case pf.CIELab:m=dAt(v);break;default:throw new Error("Unsupported photometric interpretation.")}if(!n){const g=new Uint8Array(m.length/3),x=new Uint8Array(m.length/3),b=new Uint8Array(m.length/3);for(let S=0,E=0;S<m.length;S+=3,++E)g[E]=m[S],x[E]=m[S+1],b[E]=m[S+2];m=[g,x,b]}return m.width=v.width,m.height=v.height,m}getTiePoints(){if(!this.fileDirectory.ModelTiepoint)return[];const e=[];for(let n=0;n<this.fileDirectory.ModelTiepoint.length;n+=6)e.push({i:this.fileDirectory.ModelTiepoint[n],j:this.fileDirectory.ModelTiepoint[n+1],k:this.fileDirectory.ModelTiepoint[n+2],x:this.fileDirectory.ModelTiepoint[n+3],y:this.fileDirectory.ModelTiepoint[n+4],z:this.fileDirectory.ModelTiepoint[n+5]});return e}getGDALMetadata(e=null){const n={};if(!this.fileDirectory.GDAL_METADATA)return null;const r=this.fileDirectory.GDAL_METADATA;let i=I4(r,"Item");e===null?i=i.filter(a=>R2(a,"sample")===void 0):i=i.filter(a=>Number(R2(a,"sample"))===e);for(let a=0;a<i.length;++a){const o=i[a];n[R2(o,"name")]=o.inner}return n}getGDALNoData(){if(!this.fileDirectory.GDAL_NODATA)return null;const e=this.fileDirectory.GDAL_NODATA;return Number(e.substring(0,e.length-1))}getOrigin(){const e=this.fileDirectory.ModelTiepoint,n=this.fileDirectory.ModelTransformation;if(e&&e.length===6)return[e[3],e[4],e[5]];if(n)return[n[3],n[7],n[11]];throw new Error("The image does not have an affine transformation.")}getResolution(e=null){const n=this.fileDirectory.ModelPixelScale,r=this.fileDirectory.ModelTransformation;if(n)return[n[0],-n[1],n[2]];if(r)return r[1]===0&&r[4]===0?[r[0],-r[5],r[10]]:[Math.sqrt(r[0]*r[0]+r[4]*r[4]),-Math.sqrt(r[1]*r[1]+r[5]*r[5]),r[10]];if(e){const[i,a,o]=e.getResolution();return[i*e.getWidth()/this.getWidth(),a*e.getHeight()/this.getHeight(),o*e.getWidth()/this.getWidth()]}throw new Error("The image does not have an affine transformation.")}pixelIsArea(){return this.geoKeys.GTRasterTypeGeoKey===1}getBoundingBox(e=!1){const n=this.getHeight(),r=this.getWidth();if(this.fileDirectory.ModelTransformation&&!e){const[i,a,o,s,c,u,d,f]=this.fileDirectory.ModelTransformation,p=[[0,0],[0,n],[r,0],[r,n]].map(([m,g])=>[s+i*m+a*g,f+c*m+u*g]),v=p.map(m=>m[0]),y=p.map(m=>m[1]);return[Math.min(...v),Math.min(...y),Math.max(...v),Math.max(...y)]}else{const i=this.getOrigin(),a=this.getResolution(),o=i[0],s=i[1],c=o+a[0]*r,u=s+a[1]*n;return[Math.min(o,c),Math.min(s,u),Math.max(o,c),Math.max(s,u)]}}}const CAt=EAt;class wAt{constructor(e){this._dataView=new DataView(e)}get buffer(){return this._dataView.buffer}getUint64(e,n){const r=this.getUint32(e,n),i=this.getUint32(e+4,n);let a;if(n){if(a=r+2**32*i,!Number.isSafeInteger(a))throw new Error(`${a} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`);return a}if(a=2**32*r+i,!Number.isSafeInteger(a))throw new Error(`${a} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`);return a}getInt64(e,n){let r=0;const i=(this._dataView.getUint8(e+(n?7:0))&128)>0;let a=!0;for(let o=0;o<8;o++){let s=this._dataView.getUint8(e+(n?o:7-o));i&&(a?s!==0&&(s=~(s-1)&255,a=!1):s=~s&255),r+=s*256**o}return i&&(r=-r),r}getUint8(e,n){return this._dataView.getUint8(e,n)}getInt8(e,n){return this._dataView.getInt8(e,n)}getUint16(e,n){return this._dataView.getUint16(e,n)}getInt16(e,n){return this._dataView.getInt16(e,n)}getUint32(e,n){return this._dataView.getUint32(e,n)}getInt32(e,n){return this._dataView.getInt32(e,n)}getFloat16(e,n){return DCe(this._dataView,e,n)}getFloat32(e,n){return this._dataView.getFloat32(e,n)}getFloat64(e,n){return this._dataView.getFloat64(e,n)}}class TAt{constructor(e,n,r,i){this._dataView=new DataView(e),this._sliceOffset=n,this._littleEndian=r,this._bigTiff=i}get sliceOffset(){return this._sliceOffset}get sliceTop(){return this._sliceOffset+this.buffer.byteLength}get littleEndian(){return this._littleEndian}get bigTiff(){return this._bigTiff}get buffer(){return this._dataView.buffer}covers(e,n){return this.sliceOffset<=e&&this.sliceTop>=e+n}readUint8(e){return this._dataView.getUint8(e-this._sliceOffset,this._littleEndian)}readInt8(e){return this._dataView.getInt8(e-this._sliceOffset,this._littleEndian)}readUint16(e){return this._dataView.getUint16(e-this._sliceOffset,this._littleEndian)}readInt16(e){return this._dataView.getInt16(e-this._sliceOffset,this._littleEndian)}readUint32(e){return this._dataView.getUint32(e-this._sliceOffset,this._littleEndian)}readInt32(e){return this._dataView.getInt32(e-this._sliceOffset,this._littleEndian)}readFloat32(e){return this._dataView.getFloat32(e-this._sliceOffset,this._littleEndian)}readFloat64(e){return this._dataView.getFloat64(e-this._sliceOffset,this._littleEndian)}readUint64(e){const n=this.readUint32(e),r=this.readUint32(e+4);let i;if(this._littleEndian){if(i=n+2**32*r,!Number.isSafeInteger(i))throw new Error(`${i} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`);return i}if(i=2**32*n+r,!Number.isSafeInteger(i))throw new Error(`${i} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`);return i}readInt64(e){let n=0;const r=(this._dataView.getUint8(e+(this._littleEndian?7:0))&128)>0;let i=!0;for(let a=0;a<8;a++){let o=this._dataView.getUint8(e+(this._littleEndian?a:7-a));r&&(i?o!==0&&(o=~(o-1)&255,i=!1):o=~o&255),n+=o*256**a}return r&&(n=-n),n}readOffset(e){return this._bigTiff?this.readUint64(e):this.readUint32(e)}}class _At{async fetch(e,n=void 0){return Promise.all(e.map(r=>this.fetchSlice(r,n)))}async fetchSlice(e){throw new Error(`fetching of slice ${e} not possible, not implemented`)}get fileSize(){return null}async close(){}}class RW extends Error{constructor(e){super(e),Error.captureStackTrace&&Error.captureStackTrace(this,RW),this.name="AbortError"}}class IAt extends _At{constructor(e){super(),this.arrayBuffer=e}fetchSlice(e,n){if(n&&n.aborted)throw new RW("Request aborted");return this.arrayBuffer.slice(e.offset,e.offset+e.length)}}function AAt(t){return new IAt(t)}function DB(t){switch(t){case xa.BYTE:case xa.ASCII:case xa.SBYTE:case xa.UNDEFINED:return 1;case xa.SHORT:case xa.SSHORT:return 2;case xa.LONG:case xa.SLONG:case xa.FLOAT:case xa.IFD:return 4;case xa.RATIONAL:case xa.SRATIONAL:case xa.DOUBLE:case xa.LONG8:case xa.SLONG8:case xa.IFD8:return 8;default:throw new RangeError(`Invalid field type: ${t}`)}}function MAt(t){const e=t.GeoKeyDirectory;if(!e)return null;const n={};for(let r=4;r<=e[3]*4;r+=4){const i=nAt[e[r]],a=e[r+1]?qT[e[r+1]]:null,o=e[r+2],s=e[r+3];let c=null;if(!a)c=s;else{if(c=t[a],typeof c>"u"||c===null)throw new Error(`Could not get value of geoKey '${i}'.`);typeof c=="string"?c=c.substring(s,s+o-1):c.subarray&&(c=c.subarray(s,s+o),o===1&&(c=c[0]))}n[i]=c}return n}function sS(t,e,n,r){let i=null,a=null;const o=DB(e);switch(e){case xa.BYTE:case xa.ASCII:case xa.UNDEFINED:i=new Uint8Array(n),a=t.readUint8;break;case xa.SBYTE:i=new Int8Array(n),a=t.readInt8;break;case xa.SHORT:i=new Uint16Array(n),a=t.readUint16;break;case xa.SSHORT:i=new Int16Array(n),a=t.readInt16;break;case xa.LONG:case xa.IFD:i=new Uint32Array(n),a=t.readUint32;break;case xa.SLONG:i=new Int32Array(n),a=t.readInt32;break;case xa.LONG8:case xa.IFD8:i=new Array(n),a=t.readUint64;break;case xa.SLONG8:i=new Array(n),a=t.readInt64;break;case xa.RATIONAL:i=new Uint32Array(n*2),a=t.readUint32;break;case xa.SRATIONAL:i=new Int32Array(n*2),a=t.readInt32;break;case xa.FLOAT:i=new Float32Array(n),a=t.readFloat32;break;case xa.DOUBLE:i=new Float64Array(n),a=t.readFloat64;break;default:throw new RangeError(`Invalid field type: ${e}`)}if(e===xa.RATIONAL||e===xa.SRATIONAL)for(let s=0;s<n;s+=2)i[s]=a.call(t,r+s*o),i[s+1]=a.call(t,r+(s*o+4));else for(let s=0;s<n;++s)i[s]=a.call(t,r+s*o);return e===xa.ASCII?new TextDecoder("utf-8").decode(i):i}class RAt{constructor(e,n,r){this.fileDirectory=e,this.geoKeyDirectory=n,this.nextIFDByteOffset=r}}class xR extends Error{constructor(e){super(`No image at index ${e}`),this.index=e}}class LAt{async readRasters(e={}){const{window:n,width:r,height:i}=e;let{resX:a,resY:o,bbox:s}=e;const c=await this.getImage();let u=c;const d=await this.getImageCount(),f=c.getBoundingBox();if(n&&s)throw new Error('Both "bbox" and "window" passed.');if(r||i){if(n){const[v,y]=c.getOrigin(),[m,g]=c.getResolution();s=[v+n[0]*m,y+n[1]*g,v+n[2]*m,y+n[3]*g]}const p=s||f;if(r){if(a)throw new Error("Both width and resX passed");a=(p[2]-p[0])/r}if(i){if(o)throw new Error("Both width and resY passed");o=(p[3]-p[1])/i}}if(a||o){const p=[];for(let v=0;v<d;++v){const y=await this.getImage(v),{SubfileType:m,NewSubfileType:g}=y.fileDirectory;(v===0||m===2||g&1)&&p.push(y)}p.sort((v,y)=>v.getWidth()-y.getWidth());for(let v=0;v<p.length;++v){const y=p[v],m=(f[2]-f[0])/y.getWidth(),g=(f[3]-f[1])/y.getHeight();if(u=y,a&&a>m||o&&o>g)break}}let h=n;if(s){const[p,v]=c.getOrigin(),[y,m]=u.getResolution(c);h=[Math.round((s[0]-p)/y),Math.round((s[1]-v)/m),Math.round((s[2]-p)/y),Math.round((s[3]-v)/m)],h=[Math.min(h[0],h[2]),Math.min(h[1],h[3]),Math.max(h[0],h[2]),Math.max(h[1],h[3])]}return u.readRasters({...e,window:h})}}class LW extends LAt{constructor(e,n,r,i,a={}){super(),this.source=e,this.littleEndian=n,this.bigTiff=r,this.firstIFDOffset=i,this.cache=a.cache||!1,this.ifdRequests=[],this.ghostValues=null}async getSlice(e,n){const r=this.bigTiff?4048:1024;return new TAt((await this.source.fetch([{offset:e,length:typeof n<"u"?n:r}]))[0],e,this.littleEndian,this.bigTiff)}async parseFileDirectoryAt(e){const n=this.bigTiff?20:12,r=this.bigTiff?8:2;let i=await this.getSlice(e);const a=this.bigTiff?i.readUint64(e):i.readUint16(e),o=a*n+(this.bigTiff?16:6);i.covers(e,o)||(i=await this.getSlice(e,o));const s={};let c=e+(this.bigTiff?8:2);for(let f=0;f<a;c+=n,++f){const h=i.readUint16(c),p=i.readUint16(c+2),v=this.bigTiff?i.readUint64(c+4):i.readUint32(c+4);let y,m;const g=DB(p),x=c+(this.bigTiff?12:8);if(g*v<=(this.bigTiff?8:4))y=sS(i,p,v,x);else{const b=i.readOffset(x),S=DB(p)*v;if(i.covers(b,S))y=sS(i,p,v,b);else{const E=await this.getSlice(b,S);y=sS(E,p,v,b)}}v===1&&JIt.indexOf(h)===-1&&!(p===xa.RATIONAL||p===xa.SRATIONAL)?m=y[0]:m=y,s[qT[h]]=m}const u=MAt(s),d=i.readOffset(e+r+n*a);return new RAt(s,u,d)}async requestIFD(e){if(this.ifdRequests[e])return this.ifdRequests[e];if(e===0)return this.ifdRequests[e]=this.parseFileDirectoryAt(this.firstIFDOffset),this.ifdRequests[e];if(!this.ifdRequests[e-1])try{this.ifdRequests[e-1]=this.requestIFD(e-1)}catch(n){throw n instanceof xR?new xR(e):n}return this.ifdRequests[e]=(async()=>{const n=await this.ifdRequests[e-1];if(n.nextIFDByteOffset===0)throw new xR(e);return this.parseFileDirectoryAt(n.nextIFDByteOffset)})(),this.ifdRequests[e]}async getImage(e=0){const n=await this.requestIFD(e);return new CAt(n.fileDirectory,n.geoKeyDirectory,this.dataView,this.littleEndian,this.cache,this.source)}async getImageCount(){let e=0,n=!0;for(;n;)try{await this.requestIFD(e),++e}catch(r){if(r instanceof xR)n=!1;else throw r}return e}async getGhostValues(){const e=this.bigTiff?16:8;if(this.ghostValues)return this.ghostValues;const n="GDAL_STRUCTURAL_METADATA_SIZE=",r=n.length+100;let i=await this.getSlice(e,r);if(n===sS(i,xa.ASCII,n.length,e)){const o=sS(i,xa.ASCII,r,e).split(`
|
|
4311
|
+
>]`),y+=gle(m,"</"+e+">"),y>=v)break;p=c}}else c=j7(s,"[ /]"+e+">",0);const d=o+e.length+c+1;if(r&&console.log("[xml-utils] end:",d),d===-1)return;const f=t.slice(o,d);let h;return u?h=null:h=f.slice(f.indexOf(">")+1,f.lastIndexOf("<")),{inner:h,outer:f,start:o,end:d}}jIt.exports=BCe;A4.default=BCe;const qIt=A4;function $Ce(t,e,n){const r=[],i=n&&n.debug||!1,a=n&&typeof n.nested=="boolean"?n.nested:!0;let o=n&&n.startIndex||0,s;for(;s=qIt(t,e,{debug:i,startIndex:o});)a?o=s.start+1+e.length:o=s.end,r.push(s);return i&&console.log("findTagsByName found",r.length,"tags"),r}WIt.exports=$Ce;I4.default=$Ce;const qT={315:"Artist",258:"BitsPerSample",265:"CellLength",264:"CellWidth",320:"ColorMap",259:"Compression",33432:"Copyright",306:"DateTime",338:"ExtraSamples",266:"FillOrder",289:"FreeByteCounts",288:"FreeOffsets",291:"GrayResponseCurve",290:"GrayResponseUnit",316:"HostComputer",270:"ImageDescription",257:"ImageLength",256:"ImageWidth",271:"Make",281:"MaxSampleValue",280:"MinSampleValue",272:"Model",254:"NewSubfileType",274:"Orientation",262:"PhotometricInterpretation",284:"PlanarConfiguration",296:"ResolutionUnit",278:"RowsPerStrip",277:"SamplesPerPixel",305:"Software",279:"StripByteCounts",273:"StripOffsets",255:"SubfileType",263:"Threshholding",282:"XResolution",283:"YResolution",326:"BadFaxLines",327:"CleanFaxData",343:"ClipPath",328:"ConsecutiveBadFaxLines",433:"Decode",434:"DefaultImageColor",269:"DocumentName",336:"DotRange",321:"HalftoneHints",346:"Indexed",347:"JPEGTables",285:"PageName",297:"PageNumber",317:"Predictor",319:"PrimaryChromaticities",532:"ReferenceBlackWhite",339:"SampleFormat",340:"SMinSampleValue",341:"SMaxSampleValue",559:"StripRowCounts",330:"SubIFDs",292:"T4Options",293:"T6Options",325:"TileByteCounts",323:"TileLength",324:"TileOffsets",322:"TileWidth",301:"TransferFunction",318:"WhitePoint",344:"XClipPathUnits",286:"XPosition",529:"YCbCrCoefficients",531:"YCbCrPositioning",530:"YCbCrSubSampling",345:"YClipPathUnits",287:"YPosition",37378:"ApertureValue",40961:"ColorSpace",36868:"DateTimeDigitized",36867:"DateTimeOriginal",34665:"Exif IFD",36864:"ExifVersion",33434:"ExposureTime",41728:"FileSource",37385:"Flash",40960:"FlashpixVersion",33437:"FNumber",42016:"ImageUniqueID",37384:"LightSource",37500:"MakerNote",37377:"ShutterSpeedValue",37510:"UserComment",33723:"IPTC",34675:"ICC Profile",700:"XMP",42112:"GDAL_METADATA",42113:"GDAL_NODATA",34377:"Photoshop",33550:"ModelPixelScale",33922:"ModelTiepoint",34264:"ModelTransformation",34735:"GeoKeyDirectory",34736:"GeoDoubleParams",34737:"GeoAsciiParams",50674:"LercParameters"},$p={};for(const t in qT)qT.hasOwnProperty(t)&&($p[qT[t]]=parseInt(t,10));const JIt=[$p.BitsPerSample,$p.ExtraSamples,$p.SampleFormat,$p.StripByteCounts,$p.StripOffsets,$p.StripRowCounts,$p.TileByteCounts,$p.TileOffsets,$p.SubIFDs],X7={1:"BYTE",2:"ASCII",3:"SHORT",4:"LONG",5:"RATIONAL",6:"SBYTE",7:"UNDEFINED",8:"SSHORT",9:"SLONG",10:"SRATIONAL",11:"FLOAT",12:"DOUBLE",13:"IFD",16:"LONG8",17:"SLONG8",18:"IFD8"},xa={};for(const t in X7)X7.hasOwnProperty(t)&&(xa[X7[t]]=parseInt(t,10));const pf={WhiteIsZero:0,BlackIsZero:1,RGB:2,Palette:3,TransparencyMask:4,CMYK:5,YCbCr:6,CIELab:8,ICCLab:9},QIt={Unspecified:0,Assocalpha:1,Unassalpha:2},eAt={Version:0,AddCompression:1},tAt={None:0,Deflate:1,Zstandard:2},nAt={1024:"GTModelTypeGeoKey",1025:"GTRasterTypeGeoKey",1026:"GTCitationGeoKey",2048:"GeographicTypeGeoKey",2049:"GeogCitationGeoKey",2050:"GeogGeodeticDatumGeoKey",2051:"GeogPrimeMeridianGeoKey",2052:"GeogLinearUnitsGeoKey",2053:"GeogLinearUnitSizeGeoKey",2054:"GeogAngularUnitsGeoKey",2055:"GeogAngularUnitSizeGeoKey",2056:"GeogEllipsoidGeoKey",2057:"GeogSemiMajorAxisGeoKey",2058:"GeogSemiMinorAxisGeoKey",2059:"GeogInvFlatteningGeoKey",2060:"GeogAzimuthUnitsGeoKey",2061:"GeogPrimeMeridianLongGeoKey",2062:"GeogTOWGS84GeoKey",3072:"ProjectedCSTypeGeoKey",3073:"PCSCitationGeoKey",3074:"ProjectionGeoKey",3075:"ProjCoordTransGeoKey",3076:"ProjLinearUnitsGeoKey",3077:"ProjLinearUnitSizeGeoKey",3078:"ProjStdParallel1GeoKey",3079:"ProjStdParallel2GeoKey",3080:"ProjNatOriginLongGeoKey",3081:"ProjNatOriginLatGeoKey",3082:"ProjFalseEastingGeoKey",3083:"ProjFalseNorthingGeoKey",3084:"ProjFalseOriginLongGeoKey",3085:"ProjFalseOriginLatGeoKey",3086:"ProjFalseOriginEastingGeoKey",3087:"ProjFalseOriginNorthingGeoKey",3088:"ProjCenterLongGeoKey",3089:"ProjCenterLatGeoKey",3090:"ProjCenterEastingGeoKey",3091:"ProjCenterNorthingGeoKey",3092:"ProjScaleAtNatOriginGeoKey",3093:"ProjScaleAtCenterGeoKey",3094:"ProjAzimuthAngleGeoKey",3095:"ProjStraightVertPoleLongGeoKey",3096:"ProjRectifiedGridAngleGeoKey",4096:"VerticalCSTypeGeoKey",4097:"VerticalCitationGeoKey",4098:"VerticalDatumGeoKey",4099:"VerticalUnitsGeoKey"};function rAt(t,e){const{width:n,height:r}=t,i=new Uint8Array(n*r*3);let a;for(let o=0,s=0;o<t.length;++o,s+=3)a=256-t[o]/e*256,i[s]=a,i[s+1]=a,i[s+2]=a;return i}function iAt(t,e){const{width:n,height:r}=t,i=new Uint8Array(n*r*3);let a;for(let o=0,s=0;o<t.length;++o,s+=3)a=t[o]/e*256,i[s]=a,i[s+1]=a,i[s+2]=a;return i}function aAt(t,e){const{width:n,height:r}=t,i=new Uint8Array(n*r*3),a=e.length/3,o=e.length/3*2;for(let s=0,c=0;s<t.length;++s,c+=3){const u=t[s];i[c]=e[u]/65536*256,i[c+1]=e[u+a]/65536*256,i[c+2]=e[u+o]/65536*256}return i}function oAt(t){const{width:e,height:n}=t,r=new Uint8Array(e*n*3);for(let i=0,a=0;i<t.length;i+=4,a+=3){const o=t[i],s=t[i+1],c=t[i+2],u=t[i+3];r[a]=255*((255-o)/256)*((255-u)/256),r[a+1]=255*((255-s)/256)*((255-u)/256),r[a+2]=255*((255-c)/256)*((255-u)/256)}return r}function sAt(t){const{width:e,height:n}=t,r=new Uint8ClampedArray(e*n*3);for(let i=0,a=0;i<t.length;i+=3,a+=3){const o=t[i],s=t[i+1],c=t[i+2];r[a]=o+1.402*(c-128),r[a+1]=o-.34414*(s-128)-.71414*(c-128),r[a+2]=o+1.772*(s-128)}return r}const lAt=.95047,cAt=1,uAt=1.08883;function dAt(t){const{width:e,height:n}=t,r=new Uint8Array(e*n*3);for(let i=0,a=0;i<t.length;i+=3,a+=3){const o=t[i+0],s=t[i+1]<<24>>24,c=t[i+2]<<24>>24;let u=(o+16)/116,d=s/500+u,f=u-c/200,h,p,v;d=lAt*(d*d*d>.008856?d*d*d:(d-16/116)/7.787),u=cAt*(u*u*u>.008856?u*u*u:(u-16/116)/7.787),f=uAt*(f*f*f>.008856?f*f*f:(f-16/116)/7.787),h=d*3.2406+u*-1.5372+f*-.4986,p=d*-.9689+u*1.8758+f*.0415,v=d*.0557+u*-.204+f*1.057,h=h>.0031308?1.055*h**(1/2.4)-.055:12.92*h,p=p>.0031308?1.055*p**(1/2.4)-.055:12.92*p,v=v>.0031308?1.055*v**(1/2.4)-.055:12.92*v,r[a]=Math.max(0,Math.min(1,h))*255,r[a+1]=Math.max(0,Math.min(1,p))*255,r[a+2]=Math.max(0,Math.min(1,v))*255}return r}const zCe=new Map;function D0(t,e){Array.isArray(t)||(t=[t]),t.forEach(n=>zCe.set(n,e))}async function fAt(t){const e=zCe.get(t.Compression);if(!e)throw new Error(`Unknown compression method identifier: ${t.Compression}`);const n=await e();return new n(t)}D0([void 0,1],()=>Promise.resolve().then(()=>require("./raw-9c0f4034.js")).then(t=>t.default));D0(5,()=>Promise.resolve().then(()=>require("./lzw-f00e8c8c.js")).then(t=>t.default));D0(6,()=>{throw new Error("old style JPEG compression is not supported.")});D0(7,()=>Promise.resolve().then(()=>require("./jpeg-f3c7cefc.js")).then(t=>t.default));D0([8,32946],()=>Promise.resolve().then(()=>require("./deflate-9ed87e70.js")).then(t=>t.default));D0(32773,()=>Promise.resolve().then(()=>require("./packbits-58fd9c05.js")).then(t=>t.default));D0(34887,()=>Promise.resolve().then(()=>require("./lerc-9ebd5b90.js")).then(async t=>(await t.zstd.init(),t)).then(t=>t.default));D0(50001,()=>Promise.resolve().then(()=>require("./webimage-bc81928d.js")).then(t=>t.default));function NN(t,e,n,r=1){return new(Object.getPrototypeOf(t)).constructor(e*n*r)}function hAt(t,e,n,r,i){const a=e/r,o=n/i;return t.map(s=>{const c=NN(s,r,i);for(let u=0;u<i;++u){const d=Math.min(Math.round(o*u),n-1);for(let f=0;f<r;++f){const h=Math.min(Math.round(a*f),e-1),p=s[d*e+h];c[u*r+f]=p}}return c})}function L2(t,e,n){return(1-n)*t+n*e}function pAt(t,e,n,r,i){const a=e/r,o=n/i;return t.map(s=>{const c=NN(s,r,i);for(let u=0;u<i;++u){const d=o*u,f=Math.floor(d),h=Math.min(Math.ceil(d),n-1);for(let p=0;p<r;++p){const v=a*p,y=v%1,m=Math.floor(v),g=Math.min(Math.ceil(v),e-1),x=s[f*e+m],b=s[f*e+g],S=s[h*e+m],E=s[h*e+g],T=L2(L2(x,b,y),L2(S,E,y),d%1);c[u*r+p]=T}}return c})}function vAt(t,e,n,r,i,a="nearest"){switch(a.toLowerCase()){case"nearest":return hAt(t,e,n,r,i);case"bilinear":case"linear":return pAt(t,e,n,r,i);default:throw new Error(`Unsupported resampling method: '${a}'`)}}function gAt(t,e,n,r,i,a){const o=e/r,s=n/i,c=NN(t,r,i,a);for(let u=0;u<i;++u){const d=Math.min(Math.round(s*u),n-1);for(let f=0;f<r;++f){const h=Math.min(Math.round(o*f),e-1);for(let p=0;p<a;++p){const v=t[d*e*a+h*a+p];c[u*r*a+f*a+p]=v}}}return c}function mAt(t,e,n,r,i,a){const o=e/r,s=n/i,c=NN(t,r,i,a);for(let u=0;u<i;++u){const d=s*u,f=Math.floor(d),h=Math.min(Math.ceil(d),n-1);for(let p=0;p<r;++p){const v=o*p,y=v%1,m=Math.floor(v),g=Math.min(Math.ceil(v),e-1);for(let x=0;x<a;++x){const b=t[f*e*a+m*a+x],S=t[f*e*a+g*a+x],E=t[h*e*a+m*a+x],T=t[h*e*a+g*a+x],M=L2(L2(b,S,y),L2(E,T,y),d%1);c[u*r*a+p*a+x]=M}}}return c}function yAt(t,e,n,r,i,a,o="nearest"){switch(o.toLowerCase()){case"nearest":return gAt(t,e,n,r,i,a);case"bilinear":case"linear":return mAt(t,e,n,r,i,a);default:throw new Error(`Unsupported resampling method: '${o}'`)}}function bAt(t,e,n){let r=0;for(let i=e;i<n;++i)r+=t[i];return r}function NB(t,e,n){switch(t){case 1:if(e<=8)return new Uint8Array(n);if(e<=16)return new Uint16Array(n);if(e<=32)return new Uint32Array(n);break;case 2:if(e===8)return new Int8Array(n);if(e===16)return new Int16Array(n);if(e===32)return new Int32Array(n);break;case 3:switch(e){case 16:case 32:return new Float32Array(n);case 64:return new Float64Array(n)}break}throw Error("Unsupported data format/bitsPerSample")}function xAt(t,e){return(t===1||t===2)&&e<=32&&e%8===0?!1:!(t===3&&(e===16||e===32||e===64))}function SAt(t,e,n,r,i,a,o){const s=new DataView(t),c=n===2?o*a:o*a*r,u=n===2?1:r,d=NB(e,i,c),f=parseInt("1".repeat(i),2);if(e===1){let h;n===1?h=r*i:h=i;let p=a*h;p&7&&(p=p+7&-8);for(let v=0;v<o;++v){const y=v*p;for(let m=0;m<a;++m){const g=y+m*u*i;for(let x=0;x<u;++x){const b=g+x*i,S=(v*a+m)*u+x,E=Math.floor(b/8),T=b%8;if(T+i<=8)d[S]=s.getUint8(E)>>8-i-T&f;else if(T+i<=16)d[S]=s.getUint16(E)>>16-i-T&f;else if(T+i<=24){const M=s.getUint16(E)<<8|s.getUint8(E+2);d[S]=M>>24-i-T&f}else d[S]=s.getUint32(E)>>32-i-T&f}}}}return d.buffer}class EAt{constructor(e,n,r,i,a,o){this.fileDirectory=e,this.geoKeys=n,this.dataView=r,this.littleEndian=i,this.tiles=a?{}:null,this.isTiled=!e.StripOffsets;const s=e.PlanarConfiguration;if(this.planarConfiguration=typeof s>"u"?1:s,this.planarConfiguration!==1&&this.planarConfiguration!==2)throw new Error("Invalid planar configuration.");this.source=o}getFileDirectory(){return this.fileDirectory}getGeoKeys(){return this.geoKeys}getWidth(){return this.fileDirectory.ImageWidth}getHeight(){return this.fileDirectory.ImageLength}getSamplesPerPixel(){return typeof this.fileDirectory.SamplesPerPixel<"u"?this.fileDirectory.SamplesPerPixel:1}getTileWidth(){return this.isTiled?this.fileDirectory.TileWidth:this.getWidth()}getTileHeight(){return this.isTiled?this.fileDirectory.TileLength:typeof this.fileDirectory.RowsPerStrip<"u"?Math.min(this.fileDirectory.RowsPerStrip,this.getHeight()):this.getHeight()}getBlockWidth(){return this.getTileWidth()}getBlockHeight(e){return this.isTiled||(e+1)*this.getTileHeight()<=this.getHeight()?this.getTileHeight():this.getHeight()-e*this.getTileHeight()}getBytesPerPixel(){let e=0;for(let n=0;n<this.fileDirectory.BitsPerSample.length;++n)e+=this.getSampleByteSize(n);return e}getSampleByteSize(e){if(e>=this.fileDirectory.BitsPerSample.length)throw new RangeError(`Sample index ${e} is out of range.`);return Math.ceil(this.fileDirectory.BitsPerSample[e]/8)}getReaderForSample(e){const n=this.fileDirectory.SampleFormat?this.fileDirectory.SampleFormat[e]:1,r=this.fileDirectory.BitsPerSample[e];switch(n){case 1:if(r<=8)return DataView.prototype.getUint8;if(r<=16)return DataView.prototype.getUint16;if(r<=32)return DataView.prototype.getUint32;break;case 2:if(r<=8)return DataView.prototype.getInt8;if(r<=16)return DataView.prototype.getInt16;if(r<=32)return DataView.prototype.getInt32;break;case 3:switch(r){case 16:return function(i,a){return DCe(this,i,a)};case 32:return DataView.prototype.getFloat32;case 64:return DataView.prototype.getFloat64}break}throw Error("Unsupported data format/bitsPerSample")}getSampleFormat(e=0){return this.fileDirectory.SampleFormat?this.fileDirectory.SampleFormat[e]:1}getBitsPerSample(e=0){return this.fileDirectory.BitsPerSample[e]}getArrayForSample(e,n){const r=this.getSampleFormat(e),i=this.getBitsPerSample(e);return NB(r,i,n)}async getTileOrStrip(e,n,r,i,a){const o=Math.ceil(this.getWidth()/this.getTileWidth()),s=Math.ceil(this.getHeight()/this.getTileHeight());let c;const{tiles:u}=this;this.planarConfiguration===1?c=n*o+e:this.planarConfiguration===2&&(c=r*o*s+n*o+e);let d,f;this.isTiled?(d=this.fileDirectory.TileOffsets[c],f=this.fileDirectory.TileByteCounts[c]):(d=this.fileDirectory.StripOffsets[c],f=this.fileDirectory.StripByteCounts[c]);const h=(await this.source.fetch([{offset:d,length:f}],a))[0];let p;return u===null||!u[c]?(p=(async()=>{let v=await i.decode(this.fileDirectory,h);const y=this.getSampleFormat(),m=this.getBitsPerSample();return xAt(y,m)&&(v=SAt(v,y,this.planarConfiguration,this.getSamplesPerPixel(),m,this.getTileWidth(),this.getBlockHeight(n))),v})(),u!==null&&(u[c]=p)):p=u[c],{x:e,y:n,sample:r,data:await p}}async _readRaster(e,n,r,i,a,o,s,c,u){const d=this.getTileWidth(),f=this.getTileHeight(),h=this.getWidth(),p=this.getHeight(),v=Math.max(Math.floor(e[0]/d),0),y=Math.min(Math.ceil(e[2]/d),Math.ceil(h/d)),m=Math.max(Math.floor(e[1]/f),0),g=Math.min(Math.ceil(e[3]/f),Math.ceil(p/f)),x=e[2]-e[0];let b=this.getBytesPerPixel();const S=[],E=[];for(let L=0;L<n.length;++L)this.planarConfiguration===1?S.push(bAt(this.fileDirectory.BitsPerSample,0,n[L])/8):S.push(0),E.push(this.getReaderForSample(n[L]));const T=[],{littleEndian:M}=this;for(let L=m;L<g;++L)for(let R=v;R<y;++R){let O;this.planarConfiguration===1&&(O=this.getTileOrStrip(R,L,0,a,u));for(let N=0;N<n.length;++N){const U=N,k=n[N];this.planarConfiguration===2&&(b=this.getSampleByteSize(k),O=this.getTileOrStrip(R,L,k,a,u));const D=O.then(V=>{const B=V.data,F=new DataView(B),j=this.getBlockHeight(V.y),K=V.y*f,W=V.x*d,G=K+j,J=(V.x+1)*d,re=E[U],Z=Math.min(j,j-(G-e[3]),p-K),q=Math.min(d,d-(J-e[2]),h-W);for(let ne=Math.max(0,e[1]-K);ne<Z;++ne)for(let Y=Math.max(0,e[0]-W);Y<q;++Y){const te=(ne*d+Y)*b,fe=re.call(F,te+S[U],M);let se;i?(se=(ne+K-e[1])*x*n.length+(Y+W-e[0])*n.length+U,r[se]=fe):(se=(ne+K-e[1])*x+Y+W-e[0],r[U][se]=fe)}});T.push(D)}}if(await Promise.all(T),o&&e[2]-e[0]!==o||s&&e[3]-e[1]!==s){let L;return i?L=yAt(r,e[2]-e[0],e[3]-e[1],o,s,n.length,c):L=vAt(r,e[2]-e[0],e[3]-e[1],o,s,c),L.width=o,L.height=s,L}return r.width=o||e[2]-e[0],r.height=s||e[3]-e[1],r}async readRasters({window:e,samples:n=[],interleave:r,pool:i=null,width:a,height:o,resampleMethod:s,fillValue:c,signal:u}={}){const d=e||[0,0,this.getWidth(),this.getHeight()];if(d[0]>d[2]||d[1]>d[3])throw new Error("Invalid subsets");const f=d[2]-d[0],h=d[3]-d[1],p=f*h,v=this.getSamplesPerPixel();if(!n||!n.length)for(let x=0;x<v;++x)n.push(x);else for(let x=0;x<n.length;++x)if(n[x]>=v)return Promise.reject(new RangeError(`Invalid sample index '${n[x]}'.`));let y;if(r){const x=this.fileDirectory.SampleFormat?Math.max.apply(null,this.fileDirectory.SampleFormat):1,b=Math.max.apply(null,this.fileDirectory.BitsPerSample);y=NB(x,b,p*n.length),c&&y.fill(c)}else{y=[];for(let x=0;x<n.length;++x){const b=this.getArrayForSample(n[x],p);Array.isArray(c)&&x<c.length?b.fill(c[x]):c&&!Array.isArray(c)&&b.fill(c),y.push(b)}}const m=i||await fAt(this.fileDirectory);return await this._readRaster(d,n,y,r,m,a,o,s,u)}async readRGB({window:e,interleave:n=!0,pool:r=null,width:i,height:a,resampleMethod:o,enableAlpha:s=!1,signal:c}={}){const u=e||[0,0,this.getWidth(),this.getHeight()];if(u[0]>u[2]||u[1]>u[3])throw new Error("Invalid subsets");const d=this.fileDirectory.PhotometricInterpretation;if(d===pf.RGB){let g=[0,1,2];if(this.fileDirectory.ExtraSamples!==QIt.Unspecified&&s){g=[];for(let x=0;x<this.fileDirectory.BitsPerSample.length;x+=1)g.push(x)}return this.readRasters({window:e,interleave:n,samples:g,pool:r,width:i,height:a,resampleMethod:o,signal:c})}let f;switch(d){case pf.WhiteIsZero:case pf.BlackIsZero:case pf.Palette:f=[0];break;case pf.CMYK:f=[0,1,2,3];break;case pf.YCbCr:case pf.CIELab:f=[0,1,2];break;default:throw new Error("Invalid or unsupported photometric interpretation.")}const h={window:u,interleave:!0,samples:f,pool:r,width:i,height:a,resampleMethod:o,signal:c},{fileDirectory:p}=this,v=await this.readRasters(h),y=2**this.fileDirectory.BitsPerSample[0];let m;switch(d){case pf.WhiteIsZero:m=rAt(v,y);break;case pf.BlackIsZero:m=iAt(v,y);break;case pf.Palette:m=aAt(v,p.ColorMap);break;case pf.CMYK:m=oAt(v);break;case pf.YCbCr:m=sAt(v);break;case pf.CIELab:m=dAt(v);break;default:throw new Error("Unsupported photometric interpretation.")}if(!n){const g=new Uint8Array(m.length/3),x=new Uint8Array(m.length/3),b=new Uint8Array(m.length/3);for(let S=0,E=0;S<m.length;S+=3,++E)g[E]=m[S],x[E]=m[S+1],b[E]=m[S+2];m=[g,x,b]}return m.width=v.width,m.height=v.height,m}getTiePoints(){if(!this.fileDirectory.ModelTiepoint)return[];const e=[];for(let n=0;n<this.fileDirectory.ModelTiepoint.length;n+=6)e.push({i:this.fileDirectory.ModelTiepoint[n],j:this.fileDirectory.ModelTiepoint[n+1],k:this.fileDirectory.ModelTiepoint[n+2],x:this.fileDirectory.ModelTiepoint[n+3],y:this.fileDirectory.ModelTiepoint[n+4],z:this.fileDirectory.ModelTiepoint[n+5]});return e}getGDALMetadata(e=null){const n={};if(!this.fileDirectory.GDAL_METADATA)return null;const r=this.fileDirectory.GDAL_METADATA;let i=I4(r,"Item");e===null?i=i.filter(a=>R2(a,"sample")===void 0):i=i.filter(a=>Number(R2(a,"sample"))===e);for(let a=0;a<i.length;++a){const o=i[a];n[R2(o,"name")]=o.inner}return n}getGDALNoData(){if(!this.fileDirectory.GDAL_NODATA)return null;const e=this.fileDirectory.GDAL_NODATA;return Number(e.substring(0,e.length-1))}getOrigin(){const e=this.fileDirectory.ModelTiepoint,n=this.fileDirectory.ModelTransformation;if(e&&e.length===6)return[e[3],e[4],e[5]];if(n)return[n[3],n[7],n[11]];throw new Error("The image does not have an affine transformation.")}getResolution(e=null){const n=this.fileDirectory.ModelPixelScale,r=this.fileDirectory.ModelTransformation;if(n)return[n[0],-n[1],n[2]];if(r)return r[1]===0&&r[4]===0?[r[0],-r[5],r[10]]:[Math.sqrt(r[0]*r[0]+r[4]*r[4]),-Math.sqrt(r[1]*r[1]+r[5]*r[5]),r[10]];if(e){const[i,a,o]=e.getResolution();return[i*e.getWidth()/this.getWidth(),a*e.getHeight()/this.getHeight(),o*e.getWidth()/this.getWidth()]}throw new Error("The image does not have an affine transformation.")}pixelIsArea(){return this.geoKeys.GTRasterTypeGeoKey===1}getBoundingBox(e=!1){const n=this.getHeight(),r=this.getWidth();if(this.fileDirectory.ModelTransformation&&!e){const[i,a,o,s,c,u,d,f]=this.fileDirectory.ModelTransformation,p=[[0,0],[0,n],[r,0],[r,n]].map(([m,g])=>[s+i*m+a*g,f+c*m+u*g]),v=p.map(m=>m[0]),y=p.map(m=>m[1]);return[Math.min(...v),Math.min(...y),Math.max(...v),Math.max(...y)]}else{const i=this.getOrigin(),a=this.getResolution(),o=i[0],s=i[1],c=o+a[0]*r,u=s+a[1]*n;return[Math.min(o,c),Math.min(s,u),Math.max(o,c),Math.max(s,u)]}}}const CAt=EAt;class wAt{constructor(e){this._dataView=new DataView(e)}get buffer(){return this._dataView.buffer}getUint64(e,n){const r=this.getUint32(e,n),i=this.getUint32(e+4,n);let a;if(n){if(a=r+2**32*i,!Number.isSafeInteger(a))throw new Error(`${a} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`);return a}if(a=2**32*r+i,!Number.isSafeInteger(a))throw new Error(`${a} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`);return a}getInt64(e,n){let r=0;const i=(this._dataView.getUint8(e+(n?7:0))&128)>0;let a=!0;for(let o=0;o<8;o++){let s=this._dataView.getUint8(e+(n?o:7-o));i&&(a?s!==0&&(s=~(s-1)&255,a=!1):s=~s&255),r+=s*256**o}return i&&(r=-r),r}getUint8(e,n){return this._dataView.getUint8(e,n)}getInt8(e,n){return this._dataView.getInt8(e,n)}getUint16(e,n){return this._dataView.getUint16(e,n)}getInt16(e,n){return this._dataView.getInt16(e,n)}getUint32(e,n){return this._dataView.getUint32(e,n)}getInt32(e,n){return this._dataView.getInt32(e,n)}getFloat16(e,n){return DCe(this._dataView,e,n)}getFloat32(e,n){return this._dataView.getFloat32(e,n)}getFloat64(e,n){return this._dataView.getFloat64(e,n)}}class TAt{constructor(e,n,r,i){this._dataView=new DataView(e),this._sliceOffset=n,this._littleEndian=r,this._bigTiff=i}get sliceOffset(){return this._sliceOffset}get sliceTop(){return this._sliceOffset+this.buffer.byteLength}get littleEndian(){return this._littleEndian}get bigTiff(){return this._bigTiff}get buffer(){return this._dataView.buffer}covers(e,n){return this.sliceOffset<=e&&this.sliceTop>=e+n}readUint8(e){return this._dataView.getUint8(e-this._sliceOffset,this._littleEndian)}readInt8(e){return this._dataView.getInt8(e-this._sliceOffset,this._littleEndian)}readUint16(e){return this._dataView.getUint16(e-this._sliceOffset,this._littleEndian)}readInt16(e){return this._dataView.getInt16(e-this._sliceOffset,this._littleEndian)}readUint32(e){return this._dataView.getUint32(e-this._sliceOffset,this._littleEndian)}readInt32(e){return this._dataView.getInt32(e-this._sliceOffset,this._littleEndian)}readFloat32(e){return this._dataView.getFloat32(e-this._sliceOffset,this._littleEndian)}readFloat64(e){return this._dataView.getFloat64(e-this._sliceOffset,this._littleEndian)}readUint64(e){const n=this.readUint32(e),r=this.readUint32(e+4);let i;if(this._littleEndian){if(i=n+2**32*r,!Number.isSafeInteger(i))throw new Error(`${i} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`);return i}if(i=2**32*n+r,!Number.isSafeInteger(i))throw new Error(`${i} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`);return i}readInt64(e){let n=0;const r=(this._dataView.getUint8(e+(this._littleEndian?7:0))&128)>0;let i=!0;for(let a=0;a<8;a++){let o=this._dataView.getUint8(e+(this._littleEndian?a:7-a));r&&(i?o!==0&&(o=~(o-1)&255,i=!1):o=~o&255),n+=o*256**a}return r&&(n=-n),n}readOffset(e){return this._bigTiff?this.readUint64(e):this.readUint32(e)}}class _At{async fetch(e,n=void 0){return Promise.all(e.map(r=>this.fetchSlice(r,n)))}async fetchSlice(e){throw new Error(`fetching of slice ${e} not possible, not implemented`)}get fileSize(){return null}async close(){}}class RW extends Error{constructor(e){super(e),Error.captureStackTrace&&Error.captureStackTrace(this,RW),this.name="AbortError"}}class IAt extends _At{constructor(e){super(),this.arrayBuffer=e}fetchSlice(e,n){if(n&&n.aborted)throw new RW("Request aborted");return this.arrayBuffer.slice(e.offset,e.offset+e.length)}}function AAt(t){return new IAt(t)}function DB(t){switch(t){case xa.BYTE:case xa.ASCII:case xa.SBYTE:case xa.UNDEFINED:return 1;case xa.SHORT:case xa.SSHORT:return 2;case xa.LONG:case xa.SLONG:case xa.FLOAT:case xa.IFD:return 4;case xa.RATIONAL:case xa.SRATIONAL:case xa.DOUBLE:case xa.LONG8:case xa.SLONG8:case xa.IFD8:return 8;default:throw new RangeError(`Invalid field type: ${t}`)}}function MAt(t){const e=t.GeoKeyDirectory;if(!e)return null;const n={};for(let r=4;r<=e[3]*4;r+=4){const i=nAt[e[r]],a=e[r+1]?qT[e[r+1]]:null,o=e[r+2],s=e[r+3];let c=null;if(!a)c=s;else{if(c=t[a],typeof c>"u"||c===null)throw new Error(`Could not get value of geoKey '${i}'.`);typeof c=="string"?c=c.substring(s,s+o-1):c.subarray&&(c=c.subarray(s,s+o),o===1&&(c=c[0]))}n[i]=c}return n}function sS(t,e,n,r){let i=null,a=null;const o=DB(e);switch(e){case xa.BYTE:case xa.ASCII:case xa.UNDEFINED:i=new Uint8Array(n),a=t.readUint8;break;case xa.SBYTE:i=new Int8Array(n),a=t.readInt8;break;case xa.SHORT:i=new Uint16Array(n),a=t.readUint16;break;case xa.SSHORT:i=new Int16Array(n),a=t.readInt16;break;case xa.LONG:case xa.IFD:i=new Uint32Array(n),a=t.readUint32;break;case xa.SLONG:i=new Int32Array(n),a=t.readInt32;break;case xa.LONG8:case xa.IFD8:i=new Array(n),a=t.readUint64;break;case xa.SLONG8:i=new Array(n),a=t.readInt64;break;case xa.RATIONAL:i=new Uint32Array(n*2),a=t.readUint32;break;case xa.SRATIONAL:i=new Int32Array(n*2),a=t.readInt32;break;case xa.FLOAT:i=new Float32Array(n),a=t.readFloat32;break;case xa.DOUBLE:i=new Float64Array(n),a=t.readFloat64;break;default:throw new RangeError(`Invalid field type: ${e}`)}if(e===xa.RATIONAL||e===xa.SRATIONAL)for(let s=0;s<n;s+=2)i[s]=a.call(t,r+s*o),i[s+1]=a.call(t,r+(s*o+4));else for(let s=0;s<n;++s)i[s]=a.call(t,r+s*o);return e===xa.ASCII?new TextDecoder("utf-8").decode(i):i}class RAt{constructor(e,n,r){this.fileDirectory=e,this.geoKeyDirectory=n,this.nextIFDByteOffset=r}}class xR extends Error{constructor(e){super(`No image at index ${e}`),this.index=e}}class LAt{async readRasters(e={}){const{window:n,width:r,height:i}=e;let{resX:a,resY:o,bbox:s}=e;const c=await this.getImage();let u=c;const d=await this.getImageCount(),f=c.getBoundingBox();if(n&&s)throw new Error('Both "bbox" and "window" passed.');if(r||i){if(n){const[v,y]=c.getOrigin(),[m,g]=c.getResolution();s=[v+n[0]*m,y+n[1]*g,v+n[2]*m,y+n[3]*g]}const p=s||f;if(r){if(a)throw new Error("Both width and resX passed");a=(p[2]-p[0])/r}if(i){if(o)throw new Error("Both width and resY passed");o=(p[3]-p[1])/i}}if(a||o){const p=[];for(let v=0;v<d;++v){const y=await this.getImage(v),{SubfileType:m,NewSubfileType:g}=y.fileDirectory;(v===0||m===2||g&1)&&p.push(y)}p.sort((v,y)=>v.getWidth()-y.getWidth());for(let v=0;v<p.length;++v){const y=p[v],m=(f[2]-f[0])/y.getWidth(),g=(f[3]-f[1])/y.getHeight();if(u=y,a&&a>m||o&&o>g)break}}let h=n;if(s){const[p,v]=c.getOrigin(),[y,m]=u.getResolution(c);h=[Math.round((s[0]-p)/y),Math.round((s[1]-v)/m),Math.round((s[2]-p)/y),Math.round((s[3]-v)/m)],h=[Math.min(h[0],h[2]),Math.min(h[1],h[3]),Math.max(h[0],h[2]),Math.max(h[1],h[3])]}return u.readRasters({...e,window:h})}}class LW extends LAt{constructor(e,n,r,i,a={}){super(),this.source=e,this.littleEndian=n,this.bigTiff=r,this.firstIFDOffset=i,this.cache=a.cache||!1,this.ifdRequests=[],this.ghostValues=null}async getSlice(e,n){const r=this.bigTiff?4048:1024;return new TAt((await this.source.fetch([{offset:e,length:typeof n<"u"?n:r}]))[0],e,this.littleEndian,this.bigTiff)}async parseFileDirectoryAt(e){const n=this.bigTiff?20:12,r=this.bigTiff?8:2;let i=await this.getSlice(e);const a=this.bigTiff?i.readUint64(e):i.readUint16(e),o=a*n+(this.bigTiff?16:6);i.covers(e,o)||(i=await this.getSlice(e,o));const s={};let c=e+(this.bigTiff?8:2);for(let f=0;f<a;c+=n,++f){const h=i.readUint16(c),p=i.readUint16(c+2),v=this.bigTiff?i.readUint64(c+4):i.readUint32(c+4);let y,m;const g=DB(p),x=c+(this.bigTiff?12:8);if(g*v<=(this.bigTiff?8:4))y=sS(i,p,v,x);else{const b=i.readOffset(x),S=DB(p)*v;if(i.covers(b,S))y=sS(i,p,v,b);else{const E=await this.getSlice(b,S);y=sS(E,p,v,b)}}v===1&&JIt.indexOf(h)===-1&&!(p===xa.RATIONAL||p===xa.SRATIONAL)?m=y[0]:m=y,s[qT[h]]=m}const u=MAt(s),d=i.readOffset(e+r+n*a);return new RAt(s,u,d)}async requestIFD(e){if(this.ifdRequests[e])return this.ifdRequests[e];if(e===0)return this.ifdRequests[e]=this.parseFileDirectoryAt(this.firstIFDOffset),this.ifdRequests[e];if(!this.ifdRequests[e-1])try{this.ifdRequests[e-1]=this.requestIFD(e-1)}catch(n){throw n instanceof xR?new xR(e):n}return this.ifdRequests[e]=(async()=>{const n=await this.ifdRequests[e-1];if(n.nextIFDByteOffset===0)throw new xR(e);return this.parseFileDirectoryAt(n.nextIFDByteOffset)})(),this.ifdRequests[e]}async getImage(e=0){const n=await this.requestIFD(e);return new CAt(n.fileDirectory,n.geoKeyDirectory,this.dataView,this.littleEndian,this.cache,this.source)}async getImageCount(){let e=0,n=!0;for(;n;)try{await this.requestIFD(e),++e}catch(r){if(r instanceof xR)n=!1;else throw r}return e}async getGhostValues(){const e=this.bigTiff?16:8;if(this.ghostValues)return this.ghostValues;const n="GDAL_STRUCTURAL_METADATA_SIZE=",r=n.length+100;let i=await this.getSlice(e,r);if(n===sS(i,xa.ASCII,n.length,e)){const o=sS(i,xa.ASCII,r,e).split(`
|
|
4312
4312
|
`)[0],s=Number(o.split("=")[1].split(" ")[0])+o.length;s>r&&(i=await this.getSlice(e,s));const c=sS(i,xa.ASCII,s,e);this.ghostValues={},c.split(`
|
|
4313
4313
|
`).filter(u=>u.length>0).map(u=>u.split("=")).forEach(([u,d])=>{this.ghostValues[u]=d})}return this.ghostValues}static async fromSource(e,n,r){const i=(await e.fetch([{offset:0,length:1024}],r))[0],a=new wAt(i),o=a.getUint16(0,0);let s;if(o===18761)s=!0;else if(o===19789)s=!1;else throw new TypeError("Invalid byte order value.");const c=a.getUint16(2,s);let u;if(c===42)u=!1;else if(c===43){if(u=!0,a.getUint16(4,s)!==8)throw new Error("Unsupported offset byte-size.")}else throw new TypeError("Invalid magic number.");const d=u?a.getUint64(8,s):a.getUint32(4,s);return new LW(e,s,u,d,n)}close(){return typeof this.source.close=="function"?this.source.close():!1}}async function OAt(t,e){return LW.fromSource(AAt(t),e)}const PAt=({axon_check:t,fbxTreeDatas:e,setLeftMenuTabIndex:n,swcRef:r,setIsChartOpen:i,setEchartValue:a,setChartValue:o,reset:s})=>{const c=w.useRef(null),u=w.useRef(null),[d,f]=w.useState(!1),[h,p]=w.useState(""),[v,y]=w.useState(""),[m,g]=w.useState({x:0,y:0}),x=w.useRef([]),b=w.useRef([]),S=w.useRef(null),E=w.useRef(null),[T,M]=w.useState(!0),L=w.useRef("#000");let R=w.useRef(null),O=!1;const N=(W,G,J,re,Z,q)=>{for(let ne in re)if(re[ne][q].find(fe=>fe===G)&&ne!==null){let fe=D(W.nodes,ne.replace("_","/"));fe!=null&&fe!==parseInt(J)&&Z.findIndex(he=>he.source===parseInt(J)&&he.target===fe)==-1&&Z.push({source:parseInt(J),target:fe})}},U=(W,G)=>{if(Object.keys(G).length!=0){for(let re in W.nodes){let Z=j(W.nodes[re].name,e);const q=B(e,W.nodes[re].name);W.nodes[re].children=Z,W.nodes[re].fullname=q==null?void 0:q.fullname,W.nodes[re].symbolSize=Math.sqrt(Z.length),W.nodes[re].itemStyle=q&&q.color?{color:q.color}:{},G[W.nodes[re].name].up.length==0&&G[W.nodes[re].name].up.length==0&&delete W.nodes[re]}const J=Object.values(W.nodes);W.nodes=J.map((re,Z)=>({...re,id:Z}));for(let re in W.nodes){let Z=W.nodes[re].children;Z.length===0&&(Z=[W.nodes[re].name.replace("/","_")]),Z.forEach(q=>{var te,fe;let ne=((te=t[q])==null?void 0:te.soma)||[],Y=((fe=t[q])==null?void 0:fe.axon)||[];ne&&ne.forEach(se=>{N(W,se,re,t,W.links,"axon")}),Y&&Y.forEach(se=>{N(W,se,re,t,W.links,"soma")})})}}return W},k=(W,G)=>G.map(J=>{const re=W.find(q=>q.id===J.source),Z=W.find(q=>q.id===J.target);return{...J,lineStyle:{color:{type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:Z.itemStyle.color},{offset:1,color:re.itemStyle.color}]},width:1,curveness:.3}}});w.useEffect(()=>{u.current=YO(c.current),u.current.clear();let W={nodes:[{id:0,name:"Isocortex"},{id:1,name:"OLF"},{id:2,name:"HPF"},{id:3,name:"CTXsp"},{id:4,name:"STR"},{id:5,name:"PAL"},{id:6,name:"IB"},{id:7,name:"MB"},{id:8,name:"HB"},{id:9,name:"CB"},{id:10,name:"VS"},{id:11,name:"fiber tract"}],links:[],categories:[]};W=U(W,t);const G=()=>u.current.getOption().series[0].data,J={tooltip:{formatter:Y=>Y.dataType==="node"?`${Y.data.fullname} (${Y.data.name})<br>Downstream: ${t[Y.data.name].down.length} projection neuron(s)<br>Upstream: projected by ${t[Y.data.name].up.length} neuron(s)`:(Y.dataType,"")},animationDurationUpdate:1500,animationEasingUpdate:"quinticInOut",series:[{name:"Les Miserables",type:"graph",layout:"circular",circular:{rotateLabel:!0},data:W.nodes,links:k(W.nodes,W.links),categories:W.categories,roam:!0,label:{show:!0,position:"right",formatter:"{b}",textStyle:{fontSize:20}},lineStyle:{color:"source",curveness:.3}}]};function re(Y){if(Y.event.event.preventDefault(),Y.dataType=="node"){let te={nodes:[],links:[],categories:[]};const fe=Z(Y.data.name,e),se=F(fe,e);let he=V(se),Q=G().filter(le=>!he.includes(le.name));Q=Q.map((le,ce)=>({...le,id:ce}));let ee=Math.max(...Q.map(le=>le.id),0)+1;Q.push({id:ee,name:fe}),te.nodes=Q,te=U(te,t),u.current.setOption({series:[{data:te.nodes,links:k(te.nodes,te.links),categories:te.categories}],animationDurationUpdate:1e3,animationEasingUpdate:"cubicOut"})}if(Y.dataType=="edge"){const te=G().find(se=>se.id===Y.data.source),fe=G().find(se=>se.id===Y.data.target);x.current=t[fe.name].soma.filter(function(se){return t[te.name].axon.indexOf(se)>-1}),b.current=t[te.name].soma.filter(function(se){return t[fe.name].axon.indexOf(se)>-1}),p(te.name),y(fe.name),g({x:Y.clientX+5,y:Y.clientY}),f(!0),L.current=Y.data.lineStyle.color.colorStops[0].color}}const Z=(Y,te)=>{let fe="";for(let se=0;se<te.length;se++){const he=te[se];if(he.children){if(he.children.some(Q=>Q.name===Y)){fe=he.name;break}else if(Z(Y,he.children)){fe=Z(Y,he.children);break}}}return fe},q=Y=>{clearTimeout(R.current),O=!0,a(Y.data.name),o(Y.data.name),i(!1)},ne=Y=>{R.current=setTimeout(()=>{if(!O){const te={nodes:[],links:[],categories:[]},fe=F(Y.data.name,e);if(fe){let he=u.current.getOption().series[0].data.filter(le=>le.name!==Y.data.name);he=he.map((le,ce)=>({...le,id:ce}));let Q=he.length;fe.children.forEach(le=>{te.nodes.push({id:Q,name:le.name}),Q++});const pe=[...he,...te.nodes],ee=U({nodes:pe,links:[],categories:[]},t);ee.links.length>0?u.current.setOption({series:[{data:ee.nodes,links:k(ee.nodes,ee.links),categories:ee.categories}]}):hy.error("NO find links")}}O=!1},300)};return u.current.setOption(J),u.current.on("click",ne),u.current.on("dblclick",q),u.current.on("contextmenu",re),()=>{u.current.off("click",ne),u.current.off("dblclick",q),u.current.off("contextmenu",re)}},[t,e,s]);function D(W,G){for(let J of W)if(J.children.includes(G)||J.name==G)return J.id;return null}const V=W=>{const G=[],J=re=>{G.push(re.name),re.children&&re.children.forEach(Z=>J(Z))};return J(W),G},B=(W,G)=>{for(let J of W){if(J.name.toLowerCase()===G.toLowerCase())return{color:J.color,fullname:J.fullname};if(J.children){const re=B(J.children,G);if(re)return re}}return null},F=(W,G)=>{let J=[],re=!1,Z;for(let q=0;q<G.length;q++)J.push(G[q]);for(;J.length>0&&!re;){let q=J.pop();if(q.name==W){re=!0,Z=q;break}else if(q.children)for(let ne=0;ne<q.children.length;ne++)J.push(q.children[ne])}return Z},j=(W,G)=>{let J="";const re=q=>{if(q.name===W){J=q;return}if(q.children){for(let ne of q.children)if(re(ne),J)return}},Z=q=>{let ne=[];if(q.children)for(let Y of q.children)ne.push(Y.name),ne=ne.concat(Z(Y));return ne};for(let q of G)if(re(q),J)break;return J?Z(J):[]},K=[{key:"1",label:w.createElement("a",{target:"_blank",style:{width:"150px",textAlign:"center"},onClick:W=>{n(3),r.current.setSearchValue(v),r.current.setSomaValue(h),f(!1),i(!1)}},h," →",v,": ",b.current.length," projection neruon(s)")},{key:"2",label:w.createElement("a",{target:"_blank",style:{width:"150px",textAlign:"center"},onClick:W=>{n(3),r.current.setSearchValue(h),r.current.setSomaValue(v),f(!1),i(!1)}},v," →",h,": ",x.current.length," projection neruon(s)")}];return w.createElement(w.Fragment,null,w.createElement("div",{style:{overflow:"hidden",position:"absolute",width:"500px",height:"200px"}},w.createElement("div",{ref:S,style:{zIndex:9,position:"absolute",backgroundColor:"#f1f1f180",borderTopRightRadius:"5px",borderTopLeftRadius:"5px",borderBottomRightRadius:"5px",transform:T?"translateY(0)":"translateY(-99%)",transition:"transform 0.3s ease-in-out",padding:"5px"}},w.createElement("p",{style:{paddingLeft:"10px",paddingRight:"10px"}},"- Mouse-over a node to see upstream and downstream neuron numbers",w.createElement("br",null),"- Left-click a node to expand its children structures",w.createElement("br",null),"- Righ-click a node to collapse to its parent structure",w.createElement("br",null),"- Double-click a node to visualize all its projections in the main window",w.createElement("br",null),"- Righ-click a line to see the projections between two connected nodes",w.createElement("br",null),"- Left-click the popup menu of the line to inquire the projection neurons"),w.createElement("a",{style:{zIndex:9,position:"absolute",bottom:"-28px",left:0,display:"flex"},onClick:()=>{M(!T)}},w.createElement("div",{style:{width:"90px",height:"28px",display:"flex",justifyContent:"center",borderBottomRightRadius:"5px",borderBottomLeftRadius:"5px",backgroundColor:"#f1f1f180"}},w.createElement("div",{style:{display:"flex",alignItems:"center",color:"#000"}},"Help ",w.createElement("div",{ref:E,style:{width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent",borderBottom:T?"10px solid #000":0,borderTop:T?0:"10px solid #000"}})))))),w.createElement(Rb,{menu:{items:K},open:d,onOpenChange:W=>{f(!W)},overlayStyle:{position:"absolute",left:m.x,top:m.y,width:"auto",minWidth:"auto",border:`2px solid ${L}`},overlayClassName:"pipeline_dropdown"},w.createElement("div",{ref:c,style:{width:"100%",height:"calc(100vh - 75px)"},onClick:()=>{f(!1)},onMouseEnter:()=>{f(!1)}})))};Vi([LSe,uEe,v2e,Gxe]);const Gv=F2.TabPane,{TextArea:mle}=Uc,NAt=`
|
|
4314
4314
|
precision highp float;
|
|
@@ -4424,7 +4424,7 @@ void main(){
|
|
|
4424
4424
|
color = vec4(0.0,0.0,0.0,1.f);
|
|
4425
4425
|
};
|
|
4426
4426
|
}
|
|
4427
|
-
`;let UAt=new URL(window.location.href),nf=new URLSearchParams(UAt.search),yle=nf.get("leftHemisphereVisibility"),ble=nf.get("coordinateVisibility"),xle=nf.get("datumMarkVisibility"),Sle=nf.get("cranialVisibility"),Ele=nf.get("gridVisibility"),Cle=nf.get("terminalVisibility"),wle=nf.get("branchingVisibility"),Tle=nf.get("branchingColor"),_le=nf.get("brainContourVisibility"),Ile=nf.get("brainContourOpacity"),O4=nf.get("otherAtlases"),Ale=nf.get("atlasReslicingInfo"),Mle=nf.get("sectionPointPosition"),Rle=nf.get("echart_Value");const kAt={leftHemisphereVisibility:yle?JSON.parse(yle):!1,coordinateVisibility:ble?JSON.parse(ble):!0,datumMarkVisibility:xle?JSON.parse(xle):!0,cranialVisibility:Sle?JSON.parse(Sle):!1,gridVisibility:Ele?JSON.parse(Ele):!0,terminalVisibility:Cle?JSON.parse(Cle):!0,branchingVisibility:wle?JSON.parse(wle):!0,branchingColor:Tle||"#A7B5A1",brainContourVisibility:_le?JSON.parse(_le):!0,brainContourOpacity:Ile?JSON.parse(Ile):.3,otherAtlases:O4||"None",atlasReslicingInfo:Ale?JSON.parse(Ale):{}},FAt=(t,e)=>{let n=new URL(window.location.href),r=new URLSearchParams(n.search),i=e;typeof e!="string"&&(i=JSON.stringify(i)),r.set(t,i),n.search=r.toString(),window.history.replaceState({},"",n)},VAt={set:function(t,e,n){return t[e]=n,FAt(e,n),!0}},qi=new Proxy(kAt,VAt),HCe=w.forwardRef((t,e)=>{const{regionData:n,setoffset_factor:r,offset_factor_R:i,t:a,hrefStr:o,leftTreeRef:s,angleRef:c,jiaoduRef:u,mouseflag:d,renderer:f,controls:h,menutagShow:p,setMenuTag:v,startselect:y,linemeshs_jing:m,points:g,points2:x,activetabIndex:b,material:S,setShowimage:E,childRef:T,checkItems:M,setoutflag:L,fetchCoordinateFunc:R,setendPoint:O,clickPoint:N,outflagRef:U,axis_font:k,setdatum:D,modeChoose:V,setShowModeChoose:B,virusModeValue:F,setShowTabNums:j,pipelineClickEvent:K,automaticGroup:W,focusVirusLineItem:G,setMenuTagShow:J,responsefunc:re,mode:Z,setCheckItems:q,setLeftMenuTabIndex:ne,updatePage:Y,swcItem:te,axon_check:fe,swcnameMesh:se,setMode:he,vesselRef:Q,swcRef:pe,vesselStr:ee,lableStr:le,setShowSettingModal:ce,showSettingModal:be,fbxTreeDatas:Re,composer:Ue,setEchartValue:we,echartValue:Ie,sectionsInfoRef:ke,sectionsInfo:ue,setSectionsInfo:oe,gray_value:Me,setLuguchecked:Fe,Luguchecked:Te,datum:Ae,setGridShow:dt,PointShow:He,nodeStr:ut,lefttab:st,righttab:at,atlasData:Pe}=t,[ht,rt]=w.useState(!1),[ct,pt]=w.useState(!1),[Be,ft]=w.useState(!1),[St,Tt]=w.useState(!1),[mt,yt]=w.useState(!1),[Nt,Yt]=w.useState(!1),[Mn,tn]=w.useState(!1),[Pn,Ft]=w.useState(!1),[on,cn]=w.useState(qi.atlasReslicingInfo.angleX||120),[xn,pn]=w.useState(qi.atlasReslicingInfo.angleY||320),[Xn,zn]=w.useState(qi.atlasReslicingInfo.angleZ||270),[$r,Ar]=w.useState(qi.atlasReslicingInfo.positionX||0),[An,Ht]=w.useState(qi.atlasReslicingInfo.positionY||0),[Se,Ye]=w.useState(qi.atlasReslicingInfo.positionZ||0),[Ze,Je]=w.useState(qi.atlasReslicingInfo.translateX||!0),[vt,wt]=w.useState(qi.atlasReslicingInfo.translateY||!0),[At,Bt]=w.useState(qi.atlasReslicingInfo.translateZ||!0),[rn,Zt]=w.useState(qi.atlasReslicingInfo.rotate||!0),[Cn,Ln]=w.useState(qi.atlasReslicingInfo.ButtonDisabled||!0),[fr,Tn]=w.useState(!1),[lr,Hn]=w.useState(!1),[ur,mn]=w.useState(!1),[En,gn]=w.useState(!1),[On,sr]=w.useState(a("5000.0006")||"显示数据块"),[Kn,Ti]=w.useState(1),[Vr,br]=w.useState(1),[ir,li]=w.useState([]),[$i,Ri]=w.useState([]),[ii,xi]=w.useState(!1),[ai,Xi]=w.useState({}),[Ba,Wa]=w.useState(!1),[ja,Ks]=w.useState(""),[Ao,ms]=w.useState("Config_DAPI.ini"),[Pr,hi]=w.useState("applySTAM2CCF"),[Ot,lt]=w.useState(0),[qt,qe]=w.useState(!1),[Qt,Nn]=w.useState(!1),[Rr,Gr]=w.useState(!1),[Lr,Un]=w.useState(!0),[Rn,rr]=w.useState(2),[Wt,vn]=w.useState(!1),[Gn,Zn]=w.useState({}),tr=w.useRef(qi.atlasReslicingInfo.direction1||4),ci=w.useRef(null),Sr=w.useRef(null),[aa,Xa]=w.useState(!1),Ca=w.useRef(null),Mo=w.useRef(window.location.href.split("/")[2]),je=w.useRef(new S2(Ai.current,f==null?void 0:f.domElement)),gt=w.useRef(0),Qe=w.useRef(0),Pt=w.useRef(new Dn),Rt=w.useRef(new me),Vt=w.useRef(new me),_t=w.useRef(new Dn),bt=w.useRef(new me(1,0,0)),Et=w.useRef(new Dn),_n=w.useRef(null),gr=w.useRef(new EF),Oe=w.useRef(null),de=w.useRef([]),Ke=w.useRef(null),Ge=w.useRef(new Dn),et=w.useRef(new Vu),[Ut,dn]=w.useState(qi.otherAtlases),Kt={min:new me(59.74305725097656,69.15838623046875,.9565062522888184),max:new me(1081.3045654296875,800.6698608398438,1400.156005859375)},[In,Dt]=w.useState([]),Mt=w.useRef({}),jr=w.useRef(!1),Ur=w.useRef([0,0]),ar=w.useRef([0,0]),Yn=w.useRef(""),Ei=w.useRef(!1),[Yi,an]=w.useState(!1),[jt,zr]=w.useState(!1),[Tr,wr]=w.useState(0),[As,zi]=w.useState(0),[fo,mi]=w.useState([]),[Or,Hi]=w.useState([]),go=w.useRef(null),ta=w.useRef(null),[Ho,Ys]=w.useState(""),[ks,ys]=w.useState(null),[ya,mo]=w.useState(Rle||""),[Fs,bs]=w.useState(!1);w.useState("");const Ms=w.useRef(""),[kn,Ro]=w.useState(qi.leftHemisphereVisibility),xs=w.useRef([]);w.useRef([]);const[Zl,Jo]=w.useState(!1),[ao,ho]=w.useState(!1),Lo=w.useRef(!0),oo=w.useRef(!0),Ra=w.useRef({target:h.current.target.clone(),position:h.current.object.position.clone(),up:h.current.object.up.clone(),enabled:h.current.enabled}),[Kl,Vs]=w.useState(0),[Ss,Eo]=w.useState(!0),Rs=w.useRef(!0),mc=w.useRef(null),fs=w.useRef(new Dn),[Yl,Rl]=w.useState(qi.brainContourVisibility),[nl,zc]=w.useState(["Task1","Task2"]),[Co,Ll]=w.useState(["Task1"]),[Oo,Bs]=w.useState([{key:"Task1",fileList:[],radioValue:"Config_DAPI.ini",fileList2:[],correspondingPlaneData:{},registrationRadioShowType:"1",firstRegistrationImg:{width:0,height:0},startButtonLoading:!1,filename:""},{key:"Task2",fileList:[],radioValue:"Config_DAPI.ini",fileList2:[],correspondingPlaneData:{},registrationRadioShowType:"1",firstRegistrationImg:{width:0,height:0},startButtonLoading:!1,filename:""}]),Po=w.useRef([{key:"tags1",fileList:[],radioValue:"Config_DAPI.ini",fileList2:[],correspondingPlaneData:{},registrationRadioShowType:"1",firstRegistrationImg:{width:0,height:0},startButtonLoading:!1,filename:""},{key:"tags2",fileList:[],radioValue:"Config_DAPI.ini",fileList2:[],correspondingPlaneData:{},registrationRadioShowType:"1",firstRegistrationImg:{width:0,height:0},startButtonLoading:!1,filename:""}]),Ol=w.useRef(null),Hc=w.useRef(null),[mu,_d]=w.useState(qi.coordinateVisibility),[yu,Gu]=w.useState(qi.brainContourOpacity),[Pl,ql]=w.useState(qi.atlasReslicingInfo.direction1||4),[Wu,Gc]=w.useState({});w.useImperativeHandle(e,()=>({tabChange:La,setYinDaoOpen1:rt,setYinDaoOpen2:pt,setYinDaoOpen3:ft,setYinDaoOpen4:Tt,setYinDaoOpen5:yt,setYinDaoOpen6:Yt,setYinDaoOpen7:tn,setDontShowAgain:Eo})),w.useEffect(()=>{fetch(n+"/data/json/name.json").then(We=>We.json()).then(We=>{mi(We)}),fetch(n+"/data/TreeData/nuclear.json").then(We=>We.json()).then(We=>{Hi(We)});const ye=new ic(.05,32,32),Ne=new js({color:392960,transparent:!0});if(fs.current=new Dn(ye,Ne),fs.current.name="sectionSphere",Mle){let We=JSON.parse(Mle);fs.current.position.set(We.x,We.y,We.z)}qi.cranialVisibility&&xv(!0)},[]);const Qa=(ye,Ne)=>Ss?w.createElement("div",{style:{position:"absolute",top:"4px",right:"50px"}},w.createElement(ob,{defaultChecked:!1,onChange:We=>{We.target.checked?localStorage.setItem(ye,"true"):localStorage.setItem(ye,"false"),Ne()},style:{marginTop:"10px"}},"Don't show again")):null,rf=[{title:null,description:w.createElement("div",null,!localStorage.getItem("Assem")||localStorage.getItem("Assem")==="false"?Qa("Assem",function(){}):null,w.createElement("div",null,a("8000.0001")||"如①所示,在主窗口左侧的是数据面板,用户可以在该选项卡下选择STAM的解剖命名树,配准到STAM上的完整脑血管图谱和神经元数据。用户也可以切换两个不同版本的命名系统。"),w.createElement("div",null,a("8000.0002")||"如②所示,主窗口中可以加载脑区、核团的三维模型。"),w.createElement("div",null,a("8000.0003")||"如③所示,用户可以切换不同的模式或者功能模块")),cover:w.createElement("video",{src:`${n}/guide/topo.mp4`,controls:!0,style:{height:600}}),placement:"center",style:{width:"min-content"},target:Ke.current},{title:a("8000.0032")||"解剖结构、脑血管和神经元查询",cover:w.createElement("img",{src:`${n}/guide/gif_batch/topo/out_topo1.gif`}),description:w.createElement("div",null,!localStorage.getItem("Assem")||localStorage.getItem("Assem")==="false"?Qa("Assem",function(){}):null,a("8000.0004")||"Regions选项卡包含的是STAM的解剖命名树,用户可以在该选项卡下的复选框中选择任意数量的感兴趣结构,在主窗口中可视化;Vessels选项卡包含了一套配准到STAM上的完整脑血管图谱,用户可以在此选择感兴趣的血管分支;Neurons选项卡用于查询胞体或投射靶区位于感兴趣脑区的神经元数据。用户也可以选择切换到Brain maps 4.0 ontology,该命名树中的结构同样可以被检索、选中并可视化。"),target:s.current,placement:"right"},{title:a("8000.0033")||"可视化解剖子结构并切换坐标原点",cover:w.createElement("img",{src:`${n}/guide/gif_batch/topo/out_topo2.gif`}),description:w.createElement("div",null,!localStorage.getItem("Assem")||localStorage.getItem("Assem")==="false"?Qa("Assem",function(){}):null,a("8000.0005")||"用户可以点击Regions选项卡下的解剖命名树中蓝色的方块图标,此时主窗口中会以组装的形式可视化用户点击结构的所有子结构,同时展开幅度可在右侧面板设置。默认情况下,该坐标系统以Bregma点作为原点。户也可以将坐标原点切换为STAM的其它任意19个颅骨或颅内基准点,主窗口中可视化对象的坐标值将根据新的原点重新计算。右击任意基准点,可以保存以基准点为坐标原点的STAM标签图像。"),placement:"center",target:Ke.current},{title:a("8000.0034")||"可视化功能设置",cover:w.createElement("img",{src:`${n}/guide/gif_batch/topo/out_topo3.gif`}),description:w.createElement("div",null,!localStorage.getItem("Assem")||localStorage.getItem("Assem")==="false"?Qa("Assem",function(){}):null,a("8000.0006")||"用户可以在页面底部切换到setting选项卡。Left hemisphere开关决定是否展示左半脑,默认为Off。Coordinate开关决定是否在主窗口中显示坐标数值,默认为On。Datum Marks开关决定是否在主窗口中显示基准点,默认为On。Cranial开关决定是否在主窗口中显示颅骨的三维轮廓,默认为Off。"),target:document.getElementsByClassName("bottom_tabs_outer_div")[0]}],Id=[{title:null,description:w.createElement("div",null,!localStorage.getItem("Virtual")||localStorage.getItem("Virtual")==="false"?Qa("Virtual",function(){}):null,a("8000.0007")||"我们提供了虚拟手术导航服务,用户可以通过交互操作,模拟向小鼠脑注射病毒的立体定位手术过程。STAM会根据用户操作,返回注射位点与作为坐标原点的颅骨或颅内基准点之间的距离和注射角度信息。"),cover:w.createElement("video",{src:`${n}/guide/surgery.mp4`,controls:!0,style:{height:600}}),placement:"center",target:Ke.current,style:{width:"min-content"}},{title:a("8000.0035")||"自动导航模式",cover:w.createElement("img",{src:`${n}/guide/gif_batch/surgery/out_surgery1.gif`}),description:w.createElement("div",null,!localStorage.getItem("Virtual")||localStorage.getItem("Virtual")==="false"?Qa("Virtual",function(){}):null,a("8000.0008")||"首先选择要注射的脑区。接下来在脑区上选择注射靶点。用户继续点击Select target按钮,注射脑区的三维模型表面会出现一个跟随鼠标移动的绿点。然后,点击Auto进入自动模式,左侧数据面板中的Structure for injecting选项卡变为Regions to avoid。用户点击需要避开脑区、核团的名称,被选中的文字会变为高亮的红色,同时这些结构的三维轮廓也会显示在主窗口中。接下来点击右侧面板中的Intellectual planning按钮,等待若干秒后,STAM会返回一条从注射靶点出发、并且避开所有用户选中脑区、核团的路径。"),target:s.current,placement:"right"},{title:a("8000.0036")||"手动导航模式",cover:w.createElement("img",{src:`${n}/guide/gif_batch/surgery/out_surgery2.gif`}),description:w.createElement("div",null,!localStorage.getItem("Virtual")||localStorage.getItem("Virtual")==="false"?Qa("Virtual",function(){}):null,a("8000.0009")||"用户点击Manually进入手动规划模式,此时用户标记的注射靶点变为蓝色圆点,并出现一条从注射靶点出发、连接到鼠标当前的位置的红色虚射线,该射线与STAM外轮廓的交点(即注射位点)会被标记为绿色。当用户找到合适的注射路径后,可点击鼠标左键标记,被标记的路径会在主窗口中形成一条蓝色实线,注射位点则被标记为蓝色圆锥,且该路径所穿过的脑区、核团名称也会按照其空间位置排列在实线上。在右侧面板中,会出现该注射路径与三个标准解剖方向的夹角、注射靶点,以及注射位点的信息。用户点击右侧面板上的Reset按钮,即可重新开始整个注射手术流程。"),target:document.getElementsByClassName("ant-tabs-content-holder")[1],placement:"left"}],Ad=[{title:a("5000.5084")||"步骤一",description:a("5000.5082")||"请选择注射模式,如果选择自动模式,点击左侧细胞名称选择细胞核进行旁路",target:Ca.current}],yc=[{title:null,description:w.createElement("div",null,!localStorage.getItem("Reg")||localStorage.getItem("Reg")==="false"?Qa("Reg",function(){}):null,a("8000.0011")||"如①所示,用户可上传PI或DAPI染色的单张脑片图像,该服务将通过约1分钟的服务器端计算,从STAM中重切出一张与用户上传的脑片位置最接近的图谱切面,并根据计算出来的角度和位置显示在主窗口中。"),cover:w.createElement("video",{src:`${n}/guide/registration.mp4`,controls:!0,style:{height:600}}),placement:"center",target:Ke.current,style:{width:"min-content"}},{title:a("8000.0037")||"上传脑片图像并计算或下载配准结果",cover:w.createElement("img",{src:`${n}/guide/gif_batch/registration/out_reg1.gif`}),description:w.createElement("div",null,!localStorage.getItem("Reg")||localStorage.getItem("Reg")==="false"?Qa("Reg",function(){}):null,a("8000.0012")||"用户可以从本地上传待配准的tif/tiff格式的二维脑片图像。然后选择上传图像的类型。接着点击Calculate the corresponding plane from the atlas按钮组中的Start按钮,等待后台返回计算结果。计算完成后,Start按钮下方会出现计算结果的预览图,可左键单击放大查看。Start按钮右侧的Save按钮此时也变为可点击,用户单击该按钮,可以将计算结果下载到本地。"),target:document.getElementsByClassName("ant-tabs-content-holder")[1],placement:"left"},{title:a("8000.0038")||"页面跳转功能",cover:w.createElement("img",{src:`${n}/guide/gif_batch/registration/out_reg2.gif`}),description:w.createElement("div",null,!localStorage.getItem("Reg")||localStorage.getItem("Reg")==="false"?Qa("Reg",function(){}):null,a("8000.0013")||"在主窗口右击相应的脑区、核团,可以跳转到任意剖面可视化和脑解剖知识库页面。"),placement:"center",target:Ke.current}],bu=[{title:null,description:w.createElement("div",null,!localStorage.getItem("Down")||localStorage.getItem("Down")==="false"?Qa("Down",function(){}):null,a("8000.0014")||"如①和②所示,用户可以在STAM所在的三维空间中选取任意感兴趣范围,并以不同的采样倍数下载自己选取范围内的原始图像。"),cover:w.createElement("video",{src:`${n}/guide/datasharing.mp4`,controls:!0,style:{height:600}}),placement:"center",target:Ke.current,style:{width:"min-content"}},{title:a("8000.0047")||"平移模式选择原始图像数据的范围",cover:w.createElement("img",{src:`${n}/guide/gif_batch/datasharing/out_sharing1.gif`}),description:w.createElement("div",null,!localStorage.getItem("Down")||localStorage.getItem("Down")==="false"?Qa("Down",function(){}):null,a("8000.0015")||"用户可以点击“Select the range”按钮,然后主窗口中出现一个橙色线条的方框。用户通过长按鼠标左键,拖动红、绿、蓝三种颜色的箭头,可以控制方框在各个方向上的平移,当某个方向的箭头被用户选中时,该箭头会变为高亮的黄色。"),target:document.getElementsByClassName("ant-tabs-content-holder")[1],placement:"left"},{title:a("8000.0039")||"缩放模式选择原始图像数据的范围并预览图像",cover:w.createElement("img",{src:`${n}/guide/gif_batch/datasharing/out_sharing2.gif`}),description:w.createElement("div",null,!localStorage.getItem("Down")||localStorage.getItem("Down")==="false"?Qa("Down",function(){}):null,a("8000.0016")||"用户也可以通过按下键盘上的“A”,将范围选取操作从平移模式切换为缩放模式。此时方框的箭头会变为方块,拖动方块,就可以改变方框的大小。经过上述操作明确了待下载数据的空间范围后,可以点击“预览下载图像”按钮,通过体绘制,在主窗口中对该范围内的图像进行可视化,"),placement:"center",target:Ke.current},{title:a("8000.0040")||"选择数据的采样倍数并下载",cover:w.createElement("img",{src:`${n}/guide/gif_batch/datasharing/out_sharing3.gif`}),description:w.createElement("div",null,!localStorage.getItem("Down")||localStorage.getItem("Down")==="false"?Qa("Down",function(){}):null,a("8000.0017")||"拖动“Set the downsampling rate”滑动条,用户可以选择待下载数据的采样倍数;具体的倍数值可通过滑块上方的黑色背景提示文字查看。当数据量没有超过1 GB时,点击Downloading按钮可直接下载;当超过该数值,点击Downloading按钮会唤起用户终端的邮箱管理工具(如Outlook等),并自动将待下载范围和采样倍数信息填入邮件中,此时用户点击邮件发送按钮,即可向STAM网站发送数据下载申请。"),target:document.getElementsByClassName("ant-tabs-content-holder")[1],placement:"left"}],ju=[{title:null,description:w.createElement("div",null,!localStorage.getItem("Map")||localStorage.getItem("Map")==="false"?Qa("Map",function(){}):null,a("8000.0018")||"我们支持用户上传此前已经配准到Common Coordinate Framework(CCF)的三维图像数据和神经元完整形态数据,并将其映射到STAM上,并直接在三维空间中进行可视化;我们也支持反向映射,即将已经配准到STAM的同类型数据映射到CCF上。"),cover:w.createElement("video",{src:`${n}/guide/mapping.mp4`,controls:!0,style:{height:600}}),placement:"center",target:Ke.current,style:{width:"min-content"}},{title:a("8000.0041")||"上传三维图像数据并计算",cover:w.createElement("img",{src:`${n}/guide/gif_batch/mapping/out_mapping1.gif`}),description:w.createElement("div",null,!localStorage.getItem("Map")||localStorage.getItem("Map")==="false"?Qa("Map",function(){}):null,a("8000.0019")||"用户点击右侧面板的Upload按钮,上传已配准到CCF或者STAM的三维图像数据或神经元形态学数据。上传结束后,在Select the direction of conversion单选框中,确定数据的映射方向是从STAM到CCF还是反过来。此后点击Start按钮,STAM的服务器端开始计算,Start按钮变为等待状态。"),target:document.getElementsByClassName("ant-tabs-content-holder")[1],placement:"left"},{title:a("8000.0042")||"计算完成后预览或下载结果",cover:w.createElement("img",{src:`${n}/guide/gif_batch/mapping/out_mapping2.gif`}),description:w.createElement("div",null,!localStorage.getItem("Map")||localStorage.getItem("Map")==="false"?Qa("Map",function(){}):null,a("8000.0020")||"等待约10分钟后,STAM的服务器端完成计算并返回结果。此时Save按钮和View result按钮均变为可点击状态。点击Save按钮,可以将计算结果下载到本地;点击View result按钮,可以在主窗口中预览计算结果。"),target:document.getElementsByClassName("ant-tabs-content-holder")[1],placement:"left"}],xu=[{title:null,description:w.createElement("div",null,!localStorage.getItem("Res")||localStorage.getItem("Res")==="false"?Qa("Res",function(){}):null,w.createElement("div",null,a("8000.0021")||"我们提供了沿任意角度可视化脑图谱切面的服务。用户可以查看感兴趣的STAM任意位置和角度的切面,浏览该切面上的脑区、核团标注,并由该图谱切面跳转到STAM任意切面服务所提供的各向同性1微米分辨率切面。"),w.createElement("div",null,a("8000.0022")||"如①所示,在窗口左侧的是数据面板,与“三维自然形貌可视化”中的数据面板功能相同。位于正中区域的是主窗口。"),w.createElement("div",null,a("8000.0023")||"用户也可以通过拖动滑动条,实现图谱切面的平移和旋转。具体的平移、旋转数值可通过滑块上方的黑色背景提示文字查看。")),cover:w.createElement("video",{src:`${n}/guide/reslicing.mp4`,controls:!0,style:{height:600}}),placement:"center",target:Ke.current,style:{width:"min-content"}},{title:a("8000.0043")||"平移或旋转图谱切面",cover:w.createElement("img",{src:`${n}/guide/gif_batch/reslicing/out_reslicing1.gif`}),description:w.createElement("div",null,!localStorage.getItem("Res")||localStorage.getItem("Res")==="false"?Qa("Res",function(){}):null,a("8000.0024")||"用户通过长按鼠标左键,拖动红、绿、蓝三种颜色的箭头,可以控制图谱切面的平移。用户也可以通过按下键盘上的“R”,将范围选取操作从平移模式切换为旋转模式。此时箭头会变为球形,沿球形拖动,就可以控制图谱切面的旋转。"),placement:"center",target:Ke.current},{title:a("8000.0044")||"下载高分辨率的STAM图谱3D标签图像",cover:w.createElement("img",{src:`${n}/guide/gif_batch/reslicing/out_reslicing2.gif`}),description:w.createElement("div",null,!localStorage.getItem("Res")||localStorage.getItem("Res")==="false"?Qa("Res",function(){}):null,a("8000.0025")||"用户也可以通过拖动滑动条,实现图谱切面的平移和旋转。点击viewer higher resolution image按钮可以跳转到任意剖面可视化界面。点击Requesting STAM labels按钮,填入许可证即可下载各向同性10微米分辨率的STAM图谱3D标签图像。"),target:document.getElementsByClassName("ant-tabs-content-holder")[1],placement:"left"}],Xu=[{title:null,description:w.createElement("div",null,!localStorage.getItem("Neu")||localStorage.getItem("Neu")==="false"?Qa("Neu",function(){}):null,w.createElement("div",null,a("8000.0026")||"我们提供全脑的胞体或投射靶区的神经环路数据可视化服务。用户可以选择感兴趣的任意胞体或投射靶区在脑区、核团的神经环路数据,并查看数据对应的脑区、核团标注。"),w.createElement("div",null,a("8000.0027")||"如①所示,在窗口左侧的是数据面板,与“三维自然形貌可视化”中的数据面板功能相同,其中Neurons选项卡用于查询胞体或投射靶区位于感兴趣脑区的神经元数据。"),w.createElement("div",null,a("8000.0028")||"如②所示,用户可以在搜索框中搜索感兴趣脑区、核团。"),w.createElement("div",null,a("8000.0029")||"如③所示,这是一个由若干个脑区、核团子结构组成的神经环路连接示意图。")),cover:w.createElement("video",{src:`${n}/guide/neuronal.mp4`,controls:!0,style:{height:600}}),placement:"center",target:Ke.current,style:{width:"min-content"}},{title:a("8000.0045")||"查看神经环路连接示意图并交互",cover:w.createElement("img",{src:`${n}/guide/gif_batch/neuronal/out_neuronal1.gif`}),description:w.createElement("div",null,!localStorage.getItem("Neu")||localStorage.getItem("Neu")==="false"?Qa("Neu",function(){}):null,a("8000.0030")||"用户可以点击“whole-brain connectivity diagram”按钮或在搜索框中搜索感兴趣脑区、核团,即可弹出由若干个脑区、核团子结构组成的神经环路连接示意图。不同圆点表示不同的脑区、核团结构,圆点旁边显示的是脑区、核团的名称。用户可以将鼠标移动到圆点、脑区或核团的名称上,左击或右击圆点。"),target:document.getElementsByClassName("ant-tabs-content-holder")[1],placement:"left"},{title:a("8000.0046")||"显示用户指定脑区上下游连接关系",cover:w.createElement("img",{src:`${n}/guide/gif_batch/neuronal/out_neuronal1.gif`}),description:w.createElement("div",null,!localStorage.getItem("Neu")||localStorage.getItem("Neu")==="false"?Qa("Neu",function(){}):null,a("8000.0031")||"双击任意一个代表某个脑区、核团结构的圆点,神经环路连接示意图窗口隐藏,回到主窗口页面,显示该结构的上下游连接关系。在Upstream窗口中展示了投射到选中脑区、核团的神经环路,在Downstream窗口中展示了选中脑区、核团的投射靶区。用户可以用复选框选择任意数量的感兴趣神经元,在主窗口中可视化。"),target:s.current,placement:"right"}];w.useEffect(()=>{const ye=wc("index"),Ne=wc("type"),We=wc("structure");(Ne||ye)&&setTimeout(()=>{switch(ye=="Assembling"?(La(1,!0),(!localStorage.getItem("Assem")||localStorage.getItem("Assem")==="false")&&rt(!0)):ye=="Virtual_Inject"?(La(2,!0),(!localStorage.getItem("Virtual")||localStorage.getItem("Virtual")==="false")&&pt(!0)):ye=="Slicing"?(La(3,!0),(!localStorage.getItem("Res")||localStorage.getItem("Res")==="false")&&Yt(!0)):ye=="Mapping"?(La(6,!0),(!localStorage.getItem("Map")||localStorage.getItem("Map")==="false")&&Yt(!0)):ye=="Downloading"?(La(5,!0),(!localStorage.getItem("Down")||localStorage.getItem("Down")==="false")&&yt(!0)):ye=="Neuronal"?(La(7,!0),(!localStorage.getItem("Neu")||localStorage.getItem("Neu")==="false")&&tn(!0)):ye=="Registration"&&(La(4,!0),(!localStorage.getItem("Reg")||localStorage.getItem("Reg")==="false")&&Tt(!0)),Ne){case"simple":La(0,!0),document.title="STAM-SimpleViewer",he(0);case"normal":La(1,!0),document.title="STAM-NormalViewer";break;case"virtual":La(2,!0),document.title="STAM-Surgery",he(2);break;case"slicing":La(3,!0),document.title="STAM-Reslicing";break;case"registration":La(4,!0),document.title="STAM-Registration";break;case"downloading":La(5,!0),document.title="STAM-Downloading";break;case"mapping":La(6,!0),document.title="STAM-AtlasMapping";break;case"circuits":La(7,!0),document.title="STAM-NeuronalCircuits",setTimeout(()=>{We&&(mo(We),we(We))},500);break;case"other":La(8,!0),document.title="STAM-OtherAtlas";break;case"setting":La(9,!0),document.title="STAM-ViewSetting";break}},500)},[]),w.useEffect(()=>{gt.current=(f==null?void 0:f.domElement.clientWidth)-1,Qe.current=(f==null?void 0:f.domElement.clientHeight)-1;let ye=-(Kt.min.x+Kt.max.x)*Bo.current/2,Ne=Kt.max.clone().multiplyScalar(Bo.current).add(new me(ye,To.current,_o.current)),We=Kt.min.clone().multiplyScalar(Bo.current).add(new me(ye,To.current,_o.current));Rt.current=Ne,Vt.current=We;let tt=new js({visible:!1});if(_t.current=new Dn(new ns(Rt.current.x-Vt.current.x,Rt.current.y-Vt.current.y,Rt.current.z-Vt.current.z),tt),_t.current.position.set((Rt.current.x+Vt.current.x)/2,(Rt.current.y+Vt.current.y)/2,(Rt.current.z+Vt.current.z)/2),No(),O4){let Ct=O4;Ct=="CCF"&&Nm({filepath:n+"/data/FBX/outline-CCF.FBX",index:"outline",color:"#327DFF",opacity:.3,offsetZ:0,R:.01,callback:function(){}},et),Ct=="WHS"&&Nm({filepath:n+"/data/FBX/outline-WHS.FBX",index:"outline",color:"#327DFF",opacity:.3,offsetZ:0,R:.01,callback:function(){}},et)}},[]),w.useEffect(()=>{gt.current=(f==null?void 0:f.domElement.clientWidth)-1,Qe.current=(f==null?void 0:f.domElement.clientHeight)-1},[f==null?void 0:f.domElement.clientWidth]),w.useEffect(()=>{const ye=new rs;ye.expandByObject(Et.current);const Ne=R.current(ye.min.clone()),We=R.current(ye.max.clone());let tt=new Wh(Do(650,620,`${Ne.x.toFixed(2)},${Ne.y.toFixed(2)},${Ne.z.toFixed(2)}`,"#ccc")),Ct=new eh(new bf({map:tt}));Ct.name="startText";let Jt=new Wh(Do(650,620,`${We.x.toFixed(2)},${We.y.toFixed(2)},${We.z.toFixed(2)}`,"#ccc")),$t=new eh(new bf({map:Jt}));$t.name="endText",Ct.position.set(ye.min.x,ye.min.y+.2,ye.min.z),$t.position.set(ye.max.x,ye.max.y+.6,ye.max.z);let bn=Ce.current.getObjectByName("startText"),un=Ce.current.getObjectByName("endText");bn&&un&&(Ce.current.remove(bn,un),Ce.current.add(Ct,$t))},[Y]),w.useEffect(()=>{var cr,Wn;let ye={},Ne=[],We=[],tt={},Ct=[],Jt=[],$t,bn=new URL(window.location.href),un=new URLSearchParams(bn.search);if(fe&&Re.length>0){if($t=Ie&&Nl(Re,Ie)||"",Ie==""){T.current.removeFBX(Ms.current,!0);const _r=T.current.checkedKeys.current.findIndex(kr=>kr===Ms.current);_r>-1&&T.current.checkedKeys.current.splice(_r,1),Ie==""&&(Ms.current="");const qn=JSON.stringify(T.current.checkedKeys.current);un.set("regionsChecked",qn),bn.search=un.toString(),window.history.replaceState({},"",bn)}if(Ie!=""){if($t==null&&Ie)if(Ie=="fiber tract fiber tracts")$t="fiber tract";else{let _r=Ie.match(/^[\w\/]+/);$t=_r?_r[0]:""}if($t){let _r=((cr=fe[$t])==null?void 0:cr.up)||[];Ct=Ct.concat(_r);let qn=((Wn=fe[$t])==null?void 0:Wn.down)||[];Jt=Jt.concat(qn),Ct=Array.from(new Set(Ct)),Jt=Array.from(new Set(Jt)),Ct&&Ct.forEach(ti=>{var Ni,$s,zs;for(const sl in fe)($s=(Ni=fe[sl])==null?void 0:Ni.soma)!=null&&$s.includes(ti)&&((zs=fe[sl])==null?void 0:zs.id)==1&&(sl in ye?ye[sl].includes(ti)||ye[sl].push(ti):ye[sl]=[ti])}),Jt&&Jt.forEach(ti=>{var Ni,$s,zs;for(const sl in fe)($s=(Ni=fe[sl])==null?void 0:Ni.axon)!=null&&$s.includes(ti)&&((zs=fe[sl])==null?void 0:zs.id)==1&&(sl in tt?tt[sl].includes(ti)||tt[sl].push(ti):tt[sl]=[ti])});for(let ti in tt)if(ti!=$t){let Ni=al(Re,ti.replace("_","/"));Ni&&Ne.push({name:ti.replace("_","/"),itemStyle:{color:Ni.color},lineStyle:{color:"#ccc"},value:tt[ti].length})}for(let ti in ye)if(ti!=$t){let Ni=al(Re,ti.replace("_","/"));Ni&&We.push({name:ti.replace("_","/"),itemStyle:{color:Ni.color},lineStyle:{color:"#ccc"},value:ye[ti].length})}bs(!0);let kr=al(Re,$t.replace("_","/"));const qr=[{name:$t.replace("_","/"),itemStyle:{color:kr&&kr.color},lineStyle:{color:"#ccc"},children:Ne}],Br=[{name:$t.replace("_","/"),itemStyle:{color:kr&&kr.color},lineStyle:{color:"#ccc"},children:We}];if(Ms.current!=$t){T.current.removeFBX(Ms.current,!0);const ti=T.current.checkedKeys.current.findIndex(zs=>zs===Ms.current);ti>-1&&T.current.checkedKeys.current.splice(ti,1);const Ni=al(T.current.treeDatas,$t.replace("_","/"));let $s=n+"/data/FBX/"+$t+".FBX";Ni&&qh($s,$t,Ni.color,.8,0,"FBX"),T.current.checkedKeys.current.push($t),q(T.current.checkedKeys.current),Ms.current=$t,un.set("echart_Value",Ie||""),bn.search=un.toString(),window.history.replaceState({},"",bn)}const ca={series:[{type:"tree",top:"1%",bottom:"1%",symbolSize:7,emphasis:{focus:"ancestor",lineStyle:{color:"#000"}},expandAndCollapse:!0,animationDuration:550,animationDurationUpdate:750}]};if(go.current&&ta.current){ta.current.style.height=We.length*2*10+"px",go.current.style.height=Ne.length*2*10+"px";const ti=YO(go.current);ti.setOption({...ca,tooltip:{trigger:"item",triggerOn:"mousemove",position:function(Jr,Nd,Gg,V0,Ev){const yp=Jr[0],Ul=Jr[1];return[yp+10,Ul]},formatter:function(Jr){const Nd=$t==Jr.name?"":Jr.name+"->",Gg=Jr.value?", "+Jr.value+" neurons":"";return`${Nd}${$t}${Gg}`}},series:[{...ca.series[0],left:"30%",right:"30%",label:{position:"right",verticalAlign:"middle",align:"left"},leaves:{label:{position:"left",verticalAlign:"middle",align:"right"}},orient:"RL",data:qr}]});const Ni=YO(ta.current);Ni.setOption({...ca,tooltip:{trigger:"item",triggerOn:"mousemove",position:function(Jr,Nd,Gg,V0,Ev){const yp=Jr[0],Ul=Jr[1],sA=Ev.contentSize[0];return[yp-sA-10,Ul]},formatter:function(Jr){const Nd=$t==Jr.name?"":"->"+Jr.name+", "+Jr.value+" neurons";return`${$t}${Nd}`}},series:[{...ca.series[0],left:"20%",right:"40%",label:{position:"left",verticalAlign:"middle",align:"right"},leaves:{label:{position:"right",verticalAlign:"middle",align:"left"}},orient:"LR",data:Br}]});const $s=()=>{ti.resize(),Ni.resize()},zs=Jr=>{if(ne(st.indexOf("neurons")+1),pe.current.ProcessedData.current=!1,Jr.data&&Jr.data.name){pe.current.setSearchValue($t.replace("_","/")),pe.current.setSomaValue(Jr.data.name.replace("_","/"));const Nd=bc(qr[0],Jr.data.name);ti.setOption({series:[{data:[Nd]}]}),Ni.setOption({series:[{data:Br}]})}},sl=Jr=>{if(ne(st.indexOf("neurons")+1),pe.current.ProcessedData.current=!1,Jr.data&&Jr.data.name){pe.current.setSearchValue(Jr.data.name.replace("_","/")),pe.current.setSomaValue($t.replace("_","/"));const Nd=bc(Br[0],Jr.data.name);Ni.setOption({series:[{data:[Nd]}]}),ti.setOption({series:[{data:qr}]})}};return window.addEventListener("resize",$s),ti.on("click",zs),Ni.on("click",sl),qr[0].children[0]&&zs({data:{name:qr[0].children[0].name}}),()=>{ti.off("click",zs),Ni.off("click",sl),window.removeEventListener("resize",$s),ti.dispose(),Ni.dispose()}}}}else bs(!1),ta.current&&go.current&&(ta.current.style.height="0px",go.current.style.height="0px")}},[Ie,Re,fe]),w.useEffect(()=>{if(Z===2)oo.current?(La(2,!0),oo.current=!1):La(2),Un(!0),h.current.noRotate=!0,h.current.noPan=!0,f.domElement.addEventListener("mousedown",ml),f.domElement.addEventListener("mousemove",Bg),f.domElement.addEventListener("mouseup",$g),j(1);else{Ce.current.rotation.set(0,0,0),h.current.noRotate=!1,h.current.noPan=!1,f.domElement.removeEventListener("mousedown",ml),f.domElement.removeEventListener("mousemove",Bg),f.domElement.removeEventListener("mouseup",$g),j(3),ol(),oo.current?(La(1,!0),oo.current=!1):La(1),B(!1);const ye=Ce.current.getObjectByName("targetPoint");ye&&Ce.current.remove(ye)}},[Z]),w.useEffect(()=>{ir.length>0&&Xa(!0)},[ir]);const pl=ye=>{const{positionx:Ne,positiony:We,positionz:tt}=ye;let Ct=new URL(window.location.href),$t=new URLSearchParams(Ct.search).get("atlasReslicingInfo"),bn={};$t&&(bn=JSON.parse($t)),Ar(Ne),Ht(We),Ye(tt),bn.positionX=Ne,bn.positionY=We,bn.positionZ=tt,qi.atlasReslicingInfo=bn},Zu=ye=>{br(ye)},La=(ye,Ne=!1)=>{if(Ce.current.remove(fs.current),Ti(ye),oe({}),Fe(0),Z===0&&ye=="1"?Cu("0"):Cu(ye),Ne||(ye=="7"||ye=="3"?Wb(!0):Wb(!1)),b&&(b.current=ye),ye!==2){const Br=Ce.current.getObjectByName("syrings");Br&&Ce.current.remove(Br),B(!1),Ne||yi()}if(ye==2){Ai.current.position.set(18,-10,-10),Ai.current.rotation.set(2.9896,0,0),h.current.reset(),h.current.target.set(0,0,0),h.current.object.position.set(18,-10,-10),h.current.object.up.set(0,-1,0),h.current.update(),Ai.current.updateMatrixWorld();const Br=JSON.stringify({cameraPosition:Ai.current.position,cameraRotation:Ai.current.rotation}),ca=JSON.stringify({controlsTarget:h.current.target,controlsPosition:h.current.object.position,controlsUp:h.current.object.up});let ti=new URL(window.location.href),Ni=new URLSearchParams(ti.search);Ni.set("cameraInfo",Br),Ni.set("controllerInfo",ca),ti.search=Ni.toString(),window.history.replaceState({},"",ti)}No(),li([]),ms("Config_DAPI.ini"),Oe.current=null,Xi({}),Ne||Q.current&&pe.current&&T.current&&(Q.current.removeALL(),pe.current.removeALL(),T.current.removeALL()),ye==1?E(!0):E(!1),Sr.current&&(Sr.current.textContent=a("4000.0208")||"选择靶点"),c!=null&&c.current&&(c.current=""),u.current&&(u.current=""),y.current=!1,d.current=!1;const We=Ce.current.getObjectByName("sphereBig"),tt=Ce.current.getObjectByName("sphereMiddelClick"),Ct=Ce.current.getObjectByName("dashedLine"),Jt=Ce.current.getObjectByName("Line"),$t=Ce.current.getObjectByName("transformControls"),bn=Ce.current.getObjectByName("sectionSphere"),un=Ce.current.getObjectByName("correspondingPlaneDataSwc"),cr=[];Ce.current.traverse(Br=>{Br.userData.isAtlasMapping==="true"&&cr.push(Br)}),cr.forEach(Br=>{Ce.current.remove(Br)}),un&&Ce.current.remove(un),bn&&Ce.current.remove(bn),$t&&Ce.current.remove($t),g.current=[],x.current=[],Ct&&Ce.current.remove(Ct),Jt&&Ce.current.remove(Jt),We&&Ce.current.remove(We),tt&&Ce.current.remove(tt);const Wn=Ce.current.children.filter(Br=>Br.userData.name==="registrationPng");Wn&&Ce.current.remove(...Wn),U.current=!1,L(!1);const _r=Ce.current.getObjectByName("HorizontalView"),qn=Ce.current.getObjectByName("SagittalView"),kr=Ce.current.getObjectByName("arbitrarySlice"),qr=Ce.current.getObjectByName("CoronalView");ye!=3&&(_r&&(Ce.current.remove(_r),Hn(!1)),qn&&(Ce.current.remove(qn),Tn(!1)),kr&&(Ce.current.remove(kr),gn(!1)),qr&&(Ce.current.remove(qr),mn(!1))),ye==3&&setTimeout(()=>{il(tr.current)},10),It()},Md=ye=>{r(ye),i.current=ye},bc=(ye,Ne)=>{const We=JSON.parse(JSON.stringify(ye)),tt=Ct=>{Ct.name===Ne?Ct.lineStyle.color="#000":Ct.lineStyle.color="#ccc",Ct.children&&Ct.children.forEach(Jt=>{tt(Jt)})};return tt(We),We},Nl=(ye,Ne)=>{for(let We of ye){if(We.name.toLowerCase()===Ne.toLowerCase()||We.fullname.toLowerCase()===Ne.toLowerCase())return We.name;if(We.children){const tt=Nl(We.children,Ne);if(tt)return tt}}return null},vl=()=>{y.current=!y.current,d.current=!1,m.current&&Ce.current.remove(m.current)},qs=()=>{if(Sr.current)if(Sr.current.textContent==(a("4000.0208")||"选择靶点"))Sr.current.textContent=a("4000.0242")||"清除靶点";else if(Sr.current.textContent===(a("4000.0126")||"重置"))lt(0),F.current="",Sr.current.textContent=a("4000.0208")||"选择靶点",B(!1),yi(),j(1);else{Sr.current.textContent=a("4000.0208")||"选择靶点",g.current=[],x.current=[],B(!1);const ye=Ce.current.getObjectByName("dashedLine"),Ne=Ce.current.getObjectByName("sphereBig"),We=Ce.current.getObjectByName("sphereMiddelClick"),tt=Ce.current.getObjectByName("targetPoint");ye&&Ne&&Ce.current.remove(ye,Ne),We&&Ce.current.remove(We),tt&&Ce.current.remove(tt),d.current=!1}vl()};w.useEffect(()=>{V&&Ot==0&&Ft(!0),Ot!=0&&V&&Sr&&(Sr.current.textContent=a("4000.0126")||"重置")},[V]);const yi=()=>{g.current=[],x.current=[];const ye=Ce.current.getObjectByName("dashedLine"),Ne=Ce.current.getObjectByName("sphereBig"),We=Ce.current.getObjectByName("sphereMiddelClick"),tt=Ce.current.getObjectByName("targetPoint");ye&&Ne&&Ce.current.remove(ye,Ne),We&&Ce.current.remove(We),tt&&Ce.current.remove(tt),ol(),L(!1),W.current=[],y.current=!0,d.current=!1,U.current=!1,T.current.removeALL(),m.current&&Ce.current.remove(m.current),ne(1),c!=null&&c.current&&(c.current=""),u.current&&(u.current="")},ls=(ye,Ne)=>{clearTimeout(mc.current),mc.current=setTimeout(()=>{const We=Ce.current.getObjectByName("Brain");let tt=new ka;tt.setFromAxisAngle(new me(1,0,0),Math.PI/2);let Ct=new me,Jt=new hb;if(Ne)if(We&&(Ct=Ne.position.clone().applyMatrix4(We.matrixWorld.clone().invert()).applyQuaternion(tt)),ye==1)fetch("/app-api/c-api/slicing",{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify({x:0,y:0,z:Ct.z})}).then($t=>$t.ok?$t.json():Os.error({title:$t.message})).then($t=>{const bn=$t.base64;let un=Jt.load(bn);un.center.set(.5,.5),un.rotation=Math.PI,Ne.material.map=un});else if(ye==2)fetch("/app-api/c-api/slicing",{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify({x:Ct.x,y:0,z:0})}).then($t=>$t.ok?$t.json():Os.error({title:$t.message})).then($t=>{const bn=$t.base64;let un=Jt.load(bn);const Wn=Ne.geometry.attributes.uv.array,_r=kr=>{Wn[kr+0]=1,Wn[kr+1]=0,Wn[kr+2]=1,Wn[kr+3]=1,Wn[kr+4]=0,Wn[kr+5]=0,Wn[kr+6]=0,Wn[kr+7]=1},qn=kr=>{Wn[kr+0]=1,Wn[kr+1]=1,Wn[kr+2]=1,Wn[kr+3]=0,Wn[kr+4]=0,Wn[kr+5]=1,Wn[kr+6]=0,Wn[kr+7]=0};_r(0),qn(8),Ne.geometry.attributes.uv.needsUpdate=!0,Ne.material.map=un});else if(ye==3)fetch("/app-api/c-api/slicing",{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify({x:0,y:Ct.y,z:0})}).then($t=>($t.ok,$t.json())).then($t=>{if($t.message){Os.error({content:$t.message});return}const bn=$t.base64;let un=Jt.load(bn);const Wn=Ne.geometry.attributes.uv.array;(qn=>{Wn[qn+0]=1,Wn[qn+1]=0,Wn[qn+2]=0,Wn[qn+3]=0,Wn[qn+4]=1,Wn[qn+5]=1,Wn[qn+6]=0,Wn[qn+7]=1})(24),Ne.geometry.attributes.uv.needsUpdate=!0,Ne.material.map=un});else{const $t=Ne.rotation.x/Math.PI*180,bn=Ne.rotation.y/Math.PI*180,un=Ne.rotation.z/Math.PI*180;fetch("/app-api/c-api/slicing",{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify({angles:[$t,bn,un],center:[Ct.x,Ct.y,Ct.z]})}).then(cr=>cr.ok?cr.json():Os.error({title:cr.message})).then(cr=>{const Wn=cr.base64;let _r=Jt.load(Wn);const kr=Ne.geometry.attributes.uv.array;(Br=>{kr[Br+0]=0,kr[Br+1]=0,kr[Br+2]=1,kr[Br+3]=0,kr[Br+4]=0,kr[Br+5]=1,kr[Br+6]=1,kr[Br+7]=1})(24),Ne.geometry.attributes.uv.needsUpdate=!0,Ne.material.map=_r})}},100)},rl=(ye,Ne)=>{let We,tt=0,Ct=new URL(window.location.href),$t=new URLSearchParams(Ct.search).get("atlasReslicingInfo"),bn={};$t&&(bn=JSON.parse($t)),tr.current==1?(Ce.current.children.forEach(function(un,cr){Ne==3&&un.name=="CoronalView"&&(tt=cr)}),We=new me(0,0,ye),Ce.current.children[tt].position.setZ(We.z),ls(tr.current,Ce.current.children[tt])):tr.current==2?(Ce.current.children.forEach(function(un,cr){Ne==1&&un.name=="SagittalView"&&(tt=cr)}),We=new me(ye,0,0),Ce.current.children[tt].position.setX(We.x),ls(tr.current,Ce.current.children[tt])):tr.current==3?(Ce.current.children.forEach(function(un,cr){Ne==2&&un.name=="HorizontalView"&&(tt=cr)}),We=new me(0,ye,0),Ce.current.children[tt].position.setY(We.y),ls(tr.current,Ce.current.children[tt])):tr.current==4&&(Ce.current.children.forEach(function(un,cr){un.name=="arbitrarySlice"&&(tt=cr)}),Ne==3&&(Ye(ye),bn.positionZ=ye,qi.atlasReslicingInfo=bn,We=new me($r,An,ye),Ce.current.children[tt].position.setZ(We.z)),Ne==2&&(Ht(ye),bn.positionY=ye,qi.atlasReslicingInfo=bn,We=new me(Se,ye,Se),Ce.current.children[tt].position.setY(We.y)),Ne==1&&(Ar(ye),bn.positionX=ye,qi.atlasReslicingInfo=bn,We=new me(ye,An,Se),Ce.current.children[tt].position.setX(We.x)),ls(tr.current,Ce.current.children[tt]))},Su=ye=>{let Ne=new URL(window.location.href),tt=new URLSearchParams(Ne.search).get("atlasReslicingInfo"),Ct={};tt&&(Ct=JSON.parse(tt)),tr.current==2&&(Ar(ye),Ht(-5.33),Ye(-8),rl(ye,1),Ct.positionX=ye,Ct.positionY=-5.33,Ct.positionZ=-8,qi.atlasReslicingInfo=Ct),tr.current==4&&rl(ye,1)},Wc=ye=>{let Ne=new URL(window.location.href),tt=new URLSearchParams(Ne.search).get("atlasReslicingInfo"),Ct={};tt&&(Ct=JSON.parse(tt)),tr.current==3&&(Ht(ye),Ye(-8),Ar(-5.17),Ct.positionX=-5.17,Ct.positionY=ye,Ct.positionZ=-8,qi.atlasReslicingInfo=Ct,rl(ye,2)),tr.current==4&&rl(ye,2)},Rd=ye=>{let Ne=new URL(window.location.href),tt=new URLSearchParams(Ne.search).get("atlasReslicingInfo"),Ct={};tt&&(Ct=JSON.parse(tt)),tr.current==1&&(Ye(ye),Ar(-5.17),Ht(-5.33),rl(ye,3),Ct.positionX=-5.17,Ct.positionY=-5.33,Ct.positionZ=ye,qi.atlasReslicingInfo=Ct),tr.current==4&&rl(ye,3)},xc=(ye,Ne)=>{let We=0,tt=new URL(window.location.href),Jt=new URLSearchParams(tt.search).get("atlasReslicingInfo"),$t={};Jt&&($t=JSON.parse(Jt)),Ce.current.children.forEach(function(_r,qn){_r.name=="arbitrarySlice"&&(We=qn)});let bn=Ce.current.children[We];bn.rotation.set(bn.userData.initRotation.x,bn.userData.initRotation.y,bn.userData.initRotation.z);let un=0,cr=0,Wn=0;Ne==1&&(cn(ye),$t.angleX=ye,qi.atlasReslicingInfo=$t,un=ye*Math.PI/180,cr=xn*Math.PI/180,Wn=Xn*Math.PI/180),Ne==2&&(pn(ye),$t.angleY=ye,qi.atlasReslicingInfo=$t,un=on*Math.PI/180,cr=ye*Math.PI/180,Wn=Xn*Math.PI/180),Ne==3&&(zn(ye),$t.angleZ=ye,qi.atlasReslicingInfo=$t,un=on*Math.PI/180,cr=xn*Math.PI/180,Wn=ye*Math.PI/180),bn.rotation.x=un,bn.rotation.y=cr,bn.rotation.z=Wn,Ce.current.children.forEach(function(_r,qn){_r.name=="arbitrarySlice"&&(We=qn)}),ls(tr.current,Ce.current.children[We])},Ku=(ye,Ne=!1)=>{let We;const tt=ye||o;if(tr.current==4||Ne)setTimeout(()=>{let Ct="atlas.brainsmatics.org",Jt=[],$t=parseInt(((Se+8)/14*14e3).toString()),bn=parseInt(((An+5.33)/7.37*9e3).toString());Ne?(Jt[0]=90+ai.angles[0],Jt[1]=ai.angles[1],Jt[2]=ai.angles[2],$t=ai.tx*14e3,bn=450):(Jt[0]=on,Jt[1]=xn,Jt[2]=Xn);let un=parseInt((($r+5.17)/10.34*11400).toString()),cr=Pe||"http://"+Ct,Wn="http://"+Ct+'/program/frontend/#!{"dimensions":{"x":[0.000001,"m"],"y":[0.000001,"m"],"z":[0.000001,"m"]},"position":['+un+","+bn+","+$t+'],"crossSectionOrientation":[0.7071067690849304,0,0,-0.7071067690849304],"crossSectionScale":19.05662684586283,"projectionOrientation":[0.10079027712345123,0.01086505874991417,-0.5527856945991516,-0.827134370803833],"projectionScale":74319.80669416502,"projectionDepth":-49.99956451007631,"layers":[{"type":"image","source":{"url":"precomputed://'+cr+'/data/RGB_raw","transform":{"outputDimensions":{"x":[0.000001,"m"],"y":[0.000001,"m"],"z":[0.000001,"m"],"c^":[1,""]},"inputDimensions":{"x":[0.000001,"m"],"y":[0.000001,"m"],"z":[0.000001,"m"],"c^":[1,""]}}},"tab":"rendering","shader":"#uicontrol invlerp normalized\\nvoid main() {\\n emitRGB(vec3(toNormalized(getDataValue(0)),\\n toNormalized(getDataValue(1)),\\n toNormalized(getDataValue(2))));\\n}\\n","channelDimensions":{"c^":[1,""]},"name":"raw"},{"type":"segmentation","source":{"url":"precomputed://'+cr+'/data/seg_half","transform":{"outputDimensions":{"x":[0.000001,"m"],"y":[0.000001,"m"],"z":[0.000001,"m"]},"inputDimensions":{"x":[0.00001,"m"],"y":[0.00001,"m"],"z":[0.00001,"m"]}}},"tab":"segments","segments":["10","100","1000","1002","1004","1005","1006","1007","1008","1009","1010","1011","1012","1013","1014","1015","1016","1017","1018","1019","1020","1021","1022","1023","1024","1025","1026","1100","104","105","106","107","108","11","110","111","112","113","114","115","117","118","119","12","120","122","123","124","125","126","129","13","130","131","134","138","14","141","142","143","146","147","149","15","150","152","154","156","159","16","160","162","164","165","166","167","168","170","172","173","174","176","177","178","179","18","180","181","182","183","186","189","19","190","192","193","194","195","196","199","2","20","201","202","203","204","206","207","208","21","212","215","216","217","219","22","220","221","223","224","225","228","229","23","230","231","232","234","235","236","237","238","239","24","241","242","243","245","246","247","248","25","250","251","253","254","256","257","259","26","260","265","266","267","268","27","271","272","273","275","276","279","28","280","282","283","284","287","29","291","293","294","295","296","297","298","3","30","300","303","304","305","306","31","311","312","313","315","319","32","320","321","322","323","324","325","326","329","33","330","331","332","333","335","336","337","338","34","340","341","342","343","344","347","348","349","35","350","351","352","354","355","356","357","359","36","361","362","365","366","367","368","369","37","371","372","373","374","375","376","377","378","38","380","385","386","387","389","39","390","391","392","393","394","395","397","399","4","40","401","402","405","407","409","41","412","413","414","415","416","417","419","42","422","423","424","426","427","428","43","430","432","435","438","439","44","440","441","442","443","444","445","446","449","45","450","451","452","453","454","456","458","459","46","460","461","462","463","464","465","466","467","47","470","473","474","475","476","478","479","48","480","481","484","485","486","487","488","49","490","491","493","494","497","498","499","5","50","500","501","503","504","505","507","508","51","510","511","512","513","514","516","517","518","519","52","520","528","529","53","533","535","536","537","538","539","54","540","541","542","544","545","546","548","549","55","550","553","554","555","556","557","559","56","561","562","563","565","568","57","570","571","572","573","574","575","576","578","579","58","581","582","584","586","59","591","593","594","595","597","599","6","60","601","602","604","606","61","611","612","613","614","615","616","617","618","619","62","620","621","622","623","624","625","627","628","629","63","631","632","635","637","638","639","64","641","642","643","644","645","646","647","648","65","650","652","653","656","657","658","660","661","662","665","666","667","67","671","672","673","674","677","678","679","68","680","681","682","683","684","686","687","688","690","693","695","696","697","698","699","7","701","702","704","706","707","708","709","710","711","712","713","716","717","72","720","721","722","724","725","727","729","731","733","734","735","736","737","74","740","744","746","748","749","750","752","754","755","757","758","759","76","760","762","763","764","765","767","768","769","770","771","772","773","774","775","776","778","779","78","780","783","784","785","787","789","790","791","793","796","797","798","799","8","80","803","804","808","809","81","810","812","816","818","819","82","821","823","824","826","827","829","83","830","831","832","834","835","837","839","84","840","841","842","843","844","846","849","850","851","855","856","857","858","86","861","863","864","865","867","868","869","87","870","871","872","874","875","876","877","878","879","88","880","881","883","885","888","889","89","892","893","894","895","896","898","899","9","90","901","902","906","908","909","91","911","913","915","916","917","919","92","920","921","925","926","927","928","929","93","931","934","935","936","937","938","940","941","942","944","945","946","951","953","954","955","956","957","959","96","963","964","965","966","969","97","970","971","972","973","977","978","980","981","982","983","989","99","991","992","993","995","996","997","998","999"],"segmentQuery":"<id","segmentColors":{"2":"#777b7b","3":"#777979","4":"#848989","5":"#8e9494","6":"#8c9191","7":"#778383","8":"#778181","9":"#93a2a2","10":"#5e6767","11":"#93c1c1","12":"#6b7474","13":"#93c0c0","14":"#8eacac","15":"#727979","16":"#91afaf","18":"#93b4b4","19":"#729c9c","20":"#212d2d","21":"#304242","22":"#2d3e3e","23":"#2b3232","24":"#1e2929","25":"#707676","26":"#7c8383","27":"#89bbbb","28":"#608383","29":"#7c9d9d","30":"#777d7d","31":"#7a8080","32":"#778080","33":"#7f8585","34":"#6d8a8a","35":"#829d9d","36":"#545d5d","37":"#93a4a4","38":"#4c5454","39":"#474f4f","40":"#8cbebe","41":"#7a9a9a","42":"#93b8b8","43":"#84a0a0","44":"#93a1a1","45":"#93baba","46":"#84b4b4","47":"#6d9595","48":"#82b0b0","49":"#6b9191","50":"#7fadad","51":"#87a3a3","52":"#636c6c","53":"#596363","54":"#334545","55":"#2b3b3b","56":"#666f6f","57":"#476161","58":"#939898","59":"#637e7e","60":"#7aa0a0","61":"#7fa5a5","62":"#444d4d","63":"#f2bb3a","64":"#77d1ff","65":"#3ddeff","67":"#2cc15e","68":"#ffd877","72":"#ffbfad","74":"#e5d60b","76":"#40c3dd","78":"#f7e1af","80":"#3bdddd","81":"#a0dfff","82":"#d67259","83":"#ffab93","84":"#f2c04b","86":"#91503f","87":"#3cabc1","88":"#3db4cc","89":"#f7d585","90":"#723f32","91":"#ffb49e","92":"#f4cf53","93":"#ffbf0f","96":"#f2dca7","97":"#e2d92f","99":"#f4d05a","100":"#399eb2","104":"#4dcc77","105":"#f7da96","106":"#d35dac","107":"#ffd15e","108":"#3cd1d1","110":"#55ccb8","111":"#3aa2b7","112":"#bc782f","113":"#8cccc1","114":"#f7d68a","115":"#82ccbf","117":"#6acc8a","118":"#b2af07","119":"#ffd044","120":"#75d1ff","122":"#ef8064","123":"#37dbfc","124":"#c6499d","125":"#66cbff","126":"#ffc32d","129":"#66ccbb","130":"#f7dea3","131":"#fc957b","134":"#ffb5a0","138":"#84493a","141":"#8accc1","142":"#e5d609","143":"#45d9f7","146":"#d8cb17","147":"#f2dca4","149":"#d1ca06","150":"#ce8333","152":"#67afa3","154":"#f2bd43","156":"#ffcf3f","159":"#f79279","160":"#f29d43","162":"#e5d604","164":"#b2af01","165":"#75e5e5","166":"#ffc83f","167":"#ffbdaa","168":"#74c4ed","170":"#ccc50c","172":"#ffa78e","173":"#42cae5","174":"#a2dcf9","176":"#af702b","177":"#965342","178":"#f4bc04","179":"#51cc7a","180":"#d68733","181":"#3ac4e0","182":"#ffc021","183":"#f7d483","186":"#f2dda9","189":"#3eb766","190":"#72ccbd","192":"#f4927a","193":"#f7dc9e","194":"#d1ca04","195":"#fc976c","196":"#fc67ca","199":"#52e5e5","201":"#ffd366","202":"#ffca2d","203":"#ed9436","204":"#ffe7a0","206":"#74ccbd","207":"#33cc66","208":"#36d9f9","212":"#71e2e2","215":"#edd39c","216":"#d38634","217":"#ed9b44","219":"#ccc345","220":"#60e5e5","221":"#c96b54","223":"#ccc62a","224":"#34d0ef","225":"#ffd454","228":"#ea9a44","229":"#f4cf55","230":"#3bcece","231":"#a85c4a","232":"#ffad96","234":"#ffd97a","235":"#ffda7f","236":"#ffc61c","237":"#c6c00d","238":"#f2b935","239":"#ffc107","241":"#ffdf89","242":"#64e5e5","243":"#edca80","245":"#ccc863","246":"#ea7d62","247":"#c9489e","248":"#3fdbdb","250":"#edd5a3","251":"#2bc45e","253":"#ffca44","254":"#f7d380","256":"#ffc832","257":"#f7e0aa","259":"#ffd351","260":"#6bb6db","265":"#d8cb15","266":"#37cc68","267":"#378c9e","268":"#38c9b1","271":"#6bbaad","272":"#39c2dd","273":"#ffc32b","275":"#37ccb3","276":"#3fc1db","279":"#eab94f","280":"#eab84b","282":"#d37158","283":"#38c4c4","284":"#ffdb82","287":"#f7d588","291":"#f9be48","293":"#f49369","294":"#d149a3","295":"#f4cc49","296":"#63a096","297":"#ffe69e","298":"#ff9b70","300":"#f7a27e","303":"#f7a042","304":"#ccc241","305":"#88ccc0","306":"#eaba52","311":"#34ceed","312":"#d8cc1e","313":"#91daff","315":"#f9c04d","319":"#ff996d","320":"#4be5e5","321":"#ffcdbf","322":"#ddd75a","323":"#ffd263","324":"#e0785e","325":"#70e0e0","326":"#ffcf42","329":"#a4defc","330":"#69b2a6","331":"#67a1bf","332":"#57cc7e","333":"#ffbf11","335":"#ea8e77","336":"#ffc73a","337":"#76c9f2","338":"#7f4638","340":"#c16953","341":"#46defc","342":"#f7e1ad","343":"#68aed1","344":"#ff9367","347":"#c4be0d","348":"#6ab7aa","349":"#ffb805","350":"#639bb7","351":"#38bcff","352":"#ed63bf","354":"#f2bc3e","355":"#ffd154","356":"#f2da9d","357":"#e5d606","359":"#9bddff","361":"#ffc311","362":"#ffbb11","365":"#ffa58e","366":"#ffbe1c","367":"#ffb807","368":"#34c8e5","369":"#c1bb0d","371":"#ffbe0c","372":"#a3e0ff","373":"#774234","374":"#3995a8","375":"#d849a9","376":"#3daf63","377":"#ffe8a3","378":"#41cc6f","380":"#ffc823","385":"#ccc751","386":"#5bcc81","387":"#ccc85f","389":"#41bfd8","390":"#36bca6","391":"#edce8b","392":"#54e5e5","393":"#3baa60","394":"#36a9e2","395":"#ef9637","397":"#ffc72d","399":"#68a89d","401":"#ffcc4c","402":"#fc50c3","405":"#3a9aad","407":"#d17057","409":"#77e5e5","412":"#7ee5e5","413":"#b2af05","414":"#67acce","415":"#f2bf48","416":"#c66c55","417":"#5fccb9","419":"#69bfb0","422":"#f265c3","423":"#ffb90a","424":"#41bf6b","426":"#e861bb","427":"#56c6ff","428":"#80ccbf","430":"#389e5a","432":"#ffda7c","435":"#53ccb7","438":"#57e5e5","439":"#f9c252","440":"#ffc416","441":"#ffd259","442":"#6cccbc","443":"#ffa991","444":"#74c4ef","445":"#eadf07","446":"#ffc023","449":"#f7e3b4","450":"#4fcc79","451":"#ffb6a0","452":"#f99c39","453":"#75caf4","454":"#a55b48","456":"#99dcff","458":"#ff976b","459":"#3fcc6e","460":"#ffbd19","461":"#ccc62c","462":"#35d4f4","463":"#76ccbd","464":"#ffd04f","465":"#ccc861","466":"#3aa35d","467":"#ba7b37","470":"#ffe08c","473":"#ff916d","474":"#37bfa8","475":"#efab0b","476":"#ffa187","478":"#66a59b","479":"#efa802","480":"#754033","481":"#ccc859","484":"#6accbb","485":"#3cad62","486":"#f79b38","487":"#b2af08","488":"#f4cb44","490":"#edcf90","491":"#ffcc35","493":"#ccc855","494":"#43cc70","497":"#ea9335","498":"#44e5e5","499":"#edcc84","500":"#ffa791","501":"#39a0b5","503":"#c9c30c","504":"#ffa389","505":"#ffc430","507":"#f9a47f","508":"#63ccba","510":"#f2dfae","511":"#ffd56b","512":"#a35a47","513":"#e89843","514":"#ffd7cc","516":"#5be5e5","517":"#6bc689","518":"#ffc20c","519":"#ccc85d","520":"#3db6ce","528":"#f2da9f","529":"#ffd051","533":"#35cc67","535":"#dd765d","536":"#39a05c","537":"#f2be46","538":"#3fbad3","539":"#77cef9","540":"#3dbeff","541":"#ed9078","542":"#c14799","544":"#9b5544","545":"#8c4d3d","546":"#ffc10a","548":"#f4be0c","549":"#f7e2b2","550":"#3fbfff","553":"#edd49e","554":"#bf6852","555":"#55cc7d","556":"#368a9b","557":"#bc6651","559":"#ffcd4f","561":"#35cae8","562":"#efa907","563":"#ccc347","565":"#3dd3d3","568":"#59ccb8","570":"#ffce54","571":"#39c0db","572":"#e2da31","573":"#f2bb3c","574":"#93dbff","575":"#824739","576":"#e89135","578":"#82e5e5","579":"#68ccff","581":"#ffd256","582":"#ffdf87","584":"#45dbf9","586":"#e08d35","591":"#ffbc05","593":"#ff906b","594":"#84d6ff","595":"#41c16c","597":"#f24fbc","599":"#ddd75f","601":"#ffe18e","602":"#7be5e5","604":"#36c1aa","606":"#ff8e68","611":"#368ea0","612":"#5bc8ff","613":"#79e5e5","614":"#3ba55f","615":"#a5e1ff","616":"#d64aa7","617":"#ffc61e","618":"#3de5e5","619":"#e24ab0","620":"#c6833b","621":"#edcb82","622":"#59c7ff","623":"#3db565","624":"#f9bb3e","625":"#2bbc5b","627":"#ffcb30","628":"#f9a143","629":"#ffc228","631":"#edcd89","632":"#d8cc1c","635":"#efac0e","637":"#7fd4ff","638":"#35d2f2","639":"#ffcd3a","641":"#ffd9ce","642":"#ffbf1e","643":"#eab84d","644":"#ffc9ba","645":"#41ccb4","646":"#f9ba3b","647":"#cec80c","648":"#f4bd09","650":"#3cb1c9","652":"#ffc528","653":"#ce4aa2","656":"#f4bd07","657":"#5dad78","658":"#ff8c66","660":"#ffbba8","661":"#79d0fc","662":"#ffd559","665":"#ffe69b","666":"#ffd456","667":"#ffca47","671":"#f9c14f","672":"#7a4335","673":"#ffbd0a","674":"#ffde84","677":"#f4ca3f","678":"#659fbc","679":"#3ba5ba","680":"#ffa787","681":"#e87c61","682":"#e8a310","683":"#ffc730","684":"#f9bd45","686":"#ba4693","687":"#ba762e","688":"#eade02","690":"#fc9d37","693":"#e8a412","695":"#eadf04","696":"#f4c93d","697":"#ed7f63","698":"#efaa09","699":"#ffcfc1","701":"#ccc349","702":"#ed4eb8","704":"#ffd35b","706":"#2cc960","707":"#d85fb0","708":"#f4c835","709":"#935141","710":"#3fccb4","711":"#ffce3d","712":"#c46a54","713":"#41c5e0","716":"#8cd8ff","717":"#f765c6","720":"#38bed8","721":"#b2af00","722":"#2bbf5d","724":"#b74792","725":"#f2ba37","727":"#37c6af","729":"#f4cd4b","731":"#3fdfff","733":"#67bcae","734":"#43cce8","735":"#49c2ff","736":"#3bcccc","737":"#f2d896","740":"#f4c93a","744":"#edd5a1","746":"#ffc3b2","748":"#4fbff7","749":"#f2d99b","750":"#3cadc4","752":"#84ccc0","754":"#c67e31","755":"#f4cc46","757":"#f29179","758":"#379b59","759":"#ffa382","760":"#f2deab","762":"#ffe8a5","763":"#ddd75d","764":"#bf792f","765":"#f4bc02","767":"#42c0ff","768":"#e58d77","769":"#ffc535","770":"#62e5e5","771":"#5dcc82","772":"#3ca7bc","773":"#f4d15d","774":"#ffc519","775":"#e84cb4","776":"#45cc72","778":"#6cb8dd","779":"#dd8c35","780":"#edd093","783":"#ffc532","784":"#ffb9a5","785":"#ffd65b","787":"#3dccb4","789":"#80e5e5","790":"#649dba","791":"#f49f44","793":"#67afd3","796":"#40e5e5","797":"#f7dda0","798":"#47ccb5","799":"#ccc857","803":"#45ccb5","804":"#ffbd07","808":"#b2458e","809":"#dd4bad","810":"#a8e2ff","812":"#ffa37c","816":"#40bc69","818":"#6eccbc","819":"#68b1d6","821":"#d88934","823":"#44d7f4","824":"#cc5ba6","826":"#4fc4ff","827":"#3ed6d6","829":"#eabb54","830":"#f9b939","831":"#ffc005","832":"#ffd775","834":"#d18534","835":"#ffd260","837":"#c47d31","839":"#39bfbf","840":"#ffcd51","841":"#ffdd82","842":"#bf4897","843":"#e5d602","844":"#49e5e5","846":"#f74fbf","849":"#e88d76","850":"#f4a07c","851":"#ffaf99","855":"#ffc928","856":"#63cbff","857":"#f4d058","858":"#c45aa1","861":"#30cc64","863":"#c95ca5","864":"#ffd059","865":"#47cc73","867":"#f9b834","868":"#edc97b","869":"#ffca2b","870":"#f4c838","871":"#ffc942","872":"#3cb263","874":"#ffb29b","875":"#ffbd16","876":"#f2d898","877":"#ccc62e","878":"#ffd468","879":"#ccc243","880":"#e25fb7","881":"#ffd1c4","883":"#f9937a","885":"#f29837","888":"#e2da34","889":"#379957","892":"#e2795f","893":"#5faf79","894":"#ffc721","895":"#ffc30f","896":"#65a398","898":"#efa904","899":"#4fccb7","901":"#2bc65f","902":"#ffc83d","906":"#5bccb9","908":"#eab748","909":"#ffb39e","911":"#8e4e3e","913":"#ff9f84","915":"#89d7ff","916":"#edd29a","917":"#6ccc8c","919":"#f2c04d","920":"#3dcc6c","921":"#44d1ed","925":"#ce6e56","926":"#d15eaa","927":"#e59744","928":"#fca580","929":"#39c6c6","931":"#6cc98b","934":"#41c8e2","935":"#6bcdff","936":"#ffd147","937":"#874a3b","938":"#5ec9ff","940":"#f49938","941":"#3fba68","942":"#e060b5","944":"#edc97d","945":"#7cccbe","946":"#5caa76","951":"#a05846","953":"#ffc1af","954":"#ffa57f","955":"#ffa58c","956":"#ffc62b","957":"#ffcf56","959":"#50c3fc","963":"#f7dfa8","964":"#db755c","965":"#82d5ff","966":"#ffd34f","969":"#3db0c6","970":"#38bcbc","971":"#54e2ff","972":"#44c0ff","973":"#f7db99","977":"#ffc5b5","978":"#ffba0c","980":"#ffbb0f","981":"#cc8233","982":"#ccc23f","983":"#ffcc32","989":"#ffc935","991":"#db8a34","992":"#ffa584","993":"#f9bd43","995":"#edcf8e","996":"#37baba","997":"#66aacc","998":"#43ccb5","999":"#3eb8d1","1000":"#db5eb1","1002":"#3de2e2","1004":"#37ade8","1005":"#36c4ac","1006":"#d8cc1a","1007":"#54c6ff","1008":"#aa5e4b","1009":"#ef8f77","1010":"#4fc1f9","1011":"#1c2626","1012":"#a5e1ff","1013":"#a5e1ff","1014":"#a5e1ff","1015":"#a5e1ff","1016":"#47cc74","1017":"#47cc75","1018":"#47cc76","1019":"#47cc77","1020":"#47cc78","1021":"#f99c40","1022":"#f99c41","1023":"#ff9368","1024":"#8b51ff","1025":"#8d54ff","1026":"#894fff","1100":"#3ce0e0"},"name":"seg2"}],"showDefaultAnnotations":false,"sliceAngleRotaX":"'+Jt[0]+'","sliceAngleRotaY":"'+Jt[1]+'","sliceAngleRotaZ":"'+Jt[2]+'","selectedLayer":{"visible":true,"layer":"seg2"},"crossSectionBackgroundColor":"#ffffff","projectionBackgroundColor":"#ffffff","layout":"hzkdPanel"}';window.open(Wn,"_blank")},300);else if(tr.current==1)We=parseInt(((Se+8)/13.9919970598834*700).toString()),window.open("http://"+Mo.current+"/STAM/reference/index.html?lang=en_us&3Dname="+tt+"&inp="+We+"§ion=coronal");else if(tr.current==2){let Ct=$r;$r<0&&(Ct=-$r),We=parseInt((Ct/5.17*256).toString()),$r==0&&(We=1),window.open("http://"+Mo.current+"/STAM/reference/index.html?lang=en_us&3Dname="+tt+"&inp="+We+"§ion=sagittal")}else tr.current==3&&(We=parseInt(((An+5.33)/7.37*367).toString()),window.open("http://"+Mo.current+"/STAM/reference/index.html?lang=en_us&3Dname="+tt+"&inp="+We+"§ion=horizontal"))},Jl=(ye,Ne,We,tt,Ct,Jt,$t,bn,un,cr,Wn)=>{let _r=new URL(window.location.href),kr=new URLSearchParams(_r.search).get("atlasReslicingInfo"),qr={};kr&&(qr=JSON.parse(kr)),qr.angleX=ye,qr.angleY=Ne,qr.angleZ=We,qr.positionZ=Jt,qr.positionX=tt,qr.positionY=Ct,qr.translateX=$t,qr.translateY=bn,qr.translateZ=un,qr.ButtonDisabled=Wn,qr.rotate=cr,qr.direction1=tr.current,qi.atlasReslicingInfo=qr,cn(ye),pn(Ne),zn(We),Ye(Jt),Ar(tt),Ht(Ct),Je($t),wt(bn),Bt(un),Zt(cr),Ln(Wn)},il=ye=>{Ce.current.remove(fs.current);const Ne=fs.current.position;let We=ye;if(ql(We),We==1){je.current.enabled=!1,Ce.current.remove(je.current),Vs(0),tr.current=1,Jl(90,0,0,-5.17,-5.33,Ne.z,!0,!0,!1,!0,!1);const tt=Ce.current.getObjectByName("HorizontalView"),Ct=Ce.current.getObjectByName("SagittalView"),Jt=Ce.current.getObjectByName("arbitrarySlice"),$t=Ce.current.getObjectByName("CoronalView");tt&&(tt.position.y=Ne.y,Ce.current.remove(tt),Hn(!1)),Ct&&(Ct.position.x=Ne.x,Ce.current.remove(Ct),Tn(!1)),Jt&&(Jt.position.set(Ne.x,Ne.y,Ne.z),Ce.current.remove(Jt),gn(!1)),$t?($t.position.z=Ne.z,Ce.current.remove($t),mn(!1)):mn(!0)}else if(We==2){Vs(0),je.current.enabled=!1,Ce.current.remove(je.current),Jl(90,270,0,Ne.x,-5.33,-8,!1,!0,!0,!0,!1),tr.current=2;const tt=Ce.current.getObjectByName("HorizontalView"),Ct=Ce.current.getObjectByName("SagittalView"),Jt=Ce.current.getObjectByName("arbitrarySlice"),$t=Ce.current.getObjectByName("CoronalView");Ct?(Ct.position.x=Ne.x,Ce.current.remove(Ct),Tn(!1)):Tn(!0),tt&&(tt.position.y=Ne.y,Ce.current.remove(tt),Hn(!1)),$t&&($t.position.z=Ne.z,Ce.current.remove($t),mn(!1)),Jt&&(Jt.position.set(Ne.x,Ne.y,Ne.z),Ce.current.remove(Jt),gn(!1))}else if(We==3){je.current.enabled=!1,Ce.current.remove(je.current),Jl(360,0,0,-5.17,Ne.y,-8,!0,!1,!0,!0,!1),tr.current=3,Vs(0);const tt=Ce.current.getObjectByName("HorizontalView"),Ct=Ce.current.getObjectByName("SagittalView"),Jt=Ce.current.getObjectByName("arbitrarySlice"),$t=Ce.current.getObjectByName("CoronalView");Ct&&(Ct.position.x=Ne.x,Ce.current.remove(Ct),Tn(!1)),$t&&($t.position.z=Ne.z,Ce.current.remove($t),mn(!1)),Jt&&(Jt.position.set(Ne.x,Ne.y,Ne.z),Ce.current.remove(Jt),gn(!1)),tt?(tt.position.y=Ne.y,Ce.current.remove(tt),Hn(!1)):Hn(!0)}else if(We==4){tr.current=4,Ce.current.remove(je.current),Jl(120,320,270,Ne.x,Ne.y,Ne.z,!1,!1,!1,!1,!1);const tt=Ce.current.getObjectByName("HorizontalView"),Ct=Ce.current.getObjectByName("SagittalView"),Jt=Ce.current.getObjectByName("arbitrarySlice"),$t=Ce.current.getObjectByName("CoronalView");Ct&&(Ct.position.x=Ne.x,Ce.current.remove(Ct),Tn(!1)),$t&&($t.position.z=Ne.z,Ce.current.remove($t),mn(!1)),tt&&(tt.position.y=Ne.y,Ce.current.remove(tt),Hn(!1)),Jt?(Jt.position.set(Ne.x,Ne.y,Ne.z),Ce.current.remove(Jt),gn(!1)):gn(!0)}},jc=ye=>{var Ne=LT(ye,Re);if(M.includes(ye)){T.current.removeFBX(ye,!0);const We=T.current.checkedKeys.current.findIndex($t=>$t===ye);We>-1&&T.current.checkedKeys.current.splice(We,1),q(T.current.checkedKeys.current);let tt=new URL(window.location.href),Ct=new URLSearchParams(tt.search);const Jt=JSON.stringify(T.current.checkedKeys.current);Ct.set("regionsChecked",Jt),tt.search=Ct.toString(),window.history.replaceState({},"",tt),T&&T.current.checkedKeys.current.length==0?T.current.setExpandedKeys(T.current.defexpandedKeys.current):Ne.forEach($t=>{T.current.setExpandedKeys(bn=>bn.filter(un=>un!==$t))})}else if(ye){let We=ye.replace("/","_");const tt=T.current.fetchColor(ye);let Ct=n+"/data/FBX/"+We+".FBX";qh(Ct,ye,tt,.8,0,"FBX"),T.current.checkedKeys.current.push(ye);const Jt=Array.from(new Set([...T.current.expandedKeys,...Ne]));T.current.setExpandedKeys(Jt),q(T.current.checkedKeys.current);let $t=new URL(window.location.href),bn=new URLSearchParams($t.search);const un=JSON.stringify(T.current.checkedKeys.current);bn.set("regionsChecked",un),$t.search=bn.toString(),window.history.replaceState({},"",$t)}Zn({})},Xc=ye=>{var We;if(M.includes(ye)){T.current.removeFBX(ye,!0);const tt=T.current.checkedKeys.current.findIndex(bn=>bn===ye);tt>-1&&T.current.checkedKeys.current.splice(tt,1),q(T.current.checkedKeys.current);let Ct=new URL(window.location.href),Jt=new URLSearchParams(Ct.search);const $t=JSON.stringify(T.current.checkedKeys.current);Jt.set("regionsChecked",$t),Ct.search=Jt.toString(),window.history.replaceState({},"",Ct)}else if(ye){const tt=T.current.fetchColor(ye.replace("_","/"));let Ct=n+"/data/FBX/"+ye.replace("/","_")+".FBX";qh(Ct,ye,tt,.8,0),T.current.checkedKeys.current.push(ye),q(T.current.checkedKeys.current);let Jt=new URL(window.location.href),$t=new URLSearchParams(Jt.search);const bn=JSON.stringify(T.current.checkedKeys.current);$t.set("regionsChecked",bn),Jt.search=$t.toString(),window.history.replaceState({},"",Jt)}const Ne=W.current.findIndex(tt=>tt===ye);Ne>-1?W.current.splice(Ne,1):W.current.push(ye),(We=f.domElement)==null||We.addEventListener("mousemove",re.current,!1)},Yu=ye=>{if(ye in pe.current.neurons_line.current){pe.current.removeSWCAll(ye),pe.current.setCheckItems(Ct=>Ct.filter(Jt=>Jt!==ye)),pe.current.setPathOpen(Ct=>Ct.filter(Jt=>Jt!==ye));let Ne=new URL(window.location.href),We=new URLSearchParams(Ne.search);const tt=JSON.stringify(pe.current.checkItems.filter(Ct=>Ct!==ye));if(We.set("neuronsChecked",tt),Ne.search=We.toString(),window.history.replaceState({},"",Ne),ye in se.current){for(let Ct in se.current[ye])Ce.current.remove(se.current[ye][Ct]);delete se.current[ye]}}},Zc=()=>{if(!Ei.current){zr(!0);return}const ye=document.createElement("a");ye.href=n+"/zip/9.8.label.zip",ye.download="9.8.label.zip",ye.click()},al=(ye,Ne)=>{for(let We of ye){if(We.name.toLowerCase()===Ne.toLowerCase())return{color:We.color,path:We.path,fullname:We.fullname};if(We.children){const tt=al(We.children,Ne);if(tt)return tt}}return null},Sc=(ye,Ne)=>{for(let We of ye){if(We.name.toLowerCase()===Ne.toLowerCase()&&!We.children)return{color:We.color,path:We.path};if(We.children){const tt=Sc(We.children,Ne);if(tt)return tt}}return null},Kc=(ye,Ne)=>{const We=[];for(const tt in ye)ye[tt].includes(Ne)&&We.push(tt);return We},Eu=(ye,Ne=[])=>{if(Array.isArray(ye))for(let We of ye)Eu(We,Ne);if(typeof ye=="object")if(ye.hasOwnProperty("children"))Eu(ye.children,Ne);else return ye.name&&Ne.push(ye.name),ye.name},Ec=(ye,Ne,We=[])=>{if(Array.isArray(ye))for(let tt of ye)Ec(tt,Ne,We);typeof ye=="object"&&(ye.hasOwnProperty("children")&&Ec(ye.children,Ne,We),ye.name===Ne&&(ye.hasOwnProperty("children")?Eu(ye.children,We):ye.name&&We.push(ye.name)))},Yc=ye=>{if(ye in Q.current.vesselObj.current){Q.current.setCheckItems(Ct=>Ct.filter(Jt=>Jt!==ye)),Q.current.removeVessel(ye);let Ne=new URL(window.location.href),We=new URLSearchParams(Ne.search);const tt=JSON.stringify(Q.current.checkItems.filter(Ct=>Ct!==ye));We.set("vesselsChecked",tt),Ne.search=We.toString(),window.history.replaceState({},"",Ne)}},Ql=ye=>()=>{mo(ye),we(ye)};function qc(ye,Ne){return[...new Set([...ye,...Ne])]}const qu=ye=>{const Ne=[],We=[];if(Q.current&&T.current){const tt=Q.current,Ct=T.current;Ec(tt.treeDatas,ye,Ne);const Jt=xs.current.indexOf(ye);if(Jt!==-1){xs.current.splice(Jt,1),Ne.forEach(Wn=>{We.push(Kc(fo,Wn))});const $t=We.reduce((Wn,_r)=>qc(Wn,_r),[]);let bn=M;$t.forEach(Wn=>{Sc(Ct.treeDatas,Wn)!=null&&(bn=bn.filter(qn=>qn!==Wn),Ct.removeFBX(Wn,!0))}),q(bn);let un=new URL(window.location.href),cr=new URLSearchParams(un.search);cr.set("regionsChecked",JSON.stringify(bn)),un.search=cr.toString(),window.history.replaceState({},"",un),xs.current.length===0&&Ct.setExpandedKeys(Ct.defexpandedKeys.current)}else{xs.current.push(ye),Ne.forEach(_r=>{We.push(Kc(fo,_r))});const $t=We.reduce((_r,qn)=>qc(_r,qn),[]),bn=Array.from(new Set([...Ct.expandedKeys,...$t]));Ct.setExpandedKeys(bn);let un=[...M];$t.forEach(_r=>{const qn=Sc(Ct.treeDatas,_r);if(qn!=null){const kr=`${n}/data/FBX/${_r}.FBX`;un.push(_r),Ct.LoadFBX(kr,_r,qn.color,.8,0)}}),q(un);let cr=new URL(window.location.href),Wn=new URLSearchParams(cr.search);Wn.set("regionsChecked",JSON.stringify(un)),cr.search=Wn.toString(),window.history.replaceState({},"",cr)}}},ec=(ye,Ne)=>{for(let We in ye)if(ye[We].name===Ne){if(ye[We]["2D"])return Ne;{const tt=Tc(Ne,Or);return ec(Or,tt)}}else if(ye[We].children){const tt=ec(ye[We].children,Ne);if(tt)return tt}return null},Cc=w.useMemo(()=>(Kn==3||Kn==4)&&!(G||le)?[Kn==3&&Pl!=1?{key:"3",label:w.createElement("a",{target:"_blank",style:{width:"150px",textAlign:"center"},onClick:ye=>{il(1),J(!0)}},a("5000.6025")||"切换到冠状面")}:null,Kn==3&&Pl!=2?{key:"4",label:w.createElement("a",{target:"_blank",style:{width:"150px",textAlign:"center"},onClick:ye=>{il(2),J(!0)}},a("5000.6026")||"切换到矢状面")}:null,Kn==3&&Pl!=3?{key:"5",label:w.createElement("a",{target:"_blank",style:{width:"150px",textAlign:"center"},onClick:ye=>{il(3),J(!0)}},a("5000.6027")||"切换到水平面")}:null,Kn==3&&Pl!=4?{key:"6",label:w.createElement("a",{target:"_blank",style:{width:"150px",textAlign:"center"},onClick:ye=>{il(4),J(!0)}},a("5000.6028")||"切换到任意面")}:null,ue.brains?{key:"1",label:w.createElement("a",{target:"_blank",type:"primary",onClick:()=>{Ku(ue.brains,Kn==4),J(!0)}},a("5000.6018")||"查看更高分辨率图像")}:null,ue.brains?{key:"2",label:w.createElement("a",{target:"_blank",onClick:()=>{jc(ue.brains),J(!0)}},T.current.checkedKeys.current.includes(ue.brains)?a("5000.6023",{name:ue.brains})||`隐藏${ue.brains}的三维形貌`:a("5000.6024",{name:ue.brains})||`显示${ue.brains}的三维形貌`)}:null]:G||le?[G?{key:"1",label:w.createElement("a",{target:"_blank",style:{width:"150px",textAlign:"center"},onClick:()=>{Xc(G),J(!0)}},T.current.checkedKeys.current.includes(G)?a("5000.5056")||"隐藏核团":a("5000.5057")||"显示核团")}:null,Kn!=7&&(at.length==0||at.includes("neurons"))&&le?{key:"3",label:w.createElement("a",{style:{width:"150px",color:"#000",textAlign:"center"},onClick:()=>{La(7),J(!0),setTimeout(()=>{mo(G),we(G)},50)}},a("5000.6015")||"查询位于或投射到该结构的神经元")}:null,le?{key:"6",label:w.createElement("a",{style:{width:"150px",color:"#000",textAlign:"center"},onClick:()=>{const ye=Ce.current.getObjectByName(le);if(ye){const Ne=new rs().setFromObject(ye),We=new me;Ne.getCenter(We),h.current.target.copy(We),J(!0)}}},a("7000.7019")||"设置为焦点")}:null,le&&Kn==5?{key:"5",label:w.createElement("a",{style:{width:"150px",color:"#000",textAlign:"center"},onClick:()=>{const ye=new rs,Ne=Ce.current.getObjectByName(le);if(Ne){ye.expandByObject(Ne.clone());let We=ye.min,tt=ye.max,Ct=new me;ye.getCenter(Ct);const Jt=tt.x-We.x,$t=tt.y-We.y,bn=tt.z-We.z;Et.current.scale.x=Jt,Et.current.scale.y=$t,Et.current.scale.z=bn,Et.current.position.set(Ct.x,Ct.y,Ct.z);const un=Et.current.geometry.clone();un.scale(Et.current.scale.x,Et.current.scale.y,Et.current.scale.z),un.translate(Ct.x,Ct.y,Ct.z);const cr=new iM(un);gr.current.geometry=cr,Ce.current.remove(Ge.current);const Wn=a("5000.0006")||"显示数据块";if(On===Wn){sr(a("5000.0007")||"隐藏数据块"),je.current=new S2(Ai.current,f==null?void 0:f.domElement),je.current.setMode("translate"),je.current.enabled=!0,je.current.visible=!0,je.current.name="transformControls",je.current.attach(Et.current),Ce.current.add(Et.current,je.current,gr.current),Vg(),document.addEventListener("keypress",Pd);const _r=new rs;_r.expandByObject(Et.current);const qn=R.current(_r.min.clone()),kr=R.current(_r.max.clone());let qr=new Wh(Do(650,620,`${qn.x.toFixed(2)},${qn.y.toFixed(2)},${qn.z.toFixed(2)}`,"#ccc")),Br=new eh(new bf({map:qr}));Br.name="startText";let ca=new Wh(Do(650,620,`${kr.x.toFixed(2)},${kr.y.toFixed(2)},${kr.z.toFixed(2)}`,"#ccc")),ti=new eh(new bf({map:ca}));ti.name="endText",Br.position.set(_r.min.x,_r.min.y+.2,_r.min.z),ti.position.set(_r.max.x,_r.max.y+.6,_r.max.z);const Ni=Ce.current.getObjectByName("startText"),$s=Ce.current.getObjectByName("endText");Ni&&$s&&Ce.current.remove(Ni,$s),Ce.current.add(Ge.current,Br,ti)}J(!0),Zn({})}}},a("5000.6022",{lableStr:le})||"设置 "+le+" 的包围盒为下载范围")}:null].filter(ye=>ye!==null):te?[{key:"1",label:w.createElement("a",{target:"_blank",style:{width:"150px",textAlign:"center"},onClick:ye=>{pe.current.showSwctext(te),J(!0)}},te in se.current?a("5000.5060")||"隐藏文字":a("5000.5061")||"显示文字")},{key:"2",label:w.createElement("a",{target:"_blank",style:{width:"150px",textAlign:"center"},onClick:ye=>{Yu(te),J(!0)}},a("5000.6004")||"隐藏该神经元")}]:ee?[{key:"1",label:w.createElement("a",{style:{width:"150px",color:"#000",textAlign:"center"},onClick:()=>{qu(ee),J(!0)}},xs.current.includes(ee)?a("5000.0209")||"Hide Label":a("5000.0208")||"Show Label")},{key:"2",label:w.createElement("a",{target:"_blank",style:{width:"150px",textAlign:"center"},onClick:ye=>{Yc(ee),J(!0)}},a("5000.6021")||"隐藏该分支")}]:ut.Lable?[{key:"1",label:w.createElement("a",{style:{width:"150px",color:"#000",textAlign:"center"},onClick:()=>{if(ut.name){const ye=Ce.current.getObjectByName(ut.name);if(ye){const Ne=new rs().setFromObject(ye),We=new me;Ne.getCenter(We),h.current.target.copy(We),J(!0)}}}},a("7000.7019")||"设置为焦点")},{key:"2",label:w.createElement("a",{style:{width:"150px",color:"#000",textAlign:"center"},onClick:()=>{ut.Lable&&Xc(ut.Lable),J(!0)}},T.current.checkedKeys.current.includes(ut.Lable)?a("5000.6023",{name:ut.Lable})||`隐藏${ut.Lable}的三维形貌`:a("5000.6024",{name:ut.Lable})||`显示${ut.Lable}的三维形貌`)}]:[],[G,ee,te,le,Kn,Ho,ue,ks,ut]),wc=ye=>{ye=ye.replace(/[\[\]]/g,"\\$&");var Ne=new RegExp("[?&]"+ye+"(=([^&#]*)|&|#|$)"),We=Ne.exec(window.location.href);return We?We[2]?decodeURIComponent(We[2].replace(/\+/g," ")):"":null},Tc=(ye,Ne)=>{let We="";for(let tt in Ne){const Ct=Ne[tt];if(Ct.children){if(Ct.children.some(Jt=>Jt.name===ye)){We=Ct.name;break}else if(Tc(ye,Ct.children)){We=Tc(ye,Ct.children);break}}}return We},Qo=(ye,Ne)=>{let We=new URL(window.location.href),tt=new URLSearchParams(We.search);tt.set(ye,Ne),We.search=tt.toString(),window.history.replaceState({},"",We),fetch("/brainsweb-service/record/list",{method:"post",body:JSON.stringify({href:We})}).then(Ct=>Ct.json()).then(Ct=>{})},Cu=ye=>{switch(parseInt(ye)){case 0:document.title="STAM-SimpleViewer",Qo("type","simple");break;case 1:document.title="STAM-NormalViewer",Qo("type","normal");break;case 2:document.title="STAM-Surgery",Qo("type","virtual");break;case 3:document.title="STAM-Reslicing",Qo("type","slicing");break;case 4:document.title="STAM-Registration",Qo("type","registration");break;case 5:document.title="STAM-Downloading",Qo("type","downloading");break;case 6:document.title="STAM-AtlasMapping",Qo("type","mapping");break;case 7:document.title="STAM-Connectivity",Qo("type","circuits");break;case 8:document.title="STAM-OtherAtlas",Qo("type","other");break;case 9:document.title="STAM-ViewSetting",Qo("type","setting");break}};w.useEffect(()=>{ue.brains&&ys(ec(Or,ue.brains))},[ue]),w.useEffect(()=>{le&&Ys(ec(Or,le)),v(Cc),Lo.current=p},[p,G,M,ee,le,te,Kn,Ie,ue,ks,ut]);const tc=async ye=>{Ks(ye.url||ye.preview),Wa(!0)},_c=(ye,Ne)=>{const We=new FormData;We.append("file",ye.file),fetch("/app-api/up-api/update",{method:"post",body:We}).then(tt=>tt.json()).then(tt=>{if(tt.code===200)if(hy.success("update success"),Ne===2){const Ct=Oo.findIndex(Jt=>Jt.key===Co[0]);if(Ct>-1){let Jt=JSON.parse(JSON.stringify(Po.current)),$t=Jt[Ct];$t.fileList2=[{url:"data:image/png;base64,"+tt.base64_url}],Bs(Jt),Po.current=Jt}}else{const Ct=Oo.findIndex(Jt=>Jt.key===Co[0]);if(Ct>-1){let Jt=JSON.parse(JSON.stringify(Po.current)),$t=Jt[Ct];$t.fileList=[{url:"data:image/png;base64,"+tt.base64_url}],$t.correspondingPlaneData={},$t.filename=tt.path,Bs(Jt);const bn=Ce.current.children.filter(un=>un.userData.name==="registrationPng");bn&&Ce.current.remove(...bn),Po.current=Jt}Oe.current=tt.path}else tt.message&&Os.error({content:tt.message})})},Es=async(ye,Ne)=>{const We=ye.type==="image/tiff"||ye.type==="image/tif",tt=ye.name.endsWith(".swc");let Ct,Jt;return await new Promise(bn=>{if(We){const un=new FileReader;un.readAsArrayBuffer(ye),un.onload=async cr=>{var Wn;if((Wn=cr.target)!=null&&Wn.result){const _r=cr.target.result;if(_r instanceof ArrayBuffer){const kr=await(await OAt(_r)).getImage(),qr=kr.getWidth(),Br=kr.getHeight();if(!Ne){const ca=Oo.findIndex(ti=>ti.key===Co[0]);if(ca>-1){let ti=JSON.parse(JSON.stringify(Oo)),Ni=ti[ca];Ni.firstRegistrationImg={width:qr,height:Br},Bs(ti),Po.current=ti}}if(Ne===2){const ca=Oo.findIndex(ti=>ti.key===Co[0]);if(ca>-1){const{firstRegistrationImg:ti}=Oo[ca];(ti.width!==qr||Br!==ti.height)&&(hy.error("The size of the second TIFF image needs to be consistent with the first one!"),bn(!1))}}bn(!0)}}}}else bn(!0)}).then(bn=>bn?(Kn==6?(Ct=We||tt,Jt="You can only upload tif or swc files!"):(Ct=We,Jt="You can only upload tif files!"),Ct||hy.error(Jt),Ct):!1)},wu=(ye,Ne)=>{const We=new FormData;We.append("file",ye.file),fetch("/app-api/d-api/upload",{method:"post",body:We}).then(tt=>tt.json()).then(tt=>{tt.code===200?(hy.success("update success"),Ne===2?Ri([{url:"data:image/png;base64,"+tt.base64_url}]):(li([{url:"data:image/png;base64,"+tt.base64_url}]),Xi({}),Oe.current=tt.path)):tt.message&&Os.error({content:a("5000.0003")||"上传失败,请联系管理员"})})},Ju=()=>{const ye=Ce.current.getObjectByName("Brain");if(ye)if(Gr(We=>!We),ai.file[1].indexOf(".js")>-1)fetch("/app-api/d-api/dowload/"+ai.file[1]).then(We=>We.json()).then(We=>{let tt=new Ga;const Ct=new Vu,Jt=ai.file[1];let $t={};const bn=[];Ce.current.traverse(qn=>{qn.userData.isAtlasMapping==="true"&&bn.push(qn)}),bn.forEach(qn=>{Ce.current.remove(qn)}),We.line.forEach((qn,kr)=>{var qr=We.position[qn.end],Br=We.position[qn.start],ca=new Dn(new ic(.01,32,32),new Fu({color:"#A7B5A1",transparent:!0}));ca.position.set(qr.x*.01,qr.y*.01,qr.z*.01);var ti=new Dn(new ic(.01,32,32),new Fu({color:"#00ffff",transparent:!0}));ti.position.set(Br.x*.01,Br.y*.01,Br.z*.01),ca.translateX(qo.current),ca.translateY(To.current),ca.translateZ(_o.current),ti.translateX(qo.current),ti.translateY(To.current),ti.translateZ(_o.current),ca.myMeshType="neuronSphere",ca.name=`${Jt}/${qn.end_name}`,ca.userData.color="#A7B5A1",ti.myMeshType="neuronSphere",ti.name=`${Jt}/${qn.start_name}`,ti.userData.color="#00ffff",Ct.add(ca),Ct.add(ti),qn.start_name&&($t.hasOwnProperty(qn.start_name)?$t[`${qn.start_name}`].push({name:Jt,point:[Br.x,Br.y,Br.z],color:"#00ffff"}):($t[`${qn.start_name}`]=[],$t[`${qn.start_name}`].push({name:Jt,point:[Br.x,Br.y,Br.z],color:kr===0?"#1771FF":"#00ffff"}))),qn.end_name&&($t.hasOwnProperty(qn.end_name)?$t[`${qn.end_name}`].push({name:Jt,point:[qr.x,qr.y,qr.z],color:"#A7B5A1"}):($t[`${qn.end_name}`]=[],$t[`${qn.end_name}`].push({name:Jt,point:[qr.x,qr.y,qr.z],color:"#A7B5A1"})))});let un=new Dn(new ic(.02,32,32),new Fu({color:"#1771FF",transparent:!0}));un.position.set(We.position[0].x*.01,We.position[0].y*.01,We.position[0].z*.01),un.translateX(qo.current),un.translateY(To.current),un.translateZ(_o.current),Ct.add(un),Ct.name=`swcPointGroup${Jt}`,Ct.userData.isAtlasMapping="true";const cr={};for(const qn in $t){const kr=$t[qn];for(const qr of kr)if(qr.name==Jt){if(qr.color==="#1771FF"){cr[qn]={point:qr.point,color:qr.color};break}if(qr.color==="#A7B5A1"){cr[qn]={point:qr.point,color:qr.color};break}cr[qn]={point:qr.point,color:qr.color}}}for(let qn in cr){const{point:kr,color:qr}=cr[qn];var Wn=new Wh(Do(400,300,qn.replace("_","/"),qr));let Br=new eh(new bf({map:Wn,transparent:!0,alphaTest:.5}));Br.scale.set(.5,.5,.5),Br.position.set(kr[0]*.01,kr[1]*.01,kr[2]*.01),Br.translateX(qo.current),Br.name="lineNameMesh",Br.userData.name=qn.replace("_","/"),Br.userData.wholeName=`${Jt}-${qn}`,Br.userData.isAtlasMapping="true",Br.userData.initColor=qr,Br.translateY(To.current),Br.translateZ(_o.current),Ce.current.add(Br)}Ce.current.add(Ct);for(let qn=0;qn<We.line.length;qn++){let kr=[];for(let Br=We.line[qn].start;Br<=We.line[qn].end;Br++){let ca=We.position[Br].x,ti=We.position[Br].y,Ni=We.position[Br].z;kr.push(new me(ca,ti,Ni))}let qr=new ba(new Wi().setFromPoints(kr),new yh({color:"green"}));tt.add(qr),Gr(!1)}tt.scale.set(Bo.current,Bo.current,Bo.current),tt.translateX(qo.current),tt.translateY(To.current),tt.translateZ(_o.current),tt.name="correspondingPlaneDataSwc";const _r=Ce.current.getObjectByName("correspondingPlaneDataSwc");_r&&Ce.current.remove(_r),Ce.current.add(tt)});else{var Ne=new ka;Ne.setFromAxisAngle(new me(1,0,0),Math.PI/2);const We=(ye==null?void 0:ye.children[0]).geometry.boundingBox.min,tt=(ye==null?void 0:ye.children[0]).geometry.boundingBox.max,Ct={bwidth:0,bheight:2.6,bdepth:0,ewidth:tt.x-We.x,eheight:tt.y-We.y,edepth:tt.z-We.z,owidth:tt.x-We.x,oheight:tt.y-We.y,odepth:tt.z-We.z};new me(.010276870727539578,-5.650856788169461,-.9944386664650411);let Jt=new me(-5.097530670166015,-4.308416134996751,-7.990437196406743),$t=new me(5.118084411621094,3.006702558657828,6.001559863476661);const bn=new rs;bn.expandByObject(ye.clone()),Jt=bn.min,$t=bn.max;const un=$t.x-Jt.x,cr=$t.y-Jt.y,Wn=$t.z-Jt.z;Et.current.scale.set(un,cr,Wn),Et.current.position.set(.010276870727539578,-1.6508567881694614,-.9944386664650411),de.current.length===0?fetch("/app-api/d-api/dowload/"+ai.file[1]).then(_r=>_r.arrayBuffer()).then(_r=>{const qn=new Uint8Array(_r);let kr=W7(qn),qr=ple(qn);de.current=kr,Uo(kr,Ct,qr)}):setTimeout(()=>{Uo(de.current,Ct,de.current.length)},200)}},Ic=ye=>{const Ne=Oo.findIndex(We=>We.key===Co[0]);if(Ne>-1){let We=JSON.parse(JSON.stringify(Oo)),tt=We[Ne];tt.registrationRadioShowType=ye.target.value,Bs(We),Po.current=We,Ce.current.getObjectByName(`png${Ne}`)&&Qu(ye.target.value)}},Js=ye=>{if(Gr(!0),dn(ye.target.value),qi.otherAtlases=ye.target.value,Ce.current){const Ne=Ce.current.getObjectByName("outline");Ne&&Ce.current.remove(Ne)}ye.target.value=="CCF"&&Nm({filepath:n+"/data/FBX/outline-CCF.FBX",index:"outline",color:"#327DFF",opacity:.3,offsetZ:0,R:.01,callback:function(){}},et),ye.target.value=="WHS"&&Nm({filepath:n+"/data/FBX/outline-WHS.FBX",index:"outline",color:"#327DFF",opacity:.3,offsetZ:0,R:.01,callback:function(){}},et),Gr(!1)},nc=ye=>{if(lt(ye.target.value),ye.target.value===2){F.current="automatic",L(!0),U.current=!0,j(2),g.current.length>=2&&(g.current.pop(),x.current.pop());const Ne=Ce.current.getObjectByName("dashedLine"),We=Ce.current.getObjectByName("sphereBig"),tt=Ce.current.getObjectByName("sphereMiddelClick"),Ct=Ce.current.getObjectByName("Line");Ne&&We&&Ce.current.remove(Ne,We),tt&&Ce.current.remove(tt),Ct&&Ce.current.remove(Ct),ol()}else F.current="manual",L(!1),U.current=!1,j(3),ol();d&&(d.current=!0),Sr.current&&(Sr.current.textContent=a("4000.0126")||"重置")},Tu=ye=>{if(ye>-1){let Ne=JSON.parse(JSON.stringify(Po.current)),We=Ne[ye];We.startButtonLoading=!0,We.correspondingPlaneData={},Bs(Ne),Po.current=Ne;const tt=new FormData;tt.append("file",We.filename),tt.append("typeName",We.radioValue.toString()),fetch("/app-api/up-api/calculate",{method:"post",body:tt}).then(Ct=>{if(Ct.ok)return Ct.json();throw Os.error({content:a("5000.7027")||"计算失败"}),new Error(Ct.statusText)}).then(Ct=>{const Jt=Ct;let $t=JSON.parse(JSON.stringify(Po.current));const bn=$t[ye];bn.correspondingPlaneData=Jt,bn.startButtonLoading=!1,Po.current=$t,Bs($t)})}},Ld=()=>{const ye=Oo.findIndex(Ne=>Ne.key===Co[0]);if(ye>-1){let Ne=Oo[ye];const We=document.createElement("a");We.href="/app-api/up-api/zip/"+Ne.correspondingPlaneData.url,We.download=Ne.correspondingPlaneData.url,We.click()}},Qu=ye=>{const Ne=Oo.findIndex(Wn=>Wn.key===Co[0]);if(Ne>-1){const Wn=Ce.current.getObjectByName(`png${Ne}`);Wn&&Ce.current.remove(Wn)}var We=Ce.current.getObjectByName("Brain");if(We&&Ne>-1){let Wn=Oo[Ne];const{correspondingPlaneData:_r,registrationRadioShowType:qn,fileList:kr,fileList2:qr}=Wn;var tt=new rs().setFromObject(We),Ct=tt.max.y-tt.min.y,Jt=tt.max.x-tt.min.x;Ct=Ct/Math.cos(_r.angles[0]*Math.PI/180),Jt=Jt/Math.cos(_r.angles[1]*Math.PI/180);var $t=new OI(Jt,Ct,1,1),bn=new Fu({side:Sf,transparent:!0,alphaTest:.1}),un=new Dn($t,bn);un.name=`png${Ne}`;let Br=qn;ye&&(Br=ye),un.userData.imgType=Br,un.userData.name="registrationPng",Ce.current.add(un);var cr=new hb;un.position.set(tt.min.x+(tt.max.x-tt.min.x)/2,tt.min.y+(tt.max.y-tt.min.y)/2,(tt.max.z-tt.min.z)*_r.tx+tt.min.z),cr.load(Br==="3"?qr[0].url:Br==="1"?_r.base64_url:kr[0].url,function(ca){bn.map=ca,bn.needsUpdate=!0}),un.rotateOnAxis(new me(0,0,1),Math.PI),un.rotateOnAxis(new me(1,0,0),Math.PI/180*-_r.angles[0]),un.rotateOnAxis(new me(0,1,0),Math.PI/180*_r.angles[2]),un.rotateOnAxis(new me(0,0,1),Math.PI/180*_r.angles[1]),ye!="1"&&(Rs.current?un.scale.x=1:un.scale.x=-1)}},No=()=>{const ye=new ns(1,1,1),Ne=new Fu({color:16777215,opacity:.1,transparent:!0,depthWrite:!1}),We=new Dn(ye,Ne);Ce.current.remove(Et.current,gr.current,Ge.current),Et.current=We.clone(),Ge.current=new Dn;const tt=new iM(ye),Ct=new yh({color:16536881}),Jt=new EF(tt,Ct);gr.current=Jt},ed=()=>{const ye=a("5000.0006")||"显示数据块";if(On===ye){sr(a("5000.0007")||"隐藏数据块"),je.current=new S2(Ai.current,f==null?void 0:f.domElement),je.current.setMode("translate"),je.current.enabled=!0,je.current.visible=!0,je.current.name="transformControls",je.current.attach(Et.current),Ce.current.add(Et.current,je.current,gr.current),Vg(),document.addEventListener("keypress",Pd);const Ne=new rs;Ne.expandByObject(Et.current);const We=R.current(Ne.min.clone()),tt=R.current(Ne.max.clone());let Ct=new Wh(Do(650,620,`${We.x.toFixed(2)},${We.y.toFixed(2)},${We.z.toFixed(2)}`,"#ccc")),Jt=new eh(new bf({map:Ct}));Jt.name="startText";let $t=new Wh(Do(650,620,`${tt.x.toFixed(2)},${tt.y.toFixed(2)},${tt.z.toFixed(2)}`,"#ccc")),bn=new eh(new bf({map:$t}));bn.name="endText",Jt.position.set(Ne.min.x,Ne.min.y+.2,Ne.min.z),bn.position.set(Ne.max.x,Ne.max.y+.6,Ne.max.z);const un=Ce.current.getObjectByName("startText"),cr=Ce.current.getObjectByName("endText");un&&cr&&Ce.current.remove(un,cr),Ce.current.add(Ge.current,Jt,bn)}else{document.removeEventListener("keypress",Pd),sr(a("5000.0006")||"显示数据块"),je.current.enabled=!1,je.current.visible=!1,je.current.detach();const Ne=Ce.current.getObjectByName("startText"),We=Ce.current.getObjectByName("endText");Ne&&We&&Ce.current.remove(Ne,We),Ce.current.remove(je.current),Ce.current.remove(Et.current,gr.current,Ge.current)}},Do=(ye,Ne,We,tt)=>{var Ct=document.createElement("canvas");Ct.width=ye,Ct.height=Ne,Ct.style.border="1px solid #000";let Jt=Ct.getContext("2d");return Jt.font="80px Arial",Jt.fillStyle=tt,Jt.fillText(We,40,80),Ct},Uo=(ye,Ne,We)=>{const tt=ye[0].width/Ne.owidth,Ct=ye[0].height/Ne.oheight,Jt=We/Ne.odepth,$t=Math.ceil(Ne.bwidth*tt),bn=Math.ceil(Ne.bheight*Ct),un=Math.ceil(Ne.bdepth*Jt),cr=Math.floor(Ne.ewidth*tt),Wn=Math.floor(Ne.eheight*Ct),_r=Math.floor(Ne.edepth*Jt);let qn=[];for(let Ni=0;Ni<ye.length;Ni++)if(Ni>=un&&Ni<_r)for(let $s=0;$s<ye[Ni].data.length;$s++){let zs=$s%ye[Ni].width,sl=$s/ye[Ni].width;$t<=zs&&zs<cr&&sl>=bn&&sl<Wn&&qn.push(ye[Ni].data[$s])}const kr=new Uint8Array(qn),qr=cr-$t,Br=Wn-bn,ca=new Mme(kr,qr,Br,_r-un);ca.format=yme,ca.minFilter=ku,ca.magFilter=ku,ca.unpackAlignment=1,ca.needsUpdate=!0,_n.current=ca,S.current=new vL({glslVersion:m2,uniforms:{map:{value:_n.current},cameraPos:{value:Ai.current.position},volume_dims:{value:new me(qr,Br,We)},canvas_dims:{value:new Bn(f.domElement.width,f.domElement.height)},isClicked:{value:0},steps:{value:We},brightness:{value:256},darkness:{value:0}},side:yd,vertexShader:NAt,fragmentShader:DAt}),Ce.current.remove(Ge.current);const ti=new ns(1,1,1);Ge.current=new Dn(ti,S.current),Ge.current.applyMatrix4(Et.current.matrixWorld),Ge.current.scale.set(Et.current.scale.x,Et.current.scale.y,Et.current.scale.z),Ge.current.position.set(Et.current.position.x,Et.current.position.y,Et.current.position.z),Ce.current.add(Ge.current),Gr(Ni=>!Ni)},ol=()=>{const ye=[];Ce.current.traverse(Ne=>{Ne.name==="lineName"&&ye.push(Ne)}),ye.forEach(Ne=>{Ce.current.remove(Ne)})},Od=()=>{const ye=new rs;ye.expandByObject(Et.current);const Ne=Ce.current.getObjectByName("Brain");if(Ne){Gr(un=>!un);var We=new ka;We.setFromAxisAngle(new me(1,0,0),Math.PI/2);const tt=(Ne==null?void 0:Ne.children[0]).geometry.boundingBox.min,Ct=(Ne==null?void 0:Ne.children[0]).geometry.boundingBox.max,Jt=ye.min.clone().applyMatrix4(Ne.matrixWorld.clone().invert()).applyQuaternion(We),$t=ye.max.clone().applyMatrix4(Ne.matrixWorld.clone().invert()).applyQuaternion(We),bn={bwidth:Jt.x-tt.x,bheight:Jt.y-tt.y,bdepth:Jt.z-tt.z,ewidth:$t.x-tt.x,eheight:$t.y-tt.y,edepth:$t.z-tt.z,owidth:Ct.x-tt.x,oheight:Ct.y-tt.y,odepth:Ct.z-tt.z};de.current.length===0?fetch(n+"/data/TIFF/183153.tif").then(un=>un.arrayBuffer()).then(un=>{const cr=new Uint8Array(un);let Wn=W7(cr),_r=ple(cr);de.current=Wn,Uo(Wn,bn,_r)}):setTimeout(()=>{Uo(de.current,bn,de.current.length)},200)}};w.useEffect(()=>{ya?Ol.current&&Ol.current.focus():Hc.current&&Hc.current.focus()},[ya]);const rc=ye=>ye.map(Ne=>({value:Ne.name+" "+Ne.fullname,title:w.createElement(_a,{placement:"right",title:Ne.fullname},w.createElement("div",{style:{whiteSpace:"nowrap",display:"flex",alignItems:"center",lineHeight:"2.4"}},Ne.name," ",Ne.fullname)),children:Ne.children?rc(Ne.children):void 0})),yv=w.useMemo(()=>{const ye=new rs;ye.expandByObject(Et.current);const Ne=Ce.current.getObjectByName("Brain");if(Ne){var We=new ka;We.setFromAxisAngle(new me(1,0,0),Math.PI/2);const tt=(Ne==null?void 0:Ne.children[0]).geometry.boundingBox.min,Ct=ye.min.clone().applyMatrix4(Ne.matrixWorld.clone().invert()).applyQuaternion(We),Jt=ye.max.clone().applyMatrix4(Ne.matrixWorld.clone().invert()).applyQuaternion(We),$t={bwidth:Ct.x-tt.x,bheight:Ct.y-tt.y,bdepth:Ct.z-tt.z,ewidth:Jt.x-tt.x,eheight:Jt.y-tt.y,edepth:Jt.z-tt.z};Mt.current=$t;const bn=($t.ewidth-$t.bwidth)*11.15*($t.eheight-$t.bheight)*12.31*($t.edepth-$t.bdepth)*10;let un=0;switch(Rn){case 1:un=bn*.8;break;case 2:un=bn*.8/8;break;case 3:un=bn*.8/8/8;break;case 4:un=bn*.8/8/8/8;break;case 5:un=bn*.8/8/8/8/8;break;case 6:un=bn*.8/8/8/8/8/8;break}return On===(a("5000.0006")||"显示数据块")?"0KB":un>1024*1024*1024*1024?(un/(1024*1024*1024*1024)).toFixed(2)+"TB":un>1024*1024*1024?(un/(1024*1024*1024)).toFixed(2)+"GB":un>1024*1024&&un<1024*1024*1024?(un/(1024*1024)).toFixed(2)+"MB":un>1024&&un<1024*1024?(un/1024).toFixed(2)+"KB":un&&un<1024?un.toFixed(2)+"B":"0KB"}else return"0KB"},[Gn,On]),bv=()=>{if(!Ei.current){zr(!0);return}const ye=new rs;ye.expandByObject(Et.current);const Ne=Ce.current.getObjectByName("Brain");if(Ne){var We=new ka;We.setFromAxisAngle(new me(1,0,0),Math.PI/2);const tt=(Ne==null?void 0:Ne.children[0]).geometry.boundingBox.min,Ct=(Ne==null?void 0:Ne.children[0]).geometry.boundingBox.max,Jt=ye.min.clone().applyMatrix4(Ne.matrixWorld.clone().invert()).applyQuaternion(We),$t=ye.max.clone().applyMatrix4(Ne.matrixWorld.clone().invert()).applyQuaternion(We),bn={bwidth:Jt.x-tt.x,bheight:Jt.y-tt.y,bdepth:Jt.z-tt.z,ewidth:$t.x-tt.x,eheight:$t.y-tt.y,edepth:$t.z-tt.z,owidth:Ct.x-tt.x,oheight:Ct.y-tt.y,odepth:Ct.z-tt.z,zoom:!1,level:Rn};Mt.current=bn;const un=(bn.ewidth-bn.bwidth)*11.15*(bn.eheight-bn.bheight)*12.31*(bn.edepth-bn.bdepth)*10;switch(Rn){case 1:if(un*.8>1024*1024*1024){vn(!0);return}break;case 2:if(un*.8/8>1024*1024*1024){vn(!0);return}break;case 3:if(un*.8/8/8>1024*1024*1024){vn(!0);return}break;case 4:if(un*.8/8/8/8>1024*1024*1024){vn(!0);return}break;case 5:if(un*.8/8/8/8/8>1024*1024*1024){vn(!0);return}break;case 6:if(un*.8/8/8/8/8/8>1024*1024*1024){vn(!0);return}break}xi(!0),fetch("/app-api/test-api/CutBlockTask",{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(bn)}).then(cr=>cr.json()).then(cr=>{gl(cr)})}},gl=ye=>{fetch("/app-api/test-api/CutBlockTask",{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:ye})}).then(Ne=>{const We=Ne.headers.get("content-type");return We?We.includes("application/json")?Ne.json():We.includes("application/octet-stream")?Ne.arrayBuffer():(We.includes("text/html")||We.includes("text/plain")||We.includes("application/xml")||We.includes("text/xml"),Ne.text()):Ne.text()}).then(Ne=>{if(typeof Ne=="string")setTimeout(()=>{gl(ye)},2e3);else{const We=document.createElement("a"),tt=new Blob([Ne]),Ct=window.URL.createObjectURL(tt);We.style.display="none",We.href=Ct,We.download="temp.tiff",We.click(),window.URL.revokeObjectURL(Ct),xi(!1)}}).catch(Ne=>{xi(!1),Os.error({title:a("5000.7026")||"请求超时,下载失败"})})},Pd=w.useCallback(ye=>{ye.preventDefault(),ye.stopPropagation(),(ye.key==="a"||ye.key==="A")&&(je.current.getMode()==="translate"?je.current.setMode("scale"):je.current.setMode("translate"))},[]),Vg=()=>{let Ne=Ce.current.getObjectByName("Brain"),We=new me(-5.097530670166015,-5.308416134996751,-7.990437196406743),tt=new me(5.118084411621094,2.006702558657828,6.001559863476661);if(Ne){const bn=new rs;bn.expandByObject(Ne.clone()),We=bn.min,tt=bn.max}const Ct=tt.x-We.x,Jt=tt.y-We.y,$t=tt.z-We.z;je.current.addEventListener("change",()=>{const bn=Et.current.scale,un=Et.current.position;bn.x<1&&Et.current.scale.setX(1),bn.x>Ct&&Et.current.scale.setX(Ct),bn.y<1&&Et.current.scale.setY(1),bn.y>Jt&&Et.current.scale.setY(Jt),bn.z<1&&Et.current.scale.setZ(1),bn.z>$t&&Et.current.scale.setZ($t),un.x<We.x+Et.current.scale.x/2&&Et.current.position.setX(We.x+Et.current.scale.x/2),un.x>tt.x-Et.current.scale.x/2&&Et.current.position.setX(tt.x-Et.current.scale.x/2),un.y<We.y+Et.current.scale.y/2&&Et.current.position.setY(We.y+Et.current.scale.y/2),un.y>tt.y-Et.current.scale.y/2&&Et.current.position.setY(tt.y-Et.current.scale.y/2),un.z<We.z+Et.current.scale.z/2&&Et.current.position.setZ(We.z+Et.current.scale.z/2),un.z>tt.z-Et.current.scale.z/2&&Et.current.position.setZ(tt.z-Et.current.scale.z/2);const cr=Et.current.geometry.clone();cr.scale(Et.current.scale.x,Et.current.scale.y,Et.current.scale.z),cr.translate(Et.current.position.x,Et.current.position.y,Et.current.position.z);const Wn=new iM(cr);gr.current.geometry=Wn,Zn({})}),je.current.addEventListener("dragging-changed",function(bn){bn.value?(h.current.enableRotate=!1,h.current.enabled=!1,Ra.current={target:h.current.target.clone(),position:h.current.object.position.clone(),up:h.current.object.up.clone(),enabled:h.current.enabled}):(h.current.enableRotate=!0,h.current.enabled=!0,h.current.reset(),h.current.target.copy(Ra.current.target),h.current.object.position.copy(Ra.current.position),h.current.object.up.copy(Ra.current.up),h.current.update());const un=Et.current.geometry.clone();un.scale(Et.current.scale.x,Et.current.scale.y,Et.current.scale.z),un.translate(Et.current.position.x,Et.current.position.y,Et.current.position.z);const cr=new iM(un);gr.current.geometry=cr;const Wn=new rs;Wn.expandByObject(Et.current);const _r=R.current(Wn.min.clone()),qn=R.current(Wn.max.clone());let kr=new Wh(Do(650,620,`${_r.x.toFixed(2)},${_r.y.toFixed(2)},${_r.z.toFixed(2)}`,"#ccc")),qr=new eh(new bf({map:kr}));qr.name="startText";let Br=new Wh(Do(650,620,`${qn.x.toFixed(2)},${qn.y.toFixed(2)},${qn.z.toFixed(2)}`,"#ccc")),ca=new eh(new bf({map:Br}));ca.name="endText",qr.position.set(Wn.min.x,Wn.min.y+.2,Wn.min.z),ca.position.set(Wn.max.x,Wn.max.y+.6,Wn.max.z);const ti=Ce.current.getObjectByName("startText"),Ni=Ce.current.getObjectByName("endText");ti&&Ni&&Ce.current.remove(ti,Ni),Ce.current.add(Ge.current,qr,ca)})},It=()=>{document.removeEventListener("keypress",Pd),sr(a("5000.0006")||"显示数据块"),je.current.enabled=!1,je.current.visible=!1,je.current.detach(),Ce.current.remove(je.current),Ce.current.remove(Et.current,gr.current,Ge.current);const ye=Ce.current.getObjectByName("dashedLine");ye&&Ce.current.remove(ye);const Ne=Ce.current.getObjectByName("startText"),We=Ce.current.getObjectByName("endText");Ne&&We&&Ce.current.remove(Ne,We)},Dl=ye=>{hi(ye.target.value)},ml=w.useCallback(ye=>{jr.current=!0,Ur.current=[ye.x,ye.y],ar.current=[ye.x,ye.y]},[]),Bg=w.useCallback(ye=>{if(jr.current){const Ne=[ye.x,ye.y],We=.005,tt=Ne[0]-Ur.current[0];Ne[1]-Ur.current[1];const Ct=tt*We,Jt=new me;Jt.copy(Ai.current.position).sub(h.current.target);const $t=new JQe().setFromVector3(Jt);$t.theta+=Ct,$t.makeSafe(),Jt.setFromSpherical($t),Ai.current.position.copy(h.current.target).add(Jt),Ai.current.lookAt(h.current.target),Ur.current=[ye.x,ye.y]}},[]),$g=w.useCallback(ye=>{jr.current=!1;const Ne=[ye.x,ye.y],We=Math.abs(Ne[0]-ar.current[0]),tt=Math.abs(Ne[1]-ar.current[1]);We<2&&tt<2?f.domElement.addEventListener("click",K.current):f.domElement.removeEventListener("click",K.current)},[]),mr=()=>{if(!localStorage.getItem("imgKey")){an(!0);return}qe(!0),Xa(!1),Xi({});let ye={taskType:Pr,moving_name:Oe.current,key:localStorage.getItem("imgKey")};fetch("/app-api/d-api/count",{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(ye)}).then(Ne=>Ne.ok?Ne.json():(qe(!1),Ne.json().then(We=>{throw Os.error({content:We.message,onOk(){an(!0)}}),new Error(We.message||Ne.statusText)}))).then(Ne=>{Ne.code===200&&Xi(Ne),qe(!1)})},sn=()=>{const ye=document.createElement("a");ye.href="/app-api/d-api/dowload/"+ai.file[0],ye.download=ai.file[0],ye.click()},Nr=ye=>{D&&D(ye),qi.datumMarkVisibility=ye},U0=ye=>{_d(ye),qi.coordinateVisibility=ye,ye?k&&k.current.forEach(Ne=>{Ne.visible=!0}):k&&k.current.forEach(Ne=>{Ne.visible=!1})},zg=()=>{Jo(!1)},k0=()=>{Jo(!1)},Wb=ye=>{if(Ro(ye),qi.leftHemisphereVisibility=ye,ye){for(let Ne in ts.current)ts.current[Ne]&&M.includes(Ne)&&Ce.current.add(ts.current[Ne]);hg.current=!0}else{for(let Ne in ts.current)ts.current[Ne]&&Ce.current.remove(ts.current[Ne]);hg.current=!1}},xv=ye=>{if(qi.cranialVisibility=ye,Gc({}),ye)Nm({filepath:n+"/data/FBX/ExtractedSurface.FBX",index:"ExtractedSurface",color:"#327DFF",opacity:.3,offsetZ:0,R:.01,callback:function(){}},et);else if(Ce.current){const Ne=Ce.current.getObjectByName("ExtractedSurface");Ne&&Ce.current.remove(Ne)}},mp=()=>{if(Nn(!0),Gr(!0),N){const ye={flag:hg.current,point:[N.current.x,N.current.y,N.current.z],fbx:W.current};fetch("/app-api/c-api/compute",{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(ye)}).then(Ne=>{if(Ne.ok)return Ne.json();throw Nn(!1),Gr(!1),Os.error({content:a("5000.7027")||"计算失败"}),new Error(Ne.statusText)}).then(Ne=>{Nn(!1),Gr(!1),Ne.code===200&&O?O(new me(Ne.point[0],Ne.point[1],Ne.point[2])):Os.error({content:a("5000.7027")||"计算失败"})})}},Sv=ye=>{ye!=null&&(mo(ye),(ye===""||ye.includes(" "))&&we(ye))},kN=(ye,Ne)=>{let We=0;for(const tt of ye.toLowerCase())if(tt===Ne[We]&&(We++,We===Ne.length))return!0;return!1},Zi=ye=>{if(ye){const Ne=ye.toLowerCase(),We=pe.current.defAllexpandedKeys.current.map(tt=>{const Ct=tt.name&&tt.name.toLowerCase()===Ne,Jt=tt.fullname&&kN(tt.fullname,Ne);return{...tt,matchPriority:Ct?1:Jt?2:3}}).filter(tt=>tt.matchPriority<3).sort((tt,Ct)=>tt.matchPriority-Ct.matchPriority).map(tt=>({value:`${tt.name} ${tt.fullname}`,label:`${tt.name} ${tt.fullname}`}));Dt(We)}else Dt([])},Hg=ye=>{const Ne=new URLSearchParams;for(const We in ye)Ne.append(We,ye[We]);Kn==3?Ne.append("aplType","2"):Ne.append("aplType","1"),fetch("/brainsweb-service/apldetail/add",{method:"post",body:Ne}).then(We=>{if(We.ok)return We.json();throw Os.error({content:a("5000.5047")||"提交失败"}),new Error(We.statusText)}).then(We=>{hy.error(a("5000.5048")||"提交成功"),an(!1),wr(0)})},F0=ye=>{console.log("Failed:",ye)},Go=async ye=>{let Ne="";ye==="DAPI"?Ne="http://eai.brainsmatics.org/datasharing/TIFF/image_356_t.tif":ye==="PI"&&(Ne="http://eai.brainsmatics.org/datasharing/TIFF/image_570_t.tif");try{const We=Ne.split("/").pop()||"",Ct=await(await fetch(Ne)).blob(),Jt=new File([Ct],We,{type:"image/tiff"}),$t=Oo.findIndex(_r=>_r.key===Co[0]);let un=await new Promise(_r=>{const qn=new FileReader;qn.readAsArrayBuffer(Ct),qn.onload=function(kr){var qr,Br;if((qr=kr.target)!=null&&qr.result){const ca=new Uint8Array((Br=kr.target)==null?void 0:Br.result);let ti=W7(ca);const{width:Ni,height:$s}=ti[0];_r({width:Ni,height:$s})}},qn.onerror=function(kr){console.error("failed")}});const{width:cr,height:Wn}=un;if($t>-1){let _r=JSON.parse(JSON.stringify(Oo)),qn=_r[$t];qn.fileList=[Jt],qn.firstRegistrationImg={width:cr,height:Wn},Bs(_r),Po.current=_r}_c({file:Jt})}catch(We){console.error("Error fetching file:",We)}},so=async ye=>{let Ne="",We="";ye==="3D"?(Ne="http://eai.brainsmatics.org/datasharing/TIFF/test.tif",We="image/tiff"):ye==="swc"&&(Ne="http://eai.brainsmatics.org/datasharing/TIFF/fixed.swc",We="file/swc");try{const Ct=await(await fetch(Ne)).blob();let Jt=Ne.split("/").pop();if(Jt){const $t=new File([Ct],Jt,{type:We});li([$t]),wu({file:$t})}}catch(tt){console.error("Error fetching file:",tt)}};return w.createElement(w.Fragment,null,w.createElement(j9,{onClick:()=>{const ye=document.querySelector(".tabsCompnent .ant-tabs-content-holder");ye&&Lr?(ye.style.padding="0px",ye.style.borderLeft="none"):(ye.style.padding="10px",ye.style.borderLeft="1px solid rgb(225, 218, 218)"),Un(Ne=>!Ne)},style:{position:"absolute",right:`${Lr?"452px":"126px"}`,top:"50%",transform:`rotate(${Lr?180:0}deg) translate(-50%,0)`,fontSize:28,transition:"all 0.1s",zIndex:1e3}}),w.createElement(F2,{className:"tabsCompnent",onChange:La,activeKey:Kn.toString(),style:{position:"absolute",right:0,bottom:0,width:`${Lr?"438px":"150px"}`,height:at.length!=7?"100%":"calc(100% - 42px)",userSelect:"none",borderTop:"1px solid rgb(225, 218, 218)"},tabPosition:"right",tabBarStyle:{width:150,background:"#fff",borderLeft:"1px solid #e1dada"}},at.includes("label")&&w.createElement(Gv,{tab:a("4000.0202")||"组装",key:"1",disabled:Z===2},Lr?w.createElement(w.Fragment,null,w.createElement("div",{style:{width:"200px",height:"100px"}},w.createElement(bo,{ref:ci},w.createElement(to,{style:{height:"36px",lineHeight:"36px"},span:10},a("4000.0205")||"长度",":"),w.createElement(to,{span:12},w.createElement(Up,{min:1,max:10,onChange:Md}))))):null),at.includes("virtual")&&w.createElement(Gv,{tab:a("4000.0203")||"病毒标记",key:"2",disabled:Z===1||Z===0},Lr?w.createElement("div",{style:{backgroundColor:"rgba(255,255,255,0.6)",borderRadius:"5px",marginTop:"5px"}},w.createElement("div",null,w.createElement(za,{ref:Sr,disabled:!(M.length>0),className:"ant-btn ant-btn-primary",onClick:qs},a("4000.0208")||"选择靶点"),w.createElement(ra,{style:{margin:"5px 0",borderColor:"rgba(5, 5, 5, .3)",minWidth:200,width:250},dashed:!0}),w.createElement(Ta.Group,{style:{display:`${V?"block":"none"}`},onChange:nc,value:Ot,ref:Ca},w.createElement(Ta,{value:1},a("5000.5035")||"手动"),w.createElement(Ta,{value:2},a("5000.5034")||"自动")),V?w.createElement(ra,{style:{margin:"5px 0",borderColor:"rgba(5, 5, 5, .3)",minWidth:200,width:250},dashed:!0}):null,Ot===2?w.createElement(za,{className:"ant-btn ant-btn-primary",loading:Qt,disabled:!(M.length>0),onClick:mp},a("5000.5017")||"计算"):null),a("5000.6039")||"平颅方位",w.createElement(Ta.Group,{onChange:ye=>{Fe(ye.target.value),ye.target.value?Ce.current.rotation.set(-8.3/180*Math.PI,0,0):Ce.current.rotation.set(0,0,0)},style:{marginLeft:6},value:Te},w.createElement(Ta,{value:0},a("5000.6042")||"关闭"),w.createElement(Ta,{value:1},a("5000.6043")||"启用")),w.createElement(ra,{style:{margin:"5px 0",borderColor:"rgba(5, 5, 5, .3)",minWidth:200,width:250},dashed:!0}),w.createElement("div",{dangerouslySetInnerHTML:{__html:c.current}}),w.createElement("div",{dangerouslySetInnerHTML:{__html:u.current}})):null),at.includes("reslicing")&&w.createElement(Gv,{tab:a("4000.0204")||"图谱切面",key:"3",disabled:Z===2||Z===0},Lr?w.createElement(w.Fragment,null,w.createElement("div",{style:{width:"276px"}},w.createElement(bo,null,a("7000.7024")||"控制模式",": ",w.createElement(Ta.Group,{value:Kl,onChange:ye=>{ye.target.value==0?je.current.setMode("translate"):je.current.setMode("rotate"),Vs(ye.target.value)}},w.createElement(Ta,{value:0},a("7000.7022")||"平移"),w.createElement(Ta,{value:1,disabled:Pl!=4},a("7000.7023")||"旋转")),w.createElement("span",{style:{fontStyle:"italic"}},a("5000.0019")||"提示:按R键进入旋转模式")),w.createElement(ra,{style:{margin:"5px 0",borderColor:"rgba(5, 5, 5, .3)",minWidth:200,width:250},dashed:!0}),w.createElement(bo,null,a("7000.7021")||"重切片模式",":",w.createElement("br",null),w.createElement(Ta.Group,{value:Pl.toString(),onChange:ye=>il(Number(ye.target.value))},w.createElement(Ta.Button,{value:"1",style:{padding:"0 5px"}},"Coronal"),w.createElement(Ta.Button,{value:"2",style:{padding:"0 5px"}},"Sagittal"),w.createElement(Ta.Button,{value:"3",style:{padding:"0 5px"}},"Horizontal"),w.createElement(Ta.Button,{value:"4",style:{padding:"0 5px"}},"Arbitrary"))),w.createElement(ra,{style:{margin:"5px 0",borderColor:"rgba(5, 5, 5, .3)",minWidth:200,width:250},dashed:!0}),w.createElement(bo,null,w.createElement(to,{style:{height:"36px",lineHeight:"36px"},span:8},a("4000.0210")||"平移-X",":"),w.createElement(to,{span:12},w.createElement(Up,{min:-5.17,max:5.17,onChange:Su,step:.01,value:$r,disabled:Ze}))),w.createElement(ra,{style:{margin:"5px 0",borderColor:"rgba(5, 5, 5, .3)",minWidth:200,width:250,visibility:"hidden"},dashed:!0}),w.createElement(bo,null,w.createElement(to,{style:{height:"36px",lineHeight:"36px"},span:8},a("4000.0211")||"平移-Y",":"),w.createElement(to,{span:12},w.createElement(Up,{min:-5.33,max:2.04,onChange:Wc,step:.01,value:An,disabled:vt}))),w.createElement(ra,{style:{margin:"5px 0",borderColor:"rgba(5, 5, 5, .3)",minWidth:200,width:250,visibility:"hidden"},dashed:!0}),w.createElement(bo,null,w.createElement(to,{style:{height:"36px",lineHeight:"36px"},span:8},a("4000.0212")||"平移-Z",":"),w.createElement(to,{span:12},w.createElement(Up,{min:-8,max:6,onChange:Rd,step:.01,value:Se,disabled:At}))),w.createElement(ra,{style:{margin:"5px 0",borderColor:"rgba(5, 5, 5, .3)",minWidth:200,width:250,visibility:"hidden"},dashed:!0}),w.createElement(bo,null,w.createElement(to,{style:{height:"36px",lineHeight:"36px"},span:8},a("4000.0213")||"角度-X",":"),w.createElement(to,{span:12},w.createElement(Up,{min:0,max:360,step:1,value:on,onChange:ye=>xc(ye,1),disabled:rn}))),w.createElement(ra,{style:{margin:"5px 0",borderColor:"rgba(5, 5, 5, .3)",minWidth:200,width:250,visibility:"hidden"},dashed:!0}),w.createElement(bo,null,w.createElement(to,{style:{height:"36px",lineHeight:"36px"},span:8},a("4000.0214")||"角度-Y",":"),w.createElement(to,{span:12},w.createElement(Up,{min:0,max:360,step:1,value:xn,onChange:ye=>xc(ye,2),disabled:rn}))),w.createElement(ra,{style:{margin:"5px 0",borderColor:"rgba(5, 5, 5, .3)",minWidth:200,width:250,visibility:"hidden"},dashed:!0}),w.createElement(bo,null,w.createElement(to,{style:{height:"36px",lineHeight:"36px"},span:8},a("4000.0215")||"角度-Z",":"),w.createElement(to,{span:12},w.createElement(Up,{min:0,max:360,step:1,value:Xn,onChange:ye=>xc(ye,3),disabled:rn})))),w.createElement(za,{style:{marginTop:20},type:"primary",disabled:Cn,onClick:()=>Ku()},a("7000.0107")||"查看更高分辨率的图像"),w.createElement(ra,{style:{margin:"10px 0",borderColor:"rgba(5, 5, 5, .3)",minWidth:200,width:250},dashed:!0}),w.createElement("div",null,w.createElement("i",null,a("5000.6008")||"点击下方按钮,申请下载各向同性10微米分辨率的STAM图谱3D标签图像")),w.createElement(za,{style:{marginTop:20},type:"primary",onClick:()=>{Zc()}},a("5000.6009")||"请求STAM标签"),w.createElement(ra,{style:{margin:"5px 0",borderColor:"rgba(5, 5, 5, .3)",minWidth:200,width:250},dashed:!0})):null),at.includes("registration")&&w.createElement(Gv,{tab:a("5000.0001")||"脑片配准",key:"4",disabled:Z===2||Z===0},Lr?w.createElement(w.Fragment,null,nl.map((ye,Ne)=>w.createElement(w.Fragment,null,w.createElement(Rq.CheckableTag,{key:ye,checked:Co.includes(ye),onChange:()=>Ll([ye])},ye))),nl.length<10?w.createElement(Rq,{icon:w.createElement(Ww,null),onClick:()=>{zc(ye=>[...ye,`Task${nl.length+1}`]),Bs(ye=>[...ye,{key:`Task${nl.length+1}`,fileList:[],radioValue:"Config_DAPI.ini",fileList2:[],correspondingPlaneData:{},registrationRadioShowType:"1",firstRegistrationImg:{width:0,height:0},startButtonLoading:!1,filename:""}]),Po.current=[...Po.current,{key:`Task${nl.length+1}`,fileList:[],radioValue:"Config_DAPI.ini",fileList2:[],correspondingPlaneData:{},registrationRadioShowType:"1",firstRegistrationImg:{width:0,height:0},startButtonLoading:!1,filename:""}]}},"New task"):null,Oo.map((ye,Ne)=>{if(ye.key===Co[0]){const{key:We,fileList:tt,fileList2:Ct,correspondingPlaneData:Jt,registrationRadioShowType:$t,startButtonLoading:bn}=ye;return w.createElement("div",{key:We},w.createElement(bo,null,w.createElement(to,null,w.createElement("p",null,w.createElement("span",null,a("5000.6033")||"Upload slice, or use the test "),w.createElement("a",{onClick:()=>{Go("DAPI")}},"DAPI "),"&",w.createElement("a",{onClick:()=>{Go("PI")}}," PI "),a("5000.6034")||"slices:"))),w.createElement(bo,null,w.createElement(to,null,w.createElement(i6,{accept:"image/tiff",listType:"picture-card",fileList:tt,onPreview:tc,customRequest:_c,beforeUpload:un=>Es(un),onRemove:()=>{const un=Oo.findIndex(cr=>cr.key===Co[0]);if(un>-1){let cr=JSON.parse(JSON.stringify(Oo)),Wn=cr[un];Wn.fileList=[],Bs(cr),Po.current=cr}}},w.createElement("button",{style:{border:0,background:"none"},type:"button"},w.createElement(Ww,null),w.createElement("div",{style:{marginTop:8}},"Upload tiff"))))),w.createElement(ra,{style:{margin:"5px 0",borderColor:"rgba(5, 5, 5, .3)",minWidth:200,width:250},dashed:!0}),w.createElement(bo,null,w.createElement(to,null,w.createElement("p",null,w.createElement("span",null,a("5000.7000")||"(可选) 上传第二张脑片图像,默认该图像已经配准到了第一张上传的脑片图像上")))),w.createElement(bo,null,w.createElement(to,null,w.createElement(i6,{accept:"image/tiff",listType:"picture-card",fileList:Ct,onPreview:tc,customRequest:un=>_c(un,2),beforeUpload:un=>Es(un,2),onRemove:()=>{const un=Oo.findIndex(cr=>cr.key===Co[0]);if(un>-1){let cr=JSON.parse(JSON.stringify(Oo)),Wn=cr[un];Wn.fileList2=[],Bs(cr),Po.current=cr}}},w.createElement("button",{style:{border:0,background:"none"},type:"button"},w.createElement(Ww,null),w.createElement("div",{style:{marginTop:8}},"Upload tiff"))))),w.createElement(ra,{style:{margin:"5px 0",borderColor:"rgba(5, 5, 5, .3)",minWidth:200,width:250},dashed:!0}),w.createElement(bo,{style:{marginTop:5}},w.createElement(to,null,a("7000.0106")||"计算与上传图像对应的图谱切面",":")),w.createElement(bo,{style:{marginTop:5}},w.createElement(to,null,w.createElement(za,{loading:bn,disabled:tt.length<1,onClick:()=>Tu(Ne)},a("7000.0108")||"开始计算"),w.createElement(za,{onClick:Ld,disabled:!Jt.url},a("7000.0109")||"下载保存"))),w.createElement(bo,{style:{marginTop:5}},Jt.base64_url&&w.createElement(GD,{src:Jt.base64_url,width:100})),w.createElement(ra,{style:{margin:"5px 0",borderColor:"rgba(5, 5, 5, .3)",minWidth:200,width:250},dashed:!0}),w.createElement(bo,{style:{marginTop:5}},w.createElement(za,{onClick:()=>Qu("1"),disabled:!Jt.url},a("5000.0004")||"显示结果"),w.createElement(to,{style:{display:"flex",alignItems:"center",marginLeft:5}})),w.createElement(bo,null,w.createElement(Ta.Group,{onChange:Ic,value:$t},w.createElement(Ta,{value:"1"},a("5000.7001")||"atlas"),w.createElement(bo,null,"slice: ",w.createElement(ob,{onChange:un=>{Rs.current=un.target.checked;const cr=un.target.checked?1:-1;Ce.current.traverse(Wn=>{Wn.userData.name==="registrationPng"&&Wn.userData.imgType!=1&&Wn.scale.set(cr,1,1)})}},a("5000.7013")||"左右翻转"),w.createElement("div",{style:{wordWrap:"break-word",width:200}},w.createElement(Ta,{value:"2"},a("5000.7002")||"first"),Ct.length<1?null:w.createElement(Ta,{value:"3"},a("5000.7003")||"second"))))),w.createElement(ra,{style:{margin:"5px 0",borderColor:"rgba(5, 5, 5, .3)",minWidth:200,width:250},dashed:!0}))}else return null})):null),at.includes("download")&&w.createElement(Gv,{tab:a("5000.0005")||"数据下载",key:"5",disabled:Z===2||Z===0},Lr?w.createElement(w.Fragment,null,w.createElement(bo,null,w.createElement(to,null,a("5000.0009")||"提示:按A键切换平移和缩放模式")),w.createElement(bo,null,w.createElement(to,null,w.createElement(za,{onClick:ed},On))),w.createElement(ra,{style:{margin:"5px 0",borderColor:"rgba(5, 5, 5, .3)",minWidth:200,width:250},dashed:!0}),w.createElement(bo,{style:{marginTop:5}},w.createElement(to,null,w.createElement(za,{disabled:On===(a("5000.0006")||"选取下载范围"),onClick:Od},a("5000.0008")||"预览图像"))),w.createElement(ra,{style:{margin:"5px 0",borderColor:"rgba(5, 5, 5, .3)",minWidth:200,width:250},dashed:!0}),w.createElement(bo,{style:{alignItems:"center"}},w.createElement(to,null,a("5000.0010")||"设置采样倍数",":"),w.createElement(to,{span:12},w.createElement(Up,{min:1,max:6,step:1,defaultValue:2,value:Rn,onChange:ye=>{rr(ye),Zn({})},tooltip:{formatter:ye=>ye?Math.pow(2,ye-1):null}}))),w.createElement(ra,{style:{margin:"5px 0",borderColor:"rgba(5, 5, 5, .3)",minWidth:200,width:250},dashed:!0}),w.createElement(bo,null,w.createElement(to,null,w.createElement(za,{loading:ii,disabled:On===(a("5000.0006")||"选取下载范围"),onClick:bv},a("5000.0005")||"数据下载"))),w.createElement(ra,{style:{margin:"5px 0",borderColor:"rgba(5, 5, 5, .3)",minWidth:200,width:250},dashed:!0}),w.createElement(bo,null,w.createElement(to,null,a("5000.5031")||"数据块大小:"),w.createElement(to,null,yv)),w.createElement(ra,{style:{margin:"5px 0",borderColor:"rgba(5, 5, 5, .3)",minWidth:200,width:250},dashed:!0})):null),at.includes("mapping")&&w.createElement(Gv,{tab:a("5000.5014")||"图谱映射",key:"6",disabled:Z===2||Z===0},Lr?w.createElement(w.Fragment,null,w.createElement(bo,null,w.createElement(to,null,w.createElement("p",null,a("5000.6035")||"Upload 3D image or swc file already mapped to STAM or CCF, otherwise use the test ",w.createElement("a",{onClick:()=>{so("3D")}},a("5000.6036")||"3D image")," or ",w.createElement("a",{onClick:()=>{so("swc")}},a("5000.6037")||"swc file:"))),w.createElement(to,null,w.createElement(i6,{listType:"picture-card",fileList:ir,onPreview:tc,customRequest:wu,beforeUpload:ye=>Es(ye,1),onRemove:()=>{li([])}},w.createElement("button",{style:{border:0,background:"none"},type:"button"},w.createElement(Ww,null),w.createElement("div",{style:{marginTop:8}},"Upload"))))),w.createElement(ra,{style:{margin:"5px 0",borderColor:"rgba(5, 5, 5, .3)",minWidth:200,width:250},dashed:!0}),w.createElement(bo,{style:{marginTop:5}},w.createElement(to,null,a("5000.5015")||"选择转换方向",":"),w.createElement(to,null,w.createElement(Ta.Group,{onChange:Dl,value:Pr},w.createElement(Ta,{value:"applySTAM2CCF"},"STAM-",">","CCF"),w.createElement(Ta,{value:"applyCCF2STAM"},"CCF-",">","STAM")))),w.createElement(ra,{style:{margin:"5px 0",borderColor:"rgba(5, 5, 5, .3)",minWidth:200,width:250},dashed:!0}),w.createElement(bo,{style:{marginTop:5}},w.createElement(to,null,w.createElement(za,{loading:qt,disabled:!aa,onClick:mr},a("7000.0108")||"开始计算"),w.createElement(za,{onClick:sn,disabled:!ai.file},a("7000.0109")||"下载保存"))),w.createElement(bo,{style:{marginTop:5}},ai.base64_url&&w.createElement(GD,{src:ai.base64_url,width:100})),w.createElement(bo,{style:{marginTop:5}},w.createElement(za,{onClick:Ju,disabled:!(ai.file&&ai.file[1])},a("5000.0004")||"显示结果")),w.createElement(ra,{style:{margin:"5px 0",borderColor:"rgba(5, 5, 5, .3)",minWidth:200,width:250},dashed:!0}),w.createElement("p",null,a("7000.7014")||"您也可以在此下载",w.createElement("a",{href:`${n}/data/Fiji.zip`},"Fji")," / ",w.createElement("a",{href:n+"/data/ImageJ.zip"},"ImageJ"),w.createElement("span",null,a("7000.7015")||"的插件;您可能需要使用测试数据,请"),w.createElement("a",{href:`${n}/data/test.zip`},a("7000.7016")||"在此"),w.createElement("span",null,a("7000.7017")||"下载"))):null),at.includes("neurons")&&w.createElement(Gv,{tab:a("5000.5052")||"神经环路",key:"7",disabled:Z===2||Z===0},Lr?w.createElement(w.Fragment,null,w.createElement("p",null,w.createElement("span",null,a("5000.6029")||"Navigate the "),w.createElement("a",{style:{textDecoration:"underline"},onClick:()=>{Jo(!0)}},a("5000.6030")||"whole-brain connectivity diagram"),w.createElement("span",null,a("5000.6031")||"consisting of single neuronal projections,or:")),ya?w.createElement(L9,{ref:Ol,style:{width:"100%"},options:In,placeholder:a("5000.5053")||"Input the inquired structure",onSearch:Zi,onChange:Sv,value:ya}):w.createElement(lL,{showSearch:!0,ref:Hc,style:{width:"100%"},value:ya,dropdownStyle:{maxHeight:400,overflow:"hidden"},placeholder:a("5000.5053")||"Input the inquired structure",allowClear:!0,treeDefaultExpandAll:!1,onChange:Sv,onSearch:Sv,treeData:rc(Re)}),w.createElement("p",{style:{fontSize:"13px",fontStyle:"italic"}},w.createElement("span",null,a("5000.6001")||"Input an inquired structure to visualize the connectivity map, for example, "),w.createElement("a",{onClick:Ql("CP"),style:{textDecoration:"underline"}},"CP"),", ",w.createElement("a",{onClick:Ql("PIR1"),style:{textDecoration:"underline"}},"PIR1"),", or ",w.createElement("a",{onClick:Ql("Primary motor area, Layer 6a"),style:{textDecoration:"underline"}}," Primary motor area, Layer 6a")),w.createElement(ra,{style:{margin:"5px 0",borderColor:"rgba(5, 5, 5, .3)",minWidth:200,width:280},dashed:!0}),w.createElement("div",{style:{width:"100%",height:"calc(100vh - 330px)",overflow:"scroll",paddingTop:"10px"}},w.createElement("div",{style:Fs?{border:"2px solid #e6e6e6",borderRadius:"5px",paddingLeft:"5px",paddingBottom:"5px"}:{}},Fs&&w.createElement("h2",{style:{lineHeight:"3px"}},a("5000.5054")||"Upstream"),w.createElement("div",{ref:go,style:{width:"100%"}})),w.createElement("br",null),w.createElement("div",{style:Fs?{border:"2px solid #e6e6e6",borderRadius:"5px",paddingLeft:"5px",paddingBottom:"5px"}:{}},Fs&&w.createElement("h2",{style:{lineHeight:"3px"}},a("5000.5055")||"Downstream"),w.createElement("div",{ref:ta,style:{width:"100%"}})))):null)),ja&&w.createElement(GD,{wrapperStyle:{display:"none"},preview:{visible:Ba,onVisibleChange:ye=>Wa(ye),afterOpenChange:ye=>!ye&&Ks("")},src:ja}),w.createElement(em,{open:ht,onClose:()=>rt(!1),steps:rf}),w.createElement(em,{open:ct,onClose:()=>pt(!1),steps:Id,mask:!0}),w.createElement(em,{open:Be,onClose:()=>ft(!1),steps:xu,mask:!0}),w.createElement(em,{open:St,onClose:()=>Tt(!1),steps:yc,mask:!0}),w.createElement(em,{open:mt,onClose:()=>yt(!1),steps:bu,mask:!0}),w.createElement(em,{open:Nt,onClose:()=>Yt(!1),steps:ju,mask:!0}),w.createElement(em,{open:Mn,onClose:()=>tn(!1),steps:Xu,mask:!0}),w.createElement(em,{open:Pn,onClose:()=>Ft(!1),steps:Ad,mask:!0}),w.createElement(hT,{direction:2,percentage:.2,pointMax:Rt.current,pointMin:Vt.current,color:16777215,sliceImgNum:205,slicePath:n+"/data/SLICE/",transformControls:je,controls:h,canvas_width:gt,canvas_height:Qe,handleStateUpdate:pl,cube_helper:_t,renderer:f,showMesh:fr,setAngleX:cn,setAngleY:pn,setAngleZ:zn,gray_value:Me,setSectionsInfo:oe,sectionsInfoRef:ke,sectionPointRef:fs,composer:Ue,menutagShowRef:Lo,tabIndex:Kn}),w.createElement(hT,{direction:3,percentage:.2,pointMax:Rt.current,pointMin:Vt.current,color:16777215,sliceImgNum:160,slicePath:n+"/data/SLICE/",transformControls:je,controls:h,canvas_width:gt,canvas_height:Qe,handleStateUpdate:pl,cube_helper:_t,renderer:f,showMesh:lr,setAngleX:cn,setAngleY:pn,setAngleZ:zn,gray_value:Me,setSectionsInfo:oe,sectionsInfoRef:ke,sectionPointRef:fs,composer:Ue,menutagShowRef:Lo,tabIndex:Kn}),w.createElement(hT,{direction:1,percentage:.2,pointMax:Rt.current,pointMin:Vt.current,color:16777215,sliceImgNum:264,slicePath:n+"/data/SLICE/",transformControls:je,controls:h,canvas_width:gt,canvas_height:Qe,handleStateUpdate:pl,cube_helper:_t,renderer:f,showMesh:ur,setAngleX:cn,setAngleY:pn,setAngleZ:zn,gray_value:Me,setSectionsInfo:oe,sectionsInfoRef:ke,sectionPointRef:fs,composer:Ue,menutagShowRef:Lo,tabIndex:Kn}),w.createElement(hT,{direction:4,percentage:.5,pointMax:Rt.current,pointMin:Vt.current,slice_arbitrary:Pt,color:16777215,sliceImgNum:264,slicePath:n+"/data/SLICE/",transformControls:je,controls:h,canvas_width:gt,canvas_height:Qe,handleStateUpdate:pl,normalVector:bt,cube_helper:_t,renderer:f,showMesh:En,setAngleX:cn,setAngleY:pn,setAngleZ:zn,settransformControlsType:Vs,gray_value:Me,setSectionsInfo:oe,sectionsInfoRef:ke,sectionPointRef:fs,composer:Ue,menutagShowRef:Lo,tabIndex:Kn}),w.createElement("div",{id:"spinner",style:{position:"absolute",zIndex:999,left:0,top:0,width:"100%",height:"100%",display:`${Rr?"block":"none"}`,opacity:.7,backgroundColor:"#ffffff"}},w.createElement("div",{style:{position:"absolute",zIndex:999,left:"50%",top:"50%",fontWeight:"bold",textAlign:"center"}},w.createElement(pz,{spinning:!0,size:"large"}),w.createElement("br",null),"Loading....wait...")),w.createElement(Os,{open:Wt,centered:!0,okText:a("5000.0011")||"发送邮件",cancelText:a("5000.0112")||"取消",onOk:()=>{const ye="Request to download data blocks",Ne=`startX:${(Mt.current.bwidth*11.15).toFixed(2)},startY:${(Mt.current.bheight*12.31).toFixed(2)},startZ:${(Mt.current.bdepth*10).toFixed(2)}
|
|
4427
|
+
`;let UAt=new URL(window.location.href),nf=new URLSearchParams(UAt.search),yle=nf.get("leftHemisphereVisibility"),ble=nf.get("coordinateVisibility"),xle=nf.get("datumMarkVisibility"),Sle=nf.get("cranialVisibility"),Ele=nf.get("gridVisibility"),Cle=nf.get("terminalVisibility"),wle=nf.get("branchingVisibility"),Tle=nf.get("branchingColor"),_le=nf.get("brainContourVisibility"),Ile=nf.get("brainContourOpacity"),O4=nf.get("otherAtlases"),Ale=nf.get("atlasReslicingInfo"),Mle=nf.get("sectionPointPosition"),Rle=nf.get("echart_Value");const kAt={leftHemisphereVisibility:yle?JSON.parse(yle):!1,coordinateVisibility:ble?JSON.parse(ble):!0,datumMarkVisibility:xle?JSON.parse(xle):!0,cranialVisibility:Sle?JSON.parse(Sle):!1,gridVisibility:Ele?JSON.parse(Ele):!0,terminalVisibility:Cle?JSON.parse(Cle):!0,branchingVisibility:wle?JSON.parse(wle):!0,branchingColor:Tle||"#A7B5A1",brainContourVisibility:_le?JSON.parse(_le):!0,brainContourOpacity:Ile?JSON.parse(Ile):.3,otherAtlases:O4||"None",atlasReslicingInfo:Ale?JSON.parse(Ale):{}},FAt=(t,e)=>{let n=new URL(window.location.href),r=new URLSearchParams(n.search),i=e;typeof e!="string"&&(i=JSON.stringify(i)),r.set(t,i),n.search=r.toString(),window.history.replaceState({},"",n)},VAt={set:function(t,e,n){return t[e]=n,FAt(e,n),!0}},qi=new Proxy(kAt,VAt),HCe=w.forwardRef((t,e)=>{const{regionData:n,setoffset_factor:r,offset_factor_R:i,t:a,hrefStr:o,leftTreeRef:s,angleRef:c,jiaoduRef:u,mouseflag:d,renderer:f,controls:h,menutagShow:p,setMenuTag:v,startselect:y,linemeshs_jing:m,points:g,points2:x,activetabIndex:b,material:S,setShowimage:E,childRef:T,checkItems:M,setoutflag:L,fetchCoordinateFunc:R,setendPoint:O,clickPoint:N,outflagRef:U,axis_font:k,setdatum:D,modeChoose:V,setShowModeChoose:B,virusModeValue:F,setShowTabNums:j,pipelineClickEvent:K,automaticGroup:W,focusVirusLineItem:G,setMenuTagShow:J,responsefunc:re,mode:Z,setCheckItems:q,setLeftMenuTabIndex:ne,updatePage:Y,swcItem:te,axon_check:fe,swcnameMesh:se,setMode:he,vesselRef:Q,swcRef:pe,vesselStr:ee,lableStr:le,setShowSettingModal:ce,showSettingModal:be,fbxTreeDatas:Re,composer:Ue,setEchartValue:we,echartValue:Ie,sectionsInfoRef:ke,sectionsInfo:ue,setSectionsInfo:oe,gray_value:Me,setLuguchecked:Fe,Luguchecked:Te,datum:Ae,setGridShow:dt,PointShow:He,nodeStr:ut,lefttab:st,righttab:at,atlasData:Pe}=t,[ht,rt]=w.useState(!1),[ct,pt]=w.useState(!1),[Be,ft]=w.useState(!1),[St,Tt]=w.useState(!1),[mt,yt]=w.useState(!1),[Nt,Yt]=w.useState(!1),[Mn,tn]=w.useState(!1),[Pn,Ft]=w.useState(!1),[on,cn]=w.useState(qi.atlasReslicingInfo.angleX||120),[xn,pn]=w.useState(qi.atlasReslicingInfo.angleY||320),[Xn,zn]=w.useState(qi.atlasReslicingInfo.angleZ||270),[$r,Ar]=w.useState(qi.atlasReslicingInfo.positionX||0),[An,Ht]=w.useState(qi.atlasReslicingInfo.positionY||0),[Se,Ye]=w.useState(qi.atlasReslicingInfo.positionZ||0),[Ze,Je]=w.useState(qi.atlasReslicingInfo.translateX||!0),[vt,wt]=w.useState(qi.atlasReslicingInfo.translateY||!0),[At,Bt]=w.useState(qi.atlasReslicingInfo.translateZ||!0),[rn,Zt]=w.useState(qi.atlasReslicingInfo.rotate||!0),[Cn,Ln]=w.useState(qi.atlasReslicingInfo.ButtonDisabled||!0),[fr,Tn]=w.useState(!1),[lr,Hn]=w.useState(!1),[ur,mn]=w.useState(!1),[En,gn]=w.useState(!1),[On,sr]=w.useState(a("5000.0006")||"显示数据块"),[Kn,Ti]=w.useState(1),[Vr,br]=w.useState(1),[ir,li]=w.useState([]),[$i,Ri]=w.useState([]),[ii,xi]=w.useState(!1),[ai,Xi]=w.useState({}),[Ba,Wa]=w.useState(!1),[ja,Ks]=w.useState(""),[Ao,ms]=w.useState("Config_DAPI.ini"),[Pr,hi]=w.useState("applySTAM2CCF"),[Ot,lt]=w.useState(0),[qt,qe]=w.useState(!1),[Qt,Nn]=w.useState(!1),[Rr,Gr]=w.useState(!1),[Lr,Un]=w.useState(!0),[Rn,rr]=w.useState(2),[Wt,vn]=w.useState(!1),[Gn,Zn]=w.useState({}),tr=w.useRef(qi.atlasReslicingInfo.direction1||4),ci=w.useRef(null),Sr=w.useRef(null),[aa,Xa]=w.useState(!1),Ca=w.useRef(null),Mo=w.useRef(window.location.href.split("/")[2]),je=w.useRef(new S2(Ai.current,f==null?void 0:f.domElement)),gt=w.useRef(0),Qe=w.useRef(0),Pt=w.useRef(new Dn),Rt=w.useRef(new me),Vt=w.useRef(new me),_t=w.useRef(new Dn),bt=w.useRef(new me(1,0,0)),Et=w.useRef(new Dn),_n=w.useRef(null),gr=w.useRef(new EF),Oe=w.useRef(null),de=w.useRef([]),Ke=w.useRef(null),Ge=w.useRef(new Dn),et=w.useRef(new Vu),[Ut,dn]=w.useState(qi.otherAtlases),Kt={min:new me(59.74305725097656,69.15838623046875,.9565062522888184),max:new me(1081.3045654296875,800.6698608398438,1400.156005859375)},[In,Dt]=w.useState([]),Mt=w.useRef({}),jr=w.useRef(!1),Ur=w.useRef([0,0]),ar=w.useRef([0,0]),Yn=w.useRef(""),Ei=w.useRef(!1),[Yi,an]=w.useState(!1),[jt,zr]=w.useState(!1),[Tr,wr]=w.useState(0),[As,zi]=w.useState(0),[fo,mi]=w.useState([]),[Or,Hi]=w.useState([]),go=w.useRef(null),ta=w.useRef(null),[Ho,Ys]=w.useState(""),[ks,ys]=w.useState(null),[ya,mo]=w.useState(Rle||""),[Fs,bs]=w.useState(!1);w.useState("");const Ms=w.useRef(""),[kn,Ro]=w.useState(qi.leftHemisphereVisibility),xs=w.useRef([]);w.useRef([]);const[Zl,Jo]=w.useState(!1),[ao,ho]=w.useState(!1),Lo=w.useRef(!0),oo=w.useRef(!0),Ra=w.useRef({target:h.current.target.clone(),position:h.current.object.position.clone(),up:h.current.object.up.clone(),enabled:h.current.enabled}),[Kl,Vs]=w.useState(0),[Ss,Eo]=w.useState(!0),Rs=w.useRef(!0),mc=w.useRef(null),fs=w.useRef(new Dn),[Yl,Rl]=w.useState(qi.brainContourVisibility),[nl,zc]=w.useState(["Task1","Task2"]),[Co,Ll]=w.useState(["Task1"]),[Oo,Bs]=w.useState([{key:"Task1",fileList:[],radioValue:"Config_DAPI.ini",fileList2:[],correspondingPlaneData:{},registrationRadioShowType:"1",firstRegistrationImg:{width:0,height:0},startButtonLoading:!1,filename:""},{key:"Task2",fileList:[],radioValue:"Config_DAPI.ini",fileList2:[],correspondingPlaneData:{},registrationRadioShowType:"1",firstRegistrationImg:{width:0,height:0},startButtonLoading:!1,filename:""}]),Po=w.useRef([{key:"tags1",fileList:[],radioValue:"Config_DAPI.ini",fileList2:[],correspondingPlaneData:{},registrationRadioShowType:"1",firstRegistrationImg:{width:0,height:0},startButtonLoading:!1,filename:""},{key:"tags2",fileList:[],radioValue:"Config_DAPI.ini",fileList2:[],correspondingPlaneData:{},registrationRadioShowType:"1",firstRegistrationImg:{width:0,height:0},startButtonLoading:!1,filename:""}]),Ol=w.useRef(null),Hc=w.useRef(null),[mu,_d]=w.useState(qi.coordinateVisibility),[yu,Gu]=w.useState(qi.brainContourOpacity),[Pl,ql]=w.useState(qi.atlasReslicingInfo.direction1||4),[Wu,Gc]=w.useState({});w.useImperativeHandle(e,()=>({tabChange:La,setYinDaoOpen1:rt,setYinDaoOpen2:pt,setYinDaoOpen3:ft,setYinDaoOpen4:Tt,setYinDaoOpen5:yt,setYinDaoOpen6:Yt,setYinDaoOpen7:tn,setDontShowAgain:Eo})),w.useEffect(()=>{fetch(n+"/data/json/name.json").then(We=>We.json()).then(We=>{mi(We)}),fetch(n+"/data/TreeData/nuclear.json").then(We=>We.json()).then(We=>{Hi(We)});const ye=new ic(.05,32,32),Ne=new js({color:392960,transparent:!0});if(fs.current=new Dn(ye,Ne),fs.current.name="sectionSphere",Mle){let We=JSON.parse(Mle);fs.current.position.set(We.x,We.y,We.z)}qi.cranialVisibility&&xv(!0)},[]);const Qa=(ye,Ne)=>Ss?w.createElement("div",{style:{position:"absolute",top:"4px",right:"50px"}},w.createElement(ob,{defaultChecked:!1,onChange:We=>{We.target.checked?localStorage.setItem(ye,"true"):localStorage.setItem(ye,"false"),Ne()},style:{marginTop:"10px"}},"Don't show again")):null,rf=[{title:null,description:w.createElement("div",null,!localStorage.getItem("Assem")||localStorage.getItem("Assem")==="false"?Qa("Assem",function(){}):null,w.createElement("div",null,a("8000.0001")||"如①所示,在主窗口左侧的是数据面板,用户可以在该选项卡下选择STAM的解剖命名树,配准到STAM上的完整脑血管图谱和神经元数据。用户也可以切换两个不同版本的命名系统。"),w.createElement("div",null,a("8000.0002")||"如②所示,主窗口中可以加载脑区、核团的三维模型。"),w.createElement("div",null,a("8000.0003")||"如③所示,用户可以切换不同的模式或者功能模块")),cover:w.createElement("video",{src:`${n}/guide/topo.mp4`,controls:!0,style:{height:600}}),placement:"center",style:{width:"min-content"},target:Ke.current},{title:a("8000.0032")||"解剖结构、脑血管和神经元查询",cover:w.createElement("img",{src:`${n}/guide/gif_batch/topo/out_topo1.gif`}),description:w.createElement("div",null,!localStorage.getItem("Assem")||localStorage.getItem("Assem")==="false"?Qa("Assem",function(){}):null,a("8000.0004")||"Regions选项卡包含的是STAM的解剖命名树,用户可以在该选项卡下的复选框中选择任意数量的感兴趣结构,在主窗口中可视化;Vessels选项卡包含了一套配准到STAM上的完整脑血管图谱,用户可以在此选择感兴趣的血管分支;Neurons选项卡用于查询胞体或投射靶区位于感兴趣脑区的神经元数据。用户也可以选择切换到Brain maps 4.0 ontology,该命名树中的结构同样可以被检索、选中并可视化。"),target:s.current,placement:"right"},{title:a("8000.0033")||"可视化解剖子结构并切换坐标原点",cover:w.createElement("img",{src:`${n}/guide/gif_batch/topo/out_topo2.gif`}),description:w.createElement("div",null,!localStorage.getItem("Assem")||localStorage.getItem("Assem")==="false"?Qa("Assem",function(){}):null,a("8000.0005")||"用户可以点击Regions选项卡下的解剖命名树中蓝色的方块图标,此时主窗口中会以组装的形式可视化用户点击结构的所有子结构,同时展开幅度可在右侧面板设置。默认情况下,该坐标系统以Bregma点作为原点。户也可以将坐标原点切换为STAM的其它任意19个颅骨或颅内基准点,主窗口中可视化对象的坐标值将根据新的原点重新计算。右击任意基准点,可以保存以基准点为坐标原点的STAM标签图像。"),placement:"center",target:Ke.current},{title:a("8000.0034")||"可视化功能设置",cover:w.createElement("img",{src:`${n}/guide/gif_batch/topo/out_topo3.gif`}),description:w.createElement("div",null,!localStorage.getItem("Assem")||localStorage.getItem("Assem")==="false"?Qa("Assem",function(){}):null,a("8000.0006")||"用户可以在页面底部切换到setting选项卡。Left hemisphere开关决定是否展示左半脑,默认为Off。Coordinate开关决定是否在主窗口中显示坐标数值,默认为On。Datum Marks开关决定是否在主窗口中显示基准点,默认为On。Cranial开关决定是否在主窗口中显示颅骨的三维轮廓,默认为Off。"),target:document.getElementsByClassName("bottom_tabs_outer_div")[0]}],Id=[{title:null,description:w.createElement("div",null,!localStorage.getItem("Virtual")||localStorage.getItem("Virtual")==="false"?Qa("Virtual",function(){}):null,a("8000.0007")||"我们提供了虚拟手术导航服务,用户可以通过交互操作,模拟向小鼠脑注射病毒的立体定位手术过程。STAM会根据用户操作,返回注射位点与作为坐标原点的颅骨或颅内基准点之间的距离和注射角度信息。"),cover:w.createElement("video",{src:`${n}/guide/surgery.mp4`,controls:!0,style:{height:600}}),placement:"center",target:Ke.current,style:{width:"min-content"}},{title:a("8000.0035")||"自动导航模式",cover:w.createElement("img",{src:`${n}/guide/gif_batch/surgery/out_surgery1.gif`}),description:w.createElement("div",null,!localStorage.getItem("Virtual")||localStorage.getItem("Virtual")==="false"?Qa("Virtual",function(){}):null,a("8000.0008")||"首先选择要注射的脑区。接下来在脑区上选择注射靶点。用户继续点击Select target按钮,注射脑区的三维模型表面会出现一个跟随鼠标移动的绿点。然后,点击Auto进入自动模式,左侧数据面板中的Structure for injecting选项卡变为Regions to avoid。用户点击需要避开脑区、核团的名称,被选中的文字会变为高亮的红色,同时这些结构的三维轮廓也会显示在主窗口中。接下来点击右侧面板中的Intellectual planning按钮,等待若干秒后,STAM会返回一条从注射靶点出发、并且避开所有用户选中脑区、核团的路径。"),target:s.current,placement:"right"},{title:a("8000.0036")||"手动导航模式",cover:w.createElement("img",{src:`${n}/guide/gif_batch/surgery/out_surgery2.gif`}),description:w.createElement("div",null,!localStorage.getItem("Virtual")||localStorage.getItem("Virtual")==="false"?Qa("Virtual",function(){}):null,a("8000.0009")||"用户点击Manually进入手动规划模式,此时用户标记的注射靶点变为蓝色圆点,并出现一条从注射靶点出发、连接到鼠标当前的位置的红色虚射线,该射线与STAM外轮廓的交点(即注射位点)会被标记为绿色。当用户找到合适的注射路径后,可点击鼠标左键标记,被标记的路径会在主窗口中形成一条蓝色实线,注射位点则被标记为蓝色圆锥,且该路径所穿过的脑区、核团名称也会按照其空间位置排列在实线上。在右侧面板中,会出现该注射路径与三个标准解剖方向的夹角、注射靶点,以及注射位点的信息。用户点击右侧面板上的Reset按钮,即可重新开始整个注射手术流程。"),target:document.getElementsByClassName("ant-tabs-content-holder")[1],placement:"left"}],Ad=[{title:a("5000.5084")||"步骤一",description:a("5000.5082")||"请选择注射模式,如果选择自动模式,点击左侧细胞名称选择细胞核进行旁路",target:Ca.current}],yc=[{title:null,description:w.createElement("div",null,!localStorage.getItem("Reg")||localStorage.getItem("Reg")==="false"?Qa("Reg",function(){}):null,a("8000.0011")||"如①所示,用户可上传PI或DAPI染色的单张脑片图像,该服务将通过约1分钟的服务器端计算,从STAM中重切出一张与用户上传的脑片位置最接近的图谱切面,并根据计算出来的角度和位置显示在主窗口中。"),cover:w.createElement("video",{src:`${n}/guide/registration.mp4`,controls:!0,style:{height:600}}),placement:"center",target:Ke.current,style:{width:"min-content"}},{title:a("8000.0037")||"上传脑片图像并计算或下载配准结果",cover:w.createElement("img",{src:`${n}/guide/gif_batch/registration/out_reg1.gif`}),description:w.createElement("div",null,!localStorage.getItem("Reg")||localStorage.getItem("Reg")==="false"?Qa("Reg",function(){}):null,a("8000.0012")||"用户可以从本地上传待配准的tif/tiff格式的二维脑片图像。然后选择上传图像的类型。接着点击Calculate the corresponding plane from the atlas按钮组中的Start按钮,等待后台返回计算结果。计算完成后,Start按钮下方会出现计算结果的预览图,可左键单击放大查看。Start按钮右侧的Save按钮此时也变为可点击,用户单击该按钮,可以将计算结果下载到本地。"),target:document.getElementsByClassName("ant-tabs-content-holder")[1],placement:"left"},{title:a("8000.0038")||"页面跳转功能",cover:w.createElement("img",{src:`${n}/guide/gif_batch/registration/out_reg2.gif`}),description:w.createElement("div",null,!localStorage.getItem("Reg")||localStorage.getItem("Reg")==="false"?Qa("Reg",function(){}):null,a("8000.0013")||"在主窗口右击相应的脑区、核团,可以跳转到任意剖面可视化和脑解剖知识库页面。"),placement:"center",target:Ke.current}],bu=[{title:null,description:w.createElement("div",null,!localStorage.getItem("Down")||localStorage.getItem("Down")==="false"?Qa("Down",function(){}):null,a("8000.0014")||"如①和②所示,用户可以在STAM所在的三维空间中选取任意感兴趣范围,并以不同的采样倍数下载自己选取范围内的原始图像。"),cover:w.createElement("video",{src:`${n}/guide/datasharing.mp4`,controls:!0,style:{height:600}}),placement:"center",target:Ke.current,style:{width:"min-content"}},{title:a("8000.0047")||"平移模式选择原始图像数据的范围",cover:w.createElement("img",{src:`${n}/guide/gif_batch/datasharing/out_sharing1.gif`}),description:w.createElement("div",null,!localStorage.getItem("Down")||localStorage.getItem("Down")==="false"?Qa("Down",function(){}):null,a("8000.0015")||"用户可以点击“Select the range”按钮,然后主窗口中出现一个橙色线条的方框。用户通过长按鼠标左键,拖动红、绿、蓝三种颜色的箭头,可以控制方框在各个方向上的平移,当某个方向的箭头被用户选中时,该箭头会变为高亮的黄色。"),target:document.getElementsByClassName("ant-tabs-content-holder")[1],placement:"left"},{title:a("8000.0039")||"缩放模式选择原始图像数据的范围并预览图像",cover:w.createElement("img",{src:`${n}/guide/gif_batch/datasharing/out_sharing2.gif`}),description:w.createElement("div",null,!localStorage.getItem("Down")||localStorage.getItem("Down")==="false"?Qa("Down",function(){}):null,a("8000.0016")||"用户也可以通过按下键盘上的“A”,将范围选取操作从平移模式切换为缩放模式。此时方框的箭头会变为方块,拖动方块,就可以改变方框的大小。经过上述操作明确了待下载数据的空间范围后,可以点击“预览下载图像”按钮,通过体绘制,在主窗口中对该范围内的图像进行可视化,"),placement:"center",target:Ke.current},{title:a("8000.0040")||"选择数据的采样倍数并下载",cover:w.createElement("img",{src:`${n}/guide/gif_batch/datasharing/out_sharing3.gif`}),description:w.createElement("div",null,!localStorage.getItem("Down")||localStorage.getItem("Down")==="false"?Qa("Down",function(){}):null,a("8000.0017")||"拖动“Set the downsampling rate”滑动条,用户可以选择待下载数据的采样倍数;具体的倍数值可通过滑块上方的黑色背景提示文字查看。当数据量没有超过1 GB时,点击Downloading按钮可直接下载;当超过该数值,点击Downloading按钮会唤起用户终端的邮箱管理工具(如Outlook等),并自动将待下载范围和采样倍数信息填入邮件中,此时用户点击邮件发送按钮,即可向STAM网站发送数据下载申请。"),target:document.getElementsByClassName("ant-tabs-content-holder")[1],placement:"left"}],ju=[{title:null,description:w.createElement("div",null,!localStorage.getItem("Map")||localStorage.getItem("Map")==="false"?Qa("Map",function(){}):null,a("8000.0018")||"我们支持用户上传此前已经配准到Common Coordinate Framework(CCF)的三维图像数据和神经元完整形态数据,并将其映射到STAM上,并直接在三维空间中进行可视化;我们也支持反向映射,即将已经配准到STAM的同类型数据映射到CCF上。"),cover:w.createElement("video",{src:`${n}/guide/mapping.mp4`,controls:!0,style:{height:600}}),placement:"center",target:Ke.current,style:{width:"min-content"}},{title:a("8000.0041")||"上传三维图像数据并计算",cover:w.createElement("img",{src:`${n}/guide/gif_batch/mapping/out_mapping1.gif`}),description:w.createElement("div",null,!localStorage.getItem("Map")||localStorage.getItem("Map")==="false"?Qa("Map",function(){}):null,a("8000.0019")||"用户点击右侧面板的Upload按钮,上传已配准到CCF或者STAM的三维图像数据或神经元形态学数据。上传结束后,在Select the direction of conversion单选框中,确定数据的映射方向是从STAM到CCF还是反过来。此后点击Start按钮,STAM的服务器端开始计算,Start按钮变为等待状态。"),target:document.getElementsByClassName("ant-tabs-content-holder")[1],placement:"left"},{title:a("8000.0042")||"计算完成后预览或下载结果",cover:w.createElement("img",{src:`${n}/guide/gif_batch/mapping/out_mapping2.gif`}),description:w.createElement("div",null,!localStorage.getItem("Map")||localStorage.getItem("Map")==="false"?Qa("Map",function(){}):null,a("8000.0020")||"等待约10分钟后,STAM的服务器端完成计算并返回结果。此时Save按钮和View result按钮均变为可点击状态。点击Save按钮,可以将计算结果下载到本地;点击View result按钮,可以在主窗口中预览计算结果。"),target:document.getElementsByClassName("ant-tabs-content-holder")[1],placement:"left"}],xu=[{title:null,description:w.createElement("div",null,!localStorage.getItem("Res")||localStorage.getItem("Res")==="false"?Qa("Res",function(){}):null,w.createElement("div",null,a("8000.0021")||"我们提供了沿任意角度可视化脑图谱切面的服务。用户可以查看感兴趣的STAM任意位置和角度的切面,浏览该切面上的脑区、核团标注,并由该图谱切面跳转到STAM任意切面服务所提供的各向同性1微米分辨率切面。"),w.createElement("div",null,a("8000.0022")||"如①所示,在窗口左侧的是数据面板,与“三维自然形貌可视化”中的数据面板功能相同。位于正中区域的是主窗口。"),w.createElement("div",null,a("8000.0023")||"用户也可以通过拖动滑动条,实现图谱切面的平移和旋转。具体的平移、旋转数值可通过滑块上方的黑色背景提示文字查看。")),cover:w.createElement("video",{src:`${n}/guide/reslicing.mp4`,controls:!0,style:{height:600}}),placement:"center",target:Ke.current,style:{width:"min-content"}},{title:a("8000.0043")||"平移或旋转图谱切面",cover:w.createElement("img",{src:`${n}/guide/gif_batch/reslicing/out_reslicing1.gif`}),description:w.createElement("div",null,!localStorage.getItem("Res")||localStorage.getItem("Res")==="false"?Qa("Res",function(){}):null,a("8000.0024")||"用户通过长按鼠标左键,拖动红、绿、蓝三种颜色的箭头,可以控制图谱切面的平移。用户也可以通过按下键盘上的“R”,将范围选取操作从平移模式切换为旋转模式。此时箭头会变为球形,沿球形拖动,就可以控制图谱切面的旋转。"),placement:"center",target:Ke.current},{title:a("8000.0044")||"下载高分辨率的STAM图谱3D标签图像",cover:w.createElement("img",{src:`${n}/guide/gif_batch/reslicing/out_reslicing2.gif`}),description:w.createElement("div",null,!localStorage.getItem("Res")||localStorage.getItem("Res")==="false"?Qa("Res",function(){}):null,a("8000.0025")||"用户也可以通过拖动滑动条,实现图谱切面的平移和旋转。点击viewer higher resolution image按钮可以跳转到任意剖面可视化界面。点击Requesting STAM labels按钮,填入许可证即可下载各向同性10微米分辨率的STAM图谱3D标签图像。"),target:document.getElementsByClassName("ant-tabs-content-holder")[1],placement:"left"}],Xu=[{title:null,description:w.createElement("div",null,!localStorage.getItem("Neu")||localStorage.getItem("Neu")==="false"?Qa("Neu",function(){}):null,w.createElement("div",null,a("8000.0026")||"我们提供全脑的胞体或投射靶区的神经环路数据可视化服务。用户可以选择感兴趣的任意胞体或投射靶区在脑区、核团的神经环路数据,并查看数据对应的脑区、核团标注。"),w.createElement("div",null,a("8000.0027")||"如①所示,在窗口左侧的是数据面板,与“三维自然形貌可视化”中的数据面板功能相同,其中Neurons选项卡用于查询胞体或投射靶区位于感兴趣脑区的神经元数据。"),w.createElement("div",null,a("8000.0028")||"如②所示,用户可以在搜索框中搜索感兴趣脑区、核团。"),w.createElement("div",null,a("8000.0029")||"如③所示,这是一个由若干个脑区、核团子结构组成的神经环路连接示意图。")),cover:w.createElement("video",{src:`${n}/guide/neuronal.mp4`,controls:!0,style:{height:600}}),placement:"center",target:Ke.current,style:{width:"min-content"}},{title:a("8000.0045")||"查看神经环路连接示意图并交互",cover:w.createElement("img",{src:`${n}/guide/gif_batch/neuronal/out_neuronal1.gif`}),description:w.createElement("div",null,!localStorage.getItem("Neu")||localStorage.getItem("Neu")==="false"?Qa("Neu",function(){}):null,a("8000.0030")||"用户可以点击“whole-brain connectivity diagram”按钮或在搜索框中搜索感兴趣脑区、核团,即可弹出由若干个脑区、核团子结构组成的神经环路连接示意图。不同圆点表示不同的脑区、核团结构,圆点旁边显示的是脑区、核团的名称。用户可以将鼠标移动到圆点、脑区或核团的名称上,左击或右击圆点。"),target:document.getElementsByClassName("ant-tabs-content-holder")[1],placement:"left"},{title:a("8000.0046")||"显示用户指定脑区上下游连接关系",cover:w.createElement("img",{src:`${n}/guide/gif_batch/neuronal/out_neuronal1.gif`}),description:w.createElement("div",null,!localStorage.getItem("Neu")||localStorage.getItem("Neu")==="false"?Qa("Neu",function(){}):null,a("8000.0031")||"双击任意一个代表某个脑区、核团结构的圆点,神经环路连接示意图窗口隐藏,回到主窗口页面,显示该结构的上下游连接关系。在Upstream窗口中展示了投射到选中脑区、核团的神经环路,在Downstream窗口中展示了选中脑区、核团的投射靶区。用户可以用复选框选择任意数量的感兴趣神经元,在主窗口中可视化。"),target:s.current,placement:"right"}];w.useEffect(()=>{const ye=wc("index"),Ne=wc("type"),We=wc("structure");(Ne||ye)&&setTimeout(()=>{switch(ye=="Assembling"?(La(1,!0),(!localStorage.getItem("Assem")||localStorage.getItem("Assem")==="false")&&rt(!0)):ye=="Virtual_Inject"?(La(2,!0),(!localStorage.getItem("Virtual")||localStorage.getItem("Virtual")==="false")&&pt(!0)):ye=="Slicing"?(La(3,!0),(!localStorage.getItem("Res")||localStorage.getItem("Res")==="false")&&Yt(!0)):ye=="Mapping"?(La(6,!0),(!localStorage.getItem("Map")||localStorage.getItem("Map")==="false")&&Yt(!0)):ye=="Downloading"?(La(5,!0),(!localStorage.getItem("Down")||localStorage.getItem("Down")==="false")&&yt(!0)):ye=="Neuronal"?(La(7,!0),(!localStorage.getItem("Neu")||localStorage.getItem("Neu")==="false")&&tn(!0)):ye=="Registration"&&(La(4,!0),(!localStorage.getItem("Reg")||localStorage.getItem("Reg")==="false")&&Tt(!0)),Ne){case"simple":La(0,!0),document.title="STAM-SimpleViewer",he(0);case"normal":La(1,!0),document.title="STAM-NormalViewer";break;case"virtual":La(2,!0),document.title="STAM-Surgery",he(2);break;case"slicing":La(3,!0),document.title="STAM-Reslicing";break;case"registration":La(4,!0),document.title="STAM-Registration";break;case"downloading":La(5,!0),document.title="STAM-Downloading";break;case"mapping":La(6,!0),document.title="STAM-AtlasMapping";break;case"circuits":La(7,!0),document.title="STAM-NeuronalCircuits",setTimeout(()=>{We&&(mo(We),we(We))},500);break;case"other":La(8,!0),document.title="STAM-OtherAtlas";break;case"setting":La(9,!0),document.title="STAM-ViewSetting";break}},500)},[]),w.useEffect(()=>{gt.current=(f==null?void 0:f.domElement.clientWidth)-1,Qe.current=(f==null?void 0:f.domElement.clientHeight)-1;let ye=-(Kt.min.x+Kt.max.x)*Bo.current/2,Ne=Kt.max.clone().multiplyScalar(Bo.current).add(new me(ye,To.current,_o.current)),We=Kt.min.clone().multiplyScalar(Bo.current).add(new me(ye,To.current,_o.current));Rt.current=Ne,Vt.current=We;let tt=new js({visible:!1});if(_t.current=new Dn(new ns(Rt.current.x-Vt.current.x,Rt.current.y-Vt.current.y,Rt.current.z-Vt.current.z),tt),_t.current.position.set((Rt.current.x+Vt.current.x)/2,(Rt.current.y+Vt.current.y)/2,(Rt.current.z+Vt.current.z)/2),No(),O4){let Ct=O4;Ct=="CCF"&&Nm({filepath:n+"/data/FBX/outline-CCF.FBX",index:"outline",color:"#327DFF",opacity:.3,offsetZ:0,R:.01,callback:function(){}},et),Ct=="WHS"&&Nm({filepath:n+"/data/FBX/outline-WHS.FBX",index:"outline",color:"#327DFF",opacity:.3,offsetZ:0,R:.01,callback:function(){}},et)}},[]),w.useEffect(()=>{gt.current=(f==null?void 0:f.domElement.clientWidth)-1,Qe.current=(f==null?void 0:f.domElement.clientHeight)-1},[f==null?void 0:f.domElement.clientWidth]),w.useEffect(()=>{const ye=new rs;ye.expandByObject(Et.current);const Ne=R.current(ye.min.clone()),We=R.current(ye.max.clone());let tt=new Wh(Do(650,620,`${Ne.x.toFixed(2)},${Ne.y.toFixed(2)},${Ne.z.toFixed(2)}`,"#ccc")),Ct=new eh(new bf({map:tt}));Ct.name="startText";let Jt=new Wh(Do(650,620,`${We.x.toFixed(2)},${We.y.toFixed(2)},${We.z.toFixed(2)}`,"#ccc")),$t=new eh(new bf({map:Jt}));$t.name="endText",Ct.position.set(ye.min.x,ye.min.y+.2,ye.min.z),$t.position.set(ye.max.x,ye.max.y+.6,ye.max.z);let bn=Ce.current.getObjectByName("startText"),un=Ce.current.getObjectByName("endText");bn&&un&&(Ce.current.remove(bn,un),Ce.current.add(Ct,$t))},[Y]),w.useEffect(()=>{var cr,Wn;let ye={},Ne=[],We=[],tt={},Ct=[],Jt=[],$t,bn=new URL(window.location.href),un=new URLSearchParams(bn.search);if(fe&&Re.length>0){if($t=Ie&&Nl(Re,Ie),console.log($t),Ie==""){T.current.removeFBX(Ms.current,!0);const _r=T.current.checkedKeys.current.findIndex(kr=>kr===Ms.current);_r>-1&&T.current.checkedKeys.current.splice(_r,1),Ie==""&&(Ms.current="");const qn=JSON.stringify(T.current.checkedKeys.current);un.set("regionsChecked",qn),bn.search=un.toString(),window.history.replaceState({},"",bn)}if(Ie!=""){if($t==null&&Ie)if(Ie=="fiber tract fiber tracts")$t="fiber tract";else{let _r=Ie.match(/^[\w\/]+/);$t=_r?_r[0]:""}if($t){let _r=((cr=fe[$t])==null?void 0:cr.up)||[];Ct=Ct.concat(_r);let qn=((Wn=fe[$t])==null?void 0:Wn.down)||[];Jt=Jt.concat(qn),Ct=Array.from(new Set(Ct)),Jt=Array.from(new Set(Jt)),Ct&&Ct.forEach(ti=>{var Ni,$s,zs;for(const sl in fe)($s=(Ni=fe[sl])==null?void 0:Ni.soma)!=null&&$s.includes(ti)&&((zs=fe[sl])==null?void 0:zs.id)==1&&(sl in ye?ye[sl].includes(ti)||ye[sl].push(ti):ye[sl]=[ti])}),Jt&&Jt.forEach(ti=>{var Ni,$s,zs;for(const sl in fe)($s=(Ni=fe[sl])==null?void 0:Ni.axon)!=null&&$s.includes(ti)&&((zs=fe[sl])==null?void 0:zs.id)==1&&(sl in tt?tt[sl].includes(ti)||tt[sl].push(ti):tt[sl]=[ti])});for(let ti in tt)if(ti!=$t){let Ni=al(Re,ti.replace("_","/"));Ni&&Ne.push({name:ti.replace("_","/"),itemStyle:{color:Ni.color},lineStyle:{color:"#ccc"},value:tt[ti].length})}for(let ti in ye)if(ti!=$t){let Ni=al(Re,ti.replace("_","/"));Ni&&We.push({name:ti.replace("_","/"),itemStyle:{color:Ni.color},lineStyle:{color:"#ccc"},value:ye[ti].length})}bs(!0);let kr=al(Re,$t.replace("_","/"));const qr=[{name:$t.replace("_","/"),itemStyle:{color:kr&&kr.color},lineStyle:{color:"#ccc"},children:Ne}],Br=[{name:$t.replace("_","/"),itemStyle:{color:kr&&kr.color},lineStyle:{color:"#ccc"},children:We}];if(Ms.current!=$t){T.current.removeFBX(Ms.current,!0);const ti=T.current.checkedKeys.current.findIndex(zs=>zs===Ms.current);ti>-1&&T.current.checkedKeys.current.splice(ti,1);const Ni=al(T.current.treeDatas,$t.replace("_","/"));let $s=n+"/data/FBX/"+$t+".FBX";Ni&&qh($s,$t,Ni.color,.8,0,"FBX"),T.current.checkedKeys.current.push($t),q(T.current.checkedKeys.current),Ms.current=$t,un.set("echart_Value",Ie||""),bn.search=un.toString(),window.history.replaceState({},"",bn)}const ca={series:[{type:"tree",top:"1%",bottom:"1%",symbolSize:7,emphasis:{focus:"ancestor",lineStyle:{color:"#000"}},expandAndCollapse:!0,animationDuration:550,animationDurationUpdate:750}]};if(go.current&&ta.current){ta.current.style.height=We.length*2*10+"px",go.current.style.height=Ne.length*2*10+"px";const ti=YO(go.current);ti.setOption({...ca,tooltip:{trigger:"item",triggerOn:"mousemove",position:function(Jr,Nd,Gg,V0,Ev){const yp=Jr[0],Ul=Jr[1];return[yp+10,Ul]},formatter:function(Jr){const Nd=$t==Jr.name?"":Jr.name+"->",Gg=Jr.value?", "+Jr.value+" neurons":"";return`${Nd}${$t}${Gg}`}},series:[{...ca.series[0],left:"30%",right:"30%",label:{position:"right",verticalAlign:"middle",align:"left"},leaves:{label:{position:"left",verticalAlign:"middle",align:"right"}},orient:"RL",data:qr}]});const Ni=YO(ta.current);Ni.setOption({...ca,tooltip:{trigger:"item",triggerOn:"mousemove",position:function(Jr,Nd,Gg,V0,Ev){const yp=Jr[0],Ul=Jr[1],sA=Ev.contentSize[0];return[yp-sA-10,Ul]},formatter:function(Jr){const Nd=$t==Jr.name?"":"->"+Jr.name+", "+Jr.value+" neurons";return`${$t}${Nd}`}},series:[{...ca.series[0],left:"20%",right:"40%",label:{position:"left",verticalAlign:"middle",align:"right"},leaves:{label:{position:"right",verticalAlign:"middle",align:"left"}},orient:"LR",data:Br}]});const $s=()=>{ti.resize(),Ni.resize()},zs=Jr=>{if(ne(st.indexOf("neurons")+1),pe.current.ProcessedData.current=!1,Jr.data&&Jr.data.name){pe.current.setSearchValue($t.replace("_","/")),pe.current.setSomaValue(Jr.data.name.replace("_","/"));const Nd=bc(qr[0],Jr.data.name);ti.setOption({series:[{data:[Nd]}]}),Ni.setOption({series:[{data:Br}]})}},sl=Jr=>{if(ne(st.indexOf("neurons")+1),pe.current.ProcessedData.current=!1,Jr.data&&Jr.data.name){pe.current.setSearchValue(Jr.data.name.replace("_","/")),pe.current.setSomaValue($t.replace("_","/"));const Nd=bc(Br[0],Jr.data.name);Ni.setOption({series:[{data:[Nd]}]}),ti.setOption({series:[{data:qr}]})}};return window.addEventListener("resize",$s),ti.on("click",zs),Ni.on("click",sl),qr[0].children[0]&&zs({data:{name:qr[0].children[0].name}}),()=>{ti.off("click",zs),Ni.off("click",sl),window.removeEventListener("resize",$s),ti.dispose(),Ni.dispose()}}}}else bs(!1),ta.current&&go.current&&(ta.current.style.height="0px",go.current.style.height="0px")}},[Ie,Re,fe]),w.useEffect(()=>{if(Z===2)oo.current?(La(2,!0),oo.current=!1):La(2),Un(!0),h.current.noRotate=!0,h.current.noPan=!0,f.domElement.addEventListener("mousedown",ml),f.domElement.addEventListener("mousemove",Bg),f.domElement.addEventListener("mouseup",$g),j(1);else{Ce.current.rotation.set(0,0,0),h.current.noRotate=!1,h.current.noPan=!1,f.domElement.removeEventListener("mousedown",ml),f.domElement.removeEventListener("mousemove",Bg),f.domElement.removeEventListener("mouseup",$g),j(3),ol(),oo.current?(La(1,!0),oo.current=!1):La(1),B(!1);const ye=Ce.current.getObjectByName("targetPoint");ye&&Ce.current.remove(ye)}},[Z]),w.useEffect(()=>{ir.length>0&&Xa(!0)},[ir]);const pl=ye=>{const{positionx:Ne,positiony:We,positionz:tt}=ye;let Ct=new URL(window.location.href),$t=new URLSearchParams(Ct.search).get("atlasReslicingInfo"),bn={};$t&&(bn=JSON.parse($t)),Ar(Ne),Ht(We),Ye(tt),bn.positionX=Ne,bn.positionY=We,bn.positionZ=tt,qi.atlasReslicingInfo=bn},Zu=ye=>{br(ye)},La=(ye,Ne=!1)=>{if(Ce.current.remove(fs.current),Ti(ye),oe({}),Fe(0),Z===0&&ye=="1"?Cu("0"):Cu(ye),Ne||(ye=="7"||ye=="3"?Wb(!0):Wb(!1)),b&&(b.current=ye),ye!==2){const Br=Ce.current.getObjectByName("syrings");Br&&Ce.current.remove(Br),B(!1),Ne||yi()}if(ye==2){Ai.current.position.set(18,-10,-10),Ai.current.rotation.set(2.9896,0,0),h.current.reset(),h.current.target.set(0,0,0),h.current.object.position.set(18,-10,-10),h.current.object.up.set(0,-1,0),h.current.update(),Ai.current.updateMatrixWorld();const Br=JSON.stringify({cameraPosition:Ai.current.position,cameraRotation:Ai.current.rotation}),ca=JSON.stringify({controlsTarget:h.current.target,controlsPosition:h.current.object.position,controlsUp:h.current.object.up});let ti=new URL(window.location.href),Ni=new URLSearchParams(ti.search);Ni.set("cameraInfo",Br),Ni.set("controllerInfo",ca),ti.search=Ni.toString(),window.history.replaceState({},"",ti)}No(),li([]),ms("Config_DAPI.ini"),Oe.current=null,Xi({}),Ne||Q.current&&pe.current&&T.current&&(Q.current.removeALL(),pe.current.removeALL(),T.current.removeALL()),ye==1?E(!0):E(!1),Sr.current&&(Sr.current.textContent=a("4000.0208")||"选择靶点"),c!=null&&c.current&&(c.current=""),u.current&&(u.current=""),y.current=!1,d.current=!1;const We=Ce.current.getObjectByName("sphereBig"),tt=Ce.current.getObjectByName("sphereMiddelClick"),Ct=Ce.current.getObjectByName("dashedLine"),Jt=Ce.current.getObjectByName("Line"),$t=Ce.current.getObjectByName("transformControls"),bn=Ce.current.getObjectByName("sectionSphere"),un=Ce.current.getObjectByName("correspondingPlaneDataSwc"),cr=[];Ce.current.traverse(Br=>{Br.userData.isAtlasMapping==="true"&&cr.push(Br)}),cr.forEach(Br=>{Ce.current.remove(Br)}),un&&Ce.current.remove(un),bn&&Ce.current.remove(bn),$t&&Ce.current.remove($t),g.current=[],x.current=[],Ct&&Ce.current.remove(Ct),Jt&&Ce.current.remove(Jt),We&&Ce.current.remove(We),tt&&Ce.current.remove(tt);const Wn=Ce.current.children.filter(Br=>Br.userData.name==="registrationPng");Wn&&Ce.current.remove(...Wn),U.current=!1,L(!1);const _r=Ce.current.getObjectByName("HorizontalView"),qn=Ce.current.getObjectByName("SagittalView"),kr=Ce.current.getObjectByName("arbitrarySlice"),qr=Ce.current.getObjectByName("CoronalView");ye!=3&&(_r&&(Ce.current.remove(_r),Hn(!1)),qn&&(Ce.current.remove(qn),Tn(!1)),kr&&(Ce.current.remove(kr),gn(!1)),qr&&(Ce.current.remove(qr),mn(!1))),ye==3&&setTimeout(()=>{il(tr.current)},10),It()},Md=ye=>{r(ye),i.current=ye},bc=(ye,Ne)=>{const We=JSON.parse(JSON.stringify(ye)),tt=Ct=>{Ct.name===Ne?Ct.lineStyle.color="#000":Ct.lineStyle.color="#ccc",Ct.children&&Ct.children.forEach(Jt=>{tt(Jt)})};return tt(We),We},Nl=(ye,Ne)=>{for(let We of ye){if(We.name.toLowerCase()===Ne.toLowerCase()||We.fullname.toLowerCase()===Ne.toLowerCase())return We.name;if(We.children){const tt=Nl(We.children,Ne);if(tt)return tt}}return null},vl=()=>{y.current=!y.current,d.current=!1,m.current&&Ce.current.remove(m.current)},qs=()=>{if(Sr.current)if(Sr.current.textContent==(a("4000.0208")||"选择靶点"))Sr.current.textContent=a("4000.0242")||"清除靶点";else if(Sr.current.textContent===(a("4000.0126")||"重置"))lt(0),F.current="",Sr.current.textContent=a("4000.0208")||"选择靶点",B(!1),yi(),j(1);else{Sr.current.textContent=a("4000.0208")||"选择靶点",g.current=[],x.current=[],B(!1);const ye=Ce.current.getObjectByName("dashedLine"),Ne=Ce.current.getObjectByName("sphereBig"),We=Ce.current.getObjectByName("sphereMiddelClick"),tt=Ce.current.getObjectByName("targetPoint");ye&&Ne&&Ce.current.remove(ye,Ne),We&&Ce.current.remove(We),tt&&Ce.current.remove(tt),d.current=!1}vl()};w.useEffect(()=>{V&&Ot==0&&Ft(!0),Ot!=0&&V&&Sr&&(Sr.current.textContent=a("4000.0126")||"重置")},[V]);const yi=()=>{g.current=[],x.current=[];const ye=Ce.current.getObjectByName("dashedLine"),Ne=Ce.current.getObjectByName("sphereBig"),We=Ce.current.getObjectByName("sphereMiddelClick"),tt=Ce.current.getObjectByName("targetPoint");ye&&Ne&&Ce.current.remove(ye,Ne),We&&Ce.current.remove(We),tt&&Ce.current.remove(tt),ol(),L(!1),W.current=[],y.current=!0,d.current=!1,U.current=!1,T.current.removeALL(),m.current&&Ce.current.remove(m.current),ne(1),c!=null&&c.current&&(c.current=""),u.current&&(u.current="")},ls=(ye,Ne)=>{clearTimeout(mc.current),mc.current=setTimeout(()=>{const We=Ce.current.getObjectByName("Brain");let tt=new ka;tt.setFromAxisAngle(new me(1,0,0),Math.PI/2);let Ct=new me,Jt=new hb;if(Ne)if(We&&(Ct=Ne.position.clone().applyMatrix4(We.matrixWorld.clone().invert()).applyQuaternion(tt)),ye==1)fetch("/app-api/c-api/slicing",{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify({x:0,y:0,z:Ct.z})}).then($t=>$t.ok?$t.json():Os.error({title:$t.message})).then($t=>{const bn=$t.base64;let un=Jt.load(bn);un.center.set(.5,.5),un.rotation=Math.PI,Ne.material.map=un});else if(ye==2)fetch("/app-api/c-api/slicing",{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify({x:Ct.x,y:0,z:0})}).then($t=>$t.ok?$t.json():Os.error({title:$t.message})).then($t=>{const bn=$t.base64;let un=Jt.load(bn);const Wn=Ne.geometry.attributes.uv.array,_r=kr=>{Wn[kr+0]=1,Wn[kr+1]=0,Wn[kr+2]=1,Wn[kr+3]=1,Wn[kr+4]=0,Wn[kr+5]=0,Wn[kr+6]=0,Wn[kr+7]=1},qn=kr=>{Wn[kr+0]=1,Wn[kr+1]=1,Wn[kr+2]=1,Wn[kr+3]=0,Wn[kr+4]=0,Wn[kr+5]=1,Wn[kr+6]=0,Wn[kr+7]=0};_r(0),qn(8),Ne.geometry.attributes.uv.needsUpdate=!0,Ne.material.map=un});else if(ye==3)fetch("/app-api/c-api/slicing",{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify({x:0,y:Ct.y,z:0})}).then($t=>($t.ok,$t.json())).then($t=>{if($t.message){Os.error({content:$t.message});return}const bn=$t.base64;let un=Jt.load(bn);const Wn=Ne.geometry.attributes.uv.array;(qn=>{Wn[qn+0]=1,Wn[qn+1]=0,Wn[qn+2]=0,Wn[qn+3]=0,Wn[qn+4]=1,Wn[qn+5]=1,Wn[qn+6]=0,Wn[qn+7]=1})(24),Ne.geometry.attributes.uv.needsUpdate=!0,Ne.material.map=un});else{const $t=Ne.rotation.x/Math.PI*180,bn=Ne.rotation.y/Math.PI*180,un=Ne.rotation.z/Math.PI*180;fetch("/app-api/c-api/slicing",{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify({angles:[$t,bn,un],center:[Ct.x,Ct.y,Ct.z]})}).then(cr=>cr.ok?cr.json():Os.error({title:cr.message})).then(cr=>{const Wn=cr.base64;let _r=Jt.load(Wn);const kr=Ne.geometry.attributes.uv.array;(Br=>{kr[Br+0]=0,kr[Br+1]=0,kr[Br+2]=1,kr[Br+3]=0,kr[Br+4]=0,kr[Br+5]=1,kr[Br+6]=1,kr[Br+7]=1})(24),Ne.geometry.attributes.uv.needsUpdate=!0,Ne.material.map=_r})}},100)},rl=(ye,Ne)=>{let We,tt=0,Ct=new URL(window.location.href),$t=new URLSearchParams(Ct.search).get("atlasReslicingInfo"),bn={};$t&&(bn=JSON.parse($t)),tr.current==1?(Ce.current.children.forEach(function(un,cr){Ne==3&&un.name=="CoronalView"&&(tt=cr)}),We=new me(0,0,ye),Ce.current.children[tt].position.setZ(We.z),ls(tr.current,Ce.current.children[tt])):tr.current==2?(Ce.current.children.forEach(function(un,cr){Ne==1&&un.name=="SagittalView"&&(tt=cr)}),We=new me(ye,0,0),Ce.current.children[tt].position.setX(We.x),ls(tr.current,Ce.current.children[tt])):tr.current==3?(Ce.current.children.forEach(function(un,cr){Ne==2&&un.name=="HorizontalView"&&(tt=cr)}),We=new me(0,ye,0),Ce.current.children[tt].position.setY(We.y),ls(tr.current,Ce.current.children[tt])):tr.current==4&&(Ce.current.children.forEach(function(un,cr){un.name=="arbitrarySlice"&&(tt=cr)}),Ne==3&&(Ye(ye),bn.positionZ=ye,qi.atlasReslicingInfo=bn,We=new me($r,An,ye),Ce.current.children[tt].position.setZ(We.z)),Ne==2&&(Ht(ye),bn.positionY=ye,qi.atlasReslicingInfo=bn,We=new me(Se,ye,Se),Ce.current.children[tt].position.setY(We.y)),Ne==1&&(Ar(ye),bn.positionX=ye,qi.atlasReslicingInfo=bn,We=new me(ye,An,Se),Ce.current.children[tt].position.setX(We.x)),ls(tr.current,Ce.current.children[tt]))},Su=ye=>{let Ne=new URL(window.location.href),tt=new URLSearchParams(Ne.search).get("atlasReslicingInfo"),Ct={};tt&&(Ct=JSON.parse(tt)),tr.current==2&&(Ar(ye),Ht(-5.33),Ye(-8),rl(ye,1),Ct.positionX=ye,Ct.positionY=-5.33,Ct.positionZ=-8,qi.atlasReslicingInfo=Ct),tr.current==4&&rl(ye,1)},Wc=ye=>{let Ne=new URL(window.location.href),tt=new URLSearchParams(Ne.search).get("atlasReslicingInfo"),Ct={};tt&&(Ct=JSON.parse(tt)),tr.current==3&&(Ht(ye),Ye(-8),Ar(-5.17),Ct.positionX=-5.17,Ct.positionY=ye,Ct.positionZ=-8,qi.atlasReslicingInfo=Ct,rl(ye,2)),tr.current==4&&rl(ye,2)},Rd=ye=>{let Ne=new URL(window.location.href),tt=new URLSearchParams(Ne.search).get("atlasReslicingInfo"),Ct={};tt&&(Ct=JSON.parse(tt)),tr.current==1&&(Ye(ye),Ar(-5.17),Ht(-5.33),rl(ye,3),Ct.positionX=-5.17,Ct.positionY=-5.33,Ct.positionZ=ye,qi.atlasReslicingInfo=Ct),tr.current==4&&rl(ye,3)},xc=(ye,Ne)=>{let We=0,tt=new URL(window.location.href),Jt=new URLSearchParams(tt.search).get("atlasReslicingInfo"),$t={};Jt&&($t=JSON.parse(Jt)),Ce.current.children.forEach(function(_r,qn){_r.name=="arbitrarySlice"&&(We=qn)});let bn=Ce.current.children[We];bn.rotation.set(bn.userData.initRotation.x,bn.userData.initRotation.y,bn.userData.initRotation.z);let un=0,cr=0,Wn=0;Ne==1&&(cn(ye),$t.angleX=ye,qi.atlasReslicingInfo=$t,un=ye*Math.PI/180,cr=xn*Math.PI/180,Wn=Xn*Math.PI/180),Ne==2&&(pn(ye),$t.angleY=ye,qi.atlasReslicingInfo=$t,un=on*Math.PI/180,cr=ye*Math.PI/180,Wn=Xn*Math.PI/180),Ne==3&&(zn(ye),$t.angleZ=ye,qi.atlasReslicingInfo=$t,un=on*Math.PI/180,cr=xn*Math.PI/180,Wn=ye*Math.PI/180),bn.rotation.x=un,bn.rotation.y=cr,bn.rotation.z=Wn,Ce.current.children.forEach(function(_r,qn){_r.name=="arbitrarySlice"&&(We=qn)}),ls(tr.current,Ce.current.children[We])},Ku=(ye,Ne=!1)=>{let We;const tt=ye||o;if(tr.current==4||Ne)setTimeout(()=>{let Ct="atlas.brainsmatics.org",Jt=[],$t=parseInt(((Se+8)/14*14e3).toString()),bn=parseInt(((An+5.33)/7.37*9e3).toString());Ne?(Jt[0]=90+ai.angles[0],Jt[1]=ai.angles[1],Jt[2]=ai.angles[2],$t=ai.tx*14e3,bn=450):(Jt[0]=on,Jt[1]=xn,Jt[2]=Xn);let un=parseInt((($r+5.17)/10.34*11400).toString()),cr=Pe||"http://"+Ct,Wn="http://"+Ct+'/program/frontend/#!{"dimensions":{"x":[0.000001,"m"],"y":[0.000001,"m"],"z":[0.000001,"m"]},"position":['+un+","+bn+","+$t+'],"crossSectionOrientation":[0.7071067690849304,0,0,-0.7071067690849304],"crossSectionScale":19.05662684586283,"projectionOrientation":[0.10079027712345123,0.01086505874991417,-0.5527856945991516,-0.827134370803833],"projectionScale":74319.80669416502,"projectionDepth":-49.99956451007631,"layers":[{"type":"image","source":{"url":"precomputed://'+cr+'/data/RGB_raw","transform":{"outputDimensions":{"x":[0.000001,"m"],"y":[0.000001,"m"],"z":[0.000001,"m"],"c^":[1,""]},"inputDimensions":{"x":[0.000001,"m"],"y":[0.000001,"m"],"z":[0.000001,"m"],"c^":[1,""]}}},"tab":"rendering","shader":"#uicontrol invlerp normalized\\nvoid main() {\\n emitRGB(vec3(toNormalized(getDataValue(0)),\\n toNormalized(getDataValue(1)),\\n toNormalized(getDataValue(2))));\\n}\\n","channelDimensions":{"c^":[1,""]},"name":"raw"},{"type":"segmentation","source":{"url":"precomputed://'+cr+'/data/seg_half","transform":{"outputDimensions":{"x":[0.000001,"m"],"y":[0.000001,"m"],"z":[0.000001,"m"]},"inputDimensions":{"x":[0.00001,"m"],"y":[0.00001,"m"],"z":[0.00001,"m"]}}},"tab":"segments","segments":["10","100","1000","1002","1004","1005","1006","1007","1008","1009","1010","1011","1012","1013","1014","1015","1016","1017","1018","1019","1020","1021","1022","1023","1024","1025","1026","1100","104","105","106","107","108","11","110","111","112","113","114","115","117","118","119","12","120","122","123","124","125","126","129","13","130","131","134","138","14","141","142","143","146","147","149","15","150","152","154","156","159","16","160","162","164","165","166","167","168","170","172","173","174","176","177","178","179","18","180","181","182","183","186","189","19","190","192","193","194","195","196","199","2","20","201","202","203","204","206","207","208","21","212","215","216","217","219","22","220","221","223","224","225","228","229","23","230","231","232","234","235","236","237","238","239","24","241","242","243","245","246","247","248","25","250","251","253","254","256","257","259","26","260","265","266","267","268","27","271","272","273","275","276","279","28","280","282","283","284","287","29","291","293","294","295","296","297","298","3","30","300","303","304","305","306","31","311","312","313","315","319","32","320","321","322","323","324","325","326","329","33","330","331","332","333","335","336","337","338","34","340","341","342","343","344","347","348","349","35","350","351","352","354","355","356","357","359","36","361","362","365","366","367","368","369","37","371","372","373","374","375","376","377","378","38","380","385","386","387","389","39","390","391","392","393","394","395","397","399","4","40","401","402","405","407","409","41","412","413","414","415","416","417","419","42","422","423","424","426","427","428","43","430","432","435","438","439","44","440","441","442","443","444","445","446","449","45","450","451","452","453","454","456","458","459","46","460","461","462","463","464","465","466","467","47","470","473","474","475","476","478","479","48","480","481","484","485","486","487","488","49","490","491","493","494","497","498","499","5","50","500","501","503","504","505","507","508","51","510","511","512","513","514","516","517","518","519","52","520","528","529","53","533","535","536","537","538","539","54","540","541","542","544","545","546","548","549","55","550","553","554","555","556","557","559","56","561","562","563","565","568","57","570","571","572","573","574","575","576","578","579","58","581","582","584","586","59","591","593","594","595","597","599","6","60","601","602","604","606","61","611","612","613","614","615","616","617","618","619","62","620","621","622","623","624","625","627","628","629","63","631","632","635","637","638","639","64","641","642","643","644","645","646","647","648","65","650","652","653","656","657","658","660","661","662","665","666","667","67","671","672","673","674","677","678","679","68","680","681","682","683","684","686","687","688","690","693","695","696","697","698","699","7","701","702","704","706","707","708","709","710","711","712","713","716","717","72","720","721","722","724","725","727","729","731","733","734","735","736","737","74","740","744","746","748","749","750","752","754","755","757","758","759","76","760","762","763","764","765","767","768","769","770","771","772","773","774","775","776","778","779","78","780","783","784","785","787","789","790","791","793","796","797","798","799","8","80","803","804","808","809","81","810","812","816","818","819","82","821","823","824","826","827","829","83","830","831","832","834","835","837","839","84","840","841","842","843","844","846","849","850","851","855","856","857","858","86","861","863","864","865","867","868","869","87","870","871","872","874","875","876","877","878","879","88","880","881","883","885","888","889","89","892","893","894","895","896","898","899","9","90","901","902","906","908","909","91","911","913","915","916","917","919","92","920","921","925","926","927","928","929","93","931","934","935","936","937","938","940","941","942","944","945","946","951","953","954","955","956","957","959","96","963","964","965","966","969","97","970","971","972","973","977","978","980","981","982","983","989","99","991","992","993","995","996","997","998","999"],"segmentQuery":"<id","segmentColors":{"2":"#777b7b","3":"#777979","4":"#848989","5":"#8e9494","6":"#8c9191","7":"#778383","8":"#778181","9":"#93a2a2","10":"#5e6767","11":"#93c1c1","12":"#6b7474","13":"#93c0c0","14":"#8eacac","15":"#727979","16":"#91afaf","18":"#93b4b4","19":"#729c9c","20":"#212d2d","21":"#304242","22":"#2d3e3e","23":"#2b3232","24":"#1e2929","25":"#707676","26":"#7c8383","27":"#89bbbb","28":"#608383","29":"#7c9d9d","30":"#777d7d","31":"#7a8080","32":"#778080","33":"#7f8585","34":"#6d8a8a","35":"#829d9d","36":"#545d5d","37":"#93a4a4","38":"#4c5454","39":"#474f4f","40":"#8cbebe","41":"#7a9a9a","42":"#93b8b8","43":"#84a0a0","44":"#93a1a1","45":"#93baba","46":"#84b4b4","47":"#6d9595","48":"#82b0b0","49":"#6b9191","50":"#7fadad","51":"#87a3a3","52":"#636c6c","53":"#596363","54":"#334545","55":"#2b3b3b","56":"#666f6f","57":"#476161","58":"#939898","59":"#637e7e","60":"#7aa0a0","61":"#7fa5a5","62":"#444d4d","63":"#f2bb3a","64":"#77d1ff","65":"#3ddeff","67":"#2cc15e","68":"#ffd877","72":"#ffbfad","74":"#e5d60b","76":"#40c3dd","78":"#f7e1af","80":"#3bdddd","81":"#a0dfff","82":"#d67259","83":"#ffab93","84":"#f2c04b","86":"#91503f","87":"#3cabc1","88":"#3db4cc","89":"#f7d585","90":"#723f32","91":"#ffb49e","92":"#f4cf53","93":"#ffbf0f","96":"#f2dca7","97":"#e2d92f","99":"#f4d05a","100":"#399eb2","104":"#4dcc77","105":"#f7da96","106":"#d35dac","107":"#ffd15e","108":"#3cd1d1","110":"#55ccb8","111":"#3aa2b7","112":"#bc782f","113":"#8cccc1","114":"#f7d68a","115":"#82ccbf","117":"#6acc8a","118":"#b2af07","119":"#ffd044","120":"#75d1ff","122":"#ef8064","123":"#37dbfc","124":"#c6499d","125":"#66cbff","126":"#ffc32d","129":"#66ccbb","130":"#f7dea3","131":"#fc957b","134":"#ffb5a0","138":"#84493a","141":"#8accc1","142":"#e5d609","143":"#45d9f7","146":"#d8cb17","147":"#f2dca4","149":"#d1ca06","150":"#ce8333","152":"#67afa3","154":"#f2bd43","156":"#ffcf3f","159":"#f79279","160":"#f29d43","162":"#e5d604","164":"#b2af01","165":"#75e5e5","166":"#ffc83f","167":"#ffbdaa","168":"#74c4ed","170":"#ccc50c","172":"#ffa78e","173":"#42cae5","174":"#a2dcf9","176":"#af702b","177":"#965342","178":"#f4bc04","179":"#51cc7a","180":"#d68733","181":"#3ac4e0","182":"#ffc021","183":"#f7d483","186":"#f2dda9","189":"#3eb766","190":"#72ccbd","192":"#f4927a","193":"#f7dc9e","194":"#d1ca04","195":"#fc976c","196":"#fc67ca","199":"#52e5e5","201":"#ffd366","202":"#ffca2d","203":"#ed9436","204":"#ffe7a0","206":"#74ccbd","207":"#33cc66","208":"#36d9f9","212":"#71e2e2","215":"#edd39c","216":"#d38634","217":"#ed9b44","219":"#ccc345","220":"#60e5e5","221":"#c96b54","223":"#ccc62a","224":"#34d0ef","225":"#ffd454","228":"#ea9a44","229":"#f4cf55","230":"#3bcece","231":"#a85c4a","232":"#ffad96","234":"#ffd97a","235":"#ffda7f","236":"#ffc61c","237":"#c6c00d","238":"#f2b935","239":"#ffc107","241":"#ffdf89","242":"#64e5e5","243":"#edca80","245":"#ccc863","246":"#ea7d62","247":"#c9489e","248":"#3fdbdb","250":"#edd5a3","251":"#2bc45e","253":"#ffca44","254":"#f7d380","256":"#ffc832","257":"#f7e0aa","259":"#ffd351","260":"#6bb6db","265":"#d8cb15","266":"#37cc68","267":"#378c9e","268":"#38c9b1","271":"#6bbaad","272":"#39c2dd","273":"#ffc32b","275":"#37ccb3","276":"#3fc1db","279":"#eab94f","280":"#eab84b","282":"#d37158","283":"#38c4c4","284":"#ffdb82","287":"#f7d588","291":"#f9be48","293":"#f49369","294":"#d149a3","295":"#f4cc49","296":"#63a096","297":"#ffe69e","298":"#ff9b70","300":"#f7a27e","303":"#f7a042","304":"#ccc241","305":"#88ccc0","306":"#eaba52","311":"#34ceed","312":"#d8cc1e","313":"#91daff","315":"#f9c04d","319":"#ff996d","320":"#4be5e5","321":"#ffcdbf","322":"#ddd75a","323":"#ffd263","324":"#e0785e","325":"#70e0e0","326":"#ffcf42","329":"#a4defc","330":"#69b2a6","331":"#67a1bf","332":"#57cc7e","333":"#ffbf11","335":"#ea8e77","336":"#ffc73a","337":"#76c9f2","338":"#7f4638","340":"#c16953","341":"#46defc","342":"#f7e1ad","343":"#68aed1","344":"#ff9367","347":"#c4be0d","348":"#6ab7aa","349":"#ffb805","350":"#639bb7","351":"#38bcff","352":"#ed63bf","354":"#f2bc3e","355":"#ffd154","356":"#f2da9d","357":"#e5d606","359":"#9bddff","361":"#ffc311","362":"#ffbb11","365":"#ffa58e","366":"#ffbe1c","367":"#ffb807","368":"#34c8e5","369":"#c1bb0d","371":"#ffbe0c","372":"#a3e0ff","373":"#774234","374":"#3995a8","375":"#d849a9","376":"#3daf63","377":"#ffe8a3","378":"#41cc6f","380":"#ffc823","385":"#ccc751","386":"#5bcc81","387":"#ccc85f","389":"#41bfd8","390":"#36bca6","391":"#edce8b","392":"#54e5e5","393":"#3baa60","394":"#36a9e2","395":"#ef9637","397":"#ffc72d","399":"#68a89d","401":"#ffcc4c","402":"#fc50c3","405":"#3a9aad","407":"#d17057","409":"#77e5e5","412":"#7ee5e5","413":"#b2af05","414":"#67acce","415":"#f2bf48","416":"#c66c55","417":"#5fccb9","419":"#69bfb0","422":"#f265c3","423":"#ffb90a","424":"#41bf6b","426":"#e861bb","427":"#56c6ff","428":"#80ccbf","430":"#389e5a","432":"#ffda7c","435":"#53ccb7","438":"#57e5e5","439":"#f9c252","440":"#ffc416","441":"#ffd259","442":"#6cccbc","443":"#ffa991","444":"#74c4ef","445":"#eadf07","446":"#ffc023","449":"#f7e3b4","450":"#4fcc79","451":"#ffb6a0","452":"#f99c39","453":"#75caf4","454":"#a55b48","456":"#99dcff","458":"#ff976b","459":"#3fcc6e","460":"#ffbd19","461":"#ccc62c","462":"#35d4f4","463":"#76ccbd","464":"#ffd04f","465":"#ccc861","466":"#3aa35d","467":"#ba7b37","470":"#ffe08c","473":"#ff916d","474":"#37bfa8","475":"#efab0b","476":"#ffa187","478":"#66a59b","479":"#efa802","480":"#754033","481":"#ccc859","484":"#6accbb","485":"#3cad62","486":"#f79b38","487":"#b2af08","488":"#f4cb44","490":"#edcf90","491":"#ffcc35","493":"#ccc855","494":"#43cc70","497":"#ea9335","498":"#44e5e5","499":"#edcc84","500":"#ffa791","501":"#39a0b5","503":"#c9c30c","504":"#ffa389","505":"#ffc430","507":"#f9a47f","508":"#63ccba","510":"#f2dfae","511":"#ffd56b","512":"#a35a47","513":"#e89843","514":"#ffd7cc","516":"#5be5e5","517":"#6bc689","518":"#ffc20c","519":"#ccc85d","520":"#3db6ce","528":"#f2da9f","529":"#ffd051","533":"#35cc67","535":"#dd765d","536":"#39a05c","537":"#f2be46","538":"#3fbad3","539":"#77cef9","540":"#3dbeff","541":"#ed9078","542":"#c14799","544":"#9b5544","545":"#8c4d3d","546":"#ffc10a","548":"#f4be0c","549":"#f7e2b2","550":"#3fbfff","553":"#edd49e","554":"#bf6852","555":"#55cc7d","556":"#368a9b","557":"#bc6651","559":"#ffcd4f","561":"#35cae8","562":"#efa907","563":"#ccc347","565":"#3dd3d3","568":"#59ccb8","570":"#ffce54","571":"#39c0db","572":"#e2da31","573":"#f2bb3c","574":"#93dbff","575":"#824739","576":"#e89135","578":"#82e5e5","579":"#68ccff","581":"#ffd256","582":"#ffdf87","584":"#45dbf9","586":"#e08d35","591":"#ffbc05","593":"#ff906b","594":"#84d6ff","595":"#41c16c","597":"#f24fbc","599":"#ddd75f","601":"#ffe18e","602":"#7be5e5","604":"#36c1aa","606":"#ff8e68","611":"#368ea0","612":"#5bc8ff","613":"#79e5e5","614":"#3ba55f","615":"#a5e1ff","616":"#d64aa7","617":"#ffc61e","618":"#3de5e5","619":"#e24ab0","620":"#c6833b","621":"#edcb82","622":"#59c7ff","623":"#3db565","624":"#f9bb3e","625":"#2bbc5b","627":"#ffcb30","628":"#f9a143","629":"#ffc228","631":"#edcd89","632":"#d8cc1c","635":"#efac0e","637":"#7fd4ff","638":"#35d2f2","639":"#ffcd3a","641":"#ffd9ce","642":"#ffbf1e","643":"#eab84d","644":"#ffc9ba","645":"#41ccb4","646":"#f9ba3b","647":"#cec80c","648":"#f4bd09","650":"#3cb1c9","652":"#ffc528","653":"#ce4aa2","656":"#f4bd07","657":"#5dad78","658":"#ff8c66","660":"#ffbba8","661":"#79d0fc","662":"#ffd559","665":"#ffe69b","666":"#ffd456","667":"#ffca47","671":"#f9c14f","672":"#7a4335","673":"#ffbd0a","674":"#ffde84","677":"#f4ca3f","678":"#659fbc","679":"#3ba5ba","680":"#ffa787","681":"#e87c61","682":"#e8a310","683":"#ffc730","684":"#f9bd45","686":"#ba4693","687":"#ba762e","688":"#eade02","690":"#fc9d37","693":"#e8a412","695":"#eadf04","696":"#f4c93d","697":"#ed7f63","698":"#efaa09","699":"#ffcfc1","701":"#ccc349","702":"#ed4eb8","704":"#ffd35b","706":"#2cc960","707":"#d85fb0","708":"#f4c835","709":"#935141","710":"#3fccb4","711":"#ffce3d","712":"#c46a54","713":"#41c5e0","716":"#8cd8ff","717":"#f765c6","720":"#38bed8","721":"#b2af00","722":"#2bbf5d","724":"#b74792","725":"#f2ba37","727":"#37c6af","729":"#f4cd4b","731":"#3fdfff","733":"#67bcae","734":"#43cce8","735":"#49c2ff","736":"#3bcccc","737":"#f2d896","740":"#f4c93a","744":"#edd5a1","746":"#ffc3b2","748":"#4fbff7","749":"#f2d99b","750":"#3cadc4","752":"#84ccc0","754":"#c67e31","755":"#f4cc46","757":"#f29179","758":"#379b59","759":"#ffa382","760":"#f2deab","762":"#ffe8a5","763":"#ddd75d","764":"#bf792f","765":"#f4bc02","767":"#42c0ff","768":"#e58d77","769":"#ffc535","770":"#62e5e5","771":"#5dcc82","772":"#3ca7bc","773":"#f4d15d","774":"#ffc519","775":"#e84cb4","776":"#45cc72","778":"#6cb8dd","779":"#dd8c35","780":"#edd093","783":"#ffc532","784":"#ffb9a5","785":"#ffd65b","787":"#3dccb4","789":"#80e5e5","790":"#649dba","791":"#f49f44","793":"#67afd3","796":"#40e5e5","797":"#f7dda0","798":"#47ccb5","799":"#ccc857","803":"#45ccb5","804":"#ffbd07","808":"#b2458e","809":"#dd4bad","810":"#a8e2ff","812":"#ffa37c","816":"#40bc69","818":"#6eccbc","819":"#68b1d6","821":"#d88934","823":"#44d7f4","824":"#cc5ba6","826":"#4fc4ff","827":"#3ed6d6","829":"#eabb54","830":"#f9b939","831":"#ffc005","832":"#ffd775","834":"#d18534","835":"#ffd260","837":"#c47d31","839":"#39bfbf","840":"#ffcd51","841":"#ffdd82","842":"#bf4897","843":"#e5d602","844":"#49e5e5","846":"#f74fbf","849":"#e88d76","850":"#f4a07c","851":"#ffaf99","855":"#ffc928","856":"#63cbff","857":"#f4d058","858":"#c45aa1","861":"#30cc64","863":"#c95ca5","864":"#ffd059","865":"#47cc73","867":"#f9b834","868":"#edc97b","869":"#ffca2b","870":"#f4c838","871":"#ffc942","872":"#3cb263","874":"#ffb29b","875":"#ffbd16","876":"#f2d898","877":"#ccc62e","878":"#ffd468","879":"#ccc243","880":"#e25fb7","881":"#ffd1c4","883":"#f9937a","885":"#f29837","888":"#e2da34","889":"#379957","892":"#e2795f","893":"#5faf79","894":"#ffc721","895":"#ffc30f","896":"#65a398","898":"#efa904","899":"#4fccb7","901":"#2bc65f","902":"#ffc83d","906":"#5bccb9","908":"#eab748","909":"#ffb39e","911":"#8e4e3e","913":"#ff9f84","915":"#89d7ff","916":"#edd29a","917":"#6ccc8c","919":"#f2c04d","920":"#3dcc6c","921":"#44d1ed","925":"#ce6e56","926":"#d15eaa","927":"#e59744","928":"#fca580","929":"#39c6c6","931":"#6cc98b","934":"#41c8e2","935":"#6bcdff","936":"#ffd147","937":"#874a3b","938":"#5ec9ff","940":"#f49938","941":"#3fba68","942":"#e060b5","944":"#edc97d","945":"#7cccbe","946":"#5caa76","951":"#a05846","953":"#ffc1af","954":"#ffa57f","955":"#ffa58c","956":"#ffc62b","957":"#ffcf56","959":"#50c3fc","963":"#f7dfa8","964":"#db755c","965":"#82d5ff","966":"#ffd34f","969":"#3db0c6","970":"#38bcbc","971":"#54e2ff","972":"#44c0ff","973":"#f7db99","977":"#ffc5b5","978":"#ffba0c","980":"#ffbb0f","981":"#cc8233","982":"#ccc23f","983":"#ffcc32","989":"#ffc935","991":"#db8a34","992":"#ffa584","993":"#f9bd43","995":"#edcf8e","996":"#37baba","997":"#66aacc","998":"#43ccb5","999":"#3eb8d1","1000":"#db5eb1","1002":"#3de2e2","1004":"#37ade8","1005":"#36c4ac","1006":"#d8cc1a","1007":"#54c6ff","1008":"#aa5e4b","1009":"#ef8f77","1010":"#4fc1f9","1011":"#1c2626","1012":"#a5e1ff","1013":"#a5e1ff","1014":"#a5e1ff","1015":"#a5e1ff","1016":"#47cc74","1017":"#47cc75","1018":"#47cc76","1019":"#47cc77","1020":"#47cc78","1021":"#f99c40","1022":"#f99c41","1023":"#ff9368","1024":"#8b51ff","1025":"#8d54ff","1026":"#894fff","1100":"#3ce0e0"},"name":"seg2"}],"showDefaultAnnotations":false,"sliceAngleRotaX":"'+Jt[0]+'","sliceAngleRotaY":"'+Jt[1]+'","sliceAngleRotaZ":"'+Jt[2]+'","selectedLayer":{"visible":true,"layer":"seg2"},"crossSectionBackgroundColor":"#ffffff","projectionBackgroundColor":"#ffffff","layout":"hzkdPanel"}';window.open(Wn,"_blank")},300);else if(tr.current==1)We=parseInt(((Se+8)/13.9919970598834*700).toString()),window.open("http://"+Mo.current+"/STAM/reference/index.html?lang=en_us&3Dname="+tt+"&inp="+We+"§ion=coronal");else if(tr.current==2){let Ct=$r;$r<0&&(Ct=-$r),We=parseInt((Ct/5.17*256).toString()),$r==0&&(We=1),window.open("http://"+Mo.current+"/STAM/reference/index.html?lang=en_us&3Dname="+tt+"&inp="+We+"§ion=sagittal")}else tr.current==3&&(We=parseInt(((An+5.33)/7.37*367).toString()),window.open("http://"+Mo.current+"/STAM/reference/index.html?lang=en_us&3Dname="+tt+"&inp="+We+"§ion=horizontal"))},Jl=(ye,Ne,We,tt,Ct,Jt,$t,bn,un,cr,Wn)=>{let _r=new URL(window.location.href),kr=new URLSearchParams(_r.search).get("atlasReslicingInfo"),qr={};kr&&(qr=JSON.parse(kr)),qr.angleX=ye,qr.angleY=Ne,qr.angleZ=We,qr.positionZ=Jt,qr.positionX=tt,qr.positionY=Ct,qr.translateX=$t,qr.translateY=bn,qr.translateZ=un,qr.ButtonDisabled=Wn,qr.rotate=cr,qr.direction1=tr.current,qi.atlasReslicingInfo=qr,cn(ye),pn(Ne),zn(We),Ye(Jt),Ar(tt),Ht(Ct),Je($t),wt(bn),Bt(un),Zt(cr),Ln(Wn)},il=ye=>{Ce.current.remove(fs.current);const Ne=fs.current.position;let We=ye;if(ql(We),We==1){je.current.enabled=!1,Ce.current.remove(je.current),Vs(0),tr.current=1,Jl(90,0,0,-5.17,-5.33,Ne.z,!0,!0,!1,!0,!1);const tt=Ce.current.getObjectByName("HorizontalView"),Ct=Ce.current.getObjectByName("SagittalView"),Jt=Ce.current.getObjectByName("arbitrarySlice"),$t=Ce.current.getObjectByName("CoronalView");tt&&(tt.position.y=Ne.y,Ce.current.remove(tt),Hn(!1)),Ct&&(Ct.position.x=Ne.x,Ce.current.remove(Ct),Tn(!1)),Jt&&(Jt.position.set(Ne.x,Ne.y,Ne.z),Ce.current.remove(Jt),gn(!1)),$t?($t.position.z=Ne.z,Ce.current.remove($t),mn(!1)):mn(!0)}else if(We==2){Vs(0),je.current.enabled=!1,Ce.current.remove(je.current),Jl(90,270,0,Ne.x,-5.33,-8,!1,!0,!0,!0,!1),tr.current=2;const tt=Ce.current.getObjectByName("HorizontalView"),Ct=Ce.current.getObjectByName("SagittalView"),Jt=Ce.current.getObjectByName("arbitrarySlice"),$t=Ce.current.getObjectByName("CoronalView");Ct?(Ct.position.x=Ne.x,Ce.current.remove(Ct),Tn(!1)):Tn(!0),tt&&(tt.position.y=Ne.y,Ce.current.remove(tt),Hn(!1)),$t&&($t.position.z=Ne.z,Ce.current.remove($t),mn(!1)),Jt&&(Jt.position.set(Ne.x,Ne.y,Ne.z),Ce.current.remove(Jt),gn(!1))}else if(We==3){je.current.enabled=!1,Ce.current.remove(je.current),Jl(360,0,0,-5.17,Ne.y,-8,!0,!1,!0,!0,!1),tr.current=3,Vs(0);const tt=Ce.current.getObjectByName("HorizontalView"),Ct=Ce.current.getObjectByName("SagittalView"),Jt=Ce.current.getObjectByName("arbitrarySlice"),$t=Ce.current.getObjectByName("CoronalView");Ct&&(Ct.position.x=Ne.x,Ce.current.remove(Ct),Tn(!1)),$t&&($t.position.z=Ne.z,Ce.current.remove($t),mn(!1)),Jt&&(Jt.position.set(Ne.x,Ne.y,Ne.z),Ce.current.remove(Jt),gn(!1)),tt?(tt.position.y=Ne.y,Ce.current.remove(tt),Hn(!1)):Hn(!0)}else if(We==4){tr.current=4,Ce.current.remove(je.current),Jl(120,320,270,Ne.x,Ne.y,Ne.z,!1,!1,!1,!1,!1);const tt=Ce.current.getObjectByName("HorizontalView"),Ct=Ce.current.getObjectByName("SagittalView"),Jt=Ce.current.getObjectByName("arbitrarySlice"),$t=Ce.current.getObjectByName("CoronalView");Ct&&(Ct.position.x=Ne.x,Ce.current.remove(Ct),Tn(!1)),$t&&($t.position.z=Ne.z,Ce.current.remove($t),mn(!1)),tt&&(tt.position.y=Ne.y,Ce.current.remove(tt),Hn(!1)),Jt?(Jt.position.set(Ne.x,Ne.y,Ne.z),Ce.current.remove(Jt),gn(!1)):gn(!0)}},jc=ye=>{var Ne=LT(ye,Re);if(M.includes(ye)){T.current.removeFBX(ye,!0);const We=T.current.checkedKeys.current.findIndex($t=>$t===ye);We>-1&&T.current.checkedKeys.current.splice(We,1),q(T.current.checkedKeys.current);let tt=new URL(window.location.href),Ct=new URLSearchParams(tt.search);const Jt=JSON.stringify(T.current.checkedKeys.current);Ct.set("regionsChecked",Jt),tt.search=Ct.toString(),window.history.replaceState({},"",tt),T&&T.current.checkedKeys.current.length==0?T.current.setExpandedKeys(T.current.defexpandedKeys.current):Ne.forEach($t=>{T.current.setExpandedKeys(bn=>bn.filter(un=>un!==$t))})}else if(ye){let We=ye.replace("/","_");const tt=T.current.fetchColor(ye);let Ct=n+"/data/FBX/"+We+".FBX";qh(Ct,ye,tt,.8,0,"FBX"),T.current.checkedKeys.current.push(ye);const Jt=Array.from(new Set([...T.current.expandedKeys,...Ne]));T.current.setExpandedKeys(Jt),q(T.current.checkedKeys.current);let $t=new URL(window.location.href),bn=new URLSearchParams($t.search);const un=JSON.stringify(T.current.checkedKeys.current);bn.set("regionsChecked",un),$t.search=bn.toString(),window.history.replaceState({},"",$t)}Zn({})},Xc=ye=>{var We;if(M.includes(ye)){T.current.removeFBX(ye,!0);const tt=T.current.checkedKeys.current.findIndex(bn=>bn===ye);tt>-1&&T.current.checkedKeys.current.splice(tt,1),q(T.current.checkedKeys.current);let Ct=new URL(window.location.href),Jt=new URLSearchParams(Ct.search);const $t=JSON.stringify(T.current.checkedKeys.current);Jt.set("regionsChecked",$t),Ct.search=Jt.toString(),window.history.replaceState({},"",Ct)}else if(ye){const tt=T.current.fetchColor(ye.replace("_","/"));let Ct=n+"/data/FBX/"+ye.replace("/","_")+".FBX";qh(Ct,ye,tt,.8,0),T.current.checkedKeys.current.push(ye),q(T.current.checkedKeys.current);let Jt=new URL(window.location.href),$t=new URLSearchParams(Jt.search);const bn=JSON.stringify(T.current.checkedKeys.current);$t.set("regionsChecked",bn),Jt.search=$t.toString(),window.history.replaceState({},"",Jt)}const Ne=W.current.findIndex(tt=>tt===ye);Ne>-1?W.current.splice(Ne,1):W.current.push(ye),(We=f.domElement)==null||We.addEventListener("mousemove",re.current,!1)},Yu=ye=>{if(ye in pe.current.neurons_line.current){pe.current.removeSWCAll(ye),pe.current.setCheckItems(Ct=>Ct.filter(Jt=>Jt!==ye)),pe.current.setPathOpen(Ct=>Ct.filter(Jt=>Jt!==ye));let Ne=new URL(window.location.href),We=new URLSearchParams(Ne.search);const tt=JSON.stringify(pe.current.checkItems.filter(Ct=>Ct!==ye));if(We.set("neuronsChecked",tt),Ne.search=We.toString(),window.history.replaceState({},"",Ne),ye in se.current){for(let Ct in se.current[ye])Ce.current.remove(se.current[ye][Ct]);delete se.current[ye]}}},Zc=()=>{if(!Ei.current){zr(!0);return}const ye=document.createElement("a");ye.href=n+"/zip/9.8.label.zip",ye.download="9.8.label.zip",ye.click()},al=(ye,Ne)=>{for(let We of ye){if(We.name.toLowerCase()===Ne.toLowerCase())return{color:We.color,path:We.path,fullname:We.fullname};if(We.children){const tt=al(We.children,Ne);if(tt)return tt}}return null},Sc=(ye,Ne)=>{for(let We of ye){if(We.name.toLowerCase()===Ne.toLowerCase()&&!We.children)return{color:We.color,path:We.path};if(We.children){const tt=Sc(We.children,Ne);if(tt)return tt}}return null},Kc=(ye,Ne)=>{const We=[];for(const tt in ye)ye[tt].includes(Ne)&&We.push(tt);return We},Eu=(ye,Ne=[])=>{if(Array.isArray(ye))for(let We of ye)Eu(We,Ne);if(typeof ye=="object")if(ye.hasOwnProperty("children"))Eu(ye.children,Ne);else return ye.name&&Ne.push(ye.name),ye.name},Ec=(ye,Ne,We=[])=>{if(Array.isArray(ye))for(let tt of ye)Ec(tt,Ne,We);typeof ye=="object"&&(ye.hasOwnProperty("children")&&Ec(ye.children,Ne,We),ye.name===Ne&&(ye.hasOwnProperty("children")?Eu(ye.children,We):ye.name&&We.push(ye.name)))},Yc=ye=>{if(ye in Q.current.vesselObj.current){Q.current.setCheckItems(Ct=>Ct.filter(Jt=>Jt!==ye)),Q.current.removeVessel(ye);let Ne=new URL(window.location.href),We=new URLSearchParams(Ne.search);const tt=JSON.stringify(Q.current.checkItems.filter(Ct=>Ct!==ye));We.set("vesselsChecked",tt),Ne.search=We.toString(),window.history.replaceState({},"",Ne)}},Ql=ye=>()=>{mo(ye),we(ye)};function qc(ye,Ne){return[...new Set([...ye,...Ne])]}const qu=ye=>{const Ne=[],We=[];if(Q.current&&T.current){const tt=Q.current,Ct=T.current;Ec(tt.treeDatas,ye,Ne);const Jt=xs.current.indexOf(ye);if(Jt!==-1){xs.current.splice(Jt,1),Ne.forEach(Wn=>{We.push(Kc(fo,Wn))});const $t=We.reduce((Wn,_r)=>qc(Wn,_r),[]);let bn=M;$t.forEach(Wn=>{Sc(Ct.treeDatas,Wn)!=null&&(bn=bn.filter(qn=>qn!==Wn),Ct.removeFBX(Wn,!0))}),q(bn);let un=new URL(window.location.href),cr=new URLSearchParams(un.search);cr.set("regionsChecked",JSON.stringify(bn)),un.search=cr.toString(),window.history.replaceState({},"",un),xs.current.length===0&&Ct.setExpandedKeys(Ct.defexpandedKeys.current)}else{xs.current.push(ye),Ne.forEach(_r=>{We.push(Kc(fo,_r))});const $t=We.reduce((_r,qn)=>qc(_r,qn),[]),bn=Array.from(new Set([...Ct.expandedKeys,...$t]));Ct.setExpandedKeys(bn);let un=[...M];$t.forEach(_r=>{const qn=Sc(Ct.treeDatas,_r);if(qn!=null){const kr=`${n}/data/FBX/${_r}.FBX`;un.push(_r),Ct.LoadFBX(kr,_r,qn.color,.8,0)}}),q(un);let cr=new URL(window.location.href),Wn=new URLSearchParams(cr.search);Wn.set("regionsChecked",JSON.stringify(un)),cr.search=Wn.toString(),window.history.replaceState({},"",cr)}}},ec=(ye,Ne)=>{for(let We in ye)if(ye[We].name===Ne){if(ye[We]["2D"])return Ne;{const tt=Tc(Ne,Or);return ec(Or,tt)}}else if(ye[We].children){const tt=ec(ye[We].children,Ne);if(tt)return tt}return null},Cc=w.useMemo(()=>(Kn==3||Kn==4)&&!(G||le)?[Kn==3&&Pl!=1?{key:"3",label:w.createElement("a",{target:"_blank",style:{width:"150px",textAlign:"center"},onClick:ye=>{il(1),J(!0)}},a("5000.6025")||"切换到冠状面")}:null,Kn==3&&Pl!=2?{key:"4",label:w.createElement("a",{target:"_blank",style:{width:"150px",textAlign:"center"},onClick:ye=>{il(2),J(!0)}},a("5000.6026")||"切换到矢状面")}:null,Kn==3&&Pl!=3?{key:"5",label:w.createElement("a",{target:"_blank",style:{width:"150px",textAlign:"center"},onClick:ye=>{il(3),J(!0)}},a("5000.6027")||"切换到水平面")}:null,Kn==3&&Pl!=4?{key:"6",label:w.createElement("a",{target:"_blank",style:{width:"150px",textAlign:"center"},onClick:ye=>{il(4),J(!0)}},a("5000.6028")||"切换到任意面")}:null,ue.brains?{key:"1",label:w.createElement("a",{target:"_blank",type:"primary",onClick:()=>{Ku(ue.brains,Kn==4),J(!0)}},a("5000.6018")||"查看更高分辨率图像")}:null,ue.brains?{key:"2",label:w.createElement("a",{target:"_blank",onClick:()=>{jc(ue.brains),J(!0)}},T.current.checkedKeys.current.includes(ue.brains)?a("5000.6023",{name:ue.brains})||`隐藏${ue.brains}的三维形貌`:a("5000.6024",{name:ue.brains})||`显示${ue.brains}的三维形貌`)}:null]:G||le?[G?{key:"1",label:w.createElement("a",{target:"_blank",style:{width:"150px",textAlign:"center"},onClick:()=>{Xc(G),J(!0)}},T.current.checkedKeys.current.includes(G)?a("5000.5056")||"隐藏核团":a("5000.5057")||"显示核团")}:null,Kn!=7&&(at.length==0||at.includes("neurons"))&&le?{key:"3",label:w.createElement("a",{style:{width:"150px",color:"#000",textAlign:"center"},onClick:()=>{La(7),J(!0),setTimeout(()=>{mo(G),we(G)},50)}},a("5000.6015")||"查询位于或投射到该结构的神经元")}:null,le?{key:"6",label:w.createElement("a",{style:{width:"150px",color:"#000",textAlign:"center"},onClick:()=>{const ye=Ce.current.getObjectByName(le);if(ye){const Ne=new rs().setFromObject(ye),We=new me;Ne.getCenter(We),h.current.target.copy(We),J(!0)}}},a("7000.7019")||"设置为焦点")}:null,le&&Kn==5?{key:"5",label:w.createElement("a",{style:{width:"150px",color:"#000",textAlign:"center"},onClick:()=>{const ye=new rs,Ne=Ce.current.getObjectByName(le);if(Ne){ye.expandByObject(Ne.clone());let We=ye.min,tt=ye.max,Ct=new me;ye.getCenter(Ct);const Jt=tt.x-We.x,$t=tt.y-We.y,bn=tt.z-We.z;Et.current.scale.x=Jt,Et.current.scale.y=$t,Et.current.scale.z=bn,Et.current.position.set(Ct.x,Ct.y,Ct.z);const un=Et.current.geometry.clone();un.scale(Et.current.scale.x,Et.current.scale.y,Et.current.scale.z),un.translate(Ct.x,Ct.y,Ct.z);const cr=new iM(un);gr.current.geometry=cr,Ce.current.remove(Ge.current);const Wn=a("5000.0006")||"显示数据块";if(On===Wn){sr(a("5000.0007")||"隐藏数据块"),je.current=new S2(Ai.current,f==null?void 0:f.domElement),je.current.setMode("translate"),je.current.enabled=!0,je.current.visible=!0,je.current.name="transformControls",je.current.attach(Et.current),Ce.current.add(Et.current,je.current,gr.current),Vg(),document.addEventListener("keypress",Pd);const _r=new rs;_r.expandByObject(Et.current);const qn=R.current(_r.min.clone()),kr=R.current(_r.max.clone());let qr=new Wh(Do(650,620,`${qn.x.toFixed(2)},${qn.y.toFixed(2)},${qn.z.toFixed(2)}`,"#ccc")),Br=new eh(new bf({map:qr}));Br.name="startText";let ca=new Wh(Do(650,620,`${kr.x.toFixed(2)},${kr.y.toFixed(2)},${kr.z.toFixed(2)}`,"#ccc")),ti=new eh(new bf({map:ca}));ti.name="endText",Br.position.set(_r.min.x,_r.min.y+.2,_r.min.z),ti.position.set(_r.max.x,_r.max.y+.6,_r.max.z);const Ni=Ce.current.getObjectByName("startText"),$s=Ce.current.getObjectByName("endText");Ni&&$s&&Ce.current.remove(Ni,$s),Ce.current.add(Ge.current,Br,ti)}J(!0),Zn({})}}},a("5000.6022",{lableStr:le})||"设置 "+le+" 的包围盒为下载范围")}:null].filter(ye=>ye!==null):te?[{key:"1",label:w.createElement("a",{target:"_blank",style:{width:"150px",textAlign:"center"},onClick:ye=>{pe.current.showSwctext(te),J(!0)}},te in se.current?a("5000.5060")||"隐藏文字":a("5000.5061")||"显示文字")},{key:"2",label:w.createElement("a",{target:"_blank",style:{width:"150px",textAlign:"center"},onClick:ye=>{Yu(te),J(!0)}},a("5000.6004")||"隐藏该神经元")}]:ee?[{key:"1",label:w.createElement("a",{style:{width:"150px",color:"#000",textAlign:"center"},onClick:()=>{qu(ee),J(!0)}},xs.current.includes(ee)?a("5000.0209")||"Hide Label":a("5000.0208")||"Show Label")},{key:"2",label:w.createElement("a",{target:"_blank",style:{width:"150px",textAlign:"center"},onClick:ye=>{Yc(ee),J(!0)}},a("5000.6021")||"隐藏该分支")}]:ut.Lable?[{key:"1",label:w.createElement("a",{style:{width:"150px",color:"#000",textAlign:"center"},onClick:()=>{if(ut.name){const ye=Ce.current.getObjectByName(ut.name);if(ye){const Ne=new rs().setFromObject(ye),We=new me;Ne.getCenter(We),h.current.target.copy(We),J(!0)}}}},a("7000.7019")||"设置为焦点")},{key:"2",label:w.createElement("a",{style:{width:"150px",color:"#000",textAlign:"center"},onClick:()=>{ut.Lable&&Xc(ut.Lable),J(!0)}},T.current.checkedKeys.current.includes(ut.Lable)?a("5000.6023",{name:ut.Lable})||`隐藏${ut.Lable}的三维形貌`:a("5000.6024",{name:ut.Lable})||`显示${ut.Lable}的三维形貌`)}]:[],[G,ee,te,le,Kn,Ho,ue,ks,ut]),wc=ye=>{ye=ye.replace(/[\[\]]/g,"\\$&");var Ne=new RegExp("[?&]"+ye+"(=([^&#]*)|&|#|$)"),We=Ne.exec(window.location.href);return We?We[2]?decodeURIComponent(We[2].replace(/\+/g," ")):"":null},Tc=(ye,Ne)=>{let We="";for(let tt in Ne){const Ct=Ne[tt];if(Ct.children){if(Ct.children.some(Jt=>Jt.name===ye)){We=Ct.name;break}else if(Tc(ye,Ct.children)){We=Tc(ye,Ct.children);break}}}return We},Qo=(ye,Ne)=>{let We=new URL(window.location.href),tt=new URLSearchParams(We.search);tt.set(ye,Ne),We.search=tt.toString(),window.history.replaceState({},"",We),fetch("/brainsweb-service/record/list",{method:"post",body:JSON.stringify({href:We})}).then(Ct=>Ct.json()).then(Ct=>{})},Cu=ye=>{switch(parseInt(ye)){case 0:document.title="STAM-SimpleViewer",Qo("type","simple");break;case 1:document.title="STAM-NormalViewer",Qo("type","normal");break;case 2:document.title="STAM-Surgery",Qo("type","virtual");break;case 3:document.title="STAM-Reslicing",Qo("type","slicing");break;case 4:document.title="STAM-Registration",Qo("type","registration");break;case 5:document.title="STAM-Downloading",Qo("type","downloading");break;case 6:document.title="STAM-AtlasMapping",Qo("type","mapping");break;case 7:document.title="STAM-Connectivity",Qo("type","circuits");break;case 8:document.title="STAM-OtherAtlas",Qo("type","other");break;case 9:document.title="STAM-ViewSetting",Qo("type","setting");break}};w.useEffect(()=>{ue.brains&&ys(ec(Or,ue.brains))},[ue]),w.useEffect(()=>{le&&Ys(ec(Or,le)),v(Cc),Lo.current=p},[p,G,M,ee,le,te,Kn,Ie,ue,ks,ut]);const tc=async ye=>{Ks(ye.url||ye.preview),Wa(!0)},_c=(ye,Ne)=>{const We=new FormData;We.append("file",ye.file),fetch("/app-api/up-api/update",{method:"post",body:We}).then(tt=>tt.json()).then(tt=>{if(tt.code===200)if(hy.success("update success"),Ne===2){const Ct=Oo.findIndex(Jt=>Jt.key===Co[0]);if(Ct>-1){let Jt=JSON.parse(JSON.stringify(Po.current)),$t=Jt[Ct];$t.fileList2=[{url:"data:image/png;base64,"+tt.base64_url}],Bs(Jt),Po.current=Jt}}else{const Ct=Oo.findIndex(Jt=>Jt.key===Co[0]);if(Ct>-1){let Jt=JSON.parse(JSON.stringify(Po.current)),$t=Jt[Ct];$t.fileList=[{url:"data:image/png;base64,"+tt.base64_url}],$t.correspondingPlaneData={},$t.filename=tt.path,Bs(Jt);const bn=Ce.current.children.filter(un=>un.userData.name==="registrationPng");bn&&Ce.current.remove(...bn),Po.current=Jt}Oe.current=tt.path}else tt.message&&Os.error({content:tt.message})})},Es=async(ye,Ne)=>{const We=ye.type==="image/tiff"||ye.type==="image/tif",tt=ye.name.endsWith(".swc");let Ct,Jt;return await new Promise(bn=>{if(We){const un=new FileReader;un.readAsArrayBuffer(ye),un.onload=async cr=>{var Wn;if((Wn=cr.target)!=null&&Wn.result){const _r=cr.target.result;if(_r instanceof ArrayBuffer){const kr=await(await OAt(_r)).getImage(),qr=kr.getWidth(),Br=kr.getHeight();if(!Ne){const ca=Oo.findIndex(ti=>ti.key===Co[0]);if(ca>-1){let ti=JSON.parse(JSON.stringify(Oo)),Ni=ti[ca];Ni.firstRegistrationImg={width:qr,height:Br},Bs(ti),Po.current=ti}}if(Ne===2){const ca=Oo.findIndex(ti=>ti.key===Co[0]);if(ca>-1){const{firstRegistrationImg:ti}=Oo[ca];(ti.width!==qr||Br!==ti.height)&&(hy.error("The size of the second TIFF image needs to be consistent with the first one!"),bn(!1))}}bn(!0)}}}}else bn(!0)}).then(bn=>bn?(Kn==6?(Ct=We||tt,Jt="You can only upload tif or swc files!"):(Ct=We,Jt="You can only upload tif files!"),Ct||hy.error(Jt),Ct):!1)},wu=(ye,Ne)=>{const We=new FormData;We.append("file",ye.file),fetch("/app-api/d-api/upload",{method:"post",body:We}).then(tt=>tt.json()).then(tt=>{tt.code===200?(hy.success("update success"),Ne===2?Ri([{url:"data:image/png;base64,"+tt.base64_url}]):(li([{url:"data:image/png;base64,"+tt.base64_url}]),Xi({}),Oe.current=tt.path)):tt.message&&Os.error({content:a("5000.0003")||"上传失败,请联系管理员"})})},Ju=()=>{const ye=Ce.current.getObjectByName("Brain");if(ye)if(Gr(We=>!We),ai.file[1].indexOf(".js")>-1)fetch("/app-api/d-api/dowload/"+ai.file[1]).then(We=>We.json()).then(We=>{let tt=new Ga;const Ct=new Vu,Jt=ai.file[1];let $t={};const bn=[];Ce.current.traverse(qn=>{qn.userData.isAtlasMapping==="true"&&bn.push(qn)}),bn.forEach(qn=>{Ce.current.remove(qn)}),We.line.forEach((qn,kr)=>{var qr=We.position[qn.end],Br=We.position[qn.start],ca=new Dn(new ic(.01,32,32),new Fu({color:"#A7B5A1",transparent:!0}));ca.position.set(qr.x*.01,qr.y*.01,qr.z*.01);var ti=new Dn(new ic(.01,32,32),new Fu({color:"#00ffff",transparent:!0}));ti.position.set(Br.x*.01,Br.y*.01,Br.z*.01),ca.translateX(qo.current),ca.translateY(To.current),ca.translateZ(_o.current),ti.translateX(qo.current),ti.translateY(To.current),ti.translateZ(_o.current),ca.myMeshType="neuronSphere",ca.name=`${Jt}/${qn.end_name}`,ca.userData.color="#A7B5A1",ti.myMeshType="neuronSphere",ti.name=`${Jt}/${qn.start_name}`,ti.userData.color="#00ffff",Ct.add(ca),Ct.add(ti),qn.start_name&&($t.hasOwnProperty(qn.start_name)?$t[`${qn.start_name}`].push({name:Jt,point:[Br.x,Br.y,Br.z],color:"#00ffff"}):($t[`${qn.start_name}`]=[],$t[`${qn.start_name}`].push({name:Jt,point:[Br.x,Br.y,Br.z],color:kr===0?"#1771FF":"#00ffff"}))),qn.end_name&&($t.hasOwnProperty(qn.end_name)?$t[`${qn.end_name}`].push({name:Jt,point:[qr.x,qr.y,qr.z],color:"#A7B5A1"}):($t[`${qn.end_name}`]=[],$t[`${qn.end_name}`].push({name:Jt,point:[qr.x,qr.y,qr.z],color:"#A7B5A1"})))});let un=new Dn(new ic(.02,32,32),new Fu({color:"#1771FF",transparent:!0}));un.position.set(We.position[0].x*.01,We.position[0].y*.01,We.position[0].z*.01),un.translateX(qo.current),un.translateY(To.current),un.translateZ(_o.current),Ct.add(un),Ct.name=`swcPointGroup${Jt}`,Ct.userData.isAtlasMapping="true";const cr={};for(const qn in $t){const kr=$t[qn];for(const qr of kr)if(qr.name==Jt){if(qr.color==="#1771FF"){cr[qn]={point:qr.point,color:qr.color};break}if(qr.color==="#A7B5A1"){cr[qn]={point:qr.point,color:qr.color};break}cr[qn]={point:qr.point,color:qr.color}}}for(let qn in cr){const{point:kr,color:qr}=cr[qn];var Wn=new Wh(Do(400,300,qn.replace("_","/"),qr));let Br=new eh(new bf({map:Wn,transparent:!0,alphaTest:.5}));Br.scale.set(.5,.5,.5),Br.position.set(kr[0]*.01,kr[1]*.01,kr[2]*.01),Br.translateX(qo.current),Br.name="lineNameMesh",Br.userData.name=qn.replace("_","/"),Br.userData.wholeName=`${Jt}-${qn}`,Br.userData.isAtlasMapping="true",Br.userData.initColor=qr,Br.translateY(To.current),Br.translateZ(_o.current),Ce.current.add(Br)}Ce.current.add(Ct);for(let qn=0;qn<We.line.length;qn++){let kr=[];for(let Br=We.line[qn].start;Br<=We.line[qn].end;Br++){let ca=We.position[Br].x,ti=We.position[Br].y,Ni=We.position[Br].z;kr.push(new me(ca,ti,Ni))}let qr=new ba(new Wi().setFromPoints(kr),new yh({color:"green"}));tt.add(qr),Gr(!1)}tt.scale.set(Bo.current,Bo.current,Bo.current),tt.translateX(qo.current),tt.translateY(To.current),tt.translateZ(_o.current),tt.name="correspondingPlaneDataSwc";const _r=Ce.current.getObjectByName("correspondingPlaneDataSwc");_r&&Ce.current.remove(_r),Ce.current.add(tt)});else{var Ne=new ka;Ne.setFromAxisAngle(new me(1,0,0),Math.PI/2);const We=(ye==null?void 0:ye.children[0]).geometry.boundingBox.min,tt=(ye==null?void 0:ye.children[0]).geometry.boundingBox.max,Ct={bwidth:0,bheight:2.6,bdepth:0,ewidth:tt.x-We.x,eheight:tt.y-We.y,edepth:tt.z-We.z,owidth:tt.x-We.x,oheight:tt.y-We.y,odepth:tt.z-We.z};new me(.010276870727539578,-5.650856788169461,-.9944386664650411);let Jt=new me(-5.097530670166015,-4.308416134996751,-7.990437196406743),$t=new me(5.118084411621094,3.006702558657828,6.001559863476661);const bn=new rs;bn.expandByObject(ye.clone()),Jt=bn.min,$t=bn.max;const un=$t.x-Jt.x,cr=$t.y-Jt.y,Wn=$t.z-Jt.z;Et.current.scale.set(un,cr,Wn),Et.current.position.set(.010276870727539578,-1.6508567881694614,-.9944386664650411),de.current.length===0?fetch("/app-api/d-api/dowload/"+ai.file[1]).then(_r=>_r.arrayBuffer()).then(_r=>{const qn=new Uint8Array(_r);let kr=W7(qn),qr=ple(qn);de.current=kr,Uo(kr,Ct,qr)}):setTimeout(()=>{Uo(de.current,Ct,de.current.length)},200)}},Ic=ye=>{const Ne=Oo.findIndex(We=>We.key===Co[0]);if(Ne>-1){let We=JSON.parse(JSON.stringify(Oo)),tt=We[Ne];tt.registrationRadioShowType=ye.target.value,Bs(We),Po.current=We,Ce.current.getObjectByName(`png${Ne}`)&&Qu(ye.target.value)}},Js=ye=>{if(Gr(!0),dn(ye.target.value),qi.otherAtlases=ye.target.value,Ce.current){const Ne=Ce.current.getObjectByName("outline");Ne&&Ce.current.remove(Ne)}ye.target.value=="CCF"&&Nm({filepath:n+"/data/FBX/outline-CCF.FBX",index:"outline",color:"#327DFF",opacity:.3,offsetZ:0,R:.01,callback:function(){}},et),ye.target.value=="WHS"&&Nm({filepath:n+"/data/FBX/outline-WHS.FBX",index:"outline",color:"#327DFF",opacity:.3,offsetZ:0,R:.01,callback:function(){}},et),Gr(!1)},nc=ye=>{if(lt(ye.target.value),ye.target.value===2){F.current="automatic",L(!0),U.current=!0,j(2),g.current.length>=2&&(g.current.pop(),x.current.pop());const Ne=Ce.current.getObjectByName("dashedLine"),We=Ce.current.getObjectByName("sphereBig"),tt=Ce.current.getObjectByName("sphereMiddelClick"),Ct=Ce.current.getObjectByName("Line");Ne&&We&&Ce.current.remove(Ne,We),tt&&Ce.current.remove(tt),Ct&&Ce.current.remove(Ct),ol()}else F.current="manual",L(!1),U.current=!1,j(3),ol();d&&(d.current=!0),Sr.current&&(Sr.current.textContent=a("4000.0126")||"重置")},Tu=ye=>{if(ye>-1){let Ne=JSON.parse(JSON.stringify(Po.current)),We=Ne[ye];We.startButtonLoading=!0,We.correspondingPlaneData={},Bs(Ne),Po.current=Ne;const tt=new FormData;tt.append("file",We.filename),tt.append("typeName",We.radioValue.toString()),fetch("/app-api/up-api/calculate",{method:"post",body:tt}).then(Ct=>{if(Ct.ok)return Ct.json();throw Os.error({content:a("5000.7027")||"计算失败"}),new Error(Ct.statusText)}).then(Ct=>{const Jt=Ct;let $t=JSON.parse(JSON.stringify(Po.current));const bn=$t[ye];bn.correspondingPlaneData=Jt,bn.startButtonLoading=!1,Po.current=$t,Bs($t)})}},Ld=()=>{const ye=Oo.findIndex(Ne=>Ne.key===Co[0]);if(ye>-1){let Ne=Oo[ye];const We=document.createElement("a");We.href="/app-api/up-api/zip/"+Ne.correspondingPlaneData.url,We.download=Ne.correspondingPlaneData.url,We.click()}},Qu=ye=>{const Ne=Oo.findIndex(Wn=>Wn.key===Co[0]);if(Ne>-1){const Wn=Ce.current.getObjectByName(`png${Ne}`);Wn&&Ce.current.remove(Wn)}var We=Ce.current.getObjectByName("Brain");if(We&&Ne>-1){let Wn=Oo[Ne];const{correspondingPlaneData:_r,registrationRadioShowType:qn,fileList:kr,fileList2:qr}=Wn;var tt=new rs().setFromObject(We),Ct=tt.max.y-tt.min.y,Jt=tt.max.x-tt.min.x;Ct=Ct/Math.cos(_r.angles[0]*Math.PI/180),Jt=Jt/Math.cos(_r.angles[1]*Math.PI/180);var $t=new OI(Jt,Ct,1,1),bn=new Fu({side:Sf,transparent:!0,alphaTest:.1}),un=new Dn($t,bn);un.name=`png${Ne}`;let Br=qn;ye&&(Br=ye),un.userData.imgType=Br,un.userData.name="registrationPng",Ce.current.add(un);var cr=new hb;un.position.set(tt.min.x+(tt.max.x-tt.min.x)/2,tt.min.y+(tt.max.y-tt.min.y)/2,(tt.max.z-tt.min.z)*_r.tx+tt.min.z),cr.load(Br==="3"?qr[0].url:Br==="1"?_r.base64_url:kr[0].url,function(ca){bn.map=ca,bn.needsUpdate=!0}),un.rotateOnAxis(new me(0,0,1),Math.PI),un.rotateOnAxis(new me(1,0,0),Math.PI/180*-_r.angles[0]),un.rotateOnAxis(new me(0,1,0),Math.PI/180*_r.angles[2]),un.rotateOnAxis(new me(0,0,1),Math.PI/180*_r.angles[1]),ye!="1"&&(Rs.current?un.scale.x=1:un.scale.x=-1)}},No=()=>{const ye=new ns(1,1,1),Ne=new Fu({color:16777215,opacity:.1,transparent:!0,depthWrite:!1}),We=new Dn(ye,Ne);Ce.current.remove(Et.current,gr.current,Ge.current),Et.current=We.clone(),Ge.current=new Dn;const tt=new iM(ye),Ct=new yh({color:16536881}),Jt=new EF(tt,Ct);gr.current=Jt},ed=()=>{const ye=a("5000.0006")||"显示数据块";if(On===ye){sr(a("5000.0007")||"隐藏数据块"),je.current=new S2(Ai.current,f==null?void 0:f.domElement),je.current.setMode("translate"),je.current.enabled=!0,je.current.visible=!0,je.current.name="transformControls",je.current.attach(Et.current),Ce.current.add(Et.current,je.current,gr.current),Vg(),document.addEventListener("keypress",Pd);const Ne=new rs;Ne.expandByObject(Et.current);const We=R.current(Ne.min.clone()),tt=R.current(Ne.max.clone());let Ct=new Wh(Do(650,620,`${We.x.toFixed(2)},${We.y.toFixed(2)},${We.z.toFixed(2)}`,"#ccc")),Jt=new eh(new bf({map:Ct}));Jt.name="startText";let $t=new Wh(Do(650,620,`${tt.x.toFixed(2)},${tt.y.toFixed(2)},${tt.z.toFixed(2)}`,"#ccc")),bn=new eh(new bf({map:$t}));bn.name="endText",Jt.position.set(Ne.min.x,Ne.min.y+.2,Ne.min.z),bn.position.set(Ne.max.x,Ne.max.y+.6,Ne.max.z);const un=Ce.current.getObjectByName("startText"),cr=Ce.current.getObjectByName("endText");un&&cr&&Ce.current.remove(un,cr),Ce.current.add(Ge.current,Jt,bn)}else{document.removeEventListener("keypress",Pd),sr(a("5000.0006")||"显示数据块"),je.current.enabled=!1,je.current.visible=!1,je.current.detach();const Ne=Ce.current.getObjectByName("startText"),We=Ce.current.getObjectByName("endText");Ne&&We&&Ce.current.remove(Ne,We),Ce.current.remove(je.current),Ce.current.remove(Et.current,gr.current,Ge.current)}},Do=(ye,Ne,We,tt)=>{var Ct=document.createElement("canvas");Ct.width=ye,Ct.height=Ne,Ct.style.border="1px solid #000";let Jt=Ct.getContext("2d");return Jt.font="80px Arial",Jt.fillStyle=tt,Jt.fillText(We,40,80),Ct},Uo=(ye,Ne,We)=>{const tt=ye[0].width/Ne.owidth,Ct=ye[0].height/Ne.oheight,Jt=We/Ne.odepth,$t=Math.ceil(Ne.bwidth*tt),bn=Math.ceil(Ne.bheight*Ct),un=Math.ceil(Ne.bdepth*Jt),cr=Math.floor(Ne.ewidth*tt),Wn=Math.floor(Ne.eheight*Ct),_r=Math.floor(Ne.edepth*Jt);let qn=[];for(let Ni=0;Ni<ye.length;Ni++)if(Ni>=un&&Ni<_r)for(let $s=0;$s<ye[Ni].data.length;$s++){let zs=$s%ye[Ni].width,sl=$s/ye[Ni].width;$t<=zs&&zs<cr&&sl>=bn&&sl<Wn&&qn.push(ye[Ni].data[$s])}const kr=new Uint8Array(qn),qr=cr-$t,Br=Wn-bn,ca=new Mme(kr,qr,Br,_r-un);ca.format=yme,ca.minFilter=ku,ca.magFilter=ku,ca.unpackAlignment=1,ca.needsUpdate=!0,_n.current=ca,S.current=new vL({glslVersion:m2,uniforms:{map:{value:_n.current},cameraPos:{value:Ai.current.position},volume_dims:{value:new me(qr,Br,We)},canvas_dims:{value:new Bn(f.domElement.width,f.domElement.height)},isClicked:{value:0},steps:{value:We},brightness:{value:256},darkness:{value:0}},side:yd,vertexShader:NAt,fragmentShader:DAt}),Ce.current.remove(Ge.current);const ti=new ns(1,1,1);Ge.current=new Dn(ti,S.current),Ge.current.applyMatrix4(Et.current.matrixWorld),Ge.current.scale.set(Et.current.scale.x,Et.current.scale.y,Et.current.scale.z),Ge.current.position.set(Et.current.position.x,Et.current.position.y,Et.current.position.z),Ce.current.add(Ge.current),Gr(Ni=>!Ni)},ol=()=>{const ye=[];Ce.current.traverse(Ne=>{Ne.name==="lineName"&&ye.push(Ne)}),ye.forEach(Ne=>{Ce.current.remove(Ne)})},Od=()=>{const ye=new rs;ye.expandByObject(Et.current);const Ne=Ce.current.getObjectByName("Brain");if(Ne){Gr(un=>!un);var We=new ka;We.setFromAxisAngle(new me(1,0,0),Math.PI/2);const tt=(Ne==null?void 0:Ne.children[0]).geometry.boundingBox.min,Ct=(Ne==null?void 0:Ne.children[0]).geometry.boundingBox.max,Jt=ye.min.clone().applyMatrix4(Ne.matrixWorld.clone().invert()).applyQuaternion(We),$t=ye.max.clone().applyMatrix4(Ne.matrixWorld.clone().invert()).applyQuaternion(We),bn={bwidth:Jt.x-tt.x,bheight:Jt.y-tt.y,bdepth:Jt.z-tt.z,ewidth:$t.x-tt.x,eheight:$t.y-tt.y,edepth:$t.z-tt.z,owidth:Ct.x-tt.x,oheight:Ct.y-tt.y,odepth:Ct.z-tt.z};de.current.length===0?fetch(n+"/data/TIFF/183153.tif").then(un=>un.arrayBuffer()).then(un=>{const cr=new Uint8Array(un);let Wn=W7(cr),_r=ple(cr);de.current=Wn,Uo(Wn,bn,_r)}):setTimeout(()=>{Uo(de.current,bn,de.current.length)},200)}};w.useEffect(()=>{ya?Ol.current&&Ol.current.focus():Hc.current&&Hc.current.focus()},[ya]);const rc=ye=>ye.map(Ne=>({value:Ne.name+" "+Ne.fullname,title:w.createElement(_a,{placement:"right",title:Ne.fullname},w.createElement("div",{style:{whiteSpace:"nowrap",display:"flex",alignItems:"center",lineHeight:"2.4"}},Ne.name," ",Ne.fullname)),children:Ne.children?rc(Ne.children):void 0})),yv=w.useMemo(()=>{const ye=new rs;ye.expandByObject(Et.current);const Ne=Ce.current.getObjectByName("Brain");if(Ne){var We=new ka;We.setFromAxisAngle(new me(1,0,0),Math.PI/2);const tt=(Ne==null?void 0:Ne.children[0]).geometry.boundingBox.min,Ct=ye.min.clone().applyMatrix4(Ne.matrixWorld.clone().invert()).applyQuaternion(We),Jt=ye.max.clone().applyMatrix4(Ne.matrixWorld.clone().invert()).applyQuaternion(We),$t={bwidth:Ct.x-tt.x,bheight:Ct.y-tt.y,bdepth:Ct.z-tt.z,ewidth:Jt.x-tt.x,eheight:Jt.y-tt.y,edepth:Jt.z-tt.z};Mt.current=$t;const bn=($t.ewidth-$t.bwidth)*11.15*($t.eheight-$t.bheight)*12.31*($t.edepth-$t.bdepth)*10;let un=0;switch(Rn){case 1:un=bn*.8;break;case 2:un=bn*.8/8;break;case 3:un=bn*.8/8/8;break;case 4:un=bn*.8/8/8/8;break;case 5:un=bn*.8/8/8/8/8;break;case 6:un=bn*.8/8/8/8/8/8;break}return On===(a("5000.0006")||"显示数据块")?"0KB":un>1024*1024*1024*1024?(un/(1024*1024*1024*1024)).toFixed(2)+"TB":un>1024*1024*1024?(un/(1024*1024*1024)).toFixed(2)+"GB":un>1024*1024&&un<1024*1024*1024?(un/(1024*1024)).toFixed(2)+"MB":un>1024&&un<1024*1024?(un/1024).toFixed(2)+"KB":un&&un<1024?un.toFixed(2)+"B":"0KB"}else return"0KB"},[Gn,On]),bv=()=>{if(!Ei.current){zr(!0);return}const ye=new rs;ye.expandByObject(Et.current);const Ne=Ce.current.getObjectByName("Brain");if(Ne){var We=new ka;We.setFromAxisAngle(new me(1,0,0),Math.PI/2);const tt=(Ne==null?void 0:Ne.children[0]).geometry.boundingBox.min,Ct=(Ne==null?void 0:Ne.children[0]).geometry.boundingBox.max,Jt=ye.min.clone().applyMatrix4(Ne.matrixWorld.clone().invert()).applyQuaternion(We),$t=ye.max.clone().applyMatrix4(Ne.matrixWorld.clone().invert()).applyQuaternion(We),bn={bwidth:Jt.x-tt.x,bheight:Jt.y-tt.y,bdepth:Jt.z-tt.z,ewidth:$t.x-tt.x,eheight:$t.y-tt.y,edepth:$t.z-tt.z,owidth:Ct.x-tt.x,oheight:Ct.y-tt.y,odepth:Ct.z-tt.z,zoom:!1,level:Rn};Mt.current=bn;const un=(bn.ewidth-bn.bwidth)*11.15*(bn.eheight-bn.bheight)*12.31*(bn.edepth-bn.bdepth)*10;switch(Rn){case 1:if(un*.8>1024*1024*1024){vn(!0);return}break;case 2:if(un*.8/8>1024*1024*1024){vn(!0);return}break;case 3:if(un*.8/8/8>1024*1024*1024){vn(!0);return}break;case 4:if(un*.8/8/8/8>1024*1024*1024){vn(!0);return}break;case 5:if(un*.8/8/8/8/8>1024*1024*1024){vn(!0);return}break;case 6:if(un*.8/8/8/8/8/8>1024*1024*1024){vn(!0);return}break}xi(!0),fetch("/app-api/test-api/CutBlockTask",{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(bn)}).then(cr=>cr.json()).then(cr=>{gl(cr)})}},gl=ye=>{fetch("/app-api/test-api/CutBlockTask",{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:ye})}).then(Ne=>{const We=Ne.headers.get("content-type");return We?We.includes("application/json")?Ne.json():We.includes("application/octet-stream")?Ne.arrayBuffer():(We.includes("text/html")||We.includes("text/plain")||We.includes("application/xml")||We.includes("text/xml"),Ne.text()):Ne.text()}).then(Ne=>{if(typeof Ne=="string")setTimeout(()=>{gl(ye)},2e3);else{const We=document.createElement("a"),tt=new Blob([Ne]),Ct=window.URL.createObjectURL(tt);We.style.display="none",We.href=Ct,We.download="temp.tiff",We.click(),window.URL.revokeObjectURL(Ct),xi(!1)}}).catch(Ne=>{xi(!1),Os.error({title:a("5000.7026")||"请求超时,下载失败"})})},Pd=w.useCallback(ye=>{ye.preventDefault(),ye.stopPropagation(),(ye.key==="a"||ye.key==="A")&&(je.current.getMode()==="translate"?je.current.setMode("scale"):je.current.setMode("translate"))},[]),Vg=()=>{let Ne=Ce.current.getObjectByName("Brain"),We=new me(-5.097530670166015,-5.308416134996751,-7.990437196406743),tt=new me(5.118084411621094,2.006702558657828,6.001559863476661);if(Ne){const bn=new rs;bn.expandByObject(Ne.clone()),We=bn.min,tt=bn.max}const Ct=tt.x-We.x,Jt=tt.y-We.y,$t=tt.z-We.z;je.current.addEventListener("change",()=>{const bn=Et.current.scale,un=Et.current.position;bn.x<1&&Et.current.scale.setX(1),bn.x>Ct&&Et.current.scale.setX(Ct),bn.y<1&&Et.current.scale.setY(1),bn.y>Jt&&Et.current.scale.setY(Jt),bn.z<1&&Et.current.scale.setZ(1),bn.z>$t&&Et.current.scale.setZ($t),un.x<We.x+Et.current.scale.x/2&&Et.current.position.setX(We.x+Et.current.scale.x/2),un.x>tt.x-Et.current.scale.x/2&&Et.current.position.setX(tt.x-Et.current.scale.x/2),un.y<We.y+Et.current.scale.y/2&&Et.current.position.setY(We.y+Et.current.scale.y/2),un.y>tt.y-Et.current.scale.y/2&&Et.current.position.setY(tt.y-Et.current.scale.y/2),un.z<We.z+Et.current.scale.z/2&&Et.current.position.setZ(We.z+Et.current.scale.z/2),un.z>tt.z-Et.current.scale.z/2&&Et.current.position.setZ(tt.z-Et.current.scale.z/2);const cr=Et.current.geometry.clone();cr.scale(Et.current.scale.x,Et.current.scale.y,Et.current.scale.z),cr.translate(Et.current.position.x,Et.current.position.y,Et.current.position.z);const Wn=new iM(cr);gr.current.geometry=Wn,Zn({})}),je.current.addEventListener("dragging-changed",function(bn){bn.value?(h.current.enableRotate=!1,h.current.enabled=!1,Ra.current={target:h.current.target.clone(),position:h.current.object.position.clone(),up:h.current.object.up.clone(),enabled:h.current.enabled}):(h.current.enableRotate=!0,h.current.enabled=!0,h.current.reset(),h.current.target.copy(Ra.current.target),h.current.object.position.copy(Ra.current.position),h.current.object.up.copy(Ra.current.up),h.current.update());const un=Et.current.geometry.clone();un.scale(Et.current.scale.x,Et.current.scale.y,Et.current.scale.z),un.translate(Et.current.position.x,Et.current.position.y,Et.current.position.z);const cr=new iM(un);gr.current.geometry=cr;const Wn=new rs;Wn.expandByObject(Et.current);const _r=R.current(Wn.min.clone()),qn=R.current(Wn.max.clone());let kr=new Wh(Do(650,620,`${_r.x.toFixed(2)},${_r.y.toFixed(2)},${_r.z.toFixed(2)}`,"#ccc")),qr=new eh(new bf({map:kr}));qr.name="startText";let Br=new Wh(Do(650,620,`${qn.x.toFixed(2)},${qn.y.toFixed(2)},${qn.z.toFixed(2)}`,"#ccc")),ca=new eh(new bf({map:Br}));ca.name="endText",qr.position.set(Wn.min.x,Wn.min.y+.2,Wn.min.z),ca.position.set(Wn.max.x,Wn.max.y+.6,Wn.max.z);const ti=Ce.current.getObjectByName("startText"),Ni=Ce.current.getObjectByName("endText");ti&&Ni&&Ce.current.remove(ti,Ni),Ce.current.add(Ge.current,qr,ca)})},It=()=>{document.removeEventListener("keypress",Pd),sr(a("5000.0006")||"显示数据块"),je.current.enabled=!1,je.current.visible=!1,je.current.detach(),Ce.current.remove(je.current),Ce.current.remove(Et.current,gr.current,Ge.current);const ye=Ce.current.getObjectByName("dashedLine");ye&&Ce.current.remove(ye);const Ne=Ce.current.getObjectByName("startText"),We=Ce.current.getObjectByName("endText");Ne&&We&&Ce.current.remove(Ne,We)},Dl=ye=>{hi(ye.target.value)},ml=w.useCallback(ye=>{jr.current=!0,Ur.current=[ye.x,ye.y],ar.current=[ye.x,ye.y]},[]),Bg=w.useCallback(ye=>{if(jr.current){const Ne=[ye.x,ye.y],We=.005,tt=Ne[0]-Ur.current[0];Ne[1]-Ur.current[1];const Ct=tt*We,Jt=new me;Jt.copy(Ai.current.position).sub(h.current.target);const $t=new JQe().setFromVector3(Jt);$t.theta+=Ct,$t.makeSafe(),Jt.setFromSpherical($t),Ai.current.position.copy(h.current.target).add(Jt),Ai.current.lookAt(h.current.target),Ur.current=[ye.x,ye.y]}},[]),$g=w.useCallback(ye=>{jr.current=!1;const Ne=[ye.x,ye.y],We=Math.abs(Ne[0]-ar.current[0]),tt=Math.abs(Ne[1]-ar.current[1]);We<2&&tt<2?f.domElement.addEventListener("click",K.current):f.domElement.removeEventListener("click",K.current)},[]),mr=()=>{if(!localStorage.getItem("imgKey")){an(!0);return}qe(!0),Xa(!1),Xi({});let ye={taskType:Pr,moving_name:Oe.current,key:localStorage.getItem("imgKey")};fetch("/app-api/d-api/count",{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(ye)}).then(Ne=>Ne.ok?Ne.json():(qe(!1),Ne.json().then(We=>{throw Os.error({content:We.message,onOk(){an(!0)}}),new Error(We.message||Ne.statusText)}))).then(Ne=>{Ne.code===200&&Xi(Ne),qe(!1)})},sn=()=>{const ye=document.createElement("a");ye.href="/app-api/d-api/dowload/"+ai.file[0],ye.download=ai.file[0],ye.click()},Nr=ye=>{D&&D(ye),qi.datumMarkVisibility=ye},U0=ye=>{_d(ye),qi.coordinateVisibility=ye,ye?k&&k.current.forEach(Ne=>{Ne.visible=!0}):k&&k.current.forEach(Ne=>{Ne.visible=!1})},zg=()=>{Jo(!1)},k0=()=>{Jo(!1)},Wb=ye=>{if(Ro(ye),qi.leftHemisphereVisibility=ye,ye){for(let Ne in ts.current)ts.current[Ne]&&M.includes(Ne)&&Ce.current.add(ts.current[Ne]);hg.current=!0}else{for(let Ne in ts.current)ts.current[Ne]&&Ce.current.remove(ts.current[Ne]);hg.current=!1}},xv=ye=>{if(qi.cranialVisibility=ye,Gc({}),ye)Nm({filepath:n+"/data/FBX/ExtractedSurface.FBX",index:"ExtractedSurface",color:"#327DFF",opacity:.3,offsetZ:0,R:.01,callback:function(){}},et);else if(Ce.current){const Ne=Ce.current.getObjectByName("ExtractedSurface");Ne&&Ce.current.remove(Ne)}},mp=()=>{if(Nn(!0),Gr(!0),N){const ye={flag:hg.current,point:[N.current.x,N.current.y,N.current.z],fbx:W.current};fetch("/app-api/c-api/compute",{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(ye)}).then(Ne=>{if(Ne.ok)return Ne.json();throw Nn(!1),Gr(!1),Os.error({content:a("5000.7027")||"计算失败"}),new Error(Ne.statusText)}).then(Ne=>{Nn(!1),Gr(!1),Ne.code===200&&O?O(new me(Ne.point[0],Ne.point[1],Ne.point[2])):Os.error({content:a("5000.7027")||"计算失败"})})}},Sv=ye=>{ye!=null&&(mo(ye),(ye===""||ye.includes(" "))&&we(ye))},kN=(ye,Ne)=>{let We=0;for(const tt of ye.toLowerCase())if(tt===Ne[We]&&(We++,We===Ne.length))return!0;return!1},Zi=ye=>{if(ye){const Ne=ye.toLowerCase(),We=pe.current.defAllexpandedKeys.current.map(tt=>{const Ct=tt.name&&tt.name.toLowerCase()===Ne,Jt=tt.fullname&&kN(tt.fullname,Ne);return{...tt,matchPriority:Ct?1:Jt?2:3}}).filter(tt=>tt.matchPriority<3).sort((tt,Ct)=>tt.matchPriority-Ct.matchPriority).map(tt=>({value:`${tt.name} ${tt.fullname}`,label:`${tt.name} ${tt.fullname}`}));Dt(We)}else Dt([])},Hg=ye=>{const Ne=new URLSearchParams;for(const We in ye)Ne.append(We,ye[We]);Kn==3?Ne.append("aplType","2"):Ne.append("aplType","1"),fetch("/brainsweb-service/apldetail/add",{method:"post",body:Ne}).then(We=>{if(We.ok)return We.json();throw Os.error({content:a("5000.5047")||"提交失败"}),new Error(We.statusText)}).then(We=>{hy.error(a("5000.5048")||"提交成功"),an(!1),wr(0)})},F0=ye=>{console.log("Failed:",ye)},Go=async ye=>{let Ne="";ye==="DAPI"?Ne="http://eai.brainsmatics.org/datasharing/TIFF/image_356_t.tif":ye==="PI"&&(Ne="http://eai.brainsmatics.org/datasharing/TIFF/image_570_t.tif");try{const We=Ne.split("/").pop()||"",Ct=await(await fetch(Ne)).blob(),Jt=new File([Ct],We,{type:"image/tiff"}),$t=Oo.findIndex(_r=>_r.key===Co[0]);let un=await new Promise(_r=>{const qn=new FileReader;qn.readAsArrayBuffer(Ct),qn.onload=function(kr){var qr,Br;if((qr=kr.target)!=null&&qr.result){const ca=new Uint8Array((Br=kr.target)==null?void 0:Br.result);let ti=W7(ca);const{width:Ni,height:$s}=ti[0];_r({width:Ni,height:$s})}},qn.onerror=function(kr){console.error("failed")}});const{width:cr,height:Wn}=un;if($t>-1){let _r=JSON.parse(JSON.stringify(Oo)),qn=_r[$t];qn.fileList=[Jt],qn.firstRegistrationImg={width:cr,height:Wn},Bs(_r),Po.current=_r}_c({file:Jt})}catch(We){console.error("Error fetching file:",We)}},so=async ye=>{let Ne="",We="";ye==="3D"?(Ne="http://eai.brainsmatics.org/datasharing/TIFF/test.tif",We="image/tiff"):ye==="swc"&&(Ne="http://eai.brainsmatics.org/datasharing/TIFF/fixed.swc",We="file/swc");try{const Ct=await(await fetch(Ne)).blob();let Jt=Ne.split("/").pop();if(Jt){const $t=new File([Ct],Jt,{type:We});li([$t]),wu({file:$t})}}catch(tt){console.error("Error fetching file:",tt)}};return w.createElement(w.Fragment,null,w.createElement(j9,{onClick:()=>{const ye=document.querySelector(".tabsCompnent .ant-tabs-content-holder");ye&&Lr?(ye.style.padding="0px",ye.style.borderLeft="none"):(ye.style.padding="10px",ye.style.borderLeft="1px solid rgb(225, 218, 218)"),Un(Ne=>!Ne)},style:{position:"absolute",right:`${Lr?"452px":"126px"}`,top:"50%",transform:`rotate(${Lr?180:0}deg) translate(-50%,0)`,fontSize:28,transition:"all 0.1s",zIndex:1e3}}),w.createElement(F2,{className:"tabsCompnent",onChange:La,activeKey:Kn.toString(),style:{position:"absolute",right:0,bottom:0,width:`${Lr?"438px":"150px"}`,height:at.length!=7?"100%":"calc(100% - 42px)",userSelect:"none",borderTop:"1px solid rgb(225, 218, 218)"},tabPosition:"right",tabBarStyle:{width:150,background:"#fff",borderLeft:"1px solid #e1dada"}},at.includes("label")&&w.createElement(Gv,{tab:a("4000.0202")||"组装",key:"1",disabled:Z===2},Lr?w.createElement(w.Fragment,null,w.createElement("div",{style:{width:"200px",height:"100px"}},w.createElement(bo,{ref:ci},w.createElement(to,{style:{height:"36px",lineHeight:"36px"},span:10},a("4000.0205")||"长度",":"),w.createElement(to,{span:12},w.createElement(Up,{min:1,max:10,onChange:Md}))))):null),at.includes("virtual")&&w.createElement(Gv,{tab:a("4000.0203")||"病毒标记",key:"2",disabled:Z===1||Z===0},Lr?w.createElement("div",{style:{backgroundColor:"rgba(255,255,255,0.6)",borderRadius:"5px",marginTop:"5px"}},w.createElement("div",null,w.createElement(za,{ref:Sr,disabled:!(M.length>0),className:"ant-btn ant-btn-primary",onClick:qs},a("4000.0208")||"选择靶点"),w.createElement(ra,{style:{margin:"5px 0",borderColor:"rgba(5, 5, 5, .3)",minWidth:200,width:250},dashed:!0}),w.createElement(Ta.Group,{style:{display:`${V?"block":"none"}`},onChange:nc,value:Ot,ref:Ca},w.createElement(Ta,{value:1},a("5000.5035")||"手动"),w.createElement(Ta,{value:2},a("5000.5034")||"自动")),V?w.createElement(ra,{style:{margin:"5px 0",borderColor:"rgba(5, 5, 5, .3)",minWidth:200,width:250},dashed:!0}):null,Ot===2?w.createElement(za,{className:"ant-btn ant-btn-primary",loading:Qt,disabled:!(M.length>0),onClick:mp},a("5000.5017")||"计算"):null),a("5000.6039")||"平颅方位",w.createElement(Ta.Group,{onChange:ye=>{Fe(ye.target.value),ye.target.value?Ce.current.rotation.set(-8.3/180*Math.PI,0,0):Ce.current.rotation.set(0,0,0)},style:{marginLeft:6},value:Te},w.createElement(Ta,{value:0},a("5000.6042")||"关闭"),w.createElement(Ta,{value:1},a("5000.6043")||"启用")),w.createElement(ra,{style:{margin:"5px 0",borderColor:"rgba(5, 5, 5, .3)",minWidth:200,width:250},dashed:!0}),w.createElement("div",{dangerouslySetInnerHTML:{__html:c.current}}),w.createElement("div",{dangerouslySetInnerHTML:{__html:u.current}})):null),at.includes("reslicing")&&w.createElement(Gv,{tab:a("4000.0204")||"图谱切面",key:"3",disabled:Z===2||Z===0},Lr?w.createElement(w.Fragment,null,w.createElement("div",{style:{width:"276px"}},w.createElement(bo,null,a("7000.7024")||"控制模式",": ",w.createElement(Ta.Group,{value:Kl,onChange:ye=>{ye.target.value==0?je.current.setMode("translate"):je.current.setMode("rotate"),Vs(ye.target.value)}},w.createElement(Ta,{value:0},a("7000.7022")||"平移"),w.createElement(Ta,{value:1,disabled:Pl!=4},a("7000.7023")||"旋转")),w.createElement("span",{style:{fontStyle:"italic"}},a("5000.0019")||"提示:按R键进入旋转模式")),w.createElement(ra,{style:{margin:"5px 0",borderColor:"rgba(5, 5, 5, .3)",minWidth:200,width:250},dashed:!0}),w.createElement(bo,null,a("7000.7021")||"重切片模式",":",w.createElement("br",null),w.createElement(Ta.Group,{value:Pl.toString(),onChange:ye=>il(Number(ye.target.value))},w.createElement(Ta.Button,{value:"1",style:{padding:"0 5px"}},"Coronal"),w.createElement(Ta.Button,{value:"2",style:{padding:"0 5px"}},"Sagittal"),w.createElement(Ta.Button,{value:"3",style:{padding:"0 5px"}},"Horizontal"),w.createElement(Ta.Button,{value:"4",style:{padding:"0 5px"}},"Arbitrary"))),w.createElement(ra,{style:{margin:"5px 0",borderColor:"rgba(5, 5, 5, .3)",minWidth:200,width:250},dashed:!0}),w.createElement(bo,null,w.createElement(to,{style:{height:"36px",lineHeight:"36px"},span:8},a("4000.0210")||"平移-X",":"),w.createElement(to,{span:12},w.createElement(Up,{min:-5.17,max:5.17,onChange:Su,step:.01,value:$r,disabled:Ze}))),w.createElement(ra,{style:{margin:"5px 0",borderColor:"rgba(5, 5, 5, .3)",minWidth:200,width:250,visibility:"hidden"},dashed:!0}),w.createElement(bo,null,w.createElement(to,{style:{height:"36px",lineHeight:"36px"},span:8},a("4000.0211")||"平移-Y",":"),w.createElement(to,{span:12},w.createElement(Up,{min:-5.33,max:2.04,onChange:Wc,step:.01,value:An,disabled:vt}))),w.createElement(ra,{style:{margin:"5px 0",borderColor:"rgba(5, 5, 5, .3)",minWidth:200,width:250,visibility:"hidden"},dashed:!0}),w.createElement(bo,null,w.createElement(to,{style:{height:"36px",lineHeight:"36px"},span:8},a("4000.0212")||"平移-Z",":"),w.createElement(to,{span:12},w.createElement(Up,{min:-8,max:6,onChange:Rd,step:.01,value:Se,disabled:At}))),w.createElement(ra,{style:{margin:"5px 0",borderColor:"rgba(5, 5, 5, .3)",minWidth:200,width:250,visibility:"hidden"},dashed:!0}),w.createElement(bo,null,w.createElement(to,{style:{height:"36px",lineHeight:"36px"},span:8},a("4000.0213")||"角度-X",":"),w.createElement(to,{span:12},w.createElement(Up,{min:0,max:360,step:1,value:on,onChange:ye=>xc(ye,1),disabled:rn}))),w.createElement(ra,{style:{margin:"5px 0",borderColor:"rgba(5, 5, 5, .3)",minWidth:200,width:250,visibility:"hidden"},dashed:!0}),w.createElement(bo,null,w.createElement(to,{style:{height:"36px",lineHeight:"36px"},span:8},a("4000.0214")||"角度-Y",":"),w.createElement(to,{span:12},w.createElement(Up,{min:0,max:360,step:1,value:xn,onChange:ye=>xc(ye,2),disabled:rn}))),w.createElement(ra,{style:{margin:"5px 0",borderColor:"rgba(5, 5, 5, .3)",minWidth:200,width:250,visibility:"hidden"},dashed:!0}),w.createElement(bo,null,w.createElement(to,{style:{height:"36px",lineHeight:"36px"},span:8},a("4000.0215")||"角度-Z",":"),w.createElement(to,{span:12},w.createElement(Up,{min:0,max:360,step:1,value:Xn,onChange:ye=>xc(ye,3),disabled:rn})))),w.createElement(za,{style:{marginTop:20},type:"primary",disabled:Cn,onClick:()=>Ku()},a("7000.0107")||"查看更高分辨率的图像"),w.createElement(ra,{style:{margin:"10px 0",borderColor:"rgba(5, 5, 5, .3)",minWidth:200,width:250},dashed:!0}),w.createElement("div",null,w.createElement("i",null,a("5000.6008")||"点击下方按钮,申请下载各向同性10微米分辨率的STAM图谱3D标签图像")),w.createElement(za,{style:{marginTop:20},type:"primary",onClick:()=>{Zc()}},a("5000.6009")||"请求STAM标签"),w.createElement(ra,{style:{margin:"5px 0",borderColor:"rgba(5, 5, 5, .3)",minWidth:200,width:250},dashed:!0})):null),at.includes("registration")&&w.createElement(Gv,{tab:a("5000.0001")||"脑片配准",key:"4",disabled:Z===2||Z===0},Lr?w.createElement(w.Fragment,null,nl.map((ye,Ne)=>w.createElement(w.Fragment,null,w.createElement(Rq.CheckableTag,{key:ye,checked:Co.includes(ye),onChange:()=>Ll([ye])},ye))),nl.length<10?w.createElement(Rq,{icon:w.createElement(Ww,null),onClick:()=>{zc(ye=>[...ye,`Task${nl.length+1}`]),Bs(ye=>[...ye,{key:`Task${nl.length+1}`,fileList:[],radioValue:"Config_DAPI.ini",fileList2:[],correspondingPlaneData:{},registrationRadioShowType:"1",firstRegistrationImg:{width:0,height:0},startButtonLoading:!1,filename:""}]),Po.current=[...Po.current,{key:`Task${nl.length+1}`,fileList:[],radioValue:"Config_DAPI.ini",fileList2:[],correspondingPlaneData:{},registrationRadioShowType:"1",firstRegistrationImg:{width:0,height:0},startButtonLoading:!1,filename:""}]}},"New task"):null,Oo.map((ye,Ne)=>{if(ye.key===Co[0]){const{key:We,fileList:tt,fileList2:Ct,correspondingPlaneData:Jt,registrationRadioShowType:$t,startButtonLoading:bn}=ye;return w.createElement("div",{key:We},w.createElement(bo,null,w.createElement(to,null,w.createElement("p",null,w.createElement("span",null,a("5000.6033")||"Upload slice, or use the test "),w.createElement("a",{onClick:()=>{Go("DAPI")}},"DAPI "),"&",w.createElement("a",{onClick:()=>{Go("PI")}}," PI "),a("5000.6034")||"slices:"))),w.createElement(bo,null,w.createElement(to,null,w.createElement(i6,{accept:"image/tiff",listType:"picture-card",fileList:tt,onPreview:tc,customRequest:_c,beforeUpload:un=>Es(un),onRemove:()=>{const un=Oo.findIndex(cr=>cr.key===Co[0]);if(un>-1){let cr=JSON.parse(JSON.stringify(Oo)),Wn=cr[un];Wn.fileList=[],Bs(cr),Po.current=cr}}},w.createElement("button",{style:{border:0,background:"none"},type:"button"},w.createElement(Ww,null),w.createElement("div",{style:{marginTop:8}},"Upload tiff"))))),w.createElement(ra,{style:{margin:"5px 0",borderColor:"rgba(5, 5, 5, .3)",minWidth:200,width:250},dashed:!0}),w.createElement(bo,null,w.createElement(to,null,w.createElement("p",null,w.createElement("span",null,a("5000.7000")||"(可选) 上传第二张脑片图像,默认该图像已经配准到了第一张上传的脑片图像上")))),w.createElement(bo,null,w.createElement(to,null,w.createElement(i6,{accept:"image/tiff",listType:"picture-card",fileList:Ct,onPreview:tc,customRequest:un=>_c(un,2),beforeUpload:un=>Es(un,2),onRemove:()=>{const un=Oo.findIndex(cr=>cr.key===Co[0]);if(un>-1){let cr=JSON.parse(JSON.stringify(Oo)),Wn=cr[un];Wn.fileList2=[],Bs(cr),Po.current=cr}}},w.createElement("button",{style:{border:0,background:"none"},type:"button"},w.createElement(Ww,null),w.createElement("div",{style:{marginTop:8}},"Upload tiff"))))),w.createElement(ra,{style:{margin:"5px 0",borderColor:"rgba(5, 5, 5, .3)",minWidth:200,width:250},dashed:!0}),w.createElement(bo,{style:{marginTop:5}},w.createElement(to,null,a("7000.0106")||"计算与上传图像对应的图谱切面",":")),w.createElement(bo,{style:{marginTop:5}},w.createElement(to,null,w.createElement(za,{loading:bn,disabled:tt.length<1,onClick:()=>Tu(Ne)},a("7000.0108")||"开始计算"),w.createElement(za,{onClick:Ld,disabled:!Jt.url},a("7000.0109")||"下载保存"))),w.createElement(bo,{style:{marginTop:5}},Jt.base64_url&&w.createElement(GD,{src:Jt.base64_url,width:100})),w.createElement(ra,{style:{margin:"5px 0",borderColor:"rgba(5, 5, 5, .3)",minWidth:200,width:250},dashed:!0}),w.createElement(bo,{style:{marginTop:5}},w.createElement(za,{onClick:()=>Qu("1"),disabled:!Jt.url},a("5000.0004")||"显示结果"),w.createElement(to,{style:{display:"flex",alignItems:"center",marginLeft:5}})),w.createElement(bo,null,w.createElement(Ta.Group,{onChange:Ic,value:$t},w.createElement(Ta,{value:"1"},a("5000.7001")||"atlas"),w.createElement(bo,null,"slice: ",w.createElement(ob,{onChange:un=>{Rs.current=un.target.checked;const cr=un.target.checked?1:-1;Ce.current.traverse(Wn=>{Wn.userData.name==="registrationPng"&&Wn.userData.imgType!=1&&Wn.scale.set(cr,1,1)})}},a("5000.7013")||"左右翻转"),w.createElement("div",{style:{wordWrap:"break-word",width:200}},w.createElement(Ta,{value:"2"},a("5000.7002")||"first"),Ct.length<1?null:w.createElement(Ta,{value:"3"},a("5000.7003")||"second"))))),w.createElement(ra,{style:{margin:"5px 0",borderColor:"rgba(5, 5, 5, .3)",minWidth:200,width:250},dashed:!0}))}else return null})):null),at.includes("download")&&w.createElement(Gv,{tab:a("5000.0005")||"数据下载",key:"5",disabled:Z===2||Z===0},Lr?w.createElement(w.Fragment,null,w.createElement(bo,null,w.createElement(to,null,a("5000.0009")||"提示:按A键切换平移和缩放模式")),w.createElement(bo,null,w.createElement(to,null,w.createElement(za,{onClick:ed},On))),w.createElement(ra,{style:{margin:"5px 0",borderColor:"rgba(5, 5, 5, .3)",minWidth:200,width:250},dashed:!0}),w.createElement(bo,{style:{marginTop:5}},w.createElement(to,null,w.createElement(za,{disabled:On===(a("5000.0006")||"选取下载范围"),onClick:Od},a("5000.0008")||"预览图像"))),w.createElement(ra,{style:{margin:"5px 0",borderColor:"rgba(5, 5, 5, .3)",minWidth:200,width:250},dashed:!0}),w.createElement(bo,{style:{alignItems:"center"}},w.createElement(to,null,a("5000.0010")||"设置采样倍数",":"),w.createElement(to,{span:12},w.createElement(Up,{min:1,max:6,step:1,defaultValue:2,value:Rn,onChange:ye=>{rr(ye),Zn({})},tooltip:{formatter:ye=>ye?Math.pow(2,ye-1):null}}))),w.createElement(ra,{style:{margin:"5px 0",borderColor:"rgba(5, 5, 5, .3)",minWidth:200,width:250},dashed:!0}),w.createElement(bo,null,w.createElement(to,null,w.createElement(za,{loading:ii,disabled:On===(a("5000.0006")||"选取下载范围"),onClick:bv},a("5000.0005")||"数据下载"))),w.createElement(ra,{style:{margin:"5px 0",borderColor:"rgba(5, 5, 5, .3)",minWidth:200,width:250},dashed:!0}),w.createElement(bo,null,w.createElement(to,null,a("5000.5031")||"数据块大小:"),w.createElement(to,null,yv)),w.createElement(ra,{style:{margin:"5px 0",borderColor:"rgba(5, 5, 5, .3)",minWidth:200,width:250},dashed:!0})):null),at.includes("mapping")&&w.createElement(Gv,{tab:a("5000.5014")||"图谱映射",key:"6",disabled:Z===2||Z===0},Lr?w.createElement(w.Fragment,null,w.createElement(bo,null,w.createElement(to,null,w.createElement("p",null,a("5000.6035")||"Upload 3D image or swc file already mapped to STAM or CCF, otherwise use the test ",w.createElement("a",{onClick:()=>{so("3D")}},a("5000.6036")||"3D image")," or ",w.createElement("a",{onClick:()=>{so("swc")}},a("5000.6037")||"swc file:"))),w.createElement(to,null,w.createElement(i6,{listType:"picture-card",fileList:ir,onPreview:tc,customRequest:wu,beforeUpload:ye=>Es(ye,1),onRemove:()=>{li([])}},w.createElement("button",{style:{border:0,background:"none"},type:"button"},w.createElement(Ww,null),w.createElement("div",{style:{marginTop:8}},"Upload"))))),w.createElement(ra,{style:{margin:"5px 0",borderColor:"rgba(5, 5, 5, .3)",minWidth:200,width:250},dashed:!0}),w.createElement(bo,{style:{marginTop:5}},w.createElement(to,null,a("5000.5015")||"选择转换方向",":"),w.createElement(to,null,w.createElement(Ta.Group,{onChange:Dl,value:Pr},w.createElement(Ta,{value:"applySTAM2CCF"},"STAM-",">","CCF"),w.createElement(Ta,{value:"applyCCF2STAM"},"CCF-",">","STAM")))),w.createElement(ra,{style:{margin:"5px 0",borderColor:"rgba(5, 5, 5, .3)",minWidth:200,width:250},dashed:!0}),w.createElement(bo,{style:{marginTop:5}},w.createElement(to,null,w.createElement(za,{loading:qt,disabled:!aa,onClick:mr},a("7000.0108")||"开始计算"),w.createElement(za,{onClick:sn,disabled:!ai.file},a("7000.0109")||"下载保存"))),w.createElement(bo,{style:{marginTop:5}},ai.base64_url&&w.createElement(GD,{src:ai.base64_url,width:100})),w.createElement(bo,{style:{marginTop:5}},w.createElement(za,{onClick:Ju,disabled:!(ai.file&&ai.file[1])},a("5000.0004")||"显示结果")),w.createElement(ra,{style:{margin:"5px 0",borderColor:"rgba(5, 5, 5, .3)",minWidth:200,width:250},dashed:!0}),w.createElement("p",null,a("7000.7014")||"您也可以在此下载",w.createElement("a",{href:`${n}/data/Fiji.zip`},"Fji")," / ",w.createElement("a",{href:n+"/data/ImageJ.zip"},"ImageJ"),w.createElement("span",null,a("7000.7015")||"的插件;您可能需要使用测试数据,请"),w.createElement("a",{href:`${n}/data/test.zip`},a("7000.7016")||"在此"),w.createElement("span",null,a("7000.7017")||"下载"))):null),at.includes("neurons")&&w.createElement(Gv,{tab:a("5000.5052")||"神经环路",key:"7",disabled:Z===2||Z===0},Lr?w.createElement(w.Fragment,null,w.createElement("p",null,w.createElement("span",null,a("5000.6029")||"Navigate the "),w.createElement("a",{style:{textDecoration:"underline"},onClick:()=>{Jo(!0)}},a("5000.6030")||"whole-brain connectivity diagram"),w.createElement("span",null,a("5000.6031")||"consisting of single neuronal projections,or:")),ya?w.createElement(L9,{ref:Ol,style:{width:"100%"},options:In,placeholder:a("5000.5053")||"Input the inquired structure",onSearch:Zi,onChange:Sv,value:ya}):w.createElement(lL,{showSearch:!0,ref:Hc,style:{width:"100%"},value:ya,dropdownStyle:{maxHeight:400,overflow:"hidden"},placeholder:a("5000.5053")||"Input the inquired structure",allowClear:!0,treeDefaultExpandAll:!1,onChange:Sv,onSearch:Sv,treeData:rc(Re)}),w.createElement("p",{style:{fontSize:"13px",fontStyle:"italic"}},w.createElement("span",null,a("5000.6001")||"Input an inquired structure to visualize the connectivity map, for example, "),w.createElement("a",{onClick:Ql("CP"),style:{textDecoration:"underline"}},"CP"),", ",w.createElement("a",{onClick:Ql("PIR1"),style:{textDecoration:"underline"}},"PIR1"),", or ",w.createElement("a",{onClick:Ql("Primary motor area, Layer 6a"),style:{textDecoration:"underline"}}," Primary motor area, Layer 6a")),w.createElement(ra,{style:{margin:"5px 0",borderColor:"rgba(5, 5, 5, .3)",minWidth:200,width:280},dashed:!0}),w.createElement("div",{style:{width:"100%",height:"calc(100vh - 330px)",overflow:"scroll",paddingTop:"10px"}},w.createElement("div",{style:Fs?{border:"2px solid #e6e6e6",borderRadius:"5px",paddingLeft:"5px",paddingBottom:"5px"}:{}},Fs&&w.createElement("h2",{style:{lineHeight:"3px"}},a("5000.5054")||"Upstream"),w.createElement("div",{ref:go,style:{width:"100%"}})),w.createElement("br",null),w.createElement("div",{style:Fs?{border:"2px solid #e6e6e6",borderRadius:"5px",paddingLeft:"5px",paddingBottom:"5px"}:{}},Fs&&w.createElement("h2",{style:{lineHeight:"3px"}},a("5000.5055")||"Downstream"),w.createElement("div",{ref:ta,style:{width:"100%"}})))):null)),ja&&w.createElement(GD,{wrapperStyle:{display:"none"},preview:{visible:Ba,onVisibleChange:ye=>Wa(ye),afterOpenChange:ye=>!ye&&Ks("")},src:ja}),w.createElement(em,{open:ht,onClose:()=>rt(!1),steps:rf}),w.createElement(em,{open:ct,onClose:()=>pt(!1),steps:Id,mask:!0}),w.createElement(em,{open:Be,onClose:()=>ft(!1),steps:xu,mask:!0}),w.createElement(em,{open:St,onClose:()=>Tt(!1),steps:yc,mask:!0}),w.createElement(em,{open:mt,onClose:()=>yt(!1),steps:bu,mask:!0}),w.createElement(em,{open:Nt,onClose:()=>Yt(!1),steps:ju,mask:!0}),w.createElement(em,{open:Mn,onClose:()=>tn(!1),steps:Xu,mask:!0}),w.createElement(em,{open:Pn,onClose:()=>Ft(!1),steps:Ad,mask:!0}),w.createElement(hT,{direction:2,percentage:.2,pointMax:Rt.current,pointMin:Vt.current,color:16777215,sliceImgNum:205,slicePath:n+"/data/SLICE/",transformControls:je,controls:h,canvas_width:gt,canvas_height:Qe,handleStateUpdate:pl,cube_helper:_t,renderer:f,showMesh:fr,setAngleX:cn,setAngleY:pn,setAngleZ:zn,gray_value:Me,setSectionsInfo:oe,sectionsInfoRef:ke,sectionPointRef:fs,composer:Ue,menutagShowRef:Lo,tabIndex:Kn}),w.createElement(hT,{direction:3,percentage:.2,pointMax:Rt.current,pointMin:Vt.current,color:16777215,sliceImgNum:160,slicePath:n+"/data/SLICE/",transformControls:je,controls:h,canvas_width:gt,canvas_height:Qe,handleStateUpdate:pl,cube_helper:_t,renderer:f,showMesh:lr,setAngleX:cn,setAngleY:pn,setAngleZ:zn,gray_value:Me,setSectionsInfo:oe,sectionsInfoRef:ke,sectionPointRef:fs,composer:Ue,menutagShowRef:Lo,tabIndex:Kn}),w.createElement(hT,{direction:1,percentage:.2,pointMax:Rt.current,pointMin:Vt.current,color:16777215,sliceImgNum:264,slicePath:n+"/data/SLICE/",transformControls:je,controls:h,canvas_width:gt,canvas_height:Qe,handleStateUpdate:pl,cube_helper:_t,renderer:f,showMesh:ur,setAngleX:cn,setAngleY:pn,setAngleZ:zn,gray_value:Me,setSectionsInfo:oe,sectionsInfoRef:ke,sectionPointRef:fs,composer:Ue,menutagShowRef:Lo,tabIndex:Kn}),w.createElement(hT,{direction:4,percentage:.5,pointMax:Rt.current,pointMin:Vt.current,slice_arbitrary:Pt,color:16777215,sliceImgNum:264,slicePath:n+"/data/SLICE/",transformControls:je,controls:h,canvas_width:gt,canvas_height:Qe,handleStateUpdate:pl,normalVector:bt,cube_helper:_t,renderer:f,showMesh:En,setAngleX:cn,setAngleY:pn,setAngleZ:zn,settransformControlsType:Vs,gray_value:Me,setSectionsInfo:oe,sectionsInfoRef:ke,sectionPointRef:fs,composer:Ue,menutagShowRef:Lo,tabIndex:Kn}),w.createElement("div",{id:"spinner",style:{position:"absolute",zIndex:999,left:0,top:0,width:"100%",height:"100%",display:`${Rr?"block":"none"}`,opacity:.7,backgroundColor:"#ffffff"}},w.createElement("div",{style:{position:"absolute",zIndex:999,left:"50%",top:"50%",fontWeight:"bold",textAlign:"center"}},w.createElement(pz,{spinning:!0,size:"large"}),w.createElement("br",null),"Loading....wait...")),w.createElement(Os,{open:Wt,centered:!0,okText:a("5000.0011")||"发送邮件",cancelText:a("5000.0112")||"取消",onOk:()=>{const ye="Request to download data blocks",Ne=`startX:${(Mt.current.bwidth*11.15).toFixed(2)},startY:${(Mt.current.bheight*12.31).toFixed(2)},startZ:${(Mt.current.bdepth*10).toFixed(2)}
|
|
4428
4428
|
endX:${(Mt.current.ewidth*11.15).toFixed(2)},startY:${(Mt.current.eheight*12.31).toFixed(2)},startZ:${(Mt.current.edepth*10).toFixed(2)}
|
|
4429
4429
|
Downsampling level:${Rn}
|
|
4430
4430
|
`,tt=`mailto:fengzhao@brainsmatics.org?subject=${encodeURIComponent(ye)}&body=${encodeURIComponent(Ne)}`,Ct=document.createElement("a");Ct.href=tt,Ct.click(),vn(!1)},onCancel:()=>vn(!1)},a("5000.0012")||"当前下载文件已超出服务器传输限制,您可以选择降低采样等级或者发送邮件,是否发送邮件?"),w.createElement(Os,{open:Yi,centered:!0,footer:null,onCancel:()=>{an(!1),wr(0)}},Tr===0?w.createElement(w.Fragment,null,w.createElement("div",{style:{marginTop:20}},a("5000.5044")||"当前key信息尚未验证,不可计算,请选择申请key或者填写Key"),w.createElement("div",{style:{textAlign:"right",marginTop:20}},w.createElement(za,{type:"primary",onClick:()=>{Tr===0?wr(2):(wr(0),an(!1))}},"Go on"))):Tr===1?w.createElement(w.Fragment,null,w.createElement(Nc,{name:"register",labelCol:{span:6},wrapperCol:{span:16},style:{maxWidth:600},initialValues:{remember:!0},onFinish:Hg,onFinishFailed:F0,autoComplete:"off"},w.createElement(Nc.Item,{name:"userName",label:a("5000.5070")||"Applicant",rules:[{required:!0,message:a("5000.5070")||"Applicant"}]},w.createElement(Uc,null)),w.createElement(Nc.Item,{name:"email",label:a("5000.5071")||"Email",rules:[{type:"email",message:a("5000.5071")||"Email"},{required:!0,message:a("5000.5071")||"Email"}]},w.createElement(Uc,null)),w.createElement(Nc.Item,{name:"company",label:a("5000.5072")||"Affiliation",rules:[{required:!0,message:a("5000.5072")||"Affiliation"}]},w.createElement(Uc,null)),w.createElement(Nc.Item,{name:"aplDescribe",label:a("5000.5073")||"Purpose of use",rules:[{required:!0,message:a("5000.5073")||"Purpose of use"}]},w.createElement(mle,null)),w.createElement("div",{style:{margin:"0 20px 10px 30px"}},a("5000.5051")||"提示:key值将会发送到所填邮箱账号上,请提交完后关注邮箱是否收到信息。"),w.createElement(Nc.Item,{wrapperCol:{offset:10,span:16}},w.createElement(za,{type:"primary",htmlType:"submit"},a("5000.5045")||"提交")))):w.createElement(w.Fragment,null,a("5000.5049")||"key值",": ",w.createElement(Uc,{style:{width:380},placeholder:"brains-wl2mwcUzjU",onChange:ye=>{localStorage.setItem("imgKey",ye.target.value)}}),w.createElement("div",{style:{textAlign:"center",marginTop:20}},w.createElement(za,{type:"primary",onClick:()=>{an(!1),localStorage.getItem("imgKey")||localStorage.setItem("imgKey","brains-wl2mwcUzjU"),mr()}},a("5000.5050")||"保存")))),w.createElement(Os,{open:jt,centered:!0,footer:null,onCancel:()=>{zr(!1),zi(0)}},As===0?w.createElement(w.Fragment,null,w.createElement("div",{style:{marginTop:20}},a("5000.6011")||"请注意,使用此功能需要提供下载许可号,如果您没有下载许可号,请点击下方按钮向我们申请"),w.createElement("div",{style:{textAlign:"right",marginTop:20}},w.createElement(za,{style:{marginRight:10},onClick:()=>{As===0?zi(1):(zi(0),zr(!1))}},a("5000.6012")||"申请下载许可号"),w.createElement(za,{type:"primary",onClick:()=>{As===0?zi(2):(zi(0),zr(!1))}},a("5000.6013")||"填写下载许可号"))):As===1?w.createElement(w.Fragment,null,w.createElement(Nc,{name:"register2",labelCol:{span:6},wrapperCol:{span:16},style:{maxWidth:600},initialValues:{remember:!0},onFinish:Hg,onFinishFailed:F0,autoComplete:"off"},w.createElement(Nc.Item,{name:"userName",label:a("5000.5070")||"Applicant",rules:[{required:!0,message:a("5000.5070")||"Applicant"}]},w.createElement(Uc,null)),w.createElement(Nc.Item,{name:"email",label:a("5000.5071")||"Email",rules:[{type:"email",message:a("5000.5071")||"Email"},{required:!0,message:a("5000.5071")||"Email"}]},w.createElement(Uc,null)),w.createElement(Nc.Item,{name:"company",label:a("5000.5072")||"Affiliation",rules:[{required:!0,message:a("5000.5072")||"Affiliation"}]},w.createElement(Uc,null)),w.createElement(Nc.Item,{name:"aplDescribe",label:a("5000.5073")||"Purpose of use",rules:[{required:!0,message:a("5000.5073")||"Purpose of use"}]},w.createElement(mle,null)),w.createElement("div",{style:{margin:"0 20px 10px 30px"}},a("5000.6010")||"提示:下载所用的许可号将会发送到您所填写的邮箱,请在提交结束后关注是否收到包含许可号的邮件。"),w.createElement(Nc.Item,{wrapperCol:{offset:10,span:16}},w.createElement(za,{type:"primary",htmlType:"submit"},a("5000.5045")||"提交")))):w.createElement(w.Fragment,null,a("5000.6014")||"许可号",": ",w.createElement(Uc,{style:{width:380},onChange:ye=>{Yn.current=ye.target.value}}),w.createElement("div",{style:{textAlign:"center",marginTop:20}},w.createElement(za,{type:"primary",onClick:()=>{fetch("/app-api/d-api/check",{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:Yn.current,aplType:2})}).then(ye=>ye.ok?(zr(!1),Ei.current=!0,Kn==3?Zc():bv(),ye.json()):(Ei.current=!1,ye.json())).then(ye=>{ye.message&&Os.error({content:ye.message})})}},a("5000.5050")||"保存")))),w.createElement(Os,{open:be,centered:!0,footer:null,onCancel:()=>{ce(!1)}},w.createElement(F2,{tabPosition:"left",onChange:Zu,style:{minHeight:250},key:Y,activeKey:Vr.toString(),defaultActiveKey:"1"},w.createElement(Gv,{tab:a("5000.7006")||"可见性",key:"1"},w.createElement("div",{style:{display:"flex",flexDirection:"column",gap:"10px"}},w.createElement("div",null,a("4000.0217")||"左半脑",": ",w.createElement(Qg,{onChange:Wb,checked:kn})),w.createElement("div",null,a("4000.0218")||"坐标",": ",w.createElement(Qg,{checked:mu,onChange:U0})),w.createElement("div",null,a("4000.0219")||"基准点",": ",w.createElement(Qg,{checked:Ae,onChange:Nr})),w.createElement("div",null,a("5000.5016")||"颅骨",": ",w.createElement(Qg,{checked:qi.cranialVisibility,onChange:xv})),w.createElement("div",null,a("5000.6044")||"网格",": ",w.createElement(Qg,{checked:qi.gridVisibility,defaultChecked:!0,onChange:ye=>{dt(ye),qi.gridVisibility=ye}})),at.includes("neurons")?w.createElement("div",null,a("5000.7005")||"末梢点",": ",w.createElement(Qg,{defaultChecked:!0,checked:qi.terminalVisibility,onChange:ye=>{He.current.end=ye,qi.terminalVisibility=ye,Gc({}),Ce.current.traverse(Ne=>{Ne.myMeshType==="neuronSphere"&&Ne.userData.type=="end"&&(Ne.visible=ye)})}})):null,at.includes("neurons")?w.createElement("div",{style:{display:"flex",alignItems:"center",gap:"10px"}},a("5000.7007")||"分支点",": ",w.createElement(Qg,{defaultChecked:!0,checked:qi.branchingVisibility,onChange:ye=>{He.current.start=ye,qi.branchingVisibility=ye,Gc({}),Ce.current.traverse(Ne=>{Ne.myMeshType==="neuronSphere"&&Ne.userData.type=="start"&&(Ne.visible=ye)})}}),w.createElement(oL,{style:{marginLeft:"15px"},format:"rgb",defaultValue:"#A7B5A1",value:qi.branchingColor,onChange:(ye,Ne)=>{qi.branchingColor=Ne,Gc({}),Ce.current.traverse(We=>{We.myMeshType==="neuronSphere"&&We.userData.type=="start"&&(We.material.color.set(Ne),He.current.start_color=Ne,We.userData.color=Ne)})}})):null,w.createElement("div",{style:{display:"flex",gap:"10px",whiteSpace:"nowrap"}},a("5000.6045")||"外轮廓",": ",w.createElement(Qg,{checked:Yl,onChange:ye=>{if(qi.brainContourVisibility=ye,ye){let Ne=Ce.current.getObjectByName("Brain");Ne&&(Ne.visible=!0,Rl(!0))}else{let Ne=Ce.current.getObjectByName("Brain");Ne&&(Ne.visible=!1,Rl(!1))}}}),w.createElement("div",{style:{marginLeft:"15px",display:"flex"}},a("5000.7004")||"阻光度",": ",w.createElement(Up,{style:{width:"100px",margin:"6px 5px"},min:0,max:1,step:.1,disabled:!Yl,onChange:ye=>{Gu(ye),qi.brainContourOpacity=ye;let Ne=Ce.current.getObjectByName("Brain");Ne&&(Ne.children[0].material.opacity=ye)},value:typeof yu=="number"?yu:0}))))),w.createElement(Gv,{tab:a("5000.5024")||"其它图谱",key:"2"},w.createElement(Ta.Group,{onChange:Js,value:Ut},w.createElement(EP,{direction:"vertical"},w.createElement(Ta,{value:"None"},"None"),w.createElement(Ta,{value:"CCF"},"CCF"),w.createElement(Ta,{value:"WHS"},"WHS")))))),w.createElement(Os,{className:"Echart",title:w.createElement(w.Fragment,null,w.createElement("span",null,"Connectivity diagram"),w.createElement(za,{onClick:()=>{ho(!ao)},style:{marginLeft:"15px"}},"Reset ",w.createElement(bje,{style:{verticalAlign:"super"}}))),style:{position:"absolute",top:"0",bottom:"0",left:"323px",right:"440px",margin:"auto"},open:Zl,onOk:zg,onCancel:k0,width:"auto",footer:null},fe?w.createElement(PAt,{axon_check:fe,fbxTreeDatas:Re,setLeftMenuTabIndex:ne,swcRef:pe,setIsChartOpen:Jo,setEchartValue:we,setChartValue:mo,reset:ao}):null),w.createElement("div",{ref:Ke,className:"class",style:{width:0,height:0,overflow:"hidden",position:"fixed",top:"50%",left:"50%"}}))}),BAt=w.memo(t=>{const{direction:e,percentage:n,pointMax:r,pointMin:i,color:a,sliceImgNum:o,slicePath:s,transformControls:c,controls:u,handleStateUpdate:d,canvas_width:f,canvas_height:h,cube_helper:p,renderer:v,showMesh:y,slice_arbitrary:m,normalVector:g,canMouseMove:x=!0,setAngleX:b,setAngleY:S,setAngleZ:E,gray_value:T,setSectionsInfo:M,sectionsInfoRef:L,sectionPointRef:R,composer:O,menutagShowRef:N,tabIndex:U,settransformControlsType:k}=t,D=w.useRef([]),V=w.useRef(null),B=w.useRef(new hb),F=w.useRef(new js),j=w.useRef(0),K=w.useRef(0),W=w.useRef(0),G=w.useRef(new Bn),J=w.useRef(new EO),re=w.useRef(!1),Z=w.useRef({target:u.current.target.clone(),position:u.current.object.position.clone(),up:u.current.object.up.clone(),enabled:u.current.enabled}),q=w.useRef(null);w.useEffect(()=>(V.current=null,D.current=[new xf(new me(-1,0,0),-1*i.x),new xf(new me(0,1,0),-1*i.y),new xf(new me(0,0,1),-1*i.z),new xf(new me(1,0,0),r.x),new xf(new me(0,-1,0),r.y),new xf(new me(0,0,-1),r.z)],fe(),()=>{m!=null&&m.current&&document.removeEventListener("keydown",te)}),[r,i]),w.useEffect(()=>{if(y){if(V.current)if(m!=null&&m.current){const pe=R.current.position;m.current=V.current,m.current.position.set(pe.x,pe.y,pe.z),Ce.current.add(m.current),Q()}else{const pe=R.current.position;if(V.current){let ee=V.current.name;ee==="CoronalView"?V.current.position.z=pe.z:ee==="SagittalView"?V.current.position.x=pe.x:ee==="HorizontalView"&&(V.current.position.y=pe.y)}Ce.current.add(V.current),Q()}if(x){if(v.domElement.addEventListener("mousemove",he),v.domElement.addEventListener("mouseup",he),ne(),c.current=new S2(Ai.current,v==null?void 0:v.domElement),c.current.setMode("translate"),c.current.enabled=!0,c.current.visible=!0,V.current){let pe=V.current.name;pe==="CoronalView"?(c.current.showX=!1,c.current.showY=!1):pe==="SagittalView"?(c.current.showY=!1,c.current.showZ=!1):pe==="HorizontalView"&&(c.current.showX=!1,c.current.showZ=!1)}Y()}}else v.domElement.removeEventListener("mousemove",he),v.domElement.removeEventListener("mouseup",he);return()=>{v.domElement.removeEventListener("mousemove",he),v.domElement.removeEventListener("mouseup",he),v.domElement.style.cursor="default",m!=null&&m.current&&document.removeEventListener("keydown",te)}},[y,re]);const ne=()=>{m!=null&&m.current&&document.addEventListener("keydown",te)},Y=()=>{if(V!=null&&V.current){c.current.remove(V.current),Ce.current.getObjectByName("transformControls")&&Ce.current.remove(c.current),c.current.name="transformControls",c.current.attach(V.current),c.current.space="local",Ce.current.add(c.current);let ee=Ce.current.getObjectByName("Brain"),le=new me(-5.097530670166015,-5.308416134996751,-7.990437196406743),ce=new me(5.118084411621094,2.006702558657828,6.001559863476661);if(ee){const be=new rs;be.expandByObject(ee.clone()),le=be.min,ce=be.max,c.current.addEventListener("change",()=>{if(V.current){V.current.updateMatrixWorld();const Re=V.current.position;Re.x<le.x&&V.current.position.setX(le.x),Re.x>ce.x&&V.current.position.setX(ce.x),Re.y<le.y&&V.current.position.setY(le.y),Re.y>ce.y&&V.current.position.setY(ce.y),Re.z<le.z&&V.current.position.setZ(le.z),Re.z>ce.z&&V.current.position.setZ(ce.z)}}),c.current.addEventListener("dragging-changed",function(Re){var Ue,we,Ie;if(Re.value){if(u.current.enableRotate=!1,u.current.enabled=!1,Z.current={target:u.current.target.clone(),position:u.current.object.position.clone(),up:u.current.object.up.clone(),enabled:u.current.enabled},F.current){let ke=B.current.load(s+"2.png");F.current.map=ke}}else u.current.enableRotate=!0,u.current.enabled=!0,u.current.reset(),u.current.target.copy(Z.current.target),u.current.object.position.copy(Z.current.position),u.current.object.up.copy(Z.current.up),u.current.update(),Q();if(c.current.mode==="rotate"){let ke=c.current.object;if(ke){let ue=(((Ue=ke==null?void 0:ke.rotation)==null?void 0:Ue.x)+2*Math.PI)%(2*Math.PI),oe=(((we=ke==null?void 0:ke.rotation)==null?void 0:we.y)+2*Math.PI)%(2*Math.PI),Me=(((Ie=ke==null?void 0:ke.rotation)==null?void 0:Ie.z)+2*Math.PI)%(2*Math.PI),Fe=(ue*180/Math.PI).toFixed(0),Te=(oe*180/Math.PI).toFixed(0),Ae=(Me*180/Math.PI).toFixed(0);if(b(parseInt(Fe)),S(parseInt(Te)),E(parseInt(Ae)),ke.matrixWorld.invert()){if(g!=null&&g.current){const He=new me(0,1,0);g.current=He.applyEuler(ke==null?void 0:ke.rotation)}}else console.log("逆矩阵计算失败")}}if(c.current.mode==="translate"){let ke=c.current.object;if(ke){let ue=ke.position;d&&d({positionx:ue.x,positiony:ue.y,positionz:ue.z})}}})}else setTimeout(()=>{Y()},50)}},te=pe=>{if(pe.key==="r"){let ee=!re.current;re.current=ee,ee?(c.current.setMode("rotate"),k&&k(1)):(c.current.setMode("translate"),k&&k(0))}},fe=()=>{B.current=new hb;let pe=B.current.load(s+"1.png"),ee=new js({specular:0,color:"#fff",shininess:20,transparent:!0,map:pe,clippingPlanes:D.current,clipShadows:!0,alphaTest:.1});F.current=ee;let le=r.x-i.x,ce=r.y-i.y,be=r.z-i.z,Re=(r.x+i.x)/2,Ue=(r.y+i.y)/2,we=(r.z+i.z)/2,Ie=n,ke;e==1?(be=.01,we=(1-Ie)*i.z+Ie*r.z,ke=new Dn(new ns(le,ce,be),ee),ke.position.set(Re,Ue,we),ke.name="CoronalView"):e==2?(le=.01,Re=(1-Ie)*i.x+Ie*r.x,ke=new Dn(new ns(le,ce,be),ee),ke.position.set(Re,Ue,we),ke.name="SagittalView"):e==3?(ce=.01,Ue=(1-Ie)*i.y+Ie*r.y,ke=new Dn(new ns(le,ce,be),ee),ke.position.set(Re,Ue,we),ke.name="HorizontalView"):e==4&&(ce=.01,le=le*2,be=be*2,Ue=(1-Ie)*i.y+Ie*r.y,ke=new Dn(new ns(le,ce,be),ee),ke.position.set(Re,Ue,we),ke.rotation.set(120/180*Math.PI,320/180*Math.PI,270/180*Math.PI),ke.material.needsUpdate=!0,g!=null&&g.current&&(g.current=new me(0,1,0))),j.current=le,K.current=ce,W.current=be,ke&&(ke.userData.initposition=ke.position.clone(),ke.userData.initRotation=ke.rotation.clone(),V.current=ke,m!=null&&m.current&&(m.current=ke)),e==4&&(m!=null&&m.current)&&(m.current.name="arbitrarySlice")},se=(pe,ee,le)=>{const ce=Math.cos(ee),be=Math.sin(ee),Re=pe.x-le.x,Ue=pe.y-le.y,we=Re*ce-Ue*be,Ie=Re*be+Ue*ce;return new Bn(we+le.x,Ie+le.y)},he=pe=>{pe.stopPropagation(),pe.preventDefault(),G.current.x=pe.offsetX/f.current*2-1,G.current.y=-(pe.offsetY/h.current)*2+1,J.current.setFromCamera(G.current,Ai.current);let ee=J.current.intersectObjects(Ce.current.children,!0);if(clearTimeout(q.current),ee.length>0)if(m!=null&&m.current){let le=ee.findIndex(ce=>ce.object==m.current);if(le==-1&&U==3)(L.current.gray||L.current.brains)&&(q.current=setTimeout(()=>{M({}),L.current={}},50));else{const ce=ee[le].uv,be=ee[le].point;let Re=new URL(window.location.href),Ue=new URLSearchParams(Re.search),we=JSON.stringify(be);if(Ue.set("sectionPointPosition",we),Re.search=Ue.toString(),window.history.replaceState({},"",Re),pe.button===2){R.current.position.set(be.x,be.y,be.z);const ue=Ce.current.getObjectByName("sectionSphere");ue?ue.position.set(be.x,be.y,be.z):Ce.current.add(R.current)}const ke=ee[le].object.material.map;if(ke){const ue=ke.image,oe=ke.rotation,Me=ke.center,Fe=se(ce,-oe,Me),Te=document.createElement("canvas"),Ae=Te.getContext("2d");ue&&(Te.width=ue.width,Te.height=ue.height),Ae.drawImage(ue,0,0);const dt=Ae.getImageData(0,0,Te.width,Te.height),He=Math.floor(Fe.x*Te.width),st=(Math.floor((1-Fe.y)*Te.height)*Te.width+He)*4,at=dt.data[st],Pe=dt.data[st+1],ht=dt.data[st+2],rt=T.current[`${at},${Pe},${ht}`];q.current=setTimeout(()=>{at===0&&L.current.gray===0||(M({gray:`${at},${Pe},${ht}`,brains:rt,left:pe.clientX,top:pe.clientY}),L.current={gray:at,brains:rt,left:pe.clientX,top:pe.clientY})},50)}}}else{let le=ee.findIndex(ce=>ce.object==V.current);if(le===-1&&U==3)L.current.gray&&(q.current=setTimeout(()=>{M({}),L.current={}},50));else{const ce=ee[le].uv,be=ee[le].point;let Re=new URL(window.location.href),Ue=new URLSearchParams(Re.search),we=JSON.stringify(be);if(Ue.set("sectionPointPosition",we),Re.search=Ue.toString(),window.history.replaceState({},"",Re),pe.button===2){R.current.position.set(be.x,be.y,be.z);const ue=Ce.current.getObjectByName("sectionSphere");ue?ue.position.set(be.x,be.y,be.z):Ce.current.add(R.current)}const ke=ee[le].object.material.map;if(ke){const ue=ke.image,oe=ke.rotation,Me=ke.center,Fe=se(ce,-oe,Me),Te=document.createElement("canvas"),Ae=Te.getContext("2d");Te.width=ue.width,Te.height=ue.height,Ae.drawImage(ue,0,0);const dt=Ae.getImageData(0,0,Te.width,Te.height),He=Math.floor(Fe.x*Te.width),st=(Math.floor((1-Fe.y)*Te.height)*Te.width+He)*4,at=dt.data[st],Pe=dt.data[st+1],ht=dt.data[st+2],rt=T.current[`${at},${Pe},${ht}`];q.current=setTimeout(()=>{at===0&&L.current.gray===0||(M({gray:`${at},${Pe},${ht}`,brains:rt,left:pe.clientX,top:pe.clientY}),L.current={gray:at,brains:rt,left:pe.clientX,top:pe.clientY})},50)}}}else L.current.gray&&U==3&&(q.current=setTimeout(()=>{M({}),L.current={}},50))},Q=()=>{var ce,be,Re,Ue,we,Ie;const pe=Ce.current.getObjectByName("Brain");let ee=new ka;ee.setFromAxisAngle(new me(1,0,0),Math.PI/2);let le=new me;if(V.current){let ke=(((be=(ce=V.current)==null?void 0:ce.rotation)==null?void 0:be.x)+2*Math.PI)%(2*Math.PI),ue=(((Ue=(Re=V.current)==null?void 0:Re.rotation)==null?void 0:Ue.y)+2*Math.PI)%(2*Math.PI),oe=(((Ie=(we=V.current)==null?void 0:we.rotation)==null?void 0:Ie.z)+2*Math.PI)%(2*Math.PI),Me=parseInt((ke*180/Math.PI).toFixed(0)),Fe=parseInt((ue*180/Math.PI).toFixed(0)),Te=parseInt((oe*180/Math.PI).toFixed(0));if(pe)le=V.current.position.clone().applyMatrix4(pe.matrixWorld.clone().invert()).applyQuaternion(ee);else{setTimeout(()=>{Q()},50);return}e==1?fetch("/app-api/c-api/slicing",{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify({x:0,y:0,z:le.z})}).then(Ae=>Ae.ok?Ae.json():Os.error({title:Ae.message})).then(Ae=>{const dt=Ae.base64;let He=B.current.load(dt);He.center.set(.5,.5),He.rotation=Math.PI,F.current&&(F.current.map=He)}):e==2?fetch("/app-api/c-api/slicing",{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify({x:le.x,y:0,z:0})}).then(Ae=>Ae.ok?Ae.json():Os.error({title:Ae.message})).then(Ae=>{const dt=Ae.base64;let He=B.current.load(dt);if(V.current){const st=V.current.geometry.attributes.uv.array,at=ht=>{st[ht+0]=1,st[ht+1]=0,st[ht+2]=1,st[ht+3]=1,st[ht+4]=0,st[ht+5]=0,st[ht+6]=0,st[ht+7]=1},Pe=ht=>{st[ht+0]=1,st[ht+1]=1,st[ht+2]=1,st[ht+3]=0,st[ht+4]=0,st[ht+5]=1,st[ht+6]=0,st[ht+7]=0};at(0),Pe(8),V.current.geometry.attributes.uv.needsUpdate=!0,F.current&&(F.current.map=He)}}):e==3?fetch("/app-api/c-api/slicing",{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify({x:0,y:le.y,z:0})}).then(Ae=>Ae.ok?Ae.json():Os.error({title:Ae.message})).then(Ae=>{const dt=Ae.base64;let He=B.current.load(dt);if(V.current){const st=V.current.geometry.attributes.uv.array;(Pe=>{st[Pe+0]=1,st[Pe+1]=0,st[Pe+2]=0,st[Pe+3]=0,st[Pe+4]=1,st[Pe+5]=1,st[Pe+6]=0,st[Pe+7]=1})(24),V.current.geometry.attributes.uv.needsUpdate=!0,F.current&&(F.current.map=He)}}):fetch("/app-api/c-api/slicing",{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify({angles:[Me,Fe,Te],center:[le.x,le.y,le.z]})}).then(Ae=>Ae.ok?Ae.json():Os.error({title:Ae.message})).then(Ae=>{const dt=Ae.base64;let He=B.current.load(dt);if(V.current){const st=V.current.geometry.attributes.uv.array;(Pe=>{st[Pe+0]=0,st[Pe+1]=0,st[Pe+2]=1,st[Pe+3]=0,st[Pe+4]=0,st[Pe+5]=1,st[Pe+6]=1,st[Pe+7]=1})(24),V.current.geometry.attributes.uv.needsUpdate=!0,F.current&&(F.current.map=He)}})}};return w.createElement(w.Fragment,null)}),hT=BAt;class Lle extends lp{constructor(e){super(e)}load(e,n,r,i){const a=this,o=new DI(this.manager);o.setPath(this.path),o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(s){try{n(a.parse(s))}catch(c){i?i(c):console.error(c),a.manager.itemError(e)}},r,i)}parse(e){function n(u){const d=new DataView(u),f=32/8*3+32/8*3*3+16/8,h=d.getUint32(80,!0);if(80+32/8+h*f===d.byteLength)return!0;const v=[115,111,108,105,100];for(let y=0;y<5;y++)if(r(v,d,y))return!1;return!0}function r(u,d,f){for(let h=0,p=u.length;h<p;h++)if(u[h]!==d.getUint8(f+h))return!1;return!0}function i(u){const d=new DataView(u),f=d.getUint32(80,!0);let h,p,v,y=!1,m,g,x,b,S;for(let N=0;N<80-10;N++)d.getUint32(N,!1)==1129270351&&d.getUint8(N+4)==82&&d.getUint8(N+5)==61&&(y=!0,m=new Float32Array(f*3*3),g=d.getUint8(N+6)/255,x=d.getUint8(N+7)/255,b=d.getUint8(N+8)/255,S=d.getUint8(N+9)/255);const E=84,T=12*4+2,M=new Wi,L=new Float32Array(f*3*3),R=new Float32Array(f*3*3),O=new Yr;for(let N=0;N<f;N++){const U=E+N*T,k=d.getFloat32(U,!0),D=d.getFloat32(U+4,!0),V=d.getFloat32(U+8,!0);if(y){const B=d.getUint16(U+48,!0);B&32768?(h=g,p=x,v=b):(h=(B&31)/31,p=(B>>5&31)/31,v=(B>>10&31)/31)}for(let B=1;B<=3;B++){const F=U+B*12,j=N*3*3+(B-1)*3;L[j]=d.getFloat32(F,!0),L[j+1]=d.getFloat32(F+4,!0),L[j+2]=d.getFloat32(F+8,!0),R[j]=k,R[j+1]=D,R[j+2]=V,y&&(O.set(h,p,v).convertSRGBToLinear(),m[j]=O.r,m[j+1]=O.g,m[j+2]=O.b)}}return M.setAttribute("position",new $o(L,3)),M.setAttribute("normal",new $o(R,3)),y&&(M.setAttribute("color",new $o(m,3)),M.hasColors=!0,M.alpha=S),M}function a(u){const d=new Wi,f=/solid([\s\S]*?)endsolid/g,h=/facet([\s\S]*?)endfacet/g,p=/solid\s(.+)/;let v=0;const y=/[\s]+([+-]?(?:\d*)(?:\.\d*)?(?:[eE][+-]?\d+)?)/.source,m=new RegExp("vertex"+y+y+y,"g"),g=new RegExp("normal"+y+y+y,"g"),x=[],b=[],S=[],E=new me;let T,M=0,L=0,R=0;for(;(T=f.exec(u))!==null;){L=R;const O=T[0],N=(T=p.exec(O))!==null?T[1]:"";for(S.push(N);(T=h.exec(O))!==null;){let D=0,V=0;const B=T[0];for(;(T=g.exec(B))!==null;)E.x=parseFloat(T[1]),E.y=parseFloat(T[2]),E.z=parseFloat(T[3]),V++;for(;(T=m.exec(B))!==null;)x.push(parseFloat(T[1]),parseFloat(T[2]),parseFloat(T[3])),b.push(E.x,E.y,E.z),D++,R++;V!==1&&console.error("THREE.STLLoader: Something isn't right with the normal of face number "+v),D!==3&&console.error("THREE.STLLoader: Something isn't right with the vertices of face number "+v),v++}const U=L,k=R-L;d.userData.groupNames=S,d.addGroup(U,k,M),M++}return d.setAttribute("position",new ha(x,3)),d.setAttribute("normal",new ha(b,3)),d}function o(u){return typeof u!="string"?new TextDecoder().decode(u):u}function s(u){if(typeof u=="string"){const d=new Uint8Array(u.length);for(let f=0;f<u.length;f++)d[f]=u.charCodeAt(f)&255;return d.buffer||d}else return u}const c=s(e);return n(c)?i(c):a(o(e))}}const GCe=t=>{const{scene:e,percentage:n,layerxyz:r}=t,i=w.useRef(),a=w.useRef(new Ga),o=.012,s=-7,c=-5.6,u=-8.3,d=w.useRef(0),f=w.useRef(0),h=w.useRef(0),p=w.useRef(0),v=w.useRef(0),y=w.useRef(0),m=w.useRef(0),g=w.useRef(0),x=w.useRef(0),b=w.useRef(0),S=w.useRef(0),E=w.useRef(0),T=w.useRef(),M=w.useRef(0),L=w.useRef();w.useEffect(()=>{R(n,r)},[n,r]);const R=(D,V)=>{var K;T.current&&(e.current.remove(T.current),T.current.geometry.dispose());var B=new Fu({color:1973790});B.transparent=!0,B.opacity=.9;const F=new Wi,j=new Float32Array([0,-6,0,0,6,0]);F.setAttribute("position",new $o(j,3)),V=="y"?(a.current.position.set(0,0,0),a.current.rotation.y=0,a.current.translateX(s),a.current.translateY(c),a.current.translateZ(u),T.current=new ba(F,B),T.current.name="axis",(K=T.current)==null||K.rotation.set(Math.PI/2,0,0),T.current.scale.set(1,2,1),T.current.position.set((g.current+m.current)/2,x.current+(b.current-x.current)*D,(E.current+S.current)/2),M.current=2):V=="x"?(a.current.position.set(0,0,0),a.current.rotation.y=-90*Math.PI/180,a.current.translateX(s),a.current.translateY(c),a.current.translateZ(u),T.current=new ba(F,B),T.current.name="axis",T.current.position.set((g.current+m.current)/2,(b.current+x.current)/2,m.current+(g.current-m.current)*(D/2+.5)),M.current=1):V=="z"&&(a.current.position.set(0,0,0),a.current.rotation.y=0,a.current.translateX(s),a.current.translateY(c),a.current.translateZ(u),T.current=new ba(F,B),T.current.name="axis",T.current.position.set((g.current+m.current)/2,(b.current+x.current)/2,S.current+(E.current-S.current)*D),M.current=0),T.current&&e.current.add(T.current)},O=()=>{let D=new js({specular:16775920,color:16775920,shininess:10,visible:!1});L.current=new Dn(new ns(g.current-m.current,b.current-x.current,E.current-S.current),D),L.current.position.set((g.current+m.current)/2,(b.current+x.current)/2,(E.current+S.current)/2)},N=()=>{var D,V,B,F,j,K;i.current&&(i.current.computeBoundingBox(),d.current=((D=i.current.boundingBox)==null?void 0:D.max.x)||0,f.current=((V=i.current.boundingBox)==null?void 0:V.min.x)||0,h.current=((B=i.current.boundingBox)==null?void 0:B.max.y)||0,p.current=((F=i.current.boundingBox)==null?void 0:F.min.y)||0,v.current=((j=i.current.boundingBox)==null?void 0:j.max.z)||0,y.current=((K=i.current.boundingBox)==null?void 0:K.min.z)||0,m.current=f.current*o+s,g.current=d.current*o+s,x.current=p.current*o+c,b.current=h.current*o+c,S.current=y.current*o+u,E.current=v.current*o+u)},U=()=>{let D;return M.current==2?(T.current&&(D=((T.current.position.y-x.current)/(b.current-x.current)).toFixed(4)),parseFloat(D)):M.current==1?(T.current&&(D=((T.current.position.x-m.current)/(g.current-m.current)).toFixed(4)),parseFloat(D)):M.current==0?(T.current&&(D=((T.current.position.z-S.current)/(E.current-S.current)).toFixed(4)),parseFloat(D)):0},k=async(D,V)=>{if(V=="2"){var B=new Lle;B.load(D,function(j){i.current=j;var K=new js({transparent:!0,opacity:.5,depthTest:!1}),W=new Dn(i.current,K);a.current.add(W),a.current.position.set(0,0,0),a.current.scale.set(o,o,o),a.current.castShadow=!0,a.current.receiveShadow=!0,a.current.translateX(s),a.current.translateY(c),a.current.translateZ(u),e.current.add(a.current),N(),R(n,r),O()})}else{var B=new Lle,F=new Ga;B.load(D,function(K){var Z,q,ne,Y,te,fe;var W=K,G=new js({transparent:!0,opacity:.5,depthTest:!1}),J=new Dn(W,G);F.add(J),F.position.set(0,0,0),F.scale.set(o,o,o),F.castShadow=!0,F.receiveShadow=!0,F.translateX(s),F.translateY(c),F.translateZ(u),e.current.add(F),e.current.remove(a.current),i.current&&i.current.dispose(),W.computeBoundingBox(),d.current=((Z=W.boundingBox)==null?void 0:Z.max.x)||0,f.current=((q=W.boundingBox)==null?void 0:q.min.x)||0,h.current=((ne=W.boundingBox)==null?void 0:ne.max.y)||0,p.current=((Y=W.boundingBox)==null?void 0:Y.min.y)||0,v.current=((te=W.boundingBox)==null?void 0:te.max.z)||0,y.current=((fe=W.boundingBox)==null?void 0:fe.min.z)||0,m.current=f.current*o+s,g.current=d.current*o+s,x.current=p.current*o+c,b.current=h.current*o+c,S.current=y.current*o+u,E.current=v.current*o+u;var re=U();R(re,M.current),L.current&&e.current.remove(L.current),L.current&&L.current.geometry.dispose(),O()})}};return w.useEffect(()=>{k("/staticresource/data/STL/Brain.stl","2")},[]),w.createElement("div",null)};const WCe=t=>{const{t:e,controls:n,setUpdatePage:r,setShowSettingModal:i,il8n:a,auxRef:o,activetabIndex:s,index:c,home:u}=t;return w.createElement("div",{className:"bottom_tabs_outer_div"},w.createElement(_a,{title:"Home"},w.createElement("svg",{className:"bottom_tabs_icon",width:"100%",height:"100%",viewBox:"0 0 200 200",version:"1.1",xmlns:"http://www.w3.org/2000/svg",onClick:()=>{window.open(u||"/")}},w.createElement("g",{id:"#f3f3f3ff"},w.createElement("path",{fill:"#f3f3f3",opacity:"1.00",d:" M 92.29 25.42 C 96.82 24.67 101.46 24.93 106.03 25.14 C 108.37 25.08 110.07 26.84 111.64 28.33 C 130.30 47.03 149.14 65.56 167.75 84.30 C 173.08 89.73 175.60 97.46 175.01 105.01 C 175.00 124.68 174.98 144.36 175.02 164.03 C 174.98 166.76 175.00 169.85 172.97 171.95 C 171.05 174.28 167.99 175.16 165.07 175.01 C 154.68 174.98 144.29 175.05 133.90 174.97 C 129.10 175.25 124.68 170.95 125.04 166.10 C 124.93 151.71 125.04 137.32 125.01 122.93 C 124.85 121.33 125.13 119.38 123.87 118.14 C 122.34 116.59 120.00 116.89 118.02 116.78 C 105.67 116.84 93.31 116.78 80.96 116.80 C 78.89 116.77 76.13 117.06 75.38 119.36 C 74.71 122.53 75.05 125.79 74.99 129.00 C 74.98 141.37 75.06 153.73 74.96 166.10 C 75.32 170.95 70.91 175.25 66.10 174.97 C 55.37 175.03 44.63 175.03 33.89 174.97 C 29.09 175.25 24.68 170.94 25.04 166.10 C 24.94 145.74 25.04 125.37 24.99 105.01 C 24.36 97.21 27.12 89.26 32.75 83.77 C 51.23 65.24 69.86 46.86 88.35 28.33 C 89.56 27.25 90.71 25.94 92.29 25.42 Z"})))),w.createElement(_a,{title:e("5000.6005")||"冠状视图"},w.createElement("svg",{className:"bottom_tabs_icon",width:"100%",height:"100%",viewBox:"0 0 410 278",version:"1.1",xmlns:"http://www.w3.org/2000/svg",onClick:()=>{Ai.current.position.set(.1155,-5.0809,-22.3197),Ai.current.rotation.set(2.9896,0,0),n.current.reset(),n.current.target.set(0,0,0),n.current.object.position.set(.1155,-5.0809,-22.3197),n.current.object.up.set(0,-1,0),n.current.update(),Ai.current.updateMatrixWorld(),r({})}},w.createElement("g",{id:"#737070ff"},w.createElement("path",{fill:"#737070",opacity:"1.00",d:" M 145.15 5.66 C 159.32 4.14 173.87 1.56 187.99 4.81 C 195.09 6.16 200.75 10.93 205.68 15.92 C 210.12 10.49 216.04 6.23 223.01 4.80 C 237.03 1.41 251.50 4.32 265.60 5.64 C 274.60 6.38 283.23 9.15 292.04 10.95 C 301.12 13.85 310.11 17.13 318.77 21.15 C 327.49 24.63 335.40 29.77 343.47 34.52 C 348.64 37.60 353.95 40.52 358.60 44.40 C 363.86 48.80 369.56 52.70 374.34 57.66 C 390.21 73.72 401.35 94.32 406.51 116.27 C 407.44 123.87 409.42 131.34 409.38 139.05 C 409.96 149.07 408.49 159.01 406.60 168.81 C 404.30 178.98 399.79 188.49 394.31 197.31 C 386.64 209.27 383.97 223.84 375.18 235.16 C 370.34 241.04 364.25 245.72 358.06 250.09 C 352.58 253.97 347.44 258.42 341.39 261.42 C 336.35 263.96 330.67 264.63 325.37 266.42 C 317.72 268.79 310.83 273.31 302.85 274.66 C 296.93 275.36 291.15 276.82 285.32 278.00 L 263.60 278.00 C 259.76 277.14 256.00 275.98 252.22 274.92 C 246.13 271.12 240.69 266.43 235.35 261.67 C 230.15 259.15 224.20 258.59 218.97 256.05 C 213.83 253.85 209.58 250.11 205.65 246.22 C 199.72 251.45 193.11 256.24 185.38 258.36 C 181.46 259.62 176.94 259.81 173.82 262.78 C 169.10 267.07 164.23 271.24 158.85 274.68 C 155.02 275.75 151.25 277.06 147.38 278.00 L 124.71 278.00 C 118.90 276.72 113.10 275.30 107.18 274.61 C 97.25 272.40 88.60 266.41 78.57 264.51 C 71.74 263.42 65.72 259.81 60.25 255.77 C 50.14 248.42 39.12 241.46 32.39 230.61 C 28.81 224.27 25.68 217.68 23.08 210.88 C 20.32 203.71 16.17 197.23 12.36 190.61 C 9.45 185.60 7.49 180.11 5.56 174.67 C 4.56 168.77 2.66 163.07 1.91 157.13 C 0.67 147.79 0.75 138.28 1.98 128.95 C 2.72 122.96 4.53 117.17 5.48 111.22 C 9.93 95.17 17.39 79.89 27.94 66.95 C 38.86 54.39 51.52 43.18 66.13 35.08 C 90.10 20.05 116.89 8.94 145.15 5.66 M 75.04 33.05 C 57.00 42.77 40.19 55.35 27.77 71.80 C 17.28 85.50 10.40 101.68 6.33 118.39 C 1.43 139.05 2.27 161.47 10.93 181.04 C 14.67 189.95 20.34 197.86 24.27 206.68 C 27.54 214.05 30.29 221.68 34.24 228.72 C 38.24 235.83 44.79 240.97 51.20 245.80 C 57.65 250.42 63.83 255.53 70.91 259.17 C 74.74 261.14 79.03 261.82 83.14 262.93 C 90.42 264.86 96.90 268.96 104.16 270.95 C 118.33 274.92 133.27 277.43 147.95 275.15 C 157.77 274.40 165.01 266.98 172.02 260.89 C 170.54 259.31 168.67 257.95 167.84 255.89 C 166.94 252.26 169.01 248.85 170.97 245.98 C 177.87 236.16 185.26 226.31 188.78 214.67 C 191.51 206.74 191.99 198.27 191.67 189.95 C 191.62 183.43 190.51 176.76 192.34 170.38 C 193.55 165.72 196.68 161.94 198.57 157.58 C 201.02 151.87 202.53 145.81 203.85 139.76 C 204.03 138.38 204.98 137.38 205.86 136.39 C 207.54 142.37 208.31 148.59 210.61 154.40 C 212.66 160.64 217.38 165.69 218.70 172.21 C 219.95 177.07 219.21 182.09 218.96 187.02 C 218.45 194.63 218.93 202.31 220.35 209.80 C 222.56 220.67 228.92 229.99 234.78 239.19 C 237.55 243.74 241.92 247.66 242.81 253.10 C 243.51 256.45 240.65 258.74 238.70 260.97 C 245.70 267.18 253.11 274.62 263.03 275.19 C 277.73 277.40 292.67 274.90 306.82 270.83 C 315.06 268.44 322.43 263.61 330.94 262.03 C 338.96 260.66 345.61 255.73 352.12 251.19 C 359.83 245.67 367.75 240.09 373.71 232.61 C 379.69 224.24 382.77 214.28 387.05 205.02 C 391.34 195.80 397.55 187.54 400.92 177.89 C 407.75 160.50 408.95 141.17 405.19 122.92 C 402.16 108.46 397.24 94.25 389.42 81.65 C 381.37 68.15 370.34 56.59 357.84 47.15 C 350.07 41.35 341.65 36.51 333.22 31.76 C 303.60 14.45 269.21 5.90 235.01 5.63 C 225.43 5.29 215.55 8.87 208.95 15.93 C 206.68 17.99 206.64 21.16 206.69 23.99 C 207.04 46.01 206.57 68.02 206.09 90.03 C 205.76 94.70 208.97 99.25 206.89 103.81 C 205.72 103.73 204.55 103.64 203.38 103.56 C 202.91 101.20 202.83 98.77 203.49 96.42 C 204.69 91.71 204.36 86.82 204.18 82.01 C 203.73 62.67 203.53 43.32 203.75 23.98 C 203.63 21.54 204.15 18.67 202.30 16.73 C 195.66 8.93 185.08 5.22 175.00 5.62 C 140.09 5.99 105.06 15.07 75.04 33.05 M 203.67 99.05 C 202.81 100.39 205.33 102.88 205.88 100.95 L 206.41 100.03 L 206.00 99.07 C 207.01 97.01 203.50 97.03 203.67 99.05 M 199.63 159.63 C 197.18 164.06 194.30 168.43 193.55 173.56 C 192.33 182.66 194.09 191.86 193.14 201.00 C 192.68 213.49 187.23 225.16 180.27 235.31 C 177.00 241.26 171.80 246.11 169.54 252.58 C 168.12 255.65 171.27 259.58 174.56 258.48 C 182.35 256.77 190.18 254.37 196.90 249.95 C 200.39 247.68 202.77 244.19 205.49 241.13 C 207.97 244.69 210.69 248.23 214.45 250.54 C 220.41 254.27 227.23 256.35 234.02 258.05 C 235.67 258.34 237.48 258.98 239.11 258.24 C 240.62 257.03 241.71 255.02 241.19 253.06 C 240.39 248.79 237.13 245.67 234.79 242.21 C 230.82 236.43 227.10 230.47 223.77 224.30 C 218.85 214.32 216.67 203.05 217.20 191.96 C 217.32 186.32 217.63 180.66 217.29 175.02 C 216.97 169.43 213.77 164.66 211.10 159.93 C 207.90 154.42 206.78 148.06 205.56 141.90 C 203.85 147.88 202.67 154.12 199.63 159.63 Z"})),w.createElement("g",{id:"#f3f3f3ff"},w.createElement("path",{fill:"#f3f3f3",opacity:"1.00",d:" M 75.04 33.05 C 105.06 15.07 140.09 5.99 175.00 5.62 C 185.08 5.22 195.66 8.93 202.30 16.73 C 204.15 18.67 203.63 21.54 203.75 23.98 C 203.53 43.32 203.73 62.67 204.18 82.01 C 204.36 86.82 204.69 91.71 203.49 96.42 C 202.83 98.77 202.91 101.20 203.38 103.56 C 204.55 103.64 205.72 103.73 206.89 103.81 C 208.97 99.25 205.76 94.70 206.09 90.03 C 206.57 68.02 207.04 46.01 206.69 23.99 C 206.64 21.16 206.68 17.99 208.95 15.93 C 215.55 8.87 225.43 5.29 235.01 5.63 C 269.21 5.90 303.60 14.45 333.22 31.76 C 341.65 36.51 350.07 41.35 357.84 47.15 C 370.34 56.59 381.37 68.15 389.42 81.65 C 397.24 94.25 402.16 108.46 405.19 122.92 C 408.95 141.17 407.75 160.50 400.92 177.89 C 397.55 187.54 391.34 195.80 387.05 205.02 C 382.77 214.28 379.69 224.24 373.71 232.61 C 367.75 240.09 359.83 245.67 352.12 251.19 C 345.61 255.73 338.96 260.66 330.94 262.03 C 322.43 263.61 315.06 268.44 306.82 270.83 C 292.67 274.90 277.73 277.40 263.03 275.19 C 253.11 274.62 245.70 267.18 238.70 260.97 C 240.65 258.74 243.51 256.45 242.81 253.10 C 241.92 247.66 237.55 243.74 234.78 239.19 C 228.92 229.99 222.56 220.67 220.35 209.80 C 218.93 202.31 218.45 194.63 218.96 187.02 C 219.21 182.09 219.95 177.07 218.70 172.21 C 217.38 165.69 212.66 160.64 210.61 154.40 C 208.31 148.59 207.54 142.37 205.86 136.39 C 204.98 137.38 204.03 138.38 203.85 139.76 C 202.53 145.81 201.02 151.87 198.57 157.58 C 196.68 161.94 193.55 165.72 192.34 170.38 C 190.51 176.76 191.62 183.43 191.67 189.95 C 191.99 198.27 191.51 206.74 188.78 214.67 C 185.26 226.31 177.87 236.16 170.97 245.98 C 169.01 248.85 166.94 252.26 167.84 255.89 C 168.67 257.95 170.54 259.31 172.02 260.89 C 165.01 266.98 157.77 274.40 147.95 275.15 C 133.27 277.43 118.33 274.92 104.16 270.95 C 96.90 268.96 90.42 264.86 83.14 262.93 C 79.03 261.82 74.74 261.14 70.91 259.17 C 63.83 255.53 57.65 250.42 51.20 245.80 C 44.79 240.97 38.24 235.83 34.24 228.72 C 30.29 221.68 27.54 214.05 24.27 206.68 C 20.34 197.86 14.67 189.95 10.93 181.04 C 2.27 161.47 1.43 139.05 6.33 118.39 C 10.40 101.68 17.28 85.50 27.77 71.80 C 40.19 55.35 57.00 42.77 75.04 33.05 M 149.08 74.18 C 135.38 76.44 121.82 80.19 109.33 86.35 C 105.58 88.67 101.62 90.61 97.79 92.80 C 83.85 102.31 72.22 116.02 67.35 132.37 C 63.79 142.08 62.33 152.59 63.18 162.91 C 64.11 168.45 64.16 174.33 66.90 179.38 C 66.30 172.58 64.65 165.84 64.95 158.97 C 65.55 149.70 67.68 140.58 70.87 131.86 C 75.47 119.66 83.74 108.95 94.30 101.31 C 103.95 93.14 116.60 89.79 128.98 88.94 C 137.86 88.75 146.55 91.46 154.30 95.67 C 153.44 95.85 151.73 96.20 150.87 96.38 C 152.35 100.88 155.31 104.67 156.99 109.07 C 158.98 114.15 160.84 119.44 160.76 124.96 C 160.75 132.31 159.39 139.60 159.77 146.96 C 160.37 158.33 162.13 169.84 160.13 181.17 C 152.44 177.85 143.81 176.85 135.60 178.60 C 127.59 180.89 119.87 185.03 114.53 191.55 C 110.40 196.78 105.20 201.04 99.60 204.60 C 95.53 207.23 90.56 207.46 86.12 209.12 C 82.77 210.31 80.71 214.98 82.98 218.00 C 85.14 221.13 88.32 223.39 90.42 226.57 C 93.86 231.73 95.94 237.62 99.03 242.97 C 101.98 248.14 108.45 249.69 113.97 250.03 C 120.12 250.11 126.55 250.77 132.41 248.47 C 141.11 245.33 148.90 239.95 155.29 233.29 C 163.42 224.98 170.76 214.85 172.00 202.96 C 172.10 196.76 169.85 190.22 165.26 185.93 C 164.72 172.68 161.11 159.45 163.14 146.18 C 166.47 133.86 174.35 123.56 181.49 113.23 C 185.76 116.94 191.56 117.94 196.91 119.14 C 201.93 120.35 207.19 120.35 212.25 119.34 C 218.42 118.52 224.69 116.69 229.68 112.84 C 230.62 115.25 231.76 117.59 233.32 119.67 C 237.34 125.16 241.05 130.91 243.91 137.10 C 245.39 140.40 247.05 143.70 247.62 147.32 C 249.05 158.19 246.83 169.03 245.74 179.82 C 244.82 183.09 244.69 186.72 242.51 189.50 C 238.34 195.06 238.09 202.54 239.89 209.04 C 242.08 217.96 247.75 225.46 254.22 231.78 C 262.82 240.53 273.09 249.43 285.97 250.02 C 293.45 250.09 301.96 251.17 308.28 246.27 C 313.33 242.44 315.25 236.21 317.65 230.63 C 319.65 225.64 324.62 222.82 327.25 218.25 C 328.67 215.88 328.51 212.50 326.31 210.64 C 322.76 207.37 317.50 207.69 313.31 205.67 C 302.99 201.30 297.22 191.00 288.43 184.56 C 277.49 177.27 262.47 175.11 250.60 181.40 C 247.72 165.03 252.14 148.49 250.22 132.06 C 249.48 126.40 249.95 120.68 251.28 115.14 C 253.34 108.57 257.02 102.76 259.84 96.54 C 259.06 96.30 257.50 95.81 256.73 95.57 C 264.50 91.56 273.11 88.17 282.03 89.00 C 287.47 89.57 292.94 90.27 298.22 91.76 C 308.18 94.55 316.75 100.78 323.76 108.23 C 338.64 121.64 345.07 142.23 345.72 161.74 C 344.93 168.32 344.43 174.93 343.19 181.45 C 345.08 178.65 345.21 175.19 346.03 172.00 C 347.44 166.12 347.57 160.02 347.04 154.03 C 347.38 146.71 345.70 139.50 343.38 132.61 C 338.35 118.01 329.40 104.26 316.44 95.55 C 305.17 87.48 292.34 81.69 279.00 78.00 C 271.42 76.24 263.88 73.58 255.99 73.93 C 253.46 74.11 250.43 73.47 248.44 75.43 C 245.47 80.75 242.35 85.99 239.21 91.21 C 235.47 97.56 228.92 102.11 221.81 103.83 C 216.26 104.30 210.23 103.03 205.38 106.56 C 199.96 102.28 192.88 105.08 186.76 103.29 C 179.64 101.85 174.82 95.76 170.75 90.23 C 166.89 85.21 165.35 78.61 160.64 74.25 C 156.91 73.04 152.91 74.10 149.08 74.18 M 67.09 181.27 C 65.55 184.28 70.40 181.44 67.09 181.27 M 27.02 196.97 C 30.24 204.90 34.94 212.15 40.01 219.02 C 43.85 224.33 49.51 227.87 55.39 230.53 C 68.09 235.99 73.12 251.08 86.10 256.16 C 82.96 252.86 79.27 250.11 76.40 246.56 C 72.06 241.30 68.54 235.21 63.06 230.99 C 57.82 227.29 51.34 225.73 46.35 221.65 C 38.35 214.73 33.43 205.19 27.02 196.97 M 365.84 219.83 C 360.67 225.21 352.93 226.59 347.29 231.29 C 342.45 235.15 338.96 240.31 335.21 245.17 C 331.76 249.71 327.20 253.18 323.06 257.05 C 332.84 253.21 338.79 244.11 346.02 237.01 C 351.99 230.51 361.65 229.26 367.45 222.54 C 373.75 215.13 379.35 206.95 383.01 197.91 C 377.16 205.11 372.83 213.57 365.84 219.83 Z"}),w.createElement("path",{fill:"#f3f3f3",opacity:"1.00",d:" M 203.67 99.05 C 203.50 97.03 207.01 97.01 206.00 99.07 C 204.77 99.65 204.73 100.28 205.88 100.95 C 205.33 102.88 202.81 100.39 203.67 99.05 Z"}),w.createElement("path",{fill:"#f3f3f3",opacity:"1.00",d:" M 162.38 119.51 C 163.18 124.09 163.35 128.83 162.34 133.39 C 162.23 128.76 162.21 124.13 162.38 119.51 Z"})),w.createElement("g",{id:"#5c5b5bff"},w.createElement("path",{fill:"#5c5b5b",opacity:"1.00",d:" M 150.87 96.38 C 151.73 96.20 153.44 95.85 154.30 95.67 C 159.42 98.78 163.65 103.13 168.82 106.17 C 172.90 108.80 177.96 109.75 181.49 113.23 C 174.35 123.56 166.47 133.86 163.14 146.18 C 161.11 159.45 164.72 172.68 165.26 185.93 C 165.04 188.68 163.81 191.16 162.32 193.43 C 161.65 193.00 160.33 192.14 159.67 191.70 C 159.43 188.19 159.55 184.65 160.13 181.17 C 162.13 169.84 160.37 158.33 159.77 146.96 C 159.39 139.60 160.75 132.31 160.76 124.96 C 160.84 119.44 158.98 114.15 156.99 109.07 C 155.31 104.67 152.35 100.88 150.87 96.38 M 154.92 100.00 C 156.48 102.91 157.76 105.97 159.42 108.83 L 158.86 109.56 L 159.20 110.59 L 160.08 110.82 C 160.36 112.26 160.81 113.66 161.41 115.00 C 160.19 116.36 160.44 117.28 162.17 117.77 C 162.22 118.20 162.33 119.07 162.38 119.51 C 162.21 124.13 162.23 128.76 162.34 133.39 C 162.10 134.50 161.92 135.63 161.80 136.76 C 161.27 139.20 161.24 141.71 161.43 144.19 C 162.05 143.00 163.03 141.79 162.43 140.37 C 166.28 130.85 172.18 122.43 178.03 114.06 C 174.10 111.90 169.60 110.81 166.07 107.96 C 162.40 105.25 158.69 102.58 154.92 100.00 M 162.08 178.59 C 162.04 180.16 162.04 181.73 162.07 183.31 C 160.13 183.38 160.15 186.89 161.46 187.88 C 161.30 188.35 160.97 189.27 160.80 189.74 C 161.35 189.83 162.46 190.01 163.02 190.10 C 163.01 186.27 163.03 182.44 162.84 178.61 C 165.31 176.31 159.76 176.14 162.08 178.59 Z"})),w.createElement("g",{id:"#7b7a7aff"},w.createElement("path",{fill:"#7b7a7a",opacity:"1.00",d:" M 239.61 107.52 C 245.93 104.44 250.53 98.83 256.73 95.57 C 257.50 95.81 259.06 96.30 259.84 96.54 C 257.02 102.76 253.34 108.57 251.28 115.14 C 250.86 114.48 250.04 113.16 249.62 112.50 C 251.31 107.74 253.87 103.36 255.94 98.77 C 249.06 104.94 241.68 110.91 232.69 113.66 C 236.39 120.92 242.13 126.97 245.28 134.57 C 244.94 135.20 244.25 136.47 243.91 137.10 C 241.05 130.91 237.34 125.16 233.32 119.67 C 231.76 117.59 230.62 115.25 229.68 112.84 C 232.57 110.35 236.21 109.13 239.61 107.52 Z"})),w.createElement("g",{id:"#d7d7d7ff"},w.createElement("path",{fill:"#d7d7d7",opacity:"1.00",d:" M 159.42 108.83 C 159.59 109.33 159.92 110.32 160.08 110.82 L 159.20 110.59 L 158.86 109.56 L 159.42 108.83 Z"})),w.createElement("g",{id:"#5b5a5aff"},w.createElement("path",{fill:"#5b5a5a",opacity:"1.00",d:" M 248.13 131.99 C 247.79 125.47 247.61 118.80 249.62 112.50 C 250.04 113.16 250.86 114.48 251.28 115.14 C 249.95 120.68 249.48 126.40 250.22 132.06 C 252.14 148.49 247.72 165.03 250.60 181.40 C 250.96 184.48 251.09 187.59 251.17 190.69 C 250.37 191.59 249.59 192.52 248.83 193.45 C 244.46 190.28 245.68 184.48 245.74 179.82 C 246.83 169.03 249.05 158.19 247.62 147.32 C 247.05 143.70 245.39 140.40 243.91 137.10 C 244.25 136.47 244.94 135.20 245.28 134.57 C 246.49 137.07 247.60 139.61 248.68 142.17 C 248.76 141.38 248.92 139.81 249.00 139.03 C 249.55 136.63 249.16 134.19 248.13 131.99 M 247.54 177.73 C 247.33 181.74 246.47 185.95 247.86 189.83 C 250.01 188.92 249.60 184.81 248.49 183.05 C 249.17 181.16 248.56 179.33 247.54 177.73 Z"})),w.createElement("g",{id:"#cececeff"},w.createElement("path",{fill:"#cecece",opacity:"1.00",d:" M 161.41 115.00 C 162.03 115.82 162.28 116.74 162.17 117.77 C 160.44 117.28 160.19 116.36 161.41 115.00 Z"})),w.createElement("g",{id:"#f4f4f4ff"},w.createElement("path",{fill:"#f4f4f4",opacity:"1.00",d:" M 248.13 131.99 C 249.16 134.19 249.55 136.63 249.00 139.03 C 246.99 137.20 247.78 134.31 248.13 131.99 Z"}),w.createElement("path",{fill:"#f4f4f4",opacity:"1.00",d:" M 251.17 190.69 C 255.15 191.62 259.19 192.88 262.23 195.77 C 267.12 200.21 273.03 203.58 277.18 208.82 C 280.13 212.71 280.20 219.91 275.26 222.25 C 271.67 223.78 267.61 222.91 263.94 222.09 C 256.62 220.27 249.34 215.31 247.18 207.76 C 245.67 202.99 247.06 197.94 248.83 193.45 C 249.59 192.52 250.37 191.59 251.17 190.69 M 256.20 200.01 C 254.87 201.75 252.35 203.29 253.01 205.82 C 254.57 211.57 261.57 214.90 267.08 213.22 C 265.33 207.65 261.96 202.06 256.20 200.01 Z"}),w.createElement("path",{fill:"#f4f4f4",opacity:"1.00",d:" M 150.85 193.88 C 153.34 191.89 156.67 192.03 159.67 191.70 C 160.33 192.14 161.65 193.00 162.32 193.43 C 163.30 198.73 165.18 204.46 162.64 209.64 C 158.48 218.75 147.72 223.42 138.10 222.95 C 133.34 222.84 129.97 217.72 131.19 213.26 C 132.47 208.18 136.79 204.76 140.82 201.81 C 144.31 199.35 147.42 196.41 150.85 193.88 M 151.40 201.25 C 147.38 204.36 143.78 208.81 143.83 214.16 C 148.21 213.70 153.32 212.92 156.06 209.07 C 157.22 206.73 158.00 202.92 155.69 201.10 C 154.27 200.89 152.77 200.78 151.40 201.25 Z"})),w.createElement("g",{id:"#eaeaeaff"},w.createElement("path",{fill:"#eaeaea",opacity:"1.00",d:" M 161.43 144.19 C 161.24 141.71 161.27 139.20 161.80 136.76 C 161.99 137.97 162.21 139.17 162.43 140.37 C 163.03 141.79 162.05 143.00 161.43 144.19 Z"}),w.createElement("path",{fill:"#eaeaea",opacity:"1.00",d:" M 135.60 178.60 C 143.81 176.85 152.44 177.85 160.13 181.17 C 159.55 184.65 159.43 188.19 159.67 191.70 C 156.67 192.03 153.34 191.89 150.85 193.88 C 147.42 196.41 144.31 199.35 140.82 201.81 C 136.79 204.76 132.47 208.18 131.19 213.26 C 129.97 217.72 133.34 222.84 138.10 222.95 C 147.72 223.42 158.48 218.75 162.64 209.64 C 165.18 204.46 163.30 198.73 162.32 193.43 C 163.81 191.16 165.04 188.68 165.26 185.93 C 169.85 190.22 172.10 196.76 172.00 202.96 C 170.76 214.85 163.42 224.98 155.29 233.29 C 148.90 239.95 141.11 245.33 132.41 248.47 C 126.55 250.77 120.12 250.11 113.97 250.03 C 108.45 249.69 101.98 248.14 99.03 242.97 C 95.94 237.62 93.86 231.73 90.42 226.57 C 88.32 223.39 85.14 221.13 82.98 218.00 C 80.71 214.98 82.77 210.31 86.12 209.12 C 90.56 207.46 95.53 207.23 99.60 204.60 C 105.20 201.04 110.40 196.78 114.53 191.55 C 119.87 185.03 127.59 180.89 135.60 178.60 Z"}),w.createElement("path",{fill:"#eaeaea",opacity:"1.00",d:" M 247.54 177.73 C 248.56 179.33 249.17 181.16 248.49 183.05 C 247.98 185.27 247.80 187.55 247.86 189.83 C 246.47 185.95 247.33 181.74 247.54 177.73 Z"}),w.createElement("path",{fill:"#eaeaea",opacity:"1.00",d:" M 250.60 181.40 C 262.47 175.11 277.49 177.27 288.43 184.56 C 297.22 191.00 302.99 201.30 313.31 205.67 C 317.50 207.69 322.76 207.37 326.31 210.64 C 328.51 212.50 328.67 215.88 327.25 218.25 C 324.62 222.82 319.65 225.64 317.65 230.63 C 315.25 236.21 313.33 242.44 308.28 246.27 C 301.96 251.17 293.45 250.09 285.97 250.02 C 273.09 249.43 262.82 240.53 254.22 231.78 C 247.75 225.46 242.08 217.96 239.89 209.04 C 238.09 202.54 238.34 195.06 242.51 189.50 C 244.69 186.72 244.82 183.09 245.74 179.82 C 245.68 184.48 244.46 190.28 248.83 193.45 C 247.06 197.94 245.67 202.99 247.18 207.76 C 249.34 215.31 256.62 220.27 263.94 222.09 C 267.61 222.91 271.67 223.78 275.26 222.25 C 280.20 219.91 280.13 212.71 277.18 208.82 C 273.03 203.58 267.12 200.21 262.23 195.77 C 259.19 192.88 255.15 191.62 251.17 190.69 C 251.09 187.59 250.96 184.48 250.60 181.40 Z"})),w.createElement("g",{id:"#e9e9e9ff"},w.createElement("path",{fill:"#e9e9e9",opacity:"1.00",d:" M 199.63 159.63 C 202.67 154.12 203.85 147.88 205.56 141.90 C 206.78 148.06 207.90 154.42 211.10 159.93 C 213.77 164.66 216.97 169.43 217.29 175.02 C 217.63 180.66 217.32 186.32 217.20 191.96 C 216.67 203.05 218.85 214.32 223.77 224.30 C 227.10 230.47 230.82 236.43 234.79 242.21 C 237.13 245.67 240.39 248.79 241.19 253.06 C 241.71 255.02 240.62 257.03 239.11 258.24 C 237.48 258.98 235.67 258.34 234.02 258.05 C 227.23 256.35 220.41 254.27 214.45 250.54 C 210.69 248.23 207.97 244.69 205.49 241.13 C 202.77 244.19 200.39 247.68 196.90 249.95 C 190.18 254.37 182.35 256.77 174.56 258.48 C 171.27 259.58 168.12 255.65 169.54 252.58 C 171.80 246.11 177.00 241.26 180.27 235.31 C 187.23 225.16 192.68 213.49 193.14 201.00 C 194.09 191.86 192.33 182.66 193.55 173.56 C 194.30 168.43 197.18 164.06 199.63 159.63 Z"})),w.createElement("g",{id:"#d4d4d4ff"},w.createElement("path",{fill:"#d4d4d4",opacity:"1.00",d:" M 162.08 178.59 C 159.76 176.14 165.31 176.31 162.84 178.61 L 162.08 178.59 Z"})),w.createElement("g",{id:"#bebdbdff"},w.createElement("path",{fill:"#bebdbd",opacity:"1.00",d:" M 161.46 187.88 C 160.15 186.89 160.13 183.38 162.07 183.31 C 162.16 184.85 162.09 186.44 161.46 187.88 Z"})),w.createElement("g",{id:"#b3b2b2ff"},w.createElement("path",{fill:"#b3b2b2",opacity:"1.00",d:" M 27.02 196.97 C 33.43 205.19 38.35 214.73 46.35 221.65 C 51.34 225.73 57.82 227.29 63.06 230.99 C 68.54 235.21 72.06 241.30 76.40 246.56 C 79.27 250.11 82.96 252.86 86.10 256.16 C 73.12 251.08 68.09 235.99 55.39 230.53 C 49.51 227.87 43.85 224.33 40.01 219.02 C 34.94 212.15 30.24 204.90 27.02 196.97 Z"}),w.createElement("path",{fill:"#b3b2b2",opacity:"1.00",d:" M 365.84 219.83 C 372.83 213.57 377.16 205.11 383.01 197.91 C 379.35 206.95 373.75 215.13 367.45 222.54 C 361.65 229.26 351.99 230.51 346.02 237.01 C 338.79 244.11 332.84 253.21 323.06 257.05 C 327.20 253.18 331.76 249.71 335.21 245.17 C 338.96 240.31 342.45 235.15 347.29 231.29 C 352.93 226.59 360.67 225.21 365.84 219.83 Z"})))),w.createElement(_a,{title:e("5000.6006")||"矢状视图"},w.createElement("svg",{className:"bottom_tabs_icon",width:"100%",height:"100%",viewBox:"0 0 466 271",version:"1.1",xmlns:"http://www.w3.org/2000/svg",onClick:()=>{Ai.current.position.set(22.7,-2.6,-.4),Ai.current.rotation.set(1.7234,1.4554,1.4171),n.current.reset(),n.current.target.set(0,0,0),n.current.object.position.set(22.7,-2.6,-.4),n.current.object.up.set(0,-1,0),n.current.update(),Ai.current.updateMatrixWorld(),r({})}},w.createElement("g",{id:"#585757ff"},w.createElement("path",{fill:"#585757",opacity:"1.00",d:" M 263.57 3.51 C 270.79 0.85 278.85 -0.09 286.38 1.60 C 294.42 5.69 300.80 13.61 302.43 22.59 C 302.34 25.83 302.29 29.07 302.30 32.32 C 302.23 32.73 302.08 33.56 302.00 33.97 C 301.86 34.55 301.57 35.72 301.42 36.30 C 295.85 51.55 283.28 62.66 275.01 76.35 C 281.23 70.44 287.55 64.43 291.81 56.88 C 293.74 53.97 295.21 50.11 298.84 48.98 C 301.30 48.78 303.77 48.67 306.22 48.36 C 306.38 48.04 306.70 47.39 306.85 47.07 C 309.49 39.85 316.29 35.44 319.66 28.67 C 321.69 24.63 324.66 20.97 329.03 19.35 C 329.69 19.56 331.03 19.97 331.69 20.18 C 334.98 19.25 336.50 15.97 338.78 13.74 C 341.04 11.26 344.37 10.13 347.59 9.54 C 350.52 9.55 353.46 9.57 356.41 9.60 C 364.32 11.74 372.08 15.29 378.36 20.64 C 382.08 23.62 383.37 28.32 385.16 32.52 C 385.54 32.69 386.29 33.02 386.66 33.18 C 390.23 32.89 393.75 34.15 396.30 36.66 C 401.32 41.45 406.64 46.74 408.19 53.76 C 408.35 55.68 408.47 57.60 408.61 59.53 C 409.17 59.64 410.28 59.88 410.84 60.00 C 420.02 60.87 425.26 69.69 427.39 77.78 C 426.47 79.18 426.73 80.96 427.94 82.10 C 427.98 85.80 427.90 89.49 428.10 93.18 C 426.20 93.43 426.18 96.14 427.94 96.64 C 432.52 98.82 435.53 102.98 436.59 107.89 C 435.45 109.78 435.67 112.03 436.01 114.11 C 435.30 117.56 436.54 120.83 438.18 123.81 C 438.36 124.38 438.73 125.52 438.91 126.09 C 439.36 127.68 439.82 129.26 440.27 130.85 C 439.58 132.12 439.78 133.25 440.87 134.22 C 440.97 134.86 441.15 136.14 441.25 136.79 C 440.35 139.21 440.57 141.84 441.92 144.05 C 442.05 150.67 442.09 157.29 441.91 163.91 C 440.80 164.93 440.68 166.06 441.55 167.28 C 440.01 170.14 437.76 172.51 435.04 174.28 C 433.51 174.99 433.60 176.86 434.09 178.21 L 433.71 178.90 C 432.66 180.07 432.66 181.17 433.69 182.20 C 431.76 186.21 428.66 189.69 424.04 190.39 C 423.27 190.38 421.73 190.35 420.96 190.33 C 420.03 189.77 419.11 189.19 418.20 188.61 C 416.98 187.20 415.38 189.06 416.26 190.39 C 414.65 192.90 412.67 195.31 409.80 196.40 C 408.51 196.83 407.21 197.22 405.91 197.62 C 408.39 197.66 410.88 197.68 413.36 197.78 C 414.01 197.85 415.31 198.00 415.97 198.08 C 416.79 199.21 417.86 199.52 419.18 199.00 C 419.60 199.00 420.43 198.99 420.85 198.99 C 421.43 199.17 422.57 199.55 423.15 199.73 C 440.44 205.27 454.05 218.65 463.60 233.70 C 463.17 234.23 462.31 235.29 461.87 235.82 C 452.84 222.49 441.02 210.30 425.87 204.14 C 416.28 200.15 405.53 199.57 395.38 201.47 C 390.13 202.27 384.44 203.86 379.35 201.52 C 370.60 197.44 365.23 188.82 356.99 184.00 C 353.14 181.67 348.81 179.69 346.19 175.87 C 343.41 171.95 341.11 167.70 337.85 164.14 C 331.83 157.50 327.13 149.74 323.53 141.55 C 320.22 134.00 319.48 125.52 320.47 117.39 C 321.55 108.24 324.89 99.29 324.10 89.97 C 323.80 85.31 322.15 80.88 321.76 76.24 C 321.50 72.97 322.97 69.85 322.79 66.60 C 321.95 63.57 320.12 60.93 319.03 57.99 C 316.39 51.62 317.07 44.58 316.99 37.85 C 312.98 41.75 309.84 46.42 307.59 51.54 C 304.85 51.61 301.92 51.11 299.35 52.26 C 296.41 54.45 294.84 57.90 292.81 60.85 C 286.81 70.32 277.53 76.93 270.32 85.36 C 266.81 89.38 264.99 94.60 261.23 98.44 C 262.18 92.24 265.24 86.68 268.31 81.31 C 274.63 70.00 283.26 60.25 290.80 49.77 C 295.41 43.31 299.96 36.16 300.35 28.01 C 300.75 19.78 295.76 12.33 289.73 7.20 C 284.60 2.72 277.20 3.55 271.06 4.95 C 253.40 9.49 238.07 19.72 222.09 28.09 C 205.56 36.74 187.51 42.85 168.88 44.62 C 151.70 46.64 133.50 45.69 117.64 53.65 C 102.45 60.87 91.42 76.23 89.92 93.04 C 89.80 96.61 90.97 100.03 91.79 103.46 C 81.52 96.60 72.88 86.60 60.42 83.61 C 48.25 80.80 36.08 86.54 26.19 93.21 C 16.58 99.58 7.49 108.39 4.95 120.06 C 2.28 132.72 7.34 145.45 13.89 156.09 C 22.32 169.95 35.24 180.10 45.77 192.23 C 56.03 204.17 67.79 216.23 83.37 220.68 C 89.53 222.65 95.91 220.85 101.64 218.44 C 107.81 225.88 115.04 232.34 121.88 239.14 C 128.63 245.32 137.46 250.43 146.89 249.83 C 154.05 249.48 158.04 242.02 165.00 241.12 C 170.36 240.08 175.81 239.57 181.26 239.28 C 183.73 243.44 186.43 247.91 191.05 249.96 C 198.85 253.72 207.70 251.67 216.00 251.83 C 222.93 251.75 230.01 253.98 236.84 251.90 C 243.47 250.01 248.69 244.91 252.17 239.12 C 258.52 228.59 261.04 216.38 263.03 204.40 C 267.58 204.99 272.13 205.52 276.66 206.26 C 274.81 210.31 272.53 214.39 272.42 218.96 C 272.35 224.33 273.38 229.96 276.47 234.45 C 279.60 238.62 283.93 241.67 287.34 245.60 C 290.95 249.68 295.67 253.18 301.28 253.64 C 307.15 254.65 311.98 250.55 316.79 247.90 C 326.80 256.41 337.83 264.63 351.06 267.07 C 364.70 269.89 379.21 265.65 389.99 257.04 C 393.11 254.54 396.01 251.80 399.02 249.17 C 407.80 253.46 418.20 253.17 426.49 258.59 C 429.47 260.45 432.27 262.62 434.69 265.19 C 435.39 265.99 436.07 266.82 436.76 267.65 C 436.01 267.79 434.52 268.09 433.78 268.23 C 429.87 264.22 424.83 261.65 420.00 258.94 C 419.46 258.70 418.36 258.21 417.82 257.96 L 416.98 258.06 C 416.45 257.78 415.41 257.24 414.88 256.97 L 414.06 257.07 C 413.49 256.86 412.37 256.45 411.80 256.25 C 407.64 256.00 403.59 254.90 399.77 253.25 C 392.98 259.28 385.83 265.08 377.24 268.35 C 376.66 268.47 375.48 268.73 374.89 268.85 C 372.73 269.62 370.57 270.36 368.37 271.00 L 351.66 271.00 C 338.54 268.10 326.47 261.25 316.93 251.83 C 314.76 253.05 312.62 254.32 310.38 255.42 C 303.54 259.07 294.91 256.52 289.27 251.75 C 284.77 247.58 280.44 243.22 276.25 238.73 C 272.99 235.31 271.40 230.77 270.58 226.21 C 271.55 224.47 271.36 222.36 270.08 220.84 C 270.04 219.61 270.02 218.38 270.00 217.16 C 271.25 216.10 271.61 214.40 270.95 212.91 L 271.16 212.26 C 271.69 211.01 272.26 209.79 272.82 208.56 C 271.45 208.42 270.09 208.27 268.73 208.11 C 268.12 207.95 266.88 207.63 266.27 207.47 C 264.69 206.61 263.12 208.39 263.77 209.94 C 263.87 210.69 264.08 212.20 264.18 212.95 C 262.84 213.62 262.53 214.67 263.26 216.11 C 262.51 221.23 261.06 226.23 259.04 231.00 C 258.86 231.57 258.49 232.71 258.31 233.28 C 254.31 243.09 246.98 252.78 236.23 255.42 C 234.83 254.48 233.04 254.72 231.89 255.94 C 229.96 255.97 228.02 255.99 226.09 256.00 C 225.01 254.77 223.33 254.42 221.83 255.06 C 216.26 254.97 210.69 254.96 205.12 255.19 C 202.73 254.56 200.24 254.61 197.88 255.37 C 196.28 254.88 194.69 254.38 193.11 253.88 C 192.52 253.74 191.35 253.46 190.77 253.31 C 185.62 251.02 182.51 246.34 179.00 242.20 C 177.94 240.72 176.04 242.06 174.98 242.83 C 174.30 242.92 172.94 243.10 172.26 243.19 C 170.80 242.47 169.13 242.64 167.83 243.60 C 161.33 244.60 156.78 249.61 151.17 252.53 C 149.99 251.13 148.05 251.98 146.97 253.01 C 136.80 253.92 127.35 248.57 120.19 241.81 C 113.72 235.43 107.48 228.82 100.89 222.56 C 98.73 223.25 96.56 223.95 94.32 224.38 C 91.11 224.40 87.89 224.38 84.68 224.34 C 84.26 224.27 83.43 224.14 83.01 224.07 C 82.16 222.84 81.09 222.58 79.78 223.29 C 73.27 220.44 66.80 217.29 61.37 212.64 C 54.60 206.75 48.51 200.13 42.66 193.33 C 37.76 188.55 33.08 183.57 28.68 178.32 C 17.66 167.71 7.92 155.08 3.59 140.20 C 4.36 138.98 4.22 137.86 3.18 136.85 L 2.83 136.21 C 3.60 134.42 3.29 132.39 2.00 130.93 C 1.87 126.60 1.93 122.24 2.89 118.00 C 4.13 117.16 4.40 116.08 3.70 114.76 C 5.93 109.36 8.85 104.18 13.06 100.06 C 22.04 90.95 33.26 83.70 45.79 80.68 C 47.21 81.52 48.94 81.27 50.10 80.11 C 52.75 80.07 55.39 80.05 58.04 79.86 C 58.71 81.22 59.75 81.50 61.17 80.70 C 71.13 82.92 79.42 89.26 86.83 95.97 C 87.06 96.14 87.51 96.48 87.73 96.65 C 88.74 94.85 88.25 92.77 87.75 90.91 C 87.85 90.50 88.05 89.68 88.15 89.28 C 89.20 88.26 89.36 87.12 88.64 85.86 C 89.62 82.53 90.69 79.23 91.90 75.98 C 92.14 75.43 92.61 74.33 92.85 73.78 C 98.67 62.40 108.82 53.38 120.73 48.74 C 121.29 48.52 122.40 48.07 122.95 47.84 C 125.54 47.01 128.17 46.27 130.81 45.62 C 132.07 46.37 133.19 46.20 134.18 45.12 C 134.83 45.05 136.14 44.93 136.79 44.87 C 138.29 45.54 139.99 45.25 141.16 44.08 C 142.37 43.99 143.57 43.90 144.78 43.80 C 146.91 44.61 149.22 44.35 151.12 43.10 C 152.68 43.02 154.23 42.94 155.78 42.86 C 157.58 43.58 159.60 43.30 161.10 42.04 C 163.35 42.00 165.60 41.95 167.85 41.90 C 169.34 42.56 171.03 42.24 172.17 41.06 C 172.81 41.03 174.10 40.96 174.74 40.93 C 176.23 41.59 177.91 41.22 179.00 40.01 C 180.93 39.56 182.86 39.14 184.80 38.76 C 186.11 39.42 187.19 39.16 188.04 37.97 L 188.81 38.10 C 190.14 38.54 191.17 38.14 191.90 36.92 C 195.82 35.44 199.79 34.12 203.79 32.86 C 204.34 32.64 205.45 32.19 206.01 31.97 C 225.84 23.78 243.35 10.84 263.57 3.51 M 337.03 21.07 C 335.13 27.50 336.05 34.72 339.47 40.49 C 342.63 45.85 348.30 49.24 351.08 54.86 C 353.43 59.53 355.37 64.40 358.07 68.89 C 360.34 72.56 361.31 76.83 361.58 81.10 C 361.95 87.44 362.90 93.77 362.62 100.14 C 361.93 92.71 361.45 85.25 360.29 77.87 C 359.48 72.48 356.04 68.10 353.88 63.23 C 352.05 59.21 350.41 54.97 347.32 51.72 C 343.47 47.57 338.68 44.01 336.49 38.59 C 334.34 34.14 334.66 29.08 333.68 24.35 C 332.39 21.57 328.04 22.45 326.24 24.31 C 315.80 36.19 316.78 55.39 326.67 67.30 C 328.49 70.50 332.03 71.69 335.23 72.98 C 337.87 73.92 338.85 76.77 340.25 78.93 C 338.29 77.21 336.57 74.92 333.88 74.32 C 330.36 73.49 327.23 71.67 324.17 69.80 C 323.31 74.21 323.78 78.71 324.95 83.01 C 326.14 87.41 326.20 92.04 327.51 96.41 C 329.05 100.56 333.72 101.88 337.23 103.89 C 341.32 105.82 344.57 109.07 347.19 112.70 C 343.91 109.92 340.68 106.93 336.62 105.32 C 332.75 103.82 329.17 101.70 325.99 99.03 C 324.98 104.66 323.83 110.27 322.78 115.89 C 321.10 124.84 322.46 134.27 326.39 142.47 C 330.25 150.54 334.79 158.69 342.00 164.25 C 343.80 161.94 345.50 159.55 347.17 157.14 C 346.05 160.10 344.84 163.02 343.63 165.95 C 348.31 170.51 353.71 174.20 358.82 178.24 C 361.55 180.53 365.11 181.23 368.54 181.77 C 371.23 186.18 374.03 191.18 379.31 192.82 C 387.84 195.75 397.26 195.73 406.06 194.15 C 410.42 193.54 413.90 190.43 415.18 186.25 C 411.35 182.02 406.52 178.97 401.87 175.75 C 407.76 177.23 412.70 180.90 417.27 184.74 C 419.22 186.23 421.55 188.34 424.21 187.36 C 430.57 185.07 433.66 177.45 431.93 171.14 C 431.21 166.75 427.11 164.41 424.06 161.71 C 426.24 162.46 428.69 162.92 430.45 164.54 C 432.20 166.38 433.24 168.76 434.50 170.95 C 436.44 169.40 438.85 167.90 439.27 165.23 C 440.49 159.55 440.01 153.68 439.86 147.92 C 439.53 138.75 438.38 129.35 433.92 121.18 C 431.51 124.02 429.00 127.07 425.32 128.25 C 416.71 131.29 408.08 134.49 399.03 135.93 C 408.13 132.41 417.66 129.90 426.40 125.47 C 431.23 123.22 432.61 117.56 434.03 112.91 C 435.49 107.22 431.41 102.21 426.89 99.37 C 423.57 104.21 420.14 109.51 414.19 111.32 C 417.52 108.30 421.36 105.51 423.20 101.25 C 427.62 90.42 427.06 76.88 419.40 67.63 C 416.66 64.23 412.29 63.07 408.14 62.63 C 406.14 65.43 403.96 68.09 401.41 70.41 C 403.69 66.33 406.75 62.19 406.53 57.28 C 405.94 51.79 402.20 47.36 398.66 43.39 C 394.94 39.14 390.05 35.24 384.05 35.62 C 383.64 40.89 383.50 46.22 382.34 51.41 C 381.72 44.42 382.71 37.33 381.43 30.40 C 380.22 24.68 374.89 21.38 370.08 18.87 C 364.13 15.87 357.95 12.45 351.12 12.39 C 345.44 12.61 339.02 15.33 337.03 21.07 M 273.14 77.06 C 272.11 77.36 271.42 79.33 272.82 79.61 C 274.67 79.98 275.39 76.29 273.14 77.06 M 349.34 175.11 C 349.55 176.45 351.43 177.83 352.77 177.82 C 353.71 181.25 356.34 176.30 353.01 177.26 C 352.64 175.90 351.20 174.89 349.83 174.83 C 349.96 173.58 349.38 172.96 348.09 172.95 C 346.52 173.54 348.13 175.55 349.34 175.11 M 362.59 184.16 C 369.88 188.22 373.72 197.39 382.49 198.78 C 382.81 200.40 383.67 200.75 385.08 199.83 L 385.99 199.49 C 386.95 200.85 390.41 200.86 390.60 198.96 C 391.93 198.89 393.24 198.66 394.53 198.28 C 392.55 198.08 390.56 197.97 388.58 198.06 C 388.51 196.11 384.95 196.08 384.18 197.63 C 381.19 196.78 378.11 196.07 375.34 194.60 C 372.00 192.27 370.16 188.49 367.33 185.67 C 365.81 184.99 364.18 184.62 362.59 184.16 Z"}),w.createElement("path",{fill:"#585757",opacity:"1.00",d:" M 204.77 94.74 C 214.12 89.82 222.59 83.15 232.69 79.72 C 233.36 80.05 234.71 80.70 235.39 81.03 C 233.02 85.74 229.93 90.06 227.84 94.92 C 223.90 103.84 221.52 113.38 220.01 122.99 C 219.53 127.57 219.23 132.87 222.21 136.71 C 223.76 138.77 227.91 139.57 226.82 142.80 C 226.21 146.25 222.06 149.60 218.73 147.25 C 212.32 143.22 212.14 134.69 211.90 127.95 C 211.48 123.69 212.41 118.25 208.61 115.26 C 203.46 111.34 196.55 113.11 190.73 111.25 C 188.47 110.38 188.98 107.43 188.40 105.54 C 193.47 101.39 198.96 97.78 204.77 94.74 M 207.48 97.53 C 201.81 100.93 195.98 104.11 190.70 108.10 C 197.18 110.02 205.08 107.26 210.35 112.64 C 216.10 117.18 212.98 125.08 214.57 131.18 C 212.94 131.97 213.10 135.64 215.14 135.58 C 215.20 139.55 217.65 143.12 221.05 145.03 C 222.20 144.71 223.33 144.34 224.45 143.93 C 221.58 140.49 218.24 137.10 217.57 132.46 C 218.14 129.17 218.12 125.81 217.48 122.53 C 219.82 109.55 222.71 96.14 230.03 84.95 C 222.17 88.51 215.03 93.39 207.48 97.53 Z"})),w.createElement("g",{id:"#f2f2f2ff"},w.createElement("path",{fill:"#f2f2f2",opacity:"1.00",d:" M 271.06 4.95 C 277.20 3.55 284.60 2.72 289.73 7.20 C 295.76 12.33 300.75 19.78 300.35 28.01 C 299.96 36.16 295.41 43.31 290.80 49.77 C 283.26 60.25 274.63 70.00 268.31 81.31 C 265.24 86.68 262.18 92.24 261.23 98.44 C 264.99 94.60 266.81 89.38 270.32 85.36 C 277.53 76.93 286.81 70.32 292.81 60.85 C 294.84 57.90 296.41 54.45 299.35 52.26 C 301.92 51.11 304.85 51.61 307.59 51.54 C 309.84 46.42 312.98 41.75 316.99 37.85 C 317.07 44.58 316.39 51.62 319.03 57.99 C 320.12 60.93 321.95 63.57 322.79 66.60 C 322.97 69.85 321.50 72.97 321.76 76.24 C 322.15 80.88 323.80 85.31 324.10 89.97 C 324.89 99.29 321.55 108.24 320.47 117.39 C 319.48 125.52 320.22 134.00 323.53 141.55 C 327.13 149.74 331.83 157.50 337.85 164.14 C 341.11 167.70 343.41 171.95 346.19 175.87 C 348.81 179.69 353.14 181.67 356.99 184.00 C 365.23 188.82 370.60 197.44 379.35 201.52 C 384.44 203.86 390.13 202.27 395.38 201.47 C 405.53 199.57 416.28 200.15 425.87 204.14 C 441.02 210.30 452.84 222.49 461.87 235.82 L 461.33 236.40 C 458.44 238.81 455.48 241.17 453.09 244.11 C 447.11 251.26 440.38 257.77 434.69 265.19 C 432.27 262.62 429.47 260.45 426.49 258.59 C 418.20 253.17 407.80 253.46 399.02 249.17 C 396.01 251.80 393.11 254.54 389.99 257.04 C 379.21 265.65 364.70 269.89 351.06 267.07 C 337.83 264.63 326.80 256.41 316.79 247.90 C 311.98 250.55 307.15 254.65 301.28 253.64 C 295.67 253.18 290.95 249.68 287.34 245.60 C 283.93 241.67 279.60 238.62 276.47 234.45 C 273.38 229.96 272.35 224.33 272.42 218.96 C 272.53 214.39 274.81 210.31 276.66 206.26 C 272.13 205.52 267.58 204.99 263.03 204.40 C 261.04 216.38 258.52 228.59 252.17 239.12 C 248.69 244.91 243.47 250.01 236.84 251.90 C 230.01 253.98 222.93 251.75 216.00 251.83 C 207.70 251.67 198.85 253.72 191.05 249.96 C 186.43 247.91 183.73 243.44 181.26 239.28 C 175.81 239.57 170.36 240.08 165.00 241.12 C 158.04 242.02 154.05 249.48 146.89 249.83 C 137.46 250.43 128.63 245.32 121.88 239.14 C 115.04 232.34 107.81 225.88 101.64 218.44 C 95.91 220.85 89.53 222.65 83.37 220.68 C 67.79 216.23 56.03 204.17 45.77 192.23 C 35.24 180.10 22.32 169.95 13.89 156.09 C 7.34 145.45 2.28 132.72 4.95 120.06 C 7.49 108.39 16.58 99.58 26.19 93.21 C 36.08 86.54 48.25 80.80 60.42 83.61 C 72.88 86.60 81.52 96.60 91.79 103.46 C 90.97 100.03 89.80 96.61 89.92 93.04 C 91.42 76.23 102.45 60.87 117.64 53.65 C 133.50 45.69 151.70 46.64 168.88 44.62 C 187.51 42.85 205.56 36.74 222.09 28.09 C 238.07 19.72 253.40 9.49 271.06 4.95 M 256.61 51.61 C 241.91 60.89 226.89 69.68 212.60 79.60 C 199.70 88.46 186.37 96.64 173.40 105.40 C 169.27 108.17 164.30 110.12 161.41 114.38 C 159.68 117.18 158.25 120.20 157.36 123.37 C 156.04 128.94 157.72 134.79 160.67 139.56 C 160.53 132.38 162.56 124.93 167.69 119.70 C 173.37 113.35 181.58 110.37 188.40 105.54 C 188.98 107.43 188.47 110.38 190.73 111.25 C 196.55 113.11 203.46 111.34 208.61 115.26 C 212.41 118.25 211.48 123.69 211.90 127.95 C 212.14 134.69 212.32 143.22 218.73 147.25 C 222.06 149.60 226.21 146.25 226.82 142.80 C 227.91 139.57 223.76 138.77 222.21 136.71 C 219.23 132.87 219.53 127.57 220.01 122.99 C 221.52 113.38 223.90 103.84 227.84 94.92 C 229.93 90.06 233.02 85.74 235.39 81.03 C 234.71 80.70 233.36 80.05 232.69 79.72 C 239.50 79.29 246.66 81.38 253.38 79.36 C 259.38 76.57 260.15 69.26 261.57 63.58 C 262.71 57.39 266.68 52.34 270.83 47.83 C 273.61 45.08 278.22 43.25 278.28 38.72 C 270.22 41.46 263.75 47.18 256.61 51.61 Z"}),w.createElement("path",{fill:"#f2f2f2",opacity:"1.00",d:" M 337.03 21.07 C 339.02 15.33 345.44 12.61 351.12 12.39 C 357.95 12.45 364.13 15.87 370.08 18.87 C 374.89 21.38 380.22 24.68 381.43 30.40 C 382.71 37.33 381.72 44.42 382.34 51.41 C 383.50 46.22 383.64 40.89 384.05 35.62 C 390.05 35.24 394.94 39.14 398.66 43.39 C 402.20 47.36 405.94 51.79 406.53 57.28 C 406.75 62.19 403.69 66.33 401.41 70.41 C 403.96 68.09 406.14 65.43 408.14 62.63 C 412.29 63.07 416.66 64.23 419.40 67.63 C 427.06 76.88 427.62 90.42 423.20 101.25 C 421.36 105.51 417.52 108.30 414.19 111.32 C 420.14 109.51 423.57 104.21 426.89 99.37 C 431.41 102.21 435.49 107.22 434.03 112.91 C 432.61 117.56 431.23 123.22 426.40 125.47 C 417.66 129.90 408.13 132.41 399.03 135.93 C 408.08 134.49 416.71 131.29 425.32 128.25 C 429.00 127.07 431.51 124.02 433.92 121.18 C 438.38 129.35 439.53 138.75 439.86 147.92 C 440.01 153.68 440.49 159.55 439.27 165.23 C 438.85 167.90 436.44 169.40 434.50 170.95 C 433.24 168.76 432.20 166.38 430.45 164.54 C 428.69 162.92 426.24 162.46 424.06 161.71 C 427.11 164.41 431.21 166.75 431.93 171.14 C 433.66 177.45 430.57 185.07 424.21 187.36 C 421.55 188.34 419.22 186.23 417.27 184.74 C 412.70 180.90 407.76 177.23 401.87 175.75 C 406.52 178.97 411.35 182.02 415.18 186.25 C 413.90 190.43 410.42 193.54 406.06 194.15 C 397.26 195.73 387.84 195.75 379.31 192.82 C 374.03 191.18 371.23 186.18 368.54 181.77 C 365.11 181.23 361.55 180.53 358.82 178.24 C 353.71 174.20 348.31 170.51 343.63 165.95 C 344.84 163.02 346.05 160.10 347.17 157.14 C 345.50 159.55 343.80 161.94 342.00 164.25 C 334.79 158.69 330.25 150.54 326.39 142.47 C 322.46 134.27 321.10 124.84 322.78 115.89 C 323.83 110.27 324.98 104.66 325.99 99.03 C 329.17 101.70 332.75 103.82 336.62 105.32 C 340.68 106.93 343.91 109.92 347.19 112.70 C 344.57 109.07 341.32 105.82 337.23 103.89 C 333.72 101.88 329.05 100.56 327.51 96.41 C 326.20 92.04 326.14 87.41 324.95 83.01 C 323.78 78.71 323.31 74.21 324.17 69.80 C 327.23 71.67 330.36 73.49 333.88 74.32 C 336.57 74.92 338.29 77.21 340.25 78.93 C 338.85 76.77 337.87 73.92 335.23 72.98 C 332.03 71.69 328.49 70.50 326.67 67.30 C 316.78 55.39 315.80 36.19 326.24 24.31 C 328.04 22.45 332.39 21.57 333.68 24.35 C 334.66 29.08 334.34 34.14 336.49 38.59 C 338.68 44.01 343.47 47.57 347.32 51.72 C 350.41 54.97 352.05 59.21 353.88 63.23 C 356.04 68.10 359.48 72.48 360.29 77.87 C 361.45 85.25 361.93 92.71 362.62 100.14 C 362.90 93.77 361.95 87.44 361.58 81.10 C 361.31 76.83 360.34 72.56 358.07 68.89 C 355.37 64.40 353.43 59.53 351.08 54.86 C 348.30 49.24 342.63 45.85 339.47 40.49 C 336.05 34.72 335.13 27.50 337.03 21.07 M 343.63 22.64 C 340.90 27.58 343.05 33.56 346.33 37.66 C 351.35 43.75 356.94 49.66 359.87 57.12 C 363.95 67.92 366.38 79.43 366.09 91.00 C 365.89 97.45 367.02 104.34 363.84 110.28 C 361.67 107.10 360.82 103.32 360.30 99.58 C 359.05 91.25 356.91 83.07 353.74 75.27 C 349.52 64.02 342.21 54.38 335.29 44.71 C 332.91 41.75 333.18 36.25 329.01 35.15 C 325.64 35.72 324.10 39.21 323.06 42.07 C 320.93 47.74 322.15 54.41 325.87 59.14 C 329.98 63.60 336.78 64.56 340.44 69.56 C 344.16 74.81 346.00 81.09 347.90 87.17 C 348.71 89.52 348.78 92.03 348.44 94.47 C 342.79 90.97 340.68 84.37 336.31 79.71 C 334.37 77.28 329.43 77.12 328.64 80.63 C 327.29 85.11 327.36 90.63 330.79 94.20 C 334.78 98.50 340.51 100.43 345.25 103.72 C 350.50 107.12 354.28 112.33 357.30 117.72 C 358.11 119.56 359.70 122.09 357.85 123.84 C 355.78 125.89 352.50 125.02 350.24 123.78 C 344.90 120.48 343.16 113.26 337.16 110.78 C 331.96 108.64 325.68 113.47 326.05 119.00 C 326.65 127.41 330.08 135.28 332.89 143.13 C 334.19 146.40 335.10 149.93 337.27 152.77 C 338.12 153.91 340.13 154.55 341.10 153.18 C 343.62 150.23 345.56 146.81 348.21 143.96 C 349.71 145.00 351.77 145.64 352.61 147.39 C 353.67 151.98 352.32 156.83 353.67 161.37 C 355.14 164.41 358.24 166.14 360.60 168.42 C 364.46 171.70 366.22 176.68 369.78 180.22 C 376.78 187.65 390.72 188.86 397.21 180.17 C 394.35 176.58 391.07 173.33 388.44 169.57 C 386.75 167.42 387.01 164.59 386.89 162.03 C 388.75 161.66 390.65 160.89 392.56 161.40 C 400.34 163.32 407.49 167.06 414.86 170.11 C 418.01 171.52 421.92 172.23 424.39 169.20 C 422.78 166.70 421.19 164.02 418.57 162.46 C 413.87 159.48 408.16 158.06 404.35 153.78 C 410.23 151.39 415.87 155.68 421.77 155.50 C 427.50 154.67 431.23 148.01 429.45 142.59 C 428.47 138.87 425.71 134.01 421.13 135.09 C 411.91 136.98 403.98 142.86 394.70 144.55 C 389.11 145.50 383.29 137.45 388.24 133.29 C 396.38 128.35 406.48 129.22 415.28 126.18 C 419.10 124.71 421.26 121.01 423.41 117.77 C 421.99 116.93 420.65 115.67 418.90 115.67 C 410.80 115.38 403.24 119.86 395.10 118.70 C 394.47 112.96 399.84 109.45 404.42 107.45 C 409.60 105.01 416.25 103.59 418.86 97.88 C 420.97 92.36 420.11 86.11 418.40 80.59 C 417.01 75.85 411.71 71.43 406.65 73.64 C 399.91 76.49 396.50 83.72 390.20 87.23 C 388.38 88.37 386.15 87.75 384.15 87.73 C 384.97 77.21 394.50 70.90 399.29 62.31 C 402.14 57.46 400.80 50.98 396.81 47.20 C 393.91 44.65 389.28 46.40 387.39 49.38 C 382.93 55.32 384.29 63.21 381.90 69.90 C 381.26 72.19 378.70 73.85 376.41 72.73 C 374.49 69.43 375.30 65.49 375.82 61.94 C 377.36 52.66 379.11 43.12 377.27 33.75 C 376.60 30.04 374.72 26.60 371.92 24.08 C 367.58 20.10 362.17 16.39 355.99 16.88 C 351.44 17.06 345.76 18.02 343.63 22.64 Z"}),w.createElement("path",{fill:"#f2f2f2",opacity:"1.00",d:" M 144.78 43.80 C 146.69 42.57 148.99 42.57 151.12 43.10 C 149.22 44.35 146.91 44.61 144.78 43.80 Z"}),w.createElement("path",{fill:"#f2f2f2",opacity:"1.00",d:" M 273.14 77.06 C 275.39 76.29 274.67 79.98 272.82 79.61 C 271.42 79.33 272.11 77.36 273.14 77.06 Z"}),w.createElement("path",{fill:"#f2f2f2",opacity:"1.00",d:" M 405.91 197.62 C 407.21 197.22 408.51 196.83 409.80 196.40 C 410.98 196.87 412.16 197.34 413.36 197.78 C 410.88 197.68 408.39 197.66 405.91 197.62 Z"}),w.createElement("path",{fill:"#f2f2f2",opacity:"1.00",d:" M 384.18 197.63 C 384.95 196.08 388.51 196.11 388.58 198.06 C 387.10 198.19 385.59 198.12 384.18 197.63 Z"}),w.createElement("path",{fill:"#f2f2f2",opacity:"1.00",d:" M 382.49 198.78 C 383.64 198.56 384.50 198.91 385.08 199.83 C 383.67 200.75 382.81 200.40 382.49 198.78 Z"}),w.createElement("path",{fill:"#f2f2f2",opacity:"1.00",d:" M 385.99 199.49 C 387.43 198.82 389.05 198.91 390.60 198.96 C 390.41 200.86 386.95 200.85 385.99 199.49 Z"}),w.createElement("path",{fill:"#f2f2f2",opacity:"1.00",d:" M 84.68 224.34 C 87.89 224.38 91.11 224.40 94.32 224.38 C 91.15 225.17 87.85 224.99 84.68 224.34 Z"}),w.createElement("path",{fill:"#f2f2f2",opacity:"1.00",d:" M 146.97 253.01 C 148.05 251.98 149.99 251.13 151.17 252.53 C 149.98 253.53 148.36 253.36 146.97 253.01 Z"})),w.createElement("g",{id:"#d1d1d1ff"},w.createElement("path",{fill:"#d1d1d1",opacity:"1.00",d:" M 347.59 9.54 C 350.49 8.87 353.52 8.83 356.41 9.60 C 353.46 9.57 350.52 9.55 347.59 9.54 Z"}),w.createElement("path",{fill:"#d1d1d1",opacity:"1.00",d:" M 441.55 167.28 C 440.68 166.06 440.80 164.93 441.91 163.91 C 442.55 165.13 442.42 166.25 441.55 167.28 Z"}),w.createElement("path",{fill:"#d1d1d1",opacity:"1.00",d:" M 263.26 216.11 C 262.53 214.67 262.84 213.62 264.18 212.95 C 264.55 214.19 264.24 215.25 263.26 216.11 Z"})),w.createElement("g",{id:"#f9f9f9ff"},w.createElement("path",{fill:"#f9f9f9",opacity:"1.00",d:" M 343.63 22.64 C 345.76 18.02 351.44 17.06 355.99 16.88 C 362.17 16.39 367.58 20.10 371.92 24.08 C 374.72 26.60 376.60 30.04 377.27 33.75 C 379.11 43.12 377.36 52.66 375.82 61.94 C 375.30 65.49 374.49 69.43 376.41 72.73 C 378.70 73.85 381.26 72.19 381.90 69.90 C 384.29 63.21 382.93 55.32 387.39 49.38 C 389.28 46.40 393.91 44.65 396.81 47.20 C 400.80 50.98 402.14 57.46 399.29 62.31 C 394.50 70.90 384.97 77.21 384.15 87.73 C 386.15 87.75 388.38 88.37 390.20 87.23 C 396.50 83.72 399.91 76.49 406.65 73.64 C 411.71 71.43 417.01 75.85 418.40 80.59 C 420.11 86.11 420.97 92.36 418.86 97.88 C 416.25 103.59 409.60 105.01 404.42 107.45 C 399.84 109.45 394.47 112.96 395.10 118.70 C 403.24 119.86 410.80 115.38 418.90 115.67 C 420.65 115.67 421.99 116.93 423.41 117.77 C 421.26 121.01 419.10 124.71 415.28 126.18 C 406.48 129.22 396.38 128.35 388.24 133.29 C 383.29 137.45 389.11 145.50 394.70 144.55 C 403.98 142.86 411.91 136.98 421.13 135.09 C 425.71 134.01 428.47 138.87 429.45 142.59 C 431.23 148.01 427.50 154.67 421.77 155.50 C 415.87 155.68 410.23 151.39 404.35 153.78 C 408.16 158.06 413.87 159.48 418.57 162.46 C 421.19 164.02 422.78 166.70 424.39 169.20 C 421.92 172.23 418.01 171.52 414.86 170.11 C 407.49 167.06 400.34 163.32 392.56 161.40 C 390.65 160.89 388.75 161.66 386.89 162.03 C 387.01 164.59 386.75 167.42 388.44 169.57 C 391.07 173.33 394.35 176.58 397.21 180.17 C 390.72 188.86 376.78 187.65 369.78 180.22 C 366.22 176.68 364.46 171.70 360.60 168.42 C 358.24 166.14 355.14 164.41 353.67 161.37 C 352.32 156.83 353.67 151.98 352.61 147.39 C 351.77 145.64 349.71 145.00 348.21 143.96 C 345.56 146.81 343.62 150.23 341.10 153.18 C 340.13 154.55 338.12 153.91 337.27 152.77 C 335.10 149.93 334.19 146.40 332.89 143.13 C 330.08 135.28 326.65 127.41 326.05 119.00 C 325.68 113.47 331.96 108.64 337.16 110.78 C 343.16 113.26 344.90 120.48 350.24 123.78 C 352.50 125.02 355.78 125.89 357.85 123.84 C 359.70 122.09 358.11 119.56 357.30 117.72 C 354.28 112.33 350.50 107.12 345.25 103.72 C 340.51 100.43 334.78 98.50 330.79 94.20 C 327.36 90.63 327.29 85.11 328.64 80.63 C 329.43 77.12 334.37 77.28 336.31 79.71 C 340.68 84.37 342.79 90.97 348.44 94.47 C 348.78 92.03 348.71 89.52 347.90 87.17 C 346.00 81.09 344.16 74.81 340.44 69.56 C 336.78 64.56 329.98 63.60 325.87 59.14 C 322.15 54.41 320.93 47.74 323.06 42.07 C 324.10 39.21 325.64 35.72 329.01 35.15 C 333.18 36.25 332.91 41.75 335.29 44.71 C 342.21 54.38 349.52 64.02 353.74 75.27 C 356.91 83.07 359.05 91.25 360.30 99.58 C 360.82 103.32 361.67 107.10 363.84 110.28 C 367.02 104.34 365.89 97.45 366.09 91.00 C 366.38 79.43 363.95 67.92 359.87 57.12 C 356.94 49.66 351.35 43.75 346.33 37.66 C 343.05 33.56 340.90 27.58 343.63 22.64 Z"}),w.createElement("path",{fill:"#f9f9f9",opacity:"1.00",d:" M 298.84 48.98 C 301.46 48.14 304.19 47.75 306.85 47.07 C 306.70 47.39 306.38 48.04 306.22 48.36 C 303.77 48.67 301.30 48.78 298.84 48.98 Z"}),w.createElement("path",{fill:"#f9f9f9",opacity:"1.00",d:" M 408.19 53.76 C 408.82 55.93 409.66 58.05 410.84 60.00 C 410.28 59.88 409.17 59.64 408.61 59.53 C 408.47 57.60 408.35 55.68 408.19 53.76 Z"}),w.createElement("path",{fill:"#f9f9f9",opacity:"1.00",d:" M 2.00 130.93 C 3.29 132.39 3.60 134.42 2.83 136.21 C 1.59 134.72 1.54 132.73 2.00 130.93 Z"}),w.createElement("path",{fill:"#f9f9f9",opacity:"1.00",d:" M 441.25 136.79 C 442.44 139.04 442.39 141.61 441.92 144.05 C 440.57 141.84 440.35 139.21 441.25 136.79 Z"}),w.createElement("path",{fill:"#f9f9f9",opacity:"1.00",d:" M 268.73 208.11 C 270.09 208.27 271.45 208.42 272.82 208.56 C 272.26 209.79 271.69 211.01 271.16 212.26 C 271.37 211.23 271.58 210.21 271.78 209.18 C 270.76 208.82 269.75 208.46 268.73 208.11 Z"})),w.createElement("g",{id:"#e2e2e2ff"},w.createElement("path",{fill:"#e2e2e2",opacity:"1.00",d:" M 329.03 19.35 C 329.85 18.48 332.06 18.56 331.69 20.18 C 331.03 19.97 329.69 19.56 329.03 19.35 Z"}),w.createElement("path",{fill:"#e2e2e2",opacity:"1.00",d:" M 417.82 257.96 C 418.36 258.21 419.46 258.70 420.00 258.94 C 419.46 258.70 418.36 258.21 417.82 257.96 Z"})),w.createElement("g",{id:"#dbdbdbff"},w.createElement("path",{fill:"#dbdbdb",opacity:"1.00",d:" M 302.43 22.59 C 303.25 25.79 303.07 29.13 302.30 32.32 C 302.29 29.07 302.34 25.83 302.43 22.59 Z"}),w.createElement("path",{fill:"#dbdbdb",opacity:"1.00",d:" M 2.89 118.00 C 2.41 116.72 2.67 115.64 3.70 114.76 C 4.40 116.08 4.13 117.16 2.89 118.00 Z"})),w.createElement("g",{id:"#e0e0e0ff"},w.createElement("path",{fill:"#e0e0e0",opacity:"1.00",d:" M 203.79 32.86 C 204.34 32.64 205.45 32.19 206.01 31.97 C 205.45 32.19 204.34 32.64 203.79 32.86 Z"}),w.createElement("path",{fill:"#e0e0e0",opacity:"1.00",d:" M 190.77 253.31 C 191.35 253.46 192.52 253.74 193.11 253.88 C 192.52 253.74 191.35 253.46 190.77 253.31 Z"})),w.createElement("g",{id:"#e3e3e3ff"},w.createElement("path",{fill:"#e3e3e3",opacity:"1.00",d:" M 385.16 32.52 C 386.27 31.39 386.77 31.61 386.66 33.18 C 386.29 33.02 385.54 32.69 385.16 32.52 Z"})),w.createElement("g",{id:"#dfdfdfff"},w.createElement("path",{fill:"#dfdfdf",opacity:"1.00",d:" M 301.42 36.30 C 301.57 35.72 301.86 34.55 302.00 33.97 C 301.86 34.55 301.57 35.72 301.42 36.30 Z"}),w.createElement("path",{fill:"#dfdfdf",opacity:"1.00",d:" M 414.88 256.97 C 415.41 257.24 416.45 257.78 416.98 258.06 C 416.45 257.78 415.41 257.24 414.88 256.97 Z"})),w.createElement("g",{id:"#d0cfcfff"},w.createElement("path",{fill:"#d0cfcf",opacity:"1.00",d:" M 188.81 38.10 C 189.49 36.87 190.52 36.47 191.90 36.92 C 191.17 38.14 190.14 38.54 188.81 38.10 Z"})),w.createElement("g",{id:"#ccccccff"},w.createElement("path",{fill:"#cccccc",opacity:"1.00",d:" M 184.80 38.76 C 185.67 37.69 186.75 37.43 188.04 37.97 C 187.19 39.16 186.11 39.42 184.80 38.76 Z"})),w.createElement("g",{id:"#c5c5c5ff"},w.createElement("path",{fill:"#c5c5c5",opacity:"1.00",d:" M 174.74 40.93 C 175.82 39.68 177.51 39.47 179.00 40.01 C 177.91 41.22 176.23 41.59 174.74 40.93 Z"})),w.createElement("g",{id:"#d0d0d0ff"},w.createElement("path",{fill:"#d0d0d0",opacity:"1.00",d:" M 167.85 41.90 C 168.96 40.68 170.67 40.49 172.17 41.06 C 171.03 42.24 169.34 42.56 167.85 41.90 Z"}),w.createElement("path",{fill:"#d0d0d0",opacity:"1.00",d:" M 155.78 42.86 C 157.28 41.62 159.29 41.52 161.10 42.04 C 159.60 43.30 157.58 43.58 155.78 42.86 Z"}),w.createElement("path",{fill:"#d0d0d0",opacity:"1.00",d:" M 270.00 217.16 C 269.48 215.66 269.74 214.00 270.95 212.91 C 271.61 214.40 271.25 216.10 270.00 217.16 Z"})),w.createElement("g",{id:"#d5d5d5ff"},w.createElement("path",{fill:"#d5d5d5",opacity:"1.00",d:" M 136.79 44.87 C 137.95 43.68 139.66 43.50 141.16 44.08 C 139.99 45.25 138.29 45.54 136.79 44.87 Z"}),w.createElement("path",{fill:"#d5d5d5",opacity:"1.00",d:" M 58.04 79.86 C 59.26 79.48 60.30 79.76 61.17 80.70 C 59.75 81.50 58.71 81.22 58.04 79.86 Z"}),w.createElement("path",{fill:"#d5d5d5",opacity:"1.00",d:" M 167.83 243.60 C 169.13 242.64 170.80 242.47 172.26 243.19 C 171.03 244.34 169.26 244.42 167.83 243.60 Z"})),w.createElement("g",{id:"#d2d2d2ff"},w.createElement("path",{fill:"#d2d2d2",opacity:"1.00",d:" M 130.81 45.62 C 131.81 44.64 132.93 44.47 134.18 45.12 C 133.19 46.20 132.07 46.37 130.81 45.62 Z"})),w.createElement("g",{id:"#dededeff"},w.createElement("path",{fill:"#dedede",opacity:"1.00",d:" M 120.73 48.74 C 121.29 48.52 122.40 48.07 122.95 47.84 C 122.40 48.07 121.29 48.52 120.73 48.74 Z"}),w.createElement("path",{fill:"#dedede",opacity:"1.00",d:" M 258.31 233.28 C 258.49 232.71 258.86 231.57 259.04 231.00 C 258.86 231.57 258.49 232.71 258.31 233.28 Z"})),w.createElement("g",{id:"#e6e6e6ff"},w.createElement("path",{fill:"#e6e6e6",opacity:"1.00",d:" M 91.90 75.98 C 92.14 75.43 92.61 74.33 92.85 73.78 C 92.61 74.33 92.14 75.43 91.90 75.98 Z"}),w.createElement("path",{fill:"#e6e6e6",opacity:"1.00",d:" M 436.59 107.89 C 437.65 109.91 437.37 112.30 436.01 114.11 C 435.67 112.03 435.45 109.78 436.59 107.89 Z"}),w.createElement("path",{fill:"#e6e6e6",opacity:"1.00",d:" M 434.09 178.21 C 433.60 176.86 433.51 174.99 435.04 174.28 C 435.91 175.62 435.04 177.19 434.09 178.21 Z"})),w.createElement("g",{id:"#d6d5d5ff"},w.createElement("path",{fill:"#d6d5d5",opacity:"1.00",d:" M 427.39 77.78 C 428.38 79.02 428.52 80.65 427.94 82.10 C 426.73 80.96 426.47 79.18 427.39 77.78 Z"})),w.createElement("g",{id:"#cccbcbff"},w.createElement("path",{fill:"#cccbcb",opacity:"1.00",d:" M 45.79 80.68 C 46.99 79.62 48.65 79.47 50.10 80.11 C 48.94 81.27 47.21 81.52 45.79 80.68 Z"})),w.createElement("g",{id:"#d7d7d7ff"},w.createElement("path",{fill:"#d7d7d7",opacity:"1.00",d:" M 88.15 89.28 C 87.49 88.01 87.65 86.87 88.64 85.86 C 89.36 87.12 89.20 88.26 88.15 89.28 Z"})),w.createElement("g",{id:"#e1e1e1ff"},w.createElement("path",{fill:"#e1e1e1",opacity:"1.00",d:" M 86.83 95.97 C 86.51 94.22 87.08 92.50 87.75 90.91 C 88.25 92.77 88.74 94.85 87.73 96.65 C 87.51 96.48 87.06 96.14 86.83 95.97 Z"}),w.createElement("path",{fill:"#e1e1e1",opacity:"1.00",d:" M 420.96 190.33 C 421.73 190.35 423.27 190.38 424.04 190.39 C 423.47 191.82 421.48 191.76 420.96 190.33 Z"}),w.createElement("path",{fill:"#e1e1e1",opacity:"1.00",d:" M 420.85 198.99 C 421.43 199.17 422.57 199.55 423.15 199.73 C 422.57 199.55 421.43 199.17 420.85 198.99 Z"}),w.createElement("path",{fill:"#e1e1e1",opacity:"1.00",d:" M 374.89 268.85 C 375.48 268.73 376.66 268.47 377.24 268.35 C 376.66 268.47 375.48 268.73 374.89 268.85 Z"})),w.createElement("g",{id:"#dcdcdcff"},w.createElement("path",{fill:"#dcdcdc",opacity:"1.00",d:" M 427.94 96.64 C 426.18 96.14 426.20 93.43 428.10 93.18 C 428.34 94.36 428.29 95.51 427.94 96.64 Z"})),w.createElement("g",{id:"#e5e5e5ff"},w.createElement("path",{fill:"#e5e5e5",opacity:"1.00",d:" M 217.57 132.46 C 216.79 129.20 216.92 125.81 217.48 122.53 C 218.12 125.81 218.14 129.17 217.57 132.46 Z"})),w.createElement("g",{id:"#e7e7e7ff"},w.createElement("path",{fill:"#e7e7e7",opacity:"1.00",d:" M 438.18 123.81 C 438.36 124.38 438.73 125.52 438.91 126.09 C 438.73 125.52 438.36 124.38 438.18 123.81 Z"})),w.createElement("g",{id:"#dadadaff"},w.createElement("path",{fill:"#dadada",opacity:"1.00",d:" M 214.57 131.18 C 214.97 132.61 215.12 134.09 215.14 135.58 C 213.10 135.64 212.94 131.97 214.57 131.18 Z"}),w.createElement("path",{fill:"#dadada",opacity:"1.00",d:" M 349.34 175.11 C 348.13 175.55 346.52 173.54 348.09 172.95 C 349.38 172.96 349.96 173.58 349.83 174.83 L 349.34 175.11 Z"})),w.createElement("g",{id:"#e0dfdfff"},w.createElement("path",{fill:"#e0dfdf",opacity:"1.00",d:" M 440.27 130.85 C 441.30 131.81 441.50 132.93 440.87 134.22 C 439.78 133.25 439.58 132.12 440.27 130.85 Z"})),w.createElement("g",{id:"#cbcacaff"},w.createElement("path",{fill:"#cbcaca",opacity:"1.00",d:" M 3.18 136.85 C 4.22 137.86 4.36 138.98 3.59 140.20 C 2.61 139.19 2.47 138.08 3.18 136.85 Z"})),w.createElement("g",{id:"#fbfbfbff"},w.createElement("path",{fill:"#fbfbfb",opacity:"1.00",d:" M 353.01 177.26 C 356.34 176.30 353.71 181.25 352.77 177.82 L 353.01 177.26 Z"}),w.createElement("path",{fill:"#fbfbfb",opacity:"1.00",d:" M 416.26 190.39 C 415.38 189.06 416.98 187.20 418.20 188.61 C 417.72 189.05 416.75 189.94 416.26 190.39 Z"}),w.createElement("path",{fill:"#fbfbfb",opacity:"1.00",d:" M 453.09 244.11 C 455.48 241.17 458.44 238.81 461.33 236.40 C 462.93 238.37 464.54 240.33 466.00 242.42 L 466.00 246.34 C 458.46 254.54 451.61 263.41 443.43 271.00 L 436.52 271.00 C 435.61 270.07 434.70 269.14 433.78 268.23 C 434.52 268.09 436.01 267.79 436.76 267.65 C 436.07 266.82 435.39 265.99 434.69 265.19 C 440.38 257.77 447.11 251.26 453.09 244.11 Z"})),w.createElement("g",{id:"#d1d0d0ff"},w.createElement("path",{fill:"#d1d0d0",opacity:"1.00",d:" M 433.69 182.20 C 432.66 181.17 432.66 180.07 433.71 178.90 C 434.47 180.03 434.46 181.12 433.69 182.20 Z"})),w.createElement("g",{id:"#cdccccff"},w.createElement("path",{fill:"#cdcccc",opacity:"1.00",d:" M 415.97 198.08 C 417.30 197.50 418.37 197.81 419.18 199.00 C 417.86 199.52 416.79 199.21 415.97 198.08 Z"})),w.createElement("g",{id:"#cecdcdff"},w.createElement("path",{fill:"#cecdcd",opacity:"1.00",d:" M 263.77 209.94 C 263.12 208.39 264.69 206.61 266.27 207.47 C 265.81 208.69 264.97 209.51 263.77 209.94 Z"})),w.createElement("g",{id:"#c3c2c2ff"},w.createElement("path",{fill:"#c3c2c2",opacity:"1.00",d:" M 270.08 220.84 C 271.36 222.36 271.55 224.47 270.58 226.21 C 269.61 224.57 269.53 222.63 270.08 220.84 Z"})),w.createElement("g",{id:"#d7d6d6ff"},w.createElement("path",{fill:"#d7d6d6",opacity:"1.00",d:" M 79.78 223.29 C 81.09 222.58 82.16 222.84 83.01 224.07 C 81.74 224.57 80.66 224.31 79.78 223.29 Z"})),w.createElement("g",{id:"#cfcfcfff"},w.createElement("path",{fill:"#cfcfcf",opacity:"1.00",d:" M 463.60 233.70 C 464.43 234.99 465.24 236.30 466.00 237.65 L 466.00 242.42 C 464.54 240.33 462.93 238.37 461.33 236.40 L 461.87 235.82 C 462.31 235.29 463.17 234.23 463.60 233.70 Z"})),w.createElement("g",{id:"#cdcdcdff"},w.createElement("path",{fill:"#cdcdcd",opacity:"1.00",d:" M 174.98 242.83 C 176.04 242.06 177.94 240.72 179.00 242.20 C 178.09 243.54 176.29 243.14 174.98 242.83 Z"})),w.createElement("g",{id:"#e1e0e0ff"},w.createElement("path",{fill:"#e1e0e0",opacity:"1.00",d:" M 197.88 255.37 C 200.24 254.61 202.73 254.56 205.12 255.19 C 202.89 256.55 200.18 256.57 197.88 255.37 Z"})),w.createElement("g",{id:"#c4c3c3ff"},w.createElement("path",{fill:"#c4c3c3",opacity:"1.00",d:" M 221.83 255.06 C 223.33 254.42 225.01 254.77 226.09 256.00 C 224.60 256.53 222.90 256.31 221.83 255.06 Z"})),w.createElement("g",{id:"#c8c8c8ff"},w.createElement("path",{fill:"#c8c8c8",opacity:"1.00",d:" M 231.89 255.94 C 233.04 254.72 234.83 254.48 236.23 255.42 C 234.97 256.39 233.34 256.52 231.89 255.94 Z"})),w.createElement("g",{id:"#ddddddff"},w.createElement("path",{fill:"#dddddd",opacity:"1.00",d:" M 411.80 256.25 C 412.37 256.45 413.49 256.86 414.06 257.07 C 413.49 256.86 412.37 256.45 411.80 256.25 Z"})))),w.createElement(_a,{title:e("5000.6007")||"水平视图"},w.createElement("svg",{className:"bottom_tabs_icon",width:"100%",height:"100%",viewBox:"0 0 418 278",version:"1.1",xmlns:"http://www.w3.org/2000/svg",onClick:()=>{Ai.current.position.set(.17,-23.57,-5.88),Ai.current.rotation.set(1.624,.0059,-3.1118),n.current.reset(),n.current.target.set(0,0,0),n.current.object.position.set(.17,-23.57,-5.88),n.current.object.up.set(.0078,.0759,-1),n.current.update(),Ai.current.updateMatrixWorld(),r({})}},w.createElement("g",{id:"#585757ff"},w.createElement("path",{fill:"#585757",opacity:"1.00",d:" M 263.57 3.51 C 270.79 0.85 278.85 -0.09 286.38 1.60 C 294.42 5.69 300.80 13.61 302.43 22.59 C 302.34 25.83 302.29 29.07 302.30 32.32 C 302.23 32.73 302.08 33.56 302.00 33.97 C 301.86 34.55 301.57 35.72 301.42 36.30 C 295.85 51.55 283.28 62.66 275.01 76.35 C 281.23 70.44 287.55 64.43 291.81 56.88 C 293.74 53.97 295.21 50.11 298.84 48.98 C 301.30 48.78 303.77 48.67 306.22 48.36 C 306.38 48.04 306.70 47.39 306.85 47.07 C 309.49 39.85 316.29 35.44 319.66 28.67 C 321.69 24.63 324.66 20.97 329.03 19.35 C 329.69 19.56 331.03 19.97 331.69 20.18 C 334.98 19.25 336.50 15.97 338.78 13.74 C 341.04 11.26 344.37 10.13 347.59 9.54 C 350.52 9.55 353.46 9.57 356.41 9.60 C 364.32 11.74 372.08 15.29 378.36 20.64 C 382.08 23.62 383.37 28.32 385.16 32.52 C 385.54 32.69 386.29 33.02 386.66 33.18 C 390.23 32.89 393.75 34.15 396.30 36.66 C 401.32 41.45 406.64 46.74 408.19 53.76 C 408.35 55.68 408.47 57.60 408.61 59.53 C 409.17 59.64 410.28 59.88 410.84 60.00 C 420.02 60.87 425.26 69.69 427.39 77.78 C 426.47 79.18 426.73 80.96 427.94 82.10 C 427.98 85.80 427.90 89.49 428.10 93.18 C 426.20 93.43 426.18 96.14 427.94 96.64 C 432.52 98.82 435.53 102.98 436.59 107.89 C 435.45 109.78 435.67 112.03 436.01 114.11 C 435.30 117.56 436.54 120.83 438.18 123.81 C 438.36 124.38 438.73 125.52 438.91 126.09 C 439.36 127.68 439.82 129.26 440.27 130.85 C 439.58 132.12 439.78 133.25 440.87 134.22 C 440.97 134.86 441.15 136.14 441.25 136.79 C 440.35 139.21 440.57 141.84 441.92 144.05 C 442.05 150.67 442.09 157.29 441.91 163.91 C 440.80 164.93 440.68 166.06 441.55 167.28 C 440.01 170.14 437.76 172.51 435.04 174.28 C 433.51 174.99 433.60 176.86 434.09 178.21 L 433.71 178.90 C 432.66 180.07 432.66 181.17 433.69 182.20 C 431.76 186.21 428.66 189.69 424.04 190.39 C 423.27 190.38 421.73 190.35 420.96 190.33 C 420.03 189.77 419.11 189.19 418.20 188.61 C 416.98 187.20 415.38 189.06 416.26 190.39 C 414.65 192.90 412.67 195.31 409.80 196.40 C 408.51 196.83 407.21 197.22 405.91 197.62 C 408.39 197.66 410.88 197.68 413.36 197.78 C 414.01 197.85 415.31 198.00 415.97 198.08 C 416.79 199.21 417.86 199.52 419.18 199.00 C 419.60 199.00 420.43 198.99 420.85 198.99 C 421.43 199.17 422.57 199.55 423.15 199.73 C 440.44 205.27 454.05 218.65 463.60 233.70 C 463.17 234.23 462.31 235.29 461.87 235.82 C 452.84 222.49 441.02 210.30 425.87 204.14 C 416.28 200.15 405.53 199.57 395.38 201.47 C 390.13 202.27 384.44 203.86 379.35 201.52 C 370.60 197.44 365.23 188.82 356.99 184.00 C 353.14 181.67 348.81 179.69 346.19 175.87 C 343.41 171.95 341.11 167.70 337.85 164.14 C 331.83 157.50 327.13 149.74 323.53 141.55 C 320.22 134.00 319.48 125.52 320.47 117.39 C 321.55 108.24 324.89 99.29 324.10 89.97 C 323.80 85.31 322.15 80.88 321.76 76.24 C 321.50 72.97 322.97 69.85 322.79 66.60 C 321.95 63.57 320.12 60.93 319.03 57.99 C 316.39 51.62 317.07 44.58 316.99 37.85 C 312.98 41.75 309.84 46.42 307.59 51.54 C 304.85 51.61 301.92 51.11 299.35 52.26 C 296.41 54.45 294.84 57.90 292.81 60.85 C 286.81 70.32 277.53 76.93 270.32 85.36 C 266.81 89.38 264.99 94.60 261.23 98.44 C 262.18 92.24 265.24 86.68 268.31 81.31 C 274.63 70.00 283.26 60.25 290.80 49.77 C 295.41 43.31 299.96 36.16 300.35 28.01 C 300.75 19.78 295.76 12.33 289.73 7.20 C 284.60 2.72 277.20 3.55 271.06 4.95 C 253.40 9.49 238.07 19.72 222.09 28.09 C 205.56 36.74 187.51 42.85 168.88 44.62 C 151.70 46.64 133.50 45.69 117.64 53.65 C 102.45 60.87 91.42 76.23 89.92 93.04 C 89.80 96.61 90.97 100.03 91.79 103.46 C 81.52 96.60 72.88 86.60 60.42 83.61 C 48.25 80.80 36.08 86.54 26.19 93.21 C 16.58 99.58 7.49 108.39 4.95 120.06 C 2.28 132.72 7.34 145.45 13.89 156.09 C 22.32 169.95 35.24 180.10 45.77 192.23 C 56.03 204.17 67.79 216.23 83.37 220.68 C 89.53 222.65 95.91 220.85 101.64 218.44 C 107.81 225.88 115.04 232.34 121.88 239.14 C 128.63 245.32 137.46 250.43 146.89 249.83 C 154.05 249.48 158.04 242.02 165.00 241.12 C 170.36 240.08 175.81 239.57 181.26 239.28 C 183.73 243.44 186.43 247.91 191.05 249.96 C 198.85 253.72 207.70 251.67 216.00 251.83 C 222.93 251.75 230.01 253.98 236.84 251.90 C 243.47 250.01 248.69 244.91 252.17 239.12 C 258.52 228.59 261.04 216.38 263.03 204.40 C 267.58 204.99 272.13 205.52 276.66 206.26 C 274.81 210.31 272.53 214.39 272.42 218.96 C 272.35 224.33 273.38 229.96 276.47 234.45 C 279.60 238.62 283.93 241.67 287.34 245.60 C 290.95 249.68 295.67 253.18 301.28 253.64 C 307.15 254.65 311.98 250.55 316.79 247.90 C 326.80 256.41 337.83 264.63 351.06 267.07 C 364.70 269.89 379.21 265.65 389.99 257.04 C 393.11 254.54 396.01 251.80 399.02 249.17 C 407.80 253.46 418.20 253.17 426.49 258.59 C 429.47 260.45 432.27 262.62 434.69 265.19 C 435.39 265.99 436.07 266.82 436.76 267.65 C 436.01 267.79 434.52 268.09 433.78 268.23 C 429.87 264.22 424.83 261.65 420.00 258.94 C 419.46 258.70 418.36 258.21 417.82 257.96 L 416.98 258.06 C 416.45 257.78 415.41 257.24 414.88 256.97 L 414.06 257.07 C 413.49 256.86 412.37 256.45 411.80 256.25 C 407.64 256.00 403.59 254.90 399.77 253.25 C 392.98 259.28 385.83 265.08 377.24 268.35 C 376.66 268.47 375.48 268.73 374.89 268.85 C 372.73 269.62 370.57 270.36 368.37 271.00 L 351.66 271.00 C 338.54 268.10 326.47 261.25 316.93 251.83 C 314.76 253.05 312.62 254.32 310.38 255.42 C 303.54 259.07 294.91 256.52 289.27 251.75 C 284.77 247.58 280.44 243.22 276.25 238.73 C 272.99 235.31 271.40 230.77 270.58 226.21 C 271.55 224.47 271.36 222.36 270.08 220.84 C 270.04 219.61 270.02 218.38 270.00 217.16 C 271.25 216.10 271.61 214.40 270.95 212.91 L 271.16 212.26 C 271.69 211.01 272.26 209.79 272.82 208.56 C 271.45 208.42 270.09 208.27 268.73 208.11 C 268.12 207.95 266.88 207.63 266.27 207.47 C 264.69 206.61 263.12 208.39 263.77 209.94 C 263.87 210.69 264.08 212.20 264.18 212.95 C 262.84 213.62 262.53 214.67 263.26 216.11 C 262.51 221.23 261.06 226.23 259.04 231.00 C 258.86 231.57 258.49 232.71 258.31 233.28 C 254.31 243.09 246.98 252.78 236.23 255.42 C 234.83 254.48 233.04 254.72 231.89 255.94 C 229.96 255.97 228.02 255.99 226.09 256.00 C 225.01 254.77 223.33 254.42 221.83 255.06 C 216.26 254.97 210.69 254.96 205.12 255.19 C 202.73 254.56 200.24 254.61 197.88 255.37 C 196.28 254.88 194.69 254.38 193.11 253.88 C 192.52 253.74 191.35 253.46 190.77 253.31 C 185.62 251.02 182.51 246.34 179.00 242.20 C 177.94 240.72 176.04 242.06 174.98 242.83 C 174.30 242.92 172.94 243.10 172.26 243.19 C 170.80 242.47 169.13 242.64 167.83 243.60 C 161.33 244.60 156.78 249.61 151.17 252.53 C 149.99 251.13 148.05 251.98 146.97 253.01 C 136.80 253.92 127.35 248.57 120.19 241.81 C 113.72 235.43 107.48 228.82 100.89 222.56 C 98.73 223.25 96.56 223.95 94.32 224.38 C 91.11 224.40 87.89 224.38 84.68 224.34 C 84.26 224.27 83.43 224.14 83.01 224.07 C 82.16 222.84 81.09 222.58 79.78 223.29 C 73.27 220.44 66.80 217.29 61.37 212.64 C 54.60 206.75 48.51 200.13 42.66 193.33 C 37.76 188.55 33.08 183.57 28.68 178.32 C 17.66 167.71 7.92 155.08 3.59 140.20 C 4.36 138.98 4.22 137.86 3.18 136.85 L 2.83 136.21 C 3.60 134.42 3.29 132.39 2.00 130.93 C 1.87 126.60 1.93 122.24 2.89 118.00 C 4.13 117.16 4.40 116.08 3.70 114.76 C 5.93 109.36 8.85 104.18 13.06 100.06 C 22.04 90.95 33.26 83.70 45.79 80.68 C 47.21 81.52 48.94 81.27 50.10 80.11 C 52.75 80.07 55.39 80.05 58.04 79.86 C 58.71 81.22 59.75 81.50 61.17 80.70 C 71.13 82.92 79.42 89.26 86.83 95.97 C 87.06 96.14 87.51 96.48 87.73 96.65 C 88.74 94.85 88.25 92.77 87.75 90.91 C 87.85 90.50 88.05 89.68 88.15 89.28 C 89.20 88.26 89.36 87.12 88.64 85.86 C 89.62 82.53 90.69 79.23 91.90 75.98 C 92.14 75.43 92.61 74.33 92.85 73.78 C 98.67 62.40 108.82 53.38 120.73 48.74 C 121.29 48.52 122.40 48.07 122.95 47.84 C 125.54 47.01 128.17 46.27 130.81 45.62 C 132.07 46.37 133.19 46.20 134.18 45.12 C 134.83 45.05 136.14 44.93 136.79 44.87 C 138.29 45.54 139.99 45.25 141.16 44.08 C 142.37 43.99 143.57 43.90 144.78 43.80 C 146.91 44.61 149.22 44.35 151.12 43.10 C 152.68 43.02 154.23 42.94 155.78 42.86 C 157.58 43.58 159.60 43.30 161.10 42.04 C 163.35 42.00 165.60 41.95 167.85 41.90 C 169.34 42.56 171.03 42.24 172.17 41.06 C 172.81 41.03 174.10 40.96 174.74 40.93 C 176.23 41.59 177.91 41.22 179.00 40.01 C 180.93 39.56 182.86 39.14 184.80 38.76 C 186.11 39.42 187.19 39.16 188.04 37.97 L 188.81 38.10 C 190.14 38.54 191.17 38.14 191.90 36.92 C 195.82 35.44 199.79 34.12 203.79 32.86 C 204.34 32.64 205.45 32.19 206.01 31.97 C 225.84 23.78 243.35 10.84 263.57 3.51 M 337.03 21.07 C 335.13 27.50 336.05 34.72 339.47 40.49 C 342.63 45.85 348.30 49.24 351.08 54.86 C 353.43 59.53 355.37 64.40 358.07 68.89 C 360.34 72.56 361.31 76.83 361.58 81.10 C 361.95 87.44 362.90 93.77 362.62 100.14 C 361.93 92.71 361.45 85.25 360.29 77.87 C 359.48 72.48 356.04 68.10 353.88 63.23 C 352.05 59.21 350.41 54.97 347.32 51.72 C 343.47 47.57 338.68 44.01 336.49 38.59 C 334.34 34.14 334.66 29.08 333.68 24.35 C 332.39 21.57 328.04 22.45 326.24 24.31 C 315.80 36.19 316.78 55.39 326.67 67.30 C 328.49 70.50 332.03 71.69 335.23 72.98 C 337.87 73.92 338.85 76.77 340.25 78.93 C 338.29 77.21 336.57 74.92 333.88 74.32 C 330.36 73.49 327.23 71.67 324.17 69.80 C 323.31 74.21 323.78 78.71 324.95 83.01 C 326.14 87.41 326.20 92.04 327.51 96.41 C 329.05 100.56 333.72 101.88 337.23 103.89 C 341.32 105.82 344.57 109.07 347.19 112.70 C 343.91 109.92 340.68 106.93 336.62 105.32 C 332.75 103.82 329.17 101.70 325.99 99.03 C 324.98 104.66 323.83 110.27 322.78 115.89 C 321.10 124.84 322.46 134.27 326.39 142.47 C 330.25 150.54 334.79 158.69 342.00 164.25 C 343.80 161.94 345.50 159.55 347.17 157.14 C 346.05 160.10 344.84 163.02 343.63 165.95 C 348.31 170.51 353.71 174.20 358.82 178.24 C 361.55 180.53 365.11 181.23 368.54 181.77 C 371.23 186.18 374.03 191.18 379.31 192.82 C 387.84 195.75 397.26 195.73 406.06 194.15 C 410.42 193.54 413.90 190.43 415.18 186.25 C 411.35 182.02 406.52 178.97 401.87 175.75 C 407.76 177.23 412.70 180.90 417.27 184.74 C 419.22 186.23 421.55 188.34 424.21 187.36 C 430.57 185.07 433.66 177.45 431.93 171.14 C 431.21 166.75 427.11 164.41 424.06 161.71 C 426.24 162.46 428.69 162.92 430.45 164.54 C 432.20 166.38 433.24 168.76 434.50 170.95 C 436.44 169.40 438.85 167.90 439.27 165.23 C 440.49 159.55 440.01 153.68 439.86 147.92 C 439.53 138.75 438.38 129.35 433.92 121.18 C 431.51 124.02 429.00 127.07 425.32 128.25 C 416.71 131.29 408.08 134.49 399.03 135.93 C 408.13 132.41 417.66 129.90 426.40 125.47 C 431.23 123.22 432.61 117.56 434.03 112.91 C 435.49 107.22 431.41 102.21 426.89 99.37 C 423.57 104.21 420.14 109.51 414.19 111.32 C 417.52 108.30 421.36 105.51 423.20 101.25 C 427.62 90.42 427.06 76.88 419.40 67.63 C 416.66 64.23 412.29 63.07 408.14 62.63 C 406.14 65.43 403.96 68.09 401.41 70.41 C 403.69 66.33 406.75 62.19 406.53 57.28 C 405.94 51.79 402.20 47.36 398.66 43.39 C 394.94 39.14 390.05 35.24 384.05 35.62 C 383.64 40.89 383.50 46.22 382.34 51.41 C 381.72 44.42 382.71 37.33 381.43 30.40 C 380.22 24.68 374.89 21.38 370.08 18.87 C 364.13 15.87 357.95 12.45 351.12 12.39 C 345.44 12.61 339.02 15.33 337.03 21.07 M 273.14 77.06 C 272.11 77.36 271.42 79.33 272.82 79.61 C 274.67 79.98 275.39 76.29 273.14 77.06 M 349.34 175.11 C 349.55 176.45 351.43 177.83 352.77 177.82 C 353.71 181.25 356.34 176.30 353.01 177.26 C 352.64 175.90 351.20 174.89 349.83 174.83 C 349.96 173.58 349.38 172.96 348.09 172.95 C 346.52 173.54 348.13 175.55 349.34 175.11 M 362.59 184.16 C 369.88 188.22 373.72 197.39 382.49 198.78 C 382.81 200.40 383.67 200.75 385.08 199.83 L 385.99 199.49 C 386.95 200.85 390.41 200.86 390.60 198.96 C 391.93 198.89 393.24 198.66 394.53 198.28 C 392.55 198.08 390.56 197.97 388.58 198.06 C 388.51 196.11 384.95 196.08 384.18 197.63 C 381.19 196.78 378.11 196.07 375.34 194.60 C 372.00 192.27 370.16 188.49 367.33 185.67 C 365.81 184.99 364.18 184.62 362.59 184.16 Z"}),w.createElement("path",{fill:"#585757",opacity:"1.00",d:" M 204.77 94.74 C 214.12 89.82 222.59 83.15 232.69 79.72 C 233.36 80.05 234.71 80.70 235.39 81.03 C 233.02 85.74 229.93 90.06 227.84 94.92 C 223.90 103.84 221.52 113.38 220.01 122.99 C 219.53 127.57 219.23 132.87 222.21 136.71 C 223.76 138.77 227.91 139.57 226.82 142.80 C 226.21 146.25 222.06 149.60 218.73 147.25 C 212.32 143.22 212.14 134.69 211.90 127.95 C 211.48 123.69 212.41 118.25 208.61 115.26 C 203.46 111.34 196.55 113.11 190.73 111.25 C 188.47 110.38 188.98 107.43 188.40 105.54 C 193.47 101.39 198.96 97.78 204.77 94.74 M 207.48 97.53 C 201.81 100.93 195.98 104.11 190.70 108.10 C 197.18 110.02 205.08 107.26 210.35 112.64 C 216.10 117.18 212.98 125.08 214.57 131.18 C 212.94 131.97 213.10 135.64 215.14 135.58 C 215.20 139.55 217.65 143.12 221.05 145.03 C 222.20 144.71 223.33 144.34 224.45 143.93 C 221.58 140.49 218.24 137.10 217.57 132.46 C 218.14 129.17 218.12 125.81 217.48 122.53 C 219.82 109.55 222.71 96.14 230.03 84.95 C 222.17 88.51 215.03 93.39 207.48 97.53 Z"})),w.createElement("g",{id:"#f2f2f2ff"},w.createElement("path",{fill:"#f2f2f2",opacity:"1.00",d:" M 271.06 4.95 C 277.20 3.55 284.60 2.72 289.73 7.20 C 295.76 12.33 300.75 19.78 300.35 28.01 C 299.96 36.16 295.41 43.31 290.80 49.77 C 283.26 60.25 274.63 70.00 268.31 81.31 C 265.24 86.68 262.18 92.24 261.23 98.44 C 264.99 94.60 266.81 89.38 270.32 85.36 C 277.53 76.93 286.81 70.32 292.81 60.85 C 294.84 57.90 296.41 54.45 299.35 52.26 C 301.92 51.11 304.85 51.61 307.59 51.54 C 309.84 46.42 312.98 41.75 316.99 37.85 C 317.07 44.58 316.39 51.62 319.03 57.99 C 320.12 60.93 321.95 63.57 322.79 66.60 C 322.97 69.85 321.50 72.97 321.76 76.24 C 322.15 80.88 323.80 85.31 324.10 89.97 C 324.89 99.29 321.55 108.24 320.47 117.39 C 319.48 125.52 320.22 134.00 323.53 141.55 C 327.13 149.74 331.83 157.50 337.85 164.14 C 341.11 167.70 343.41 171.95 346.19 175.87 C 348.81 179.69 353.14 181.67 356.99 184.00 C 365.23 188.82 370.60 197.44 379.35 201.52 C 384.44 203.86 390.13 202.27 395.38 201.47 C 405.53 199.57 416.28 200.15 425.87 204.14 C 441.02 210.30 452.84 222.49 461.87 235.82 L 461.33 236.40 C 458.44 238.81 455.48 241.17 453.09 244.11 C 447.11 251.26 440.38 257.77 434.69 265.19 C 432.27 262.62 429.47 260.45 426.49 258.59 C 418.20 253.17 407.80 253.46 399.02 249.17 C 396.01 251.80 393.11 254.54 389.99 257.04 C 379.21 265.65 364.70 269.89 351.06 267.07 C 337.83 264.63 326.80 256.41 316.79 247.90 C 311.98 250.55 307.15 254.65 301.28 253.64 C 295.67 253.18 290.95 249.68 287.34 245.60 C 283.93 241.67 279.60 238.62 276.47 234.45 C 273.38 229.96 272.35 224.33 272.42 218.96 C 272.53 214.39 274.81 210.31 276.66 206.26 C 272.13 205.52 267.58 204.99 263.03 204.40 C 261.04 216.38 258.52 228.59 252.17 239.12 C 248.69 244.91 243.47 250.01 236.84 251.90 C 230.01 253.98 222.93 251.75 216.00 251.83 C 207.70 251.67 198.85 253.72 191.05 249.96 C 186.43 247.91 183.73 243.44 181.26 239.28 C 175.81 239.57 170.36 240.08 165.00 241.12 C 158.04 242.02 154.05 249.48 146.89 249.83 C 137.46 250.43 128.63 245.32 121.88 239.14 C 115.04 232.34 107.81 225.88 101.64 218.44 C 95.91 220.85 89.53 222.65 83.37 220.68 C 67.79 216.23 56.03 204.17 45.77 192.23 C 35.24 180.10 22.32 169.95 13.89 156.09 C 7.34 145.45 2.28 132.72 4.95 120.06 C 7.49 108.39 16.58 99.58 26.19 93.21 C 36.08 86.54 48.25 80.80 60.42 83.61 C 72.88 86.60 81.52 96.60 91.79 103.46 C 90.97 100.03 89.80 96.61 89.92 93.04 C 91.42 76.23 102.45 60.87 117.64 53.65 C 133.50 45.69 151.70 46.64 168.88 44.62 C 187.51 42.85 205.56 36.74 222.09 28.09 C 238.07 19.72 253.40 9.49 271.06 4.95 M 256.61 51.61 C 241.91 60.89 226.89 69.68 212.60 79.60 C 199.70 88.46 186.37 96.64 173.40 105.40 C 169.27 108.17 164.30 110.12 161.41 114.38 C 159.68 117.18 158.25 120.20 157.36 123.37 C 156.04 128.94 157.72 134.79 160.67 139.56 C 160.53 132.38 162.56 124.93 167.69 119.70 C 173.37 113.35 181.58 110.37 188.40 105.54 C 188.98 107.43 188.47 110.38 190.73 111.25 C 196.55 113.11 203.46 111.34 208.61 115.26 C 212.41 118.25 211.48 123.69 211.90 127.95 C 212.14 134.69 212.32 143.22 218.73 147.25 C 222.06 149.60 226.21 146.25 226.82 142.80 C 227.91 139.57 223.76 138.77 222.21 136.71 C 219.23 132.87 219.53 127.57 220.01 122.99 C 221.52 113.38 223.90 103.84 227.84 94.92 C 229.93 90.06 233.02 85.74 235.39 81.03 C 234.71 80.70 233.36 80.05 232.69 79.72 C 239.50 79.29 246.66 81.38 253.38 79.36 C 259.38 76.57 260.15 69.26 261.57 63.58 C 262.71 57.39 266.68 52.34 270.83 47.83 C 273.61 45.08 278.22 43.25 278.28 38.72 C 270.22 41.46 263.75 47.18 256.61 51.61 Z"}),w.createElement("path",{fill:"#f2f2f2",opacity:"1.00",d:" M 337.03 21.07 C 339.02 15.33 345.44 12.61 351.12 12.39 C 357.95 12.45 364.13 15.87 370.08 18.87 C 374.89 21.38 380.22 24.68 381.43 30.40 C 382.71 37.33 381.72 44.42 382.34 51.41 C 383.50 46.22 383.64 40.89 384.05 35.62 C 390.05 35.24 394.94 39.14 398.66 43.39 C 402.20 47.36 405.94 51.79 406.53 57.28 C 406.75 62.19 403.69 66.33 401.41 70.41 C 403.96 68.09 406.14 65.43 408.14 62.63 C 412.29 63.07 416.66 64.23 419.40 67.63 C 427.06 76.88 427.62 90.42 423.20 101.25 C 421.36 105.51 417.52 108.30 414.19 111.32 C 420.14 109.51 423.57 104.21 426.89 99.37 C 431.41 102.21 435.49 107.22 434.03 112.91 C 432.61 117.56 431.23 123.22 426.40 125.47 C 417.66 129.90 408.13 132.41 399.03 135.93 C 408.08 134.49 416.71 131.29 425.32 128.25 C 429.00 127.07 431.51 124.02 433.92 121.18 C 438.38 129.35 439.53 138.75 439.86 147.92 C 440.01 153.68 440.49 159.55 439.27 165.23 C 438.85 167.90 436.44 169.40 434.50 170.95 C 433.24 168.76 432.20 166.38 430.45 164.54 C 428.69 162.92 426.24 162.46 424.06 161.71 C 427.11 164.41 431.21 166.75 431.93 171.14 C 433.66 177.45 430.57 185.07 424.21 187.36 C 421.55 188.34 419.22 186.23 417.27 184.74 C 412.70 180.90 407.76 177.23 401.87 175.75 C 406.52 178.97 411.35 182.02 415.18 186.25 C 413.90 190.43 410.42 193.54 406.06 194.15 C 397.26 195.73 387.84 195.75 379.31 192.82 C 374.03 191.18 371.23 186.18 368.54 181.77 C 365.11 181.23 361.55 180.53 358.82 178.24 C 353.71 174.20 348.31 170.51 343.63 165.95 C 344.84 163.02 346.05 160.10 347.17 157.14 C 345.50 159.55 343.80 161.94 342.00 164.25 C 334.79 158.69 330.25 150.54 326.39 142.47 C 322.46 134.27 321.10 124.84 322.78 115.89 C 323.83 110.27 324.98 104.66 325.99 99.03 C 329.17 101.70 332.75 103.82 336.62 105.32 C 340.68 106.93 343.91 109.92 347.19 112.70 C 344.57 109.07 341.32 105.82 337.23 103.89 C 333.72 101.88 329.05 100.56 327.51 96.41 C 326.20 92.04 326.14 87.41 324.95 83.01 C 323.78 78.71 323.31 74.21 324.17 69.80 C 327.23 71.67 330.36 73.49 333.88 74.32 C 336.57 74.92 338.29 77.21 340.25 78.93 C 338.85 76.77 337.87 73.92 335.23 72.98 C 332.03 71.69 328.49 70.50 326.67 67.30 C 316.78 55.39 315.80 36.19 326.24 24.31 C 328.04 22.45 332.39 21.57 333.68 24.35 C 334.66 29.08 334.34 34.14 336.49 38.59 C 338.68 44.01 343.47 47.57 347.32 51.72 C 350.41 54.97 352.05 59.21 353.88 63.23 C 356.04 68.10 359.48 72.48 360.29 77.87 C 361.45 85.25 361.93 92.71 362.62 100.14 C 362.90 93.77 361.95 87.44 361.58 81.10 C 361.31 76.83 360.34 72.56 358.07 68.89 C 355.37 64.40 353.43 59.53 351.08 54.86 C 348.30 49.24 342.63 45.85 339.47 40.49 C 336.05 34.72 335.13 27.50 337.03 21.07 M 343.63 22.64 C 340.90 27.58 343.05 33.56 346.33 37.66 C 351.35 43.75 356.94 49.66 359.87 57.12 C 363.95 67.92 366.38 79.43 366.09 91.00 C 365.89 97.45 367.02 104.34 363.84 110.28 C 361.67 107.10 360.82 103.32 360.30 99.58 C 359.05 91.25 356.91 83.07 353.74 75.27 C 349.52 64.02 342.21 54.38 335.29 44.71 C 332.91 41.75 333.18 36.25 329.01 35.15 C 325.64 35.72 324.10 39.21 323.06 42.07 C 320.93 47.74 322.15 54.41 325.87 59.14 C 329.98 63.60 336.78 64.56 340.44 69.56 C 344.16 74.81 346.00 81.09 347.90 87.17 C 348.71 89.52 348.78 92.03 348.44 94.47 C 342.79 90.97 340.68 84.37 336.31 79.71 C 334.37 77.28 329.43 77.12 328.64 80.63 C 327.29 85.11 327.36 90.63 330.79 94.20 C 334.78 98.50 340.51 100.43 345.25 103.72 C 350.50 107.12 354.28 112.33 357.30 117.72 C 358.11 119.56 359.70 122.09 357.85 123.84 C 355.78 125.89 352.50 125.02 350.24 123.78 C 344.90 120.48 343.16 113.26 337.16 110.78 C 331.96 108.64 325.68 113.47 326.05 119.00 C 326.65 127.41 330.08 135.28 332.89 143.13 C 334.19 146.40 335.10 149.93 337.27 152.77 C 338.12 153.91 340.13 154.55 341.10 153.18 C 343.62 150.23 345.56 146.81 348.21 143.96 C 349.71 145.00 351.77 145.64 352.61 147.39 C 353.67 151.98 352.32 156.83 353.67 161.37 C 355.14 164.41 358.24 166.14 360.60 168.42 C 364.46 171.70 366.22 176.68 369.78 180.22 C 376.78 187.65 390.72 188.86 397.21 180.17 C 394.35 176.58 391.07 173.33 388.44 169.57 C 386.75 167.42 387.01 164.59 386.89 162.03 C 388.75 161.66 390.65 160.89 392.56 161.40 C 400.34 163.32 407.49 167.06 414.86 170.11 C 418.01 171.52 421.92 172.23 424.39 169.20 C 422.78 166.70 421.19 164.02 418.57 162.46 C 413.87 159.48 408.16 158.06 404.35 153.78 C 410.23 151.39 415.87 155.68 421.77 155.50 C 427.50 154.67 431.23 148.01 429.45 142.59 C 428.47 138.87 425.71 134.01 421.13 135.09 C 411.91 136.98 403.98 142.86 394.70 144.55 C 389.11 145.50 383.29 137.45 388.24 133.29 C 396.38 128.35 406.48 129.22 415.28 126.18 C 419.10 124.71 421.26 121.01 423.41 117.77 C 421.99 116.93 420.65 115.67 418.90 115.67 C 410.80 115.38 403.24 119.86 395.10 118.70 C 394.47 112.96 399.84 109.45 404.42 107.45 C 409.60 105.01 416.25 103.59 418.86 97.88 C 420.97 92.36 420.11 86.11 418.40 80.59 C 417.01 75.85 411.71 71.43 406.65 73.64 C 399.91 76.49 396.50 83.72 390.20 87.23 C 388.38 88.37 386.15 87.75 384.15 87.73 C 384.97 77.21 394.50 70.90 399.29 62.31 C 402.14 57.46 400.80 50.98 396.81 47.20 C 393.91 44.65 389.28 46.40 387.39 49.38 C 382.93 55.32 384.29 63.21 381.90 69.90 C 381.26 72.19 378.70 73.85 376.41 72.73 C 374.49 69.43 375.30 65.49 375.82 61.94 C 377.36 52.66 379.11 43.12 377.27 33.75 C 376.60 30.04 374.72 26.60 371.92 24.08 C 367.58 20.10 362.17 16.39 355.99 16.88 C 351.44 17.06 345.76 18.02 343.63 22.64 Z"}),w.createElement("path",{fill:"#f2f2f2",opacity:"1.00",d:" M 144.78 43.80 C 146.69 42.57 148.99 42.57 151.12 43.10 C 149.22 44.35 146.91 44.61 144.78 43.80 Z"}),w.createElement("path",{fill:"#f2f2f2",opacity:"1.00",d:" M 273.14 77.06 C 275.39 76.29 274.67 79.98 272.82 79.61 C 271.42 79.33 272.11 77.36 273.14 77.06 Z"}),w.createElement("path",{fill:"#f2f2f2",opacity:"1.00",d:" M 405.91 197.62 C 407.21 197.22 408.51 196.83 409.80 196.40 C 410.98 196.87 412.16 197.34 413.36 197.78 C 410.88 197.68 408.39 197.66 405.91 197.62 Z"}),w.createElement("path",{fill:"#f2f2f2",opacity:"1.00",d:" M 384.18 197.63 C 384.95 196.08 388.51 196.11 388.58 198.06 C 387.10 198.19 385.59 198.12 384.18 197.63 Z"}),w.createElement("path",{fill:"#f2f2f2",opacity:"1.00",d:" M 382.49 198.78 C 383.64 198.56 384.50 198.91 385.08 199.83 C 383.67 200.75 382.81 200.40 382.49 198.78 Z"}),w.createElement("path",{fill:"#f2f2f2",opacity:"1.00",d:" M 385.99 199.49 C 387.43 198.82 389.05 198.91 390.60 198.96 C 390.41 200.86 386.95 200.85 385.99 199.49 Z"}),w.createElement("path",{fill:"#f2f2f2",opacity:"1.00",d:" M 84.68 224.34 C 87.89 224.38 91.11 224.40 94.32 224.38 C 91.15 225.17 87.85 224.99 84.68 224.34 Z"}),w.createElement("path",{fill:"#f2f2f2",opacity:"1.00",d:" M 146.97 253.01 C 148.05 251.98 149.99 251.13 151.17 252.53 C 149.98 253.53 148.36 253.36 146.97 253.01 Z"})),w.createElement("g",{id:"#d1d1d1ff"},w.createElement("path",{fill:"#d1d1d1",opacity:"1.00",d:" M 347.59 9.54 C 350.49 8.87 353.52 8.83 356.41 9.60 C 353.46 9.57 350.52 9.55 347.59 9.54 Z"}),w.createElement("path",{fill:"#d1d1d1",opacity:"1.00",d:" M 441.55 167.28 C 440.68 166.06 440.80 164.93 441.91 163.91 C 442.55 165.13 442.42 166.25 441.55 167.28 Z"}),w.createElement("path",{fill:"#d1d1d1",opacity:"1.00",d:" M 263.26 216.11 C 262.53 214.67 262.84 213.62 264.18 212.95 C 264.55 214.19 264.24 215.25 263.26 216.11 Z"})),w.createElement("g",{id:"#f9f9f9ff"},w.createElement("path",{fill:"#f9f9f9",opacity:"1.00",d:" M 343.63 22.64 C 345.76 18.02 351.44 17.06 355.99 16.88 C 362.17 16.39 367.58 20.10 371.92 24.08 C 374.72 26.60 376.60 30.04 377.27 33.75 C 379.11 43.12 377.36 52.66 375.82 61.94 C 375.30 65.49 374.49 69.43 376.41 72.73 C 378.70 73.85 381.26 72.19 381.90 69.90 C 384.29 63.21 382.93 55.32 387.39 49.38 C 389.28 46.40 393.91 44.65 396.81 47.20 C 400.80 50.98 402.14 57.46 399.29 62.31 C 394.50 70.90 384.97 77.21 384.15 87.73 C 386.15 87.75 388.38 88.37 390.20 87.23 C 396.50 83.72 399.91 76.49 406.65 73.64 C 411.71 71.43 417.01 75.85 418.40 80.59 C 420.11 86.11 420.97 92.36 418.86 97.88 C 416.25 103.59 409.60 105.01 404.42 107.45 C 399.84 109.45 394.47 112.96 395.10 118.70 C 403.24 119.86 410.80 115.38 418.90 115.67 C 420.65 115.67 421.99 116.93 423.41 117.77 C 421.26 121.01 419.10 124.71 415.28 126.18 C 406.48 129.22 396.38 128.35 388.24 133.29 C 383.29 137.45 389.11 145.50 394.70 144.55 C 403.98 142.86 411.91 136.98 421.13 135.09 C 425.71 134.01 428.47 138.87 429.45 142.59 C 431.23 148.01 427.50 154.67 421.77 155.50 C 415.87 155.68 410.23 151.39 404.35 153.78 C 408.16 158.06 413.87 159.48 418.57 162.46 C 421.19 164.02 422.78 166.70 424.39 169.20 C 421.92 172.23 418.01 171.52 414.86 170.11 C 407.49 167.06 400.34 163.32 392.56 161.40 C 390.65 160.89 388.75 161.66 386.89 162.03 C 387.01 164.59 386.75 167.42 388.44 169.57 C 391.07 173.33 394.35 176.58 397.21 180.17 C 390.72 188.86 376.78 187.65 369.78 180.22 C 366.22 176.68 364.46 171.70 360.60 168.42 C 358.24 166.14 355.14 164.41 353.67 161.37 C 352.32 156.83 353.67 151.98 352.61 147.39 C 351.77 145.64 349.71 145.00 348.21 143.96 C 345.56 146.81 343.62 150.23 341.10 153.18 C 340.13 154.55 338.12 153.91 337.27 152.77 C 335.10 149.93 334.19 146.40 332.89 143.13 C 330.08 135.28 326.65 127.41 326.05 119.00 C 325.68 113.47 331.96 108.64 337.16 110.78 C 343.16 113.26 344.90 120.48 350.24 123.78 C 352.50 125.02 355.78 125.89 357.85 123.84 C 359.70 122.09 358.11 119.56 357.30 117.72 C 354.28 112.33 350.50 107.12 345.25 103.72 C 340.51 100.43 334.78 98.50 330.79 94.20 C 327.36 90.63 327.29 85.11 328.64 80.63 C 329.43 77.12 334.37 77.28 336.31 79.71 C 340.68 84.37 342.79 90.97 348.44 94.47 C 348.78 92.03 348.71 89.52 347.90 87.17 C 346.00 81.09 344.16 74.81 340.44 69.56 C 336.78 64.56 329.98 63.60 325.87 59.14 C 322.15 54.41 320.93 47.74 323.06 42.07 C 324.10 39.21 325.64 35.72 329.01 35.15 C 333.18 36.25 332.91 41.75 335.29 44.71 C 342.21 54.38 349.52 64.02 353.74 75.27 C 356.91 83.07 359.05 91.25 360.30 99.58 C 360.82 103.32 361.67 107.10 363.84 110.28 C 367.02 104.34 365.89 97.45 366.09 91.00 C 366.38 79.43 363.95 67.92 359.87 57.12 C 356.94 49.66 351.35 43.75 346.33 37.66 C 343.05 33.56 340.90 27.58 343.63 22.64 Z"}),w.createElement("path",{fill:"#f9f9f9",opacity:"1.00",d:" M 298.84 48.98 C 301.46 48.14 304.19 47.75 306.85 47.07 C 306.70 47.39 306.38 48.04 306.22 48.36 C 303.77 48.67 301.30 48.78 298.84 48.98 Z"}),w.createElement("path",{fill:"#f9f9f9",opacity:"1.00",d:" M 408.19 53.76 C 408.82 55.93 409.66 58.05 410.84 60.00 C 410.28 59.88 409.17 59.64 408.61 59.53 C 408.47 57.60 408.35 55.68 408.19 53.76 Z"}),w.createElement("path",{fill:"#f9f9f9",opacity:"1.00",d:" M 2.00 130.93 C 3.29 132.39 3.60 134.42 2.83 136.21 C 1.59 134.72 1.54 132.73 2.00 130.93 Z"}),w.createElement("path",{fill:"#f9f9f9",opacity:"1.00",d:" M 441.25 136.79 C 442.44 139.04 442.39 141.61 441.92 144.05 C 440.57 141.84 440.35 139.21 441.25 136.79 Z"}),w.createElement("path",{fill:"#f9f9f9",opacity:"1.00",d:" M 268.73 208.11 C 270.09 208.27 271.45 208.42 272.82 208.56 C 272.26 209.79 271.69 211.01 271.16 212.26 C 271.37 211.23 271.58 210.21 271.78 209.18 C 270.76 208.82 269.75 208.46 268.73 208.11 Z"})),w.createElement("g",{id:"#e2e2e2ff"},w.createElement("path",{fill:"#e2e2e2",opacity:"1.00",d:" M 329.03 19.35 C 329.85 18.48 332.06 18.56 331.69 20.18 C 331.03 19.97 329.69 19.56 329.03 19.35 Z"}),w.createElement("path",{fill:"#e2e2e2",opacity:"1.00",d:" M 417.82 257.96 C 418.36 258.21 419.46 258.70 420.00 258.94 C 419.46 258.70 418.36 258.21 417.82 257.96 Z"})),w.createElement("g",{id:"#dbdbdbff"},w.createElement("path",{fill:"#dbdbdb",opacity:"1.00",d:" M 302.43 22.59 C 303.25 25.79 303.07 29.13 302.30 32.32 C 302.29 29.07 302.34 25.83 302.43 22.59 Z"}),w.createElement("path",{fill:"#dbdbdb",opacity:"1.00",d:" M 2.89 118.00 C 2.41 116.72 2.67 115.64 3.70 114.76 C 4.40 116.08 4.13 117.16 2.89 118.00 Z"})),w.createElement("g",{id:"#e0e0e0ff"},w.createElement("path",{fill:"#e0e0e0",opacity:"1.00",d:" M 203.79 32.86 C 204.34 32.64 205.45 32.19 206.01 31.97 C 205.45 32.19 204.34 32.64 203.79 32.86 Z"}),w.createElement("path",{fill:"#e0e0e0",opacity:"1.00",d:" M 190.77 253.31 C 191.35 253.46 192.52 253.74 193.11 253.88 C 192.52 253.74 191.35 253.46 190.77 253.31 Z"})),w.createElement("g",{id:"#e3e3e3ff"},w.createElement("path",{fill:"#e3e3e3",opacity:"1.00",d:" M 385.16 32.52 C 386.27 31.39 386.77 31.61 386.66 33.18 C 386.29 33.02 385.54 32.69 385.16 32.52 Z"})),w.createElement("g",{id:"#dfdfdfff"},w.createElement("path",{fill:"#dfdfdf",opacity:"1.00",d:" M 301.42 36.30 C 301.57 35.72 301.86 34.55 302.00 33.97 C 301.86 34.55 301.57 35.72 301.42 36.30 Z"}),w.createElement("path",{fill:"#dfdfdf",opacity:"1.00",d:" M 414.88 256.97 C 415.41 257.24 416.45 257.78 416.98 258.06 C 416.45 257.78 415.41 257.24 414.88 256.97 Z"})),w.createElement("g",{id:"#d0cfcfff"},w.createElement("path",{fill:"#d0cfcf",opacity:"1.00",d:" M 188.81 38.10 C 189.49 36.87 190.52 36.47 191.90 36.92 C 191.17 38.14 190.14 38.54 188.81 38.10 Z"})),w.createElement("g",{id:"#ccccccff"},w.createElement("path",{fill:"#cccccc",opacity:"1.00",d:" M 184.80 38.76 C 185.67 37.69 186.75 37.43 188.04 37.97 C 187.19 39.16 186.11 39.42 184.80 38.76 Z"})),w.createElement("g",{id:"#c5c5c5ff"},w.createElement("path",{fill:"#c5c5c5",opacity:"1.00",d:" M 174.74 40.93 C 175.82 39.68 177.51 39.47 179.00 40.01 C 177.91 41.22 176.23 41.59 174.74 40.93 Z"})),w.createElement("g",{id:"#d0d0d0ff"},w.createElement("path",{fill:"#d0d0d0",opacity:"1.00",d:" M 167.85 41.90 C 168.96 40.68 170.67 40.49 172.17 41.06 C 171.03 42.24 169.34 42.56 167.85 41.90 Z"}),w.createElement("path",{fill:"#d0d0d0",opacity:"1.00",d:" M 155.78 42.86 C 157.28 41.62 159.29 41.52 161.10 42.04 C 159.60 43.30 157.58 43.58 155.78 42.86 Z"}),w.createElement("path",{fill:"#d0d0d0",opacity:"1.00",d:" M 270.00 217.16 C 269.48 215.66 269.74 214.00 270.95 212.91 C 271.61 214.40 271.25 216.10 270.00 217.16 Z"})),w.createElement("g",{id:"#d5d5d5ff"},w.createElement("path",{fill:"#d5d5d5",opacity:"1.00",d:" M 136.79 44.87 C 137.95 43.68 139.66 43.50 141.16 44.08 C 139.99 45.25 138.29 45.54 136.79 44.87 Z"}),w.createElement("path",{fill:"#d5d5d5",opacity:"1.00",d:" M 58.04 79.86 C 59.26 79.48 60.30 79.76 61.17 80.70 C 59.75 81.50 58.71 81.22 58.04 79.86 Z"}),w.createElement("path",{fill:"#d5d5d5",opacity:"1.00",d:" M 167.83 243.60 C 169.13 242.64 170.80 242.47 172.26 243.19 C 171.03 244.34 169.26 244.42 167.83 243.60 Z"})),w.createElement("g",{id:"#d2d2d2ff"},w.createElement("path",{fill:"#d2d2d2",opacity:"1.00",d:" M 130.81 45.62 C 131.81 44.64 132.93 44.47 134.18 45.12 C 133.19 46.20 132.07 46.37 130.81 45.62 Z"})),w.createElement("g",{id:"#dededeff"},w.createElement("path",{fill:"#dedede",opacity:"1.00",d:" M 120.73 48.74 C 121.29 48.52 122.40 48.07 122.95 47.84 C 122.40 48.07 121.29 48.52 120.73 48.74 Z"}),w.createElement("path",{fill:"#dedede",opacity:"1.00",d:" M 258.31 233.28 C 258.49 232.71 258.86 231.57 259.04 231.00 C 258.86 231.57 258.49 232.71 258.31 233.28 Z"})),w.createElement("g",{id:"#e6e6e6ff"},w.createElement("path",{fill:"#e6e6e6",opacity:"1.00",d:" M 91.90 75.98 C 92.14 75.43 92.61 74.33 92.85 73.78 C 92.61 74.33 92.14 75.43 91.90 75.98 Z"}),w.createElement("path",{fill:"#e6e6e6",opacity:"1.00",d:" M 436.59 107.89 C 437.65 109.91 437.37 112.30 436.01 114.11 C 435.67 112.03 435.45 109.78 436.59 107.89 Z"}),w.createElement("path",{fill:"#e6e6e6",opacity:"1.00",d:" M 434.09 178.21 C 433.60 176.86 433.51 174.99 435.04 174.28 C 435.91 175.62 435.04 177.19 434.09 178.21 Z"})),w.createElement("g",{id:"#d6d5d5ff"},w.createElement("path",{fill:"#d6d5d5",opacity:"1.00",d:" M 427.39 77.78 C 428.38 79.02 428.52 80.65 427.94 82.10 C 426.73 80.96 426.47 79.18 427.39 77.78 Z"})),w.createElement("g",{id:"#cccbcbff"},w.createElement("path",{fill:"#cccbcb",opacity:"1.00",d:" M 45.79 80.68 C 46.99 79.62 48.65 79.47 50.10 80.11 C 48.94 81.27 47.21 81.52 45.79 80.68 Z"})),w.createElement("g",{id:"#d7d7d7ff"},w.createElement("path",{fill:"#d7d7d7",opacity:"1.00",d:" M 88.15 89.28 C 87.49 88.01 87.65 86.87 88.64 85.86 C 89.36 87.12 89.20 88.26 88.15 89.28 Z"})),w.createElement("g",{id:"#e1e1e1ff"},w.createElement("path",{fill:"#e1e1e1",opacity:"1.00",d:" M 86.83 95.97 C 86.51 94.22 87.08 92.50 87.75 90.91 C 88.25 92.77 88.74 94.85 87.73 96.65 C 87.51 96.48 87.06 96.14 86.83 95.97 Z"}),w.createElement("path",{fill:"#e1e1e1",opacity:"1.00",d:" M 420.96 190.33 C 421.73 190.35 423.27 190.38 424.04 190.39 C 423.47 191.82 421.48 191.76 420.96 190.33 Z"}),w.createElement("path",{fill:"#e1e1e1",opacity:"1.00",d:" M 420.85 198.99 C 421.43 199.17 422.57 199.55 423.15 199.73 C 422.57 199.55 421.43 199.17 420.85 198.99 Z"}),w.createElement("path",{fill:"#e1e1e1",opacity:"1.00",d:" M 374.89 268.85 C 375.48 268.73 376.66 268.47 377.24 268.35 C 376.66 268.47 375.48 268.73 374.89 268.85 Z"})),w.createElement("g",{id:"#dcdcdcff"},w.createElement("path",{fill:"#dcdcdc",opacity:"1.00",d:" M 427.94 96.64 C 426.18 96.14 426.20 93.43 428.10 93.18 C 428.34 94.36 428.29 95.51 427.94 96.64 Z"})),w.createElement("g",{id:"#e5e5e5ff"},w.createElement("path",{fill:"#e5e5e5",opacity:"1.00",d:" M 217.57 132.46 C 216.79 129.20 216.92 125.81 217.48 122.53 C 218.12 125.81 218.14 129.17 217.57 132.46 Z"})),w.createElement("g",{id:"#e7e7e7ff"},w.createElement("path",{fill:"#e7e7e7",opacity:"1.00",d:" M 438.18 123.81 C 438.36 124.38 438.73 125.52 438.91 126.09 C 438.73 125.52 438.36 124.38 438.18 123.81 Z"})),w.createElement("g",{id:"#dadadaff"},w.createElement("path",{fill:"#dadada",opacity:"1.00",d:" M 214.57 131.18 C 214.97 132.61 215.12 134.09 215.14 135.58 C 213.10 135.64 212.94 131.97 214.57 131.18 Z"}),w.createElement("path",{fill:"#dadada",opacity:"1.00",d:" M 349.34 175.11 C 348.13 175.55 346.52 173.54 348.09 172.95 C 349.38 172.96 349.96 173.58 349.83 174.83 L 349.34 175.11 Z"})),w.createElement("g",{id:"#e0dfdfff"},w.createElement("path",{fill:"#e0dfdf",opacity:"1.00",d:" M 440.27 130.85 C 441.30 131.81 441.50 132.93 440.87 134.22 C 439.78 133.25 439.58 132.12 440.27 130.85 Z"})),w.createElement("g",{id:"#cbcacaff"},w.createElement("path",{fill:"#cbcaca",opacity:"1.00",d:" M 3.18 136.85 C 4.22 137.86 4.36 138.98 3.59 140.20 C 2.61 139.19 2.47 138.08 3.18 136.85 Z"})),w.createElement("g",{id:"#fbfbfbff"},w.createElement("path",{fill:"#fbfbfb",opacity:"1.00",d:" M 353.01 177.26 C 356.34 176.30 353.71 181.25 352.77 177.82 L 353.01 177.26 Z"}),w.createElement("path",{fill:"#fbfbfb",opacity:"1.00",d:" M 416.26 190.39 C 415.38 189.06 416.98 187.20 418.20 188.61 C 417.72 189.05 416.75 189.94 416.26 190.39 Z"}),w.createElement("path",{fill:"#fbfbfb",opacity:"1.00",d:" M 453.09 244.11 C 455.48 241.17 458.44 238.81 461.33 236.40 C 462.93 238.37 464.54 240.33 466.00 242.42 L 466.00 246.34 C 458.46 254.54 451.61 263.41 443.43 271.00 L 436.52 271.00 C 435.61 270.07 434.70 269.14 433.78 268.23 C 434.52 268.09 436.01 267.79 436.76 267.65 C 436.07 266.82 435.39 265.99 434.69 265.19 C 440.38 257.77 447.11 251.26 453.09 244.11 Z"})),w.createElement("g",{id:"#d1d0d0ff"},w.createElement("path",{fill:"#d1d0d0",opacity:"1.00",d:" M 433.69 182.20 C 432.66 181.17 432.66 180.07 433.71 178.90 C 434.47 180.03 434.46 181.12 433.69 182.20 Z"})),w.createElement("g",{id:"#cdccccff"},w.createElement("path",{fill:"#cdcccc",opacity:"1.00",d:" M 415.97 198.08 C 417.30 197.50 418.37 197.81 419.18 199.00 C 417.86 199.52 416.79 199.21 415.97 198.08 Z"})),w.createElement("g",{id:"#cecdcdff"},w.createElement("path",{fill:"#cecdcd",opacity:"1.00",d:" M 263.77 209.94 C 263.12 208.39 264.69 206.61 266.27 207.47 C 265.81 208.69 264.97 209.51 263.77 209.94 Z"})),w.createElement("g",{id:"#c3c2c2ff"},w.createElement("path",{fill:"#c3c2c2",opacity:"1.00",d:" M 270.08 220.84 C 271.36 222.36 271.55 224.47 270.58 226.21 C 269.61 224.57 269.53 222.63 270.08 220.84 Z"})),w.createElement("g",{id:"#d7d6d6ff"},w.createElement("path",{fill:"#d7d6d6",opacity:"1.00",d:" M 79.78 223.29 C 81.09 222.58 82.16 222.84 83.01 224.07 C 81.74 224.57 80.66 224.31 79.78 223.29 Z"})),w.createElement("g",{id:"#cfcfcfff"},w.createElement("path",{fill:"#cfcfcf",opacity:"1.00",d:" M 463.60 233.70 C 464.43 234.99 465.24 236.30 466.00 237.65 L 466.00 242.42 C 464.54 240.33 462.93 238.37 461.33 236.40 L 461.87 235.82 C 462.31 235.29 463.17 234.23 463.60 233.70 Z"})),w.createElement("g",{id:"#cdcdcdff"},w.createElement("path",{fill:"#cdcdcd",opacity:"1.00",d:" M 174.98 242.83 C 176.04 242.06 177.94 240.72 179.00 242.20 C 178.09 243.54 176.29 243.14 174.98 242.83 Z"})),w.createElement("g",{id:"#e1e0e0ff"},w.createElement("path",{fill:"#e1e0e0",opacity:"1.00",d:" M 197.88 255.37 C 200.24 254.61 202.73 254.56 205.12 255.19 C 202.89 256.55 200.18 256.57 197.88 255.37 Z"})),w.createElement("g",{id:"#c4c3c3ff"},w.createElement("path",{fill:"#c4c3c3",opacity:"1.00",d:" M 221.83 255.06 C 223.33 254.42 225.01 254.77 226.09 256.00 C 224.60 256.53 222.90 256.31 221.83 255.06 Z"})),w.createElement("g",{id:"#c8c8c8ff"},w.createElement("path",{fill:"#c8c8c8",opacity:"1.00",d:" M 231.89 255.94 C 233.04 254.72 234.83 254.48 236.23 255.42 C 234.97 256.39 233.34 256.52 231.89 255.94 Z"})),w.createElement("g",{id:"#ddddddff"},w.createElement("path",{fill:"#dddddd",opacity:"1.00",d:" M 411.80 256.25 C 412.37 256.45 413.49 256.86 414.06 257.07 C 413.49 256.86 412.37 256.45 411.80 256.25 Z"})))),w.createElement(_a,{title:e("7000.7020")||"重置焦点"},w.createElement("svg",{className:"bottom_tabs_icon",width:"100%",height:"100%",viewBox:"0 0 200 200",version:"1.1",xmlns:"http://www.w3.org/2000/svg",onClick:()=>{const d=new me(0,0,0);n.current.target.copy(d)}},w.createElement("g",{id:"#ffffffff"},w.createElement("path",{fill:"#ffffff",opacity:"1.00",d:" M 92.59 0.00 L 103.45 0.00 C 114.33 0.99 125.29 2.62 135.53 6.61 C 147.45 11.37 158.61 18.16 168.12 26.81 C 182.43 40.43 193.05 58.11 197.39 77.45 C 199.10 83.68 199.20 90.17 200.00 96.54 L 200.00 103.46 C 199.17 111.11 198.84 118.88 196.43 126.26 C 188.98 155.52 166.90 180.29 139.24 192.09 C 131.11 195.18 122.76 198.04 114.05 198.94 C 110.52 199.31 106.99 199.56 103.47 200.00 L 97.52 200.00 C 82.08 199.12 66.43 195.92 52.91 188.13 C 35.90 178.84 21.39 164.81 12.28 147.64 C 10.52 144.51 13.31 139.98 16.98 140.58 C 19.25 140.58 20.51 142.73 21.68 144.34 C 26.90 152.84 32.90 161.01 40.47 167.57 C 68.36 192.72 112.81 197.69 145.08 178.12 C 163.37 167.67 177.96 150.64 184.84 130.68 C 195.80 101.15 189.74 65.81 169.06 41.95 C 155.80 26.18 137.01 15.26 116.77 11.45 C 81.58 4.45 42.65 21.06 24.23 52.02 C 33.37 49.08 42.38 45.74 51.39 42.42 C 53.98 41.54 56.82 40.64 59.55 41.48 C 62.46 43.46 63.13 48.04 60.49 50.53 C 58.39 52.04 55.81 52.64 53.41 53.51 C 40.83 57.98 28.27 62.49 15.65 66.81 C 12.77 67.81 10.02 69.31 6.98 69.78 C 3.25 69.97 0.44 65.95 1.57 62.47 C 4.83 45.65 7.86 28.79 11.08 11.98 C 11.34 8.07 16.03 5.22 19.42 7.58 C 22.17 8.91 22.26 12.34 21.71 14.93 C 19.79 25.24 17.90 35.54 16.03 45.85 C 20.11 40.68 23.65 35.05 28.38 30.42 C 42.58 16.05 61.05 5.56 81.04 2.08 C 84.89 1.40 88.76 0.84 92.59 0.00 Z"})))),w.createElement(ra,{type:"vertical",style:{height:30,margin:"0 15px 0 0"}}),w.createElement(_a,{title:e("5000.5025")||"显示设置"},w.createElement("svg",{className:"bottom_tabs_icon",width:"100%",height:"100%",viewBox:"0 0 212 200",version:"1.1",xmlns:"http://www.w3.org/2000/svg",onClick:()=>{i(!0),r({})}},w.createElement("g",{id:"#ffffffff"},w.createElement("path",{fill:"#ffffff",opacity:"1.00",d:" M 72.37 0.00 L 77.61 0.00 C 85.45 2.07 89.83 9.64 96.96 13.05 C 101.80 16.10 108.13 17.11 113.29 14.24 C 118.99 11.62 123.66 7.39 128.41 3.40 C 132.98 -0.39 139.72 -0.53 144.82 2.27 C 151.71 5.96 158.42 10.00 165.31 13.69 C 169.55 15.97 174.03 19.09 175.19 24.07 C 176.47 30.63 172.15 36.56 172.30 43.05 C 172.31 53.94 180.05 64.65 190.76 67.30 C 194.87 68.49 199.33 68.07 203.33 69.67 C 207.05 71.84 208.77 76.22 209.61 80.25 C 211.50 91.00 212.06 102.04 210.64 112.89 C 209.94 118.32 209.45 124.32 205.59 128.58 C 202.99 131.61 198.65 131.29 195.07 131.89 C 182.62 132.94 172.31 144.59 172.29 156.99 C 172.13 162.86 175.68 168.13 175.42 174.02 C 175.28 178.20 172.71 182.01 169.17 184.13 C 164.79 186.85 160.14 189.11 155.68 191.69 C 150.38 194.55 145.29 197.89 139.61 200.00 L 133.49 200.00 C 124.03 195.33 117.94 184.78 106.89 183.14 C 98.28 182.58 91.31 188.96 85.23 194.24 C 82.21 197.41 78.16 199.25 73.88 200.00 L 73.12 200.00 C 65.21 198.18 58.72 193.07 51.62 189.42 C 46.16 186.21 39.16 183.71 36.90 177.17 C 34.18 169.99 39.99 163.24 39.14 156.00 C 38.70 143.71 28.32 132.56 15.95 131.81 C 11.87 131.55 7.21 130.85 4.88 127.02 C 1.19 120.82 1.28 113.29 0.00 106.37 L 0.00 93.65 C 1.47 86.54 0.95 78.48 5.31 72.32 C 8.60 67.67 14.80 68.78 19.65 67.63 C 30.93 65.35 39.26 54.39 39.18 43.00 C 39.51 36.14 34.25 29.66 36.93 22.83 C 39.11 16.85 45.42 14.38 50.55 11.53 C 57.86 7.77 64.77 3.19 72.37 0.00 M 51.36 28.01 C 52.50 32.62 54.23 37.17 54.19 41.98 C 54.23 52.31 50.35 62.71 43.30 70.29 C 36.48 77.98 26.53 82.29 16.41 83.32 C 14.53 94.38 14.47 105.66 16.45 116.70 C 23.10 118.01 30.01 119.36 35.65 123.35 C 46.48 130.53 53.70 142.93 54.12 155.98 C 54.67 161.49 52.79 166.77 51.36 171.99 C 58.75 176.31 66.23 180.50 73.71 184.67 C 82.26 176.49 92.67 168.49 104.99 168.08 C 117.74 168.07 128.20 176.62 136.99 184.93 C 144.81 180.73 152.62 176.50 160.27 172.00 C 158.41 166.21 156.93 160.13 157.79 154.01 C 158.65 139.61 168.20 126.37 181.23 120.39 C 185.56 118.46 190.24 117.64 194.87 116.76 C 197.12 105.72 197.10 94.33 194.90 83.28 C 182.83 82.14 171.14 75.80 164.49 65.52 C 157.13 54.64 155.63 40.26 160.28 28.01 C 152.71 23.59 144.97 19.48 137.27 15.30 C 128.30 23.26 117.58 31.46 104.93 30.89 C 93.17 30.29 83.69 22.33 75.11 15.06 C 67.20 19.39 59.23 23.60 51.36 28.01 Z"}),w.createElement("path",{fill:"#ffffff",opacity:"1.00",d:" M 96.39 63.67 C 107.38 60.97 119.56 63.55 128.48 70.53 C 134.30 75.62 139.54 81.98 141.30 89.68 C 143.95 100.24 142.67 112.17 136.11 121.10 C 131.85 127.30 125.74 132.17 118.70 134.87 C 107.71 139.21 94.58 137.92 84.85 131.13 C 70.02 121.96 64.10 101.80 70.70 85.82 C 75.05 74.89 84.97 66.43 96.39 63.67 M 101.43 77.66 C 96.78 78.45 92.53 80.91 89.18 84.19 C 83.67 89.61 81.68 98.07 83.51 105.50 C 85.09 112.20 89.99 118.08 96.41 120.63 C 102.40 123.10 109.40 122.96 115.28 120.23 C 124.48 115.80 129.94 104.62 127.26 94.66 C 124.70 83.50 112.80 75.28 101.43 77.66 Z"})))),c&&w.createElement(_a,{title:e("4000.0225")||"引导"},w.createElement("svg",{className:"bottom_tabs_icon",width:"100%",height:"100%",viewBox:"0 0 212 200",version:"1.1",xmlns:"http://www.w3.org/2000/svg",onClick:()=>{o.current.setDontShowAgain(!1),s.current==1&&o.current.setYinDaoOpen1(!0),s.current==2&&o.current.setYinDaoOpen2(!0),s.current==3&&o.current.setYinDaoOpen3(!0),s.current==4&&o.current.setYinDaoOpen4(!0),s.current==5&&o.current.setYinDaoOpen5(!0),s.current==6&&o.current.setYinDaoOpen6(!0),s.current==7&&o.current.setYinDaoOpen7(!0)}},w.createElement("g",{id:"#ffffffff"},w.createElement("path",{fill:"#ffffff",opacity:"1.00",d:" M 54.55 0.00 L 102.43 0.00 C 108.12 0.57 113.91 2.95 117.12 7.90 C 123.49 16.53 120.66 27.82 121.24 37.75 C 131.83 37.72 142.41 37.76 153.00 37.69 C 156.46 37.76 160.26 37.69 163.19 39.84 C 166.82 42.48 169.70 45.98 172.93 49.07 C 181.89 58.29 191.48 66.91 200.00 76.54 L 200.00 83.45 C 197.80 86.40 195.21 89.02 192.59 91.59 C 183.70 100.37 174.88 109.22 166.04 118.04 C 163.40 120.81 159.77 122.60 155.89 122.51 C 144.33 122.68 132.77 122.31 121.22 122.66 C 121.31 141.11 121.23 159.56 121.28 178.01 C 121.44 184.63 119.05 191.60 113.72 195.77 C 110.56 198.43 106.44 199.47 102.43 200.00 L 54.56 200.00 C 48.46 199.28 42.40 196.20 39.32 190.70 C 36.58 186.31 36.37 181.01 36.48 175.99 C 36.58 158.15 36.49 140.31 36.52 122.47 C 31.02 122.44 25.51 122.62 20.01 122.42 C 14.67 122.35 9.19 120.50 5.64 116.35 C 1.34 112.09 0.15 105.83 0.27 99.99 C 0.46 85.33 0.06 70.66 0.46 56.00 C 0.63 47.60 7.15 40.18 15.20 38.28 C 22.27 37.16 29.48 37.97 36.61 37.73 C 36.65 30.49 36.08 23.21 36.87 16.01 C 38.23 7.36 45.86 0.62 54.55 0.00 M 56.00 19.60 C 56.00 25.67 55.96 31.73 56.06 37.79 C 71.29 37.68 86.52 37.75 101.75 37.75 C 101.74 31.71 101.69 25.67 101.81 19.63 C 86.54 19.44 71.27 19.49 56.00 19.60 M 19.82 57.23 C 19.66 72.48 19.73 87.74 19.78 102.99 C 60.85 103.02 101.93 102.98 143.00 103.01 C 146.28 102.97 149.59 103.22 152.86 102.82 C 154.34 102.07 155.44 100.77 156.64 99.65 C 163.11 92.99 169.93 86.69 176.37 80.00 C 168.85 72.39 160.96 65.14 153.60 57.38 C 109.01 57.08 64.41 57.39 19.82 57.23 M 56.00 122.60 C 56.00 141.87 56.00 161.13 56.00 180.40 C 71.27 180.51 86.54 180.56 101.81 180.37 C 101.68 161.14 101.72 141.90 101.79 122.67 C 86.53 122.39 71.26 122.52 56.00 122.60 Z"}),w.createElement("path",{fill:"#ffffff",opacity:"1.00",d:" M 41.32 70.43 C 42.83 70.05 44.40 70.02 45.94 69.98 C 73.99 70.05 102.03 69.99 130.07 70.01 C 135.24 69.60 140.31 73.70 140.51 78.98 C 141.14 84.39 136.38 89.63 130.95 89.54 C 102.29 89.61 73.63 89.53 44.97 89.58 C 40.71 89.85 36.42 87.33 34.88 83.29 C 32.83 78.19 35.93 71.76 41.32 70.43 Z"})))),c&&w.createElement(_a,{title:e("7000.7018")||"跳转 Issue"},w.createElement("svg",{className:"bottom_tabs_icon",width:"212pt",height:"200pt",viewBox:"0 0 212 200",version:"1.1",xmlns:"http://www.w3.org/2000/svg",onClick:()=>{window.open("http://atlas.brainsmatics.org/community")}},w.createElement("g",{id:"#ffffffff"},w.createElement("path",{fill:"#ffffff",opacity:"1.00",d:" M 44.38 1.36 C 48.74 -0.21 53.47 0.46 58.00 0.36 C 100.00 0.38 142.00 0.37 184.00 0.37 C 188.93 0.44 193.97 -0.08 198.80 1.16 C 205.40 3.02 210.41 8.83 212.00 15.42 L 212.00 115.67 C 211.12 118.73 209.46 121.87 206.50 123.35 C 202.95 124.73 198.27 124.36 195.78 121.18 C 193.07 118.53 192.63 114.61 192.69 111.02 C 192.77 80.31 192.69 49.60 192.74 18.89 C 192.47 20.20 192.20 21.51 191.94 22.82 C 189.22 20.41 185.70 19.13 182.06 19.30 C 138.36 19.25 94.67 19.29 50.98 19.28 C 47.25 19.26 42.84 18.58 40.79 15.06 C 37.61 10.61 39.23 3.51 44.38 1.36 Z"}),w.createElement("path",{fill:"#ffffff",opacity:"1.00",d:" M 8.70 31.72 C 12.30 29.29 16.77 28.78 21.00 28.72 C 65.33 28.73 109.67 28.73 154.00 28.72 C 158.89 28.77 163.85 28.39 168.69 29.30 C 177.14 30.95 183.60 39.33 183.01 47.94 C 182.99 79.65 182.99 111.36 183.01 143.06 C 183.50 154.08 172.67 162.82 162.05 161.77 C 142.68 161.67 123.31 161.77 103.94 161.69 C 98.93 161.19 96.37 166.24 93.05 169.06 C 84.26 177.60 75.58 186.26 66.82 194.83 C 64.54 197.12 61.79 198.92 58.73 200.00 L 56.31 200.00 C 53.18 199.16 49.90 197.55 48.73 194.29 C 46.78 190.25 48.36 185.48 51.59 182.61 C 63.96 170.64 76.33 158.67 88.43 146.43 C 90.85 143.75 94.41 142.57 97.96 142.72 C 115.32 142.72 132.69 142.73 150.05 142.74 C 153.86 142.55 158.16 142.87 161.41 140.51 C 163.79 137.94 163.32 134.05 163.66 130.80 C 163.80 108.52 163.70 86.23 163.71 63.94 C 163.50 59.63 163.85 55.02 161.89 51.05 C 159.16 47.40 154.00 48.03 149.98 47.73 C 111.00 47.73 72.01 47.70 33.02 47.75 C 29.15 48.06 24.50 47.56 21.48 50.48 C 19.24 53.80 19.47 58.10 19.26 61.95 C 19.28 84.65 19.29 107.35 19.26 130.05 C 19.34 133.21 19.33 136.51 20.59 139.48 C 22.19 141.81 25.33 142.02 27.88 142.41 C 38.24 143.27 48.66 142.23 59.02 142.93 C 63.96 143.14 67.79 148.20 67.16 153.00 C 66.95 157.71 62.65 161.63 57.97 161.62 C 48.32 161.95 38.66 161.59 29.01 161.74 C 22.54 161.69 15.64 162.35 9.71 159.25 C 4.26 156.31 1.13 150.42 0.00 144.52 L 0.00 46.58 C 0.73 40.72 3.74 35.04 8.70 31.72 Z"})))))},$At=[{title:"0-0",key:"0-0",children:[{title:"0-0-0",key:"0-0-0",children:[{title:"0-0-0-0",key:"0-0-0-0"},{title:"0-0-0-1",key:"0-0-0-1"},{title:"0-0-0-2",key:"0-0-0-2"}]},{title:"0-0-1",key:"0-0-1",children:[{title:"0-0-1-0",key:"0-0-1-0"},{title:"0-0-1-1",key:"0-0-1-1"},{title:"0-0-1-2",key:"0-0-1-2"}]},{title:"0-0-2",key:"0-0-2"}]},{title:"0-1",key:"0-1",children:[{title:"0-1-0-0",key:"0-1-0-0"},{title:"0-1-0-1",key:"0-1-0-1"},{title:"0-1-0-2",key:"0-1-0-2"}]},{title:"0-2",key:"0-2"}],zAt=()=>{const[t,e]=w.useState(["0-0-0","0-0-1"]),[n,r]=w.useState(["0-0-0"]),[i,a]=w.useState([]),[o,s]=w.useState(!0),c=f=>{console.log("onExpand",f),e(f),s(!1)},u=f=>{console.log("onCheck",f),r(f)},d=(f,h)=>{console.log("onSelect",h),a(f)};return w.createElement(b_,{style:{lineHeight:"15px"},checkable:!0,onExpand:c,expandedKeys:t,autoExpandParent:o,onCheck:u,checkedKeys:n,onSelect:d,selectedKeys:i,treeData:$At})},HAt=t=>{const{reglionsData:e,LaleNanme:n}=t,r=(o,s,c)=>(o=Math.min(Math.max(o,s),c),`hsl(200, 100%, ${80-(o-s)/(c-s)*50}%)`),i=(o,s,c)=>Math.max(s,Math.min(c,o)),a=o=>{for(let u in o){const d=o[u];if(d.index==0){if(d.left!=0){var s=new Dn(new ic(i(Math.sqrt(d.left)/100,.025,.15),32,32),new js({color:r(Math.sqrt(d.left),0,Math.sqrt(2025.5)),transparent:!0}));s.position.set(d.left_center[0]*.01,d.left_center[1]*.01,d.left_center[2]*.01),s.name=u,s.userData.intensity=d.left,s.userData.type="points",s.translateX(qo.current),s.translateY(To.current),s.translateZ(_o.current),Ce.current.add(s)}if(d.right!=0){var c=new Dn(new ic(i(Math.sqrt(d.right)/100,.025,.15),32,32),new js({color:r(Math.sqrt(d.right),0,Math.sqrt(2025.5)),transparent:!0}));c.position.set(d.right_center[0]*.01,d.right_center[1]*.01,d.right_center[2]*.01),c.name=u,c.userData.intensity=d.right,c.userData.type="points",c.translateX(qo.current),c.translateY(To.current),c.translateZ(_o.current),Ce.current.add(c)}}}};return w.useEffect(()=>{a(e)},[e]),null},Z7={type:"change"},K7={type:"start"},Y7={type:"end"};class Ole extends Pb{constructor(e,n){super();const r=this,i={NONE:-1,ROTATE:0,ZOOM:1,PAN:2,TOUCH_ROTATE:3,TOUCH_ZOOM_PAN:4};this.object=e,this.domElement=n,this.domElement.style.touchAction="none",this.enabled=!0,this.screen={left:0,top:0,width:0,height:0},this.rotateSpeed=1,this.zoomSpeed=1.2,this.panSpeed=.3,this.noRotate=!1,this.noZoom=!1,this.noPan=!1,this.staticMoving=!1,this.dynamicDampingFactor=.2,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.keys=["KeyA","KeyS","KeyD"],this.mouseButtons={LEFT:s6.ROTATE,MIDDLE:s6.DOLLY,RIGHT:s6.PAN},this.target=new me;const a=1e-6,o=new me;let s=1,c=i.NONE,u=i.NONE,d=0,f=0,h=0;const p=new me,v=new Bn,y=new Bn,m=new me,g=new Bn,x=new Bn,b=new Bn,S=new Bn,E=[],T={};this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.up0=this.object.up.clone(),this.zoom0=this.object.zoom,this.handleResize=function(){const Y=r.domElement.getBoundingClientRect(),te=r.domElement.ownerDocument.documentElement;r.screen.left=Y.left+window.pageXOffset-te.clientLeft,r.screen.top=Y.top+window.pageYOffset-te.clientTop,r.screen.width=Y.width,r.screen.height=Y.height};const M=function(){const Y=new Bn;return function(fe,se){return Y.set((fe-r.screen.left)/r.screen.width,(se-r.screen.top)/r.screen.height),Y}}(),L=function(){const Y=new Bn;return function(fe,se){return Y.set((fe-r.screen.width*.5-r.screen.left)/(r.screen.width*.5),(r.screen.height+2*(r.screen.top-se))/r.screen.width),Y}}();this.rotateCamera=function(){const Y=new me,te=new ka,fe=new me,se=new me,he=new me,Q=new me;return function(){Q.set(y.x-v.x,y.y-v.y,0);let ee=Q.length();ee?(p.copy(r.object.position).sub(r.target),fe.copy(p).normalize(),se.copy(r.object.up).normalize(),he.crossVectors(se,fe).normalize(),se.setLength(y.y-v.y),he.setLength(y.x-v.x),Q.copy(se.add(he)),Y.crossVectors(Q,p).normalize(),ee*=r.rotateSpeed,te.setFromAxisAngle(Y,ee),p.applyQuaternion(te),r.object.up.applyQuaternion(te),m.copy(Y),h=ee):!r.staticMoving&&h&&(h*=Math.sqrt(1-r.dynamicDampingFactor),p.copy(r.object.position).sub(r.target),te.setFromAxisAngle(m,h),p.applyQuaternion(te),r.object.up.applyQuaternion(te)),v.copy(y)}}(),this.zoomCamera=function(){let Y;c===i.TOUCH_ZOOM_PAN?(Y=d/f,d=f,r.object.isPerspectiveCamera?p.multiplyScalar(Y):r.object.isOrthographicCamera?(r.object.zoom=Ef.clamp(r.object.zoom/Y,r.minZoom,r.maxZoom),s!==r.object.zoom&&r.object.updateProjectionMatrix()):console.warn("THREE.TrackballControls: Unsupported camera type")):(Y=1+(x.y-g.y)*r.zoomSpeed,Y!==1&&Y>0&&(r.object.isPerspectiveCamera?p.multiplyScalar(Y):r.object.isOrthographicCamera?(r.object.zoom=Ef.clamp(r.object.zoom/Y,r.minZoom,r.maxZoom),s!==r.object.zoom&&r.object.updateProjectionMatrix()):console.warn("THREE.TrackballControls: Unsupported camera type")),r.staticMoving?g.copy(x):g.y+=(x.y-g.y)*this.dynamicDampingFactor)},this.panCamera=function(){const Y=new Bn,te=new me,fe=new me;return function(){if(Y.copy(S).sub(b),Y.lengthSq()){if(r.object.isOrthographicCamera){const he=(r.object.right-r.object.left)/r.object.zoom/r.domElement.clientWidth,Q=(r.object.top-r.object.bottom)/r.object.zoom/r.domElement.clientWidth;Y.x*=he,Y.y*=Q}Y.multiplyScalar(p.length()*r.panSpeed),fe.copy(p).cross(r.object.up).setLength(Y.x),fe.add(te.copy(r.object.up).setLength(Y.y)),r.object.position.add(fe),r.target.add(fe),r.staticMoving?b.copy(S):b.add(Y.subVectors(S,b).multiplyScalar(r.dynamicDampingFactor))}}}(),this.checkDistances=function(){(!r.noZoom||!r.noPan)&&(p.lengthSq()>r.maxDistance*r.maxDistance&&(r.object.position.addVectors(r.target,p.setLength(r.maxDistance)),g.copy(x)),p.lengthSq()<r.minDistance*r.minDistance&&(r.object.position.addVectors(r.target,p.setLength(r.minDistance)),g.copy(x)))},this.update=function(){p.subVectors(r.object.position,r.target),r.noRotate||r.rotateCamera(),r.noZoom||r.zoomCamera(),r.noPan||r.panCamera(),r.object.position.addVectors(r.target,p),r.object.isPerspectiveCamera?(r.checkDistances(),r.object.lookAt(r.target),o.distanceToSquared(r.object.position)>a&&(r.dispatchEvent(Z7),o.copy(r.object.position))):r.object.isOrthographicCamera?(r.object.lookAt(r.target),(o.distanceToSquared(r.object.position)>a||s!==r.object.zoom)&&(r.dispatchEvent(Z7),o.copy(r.object.position),s=r.object.zoom)):console.warn("THREE.TrackballControls: Unsupported camera type")},this.reset=function(){c=i.NONE,u=i.NONE,r.target.copy(r.target0),r.object.position.copy(r.position0),r.object.up.copy(r.up0),r.object.zoom=r.zoom0,r.object.updateProjectionMatrix(),p.subVectors(r.object.position,r.target),r.object.lookAt(r.target),r.dispatchEvent(Z7),o.copy(r.object.position),s=r.object.zoom};function R(Y){r.enabled!==!1&&(E.length===0&&(r.domElement.setPointerCapture(Y.pointerId),r.domElement.addEventListener("pointermove",O),r.domElement.addEventListener("pointerup",N)),re(Y),Y.pointerType==="touch"?K(Y):V(Y))}function O(Y){r.enabled!==!1&&(Y.pointerType==="touch"?W(Y):B(Y))}function N(Y){r.enabled!==!1&&(Y.pointerType==="touch"?G(Y):F(),Z(Y),E.length===0&&(r.domElement.releasePointerCapture(Y.pointerId),r.domElement.removeEventListener("pointermove",O),r.domElement.removeEventListener("pointerup",N)))}function U(Y){Z(Y)}function k(Y){r.enabled!==!1&&(window.removeEventListener("keydown",k),u===i.NONE&&(Y.code===r.keys[i.ROTATE]&&!r.noRotate?u=i.ROTATE:Y.code===r.keys[i.ZOOM]&&!r.noZoom?u=i.ZOOM:Y.code===r.keys[i.PAN]&&!r.noPan&&(u=i.PAN)))}function D(){r.enabled!==!1&&(u=i.NONE,window.addEventListener("keydown",k))}function V(Y){if(c===i.NONE)switch(Y.button){case r.mouseButtons.LEFT:c=i.ROTATE;break;case r.mouseButtons.MIDDLE:c=i.ZOOM;break;case r.mouseButtons.RIGHT:c=i.PAN;break}const te=u!==i.NONE?u:c;te===i.ROTATE&&!r.noRotate?(y.copy(L(Y.pageX,Y.pageY)),v.copy(y)):te===i.ZOOM&&!r.noZoom?(g.copy(M(Y.pageX,Y.pageY)),x.copy(g)):te===i.PAN&&!r.noPan&&(b.copy(M(Y.pageX,Y.pageY)),S.copy(b)),r.dispatchEvent(K7)}function B(Y){const te=u!==i.NONE?u:c;te===i.ROTATE&&!r.noRotate?(v.copy(y),y.copy(L(Y.pageX,Y.pageY))):te===i.ZOOM&&!r.noZoom?x.copy(M(Y.pageX,Y.pageY)):te===i.PAN&&!r.noPan&&S.copy(M(Y.pageX,Y.pageY))}function F(){c=i.NONE,r.dispatchEvent(Y7)}function j(Y){if(r.enabled!==!1&&r.noZoom!==!0){switch(Y.preventDefault(),Y.deltaMode){case 2:g.y-=Y.deltaY*.025;break;case 1:g.y-=Y.deltaY*.01;break;default:g.y-=Y.deltaY*25e-5;break}r.dispatchEvent(K7),r.dispatchEvent(Y7)}}function K(Y){switch(q(Y),E.length){case 1:c=i.TOUCH_ROTATE,y.copy(L(E[0].pageX,E[0].pageY)),v.copy(y);break;default:c=i.TOUCH_ZOOM_PAN;const te=E[0].pageX-E[1].pageX,fe=E[0].pageY-E[1].pageY;f=d=Math.sqrt(te*te+fe*fe);const se=(E[0].pageX+E[1].pageX)/2,he=(E[0].pageY+E[1].pageY)/2;b.copy(M(se,he)),S.copy(b);break}r.dispatchEvent(K7)}function W(Y){switch(q(Y),E.length){case 1:v.copy(y),y.copy(L(Y.pageX,Y.pageY));break;default:const te=ne(Y),fe=Y.pageX-te.x,se=Y.pageY-te.y;f=Math.sqrt(fe*fe+se*se);const he=(Y.pageX+te.x)/2,Q=(Y.pageY+te.y)/2;S.copy(M(he,Q));break}}function G(Y){switch(E.length){case 0:c=i.NONE;break;case 1:c=i.TOUCH_ROTATE,y.copy(L(Y.pageX,Y.pageY)),v.copy(y);break;case 2:c=i.TOUCH_ZOOM_PAN;for(let te=0;te<E.length;te++)if(E[te].pointerId!==Y.pointerId){const fe=T[E[te].pointerId];y.copy(L(fe.x,fe.y)),v.copy(y);break}break}r.dispatchEvent(Y7)}function J(Y){r.enabled!==!1&&Y.preventDefault()}function re(Y){E.push(Y)}function Z(Y){delete T[Y.pointerId];for(let te=0;te<E.length;te++)if(E[te].pointerId==Y.pointerId){E.splice(te,1);return}}function q(Y){let te=T[Y.pointerId];te===void 0&&(te=new Bn,T[Y.pointerId]=te),te.set(Y.pageX,Y.pageY)}function ne(Y){const te=Y.pointerId===E[0].pointerId?E[1]:E[0];return T[te.pointerId]}this.dispose=function(){r.domElement.removeEventListener("contextmenu",J),r.domElement.removeEventListener("pointerdown",R),r.domElement.removeEventListener("pointercancel",U),r.domElement.removeEventListener("wheel",j),r.domElement.removeEventListener("pointermove",O),r.domElement.removeEventListener("pointerup",N),window.removeEventListener("keydown",k),window.removeEventListener("keyup",D)},this.domElement.addEventListener("contextmenu",J),this.domElement.addEventListener("pointerdown",R),this.domElement.addEventListener("pointercancel",U),this.domElement.addEventListener("wheel",j,{passive:!1}),window.addEventListener("keydown",k),window.addEventListener("keyup",D),this.handleResize(),this.update()}}const GAt={name:"CopyShader",uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:`
|