From 5d71684c633669a49328a1b63057d6c8a55b8e87 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 29 Dec 2024 07:56:32 +0000 Subject: [PATCH] Release version 5.1.20 to PRD --- ...modal-DKvpGHTO.js => change-type-modal-CfyQxI5Y.js} | 2 +- ...WY8KDxU.js => change-type-modal-legacy-BfNFaO9v.js} | 2 +- .../{clipboard-CUes04zp.js => clipboard-DPvCegxP.js} | 2 +- ...legacy-D46oyBay.js => clipboard-legacy-CN3xDKAv.js} | 2 +- assets/{details-DDhluMMM.js => details-BUdue8Oj.js} | 2 +- ...s-legacy-0ouXuw75.js => details-legacy-D1O4j9nR.js} | 2 +- assets/{index-CgEQ4DK5.js => index-DRWG9Ar1.js} | 4 ++-- ...dex-legacy-iSkJTZGA.js => index-legacy-jqOeRlnz.js} | 2 +- ...-manager-UVzPVFgJ.js => master-manager-DlQmLEpO.js} | 2 +- ...y-BrdnNHXw.js => master-manager-legacy-CCeMINwh.js} | 2 +- .../{misc-nodes-CZ4-M6fq.js => misc-nodes-DMfi7tU1.js} | 2 +- ...egacy-CSfzn9IA.js => misc-nodes-legacy-DUcImzkb.js} | 2 +- ...page-header-Bgpft2Tp.js => page-header-BAx6PiVa.js} | 2 +- ...gacy-YLn36u35.js => page-header-legacy-C8DY0MtO.js} | 2 +- ...ip-aSI_7pb8.js => rmg-palette-app-clip-BwGDxhpZ.js} | 2 +- ...Re5N.js => rmg-palette-app-clip-legacy-D6xUcAS7.js} | 2 +- ...svg-wrapper-pwXZizLy.js => svg-wrapper-C2oLWHER.js} | 2 +- ...gacy-BY1AcpM1.js => svg-wrapper-legacy-CKReUCee.js} | 2 +- assets/{tools-BJtAFyoe.js => tools-CgHBlRFk.js} | 2 +- ...ols-legacy-Dm25lVuJ.js => tools-legacy-XMueayxR.js} | 2 +- images/facilities/airport_2024.svg | 6 +++--- images/facilities/railway_2024.svg | 10 +++++----- index.html | 4 ++-- info.json | 2 +- 24 files changed, 32 insertions(+), 32 deletions(-) rename assets/{change-type-modal-DKvpGHTO.js => change-type-modal-CfyQxI5Y.js} (98%) rename assets/{change-type-modal-legacy-BWY8KDxU.js => change-type-modal-legacy-BfNFaO9v.js} (97%) rename assets/{clipboard-CUes04zp.js => clipboard-DPvCegxP.js} (96%) rename assets/{clipboard-legacy-D46oyBay.js => clipboard-legacy-CN3xDKAv.js} (93%) rename assets/{details-DDhluMMM.js => details-BUdue8Oj.js} (97%) rename assets/{details-legacy-0ouXuw75.js => details-legacy-D1O4j9nR.js} (97%) rename assets/{index-CgEQ4DK5.js => index-DRWG9Ar1.js} (99%) rename assets/{index-legacy-iSkJTZGA.js => index-legacy-jqOeRlnz.js} (99%) rename assets/{master-manager-UVzPVFgJ.js => master-manager-DlQmLEpO.js} (99%) rename assets/{master-manager-legacy-BrdnNHXw.js => master-manager-legacy-CCeMINwh.js} (99%) rename assets/{misc-nodes-CZ4-M6fq.js => misc-nodes-DMfi7tU1.js} (99%) rename assets/{misc-nodes-legacy-CSfzn9IA.js => misc-nodes-legacy-DUcImzkb.js} (99%) rename assets/{page-header-Bgpft2Tp.js => page-header-BAx6PiVa.js} (99%) rename assets/{page-header-legacy-YLn36u35.js => page-header-legacy-C8DY0MtO.js} (99%) rename assets/{rmg-palette-app-clip-aSI_7pb8.js => rmg-palette-app-clip-BwGDxhpZ.js} (93%) rename assets/{rmg-palette-app-clip-legacy-z6rXRe5N.js => rmg-palette-app-clip-legacy-D6xUcAS7.js} (88%) rename assets/{svg-wrapper-pwXZizLy.js => svg-wrapper-C2oLWHER.js} (98%) rename assets/{svg-wrapper-legacy-BY1AcpM1.js => svg-wrapper-legacy-CKReUCee.js} (98%) rename assets/{tools-BJtAFyoe.js => tools-CgHBlRFk.js} (95%) rename assets/{tools-legacy-Dm25lVuJ.js => tools-legacy-XMueayxR.js} (97%) diff --git a/assets/change-type-modal-DKvpGHTO.js b/assets/change-type-modal-CfyQxI5Y.js similarity index 98% rename from assets/change-type-modal-DKvpGHTO.js rename to assets/change-type-modal-CfyQxI5Y.js index 8cab9ca1e..9827cf579 100644 --- a/assets/change-type-modal-DKvpGHTO.js +++ b/assets/change-type-modal-CfyQxI5Y.js @@ -1 +1 @@ -import{j as c,at as Se,$ as Ce,au as Ae,a1 as Te,a4 as $,a2 as xe,a3 as je,aV as Ee,aW as Oe,aX as ve,B as Le,aY as Ie,aZ as Ne,a5 as Pe,O as J,aM as Be}from"./chakra-t2DzLzXq.js";import{S as b,aG as K,ap as A,l as ne,k as ae,m as we,L as S,o as oe,c as Re,d as W,q as F,t as ee,v as te,C as Me,M as We,Q as ke,R as ze,V as Ze,W as _e,i as De}from"./index-CgEQ4DK5.js";import{u as Xe,b as r}from"./react-DmTIgZys.js";import{s as C,e as Ye}from"./master-manager-UVzPVFgJ.js";const se=[b.ShmetroBasic2020,b.LondonTubeBasic,b.ShanghaiSuburbanRailway],qe=(n,s,o)=>{const i=n.getNodeAttribute(s,"type"),a=structuredClone(n.getNodeAttribute(s,i).names);for(let l=0;la.length?a.push("Stn"):a.pop();const e={...C[o].defaultAttrs,names:a};(!Object.values(se).includes(i)||!Object.values(se).includes(o))&&(e.nameOffsetX=n.getNodeAttribute(s,i).nameOffsetX,e.nameOffsetY=n.getNodeAttribute(s,i).nameOffsetY),K.includes(o)&&K.includes(i)&&(e.color=structuredClone(n.getNodeAttribute(s,i).color)),n.removeNodeAttribute(s,i),n.mergeNodeAttributes(s,{type:o,[o]:e})},Ge=(n,s,o,i)=>i.filter(a=>s==="any"||n.getNodeAttribute(a,"type")===s).forEach(a=>{qe(n,a,o)}),He=(n,s,o,i)=>{const a=n.getEdgeAttribute(s,"type"),e=n.getEdgeAttribute(s,"style");if(A[e].metadata.supportLinePathType.includes(o)){const l=structuredClone(ne[o].defaultAttrs);let d=-1;if(i&&o!==ae.Simple){const[u,f]=n.extremities(s),T=l.startFrom;d=we(n,o,u,f,T)}n.setEdgeAttribute(s,"parallelIndex",d),n.removeEdgeAttribute(s,a),n.mergeEdgeAttributes(s,{type:o,[o]:l})}},Ue=(n,s,o,i,a)=>i.filter(e=>s==="any"||n.getEdgeAttribute(e,"type")===s).forEach(e=>{He(n,e,o,a)}),Ve=(n,s,o,i)=>{const a=n.getEdgeAttribute(s,"type"),e=n.getEdgeAttribute(s,"style");if(A[o].metadata.supportLinePathType.includes(a)){const l=n.getEdgeAttribute(s,"zIndex"),d=n.getEdgeAttribute(s,e);n.removeEdgeAttribute(s,e);const u=structuredClone(A[o].defaultAttrs);S.includes(e)&&S.includes(o)?u.color=d.color:S.includes(o)&&i&&(u.color=i),n.mergeEdgeAttributes(s,{style:o,[o]:u}),o===oe.River?n.setEdgeAttribute(s,"zIndex",-5):n.setEdgeAttribute(s,"zIndex",l!=null?l:0)}},Qe=(n,s,o,i,a)=>a.filter(e=>s==="any"||n.getEdgeAttribute(e,"style")===s).forEach(e=>{Ve(n,e,o,i)}),$e=(n,s,o,i)=>i.filter(a=>S.includes(n.getEdgeAttribute(a,"style"))).forEach(a=>{const e=n.getEdgeAttributes(a),l=e[e.style].color;(s==="any"||l[0]==s[0]&&l[1]==s[1]&&l[2]==s[2]&&l[3]==s[3])&&n.mergeEdgeAttributes(a,{[e.style]:{color:o}})}),Je=(n,s,o,i,a)=>{[...i,...a].forEach(e=>{const l=n.getNodeAttributes(e).type,d=n.getNodeAttribute(e,l);if(d.color!==void 0){const u=d.color;(s==="any"||u[0]==s[0]&&u[1]==s[1]&&u[2]==s[2]&&u[3]==s[3])&&(d.color=o)}n.mergeNodeAttributes(e,{[l]:d})})},Ke=(n,s,o,i,a)=>{[...s,...o].forEach(e=>{n.setNodeAttribute(e,"zIndex",a)}),i.forEach(e=>{n.setEdgeAttribute(e,"zIndex",a)})},nt=n=>{const{isOpen:s,onClose:o,isSelect:i,filter:a}=n,{t:e}=Xe(),l=Re(),{selected:d,theme:u,paletteAppClip:{output:f}}=W(t=>t.runtime),{preference:{autoParallel:T}}=W(t=>t.app),{activeSubscriptions:k}=W(t=>t.account),ie=r.useCallback(()=>{l(F()),l(ee()),l(te(p.current.export()))},[l,F,ee,te]),p=r.useRef(window.graph),z={any:e("header.settings.procedures.changeType.any"),...Object.fromEntries(Object.entries(ne).map(([t,h])=>[t,e(h.metadata.displayName).toString()]))},Z={any:e("header.settings.procedures.changeType.any"),...Object.fromEntries(Object.entries(A).map(([t,h])=>[t,e(h.metadata.displayName).toString()]))},_={any:e("header.settings.procedures.changeType.any"),...Object.fromEntries(Object.entries(C).map(([t,h])=>[t,e(h.metadata.displayName).toString()]))},x={id:"any",theme:[Me.Other,"other","#ffffff",We.black],value:e("header.settings.procedures.changeType.any")},[j,D]=r.useState(!1),[X,Y]=r.useState(0),[E,q]=r.useState(!1),[O,le]=r.useState("any"),[v,ce]=r.useState(b.ShmetroBasic),[L,G]=r.useState(!1),[I,re]=r.useState("any"),[N,de]=r.useState(oe.SingleColor),[P,H]=r.useState(!1),[B,ue]=r.useState("any"),[w,he]=r.useState(ae.Diagonal),[R,U]=r.useState(!1),[m,V]=r.useState(x),[M,pe]=r.useState(u),[ge,Q]=r.useState(!1);r.useEffect(()=>{ge&&f&&(pe(f),Q(!1))},[f==null?void 0:f.toString()]);const[fe,ye]=r.useState([]),me=[{id:"changeZIndex",title:e("header.settings.procedures.changeZIndex"),onClose:()=>D(!j),field:[{type:"select",label:e("panel.details.info.zIndex"),value:X,options:Object.fromEntries(Array.from({length:11},(t,h)=>[h-5,(h-5).toString()])),onChange:t=>Y(Number(t))}]},{id:"changeStationType",title:e("header.settings.procedures.changeStationType.title"),onClose:()=>q(!E),field:[{type:"select",label:e("header.settings.procedures.changeStationType.changeFrom"),options:_,value:O,disabledOptions:[v],onChange:t=>le(t)},{type:"select",label:e("header.settings.procedures.changeStationType.changeTo"),options:_,value:v,disabledOptions:["any",O],onChange:t=>ce(t)}]},{id:"changeLineStyleType",title:e("header.settings.procedures.changeLineStyleType.title"),onClose:()=>G(!L),field:[{type:"select",label:e("header.settings.procedures.changeLineStyleType.changeFrom"),options:Z,value:I,disabledOptions:[N],onChange:t=>re(t)},{type:"select",label:e("header.settings.procedures.changeLineStyleType.changeTo"),options:Z,value:N,disabledOptions:["any",I],onChange:t=>de(t)}]},{id:"changeLinePathType",title:e("header.settings.procedures.changeLinePathType.title"),onClose:()=>H(!P),field:[{type:"select",label:e("header.settings.procedures.changeLinePathType.changeFrom"),options:z,value:B,disabledOptions:[w],onChange:t=>ue(t)},{type:"select",label:e("header.settings.procedures.changeLinePathType.changeTo"),options:z,value:w,disabledOptions:["any","simple",B],onChange:t=>he(t)}]},{id:"changeColor",title:e("header.settings.procedures.changeColor.title"),onClose:()=>U(!R),field:[{type:"custom",label:e("header.settings.procedures.changeColor.changeFrom"),component:c.jsx(ke,{data:fe,displayHandler:t=>c.jsx(ze,{name:t.value,fg:t.theme[3],bg:t.theme[2],title:t.theme[1],sx:{display:"inline-block",overflow:"hidden",textOverflow:"ellipsis"}}),filter:(t,h)=>h.id.toLowerCase().includes(t.toLowerCase())||Object.values(h.id).some(y=>y.toLowerCase().includes(t.toLowerCase())),value:m.value,onChange:t=>V(t)})},{type:"custom",label:e("header.settings.procedures.changeColor.changeTo"),component:c.jsx(Ze,{theme:M,onClick:()=>{Q(!0),l(_e(u))}})}]}];r.useEffect(()=>{s&&(D(!1),q(!1),G(!1),H(!1),U(!1),Y(0),ye([x,...Ye(p.current,i?[...d].filter(t=>t.startsWith("stn")||t.startsWith("misc_node")):p.current.nodes(),i?[...d].filter(t=>t.startsWith("line")):p.current.edges()).map(t=>({id:t.toString(),theme:t,value:t[1]==="other"?t[2]:t[1]}))]),V(x))},[s]);const be=()=>{const t=a!=null&&a.includes("station")?[...d].filter(g=>g.startsWith("stn")):i?[]:p.current.filterNodes(g=>g.startsWith("stn")),h=a!=null&&a.includes("misc-node")?[...d].filter(g=>g.startsWith("misc_node")):i?[]:p.current.filterNodes(g=>g.startsWith("misc_node")),y=i?[...d].filter(g=>g.startsWith("line")):p.current.edges();(!a||a.includes("station"))&&E&&Ge(p.current,O,v,t),(!a||a.includes("line"))&&L&&Qe(p.current,I,N,u,y),(!a||a.includes("line"))&&P&&Ue(p.current,B,w,y,T),R&&((!a||a.includes("line"))&&$e(p.current,m.id==="any"?"any":m.theme,M,y),(!a||a.includes("misc-node")||a.includes("station"))&&Je(p.current,m.id==="any"?"any":m.theme,M,t,h)),j&&Ke(p.current,t,h,y,X),ie(),o()};return c.jsxs(Se,{isOpen:s,onClose:o,size:"md",scrollBehavior:"inside",children:[c.jsx(Ce,{}),c.jsxs(Ae,{children:[c.jsxs(Te,{children:[c.jsx($,{as:"b",fontSize:"xl",children:e(i?"panel.details.multipleSelection.change":"header.settings.procedures.changeType.title")}),c.jsx(xe,{})]}),c.jsx(je,{children:c.jsx(Ee,{allowMultiple:!0,children:me.map(t=>c.jsxs(Oe,{children:[c.jsxs(ve,{onClick:t.onClose,children:[c.jsx(Le,{as:"span",flex:"1",textAlign:"left",children:c.jsx($,{as:"b",fontSize:"md",children:t.title})}),c.jsx(Ie,{})]}),c.jsx(Ne,{pb:4,children:c.jsx(De,{fields:t.field,minW:270})})]},t.id))})}),c.jsxs(Pe,{children:[c.jsx(J,{colorScheme:"blue",variant:"outline",mr:"1",onClick:o,children:e("cancel")}),c.jsx(Be,{label:e("header.settings.pro"),isOpen:!k.RMP_CLOUD,children:c.jsx(J,{colorScheme:"red",mr:"1",onClick:be,isDisabled:!k.RMP_CLOUD||!j&&!E&&!L&&!P&&!R,children:e("apply")})})]})]})]})};export{nt as C,Ve as a,qe as b,He as c}; +import{j as c,at as Se,$ as Ce,au as Ae,a1 as Te,a4 as $,a2 as xe,a3 as je,aV as Ee,aW as Oe,aX as ve,B as Le,aY as Ie,aZ as Ne,a5 as Pe,O as J,aM as Be}from"./chakra-t2DzLzXq.js";import{S as b,aG as K,ap as A,l as ne,k as ae,m as we,L as S,o as oe,c as Re,d as W,q as F,t as ee,v as te,C as Me,M as We,Q as ke,R as ze,V as Ze,W as _e,i as De}from"./index-DRWG9Ar1.js";import{u as Xe,b as r}from"./react-DmTIgZys.js";import{s as C,e as Ye}from"./master-manager-DlQmLEpO.js";const se=[b.ShmetroBasic2020,b.LondonTubeBasic,b.ShanghaiSuburbanRailway],qe=(n,s,o)=>{const i=n.getNodeAttribute(s,"type"),a=structuredClone(n.getNodeAttribute(s,i).names);for(let l=0;la.length?a.push("Stn"):a.pop();const e={...C[o].defaultAttrs,names:a};(!Object.values(se).includes(i)||!Object.values(se).includes(o))&&(e.nameOffsetX=n.getNodeAttribute(s,i).nameOffsetX,e.nameOffsetY=n.getNodeAttribute(s,i).nameOffsetY),K.includes(o)&&K.includes(i)&&(e.color=structuredClone(n.getNodeAttribute(s,i).color)),n.removeNodeAttribute(s,i),n.mergeNodeAttributes(s,{type:o,[o]:e})},Ge=(n,s,o,i)=>i.filter(a=>s==="any"||n.getNodeAttribute(a,"type")===s).forEach(a=>{qe(n,a,o)}),He=(n,s,o,i)=>{const a=n.getEdgeAttribute(s,"type"),e=n.getEdgeAttribute(s,"style");if(A[e].metadata.supportLinePathType.includes(o)){const l=structuredClone(ne[o].defaultAttrs);let d=-1;if(i&&o!==ae.Simple){const[u,f]=n.extremities(s),T=l.startFrom;d=we(n,o,u,f,T)}n.setEdgeAttribute(s,"parallelIndex",d),n.removeEdgeAttribute(s,a),n.mergeEdgeAttributes(s,{type:o,[o]:l})}},Ue=(n,s,o,i,a)=>i.filter(e=>s==="any"||n.getEdgeAttribute(e,"type")===s).forEach(e=>{He(n,e,o,a)}),Ve=(n,s,o,i)=>{const a=n.getEdgeAttribute(s,"type"),e=n.getEdgeAttribute(s,"style");if(A[o].metadata.supportLinePathType.includes(a)){const l=n.getEdgeAttribute(s,"zIndex"),d=n.getEdgeAttribute(s,e);n.removeEdgeAttribute(s,e);const u=structuredClone(A[o].defaultAttrs);S.includes(e)&&S.includes(o)?u.color=d.color:S.includes(o)&&i&&(u.color=i),n.mergeEdgeAttributes(s,{style:o,[o]:u}),o===oe.River?n.setEdgeAttribute(s,"zIndex",-5):n.setEdgeAttribute(s,"zIndex",l!=null?l:0)}},Qe=(n,s,o,i,a)=>a.filter(e=>s==="any"||n.getEdgeAttribute(e,"style")===s).forEach(e=>{Ve(n,e,o,i)}),$e=(n,s,o,i)=>i.filter(a=>S.includes(n.getEdgeAttribute(a,"style"))).forEach(a=>{const e=n.getEdgeAttributes(a),l=e[e.style].color;(s==="any"||l[0]==s[0]&&l[1]==s[1]&&l[2]==s[2]&&l[3]==s[3])&&n.mergeEdgeAttributes(a,{[e.style]:{color:o}})}),Je=(n,s,o,i,a)=>{[...i,...a].forEach(e=>{const l=n.getNodeAttributes(e).type,d=n.getNodeAttribute(e,l);if(d.color!==void 0){const u=d.color;(s==="any"||u[0]==s[0]&&u[1]==s[1]&&u[2]==s[2]&&u[3]==s[3])&&(d.color=o)}n.mergeNodeAttributes(e,{[l]:d})})},Ke=(n,s,o,i,a)=>{[...s,...o].forEach(e=>{n.setNodeAttribute(e,"zIndex",a)}),i.forEach(e=>{n.setEdgeAttribute(e,"zIndex",a)})},nt=n=>{const{isOpen:s,onClose:o,isSelect:i,filter:a}=n,{t:e}=Xe(),l=Re(),{selected:d,theme:u,paletteAppClip:{output:f}}=W(t=>t.runtime),{preference:{autoParallel:T}}=W(t=>t.app),{activeSubscriptions:k}=W(t=>t.account),ie=r.useCallback(()=>{l(F()),l(ee()),l(te(p.current.export()))},[l,F,ee,te]),p=r.useRef(window.graph),z={any:e("header.settings.procedures.changeType.any"),...Object.fromEntries(Object.entries(ne).map(([t,h])=>[t,e(h.metadata.displayName).toString()]))},Z={any:e("header.settings.procedures.changeType.any"),...Object.fromEntries(Object.entries(A).map(([t,h])=>[t,e(h.metadata.displayName).toString()]))},_={any:e("header.settings.procedures.changeType.any"),...Object.fromEntries(Object.entries(C).map(([t,h])=>[t,e(h.metadata.displayName).toString()]))},x={id:"any",theme:[Me.Other,"other","#ffffff",We.black],value:e("header.settings.procedures.changeType.any")},[j,D]=r.useState(!1),[X,Y]=r.useState(0),[E,q]=r.useState(!1),[O,le]=r.useState("any"),[v,ce]=r.useState(b.ShmetroBasic),[L,G]=r.useState(!1),[I,re]=r.useState("any"),[N,de]=r.useState(oe.SingleColor),[P,H]=r.useState(!1),[B,ue]=r.useState("any"),[w,he]=r.useState(ae.Diagonal),[R,U]=r.useState(!1),[m,V]=r.useState(x),[M,pe]=r.useState(u),[ge,Q]=r.useState(!1);r.useEffect(()=>{ge&&f&&(pe(f),Q(!1))},[f==null?void 0:f.toString()]);const[fe,ye]=r.useState([]),me=[{id:"changeZIndex",title:e("header.settings.procedures.changeZIndex"),onClose:()=>D(!j),field:[{type:"select",label:e("panel.details.info.zIndex"),value:X,options:Object.fromEntries(Array.from({length:11},(t,h)=>[h-5,(h-5).toString()])),onChange:t=>Y(Number(t))}]},{id:"changeStationType",title:e("header.settings.procedures.changeStationType.title"),onClose:()=>q(!E),field:[{type:"select",label:e("header.settings.procedures.changeStationType.changeFrom"),options:_,value:O,disabledOptions:[v],onChange:t=>le(t)},{type:"select",label:e("header.settings.procedures.changeStationType.changeTo"),options:_,value:v,disabledOptions:["any",O],onChange:t=>ce(t)}]},{id:"changeLineStyleType",title:e("header.settings.procedures.changeLineStyleType.title"),onClose:()=>G(!L),field:[{type:"select",label:e("header.settings.procedures.changeLineStyleType.changeFrom"),options:Z,value:I,disabledOptions:[N],onChange:t=>re(t)},{type:"select",label:e("header.settings.procedures.changeLineStyleType.changeTo"),options:Z,value:N,disabledOptions:["any",I],onChange:t=>de(t)}]},{id:"changeLinePathType",title:e("header.settings.procedures.changeLinePathType.title"),onClose:()=>H(!P),field:[{type:"select",label:e("header.settings.procedures.changeLinePathType.changeFrom"),options:z,value:B,disabledOptions:[w],onChange:t=>ue(t)},{type:"select",label:e("header.settings.procedures.changeLinePathType.changeTo"),options:z,value:w,disabledOptions:["any","simple",B],onChange:t=>he(t)}]},{id:"changeColor",title:e("header.settings.procedures.changeColor.title"),onClose:()=>U(!R),field:[{type:"custom",label:e("header.settings.procedures.changeColor.changeFrom"),component:c.jsx(ke,{data:fe,displayHandler:t=>c.jsx(ze,{name:t.value,fg:t.theme[3],bg:t.theme[2],title:t.theme[1],sx:{display:"inline-block",overflow:"hidden",textOverflow:"ellipsis"}}),filter:(t,h)=>h.id.toLowerCase().includes(t.toLowerCase())||Object.values(h.id).some(y=>y.toLowerCase().includes(t.toLowerCase())),value:m.value,onChange:t=>V(t)})},{type:"custom",label:e("header.settings.procedures.changeColor.changeTo"),component:c.jsx(Ze,{theme:M,onClick:()=>{Q(!0),l(_e(u))}})}]}];r.useEffect(()=>{s&&(D(!1),q(!1),G(!1),H(!1),U(!1),Y(0),ye([x,...Ye(p.current,i?[...d].filter(t=>t.startsWith("stn")||t.startsWith("misc_node")):p.current.nodes(),i?[...d].filter(t=>t.startsWith("line")):p.current.edges()).map(t=>({id:t.toString(),theme:t,value:t[1]==="other"?t[2]:t[1]}))]),V(x))},[s]);const be=()=>{const t=a!=null&&a.includes("station")?[...d].filter(g=>g.startsWith("stn")):i?[]:p.current.filterNodes(g=>g.startsWith("stn")),h=a!=null&&a.includes("misc-node")?[...d].filter(g=>g.startsWith("misc_node")):i?[]:p.current.filterNodes(g=>g.startsWith("misc_node")),y=i?[...d].filter(g=>g.startsWith("line")):p.current.edges();(!a||a.includes("station"))&&E&&Ge(p.current,O,v,t),(!a||a.includes("line"))&&L&&Qe(p.current,I,N,u,y),(!a||a.includes("line"))&&P&&Ue(p.current,B,w,y,T),R&&((!a||a.includes("line"))&&$e(p.current,m.id==="any"?"any":m.theme,M,y),(!a||a.includes("misc-node")||a.includes("station"))&&Je(p.current,m.id==="any"?"any":m.theme,M,t,h)),j&&Ke(p.current,t,h,y,X),ie(),o()};return c.jsxs(Se,{isOpen:s,onClose:o,size:"md",scrollBehavior:"inside",children:[c.jsx(Ce,{}),c.jsxs(Ae,{children:[c.jsxs(Te,{children:[c.jsx($,{as:"b",fontSize:"xl",children:e(i?"panel.details.multipleSelection.change":"header.settings.procedures.changeType.title")}),c.jsx(xe,{})]}),c.jsx(je,{children:c.jsx(Ee,{allowMultiple:!0,children:me.map(t=>c.jsxs(Oe,{children:[c.jsxs(ve,{onClick:t.onClose,children:[c.jsx(Le,{as:"span",flex:"1",textAlign:"left",children:c.jsx($,{as:"b",fontSize:"md",children:t.title})}),c.jsx(Ie,{})]}),c.jsx(Ne,{pb:4,children:c.jsx(De,{fields:t.field,minW:270})})]},t.id))})}),c.jsxs(Pe,{children:[c.jsx(J,{colorScheme:"blue",variant:"outline",mr:"1",onClick:o,children:e("cancel")}),c.jsx(Be,{label:e("header.settings.pro"),isOpen:!k.RMP_CLOUD,children:c.jsx(J,{colorScheme:"red",mr:"1",onClick:be,isDisabled:!k.RMP_CLOUD||!j&&!E&&!L&&!P&&!R,children:e("apply")})})]})]})]})};export{nt as C,Ve as a,qe as b,He as c}; diff --git a/assets/change-type-modal-legacy-BWY8KDxU.js b/assets/change-type-modal-legacy-BfNFaO9v.js similarity index 97% rename from assets/change-type-modal-legacy-BWY8KDxU.js rename to assets/change-type-modal-legacy-BfNFaO9v.js index 561d33ce8..b4504abe4 100644 --- a/assets/change-type-modal-legacy-BWY8KDxU.js +++ b/assets/change-type-modal-legacy-BfNFaO9v.js @@ -1 +1 @@ -System.register(["./chakra-legacy--ElhKRU8.js","./index-legacy-iSkJTZGA.js","./react-legacy-CB7hQk4J.js","./master-manager-legacy-BrdnNHXw.js"],(function(e,t){"use strict";var s,n,a,r,i,l,o,c,d,u,g,h,p,y,m,b,f,S,x,A,C,j,E,v,O,T,L,N,W,w,k,z,I,P,M,R,B,F,_,D,X;return{setters:[e=>{s=e.j,n=e.at,a=e.$,r=e.au,i=e.a1,l=e.a4,o=e.a2,c=e.a3,d=e.aV,u=e.aW,g=e.aX,h=e.B,p=e.aY,y=e.aZ,m=e.a5,b=e.O,f=e.aM},e=>{S=e.S,x=e.aG,A=e.ap,C=e.l,j=e.k,E=e.m,v=e.L,O=e.o,T=e.c,L=e.d,N=e.q,W=e.t,w=e.v,k=e.C,z=e.M,I=e.Q,P=e.R,M=e.V,R=e.W,B=e.i},e=>{F=e.u,_=e.b},e=>{D=e.s,X=e.e}],execute:function(){const t=[S.ShmetroBasic2020,S.LondonTubeBasic,S.ShanghaiSuburbanRailway],Y=e("b",((e,s,n)=>{const a=e.getNodeAttribute(s,"type"),r=structuredClone(e.getNodeAttribute(s,a).names);for(let t=0;tr.length?r.push("Stn"):r.pop();const i={...D[n].defaultAttrs,names:r};Object.values(t).includes(a)&&Object.values(t).includes(n)||(i.nameOffsetX=e.getNodeAttribute(s,a).nameOffsetX,i.nameOffsetY=e.getNodeAttribute(s,a).nameOffsetY),x.includes(n)&&x.includes(a)&&(i.color=structuredClone(e.getNodeAttribute(s,a).color)),e.removeNodeAttribute(s,a),e.mergeNodeAttributes(s,{type:n,[n]:i})})),Z=e("c",((e,t,s,n)=>{const a=e.getEdgeAttribute(t,"type"),r=e.getEdgeAttribute(t,"style");if(A[r].metadata.supportLinePathType.includes(s)){const r=structuredClone(C[s].defaultAttrs);let i=-1;if(n&&s!==j.Simple){const[n,a]=e.extremities(t),l=r.startFrom;i=E(e,s,n,a,l)}e.setEdgeAttribute(t,"parallelIndex",i),e.removeEdgeAttribute(t,a),e.mergeEdgeAttributes(t,{type:s,[s]:r})}})),U=e("a",((e,t,s,n)=>{const a=e.getEdgeAttribute(t,"type"),r=e.getEdgeAttribute(t,"style");if(A[s].metadata.supportLinePathType.includes(a)){const a=e.getEdgeAttribute(t,"zIndex"),i=e.getEdgeAttribute(t,r);e.removeEdgeAttribute(t,r);const l=structuredClone(A[s].defaultAttrs);v.includes(r)&&v.includes(s)?l.color=i.color:v.includes(s)&&n&&(l.color=n),e.mergeEdgeAttributes(t,{style:s,[s]:l}),s===O.River?e.setEdgeAttribute(t,"zIndex",-5):e.setEdgeAttribute(t,"zIndex",null!=a?a:0)}}));e("C",(e=>{const{isOpen:t,onClose:x,isSelect:E,filter:V}=e,{t:q}=F(),G=T(),{selected:H,theme:Q,paletteAppClip:{output:$}}=L((e=>e.runtime)),{preference:{autoParallel:J}}=L((e=>e.app)),{activeSubscriptions:K}=L((e=>e.account)),ee=_.useCallback((()=>{G(N()),G(W()),G(w(te.current.export()))}),[G,N,W,w]),te=_.useRef(window.graph),se={any:q("header.settings.procedures.changeType.any"),...Object.fromEntries(Object.entries(C).map((([e,t])=>[e,q(t.metadata.displayName).toString()])))},ne={any:q("header.settings.procedures.changeType.any"),...Object.fromEntries(Object.entries(A).map((([e,t])=>[e,q(t.metadata.displayName).toString()])))},ae={any:q("header.settings.procedures.changeType.any"),...Object.fromEntries(Object.entries(D).map((([e,t])=>[e,q(t.metadata.displayName).toString()])))},re={id:"any",theme:[k.Other,"other","#ffffff",z.black],value:q("header.settings.procedures.changeType.any")},[ie,le]=_.useState(!1),[oe,ce]=_.useState(0),[de,ue]=_.useState(!1),[ge,he]=_.useState("any"),[pe,ye]=_.useState(S.ShmetroBasic),[me,be]=_.useState(!1),[fe,Se]=_.useState("any"),[xe,Ae]=_.useState(O.SingleColor),[Ce,je]=_.useState(!1),[Ee,ve]=_.useState("any"),[Oe,Te]=_.useState(j.Diagonal),[Le,Ne]=_.useState(!1),[We,we]=_.useState(re),[ke,ze]=_.useState(Q),[Ie,Pe]=_.useState(!1);_.useEffect((()=>{Ie&&$&&(ze($),Pe(!1))}),[null==$?void 0:$.toString()]);const[Me,Re]=_.useState([]),Be=[{id:"changeZIndex",title:q("header.settings.procedures.changeZIndex"),onClose:()=>le(!ie),field:[{type:"select",label:q("panel.details.info.zIndex"),value:oe,options:Object.fromEntries(Array.from({length:11},((e,t)=>[t-5,(t-5).toString()]))),onChange:e=>ce(Number(e))}]},{id:"changeStationType",title:q("header.settings.procedures.changeStationType.title"),onClose:()=>ue(!de),field:[{type:"select",label:q("header.settings.procedures.changeStationType.changeFrom"),options:ae,value:ge,disabledOptions:[pe],onChange:e=>he(e)},{type:"select",label:q("header.settings.procedures.changeStationType.changeTo"),options:ae,value:pe,disabledOptions:["any",ge],onChange:e=>ye(e)}]},{id:"changeLineStyleType",title:q("header.settings.procedures.changeLineStyleType.title"),onClose:()=>be(!me),field:[{type:"select",label:q("header.settings.procedures.changeLineStyleType.changeFrom"),options:ne,value:fe,disabledOptions:[xe],onChange:e=>Se(e)},{type:"select",label:q("header.settings.procedures.changeLineStyleType.changeTo"),options:ne,value:xe,disabledOptions:["any",fe],onChange:e=>Ae(e)}]},{id:"changeLinePathType",title:q("header.settings.procedures.changeLinePathType.title"),onClose:()=>je(!Ce),field:[{type:"select",label:q("header.settings.procedures.changeLinePathType.changeFrom"),options:se,value:Ee,disabledOptions:[Oe],onChange:e=>ve(e)},{type:"select",label:q("header.settings.procedures.changeLinePathType.changeTo"),options:se,value:Oe,disabledOptions:["any","simple",Ee],onChange:e=>Te(e)}]},{id:"changeColor",title:q("header.settings.procedures.changeColor.title"),onClose:()=>Ne(!Le),field:[{type:"custom",label:q("header.settings.procedures.changeColor.changeFrom"),component:s.jsx(I,{data:Me,displayHandler:e=>s.jsx(P,{name:e.value,fg:e.theme[3],bg:e.theme[2],title:e.theme[1],sx:{display:"inline-block",overflow:"hidden",textOverflow:"ellipsis"}}),filter:(e,t)=>t.id.toLowerCase().includes(e.toLowerCase())||Object.values(t.id).some((t=>t.toLowerCase().includes(e.toLowerCase()))),value:We.value,onChange:e=>we(e)})},{type:"custom",label:q("header.settings.procedures.changeColor.changeTo"),component:s.jsx(M,{theme:ke,onClick:()=>{Pe(!0),G(R(Q))}})}]}];return _.useEffect((()=>{t&&(le(!1),ue(!1),be(!1),je(!1),Ne(!1),ce(0),Re([re,...X(te.current,E?[...H].filter((e=>e.startsWith("stn")||e.startsWith("misc_node"))):te.current.nodes(),E?[...H].filter((e=>e.startsWith("line"))):te.current.edges()).map((e=>({id:e.toString(),theme:e,value:"other"===e[1]?e[2]:e[1]})))]),we(re))}),[t]),s.jsxs(n,{isOpen:t,onClose:x,size:"md",scrollBehavior:"inside",children:[s.jsx(a,{}),s.jsxs(r,{children:[s.jsxs(i,{children:[s.jsx(l,{as:"b",fontSize:"xl",children:q(E?"panel.details.multipleSelection.change":"header.settings.procedures.changeType.title")}),s.jsx(o,{})]}),s.jsx(c,{children:s.jsx(d,{allowMultiple:!0,children:Be.map((e=>s.jsxs(u,{children:[s.jsxs(g,{onClick:e.onClose,children:[s.jsx(h,{as:"span",flex:"1",textAlign:"left",children:s.jsx(l,{as:"b",fontSize:"md",children:e.title})}),s.jsx(p,{})]}),s.jsx(y,{pb:4,children:s.jsx(B,{fields:e.field,minW:270})})]},e.id)))})}),s.jsxs(m,{children:[s.jsx(b,{colorScheme:"blue",variant:"outline",mr:"1",onClick:x,children:q("cancel")}),s.jsx(f,{label:q("header.settings.pro"),isOpen:!K.RMP_CLOUD,children:s.jsx(b,{colorScheme:"red",mr:"1",onClick:()=>{const e=null!=V&&V.includes("station")?[...H].filter((e=>e.startsWith("stn"))):E?[]:te.current.filterNodes((e=>e.startsWith("stn"))),t=null!=V&&V.includes("misc-node")?[...H].filter((e=>e.startsWith("misc_node"))):E?[]:te.current.filterNodes((e=>e.startsWith("misc_node"))),s=E?[...H].filter((e=>e.startsWith("line"))):te.current.edges();V&&!V.includes("station")||!de||((e,t,s,n)=>{n.filter((s=>"any"===t||e.getNodeAttribute(s,"type")===t)).forEach((t=>{Y(e,t,s)}))})(te.current,ge,pe,e),V&&!V.includes("line")||!me||((e,t,s,n,a)=>{a.filter((s=>"any"===t||e.getEdgeAttribute(s,"style")===t)).forEach((t=>{U(e,t,s,n)}))})(te.current,fe,xe,Q,s),V&&!V.includes("line")||!Ce||((e,t,s,n,a)=>{n.filter((s=>"any"===t||e.getEdgeAttribute(s,"type")===t)).forEach((t=>{Z(e,t,s,a)}))})(te.current,Ee,Oe,s,J),Le&&(V&&!V.includes("line")||((e,t,s,n)=>{n.filter((t=>v.includes(e.getEdgeAttribute(t,"style")))).forEach((n=>{const a=e.getEdgeAttributes(n),r=a[a.style].color;("any"===t||r[0]==t[0]&&r[1]==t[1]&&r[2]==t[2]&&r[3]==t[3])&&e.mergeEdgeAttributes(n,{[a.style]:{color:s}})}))})(te.current,"any"===We.id?"any":We.theme,ke,s),(!V||V.includes("misc-node")||V.includes("station"))&&((e,t,s,n,a)=>{[...n,...a].forEach((n=>{const a=e.getNodeAttributes(n).type,r=e.getNodeAttribute(n,a);if(void 0!==r.color){const e=r.color;("any"===t||e[0]==t[0]&&e[1]==t[1]&&e[2]==t[2]&&e[3]==t[3])&&(r.color=s)}e.mergeNodeAttributes(n,{[a]:r})}))})(te.current,"any"===We.id?"any":We.theme,ke,e,t)),ie&&((e,t,s,n,a)=>{[...t,...s].forEach((t=>{e.setNodeAttribute(t,"zIndex",a)})),n.forEach((t=>{e.setEdgeAttribute(t,"zIndex",a)}))})(te.current,e,t,s,oe),ee(),x()},isDisabled:!(K.RMP_CLOUD&&(ie||de||me||Ce||Le)),children:q("apply")})})]})]})]})}))}}})); +System.register(["./chakra-legacy--ElhKRU8.js","./index-legacy-jqOeRlnz.js","./react-legacy-CB7hQk4J.js","./master-manager-legacy-CCeMINwh.js"],(function(e,t){"use strict";var s,n,a,r,i,l,o,c,d,u,g,h,p,y,m,b,f,S,x,A,C,j,E,v,O,T,L,N,W,w,k,z,I,P,M,R,B,F,_,D,X;return{setters:[e=>{s=e.j,n=e.at,a=e.$,r=e.au,i=e.a1,l=e.a4,o=e.a2,c=e.a3,d=e.aV,u=e.aW,g=e.aX,h=e.B,p=e.aY,y=e.aZ,m=e.a5,b=e.O,f=e.aM},e=>{S=e.S,x=e.aG,A=e.ap,C=e.l,j=e.k,E=e.m,v=e.L,O=e.o,T=e.c,L=e.d,N=e.q,W=e.t,w=e.v,k=e.C,z=e.M,I=e.Q,P=e.R,M=e.V,R=e.W,B=e.i},e=>{F=e.u,_=e.b},e=>{D=e.s,X=e.e}],execute:function(){const t=[S.ShmetroBasic2020,S.LondonTubeBasic,S.ShanghaiSuburbanRailway],Y=e("b",((e,s,n)=>{const a=e.getNodeAttribute(s,"type"),r=structuredClone(e.getNodeAttribute(s,a).names);for(let t=0;tr.length?r.push("Stn"):r.pop();const i={...D[n].defaultAttrs,names:r};Object.values(t).includes(a)&&Object.values(t).includes(n)||(i.nameOffsetX=e.getNodeAttribute(s,a).nameOffsetX,i.nameOffsetY=e.getNodeAttribute(s,a).nameOffsetY),x.includes(n)&&x.includes(a)&&(i.color=structuredClone(e.getNodeAttribute(s,a).color)),e.removeNodeAttribute(s,a),e.mergeNodeAttributes(s,{type:n,[n]:i})})),Z=e("c",((e,t,s,n)=>{const a=e.getEdgeAttribute(t,"type"),r=e.getEdgeAttribute(t,"style");if(A[r].metadata.supportLinePathType.includes(s)){const r=structuredClone(C[s].defaultAttrs);let i=-1;if(n&&s!==j.Simple){const[n,a]=e.extremities(t),l=r.startFrom;i=E(e,s,n,a,l)}e.setEdgeAttribute(t,"parallelIndex",i),e.removeEdgeAttribute(t,a),e.mergeEdgeAttributes(t,{type:s,[s]:r})}})),U=e("a",((e,t,s,n)=>{const a=e.getEdgeAttribute(t,"type"),r=e.getEdgeAttribute(t,"style");if(A[s].metadata.supportLinePathType.includes(a)){const a=e.getEdgeAttribute(t,"zIndex"),i=e.getEdgeAttribute(t,r);e.removeEdgeAttribute(t,r);const l=structuredClone(A[s].defaultAttrs);v.includes(r)&&v.includes(s)?l.color=i.color:v.includes(s)&&n&&(l.color=n),e.mergeEdgeAttributes(t,{style:s,[s]:l}),s===O.River?e.setEdgeAttribute(t,"zIndex",-5):e.setEdgeAttribute(t,"zIndex",null!=a?a:0)}}));e("C",(e=>{const{isOpen:t,onClose:x,isSelect:E,filter:V}=e,{t:q}=F(),G=T(),{selected:H,theme:Q,paletteAppClip:{output:$}}=L((e=>e.runtime)),{preference:{autoParallel:J}}=L((e=>e.app)),{activeSubscriptions:K}=L((e=>e.account)),ee=_.useCallback((()=>{G(N()),G(W()),G(w(te.current.export()))}),[G,N,W,w]),te=_.useRef(window.graph),se={any:q("header.settings.procedures.changeType.any"),...Object.fromEntries(Object.entries(C).map((([e,t])=>[e,q(t.metadata.displayName).toString()])))},ne={any:q("header.settings.procedures.changeType.any"),...Object.fromEntries(Object.entries(A).map((([e,t])=>[e,q(t.metadata.displayName).toString()])))},ae={any:q("header.settings.procedures.changeType.any"),...Object.fromEntries(Object.entries(D).map((([e,t])=>[e,q(t.metadata.displayName).toString()])))},re={id:"any",theme:[k.Other,"other","#ffffff",z.black],value:q("header.settings.procedures.changeType.any")},[ie,le]=_.useState(!1),[oe,ce]=_.useState(0),[de,ue]=_.useState(!1),[ge,he]=_.useState("any"),[pe,ye]=_.useState(S.ShmetroBasic),[me,be]=_.useState(!1),[fe,Se]=_.useState("any"),[xe,Ae]=_.useState(O.SingleColor),[Ce,je]=_.useState(!1),[Ee,ve]=_.useState("any"),[Oe,Te]=_.useState(j.Diagonal),[Le,Ne]=_.useState(!1),[We,we]=_.useState(re),[ke,ze]=_.useState(Q),[Ie,Pe]=_.useState(!1);_.useEffect((()=>{Ie&&$&&(ze($),Pe(!1))}),[null==$?void 0:$.toString()]);const[Me,Re]=_.useState([]),Be=[{id:"changeZIndex",title:q("header.settings.procedures.changeZIndex"),onClose:()=>le(!ie),field:[{type:"select",label:q("panel.details.info.zIndex"),value:oe,options:Object.fromEntries(Array.from({length:11},((e,t)=>[t-5,(t-5).toString()]))),onChange:e=>ce(Number(e))}]},{id:"changeStationType",title:q("header.settings.procedures.changeStationType.title"),onClose:()=>ue(!de),field:[{type:"select",label:q("header.settings.procedures.changeStationType.changeFrom"),options:ae,value:ge,disabledOptions:[pe],onChange:e=>he(e)},{type:"select",label:q("header.settings.procedures.changeStationType.changeTo"),options:ae,value:pe,disabledOptions:["any",ge],onChange:e=>ye(e)}]},{id:"changeLineStyleType",title:q("header.settings.procedures.changeLineStyleType.title"),onClose:()=>be(!me),field:[{type:"select",label:q("header.settings.procedures.changeLineStyleType.changeFrom"),options:ne,value:fe,disabledOptions:[xe],onChange:e=>Se(e)},{type:"select",label:q("header.settings.procedures.changeLineStyleType.changeTo"),options:ne,value:xe,disabledOptions:["any",fe],onChange:e=>Ae(e)}]},{id:"changeLinePathType",title:q("header.settings.procedures.changeLinePathType.title"),onClose:()=>je(!Ce),field:[{type:"select",label:q("header.settings.procedures.changeLinePathType.changeFrom"),options:se,value:Ee,disabledOptions:[Oe],onChange:e=>ve(e)},{type:"select",label:q("header.settings.procedures.changeLinePathType.changeTo"),options:se,value:Oe,disabledOptions:["any","simple",Ee],onChange:e=>Te(e)}]},{id:"changeColor",title:q("header.settings.procedures.changeColor.title"),onClose:()=>Ne(!Le),field:[{type:"custom",label:q("header.settings.procedures.changeColor.changeFrom"),component:s.jsx(I,{data:Me,displayHandler:e=>s.jsx(P,{name:e.value,fg:e.theme[3],bg:e.theme[2],title:e.theme[1],sx:{display:"inline-block",overflow:"hidden",textOverflow:"ellipsis"}}),filter:(e,t)=>t.id.toLowerCase().includes(e.toLowerCase())||Object.values(t.id).some((t=>t.toLowerCase().includes(e.toLowerCase()))),value:We.value,onChange:e=>we(e)})},{type:"custom",label:q("header.settings.procedures.changeColor.changeTo"),component:s.jsx(M,{theme:ke,onClick:()=>{Pe(!0),G(R(Q))}})}]}];return _.useEffect((()=>{t&&(le(!1),ue(!1),be(!1),je(!1),Ne(!1),ce(0),Re([re,...X(te.current,E?[...H].filter((e=>e.startsWith("stn")||e.startsWith("misc_node"))):te.current.nodes(),E?[...H].filter((e=>e.startsWith("line"))):te.current.edges()).map((e=>({id:e.toString(),theme:e,value:"other"===e[1]?e[2]:e[1]})))]),we(re))}),[t]),s.jsxs(n,{isOpen:t,onClose:x,size:"md",scrollBehavior:"inside",children:[s.jsx(a,{}),s.jsxs(r,{children:[s.jsxs(i,{children:[s.jsx(l,{as:"b",fontSize:"xl",children:q(E?"panel.details.multipleSelection.change":"header.settings.procedures.changeType.title")}),s.jsx(o,{})]}),s.jsx(c,{children:s.jsx(d,{allowMultiple:!0,children:Be.map((e=>s.jsxs(u,{children:[s.jsxs(g,{onClick:e.onClose,children:[s.jsx(h,{as:"span",flex:"1",textAlign:"left",children:s.jsx(l,{as:"b",fontSize:"md",children:e.title})}),s.jsx(p,{})]}),s.jsx(y,{pb:4,children:s.jsx(B,{fields:e.field,minW:270})})]},e.id)))})}),s.jsxs(m,{children:[s.jsx(b,{colorScheme:"blue",variant:"outline",mr:"1",onClick:x,children:q("cancel")}),s.jsx(f,{label:q("header.settings.pro"),isOpen:!K.RMP_CLOUD,children:s.jsx(b,{colorScheme:"red",mr:"1",onClick:()=>{const e=null!=V&&V.includes("station")?[...H].filter((e=>e.startsWith("stn"))):E?[]:te.current.filterNodes((e=>e.startsWith("stn"))),t=null!=V&&V.includes("misc-node")?[...H].filter((e=>e.startsWith("misc_node"))):E?[]:te.current.filterNodes((e=>e.startsWith("misc_node"))),s=E?[...H].filter((e=>e.startsWith("line"))):te.current.edges();V&&!V.includes("station")||!de||((e,t,s,n)=>{n.filter((s=>"any"===t||e.getNodeAttribute(s,"type")===t)).forEach((t=>{Y(e,t,s)}))})(te.current,ge,pe,e),V&&!V.includes("line")||!me||((e,t,s,n,a)=>{a.filter((s=>"any"===t||e.getEdgeAttribute(s,"style")===t)).forEach((t=>{U(e,t,s,n)}))})(te.current,fe,xe,Q,s),V&&!V.includes("line")||!Ce||((e,t,s,n,a)=>{n.filter((s=>"any"===t||e.getEdgeAttribute(s,"type")===t)).forEach((t=>{Z(e,t,s,a)}))})(te.current,Ee,Oe,s,J),Le&&(V&&!V.includes("line")||((e,t,s,n)=>{n.filter((t=>v.includes(e.getEdgeAttribute(t,"style")))).forEach((n=>{const a=e.getEdgeAttributes(n),r=a[a.style].color;("any"===t||r[0]==t[0]&&r[1]==t[1]&&r[2]==t[2]&&r[3]==t[3])&&e.mergeEdgeAttributes(n,{[a.style]:{color:s}})}))})(te.current,"any"===We.id?"any":We.theme,ke,s),(!V||V.includes("misc-node")||V.includes("station"))&&((e,t,s,n,a)=>{[...n,...a].forEach((n=>{const a=e.getNodeAttributes(n).type,r=e.getNodeAttribute(n,a);if(void 0!==r.color){const e=r.color;("any"===t||e[0]==t[0]&&e[1]==t[1]&&e[2]==t[2]&&e[3]==t[3])&&(r.color=s)}e.mergeNodeAttributes(n,{[a]:r})}))})(te.current,"any"===We.id?"any":We.theme,ke,e,t)),ie&&((e,t,s,n,a)=>{[...t,...s].forEach((t=>{e.setNodeAttribute(t,"zIndex",a)})),n.forEach((t=>{e.setEdgeAttribute(t,"zIndex",a)}))})(te.current,e,t,s,oe),ee(),x()},isDisabled:!(K.RMP_CLOUD&&(ie||de||me||Ce||Le)),children:q("apply")})})]})]})]})}))}}})); diff --git a/assets/clipboard-CUes04zp.js b/assets/clipboard-DPvCegxP.js similarity index 96% rename from assets/clipboard-CUes04zp.js rename to assets/clipboard-DPvCegxP.js index dc46d7a06..c0b35a97f 100644 --- a/assets/clipboard-CUes04zp.js +++ b/assets/clipboard-DPvCegxP.js @@ -1 +1 @@ -import{b as g}from"./react-DmTIgZys.js";import{n as O,aw as j}from"./index-CgEQ4DK5.js";const w=typeof window<"u"?g.useInsertionEffect||g.useLayoutEffect:()=>{};function x(s){const r=g.useRef(I);w(()=>{r.current=s},[s]);const o=g.useRef(null);return o.current||(o.current=function(){return r.current.apply(this,arguments)}),o.current}function I(){throw new Error("INVALID_USEEVENT_INVOCATION: the callback from useEvent cannot be invoked before the component has mounted.")}const k=(s,r)=>{const o={},u={};let[l,E]=[0,0],d=0;r.forEach(c=>{if(s.hasNode(c)){const n=c,i=s.getNodeAttributes(n);o[n]=i,l+=i.x,E+=i.y,d++}else if(s.hasEdge(c)){const n=c,[i,h]=s.extremities(n);u[n]={attr:s.getEdgeAttributes(n),source:i,target:h}}});const b={app:"rmp",version:1,nodesWithAttrs:o,edgesWithAttrs:u,avgX:l/d,avgY:E/d};return JSON.stringify(b)},R=(s,r,o,u,l,E)=>{const{nodesWithAttrs:d,edgesWithAttrs:b,version:c}=JSON.parse(s);if(c!==1)throw Error("Unrecognized version: ".concat(c));const n={};Object.keys(d).filter(e=>r.hasNode(e)).forEach(e=>{const t=O(10);if(e.startsWith("stn_"))n[e]="stn_".concat(t);else if(e.startsWith("misc_node_"))n[e]="misc_node_".concat(t);else throw Error("Unrecognized node id: ".concat(e))}),Object.keys(b).filter(e=>r.hasEdge(e)).forEach(e=>n[e]="line_".concat(O(10)));const i=Object.entries(n).reduce((e,[t,a])=>e.replaceAll(t,a),s),{nodesWithAttrs:h,edgesWithAttrs:N,avgX:p,avgY:y}=JSON.parse(i),m=o?Object.fromEntries(Object.entries(h).filter(([e,t])=>t.type!==j.Master)):h,f=o?Object.fromEntries(Object.entries(N).filter(([e,{source:t,target:a}])=>t in m&&a in m)):N;if(u)for(const e in f)f[e].attr.parallelIndex>=0&&(f[e].attr.parallelIndex=-1);const[A,v]=[l-p,E-y];return Object.entries(m).forEach(([e,t])=>{t.x+=A,t.y+=v,r.addNode(e,t)}),Object.entries(f).forEach(([e,{attr:t,source:a,target:_}])=>r.addDirectedEdgeWithKey(e,a,_,t)),{nodes:new Set(Object.keys(m)),edges:new Set(Object.keys(f))}};export{k as e,R as i,x as u}; +import{b as g}from"./react-DmTIgZys.js";import{n as O,aw as j}from"./index-DRWG9Ar1.js";const w=typeof window<"u"?g.useInsertionEffect||g.useLayoutEffect:()=>{};function x(s){const r=g.useRef(I);w(()=>{r.current=s},[s]);const o=g.useRef(null);return o.current||(o.current=function(){return r.current.apply(this,arguments)}),o.current}function I(){throw new Error("INVALID_USEEVENT_INVOCATION: the callback from useEvent cannot be invoked before the component has mounted.")}const k=(s,r)=>{const o={},u={};let[l,E]=[0,0],d=0;r.forEach(c=>{if(s.hasNode(c)){const n=c,i=s.getNodeAttributes(n);o[n]=i,l+=i.x,E+=i.y,d++}else if(s.hasEdge(c)){const n=c,[i,h]=s.extremities(n);u[n]={attr:s.getEdgeAttributes(n),source:i,target:h}}});const b={app:"rmp",version:1,nodesWithAttrs:o,edgesWithAttrs:u,avgX:l/d,avgY:E/d};return JSON.stringify(b)},R=(s,r,o,u,l,E)=>{const{nodesWithAttrs:d,edgesWithAttrs:b,version:c}=JSON.parse(s);if(c!==1)throw Error("Unrecognized version: ".concat(c));const n={};Object.keys(d).filter(e=>r.hasNode(e)).forEach(e=>{const t=O(10);if(e.startsWith("stn_"))n[e]="stn_".concat(t);else if(e.startsWith("misc_node_"))n[e]="misc_node_".concat(t);else throw Error("Unrecognized node id: ".concat(e))}),Object.keys(b).filter(e=>r.hasEdge(e)).forEach(e=>n[e]="line_".concat(O(10)));const i=Object.entries(n).reduce((e,[t,a])=>e.replaceAll(t,a),s),{nodesWithAttrs:h,edgesWithAttrs:N,avgX:p,avgY:y}=JSON.parse(i),m=o?Object.fromEntries(Object.entries(h).filter(([e,t])=>t.type!==j.Master)):h,f=o?Object.fromEntries(Object.entries(N).filter(([e,{source:t,target:a}])=>t in m&&a in m)):N;if(u)for(const e in f)f[e].attr.parallelIndex>=0&&(f[e].attr.parallelIndex=-1);const[A,v]=[l-p,E-y];return Object.entries(m).forEach(([e,t])=>{t.x+=A,t.y+=v,r.addNode(e,t)}),Object.entries(f).forEach(([e,{attr:t,source:a,target:_}])=>r.addDirectedEdgeWithKey(e,a,_,t)),{nodes:new Set(Object.keys(m)),edges:new Set(Object.keys(f))}};export{k as e,R as i,x as u}; diff --git a/assets/clipboard-legacy-D46oyBay.js b/assets/clipboard-legacy-CN3xDKAv.js similarity index 93% rename from assets/clipboard-legacy-D46oyBay.js rename to assets/clipboard-legacy-CN3xDKAv.js index b304aba16..8d75d9173 100644 --- a/assets/clipboard-legacy-D46oyBay.js +++ b/assets/clipboard-legacy-CN3xDKAv.js @@ -1 +1 @@ -System.register(["./react-legacy-CB7hQk4J.js","./index-legacy-iSkJTZGA.js"],(function(e,t){"use strict";var r,n,s;return{setters:[e=>{r=e.b},e=>{n=e.n,s=e.aw}],execute:function(){e("u",(function(e){const n=r.useRef(o);t((()=>{n.current=e}),[e]);const s=r.useRef(null);return s.current||(s.current=function(){return n.current.apply(this,arguments)}),s.current}));const t="undefined"!=typeof window?r.useInsertionEffect||r.useLayoutEffect:()=>{};function o(){throw new Error("INVALID_USEEVENT_INVOCATION: the callback from useEvent cannot be invoked before the component has mounted.")}e("e",((e,t)=>{const r={},n={};let[s,o]=[0,0],c=0;t.forEach((t=>{if(e.hasNode(t)){const n=t,i=e.getNodeAttributes(n);r[n]=i,s+=i.x,o+=i.y,c++}else if(e.hasEdge(t)){const r=t,[s,o]=e.extremities(r);n[r]={attr:e.getEdgeAttributes(r),source:s,target:o}}}));const i={app:"rmp",version:1,nodesWithAttrs:r,edgesWithAttrs:n,avgX:s/c,avgY:o/c};return JSON.stringify(i)})),e("i",((e,t,r,o,c,i)=>{const{nodesWithAttrs:a,edgesWithAttrs:d,version:f}=JSON.parse(e);if(1!==f)throw Error(`Unrecognized version: ${f}`);const u={};Object.keys(a).filter((e=>t.hasNode(e))).forEach((e=>{const t=n(10);if(e.startsWith("stn_"))u[e]=`stn_${t}`;else{if(!e.startsWith("misc_node_"))throw Error(`Unrecognized node id: ${e}`);u[e]=`misc_node_${t}`}})),Object.keys(d).filter((e=>t.hasEdge(e))).forEach((e=>u[e]=`line_${n(10)}`));const h=Object.entries(u).reduce(((e,[t,r])=>e.replaceAll(t,r)),e),{nodesWithAttrs:l,edgesWithAttrs:g,avgX:E,avgY:b}=JSON.parse(h),O=r?Object.fromEntries(Object.entries(l).filter((([e,t])=>t.type!==s.Master))):l,y=r?Object.fromEntries(Object.entries(g).filter((([e,{source:t,target:r}])=>t in O&&r in O))):g;if(o)for(const n in y)y[n].attr.parallelIndex>=0&&(y[n].attr.parallelIndex=-1);const[j,p]=[c-E,i-b];return Object.entries(O).forEach((([e,r])=>{r.x+=j,r.y+=p,t.addNode(e,r)})),Object.entries(y).forEach((([e,{attr:r,source:n,target:s}])=>t.addDirectedEdgeWithKey(e,n,s,r))),{nodes:new Set(Object.keys(O)),edges:new Set(Object.keys(y))}}))}}})); +System.register(["./react-legacy-CB7hQk4J.js","./index-legacy-jqOeRlnz.js"],(function(e,t){"use strict";var r,n,s;return{setters:[e=>{r=e.b},e=>{n=e.n,s=e.aw}],execute:function(){e("u",(function(e){const n=r.useRef(o);t((()=>{n.current=e}),[e]);const s=r.useRef(null);return s.current||(s.current=function(){return n.current.apply(this,arguments)}),s.current}));const t="undefined"!=typeof window?r.useInsertionEffect||r.useLayoutEffect:()=>{};function o(){throw new Error("INVALID_USEEVENT_INVOCATION: the callback from useEvent cannot be invoked before the component has mounted.")}e("e",((e,t)=>{const r={},n={};let[s,o]=[0,0],c=0;t.forEach((t=>{if(e.hasNode(t)){const n=t,i=e.getNodeAttributes(n);r[n]=i,s+=i.x,o+=i.y,c++}else if(e.hasEdge(t)){const r=t,[s,o]=e.extremities(r);n[r]={attr:e.getEdgeAttributes(r),source:s,target:o}}}));const i={app:"rmp",version:1,nodesWithAttrs:r,edgesWithAttrs:n,avgX:s/c,avgY:o/c};return JSON.stringify(i)})),e("i",((e,t,r,o,c,i)=>{const{nodesWithAttrs:a,edgesWithAttrs:d,version:f}=JSON.parse(e);if(1!==f)throw Error(`Unrecognized version: ${f}`);const u={};Object.keys(a).filter((e=>t.hasNode(e))).forEach((e=>{const t=n(10);if(e.startsWith("stn_"))u[e]=`stn_${t}`;else{if(!e.startsWith("misc_node_"))throw Error(`Unrecognized node id: ${e}`);u[e]=`misc_node_${t}`}})),Object.keys(d).filter((e=>t.hasEdge(e))).forEach((e=>u[e]=`line_${n(10)}`));const h=Object.entries(u).reduce(((e,[t,r])=>e.replaceAll(t,r)),e),{nodesWithAttrs:l,edgesWithAttrs:g,avgX:E,avgY:b}=JSON.parse(h),O=r?Object.fromEntries(Object.entries(l).filter((([e,t])=>t.type!==s.Master))):l,y=r?Object.fromEntries(Object.entries(g).filter((([e,{source:t,target:r}])=>t in O&&r in O))):g;if(o)for(const n in y)y[n].attr.parallelIndex>=0&&(y[n].attr.parallelIndex=-1);const[j,p]=[c-E,i-b];return Object.entries(O).forEach((([e,r])=>{r.x+=j,r.y+=p,t.addNode(e,r)})),Object.entries(y).forEach((([e,{attr:r,source:n,target:s}])=>t.addDirectedEdgeWithKey(e,n,s,r))),{nodes:new Set(Object.keys(O)),edges:new Set(Object.keys(y))}}))}}})); diff --git a/assets/details-DDhluMMM.js b/assets/details-BUdue8Oj.js similarity index 97% rename from assets/details-DDhluMMM.js rename to assets/details-BUdue8Oj.js index 5e4ba0f06..2a33e0034 100644 --- a/assets/details-DDhluMMM.js +++ b/assets/details-BUdue8Oj.js @@ -1 +1 @@ -import{j as e,B as W,aw as O,ax as ie,aK as F,O as N,aM as re,U as le,D as oe,_ as Z,$ as J,a0 as Q,a1 as Y,a3 as ee,a5 as te,a4 as B}from"./chakra-t2DzLzXq.js";import{c as P,d as A,az as ce,T as de,at as ue,aA as pe,t as E,v as w,l as I,ap as z,k as he,o as ge,P as U,aB as H,q as T,$ as me,a0 as xe,i as V,m as ne,y as D,au as X,ay as fe,aC as ye,aD as be,aE as je,aF as Se,aw as we,n as G}from"./index-CgEQ4DK5.js";import{u as L,b as p}from"./react-DmTIgZys.js";import{u as q,e as Ae}from"./clipboard-CUes04zp.js";import{s as $}from"./master-manager-UVzPVFgJ.js";import{C as Ce,c as Ne,a as Ee,b as ve}from"./change-type-modal-DKvpGHTO.js";import{LearnHowToAdd as Te}from"./tools-BJtAFyoe.js";import{m as Pe}from"./misc-nodes-CZ4-M6fq.js";function Le(){const{t}=L(),r=P(),{selected:o}=A(s=>s.runtime),h=p.useRef(window.graph),c=s=>{if(h.current.hasNode(s)){const l=h.current.getNodeAttributes(s),g=l.type;return s.startsWith("stn")?l[g].names.join("/"):g}else if(h.current.hasEdge(s)){const[l,g]=h.current.extremities(s),d=h.current.getSourceAttributes(s),m=h.current.getTargetAttributes(s),f=d.type,u=m.type;return(l.startsWith("stn")?d[f].names[0]:f)+" - "+(g.startsWith("stn")?m[u].names[0]:u)}},[i,n]=p.useState([]);p.useEffect(()=>{n(["station","misc-node","line"])},[o]);const[a,y]=p.useState(!1);return e.jsxs(W,{children:[e.jsxs(O,{as:"h5",size:"sm",children:[t("panel.details.multipleSelection.selected")," ",o.size]}),e.jsxs(ie,{m:"var(--chakra-space-1)",children:[e.jsxs(F,{w:"100%",children:[e.jsx(O,{as:"h5",size:"xs",w:"100%",children:t("panel.details.multipleSelection.show")}),e.jsx(ce,{selections:[{label:t("panel.details.multipleSelection.station"),value:"station"},{label:t("panel.details.multipleSelection.miscNode"),value:"misc-node"},{label:t("panel.details.multipleSelection.edge"),value:"line"}],defaultValue:i,multiSelect:!0,onChange:s=>n(s)})]}),i.length!==0&&e.jsxs(e.Fragment,{children:[e.jsxs(N,{width:"100%",size:"sm",onClick:()=>y(!0),children:[t("panel.details.multipleSelection.change"),e.jsx(re,{label:t("header.settings.pro"),children:e.jsx(le,{ml:"1",color:"gray.50",background:"radial-gradient(circle, #3f5efb, #fc466b)",children:"PRO"})})]}),e.jsx(oe,{})]}),[...o].filter(s=>i.includes("station")||!s.startsWith("stn")).filter(s=>i.includes("misc-node")||!s.startsWith("misc")).filter(s=>i.includes("line")||!s.startsWith("line")).map(s=>{var l;return e.jsxs(F,{width:"100%",children:[e.jsx(N,{width:"100%",size:"sm",variant:"solid",onClick:()=>r(de(new Set([s]))),overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"ruby",children:(l=c(s))==null?void 0:l.replaceAll("\n","⏎")}),e.jsx(N,{size:"sm",onClick:()=>r(ue(s)),children:e.jsx(pe,{})})]},s)})]}),e.jsx(Ce,{isOpen:a,onClose:()=>y(!1),isSelect:!0,filter:i})]})}function Re(){const{t}=L(),r=P(),o=p.useCallback(()=>{r(E()),r(w(a.current.export()))},[r,E,w]),{preference:{autoParallel:h}}=A(j=>j.app),{selected:c,theme:i}=A(j=>j.runtime),[n]=c,a=p.useRef(window.graph),[y,s]=p.useState(!1),l=p.useRef(null),g=Object.fromEntries(Object.entries(I).map(([j,_])=>[j,t(_.metadata.displayName).toString()])),[d,m]=p.useState(a.current.getEdgeAttribute(n,"type")),[f,u]=p.useState(void 0),x=Object.fromEntries(Object.entries(z).map(([j,_])=>[j,t(_.metadata.displayName).toString()])),[b,S]=p.useState(a.current.getEdgeAttribute(n,"style")),[C,v]=p.useState(void 0);p.useEffect(()=>{m(a.current.getEdgeAttribute(n,"type")),S(a.current.getEdgeAttribute(n,"style"))},[n]);const R=Object.values(he).filter(j=>!z[b].metadata.supportLinePathType.includes(j)),k=Object.values(ge).filter(j=>!z[j].metadata.supportLinePathType.includes(d)),se=()=>{f&&(Ne(a.current,n,f,h),m(a.current.getEdgeAttribute(n,"type")),o())},ae=()=>{C&&(Ee(a.current,n,C,i),S(a.current.getEdgeAttribute(n,"style")),o())},M=j=>{j&&(f?(se(),u(void 0)):C&&(ae(),v(void 0))),s(!1)};return e.jsxs(e.Fragment,{children:[e.jsx(U,{label:t("panel.details.info.linePathType"),minW:"276",children:e.jsx(H,{options:g,disabledOptions:R,defaultValue:d,value:d,onChange:({target:{value:j}})=>{u(j),s(!0)}})}),e.jsx(U,{label:t("panel.details.info.lineStyleType"),minW:"276",children:e.jsx(H,{options:x,disabledOptions:k,defaultValue:b,value:b,onChange:({target:{value:j}})=>{v(j),s(!0)}})}),e.jsx(Te,{type:"line",expand:!0}),e.jsx(Z,{isOpen:y,leastDestructiveRef:l,onClose:()=>M(!1),children:e.jsx(J,{children:e.jsxs(Q,{children:[e.jsx(Y,{children:t("warning")}),e.jsx(ee,{children:t("panel.details.changeLineTypeContent")}),e.jsxs(te,{children:[e.jsx(N,{ref:l,onClick:()=>M(!1),children:t("cancel")}),e.jsx(N,{ml:"2",colorScheme:"red",onClick:()=>M(!0),children:t("panel.details.changeType")})]})]})})})]})}function ke(){const{t}=L(),r=P(),o=p.useCallback(()=>{r(T()),r(w(i.current.export()))},[r,T,w]),{selected:h}=A(u=>u.runtime),[c]=h,i=p.useRef(window.graph),[n,a]=p.useState(!1),y=p.useRef(null),[s,l]=p.useState(void 0),g=i.current.getNodeAttribute(c,"type"),d=Object.fromEntries(Object.entries($).map(([u,x])=>[u,t(x.metadata.displayName).toString()])),m=()=>{s&&(ve(i.current,c,s),o())},f=u=>{u&&m(),l(void 0),a(!1)};return e.jsxs(e.Fragment,{children:[e.jsx(U,{label:t("panel.details.info.stationType"),minW:"276",children:e.jsx(H,{options:d,disabledOptions:[g],value:g,onChange:({target:{value:u}})=>{l(u),a(!0)}})}),e.jsx(Z,{isOpen:n,leastDestructiveRef:y,onClose:()=>f(!1),children:e.jsx(J,{children:e.jsxs(Q,{children:[e.jsx(Y,{children:t("warning")}),e.jsx(ee,{children:t("panel.details.changeStationTypeContent")}),e.jsxs(te,{children:[e.jsx(N,{ref:y,onClick:()=>f(!1),children:t("cancel")}),e.jsx(N,{ml:"2",colorScheme:"red",onClick:()=>f(!0),children:t("panel.details.changeType")})]})]})})})]})}function ze(){const{t}=L(),r=P(),o=p.useCallback(()=>{r(T()),r(E()),r(w(a.current.export()))},[r,T,E,w]),{activeSubscriptions:h}=A(d=>d.account),{selected:c,parallelLinesCount:i}=A(d=>d.runtime),[n]=c,a=p.useRef(window.graph),y=d=>{const m=Math.min(Math.max(d,-10),10);a.current.hasNode(n)&&a.current.setNodeAttribute(n,"zIndex",m),a.current.hasEdge(n)&&a.current.setEdgeAttribute(n,"zIndex",m),o()},s=(d,m)=>{let f=-1;if(d){const u=a.current.getEdgeAttributes(n),[x,b]=a.current.extremities(n);f=ne(a.current,u.type,x,b,m)}l(f)},l=d=>{a.current.setEdgeAttribute(n,"parallelIndex",d),r(E()),r(w(a.current.export()))},g=[];if(c.size!==0)if(c.size===1){if(g.push({type:"input",label:t("panel.details.info.id"),value:n,minW:276}),g.push({type:"select",label:t("panel.details.info.zIndex"),value:n?a.current.hasNode(n)?a.current.getNodeAttribute(n,"zIndex"):a.current.hasEdge(n)?a.current.getEdgeAttribute(n,"zIndex"):0:0,options:Object.fromEntries(Array.from({length:21},(d,m)=>[m-10,(m-10).toString()])),onChange:d=>y(Number(d))}),a.current.hasEdge(n)){const d=a.current.getEdgeAttributes(n),m=d.parallelIndex,f=h.RMP_CLOUD?me:xe,u=i>f&&m<0,x=i>f&&m>=0;g.push({type:"switch",label:t("panel.details.info.parallel"),isDisabled:u,isChecked:m>=0,onChange:b=>s(b,d[d.type].startFrom),oneLine:!0,minW:276}),m>=0&&g.push({type:"input",label:t("panel.details.info.parallelIndex"),variant:"number",isDisabled:x,value:d.parallelIndex.toString(),onChange:b=>l(Number(b)),minW:276})}}else c.size>1&&g.push({type:"input",label:t("panel.details.info.type"),value:t("panel.details.multipleSelection.title"),minW:276});return e.jsxs(W,{p:1,children:[e.jsx(O,{as:"h5",size:"sm",children:t("panel.details.info.title")}),e.jsx(V,{fields:g,minW:130}),c.size===1&&n.startsWith("stn")&&a.current.hasNode(n)&&a.current.getNodeAttribute(n,"type")in $&&e.jsx(ke,{}),c.size===1&&n.startsWith("line")&&a.current.hasEdge(n)&&a.current.getEdgeAttribute(n,"type")in I&&a.current.getEdgeAttribute(n,"style")in z&&e.jsx(Re,{}),c.size>1&&e.jsx(Le,{})]})}function Oe(){const{t}=L(),r=P(),{selected:o}=A(x=>x.runtime),[h]=o,c=p.useRef(window.graph),[i,n]=p.useState("undefined"),[a,y]=p.useState("undefined"),[s,l]=p.useState("undefined"),[g,d]=p.useState("undefined");p.useEffect(()=>{var x,b,S,C;if(h!=null&&h.startsWith("line")){const[v,R]=c.current.extremities(h);if(n(v),y(R),v.startsWith("stn")){const k=c.current.getNodeAttribute(v,"type");l((b=(x=c.current.getNodeAttribute(v,k))==null?void 0:x.names.at(0))!=null?b:"undefined")}if(R.startsWith("stn")){const k=c.current.getNodeAttribute(R,"type");d((C=(S=c.current.getNodeAttribute(R,k))==null?void 0:S.names.at(0))!=null?C:"undefined")}}},[o]);const m=q(()=>{r(D()),r(X(i))}),f=q(()=>{r(D()),r(X(a))}),u=[{type:"custom",label:t("panel.details.lineExtremities.source"),component:e.jsx(N,{ml:"auto",size:"sm",variant:"link",onClick:m,children:i}),oneLine:!0,minW:"full"},{type:"input",label:t("panel.details.lineExtremities.sourceName"),value:s,minW:"full"},{type:"custom",label:t("panel.details.lineExtremities.target"),component:e.jsx(N,{ml:"auto",size:"sm",variant:"link",onClick:f,children:a}),oneLine:!0,minW:"full"},{type:"input",label:t("panel.details.lineExtremities.targetName"),value:g,minW:"full"}];return e.jsxs(W,{p:1,children:[e.jsx(O,{as:"h5",size:"sm",children:t("panel.details.lineExtremities.title")}),e.jsx(V,{fields:u,minW:130})]})}function We(){const{t}=L(),r=P(),o=p.useCallback(()=>{r(T()),r(E()),r(w(n.current.export()))},[r,T,E,w]),{selected:h,refresh:{nodes:c}}=A(l=>l.runtime),[i]=h,n=p.useRef(window.graph),[a,y]=p.useState({x:0,y:0});p.useEffect(()=>{if(i!=null&&i.startsWith("stn")||i!=null&&i.startsWith("misc_node_")){const l=n.current.getNodeAttribute(i,"x"),g=n.current.getNodeAttribute(i,"y");y({x:l,y:g})}},[c,h]);const s=[{type:"input",label:t("panel.details.nodePosition.pos.x"),value:a.x.toString(),validator:l=>!Number.isNaN(l),onChange:l=>{n.current.mergeNodeAttributes(i,{x:Number(l)}),o()}},{type:"input",label:t("panel.details.nodePosition.pos.y"),value:a.y.toString(),validator:l=>!Number.isNaN(l),onChange:l=>{n.current.mergeNodeAttributes(i,{y:Number(l)}),o()}}];return e.jsxs(W,{p:1,children:[e.jsx(O,{as:"h5",size:"sm",children:t("panel.details.nodePosition.title")}),e.jsx(V,{fields:s,minW:130})]})}const K={...$,...Pe},Ie=()=>{var y;const t=P(),{selected:r}=A(s=>s.runtime),{t:o}=L(),[h]=r,c=window.graph.getNodeAttribute(h,"type"),i=c in K&&K[c].attrsComponent,n=(y=window.graph.getNodeAttribute(h,c))!=null?y:{},a=(s,l)=>{const g=window.graph.getNodeAttribute(s,"type");window.graph.mergeNodeAttributes(s,{[g]:l}),t(T()),t(w(window.graph.export()))};return i?e.jsx(i,{id:h,attrs:n,handleAttrsUpdate:a}):e.jsx(B,{fontSize:"xs",m:"var(--chakra-space-1)",children:o("panel.details.unknown.error",{category:o("panel.details.unknown.node")})})},De=()=>{var x,b;const t=P(),{preference:{autoParallel:r}}=A(S=>S.app),{selected:o}=A(S=>S.runtime),{t:h}=L(),[c]=o,{type:i,style:n,parallelIndex:a,reconcileId:y}=window.graph.getEdgeAttributes(c),s=(x=window.graph.getEdgeAttribute(c,i))!=null?x:{},l=i in I&&I[i].attrsComponent,g=(b=window.graph.getEdgeAttribute(c,n))!=null?b:{},d=n in z&&z[n].attrsComponent,m=(S,C)=>{let v=-1;if(r){const[R,k]=window.graph.extremities(S);v=ne(window.graph,i,R,k,C)}window.graph.setEdgeAttribute(S,"parallelIndex",v)},f=(S,C)=>{window.graph.mergeEdgeAttributes(S,{[i]:C}),t(E()),t(w(window.graph.export()))},u=(S,C)=>{window.graph.mergeEdgeAttributes(S,{[n]:C}),t(E()),t(w(window.graph.export()))};return e.jsxs(e.Fragment,{children:[l?e.jsx(l,{id:c,attrs:s,recalculateParallelIndex:m,handleAttrsUpdate:f,parallelIndex:a}):e.jsx(B,{fontSize:"xs",m:"var(--chakra-space-1)",children:h("panel.details.unknown.error",{category:h("panel.details.unknown.linePath")})}),d?e.jsx(d,{id:c,attrs:g,handleAttrsUpdate:u,reconcileId:y}):e.jsx(B,{fontSize:"xs",m:"var(--chakra-space-1)",children:h("panel.details.unknown.error",{category:h("panel.details.unknown.lineStyle")})})]})},Xe=()=>{const{t}=L(),r=P(),o=p.useRef(window.graph),h=p.useCallback(()=>{r(T()),r(E()),r(w(o.current.export()))},[r,T,E,w]),{activeSubscriptions:c}=A(u=>u.account),{selected:i,mode:n,active:a,masterNodesCount:y}=A(u=>u.runtime),[s]=i,l=!c.RMP_CLOUD&&y+1>fe,g=()=>r(D()),d=u=>{const x=structuredClone(o.current.getNodeAttributes(u));x.x+=50,x.y+=50;const b=u.startsWith("stn")?"stn_".concat(G(10)):"misc_node_".concat(G(10));o.current.addNode(b,x),r(T()),r(w(o.current.export()))},m=u=>{const x=Ae(o.current,u);navigator.clipboard.writeText(x)},f=u=>{r(D()),u.forEach(x=>{o.current.hasNode(x)?o.current.dropNode(x):o.current.hasEdge(x)&&o.current.dropEdge(x)}),h()};return e.jsxs(ye,{isOpen:i.size>0&&!n.startsWith("line")&&!a,width:300,header:"Dummy header",alwaysOverlay:!0,children:[e.jsx(be,{onClose:g,children:t("panel.details.header")}),e.jsxs(je,{children:[e.jsx(ze,{}),i.size===1&&o.current.hasNode(s)&&e.jsx(We,{}),i.size===1&&o.current.hasEdge(s)&&e.jsx(Oe,{}),i.size===1&&e.jsxs(W,{p:1,children:[e.jsx(O,{as:"h5",size:"sm",children:t("panel.details.specificAttrsTitle")}),window.graph.hasNode(s)&&e.jsx(Ie,{}),window.graph.hasEdge(s)&&e.jsx(De,{})]})]}),e.jsx(Se,{children:e.jsxs(F,{children:[i.size===1&&o.current.hasNode(s)&&e.jsx(N,{size:"sm",variant:"outline",onClick:()=>d(s),isDisabled:o.current.getNodeAttributes(s).type===we.Master&&l,children:t("panel.details.footer.duplicate")}),e.jsx(N,{size:"sm",variant:"outline",onClick:()=>m(i),children:t("panel.details.footer.copy")}),e.jsx(N,{size:"sm",variant:"outline",onClick:()=>f(i),children:t("panel.details.footer.remove")})]})})]})};export{Xe as default}; +import{j as e,B as W,aw as O,ax as ie,aK as F,O as N,aM as re,U as le,D as oe,_ as Z,$ as J,a0 as Q,a1 as Y,a3 as ee,a5 as te,a4 as B}from"./chakra-t2DzLzXq.js";import{c as P,d as A,az as ce,T as de,at as ue,aA as pe,t as E,v as w,l as I,ap as z,k as he,o as ge,P as U,aB as H,q as T,$ as me,a0 as xe,i as V,m as ne,y as D,au as X,ay as fe,aC as ye,aD as be,aE as je,aF as Se,aw as we,n as G}from"./index-DRWG9Ar1.js";import{u as L,b as p}from"./react-DmTIgZys.js";import{u as q,e as Ae}from"./clipboard-DPvCegxP.js";import{s as $}from"./master-manager-DlQmLEpO.js";import{C as Ce,c as Ne,a as Ee,b as ve}from"./change-type-modal-CfyQxI5Y.js";import{LearnHowToAdd as Te}from"./tools-CgHBlRFk.js";import{m as Pe}from"./misc-nodes-DMfi7tU1.js";function Le(){const{t}=L(),r=P(),{selected:o}=A(s=>s.runtime),h=p.useRef(window.graph),c=s=>{if(h.current.hasNode(s)){const l=h.current.getNodeAttributes(s),g=l.type;return s.startsWith("stn")?l[g].names.join("/"):g}else if(h.current.hasEdge(s)){const[l,g]=h.current.extremities(s),d=h.current.getSourceAttributes(s),m=h.current.getTargetAttributes(s),f=d.type,u=m.type;return(l.startsWith("stn")?d[f].names[0]:f)+" - "+(g.startsWith("stn")?m[u].names[0]:u)}},[i,n]=p.useState([]);p.useEffect(()=>{n(["station","misc-node","line"])},[o]);const[a,y]=p.useState(!1);return e.jsxs(W,{children:[e.jsxs(O,{as:"h5",size:"sm",children:[t("panel.details.multipleSelection.selected")," ",o.size]}),e.jsxs(ie,{m:"var(--chakra-space-1)",children:[e.jsxs(F,{w:"100%",children:[e.jsx(O,{as:"h5",size:"xs",w:"100%",children:t("panel.details.multipleSelection.show")}),e.jsx(ce,{selections:[{label:t("panel.details.multipleSelection.station"),value:"station"},{label:t("panel.details.multipleSelection.miscNode"),value:"misc-node"},{label:t("panel.details.multipleSelection.edge"),value:"line"}],defaultValue:i,multiSelect:!0,onChange:s=>n(s)})]}),i.length!==0&&e.jsxs(e.Fragment,{children:[e.jsxs(N,{width:"100%",size:"sm",onClick:()=>y(!0),children:[t("panel.details.multipleSelection.change"),e.jsx(re,{label:t("header.settings.pro"),children:e.jsx(le,{ml:"1",color:"gray.50",background:"radial-gradient(circle, #3f5efb, #fc466b)",children:"PRO"})})]}),e.jsx(oe,{})]}),[...o].filter(s=>i.includes("station")||!s.startsWith("stn")).filter(s=>i.includes("misc-node")||!s.startsWith("misc")).filter(s=>i.includes("line")||!s.startsWith("line")).map(s=>{var l;return e.jsxs(F,{width:"100%",children:[e.jsx(N,{width:"100%",size:"sm",variant:"solid",onClick:()=>r(de(new Set([s]))),overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"ruby",children:(l=c(s))==null?void 0:l.replaceAll("\n","⏎")}),e.jsx(N,{size:"sm",onClick:()=>r(ue(s)),children:e.jsx(pe,{})})]},s)})]}),e.jsx(Ce,{isOpen:a,onClose:()=>y(!1),isSelect:!0,filter:i})]})}function Re(){const{t}=L(),r=P(),o=p.useCallback(()=>{r(E()),r(w(a.current.export()))},[r,E,w]),{preference:{autoParallel:h}}=A(j=>j.app),{selected:c,theme:i}=A(j=>j.runtime),[n]=c,a=p.useRef(window.graph),[y,s]=p.useState(!1),l=p.useRef(null),g=Object.fromEntries(Object.entries(I).map(([j,_])=>[j,t(_.metadata.displayName).toString()])),[d,m]=p.useState(a.current.getEdgeAttribute(n,"type")),[f,u]=p.useState(void 0),x=Object.fromEntries(Object.entries(z).map(([j,_])=>[j,t(_.metadata.displayName).toString()])),[b,S]=p.useState(a.current.getEdgeAttribute(n,"style")),[C,v]=p.useState(void 0);p.useEffect(()=>{m(a.current.getEdgeAttribute(n,"type")),S(a.current.getEdgeAttribute(n,"style"))},[n]);const R=Object.values(he).filter(j=>!z[b].metadata.supportLinePathType.includes(j)),k=Object.values(ge).filter(j=>!z[j].metadata.supportLinePathType.includes(d)),se=()=>{f&&(Ne(a.current,n,f,h),m(a.current.getEdgeAttribute(n,"type")),o())},ae=()=>{C&&(Ee(a.current,n,C,i),S(a.current.getEdgeAttribute(n,"style")),o())},M=j=>{j&&(f?(se(),u(void 0)):C&&(ae(),v(void 0))),s(!1)};return e.jsxs(e.Fragment,{children:[e.jsx(U,{label:t("panel.details.info.linePathType"),minW:"276",children:e.jsx(H,{options:g,disabledOptions:R,defaultValue:d,value:d,onChange:({target:{value:j}})=>{u(j),s(!0)}})}),e.jsx(U,{label:t("panel.details.info.lineStyleType"),minW:"276",children:e.jsx(H,{options:x,disabledOptions:k,defaultValue:b,value:b,onChange:({target:{value:j}})=>{v(j),s(!0)}})}),e.jsx(Te,{type:"line",expand:!0}),e.jsx(Z,{isOpen:y,leastDestructiveRef:l,onClose:()=>M(!1),children:e.jsx(J,{children:e.jsxs(Q,{children:[e.jsx(Y,{children:t("warning")}),e.jsx(ee,{children:t("panel.details.changeLineTypeContent")}),e.jsxs(te,{children:[e.jsx(N,{ref:l,onClick:()=>M(!1),children:t("cancel")}),e.jsx(N,{ml:"2",colorScheme:"red",onClick:()=>M(!0),children:t("panel.details.changeType")})]})]})})})]})}function ke(){const{t}=L(),r=P(),o=p.useCallback(()=>{r(T()),r(w(i.current.export()))},[r,T,w]),{selected:h}=A(u=>u.runtime),[c]=h,i=p.useRef(window.graph),[n,a]=p.useState(!1),y=p.useRef(null),[s,l]=p.useState(void 0),g=i.current.getNodeAttribute(c,"type"),d=Object.fromEntries(Object.entries($).map(([u,x])=>[u,t(x.metadata.displayName).toString()])),m=()=>{s&&(ve(i.current,c,s),o())},f=u=>{u&&m(),l(void 0),a(!1)};return e.jsxs(e.Fragment,{children:[e.jsx(U,{label:t("panel.details.info.stationType"),minW:"276",children:e.jsx(H,{options:d,disabledOptions:[g],value:g,onChange:({target:{value:u}})=>{l(u),a(!0)}})}),e.jsx(Z,{isOpen:n,leastDestructiveRef:y,onClose:()=>f(!1),children:e.jsx(J,{children:e.jsxs(Q,{children:[e.jsx(Y,{children:t("warning")}),e.jsx(ee,{children:t("panel.details.changeStationTypeContent")}),e.jsxs(te,{children:[e.jsx(N,{ref:y,onClick:()=>f(!1),children:t("cancel")}),e.jsx(N,{ml:"2",colorScheme:"red",onClick:()=>f(!0),children:t("panel.details.changeType")})]})]})})})]})}function ze(){const{t}=L(),r=P(),o=p.useCallback(()=>{r(T()),r(E()),r(w(a.current.export()))},[r,T,E,w]),{activeSubscriptions:h}=A(d=>d.account),{selected:c,parallelLinesCount:i}=A(d=>d.runtime),[n]=c,a=p.useRef(window.graph),y=d=>{const m=Math.min(Math.max(d,-10),10);a.current.hasNode(n)&&a.current.setNodeAttribute(n,"zIndex",m),a.current.hasEdge(n)&&a.current.setEdgeAttribute(n,"zIndex",m),o()},s=(d,m)=>{let f=-1;if(d){const u=a.current.getEdgeAttributes(n),[x,b]=a.current.extremities(n);f=ne(a.current,u.type,x,b,m)}l(f)},l=d=>{a.current.setEdgeAttribute(n,"parallelIndex",d),r(E()),r(w(a.current.export()))},g=[];if(c.size!==0)if(c.size===1){if(g.push({type:"input",label:t("panel.details.info.id"),value:n,minW:276}),g.push({type:"select",label:t("panel.details.info.zIndex"),value:n?a.current.hasNode(n)?a.current.getNodeAttribute(n,"zIndex"):a.current.hasEdge(n)?a.current.getEdgeAttribute(n,"zIndex"):0:0,options:Object.fromEntries(Array.from({length:21},(d,m)=>[m-10,(m-10).toString()])),onChange:d=>y(Number(d))}),a.current.hasEdge(n)){const d=a.current.getEdgeAttributes(n),m=d.parallelIndex,f=h.RMP_CLOUD?me:xe,u=i>f&&m<0,x=i>f&&m>=0;g.push({type:"switch",label:t("panel.details.info.parallel"),isDisabled:u,isChecked:m>=0,onChange:b=>s(b,d[d.type].startFrom),oneLine:!0,minW:276}),m>=0&&g.push({type:"input",label:t("panel.details.info.parallelIndex"),variant:"number",isDisabled:x,value:d.parallelIndex.toString(),onChange:b=>l(Number(b)),minW:276})}}else c.size>1&&g.push({type:"input",label:t("panel.details.info.type"),value:t("panel.details.multipleSelection.title"),minW:276});return e.jsxs(W,{p:1,children:[e.jsx(O,{as:"h5",size:"sm",children:t("panel.details.info.title")}),e.jsx(V,{fields:g,minW:130}),c.size===1&&n.startsWith("stn")&&a.current.hasNode(n)&&a.current.getNodeAttribute(n,"type")in $&&e.jsx(ke,{}),c.size===1&&n.startsWith("line")&&a.current.hasEdge(n)&&a.current.getEdgeAttribute(n,"type")in I&&a.current.getEdgeAttribute(n,"style")in z&&e.jsx(Re,{}),c.size>1&&e.jsx(Le,{})]})}function Oe(){const{t}=L(),r=P(),{selected:o}=A(x=>x.runtime),[h]=o,c=p.useRef(window.graph),[i,n]=p.useState("undefined"),[a,y]=p.useState("undefined"),[s,l]=p.useState("undefined"),[g,d]=p.useState("undefined");p.useEffect(()=>{var x,b,S,C;if(h!=null&&h.startsWith("line")){const[v,R]=c.current.extremities(h);if(n(v),y(R),v.startsWith("stn")){const k=c.current.getNodeAttribute(v,"type");l((b=(x=c.current.getNodeAttribute(v,k))==null?void 0:x.names.at(0))!=null?b:"undefined")}if(R.startsWith("stn")){const k=c.current.getNodeAttribute(R,"type");d((C=(S=c.current.getNodeAttribute(R,k))==null?void 0:S.names.at(0))!=null?C:"undefined")}}},[o]);const m=q(()=>{r(D()),r(X(i))}),f=q(()=>{r(D()),r(X(a))}),u=[{type:"custom",label:t("panel.details.lineExtremities.source"),component:e.jsx(N,{ml:"auto",size:"sm",variant:"link",onClick:m,children:i}),oneLine:!0,minW:"full"},{type:"input",label:t("panel.details.lineExtremities.sourceName"),value:s,minW:"full"},{type:"custom",label:t("panel.details.lineExtremities.target"),component:e.jsx(N,{ml:"auto",size:"sm",variant:"link",onClick:f,children:a}),oneLine:!0,minW:"full"},{type:"input",label:t("panel.details.lineExtremities.targetName"),value:g,minW:"full"}];return e.jsxs(W,{p:1,children:[e.jsx(O,{as:"h5",size:"sm",children:t("panel.details.lineExtremities.title")}),e.jsx(V,{fields:u,minW:130})]})}function We(){const{t}=L(),r=P(),o=p.useCallback(()=>{r(T()),r(E()),r(w(n.current.export()))},[r,T,E,w]),{selected:h,refresh:{nodes:c}}=A(l=>l.runtime),[i]=h,n=p.useRef(window.graph),[a,y]=p.useState({x:0,y:0});p.useEffect(()=>{if(i!=null&&i.startsWith("stn")||i!=null&&i.startsWith("misc_node_")){const l=n.current.getNodeAttribute(i,"x"),g=n.current.getNodeAttribute(i,"y");y({x:l,y:g})}},[c,h]);const s=[{type:"input",label:t("panel.details.nodePosition.pos.x"),value:a.x.toString(),validator:l=>!Number.isNaN(l),onChange:l=>{n.current.mergeNodeAttributes(i,{x:Number(l)}),o()}},{type:"input",label:t("panel.details.nodePosition.pos.y"),value:a.y.toString(),validator:l=>!Number.isNaN(l),onChange:l=>{n.current.mergeNodeAttributes(i,{y:Number(l)}),o()}}];return e.jsxs(W,{p:1,children:[e.jsx(O,{as:"h5",size:"sm",children:t("panel.details.nodePosition.title")}),e.jsx(V,{fields:s,minW:130})]})}const K={...$,...Pe},Ie=()=>{var y;const t=P(),{selected:r}=A(s=>s.runtime),{t:o}=L(),[h]=r,c=window.graph.getNodeAttribute(h,"type"),i=c in K&&K[c].attrsComponent,n=(y=window.graph.getNodeAttribute(h,c))!=null?y:{},a=(s,l)=>{const g=window.graph.getNodeAttribute(s,"type");window.graph.mergeNodeAttributes(s,{[g]:l}),t(T()),t(w(window.graph.export()))};return i?e.jsx(i,{id:h,attrs:n,handleAttrsUpdate:a}):e.jsx(B,{fontSize:"xs",m:"var(--chakra-space-1)",children:o("panel.details.unknown.error",{category:o("panel.details.unknown.node")})})},De=()=>{var x,b;const t=P(),{preference:{autoParallel:r}}=A(S=>S.app),{selected:o}=A(S=>S.runtime),{t:h}=L(),[c]=o,{type:i,style:n,parallelIndex:a,reconcileId:y}=window.graph.getEdgeAttributes(c),s=(x=window.graph.getEdgeAttribute(c,i))!=null?x:{},l=i in I&&I[i].attrsComponent,g=(b=window.graph.getEdgeAttribute(c,n))!=null?b:{},d=n in z&&z[n].attrsComponent,m=(S,C)=>{let v=-1;if(r){const[R,k]=window.graph.extremities(S);v=ne(window.graph,i,R,k,C)}window.graph.setEdgeAttribute(S,"parallelIndex",v)},f=(S,C)=>{window.graph.mergeEdgeAttributes(S,{[i]:C}),t(E()),t(w(window.graph.export()))},u=(S,C)=>{window.graph.mergeEdgeAttributes(S,{[n]:C}),t(E()),t(w(window.graph.export()))};return e.jsxs(e.Fragment,{children:[l?e.jsx(l,{id:c,attrs:s,recalculateParallelIndex:m,handleAttrsUpdate:f,parallelIndex:a}):e.jsx(B,{fontSize:"xs",m:"var(--chakra-space-1)",children:h("panel.details.unknown.error",{category:h("panel.details.unknown.linePath")})}),d?e.jsx(d,{id:c,attrs:g,handleAttrsUpdate:u,reconcileId:y}):e.jsx(B,{fontSize:"xs",m:"var(--chakra-space-1)",children:h("panel.details.unknown.error",{category:h("panel.details.unknown.lineStyle")})})]})},Xe=()=>{const{t}=L(),r=P(),o=p.useRef(window.graph),h=p.useCallback(()=>{r(T()),r(E()),r(w(o.current.export()))},[r,T,E,w]),{activeSubscriptions:c}=A(u=>u.account),{selected:i,mode:n,active:a,masterNodesCount:y}=A(u=>u.runtime),[s]=i,l=!c.RMP_CLOUD&&y+1>fe,g=()=>r(D()),d=u=>{const x=structuredClone(o.current.getNodeAttributes(u));x.x+=50,x.y+=50;const b=u.startsWith("stn")?"stn_".concat(G(10)):"misc_node_".concat(G(10));o.current.addNode(b,x),r(T()),r(w(o.current.export()))},m=u=>{const x=Ae(o.current,u);navigator.clipboard.writeText(x)},f=u=>{r(D()),u.forEach(x=>{o.current.hasNode(x)?o.current.dropNode(x):o.current.hasEdge(x)&&o.current.dropEdge(x)}),h()};return e.jsxs(ye,{isOpen:i.size>0&&!n.startsWith("line")&&!a,width:300,header:"Dummy header",alwaysOverlay:!0,children:[e.jsx(be,{onClose:g,children:t("panel.details.header")}),e.jsxs(je,{children:[e.jsx(ze,{}),i.size===1&&o.current.hasNode(s)&&e.jsx(We,{}),i.size===1&&o.current.hasEdge(s)&&e.jsx(Oe,{}),i.size===1&&e.jsxs(W,{p:1,children:[e.jsx(O,{as:"h5",size:"sm",children:t("panel.details.specificAttrsTitle")}),window.graph.hasNode(s)&&e.jsx(Ie,{}),window.graph.hasEdge(s)&&e.jsx(De,{})]})]}),e.jsx(Se,{children:e.jsxs(F,{children:[i.size===1&&o.current.hasNode(s)&&e.jsx(N,{size:"sm",variant:"outline",onClick:()=>d(s),isDisabled:o.current.getNodeAttributes(s).type===we.Master&&l,children:t("panel.details.footer.duplicate")}),e.jsx(N,{size:"sm",variant:"outline",onClick:()=>m(i),children:t("panel.details.footer.copy")}),e.jsx(N,{size:"sm",variant:"outline",onClick:()=>f(i),children:t("panel.details.footer.remove")})]})})]})};export{Xe as default}; diff --git a/assets/details-legacy-0ouXuw75.js b/assets/details-legacy-D1O4j9nR.js similarity index 97% rename from assets/details-legacy-0ouXuw75.js rename to assets/details-legacy-D1O4j9nR.js index 532bebac4..db3e35a23 100644 --- a/assets/details-legacy-0ouXuw75.js +++ b/assets/details-legacy-D1O4j9nR.js @@ -1 +1 @@ -System.register(["./chakra-legacy--ElhKRU8.js","./index-legacy-iSkJTZGA.js","./react-legacy-CB7hQk4J.js","./clipboard-legacy-D46oyBay.js","./master-manager-legacy-BrdnNHXw.js","./change-type-modal-legacy-BWY8KDxU.js","./tools-legacy-Dm25lVuJ.js","./misc-nodes-legacy-CSfzn9IA.js"],(function(e,t){"use strict";var n,i,r,s,a,l,d,o,c,u,p,h,g,m,x,b,j,f,y,w,v,A,N,S,C,E,z,k,W,O,I,P,R,T,D,L,_,F,M,U,$,V,B,q,H,K,G,J,Q,X,Y,Z,ee,te,ne;return{setters:[e=>{n=e.j,i=e.B,r=e.aw,s=e.ax,a=e.aK,l=e.O,d=e.aM,o=e.U,c=e.D,u=e._,p=e.$,h=e.a0,g=e.a1,m=e.a3,x=e.a5,b=e.a4},e=>{j=e.c,f=e.d,y=e.az,w=e.T,v=e.at,A=e.aA,N=e.t,S=e.v,C=e.l,E=e.ap,z=e.k,k=e.o,W=e.P,O=e.aB,I=e.q,P=e.$,R=e.a0,T=e.i,D=e.m,L=e.y,_=e.au,F=e.ay,M=e.aC,U=e.aD,$=e.aE,V=e.aF,B=e.aw,q=e.n},e=>{H=e.u,K=e.b},e=>{G=e.u,J=e.e},e=>{Q=e.s},e=>{X=e.C,Y=e.c,Z=e.a,ee=e.b},e=>{te=e.LearnHowToAdd},e=>{ne=e.m}],execute:function(){function t(){const{t:e}=H(),t=j(),{selected:u}=f((e=>e.runtime)),p=K.useRef(window.graph),h=e=>{if(p.current.hasNode(e)){const t=p.current.getNodeAttributes(e),n=t.type;return e.startsWith("stn")?t[n].names.join("/"):n}if(p.current.hasEdge(e)){const[t,n]=p.current.extremities(e),i=p.current.getSourceAttributes(e),r=p.current.getTargetAttributes(e),s=i.type,a=r.type;return(t.startsWith("stn")?i[s].names[0]:s)+" - "+(n.startsWith("stn")?r[a].names[0]:a)}},[g,m]=K.useState([]);K.useEffect((()=>{m(["station","misc-node","line"])}),[u]);const[x,b]=K.useState(!1);return n.jsxs(i,{children:[n.jsxs(r,{as:"h5",size:"sm",children:[e("panel.details.multipleSelection.selected")," ",u.size]}),n.jsxs(s,{m:"var(--chakra-space-1)",children:[n.jsxs(a,{w:"100%",children:[n.jsx(r,{as:"h5",size:"xs",w:"100%",children:e("panel.details.multipleSelection.show")}),n.jsx(y,{selections:[{label:e("panel.details.multipleSelection.station"),value:"station"},{label:e("panel.details.multipleSelection.miscNode"),value:"misc-node"},{label:e("panel.details.multipleSelection.edge"),value:"line"}],defaultValue:g,multiSelect:!0,onChange:e=>m(e)})]}),0!==g.length&&n.jsxs(n.Fragment,{children:[n.jsxs(l,{width:"100%",size:"sm",onClick:()=>b(!0),children:[e("panel.details.multipleSelection.change"),n.jsx(d,{label:e("header.settings.pro"),children:n.jsx(o,{ml:"1",color:"gray.50",background:"radial-gradient(circle, #3f5efb, #fc466b)",children:"PRO"})})]}),n.jsx(c,{})]}),[...u].filter((e=>g.includes("station")||!e.startsWith("stn"))).filter((e=>g.includes("misc-node")||!e.startsWith("misc"))).filter((e=>g.includes("line")||!e.startsWith("line"))).map((e=>{var i;return n.jsxs(a,{width:"100%",children:[n.jsx(l,{width:"100%",size:"sm",variant:"solid",onClick:()=>t(w(new Set([e]))),overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"ruby",children:null===(i=h(e))||void 0===i?void 0:i.replaceAll("\n","⏎")}),n.jsx(l,{size:"sm",onClick:()=>t(v(e)),children:n.jsx(A,{})})]},e)}))]}),n.jsx(X,{isOpen:x,onClose:()=>b(!1),isSelect:!0,filter:g})]})}function ie(){const{t:e}=H(),t=j(),i=K.useCallback((()=>{t(N()),t(S(o.current.export()))}),[t,N,S]),{preference:{autoParallel:r}}=f((e=>e.app)),{selected:s,theme:a}=f((e=>e.runtime)),[d]=s,o=K.useRef(window.graph),[c,b]=K.useState(!1),y=K.useRef(null),w=Object.fromEntries(Object.entries(C).map((([t,n])=>[t,e(n.metadata.displayName).toString()]))),[v,A]=K.useState(o.current.getEdgeAttribute(d,"type")),[I,P]=K.useState(void 0),R=Object.fromEntries(Object.entries(E).map((([t,n])=>[t,e(n.metadata.displayName).toString()]))),[T,D]=K.useState(o.current.getEdgeAttribute(d,"style")),[L,_]=K.useState(void 0);K.useEffect((()=>{A(o.current.getEdgeAttribute(d,"type")),D(o.current.getEdgeAttribute(d,"style"))}),[d]);const F=Object.values(z).filter((e=>!E[T].metadata.supportLinePathType.includes(e))),M=Object.values(k).filter((e=>!E[e].metadata.supportLinePathType.includes(v))),U=e=>{e&&(I?(I&&(Y(o.current,d,I,r),A(o.current.getEdgeAttribute(d,"type")),i()),P(void 0)):L&&(L&&(Z(o.current,d,L,a),D(o.current.getEdgeAttribute(d,"style")),i()),_(void 0))),b(!1)};return n.jsxs(n.Fragment,{children:[n.jsx(W,{label:e("panel.details.info.linePathType"),minW:"276",children:n.jsx(O,{options:w,disabledOptions:F,defaultValue:v,value:v,onChange:({target:{value:e}})=>{P(e),b(!0)}})}),n.jsx(W,{label:e("panel.details.info.lineStyleType"),minW:"276",children:n.jsx(O,{options:R,disabledOptions:M,defaultValue:T,value:T,onChange:({target:{value:e}})=>{_(e),b(!0)}})}),n.jsx(te,{type:"line",expand:!0}),n.jsx(u,{isOpen:c,leastDestructiveRef:y,onClose:()=>U(!1),children:n.jsx(p,{children:n.jsxs(h,{children:[n.jsx(g,{children:e("warning")}),n.jsx(m,{children:e("panel.details.changeLineTypeContent")}),n.jsxs(x,{children:[n.jsx(l,{ref:y,onClick:()=>U(!1),children:e("cancel")}),n.jsx(l,{ml:"2",colorScheme:"red",onClick:()=>U(!0),children:e("panel.details.changeType")})]})]})})})]})}function re(){const{t:e}=H(),t=j(),i=K.useCallback((()=>{t(I()),t(S(a.current.export()))}),[t,I,S]),{selected:r}=f((e=>e.runtime)),[s]=r,a=K.useRef(window.graph),[d,o]=K.useState(!1),c=K.useRef(null),[b,y]=K.useState(void 0),w=a.current.getNodeAttribute(s,"type"),v=Object.fromEntries(Object.entries(Q).map((([t,n])=>[t,e(n.metadata.displayName).toString()]))),A=e=>{e&&b&&(ee(a.current,s,b),i()),y(void 0),o(!1)};return n.jsxs(n.Fragment,{children:[n.jsx(W,{label:e("panel.details.info.stationType"),minW:"276",children:n.jsx(O,{options:v,disabledOptions:[w],value:w,onChange:({target:{value:e}})=>{y(e),o(!0)}})}),n.jsx(u,{isOpen:d,leastDestructiveRef:c,onClose:()=>A(!1),children:n.jsx(p,{children:n.jsxs(h,{children:[n.jsx(g,{children:e("warning")}),n.jsx(m,{children:e("panel.details.changeStationTypeContent")}),n.jsxs(x,{children:[n.jsx(l,{ref:c,onClick:()=>A(!1),children:e("cancel")}),n.jsx(l,{ml:"2",colorScheme:"red",onClick:()=>A(!0),children:e("panel.details.changeType")})]})]})})})]})}function se(){const{t:e}=H(),s=j(),a=K.useCallback((()=>{s(I()),s(N()),s(S(u.current.export()))}),[s,I,N,S]),{activeSubscriptions:l}=f((e=>e.account)),{selected:d,parallelLinesCount:o}=f((e=>e.runtime)),[c]=d,u=K.useRef(window.graph),p=e=>{u.current.setEdgeAttribute(c,"parallelIndex",e),s(N()),s(S(u.current.export()))},h=[];if(0===d.size);else if(1===d.size){if(h.push({type:"input",label:e("panel.details.info.id"),value:c,minW:276}),h.push({type:"select",label:e("panel.details.info.zIndex"),value:c?u.current.hasNode(c)?u.current.getNodeAttribute(c,"zIndex"):u.current.hasEdge(c)?u.current.getEdgeAttribute(c,"zIndex"):0:0,options:Object.fromEntries(Array.from({length:21},((e,t)=>[t-10,(t-10).toString()]))),onChange:e=>(e=>{const t=Math.min(Math.max(e,-10),10);u.current.hasNode(c)&&u.current.setNodeAttribute(c,"zIndex",t),u.current.hasEdge(c)&&u.current.setEdgeAttribute(c,"zIndex",t),a()})(Number(e))}),u.current.hasEdge(c)){const t=u.current.getEdgeAttributes(c),n=t.parallelIndex,i=l.RMP_CLOUD?P:R,r=o>i&&n<0,s=o>i&&n>=0;h.push({type:"switch",label:e("panel.details.info.parallel"),isDisabled:r,isChecked:n>=0,onChange:e=>((e,t)=>{let n=-1;if(e){const e=u.current.getEdgeAttributes(c),[i,r]=u.current.extremities(c);n=D(u.current,e.type,i,r,t)}p(n)})(e,t[t.type].startFrom),oneLine:!0,minW:276}),n>=0&&h.push({type:"input",label:e("panel.details.info.parallelIndex"),variant:"number",isDisabled:s,value:t.parallelIndex.toString(),onChange:e=>p(Number(e)),minW:276})}}else d.size>1&&h.push({type:"input",label:e("panel.details.info.type"),value:e("panel.details.multipleSelection.title"),minW:276});return n.jsxs(i,{p:1,children:[n.jsx(r,{as:"h5",size:"sm",children:e("panel.details.info.title")}),n.jsx(T,{fields:h,minW:130}),1===d.size&&c.startsWith("stn")&&u.current.hasNode(c)&&u.current.getNodeAttribute(c,"type")in Q&&n.jsx(re,{}),1===d.size&&c.startsWith("line")&&u.current.hasEdge(c)&&u.current.getEdgeAttribute(c,"type")in C&&u.current.getEdgeAttribute(c,"style")in E&&n.jsx(ie,{}),d.size>1&&n.jsx(t,{})]})}function ae(){const{t:e}=H(),t=j(),{selected:s}=f((e=>e.runtime)),[a]=s,d=K.useRef(window.graph),[o,c]=K.useState("undefined"),[u,p]=K.useState("undefined"),[h,g]=K.useState("undefined"),[m,x]=K.useState("undefined");K.useEffect((()=>{if(null!=a&&a.startsWith("line")){const[r,s]=d.current.extremities(a);if(c(r),p(s),r.startsWith("stn")){var e,t;const n=d.current.getNodeAttribute(r,"type");g(null!==(e=null===(t=d.current.getNodeAttribute(r,n))||void 0===t?void 0:t.names.at(0))&&void 0!==e?e:"undefined")}if(s.startsWith("stn")){var n,i;const e=d.current.getNodeAttribute(s,"type");x(null!==(n=null===(i=d.current.getNodeAttribute(s,e))||void 0===i?void 0:i.names.at(0))&&void 0!==n?n:"undefined")}}}),[s]);const b=G((()=>{t(L()),t(_(o))})),y=G((()=>{t(L()),t(_(u))})),w=[{type:"custom",label:e("panel.details.lineExtremities.source"),component:n.jsx(l,{ml:"auto",size:"sm",variant:"link",onClick:b,children:o}),oneLine:!0,minW:"full"},{type:"input",label:e("panel.details.lineExtremities.sourceName"),value:h,minW:"full"},{type:"custom",label:e("panel.details.lineExtremities.target"),component:n.jsx(l,{ml:"auto",size:"sm",variant:"link",onClick:y,children:u}),oneLine:!0,minW:"full"},{type:"input",label:e("panel.details.lineExtremities.targetName"),value:m,minW:"full"}];return n.jsxs(i,{p:1,children:[n.jsx(r,{as:"h5",size:"sm",children:e("panel.details.lineExtremities.title")}),n.jsx(T,{fields:w,minW:130})]})}function le(){const{t:e}=H(),t=j(),s=K.useCallback((()=>{t(I()),t(N()),t(S(o.current.export()))}),[t,I,N,S]),{selected:a,refresh:{nodes:l}}=f((e=>e.runtime)),[d]=a,o=K.useRef(window.graph),[c,u]=K.useState({x:0,y:0});K.useEffect((()=>{if(null!=d&&d.startsWith("stn")||null!=d&&d.startsWith("misc_node_")){const e=o.current.getNodeAttribute(d,"x"),t=o.current.getNodeAttribute(d,"y");u({x:e,y:t})}}),[l,a]);const p=[{type:"input",label:e("panel.details.nodePosition.pos.x"),value:c.x.toString(),validator:e=>!Number.isNaN(e),onChange:e=>{o.current.mergeNodeAttributes(d,{x:Number(e)}),s()}},{type:"input",label:e("panel.details.nodePosition.pos.y"),value:c.y.toString(),validator:e=>!Number.isNaN(e),onChange:e=>{o.current.mergeNodeAttributes(d,{y:Number(e)}),s()}}];return n.jsxs(i,{p:1,children:[n.jsx(r,{as:"h5",size:"sm",children:e("panel.details.nodePosition.title")}),n.jsx(T,{fields:p,minW:130})]})}const de={...Q,...ne},oe=()=>{var e;const t=j(),{selected:i}=f((e=>e.runtime)),{t:r}=H(),[s]=i,a=window.graph.getNodeAttribute(s,"type"),l=a in de&&de[a].attrsComponent,d=null!==(e=window.graph.getNodeAttribute(s,a))&&void 0!==e?e:{};return l?n.jsx(l,{id:s,attrs:d,handleAttrsUpdate:(e,n)=>{const i=window.graph.getNodeAttribute(e,"type");window.graph.mergeNodeAttributes(e,{[i]:n}),t(I()),t(S(window.graph.export()))}}):n.jsx(b,{fontSize:"xs",m:"var(--chakra-space-1)",children:r("panel.details.unknown.error",{category:r("panel.details.unknown.node")})})},ce=()=>{var e,t;const i=j(),{preference:{autoParallel:r}}=f((e=>e.app)),{selected:s}=f((e=>e.runtime)),{t:a}=H(),[l]=s,{type:d,style:o,parallelIndex:c,reconcileId:u}=window.graph.getEdgeAttributes(l),p=null!==(e=window.graph.getEdgeAttribute(l,d))&&void 0!==e?e:{},h=d in C&&C[d].attrsComponent,g=null!==(t=window.graph.getEdgeAttribute(l,o))&&void 0!==t?t:{},m=o in E&&E[o].attrsComponent;return n.jsxs(n.Fragment,{children:[h?n.jsx(h,{id:l,attrs:p,recalculateParallelIndex:(e,t)=>{let n=-1;if(r){const[i,r]=window.graph.extremities(e);n=D(window.graph,d,i,r,t)}window.graph.setEdgeAttribute(e,"parallelIndex",n)},handleAttrsUpdate:(e,t)=>{window.graph.mergeEdgeAttributes(e,{[d]:t}),i(N()),i(S(window.graph.export()))},parallelIndex:c}):n.jsx(b,{fontSize:"xs",m:"var(--chakra-space-1)",children:a("panel.details.unknown.error",{category:a("panel.details.unknown.linePath")})}),m?n.jsx(m,{id:l,attrs:g,handleAttrsUpdate:(e,t)=>{window.graph.mergeEdgeAttributes(e,{[o]:t}),i(N()),i(S(window.graph.export()))},reconcileId:u}):n.jsx(b,{fontSize:"xs",m:"var(--chakra-space-1)",children:a("panel.details.unknown.error",{category:a("panel.details.unknown.lineStyle")})})]})};e("default",(()=>{const{t:e}=H(),t=j(),s=K.useRef(window.graph),d=K.useCallback((()=>{t(I()),t(N()),t(S(s.current.export()))}),[t,I,N,S]),{activeSubscriptions:o}=f((e=>e.account)),{selected:c,mode:u,active:p,masterNodesCount:h}=f((e=>e.runtime)),[g]=c,m=!o.RMP_CLOUD&&h+1>F;return n.jsxs(M,{isOpen:c.size>0&&!u.startsWith("line")&&!p,width:300,header:"Dummy header",alwaysOverlay:!0,children:[n.jsx(U,{onClose:()=>t(L()),children:e("panel.details.header")}),n.jsxs($,{children:[n.jsx(se,{}),1===c.size&&s.current.hasNode(g)&&n.jsx(le,{}),1===c.size&&s.current.hasEdge(g)&&n.jsx(ae,{}),1===c.size&&n.jsxs(i,{p:1,children:[n.jsx(r,{as:"h5",size:"sm",children:e("panel.details.specificAttrsTitle")}),window.graph.hasNode(g)&&n.jsx(oe,{}),window.graph.hasEdge(g)&&n.jsx(ce,{})]})]}),n.jsx(V,{children:n.jsxs(a,{children:[1===c.size&&s.current.hasNode(g)&&n.jsx(l,{size:"sm",variant:"outline",onClick:()=>(e=>{const n=structuredClone(s.current.getNodeAttributes(e));n.x+=50,n.y+=50;const i=e.startsWith("stn")?`stn_${q(10)}`:`misc_node_${q(10)}`;s.current.addNode(i,n),t(I()),t(S(s.current.export()))})(g),isDisabled:s.current.getNodeAttributes(g).type===B.Master&&m,children:e("panel.details.footer.duplicate")}),n.jsx(l,{size:"sm",variant:"outline",onClick:()=>(e=>{const t=J(s.current,e);navigator.clipboard.writeText(t)})(c),children:e("panel.details.footer.copy")}),n.jsx(l,{size:"sm",variant:"outline",onClick:()=>{return e=c,t(L()),e.forEach((e=>{s.current.hasNode(e)?s.current.dropNode(e):s.current.hasEdge(e)&&s.current.dropEdge(e)})),void d();var e},children:e("panel.details.footer.remove")})]})})]})}))}}})); +System.register(["./chakra-legacy--ElhKRU8.js","./index-legacy-jqOeRlnz.js","./react-legacy-CB7hQk4J.js","./clipboard-legacy-CN3xDKAv.js","./master-manager-legacy-CCeMINwh.js","./change-type-modal-legacy-BfNFaO9v.js","./tools-legacy-XMueayxR.js","./misc-nodes-legacy-DUcImzkb.js"],(function(e,t){"use strict";var n,i,r,s,a,l,d,o,c,u,p,h,g,m,x,b,j,f,y,w,v,A,N,S,C,E,z,k,W,O,I,P,R,T,D,L,_,F,M,U,$,V,B,q,H,K,G,J,Q,X,Y,Z,ee,te,ne;return{setters:[e=>{n=e.j,i=e.B,r=e.aw,s=e.ax,a=e.aK,l=e.O,d=e.aM,o=e.U,c=e.D,u=e._,p=e.$,h=e.a0,g=e.a1,m=e.a3,x=e.a5,b=e.a4},e=>{j=e.c,f=e.d,y=e.az,w=e.T,v=e.at,A=e.aA,N=e.t,S=e.v,C=e.l,E=e.ap,z=e.k,k=e.o,W=e.P,O=e.aB,I=e.q,P=e.$,R=e.a0,T=e.i,D=e.m,L=e.y,_=e.au,F=e.ay,M=e.aC,U=e.aD,$=e.aE,V=e.aF,B=e.aw,q=e.n},e=>{H=e.u,K=e.b},e=>{G=e.u,J=e.e},e=>{Q=e.s},e=>{X=e.C,Y=e.c,Z=e.a,ee=e.b},e=>{te=e.LearnHowToAdd},e=>{ne=e.m}],execute:function(){function t(){const{t:e}=H(),t=j(),{selected:u}=f((e=>e.runtime)),p=K.useRef(window.graph),h=e=>{if(p.current.hasNode(e)){const t=p.current.getNodeAttributes(e),n=t.type;return e.startsWith("stn")?t[n].names.join("/"):n}if(p.current.hasEdge(e)){const[t,n]=p.current.extremities(e),i=p.current.getSourceAttributes(e),r=p.current.getTargetAttributes(e),s=i.type,a=r.type;return(t.startsWith("stn")?i[s].names[0]:s)+" - "+(n.startsWith("stn")?r[a].names[0]:a)}},[g,m]=K.useState([]);K.useEffect((()=>{m(["station","misc-node","line"])}),[u]);const[x,b]=K.useState(!1);return n.jsxs(i,{children:[n.jsxs(r,{as:"h5",size:"sm",children:[e("panel.details.multipleSelection.selected")," ",u.size]}),n.jsxs(s,{m:"var(--chakra-space-1)",children:[n.jsxs(a,{w:"100%",children:[n.jsx(r,{as:"h5",size:"xs",w:"100%",children:e("panel.details.multipleSelection.show")}),n.jsx(y,{selections:[{label:e("panel.details.multipleSelection.station"),value:"station"},{label:e("panel.details.multipleSelection.miscNode"),value:"misc-node"},{label:e("panel.details.multipleSelection.edge"),value:"line"}],defaultValue:g,multiSelect:!0,onChange:e=>m(e)})]}),0!==g.length&&n.jsxs(n.Fragment,{children:[n.jsxs(l,{width:"100%",size:"sm",onClick:()=>b(!0),children:[e("panel.details.multipleSelection.change"),n.jsx(d,{label:e("header.settings.pro"),children:n.jsx(o,{ml:"1",color:"gray.50",background:"radial-gradient(circle, #3f5efb, #fc466b)",children:"PRO"})})]}),n.jsx(c,{})]}),[...u].filter((e=>g.includes("station")||!e.startsWith("stn"))).filter((e=>g.includes("misc-node")||!e.startsWith("misc"))).filter((e=>g.includes("line")||!e.startsWith("line"))).map((e=>{var i;return n.jsxs(a,{width:"100%",children:[n.jsx(l,{width:"100%",size:"sm",variant:"solid",onClick:()=>t(w(new Set([e]))),overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"ruby",children:null===(i=h(e))||void 0===i?void 0:i.replaceAll("\n","⏎")}),n.jsx(l,{size:"sm",onClick:()=>t(v(e)),children:n.jsx(A,{})})]},e)}))]}),n.jsx(X,{isOpen:x,onClose:()=>b(!1),isSelect:!0,filter:g})]})}function ie(){const{t:e}=H(),t=j(),i=K.useCallback((()=>{t(N()),t(S(o.current.export()))}),[t,N,S]),{preference:{autoParallel:r}}=f((e=>e.app)),{selected:s,theme:a}=f((e=>e.runtime)),[d]=s,o=K.useRef(window.graph),[c,b]=K.useState(!1),y=K.useRef(null),w=Object.fromEntries(Object.entries(C).map((([t,n])=>[t,e(n.metadata.displayName).toString()]))),[v,A]=K.useState(o.current.getEdgeAttribute(d,"type")),[I,P]=K.useState(void 0),R=Object.fromEntries(Object.entries(E).map((([t,n])=>[t,e(n.metadata.displayName).toString()]))),[T,D]=K.useState(o.current.getEdgeAttribute(d,"style")),[L,_]=K.useState(void 0);K.useEffect((()=>{A(o.current.getEdgeAttribute(d,"type")),D(o.current.getEdgeAttribute(d,"style"))}),[d]);const F=Object.values(z).filter((e=>!E[T].metadata.supportLinePathType.includes(e))),M=Object.values(k).filter((e=>!E[e].metadata.supportLinePathType.includes(v))),U=e=>{e&&(I?(I&&(Y(o.current,d,I,r),A(o.current.getEdgeAttribute(d,"type")),i()),P(void 0)):L&&(L&&(Z(o.current,d,L,a),D(o.current.getEdgeAttribute(d,"style")),i()),_(void 0))),b(!1)};return n.jsxs(n.Fragment,{children:[n.jsx(W,{label:e("panel.details.info.linePathType"),minW:"276",children:n.jsx(O,{options:w,disabledOptions:F,defaultValue:v,value:v,onChange:({target:{value:e}})=>{P(e),b(!0)}})}),n.jsx(W,{label:e("panel.details.info.lineStyleType"),minW:"276",children:n.jsx(O,{options:R,disabledOptions:M,defaultValue:T,value:T,onChange:({target:{value:e}})=>{_(e),b(!0)}})}),n.jsx(te,{type:"line",expand:!0}),n.jsx(u,{isOpen:c,leastDestructiveRef:y,onClose:()=>U(!1),children:n.jsx(p,{children:n.jsxs(h,{children:[n.jsx(g,{children:e("warning")}),n.jsx(m,{children:e("panel.details.changeLineTypeContent")}),n.jsxs(x,{children:[n.jsx(l,{ref:y,onClick:()=>U(!1),children:e("cancel")}),n.jsx(l,{ml:"2",colorScheme:"red",onClick:()=>U(!0),children:e("panel.details.changeType")})]})]})})})]})}function re(){const{t:e}=H(),t=j(),i=K.useCallback((()=>{t(I()),t(S(a.current.export()))}),[t,I,S]),{selected:r}=f((e=>e.runtime)),[s]=r,a=K.useRef(window.graph),[d,o]=K.useState(!1),c=K.useRef(null),[b,y]=K.useState(void 0),w=a.current.getNodeAttribute(s,"type"),v=Object.fromEntries(Object.entries(Q).map((([t,n])=>[t,e(n.metadata.displayName).toString()]))),A=e=>{e&&b&&(ee(a.current,s,b),i()),y(void 0),o(!1)};return n.jsxs(n.Fragment,{children:[n.jsx(W,{label:e("panel.details.info.stationType"),minW:"276",children:n.jsx(O,{options:v,disabledOptions:[w],value:w,onChange:({target:{value:e}})=>{y(e),o(!0)}})}),n.jsx(u,{isOpen:d,leastDestructiveRef:c,onClose:()=>A(!1),children:n.jsx(p,{children:n.jsxs(h,{children:[n.jsx(g,{children:e("warning")}),n.jsx(m,{children:e("panel.details.changeStationTypeContent")}),n.jsxs(x,{children:[n.jsx(l,{ref:c,onClick:()=>A(!1),children:e("cancel")}),n.jsx(l,{ml:"2",colorScheme:"red",onClick:()=>A(!0),children:e("panel.details.changeType")})]})]})})})]})}function se(){const{t:e}=H(),s=j(),a=K.useCallback((()=>{s(I()),s(N()),s(S(u.current.export()))}),[s,I,N,S]),{activeSubscriptions:l}=f((e=>e.account)),{selected:d,parallelLinesCount:o}=f((e=>e.runtime)),[c]=d,u=K.useRef(window.graph),p=e=>{u.current.setEdgeAttribute(c,"parallelIndex",e),s(N()),s(S(u.current.export()))},h=[];if(0===d.size);else if(1===d.size){if(h.push({type:"input",label:e("panel.details.info.id"),value:c,minW:276}),h.push({type:"select",label:e("panel.details.info.zIndex"),value:c?u.current.hasNode(c)?u.current.getNodeAttribute(c,"zIndex"):u.current.hasEdge(c)?u.current.getEdgeAttribute(c,"zIndex"):0:0,options:Object.fromEntries(Array.from({length:21},((e,t)=>[t-10,(t-10).toString()]))),onChange:e=>(e=>{const t=Math.min(Math.max(e,-10),10);u.current.hasNode(c)&&u.current.setNodeAttribute(c,"zIndex",t),u.current.hasEdge(c)&&u.current.setEdgeAttribute(c,"zIndex",t),a()})(Number(e))}),u.current.hasEdge(c)){const t=u.current.getEdgeAttributes(c),n=t.parallelIndex,i=l.RMP_CLOUD?P:R,r=o>i&&n<0,s=o>i&&n>=0;h.push({type:"switch",label:e("panel.details.info.parallel"),isDisabled:r,isChecked:n>=0,onChange:e=>((e,t)=>{let n=-1;if(e){const e=u.current.getEdgeAttributes(c),[i,r]=u.current.extremities(c);n=D(u.current,e.type,i,r,t)}p(n)})(e,t[t.type].startFrom),oneLine:!0,minW:276}),n>=0&&h.push({type:"input",label:e("panel.details.info.parallelIndex"),variant:"number",isDisabled:s,value:t.parallelIndex.toString(),onChange:e=>p(Number(e)),minW:276})}}else d.size>1&&h.push({type:"input",label:e("panel.details.info.type"),value:e("panel.details.multipleSelection.title"),minW:276});return n.jsxs(i,{p:1,children:[n.jsx(r,{as:"h5",size:"sm",children:e("panel.details.info.title")}),n.jsx(T,{fields:h,minW:130}),1===d.size&&c.startsWith("stn")&&u.current.hasNode(c)&&u.current.getNodeAttribute(c,"type")in Q&&n.jsx(re,{}),1===d.size&&c.startsWith("line")&&u.current.hasEdge(c)&&u.current.getEdgeAttribute(c,"type")in C&&u.current.getEdgeAttribute(c,"style")in E&&n.jsx(ie,{}),d.size>1&&n.jsx(t,{})]})}function ae(){const{t:e}=H(),t=j(),{selected:s}=f((e=>e.runtime)),[a]=s,d=K.useRef(window.graph),[o,c]=K.useState("undefined"),[u,p]=K.useState("undefined"),[h,g]=K.useState("undefined"),[m,x]=K.useState("undefined");K.useEffect((()=>{if(null!=a&&a.startsWith("line")){const[r,s]=d.current.extremities(a);if(c(r),p(s),r.startsWith("stn")){var e,t;const n=d.current.getNodeAttribute(r,"type");g(null!==(e=null===(t=d.current.getNodeAttribute(r,n))||void 0===t?void 0:t.names.at(0))&&void 0!==e?e:"undefined")}if(s.startsWith("stn")){var n,i;const e=d.current.getNodeAttribute(s,"type");x(null!==(n=null===(i=d.current.getNodeAttribute(s,e))||void 0===i?void 0:i.names.at(0))&&void 0!==n?n:"undefined")}}}),[s]);const b=G((()=>{t(L()),t(_(o))})),y=G((()=>{t(L()),t(_(u))})),w=[{type:"custom",label:e("panel.details.lineExtremities.source"),component:n.jsx(l,{ml:"auto",size:"sm",variant:"link",onClick:b,children:o}),oneLine:!0,minW:"full"},{type:"input",label:e("panel.details.lineExtremities.sourceName"),value:h,minW:"full"},{type:"custom",label:e("panel.details.lineExtremities.target"),component:n.jsx(l,{ml:"auto",size:"sm",variant:"link",onClick:y,children:u}),oneLine:!0,minW:"full"},{type:"input",label:e("panel.details.lineExtremities.targetName"),value:m,minW:"full"}];return n.jsxs(i,{p:1,children:[n.jsx(r,{as:"h5",size:"sm",children:e("panel.details.lineExtremities.title")}),n.jsx(T,{fields:w,minW:130})]})}function le(){const{t:e}=H(),t=j(),s=K.useCallback((()=>{t(I()),t(N()),t(S(o.current.export()))}),[t,I,N,S]),{selected:a,refresh:{nodes:l}}=f((e=>e.runtime)),[d]=a,o=K.useRef(window.graph),[c,u]=K.useState({x:0,y:0});K.useEffect((()=>{if(null!=d&&d.startsWith("stn")||null!=d&&d.startsWith("misc_node_")){const e=o.current.getNodeAttribute(d,"x"),t=o.current.getNodeAttribute(d,"y");u({x:e,y:t})}}),[l,a]);const p=[{type:"input",label:e("panel.details.nodePosition.pos.x"),value:c.x.toString(),validator:e=>!Number.isNaN(e),onChange:e=>{o.current.mergeNodeAttributes(d,{x:Number(e)}),s()}},{type:"input",label:e("panel.details.nodePosition.pos.y"),value:c.y.toString(),validator:e=>!Number.isNaN(e),onChange:e=>{o.current.mergeNodeAttributes(d,{y:Number(e)}),s()}}];return n.jsxs(i,{p:1,children:[n.jsx(r,{as:"h5",size:"sm",children:e("panel.details.nodePosition.title")}),n.jsx(T,{fields:p,minW:130})]})}const de={...Q,...ne},oe=()=>{var e;const t=j(),{selected:i}=f((e=>e.runtime)),{t:r}=H(),[s]=i,a=window.graph.getNodeAttribute(s,"type"),l=a in de&&de[a].attrsComponent,d=null!==(e=window.graph.getNodeAttribute(s,a))&&void 0!==e?e:{};return l?n.jsx(l,{id:s,attrs:d,handleAttrsUpdate:(e,n)=>{const i=window.graph.getNodeAttribute(e,"type");window.graph.mergeNodeAttributes(e,{[i]:n}),t(I()),t(S(window.graph.export()))}}):n.jsx(b,{fontSize:"xs",m:"var(--chakra-space-1)",children:r("panel.details.unknown.error",{category:r("panel.details.unknown.node")})})},ce=()=>{var e,t;const i=j(),{preference:{autoParallel:r}}=f((e=>e.app)),{selected:s}=f((e=>e.runtime)),{t:a}=H(),[l]=s,{type:d,style:o,parallelIndex:c,reconcileId:u}=window.graph.getEdgeAttributes(l),p=null!==(e=window.graph.getEdgeAttribute(l,d))&&void 0!==e?e:{},h=d in C&&C[d].attrsComponent,g=null!==(t=window.graph.getEdgeAttribute(l,o))&&void 0!==t?t:{},m=o in E&&E[o].attrsComponent;return n.jsxs(n.Fragment,{children:[h?n.jsx(h,{id:l,attrs:p,recalculateParallelIndex:(e,t)=>{let n=-1;if(r){const[i,r]=window.graph.extremities(e);n=D(window.graph,d,i,r,t)}window.graph.setEdgeAttribute(e,"parallelIndex",n)},handleAttrsUpdate:(e,t)=>{window.graph.mergeEdgeAttributes(e,{[d]:t}),i(N()),i(S(window.graph.export()))},parallelIndex:c}):n.jsx(b,{fontSize:"xs",m:"var(--chakra-space-1)",children:a("panel.details.unknown.error",{category:a("panel.details.unknown.linePath")})}),m?n.jsx(m,{id:l,attrs:g,handleAttrsUpdate:(e,t)=>{window.graph.mergeEdgeAttributes(e,{[o]:t}),i(N()),i(S(window.graph.export()))},reconcileId:u}):n.jsx(b,{fontSize:"xs",m:"var(--chakra-space-1)",children:a("panel.details.unknown.error",{category:a("panel.details.unknown.lineStyle")})})]})};e("default",(()=>{const{t:e}=H(),t=j(),s=K.useRef(window.graph),d=K.useCallback((()=>{t(I()),t(N()),t(S(s.current.export()))}),[t,I,N,S]),{activeSubscriptions:o}=f((e=>e.account)),{selected:c,mode:u,active:p,masterNodesCount:h}=f((e=>e.runtime)),[g]=c,m=!o.RMP_CLOUD&&h+1>F;return n.jsxs(M,{isOpen:c.size>0&&!u.startsWith("line")&&!p,width:300,header:"Dummy header",alwaysOverlay:!0,children:[n.jsx(U,{onClose:()=>t(L()),children:e("panel.details.header")}),n.jsxs($,{children:[n.jsx(se,{}),1===c.size&&s.current.hasNode(g)&&n.jsx(le,{}),1===c.size&&s.current.hasEdge(g)&&n.jsx(ae,{}),1===c.size&&n.jsxs(i,{p:1,children:[n.jsx(r,{as:"h5",size:"sm",children:e("panel.details.specificAttrsTitle")}),window.graph.hasNode(g)&&n.jsx(oe,{}),window.graph.hasEdge(g)&&n.jsx(ce,{})]})]}),n.jsx(V,{children:n.jsxs(a,{children:[1===c.size&&s.current.hasNode(g)&&n.jsx(l,{size:"sm",variant:"outline",onClick:()=>(e=>{const n=structuredClone(s.current.getNodeAttributes(e));n.x+=50,n.y+=50;const i=e.startsWith("stn")?`stn_${q(10)}`:`misc_node_${q(10)}`;s.current.addNode(i,n),t(I()),t(S(s.current.export()))})(g),isDisabled:s.current.getNodeAttributes(g).type===B.Master&&m,children:e("panel.details.footer.duplicate")}),n.jsx(l,{size:"sm",variant:"outline",onClick:()=>(e=>{const t=J(s.current,e);navigator.clipboard.writeText(t)})(c),children:e("panel.details.footer.copy")}),n.jsx(l,{size:"sm",variant:"outline",onClick:()=>{return e=c,t(L()),e.forEach((e=>{s.current.hasNode(e)?s.current.dropNode(e):s.current.hasEdge(e)&&s.current.dropEdge(e)})),void d();var e},children:e("panel.details.footer.remove")})]})})]})}))}}})); diff --git a/assets/index-CgEQ4DK5.js b/assets/index-DRWG9Ar1.js similarity index 99% rename from assets/index-CgEQ4DK5.js rename to assets/index-DRWG9Ar1.js index 81d6f7d53..d8b0dcf86 100644 --- a/assets/index-CgEQ4DK5.js +++ b/assets/index-DRWG9Ar1.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/page-header-Bgpft2Tp.js","assets/chakra-t2DzLzXq.js","assets/react-DmTIgZys.js","assets/master-manager-UVzPVFgJ.js","assets/change-type-modal-DKvpGHTO.js","assets/tools-BJtAFyoe.js","assets/misc-nodes-CZ4-M6fq.js","assets/svg-wrapper-pwXZizLy.js","assets/clipboard-CUes04zp.js","assets/details-DDhluMMM.js","assets/rmg-palette-app-clip-aSI_7pb8.js"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/page-header-BAx6PiVa.js","assets/chakra-t2DzLzXq.js","assets/react-DmTIgZys.js","assets/master-manager-DlQmLEpO.js","assets/change-type-modal-CfyQxI5Y.js","assets/tools-CgHBlRFk.js","assets/misc-nodes-DMfi7tU1.js","assets/svg-wrapper-C2oLWHER.js","assets/clipboard-DPvCegxP.js","assets/details-BUdue8Oj.js","assets/rmg-palette-app-clip-BwGDxhpZ.js"])))=>i.map(i=>d[i]); import{u as ht,a as Lc,j as m,P as Mc,c as Tr,F as jc,b as $c,f as Wt,n as Ho,r as me,d as Fa,e as Zn,i as Sr,o as ni,g as ct,B as Pc,D as Jo,I as Ic,h as Ga,k as Dc,S as Ua,l as Bc,W as zc,m as Fc,p as Gc,q as Wa,C as Uc,s as Wc,t as Vc,v as Hc,w as Jc,x as Kc,y as Ri,z as Yc,A as Va,E as qc,G as Qc,H as Ha,J as Xc,K as Zc,L as Ja,M as eu,T as tu,N as nu,O as dn,Q as ru,R as iu,U as Ka,V as ou,X as au,Y as su,Z as lu,_ as cu,$ as uu,a0 as du,a1 as hu,a2 as pu,a3 as fu,a4 as At,a5 as gu,a6 as Ya,a7 as zn,a8 as io,a9 as oo,aa as mu,ab as yu,ac as bu,ad as vu,ae as wu,af as Er,ag as xu,ah as Su,ai as _u,aj as Nu,ak as Ru,al as ku,am as Bn,an as Cu,ao as Au,ap as Tu,aq as Eu,ar as Ou,as as K}from"./chakra-t2DzLzXq.js";import{g as ao,a as Lu,r as $,b as D,d as ri,u as Te,i as Mu,o as Ko,e as qa,f as Qa,h as ju,j as $u,k as Pu,l as Iu,m as Du,P as Bu,I as zu}from"./react-DmTIgZys.js";function W1(){import.meta.url,import("_").catch(()=>1),async function*(){}().next()}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const a of o)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&i(s)}).observe(document,{childList:!0,subtree:!0});function r(o){const a={};return o.integrity&&(a.integrity=o.integrity),o.referrerPolicy&&(a.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?a.credentials="include":o.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(o){if(o.ep)return;o.ep=!0;const a=r(o);fetch(o.href,a)}})();var Fu=function(n,e,r,i){function o(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function l(d){try{u(i.next(d))}catch(h){s(h)}}function c(d){try{u(i.throw(d))}catch(h){s(h)}}function u(d){d.done?a(d.value):o(d.value).then(l,c)}u((i=i.apply(n,e||[])).next())})};const Xa=n=>new Promise(e=>{setTimeout(e,n,"Timeout after ".concat(n/1e3," seconds"))}),Gu=n=>new Promise(e=>{const r=new FileReader;r.onloadend=()=>e(r.result),r.readAsDataURL(n)}),Uu=n=>{let e,r=!1;return i=>Fu(void 0,void 0,void 0,function*(){return e&&(r||!i)?e:(e=n(),r=!0,e.then(o=>(r=!1,o)).catch(o=>{throw e=null,o}))})},so=n=>{let e=0;for(let r=0;r{const e=(n&16777215).toString(16).toUpperCase();return"#"+"00000".substring(0,6-e.length)+e};var Ot;(function(n){n.DEV="DEV",n.UAT="UAT",n.PRD="PRD"})(Ot||(Ot={}));const Za="rmg-runtime__language",es="rmg-runtime__colourMode",Or="rmg-runtime__allowAnalytics",er="rmg-unknown",Wu="railmapgen.github.io",Vu="rmg-home";let Lr=er,ts=lo(so(er));const Hu=n=>{Lr=n,ts=lo(so(n))},dr=()=>"[".concat(Lr,"]"),hr=()=>ts,mt=(n,e,r)=>(...i)=>{typeof i[0]=="string"?n("%c".concat(e(),"%c ").concat(i[0]),"color: ".concat(r()),"",...i.slice(1)):n("%c".concat(e(),"%c"),"color: ".concat(r()),"",...i)},Ju={debug:mt(console.debug,dr,hr),info:mt(console.info,dr,hr),warn:mt(console.warn,dr,hr),error:mt(console.error,dr,hr)},kn=()=>Lr===er?"[runtime]":"[runtime@".concat(Lr,"]"),Ku=lo(so("runtime")),Cn=()=>Ku,ge={setup:Hu,logger:Ju,debug:mt(console.debug,kn,Cn),info:mt(console.info,kn,Cn),warn:mt(console.warn,kn,Cn),error:mt(console.error,kn,Cn),group:mt(console.group,kn,Cn),groupEnd:console.groupEnd};var ns=function(n,e,r,i){function o(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function l(d){try{u(i.next(d))}catch(h){s(h)}}function c(d){try{u(i.throw(d))}catch(h){s(h)}}function u(d){d.done?a(d.value):o(d.value).then(l,c)}u((i=i.apply(n,e||[])).next())})};let co,ii,uo,ho,po;const rs=()=>{co=!1,ii=er,uo="unknown",ho=Ot.PRD,po="unknown"},Yu=()=>ns(void 0,void 0,void 0,function*(){const n=window.location.pathname.split("/")[1],e=n?"/".concat(n,"/info.json"):"/info.json",r=yield fetch(e);if(r.ok){const i=yield r.json();ge.info("Received info.json",i),ii=i.component,uo=i.version,ho=i.environment,po=i.instance}else throw new Error("Failed to fetch config from ".concat(e))}),qu=()=>ns(void 0,void 0,void 0,function*(){try{ge.group("Loading config...");const n=yield Promise.race([Yu(),Xa(10*1e3)]);n?ge.error("❌ Failed to load config.",n):(co=!0,ge.info("✅ Config loaded!"))}catch(n){ge.error("❌ Failed to load config.",n)}finally{ge.groupEnd()}}),Qu=()=>co,Xu=()=>is()?Vu:ii,Zu=()=>uo,ed=()=>ho,td=()=>po,is=()=>ii===Wu;rs();const Ae={loadWithTimeout:qu,isInitialised:Qu,getComponent:Xu,getVersion:Zu,getEnvironment:ed,getInstance:td,isRMT:is,_resetConfig:rs};window.dataLayer=window.dataLayer||[];const nd=()=>{const n=document.createElement("script");n.async=!0,n.src="https://www.googletagmanager.com/gtag/js?id=G-2HP8Y4MRRQ",document.head.append(n)};function Ii(...n){if(Ae.getEnvironment()!==Ot.DEV)return window.dataLayer.push(arguments);ge.info("Not going to send event in DEV environment",n)}const rd=(n,e={})=>{Ii("event",n,e)},id=()=>{nd(),Ii("js",new Date),Ii("config","G-2HP8Y4MRRQ",{appName:Ae.getComponent(),version:Ae.getVersion(),environment:Ae.getEnvironment(),instance:Ae.getInstance()})},Mr={init:id,customEvent:rd},od="rmg-runtime-channel",_r={};let Fn;try{Fn=new BroadcastChannel(od),Fn.onmessage=n=>{var e;const{event:r,data:i,frameId:o}=n.data;(e=_r[r])===null||e===void 0||e.forEach(a=>a(i,o))}}catch(n){ge.warn("Failed to initiate broadcast channel. Some features may be unavailable.",n)}const ad=(n,e)=>{var r;ge.debug("Broadcasting event ".concat(n," with data"),e),Fn==null||Fn.postMessage({event:n,data:e,frameId:(r=window.frameElement)===null||r===void 0?void 0:r.id})},sd=(n,e)=>{var r;n in _r?(r=_r[n])===null||r===void 0||r.push(e):_r[n]=[e]},ve={postEvent:ad,onMessage:sd},os="TOGGLE_NAV_MENU",as="OPEN_APP",ss="CLOSE_APP",ls="UPDATE_APP_METADATA",cs="UPDATE_URL",Nr=()=>!window.frameElement,ld=()=>{var n;return!!(!((n=window.frameElement)===null||n===void 0)&&n.closest(".show-menu"))},cd=()=>{if(!Nr()){const e=document.createElement("style");e.textContent="body{padding: 0;}",document.head.appendChild(e)}const n=document.createElement("style");n.textContent=".rmg-window__header:not(.rmg-window__app-clip-header){margin-left: 40px;}",!Nr()&&!ld()&&document.head.appendChild(n),Nr()||ve.onMessage(os,e=>{if(e)try{document.head.removeChild(n)}catch(r){ge.warn("Unable to remove indent style from RmgWindowHeader",r)}else document.head.appendChild(n)})},ud=n=>{ve.postEvent(as,n)},dd=n=>{ve.postEvent(ss,n)},hd=n=>{ve.postEvent(ls,n)},pd=n=>{ve.postEvent(cs,n)},fd=n=>{ve.onMessage(as,n)},gd=n=>{ve.onMessage(ss,n)},md=n=>{ve.onMessage(ls,n)},yd=n=>{ve.onMessage(cs,n)},bd=n=>{ve.postEvent(os,n)},He={isStandaloneWindow:Nr,injectUITools:cd,openApp:ud,onAppOpen:fd,closeApp:dd,onAppClose:gd,updateAppMetadata:hd,onAppMetadataUpdate:md,updateUrl:pd,onUrlUpdate:yd,toggleNavMenu:bd},us="SET_LANGUAGE",ds="SET_COLOUR_MODE",vd=n=>{ve.postEvent(us,n),window.localStorage.setItem(Za,n)},wd=()=>window.localStorage.getItem(Za)||"en",xd=n=>{ve.onMessage(us,n)},hs=["light","dark","system"],Sd=n=>{hs.includes(n)&&(ve.postEvent(ds,n),window.localStorage.setItem(es,n))},_d=()=>{const n=window.localStorage.getItem(es);return n&&hs.includes(n)?n:"system"},Nd=n=>{ve.onMessage(ds,n)},Rd=()=>window.localStorage.getItem(Or)!==null,ps=()=>window.localStorage.getItem(Or)==="true",kd=n=>{const e=ps();return n?(e||(window.localStorage.setItem(Or,n.toString()),Mr.init()),{refreshRequired:!1}):e?(window.localStorage.setItem(Or,n.toString()),{refreshRequired:!0}):{refreshRequired:!1}},Ye={setLanguage:vd,getLanguage:wd,onLanguageChange:xd,setColourMode:Sd,getColourMode:_d,onColourModeChange:Nd,isAnalyticsQADone:Rd,isAllowAnalytics:ps,allowAnalytics:kd},Cd=new Date().getTime();function Ad(){const n=Ae.getComponent(),e=window.localStorage.getItem(n+"__startTime");return e===null?new Date().getTime()-Cd:new Date().getTime()-Number(e)}const Td={getMsSinceStartUp:Ad},Rr={},fn=()=>{const n=Ae.getComponent();if(n===er)throw new Error("Unable to clear storage for unknown app");return n};window.addEventListener("storage",n=>{var e;const{key:r,newValue:i}=n;r&&((e=Rr[r])===null||e===void 0||e.forEach(o=>o(i)))});const Ed=(n,e)=>{var r;const i="".concat(fn(),"__").concat(n);i in Rr?(r=Rr[i])===null||r===void 0||r.push(e):Rr[i]=[e]},Od=n=>{const e=fn();return window.localStorage.getItem("".concat(e,"__").concat(n))},Ld=()=>{const n=fn(),e={};let r=0;for(;r{const r=fn();window.localStorage.setItem("".concat(r,"__").concat(n),e)},jd=n=>{const e=fn();window.localStorage.removeItem("".concat(e,"__").concat(n))},$d=()=>{const n=fn();let e=0;for(;e1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,r)}init(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=e||Pd,this.options=r,this.debug=r.debug}log(){for(var e=arguments.length,r=new Array(e),i=0;i{this.observers[i]||(this.observers[i]=new Map);const o=this.observers[i].get(r)||0;this.observers[i].set(r,o+1)}),this}off(e,r){if(this.observers[e]){if(!r){delete this.observers[e];return}this.observers[e].delete(r)}}emit(e){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o{let[l,c]=s;for(let u=0;u{let[l,c]=s;for(let u=0;u{n=i,e=o});return r.resolve=n,r.reject=e,r}function Yo(n){return n==null?"":""+n}function Id(n,e,r){n.forEach(i=>{e[i]&&(r[i]=e[i])})}const Dd=/###/g;function Gn(n,e,r){function i(l){return l&&l.indexOf("###")>-1?l.replace(Dd,"."):l}function o(){return!n||typeof n=="string"}const a=typeof e!="string"?e:e.split(".");let s=0;for(;s":">",'"':""","'":"'","/":"/"};function Gd(n){return typeof n=="string"?n.replace(/[&<>"'\/]/g,e=>Fd[e]):n}class Ud{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const r=this.regExpMap.get(e);if(r!==void 0)return r;const i=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,i),this.regExpQueue.push(e),i}}const Wd=[" ",",","?","!",";"],Vd=new Ud(20);function Hd(n,e,r){e=e||"",r=r||"";const i=Wd.filter(s=>e.indexOf(s)<0&&r.indexOf(s)<0);if(i.length===0)return!0;const o=Vd.getRegExp("(".concat(i.map(s=>s==="?"?"\\?":s).join("|"),")"));let a=!o.test(n);if(!a){const s=n.indexOf(r);s>0&&!o.test(n.substring(0,s))&&(a=!0)}return a}function Di(n,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!n)return;if(n[e])return n[e];const i=e.split(r);let o=n;for(let a=0;a-1&&c0?n.replace("_","-"):n}class Qo extends oi{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const r=this.options.ns.indexOf(e);r>-1&&this.options.ns.splice(r,1)}getResource(e,r,i){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,s=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let l;e.indexOf(".")>-1?l=e.split("."):(l=[e,r],i&&(Array.isArray(i)?l.push(...i):typeof i=="string"&&a?l.push(...i.split(a)):l.push(i)));const c=$r(this.data,l);return!c&&!r&&!i&&e.indexOf(".")>-1&&(e=l[0],r=l[1],i=l.slice(2).join(".")),c||!s||typeof i!="string"?c:Di(this.data&&this.data[e]&&this.data[e][r],i,a)}addResource(e,r,i,o){let a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let l=[e,r];i&&(l=l.concat(s?i.split(s):i)),e.indexOf(".")>-1&&(l=e.split("."),o=r,r=l[1]),this.addNamespaces(r),qo(this.data,l,o),a.silent||this.emit("added",e,r,i,o)}addResources(e,r,i){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const a in i)(typeof i[a]=="string"||Array.isArray(i[a]))&&this.addResource(e,r,a,i[a],{silent:!0});o.silent||this.emit("added",e,r,i)}addResourceBundle(e,r,i,o,a){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},l=[e,r];e.indexOf(".")>-1&&(l=e.split("."),o=i,i=r,r=l[1]),this.addNamespaces(r);let c=$r(this.data,l)||{};s.skipCopy||(i=JSON.parse(JSON.stringify(i))),o?fs(c,i,a):c={...c,...i},qo(this.data,l,c),s.silent||this.emit("added",e,r,i)}removeResourceBundle(e,r){this.hasResourceBundle(e,r)&&delete this.data[e][r],this.removeNamespaces(r),this.emit("removed",e,r)}hasResourceBundle(e,r){return this.getResource(e,r)!==void 0}getResourceBundle(e,r){return r||(r=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,r)}:this.getResource(e,r)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const r=this.getDataByLanguage(e);return!!(r&&Object.keys(r)||[]).find(o=>r[o]&&Object.keys(r[o]).length>0)}toJSON(){return this.data}}var gs={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,e,r,i,o){return n.forEach(a=>{this.processors[a]&&(e=this.processors[a].process(e,r,i,o))}),e}};const Xo={};class Ir extends oi{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Id(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=lt.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const i=this.resolve(e,r);return i&&i.res!==void 0}extractFromKey(e,r){let i=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");const o=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let a=r.ns||this.options.defaultNS||[];const s=i&&e.indexOf(i)>-1,l=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!Hd(e,i,o);if(s&&!l){const c=e.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:e,namespaces:a};const u=e.split(i);(i!==o||i===o&&this.options.ns.indexOf(u[0])>-1)&&(a=u.shift()),e=u.join(o)}return typeof a=="string"&&(a=[a]),{key:e,namespaces:a}}translate(e,r,i){if(typeof r!="object"&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),typeof r=="object"&&(r={...r}),r||(r={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const o=r.returnDetails!==void 0?r.returnDetails:this.options.returnDetails,a=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,{key:s,namespaces:l}=this.extractFromKey(e[e.length-1],r),c=l[l.length-1],u=r.lng||this.language,d=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(d){const M=r.nsSeparator||this.options.nsSeparator;return o?{res:"".concat(c).concat(M).concat(s),usedKey:s,exactUsedKey:s,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(r)}:"".concat(c).concat(M).concat(s)}return o?{res:s,usedKey:s,exactUsedKey:s,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(r)}:s}const h=this.resolve(e,r);let p=h&&h.res;const g=h&&h.usedKey||s,y=h&&h.exactUsedKey||s,w=Object.prototype.toString.apply(p),_=["[object Number]","[object Function]","[object RegExp]"],S=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,R=!this.i18nFormat||this.i18nFormat.handleAsObject;if(R&&p&&(typeof p!="string"&&typeof p!="boolean"&&typeof p!="number")&&_.indexOf(w)<0&&!(typeof S=="string"&&Array.isArray(p))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const M=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,p,{...r,ns:l}):"key '".concat(s," (").concat(this.language,")' returned an object instead of string.");return o?(h.res=M,h.usedParams=this.getUsedParamsDetails(r),h):M}if(a){const M=Array.isArray(p),A=M?[]:{},F=M?y:g;for(const T in p)if(Object.prototype.hasOwnProperty.call(p,T)){const G="".concat(F).concat(a).concat(T);A[T]=this.translate(G,{...r,joinArrays:!1,ns:l}),A[T]===G&&(A[T]=p[T])}p=A}}else if(R&&typeof S=="string"&&Array.isArray(p))p=p.join(S),p&&(p=this.extendTranslation(p,e,r,i));else{let M=!1,A=!1;const F=r.count!==void 0&&typeof r.count!="string",T=Ir.hasDefaultValue(r),G=F?this.pluralResolver.getSuffix(u,r.count,r):"",O=r.ordinal&&F?this.pluralResolver.getSuffix(u,r.count,{ordinal:!1}):"",P=F&&!r.ordinal&&r.count===0&&this.pluralResolver.shouldUseIntlApi(),W=P&&r["defaultValue".concat(this.options.pluralSeparator,"zero")]||r["defaultValue".concat(G)]||r["defaultValue".concat(O)]||r.defaultValue;!this.isValidLookup(p)&&T&&(M=!0,p=W),this.isValidLookup(p)||(A=!0,p=s);const ee=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&A?void 0:p,X=T&&W!==p&&this.options.updateMissing;if(A||M||X){if(this.logger.log(X?"updateKey":"missingKey",u,c,s,X?W:p),a){const we=this.resolve(s,{...r,keySeparator:!1});we&&we.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let De=[];const Xe=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Xe&&Xe[0])for(let we=0;we{const Be=T&&Me!==p?Me:ee;this.options.missingKeyHandler?this.options.missingKeyHandler(we,c,Ue,Be,X,r):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(we,c,Ue,Be,X,r),this.emit("missingKey",we,c,Ue,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&F?De.forEach(we=>{const Ue=this.pluralResolver.getSuffixes(we,r);P&&r["defaultValue".concat(this.options.pluralSeparator,"zero")]&&Ue.indexOf("".concat(this.options.pluralSeparator,"zero"))<0&&Ue.push("".concat(this.options.pluralSeparator,"zero")),Ue.forEach(Me=>{Ze([we],s+Me,r["defaultValue".concat(Me)]||W)})}):Ze(De,s,W))}p=this.extendTranslation(p,e,r,h,i),A&&p===s&&this.options.appendNamespaceToMissingKey&&(p="".concat(c,":").concat(s)),(A||M)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(c,":").concat(s):s,M?p:void 0):p=this.options.parseMissingKeyHandler(p))}return o?(h.res=p,h.usedParams=this.getUsedParamsDetails(r),h):p}extendTranslation(e,r,i,o,a){var s=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const u=typeof e=="string"&&(i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let d;if(u){const p=e.match(this.interpolator.nestingRegexp);d=p&&p.length}let h=i.replace&&typeof i.replace!="string"?i.replace:i;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),e=this.interpolator.interpolate(e,h,i.lng||this.language,i),u){const p=e.match(this.interpolator.nestingRegexp),g=p&&p.length;d1&&arguments[1]!==void 0?arguments[1]:{},i,o,a,s,l;return typeof e=="string"&&(e=[e]),e.forEach(c=>{if(this.isValidLookup(i))return;const u=this.extractFromKey(c,r),d=u.key;o=d;let h=u.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));const p=r.count!==void 0&&typeof r.count!="string",g=p&&!r.ordinal&&r.count===0&&this.pluralResolver.shouldUseIntlApi(),y=r.context!==void 0&&(typeof r.context=="string"||typeof r.context=="number")&&r.context!=="",w=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);h.forEach(_=>{this.isValidLookup(i)||(l=_,!Xo["".concat(w[0],"-").concat(_)]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(l)&&(Xo["".concat(w[0],"-").concat(_)]=!0,this.logger.warn('key "'.concat(o,'" for languages "').concat(w.join(", "),'" won\'t get resolved as namespace "').concat(l,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),w.forEach(S=>{if(this.isValidLookup(i))return;s=S;const R=[d];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(R,d,S,_,r);else{let M;p&&(M=this.pluralResolver.getSuffix(S,r.count,r));const A="".concat(this.options.pluralSeparator,"zero"),F="".concat(this.options.pluralSeparator,"ordinal").concat(this.options.pluralSeparator);if(p&&(R.push(d+M),r.ordinal&&M.indexOf(F)===0&&R.push(d+M.replace(F,this.options.pluralSeparator)),g&&R.push(d+A)),y){const T="".concat(d).concat(this.options.contextSeparator).concat(r.context);R.push(T),p&&(R.push(T+M),r.ordinal&&M.indexOf(F)===0&&R.push(T+M.replace(F,this.options.pluralSeparator)),g&&R.push(T+A))}}let j;for(;j=R.pop();)this.isValidLookup(i)||(a=j,i=this.getResource(S,_,j,r))}))})}),{res:i,usedKey:o,exactUsedKey:a,usedLng:s,usedNS:l}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,r,i){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,r,i,o):this.resourceStore.getResource(e,r,i,o)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=e.replace&&typeof e.replace!="string";let o=i?e.replace:e;if(i&&typeof e.count<"u"&&(o.count=e.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!i){o={...o};for(const a of r)delete o[a]}return o}static hasDefaultValue(e){const r="defaultValue";for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&r===i.substring(0,r.length)&&e[i]!==void 0)return!0;return!1}}function ki(n){return n.charAt(0).toUpperCase()+n.slice(1)}class Zo{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=lt.create("languageUtils")}getScriptPartFromCode(e){if(e=Pr(e),!e||e.indexOf("-")<0)return null;const r=e.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(e){if(e=Pr(e),!e||e.indexOf("-")<0)return e;const r=e.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(e){if(typeof e=="string"&&e.indexOf("-")>-1){const r=["hans","hant","latn","cyrl","cans","mong","arab"];let i=e.split("-");return this.options.lowerCaseLng?i=i.map(o=>o.toLowerCase()):i.length===2?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),r.indexOf(i[1].toLowerCase())>-1&&(i[1]=ki(i[1].toLowerCase()))):i.length===3&&(i[0]=i[0].toLowerCase(),i[1].length===2&&(i[1]=i[1].toUpperCase()),i[0]!=="sgn"&&i[2].length===2&&(i[2]=i[2].toUpperCase()),r.indexOf(i[1].toLowerCase())>-1&&(i[1]=ki(i[1].toLowerCase())),r.indexOf(i[2].toLowerCase())>-1&&(i[2]=ki(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let r;return e.forEach(i=>{if(r)return;const o=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(o))&&(r=o)}),!r&&this.options.supportedLngs&&e.forEach(i=>{if(r)return;const o=this.getLanguagePartFromCode(i);if(this.isSupportedCode(o))return r=o;r=this.options.supportedLngs.find(a=>{if(a===o)return a;if(!(a.indexOf("-")<0&&o.indexOf("-")<0)&&(a.indexOf("-")>0&&o.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===o||a.indexOf(o)===0&&o.length>1))return a})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(e,r){if(!e)return[];if(typeof e=="function"&&(e=e(r)),typeof e=="string"&&(e=[e]),Array.isArray(e))return e;if(!r)return e.default||[];let i=e[r];return i||(i=e[this.getScriptPartFromCode(r)]),i||(i=e[this.formatLanguageCode(r)]),i||(i=e[this.getLanguagePartFromCode(r)]),i||(i=e.default),i||[]}toResolveHierarchy(e,r){const i=this.getFallbackCodes(r||this.options.fallbackLng||[],e),o=[],a=s=>{s&&(this.isSupportedCode(s)?o.push(s):this.logger.warn("rejecting language code not found in supportedLngs: ".concat(s)))};return typeof e=="string"&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(e))):typeof e=="string"&&a(this.formatLanguageCode(e)),i.forEach(s=>{o.indexOf(s)<0&&a(this.formatLanguageCode(s))}),o}}let Jd=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Kd={1:function(n){return+(n>1)},2:function(n){return+(n!=1)},3:function(n){return 0},4:function(n){return n%10==1&&n%100!=11?0:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?1:2},5:function(n){return n==0?0:n==1?1:n==2?2:n%100>=3&&n%100<=10?3:n%100>=11?4:5},6:function(n){return n==1?0:n>=2&&n<=4?1:2},7:function(n){return n==1?0:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?1:2},8:function(n){return n==1?0:n==2?1:n!=8&&n!=11?2:3},9:function(n){return+(n>=2)},10:function(n){return n==1?0:n==2?1:n<7?2:n<11?3:4},11:function(n){return n==1||n==11?0:n==2||n==12?1:n>2&&n<20?2:3},12:function(n){return+(n%10!=1||n%100==11)},13:function(n){return+(n!==0)},14:function(n){return n==1?0:n==2?1:n==3?2:3},15:function(n){return n%10==1&&n%100!=11?0:n%10>=2&&(n%100<10||n%100>=20)?1:2},16:function(n){return n%10==1&&n%100!=11?0:n!==0?1:2},17:function(n){return n==1||n%10==1&&n%100!=11?0:1},18:function(n){return n==0?0:n==1?1:2},19:function(n){return n==1?0:n==0||n%100>1&&n%100<11?1:n%100>10&&n%100<20?2:3},20:function(n){return n==1?0:n==0||n%100>0&&n%100<20?1:2},21:function(n){return n%100==1?1:n%100==2?2:n%100==3||n%100==4?3:0},22:function(n){return n==1?0:n==2?1:(n<0||n>10)&&n%10==0?2:3}};const Yd=["v1","v2","v3"],qd=["v4"],ea={zero:0,one:1,two:2,few:3,many:4,other:5};function Qd(){const n={};return Jd.forEach(e=>{e.lngs.forEach(r=>{n[r]={numbers:e.nr,plurals:Kd[e.fc]}})}),n}class Xd{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=r,this.logger=lt.create("pluralResolver"),(!this.options.compatibilityJSON||qd.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=Qd()}addRule(e,r){this.rules[e]=r}getRule(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(Pr(e==="dev"?"en":e),{type:r.ordinal?"ordinal":"cardinal"})}catch(i){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=this.getRule(e,r);return this.shouldUseIntlApi()?i&&i.resolvedOptions().pluralCategories.length>1:i&&i.numbers.length>1}getPluralFormsOfKey(e,r){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,i).map(o=>"".concat(r).concat(o))}getSuffixes(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=this.getRule(e,r);return i?this.shouldUseIntlApi()?i.resolvedOptions().pluralCategories.sort((o,a)=>ea[o]-ea[a]).map(o=>"".concat(this.options.prepend).concat(r.ordinal?"ordinal".concat(this.options.prepend):"").concat(o)):i.numbers.map(o=>this.getSuffix(e,o,r)):[]}getSuffix(e,r){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const o=this.getRule(e,i);return o?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(i.ordinal?"ordinal".concat(this.options.prepend):"").concat(o.select(r)):this.getSuffixRetroCompatible(o,r):(this.logger.warn("no plural rule found for: ".concat(e)),"")}getSuffixRetroCompatible(e,r){const i=e.noAbs?e.plurals(r):e.plurals(Math.abs(r));let o=e.numbers[i];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(o===2?o="plural":o===1&&(o=""));const a=()=>this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString();return this.options.compatibilityJSON==="v1"?o===1?"":typeof o=="number"?"_plural_".concat(o.toString()):a():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?a():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}shouldUseIntlApi(){return!Yd.includes(this.options.compatibilityJSON)}}function ta(n,e,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=zd(n,e,r);return!a&&o&&typeof r=="string"&&(a=Di(n,r,i),a===void 0&&(a=Di(e,r,i))),a}class Zd{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=lt.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(r=>r),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:r,escapeValue:i,useRawValueToEscape:o,prefix:a,prefixEscaped:s,suffix:l,suffixEscaped:c,formatSeparator:u,unescapeSuffix:d,unescapePrefix:h,nestingPrefix:p,nestingPrefixEscaped:g,nestingSuffix:y,nestingSuffixEscaped:w,nestingOptionsSeparator:_,maxReplaces:S,alwaysFormat:R}=e.interpolation;this.escape=r!==void 0?r:Gd,this.escapeValue=i!==void 0?i:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=a?tn(a):s||"{{",this.suffix=l?tn(l):c||"}}",this.formatSeparator=u||",",this.unescapePrefix=d?"":h||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=p?tn(p):g||tn("$t("),this.nestingSuffix=y?tn(y):w||tn(")"),this.nestingOptionsSeparator=_||",",this.maxReplaces=S||1e3,this.alwaysFormat=R!==void 0?R:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(r,i)=>r&&r.source===i?(r.lastIndex=0,r):new RegExp(i,"g");this.regexp=e(this.regexp,"".concat(this.prefix,"(.+?)").concat(this.suffix)),this.regexpUnescape=e(this.regexpUnescape,"".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix)),this.nestingRegexp=e(this.nestingRegexp,"".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix))}interpolate(e,r,i,o){let a,s,l;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(y){return y.replace(/\$/g,"$$$$")}const d=y=>{if(y.indexOf(this.formatSeparator)<0){const R=ta(r,c,y,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(R,void 0,i,{...o,...r,interpolationkey:y}):R}const w=y.split(this.formatSeparator),_=w.shift().trim(),S=w.join(this.formatSeparator).trim();return this.format(ta(r,c,_,this.options.keySeparator,this.options.ignoreJSONStructure),S,i,{...o,...r,interpolationkey:_})};this.resetRegExp();const h=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,p=o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:y=>u(y)},{regex:this.regexp,safeValue:y=>this.escapeValue?u(this.escape(y)):u(y)}].forEach(y=>{for(l=0;a=y.regex.exec(e);){const w=a[1].trim();if(s=d(w),s===void 0)if(typeof h=="function"){const S=h(e,a,o);s=typeof S=="string"?S:""}else if(o&&Object.prototype.hasOwnProperty.call(o,w))s="";else if(p){s=a[0];continue}else this.logger.warn("missed to pass in variable ".concat(w," for interpolating ").concat(e)),s="";else typeof s!="string"&&!this.useRawValueToEscape&&(s=Yo(s));const _=y.safeValue(s);if(e=e.replace(a[0],_),p?(y.regex.lastIndex+=s.length,y.regex.lastIndex-=a[0].length):y.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),e}nest(e,r){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,a,s;function l(c,u){const d=this.nestingOptionsSeparator;if(c.indexOf(d)<0)return c;const h=c.split(new RegExp("".concat(d,"[ ]*{")));let p="{".concat(h[1]);c=h[0],p=this.interpolate(p,s);const g=p.match(/'/g),y=p.match(/"/g);(g&&g.length%2===0&&!y||y.length%2!==0)&&(p=p.replace(/'/g,'"'));try{s=JSON.parse(p),u&&(s={...u,...s})}catch(w){return this.logger.warn("failed parsing options string in nesting for key ".concat(c),w),"".concat(c).concat(d).concat(p)}return s.defaultValue&&s.defaultValue.indexOf(this.prefix)>-1&&delete s.defaultValue,c}for(;o=this.nestingRegexp.exec(e);){let c=[];s={...i},s=s.replace&&typeof s.replace!="string"?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;let u=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){const d=o[1].split(this.formatSeparator).map(h=>h.trim());o[1]=d.shift(),c=d,u=!0}if(a=r(l.call(this,o[1].trim(),s),s),a&&o[0]===e&&typeof a!="string")return a;typeof a!="string"&&(a=Yo(a)),a||(this.logger.warn("missed to resolve ".concat(o[1]," for nesting ").concat(e)),a=""),u&&(a=c.reduce((d,h)=>this.format(d,h,i.lng,{...i,interpolationkey:o[1].trim()}),a.trim())),e=e.replace(o[0],a),this.regexp.lastIndex=0}return e}}function eh(n){let e=n.toLowerCase().trim();const r={};if(n.indexOf("(")>-1){const i=n.split("(");e=i[0].toLowerCase().trim();const o=i[1].substring(0,i[1].length-1);e==="currency"&&o.indexOf(":")<0?r.currency||(r.currency=o.trim()):e==="relativetime"&&o.indexOf(":")<0?r.range||(r.range=o.trim()):o.split(";").forEach(s=>{if(s){const[l,...c]=s.split(":"),u=c.join(":").trim().replace(/^'+|'+$/g,""),d=l.trim();r[d]||(r[d]=u),u==="false"&&(r[d]=!1),u==="true"&&(r[d]=!0),isNaN(u)||(r[d]=parseInt(u,10))}})}return{formatName:e,formatOptions:r}}function nn(n){const e={};return function(i,o,a){const s=o+JSON.stringify(a);let l=e[s];return l||(l=n(Pr(o),a),e[s]=l),l(i)}}class th{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=lt.create("formatter"),this.options=e,this.formats={number:nn((r,i)=>{const o=new Intl.NumberFormat(r,{...i});return a=>o.format(a)}),currency:nn((r,i)=>{const o=new Intl.NumberFormat(r,{...i,style:"currency"});return a=>o.format(a)}),datetime:nn((r,i)=>{const o=new Intl.DateTimeFormat(r,{...i});return a=>o.format(a)}),relativetime:nn((r,i)=>{const o=new Intl.RelativeTimeFormat(r,{...i});return a=>o.format(a,i.range||"day")}),list:nn((r,i)=>{const o=new Intl.ListFormat(r,{...i});return a=>o.format(a)})},this.init(e)}init(e){const i=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=i.formatSeparator?i.formatSeparator:i.formatSeparator||","}add(e,r){this.formats[e.toLowerCase().trim()]=r}addCached(e,r){this.formats[e.toLowerCase().trim()]=nn(r)}format(e,r,i){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return r.split(this.formatSeparator).reduce((l,c)=>{const{formatName:u,formatOptions:d}=eh(c);if(this.formats[u]){let h=l;try{const p=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},g=p.locale||p.lng||o.locale||o.lng||i;h=this.formats[u](l,g,{...d,...o,...p})}catch(p){this.logger.warn(p)}return h}else this.logger.warn("there was no format function for ".concat(u));return l},e)}}function nh(n,e){n.pending[e]!==void 0&&(delete n.pending[e],n.pendingCount--)}class rh extends oi{constructor(e,r,i){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=r,this.services=i,this.languageUtils=i.languageUtils,this.options=o,this.logger=lt.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(i,o.backend,o)}queueLoad(e,r,i,o){const a={},s={},l={},c={};return e.forEach(u=>{let d=!0;r.forEach(h=>{const p="".concat(u,"|").concat(h);!i.reload&&this.store.hasResourceBundle(u,h)?this.state[p]=2:this.state[p]<0||(this.state[p]===1?s[p]===void 0&&(s[p]=!0):(this.state[p]=1,d=!1,s[p]===void 0&&(s[p]=!0),a[p]===void 0&&(a[p]=!0),c[h]===void 0&&(c[h]=!0)))}),d||(l[u]=!0)}),(Object.keys(a).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(a),pending:Object.keys(s),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(c)}}loaded(e,r,i){const o=e.split("|"),a=o[0],s=o[1];r&&this.emit("failedLoading",a,s,r),i&&this.store.addResourceBundle(a,s,i,void 0,void 0,{skipCopy:!0}),this.state[e]=r?-1:2;const l={};this.queue.forEach(c=>{Bd(c.loaded,[a],s),nh(c,e),r&&c.errors.push(r),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(u=>{l[u]||(l[u]={});const d=c.loaded[u];d.length&&d.forEach(h=>{l[u][h]===void 0&&(l[u][h]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(c=>!c.done)}read(e,r,i){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;if(!e.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:r,fcName:i,tried:o,wait:a,callback:s});return}this.readingCalls++;const l=(u,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const h=this.waitingReads.shift();this.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback)}if(u&&d&&o{this.read.call(this,e,r,i,o+1,a*2,s)},a);return}s(u,d)},c=this.backend[i].bind(this.backend);if(c.length===2){try{const u=c(e,r);u&&typeof u.then=="function"?u.then(d=>l(null,d)).catch(l):l(null,u)}catch(u){l(u)}return}return c(e,r,l)}prepareLoading(e,r){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();typeof e=="string"&&(e=this.languageUtils.toResolveHierarchy(e)),typeof r=="string"&&(r=[r]);const a=this.queueLoad(e,r,i,o);if(!a.toLoad.length)return a.pending.length||o(),null;a.toLoad.forEach(s=>{this.loadOne(s)})}load(e,r,i){this.prepareLoading(e,r,{},i)}reload(e,r,i){this.prepareLoading(e,r,{reload:!0},i)}loadOne(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const i=e.split("|"),o=i[0],a=i[1];this.read(o,a,"read",void 0,void 0,(s,l)=>{s&&this.logger.warn("".concat(r,"loading namespace ").concat(a," for language ").concat(o," failed"),s),!s&&l&&this.logger.log("".concat(r,"loaded namespace ").concat(a," for language ").concat(o),l),this.loaded(e,s,l)})}saveMissing(e,r,i,o,a){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},l=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(r)){this.logger.warn('did not save key "'.concat(i,'" as the namespace "').concat(r,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(i==null||i==="")){if(this.backend&&this.backend.create){const c={...s,isUpdate:a},u=this.backend.create.bind(this.backend);if(u.length<6)try{let d;u.length===5?d=u(e,r,i,o,c):d=u(e,r,i,o),d&&typeof d.then=="function"?d.then(h=>l(null,h)).catch(l):l(null,d)}catch(d){l(d)}else u(e,r,i,o,l,c)}!e||!e[0]||this.store.addResource(e[0],r,i,o)}}}function na(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){let r={};if(typeof e[1]=="object"&&(r=e[1]),typeof e[1]=="string"&&(r.defaultValue=e[1]),typeof e[2]=="string"&&(r.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const i=e[3]||e[2];Object.keys(i).forEach(o=>{r[o]=i[o]})}return r},interpolation:{escapeValue:!0,format:n=>n,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function ra(n){return typeof n.ns=="string"&&(n.ns=[n.ns]),typeof n.fallbackLng=="string"&&(n.fallbackLng=[n.fallbackLng]),typeof n.fallbackNS=="string"&&(n.fallbackNS=[n.fallbackNS]),n.supportedLngs&&n.supportedLngs.indexOf("cimode")<0&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),n}function pr(){}function ih(n){Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(r=>{typeof n[r]=="function"&&(n[r]=n[r].bind(n))})}class qn extends oi{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(super(),this.options=ra(e),this.services={},this.logger=lt,this.modules={external:[]},ih(this),r&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,r),this;setTimeout(()=>{this.init(e,r)},0)}}init(){var e=this;let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof r=="function"&&(i=r,r={}),!r.defaultNS&&r.defaultNS!==!1&&r.ns&&(typeof r.ns=="string"?r.defaultNS=r.ns:r.ns.indexOf("translation")<0&&(r.defaultNS=r.ns[0]));const o=na();this.options={...o,...this.options,...ra(r)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...o.interpolation,...this.options.interpolation}),r.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=r.keySeparator),r.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=r.nsSeparator);function a(d){return d?typeof d=="function"?new d:d:null}if(!this.options.isClone){this.modules.logger?lt.init(a(this.modules.logger),this.options):lt.init(null,this.options);let d;this.modules.formatter?d=this.modules.formatter:typeof Intl<"u"&&(d=th);const h=new Zo(this.options);this.store=new Qo(this.options.resources,this.options);const p=this.services;p.logger=lt,p.resourceStore=this.store,p.languageUtils=h,p.pluralResolver=new Xd(h,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),d&&(!this.options.interpolation.format||this.options.interpolation.format===o.interpolation.format)&&(p.formatter=a(d),p.formatter.init(p,this.options),this.options.interpolation.format=p.formatter.format.bind(p.formatter)),p.interpolator=new Zd(this.options),p.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},p.backendConnector=new rh(a(this.modules.backend),p.resourceStore,p,this.options),p.backendConnector.on("*",function(g){for(var y=arguments.length,w=new Array(y>1?y-1:0),_=1;_1?y-1:0),_=1;_{g.init&&g.init(this)})}if(this.format=this.options.interpolation.format,i||(i=pr),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.length>0&&d[0]!=="dev"&&(this.options.lng=d[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(d=>{this[d]=function(){return e.store[d](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(d=>{this[d]=function(){return e.store[d](...arguments),e}});const c=An(),u=()=>{const d=(h,p)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),c.resolve(p),i(h,p)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return d(null,this.t.bind(this));this.changeLanguage(this.options.lng,d)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),c}loadResources(e){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:pr;const o=typeof e=="string"?e:this.language;if(typeof e=="function"&&(i=e),!this.options.resources||this.options.partialBundledLanguages){if(o&&o.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();const a=[],s=l=>{if(!l||l==="cimode")return;this.services.languageUtils.toResolveHierarchy(l).forEach(u=>{u!=="cimode"&&a.indexOf(u)<0&&a.push(u)})};o?s(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(c=>s(c)),this.options.preload&&this.options.preload.forEach(l=>s(l)),this.services.backendConnector.load(a,this.options.ns,l=>{!l&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(l)})}else i(null)}reloadResources(e,r,i){const o=An();return e||(e=this.languages),r||(r=this.options.ns),i||(i=pr),this.services.backendConnector.reload(e,r,a=>{o.resolve(),i(a)}),o}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&gs.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let r=0;r-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}}changeLanguage(e,r){var i=this;this.isLanguageChangingTo=e;const o=An();this.emit("languageChanging",e);const a=c=>{this.language=c,this.languages=this.services.languageUtils.toResolveHierarchy(c),this.resolvedLanguage=void 0,this.setResolvedLanguage(c)},s=(c,u)=>{u?(a(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,o.resolve(function(){return i.t(...arguments)}),r&&r(c,function(){return i.t(...arguments)})},l=c=>{!e&&!c&&this.services.languageDetector&&(c=[]);const u=typeof c=="string"?c:this.services.languageUtils.getBestMatchFromCodes(c);u&&(this.language||a(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,d=>{s(d,u)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?l(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(l):this.services.languageDetector.detect(l):l(e),o}getFixedT(e,r,i){var o=this;const a=function(s,l){let c;if(typeof l!="object"){for(var u=arguments.length,d=new Array(u>2?u-2:0),h=2;h"".concat(c.keyPrefix).concat(p).concat(y)):g=c.keyPrefix?"".concat(c.keyPrefix).concat(p).concat(s):s,o.t(g,c)};return typeof e=="string"?a.lng=e:a.lngs=e,a.ns=r,a.keyPrefix=i,a}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const i=r.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const s=(l,c)=>{const u=this.services.backendConnector.state["".concat(l,"|").concat(c)];return u===-1||u===2};if(r.precheck){const l=r.precheck(this,s);if(l!==void 0)return l}return!!(this.hasResourceBundle(i,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(i,e)&&(!o||s(a,e)))}loadNamespaces(e,r){const i=An();return this.options.ns?(typeof e=="string"&&(e=[e]),e.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{i.resolve(),r&&r(o)}),i):(r&&r(),Promise.resolve())}loadLanguages(e,r){const i=An();typeof e=="string"&&(e=[e]);const o=this.options.preload||[],a=e.filter(s=>o.indexOf(s)<0&&this.services.languageUtils.isSupportedCode(s));return a.length?(this.options.preload=o.concat(a),this.loadResources(s=>{i.resolve(),r&&r(s)}),i):(r&&r(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const r=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],i=this.services&&this.services.languageUtils||new Zo(na());return r.indexOf(i.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new qn(e,r)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:pr;const i=e.forkResourceStore;i&&delete e.forkResourceStore;const o={...this.options,...e,isClone:!0},a=new qn(o);return(e.debug!==void 0||e.prefix!==void 0)&&(a.logger=a.logger.clone(e)),["store","services","language"].forEach(l=>{a[l]=this[l]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},i&&(a.store=new Qo(this.store.data,o),a.services.resourceStore=a.store),a.translator=new Ir(a.services,o),a.translator.on("*",function(l){for(var c=arguments.length,u=new Array(c>1?c-1:0),d=1;dan,ah=n=>{Ye.onLanguageChange(e=>n.changeLanguage(e))};class sh{constructor(){this._appName="RMG",this._lng=void 0,this._defaultResources={},this._resources={}}use(e){return ke.use(e),this}withAppName(e){return this._appName=e,this}withLng(e){return this._lng=e,this}withDefaultResource(e){return Object.entries(e).forEach(([r,i])=>{this._defaultResources[r]=i}),this}withResource(e,r){return this._resources[e]=r,this}combineResource(){const e={};return Object.entries(this._defaultResources).forEach(([r,i])=>{e[r]={translation:i}}),Object.entries(this._resources).forEach(([r,i])=>{r in e?e[r].translation=Object.assign(Object.assign({},e[r].translation),i):e[r]={translation:i}}),e}build(){return an=ke.createInstance({lng:this._lng,fallbackLng:{"zh-CN":["zh-Hans","zh-Hant","en"],"zh-HK":["zh-Hant","zh-Hans","en"],"zh-TW":["zh-Hant","zh-Hans","en"],default:["en"]},resources:this.combineResource()},(e,r)=>{var i;if(e){ge.error("unexpected error occurs while initialising i18n",e);return}document.title=r(this._appName),document.documentElement.lang=(i=this._lng)!==null&&i!==void 0?i:"en"}),an.on("languageChanged",e=>{document.title=an.t(this._appName),document.documentElement.lang=e}),ah(an),an}}var Qn=function(n,e,r,i){function o(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function l(d){try{u(i.next(d))}catch(h){s(h)}}function c(d){try{u(i.throw(d))}catch(h){s(h)}}function u(d){d.done?a(d.value):o(d.value).then(l,c)}u((i=i.apply(n,e||[])).next())})};let Tt={};const lh=()=>Tt,ms="LOAD_REMOTE_FONT",ch=(n,e)=>{ve.postEvent(ms,{family:n,definition:e})},uh=n=>{ve.onMessage(ms,n)},fo=n=>n.source.startsWith("local"),dh=n=>{var e;const r=(e=n.source.match(/url\(['"](\S+)['"]\)/))===null||e===void 0?void 0:e[1];if(!r)throw new Error("Invalid URL in source "+n.source);return new URL(r,window.location.href)},ia=(n,e)=>{var r;return"@font-face {\n font-family: '".concat(n,"';\n src: ").concat(e.source,";\n ").concat(Object.entries((r=e.descriptors)!==null&&r!==void 0?r:{}).map(([i,o])=>"".concat(i,": ").concat(o,";")).join("\n"),"\n}")},hh=()=>Uu(()=>fetch("/fonts/config.json").then(n=>n.json()));let ys=hh();const ph=(n,e,r)=>Qn(void 0,void 0,void 0,function*(){try{const i=new FontFace(n,e.source,e.descriptors);return fo(e)?yield i.load():i.loaded.then(r),document.fonts.add(i),Tt[n]={configs:[Object.assign(Object.assign({},e),{font:i})]},!0}catch(i){return ge.warn("Failed to load font ".concat(n," with source ").concat(e.source),i),!1}}),fh=(n,e,r)=>Qn(void 0,void 0,void 0,function*(){if(e.some(fo))return ge.error("Unable to load multiple FontFace for the same family ".concat(n)),!1;const i=[];return e.forEach(o=>{const a=new FontFace(n,o.source,o.descriptors);a.loaded.then(r),document.fonts.add(a),i.push(Object.assign(Object.assign({},o),{font:a}))}),Tt[n]={configs:i},!0}),gh=(n,e)=>Qn(void 0,void 0,void 0,function*(){if(n in Tt)return Tt[n];let r;if(e)r=e;else try{r=(yield ys())[n]}catch(a){throw new Error("Unable to load font definition of "+n)}const i=()=>{ch(n,r)};for(const a of r.configs)if(Array.isArray(a)?yield fh(n,a,i):yield ph(n,a,i))break;const o=Tt[n];if(o)return o.displayName=r.displayName,o.url=r.url,Tt[n]}),mh=n=>Qn(void 0,void 0,void 0,function*(){const e=Tt[n];if(!e)throw new Error("Font family ".concat(n," is not loaded"));return(yield Promise.all(e.configs.filter(i=>{const o=i.font.status==="loaded";return o||ge.warn("Font family ".concat(n," is not loaded completely. Some FontFaceRules may be missing")),o}).map(i=>Qn(void 0,void 0,void 0,function*(){if(fo(i))return ia(n,i);const o=dh(i),a=yield fetch(o),s=yield Gu(yield a.blob());return ia(n,Object.assign(Object.assign({},i),{source:"url('".concat(s,"')")}))})))).join("\n\n")}),Tn={getAllFonts:ys,getLoadedFonts:lh,loadFont:gh,getFontCSS:mh,onRemoteFontLoaded:uh},yh=()=>{if(Ae.getEnvironment()!=="PRD"||!Ae.isRMT())if(document.querySelector('meta[name="robots"]'))ge.info("Noindex meta tag already presents.");else{ge.info("Injecting noindex meta tag as this app is not PRD RMT.");const n=document.createElement("meta");n.name="robots",n.content="noindex",document.head.appendChild(n)}},bh={injectNoindexRule:yh};var bs=function(n,e,r,i){function o(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function l(d){try{u(i.next(d))}catch(h){s(h)}}function c(d){try{u(i.throw(d))}catch(h){s(h)}}function u(d){d.done?a(d.value):o(d.value).then(l,c)}u((i=i.apply(n,e||[])).next())})};let vs=!1;const vh=()=>bs(void 0,void 0,void 0,function*(){yield Ae.loadWithTimeout(),ge.setup(Ae.getComponent()),bh.injectNoindexRule(),Ye.isAnalyticsQADone()?Ye.isAllowAnalytics()&&(ge.info("User has previously allowed GA"),Mr.init()):He.isStandaloneWindow()&&!Ae.isRMT()&&(ge.warn("App is opened in standalone window but analytics Q&A is not finished. GA will be init by default."),Mr.init()),vs=!0}),wh=()=>bs(void 0,void 0,void 0,function*(){let n=0;for(;n<=10&&!vs;)yield Xa(1e3),n+=1}),Ge={ready:wh,getAppName:Ae.getComponent,getAppVersion:Ae.getVersion,getEnv:Ae.getEnvironment,getInstance:Ae.getInstance,event:Mr.customEvent,isStandaloneWindow:He.isStandaloneWindow,injectUITools:He.injectUITools,openApp:He.openApp,onAppOpen:He.onAppOpen,closeApp:He.closeApp,onAppClose:He.onAppClose,updateAppMetadata:He.updateAppMetadata,onAppMetadataUpdate:He.onAppMetadataUpdate,updateUrl:He.updateUrl,onUrlUpdate:He.onUrlUpdate,toggleNavMenu:He.toggleNavMenu,postEvent:ve.postEvent,onMessage:ve.onMessage,setLanguage:Ye.setLanguage,getLanguage:Ye.getLanguage,onLanguageChange:Ye.onLanguageChange,setColourMode:Ye.setColourMode,getColourMode:Ye.getColourMode,onColourModeChange:Ye.onColourModeChange,isAnalyticsQADone:Ye.isAnalyticsQADone,isAllowAnalytics:Ye.isAllowAnalytics,allowAnalytics:Ye.allowAnalytics,storage:{on:en.on,get:en.get,getAll:en.getAll,set:en.set,remove:en.remove,clear:en.clear},getMsSinceStartUp:Td.getMsSinceStartUp,I18nBuilder:sh,getI18nInstance:oh,getAllFonts:Tn.getAllFonts,getLoadedFonts:Tn.getLoadedFonts,loadFont:Tn.loadFont,getFontCSS:Tn.getFontCSS,onRemoteFontLoaded:Tn.onRemoteFontLoaded};vh().then();window.rmgRuntime=Ge;const K1=ge.logger;var go={exports:{}},ln=typeof Reflect=="object"?Reflect:null,oa=ln&&typeof ln.apply=="function"?ln.apply:function(e,r,i){return Function.prototype.apply.call(e,r,i)},kr;ln&&typeof ln.ownKeys=="function"?kr=ln.ownKeys:Object.getOwnPropertySymbols?kr=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:kr=function(e){return Object.getOwnPropertyNames(e)};function xh(n){console&&console.warn&&console.warn(n)}var ws=Number.isNaN||function(e){return e!==e};function re(){re.init.call(this)}go.exports=re;go.exports.once=Rh;re.EventEmitter=re;re.prototype._events=void 0;re.prototype._eventsCount=0;re.prototype._maxListeners=void 0;var aa=10;function ai(n){if(typeof n!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof n)}Object.defineProperty(re,"defaultMaxListeners",{enumerable:!0,get:function(){return aa},set:function(n){if(typeof n!="number"||n<0||ws(n))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+n+".");aa=n}});re.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};re.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||ws(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function xs(n){return n._maxListeners===void 0?re.defaultMaxListeners:n._maxListeners}re.prototype.getMaxListeners=function(){return xs(this)};re.prototype.emit=function(e){for(var r=[],i=1;i0&&(s=r[0]),s instanceof Error)throw s;var l=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw l.context=s,l}var c=a[e];if(c===void 0)return!1;if(typeof c=="function")oa(c,this,r);else for(var u=c.length,d=ks(c,u),i=0;i0&&s.length>o&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=n,l.type=e,l.count=s.length,xh(l)}return n}re.prototype.addListener=function(e,r){return Ss(this,e,r,!1)};re.prototype.on=re.prototype.addListener;re.prototype.prependListener=function(e,r){return Ss(this,e,r,!0)};function Sh(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function _s(n,e,r){var i={fired:!1,wrapFn:void 0,target:n,type:e,listener:r},o=Sh.bind(i);return o.listener=r,i.wrapFn=o,o}re.prototype.once=function(e,r){return ai(r),this.on(e,_s(this,e,r)),this};re.prototype.prependOnceListener=function(e,r){return ai(r),this.prependListener(e,_s(this,e,r)),this};re.prototype.removeListener=function(e,r){var i,o,a,s,l;if(ai(r),o=this._events,o===void 0)return this;if(i=o[e],i===void 0)return this;if(i===r||i.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete o[e],o.removeListener&&this.emit("removeListener",e,i.listener||r));else if(typeof i!="function"){for(a=-1,s=i.length-1;s>=0;s--)if(i[s]===r||i[s].listener===r){l=i[s].listener,a=s;break}if(a<0)return this;a===0?i.shift():_h(i,a),i.length===1&&(o[e]=i[0]),o.removeListener!==void 0&&this.emit("removeListener",e,l||r)}return this};re.prototype.off=re.prototype.removeListener;re.prototype.removeAllListeners=function(e){var r,i,o;if(i=this._events,i===void 0)return this;if(i.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):i[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete i[e]),this;if(arguments.length===0){var a=Object.keys(i),s;for(o=0;o=0;o--)this.removeListener(e,r[o]);return this};function Ns(n,e,r){var i=n._events;if(i===void 0)return[];var o=i[e];return o===void 0?[]:typeof o=="function"?r?[o.listener||o]:[o]:r?Nh(o):ks(o,o.length)}re.prototype.listeners=function(e){return Ns(this,e,!0)};re.prototype.rawListeners=function(e){return Ns(this,e,!1)};re.listenerCount=function(n,e){return typeof n.listenerCount=="function"?n.listenerCount(e):Rs.call(n,e)};re.prototype.listenerCount=Rs;function Rs(n){var e=this._events;if(e!==void 0){var r=e[n];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}re.prototype.eventNames=function(){return this._eventsCount>0?kr(this._events):[]};function ks(n,e){for(var r=new Array(e),i=0;i=e?{done:!0}:{done:!1,value:n[r++]}})};ut.empty=function(){var n=new ut(function(){return{done:!0}});return n};ut.fromSequence=function(n){var e=0,r=n.length;return new ut(function(){return e>=r?{done:!0}:{done:!1,value:n[e++]}})};ut.is=function(n){return n instanceof ut?!0:typeof n=="object"&&n!==null&&typeof n.next=="function"};var mo=ut;const Qe=ao(mo);var yo={};yo.ARRAY_BUFFER_SUPPORT=typeof ArrayBuffer<"u";yo.SYMBOL_SUPPORT=typeof Symbol<"u";var Ah=mo,As=yo,Th=As.ARRAY_BUFFER_SUPPORT,Eh=As.SYMBOL_SUPPORT;function Oh(n){return typeof n=="string"||Array.isArray(n)||Th&&ArrayBuffer.isView(n)?Ah.fromSequence(n):typeof n!="object"||n===null?null:Eh&&typeof n[Symbol.iterator]=="function"?n[Symbol.iterator]():typeof n.next=="function"?n:null}var Ts=function(e){var r=Oh(e);if(!r)throw new Error("obliterator: target is not iterable nor a valid iterator.");return r},Lh=Ts,Mh=function(e,r){for(var i=arguments.length>1?r:1/0,o=i!==1/0?new Array(i):[],a,s=0,l=Lh(e);;){if(s===i)return o;if(a=l.next(),a.done)return s!==r&&(o.length=s),o;o[s++]=a.value}};const Es=ao(Mh);var jh=mo,$h=Ts,Ph=function(){var e=arguments,r=null,i=-1;return new jh(function(){var a=null;do{if(r===null){if(i++,i>=e.length)return{done:!0};r=$h(e[i])}if(a=r.next(),a.done===!0){r=null;continue}break}while(!0);return a})};const wt=ao(Ph);function Ih(){const n=arguments[0];for(let e=1,r=arguments.length;en++}class bo extends Error{constructor(e){super(),this.name="GraphError",this.message=e}}class E extends bo{constructor(e){super(e),this.name="InvalidArgumentsGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,E.prototype.constructor)}}class C extends bo{constructor(e){super(e),this.name="NotFoundGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,C.prototype.constructor)}}class B extends bo{constructor(e){super(e),this.name="UsageGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,B.prototype.constructor)}}function Ls(n,e){this.key=n,this.attributes=e,this.clear()}Ls.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.undirectedDegree=0,this.undirectedLoops=0,this.directedLoops=0,this.in={},this.out={},this.undirected={}};function Ms(n,e){this.key=n,this.attributes=e,this.clear()}Ms.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.directedLoops=0,this.in={},this.out={}};function js(n,e){this.key=n,this.attributes=e,this.clear()}js.prototype.clear=function(){this.undirectedDegree=0,this.undirectedLoops=0,this.undirected={}};function gn(n,e,r,i,o){this.key=e,this.attributes=o,this.undirected=n,this.source=r,this.target=i}gn.prototype.attach=function(){let n="out",e="in";this.undirected&&(n=e="undirected");const r=this.source.key,i=this.target.key;this.source[n][i]=this,!(this.undirected&&r===i)&&(this.target[e][r]=this)};gn.prototype.attachMulti=function(){let n="out",e="in";const r=this.source.key,i=this.target.key;this.undirected&&(n=e="undirected");const o=this.source[n],a=o[i];if(typeof a>"u"){o[i]=this,this.undirected&&r===i||(this.target[e][r]=this);return}a.previous=this,this.next=a,o[i]=this,this.target[e][r]=this};gn.prototype.detach=function(){const n=this.source.key,e=this.target.key;let r="out",i="in";this.undirected&&(r=i="undirected"),delete this.source[r][e],delete this.target[i][n]};gn.prototype.detachMulti=function(){const n=this.source.key,e=this.target.key;let r="out",i="in";this.undirected&&(r=i="undirected"),this.previous===void 0?this.next===void 0?(delete this.source[r][e],delete this.target[i][n]):(this.next.previous=void 0,this.source[r][e]=this.next,this.target[i][n]=this.next):(this.previous.next=this.next,this.next!==void 0&&(this.next.previous=this.previous))};const $s=0,Ps=1,Bh=2,Is=3;function xt(n,e,r,i,o,a,s){let l,c,u,d;if(i=""+i,r===$s){if(l=n._nodes.get(i),!l)throw new C("Graph.".concat(e,': could not find the "').concat(i,'" node in the graph.'));u=o,d=a}else if(r===Is){if(o=""+o,c=n._edges.get(o),!c)throw new C("Graph.".concat(e,': could not find the "').concat(o,'" edge in the graph.'));const h=c.source.key,p=c.target.key;if(i===h)l=c.target;else if(i===p)l=c.source;else throw new C("Graph.".concat(e,': the "').concat(i,'" node is not attached to the "').concat(o,'" edge (').concat(h,", ").concat(p,")."));u=a,d=s}else{if(c=n._edges.get(i),!c)throw new C("Graph.".concat(e,': could not find the "').concat(i,'" edge in the graph.'));r===Ps?l=c.source:l=c.target,u=o,d=a}return[l,u,d]}function zh(n,e,r){n.prototype[e]=function(i,o,a){const[s,l]=xt(this,e,r,i,o,a);return s.attributes[l]}}function Fh(n,e,r){n.prototype[e]=function(i,o){const[a]=xt(this,e,r,i,o);return a.attributes}}function Gh(n,e,r){n.prototype[e]=function(i,o,a){const[s,l]=xt(this,e,r,i,o,a);return s.attributes.hasOwnProperty(l)}}function Uh(n,e,r){n.prototype[e]=function(i,o,a,s){const[l,c,u]=xt(this,e,r,i,o,a,s);return l.attributes[c]=u,this.emit("nodeAttributesUpdated",{key:l.key,type:"set",attributes:l.attributes,name:c}),this}}function Wh(n,e,r){n.prototype[e]=function(i,o,a,s){const[l,c,u]=xt(this,e,r,i,o,a,s);if(typeof u!="function")throw new E("Graph.".concat(e,": updater should be a function."));const d=l.attributes,h=u(d[c]);return d[c]=h,this.emit("nodeAttributesUpdated",{key:l.key,type:"set",attributes:l.attributes,name:c}),this}}function Vh(n,e,r){n.prototype[e]=function(i,o,a){const[s,l]=xt(this,e,r,i,o,a);return delete s.attributes[l],this.emit("nodeAttributesUpdated",{key:s.key,type:"remove",attributes:s.attributes,name:l}),this}}function Hh(n,e,r){n.prototype[e]=function(i,o,a){const[s,l]=xt(this,e,r,i,o,a);if(!Re(l))throw new E("Graph.".concat(e,": provided attributes are not a plain object."));return s.attributes=l,this.emit("nodeAttributesUpdated",{key:s.key,type:"replace",attributes:s.attributes}),this}}function Jh(n,e,r){n.prototype[e]=function(i,o,a){const[s,l]=xt(this,e,r,i,o,a);if(!Re(l))throw new E("Graph.".concat(e,": provided attributes are not a plain object."));return be(s.attributes,l),this.emit("nodeAttributesUpdated",{key:s.key,type:"merge",attributes:s.attributes,data:l}),this}}function Kh(n,e,r){n.prototype[e]=function(i,o,a){const[s,l]=xt(this,e,r,i,o,a);if(typeof l!="function")throw new E("Graph.".concat(e,": provided updater is not a function."));return s.attributes=l(s.attributes),this.emit("nodeAttributesUpdated",{key:s.key,type:"update",attributes:s.attributes}),this}}const Yh=[{name:n=>"get".concat(n,"Attribute"),attacher:zh},{name:n=>"get".concat(n,"Attributes"),attacher:Fh},{name:n=>"has".concat(n,"Attribute"),attacher:Gh},{name:n=>"set".concat(n,"Attribute"),attacher:Uh},{name:n=>"update".concat(n,"Attribute"),attacher:Wh},{name:n=>"remove".concat(n,"Attribute"),attacher:Vh},{name:n=>"replace".concat(n,"Attributes"),attacher:Hh},{name:n=>"merge".concat(n,"Attributes"),attacher:Jh},{name:n=>"update".concat(n,"Attributes"),attacher:Kh}];function qh(n){Yh.forEach(function({name:e,attacher:r}){r(n,e("Node"),$s),r(n,e("Source"),Ps),r(n,e("Target"),Bh),r(n,e("Opposite"),Is)})}function Qh(n,e,r){n.prototype[e]=function(i,o){let a;if(this.type!=="mixed"&&r!=="mixed"&&r!==this.type)throw new B("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new B("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));const s=""+i,l=""+o;if(o=arguments[2],a=qe(this,s,l,r),!a)throw new C("Graph.".concat(e,': could not find an edge for the given path ("').concat(s,'" - "').concat(l,'").'))}else{if(r!=="mixed")throw new B("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(i=""+i,a=this._edges.get(i),!a)throw new C("Graph.".concat(e,': could not find the "').concat(i,'" edge in the graph.'))}return a.attributes[o]}}function Xh(n,e,r){n.prototype[e]=function(i){let o;if(this.type!=="mixed"&&r!=="mixed"&&r!==this.type)throw new B("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>1){if(this.multi)throw new B("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));const a=""+i,s=""+arguments[1];if(o=qe(this,a,s,r),!o)throw new C("Graph.".concat(e,': could not find an edge for the given path ("').concat(a,'" - "').concat(s,'").'))}else{if(r!=="mixed")throw new B("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(i=""+i,o=this._edges.get(i),!o)throw new C("Graph.".concat(e,': could not find the "').concat(i,'" edge in the graph.'))}return o.attributes}}function Zh(n,e,r){n.prototype[e]=function(i,o){let a;if(this.type!=="mixed"&&r!=="mixed"&&r!==this.type)throw new B("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new B("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));const s=""+i,l=""+o;if(o=arguments[2],a=qe(this,s,l,r),!a)throw new C("Graph.".concat(e,': could not find an edge for the given path ("').concat(s,'" - "').concat(l,'").'))}else{if(r!=="mixed")throw new B("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(i=""+i,a=this._edges.get(i),!a)throw new C("Graph.".concat(e,': could not find the "').concat(i,'" edge in the graph.'))}return a.attributes.hasOwnProperty(o)}}function ep(n,e,r){n.prototype[e]=function(i,o,a){let s;if(this.type!=="mixed"&&r!=="mixed"&&r!==this.type)throw new B("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>3){if(this.multi)throw new B("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));const l=""+i,c=""+o;if(o=arguments[2],a=arguments[3],s=qe(this,l,c,r),!s)throw new C("Graph.".concat(e,': could not find an edge for the given path ("').concat(l,'" - "').concat(c,'").'))}else{if(r!=="mixed")throw new B("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(i=""+i,s=this._edges.get(i),!s)throw new C("Graph.".concat(e,': could not find the "').concat(i,'" edge in the graph.'))}return s.attributes[o]=a,this.emit("edgeAttributesUpdated",{key:s.key,type:"set",attributes:s.attributes,name:o}),this}}function tp(n,e,r){n.prototype[e]=function(i,o,a){let s;if(this.type!=="mixed"&&r!=="mixed"&&r!==this.type)throw new B("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>3){if(this.multi)throw new B("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));const l=""+i,c=""+o;if(o=arguments[2],a=arguments[3],s=qe(this,l,c,r),!s)throw new C("Graph.".concat(e,': could not find an edge for the given path ("').concat(l,'" - "').concat(c,'").'))}else{if(r!=="mixed")throw new B("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(i=""+i,s=this._edges.get(i),!s)throw new C("Graph.".concat(e,': could not find the "').concat(i,'" edge in the graph.'))}if(typeof a!="function")throw new E("Graph.".concat(e,": updater should be a function."));return s.attributes[o]=a(s.attributes[o]),this.emit("edgeAttributesUpdated",{key:s.key,type:"set",attributes:s.attributes,name:o}),this}}function np(n,e,r){n.prototype[e]=function(i,o){let a;if(this.type!=="mixed"&&r!=="mixed"&&r!==this.type)throw new B("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new B("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));const s=""+i,l=""+o;if(o=arguments[2],a=qe(this,s,l,r),!a)throw new C("Graph.".concat(e,': could not find an edge for the given path ("').concat(s,'" - "').concat(l,'").'))}else{if(r!=="mixed")throw new B("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(i=""+i,a=this._edges.get(i),!a)throw new C("Graph.".concat(e,': could not find the "').concat(i,'" edge in the graph.'))}return delete a.attributes[o],this.emit("edgeAttributesUpdated",{key:a.key,type:"remove",attributes:a.attributes,name:o}),this}}function rp(n,e,r){n.prototype[e]=function(i,o){let a;if(this.type!=="mixed"&&r!=="mixed"&&r!==this.type)throw new B("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new B("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));const s=""+i,l=""+o;if(o=arguments[2],a=qe(this,s,l,r),!a)throw new C("Graph.".concat(e,': could not find an edge for the given path ("').concat(s,'" - "').concat(l,'").'))}else{if(r!=="mixed")throw new B("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(i=""+i,a=this._edges.get(i),!a)throw new C("Graph.".concat(e,': could not find the "').concat(i,'" edge in the graph.'))}if(!Re(o))throw new E("Graph.".concat(e,": provided attributes are not a plain object."));return a.attributes=o,this.emit("edgeAttributesUpdated",{key:a.key,type:"replace",attributes:a.attributes}),this}}function ip(n,e,r){n.prototype[e]=function(i,o){let a;if(this.type!=="mixed"&&r!=="mixed"&&r!==this.type)throw new B("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new B("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));const s=""+i,l=""+o;if(o=arguments[2],a=qe(this,s,l,r),!a)throw new C("Graph.".concat(e,': could not find an edge for the given path ("').concat(s,'" - "').concat(l,'").'))}else{if(r!=="mixed")throw new B("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(i=""+i,a=this._edges.get(i),!a)throw new C("Graph.".concat(e,': could not find the "').concat(i,'" edge in the graph.'))}if(!Re(o))throw new E("Graph.".concat(e,": provided attributes are not a plain object."));return be(a.attributes,o),this.emit("edgeAttributesUpdated",{key:a.key,type:"merge",attributes:a.attributes,data:o}),this}}function op(n,e,r){n.prototype[e]=function(i,o){let a;if(this.type!=="mixed"&&r!=="mixed"&&r!==this.type)throw new B("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new B("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));const s=""+i,l=""+o;if(o=arguments[2],a=qe(this,s,l,r),!a)throw new C("Graph.".concat(e,': could not find an edge for the given path ("').concat(s,'" - "').concat(l,'").'))}else{if(r!=="mixed")throw new B("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(i=""+i,a=this._edges.get(i),!a)throw new C("Graph.".concat(e,': could not find the "').concat(i,'" edge in the graph.'))}if(typeof o!="function")throw new E("Graph.".concat(e,": provided updater is not a function."));return a.attributes=o(a.attributes),this.emit("edgeAttributesUpdated",{key:a.key,type:"update",attributes:a.attributes}),this}}const ap=[{name:n=>"get".concat(n,"Attribute"),attacher:Qh},{name:n=>"get".concat(n,"Attributes"),attacher:Xh},{name:n=>"has".concat(n,"Attribute"),attacher:Zh},{name:n=>"set".concat(n,"Attribute"),attacher:ep},{name:n=>"update".concat(n,"Attribute"),attacher:tp},{name:n=>"remove".concat(n,"Attribute"),attacher:np},{name:n=>"replace".concat(n,"Attributes"),attacher:rp},{name:n=>"merge".concat(n,"Attributes"),attacher:ip},{name:n=>"update".concat(n,"Attributes"),attacher:op}];function sp(n){ap.forEach(function({name:e,attacher:r}){r(n,e("Edge"),"mixed"),r(n,e("DirectedEdge"),"directed"),r(n,e("UndirectedEdge"),"undirected")})}const lp=[{name:"edges",type:"mixed"},{name:"inEdges",type:"directed",direction:"in"},{name:"outEdges",type:"directed",direction:"out"},{name:"inboundEdges",type:"mixed",direction:"in"},{name:"outboundEdges",type:"mixed",direction:"out"},{name:"directedEdges",type:"directed"},{name:"undirectedEdges",type:"undirected"}];function cp(n,e,r,i){let o=!1;for(const a in e){if(a===i)continue;const s=e[a];if(o=r(s.key,s.attributes,s.source.key,s.target.key,s.source.attributes,s.target.attributes,s.undirected),n&&o)return s.key}}function up(n,e,r,i){let o,a,s,l=!1;for(const c in e)if(c!==i){o=e[c];do{if(a=o.source,s=o.target,l=r(o.key,o.attributes,a.key,s.key,a.attributes,s.attributes,o.undirected),n&&l)return o.key;o=o.next}while(o!==void 0)}}function Ci(n,e){const r=Object.keys(n),i=r.length;let o,a=0;return new Qe(function(){do if(o)o=o.next;else{if(a>=i)return{done:!0};const l=r[a++];if(l===e){o=void 0;continue}o=n[l]}while(!o);return{done:!1,value:{edge:o.key,attributes:o.attributes,source:o.source.key,target:o.target.key,sourceAttributes:o.source.attributes,targetAttributes:o.target.attributes,undirected:o.undirected}}})}function dp(n,e,r,i){const o=e[r];if(!o)return;const a=o.source,s=o.target;if(i(o.key,o.attributes,a.key,s.key,a.attributes,s.attributes,o.undirected)&&n)return o.key}function hp(n,e,r,i){let o=e[r];if(!o)return;let a=!1;do{if(a=i(o.key,o.attributes,o.source.key,o.target.key,o.source.attributes,o.target.attributes,o.undirected),n&&a)return o.key;o=o.next}while(o!==void 0)}function Ai(n,e){let r=n[e];return r.next!==void 0?new Qe(function(){if(!r)return{done:!0};const i={edge:r.key,attributes:r.attributes,source:r.source.key,target:r.target.key,sourceAttributes:r.source.attributes,targetAttributes:r.target.attributes,undirected:r.undirected};return r=r.next,{done:!1,value:i}}):Qe.of({edge:r.key,attributes:r.attributes,source:r.source.key,target:r.target.key,sourceAttributes:r.source.attributes,targetAttributes:r.target.attributes,undirected:r.undirected})}function pp(n,e){if(n.size===0)return[];if(e==="mixed"||e===n.type)return typeof Array.from=="function"?Array.from(n._edges.keys()):Es(n._edges.keys(),n._edges.size);const r=e==="undirected"?n.undirectedSize:n.directedSize,i=new Array(r),o=e==="undirected",a=n._edges.values();let s=0,l,c;for(;l=a.next(),l.done!==!0;)c=l.value,c.undirected===o&&(i[s++]=c.key);return i}function Ds(n,e,r,i){if(e.size===0)return;const o=r!=="mixed"&&r!==e.type,a=r==="undirected";let s,l,c=!1;const u=e._edges.values();for(;s=u.next(),s.done!==!0;){if(l=s.value,o&&l.undirected!==a)continue;const{key:d,attributes:h,source:p,target:g}=l;if(c=i(d,h,p.key,g.key,p.attributes,g.attributes,l.undirected),n&&c)return d}}function fp(n,e){if(n.size===0)return Qe.empty();const r=e!=="mixed"&&e!==n.type,i=e==="undirected",o=n._edges.values();return new Qe(function(){let s,l;for(;;){if(s=o.next(),s.done)return s;if(l=s.value,!(r&&l.undirected!==i))break}return{value:{edge:l.key,attributes:l.attributes,source:l.source.key,target:l.target.key,sourceAttributes:l.source.attributes,targetAttributes:l.target.attributes,undirected:l.undirected},done:!1}})}function vo(n,e,r,i,o,a){const s=e?up:cp;let l;if(r!=="undirected"&&(i!=="out"&&(l=s(n,o.in,a),n&&l)||i!=="in"&&(l=s(n,o.out,a,i?void 0:o.key),n&&l))||r!=="directed"&&(l=s(n,o.undirected,a),n&&l))return l}function gp(n,e,r,i){const o=[];return vo(!1,n,e,r,i,function(a){o.push(a)}),o}function mp(n,e,r){let i=Qe.empty();return n!=="undirected"&&(e!=="out"&&typeof r.in<"u"&&(i=wt(i,Ci(r.in))),e!=="in"&&typeof r.out<"u"&&(i=wt(i,Ci(r.out,e?void 0:r.key)))),n!=="directed"&&typeof r.undirected<"u"&&(i=wt(i,Ci(r.undirected))),i}function wo(n,e,r,i,o,a,s){const l=r?hp:dp;let c;if(e!=="undirected"&&(typeof o.in<"u"&&i!=="out"&&(c=l(n,o.in,a,s),n&&c)||typeof o.out<"u"&&i!=="in"&&(i||o.key!==a)&&(c=l(n,o.out,a,s),n&&c))||e!=="directed"&&typeof o.undirected<"u"&&(c=l(n,o.undirected,a,s),n&&c))return c}function yp(n,e,r,i,o){const a=[];return wo(!1,n,e,r,i,o,function(s){a.push(s)}),a}function bp(n,e,r,i){let o=Qe.empty();return n!=="undirected"&&(typeof r.in<"u"&&e!=="out"&&i in r.in&&(o=wt(o,Ai(r.in,i))),typeof r.out<"u"&&e!=="in"&&i in r.out&&(e||r.key!==i)&&(o=wt(o,Ai(r.out,i)))),n!=="directed"&&typeof r.undirected<"u"&&i in r.undirected&&(o=wt(o,Ai(r.undirected,i))),o}function vp(n,e){const{name:r,type:i,direction:o}=e;n.prototype[r]=function(a,s){if(i!=="mixed"&&this.type!=="mixed"&&i!==this.type)return[];if(!arguments.length)return pp(this,i);if(arguments.length===1){a=""+a;const l=this._nodes.get(a);if(typeof l>"u")throw new C("Graph.".concat(r,': could not find the "').concat(a,'" node in the graph.'));return gp(this.multi,i==="mixed"?this.type:i,o,l)}if(arguments.length===2){a=""+a,s=""+s;const l=this._nodes.get(a);if(!l)throw new C("Graph.".concat(r,': could not find the "').concat(a,'" source node in the graph.'));if(!this._nodes.has(s))throw new C("Graph.".concat(r,': could not find the "').concat(s,'" target node in the graph.'));return yp(i,this.multi,o,l,s)}throw new E("Graph.".concat(r,": too many arguments (expecting 0, 1 or 2 and got ").concat(arguments.length,")."))}}function wp(n,e){const{name:r,type:i,direction:o}=e,a="forEach"+r[0].toUpperCase()+r.slice(1,-1);n.prototype[a]=function(u,d,h){if(!(i!=="mixed"&&this.type!=="mixed"&&i!==this.type)){if(arguments.length===1)return h=u,Ds(!1,this,i,h);if(arguments.length===2){u=""+u,h=d;const p=this._nodes.get(u);if(typeof p>"u")throw new C("Graph.".concat(a,': could not find the "').concat(u,'" node in the graph.'));return vo(!1,this.multi,i==="mixed"?this.type:i,o,p,h)}if(arguments.length===3){u=""+u,d=""+d;const p=this._nodes.get(u);if(!p)throw new C("Graph.".concat(a,': could not find the "').concat(u,'" source node in the graph.'));if(!this._nodes.has(d))throw new C("Graph.".concat(a,': could not find the "').concat(d,'" target node in the graph.'));return wo(!1,i,this.multi,o,p,d,h)}throw new E("Graph.".concat(a,": too many arguments (expecting 1, 2 or 3 and got ").concat(arguments.length,")."))}};const s="map"+r[0].toUpperCase()+r.slice(1);n.prototype[s]=function(){const u=Array.prototype.slice.call(arguments),d=u.pop();let h;if(u.length===0){let p=0;i!=="directed"&&(p+=this.undirectedSize),i!=="undirected"&&(p+=this.directedSize),h=new Array(p);let g=0;u.push((y,w,_,S,R,j,M)=>{h[g++]=d(y,w,_,S,R,j,M)})}else h=[],u.push((p,g,y,w,_,S,R)=>{h.push(d(p,g,y,w,_,S,R))});return this[a].apply(this,u),h};const l="filter"+r[0].toUpperCase()+r.slice(1);n.prototype[l]=function(){const u=Array.prototype.slice.call(arguments),d=u.pop(),h=[];return u.push((p,g,y,w,_,S,R)=>{d(p,g,y,w,_,S,R)&&h.push(p)}),this[a].apply(this,u),h};const c="reduce"+r[0].toUpperCase()+r.slice(1);n.prototype[c]=function(){let u=Array.prototype.slice.call(arguments);if(u.length<2||u.length>4)throw new E("Graph.".concat(c,": invalid number of arguments (expecting 2, 3 or 4 and got ").concat(u.length,")."));if(typeof u[u.length-1]=="function"&&typeof u[u.length-2]!="function")throw new E("Graph.".concat(c,": missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array."));let d,h;u.length===2?(d=u[0],h=u[1],u=[]):u.length===3?(d=u[1],h=u[2],u=[u[0]]):u.length===4&&(d=u[2],h=u[3],u=[u[0],u[1]]);let p=h;return u.push((g,y,w,_,S,R,j)=>{p=d(p,g,y,w,_,S,R,j)}),this[a].apply(this,u),p}}function xp(n,e){const{name:r,type:i,direction:o}=e,a="find"+r[0].toUpperCase()+r.slice(1,-1);n.prototype[a]=function(c,u,d){if(i!=="mixed"&&this.type!=="mixed"&&i!==this.type)return!1;if(arguments.length===1)return d=c,Ds(!0,this,i,d);if(arguments.length===2){c=""+c,d=u;const h=this._nodes.get(c);if(typeof h>"u")throw new C("Graph.".concat(a,': could not find the "').concat(c,'" node in the graph.'));return vo(!0,this.multi,i==="mixed"?this.type:i,o,h,d)}if(arguments.length===3){c=""+c,u=""+u;const h=this._nodes.get(c);if(!h)throw new C("Graph.".concat(a,': could not find the "').concat(c,'" source node in the graph.'));if(!this._nodes.has(u))throw new C("Graph.".concat(a,': could not find the "').concat(u,'" target node in the graph.'));return wo(!0,i,this.multi,o,h,u,d)}throw new E("Graph.".concat(a,": too many arguments (expecting 1, 2 or 3 and got ").concat(arguments.length,")."))};const s="some"+r[0].toUpperCase()+r.slice(1,-1);n.prototype[s]=function(){const c=Array.prototype.slice.call(arguments),u=c.pop();return c.push((h,p,g,y,w,_,S)=>u(h,p,g,y,w,_,S)),!!this[a].apply(this,c)};const l="every"+r[0].toUpperCase()+r.slice(1,-1);n.prototype[l]=function(){const c=Array.prototype.slice.call(arguments),u=c.pop();return c.push((h,p,g,y,w,_,S)=>!u(h,p,g,y,w,_,S)),!this[a].apply(this,c)}}function Sp(n,e){const{name:r,type:i,direction:o}=e,a=r.slice(0,-1)+"Entries";n.prototype[a]=function(s,l){if(i!=="mixed"&&this.type!=="mixed"&&i!==this.type)return Qe.empty();if(!arguments.length)return fp(this,i);if(arguments.length===1){s=""+s;const c=this._nodes.get(s);if(!c)throw new C("Graph.".concat(a,': could not find the "').concat(s,'" node in the graph.'));return mp(i,o,c)}if(arguments.length===2){s=""+s,l=""+l;const c=this._nodes.get(s);if(!c)throw new C("Graph.".concat(a,': could not find the "').concat(s,'" source node in the graph.'));if(!this._nodes.has(l))throw new C("Graph.".concat(a,': could not find the "').concat(l,'" target node in the graph.'));return bp(i,o,c,l)}throw new E("Graph.".concat(a,": too many arguments (expecting 0, 1 or 2 and got ").concat(arguments.length,")."))}}function _p(n){lp.forEach(e=>{vp(n,e),wp(n,e),xp(n,e),Sp(n,e)})}const Np=[{name:"neighbors",type:"mixed"},{name:"inNeighbors",type:"directed",direction:"in"},{name:"outNeighbors",type:"directed",direction:"out"},{name:"inboundNeighbors",type:"mixed",direction:"in"},{name:"outboundNeighbors",type:"mixed",direction:"out"},{name:"directedNeighbors",type:"directed"},{name:"undirectedNeighbors",type:"undirected"}];function si(){this.A=null,this.B=null}si.prototype.wrap=function(n){this.A===null?this.A=n:this.B===null&&(this.B=n)};si.prototype.has=function(n){return this.A!==null&&n in this.A||this.B!==null&&n in this.B};function En(n,e,r,i,o){for(const a in i){const s=i[a],l=s.source,c=s.target,u=l===r?c:l;if(e&&e.has(u.key))continue;const d=o(u.key,u.attributes);if(n&&d)return u.key}}function xo(n,e,r,i,o){if(e!=="mixed"){if(e==="undirected")return En(n,null,i,i.undirected,o);if(typeof r=="string")return En(n,null,i,i[r],o)}const a=new si;let s;if(e!=="undirected"){if(r!=="out"){if(s=En(n,null,i,i.in,o),n&&s)return s;a.wrap(i.in)}if(r!=="in"){if(s=En(n,a,i,i.out,o),n&&s)return s;a.wrap(i.out)}}if(e!=="directed"&&(s=En(n,a,i,i.undirected,o),n&&s))return s}function Rp(n,e,r){if(n!=="mixed"){if(n==="undirected")return Object.keys(r.undirected);if(typeof e=="string")return Object.keys(r[e])}const i=[];return xo(!1,n,e,r,function(o){i.push(o)}),i}function On(n,e,r){const i=Object.keys(r),o=i.length;let a=0;return new Qe(function(){let l=null;do{if(a>=o)return n&&n.wrap(r),{done:!0};const c=r[i[a++]],u=c.source,d=c.target;if(l=u===e?d:u,n&&n.has(l.key)){l=null;continue}}while(l===null);return{done:!1,value:{neighbor:l.key,attributes:l.attributes}}})}function kp(n,e,r){if(n!=="mixed"){if(n==="undirected")return On(null,r,r.undirected);if(typeof e=="string")return On(null,r,r[e])}let i=Qe.empty();const o=new si;return n!=="undirected"&&(e!=="out"&&(i=wt(i,On(o,r,r.in))),e!=="in"&&(i=wt(i,On(o,r,r.out)))),n!=="directed"&&(i=wt(i,On(o,r,r.undirected))),i}function Cp(n,e){const{name:r,type:i,direction:o}=e;n.prototype[r]=function(a){if(i!=="mixed"&&this.type!=="mixed"&&i!==this.type)return[];a=""+a;const s=this._nodes.get(a);if(typeof s>"u")throw new C("Graph.".concat(r,': could not find the "').concat(a,'" node in the graph.'));return Rp(i==="mixed"?this.type:i,o,s)}}function Ap(n,e){const{name:r,type:i,direction:o}=e,a="forEach"+r[0].toUpperCase()+r.slice(1,-1);n.prototype[a]=function(u,d){if(i!=="mixed"&&this.type!=="mixed"&&i!==this.type)return;u=""+u;const h=this._nodes.get(u);if(typeof h>"u")throw new C("Graph.".concat(a,': could not find the "').concat(u,'" node in the graph.'));xo(!1,i==="mixed"?this.type:i,o,h,d)};const s="map"+r[0].toUpperCase()+r.slice(1);n.prototype[s]=function(u,d){const h=[];return this[a](u,(p,g)=>{h.push(d(p,g))}),h};const l="filter"+r[0].toUpperCase()+r.slice(1);n.prototype[l]=function(u,d){const h=[];return this[a](u,(p,g)=>{d(p,g)&&h.push(p)}),h};const c="reduce"+r[0].toUpperCase()+r.slice(1);n.prototype[c]=function(u,d,h){if(arguments.length<3)throw new E("Graph.".concat(c,": missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array."));let p=h;return this[a](u,(g,y)=>{p=d(p,g,y)}),p}}function Tp(n,e){const{name:r,type:i,direction:o}=e,a=r[0].toUpperCase()+r.slice(1,-1),s="find"+a;n.prototype[s]=function(u,d){if(i!=="mixed"&&this.type!=="mixed"&&i!==this.type)return;u=""+u;const h=this._nodes.get(u);if(typeof h>"u")throw new C("Graph.".concat(s,': could not find the "').concat(u,'" node in the graph.'));return xo(!0,i==="mixed"?this.type:i,o,h,d)};const l="some"+a;n.prototype[l]=function(u,d){return!!this[s](u,d)};const c="every"+a;n.prototype[c]=function(u,d){return!this[s](u,(p,g)=>!d(p,g))}}function Ep(n,e){const{name:r,type:i,direction:o}=e,a=r.slice(0,-1)+"Entries";n.prototype[a]=function(s){if(i!=="mixed"&&this.type!=="mixed"&&i!==this.type)return Qe.empty();s=""+s;const l=this._nodes.get(s);if(typeof l>"u")throw new C("Graph.".concat(a,': could not find the "').concat(s,'" node in the graph.'));return kp(i==="mixed"?this.type:i,o,l)}}function Op(n){Np.forEach(e=>{Cp(n,e),Ap(n,e),Tp(n,e),Ep(n,e)})}function fr(n,e,r,i,o){const a=i._nodes.values(),s=i.type;let l,c,u,d,h,p;for(;l=a.next(),l.done!==!0;){let g=!1;if(c=l.value,s!=="undirected"){d=c.out;for(u in d){h=d[u];do p=h.target,g=!0,o(c.key,p.key,c.attributes,p.attributes,h.key,h.attributes,h.undirected),h=h.next;while(h)}}if(s!=="directed"){d=c.undirected;for(u in d)if(!(e&&c.key>u)){h=d[u];do p=h.target,p.key!==u&&(p=h.source),g=!0,o(c.key,p.key,c.attributes,p.attributes,h.key,h.attributes,h.undirected),h=h.next;while(h)}}r&&!g&&o(c.key,null,c.attributes,null,null,null,null)}}function Lp(n,e){const r={key:n};return Os(e.attributes)||(r.attributes=be({},e.attributes)),r}function Mp(n,e,r){const i={key:e,source:r.source.key,target:r.target.key};return Os(r.attributes)||(i.attributes=be({},r.attributes)),n==="mixed"&&r.undirected&&(i.undirected=!0),i}function jp(n){if(!Re(n))throw new E('Graph.import: invalid serialized node. A serialized node should be a plain object with at least a "key" property.');if(!("key"in n))throw new E("Graph.import: serialized node is missing its key.");if("attributes"in n&&(!Re(n.attributes)||n.attributes===null))throw new E("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.")}function $p(n){if(!Re(n))throw new E('Graph.import: invalid serialized edge. A serialized edge should be a plain object with at least a "source" & "target" property.');if(!("source"in n))throw new E("Graph.import: serialized edge is missing its source.");if(!("target"in n))throw new E("Graph.import: serialized edge is missing its target.");if("attributes"in n&&(!Re(n.attributes)||n.attributes===null))throw new E("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.");if("undirected"in n&&typeof n.undirected!="boolean")throw new E("Graph.import: invalid undirectedness information. Undirected should be boolean or omitted.")}const Pp=Dh(),Ip=new Set(["directed","undirected","mixed"]),la=new Set(["domain","_events","_eventsCount","_maxListeners"]),Dp=[{name:n=>"".concat(n,"Edge"),generateKey:!0},{name:n=>"".concat(n,"DirectedEdge"),generateKey:!0,type:"directed"},{name:n=>"".concat(n,"UndirectedEdge"),generateKey:!0,type:"undirected"},{name:n=>"".concat(n,"EdgeWithKey")},{name:n=>"".concat(n,"DirectedEdgeWithKey"),type:"directed"},{name:n=>"".concat(n,"UndirectedEdgeWithKey"),type:"undirected"}],Bp={allowSelfLoops:!0,multi:!1,type:"mixed"};function zp(n,e,r){if(r&&!Re(r))throw new E('Graph.addNode: invalid attributes. Expecting an object but got "'.concat(r,'"'));if(e=""+e,r=r||{},n._nodes.has(e))throw new B('Graph.addNode: the "'.concat(e,'" node already exist in the graph.'));const i=new n.NodeDataClass(e,r);return n._nodes.set(e,i),n.emit("nodeAdded",{key:e,attributes:r}),i}function ca(n,e,r){const i=new n.NodeDataClass(e,r);return n._nodes.set(e,i),n.emit("nodeAdded",{key:e,attributes:r}),i}function Bs(n,e,r,i,o,a,s,l){if(!i&&n.type==="undirected")throw new B("Graph.".concat(e,": you cannot add a directed edge to an undirected graph. Use the #.addEdge or #.addUndirectedEdge instead."));if(i&&n.type==="directed")throw new B("Graph.".concat(e,": you cannot add an undirected edge to a directed graph. Use the #.addEdge or #.addDirectedEdge instead."));if(l&&!Re(l))throw new E("Graph.".concat(e,': invalid attributes. Expecting an object but got "').concat(l,'"'));if(a=""+a,s=""+s,l=l||{},!n.allowSelfLoops&&a===s)throw new B("Graph.".concat(e,': source & target are the same ("').concat(a,"\"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false."));const c=n._nodes.get(a),u=n._nodes.get(s);if(!c)throw new C("Graph.".concat(e,': source node "').concat(a,'" not found.'));if(!u)throw new C("Graph.".concat(e,': target node "').concat(s,'" not found.'));const d={key:null,undirected:i,source:a,target:s,attributes:l};if(r)o=n._edgeKeyGenerator();else if(o=""+o,n._edges.has(o))throw new B("Graph.".concat(e,': the "').concat(o,'" edge already exists in the graph.'));if(!n.multi&&(i?typeof c.undirected[s]<"u":typeof c.out[s]<"u"))throw new B("Graph.".concat(e,': an edge linking "').concat(a,'" to "').concat(s,"\" already exists. If you really want to add multiple edges linking those nodes, you should create a multi graph by using the 'multi' option."));const h=new gn(i,o,c,u,l);n._edges.set(o,h);const p=a===s;return i?(c.undirectedDegree++,u.undirectedDegree++,p&&(c.undirectedLoops++,n._undirectedSelfLoopCount++)):(c.outDegree++,u.inDegree++,p&&(c.directedLoops++,n._directedSelfLoopCount++)),n.multi?h.attachMulti():h.attach(),i?n._undirectedSize++:n._directedSize++,d.key=o,n.emit("edgeAdded",d),o}function Fp(n,e,r,i,o,a,s,l,c){if(!i&&n.type==="undirected")throw new B("Graph.".concat(e,": you cannot merge/update a directed edge to an undirected graph. Use the #.mergeEdge/#.updateEdge or #.addUndirectedEdge instead."));if(i&&n.type==="directed")throw new B("Graph.".concat(e,": you cannot merge/update an undirected edge to a directed graph. Use the #.mergeEdge/#.updateEdge or #.addDirectedEdge instead."));if(l){if(c){if(typeof l!="function")throw new E("Graph.".concat(e,': invalid updater function. Expecting a function but got "').concat(l,'"'))}else if(!Re(l))throw new E("Graph.".concat(e,': invalid attributes. Expecting an object but got "').concat(l,'"'))}a=""+a,s=""+s;let u;if(c&&(u=l,l=void 0),!n.allowSelfLoops&&a===s)throw new B("Graph.".concat(e,': source & target are the same ("').concat(a,"\"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false."));let d=n._nodes.get(a),h=n._nodes.get(s),p,g;if(!r&&(p=n._edges.get(o),p)){if((p.source.key!==a||p.target.key!==s)&&(!i||p.source.key!==s||p.target.key!==a))throw new B("Graph.".concat(e,': inconsistency detected when attempting to merge the "').concat(o,'" edge with "').concat(a,'" source & "').concat(s,'" target vs. ("').concat(p.source.key,'", "').concat(p.target.key,'").'));g=p}if(!g&&!n.multi&&d&&(g=i?d.undirected[s]:d.out[s]),g){const R=[g.key,!1,!1,!1];if(c?!u:!l)return R;if(c){const j=g.attributes;g.attributes=u(j),n.emit("edgeAttributesUpdated",{type:"replace",key:g.key,attributes:g.attributes})}else be(g.attributes,l),n.emit("edgeAttributesUpdated",{type:"merge",key:g.key,attributes:g.attributes,data:l});return R}l=l||{},c&&u&&(l=u(l));const y={key:null,undirected:i,source:a,target:s,attributes:l};if(r)o=n._edgeKeyGenerator();else if(o=""+o,n._edges.has(o))throw new B("Graph.".concat(e,': the "').concat(o,'" edge already exists in the graph.'));let w=!1,_=!1;d||(d=ca(n,a,{}),w=!0,a===s&&(h=d,_=!0)),h||(h=ca(n,s,{}),_=!0),p=new gn(i,o,d,h,l),n._edges.set(o,p);const S=a===s;return i?(d.undirectedDegree++,h.undirectedDegree++,S&&(d.undirectedLoops++,n._undirectedSelfLoopCount++)):(d.outDegree++,h.inDegree++,S&&(d.directedLoops++,n._directedSelfLoopCount++)),n.multi?p.attachMulti():p.attach(),i?n._undirectedSize++:n._directedSize++,y.key=o,n.emit("edgeAdded",y),[o,!0,w,_]}function rn(n,e){n._edges.delete(e.key);const{source:r,target:i,attributes:o}=e,a=e.undirected,s=r===i;a?(r.undirectedDegree--,i.undirectedDegree--,s&&(r.undirectedLoops--,n._undirectedSelfLoopCount--)):(r.outDegree--,i.inDegree--,s&&(r.directedLoops--,n._directedSelfLoopCount--)),n.multi?e.detachMulti():e.detach(),a?n._undirectedSize--:n._directedSize--,n.emit("edgeDropped",{key:e.key,attributes:o,source:r.key,target:i.key,undirected:a})}class oe extends Ch.EventEmitter{constructor(e){if(super(),e=be({},Bp,e),typeof e.multi!="boolean")throw new E("Graph.constructor: invalid 'multi' option. Expecting a boolean but got \"".concat(e.multi,'".'));if(!Ip.has(e.type))throw new E('Graph.constructor: invalid \'type\' option. Should be one of "mixed", "directed" or "undirected" but got "'.concat(e.type,'".'));if(typeof e.allowSelfLoops!="boolean")throw new E("Graph.constructor: invalid 'allowSelfLoops' option. Expecting a boolean but got \"".concat(e.allowSelfLoops,'".'));const r=e.type==="mixed"?Ls:e.type==="directed"?Ms:js;We(this,"NodeDataClass",r);const i="geid_"+Pp()+"_";let o=0;const a=()=>{let s;do s=i+o++;while(this._edges.has(s));return s};We(this,"_attributes",{}),We(this,"_nodes",new Map),We(this,"_edges",new Map),We(this,"_directedSize",0),We(this,"_undirectedSize",0),We(this,"_directedSelfLoopCount",0),We(this,"_undirectedSelfLoopCount",0),We(this,"_edgeKeyGenerator",a),We(this,"_options",e),la.forEach(s=>We(this,s,this[s])),nt(this,"order",()=>this._nodes.size),nt(this,"size",()=>this._edges.size),nt(this,"directedSize",()=>this._directedSize),nt(this,"undirectedSize",()=>this._undirectedSize),nt(this,"selfLoopCount",()=>this._directedSelfLoopCount+this._undirectedSelfLoopCount),nt(this,"directedSelfLoopCount",()=>this._directedSelfLoopCount),nt(this,"undirectedSelfLoopCount",()=>this._undirectedSelfLoopCount),nt(this,"multi",this._options.multi),nt(this,"type",this._options.type),nt(this,"allowSelfLoops",this._options.allowSelfLoops),nt(this,"implementation",()=>"graphology")}_resetInstanceCounters(){this._directedSize=0,this._undirectedSize=0,this._directedSelfLoopCount=0,this._undirectedSelfLoopCount=0}hasNode(e){return this._nodes.has(""+e)}hasDirectedEdge(e,r){if(this.type==="undirected")return!1;if(arguments.length===1){const i=""+e,o=this._edges.get(i);return!!o&&!o.undirected}else if(arguments.length===2){e=""+e,r=""+r;const i=this._nodes.get(e);return i?i.out.hasOwnProperty(r):!1}throw new E("Graph.hasDirectedEdge: invalid arity (".concat(arguments.length,", instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target."))}hasUndirectedEdge(e,r){if(this.type==="directed")return!1;if(arguments.length===1){const i=""+e,o=this._edges.get(i);return!!o&&o.undirected}else if(arguments.length===2){e=""+e,r=""+r;const i=this._nodes.get(e);return i?i.undirected.hasOwnProperty(r):!1}throw new E("Graph.hasDirectedEdge: invalid arity (".concat(arguments.length,", instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target."))}hasEdge(e,r){if(arguments.length===1){const i=""+e;return this._edges.has(i)}else if(arguments.length===2){e=""+e,r=""+r;const i=this._nodes.get(e);return i?typeof i.out<"u"&&i.out.hasOwnProperty(r)||typeof i.undirected<"u"&&i.undirected.hasOwnProperty(r):!1}throw new E("Graph.hasEdge: invalid arity (".concat(arguments.length,", instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target."))}directedEdge(e,r){if(this.type==="undirected")return;if(e=""+e,r=""+r,this.multi)throw new B("Graph.directedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.directedEdges instead.");const i=this._nodes.get(e);if(!i)throw new C('Graph.directedEdge: could not find the "'.concat(e,'" source node in the graph.'));if(!this._nodes.has(r))throw new C('Graph.directedEdge: could not find the "'.concat(r,'" target node in the graph.'));const o=i.out&&i.out[r]||void 0;if(o)return o.key}undirectedEdge(e,r){if(this.type==="directed")return;if(e=""+e,r=""+r,this.multi)throw new B("Graph.undirectedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.undirectedEdges instead.");const i=this._nodes.get(e);if(!i)throw new C('Graph.undirectedEdge: could not find the "'.concat(e,'" source node in the graph.'));if(!this._nodes.has(r))throw new C('Graph.undirectedEdge: could not find the "'.concat(r,'" target node in the graph.'));const o=i.undirected&&i.undirected[r]||void 0;if(o)return o.key}edge(e,r){if(this.multi)throw new B("Graph.edge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.edges instead.");e=""+e,r=""+r;const i=this._nodes.get(e);if(!i)throw new C('Graph.edge: could not find the "'.concat(e,'" source node in the graph.'));if(!this._nodes.has(r))throw new C('Graph.edge: could not find the "'.concat(r,'" target node in the graph.'));const o=i.out&&i.out[r]||i.undirected&&i.undirected[r]||void 0;if(o)return o.key}areDirectedNeighbors(e,r){e=""+e,r=""+r;const i=this._nodes.get(e);if(!i)throw new C('Graph.areDirectedNeighbors: could not find the "'.concat(e,'" node in the graph.'));return this.type==="undirected"?!1:r in i.in||r in i.out}areOutNeighbors(e,r){e=""+e,r=""+r;const i=this._nodes.get(e);if(!i)throw new C('Graph.areOutNeighbors: could not find the "'.concat(e,'" node in the graph.'));return this.type==="undirected"?!1:r in i.out}areInNeighbors(e,r){e=""+e,r=""+r;const i=this._nodes.get(e);if(!i)throw new C('Graph.areInNeighbors: could not find the "'.concat(e,'" node in the graph.'));return this.type==="undirected"?!1:r in i.in}areUndirectedNeighbors(e,r){e=""+e,r=""+r;const i=this._nodes.get(e);if(!i)throw new C('Graph.areUndirectedNeighbors: could not find the "'.concat(e,'" node in the graph.'));return this.type==="directed"?!1:r in i.undirected}areNeighbors(e,r){e=""+e,r=""+r;const i=this._nodes.get(e);if(!i)throw new C('Graph.areNeighbors: could not find the "'.concat(e,'" node in the graph.'));return this.type!=="undirected"&&(r in i.in||r in i.out)||this.type!=="directed"&&r in i.undirected}areInboundNeighbors(e,r){e=""+e,r=""+r;const i=this._nodes.get(e);if(!i)throw new C('Graph.areInboundNeighbors: could not find the "'.concat(e,'" node in the graph.'));return this.type!=="undirected"&&r in i.in||this.type!=="directed"&&r in i.undirected}areOutboundNeighbors(e,r){e=""+e,r=""+r;const i=this._nodes.get(e);if(!i)throw new C('Graph.areOutboundNeighbors: could not find the "'.concat(e,'" node in the graph.'));return this.type!=="undirected"&&r in i.out||this.type!=="directed"&&r in i.undirected}inDegree(e){e=""+e;const r=this._nodes.get(e);if(!r)throw new C('Graph.inDegree: could not find the "'.concat(e,'" node in the graph.'));return this.type==="undirected"?0:r.inDegree}outDegree(e){e=""+e;const r=this._nodes.get(e);if(!r)throw new C('Graph.outDegree: could not find the "'.concat(e,'" node in the graph.'));return this.type==="undirected"?0:r.outDegree}directedDegree(e){e=""+e;const r=this._nodes.get(e);if(!r)throw new C('Graph.directedDegree: could not find the "'.concat(e,'" node in the graph.'));return this.type==="undirected"?0:r.inDegree+r.outDegree}undirectedDegree(e){e=""+e;const r=this._nodes.get(e);if(!r)throw new C('Graph.undirectedDegree: could not find the "'.concat(e,'" node in the graph.'));return this.type==="directed"?0:r.undirectedDegree}inboundDegree(e){e=""+e;const r=this._nodes.get(e);if(!r)throw new C('Graph.inboundDegree: could not find the "'.concat(e,'" node in the graph.'));let i=0;return this.type!=="directed"&&(i+=r.undirectedDegree),this.type!=="undirected"&&(i+=r.inDegree),i}outboundDegree(e){e=""+e;const r=this._nodes.get(e);if(!r)throw new C('Graph.outboundDegree: could not find the "'.concat(e,'" node in the graph.'));let i=0;return this.type!=="directed"&&(i+=r.undirectedDegree),this.type!=="undirected"&&(i+=r.outDegree),i}degree(e){e=""+e;const r=this._nodes.get(e);if(!r)throw new C('Graph.degree: could not find the "'.concat(e,'" node in the graph.'));let i=0;return this.type!=="directed"&&(i+=r.undirectedDegree),this.type!=="undirected"&&(i+=r.inDegree+r.outDegree),i}inDegreeWithoutSelfLoops(e){e=""+e;const r=this._nodes.get(e);if(!r)throw new C('Graph.inDegreeWithoutSelfLoops: could not find the "'.concat(e,'" node in the graph.'));return this.type==="undirected"?0:r.inDegree-r.directedLoops}outDegreeWithoutSelfLoops(e){e=""+e;const r=this._nodes.get(e);if(!r)throw new C('Graph.outDegreeWithoutSelfLoops: could not find the "'.concat(e,'" node in the graph.'));return this.type==="undirected"?0:r.outDegree-r.directedLoops}directedDegreeWithoutSelfLoops(e){e=""+e;const r=this._nodes.get(e);if(!r)throw new C('Graph.directedDegreeWithoutSelfLoops: could not find the "'.concat(e,'" node in the graph.'));return this.type==="undirected"?0:r.inDegree+r.outDegree-r.directedLoops*2}undirectedDegreeWithoutSelfLoops(e){e=""+e;const r=this._nodes.get(e);if(!r)throw new C('Graph.undirectedDegreeWithoutSelfLoops: could not find the "'.concat(e,'" node in the graph.'));return this.type==="directed"?0:r.undirectedDegree-r.undirectedLoops*2}inboundDegreeWithoutSelfLoops(e){e=""+e;const r=this._nodes.get(e);if(!r)throw new C('Graph.inboundDegreeWithoutSelfLoops: could not find the "'.concat(e,'" node in the graph.'));let i=0,o=0;return this.type!=="directed"&&(i+=r.undirectedDegree,o+=r.undirectedLoops*2),this.type!=="undirected"&&(i+=r.inDegree,o+=r.directedLoops),i-o}outboundDegreeWithoutSelfLoops(e){e=""+e;const r=this._nodes.get(e);if(!r)throw new C('Graph.outboundDegreeWithoutSelfLoops: could not find the "'.concat(e,'" node in the graph.'));let i=0,o=0;return this.type!=="directed"&&(i+=r.undirectedDegree,o+=r.undirectedLoops*2),this.type!=="undirected"&&(i+=r.outDegree,o+=r.directedLoops),i-o}degreeWithoutSelfLoops(e){e=""+e;const r=this._nodes.get(e);if(!r)throw new C('Graph.degreeWithoutSelfLoops: could not find the "'.concat(e,'" node in the graph.'));let i=0,o=0;return this.type!=="directed"&&(i+=r.undirectedDegree,o+=r.undirectedLoops*2),this.type!=="undirected"&&(i+=r.inDegree+r.outDegree,o+=r.directedLoops*2),i-o}source(e){e=""+e;const r=this._edges.get(e);if(!r)throw new C('Graph.source: could not find the "'.concat(e,'" edge in the graph.'));return r.source.key}target(e){e=""+e;const r=this._edges.get(e);if(!r)throw new C('Graph.target: could not find the "'.concat(e,'" edge in the graph.'));return r.target.key}extremities(e){e=""+e;const r=this._edges.get(e);if(!r)throw new C('Graph.extremities: could not find the "'.concat(e,'" edge in the graph.'));return[r.source.key,r.target.key]}opposite(e,r){e=""+e,r=""+r;const i=this._edges.get(r);if(!i)throw new C('Graph.opposite: could not find the "'.concat(r,'" edge in the graph.'));const o=i.source.key,a=i.target.key;if(e===o)return a;if(e===a)return o;throw new C('Graph.opposite: the "'.concat(e,'" node is not attached to the "').concat(r,'" edge (').concat(o,", ").concat(a,")."))}hasExtremity(e,r){e=""+e,r=""+r;const i=this._edges.get(e);if(!i)throw new C('Graph.hasExtremity: could not find the "'.concat(e,'" edge in the graph.'));return i.source.key===r||i.target.key===r}isUndirected(e){e=""+e;const r=this._edges.get(e);if(!r)throw new C('Graph.isUndirected: could not find the "'.concat(e,'" edge in the graph.'));return r.undirected}isDirected(e){e=""+e;const r=this._edges.get(e);if(!r)throw new C('Graph.isDirected: could not find the "'.concat(e,'" edge in the graph.'));return!r.undirected}isSelfLoop(e){e=""+e;const r=this._edges.get(e);if(!r)throw new C('Graph.isSelfLoop: could not find the "'.concat(e,'" edge in the graph.'));return r.source===r.target}addNode(e,r){return zp(this,e,r).key}mergeNode(e,r){if(r&&!Re(r))throw new E('Graph.mergeNode: invalid attributes. Expecting an object but got "'.concat(r,'"'));e=""+e,r=r||{};let i=this._nodes.get(e);return i?(r&&(be(i.attributes,r),this.emit("nodeAttributesUpdated",{type:"merge",key:e,attributes:i.attributes,data:r})),[e,!1]):(i=new this.NodeDataClass(e,r),this._nodes.set(e,i),this.emit("nodeAdded",{key:e,attributes:r}),[e,!0])}updateNode(e,r){if(r&&typeof r!="function")throw new E('Graph.updateNode: invalid updater function. Expecting a function but got "'.concat(r,'"'));e=""+e;let i=this._nodes.get(e);if(i){if(r){const a=i.attributes;i.attributes=r(a),this.emit("nodeAttributesUpdated",{type:"replace",key:e,attributes:i.attributes})}return[e,!1]}const o=r?r({}):{};return i=new this.NodeDataClass(e,o),this._nodes.set(e,i),this.emit("nodeAdded",{key:e,attributes:o}),[e,!0]}dropNode(e){e=""+e;const r=this._nodes.get(e);if(!r)throw new C('Graph.dropNode: could not find the "'.concat(e,'" node in the graph.'));let i;if(this.type!=="undirected"){for(const o in r.out){i=r.out[o];do rn(this,i),i=i.next;while(i)}for(const o in r.in){i=r.in[o];do rn(this,i),i=i.next;while(i)}}if(this.type!=="directed")for(const o in r.undirected){i=r.undirected[o];do rn(this,i),i=i.next;while(i)}this._nodes.delete(e),this.emit("nodeDropped",{key:e,attributes:r.attributes})}dropEdge(e){let r;if(arguments.length>1){const i=""+arguments[0],o=""+arguments[1];if(r=qe(this,i,o,this.type),!r)throw new C('Graph.dropEdge: could not find the "'.concat(i,'" -> "').concat(o,'" edge in the graph.'))}else if(e=""+e,r=this._edges.get(e),!r)throw new C('Graph.dropEdge: could not find the "'.concat(e,'" edge in the graph.'));return rn(this,r),this}dropDirectedEdge(e,r){if(arguments.length<2)throw new B("Graph.dropDirectedEdge: it does not make sense to try and drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new B("Graph.dropDirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");e=""+e,r=""+r;const i=qe(this,e,r,"directed");if(!i)throw new C('Graph.dropDirectedEdge: could not find a "'.concat(e,'" -> "').concat(r,'" edge in the graph.'));return rn(this,i),this}dropUndirectedEdge(e,r){if(arguments.length<2)throw new B("Graph.dropUndirectedEdge: it does not make sense to drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new B("Graph.dropUndirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");const i=qe(this,e,r,"undirected");if(!i)throw new C('Graph.dropUndirectedEdge: could not find a "'.concat(e,'" -> "').concat(r,'" edge in the graph.'));return rn(this,i),this}clear(){this._edges.clear(),this._nodes.clear(),this._resetInstanceCounters(),this.emit("cleared")}clearEdges(){const e=this._nodes.values();let r;for(;r=e.next(),r.done!==!0;)r.value.clear();this._edges.clear(),this._resetInstanceCounters(),this.emit("edgesCleared")}getAttribute(e){return this._attributes[e]}getAttributes(){return this._attributes}hasAttribute(e){return this._attributes.hasOwnProperty(e)}setAttribute(e,r){return this._attributes[e]=r,this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:e}),this}updateAttribute(e,r){if(typeof r!="function")throw new E("Graph.updateAttribute: updater should be a function.");const i=this._attributes[e];return this._attributes[e]=r(i),this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:e}),this}removeAttribute(e){return delete this._attributes[e],this.emit("attributesUpdated",{type:"remove",attributes:this._attributes,name:e}),this}replaceAttributes(e){if(!Re(e))throw new E("Graph.replaceAttributes: provided attributes are not a plain object.");return this._attributes=e,this.emit("attributesUpdated",{type:"replace",attributes:this._attributes}),this}mergeAttributes(e){if(!Re(e))throw new E("Graph.mergeAttributes: provided attributes are not a plain object.");return be(this._attributes,e),this.emit("attributesUpdated",{type:"merge",attributes:this._attributes,data:e}),this}updateAttributes(e){if(typeof e!="function")throw new E("Graph.updateAttributes: provided updater is not a function.");return this._attributes=e(this._attributes),this.emit("attributesUpdated",{type:"update",attributes:this._attributes}),this}updateEachNodeAttributes(e,r){if(typeof e!="function")throw new E("Graph.updateEachNodeAttributes: expecting an updater function.");if(r&&!sa(r))throw new E("Graph.updateEachNodeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");const i=this._nodes.values();let o,a;for(;o=i.next(),o.done!==!0;)a=o.value,a.attributes=e(a.key,a.attributes);this.emit("eachNodeAttributesUpdated",{hints:r||null})}updateEachEdgeAttributes(e,r){if(typeof e!="function")throw new E("Graph.updateEachEdgeAttributes: expecting an updater function.");if(r&&!sa(r))throw new E("Graph.updateEachEdgeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");const i=this._edges.values();let o,a,s,l;for(;o=i.next(),o.done!==!0;)a=o.value,s=a.source,l=a.target,a.attributes=e(a.key,a.attributes,s.key,l.key,s.attributes,l.attributes,a.undirected);this.emit("eachEdgeAttributesUpdated",{hints:r||null})}forEachAdjacencyEntry(e){if(typeof e!="function")throw new E("Graph.forEachAdjacencyEntry: expecting a callback.");fr(!1,!1,!1,this,e)}forEachAdjacencyEntryWithOrphans(e){if(typeof e!="function")throw new E("Graph.forEachAdjacencyEntryWithOrphans: expecting a callback.");fr(!1,!1,!0,this,e)}forEachAssymetricAdjacencyEntry(e){if(typeof e!="function")throw new E("Graph.forEachAssymetricAdjacencyEntry: expecting a callback.");fr(!1,!0,!1,this,e)}forEachAssymetricAdjacencyEntryWithOrphans(e){if(typeof e!="function")throw new E("Graph.forEachAssymetricAdjacencyEntryWithOrphans: expecting a callback.");fr(!1,!0,!0,this,e)}nodes(){return typeof Array.from=="function"?Array.from(this._nodes.keys()):Es(this._nodes.keys(),this._nodes.size)}forEachNode(e){if(typeof e!="function")throw new E("Graph.forEachNode: expecting a callback.");const r=this._nodes.values();let i,o;for(;i=r.next(),i.done!==!0;)o=i.value,e(o.key,o.attributes)}findNode(e){if(typeof e!="function")throw new E("Graph.findNode: expecting a callback.");const r=this._nodes.values();let i,o;for(;i=r.next(),i.done!==!0;)if(o=i.value,e(o.key,o.attributes))return o.key}mapNodes(e){if(typeof e!="function")throw new E("Graph.mapNode: expecting a callback.");const r=this._nodes.values();let i,o;const a=new Array(this.order);let s=0;for(;i=r.next(),i.done!==!0;)o=i.value,a[s++]=e(o.key,o.attributes);return a}someNode(e){if(typeof e!="function")throw new E("Graph.someNode: expecting a callback.");const r=this._nodes.values();let i,o;for(;i=r.next(),i.done!==!0;)if(o=i.value,e(o.key,o.attributes))return!0;return!1}everyNode(e){if(typeof e!="function")throw new E("Graph.everyNode: expecting a callback.");const r=this._nodes.values();let i,o;for(;i=r.next(),i.done!==!0;)if(o=i.value,!e(o.key,o.attributes))return!1;return!0}filterNodes(e){if(typeof e!="function")throw new E("Graph.filterNodes: expecting a callback.");const r=this._nodes.values();let i,o;const a=[];for(;i=r.next(),i.done!==!0;)o=i.value,e(o.key,o.attributes)&&a.push(o.key);return a}reduceNodes(e,r){if(typeof e!="function")throw new E("Graph.reduceNodes: expecting a callback.");if(arguments.length<2)throw new E("Graph.reduceNodes: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.");let i=r;const o=this._nodes.values();let a,s;for(;a=o.next(),a.done!==!0;)s=a.value,i=e(i,s.key,s.attributes);return i}nodeEntries(){const e=this._nodes.values();return new Qe(()=>{const r=e.next();if(r.done)return r;const i=r.value;return{value:{node:i.key,attributes:i.attributes},done:!1}})}export(){const e=new Array(this._nodes.size);let r=0;this._nodes.forEach((o,a)=>{e[r++]=Lp(a,o)});const i=new Array(this._edges.size);return r=0,this._edges.forEach((o,a)=>{i[r++]=Mp(this.type,a,o)}),{options:{type:this.type,multi:this.multi,allowSelfLoops:this.allowSelfLoops},attributes:this.getAttributes(),nodes:e,edges:i}}import(e,r=!1){if(e instanceof oe)return e.forEachNode((c,u)=>{r?this.mergeNode(c,u):this.addNode(c,u)}),e.forEachEdge((c,u,d,h,p,g,y)=>{r?y?this.mergeUndirectedEdgeWithKey(c,d,h,u):this.mergeDirectedEdgeWithKey(c,d,h,u):y?this.addUndirectedEdgeWithKey(c,d,h,u):this.addDirectedEdgeWithKey(c,d,h,u)}),this;if(!Re(e))throw new E("Graph.import: invalid argument. Expecting a serialized graph or, alternatively, a Graph instance.");if(e.attributes){if(!Re(e.attributes))throw new E("Graph.import: invalid attributes. Expecting a plain object.");r?this.mergeAttributes(e.attributes):this.replaceAttributes(e.attributes)}let i,o,a,s,l;if(e.nodes){if(a=e.nodes,!Array.isArray(a))throw new E("Graph.import: invalid nodes. Expecting an array.");for(i=0,o=a.length;i{const a=be({},i.attributes);i=new r.NodeDataClass(o,a),r._nodes.set(o,i)}),r}copy(e){if(e=e||{},typeof e.type=="string"&&e.type!==this.type&&e.type!=="mixed")throw new B('Graph.copy: cannot create an incompatible copy from "'.concat(this.type,'" type to "').concat(e.type,'" because this would mean losing information about the current graph.'));if(typeof e.multi=="boolean"&&e.multi!==this.multi&&e.multi!==!0)throw new B("Graph.copy: cannot create an incompatible copy by downgrading a multi graph to a simple one because this would mean losing information about the current graph.");if(typeof e.allowSelfLoops=="boolean"&&e.allowSelfLoops!==this.allowSelfLoops&&e.allowSelfLoops!==!0)throw new B("Graph.copy: cannot create an incompatible copy from a graph allowing self loops to one that does not because this would mean losing information about the current graph.");const r=this.emptyCopy(e),i=this._edges.values();let o,a;for(;o=i.next(),o.done!==!0;)a=o.value,Bs(r,"copy",!1,a.undirected,a.key,a.source.key,a.target.key,be({},a.attributes));return r}toJSON(){return this.export()}toString(){return"[object Graph]"}inspect(){const e={};this._nodes.forEach((a,s)=>{e[s]=a.attributes});const r={},i={};this._edges.forEach((a,s)=>{const l=a.undirected?"--":"->";let c="",u=a.source.key,d=a.target.key,h;a.undirected&&u>d&&(h=u,u=d,d=h);const p="(".concat(u,")").concat(l,"(").concat(d,")");s.startsWith("geid_")?this.multi&&(typeof i[p]>"u"?i[p]=0:i[p]++,c+="".concat(i[p],". ")):c+="[".concat(s,"]: "),c+=p,r[c]=a.attributes});const o={};for(const a in this)this.hasOwnProperty(a)&&!la.has(a)&&typeof this[a]!="function"&&typeof a!="symbol"&&(o[a]=this[a]);return o.attributes=this._attributes,o.nodes=e,o.edges=r,We(o,"constructor",this.constructor),o}}typeof Symbol<"u"&&(oe.prototype[Symbol.for("nodejs.util.inspect.custom")]=oe.prototype.inspect);Dp.forEach(n=>{["add","merge","update"].forEach(e=>{const r=n.name(e),i=e==="add"?Bs:Fp;n.generateKey?oe.prototype[r]=function(o,a,s){return i(this,r,!0,(n.type||this.type)==="undirected",null,o,a,s,e==="update")}:oe.prototype[r]=function(o,a,s,l){return i(this,r,!1,(n.type||this.type)==="undirected",o,a,s,l,e==="update")}})});qh(oe);sp(oe);_p(oe);Op(oe);class zs extends oe{constructor(e){const r=be({type:"directed"},e);if("multi"in r&&r.multi!==!1)throw new E("DirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if(r.type!=="directed")throw new E('DirectedGraph.from: inconsistent "'+r.type+'" type in given options!');super(r)}}class Fs extends oe{constructor(e){const r=be({type:"undirected"},e);if("multi"in r&&r.multi!==!1)throw new E("UndirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if(r.type!=="undirected")throw new E('UndirectedGraph.from: inconsistent "'+r.type+'" type in given options!');super(r)}}class Gs extends oe{constructor(e){const r=be({multi:!0},e);if("multi"in r&&r.multi!==!0)throw new E("MultiGraph.from: inconsistent indication that the graph should be simple in given options!");super(r)}}class pe extends oe{constructor(e){const r=be({type:"directed",multi:!0},e);if("multi"in r&&r.multi!==!0)throw new E("MultiDirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if(r.type!=="directed")throw new E('MultiDirectedGraph.from: inconsistent "'+r.type+'" type in given options!');super(r)}}class Us extends oe{constructor(e){const r=be({type:"undirected",multi:!0},e);if("multi"in r&&r.multi!==!0)throw new E("MultiUndirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if(r.type!=="undirected")throw new E('MultiUndirectedGraph.from: inconsistent "'+r.type+'" type in given options!');super(r)}}function mn(n){n.from=function(e,r){const i=be({},e.options,r),o=new n(i);return o.import(e),o}}mn(oe);mn(zs);mn(Fs);mn(Gs);mn(pe);mn(Us);oe.Graph=oe;oe.DirectedGraph=zs;oe.UndirectedGraph=Fs;oe.MultiGraph=Gs;oe.MultiDirectedGraph=pe;oe.MultiUndirectedGraph=Us;oe.InvalidArgumentsGraphError=E;oe.NotFoundGraphError=C;oe.UsageGraphError=B;var Ws,ua=Lu;Ws=ua.createRoot,ua.hydrateRoot;const Gp="modulepreload",Up=function(n){return"/rmp/"+n},da={},yn=function(e,r,i){let o=Promise.resolve();if(r&&r.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),l=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));o=Promise.allSettled(r.map(c=>{if(c=Up(c),c in da)return;da[c]=!0;const u=c.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(document.querySelector('link[href="'.concat(c,'"]').concat(d)))return;const h=document.createElement("link");if(h.rel=u?"stylesheet":Gp,u||(h.as="script"),h.crossOrigin="",h.href=c,l&&h.setAttribute("nonce",l),document.head.appendChild(h),u)return new Promise((p,g)=>{h.addEventListener("load",p),h.addEventListener("error",()=>g(new Error("Unable to preload CSS for ".concat(c))))})}))}function a(s){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=s,window.dispatchEvent(l),!l.defaultPrevented)throw s}return o.then(s=>{for(const l of s||[])l.status==="rejected"&&a(l.reason);return e().catch(a)})};var Vs=function(){if(typeof Map<"u")return Map;function n(e,r){var i=-1;return e.some(function(o,a){return o[0]===r?(i=a,!0):!1}),i}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(r){var i=n(this.__entries__,r),o=this.__entries__[i];return o&&o[1]},e.prototype.set=function(r,i){var o=n(this.__entries__,r);~o?this.__entries__[o][1]=i:this.__entries__.push([r,i])},e.prototype.delete=function(r){var i=this.__entries__,o=n(i,r);~o&&i.splice(o,1)},e.prototype.has=function(r){return!!~n(this.__entries__,r)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(r,i){i===void 0&&(i=null);for(var o=0,a=this.__entries__;o0},n.prototype.connect_=function(){!Bi||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Yp?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},n.prototype.disconnect_=function(){!Bi||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},n.prototype.onTransitionEnd_=function(e){var r=e.propertyName,i=r===void 0?"":r,o=Kp.some(function(a){return!!~i.indexOf(a)});o&&this.refresh()},n.getInstance=function(){return this.instance_||(this.instance_=new n),this.instance_},n.instance_=null,n}(),Hs=function(n,e){for(var r=0,i=Object.keys(e);r"u"||!(Element instanceof Object))){if(!(e instanceof hn(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(e)||(r.set(e,new of(e)),this.controller_.addObserver(this),this.controller_.refresh())}},n.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof hn(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(e)&&(r.delete(e),r.size||this.controller_.removeObserver(this))}},n.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},n.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(r){r.isActive()&&e.activeObservations_.push(r)})},n.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,r=this.activeObservations_.map(function(i){return new af(i.target,i.broadcastRect())});this.callback_.call(e,r,e),this.clearActive()}},n.prototype.clearActive=function(){this.activeObservations_.splice(0)},n.prototype.hasActive=function(){return this.activeObservations_.length>0},n}(),Ks=typeof WeakMap<"u"?new WeakMap:new Vs,Ys=function(){function n(e){if(!(this instanceof n))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=qp.getInstance(),i=new sf(e,r,this);Ks.set(this,i)}return n}();["observe","unobserve","disconnect"].forEach(function(n){Ys.prototype[n]=function(){var e;return(e=Ks.get(this))[n].apply(e,arguments)}});var lf=function(){return typeof Dr.ResizeObserver<"u"?Dr.ResizeObserver:Ys}();window.ResizeObserver||(window.ResizeObserver=lf);var zi=function(){return zi=Object.assign||function(n){for(var e,r=1,i=arguments.length;r`"});var ci=function(n,e){for(var r,i=$.Children.toArray(n),o=0,a=i;o{var e;return(e=typeof n=="string"||typeof n=="number"?n:n[Object.keys(n)[0]])==null?void 0:e.toString()},hf=(n,e)=>typeof n!="string"||Va(e)?n:n.toString().replace(new RegExp(mf(e),"gi"),r=>"".concat(r,"")),pf=n=>Xs(n,e=>{var r;return((r=e==null?void 0:e.type)==null?void 0:r.displayName)==="AutoCompleteItem"}).map(e=>{const r=Qc(e.props,["value","label","fixed","disabled"]),{getValue:i=So}=e.props,o=i(r.value);return{...Ha(r.label)?r:{...r,label:o},value:o,originalValue:r.value}}),ff=()=>({bg:"whiteAlpha.100",_light:{bg:"gray.200"}}),gf=(n,e,r)=>(e==null?void 0:e.toLowerCase().indexOf(n==null?void 0:n.toLowerCase()))>=0||(r==null?void 0:r.toLowerCase().indexOf(n==null?void 0:n.toLowerCase()))>=0||fa(n,e)>=.5||fa(n,r)>=.5;function mf(n){return n.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}const yf=(n,e)=>{const r={},i={},{field:o}=n;return o&&Object.keys(o).forEach(a=>{if(a.startsWith("--input")===!1)r[a]=o[a];else{let s=o[a];const l=a.replace("--input-","").replace(/-([a-z])/g,function(c){return c[1].toUpperCase()});s.indexOf(".")!==-1&&(s=s.substring(s.indexOf(".")+1)),i[l]=s}}),{...e&&{...r,...i,_focusWithin:n.field._focus,pos:"relative",minH:9,py:1.5,spacing:3},cursor:"text",h:"fit-content"}},bf=(n,e)=>ci(n,r=>{var i;return((i=r==null?void 0:r.type)==null?void 0:i.displayName)==="AutoCompleteItem"&&r.props.value===(e==null?void 0:e.value)}),vf=(n,e)=>ci(n,r=>{var i;return((i=r==null?void 0:r.type)==null?void 0:i.displayName)==="AutoCompleteItem"&&r.props.value===(e==null?void 0:e.value)}),wf=(n,e)=>Ha(ci(n,r=>{var i,o;const a=me(((i=r.props)==null?void 0:i.getValue)||So,((o=r.props)==null?void 0:o.value)||{});return e.some(s=>s.value===a)}));function xf(n){var e;let{closeOnBlur:r=!0,creatable:i,emphasize:o,emptyState:a=!0,freeSolo:s,isReadOnly:l,listAllValuesOnFocus:c,maxSuggestions:u,multiple:d,closeOnSelect:h=!d,defaultValue:p,defaultValues:g=p?[p]:[],onReady:y,defaultIsOpen:w,disableFilter:_,isLoading:S=!1,placement:R="bottom",restoreOnBlurIfEmpty:j=!s,shouldRenderSuggestions:M=()=>!0,submitKeys:A=[],suggestWhenEmpty:F,value:T,values:G=T?typeof T=="string"?[T]:[...T]:void 0}=n;s=s||(d?!0:n.freeSolo);const{isOpen:O,onClose:P,onOpen:W}=Wc({defaultIsOpen:w}),ae=me(n.children,{isOpen:O,onClose:P,onOpen:W}),ee=pf(ae),X=$.useRef(null),De=$.useRef(null),Xe=$.useRef(null),Ze=$.useRef(null),[we,Ue]=$.useState(!1);let Me="";d?Me="":Sr(g)?Sr(G)||(Me=G[0]):Me=g[0];const[Be,jt]=$.useState(Me!=null?Me:""),te=_?ee:ee.filter(I=>I.fixed||me(n.filter||gf,Be,I.value,I.label)||we).filter((I,ne)=>u?I.fixed||neI==null?void 0:I.toString()),value:G,onChange:I=>{const ne=Ce.find(Z=>Z.value===I[0]),he=I.map(Z=>Ce.find(je=>je.value===Z));me(n.onChange,d?I:I[0],d?he:ne)}}),[et,ot]=$.useState((e=ee[0])==null?void 0:e.value),bn=n.maxSelections||Oe.length+1,Jt=Ce.findIndex(I=>I.value===et),vn=Hc(Jt,Ce,!!n.rollNavigation),rr=Jc(Jt,Ce,!!n.rollNavigation),$t=Kc(Ce),ir=Ri(Ce);Yc(()=>{ot($t==null?void 0:$t.value)},[Be]),$.useEffect(()=>{var I;O||ot((I=ee[0])==null?void 0:I.value)},[O]),$.useEffect(()=>{const I=ee.find(ne=>ne.value===et);me(n.onOptionFocus,{item:I,focusMethod:Ze.current,isNewInput:I==null?void 0:I.creatable})},[et,n.onOptionFocus]);const wn=I=>{var ne,he;!Oe.includes(I)&&Oe.lengthd?[...$e,I]:[I]);const Z=Ce.find($e=>$e.value===I);d&&((ne=X.current)==null||ne.focus()),n.focusInputOnSelect&&((he=X.current)==null||he.focus()),me(n.onSelectOption,{item:Z,selectMethod:Ze.current,isNewInput:Z==null?void 0:Z.creatable}),Z!=null&&Z.creatable&&me(n.onCreateOption,{item:ni(Z,["noFilter"]),selectMethod:Ze.current});const je=(Z==null?void 0:Z.label)||(Z==null?void 0:Z.value);jt(()=>d?"":je!=null?je:""),h&&P()},or=(I,ne)=>{var he;Ht(Z=>{const je=ee.find($e=>$e.value===I);return me(n.onTagRemoved,I,je,Z),Z.filter($e=>$e!==I)}),Be===I&&jt(""),ne&&((he=X.current)==null||he.focus())},pi=I=>{var ne;Ht([]),I&&((ne=X.current)==null||ne.focus())},ar=d?Oe.map(I=>{var ne;return{label:((ne=ee.find(he=>he.value===(I==null?void 0:I.toString())))==null?void 0:ne.label)||I,onRemove:()=>or(I)}}):[];return $.useEffect(()=>{me(y,{tags:ar})},[Oe]),{autoCompleteProps:n,children:ae,filteredList:Ce,filteredResults:te,focusedValue:et,getEmptyStateProps:I=>{if(Ce.every(ne=>ne.noFilter)&&a&&!i)return typeof a=="boolean"?I:me(a,{query:Be})},getGroupProps:I=>{const ne=wf(I.children,Ce);return{divider:{hasFirstChild:bf(I.children,$t),hasLastChild:vf(I.children,Ri(Ce.filter(he=>Sr(he==null?void 0:he.noFilter))))},group:{display:ne?"initial":"none"}}},getInputProps:(I,ne)=>{const{onBlur:he,onChange:Z,onFocus:je,onKeyDown:$e,variant:Kt,...Yt}=I;return{wrapper:{ref:De,onClick:()=>{var Y;(Y=X==null?void 0:X.current)==null||Y.focus()},...yf(ne,d),...Yt},input:{isReadOnly:l,onFocus:Y=>{me(je,Y),n.openOnFocus&&!l&&W(),n.selectOnFocus&&Y.target.select(),c&&Ue(!0)},onBlur:Y=>{var Pe,xe;me(he,Y);const Se=Y.relatedTarget===(Xe==null?void 0:Xe.current)||((Pe=Xe.current)==null?void 0:Pe.contains(Y.relatedTarget)),qt=(xe=De.current)==null?void 0:xe.contains(Y.relatedTarget);if(!Se&&!qt&&(r&&P(),!Oe.includes(Y.target.value)&&j)){const xn=Ri(Oe),St=ee.find(_t=>_t.value===xn),_e=(St==null?void 0:St.label)||(St==null?void 0:St.value)||"";jt(_e)}},onChange:Y=>{const Pe=Y.target.value;me(Z,Y),jt(Pe);const xe=Va(Pe);me(M,Pe)&&(!xe||F)?W():P(),Ue(!1)},onKeyDown:Y=>{var Pe;me($e,Y),Ze.current="keyboard";const{key:xe}=Y,Se=Ce[Jt];if(["Enter",...A].includes(xe)){Se&&!(Se!=null&&Se.disabled)?wn(Se==null?void 0:Se.value):(Pe=X.current)==null||Pe.focus(),Y.preventDefault();return}if(xe==="ArrowDown"){O?ot(vn==null?void 0:vn.value):W(),Y.preventDefault();return}if(xe==="ArrowUp"){O?ot(rr==null?void 0:rr.value):W(),Y.preventDefault();return}if(xe==="Tab"){O&&Se&&!(Se!=null&&Se.disabled)?wn(Se==null?void 0:Se.value):P();return}if(xe==="Home"){ot($t==null?void 0:$t.value),Y.preventDefault();return}if(xe==="End"){ot(ir==null?void 0:ir.value),Y.preventDefault();return}xe==="Escape"&&(P(),Y.preventDefault())},value:Be,variant:d?"unstyled":Kt,...Yt}}},getItemProps:(I,ne)=>{var he;const{_fixed:Z,_focus:je,children:$e,disabled:Kt,label:Yt,value:Y,fixed:Pe,getValue:xe=So,onClick:Se,onMouseOver:qt,sx:xn,...St}=I,_e=ne?Y:(he=xe(Y))==null?void 0:he.toString(),_t=_e===et,fi=Ce.findIndex(Pt=>Pt.value===_e)>=0,Qt=$e||Yt||_e;return{item:{...typeof Qt!="string"||!o?{children:Qt}:{dangerouslySetInnerHTML:{__html:hf(Qt,Be)}},"aria-selected":Oe.includes(_e),"aria-disabled":Kt,_disabled:{opacity:.4,cursor:"not-allowed",userSelect:"none"},onClick:Pt=>{var Sn;me(Se,Pt),Kt?(Sn=X.current)==null||Sn.focus():wn(_e)},onMouseOver:Pt=>{me(qt,Pt),ot(_e),Ze.current="mouse"},sx:{...xn,mark:{color:"inherit",bg:"transparent",...qc(o)?o:{fontWeight:o?"extrabold":"inherit"}}},..._t&&(je||ff()),...Pe&&Z,...St},root:{isValidSuggestion:fi,value:_e}}},inputRef:X,interactionRef:Ze,isLoading:S,isOpen:O,itemList:ee,listRef:Xe,onClose:P,onOpen:W,placement:R,query:Be,removeItem:or,resetItems:pi,setQuery:jt,tags:ar,values:Oe}}const Zs=Wt((n,e)=>{const r=xf(n),{children:i,isOpen:o,onClose:a,onOpen:s,placement:l,resetItems:c,removeItem:u}=r;return $.useImperativeHandle(e,()=>({resetItems:c,removeItem:u})),z.jsx(df,{value:r,children:z.jsx(Fa,{isLazy:!0,isOpen:o,onClose:a,onOpen:s,autoFocus:!1,placement:l,closeOnBlur:!0,matchWidth:!0,children:z.jsx(Tr.div,{w:"full",ref:e,children:i})})})});Zs.displayName="AutoComplete";const el=Wt((n,e)=>{const{focusedValue:r,getItemProps:i,interactionRef:o}=Mt(),a=$.useRef(),s=Zn(e,a),l=i(n),{isValidSuggestion:c,value:u}=l.root,d=r===u;$.useEffect(()=>{var w;d&&o.current==="keyboard"&&((w=a==null?void 0:a.current)==null||w.scrollIntoView({behavior:"smooth",block:"center"}))},[d,o]),$.useEffect(()=>{typeof u!="string"&&console.warn("wow"),typeof u!="string"&&Sr(n.getValue)&&console.error("You must define the `getValue` prop, when an Item's value is not a string")},[]);const{children:h,dangerouslySetInnerHTML:p,...g}=l.item,y=ni(g,["groupId"]);return c?z.jsx(ct,{ref:s,...Sf,...y,children:h||z.jsx("span",{dangerouslySetInnerHTML:p})}):null});el.displayName="AutoCompleteItem";const Sf={mx:"2",px:"2",py:"2",rounded:"md",cursor:"pointer"},_f=Wt((n,e)=>{const{children:r,showDivider:i,...o}=n,a=ni(o,["groupSibling"]),{getGroupProps:s}=Mt(),{group:l}=s(n),c=kf(n);return z.jsxs(Pc,{ref:e,...l,...a,children:[z.jsx(Jo,{...c.top}),r,z.jsx(Jo,{...c.bottom})]})}),Nf=Wt((n,e)=>z.jsx(ct,{...Rf,...n,ref:e}));_f.displayName="AutoCompleteGroup";Nf.displayName="AutoCompleteGroupTitle";const Rf={ml:5,my:1,fontSize:"xs",letterSpacing:"wider",fontWeight:"extrabold",textTransform:"uppercase"},kf=n=>{const{getGroupProps:e}=Mt(),r=n.groupSibling,{divider:{hasFirstChild:i,hasLastChild:o}}=e(n),a={my:2,borderColor:n.dividerColor},s={...a,mb:4,display:!n.showDivider||i?"none":""},l={...a,display:!n.showDivider||o||r?"none":""};return{top:s,bottom:l}},ga=Wt((n,e)=>{const{isLoading:r}=Mt(),{loadingIcon:i,...o}=n;return z.jsxs(Ic,{children:[z.jsx(Ga,{...o,ref:e}),r&&z.jsx(Dc,{children:i||z.jsx(Ua,{})})]})}),_o=Wt((n,e)=>{const{autoCompleteProps:r,inputRef:i,getInputProps:o,tags:a,setQuery:s}=Mt(),{children:l,isInvalid:c,hidePlaceholder:u,...d}=n,{value:h}=d;$.useEffect(()=>{h!==void 0&&(typeof h=="string"||h instanceof String)&&s(h)},[h]);const p=Bc("Input",n);let{wrapper:g,input:y}=o(d,p);const{ref:w,..._}=g,S=Zn(e,i),R=me(l,{tags:a});u&&(y={...y,placeholder:Array.isArray(R)&&R.length?void 0:y.placeholder});const j=z.jsx(ga,{isInvalid:c,...y,ref:S}),M=z.jsxs(zc,{..._,ref:w,children:[R,z.jsx(Fc,{as:ga,...y,ref:S})]});return z.jsx(Gc,{children:r.multiple?M:j})});_o.displayName="Input";_o.id="Input";function Cf(){const n=$.useContext(tu);if(!n)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return n}var tl=$.createContext({});tl.displayName="ColorModeContext";function nl(){const n=$.useContext(tl);if(n===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return n}function Af(){const n=nl(),e=Cf();return{...n,theme:e}}var No=(...n)=>n.filter(Boolean).join(" ");function Gt(n){const e=typeof n;return n!=null&&(e==="object"||e==="function")&&!Array.isArray(n)}function Bt(n,...e){return Tf(n)?n(...e):n}var Tf=n=>typeof n=="function",zr={exports:{}};zr.exports;(function(n,e){var r=200,i="__lodash_hash_undefined__",o=800,a=16,s=9007199254740991,l="[object Arguments]",c="[object Array]",u="[object AsyncFunction]",d="[object Boolean]",h="[object Date]",p="[object Error]",g="[object Function]",y="[object GeneratorFunction]",w="[object Map]",_="[object Number]",S="[object Null]",R="[object Object]",j="[object Proxy]",M="[object RegExp]",A="[object Set]",F="[object String]",T="[object Undefined]",G="[object WeakMap]",O="[object ArrayBuffer]",P="[object DataView]",W="[object Float32Array]",ae="[object Float64Array]",ee="[object Int8Array]",X="[object Int16Array]",De="[object Int32Array]",Xe="[object Uint8Array]",Ze="[object Uint8ClampedArray]",we="[object Uint16Array]",Ue="[object Uint32Array]",Me=/[\\^$.*+?()[\]{}|]/g,Be=/^\[object .+?Constructor\]$/,jt=/^(?:0|[1-9]\d*)$/,te={};te[W]=te[ae]=te[ee]=te[X]=te[De]=te[Xe]=te[Ze]=te[we]=te[Ue]=!0,te[l]=te[c]=te[O]=te[d]=te[P]=te[h]=te[p]=te[g]=te[w]=te[_]=te[R]=te[M]=te[A]=te[F]=te[G]=!1;var nr=typeof gr=="object"&&gr&&gr.Object===Object&&gr,Ce=typeof self=="object"&&self&&self.Object===Object&&self,Oe=nr||Ce||Function("return this")(),Ht=e&&!e.nodeType&&e,et=Ht&&!0&&n&&!n.nodeType&&n,ot=et&&et.exports===Ht,bn=ot&&nr.process,Jt=function(){try{var f=et&&et.require&&et.require("util").types;return f||bn&&bn.binding&&bn.binding("util")}catch(v){}}(),vn=Jt&&Jt.isTypedArray;function rr(f,v,x){switch(x.length){case 0:return f.call(v);case 1:return f.call(v,x[0]);case 2:return f.call(v,x[0],x[1]);case 3:return f.call(v,x[0],x[1],x[2])}return f.apply(v,x)}function $t(f,v){for(var x=-1,L=Array(f);++x-1}function Gl(f,v){var x=this.__data__,L=sr(x,f);return L<0?(++this.size,x.push([f,v])):x[L][1]=v,this}pt.prototype.clear=Dl,pt.prototype.delete=Bl,pt.prototype.get=zl,pt.prototype.has=Fl,pt.prototype.set=Gl;function Xt(f){var v=-1,x=f==null?0:f.length;for(this.clear();++v1?x[V-1]:void 0,ce=V>2?x[2]:void 0;for(ie=f.length>3&&typeof ie=="function"?(V--,ie):void 0,ce&&yc(x[0],x[1],ce)&&(ie=V<3?void 0:ie,V=1),v=Object(v);++L-1&&f%1==0&&f0){if(++v>=o)return arguments[0]}else v=0;return f.apply(void 0,arguments)}}function Rc(f){if(f!=null){try{return he.call(f)}catch(v){}try{return f+""}catch(v){}}return""}function ur(f,v){return f===v||f!==f&&v!==v}var vi=Po(function(){return arguments}())?Po:function(f){return Nn(f)&&Z.call(f,"callee")&&!xn.call(f,"callee")},wi=Array.isArray;function xi(f){return f!=null&&Fo(f.length)&&!Si(f)}function kc(f){return Nn(f)&&xi(f)}var zo=fi||Oc;function Si(f){if(!Dt(f))return!1;var v=lr(f);return v==g||v==y||v==u||v==j}function Fo(f){return typeof f=="number"&&f>-1&&f%1==0&&f<=s}function Dt(f){var v=typeof f;return f!=null&&(v=="object"||v=="function")}function Nn(f){return f!=null&&typeof f=="object"}function Cc(f){if(!Nn(f)||lr(f)!=R)return!1;var v=Se(f);if(v===null)return!0;var x=Z.call(v,"constructor")&&v.constructor;return typeof x=="function"&&x instanceof x&&he.call(x)==Kt}var Go=vn?ir(vn):rc;function Ac(f){return hc(f,Uo(f))}function Uo(f){return xi(f)?Zl(f):ic(f)}var Tc=pc(function(f,v,x,L){Io(f,v,x,L)});function Ec(f){return function(){return f}}function Wo(f){return f}function Oc(){return!1}n.exports=Tc})(zr,zr.exports);var Ef=zr.exports;const Et=qs(Ef);var Of=n=>/!(important)?$/.test(n),ma=n=>typeof n=="string"?n.replace(/!(important)?$/,"").trim():n,Lf=(n,e)=>r=>{const i=String(e),o=Of(i),a=ma(i),s=n?"".concat(n,".").concat(a):a;let l=Gt(r.__cssMap)&&s in r.__cssMap?r.__cssMap[s].varRef:e;return l=ma(l),o?"".concat(l," !important"):l};function Ro(n){const{scale:e,transform:r,compose:i}=n;return(o,a)=>{var s;const l=Lf(e,o)(a);let c=(s=r==null?void 0:r(l,a))!=null?s:l;return i&&(c=i(c,a)),c}}var yr=(...n)=>e=>n.reduce((r,i)=>i(r),e);function Ve(n,e){return r=>{const i={property:r,scale:n};return i.transform=Ro({scale:n,transform:e}),i}}var Mf=({rtl:n,ltr:e})=>r=>r.direction==="rtl"?n:e;function jf(n){const{property:e,scale:r,transform:i}=n;return{scale:r,property:Mf(e),transform:r?Ro({scale:r,compose:i}):i}}var rl=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function $f(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...rl].join(" ")}function Pf(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...rl].join(" ")}var If={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},Df={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function Bf(n){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":n,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var zf={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},Fi={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},Ff=new Set(Object.values(Fi)),Gi=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),Gf=n=>n.trim();function Uf(n,e){if(n==null||Gi.has(n))return n;if(!(Ui(n)||Gi.has(n)))return"url('".concat(n,"')");const r=/(^[a-z-A-Z]+)\((.*)\)/g.exec(n),i=r==null?void 0:r[1],o=r==null?void 0:r[2];if(!i||!o)return n;const a=i.includes("-gradient")?i:"".concat(i,"-gradient"),[s,...l]=o.split(",").map(Gf).filter(Boolean);if((l==null?void 0:l.length)===0)return n;const c=s in Fi?Fi[s]:s;l.unshift(c);const u=l.map(d=>{if(Ff.has(d))return d;const h=d.indexOf(" "),[p,g]=h!==-1?[d.substr(0,h),d.substr(h+1)]:[d],y=Ui(g)?g:g&&g.split(" "),w="colors.".concat(p),_=w in e.__cssMap?e.__cssMap[w].varRef:p;return y?[_,...Array.isArray(y)?y:[y]].join(" "):_});return"".concat(a,"(").concat(u.join(", "),")")}var Ui=n=>typeof n=="string"&&n.includes("(")&&n.includes(")"),Wf=(n,e)=>Uf(n,e!=null?e:{});function Vf(n){return/^var\(--.+\)$/.test(n)}var Hf=n=>{const e=parseFloat(n.toString()),r=n.toString().replace(String(e),"");return{unitless:!r,value:e,unit:r}},at=n=>e=>"".concat(n,"(").concat(e,")"),J={filter(n){return n!=="auto"?n:If},backdropFilter(n){return n!=="auto"?n:Df},ring(n){return Bf(J.px(n))},bgClip(n){return n==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:n}},transform(n){return n==="auto"?$f():n==="auto-gpu"?Pf():n},vh(n){return n==="$100vh"?"var(--chakra-vh)":n},px(n){if(n==null)return n;const{unitless:e}=Hf(n);return e||typeof n=="number"?"".concat(n,"px"):n},fraction(n){return typeof n!="number"||n>1?n:"".concat(n*100,"%")},float(n,e){const r={left:"right",right:"left"};return e.direction==="rtl"?r[n]:n},degree(n){if(Vf(n)||n==null)return n;const e=typeof n=="string"&&!n.endsWith("deg");return typeof n=="number"||e?"".concat(n,"deg"):n},gradient:Wf,blur:at("blur"),opacity:at("opacity"),brightness:at("brightness"),contrast:at("contrast"),dropShadow:at("drop-shadow"),grayscale:at("grayscale"),hueRotate:at("hue-rotate"),invert:at("invert"),saturate:at("saturate"),sepia:at("sepia"),bgImage(n){return n==null||Ui(n)||Gi.has(n)?n:"url(".concat(n,")")},outline(n){const e=String(n)==="0"||String(n)==="none";return n!==null&&e?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:n}},flexDirection(n){var e;const{space:r,divide:i}=(e=zf[n])!=null?e:{},o={flexDirection:n};return r&&(o[r]=1),i&&(o[i]=1),o}},b={borderWidths:Ve("borderWidths"),borderStyles:Ve("borderStyles"),colors:Ve("colors"),borders:Ve("borders"),gradients:Ve("gradients",J.gradient),radii:Ve("radii",J.px),space:Ve("space",yr(J.vh,J.px)),spaceT:Ve("space",yr(J.vh,J.px)),degreeT(n){return{property:n,transform:J.degree}},prop(n,e,r){return{property:n,scale:e,...e&&{transform:Ro({scale:e,transform:r})}}},propT(n,e){return{property:n,transform:e}},sizes:Ve("sizes",yr(J.vh,J.px)),sizesT:Ve("sizes",yr(J.vh,J.fraction)),shadows:Ve("shadows"),logical:jf,blur:Ve("blur",J.blur)},Cr={background:b.colors("background"),backgroundColor:b.colors("backgroundColor"),backgroundImage:b.gradients("backgroundImage"),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:J.bgClip},bgSize:b.prop("backgroundSize"),bgPosition:b.prop("backgroundPosition"),bg:b.colors("background"),bgColor:b.colors("backgroundColor"),bgPos:b.prop("backgroundPosition"),bgRepeat:b.prop("backgroundRepeat"),bgAttachment:b.prop("backgroundAttachment"),bgGradient:b.gradients("backgroundImage"),bgClip:{transform:J.bgClip}};Object.assign(Cr,{bgImage:Cr.backgroundImage,bgImg:Cr.backgroundImage});var Q={border:b.borders("border"),borderWidth:b.borderWidths("borderWidth"),borderStyle:b.borderStyles("borderStyle"),borderColor:b.colors("borderColor"),borderRadius:b.radii("borderRadius"),borderTop:b.borders("borderTop"),borderBlockStart:b.borders("borderBlockStart"),borderTopLeftRadius:b.radii("borderTopLeftRadius"),borderStartStartRadius:b.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:b.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:b.radii("borderTopRightRadius"),borderStartEndRadius:b.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:b.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:b.borders("borderRight"),borderInlineEnd:b.borders("borderInlineEnd"),borderBottom:b.borders("borderBottom"),borderBlockEnd:b.borders("borderBlockEnd"),borderBottomLeftRadius:b.radii("borderBottomLeftRadius"),borderBottomRightRadius:b.radii("borderBottomRightRadius"),borderLeft:b.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:b.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:b.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:b.borders(["borderLeft","borderRight"]),borderInline:b.borders("borderInline"),borderY:b.borders(["borderTop","borderBottom"]),borderBlock:b.borders("borderBlock"),borderTopWidth:b.borderWidths("borderTopWidth"),borderBlockStartWidth:b.borderWidths("borderBlockStartWidth"),borderTopColor:b.colors("borderTopColor"),borderBlockStartColor:b.colors("borderBlockStartColor"),borderTopStyle:b.borderStyles("borderTopStyle"),borderBlockStartStyle:b.borderStyles("borderBlockStartStyle"),borderBottomWidth:b.borderWidths("borderBottomWidth"),borderBlockEndWidth:b.borderWidths("borderBlockEndWidth"),borderBottomColor:b.colors("borderBottomColor"),borderBlockEndColor:b.colors("borderBlockEndColor"),borderBottomStyle:b.borderStyles("borderBottomStyle"),borderBlockEndStyle:b.borderStyles("borderBlockEndStyle"),borderLeftWidth:b.borderWidths("borderLeftWidth"),borderInlineStartWidth:b.borderWidths("borderInlineStartWidth"),borderLeftColor:b.colors("borderLeftColor"),borderInlineStartColor:b.colors("borderInlineStartColor"),borderLeftStyle:b.borderStyles("borderLeftStyle"),borderInlineStartStyle:b.borderStyles("borderInlineStartStyle"),borderRightWidth:b.borderWidths("borderRightWidth"),borderInlineEndWidth:b.borderWidths("borderInlineEndWidth"),borderRightColor:b.colors("borderRightColor"),borderInlineEndColor:b.colors("borderInlineEndColor"),borderRightStyle:b.borderStyles("borderRightStyle"),borderInlineEndStyle:b.borderStyles("borderInlineEndStyle"),borderTopRadius:b.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:b.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:b.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:b.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(Q,{rounded:Q.borderRadius,roundedTop:Q.borderTopRadius,roundedTopLeft:Q.borderTopLeftRadius,roundedTopRight:Q.borderTopRightRadius,roundedTopStart:Q.borderStartStartRadius,roundedTopEnd:Q.borderStartEndRadius,roundedBottom:Q.borderBottomRadius,roundedBottomLeft:Q.borderBottomLeftRadius,roundedBottomRight:Q.borderBottomRightRadius,roundedBottomStart:Q.borderEndStartRadius,roundedBottomEnd:Q.borderEndEndRadius,roundedLeft:Q.borderLeftRadius,roundedRight:Q.borderRightRadius,roundedStart:Q.borderInlineStartRadius,roundedEnd:Q.borderInlineEndRadius,borderStart:Q.borderInlineStart,borderEnd:Q.borderInlineEnd,borderTopStartRadius:Q.borderStartStartRadius,borderTopEndRadius:Q.borderStartEndRadius,borderBottomStartRadius:Q.borderEndStartRadius,borderBottomEndRadius:Q.borderEndEndRadius,borderStartRadius:Q.borderInlineStartRadius,borderEndRadius:Q.borderInlineEndRadius,borderStartWidth:Q.borderInlineStartWidth,borderEndWidth:Q.borderInlineEndWidth,borderStartColor:Q.borderInlineStartColor,borderEndColor:Q.borderInlineEndColor,borderStartStyle:Q.borderInlineStartStyle,borderEndStyle:Q.borderInlineEndStyle});var Jf={color:b.colors("color"),textColor:b.colors("color"),fill:b.colors("fill"),stroke:b.colors("stroke")},Wi={boxShadow:b.shadows("boxShadow"),mixBlendMode:!0,blendMode:b.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:b.prop("backgroundBlendMode"),opacity:!0};Object.assign(Wi,{shadow:Wi.boxShadow});var Kf={filter:{transform:J.filter},blur:b.blur("--chakra-blur"),brightness:b.propT("--chakra-brightness",J.brightness),contrast:b.propT("--chakra-contrast",J.contrast),hueRotate:b.degreeT("--chakra-hue-rotate"),invert:b.propT("--chakra-invert",J.invert),saturate:b.propT("--chakra-saturate",J.saturate),dropShadow:b.propT("--chakra-drop-shadow",J.dropShadow),backdropFilter:{transform:J.backdropFilter},backdropBlur:b.blur("--chakra-backdrop-blur"),backdropBrightness:b.propT("--chakra-backdrop-brightness",J.brightness),backdropContrast:b.propT("--chakra-backdrop-contrast",J.contrast),backdropHueRotate:b.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:b.propT("--chakra-backdrop-invert",J.invert),backdropSaturate:b.propT("--chakra-backdrop-saturate",J.saturate)},Fr={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:J.flexDirection},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:b.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:b.space("gap"),rowGap:b.space("rowGap"),columnGap:b.space("columnGap")};Object.assign(Fr,{flexDir:Fr.flexDirection});var il={gridGap:b.space("gridGap"),gridColumnGap:b.space("gridColumnGap"),gridRowGap:b.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},Yf={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:J.outline},outlineOffset:!0,outlineColor:b.colors("outlineColor")},Je={width:b.sizesT("width"),inlineSize:b.sizesT("inlineSize"),height:b.sizes("height"),blockSize:b.sizes("blockSize"),boxSize:b.sizes(["width","height"]),minWidth:b.sizes("minWidth"),minInlineSize:b.sizes("minInlineSize"),minHeight:b.sizes("minHeight"),minBlockSize:b.sizes("minBlockSize"),maxWidth:b.sizes("maxWidth"),maxInlineSize:b.sizes("maxInlineSize"),maxHeight:b.sizes("maxHeight"),maxBlockSize:b.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,aspectRatio:!0,hideFrom:{scale:"breakpoints",transform:(n,e)=>{var r,i,o;return{["@media screen and (min-width: ".concat((o=(i=(r=e.__breakpoints)==null?void 0:r.get(n))==null?void 0:i.minW)!=null?o:n,")")]:{display:"none"}}}},hideBelow:{scale:"breakpoints",transform:(n,e)=>{var r,i,o;return{["@media screen and (max-width: ".concat((o=(i=(r=e.__breakpoints)==null?void 0:r.get(n))==null?void 0:i._minW)!=null?o:n,")")]:{display:"none"}}}},verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:b.propT("float",J.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Je,{w:Je.width,h:Je.height,minW:Je.minWidth,maxW:Je.maxWidth,minH:Je.minHeight,maxH:Je.maxHeight,overscroll:Je.overscrollBehavior,overscrollX:Je.overscrollBehaviorX,overscrollY:Je.overscrollBehaviorY});var qf={listStyleType:!0,listStylePosition:!0,listStylePos:b.prop("listStylePosition"),listStyleImage:!0,listStyleImg:b.prop("listStyleImage")};function Qf(n,e,r,i){const o=typeof e=="string"?e.split("."):[e];for(i=0;i{const e=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return n(r,i,o);e.has(r)||e.set(r,new Map);const s=e.get(r);if(s.has(i))return s.get(i);const l=n(r,i,o,a);return s.set(i,l),l}},Zf=Xf(Qf),eg={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},tg={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},Ti=(n,e,r)=>{const i={},o=Zf(n,e,{});for(const a in o)a in r&&r[a]!=null||(i[a]=o[a]);return i},ng={srOnly:{transform(n){return n===!0?eg:n==="focusable"?tg:{}}},layerStyle:{processResult:!0,transform:(n,e,r)=>Ti(e,"layerStyles.".concat(n),r)},textStyle:{processResult:!0,transform:(n,e,r)=>Ti(e,"textStyles.".concat(n),r)},apply:{processResult:!0,transform:(n,e,r)=>Ti(e,n,r)}},Un={position:!0,pos:b.prop("position"),zIndex:b.prop("zIndex","zIndices"),inset:b.spaceT("inset"),insetX:b.spaceT(["left","right"]),insetInline:b.spaceT("insetInline"),insetY:b.spaceT(["top","bottom"]),insetBlock:b.spaceT("insetBlock"),top:b.spaceT("top"),insetBlockStart:b.spaceT("insetBlockStart"),bottom:b.spaceT("bottom"),insetBlockEnd:b.spaceT("insetBlockEnd"),left:b.spaceT("left"),insetInlineStart:b.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:b.spaceT("right"),insetInlineEnd:b.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(Un,{insetStart:Un.insetInlineStart,insetEnd:Un.insetInlineEnd});var rg={ring:{transform:J.ring},ringColor:b.colors("--chakra-ring-color"),ringOffset:b.prop("--chakra-ring-offset-width"),ringOffsetColor:b.colors("--chakra-ring-offset-color"),ringInset:b.prop("--chakra-ring-inset")},se={margin:b.spaceT("margin"),marginTop:b.spaceT("marginTop"),marginBlockStart:b.spaceT("marginBlockStart"),marginRight:b.spaceT("marginRight"),marginInlineEnd:b.spaceT("marginInlineEnd"),marginBottom:b.spaceT("marginBottom"),marginBlockEnd:b.spaceT("marginBlockEnd"),marginLeft:b.spaceT("marginLeft"),marginInlineStart:b.spaceT("marginInlineStart"),marginX:b.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:b.spaceT("marginInline"),marginY:b.spaceT(["marginTop","marginBottom"]),marginBlock:b.spaceT("marginBlock"),padding:b.space("padding"),paddingTop:b.space("paddingTop"),paddingBlockStart:b.space("paddingBlockStart"),paddingRight:b.space("paddingRight"),paddingBottom:b.space("paddingBottom"),paddingBlockEnd:b.space("paddingBlockEnd"),paddingLeft:b.space("paddingLeft"),paddingInlineStart:b.space("paddingInlineStart"),paddingInlineEnd:b.space("paddingInlineEnd"),paddingX:b.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:b.space("paddingInline"),paddingY:b.space(["paddingTop","paddingBottom"]),paddingBlock:b.space("paddingBlock")};Object.assign(se,{m:se.margin,mt:se.marginTop,mr:se.marginRight,me:se.marginInlineEnd,marginEnd:se.marginInlineEnd,mb:se.marginBottom,ml:se.marginLeft,ms:se.marginInlineStart,marginStart:se.marginInlineStart,mx:se.marginX,my:se.marginY,p:se.padding,pt:se.paddingTop,py:se.paddingY,px:se.paddingX,pb:se.paddingBottom,pl:se.paddingLeft,ps:se.paddingInlineStart,paddingStart:se.paddingInlineStart,pr:se.paddingRight,pe:se.paddingInlineEnd,paddingEnd:se.paddingInlineEnd});var ig={textDecorationColor:b.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:b.shadows("textShadow")},og={clipPath:!0,transform:b.propT("transform",J.transform),transformOrigin:!0,translateX:b.spaceT("--chakra-translate-x"),translateY:b.spaceT("--chakra-translate-y"),skewX:b.degreeT("--chakra-skew-x"),skewY:b.degreeT("--chakra-skew-y"),scaleX:b.prop("--chakra-scale-x"),scaleY:b.prop("--chakra-scale-y"),scale:b.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:b.degreeT("--chakra-rotate")},ag={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:b.prop("transitionDuration","transition.duration"),transitionProperty:b.prop("transitionProperty","transition.property"),transitionTimingFunction:b.prop("transitionTimingFunction","transition.easing")},sg={fontFamily:b.prop("fontFamily","fonts"),fontSize:b.prop("fontSize","fontSizes",J.px),fontWeight:b.prop("fontWeight","fontWeights"),lineHeight:b.prop("lineHeight","lineHeights"),letterSpacing:b.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,textIndent:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,isTruncated:{transform(n){if(n===!0)return{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}},noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},lg={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:b.spaceT("scrollMargin"),scrollMarginTop:b.spaceT("scrollMarginTop"),scrollMarginBottom:b.spaceT("scrollMarginBottom"),scrollMarginLeft:b.spaceT("scrollMarginLeft"),scrollMarginRight:b.spaceT("scrollMarginRight"),scrollMarginX:b.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:b.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:b.spaceT("scrollPadding"),scrollPaddingTop:b.spaceT("scrollPaddingTop"),scrollPaddingBottom:b.spaceT("scrollPaddingBottom"),scrollPaddingLeft:b.spaceT("scrollPaddingLeft"),scrollPaddingRight:b.spaceT("scrollPaddingRight"),scrollPaddingX:b.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:b.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function ol(n){return Gt(n)&&n.reference?n.reference:String(n)}var ui=(n,...e)=>e.map(ol).join(" ".concat(n," ")).replace(/calc/g,""),ya=(...n)=>"calc(".concat(ui("+",...n),")"),ba=(...n)=>"calc(".concat(ui("-",...n),")"),Vi=(...n)=>"calc(".concat(ui("*",...n),")"),va=(...n)=>"calc(".concat(ui("/",...n),")"),wa=n=>{const e=ol(n);return e!=null&&!Number.isNaN(parseFloat(e))?String(e).startsWith("-")?String(e).slice(1):"-".concat(e):Vi(e,-1)},Mn=Object.assign(n=>({add:(...e)=>Mn(ya(n,...e)),subtract:(...e)=>Mn(ba(n,...e)),multiply:(...e)=>Mn(Vi(n,...e)),divide:(...e)=>Mn(va(n,...e)),negate:()=>Mn(wa(n)),toString:()=>n.toString()}),{add:ya,subtract:ba,multiply:Vi,divide:va,negate:wa});function cg(n){const e=parseFloat(n.toString()),r=n.toString().replace(String(e),"");return{unitless:!r,value:e,unit:r}}function xa(n){if(n==null)return n;const{unitless:e}=cg(n);return e||typeof n=="number"?"".concat(n,"px"):n}function ug(n,e){const r=["@media screen"];return n&&r.push("and","(min-width: ".concat(xa(n),")")),e&&r.push("and","(max-width: ".concat(xa(e),")")),r.join(" ")}var Ne={hover:(n,e)=>"".concat(n,":hover ").concat(e,", ").concat(n,"[data-hover] ").concat(e),focus:(n,e)=>"".concat(n,":focus ").concat(e,", ").concat(n,"[data-focus] ").concat(e),focusVisible:(n,e)=>"".concat(n,":focus-visible ").concat(e),focusWithin:(n,e)=>"".concat(n,":focus-within ").concat(e),active:(n,e)=>"".concat(n,":active ").concat(e,", ").concat(n,"[data-active] ").concat(e),disabled:(n,e)=>"".concat(n,":disabled ").concat(e,", ").concat(n,"[data-disabled] ").concat(e),invalid:(n,e)=>"".concat(n,":invalid ").concat(e,", ").concat(n,"[data-invalid] ").concat(e),checked:(n,e)=>"".concat(n,":checked ").concat(e,", ").concat(n,"[data-checked] ").concat(e),indeterminate:(n,e)=>"".concat(n,":indeterminate ").concat(e,", ").concat(n,"[aria-checked=mixed] ").concat(e,", ").concat(n,"[data-indeterminate] ").concat(e),readOnly:(n,e)=>"".concat(n,":read-only ").concat(e,", ").concat(n,"[readonly] ").concat(e,", ").concat(n,"[data-read-only] ").concat(e),expanded:(n,e)=>"".concat(n,":read-only ").concat(e,", ").concat(n,"[aria-expanded=true] ").concat(e,", ").concat(n,"[data-expanded] ").concat(e),placeholderShown:(n,e)=>"".concat(n,":placeholder-shown ").concat(e)},Nt=n=>al(e=>n(e,"&"),"[role=group]","[data-group]",".group"),ft=n=>al(e=>n(e,"~ &"),"[data-peer]",".peer"),al=(n,...e)=>e.map(n).join(", "),ko={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_firstLetter:"&::first-letter",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:Nt(Ne.hover),_peerHover:ft(Ne.hover),_groupFocus:Nt(Ne.focus),_peerFocus:ft(Ne.focus),_groupFocusVisible:Nt(Ne.focusVisible),_peerFocusVisible:ft(Ne.focusVisible),_groupActive:Nt(Ne.active),_peerActive:ft(Ne.active),_groupDisabled:Nt(Ne.disabled),_peerDisabled:ft(Ne.disabled),_groupInvalid:Nt(Ne.invalid),_peerInvalid:ft(Ne.invalid),_groupChecked:Nt(Ne.checked),_peerChecked:ft(Ne.checked),_groupFocusWithin:Nt(Ne.focusWithin),_peerFocusWithin:ft(Ne.focusWithin),_peerPlaceholderShown:ft(Ne.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]",_horizontal:"&[data-orientation=horizontal]",_vertical:"&[data-orientation=vertical]"},dg=Object.keys(ko);function hg(n,e=[]){const r=Object.assign({},n);for(const i of e)i in r&&delete r[i];return r}var Co=Et({},Cr,Q,Jf,Fr,Je,Kf,rg,Yf,il,ng,Un,Wi,se,lg,sg,ig,og,qf,ag);Object.assign({},se,Je,Fr,il,Un);var pg=[...Object.keys(Co),...dg],fg={...Co,...ko},gg=n=>n in fg,mg=n=>e=>{if(!e.__breakpoints)return n;const{isResponsive:r,toArrayValue:i,media:o}=e.__breakpoints,a={};for(const s in n){let l=Bt(n[s],e);if(l==null)continue;if(l=Gt(l)&&r(l)?i(l):l,!Array.isArray(l)){a[s]=l;continue}const c=l.slice(0,o.length).length;for(let u=0;un.startsWith("--")&&typeof e=="string"&&!bg(e),wg=(n,e)=>{var r,i;if(e==null)return e;const o=c=>{var u,d;return(d=(u=n.__cssMap)==null?void 0:u[c])==null?void 0:d.varRef},a=c=>{var u;return(u=o(c))!=null?u:c},[s,l]=yg(e);return e=(i=(r=o(s))!=null?r:a(l))!=null?i:a(e),e};function xg(n){const{configs:e={},pseudos:r={},theme:i}=n,o=(a,s=!1)=>{var l,c,u;const d=Bt(a,i),h=mg(d)(i);let p={};for(let g in h){const y=h[g];let w=Bt(y,i);g in r&&(g=r[g]),vg(g,w)&&(w=wg(i,w));let _=e[g];if(_===!0&&(_={property:g}),Gt(w)){p[g]=(l=p[g])!=null?l:{},p[g]=Et({},p[g],o(w,!0));continue}let S=(u=(c=_==null?void 0:_.transform)==null?void 0:c.call(_,w,i,d))!=null?u:w;S=_!=null&&_.processResult?o(S,!0):S;const R=Bt(_==null?void 0:_.property,i);if(!s&&_!=null&&_.static){const j=Bt(_.static,i);p=Et({},p,j)}if(R&&Array.isArray(R)){for(const j of R)p[j]=S;continue}if(R){R==="&"&&Gt(S)?p=Et({},p,S):p[R]=S;continue}if(Gt(S)){p=Et({},p,S);continue}p[g]=S}return p};return o}var Sg=n=>e=>xg({theme:e,pseudos:ko,configs:Co})(n);function _g(n,e){if(Array.isArray(n))return n;if(Gt(n))return e(n);if(n!=null)return[n]}function Ng(n,e){for(let r=e+1;r{Et(c,{[R]:h?S[R]:{[_]:S[R]}})});continue}if(!p){h?Et(c,S):c[_]=S;continue}c[_]=S}}return c}}function kg(n){return e=>{var r;const{variant:i,size:o,theme:a}=e,s=Rg(a);return Et({},Bt((r=n.baseStyle)!=null?r:{},e),s(n,"sizes",o,e),s(n,"variants",i,e))}}function Cg(n){return hg(n,["styleConfig","size","variant","colorScheme"])}var Ag=typeof Element<"u",Tg=typeof Map=="function",Eg=typeof Set=="function",Og=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function Ar(n,e){if(n===e)return!0;if(n&&e&&typeof n=="object"&&typeof e=="object"){if(n.constructor!==e.constructor)return!1;var r,i,o;if(Array.isArray(n)){if(r=n.length,r!=e.length)return!1;for(i=r;i--!==0;)if(!Ar(n[i],e[i]))return!1;return!0}var a;if(Tg&&n instanceof Map&&e instanceof Map){if(n.size!==e.size)return!1;for(a=n.entries();!(i=a.next()).done;)if(!e.has(i.value[0]))return!1;for(a=n.entries();!(i=a.next()).done;)if(!Ar(i.value[1],e.get(i.value[0])))return!1;return!0}if(Eg&&n instanceof Set&&e instanceof Set){if(n.size!==e.size)return!1;for(a=n.entries();!(i=a.next()).done;)if(!e.has(i.value[0]))return!1;return!0}if(Og&&ArrayBuffer.isView(n)&&ArrayBuffer.isView(e)){if(r=n.length,r!=e.length)return!1;for(i=r;i--!==0;)if(n[i]!==e[i])return!1;return!0}if(n.constructor===RegExp)return n.source===e.source&&n.flags===e.flags;if(n.valueOf!==Object.prototype.valueOf&&typeof n.valueOf=="function"&&typeof e.valueOf=="function")return n.valueOf()===e.valueOf();if(n.toString!==Object.prototype.toString&&typeof n.toString=="function"&&typeof e.toString=="function")return n.toString()===e.toString();if(o=Object.keys(n),r=o.length,r!==Object.keys(e).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(e,o[i]))return!1;if(Ag&&n instanceof Element)return!1;for(i=r;i--!==0;)if(!((o[i]==="_owner"||o[i]==="__v"||o[i]==="__o")&&n.$$typeof)&&!Ar(n[o[i]],e[o[i]]))return!1;return!0}return n!==n&&e!==e}var Lg=function(n,e){try{return Ar(n,e)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};const Mg=qs(Lg);function sl(n,e={}){var r;const{styleConfig:i,...o}=e,{theme:a,colorMode:s}=Af(),l=n?Xc(a,"components.".concat(n)):void 0,c=i||l,u=Zc({theme:a,colorMode:s},(r=c==null?void 0:c.defaultProps)!=null?r:{},Ja(ni(o,["children"]))),d=$.useRef({});if(c){const h=kg(c)(u);Mg(d.current,h)||(d.current=h)}return d.current}function jg(n,e={}){return sl(n,e)}function $g(n,e={}){return sl(n,e)}var Pg=new Set([...pg,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),Ig=new Set(["htmlWidth","htmlHeight","htmlSize","htmlTranslate"]);function Dg(n){return Ig.has(n)||!Pg.has(n)}function Bg(n,...e){if(n==null)throw new TypeError("Cannot convert undefined or null to object");const r={...n};for(const i of e)if(i!=null)for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&(o in r&&delete r[o],r[o]=i[o]);return r}var Sa,zg=(Sa=Ho.default)!=null?Sa:Ho,Fg=({baseStyle:n})=>e=>{const{theme:r,css:i,__css:o,sx:a,...s}=e,l=eu(s,(h,p)=>gg(p)),c=me(n,e),u=Bg({},o,c,Ja(l),a),d=Sg(u)(e.theme);return i?[d,i]:d};function Ei(n,e){const{baseStyle:r,...i}=e!=null?e:{};i.shouldForwardProp||(i.shouldForwardProp=Dg);const o=Fg({baseStyle:r}),a=zg(n,i)(o);return D.forwardRef(function(s,l){const{colorMode:c,forced:u}=nl();return D.createElement(a,{ref:l,"data-theme":u?c:void 0,...s})})}function Gg(){const n=new Map;return new Proxy(Ei,{apply(e,r,i){return Ei(...i)},get(e,r){return n.has(r)||n.set(r,Ei(r)),n.get(r)}})}var dt=Gg();function it(n){return $.forwardRef(n)}var _a={path:z.jsxs("g",{stroke:"currentColor",strokeWidth:"1.5",children:[z.jsx("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),z.jsx("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),z.jsx("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},di=it((n,e)=>{const{as:r,viewBox:i,color:o="currentColor",focusable:a=!1,children:s,className:l,__css:c,...u}=n,d=No("chakra-icon",l),h=jg("Icon",n),p={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:o,...c,...h},g={ref:e,focusable:a,className:d,__css:p},y=i!=null?i:_a.viewBox;if(r&&typeof r!="string")return z.jsx(dt.svg,{as:r,...g,...u});const w=s!=null?s:_a.path;return z.jsx(dt.svg,{verticalAlign:"middle",viewBox:y,...g,...u,children:w})});di.displayName="Icon";function Ug(n,e){return"".concat(n," returned `undefined`. Seems you forgot to wrap component within ").concat(e)}function Wg(n={}){const{name:e,strict:r=!0,hookName:i="useContext",providerName:o="Provider",errorMessage:a,defaultValue:s}=n,l=$.createContext(s);l.displayName=e;function c(){var u;const d=$.useContext(l);if(!d&&r){const h=new Error(a!=null?a:Ug(i,o));throw h.name="ContextError",(u=Error.captureStackTrace)==null||u.call(Error,h,c),h}return d}return[l.Provider,c,l]}var Vg=it(function(n,e){const{spacing:r="0.5rem",spacingX:i,spacingY:o,children:a,justify:s,direction:l,align:c,className:u,shouldWrapChildren:d,...h}=n,p=$.useMemo(()=>d?$.Children.map(a,(g,y)=>z.jsx(Ao,{children:g},y)):a,[a,d]);return z.jsx(dt.div,{ref:e,className:No("chakra-wrap",u),...h,children:z.jsx(dt.ul,{className:"chakra-wrap__list",__css:{display:"flex",flexWrap:"wrap",justifyContent:s,alignItems:c,flexDirection:l,listStyleType:"none",gap:r,columnGap:i,rowGap:o,padding:"0"},children:p})})});Vg.displayName="Wrap";var Ao=it(function(n,e){const{className:r,...i}=n;return z.jsx(dt.li,{ref:e,__css:{display:"flex",alignItems:"flex-start"},className:No("chakra-wrap__listitem",r),...i})});Ao.displayName="WrapItem";var To=dt("div");To.displayName="Box";var ll=it(function(n,e){const{size:r,centerContent:i=!0,...o}=n,a=i?{display:"flex",alignItems:"center",justifyContent:"center"}:{};return z.jsx(To,{ref:e,boxSize:r,__css:{...a,flexShrink:0,flexGrow:0},...o})});ll.displayName="Square";var Hg=it(function(n,e){const{size:r,...i}=n;return z.jsx(ll,{size:r,ref:e,borderRadius:"9999px",...i})});Hg.displayName="Circle";var cl=it(function(n,e){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:c,...u}=n,d={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:c};return z.jsx(dt.div,{ref:e,__css:d,...u})});cl.displayName="Flex";const Jg=n=>{const{getEmptyStateProps:e}=Mt(),r=e(z.jsx(cl,{...Kg,children:"No options found!"}));return z.jsx(To,{...n,children:r})},Kg={fontSize:"sm",align:"center",justify:"center",fontWeight:"bold",fontStyle:"italic"},Na=["AutoCompleteGroup","AutoCompleteItem","AutoCompleteCreatable"],Yg=n=>{const e=D.Children.map(n,(i,o)=>{var a;if(((a=i==null?void 0:i.type)==null?void 0:a.displayName)==="AutoCompleteGroup"){const s=D.Children.toArray(n)[o+1];return D.cloneElement(i,{groupSibling:s?s.type.displayName==="AutoCompleteGroup":!1})}return i}),r=D.Children.toArray(e).filter(i=>{var o;return!Na.includes((o=i==null?void 0:i.type)==null?void 0:o.displayName)});return[D.Children.toArray(e).filter(i=>{var o;return Na.includes((o=i==null?void 0:i.type)==null?void 0:o.displayName)}),r]},ul=Wt((n,e)=>{const{children:r,loadingState:i,...o}=n,{listRef:a,isLoading:s}=Mt(),l=Zn(e,a),[c,u]=Yg(r);return z.jsxs(Wa,{ref:l,w:"inherit",...qg,...o,children:[s&&z.jsx(Uc,{children:i||z.jsx(Ua,{size:"md"})}),!s&&z.jsxs(z.Fragment,{children:[c,z.jsx(Jg,{}),u]})]})});ul.displayName="AutoCompleteList";const qg={py:"4",opacity:"0",bg:"#232934",rounded:"md",maxH:"350px",border:"none",shadow:"base",zIndex:"popover",overflowY:"auto",_light:{bg:"#ffffff"},_focus:{boxShadow:"none"}};var[Qg,dl]=Wg({name:"TagStylesContext",errorMessage:"useTagStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),hl=it((n,e)=>{const r=$g("Tag",n),i=Cg(n),o={display:"inline-flex",verticalAlign:"top",alignItems:"center",maxWidth:"100%",...r.container};return z.jsx(Qg,{value:r,children:z.jsx(dt.span,{ref:e,...i,__css:o})})});hl.displayName="Tag";var pl=it((n,e)=>{const r=dl();return z.jsx(dt.span,{ref:e,noOfLines:1,...n,__css:r.label})});pl.displayName="TagLabel";var Xg=it((n,e)=>z.jsx(di,{ref:e,verticalAlign:"top",marginEnd:"0.5rem",...n}));Xg.displayName="TagLeftIcon";var Zg=it((n,e)=>z.jsx(di,{ref:e,verticalAlign:"top",marginStart:"0.5rem",...n}));Zg.displayName="TagRightIcon";var fl=n=>z.jsx(di,{verticalAlign:"inherit",viewBox:"0 0 512 512",...n,children:z.jsx("path",{fill:"currentColor",d:"M289.94 256l95-95A24 24 0 00351 127l-95 95-95-95a24 24 0 00-34 34l95 95-95 95a24 24 0 1034 34l95-95 95 95a24 24 0 0034-34z"})});fl.displayName="TagCloseIcon";var gl=it((n,e)=>{const{isDisabled:r,children:i,...o}=n,a={display:"flex",alignItems:"center",justifyContent:"center",outline:"0",...dl().closeButton};return z.jsx(dt.button,{ref:e,"aria-label":"close",...o,type:"button",disabled:r,__css:a,children:i||z.jsx(fl,{})})});gl.displayName="TagCloseButton";$.memo(n=>{const{label:e,onRemove:r,disabled:i,...o}=n;return z.jsx(Ao,{children:z.jsxs(hl,{borderRadius:"md",fontWeight:"normal",...i&&Ra,...o,children:[z.jsx(pl,{children:e}),z.jsx(gl,{onClick:()=>!i&&me(r),cursor:"pointer",...i&&Ra})]})})});const Ra={cursor:"text",userSelect:"none",opacity:.4,_focus:{boxShadow:"none"}};var zt=function(){return zt=Object.assign||function(n){for(var e,r=1,i=arguments.length;r0)&&!(o=i.next()).done;)a.push(o.value)}catch(l){s={error:l}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(s)throw s.error}}return a},Ca=function(n,e,r){if(r||arguments.length===2)for(var i=0,o=e.length,a;i0)&&!(o=i.next()).done;)a.push(o.value)}catch(l){s={error:l}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(s)throw s.error}}return a},im=function(n,e){var r=n.validator,i=n.onDebouncedChange,o=n.delay,a=n.optionList,s=n.defaultValue;n.onChange;var l=nm(n,["validator","onDebouncedChange","delay","optionList","defaultValue","onChange"]),c=$.useRef(null),u=Zn(c,e),d=$.useRef("datalist-"+new Date().valueOf()),h=rm($.useState(!1),2),p=h[0],g=h[1],y=$.useRef();$.useEffect(function(){c.current&&(c.current.value=(s==null?void 0:s.toString())||"")},[s]);var w=function(S){var R=S.target.value;window.clearTimeout(y.current),r&&g(!r(R)),y.current=window.setTimeout(function(){i==null||i(R),y.current=void 0},o!=null?o:500)},_=function(S){var R=S.target.value;y.current!==void 0&&(window.clearTimeout(y.current),r&&g(!r(R)),i==null||i(R),y.current=void 0)};return m.jsxs(m.Fragment,{children:[m.jsx(Ga,Hi({ref:u,list:d.current,variant:"flushed",size:"sm",h:6,onChange:w,onBlur:_,isInvalid:p},l)),a&&m.jsx("datalist",{id:d.current,children:a==null?void 0:a.map(function(S,R){return m.jsx("option",{children:S},R)})})]})},om=$.forwardRef(im),Ji=function(){return Ji=Object.assign||function(n){for(var e,r=1,i=arguments.length;r0)&&!(o=i.next()).done;)a.push(o.value)}catch(l){s={error:l}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(s)throw s.error}}return a},um=function(n){switch(n){case Ot.DEV:return"red";case Ot.UAT:return"orange";case Ot.PRD:return"green"}};function Z1(n){var e=n.environment,r=n.version,i=n.popoverHeader,o=n.popoverBody,a=cm($.useState(!1),2),s=a[0],l=a[1];return m.jsxs(Fa,{isOpen:s,onOpen:function(){return i&&l(!0)},onClose:function(){return l(!1)},children:[m.jsx(iu,{children:m.jsx(Ka,{ml:1,colorScheme:um(e),title:"".concat(e,": ").concat(r),cursor:i?"pointer":"help",children:e===Ot.PRD?r:e})}),m.jsxs(Wa,{children:[m.jsx(ou,{}),m.jsx(au,{}),m.jsx(su,{children:i}),m.jsx(lu,{children:o})]})]})}var dm=function(n,e,r){var i=new Blob([r],{type:e});hm(n,i)},hm=function(n,e){var r=window.URL.createObjectURL(e),i=document.createElement("a");i.href=r,i.download=n,document.body.appendChild(i),i.click(),document.body.removeChild(i),window.URL.revokeObjectURL(r)},pm=function(n,e){var r=typeof Symbol=="function"&&n[Symbol.iterator];if(!r)return n;var i=r.call(n),o,a=[],s;try{for(;(e===void 0||e-- >0)&&!(o=i.next()).done;)a.push(o.value)}catch(l){s={error:l}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(s)throw s.error}}return a};function fm(n){var e=n.cancelRef,r=n.isOpen,i=n.onClose,o=pm($.useState(!1),2),a=o[0],s=o[1],l=function(){s(!0);var c=Ge.storage.getAll(),u=Ge.getAppName(),d="".concat(u,"_BACKUP_").concat(new Date().toISOString(),".json");dm(d,"application/json",JSON.stringify(c)),Ge.storage.clear(),setTimeout(function(){window.location.reload()},2e3)};return m.jsxs(cu,{leastDestructiveRef:e,isOpen:r,onClose:i,children:[m.jsx(uu,{}),m.jsxs(du,{children:[m.jsx(hu,{children:"Warning 警告"}),m.jsx(pu,{}),m.jsxs(fu,{sx:{"& p":{my:1}},children:[m.jsx(At,{children:"Are you sure you want to reset the app? The webpage local storage for this app will be cleared. A copy of the local storage will be downloaded and it may be used for restoration (varies with app)."}),m.jsx(At,{children:"確定重設該應用程式嗎?應用程式的網頁本地儲存將會被清除。本地儲存的副本可供下載及用於復原(因應用程式而異)。"}),m.jsx(At,{children:"确定重置本应用程序吗?应用程序的网页本地存储将会被清除。本地存储的拷贝可供下载以及用于还原(因应用程序而異)。"})]}),m.jsxs(gu,{children:[m.jsx(dn,{ref:e,onClick:i,children:"Cancel"}),m.jsx(dn,{isLoading:a,colorScheme:"red",ml:3,onClick:l,children:"Confirm and reload"})]})]})]})}var Vn=function(){return Vn=Object.assign||function(n){for(var e,r=1,i=arguments.length;r0)&&!(o=i.next()).done;)a.push(o.value)}catch(l){s={error:l}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(s)throw s.error}}return a};function ym(n){var e=n.error,r=n.errorInfo,i=n.allowReset,o=n.sx,a=gm(n,["error","errorInfo","allowReset","sx"]),s=ht("RmgErrorBoundary"),l=Ya("primary.500","primary.300"),c=mm($.useState(!1),2),u=c[0],d=c[1],h=$.useRef(null),p=function(w){return m.jsx(zn,{color:l,role:"button",onClick:function(){return d(!0)},children:w})},g=Ge.getAppName(),y=m.jsx(zn,{color:l,href:"https://github.com/railmapgen/".concat(g,"/issues"),isExternal:!0,children:"GitHub Issue"});return m.jsxs(io,Vn({status:"error",sx:Vn(Vn({},s),o)},a,{children:[m.jsx(oo,{}),m.jsx(mu,{children:"Something went wrong!"}),m.jsxs(yu,{children:[m.jsxs(At,{children:["Please try to refresh or re-import your configuration files. If the issue still persists, please consider upgrading your browser",i?m.jsxs(m.Fragment,{children:[" or ",p("reset this app")]}):"",". Should you need any help, please contact us by submitting an issue in ",y," with the details shown below."]}),m.jsxs(At,{children:["請嘗試重新整理或重新上載設定檔。如果問題仍然存在,請考慮更新你的瀏覽器",i?m.jsxs(m.Fragment,{children:["或",p("重設該應用程式")]}):"","。如需協助或與我們聯絡,請前往 ",y," 提交一個 Issue 並附以詳細資料。"]}),m.jsxs(At,{children:["请尝试刷新或者重新上传配置文件。如果问题仍然存在,请考虑更新您的浏览器",i?m.jsxs(m.Fragment,{children:["或者",p("重置本应用程序")]}):"","。如需帮助或者联系我们,请前往 ",y," 提交一个 Issue 并附上详细信息。"]}),m.jsxs(At,{as:"details",children:[e==null?void 0:e.toString(),m.jsx("br",{}),r==null?void 0:r.componentStack]}),i&&m.jsx(fm,{cancelRef:h,isOpen:u,onClose:function(){return d(!1)}})]})]}))}var bm=function(){var n=function(e,r){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,o){i.__proto__=o}||function(i,o){for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(i[a]=o[a])},n(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");n(e,r);function i(){this.constructor=e}e.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}}(),Ki=function(){return Ki=Object.assign||function(n){for(var e,r=1,i=arguments.length;r0)&&!(o=i.next()).done;)a.push(o.value)}catch(l){s={error:l}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(s)throw s.error}}return a};function Nm(n){var e=n.defaultValue,r=n.options,i=n.disabledOptions,o=_m(n,["defaultValue","options","disabledOptions"]),a=$.useRef(null);$.useEffect(function(){a.current&&(a.current.value=(e==null?void 0:e.toString())||"")},[e]);var s=function(l,c){return m.jsx("option",{value:l,disabled:(i==null?void 0:i.find(function(u){return u.toString()===l}))!==void 0,children:c},l)};return m.jsx(wu,qi({ref:a,variant:"flushed",size:"sm",h:6},o,{children:Object.entries(r).map(function(l){var c=Aa(l,2),u=c[0],d=c[1];return typeof d=="object"?m.jsx("optgroup",{label:u,children:Object.entries(d).map(function(h){var p=Aa(h,2),g=p[0],y=p[1];return s(g,y)})},u):s(u,d)})}))}var Rm=function(n,e){var r=typeof Symbol=="function"&&n[Symbol.iterator];if(!r)return n;var i=r.call(n),o,a=[],s;try{for(;(e===void 0||e-- >0)&&!(o=i.next()).done;)a.push(o.value)}catch(l){s={error:l}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(s)throw s.error}}return a},ex=function(n,e,r){var i=Rm($.useState(e()),2),o=i[0],a=i[1];return $.useEffect(function(){n.then(function(){console.debug("[rmg-components] Getter updates finished"),a(e())})},[]),o},Oi=function(n,e){var r=typeof Symbol=="function"&&n[Symbol.iterator];if(!r)return n;var i=r.call(n),o,a=[],s;try{for(;(e===void 0||e-- >0)&&!(o=i.next()).done;)a.push(o.value)}catch(l){s={error:l}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(s)throw s.error}}return a},Ta=function(n,e,r){if(r||arguments.length===2)for(var i=0,o=e.length,a;i0)&&!(o=i.next()).done;)a.push(o.value)}catch(l){s={error:l}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(s)throw s.error}}return a};function Am(n){var e=n.defaultValue,r=n.min,i=n.max,o=n.step,a=n.onThrottledChange,s=n.leftIcon,l=n.rightIcon,c=ht("RmgThrottledSlider"),u=Cm($.useState(e!=null?e:0),2),d=u[0],h=u[1];$.useEffect(function(){e!==void 0&&d!==e&&h(e)},[e]);var p=km(a!=null?a:function(){},500),g=function(){var w=Math.min(d+(o!=null?o:1)*10,i!=null?i:100);a==null||a(w),h(w)},y=function(){var w=Math.max(d-(o!=null?o:1)*10,r!=null?r:0);a==null||a(w),h(w)};return m.jsxs(ct,{sx:c,children:[s&&m.jsx(Er,{size:"xs",variant:"ghost","aria-label":"Drag left",icon:s,onClick:y}),m.jsxs(xu,{value:d,min:r,max:i,step:o,onChange:function(w){p(w),h(w)},children:[m.jsx(Su,{children:m.jsx(_u,{})}),m.jsx(Nu,{})]}),l&&m.jsx(Er,{size:"xs",variant:"ghost","aria-label":"Drag right",icon:l,onClick:g})]})}var Tm=function(n){var e=n.children,r=n.noWrap,i=ht("RmgOutput",{noWrap:r});return m.jsx(Tr.output,{sx:i,children:e})};function Ee(n){var e=n.fields,r=n.noLabel,i=n.minW;return m.jsx(ct,{wrap:"wrap",children:e.map(function(o,a){if(o.hidden)return m.jsx($.Fragment,{},a);var s=o.minW||i,l=s==="full";return m.jsx(Sm,{className:l?"mw-full":"",label:o.label,flex:l?void 0:1,minW:l?void 0:s,noLabel:r,oneLine:o.oneLine,children:function(c){switch(c.type){case"input":return m.jsx(om,{placeholder:c.placeholder,defaultValue:c.value,type:c.variant,validator:c.validator,onDebouncedChange:c.onChange,delay:c.debouncedDelay,optionList:c.optionList,isDisabled:c.isDisabled});case"output":return m.jsx(Tm,{noWrap:c.noWrap,children:c.value});case"textarea":return m.jsx(lm,{placeholder:c.placeholder,defaultValue:c.value,onDebouncedChange:c.onChange,isDisabled:c.isDisabled});case"slider":return m.jsx(Am,{defaultValue:c.value,min:c.min,max:c.max,step:c.step,onThrottledChange:c.onChange,leftIcon:c.leftIcon,rightIcon:c.rightIcon,isDisabled:c.isDisabled});case"select":return m.jsx(Nm,{defaultValue:c.value,onChange:function(u){var d,h=u.target.value;return(d=c.onChange)===null||d===void 0?void 0:d.call(c,typeof c.value=="number"?Number(h):h.toString())},options:c.options,disabledOptions:c.disabledOptions,isInvalid:c.isInvalid,isDisabled:c.isDisabled});case"switch":return m.jsx(Ru,{isChecked:c.isChecked,isDisabled:c.isDisabled,onChange:function(u){var d,h=u.target.checked;return(d=c.onChange)===null||d===void 0?void 0:d.call(c,h)}});case"custom":return c.component;default:return m.jsx("div",{})}}(o)},a)})})}var Lt=function(){return Lt=Object.assign||function(n){for(var e,r=1,i=arguments.length;r button:first-of-type":{ml:1}}},Gm={baseStyle:{w:"100%",h:"100%",position:"absolute",top:0,right:0,alignItems:"center",justifyContent:"center","& .rmg-loader__backdrop":{position:"absolute",w:"100%",h:"100%",zIndex:1500,bg:"blackAlpha.400"},"& .chakra-progress":{zIndex:2e3}}},Rt=function(n){return n==="dark"?"primary.300":"primary.500"},Um={baseStyle:function(n){var e=n.theme,r=n.colorMode;return{"& .rmg-multi-select__wrapper":{position:"relative",w:"100%",h:"25.75px",transform:"translateY(1.75px)",cursor:"default"},"& .rmg-multi-select__field":{position:"relative",w:"100%",minW:0,outline:0,appearance:"none",transitionProperty:"common",transitionDuration:"normal",pb:"1px",fontSize:"sm",h:"6",borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_active:{borderColor:Rt(r),boxShadow:"0px 1px 0px 0px ".concat(Bn(e,Rt(r)))},_focus:{borderColor:Rt(r),boxShadow:"0px 1px 0px 0px ".concat(Bn(e,Rt(r)))},_focusVisible:{borderColor:Rt(r),boxShadow:"0px 1px 0px 0px ".concat(Bn(e,Rt(r)))},"&.active":{borderColor:Rt(r),boxShadow:"0px 1px 0px 0px ".concat(Bn(e,Rt(r)))},"& > span:last-of-type":{position:"absolute",right:8}},"& .rmg-multi-select__icon-wrapper":{display:"inline-flex",justifyContent:"center",w:6,h:"100%",position:"absolute",right:2,top:0,fontSize:"xl","& svg":{h:"1em",w:"1em"}},"& .chakra-popover__content":{w:"unset",minW:200},"& .chakra-popover__body":{p:0,"li label":{p:2,w:"100%",_hover:{bg:r==="dark"?"whiteAlpha.200":"gray.100"},_active:{bg:r==="dark"?"whiteAlpha.300":"gray.200"}}}}}},Xi=function(){return Xi=Object.assign||function(n){for(var e,r=1,i=arguments.length;r(n.RailMap="railmap",n.Platform="platform",n))(sy||{}),ly=(n=>(n.Metro="metro",n.NationalRail="nationalrail",n.LightRail="lightrail",n.Footpath="footpath",n))(ly||{}),cy=(n=>(n.APP_LOAD="APP_LOAD",n.ADD_STATION="ADD_STATION",n.ADD_LINE="ADD_LINE",n.IMPORT_RMG_PARAM="IMPORT_RMG_PARAM",n.IMPORT_WORK_FROM_GALLERY="IMPORT_WORK_FROM_GALLERY",n.DOWNLOAD_PARAM="DOWNLOAD_PARAM",n.DOWNLOAD_IMAGES="DOWNLOAD_IMAGES",n.LOAD_TUTORIAL="LOAD_TUTORIAL",n))(cy||{}),rt=(n=>(n.LOGIN_STATE="rmp__login_state",n.APP="rmp__app",n.PARAM="rmp__param",n.PARAM_BACKUP="rmp__param__backup",n.DO_NOT_SHOW_RMT_MSG="rmp__doNotShowRMTMsg",n.ACCOUNT="rmg-home__account",n))(rt||{}),ye=(n=>(n.Other="other",n.Beijing="beijing",n.Berlin="berlin",n.Chongqing="chongqing",n.Foshan="foshan",n.Guangzhou="guangzhou",n.Hongkong="hongkong",n.Kunming="kunming",n.London="london",n.Qingdao="qingdao",n.Shanghai="shanghai",n.Shenzhen="shenzhen",n.Singapore="singapore",n.Suzhou="suzhou",n.Tokyo="tokyo",n))(ye||{});const uy="https://railmapgen.org/v1/subscription",Jn={RMP_CLOUD:!1,RMP_EXPORT:!1},dy={state:"logged-out",activeSubscriptions:Jn,timeout:void 0},bl=ri({name:"account",initialState:dy,reducers:{setState:(n,e)=>{n.state=e.payload},setActiveSubscriptions:(n,e)=>{n.activeSubscriptions=e.payload},setLoginStateTimeout:(n,e)=>{n.timeout=e.payload}}}),{setState:sn,setActiveSubscriptions:Kn,setLoginStateTimeout:eo}=bl.actions,hy=bl.reducer;var de;(function(n){n.black="#000",n.white="#fff"})(de||(de={}));var vl=function(n,e,r,i){function o(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function l(d){try{u(i.next(d))}catch(h){s(h)}}function c(d){try{u(i.throw(d))}catch(h){s(h)}}function u(d){d.done?a(d.value):o(d.value).then(l,c)}u((i=i.apply(n,e||[])).next())})};let Mi={};const py=(n,e)=>vl(void 0,void 0,void 0,function*(){if(n in Mi)return Mi[n];const i=yield(yield fetch(n,e)).json();return Mi[n]=i,i}),fy=(n,e)=>vl(void 0,void 0,void 0,function*(){return yield py("/rmg-palette/resources/palettes/".concat(n,".json"),{signal:e})});var gy=function(n,e,r,i){function o(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function l(d){try{u(i.next(d))}catch(h){s(h)}}function c(d){try{u(i.throw(d))}catch(h){s(h)}}function u(d){d.done?a(d.value):o(d.value).then(l,c)}u((i=i.apply(n,e||[])).next())})};const sx=(n,e,r)=>gy(void 0,void 0,void 0,function*(){const[i,o]=n;if(i==="other")return n;try{const s=(yield fy(i)).find(l=>l.id===o);return s?[i,o,s.colour,s.fg||de.white]:(console.warn("[rmg-palette] updateTheme(".concat(i,", ").concat(o,"), line does not exist, returning old theme")),n)}catch(a){throw console.error("[rmg-palette] updateTheme(".concat(i,", ").concat(o,"), unexpected error occurs"),a),a}}),lx=n=>{const e=n.currentTarget.getBoundingClientRect(),r=n.clientX-e.left,i=n.clientY-e.top;return{x:r,y:i}},cx=(n,e,r,i)=>({x:n*r/100+i.x,y:e*r/100+i.y}),ux=(n,e)=>Math.round(n/e)*e,dx=n=>{let[e,r,i,o]=[Number.MAX_VALUE,Number.MAX_VALUE,Number.MIN_VALUE,Number.MIN_VALUE];return n.forEachNode((a,s)=>{const l=document.getElementById(a);if(l){const c=my(l);e=Math.min(c.x,e),r=Math.min(c.y,r),i=Math.max(c.x+c.width,i),o=Math.max(c.y+c.height,o)}}),e-=50,r-=50,i+=100,o+=100,{xMin:e,yMin:r,xMax:i,yMax:o}},hx=n=>{var e,r;return{width:((e=n.width)!=null?e:720)-40,height:((r=n.height)!=null?r:1280)-40}},my=n=>{const e=n.getBBox(),r=n.ownerSVGElement,i=n.parentNode.getScreenCTM().inverse().multiply(n.getScreenCTM()),o=[r.createSVGPoint(),r.createSVGPoint(),r.createSVGPoint(),r.createSVGPoint()];o[0].x=e.x,o[0].y=e.y,o[1].x=e.x+e.width,o[1].y=e.y,o[2].x=e.x+e.width,o[2].y=e.y+e.height,o[3].x=e.x,o[3].y=e.y+e.height;let[a,s,l,c]=[Number.MAX_VALUE,Number.MAX_VALUE,Number.MIN_VALUE,Number.MIN_VALUE];return o.forEach(u=>{u=u.matrixTransform(i),a=Math.min(a,u.x),l=Math.max(l,u.x),s=Math.min(s,u.y),c=Math.max(c,u.y)}),e.x=a,e.width=l-a,e.y=s,e.height=c-s,e},px=navigator.platform.startsWith("Mac"),yy=async(n,e="SHA-256")=>{const i=new TextEncoder().encode(n),o=await crypto.subtle.digest(e,i);return Array.from(new Uint8Array(o)).map(s=>s.toString(16).padStart(2,"0")).join("")},fx=()=>{const n=Math.floor(Math.random()*16777215);return"#".concat(n.toString(16).padStart(6,"0"))},gx=n=>{const e=parseInt(n.slice(1,3),16),r=parseInt(n.slice(3,5),16),i=parseInt(n.slice(5,7),16);return(e*299+r*587+i*114)/1e3>=128?de.black:de.white},by="rmt-save-manager";var vy=(n=>(n.SAVE_CHANGED="SAVE_CHANGED",n.TOKEN_REQUEST="TOKEN_REQUEST",n))(vy||{});const Eo=new BroadcastChannel(by);let ji;const wy=async n=>{const e=await yy(JSON.stringify(n));ji&&ji!==e&&Eo.postMessage({type:"SAVE_CHANGED",key:rt.PARAM,from:"rmp"}),ji=e},Ma=async()=>{Eo.postMessage({type:"TOKEN_REQUEST",from:"rmp"})},xy=async n=>{const e=async r=>{const{type:i,token:o,from:a}=r.data;if(i==="TOKEN_REQUEST"&&a==="rmt"){if(n.getState().account.timeout&&(window.clearTimeout(n.getState().account.timeout),n.dispatch(eo(void 0))),!o){n.dispatch(sn("logged-out")),n.dispatch(Kn(Jn));return}const s=await fetch(uy,{headers:{accept:"application/json","Content-Type":"application/json",Authorization:"Bearer ".concat(o)}});if(s.status!==200){n.dispatch(sn("expired")),n.dispatch(Kn(Jn));return}n.dispatch(sn("free"));const l=(await s.json()).subscriptions,c=structuredClone(Jn);for(const u of l){const d=u.type;d in c&&(n.dispatch(sn("subscriber")),c[d]=!0)}n.dispatch(Kn(c))}};Eo.addEventListener("message",e)},Sy="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let _y=(n=21)=>{let e="",r=crypto.getRandomValues(new Uint8Array(n));for(;n--;)e+=Sy[r[n]&63];return e};var N=(n=>(n.Diagonal="diagonal",n.Perpendicular="perpendicular",n.RotatePerpendicular="ro-perp",n.Simple="simple",n))(N||{}),U=(n=>(n.SingleColor="single-color",n.ShanghaiSuburbanRailway="sh-sub-rwy",n.ShmetroVirtualInt="shmetro-virtual-int",n.GzmtrVirtualInt="gzmtr-virtual-int",n.ChinaRailway="china-railway",n.BjsubwaySingleColor="bjsubway-single-color",n.BjsubwayTram="bjsubway-tram",n.BjsubwayDotted="bjsubway-dotted",n.DualColor="dual-color",n.River="river",n.MTRRaceDays="mtr-race-days",n.MTRLightRail="mtr-light-rail",n.MTRUnpaidArea="mtr-unpaid-area",n.MTRPaidArea="mtr-paid-area",n.MRTUnderConstruction="mrt-under-constr",n.MRTSentosaExpress="mrt-sentosa-express",n.JREastSingleColor="jr-east-single-color",n.JREastSingleColorPattern="jr-east-single-color-pattern",n.LRTSingleColor="lrt-single-color",n.LondonTubeTerminal="london-tube-terminal",n.LondonTubeInternalInt="london-tube-internal-int",n.LondonTube10MinWalk="london-tube-10-min-walk",n.GuangdongIntercityRailway="gd-intercity-rwy",n))(U||{});const mx=["single-color","bjsubway-single-color","bjsubway-tram","bjsubway-dotted","china-railway","mtr-race-days","mtr-light-rail","mrt-under-constr","jr-east-single-color","jr-east-single-color-pattern","lrt-single-color"],Ny=(n,e,r,i,o=Gr)=>{const{offset:a=Gr.offset}=o,s=Math.abs((i-r)/(e-n));if(s===1/0)return"M ".concat(n+a," ").concat(r," L ").concat(e+a," ").concat(i);if(s===0)return"M ".concat(n," ").concat(r+a," L ").concat(e," ").concat(i+a);{const l=1/s,c=a/Math.sqrt(l*l+1),u=c*l*-Math.sign((e-n)*(i-r));return"M ".concat(n+c," ").concat(r+u," L ").concat(e+c," ").concat(i+u)}},Gr={offset:0},Ry=n=>{var s;const{id:e,attrs:r,handleAttrsUpdate:i}=n,{t:o}=Te(),a=[{type:"input",label:o("panel.details.lines.simple.offset"),value:((s=r.offset)!=null?s:Gr.offset).toString(),variant:"number",onChange:l=>{r.offset=Number(l),i(e,r)},minW:"full"}];return m.jsx(Ee,{fields:a})},ky=m.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:m.jsx("path",{d:"M6,18L18,6",stroke:"currentColor",fill:"none"})}),Cy={generatePath:Ny,icon:ky,defaultAttrs:Gr,attrsComponent:Ry,metadata:{displayName:"panel.details.lines.simple.displayName"}},yx={translateX:0,translateY:0,scale:1,rotate:0},Ay=3,Ty=1/0;var st=(n=>(n.Virtual="virtual",n.ShmetroNumLineBadge="shmetro-num-line-badge",n.ShmetroTextLineBadge="shmetro-text-line-badge",n.GzmtrLineBadge="gzmtr-line-badge",n.BjsubwayNumLineBadge="bjsubway-num-line-badge",n.BjsubwayTextLineBadge="bjsubway-text-line-badge",n.SuzhouRTNumLineBadge="suzhourt-num-line-badge",n.BerlinSBahnLineBadge="berlin-s-bahn-line-badge",n.BerlinUBahnLineBadge="berlin-u-bahn-line-badge",n.ChongqingRTNumLineBadge="chongqingrt-num-line-badge",n.ChongqingRTTextLineBadge="chongqingrt-text-line-badge",n.ShenzhenMetroNumLineBadge="shenzhen-metro-num-line-badge",n.MRTDestinationNumbers="mrt-num-line-badge",n.JREastLineBadge="jr-east-line-badge",n.QingdaoMetroNumLineBadge="qingdao-metro-num-line-badge",n.MRTLineBadge="mrt-line-badge",n.GuangdongIntercityRailwayLineBadge="gd-intercity-rwy-line-badge",n.Facilities="facilities",n.Text="text",n.I18nText="i18n-text",n.Master="master",n))(st||{});const Ey="操作",Oy="应用程序",Ly="黑",My="取消",jy="城市",$y="组件",Py="确定",Iy="继续",Dy="复制",By="编辑",zy="语言/Language",Fy="理由",Gy="名称",Uy="下一步",Wy="打开",Vy="调色板",Hy="上一步",Jy="删除",Ky="重置",Yy="设置",qy="提交",Qy="翻译",Xy="上传",Zy="白",eb={Action:Ey,Apps:Oy,"Back to list":"返回列表","Background colour":"背景色",Black:Ly,Cancel:My,City:jy,Components:$y,"Configuration file":"配置文件",Confirm:Py,Continue:Iy,"Country/Region":"国家/地区",Copy:Dy,Edit:By,"Foreground colour":"前景色","Go back":"返回",Language:zy,Justification:Fy,Name:Gy,Next:Uy,Open:Wy,Palette:Vy,"Please select...":"请选择...",Previous:Hy,"Rail Map Generator":"铁路线路图生成器","Rail Map Painter":"地铁线路图绘制器","Rail Map Toolkit":"线路图工具包",Remove:Jy,Reset:Ky,"RMG Templates":"RMG 模板","RMP Gallery":"RMP 画廊","RMP Designer":"RMP 设计师","Seed Project":"种子项目",Settings:Yy,Submit:qy,Translate:Qy,Upload:Xy,White:Zy},tb="動作",nb="應用程式",rb="黑",ib="取消",ob="城市",ab="元件",sb="確定",lb="繼續",cb="複製",ub="編輯",db="語言/Language",hb="理由",pb="名稱",fb="下一步",gb="開啟",mb="調色盤",yb="上一步",bb="移除",vb="重設",wb="設定",xb="提交",Sb="翻譯",_b="上載",Nb="白",Rb={Action:tb,Apps:nb,"Back to list":"返回列表","Background colour":"背景色",Black:rb,Cancel:ib,City:ob,Components:ab,"Configuration file":"設定檔",Confirm:sb,Continue:lb,Copy:cb,"Country/Region":"國家/地區",Edit:ub,"Foreground colour":"前景色","Go back":"返回",Language:db,Justification:hb,Name:pb,Next:fb,Open:gb,Palette:mb,"Please select...":"請選擇...",Previous:yb,"Rail Map Generator":"鐵路路綫圖產生器","Rail Map Painter":"地鐵路綫圖繪製器","Rail Map Toolkit":"路綫圖工具組",Remove:bb,Reset:vb,"RMG Templates":"RMG 範本","RMP Gallery":"RMP 畫廊","RMP Designer":"RMP 設計師","Seed Project":"種子項目",Settings:wb,Submit:xb,Translate:Sb,Upload:_b,White:Nb},kb="言語/Language",Cb="調色板",Ab="削除",Tb={Language:kb,Palette:Cb,"Rail Map Generator":"鉄道路線図ジェネレータ","Rail Map Painter":"鉄道路線図画家","Rail Map Toolkit":"路線図ツールキット",Remove:Ab,"RMG Templates":"RMG テンプレート","RMP Gallery":"RMP 画廊","RMP Designer":"RMP 図案家"},Eb="조작",Ob="앱",Lb="블랙",Mb="취소",jb="도시",$b="요소",Pb="확인",Ib="복사",Db="편집",Bb="언어/Language",zb="이유",Fb="명칭",Gb="다음",Ub="열기",Wb="팔레트",Vb="나아가",Hb="삭제",Jb="리셋",Kb="설치",Yb="제출",qb="번역",Qb="업로드",Xb="화이트",Zb={Action:Eb,Apps:Ob,"Back to list":"다시 목록으로","Background colour":"배경색",Black:Lb,Cancel:Mb,City:jb,Components:$b,"Configuration file":"환경 설정 파일",Confirm:Pb,Copy:Ib,"Country/Region":"국가/지역",Edit:Db,"Foreground colour":"전경색","Go back":"되돌아가",Language:Bb,Justification:zb,Name:Fb,Next:Gb,Open:Ub,Palette:Wb,"Please select...":"선택해주세요",Previous:Vb,"Rail Map Generator":"철도 노선도 생성기","Rail Map Painter":"지하철 노선도 그리기","Rail Map Toolkit":"노선도 툴킷",Remove:Hb,Reset:Jb,"RMG Templates":"RMG 템플릿","RMP Gallery":"RMP 갤러리","RMP Designer":"RMP 디자이너","Seed Project":"종자 프로젝트",Settings:Kb,Submit:Yb,Translate:qb,Upload:Qb,White:Xb};var ev={en:{},"zh-Hans":eb,"zh-Hant":Rb,ja:Tb,ko:Zb};const tv="Color",nv="Warning",rv="Cancel",iv="Apply",ov="Remove",av="Close",sv="Don't show me again",lv="The all-in-one toolkit you definitely do not want to miss!",cv={tools:{showLess:"Show less",section:{lineDrawing:"Line drawing",stations:"Stations",miscellaneousNodes:"Miscellaneous nodes"},select:"Select",learnHowToAdd:{station:"Learn how to add your stations!","misc-node":"Learn how to add your nodes!",line:"Learn how to add your line styles!"}},details:{header:"Details",info:{title:"Basic information",id:"ID",zIndex:"Depth",stationType:"Station Type",linePathType:"Line Path Type",lineStyleType:"Line Style Type",type:"Type",parallel:"Parallel line",parallelIndex:"Parallel index"},multipleSelection:{title:"Multiple Selection",change:"Change selected attributes",selected:"Selected Objects:",show:"Show",station:"Stations",miscNode:"MiscNodes",edge:"Lines"},changeStationTypeContent:"Changing station's type will remove all attributes from the station except its names.",changeLineTypeContent:"Changing line's type will remove all attributes from the line.",changeType:"Change Type",nodePosition:{title:"Node Position",pos:{x:"Coordinate X",y:"Coordinate Y"}},lineExtremities:{title:"Line Extremities",source:"Source",target:"Target",sourceName:"Source Name",targetName:"Target Name"},specificAttrsTitle:"Specific Attributes",unknown:{error:"Oops :( We can't recognize this {{category}}. Maybe it is created in a newer version.",node:"node",linePath:"line path",lineStyle:"line style"},nodes:{common:{nameZh:"Line name in Chinese",nameEn:"Line name in English",nameJa:"Line name in Japanese",num:"Line number"},virtual:{displayName:"Virtual node"},shmetroNumLineBadge:{displayName:"Shanghai Metro num line badge"},shmetroTextLineBadge:{displayName:"Shanghai Metro text line badge"},gzmtrLineBadge:{displayName:"Guangzhou Metro line badge",tram:"Tram",span:"Row-spanning digits"},bjsubwayNumLineBadge:{displayName:"Beijing Subway num line badge"},bjsubwayTextLineBadge:{displayName:"Beijing Subway text line badge"},berlinSBahnLineBadge:{displayName:"Berlin S Bahn line badge"},berlinUBahnLineBadge:{displayName:"Berlin U Bahn line badge"},suzhouRTNumLineBadge:{displayName:"Suzhou Rail Transit num line badge",branch:"Is branch line"},chongqingRTNumLineBadge:{displayName:"Chongqing Rail Transit num line badge"},chongqingRTTextLineBadge:{displayName:"Chongqing Rail Transit text line badge"},shenzhenMetroNumLineBadge:{displayName:"Shenzhen Metro num line badge",branch:"Is branch line"},mrtDestinationNumbers:{displayName:"Singapore MRT destination numbers"},mrtLineBadge:{displayName:"Singapore MRT line badge",isTram:"Is LRT line badge"},jrEastLineBadge:{displayName:"JR East line badge",crosshatchPatternFill:"Fill with crosshatch pattern"},qingdaoMetroNumLineBadge:{displayName:"Qingdao Metro Num line badge",numEn:"Line number in English",showText:"Show text"},guangdongIntercityRailwayLineBadge:{displayName:"Guangdong Intercity Railway line badge"},master:{displayName:"Master node",type:"Master node type",undefined:"Undefined"},facilities:{displayName:"Facilities",type:"Type"},text:{displayName:"Arbitrary text",content:"Content",fontSize:"Font size",lineHeight:"Line height",textAnchor:"Text anchor",start:"Start",middle:"Middle",end:"End",auto:"Auto",hanging:"Hanging",dominantBaseline:"Dominant baseline",language:"Font family in which language",zh:"Chinese",en:"English",mtr__zh:"Hongkong MTR Chinese",mtr__en:"Hongkong MTR English",berlin:"Berlin S/U Bahn",mrt:"Singapore MRT",jreast_ja:"JR East Japanese",jreast_en:"JR East English",rotate:"Rotation",italic:"Italic",bold:"Bold"}},stations:{common:{nameZh:"Names in Chinese",nameEn:"Names in English",nameJa:"Names in Japanese",nameOffsetX:"Names offset X",nameOffsetY:"Names offset Y",rotate:"Icon rotation",lineCode:"Line code",stationCode:"Station code",left:"Left",middle:"Middle",right:"Right",top:"Top",bottom:"Bottom"},interchange:{title:"Interchanges",within:"Within-station interchange",outStation:"Out-of-station interchange",outSystem:"Out-of-system interchange",addGroup:"Add interchange group",noInterchanges:"No interchanges",nameZh:"Chinese name",nameEn:"English name",add:"Add interchange",copy:"Copy interchange",remove:"Remove interchange"},shmetroBasic:{displayName:"Shanghai Metro basic station"},shmetroBasic2020:{displayName:"Shanghai Metro basic station (2020)"},shmetroInt:{displayName:"Shanghai Metro interchange station",height:"Icon height",width:"Icon width"},shmetroOsysi:{displayName:"Shanghai Metro out-of-system interchange station"},shanghaiSuburbanRailway:{displayName:"Shanghai Suburban Railway station"},gzmtrBasic:{displayName:"Guangzhou Metro basic station",open:"Is opened",secondaryNameZh:"Secondary name in Chinese",secondaryNameEn:"Secondary name in English",tram:"Tram"},gzmtrInt:{displayName:"Guangzhou Metro interchange station",open:"Is opened",secondaryNameZh:"Secondary name in Chinese",secondaryNameEn:"Secondary name in English",foshan:"Foshan"},gzmtrInt2024:{displayName:"Guangzhou Metro interchange station (2024)",anchorAt:"Anchor at",anchorAtNone:"Center",preferVertical:"Vertical layout (2 interchanges only)"},bjsubwayBasic:{displayName:"Beijing Subway basic station",open:"Is opened"},bjsubwayInt:{displayName:"Beijing Subway interchange station",outOfStation:"Out of station interchange"},mtr:{displayName:"Hongkong MTR station",rotate:"Icon rotation"},suzhouRTBasic:{displayName:"Suzhou Rail Transit basic station",textVertical:"Vertical names"},suzhouRTInt:{displayName:"Suzhou Rail Transit interchange station"},kunmingRTBasic:{displayName:"Kunming Rail Transit basic station"},kunmingRTInt:{displayName:"Kunming Rail Transit interchange station"},MRTBasic:{displayName:"Singapore MRT basic station",isTram:"Is LRT station"},MRTInt:{displayName:"Singapore MRT interchange station"},jrEastBasic:{displayName:"JR East basic station",nameOffset:"Names offset",textOneLine:"Names in one line",textVertical:"Vertical names",important:"Important station",lines:"Interchange lines offset"},jrEastImportant:{displayName:"JR East important station",textVertical:"Vertical names",mostImportant:"Most important station",minLength:"Minimal length of the station"},foshanMetroBasic:{displayName:"Foshan Metro basic station",open:"Is opened",secondaryNameZh:"Secondary name in Chinese",secondaryNameEn:"Secondary name in English",tram:"Tram"},qingdaoMetro:{displayName:"Qingdao Metro station",isInt:"Is interchange station"},tokyoMetroBasic:{displayName:"Tokyo Metro basic station",nameOffset:"Names offset",textVertical:"Vertical names",lineCode:"Line code",stationCode:"Station code"},tokyoMetroInt:{displayName:"Tokyo Metro interchange station",mereOffset:{displayName:"Names mere offset",none:"None",left1:"Left (less)",left2:"Left (more)",right1:"Right (less)",right2:"Right (more)",up:"Up",down:"Down"},importance:{displayName:"Station importance",default:"Default",middle:"Middle",high:"High"},align:{displayName:"Icon align",horizontal:"Horizontal",vertical:"Vertical"}},londonTubeCommon:{stepFreeAccess:"Step free access",stepFreeAccessNone:"None",stepFreeAccessTrain:"From street to train",stepFreeAccessPlatform:"From street to platform"},londonTubeBasic:{displayName:"London Tube basic station",terminal:"Terminal station",shareTracks:"Track shares",shareTracksIndex:"Index of the track shares"},londonTubeInt:{displayName:"London Tube interchange station"},guangdongIntercityRailway:{displayName:"Guangdong Intercity Railway station"}},lines:{reconcileId:"Reconcile ID",common:{offsetFrom:"Offset From",offsetTo:"Offset To",startFrom:"Start From",from:"From",to:"To",roundCornerFactor:"Round Corner Factor",parallelDisabled:"Some attributes are disabled as this line is parallel.",changeInBaseLine:"Change them in the base line:"},simple:{displayName:"Simple path",offset:"Offset"},diagonal:{displayName:"135° diagonal path"},perpendicular:{displayName:"90° perpendicular path"},rotatePerpendicular:{displayName:"90° rotate perpendicular path"},singleColor:{displayName:"Single color style"},shmetroVirtualInt:{displayName:"Shanghai Metro out-of-station interchange style"},shanghaiSuburbanRailway:{displayName:"Shanghai Suburban Railway style",isEnd:"Is the ending line"},gzmtrVirtualInt:{displayName:"Guangzhou Metro out-of-station interchange style"},chinaRailway:{displayName:"China Railway style"},bjsubwaySingleColor:{displayName:"Beijing Subway single color style"},bjsubwayTram:{displayName:"Beijing Subway tram style"},bjsubwayDotted:{displayName:"Beijing Subway dotted style"},dualColor:{displayName:"Dual color style",swap:"Swap color",colorA:"Color A",colorB:"Color B"},river:{displayName:"River style",width:"Width"},mtrRaceDays:{displayName:"Hongkong MTR race days style"},mtrLightRail:{displayName:"Hongkong MTR light rail style"},mtrUnpaidArea:{displayName:"Hongkong MTR unpaid area style"},mtrPaidArea:{displayName:"Hongkong MTR paid area style"},mrtUnderConstruction:{displayName:"Singapore MRT under construction style"},mrtSentosaExpress:{displayName:"Singapore MRT Sentosa Express style"},jrEastSingleColor:{displayName:"JR East single color style"},jrEastSingleColorPattern:{displayName:"JR East single color filled with crosshatch pattern style"},lrtSingleColor:{displayName:"Singapore LRT single color style"},londonTubeInternalInt:{displayName:"London Tube internal interchange style"},londonTube10MinWalk:{displayName:"London Tube under a 10 minute walk interchange style"},londonTubeTerminal:{displayName:"London Tube terminal style"},guangdongIntercityRailway:{displayName:"Guangdong Intercity Railway style"}},edge:{},footer:{duplicate:"Duplicate",copy:"Copy",remove:"Remove"}}},uv={popoverHeader:"You're on <1>{{environment}} environment!",popoverBody:"We are currently testing the latest RMP. If you have any suggestions, feel free to raise at https://github.com/railmapgen/rmp/issues",search:"Search stations",open:{new:"New project",config:"Import project",projectRMG:"Import from RMG project",invalidType:"Invalid file type! Only file in JSON format is accepted.",unknownError:"Unknown error occurred while parsing the uploaded file! Please try again.",gallery:"Import from Gallery",tutorial:"Start tutorial",importFromRMPGallery:"Template {{id}} imported. Not satisfied with this change? Undo via Ctrl + Z or the undo button.",failToImportFromRMPGallery:"Fail to import {{id}} from the gallery. The file can not be found."},download:{config:"Export project",image:"Export image","2rmg":{title:"Export to RMG project",type:{line:"Line",loop:"Loop",branch:"Branch"},placeholder:{chinese:"Chinese name",english:"English name",lineCode:"Line code"},info1:"This function is designed to convert the RMP project into RMG projects.",info2:"The lines in the list following are the available lines for converting. You can enter the Chinese line name in the text box on the left, the English line name in the middle, the line code (for Guangzhou Metro style) on the right, and then click the download button on the right to save your RMG projects.",noline:"No available lines found.",download:"Download",downloadInfo:"Please select one of the following stations as the starting station and click it to download."},format:"Format",png:"PNG",svg:"SVG",svgVersion:"Version","svg1.1":"1.1 (Compatible with Adobe Illustrator)",svg2:"2 (Compatible with modern browsers)",transparent:"Transparency",scale:"Scale",disabledScaleOptions:"Some scale options are disabled due to your browser's canvas limitation.",disabledScaleOptionsWorkarounds:"Possible workarounds include generating the image from svg using this cli tool: ",imageTooBig:"The image is too big for your browser to generate!",useSystemFonts:"Use system fonts instead of fonts previewed in the canvas",shareInfo1:"I will attach ",shareInfo2:" and its link when I share this image.",termsAndConditions:"Terms and Conditions",termsAndConditionsInfo:"I agree to ",period:".",confirm:"Download"},donation:{title:"Donation",openCollective:"Open Collective",viaUSD:"Donate in USD via Paypal or Visa card.",afdian:"爱发电",viaCNY:"Donate in CNY via Alipay or Wechat Pay."},settings:{title:"Settings",pro:"This is a PRO feature and an account with a subscription is required.",proWithTrial:"This is a PRO feature with a limited free trial available.",proLimitExceed:{master:"Master nodes exceed the free tier.",parallel:"Parallel lines exceed the free tier.",solution:"Remove them to dismiss this warning, or subscribe to unlock more!"},subscription:{title:"Subscription Status","logged-out":"You are currently logged out.",free:"Logged In! Subscribe to unlock more features!",subscriber:"Thanks for your subscription! Enjoy all features!",expired:"Login status expired. Please log out and log in again."},preference:{title:"Preference",keepLastPath:"Keep drawing lines until clicking on the background in the next move",autoParallel:"Automatically set new lines to be parallel to existing lines"},shortcuts:{title:"Shortcuts",keys:"Keys",description:"Description",f:"Use the last tool.",s:"Select.",arrows:"Move the canvas a little bit.",ijkl:"Move the selected station(s) a little bit.",shift:"Multiple selection.",alt:"Precise movement.",delete:"Delete the selected station(s).",cut:"Cut.",copy:"Copy.",paste:"Paste.",undo:"Undo.",redo:"Redo."},procedures:{title:"Procedures",translate:{title:"Translate nodes' coordinates",content:"Add the following offset to all nodes' x and y:",x:"X axis",y:"Y axis"},scale:{title:"Scale nodes' coordinates",content:"Multiply the following value to all nodes' x and y:",factor:"Scale factor"},changeType:{title:"Change all objects' attributes",any:"Any"},changeZIndex:"Change depth in batch",changeStationType:{title:"Change stations type in batch",changeFrom:"Change all stations from this type:",changeTo:"To this type:",info:"Changing stations' type will remove all specific attributes from stations except their position and names. SAVE BEFORE CHANGE!"},changeLineStyleType:{title:"Change lines style in batch",changeFrom:"Change all lines from this style:",changeTo:"To this style:",info:"Changing lines' style will remove all specific attributes from lines except their connections. SAVE BEFORE CHANGE!"},changeLinePathType:{title:"Change lines path in batch",changeFrom:"Change all lines from this path:",changeTo:"To this path:"},changeColor:{title:"Change color in batch",changeFrom:"Change all objects from this color:",changeTo:"To this color:",any:"From any color"},removeLines:{title:"Remove lines with single color",content:"Remove lines that have this color: "},updateColor:{title:"Update color",content:"Update all colors with their latest value.",success:"Successfully update all colors.",error:"Error in updating all colors: {{e}}."},unlockSimplePath:{title:"Unlock simple path",content1:"The Rail Map Painter application endeavors to offer an interactive platform conducive to the creation of rail maps while adhering to established conventions. Among these conventions, one particularly renowned style finds its origins in the innovative work of Harry Beck. His pioneering contribution, officially endorsed in the year 1932, garnered instantaneous acclaim from the general populace. Presently, it stands as an exemplar of paramount significance within the realm of information design. This paradigmatic approach has found widespread implementation in transit cartography on a global scale, albeit with varying degrees of success.",content2:"The application inherently conceals the option to utilize a simple path, as its deployment has the potential to contravene established conventions. This particular feature remains discreetly tucked away by default. Additionally, submissions to the Rail Map Painter Gallery are subject to stringent scrutiny, with a categorical rejection of compositions that employ the simple path with a single color style approach.",content3:"Still, we reserve the opportunity to unlock this option and use the simple path when you subscribe. It should be noted that even after acquisition, the use of simple path is limited to single color.",check:"Unlock",unlocked:"Already Unlocked"},masterManager:{title:"Manage all master nodes",id:"Id",label:"Label",type:"Type",types:{MiscNode:"MiscNode",Station:"Station"},importTitle:"Upload master parameter",importFrom:"Use imported styles",importOther:"Import new style",importParam:"Paste configuration"}},telemetry:{title:"Telemetry",info:"To help improve Rail Map Painter and keep contributors motivated to enhance the project, anonymous usage data is collected through Google Analytics. This data is used solely for enhancing the user experience and optimizing the tool's functionality and is never shared with third parties.",essential:"Basic",essentialTooltip:"Change this global setting in Rail Map Toolkit",essentialInfo:"Rail Map Painter collects essential usage data that helps us understand how and when users interact with the tool. Rest assured, no personally identifiable information or data from your projects is ever collected.",essentialLink:"Click this link to see detailed fields that Google Analytics may collect.",additional:"Additional",additionalInfo:"Rail Map Painter also gathers data on interactions, such as project creation or station addition, when you input. These additional data is also anonymous and are only used for statistical analysis to help us make the tool better."}},about:{title:"About",rmp:"Rail Map Painter",railmapgen:"A Rail Map Toolkit project",desc:"Design your own rail map by freely dragging stations from different cities and connecting them with 90 or 135-degree rounded corners lines!",content1:"In memory of all the freedom and equality we once had.",content2:"06/01/2022 in Shanghai",contributors:"Contributors",coreContributors:"Core Contributors",styleContributors:"Style Contributors",langonginc:"Live a life you will remember.","203IhzElttil":"Special thanks for his diligent work in ensuring that the stations of Shanghai Metro match the original design.",Swiftiecott:"Special thanks for his diligent work in ensuring that the stations of Beijing Subway match the original design.",Minwtraft:"Special thanks for his diligent work in ensuring that the stations of Guangzhou Metro match the original design.",contactUs:"Contact Us",github:"Project repository",githubContent:"Face any problems? Search or raise an issue here!",slack:"Slack group",slackContent:"Chat in these Slack channels!"}},dv={color:tv,warning:nv,cancel:rv,apply:iv,remove:ov,close:av,noShowAgain:sv,rmtPromotion:lv,panel:cv,header:uv},hv="Color A",pv="Color B",fv="カラー",gv="警告",mv="キャンセル",yv="適用",bv="削除",vv="閉じる",wv="次回表示しない",xv="絶対に見逃せないオールインワンツールキット!",Sv={tools:{showLess:"表示を減らす",section:{lineDrawing:"路線描画",stations:"駅",miscellaneousNodes:"その他の節点"},select:"選択する",learnHowToAdd:{station:"駅を追加する方法を学ぶ!","misc-node":"節点を追加する方法を学ぶ!",line:"路線風格を追加する方法を学ぶ!"}},details:{header:"詳細",info:{title:"基本情報",id:"ID",zIndex:"深度",stationType:"駅の種類",linePathType:"路線経路の種類",lineStyleType:"路線風格の種類",type:"種類",parallel:"平行路線",parallelIndex:"平行路線索引"},multipleSelection:{title:"複数選択",change:"選択した属性を変更する",selected:"選択されたオブジェクト:",show:"見せる",station:"駅",miscNode:"その他のノード",edge:"ライン"},changeStationTypeContent:"駅の種類を変更すると、駅の名前以外のすべての属性が削除されます。",changeLineTypeContent:"路線の種類を変更すると、すべての属性が削除されます。",changeType:"種類を変更",nodePosition:{title:"節点の位置",pos:{x:"X座標",y:"Y座標"}},lineExtremities:{title:"路線の端点",source:"出発点",target:"到着点",sourceName:"出発点名",targetName:"到着点名"},specificAttrsTitle:"特定の属性",unknown:{error:"おっと :( これは{{category}}を認識できません。おそらくそれは新しいバージョンで作成されました。",node:"節点",linePath:"路線経路",lineStyle:"路線風格"},nodes:{common:{nameZh:"中国語の路線名",nameEn:"英語の路線名",nameJa:"日本語の路線名",num:"路線番号"},virtual:{displayName:"仮想節点"},shmetroNumLineBadge:{displayName:"上海地下鉄路線番号徽章"},shmetroTextLineBadge:{displayName:"上海地下鉄テキスト路線徽章"},gzmtrLineBadge:{displayName:"広州地下鉄路線徽章",tram:"路面電車",span:"行にまたがる数字"},bjsubwayNumLineBadge:{displayName:"北京地下鉄路線番号徽章"},bjsubwayTextLineBadge:{displayName:"北京地下鉄テキスト路線徽章"},berlinSBahnLineBadge:{displayName:"ベルリンSバーン番号徽章"},berlinUBahnLineBadge:{displayName:"ベルリン地下鉄番号徽章"},suzhouRTNumLineBadge:{displayName:"蘇州軌道交通路線番号徽章",branch:"支線"},chongqingRTNumLineBadge:{displayName:"重慶鉄道交通路線番号徽章"},chongqingRTTextLineBadge:{displayName:"重慶鉄道交通テキスト路線徽章"},shenzhenMetroNumLineBadge:{displayName:"深セン地下鉄路線番号徽章",branch:"支線"},mrtDestinationNumbers:{displayName:"シンガポールMRTの目的地番号"},mrtLineBadge:{displayName:"シンガポールMRT路線バッジ",isTram:"LRT路線バッジです"},jrEastLineBadge:{displayName:"JR東日本路線番号徽章",crosshatchPatternFill:"網目模様で塗りつぶす"},qingdaoMetroNumLineBadge:{displayName:"青島地下鉄番号線徽章",numEn:"英語の行番号",showText:"テキストを表示"},guangdongIntercityRailwayLineBadge:{displayName:"広東省都市間鉄道線徽章"},master:{displayName:"大師節点",type:"大師節点種類",undefined:"未定義"},facilities:{displayName:"施設",type:"種類"},text:{displayName:"任意のテキスト",content:"コンテンツ",fontSize:"書体サイズ",lineHeight:"行の高さ",textAnchor:"テキストのアンカー",start:"開始",middle:"中央",end:"終了",auto:"自動",hanging:"吊り下げ",dominantBaseline:"ドミナントベースライン",language:"言語での書体ファミリー",zh:"中国語",en:"英語",mtr__zh:"香港MTR中国語",mtr__en:"香港MTR英語",berlin:"ベルリンS/Uバーン",mrt:"シンガポールMRT",jreast_ja:"JR東日本日本語",jreast_en:"JR東日本英語",rotate:"回転",italic:"イタリック体",bold:"太字"}},stations:{common:{nameZh:"中国語の駅名",nameEn:"英語の駅名",nameJa:"日本語の駅名",nameOffsetX:"駅名補正値X",nameOffsetY:"駅名補正値Y",rotate:"アイコンの回転",lineCode:"路線番号",stationCode:"駅番号",left:"左",middle:"中央",right:"右",top:"上",bottom:"下"},interchange:{title:"乗り換え",within:"駅構内の乗り換え",outStation:"駅外の乗り換え",outSystem:"系統外の乗り換え",addGroup:"乗り換えグループを追加",noInterchanges:"乗り換えなし",nameZh:"中国語の駅名",nameEn:"英語の駅名",add:"乗り換えを追加",copy:"乗り換えをコピー",remove:"乗り換えを削除"},shmetroBasic:{displayName:"上海地下鉄基本駅"},shmetroBasic2020:{displayName:"上海地下鉄基本駅(令和2年)"},shmetroInt:{displayName:"上海地下鉄乗り換え駅",height:"アイコンの高さ",width:"アイコンの幅"},shmetroOsysi:{displayName:"上海地下鉄の系統外乗り換え駅"},shanghaiSuburbanRailway:{displayName:"上海市営鉄道駅"},gzmtrBasic:{displayName:"広州地下鉄基本駅",open:"開業済み",secondaryNameZh:"中国語の補助駅名",secondaryNameEn:"英語の補助駅名",tram:"路面電車"},gzmtrInt:{displayName:"広州地下鉄乗り換え駅",open:"開業済み",secondaryNameZh:"中国語の補助駅名",secondaryNameEn:"英語の補助駅名",foshan:"仏山"},gzmtrInt2024:{displayName:"広州地下鉄乗り換え駅(令和6年)",anchorAt:"錨位置",anchorAtNone:"中心",preferVertical:"縦向き版面構成(乗り換え駅2つのみ)"},bjsubwayBasic:{displayName:"北京地下鉄基本駅",open:"開業済み"},bjsubwayInt:{displayName:"北京地下鉄乗り換え駅",outOfStation:"駅外の乗り換え"},mtr:{displayName:"香港MTR駅",rotate:"アイコンの回転"},suzhouRTBasic:{displayName:"蘇州軌道交通基本駅",textVertical:"垂直の名前"},suzhouRTInt:{displayName:"蘇州軌道交通乗り換え駅"},kunmingRTBasic:{displayName:"昆明軌道交通基本駅"},kunmingRTInt:{displayName:"昆明軌道交通乗り換え駅"},MRTBasic:{displayName:"シンガポールMRT基本駅",isTram:"LRTの駅です"},MRTInt:{displayName:"シンガポールMRT乗り換え駅"},jrEastBasic:{displayName:"JR東日本基本駅",nameOffset:"名前の補正値",textOneLine:"1行での名前",textVertical:"垂直の名前",important:"重要な駅",lines:"乗り換え線の補正値"},jrEastImportant:{displayName:"JR東日本重要駅",textVertical:"垂直の名前",mostImportant:"最も重要な駅",minLength:"駅の最小長"},foshanMetroBasic:{displayName:"仏山地鐵基本車站",open:"開業済み",secondaryNameZh:"中国語の補助駅名",secondaryNameEn:"英語の補助駅名",tram:"路面電車"},qingdaoMetro:{displayName:"地下鉄青島駅",isInt:"乗換駅です"},tokyoMetroBasic:{displayName:"東京メトロの基本駅",nameOffset:"駅名補正値",textVertical:"垂直の名前"},tokyoMetroInt:{displayName:"東京メトロ乗換駅",mereOffset:{displayName:"名前は単なるオフセットです",none:"なし",left1:"左(少ない)",left2:"左(さらに)",right1:"右(少ない)",right2:"右(さらに)",up:"上",down:"下"},importance:{displayName:"駅の重要性",default:"デフォルト",middle:"真ん中",high:"高い"},align:{displayName:"アイコンの整列",horizontal:"水平",vertical:"垂直"}},londonTubeCommon:{stepFreeAccess:"段差のないアクセス",stepFreeAccessNone:"なし",stepFreeAccessTrain:"駅から電車まで",stepFreeAccessPlatform:"駅からプラットフォームまで"},londonTubeBasic:{displayName:"ロンドン地下鉄基本駅",terminal:"終着駅",shareTracks:"線路共有",shareTracksIndex:"線路共有索引"},londonTubeInt:{displayName:"ロンドン地下鉄乗換駅"},guangdongIntercityRailway:{displayName:"広東省都市間鉄道駅"}},lines:{reconcileId:"調整ID",common:{offsetFrom:"補正値(From)",offsetTo:"補正値(To)",startFrom:"開始位置",roundCornerFactor:"角の丸め係数",from:"から",to:"まで",parallelDisabled:"この路線が平行であるため、一部の属性が無効になっています。",changeInBaseLine:"基準線で変更してください:"},simple:{displayName:"簡単な経路",offset:"補正値"},diagonal:{displayName:"135°対角経路"},perpendicular:{displayName:"90°垂直経路"},rotatePerpendicular:{displayName:"90°回転する垂直経路"},singleColor:{displayName:"単色風格"},shmetroVirtualInt:{displayName:"上海地下鉄駅外乗り換え風格"},shanghaiSuburbanRailway:{displayName:"上海市営鉄道風格",isEnd:"終了行"},gzmtrVirtualInt:{displayName:"広州地下鉄駅外乗り換え風格"},chinaRailway:{displayName:"中国鉄道風格"},bjsubwaySingleColor:{displayName:"北京地下鉄単色風格"},bjsubwayTram:{displayName:"北京地下鉄路面電車風格"},bjsubwayDotted:{displayName:"北京地下鉄の点線風格"},dualColor:{displayName:"2色風格",swap:"色を交換",colorA:"色A",colorB:"色B"},river:{displayName:"河川風格",width:"幅"},mtrRaceDays:{displayName:"香港MTRレース日風格"},mtrLightRail:{displayName:"香港MTR軽軌風格"},mtrUnpaidArea:{displayName:"香港MTR改札外乗り換え風格"},mtrPaidArea:{displayName:"香港MTR改札内乗り換え風格"},mrtUnderConstruction:{displayName:"シンガポール MRT 工事中風格"},mrtSentosaExpress:{displayName:"シンガポール MRT セントーサ・エクスプレス風格"},jrEastSingleColor:{displayName:"JR東日本単色風格"},jrEastSingleColorPattern:{displayName:"JR東日本単色網目模様風格"},lrtSingleColor:{displayName:"シンガポールLRT単色風格"},londonTubeInternalInt:{displayName:"ロンドン地下鉄内部乗換風格"},londonTube10MinWalk:{displayName:"ロンドン地下鉄10分以内の乗換風格"},londonTubeTerminal:{displayName:"ロンドン地下鉄終着風格"},guangdongIntercityRailway:{displayName:"広東省都市間鉄道風格"}},edges:{},footer:{duplicate:"重複",copy:"複製",remove:"削除"}}},_v={popoverHeader:"<1>{{environment}} 環境です!",popoverBody:"現在、最新のRMPをテストしています。ご意見がありましたら、https://github.com/railmapgen/rmp/issues で提案してください",search:"駅を探す",open:{new:"新しい作品",config:"作品をインポート",projectRMG:"RMG作品からインポート",invalidType:"無効なファイルタイプです!JSON形式のファイルのみが受け付けられます。",unknownError:"アップロードされたファイルの解析中に不明なエラーが発生しました。もう一度お試しください。",gallery:"ギャラリーからインポート",tutorial:"指導を開始する",importFromRMPGallery:"テンプレート{{id}}がインポートされました。この変更に満足していませんか?Ctrl + Zまたは元に戻すボタンで元に戻せます。",failToImportFromRMPGallery:"ギャラリーから{{id}}のインポートに失敗しました。ファイルが見つかりませんでした。"},download:{config:"作品をエクスポート",image:"画像をエクスポート","2rmg":{title:"RMG作品へエクスポート",type:{line:"直線",loop:"環状線",branch:"支線"},placeholder:{chinese:"中国語のライン名",english:"英語の路線名",lineCode:"路線番号"},info1:"この機能は、RMP作品をRMG作品に変換するために設計されています。",info2:"以下のリストの行は、変換用に利用できます。左側のテキストボックスに中国語の行名、中央に英語の行名、右側に(広州メトロ風格用の)行コードを入力し、ダウンロードボタンをクリックしてRMG作品を保存できます。",noline:"利用可能な回線が見つかりません。",download:"ダウンロード",downloadInfo:"出発駅を選択してクリックしてください。"},format:"フォーマット",png:"PNG",svg:"SVG",svgVersion:"版","svg1.1":"1.1(Adobe Illustratorと互換性あり)",svg2:"2(現代のブラウザと互換性あり)",transparent:"透明性",scale:"スケール",disabledScaleOptions:"ブラウザのキャンバス制限のため、一部のスケールオプションが無効になっています。",disabledScaleOptionsWorkarounds:"回避策として、このCLIツールを使用してSVGから画像を生成する方法が考えられます:",imageTooBig:"画像が大きすぎてブラウザで生成できません!",useSystemFonts:"キャンバスで内覧された書体の代わりに系統書体を使用する",shareInfo1:"この画像を共有する際に、添付ファイル ",shareInfo2:" とリンクを添付します。",termsAndConditions:"利用規約",termsAndConditionsInfo:"以下の利用規約に同意します:",period:"。",confirm:"ダウンロード"},donation:{title:"寄付",openCollective:"Open Collective",viaUSD:"PaypalまたはVisaカードを使用してドルで寄付する。",afdian:"爱发电",viaCNY:"AlipayまたはWechat Payを使用して人民元で寄付する。"},settings:{title:"設定",pro:"これはPRO機能であり、サブスクリプションが必要です。",proWithTrial:"これはPRO機能で、無料の限定トライアルが利用可能です。",proLimitExceed:{master:"大師節点が無料枠を超えています。",parallel:"平行路線が無料枠を超えています。",solution:"これらを削除して警告を解除するか、サブスクリプションに登録してさらに多くの機能を利用してください!"},subscription:{title:"サブスクリプションステータス","logged-out":"現在ログアウトしています。",free:"ログイン済み!さらに多くの機能をアンロックするにはサブスクリプションを登録してください!",subscriber:"サブスクリプションありがとうございます!すべての機能をお楽しみください!",expired:"ログインステータスの有効期限が切れました。ログアウトして再度ログインしてください。"},preference:{title:"設定",keepLastPath:"次の移動で背景をクリックするまで、線を描き続ける",autoParallel:"新しい路線を既存の路線と平行に自動的に設定"},shortcuts:{title:"ショートカット",keys:"キー",description:"説明",f:"最後のツールを使用する。",s:"選択する。",arrows:"キャンバスを少し移動します。",ijkl:"選択した駅を少し移動します。",shift:"複数選択。",alt:"正確な移動。",delete:"選択した駅を削除します。",cut:"切り取る。",copy:"複製する。",paste:"貼り付ける。",undo:"元に戻す。",redo:"やり直す。"},procedures:{title:"手順",translate:{title:"節点の座標を変換",content:"すべての節点のX座標とY座標に次の補正値を追加する:",x:"X軸",y:"Y軸"},scale:{title:"節点の座標をスケーリング",content:"すべての節点のX座標とY座標に次の値を乗算する:",factor:"スケールファクター"},changeType:{title:"すべてのオブジェクトの属性を変更する",any:"どれでも"},changeZIndex:"深度を変更する",changeStationType:{title:"一括で駅の種類を変更",changeFrom:"すべての駅をこの種類から変更する:",changeTo:"この種類に変更する:",info:"駅の種類を変更すると、位置と名前以外の特定の属性がすべて削除されます。変更する前に保存してください!"},changeLineStyleType:{title:"線の風格を一括で変更",changeFrom:"この風格からすべての行を変更します:",changeTo:"この風格に:",info:"線の風格を変更すると、接続を除くすべての特定の属性が線から削除されます。 変更する前に保存してください!"},changeLinePathType:{title:"行のパスを一括で変更する",changeFrom:"このパスのすべての行を変更します:",changeTo:"この道へ:"},changeColor:{title:"一括で色を変更する",changeFrom:"すべてのオブジェクトをこの色から変更します:",changeTo:"この色に:",any:"どの色からも"},removeLines:{title:"単一色の路線を削除",content:"この色を持つ路線を削除する:"},updateColor:{title:"色を更新する",content:"最新の値ですべての色を更新します。",success:"すべての色を正常に更新しました。",error:"すべての色を更新する際にエラーが発生しました: {{e}}。"},unlockSimplePath:{title:"簡単な経路の解除",content1:"「地下鉄路線図画家」は、既存の慣例に従いつつ、鉄道地図の作成を支援するインタラクティブなプラットフォームを提供することを目指しています。その中でも、特に有名な風格の1つは、ハリー・ベックの革新的な作品に由来しています。彼の先駆的な貢献は1932年に正式に認められ、一般大衆から即座に称賛されました。現在では、情報デザインの領域において極めて重要な存在となっています。この典型的なアプローチは、世界規模の公共交通カートグラフィに広く採用されていますが、成功度は異なります。",content2:"アプリケーション自体は、既存の慣例に反する可能性があるため、簡単な経路を利用するオプションをデフォルトで控えめに隠しています。また、「地下鉄路線図画家ギャラリー」への投稿は厳格な審査を受けることになり、簡単な経路を単一の色の風格で使用する作品は断固として拒否されます。",content3:"それでも、このオプションのロックを解除し、寄付時にイージーパスを使用する機会を予約します。 取得後も、単純なパスの使用はモノクロスタイルに限定されることに注意してください。",check:"簡単な経路を解除",unlocked:"既に解除されています"},masterManager:{title:"すべての大師節点を管理する",id:"ID",label:"標識",type:"種類",types:{MiscNode:"その他節点",Station:"駅"},importTitle:"大師引数をアップロード",importFrom:"インポートしたスタイルを使用",importOther:"新しいスタイルをインポート",importParam:"設定情報を貼り付け"}},telemetry:{title:"テレメトリー",info:"鉄道路線図画家を改善し、貢献者がプロジェクトを向上させる意欲を維持するため、Google Analytics を通じて匿名の使用データを収集しています。このデータはユーザー体験の向上とツールの最適化のためだけに使用され、第三者と共有されることはありません。",essential:"基本",essentialTooltip:"鉄道路線図ツールキットでこのグローバル設定を変更する",essentialInfo:"鉄道路線図画家は、ツールがどのように、またいつ使用されるかを理解するための基本的な使用データを収集します。ご安心ください。個人を特定できる情報やプロジェクトデータは一切収集されません。",essentialLink:"Google Analytics が収集する可能性のある詳細フィールドを表示するには、こちらのリンクをクリックしてください。",additional:"追加",additionalInfo:"鉄道路線図画家は、プロジェクトの作成や駅の追加など、入力時のインタラクションに関するデータも収集します。これらの追加データも匿名であり、ツールを改善するための統計分析にのみ使用されます。"}},about:{title:"について",rmp:"地下鉄路線図画家",railmapgen:"地下鉄路線図ツールキットのプロジェクト",desc:"異なる都市の駅を自由にドラッグして、90度または135度の角丸線で接続して独自の鉄道地図を設計しましょう!",content1:"かつて私たちが持っていた自由と平等のすべての記憶に捧げます。",content2:"2022年6月1日、上海",contributors:"貢献者",coreContributors:"主要な貢献者",styleContributors:"風格の貢献者","203IhzElttil":"上海地下鉄の駅がオリジナルの設計と一致するように、彼の勤勉な仕事に特別な感謝を述べます。",Swiftiecott:"北京地下鉄の駅がオリジナルの設計と一致するように、彼の勤勉な仕事に特別な感謝を述べます。",Minwtraft:"広州地下鉄の駅がオリジナルの設計と一致するように、彼の勤勉な仕事に特別な感謝を述べます。",contactUs:"お問い合わせ",github:"プロジェクトリポジトリ",githubContent:"問題が発生しましたか?こちらで検索したり、問題を報告したりしてください!",slack:"Slackグループ",slackContent:"Slackのチャンネルでチャットしましょう!"}},Nv={colorA:hv,colorB:pv,color:fv,warning:gv,cancel:mv,apply:yv,remove:bv,close:vv,noShowAgain:wv,rmtPromotion:xv,panel:Sv,header:_v},Rv="색깔",kv="경고",Cv="취소",Av="사용",Tv="삭제",Ev="다시",Ov="표시하지 않기",Lv="놓치고 싶지 않은 올인원 툴킷! 닫기.",Mv={tools:{showLess:"적게 표시",section:{lineDrawing:"선 그리기",stations:"역",miscellaneousNodes:"기타 노드"},select:"선택하다",learnHowToAdd:{station:"역을 추가하는 방법 배우기!","misc-node":"노드를 추가하는 방법 배우기!",line:"라인 스타일을 추가하는 방법 배우기!"}},details:{header:"상세한 상황",info:{title:"기본정보",id:"고유 식별자",zIndex:"깊이",stationType:"역 유형",linePathType:"선분 경로 유형",lineStyleType:"선분 스타일 유형",type:"유형",parallel:"평행선",parallelIndex:"평행 인덱스"},multipleSelection:{title:"다중 선택",change:"선택한 속성 변경",selected:"선택한 개체:",show:"보여주다",station:"역",miscNode:"기타 노드",edge:"윤곽"},changeStationTypeContent:"역 유형을 변경하면 이름을 제외한 모든 독특한 속성이 제거됩니다.",changeLineTypeContent:"선분 유형을 변경하면 모든 독특한 속성이 제거됩니다.",changeType:"종류 변경",nodePosition:{title:"노드 위치",pos:{x:"가로 좌표",y:"세로 좌표"}},lineExtremities:{title:"선분 양단",source:"시작점",target:"종말점",sourceName:"시작점 명칭",targetName:"종말점 명칭"},specificAttrsTitle:"독특 속성",unknown:{error:"이런 :( 우리는 이 {{category}}를 인식할 수 없습니다. 아마도 더 최근 버전에서 생성되었을 것입니다.",node:"노드",lineType:"선분 경로",lineStyle:"선분 스타일"},nodes:{common:{nameZh:"한자 노선명칭",nameEn:"영문 노선명칭",nameJa:"일본 노선명칭",num:"노선 번호"},virtual:{displayName:"가상 노드"},shmetroNumLineBadge:{displayName:"상해 지하철 디지털 노선 표지"},shmetroTextLineBadge:{displayName:"상해 지하철 문자 노선 표지"},gzmtrLineBadge:{displayName:"광저우 지하철 노선 표지",tram:"시가 전차",span:"행 범위 숫자"},bjsubwayNumLineBadge:{displayName:"베이징 지하철 노선 배지"},bjsubwayTextLineBadge:{displayName:"베이징 지하철 텍스트 라인 배지"},berlinSBahnLineBadge:{displayName:"베를린 S반 노선 배지"},berlinUBahnLineBadge:{displayName:"베를린 U반 노선 배지"},suzhouRTNumLineBadge:{displayName:"수주 철도 번호 라인 배지",branch:"지선입니다"},chongqingRTNumLineBadge:{displayName:"충칭 철도 교통 디지털 노선 식별"},chongqingRTTextLineBadge:{displayName:"충칭 철도 교통 텍스트 라인 표시"},shenzhenMetroNumLineBadge:{displayName:"심천 지하철 번호 라인 배지",branch:"지선입니다"},mrtDestinationNumbers:{displayName:"싱가포르 MRT 목적지 번호"},mrtLineBadge:{displayName:"싱가포르 MRT 노선 배지",isTram:"LRT 노선 배지입니다"},jrEastLineBadge:{displayName:"JR 동일본 라인 배지",crosshatchPatternFill:"크로스해치 패턴으로 채우기"},qingdaoMetroNumLineBadge:{displayName:"칭다오 지하철 번호 라인 배지",numEn:"영어로 된 줄 번호",showText:"텍스트 표시"},guangdongIntercityRailwayLineBadge:{displayName:"광동 시외 철도 노선 표지판"},master:{displayName:"마스터 노드",type:"마스터 노드 유형",undefined:"정의되지 않음"},facilities:{displayName:"시설",type:"유형"},text:{displayName:"임의 글자",content:"내용",fontSize:"글자 대소",lineHeight:"행고도",textAnchor:"글자 앵커",start:"시작",middle:"가운데",end:"끝",auto:"자동",hanging:"매달리는",dominantBaseline:"현성 바셀린",language:"언어로 된 글꼴 종류",zh:"중국어",en:"영어",mtr__zh:"홍콩 MTR 중국어",mtr__en:"홍콩 MTR 영어",berlin:"베를린 S/U Bahn",mrt:"싱가포르 MRT",jreast_ja:"JR 동일본어",jreast_en:"JR 동일본 영어",rotate:"회전",italic:"이탤릭체",bold:"굵게"}},stations:{common:{nameZh:"한자 명칭",nameEn:"영문 명칭",nameJa:"일본 명칭",nameOffsetX:"명칭 가로 이동",nameOffsetY:"명칭 세로 이동",rotate:"역회전각도",lineCode:"노선 번호",stationCode:"역 번호",left:"왼쪽",middle:"가운데",right:"오른쪽",top:"위",bottom:"아래"},interchange:{title:"환승",within:"같은 역에서 환승한",outStation:"역을 나가 환승한",outSystem:"시스템외환승",addGroup:"환승 조합 추가",noInterchanges:"비환승역",nameZh:"한자 명칭",nameEn:"영문 명칭",add:"환승 추가",copy:"환승 복제",remove:"환승 삭제"},shmetroBasic:{displayName:"상해 지하철의 기본 역"},shmetroBasic2020:{displayName:"상해 지하철 기본 역(2020년)"},shmetroInt:{displayName:"상해 지하철 환승역",height:"역 높이",width:"역 폭"},shmetroOsysi:{displayName:"상하이 지하철 시스템 외환승 역"},shanghaiSuburbanRailway:{displayName:"상하이 기차역"},gzmtrBasic:{displayName:"광저우 지하철 기본역",open:"개통여부",secondaryNameZh:"한자 제2명칭",secondaryNameEn:"영문 제2명칭",tram:"시가 전차"},gzmtrInt:{displayName:"광저우 지하철 환승역",open:"개통여부",secondaryNameZh:"한자 제2명칭",secondaryNameEn:"영문 제2명칭",foshan:"포산"},gzmtrInt2024:{displayName:"광저우 지하철 환승역 (2024)",anchorAt:"앵커 위치",anchorAtNone:"중앙",preferVertical:"세로 레이아웃 (환승 2개만)"},bjsubwayBasic:{displayName:"베이징 지하철 기본역",open:"개통여부"},bjsubwayInt:{displayName:"베이징 지하철 환승역",outOfStation:"역을 나가 환승"},mtr:{displayName:"홍콩 MTR 역"},suzhouRTBasic:{displayName:"쑤저우 궤도교통 기본역",textVertical:"수직 이름"},suzhouRTInt:{displayName:"쑤저우 궤도교통 환승역"},kunmingRTBasic:{displayName:"쿤밍 궤도교통 기본역"},kunmingRTInt:{displayName:"쿤밍 궤도교통 환승역"},MRTBasic:{displayName:"싱가포르MRT기본역",isTram:"LRT역이에요"},MRTInt:{displayName:"싱가포르MRT환승역"},jrEastBasic:{displayName:"JR 동일본 기본 역",nameOffset:"이름 오프셋",textOneLine:"한 줄로 표시된 이름",textVertical:"수직 이름",important:"중요한 역",lines:"환승 노선 오프셋"},jrEastImportant:{displayName:"JR 동일본 중요 역",textVertical:"수직 이름",mostImportant:"가장 중요한 역",minLength:"스테이션의 최소 길이"},foshanMetroBasic:{displayName:"포산 지하철 기본역",open:"개통여부",secondaryNameZh:"한자 제2명칭",secondaryNameEn:"영문 제2명칭",tram:"시가 전차"},qingdaoMetro:{displayName:"칭다오 지하철역",isInt:"환승역인가"},tokyoMetroBasic:{displayName:"도쿄메트로 기본역",nameOffset:"이름 오프셋",textVertical:"업종명",lineCode:"라인 코드",stationCode:"역 코드"},tokyoMetroInt:{displayName:"도쿄메트로 환승역",mereOffset:{displayName:"단순한 오프셋 이름",none:"없음",left1:"왼쪽(적음)",left2:"왼쪽(더)",right1:"오른쪽(적음)",right2:"맞아요 (더)",up:"위로",down:"아래에"},importance:{displayName:"역 중요성",default:"기본",middle:"가운데",high:"높은"},align:{displayName:"아이콘 정렬",horizontal:"수평의",vertical:"수직의"}},londonTubeCommon:{stepFreeAccess:"단차 없는 접근",stepFreeAccessNone:"없음",stepFreeAccessTrain:"거리에서 열차까지",stepFreeAccessPlatform:"거리에서 플랫폼까지"},londonTubeBasic:{displayName:"런던 지하철 기본역",terminal:"종착역",shareTracks:"선로 공유",shareTracksIndex:"선로 공유 지수"},londonTubeInt:{displayName:"런던 지하철 환승역"},guangdongIntercityRailway:{displayName:"광둥 시외 기차역"}},lines:{reconcileId:"연결 선분 고유 식별자",common:{offsetFrom:"시작점 오프셋",offsetTo:"끝점 오프셋",startFrom:"여기서부터 시작",roundCornerFactor:"회전원각인자",from:"에서",to:"까지",parallelDisabled:"이 선이 평행하기 때문에 일부 속성이 비활성화되었습니다.",changeInBaseLine:"기본선에서 변경하십시오:"},simple:{displayName:"기본 선분",offset:"오프셋"},diagonal:{displayName:"135° 접힌 선분"},perpendicular:{displayName:"90° 수직 선분"},rotatePerpendicular:{displayName:"90° 수직 경로 회전"},singleColor:{displayName:"단색 스타일"},shmetroVirtualInt:{displayName:"상해 지하철 역 환승 모습"},shanghaiSuburbanRailway:{displayName:"상하이 도시철도 스타일",isEnd:"끝 범위"},gzmtrVirtualInt:{displayName:"광저우 지하철 역 환승 모습"},chinaRailway:{displayName:"중국 철도 모습"},bjsubwaySingleColor:{displayName:"베이징 지하철 단색 스타일"},bjsubwayTram:{displayName:"베이징 지하철 노면 전차 모습"},bjsubwayDotted:{displayName:"베이징 지하철 점선 스타일"},dualColor:{displayName:"이색 스타일",swap:"색을 바꾸기",colorA:"색깔 A",colorB:"색깔 B"},river:{displayName:"강 스타일",width:"폭"},mtrRaceDays:{displayName:"홍콩 MTR 경마일 스타일"},mtrLightRail:{displayName:"홍콩 MTR 경전철 스타일"},mtrUnpaidArea:{displayName:"홍콩 MTR 미결제 구역 스타일"},mtrPaidArea:{displayName:"홍콩 MTR 결제완료 구역 스타일"},mrtUnderConstruction:{displayName:"싱가포르 MRT 공사중 스타일"},mrtSentosaExpress:{displayName:"싱가포르 MRT 센토사 익스프레스 스타일"},jrEastSingleColor:{displayName:"JR 동일본 단색 스타일"},jrEastSingleColorPattern:{displayName:"JR 동일본 단색 크로스해치 패턴 스타일"},lrtSingleColor:{displayName:"싱가포르 LRT 단색 스타일"},londonTubeInternalInt:{displayName:"런던 지하철 내부 환승 스타일"},londonTube10MinWalk:{displayName:"런던 지하철 10분 이내 도보 환승 스타일"},londonTubeTerminal:{displayName:"런던 지하철 종착 스타일"},guangdongIntercityRailway:{displayName:"광동성 도시간 철도 스타일"}},edges:{},footer:{duplicate:"복사",copy:"복사",remove:"삭제"}}},jv={popoverHeader:"당신은 환경을<1>{{environment}}탐색하고 있습니다",popoverBody:"최신 RMP를 테스트하고 있습니다.제안 사항이 있으시면 언제든지 https://github.com/railmapgen/rmp/issues에 제출해 주십시오.",search:"방송국 검색",open:{new:"신 프로젝트",config:"프로젝트 가져오기",projectRMG:"RMG 프로젝트에서 가져오기",invalidType:"잘못된 파일 형식입니다! JSON 형식의 파일만 허용됩니다.",unknownError:"업로드된 파일의 파싱 중 알 수 없는 오류가 발생했습니다. 다시 시도해주세요.",gallery:"갤러리에서 가져오기",tutorial:"튜토리얼 시작",importFromRMPGallery:"템플릿 {{id}}가 가져 왔습니다. 이 변경 사항에 만족하지 않으십니까? Ctrl + Z 또는 실행 취소 버튼을 사용하여 실행 취소하세요.",failToImportFromRMPGallery:"갤러리에서 {{id}}를 가져올 수 없습니다. 파일을 찾을 수 없습니다."},download:{config:"프로젝트 내보내기",image:"사진 내보내기","2rmg":{title:"RMG 프로젝트로 내보내기",type:{line:"일직선",loop:"고리",branch:"지선"},placeholder:{chinese:"중국어 라인 이름",english:"영어 줄 이름",lineCode:"노선 번호"},info1:"이 기능은 RMP 프로젝트를 RMG 프로젝트로 변환하는 데 사용됩니다.",info2:"변환할 수 있는 사용 가능한 라인들은 다음과 같습니다. 왼쪽 텍스트 상자에 중국어 라인 이름을 입력하고, 가운데에 영어 라인 이름을 입력하며, 오른쪽에 (광저우 메트로 스타일용) 라인 코드를 입력한 다음, 오른쪽의 다운로드 버튼을 클릭하여 RMG 프로젝트를 저장할 수 있습니다.",noline:"사용 가능한 라인이 없습니다.",download:"다운로드",downloadInfo:"출발 역을 선택하고 클릭하십시오."},format:"파일 종류",png:"PNG 이미지",svg:"SVG 이미지",svgVersion:"버전","svg1.1":"1.1 (Adobe Illustrator 호환)",svg2:"2 (현대 브라우저 호환)",transparent:"투명 배경",scale:"확대/축소",disabledScaleOptions:"브라우저의 캔버스 제한으로 인해 일부 스케일 옵션이 비활성화되었습니다.",disabledScaleOptionsWorkarounds:"가능한 해결 방법으로는 이 CLI 도구를 사용하여 SVG에서 이미지를 생성하는 것이 있습니다:",imageTooBig:"이미지가 너무 크기 때문에 브라우저에서 생성할 수 없습니다!",useSystemFonts:"캔버스에서 미리보기된 글꼴 대신 시스템 글꼴 사용",shareInfo1:"이 사진을 공유할 때",shareInfo2:"링크를 첨부할 것입니다.",termsAndConditions:"약관 및 세칙",termsAndConditionsInfo:"동의",period:".",confirm:"다운로드"},donation:{title:"기부",openCollective:"Open Collective",viaUSD:"Paypal 또는 Visa 카드를 통해 달러로 기부하기.",afdian:"爱发电",viaCNY:"Alipay 또는 Wechat Pay를 통해 인민폐로 기부하기."},settings:{title:"설정",pro:"이것은 PRO 기능이며, 구독이 필요한 계정입니다.",proWithTrial:"이것은 PRO 기능이며, 제한된 무료 체험이 가능합니다.",proLimitExceed:{master:"마스터 노드가 무료 사용 한도를 초과했습니다.",parallel:"평행선이 무료 사용 한도를 초과했습니다.",solution:"경고를 해제하려면 이 항목들을 제거하거나 구독을 통해 더 많은 기능을 잠금 해제하세요!"},subscription:{title:"구독 상태","logged-out":"현재 로그아웃 상태입니다.",free:"로그인 완료! 더 많은 기능을 사용하려면 구독하세요!",subscriber:"구독해주셔서 감사합니다! 모든 기능을 즐기세요!",expired:"로그인 상태가 만료되었습니다. 다시 로그인 해주세요."},preference:{title:"선호",keepLastPath:"다음 이동에서 배경을 클릭할 때까지 계속 선을 그립니다",autoParallel:"새 선을 기존 선과 평행하게 자동으로 설정합니다"},shortcuts:{title:"바로 가기",keys:"키",description:"설명",f:"마지막 도구 사용.",s:"선택하다.",arrows:"캔버스를 약간 이동합니다.",ijkl:"선택한 역을 약간 이동합니다.",shift:"여러 항목 선택.",alt:"정밀한 이동.",delete:"선택한 역을 삭제합니다.",cut:"잘라내기.",copy:"복사하다.",paste:"붙여넣다.",undo:"취소하다.",redo:"다시 하다."},procedures:{title:"절차",translate:{title:"노드 좌표 변환",content:"모든 노드의 x 및 y에 다음 오프셋을 추가:",x:"X축",y:"Y축"},scale:{title:"스케일 노드의 좌표",content:"모든 노드의 x 및 y에 다음 값을 곱하:",factor:"스케일 팩터"},changeType:{title:"모든 객체의 속성 변경",any:"어느"},changeZIndex:"일괄적으로 깊이 변경",changeStationType:{title:"역의 종류를 대량으로 수정",changeFrom:"이 유형의 모든 역:",changeTo:"이 유형의 역으로 변환:",info:"역 유형을 변경하면 이름을 제외한 모든 고유한 속성이 제거됩니다.저장했다가 다시 실행!"},changeLineStyleType:{title:"일괄적으로 선 스타일 변경",changeFrom:"이 스타일의 모든 선을 변경하세요:",changeTo:"이 스타일에:",info:"선 스타일을 변경하면 연결을 제외한 선의 모든 특정 속성이 제거됩니다. 변경하기 전에 저장하세요!"},changeLinePathType:{title:"일괄적으로 라인 경로 변경",changeFrom:"이 경로의 모든 줄을 변경하세요:",changeTo:"이 길로:"},changeColor:{title:"일괄 색상 변경",changeFrom:"이 색상의 모든 개체를 변경합니다.:",changeTo:"이 색상에:",any:"모든 색상에서"},removeLines:{title:"단일 색상의 선 제거",content:"이 색상의 선을 제거하세요: "},updateColor:{title:"색상 업데이트",content:"최신 값으로 모든 색상을 업데이트합니다.",success:"모든 색상을 성공적으로 업데이트했습니다.",error:"모든 색상을 업데이트하는 동안 오류가 발생했습니다: {{e}}."},unlockSimplePath:{title:"간단 경로 잠금 해제",content1:"Rail Map Painter 애플리케이션은 확립된 관례를 준수하면서도 철도지도 작성을 위한 대화식 플랫폼을 제공하기 위해 노력합니다. 이러한 관례 중 하나는 특히 해리 벡의 혁신적인 작업에서 비롯되었습니다. 그의 개척적인 기여는 공식적으로 1932년에 인정받았으며 일반 대중으로부터 즉각적인 찬사를 받았습니다. 현재는 정보 디자인 분야에서 중요한 본보기로 자리 잡고 있습니다. 이 패러다임적인 접근 방식은 전 세계적인 규모의 교통 카토그래피에서 널리 구현되었으나 성공의 정도는 다양합니다.",content2:"이 애플리케이션은 기존 관례에 위배될 가능성이 있기 때문에 간단한 경로를 활용하는 옵션을 기본 설정으로 가려놓았습니다. 또한 Rail Map Painter 갤러리에 제출되는 작품은 엄격한 심사를 받으며, 단일 색상 스타일로 간단한 경로를 사용하는 작품은 명확히 거부됩니다.",content3:"그래도 이 옵션을 잠금 해제하고 기부할 때 Easy Path를 사용할 수 있는 기회를 보유하고 있습니다. 획득 후에도 단순 경로의 사용은 단색 스타일로 제한된다는 점에 유의해야 합니다.",check:"간단한 경로 잠금 해제",unlocked:"이미 해제됨"},masterManager:{title:"모든 마스터 노드를 관리",id:"ID",label:"레이블",type:"유형",types:{MiscNode:"기타 노드",Station:"스테이션"},importTitle:"마스터 매개변수 업로드",importFrom:"가져온 스타일 사용",importOther:"새 스타일 가져오기",importParam:"구성 정보 붙여넣기"}},telemetry:{title:"원격 측정",info:"지하철 노선도 그리기를 개선하고 기여자가 프로젝트를 향상시키는 데 동기를 부여하기 위해 Google Analytics를 통해 익명의 사용 데이터를 수집합니다. 이 데이터는 사용자 경험을 향상하고 도구 기능을 최적화하는 데에만 사용되며, 제3자와 절대 공유되지 않습니다.",essential:"기본",essentialTooltip:"지하철 노선도 툴킷에서 이 전역 설정을 변경하세요",essentialInfo:"지하철 노선도 그리기는 도구를 언제, 어떻게 사용하는지 이해하기 위해 기본적인 사용 데이터를 수집합니다. 안심하세요. 개인 식별이 가능한 정보나 프로젝트 데이터는 절대 수집되지 않습니다.",essentialLink:"Google Analytics에서 수집할 수 있는 세부 필드를 보려면 이 링크를 클릭하세요.",additional:"추가",additionalInfo:"지하철 노선도 그리기는 프로젝트 생성이나 역 추가와 같은 입력 시의 상호작용 데이터도 수집합니다. 이러한 추가 데이터도 익명으로 처리되며, 도구를 개선하기 위한 통계 분석에만 사용됩니다."}},about:{title:"대함",rmp:"지하철 노선도 그리기",railmapgen:"철도 지도 툴킷 프로젝트 노선도 툴킷",desc:"다양한 도시의 역을 자유롭게 끌어서 90도 또는 135도의 둥근 모서리 선으로 연결함으로써 여러분만의 철도 지도를 디자인해요!",content1:"우리가 가졌던 자유와 평등을 기념한다.",content2:"2022년 6월 1일 상해",contributors:"기여자",coreContributors:"핵심 기여자",styleContributors:"스타일 기여자",langonginc:"기억에 남을 삶을 살아보세요.","203IhzElttil":"상하이 지하철의 역들이 원래 디자인과 일치하도록 확실한 작업을 해준 그에게 특별한 감사의 말씀을 전합니다.",Swiftiecott:"베이징 지하철의 역들이 원래 디자인과 일치하도록 확실한 작업을 해준 그에게 특별한 감사의 말씀을 전합니다.",Minwtraft:"광저우 지하철의 역들이 원래 디자인과 일치하도록 확실한 작업을 해준 그에게 특별한 감사의 말씀을 전합니다.",contactUs:"우리에게 연락하기",github:"프로젝트 저장소",githubContent:"무슨 문제라도 있나요? 여기서 문제를 검색하거나 제기하십시오!",slack:"슬랙 그룹",slackContent:"이 슬랙 채널에서 채팅해요!"}},$v={color:Rv,warning:kv,cancel:Cv,apply:Av,remove:Tv,close:Ev,noShowAgain:Ov,rmtPromotion:Lv,panel:Mv,header:jv},Pv="颜色",Iv="警告",Dv="取消",Bv="应用",zv="移除",Fv="关闭",Gv="不再显示",Uv="您绝对不想错过的全能工具包!",Wv={tools:{showLess:"显示更少",section:{lineDrawing:"线段绘制",stations:"车站",miscellaneousNodes:"杂项节点"},select:"多选",learnHowToAdd:{station:"了解如何添加车站!","misc-node":"了解如何添加节点!",line:"了解如何添加线段样式!"}},details:{header:"详情",info:{title:"基本信息",id:"唯一识别符",zIndex:"深度",stationType:"车站类型",linePathType:"线段路径类型",lineStyleType:"线段样式类型",type:"类型",parallel:"平行线段",parallelIndex:"平行线段索引"},multipleSelection:{title:"多重选取",change:"修改选中对象的属性",selected:"选中的对象:",show:"显示",station:"车站",miscNode:"杂项节点",edge:"线段"},changeStationTypeContent:"修改车站类型会移除所有独特属性除了名称。",changeLineTypeContent:"修改线段类型会移除所有独特属性。",changeType:"更改类型",nodePosition:{title:"节点位置",pos:{x:"横坐标",y:"纵坐标"}},lineExtremities:{title:"线段两端",source:"起点",target:"终点",sourceName:"起点名称",targetName:"终点名称"},specificAttrsTitle:"独特属性",unknown:{error:"哎呀 :( 我们无法识别此{{category}}。也许它是在更新版本中创建的。",node:"节点",linePath:"线段路径",lineStyle:"线段样式"},nodes:{common:{nameZh:"中文线路名称",nameEn:"英文线路名称",nameJa:"日语线路名称",num:"线路号"},virtual:{displayName:"虚拟节点"},shmetroNumLineBadge:{displayName:"上海地铁数字线路标识"},shmetroTextLineBadge:{displayName:"上海地铁文字线路标识"},gzmtrLineBadge:{displayName:"广州地铁线路标识",tram:"有轨电车",span:"跨行显示数字"},bjsubwayNumLineBadge:{displayName:"北京地铁数字线路标识"},bjsubwayTextLineBadge:{displayName:"北京地铁文字线路标识"},berlinSBahnLineBadge:{displayName:"柏林城市快铁线路标识"},berlinUBahnLineBadge:{displayName:"柏林地铁线路标识"},suzhouRTNumLineBadge:{displayName:"苏州轨道交通数字线路标识",branch:"是否支线"},chongqingRTNumLineBadge:{displayName:"重庆轨道交通数字线路标识"},chongqingRTTextLineBadge:{displayName:"重庆轨道交通文字线路标识"},shenzhenMetroNumLineBadge:{displayName:"深圳地铁数字线路标识",branch:"是否为支线"},mrtDestinationNumbers:{displayName:"新加坡MRT终点数字"},mrtLineBadge:{displayName:"新加坡MRT线路标识",isTram:"是LRT线路标识"},jrEastLineBadge:{displayName:"JR东日本线路标识",crosshatchPatternFill:"用网状图案填充"},qingdaoMetroNumLineBadge:{displayName:"青岛地铁数字线路标识",numEn:"英文线路号",showText:"显示文字"},guangdongIntercityRailwayLineBadge:{displayName:"广东城际铁路线路标识"},master:{displayName:"大师节点",type:"大师节点类型",undefined:"未定义"},facilities:{displayName:"设施",type:"类型"},text:{displayName:"任意文字",content:"内容",fontSize:"文字大小",lineHeight:"行高度",textAnchor:"文字锚点",start:"开始",middle:"居中",end:"结束",auto:"自动",hanging:"悬挂",dominantBaseline:"显性基线",language:"哪个语言的字体系列",zh:"中文",en:"英文",mtr__zh:"港铁中文",mtr__en:"港铁英文",berlin:"柏林 S/U Bahn",mrt:"新加坡地铁",jreast_ja:"JR东日本日语",jreast_en:"JR东日本英语",rotate:"旋转",italic:"斜体",bold:"粗体"}},stations:{common:{nameZh:"中文名称",nameEn:"英文名称",nameJa:"日语名称",nameOffsetX:"名称横向偏移",nameOffsetY:"名称纵向偏移",rotate:"车站旋转角度",lineCode:"路线编号",stationCode:"车站编号",left:"左",middle:"中间",right:"右",top:"顶部",bottom:"底部"},interchange:{title:"换乘",within:"同站换乘",outStation:"出站换乘",outSystem:"系统外换乘",addGroup:"添加换乘组合",noInterchanges:"非换乘站",nameZh:"中文名称",nameEn:"英文名称",add:"添加换乘",copy:"复制换乘",remove:"删除换乘"},shmetroBasic:{displayName:"上海地铁基本车站"},shmetroBasic2020:{displayName:"上海地铁基本车站(2020)"},shmetroInt:{displayName:"上海地铁换乘车站",height:"车站高度",width:"车站宽度"},shmetroOsysi:{displayName:"上海地铁转乘车站"},shanghaiSuburbanRailway:{displayName:"上海市域铁路车站"},gzmtrBasic:{displayName:"广州地铁基本车站",open:"是否开通",secondaryNameZh:"中文第二名称",secondaryNameEn:"英文第二名称",tram:"有轨电车"},gzmtrInt:{displayName:"广州地铁换乘车站",open:"是否开通",secondaryNameZh:"中文第二名称",secondaryNameEn:"英文第二名称",foshan:"佛山"},gzmtrInt2024:{displayName:"广州地铁换乘站(2024)",anchorAt:"定位于",anchorAtNone:"中心",preferVertical:"垂直布局(仅限2个换乘)"},bjsubwayBasic:{displayName:"北京地铁基本车站",open:"是否开通"},bjsubwayInt:{displayName:"北京地铁换乘车站",outOfStation:"出站换乘"},mtr:{displayName:"香港MTR车站"},suzhouRTBasic:{displayName:"苏州轨道交通基本车站",textVertical:"垂直名称"},suzhouRTInt:{displayName:"苏州轨道交通换乘车站"},kunmingRTBasic:{displayName:"昆明轨道交通基本车站"},kunmingRTInt:{displayName:"昆明轨道交通换乘车站"},MRTBasic:{displayName:"新加坡MRT基本车站",isTram:"是LRT车站"},MRTInt:{displayName:"新加坡MRT换乘车站"},jrEastBasic:{displayName:"JR东日本基本车站",nameOffset:"名称偏移",textOneLine:"名称在一行中",textVertical:"垂直名称",important:"重要车站",lines:"换乘线偏移"},jrEastImportant:{displayName:"JR东日本重要车站",textVertical:"垂直名称",mostImportant:"最重要车站",minLength:"车站的最小长度"},foshanMetroBasic:{displayName:"佛山地铁基本车站",open:"是否开通",secondaryNameZh:"中文第二名称",secondaryNameEn:"英文第二名称",tram:"有轨电车"},qingdaoMetro:{displayName:"青岛地铁车站",isInt:"是换乘站"},tokyoMetroBasic:{displayName:"东京地铁基本车站",nameOffset:"名称偏移",textVertical:"垂直站名",lineCode:"线路编号",stationCode:"车站编号"},tokyoMetroInt:{displayName:"东京地铁换乘车站",mereOffset:{displayName:"名称微小偏移",none:"无",left1:"左 (较少)",left2:"左 (较大)",right1:"右 (较少)",right2:"右 (较大)",up:"上",down:"下"},importance:{displayName:"车站重要性",default:"默认",middle:"中",high:"高"},align:{displayName:"图标排列方向",horizontal:"横向",vertical:"纵向"}},londonTubeCommon:{stepFreeAccess:"无障碍通行",stepFreeAccessNone:"无",stepFreeAccessTrain:"从街道到列车",stepFreeAccessPlatform:"从街道到站台"},londonTubeBasic:{displayName:"伦敦地铁基本车站",terminal:"终点站",shareTracks:"轨道共享",shareTracksIndex:"轨道共享索引"},londonTubeInt:{displayName:"伦敦地铁换乘车站"},guangdongIntercityRailway:{displayName:"广东城际铁路车站"}},lines:{reconcileId:"合并线段唯一标识符",common:{offsetFrom:"起始点偏移",offsetTo:"结束点偏移",startFrom:"从这里开始",roundCornerFactor:"转折圆角因子",from:"从",to:"到",parallelDisabled:"由于此线段是平行的,因此某些属性已被禁用。",changeInBaseLine:"在基准线段中更改它们:"},simple:{displayName:"基本线段",offset:"偏移"},diagonal:{displayName:"135°折线线段"},perpendicular:{displayName:"90°垂直线段"},rotatePerpendicular:{displayName:"90°旋转垂直线段"},singleColor:{displayName:"纯色样式"},shmetroVirtualInt:{displayName:"上海地铁出站换乘样式"},shanghaiSuburbanRailway:{displayName:"上海市域铁路样式",isEnd:"结束区间"},gzmtrVirtualInt:{displayName:"广州地铁出站换乘样式"},chinaRailway:{displayName:"中国铁路样式"},bjsubwaySingleColor:{displayName:"北京地铁纯色样式"},bjsubwayTram:{displayName:"北京地铁有轨电车样式"},bjsubwayDotted:{displayName:"北京地铁虚线样式"},dualColor:{displayName:"双色样式",swap:"切换颜色",colorA:"颜色A",colorB:"颜色B"},river:{displayName:"河流样式",width:"宽度"},mtrRaceDays:{displayName:"香港MTR赛马日样式"},mtrLightRail:{displayName:"香港MTR轻铁样式"},mtrUnpaidArea:{displayName:"香港MTR未付费区域样式"},mtrPaidArea:{displayName:"香港MTR付费区域样式"},mrtUnderConstruction:{displayName:"新加坡MRT在建样式"},mrtSentosaExpress:{displayName:"新加坡MRT圣淘沙捷运样式"},jrEastSingleColor:{displayName:"JR东日本单色样式"},jrEastSingleColorPattern:{displayName:"JR东日本单色网状图案样式"},lrtSingleColor:{displayName:"新加坡LRT纯色样式"},londonTubeInternalInt:{displayName:"伦敦地铁内部换乘样式"},londonTube10MinWalk:{displayName:"伦敦地铁10分钟步行换乘样式"},londonTubeTerminal:{displayName:"伦敦地铁终点站样式"},guangdongIntercityRailway:{displayName:"广东城际铁路样式"}},edges:{},footer:{duplicate:"重复",copy:"复制",remove:"移除"}}},Vv={popoverHeader:"你正在浏览<1>{{environment}}环境!",popoverBody:"我们正在测试最新的RMP。如果你有任何建议,欢迎在 https://github.com/railmapgen/rmp/issues 上提出。",search:"搜索车站",open:{new:"新项目",config:"导入项目",projectRMG:"从RMG项目中导入",invalidType:"无效的文件类型!仅接受JSON格式的文件。",unknownError:"解析上传文件时发生未知错误!请重试。",gallery:"从画廊中导入",tutorial:"开始教程",importFromRMPGallery:"模板 {{id}} 已导入。对此更改不满意?可通过 Ctrl + Z 或撤销按钮进行撤销。",failToImportFromRMPGallery:"无法从画廊导入{{id}},找不到文件。"},download:{config:"导出项目",image:"导出图片","2rmg":{title:"导出RMG项目",type:{line:"直线",loop:"环线",branch:"支线"},placeholder:{chinese:"中文线路名称",english:"英文线路名称",lineCode:"路线编号"},info1:"这个功能可将RMP项目导出为RMG项目。",info2:"下面的线路将可以被导出,你可以在左侧文本框中输入中文线路名称、在中间输入英文线路名称、右边输入线路编号(广州地铁样式专用),随后点击下载按钮即可导出RMG项目。",noline:"未找到可用线路。",download:"下载",downloadInfo:"请选择一个起始车站,并点击它。"},format:"文件种类",png:"PNG图像",svg:"SVG图像",svgVersion:"版本","svg1.1":"1.1(适用于Adobe Illustrator)",svg2:"2(适用于现代浏览器)",transparent:"透明背景",scale:"缩放",disabledScaleOptions:"由于浏览器的画布限制,部分缩放选项被禁用。",disabledScaleOptionsWorkarounds:"可能的解决方法包括使用此命令行工具从SVG生成图像:",imageTooBig:"图像太大,无法在您的浏览器中生成!",useSystemFonts:"使用系统字体而不是在画布上预览的字体",shareInfo1:"当我分享此图片时我会附上",shareInfo2:"和它的链接。",termsAndConditions:"条款及细则",termsAndConditionsInfo:"我同意",period:"。",confirm:"下载"},donation:{title:"捐赠",openCollective:"Open Collective",viaUSD:"通过Paypal或Visa卡以美元捐赠。",afdian:"爱发电",viaCNY:"通过支付宝或微信支付以人民币捐赠。"},settings:{title:"设置",pro:"这是一个专业功能,需要带有订阅的账户。",proWithTrial:"这是一个PRO功能,并提供有限的免费试用。",proLimitExceed:{master:"大师节点超出了免费额度。",parallel:"平行线段超出了免费额度。",solution:"移除它们以消除此警告,或订阅以解锁更多功能!"},subscription:{title:"订阅状态","logged-out":"您当前已登出。",free:"已登录!订阅以解锁更多功能!",subscriber:"感谢您的订阅!享受所有功能吧!",expired:"登录状态已过期。请登出后重新登录。"},preference:{title:"偏好",keepLastPath:"在下一次操作中持续画线段直到点击背景",autoParallel:"自动将新线段设置为与现有线段平行"},shortcuts:{title:"快捷键",keys:"键",description:"描述",f:"使用上一个工具。",s:"多选。",arrows:"稍微移动画布。",ijkl:"稍微移动所选站点。",shift:"多选。",alt:"精确移动。",delete:"删除所选站点。",cut:"剪切。",copy:"复制。",paste:"粘贴。",undo:"撤销。",redo:"重做。"},procedures:{title:"过程",translate:{title:"转化节点坐标",content:"将以下偏移加到所有节点的x和y上:",x:"横坐标",y:"纵坐标"},scale:{title:"缩放节点坐标",content:"将所有节点的x和y乘以以下值:",factor:"缩放因子"},changeType:{title:"修改所有对象的属性",any:"任意"},changeZIndex:"批量修改深度",changeStationType:{title:"批量修改车站种类",changeFrom:"将此类型的所有车站:",changeTo:"转换为这个类型的车站:",info:"修改车站类型会移除所有独特属性除了名称。保存再操作!"},changeLineStyleType:{title:"批量修改线段样式",changeFrom:"将此样式的所有线段:",changeTo:"转换为这个样式的线段:",info:"修改线段样式会移除所有独特属性除了连通性。保存再操作!"},changeLinePathType:{title:"批量修改线段类型",changeFrom:"将此类型的所有线段:",changeTo:"转换为这个类型的线段:"},changeColor:{title:"批量修改颜色",changeFrom:"将此颜色的所有对象:",changeTo:"转换为这个颜色:",any:"从任何颜色转换"},removeLines:{title:"移除所有纯色线段",content:"移除具有此颜色的所有线段: "},updateColor:{title:"更新颜色",content:"使用最新值更新所有颜色。",success:"成功更新所有颜色。",error:"更新所有颜色时出错:{{e}}。"},unlockSimplePath:{title:"解锁简单路径",content1:"地铁线路图绘制器应用致力于在遵循既定惯例的前提下,提供一个有利于创建地铁线路图的互动平台。在这些惯例中,一种特别著名的风格源自哈利·贝克的创新工作。他的开创性贡献于1932年得到官方认可,并在大众中迅速赢得了声誉。目前,它在信息设计领域具有重要的示范意义,在全球范围内的交通制图中得到了广泛的实施,尽管成功程度有所不同。",content2:"应用程序固有地隐藏了使用简单路径的选项,因为其部署有可能违反既定的惯例。默认情况下,此特定功能保持隐蔽。此外,提交到地铁线路图绘制器画廊的作品将经过严格的审查,坚决拒绝使用单色风格的简单路径的构图。",content3:"尽管如此,我们仍然保留了解锁此选项的机会,当您订阅后,方可使用简单路径。需要注意的是,即使获得后,简单路径的使用也仅限于单色风格。",check:"解锁简单路径",unlocked:"已解锁"},masterManager:{title:"管理全部大师节点",id:"唯一标识",label:"标签",type:"类型",types:{MiscNode:"杂项节点",Station:"车站"},importTitle:"上传大师节点参数",importFrom:"使用导入的样式",importOther:"导入新样式",importParam:"粘贴配置信息"}},telemetry:{title:"遥测",info:"为了帮助改进地铁线路图绘制器并激励贡献者提升项目,我们通过 Google Analytics 收集匿名使用数据。这些数据仅用于增强用户体验和优化工具功能,绝不会与第三方共享。",essential:"基础",essentialTooltip:"在地铁线路图工具包中更改此全局设置",essentialInfo:"地铁线路图绘制器收集一些基本使用数据,以帮助我们了解用户如何以及何时与工具交互。请放心,我们从不收集任何可识别个人身份的信息或您的项目数据。",essentialLink:"点击此链接查看 Google Analytics 可能收集的详细字段。",additional:"额外",additionalInfo:"地铁线路图绘制器还会收集有关交互的数据,例如项目创建或站点添加等操作。这些额外数据同样是匿名的,仅用于统计分析以帮助我们改进工具。"}},about:{title:"关于",rmp:"地铁线路图绘制器",railmapgen:"一个线路图工具包项目",desc:"通过自由拖动来自不同城市的车站并以 90 或 135 度圆角线段将它们连接起来,设计您自己的铁路地图!",content1:"谨以此纪念我们曾拥有的自由与平等。",content2:"06/01/2022于上海",contributors:"贡献者",coreContributors:"核心贡献者",styleContributors:"样式贡献者",langonginc:"活出值得铭记的人生。","203IhzElttil":"特别感谢他勤勉工作,确保上海地铁站与原始设计相符。",Swiftiecott:"特别感谢他勤勉工作,确保北京地铁站与原始设计相符。",Minwtraft:"特别感谢他勤勉工作,确保广州地铁站与原始设计相符。",contactUs:"联系我们",github:"项目仓库",githubContent:"遇到任何问题?在这里搜索或提出一个问题!",slack:"Slack群组",slackContent:"在这些Slack频道中讨论!"}},Hv={color:Pv,warning:Iv,cancel:Dv,apply:Bv,remove:zv,close:Fv,noShowAgain:Gv,rmtPromotion:Uv,panel:Wv,header:Vv},Jv="顏色",Kv="警告",Yv="取消",qv="應用",Qv="移除",Xv="關閉",Zv="不要再顯示",e0="絕對不想錯過的多功能工具包!",t0={tools:{showLess:"顯示更少",section:{lineDrawing:"線段繪製",stations:"車站",miscellaneousNodes:"雜項節點"},select:"多選",learnHowToAdd:{station:"了解如何添加車站!","misc-node":"了解如何添加節點!",line:"了解如何添加線條樣式!"}},details:{header:"詳情",info:{title:"基本信息",id:"唯一識別符",zIndex:"深度",stationType:"車站類型",linePathType:"線段路徑類型",lineStyleType:"線段樣式類型",type:"類型",parallel:"平行線段",parallelIndex:"平行線段索引"},multipleSelection:{title:"多重選取",change:"修改選取物件的屬性",selected:"選取的物件:",show:"顯示",station:"車站",miscNode:"雜項節點",edge:"線段"},changeStationTypeContent:"修改車站類型會移除所有獨特屬性除了名稱。",changeLineTypeContent:"修改線段類型會移除所有獨特屬性。",changeType:"更改類型",nodePosition:{title:"節點位置",pos:{x:"橫坐標",y:"縱坐標"}},lineExtremities:{title:"線段兩端",source:"起點",target:"終點",sourceName:"起點名稱",targetName:"終點名稱"},specificAttrsTitle:"獨特屬性",unknown:{error:"哎呀 :( 我們無法識別此{{category}}。也許它是在更新版本中創建的。",node:"節點",linePath:"線段路徑",lineStyle:"線段樣式"},nodes:{common:{nameZh:"中文線路名稱",nameEn:"英文線路名稱",nameJa:"日語線路名稱",num:"線路號"},virtual:{displayName:"虛擬節點"},shmetroNumLineBadge:{displayName:"上海地鐵數字線路標識"},shmetroTextLineBadge:{displayName:"上海地鐵文字線路標識"},gzmtrLineBadge:{displayName:"廣州地鐵線路標識",tram:"輕軌",span:"跨行顯示數字"},bjsubwayNumLineBadge:{displayName:"北京地鐵數字線路標識"},bjsubwayTextLineBadge:{displayName:"北京地鐵文字線路標識"},berlinSBahnLineBadge:{displayName:"柏林城市快鐵線路標識"},berlinUBahnLineBadge:{displayName:"柏林地鐵線路標識"},suzhouRTNumLineBadge:{displayName:"蘇州軌道交通數字線路標識",branch:"是否支線"},chongqingRTNumLineBadge:{displayName:"重慶軌道交通數字線路標識"},chongqingRTTextLineBadge:{displayName:"重慶軌道交通文字線路標識"},shenzhenMetroNumLineBadge:{displayName:"深圳地鐵數字線路標識",branch:"是否支線"},mrtDestinationNumbers:{displayName:"新加坡MRT終點數字"},mrtLineBadge:{displayName:"新加坡MRT線路標識",isTram:"是LRT線路標識"},jrEastLineBadge:{displayName:"JR東日本線路標識",crosshatchPatternFill:"用網狀圖案填充"},qingdaoMetroNumLineBadge:{displayName:"青島地鐵數位線路標識",numEn:"英文線路號",showText:"顯示文字"},guangdongIntercityRailwayLineBadge:{displayName:"廣東城際鐵路線標識"},master:{displayName:"大師節點",type:"大師節點類型",undefined:"未定義"},facilities:{displayName:"設施",type:"類型"},text:{displayName:"任意文字",content:"內容",fontSize:"文字大小",lineHeight:"行高度",textAnchor:"文字錨點",start:"開始",middle:"中間",end:"結束",auto:"自動",hanging:"懸吊",dominantBaseline:"顯性基線",language:"哪個語言的字體系列",zh:"中文",en:"英文",mtr__zh:"香港地鐵中文",mtr__en:"香港地鐵英文",berlin:"柏林 S/U 地鐵",mrt:"新加坡地鐵",jreast_ja:"JR 東日本日文",jreast_en:"JR 東日本英文",rotate:"旋轉",italic:"斜體",bold:"粗體"}},stations:{common:{nameZh:"中文名稱",nameEn:"英文名稱",nameJa:"日語名稱",nameOffsetX:"名稱橫向偏移",nameOffsetY:"名稱縱向偏移",rotate:"車站旋轉角度",lineCode:"路綫編碼",stationCode:"車站編碼",left:"左",middle:"中間",right:"右",top:"頂部",bottom:"底部"},interchange:{title:"換乘",within:"同站換乘",outStation:"出站換乘",outSystem:"系統外換乘",addGroup:"添加換乘組合",noInterchanges:"非換乘站",nameZh:"中文名稱",nameEn:"英文名稱",add:"添加換乘",copy:"復製換乘",remove:"刪除換乘"},shmetroBasic:{displayName:"上海地鐵基本車站"},shmetroBasic2020:{displayName:"上海地鐵基本車站(2020)"},shmetroInt:{displayName:"上海地鐵換乘車站",height:"車站高度",width:"車站寬度"},shmetroOsysi:{displayName:"上海地鐵轉乘車站"},shanghaiSuburbanRailway:{displayName:"上海市域鐵路車站"},gzmtrBasic:{displayName:"廣州地鐵基本車站",open:"是否開通",secondaryNameZh:"中文第二名稱",secondaryNameEn:"英文第二名稱",tram:"輕軌"},gzmtrInt:{displayName:"廣州地鐵換乘車站",open:"是否開通",secondaryNameZh:"中文第二名稱",secondaryNameEn:"英文第二名稱",foshan:"佛山"},gzmtrInt2024:{displayName:"廣州地鐵換乘站(2024)",anchorAt:"定位於",anchorAtNone:"中心",preferVertical:"垂直佈局(僅限2個換乘)"},bjsubwayBasic:{displayName:"北京地鐵基本車站",open:"是否開通"},bjsubwayInt:{displayName:"北京地鐵換乘車站",outOfStation:"出站轉車"},mtr:{displayName:"香港MTR車站"},suzhouRTBasic:{displayName:"蘇州軌道交通基本車站",textVertical:"垂直名稱"},suzhouRTInt:{displayName:"蘇州軌道交通換乘車站"},kunmingRTBasic:{displayName:"昆明軌道交通基本車站"},kunmingRTInt:{displayName:"昆明軌道交通換乘車站"},MRTBasic:{displayName:"新加坡MRT基本車站",isTram:"是LRT車站"},MRTInt:{displayName:"新加坡MRT換乘車站"},jrEastBasic:{displayName:"JR東日本基本車站",nameOffset:"名稱偏移",textOneLine:"名稱在一行中",textVertical:"垂直名稱",important:"重要車站",lines:"轉乘線偏移"},jrEastImportant:{displayName:"JR東日本重要車站",textVertical:"垂直名稱",mostImportant:"最重要車站",minLength:"車站的最小長度"},foshanMetroBasic:{displayName:"佛山地鐵基本車站",open:"是否開通",secondaryNameZh:"中文第二名稱",secondaryNameEn:"英文第二名稱",tram:"輕軌"},qingdaoMetro:{displayName:"青島地鐵基本車站",isInt:"是換乘站"},tokyoMetroBasic:{displayName:"東京地鐵基本車站",nameOffset:"名稱偏移",textVertical:"垂直站名",lineCode:"線路編號",stationCode:"車站編號"},tokyoMetroInt:{displayName:"東京地鐵轉乘車站",mereOffset:{displayName:"名稱微小偏移",none:"無",left1:"左 (较少)",left2:"左 (较大)",right1:"右 (较少)",right2:"右 (较大)",up:"上",down:"下"},importance:{displayName:"車站重要性",default:"預設",middle:"中",high:"高"},align:{displayName:"圖標排列方向",horizontal:"橫向",vertical:"縱向"}},londonTubeCommon:{stepFreeAccess:"無障礙通行",stepFreeAccessNone:"無",stepFreeAccessTrain:"從街道到列車",stepFreeAccessPlatform:"從街道到月台"},londonTubeBasic:{displayName:"倫敦地鐵基本車站",terminal:"終點站",shareTracks:"軌道共享",shareTracksIndex:"軌道共享指數"},londonTubeInt:{displayName:"倫敦地鐵換乘車站"},guangdongIntercityRailway:{displayName:"廣東城際鐵路車站"}},lines:{reconcileId:"合並線段唯一標識符",common:{offsetFrom:"起始點偏移",offsetTo:"結束點偏移",startFrom:"從這裏開始",roundCornerFactor:"轉折圓角因子",from:"從",to:"到",parallelDisabled:"由於此線段是平行的,因此某些屬性已被禁用。",changeInBaseLine:"在基準線段中更改它們:"},simple:{displayName:"基本線段",offset:"偏移"},diagonal:{displayName:"135°折線線段"},perpendicular:{displayName:"90°垂直線段"},rotatePerpendicular:{displayName:"90°旋轉垂直線段"},singleColor:{displayName:"純色樣式"},shmetroVirtualInt:{displayName:"上海地鐵出站換乘樣式"},shanghaiSuburbanRailway:{displayName:"上海市域鐵路樣式",isEnd:"結束區間"},gzmtrVirtualInt:{displayName:"廣州地鐵出站換乘樣式"},chinaRailway:{displayName:"中國鐵路樣式"},bjsubwaySingleColor:{displayName:"北京地鐵純色樣式"},bjsubwayTram:{displayName:"北京地鐵有軌電車樣式"},bjsubwayDotted:{displayName:"北京地鐵虛線樣式"},dualColor:{displayName:"雙色樣式",swap:"切換顏色",colorA:"顏色A",colorB:"顏色B"},river:{displayName:"河流樣式",width:"寬度"},mtrRaceDays:{displayName:"香港MTR賽馬日樣式"},mtrLightRail:{displayName:"香港MTR輕鐵樣式"},mtrUnpaidArea:{displayName:"香港MTR未付費區域樣式"},mtrPaidArea:{displayName:"香港MTR付費區域樣式"},mrtUnderConstruction:{displayName:"新加坡MRT在建樣式"},mrtSentosaExpress:{displayName:"新加坡MRT聖淘沙捷運樣式"},jrEastSingleColor:{displayName:"JR東日本單色樣式"},jrEastSingleColorPattern:{displayName:"JR東日本單色網狀圖案樣式"},lrtSingleColor:{displayName:"新加坡LRT純色樣式"},londonTubeInternalInt:{displayName:"倫敦地鐵內部換乘樣式"},londonTube10MinWalk:{displayName:"倫敦地鐵10分鐘步行換乘樣式"},londonTubeTerminal:{displayName:"倫敦地鐵終點站樣式"},guangdongIntercityRailway:{displayName:"廣東城際鐵路樣式"}},edges:{},footer:{duplicate:"重複",copy:"複製",remove:"移除"}}},n0={popoverHeader:"你正在瀏覽<1>{{environment}}環境!",popoverBody:"我們正在測試最新的RMP。如果妳有任何建議,歡迎在 https://github.com/railmapgen/rmp/issues 上提出。",search:"搜尋車站",open:{new:"新項目",config:"讀入項目",projectRMG:"從RMG專案中讀入",invalidType:"無效的文件類型!僅接受JSON格式的文件。",unknownError:"解析上傳文件時發生未知錯誤!請重試。",gallery:"從畫廊中讀入",tutorial:"開始教程",importFromRMPGallery:"範本 {{id}} 已匯入。對此更改不滿意?可通過 Ctrl + Z 或撤銷按鈕進行撤銷。",failToImportFromRMPGallery:"無法從畫廊導入{{id}},找不到檔案。"},download:{config:"導出項目",image:"導出圖片","2rmg":{title:"導出RMG項目",type:{line:"直線",loop:"環線",branch:"支線"},placeholder:{chinese:"中文線路名稱",english:"英文線路名稱",lineCode:"路綫編碼"},info1:"這個功能可將RMP項目導出為RMG項目。",info2:"下面的線路將可以被導出,你可以在左側文本框中輸入中文線路名稱、在中間輸入英文線路名稱、右邊輸入線路編號(廣州地鐵樣式專用),隨後點擊下載按鈕即可導出RMG項目。",noline:"未找到可用線路。",download:"下載",downloadInfo:"請選擇一個起始車站,並點擊它。"},format:"檔案種類",png:"PNG影像",svg:"SVG影像",svgVersion:"版本","svg1.1":"1.1(適用於Adobe Illustrator)",svg2:"2(適用於現代瀏覽器)",transparent:"透明背景",scale:"縮放",disabledScaleOptions:"由於您的瀏覽器的畫布限制,部分縮放選項已被禁用。",disabledScaleOptionsWorkarounds:"可能的解決方法包括使用此命令行工具從SVG生成圖像:",imageTooBig:"圖像太大,您的瀏覽器無法生成!",useSystemFonts:"使用系統字型而不是在畫布上預覽的字型",shareInfo1:"當我分享此圖片時我會附上",shareInfo2:"和它的鏈接。",termsAndConditions:"條款及細則",termsAndConditionsInfo:"我同意",period:"。",confirm:"下載"},donation:{title:"捐款",openCollective:"Open Collective",viaUSD:"通過Paypal或Visa卡以美元捐款。",afdian:"爱发电",viaCNY:"通過支付寶或微信支付以人民幣捐款。"},settings:{title:"設置",pro:"這是一個專業功能,需要带有訂閱的帳戶。",proWithTrial:"這是一個PRO功能,並提供有限的免費試用。",proLimitExceed:{master:"大師節點超出了免費額度。",parallel:"平行線段超出了免費額度。",solution:"移除它們以解除此警告,或訂閱以解鎖更多功能!"},subscription:{title:"訂閱狀態","logged-out":"您目前已登出。",free:"已登入!訂閱以解鎖更多功能!",subscriber:"感謝您的訂閱!享受所有功能吧!",expired:"登入狀態已過期。請登出後重新登入。"},preference:{title:"偏好",keepLastPath:"在下一次操作中持續畫線段直到點擊背景",autoParallel:"自動將新段線設置為與現有線段平行"},shortcuts:{title:"捷徑",keys:"按鍵",description:"描述",f:"使用上一個工具。",s:"多選。",arrows:"稍微移動畫布。",ijkl:"稍微移動所選站點。",shift:"多選。",alt:"精確移動。",delete:"刪除所選站點。",cut:"剪切。",copy:"複製。",paste:"貼上。",undo:"撤銷。",redo:"重做。"},procedures:{title:"过程",translate:{title:"轉化節點坐標",content:"將以下偏移加到所有節點的x和y上:",x:"橫坐標",y:"縱坐標"},scale:{title:"縮放節點坐標",content:"將所有節點的x和y乘以以下值:",factor:"縮放因子"},changeType:{title:"修改所有物件的屬性",any:"任意"},changeZIndex:"批量修改深度",changeStationType:{title:"批量修改車站種類",changeFrom:"將此類型的所有車站:",changeTo:"轉換為這個類型的車站:",info:"修改車站類型會移除所有獨特屬性除了名稱。保存再操作!"},changeLineStyleType:{title:"批量修改線段樣式",changeFrom:"將此樣式的所有線段:",changeTo:"轉換為這個樣式的線段:",info:"修改線段樣式會移除所有獨特屬性除了連通性。保存再操作!"},changeLinePathType:{title:"批量修改線段類型",changeFrom:"將此類型的所有線段:",changeTo:"轉換為這個類型的線段:"},changeColor:{title:"批量修改顏色",changeFrom:"將此顏色的所有對象:",changeTo:"轉換為這個顏色:",any:"從任何顏色轉換"},removeLines:{title:"移除所有純色線段",content:"移除具有此顏色的所有線段: "},updateColor:{title:"更新顏色",content:"使用最新值更新所有顏色。",success:"成功更新所有顏色。",error:"更新所有顏色時發生錯誤:{{e}}。"},unlockSimplePath:{title:"解鎖簡單路徑",content1:"地鐵線路圖繪製器應用致力於在遵循既定慣例的前提下,提供一個有利於創建地鐵線路圖的互動平台。在這些慣例中,一種特別著名的風格源自哈利·貝克的創新工作。他的開創性貢獻於1932年得到官方認可,並在大眾中迅速贏得了聲譽。目前,它在信息設計領域具有重要的示範意義,在全球範圍內的交通製圖中得到了廣泛的實施,儘管成功程度有所不同。",content2:"應用程式固有地隱藏了使用簡單路徑的選項,因為其部署有可能違反既定的慣例。默認情況下,此特定功能保持隱蔽。此外,提交到地鐵線路圖繪製器畫廊的作品將經過嚴格的審查,堅決拒絕使用單色風格的簡單路徑的構圖。",content3:"儘管如此,我們仍然保留瞭解鎖此選項的機會,當您訂閱后,方可使用簡單路徑。 需要注意的是,即使獲得后,簡單路徑的使用也僅限於單色風格。",check:"解鎖簡單路徑",unlocked:"已解鎖"},masterManager:{title:"管理全部大師節點",id:"唯一標識",label:"標籤",type:"類型",types:{MiscNode:"雜項節點",Station:"車站"},importTitle:"上傳大師節點參數",importFrom:"使用匯入的樣式",importOther:"導入新樣式",importParam:"貼上配置信息"}},telemetry:{title:"遙測",info:"為了協助改進地鐵路綫圖繪製器並激勵貢獻者提升項目,我們透過 Google Analytics 收集匿名使用數據。這些數據僅用於提升用戶體驗及優化工具功能,絕不會與第三方共享。",essential:"基本",essentialTooltip:"在地鐵路綫圖工具組中更改此全局設定",essentialInfo:"地鐵路綫圖繪製器收集一些基本使用數據,以協助我們了解用戶如何及何時與工具互動。請放心,我們絕不收集任何可識別個人身份的資訊或您的項目數據。",essentialLink:"點擊此鏈接查看 Google Analytics 可能收集的詳細字段。",additional:"額外",additionalInfo:"地鐵路綫圖繪製器還會收集與互動有關的數據,例如創建項目或新增站點等操作。這些額外數據同樣是匿名的,僅用於統計分析以協助我們改進工具。"}},about:{title:"關於",rmp:"地鐵線路圖繪製器",railmapgen:"一個路綫圖工具組的項目",desc:"通過自由拖動來自不同城市的車站並以 90 或 135 度圓角線段將它們連接起來,設計您自己的鐵路地圖!",content1:"謹以此紀念我們曾擁有的自由與平等。",content2:"06/01/2022於上海",contributors:"貢獻者",coreContributors:"核心貢獻者",styleContributors:"樣式貢獻者",langonginc:"活出值得銘記的人生。","203IhzElttil":"特別感謝他勤奮工作,確保上海地鐵站與原始設計相符。",Swiftiecott:"特別感謝他勤奮工作,確保北京地鐵站與原始設計相符。",Minwtraft:"特別感謝他勤奮工作,確保廣州地鐵站與原始設計相符。",contactUs:"聯繫我們",github:"項目倉庫",githubContent:"遇到任何問題?在這裡搜索或提出一個問題!",slack:"Slack群組",slackContent:"在這些Slack頻道中討論!"}},r0={color:Jv,warning:Kv,cancel:Yv,apply:qv,remove:Qv,close:Xv,noShowAgain:Zv,rmtPromotion:e0,panel:t0,header:n0},Xn=new Ge.I18nBuilder().use(Mu).withAppName("Rail Map Painter").withLng(Ge.getLanguage()).withDefaultResource(ev).withResource("en",dv).withResource("zh-Hans",Hv).withResource("zh-Hant",r0).withResource("ja",Nv).withResource("ko",$v).build(),{abs:jn,cos:gt,sin:on,acos:i0,atan2:$n,sqrt:kt,pow:Ke}=Math;function Pn(n){return n<0?-Ke(-n,1/3):Ke(n,1/3)}const wl=Math.PI,br=2*wl,Ct=wl/2,o0=1e-6,$i=Number.MAX_SAFE_INTEGER||9007199254740991,Pi=Number.MIN_SAFE_INTEGER||-9007199254740991,a0={x:0,y:0,z:0},k={Tvalues:[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213],Cvalues:[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872],arcfn:function(n,e){const r=e(n);let i=r.x*r.x+r.y*r.y;return typeof r.z<"u"&&(i+=r.z*r.z),kt(i)},compute:function(n,e,r){if(n===0)return e[0].t=0,e[0];const i=e.length-1;if(n===1)return e[i].t=1,e[i];const o=1-n;let a=e;if(i===0)return e[0].t=n,e[0];if(i===1){const l={x:o*a[0].x+n*a[1].x,y:o*a[0].y+n*a[1].y,t:n};return r&&(l.z=o*a[0].z+n*a[1].z),l}if(i<4){let l=o*o,c=n*n,u,d,h,p=0;i===2?(a=[a[0],a[1],a[2],a0],u=l,d=o*n*2,h=c):i===3&&(u=l*o,d=l*n*3,h=o*c*3,p=n*c);const g={x:u*a[0].x+d*a[1].x+h*a[2].x+p*a[3].x,y:u*a[0].y+d*a[1].y+h*a[2].y+p*a[3].y,t:n};return r&&(g.z=u*a[0].z+d*a[1].z+h*a[2].z+p*a[3].z),g}const s=JSON.parse(JSON.stringify(e));for(;s.length>1;){for(let l=0;l1;o--,a--){const s=[];for(let l=0,c;l"u")n=.5;else if(n===0||n===1)return n;const r=Ke(n,e)+Ke(1-n,e),i=r-1;return jn(i/r)},projectionratio:function(n,e){if(e!==2&&e!==3)return!1;if(typeof n>"u")n=.5;else if(n===0||n===1)return n;const r=Ke(1-n,e),i=Ke(n,e)+r;return r/i},lli8:function(n,e,r,i,o,a,s,l){const c=(n*i-e*r)*(o-s)-(n-r)*(o*l-a*s),u=(n*i-e*r)*(a-l)-(e-i)*(o*l-a*s),d=(n-r)*(a-l)-(e-i)*(o-s);return d==0?!1:{x:c/d,y:u/d}},lli4:function(n,e,r,i){const o=n.x,a=n.y,s=e.x,l=e.y,c=r.x,u=r.y,d=i.x,h=i.y;return k.lli8(o,a,s,l,c,u,d,h)},lli:function(n,e){return k.lli4(n,n.c,e,e.c)},makeline:function(n,e){return new le(n.x,n.y,(n.x+e.x)/2,(n.y+e.y)/2,e.x,e.y)},findbbox:function(n){let e=$i,r=$i,i=Pi,o=Pi;return n.forEach(function(a){const s=a.bbox();e>s.x.min&&(e=s.x.min),r>s.y.min&&(r=s.y.min),i0&&(d.c1=c,d.c2=u,d.s1=n,d.s2=r,a.push(d))})}),a},makeshape:function(n,e,r){const i=e.points.length,o=n.points.length,a=k.makeline(e.points[i-1],n.points[0]),s=k.makeline(n.points[o-1],e.points[0]),l={startcap:a,forward:n,back:e,endcap:s,bbox:k.findbbox([a,n,e,s])};return l.intersections=function(c){return k.shapeintersections(l,l.bbox,c,c.bbox,r)},l},getminmax:function(n,e,r){if(!r)return{min:0,max:0};let i=$i,o=Pi,a,s;r.indexOf(0)===-1&&(r=[0].concat(r)),r.indexOf(1)===-1&&r.push(1);for(let l=0,c=r.length;lo&&(o=s[e]);return{min:i,mid:(i+o)/2,max:o,size:o-i}},align:function(n,e){const r=e.p1.x,i=e.p1.y,o=-$n(e.p2.y-i,e.p2.x-r),a=function(s){return{x:(s.x-r)*gt(o)-(s.y-i)*on(o),y:(s.x-r)*on(o)+(s.y-i)*gt(o)}};return n.map(a)},roots:function(n,e){e=e||{p1:{x:0,y:0},p2:{x:1,y:0}};const r=n.length-1,i=k.align(n,e),o=function(T){return 0<=T&&T<=1};if(r===2){const T=i[0].y,G=i[1].y,O=i[2].y,P=T-2*G+O;if(P!==0){const W=-kt(G*G-T*O),ae=-T+G,ee=-(W+ae)/P,X=-(-W+ae)/P;return[ee,X].filter(o)}else if(G!==O&&P===0)return[(2*G-O)/(2*G-2*O)].filter(o);return[]}const a=i[0].y,s=i[1].y,l=i[2].y,c=i[3].y;let u=-a+3*s-3*l+c,d=3*a-6*s+3*l,h=-3*a+3*s,p=a;if(k.approximately(u,0)){if(k.approximately(d,0))return k.approximately(h,0)?[]:[-p/h].filter(o);const T=kt(h*h-4*d*p),G=2*d;return[(T-h)/G,(-h-T)/G].filter(o)}d/=u,h/=u,p/=u;const g=(3*h-d*d)/3,y=g/3,w=(2*d*d*d-9*d*h+27*p)/27,_=w/2,S=_*_+y*y*y;let R,j,M,A,F;if(S<0){const T=-g/3,G=T*T*T,O=kt(G),P=-w/(2*O),W=P<-1?-1:P>1?1:P,ae=i0(W),ee=Pn(O),X=2*ee;return M=X*gt(ae/3)-d/3,A=X*gt((ae+br)/3)-d/3,F=X*gt((ae+2*br)/3)-d/3,[M,A,F].filter(o)}else{if(S===0)return R=_<0?Pn(-_):-Pn(_),M=2*R-d/3,A=-R-d/3,[M,A].filter(o);{const T=kt(S);return R=Pn(-_+T),j=Pn(_+T),[R-j-d/3].filter(o)}}},droots:function(n){if(n.length===3){const e=n[0],r=n[1],i=n[2],o=e-2*r+i;if(o!==0){const a=-kt(r*r-e*i),s=-e+r,l=-(a+s)/o,c=-(-a+s)/o;return[l,c]}else if(r!==i&&o===0)return[(2*r-i)/(2*(r-i))];return[]}if(n.length===2){const e=n[0],r=n[1];return e!==r?[e/(e-r)]:[]}return[]},curvature:function(n,e,r,i,o){let a,s,l,c,u=0,d=0;const h=k.compute(n,e),p=k.compute(n,r),g=h.x*h.x+h.y*h.y;if(i?(a=kt(Ke(h.y*p.z-p.y*h.z,2)+Ke(h.z*p.x-p.z*h.x,2)+Ke(h.x*p.y-p.x*h.y,2)),s=Ke(g+h.z*h.z,3/2)):(a=h.x*p.y-h.y*p.x,s=Ke(g,3/2)),a===0||s===0)return{k:0,r:0};if(u=a/s,d=s/a,!o){const y=k.curvature(n-.001,e,r,i,!0).k,w=k.curvature(n+.001,e,r,i,!0).k;c=(w-u+(u-y))/2,l=(jn(w-u)+jn(u-y))/2}return{k:u,r:d,dk:c,adk:l}},inflections:function(n){if(n.length<4)return[];const e=k.align(n,{p1:n[0],p2:n.slice(-1)[0]}),r=e[2].x*e[1].y,i=e[3].x*e[1].y,o=e[1].x*e[2].y,a=e[3].x*e[2].y,s=18*(-3*r+2*i+3*o-a),l=18*(3*r-i-3*o),c=18*(o-r);if(k.approximately(s,0)){if(!k.approximately(l,0)){let p=-c/l;if(0<=p&&p<=1)return[p]}return[]}const u=2*s;if(k.approximately(u,0))return[];const d=l*l-4*s*c;if(d<0)return[];const h=Math.sqrt(d);return[(h-l)/u,-(l+h)/u].filter(function(p){return 0<=p&&p<=1})},bboxoverlap:function(n,e){const r=["x","y"],i=r.length;for(let o=0,a,s,l,c;o=c)return!1;return!0},expandbox:function(n,e){e.x.minn.x.max&&(n.x.max=e.x.max),e.y.max>n.y.max&&(n.y.max=e.y.max),e.z&&e.z.max>n.z.max&&(n.z.max=e.z.max),n.x.mid=(n.x.min+n.x.max)/2,n.y.mid=(n.y.min+n.y.max)/2,n.z&&(n.z.mid=(n.z.min+n.z.max)/2),n.x.size=n.x.max-n.x.min,n.y.size=n.y.max-n.y.min,n.z&&(n.z.size=n.z.max-n.z.min)},pairiteration:function(n,e,r){const i=n.bbox(),o=e.bbox(),a=1e5,s=r||.5;if(i.x.size+i.y.sizeF||F>T)&&(A+=br),A>T&&(G=T,T=A,A=G)):T4){if(arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");o=!0}}else if(a!==6&&a!==8&&a!==9&&a!==12&&arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");const s=this._3d=!o&&(a===9||a===12)||e&&e[0]&&typeof e[0].z<"u",l=this.points=[];for(let g=0,y=s?3:2;gg+In(y.y),0)

"u"&&(o=.5),o===0)return new le(r,r,i);if(o===1)return new le(e,r,r);const a=le.getABC(2,e,r,i,o);return new le(e,a.A,i)}static cubicFromPoints(e,r,i,o,a){typeof o>"u"&&(o=.5);const s=le.getABC(3,e,r,i,o);typeof a>"u"&&(a=k.dist(r,s.C));const l=a*(1-o)/o,c=k.dist(e,i),u=(i.x-e.x)/c,d=(i.y-e.y)/c,h=a*u,p=a*d,g=l*u,y=l*d,w={x:r.x-h,y:r.y-p},_={x:r.x+g,y:r.y+y},S=s.A,R={x:S.x+(w.x-S.x)/(1-o),y:S.y+(w.y-S.y)/(1-o)},j={x:S.x+(_.x-S.x)/o,y:S.y+(_.y-S.y)/o},M={x:e.x+(R.x-e.x)/o,y:e.y+(R.y-e.y)/o},A={x:i.x+(j.x-i.x)/(1-o),y:i.y+(j.y-i.y)/(1-o)};return new le(e,M,A,i)}static getUtils(){return k}getUtils(){return le.getUtils()}static get PolyBezier(){return Yn}valueOf(){return this.toString()}toString(){return k.pointsToString(this.points)}toSVG(){if(this._3d)return!1;const e=this.points,r=e[0].x,i=e[0].y,o=["M",r,i,this.order===2?"Q":"C"];for(let a=1,s=e.length;a0}length(){return k.length(this.derivative.bind(this))}static getABC(e=2,r,i,o,a=.5){const s=k.projectionratio(a,e),l=1-s,c={x:s*r.x+l*o.x,y:s*r.y+l*o.y},u=k.abcratio(a,e);return{A:{x:i.x+(i.x-c.x)/u,y:i.y+(i.y-c.y)/u},B:i,C:c,S:r,E:o}}getABC(e,r){r=r||this.get(e);let i=this.points[0],o=this.points[this.order];return le.getABC(this.order,i,r,o,e)}getLUT(e){if(this.verify(),e=e||100,this._lut.length===e+1)return this._lut;this._lut=[],e++,this._lut=[];for(let r=0,i,o;r1?1:h,p=this.compute(h),p.t=h,p.d=u,p}get(e){return this.compute(e)}point(e){return this.points[e]}compute(e){return this.ratios?k.computeWithRatios(e,this.points,this.ratios,this._3d):k.compute(e,this.points,this._3d,this.ratios)}raise(){const e=this.points,r=[e[0]],i=e.length;for(let o=1,a,s;o1;){i=[];for(let s=0,l,c=r.length-1;s=0&&s<=1}),r=r.concat(e[i].sort(k.numberSort))}).bind(this)),e.values=r.sort(k.numberSort).filter(function(i,o){return r.indexOf(i)===o}),e}bbox(){const e=this.extrema(),r={};return this.dims.forEach((function(i){r[i]=k.getminmax(this,i,e[i])}).bind(this)),r}overlaps(e){const r=this.bbox(),i=e.bbox();return k.bboxoverlap(r,i)}offset(e,r){if(typeof r<"u"){const i=this.get(e),o=this.normal(e),a={c:i,n:o,x:i.x+o.x*r,y:i.y+o.y*r};return this._3d&&(a.z=i.z+o.z*r),a}if(this._linear){const i=this.normal(0),o=this.points.map(function(a){const s={x:a.x+e*i.x,y:a.y+e*i.y};return a.z&&i.z&&(s.z=a.z+e*i.z),s});return[new le(o)]}return this.reduce().map(function(i){return i._linear?i.offset(e)[0]:i.scale(e)})}simple(){if(this.order===3){const o=k.angle(this.points[0],this.points[3],this.points[1]),a=k.angle(this.points[0],this.points[3],this.points[2]);if(o>0&&a<0||o<0&&a>0)return!1}const e=this.normal(0),r=this.normal(1);let i=e.x*r.x+e.y*r.y;return this._3d&&(i+=e.z*r.z),In(c0(i))(1-l/o)*r+l/o*i);return new le(this.points.map((s,l)=>({x:s.x+e.x*a[l],y:s.y+e.y*a[l]})))}scale(e){const r=this.order;let i=!1;if(typeof e=="function"&&(i=e),i&&r===2)return this.raise().scale(i);const o=this.clockwise,a=this.points;if(this._linear)return this.translate(this.normal(0),i?i(0):e,i?i(1):e);const s=i?i(0):e,l=i?i(1):e,c=[this.offset(0,10),this.offset(1,10)],u=[],d=k.lli4(c[0],c[0].c,c[1],c[1].c);if(!d)throw new Error("cannot scale this curve. Try reducing it first.");return[0,1].forEach(function(h){const p=u[h*r]=k.copy(a[h*r]);p.x+=(h?l:s)*c[h].n.x,p.y+=(h?l:s)*c[h].n.y}),i?([0,1].forEach(function(h){if(!(r===2&&h)){var p=a[h+1],g={x:p.x-d.x,y:p.y-d.y},y=i?i((h+1)/r):e;i&&!o&&(y=-y);var w=Dn(g.x*g.x+g.y*g.y);g.x/=w,g.y/=w,u[h+1]={x:p.x+y*g.x,y:p.y+y*g.y}}}),new le(u)):([0,1].forEach(h=>{if(r===2&&h)return;const p=u[h*r],g=this.derivative(h),y={x:p.x+g.x,y:p.y+g.y};u[h+1]=k.lli4(p,y,d,a[h+1])}),new le(u))}outline(e,r,i,o){if(r=r===void 0?e:r,this._linear){const A=this.normal(0),F=this.points[0],T=this.points[this.points.length-1];let G,O,P;i===void 0&&(i=e,o=r),G={x:F.x+A.x*e,y:F.y+A.y*e},P={x:T.x+A.x*i,y:T.y+A.y*i},O={x:(G.x+P.x)/2,y:(G.y+P.y)/2};const W=[G,O,P];G={x:F.x-A.x*r,y:F.y-A.y*r},P={x:T.x-A.x*o,y:T.y-A.y*o},O={x:(G.x+P.x)/2,y:(G.y+P.y)/2};const ae=[P,O,G],ee=k.makeline(ae[2],W[0]),X=k.makeline(W[2],ae[0]),De=[ee,new le(W),X,new le(ae)];return new Yn(De)}const a=this.reduce(),s=a.length,l=[];let c=[],u,d=0,h=this.length();const p=typeof i<"u"&&typeof o<"u";function g(A,F,T,G,O){return function(P){const W=G/T,ae=(G+O)/T,ee=F-A;return k.map(P,0,1,A+W*ee,A+ae*ee)}}a.forEach(function(A){const F=A.length();p?(l.push(A.scale(g(e,i,h,d,F))),c.push(A.scale(g(-r,-o,h,d,F)))):(l.push(A.scale(e)),c.push(A.scale(-r))),d+=F}),c=c.map(function(A){return u=A.points,u[3]?A.points=[u[3],u[2],u[1],u[0]]:A.points=[u[2],u[1],u[0]],A}).reverse();const y=l[0].points[0],w=l[s-1].points[l[s-1].points.length-1],_=c[s-1].points[c[s-1].points.length-1],S=c[0].points[0],R=k.makeline(_,y),j=k.makeline(w,S),M=[R].concat(l).concat([j]).concat(c);return new Yn(M)}outlineshapes(e,r,i){r=r||e;const o=this.outline(e,r).curves,a=[];for(let s=1,l=o.length;s1,c.endcap.virtual=s{var l=this.get(s);return k.between(l.x,r,o)&&k.between(l.y,i,a)})}selfintersects(e){const r=this.reduce(),i=r.length-2,o=[];for(let a=0,s,l,c;a0&&(a=a.concat(l))}),a}arcs(e){return e=e||.5,this._iterate(e,[])}_error(e,r,i,o){const a=(o-i)/4,s=this.get(i+a),l=this.get(o-a),c=k.dist(e,r),u=k.dist(e,s),d=k.dist(e,l);return In(u-c)+In(d-c)}_iterate(e,r){let i=0,o=1,a;do{a=0,o=1;let s=this.get(i),l,c,u,d,h=!1,p=!1,g,y=o,w=1;do if(p=h,d=u,y=(i+o)/2,l=this.get(y),c=this.get(o),u=k.getccenter(s,l,c),u.interval={start:i,end:o},h=this._error(u,s,i,o)<=e,g=p&&!h,g||(w=o),h){if(o>=1){if(u.interval.end=w=1,d=u,o>1){let S={x:u.x+u.r*s0(u.e),y:u.y+u.r*l0(u.e)};u.e+=k.angle({x:u.x,y:u.y},S,this.get(1))}break}o=o+(o-i)/2}else o=y;while(!g&&a++<100);if(a>=100)break;d=d||u,r.push(d),i=w}while(o<1);return r}}const xl=(n,e,r,i)=>{i=i!=null?i:-r;const[o,a]=Sl(n);if(!o||!a)return;if(o[0]===a[0]||o[1]===a[1]||e===N.Diagonal&&Math.abs(o[1]-a[1])===Math.abs(o[0]-a[0])){const M=Math.abs(r);return _l(o,a,M)}const[s,l]=to(n);if(!s||!l)return;const c=new le([...s,...l]),[u,d]=[c.scale(r),c.scale(i)],h=Nl(o,s,a,c,u,d);if(!h)return;const{mA:[p,g],mB:[y,w],endA:[_,S],endB:[R,j]}=h;return["M ".concat(p," ").concat(g," ").concat(u.toSVG().replace("M","L")," L ").concat(_," ").concat(S),"M ".concat(y," ").concat(w," ").concat(d.toSVG().replace("M","L")," L ").concat(R," ").concat(j)]},d0=(n,e,r,i)=>{i=i!=null?i:-r;const[o,a]=Sl(n);if(!o||!a)return;if(o[0]===a[0]||o[1]===a[1]||e===N.Diagonal&&Math.abs(o[1]-a[1])===Math.abs(o[0]-a[0])){const O=Math.abs(r),[P,W]=_l(o,a,O);return{outline:h0(o,a,O),pA:P,pB:W}}const[s,l]=to(n);if(!s||!l)return;const c=new le([...s,...l]),[u,d]=[c.scale(r),c.scale(i)],h=Nl(o,s,a,c,u,d);if(!h)return;const{mA:[p,g],mB:[y,w],endA:[_,S],endB:[R,j]}=h,[M,A]=to(d.toSVG().replace("M","L")),[F,T]=p0(M,A);return{outline:"M ".concat(p," ").concat(g," ").concat(u.toSVG().replace("M","L")," L ").concat(_," ").concat(S," L ").concat(R," ").concat(j," L ").concat(F.join(" ")," C ").concat(T.join(" ")," L ").concat(y," ").concat(w," Z"),pA:"M ".concat(p," ").concat(g," ").concat(u.toSVG().replace("M","L")," L ").concat(_," ").concat(S),pB:"M ".concat(y," ").concat(w," ").concat(d.toSVG().replace("M","L")," L ").concat(R," ").concat(j)}},Sl=n=>{var i,o,a,s;const e=(o=(i=n.match(/M\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+/))==null?void 0:i.at(0))==null?void 0:o.replace(/M\s*/,"").split(" ").map(l=>Number(l)),r=(s=(a=n.match(/L\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+\s*$/))==null?void 0:a.at(0))==null?void 0:s.replace(/L\s*/,"").split(" ").map(l=>Number(l));return[e,r]},_l=(n,e,r)=>{const[i,o,a,s]=[n[0],n[1],e[0],e[1]],l=Math.abs((s-o)/(a-i));if(l===1/0)return["M ".concat(i+r," ").concat(o," L ").concat(a+r," ").concat(s),"M ".concat(i-r," ").concat(o," L ").concat(a-r," ").concat(s)];if(l===0)return["M ".concat(i," ").concat(o+r," L ").concat(a," ").concat(s+r),"M ".concat(i," ").concat(o-r," L ").concat(a," ").concat(s-r)];{const c=1/l,u=r/Math.sqrt(c*c+1),d=u*c*-Math.sign((a-i)*(s-o));return["M ".concat(i+u," ").concat(o+d," L ").concat(a+u," ").concat(s+d),"M ".concat(i-u," ").concat(o-d," L ").concat(a-u," ").concat(s-d)]}},h0=(n,e,r)=>{const[i,o,a,s]=[n[0],n[1],e[0],e[1]],l=Math.abs((s-o)/(a-i));if(l===1/0)return"M ".concat(i+r," ").concat(o," L ").concat(a+r," ").concat(s," L ").concat(a-r," ").concat(s," L ").concat(i-r," ").concat(o," Z");if(l===0)return"M ".concat(i," ").concat(o+r," L ").concat(a," ").concat(s+r," L ").concat(a," ").concat(s-r," L ").concat(i," ").concat(o-r," Z");{const c=1/l,u=r/Math.sqrt(c*c+1),d=u*c*-Math.sign((a-i)*(s-o));return"M ".concat(i+u," ").concat(o+d," L ").concat(a+u," ").concat(s+d," L ").concat(a-u," ").concat(s-d," L ").concat(i-u," ").concat(o-d," Z")}},to=n=>{var i,o,a,s;const e=(o=(i=n.match(/L\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+/))==null?void 0:i.at(0))==null?void 0:o.replace(/L\s*/,"").split(" ").map(l=>Number(l)),r=(s=(a=n.match(/C\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+/g))==null?void 0:a.at(0))==null?void 0:s.replace(/C\s*/,"").split(" ").map(l=>Number(l));return[e,r]},p0=(n,e)=>[[e[4],e[5]],[e[2],e[3],e[0],e[1],n[0],n[1]]],Nl=(n,e,r,i,o,a)=>{const s=[o.points.at(0).x,o.points.at(0).y],l=[a.points.at(0).x,a.points.at(0).y];if(!n)return;const[c,u]=vr(n[0],e[0],s[0],n[1],e[1],s[1]),[d,h]=vr(n[0],e[0],l[0],n[1],e[1],l[1]),p=[o.points.at(-1).x,o.points.at(-1).y],g=[a.points.at(-1).x,a.points.at(-1).y],y=[i.points.at(-1).x,i.points.at(-1).y];if(!r)return;const[w,_]=vr(p[0],y[0],r[0],p[1],y[1],r[1]),[S,R]=vr(g[0],y[0],r[0],g[1],y[1],r[1]);return{mA:[c,u],mB:[d,h],endA:[w,_],endB:[S,R]}},vr=(n,e,r,i,o,a)=>{const[s,l]=[n+r,i+a],[c,u]=[s-e,l-o];return[c,u]},f0=1,bx=(n,e)=>{const r=e.edge,i=e.attributes.type,o=e.attributes[i],a=e.attributes.parallelIndex;if(i===N.Simple||a<0)return{normal:[e],parallel:[]};const s=[],[l,c]=n.extremities(r),u=[];for(const d of n.edgeEntries(l,c)){if(d.attributes.parallelIndex<0){s.push(d);continue}(d.attributes.type===i&&l===d.source&&d.attributes[i].startFrom===o.startFrom||d.attributes.type===i&&l===d.target&&d.attributes[i].startFrom!==o.startFrom)&&u.push(d)}return{normal:s,parallel:u}},g0=(n,e,r,i,o)=>{let a=!1;if(n===N.Diagonal)(Math.abs(i-e)e&&o>r)||Math.abs(i-e)>Math.abs(o-r)&&(i>e&&or))&&(a=!0);else if(n===N.Perpendicular)(i>e&&or)&&(a=!0);else if(n===N.RotatePerpendicular){const[s,l,c,u]=[e*Math.SQRT1_2+r*Math.SQRT1_2,-e*Math.SQRT1_2+r*Math.SQRT1_2,i*Math.SQRT1_2+o*Math.SQRT1_2,-i*Math.SQRT1_2+o*Math.SQRT1_2];(c>s&&ul)&&(a=!0)}return a},vx=n=>{var p;let e=n.at(0);if(!e)return{};for(const g of n)g.attributes.parallelIndex0?g.attributes.parallelIndex:0;if(y===0){h[g.edge]=u;continue}const w=y*5,_=["M ".concat(a," ").concat(s+w," L ").concat(l," ").concat(c+w),"M ".concat(a," ").concat(s-w," L ").concat(l," ").concat(c-w)],[S,R]=(p=xl(u,r,w))!=null?p:_;h[g.edge]=d?S:R}return h},wx=(n,e,r,i,o)=>{if(e===N.Simple)return-1;const a=[];for(const l of n.edgeEntries(r,i)){const c=l.attributes;(e===c.type&&r===l.source&&c[e].startFrom===o||e===c.type&&r===l.target&&c[e].startFrom!==o)&&a.push(l.attributes.parallelIndex)}a.sort();let s=0;for(const l of a){if(l>s)break;s=l+1}return s},Oo=(n,e,r)=>{if(e===N.Simple)return r;const i=n.getEdgeAttribute(r,"parallelIndex");if(i<0)return r;const o=n.getEdgeAttribute(r,e).startFrom,[a,s]=n.extremities(r);let l=Number.MAX_VALUE,c=r;for(const u of n.edgeEntries(a,s)){const d=u.attributes;(e===d.type&&a===u.source&&d[e].startFrom===o&&d.parallelIndex>=0&&d.parallelIndex=0&&d.parallelIndex{let e=0;for(const r of n.edgeEntries())r.attributes.parallelIndex>=0&&(e+=1);return e},v0={telemetry:{app:!0,project:!0},preference:{unlockSimplePathAttempts:3,toolsPanel:{expand:!0},autoParallel:!0}},Rl=ri({name:"app",initialState:v0,reducers:{setTelemetryApp:(n,e)=>{n.telemetry.app=e.payload},setTelemetryProject:(n,e)=>{n.telemetry.project=e.payload},setUnlockSimplePath:(n,e)=>{n.preference.unlockSimplePathAttempts=e.payload},setToolsPanelExpansion:(n,e)=>{n.preference.toolsPanel.expand=e.payload},setAutoParallel:(n,e)=>{n.preference.autoParallel=e.payload}}}),{setTelemetryApp:w0,setTelemetryProject:x0,setUnlockSimplePath:S0,setToolsPanelExpansion:_0,setAutoParallel:kl}=Rl.actions,N0=Rl.reducer,R0=49,k0={present:new pe().export(),past:[],future:[],svgViewBoxZoom:100,svgViewBoxMin:{x:0,y:0}},Cl=qa("undo"),Al=qa("redo"),Tl=ri({name:"param",initialState:k0,reducers:{setFullState:(n,e)=>structuredClone(e.payload),saveGraph:(n,e)=>{n.future=[],n.past.push(n.present),n.past.length>R0&&n.past.shift(),n.present=structuredClone(e.payload)},setSvgViewBoxZoom:(n,e)=>{n.svgViewBoxZoom=e.payload},setSvgViewBoxMin:(n,e)=>{n.svgViewBoxMin=e.payload}},extraReducers:n=>{n.addCase(Cl,e=>{if(e.past.length===0)return;const r=e.past.pop();e.future.unshift(e.present),e.present=r,window.graph.clear(),window.graph.import(structuredClone(Ko(r)))}).addCase(Al,e=>{if(e.future.length===0)return;const r=e.future.shift();e.past.push(e.present),e.present=r,window.graph.clear(),window.graph.import(structuredClone(Ko(r)))})}}),{setFullState:C0,saveGraph:cn,setSvgViewBoxZoom:xx,setSvgViewBoxMin:Sx}=Tl.actions,A0=Tl.reducer,T0={selected:new Set,active:void 0,refresh:{nodes:Date.now(),edges:Date.now()},mode:"free",lastTool:void 0,keepLastPath:!1,theme:[ye.Shanghai,"sh1","#E3002B",de.white],paletteAppClip:{input:void 0,output:void 0},masterNodesCount:0,parallelLinesCount:0,globalAlerts:{}},Ur=Qa("runtime/refreshNodes",async(n,{getState:e,dispatch:r})=>{const i=e();if(r(L0()),i.account.timeout)return;let o=0;window.graph.forEachNode((s,l)=>{l.type===st.Master&&(o+=1)}),r(E0(o));const a=i.account.activeSubscriptions.RMP_CLOUD?Ty:Ay;o>a&&r(jo({status:"warning",message:"".concat(Xn.t("header.settings.proLimitExceed.master")," ").concat(Xn.t("header.settings.proLimitExceed.solution"))}))}),pn=Qa("runtime/refreshEdges",async(n,{getState:e,dispatch:r})=>{const i=e();if(r(M0()),i.account.timeout)return;const o=b0(window.graph);r(O0(o));const a=i.account.activeSubscriptions.RMP_CLOUD?y0:m0;o>=a&&r(kl(!1)),o>a&&r(jo({status:"warning",message:"".concat(Xn.t("header.settings.proLimitExceed.parallel")," ").concat(Xn.t("header.settings.proLimitExceed.solution"))}))}),Lo=ri({name:"runtime",initialState:T0,reducers:{setSelected:(n,e)=>{n.selected=e.payload},addSelected:(n,e)=>{n.selected.add(e.payload)},removeSelected:(n,e)=>{n.selected.delete(e.payload)},clearSelected:n=>{n.selected=new Set},setActive:(n,e)=>{n.active=e.payload},setRefreshNodes:n=>{n.refresh.nodes=Date.now()},setRefreshEdges:n=>{n.refresh.edges=Date.now()},setMode:(n,e)=>{n.mode!=="free"&&(n.lastTool=n.mode),n.mode=e.payload},setKeepLastPath:(n,e)=>{n.keepLastPath=e.payload},setTheme:(n,e)=>{n.theme=e.payload},openPaletteAppClip:(n,e)=>{n.paletteAppClip.input=e.payload,n.paletteAppClip.output=void 0},closePaletteAppClip:n=>{n.paletteAppClip.input=void 0},onPaletteAppClipEmit:(n,e)=>{n.paletteAppClip.input=void 0,n.paletteAppClip.output=e.payload},setMasterNodesCount:(n,e)=>{n.masterNodesCount=e.payload},setParallelLinesCount:(n,e)=>{n.parallelLinesCount=e.payload},setGlobalAlert:(n,e)=>{const{status:r,message:i,url:o,linkedApp:a}=e.payload;n.globalAlerts[r]={message:i,url:o,linkedApp:a}},closeGlobalAlert:(n,e)=>{delete n.globalAlerts[e.payload]}},extraReducers:n=>{n.addCase(Cl,e=>{e.refresh.nodes=Date.now(),e.refresh.edges=Date.now()}).addCase(Al,e=>{e.refresh.nodes=Date.now(),e.refresh.edges=Date.now()})}}),{setMasterNodesCount:E0,setParallelLinesCount:O0}=Lo.actions,{setSelected:Mo,addSelected:_x,removeSelected:Nx,clearSelected:Rx,setActive:kx,setRefreshNodes:L0,setRefreshEdges:M0,setMode:Cx,setKeepLastPath:Ax,setTheme:Tx,openPaletteAppClip:j0,closePaletteAppClip:$0,onPaletteAppClipEmit:P0,setGlobalAlert:jo,closeGlobalAlert:Ex}=Lo.actions,I0=Lo.reducer,$o=(n,e,r)=>e===0?n:D0(n,e);function D0(n,e,r){function i(O,P,W){var ae=P.x-O.x,ee=P.y-O.y,X=Math.sqrt(ae*ae+ee*ee);return o(O,P,Math.min(1,W/X))}function o(O,P,W){return{x:O.x+(P.x-O.x)*W,y:O.y+(P.y-O.y)*W}}function a(O,P){O.length>2&&(O[O.length-2]=P.x,O[O.length-1]=P.y)}function s(O){return{x:parseFloat(O[O.length-2]),y:parseFloat(O[O.length-1])}}var l=n.split(/[,\s]/).reduce(function(O,P){var W=P.match("([a-zA-Z])(.+)");return W?(O.push(W[1]),O.push(W[2])):O.push(P),O},[]),c=l.reduce(function(O,P){return parseFloat(P)==P&&O.length?O[O.length-1].push(P):O.push([P]),O},[]),u=[];if(c.length>1){var d=s(c[0]),h=null;c[c.length-1][0]=="Z"&&c[0].length>2&&(h=["L",d.x,d.y],c[c.length-1]=h),u.push(c[0]);for(var p=1;p2&&y[0]=="L"&&w.length>2&&w[0]=="L"){var _=s(g),S=s(y),R=s(w),j,M;j=i(S,_,e),M=i(S,R,e),a(y,j),y.origPoint=S,u.push(y);var A=o(j,S,.5),F=o(S,M,.5),T=["C",A.x,A.y,F.x,F.y,M.x,M.y];T.origPoint=S,u.push(T)}else u.push(y)}if(h){var G=s(u[u.length-1]);u.push(["Z"]),a(u[0],G)}}else u=c;return u.reduce(function(O,P){return O+P.join(" ")+" "},"")}const B0=(n,e,r,i,o=yt)=>{const{startFrom:a=yt.startFrom,offsetFrom:s=yt.offsetFrom,offsetTo:l=yt.offsetTo,roundCornerFactor:c=yt.roundCornerFactor}=o,[u,d,h,p]=a==="from"?[n,r,e,i]:[e,i,n,r],g=Math.abs(h-u)0?-1:1):M,O=g==="horizontal"?A:T+Math.abs(F-M)*(T-A>0?-1:1),[P,W,ae,ee]=a==="from"?[M,A,F,T]:[F,T,M,A];return $o("M ".concat(P," ").concat(W," L ").concat(G," ").concat(O," L ").concat(ae," ").concat(ee),c)},yt={startFrom:"from",offsetFrom:0,offsetTo:0,roundCornerFactor:10},z0=n=>{var h,p,g;const{id:e,attrs:r,handleAttrsUpdate:i,recalculateParallelIndex:o,parallelIndex:a}=n,{t:s}=Te(),l=Vt(),c=Oo(window.graph,N.Diagonal,e),u=a>=0&&c!==e,d=[{type:"select",label:s("panel.details.lines.common.startFrom"),value:r.startFrom,options:{from:s("panel.details.lines.common.from"),to:s("panel.details.lines.common.to")},onChange:y=>{o(e,y),r.startFrom=y,i(e,r)},minW:"full"},{type:"input",label:s("panel.details.lines.common.offsetFrom"),value:((h=r.offsetFrom)!=null?h:yt.offsetFrom).toString(),variant:"number",onChange:y=>{Number.isNaN(y)&&(y="0"),r.offsetFrom=Number(y),i(e,r)},isDisabled:u,minW:"full"},{type:"input",label:s("panel.details.lines.common.offsetTo"),value:((p=r.offsetTo)!=null?p:yt.offsetTo).toString(),variant:"number",onChange:y=>{Number.isNaN(y)&&(y="0"),r.offsetTo=Number(y),i(e,r)},isDisabled:u,minW:"full"},{type:"input",label:s("panel.details.lines.common.roundCornerFactor"),value:((g=r==null?void 0:r.roundCornerFactor)!=null?g:yt.roundCornerFactor).toString(),variant:"number",onChange:y=>{(Number.isNaN(y)||Number(y)<0)&&(y="0"),r.roundCornerFactor=Number(y),i(e,r)},isDisabled:u,minW:"full"}];return u&&d.unshift({type:"custom",label:s("panel.details.lines.common.parallelDisabled"),component:m.jsxs(dn,{size:"sm",variant:"link",onClick:()=>l(Mo(new Set([c]))),children:[s("panel.details.lines.common.changeInBaseLine")," ",c]})}),m.jsx(Ee,{fields:d})},F0=m.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:m.jsx("path",{d:"M9,18V12L15,6",stroke:"currentColor",fill:"none"})}),G0={generatePath:B0,icon:F0,defaultAttrs:yt,attrsComponent:z0,metadata:{displayName:"panel.details.lines.diagonal.displayName"}},U0=(n,e,r,i,o=bt)=>{const{startFrom:a=bt.startFrom,offsetFrom:s=bt.offsetFrom,offsetTo:l=bt.offsetTo,roundCornerFactor:c=bt.roundCornerFactor}=o,[u,d]=a==="from"?[s,l]:[l,s],[h,p,g,y]=a==="from"?[0,u,d,0]:[u,0,0,d],w=a==="from"?e+g:n+h,_=a==="from"?r+p:i+y;return $o("M ".concat(n+h," ").concat(r+p," L ").concat(w," ").concat(_," L ").concat(e+g," ").concat(i+y),c)},bt={startFrom:"from",offsetFrom:0,offsetTo:0,roundCornerFactor:18.33},W0=n=>{var h,p,g;const{id:e,attrs:r,handleAttrsUpdate:i,recalculateParallelIndex:o,parallelIndex:a}=n,{t:s}=Te(),l=Vt(),c=Oo(window.graph,N.Perpendicular,e),u=a>=0&&c!==e,d=[{type:"select",label:s("panel.details.lines.common.startFrom"),value:r.startFrom,options:{from:s("panel.details.lines.common.from"),to:s("panel.details.lines.common.to")},onChange:y=>{o(e,y),r.startFrom=y,i(e,r)},minW:"full"},{type:"input",label:s("panel.details.lines.common.offsetFrom"),value:((h=r.offsetFrom)!=null?h:bt.offsetFrom).toString(),variant:"number",onChange:y=>{Number.isNaN(y)&&(y="0"),r.offsetFrom=Number(y),i(e,r)},isDisabled:u,minW:"full"},{type:"input",label:s("panel.details.lines.common.offsetTo"),value:((p=r.offsetTo)!=null?p:bt.offsetTo).toString(),variant:"number",onChange:y=>{Number.isNaN(y)&&(y="0"),r.offsetTo=Number(y),i(e,r)},isDisabled:u,minW:"full"},{type:"input",label:s("panel.details.lines.common.roundCornerFactor"),value:((g=r==null?void 0:r.roundCornerFactor)!=null?g:bt.roundCornerFactor).toString(),variant:"number",onChange:y=>{(Number.isNaN(y)||Number(y)<0)&&(y="0"),r.roundCornerFactor=Number(y),i(e,r)},isDisabled:u,minW:"full"}];return u&&d.unshift({type:"custom",label:s("panel.details.lines.common.parallelDisabled"),component:m.jsxs(dn,{size:"sm",variant:"link",onClick:()=>l(Mo(new Set([c]))),children:[s("panel.details.lines.common.changeInBaseLine")," ",c]})}),m.jsx(Ee,{fields:d})},V0=m.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:m.jsx("path",{d:"M6,6H18V18",stroke:"currentColor",fill:"none"})}),H0={generatePath:U0,icon:V0,defaultAttrs:bt,attrsComponent:W0,metadata:{displayName:"panel.details.lines.perpendicular.displayName"}},J0=(n,e,r,i,o=vt)=>{const{startFrom:a=vt.startFrom,offsetFrom:s=vt.offsetFrom,offsetTo:l=vt.offsetTo,roundCornerFactor:c=vt.roundCornerFactor}=o,[u,d]=a==="from"?[s,l]:[l,s],[h,p,g,y]=a==="from"?[0,u,d,0]:[u,0,0,d],[w,_,S,R]=[n*Math.SQRT1_2+r*Math.SQRT1_2,-n*Math.SQRT1_2+r*Math.SQRT1_2,e*Math.SQRT1_2+i*Math.SQRT1_2,-e*Math.SQRT1_2+i*Math.SQRT1_2],[j,M,A,F]=[w+h,_+p,S+g,R+y],[T,G,O,P]=[j*Math.SQRT1_2-M*Math.SQRT1_2,j*Math.SQRT1_2+M*Math.SQRT1_2,A*Math.SQRT1_2-F*Math.SQRT1_2,A*Math.SQRT1_2+F*Math.SQRT1_2],W=a==="from"?S+g:w+h,ae=a==="from"?_+p:R+y,[ee,X]=[W*Math.SQRT1_2-ae*Math.SQRT1_2,W*Math.SQRT1_2+ae*Math.SQRT1_2];return $o("M ".concat(T," ").concat(G," L ").concat(ee," ").concat(X," L ").concat(O," ").concat(P),c)},vt={startFrom:"from",offsetFrom:0,offsetTo:0,roundCornerFactor:18.33},K0=n=>{var h,p,g;const{id:e,attrs:r,handleAttrsUpdate:i,recalculateParallelIndex:o,parallelIndex:a}=n,{t:s}=Te(),l=Vt(),c=Oo(window.graph,N.RotatePerpendicular,e),u=a>=0&&c!==e,d=[{type:"select",label:s("panel.details.lines.common.startFrom"),value:r.startFrom,options:{from:s("panel.details.lines.common.from"),to:s("panel.details.lines.common.to")},onChange:y=>{o(e,y),r.startFrom=y,i(e,r)},minW:"full"},{type:"input",label:s("panel.details.lines.common.offsetFrom"),value:((h=r.offsetFrom)!=null?h:vt.offsetFrom).toString(),variant:"number",onChange:y=>{Number.isNaN(y)&&(y="0"),r.offsetFrom=Number(y),i(e,r)},isDisabled:u,minW:"full"},{type:"input",label:s("panel.details.lines.common.offsetTo"),value:((p=r.offsetTo)!=null?p:vt.offsetTo).toString(),variant:"number",onChange:y=>{Number.isNaN(y)&&(y="0"),r.offsetTo=Number(y),i(e,r)},isDisabled:u,minW:"full"},{type:"input",label:s("panel.details.lines.common.roundCornerFactor"),value:((g=r==null?void 0:r.roundCornerFactor)!=null?g:vt.roundCornerFactor).toString(),variant:"number",onChange:y=>{(Number.isNaN(y)||Number(y)<0)&&(y="0"),r.roundCornerFactor=Number(y),i(e,r)},isDisabled:u,minW:"full"}];return u&&d.unshift({type:"custom",label:s("panel.details.lines.common.parallelDisabled"),component:m.jsxs(dn,{size:"sm",variant:"link",onClick:()=>l(Mo(new Set([c]))),children:[s("panel.details.lines.common.changeInBaseLine")," ",c]})}),m.jsx(Ee,{fields:d})},Y0=m.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:m.jsx("path",{d:"M9,6L15,12L9,18",stroke:"currentColor",fill:"none"})}),q0={generatePath:J0,icon:Y0,defaultAttrs:vt,attrsComponent:K0,metadata:{displayName:"panel.details.lines.rotatePerpendicular.displayName"}};var H=(n=>(n.ShmetroBasic="shmetro-basic",n.ShmetroBasic2020="shmetro-basic-2020",n.ShmetroInt="shmetro-int",n.ShmetroOutOfSystemInt="shmetro-osysi",n.ShanghaiSuburbanRailway="sh-sub-rwy",n.GzmtrBasic="gzmtr-basic",n.GzmtrInt="gzmtr-int",n.GzmtrInt2024="gzmtr-int-2024",n.BjsubwayBasic="bjsubway-basic",n.BjsubwayInt="bjsubway-int",n.MTR="mtr",n.SuzhouRTBasic="suzhourt-basic",n.SuzhouRTInt="suzhourt-int",n.KunmingRTBasic="kunmingrt-basic",n.KunmingRTInt="kunmingrt-int",n.MRTBasic="mrt-basic",n.MRTInt="mrt-int",n.JREastBasic="jr-east-basic",n.JREastImportant="jr-east-imp",n.FoshanMetroBasic="foshan-metro-basic",n.QingdaoMetroStation="qingdao-metro-basic",n.TokyoMetroBasic="tokyo-metro-basic",n.TokyoMetroInt="tokyo-metro-int",n.LondonTubeBasic="london-tube-basic",n.LondonTubeInt="london-tube-int",n.GuangdongIntercityRailway="gd-intercity-rwy",n))(H||{});const Ox=["shmetro-basic-2020","gzmtr-basic","suzhourt-basic","kunmingrt-basic","mrt-basic","foshan-metro-basic","qingdao-metro-basic"],Lx={names:["车站","Stn"]};class Q0{static hexToRgb(e){return[parseInt(e.slice(1,3),16),parseInt(e.slice(3,5),16),parseInt(e.slice(5,7),16)]}static fade(e,r){return"rgba(".concat([...this.hexToRgb(e),r].join(","),")")}static euclideanDistance(e,r){return this.hexToRgb(e).reduce((i,o,a)=>i+Math.pow(o-this.hexToRgb(r)[a],2),0)}}function Mx(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"},child:[]}]})(n)}function jx(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"},child:[]}]})(n)}function $x(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"},child:[]}]})(n)}function Px(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 14h-3v3h-2v-3H8v-2h3v-3h2v3h3v2zm-3-7V3.5L18.5 9H13z"},child:[]}]})(n)}function Ix(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 19H5V5h7V3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"},child:[]}]})(n)}function Dx(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"},child:[]}]})(n)}function Bx(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58a.49.49 0 0 0 .12-.61l-1.92-3.32a.488.488 0 0 0-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54a.484.484 0 0 0-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58a.49.49 0 0 0-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"},child:[]}]})(n)}function zx(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12.87 15.07-2.54-2.51.03-.03A17.52 17.52 0 0 0 14.07 6H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7 1.62-4.33L19.12 17h-3.24z"},child:[]}]})(n)}function Fx(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"},child:[]},{tag:"path",attr:{d:"M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z"},child:[]}]})(n)}function Gx(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14zM7 9h5v1H7z"},child:[]}]})(n)}function Ux(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M13 7h9v2h-9zM13 15h9v2h-9zM16 11h6v2h-6zM13 12 8 7v4H2v2h6v4z"},child:[]}]})(n)}function Wx(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"},child:[]}]})(n)}function Vx(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"},child:[]}]})(n)}function Hx(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M3 13h2v-2H3v2zm4 8h2v-2H7v2zm6-18h-2v2h2V3zm6 0v2h2c0-1.1-.9-2-2-2zM5 21v-2H3c0 1.1.9 2 2 2zm-2-4h2v-2H3v2zm8 4h2v-2h-2v2zm8-8h2v-2h-2v2zm0-4h2V7h-2v2zm-4-4h2V3h-2v2zM7.83 5 7 4.17V3h2v2H7.83zm12 12-.83-.83V15h2v2h-1.17zm1.36 4.19L2.81 2.81 1.39 4.22 4.17 7H3v2h2V7.83l2 2V17h7.17l2 2H15v2h2v-1.17l2.78 2.78 1.41-1.42zM9 15v-3.17L12.17 15H9zm6-2.83V9h-3.17l-2-2H17v7.17l-2-2z"},child:[]}]})(n)}function Jx(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 0 1 7.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"},child:[]}]})(n)}function Kx(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M21 12.4V7l-4-4H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h7.4l8.6-8.6zM15 15c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3 3 1.34 3 3zM6 6h9v4H6V6zm13.99 10.25 1.77 1.77L16.77 23H15v-1.77l4.99-4.98zm3.26.26-.85.85-1.77-1.77.85-.85c.2-.2.51-.2.71 0l1.06 1.06c.2.2.2.52 0 .71z"},child:[]}]})(n)}function Yx(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M17 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V7l-4-4zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm3-10H5V5h10v4z"},child:[]}]})(n)}function qx(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"},child:[]}]})(n)}function Qx(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6zm7 7V3.5L18.5 9H13z"},child:[]}]})(n)}function Xx(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M5 20h14v-2H5v2zM19 9h-4V3H9v6H5l7 7 7-7z"},child:[]}]})(n)}function Zx(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M5 20h14v-2H5v2zm0-10h4v6h6v-6h4l-7-7-7 7z"},child:[]}]})(n)}function X0(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2z"},child:[]}]})(n)}function eS(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"},child:[]}]})(n)}function tS(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"},child:[]}]})(n)}function nS(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"},child:[]}]})(n)}function rS(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"},child:[]}]})(n)}function iS(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"},child:[]}]})(n)}function oS(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"},child:[]}]})(n)}function aS(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"},child:[]}]})(n)}function sS(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"},child:[]}]})(n)}function lS(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M5 13.18v4L12 21l7-3.82v-4L12 17l-7-3.82zM12 3 1 9l11 6 9-4.91V17h2V9L12 3z"},child:[]}]})(n)}function Z0(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M16 17.01V10h-2v7.01h-3L15 21l4-3.99h-3zM9 3 5 6.99h3V14h2V6.99h3L9 3zm7 14.01V10h-2v7.01h-3L15 21l4-3.99h-3zM9 3 5 6.99h3V14h2V6.99h3L9 3z"},child:[]}]})(n)}function ew(n){const{theme:e,onClick:r}=n,{t:i}=Te();return m.jsx(Er,{"aria-label":i("Color"),color:e[3],bg:e[2],size:"md",_hover:{bg:Q0.fade(e[2],.7)},icon:m.jsx(X0,{}),onClick:r})}const Ie=n=>{var R;const{type:e,colorKey:r="color",defaultTheme:i}=n,o=Vt(),{selected:a,paletteAppClip:{output:s}}=hi(j=>j.runtime),[l]=a,c=D.useCallback(()=>{o(Ur()),o(pn()),o(cn(u.current.export()))},[o,Ur,pn,cn]),u=D.useRef(window.graph),[d,h,p]=[].concat(Object.values(H)).concat(Object.values(st)).find(j=>e===j)?[u.current.hasNode,u.current.getNodeAttribute,u.current.mergeNodeAttributes]:[u.current.hasEdge,u.current.getEdgeAttribute,u.current.mergeEdgeAttributes],g=j=>{if(l&&d.bind(u.current)(l)){const M=h.bind(u.current)(l,e);M[r]=j,p.bind(u.current)(l,{[e]:M}),c()}},[y,w]=D.useState(!1);D.useEffect(()=>{y&&s&&(g(s),w(!1))},[s==null?void 0:s.toString()]);const S=l&&d.bind(u.current)(l)&&(l.startsWith("stn")||l.startsWith("misc_node")?u.current.getNodeAttribute(l,"type")===e:u.current.getEdgeAttribute(l,"style")===e)?((R=h.bind(u.current)(l,e))!=null?R:{[r]:i})[r]:i;return m.jsx(m.Fragment,{children:m.jsx(ew,{theme:S,onClick:()=>{w(!0),o(j0(S))}})})},tw=n=>{const{id:e,path:r,styleAttrs:i,newLine:o,handlePointerDown:a}=n,{color:s=Wr.color}=i!=null?i:Wr,l=D.useCallback(c=>a(e,c),[e,a]);return m.jsx("path",{id:e,d:r,fill:"none",stroke:s[2],strokeWidth:"5",strokeLinecap:"round",cursor:"pointer",onPointerDown:o?void 0:l,pointerEvents:o?"none":void 0})},Wr={color:[ye.Shanghai,"sh1","#E4002B",de.white]},nw=n=>{const e=[{type:"custom",label:"color",component:m.jsx(Ie,{type:U.SingleColor,defaultTheme:Wr.color})}];return m.jsx(Ee,{fields:e})},rw={component:tw,defaultAttrs:Wr,attrsComponent:nw,metadata:{displayName:"panel.details.lines.singleColor.displayName",supportLinePathType:[N.Diagonal,N.Perpendicular,N.RotatePerpendicular]}},iw=n=>{const{id:e,path:r,handlePointerDown:i}=n,o=D.useCallback(a=>i(e,a),[e,i]);return m.jsxs("g",{id:e,onPointerDown:o,cursor:"pointer",children:[m.jsx("path",{d:r,fill:"none",stroke:"black",strokeWidth:"7",strokeLinecap:"round"}),m.jsx("path",{d:r,fill:"none",stroke:"white",strokeWidth:"4.33",strokeLinecap:"round"})]})},ow={},aw=()=>{},sw={component:iw,defaultAttrs:ow,attrsComponent:aw,metadata:{displayName:"panel.details.lines.shmetroVirtualInt.displayName",supportLinePathType:[N.Diagonal,N.Perpendicular,N.RotatePerpendicular,N.Simple]}},lw=n=>{const{id:e,path:r,styleAttrs:i,handlePointerDown:o}=n,{isEnd:a=El.isEnd}=i,s=D.useCallback(c=>o(e,c),[e,o]),l=a?"round":void 0;return m.jsxs("g",{id:e,onPointerDown:s,cursor:"pointer",children:[m.jsx("path",{d:r,fill:"none",stroke:"#666464",strokeWidth:"5",strokeLinecap:l}),m.jsx("path",{d:r,fill:"none",stroke:"white",strokeWidth:"2",strokeLinecap:"round"})]})},El={isEnd:!1},cw=n=>{const{id:e,attrs:r,handleAttrsUpdate:i}=n,{t:o}=Te(),a=[{type:"switch",label:o("panel.details.lines.shanghaiSuburbanRailway.isEnd"),isChecked:r.isEnd,onChange:s=>{r.isEnd=s,i(e,r)},oneLine:!0,minW:"full"}];return m.jsx(Ee,{fields:a})},uw={component:lw,defaultAttrs:El,attrsComponent:cw,metadata:{displayName:"panel.details.lines.shanghaiSuburbanRailway.displayName",supportLinePathType:[N.Diagonal,N.Perpendicular,N.RotatePerpendicular]}},dw=n=>{const{id:e,path:r,handlePointerDown:i}=n,o=D.useCallback(a=>i(e,a),[e,i]);return m.jsx("path",{id:e,d:r,fill:"none",stroke:"#565656",strokeWidth:"3",strokeDasharray:"3",cursor:"pointer",onPointerDown:o})},hw={},pw=()=>null,fw={component:dw,defaultAttrs:hw,attrsComponent:pw,metadata:{displayName:"panel.details.lines.gzmtrVirtualInt.displayName",supportLinePathType:[N.Diagonal,N.Perpendicular,N.RotatePerpendicular,N.Simple]}},gw=n=>{const{id:e,path:r,styleAttrs:i,handlePointerDown:o}=n,{color:a=Vr.color}=i!=null?i:Vr,s=D.useCallback(l=>o(e,l),[e,o]);return m.jsxs("g",{id:e,onPointerDown:s,cursor:"pointer",children:[m.jsx("path",{d:r,fill:"none",stroke:a[2],strokeWidth:"5",strokeLinecap:"round"}),m.jsx("path",{d:r,fill:"none",stroke:a[3],strokeWidth:"4.67",strokeDasharray:"17.5"})]})},Vr={color:[ye.Shanghai,"jsr","#000000",de.white]},mw=n=>{const{t:e}=Te(),r=[{type:"custom",label:e("color"),component:m.jsx(Ie,{type:U.ChinaRailway,defaultTheme:Vr.color})}];return m.jsx(Ee,{fields:r})},yw={component:gw,defaultAttrs:Vr,attrsComponent:mw,metadata:{displayName:"panel.details.lines.chinaRailway.displayName",supportLinePathType:[N.Diagonal,N.Perpendicular,N.RotatePerpendicular]}},bw=n=>{const{id:e,path:r,styleAttrs:i,handlePointerDown:o}=n,{color:a=Hr.color}=i!=null?i:Hr,s=D.useCallback(l=>o(e,l),[e,o]);return m.jsxs("g",{id:e,onPointerDown:s,cursor:"pointer",children:[m.jsx("path",{d:r,fill:"none",stroke:"white",strokeWidth:"6",strokeLinecap:"round"}),m.jsx("path",{d:r,fill:"none",stroke:a[2],strokeWidth:"5",strokeLinecap:"round"})]})},Hr={color:[ye.Beijing,"bj1","#c23a30",de.white]},vw=n=>{Te();const e=[{type:"custom",label:"color",component:m.jsx(Ie,{type:U.BjsubwaySingleColor,defaultTheme:Hr.color})}];return m.jsx(Ee,{fields:e})},ww={component:bw,defaultAttrs:Hr,attrsComponent:vw,metadata:{displayName:"panel.details.lines.bjsubwaySingleColor.displayName",supportLinePathType:[N.Diagonal,N.Perpendicular,N.RotatePerpendicular]}},tr=n=>{const{t:e}=Te(),r=Vt(),{selected:i}=hi(l=>l.runtime),[o]=i,a=D.useRef(window.graph),s=[];if(i.size===1&&a.current.hasNode(o)){const l=a.current.getNodeAttribute(o,"type"),c=a.current.getNodeAttribute(o,l);s.push(...n.fields.filter(u=>u.type!=="custom").map(u=>{var d,h,p;return{type:u.type,label:e(u.label),value:(d=u.value)==null?void 0:d.call(u,c),isChecked:(h=u.isChecked)==null?void 0:h.call(u,c),hidden:(p=u.hidden)==null?void 0:p.call(u,c),options:u.options,disabledOptions:u.disabledOptions&&u.disabledOptions(c),validator:u.validator,oneLine:u.oneLine,onChange:g=>{let y;try{y=u.onChange(g,c)}catch(w){r(jo({status:"error",message:e("err-code.".concat(w))}));return}a.current.mergeNodeAttributes(o,{[l]:y}),r(Ur()),r(cn(a.current.export()))}}}),...n.fields.filter(u=>u.type==="custom").map(u=>({...u,label:e(u.label)})))}if(i.size===1&&a.current.hasEdge(o)&&n.type!=="style"){const l=a.current.getEdgeAttribute(o,"type"),c=a.current.getEdgeAttribute(o,l);s.push(...n.fields.map(u=>({type:u.type,label:e(u.label),value:u.value(c),options:u.options,disabledOptions:u.disabledOptions&&u.disabledOptions(c),validator:u.validator,onChange:d=>{a.current.mergeEdgeAttributes(o,{[l]:u.onChange(d,c)}),r(pn()),r(cn(a.current.export()))}})))}if(i.size===1&&a.current.hasEdge(o)&&n.type==="style"){const l=a.current.getEdgeAttribute(o,"style"),c=a.current.getEdgeAttribute(o,l);s.push(...n.fields.filter(u=>u.type!=="custom").map(u=>({type:u.type,label:e(u.label),value:u.value(c),options:u.options,disabledOptions:u.disabledOptions&&u.disabledOptions(c),validator:u.validator,onChange:d=>{a.current.mergeEdgeAttributes(o,{[l]:u.onChange(d,c)}),r(pn()),r(cn(a.current.export()))}})),...n.fields.filter(u=>u.type==="custom").map(u=>({...u,label:e(u.label)})))}return m.jsx(Ee,{fields:s,minW:276})},xw=n=>{const{id:e,path:r,styleAttrs:i,handlePointerDown:o}=n,{color:a=Jr.color}=i!=null?i:Jr,s=D.useCallback(l=>o(e,l),[e,o]);return m.jsxs("g",{id:e,onPointerDown:s,cursor:"pointer",children:[m.jsx("path",{d:r,fill:"none",stroke:a[2],strokeWidth:"5"}),m.jsx("path",{d:r,fill:"none",stroke:"white",strokeWidth:"1.67"})]})},Jr={color:[ye.Beijing,"bj1","#c23a30",de.white]},Sw=[{type:"custom",label:"color",component:m.jsx(Ie,{type:U.BjsubwayTram,defaultTheme:Jr.color})}],_w=()=>m.jsx(tr,{fields:Sw,type:"style"}),Nw={component:xw,defaultAttrs:Jr,attrsComponent:_w,metadata:{displayName:"panel.details.lines.bjsubwayTram.displayName",supportLinePathType:[N.Diagonal,N.Perpendicular,N.RotatePerpendicular]}},Rw=n=>{const{id:e,type:r,path:i,styleAttrs:o,handlePointerDown:a}=n,{colorA:s=Ut.colorA,colorB:l=Ut.colorB}=o!=null?o:Ut,c=D.useCallback(g=>a(e,g),[e,a]),[u,d]=D.useState(i),[h,p]=D.useState(i);return D.useEffect(()=>{const g=xl(i,r,-1.25,1.25);g&&(d(g[0]),p(g[1]))},[i]),m.jsxs("g",{id:e,onPointerDown:c,cursor:"pointer",children:[m.jsx("path",{d:u,fill:"none",stroke:s[2],strokeWidth:"2.5",strokeLinecap:"round"}),m.jsx("path",{d:h,fill:"none",stroke:l[2],strokeWidth:"2.5",strokeLinecap:"round"})]})},Ut={colorA:[ye.Shanghai,"maglevA","#008B9A",de.white],colorB:[ye.Shanghai,"maglevB","#F5A74E",de.white]},kw=()=>{const{t:n}=Te(),e=Vt(),{selected:r}=hi(a=>a.runtime),[i]=r,o=D.useRef(window.graph);return m.jsx(Er,{"aria-label":n("panel.details.lines.dualColor.swap"),icon:m.jsx(Z0,{}),size:"sm",onClick:()=>{var l;const a=(l=o.current.getEdgeAttribute(i,U.DualColor))!=null?l:Ut,s=a.colorA;a.colorA=a.colorB,a.colorB=s,o.current.mergeEdgeAttributes(i,{[U.DualColor]:a}),e(pn()),e(cn(o.current.export()))}})},Cw=n=>{const e=[{type:"custom",label:"panel.details.lines.dualColor.swap",component:m.jsx(kw,{})},{type:"custom",label:"panel.details.lines.dualColor.colorA",component:m.jsx(Ie,{type:U.DualColor,colorKey:"colorA",defaultTheme:Ut.colorA})},{type:"custom",label:"panel.details.lines.dualColor.colorB",component:m.jsx(Ie,{type:U.DualColor,colorKey:"colorB",defaultTheme:Ut.colorB})}];return m.jsx(Ee,{fields:e})},Aw={component:Rw,defaultAttrs:Ut,attrsComponent:Cw,metadata:{displayName:"panel.details.lines.dualColor.displayName",supportLinePathType:[N.Diagonal,N.Perpendicular,N.RotatePerpendicular]}},Tw=n=>{const{id:e,path:r,styleAttrs:i,handlePointerDown:o}=n,{color:a=un.color,width:s=un.width}=i!=null?i:un,l=D.useCallback(c=>o(e,c),[e,o]);return m.jsx("path",{id:e,d:r,fill:"none",stroke:a[2],strokeWidth:s,strokeLinecap:"round",cursor:"pointer",onPointerDown:l})},un={color:[ye.Shanghai,"river","#B9E3F9",de.white],width:20},Ew=[{type:"input",label:"panel.details.lines.river.width",variant:"number",value:n=>(n!=null?n:un).width,onChange:(n,e)=>{const r=e!=null?e:un;return r.width=Number(n),r}}],Ow=()=>m.jsx(tr,{fields:Ew,type:"style"}),Lw={component:Tw,defaultAttrs:un,attrsComponent:Ow,metadata:{displayName:"panel.details.lines.river.displayName",supportLinePathType:[N.Diagonal,N.Perpendicular,N.RotatePerpendicular,N.Simple]}},Mw=n=>{const{id:e,path:r,styleAttrs:i,handlePointerDown:o}=n,{color:a=Kr.color}=i!=null?i:Kr,s=D.useCallback(l=>o(e,l),[e,o]);return m.jsx("path",{id:e,d:r,fill:"none",stroke:a[2],strokeWidth:"5",strokeLinecap:"butt",strokeDasharray:"5 2.5",cursor:"pointer",onPointerDown:s})},Kr={color:[ye.Hongkong,"twl","#E2231A",de.white]},jw=[{type:"custom",label:"color",component:m.jsx(Ie,{type:U.MTRRaceDays,defaultTheme:Kr.color})}],$w=()=>m.jsx(tr,{fields:jw,type:"style"}),Pw={component:Mw,defaultAttrs:Kr,attrsComponent:$w,metadata:{displayName:"panel.details.lines.mtrRaceDays.displayName",supportLinePathType:[N.Diagonal,N.Perpendicular,N.RotatePerpendicular]}},Iw=n=>{const{id:e,path:r,styleAttrs:i,handlePointerDown:o}=n,{color:a=Yr.color}=i!=null?i:Yr,s=D.useCallback(l=>o(e,l),[e,o]);return m.jsx("path",{id:e,d:r,fill:"none",stroke:a[2],strokeWidth:"2.5",strokeLinecap:"round",cursor:"pointer",onPointerDown:s})},Yr={color:[ye.Hongkong,"lrl","#CD9700",de.white]},Dw=[{type:"custom",label:"color",component:m.jsx(Ie,{type:U.MTRLightRail,defaultTheme:Yr.color})}],Bw=()=>m.jsx(tr,{fields:Dw,type:"style"}),zw={component:Iw,defaultAttrs:Yr,attrsComponent:Bw,metadata:{displayName:"panel.details.lines.mtrLightRail.displayName",supportLinePathType:[N.Diagonal,N.Perpendicular,N.RotatePerpendicular]}},Fw=n=>{const{id:e,path:r,handlePointerDown:i}=n,o=D.useCallback(a=>i(e,a),[e,i]);return m.jsx("path",{id:e,d:r,fill:"none",stroke:"black",strokeWidth:"1.33",strokeDasharray:"2.66 1.33",cursor:"pointer",onPointerDown:o})},Gw={},Uw=()=>{},Ww={component:Fw,defaultAttrs:Gw,attrsComponent:Uw,metadata:{displayName:"panel.details.lines.mtrUnpaidArea.displayName",supportLinePathType:[N.Diagonal,N.Perpendicular,N.RotatePerpendicular,N.Simple]}},Vw=n=>{const{id:e,path:r,handlePointerDown:i}=n,o=D.useCallback(a=>i(e,a),[e,i]);return m.jsx("path",{id:e,d:r,fill:"none",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",cursor:"pointer",onPointerDown:o})},Hw={},Jw=()=>m.jsx(tr,{fields:[],type:"style"}),Kw={component:Vw,defaultAttrs:Hw,attrsComponent:Jw,metadata:{displayName:"panel.details.lines.mtrPaidArea.displayName",supportLinePathType:[N.Diagonal,N.Perpendicular,N.RotatePerpendicular,N.Simple]}},Yw=n=>{const{id:e,path:r,styleAttrs:i,handlePointerDown:o}=n,{color:a=qr.color}=i!=null?i:qr,s=D.useCallback(c=>o(e,c),[e,o]),l=Ya("white","var(--chakra-colors-gray-800)");return m.jsxs("g",{id:e,onPointerDown:s,cursor:"pointer",children:[m.jsx("path",{d:r,fill:"none",stroke:a[2],strokeWidth:"5",strokeDasharray:"2 2"}),m.jsx("path",{d:r,fill:"none",stroke:l,strokeWidth:"3.4"})]})},qr={color:[ye.Beijing,"bj1","#c23a30",de.white]},qw=n=>{Te();const e=[{type:"custom",label:"color",component:m.jsx(Ie,{type:U.BjsubwayDotted,defaultTheme:qr.color})}];return m.jsx(Ee,{fields:e})},Qw={component:Yw,defaultAttrs:qr,attrsComponent:qw,metadata:{displayName:"panel.details.lines.bjsubwayDotted.displayName",supportLinePathType:[N.Diagonal,N.Perpendicular,N.RotatePerpendicular]}},Xw=n=>{const{id:e,path:r,styleAttrs:i,handlePointerDown:o}=n,{color:a=Qr.color}=i!=null?i:Qr,s=D.useCallback(l=>o(e,l),[e,o]);return m.jsx("path",{id:e,d:r,fill:"none",stroke:a[2],strokeWidth:"5",strokeDasharray:"0 10",strokeLinecap:"round",cursor:"pointer",onPointerDown:s})},Qr={color:[ye.Singapore,"ewl","#009739",de.white]},Zw=n=>{Te();const e=[{type:"custom",label:"color",component:m.jsx(Ie,{type:U.MRTUnderConstruction,defaultTheme:Qr.color})}];return m.jsx(Ee,{fields:e})},e1={component:Xw,defaultAttrs:Qr,attrsComponent:Zw,metadata:{displayName:"panel.details.lines.mrtUnderConstruction.displayName",supportLinePathType:[N.Diagonal,N.Perpendicular,N.RotatePerpendicular]}},t1=n=>{const{id:e,path:r,handlePointerDown:i}=n,o=D.useCallback(a=>i(e,a),[e,i]);return m.jsx("path",{id:e,d:r,fill:"none",stroke:"black",strokeWidth:"5",strokeDasharray:"0 10 10 10",strokeLinecap:"round",cursor:"pointer",onPointerDown:o})},n1={},r1=n=>null,i1={component:t1,defaultAttrs:n1,attrsComponent:r1,metadata:{displayName:"panel.details.lines.mrtSentosaExpress.displayName",supportLinePathType:[N.Diagonal,N.Perpendicular,N.RotatePerpendicular]}},o1=n=>{const{id:e,path:r,styleAttrs:i,newLine:o,handlePointerDown:a}=n,{color:s=Xr.color}=i!=null?i:Xr,l=D.useCallback(c=>a(e,c),[e,a]);return m.jsxs("g",{id:e,onPointerDown:l,cursor:"pointer",children:[m.jsx("path",{d:r,fill:"none",stroke:"black",strokeWidth:"5.1"}),m.jsx("path",{d:r,fill:"none",stroke:s[2],strokeWidth:"4.9"})]})},Xr={color:[ye.Tokyo,"jy","#9ACD32",de.black]},a1=n=>{const{t:e}=Te(),r=[{type:"custom",label:e("color"),component:m.jsx(Ie,{type:U.JREastSingleColor,defaultTheme:Xr.color})}];return m.jsx(Ee,{fields:r})},s1={component:o1,defaultAttrs:Xr,attrsComponent:a1,metadata:{displayName:"panel.details.lines.jrEastSingleColor.displayName",supportLinePathType:[N.Diagonal,N.Perpendicular,N.RotatePerpendicular]}},l1=5,Le=l1*Math.SQRT1_2,no=.25,wr=(Le*Math.SQRT2-no)/2*Math.SQRT2,c1=n=>{const{id:e,type:r,path:i,styleAttrs:o,newLine:a,handlePointerDown:s}=n,{color:l=Zr.color}=o!=null?o:Zr,c=D.useCallback(h=>s(e,h),[e,s]),[u,d]=D.useState({outline:i,pA:i,pB:i});return D.useEffect(()=>{const h=d0(i,r,-2.5,2.5);h&&d(h)},[i]),m.jsxs("g",{id:e,onPointerDown:c,cursor:"pointer",children:[m.jsxs("defs",{children:[m.jsxs("clipPath",{id:"jr_east_fill_pattern_clip_path",patternUnits:"userSpaceOnUse",children:[m.jsx("polygon",{points:"0,0 0,".concat(wr," ").concat(wr,",0")}),m.jsx("polygon",{points:"".concat(Le,",").concat(Le," ").concat(Le-wr,",").concat(Le," ").concat(Le,",").concat(Le-wr)})]}),m.jsxs("pattern",{id:"jr_east_".concat(e,"_fill_pattern_").concat(l[2]),width:Le,height:Le,patternUnits:"userSpaceOnUse",children:[m.jsx("rect",{width:Le,height:Le,fill:l[2]}),m.jsx("line",{x1:"0",y1:"0",x2:Le,y2:Le,stroke:"white",strokeWidth:no,strokeOpacity:"50%",clipPath:"url(#jr_east_fill_pattern_clip_path)"}),m.jsx("line",{x1:Le,y1:"0",x2:"0",y2:Le,stroke:"white",strokeWidth:no,strokeOpacity:"50%"})]})]}),m.jsx("path",{d:u.outline,fill:"url(#jr_east_".concat(e,"_fill_pattern_").concat(l[2],")")}),m.jsx("path",{d:u.pA,fill:"none",stroke:"black",strokeWidth:"0.1"}),m.jsx("path",{d:u.pB,fill:"none",stroke:"black",strokeWidth:"0.1"})]})},Zr={color:[ye.Tokyo,"jy","#9ACD32",de.black]},u1=n=>{const{t:e}=Te(),r=[{type:"custom",label:e("color"),component:m.jsx(Ie,{type:U.JREastSingleColorPattern,defaultTheme:Zr.color})}];return m.jsx(Ee,{fields:r})},d1={component:c1,defaultAttrs:Zr,attrsComponent:u1,metadata:{displayName:"panel.details.lines.jrEastSingleColorPattern.displayName",supportLinePathType:[N.Diagonal,N.Perpendicular,N.RotatePerpendicular]}},h1=n=>{const{id:e,path:r,styleAttrs:i,handlePointerDown:o}=n,{color:a=ei.color}=i!=null?i:ei,s=D.useCallback(l=>o(e,l),[e,o]);return m.jsx("path",{id:e,d:r,fill:"none",stroke:a[2],strokeWidth:"2.157",strokeLinecap:"round",cursor:"pointer",onPointerDown:s})},ei={color:[ye.Singapore,"lrt","#708573",de.white]},p1=n=>{const e=[{type:"custom",label:"color",component:m.jsx(Ie,{type:U.LRTSingleColor,defaultTheme:ei.color})}];return m.jsx(Ee,{fields:e})},f1={component:h1,defaultAttrs:ei,attrsComponent:p1,metadata:{displayName:"panel.details.lines.lrtSingleColor.displayName",supportLinePathType:[N.Diagonal,N.Perpendicular,N.RotatePerpendicular]}},Ft=5,g1=n=>{const{id:e,path:r,handlePointerDown:i}=n,o=D.useCallback(a=>i(e,a),[e,i]);return m.jsx("g",{id:e,onPointerDown:o,cursor:"pointer",children:m.jsx("path",{d:r,fill:"none",stroke:"black",strokeWidth:"7.5",strokeLinecap:"round"})})},Pa=(n,e)=>{var r,i;if(n===H.LondonTubeBasic){const{stepFreeAccess:o}=(r=e[H.LondonTubeBasic])!=null?r:{stepFreeAccess:"none"};if(o!=="none")return 1.5*Ft}if(n===H.LondonTubeInt){const{stepFreeAccess:o}=(i=e[H.LondonTubeInt])!=null?i:{stepFreeAccess:"none"};if(o!=="none")return 1.5*Ft}return Ft},m1=n=>{const{id:e,path:r,handlePointerDown:i}=n,o=D.useCallback(S=>i(e,S),[e,i]),[a,s]=window.graph.extremities(e),l=window.graph.getNodeAttribute(a,"x"),c=window.graph.getNodeAttribute(a,"y"),u=window.graph.getNodeAttribute(s,"x"),d=window.graph.getNodeAttribute(s,"y"),h=Math.min(l,u)-2*Ft,p=Math.min(c,d)-2*Ft,g=Math.abs(l-u)+4*Ft,y=Math.abs(c-d)+4*Ft,w=Pa(window.graph.getNodeAttribute(a,"type"),window.graph.getNodeAttributes(a)),_=Pa(window.graph.getNodeAttribute(s,"type"),window.graph.getNodeAttributes(s));return m.jsxs("g",{id:"".concat(e,".post"),onPointerDown:o,cursor:"pointer",children:[m.jsxs("mask",{id:"tube_stn_icon_inner_".concat(e),x:h,y:p,width:g,height:y,maskUnits:"userSpaceOnUse",children:[m.jsx("rect",{x:h,y:p,width:g,height:y,fill:"white"}),m.jsx("circle",{cx:l,cy:c,r:w-.05,fill:"black"}),m.jsx("circle",{cx:u,cy:d,r:_-.05,fill:"black"})]}),m.jsx("path",{d:r,fill:"none",stroke:"white",strokeWidth:"2.5",strokeLinecap:"round",mask:"url(#tube_stn_icon_inner_".concat(e,")")})]})},y1={},b1=()=>{},v1={component:g1,postComponent:m1,defaultAttrs:y1,attrsComponent:b1,metadata:{displayName:"panel.details.lines.londonTubeInternalInt.displayName",supportLinePathType:[N.Diagonal,N.Perpendicular,N.RotatePerpendicular]}},w1=n=>{const{id:e,path:r,handlePointerDown:i}=n,o=D.useCallback(a=>i(e,a),[e,i]);return m.jsx("path",{d:r,fill:"none",stroke:"black",strokeWidth:"5",strokeDasharray:"5 2.5",cursor:"pointer",onPointerDown:o})},x1={},S1=()=>{},_1={component:w1,defaultAttrs:x1,attrsComponent:S1,metadata:{displayName:"panel.details.lines.londonTube10MinWalk.displayName",supportLinePathType:[N.Diagonal,N.Perpendicular,N.RotatePerpendicular]}},N1=n=>{const{id:e,path:r,styleAttrs:i,handlePointerDown:o}=n,{color:a=ti.color}=i!=null?i:ti,s=D.useCallback(l=>o(e,l),[e,o]);return m.jsx("path",{id:e,d:r,fill:"none",stroke:a[2],strokeWidth:"5",cursor:"pointer",onPointerDown:s})},ti={color:[ye.London,"central","#DC241F",de.white]},R1=n=>{const{t:e}=Te(),r=[{type:"custom",label:e("color"),component:m.jsx(Ie,{type:U.LondonTubeTerminal,defaultTheme:ti.color})}];return m.jsx(Ee,{fields:r})},k1={component:N1,defaultAttrs:ti,attrsComponent:R1,metadata:{displayName:"panel.details.lines.londonTubeTerminal.displayName",supportLinePathType:[N.Diagonal,N.Perpendicular,N.RotatePerpendicular]}},C1=n=>{const{id:e,path:r,styleAttrs:i,handlePointerDown:o}=n,{color:a=ro.color}=i!=null?i:ro;console.log(i);const s=D.useCallback(l=>o(e,l),[e,o]);return m.jsxs("g",{id:e,onPointerDown:s,cursor:"pointer",children:[m.jsx("path",{d:r,fill:"none",stroke:a[2],strokeWidth:"5",strokeLinecap:"round"}),m.jsx("path",{d:r,fill:"none",stroke:a[3],strokeWidth:"2.5",strokeDasharray:"7.5"})]})},ro={color:[ye.Guangzhou,"ir","#2559a8",de.white]},A1=()=>{},T1={component:C1,defaultAttrs:ro,attrsComponent:A1,metadata:{displayName:"panel.details.lines.guangdongIntercityRailway.displayName",supportLinePathType:[N.Diagonal,N.Perpendicular,N.RotatePerpendicular]}},Ol={[N.Diagonal]:G0,[N.Perpendicular]:H0,[N.RotatePerpendicular]:q0,[N.Simple]:Cy},E1={[U.SingleColor]:rw,[U.ShmetroVirtualInt]:sw,[U.ShanghaiSuburbanRailway]:uw,[U.GzmtrVirtualInt]:fw,[U.ChinaRailway]:yw,[U.BjsubwaySingleColor]:ww,[U.BjsubwayTram]:Nw,[U.BjsubwayDotted]:Qw,[U.DualColor]:Aw,[U.River]:Lw,[U.MTRRaceDays]:Pw,[U.MTRLightRail]:zw,[U.MTRUnpaidArea]:Ww,[U.MTRPaidArea]:Kw,[U.MRTUnderConstruction]:e1,[U.MRTSentosaExpress]:i1,[U.JREastSingleColor]:s1,[U.JREastSingleColorPattern]:d1,[U.LRTSingleColor]:f1,[U.LondonTubeTerminal]:k1,[U.LondonTubeInternalInt]:v1,[U.LondonTube10MinWalk]:_1,[U.GuangdongIntercityRailway]:T1},O1=42,Ia=async()=>JSON.stringify((await yn(async()=>{const{default:n}=await import("./tutorial-B9Su1GrM.js");return{default:n}},[])).default),L1=async n=>{let e=!1;n||(n=await Ia(),e=!0);let r=JSON.parse(n);(!("version"in r)||!Number.isInteger(r.version))&&(r=JSON.parse(await Ia()),e=!0);let i=Number(r.version),o=JSON.stringify(r);for(;i in Da;)o=Da[i](o),i=Number(JSON.parse(o).version),e=!0;return e&&(console.warn("Upgrade save from version: ".concat(r.version," to version: ").concat(i)),localStorage.setItem(rt.PARAM_BACKUP,n)),o},M1=n=>{const{present:e,past:r,future:i,...o}=n,a={...o,graph:e,version:O1};return JSON.stringify(a)},Da={0:n=>{var e;return JSON.stringify({version:1,graph:(e=JSON.parse(n))==null?void 0:e.graph,svgViewBoxZoom:100,svgViewBoxMin:{x:0,y:0}})},1:n=>{const e=JSON.parse(n),r=new pe;return r.import(e==null?void 0:e.graph),r.filterNodes((i,o)=>i.startsWith("stn")&&o.type!==H.GzmtrInt).forEach(i=>{const o=r.getNodeAttribute(i,"type"),a=r.getNodeAttribute(i,o);a&&"transfer"in a&&delete a.transfer,r.mergeNodeAttributes(i,{[o]:a})}),JSON.stringify({...e,version:2,graph:r.export()})},2:n=>{const e=JSON.parse(n),r=new pe;return r.import(e==null?void 0:e.graph),r.filterNodes((i,o)=>i.startsWith("stn")).forEach(i=>{const o=r.getNodeAttribute(i,"type"),a=r.getNodeAttribute(i,o);(a==null?void 0:a.nameOffsetX)==="middle"&&(a==null?void 0:a.nameOffsetY)==="middle"&&(a.nameOffsetX="right",a.nameOffsetY="top"),(a==null?void 0:a.nameOffsetY)==="up"&&(a.nameOffsetY="top"),r.mergeNodeAttributes(i,{[o]:a})}),JSON.stringify({...e,version:3,graph:r.export()})},3:n=>{const e=JSON.parse(n),r=new pe;return r.import(e==null?void 0:e.graph),r.filterEdges((i,o,a,s,l,c,u)=>i.startsWith("line")).forEach(i=>{const o=r.getEdgeAttribute(i,"color");r.removeEdgeAttribute(i,"color"),r.mergeEdgeAttributes(i,{style:U.SingleColor,[U.SingleColor]:{color:o}})}),r.filterEdges((i,o,a,s,l,c,u)=>i.startsWith("misc_edge")).forEach(i=>{const o="line_".concat(_y(10)),[a,s]=r.extremities(i),l=r.getEdgeAttribute(i,"type"),c=l;r.addDirectedEdgeWithKey(o,a,s,{visible:!0,zIndex:0,type:N.Simple,[l]:structuredClone(Ol[N.Simple].defaultAttrs),style:c,[c]:structuredClone(E1[c].defaultAttrs),reconcileId:""}),r.dropEdge(i)}),JSON.stringify({...e,version:4,graph:r.export()})},4:n=>{const e=JSON.parse(n),r=new pe;return r.import(e==null?void 0:e.graph),r.filterNodes((i,o)=>i.startsWith("stn")&&(o.type===H.GzmtrBasic||o.type===H.GzmtrInt)).forEach(i=>{const o=r.getNodeAttribute(i,"type"),a=r.getNodeAttribute(i,o);a.open=!0,a.secondaryNames=["",""],r.mergeNodeAttributes(i,{[o]:a})}),JSON.stringify({...e,version:5,graph:r.export()})},5:n=>{const e=JSON.parse(n),r=new pe;return r.import(e==null?void 0:e.graph),r.filterEdges((i,o,a,s,l,c,u)=>i.startsWith("line")&&o.type===N.Simple).forEach(i=>{var a;const o=(a=r.getEdgeAttribute(i,N.Simple))!=null?a:{offset:0};o.offset=0,r.mergeEdgeAttributes(i,{[N.Simple]:o})}),JSON.stringify({...e,version:6,graph:r.export()})},6:n=>{const e=JSON.parse(n),r=new pe;return r.import(e==null?void 0:e.graph),r.filterNodes((i,o)=>i.startsWith("stn")&&o.type===H.GzmtrBasic).forEach(i=>{const o=r.getNodeAttribute(i,"type"),a=r.getNodeAttribute(i,o);a.tram=!1,r.mergeNodeAttributes(i,{[o]:a})}),JSON.stringify({...e,version:7,graph:r.export()})},7:n=>JSON.stringify({...JSON.parse(n),version:8}),8:n=>JSON.stringify({...JSON.parse(n),version:9}),9:n=>JSON.stringify({...JSON.parse(n),version:10}),10:n=>{const e=JSON.parse(n),r=new pe;return r.import(e==null?void 0:e.graph),r.filterNodes((i,o)=>i.startsWith("misc_node")&&o.type===st.Text).forEach(i=>{const o=r.getNodeAttribute(i,"type"),a=r.getNodeAttribute(i,o);a.color=[ye.Shanghai,"jsr","#000000",de.white],r.mergeNodeAttributes(i,{[o]:a})}),JSON.stringify({...e,version:11,graph:r.export()})},11:n=>JSON.stringify({...JSON.parse(n),version:12}),12:n=>{const e=JSON.parse(n),r=new pe;return r.import(e==null?void 0:e.graph),r.filterNodes((i,o)=>i.startsWith("misc_node")&&o.type===st.Text).forEach(i=>{const o=r.getNodeAttribute(i,"type"),a=r.getNodeAttribute(i,o);a.rotate=0,a.italic=!1,r.mergeNodeAttributes(i,{[o]:a})}),JSON.stringify({...e,version:13,graph:r.export()})},13:n=>JSON.stringify({...JSON.parse(n),version:14}),14:n=>JSON.stringify({...JSON.parse(n),version:15}),15:n=>{const e=JSON.parse(n),r=new pe;return r.import(e==null?void 0:e.graph),r.filterNodes((i,o)=>i.startsWith("misc_node")&&o.type===st.Text).forEach(i=>{const o=r.getNodeAttribute(i,"type"),a=r.getNodeAttribute(i,o);a.italic=a.italic?"italic":"normal",a.bold="normal",r.mergeNodeAttributes(i,{[o]:a})}),JSON.stringify({...e,version:16,graph:r.export()})},16:n=>{const e=JSON.parse(n),r=new pe;return r.import(e==null?void 0:e.graph),r.filterNodes((i,o)=>i.startsWith("misc_node")&&o.type===st.Facilities).forEach(i=>{const o=r.getNodeAttribute(i,"type"),a=r.getNodeAttribute(i,o);let s=0;switch(a.type){case"airport":case"maglev":case"disney":case"railway":s+=25/2;break;case"hsr":case"airport_hk":case"disney_hk":s+=19/2;break}r.updateNodeAttribute(i,"y",l=>(l!=null?l:0)+s)}),JSON.stringify({...e,version:17,graph:r.export()})},17:n=>JSON.stringify({...JSON.parse(n),version:18}),18:n=>JSON.stringify({...JSON.parse(n),version:19}),19:n=>JSON.stringify({...JSON.parse(n),version:20}),20:n=>JSON.stringify({...JSON.parse(n),version:21}),21:n=>JSON.stringify({...JSON.parse(n),version:22}),22:n=>JSON.stringify({...JSON.parse(n),version:23}),23:n=>JSON.stringify({...JSON.parse(n),version:24}),24:n=>{const e=JSON.parse(n),r=new pe;return r.import(e.graph),r.filterNodes((i,o)=>i.startsWith("stn")&&o.type===H.GzmtrInt||i.startsWith("misc_node")&&o.type===st.GzmtrLineBadge).forEach(i=>{const o=r.getNodeAttribute(i,"type"),a=r.getNodeAttribute(i,o);a.tram=!1,r.mergeNodeAttributes(i,{[o]:a})}),JSON.stringify({...e,version:25,graph:r.export()})},25:n=>JSON.stringify({...JSON.parse(n),version:26}),26:n=>{const e=JSON.parse(n),r=new pe;return r.import(e==null?void 0:e.graph),r.filterNodes((i,o)=>i.startsWith("misc_node")&&o.type===st.GzmtrLineBadge).forEach(i=>{const o=r.getNodeAttribute(i,"type"),a=r.getNodeAttribute(i,o);a.span=!0,r.mergeNodeAttributes(i,{[o]:a})}),JSON.stringify({...e,version:27,graph:r.export()})},27:n=>{const e=JSON.parse(n),r=new pe;return r.import(e==null?void 0:e.graph),r.filterNodes((i,o)=>i.startsWith("stn")&&o.type===H.GzmtrInt).forEach(i=>{const o=r.getNodeAttribute(i,"type"),a=r.getNodeAttribute(i,o);for(let s=0;sJSON.stringify({...JSON.parse(n),version:29}),29:n=>JSON.stringify({...JSON.parse(n),version:30}),30:n=>JSON.stringify({...JSON.parse(n),version:31}),31:n=>{const e=JSON.parse(n),r=new pe;return r.import(e==null?void 0:e.graph),r.filterEdges((i,o)=>o.style===U.ChinaRailway).forEach(i=>{const o=r.getEdgeAttributes(i)[U.ChinaRailway];r.mergeEdgeAttributes(i,{[U.ChinaRailway]:{...o,color:[ye.Shanghai,"jsr","#000000",de.white]}})}),JSON.stringify({...e,version:32,graph:r.export()})},32:n=>JSON.stringify({...JSON.parse(n),version:33}),33:n=>{const e=JSON.parse(n),r=new pe;return r.import(e==null?void 0:e.graph),r.forEachDirectedEdge(i=>{r.setEdgeAttribute(i,"parallelIndex",-1),r.updateEdgeAttribute(i,"zIndex",o=>Math.max(-10,(o!=null?o:0)-5))}),r.forEachNode(i=>{r.updateNodeAttribute(i,"zIndex",o=>Math.min(10,(o!=null?o:0)+5))}),JSON.stringify({...e,version:34,graph:r.export()})},34:n=>JSON.stringify({...JSON.parse(n),version:35}),35:n=>JSON.stringify({...JSON.parse(n),version:36}),36:n=>JSON.stringify({...JSON.parse(n),version:37}),37:n=>JSON.stringify({...JSON.parse(n),version:38}),38:n=>JSON.stringify({...JSON.parse(n),version:39}),39:n=>{const e=JSON.parse(n),r=new pe;return r.import(e==null?void 0:e.graph),r.filterNodes((i,o)=>i.startsWith("misc_node")&&o.type===st.Facilities).forEach(i=>{const o=r.getNodeAttribute(i,"type"),a=r.getNodeAttribute(i,o);a.type==="qingdao_airport"?a.type="airport_qingdao":a.type==="qingdao_coach_station"?a.type="coach_station_qingdao":a.type==="qingdao_cruise_terminal"?a.type="cruise_terminal_qingdao":a.type==="qingdao_railway"?a.type="railway_qingdao":a.type==="qingdao_tram"&&(a.type="tram_qingdao"),r.mergeNodeAttributes(i,{[o]:a})}),JSON.stringify({...e,version:40,graph:r.export()})},40:n=>JSON.stringify({...JSON.parse(n),version:41}),41:n=>{const e=JSON.parse(n),r=new pe;r.import(e==null?void 0:e.graph);const i=o=>o.map(a=>a.replaceAll("\\","\n"));return r.forEachNode((o,a)=>{const s=r.getNodeAttribute(o,"type");let l;(s===H.BjsubwayBasic||s===H.BjsubwayInt||s===H.FoshanMetroBasic||s===H.GuangdongIntercityRailway||s===H.GzmtrBasic||s===H.GzmtrInt||s===H.JREastBasic||s===H.JREastImportant||s===H.KunmingRTBasic||s===H.KunmingRTInt||s===H.MRTBasic||s===H.MRTInt||s===H.MTR||s===H.ShanghaiSuburbanRailway||s===H.ShmetroBasic2020||s===H.ShmetroBasic||s===H.ShmetroInt||s===H.ShmetroOutOfSystemInt||s===H.SuzhouRTBasic||s===H.SuzhouRTInt||s===H.TokyoMetroBasic||s===H.TokyoMetroInt)&&(l=i(a[s].names)),l&&(a[s].names=l,r.mergeNodeAttributes(o,a))}),JSON.stringify({...e,version:42,graph:r.export()})}};Du();const j1=ju({account:hy,app:N0,param:A0,runtime:I0}),$1=(n={})=>$u({reducer:j1,middleware:e=>e({serializableCheck:!1}),preloadedState:n}),fe=$1();fe.subscribe(async()=>{await wy(fe.getState().param.present),localStorage.setItem(rt.PARAM,M1(fe.getState().param)),localStorage.setItem(rt.APP,JSON.stringify(fe.getState().app)),localStorage.setItem(rt.LOGIN_STATE,JSON.stringify(fe.getState().account))});const Vt=()=>Pu(),hi=Iu,P1=D.lazy(()=>yn(()=>import("./page-header-Bgpft2Tp.js"),__vite__mapDeps([0,1,2,3,4]))),I1=D.lazy(()=>yn(()=>import("./tools-BJtAFyoe.js"),__vite__mapDeps([5,1,2,6,3]))),D1=D.lazy(()=>yn(()=>import("./svg-wrapper-pwXZizLy.js"),__vite__mapDeps([7,1,2,8,3,6]))),B1=D.lazy(()=>yn(()=>import("./details-DDhluMMM.js"),__vite__mapDeps([9,1,2,8,3,4,5,6]))),z1=D.lazy(()=>yn(()=>import("./rmg-palette-app-clip-aSI_7pb8.js"),__vite__mapDeps([10,1,2])));function F1(){const n=Vt(),{paletteAppClip:{input:e}}=hi(c=>c.runtime),{t:r}=Te(),[i,o]=D.useState(!1);D.useEffect(()=>{Ge.isStandaloneWindow()&&!window.localStorage.getItem(rt.DO_NOT_SHOW_RMT_MSG)&&o(!0)},[]);const a=new Date,s="".concat(a.getFullYear()).concat(String(a.getMonth()+1).padStart(2,"0"),"01"),l="".concat(String(a.getFullYear()).slice(-2),".").concat(a.getMonth()+1,".1");return m.jsx(oy,{children:m.jsx(Em,{children:m.jsxs(D.Suspense,{fallback:m.jsxs(m.Fragment,{children:[m.jsx("p",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},children:"Rail Map Toolkit protocol... checked"}),m.jsxs("p",{style:{position:"absolute",top:"75%",left:"50%",transform:"translate(-50%, -50%)",fontSize:"small",color:"gray"},children:["Seeing this page for too long? Try another mirror"," ",m.jsx("a",{href:"https://railmapgen.github.io/?app=rmp",target:"_blank",rel:"noreferrer",children:"GitHub"})," ",m.jsx("a",{href:"https://railmapgen.gitlab.io/?app=rmp",target:"_blank",rel:"noreferrer",children:"Gitlab"})," ","or the"," ",m.jsx("a",{href:"https://github.com/railmapgen/railmapgen.github.io/releases",target:"_blank",rel:"noreferrer",children:"offline application"})," ",".",m.jsx("br",{}),m.jsx("br",{}),"Offline applications also available via ghgo.xyz"," ",m.jsx("a",{href:"https://ghgo.xyz/https://github.com/railmapgen/railmapgen.github.io/releases/download/tauri-".concat(s,"/railmapgen_").concat(l,"_x64-setup.exe"),children:"Windows"})," ",m.jsx("a",{href:"https://ghgo.xyz/https://github.com/railmapgen/railmapgen.github.io/releases/download/tauri-".concat(s,"/railmapgen_").concat(l,"_aarch64.dmg"),children:"MacOS"})," ",m.jsx("a",{href:"https://ghgo.xyz/https://github.com/railmapgen/railmapgen.github.io/releases/download/tauri-".concat(s,"/railmapgen_").concat(l,"_amd64.deb"),children:"Linux"})," ","if you are blocked by GFW :)"]})]}),children:[m.jsx(P1,{}),i&&m.jsxs(io,{status:"info",variant:"solid",size:"xs",pl:3,pr:1,py:1,zIndex:"1",children:[m.jsx(oo,{}),m.jsxs(At,{children:[m.jsx(zn,{href:"/?app=rmp",isExternal:!0,fontWeight:"bold",children:r("rmtPromotion")})," ",m.jsx(zn,{as:"button",ml:"auto",textDecoration:"underline",onClick:()=>o(!1),children:r("close")})," | ",m.jsx(zn,{as:"button",textDecoration:"underline",onClick:()=>{o(!1),window.localStorage.setItem(rt.DO_NOT_SHOW_RMT_MSG,"true")},children:r("noShowAgain")})]})]}),m.jsx(wm,{allowReset:!0,children:m.jsxs(ct,{direction:"row",height:"100%",overflow:"hidden",sx:{position:"relative"},children:[m.jsx(I1,{}),m.jsx(D1,{}),m.jsx(B1,{})]})}),m.jsx(z1,{isOpen:!!e,onClose:()=>n($0()),defaultTheme:e,onSelect:c=>n(P0(c))})]})})})}const G1=()=>{Ws(document.getElementById("root")).render(m.jsx(D.StrictMode,{children:m.jsx(Bu,{store:fe,children:m.jsx(zu,{i18n:Xn,children:m.jsx(F1,{})})})}))};var Ba;const xr=JSON.parse((Ba=localStorage.getItem(rt.LOGIN_STATE))!=null?Ba:"{}");var za;const Fe=JSON.parse((za=localStorage.getItem(rt.APP))!=null?za:"{}"),U1=localStorage.getItem(rt.PARAM);"telemetry"in Fe&&("app"in Fe.telemetry&&fe.dispatch(w0(Fe.telemetry.app)),"project"in Fe.telemetry&&fe.dispatch(x0(Fe.telemetry.project))),"preference"in Fe&&("unlockSimplePathAttempts"in Fe.preference&&fe.dispatch(S0(Fe.preference.unlockSimplePathAttempts)),"toolsPanel"in Fe.preference&&"expand"in Fe.preference.toolsPanel&&fe.dispatch(_0(Fe.preference.toolsPanel.expand)),"autoParallel"in Fe.preference&&fe.dispatch(kl(Fe.preference.autoParallel))),"state"in xr&&fe.dispatch(sn(xr.state)),"activeSubscriptions"in xr&&fe.dispatch(Kn(xr.activeSubscriptions));L1(U1).then(n=>{const{version:e,graph:r,...i}=JSON.parse(n);window.graph=pe.from(r);const o={...i,present:r,past:[],future:[]};fe.dispatch(C0(o)),fe.dispatch(Ur()),fe.dispatch(pn()),G1(),Ge.injectUITools(),xy(fe),Ma(),window.setInterval(()=>Ma(),15*60*1e3);const a=window.setTimeout(()=>{fe.dispatch(sn("logged-out")),fe.dispatch(Kn(Jn)),fe.dispatch(eo(void 0))},6e3);fe.dispatch(eo(a))});export{y0 as $,Sx as A,Eo as B,ye as C,Zx as D,cy as E,Px as F,Qx as G,lS as H,Ia as I,vy as J,rt as K,mx as L,de as M,K1 as N,Dx as O,Sm as P,q1 as Q,nx as R,H as S,Mo as T,cx as U,ew as V,j0 as W,S0 as X,sx as Y,sS as Z,Ma as _,W1 as __vite_legacy_guard,Xx as a,m0 as a0,Ax as a1,kl as a2,Ux as a3,iS as a4,tS as a5,rS as a6,nS as a7,px as a8,x0 as a9,Hx as aA,Nm as aB,rx as aC,ix as aD,ox as aE,ax as aF,Ox as aG,Tx as aH,aS as aI,oS as aJ,Mx as aK,_0 as aL,tr as aM,Ie as aN,yx as aO,Xn as aP,sy as aQ,ly as aR,Lx as aS,X1 as aT,Wx as aU,Vx as aV,jx as aW,om as aX,Am as aY,fx as aZ,gx as a_,Fx as aa,Gx as ab,Ot as ac,tx as ad,Z1 as ae,qx as af,Jx as ag,zx as ah,Bx as ai,$x as aj,Cl as ak,Al as al,Ex as am,bx as an,vx as ao,E1 as ap,Cx as aq,lx as ar,kx as as,Nx as at,_x as au,ux as av,st as aw,rw as ax,Ay as ay,Q1 as az,Ix as b,Vt as c,hi as d,dx as e,Yx as f,Kx as g,eS as h,Ee as i,jo as j,N as k,Ol as l,wx as m,_y as n,U as o,hx as p,Ur as q,Ge as r,M1 as s,pn as t,ex as u,cn as v,Y1 as w,L1 as x,Rx as y,xx as z}; + */var pa;function uf(){if(pa)return Ln;pa=1;var n=D,e=Symbol.for("react.element"),r=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,o=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function s(l,c,u){var d,h={},p=null,g=null;u!==void 0&&(p=""+u),c.key!==void 0&&(p=""+c.key),c.ref!==void 0&&(g=c.ref);for(d in c)i.call(c,d)&&!a.hasOwnProperty(d)&&(h[d]=c[d]);if(l&&l.defaultProps)for(d in c=l.defaultProps,c)h[d]===void 0&&(h[d]=c[d]);return{$$typeof:e,type:l,key:p,ref:g,props:h,_owner:o.current}}return Ln.Fragment=r,Ln.jsx=s,Ln.jsxs=s,Ln}Qs.exports=uf();var z=Qs.exports;const[df,Mt]=$c({name:"AutoCompleteContext",errorMessage:"useAutoCompleteContext: `context` is undefined. Seems you forgot to wrap all autoomplete components within ``"});var ci=function(n,e){for(var r,i=$.Children.toArray(n),o=0,a=i;o{var e;return(e=typeof n=="string"||typeof n=="number"?n:n[Object.keys(n)[0]])==null?void 0:e.toString()},hf=(n,e)=>typeof n!="string"||Va(e)?n:n.toString().replace(new RegExp(mf(e),"gi"),r=>"".concat(r,"")),pf=n=>Xs(n,e=>{var r;return((r=e==null?void 0:e.type)==null?void 0:r.displayName)==="AutoCompleteItem"}).map(e=>{const r=Qc(e.props,["value","label","fixed","disabled"]),{getValue:i=So}=e.props,o=i(r.value);return{...Ha(r.label)?r:{...r,label:o},value:o,originalValue:r.value}}),ff=()=>({bg:"whiteAlpha.100",_light:{bg:"gray.200"}}),gf=(n,e,r)=>(e==null?void 0:e.toLowerCase().indexOf(n==null?void 0:n.toLowerCase()))>=0||(r==null?void 0:r.toLowerCase().indexOf(n==null?void 0:n.toLowerCase()))>=0||fa(n,e)>=.5||fa(n,r)>=.5;function mf(n){return n.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}const yf=(n,e)=>{const r={},i={},{field:o}=n;return o&&Object.keys(o).forEach(a=>{if(a.startsWith("--input")===!1)r[a]=o[a];else{let s=o[a];const l=a.replace("--input-","").replace(/-([a-z])/g,function(c){return c[1].toUpperCase()});s.indexOf(".")!==-1&&(s=s.substring(s.indexOf(".")+1)),i[l]=s}}),{...e&&{...r,...i,_focusWithin:n.field._focus,pos:"relative",minH:9,py:1.5,spacing:3},cursor:"text",h:"fit-content"}},bf=(n,e)=>ci(n,r=>{var i;return((i=r==null?void 0:r.type)==null?void 0:i.displayName)==="AutoCompleteItem"&&r.props.value===(e==null?void 0:e.value)}),vf=(n,e)=>ci(n,r=>{var i;return((i=r==null?void 0:r.type)==null?void 0:i.displayName)==="AutoCompleteItem"&&r.props.value===(e==null?void 0:e.value)}),wf=(n,e)=>Ha(ci(n,r=>{var i,o;const a=me(((i=r.props)==null?void 0:i.getValue)||So,((o=r.props)==null?void 0:o.value)||{});return e.some(s=>s.value===a)}));function xf(n){var e;let{closeOnBlur:r=!0,creatable:i,emphasize:o,emptyState:a=!0,freeSolo:s,isReadOnly:l,listAllValuesOnFocus:c,maxSuggestions:u,multiple:d,closeOnSelect:h=!d,defaultValue:p,defaultValues:g=p?[p]:[],onReady:y,defaultIsOpen:w,disableFilter:_,isLoading:S=!1,placement:R="bottom",restoreOnBlurIfEmpty:j=!s,shouldRenderSuggestions:M=()=>!0,submitKeys:A=[],suggestWhenEmpty:F,value:T,values:G=T?typeof T=="string"?[T]:[...T]:void 0}=n;s=s||(d?!0:n.freeSolo);const{isOpen:O,onClose:P,onOpen:W}=Wc({defaultIsOpen:w}),ae=me(n.children,{isOpen:O,onClose:P,onOpen:W}),ee=pf(ae),X=$.useRef(null),De=$.useRef(null),Xe=$.useRef(null),Ze=$.useRef(null),[we,Ue]=$.useState(!1);let Me="";d?Me="":Sr(g)?Sr(G)||(Me=G[0]):Me=g[0];const[Be,jt]=$.useState(Me!=null?Me:""),te=_?ee:ee.filter(I=>I.fixed||me(n.filter||gf,Be,I.value,I.label)||we).filter((I,ne)=>u?I.fixed||neI==null?void 0:I.toString()),value:G,onChange:I=>{const ne=Ce.find(Z=>Z.value===I[0]),he=I.map(Z=>Ce.find(je=>je.value===Z));me(n.onChange,d?I:I[0],d?he:ne)}}),[et,ot]=$.useState((e=ee[0])==null?void 0:e.value),bn=n.maxSelections||Oe.length+1,Jt=Ce.findIndex(I=>I.value===et),vn=Hc(Jt,Ce,!!n.rollNavigation),rr=Jc(Jt,Ce,!!n.rollNavigation),$t=Kc(Ce),ir=Ri(Ce);Yc(()=>{ot($t==null?void 0:$t.value)},[Be]),$.useEffect(()=>{var I;O||ot((I=ee[0])==null?void 0:I.value)},[O]),$.useEffect(()=>{const I=ee.find(ne=>ne.value===et);me(n.onOptionFocus,{item:I,focusMethod:Ze.current,isNewInput:I==null?void 0:I.creatable})},[et,n.onOptionFocus]);const wn=I=>{var ne,he;!Oe.includes(I)&&Oe.lengthd?[...$e,I]:[I]);const Z=Ce.find($e=>$e.value===I);d&&((ne=X.current)==null||ne.focus()),n.focusInputOnSelect&&((he=X.current)==null||he.focus()),me(n.onSelectOption,{item:Z,selectMethod:Ze.current,isNewInput:Z==null?void 0:Z.creatable}),Z!=null&&Z.creatable&&me(n.onCreateOption,{item:ni(Z,["noFilter"]),selectMethod:Ze.current});const je=(Z==null?void 0:Z.label)||(Z==null?void 0:Z.value);jt(()=>d?"":je!=null?je:""),h&&P()},or=(I,ne)=>{var he;Ht(Z=>{const je=ee.find($e=>$e.value===I);return me(n.onTagRemoved,I,je,Z),Z.filter($e=>$e!==I)}),Be===I&&jt(""),ne&&((he=X.current)==null||he.focus())},pi=I=>{var ne;Ht([]),I&&((ne=X.current)==null||ne.focus())},ar=d?Oe.map(I=>{var ne;return{label:((ne=ee.find(he=>he.value===(I==null?void 0:I.toString())))==null?void 0:ne.label)||I,onRemove:()=>or(I)}}):[];return $.useEffect(()=>{me(y,{tags:ar})},[Oe]),{autoCompleteProps:n,children:ae,filteredList:Ce,filteredResults:te,focusedValue:et,getEmptyStateProps:I=>{if(Ce.every(ne=>ne.noFilter)&&a&&!i)return typeof a=="boolean"?I:me(a,{query:Be})},getGroupProps:I=>{const ne=wf(I.children,Ce);return{divider:{hasFirstChild:bf(I.children,$t),hasLastChild:vf(I.children,Ri(Ce.filter(he=>Sr(he==null?void 0:he.noFilter))))},group:{display:ne?"initial":"none"}}},getInputProps:(I,ne)=>{const{onBlur:he,onChange:Z,onFocus:je,onKeyDown:$e,variant:Kt,...Yt}=I;return{wrapper:{ref:De,onClick:()=>{var Y;(Y=X==null?void 0:X.current)==null||Y.focus()},...yf(ne,d),...Yt},input:{isReadOnly:l,onFocus:Y=>{me(je,Y),n.openOnFocus&&!l&&W(),n.selectOnFocus&&Y.target.select(),c&&Ue(!0)},onBlur:Y=>{var Pe,xe;me(he,Y);const Se=Y.relatedTarget===(Xe==null?void 0:Xe.current)||((Pe=Xe.current)==null?void 0:Pe.contains(Y.relatedTarget)),qt=(xe=De.current)==null?void 0:xe.contains(Y.relatedTarget);if(!Se&&!qt&&(r&&P(),!Oe.includes(Y.target.value)&&j)){const xn=Ri(Oe),St=ee.find(_t=>_t.value===xn),_e=(St==null?void 0:St.label)||(St==null?void 0:St.value)||"";jt(_e)}},onChange:Y=>{const Pe=Y.target.value;me(Z,Y),jt(Pe);const xe=Va(Pe);me(M,Pe)&&(!xe||F)?W():P(),Ue(!1)},onKeyDown:Y=>{var Pe;me($e,Y),Ze.current="keyboard";const{key:xe}=Y,Se=Ce[Jt];if(["Enter",...A].includes(xe)){Se&&!(Se!=null&&Se.disabled)?wn(Se==null?void 0:Se.value):(Pe=X.current)==null||Pe.focus(),Y.preventDefault();return}if(xe==="ArrowDown"){O?ot(vn==null?void 0:vn.value):W(),Y.preventDefault();return}if(xe==="ArrowUp"){O?ot(rr==null?void 0:rr.value):W(),Y.preventDefault();return}if(xe==="Tab"){O&&Se&&!(Se!=null&&Se.disabled)?wn(Se==null?void 0:Se.value):P();return}if(xe==="Home"){ot($t==null?void 0:$t.value),Y.preventDefault();return}if(xe==="End"){ot(ir==null?void 0:ir.value),Y.preventDefault();return}xe==="Escape"&&(P(),Y.preventDefault())},value:Be,variant:d?"unstyled":Kt,...Yt}}},getItemProps:(I,ne)=>{var he;const{_fixed:Z,_focus:je,children:$e,disabled:Kt,label:Yt,value:Y,fixed:Pe,getValue:xe=So,onClick:Se,onMouseOver:qt,sx:xn,...St}=I,_e=ne?Y:(he=xe(Y))==null?void 0:he.toString(),_t=_e===et,fi=Ce.findIndex(Pt=>Pt.value===_e)>=0,Qt=$e||Yt||_e;return{item:{...typeof Qt!="string"||!o?{children:Qt}:{dangerouslySetInnerHTML:{__html:hf(Qt,Be)}},"aria-selected":Oe.includes(_e),"aria-disabled":Kt,_disabled:{opacity:.4,cursor:"not-allowed",userSelect:"none"},onClick:Pt=>{var Sn;me(Se,Pt),Kt?(Sn=X.current)==null||Sn.focus():wn(_e)},onMouseOver:Pt=>{me(qt,Pt),ot(_e),Ze.current="mouse"},sx:{...xn,mark:{color:"inherit",bg:"transparent",...qc(o)?o:{fontWeight:o?"extrabold":"inherit"}}},..._t&&(je||ff()),...Pe&&Z,...St},root:{isValidSuggestion:fi,value:_e}}},inputRef:X,interactionRef:Ze,isLoading:S,isOpen:O,itemList:ee,listRef:Xe,onClose:P,onOpen:W,placement:R,query:Be,removeItem:or,resetItems:pi,setQuery:jt,tags:ar,values:Oe}}const Zs=Wt((n,e)=>{const r=xf(n),{children:i,isOpen:o,onClose:a,onOpen:s,placement:l,resetItems:c,removeItem:u}=r;return $.useImperativeHandle(e,()=>({resetItems:c,removeItem:u})),z.jsx(df,{value:r,children:z.jsx(Fa,{isLazy:!0,isOpen:o,onClose:a,onOpen:s,autoFocus:!1,placement:l,closeOnBlur:!0,matchWidth:!0,children:z.jsx(Tr.div,{w:"full",ref:e,children:i})})})});Zs.displayName="AutoComplete";const el=Wt((n,e)=>{const{focusedValue:r,getItemProps:i,interactionRef:o}=Mt(),a=$.useRef(),s=Zn(e,a),l=i(n),{isValidSuggestion:c,value:u}=l.root,d=r===u;$.useEffect(()=>{var w;d&&o.current==="keyboard"&&((w=a==null?void 0:a.current)==null||w.scrollIntoView({behavior:"smooth",block:"center"}))},[d,o]),$.useEffect(()=>{typeof u!="string"&&console.warn("wow"),typeof u!="string"&&Sr(n.getValue)&&console.error("You must define the `getValue` prop, when an Item's value is not a string")},[]);const{children:h,dangerouslySetInnerHTML:p,...g}=l.item,y=ni(g,["groupId"]);return c?z.jsx(ct,{ref:s,...Sf,...y,children:h||z.jsx("span",{dangerouslySetInnerHTML:p})}):null});el.displayName="AutoCompleteItem";const Sf={mx:"2",px:"2",py:"2",rounded:"md",cursor:"pointer"},_f=Wt((n,e)=>{const{children:r,showDivider:i,...o}=n,a=ni(o,["groupSibling"]),{getGroupProps:s}=Mt(),{group:l}=s(n),c=kf(n);return z.jsxs(Pc,{ref:e,...l,...a,children:[z.jsx(Jo,{...c.top}),r,z.jsx(Jo,{...c.bottom})]})}),Nf=Wt((n,e)=>z.jsx(ct,{...Rf,...n,ref:e}));_f.displayName="AutoCompleteGroup";Nf.displayName="AutoCompleteGroupTitle";const Rf={ml:5,my:1,fontSize:"xs",letterSpacing:"wider",fontWeight:"extrabold",textTransform:"uppercase"},kf=n=>{const{getGroupProps:e}=Mt(),r=n.groupSibling,{divider:{hasFirstChild:i,hasLastChild:o}}=e(n),a={my:2,borderColor:n.dividerColor},s={...a,mb:4,display:!n.showDivider||i?"none":""},l={...a,display:!n.showDivider||o||r?"none":""};return{top:s,bottom:l}},ga=Wt((n,e)=>{const{isLoading:r}=Mt(),{loadingIcon:i,...o}=n;return z.jsxs(Ic,{children:[z.jsx(Ga,{...o,ref:e}),r&&z.jsx(Dc,{children:i||z.jsx(Ua,{})})]})}),_o=Wt((n,e)=>{const{autoCompleteProps:r,inputRef:i,getInputProps:o,tags:a,setQuery:s}=Mt(),{children:l,isInvalid:c,hidePlaceholder:u,...d}=n,{value:h}=d;$.useEffect(()=>{h!==void 0&&(typeof h=="string"||h instanceof String)&&s(h)},[h]);const p=Bc("Input",n);let{wrapper:g,input:y}=o(d,p);const{ref:w,..._}=g,S=Zn(e,i),R=me(l,{tags:a});u&&(y={...y,placeholder:Array.isArray(R)&&R.length?void 0:y.placeholder});const j=z.jsx(ga,{isInvalid:c,...y,ref:S}),M=z.jsxs(zc,{..._,ref:w,children:[R,z.jsx(Fc,{as:ga,...y,ref:S})]});return z.jsx(Gc,{children:r.multiple?M:j})});_o.displayName="Input";_o.id="Input";function Cf(){const n=$.useContext(tu);if(!n)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return n}var tl=$.createContext({});tl.displayName="ColorModeContext";function nl(){const n=$.useContext(tl);if(n===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return n}function Af(){const n=nl(),e=Cf();return{...n,theme:e}}var No=(...n)=>n.filter(Boolean).join(" ");function Gt(n){const e=typeof n;return n!=null&&(e==="object"||e==="function")&&!Array.isArray(n)}function Bt(n,...e){return Tf(n)?n(...e):n}var Tf=n=>typeof n=="function",zr={exports:{}};zr.exports;(function(n,e){var r=200,i="__lodash_hash_undefined__",o=800,a=16,s=9007199254740991,l="[object Arguments]",c="[object Array]",u="[object AsyncFunction]",d="[object Boolean]",h="[object Date]",p="[object Error]",g="[object Function]",y="[object GeneratorFunction]",w="[object Map]",_="[object Number]",S="[object Null]",R="[object Object]",j="[object Proxy]",M="[object RegExp]",A="[object Set]",F="[object String]",T="[object Undefined]",G="[object WeakMap]",O="[object ArrayBuffer]",P="[object DataView]",W="[object Float32Array]",ae="[object Float64Array]",ee="[object Int8Array]",X="[object Int16Array]",De="[object Int32Array]",Xe="[object Uint8Array]",Ze="[object Uint8ClampedArray]",we="[object Uint16Array]",Ue="[object Uint32Array]",Me=/[\\^$.*+?()[\]{}|]/g,Be=/^\[object .+?Constructor\]$/,jt=/^(?:0|[1-9]\d*)$/,te={};te[W]=te[ae]=te[ee]=te[X]=te[De]=te[Xe]=te[Ze]=te[we]=te[Ue]=!0,te[l]=te[c]=te[O]=te[d]=te[P]=te[h]=te[p]=te[g]=te[w]=te[_]=te[R]=te[M]=te[A]=te[F]=te[G]=!1;var nr=typeof gr=="object"&&gr&&gr.Object===Object&&gr,Ce=typeof self=="object"&&self&&self.Object===Object&&self,Oe=nr||Ce||Function("return this")(),Ht=e&&!e.nodeType&&e,et=Ht&&!0&&n&&!n.nodeType&&n,ot=et&&et.exports===Ht,bn=ot&&nr.process,Jt=function(){try{var f=et&&et.require&&et.require("util").types;return f||bn&&bn.binding&&bn.binding("util")}catch(v){}}(),vn=Jt&&Jt.isTypedArray;function rr(f,v,x){switch(x.length){case 0:return f.call(v);case 1:return f.call(v,x[0]);case 2:return f.call(v,x[0],x[1]);case 3:return f.call(v,x[0],x[1],x[2])}return f.apply(v,x)}function $t(f,v){for(var x=-1,L=Array(f);++x-1}function Gl(f,v){var x=this.__data__,L=sr(x,f);return L<0?(++this.size,x.push([f,v])):x[L][1]=v,this}pt.prototype.clear=Dl,pt.prototype.delete=Bl,pt.prototype.get=zl,pt.prototype.has=Fl,pt.prototype.set=Gl;function Xt(f){var v=-1,x=f==null?0:f.length;for(this.clear();++v1?x[V-1]:void 0,ce=V>2?x[2]:void 0;for(ie=f.length>3&&typeof ie=="function"?(V--,ie):void 0,ce&&yc(x[0],x[1],ce)&&(ie=V<3?void 0:ie,V=1),v=Object(v);++L-1&&f%1==0&&f0){if(++v>=o)return arguments[0]}else v=0;return f.apply(void 0,arguments)}}function Rc(f){if(f!=null){try{return he.call(f)}catch(v){}try{return f+""}catch(v){}}return""}function ur(f,v){return f===v||f!==f&&v!==v}var vi=Po(function(){return arguments}())?Po:function(f){return Nn(f)&&Z.call(f,"callee")&&!xn.call(f,"callee")},wi=Array.isArray;function xi(f){return f!=null&&Fo(f.length)&&!Si(f)}function kc(f){return Nn(f)&&xi(f)}var zo=fi||Oc;function Si(f){if(!Dt(f))return!1;var v=lr(f);return v==g||v==y||v==u||v==j}function Fo(f){return typeof f=="number"&&f>-1&&f%1==0&&f<=s}function Dt(f){var v=typeof f;return f!=null&&(v=="object"||v=="function")}function Nn(f){return f!=null&&typeof f=="object"}function Cc(f){if(!Nn(f)||lr(f)!=R)return!1;var v=Se(f);if(v===null)return!0;var x=Z.call(v,"constructor")&&v.constructor;return typeof x=="function"&&x instanceof x&&he.call(x)==Kt}var Go=vn?ir(vn):rc;function Ac(f){return hc(f,Uo(f))}function Uo(f){return xi(f)?Zl(f):ic(f)}var Tc=pc(function(f,v,x,L){Io(f,v,x,L)});function Ec(f){return function(){return f}}function Wo(f){return f}function Oc(){return!1}n.exports=Tc})(zr,zr.exports);var Ef=zr.exports;const Et=qs(Ef);var Of=n=>/!(important)?$/.test(n),ma=n=>typeof n=="string"?n.replace(/!(important)?$/,"").trim():n,Lf=(n,e)=>r=>{const i=String(e),o=Of(i),a=ma(i),s=n?"".concat(n,".").concat(a):a;let l=Gt(r.__cssMap)&&s in r.__cssMap?r.__cssMap[s].varRef:e;return l=ma(l),o?"".concat(l," !important"):l};function Ro(n){const{scale:e,transform:r,compose:i}=n;return(o,a)=>{var s;const l=Lf(e,o)(a);let c=(s=r==null?void 0:r(l,a))!=null?s:l;return i&&(c=i(c,a)),c}}var yr=(...n)=>e=>n.reduce((r,i)=>i(r),e);function Ve(n,e){return r=>{const i={property:r,scale:n};return i.transform=Ro({scale:n,transform:e}),i}}var Mf=({rtl:n,ltr:e})=>r=>r.direction==="rtl"?n:e;function jf(n){const{property:e,scale:r,transform:i}=n;return{scale:r,property:Mf(e),transform:r?Ro({scale:r,compose:i}):i}}var rl=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function $f(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...rl].join(" ")}function Pf(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...rl].join(" ")}var If={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},Df={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function Bf(n){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":n,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var zf={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},Fi={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},Ff=new Set(Object.values(Fi)),Gi=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),Gf=n=>n.trim();function Uf(n,e){if(n==null||Gi.has(n))return n;if(!(Ui(n)||Gi.has(n)))return"url('".concat(n,"')");const r=/(^[a-z-A-Z]+)\((.*)\)/g.exec(n),i=r==null?void 0:r[1],o=r==null?void 0:r[2];if(!i||!o)return n;const a=i.includes("-gradient")?i:"".concat(i,"-gradient"),[s,...l]=o.split(",").map(Gf).filter(Boolean);if((l==null?void 0:l.length)===0)return n;const c=s in Fi?Fi[s]:s;l.unshift(c);const u=l.map(d=>{if(Ff.has(d))return d;const h=d.indexOf(" "),[p,g]=h!==-1?[d.substr(0,h),d.substr(h+1)]:[d],y=Ui(g)?g:g&&g.split(" "),w="colors.".concat(p),_=w in e.__cssMap?e.__cssMap[w].varRef:p;return y?[_,...Array.isArray(y)?y:[y]].join(" "):_});return"".concat(a,"(").concat(u.join(", "),")")}var Ui=n=>typeof n=="string"&&n.includes("(")&&n.includes(")"),Wf=(n,e)=>Uf(n,e!=null?e:{});function Vf(n){return/^var\(--.+\)$/.test(n)}var Hf=n=>{const e=parseFloat(n.toString()),r=n.toString().replace(String(e),"");return{unitless:!r,value:e,unit:r}},at=n=>e=>"".concat(n,"(").concat(e,")"),J={filter(n){return n!=="auto"?n:If},backdropFilter(n){return n!=="auto"?n:Df},ring(n){return Bf(J.px(n))},bgClip(n){return n==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:n}},transform(n){return n==="auto"?$f():n==="auto-gpu"?Pf():n},vh(n){return n==="$100vh"?"var(--chakra-vh)":n},px(n){if(n==null)return n;const{unitless:e}=Hf(n);return e||typeof n=="number"?"".concat(n,"px"):n},fraction(n){return typeof n!="number"||n>1?n:"".concat(n*100,"%")},float(n,e){const r={left:"right",right:"left"};return e.direction==="rtl"?r[n]:n},degree(n){if(Vf(n)||n==null)return n;const e=typeof n=="string"&&!n.endsWith("deg");return typeof n=="number"||e?"".concat(n,"deg"):n},gradient:Wf,blur:at("blur"),opacity:at("opacity"),brightness:at("brightness"),contrast:at("contrast"),dropShadow:at("drop-shadow"),grayscale:at("grayscale"),hueRotate:at("hue-rotate"),invert:at("invert"),saturate:at("saturate"),sepia:at("sepia"),bgImage(n){return n==null||Ui(n)||Gi.has(n)?n:"url(".concat(n,")")},outline(n){const e=String(n)==="0"||String(n)==="none";return n!==null&&e?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:n}},flexDirection(n){var e;const{space:r,divide:i}=(e=zf[n])!=null?e:{},o={flexDirection:n};return r&&(o[r]=1),i&&(o[i]=1),o}},b={borderWidths:Ve("borderWidths"),borderStyles:Ve("borderStyles"),colors:Ve("colors"),borders:Ve("borders"),gradients:Ve("gradients",J.gradient),radii:Ve("radii",J.px),space:Ve("space",yr(J.vh,J.px)),spaceT:Ve("space",yr(J.vh,J.px)),degreeT(n){return{property:n,transform:J.degree}},prop(n,e,r){return{property:n,scale:e,...e&&{transform:Ro({scale:e,transform:r})}}},propT(n,e){return{property:n,transform:e}},sizes:Ve("sizes",yr(J.vh,J.px)),sizesT:Ve("sizes",yr(J.vh,J.fraction)),shadows:Ve("shadows"),logical:jf,blur:Ve("blur",J.blur)},Cr={background:b.colors("background"),backgroundColor:b.colors("backgroundColor"),backgroundImage:b.gradients("backgroundImage"),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:J.bgClip},bgSize:b.prop("backgroundSize"),bgPosition:b.prop("backgroundPosition"),bg:b.colors("background"),bgColor:b.colors("backgroundColor"),bgPos:b.prop("backgroundPosition"),bgRepeat:b.prop("backgroundRepeat"),bgAttachment:b.prop("backgroundAttachment"),bgGradient:b.gradients("backgroundImage"),bgClip:{transform:J.bgClip}};Object.assign(Cr,{bgImage:Cr.backgroundImage,bgImg:Cr.backgroundImage});var Q={border:b.borders("border"),borderWidth:b.borderWidths("borderWidth"),borderStyle:b.borderStyles("borderStyle"),borderColor:b.colors("borderColor"),borderRadius:b.radii("borderRadius"),borderTop:b.borders("borderTop"),borderBlockStart:b.borders("borderBlockStart"),borderTopLeftRadius:b.radii("borderTopLeftRadius"),borderStartStartRadius:b.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:b.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:b.radii("borderTopRightRadius"),borderStartEndRadius:b.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:b.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:b.borders("borderRight"),borderInlineEnd:b.borders("borderInlineEnd"),borderBottom:b.borders("borderBottom"),borderBlockEnd:b.borders("borderBlockEnd"),borderBottomLeftRadius:b.radii("borderBottomLeftRadius"),borderBottomRightRadius:b.radii("borderBottomRightRadius"),borderLeft:b.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:b.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:b.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:b.borders(["borderLeft","borderRight"]),borderInline:b.borders("borderInline"),borderY:b.borders(["borderTop","borderBottom"]),borderBlock:b.borders("borderBlock"),borderTopWidth:b.borderWidths("borderTopWidth"),borderBlockStartWidth:b.borderWidths("borderBlockStartWidth"),borderTopColor:b.colors("borderTopColor"),borderBlockStartColor:b.colors("borderBlockStartColor"),borderTopStyle:b.borderStyles("borderTopStyle"),borderBlockStartStyle:b.borderStyles("borderBlockStartStyle"),borderBottomWidth:b.borderWidths("borderBottomWidth"),borderBlockEndWidth:b.borderWidths("borderBlockEndWidth"),borderBottomColor:b.colors("borderBottomColor"),borderBlockEndColor:b.colors("borderBlockEndColor"),borderBottomStyle:b.borderStyles("borderBottomStyle"),borderBlockEndStyle:b.borderStyles("borderBlockEndStyle"),borderLeftWidth:b.borderWidths("borderLeftWidth"),borderInlineStartWidth:b.borderWidths("borderInlineStartWidth"),borderLeftColor:b.colors("borderLeftColor"),borderInlineStartColor:b.colors("borderInlineStartColor"),borderLeftStyle:b.borderStyles("borderLeftStyle"),borderInlineStartStyle:b.borderStyles("borderInlineStartStyle"),borderRightWidth:b.borderWidths("borderRightWidth"),borderInlineEndWidth:b.borderWidths("borderInlineEndWidth"),borderRightColor:b.colors("borderRightColor"),borderInlineEndColor:b.colors("borderInlineEndColor"),borderRightStyle:b.borderStyles("borderRightStyle"),borderInlineEndStyle:b.borderStyles("borderInlineEndStyle"),borderTopRadius:b.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:b.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:b.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:b.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(Q,{rounded:Q.borderRadius,roundedTop:Q.borderTopRadius,roundedTopLeft:Q.borderTopLeftRadius,roundedTopRight:Q.borderTopRightRadius,roundedTopStart:Q.borderStartStartRadius,roundedTopEnd:Q.borderStartEndRadius,roundedBottom:Q.borderBottomRadius,roundedBottomLeft:Q.borderBottomLeftRadius,roundedBottomRight:Q.borderBottomRightRadius,roundedBottomStart:Q.borderEndStartRadius,roundedBottomEnd:Q.borderEndEndRadius,roundedLeft:Q.borderLeftRadius,roundedRight:Q.borderRightRadius,roundedStart:Q.borderInlineStartRadius,roundedEnd:Q.borderInlineEndRadius,borderStart:Q.borderInlineStart,borderEnd:Q.borderInlineEnd,borderTopStartRadius:Q.borderStartStartRadius,borderTopEndRadius:Q.borderStartEndRadius,borderBottomStartRadius:Q.borderEndStartRadius,borderBottomEndRadius:Q.borderEndEndRadius,borderStartRadius:Q.borderInlineStartRadius,borderEndRadius:Q.borderInlineEndRadius,borderStartWidth:Q.borderInlineStartWidth,borderEndWidth:Q.borderInlineEndWidth,borderStartColor:Q.borderInlineStartColor,borderEndColor:Q.borderInlineEndColor,borderStartStyle:Q.borderInlineStartStyle,borderEndStyle:Q.borderInlineEndStyle});var Jf={color:b.colors("color"),textColor:b.colors("color"),fill:b.colors("fill"),stroke:b.colors("stroke")},Wi={boxShadow:b.shadows("boxShadow"),mixBlendMode:!0,blendMode:b.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:b.prop("backgroundBlendMode"),opacity:!0};Object.assign(Wi,{shadow:Wi.boxShadow});var Kf={filter:{transform:J.filter},blur:b.blur("--chakra-blur"),brightness:b.propT("--chakra-brightness",J.brightness),contrast:b.propT("--chakra-contrast",J.contrast),hueRotate:b.degreeT("--chakra-hue-rotate"),invert:b.propT("--chakra-invert",J.invert),saturate:b.propT("--chakra-saturate",J.saturate),dropShadow:b.propT("--chakra-drop-shadow",J.dropShadow),backdropFilter:{transform:J.backdropFilter},backdropBlur:b.blur("--chakra-backdrop-blur"),backdropBrightness:b.propT("--chakra-backdrop-brightness",J.brightness),backdropContrast:b.propT("--chakra-backdrop-contrast",J.contrast),backdropHueRotate:b.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:b.propT("--chakra-backdrop-invert",J.invert),backdropSaturate:b.propT("--chakra-backdrop-saturate",J.saturate)},Fr={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:J.flexDirection},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:b.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:b.space("gap"),rowGap:b.space("rowGap"),columnGap:b.space("columnGap")};Object.assign(Fr,{flexDir:Fr.flexDirection});var il={gridGap:b.space("gridGap"),gridColumnGap:b.space("gridColumnGap"),gridRowGap:b.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},Yf={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:J.outline},outlineOffset:!0,outlineColor:b.colors("outlineColor")},Je={width:b.sizesT("width"),inlineSize:b.sizesT("inlineSize"),height:b.sizes("height"),blockSize:b.sizes("blockSize"),boxSize:b.sizes(["width","height"]),minWidth:b.sizes("minWidth"),minInlineSize:b.sizes("minInlineSize"),minHeight:b.sizes("minHeight"),minBlockSize:b.sizes("minBlockSize"),maxWidth:b.sizes("maxWidth"),maxInlineSize:b.sizes("maxInlineSize"),maxHeight:b.sizes("maxHeight"),maxBlockSize:b.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,aspectRatio:!0,hideFrom:{scale:"breakpoints",transform:(n,e)=>{var r,i,o;return{["@media screen and (min-width: ".concat((o=(i=(r=e.__breakpoints)==null?void 0:r.get(n))==null?void 0:i.minW)!=null?o:n,")")]:{display:"none"}}}},hideBelow:{scale:"breakpoints",transform:(n,e)=>{var r,i,o;return{["@media screen and (max-width: ".concat((o=(i=(r=e.__breakpoints)==null?void 0:r.get(n))==null?void 0:i._minW)!=null?o:n,")")]:{display:"none"}}}},verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:b.propT("float",J.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Je,{w:Je.width,h:Je.height,minW:Je.minWidth,maxW:Je.maxWidth,minH:Je.minHeight,maxH:Je.maxHeight,overscroll:Je.overscrollBehavior,overscrollX:Je.overscrollBehaviorX,overscrollY:Je.overscrollBehaviorY});var qf={listStyleType:!0,listStylePosition:!0,listStylePos:b.prop("listStylePosition"),listStyleImage:!0,listStyleImg:b.prop("listStyleImage")};function Qf(n,e,r,i){const o=typeof e=="string"?e.split("."):[e];for(i=0;i{const e=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return n(r,i,o);e.has(r)||e.set(r,new Map);const s=e.get(r);if(s.has(i))return s.get(i);const l=n(r,i,o,a);return s.set(i,l),l}},Zf=Xf(Qf),eg={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},tg={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},Ti=(n,e,r)=>{const i={},o=Zf(n,e,{});for(const a in o)a in r&&r[a]!=null||(i[a]=o[a]);return i},ng={srOnly:{transform(n){return n===!0?eg:n==="focusable"?tg:{}}},layerStyle:{processResult:!0,transform:(n,e,r)=>Ti(e,"layerStyles.".concat(n),r)},textStyle:{processResult:!0,transform:(n,e,r)=>Ti(e,"textStyles.".concat(n),r)},apply:{processResult:!0,transform:(n,e,r)=>Ti(e,n,r)}},Un={position:!0,pos:b.prop("position"),zIndex:b.prop("zIndex","zIndices"),inset:b.spaceT("inset"),insetX:b.spaceT(["left","right"]),insetInline:b.spaceT("insetInline"),insetY:b.spaceT(["top","bottom"]),insetBlock:b.spaceT("insetBlock"),top:b.spaceT("top"),insetBlockStart:b.spaceT("insetBlockStart"),bottom:b.spaceT("bottom"),insetBlockEnd:b.spaceT("insetBlockEnd"),left:b.spaceT("left"),insetInlineStart:b.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:b.spaceT("right"),insetInlineEnd:b.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(Un,{insetStart:Un.insetInlineStart,insetEnd:Un.insetInlineEnd});var rg={ring:{transform:J.ring},ringColor:b.colors("--chakra-ring-color"),ringOffset:b.prop("--chakra-ring-offset-width"),ringOffsetColor:b.colors("--chakra-ring-offset-color"),ringInset:b.prop("--chakra-ring-inset")},se={margin:b.spaceT("margin"),marginTop:b.spaceT("marginTop"),marginBlockStart:b.spaceT("marginBlockStart"),marginRight:b.spaceT("marginRight"),marginInlineEnd:b.spaceT("marginInlineEnd"),marginBottom:b.spaceT("marginBottom"),marginBlockEnd:b.spaceT("marginBlockEnd"),marginLeft:b.spaceT("marginLeft"),marginInlineStart:b.spaceT("marginInlineStart"),marginX:b.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:b.spaceT("marginInline"),marginY:b.spaceT(["marginTop","marginBottom"]),marginBlock:b.spaceT("marginBlock"),padding:b.space("padding"),paddingTop:b.space("paddingTop"),paddingBlockStart:b.space("paddingBlockStart"),paddingRight:b.space("paddingRight"),paddingBottom:b.space("paddingBottom"),paddingBlockEnd:b.space("paddingBlockEnd"),paddingLeft:b.space("paddingLeft"),paddingInlineStart:b.space("paddingInlineStart"),paddingInlineEnd:b.space("paddingInlineEnd"),paddingX:b.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:b.space("paddingInline"),paddingY:b.space(["paddingTop","paddingBottom"]),paddingBlock:b.space("paddingBlock")};Object.assign(se,{m:se.margin,mt:se.marginTop,mr:se.marginRight,me:se.marginInlineEnd,marginEnd:se.marginInlineEnd,mb:se.marginBottom,ml:se.marginLeft,ms:se.marginInlineStart,marginStart:se.marginInlineStart,mx:se.marginX,my:se.marginY,p:se.padding,pt:se.paddingTop,py:se.paddingY,px:se.paddingX,pb:se.paddingBottom,pl:se.paddingLeft,ps:se.paddingInlineStart,paddingStart:se.paddingInlineStart,pr:se.paddingRight,pe:se.paddingInlineEnd,paddingEnd:se.paddingInlineEnd});var ig={textDecorationColor:b.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:b.shadows("textShadow")},og={clipPath:!0,transform:b.propT("transform",J.transform),transformOrigin:!0,translateX:b.spaceT("--chakra-translate-x"),translateY:b.spaceT("--chakra-translate-y"),skewX:b.degreeT("--chakra-skew-x"),skewY:b.degreeT("--chakra-skew-y"),scaleX:b.prop("--chakra-scale-x"),scaleY:b.prop("--chakra-scale-y"),scale:b.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:b.degreeT("--chakra-rotate")},ag={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:b.prop("transitionDuration","transition.duration"),transitionProperty:b.prop("transitionProperty","transition.property"),transitionTimingFunction:b.prop("transitionTimingFunction","transition.easing")},sg={fontFamily:b.prop("fontFamily","fonts"),fontSize:b.prop("fontSize","fontSizes",J.px),fontWeight:b.prop("fontWeight","fontWeights"),lineHeight:b.prop("lineHeight","lineHeights"),letterSpacing:b.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,textIndent:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,isTruncated:{transform(n){if(n===!0)return{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}},noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},lg={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:b.spaceT("scrollMargin"),scrollMarginTop:b.spaceT("scrollMarginTop"),scrollMarginBottom:b.spaceT("scrollMarginBottom"),scrollMarginLeft:b.spaceT("scrollMarginLeft"),scrollMarginRight:b.spaceT("scrollMarginRight"),scrollMarginX:b.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:b.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:b.spaceT("scrollPadding"),scrollPaddingTop:b.spaceT("scrollPaddingTop"),scrollPaddingBottom:b.spaceT("scrollPaddingBottom"),scrollPaddingLeft:b.spaceT("scrollPaddingLeft"),scrollPaddingRight:b.spaceT("scrollPaddingRight"),scrollPaddingX:b.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:b.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function ol(n){return Gt(n)&&n.reference?n.reference:String(n)}var ui=(n,...e)=>e.map(ol).join(" ".concat(n," ")).replace(/calc/g,""),ya=(...n)=>"calc(".concat(ui("+",...n),")"),ba=(...n)=>"calc(".concat(ui("-",...n),")"),Vi=(...n)=>"calc(".concat(ui("*",...n),")"),va=(...n)=>"calc(".concat(ui("/",...n),")"),wa=n=>{const e=ol(n);return e!=null&&!Number.isNaN(parseFloat(e))?String(e).startsWith("-")?String(e).slice(1):"-".concat(e):Vi(e,-1)},Mn=Object.assign(n=>({add:(...e)=>Mn(ya(n,...e)),subtract:(...e)=>Mn(ba(n,...e)),multiply:(...e)=>Mn(Vi(n,...e)),divide:(...e)=>Mn(va(n,...e)),negate:()=>Mn(wa(n)),toString:()=>n.toString()}),{add:ya,subtract:ba,multiply:Vi,divide:va,negate:wa});function cg(n){const e=parseFloat(n.toString()),r=n.toString().replace(String(e),"");return{unitless:!r,value:e,unit:r}}function xa(n){if(n==null)return n;const{unitless:e}=cg(n);return e||typeof n=="number"?"".concat(n,"px"):n}function ug(n,e){const r=["@media screen"];return n&&r.push("and","(min-width: ".concat(xa(n),")")),e&&r.push("and","(max-width: ".concat(xa(e),")")),r.join(" ")}var Ne={hover:(n,e)=>"".concat(n,":hover ").concat(e,", ").concat(n,"[data-hover] ").concat(e),focus:(n,e)=>"".concat(n,":focus ").concat(e,", ").concat(n,"[data-focus] ").concat(e),focusVisible:(n,e)=>"".concat(n,":focus-visible ").concat(e),focusWithin:(n,e)=>"".concat(n,":focus-within ").concat(e),active:(n,e)=>"".concat(n,":active ").concat(e,", ").concat(n,"[data-active] ").concat(e),disabled:(n,e)=>"".concat(n,":disabled ").concat(e,", ").concat(n,"[data-disabled] ").concat(e),invalid:(n,e)=>"".concat(n,":invalid ").concat(e,", ").concat(n,"[data-invalid] ").concat(e),checked:(n,e)=>"".concat(n,":checked ").concat(e,", ").concat(n,"[data-checked] ").concat(e),indeterminate:(n,e)=>"".concat(n,":indeterminate ").concat(e,", ").concat(n,"[aria-checked=mixed] ").concat(e,", ").concat(n,"[data-indeterminate] ").concat(e),readOnly:(n,e)=>"".concat(n,":read-only ").concat(e,", ").concat(n,"[readonly] ").concat(e,", ").concat(n,"[data-read-only] ").concat(e),expanded:(n,e)=>"".concat(n,":read-only ").concat(e,", ").concat(n,"[aria-expanded=true] ").concat(e,", ").concat(n,"[data-expanded] ").concat(e),placeholderShown:(n,e)=>"".concat(n,":placeholder-shown ").concat(e)},Nt=n=>al(e=>n(e,"&"),"[role=group]","[data-group]",".group"),ft=n=>al(e=>n(e,"~ &"),"[data-peer]",".peer"),al=(n,...e)=>e.map(n).join(", "),ko={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_firstLetter:"&::first-letter",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:Nt(Ne.hover),_peerHover:ft(Ne.hover),_groupFocus:Nt(Ne.focus),_peerFocus:ft(Ne.focus),_groupFocusVisible:Nt(Ne.focusVisible),_peerFocusVisible:ft(Ne.focusVisible),_groupActive:Nt(Ne.active),_peerActive:ft(Ne.active),_groupDisabled:Nt(Ne.disabled),_peerDisabled:ft(Ne.disabled),_groupInvalid:Nt(Ne.invalid),_peerInvalid:ft(Ne.invalid),_groupChecked:Nt(Ne.checked),_peerChecked:ft(Ne.checked),_groupFocusWithin:Nt(Ne.focusWithin),_peerFocusWithin:ft(Ne.focusWithin),_peerPlaceholderShown:ft(Ne.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]",_horizontal:"&[data-orientation=horizontal]",_vertical:"&[data-orientation=vertical]"},dg=Object.keys(ko);function hg(n,e=[]){const r=Object.assign({},n);for(const i of e)i in r&&delete r[i];return r}var Co=Et({},Cr,Q,Jf,Fr,Je,Kf,rg,Yf,il,ng,Un,Wi,se,lg,sg,ig,og,qf,ag);Object.assign({},se,Je,Fr,il,Un);var pg=[...Object.keys(Co),...dg],fg={...Co,...ko},gg=n=>n in fg,mg=n=>e=>{if(!e.__breakpoints)return n;const{isResponsive:r,toArrayValue:i,media:o}=e.__breakpoints,a={};for(const s in n){let l=Bt(n[s],e);if(l==null)continue;if(l=Gt(l)&&r(l)?i(l):l,!Array.isArray(l)){a[s]=l;continue}const c=l.slice(0,o.length).length;for(let u=0;un.startsWith("--")&&typeof e=="string"&&!bg(e),wg=(n,e)=>{var r,i;if(e==null)return e;const o=c=>{var u,d;return(d=(u=n.__cssMap)==null?void 0:u[c])==null?void 0:d.varRef},a=c=>{var u;return(u=o(c))!=null?u:c},[s,l]=yg(e);return e=(i=(r=o(s))!=null?r:a(l))!=null?i:a(e),e};function xg(n){const{configs:e={},pseudos:r={},theme:i}=n,o=(a,s=!1)=>{var l,c,u;const d=Bt(a,i),h=mg(d)(i);let p={};for(let g in h){const y=h[g];let w=Bt(y,i);g in r&&(g=r[g]),vg(g,w)&&(w=wg(i,w));let _=e[g];if(_===!0&&(_={property:g}),Gt(w)){p[g]=(l=p[g])!=null?l:{},p[g]=Et({},p[g],o(w,!0));continue}let S=(u=(c=_==null?void 0:_.transform)==null?void 0:c.call(_,w,i,d))!=null?u:w;S=_!=null&&_.processResult?o(S,!0):S;const R=Bt(_==null?void 0:_.property,i);if(!s&&_!=null&&_.static){const j=Bt(_.static,i);p=Et({},p,j)}if(R&&Array.isArray(R)){for(const j of R)p[j]=S;continue}if(R){R==="&"&&Gt(S)?p=Et({},p,S):p[R]=S;continue}if(Gt(S)){p=Et({},p,S);continue}p[g]=S}return p};return o}var Sg=n=>e=>xg({theme:e,pseudos:ko,configs:Co})(n);function _g(n,e){if(Array.isArray(n))return n;if(Gt(n))return e(n);if(n!=null)return[n]}function Ng(n,e){for(let r=e+1;r{Et(c,{[R]:h?S[R]:{[_]:S[R]}})});continue}if(!p){h?Et(c,S):c[_]=S;continue}c[_]=S}}return c}}function kg(n){return e=>{var r;const{variant:i,size:o,theme:a}=e,s=Rg(a);return Et({},Bt((r=n.baseStyle)!=null?r:{},e),s(n,"sizes",o,e),s(n,"variants",i,e))}}function Cg(n){return hg(n,["styleConfig","size","variant","colorScheme"])}var Ag=typeof Element<"u",Tg=typeof Map=="function",Eg=typeof Set=="function",Og=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function Ar(n,e){if(n===e)return!0;if(n&&e&&typeof n=="object"&&typeof e=="object"){if(n.constructor!==e.constructor)return!1;var r,i,o;if(Array.isArray(n)){if(r=n.length,r!=e.length)return!1;for(i=r;i--!==0;)if(!Ar(n[i],e[i]))return!1;return!0}var a;if(Tg&&n instanceof Map&&e instanceof Map){if(n.size!==e.size)return!1;for(a=n.entries();!(i=a.next()).done;)if(!e.has(i.value[0]))return!1;for(a=n.entries();!(i=a.next()).done;)if(!Ar(i.value[1],e.get(i.value[0])))return!1;return!0}if(Eg&&n instanceof Set&&e instanceof Set){if(n.size!==e.size)return!1;for(a=n.entries();!(i=a.next()).done;)if(!e.has(i.value[0]))return!1;return!0}if(Og&&ArrayBuffer.isView(n)&&ArrayBuffer.isView(e)){if(r=n.length,r!=e.length)return!1;for(i=r;i--!==0;)if(n[i]!==e[i])return!1;return!0}if(n.constructor===RegExp)return n.source===e.source&&n.flags===e.flags;if(n.valueOf!==Object.prototype.valueOf&&typeof n.valueOf=="function"&&typeof e.valueOf=="function")return n.valueOf()===e.valueOf();if(n.toString!==Object.prototype.toString&&typeof n.toString=="function"&&typeof e.toString=="function")return n.toString()===e.toString();if(o=Object.keys(n),r=o.length,r!==Object.keys(e).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(e,o[i]))return!1;if(Ag&&n instanceof Element)return!1;for(i=r;i--!==0;)if(!((o[i]==="_owner"||o[i]==="__v"||o[i]==="__o")&&n.$$typeof)&&!Ar(n[o[i]],e[o[i]]))return!1;return!0}return n!==n&&e!==e}var Lg=function(n,e){try{return Ar(n,e)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};const Mg=qs(Lg);function sl(n,e={}){var r;const{styleConfig:i,...o}=e,{theme:a,colorMode:s}=Af(),l=n?Xc(a,"components.".concat(n)):void 0,c=i||l,u=Zc({theme:a,colorMode:s},(r=c==null?void 0:c.defaultProps)!=null?r:{},Ja(ni(o,["children"]))),d=$.useRef({});if(c){const h=kg(c)(u);Mg(d.current,h)||(d.current=h)}return d.current}function jg(n,e={}){return sl(n,e)}function $g(n,e={}){return sl(n,e)}var Pg=new Set([...pg,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),Ig=new Set(["htmlWidth","htmlHeight","htmlSize","htmlTranslate"]);function Dg(n){return Ig.has(n)||!Pg.has(n)}function Bg(n,...e){if(n==null)throw new TypeError("Cannot convert undefined or null to object");const r={...n};for(const i of e)if(i!=null)for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&(o in r&&delete r[o],r[o]=i[o]);return r}var Sa,zg=(Sa=Ho.default)!=null?Sa:Ho,Fg=({baseStyle:n})=>e=>{const{theme:r,css:i,__css:o,sx:a,...s}=e,l=eu(s,(h,p)=>gg(p)),c=me(n,e),u=Bg({},o,c,Ja(l),a),d=Sg(u)(e.theme);return i?[d,i]:d};function Ei(n,e){const{baseStyle:r,...i}=e!=null?e:{};i.shouldForwardProp||(i.shouldForwardProp=Dg);const o=Fg({baseStyle:r}),a=zg(n,i)(o);return D.forwardRef(function(s,l){const{colorMode:c,forced:u}=nl();return D.createElement(a,{ref:l,"data-theme":u?c:void 0,...s})})}function Gg(){const n=new Map;return new Proxy(Ei,{apply(e,r,i){return Ei(...i)},get(e,r){return n.has(r)||n.set(r,Ei(r)),n.get(r)}})}var dt=Gg();function it(n){return $.forwardRef(n)}var _a={path:z.jsxs("g",{stroke:"currentColor",strokeWidth:"1.5",children:[z.jsx("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),z.jsx("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),z.jsx("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},di=it((n,e)=>{const{as:r,viewBox:i,color:o="currentColor",focusable:a=!1,children:s,className:l,__css:c,...u}=n,d=No("chakra-icon",l),h=jg("Icon",n),p={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:o,...c,...h},g={ref:e,focusable:a,className:d,__css:p},y=i!=null?i:_a.viewBox;if(r&&typeof r!="string")return z.jsx(dt.svg,{as:r,...g,...u});const w=s!=null?s:_a.path;return z.jsx(dt.svg,{verticalAlign:"middle",viewBox:y,...g,...u,children:w})});di.displayName="Icon";function Ug(n,e){return"".concat(n," returned `undefined`. Seems you forgot to wrap component within ").concat(e)}function Wg(n={}){const{name:e,strict:r=!0,hookName:i="useContext",providerName:o="Provider",errorMessage:a,defaultValue:s}=n,l=$.createContext(s);l.displayName=e;function c(){var u;const d=$.useContext(l);if(!d&&r){const h=new Error(a!=null?a:Ug(i,o));throw h.name="ContextError",(u=Error.captureStackTrace)==null||u.call(Error,h,c),h}return d}return[l.Provider,c,l]}var Vg=it(function(n,e){const{spacing:r="0.5rem",spacingX:i,spacingY:o,children:a,justify:s,direction:l,align:c,className:u,shouldWrapChildren:d,...h}=n,p=$.useMemo(()=>d?$.Children.map(a,(g,y)=>z.jsx(Ao,{children:g},y)):a,[a,d]);return z.jsx(dt.div,{ref:e,className:No("chakra-wrap",u),...h,children:z.jsx(dt.ul,{className:"chakra-wrap__list",__css:{display:"flex",flexWrap:"wrap",justifyContent:s,alignItems:c,flexDirection:l,listStyleType:"none",gap:r,columnGap:i,rowGap:o,padding:"0"},children:p})})});Vg.displayName="Wrap";var Ao=it(function(n,e){const{className:r,...i}=n;return z.jsx(dt.li,{ref:e,__css:{display:"flex",alignItems:"flex-start"},className:No("chakra-wrap__listitem",r),...i})});Ao.displayName="WrapItem";var To=dt("div");To.displayName="Box";var ll=it(function(n,e){const{size:r,centerContent:i=!0,...o}=n,a=i?{display:"flex",alignItems:"center",justifyContent:"center"}:{};return z.jsx(To,{ref:e,boxSize:r,__css:{...a,flexShrink:0,flexGrow:0},...o})});ll.displayName="Square";var Hg=it(function(n,e){const{size:r,...i}=n;return z.jsx(ll,{size:r,ref:e,borderRadius:"9999px",...i})});Hg.displayName="Circle";var cl=it(function(n,e){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:c,...u}=n,d={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:c};return z.jsx(dt.div,{ref:e,__css:d,...u})});cl.displayName="Flex";const Jg=n=>{const{getEmptyStateProps:e}=Mt(),r=e(z.jsx(cl,{...Kg,children:"No options found!"}));return z.jsx(To,{...n,children:r})},Kg={fontSize:"sm",align:"center",justify:"center",fontWeight:"bold",fontStyle:"italic"},Na=["AutoCompleteGroup","AutoCompleteItem","AutoCompleteCreatable"],Yg=n=>{const e=D.Children.map(n,(i,o)=>{var a;if(((a=i==null?void 0:i.type)==null?void 0:a.displayName)==="AutoCompleteGroup"){const s=D.Children.toArray(n)[o+1];return D.cloneElement(i,{groupSibling:s?s.type.displayName==="AutoCompleteGroup":!1})}return i}),r=D.Children.toArray(e).filter(i=>{var o;return!Na.includes((o=i==null?void 0:i.type)==null?void 0:o.displayName)});return[D.Children.toArray(e).filter(i=>{var o;return Na.includes((o=i==null?void 0:i.type)==null?void 0:o.displayName)}),r]},ul=Wt((n,e)=>{const{children:r,loadingState:i,...o}=n,{listRef:a,isLoading:s}=Mt(),l=Zn(e,a),[c,u]=Yg(r);return z.jsxs(Wa,{ref:l,w:"inherit",...qg,...o,children:[s&&z.jsx(Uc,{children:i||z.jsx(Ua,{size:"md"})}),!s&&z.jsxs(z.Fragment,{children:[c,z.jsx(Jg,{}),u]})]})});ul.displayName="AutoCompleteList";const qg={py:"4",opacity:"0",bg:"#232934",rounded:"md",maxH:"350px",border:"none",shadow:"base",zIndex:"popover",overflowY:"auto",_light:{bg:"#ffffff"},_focus:{boxShadow:"none"}};var[Qg,dl]=Wg({name:"TagStylesContext",errorMessage:"useTagStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),hl=it((n,e)=>{const r=$g("Tag",n),i=Cg(n),o={display:"inline-flex",verticalAlign:"top",alignItems:"center",maxWidth:"100%",...r.container};return z.jsx(Qg,{value:r,children:z.jsx(dt.span,{ref:e,...i,__css:o})})});hl.displayName="Tag";var pl=it((n,e)=>{const r=dl();return z.jsx(dt.span,{ref:e,noOfLines:1,...n,__css:r.label})});pl.displayName="TagLabel";var Xg=it((n,e)=>z.jsx(di,{ref:e,verticalAlign:"top",marginEnd:"0.5rem",...n}));Xg.displayName="TagLeftIcon";var Zg=it((n,e)=>z.jsx(di,{ref:e,verticalAlign:"top",marginStart:"0.5rem",...n}));Zg.displayName="TagRightIcon";var fl=n=>z.jsx(di,{verticalAlign:"inherit",viewBox:"0 0 512 512",...n,children:z.jsx("path",{fill:"currentColor",d:"M289.94 256l95-95A24 24 0 00351 127l-95 95-95-95a24 24 0 00-34 34l95 95-95 95a24 24 0 1034 34l95-95 95 95a24 24 0 0034-34z"})});fl.displayName="TagCloseIcon";var gl=it((n,e)=>{const{isDisabled:r,children:i,...o}=n,a={display:"flex",alignItems:"center",justifyContent:"center",outline:"0",...dl().closeButton};return z.jsx(dt.button,{ref:e,"aria-label":"close",...o,type:"button",disabled:r,__css:a,children:i||z.jsx(fl,{})})});gl.displayName="TagCloseButton";$.memo(n=>{const{label:e,onRemove:r,disabled:i,...o}=n;return z.jsx(Ao,{children:z.jsxs(hl,{borderRadius:"md",fontWeight:"normal",...i&&Ra,...o,children:[z.jsx(pl,{children:e}),z.jsx(gl,{onClick:()=>!i&&me(r),cursor:"pointer",...i&&Ra})]})})});const Ra={cursor:"text",userSelect:"none",opacity:.4,_focus:{boxShadow:"none"}};var zt=function(){return zt=Object.assign||function(n){for(var e,r=1,i=arguments.length;r0)&&!(o=i.next()).done;)a.push(o.value)}catch(l){s={error:l}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(s)throw s.error}}return a},Ca=function(n,e,r){if(r||arguments.length===2)for(var i=0,o=e.length,a;i0)&&!(o=i.next()).done;)a.push(o.value)}catch(l){s={error:l}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(s)throw s.error}}return a},im=function(n,e){var r=n.validator,i=n.onDebouncedChange,o=n.delay,a=n.optionList,s=n.defaultValue;n.onChange;var l=nm(n,["validator","onDebouncedChange","delay","optionList","defaultValue","onChange"]),c=$.useRef(null),u=Zn(c,e),d=$.useRef("datalist-"+new Date().valueOf()),h=rm($.useState(!1),2),p=h[0],g=h[1],y=$.useRef();$.useEffect(function(){c.current&&(c.current.value=(s==null?void 0:s.toString())||"")},[s]);var w=function(S){var R=S.target.value;window.clearTimeout(y.current),r&&g(!r(R)),y.current=window.setTimeout(function(){i==null||i(R),y.current=void 0},o!=null?o:500)},_=function(S){var R=S.target.value;y.current!==void 0&&(window.clearTimeout(y.current),r&&g(!r(R)),i==null||i(R),y.current=void 0)};return m.jsxs(m.Fragment,{children:[m.jsx(Ga,Hi({ref:u,list:d.current,variant:"flushed",size:"sm",h:6,onChange:w,onBlur:_,isInvalid:p},l)),a&&m.jsx("datalist",{id:d.current,children:a==null?void 0:a.map(function(S,R){return m.jsx("option",{children:S},R)})})]})},om=$.forwardRef(im),Ji=function(){return Ji=Object.assign||function(n){for(var e,r=1,i=arguments.length;r0)&&!(o=i.next()).done;)a.push(o.value)}catch(l){s={error:l}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(s)throw s.error}}return a},um=function(n){switch(n){case Ot.DEV:return"red";case Ot.UAT:return"orange";case Ot.PRD:return"green"}};function Z1(n){var e=n.environment,r=n.version,i=n.popoverHeader,o=n.popoverBody,a=cm($.useState(!1),2),s=a[0],l=a[1];return m.jsxs(Fa,{isOpen:s,onOpen:function(){return i&&l(!0)},onClose:function(){return l(!1)},children:[m.jsx(iu,{children:m.jsx(Ka,{ml:1,colorScheme:um(e),title:"".concat(e,": ").concat(r),cursor:i?"pointer":"help",children:e===Ot.PRD?r:e})}),m.jsxs(Wa,{children:[m.jsx(ou,{}),m.jsx(au,{}),m.jsx(su,{children:i}),m.jsx(lu,{children:o})]})]})}var dm=function(n,e,r){var i=new Blob([r],{type:e});hm(n,i)},hm=function(n,e){var r=window.URL.createObjectURL(e),i=document.createElement("a");i.href=r,i.download=n,document.body.appendChild(i),i.click(),document.body.removeChild(i),window.URL.revokeObjectURL(r)},pm=function(n,e){var r=typeof Symbol=="function"&&n[Symbol.iterator];if(!r)return n;var i=r.call(n),o,a=[],s;try{for(;(e===void 0||e-- >0)&&!(o=i.next()).done;)a.push(o.value)}catch(l){s={error:l}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(s)throw s.error}}return a};function fm(n){var e=n.cancelRef,r=n.isOpen,i=n.onClose,o=pm($.useState(!1),2),a=o[0],s=o[1],l=function(){s(!0);var c=Ge.storage.getAll(),u=Ge.getAppName(),d="".concat(u,"_BACKUP_").concat(new Date().toISOString(),".json");dm(d,"application/json",JSON.stringify(c)),Ge.storage.clear(),setTimeout(function(){window.location.reload()},2e3)};return m.jsxs(cu,{leastDestructiveRef:e,isOpen:r,onClose:i,children:[m.jsx(uu,{}),m.jsxs(du,{children:[m.jsx(hu,{children:"Warning 警告"}),m.jsx(pu,{}),m.jsxs(fu,{sx:{"& p":{my:1}},children:[m.jsx(At,{children:"Are you sure you want to reset the app? The webpage local storage for this app will be cleared. A copy of the local storage will be downloaded and it may be used for restoration (varies with app)."}),m.jsx(At,{children:"確定重設該應用程式嗎?應用程式的網頁本地儲存將會被清除。本地儲存的副本可供下載及用於復原(因應用程式而異)。"}),m.jsx(At,{children:"确定重置本应用程序吗?应用程序的网页本地存储将会被清除。本地存储的拷贝可供下载以及用于还原(因应用程序而異)。"})]}),m.jsxs(gu,{children:[m.jsx(dn,{ref:e,onClick:i,children:"Cancel"}),m.jsx(dn,{isLoading:a,colorScheme:"red",ml:3,onClick:l,children:"Confirm and reload"})]})]})]})}var Vn=function(){return Vn=Object.assign||function(n){for(var e,r=1,i=arguments.length;r0)&&!(o=i.next()).done;)a.push(o.value)}catch(l){s={error:l}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(s)throw s.error}}return a};function ym(n){var e=n.error,r=n.errorInfo,i=n.allowReset,o=n.sx,a=gm(n,["error","errorInfo","allowReset","sx"]),s=ht("RmgErrorBoundary"),l=Ya("primary.500","primary.300"),c=mm($.useState(!1),2),u=c[0],d=c[1],h=$.useRef(null),p=function(w){return m.jsx(zn,{color:l,role:"button",onClick:function(){return d(!0)},children:w})},g=Ge.getAppName(),y=m.jsx(zn,{color:l,href:"https://github.com/railmapgen/".concat(g,"/issues"),isExternal:!0,children:"GitHub Issue"});return m.jsxs(io,Vn({status:"error",sx:Vn(Vn({},s),o)},a,{children:[m.jsx(oo,{}),m.jsx(mu,{children:"Something went wrong!"}),m.jsxs(yu,{children:[m.jsxs(At,{children:["Please try to refresh or re-import your configuration files. If the issue still persists, please consider upgrading your browser",i?m.jsxs(m.Fragment,{children:[" or ",p("reset this app")]}):"",". Should you need any help, please contact us by submitting an issue in ",y," with the details shown below."]}),m.jsxs(At,{children:["請嘗試重新整理或重新上載設定檔。如果問題仍然存在,請考慮更新你的瀏覽器",i?m.jsxs(m.Fragment,{children:["或",p("重設該應用程式")]}):"","。如需協助或與我們聯絡,請前往 ",y," 提交一個 Issue 並附以詳細資料。"]}),m.jsxs(At,{children:["请尝试刷新或者重新上传配置文件。如果问题仍然存在,请考虑更新您的浏览器",i?m.jsxs(m.Fragment,{children:["或者",p("重置本应用程序")]}):"","。如需帮助或者联系我们,请前往 ",y," 提交一个 Issue 并附上详细信息。"]}),m.jsxs(At,{as:"details",children:[e==null?void 0:e.toString(),m.jsx("br",{}),r==null?void 0:r.componentStack]}),i&&m.jsx(fm,{cancelRef:h,isOpen:u,onClose:function(){return d(!1)}})]})]}))}var bm=function(){var n=function(e,r){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,o){i.__proto__=o}||function(i,o){for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(i[a]=o[a])},n(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");n(e,r);function i(){this.constructor=e}e.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}}(),Ki=function(){return Ki=Object.assign||function(n){for(var e,r=1,i=arguments.length;r0)&&!(o=i.next()).done;)a.push(o.value)}catch(l){s={error:l}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(s)throw s.error}}return a};function Nm(n){var e=n.defaultValue,r=n.options,i=n.disabledOptions,o=_m(n,["defaultValue","options","disabledOptions"]),a=$.useRef(null);$.useEffect(function(){a.current&&(a.current.value=(e==null?void 0:e.toString())||"")},[e]);var s=function(l,c){return m.jsx("option",{value:l,disabled:(i==null?void 0:i.find(function(u){return u.toString()===l}))!==void 0,children:c},l)};return m.jsx(wu,qi({ref:a,variant:"flushed",size:"sm",h:6},o,{children:Object.entries(r).map(function(l){var c=Aa(l,2),u=c[0],d=c[1];return typeof d=="object"?m.jsx("optgroup",{label:u,children:Object.entries(d).map(function(h){var p=Aa(h,2),g=p[0],y=p[1];return s(g,y)})},u):s(u,d)})}))}var Rm=function(n,e){var r=typeof Symbol=="function"&&n[Symbol.iterator];if(!r)return n;var i=r.call(n),o,a=[],s;try{for(;(e===void 0||e-- >0)&&!(o=i.next()).done;)a.push(o.value)}catch(l){s={error:l}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(s)throw s.error}}return a},ex=function(n,e,r){var i=Rm($.useState(e()),2),o=i[0],a=i[1];return $.useEffect(function(){n.then(function(){console.debug("[rmg-components] Getter updates finished"),a(e())})},[]),o},Oi=function(n,e){var r=typeof Symbol=="function"&&n[Symbol.iterator];if(!r)return n;var i=r.call(n),o,a=[],s;try{for(;(e===void 0||e-- >0)&&!(o=i.next()).done;)a.push(o.value)}catch(l){s={error:l}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(s)throw s.error}}return a},Ta=function(n,e,r){if(r||arguments.length===2)for(var i=0,o=e.length,a;i0)&&!(o=i.next()).done;)a.push(o.value)}catch(l){s={error:l}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(s)throw s.error}}return a};function Am(n){var e=n.defaultValue,r=n.min,i=n.max,o=n.step,a=n.onThrottledChange,s=n.leftIcon,l=n.rightIcon,c=ht("RmgThrottledSlider"),u=Cm($.useState(e!=null?e:0),2),d=u[0],h=u[1];$.useEffect(function(){e!==void 0&&d!==e&&h(e)},[e]);var p=km(a!=null?a:function(){},500),g=function(){var w=Math.min(d+(o!=null?o:1)*10,i!=null?i:100);a==null||a(w),h(w)},y=function(){var w=Math.max(d-(o!=null?o:1)*10,r!=null?r:0);a==null||a(w),h(w)};return m.jsxs(ct,{sx:c,children:[s&&m.jsx(Er,{size:"xs",variant:"ghost","aria-label":"Drag left",icon:s,onClick:y}),m.jsxs(xu,{value:d,min:r,max:i,step:o,onChange:function(w){p(w),h(w)},children:[m.jsx(Su,{children:m.jsx(_u,{})}),m.jsx(Nu,{})]}),l&&m.jsx(Er,{size:"xs",variant:"ghost","aria-label":"Drag right",icon:l,onClick:g})]})}var Tm=function(n){var e=n.children,r=n.noWrap,i=ht("RmgOutput",{noWrap:r});return m.jsx(Tr.output,{sx:i,children:e})};function Ee(n){var e=n.fields,r=n.noLabel,i=n.minW;return m.jsx(ct,{wrap:"wrap",children:e.map(function(o,a){if(o.hidden)return m.jsx($.Fragment,{},a);var s=o.minW||i,l=s==="full";return m.jsx(Sm,{className:l?"mw-full":"",label:o.label,flex:l?void 0:1,minW:l?void 0:s,noLabel:r,oneLine:o.oneLine,children:function(c){switch(c.type){case"input":return m.jsx(om,{placeholder:c.placeholder,defaultValue:c.value,type:c.variant,validator:c.validator,onDebouncedChange:c.onChange,delay:c.debouncedDelay,optionList:c.optionList,isDisabled:c.isDisabled});case"output":return m.jsx(Tm,{noWrap:c.noWrap,children:c.value});case"textarea":return m.jsx(lm,{placeholder:c.placeholder,defaultValue:c.value,onDebouncedChange:c.onChange,isDisabled:c.isDisabled});case"slider":return m.jsx(Am,{defaultValue:c.value,min:c.min,max:c.max,step:c.step,onThrottledChange:c.onChange,leftIcon:c.leftIcon,rightIcon:c.rightIcon,isDisabled:c.isDisabled});case"select":return m.jsx(Nm,{defaultValue:c.value,onChange:function(u){var d,h=u.target.value;return(d=c.onChange)===null||d===void 0?void 0:d.call(c,typeof c.value=="number"?Number(h):h.toString())},options:c.options,disabledOptions:c.disabledOptions,isInvalid:c.isInvalid,isDisabled:c.isDisabled});case"switch":return m.jsx(Ru,{isChecked:c.isChecked,isDisabled:c.isDisabled,onChange:function(u){var d,h=u.target.checked;return(d=c.onChange)===null||d===void 0?void 0:d.call(c,h)}});case"custom":return c.component;default:return m.jsx("div",{})}}(o)},a)})})}var Lt=function(){return Lt=Object.assign||function(n){for(var e,r=1,i=arguments.length;r button:first-of-type":{ml:1}}},Gm={baseStyle:{w:"100%",h:"100%",position:"absolute",top:0,right:0,alignItems:"center",justifyContent:"center","& .rmg-loader__backdrop":{position:"absolute",w:"100%",h:"100%",zIndex:1500,bg:"blackAlpha.400"},"& .chakra-progress":{zIndex:2e3}}},Rt=function(n){return n==="dark"?"primary.300":"primary.500"},Um={baseStyle:function(n){var e=n.theme,r=n.colorMode;return{"& .rmg-multi-select__wrapper":{position:"relative",w:"100%",h:"25.75px",transform:"translateY(1.75px)",cursor:"default"},"& .rmg-multi-select__field":{position:"relative",w:"100%",minW:0,outline:0,appearance:"none",transitionProperty:"common",transitionDuration:"normal",pb:"1px",fontSize:"sm",h:"6",borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_active:{borderColor:Rt(r),boxShadow:"0px 1px 0px 0px ".concat(Bn(e,Rt(r)))},_focus:{borderColor:Rt(r),boxShadow:"0px 1px 0px 0px ".concat(Bn(e,Rt(r)))},_focusVisible:{borderColor:Rt(r),boxShadow:"0px 1px 0px 0px ".concat(Bn(e,Rt(r)))},"&.active":{borderColor:Rt(r),boxShadow:"0px 1px 0px 0px ".concat(Bn(e,Rt(r)))},"& > span:last-of-type":{position:"absolute",right:8}},"& .rmg-multi-select__icon-wrapper":{display:"inline-flex",justifyContent:"center",w:6,h:"100%",position:"absolute",right:2,top:0,fontSize:"xl","& svg":{h:"1em",w:"1em"}},"& .chakra-popover__content":{w:"unset",minW:200},"& .chakra-popover__body":{p:0,"li label":{p:2,w:"100%",_hover:{bg:r==="dark"?"whiteAlpha.200":"gray.100"},_active:{bg:r==="dark"?"whiteAlpha.300":"gray.200"}}}}}},Xi=function(){return Xi=Object.assign||function(n){for(var e,r=1,i=arguments.length;r(n.RailMap="railmap",n.Platform="platform",n))(sy||{}),ly=(n=>(n.Metro="metro",n.NationalRail="nationalrail",n.LightRail="lightrail",n.Footpath="footpath",n))(ly||{}),cy=(n=>(n.APP_LOAD="APP_LOAD",n.ADD_STATION="ADD_STATION",n.ADD_LINE="ADD_LINE",n.IMPORT_RMG_PARAM="IMPORT_RMG_PARAM",n.IMPORT_WORK_FROM_GALLERY="IMPORT_WORK_FROM_GALLERY",n.DOWNLOAD_PARAM="DOWNLOAD_PARAM",n.DOWNLOAD_IMAGES="DOWNLOAD_IMAGES",n.LOAD_TUTORIAL="LOAD_TUTORIAL",n))(cy||{}),rt=(n=>(n.LOGIN_STATE="rmp__login_state",n.APP="rmp__app",n.PARAM="rmp__param",n.PARAM_BACKUP="rmp__param__backup",n.DO_NOT_SHOW_RMT_MSG="rmp__doNotShowRMTMsg",n.ACCOUNT="rmg-home__account",n))(rt||{}),ye=(n=>(n.Other="other",n.Beijing="beijing",n.Berlin="berlin",n.Chongqing="chongqing",n.Foshan="foshan",n.Guangzhou="guangzhou",n.Hongkong="hongkong",n.Kunming="kunming",n.London="london",n.Qingdao="qingdao",n.Shanghai="shanghai",n.Shenzhen="shenzhen",n.Singapore="singapore",n.Suzhou="suzhou",n.Tokyo="tokyo",n))(ye||{});const uy="https://railmapgen.org/v1/subscription",Jn={RMP_CLOUD:!1,RMP_EXPORT:!1},dy={state:"logged-out",activeSubscriptions:Jn,timeout:void 0},bl=ri({name:"account",initialState:dy,reducers:{setState:(n,e)=>{n.state=e.payload},setActiveSubscriptions:(n,e)=>{n.activeSubscriptions=e.payload},setLoginStateTimeout:(n,e)=>{n.timeout=e.payload}}}),{setState:sn,setActiveSubscriptions:Kn,setLoginStateTimeout:eo}=bl.actions,hy=bl.reducer;var de;(function(n){n.black="#000",n.white="#fff"})(de||(de={}));var vl=function(n,e,r,i){function o(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function l(d){try{u(i.next(d))}catch(h){s(h)}}function c(d){try{u(i.throw(d))}catch(h){s(h)}}function u(d){d.done?a(d.value):o(d.value).then(l,c)}u((i=i.apply(n,e||[])).next())})};let Mi={};const py=(n,e)=>vl(void 0,void 0,void 0,function*(){if(n in Mi)return Mi[n];const i=yield(yield fetch(n,e)).json();return Mi[n]=i,i}),fy=(n,e)=>vl(void 0,void 0,void 0,function*(){return yield py("/rmg-palette/resources/palettes/".concat(n,".json"),{signal:e})});var gy=function(n,e,r,i){function o(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function l(d){try{u(i.next(d))}catch(h){s(h)}}function c(d){try{u(i.throw(d))}catch(h){s(h)}}function u(d){d.done?a(d.value):o(d.value).then(l,c)}u((i=i.apply(n,e||[])).next())})};const sx=(n,e,r)=>gy(void 0,void 0,void 0,function*(){const[i,o]=n;if(i==="other")return n;try{const s=(yield fy(i)).find(l=>l.id===o);return s?[i,o,s.colour,s.fg||de.white]:(console.warn("[rmg-palette] updateTheme(".concat(i,", ").concat(o,"), line does not exist, returning old theme")),n)}catch(a){throw console.error("[rmg-palette] updateTheme(".concat(i,", ").concat(o,"), unexpected error occurs"),a),a}}),lx=n=>{const e=n.currentTarget.getBoundingClientRect(),r=n.clientX-e.left,i=n.clientY-e.top;return{x:r,y:i}},cx=(n,e,r,i)=>({x:n*r/100+i.x,y:e*r/100+i.y}),ux=(n,e)=>Math.round(n/e)*e,dx=n=>{let[e,r,i,o]=[Number.MAX_VALUE,Number.MAX_VALUE,Number.MIN_VALUE,Number.MIN_VALUE];return n.forEachNode((a,s)=>{const l=document.getElementById(a);if(l){const c=my(l);e=Math.min(c.x,e),r=Math.min(c.y,r),i=Math.max(c.x+c.width,i),o=Math.max(c.y+c.height,o)}}),e-=50,r-=50,i+=100,o+=100,{xMin:e,yMin:r,xMax:i,yMax:o}},hx=n=>{var e,r;return{width:((e=n.width)!=null?e:720)-40,height:((r=n.height)!=null?r:1280)-40}},my=n=>{const e=n.getBBox(),r=n.ownerSVGElement,i=n.parentNode.getScreenCTM().inverse().multiply(n.getScreenCTM()),o=[r.createSVGPoint(),r.createSVGPoint(),r.createSVGPoint(),r.createSVGPoint()];o[0].x=e.x,o[0].y=e.y,o[1].x=e.x+e.width,o[1].y=e.y,o[2].x=e.x+e.width,o[2].y=e.y+e.height,o[3].x=e.x,o[3].y=e.y+e.height;let[a,s,l,c]=[Number.MAX_VALUE,Number.MAX_VALUE,Number.MIN_VALUE,Number.MIN_VALUE];return o.forEach(u=>{u=u.matrixTransform(i),a=Math.min(a,u.x),l=Math.max(l,u.x),s=Math.min(s,u.y),c=Math.max(c,u.y)}),e.x=a,e.width=l-a,e.y=s,e.height=c-s,e},px=navigator.platform.startsWith("Mac"),yy=async(n,e="SHA-256")=>{const i=new TextEncoder().encode(n),o=await crypto.subtle.digest(e,i);return Array.from(new Uint8Array(o)).map(s=>s.toString(16).padStart(2,"0")).join("")},fx=()=>{const n=Math.floor(Math.random()*16777215);return"#".concat(n.toString(16).padStart(6,"0"))},gx=n=>{const e=parseInt(n.slice(1,3),16),r=parseInt(n.slice(3,5),16),i=parseInt(n.slice(5,7),16);return(e*299+r*587+i*114)/1e3>=128?de.black:de.white},by="rmt-save-manager";var vy=(n=>(n.SAVE_CHANGED="SAVE_CHANGED",n.TOKEN_REQUEST="TOKEN_REQUEST",n))(vy||{});const Eo=new BroadcastChannel(by);let ji;const wy=async n=>{const e=await yy(JSON.stringify(n));ji&&ji!==e&&Eo.postMessage({type:"SAVE_CHANGED",key:rt.PARAM,from:"rmp"}),ji=e},Ma=async()=>{Eo.postMessage({type:"TOKEN_REQUEST",from:"rmp"})},xy=async n=>{const e=async r=>{const{type:i,token:o,from:a}=r.data;if(i==="TOKEN_REQUEST"&&a==="rmt"){if(n.getState().account.timeout&&(window.clearTimeout(n.getState().account.timeout),n.dispatch(eo(void 0))),!o){n.dispatch(sn("logged-out")),n.dispatch(Kn(Jn));return}const s=await fetch(uy,{headers:{accept:"application/json","Content-Type":"application/json",Authorization:"Bearer ".concat(o)}});if(s.status!==200){n.dispatch(sn("expired")),n.dispatch(Kn(Jn));return}n.dispatch(sn("free"));const l=(await s.json()).subscriptions,c=structuredClone(Jn);for(const u of l){const d=u.type;d in c&&(n.dispatch(sn("subscriber")),c[d]=!0)}n.dispatch(Kn(c))}};Eo.addEventListener("message",e)},Sy="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let _y=(n=21)=>{let e="",r=crypto.getRandomValues(new Uint8Array(n));for(;n--;)e+=Sy[r[n]&63];return e};var N=(n=>(n.Diagonal="diagonal",n.Perpendicular="perpendicular",n.RotatePerpendicular="ro-perp",n.Simple="simple",n))(N||{}),U=(n=>(n.SingleColor="single-color",n.ShanghaiSuburbanRailway="sh-sub-rwy",n.ShmetroVirtualInt="shmetro-virtual-int",n.GzmtrVirtualInt="gzmtr-virtual-int",n.ChinaRailway="china-railway",n.BjsubwaySingleColor="bjsubway-single-color",n.BjsubwayTram="bjsubway-tram",n.BjsubwayDotted="bjsubway-dotted",n.DualColor="dual-color",n.River="river",n.MTRRaceDays="mtr-race-days",n.MTRLightRail="mtr-light-rail",n.MTRUnpaidArea="mtr-unpaid-area",n.MTRPaidArea="mtr-paid-area",n.MRTUnderConstruction="mrt-under-constr",n.MRTSentosaExpress="mrt-sentosa-express",n.JREastSingleColor="jr-east-single-color",n.JREastSingleColorPattern="jr-east-single-color-pattern",n.LRTSingleColor="lrt-single-color",n.LondonTubeTerminal="london-tube-terminal",n.LondonTubeInternalInt="london-tube-internal-int",n.LondonTube10MinWalk="london-tube-10-min-walk",n.GuangdongIntercityRailway="gd-intercity-rwy",n))(U||{});const mx=["single-color","bjsubway-single-color","bjsubway-tram","bjsubway-dotted","china-railway","mtr-race-days","mtr-light-rail","mrt-under-constr","jr-east-single-color","jr-east-single-color-pattern","lrt-single-color"],Ny=(n,e,r,i,o=Gr)=>{const{offset:a=Gr.offset}=o,s=Math.abs((i-r)/(e-n));if(s===1/0)return"M ".concat(n+a," ").concat(r," L ").concat(e+a," ").concat(i);if(s===0)return"M ".concat(n," ").concat(r+a," L ").concat(e," ").concat(i+a);{const l=1/s,c=a/Math.sqrt(l*l+1),u=c*l*-Math.sign((e-n)*(i-r));return"M ".concat(n+c," ").concat(r+u," L ").concat(e+c," ").concat(i+u)}},Gr={offset:0},Ry=n=>{var s;const{id:e,attrs:r,handleAttrsUpdate:i}=n,{t:o}=Te(),a=[{type:"input",label:o("panel.details.lines.simple.offset"),value:((s=r.offset)!=null?s:Gr.offset).toString(),variant:"number",onChange:l=>{r.offset=Number(l),i(e,r)},minW:"full"}];return m.jsx(Ee,{fields:a})},ky=m.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:m.jsx("path",{d:"M6,18L18,6",stroke:"currentColor",fill:"none"})}),Cy={generatePath:Ny,icon:ky,defaultAttrs:Gr,attrsComponent:Ry,metadata:{displayName:"panel.details.lines.simple.displayName"}},yx={translateX:0,translateY:0,scale:1,rotate:0},Ay=3,Ty=1/0;var st=(n=>(n.Virtual="virtual",n.ShmetroNumLineBadge="shmetro-num-line-badge",n.ShmetroTextLineBadge="shmetro-text-line-badge",n.GzmtrLineBadge="gzmtr-line-badge",n.BjsubwayNumLineBadge="bjsubway-num-line-badge",n.BjsubwayTextLineBadge="bjsubway-text-line-badge",n.SuzhouRTNumLineBadge="suzhourt-num-line-badge",n.BerlinSBahnLineBadge="berlin-s-bahn-line-badge",n.BerlinUBahnLineBadge="berlin-u-bahn-line-badge",n.ChongqingRTNumLineBadge="chongqingrt-num-line-badge",n.ChongqingRTTextLineBadge="chongqingrt-text-line-badge",n.ShenzhenMetroNumLineBadge="shenzhen-metro-num-line-badge",n.MRTDestinationNumbers="mrt-num-line-badge",n.JREastLineBadge="jr-east-line-badge",n.QingdaoMetroNumLineBadge="qingdao-metro-num-line-badge",n.MRTLineBadge="mrt-line-badge",n.GuangdongIntercityRailwayLineBadge="gd-intercity-rwy-line-badge",n.Facilities="facilities",n.Text="text",n.I18nText="i18n-text",n.Master="master",n))(st||{});const Ey="操作",Oy="应用程序",Ly="黑",My="取消",jy="城市",$y="组件",Py="确定",Iy="继续",Dy="复制",By="编辑",zy="语言/Language",Fy="理由",Gy="名称",Uy="下一步",Wy="打开",Vy="调色板",Hy="上一步",Jy="删除",Ky="重置",Yy="设置",qy="提交",Qy="翻译",Xy="上传",Zy="白",eb={Action:Ey,Apps:Oy,"Back to list":"返回列表","Background colour":"背景色",Black:Ly,Cancel:My,City:jy,Components:$y,"Configuration file":"配置文件",Confirm:Py,Continue:Iy,"Country/Region":"国家/地区",Copy:Dy,Edit:By,"Foreground colour":"前景色","Go back":"返回",Language:zy,Justification:Fy,Name:Gy,Next:Uy,Open:Wy,Palette:Vy,"Please select...":"请选择...",Previous:Hy,"Rail Map Generator":"铁路线路图生成器","Rail Map Painter":"地铁线路图绘制器","Rail Map Toolkit":"线路图工具包",Remove:Jy,Reset:Ky,"RMG Templates":"RMG 模板","RMP Gallery":"RMP 画廊","RMP Designer":"RMP 设计师","Seed Project":"种子项目",Settings:Yy,Submit:qy,Translate:Qy,Upload:Xy,White:Zy},tb="動作",nb="應用程式",rb="黑",ib="取消",ob="城市",ab="元件",sb="確定",lb="繼續",cb="複製",ub="編輯",db="語言/Language",hb="理由",pb="名稱",fb="下一步",gb="開啟",mb="調色盤",yb="上一步",bb="移除",vb="重設",wb="設定",xb="提交",Sb="翻譯",_b="上載",Nb="白",Rb={Action:tb,Apps:nb,"Back to list":"返回列表","Background colour":"背景色",Black:rb,Cancel:ib,City:ob,Components:ab,"Configuration file":"設定檔",Confirm:sb,Continue:lb,Copy:cb,"Country/Region":"國家/地區",Edit:ub,"Foreground colour":"前景色","Go back":"返回",Language:db,Justification:hb,Name:pb,Next:fb,Open:gb,Palette:mb,"Please select...":"請選擇...",Previous:yb,"Rail Map Generator":"鐵路路綫圖產生器","Rail Map Painter":"地鐵路綫圖繪製器","Rail Map Toolkit":"路綫圖工具組",Remove:bb,Reset:vb,"RMG Templates":"RMG 範本","RMP Gallery":"RMP 畫廊","RMP Designer":"RMP 設計師","Seed Project":"種子項目",Settings:wb,Submit:xb,Translate:Sb,Upload:_b,White:Nb},kb="言語/Language",Cb="調色板",Ab="削除",Tb={Language:kb,Palette:Cb,"Rail Map Generator":"鉄道路線図ジェネレータ","Rail Map Painter":"鉄道路線図画家","Rail Map Toolkit":"路線図ツールキット",Remove:Ab,"RMG Templates":"RMG テンプレート","RMP Gallery":"RMP 画廊","RMP Designer":"RMP 図案家"},Eb="조작",Ob="앱",Lb="블랙",Mb="취소",jb="도시",$b="요소",Pb="확인",Ib="복사",Db="편집",Bb="언어/Language",zb="이유",Fb="명칭",Gb="다음",Ub="열기",Wb="팔레트",Vb="나아가",Hb="삭제",Jb="리셋",Kb="설치",Yb="제출",qb="번역",Qb="업로드",Xb="화이트",Zb={Action:Eb,Apps:Ob,"Back to list":"다시 목록으로","Background colour":"배경색",Black:Lb,Cancel:Mb,City:jb,Components:$b,"Configuration file":"환경 설정 파일",Confirm:Pb,Copy:Ib,"Country/Region":"국가/지역",Edit:Db,"Foreground colour":"전경색","Go back":"되돌아가",Language:Bb,Justification:zb,Name:Fb,Next:Gb,Open:Ub,Palette:Wb,"Please select...":"선택해주세요",Previous:Vb,"Rail Map Generator":"철도 노선도 생성기","Rail Map Painter":"지하철 노선도 그리기","Rail Map Toolkit":"노선도 툴킷",Remove:Hb,Reset:Jb,"RMG Templates":"RMG 템플릿","RMP Gallery":"RMP 갤러리","RMP Designer":"RMP 디자이너","Seed Project":"종자 프로젝트",Settings:Kb,Submit:Yb,Translate:qb,Upload:Qb,White:Xb};var ev={en:{},"zh-Hans":eb,"zh-Hant":Rb,ja:Tb,ko:Zb};const tv="Color",nv="Warning",rv="Cancel",iv="Apply",ov="Remove",av="Close",sv="Don't show me again",lv="The all-in-one toolkit you definitely do not want to miss!",cv={tools:{showLess:"Show less",section:{lineDrawing:"Line drawing",stations:"Stations",miscellaneousNodes:"Miscellaneous nodes"},select:"Select",learnHowToAdd:{station:"Learn how to add your stations!","misc-node":"Learn how to add your nodes!",line:"Learn how to add your line styles!"}},details:{header:"Details",info:{title:"Basic information",id:"ID",zIndex:"Depth",stationType:"Station Type",linePathType:"Line Path Type",lineStyleType:"Line Style Type",type:"Type",parallel:"Parallel line",parallelIndex:"Parallel index"},multipleSelection:{title:"Multiple Selection",change:"Change selected attributes",selected:"Selected Objects:",show:"Show",station:"Stations",miscNode:"MiscNodes",edge:"Lines"},changeStationTypeContent:"Changing station's type will remove all attributes from the station except its names.",changeLineTypeContent:"Changing line's type will remove all attributes from the line.",changeType:"Change Type",nodePosition:{title:"Node Position",pos:{x:"Coordinate X",y:"Coordinate Y"}},lineExtremities:{title:"Line Extremities",source:"Source",target:"Target",sourceName:"Source Name",targetName:"Target Name"},specificAttrsTitle:"Specific Attributes",unknown:{error:"Oops :( We can't recognize this {{category}}. Maybe it is created in a newer version.",node:"node",linePath:"line path",lineStyle:"line style"},nodes:{common:{nameZh:"Line name in Chinese",nameEn:"Line name in English",nameJa:"Line name in Japanese",num:"Line number"},virtual:{displayName:"Virtual node"},shmetroNumLineBadge:{displayName:"Shanghai Metro num line badge"},shmetroTextLineBadge:{displayName:"Shanghai Metro text line badge"},gzmtrLineBadge:{displayName:"Guangzhou Metro line badge",tram:"Tram",span:"Row-spanning digits"},bjsubwayNumLineBadge:{displayName:"Beijing Subway num line badge"},bjsubwayTextLineBadge:{displayName:"Beijing Subway text line badge"},berlinSBahnLineBadge:{displayName:"Berlin S Bahn line badge"},berlinUBahnLineBadge:{displayName:"Berlin U Bahn line badge"},suzhouRTNumLineBadge:{displayName:"Suzhou Rail Transit num line badge",branch:"Is branch line"},chongqingRTNumLineBadge:{displayName:"Chongqing Rail Transit num line badge"},chongqingRTTextLineBadge:{displayName:"Chongqing Rail Transit text line badge"},shenzhenMetroNumLineBadge:{displayName:"Shenzhen Metro num line badge",branch:"Is branch line"},mrtDestinationNumbers:{displayName:"Singapore MRT destination numbers"},mrtLineBadge:{displayName:"Singapore MRT line badge",isTram:"Is LRT line badge"},jrEastLineBadge:{displayName:"JR East line badge",crosshatchPatternFill:"Fill with crosshatch pattern"},qingdaoMetroNumLineBadge:{displayName:"Qingdao Metro Num line badge",numEn:"Line number in English",showText:"Show text"},guangdongIntercityRailwayLineBadge:{displayName:"Guangdong Intercity Railway line badge"},master:{displayName:"Master node",type:"Master node type",undefined:"Undefined"},facilities:{displayName:"Facilities",type:"Type"},text:{displayName:"Arbitrary text",content:"Content",fontSize:"Font size",lineHeight:"Line height",textAnchor:"Text anchor",start:"Start",middle:"Middle",end:"End",auto:"Auto",hanging:"Hanging",dominantBaseline:"Dominant baseline",language:"Font family in which language",zh:"Chinese",en:"English",mtr__zh:"Hongkong MTR Chinese",mtr__en:"Hongkong MTR English",berlin:"Berlin S/U Bahn",mrt:"Singapore MRT",jreast_ja:"JR East Japanese",jreast_en:"JR East English",rotate:"Rotation",italic:"Italic",bold:"Bold"}},stations:{common:{nameZh:"Names in Chinese",nameEn:"Names in English",nameJa:"Names in Japanese",nameOffsetX:"Names offset X",nameOffsetY:"Names offset Y",rotate:"Icon rotation",lineCode:"Line code",stationCode:"Station code",left:"Left",middle:"Middle",right:"Right",top:"Top",bottom:"Bottom"},interchange:{title:"Interchanges",within:"Within-station interchange",outStation:"Out-of-station interchange",outSystem:"Out-of-system interchange",addGroup:"Add interchange group",noInterchanges:"No interchanges",nameZh:"Chinese name",nameEn:"English name",add:"Add interchange",copy:"Copy interchange",remove:"Remove interchange"},shmetroBasic:{displayName:"Shanghai Metro basic station"},shmetroBasic2020:{displayName:"Shanghai Metro basic station (2020)"},shmetroInt:{displayName:"Shanghai Metro interchange station",height:"Icon height",width:"Icon width"},shmetroOsysi:{displayName:"Shanghai Metro out-of-system interchange station"},shanghaiSuburbanRailway:{displayName:"Shanghai Suburban Railway station"},gzmtrBasic:{displayName:"Guangzhou Metro basic station",open:"Is opened",secondaryNameZh:"Secondary name in Chinese",secondaryNameEn:"Secondary name in English",tram:"Tram"},gzmtrInt:{displayName:"Guangzhou Metro interchange station",open:"Is opened",secondaryNameZh:"Secondary name in Chinese",secondaryNameEn:"Secondary name in English",foshan:"Foshan"},gzmtrInt2024:{displayName:"Guangzhou Metro interchange station (2024)",anchorAt:"Anchor at",anchorAtNone:"Center",preferVertical:"Vertical layout (2 interchanges only)"},bjsubwayBasic:{displayName:"Beijing Subway basic station",open:"Is opened"},bjsubwayInt:{displayName:"Beijing Subway interchange station",outOfStation:"Out of station interchange"},mtr:{displayName:"Hongkong MTR station",rotate:"Icon rotation"},suzhouRTBasic:{displayName:"Suzhou Rail Transit basic station",textVertical:"Vertical names"},suzhouRTInt:{displayName:"Suzhou Rail Transit interchange station"},kunmingRTBasic:{displayName:"Kunming Rail Transit basic station"},kunmingRTInt:{displayName:"Kunming Rail Transit interchange station"},MRTBasic:{displayName:"Singapore MRT basic station",isTram:"Is LRT station"},MRTInt:{displayName:"Singapore MRT interchange station"},jrEastBasic:{displayName:"JR East basic station",nameOffset:"Names offset",textOneLine:"Names in one line",textVertical:"Vertical names",important:"Important station",lines:"Interchange lines offset"},jrEastImportant:{displayName:"JR East important station",textVertical:"Vertical names",mostImportant:"Most important station",minLength:"Minimal length of the station"},foshanMetroBasic:{displayName:"Foshan Metro basic station",open:"Is opened",secondaryNameZh:"Secondary name in Chinese",secondaryNameEn:"Secondary name in English",tram:"Tram"},qingdaoMetro:{displayName:"Qingdao Metro station",isInt:"Is interchange station"},tokyoMetroBasic:{displayName:"Tokyo Metro basic station",nameOffset:"Names offset",textVertical:"Vertical names",lineCode:"Line code",stationCode:"Station code"},tokyoMetroInt:{displayName:"Tokyo Metro interchange station",mereOffset:{displayName:"Names mere offset",none:"None",left1:"Left (less)",left2:"Left (more)",right1:"Right (less)",right2:"Right (more)",up:"Up",down:"Down"},importance:{displayName:"Station importance",default:"Default",middle:"Middle",high:"High"},align:{displayName:"Icon align",horizontal:"Horizontal",vertical:"Vertical"}},londonTubeCommon:{stepFreeAccess:"Step free access",stepFreeAccessNone:"None",stepFreeAccessTrain:"From street to train",stepFreeAccessPlatform:"From street to platform"},londonTubeBasic:{displayName:"London Tube basic station",terminal:"Terminal station",shareTracks:"Track shares",shareTracksIndex:"Index of the track shares"},londonTubeInt:{displayName:"London Tube interchange station"},guangdongIntercityRailway:{displayName:"Guangdong Intercity Railway station"}},lines:{reconcileId:"Reconcile ID",common:{offsetFrom:"Offset From",offsetTo:"Offset To",startFrom:"Start From",from:"From",to:"To",roundCornerFactor:"Round Corner Factor",parallelDisabled:"Some attributes are disabled as this line is parallel.",changeInBaseLine:"Change them in the base line:"},simple:{displayName:"Simple path",offset:"Offset"},diagonal:{displayName:"135° diagonal path"},perpendicular:{displayName:"90° perpendicular path"},rotatePerpendicular:{displayName:"90° rotate perpendicular path"},singleColor:{displayName:"Single color style"},shmetroVirtualInt:{displayName:"Shanghai Metro out-of-station interchange style"},shanghaiSuburbanRailway:{displayName:"Shanghai Suburban Railway style",isEnd:"Is the ending line"},gzmtrVirtualInt:{displayName:"Guangzhou Metro out-of-station interchange style"},chinaRailway:{displayName:"China Railway style"},bjsubwaySingleColor:{displayName:"Beijing Subway single color style"},bjsubwayTram:{displayName:"Beijing Subway tram style"},bjsubwayDotted:{displayName:"Beijing Subway dotted style"},dualColor:{displayName:"Dual color style",swap:"Swap color",colorA:"Color A",colorB:"Color B"},river:{displayName:"River style",width:"Width"},mtrRaceDays:{displayName:"Hongkong MTR race days style"},mtrLightRail:{displayName:"Hongkong MTR light rail style"},mtrUnpaidArea:{displayName:"Hongkong MTR unpaid area style"},mtrPaidArea:{displayName:"Hongkong MTR paid area style"},mrtUnderConstruction:{displayName:"Singapore MRT under construction style"},mrtSentosaExpress:{displayName:"Singapore MRT Sentosa Express style"},jrEastSingleColor:{displayName:"JR East single color style"},jrEastSingleColorPattern:{displayName:"JR East single color filled with crosshatch pattern style"},lrtSingleColor:{displayName:"Singapore LRT single color style"},londonTubeInternalInt:{displayName:"London Tube internal interchange style"},londonTube10MinWalk:{displayName:"London Tube under a 10 minute walk interchange style"},londonTubeTerminal:{displayName:"London Tube terminal style"},guangdongIntercityRailway:{displayName:"Guangdong Intercity Railway style"}},edge:{},footer:{duplicate:"Duplicate",copy:"Copy",remove:"Remove"}}},uv={popoverHeader:"You're on <1>{{environment}} environment!",popoverBody:"We are currently testing the latest RMP. If you have any suggestions, feel free to raise at https://github.com/railmapgen/rmp/issues",search:"Search stations",open:{new:"New project",config:"Import project",projectRMG:"Import from RMG project",invalidType:"Invalid file type! Only file in JSON format is accepted.",unknownError:"Unknown error occurred while parsing the uploaded file! Please try again.",gallery:"Import from Gallery",tutorial:"Start tutorial",importFromRMPGallery:"Template {{id}} imported. Not satisfied with this change? Undo via Ctrl + Z or the undo button.",failToImportFromRMPGallery:"Fail to import {{id}} from the gallery. The file can not be found."},download:{config:"Export project",image:"Export image","2rmg":{title:"Export to RMG project",type:{line:"Line",loop:"Loop",branch:"Branch"},placeholder:{chinese:"Chinese name",english:"English name",lineCode:"Line code"},info1:"This function is designed to convert the RMP project into RMG projects.",info2:"The lines in the list following are the available lines for converting. You can enter the Chinese line name in the text box on the left, the English line name in the middle, the line code (for Guangzhou Metro style) on the right, and then click the download button on the right to save your RMG projects.",noline:"No available lines found.",download:"Download",downloadInfo:"Please select one of the following stations as the starting station and click it to download."},format:"Format",png:"PNG",svg:"SVG",svgVersion:"Version","svg1.1":"1.1 (Compatible with Adobe Illustrator)",svg2:"2 (Compatible with modern browsers)",transparent:"Transparency",scale:"Scale",disabledScaleOptions:"Some scale options are disabled due to your browser's canvas limitation.",disabledScaleOptionsWorkarounds:"Possible workarounds include generating the image from svg using this cli tool: ",imageTooBig:"The image is too big for your browser to generate!",useSystemFonts:"Use system fonts instead of fonts previewed in the canvas",shareInfo1:"I will attach ",shareInfo2:" and its link when I share this image.",termsAndConditions:"Terms and Conditions",termsAndConditionsInfo:"I agree to ",period:".",confirm:"Download"},donation:{title:"Donation",openCollective:"Open Collective",viaUSD:"Donate in USD via Paypal or Visa card.",afdian:"爱发电",viaCNY:"Donate in CNY via Alipay or Wechat Pay."},settings:{title:"Settings",pro:"This is a PRO feature and an account with a subscription is required.",proWithTrial:"This is a PRO feature with a limited free trial available.",proLimitExceed:{master:"Master nodes exceed the free tier.",parallel:"Parallel lines exceed the free tier.",solution:"Remove them to dismiss this warning, or subscribe to unlock more!"},subscription:{title:"Subscription Status","logged-out":"You are currently logged out.",free:"Logged In! Subscribe to unlock more features!",subscriber:"Thanks for your subscription! Enjoy all features!",expired:"Login status expired. Please log out and log in again."},preference:{title:"Preference",keepLastPath:"Keep drawing lines until clicking on the background in the next move",autoParallel:"Automatically set new lines to be parallel to existing lines"},shortcuts:{title:"Shortcuts",keys:"Keys",description:"Description",f:"Use the last tool.",s:"Select.",arrows:"Move the canvas a little bit.",ijkl:"Move the selected station(s) a little bit.",shift:"Multiple selection.",alt:"Precise movement.",delete:"Delete the selected station(s).",cut:"Cut.",copy:"Copy.",paste:"Paste.",undo:"Undo.",redo:"Redo."},procedures:{title:"Procedures",translate:{title:"Translate nodes' coordinates",content:"Add the following offset to all nodes' x and y:",x:"X axis",y:"Y axis"},scale:{title:"Scale nodes' coordinates",content:"Multiply the following value to all nodes' x and y:",factor:"Scale factor"},changeType:{title:"Change all objects' attributes",any:"Any"},changeZIndex:"Change depth in batch",changeStationType:{title:"Change stations type in batch",changeFrom:"Change all stations from this type:",changeTo:"To this type:",info:"Changing stations' type will remove all specific attributes from stations except their position and names. SAVE BEFORE CHANGE!"},changeLineStyleType:{title:"Change lines style in batch",changeFrom:"Change all lines from this style:",changeTo:"To this style:",info:"Changing lines' style will remove all specific attributes from lines except their connections. SAVE BEFORE CHANGE!"},changeLinePathType:{title:"Change lines path in batch",changeFrom:"Change all lines from this path:",changeTo:"To this path:"},changeColor:{title:"Change color in batch",changeFrom:"Change all objects from this color:",changeTo:"To this color:",any:"From any color"},removeLines:{title:"Remove lines with single color",content:"Remove lines that have this color: "},updateColor:{title:"Update color",content:"Update all colors with their latest value.",success:"Successfully update all colors.",error:"Error in updating all colors: {{e}}."},unlockSimplePath:{title:"Unlock simple path",content1:"The Rail Map Painter application endeavors to offer an interactive platform conducive to the creation of rail maps while adhering to established conventions. Among these conventions, one particularly renowned style finds its origins in the innovative work of Harry Beck. His pioneering contribution, officially endorsed in the year 1932, garnered instantaneous acclaim from the general populace. Presently, it stands as an exemplar of paramount significance within the realm of information design. This paradigmatic approach has found widespread implementation in transit cartography on a global scale, albeit with varying degrees of success.",content2:"The application inherently conceals the option to utilize a simple path, as its deployment has the potential to contravene established conventions. This particular feature remains discreetly tucked away by default. Additionally, submissions to the Rail Map Painter Gallery are subject to stringent scrutiny, with a categorical rejection of compositions that employ the simple path with a single color style approach.",content3:"Still, we reserve the opportunity to unlock this option and use the simple path when you subscribe. It should be noted that even after acquisition, the use of simple path is limited to single color.",check:"Unlock",unlocked:"Already Unlocked"},masterManager:{title:"Manage all master nodes",id:"Id",label:"Label",type:"Type",types:{MiscNode:"MiscNode",Station:"Station"},importTitle:"Upload master parameter",importFrom:"Use imported styles",importOther:"Import new style",importParam:"Paste configuration"}},telemetry:{title:"Telemetry",info:"To help improve Rail Map Painter and keep contributors motivated to enhance the project, anonymous usage data is collected through Google Analytics. This data is used solely for enhancing the user experience and optimizing the tool's functionality and is never shared with third parties.",essential:"Basic",essentialTooltip:"Change this global setting in Rail Map Toolkit",essentialInfo:"Rail Map Painter collects essential usage data that helps us understand how and when users interact with the tool. Rest assured, no personally identifiable information or data from your projects is ever collected.",essentialLink:"Click this link to see detailed fields that Google Analytics may collect.",additional:"Additional",additionalInfo:"Rail Map Painter also gathers data on interactions, such as project creation or station addition, when you input. These additional data is also anonymous and are only used for statistical analysis to help us make the tool better."}},about:{title:"About",rmp:"Rail Map Painter",railmapgen:"A Rail Map Toolkit project",desc:"Design your own rail map by freely dragging stations from different cities and connecting them with 90 or 135-degree rounded corners lines!",content1:"In memory of all the freedom and equality we once had.",content2:"06/01/2022 in Shanghai",contributors:"Contributors",coreContributors:"Core Contributors",styleContributors:"Style Contributors",langonginc:"Live a life you will remember.","203IhzElttil":"Special thanks for his diligent work in ensuring that the stations of Shanghai Metro match the original design.",Swiftiecott:"Special thanks for his diligent work in ensuring that the stations of Beijing Subway match the original design.",Minwtraft:"Special thanks for his diligent work in ensuring that the stations of Guangzhou Metro match the original design.",contactUs:"Contact Us",github:"Project repository",githubContent:"Face any problems? Search or raise an issue here!",slack:"Slack group",slackContent:"Chat in these Slack channels!"}},dv={color:tv,warning:nv,cancel:rv,apply:iv,remove:ov,close:av,noShowAgain:sv,rmtPromotion:lv,panel:cv,header:uv},hv="Color A",pv="Color B",fv="カラー",gv="警告",mv="キャンセル",yv="適用",bv="削除",vv="閉じる",wv="次回表示しない",xv="絶対に見逃せないオールインワンツールキット!",Sv={tools:{showLess:"表示を減らす",section:{lineDrawing:"路線描画",stations:"駅",miscellaneousNodes:"その他の節点"},select:"選択する",learnHowToAdd:{station:"駅を追加する方法を学ぶ!","misc-node":"節点を追加する方法を学ぶ!",line:"路線風格を追加する方法を学ぶ!"}},details:{header:"詳細",info:{title:"基本情報",id:"ID",zIndex:"深度",stationType:"駅の種類",linePathType:"路線経路の種類",lineStyleType:"路線風格の種類",type:"種類",parallel:"平行路線",parallelIndex:"平行路線索引"},multipleSelection:{title:"複数選択",change:"選択した属性を変更する",selected:"選択されたオブジェクト:",show:"見せる",station:"駅",miscNode:"その他のノード",edge:"ライン"},changeStationTypeContent:"駅の種類を変更すると、駅の名前以外のすべての属性が削除されます。",changeLineTypeContent:"路線の種類を変更すると、すべての属性が削除されます。",changeType:"種類を変更",nodePosition:{title:"節点の位置",pos:{x:"X座標",y:"Y座標"}},lineExtremities:{title:"路線の端点",source:"出発点",target:"到着点",sourceName:"出発点名",targetName:"到着点名"},specificAttrsTitle:"特定の属性",unknown:{error:"おっと :( これは{{category}}を認識できません。おそらくそれは新しいバージョンで作成されました。",node:"節点",linePath:"路線経路",lineStyle:"路線風格"},nodes:{common:{nameZh:"中国語の路線名",nameEn:"英語の路線名",nameJa:"日本語の路線名",num:"路線番号"},virtual:{displayName:"仮想節点"},shmetroNumLineBadge:{displayName:"上海地下鉄路線番号徽章"},shmetroTextLineBadge:{displayName:"上海地下鉄テキスト路線徽章"},gzmtrLineBadge:{displayName:"広州地下鉄路線徽章",tram:"路面電車",span:"行にまたがる数字"},bjsubwayNumLineBadge:{displayName:"北京地下鉄路線番号徽章"},bjsubwayTextLineBadge:{displayName:"北京地下鉄テキスト路線徽章"},berlinSBahnLineBadge:{displayName:"ベルリンSバーン番号徽章"},berlinUBahnLineBadge:{displayName:"ベルリン地下鉄番号徽章"},suzhouRTNumLineBadge:{displayName:"蘇州軌道交通路線番号徽章",branch:"支線"},chongqingRTNumLineBadge:{displayName:"重慶鉄道交通路線番号徽章"},chongqingRTTextLineBadge:{displayName:"重慶鉄道交通テキスト路線徽章"},shenzhenMetroNumLineBadge:{displayName:"深セン地下鉄路線番号徽章",branch:"支線"},mrtDestinationNumbers:{displayName:"シンガポールMRTの目的地番号"},mrtLineBadge:{displayName:"シンガポールMRT路線バッジ",isTram:"LRT路線バッジです"},jrEastLineBadge:{displayName:"JR東日本路線番号徽章",crosshatchPatternFill:"網目模様で塗りつぶす"},qingdaoMetroNumLineBadge:{displayName:"青島地下鉄番号線徽章",numEn:"英語の行番号",showText:"テキストを表示"},guangdongIntercityRailwayLineBadge:{displayName:"広東省都市間鉄道線徽章"},master:{displayName:"大師節点",type:"大師節点種類",undefined:"未定義"},facilities:{displayName:"施設",type:"種類"},text:{displayName:"任意のテキスト",content:"コンテンツ",fontSize:"書体サイズ",lineHeight:"行の高さ",textAnchor:"テキストのアンカー",start:"開始",middle:"中央",end:"終了",auto:"自動",hanging:"吊り下げ",dominantBaseline:"ドミナントベースライン",language:"言語での書体ファミリー",zh:"中国語",en:"英語",mtr__zh:"香港MTR中国語",mtr__en:"香港MTR英語",berlin:"ベルリンS/Uバーン",mrt:"シンガポールMRT",jreast_ja:"JR東日本日本語",jreast_en:"JR東日本英語",rotate:"回転",italic:"イタリック体",bold:"太字"}},stations:{common:{nameZh:"中国語の駅名",nameEn:"英語の駅名",nameJa:"日本語の駅名",nameOffsetX:"駅名補正値X",nameOffsetY:"駅名補正値Y",rotate:"アイコンの回転",lineCode:"路線番号",stationCode:"駅番号",left:"左",middle:"中央",right:"右",top:"上",bottom:"下"},interchange:{title:"乗り換え",within:"駅構内の乗り換え",outStation:"駅外の乗り換え",outSystem:"系統外の乗り換え",addGroup:"乗り換えグループを追加",noInterchanges:"乗り換えなし",nameZh:"中国語の駅名",nameEn:"英語の駅名",add:"乗り換えを追加",copy:"乗り換えをコピー",remove:"乗り換えを削除"},shmetroBasic:{displayName:"上海地下鉄基本駅"},shmetroBasic2020:{displayName:"上海地下鉄基本駅(令和2年)"},shmetroInt:{displayName:"上海地下鉄乗り換え駅",height:"アイコンの高さ",width:"アイコンの幅"},shmetroOsysi:{displayName:"上海地下鉄の系統外乗り換え駅"},shanghaiSuburbanRailway:{displayName:"上海市営鉄道駅"},gzmtrBasic:{displayName:"広州地下鉄基本駅",open:"開業済み",secondaryNameZh:"中国語の補助駅名",secondaryNameEn:"英語の補助駅名",tram:"路面電車"},gzmtrInt:{displayName:"広州地下鉄乗り換え駅",open:"開業済み",secondaryNameZh:"中国語の補助駅名",secondaryNameEn:"英語の補助駅名",foshan:"仏山"},gzmtrInt2024:{displayName:"広州地下鉄乗り換え駅(令和6年)",anchorAt:"錨位置",anchorAtNone:"中心",preferVertical:"縦向き版面構成(乗り換え駅2つのみ)"},bjsubwayBasic:{displayName:"北京地下鉄基本駅",open:"開業済み"},bjsubwayInt:{displayName:"北京地下鉄乗り換え駅",outOfStation:"駅外の乗り換え"},mtr:{displayName:"香港MTR駅",rotate:"アイコンの回転"},suzhouRTBasic:{displayName:"蘇州軌道交通基本駅",textVertical:"垂直の名前"},suzhouRTInt:{displayName:"蘇州軌道交通乗り換え駅"},kunmingRTBasic:{displayName:"昆明軌道交通基本駅"},kunmingRTInt:{displayName:"昆明軌道交通乗り換え駅"},MRTBasic:{displayName:"シンガポールMRT基本駅",isTram:"LRTの駅です"},MRTInt:{displayName:"シンガポールMRT乗り換え駅"},jrEastBasic:{displayName:"JR東日本基本駅",nameOffset:"名前の補正値",textOneLine:"1行での名前",textVertical:"垂直の名前",important:"重要な駅",lines:"乗り換え線の補正値"},jrEastImportant:{displayName:"JR東日本重要駅",textVertical:"垂直の名前",mostImportant:"最も重要な駅",minLength:"駅の最小長"},foshanMetroBasic:{displayName:"仏山地鐵基本車站",open:"開業済み",secondaryNameZh:"中国語の補助駅名",secondaryNameEn:"英語の補助駅名",tram:"路面電車"},qingdaoMetro:{displayName:"地下鉄青島駅",isInt:"乗換駅です"},tokyoMetroBasic:{displayName:"東京メトロの基本駅",nameOffset:"駅名補正値",textVertical:"垂直の名前"},tokyoMetroInt:{displayName:"東京メトロ乗換駅",mereOffset:{displayName:"名前は単なるオフセットです",none:"なし",left1:"左(少ない)",left2:"左(さらに)",right1:"右(少ない)",right2:"右(さらに)",up:"上",down:"下"},importance:{displayName:"駅の重要性",default:"デフォルト",middle:"真ん中",high:"高い"},align:{displayName:"アイコンの整列",horizontal:"水平",vertical:"垂直"}},londonTubeCommon:{stepFreeAccess:"段差のないアクセス",stepFreeAccessNone:"なし",stepFreeAccessTrain:"駅から電車まで",stepFreeAccessPlatform:"駅からプラットフォームまで"},londonTubeBasic:{displayName:"ロンドン地下鉄基本駅",terminal:"終着駅",shareTracks:"線路共有",shareTracksIndex:"線路共有索引"},londonTubeInt:{displayName:"ロンドン地下鉄乗換駅"},guangdongIntercityRailway:{displayName:"広東省都市間鉄道駅"}},lines:{reconcileId:"調整ID",common:{offsetFrom:"補正値(From)",offsetTo:"補正値(To)",startFrom:"開始位置",roundCornerFactor:"角の丸め係数",from:"から",to:"まで",parallelDisabled:"この路線が平行であるため、一部の属性が無効になっています。",changeInBaseLine:"基準線で変更してください:"},simple:{displayName:"簡単な経路",offset:"補正値"},diagonal:{displayName:"135°対角経路"},perpendicular:{displayName:"90°垂直経路"},rotatePerpendicular:{displayName:"90°回転する垂直経路"},singleColor:{displayName:"単色風格"},shmetroVirtualInt:{displayName:"上海地下鉄駅外乗り換え風格"},shanghaiSuburbanRailway:{displayName:"上海市営鉄道風格",isEnd:"終了行"},gzmtrVirtualInt:{displayName:"広州地下鉄駅外乗り換え風格"},chinaRailway:{displayName:"中国鉄道風格"},bjsubwaySingleColor:{displayName:"北京地下鉄単色風格"},bjsubwayTram:{displayName:"北京地下鉄路面電車風格"},bjsubwayDotted:{displayName:"北京地下鉄の点線風格"},dualColor:{displayName:"2色風格",swap:"色を交換",colorA:"色A",colorB:"色B"},river:{displayName:"河川風格",width:"幅"},mtrRaceDays:{displayName:"香港MTRレース日風格"},mtrLightRail:{displayName:"香港MTR軽軌風格"},mtrUnpaidArea:{displayName:"香港MTR改札外乗り換え風格"},mtrPaidArea:{displayName:"香港MTR改札内乗り換え風格"},mrtUnderConstruction:{displayName:"シンガポール MRT 工事中風格"},mrtSentosaExpress:{displayName:"シンガポール MRT セントーサ・エクスプレス風格"},jrEastSingleColor:{displayName:"JR東日本単色風格"},jrEastSingleColorPattern:{displayName:"JR東日本単色網目模様風格"},lrtSingleColor:{displayName:"シンガポールLRT単色風格"},londonTubeInternalInt:{displayName:"ロンドン地下鉄内部乗換風格"},londonTube10MinWalk:{displayName:"ロンドン地下鉄10分以内の乗換風格"},londonTubeTerminal:{displayName:"ロンドン地下鉄終着風格"},guangdongIntercityRailway:{displayName:"広東省都市間鉄道風格"}},edges:{},footer:{duplicate:"重複",copy:"複製",remove:"削除"}}},_v={popoverHeader:"<1>{{environment}} 環境です!",popoverBody:"現在、最新のRMPをテストしています。ご意見がありましたら、https://github.com/railmapgen/rmp/issues で提案してください",search:"駅を探す",open:{new:"新しい作品",config:"作品をインポート",projectRMG:"RMG作品からインポート",invalidType:"無効なファイルタイプです!JSON形式のファイルのみが受け付けられます。",unknownError:"アップロードされたファイルの解析中に不明なエラーが発生しました。もう一度お試しください。",gallery:"ギャラリーからインポート",tutorial:"指導を開始する",importFromRMPGallery:"テンプレート{{id}}がインポートされました。この変更に満足していませんか?Ctrl + Zまたは元に戻すボタンで元に戻せます。",failToImportFromRMPGallery:"ギャラリーから{{id}}のインポートに失敗しました。ファイルが見つかりませんでした。"},download:{config:"作品をエクスポート",image:"画像をエクスポート","2rmg":{title:"RMG作品へエクスポート",type:{line:"直線",loop:"環状線",branch:"支線"},placeholder:{chinese:"中国語のライン名",english:"英語の路線名",lineCode:"路線番号"},info1:"この機能は、RMP作品をRMG作品に変換するために設計されています。",info2:"以下のリストの行は、変換用に利用できます。左側のテキストボックスに中国語の行名、中央に英語の行名、右側に(広州メトロ風格用の)行コードを入力し、ダウンロードボタンをクリックしてRMG作品を保存できます。",noline:"利用可能な回線が見つかりません。",download:"ダウンロード",downloadInfo:"出発駅を選択してクリックしてください。"},format:"フォーマット",png:"PNG",svg:"SVG",svgVersion:"版","svg1.1":"1.1(Adobe Illustratorと互換性あり)",svg2:"2(現代のブラウザと互換性あり)",transparent:"透明性",scale:"スケール",disabledScaleOptions:"ブラウザのキャンバス制限のため、一部のスケールオプションが無効になっています。",disabledScaleOptionsWorkarounds:"回避策として、このCLIツールを使用してSVGから画像を生成する方法が考えられます:",imageTooBig:"画像が大きすぎてブラウザで生成できません!",useSystemFonts:"キャンバスで内覧された書体の代わりに系統書体を使用する",shareInfo1:"この画像を共有する際に、添付ファイル ",shareInfo2:" とリンクを添付します。",termsAndConditions:"利用規約",termsAndConditionsInfo:"以下の利用規約に同意します:",period:"。",confirm:"ダウンロード"},donation:{title:"寄付",openCollective:"Open Collective",viaUSD:"PaypalまたはVisaカードを使用してドルで寄付する。",afdian:"爱发电",viaCNY:"AlipayまたはWechat Payを使用して人民元で寄付する。"},settings:{title:"設定",pro:"これはPRO機能であり、サブスクリプションが必要です。",proWithTrial:"これはPRO機能で、無料の限定トライアルが利用可能です。",proLimitExceed:{master:"大師節点が無料枠を超えています。",parallel:"平行路線が無料枠を超えています。",solution:"これらを削除して警告を解除するか、サブスクリプションに登録してさらに多くの機能を利用してください!"},subscription:{title:"サブスクリプションステータス","logged-out":"現在ログアウトしています。",free:"ログイン済み!さらに多くの機能をアンロックするにはサブスクリプションを登録してください!",subscriber:"サブスクリプションありがとうございます!すべての機能をお楽しみください!",expired:"ログインステータスの有効期限が切れました。ログアウトして再度ログインしてください。"},preference:{title:"設定",keepLastPath:"次の移動で背景をクリックするまで、線を描き続ける",autoParallel:"新しい路線を既存の路線と平行に自動的に設定"},shortcuts:{title:"ショートカット",keys:"キー",description:"説明",f:"最後のツールを使用する。",s:"選択する。",arrows:"キャンバスを少し移動します。",ijkl:"選択した駅を少し移動します。",shift:"複数選択。",alt:"正確な移動。",delete:"選択した駅を削除します。",cut:"切り取る。",copy:"複製する。",paste:"貼り付ける。",undo:"元に戻す。",redo:"やり直す。"},procedures:{title:"手順",translate:{title:"節点の座標を変換",content:"すべての節点のX座標とY座標に次の補正値を追加する:",x:"X軸",y:"Y軸"},scale:{title:"節点の座標をスケーリング",content:"すべての節点のX座標とY座標に次の値を乗算する:",factor:"スケールファクター"},changeType:{title:"すべてのオブジェクトの属性を変更する",any:"どれでも"},changeZIndex:"深度を変更する",changeStationType:{title:"一括で駅の種類を変更",changeFrom:"すべての駅をこの種類から変更する:",changeTo:"この種類に変更する:",info:"駅の種類を変更すると、位置と名前以外の特定の属性がすべて削除されます。変更する前に保存してください!"},changeLineStyleType:{title:"線の風格を一括で変更",changeFrom:"この風格からすべての行を変更します:",changeTo:"この風格に:",info:"線の風格を変更すると、接続を除くすべての特定の属性が線から削除されます。 変更する前に保存してください!"},changeLinePathType:{title:"行のパスを一括で変更する",changeFrom:"このパスのすべての行を変更します:",changeTo:"この道へ:"},changeColor:{title:"一括で色を変更する",changeFrom:"すべてのオブジェクトをこの色から変更します:",changeTo:"この色に:",any:"どの色からも"},removeLines:{title:"単一色の路線を削除",content:"この色を持つ路線を削除する:"},updateColor:{title:"色を更新する",content:"最新の値ですべての色を更新します。",success:"すべての色を正常に更新しました。",error:"すべての色を更新する際にエラーが発生しました: {{e}}。"},unlockSimplePath:{title:"簡単な経路の解除",content1:"「地下鉄路線図画家」は、既存の慣例に従いつつ、鉄道地図の作成を支援するインタラクティブなプラットフォームを提供することを目指しています。その中でも、特に有名な風格の1つは、ハリー・ベックの革新的な作品に由来しています。彼の先駆的な貢献は1932年に正式に認められ、一般大衆から即座に称賛されました。現在では、情報デザインの領域において極めて重要な存在となっています。この典型的なアプローチは、世界規模の公共交通カートグラフィに広く採用されていますが、成功度は異なります。",content2:"アプリケーション自体は、既存の慣例に反する可能性があるため、簡単な経路を利用するオプションをデフォルトで控えめに隠しています。また、「地下鉄路線図画家ギャラリー」への投稿は厳格な審査を受けることになり、簡単な経路を単一の色の風格で使用する作品は断固として拒否されます。",content3:"それでも、このオプションのロックを解除し、寄付時にイージーパスを使用する機会を予約します。 取得後も、単純なパスの使用はモノクロスタイルに限定されることに注意してください。",check:"簡単な経路を解除",unlocked:"既に解除されています"},masterManager:{title:"すべての大師節点を管理する",id:"ID",label:"標識",type:"種類",types:{MiscNode:"その他節点",Station:"駅"},importTitle:"大師引数をアップロード",importFrom:"インポートしたスタイルを使用",importOther:"新しいスタイルをインポート",importParam:"設定情報を貼り付け"}},telemetry:{title:"テレメトリー",info:"鉄道路線図画家を改善し、貢献者がプロジェクトを向上させる意欲を維持するため、Google Analytics を通じて匿名の使用データを収集しています。このデータはユーザー体験の向上とツールの最適化のためだけに使用され、第三者と共有されることはありません。",essential:"基本",essentialTooltip:"鉄道路線図ツールキットでこのグローバル設定を変更する",essentialInfo:"鉄道路線図画家は、ツールがどのように、またいつ使用されるかを理解するための基本的な使用データを収集します。ご安心ください。個人を特定できる情報やプロジェクトデータは一切収集されません。",essentialLink:"Google Analytics が収集する可能性のある詳細フィールドを表示するには、こちらのリンクをクリックしてください。",additional:"追加",additionalInfo:"鉄道路線図画家は、プロジェクトの作成や駅の追加など、入力時のインタラクションに関するデータも収集します。これらの追加データも匿名であり、ツールを改善するための統計分析にのみ使用されます。"}},about:{title:"について",rmp:"地下鉄路線図画家",railmapgen:"地下鉄路線図ツールキットのプロジェクト",desc:"異なる都市の駅を自由にドラッグして、90度または135度の角丸線で接続して独自の鉄道地図を設計しましょう!",content1:"かつて私たちが持っていた自由と平等のすべての記憶に捧げます。",content2:"2022年6月1日、上海",contributors:"貢献者",coreContributors:"主要な貢献者",styleContributors:"風格の貢献者","203IhzElttil":"上海地下鉄の駅がオリジナルの設計と一致するように、彼の勤勉な仕事に特別な感謝を述べます。",Swiftiecott:"北京地下鉄の駅がオリジナルの設計と一致するように、彼の勤勉な仕事に特別な感謝を述べます。",Minwtraft:"広州地下鉄の駅がオリジナルの設計と一致するように、彼の勤勉な仕事に特別な感謝を述べます。",contactUs:"お問い合わせ",github:"プロジェクトリポジトリ",githubContent:"問題が発生しましたか?こちらで検索したり、問題を報告したりしてください!",slack:"Slackグループ",slackContent:"Slackのチャンネルでチャットしましょう!"}},Nv={colorA:hv,colorB:pv,color:fv,warning:gv,cancel:mv,apply:yv,remove:bv,close:vv,noShowAgain:wv,rmtPromotion:xv,panel:Sv,header:_v},Rv="색깔",kv="경고",Cv="취소",Av="사용",Tv="삭제",Ev="다시",Ov="표시하지 않기",Lv="놓치고 싶지 않은 올인원 툴킷! 닫기.",Mv={tools:{showLess:"적게 표시",section:{lineDrawing:"선 그리기",stations:"역",miscellaneousNodes:"기타 노드"},select:"선택하다",learnHowToAdd:{station:"역을 추가하는 방법 배우기!","misc-node":"노드를 추가하는 방법 배우기!",line:"라인 스타일을 추가하는 방법 배우기!"}},details:{header:"상세한 상황",info:{title:"기본정보",id:"고유 식별자",zIndex:"깊이",stationType:"역 유형",linePathType:"선분 경로 유형",lineStyleType:"선분 스타일 유형",type:"유형",parallel:"평행선",parallelIndex:"평행 인덱스"},multipleSelection:{title:"다중 선택",change:"선택한 속성 변경",selected:"선택한 개체:",show:"보여주다",station:"역",miscNode:"기타 노드",edge:"윤곽"},changeStationTypeContent:"역 유형을 변경하면 이름을 제외한 모든 독특한 속성이 제거됩니다.",changeLineTypeContent:"선분 유형을 변경하면 모든 독특한 속성이 제거됩니다.",changeType:"종류 변경",nodePosition:{title:"노드 위치",pos:{x:"가로 좌표",y:"세로 좌표"}},lineExtremities:{title:"선분 양단",source:"시작점",target:"종말점",sourceName:"시작점 명칭",targetName:"종말점 명칭"},specificAttrsTitle:"독특 속성",unknown:{error:"이런 :( 우리는 이 {{category}}를 인식할 수 없습니다. 아마도 더 최근 버전에서 생성되었을 것입니다.",node:"노드",lineType:"선분 경로",lineStyle:"선분 스타일"},nodes:{common:{nameZh:"한자 노선명칭",nameEn:"영문 노선명칭",nameJa:"일본 노선명칭",num:"노선 번호"},virtual:{displayName:"가상 노드"},shmetroNumLineBadge:{displayName:"상해 지하철 디지털 노선 표지"},shmetroTextLineBadge:{displayName:"상해 지하철 문자 노선 표지"},gzmtrLineBadge:{displayName:"광저우 지하철 노선 표지",tram:"시가 전차",span:"행 범위 숫자"},bjsubwayNumLineBadge:{displayName:"베이징 지하철 노선 배지"},bjsubwayTextLineBadge:{displayName:"베이징 지하철 텍스트 라인 배지"},berlinSBahnLineBadge:{displayName:"베를린 S반 노선 배지"},berlinUBahnLineBadge:{displayName:"베를린 U반 노선 배지"},suzhouRTNumLineBadge:{displayName:"수주 철도 번호 라인 배지",branch:"지선입니다"},chongqingRTNumLineBadge:{displayName:"충칭 철도 교통 디지털 노선 식별"},chongqingRTTextLineBadge:{displayName:"충칭 철도 교통 텍스트 라인 표시"},shenzhenMetroNumLineBadge:{displayName:"심천 지하철 번호 라인 배지",branch:"지선입니다"},mrtDestinationNumbers:{displayName:"싱가포르 MRT 목적지 번호"},mrtLineBadge:{displayName:"싱가포르 MRT 노선 배지",isTram:"LRT 노선 배지입니다"},jrEastLineBadge:{displayName:"JR 동일본 라인 배지",crosshatchPatternFill:"크로스해치 패턴으로 채우기"},qingdaoMetroNumLineBadge:{displayName:"칭다오 지하철 번호 라인 배지",numEn:"영어로 된 줄 번호",showText:"텍스트 표시"},guangdongIntercityRailwayLineBadge:{displayName:"광동 시외 철도 노선 표지판"},master:{displayName:"마스터 노드",type:"마스터 노드 유형",undefined:"정의되지 않음"},facilities:{displayName:"시설",type:"유형"},text:{displayName:"임의 글자",content:"내용",fontSize:"글자 대소",lineHeight:"행고도",textAnchor:"글자 앵커",start:"시작",middle:"가운데",end:"끝",auto:"자동",hanging:"매달리는",dominantBaseline:"현성 바셀린",language:"언어로 된 글꼴 종류",zh:"중국어",en:"영어",mtr__zh:"홍콩 MTR 중국어",mtr__en:"홍콩 MTR 영어",berlin:"베를린 S/U Bahn",mrt:"싱가포르 MRT",jreast_ja:"JR 동일본어",jreast_en:"JR 동일본 영어",rotate:"회전",italic:"이탤릭체",bold:"굵게"}},stations:{common:{nameZh:"한자 명칭",nameEn:"영문 명칭",nameJa:"일본 명칭",nameOffsetX:"명칭 가로 이동",nameOffsetY:"명칭 세로 이동",rotate:"역회전각도",lineCode:"노선 번호",stationCode:"역 번호",left:"왼쪽",middle:"가운데",right:"오른쪽",top:"위",bottom:"아래"},interchange:{title:"환승",within:"같은 역에서 환승한",outStation:"역을 나가 환승한",outSystem:"시스템외환승",addGroup:"환승 조합 추가",noInterchanges:"비환승역",nameZh:"한자 명칭",nameEn:"영문 명칭",add:"환승 추가",copy:"환승 복제",remove:"환승 삭제"},shmetroBasic:{displayName:"상해 지하철의 기본 역"},shmetroBasic2020:{displayName:"상해 지하철 기본 역(2020년)"},shmetroInt:{displayName:"상해 지하철 환승역",height:"역 높이",width:"역 폭"},shmetroOsysi:{displayName:"상하이 지하철 시스템 외환승 역"},shanghaiSuburbanRailway:{displayName:"상하이 기차역"},gzmtrBasic:{displayName:"광저우 지하철 기본역",open:"개통여부",secondaryNameZh:"한자 제2명칭",secondaryNameEn:"영문 제2명칭",tram:"시가 전차"},gzmtrInt:{displayName:"광저우 지하철 환승역",open:"개통여부",secondaryNameZh:"한자 제2명칭",secondaryNameEn:"영문 제2명칭",foshan:"포산"},gzmtrInt2024:{displayName:"광저우 지하철 환승역 (2024)",anchorAt:"앵커 위치",anchorAtNone:"중앙",preferVertical:"세로 레이아웃 (환승 2개만)"},bjsubwayBasic:{displayName:"베이징 지하철 기본역",open:"개통여부"},bjsubwayInt:{displayName:"베이징 지하철 환승역",outOfStation:"역을 나가 환승"},mtr:{displayName:"홍콩 MTR 역"},suzhouRTBasic:{displayName:"쑤저우 궤도교통 기본역",textVertical:"수직 이름"},suzhouRTInt:{displayName:"쑤저우 궤도교통 환승역"},kunmingRTBasic:{displayName:"쿤밍 궤도교통 기본역"},kunmingRTInt:{displayName:"쿤밍 궤도교통 환승역"},MRTBasic:{displayName:"싱가포르MRT기본역",isTram:"LRT역이에요"},MRTInt:{displayName:"싱가포르MRT환승역"},jrEastBasic:{displayName:"JR 동일본 기본 역",nameOffset:"이름 오프셋",textOneLine:"한 줄로 표시된 이름",textVertical:"수직 이름",important:"중요한 역",lines:"환승 노선 오프셋"},jrEastImportant:{displayName:"JR 동일본 중요 역",textVertical:"수직 이름",mostImportant:"가장 중요한 역",minLength:"스테이션의 최소 길이"},foshanMetroBasic:{displayName:"포산 지하철 기본역",open:"개통여부",secondaryNameZh:"한자 제2명칭",secondaryNameEn:"영문 제2명칭",tram:"시가 전차"},qingdaoMetro:{displayName:"칭다오 지하철역",isInt:"환승역인가"},tokyoMetroBasic:{displayName:"도쿄메트로 기본역",nameOffset:"이름 오프셋",textVertical:"업종명",lineCode:"라인 코드",stationCode:"역 코드"},tokyoMetroInt:{displayName:"도쿄메트로 환승역",mereOffset:{displayName:"단순한 오프셋 이름",none:"없음",left1:"왼쪽(적음)",left2:"왼쪽(더)",right1:"오른쪽(적음)",right2:"맞아요 (더)",up:"위로",down:"아래에"},importance:{displayName:"역 중요성",default:"기본",middle:"가운데",high:"높은"},align:{displayName:"아이콘 정렬",horizontal:"수평의",vertical:"수직의"}},londonTubeCommon:{stepFreeAccess:"단차 없는 접근",stepFreeAccessNone:"없음",stepFreeAccessTrain:"거리에서 열차까지",stepFreeAccessPlatform:"거리에서 플랫폼까지"},londonTubeBasic:{displayName:"런던 지하철 기본역",terminal:"종착역",shareTracks:"선로 공유",shareTracksIndex:"선로 공유 지수"},londonTubeInt:{displayName:"런던 지하철 환승역"},guangdongIntercityRailway:{displayName:"광둥 시외 기차역"}},lines:{reconcileId:"연결 선분 고유 식별자",common:{offsetFrom:"시작점 오프셋",offsetTo:"끝점 오프셋",startFrom:"여기서부터 시작",roundCornerFactor:"회전원각인자",from:"에서",to:"까지",parallelDisabled:"이 선이 평행하기 때문에 일부 속성이 비활성화되었습니다.",changeInBaseLine:"기본선에서 변경하십시오:"},simple:{displayName:"기본 선분",offset:"오프셋"},diagonal:{displayName:"135° 접힌 선분"},perpendicular:{displayName:"90° 수직 선분"},rotatePerpendicular:{displayName:"90° 수직 경로 회전"},singleColor:{displayName:"단색 스타일"},shmetroVirtualInt:{displayName:"상해 지하철 역 환승 모습"},shanghaiSuburbanRailway:{displayName:"상하이 도시철도 스타일",isEnd:"끝 범위"},gzmtrVirtualInt:{displayName:"광저우 지하철 역 환승 모습"},chinaRailway:{displayName:"중국 철도 모습"},bjsubwaySingleColor:{displayName:"베이징 지하철 단색 스타일"},bjsubwayTram:{displayName:"베이징 지하철 노면 전차 모습"},bjsubwayDotted:{displayName:"베이징 지하철 점선 스타일"},dualColor:{displayName:"이색 스타일",swap:"색을 바꾸기",colorA:"색깔 A",colorB:"색깔 B"},river:{displayName:"강 스타일",width:"폭"},mtrRaceDays:{displayName:"홍콩 MTR 경마일 스타일"},mtrLightRail:{displayName:"홍콩 MTR 경전철 스타일"},mtrUnpaidArea:{displayName:"홍콩 MTR 미결제 구역 스타일"},mtrPaidArea:{displayName:"홍콩 MTR 결제완료 구역 스타일"},mrtUnderConstruction:{displayName:"싱가포르 MRT 공사중 스타일"},mrtSentosaExpress:{displayName:"싱가포르 MRT 센토사 익스프레스 스타일"},jrEastSingleColor:{displayName:"JR 동일본 단색 스타일"},jrEastSingleColorPattern:{displayName:"JR 동일본 단색 크로스해치 패턴 스타일"},lrtSingleColor:{displayName:"싱가포르 LRT 단색 스타일"},londonTubeInternalInt:{displayName:"런던 지하철 내부 환승 스타일"},londonTube10MinWalk:{displayName:"런던 지하철 10분 이내 도보 환승 스타일"},londonTubeTerminal:{displayName:"런던 지하철 종착 스타일"},guangdongIntercityRailway:{displayName:"광동성 도시간 철도 스타일"}},edges:{},footer:{duplicate:"복사",copy:"복사",remove:"삭제"}}},jv={popoverHeader:"당신은 환경을<1>{{environment}}탐색하고 있습니다",popoverBody:"최신 RMP를 테스트하고 있습니다.제안 사항이 있으시면 언제든지 https://github.com/railmapgen/rmp/issues에 제출해 주십시오.",search:"방송국 검색",open:{new:"신 프로젝트",config:"프로젝트 가져오기",projectRMG:"RMG 프로젝트에서 가져오기",invalidType:"잘못된 파일 형식입니다! JSON 형식의 파일만 허용됩니다.",unknownError:"업로드된 파일의 파싱 중 알 수 없는 오류가 발생했습니다. 다시 시도해주세요.",gallery:"갤러리에서 가져오기",tutorial:"튜토리얼 시작",importFromRMPGallery:"템플릿 {{id}}가 가져 왔습니다. 이 변경 사항에 만족하지 않으십니까? Ctrl + Z 또는 실행 취소 버튼을 사용하여 실행 취소하세요.",failToImportFromRMPGallery:"갤러리에서 {{id}}를 가져올 수 없습니다. 파일을 찾을 수 없습니다."},download:{config:"프로젝트 내보내기",image:"사진 내보내기","2rmg":{title:"RMG 프로젝트로 내보내기",type:{line:"일직선",loop:"고리",branch:"지선"},placeholder:{chinese:"중국어 라인 이름",english:"영어 줄 이름",lineCode:"노선 번호"},info1:"이 기능은 RMP 프로젝트를 RMG 프로젝트로 변환하는 데 사용됩니다.",info2:"변환할 수 있는 사용 가능한 라인들은 다음과 같습니다. 왼쪽 텍스트 상자에 중국어 라인 이름을 입력하고, 가운데에 영어 라인 이름을 입력하며, 오른쪽에 (광저우 메트로 스타일용) 라인 코드를 입력한 다음, 오른쪽의 다운로드 버튼을 클릭하여 RMG 프로젝트를 저장할 수 있습니다.",noline:"사용 가능한 라인이 없습니다.",download:"다운로드",downloadInfo:"출발 역을 선택하고 클릭하십시오."},format:"파일 종류",png:"PNG 이미지",svg:"SVG 이미지",svgVersion:"버전","svg1.1":"1.1 (Adobe Illustrator 호환)",svg2:"2 (현대 브라우저 호환)",transparent:"투명 배경",scale:"확대/축소",disabledScaleOptions:"브라우저의 캔버스 제한으로 인해 일부 스케일 옵션이 비활성화되었습니다.",disabledScaleOptionsWorkarounds:"가능한 해결 방법으로는 이 CLI 도구를 사용하여 SVG에서 이미지를 생성하는 것이 있습니다:",imageTooBig:"이미지가 너무 크기 때문에 브라우저에서 생성할 수 없습니다!",useSystemFonts:"캔버스에서 미리보기된 글꼴 대신 시스템 글꼴 사용",shareInfo1:"이 사진을 공유할 때",shareInfo2:"링크를 첨부할 것입니다.",termsAndConditions:"약관 및 세칙",termsAndConditionsInfo:"동의",period:".",confirm:"다운로드"},donation:{title:"기부",openCollective:"Open Collective",viaUSD:"Paypal 또는 Visa 카드를 통해 달러로 기부하기.",afdian:"爱发电",viaCNY:"Alipay 또는 Wechat Pay를 통해 인민폐로 기부하기."},settings:{title:"설정",pro:"이것은 PRO 기능이며, 구독이 필요한 계정입니다.",proWithTrial:"이것은 PRO 기능이며, 제한된 무료 체험이 가능합니다.",proLimitExceed:{master:"마스터 노드가 무료 사용 한도를 초과했습니다.",parallel:"평행선이 무료 사용 한도를 초과했습니다.",solution:"경고를 해제하려면 이 항목들을 제거하거나 구독을 통해 더 많은 기능을 잠금 해제하세요!"},subscription:{title:"구독 상태","logged-out":"현재 로그아웃 상태입니다.",free:"로그인 완료! 더 많은 기능을 사용하려면 구독하세요!",subscriber:"구독해주셔서 감사합니다! 모든 기능을 즐기세요!",expired:"로그인 상태가 만료되었습니다. 다시 로그인 해주세요."},preference:{title:"선호",keepLastPath:"다음 이동에서 배경을 클릭할 때까지 계속 선을 그립니다",autoParallel:"새 선을 기존 선과 평행하게 자동으로 설정합니다"},shortcuts:{title:"바로 가기",keys:"키",description:"설명",f:"마지막 도구 사용.",s:"선택하다.",arrows:"캔버스를 약간 이동합니다.",ijkl:"선택한 역을 약간 이동합니다.",shift:"여러 항목 선택.",alt:"정밀한 이동.",delete:"선택한 역을 삭제합니다.",cut:"잘라내기.",copy:"복사하다.",paste:"붙여넣다.",undo:"취소하다.",redo:"다시 하다."},procedures:{title:"절차",translate:{title:"노드 좌표 변환",content:"모든 노드의 x 및 y에 다음 오프셋을 추가:",x:"X축",y:"Y축"},scale:{title:"스케일 노드의 좌표",content:"모든 노드의 x 및 y에 다음 값을 곱하:",factor:"스케일 팩터"},changeType:{title:"모든 객체의 속성 변경",any:"어느"},changeZIndex:"일괄적으로 깊이 변경",changeStationType:{title:"역의 종류를 대량으로 수정",changeFrom:"이 유형의 모든 역:",changeTo:"이 유형의 역으로 변환:",info:"역 유형을 변경하면 이름을 제외한 모든 고유한 속성이 제거됩니다.저장했다가 다시 실행!"},changeLineStyleType:{title:"일괄적으로 선 스타일 변경",changeFrom:"이 스타일의 모든 선을 변경하세요:",changeTo:"이 스타일에:",info:"선 스타일을 변경하면 연결을 제외한 선의 모든 특정 속성이 제거됩니다. 변경하기 전에 저장하세요!"},changeLinePathType:{title:"일괄적으로 라인 경로 변경",changeFrom:"이 경로의 모든 줄을 변경하세요:",changeTo:"이 길로:"},changeColor:{title:"일괄 색상 변경",changeFrom:"이 색상의 모든 개체를 변경합니다.:",changeTo:"이 색상에:",any:"모든 색상에서"},removeLines:{title:"단일 색상의 선 제거",content:"이 색상의 선을 제거하세요: "},updateColor:{title:"색상 업데이트",content:"최신 값으로 모든 색상을 업데이트합니다.",success:"모든 색상을 성공적으로 업데이트했습니다.",error:"모든 색상을 업데이트하는 동안 오류가 발생했습니다: {{e}}."},unlockSimplePath:{title:"간단 경로 잠금 해제",content1:"Rail Map Painter 애플리케이션은 확립된 관례를 준수하면서도 철도지도 작성을 위한 대화식 플랫폼을 제공하기 위해 노력합니다. 이러한 관례 중 하나는 특히 해리 벡의 혁신적인 작업에서 비롯되었습니다. 그의 개척적인 기여는 공식적으로 1932년에 인정받았으며 일반 대중으로부터 즉각적인 찬사를 받았습니다. 현재는 정보 디자인 분야에서 중요한 본보기로 자리 잡고 있습니다. 이 패러다임적인 접근 방식은 전 세계적인 규모의 교통 카토그래피에서 널리 구현되었으나 성공의 정도는 다양합니다.",content2:"이 애플리케이션은 기존 관례에 위배될 가능성이 있기 때문에 간단한 경로를 활용하는 옵션을 기본 설정으로 가려놓았습니다. 또한 Rail Map Painter 갤러리에 제출되는 작품은 엄격한 심사를 받으며, 단일 색상 스타일로 간단한 경로를 사용하는 작품은 명확히 거부됩니다.",content3:"그래도 이 옵션을 잠금 해제하고 기부할 때 Easy Path를 사용할 수 있는 기회를 보유하고 있습니다. 획득 후에도 단순 경로의 사용은 단색 스타일로 제한된다는 점에 유의해야 합니다.",check:"간단한 경로 잠금 해제",unlocked:"이미 해제됨"},masterManager:{title:"모든 마스터 노드를 관리",id:"ID",label:"레이블",type:"유형",types:{MiscNode:"기타 노드",Station:"스테이션"},importTitle:"마스터 매개변수 업로드",importFrom:"가져온 스타일 사용",importOther:"새 스타일 가져오기",importParam:"구성 정보 붙여넣기"}},telemetry:{title:"원격 측정",info:"지하철 노선도 그리기를 개선하고 기여자가 프로젝트를 향상시키는 데 동기를 부여하기 위해 Google Analytics를 통해 익명의 사용 데이터를 수집합니다. 이 데이터는 사용자 경험을 향상하고 도구 기능을 최적화하는 데에만 사용되며, 제3자와 절대 공유되지 않습니다.",essential:"기본",essentialTooltip:"지하철 노선도 툴킷에서 이 전역 설정을 변경하세요",essentialInfo:"지하철 노선도 그리기는 도구를 언제, 어떻게 사용하는지 이해하기 위해 기본적인 사용 데이터를 수집합니다. 안심하세요. 개인 식별이 가능한 정보나 프로젝트 데이터는 절대 수집되지 않습니다.",essentialLink:"Google Analytics에서 수집할 수 있는 세부 필드를 보려면 이 링크를 클릭하세요.",additional:"추가",additionalInfo:"지하철 노선도 그리기는 프로젝트 생성이나 역 추가와 같은 입력 시의 상호작용 데이터도 수집합니다. 이러한 추가 데이터도 익명으로 처리되며, 도구를 개선하기 위한 통계 분석에만 사용됩니다."}},about:{title:"대함",rmp:"지하철 노선도 그리기",railmapgen:"철도 지도 툴킷 프로젝트 노선도 툴킷",desc:"다양한 도시의 역을 자유롭게 끌어서 90도 또는 135도의 둥근 모서리 선으로 연결함으로써 여러분만의 철도 지도를 디자인해요!",content1:"우리가 가졌던 자유와 평등을 기념한다.",content2:"2022년 6월 1일 상해",contributors:"기여자",coreContributors:"핵심 기여자",styleContributors:"스타일 기여자",langonginc:"기억에 남을 삶을 살아보세요.","203IhzElttil":"상하이 지하철의 역들이 원래 디자인과 일치하도록 확실한 작업을 해준 그에게 특별한 감사의 말씀을 전합니다.",Swiftiecott:"베이징 지하철의 역들이 원래 디자인과 일치하도록 확실한 작업을 해준 그에게 특별한 감사의 말씀을 전합니다.",Minwtraft:"광저우 지하철의 역들이 원래 디자인과 일치하도록 확실한 작업을 해준 그에게 특별한 감사의 말씀을 전합니다.",contactUs:"우리에게 연락하기",github:"프로젝트 저장소",githubContent:"무슨 문제라도 있나요? 여기서 문제를 검색하거나 제기하십시오!",slack:"슬랙 그룹",slackContent:"이 슬랙 채널에서 채팅해요!"}},$v={color:Rv,warning:kv,cancel:Cv,apply:Av,remove:Tv,close:Ev,noShowAgain:Ov,rmtPromotion:Lv,panel:Mv,header:jv},Pv="颜色",Iv="警告",Dv="取消",Bv="应用",zv="移除",Fv="关闭",Gv="不再显示",Uv="您绝对不想错过的全能工具包!",Wv={tools:{showLess:"显示更少",section:{lineDrawing:"线段绘制",stations:"车站",miscellaneousNodes:"杂项节点"},select:"多选",learnHowToAdd:{station:"了解如何添加车站!","misc-node":"了解如何添加节点!",line:"了解如何添加线段样式!"}},details:{header:"详情",info:{title:"基本信息",id:"唯一识别符",zIndex:"深度",stationType:"车站类型",linePathType:"线段路径类型",lineStyleType:"线段样式类型",type:"类型",parallel:"平行线段",parallelIndex:"平行线段索引"},multipleSelection:{title:"多重选取",change:"修改选中对象的属性",selected:"选中的对象:",show:"显示",station:"车站",miscNode:"杂项节点",edge:"线段"},changeStationTypeContent:"修改车站类型会移除所有独特属性除了名称。",changeLineTypeContent:"修改线段类型会移除所有独特属性。",changeType:"更改类型",nodePosition:{title:"节点位置",pos:{x:"横坐标",y:"纵坐标"}},lineExtremities:{title:"线段两端",source:"起点",target:"终点",sourceName:"起点名称",targetName:"终点名称"},specificAttrsTitle:"独特属性",unknown:{error:"哎呀 :( 我们无法识别此{{category}}。也许它是在更新版本中创建的。",node:"节点",linePath:"线段路径",lineStyle:"线段样式"},nodes:{common:{nameZh:"中文线路名称",nameEn:"英文线路名称",nameJa:"日语线路名称",num:"线路号"},virtual:{displayName:"虚拟节点"},shmetroNumLineBadge:{displayName:"上海地铁数字线路标识"},shmetroTextLineBadge:{displayName:"上海地铁文字线路标识"},gzmtrLineBadge:{displayName:"广州地铁线路标识",tram:"有轨电车",span:"跨行显示数字"},bjsubwayNumLineBadge:{displayName:"北京地铁数字线路标识"},bjsubwayTextLineBadge:{displayName:"北京地铁文字线路标识"},berlinSBahnLineBadge:{displayName:"柏林城市快铁线路标识"},berlinUBahnLineBadge:{displayName:"柏林地铁线路标识"},suzhouRTNumLineBadge:{displayName:"苏州轨道交通数字线路标识",branch:"是否支线"},chongqingRTNumLineBadge:{displayName:"重庆轨道交通数字线路标识"},chongqingRTTextLineBadge:{displayName:"重庆轨道交通文字线路标识"},shenzhenMetroNumLineBadge:{displayName:"深圳地铁数字线路标识",branch:"是否为支线"},mrtDestinationNumbers:{displayName:"新加坡MRT终点数字"},mrtLineBadge:{displayName:"新加坡MRT线路标识",isTram:"是LRT线路标识"},jrEastLineBadge:{displayName:"JR东日本线路标识",crosshatchPatternFill:"用网状图案填充"},qingdaoMetroNumLineBadge:{displayName:"青岛地铁数字线路标识",numEn:"英文线路号",showText:"显示文字"},guangdongIntercityRailwayLineBadge:{displayName:"广东城际铁路线路标识"},master:{displayName:"大师节点",type:"大师节点类型",undefined:"未定义"},facilities:{displayName:"设施",type:"类型"},text:{displayName:"任意文字",content:"内容",fontSize:"文字大小",lineHeight:"行高度",textAnchor:"文字锚点",start:"开始",middle:"居中",end:"结束",auto:"自动",hanging:"悬挂",dominantBaseline:"显性基线",language:"哪个语言的字体系列",zh:"中文",en:"英文",mtr__zh:"港铁中文",mtr__en:"港铁英文",berlin:"柏林 S/U Bahn",mrt:"新加坡地铁",jreast_ja:"JR东日本日语",jreast_en:"JR东日本英语",rotate:"旋转",italic:"斜体",bold:"粗体"}},stations:{common:{nameZh:"中文名称",nameEn:"英文名称",nameJa:"日语名称",nameOffsetX:"名称横向偏移",nameOffsetY:"名称纵向偏移",rotate:"车站旋转角度",lineCode:"路线编号",stationCode:"车站编号",left:"左",middle:"中间",right:"右",top:"顶部",bottom:"底部"},interchange:{title:"换乘",within:"同站换乘",outStation:"出站换乘",outSystem:"系统外换乘",addGroup:"添加换乘组合",noInterchanges:"非换乘站",nameZh:"中文名称",nameEn:"英文名称",add:"添加换乘",copy:"复制换乘",remove:"删除换乘"},shmetroBasic:{displayName:"上海地铁基本车站"},shmetroBasic2020:{displayName:"上海地铁基本车站(2020)"},shmetroInt:{displayName:"上海地铁换乘车站",height:"车站高度",width:"车站宽度"},shmetroOsysi:{displayName:"上海地铁转乘车站"},shanghaiSuburbanRailway:{displayName:"上海市域铁路车站"},gzmtrBasic:{displayName:"广州地铁基本车站",open:"是否开通",secondaryNameZh:"中文第二名称",secondaryNameEn:"英文第二名称",tram:"有轨电车"},gzmtrInt:{displayName:"广州地铁换乘车站",open:"是否开通",secondaryNameZh:"中文第二名称",secondaryNameEn:"英文第二名称",foshan:"佛山"},gzmtrInt2024:{displayName:"广州地铁换乘站(2024)",anchorAt:"定位于",anchorAtNone:"中心",preferVertical:"垂直布局(仅限2个换乘)"},bjsubwayBasic:{displayName:"北京地铁基本车站",open:"是否开通"},bjsubwayInt:{displayName:"北京地铁换乘车站",outOfStation:"出站换乘"},mtr:{displayName:"香港MTR车站"},suzhouRTBasic:{displayName:"苏州轨道交通基本车站",textVertical:"垂直名称"},suzhouRTInt:{displayName:"苏州轨道交通换乘车站"},kunmingRTBasic:{displayName:"昆明轨道交通基本车站"},kunmingRTInt:{displayName:"昆明轨道交通换乘车站"},MRTBasic:{displayName:"新加坡MRT基本车站",isTram:"是LRT车站"},MRTInt:{displayName:"新加坡MRT换乘车站"},jrEastBasic:{displayName:"JR东日本基本车站",nameOffset:"名称偏移",textOneLine:"名称在一行中",textVertical:"垂直名称",important:"重要车站",lines:"换乘线偏移"},jrEastImportant:{displayName:"JR东日本重要车站",textVertical:"垂直名称",mostImportant:"最重要车站",minLength:"车站的最小长度"},foshanMetroBasic:{displayName:"佛山地铁基本车站",open:"是否开通",secondaryNameZh:"中文第二名称",secondaryNameEn:"英文第二名称",tram:"有轨电车"},qingdaoMetro:{displayName:"青岛地铁车站",isInt:"是换乘站"},tokyoMetroBasic:{displayName:"东京地铁基本车站",nameOffset:"名称偏移",textVertical:"垂直站名",lineCode:"线路编号",stationCode:"车站编号"},tokyoMetroInt:{displayName:"东京地铁换乘车站",mereOffset:{displayName:"名称微小偏移",none:"无",left1:"左 (较少)",left2:"左 (较大)",right1:"右 (较少)",right2:"右 (较大)",up:"上",down:"下"},importance:{displayName:"车站重要性",default:"默认",middle:"中",high:"高"},align:{displayName:"图标排列方向",horizontal:"横向",vertical:"纵向"}},londonTubeCommon:{stepFreeAccess:"无障碍通行",stepFreeAccessNone:"无",stepFreeAccessTrain:"从街道到列车",stepFreeAccessPlatform:"从街道到站台"},londonTubeBasic:{displayName:"伦敦地铁基本车站",terminal:"终点站",shareTracks:"轨道共享",shareTracksIndex:"轨道共享索引"},londonTubeInt:{displayName:"伦敦地铁换乘车站"},guangdongIntercityRailway:{displayName:"广东城际铁路车站"}},lines:{reconcileId:"合并线段唯一标识符",common:{offsetFrom:"起始点偏移",offsetTo:"结束点偏移",startFrom:"从这里开始",roundCornerFactor:"转折圆角因子",from:"从",to:"到",parallelDisabled:"由于此线段是平行的,因此某些属性已被禁用。",changeInBaseLine:"在基准线段中更改它们:"},simple:{displayName:"基本线段",offset:"偏移"},diagonal:{displayName:"135°折线线段"},perpendicular:{displayName:"90°垂直线段"},rotatePerpendicular:{displayName:"90°旋转垂直线段"},singleColor:{displayName:"纯色样式"},shmetroVirtualInt:{displayName:"上海地铁出站换乘样式"},shanghaiSuburbanRailway:{displayName:"上海市域铁路样式",isEnd:"结束区间"},gzmtrVirtualInt:{displayName:"广州地铁出站换乘样式"},chinaRailway:{displayName:"中国铁路样式"},bjsubwaySingleColor:{displayName:"北京地铁纯色样式"},bjsubwayTram:{displayName:"北京地铁有轨电车样式"},bjsubwayDotted:{displayName:"北京地铁虚线样式"},dualColor:{displayName:"双色样式",swap:"切换颜色",colorA:"颜色A",colorB:"颜色B"},river:{displayName:"河流样式",width:"宽度"},mtrRaceDays:{displayName:"香港MTR赛马日样式"},mtrLightRail:{displayName:"香港MTR轻铁样式"},mtrUnpaidArea:{displayName:"香港MTR未付费区域样式"},mtrPaidArea:{displayName:"香港MTR付费区域样式"},mrtUnderConstruction:{displayName:"新加坡MRT在建样式"},mrtSentosaExpress:{displayName:"新加坡MRT圣淘沙捷运样式"},jrEastSingleColor:{displayName:"JR东日本单色样式"},jrEastSingleColorPattern:{displayName:"JR东日本单色网状图案样式"},lrtSingleColor:{displayName:"新加坡LRT纯色样式"},londonTubeInternalInt:{displayName:"伦敦地铁内部换乘样式"},londonTube10MinWalk:{displayName:"伦敦地铁10分钟步行换乘样式"},londonTubeTerminal:{displayName:"伦敦地铁终点站样式"},guangdongIntercityRailway:{displayName:"广东城际铁路样式"}},edges:{},footer:{duplicate:"重复",copy:"复制",remove:"移除"}}},Vv={popoverHeader:"你正在浏览<1>{{environment}}环境!",popoverBody:"我们正在测试最新的RMP。如果你有任何建议,欢迎在 https://github.com/railmapgen/rmp/issues 上提出。",search:"搜索车站",open:{new:"新项目",config:"导入项目",projectRMG:"从RMG项目中导入",invalidType:"无效的文件类型!仅接受JSON格式的文件。",unknownError:"解析上传文件时发生未知错误!请重试。",gallery:"从画廊中导入",tutorial:"开始教程",importFromRMPGallery:"模板 {{id}} 已导入。对此更改不满意?可通过 Ctrl + Z 或撤销按钮进行撤销。",failToImportFromRMPGallery:"无法从画廊导入{{id}},找不到文件。"},download:{config:"导出项目",image:"导出图片","2rmg":{title:"导出RMG项目",type:{line:"直线",loop:"环线",branch:"支线"},placeholder:{chinese:"中文线路名称",english:"英文线路名称",lineCode:"路线编号"},info1:"这个功能可将RMP项目导出为RMG项目。",info2:"下面的线路将可以被导出,你可以在左侧文本框中输入中文线路名称、在中间输入英文线路名称、右边输入线路编号(广州地铁样式专用),随后点击下载按钮即可导出RMG项目。",noline:"未找到可用线路。",download:"下载",downloadInfo:"请选择一个起始车站,并点击它。"},format:"文件种类",png:"PNG图像",svg:"SVG图像",svgVersion:"版本","svg1.1":"1.1(适用于Adobe Illustrator)",svg2:"2(适用于现代浏览器)",transparent:"透明背景",scale:"缩放",disabledScaleOptions:"由于浏览器的画布限制,部分缩放选项被禁用。",disabledScaleOptionsWorkarounds:"可能的解决方法包括使用此命令行工具从SVG生成图像:",imageTooBig:"图像太大,无法在您的浏览器中生成!",useSystemFonts:"使用系统字体而不是在画布上预览的字体",shareInfo1:"当我分享此图片时我会附上",shareInfo2:"和它的链接。",termsAndConditions:"条款及细则",termsAndConditionsInfo:"我同意",period:"。",confirm:"下载"},donation:{title:"捐赠",openCollective:"Open Collective",viaUSD:"通过Paypal或Visa卡以美元捐赠。",afdian:"爱发电",viaCNY:"通过支付宝或微信支付以人民币捐赠。"},settings:{title:"设置",pro:"这是一个专业功能,需要带有订阅的账户。",proWithTrial:"这是一个PRO功能,并提供有限的免费试用。",proLimitExceed:{master:"大师节点超出了免费额度。",parallel:"平行线段超出了免费额度。",solution:"移除它们以消除此警告,或订阅以解锁更多功能!"},subscription:{title:"订阅状态","logged-out":"您当前已登出。",free:"已登录!订阅以解锁更多功能!",subscriber:"感谢您的订阅!享受所有功能吧!",expired:"登录状态已过期。请登出后重新登录。"},preference:{title:"偏好",keepLastPath:"在下一次操作中持续画线段直到点击背景",autoParallel:"自动将新线段设置为与现有线段平行"},shortcuts:{title:"快捷键",keys:"键",description:"描述",f:"使用上一个工具。",s:"多选。",arrows:"稍微移动画布。",ijkl:"稍微移动所选站点。",shift:"多选。",alt:"精确移动。",delete:"删除所选站点。",cut:"剪切。",copy:"复制。",paste:"粘贴。",undo:"撤销。",redo:"重做。"},procedures:{title:"过程",translate:{title:"转化节点坐标",content:"将以下偏移加到所有节点的x和y上:",x:"横坐标",y:"纵坐标"},scale:{title:"缩放节点坐标",content:"将所有节点的x和y乘以以下值:",factor:"缩放因子"},changeType:{title:"修改所有对象的属性",any:"任意"},changeZIndex:"批量修改深度",changeStationType:{title:"批量修改车站种类",changeFrom:"将此类型的所有车站:",changeTo:"转换为这个类型的车站:",info:"修改车站类型会移除所有独特属性除了名称。保存再操作!"},changeLineStyleType:{title:"批量修改线段样式",changeFrom:"将此样式的所有线段:",changeTo:"转换为这个样式的线段:",info:"修改线段样式会移除所有独特属性除了连通性。保存再操作!"},changeLinePathType:{title:"批量修改线段类型",changeFrom:"将此类型的所有线段:",changeTo:"转换为这个类型的线段:"},changeColor:{title:"批量修改颜色",changeFrom:"将此颜色的所有对象:",changeTo:"转换为这个颜色:",any:"从任何颜色转换"},removeLines:{title:"移除所有纯色线段",content:"移除具有此颜色的所有线段: "},updateColor:{title:"更新颜色",content:"使用最新值更新所有颜色。",success:"成功更新所有颜色。",error:"更新所有颜色时出错:{{e}}。"},unlockSimplePath:{title:"解锁简单路径",content1:"地铁线路图绘制器应用致力于在遵循既定惯例的前提下,提供一个有利于创建地铁线路图的互动平台。在这些惯例中,一种特别著名的风格源自哈利·贝克的创新工作。他的开创性贡献于1932年得到官方认可,并在大众中迅速赢得了声誉。目前,它在信息设计领域具有重要的示范意义,在全球范围内的交通制图中得到了广泛的实施,尽管成功程度有所不同。",content2:"应用程序固有地隐藏了使用简单路径的选项,因为其部署有可能违反既定的惯例。默认情况下,此特定功能保持隐蔽。此外,提交到地铁线路图绘制器画廊的作品将经过严格的审查,坚决拒绝使用单色风格的简单路径的构图。",content3:"尽管如此,我们仍然保留了解锁此选项的机会,当您订阅后,方可使用简单路径。需要注意的是,即使获得后,简单路径的使用也仅限于单色风格。",check:"解锁简单路径",unlocked:"已解锁"},masterManager:{title:"管理全部大师节点",id:"唯一标识",label:"标签",type:"类型",types:{MiscNode:"杂项节点",Station:"车站"},importTitle:"上传大师节点参数",importFrom:"使用导入的样式",importOther:"导入新样式",importParam:"粘贴配置信息"}},telemetry:{title:"遥测",info:"为了帮助改进地铁线路图绘制器并激励贡献者提升项目,我们通过 Google Analytics 收集匿名使用数据。这些数据仅用于增强用户体验和优化工具功能,绝不会与第三方共享。",essential:"基础",essentialTooltip:"在地铁线路图工具包中更改此全局设置",essentialInfo:"地铁线路图绘制器收集一些基本使用数据,以帮助我们了解用户如何以及何时与工具交互。请放心,我们从不收集任何可识别个人身份的信息或您的项目数据。",essentialLink:"点击此链接查看 Google Analytics 可能收集的详细字段。",additional:"额外",additionalInfo:"地铁线路图绘制器还会收集有关交互的数据,例如项目创建或站点添加等操作。这些额外数据同样是匿名的,仅用于统计分析以帮助我们改进工具。"}},about:{title:"关于",rmp:"地铁线路图绘制器",railmapgen:"一个线路图工具包项目",desc:"通过自由拖动来自不同城市的车站并以 90 或 135 度圆角线段将它们连接起来,设计您自己的铁路地图!",content1:"谨以此纪念我们曾拥有的自由与平等。",content2:"06/01/2022于上海",contributors:"贡献者",coreContributors:"核心贡献者",styleContributors:"样式贡献者",langonginc:"活出值得铭记的人生。","203IhzElttil":"特别感谢他勤勉工作,确保上海地铁站与原始设计相符。",Swiftiecott:"特别感谢他勤勉工作,确保北京地铁站与原始设计相符。",Minwtraft:"特别感谢他勤勉工作,确保广州地铁站与原始设计相符。",contactUs:"联系我们",github:"项目仓库",githubContent:"遇到任何问题?在这里搜索或提出一个问题!",slack:"Slack群组",slackContent:"在这些Slack频道中讨论!"}},Hv={color:Pv,warning:Iv,cancel:Dv,apply:Bv,remove:zv,close:Fv,noShowAgain:Gv,rmtPromotion:Uv,panel:Wv,header:Vv},Jv="顏色",Kv="警告",Yv="取消",qv="應用",Qv="移除",Xv="關閉",Zv="不要再顯示",e0="絕對不想錯過的多功能工具包!",t0={tools:{showLess:"顯示更少",section:{lineDrawing:"線段繪製",stations:"車站",miscellaneousNodes:"雜項節點"},select:"多選",learnHowToAdd:{station:"了解如何添加車站!","misc-node":"了解如何添加節點!",line:"了解如何添加線條樣式!"}},details:{header:"詳情",info:{title:"基本信息",id:"唯一識別符",zIndex:"深度",stationType:"車站類型",linePathType:"線段路徑類型",lineStyleType:"線段樣式類型",type:"類型",parallel:"平行線段",parallelIndex:"平行線段索引"},multipleSelection:{title:"多重選取",change:"修改選取物件的屬性",selected:"選取的物件:",show:"顯示",station:"車站",miscNode:"雜項節點",edge:"線段"},changeStationTypeContent:"修改車站類型會移除所有獨特屬性除了名稱。",changeLineTypeContent:"修改線段類型會移除所有獨特屬性。",changeType:"更改類型",nodePosition:{title:"節點位置",pos:{x:"橫坐標",y:"縱坐標"}},lineExtremities:{title:"線段兩端",source:"起點",target:"終點",sourceName:"起點名稱",targetName:"終點名稱"},specificAttrsTitle:"獨特屬性",unknown:{error:"哎呀 :( 我們無法識別此{{category}}。也許它是在更新版本中創建的。",node:"節點",linePath:"線段路徑",lineStyle:"線段樣式"},nodes:{common:{nameZh:"中文線路名稱",nameEn:"英文線路名稱",nameJa:"日語線路名稱",num:"線路號"},virtual:{displayName:"虛擬節點"},shmetroNumLineBadge:{displayName:"上海地鐵數字線路標識"},shmetroTextLineBadge:{displayName:"上海地鐵文字線路標識"},gzmtrLineBadge:{displayName:"廣州地鐵線路標識",tram:"輕軌",span:"跨行顯示數字"},bjsubwayNumLineBadge:{displayName:"北京地鐵數字線路標識"},bjsubwayTextLineBadge:{displayName:"北京地鐵文字線路標識"},berlinSBahnLineBadge:{displayName:"柏林城市快鐵線路標識"},berlinUBahnLineBadge:{displayName:"柏林地鐵線路標識"},suzhouRTNumLineBadge:{displayName:"蘇州軌道交通數字線路標識",branch:"是否支線"},chongqingRTNumLineBadge:{displayName:"重慶軌道交通數字線路標識"},chongqingRTTextLineBadge:{displayName:"重慶軌道交通文字線路標識"},shenzhenMetroNumLineBadge:{displayName:"深圳地鐵數字線路標識",branch:"是否支線"},mrtDestinationNumbers:{displayName:"新加坡MRT終點數字"},mrtLineBadge:{displayName:"新加坡MRT線路標識",isTram:"是LRT線路標識"},jrEastLineBadge:{displayName:"JR東日本線路標識",crosshatchPatternFill:"用網狀圖案填充"},qingdaoMetroNumLineBadge:{displayName:"青島地鐵數位線路標識",numEn:"英文線路號",showText:"顯示文字"},guangdongIntercityRailwayLineBadge:{displayName:"廣東城際鐵路線標識"},master:{displayName:"大師節點",type:"大師節點類型",undefined:"未定義"},facilities:{displayName:"設施",type:"類型"},text:{displayName:"任意文字",content:"內容",fontSize:"文字大小",lineHeight:"行高度",textAnchor:"文字錨點",start:"開始",middle:"中間",end:"結束",auto:"自動",hanging:"懸吊",dominantBaseline:"顯性基線",language:"哪個語言的字體系列",zh:"中文",en:"英文",mtr__zh:"香港地鐵中文",mtr__en:"香港地鐵英文",berlin:"柏林 S/U 地鐵",mrt:"新加坡地鐵",jreast_ja:"JR 東日本日文",jreast_en:"JR 東日本英文",rotate:"旋轉",italic:"斜體",bold:"粗體"}},stations:{common:{nameZh:"中文名稱",nameEn:"英文名稱",nameJa:"日語名稱",nameOffsetX:"名稱橫向偏移",nameOffsetY:"名稱縱向偏移",rotate:"車站旋轉角度",lineCode:"路綫編碼",stationCode:"車站編碼",left:"左",middle:"中間",right:"右",top:"頂部",bottom:"底部"},interchange:{title:"換乘",within:"同站換乘",outStation:"出站換乘",outSystem:"系統外換乘",addGroup:"添加換乘組合",noInterchanges:"非換乘站",nameZh:"中文名稱",nameEn:"英文名稱",add:"添加換乘",copy:"復製換乘",remove:"刪除換乘"},shmetroBasic:{displayName:"上海地鐵基本車站"},shmetroBasic2020:{displayName:"上海地鐵基本車站(2020)"},shmetroInt:{displayName:"上海地鐵換乘車站",height:"車站高度",width:"車站寬度"},shmetroOsysi:{displayName:"上海地鐵轉乘車站"},shanghaiSuburbanRailway:{displayName:"上海市域鐵路車站"},gzmtrBasic:{displayName:"廣州地鐵基本車站",open:"是否開通",secondaryNameZh:"中文第二名稱",secondaryNameEn:"英文第二名稱",tram:"輕軌"},gzmtrInt:{displayName:"廣州地鐵換乘車站",open:"是否開通",secondaryNameZh:"中文第二名稱",secondaryNameEn:"英文第二名稱",foshan:"佛山"},gzmtrInt2024:{displayName:"廣州地鐵換乘站(2024)",anchorAt:"定位於",anchorAtNone:"中心",preferVertical:"垂直佈局(僅限2個換乘)"},bjsubwayBasic:{displayName:"北京地鐵基本車站",open:"是否開通"},bjsubwayInt:{displayName:"北京地鐵換乘車站",outOfStation:"出站轉車"},mtr:{displayName:"香港MTR車站"},suzhouRTBasic:{displayName:"蘇州軌道交通基本車站",textVertical:"垂直名稱"},suzhouRTInt:{displayName:"蘇州軌道交通換乘車站"},kunmingRTBasic:{displayName:"昆明軌道交通基本車站"},kunmingRTInt:{displayName:"昆明軌道交通換乘車站"},MRTBasic:{displayName:"新加坡MRT基本車站",isTram:"是LRT車站"},MRTInt:{displayName:"新加坡MRT換乘車站"},jrEastBasic:{displayName:"JR東日本基本車站",nameOffset:"名稱偏移",textOneLine:"名稱在一行中",textVertical:"垂直名稱",important:"重要車站",lines:"轉乘線偏移"},jrEastImportant:{displayName:"JR東日本重要車站",textVertical:"垂直名稱",mostImportant:"最重要車站",minLength:"車站的最小長度"},foshanMetroBasic:{displayName:"佛山地鐵基本車站",open:"是否開通",secondaryNameZh:"中文第二名稱",secondaryNameEn:"英文第二名稱",tram:"輕軌"},qingdaoMetro:{displayName:"青島地鐵基本車站",isInt:"是換乘站"},tokyoMetroBasic:{displayName:"東京地鐵基本車站",nameOffset:"名稱偏移",textVertical:"垂直站名",lineCode:"線路編號",stationCode:"車站編號"},tokyoMetroInt:{displayName:"東京地鐵轉乘車站",mereOffset:{displayName:"名稱微小偏移",none:"無",left1:"左 (较少)",left2:"左 (较大)",right1:"右 (较少)",right2:"右 (较大)",up:"上",down:"下"},importance:{displayName:"車站重要性",default:"預設",middle:"中",high:"高"},align:{displayName:"圖標排列方向",horizontal:"橫向",vertical:"縱向"}},londonTubeCommon:{stepFreeAccess:"無障礙通行",stepFreeAccessNone:"無",stepFreeAccessTrain:"從街道到列車",stepFreeAccessPlatform:"從街道到月台"},londonTubeBasic:{displayName:"倫敦地鐵基本車站",terminal:"終點站",shareTracks:"軌道共享",shareTracksIndex:"軌道共享指數"},londonTubeInt:{displayName:"倫敦地鐵換乘車站"},guangdongIntercityRailway:{displayName:"廣東城際鐵路車站"}},lines:{reconcileId:"合並線段唯一標識符",common:{offsetFrom:"起始點偏移",offsetTo:"結束點偏移",startFrom:"從這裏開始",roundCornerFactor:"轉折圓角因子",from:"從",to:"到",parallelDisabled:"由於此線段是平行的,因此某些屬性已被禁用。",changeInBaseLine:"在基準線段中更改它們:"},simple:{displayName:"基本線段",offset:"偏移"},diagonal:{displayName:"135°折線線段"},perpendicular:{displayName:"90°垂直線段"},rotatePerpendicular:{displayName:"90°旋轉垂直線段"},singleColor:{displayName:"純色樣式"},shmetroVirtualInt:{displayName:"上海地鐵出站換乘樣式"},shanghaiSuburbanRailway:{displayName:"上海市域鐵路樣式",isEnd:"結束區間"},gzmtrVirtualInt:{displayName:"廣州地鐵出站換乘樣式"},chinaRailway:{displayName:"中國鐵路樣式"},bjsubwaySingleColor:{displayName:"北京地鐵純色樣式"},bjsubwayTram:{displayName:"北京地鐵有軌電車樣式"},bjsubwayDotted:{displayName:"北京地鐵虛線樣式"},dualColor:{displayName:"雙色樣式",swap:"切換顏色",colorA:"顏色A",colorB:"顏色B"},river:{displayName:"河流樣式",width:"寬度"},mtrRaceDays:{displayName:"香港MTR賽馬日樣式"},mtrLightRail:{displayName:"香港MTR輕鐵樣式"},mtrUnpaidArea:{displayName:"香港MTR未付費區域樣式"},mtrPaidArea:{displayName:"香港MTR付費區域樣式"},mrtUnderConstruction:{displayName:"新加坡MRT在建樣式"},mrtSentosaExpress:{displayName:"新加坡MRT聖淘沙捷運樣式"},jrEastSingleColor:{displayName:"JR東日本單色樣式"},jrEastSingleColorPattern:{displayName:"JR東日本單色網狀圖案樣式"},lrtSingleColor:{displayName:"新加坡LRT純色樣式"},londonTubeInternalInt:{displayName:"倫敦地鐵內部換乘樣式"},londonTube10MinWalk:{displayName:"倫敦地鐵10分鐘步行換乘樣式"},londonTubeTerminal:{displayName:"倫敦地鐵終點站樣式"},guangdongIntercityRailway:{displayName:"廣東城際鐵路樣式"}},edges:{},footer:{duplicate:"重複",copy:"複製",remove:"移除"}}},n0={popoverHeader:"你正在瀏覽<1>{{environment}}環境!",popoverBody:"我們正在測試最新的RMP。如果妳有任何建議,歡迎在 https://github.com/railmapgen/rmp/issues 上提出。",search:"搜尋車站",open:{new:"新項目",config:"讀入項目",projectRMG:"從RMG專案中讀入",invalidType:"無效的文件類型!僅接受JSON格式的文件。",unknownError:"解析上傳文件時發生未知錯誤!請重試。",gallery:"從畫廊中讀入",tutorial:"開始教程",importFromRMPGallery:"範本 {{id}} 已匯入。對此更改不滿意?可通過 Ctrl + Z 或撤銷按鈕進行撤銷。",failToImportFromRMPGallery:"無法從畫廊導入{{id}},找不到檔案。"},download:{config:"導出項目",image:"導出圖片","2rmg":{title:"導出RMG項目",type:{line:"直線",loop:"環線",branch:"支線"},placeholder:{chinese:"中文線路名稱",english:"英文線路名稱",lineCode:"路綫編碼"},info1:"這個功能可將RMP項目導出為RMG項目。",info2:"下面的線路將可以被導出,你可以在左側文本框中輸入中文線路名稱、在中間輸入英文線路名稱、右邊輸入線路編號(廣州地鐵樣式專用),隨後點擊下載按鈕即可導出RMG項目。",noline:"未找到可用線路。",download:"下載",downloadInfo:"請選擇一個起始車站,並點擊它。"},format:"檔案種類",png:"PNG影像",svg:"SVG影像",svgVersion:"版本","svg1.1":"1.1(適用於Adobe Illustrator)",svg2:"2(適用於現代瀏覽器)",transparent:"透明背景",scale:"縮放",disabledScaleOptions:"由於您的瀏覽器的畫布限制,部分縮放選項已被禁用。",disabledScaleOptionsWorkarounds:"可能的解決方法包括使用此命令行工具從SVG生成圖像:",imageTooBig:"圖像太大,您的瀏覽器無法生成!",useSystemFonts:"使用系統字型而不是在畫布上預覽的字型",shareInfo1:"當我分享此圖片時我會附上",shareInfo2:"和它的鏈接。",termsAndConditions:"條款及細則",termsAndConditionsInfo:"我同意",period:"。",confirm:"下載"},donation:{title:"捐款",openCollective:"Open Collective",viaUSD:"通過Paypal或Visa卡以美元捐款。",afdian:"爱发电",viaCNY:"通過支付寶或微信支付以人民幣捐款。"},settings:{title:"設置",pro:"這是一個專業功能,需要带有訂閱的帳戶。",proWithTrial:"這是一個PRO功能,並提供有限的免費試用。",proLimitExceed:{master:"大師節點超出了免費額度。",parallel:"平行線段超出了免費額度。",solution:"移除它們以解除此警告,或訂閱以解鎖更多功能!"},subscription:{title:"訂閱狀態","logged-out":"您目前已登出。",free:"已登入!訂閱以解鎖更多功能!",subscriber:"感謝您的訂閱!享受所有功能吧!",expired:"登入狀態已過期。請登出後重新登入。"},preference:{title:"偏好",keepLastPath:"在下一次操作中持續畫線段直到點擊背景",autoParallel:"自動將新段線設置為與現有線段平行"},shortcuts:{title:"捷徑",keys:"按鍵",description:"描述",f:"使用上一個工具。",s:"多選。",arrows:"稍微移動畫布。",ijkl:"稍微移動所選站點。",shift:"多選。",alt:"精確移動。",delete:"刪除所選站點。",cut:"剪切。",copy:"複製。",paste:"貼上。",undo:"撤銷。",redo:"重做。"},procedures:{title:"过程",translate:{title:"轉化節點坐標",content:"將以下偏移加到所有節點的x和y上:",x:"橫坐標",y:"縱坐標"},scale:{title:"縮放節點坐標",content:"將所有節點的x和y乘以以下值:",factor:"縮放因子"},changeType:{title:"修改所有物件的屬性",any:"任意"},changeZIndex:"批量修改深度",changeStationType:{title:"批量修改車站種類",changeFrom:"將此類型的所有車站:",changeTo:"轉換為這個類型的車站:",info:"修改車站類型會移除所有獨特屬性除了名稱。保存再操作!"},changeLineStyleType:{title:"批量修改線段樣式",changeFrom:"將此樣式的所有線段:",changeTo:"轉換為這個樣式的線段:",info:"修改線段樣式會移除所有獨特屬性除了連通性。保存再操作!"},changeLinePathType:{title:"批量修改線段類型",changeFrom:"將此類型的所有線段:",changeTo:"轉換為這個類型的線段:"},changeColor:{title:"批量修改顏色",changeFrom:"將此顏色的所有對象:",changeTo:"轉換為這個顏色:",any:"從任何顏色轉換"},removeLines:{title:"移除所有純色線段",content:"移除具有此顏色的所有線段: "},updateColor:{title:"更新顏色",content:"使用最新值更新所有顏色。",success:"成功更新所有顏色。",error:"更新所有顏色時發生錯誤:{{e}}。"},unlockSimplePath:{title:"解鎖簡單路徑",content1:"地鐵線路圖繪製器應用致力於在遵循既定慣例的前提下,提供一個有利於創建地鐵線路圖的互動平台。在這些慣例中,一種特別著名的風格源自哈利·貝克的創新工作。他的開創性貢獻於1932年得到官方認可,並在大眾中迅速贏得了聲譽。目前,它在信息設計領域具有重要的示範意義,在全球範圍內的交通製圖中得到了廣泛的實施,儘管成功程度有所不同。",content2:"應用程式固有地隱藏了使用簡單路徑的選項,因為其部署有可能違反既定的慣例。默認情況下,此特定功能保持隱蔽。此外,提交到地鐵線路圖繪製器畫廊的作品將經過嚴格的審查,堅決拒絕使用單色風格的簡單路徑的構圖。",content3:"儘管如此,我們仍然保留瞭解鎖此選項的機會,當您訂閱后,方可使用簡單路徑。 需要注意的是,即使獲得后,簡單路徑的使用也僅限於單色風格。",check:"解鎖簡單路徑",unlocked:"已解鎖"},masterManager:{title:"管理全部大師節點",id:"唯一標識",label:"標籤",type:"類型",types:{MiscNode:"雜項節點",Station:"車站"},importTitle:"上傳大師節點參數",importFrom:"使用匯入的樣式",importOther:"導入新樣式",importParam:"貼上配置信息"}},telemetry:{title:"遙測",info:"為了協助改進地鐵路綫圖繪製器並激勵貢獻者提升項目,我們透過 Google Analytics 收集匿名使用數據。這些數據僅用於提升用戶體驗及優化工具功能,絕不會與第三方共享。",essential:"基本",essentialTooltip:"在地鐵路綫圖工具組中更改此全局設定",essentialInfo:"地鐵路綫圖繪製器收集一些基本使用數據,以協助我們了解用戶如何及何時與工具互動。請放心,我們絕不收集任何可識別個人身份的資訊或您的項目數據。",essentialLink:"點擊此鏈接查看 Google Analytics 可能收集的詳細字段。",additional:"額外",additionalInfo:"地鐵路綫圖繪製器還會收集與互動有關的數據,例如創建項目或新增站點等操作。這些額外數據同樣是匿名的,僅用於統計分析以協助我們改進工具。"}},about:{title:"關於",rmp:"地鐵線路圖繪製器",railmapgen:"一個路綫圖工具組的項目",desc:"通過自由拖動來自不同城市的車站並以 90 或 135 度圓角線段將它們連接起來,設計您自己的鐵路地圖!",content1:"謹以此紀念我們曾擁有的自由與平等。",content2:"06/01/2022於上海",contributors:"貢獻者",coreContributors:"核心貢獻者",styleContributors:"樣式貢獻者",langonginc:"活出值得銘記的人生。","203IhzElttil":"特別感謝他勤奮工作,確保上海地鐵站與原始設計相符。",Swiftiecott:"特別感謝他勤奮工作,確保北京地鐵站與原始設計相符。",Minwtraft:"特別感謝他勤奮工作,確保廣州地鐵站與原始設計相符。",contactUs:"聯繫我們",github:"項目倉庫",githubContent:"遇到任何問題?在這裡搜索或提出一個問題!",slack:"Slack群組",slackContent:"在這些Slack頻道中討論!"}},r0={color:Jv,warning:Kv,cancel:Yv,apply:qv,remove:Qv,close:Xv,noShowAgain:Zv,rmtPromotion:e0,panel:t0,header:n0},Xn=new Ge.I18nBuilder().use(Mu).withAppName("Rail Map Painter").withLng(Ge.getLanguage()).withDefaultResource(ev).withResource("en",dv).withResource("zh-Hans",Hv).withResource("zh-Hant",r0).withResource("ja",Nv).withResource("ko",$v).build(),{abs:jn,cos:gt,sin:on,acos:i0,atan2:$n,sqrt:kt,pow:Ke}=Math;function Pn(n){return n<0?-Ke(-n,1/3):Ke(n,1/3)}const wl=Math.PI,br=2*wl,Ct=wl/2,o0=1e-6,$i=Number.MAX_SAFE_INTEGER||9007199254740991,Pi=Number.MIN_SAFE_INTEGER||-9007199254740991,a0={x:0,y:0,z:0},k={Tvalues:[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213],Cvalues:[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872],arcfn:function(n,e){const r=e(n);let i=r.x*r.x+r.y*r.y;return typeof r.z<"u"&&(i+=r.z*r.z),kt(i)},compute:function(n,e,r){if(n===0)return e[0].t=0,e[0];const i=e.length-1;if(n===1)return e[i].t=1,e[i];const o=1-n;let a=e;if(i===0)return e[0].t=n,e[0];if(i===1){const l={x:o*a[0].x+n*a[1].x,y:o*a[0].y+n*a[1].y,t:n};return r&&(l.z=o*a[0].z+n*a[1].z),l}if(i<4){let l=o*o,c=n*n,u,d,h,p=0;i===2?(a=[a[0],a[1],a[2],a0],u=l,d=o*n*2,h=c):i===3&&(u=l*o,d=l*n*3,h=o*c*3,p=n*c);const g={x:u*a[0].x+d*a[1].x+h*a[2].x+p*a[3].x,y:u*a[0].y+d*a[1].y+h*a[2].y+p*a[3].y,t:n};return r&&(g.z=u*a[0].z+d*a[1].z+h*a[2].z+p*a[3].z),g}const s=JSON.parse(JSON.stringify(e));for(;s.length>1;){for(let l=0;l1;o--,a--){const s=[];for(let l=0,c;l"u")n=.5;else if(n===0||n===1)return n;const r=Ke(n,e)+Ke(1-n,e),i=r-1;return jn(i/r)},projectionratio:function(n,e){if(e!==2&&e!==3)return!1;if(typeof n>"u")n=.5;else if(n===0||n===1)return n;const r=Ke(1-n,e),i=Ke(n,e)+r;return r/i},lli8:function(n,e,r,i,o,a,s,l){const c=(n*i-e*r)*(o-s)-(n-r)*(o*l-a*s),u=(n*i-e*r)*(a-l)-(e-i)*(o*l-a*s),d=(n-r)*(a-l)-(e-i)*(o-s);return d==0?!1:{x:c/d,y:u/d}},lli4:function(n,e,r,i){const o=n.x,a=n.y,s=e.x,l=e.y,c=r.x,u=r.y,d=i.x,h=i.y;return k.lli8(o,a,s,l,c,u,d,h)},lli:function(n,e){return k.lli4(n,n.c,e,e.c)},makeline:function(n,e){return new le(n.x,n.y,(n.x+e.x)/2,(n.y+e.y)/2,e.x,e.y)},findbbox:function(n){let e=$i,r=$i,i=Pi,o=Pi;return n.forEach(function(a){const s=a.bbox();e>s.x.min&&(e=s.x.min),r>s.y.min&&(r=s.y.min),i0&&(d.c1=c,d.c2=u,d.s1=n,d.s2=r,a.push(d))})}),a},makeshape:function(n,e,r){const i=e.points.length,o=n.points.length,a=k.makeline(e.points[i-1],n.points[0]),s=k.makeline(n.points[o-1],e.points[0]),l={startcap:a,forward:n,back:e,endcap:s,bbox:k.findbbox([a,n,e,s])};return l.intersections=function(c){return k.shapeintersections(l,l.bbox,c,c.bbox,r)},l},getminmax:function(n,e,r){if(!r)return{min:0,max:0};let i=$i,o=Pi,a,s;r.indexOf(0)===-1&&(r=[0].concat(r)),r.indexOf(1)===-1&&r.push(1);for(let l=0,c=r.length;lo&&(o=s[e]);return{min:i,mid:(i+o)/2,max:o,size:o-i}},align:function(n,e){const r=e.p1.x,i=e.p1.y,o=-$n(e.p2.y-i,e.p2.x-r),a=function(s){return{x:(s.x-r)*gt(o)-(s.y-i)*on(o),y:(s.x-r)*on(o)+(s.y-i)*gt(o)}};return n.map(a)},roots:function(n,e){e=e||{p1:{x:0,y:0},p2:{x:1,y:0}};const r=n.length-1,i=k.align(n,e),o=function(T){return 0<=T&&T<=1};if(r===2){const T=i[0].y,G=i[1].y,O=i[2].y,P=T-2*G+O;if(P!==0){const W=-kt(G*G-T*O),ae=-T+G,ee=-(W+ae)/P,X=-(-W+ae)/P;return[ee,X].filter(o)}else if(G!==O&&P===0)return[(2*G-O)/(2*G-2*O)].filter(o);return[]}const a=i[0].y,s=i[1].y,l=i[2].y,c=i[3].y;let u=-a+3*s-3*l+c,d=3*a-6*s+3*l,h=-3*a+3*s,p=a;if(k.approximately(u,0)){if(k.approximately(d,0))return k.approximately(h,0)?[]:[-p/h].filter(o);const T=kt(h*h-4*d*p),G=2*d;return[(T-h)/G,(-h-T)/G].filter(o)}d/=u,h/=u,p/=u;const g=(3*h-d*d)/3,y=g/3,w=(2*d*d*d-9*d*h+27*p)/27,_=w/2,S=_*_+y*y*y;let R,j,M,A,F;if(S<0){const T=-g/3,G=T*T*T,O=kt(G),P=-w/(2*O),W=P<-1?-1:P>1?1:P,ae=i0(W),ee=Pn(O),X=2*ee;return M=X*gt(ae/3)-d/3,A=X*gt((ae+br)/3)-d/3,F=X*gt((ae+2*br)/3)-d/3,[M,A,F].filter(o)}else{if(S===0)return R=_<0?Pn(-_):-Pn(_),M=2*R-d/3,A=-R-d/3,[M,A].filter(o);{const T=kt(S);return R=Pn(-_+T),j=Pn(_+T),[R-j-d/3].filter(o)}}},droots:function(n){if(n.length===3){const e=n[0],r=n[1],i=n[2],o=e-2*r+i;if(o!==0){const a=-kt(r*r-e*i),s=-e+r,l=-(a+s)/o,c=-(-a+s)/o;return[l,c]}else if(r!==i&&o===0)return[(2*r-i)/(2*(r-i))];return[]}if(n.length===2){const e=n[0],r=n[1];return e!==r?[e/(e-r)]:[]}return[]},curvature:function(n,e,r,i,o){let a,s,l,c,u=0,d=0;const h=k.compute(n,e),p=k.compute(n,r),g=h.x*h.x+h.y*h.y;if(i?(a=kt(Ke(h.y*p.z-p.y*h.z,2)+Ke(h.z*p.x-p.z*h.x,2)+Ke(h.x*p.y-p.x*h.y,2)),s=Ke(g+h.z*h.z,3/2)):(a=h.x*p.y-h.y*p.x,s=Ke(g,3/2)),a===0||s===0)return{k:0,r:0};if(u=a/s,d=s/a,!o){const y=k.curvature(n-.001,e,r,i,!0).k,w=k.curvature(n+.001,e,r,i,!0).k;c=(w-u+(u-y))/2,l=(jn(w-u)+jn(u-y))/2}return{k:u,r:d,dk:c,adk:l}},inflections:function(n){if(n.length<4)return[];const e=k.align(n,{p1:n[0],p2:n.slice(-1)[0]}),r=e[2].x*e[1].y,i=e[3].x*e[1].y,o=e[1].x*e[2].y,a=e[3].x*e[2].y,s=18*(-3*r+2*i+3*o-a),l=18*(3*r-i-3*o),c=18*(o-r);if(k.approximately(s,0)){if(!k.approximately(l,0)){let p=-c/l;if(0<=p&&p<=1)return[p]}return[]}const u=2*s;if(k.approximately(u,0))return[];const d=l*l-4*s*c;if(d<0)return[];const h=Math.sqrt(d);return[(h-l)/u,-(l+h)/u].filter(function(p){return 0<=p&&p<=1})},bboxoverlap:function(n,e){const r=["x","y"],i=r.length;for(let o=0,a,s,l,c;o=c)return!1;return!0},expandbox:function(n,e){e.x.minn.x.max&&(n.x.max=e.x.max),e.y.max>n.y.max&&(n.y.max=e.y.max),e.z&&e.z.max>n.z.max&&(n.z.max=e.z.max),n.x.mid=(n.x.min+n.x.max)/2,n.y.mid=(n.y.min+n.y.max)/2,n.z&&(n.z.mid=(n.z.min+n.z.max)/2),n.x.size=n.x.max-n.x.min,n.y.size=n.y.max-n.y.min,n.z&&(n.z.size=n.z.max-n.z.min)},pairiteration:function(n,e,r){const i=n.bbox(),o=e.bbox(),a=1e5,s=r||.5;if(i.x.size+i.y.sizeF||F>T)&&(A+=br),A>T&&(G=T,T=A,A=G)):T4){if(arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");o=!0}}else if(a!==6&&a!==8&&a!==9&&a!==12&&arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");const s=this._3d=!o&&(a===9||a===12)||e&&e[0]&&typeof e[0].z<"u",l=this.points=[];for(let g=0,y=s?3:2;gg+In(y.y),0)

"u"&&(o=.5),o===0)return new le(r,r,i);if(o===1)return new le(e,r,r);const a=le.getABC(2,e,r,i,o);return new le(e,a.A,i)}static cubicFromPoints(e,r,i,o,a){typeof o>"u"&&(o=.5);const s=le.getABC(3,e,r,i,o);typeof a>"u"&&(a=k.dist(r,s.C));const l=a*(1-o)/o,c=k.dist(e,i),u=(i.x-e.x)/c,d=(i.y-e.y)/c,h=a*u,p=a*d,g=l*u,y=l*d,w={x:r.x-h,y:r.y-p},_={x:r.x+g,y:r.y+y},S=s.A,R={x:S.x+(w.x-S.x)/(1-o),y:S.y+(w.y-S.y)/(1-o)},j={x:S.x+(_.x-S.x)/o,y:S.y+(_.y-S.y)/o},M={x:e.x+(R.x-e.x)/o,y:e.y+(R.y-e.y)/o},A={x:i.x+(j.x-i.x)/(1-o),y:i.y+(j.y-i.y)/(1-o)};return new le(e,M,A,i)}static getUtils(){return k}getUtils(){return le.getUtils()}static get PolyBezier(){return Yn}valueOf(){return this.toString()}toString(){return k.pointsToString(this.points)}toSVG(){if(this._3d)return!1;const e=this.points,r=e[0].x,i=e[0].y,o=["M",r,i,this.order===2?"Q":"C"];for(let a=1,s=e.length;a0}length(){return k.length(this.derivative.bind(this))}static getABC(e=2,r,i,o,a=.5){const s=k.projectionratio(a,e),l=1-s,c={x:s*r.x+l*o.x,y:s*r.y+l*o.y},u=k.abcratio(a,e);return{A:{x:i.x+(i.x-c.x)/u,y:i.y+(i.y-c.y)/u},B:i,C:c,S:r,E:o}}getABC(e,r){r=r||this.get(e);let i=this.points[0],o=this.points[this.order];return le.getABC(this.order,i,r,o,e)}getLUT(e){if(this.verify(),e=e||100,this._lut.length===e+1)return this._lut;this._lut=[],e++,this._lut=[];for(let r=0,i,o;r1?1:h,p=this.compute(h),p.t=h,p.d=u,p}get(e){return this.compute(e)}point(e){return this.points[e]}compute(e){return this.ratios?k.computeWithRatios(e,this.points,this.ratios,this._3d):k.compute(e,this.points,this._3d,this.ratios)}raise(){const e=this.points,r=[e[0]],i=e.length;for(let o=1,a,s;o1;){i=[];for(let s=0,l,c=r.length-1;s=0&&s<=1}),r=r.concat(e[i].sort(k.numberSort))}).bind(this)),e.values=r.sort(k.numberSort).filter(function(i,o){return r.indexOf(i)===o}),e}bbox(){const e=this.extrema(),r={};return this.dims.forEach((function(i){r[i]=k.getminmax(this,i,e[i])}).bind(this)),r}overlaps(e){const r=this.bbox(),i=e.bbox();return k.bboxoverlap(r,i)}offset(e,r){if(typeof r<"u"){const i=this.get(e),o=this.normal(e),a={c:i,n:o,x:i.x+o.x*r,y:i.y+o.y*r};return this._3d&&(a.z=i.z+o.z*r),a}if(this._linear){const i=this.normal(0),o=this.points.map(function(a){const s={x:a.x+e*i.x,y:a.y+e*i.y};return a.z&&i.z&&(s.z=a.z+e*i.z),s});return[new le(o)]}return this.reduce().map(function(i){return i._linear?i.offset(e)[0]:i.scale(e)})}simple(){if(this.order===3){const o=k.angle(this.points[0],this.points[3],this.points[1]),a=k.angle(this.points[0],this.points[3],this.points[2]);if(o>0&&a<0||o<0&&a>0)return!1}const e=this.normal(0),r=this.normal(1);let i=e.x*r.x+e.y*r.y;return this._3d&&(i+=e.z*r.z),In(c0(i))(1-l/o)*r+l/o*i);return new le(this.points.map((s,l)=>({x:s.x+e.x*a[l],y:s.y+e.y*a[l]})))}scale(e){const r=this.order;let i=!1;if(typeof e=="function"&&(i=e),i&&r===2)return this.raise().scale(i);const o=this.clockwise,a=this.points;if(this._linear)return this.translate(this.normal(0),i?i(0):e,i?i(1):e);const s=i?i(0):e,l=i?i(1):e,c=[this.offset(0,10),this.offset(1,10)],u=[],d=k.lli4(c[0],c[0].c,c[1],c[1].c);if(!d)throw new Error("cannot scale this curve. Try reducing it first.");return[0,1].forEach(function(h){const p=u[h*r]=k.copy(a[h*r]);p.x+=(h?l:s)*c[h].n.x,p.y+=(h?l:s)*c[h].n.y}),i?([0,1].forEach(function(h){if(!(r===2&&h)){var p=a[h+1],g={x:p.x-d.x,y:p.y-d.y},y=i?i((h+1)/r):e;i&&!o&&(y=-y);var w=Dn(g.x*g.x+g.y*g.y);g.x/=w,g.y/=w,u[h+1]={x:p.x+y*g.x,y:p.y+y*g.y}}}),new le(u)):([0,1].forEach(h=>{if(r===2&&h)return;const p=u[h*r],g=this.derivative(h),y={x:p.x+g.x,y:p.y+g.y};u[h+1]=k.lli4(p,y,d,a[h+1])}),new le(u))}outline(e,r,i,o){if(r=r===void 0?e:r,this._linear){const A=this.normal(0),F=this.points[0],T=this.points[this.points.length-1];let G,O,P;i===void 0&&(i=e,o=r),G={x:F.x+A.x*e,y:F.y+A.y*e},P={x:T.x+A.x*i,y:T.y+A.y*i},O={x:(G.x+P.x)/2,y:(G.y+P.y)/2};const W=[G,O,P];G={x:F.x-A.x*r,y:F.y-A.y*r},P={x:T.x-A.x*o,y:T.y-A.y*o},O={x:(G.x+P.x)/2,y:(G.y+P.y)/2};const ae=[P,O,G],ee=k.makeline(ae[2],W[0]),X=k.makeline(W[2],ae[0]),De=[ee,new le(W),X,new le(ae)];return new Yn(De)}const a=this.reduce(),s=a.length,l=[];let c=[],u,d=0,h=this.length();const p=typeof i<"u"&&typeof o<"u";function g(A,F,T,G,O){return function(P){const W=G/T,ae=(G+O)/T,ee=F-A;return k.map(P,0,1,A+W*ee,A+ae*ee)}}a.forEach(function(A){const F=A.length();p?(l.push(A.scale(g(e,i,h,d,F))),c.push(A.scale(g(-r,-o,h,d,F)))):(l.push(A.scale(e)),c.push(A.scale(-r))),d+=F}),c=c.map(function(A){return u=A.points,u[3]?A.points=[u[3],u[2],u[1],u[0]]:A.points=[u[2],u[1],u[0]],A}).reverse();const y=l[0].points[0],w=l[s-1].points[l[s-1].points.length-1],_=c[s-1].points[c[s-1].points.length-1],S=c[0].points[0],R=k.makeline(_,y),j=k.makeline(w,S),M=[R].concat(l).concat([j]).concat(c);return new Yn(M)}outlineshapes(e,r,i){r=r||e;const o=this.outline(e,r).curves,a=[];for(let s=1,l=o.length;s1,c.endcap.virtual=s{var l=this.get(s);return k.between(l.x,r,o)&&k.between(l.y,i,a)})}selfintersects(e){const r=this.reduce(),i=r.length-2,o=[];for(let a=0,s,l,c;a0&&(a=a.concat(l))}),a}arcs(e){return e=e||.5,this._iterate(e,[])}_error(e,r,i,o){const a=(o-i)/4,s=this.get(i+a),l=this.get(o-a),c=k.dist(e,r),u=k.dist(e,s),d=k.dist(e,l);return In(u-c)+In(d-c)}_iterate(e,r){let i=0,o=1,a;do{a=0,o=1;let s=this.get(i),l,c,u,d,h=!1,p=!1,g,y=o,w=1;do if(p=h,d=u,y=(i+o)/2,l=this.get(y),c=this.get(o),u=k.getccenter(s,l,c),u.interval={start:i,end:o},h=this._error(u,s,i,o)<=e,g=p&&!h,g||(w=o),h){if(o>=1){if(u.interval.end=w=1,d=u,o>1){let S={x:u.x+u.r*s0(u.e),y:u.y+u.r*l0(u.e)};u.e+=k.angle({x:u.x,y:u.y},S,this.get(1))}break}o=o+(o-i)/2}else o=y;while(!g&&a++<100);if(a>=100)break;d=d||u,r.push(d),i=w}while(o<1);return r}}const xl=(n,e,r,i)=>{i=i!=null?i:-r;const[o,a]=Sl(n);if(!o||!a)return;if(o[0]===a[0]||o[1]===a[1]||e===N.Diagonal&&Math.abs(o[1]-a[1])===Math.abs(o[0]-a[0])){const M=Math.abs(r);return _l(o,a,M)}const[s,l]=to(n);if(!s||!l)return;const c=new le([...s,...l]),[u,d]=[c.scale(r),c.scale(i)],h=Nl(o,s,a,c,u,d);if(!h)return;const{mA:[p,g],mB:[y,w],endA:[_,S],endB:[R,j]}=h;return["M ".concat(p," ").concat(g," ").concat(u.toSVG().replace("M","L")," L ").concat(_," ").concat(S),"M ".concat(y," ").concat(w," ").concat(d.toSVG().replace("M","L")," L ").concat(R," ").concat(j)]},d0=(n,e,r,i)=>{i=i!=null?i:-r;const[o,a]=Sl(n);if(!o||!a)return;if(o[0]===a[0]||o[1]===a[1]||e===N.Diagonal&&Math.abs(o[1]-a[1])===Math.abs(o[0]-a[0])){const O=Math.abs(r),[P,W]=_l(o,a,O);return{outline:h0(o,a,O),pA:P,pB:W}}const[s,l]=to(n);if(!s||!l)return;const c=new le([...s,...l]),[u,d]=[c.scale(r),c.scale(i)],h=Nl(o,s,a,c,u,d);if(!h)return;const{mA:[p,g],mB:[y,w],endA:[_,S],endB:[R,j]}=h,[M,A]=to(d.toSVG().replace("M","L")),[F,T]=p0(M,A);return{outline:"M ".concat(p," ").concat(g," ").concat(u.toSVG().replace("M","L")," L ").concat(_," ").concat(S," L ").concat(R," ").concat(j," L ").concat(F.join(" ")," C ").concat(T.join(" ")," L ").concat(y," ").concat(w," Z"),pA:"M ".concat(p," ").concat(g," ").concat(u.toSVG().replace("M","L")," L ").concat(_," ").concat(S),pB:"M ".concat(y," ").concat(w," ").concat(d.toSVG().replace("M","L")," L ").concat(R," ").concat(j)}},Sl=n=>{var i,o,a,s;const e=(o=(i=n.match(/M\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+/))==null?void 0:i.at(0))==null?void 0:o.replace(/M\s*/,"").split(" ").map(l=>Number(l)),r=(s=(a=n.match(/L\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+\s*$/))==null?void 0:a.at(0))==null?void 0:s.replace(/L\s*/,"").split(" ").map(l=>Number(l));return[e,r]},_l=(n,e,r)=>{const[i,o,a,s]=[n[0],n[1],e[0],e[1]],l=Math.abs((s-o)/(a-i));if(l===1/0)return["M ".concat(i+r," ").concat(o," L ").concat(a+r," ").concat(s),"M ".concat(i-r," ").concat(o," L ").concat(a-r," ").concat(s)];if(l===0)return["M ".concat(i," ").concat(o+r," L ").concat(a," ").concat(s+r),"M ".concat(i," ").concat(o-r," L ").concat(a," ").concat(s-r)];{const c=1/l,u=r/Math.sqrt(c*c+1),d=u*c*-Math.sign((a-i)*(s-o));return["M ".concat(i+u," ").concat(o+d," L ").concat(a+u," ").concat(s+d),"M ".concat(i-u," ").concat(o-d," L ").concat(a-u," ").concat(s-d)]}},h0=(n,e,r)=>{const[i,o,a,s]=[n[0],n[1],e[0],e[1]],l=Math.abs((s-o)/(a-i));if(l===1/0)return"M ".concat(i+r," ").concat(o," L ").concat(a+r," ").concat(s," L ").concat(a-r," ").concat(s," L ").concat(i-r," ").concat(o," Z");if(l===0)return"M ".concat(i," ").concat(o+r," L ").concat(a," ").concat(s+r," L ").concat(a," ").concat(s-r," L ").concat(i," ").concat(o-r," Z");{const c=1/l,u=r/Math.sqrt(c*c+1),d=u*c*-Math.sign((a-i)*(s-o));return"M ".concat(i+u," ").concat(o+d," L ").concat(a+u," ").concat(s+d," L ").concat(a-u," ").concat(s-d," L ").concat(i-u," ").concat(o-d," Z")}},to=n=>{var i,o,a,s;const e=(o=(i=n.match(/L\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+/))==null?void 0:i.at(0))==null?void 0:o.replace(/L\s*/,"").split(" ").map(l=>Number(l)),r=(s=(a=n.match(/C\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+/g))==null?void 0:a.at(0))==null?void 0:s.replace(/C\s*/,"").split(" ").map(l=>Number(l));return[e,r]},p0=(n,e)=>[[e[4],e[5]],[e[2],e[3],e[0],e[1],n[0],n[1]]],Nl=(n,e,r,i,o,a)=>{const s=[o.points.at(0).x,o.points.at(0).y],l=[a.points.at(0).x,a.points.at(0).y];if(!n)return;const[c,u]=vr(n[0],e[0],s[0],n[1],e[1],s[1]),[d,h]=vr(n[0],e[0],l[0],n[1],e[1],l[1]),p=[o.points.at(-1).x,o.points.at(-1).y],g=[a.points.at(-1).x,a.points.at(-1).y],y=[i.points.at(-1).x,i.points.at(-1).y];if(!r)return;const[w,_]=vr(p[0],y[0],r[0],p[1],y[1],r[1]),[S,R]=vr(g[0],y[0],r[0],g[1],y[1],r[1]);return{mA:[c,u],mB:[d,h],endA:[w,_],endB:[S,R]}},vr=(n,e,r,i,o,a)=>{const[s,l]=[n+r,i+a],[c,u]=[s-e,l-o];return[c,u]},f0=1,bx=(n,e)=>{const r=e.edge,i=e.attributes.type,o=e.attributes[i],a=e.attributes.parallelIndex;if(i===N.Simple||a<0)return{normal:[e],parallel:[]};const s=[],[l,c]=n.extremities(r),u=[];for(const d of n.edgeEntries(l,c)){if(d.attributes.parallelIndex<0){s.push(d);continue}(d.attributes.type===i&&l===d.source&&d.attributes[i].startFrom===o.startFrom||d.attributes.type===i&&l===d.target&&d.attributes[i].startFrom!==o.startFrom)&&u.push(d)}return{normal:s,parallel:u}},g0=(n,e,r,i,o)=>{let a=!1;if(n===N.Diagonal)(Math.abs(i-e)e&&o>r)||Math.abs(i-e)>Math.abs(o-r)&&(i>e&&or))&&(a=!0);else if(n===N.Perpendicular)(i>e&&or)&&(a=!0);else if(n===N.RotatePerpendicular){const[s,l,c,u]=[e*Math.SQRT1_2+r*Math.SQRT1_2,-e*Math.SQRT1_2+r*Math.SQRT1_2,i*Math.SQRT1_2+o*Math.SQRT1_2,-i*Math.SQRT1_2+o*Math.SQRT1_2];(c>s&&ul)&&(a=!0)}return a},vx=n=>{var p;let e=n.at(0);if(!e)return{};for(const g of n)g.attributes.parallelIndex0?g.attributes.parallelIndex:0;if(y===0){h[g.edge]=u;continue}const w=y*5,_=["M ".concat(a," ").concat(s+w," L ").concat(l," ").concat(c+w),"M ".concat(a," ").concat(s-w," L ").concat(l," ").concat(c-w)],[S,R]=(p=xl(u,r,w))!=null?p:_;h[g.edge]=d?S:R}return h},wx=(n,e,r,i,o)=>{if(e===N.Simple)return-1;const a=[];for(const l of n.edgeEntries(r,i)){const c=l.attributes;(e===c.type&&r===l.source&&c[e].startFrom===o||e===c.type&&r===l.target&&c[e].startFrom!==o)&&a.push(l.attributes.parallelIndex)}a.sort();let s=0;for(const l of a){if(l>s)break;s=l+1}return s},Oo=(n,e,r)=>{if(e===N.Simple)return r;const i=n.getEdgeAttribute(r,"parallelIndex");if(i<0)return r;const o=n.getEdgeAttribute(r,e).startFrom,[a,s]=n.extremities(r);let l=Number.MAX_VALUE,c=r;for(const u of n.edgeEntries(a,s)){const d=u.attributes;(e===d.type&&a===u.source&&d[e].startFrom===o&&d.parallelIndex>=0&&d.parallelIndex=0&&d.parallelIndex{let e=0;for(const r of n.edgeEntries())r.attributes.parallelIndex>=0&&(e+=1);return e},v0={telemetry:{app:!0,project:!0},preference:{unlockSimplePathAttempts:3,toolsPanel:{expand:!0},autoParallel:!0}},Rl=ri({name:"app",initialState:v0,reducers:{setTelemetryApp:(n,e)=>{n.telemetry.app=e.payload},setTelemetryProject:(n,e)=>{n.telemetry.project=e.payload},setUnlockSimplePath:(n,e)=>{n.preference.unlockSimplePathAttempts=e.payload},setToolsPanelExpansion:(n,e)=>{n.preference.toolsPanel.expand=e.payload},setAutoParallel:(n,e)=>{n.preference.autoParallel=e.payload}}}),{setTelemetryApp:w0,setTelemetryProject:x0,setUnlockSimplePath:S0,setToolsPanelExpansion:_0,setAutoParallel:kl}=Rl.actions,N0=Rl.reducer,R0=49,k0={present:new pe().export(),past:[],future:[],svgViewBoxZoom:100,svgViewBoxMin:{x:0,y:0}},Cl=qa("undo"),Al=qa("redo"),Tl=ri({name:"param",initialState:k0,reducers:{setFullState:(n,e)=>structuredClone(e.payload),saveGraph:(n,e)=>{n.future=[],n.past.push(n.present),n.past.length>R0&&n.past.shift(),n.present=structuredClone(e.payload)},setSvgViewBoxZoom:(n,e)=>{n.svgViewBoxZoom=e.payload},setSvgViewBoxMin:(n,e)=>{n.svgViewBoxMin=e.payload}},extraReducers:n=>{n.addCase(Cl,e=>{if(e.past.length===0)return;const r=e.past.pop();e.future.unshift(e.present),e.present=r,window.graph.clear(),window.graph.import(structuredClone(Ko(r)))}).addCase(Al,e=>{if(e.future.length===0)return;const r=e.future.shift();e.past.push(e.present),e.present=r,window.graph.clear(),window.graph.import(structuredClone(Ko(r)))})}}),{setFullState:C0,saveGraph:cn,setSvgViewBoxZoom:xx,setSvgViewBoxMin:Sx}=Tl.actions,A0=Tl.reducer,T0={selected:new Set,active:void 0,refresh:{nodes:Date.now(),edges:Date.now()},mode:"free",lastTool:void 0,keepLastPath:!1,theme:[ye.Shanghai,"sh1","#E3002B",de.white],paletteAppClip:{input:void 0,output:void 0},masterNodesCount:0,parallelLinesCount:0,globalAlerts:{}},Ur=Qa("runtime/refreshNodes",async(n,{getState:e,dispatch:r})=>{const i=e();if(r(L0()),i.account.timeout)return;let o=0;window.graph.forEachNode((s,l)=>{l.type===st.Master&&(o+=1)}),r(E0(o));const a=i.account.activeSubscriptions.RMP_CLOUD?Ty:Ay;o>a&&r(jo({status:"warning",message:"".concat(Xn.t("header.settings.proLimitExceed.master")," ").concat(Xn.t("header.settings.proLimitExceed.solution"))}))}),pn=Qa("runtime/refreshEdges",async(n,{getState:e,dispatch:r})=>{const i=e();if(r(M0()),i.account.timeout)return;const o=b0(window.graph);r(O0(o));const a=i.account.activeSubscriptions.RMP_CLOUD?y0:m0;o>=a&&r(kl(!1)),o>a&&r(jo({status:"warning",message:"".concat(Xn.t("header.settings.proLimitExceed.parallel")," ").concat(Xn.t("header.settings.proLimitExceed.solution"))}))}),Lo=ri({name:"runtime",initialState:T0,reducers:{setSelected:(n,e)=>{n.selected=e.payload},addSelected:(n,e)=>{n.selected.add(e.payload)},removeSelected:(n,e)=>{n.selected.delete(e.payload)},clearSelected:n=>{n.selected=new Set},setActive:(n,e)=>{n.active=e.payload},setRefreshNodes:n=>{n.refresh.nodes=Date.now()},setRefreshEdges:n=>{n.refresh.edges=Date.now()},setMode:(n,e)=>{n.mode!=="free"&&(n.lastTool=n.mode),n.mode=e.payload},setKeepLastPath:(n,e)=>{n.keepLastPath=e.payload},setTheme:(n,e)=>{n.theme=e.payload},openPaletteAppClip:(n,e)=>{n.paletteAppClip.input=e.payload,n.paletteAppClip.output=void 0},closePaletteAppClip:n=>{n.paletteAppClip.input=void 0},onPaletteAppClipEmit:(n,e)=>{n.paletteAppClip.input=void 0,n.paletteAppClip.output=e.payload},setMasterNodesCount:(n,e)=>{n.masterNodesCount=e.payload},setParallelLinesCount:(n,e)=>{n.parallelLinesCount=e.payload},setGlobalAlert:(n,e)=>{const{status:r,message:i,url:o,linkedApp:a}=e.payload;n.globalAlerts[r]={message:i,url:o,linkedApp:a}},closeGlobalAlert:(n,e)=>{delete n.globalAlerts[e.payload]}},extraReducers:n=>{n.addCase(Cl,e=>{e.refresh.nodes=Date.now(),e.refresh.edges=Date.now()}).addCase(Al,e=>{e.refresh.nodes=Date.now(),e.refresh.edges=Date.now()})}}),{setMasterNodesCount:E0,setParallelLinesCount:O0}=Lo.actions,{setSelected:Mo,addSelected:_x,removeSelected:Nx,clearSelected:Rx,setActive:kx,setRefreshNodes:L0,setRefreshEdges:M0,setMode:Cx,setKeepLastPath:Ax,setTheme:Tx,openPaletteAppClip:j0,closePaletteAppClip:$0,onPaletteAppClipEmit:P0,setGlobalAlert:jo,closeGlobalAlert:Ex}=Lo.actions,I0=Lo.reducer,$o=(n,e,r)=>e===0?n:D0(n,e);function D0(n,e,r){function i(O,P,W){var ae=P.x-O.x,ee=P.y-O.y,X=Math.sqrt(ae*ae+ee*ee);return o(O,P,Math.min(1,W/X))}function o(O,P,W){return{x:O.x+(P.x-O.x)*W,y:O.y+(P.y-O.y)*W}}function a(O,P){O.length>2&&(O[O.length-2]=P.x,O[O.length-1]=P.y)}function s(O){return{x:parseFloat(O[O.length-2]),y:parseFloat(O[O.length-1])}}var l=n.split(/[,\s]/).reduce(function(O,P){var W=P.match("([a-zA-Z])(.+)");return W?(O.push(W[1]),O.push(W[2])):O.push(P),O},[]),c=l.reduce(function(O,P){return parseFloat(P)==P&&O.length?O[O.length-1].push(P):O.push([P]),O},[]),u=[];if(c.length>1){var d=s(c[0]),h=null;c[c.length-1][0]=="Z"&&c[0].length>2&&(h=["L",d.x,d.y],c[c.length-1]=h),u.push(c[0]);for(var p=1;p2&&y[0]=="L"&&w.length>2&&w[0]=="L"){var _=s(g),S=s(y),R=s(w),j,M;j=i(S,_,e),M=i(S,R,e),a(y,j),y.origPoint=S,u.push(y);var A=o(j,S,.5),F=o(S,M,.5),T=["C",A.x,A.y,F.x,F.y,M.x,M.y];T.origPoint=S,u.push(T)}else u.push(y)}if(h){var G=s(u[u.length-1]);u.push(["Z"]),a(u[0],G)}}else u=c;return u.reduce(function(O,P){return O+P.join(" ")+" "},"")}const B0=(n,e,r,i,o=yt)=>{const{startFrom:a=yt.startFrom,offsetFrom:s=yt.offsetFrom,offsetTo:l=yt.offsetTo,roundCornerFactor:c=yt.roundCornerFactor}=o,[u,d,h,p]=a==="from"?[n,r,e,i]:[e,i,n,r],g=Math.abs(h-u)0?-1:1):M,O=g==="horizontal"?A:T+Math.abs(F-M)*(T-A>0?-1:1),[P,W,ae,ee]=a==="from"?[M,A,F,T]:[F,T,M,A];return $o("M ".concat(P," ").concat(W," L ").concat(G," ").concat(O," L ").concat(ae," ").concat(ee),c)},yt={startFrom:"from",offsetFrom:0,offsetTo:0,roundCornerFactor:10},z0=n=>{var h,p,g;const{id:e,attrs:r,handleAttrsUpdate:i,recalculateParallelIndex:o,parallelIndex:a}=n,{t:s}=Te(),l=Vt(),c=Oo(window.graph,N.Diagonal,e),u=a>=0&&c!==e,d=[{type:"select",label:s("panel.details.lines.common.startFrom"),value:r.startFrom,options:{from:s("panel.details.lines.common.from"),to:s("panel.details.lines.common.to")},onChange:y=>{o(e,y),r.startFrom=y,i(e,r)},minW:"full"},{type:"input",label:s("panel.details.lines.common.offsetFrom"),value:((h=r.offsetFrom)!=null?h:yt.offsetFrom).toString(),variant:"number",onChange:y=>{Number.isNaN(y)&&(y="0"),r.offsetFrom=Number(y),i(e,r)},isDisabled:u,minW:"full"},{type:"input",label:s("panel.details.lines.common.offsetTo"),value:((p=r.offsetTo)!=null?p:yt.offsetTo).toString(),variant:"number",onChange:y=>{Number.isNaN(y)&&(y="0"),r.offsetTo=Number(y),i(e,r)},isDisabled:u,minW:"full"},{type:"input",label:s("panel.details.lines.common.roundCornerFactor"),value:((g=r==null?void 0:r.roundCornerFactor)!=null?g:yt.roundCornerFactor).toString(),variant:"number",onChange:y=>{(Number.isNaN(y)||Number(y)<0)&&(y="0"),r.roundCornerFactor=Number(y),i(e,r)},isDisabled:u,minW:"full"}];return u&&d.unshift({type:"custom",label:s("panel.details.lines.common.parallelDisabled"),component:m.jsxs(dn,{size:"sm",variant:"link",onClick:()=>l(Mo(new Set([c]))),children:[s("panel.details.lines.common.changeInBaseLine")," ",c]})}),m.jsx(Ee,{fields:d})},F0=m.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:m.jsx("path",{d:"M9,18V12L15,6",stroke:"currentColor",fill:"none"})}),G0={generatePath:B0,icon:F0,defaultAttrs:yt,attrsComponent:z0,metadata:{displayName:"panel.details.lines.diagonal.displayName"}},U0=(n,e,r,i,o=bt)=>{const{startFrom:a=bt.startFrom,offsetFrom:s=bt.offsetFrom,offsetTo:l=bt.offsetTo,roundCornerFactor:c=bt.roundCornerFactor}=o,[u,d]=a==="from"?[s,l]:[l,s],[h,p,g,y]=a==="from"?[0,u,d,0]:[u,0,0,d],w=a==="from"?e+g:n+h,_=a==="from"?r+p:i+y;return $o("M ".concat(n+h," ").concat(r+p," L ").concat(w," ").concat(_," L ").concat(e+g," ").concat(i+y),c)},bt={startFrom:"from",offsetFrom:0,offsetTo:0,roundCornerFactor:18.33},W0=n=>{var h,p,g;const{id:e,attrs:r,handleAttrsUpdate:i,recalculateParallelIndex:o,parallelIndex:a}=n,{t:s}=Te(),l=Vt(),c=Oo(window.graph,N.Perpendicular,e),u=a>=0&&c!==e,d=[{type:"select",label:s("panel.details.lines.common.startFrom"),value:r.startFrom,options:{from:s("panel.details.lines.common.from"),to:s("panel.details.lines.common.to")},onChange:y=>{o(e,y),r.startFrom=y,i(e,r)},minW:"full"},{type:"input",label:s("panel.details.lines.common.offsetFrom"),value:((h=r.offsetFrom)!=null?h:bt.offsetFrom).toString(),variant:"number",onChange:y=>{Number.isNaN(y)&&(y="0"),r.offsetFrom=Number(y),i(e,r)},isDisabled:u,minW:"full"},{type:"input",label:s("panel.details.lines.common.offsetTo"),value:((p=r.offsetTo)!=null?p:bt.offsetTo).toString(),variant:"number",onChange:y=>{Number.isNaN(y)&&(y="0"),r.offsetTo=Number(y),i(e,r)},isDisabled:u,minW:"full"},{type:"input",label:s("panel.details.lines.common.roundCornerFactor"),value:((g=r==null?void 0:r.roundCornerFactor)!=null?g:bt.roundCornerFactor).toString(),variant:"number",onChange:y=>{(Number.isNaN(y)||Number(y)<0)&&(y="0"),r.roundCornerFactor=Number(y),i(e,r)},isDisabled:u,minW:"full"}];return u&&d.unshift({type:"custom",label:s("panel.details.lines.common.parallelDisabled"),component:m.jsxs(dn,{size:"sm",variant:"link",onClick:()=>l(Mo(new Set([c]))),children:[s("panel.details.lines.common.changeInBaseLine")," ",c]})}),m.jsx(Ee,{fields:d})},V0=m.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:m.jsx("path",{d:"M6,6H18V18",stroke:"currentColor",fill:"none"})}),H0={generatePath:U0,icon:V0,defaultAttrs:bt,attrsComponent:W0,metadata:{displayName:"panel.details.lines.perpendicular.displayName"}},J0=(n,e,r,i,o=vt)=>{const{startFrom:a=vt.startFrom,offsetFrom:s=vt.offsetFrom,offsetTo:l=vt.offsetTo,roundCornerFactor:c=vt.roundCornerFactor}=o,[u,d]=a==="from"?[s,l]:[l,s],[h,p,g,y]=a==="from"?[0,u,d,0]:[u,0,0,d],[w,_,S,R]=[n*Math.SQRT1_2+r*Math.SQRT1_2,-n*Math.SQRT1_2+r*Math.SQRT1_2,e*Math.SQRT1_2+i*Math.SQRT1_2,-e*Math.SQRT1_2+i*Math.SQRT1_2],[j,M,A,F]=[w+h,_+p,S+g,R+y],[T,G,O,P]=[j*Math.SQRT1_2-M*Math.SQRT1_2,j*Math.SQRT1_2+M*Math.SQRT1_2,A*Math.SQRT1_2-F*Math.SQRT1_2,A*Math.SQRT1_2+F*Math.SQRT1_2],W=a==="from"?S+g:w+h,ae=a==="from"?_+p:R+y,[ee,X]=[W*Math.SQRT1_2-ae*Math.SQRT1_2,W*Math.SQRT1_2+ae*Math.SQRT1_2];return $o("M ".concat(T," ").concat(G," L ").concat(ee," ").concat(X," L ").concat(O," ").concat(P),c)},vt={startFrom:"from",offsetFrom:0,offsetTo:0,roundCornerFactor:18.33},K0=n=>{var h,p,g;const{id:e,attrs:r,handleAttrsUpdate:i,recalculateParallelIndex:o,parallelIndex:a}=n,{t:s}=Te(),l=Vt(),c=Oo(window.graph,N.RotatePerpendicular,e),u=a>=0&&c!==e,d=[{type:"select",label:s("panel.details.lines.common.startFrom"),value:r.startFrom,options:{from:s("panel.details.lines.common.from"),to:s("panel.details.lines.common.to")},onChange:y=>{o(e,y),r.startFrom=y,i(e,r)},minW:"full"},{type:"input",label:s("panel.details.lines.common.offsetFrom"),value:((h=r.offsetFrom)!=null?h:vt.offsetFrom).toString(),variant:"number",onChange:y=>{Number.isNaN(y)&&(y="0"),r.offsetFrom=Number(y),i(e,r)},isDisabled:u,minW:"full"},{type:"input",label:s("panel.details.lines.common.offsetTo"),value:((p=r.offsetTo)!=null?p:vt.offsetTo).toString(),variant:"number",onChange:y=>{Number.isNaN(y)&&(y="0"),r.offsetTo=Number(y),i(e,r)},isDisabled:u,minW:"full"},{type:"input",label:s("panel.details.lines.common.roundCornerFactor"),value:((g=r==null?void 0:r.roundCornerFactor)!=null?g:vt.roundCornerFactor).toString(),variant:"number",onChange:y=>{(Number.isNaN(y)||Number(y)<0)&&(y="0"),r.roundCornerFactor=Number(y),i(e,r)},isDisabled:u,minW:"full"}];return u&&d.unshift({type:"custom",label:s("panel.details.lines.common.parallelDisabled"),component:m.jsxs(dn,{size:"sm",variant:"link",onClick:()=>l(Mo(new Set([c]))),children:[s("panel.details.lines.common.changeInBaseLine")," ",c]})}),m.jsx(Ee,{fields:d})},Y0=m.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:m.jsx("path",{d:"M9,6L15,12L9,18",stroke:"currentColor",fill:"none"})}),q0={generatePath:J0,icon:Y0,defaultAttrs:vt,attrsComponent:K0,metadata:{displayName:"panel.details.lines.rotatePerpendicular.displayName"}};var H=(n=>(n.ShmetroBasic="shmetro-basic",n.ShmetroBasic2020="shmetro-basic-2020",n.ShmetroInt="shmetro-int",n.ShmetroOutOfSystemInt="shmetro-osysi",n.ShanghaiSuburbanRailway="sh-sub-rwy",n.GzmtrBasic="gzmtr-basic",n.GzmtrInt="gzmtr-int",n.GzmtrInt2024="gzmtr-int-2024",n.BjsubwayBasic="bjsubway-basic",n.BjsubwayInt="bjsubway-int",n.MTR="mtr",n.SuzhouRTBasic="suzhourt-basic",n.SuzhouRTInt="suzhourt-int",n.KunmingRTBasic="kunmingrt-basic",n.KunmingRTInt="kunmingrt-int",n.MRTBasic="mrt-basic",n.MRTInt="mrt-int",n.JREastBasic="jr-east-basic",n.JREastImportant="jr-east-imp",n.FoshanMetroBasic="foshan-metro-basic",n.QingdaoMetroStation="qingdao-metro-basic",n.TokyoMetroBasic="tokyo-metro-basic",n.TokyoMetroInt="tokyo-metro-int",n.LondonTubeBasic="london-tube-basic",n.LondonTubeInt="london-tube-int",n.GuangdongIntercityRailway="gd-intercity-rwy",n))(H||{});const Ox=["shmetro-basic-2020","gzmtr-basic","suzhourt-basic","kunmingrt-basic","mrt-basic","foshan-metro-basic","qingdao-metro-basic"],Lx={names:["车站","Stn"]};class Q0{static hexToRgb(e){return[parseInt(e.slice(1,3),16),parseInt(e.slice(3,5),16),parseInt(e.slice(5,7),16)]}static fade(e,r){return"rgba(".concat([...this.hexToRgb(e),r].join(","),")")}static euclideanDistance(e,r){return this.hexToRgb(e).reduce((i,o,a)=>i+Math.pow(o-this.hexToRgb(r)[a],2),0)}}function Mx(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"},child:[]}]})(n)}function jx(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"},child:[]}]})(n)}function $x(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"},child:[]}]})(n)}function Px(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 14h-3v3h-2v-3H8v-2h3v-3h2v3h3v2zm-3-7V3.5L18.5 9H13z"},child:[]}]})(n)}function Ix(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 19H5V5h7V3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"},child:[]}]})(n)}function Dx(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"},child:[]}]})(n)}function Bx(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58a.49.49 0 0 0 .12-.61l-1.92-3.32a.488.488 0 0 0-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54a.484.484 0 0 0-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58a.49.49 0 0 0-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"},child:[]}]})(n)}function zx(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12.87 15.07-2.54-2.51.03-.03A17.52 17.52 0 0 0 14.07 6H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7 1.62-4.33L19.12 17h-3.24z"},child:[]}]})(n)}function Fx(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"},child:[]},{tag:"path",attr:{d:"M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z"},child:[]}]})(n)}function Gx(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14zM7 9h5v1H7z"},child:[]}]})(n)}function Ux(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M13 7h9v2h-9zM13 15h9v2h-9zM16 11h6v2h-6zM13 12 8 7v4H2v2h6v4z"},child:[]}]})(n)}function Wx(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"},child:[]}]})(n)}function Vx(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"},child:[]}]})(n)}function Hx(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M3 13h2v-2H3v2zm4 8h2v-2H7v2zm6-18h-2v2h2V3zm6 0v2h2c0-1.1-.9-2-2-2zM5 21v-2H3c0 1.1.9 2 2 2zm-2-4h2v-2H3v2zm8 4h2v-2h-2v2zm8-8h2v-2h-2v2zm0-4h2V7h-2v2zm-4-4h2V3h-2v2zM7.83 5 7 4.17V3h2v2H7.83zm12 12-.83-.83V15h2v2h-1.17zm1.36 4.19L2.81 2.81 1.39 4.22 4.17 7H3v2h2V7.83l2 2V17h7.17l2 2H15v2h2v-1.17l2.78 2.78 1.41-1.42zM9 15v-3.17L12.17 15H9zm6-2.83V9h-3.17l-2-2H17v7.17l-2-2z"},child:[]}]})(n)}function Jx(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 0 1 7.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"},child:[]}]})(n)}function Kx(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M21 12.4V7l-4-4H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h7.4l8.6-8.6zM15 15c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3 3 1.34 3 3zM6 6h9v4H6V6zm13.99 10.25 1.77 1.77L16.77 23H15v-1.77l4.99-4.98zm3.26.26-.85.85-1.77-1.77.85-.85c.2-.2.51-.2.71 0l1.06 1.06c.2.2.2.52 0 .71z"},child:[]}]})(n)}function Yx(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M17 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V7l-4-4zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm3-10H5V5h10v4z"},child:[]}]})(n)}function qx(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"},child:[]}]})(n)}function Qx(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6zm7 7V3.5L18.5 9H13z"},child:[]}]})(n)}function Xx(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M5 20h14v-2H5v2zM19 9h-4V3H9v6H5l7 7 7-7z"},child:[]}]})(n)}function Zx(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M5 20h14v-2H5v2zm0-10h4v6h6v-6h4l-7-7-7 7z"},child:[]}]})(n)}function X0(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2z"},child:[]}]})(n)}function eS(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"},child:[]}]})(n)}function tS(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"},child:[]}]})(n)}function nS(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"},child:[]}]})(n)}function rS(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"},child:[]}]})(n)}function iS(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"},child:[]}]})(n)}function oS(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"},child:[]}]})(n)}function aS(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"},child:[]}]})(n)}function sS(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"},child:[]}]})(n)}function lS(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M5 13.18v4L12 21l7-3.82v-4L12 17l-7-3.82zM12 3 1 9l11 6 9-4.91V17h2V9L12 3z"},child:[]}]})(n)}function Z0(n){return K({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M16 17.01V10h-2v7.01h-3L15 21l4-3.99h-3zM9 3 5 6.99h3V14h2V6.99h3L9 3zm7 14.01V10h-2v7.01h-3L15 21l4-3.99h-3zM9 3 5 6.99h3V14h2V6.99h3L9 3z"},child:[]}]})(n)}function ew(n){const{theme:e,onClick:r}=n,{t:i}=Te();return m.jsx(Er,{"aria-label":i("Color"),color:e[3],bg:e[2],size:"md",_hover:{bg:Q0.fade(e[2],.7)},icon:m.jsx(X0,{}),onClick:r})}const Ie=n=>{var R;const{type:e,colorKey:r="color",defaultTheme:i}=n,o=Vt(),{selected:a,paletteAppClip:{output:s}}=hi(j=>j.runtime),[l]=a,c=D.useCallback(()=>{o(Ur()),o(pn()),o(cn(u.current.export()))},[o,Ur,pn,cn]),u=D.useRef(window.graph),[d,h,p]=[].concat(Object.values(H)).concat(Object.values(st)).find(j=>e===j)?[u.current.hasNode,u.current.getNodeAttribute,u.current.mergeNodeAttributes]:[u.current.hasEdge,u.current.getEdgeAttribute,u.current.mergeEdgeAttributes],g=j=>{if(l&&d.bind(u.current)(l)){const M=h.bind(u.current)(l,e);M[r]=j,p.bind(u.current)(l,{[e]:M}),c()}},[y,w]=D.useState(!1);D.useEffect(()=>{y&&s&&(g(s),w(!1))},[s==null?void 0:s.toString()]);const S=l&&d.bind(u.current)(l)&&(l.startsWith("stn")||l.startsWith("misc_node")?u.current.getNodeAttribute(l,"type")===e:u.current.getEdgeAttribute(l,"style")===e)?((R=h.bind(u.current)(l,e))!=null?R:{[r]:i})[r]:i;return m.jsx(m.Fragment,{children:m.jsx(ew,{theme:S,onClick:()=>{w(!0),o(j0(S))}})})},tw=n=>{const{id:e,path:r,styleAttrs:i,newLine:o,handlePointerDown:a}=n,{color:s=Wr.color}=i!=null?i:Wr,l=D.useCallback(c=>a(e,c),[e,a]);return m.jsx("path",{id:e,d:r,fill:"none",stroke:s[2],strokeWidth:"5",strokeLinecap:"round",cursor:"pointer",onPointerDown:o?void 0:l,pointerEvents:o?"none":void 0})},Wr={color:[ye.Shanghai,"sh1","#E4002B",de.white]},nw=n=>{const e=[{type:"custom",label:"color",component:m.jsx(Ie,{type:U.SingleColor,defaultTheme:Wr.color})}];return m.jsx(Ee,{fields:e})},rw={component:tw,defaultAttrs:Wr,attrsComponent:nw,metadata:{displayName:"panel.details.lines.singleColor.displayName",supportLinePathType:[N.Diagonal,N.Perpendicular,N.RotatePerpendicular]}},iw=n=>{const{id:e,path:r,handlePointerDown:i}=n,o=D.useCallback(a=>i(e,a),[e,i]);return m.jsxs("g",{id:e,onPointerDown:o,cursor:"pointer",children:[m.jsx("path",{d:r,fill:"none",stroke:"black",strokeWidth:"7",strokeLinecap:"round"}),m.jsx("path",{d:r,fill:"none",stroke:"white",strokeWidth:"4.33",strokeLinecap:"round"})]})},ow={},aw=()=>{},sw={component:iw,defaultAttrs:ow,attrsComponent:aw,metadata:{displayName:"panel.details.lines.shmetroVirtualInt.displayName",supportLinePathType:[N.Diagonal,N.Perpendicular,N.RotatePerpendicular,N.Simple]}},lw=n=>{const{id:e,path:r,styleAttrs:i,handlePointerDown:o}=n,{isEnd:a=El.isEnd}=i,s=D.useCallback(c=>o(e,c),[e,o]),l=a?"round":void 0;return m.jsxs("g",{id:e,onPointerDown:s,cursor:"pointer",children:[m.jsx("path",{d:r,fill:"none",stroke:"#898989",strokeWidth:"5",strokeLinecap:l}),m.jsx("path",{d:r,fill:"none",stroke:"white",strokeWidth:"2",strokeLinecap:"round"})]})},El={isEnd:!1},cw=n=>{const{id:e,attrs:r,handleAttrsUpdate:i}=n,{t:o}=Te(),a=[{type:"switch",label:o("panel.details.lines.shanghaiSuburbanRailway.isEnd"),isChecked:r.isEnd,onChange:s=>{r.isEnd=s,i(e,r)},oneLine:!0,minW:"full"}];return m.jsx(Ee,{fields:a})},uw={component:lw,defaultAttrs:El,attrsComponent:cw,metadata:{displayName:"panel.details.lines.shanghaiSuburbanRailway.displayName",supportLinePathType:[N.Diagonal,N.Perpendicular,N.RotatePerpendicular]}},dw=n=>{const{id:e,path:r,handlePointerDown:i}=n,o=D.useCallback(a=>i(e,a),[e,i]);return m.jsx("path",{id:e,d:r,fill:"none",stroke:"#565656",strokeWidth:"3",strokeDasharray:"3",cursor:"pointer",onPointerDown:o})},hw={},pw=()=>null,fw={component:dw,defaultAttrs:hw,attrsComponent:pw,metadata:{displayName:"panel.details.lines.gzmtrVirtualInt.displayName",supportLinePathType:[N.Diagonal,N.Perpendicular,N.RotatePerpendicular,N.Simple]}},gw=n=>{const{id:e,path:r,styleAttrs:i,handlePointerDown:o}=n,{color:a=Vr.color}=i!=null?i:Vr,s=D.useCallback(l=>o(e,l),[e,o]);return m.jsxs("g",{id:e,onPointerDown:s,cursor:"pointer",children:[m.jsx("path",{d:r,fill:"none",stroke:a[2],strokeWidth:"5",strokeLinecap:"round"}),m.jsx("path",{d:r,fill:"none",stroke:a[3],strokeWidth:"4.67",strokeDasharray:"17.5"})]})},Vr={color:[ye.Shanghai,"jsr","#000000",de.white]},mw=n=>{const{t:e}=Te(),r=[{type:"custom",label:e("color"),component:m.jsx(Ie,{type:U.ChinaRailway,defaultTheme:Vr.color})}];return m.jsx(Ee,{fields:r})},yw={component:gw,defaultAttrs:Vr,attrsComponent:mw,metadata:{displayName:"panel.details.lines.chinaRailway.displayName",supportLinePathType:[N.Diagonal,N.Perpendicular,N.RotatePerpendicular]}},bw=n=>{const{id:e,path:r,styleAttrs:i,handlePointerDown:o}=n,{color:a=Hr.color}=i!=null?i:Hr,s=D.useCallback(l=>o(e,l),[e,o]);return m.jsxs("g",{id:e,onPointerDown:s,cursor:"pointer",children:[m.jsx("path",{d:r,fill:"none",stroke:"white",strokeWidth:"6",strokeLinecap:"round"}),m.jsx("path",{d:r,fill:"none",stroke:a[2],strokeWidth:"5",strokeLinecap:"round"})]})},Hr={color:[ye.Beijing,"bj1","#c23a30",de.white]},vw=n=>{Te();const e=[{type:"custom",label:"color",component:m.jsx(Ie,{type:U.BjsubwaySingleColor,defaultTheme:Hr.color})}];return m.jsx(Ee,{fields:e})},ww={component:bw,defaultAttrs:Hr,attrsComponent:vw,metadata:{displayName:"panel.details.lines.bjsubwaySingleColor.displayName",supportLinePathType:[N.Diagonal,N.Perpendicular,N.RotatePerpendicular]}},tr=n=>{const{t:e}=Te(),r=Vt(),{selected:i}=hi(l=>l.runtime),[o]=i,a=D.useRef(window.graph),s=[];if(i.size===1&&a.current.hasNode(o)){const l=a.current.getNodeAttribute(o,"type"),c=a.current.getNodeAttribute(o,l);s.push(...n.fields.filter(u=>u.type!=="custom").map(u=>{var d,h,p;return{type:u.type,label:e(u.label),value:(d=u.value)==null?void 0:d.call(u,c),isChecked:(h=u.isChecked)==null?void 0:h.call(u,c),hidden:(p=u.hidden)==null?void 0:p.call(u,c),options:u.options,disabledOptions:u.disabledOptions&&u.disabledOptions(c),validator:u.validator,oneLine:u.oneLine,onChange:g=>{let y;try{y=u.onChange(g,c)}catch(w){r(jo({status:"error",message:e("err-code.".concat(w))}));return}a.current.mergeNodeAttributes(o,{[l]:y}),r(Ur()),r(cn(a.current.export()))}}}),...n.fields.filter(u=>u.type==="custom").map(u=>({...u,label:e(u.label)})))}if(i.size===1&&a.current.hasEdge(o)&&n.type!=="style"){const l=a.current.getEdgeAttribute(o,"type"),c=a.current.getEdgeAttribute(o,l);s.push(...n.fields.map(u=>({type:u.type,label:e(u.label),value:u.value(c),options:u.options,disabledOptions:u.disabledOptions&&u.disabledOptions(c),validator:u.validator,onChange:d=>{a.current.mergeEdgeAttributes(o,{[l]:u.onChange(d,c)}),r(pn()),r(cn(a.current.export()))}})))}if(i.size===1&&a.current.hasEdge(o)&&n.type==="style"){const l=a.current.getEdgeAttribute(o,"style"),c=a.current.getEdgeAttribute(o,l);s.push(...n.fields.filter(u=>u.type!=="custom").map(u=>({type:u.type,label:e(u.label),value:u.value(c),options:u.options,disabledOptions:u.disabledOptions&&u.disabledOptions(c),validator:u.validator,onChange:d=>{a.current.mergeEdgeAttributes(o,{[l]:u.onChange(d,c)}),r(pn()),r(cn(a.current.export()))}})),...n.fields.filter(u=>u.type==="custom").map(u=>({...u,label:e(u.label)})))}return m.jsx(Ee,{fields:s,minW:276})},xw=n=>{const{id:e,path:r,styleAttrs:i,handlePointerDown:o}=n,{color:a=Jr.color}=i!=null?i:Jr,s=D.useCallback(l=>o(e,l),[e,o]);return m.jsxs("g",{id:e,onPointerDown:s,cursor:"pointer",children:[m.jsx("path",{d:r,fill:"none",stroke:a[2],strokeWidth:"5"}),m.jsx("path",{d:r,fill:"none",stroke:"white",strokeWidth:"1.67"})]})},Jr={color:[ye.Beijing,"bj1","#c23a30",de.white]},Sw=[{type:"custom",label:"color",component:m.jsx(Ie,{type:U.BjsubwayTram,defaultTheme:Jr.color})}],_w=()=>m.jsx(tr,{fields:Sw,type:"style"}),Nw={component:xw,defaultAttrs:Jr,attrsComponent:_w,metadata:{displayName:"panel.details.lines.bjsubwayTram.displayName",supportLinePathType:[N.Diagonal,N.Perpendicular,N.RotatePerpendicular]}},Rw=n=>{const{id:e,type:r,path:i,styleAttrs:o,handlePointerDown:a}=n,{colorA:s=Ut.colorA,colorB:l=Ut.colorB}=o!=null?o:Ut,c=D.useCallback(g=>a(e,g),[e,a]),[u,d]=D.useState(i),[h,p]=D.useState(i);return D.useEffect(()=>{const g=xl(i,r,-1.25,1.25);g&&(d(g[0]),p(g[1]))},[i]),m.jsxs("g",{id:e,onPointerDown:c,cursor:"pointer",children:[m.jsx("path",{d:u,fill:"none",stroke:s[2],strokeWidth:"2.5",strokeLinecap:"round"}),m.jsx("path",{d:h,fill:"none",stroke:l[2],strokeWidth:"2.5",strokeLinecap:"round"})]})},Ut={colorA:[ye.Shanghai,"maglevA","#008B9A",de.white],colorB:[ye.Shanghai,"maglevB","#F5A74E",de.white]},kw=()=>{const{t:n}=Te(),e=Vt(),{selected:r}=hi(a=>a.runtime),[i]=r,o=D.useRef(window.graph);return m.jsx(Er,{"aria-label":n("panel.details.lines.dualColor.swap"),icon:m.jsx(Z0,{}),size:"sm",onClick:()=>{var l;const a=(l=o.current.getEdgeAttribute(i,U.DualColor))!=null?l:Ut,s=a.colorA;a.colorA=a.colorB,a.colorB=s,o.current.mergeEdgeAttributes(i,{[U.DualColor]:a}),e(pn()),e(cn(o.current.export()))}})},Cw=n=>{const e=[{type:"custom",label:"panel.details.lines.dualColor.swap",component:m.jsx(kw,{})},{type:"custom",label:"panel.details.lines.dualColor.colorA",component:m.jsx(Ie,{type:U.DualColor,colorKey:"colorA",defaultTheme:Ut.colorA})},{type:"custom",label:"panel.details.lines.dualColor.colorB",component:m.jsx(Ie,{type:U.DualColor,colorKey:"colorB",defaultTheme:Ut.colorB})}];return m.jsx(Ee,{fields:e})},Aw={component:Rw,defaultAttrs:Ut,attrsComponent:Cw,metadata:{displayName:"panel.details.lines.dualColor.displayName",supportLinePathType:[N.Diagonal,N.Perpendicular,N.RotatePerpendicular]}},Tw=n=>{const{id:e,path:r,styleAttrs:i,handlePointerDown:o}=n,{color:a=un.color,width:s=un.width}=i!=null?i:un,l=D.useCallback(c=>o(e,c),[e,o]);return m.jsx("path",{id:e,d:r,fill:"none",stroke:a[2],strokeWidth:s,strokeLinecap:"round",cursor:"pointer",onPointerDown:l})},un={color:[ye.Shanghai,"river","#B9E3F9",de.white],width:20},Ew=[{type:"input",label:"panel.details.lines.river.width",variant:"number",value:n=>(n!=null?n:un).width,onChange:(n,e)=>{const r=e!=null?e:un;return r.width=Number(n),r}}],Ow=()=>m.jsx(tr,{fields:Ew,type:"style"}),Lw={component:Tw,defaultAttrs:un,attrsComponent:Ow,metadata:{displayName:"panel.details.lines.river.displayName",supportLinePathType:[N.Diagonal,N.Perpendicular,N.RotatePerpendicular,N.Simple]}},Mw=n=>{const{id:e,path:r,styleAttrs:i,handlePointerDown:o}=n,{color:a=Kr.color}=i!=null?i:Kr,s=D.useCallback(l=>o(e,l),[e,o]);return m.jsx("path",{id:e,d:r,fill:"none",stroke:a[2],strokeWidth:"5",strokeLinecap:"butt",strokeDasharray:"5 2.5",cursor:"pointer",onPointerDown:s})},Kr={color:[ye.Hongkong,"twl","#E2231A",de.white]},jw=[{type:"custom",label:"color",component:m.jsx(Ie,{type:U.MTRRaceDays,defaultTheme:Kr.color})}],$w=()=>m.jsx(tr,{fields:jw,type:"style"}),Pw={component:Mw,defaultAttrs:Kr,attrsComponent:$w,metadata:{displayName:"panel.details.lines.mtrRaceDays.displayName",supportLinePathType:[N.Diagonal,N.Perpendicular,N.RotatePerpendicular]}},Iw=n=>{const{id:e,path:r,styleAttrs:i,handlePointerDown:o}=n,{color:a=Yr.color}=i!=null?i:Yr,s=D.useCallback(l=>o(e,l),[e,o]);return m.jsx("path",{id:e,d:r,fill:"none",stroke:a[2],strokeWidth:"2.5",strokeLinecap:"round",cursor:"pointer",onPointerDown:s})},Yr={color:[ye.Hongkong,"lrl","#CD9700",de.white]},Dw=[{type:"custom",label:"color",component:m.jsx(Ie,{type:U.MTRLightRail,defaultTheme:Yr.color})}],Bw=()=>m.jsx(tr,{fields:Dw,type:"style"}),zw={component:Iw,defaultAttrs:Yr,attrsComponent:Bw,metadata:{displayName:"panel.details.lines.mtrLightRail.displayName",supportLinePathType:[N.Diagonal,N.Perpendicular,N.RotatePerpendicular]}},Fw=n=>{const{id:e,path:r,handlePointerDown:i}=n,o=D.useCallback(a=>i(e,a),[e,i]);return m.jsx("path",{id:e,d:r,fill:"none",stroke:"black",strokeWidth:"1.33",strokeDasharray:"2.66 1.33",cursor:"pointer",onPointerDown:o})},Gw={},Uw=()=>{},Ww={component:Fw,defaultAttrs:Gw,attrsComponent:Uw,metadata:{displayName:"panel.details.lines.mtrUnpaidArea.displayName",supportLinePathType:[N.Diagonal,N.Perpendicular,N.RotatePerpendicular,N.Simple]}},Vw=n=>{const{id:e,path:r,handlePointerDown:i}=n,o=D.useCallback(a=>i(e,a),[e,i]);return m.jsx("path",{id:e,d:r,fill:"none",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",cursor:"pointer",onPointerDown:o})},Hw={},Jw=()=>m.jsx(tr,{fields:[],type:"style"}),Kw={component:Vw,defaultAttrs:Hw,attrsComponent:Jw,metadata:{displayName:"panel.details.lines.mtrPaidArea.displayName",supportLinePathType:[N.Diagonal,N.Perpendicular,N.RotatePerpendicular,N.Simple]}},Yw=n=>{const{id:e,path:r,styleAttrs:i,handlePointerDown:o}=n,{color:a=qr.color}=i!=null?i:qr,s=D.useCallback(c=>o(e,c),[e,o]),l=Ya("white","var(--chakra-colors-gray-800)");return m.jsxs("g",{id:e,onPointerDown:s,cursor:"pointer",children:[m.jsx("path",{d:r,fill:"none",stroke:a[2],strokeWidth:"5",strokeDasharray:"2 2"}),m.jsx("path",{d:r,fill:"none",stroke:l,strokeWidth:"3.4"})]})},qr={color:[ye.Beijing,"bj1","#c23a30",de.white]},qw=n=>{Te();const e=[{type:"custom",label:"color",component:m.jsx(Ie,{type:U.BjsubwayDotted,defaultTheme:qr.color})}];return m.jsx(Ee,{fields:e})},Qw={component:Yw,defaultAttrs:qr,attrsComponent:qw,metadata:{displayName:"panel.details.lines.bjsubwayDotted.displayName",supportLinePathType:[N.Diagonal,N.Perpendicular,N.RotatePerpendicular]}},Xw=n=>{const{id:e,path:r,styleAttrs:i,handlePointerDown:o}=n,{color:a=Qr.color}=i!=null?i:Qr,s=D.useCallback(l=>o(e,l),[e,o]);return m.jsx("path",{id:e,d:r,fill:"none",stroke:a[2],strokeWidth:"5",strokeDasharray:"0 10",strokeLinecap:"round",cursor:"pointer",onPointerDown:s})},Qr={color:[ye.Singapore,"ewl","#009739",de.white]},Zw=n=>{Te();const e=[{type:"custom",label:"color",component:m.jsx(Ie,{type:U.MRTUnderConstruction,defaultTheme:Qr.color})}];return m.jsx(Ee,{fields:e})},e1={component:Xw,defaultAttrs:Qr,attrsComponent:Zw,metadata:{displayName:"panel.details.lines.mrtUnderConstruction.displayName",supportLinePathType:[N.Diagonal,N.Perpendicular,N.RotatePerpendicular]}},t1=n=>{const{id:e,path:r,handlePointerDown:i}=n,o=D.useCallback(a=>i(e,a),[e,i]);return m.jsx("path",{id:e,d:r,fill:"none",stroke:"black",strokeWidth:"5",strokeDasharray:"0 10 10 10",strokeLinecap:"round",cursor:"pointer",onPointerDown:o})},n1={},r1=n=>null,i1={component:t1,defaultAttrs:n1,attrsComponent:r1,metadata:{displayName:"panel.details.lines.mrtSentosaExpress.displayName",supportLinePathType:[N.Diagonal,N.Perpendicular,N.RotatePerpendicular]}},o1=n=>{const{id:e,path:r,styleAttrs:i,newLine:o,handlePointerDown:a}=n,{color:s=Xr.color}=i!=null?i:Xr,l=D.useCallback(c=>a(e,c),[e,a]);return m.jsxs("g",{id:e,onPointerDown:l,cursor:"pointer",children:[m.jsx("path",{d:r,fill:"none",stroke:"black",strokeWidth:"5.1"}),m.jsx("path",{d:r,fill:"none",stroke:s[2],strokeWidth:"4.9"})]})},Xr={color:[ye.Tokyo,"jy","#9ACD32",de.black]},a1=n=>{const{t:e}=Te(),r=[{type:"custom",label:e("color"),component:m.jsx(Ie,{type:U.JREastSingleColor,defaultTheme:Xr.color})}];return m.jsx(Ee,{fields:r})},s1={component:o1,defaultAttrs:Xr,attrsComponent:a1,metadata:{displayName:"panel.details.lines.jrEastSingleColor.displayName",supportLinePathType:[N.Diagonal,N.Perpendicular,N.RotatePerpendicular]}},l1=5,Le=l1*Math.SQRT1_2,no=.25,wr=(Le*Math.SQRT2-no)/2*Math.SQRT2,c1=n=>{const{id:e,type:r,path:i,styleAttrs:o,newLine:a,handlePointerDown:s}=n,{color:l=Zr.color}=o!=null?o:Zr,c=D.useCallback(h=>s(e,h),[e,s]),[u,d]=D.useState({outline:i,pA:i,pB:i});return D.useEffect(()=>{const h=d0(i,r,-2.5,2.5);h&&d(h)},[i]),m.jsxs("g",{id:e,onPointerDown:c,cursor:"pointer",children:[m.jsxs("defs",{children:[m.jsxs("clipPath",{id:"jr_east_fill_pattern_clip_path",patternUnits:"userSpaceOnUse",children:[m.jsx("polygon",{points:"0,0 0,".concat(wr," ").concat(wr,",0")}),m.jsx("polygon",{points:"".concat(Le,",").concat(Le," ").concat(Le-wr,",").concat(Le," ").concat(Le,",").concat(Le-wr)})]}),m.jsxs("pattern",{id:"jr_east_".concat(e,"_fill_pattern_").concat(l[2]),width:Le,height:Le,patternUnits:"userSpaceOnUse",children:[m.jsx("rect",{width:Le,height:Le,fill:l[2]}),m.jsx("line",{x1:"0",y1:"0",x2:Le,y2:Le,stroke:"white",strokeWidth:no,strokeOpacity:"50%",clipPath:"url(#jr_east_fill_pattern_clip_path)"}),m.jsx("line",{x1:Le,y1:"0",x2:"0",y2:Le,stroke:"white",strokeWidth:no,strokeOpacity:"50%"})]})]}),m.jsx("path",{d:u.outline,fill:"url(#jr_east_".concat(e,"_fill_pattern_").concat(l[2],")")}),m.jsx("path",{d:u.pA,fill:"none",stroke:"black",strokeWidth:"0.1"}),m.jsx("path",{d:u.pB,fill:"none",stroke:"black",strokeWidth:"0.1"})]})},Zr={color:[ye.Tokyo,"jy","#9ACD32",de.black]},u1=n=>{const{t:e}=Te(),r=[{type:"custom",label:e("color"),component:m.jsx(Ie,{type:U.JREastSingleColorPattern,defaultTheme:Zr.color})}];return m.jsx(Ee,{fields:r})},d1={component:c1,defaultAttrs:Zr,attrsComponent:u1,metadata:{displayName:"panel.details.lines.jrEastSingleColorPattern.displayName",supportLinePathType:[N.Diagonal,N.Perpendicular,N.RotatePerpendicular]}},h1=n=>{const{id:e,path:r,styleAttrs:i,handlePointerDown:o}=n,{color:a=ei.color}=i!=null?i:ei,s=D.useCallback(l=>o(e,l),[e,o]);return m.jsx("path",{id:e,d:r,fill:"none",stroke:a[2],strokeWidth:"2.157",strokeLinecap:"round",cursor:"pointer",onPointerDown:s})},ei={color:[ye.Singapore,"lrt","#708573",de.white]},p1=n=>{const e=[{type:"custom",label:"color",component:m.jsx(Ie,{type:U.LRTSingleColor,defaultTheme:ei.color})}];return m.jsx(Ee,{fields:e})},f1={component:h1,defaultAttrs:ei,attrsComponent:p1,metadata:{displayName:"panel.details.lines.lrtSingleColor.displayName",supportLinePathType:[N.Diagonal,N.Perpendicular,N.RotatePerpendicular]}},Ft=5,g1=n=>{const{id:e,path:r,handlePointerDown:i}=n,o=D.useCallback(a=>i(e,a),[e,i]);return m.jsx("g",{id:e,onPointerDown:o,cursor:"pointer",children:m.jsx("path",{d:r,fill:"none",stroke:"black",strokeWidth:"7.5",strokeLinecap:"round"})})},Pa=(n,e)=>{var r,i;if(n===H.LondonTubeBasic){const{stepFreeAccess:o}=(r=e[H.LondonTubeBasic])!=null?r:{stepFreeAccess:"none"};if(o!=="none")return 1.5*Ft}if(n===H.LondonTubeInt){const{stepFreeAccess:o}=(i=e[H.LondonTubeInt])!=null?i:{stepFreeAccess:"none"};if(o!=="none")return 1.5*Ft}return Ft},m1=n=>{const{id:e,path:r,handlePointerDown:i}=n,o=D.useCallback(S=>i(e,S),[e,i]),[a,s]=window.graph.extremities(e),l=window.graph.getNodeAttribute(a,"x"),c=window.graph.getNodeAttribute(a,"y"),u=window.graph.getNodeAttribute(s,"x"),d=window.graph.getNodeAttribute(s,"y"),h=Math.min(l,u)-2*Ft,p=Math.min(c,d)-2*Ft,g=Math.abs(l-u)+4*Ft,y=Math.abs(c-d)+4*Ft,w=Pa(window.graph.getNodeAttribute(a,"type"),window.graph.getNodeAttributes(a)),_=Pa(window.graph.getNodeAttribute(s,"type"),window.graph.getNodeAttributes(s));return m.jsxs("g",{id:"".concat(e,".post"),onPointerDown:o,cursor:"pointer",children:[m.jsxs("mask",{id:"tube_stn_icon_inner_".concat(e),x:h,y:p,width:g,height:y,maskUnits:"userSpaceOnUse",children:[m.jsx("rect",{x:h,y:p,width:g,height:y,fill:"white"}),m.jsx("circle",{cx:l,cy:c,r:w-.05,fill:"black"}),m.jsx("circle",{cx:u,cy:d,r:_-.05,fill:"black"})]}),m.jsx("path",{d:r,fill:"none",stroke:"white",strokeWidth:"2.5",strokeLinecap:"round",mask:"url(#tube_stn_icon_inner_".concat(e,")")})]})},y1={},b1=()=>{},v1={component:g1,postComponent:m1,defaultAttrs:y1,attrsComponent:b1,metadata:{displayName:"panel.details.lines.londonTubeInternalInt.displayName",supportLinePathType:[N.Diagonal,N.Perpendicular,N.RotatePerpendicular]}},w1=n=>{const{id:e,path:r,handlePointerDown:i}=n,o=D.useCallback(a=>i(e,a),[e,i]);return m.jsx("path",{d:r,fill:"none",stroke:"black",strokeWidth:"5",strokeDasharray:"5 2.5",cursor:"pointer",onPointerDown:o})},x1={},S1=()=>{},_1={component:w1,defaultAttrs:x1,attrsComponent:S1,metadata:{displayName:"panel.details.lines.londonTube10MinWalk.displayName",supportLinePathType:[N.Diagonal,N.Perpendicular,N.RotatePerpendicular]}},N1=n=>{const{id:e,path:r,styleAttrs:i,handlePointerDown:o}=n,{color:a=ti.color}=i!=null?i:ti,s=D.useCallback(l=>o(e,l),[e,o]);return m.jsx("path",{id:e,d:r,fill:"none",stroke:a[2],strokeWidth:"5",cursor:"pointer",onPointerDown:s})},ti={color:[ye.London,"central","#DC241F",de.white]},R1=n=>{const{t:e}=Te(),r=[{type:"custom",label:e("color"),component:m.jsx(Ie,{type:U.LondonTubeTerminal,defaultTheme:ti.color})}];return m.jsx(Ee,{fields:r})},k1={component:N1,defaultAttrs:ti,attrsComponent:R1,metadata:{displayName:"panel.details.lines.londonTubeTerminal.displayName",supportLinePathType:[N.Diagonal,N.Perpendicular,N.RotatePerpendicular]}},C1=n=>{const{id:e,path:r,styleAttrs:i,handlePointerDown:o}=n,{color:a=ro.color}=i!=null?i:ro;console.log(i);const s=D.useCallback(l=>o(e,l),[e,o]);return m.jsxs("g",{id:e,onPointerDown:s,cursor:"pointer",children:[m.jsx("path",{d:r,fill:"none",stroke:a[2],strokeWidth:"5",strokeLinecap:"round"}),m.jsx("path",{d:r,fill:"none",stroke:a[3],strokeWidth:"2.5",strokeDasharray:"7.5"})]})},ro={color:[ye.Guangzhou,"ir","#2559a8",de.white]},A1=()=>{},T1={component:C1,defaultAttrs:ro,attrsComponent:A1,metadata:{displayName:"panel.details.lines.guangdongIntercityRailway.displayName",supportLinePathType:[N.Diagonal,N.Perpendicular,N.RotatePerpendicular]}},Ol={[N.Diagonal]:G0,[N.Perpendicular]:H0,[N.RotatePerpendicular]:q0,[N.Simple]:Cy},E1={[U.SingleColor]:rw,[U.ShmetroVirtualInt]:sw,[U.ShanghaiSuburbanRailway]:uw,[U.GzmtrVirtualInt]:fw,[U.ChinaRailway]:yw,[U.BjsubwaySingleColor]:ww,[U.BjsubwayTram]:Nw,[U.BjsubwayDotted]:Qw,[U.DualColor]:Aw,[U.River]:Lw,[U.MTRRaceDays]:Pw,[U.MTRLightRail]:zw,[U.MTRUnpaidArea]:Ww,[U.MTRPaidArea]:Kw,[U.MRTUnderConstruction]:e1,[U.MRTSentosaExpress]:i1,[U.JREastSingleColor]:s1,[U.JREastSingleColorPattern]:d1,[U.LRTSingleColor]:f1,[U.LondonTubeTerminal]:k1,[U.LondonTubeInternalInt]:v1,[U.LondonTube10MinWalk]:_1,[U.GuangdongIntercityRailway]:T1},O1=42,Ia=async()=>JSON.stringify((await yn(async()=>{const{default:n}=await import("./tutorial-B9Su1GrM.js");return{default:n}},[])).default),L1=async n=>{let e=!1;n||(n=await Ia(),e=!0);let r=JSON.parse(n);(!("version"in r)||!Number.isInteger(r.version))&&(r=JSON.parse(await Ia()),e=!0);let i=Number(r.version),o=JSON.stringify(r);for(;i in Da;)o=Da[i](o),i=Number(JSON.parse(o).version),e=!0;return e&&(console.warn("Upgrade save from version: ".concat(r.version," to version: ").concat(i)),localStorage.setItem(rt.PARAM_BACKUP,n)),o},M1=n=>{const{present:e,past:r,future:i,...o}=n,a={...o,graph:e,version:O1};return JSON.stringify(a)},Da={0:n=>{var e;return JSON.stringify({version:1,graph:(e=JSON.parse(n))==null?void 0:e.graph,svgViewBoxZoom:100,svgViewBoxMin:{x:0,y:0}})},1:n=>{const e=JSON.parse(n),r=new pe;return r.import(e==null?void 0:e.graph),r.filterNodes((i,o)=>i.startsWith("stn")&&o.type!==H.GzmtrInt).forEach(i=>{const o=r.getNodeAttribute(i,"type"),a=r.getNodeAttribute(i,o);a&&"transfer"in a&&delete a.transfer,r.mergeNodeAttributes(i,{[o]:a})}),JSON.stringify({...e,version:2,graph:r.export()})},2:n=>{const e=JSON.parse(n),r=new pe;return r.import(e==null?void 0:e.graph),r.filterNodes((i,o)=>i.startsWith("stn")).forEach(i=>{const o=r.getNodeAttribute(i,"type"),a=r.getNodeAttribute(i,o);(a==null?void 0:a.nameOffsetX)==="middle"&&(a==null?void 0:a.nameOffsetY)==="middle"&&(a.nameOffsetX="right",a.nameOffsetY="top"),(a==null?void 0:a.nameOffsetY)==="up"&&(a.nameOffsetY="top"),r.mergeNodeAttributes(i,{[o]:a})}),JSON.stringify({...e,version:3,graph:r.export()})},3:n=>{const e=JSON.parse(n),r=new pe;return r.import(e==null?void 0:e.graph),r.filterEdges((i,o,a,s,l,c,u)=>i.startsWith("line")).forEach(i=>{const o=r.getEdgeAttribute(i,"color");r.removeEdgeAttribute(i,"color"),r.mergeEdgeAttributes(i,{style:U.SingleColor,[U.SingleColor]:{color:o}})}),r.filterEdges((i,o,a,s,l,c,u)=>i.startsWith("misc_edge")).forEach(i=>{const o="line_".concat(_y(10)),[a,s]=r.extremities(i),l=r.getEdgeAttribute(i,"type"),c=l;r.addDirectedEdgeWithKey(o,a,s,{visible:!0,zIndex:0,type:N.Simple,[l]:structuredClone(Ol[N.Simple].defaultAttrs),style:c,[c]:structuredClone(E1[c].defaultAttrs),reconcileId:""}),r.dropEdge(i)}),JSON.stringify({...e,version:4,graph:r.export()})},4:n=>{const e=JSON.parse(n),r=new pe;return r.import(e==null?void 0:e.graph),r.filterNodes((i,o)=>i.startsWith("stn")&&(o.type===H.GzmtrBasic||o.type===H.GzmtrInt)).forEach(i=>{const o=r.getNodeAttribute(i,"type"),a=r.getNodeAttribute(i,o);a.open=!0,a.secondaryNames=["",""],r.mergeNodeAttributes(i,{[o]:a})}),JSON.stringify({...e,version:5,graph:r.export()})},5:n=>{const e=JSON.parse(n),r=new pe;return r.import(e==null?void 0:e.graph),r.filterEdges((i,o,a,s,l,c,u)=>i.startsWith("line")&&o.type===N.Simple).forEach(i=>{var a;const o=(a=r.getEdgeAttribute(i,N.Simple))!=null?a:{offset:0};o.offset=0,r.mergeEdgeAttributes(i,{[N.Simple]:o})}),JSON.stringify({...e,version:6,graph:r.export()})},6:n=>{const e=JSON.parse(n),r=new pe;return r.import(e==null?void 0:e.graph),r.filterNodes((i,o)=>i.startsWith("stn")&&o.type===H.GzmtrBasic).forEach(i=>{const o=r.getNodeAttribute(i,"type"),a=r.getNodeAttribute(i,o);a.tram=!1,r.mergeNodeAttributes(i,{[o]:a})}),JSON.stringify({...e,version:7,graph:r.export()})},7:n=>JSON.stringify({...JSON.parse(n),version:8}),8:n=>JSON.stringify({...JSON.parse(n),version:9}),9:n=>JSON.stringify({...JSON.parse(n),version:10}),10:n=>{const e=JSON.parse(n),r=new pe;return r.import(e==null?void 0:e.graph),r.filterNodes((i,o)=>i.startsWith("misc_node")&&o.type===st.Text).forEach(i=>{const o=r.getNodeAttribute(i,"type"),a=r.getNodeAttribute(i,o);a.color=[ye.Shanghai,"jsr","#000000",de.white],r.mergeNodeAttributes(i,{[o]:a})}),JSON.stringify({...e,version:11,graph:r.export()})},11:n=>JSON.stringify({...JSON.parse(n),version:12}),12:n=>{const e=JSON.parse(n),r=new pe;return r.import(e==null?void 0:e.graph),r.filterNodes((i,o)=>i.startsWith("misc_node")&&o.type===st.Text).forEach(i=>{const o=r.getNodeAttribute(i,"type"),a=r.getNodeAttribute(i,o);a.rotate=0,a.italic=!1,r.mergeNodeAttributes(i,{[o]:a})}),JSON.stringify({...e,version:13,graph:r.export()})},13:n=>JSON.stringify({...JSON.parse(n),version:14}),14:n=>JSON.stringify({...JSON.parse(n),version:15}),15:n=>{const e=JSON.parse(n),r=new pe;return r.import(e==null?void 0:e.graph),r.filterNodes((i,o)=>i.startsWith("misc_node")&&o.type===st.Text).forEach(i=>{const o=r.getNodeAttribute(i,"type"),a=r.getNodeAttribute(i,o);a.italic=a.italic?"italic":"normal",a.bold="normal",r.mergeNodeAttributes(i,{[o]:a})}),JSON.stringify({...e,version:16,graph:r.export()})},16:n=>{const e=JSON.parse(n),r=new pe;return r.import(e==null?void 0:e.graph),r.filterNodes((i,o)=>i.startsWith("misc_node")&&o.type===st.Facilities).forEach(i=>{const o=r.getNodeAttribute(i,"type"),a=r.getNodeAttribute(i,o);let s=0;switch(a.type){case"airport":case"maglev":case"disney":case"railway":s+=25/2;break;case"hsr":case"airport_hk":case"disney_hk":s+=19/2;break}r.updateNodeAttribute(i,"y",l=>(l!=null?l:0)+s)}),JSON.stringify({...e,version:17,graph:r.export()})},17:n=>JSON.stringify({...JSON.parse(n),version:18}),18:n=>JSON.stringify({...JSON.parse(n),version:19}),19:n=>JSON.stringify({...JSON.parse(n),version:20}),20:n=>JSON.stringify({...JSON.parse(n),version:21}),21:n=>JSON.stringify({...JSON.parse(n),version:22}),22:n=>JSON.stringify({...JSON.parse(n),version:23}),23:n=>JSON.stringify({...JSON.parse(n),version:24}),24:n=>{const e=JSON.parse(n),r=new pe;return r.import(e.graph),r.filterNodes((i,o)=>i.startsWith("stn")&&o.type===H.GzmtrInt||i.startsWith("misc_node")&&o.type===st.GzmtrLineBadge).forEach(i=>{const o=r.getNodeAttribute(i,"type"),a=r.getNodeAttribute(i,o);a.tram=!1,r.mergeNodeAttributes(i,{[o]:a})}),JSON.stringify({...e,version:25,graph:r.export()})},25:n=>JSON.stringify({...JSON.parse(n),version:26}),26:n=>{const e=JSON.parse(n),r=new pe;return r.import(e==null?void 0:e.graph),r.filterNodes((i,o)=>i.startsWith("misc_node")&&o.type===st.GzmtrLineBadge).forEach(i=>{const o=r.getNodeAttribute(i,"type"),a=r.getNodeAttribute(i,o);a.span=!0,r.mergeNodeAttributes(i,{[o]:a})}),JSON.stringify({...e,version:27,graph:r.export()})},27:n=>{const e=JSON.parse(n),r=new pe;return r.import(e==null?void 0:e.graph),r.filterNodes((i,o)=>i.startsWith("stn")&&o.type===H.GzmtrInt).forEach(i=>{const o=r.getNodeAttribute(i,"type"),a=r.getNodeAttribute(i,o);for(let s=0;sJSON.stringify({...JSON.parse(n),version:29}),29:n=>JSON.stringify({...JSON.parse(n),version:30}),30:n=>JSON.stringify({...JSON.parse(n),version:31}),31:n=>{const e=JSON.parse(n),r=new pe;return r.import(e==null?void 0:e.graph),r.filterEdges((i,o)=>o.style===U.ChinaRailway).forEach(i=>{const o=r.getEdgeAttributes(i)[U.ChinaRailway];r.mergeEdgeAttributes(i,{[U.ChinaRailway]:{...o,color:[ye.Shanghai,"jsr","#000000",de.white]}})}),JSON.stringify({...e,version:32,graph:r.export()})},32:n=>JSON.stringify({...JSON.parse(n),version:33}),33:n=>{const e=JSON.parse(n),r=new pe;return r.import(e==null?void 0:e.graph),r.forEachDirectedEdge(i=>{r.setEdgeAttribute(i,"parallelIndex",-1),r.updateEdgeAttribute(i,"zIndex",o=>Math.max(-10,(o!=null?o:0)-5))}),r.forEachNode(i=>{r.updateNodeAttribute(i,"zIndex",o=>Math.min(10,(o!=null?o:0)+5))}),JSON.stringify({...e,version:34,graph:r.export()})},34:n=>JSON.stringify({...JSON.parse(n),version:35}),35:n=>JSON.stringify({...JSON.parse(n),version:36}),36:n=>JSON.stringify({...JSON.parse(n),version:37}),37:n=>JSON.stringify({...JSON.parse(n),version:38}),38:n=>JSON.stringify({...JSON.parse(n),version:39}),39:n=>{const e=JSON.parse(n),r=new pe;return r.import(e==null?void 0:e.graph),r.filterNodes((i,o)=>i.startsWith("misc_node")&&o.type===st.Facilities).forEach(i=>{const o=r.getNodeAttribute(i,"type"),a=r.getNodeAttribute(i,o);a.type==="qingdao_airport"?a.type="airport_qingdao":a.type==="qingdao_coach_station"?a.type="coach_station_qingdao":a.type==="qingdao_cruise_terminal"?a.type="cruise_terminal_qingdao":a.type==="qingdao_railway"?a.type="railway_qingdao":a.type==="qingdao_tram"&&(a.type="tram_qingdao"),r.mergeNodeAttributes(i,{[o]:a})}),JSON.stringify({...e,version:40,graph:r.export()})},40:n=>JSON.stringify({...JSON.parse(n),version:41}),41:n=>{const e=JSON.parse(n),r=new pe;r.import(e==null?void 0:e.graph);const i=o=>o.map(a=>a.replaceAll("\\","\n"));return r.forEachNode((o,a)=>{const s=r.getNodeAttribute(o,"type");let l;(s===H.BjsubwayBasic||s===H.BjsubwayInt||s===H.FoshanMetroBasic||s===H.GuangdongIntercityRailway||s===H.GzmtrBasic||s===H.GzmtrInt||s===H.JREastBasic||s===H.JREastImportant||s===H.KunmingRTBasic||s===H.KunmingRTInt||s===H.MRTBasic||s===H.MRTInt||s===H.MTR||s===H.ShanghaiSuburbanRailway||s===H.ShmetroBasic2020||s===H.ShmetroBasic||s===H.ShmetroInt||s===H.ShmetroOutOfSystemInt||s===H.SuzhouRTBasic||s===H.SuzhouRTInt||s===H.TokyoMetroBasic||s===H.TokyoMetroInt)&&(l=i(a[s].names)),l&&(a[s].names=l,r.mergeNodeAttributes(o,a))}),JSON.stringify({...e,version:42,graph:r.export()})}};Du();const j1=ju({account:hy,app:N0,param:A0,runtime:I0}),$1=(n={})=>$u({reducer:j1,middleware:e=>e({serializableCheck:!1}),preloadedState:n}),fe=$1();fe.subscribe(async()=>{await wy(fe.getState().param.present),localStorage.setItem(rt.PARAM,M1(fe.getState().param)),localStorage.setItem(rt.APP,JSON.stringify(fe.getState().app)),localStorage.setItem(rt.LOGIN_STATE,JSON.stringify(fe.getState().account))});const Vt=()=>Pu(),hi=Iu,P1=D.lazy(()=>yn(()=>import("./page-header-BAx6PiVa.js"),__vite__mapDeps([0,1,2,3,4]))),I1=D.lazy(()=>yn(()=>import("./tools-CgHBlRFk.js"),__vite__mapDeps([5,1,2,6,3]))),D1=D.lazy(()=>yn(()=>import("./svg-wrapper-C2oLWHER.js"),__vite__mapDeps([7,1,2,8,3,6]))),B1=D.lazy(()=>yn(()=>import("./details-BUdue8Oj.js"),__vite__mapDeps([9,1,2,8,3,4,5,6]))),z1=D.lazy(()=>yn(()=>import("./rmg-palette-app-clip-BwGDxhpZ.js"),__vite__mapDeps([10,1,2])));function F1(){const n=Vt(),{paletteAppClip:{input:e}}=hi(c=>c.runtime),{t:r}=Te(),[i,o]=D.useState(!1);D.useEffect(()=>{Ge.isStandaloneWindow()&&!window.localStorage.getItem(rt.DO_NOT_SHOW_RMT_MSG)&&o(!0)},[]);const a=new Date,s="".concat(a.getFullYear()).concat(String(a.getMonth()+1).padStart(2,"0"),"01"),l="".concat(String(a.getFullYear()).slice(-2),".").concat(a.getMonth()+1,".1");return m.jsx(oy,{children:m.jsx(Em,{children:m.jsxs(D.Suspense,{fallback:m.jsxs(m.Fragment,{children:[m.jsx("p",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},children:"Rail Map Toolkit protocol... checked"}),m.jsxs("p",{style:{position:"absolute",top:"75%",left:"50%",transform:"translate(-50%, -50%)",fontSize:"small",color:"gray"},children:["Seeing this page for too long? Try another mirror"," ",m.jsx("a",{href:"https://railmapgen.github.io/?app=rmp",target:"_blank",rel:"noreferrer",children:"GitHub"})," ",m.jsx("a",{href:"https://railmapgen.gitlab.io/?app=rmp",target:"_blank",rel:"noreferrer",children:"Gitlab"})," ","or the"," ",m.jsx("a",{href:"https://github.com/railmapgen/railmapgen.github.io/releases",target:"_blank",rel:"noreferrer",children:"offline application"})," ",".",m.jsx("br",{}),m.jsx("br",{}),"Offline applications also available via ghgo.xyz"," ",m.jsx("a",{href:"https://ghgo.xyz/https://github.com/railmapgen/railmapgen.github.io/releases/download/tauri-".concat(s,"/railmapgen_").concat(l,"_x64-setup.exe"),children:"Windows"})," ",m.jsx("a",{href:"https://ghgo.xyz/https://github.com/railmapgen/railmapgen.github.io/releases/download/tauri-".concat(s,"/railmapgen_").concat(l,"_aarch64.dmg"),children:"MacOS"})," ",m.jsx("a",{href:"https://ghgo.xyz/https://github.com/railmapgen/railmapgen.github.io/releases/download/tauri-".concat(s,"/railmapgen_").concat(l,"_amd64.deb"),children:"Linux"})," ","if you are blocked by GFW :)"]})]}),children:[m.jsx(P1,{}),i&&m.jsxs(io,{status:"info",variant:"solid",size:"xs",pl:3,pr:1,py:1,zIndex:"1",children:[m.jsx(oo,{}),m.jsxs(At,{children:[m.jsx(zn,{href:"/?app=rmp",isExternal:!0,fontWeight:"bold",children:r("rmtPromotion")})," ",m.jsx(zn,{as:"button",ml:"auto",textDecoration:"underline",onClick:()=>o(!1),children:r("close")})," | ",m.jsx(zn,{as:"button",textDecoration:"underline",onClick:()=>{o(!1),window.localStorage.setItem(rt.DO_NOT_SHOW_RMT_MSG,"true")},children:r("noShowAgain")})]})]}),m.jsx(wm,{allowReset:!0,children:m.jsxs(ct,{direction:"row",height:"100%",overflow:"hidden",sx:{position:"relative"},children:[m.jsx(I1,{}),m.jsx(D1,{}),m.jsx(B1,{})]})}),m.jsx(z1,{isOpen:!!e,onClose:()=>n($0()),defaultTheme:e,onSelect:c=>n(P0(c))})]})})})}const G1=()=>{Ws(document.getElementById("root")).render(m.jsx(D.StrictMode,{children:m.jsx(Bu,{store:fe,children:m.jsx(zu,{i18n:Xn,children:m.jsx(F1,{})})})}))};var Ba;const xr=JSON.parse((Ba=localStorage.getItem(rt.LOGIN_STATE))!=null?Ba:"{}");var za;const Fe=JSON.parse((za=localStorage.getItem(rt.APP))!=null?za:"{}"),U1=localStorage.getItem(rt.PARAM);"telemetry"in Fe&&("app"in Fe.telemetry&&fe.dispatch(w0(Fe.telemetry.app)),"project"in Fe.telemetry&&fe.dispatch(x0(Fe.telemetry.project))),"preference"in Fe&&("unlockSimplePathAttempts"in Fe.preference&&fe.dispatch(S0(Fe.preference.unlockSimplePathAttempts)),"toolsPanel"in Fe.preference&&"expand"in Fe.preference.toolsPanel&&fe.dispatch(_0(Fe.preference.toolsPanel.expand)),"autoParallel"in Fe.preference&&fe.dispatch(kl(Fe.preference.autoParallel))),"state"in xr&&fe.dispatch(sn(xr.state)),"activeSubscriptions"in xr&&fe.dispatch(Kn(xr.activeSubscriptions));L1(U1).then(n=>{const{version:e,graph:r,...i}=JSON.parse(n);window.graph=pe.from(r);const o={...i,present:r,past:[],future:[]};fe.dispatch(C0(o)),fe.dispatch(Ur()),fe.dispatch(pn()),G1(),Ge.injectUITools(),xy(fe),Ma(),window.setInterval(()=>Ma(),15*60*1e3);const a=window.setTimeout(()=>{fe.dispatch(sn("logged-out")),fe.dispatch(Kn(Jn)),fe.dispatch(eo(void 0))},6e3);fe.dispatch(eo(a))});export{y0 as $,Sx as A,Eo as B,ye as C,Zx as D,cy as E,Px as F,Qx as G,lS as H,Ia as I,vy as J,rt as K,mx as L,de as M,K1 as N,Dx as O,Sm as P,q1 as Q,nx as R,H as S,Mo as T,cx as U,ew as V,j0 as W,S0 as X,sx as Y,sS as Z,Ma as _,W1 as __vite_legacy_guard,Xx as a,m0 as a0,Ax as a1,kl as a2,Ux as a3,iS as a4,tS as a5,rS as a6,nS as a7,px as a8,x0 as a9,Hx as aA,Nm as aB,rx as aC,ix as aD,ox as aE,ax as aF,Ox as aG,Tx as aH,aS as aI,oS as aJ,Mx as aK,_0 as aL,tr as aM,Ie as aN,yx as aO,Xn as aP,sy as aQ,ly as aR,Lx as aS,X1 as aT,Wx as aU,Vx as aV,jx as aW,om as aX,Am as aY,fx as aZ,gx as a_,Fx as aa,Gx as ab,Ot as ac,tx as ad,Z1 as ae,qx as af,Jx as ag,zx as ah,Bx as ai,$x as aj,Cl as ak,Al as al,Ex as am,bx as an,vx as ao,E1 as ap,Cx as aq,lx as ar,kx as as,Nx as at,_x as au,ux as av,st as aw,rw as ax,Ay as ay,Q1 as az,Ix as b,Vt as c,hi as d,dx as e,Yx as f,Kx as g,eS as h,Ee as i,jo as j,N as k,Ol as l,wx as m,_y as n,U as o,hx as p,Ur as q,Ge as r,M1 as s,pn as t,ex as u,cn as v,Y1 as w,L1 as x,Rx as y,xx as z}; diff --git a/assets/index-legacy-iSkJTZGA.js b/assets/index-legacy-jqOeRlnz.js similarity index 99% rename from assets/index-legacy-iSkJTZGA.js rename to assets/index-legacy-jqOeRlnz.js index 2a6e2f0e0..03f346b4e 100644 --- a/assets/index-legacy-iSkJTZGA.js +++ b/assets/index-legacy-jqOeRlnz.js @@ -7,4 +7,4 @@ System.register(["./chakra-legacy--ElhKRU8.js","./react-legacy-CB7hQk4J.js"],(fu * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */ci.exports=function(){if(li)return di;li=1;var e=Pe,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function a(e,n,a){var s,l={},c=null,d=null;for(s in void 0!==a&&(c=""+a),void 0!==n.key&&(c=""+n.key),void 0!==n.ref&&(d=n.ref),n)r.call(n,s)&&!i.hasOwnProperty(s)&&(l[s]=n[s]);if(e&&e.defaultProps)for(s in n=e.defaultProps)void 0===l[s]&&(l[s]=n[s]);return{$$typeof:t,type:e,key:c,ref:d,props:l,_owner:o.current}}return di.Fragment=n,di.jsx=a,di.jsxs=a,di}();var ui=ci.exports;const[pi,hi]=c({name:"AutoCompleteContext",errorMessage:"useAutoCompleteContext: `context` is undefined. Seems you forgot to wrap all autoomplete components within ``"});var gi=function(e,t){for(var n,r=0,o=Me.Children.toArray(e);r{var t;return null==(t="string"==typeof e||"number"==typeof e?e:e[Object.keys(e)[0]])?void 0:t.toString()},vi=(e,t)=>"string"!=typeof e||$(t)?e:e.toString().replace(new RegExp(function(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}(t),"gi"),(e=>`${e}`)),wi=(e,t,n)=>(null==t?void 0:t.toLowerCase().indexOf(null==e?void 0:e.toLowerCase()))>=0||(null==n?void 0:n.toLowerCase().indexOf(null==e?void 0:e.toLowerCase()))>=0||yi(e,t)>=.5||yi(e,n)>=.5,xi=(e,t)=>{const n={},r={},{field:o}=e;return o&&Object.keys(o).forEach((e=>{if(!1===e.startsWith("--input"))n[e]=o[e];else{let t=o[e];const n=e.replace("--input-","").replace(/-([a-z])/g,(function(e){return e[1].toUpperCase()}));-1!==t.indexOf(".")&&(t=t.substring(t.indexOf(".")+1)),r[n]=t}})),{...t&&{...n,...r,_focusWithin:e.field._focus,pos:"relative",minH:9,py:1.5,spacing:3},cursor:"text",h:"fit-content"}},Si=(e,t)=>gi(e,(e=>{var n;return"AutoCompleteItem"===(null==(n=null==e?void 0:e.type)?void 0:n.displayName)&&e.props.value===(null==t?void 0:t.value)})),ki=(e,t)=>gi(e,(e=>{var n;return"AutoCompleteItem"===(null==(n=null==e?void 0:e.type)?void 0:n.displayName)&&e.props.value===(null==t?void 0:t.value)}));function Ni(e){var t,n;let{closeOnBlur:r=!0,creatable:o,emphasize:i,emptyState:a=!0,freeSolo:s,isReadOnly:l,listAllValuesOnFocus:c,maxSuggestions:d,multiple:u,closeOnSelect:h=!u,defaultValue:g,defaultValues:y=(g?[g]:[]),onReady:b,defaultIsOpen:v,disableFilter:w,isLoading:x=!1,placement:S="bottom",restoreOnBlurIfEmpty:k=!s,shouldRenderSuggestions:N=(()=>!0),submitKeys:_=[],suggestWhenEmpty:R,value:T,values:C=(T?"string"==typeof T?[T]:[...T]:void 0)}=e;s=s||!!u||e.freeSolo;const{isOpen:j,onClose:G,onOpen:F}=O({defaultIsOpen:v}),U=p(e.children,{isOpen:j,onClose:G,onOpen:F}),W=(e=>mi(e,(e=>{var t;return"AutoCompleteItem"===(null==(t=null==e?void 0:e.type)?void 0:t.displayName)})).map((e=>{const t=B(e.props,["value","label","fixed","disabled"]),{getValue:n=bi}=e.props,r=n(t.value);return{...D(t.label)?t:{...t,label:r},value:r,originalValue:t.value}})))(U),V=Me.useRef(null),H=Me.useRef(null),J=Me.useRef(null),q=Me.useRef(null),[K,Y]=Me.useState(!1);let Q="";u?Q="":f(y)?f(C)||(Q=C[0]):Q=y[0];const[Z,X]=Me.useState(null!==(t=Q)&&void 0!==t?t:""),ee=w?W:W.filter((t=>t.fixed||p(e.filter||wi,Z,t.value,t.label)||K)).filter(((e,t)=>!d||e.fixed||tnull==e?void 0:e.toString())),value:C,onChange:t=>{const n=ne.find((e=>e.value===t[0])),r=t.map((e=>ne.find((t=>t.value===e))));p(e.onChange,u?t:t[0],u?r:n)}}),[ie,ae]=Me.useState(null==(n=W[0])?void 0:n.value),se=e.maxSelections||re.length+1,le=ne.findIndex((e=>e.value===ie)),ce=A(le,ne,!!e.rollNavigation),de=E(le,ne,!!e.rollNavigation),ue=M(ne),pe=P(ne);I((()=>{ae(null==ue?void 0:ue.value)}),[Z]),Me.useEffect((()=>{var e;j||ae(null==(e=W[0])?void 0:e.value)}),[j]),Me.useEffect((()=>{const t=W.find((e=>e.value===ie));p(e.onOptionFocus,{item:t,focusMethod:q.current,isNewInput:null==t?void 0:t.creatable})}),[ie,e.onOptionFocus]);const he=t=>{var n,r;!re.includes(t)&&re.lengthu?[...e,t]:[t]));const o=ne.find((e=>e.value===t));u&&(null==(n=V.current)||n.focus()),e.focusInputOnSelect&&(null==(r=V.current)||r.focus()),p(e.onSelectOption,{item:o,selectMethod:q.current,isNewInput:null==o?void 0:o.creatable}),null!=o&&o.creatable&&p(e.onCreateOption,{item:m(o,["noFilter"]),selectMethod:q.current});const i=(null==o?void 0:o.label)||(null==o?void 0:o.value);X((()=>u?"":null!=i?i:"")),h&&G()},ge=(t,n)=>{var r;oe((n=>{const r=W.find((e=>e.value===t));return p(e.onTagRemoved,t,r,n),n.filter((e=>e!==t))})),Z===t&&X(""),n&&(null==(r=V.current)||r.focus())},fe=u?re.map((e=>{var t;return{label:(null==(t=W.find((t=>t.value===(null==e?void 0:e.toString()))))?void 0:t.label)||e,onRemove:()=>ge(e)}})):[];return Me.useEffect((()=>{p(b,{tags:fe})}),[re]),{autoCompleteProps:e,children:U,filteredList:ne,filteredResults:ee,focusedValue:ie,getEmptyStateProps:e=>{if(ne.every((e=>e.noFilter))&&a&&!o)return"boolean"==typeof a?e:p(a,{query:Z})},getGroupProps:e=>{const t=((e,t)=>D(gi(e,(e=>{var n,r;const o=p((null==(n=e.props)?void 0:n.getValue)||bi,(null==(r=e.props)?void 0:r.value)||{});return t.some((e=>e.value===o))}))))(e.children,ne);return{divider:{hasFirstChild:Si(e.children,ue),hasLastChild:ki(e.children,P(ne.filter((e=>f(null==e?void 0:e.noFilter)))))},group:{display:t?"initial":"none"}}},getInputProps:(t,n)=>{const{onBlur:o,onChange:i,onFocus:a,onKeyDown:s,variant:d,...h}=t;return{wrapper:{ref:H,onClick:()=>{var e;null==(e=null==V?void 0:V.current)||e.focus()},...xi(n,u),...h},input:{isReadOnly:l,onFocus:t=>{p(a,t),e.openOnFocus&&!l&&F(),e.selectOnFocus&&t.target.select(),c&&Y(!0)},onBlur:e=>{var t,n;p(o,e);const i=e.relatedTarget===(null==J?void 0:J.current)||(null==(t=J.current)?void 0:t.contains(e.relatedTarget)),a=null==(n=H.current)?void 0:n.contains(e.relatedTarget);if(!i&&!a&&(r&&G(),!re.includes(e.target.value)&&k)){const e=P(re),t=W.find((t=>t.value===e)),n=(null==t?void 0:t.label)||(null==t?void 0:t.value)||"";X(n)}},onChange:e=>{const t=e.target.value;p(i,e),X(t);const n=$(t);!p(N,t)||n&&!R?G():F(),Y(!1)},onKeyDown:e=>{var t;p(s,e),q.current="keyboard";const{key:n}=e,r=ne[le];return["Enter",..._].includes(n)?(!r||null!=r&&r.disabled?null==(t=V.current)||t.focus():he(null==r?void 0:r.value),void e.preventDefault()):"ArrowDown"===n?(j?ae(null==ce?void 0:ce.value):F(),void e.preventDefault()):"ArrowUp"===n?(j?ae(null==de?void 0:de.value):F(),void e.preventDefault()):"Tab"!==n?"Home"===n?(ae(null==ue?void 0:ue.value),void e.preventDefault()):"End"===n?(ae(null==pe?void 0:pe.value),void e.preventDefault()):void("Escape"===n&&(G(),e.preventDefault())):void(!j||!r||null!=r&&r.disabled?G():he(null==r?void 0:r.value))},value:Z,variant:u?"unstyled":d,...h}}},getItemProps:(e,t)=>{var n;const{_fixed:r,_focus:o,children:a,disabled:s,label:l,value:c,fixed:d,getValue:u=bi,onClick:h,onMouseOver:g,sx:f,...m}=e,y=t?c:null==(n=u(c))?void 0:n.toString(),b=y===ie,v=ne.findIndex((e=>e.value===y))>=0,w=a||l||y;return{item:{..."string"==typeof w&&i?{dangerouslySetInnerHTML:{__html:vi(w,Z)}}:{children:w},"aria-selected":re.includes(y),"aria-disabled":s,_disabled:{opacity:.4,cursor:"not-allowed",userSelect:"none"},onClick:e=>{var t;p(h,e),s?null==(t=V.current)||t.focus():he(y)},onMouseOver:e=>{p(g,e),ae(y),q.current="mouse"},sx:{...f,mark:{color:"inherit",bg:"transparent",...z(i)?i:{fontWeight:i?"extrabold":"inherit"}}},...b&&(o||{bg:"whiteAlpha.100",_light:{bg:"gray.200"}}),...d&&r,...m},root:{isValidSuggestion:v,value:y}}},inputRef:V,interactionRef:q,isLoading:x,isOpen:j,itemList:W,listRef:J,onClose:G,onOpen:F,placement:S,query:Z,removeItem:ge,resetItems:e=>{var t;oe([]),e&&(null==(t=V.current)||t.focus())},setQuery:X,tags:fe,values:re}}const _i=d(((e,t)=>{const n=Ni(e),{children:r,isOpen:o,onClose:i,onOpen:a,placement:l,resetItems:c,removeItem:d}=n;return Me.useImperativeHandle(t,(()=>({resetItems:c,removeItem:d}))),ui.jsx(pi,{value:n,children:ui.jsx(h,{isLazy:!0,isOpen:o,onClose:i,onOpen:a,autoFocus:!1,placement:l,closeOnBlur:!0,matchWidth:!0,children:ui.jsx(s.div,{w:"full",ref:t,children:r})})})}));_i.displayName="AutoComplete";const Ri=d(((e,t)=>{const{focusedValue:n,getItemProps:r,interactionRef:o}=hi(),i=Me.useRef(),a=g(t,i),s=r(e),{isValidSuggestion:l,value:c}=s.root,d=n===c;Me.useEffect((()=>{var e;d&&"keyboard"===o.current&&(null==(e=null==i?void 0:i.current)||e.scrollIntoView({behavior:"smooth",block:"center"}))}),[d,o]),Me.useEffect((()=>{"string"!=typeof c&&console.warn("wow"),"string"!=typeof c&&f(e.getValue)&&console.error("You must define the `getValue` prop, when an Item's value is not a string")}),[]);const{children:u,dangerouslySetInnerHTML:p,...h}=s.item,b=m(h,["groupId"]);return l?ui.jsx(y,{ref:a,...Ti,...b,children:u||ui.jsx("span",{dangerouslySetInnerHTML:p})}):null}));Ri.displayName="AutoCompleteItem";const Ti={mx:"2",px:"2",py:"2",rounded:"md",cursor:"pointer"},Ci=d(((e,t)=>{const{children:n,showDivider:r,...o}=e,i=m(o,["groupSibling"]),{getGroupProps:a}=hi(),{group:s}=a(e),l=Li(e);return ui.jsxs(b,{ref:t,...s,...i,children:[ui.jsx(v,{...l.top}),n,ui.jsx(v,{...l.bottom})]})})),ji=d(((e,t)=>ui.jsx(y,{...Oi,...e,ref:t})));Ci.displayName="AutoCompleteGroup",ji.displayName="AutoCompleteGroupTitle";const Oi={ml:5,my:1,fontSize:"xs",letterSpacing:"wider",fontWeight:"extrabold",textTransform:"uppercase"},Li=e=>{const{getGroupProps:t}=hi(),n=e.groupSibling,{divider:{hasFirstChild:r,hasLastChild:o}}=t(e),i={my:2,borderColor:e.dividerColor};return{top:{...i,mb:4,display:!e.showDivider||r?"none":""},bottom:{...i,display:!e.showDivider||o||n?"none":""}}},Ai=d(((e,t)=>{const{isLoading:n}=hi(),{loadingIcon:r,...o}=e;return ui.jsxs(w,{children:[ui.jsx(x,{...o,ref:t}),n&&ui.jsx(S,{children:r||ui.jsx(k,{})})]})})),Ei=d(((e,t)=>{const{autoCompleteProps:n,inputRef:r,getInputProps:o,tags:i,setQuery:a}=hi(),{children:s,isInvalid:l,hidePlaceholder:c,...d}=e,{value:u}=d;Me.useEffect((()=>{void 0!==u&&("string"==typeof u||u instanceof String)&&a(u)}),[u]);const h=N("Input",e);let{wrapper:f,input:m}=o(d,h);const{ref:y,...b}=f,v=g(t,r),w=p(s,{tags:i});c&&(m={...m,placeholder:Array.isArray(w)&&w.length?void 0:m.placeholder});const x=ui.jsx(Ai,{isInvalid:l,...m,ref:v}),S=ui.jsxs(_,{...b,ref:y,children:[w,ui.jsx(R,{as:Ai,...m,ref:v})]});return ui.jsx(T,{children:n.multiple?S:x})}));Ei.displayName="Input",Ei.id="Input";var Mi=Me.createContext({});function Pi(){const e=Me.useContext(Mi);if(void 0===e)throw new Error("useColorMode must be used within a ColorModeProvider");return e}function Ii(){const e=Pi(),t=function(){const e=Me.useContext(V);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}();return{...e,theme:t}}Mi.displayName="ColorModeContext";var $i=(...e)=>e.filter(Boolean).join(" ");function zi(e){const t=typeof e;return null!=e&&("object"===t||"function"===t)&&!Array.isArray(e)}function Bi(e,...t){return Di(e)?e(...t):e}var Di=e=>"function"==typeof e,Gi={exports:{}};!function(e,t){var n="__lodash_hash_undefined__",r=9007199254740991,o="[object Arguments]",i="[object AsyncFunction]",a="[object Function]",s="[object GeneratorFunction]",l="[object Null]",c="[object Object]",d="[object Proxy]",u="[object Undefined]",p=/^\[object .+?Constructor\]$/,h=/^(?:0|[1-9]\d*)$/,g={};g["[object Float32Array]"]=g["[object Float64Array]"]=g["[object Int8Array]"]=g["[object Int16Array]"]=g["[object Int32Array]"]=g["[object Uint8Array]"]=g["[object Uint8ClampedArray]"]=g["[object Uint16Array]"]=g["[object Uint32Array]"]=!0,g[o]=g["[object Array]"]=g["[object ArrayBuffer]"]=g["[object Boolean]"]=g["[object DataView]"]=g["[object Date]"]=g["[object Error]"]=g[a]=g["[object Map]"]=g["[object Number]"]=g[c]=g["[object RegExp]"]=g["[object Set]"]=g["[object String]"]=g["[object WeakMap]"]=!1;var f="object"==typeof ai&&ai&&ai.Object===Object&&ai,m="object"==typeof self&&self&&self.Object===Object&&self,y=f||m||Function("return this")(),b=t&&!t.nodeType&&t,v=b&&e&&!e.nodeType&&e,w=v&&v.exports===b,x=w&&f.process,S=function(){try{return v&&v.require&&v.require("util").types||x&&x.binding&&x.binding("util")}catch{}}(),k=S&&S.isTypedArray,N=Array.prototype,_=Function.prototype,R=Object.prototype,T=y["__core-js_shared__"],C=_.toString,j=R.hasOwnProperty,O=function(){var e=/[^.]+$/.exec(T&&T.keys&&T.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),L=R.toString,A=C.call(Object),E=RegExp("^"+C.call(j).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),M=w?y.Buffer:void 0,P=y.Symbol,I=y.Uint8Array;M&&M.allocUnsafe;var $=function(e,t){return function(n){return e(t(n))}}(Object.getPrototypeOf,Object),z=Object.create,B=R.propertyIsEnumerable,D=N.splice,G=P?P.toStringTag:void 0,F=function(){try{var e=pe(Object,"defineProperty");return e({},"",{}),e}catch{}}(),U=M?M.isBuffer:void 0,W=Math.max,V=Date.now,H=pe(y,"Map"),J=pe(Object,"create"),q=function(){function e(){}return function(t){if(!Ne(t))return{};if(z)return z(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function K(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1},Y.prototype.set=function(e,t){var n=this.__data__,r=ne(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Q.prototype.clear=function(){this.size=0,this.__data__={hash:new K,map:new(H||Y),string:new K}},Q.prototype.delete=function(e){var t=ue(this,e).delete(e);return this.size-=t?1:0,t},Q.prototype.get=function(e){return ue(this,e).get(e)},Q.prototype.has=function(e){return ue(this,e).has(e)},Q.prototype.set=function(e,t){var n=ue(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Z.prototype.clear=function(){this.__data__=new Y,this.size=0},Z.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Z.prototype.get=function(e){return this.__data__.get(e)},Z.prototype.has=function(e){return this.__data__.has(e)},Z.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Y){var r=n.__data__;if(!H||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Q(r)}return n.set(e,t),this.size=n.size,this};var oe=function(e,t,n){for(var r=-1,o=Object(e),i=n(e),a=i.length;a--;){var s=i[++r];if(!1===t(o[s],s,o))break}return e};function ie(e){return null==e?void 0===e?u:l:G&&G in Object(e)?function(e){var t=j.call(e,G),n=e[G];try{e[G]=void 0;var r=!0}catch{}var o=L.call(e);return r&&(t?e[G]=n:delete e[G]),o}(e):function(e){return L.call(e)}(e)}function ae(e){return _e(e)&&ie(e)==o}function se(e){return!(!Ne(e)||function(e){return!!O&&O in e}(e))&&(Se(e)?E:p).test(function(e){if(null!=e){try{return C.call(e)}catch{}try{return e+""}catch{}}return""}(e))}function le(e){if(!Ne(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=ge(e),n=[];for(var r in e)"constructor"==r&&(t||!j.call(e,r))||n.push(r);return n}function ce(e,t,n,r,o){e!==t&&oe(t,(function(i,a){if(o||(o=new Z),Ne(i))!function(e,t,n,r,o,i,a){var s=fe(e,n),l=fe(t,n),d=a.get(l);if(d)ee(e,n,d);else{var u=i?i(s,l,n+"",e,t,a):void 0,p=void 0===u;if(p){var h=ve(l),g=!h&&xe(l),f=!h&&!g&&Re(l);u=l,h||g||f?ve(s)?u=s:function(e){return _e(e)&&we(e)}(s)?u=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n-1&&e%1==0&&e0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(F?function(e,t){return F(e,"toString",{configurable:!0,enumerable:!1,value:je(t),writable:!0})}:Oe);function ye(e,t){return e===t||e!=e&&t!=t}var be=ae(function(){return arguments}())?ae:function(e){return _e(e)&&j.call(e,"callee")&&!B.call(e,"callee")},ve=Array.isArray;function we(e){return null!=e&&ke(e.length)&&!Se(e)}var xe=U||function(){return!1};function Se(e){if(!Ne(e))return!1;var t=ie(e);return t==a||t==s||t==i||t==d}function ke(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function Ne(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function _e(e){return null!=e&&"object"==typeof e}var Re=k?function(e){return function(t){return e(t)}}(k):function(e){return _e(e)&&ke(e.length)&&!!g[ie(e)]};function Te(e){return we(e)?X(e):le(e)}var Ce=function(e){return de((function(t,n){var r=-1,o=n.length,i=o>1?n[o-1]:void 0,a=o>2?n[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,a&&function(e,t,n){if(!Ne(n))return!1;var r=typeof t;return!!("number"==r?we(n)&&he(t,n.length):"string"==r&&t in n)&&ye(n[t],e)}(n[0],n[1],a)&&(i=o<3?void 0:i,o=1),t=Object(t);++r"string"==typeof e?e.replace(/!(important)?$/,"").trim():e,Wi=(e,t)=>n=>{const r=String(t),o=(e=>/!(important)?$/.test(e))(r),i=Ui(r),a=e?`${e}.${i}`:i;let s=zi(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=Ui(s),o?`${s} !important`:s};function Vi(e){const{scale:t,transform:n,compose:r}=e;return(e,o)=>{var i;const a=Wi(t,e)(o);let s=null!=(i=null==n?void 0:n(a,o))?i:a;return r&&(s=r(s,o)),s}}var Hi=(...e)=>t=>e.reduce(((e,t)=>t(e)),t);function Ji(e,t){return n=>{const r={property:n,scale:e};return r.transform=Vi({scale:e,transform:t}),r}}var qi=({rtl:e,ltr:t})=>n=>"rtl"===n.direction?e:t,Ki=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"],Yi={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},Qi={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"},Zi={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},Xi={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},ea=new Set(Object.values(Xi)),ta=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),na=e=>e.trim(),ra=e=>"string"==typeof e&&e.includes("(")&&e.includes(")"),oa=e=>t=>`${e}(${t})`,ia={filter:e=>"auto"!==e?e:Yi,backdropFilter:e=>"auto"!==e?e:Qi,ring:e=>function(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}(ia.px(e)),bgClip:e=>"text"===e?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e},transform:e=>"auto"===e?["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...Ki].join(" "):"auto-gpu"===e?["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...Ki].join(" "):e,vh:e=>"$100vh"===e?"var(--chakra-vh)":e,px(e){if(null==e)return e;const{unitless:t}=(e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}})(e);return t||"number"==typeof e?`${e}px`:e},fraction:e=>"number"!=typeof e||e>1?e:100*e+"%",float:(e,t)=>"rtl"===t.direction?{left:"right",right:"left"}[e]:e,degree(e){if(function(e){return/^var\(--.+\)$/.test(e)}(e)||null==e)return e;const t="string"==typeof e&&!e.endsWith("deg");return"number"==typeof e||t?`${e}deg`:e},gradient:(e,t)=>function(e,t){if(null==e||ta.has(e))return e;if(!ra(e)&&!ta.has(e))return`url('${e}')`;const n=/(^[a-z-A-Z]+)\((.*)\)/g.exec(e),r=null==n?void 0:n[1],o=null==n?void 0:n[2];if(!r||!o)return e;const i=r.includes("-gradient")?r:`${r}-gradient`,[a,...s]=o.split(",").map(na).filter(Boolean);if(0===(null==s?void 0:s.length))return e;const l=a in Xi?Xi[a]:a;return s.unshift(l),`${i}(${s.map((e=>{if(ea.has(e))return e;const n=e.indexOf(" "),[r,o]=-1!==n?[e.substr(0,n),e.substr(n+1)]:[e],i=ra(o)?o:o&&o.split(" "),a=`colors.${r}`,s=a in t.__cssMap?t.__cssMap[a].varRef:r;return i?[s,...Array.isArray(i)?i:[i]].join(" "):s})).join(", ")})`}(e,null!=t?t:{}),blur:oa("blur"),opacity:oa("opacity"),brightness:oa("brightness"),contrast:oa("contrast"),dropShadow:oa("drop-shadow"),grayscale:oa("grayscale"),hueRotate:oa("hue-rotate"),invert:oa("invert"),saturate:oa("saturate"),sepia:oa("sepia"),bgImage:e=>null==e||ra(e)||ta.has(e)?e:`url(${e})`,outline(e){const t="0"===String(e)||"none"===String(e);return null!==e&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){var t;const{space:n,divide:r}=null!=(t=Zi[e])?t:{},o={flexDirection:e};return n&&(o[n]=1),r&&(o[r]=1),o}},aa={borderWidths:Ji("borderWidths"),borderStyles:Ji("borderStyles"),colors:Ji("colors"),borders:Ji("borders"),gradients:Ji("gradients",ia.gradient),radii:Ji("radii",ia.px),space:Ji("space",Hi(ia.vh,ia.px)),spaceT:Ji("space",Hi(ia.vh,ia.px)),degreeT:e=>({property:e,transform:ia.degree}),prop:(e,t,n)=>({property:e,scale:t,...t&&{transform:Vi({scale:t,transform:n})}}),propT:(e,t)=>({property:e,transform:t}),sizes:Ji("sizes",Hi(ia.vh,ia.px)),sizesT:Ji("sizes",Hi(ia.vh,ia.fraction)),shadows:Ji("shadows"),logical:function(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:qi(t),transform:n?Vi({scale:n,compose:r}):r}},blur:Ji("blur",ia.blur)},sa={background:aa.colors("background"),backgroundColor:aa.colors("backgroundColor"),backgroundImage:aa.gradients("backgroundImage"),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:ia.bgClip},bgSize:aa.prop("backgroundSize"),bgPosition:aa.prop("backgroundPosition"),bg:aa.colors("background"),bgColor:aa.colors("backgroundColor"),bgPos:aa.prop("backgroundPosition"),bgRepeat:aa.prop("backgroundRepeat"),bgAttachment:aa.prop("backgroundAttachment"),bgGradient:aa.gradients("backgroundImage"),bgClip:{transform:ia.bgClip}};Object.assign(sa,{bgImage:sa.backgroundImage,bgImg:sa.backgroundImage});var la={border:aa.borders("border"),borderWidth:aa.borderWidths("borderWidth"),borderStyle:aa.borderStyles("borderStyle"),borderColor:aa.colors("borderColor"),borderRadius:aa.radii("borderRadius"),borderTop:aa.borders("borderTop"),borderBlockStart:aa.borders("borderBlockStart"),borderTopLeftRadius:aa.radii("borderTopLeftRadius"),borderStartStartRadius:aa.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:aa.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:aa.radii("borderTopRightRadius"),borderStartEndRadius:aa.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:aa.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:aa.borders("borderRight"),borderInlineEnd:aa.borders("borderInlineEnd"),borderBottom:aa.borders("borderBottom"),borderBlockEnd:aa.borders("borderBlockEnd"),borderBottomLeftRadius:aa.radii("borderBottomLeftRadius"),borderBottomRightRadius:aa.radii("borderBottomRightRadius"),borderLeft:aa.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:aa.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:aa.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:aa.borders(["borderLeft","borderRight"]),borderInline:aa.borders("borderInline"),borderY:aa.borders(["borderTop","borderBottom"]),borderBlock:aa.borders("borderBlock"),borderTopWidth:aa.borderWidths("borderTopWidth"),borderBlockStartWidth:aa.borderWidths("borderBlockStartWidth"),borderTopColor:aa.colors("borderTopColor"),borderBlockStartColor:aa.colors("borderBlockStartColor"),borderTopStyle:aa.borderStyles("borderTopStyle"),borderBlockStartStyle:aa.borderStyles("borderBlockStartStyle"),borderBottomWidth:aa.borderWidths("borderBottomWidth"),borderBlockEndWidth:aa.borderWidths("borderBlockEndWidth"),borderBottomColor:aa.colors("borderBottomColor"),borderBlockEndColor:aa.colors("borderBlockEndColor"),borderBottomStyle:aa.borderStyles("borderBottomStyle"),borderBlockEndStyle:aa.borderStyles("borderBlockEndStyle"),borderLeftWidth:aa.borderWidths("borderLeftWidth"),borderInlineStartWidth:aa.borderWidths("borderInlineStartWidth"),borderLeftColor:aa.colors("borderLeftColor"),borderInlineStartColor:aa.colors("borderInlineStartColor"),borderLeftStyle:aa.borderStyles("borderLeftStyle"),borderInlineStartStyle:aa.borderStyles("borderInlineStartStyle"),borderRightWidth:aa.borderWidths("borderRightWidth"),borderInlineEndWidth:aa.borderWidths("borderInlineEndWidth"),borderRightColor:aa.colors("borderRightColor"),borderInlineEndColor:aa.colors("borderInlineEndColor"),borderRightStyle:aa.borderStyles("borderRightStyle"),borderInlineEndStyle:aa.borderStyles("borderInlineEndStyle"),borderTopRadius:aa.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:aa.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:aa.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:aa.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(la,{rounded:la.borderRadius,roundedTop:la.borderTopRadius,roundedTopLeft:la.borderTopLeftRadius,roundedTopRight:la.borderTopRightRadius,roundedTopStart:la.borderStartStartRadius,roundedTopEnd:la.borderStartEndRadius,roundedBottom:la.borderBottomRadius,roundedBottomLeft:la.borderBottomLeftRadius,roundedBottomRight:la.borderBottomRightRadius,roundedBottomStart:la.borderEndStartRadius,roundedBottomEnd:la.borderEndEndRadius,roundedLeft:la.borderLeftRadius,roundedRight:la.borderRightRadius,roundedStart:la.borderInlineStartRadius,roundedEnd:la.borderInlineEndRadius,borderStart:la.borderInlineStart,borderEnd:la.borderInlineEnd,borderTopStartRadius:la.borderStartStartRadius,borderTopEndRadius:la.borderStartEndRadius,borderBottomStartRadius:la.borderEndStartRadius,borderBottomEndRadius:la.borderEndEndRadius,borderStartRadius:la.borderInlineStartRadius,borderEndRadius:la.borderInlineEndRadius,borderStartWidth:la.borderInlineStartWidth,borderEndWidth:la.borderInlineEndWidth,borderStartColor:la.borderInlineStartColor,borderEndColor:la.borderInlineEndColor,borderStartStyle:la.borderInlineStartStyle,borderEndStyle:la.borderInlineEndStyle});var ca={color:aa.colors("color"),textColor:aa.colors("color"),fill:aa.colors("fill"),stroke:aa.colors("stroke")},da={boxShadow:aa.shadows("boxShadow"),mixBlendMode:!0,blendMode:aa.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:aa.prop("backgroundBlendMode"),opacity:!0};Object.assign(da,{shadow:da.boxShadow});var ua={filter:{transform:ia.filter},blur:aa.blur("--chakra-blur"),brightness:aa.propT("--chakra-brightness",ia.brightness),contrast:aa.propT("--chakra-contrast",ia.contrast),hueRotate:aa.degreeT("--chakra-hue-rotate"),invert:aa.propT("--chakra-invert",ia.invert),saturate:aa.propT("--chakra-saturate",ia.saturate),dropShadow:aa.propT("--chakra-drop-shadow",ia.dropShadow),backdropFilter:{transform:ia.backdropFilter},backdropBlur:aa.blur("--chakra-backdrop-blur"),backdropBrightness:aa.propT("--chakra-backdrop-brightness",ia.brightness),backdropContrast:aa.propT("--chakra-backdrop-contrast",ia.contrast),backdropHueRotate:aa.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:aa.propT("--chakra-backdrop-invert",ia.invert),backdropSaturate:aa.propT("--chakra-backdrop-saturate",ia.saturate)},pa={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:ia.flexDirection},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:aa.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:aa.space("gap"),rowGap:aa.space("rowGap"),columnGap:aa.space("columnGap")};Object.assign(pa,{flexDir:pa.flexDirection});var ha={gridGap:aa.space("gridGap"),gridColumnGap:aa.space("gridColumnGap"),gridRowGap:aa.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},ga={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:ia.outline},outlineOffset:!0,outlineColor:aa.colors("outlineColor")},fa={width:aa.sizesT("width"),inlineSize:aa.sizesT("inlineSize"),height:aa.sizes("height"),blockSize:aa.sizes("blockSize"),boxSize:aa.sizes(["width","height"]),minWidth:aa.sizes("minWidth"),minInlineSize:aa.sizes("minInlineSize"),minHeight:aa.sizes("minHeight"),minBlockSize:aa.sizes("minBlockSize"),maxWidth:aa.sizes("maxWidth"),maxInlineSize:aa.sizes("maxInlineSize"),maxHeight:aa.sizes("maxHeight"),maxBlockSize:aa.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,aspectRatio:!0,hideFrom:{scale:"breakpoints",transform:(e,t)=>{var n,r,o;return{[`@media screen and (min-width: ${null!=(o=null==(r=null==(n=t.__breakpoints)?void 0:n.get(e))?void 0:r.minW)?o:e})`]:{display:"none"}}}},hideBelow:{scale:"breakpoints",transform:(e,t)=>{var n,r,o;return{[`@media screen and (max-width: ${null!=(o=null==(r=null==(n=t.__breakpoints)?void 0:n.get(e))?void 0:r._minW)?o:e})`]:{display:"none"}}}},verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:aa.propT("float",ia.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(fa,{w:fa.width,h:fa.height,minW:fa.minWidth,maxW:fa.maxWidth,minH:fa.minHeight,maxH:fa.maxHeight,overscroll:fa.overscrollBehavior,overscrollX:fa.overscrollBehaviorX,overscrollY:fa.overscrollBehaviorY});var ma={listStyleType:!0,listStylePosition:!0,listStylePos:aa.prop("listStylePosition"),listStyleImage:!0,listStyleImg:aa.prop("listStyleImage")},ya=(e=>{const t=new WeakMap;return(n,r,o,i)=>{if(typeof n>"u")return e(n,r,o);t.has(n)||t.set(n,new Map);const a=t.get(n);if(a.has(r))return a.get(r);const s=e(n,r,o,i);return a.set(r,s),s}})((function(e,t,n,r){const o="string"==typeof t?t.split("."):[t];for(r=0;r{const r={},o=ya(e,t,{});for(const i in o)i in n&&null!=n[i]||(r[i]=o[i]);return r},xa={srOnly:{transform:e=>!0===e?ba:"focusable"===e?va:{}},layerStyle:{processResult:!0,transform:(e,t,n)=>wa(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>wa(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>wa(t,e,n)}},Sa={position:!0,pos:aa.prop("position"),zIndex:aa.prop("zIndex","zIndices"),inset:aa.spaceT("inset"),insetX:aa.spaceT(["left","right"]),insetInline:aa.spaceT("insetInline"),insetY:aa.spaceT(["top","bottom"]),insetBlock:aa.spaceT("insetBlock"),top:aa.spaceT("top"),insetBlockStart:aa.spaceT("insetBlockStart"),bottom:aa.spaceT("bottom"),insetBlockEnd:aa.spaceT("insetBlockEnd"),left:aa.spaceT("left"),insetInlineStart:aa.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:aa.spaceT("right"),insetInlineEnd:aa.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(Sa,{insetStart:Sa.insetInlineStart,insetEnd:Sa.insetInlineEnd});var ka={ring:{transform:ia.ring},ringColor:aa.colors("--chakra-ring-color"),ringOffset:aa.prop("--chakra-ring-offset-width"),ringOffsetColor:aa.colors("--chakra-ring-offset-color"),ringInset:aa.prop("--chakra-ring-inset")},Na={margin:aa.spaceT("margin"),marginTop:aa.spaceT("marginTop"),marginBlockStart:aa.spaceT("marginBlockStart"),marginRight:aa.spaceT("marginRight"),marginInlineEnd:aa.spaceT("marginInlineEnd"),marginBottom:aa.spaceT("marginBottom"),marginBlockEnd:aa.spaceT("marginBlockEnd"),marginLeft:aa.spaceT("marginLeft"),marginInlineStart:aa.spaceT("marginInlineStart"),marginX:aa.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:aa.spaceT("marginInline"),marginY:aa.spaceT(["marginTop","marginBottom"]),marginBlock:aa.spaceT("marginBlock"),padding:aa.space("padding"),paddingTop:aa.space("paddingTop"),paddingBlockStart:aa.space("paddingBlockStart"),paddingRight:aa.space("paddingRight"),paddingBottom:aa.space("paddingBottom"),paddingBlockEnd:aa.space("paddingBlockEnd"),paddingLeft:aa.space("paddingLeft"),paddingInlineStart:aa.space("paddingInlineStart"),paddingInlineEnd:aa.space("paddingInlineEnd"),paddingX:aa.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:aa.space("paddingInline"),paddingY:aa.space(["paddingTop","paddingBottom"]),paddingBlock:aa.space("paddingBlock")};Object.assign(Na,{m:Na.margin,mt:Na.marginTop,mr:Na.marginRight,me:Na.marginInlineEnd,marginEnd:Na.marginInlineEnd,mb:Na.marginBottom,ml:Na.marginLeft,ms:Na.marginInlineStart,marginStart:Na.marginInlineStart,mx:Na.marginX,my:Na.marginY,p:Na.padding,pt:Na.paddingTop,py:Na.paddingY,px:Na.paddingX,pb:Na.paddingBottom,pl:Na.paddingLeft,ps:Na.paddingInlineStart,paddingStart:Na.paddingInlineStart,pr:Na.paddingRight,pe:Na.paddingInlineEnd,paddingEnd:Na.paddingInlineEnd});var _a={textDecorationColor:aa.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:aa.shadows("textShadow")},Ra={clipPath:!0,transform:aa.propT("transform",ia.transform),transformOrigin:!0,translateX:aa.spaceT("--chakra-translate-x"),translateY:aa.spaceT("--chakra-translate-y"),skewX:aa.degreeT("--chakra-skew-x"),skewY:aa.degreeT("--chakra-skew-y"),scaleX:aa.prop("--chakra-scale-x"),scaleY:aa.prop("--chakra-scale-y"),scale:aa.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:aa.degreeT("--chakra-rotate")},Ta={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:aa.prop("transitionDuration","transition.duration"),transitionProperty:aa.prop("transitionProperty","transition.property"),transitionTimingFunction:aa.prop("transitionTimingFunction","transition.easing")},Ca={fontFamily:aa.prop("fontFamily","fonts"),fontSize:aa.prop("fontSize","fontSizes",ia.px),fontWeight:aa.prop("fontWeight","fontWeights"),lineHeight:aa.prop("lineHeight","lineHeights"),letterSpacing:aa.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,textIndent:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,isTruncated:{transform(e){if(!0===e)return{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}},noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},ja={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:aa.spaceT("scrollMargin"),scrollMarginTop:aa.spaceT("scrollMarginTop"),scrollMarginBottom:aa.spaceT("scrollMarginBottom"),scrollMarginLeft:aa.spaceT("scrollMarginLeft"),scrollMarginRight:aa.spaceT("scrollMarginRight"),scrollMarginX:aa.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:aa.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:aa.spaceT("scrollPadding"),scrollPaddingTop:aa.spaceT("scrollPaddingTop"),scrollPaddingBottom:aa.spaceT("scrollPaddingBottom"),scrollPaddingLeft:aa.spaceT("scrollPaddingLeft"),scrollPaddingRight:aa.spaceT("scrollPaddingRight"),scrollPaddingX:aa.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:aa.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function Oa(e){return zi(e)&&e.reference?e.reference:String(e)}var La=(e,...t)=>t.map(Oa).join(` ${e} `).replace(/calc/g,""),Aa=(...e)=>`calc(${La("+",...e)})`,Ea=(...e)=>`calc(${La("-",...e)})`,Ma=(...e)=>`calc(${La("*",...e)})`,Pa=(...e)=>`calc(${La("/",...e)})`,Ia=e=>{const t=Oa(e);return null==t||Number.isNaN(parseFloat(t))?Ma(t,-1):String(t).startsWith("-")?String(t).slice(1):`-${t}`},$a=Object.assign((e=>({add:(...t)=>$a(Aa(e,...t)),subtract:(...t)=>$a(Ea(e,...t)),multiply:(...t)=>$a(Ma(e,...t)),divide:(...t)=>$a(Pa(e,...t)),negate:()=>$a(Ia(e)),toString:()=>e.toString()})),{add:Aa,subtract:Ea,multiply:Ma,divide:Pa,negate:Ia});function za(e){if(null==e)return e;const{unitless:t}=function(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}(e);return t||"number"==typeof e?`${e}px`:e}function Ba(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${za(e)})`),t&&n.push("and",`(max-width: ${za(t)})`),n.join(" ")}var Da=(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,Ga=(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,Fa=(e,t)=>`${e}:focus-visible ${t}`,Ua=(e,t)=>`${e}:focus-within ${t}`,Wa=(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,Va=(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,Ha=(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,Ja=(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,qa=(e,t)=>`${e}:placeholder-shown ${t}`,Ka=e=>Qa((t=>e(t,"&")),"[role=group]","[data-group]",".group"),Ya=e=>Qa((t=>e(t,"~ &")),"[data-peer]",".peer"),Qa=(e,...t)=>t.map(e).join(", "),Za={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_firstLetter:"&::first-letter",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:Ka(Da),_peerHover:Ya(Da),_groupFocus:Ka(Ga),_peerFocus:Ya(Ga),_groupFocusVisible:Ka(Fa),_peerFocusVisible:Ya(Fa),_groupActive:Ka(Wa),_peerActive:Ya(Wa),_groupDisabled:Ka(Va),_peerDisabled:Ya(Va),_groupInvalid:Ka(Ha),_peerInvalid:Ya(Ha),_groupChecked:Ka(Ja),_peerChecked:Ya(Ja),_groupFocusWithin:Ka(Ua),_peerFocusWithin:Ya(Ua),_peerPlaceholderShown:Ya(qa),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]",_horizontal:"&[data-orientation=horizontal]",_vertical:"&[data-orientation=vertical]"},Xa=Object.keys(Za),es=Fi({},sa,la,ca,pa,fa,ua,ka,ga,ha,xa,Sa,da,Na,ja,Ca,_a,Ra,ma,Ta);Object.assign({},Na,fa,pa,ha,Sa);var ts=[...Object.keys(es),...Xa],ns={...es,...Za},rs=(e,t)=>e.startsWith("--")&&"string"==typeof t&&!function(e){return/^var\(--.+\)$/.test(e)}(t),os=(e,t)=>{var n,r;if(null==t)return t;const o=t=>{var n,r;return null==(r=null==(n=e.__cssMap)?void 0:n[t])?void 0:r.varRef},i=e=>{var t;return null!=(t=o(e))?t:e},[a,s]=function(e){const t=[];let n="",r=!1;for(let o=0;o{var a,s,l;const c=Bi(e,r),d=(e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:o}=t.__breakpoints,i={};for(const a in e){let s=Bi(e[a],t);if(null==s)continue;if(s=zi(s)&&n(s)?r(s):s,!Array.isArray(s)){i[a]=s;continue}const l=s.slice(0,o.length).length;for(let e=0;e{Fi(s,{[e]:d?g[e]:{[h]:g[e]}})}));continue}if(!u){d?Fi(s,g):s[h]=g;continue}s[h]=g}}return s}}function ls(e){return function(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}(e,["styleConfig","size","variant","colorScheme"])}var cs=typeof Element<"u",ds="function"==typeof Map,us="function"==typeof Set,ps="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function hs(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;var n,r,o,i;if(Array.isArray(e)){if((n=e.length)!=t.length)return!1;for(r=n;0!=r--;)if(!hs(e[r],t[r]))return!1;return!0}if(ds&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;for(i=e.entries();!(r=i.next()).done;)if(!hs(r.value[1],t.get(r.value[0])))return!1;return!0}if(us&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(ps&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if((n=e.length)!=t.length)return!1;for(r=n;0!=r--;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&"function"==typeof e.valueOf&&"function"==typeof t.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&"function"==typeof e.toString&&"function"==typeof t.toString)return e.toString()===t.toString();if((n=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;if(cs&&e instanceof Element)return!1;for(r=n;0!=r--;)if(("_owner"!==o[r]&&"__v"!==o[r]&&"__o"!==o[r]||!e.$$typeof)&&!hs(e[o[r]],t[o[r]]))return!1;return!0}return e!=e&&t!=t}const gs=si((function(e,t){try{return hs(e,t)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}}));function fs(e,t={}){var n;const{styleConfig:r,...o}=t,{theme:i,colorMode:a}=Ii(),s=e?G(i,`components.${e}`):void 0,l=r||s,c=F({theme:i,colorMode:a},null!=(n=null==l?void 0:l.defaultProps)?n:{},U(m(o,["children"]))),d=Me.useRef({});if(l){const e=function(e){return t=>{var n;const{variant:r,size:o,theme:i}=t,a=ss(i);return Fi({},Bi(null!=(n=e.baseStyle)?n:{},t),a(e,"sizes",o,t),a(e,"variants",r,t))}}(l)(c);gs(d.current,e)||(d.current=e)}return d.current}var ms=new Set([...ts,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),ys=new Set(["htmlWidth","htmlHeight","htmlSize","htmlTranslate"]);function bs(e){return ys.has(e)||!ms.has(e)}var vs,ws=null!=(vs=u.default)?vs:u,xs=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:o,sx:i,...a}=t,s=W(a,((e,t)=>(e=>e in ns)(t))),l=function(e,...t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");const n={...e};for(const r of t)if(null!=r)for(const e in r)Object.prototype.hasOwnProperty.call(r,e)&&(e in n&&delete n[e],n[e]=r[e]);return n}({},o,p(e,t),U(s),i),c=(e=>t=>is({theme:t,pseudos:Za,configs:es})(e))(l)(t.theme);return r?[c,r]:c};function Ss(e,t){const{baseStyle:n,...r}=null!=t?t:{};r.shouldForwardProp||(r.shouldForwardProp=bs);const o=xs({baseStyle:n}),i=ws(e,r)(o);return Pe.forwardRef((function(e,t){const{colorMode:n,forced:r}=Pi();return Pe.createElement(i,{ref:t,"data-theme":r?n:void 0,...e})}))}var ks=function(){const e=new Map;return new Proxy(Ss,{apply:(e,t,n)=>Ss(...n),get:(t,n)=>(e.has(n)||e.set(n,Ss(n)),e.get(n))})}();function Ns(e){return Me.forwardRef(e)}var _s={path:ui.jsxs("g",{stroke:"currentColor",strokeWidth:"1.5",children:[ui.jsx("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),ui.jsx("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),ui.jsx("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},Rs=Ns(((e,t)=>{const{as:n,viewBox:r,color:o="currentColor",focusable:i=!1,children:a,className:s,__css:l,...c}=e,d=$i("chakra-icon",s),u=function(e,t={}){return fs(e,t)}("Icon",e),p={ref:t,focusable:i,className:d,__css:{w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:o,...l,...u}},h=null!=r?r:_s.viewBox;if(n&&"string"!=typeof n)return ui.jsx(ks.svg,{as:n,...p,...c});const g=null!=a?a:_s.path;return ui.jsx(ks.svg,{verticalAlign:"middle",viewBox:h,...p,...c,children:g})}));Rs.displayName="Icon",Ns((function(e,t){const{spacing:n="0.5rem",spacingX:r,spacingY:o,children:i,justify:a,direction:s,align:l,className:c,shouldWrapChildren:d,...u}=e,p=Me.useMemo((()=>d?Me.Children.map(i,((e,t)=>ui.jsx(Ts,{children:e},t))):i),[i,d]);return ui.jsx(ks.div,{ref:t,className:$i("chakra-wrap",c),...u,children:ui.jsx(ks.ul,{className:"chakra-wrap__list",__css:{display:"flex",flexWrap:"wrap",justifyContent:a,alignItems:l,flexDirection:s,listStyleType:"none",gap:n,columnGap:r,rowGap:o,padding:"0"},children:p})})})).displayName="Wrap";var Ts=Ns((function(e,t){const{className:n,...r}=e;return ui.jsx(ks.li,{ref:t,__css:{display:"flex",alignItems:"flex-start"},className:$i("chakra-wrap__listitem",n),...r})}));Ts.displayName="WrapItem";var Cs=ks("div");Cs.displayName="Box";var js=Ns((function(e,t){const{size:n,centerContent:r=!0,...o}=e,i=r?{display:"flex",alignItems:"center",justifyContent:"center"}:{};return ui.jsx(Cs,{ref:t,boxSize:n,__css:{...i,flexShrink:0,flexGrow:0},...o})}));js.displayName="Square",Ns((function(e,t){const{size:n,...r}=e;return ui.jsx(js,{size:n,ref:t,borderRadius:"9999px",...r})})).displayName="Circle";var Os=Ns((function(e,t){const{direction:n,align:r,justify:o,wrap:i,basis:a,grow:s,shrink:l,...c}=e,d={display:"flex",flexDirection:n,alignItems:r,justifyContent:o,flexWrap:i,flexBasis:a,flexGrow:s,flexShrink:l};return ui.jsx(ks.div,{ref:t,__css:d,...c})}));Os.displayName="Flex";const Ls=e=>{const{getEmptyStateProps:t}=hi(),n=t(ui.jsx(Os,{...As,children:"No options found!"}));return ui.jsx(Cs,{...e,children:n})},As={fontSize:"sm",align:"center",justify:"center",fontWeight:"bold",fontStyle:"italic"},Es=["AutoCompleteGroup","AutoCompleteItem","AutoCompleteCreatable"],Ms=d(((e,t)=>{const{children:n,loadingState:r,...o}=e,{listRef:i,isLoading:a}=hi(),s=g(t,i),[l,c]=(e=>{const t=Pe.Children.map(e,((t,n)=>{var r;if("AutoCompleteGroup"===(null==(r=null==t?void 0:t.type)?void 0:r.displayName)){const r=Pe.Children.toArray(e)[n+1];return Pe.cloneElement(t,{groupSibling:!!r&&"AutoCompleteGroup"===r.type.displayName})}return t})),n=Pe.Children.toArray(t).filter((e=>{var t;return!Es.includes(null==(t=null==e?void 0:e.type)?void 0:t.displayName)}));return[Pe.Children.toArray(t).filter((e=>{var t;return Es.includes(null==(t=null==e?void 0:e.type)?void 0:t.displayName)})),n]})(n);return ui.jsxs(C,{ref:s,w:"inherit",...Ps,...o,children:[a&&ui.jsx(j,{children:r||ui.jsx(k,{size:"md"})}),!a&&ui.jsxs(ui.Fragment,{children:[l,ui.jsx(Ls,{}),c]})]})}));Ms.displayName="AutoCompleteList";const Ps={py:"4",opacity:"0",bg:"#232934",rounded:"md",maxH:"350px",border:"none",shadow:"base",zIndex:"popover",overflowY:"auto",_light:{bg:"#ffffff"},_focus:{boxShadow:"none"}};var[Is,$s]=function(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:o="Provider",errorMessage:i,defaultValue:a}=e,s=Me.createContext(a);return s.displayName=t,[s.Provider,function e(){var t;const a=Me.useContext(s);if(!a&&n){const n=new Error(null!=i?i:function(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}(r,o));throw n.name="ContextError",null==(t=Error.captureStackTrace)||t.call(Error,n,e),n}return a},s]}({name:"TagStylesContext",errorMessage:"useTagStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),zs=Ns(((e,t)=>{const n=function(e,t={}){return fs(e,t)}("Tag",e),r=ls(e),o={display:"inline-flex",verticalAlign:"top",alignItems:"center",maxWidth:"100%",...n.container};return ui.jsx(Is,{value:n,children:ui.jsx(ks.span,{ref:t,...r,__css:o})})}));zs.displayName="Tag";var Bs=Ns(((e,t)=>{const n=$s();return ui.jsx(ks.span,{ref:t,noOfLines:1,...e,__css:n.label})}));Bs.displayName="TagLabel",Ns(((e,t)=>ui.jsx(Rs,{ref:t,verticalAlign:"top",marginEnd:"0.5rem",...e}))).displayName="TagLeftIcon",Ns(((e,t)=>ui.jsx(Rs,{ref:t,verticalAlign:"top",marginStart:"0.5rem",...e}))).displayName="TagRightIcon";var Ds=e=>ui.jsx(Rs,{verticalAlign:"inherit",viewBox:"0 0 512 512",...e,children:ui.jsx("path",{fill:"currentColor",d:"M289.94 256l95-95A24 24 0 00351 127l-95 95-95-95a24 24 0 00-34 34l95 95-95 95a24 24 0 1034 34l95-95 95 95a24 24 0 0034-34z"})});Ds.displayName="TagCloseIcon";var Gs=Ns(((e,t)=>{const{isDisabled:n,children:r,...o}=e,i={display:"flex",alignItems:"center",justifyContent:"center",outline:"0",...$s().closeButton};return ui.jsx(ks.button,{ref:t,"aria-label":"close",...o,type:"button",disabled:n,__css:i,children:r||ui.jsx(Ds,{})})}));Gs.displayName="TagCloseButton",Me.memo((e=>{const{label:t,onRemove:n,disabled:r,...o}=e;return ui.jsx(Ts,{children:ui.jsxs(zs,{borderRadius:"md",fontWeight:"normal",...r&&Fs,...o,children:[ui.jsx(Bs,{children:t}),ui.jsx(Gs,{onClick:()=>!r&&p(n),cursor:"pointer",...r&&Fs})]})})}));const Fs={cursor:"text",userSelect:"none",opacity:.4,_focus:{boxShadow:"none"}};var Us=function(){return Us=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},Js=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},Xs=e("aX",Me.forwardRef((function(e,t){var n=e.validator,r=e.onDebouncedChange,o=e.delay,a=e.optionList,s=e.defaultValue;e.onChange;var l=Qs(e,["validator","onDebouncedChange","delay","optionList","defaultValue","onChange"]),c=Me.useRef(null),d=g(c,t),u=Me.useRef("datalist-"+(new Date).valueOf()),p=Zs(Me.useState(!1),2),h=p[0],f=p[1],m=Me.useRef();return Me.useEffect((function(){c.current&&(c.current.value=(null==s?void 0:s.toString())||"")}),[s]),i.jsxs(i.Fragment,{children:[i.jsx(x,Ys({ref:d,list:u.current,variant:"flushed",size:"sm",h:6,onChange:function(e){var t=e.target.value;window.clearTimeout(m.current),n&&f(!n(t)),m.current=window.setTimeout((function(){null==r||r(t),m.current=void 0}),null!=o?o:500)},onBlur:function(e){var t=e.target.value;void 0!==m.current&&(window.clearTimeout(m.current),n&&f(!n(t)),null==r||r(t),m.current=void 0)},isInvalid:h},l)),a&&i.jsx("datalist",{id:u.current,children:null==a?void 0:a.map((function(e,t){return i.jsx("option",{children:e},t)}))})]})}))),el=function(){return el=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},ol=function(e){switch(e){case nt.DEV:return"red";case nt.UAT:return"orange";case nt.PRD:return"green"}},il=function(e,t,n){var r=new Blob([n],{type:t});al(e,r)},al=function(e,t){var n=window.URL.createObjectURL(t),r=document.createElement("a");r.href=n,r.download=e,document.body.appendChild(r),r.click(),document.body.removeChild(r),window.URL.revokeObjectURL(n)},sl=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function ll(e){var t=e.cancelRef,n=e.isOpen,r=e.onClose,o=sl(Me.useState(!1),2),a=o[0],s=o[1];return i.jsxs(te,{leastDestructiveRef:t,isOpen:n,onClose:r,children:[i.jsx(ne,{}),i.jsxs(re,{children:[i.jsx(oe,{children:"Warning 警告"}),i.jsx(ie,{}),i.jsxs(ae,{sx:{"& p":{my:1}},children:[i.jsx(se,{children:"Are you sure you want to reset the app? The webpage local storage for this app will be cleared. A copy of the local storage will be downloaded and it may be used for restoration (varies with app)."}),i.jsx(se,{children:"確定重設該應用程式嗎?應用程式的網頁本地儲存將會被清除。本地儲存的副本可供下載及用於復原(因應用程式而異)。"}),i.jsx(se,{children:"确定重置本应用程序吗?应用程序的网页本地存储将会被清除。本地存储的拷贝可供下载以及用于还原(因应用程序而異)。"})]}),i.jsxs(le,{children:[i.jsx(J,{ref:t,onClick:r,children:"Cancel"}),i.jsx(J,{isLoading:a,colorScheme:"red",ml:3,onClick:function(){s(!0);var e=qn.storage.getAll(),t=qn.getAppName(),n="".concat(t,"_BACKUP_").concat((new Date).toISOString(),".json");il(n,"application/json",JSON.stringify(e)),qn.storage.clear(),setTimeout((function(){window.location.reload()}),2e3)},children:"Confirm and reload"})]})]})]})}var cl=function(){return cl=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function pl(e){var t=e.error,n=e.errorInfo,o=e.allowReset,a=e.sx,s=dl(e,["error","errorInfo","allowReset","sx"]),l=r("RmgErrorBoundary"),c=ce("primary.500","primary.300"),d=ul(Me.useState(!1),2),u=d[0],p=d[1],h=Me.useRef(null),g=function(e){return i.jsx(de,{color:c,role:"button",onClick:function(){return p(!0)},children:e})},f=qn.getAppName(),m=i.jsx(de,{color:c,href:"https://github.com/railmapgen/".concat(f,"/issues"),isExternal:!0,children:"GitHub Issue"});return i.jsxs(ue,cl({status:"error",sx:cl(cl({},l),a)},s,{children:[i.jsx(pe,{}),i.jsx(he,{children:"Something went wrong!"}),i.jsxs(ge,{children:[i.jsxs(se,{children:["Please try to refresh or re-import your configuration files. If the issue still persists, please consider upgrading your browser",o?i.jsxs(i.Fragment,{children:[" or ",g("reset this app")]}):"",". Should you need any help, please contact us by submitting an issue in ",m," with the details shown below."]}),i.jsxs(se,{children:["請嘗試重新整理或重新上載設定檔。如果問題仍然存在,請考慮更新你的瀏覽器",o?i.jsxs(i.Fragment,{children:["或",g("重設該應用程式")]}):"","。如需協助或與我們聯絡,請前往 ",m," 提交一個 Issue 並附以詳細資料。"]}),i.jsxs(se,{children:["请尝试刷新或者重新上传配置文件。如果问题仍然存在,请考虑更新您的浏览器",o?i.jsxs(i.Fragment,{children:["或者",g("重置本应用程序")]}):"","。如需帮助或者联系我们,请前往 ",m," 提交一个 Issue 并附上详细信息。"]}),i.jsxs(se,{as:"details",children:[null==t?void 0:t.toString(),i.jsx("br",{}),null==n?void 0:n.componentStack]}),o&&i.jsx(ll,{cancelRef:h,isOpen:u,onClose:function(){return p(!1)}})]})]}))}var hl,gl=(hl=function(e,t){return hl=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},hl(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}hl(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),fl=function(){return fl=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function Nl(e){var t=e.defaultValue,n=e.options,r=e.disabledOptions,o=Sl(e,["defaultValue","options","disabledOptions"]),a=Me.useRef(null);Me.useEffect((function(){a.current&&(a.current.value=(null==t?void 0:t.toString())||"")}),[t]);var s=function(e,t){return i.jsx("option",{value:e,disabled:void 0!==(null==r?void 0:r.find((function(t){return t.toString()===e}))),children:t},e)};return i.jsx(ye,xl({ref:a,variant:"flushed",size:"sm",h:6},o,{children:Object.entries(n).map((function(e){var t=kl(e,2),n=t[0],r=t[1];return"object"==typeof r?i.jsx("optgroup",{label:n,children:Object.entries(r).map((function(e){var t=kl(e,2),n=t[0],r=t[1];return s(n,r)}))},n):s(n,r)}))}))}var _l=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},Rl=(e("u",(function(e,t,n){var r=_l(Me.useState(t()),2),o=r[0],i=r[1];return Me.useEffect((function(){e.then((function(){console.debug("[rmg-components] Getter updates finished"),i(t())}))}),[]),o})),function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}),Tl=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function Ol(e){var t=e.defaultValue,n=e.min,o=e.max,a=e.step,s=e.onThrottledChange,l=e.leftIcon,c=e.rightIcon,d=r("RmgThrottledSlider"),u=jl(Me.useState(null!=t?t:0),2),p=u[0],h=u[1];Me.useEffect((function(){void 0!==t&&p!==t&&h(t)}),[t]);var g=Cl(null!=s?s:function(){},500);return i.jsxs(y,{sx:d,children:[l&&i.jsx(be,{size:"xs",variant:"ghost","aria-label":"Drag left",icon:l,onClick:function(){var e=Math.max(p-10*(null!=a?a:1),null!=n?n:0);null==s||s(e),h(e)}}),i.jsxs(ve,{value:p,min:n,max:o,step:a,onChange:function(e){g(e),h(e)},children:[i.jsx(we,{children:i.jsx(xe,{})}),i.jsx(Se,{})]}),c&&i.jsx(be,{size:"xs",variant:"ghost","aria-label":"Drag right",icon:c,onClick:function(){var e=Math.min(p+10*(null!=a?a:1),null!=o?o:100);null==s||s(e),h(e)}})]})}var Ll=function(e){var t=e.children,n=e.noWrap,o=r("RmgOutput",{noWrap:n});return i.jsx(s.output,{sx:o,children:t})};function Al(e){var t=e.fields,n=e.noLabel,r=e.minW;return i.jsx(y,{wrap:"wrap",children:t.map((function(e,t){if(e.hidden)return i.jsx(Me.Fragment,{},t);var o=e.minW||r,a="full"===o;return i.jsx(wl,{className:a?"mw-full":"",label:e.label,flex:a?void 0:1,minW:a?void 0:o,noLabel:n,oneLine:e.oneLine,children:function(e){switch(e.type){case"input":return i.jsx(Xs,{placeholder:e.placeholder,defaultValue:e.value,type:e.variant,validator:e.validator,onDebouncedChange:e.onChange,delay:e.debouncedDelay,optionList:e.optionList,isDisabled:e.isDisabled});case"output":return i.jsx(Ll,{noWrap:e.noWrap,children:e.value});case"textarea":return i.jsx(nl,{placeholder:e.placeholder,defaultValue:e.value,onDebouncedChange:e.onChange,isDisabled:e.isDisabled});case"slider":return i.jsx(Ol,{defaultValue:e.value,min:e.min,max:e.max,step:e.step,onThrottledChange:e.onChange,leftIcon:e.leftIcon,rightIcon:e.rightIcon,isDisabled:e.isDisabled});case"select":return i.jsx(Nl,{defaultValue:e.value,onChange:function(t){var n,r=t.target.value;return null===(n=e.onChange)||void 0===n?void 0:n.call(e,"number"==typeof e.value?Number(r):r.toString())},options:e.options,disabledOptions:e.disabledOptions,isInvalid:e.isInvalid,isDisabled:e.isDisabled});case"switch":return i.jsx(ke,{isChecked:e.isChecked,isDisabled:e.isDisabled,onChange:function(t){var n,r=t.target.checked;return null===(n=e.onChange)||void 0===n?void 0:n.call(e,r)}});case"custom":return e.component;default:return i.jsx("div",{})}}(e)},t)}))})}var El=function(){return El=Object.assign||function(e){for(var t,n=1,r=arguments.length;n span:last-of-type":{position:"absolute",right:8}},"& .rmg-multi-select__icon-wrapper":{display:"inline-flex",justifyContent:"center",w:6,h:"100%",position:"absolute",right:2,top:0,fontSize:"xl","& svg":{h:"1em",w:"1em"}},"& .chakra-popover__content":{w:"unset",minW:200},"& .chakra-popover__body":{p:0,"li label":{p:2,w:"100%",_hover:{bg:"dark"===n?"whiteAlpha.200":"gray.100"},_active:{bg:"dark"===n?"whiteAlpha.300":"gray.200"}}}}}},Vl=function(){return Vl=Object.assign||function(e){for(var t,n=1,r=arguments.length;n button:first-of-type":{ml:1}}},RmgLoader:{baseStyle:{w:"100%",h:"100%",position:"absolute",top:0,right:0,alignItems:"center",justifyContent:"center","& .rmg-loader__backdrop":{position:"absolute",w:"100%",h:"100%",zIndex:1500,bg:"blackAlpha.400"},"& .chakra-progress":{zIndex:2e3}}},RmgMultiSelect:Wl,RmgOutput:Jl,RmgPage:{baseStyle:{position:"relative",flexDirection:"column",flex:1,overflow:"hidden",background:"inherit"}},RmgPageHeader:{baseStyle:{alignItems:"center",flexWrap:"wrap",pl:2,pr:3,py:1,zIndex:10}},RmgSection:{baseStyle:{position:"relative",background:"inherit"}},RmgSectionHeader:{baseStyle:{display:"flex",alignItems:"center",flexWrap:"wrap",position:"sticky",top:0,background:"inherit",px:2,py:1,zIndex:5}},RmgSidePanel:{baseStyle:function(e){var t=e.colorMode,n=e.width,r=e.alwaysOverlay;return{height:"100%",position:r?"absolute":{base:"absolute",lg:"relative"},right:r?0:{base:0,lg:"unset"},background:"light"===t?"white":"gray.800",boxShadow:"lg",flexShrink:0,flexDirection:"column",transition:"0.3s ease-in-out",maxW:0,visibility:"hidden",zIndex:5,"&.show-side-panel":{maxW:{base:"100%",sm:n},w:{base:"100%",sm:"unset"},visibility:"initial"},"& .rmg-side-panel__inner":{flexDirection:"column",h:"100%",w:{base:"100vw",sm:n}},"& .rmg-side-panel__header":{flexShrink:0,pl:3,pr:1,py:0,"& button":{ml:"auto"}},"& .rmg-side-panel__body":{display:"flex",flexDirection:"column",flex:1,overflowY:"auto",p:1},"& .rmg-side-panel__footer":{display:"flex",justifyContent:"flex-end",p:1}}}},RmgThrottledSlider:{baseStyle:{h:6,alignItems:"center","& .chakra-button:first-of-type":{mr:1},"& .chakra-button:last-of-type":{ml:1}}},RmgWindow:{baseStyle:{position:"relative",flexDirection:"column",height:"100%",overflow:"hidden",background:"inherit"}},RmgWindowHeader:{baseStyle:{px:2,alignItems:"center",zIndex:15,minH:10,transition:"0.3s ease-in-out"}}},Kl=function(){return Kl=Object.assign||function(e){for(var t,n=1,r=arguments.length;n(e.RailMap="railmap",e.Platform="platform",e))(tc||{})),nc=e("aR",(e=>(e.Metro="metro",e.NationalRail="nationalrail",e.LightRail="lightrail",e.Footpath="footpath",e))(nc||{})),rc=e("E",(e=>(e.APP_LOAD="APP_LOAD",e.ADD_STATION="ADD_STATION",e.ADD_LINE="ADD_LINE",e.IMPORT_RMG_PARAM="IMPORT_RMG_PARAM",e.IMPORT_WORK_FROM_GALLERY="IMPORT_WORK_FROM_GALLERY",e.DOWNLOAD_PARAM="DOWNLOAD_PARAM",e.DOWNLOAD_IMAGES="DOWNLOAD_IMAGES",e.LOAD_TUTORIAL="LOAD_TUTORIAL",e))(rc||{})),oc=e("K",(e=>(e.LOGIN_STATE="rmp__login_state",e.APP="rmp__app",e.PARAM="rmp__param",e.PARAM_BACKUP="rmp__param__backup",e.DO_NOT_SHOW_RMT_MSG="rmp__doNotShowRMTMsg",e.ACCOUNT="rmg-home__account",e))(oc||{})),ic=e("C",(e=>(e.Other="other",e.Beijing="beijing",e.Berlin="berlin",e.Chongqing="chongqing",e.Foshan="foshan",e.Guangzhou="guangzhou",e.Hongkong="hongkong",e.Kunming="kunming",e.London="london",e.Qingdao="qingdao",e.Shanghai="shanghai",e.Shenzhen="shenzhen",e.Singapore="singapore",e.Suzhou="suzhou",e.Tokyo="tokyo",e))(ic||{}));const ac={RMP_CLOUD:!1,RMP_EXPORT:!1},sc=Ie({name:"account",initialState:{state:"logged-out",activeSubscriptions:ac,timeout:void 0},reducers:{setState:(e,t)=>{e.state=t.payload},setActiveSubscriptions:(e,t)=>{e.activeSubscriptions=t.payload},setLoginStateTimeout:(e,t)=>{e.timeout=t.payload}}}),{setState:lc,setActiveSubscriptions:cc,setLoginStateTimeout:dc}=sc.actions,uc=sc.reducer;var pc;e("M",pc),function(e){e.black="#000",e.white="#fff"}(pc||e("M",pc={}));var hc=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(Op){i(Op)}}function s(e){try{l(r.throw(e))}catch(Op){i(Op)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};let gc={};const fc=(e,t)=>hc(void 0,void 0,void 0,(function*(){return yield((e,t)=>hc(void 0,void 0,void 0,(function*(){if(e in gc)return gc[e];const n=yield fetch(e,t),r=yield n.json();return gc[e]=r,r})))(`/rmg-palette/resources/palettes/${e}.json`,{signal:t})}));var mc=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(Op){i(Op)}}function s(e){try{l(r.throw(e))}catch(Op){i(Op)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};e("Y",((e,t,n)=>mc(void 0,void 0,void 0,(function*(){const[t,n]=e;if("other"===t)return e;try{const r=(yield fc(t)).find((e=>e.id===n));return r?[t,n,r.colour,r.fg||pc.white]:(console.warn(`[rmg-palette] updateTheme(${t}, ${n}), line does not exist, returning old theme`),e)}catch(Op){throw console.error(`[rmg-palette] updateTheme(${t}, ${n}), unexpected error occurs`,Op),Op}})))),e("ar",(e=>{const t=e.currentTarget.getBoundingClientRect();return{x:e.clientX-t.left,y:e.clientY-t.top}})),e("U",((e,t,n,r)=>({x:e*n/100+r.x,y:t*n/100+r.y}))),e("av",((e,t)=>Math.round(e/t)*t)),e("e",(e=>{let[t,n,r,o]=[Number.MAX_VALUE,Number.MAX_VALUE,Number.MIN_VALUE,Number.MIN_VALUE];return e.forEachNode(((e,i)=>{const a=document.getElementById(e);if(a){const e=yc(a);t=Math.min(e.x,t),n=Math.min(e.y,n),r=Math.max(e.x+e.width,r),o=Math.max(e.y+e.height,o)}})),t-=50,n-=50,r+=100,o+=100,{xMin:t,yMin:n,xMax:r,yMax:o}})),e("p",(e=>{var t,n;return{width:(null!==(t=e.width)&&void 0!==t?t:720)-40,height:(null!==(n=e.height)&&void 0!==n?n:1280)-40}}));const yc=e=>{const t=e.getBBox(),n=e.ownerSVGElement,r=e.parentNode.getScreenCTM().inverse().multiply(e.getScreenCTM()),o=[n.createSVGPoint(),n.createSVGPoint(),n.createSVGPoint(),n.createSVGPoint()];o[0].x=t.x,o[0].y=t.y,o[1].x=t.x+t.width,o[1].y=t.y,o[2].x=t.x+t.width,o[2].y=t.y+t.height,o[3].x=t.x,o[3].y=t.y+t.height;let[i,a,s,l]=[Number.MAX_VALUE,Number.MAX_VALUE,Number.MIN_VALUE,Number.MIN_VALUE];return o.forEach((e=>{e=e.matrixTransform(r),i=Math.min(i,e.x),s=Math.max(s,e.x),a=Math.min(a,e.y),l=Math.max(l,e.y)})),t.x=i,t.width=s-i,t.y=a,t.height=l-a,t};e("a8",navigator.platform.startsWith("Mac")),e("aZ",(()=>`#${Math.floor(16777215*Math.random()).toString(16).padStart(6,"0")}`)),e("a_",(e=>(299*parseInt(e.slice(1,3),16)+587*parseInt(e.slice(3,5),16)+114*parseInt(e.slice(5,7),16))/1e3>=128?pc.black:pc.white));var bc=e("J",(e=>(e.SAVE_CHANGED="SAVE_CHANGED",e.TOKEN_REQUEST="TOKEN_REQUEST",e))(bc||{}));const vc=e("B",new BroadcastChannel("rmt-save-manager"));let wc;const xc=async e=>{const t=await(async(e,t="SHA-256")=>{const n=(new TextEncoder).encode(e),r=await crypto.subtle.digest(t,n);return Array.from(new Uint8Array(r)).map((e=>e.toString(16).padStart(2,"0"))).join("")})(JSON.stringify(e));wc&&wc!==t&&vc.postMessage({type:"SAVE_CHANGED",key:oc.PARAM,from:"rmp"}),wc=t},Sc=e("_",(async()=>{vc.postMessage({type:"TOKEN_REQUEST",from:"rmp"})}));let kc=e("n",((e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&n[e]];return t}));var Nc=e("k",(e=>(e.Diagonal="diagonal",e.Perpendicular="perpendicular",e.RotatePerpendicular="ro-perp",e.Simple="simple",e))(Nc||{})),_c=e("o",(e=>(e.SingleColor="single-color",e.ShanghaiSuburbanRailway="sh-sub-rwy",e.ShmetroVirtualInt="shmetro-virtual-int",e.GzmtrVirtualInt="gzmtr-virtual-int",e.ChinaRailway="china-railway",e.BjsubwaySingleColor="bjsubway-single-color",e.BjsubwayTram="bjsubway-tram",e.BjsubwayDotted="bjsubway-dotted",e.DualColor="dual-color",e.River="river",e.MTRRaceDays="mtr-race-days",e.MTRLightRail="mtr-light-rail",e.MTRUnpaidArea="mtr-unpaid-area",e.MTRPaidArea="mtr-paid-area",e.MRTUnderConstruction="mrt-under-constr",e.MRTSentosaExpress="mrt-sentosa-express",e.JREastSingleColor="jr-east-single-color",e.JREastSingleColorPattern="jr-east-single-color-pattern",e.LRTSingleColor="lrt-single-color",e.LondonTubeTerminal="london-tube-terminal",e.LondonTubeInternalInt="london-tube-internal-int",e.LondonTube10MinWalk="london-tube-10-min-walk",e.GuangdongIntercityRailway="gd-intercity-rwy",e))(_c||{}));e("L",["single-color","bjsubway-single-color","bjsubway-tram","bjsubway-dotted","china-railway","mtr-race-days","mtr-light-rail","mrt-under-constr","jr-east-single-color","jr-east-single-color-pattern","lrt-single-color"]);const Rc={offset:0},Tc={generatePath:(e,t,n,r,o=Rc)=>{const{offset:i=Rc.offset}=o,a=Math.abs((r-n)/(t-e));if(a===1/0)return`M ${e+i} ${n} L ${t+i} ${r}`;if(0===a)return`M ${e} ${n+i} L ${t} ${r+i}`;{const o=1/a,s=i/Math.sqrt(o*o+1),l=s*o*-Math.sign((t-e)*(r-n));return`M ${e+s} ${n+l} L ${t+s} ${r+l}`}},icon:i.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:i.jsx("path",{d:"M6,18L18,6",stroke:"currentColor",fill:"none"})}),defaultAttrs:Rc,attrsComponent:e=>{var t;const{id:n,attrs:r,handleAttrsUpdate:o}=e,{t:a}=$e(),s=[{type:"input",label:a("panel.details.lines.simple.offset"),value:(null!==(t=r.offset)&&void 0!==t?t:Rc.offset).toString(),variant:"number",onChange:e=>{r.offset=Number(e),o(n,r)},minW:"full"}];return i.jsx(Al,{fields:s})},metadata:{displayName:"panel.details.lines.simple.displayName"}},Cc=(e("aO",{translateX:0,translateY:0,scale:1,rotate:0}),e("ay",3));var jc=e("aw",(e=>(e.Virtual="virtual",e.ShmetroNumLineBadge="shmetro-num-line-badge",e.ShmetroTextLineBadge="shmetro-text-line-badge",e.GzmtrLineBadge="gzmtr-line-badge",e.BjsubwayNumLineBadge="bjsubway-num-line-badge",e.BjsubwayTextLineBadge="bjsubway-text-line-badge",e.SuzhouRTNumLineBadge="suzhourt-num-line-badge",e.BerlinSBahnLineBadge="berlin-s-bahn-line-badge",e.BerlinUBahnLineBadge="berlin-u-bahn-line-badge",e.ChongqingRTNumLineBadge="chongqingrt-num-line-badge",e.ChongqingRTTextLineBadge="chongqingrt-text-line-badge",e.ShenzhenMetroNumLineBadge="shenzhen-metro-num-line-badge",e.MRTDestinationNumbers="mrt-num-line-badge",e.JREastLineBadge="jr-east-line-badge",e.QingdaoMetroNumLineBadge="qingdao-metro-num-line-badge",e.MRTLineBadge="mrt-line-badge",e.GuangdongIntercityRailwayLineBadge="gd-intercity-rwy-line-badge",e.Facilities="facilities",e.Text="text",e.I18nText="i18n-text",e.Master="master",e))(jc||{})),Oc={en:{},"zh-Hans":{Action:"操作",Apps:"应用程序","Back to list":"返回列表","Background colour":"背景色",Black:"黑",Cancel:"取消",City:"城市",Components:"组件","Configuration file":"配置文件",Confirm:"确定",Continue:"继续","Country/Region":"国家/地区",Copy:"复制",Edit:"编辑","Foreground colour":"前景色","Go back":"返回",Language:"语言/Language",Justification:"理由",Name:"名称",Next:"下一步",Open:"打开",Palette:"调色板","Please select...":"请选择...",Previous:"上一步","Rail Map Generator":"铁路线路图生成器","Rail Map Painter":"地铁线路图绘制器","Rail Map Toolkit":"线路图工具包",Remove:"删除",Reset:"重置","RMG Templates":"RMG 模板","RMP Gallery":"RMP 画廊","RMP Designer":"RMP 设计师","Seed Project":"种子项目",Settings:"设置",Submit:"提交",Translate:"翻译",Upload:"上传",White:"白"},"zh-Hant":{Action:"動作",Apps:"應用程式","Back to list":"返回列表","Background colour":"背景色",Black:"黑",Cancel:"取消",City:"城市",Components:"元件","Configuration file":"設定檔",Confirm:"確定",Continue:"繼續",Copy:"複製","Country/Region":"國家/地區",Edit:"編輯","Foreground colour":"前景色","Go back":"返回",Language:"語言/Language",Justification:"理由",Name:"名稱",Next:"下一步",Open:"開啟",Palette:"調色盤","Please select...":"請選擇...",Previous:"上一步","Rail Map Generator":"鐵路路綫圖產生器","Rail Map Painter":"地鐵路綫圖繪製器","Rail Map Toolkit":"路綫圖工具組",Remove:"移除",Reset:"重設","RMG Templates":"RMG 範本","RMP Gallery":"RMP 畫廊","RMP Designer":"RMP 設計師","Seed Project":"種子項目",Settings:"設定",Submit:"提交",Translate:"翻譯",Upload:"上載",White:"白"},ja:{Language:"言語/Language",Palette:"調色板","Rail Map Generator":"鉄道路線図ジェネレータ","Rail Map Painter":"鉄道路線図画家","Rail Map Toolkit":"路線図ツールキット",Remove:"削除","RMG Templates":"RMG テンプレート","RMP Gallery":"RMP 画廊","RMP Designer":"RMP 図案家"},ko:{Action:"조작",Apps:"앱","Back to list":"다시 목록으로","Background colour":"배경색",Black:"블랙",Cancel:"취소",City:"도시",Components:"요소","Configuration file":"환경 설정 파일",Confirm:"확인",Copy:"복사","Country/Region":"국가/지역",Edit:"편집","Foreground colour":"전경색","Go back":"되돌아가",Language:"언어/Language",Justification:"이유",Name:"명칭",Next:"다음",Open:"열기",Palette:"팔레트","Please select...":"선택해주세요",Previous:"나아가","Rail Map Generator":"철도 노선도 생성기","Rail Map Painter":"지하철 노선도 그리기","Rail Map Toolkit":"노선도 툴킷",Remove:"삭제",Reset:"리셋","RMG Templates":"RMG 템플릿","RMP Gallery":"RMP 갤러리","RMP Designer":"RMP 디자이너","Seed Project":"종자 프로젝트",Settings:"설치",Submit:"제출",Translate:"번역",Upload:"업로드",White:"화이트"}};const Lc={color:"Color",warning:"Warning",cancel:"Cancel",apply:"Apply",remove:"Remove",close:"Close",noShowAgain:"Don't show me again",rmtPromotion:"The all-in-one toolkit you definitely do not want to miss!",panel:{tools:{showLess:"Show less",section:{lineDrawing:"Line drawing",stations:"Stations",miscellaneousNodes:"Miscellaneous nodes"},select:"Select",learnHowToAdd:{station:"Learn how to add your stations!","misc-node":"Learn how to add your nodes!",line:"Learn how to add your line styles!"}},details:{header:"Details",info:{title:"Basic information",id:"ID",zIndex:"Depth",stationType:"Station Type",linePathType:"Line Path Type",lineStyleType:"Line Style Type",type:"Type",parallel:"Parallel line",parallelIndex:"Parallel index"},multipleSelection:{title:"Multiple Selection",change:"Change selected attributes",selected:"Selected Objects:",show:"Show",station:"Stations",miscNode:"MiscNodes",edge:"Lines"},changeStationTypeContent:"Changing station's type will remove all attributes from the station except its names.",changeLineTypeContent:"Changing line's type will remove all attributes from the line.",changeType:"Change Type",nodePosition:{title:"Node Position",pos:{x:"Coordinate X",y:"Coordinate Y"}},lineExtremities:{title:"Line Extremities",source:"Source",target:"Target",sourceName:"Source Name",targetName:"Target Name"},specificAttrsTitle:"Specific Attributes",unknown:{error:"Oops :( We can't recognize this {{category}}. Maybe it is created in a newer version.",node:"node",linePath:"line path",lineStyle:"line style"},nodes:{common:{nameZh:"Line name in Chinese",nameEn:"Line name in English",nameJa:"Line name in Japanese",num:"Line number"},virtual:{displayName:"Virtual node"},shmetroNumLineBadge:{displayName:"Shanghai Metro num line badge"},shmetroTextLineBadge:{displayName:"Shanghai Metro text line badge"},gzmtrLineBadge:{displayName:"Guangzhou Metro line badge",tram:"Tram",span:"Row-spanning digits"},bjsubwayNumLineBadge:{displayName:"Beijing Subway num line badge"},bjsubwayTextLineBadge:{displayName:"Beijing Subway text line badge"},berlinSBahnLineBadge:{displayName:"Berlin S Bahn line badge"},berlinUBahnLineBadge:{displayName:"Berlin U Bahn line badge"},suzhouRTNumLineBadge:{displayName:"Suzhou Rail Transit num line badge",branch:"Is branch line"},chongqingRTNumLineBadge:{displayName:"Chongqing Rail Transit num line badge"},chongqingRTTextLineBadge:{displayName:"Chongqing Rail Transit text line badge"},shenzhenMetroNumLineBadge:{displayName:"Shenzhen Metro num line badge",branch:"Is branch line"},mrtDestinationNumbers:{displayName:"Singapore MRT destination numbers"},mrtLineBadge:{displayName:"Singapore MRT line badge",isTram:"Is LRT line badge"},jrEastLineBadge:{displayName:"JR East line badge",crosshatchPatternFill:"Fill with crosshatch pattern"},qingdaoMetroNumLineBadge:{displayName:"Qingdao Metro Num line badge",numEn:"Line number in English",showText:"Show text"},guangdongIntercityRailwayLineBadge:{displayName:"Guangdong Intercity Railway line badge"},master:{displayName:"Master node",type:"Master node type",undefined:"Undefined"},facilities:{displayName:"Facilities",type:"Type"},text:{displayName:"Arbitrary text",content:"Content",fontSize:"Font size",lineHeight:"Line height",textAnchor:"Text anchor",start:"Start",middle:"Middle",end:"End",auto:"Auto",hanging:"Hanging",dominantBaseline:"Dominant baseline",language:"Font family in which language",zh:"Chinese",en:"English",mtr__zh:"Hongkong MTR Chinese",mtr__en:"Hongkong MTR English",berlin:"Berlin S/U Bahn",mrt:"Singapore MRT",jreast_ja:"JR East Japanese",jreast_en:"JR East English",rotate:"Rotation",italic:"Italic",bold:"Bold"}},stations:{common:{nameZh:"Names in Chinese",nameEn:"Names in English",nameJa:"Names in Japanese",nameOffsetX:"Names offset X",nameOffsetY:"Names offset Y",rotate:"Icon rotation",lineCode:"Line code",stationCode:"Station code",left:"Left",middle:"Middle",right:"Right",top:"Top",bottom:"Bottom"},interchange:{title:"Interchanges",within:"Within-station interchange",outStation:"Out-of-station interchange",outSystem:"Out-of-system interchange",addGroup:"Add interchange group",noInterchanges:"No interchanges",nameZh:"Chinese name",nameEn:"English name",add:"Add interchange",copy:"Copy interchange",remove:"Remove interchange"},shmetroBasic:{displayName:"Shanghai Metro basic station"},shmetroBasic2020:{displayName:"Shanghai Metro basic station (2020)"},shmetroInt:{displayName:"Shanghai Metro interchange station",height:"Icon height",width:"Icon width"},shmetroOsysi:{displayName:"Shanghai Metro out-of-system interchange station"},shanghaiSuburbanRailway:{displayName:"Shanghai Suburban Railway station"},gzmtrBasic:{displayName:"Guangzhou Metro basic station",open:"Is opened",secondaryNameZh:"Secondary name in Chinese",secondaryNameEn:"Secondary name in English",tram:"Tram"},gzmtrInt:{displayName:"Guangzhou Metro interchange station",open:"Is opened",secondaryNameZh:"Secondary name in Chinese",secondaryNameEn:"Secondary name in English",foshan:"Foshan"},gzmtrInt2024:{displayName:"Guangzhou Metro interchange station (2024)",anchorAt:"Anchor at",anchorAtNone:"Center",preferVertical:"Vertical layout (2 interchanges only)"},bjsubwayBasic:{displayName:"Beijing Subway basic station",open:"Is opened"},bjsubwayInt:{displayName:"Beijing Subway interchange station",outOfStation:"Out of station interchange"},mtr:{displayName:"Hongkong MTR station",rotate:"Icon rotation"},suzhouRTBasic:{displayName:"Suzhou Rail Transit basic station",textVertical:"Vertical names"},suzhouRTInt:{displayName:"Suzhou Rail Transit interchange station"},kunmingRTBasic:{displayName:"Kunming Rail Transit basic station"},kunmingRTInt:{displayName:"Kunming Rail Transit interchange station"},MRTBasic:{displayName:"Singapore MRT basic station",isTram:"Is LRT station"},MRTInt:{displayName:"Singapore MRT interchange station"},jrEastBasic:{displayName:"JR East basic station",nameOffset:"Names offset",textOneLine:"Names in one line",textVertical:"Vertical names",important:"Important station",lines:"Interchange lines offset"},jrEastImportant:{displayName:"JR East important station",textVertical:"Vertical names",mostImportant:"Most important station",minLength:"Minimal length of the station"},foshanMetroBasic:{displayName:"Foshan Metro basic station",open:"Is opened",secondaryNameZh:"Secondary name in Chinese",secondaryNameEn:"Secondary name in English",tram:"Tram"},qingdaoMetro:{displayName:"Qingdao Metro station",isInt:"Is interchange station"},tokyoMetroBasic:{displayName:"Tokyo Metro basic station",nameOffset:"Names offset",textVertical:"Vertical names",lineCode:"Line code",stationCode:"Station code"},tokyoMetroInt:{displayName:"Tokyo Metro interchange station",mereOffset:{displayName:"Names mere offset",none:"None",left1:"Left (less)",left2:"Left (more)",right1:"Right (less)",right2:"Right (more)",up:"Up",down:"Down"},importance:{displayName:"Station importance",default:"Default",middle:"Middle",high:"High"},align:{displayName:"Icon align",horizontal:"Horizontal",vertical:"Vertical"}},londonTubeCommon:{stepFreeAccess:"Step free access",stepFreeAccessNone:"None",stepFreeAccessTrain:"From street to train",stepFreeAccessPlatform:"From street to platform"},londonTubeBasic:{displayName:"London Tube basic station",terminal:"Terminal station",shareTracks:"Track shares",shareTracksIndex:"Index of the track shares"},londonTubeInt:{displayName:"London Tube interchange station"},guangdongIntercityRailway:{displayName:"Guangdong Intercity Railway station"}},lines:{reconcileId:"Reconcile ID",common:{offsetFrom:"Offset From",offsetTo:"Offset To",startFrom:"Start From",from:"From",to:"To",roundCornerFactor:"Round Corner Factor",parallelDisabled:"Some attributes are disabled as this line is parallel.",changeInBaseLine:"Change them in the base line:"},simple:{displayName:"Simple path",offset:"Offset"},diagonal:{displayName:"135° diagonal path"},perpendicular:{displayName:"90° perpendicular path"},rotatePerpendicular:{displayName:"90° rotate perpendicular path"},singleColor:{displayName:"Single color style"},shmetroVirtualInt:{displayName:"Shanghai Metro out-of-station interchange style"},shanghaiSuburbanRailway:{displayName:"Shanghai Suburban Railway style",isEnd:"Is the ending line"},gzmtrVirtualInt:{displayName:"Guangzhou Metro out-of-station interchange style"},chinaRailway:{displayName:"China Railway style"},bjsubwaySingleColor:{displayName:"Beijing Subway single color style"},bjsubwayTram:{displayName:"Beijing Subway tram style"},bjsubwayDotted:{displayName:"Beijing Subway dotted style"},dualColor:{displayName:"Dual color style",swap:"Swap color",colorA:"Color A",colorB:"Color B"},river:{displayName:"River style",width:"Width"},mtrRaceDays:{displayName:"Hongkong MTR race days style"},mtrLightRail:{displayName:"Hongkong MTR light rail style"},mtrUnpaidArea:{displayName:"Hongkong MTR unpaid area style"},mtrPaidArea:{displayName:"Hongkong MTR paid area style"},mrtUnderConstruction:{displayName:"Singapore MRT under construction style"},mrtSentosaExpress:{displayName:"Singapore MRT Sentosa Express style"},jrEastSingleColor:{displayName:"JR East single color style"},jrEastSingleColorPattern:{displayName:"JR East single color filled with crosshatch pattern style"},lrtSingleColor:{displayName:"Singapore LRT single color style"},londonTubeInternalInt:{displayName:"London Tube internal interchange style"},londonTube10MinWalk:{displayName:"London Tube under a 10 minute walk interchange style"},londonTubeTerminal:{displayName:"London Tube terminal style"},guangdongIntercityRailway:{displayName:"Guangdong Intercity Railway style"}},edge:{},footer:{duplicate:"Duplicate",copy:"Copy",remove:"Remove"}}},header:{popoverHeader:"You're on <1>{{environment}} environment!",popoverBody:"We are currently testing the latest RMP. If you have any suggestions, feel free to raise at https://github.com/railmapgen/rmp/issues",search:"Search stations",open:{new:"New project",config:"Import project",projectRMG:"Import from RMG project",invalidType:"Invalid file type! Only file in JSON format is accepted.",unknownError:"Unknown error occurred while parsing the uploaded file! Please try again.",gallery:"Import from Gallery",tutorial:"Start tutorial",importFromRMPGallery:"Template {{id}} imported. Not satisfied with this change? Undo via Ctrl + Z or the undo button.",failToImportFromRMPGallery:"Fail to import {{id}} from the gallery. The file can not be found."},download:{config:"Export project",image:"Export image","2rmg":{title:"Export to RMG project",type:{line:"Line",loop:"Loop",branch:"Branch"},placeholder:{chinese:"Chinese name",english:"English name",lineCode:"Line code"},info1:"This function is designed to convert the RMP project into RMG projects.",info2:"The lines in the list following are the available lines for converting. You can enter the Chinese line name in the text box on the left, the English line name in the middle, the line code (for Guangzhou Metro style) on the right, and then click the download button on the right to save your RMG projects.",noline:"No available lines found.",download:"Download",downloadInfo:"Please select one of the following stations as the starting station and click it to download."},format:"Format",png:"PNG",svg:"SVG",svgVersion:"Version","svg1.1":"1.1 (Compatible with Adobe Illustrator)",svg2:"2 (Compatible with modern browsers)",transparent:"Transparency",scale:"Scale",disabledScaleOptions:"Some scale options are disabled due to your browser's canvas limitation.",disabledScaleOptionsWorkarounds:"Possible workarounds include generating the image from svg using this cli tool: ",imageTooBig:"The image is too big for your browser to generate!",useSystemFonts:"Use system fonts instead of fonts previewed in the canvas",shareInfo1:"I will attach ",shareInfo2:" and its link when I share this image.",termsAndConditions:"Terms and Conditions",termsAndConditionsInfo:"I agree to ",period:".",confirm:"Download"},donation:{title:"Donation",openCollective:"Open Collective",viaUSD:"Donate in USD via Paypal or Visa card.",afdian:"爱发电",viaCNY:"Donate in CNY via Alipay or Wechat Pay."},settings:{title:"Settings",pro:"This is a PRO feature and an account with a subscription is required.",proWithTrial:"This is a PRO feature with a limited free trial available.",proLimitExceed:{master:"Master nodes exceed the free tier.",parallel:"Parallel lines exceed the free tier.",solution:"Remove them to dismiss this warning, or subscribe to unlock more!"},subscription:{title:"Subscription Status","logged-out":"You are currently logged out.",free:"Logged In! Subscribe to unlock more features!",subscriber:"Thanks for your subscription! Enjoy all features!",expired:"Login status expired. Please log out and log in again."},preference:{title:"Preference",keepLastPath:"Keep drawing lines until clicking on the background in the next move",autoParallel:"Automatically set new lines to be parallel to existing lines"},shortcuts:{title:"Shortcuts",keys:"Keys",description:"Description",f:"Use the last tool.",s:"Select.",arrows:"Move the canvas a little bit.",ijkl:"Move the selected station(s) a little bit.",shift:"Multiple selection.",alt:"Precise movement.",delete:"Delete the selected station(s).",cut:"Cut.",copy:"Copy.",paste:"Paste.",undo:"Undo.",redo:"Redo."},procedures:{title:"Procedures",translate:{title:"Translate nodes' coordinates",content:"Add the following offset to all nodes' x and y:",x:"X axis",y:"Y axis"},scale:{title:"Scale nodes' coordinates",content:"Multiply the following value to all nodes' x and y:",factor:"Scale factor"},changeType:{title:"Change all objects' attributes",any:"Any"},changeZIndex:"Change depth in batch",changeStationType:{title:"Change stations type in batch",changeFrom:"Change all stations from this type:",changeTo:"To this type:",info:"Changing stations' type will remove all specific attributes from stations except their position and names. SAVE BEFORE CHANGE!"},changeLineStyleType:{title:"Change lines style in batch",changeFrom:"Change all lines from this style:",changeTo:"To this style:",info:"Changing lines' style will remove all specific attributes from lines except their connections. SAVE BEFORE CHANGE!"},changeLinePathType:{title:"Change lines path in batch",changeFrom:"Change all lines from this path:",changeTo:"To this path:"},changeColor:{title:"Change color in batch",changeFrom:"Change all objects from this color:",changeTo:"To this color:",any:"From any color"},removeLines:{title:"Remove lines with single color",content:"Remove lines that have this color: "},updateColor:{title:"Update color",content:"Update all colors with their latest value.",success:"Successfully update all colors.",error:"Error in updating all colors: {{e}}."},unlockSimplePath:{title:"Unlock simple path",content1:"The Rail Map Painter application endeavors to offer an interactive platform conducive to the creation of rail maps while adhering to established conventions. Among these conventions, one particularly renowned style finds its origins in the innovative work of Harry Beck. His pioneering contribution, officially endorsed in the year 1932, garnered instantaneous acclaim from the general populace. Presently, it stands as an exemplar of paramount significance within the realm of information design. This paradigmatic approach has found widespread implementation in transit cartography on a global scale, albeit with varying degrees of success.",content2:"The application inherently conceals the option to utilize a simple path, as its deployment has the potential to contravene established conventions. This particular feature remains discreetly tucked away by default. Additionally, submissions to the Rail Map Painter Gallery are subject to stringent scrutiny, with a categorical rejection of compositions that employ the simple path with a single color style approach.",content3:"Still, we reserve the opportunity to unlock this option and use the simple path when you subscribe. It should be noted that even after acquisition, the use of simple path is limited to single color.",check:"Unlock",unlocked:"Already Unlocked"},masterManager:{title:"Manage all master nodes",id:"Id",label:"Label",type:"Type",types:{MiscNode:"MiscNode",Station:"Station"},importTitle:"Upload master parameter",importFrom:"Use imported styles",importOther:"Import new style",importParam:"Paste configuration"}},telemetry:{title:"Telemetry",info:"To help improve Rail Map Painter and keep contributors motivated to enhance the project, anonymous usage data is collected through Google Analytics. This data is used solely for enhancing the user experience and optimizing the tool's functionality and is never shared with third parties.",essential:"Basic",essentialTooltip:"Change this global setting in Rail Map Toolkit",essentialInfo:"Rail Map Painter collects essential usage data that helps us understand how and when users interact with the tool. Rest assured, no personally identifiable information or data from your projects is ever collected.",essentialLink:"Click this link to see detailed fields that Google Analytics may collect.",additional:"Additional",additionalInfo:"Rail Map Painter also gathers data on interactions, such as project creation or station addition, when you input. These additional data is also anonymous and are only used for statistical analysis to help us make the tool better."}},about:{title:"About",rmp:"Rail Map Painter",railmapgen:"A Rail Map Toolkit project",desc:"Design your own rail map by freely dragging stations from different cities and connecting them with 90 or 135-degree rounded corners lines!",content1:"In memory of all the freedom and equality we once had.",content2:"06/01/2022 in Shanghai",contributors:"Contributors",coreContributors:"Core Contributors",styleContributors:"Style Contributors",langonginc:"Live a life you will remember.","203IhzElttil":"Special thanks for his diligent work in ensuring that the stations of Shanghai Metro match the original design.",Swiftiecott:"Special thanks for his diligent work in ensuring that the stations of Beijing Subway match the original design.",Minwtraft:"Special thanks for his diligent work in ensuring that the stations of Guangzhou Metro match the original design.",contactUs:"Contact Us",github:"Project repository",githubContent:"Face any problems? Search or raise an issue here!",slack:"Slack group",slackContent:"Chat in these Slack channels!"}}},Ac={colorA:"Color A",colorB:"Color B",color:"カラー",warning:"警告",cancel:"キャンセル",apply:"適用",remove:"削除",close:"閉じる",noShowAgain:"次回表示しない",rmtPromotion:"絶対に見逃せないオールインワンツールキット!",panel:{tools:{showLess:"表示を減らす",section:{lineDrawing:"路線描画",stations:"駅",miscellaneousNodes:"その他の節点"},select:"選択する",learnHowToAdd:{station:"駅を追加する方法を学ぶ!","misc-node":"節点を追加する方法を学ぶ!",line:"路線風格を追加する方法を学ぶ!"}},details:{header:"詳細",info:{title:"基本情報",id:"ID",zIndex:"深度",stationType:"駅の種類",linePathType:"路線経路の種類",lineStyleType:"路線風格の種類",type:"種類",parallel:"平行路線",parallelIndex:"平行路線索引"},multipleSelection:{title:"複数選択",change:"選択した属性を変更する",selected:"選択されたオブジェクト:",show:"見せる",station:"駅",miscNode:"その他のノード",edge:"ライン"},changeStationTypeContent:"駅の種類を変更すると、駅の名前以外のすべての属性が削除されます。",changeLineTypeContent:"路線の種類を変更すると、すべての属性が削除されます。",changeType:"種類を変更",nodePosition:{title:"節点の位置",pos:{x:"X座標",y:"Y座標"}},lineExtremities:{title:"路線の端点",source:"出発点",target:"到着点",sourceName:"出発点名",targetName:"到着点名"},specificAttrsTitle:"特定の属性",unknown:{error:"おっと :( これは{{category}}を認識できません。おそらくそれは新しいバージョンで作成されました。",node:"節点",linePath:"路線経路",lineStyle:"路線風格"},nodes:{common:{nameZh:"中国語の路線名",nameEn:"英語の路線名",nameJa:"日本語の路線名",num:"路線番号"},virtual:{displayName:"仮想節点"},shmetroNumLineBadge:{displayName:"上海地下鉄路線番号徽章"},shmetroTextLineBadge:{displayName:"上海地下鉄テキスト路線徽章"},gzmtrLineBadge:{displayName:"広州地下鉄路線徽章",tram:"路面電車",span:"行にまたがる数字"},bjsubwayNumLineBadge:{displayName:"北京地下鉄路線番号徽章"},bjsubwayTextLineBadge:{displayName:"北京地下鉄テキスト路線徽章"},berlinSBahnLineBadge:{displayName:"ベルリンSバーン番号徽章"},berlinUBahnLineBadge:{displayName:"ベルリン地下鉄番号徽章"},suzhouRTNumLineBadge:{displayName:"蘇州軌道交通路線番号徽章",branch:"支線"},chongqingRTNumLineBadge:{displayName:"重慶鉄道交通路線番号徽章"},chongqingRTTextLineBadge:{displayName:"重慶鉄道交通テキスト路線徽章"},shenzhenMetroNumLineBadge:{displayName:"深セン地下鉄路線番号徽章",branch:"支線"},mrtDestinationNumbers:{displayName:"シンガポールMRTの目的地番号"},mrtLineBadge:{displayName:"シンガポールMRT路線バッジ",isTram:"LRT路線バッジです"},jrEastLineBadge:{displayName:"JR東日本路線番号徽章",crosshatchPatternFill:"網目模様で塗りつぶす"},qingdaoMetroNumLineBadge:{displayName:"青島地下鉄番号線徽章",numEn:"英語の行番号",showText:"テキストを表示"},guangdongIntercityRailwayLineBadge:{displayName:"広東省都市間鉄道線徽章"},master:{displayName:"大師節点",type:"大師節点種類",undefined:"未定義"},facilities:{displayName:"施設",type:"種類"},text:{displayName:"任意のテキスト",content:"コンテンツ",fontSize:"書体サイズ",lineHeight:"行の高さ",textAnchor:"テキストのアンカー",start:"開始",middle:"中央",end:"終了",auto:"自動",hanging:"吊り下げ",dominantBaseline:"ドミナントベースライン",language:"言語での書体ファミリー",zh:"中国語",en:"英語",mtr__zh:"香港MTR中国語",mtr__en:"香港MTR英語",berlin:"ベルリンS/Uバーン",mrt:"シンガポールMRT",jreast_ja:"JR東日本日本語",jreast_en:"JR東日本英語",rotate:"回転",italic:"イタリック体",bold:"太字"}},stations:{common:{nameZh:"中国語の駅名",nameEn:"英語の駅名",nameJa:"日本語の駅名",nameOffsetX:"駅名補正値X",nameOffsetY:"駅名補正値Y",rotate:"アイコンの回転",lineCode:"路線番号",stationCode:"駅番号",left:"左",middle:"中央",right:"右",top:"上",bottom:"下"},interchange:{title:"乗り換え",within:"駅構内の乗り換え",outStation:"駅外の乗り換え",outSystem:"系統外の乗り換え",addGroup:"乗り換えグループを追加",noInterchanges:"乗り換えなし",nameZh:"中国語の駅名",nameEn:"英語の駅名",add:"乗り換えを追加",copy:"乗り換えをコピー",remove:"乗り換えを削除"},shmetroBasic:{displayName:"上海地下鉄基本駅"},shmetroBasic2020:{displayName:"上海地下鉄基本駅(令和2年)"},shmetroInt:{displayName:"上海地下鉄乗り換え駅",height:"アイコンの高さ",width:"アイコンの幅"},shmetroOsysi:{displayName:"上海地下鉄の系統外乗り換え駅"},shanghaiSuburbanRailway:{displayName:"上海市営鉄道駅"},gzmtrBasic:{displayName:"広州地下鉄基本駅",open:"開業済み",secondaryNameZh:"中国語の補助駅名",secondaryNameEn:"英語の補助駅名",tram:"路面電車"},gzmtrInt:{displayName:"広州地下鉄乗り換え駅",open:"開業済み",secondaryNameZh:"中国語の補助駅名",secondaryNameEn:"英語の補助駅名",foshan:"仏山"},gzmtrInt2024:{displayName:"広州地下鉄乗り換え駅(令和6年)",anchorAt:"錨位置",anchorAtNone:"中心",preferVertical:"縦向き版面構成(乗り換え駅2つのみ)"},bjsubwayBasic:{displayName:"北京地下鉄基本駅",open:"開業済み"},bjsubwayInt:{displayName:"北京地下鉄乗り換え駅",outOfStation:"駅外の乗り換え"},mtr:{displayName:"香港MTR駅",rotate:"アイコンの回転"},suzhouRTBasic:{displayName:"蘇州軌道交通基本駅",textVertical:"垂直の名前"},suzhouRTInt:{displayName:"蘇州軌道交通乗り換え駅"},kunmingRTBasic:{displayName:"昆明軌道交通基本駅"},kunmingRTInt:{displayName:"昆明軌道交通乗り換え駅"},MRTBasic:{displayName:"シンガポールMRT基本駅",isTram:"LRTの駅です"},MRTInt:{displayName:"シンガポールMRT乗り換え駅"},jrEastBasic:{displayName:"JR東日本基本駅",nameOffset:"名前の補正値",textOneLine:"1行での名前",textVertical:"垂直の名前",important:"重要な駅",lines:"乗り換え線の補正値"},jrEastImportant:{displayName:"JR東日本重要駅",textVertical:"垂直の名前",mostImportant:"最も重要な駅",minLength:"駅の最小長"},foshanMetroBasic:{displayName:"仏山地鐵基本車站",open:"開業済み",secondaryNameZh:"中国語の補助駅名",secondaryNameEn:"英語の補助駅名",tram:"路面電車"},qingdaoMetro:{displayName:"地下鉄青島駅",isInt:"乗換駅です"},tokyoMetroBasic:{displayName:"東京メトロの基本駅",nameOffset:"駅名補正値",textVertical:"垂直の名前"},tokyoMetroInt:{displayName:"東京メトロ乗換駅",mereOffset:{displayName:"名前は単なるオフセットです",none:"なし",left1:"左(少ない)",left2:"左(さらに)",right1:"右(少ない)",right2:"右(さらに)",up:"上",down:"下"},importance:{displayName:"駅の重要性",default:"デフォルト",middle:"真ん中",high:"高い"},align:{displayName:"アイコンの整列",horizontal:"水平",vertical:"垂直"}},londonTubeCommon:{stepFreeAccess:"段差のないアクセス",stepFreeAccessNone:"なし",stepFreeAccessTrain:"駅から電車まで",stepFreeAccessPlatform:"駅からプラットフォームまで"},londonTubeBasic:{displayName:"ロンドン地下鉄基本駅",terminal:"終着駅",shareTracks:"線路共有",shareTracksIndex:"線路共有索引"},londonTubeInt:{displayName:"ロンドン地下鉄乗換駅"},guangdongIntercityRailway:{displayName:"広東省都市間鉄道駅"}},lines:{reconcileId:"調整ID",common:{offsetFrom:"補正値(From)",offsetTo:"補正値(To)",startFrom:"開始位置",roundCornerFactor:"角の丸め係数",from:"から",to:"まで",parallelDisabled:"この路線が平行であるため、一部の属性が無効になっています。",changeInBaseLine:"基準線で変更してください:"},simple:{displayName:"簡単な経路",offset:"補正値"},diagonal:{displayName:"135°対角経路"},perpendicular:{displayName:"90°垂直経路"},rotatePerpendicular:{displayName:"90°回転する垂直経路"},singleColor:{displayName:"単色風格"},shmetroVirtualInt:{displayName:"上海地下鉄駅外乗り換え風格"},shanghaiSuburbanRailway:{displayName:"上海市営鉄道風格",isEnd:"終了行"},gzmtrVirtualInt:{displayName:"広州地下鉄駅外乗り換え風格"},chinaRailway:{displayName:"中国鉄道風格"},bjsubwaySingleColor:{displayName:"北京地下鉄単色風格"},bjsubwayTram:{displayName:"北京地下鉄路面電車風格"},bjsubwayDotted:{displayName:"北京地下鉄の点線風格"},dualColor:{displayName:"2色風格",swap:"色を交換",colorA:"色A",colorB:"色B"},river:{displayName:"河川風格",width:"幅"},mtrRaceDays:{displayName:"香港MTRレース日風格"},mtrLightRail:{displayName:"香港MTR軽軌風格"},mtrUnpaidArea:{displayName:"香港MTR改札外乗り換え風格"},mtrPaidArea:{displayName:"香港MTR改札内乗り換え風格"},mrtUnderConstruction:{displayName:"シンガポール MRT 工事中風格"},mrtSentosaExpress:{displayName:"シンガポール MRT セントーサ・エクスプレス風格"},jrEastSingleColor:{displayName:"JR東日本単色風格"},jrEastSingleColorPattern:{displayName:"JR東日本単色網目模様風格"},lrtSingleColor:{displayName:"シンガポールLRT単色風格"},londonTubeInternalInt:{displayName:"ロンドン地下鉄内部乗換風格"},londonTube10MinWalk:{displayName:"ロンドン地下鉄10分以内の乗換風格"},londonTubeTerminal:{displayName:"ロンドン地下鉄終着風格"},guangdongIntercityRailway:{displayName:"広東省都市間鉄道風格"}},edges:{},footer:{duplicate:"重複",copy:"複製",remove:"削除"}}},header:{popoverHeader:"<1>{{environment}} 環境です!",popoverBody:"現在、最新のRMPをテストしています。ご意見がありましたら、https://github.com/railmapgen/rmp/issues で提案してください",search:"駅を探す",open:{new:"新しい作品",config:"作品をインポート",projectRMG:"RMG作品からインポート",invalidType:"無効なファイルタイプです!JSON形式のファイルのみが受け付けられます。",unknownError:"アップロードされたファイルの解析中に不明なエラーが発生しました。もう一度お試しください。",gallery:"ギャラリーからインポート",tutorial:"指導を開始する",importFromRMPGallery:"テンプレート{{id}}がインポートされました。この変更に満足していませんか?Ctrl + Zまたは元に戻すボタンで元に戻せます。",failToImportFromRMPGallery:"ギャラリーから{{id}}のインポートに失敗しました。ファイルが見つかりませんでした。"},download:{config:"作品をエクスポート",image:"画像をエクスポート","2rmg":{title:"RMG作品へエクスポート",type:{line:"直線",loop:"環状線",branch:"支線"},placeholder:{chinese:"中国語のライン名",english:"英語の路線名",lineCode:"路線番号"},info1:"この機能は、RMP作品をRMG作品に変換するために設計されています。",info2:"以下のリストの行は、変換用に利用できます。左側のテキストボックスに中国語の行名、中央に英語の行名、右側に(広州メトロ風格用の)行コードを入力し、ダウンロードボタンをクリックしてRMG作品を保存できます。",noline:"利用可能な回線が見つかりません。",download:"ダウンロード",downloadInfo:"出発駅を選択してクリックしてください。"},format:"フォーマット",png:"PNG",svg:"SVG",svgVersion:"版","svg1.1":"1.1(Adobe Illustratorと互換性あり)",svg2:"2(現代のブラウザと互換性あり)",transparent:"透明性",scale:"スケール",disabledScaleOptions:"ブラウザのキャンバス制限のため、一部のスケールオプションが無効になっています。",disabledScaleOptionsWorkarounds:"回避策として、このCLIツールを使用してSVGから画像を生成する方法が考えられます:",imageTooBig:"画像が大きすぎてブラウザで生成できません!",useSystemFonts:"キャンバスで内覧された書体の代わりに系統書体を使用する",shareInfo1:"この画像を共有する際に、添付ファイル ",shareInfo2:" とリンクを添付します。",termsAndConditions:"利用規約",termsAndConditionsInfo:"以下の利用規約に同意します:",period:"。",confirm:"ダウンロード"},donation:{title:"寄付",openCollective:"Open Collective",viaUSD:"PaypalまたはVisaカードを使用してドルで寄付する。",afdian:"爱发电",viaCNY:"AlipayまたはWechat Payを使用して人民元で寄付する。"},settings:{title:"設定",pro:"これはPRO機能であり、サブスクリプションが必要です。",proWithTrial:"これはPRO機能で、無料の限定トライアルが利用可能です。",proLimitExceed:{master:"大師節点が無料枠を超えています。",parallel:"平行路線が無料枠を超えています。",solution:"これらを削除して警告を解除するか、サブスクリプションに登録してさらに多くの機能を利用してください!"},subscription:{title:"サブスクリプションステータス","logged-out":"現在ログアウトしています。",free:"ログイン済み!さらに多くの機能をアンロックするにはサブスクリプションを登録してください!",subscriber:"サブスクリプションありがとうございます!すべての機能をお楽しみください!",expired:"ログインステータスの有効期限が切れました。ログアウトして再度ログインしてください。"},preference:{title:"設定",keepLastPath:"次の移動で背景をクリックするまで、線を描き続ける",autoParallel:"新しい路線を既存の路線と平行に自動的に設定"},shortcuts:{title:"ショートカット",keys:"キー",description:"説明",f:"最後のツールを使用する。",s:"選択する。",arrows:"キャンバスを少し移動します。",ijkl:"選択した駅を少し移動します。",shift:"複数選択。",alt:"正確な移動。",delete:"選択した駅を削除します。",cut:"切り取る。",copy:"複製する。",paste:"貼り付ける。",undo:"元に戻す。",redo:"やり直す。"},procedures:{title:"手順",translate:{title:"節点の座標を変換",content:"すべての節点のX座標とY座標に次の補正値を追加する:",x:"X軸",y:"Y軸"},scale:{title:"節点の座標をスケーリング",content:"すべての節点のX座標とY座標に次の値を乗算する:",factor:"スケールファクター"},changeType:{title:"すべてのオブジェクトの属性を変更する",any:"どれでも"},changeZIndex:"深度を変更する",changeStationType:{title:"一括で駅の種類を変更",changeFrom:"すべての駅をこの種類から変更する:",changeTo:"この種類に変更する:",info:"駅の種類を変更すると、位置と名前以外の特定の属性がすべて削除されます。変更する前に保存してください!"},changeLineStyleType:{title:"線の風格を一括で変更",changeFrom:"この風格からすべての行を変更します:",changeTo:"この風格に:",info:"線の風格を変更すると、接続を除くすべての特定の属性が線から削除されます。 変更する前に保存してください!"},changeLinePathType:{title:"行のパスを一括で変更する",changeFrom:"このパスのすべての行を変更します:",changeTo:"この道へ:"},changeColor:{title:"一括で色を変更する",changeFrom:"すべてのオブジェクトをこの色から変更します:",changeTo:"この色に:",any:"どの色からも"},removeLines:{title:"単一色の路線を削除",content:"この色を持つ路線を削除する:"},updateColor:{title:"色を更新する",content:"最新の値ですべての色を更新します。",success:"すべての色を正常に更新しました。",error:"すべての色を更新する際にエラーが発生しました: {{e}}。"},unlockSimplePath:{title:"簡単な経路の解除",content1:"「地下鉄路線図画家」は、既存の慣例に従いつつ、鉄道地図の作成を支援するインタラクティブなプラットフォームを提供することを目指しています。その中でも、特に有名な風格の1つは、ハリー・ベックの革新的な作品に由来しています。彼の先駆的な貢献は1932年に正式に認められ、一般大衆から即座に称賛されました。現在では、情報デザインの領域において極めて重要な存在となっています。この典型的なアプローチは、世界規模の公共交通カートグラフィに広く採用されていますが、成功度は異なります。",content2:"アプリケーション自体は、既存の慣例に反する可能性があるため、簡単な経路を利用するオプションをデフォルトで控えめに隠しています。また、「地下鉄路線図画家ギャラリー」への投稿は厳格な審査を受けることになり、簡単な経路を単一の色の風格で使用する作品は断固として拒否されます。",content3:"それでも、このオプションのロックを解除し、寄付時にイージーパスを使用する機会を予約します。 取得後も、単純なパスの使用はモノクロスタイルに限定されることに注意してください。",check:"簡単な経路を解除",unlocked:"既に解除されています"},masterManager:{title:"すべての大師節点を管理する",id:"ID",label:"標識",type:"種類",types:{MiscNode:"その他節点",Station:"駅"},importTitle:"大師引数をアップロード",importFrom:"インポートしたスタイルを使用",importOther:"新しいスタイルをインポート",importParam:"設定情報を貼り付け"}},telemetry:{title:"テレメトリー",info:"鉄道路線図画家を改善し、貢献者がプロジェクトを向上させる意欲を維持するため、Google Analytics を通じて匿名の使用データを収集しています。このデータはユーザー体験の向上とツールの最適化のためだけに使用され、第三者と共有されることはありません。",essential:"基本",essentialTooltip:"鉄道路線図ツールキットでこのグローバル設定を変更する",essentialInfo:"鉄道路線図画家は、ツールがどのように、またいつ使用されるかを理解するための基本的な使用データを収集します。ご安心ください。個人を特定できる情報やプロジェクトデータは一切収集されません。",essentialLink:"Google Analytics が収集する可能性のある詳細フィールドを表示するには、こちらのリンクをクリックしてください。",additional:"追加",additionalInfo:"鉄道路線図画家は、プロジェクトの作成や駅の追加など、入力時のインタラクションに関するデータも収集します。これらの追加データも匿名であり、ツールを改善するための統計分析にのみ使用されます。"}},about:{title:"について",rmp:"地下鉄路線図画家",railmapgen:"地下鉄路線図ツールキットのプロジェクト",desc:"異なる都市の駅を自由にドラッグして、90度または135度の角丸線で接続して独自の鉄道地図を設計しましょう!",content1:"かつて私たちが持っていた自由と平等のすべての記憶に捧げます。",content2:"2022年6月1日、上海",contributors:"貢献者",coreContributors:"主要な貢献者",styleContributors:"風格の貢献者","203IhzElttil":"上海地下鉄の駅がオリジナルの設計と一致するように、彼の勤勉な仕事に特別な感謝を述べます。",Swiftiecott:"北京地下鉄の駅がオリジナルの設計と一致するように、彼の勤勉な仕事に特別な感謝を述べます。",Minwtraft:"広州地下鉄の駅がオリジナルの設計と一致するように、彼の勤勉な仕事に特別な感謝を述べます。",contactUs:"お問い合わせ",github:"プロジェクトリポジトリ",githubContent:"問題が発生しましたか?こちらで検索したり、問題を報告したりしてください!",slack:"Slackグループ",slackContent:"Slackのチャンネルでチャットしましょう!"}}},Ec={color:"색깔",warning:"경고",cancel:"취소",apply:"사용",remove:"삭제",close:"다시",noShowAgain:"표시하지 않기",rmtPromotion:"놓치고 싶지 않은 올인원 툴킷! 닫기.",panel:{tools:{showLess:"적게 표시",section:{lineDrawing:"선 그리기",stations:"역",miscellaneousNodes:"기타 노드"},select:"선택하다",learnHowToAdd:{station:"역을 추가하는 방법 배우기!","misc-node":"노드를 추가하는 방법 배우기!",line:"라인 스타일을 추가하는 방법 배우기!"}},details:{header:"상세한 상황",info:{title:"기본정보",id:"고유 식별자",zIndex:"깊이",stationType:"역 유형",linePathType:"선분 경로 유형",lineStyleType:"선분 스타일 유형",type:"유형",parallel:"평행선",parallelIndex:"평행 인덱스"},multipleSelection:{title:"다중 선택",change:"선택한 속성 변경",selected:"선택한 개체:",show:"보여주다",station:"역",miscNode:"기타 노드",edge:"윤곽"},changeStationTypeContent:"역 유형을 변경하면 이름을 제외한 모든 독특한 속성이 제거됩니다.",changeLineTypeContent:"선분 유형을 변경하면 모든 독특한 속성이 제거됩니다.",changeType:"종류 변경",nodePosition:{title:"노드 위치",pos:{x:"가로 좌표",y:"세로 좌표"}},lineExtremities:{title:"선분 양단",source:"시작점",target:"종말점",sourceName:"시작점 명칭",targetName:"종말점 명칭"},specificAttrsTitle:"독특 속성",unknown:{error:"이런 :( 우리는 이 {{category}}를 인식할 수 없습니다. 아마도 더 최근 버전에서 생성되었을 것입니다.",node:"노드",lineType:"선분 경로",lineStyle:"선분 스타일"},nodes:{common:{nameZh:"한자 노선명칭",nameEn:"영문 노선명칭",nameJa:"일본 노선명칭",num:"노선 번호"},virtual:{displayName:"가상 노드"},shmetroNumLineBadge:{displayName:"상해 지하철 디지털 노선 표지"},shmetroTextLineBadge:{displayName:"상해 지하철 문자 노선 표지"},gzmtrLineBadge:{displayName:"광저우 지하철 노선 표지",tram:"시가 전차",span:"행 범위 숫자"},bjsubwayNumLineBadge:{displayName:"베이징 지하철 노선 배지"},bjsubwayTextLineBadge:{displayName:"베이징 지하철 텍스트 라인 배지"},berlinSBahnLineBadge:{displayName:"베를린 S반 노선 배지"},berlinUBahnLineBadge:{displayName:"베를린 U반 노선 배지"},suzhouRTNumLineBadge:{displayName:"수주 철도 번호 라인 배지",branch:"지선입니다"},chongqingRTNumLineBadge:{displayName:"충칭 철도 교통 디지털 노선 식별"},chongqingRTTextLineBadge:{displayName:"충칭 철도 교통 텍스트 라인 표시"},shenzhenMetroNumLineBadge:{displayName:"심천 지하철 번호 라인 배지",branch:"지선입니다"},mrtDestinationNumbers:{displayName:"싱가포르 MRT 목적지 번호"},mrtLineBadge:{displayName:"싱가포르 MRT 노선 배지",isTram:"LRT 노선 배지입니다"},jrEastLineBadge:{displayName:"JR 동일본 라인 배지",crosshatchPatternFill:"크로스해치 패턴으로 채우기"},qingdaoMetroNumLineBadge:{displayName:"칭다오 지하철 번호 라인 배지",numEn:"영어로 된 줄 번호",showText:"텍스트 표시"},guangdongIntercityRailwayLineBadge:{displayName:"광동 시외 철도 노선 표지판"},master:{displayName:"마스터 노드",type:"마스터 노드 유형",undefined:"정의되지 않음"},facilities:{displayName:"시설",type:"유형"},text:{displayName:"임의 글자",content:"내용",fontSize:"글자 대소",lineHeight:"행고도",textAnchor:"글자 앵커",start:"시작",middle:"가운데",end:"끝",auto:"자동",hanging:"매달리는",dominantBaseline:"현성 바셀린",language:"언어로 된 글꼴 종류",zh:"중국어",en:"영어",mtr__zh:"홍콩 MTR 중국어",mtr__en:"홍콩 MTR 영어",berlin:"베를린 S/U Bahn",mrt:"싱가포르 MRT",jreast_ja:"JR 동일본어",jreast_en:"JR 동일본 영어",rotate:"회전",italic:"이탤릭체",bold:"굵게"}},stations:{common:{nameZh:"한자 명칭",nameEn:"영문 명칭",nameJa:"일본 명칭",nameOffsetX:"명칭 가로 이동",nameOffsetY:"명칭 세로 이동",rotate:"역회전각도",lineCode:"노선 번호",stationCode:"역 번호",left:"왼쪽",middle:"가운데",right:"오른쪽",top:"위",bottom:"아래"},interchange:{title:"환승",within:"같은 역에서 환승한",outStation:"역을 나가 환승한",outSystem:"시스템외환승",addGroup:"환승 조합 추가",noInterchanges:"비환승역",nameZh:"한자 명칭",nameEn:"영문 명칭",add:"환승 추가",copy:"환승 복제",remove:"환승 삭제"},shmetroBasic:{displayName:"상해 지하철의 기본 역"},shmetroBasic2020:{displayName:"상해 지하철 기본 역(2020년)"},shmetroInt:{displayName:"상해 지하철 환승역",height:"역 높이",width:"역 폭"},shmetroOsysi:{displayName:"상하이 지하철 시스템 외환승 역"},shanghaiSuburbanRailway:{displayName:"상하이 기차역"},gzmtrBasic:{displayName:"광저우 지하철 기본역",open:"개통여부",secondaryNameZh:"한자 제2명칭",secondaryNameEn:"영문 제2명칭",tram:"시가 전차"},gzmtrInt:{displayName:"광저우 지하철 환승역",open:"개통여부",secondaryNameZh:"한자 제2명칭",secondaryNameEn:"영문 제2명칭",foshan:"포산"},gzmtrInt2024:{displayName:"광저우 지하철 환승역 (2024)",anchorAt:"앵커 위치",anchorAtNone:"중앙",preferVertical:"세로 레이아웃 (환승 2개만)"},bjsubwayBasic:{displayName:"베이징 지하철 기본역",open:"개통여부"},bjsubwayInt:{displayName:"베이징 지하철 환승역",outOfStation:"역을 나가 환승"},mtr:{displayName:"홍콩 MTR 역"},suzhouRTBasic:{displayName:"쑤저우 궤도교통 기본역",textVertical:"수직 이름"},suzhouRTInt:{displayName:"쑤저우 궤도교통 환승역"},kunmingRTBasic:{displayName:"쿤밍 궤도교통 기본역"},kunmingRTInt:{displayName:"쿤밍 궤도교통 환승역"},MRTBasic:{displayName:"싱가포르MRT기본역",isTram:"LRT역이에요"},MRTInt:{displayName:"싱가포르MRT환승역"},jrEastBasic:{displayName:"JR 동일본 기본 역",nameOffset:"이름 오프셋",textOneLine:"한 줄로 표시된 이름",textVertical:"수직 이름",important:"중요한 역",lines:"환승 노선 오프셋"},jrEastImportant:{displayName:"JR 동일본 중요 역",textVertical:"수직 이름",mostImportant:"가장 중요한 역",minLength:"스테이션의 최소 길이"},foshanMetroBasic:{displayName:"포산 지하철 기본역",open:"개통여부",secondaryNameZh:"한자 제2명칭",secondaryNameEn:"영문 제2명칭",tram:"시가 전차"},qingdaoMetro:{displayName:"칭다오 지하철역",isInt:"환승역인가"},tokyoMetroBasic:{displayName:"도쿄메트로 기본역",nameOffset:"이름 오프셋",textVertical:"업종명",lineCode:"라인 코드",stationCode:"역 코드"},tokyoMetroInt:{displayName:"도쿄메트로 환승역",mereOffset:{displayName:"단순한 오프셋 이름",none:"없음",left1:"왼쪽(적음)",left2:"왼쪽(더)",right1:"오른쪽(적음)",right2:"맞아요 (더)",up:"위로",down:"아래에"},importance:{displayName:"역 중요성",default:"기본",middle:"가운데",high:"높은"},align:{displayName:"아이콘 정렬",horizontal:"수평의",vertical:"수직의"}},londonTubeCommon:{stepFreeAccess:"단차 없는 접근",stepFreeAccessNone:"없음",stepFreeAccessTrain:"거리에서 열차까지",stepFreeAccessPlatform:"거리에서 플랫폼까지"},londonTubeBasic:{displayName:"런던 지하철 기본역",terminal:"종착역",shareTracks:"선로 공유",shareTracksIndex:"선로 공유 지수"},londonTubeInt:{displayName:"런던 지하철 환승역"},guangdongIntercityRailway:{displayName:"광둥 시외 기차역"}},lines:{reconcileId:"연결 선분 고유 식별자",common:{offsetFrom:"시작점 오프셋",offsetTo:"끝점 오프셋",startFrom:"여기서부터 시작",roundCornerFactor:"회전원각인자",from:"에서",to:"까지",parallelDisabled:"이 선이 평행하기 때문에 일부 속성이 비활성화되었습니다.",changeInBaseLine:"기본선에서 변경하십시오:"},simple:{displayName:"기본 선분",offset:"오프셋"},diagonal:{displayName:"135° 접힌 선분"},perpendicular:{displayName:"90° 수직 선분"},rotatePerpendicular:{displayName:"90° 수직 경로 회전"},singleColor:{displayName:"단색 스타일"},shmetroVirtualInt:{displayName:"상해 지하철 역 환승 모습"},shanghaiSuburbanRailway:{displayName:"상하이 도시철도 스타일",isEnd:"끝 범위"},gzmtrVirtualInt:{displayName:"광저우 지하철 역 환승 모습"},chinaRailway:{displayName:"중국 철도 모습"},bjsubwaySingleColor:{displayName:"베이징 지하철 단색 스타일"},bjsubwayTram:{displayName:"베이징 지하철 노면 전차 모습"},bjsubwayDotted:{displayName:"베이징 지하철 점선 스타일"},dualColor:{displayName:"이색 스타일",swap:"색을 바꾸기",colorA:"색깔 A",colorB:"색깔 B"},river:{displayName:"강 스타일",width:"폭"},mtrRaceDays:{displayName:"홍콩 MTR 경마일 스타일"},mtrLightRail:{displayName:"홍콩 MTR 경전철 스타일"},mtrUnpaidArea:{displayName:"홍콩 MTR 미결제 구역 스타일"},mtrPaidArea:{displayName:"홍콩 MTR 결제완료 구역 스타일"},mrtUnderConstruction:{displayName:"싱가포르 MRT 공사중 스타일"},mrtSentosaExpress:{displayName:"싱가포르 MRT 센토사 익스프레스 스타일"},jrEastSingleColor:{displayName:"JR 동일본 단색 스타일"},jrEastSingleColorPattern:{displayName:"JR 동일본 단색 크로스해치 패턴 스타일"},lrtSingleColor:{displayName:"싱가포르 LRT 단색 스타일"},londonTubeInternalInt:{displayName:"런던 지하철 내부 환승 스타일"},londonTube10MinWalk:{displayName:"런던 지하철 10분 이내 도보 환승 스타일"},londonTubeTerminal:{displayName:"런던 지하철 종착 스타일"},guangdongIntercityRailway:{displayName:"광동성 도시간 철도 스타일"}},edges:{},footer:{duplicate:"복사",copy:"복사",remove:"삭제"}}},header:{popoverHeader:"당신은 환경을<1>{{environment}}탐색하고 있습니다",popoverBody:"최신 RMP를 테스트하고 있습니다.제안 사항이 있으시면 언제든지 https://github.com/railmapgen/rmp/issues에 제출해 주십시오.",search:"방송국 검색",open:{new:"신 프로젝트",config:"프로젝트 가져오기",projectRMG:"RMG 프로젝트에서 가져오기",invalidType:"잘못된 파일 형식입니다! JSON 형식의 파일만 허용됩니다.",unknownError:"업로드된 파일의 파싱 중 알 수 없는 오류가 발생했습니다. 다시 시도해주세요.",gallery:"갤러리에서 가져오기",tutorial:"튜토리얼 시작",importFromRMPGallery:"템플릿 {{id}}가 가져 왔습니다. 이 변경 사항에 만족하지 않으십니까? Ctrl + Z 또는 실행 취소 버튼을 사용하여 실행 취소하세요.",failToImportFromRMPGallery:"갤러리에서 {{id}}를 가져올 수 없습니다. 파일을 찾을 수 없습니다."},download:{config:"프로젝트 내보내기",image:"사진 내보내기","2rmg":{title:"RMG 프로젝트로 내보내기",type:{line:"일직선",loop:"고리",branch:"지선"},placeholder:{chinese:"중국어 라인 이름",english:"영어 줄 이름",lineCode:"노선 번호"},info1:"이 기능은 RMP 프로젝트를 RMG 프로젝트로 변환하는 데 사용됩니다.",info2:"변환할 수 있는 사용 가능한 라인들은 다음과 같습니다. 왼쪽 텍스트 상자에 중국어 라인 이름을 입력하고, 가운데에 영어 라인 이름을 입력하며, 오른쪽에 (광저우 메트로 스타일용) 라인 코드를 입력한 다음, 오른쪽의 다운로드 버튼을 클릭하여 RMG 프로젝트를 저장할 수 있습니다.",noline:"사용 가능한 라인이 없습니다.",download:"다운로드",downloadInfo:"출발 역을 선택하고 클릭하십시오."},format:"파일 종류",png:"PNG 이미지",svg:"SVG 이미지",svgVersion:"버전","svg1.1":"1.1 (Adobe Illustrator 호환)",svg2:"2 (현대 브라우저 호환)",transparent:"투명 배경",scale:"확대/축소",disabledScaleOptions:"브라우저의 캔버스 제한으로 인해 일부 스케일 옵션이 비활성화되었습니다.",disabledScaleOptionsWorkarounds:"가능한 해결 방법으로는 이 CLI 도구를 사용하여 SVG에서 이미지를 생성하는 것이 있습니다:",imageTooBig:"이미지가 너무 크기 때문에 브라우저에서 생성할 수 없습니다!",useSystemFonts:"캔버스에서 미리보기된 글꼴 대신 시스템 글꼴 사용",shareInfo1:"이 사진을 공유할 때",shareInfo2:"링크를 첨부할 것입니다.",termsAndConditions:"약관 및 세칙",termsAndConditionsInfo:"동의",period:".",confirm:"다운로드"},donation:{title:"기부",openCollective:"Open Collective",viaUSD:"Paypal 또는 Visa 카드를 통해 달러로 기부하기.",afdian:"爱发电",viaCNY:"Alipay 또는 Wechat Pay를 통해 인민폐로 기부하기."},settings:{title:"설정",pro:"이것은 PRO 기능이며, 구독이 필요한 계정입니다.",proWithTrial:"이것은 PRO 기능이며, 제한된 무료 체험이 가능합니다.",proLimitExceed:{master:"마스터 노드가 무료 사용 한도를 초과했습니다.",parallel:"평행선이 무료 사용 한도를 초과했습니다.",solution:"경고를 해제하려면 이 항목들을 제거하거나 구독을 통해 더 많은 기능을 잠금 해제하세요!"},subscription:{title:"구독 상태","logged-out":"현재 로그아웃 상태입니다.",free:"로그인 완료! 더 많은 기능을 사용하려면 구독하세요!",subscriber:"구독해주셔서 감사합니다! 모든 기능을 즐기세요!",expired:"로그인 상태가 만료되었습니다. 다시 로그인 해주세요."},preference:{title:"선호",keepLastPath:"다음 이동에서 배경을 클릭할 때까지 계속 선을 그립니다",autoParallel:"새 선을 기존 선과 평행하게 자동으로 설정합니다"},shortcuts:{title:"바로 가기",keys:"키",description:"설명",f:"마지막 도구 사용.",s:"선택하다.",arrows:"캔버스를 약간 이동합니다.",ijkl:"선택한 역을 약간 이동합니다.",shift:"여러 항목 선택.",alt:"정밀한 이동.",delete:"선택한 역을 삭제합니다.",cut:"잘라내기.",copy:"복사하다.",paste:"붙여넣다.",undo:"취소하다.",redo:"다시 하다."},procedures:{title:"절차",translate:{title:"노드 좌표 변환",content:"모든 노드의 x 및 y에 다음 오프셋을 추가:",x:"X축",y:"Y축"},scale:{title:"스케일 노드의 좌표",content:"모든 노드의 x 및 y에 다음 값을 곱하:",factor:"스케일 팩터"},changeType:{title:"모든 객체의 속성 변경",any:"어느"},changeZIndex:"일괄적으로 깊이 변경",changeStationType:{title:"역의 종류를 대량으로 수정",changeFrom:"이 유형의 모든 역:",changeTo:"이 유형의 역으로 변환:",info:"역 유형을 변경하면 이름을 제외한 모든 고유한 속성이 제거됩니다.저장했다가 다시 실행!"},changeLineStyleType:{title:"일괄적으로 선 스타일 변경",changeFrom:"이 스타일의 모든 선을 변경하세요:",changeTo:"이 스타일에:",info:"선 스타일을 변경하면 연결을 제외한 선의 모든 특정 속성이 제거됩니다. 변경하기 전에 저장하세요!"},changeLinePathType:{title:"일괄적으로 라인 경로 변경",changeFrom:"이 경로의 모든 줄을 변경하세요:",changeTo:"이 길로:"},changeColor:{title:"일괄 색상 변경",changeFrom:"이 색상의 모든 개체를 변경합니다.:",changeTo:"이 색상에:",any:"모든 색상에서"},removeLines:{title:"단일 색상의 선 제거",content:"이 색상의 선을 제거하세요: "},updateColor:{title:"색상 업데이트",content:"최신 값으로 모든 색상을 업데이트합니다.",success:"모든 색상을 성공적으로 업데이트했습니다.",error:"모든 색상을 업데이트하는 동안 오류가 발생했습니다: {{e}}."},unlockSimplePath:{title:"간단 경로 잠금 해제",content1:"Rail Map Painter 애플리케이션은 확립된 관례를 준수하면서도 철도지도 작성을 위한 대화식 플랫폼을 제공하기 위해 노력합니다. 이러한 관례 중 하나는 특히 해리 벡의 혁신적인 작업에서 비롯되었습니다. 그의 개척적인 기여는 공식적으로 1932년에 인정받았으며 일반 대중으로부터 즉각적인 찬사를 받았습니다. 현재는 정보 디자인 분야에서 중요한 본보기로 자리 잡고 있습니다. 이 패러다임적인 접근 방식은 전 세계적인 규모의 교통 카토그래피에서 널리 구현되었으나 성공의 정도는 다양합니다.",content2:"이 애플리케이션은 기존 관례에 위배될 가능성이 있기 때문에 간단한 경로를 활용하는 옵션을 기본 설정으로 가려놓았습니다. 또한 Rail Map Painter 갤러리에 제출되는 작품은 엄격한 심사를 받으며, 단일 색상 스타일로 간단한 경로를 사용하는 작품은 명확히 거부됩니다.",content3:"그래도 이 옵션을 잠금 해제하고 기부할 때 Easy Path를 사용할 수 있는 기회를 보유하고 있습니다. 획득 후에도 단순 경로의 사용은 단색 스타일로 제한된다는 점에 유의해야 합니다.",check:"간단한 경로 잠금 해제",unlocked:"이미 해제됨"},masterManager:{title:"모든 마스터 노드를 관리",id:"ID",label:"레이블",type:"유형",types:{MiscNode:"기타 노드",Station:"스테이션"},importTitle:"마스터 매개변수 업로드",importFrom:"가져온 스타일 사용",importOther:"새 스타일 가져오기",importParam:"구성 정보 붙여넣기"}},telemetry:{title:"원격 측정",info:"지하철 노선도 그리기를 개선하고 기여자가 프로젝트를 향상시키는 데 동기를 부여하기 위해 Google Analytics를 통해 익명의 사용 데이터를 수집합니다. 이 데이터는 사용자 경험을 향상하고 도구 기능을 최적화하는 데에만 사용되며, 제3자와 절대 공유되지 않습니다.",essential:"기본",essentialTooltip:"지하철 노선도 툴킷에서 이 전역 설정을 변경하세요",essentialInfo:"지하철 노선도 그리기는 도구를 언제, 어떻게 사용하는지 이해하기 위해 기본적인 사용 데이터를 수집합니다. 안심하세요. 개인 식별이 가능한 정보나 프로젝트 데이터는 절대 수집되지 않습니다.",essentialLink:"Google Analytics에서 수집할 수 있는 세부 필드를 보려면 이 링크를 클릭하세요.",additional:"추가",additionalInfo:"지하철 노선도 그리기는 프로젝트 생성이나 역 추가와 같은 입력 시의 상호작용 데이터도 수집합니다. 이러한 추가 데이터도 익명으로 처리되며, 도구를 개선하기 위한 통계 분석에만 사용됩니다."}},about:{title:"대함",rmp:"지하철 노선도 그리기",railmapgen:"철도 지도 툴킷 프로젝트 노선도 툴킷",desc:"다양한 도시의 역을 자유롭게 끌어서 90도 또는 135도의 둥근 모서리 선으로 연결함으로써 여러분만의 철도 지도를 디자인해요!",content1:"우리가 가졌던 자유와 평등을 기념한다.",content2:"2022년 6월 1일 상해",contributors:"기여자",coreContributors:"핵심 기여자",styleContributors:"스타일 기여자",langonginc:"기억에 남을 삶을 살아보세요.","203IhzElttil":"상하이 지하철의 역들이 원래 디자인과 일치하도록 확실한 작업을 해준 그에게 특별한 감사의 말씀을 전합니다.",Swiftiecott:"베이징 지하철의 역들이 원래 디자인과 일치하도록 확실한 작업을 해준 그에게 특별한 감사의 말씀을 전합니다.",Minwtraft:"광저우 지하철의 역들이 원래 디자인과 일치하도록 확실한 작업을 해준 그에게 특별한 감사의 말씀을 전합니다.",contactUs:"우리에게 연락하기",github:"프로젝트 저장소",githubContent:"무슨 문제라도 있나요? 여기서 문제를 검색하거나 제기하십시오!",slack:"슬랙 그룹",slackContent:"이 슬랙 채널에서 채팅해요!"}}},Mc={color:"颜色",warning:"警告",cancel:"取消",apply:"应用",remove:"移除",close:"关闭",noShowAgain:"不再显示",rmtPromotion:"您绝对不想错过的全能工具包!",panel:{tools:{showLess:"显示更少",section:{lineDrawing:"线段绘制",stations:"车站",miscellaneousNodes:"杂项节点"},select:"多选",learnHowToAdd:{station:"了解如何添加车站!","misc-node":"了解如何添加节点!",line:"了解如何添加线段样式!"}},details:{header:"详情",info:{title:"基本信息",id:"唯一识别符",zIndex:"深度",stationType:"车站类型",linePathType:"线段路径类型",lineStyleType:"线段样式类型",type:"类型",parallel:"平行线段",parallelIndex:"平行线段索引"},multipleSelection:{title:"多重选取",change:"修改选中对象的属性",selected:"选中的对象:",show:"显示",station:"车站",miscNode:"杂项节点",edge:"线段"},changeStationTypeContent:"修改车站类型会移除所有独特属性除了名称。",changeLineTypeContent:"修改线段类型会移除所有独特属性。",changeType:"更改类型",nodePosition:{title:"节点位置",pos:{x:"横坐标",y:"纵坐标"}},lineExtremities:{title:"线段两端",source:"起点",target:"终点",sourceName:"起点名称",targetName:"终点名称"},specificAttrsTitle:"独特属性",unknown:{error:"哎呀 :( 我们无法识别此{{category}}。也许它是在更新版本中创建的。",node:"节点",linePath:"线段路径",lineStyle:"线段样式"},nodes:{common:{nameZh:"中文线路名称",nameEn:"英文线路名称",nameJa:"日语线路名称",num:"线路号"},virtual:{displayName:"虚拟节点"},shmetroNumLineBadge:{displayName:"上海地铁数字线路标识"},shmetroTextLineBadge:{displayName:"上海地铁文字线路标识"},gzmtrLineBadge:{displayName:"广州地铁线路标识",tram:"有轨电车",span:"跨行显示数字"},bjsubwayNumLineBadge:{displayName:"北京地铁数字线路标识"},bjsubwayTextLineBadge:{displayName:"北京地铁文字线路标识"},berlinSBahnLineBadge:{displayName:"柏林城市快铁线路标识"},berlinUBahnLineBadge:{displayName:"柏林地铁线路标识"},suzhouRTNumLineBadge:{displayName:"苏州轨道交通数字线路标识",branch:"是否支线"},chongqingRTNumLineBadge:{displayName:"重庆轨道交通数字线路标识"},chongqingRTTextLineBadge:{displayName:"重庆轨道交通文字线路标识"},shenzhenMetroNumLineBadge:{displayName:"深圳地铁数字线路标识",branch:"是否为支线"},mrtDestinationNumbers:{displayName:"新加坡MRT终点数字"},mrtLineBadge:{displayName:"新加坡MRT线路标识",isTram:"是LRT线路标识"},jrEastLineBadge:{displayName:"JR东日本线路标识",crosshatchPatternFill:"用网状图案填充"},qingdaoMetroNumLineBadge:{displayName:"青岛地铁数字线路标识",numEn:"英文线路号",showText:"显示文字"},guangdongIntercityRailwayLineBadge:{displayName:"广东城际铁路线路标识"},master:{displayName:"大师节点",type:"大师节点类型",undefined:"未定义"},facilities:{displayName:"设施",type:"类型"},text:{displayName:"任意文字",content:"内容",fontSize:"文字大小",lineHeight:"行高度",textAnchor:"文字锚点",start:"开始",middle:"居中",end:"结束",auto:"自动",hanging:"悬挂",dominantBaseline:"显性基线",language:"哪个语言的字体系列",zh:"中文",en:"英文",mtr__zh:"港铁中文",mtr__en:"港铁英文",berlin:"柏林 S/U Bahn",mrt:"新加坡地铁",jreast_ja:"JR东日本日语",jreast_en:"JR东日本英语",rotate:"旋转",italic:"斜体",bold:"粗体"}},stations:{common:{nameZh:"中文名称",nameEn:"英文名称",nameJa:"日语名称",nameOffsetX:"名称横向偏移",nameOffsetY:"名称纵向偏移",rotate:"车站旋转角度",lineCode:"路线编号",stationCode:"车站编号",left:"左",middle:"中间",right:"右",top:"顶部",bottom:"底部"},interchange:{title:"换乘",within:"同站换乘",outStation:"出站换乘",outSystem:"系统外换乘",addGroup:"添加换乘组合",noInterchanges:"非换乘站",nameZh:"中文名称",nameEn:"英文名称",add:"添加换乘",copy:"复制换乘",remove:"删除换乘"},shmetroBasic:{displayName:"上海地铁基本车站"},shmetroBasic2020:{displayName:"上海地铁基本车站(2020)"},shmetroInt:{displayName:"上海地铁换乘车站",height:"车站高度",width:"车站宽度"},shmetroOsysi:{displayName:"上海地铁转乘车站"},shanghaiSuburbanRailway:{displayName:"上海市域铁路车站"},gzmtrBasic:{displayName:"广州地铁基本车站",open:"是否开通",secondaryNameZh:"中文第二名称",secondaryNameEn:"英文第二名称",tram:"有轨电车"},gzmtrInt:{displayName:"广州地铁换乘车站",open:"是否开通",secondaryNameZh:"中文第二名称",secondaryNameEn:"英文第二名称",foshan:"佛山"},gzmtrInt2024:{displayName:"广州地铁换乘站(2024)",anchorAt:"定位于",anchorAtNone:"中心",preferVertical:"垂直布局(仅限2个换乘)"},bjsubwayBasic:{displayName:"北京地铁基本车站",open:"是否开通"},bjsubwayInt:{displayName:"北京地铁换乘车站",outOfStation:"出站换乘"},mtr:{displayName:"香港MTR车站"},suzhouRTBasic:{displayName:"苏州轨道交通基本车站",textVertical:"垂直名称"},suzhouRTInt:{displayName:"苏州轨道交通换乘车站"},kunmingRTBasic:{displayName:"昆明轨道交通基本车站"},kunmingRTInt:{displayName:"昆明轨道交通换乘车站"},MRTBasic:{displayName:"新加坡MRT基本车站",isTram:"是LRT车站"},MRTInt:{displayName:"新加坡MRT换乘车站"},jrEastBasic:{displayName:"JR东日本基本车站",nameOffset:"名称偏移",textOneLine:"名称在一行中",textVertical:"垂直名称",important:"重要车站",lines:"换乘线偏移"},jrEastImportant:{displayName:"JR东日本重要车站",textVertical:"垂直名称",mostImportant:"最重要车站",minLength:"车站的最小长度"},foshanMetroBasic:{displayName:"佛山地铁基本车站",open:"是否开通",secondaryNameZh:"中文第二名称",secondaryNameEn:"英文第二名称",tram:"有轨电车"},qingdaoMetro:{displayName:"青岛地铁车站",isInt:"是换乘站"},tokyoMetroBasic:{displayName:"东京地铁基本车站",nameOffset:"名称偏移",textVertical:"垂直站名",lineCode:"线路编号",stationCode:"车站编号"},tokyoMetroInt:{displayName:"东京地铁换乘车站",mereOffset:{displayName:"名称微小偏移",none:"无",left1:"左 (较少)",left2:"左 (较大)",right1:"右 (较少)",right2:"右 (较大)",up:"上",down:"下"},importance:{displayName:"车站重要性",default:"默认",middle:"中",high:"高"},align:{displayName:"图标排列方向",horizontal:"横向",vertical:"纵向"}},londonTubeCommon:{stepFreeAccess:"无障碍通行",stepFreeAccessNone:"无",stepFreeAccessTrain:"从街道到列车",stepFreeAccessPlatform:"从街道到站台"},londonTubeBasic:{displayName:"伦敦地铁基本车站",terminal:"终点站",shareTracks:"轨道共享",shareTracksIndex:"轨道共享索引"},londonTubeInt:{displayName:"伦敦地铁换乘车站"},guangdongIntercityRailway:{displayName:"广东城际铁路车站"}},lines:{reconcileId:"合并线段唯一标识符",common:{offsetFrom:"起始点偏移",offsetTo:"结束点偏移",startFrom:"从这里开始",roundCornerFactor:"转折圆角因子",from:"从",to:"到",parallelDisabled:"由于此线段是平行的,因此某些属性已被禁用。",changeInBaseLine:"在基准线段中更改它们:"},simple:{displayName:"基本线段",offset:"偏移"},diagonal:{displayName:"135°折线线段"},perpendicular:{displayName:"90°垂直线段"},rotatePerpendicular:{displayName:"90°旋转垂直线段"},singleColor:{displayName:"纯色样式"},shmetroVirtualInt:{displayName:"上海地铁出站换乘样式"},shanghaiSuburbanRailway:{displayName:"上海市域铁路样式",isEnd:"结束区间"},gzmtrVirtualInt:{displayName:"广州地铁出站换乘样式"},chinaRailway:{displayName:"中国铁路样式"},bjsubwaySingleColor:{displayName:"北京地铁纯色样式"},bjsubwayTram:{displayName:"北京地铁有轨电车样式"},bjsubwayDotted:{displayName:"北京地铁虚线样式"},dualColor:{displayName:"双色样式",swap:"切换颜色",colorA:"颜色A",colorB:"颜色B"},river:{displayName:"河流样式",width:"宽度"},mtrRaceDays:{displayName:"香港MTR赛马日样式"},mtrLightRail:{displayName:"香港MTR轻铁样式"},mtrUnpaidArea:{displayName:"香港MTR未付费区域样式"},mtrPaidArea:{displayName:"香港MTR付费区域样式"},mrtUnderConstruction:{displayName:"新加坡MRT在建样式"},mrtSentosaExpress:{displayName:"新加坡MRT圣淘沙捷运样式"},jrEastSingleColor:{displayName:"JR东日本单色样式"},jrEastSingleColorPattern:{displayName:"JR东日本单色网状图案样式"},lrtSingleColor:{displayName:"新加坡LRT纯色样式"},londonTubeInternalInt:{displayName:"伦敦地铁内部换乘样式"},londonTube10MinWalk:{displayName:"伦敦地铁10分钟步行换乘样式"},londonTubeTerminal:{displayName:"伦敦地铁终点站样式"},guangdongIntercityRailway:{displayName:"广东城际铁路样式"}},edges:{},footer:{duplicate:"重复",copy:"复制",remove:"移除"}}},header:{popoverHeader:"你正在浏览<1>{{environment}}环境!",popoverBody:"我们正在测试最新的RMP。如果你有任何建议,欢迎在 https://github.com/railmapgen/rmp/issues 上提出。",search:"搜索车站",open:{new:"新项目",config:"导入项目",projectRMG:"从RMG项目中导入",invalidType:"无效的文件类型!仅接受JSON格式的文件。",unknownError:"解析上传文件时发生未知错误!请重试。",gallery:"从画廊中导入",tutorial:"开始教程",importFromRMPGallery:"模板 {{id}} 已导入。对此更改不满意?可通过 Ctrl + Z 或撤销按钮进行撤销。",failToImportFromRMPGallery:"无法从画廊导入{{id}},找不到文件。"},download:{config:"导出项目",image:"导出图片","2rmg":{title:"导出RMG项目",type:{line:"直线",loop:"环线",branch:"支线"},placeholder:{chinese:"中文线路名称",english:"英文线路名称",lineCode:"路线编号"},info1:"这个功能可将RMP项目导出为RMG项目。",info2:"下面的线路将可以被导出,你可以在左侧文本框中输入中文线路名称、在中间输入英文线路名称、右边输入线路编号(广州地铁样式专用),随后点击下载按钮即可导出RMG项目。",noline:"未找到可用线路。",download:"下载",downloadInfo:"请选择一个起始车站,并点击它。"},format:"文件种类",png:"PNG图像",svg:"SVG图像",svgVersion:"版本","svg1.1":"1.1(适用于Adobe Illustrator)",svg2:"2(适用于现代浏览器)",transparent:"透明背景",scale:"缩放",disabledScaleOptions:"由于浏览器的画布限制,部分缩放选项被禁用。",disabledScaleOptionsWorkarounds:"可能的解决方法包括使用此命令行工具从SVG生成图像:",imageTooBig:"图像太大,无法在您的浏览器中生成!",useSystemFonts:"使用系统字体而不是在画布上预览的字体",shareInfo1:"当我分享此图片时我会附上",shareInfo2:"和它的链接。",termsAndConditions:"条款及细则",termsAndConditionsInfo:"我同意",period:"。",confirm:"下载"},donation:{title:"捐赠",openCollective:"Open Collective",viaUSD:"通过Paypal或Visa卡以美元捐赠。",afdian:"爱发电",viaCNY:"通过支付宝或微信支付以人民币捐赠。"},settings:{title:"设置",pro:"这是一个专业功能,需要带有订阅的账户。",proWithTrial:"这是一个PRO功能,并提供有限的免费试用。",proLimitExceed:{master:"大师节点超出了免费额度。",parallel:"平行线段超出了免费额度。",solution:"移除它们以消除此警告,或订阅以解锁更多功能!"},subscription:{title:"订阅状态","logged-out":"您当前已登出。",free:"已登录!订阅以解锁更多功能!",subscriber:"感谢您的订阅!享受所有功能吧!",expired:"登录状态已过期。请登出后重新登录。"},preference:{title:"偏好",keepLastPath:"在下一次操作中持续画线段直到点击背景",autoParallel:"自动将新线段设置为与现有线段平行"},shortcuts:{title:"快捷键",keys:"键",description:"描述",f:"使用上一个工具。",s:"多选。",arrows:"稍微移动画布。",ijkl:"稍微移动所选站点。",shift:"多选。",alt:"精确移动。",delete:"删除所选站点。",cut:"剪切。",copy:"复制。",paste:"粘贴。",undo:"撤销。",redo:"重做。"},procedures:{title:"过程",translate:{title:"转化节点坐标",content:"将以下偏移加到所有节点的x和y上:",x:"横坐标",y:"纵坐标"},scale:{title:"缩放节点坐标",content:"将所有节点的x和y乘以以下值:",factor:"缩放因子"},changeType:{title:"修改所有对象的属性",any:"任意"},changeZIndex:"批量修改深度",changeStationType:{title:"批量修改车站种类",changeFrom:"将此类型的所有车站:",changeTo:"转换为这个类型的车站:",info:"修改车站类型会移除所有独特属性除了名称。保存再操作!"},changeLineStyleType:{title:"批量修改线段样式",changeFrom:"将此样式的所有线段:",changeTo:"转换为这个样式的线段:",info:"修改线段样式会移除所有独特属性除了连通性。保存再操作!"},changeLinePathType:{title:"批量修改线段类型",changeFrom:"将此类型的所有线段:",changeTo:"转换为这个类型的线段:"},changeColor:{title:"批量修改颜色",changeFrom:"将此颜色的所有对象:",changeTo:"转换为这个颜色:",any:"从任何颜色转换"},removeLines:{title:"移除所有纯色线段",content:"移除具有此颜色的所有线段: "},updateColor:{title:"更新颜色",content:"使用最新值更新所有颜色。",success:"成功更新所有颜色。",error:"更新所有颜色时出错:{{e}}。"},unlockSimplePath:{title:"解锁简单路径",content1:"地铁线路图绘制器应用致力于在遵循既定惯例的前提下,提供一个有利于创建地铁线路图的互动平台。在这些惯例中,一种特别著名的风格源自哈利·贝克的创新工作。他的开创性贡献于1932年得到官方认可,并在大众中迅速赢得了声誉。目前,它在信息设计领域具有重要的示范意义,在全球范围内的交通制图中得到了广泛的实施,尽管成功程度有所不同。",content2:"应用程序固有地隐藏了使用简单路径的选项,因为其部署有可能违反既定的惯例。默认情况下,此特定功能保持隐蔽。此外,提交到地铁线路图绘制器画廊的作品将经过严格的审查,坚决拒绝使用单色风格的简单路径的构图。",content3:"尽管如此,我们仍然保留了解锁此选项的机会,当您订阅后,方可使用简单路径。需要注意的是,即使获得后,简单路径的使用也仅限于单色风格。",check:"解锁简单路径",unlocked:"已解锁"},masterManager:{title:"管理全部大师节点",id:"唯一标识",label:"标签",type:"类型",types:{MiscNode:"杂项节点",Station:"车站"},importTitle:"上传大师节点参数",importFrom:"使用导入的样式",importOther:"导入新样式",importParam:"粘贴配置信息"}},telemetry:{title:"遥测",info:"为了帮助改进地铁线路图绘制器并激励贡献者提升项目,我们通过 Google Analytics 收集匿名使用数据。这些数据仅用于增强用户体验和优化工具功能,绝不会与第三方共享。",essential:"基础",essentialTooltip:"在地铁线路图工具包中更改此全局设置",essentialInfo:"地铁线路图绘制器收集一些基本使用数据,以帮助我们了解用户如何以及何时与工具交互。请放心,我们从不收集任何可识别个人身份的信息或您的项目数据。",essentialLink:"点击此链接查看 Google Analytics 可能收集的详细字段。",additional:"额外",additionalInfo:"地铁线路图绘制器还会收集有关交互的数据,例如项目创建或站点添加等操作。这些额外数据同样是匿名的,仅用于统计分析以帮助我们改进工具。"}},about:{title:"关于",rmp:"地铁线路图绘制器",railmapgen:"一个线路图工具包项目",desc:"通过自由拖动来自不同城市的车站并以 90 或 135 度圆角线段将它们连接起来,设计您自己的铁路地图!",content1:"谨以此纪念我们曾拥有的自由与平等。",content2:"06/01/2022于上海",contributors:"贡献者",coreContributors:"核心贡献者",styleContributors:"样式贡献者",langonginc:"活出值得铭记的人生。","203IhzElttil":"特别感谢他勤勉工作,确保上海地铁站与原始设计相符。",Swiftiecott:"特别感谢他勤勉工作,确保北京地铁站与原始设计相符。",Minwtraft:"特别感谢他勤勉工作,确保广州地铁站与原始设计相符。",contactUs:"联系我们",github:"项目仓库",githubContent:"遇到任何问题?在这里搜索或提出一个问题!",slack:"Slack群组",slackContent:"在这些Slack频道中讨论!"}}},Pc={color:"顏色",warning:"警告",cancel:"取消",apply:"應用",remove:"移除",close:"關閉",noShowAgain:"不要再顯示",rmtPromotion:"絕對不想錯過的多功能工具包!",panel:{tools:{showLess:"顯示更少",section:{lineDrawing:"線段繪製",stations:"車站",miscellaneousNodes:"雜項節點"},select:"多選",learnHowToAdd:{station:"了解如何添加車站!","misc-node":"了解如何添加節點!",line:"了解如何添加線條樣式!"}},details:{header:"詳情",info:{title:"基本信息",id:"唯一識別符",zIndex:"深度",stationType:"車站類型",linePathType:"線段路徑類型",lineStyleType:"線段樣式類型",type:"類型",parallel:"平行線段",parallelIndex:"平行線段索引"},multipleSelection:{title:"多重選取",change:"修改選取物件的屬性",selected:"選取的物件:",show:"顯示",station:"車站",miscNode:"雜項節點",edge:"線段"},changeStationTypeContent:"修改車站類型會移除所有獨特屬性除了名稱。",changeLineTypeContent:"修改線段類型會移除所有獨特屬性。",changeType:"更改類型",nodePosition:{title:"節點位置",pos:{x:"橫坐標",y:"縱坐標"}},lineExtremities:{title:"線段兩端",source:"起點",target:"終點",sourceName:"起點名稱",targetName:"終點名稱"},specificAttrsTitle:"獨特屬性",unknown:{error:"哎呀 :( 我們無法識別此{{category}}。也許它是在更新版本中創建的。",node:"節點",linePath:"線段路徑",lineStyle:"線段樣式"},nodes:{common:{nameZh:"中文線路名稱",nameEn:"英文線路名稱",nameJa:"日語線路名稱",num:"線路號"},virtual:{displayName:"虛擬節點"},shmetroNumLineBadge:{displayName:"上海地鐵數字線路標識"},shmetroTextLineBadge:{displayName:"上海地鐵文字線路標識"},gzmtrLineBadge:{displayName:"廣州地鐵線路標識",tram:"輕軌",span:"跨行顯示數字"},bjsubwayNumLineBadge:{displayName:"北京地鐵數字線路標識"},bjsubwayTextLineBadge:{displayName:"北京地鐵文字線路標識"},berlinSBahnLineBadge:{displayName:"柏林城市快鐵線路標識"},berlinUBahnLineBadge:{displayName:"柏林地鐵線路標識"},suzhouRTNumLineBadge:{displayName:"蘇州軌道交通數字線路標識",branch:"是否支線"},chongqingRTNumLineBadge:{displayName:"重慶軌道交通數字線路標識"},chongqingRTTextLineBadge:{displayName:"重慶軌道交通文字線路標識"},shenzhenMetroNumLineBadge:{displayName:"深圳地鐵數字線路標識",branch:"是否支線"},mrtDestinationNumbers:{displayName:"新加坡MRT終點數字"},mrtLineBadge:{displayName:"新加坡MRT線路標識",isTram:"是LRT線路標識"},jrEastLineBadge:{displayName:"JR東日本線路標識",crosshatchPatternFill:"用網狀圖案填充"},qingdaoMetroNumLineBadge:{displayName:"青島地鐵數位線路標識",numEn:"英文線路號",showText:"顯示文字"},guangdongIntercityRailwayLineBadge:{displayName:"廣東城際鐵路線標識"},master:{displayName:"大師節點",type:"大師節點類型",undefined:"未定義"},facilities:{displayName:"設施",type:"類型"},text:{displayName:"任意文字",content:"內容",fontSize:"文字大小",lineHeight:"行高度",textAnchor:"文字錨點",start:"開始",middle:"中間",end:"結束",auto:"自動",hanging:"懸吊",dominantBaseline:"顯性基線",language:"哪個語言的字體系列",zh:"中文",en:"英文",mtr__zh:"香港地鐵中文",mtr__en:"香港地鐵英文",berlin:"柏林 S/U 地鐵",mrt:"新加坡地鐵",jreast_ja:"JR 東日本日文",jreast_en:"JR 東日本英文",rotate:"旋轉",italic:"斜體",bold:"粗體"}},stations:{common:{nameZh:"中文名稱",nameEn:"英文名稱",nameJa:"日語名稱",nameOffsetX:"名稱橫向偏移",nameOffsetY:"名稱縱向偏移",rotate:"車站旋轉角度",lineCode:"路綫編碼",stationCode:"車站編碼",left:"左",middle:"中間",right:"右",top:"頂部",bottom:"底部"},interchange:{title:"換乘",within:"同站換乘",outStation:"出站換乘",outSystem:"系統外換乘",addGroup:"添加換乘組合",noInterchanges:"非換乘站",nameZh:"中文名稱",nameEn:"英文名稱",add:"添加換乘",copy:"復製換乘",remove:"刪除換乘"},shmetroBasic:{displayName:"上海地鐵基本車站"},shmetroBasic2020:{displayName:"上海地鐵基本車站(2020)"},shmetroInt:{displayName:"上海地鐵換乘車站",height:"車站高度",width:"車站寬度"},shmetroOsysi:{displayName:"上海地鐵轉乘車站"},shanghaiSuburbanRailway:{displayName:"上海市域鐵路車站"},gzmtrBasic:{displayName:"廣州地鐵基本車站",open:"是否開通",secondaryNameZh:"中文第二名稱",secondaryNameEn:"英文第二名稱",tram:"輕軌"},gzmtrInt:{displayName:"廣州地鐵換乘車站",open:"是否開通",secondaryNameZh:"中文第二名稱",secondaryNameEn:"英文第二名稱",foshan:"佛山"},gzmtrInt2024:{displayName:"廣州地鐵換乘站(2024)",anchorAt:"定位於",anchorAtNone:"中心",preferVertical:"垂直佈局(僅限2個換乘)"},bjsubwayBasic:{displayName:"北京地鐵基本車站",open:"是否開通"},bjsubwayInt:{displayName:"北京地鐵換乘車站",outOfStation:"出站轉車"},mtr:{displayName:"香港MTR車站"},suzhouRTBasic:{displayName:"蘇州軌道交通基本車站",textVertical:"垂直名稱"},suzhouRTInt:{displayName:"蘇州軌道交通換乘車站"},kunmingRTBasic:{displayName:"昆明軌道交通基本車站"},kunmingRTInt:{displayName:"昆明軌道交通換乘車站"},MRTBasic:{displayName:"新加坡MRT基本車站",isTram:"是LRT車站"},MRTInt:{displayName:"新加坡MRT換乘車站"},jrEastBasic:{displayName:"JR東日本基本車站",nameOffset:"名稱偏移",textOneLine:"名稱在一行中",textVertical:"垂直名稱",important:"重要車站",lines:"轉乘線偏移"},jrEastImportant:{displayName:"JR東日本重要車站",textVertical:"垂直名稱",mostImportant:"最重要車站",minLength:"車站的最小長度"},foshanMetroBasic:{displayName:"佛山地鐵基本車站",open:"是否開通",secondaryNameZh:"中文第二名稱",secondaryNameEn:"英文第二名稱",tram:"輕軌"},qingdaoMetro:{displayName:"青島地鐵基本車站",isInt:"是換乘站"},tokyoMetroBasic:{displayName:"東京地鐵基本車站",nameOffset:"名稱偏移",textVertical:"垂直站名",lineCode:"線路編號",stationCode:"車站編號"},tokyoMetroInt:{displayName:"東京地鐵轉乘車站",mereOffset:{displayName:"名稱微小偏移",none:"無",left1:"左 (较少)",left2:"左 (较大)",right1:"右 (较少)",right2:"右 (较大)",up:"上",down:"下"},importance:{displayName:"車站重要性",default:"預設",middle:"中",high:"高"},align:{displayName:"圖標排列方向",horizontal:"橫向",vertical:"縱向"}},londonTubeCommon:{stepFreeAccess:"無障礙通行",stepFreeAccessNone:"無",stepFreeAccessTrain:"從街道到列車",stepFreeAccessPlatform:"從街道到月台"},londonTubeBasic:{displayName:"倫敦地鐵基本車站",terminal:"終點站",shareTracks:"軌道共享",shareTracksIndex:"軌道共享指數"},londonTubeInt:{displayName:"倫敦地鐵換乘車站"},guangdongIntercityRailway:{displayName:"廣東城際鐵路車站"}},lines:{reconcileId:"合並線段唯一標識符",common:{offsetFrom:"起始點偏移",offsetTo:"結束點偏移",startFrom:"從這裏開始",roundCornerFactor:"轉折圓角因子",from:"從",to:"到",parallelDisabled:"由於此線段是平行的,因此某些屬性已被禁用。",changeInBaseLine:"在基準線段中更改它們:"},simple:{displayName:"基本線段",offset:"偏移"},diagonal:{displayName:"135°折線線段"},perpendicular:{displayName:"90°垂直線段"},rotatePerpendicular:{displayName:"90°旋轉垂直線段"},singleColor:{displayName:"純色樣式"},shmetroVirtualInt:{displayName:"上海地鐵出站換乘樣式"},shanghaiSuburbanRailway:{displayName:"上海市域鐵路樣式",isEnd:"結束區間"},gzmtrVirtualInt:{displayName:"廣州地鐵出站換乘樣式"},chinaRailway:{displayName:"中國鐵路樣式"},bjsubwaySingleColor:{displayName:"北京地鐵純色樣式"},bjsubwayTram:{displayName:"北京地鐵有軌電車樣式"},bjsubwayDotted:{displayName:"北京地鐵虛線樣式"},dualColor:{displayName:"雙色樣式",swap:"切換顏色",colorA:"顏色A",colorB:"顏色B"},river:{displayName:"河流樣式",width:"寬度"},mtrRaceDays:{displayName:"香港MTR賽馬日樣式"},mtrLightRail:{displayName:"香港MTR輕鐵樣式"},mtrUnpaidArea:{displayName:"香港MTR未付費區域樣式"},mtrPaidArea:{displayName:"香港MTR付費區域樣式"},mrtUnderConstruction:{displayName:"新加坡MRT在建樣式"},mrtSentosaExpress:{displayName:"新加坡MRT聖淘沙捷運樣式"},jrEastSingleColor:{displayName:"JR東日本單色樣式"},jrEastSingleColorPattern:{displayName:"JR東日本單色網狀圖案樣式"},lrtSingleColor:{displayName:"新加坡LRT純色樣式"},londonTubeInternalInt:{displayName:"倫敦地鐵內部換乘樣式"},londonTube10MinWalk:{displayName:"倫敦地鐵10分鐘步行換乘樣式"},londonTubeTerminal:{displayName:"倫敦地鐵終點站樣式"},guangdongIntercityRailway:{displayName:"廣東城際鐵路樣式"}},edges:{},footer:{duplicate:"重複",copy:"複製",remove:"移除"}}},header:{popoverHeader:"你正在瀏覽<1>{{environment}}環境!",popoverBody:"我們正在測試最新的RMP。如果妳有任何建議,歡迎在 https://github.com/railmapgen/rmp/issues 上提出。",search:"搜尋車站",open:{new:"新項目",config:"讀入項目",projectRMG:"從RMG專案中讀入",invalidType:"無效的文件類型!僅接受JSON格式的文件。",unknownError:"解析上傳文件時發生未知錯誤!請重試。",gallery:"從畫廊中讀入",tutorial:"開始教程",importFromRMPGallery:"範本 {{id}} 已匯入。對此更改不滿意?可通過 Ctrl + Z 或撤銷按鈕進行撤銷。",failToImportFromRMPGallery:"無法從畫廊導入{{id}},找不到檔案。"},download:{config:"導出項目",image:"導出圖片","2rmg":{title:"導出RMG項目",type:{line:"直線",loop:"環線",branch:"支線"},placeholder:{chinese:"中文線路名稱",english:"英文線路名稱",lineCode:"路綫編碼"},info1:"這個功能可將RMP項目導出為RMG項目。",info2:"下面的線路將可以被導出,你可以在左側文本框中輸入中文線路名稱、在中間輸入英文線路名稱、右邊輸入線路編號(廣州地鐵樣式專用),隨後點擊下載按鈕即可導出RMG項目。",noline:"未找到可用線路。",download:"下載",downloadInfo:"請選擇一個起始車站,並點擊它。"},format:"檔案種類",png:"PNG影像",svg:"SVG影像",svgVersion:"版本","svg1.1":"1.1(適用於Adobe Illustrator)",svg2:"2(適用於現代瀏覽器)",transparent:"透明背景",scale:"縮放",disabledScaleOptions:"由於您的瀏覽器的畫布限制,部分縮放選項已被禁用。",disabledScaleOptionsWorkarounds:"可能的解決方法包括使用此命令行工具從SVG生成圖像:",imageTooBig:"圖像太大,您的瀏覽器無法生成!",useSystemFonts:"使用系統字型而不是在畫布上預覽的字型",shareInfo1:"當我分享此圖片時我會附上",shareInfo2:"和它的鏈接。",termsAndConditions:"條款及細則",termsAndConditionsInfo:"我同意",period:"。",confirm:"下載"},donation:{title:"捐款",openCollective:"Open Collective",viaUSD:"通過Paypal或Visa卡以美元捐款。",afdian:"爱发电",viaCNY:"通過支付寶或微信支付以人民幣捐款。"},settings:{title:"設置",pro:"這是一個專業功能,需要带有訂閱的帳戶。",proWithTrial:"這是一個PRO功能,並提供有限的免費試用。",proLimitExceed:{master:"大師節點超出了免費額度。",parallel:"平行線段超出了免費額度。",solution:"移除它們以解除此警告,或訂閱以解鎖更多功能!"},subscription:{title:"訂閱狀態","logged-out":"您目前已登出。",free:"已登入!訂閱以解鎖更多功能!",subscriber:"感謝您的訂閱!享受所有功能吧!",expired:"登入狀態已過期。請登出後重新登入。"},preference:{title:"偏好",keepLastPath:"在下一次操作中持續畫線段直到點擊背景",autoParallel:"自動將新段線設置為與現有線段平行"},shortcuts:{title:"捷徑",keys:"按鍵",description:"描述",f:"使用上一個工具。",s:"多選。",arrows:"稍微移動畫布。",ijkl:"稍微移動所選站點。",shift:"多選。",alt:"精確移動。",delete:"刪除所選站點。",cut:"剪切。",copy:"複製。",paste:"貼上。",undo:"撤銷。",redo:"重做。"},procedures:{title:"过程",translate:{title:"轉化節點坐標",content:"將以下偏移加到所有節點的x和y上:",x:"橫坐標",y:"縱坐標"},scale:{title:"縮放節點坐標",content:"將所有節點的x和y乘以以下值:",factor:"縮放因子"},changeType:{title:"修改所有物件的屬性",any:"任意"},changeZIndex:"批量修改深度",changeStationType:{title:"批量修改車站種類",changeFrom:"將此類型的所有車站:",changeTo:"轉換為這個類型的車站:",info:"修改車站類型會移除所有獨特屬性除了名稱。保存再操作!"},changeLineStyleType:{title:"批量修改線段樣式",changeFrom:"將此樣式的所有線段:",changeTo:"轉換為這個樣式的線段:",info:"修改線段樣式會移除所有獨特屬性除了連通性。保存再操作!"},changeLinePathType:{title:"批量修改線段類型",changeFrom:"將此類型的所有線段:",changeTo:"轉換為這個類型的線段:"},changeColor:{title:"批量修改顏色",changeFrom:"將此顏色的所有對象:",changeTo:"轉換為這個顏色:",any:"從任何顏色轉換"},removeLines:{title:"移除所有純色線段",content:"移除具有此顏色的所有線段: "},updateColor:{title:"更新顏色",content:"使用最新值更新所有顏色。",success:"成功更新所有顏色。",error:"更新所有顏色時發生錯誤:{{e}}。"},unlockSimplePath:{title:"解鎖簡單路徑",content1:"地鐵線路圖繪製器應用致力於在遵循既定慣例的前提下,提供一個有利於創建地鐵線路圖的互動平台。在這些慣例中,一種特別著名的風格源自哈利·貝克的創新工作。他的開創性貢獻於1932年得到官方認可,並在大眾中迅速贏得了聲譽。目前,它在信息設計領域具有重要的示範意義,在全球範圍內的交通製圖中得到了廣泛的實施,儘管成功程度有所不同。",content2:"應用程式固有地隱藏了使用簡單路徑的選項,因為其部署有可能違反既定的慣例。默認情況下,此特定功能保持隱蔽。此外,提交到地鐵線路圖繪製器畫廊的作品將經過嚴格的審查,堅決拒絕使用單色風格的簡單路徑的構圖。",content3:"儘管如此,我們仍然保留瞭解鎖此選項的機會,當您訂閱后,方可使用簡單路徑。 需要注意的是,即使獲得后,簡單路徑的使用也僅限於單色風格。",check:"解鎖簡單路徑",unlocked:"已解鎖"},masterManager:{title:"管理全部大師節點",id:"唯一標識",label:"標籤",type:"類型",types:{MiscNode:"雜項節點",Station:"車站"},importTitle:"上傳大師節點參數",importFrom:"使用匯入的樣式",importOther:"導入新樣式",importParam:"貼上配置信息"}},telemetry:{title:"遙測",info:"為了協助改進地鐵路綫圖繪製器並激勵貢獻者提升項目,我們透過 Google Analytics 收集匿名使用數據。這些數據僅用於提升用戶體驗及優化工具功能,絕不會與第三方共享。",essential:"基本",essentialTooltip:"在地鐵路綫圖工具組中更改此全局設定",essentialInfo:"地鐵路綫圖繪製器收集一些基本使用數據,以協助我們了解用戶如何及何時與工具互動。請放心,我們絕不收集任何可識別個人身份的資訊或您的項目數據。",essentialLink:"點擊此鏈接查看 Google Analytics 可能收集的詳細字段。",additional:"額外",additionalInfo:"地鐵路綫圖繪製器還會收集與互動有關的數據,例如創建項目或新增站點等操作。這些額外數據同樣是匿名的,僅用於統計分析以協助我們改進工具。"}},about:{title:"關於",rmp:"地鐵線路圖繪製器",railmapgen:"一個路綫圖工具組的項目",desc:"通過自由拖動來自不同城市的車站並以 90 或 135 度圓角線段將它們連接起來,設計您自己的鐵路地圖!",content1:"謹以此紀念我們曾擁有的自由與平等。",content2:"06/01/2022於上海",contributors:"貢獻者",coreContributors:"核心貢獻者",styleContributors:"樣式貢獻者",langonginc:"活出值得銘記的人生。","203IhzElttil":"特別感謝他勤奮工作,確保上海地鐵站與原始設計相符。",Swiftiecott:"特別感謝他勤奮工作,確保北京地鐵站與原始設計相符。",Minwtraft:"特別感謝他勤奮工作,確保廣州地鐵站與原始設計相符。",contactUs:"聯繫我們",github:"項目倉庫",githubContent:"遇到任何問題?在這裡搜索或提出一個問題!",slack:"Slack群組",slackContent:"在這些Slack頻道中討論!"}}},Ic=e("aP",(new qn.I18nBuilder).use(ze).withAppName("Rail Map Painter").withLng(qn.getLanguage()).withDefaultResource(Oc).withResource("en",Lc).withResource("zh-Hans",Mc).withResource("zh-Hant",Pc).withResource("ja",Ac).withResource("ko",Ec).build()),{abs:$c,cos:zc,sin:Bc,acos:Dc,atan2:Gc,sqrt:Fc,pow:Uc}=Math;function Wc(e){return e<0?-Uc(-e,1/3):Uc(e,1/3)}const Vc=Math.PI,Hc=2*Vc,Jc=Vc/2,qc=Number.MAX_SAFE_INTEGER||9007199254740991,Kc=Number.MIN_SAFE_INTEGER||-9007199254740991,Yc={x:0,y:0,z:0},Qc={Tvalues:[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213],Cvalues:[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872],arcfn:function(e,t){const n=t(e);let r=n.x*n.x+n.y*n.y;return void 0!==n.z&&(r+=n.z*n.z),Fc(r)},compute:function(e,t,n){if(0===e)return t[0].t=0,t[0];const r=t.length-1;if(1===e)return t[r].t=1,t[r];const o=1-e;let i=t;if(0===r)return t[0].t=e,t[0];if(1===r){const t={x:o*i[0].x+e*i[1].x,y:o*i[0].y+e*i[1].y,t:e};return n&&(t.z=o*i[0].z+e*i[1].z),t}if(r<4){let t,a,s,l=o*o,c=e*e,d=0;2===r?(i=[i[0],i[1],i[2],Yc],t=l,a=o*e*2,s=c):3===r&&(t=l*o,a=l*e*3,s=o*c*3,d=e*c);const u={x:t*i[0].x+a*i[1].x+s*i[2].x+d*i[3].x,y:t*i[0].y+a*i[1].y+s*i[2].y+d*i[3].y,t:e};return n&&(u.z=t*i[0].z+a*i[1].z+s*i[2].z+d*i[3].z),u}const a=JSON.parse(JSON.stringify(t));for(;a.length>1;){for(let t=0;t1;o--,i--){const e=[];for(let n,o=0;oi.x.min&&(t=i.x.min),n>i.y.min&&(n=i.y.min),r0&&(a.c1=t,a.c2=r,a.s1=e,a.s2=n,i.push(a))}))})),i},makeshape:function(e,t,n){const r=t.points.length,o=e.points.length,i=Qc.makeline(t.points[r-1],e.points[0]),a=Qc.makeline(e.points[o-1],t.points[0]),s={startcap:i,forward:e,back:t,endcap:a,bbox:Qc.findbbox([i,e,t,a]),intersections:function(e){return Qc.shapeintersections(s,s.bbox,e,e.bbox,n)}};return s},getminmax:function(e,t,n){if(!n)return{min:0,max:0};let r,o,i=qc,a=Kc;-1===n.indexOf(0)&&(n=[0].concat(n)),-1===n.indexOf(1)&&n.push(1);for(let s=0,l=n.length;sa&&(a=o[t]);return{min:i,mid:(i+a)/2,max:a,size:a-i}},align:function(e,t){const n=t.p1.x,r=t.p1.y,o=-Gc(t.p2.y-r,t.p2.x-n);return e.map((function(e){return{x:(e.x-n)*zc(o)-(e.y-r)*Bc(o),y:(e.x-n)*Bc(o)+(e.y-r)*zc(o)}}))},roots:function(e,t){t=t||{p1:{x:0,y:0},p2:{x:1,y:0}};const n=e.length-1,r=Qc.align(e,t),o=function(e){return 0<=e&&e<=1};if(2===n){const e=r[0].y,t=r[1].y,n=r[2].y,i=e-2*t+n;if(0!==i){const r=-Fc(t*t-e*n),a=-e+t;return[-(r+a)/i,-(-r+a)/i].filter(o)}return t!==n&&0===i?[(2*t-n)/(2*t-2*n)].filter(o):[]}const i=r[0].y,a=r[1].y,s=r[2].y;let l=3*a-i-3*s+r[3].y,c=3*i-6*a+3*s,d=-3*i+3*a,u=i;if(Qc.approximately(l,0)){if(Qc.approximately(c,0))return Qc.approximately(d,0)?[]:[-u/d].filter(o);const e=Fc(d*d-4*c*u),t=2*c;return[(e-d)/t,(-d-e)/t].filter(o)}c/=l,d/=l,u/=l;const p=(3*d-c*c)/3,h=p/3,g=(2*c*c*c-9*c*d+27*u)/27,f=g/2,m=f*f+h*h*h;let y,b,v,w,x;if(m<0){const e=-p/3,t=Fc(e*e*e),n=-g/(2*t),r=Dc(n<-1?-1:n>1?1:n),i=2*Wc(t);return v=i*zc(r/3)-c/3,w=i*zc((r+Hc)/3)-c/3,x=i*zc((r+2*Hc)/3)-c/3,[v,w,x].filter(o)}if(0===m)return y=f<0?Wc(-f):-Wc(f),v=2*y-c/3,w=-y-c/3,[v,w].filter(o);{const e=Fc(m);return y=Wc(-f+e),b=Wc(f+e),[y-b-c/3].filter(o)}},droots:function(e){if(3===e.length){const t=e[0],n=e[1],r=e[2],o=t-2*n+r;if(0!==o){const e=-Fc(n*n-t*r),i=-t+n;return[-(e+i)/o,-(-e+i)/o]}return n!==r&&0===o?[(2*n-r)/(2*(n-r))]:[]}if(2===e.length){const t=e[0],n=e[1];return t!==n?[t/(t-n)]:[]}return[]},curvature:function(e,t,n,r,o){let i,a,s,l,c=0,d=0;const u=Qc.compute(e,t),p=Qc.compute(e,n),h=u.x*u.x+u.y*u.y;if(r?(i=Fc(Uc(u.y*p.z-p.y*u.z,2)+Uc(u.z*p.x-p.z*u.x,2)+Uc(u.x*p.y-p.x*u.y,2)),a=Uc(h+u.z*u.z,1.5)):(i=u.x*p.y-u.y*p.x,a=Uc(h,1.5)),0===i||0===a)return{k:0,r:0};if(c=i/a,d=a/i,!o){const o=Qc.curvature(e-.001,t,n,r,!0).k,i=Qc.curvature(e+.001,t,n,r,!0).k;l=(i-c+(c-o))/2,s=($c(i-c)+$c(c-o))/2}return{k:c,r:d,dk:l,adk:s}},inflections:function(e){if(e.length<4)return[];const t=Qc.align(e,{p1:e[0],p2:e.slice(-1)[0]}),n=t[2].x*t[1].y,r=t[3].x*t[1].y,o=t[1].x*t[2].y,i=18*(-3*n+2*r+3*o-t[3].x*t[2].y),a=18*(3*n-r-3*o),s=18*(o-n);if(Qc.approximately(i,0)){if(!Qc.approximately(a,0)){let e=-s/a;if(0<=e&&e<=1)return[e]}return[]}const l=2*i;if(Qc.approximately(l,0))return[];const c=a*a-4*i*s;if(c<0)return[];const d=Math.sqrt(c);return[(d-a)/l,-(a+d)/l].filter((function(e){return 0<=e&&e<=1}))},bboxoverlap:function(e,t){const n=["x","y"],r=n.length;for(let o,i,a,s,l=0;l=s)return!1;return!0},expandbox:function(e,t){t.x.mine.x.max&&(e.x.max=t.x.max),t.y.max>e.y.max&&(e.y.max=t.y.max),t.z&&t.z.max>e.z.max&&(e.z.max=t.z.max),e.x.mid=(e.x.min+e.x.max)/2,e.y.mid=(e.y.min+e.y.max)/2,e.z&&(e.z.mid=(e.z.min+e.z.max)/2),e.x.size=e.x.max-e.x.min,e.y.size=e.y.max-e.y.min,e.z&&(e.z.size=e.z.max-e.z.min)},pairiteration:function(e,t,n){const r=e.bbox(),o=t.bbox(),i=1e5,a=n||.5;if(r.x.size+r.y.sizek||k>N)&&(S+=Hc),S>N&&(x=N,N=S,S=x)):N4){if(1!==arguments.length)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");r=!0}}else if(6!==o&&8!==o&&9!==o&&12!==o&&1!==arguments.length)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");const i=this._3d=!r&&(9===o||12===o)||e&&e[0]&&void 0!==e[0].z,a=this.points=[];for(let p=0,h=i?3:2;pe+Xc(t.y)),0)0}length(){return Qc.length(this.derivative.bind(this))}static getABC(e=2,t,n,r,o=.5){const i=Qc.projectionratio(o,e),a=1-i,s={x:i*t.x+a*r.x,y:i*t.y+a*r.y},l=Qc.abcratio(o,e);return{A:{x:n.x+(n.x-s.x)/l,y:n.y+(n.y-s.y)/l},B:n,C:s,S:t,E:r}}getABC(e,t){t=t||this.get(e);let n=this.points[0],r=this.points[this.order];return sd.getABC(this.order,n,t,r,e)}getLUT(e){if(this.verify(),e=e||100,this._lut.length===e+1)return this._lut;this._lut=[],e++,this._lut=[];for(let t,n,r=0;r1?1:u,l=this.compute(u),l.t=u,l.d=c,l}get(e){return this.compute(e)}point(e){return this.points[e]}compute(e){return this.ratios?Qc.computeWithRatios(e,this.points,this.ratios,this._3d):Qc.compute(e,this.points,this._3d,this.ratios)}raise(){const e=this.points,t=[e[0]],n=e.length;for(let r,o,i=1;i1;){n=[];for(let i,a=0,s=t.length-1;a=0&&e<=1})),t=t.concat(e[n].sort(Qc.numberSort))}.bind(this)),e.values=t.sort(Qc.numberSort).filter((function(e,n){return t.indexOf(e)===n})),e}bbox(){const e=this.extrema(),t={};return this.dims.forEach(function(n){t[n]=Qc.getminmax(this,n,e[n])}.bind(this)),t}overlaps(e){const t=this.bbox(),n=e.bbox();return Qc.bboxoverlap(t,n)}offset(e,t){if(void 0!==t){const n=this.get(e),r=this.normal(e),o={c:n,n:r,x:n.x+r.x*t,y:n.y+r.y*t};return this._3d&&(o.z=n.z+r.z*t),o}if(this._linear){const t=this.normal(0),n=this.points.map((function(n){const r={x:n.x+e*t.x,y:n.y+e*t.y};return n.z&&t.z&&(r.z=n.z+e*t.z),r}));return[new sd(n)]}return this.reduce().map((function(t){return t._linear?t.offset(e)[0]:t.scale(e)}))}simple(){if(3===this.order){const e=Qc.angle(this.points[0],this.points[3],this.points[1]),t=Qc.angle(this.points[0],this.points[3],this.points[2]);if(e>0&&t<0||e<0&&t>0)return!1}const e=this.normal(0),t=this.normal(1);let n=e.x*t.x+e.y*t.y;return this._3d&&(n+=e.z*t.z),Xc(od(n))(1-o/r)*t+o/r*n));return new sd(this.points.map(((t,n)=>({x:t.x+e.x*o[n],y:t.y+e.y*o[n]}))))}scale(e){const t=this.order;let n=!1;if("function"==typeof e&&(n=e),n&&2===t)return this.raise().scale(n);const r=this.clockwise,o=this.points;if(this._linear)return this.translate(this.normal(0),n?n(0):e,n?n(1):e);const i=n?n(0):e,a=n?n(1):e,s=[this.offset(0,10),this.offset(1,10)],l=[],c=Qc.lli4(s[0],s[0].c,s[1],s[1].c);if(!c)throw new Error("cannot scale this curve. Try reducing it first.");return[0,1].forEach((function(e){const n=l[e*t]=Qc.copy(o[e*t]);n.x+=(e?a:i)*s[e].n.x,n.y+=(e?a:i)*s[e].n.y})),n?([0,1].forEach((function(i){if(2!==t||!i){var a=o[i+1],s={x:a.x-c.x,y:a.y-c.y},d=n?n((i+1)/t):e;n&&!r&&(d=-d);var u=id(s.x*s.x+s.y*s.y);s.x/=u,s.y/=u,l[i+1]={x:a.x+d*s.x,y:a.y+d*s.y}}})),new sd(l)):([0,1].forEach((e=>{if(2===t&&e)return;const n=l[e*t],r=this.derivative(e),i={x:n.x+r.x,y:n.y+r.y};l[e+1]=Qc.lli4(n,i,c,o[e+1])})),new sd(l))}outline(e,t,n,r){if(t=void 0===t?e:t,this._linear){const o=this.normal(0),i=this.points[0],a=this.points[this.points.length-1];let s,l,c;void 0===n&&(n=e,r=t),s={x:i.x+o.x*e,y:i.y+o.y*e},c={x:a.x+o.x*n,y:a.y+o.y*n},l={x:(s.x+c.x)/2,y:(s.y+c.y)/2};const d=[s,l,c];s={x:i.x-o.x*t,y:i.y-o.y*t},c={x:a.x-o.x*r,y:a.y-o.y*r},l={x:(s.x+c.x)/2,y:(s.y+c.y)/2};const u=[c,l,s],p=Qc.makeline(u[2],d[0]),h=Qc.makeline(d[2],u[0]),g=[p,new sd(d),h,new sd(u)];return new Zc(g)}const o=this.reduce(),i=o.length,a=[];let s,l=[],c=0,d=this.length();const u=void 0!==n&&void 0!==r;function p(e,t,n,r,o){return function(i){const a=r/n,s=(r+o)/n,l=t-e;return Qc.map(i,0,1,e+a*l,e+s*l)}}o.forEach((function(o){const i=o.length();u?(a.push(o.scale(p(e,n,d,c,i))),l.push(o.scale(p(-t,-r,d,c,i)))):(a.push(o.scale(e)),l.push(o.scale(-t))),c+=i})),l=l.map((function(e){return s=e.points,s[3]?e.points=[s[3],s[2],s[1],s[0]]:e.points=[s[2],s[1],s[0]],e})).reverse();const h=a[0].points[0],g=a[i-1].points[a[i-1].points.length-1],f=l[i-1].points[l[i-1].points.length-1],m=l[0].points[0],y=Qc.makeline(f,h),b=Qc.makeline(g,m),v=[y].concat(a).concat([b]).concat(l);return new Zc(v)}outlineshapes(e,t,n){t=t||e;const r=this.outline(e,t).curves,o=[];for(let i=1,a=r.length;i1,e.endcap.virtual=i{var i=this.get(e);return Qc.between(i.x,t,r)&&Qc.between(i.y,n,o)}))}selfintersects(e){const t=this.reduce(),n=t.length-2,r=[];for(let o,i,a,s=0;s0&&(o=o.concat(t))})),o}arcs(e){return e=e||.5,this._iterate(e,[])}_error(e,t,n,r){const o=(r-n)/4,i=this.get(n+o),a=this.get(r-o),s=Qc.dist(e,t),l=Qc.dist(e,i),c=Qc.dist(e,a);return Xc(l-s)+Xc(c-s)}_iterate(e,t){let n,r=0,o=1;do{n=0,o=1;let i,a,s,l,c,d=this.get(r),u=!1,p=!1,h=o,g=1;do{if(p=u,l=s,h=(r+o)/2,i=this.get(h),a=this.get(o),s=Qc.getccenter(d,i,a),s.interval={start:r,end:o},u=this._error(s,d,r,o)<=e,c=p&&!u,c||(g=o),u){if(o>=1){if(s.interval.end=g=1,l=s,o>1){let e={x:s.x+s.r*nd(s.e),y:s.y+s.r*rd(s.e)};s.e+=Qc.angle({x:s.x,y:s.y},e,this.get(1))}break}o+=(o-r)/2}else o=h}while(!c&&n++<100);if(n>=100)break;l=l||s,t.push(l),r=g}while(o<1);return t}}const ld=(e,t,n,r)=>{var o;r=null!==(o=r)&&void 0!==o?o:-n;const[i,a]=cd(e);if(!i||!a)return;if(i[0]===a[0]||i[1]===a[1]||t===Nc.Diagonal&&Math.abs(i[1]-a[1])===Math.abs(i[0]-a[0])){const e=Math.abs(n);return dd(i,a,e)}const[s,l]=pd(e);if(!s||!l)return;const c=new sd([...s,...l]),[d,u]=[c.scale(n),c.scale(r)],p=gd(i,s,a,c,d,u);if(!p)return;const{mA:[h,g],mB:[f,m],endA:[y,b],endB:[v,w]}=p;return[`M ${h} ${g} ${d.toSVG().replace("M","L")} L ${y} ${b}`,`M ${f} ${m} ${u.toSVG().replace("M","L")} L ${v} ${w}`]},cd=e=>{var t,n;return[null===(t=e.match(/M\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+/))||void 0===t||null===(t=t.at(0))||void 0===t?void 0:t.replace(/M\s*/,"").split(" ").map((e=>Number(e))),null===(n=e.match(/L\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+\s*$/))||void 0===n||null===(n=n.at(0))||void 0===n?void 0:n.replace(/L\s*/,"").split(" ").map((e=>Number(e)))]},dd=(e,t,n)=>{const[r,o,i,a]=[e[0],e[1],t[0],t[1]],s=Math.abs((a-o)/(i-r));if(s===1/0)return[`M ${r+n} ${o} L ${i+n} ${a}`,`M ${r-n} ${o} L ${i-n} ${a}`];if(0===s)return[`M ${r} ${o+n} L ${i} ${a+n}`,`M ${r} ${o-n} L ${i} ${a-n}`];{const e=1/s,t=n/Math.sqrt(e*e+1),l=t*e*-Math.sign((i-r)*(a-o));return[`M ${r+t} ${o+l} L ${i+t} ${a+l}`,`M ${r-t} ${o-l} L ${i-t} ${a-l}`]}},ud=(e,t,n)=>{const[r,o,i,a]=[e[0],e[1],t[0],t[1]],s=Math.abs((a-o)/(i-r));if(s===1/0)return`M ${r+n} ${o} L ${i+n} ${a} L ${i-n} ${a} L ${r-n} ${o} Z`;if(0===s)return`M ${r} ${o+n} L ${i} ${a+n} L ${i} ${a-n} L ${r} ${o-n} Z`;{const e=1/s,t=n/Math.sqrt(e*e+1),l=t*e*-Math.sign((i-r)*(a-o));return`M ${r+t} ${o+l} L ${i+t} ${a+l} L ${i-t} ${a-l} L ${r-t} ${o-l} Z`}},pd=e=>{var t,n;return[null===(t=e.match(/L\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+/))||void 0===t||null===(t=t.at(0))||void 0===t?void 0:t.replace(/L\s*/,"").split(" ").map((e=>Number(e))),null===(n=e.match(/C\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+/g))||void 0===n||null===(n=n.at(0))||void 0===n?void 0:n.replace(/C\s*/,"").split(" ").map((e=>Number(e)))]},hd=(e,t)=>[[t[4],t[5]],[t[2],t[3],t[0],t[1],e[0],e[1]]],gd=(e,t,n,r,o,i)=>{const a=[o.points.at(0).x,o.points.at(0).y],s=[i.points.at(0).x,i.points.at(0).y];if(!e)return;const[l,c]=fd(e[0],t[0],a[0],e[1],t[1],a[1]),[d,u]=fd(e[0],t[0],s[0],e[1],t[1],s[1]),p=[o.points.at(-1).x,o.points.at(-1).y],h=[i.points.at(-1).x,i.points.at(-1).y],g=[r.points.at(-1).x,r.points.at(-1).y];if(!n)return;const[f,m]=fd(p[0],g[0],n[0],p[1],g[1],n[1]),[y,b]=fd(h[0],g[0],n[0],h[1],g[1],n[1]);return{mA:[l,c],mB:[d,u],endA:[f,m],endB:[y,b]}},fd=(e,t,n,r,o,i)=>{const[a,s]=[e+n,r+i],[l,c]=[a-t,s-o];return[l,c]},md=(e("an",((e,t)=>{const n=t.edge,r=t.attributes.type,o=t.attributes[r],i=t.attributes.parallelIndex;if(r===Nc.Simple||i<0)return{normal:[t],parallel:[]};const a=[],[s,l]=e.extremities(n),c=[];for(const d of e.edgeEntries(s,l))d.attributes.parallelIndex<0?a.push(d):(d.attributes.type===r&&s===d.source&&d.attributes[r].startFrom===o.startFrom||d.attributes.type===r&&s===d.target&&d.attributes[r].startFrom!==o.startFrom)&&c.push(d);return{normal:a,parallel:c}})),e("ao",(e=>{let t=e.at(0);if(!t)return{};for(const h of e)h.attributes.parallelIndex{let i=!1;if(e===Nc.Diagonal)(Math.abs(r-t)t&&o>n)||Math.abs(r-t)>Math.abs(o-n)&&(r>t&&on))&&(i=!0);else if(e===Nc.Perpendicular)(r>t&&on)&&(i=!0);else if(e===Nc.RotatePerpendicular){const[e,a,s,l]=[t*Math.SQRT1_2+n*Math.SQRT1_2,-t*Math.SQRT1_2+n*Math.SQRT1_2,r*Math.SQRT1_2+o*Math.SQRT1_2,-r*Math.SQRT1_2+o*Math.SQRT1_2];(s>e&&la)&&(i=!0)}return i})(n,i,a,s,l),u={};for(const h of e){var p;const e=h.attributes.parallelIndex>0?h.attributes.parallelIndex:0;if(0===e){u[h.edge]=c;continue}const t=5*e,r=[`M ${i} ${a+t} L ${s} ${l+t}`,`M ${i} ${a-t} L ${s} ${l-t}`],[o,g]=null!==(p=ld(c,n,t))&&void 0!==p?p:r;u[h.edge]=d?o:g}return u})),e("m",((e,t,n,r,o)=>{if(t===Nc.Simple)return-1;const i=[];for(const s of e.edgeEntries(n,r)){const e=s.attributes;(t===e.type&&n===s.source&&e[t].startFrom===o||t===e.type&&n===s.target&&e[t].startFrom!==o)&&i.push(s.attributes.parallelIndex)}i.sort();let a=0;for(const s of i){if(s>a)break;a=s+1}return a})),(e,t,n)=>{if(t===Nc.Simple)return n;const r=e.getEdgeAttribute(n,"parallelIndex");if(r<0)return n;const o=e.getEdgeAttribute(n,t).startFrom,[i,a]=e.extremities(n);let s=Number.MAX_VALUE,l=n;for(const c of e.edgeEntries(i,a)){const e=c.attributes;(t===e.type&&i===c.source&&e[t].startFrom===o&&e.parallelIndex>=0&&e.parallelIndex=0&&e.parallelIndex{e.telemetry.app=t.payload},setTelemetryProject:(e,t)=>{e.telemetry.project=t.payload},setUnlockSimplePath:(e,t)=>{e.preference.unlockSimplePathAttempts=t.payload},setToolsPanelExpansion:(e,t)=>{e.preference.toolsPanel.expand=t.payload},setAutoParallel:(e,t)=>{e.preference.autoParallel=t.payload}}}),{setTelemetryApp:wd,setTelemetryProject:xd,setUnlockSimplePath:Sd,setToolsPanelExpansion:kd,setAutoParallel:Nd}=vd.actions;e({a9:xd,X:Sd,aL:kd,a2:Nd});const _d=vd.reducer,Rd={present:(new Oo).export(),past:[],future:[],svgViewBoxZoom:100,svgViewBoxMin:{x:0,y:0}},Td=e("ak",De("undo")),Cd=e("al",De("redo")),jd=Ie({name:"param",initialState:Rd,reducers:{setFullState:(e,t)=>structuredClone(t.payload),saveGraph:(e,t)=>{e.future=[],e.past.push(e.present),e.past.length>49&&e.past.shift(),e.present=structuredClone(t.payload)},setSvgViewBoxZoom:(e,t)=>{e.svgViewBoxZoom=t.payload},setSvgViewBoxMin:(e,t)=>{e.svgViewBoxMin=t.payload}},extraReducers:e=>{e.addCase(Td,(e=>{if(0===e.past.length)return;const t=e.past.pop();e.future.unshift(e.present),e.present=t,window.graph.clear(),window.graph.import(structuredClone(Be(t)))})).addCase(Cd,(e=>{if(0===e.future.length)return;const t=e.future.shift();e.past.push(e.present),e.present=t,window.graph.clear(),window.graph.import(structuredClone(Be(t)))}))}}),{setFullState:Od,saveGraph:Ld,setSvgViewBoxZoom:Ad,setSvgViewBoxMin:Ed}=jd.actions;e({v:Ld,z:Ad,A:Ed});const Md=jd.reducer,Pd={selected:new Set,active:void 0,refresh:{nodes:Date.now(),edges:Date.now()},mode:"free",lastTool:void 0,keepLastPath:!1,theme:[ic.Shanghai,"sh1","#E3002B",pc.white],paletteAppClip:{input:void 0,output:void 0},masterNodesCount:0,parallelLinesCount:0,globalAlerts:{}},Id=e("q",Ge("runtime/refreshNodes",(async(e,{getState:t,dispatch:n})=>{const r=t();if(n(Hd()),r.account.timeout)return;let o=0;window.graph.forEachNode(((e,t)=>{t.type===jc.Master&&(o+=1)})),n(Bd(o));const i=r.account.activeSubscriptions.RMP_CLOUD?1/0:Cc;o>i&&n(eu({status:"warning",message:`${Ic.t("header.settings.proLimitExceed.master")} ${Ic.t("header.settings.proLimitExceed.solution")}`}))}))),$d=e("t",Ge("runtime/refreshEdges",(async(e,{getState:t,dispatch:n})=>{const r=t();if(n(Jd()),r.account.timeout)return;const o=(e=>{let t=0;for(const n of e.edgeEntries())n.attributes.parallelIndex>=0&&(t+=1);return t})(window.graph);n(Dd(o));const i=r.account.activeSubscriptions.RMP_CLOUD?bd:yd;o>=i&&n(Nd(!1)),o>i&&n(eu({status:"warning",message:`${Ic.t("header.settings.proLimitExceed.parallel")} ${Ic.t("header.settings.proLimitExceed.solution")}`}))}))),zd=Ie({name:"runtime",initialState:Pd,reducers:{setSelected:(e,t)=>{e.selected=t.payload},addSelected:(e,t)=>{e.selected.add(t.payload)},removeSelected:(e,t)=>{e.selected.delete(t.payload)},clearSelected:e=>{e.selected=new Set},setActive:(e,t)=>{e.active=t.payload},setRefreshNodes:e=>{e.refresh.nodes=Date.now()},setRefreshEdges:e=>{e.refresh.edges=Date.now()},setMode:(e,t)=>{"free"!==e.mode&&(e.lastTool=e.mode),e.mode=t.payload},setKeepLastPath:(e,t)=>{e.keepLastPath=t.payload},setTheme:(e,t)=>{e.theme=t.payload},openPaletteAppClip:(e,t)=>{e.paletteAppClip.input=t.payload,e.paletteAppClip.output=void 0},closePaletteAppClip:e=>{e.paletteAppClip.input=void 0},onPaletteAppClipEmit:(e,t)=>{e.paletteAppClip.input=void 0,e.paletteAppClip.output=t.payload},setMasterNodesCount:(e,t)=>{e.masterNodesCount=t.payload},setParallelLinesCount:(e,t)=>{e.parallelLinesCount=t.payload},setGlobalAlert:(e,t)=>{const{status:n,message:r,url:o,linkedApp:i}=t.payload;e.globalAlerts[n]={message:r,url:o,linkedApp:i}},closeGlobalAlert:(e,t)=>{delete e.globalAlerts[t.payload]}},extraReducers:e=>{e.addCase(Td,(e=>{e.refresh.nodes=Date.now(),e.refresh.edges=Date.now()})).addCase(Cd,(e=>{e.refresh.nodes=Date.now(),e.refresh.edges=Date.now()}))}}),{setMasterNodesCount:Bd,setParallelLinesCount:Dd}=zd.actions,{setSelected:Gd,addSelected:Fd,removeSelected:Ud,clearSelected:Wd,setActive:Vd,setRefreshNodes:Hd,setRefreshEdges:Jd,setMode:qd,setKeepLastPath:Kd,setTheme:Yd,openPaletteAppClip:Qd,closePaletteAppClip:Zd,onPaletteAppClipEmit:Xd,setGlobalAlert:eu,closeGlobalAlert:tu}=zd.actions;e({T:Gd,au:Fd,at:Ud,y:Wd,as:Vd,aq:qd,a1:Kd,aH:Yd,W:Qd,j:eu,am:tu});const nu=zd.reducer,ru=(e,t,n)=>0===t?e:function(e,t,n){function r(e,t,n){var r=t.x-e.x,i=t.y-e.y,a=Math.sqrt(r*r+i*i);return o(e,t,Math.min(1,n/a))}function o(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}function i(e,t){e.length>2&&(e[e.length-2]=t.x,e[e.length-1]=t.y)}function a(e){return{x:parseFloat(e[e.length-2]),y:parseFloat(e[e.length-1])}}var s=e.split(/[,\s]/).reduce((function(e,t){var n=t.match("([a-zA-Z])(.+)");return n?(e.push(n[1]),e.push(n[2])):e.push(t),e}),[]),l=s.reduce((function(e,t){return parseFloat(t)==t&&e.length?e[e.length-1].push(t):e.push([t]),e}),[]),c=[];if(l.length>1){var d=a(l[0]),u=null;"Z"==l[l.length-1][0]&&l[0].length>2&&(u=["L",d.x,d.y],l[l.length-1]=u),c.push(l[0]);for(var p=1;p2&&"L"==g[0]&&f.length>2&&"L"==f[0]){var m,y,b=a(h),v=a(g),w=a(f);m=r(v,b,t),y=r(v,w,t),i(g,m),g.origPoint=v,c.push(g);var x=o(m,v,.5),S=o(v,y,.5),k=["C",x.x,x.y,S.x,S.y,y.x,y.y];k.origPoint=v,c.push(k)}else c.push(g)}if(u){var N=a(c[c.length-1]);c.push(["Z"]),i(c[0],N)}}else c=l;return c.reduce((function(e,t){return e+t.join(" ")+" "}),"")}(e,t),ou={startFrom:"from",offsetFrom:0,offsetTo:0,roundCornerFactor:10},iu={generatePath:(e,t,n,r,o=ou)=>{const{startFrom:i=ou.startFrom,offsetFrom:a=ou.offsetFrom,offsetTo:s=ou.offsetTo,roundCornerFactor:l=ou.roundCornerFactor}=o,[c,d,u,p]="from"===i?[e,n,t,r]:[t,r,e,n],h=Math.abs(u-c)0?-1:1):w,_="horizontal"===h?x:k+Math.abs(S-w)*(k-x>0?-1:1),[R,T,C,j]="from"===i?[w,x,S,k]:[S,k,w,x];return ru(`M ${R} ${T} L ${N} ${_} L ${C} ${j}`,l)},icon:i.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:i.jsx("path",{d:"M9,18V12L15,6",stroke:"currentColor",fill:"none"})}),defaultAttrs:ou,attrsComponent:e=>{var t,n,r;const{id:o,attrs:a,handleAttrsUpdate:s,recalculateParallelIndex:l,parallelIndex:c}=e,{t:d}=$e(),u=vp(),p=md(window.graph,Nc.Diagonal,o),h=c>=0&&p!==o,g=[{type:"select",label:d("panel.details.lines.common.startFrom"),value:a.startFrom,options:{from:d("panel.details.lines.common.from"),to:d("panel.details.lines.common.to")},onChange:e=>{l(o,e),a.startFrom=e,s(o,a)},minW:"full"},{type:"input",label:d("panel.details.lines.common.offsetFrom"),value:(null!==(t=a.offsetFrom)&&void 0!==t?t:ou.offsetFrom).toString(),variant:"number",onChange:e=>{Number.isNaN(e)&&(e="0"),a.offsetFrom=Number(e),s(o,a)},isDisabled:h,minW:"full"},{type:"input",label:d("panel.details.lines.common.offsetTo"),value:(null!==(n=a.offsetTo)&&void 0!==n?n:ou.offsetTo).toString(),variant:"number",onChange:e=>{Number.isNaN(e)&&(e="0"),a.offsetTo=Number(e),s(o,a)},isDisabled:h,minW:"full"},{type:"input",label:d("panel.details.lines.common.roundCornerFactor"),value:(null!==(r=null==a?void 0:a.roundCornerFactor)&&void 0!==r?r:ou.roundCornerFactor).toString(),variant:"number",onChange:e=>{(Number.isNaN(e)||Number(e)<0)&&(e="0"),a.roundCornerFactor=Number(e),s(o,a)},isDisabled:h,minW:"full"}];return h&&g.unshift({type:"custom",label:d("panel.details.lines.common.parallelDisabled"),component:i.jsxs(J,{size:"sm",variant:"link",onClick:()=>u(Gd(new Set([p]))),children:[d("panel.details.lines.common.changeInBaseLine")," ",p]})}),i.jsx(Al,{fields:g})},metadata:{displayName:"panel.details.lines.diagonal.displayName"}},au={startFrom:"from",offsetFrom:0,offsetTo:0,roundCornerFactor:18.33},su={generatePath:(e,t,n,r,o=au)=>{const{startFrom:i=au.startFrom,offsetFrom:a=au.offsetFrom,offsetTo:s=au.offsetTo,roundCornerFactor:l=au.roundCornerFactor}=o,[c,d]="from"===i?[a,s]:[s,a],[u,p,h,g]="from"===i?[0,c,d,0]:[c,0,0,d];return ru(`M ${e+u} ${n+p} L ${"from"===i?t+h:e+u} ${"from"===i?n+p:r+g} L ${t+h} ${r+g}`,l)},icon:i.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:i.jsx("path",{d:"M6,6H18V18",stroke:"currentColor",fill:"none"})}),defaultAttrs:au,attrsComponent:e=>{var t,n,r;const{id:o,attrs:a,handleAttrsUpdate:s,recalculateParallelIndex:l,parallelIndex:c}=e,{t:d}=$e(),u=vp(),p=md(window.graph,Nc.Perpendicular,o),h=c>=0&&p!==o,g=[{type:"select",label:d("panel.details.lines.common.startFrom"),value:a.startFrom,options:{from:d("panel.details.lines.common.from"),to:d("panel.details.lines.common.to")},onChange:e=>{l(o,e),a.startFrom=e,s(o,a)},minW:"full"},{type:"input",label:d("panel.details.lines.common.offsetFrom"),value:(null!==(t=a.offsetFrom)&&void 0!==t?t:au.offsetFrom).toString(),variant:"number",onChange:e=>{Number.isNaN(e)&&(e="0"),a.offsetFrom=Number(e),s(o,a)},isDisabled:h,minW:"full"},{type:"input",label:d("panel.details.lines.common.offsetTo"),value:(null!==(n=a.offsetTo)&&void 0!==n?n:au.offsetTo).toString(),variant:"number",onChange:e=>{Number.isNaN(e)&&(e="0"),a.offsetTo=Number(e),s(o,a)},isDisabled:h,minW:"full"},{type:"input",label:d("panel.details.lines.common.roundCornerFactor"),value:(null!==(r=null==a?void 0:a.roundCornerFactor)&&void 0!==r?r:au.roundCornerFactor).toString(),variant:"number",onChange:e=>{(Number.isNaN(e)||Number(e)<0)&&(e="0"),a.roundCornerFactor=Number(e),s(o,a)},isDisabled:h,minW:"full"}];return h&&g.unshift({type:"custom",label:d("panel.details.lines.common.parallelDisabled"),component:i.jsxs(J,{size:"sm",variant:"link",onClick:()=>u(Gd(new Set([p]))),children:[d("panel.details.lines.common.changeInBaseLine")," ",p]})}),i.jsx(Al,{fields:g})},metadata:{displayName:"panel.details.lines.perpendicular.displayName"}},lu={startFrom:"from",offsetFrom:0,offsetTo:0,roundCornerFactor:18.33},cu={generatePath:(e,t,n,r,o=lu)=>{const{startFrom:i=lu.startFrom,offsetFrom:a=lu.offsetFrom,offsetTo:s=lu.offsetTo,roundCornerFactor:l=lu.roundCornerFactor}=o,[c,d]="from"===i?[a,s]:[s,a],[u,p,h,g]="from"===i?[0,c,d,0]:[c,0,0,d],[f,m,y,b]=[e*Math.SQRT1_2+n*Math.SQRT1_2,-e*Math.SQRT1_2+n*Math.SQRT1_2,t*Math.SQRT1_2+r*Math.SQRT1_2,-t*Math.SQRT1_2+r*Math.SQRT1_2],[v,w,x,S]=[f+u,m+p,y+h,b+g],[k,N,_,R]=[v*Math.SQRT1_2-w*Math.SQRT1_2,v*Math.SQRT1_2+w*Math.SQRT1_2,x*Math.SQRT1_2-S*Math.SQRT1_2,x*Math.SQRT1_2+S*Math.SQRT1_2],T="from"===i?y+h:f+u,C="from"===i?m+p:b+g,[j,O]=[T*Math.SQRT1_2-C*Math.SQRT1_2,T*Math.SQRT1_2+C*Math.SQRT1_2];return ru(`M ${k} ${N} L ${j} ${O} L ${_} ${R}`,l)},icon:i.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:i.jsx("path",{d:"M9,6L15,12L9,18",stroke:"currentColor",fill:"none"})}),defaultAttrs:lu,attrsComponent:e=>{var t,n,r;const{id:o,attrs:a,handleAttrsUpdate:s,recalculateParallelIndex:l,parallelIndex:c}=e,{t:d}=$e(),u=vp(),p=md(window.graph,Nc.RotatePerpendicular,o),h=c>=0&&p!==o,g=[{type:"select",label:d("panel.details.lines.common.startFrom"),value:a.startFrom,options:{from:d("panel.details.lines.common.from"),to:d("panel.details.lines.common.to")},onChange:e=>{l(o,e),a.startFrom=e,s(o,a)},minW:"full"},{type:"input",label:d("panel.details.lines.common.offsetFrom"),value:(null!==(t=a.offsetFrom)&&void 0!==t?t:lu.offsetFrom).toString(),variant:"number",onChange:e=>{Number.isNaN(e)&&(e="0"),a.offsetFrom=Number(e),s(o,a)},isDisabled:h,minW:"full"},{type:"input",label:d("panel.details.lines.common.offsetTo"),value:(null!==(n=a.offsetTo)&&void 0!==n?n:lu.offsetTo).toString(),variant:"number",onChange:e=>{Number.isNaN(e)&&(e="0"),a.offsetTo=Number(e),s(o,a)},isDisabled:h,minW:"full"},{type:"input",label:d("panel.details.lines.common.roundCornerFactor"),value:(null!==(r=null==a?void 0:a.roundCornerFactor)&&void 0!==r?r:lu.roundCornerFactor).toString(),variant:"number",onChange:e=>{(Number.isNaN(e)||Number(e)<0)&&(e="0"),a.roundCornerFactor=Number(e),s(o,a)},isDisabled:h,minW:"full"}];return h&&g.unshift({type:"custom",label:d("panel.details.lines.common.parallelDisabled"),component:i.jsxs(J,{size:"sm",variant:"link",onClick:()=>u(Gd(new Set([p]))),children:[d("panel.details.lines.common.changeInBaseLine")," ",p]})}),i.jsx(Al,{fields:g})},metadata:{displayName:"panel.details.lines.rotatePerpendicular.displayName"}};var du=e("S",(e=>(e.ShmetroBasic="shmetro-basic",e.ShmetroBasic2020="shmetro-basic-2020",e.ShmetroInt="shmetro-int",e.ShmetroOutOfSystemInt="shmetro-osysi",e.ShanghaiSuburbanRailway="sh-sub-rwy",e.GzmtrBasic="gzmtr-basic",e.GzmtrInt="gzmtr-int",e.GzmtrInt2024="gzmtr-int-2024",e.BjsubwayBasic="bjsubway-basic",e.BjsubwayInt="bjsubway-int",e.MTR="mtr",e.SuzhouRTBasic="suzhourt-basic",e.SuzhouRTInt="suzhourt-int",e.KunmingRTBasic="kunmingrt-basic",e.KunmingRTInt="kunmingrt-int",e.MRTBasic="mrt-basic",e.MRTInt="mrt-int",e.JREastBasic="jr-east-basic",e.JREastImportant="jr-east-imp",e.FoshanMetroBasic="foshan-metro-basic",e.QingdaoMetroStation="qingdao-metro-basic",e.TokyoMetroBasic="tokyo-metro-basic",e.TokyoMetroInt="tokyo-metro-int",e.LondonTubeBasic="london-tube-basic",e.LondonTubeInt="london-tube-int",e.GuangdongIntercityRailway="gd-intercity-rwy",e))(du||{}));e("aG",["shmetro-basic-2020","gzmtr-basic","suzhourt-basic","kunmingrt-basic","mrt-basic","foshan-metro-basic","qingdao-metro-basic"]),e("aS",{names:["车站","Stn"]});class uu{static hexToRgb(e){return[parseInt(e.slice(1,3),16),parseInt(e.slice(3,5),16),parseInt(e.slice(5,7),16)]}static fade(e,t){return`rgba(${[...this.hexToRgb(e),t].join(",")})`}static euclideanDistance(e,t){return this.hexToRgb(e).reduce(((e,n,r)=>e+Math.pow(n-this.hexToRgb(t)[r],2)),0)}}function pu(e){return Le({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2z"},child:[]}]})(e)}function hu(e){return Le({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M16 17.01V10h-2v7.01h-3L15 21l4-3.99h-3zM9 3 5 6.99h3V14h2V6.99h3L9 3zm7 14.01V10h-2v7.01h-3L15 21l4-3.99h-3zM9 3 5 6.99h3V14h2V6.99h3L9 3z"},child:[]}]})(e)}function gu(e){const{theme:t,onClick:n}=e,{t:r}=$e();return i.jsx(be,{"aria-label":r("Color"),color:t[3],bg:t[2],size:"md",_hover:{bg:uu.fade(t[2],.7)},icon:i.jsx(pu,{}),onClick:n})}const fu=e("aN",(e=>{var t;const{type:n,colorKey:r="color",defaultTheme:o}=e,a=vp(),{selected:s,paletteAppClip:{output:l}}=wp((e=>e.runtime)),[c]=s,d=Pe.useCallback((()=>{a(Id()),a($d()),a(Ld(u.current.export()))}),[a,Id,$d,Ld]),u=Pe.useRef(window.graph),[p,h,g]=[].concat(Object.values(du)).concat(Object.values(jc)).find((e=>n===e))?[u.current.hasNode,u.current.getNodeAttribute,u.current.mergeNodeAttributes]:[u.current.hasEdge,u.current.getEdgeAttribute,u.current.mergeEdgeAttributes],[f,m]=Pe.useState(!1);Pe.useEffect((()=>{f&&l&&((e=>{if(c&&p.bind(u.current)(c)){const t=h.bind(u.current)(c,n);t[r]=e,g.bind(u.current)(c,{[n]:t}),d()}})(l),m(!1))}),[null==l?void 0:l.toString()]);const y=c&&p.bind(u.current)(c)&&(c.startsWith("stn")||c.startsWith("misc_node")?u.current.getNodeAttribute(c,"type")===n:u.current.getEdgeAttribute(c,"style")===n)?(null!==(t=h.bind(u.current)(c,n))&&void 0!==t?t:{[r]:o})[r]:o;return i.jsx(i.Fragment,{children:i.jsx(gu,{theme:y,onClick:()=>{m(!0),a(Qd(y))}})})})),mu={color:[ic.Shanghai,"sh1","#E4002B",pc.white]},yu=e("ax",{component:e=>{const{id:t,path:n,styleAttrs:r,newLine:o,handlePointerDown:a}=e,{color:s=mu.color}=null!=r?r:mu,l=Pe.useCallback((e=>a(t,e)),[t,a]);return i.jsx("path",{id:t,d:n,fill:"none",stroke:s[2],strokeWidth:"5",strokeLinecap:"round",cursor:"pointer",onPointerDown:o?void 0:l,pointerEvents:o?"none":void 0})},defaultAttrs:mu,attrsComponent:e=>{const t=[{type:"custom",label:"color",component:i.jsx(fu,{type:_c.SingleColor,defaultTheme:mu.color})}];return i.jsx(Al,{fields:t})},metadata:{displayName:"panel.details.lines.singleColor.displayName",supportLinePathType:[Nc.Diagonal,Nc.Perpendicular,Nc.RotatePerpendicular]}}),bu={component:e=>{const{id:t,path:n,handlePointerDown:r}=e,o=Pe.useCallback((e=>r(t,e)),[t,r]);return i.jsxs("g",{id:t,onPointerDown:o,cursor:"pointer",children:[i.jsx("path",{d:n,fill:"none",stroke:"black",strokeWidth:"7",strokeLinecap:"round"}),i.jsx("path",{d:n,fill:"none",stroke:"white",strokeWidth:"4.33",strokeLinecap:"round"})]})},defaultAttrs:{},attrsComponent:()=>{},metadata:{displayName:"panel.details.lines.shmetroVirtualInt.displayName",supportLinePathType:[Nc.Diagonal,Nc.Perpendicular,Nc.RotatePerpendicular,Nc.Simple]}},vu={isEnd:!1},wu={component:e=>{const{id:t,path:n,styleAttrs:r,handlePointerDown:o}=e,{isEnd:a=vu.isEnd}=r,s=Pe.useCallback((e=>o(t,e)),[t,o]),l=a?"round":void 0;return i.jsxs("g",{id:t,onPointerDown:s,cursor:"pointer",children:[i.jsx("path",{d:n,fill:"none",stroke:"#666464",strokeWidth:"5",strokeLinecap:l}),i.jsx("path",{d:n,fill:"none",stroke:"white",strokeWidth:"2",strokeLinecap:"round"})]})},defaultAttrs:vu,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:r}=e,{t:o}=$e(),a=[{type:"switch",label:o("panel.details.lines.shanghaiSuburbanRailway.isEnd"),isChecked:n.isEnd,onChange:e=>{n.isEnd=e,r(t,n)},oneLine:!0,minW:"full"}];return i.jsx(Al,{fields:a})},metadata:{displayName:"panel.details.lines.shanghaiSuburbanRailway.displayName",supportLinePathType:[Nc.Diagonal,Nc.Perpendicular,Nc.RotatePerpendicular]}},xu={component:e=>{const{id:t,path:n,handlePointerDown:r}=e,o=Pe.useCallback((e=>r(t,e)),[t,r]);return i.jsx("path",{id:t,d:n,fill:"none",stroke:"#565656",strokeWidth:"3",strokeDasharray:"3",cursor:"pointer",onPointerDown:o})},defaultAttrs:{},attrsComponent:()=>null,metadata:{displayName:"panel.details.lines.gzmtrVirtualInt.displayName",supportLinePathType:[Nc.Diagonal,Nc.Perpendicular,Nc.RotatePerpendicular,Nc.Simple]}},Su={color:[ic.Shanghai,"jsr","#000000",pc.white]},ku={component:e=>{const{id:t,path:n,styleAttrs:r,handlePointerDown:o}=e,{color:a=Su.color}=null!=r?r:Su,s=Pe.useCallback((e=>o(t,e)),[t,o]);return i.jsxs("g",{id:t,onPointerDown:s,cursor:"pointer",children:[i.jsx("path",{d:n,fill:"none",stroke:a[2],strokeWidth:"5",strokeLinecap:"round"}),i.jsx("path",{d:n,fill:"none",stroke:a[3],strokeWidth:"4.67",strokeDasharray:"17.5"})]})},defaultAttrs:Su,attrsComponent:e=>{const{t:t}=$e(),n=[{type:"custom",label:t("color"),component:i.jsx(fu,{type:_c.ChinaRailway,defaultTheme:Su.color})}];return i.jsx(Al,{fields:n})},metadata:{displayName:"panel.details.lines.chinaRailway.displayName",supportLinePathType:[Nc.Diagonal,Nc.Perpendicular,Nc.RotatePerpendicular]}},Nu={color:[ic.Beijing,"bj1","#c23a30",pc.white]},_u={component:e=>{const{id:t,path:n,styleAttrs:r,handlePointerDown:o}=e,{color:a=Nu.color}=null!=r?r:Nu,s=Pe.useCallback((e=>o(t,e)),[t,o]);return i.jsxs("g",{id:t,onPointerDown:s,cursor:"pointer",children:[i.jsx("path",{d:n,fill:"none",stroke:"white",strokeWidth:"6",strokeLinecap:"round"}),i.jsx("path",{d:n,fill:"none",stroke:a[2],strokeWidth:"5",strokeLinecap:"round"})]})},defaultAttrs:Nu,attrsComponent:e=>{$e();const t=[{type:"custom",label:"color",component:i.jsx(fu,{type:_c.BjsubwaySingleColor,defaultTheme:Nu.color})}];return i.jsx(Al,{fields:t})},metadata:{displayName:"panel.details.lines.bjsubwaySingleColor.displayName",supportLinePathType:[Nc.Diagonal,Nc.Perpendicular,Nc.RotatePerpendicular]}},Ru=e("aM",(e=>{const{t:t}=$e(),n=vp(),{selected:r}=wp((e=>e.runtime)),[o]=r,a=Pe.useRef(window.graph),s=[];if(1===r.size&&a.current.hasNode(o)){const r=a.current.getNodeAttribute(o,"type"),i=a.current.getNodeAttribute(o,r);s.push(...e.fields.filter((e=>"custom"!==e.type)).map((e=>{var s,l,c;return{type:e.type,label:t(e.label),value:null===(s=e.value)||void 0===s?void 0:s.call(e,i),isChecked:null===(l=e.isChecked)||void 0===l?void 0:l.call(e,i),hidden:null===(c=e.hidden)||void 0===c?void 0:c.call(e,i),options:e.options,disabledOptions:e.disabledOptions&&e.disabledOptions(i),validator:e.validator,oneLine:e.oneLine,onChange:s=>{let l;try{l=e.onChange(s,i)}catch(c){return void n(eu({status:"error",message:t(`err-code.${c}`)}))}a.current.mergeNodeAttributes(o,{[r]:l}),n(Id()),n(Ld(a.current.export()))}}})),...e.fields.filter((e=>"custom"===e.type)).map((e=>({...e,label:t(e.label)}))))}if(1===r.size&&a.current.hasEdge(o)&&"style"!==e.type){const r=a.current.getEdgeAttribute(o,"type"),i=a.current.getEdgeAttribute(o,r);s.push(...e.fields.map((e=>({type:e.type,label:t(e.label),value:e.value(i),options:e.options,disabledOptions:e.disabledOptions&&e.disabledOptions(i),validator:e.validator,onChange:t=>{a.current.mergeEdgeAttributes(o,{[r]:e.onChange(t,i)}),n($d()),n(Ld(a.current.export()))}}))))}if(1===r.size&&a.current.hasEdge(o)&&"style"===e.type){const r=a.current.getEdgeAttribute(o,"style"),i=a.current.getEdgeAttribute(o,r);s.push(...e.fields.filter((e=>"custom"!==e.type)).map((e=>({type:e.type,label:t(e.label),value:e.value(i),options:e.options,disabledOptions:e.disabledOptions&&e.disabledOptions(i),validator:e.validator,onChange:t=>{a.current.mergeEdgeAttributes(o,{[r]:e.onChange(t,i)}),n($d()),n(Ld(a.current.export()))}}))),...e.fields.filter((e=>"custom"===e.type)).map((e=>({...e,label:t(e.label)}))))}return i.jsx(Al,{fields:s,minW:276})})),Tu={color:[ic.Beijing,"bj1","#c23a30",pc.white]},Cu=[{type:"custom",label:"color",component:i.jsx(fu,{type:_c.BjsubwayTram,defaultTheme:Tu.color})}],ju={component:e=>{const{id:t,path:n,styleAttrs:r,handlePointerDown:o}=e,{color:a=Tu.color}=null!=r?r:Tu,s=Pe.useCallback((e=>o(t,e)),[t,o]);return i.jsxs("g",{id:t,onPointerDown:s,cursor:"pointer",children:[i.jsx("path",{d:n,fill:"none",stroke:a[2],strokeWidth:"5"}),i.jsx("path",{d:n,fill:"none",stroke:"white",strokeWidth:"1.67"})]})},defaultAttrs:Tu,attrsComponent:()=>i.jsx(Ru,{fields:Cu,type:"style"}),metadata:{displayName:"panel.details.lines.bjsubwayTram.displayName",supportLinePathType:[Nc.Diagonal,Nc.Perpendicular,Nc.RotatePerpendicular]}},Ou={colorA:[ic.Shanghai,"maglevA","#008B9A",pc.white],colorB:[ic.Shanghai,"maglevB","#F5A74E",pc.white]},Lu=()=>{const{t:e}=$e(),t=vp(),{selected:n}=wp((e=>e.runtime)),[r]=n,o=Pe.useRef(window.graph);return i.jsx(be,{"aria-label":e("panel.details.lines.dualColor.swap"),icon:i.jsx(hu,{}),size:"sm",onClick:()=>{var e;const n=null!==(e=o.current.getEdgeAttribute(r,_c.DualColor))&&void 0!==e?e:Ou,i=n.colorA;n.colorA=n.colorB,n.colorB=i,o.current.mergeEdgeAttributes(r,{[_c.DualColor]:n}),t($d()),t(Ld(o.current.export()))}})},Au={component:e=>{const{id:t,type:n,path:r,styleAttrs:o,handlePointerDown:a}=e,{colorA:s=Ou.colorA,colorB:l=Ou.colorB}=null!=o?o:Ou,c=Pe.useCallback((e=>a(t,e)),[t,a]),[d,u]=Pe.useState(r),[p,h]=Pe.useState(r);return Pe.useEffect((()=>{const e=ld(r,n,-1.25,1.25);e&&(u(e[0]),h(e[1]))}),[r]),i.jsxs("g",{id:t,onPointerDown:c,cursor:"pointer",children:[i.jsx("path",{d:d,fill:"none",stroke:s[2],strokeWidth:"2.5",strokeLinecap:"round"}),i.jsx("path",{d:p,fill:"none",stroke:l[2],strokeWidth:"2.5",strokeLinecap:"round"})]})},defaultAttrs:Ou,attrsComponent:e=>{const t=[{type:"custom",label:"panel.details.lines.dualColor.swap",component:i.jsx(Lu,{})},{type:"custom",label:"panel.details.lines.dualColor.colorA",component:i.jsx(fu,{type:_c.DualColor,colorKey:"colorA",defaultTheme:Ou.colorA})},{type:"custom",label:"panel.details.lines.dualColor.colorB",component:i.jsx(fu,{type:_c.DualColor,colorKey:"colorB",defaultTheme:Ou.colorB})}];return i.jsx(Al,{fields:t})},metadata:{displayName:"panel.details.lines.dualColor.displayName",supportLinePathType:[Nc.Diagonal,Nc.Perpendicular,Nc.RotatePerpendicular]}},Eu={color:[ic.Shanghai,"river","#B9E3F9",pc.white],width:20},Mu=[{type:"input",label:"panel.details.lines.river.width",variant:"number",value:e=>(null!=e?e:Eu).width,onChange:(e,t)=>{const n=null!=t?t:Eu;return n.width=Number(e),n}}],Pu={component:e=>{const{id:t,path:n,styleAttrs:r,handlePointerDown:o}=e,{color:a=Eu.color,width:s=Eu.width}=null!=r?r:Eu,l=Pe.useCallback((e=>o(t,e)),[t,o]);return i.jsx("path",{id:t,d:n,fill:"none",stroke:a[2],strokeWidth:s,strokeLinecap:"round",cursor:"pointer",onPointerDown:l})},defaultAttrs:Eu,attrsComponent:()=>i.jsx(Ru,{fields:Mu,type:"style"}),metadata:{displayName:"panel.details.lines.river.displayName",supportLinePathType:[Nc.Diagonal,Nc.Perpendicular,Nc.RotatePerpendicular,Nc.Simple]}},Iu={color:[ic.Hongkong,"twl","#E2231A",pc.white]},$u=[{type:"custom",label:"color",component:i.jsx(fu,{type:_c.MTRRaceDays,defaultTheme:Iu.color})}],zu={component:e=>{const{id:t,path:n,styleAttrs:r,handlePointerDown:o}=e,{color:a=Iu.color}=null!=r?r:Iu,s=Pe.useCallback((e=>o(t,e)),[t,o]);return i.jsx("path",{id:t,d:n,fill:"none",stroke:a[2],strokeWidth:"5",strokeLinecap:"butt",strokeDasharray:"5 2.5",cursor:"pointer",onPointerDown:s})},defaultAttrs:Iu,attrsComponent:()=>i.jsx(Ru,{fields:$u,type:"style"}),metadata:{displayName:"panel.details.lines.mtrRaceDays.displayName",supportLinePathType:[Nc.Diagonal,Nc.Perpendicular,Nc.RotatePerpendicular]}},Bu={color:[ic.Hongkong,"lrl","#CD9700",pc.white]},Du=[{type:"custom",label:"color",component:i.jsx(fu,{type:_c.MTRLightRail,defaultTheme:Bu.color})}],Gu={component:e=>{const{id:t,path:n,styleAttrs:r,handlePointerDown:o}=e,{color:a=Bu.color}=null!=r?r:Bu,s=Pe.useCallback((e=>o(t,e)),[t,o]);return i.jsx("path",{id:t,d:n,fill:"none",stroke:a[2],strokeWidth:"2.5",strokeLinecap:"round",cursor:"pointer",onPointerDown:s})},defaultAttrs:Bu,attrsComponent:()=>i.jsx(Ru,{fields:Du,type:"style"}),metadata:{displayName:"panel.details.lines.mtrLightRail.displayName",supportLinePathType:[Nc.Diagonal,Nc.Perpendicular,Nc.RotatePerpendicular]}},Fu={component:e=>{const{id:t,path:n,handlePointerDown:r}=e,o=Pe.useCallback((e=>r(t,e)),[t,r]);return i.jsx("path",{id:t,d:n,fill:"none",stroke:"black",strokeWidth:"1.33",strokeDasharray:"2.66 1.33",cursor:"pointer",onPointerDown:o})},defaultAttrs:{},attrsComponent:()=>{},metadata:{displayName:"panel.details.lines.mtrUnpaidArea.displayName",supportLinePathType:[Nc.Diagonal,Nc.Perpendicular,Nc.RotatePerpendicular,Nc.Simple]}},Uu={component:e=>{const{id:t,path:n,handlePointerDown:r}=e,o=Pe.useCallback((e=>r(t,e)),[t,r]);return i.jsx("path",{id:t,d:n,fill:"none",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",cursor:"pointer",onPointerDown:o})},defaultAttrs:{},attrsComponent:()=>i.jsx(Ru,{fields:[],type:"style"}),metadata:{displayName:"panel.details.lines.mtrPaidArea.displayName",supportLinePathType:[Nc.Diagonal,Nc.Perpendicular,Nc.RotatePerpendicular,Nc.Simple]}},Wu={color:[ic.Beijing,"bj1","#c23a30",pc.white]},Vu={component:e=>{const{id:t,path:n,styleAttrs:r,handlePointerDown:o}=e,{color:a=Wu.color}=null!=r?r:Wu,s=Pe.useCallback((e=>o(t,e)),[t,o]),l=ce("white","var(--chakra-colors-gray-800)");return i.jsxs("g",{id:t,onPointerDown:s,cursor:"pointer",children:[i.jsx("path",{d:n,fill:"none",stroke:a[2],strokeWidth:"5",strokeDasharray:"2 2"}),i.jsx("path",{d:n,fill:"none",stroke:l,strokeWidth:"3.4"})]})},defaultAttrs:Wu,attrsComponent:e=>{$e();const t=[{type:"custom",label:"color",component:i.jsx(fu,{type:_c.BjsubwayDotted,defaultTheme:Wu.color})}];return i.jsx(Al,{fields:t})},metadata:{displayName:"panel.details.lines.bjsubwayDotted.displayName",supportLinePathType:[Nc.Diagonal,Nc.Perpendicular,Nc.RotatePerpendicular]}},Hu={color:[ic.Singapore,"ewl","#009739",pc.white]},Ju={component:e=>{const{id:t,path:n,styleAttrs:r,handlePointerDown:o}=e,{color:a=Hu.color}=null!=r?r:Hu,s=Pe.useCallback((e=>o(t,e)),[t,o]);return i.jsx("path",{id:t,d:n,fill:"none",stroke:a[2],strokeWidth:"5",strokeDasharray:"0 10",strokeLinecap:"round",cursor:"pointer",onPointerDown:s})},defaultAttrs:Hu,attrsComponent:e=>{$e();const t=[{type:"custom",label:"color",component:i.jsx(fu,{type:_c.MRTUnderConstruction,defaultTheme:Hu.color})}];return i.jsx(Al,{fields:t})},metadata:{displayName:"panel.details.lines.mrtUnderConstruction.displayName",supportLinePathType:[Nc.Diagonal,Nc.Perpendicular,Nc.RotatePerpendicular]}},qu={component:e=>{const{id:t,path:n,handlePointerDown:r}=e,o=Pe.useCallback((e=>r(t,e)),[t,r]);return i.jsx("path",{id:t,d:n,fill:"none",stroke:"black",strokeWidth:"5",strokeDasharray:"0 10 10 10",strokeLinecap:"round",cursor:"pointer",onPointerDown:o})},defaultAttrs:{},attrsComponent:e=>null,metadata:{displayName:"panel.details.lines.mrtSentosaExpress.displayName",supportLinePathType:[Nc.Diagonal,Nc.Perpendicular,Nc.RotatePerpendicular]}},Ku={color:[ic.Tokyo,"jy","#9ACD32",pc.black]},Yu={component:e=>{const{id:t,path:n,styleAttrs:r,newLine:o,handlePointerDown:a}=e,{color:s=Ku.color}=null!=r?r:Ku,l=Pe.useCallback((e=>a(t,e)),[t,a]);return i.jsxs("g",{id:t,onPointerDown:l,cursor:"pointer",children:[i.jsx("path",{d:n,fill:"none",stroke:"black",strokeWidth:"5.1"}),i.jsx("path",{d:n,fill:"none",stroke:s[2],strokeWidth:"4.9"})]})},defaultAttrs:Ku,attrsComponent:e=>{const{t:t}=$e(),n=[{type:"custom",label:t("color"),component:i.jsx(fu,{type:_c.JREastSingleColor,defaultTheme:Ku.color})}];return i.jsx(Al,{fields:n})},metadata:{displayName:"panel.details.lines.jrEastSingleColor.displayName",supportLinePathType:[Nc.Diagonal,Nc.Perpendicular,Nc.RotatePerpendicular]}},Qu=5*Math.SQRT1_2,Zu=.25,Xu=(Qu*Math.SQRT2-Zu)/2*Math.SQRT2,ep={color:[ic.Tokyo,"jy","#9ACD32",pc.black]},tp={component:e=>{const{id:t,type:n,path:r,styleAttrs:o,newLine:a,handlePointerDown:s}=e,{color:l=ep.color}=null!=o?o:ep,c=Pe.useCallback((e=>s(t,e)),[t,s]),[d,u]=Pe.useState({outline:r,pA:r,pB:r});return Pe.useEffect((()=>{const e=((e,t,n,r)=>{var o;r=null!==(o=r)&&void 0!==o?o:-n;const[i,a]=cd(e);if(!i||!a)return;if(i[0]===a[0]||i[1]===a[1]||t===Nc.Diagonal&&Math.abs(i[1]-a[1])===Math.abs(i[0]-a[0])){const e=Math.abs(n),[t,r]=dd(i,a,e);return{outline:ud(i,a,e),pA:t,pB:r}}const[s,l]=pd(e);if(!s||!l)return;const c=new sd([...s,...l]),[d,u]=[c.scale(n),c.scale(r)],p=gd(i,s,a,c,d,u);if(!p)return;const{mA:[h,g],mB:[f,m],endA:[y,b],endB:[v,w]}=p,[x,S]=pd(u.toSVG().replace("M","L")),[k,N]=hd(x,S);return{outline:`M ${h} ${g} ${d.toSVG().replace("M","L")} L ${y} ${b} L ${v} ${w} L ${k.join(" ")} C ${N.join(" ")} L ${f} ${m} Z`,pA:`M ${h} ${g} ${d.toSVG().replace("M","L")} L ${y} ${b}`,pB:`M ${f} ${m} ${u.toSVG().replace("M","L")} L ${v} ${w}`}})(r,n,-2.5,2.5);e&&u(e)}),[r]),i.jsxs("g",{id:t,onPointerDown:c,cursor:"pointer",children:[i.jsxs("defs",{children:[i.jsxs("clipPath",{id:"jr_east_fill_pattern_clip_path",patternUnits:"userSpaceOnUse",children:[i.jsx("polygon",{points:`0,0 0,${Xu} ${Xu},0`}),i.jsx("polygon",{points:`${Qu},${Qu} ${Qu-Xu},${Qu} ${Qu},${Qu-Xu}`})]}),i.jsxs("pattern",{id:`jr_east_${t}_fill_pattern_${l[2]}`,width:Qu,height:Qu,patternUnits:"userSpaceOnUse",children:[i.jsx("rect",{width:Qu,height:Qu,fill:l[2]}),i.jsx("line",{x1:"0",y1:"0",x2:Qu,y2:Qu,stroke:"white",strokeWidth:Zu,strokeOpacity:"50%",clipPath:"url(#jr_east_fill_pattern_clip_path)"}),i.jsx("line",{x1:Qu,y1:"0",x2:"0",y2:Qu,stroke:"white",strokeWidth:Zu,strokeOpacity:"50%"})]})]}),i.jsx("path",{d:d.outline,fill:`url(#jr_east_${t}_fill_pattern_${l[2]})`}),i.jsx("path",{d:d.pA,fill:"none",stroke:"black",strokeWidth:"0.1"}),i.jsx("path",{d:d.pB,fill:"none",stroke:"black",strokeWidth:"0.1"})]})},defaultAttrs:ep,attrsComponent:e=>{const{t:t}=$e(),n=[{type:"custom",label:t("color"),component:i.jsx(fu,{type:_c.JREastSingleColorPattern,defaultTheme:ep.color})}];return i.jsx(Al,{fields:n})},metadata:{displayName:"panel.details.lines.jrEastSingleColorPattern.displayName",supportLinePathType:[Nc.Diagonal,Nc.Perpendicular,Nc.RotatePerpendicular]}},np={color:[ic.Singapore,"lrt","#708573",pc.white]},rp={component:e=>{const{id:t,path:n,styleAttrs:r,handlePointerDown:o}=e,{color:a=np.color}=null!=r?r:np,s=Pe.useCallback((e=>o(t,e)),[t,o]);return i.jsx("path",{id:t,d:n,fill:"none",stroke:a[2],strokeWidth:"2.157",strokeLinecap:"round",cursor:"pointer",onPointerDown:s})},defaultAttrs:np,attrsComponent:e=>{const t=[{type:"custom",label:"color",component:i.jsx(fu,{type:_c.LRTSingleColor,defaultTheme:np.color})}];return i.jsx(Al,{fields:t})},metadata:{displayName:"panel.details.lines.lrtSingleColor.displayName",supportLinePathType:[Nc.Diagonal,Nc.Perpendicular,Nc.RotatePerpendicular]}},op=(e,t)=>{if(e===du.LondonTubeBasic){var n;const{stepFreeAccess:e}=null!==(n=t[du.LondonTubeBasic])&&void 0!==n?n:{stepFreeAccess:"none"};if("none"!==e)return 7.5}if(e===du.LondonTubeInt){var r;const{stepFreeAccess:e}=null!==(r=t[du.LondonTubeInt])&&void 0!==r?r:{stepFreeAccess:"none"};if("none"!==e)return 7.5}return 5},ip={component:e=>{const{id:t,path:n,handlePointerDown:r}=e,o=Pe.useCallback((e=>r(t,e)),[t,r]);return i.jsx("g",{id:t,onPointerDown:o,cursor:"pointer",children:i.jsx("path",{d:n,fill:"none",stroke:"black",strokeWidth:"7.5",strokeLinecap:"round"})})},postComponent:e=>{const{id:t,path:n,handlePointerDown:r}=e,o=Pe.useCallback((e=>r(t,e)),[t,r]),[a,s]=window.graph.extremities(t),l=window.graph.getNodeAttribute(a,"x"),c=window.graph.getNodeAttribute(a,"y"),d=window.graph.getNodeAttribute(s,"x"),u=window.graph.getNodeAttribute(s,"y"),p=Math.min(l,d)-10,h=Math.min(c,u)-10,g=Math.abs(l-d)+20,f=Math.abs(c-u)+20,m=op(window.graph.getNodeAttribute(a,"type"),window.graph.getNodeAttributes(a)),y=op(window.graph.getNodeAttribute(s,"type"),window.graph.getNodeAttributes(s));return i.jsxs("g",{id:`${t}.post`,onPointerDown:o,cursor:"pointer",children:[i.jsxs("mask",{id:`tube_stn_icon_inner_${t}`,x:p,y:h,width:g,height:f,maskUnits:"userSpaceOnUse",children:[i.jsx("rect",{x:p,y:h,width:g,height:f,fill:"white"}),i.jsx("circle",{cx:l,cy:c,r:m-.05,fill:"black"}),i.jsx("circle",{cx:d,cy:u,r:y-.05,fill:"black"})]}),i.jsx("path",{d:n,fill:"none",stroke:"white",strokeWidth:"2.5",strokeLinecap:"round",mask:`url(#tube_stn_icon_inner_${t})`})]})},defaultAttrs:{},attrsComponent:()=>{},metadata:{displayName:"panel.details.lines.londonTubeInternalInt.displayName",supportLinePathType:[Nc.Diagonal,Nc.Perpendicular,Nc.RotatePerpendicular]}},ap={component:e=>{const{id:t,path:n,handlePointerDown:r}=e,o=Pe.useCallback((e=>r(t,e)),[t,r]);return i.jsx("path",{d:n,fill:"none",stroke:"black",strokeWidth:"5",strokeDasharray:"5 2.5",cursor:"pointer",onPointerDown:o})},defaultAttrs:{},attrsComponent:()=>{},metadata:{displayName:"panel.details.lines.londonTube10MinWalk.displayName",supportLinePathType:[Nc.Diagonal,Nc.Perpendicular,Nc.RotatePerpendicular]}},sp={color:[ic.London,"central","#DC241F",pc.white]},lp={component:e=>{const{id:t,path:n,styleAttrs:r,handlePointerDown:o}=e,{color:a=sp.color}=null!=r?r:sp,s=Pe.useCallback((e=>o(t,e)),[t,o]);return i.jsx("path",{id:t,d:n,fill:"none",stroke:a[2],strokeWidth:"5",cursor:"pointer",onPointerDown:s})},defaultAttrs:sp,attrsComponent:e=>{const{t:t}=$e(),n=[{type:"custom",label:t("color"),component:i.jsx(fu,{type:_c.LondonTubeTerminal,defaultTheme:sp.color})}];return i.jsx(Al,{fields:n})},metadata:{displayName:"panel.details.lines.londonTubeTerminal.displayName",supportLinePathType:[Nc.Diagonal,Nc.Perpendicular,Nc.RotatePerpendicular]}},cp={color:[ic.Guangzhou,"ir","#2559a8",pc.white]},dp={component:e=>{const{id:t,path:n,styleAttrs:r,handlePointerDown:o}=e,{color:a=cp.color}=null!=r?r:cp;console.log(r);const s=Pe.useCallback((e=>o(t,e)),[t,o]);return i.jsxs("g",{id:t,onPointerDown:s,cursor:"pointer",children:[i.jsx("path",{d:n,fill:"none",stroke:a[2],strokeWidth:"5",strokeLinecap:"round"}),i.jsx("path",{d:n,fill:"none",stroke:a[3],strokeWidth:"2.5",strokeDasharray:"7.5"})]})},defaultAttrs:cp,attrsComponent:()=>{},metadata:{displayName:"panel.details.lines.guangdongIntercityRailway.displayName",supportLinePathType:[Nc.Diagonal,Nc.Perpendicular,Nc.RotatePerpendicular]}},up=e("l",{[Nc.Diagonal]:iu,[Nc.Perpendicular]:su,[Nc.RotatePerpendicular]:cu,[Nc.Simple]:Tc}),pp=e("ap",{[_c.SingleColor]:yu,[_c.ShmetroVirtualInt]:bu,[_c.ShanghaiSuburbanRailway]:wu,[_c.GzmtrVirtualInt]:xu,[_c.ChinaRailway]:ku,[_c.BjsubwaySingleColor]:_u,[_c.BjsubwayTram]:ju,[_c.BjsubwayDotted]:Vu,[_c.DualColor]:Au,[_c.River]:Pu,[_c.MTRRaceDays]:zu,[_c.MTRLightRail]:Gu,[_c.MTRUnpaidArea]:Fu,[_c.MTRPaidArea]:Uu,[_c.MRTUnderConstruction]:Ju,[_c.MRTSentosaExpress]:qu,[_c.JREastSingleColor]:Yu,[_c.JREastSingleColorPattern]:tp,[_c.LRTSingleColor]:rp,[_c.LondonTubeTerminal]:lp,[_c.LondonTubeInternalInt]:ip,[_c.LondonTube10MinWalk]:ap,[_c.GuangdongIntercityRailway]:dp}),hp=e("I",(async()=>JSON.stringify((await Po((async()=>{const{default:e}=await n.import("./tutorial-legacy-DHxnaVOs.js");return{default:e}}))).default))),gp=e("x",(async e=>{let t=!1;e||(e=await hp(),t=!0);let n=JSON.parse(e);"version"in n&&Number.isInteger(n.version)||(n=JSON.parse(await hp()),t=!0);let r=Number(n.version),o=JSON.stringify(n);for(;r in mp;)o=mp[r](o),r=Number(JSON.parse(o).version),t=!0;return t&&(console.warn(`Upgrade save from version: ${n.version} to version: ${r}`),localStorage.setItem(oc.PARAM_BACKUP,e)),o})),fp=e("s",(e=>{const{present:t,past:n,future:r,...o}=e,i={...o,graph:t,version:42};return JSON.stringify(i)})),mp={0:e=>{var t;return JSON.stringify({version:1,graph:null===(t=JSON.parse(e))||void 0===t?void 0:t.graph,svgViewBoxZoom:100,svgViewBoxMin:{x:0,y:0}})},1:e=>{const t=JSON.parse(e),n=new Oo;return n.import(null==t?void 0:t.graph),n.filterNodes(((e,t)=>e.startsWith("stn")&&t.type!==du.GzmtrInt)).forEach((e=>{const t=n.getNodeAttribute(e,"type"),r=n.getNodeAttribute(e,t);r&&"transfer"in r&&delete r.transfer,n.mergeNodeAttributes(e,{[t]:r})})),JSON.stringify({...t,version:2,graph:n.export()})},2:e=>{const t=JSON.parse(e),n=new Oo;return n.import(null==t?void 0:t.graph),n.filterNodes(((e,t)=>e.startsWith("stn"))).forEach((e=>{const t=n.getNodeAttribute(e,"type"),r=n.getNodeAttribute(e,t);"middle"===(null==r?void 0:r.nameOffsetX)&&"middle"===(null==r?void 0:r.nameOffsetY)&&(r.nameOffsetX="right",r.nameOffsetY="top"),"up"===(null==r?void 0:r.nameOffsetY)&&(r.nameOffsetY="top"),n.mergeNodeAttributes(e,{[t]:r})})),JSON.stringify({...t,version:3,graph:n.export()})},3:e=>{const t=JSON.parse(e),n=new Oo;return n.import(null==t?void 0:t.graph),n.filterEdges(((e,t,n,r,o,i,a)=>e.startsWith("line"))).forEach((e=>{const t=n.getEdgeAttribute(e,"color");n.removeEdgeAttribute(e,"color"),n.mergeEdgeAttributes(e,{style:_c.SingleColor,[_c.SingleColor]:{color:t}})})),n.filterEdges(((e,t,n,r,o,i,a)=>e.startsWith("misc_edge"))).forEach((e=>{const t=`line_${kc(10)}`,[r,o]=n.extremities(e),i=n.getEdgeAttribute(e,"type"),a=i;n.addDirectedEdgeWithKey(t,r,o,{visible:!0,zIndex:0,type:Nc.Simple,[i]:structuredClone(up[Nc.Simple].defaultAttrs),style:a,[a]:structuredClone(pp[a].defaultAttrs),reconcileId:""}),n.dropEdge(e)})),JSON.stringify({...t,version:4,graph:n.export()})},4:e=>{const t=JSON.parse(e),n=new Oo;return n.import(null==t?void 0:t.graph),n.filterNodes(((e,t)=>e.startsWith("stn")&&(t.type===du.GzmtrBasic||t.type===du.GzmtrInt))).forEach((e=>{const t=n.getNodeAttribute(e,"type"),r=n.getNodeAttribute(e,t);r.open=!0,r.secondaryNames=["",""],n.mergeNodeAttributes(e,{[t]:r})})),JSON.stringify({...t,version:5,graph:n.export()})},5:e=>{const t=JSON.parse(e),n=new Oo;return n.import(null==t?void 0:t.graph),n.filterEdges(((e,t,n,r,o,i,a)=>e.startsWith("line")&&t.type===Nc.Simple)).forEach((e=>{var t;const r=null!==(t=n.getEdgeAttribute(e,Nc.Simple))&&void 0!==t?t:{offset:0};r.offset=0,n.mergeEdgeAttributes(e,{[Nc.Simple]:r})})),JSON.stringify({...t,version:6,graph:n.export()})},6:e=>{const t=JSON.parse(e),n=new Oo;return n.import(null==t?void 0:t.graph),n.filterNodes(((e,t)=>e.startsWith("stn")&&t.type===du.GzmtrBasic)).forEach((e=>{const t=n.getNodeAttribute(e,"type"),r=n.getNodeAttribute(e,t);r.tram=!1,n.mergeNodeAttributes(e,{[t]:r})})),JSON.stringify({...t,version:7,graph:n.export()})},7:e=>JSON.stringify({...JSON.parse(e),version:8}),8:e=>JSON.stringify({...JSON.parse(e),version:9}),9:e=>JSON.stringify({...JSON.parse(e),version:10}),10:e=>{const t=JSON.parse(e),n=new Oo;return n.import(null==t?void 0:t.graph),n.filterNodes(((e,t)=>e.startsWith("misc_node")&&t.type===jc.Text)).forEach((e=>{const t=n.getNodeAttribute(e,"type"),r=n.getNodeAttribute(e,t);r.color=[ic.Shanghai,"jsr","#000000",pc.white],n.mergeNodeAttributes(e,{[t]:r})})),JSON.stringify({...t,version:11,graph:n.export()})},11:e=>JSON.stringify({...JSON.parse(e),version:12}),12:e=>{const t=JSON.parse(e),n=new Oo;return n.import(null==t?void 0:t.graph),n.filterNodes(((e,t)=>e.startsWith("misc_node")&&t.type===jc.Text)).forEach((e=>{const t=n.getNodeAttribute(e,"type"),r=n.getNodeAttribute(e,t);r.rotate=0,r.italic=!1,n.mergeNodeAttributes(e,{[t]:r})})),JSON.stringify({...t,version:13,graph:n.export()})},13:e=>JSON.stringify({...JSON.parse(e),version:14}),14:e=>JSON.stringify({...JSON.parse(e),version:15}),15:e=>{const t=JSON.parse(e),n=new Oo;return n.import(null==t?void 0:t.graph),n.filterNodes(((e,t)=>e.startsWith("misc_node")&&t.type===jc.Text)).forEach((e=>{const t=n.getNodeAttribute(e,"type"),r=n.getNodeAttribute(e,t);r.italic=r.italic?"italic":"normal",r.bold="normal",n.mergeNodeAttributes(e,{[t]:r})})),JSON.stringify({...t,version:16,graph:n.export()})},16:e=>{const t=JSON.parse(e),n=new Oo;return n.import(null==t?void 0:t.graph),n.filterNodes(((e,t)=>e.startsWith("misc_node")&&t.type===jc.Facilities)).forEach((e=>{const t=n.getNodeAttribute(e,"type"),r=n.getNodeAttribute(e,t);let o=0;switch(r.type){case"airport":case"maglev":case"disney":case"railway":o+=12.5;break;case"hsr":case"airport_hk":case"disney_hk":o+=9.5}n.updateNodeAttribute(e,"y",(e=>(null!=e?e:0)+o))})),JSON.stringify({...t,version:17,graph:n.export()})},17:e=>JSON.stringify({...JSON.parse(e),version:18}),18:e=>JSON.stringify({...JSON.parse(e),version:19}),19:e=>JSON.stringify({...JSON.parse(e),version:20}),20:e=>JSON.stringify({...JSON.parse(e),version:21}),21:e=>JSON.stringify({...JSON.parse(e),version:22}),22:e=>JSON.stringify({...JSON.parse(e),version:23}),23:e=>JSON.stringify({...JSON.parse(e),version:24}),24:e=>{const t=JSON.parse(e),n=new Oo;return n.import(t.graph),n.filterNodes(((e,t)=>e.startsWith("stn")&&t.type===du.GzmtrInt||e.startsWith("misc_node")&&t.type===jc.GzmtrLineBadge)).forEach((e=>{const t=n.getNodeAttribute(e,"type"),r=n.getNodeAttribute(e,t);r.tram=!1,n.mergeNodeAttributes(e,{[t]:r})})),JSON.stringify({...t,version:25,graph:n.export()})},25:e=>JSON.stringify({...JSON.parse(e),version:26}),26:e=>{const t=JSON.parse(e),n=new Oo;return n.import(null==t?void 0:t.graph),n.filterNodes(((e,t)=>e.startsWith("misc_node")&&t.type===jc.GzmtrLineBadge)).forEach((e=>{const t=n.getNodeAttribute(e,"type"),r=n.getNodeAttribute(e,t);r.span=!0,n.mergeNodeAttributes(e,{[t]:r})})),JSON.stringify({...t,version:27,graph:n.export()})},27:e=>{const t=JSON.parse(e),n=new Oo;return n.import(null==t?void 0:t.graph),n.filterNodes(((e,t)=>e.startsWith("stn")&&t.type===du.GzmtrInt)).forEach((e=>{const t=n.getNodeAttribute(e,"type"),r=n.getNodeAttribute(e,t);for(let n=0;nJSON.stringify({...JSON.parse(e),version:29}),29:e=>JSON.stringify({...JSON.parse(e),version:30}),30:e=>JSON.stringify({...JSON.parse(e),version:31}),31:e=>{const t=JSON.parse(e),n=new Oo;return n.import(null==t?void 0:t.graph),n.filterEdges(((e,t)=>t.style===_c.ChinaRailway)).forEach((e=>{const t=n.getEdgeAttributes(e)[_c.ChinaRailway];n.mergeEdgeAttributes(e,{[_c.ChinaRailway]:{...t,color:[ic.Shanghai,"jsr","#000000",pc.white]}})})),JSON.stringify({...t,version:32,graph:n.export()})},32:e=>JSON.stringify({...JSON.parse(e),version:33}),33:e=>{const t=JSON.parse(e),n=new Oo;return n.import(null==t?void 0:t.graph),n.forEachDirectedEdge((e=>{n.setEdgeAttribute(e,"parallelIndex",-1),n.updateEdgeAttribute(e,"zIndex",(e=>Math.max(-10,(null!=e?e:0)-5)))})),n.forEachNode((e=>{n.updateNodeAttribute(e,"zIndex",(e=>Math.min(10,(null!=e?e:0)+5)))})),JSON.stringify({...t,version:34,graph:n.export()})},34:e=>JSON.stringify({...JSON.parse(e),version:35}),35:e=>JSON.stringify({...JSON.parse(e),version:36}),36:e=>JSON.stringify({...JSON.parse(e),version:37}),37:e=>JSON.stringify({...JSON.parse(e),version:38}),38:e=>JSON.stringify({...JSON.parse(e),version:39}),39:e=>{const t=JSON.parse(e),n=new Oo;return n.import(null==t?void 0:t.graph),n.filterNodes(((e,t)=>e.startsWith("misc_node")&&t.type===jc.Facilities)).forEach((e=>{const t=n.getNodeAttribute(e,"type"),r=n.getNodeAttribute(e,t);"qingdao_airport"===r.type?r.type="airport_qingdao":"qingdao_coach_station"===r.type?r.type="coach_station_qingdao":"qingdao_cruise_terminal"===r.type?r.type="cruise_terminal_qingdao":"qingdao_railway"===r.type?r.type="railway_qingdao":"qingdao_tram"===r.type&&(r.type="tram_qingdao"),n.mergeNodeAttributes(e,{[t]:r})})),JSON.stringify({...t,version:40,graph:n.export()})},40:e=>JSON.stringify({...JSON.parse(e),version:41}),41:e=>{const t=JSON.parse(e),n=new Oo;n.import(null==t?void 0:t.graph);const r=e=>e.map((e=>e.replaceAll("\\","\n")));return n.forEachNode(((e,t)=>{const o=n.getNodeAttribute(e,"type");let i;(o===du.BjsubwayBasic||o===du.BjsubwayInt||o===du.FoshanMetroBasic||o===du.GuangdongIntercityRailway||o===du.GzmtrBasic||o===du.GzmtrInt||o===du.JREastBasic||o===du.JREastImportant||o===du.KunmingRTBasic||o===du.KunmingRTInt||o===du.MRTBasic||o===du.MRTInt||o===du.MTR||o===du.ShanghaiSuburbanRailway||o===du.ShmetroBasic2020||o===du.ShmetroBasic||o===du.ShmetroInt||o===du.ShmetroOutOfSystemInt||o===du.SuzhouRTBasic||o===du.SuzhouRTInt||o===du.TokyoMetroBasic||o===du.TokyoMetroInt)&&(i=r(t[o].names)),i&&(t[o].names=i,n.mergeNodeAttributes(e,t))})),JSON.stringify({...t,version:42,graph:n.export()})}};He();const yp=Fe({account:uc,app:_d,param:Md,runtime:nu}),bp=((e={})=>Ue({reducer:yp,middleware:e=>e({serializableCheck:!1}),preloadedState:e}))();bp.subscribe((async()=>{await xc(bp.getState().param.present),localStorage.setItem(oc.PARAM,fp(bp.getState().param)),localStorage.setItem(oc.APP,JSON.stringify(bp.getState().app)),localStorage.setItem(oc.LOGIN_STATE,JSON.stringify(bp.getState().account))}));const vp=e("c",(()=>We())),wp=e("d",Ve),xp=Pe.lazy((()=>Po((()=>n.import("./page-header-legacy-YLn36u35.js"))))),Sp=Pe.lazy((()=>Po((()=>n.import("./tools-legacy-Dm25lVuJ.js"))))),kp=Pe.lazy((()=>Po((()=>n.import("./svg-wrapper-legacy-BY1AcpM1.js"))))),Np=Pe.lazy((()=>Po((()=>n.import("./details-legacy-0ouXuw75.js"))))),_p=Pe.lazy((()=>Po((()=>n.import("./rmg-palette-app-clip-legacy-z6rXRe5N.js")))));function Rp(){const e=vp(),{paletteAppClip:{input:t}}=wp((e=>e.runtime)),{t:n}=$e(),[r,o]=Pe.useState(!1);Pe.useEffect((()=>{qn.isStandaloneWindow()&&!window.localStorage.getItem(oc.DO_NOT_SHOW_RMT_MSG)&&o(!0)}),[]);const a=new Date,s=`${a.getFullYear()}${String(a.getMonth()+1).padStart(2,"0")}01`,l=`${String(a.getFullYear()).slice(-2)}.${a.getMonth()+1}.1`;return i.jsx(Xl,{children:i.jsx(Pl,{children:i.jsxs(Pe.Suspense,{fallback:i.jsxs(i.Fragment,{children:[i.jsx("p",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},children:"Rail Map Toolkit protocol... checked"}),i.jsxs("p",{style:{position:"absolute",top:"75%",left:"50%",transform:"translate(-50%, -50%)",fontSize:"small",color:"gray"},children:["Seeing this page for too long? Try another mirror"," ",i.jsx("a",{href:"https://railmapgen.github.io/?app=rmp",target:"_blank",rel:"noreferrer",children:"GitHub"})," ",i.jsx("a",{href:"https://railmapgen.gitlab.io/?app=rmp",target:"_blank",rel:"noreferrer",children:"Gitlab"})," ","or the"," ",i.jsx("a",{href:"https://github.com/railmapgen/railmapgen.github.io/releases",target:"_blank",rel:"noreferrer",children:"offline application"})," ",".",i.jsx("br",{}),i.jsx("br",{}),"Offline applications also available via ghgo.xyz"," ",i.jsx("a",{href:`https://ghgo.xyz/https://github.com/railmapgen/railmapgen.github.io/releases/download/tauri-${s}/railmapgen_${l}_x64-setup.exe`,children:"Windows"})," ",i.jsx("a",{href:`https://ghgo.xyz/https://github.com/railmapgen/railmapgen.github.io/releases/download/tauri-${s}/railmapgen_${l}_aarch64.dmg`,children:"MacOS"})," ",i.jsx("a",{href:`https://ghgo.xyz/https://github.com/railmapgen/railmapgen.github.io/releases/download/tauri-${s}/railmapgen_${l}_amd64.deb`,children:"Linux"})," ","if you are blocked by GFW :)"]})]}),children:[i.jsx(xp,{}),r&&i.jsxs(ue,{status:"info",variant:"solid",size:"xs",pl:3,pr:1,py:1,zIndex:"1",children:[i.jsx(pe,{}),i.jsxs(se,{children:[i.jsx(de,{href:"/?app=rmp",isExternal:!0,fontWeight:"bold",children:n("rmtPromotion")})," ",i.jsx(de,{as:"button",ml:"auto",textDecoration:"underline",onClick:()=>o(!1),children:n("close")})," | ",i.jsx(de,{as:"button",textDecoration:"underline",onClick:()=>{o(!1),window.localStorage.setItem(oc.DO_NOT_SHOW_RMT_MSG,"true")},children:n("noShowAgain")})]})]}),i.jsx(yl,{allowReset:!0,children:i.jsxs(y,{direction:"row",height:"100%",overflow:"hidden",sx:{position:"relative"},children:[i.jsx(Sp,{}),i.jsx(kp,{}),i.jsx(Np,{})]})}),i.jsx(_p,{isOpen:!!t,onClose:()=>e(Zd()),defaultTheme:t,onSelect:t=>e(Xd(t))})]})})})}const Tp=JSON.parse(null!==(Ke=localStorage.getItem(oc.LOGIN_STATE))&&void 0!==Ke?Ke:"{}"),Cp=JSON.parse(null!==(Ye=localStorage.getItem(oc.APP))&&void 0!==Ye?Ye:"{}"),jp=localStorage.getItem(oc.PARAM);"telemetry"in Cp&&("app"in Cp.telemetry&&bp.dispatch(wd(Cp.telemetry.app)),"project"in Cp.telemetry&&bp.dispatch(xd(Cp.telemetry.project))),"preference"in Cp&&("unlockSimplePathAttempts"in Cp.preference&&bp.dispatch(Sd(Cp.preference.unlockSimplePathAttempts)),"toolsPanel"in Cp.preference&&"expand"in Cp.preference.toolsPanel&&bp.dispatch(kd(Cp.preference.toolsPanel.expand)),"autoParallel"in Cp.preference&&bp.dispatch(Nd(Cp.preference.autoParallel))),"state"in Tp&&bp.dispatch(lc(Tp.state)),"activeSubscriptions"in Tp&&bp.dispatch(cc(Tp.activeSubscriptions)),gp(jp).then((e=>{const{version:t,graph:n,...r}=JSON.parse(e);window.graph=Oo.from(n);const o={...r,present:n,past:[],future:[]};bp.dispatch(Od(o)),bp.dispatch(Id()),bp.dispatch($d()),Eo(document.getElementById("root")).render(i.jsx(Pe.StrictMode,{children:i.jsx(Je,{store:bp,children:i.jsx(qe,{i18n:Ic,children:i.jsx(Rp,{})})})})),qn.injectUITools(),(async e=>{vc.addEventListener("message",(async t=>{const{type:n,token:r,from:o}=t.data;if("TOKEN_REQUEST"===n&&"rmt"===o){if(e.getState().account.timeout&&(window.clearTimeout(e.getState().account.timeout),e.dispatch(dc(void 0))),!r)return e.dispatch(lc("logged-out")),void e.dispatch(cc(ac));const t=await fetch("https://railmapgen.org/v1/subscription",{headers:{accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${r}`}});if(200!==t.status)return e.dispatch(lc("expired")),void e.dispatch(cc(ac));e.dispatch(lc("free"));const n=(await t.json()).subscriptions,o=structuredClone(ac);for(const r of n){const t=r.type;t in o&&(e.dispatch(lc("subscriber")),o[t]=!0)}e.dispatch(cc(o))}}))})(bp),Sc(),window.setInterval((()=>Sc()),9e5);const a=window.setTimeout((()=>{bp.dispatch(lc("logged-out")),bp.dispatch(cc(ac)),bp.dispatch(dc(void 0))}),6e3);bp.dispatch(dc(a))}))}}})); + */ci.exports=function(){if(li)return di;li=1;var e=Pe,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function a(e,n,a){var s,l={},c=null,d=null;for(s in void 0!==a&&(c=""+a),void 0!==n.key&&(c=""+n.key),void 0!==n.ref&&(d=n.ref),n)r.call(n,s)&&!i.hasOwnProperty(s)&&(l[s]=n[s]);if(e&&e.defaultProps)for(s in n=e.defaultProps)void 0===l[s]&&(l[s]=n[s]);return{$$typeof:t,type:e,key:c,ref:d,props:l,_owner:o.current}}return di.Fragment=n,di.jsx=a,di.jsxs=a,di}();var ui=ci.exports;const[pi,hi]=c({name:"AutoCompleteContext",errorMessage:"useAutoCompleteContext: `context` is undefined. Seems you forgot to wrap all autoomplete components within ``"});var gi=function(e,t){for(var n,r=0,o=Me.Children.toArray(e);r{var t;return null==(t="string"==typeof e||"number"==typeof e?e:e[Object.keys(e)[0]])?void 0:t.toString()},vi=(e,t)=>"string"!=typeof e||$(t)?e:e.toString().replace(new RegExp(function(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}(t),"gi"),(e=>`${e}`)),wi=(e,t,n)=>(null==t?void 0:t.toLowerCase().indexOf(null==e?void 0:e.toLowerCase()))>=0||(null==n?void 0:n.toLowerCase().indexOf(null==e?void 0:e.toLowerCase()))>=0||yi(e,t)>=.5||yi(e,n)>=.5,xi=(e,t)=>{const n={},r={},{field:o}=e;return o&&Object.keys(o).forEach((e=>{if(!1===e.startsWith("--input"))n[e]=o[e];else{let t=o[e];const n=e.replace("--input-","").replace(/-([a-z])/g,(function(e){return e[1].toUpperCase()}));-1!==t.indexOf(".")&&(t=t.substring(t.indexOf(".")+1)),r[n]=t}})),{...t&&{...n,...r,_focusWithin:e.field._focus,pos:"relative",minH:9,py:1.5,spacing:3},cursor:"text",h:"fit-content"}},Si=(e,t)=>gi(e,(e=>{var n;return"AutoCompleteItem"===(null==(n=null==e?void 0:e.type)?void 0:n.displayName)&&e.props.value===(null==t?void 0:t.value)})),ki=(e,t)=>gi(e,(e=>{var n;return"AutoCompleteItem"===(null==(n=null==e?void 0:e.type)?void 0:n.displayName)&&e.props.value===(null==t?void 0:t.value)}));function Ni(e){var t,n;let{closeOnBlur:r=!0,creatable:o,emphasize:i,emptyState:a=!0,freeSolo:s,isReadOnly:l,listAllValuesOnFocus:c,maxSuggestions:d,multiple:u,closeOnSelect:h=!u,defaultValue:g,defaultValues:y=(g?[g]:[]),onReady:b,defaultIsOpen:v,disableFilter:w,isLoading:x=!1,placement:S="bottom",restoreOnBlurIfEmpty:k=!s,shouldRenderSuggestions:N=(()=>!0),submitKeys:_=[],suggestWhenEmpty:R,value:T,values:C=(T?"string"==typeof T?[T]:[...T]:void 0)}=e;s=s||!!u||e.freeSolo;const{isOpen:j,onClose:G,onOpen:F}=O({defaultIsOpen:v}),U=p(e.children,{isOpen:j,onClose:G,onOpen:F}),W=(e=>mi(e,(e=>{var t;return"AutoCompleteItem"===(null==(t=null==e?void 0:e.type)?void 0:t.displayName)})).map((e=>{const t=B(e.props,["value","label","fixed","disabled"]),{getValue:n=bi}=e.props,r=n(t.value);return{...D(t.label)?t:{...t,label:r},value:r,originalValue:t.value}})))(U),V=Me.useRef(null),H=Me.useRef(null),J=Me.useRef(null),q=Me.useRef(null),[K,Y]=Me.useState(!1);let Q="";u?Q="":f(y)?f(C)||(Q=C[0]):Q=y[0];const[Z,X]=Me.useState(null!==(t=Q)&&void 0!==t?t:""),ee=w?W:W.filter((t=>t.fixed||p(e.filter||wi,Z,t.value,t.label)||K)).filter(((e,t)=>!d||e.fixed||tnull==e?void 0:e.toString())),value:C,onChange:t=>{const n=ne.find((e=>e.value===t[0])),r=t.map((e=>ne.find((t=>t.value===e))));p(e.onChange,u?t:t[0],u?r:n)}}),[ie,ae]=Me.useState(null==(n=W[0])?void 0:n.value),se=e.maxSelections||re.length+1,le=ne.findIndex((e=>e.value===ie)),ce=A(le,ne,!!e.rollNavigation),de=E(le,ne,!!e.rollNavigation),ue=M(ne),pe=P(ne);I((()=>{ae(null==ue?void 0:ue.value)}),[Z]),Me.useEffect((()=>{var e;j||ae(null==(e=W[0])?void 0:e.value)}),[j]),Me.useEffect((()=>{const t=W.find((e=>e.value===ie));p(e.onOptionFocus,{item:t,focusMethod:q.current,isNewInput:null==t?void 0:t.creatable})}),[ie,e.onOptionFocus]);const he=t=>{var n,r;!re.includes(t)&&re.lengthu?[...e,t]:[t]));const o=ne.find((e=>e.value===t));u&&(null==(n=V.current)||n.focus()),e.focusInputOnSelect&&(null==(r=V.current)||r.focus()),p(e.onSelectOption,{item:o,selectMethod:q.current,isNewInput:null==o?void 0:o.creatable}),null!=o&&o.creatable&&p(e.onCreateOption,{item:m(o,["noFilter"]),selectMethod:q.current});const i=(null==o?void 0:o.label)||(null==o?void 0:o.value);X((()=>u?"":null!=i?i:"")),h&&G()},ge=(t,n)=>{var r;oe((n=>{const r=W.find((e=>e.value===t));return p(e.onTagRemoved,t,r,n),n.filter((e=>e!==t))})),Z===t&&X(""),n&&(null==(r=V.current)||r.focus())},fe=u?re.map((e=>{var t;return{label:(null==(t=W.find((t=>t.value===(null==e?void 0:e.toString()))))?void 0:t.label)||e,onRemove:()=>ge(e)}})):[];return Me.useEffect((()=>{p(b,{tags:fe})}),[re]),{autoCompleteProps:e,children:U,filteredList:ne,filteredResults:ee,focusedValue:ie,getEmptyStateProps:e=>{if(ne.every((e=>e.noFilter))&&a&&!o)return"boolean"==typeof a?e:p(a,{query:Z})},getGroupProps:e=>{const t=((e,t)=>D(gi(e,(e=>{var n,r;const o=p((null==(n=e.props)?void 0:n.getValue)||bi,(null==(r=e.props)?void 0:r.value)||{});return t.some((e=>e.value===o))}))))(e.children,ne);return{divider:{hasFirstChild:Si(e.children,ue),hasLastChild:ki(e.children,P(ne.filter((e=>f(null==e?void 0:e.noFilter)))))},group:{display:t?"initial":"none"}}},getInputProps:(t,n)=>{const{onBlur:o,onChange:i,onFocus:a,onKeyDown:s,variant:d,...h}=t;return{wrapper:{ref:H,onClick:()=>{var e;null==(e=null==V?void 0:V.current)||e.focus()},...xi(n,u),...h},input:{isReadOnly:l,onFocus:t=>{p(a,t),e.openOnFocus&&!l&&F(),e.selectOnFocus&&t.target.select(),c&&Y(!0)},onBlur:e=>{var t,n;p(o,e);const i=e.relatedTarget===(null==J?void 0:J.current)||(null==(t=J.current)?void 0:t.contains(e.relatedTarget)),a=null==(n=H.current)?void 0:n.contains(e.relatedTarget);if(!i&&!a&&(r&&G(),!re.includes(e.target.value)&&k)){const e=P(re),t=W.find((t=>t.value===e)),n=(null==t?void 0:t.label)||(null==t?void 0:t.value)||"";X(n)}},onChange:e=>{const t=e.target.value;p(i,e),X(t);const n=$(t);!p(N,t)||n&&!R?G():F(),Y(!1)},onKeyDown:e=>{var t;p(s,e),q.current="keyboard";const{key:n}=e,r=ne[le];return["Enter",..._].includes(n)?(!r||null!=r&&r.disabled?null==(t=V.current)||t.focus():he(null==r?void 0:r.value),void e.preventDefault()):"ArrowDown"===n?(j?ae(null==ce?void 0:ce.value):F(),void e.preventDefault()):"ArrowUp"===n?(j?ae(null==de?void 0:de.value):F(),void e.preventDefault()):"Tab"!==n?"Home"===n?(ae(null==ue?void 0:ue.value),void e.preventDefault()):"End"===n?(ae(null==pe?void 0:pe.value),void e.preventDefault()):void("Escape"===n&&(G(),e.preventDefault())):void(!j||!r||null!=r&&r.disabled?G():he(null==r?void 0:r.value))},value:Z,variant:u?"unstyled":d,...h}}},getItemProps:(e,t)=>{var n;const{_fixed:r,_focus:o,children:a,disabled:s,label:l,value:c,fixed:d,getValue:u=bi,onClick:h,onMouseOver:g,sx:f,...m}=e,y=t?c:null==(n=u(c))?void 0:n.toString(),b=y===ie,v=ne.findIndex((e=>e.value===y))>=0,w=a||l||y;return{item:{..."string"==typeof w&&i?{dangerouslySetInnerHTML:{__html:vi(w,Z)}}:{children:w},"aria-selected":re.includes(y),"aria-disabled":s,_disabled:{opacity:.4,cursor:"not-allowed",userSelect:"none"},onClick:e=>{var t;p(h,e),s?null==(t=V.current)||t.focus():he(y)},onMouseOver:e=>{p(g,e),ae(y),q.current="mouse"},sx:{...f,mark:{color:"inherit",bg:"transparent",...z(i)?i:{fontWeight:i?"extrabold":"inherit"}}},...b&&(o||{bg:"whiteAlpha.100",_light:{bg:"gray.200"}}),...d&&r,...m},root:{isValidSuggestion:v,value:y}}},inputRef:V,interactionRef:q,isLoading:x,isOpen:j,itemList:W,listRef:J,onClose:G,onOpen:F,placement:S,query:Z,removeItem:ge,resetItems:e=>{var t;oe([]),e&&(null==(t=V.current)||t.focus())},setQuery:X,tags:fe,values:re}}const _i=d(((e,t)=>{const n=Ni(e),{children:r,isOpen:o,onClose:i,onOpen:a,placement:l,resetItems:c,removeItem:d}=n;return Me.useImperativeHandle(t,(()=>({resetItems:c,removeItem:d}))),ui.jsx(pi,{value:n,children:ui.jsx(h,{isLazy:!0,isOpen:o,onClose:i,onOpen:a,autoFocus:!1,placement:l,closeOnBlur:!0,matchWidth:!0,children:ui.jsx(s.div,{w:"full",ref:t,children:r})})})}));_i.displayName="AutoComplete";const Ri=d(((e,t)=>{const{focusedValue:n,getItemProps:r,interactionRef:o}=hi(),i=Me.useRef(),a=g(t,i),s=r(e),{isValidSuggestion:l,value:c}=s.root,d=n===c;Me.useEffect((()=>{var e;d&&"keyboard"===o.current&&(null==(e=null==i?void 0:i.current)||e.scrollIntoView({behavior:"smooth",block:"center"}))}),[d,o]),Me.useEffect((()=>{"string"!=typeof c&&console.warn("wow"),"string"!=typeof c&&f(e.getValue)&&console.error("You must define the `getValue` prop, when an Item's value is not a string")}),[]);const{children:u,dangerouslySetInnerHTML:p,...h}=s.item,b=m(h,["groupId"]);return l?ui.jsx(y,{ref:a,...Ti,...b,children:u||ui.jsx("span",{dangerouslySetInnerHTML:p})}):null}));Ri.displayName="AutoCompleteItem";const Ti={mx:"2",px:"2",py:"2",rounded:"md",cursor:"pointer"},Ci=d(((e,t)=>{const{children:n,showDivider:r,...o}=e,i=m(o,["groupSibling"]),{getGroupProps:a}=hi(),{group:s}=a(e),l=Li(e);return ui.jsxs(b,{ref:t,...s,...i,children:[ui.jsx(v,{...l.top}),n,ui.jsx(v,{...l.bottom})]})})),ji=d(((e,t)=>ui.jsx(y,{...Oi,...e,ref:t})));Ci.displayName="AutoCompleteGroup",ji.displayName="AutoCompleteGroupTitle";const Oi={ml:5,my:1,fontSize:"xs",letterSpacing:"wider",fontWeight:"extrabold",textTransform:"uppercase"},Li=e=>{const{getGroupProps:t}=hi(),n=e.groupSibling,{divider:{hasFirstChild:r,hasLastChild:o}}=t(e),i={my:2,borderColor:e.dividerColor};return{top:{...i,mb:4,display:!e.showDivider||r?"none":""},bottom:{...i,display:!e.showDivider||o||n?"none":""}}},Ai=d(((e,t)=>{const{isLoading:n}=hi(),{loadingIcon:r,...o}=e;return ui.jsxs(w,{children:[ui.jsx(x,{...o,ref:t}),n&&ui.jsx(S,{children:r||ui.jsx(k,{})})]})})),Ei=d(((e,t)=>{const{autoCompleteProps:n,inputRef:r,getInputProps:o,tags:i,setQuery:a}=hi(),{children:s,isInvalid:l,hidePlaceholder:c,...d}=e,{value:u}=d;Me.useEffect((()=>{void 0!==u&&("string"==typeof u||u instanceof String)&&a(u)}),[u]);const h=N("Input",e);let{wrapper:f,input:m}=o(d,h);const{ref:y,...b}=f,v=g(t,r),w=p(s,{tags:i});c&&(m={...m,placeholder:Array.isArray(w)&&w.length?void 0:m.placeholder});const x=ui.jsx(Ai,{isInvalid:l,...m,ref:v}),S=ui.jsxs(_,{...b,ref:y,children:[w,ui.jsx(R,{as:Ai,...m,ref:v})]});return ui.jsx(T,{children:n.multiple?S:x})}));Ei.displayName="Input",Ei.id="Input";var Mi=Me.createContext({});function Pi(){const e=Me.useContext(Mi);if(void 0===e)throw new Error("useColorMode must be used within a ColorModeProvider");return e}function Ii(){const e=Pi(),t=function(){const e=Me.useContext(V);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}();return{...e,theme:t}}Mi.displayName="ColorModeContext";var $i=(...e)=>e.filter(Boolean).join(" ");function zi(e){const t=typeof e;return null!=e&&("object"===t||"function"===t)&&!Array.isArray(e)}function Bi(e,...t){return Di(e)?e(...t):e}var Di=e=>"function"==typeof e,Gi={exports:{}};!function(e,t){var n="__lodash_hash_undefined__",r=9007199254740991,o="[object Arguments]",i="[object AsyncFunction]",a="[object Function]",s="[object GeneratorFunction]",l="[object Null]",c="[object Object]",d="[object Proxy]",u="[object Undefined]",p=/^\[object .+?Constructor\]$/,h=/^(?:0|[1-9]\d*)$/,g={};g["[object Float32Array]"]=g["[object Float64Array]"]=g["[object Int8Array]"]=g["[object Int16Array]"]=g["[object Int32Array]"]=g["[object Uint8Array]"]=g["[object Uint8ClampedArray]"]=g["[object Uint16Array]"]=g["[object Uint32Array]"]=!0,g[o]=g["[object Array]"]=g["[object ArrayBuffer]"]=g["[object Boolean]"]=g["[object DataView]"]=g["[object Date]"]=g["[object Error]"]=g[a]=g["[object Map]"]=g["[object Number]"]=g[c]=g["[object RegExp]"]=g["[object Set]"]=g["[object String]"]=g["[object WeakMap]"]=!1;var f="object"==typeof ai&&ai&&ai.Object===Object&&ai,m="object"==typeof self&&self&&self.Object===Object&&self,y=f||m||Function("return this")(),b=t&&!t.nodeType&&t,v=b&&e&&!e.nodeType&&e,w=v&&v.exports===b,x=w&&f.process,S=function(){try{return v&&v.require&&v.require("util").types||x&&x.binding&&x.binding("util")}catch{}}(),k=S&&S.isTypedArray,N=Array.prototype,_=Function.prototype,R=Object.prototype,T=y["__core-js_shared__"],C=_.toString,j=R.hasOwnProperty,O=function(){var e=/[^.]+$/.exec(T&&T.keys&&T.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),L=R.toString,A=C.call(Object),E=RegExp("^"+C.call(j).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),M=w?y.Buffer:void 0,P=y.Symbol,I=y.Uint8Array;M&&M.allocUnsafe;var $=function(e,t){return function(n){return e(t(n))}}(Object.getPrototypeOf,Object),z=Object.create,B=R.propertyIsEnumerable,D=N.splice,G=P?P.toStringTag:void 0,F=function(){try{var e=pe(Object,"defineProperty");return e({},"",{}),e}catch{}}(),U=M?M.isBuffer:void 0,W=Math.max,V=Date.now,H=pe(y,"Map"),J=pe(Object,"create"),q=function(){function e(){}return function(t){if(!Ne(t))return{};if(z)return z(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function K(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1},Y.prototype.set=function(e,t){var n=this.__data__,r=ne(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Q.prototype.clear=function(){this.size=0,this.__data__={hash:new K,map:new(H||Y),string:new K}},Q.prototype.delete=function(e){var t=ue(this,e).delete(e);return this.size-=t?1:0,t},Q.prototype.get=function(e){return ue(this,e).get(e)},Q.prototype.has=function(e){return ue(this,e).has(e)},Q.prototype.set=function(e,t){var n=ue(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Z.prototype.clear=function(){this.__data__=new Y,this.size=0},Z.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Z.prototype.get=function(e){return this.__data__.get(e)},Z.prototype.has=function(e){return this.__data__.has(e)},Z.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Y){var r=n.__data__;if(!H||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Q(r)}return n.set(e,t),this.size=n.size,this};var oe=function(e,t,n){for(var r=-1,o=Object(e),i=n(e),a=i.length;a--;){var s=i[++r];if(!1===t(o[s],s,o))break}return e};function ie(e){return null==e?void 0===e?u:l:G&&G in Object(e)?function(e){var t=j.call(e,G),n=e[G];try{e[G]=void 0;var r=!0}catch{}var o=L.call(e);return r&&(t?e[G]=n:delete e[G]),o}(e):function(e){return L.call(e)}(e)}function ae(e){return _e(e)&&ie(e)==o}function se(e){return!(!Ne(e)||function(e){return!!O&&O in e}(e))&&(Se(e)?E:p).test(function(e){if(null!=e){try{return C.call(e)}catch{}try{return e+""}catch{}}return""}(e))}function le(e){if(!Ne(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=ge(e),n=[];for(var r in e)"constructor"==r&&(t||!j.call(e,r))||n.push(r);return n}function ce(e,t,n,r,o){e!==t&&oe(t,(function(i,a){if(o||(o=new Z),Ne(i))!function(e,t,n,r,o,i,a){var s=fe(e,n),l=fe(t,n),d=a.get(l);if(d)ee(e,n,d);else{var u=i?i(s,l,n+"",e,t,a):void 0,p=void 0===u;if(p){var h=ve(l),g=!h&&xe(l),f=!h&&!g&&Re(l);u=l,h||g||f?ve(s)?u=s:function(e){return _e(e)&&we(e)}(s)?u=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n-1&&e%1==0&&e0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(F?function(e,t){return F(e,"toString",{configurable:!0,enumerable:!1,value:je(t),writable:!0})}:Oe);function ye(e,t){return e===t||e!=e&&t!=t}var be=ae(function(){return arguments}())?ae:function(e){return _e(e)&&j.call(e,"callee")&&!B.call(e,"callee")},ve=Array.isArray;function we(e){return null!=e&&ke(e.length)&&!Se(e)}var xe=U||function(){return!1};function Se(e){if(!Ne(e))return!1;var t=ie(e);return t==a||t==s||t==i||t==d}function ke(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function Ne(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function _e(e){return null!=e&&"object"==typeof e}var Re=k?function(e){return function(t){return e(t)}}(k):function(e){return _e(e)&&ke(e.length)&&!!g[ie(e)]};function Te(e){return we(e)?X(e):le(e)}var Ce=function(e){return de((function(t,n){var r=-1,o=n.length,i=o>1?n[o-1]:void 0,a=o>2?n[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,a&&function(e,t,n){if(!Ne(n))return!1;var r=typeof t;return!!("number"==r?we(n)&&he(t,n.length):"string"==r&&t in n)&&ye(n[t],e)}(n[0],n[1],a)&&(i=o<3?void 0:i,o=1),t=Object(t);++r"string"==typeof e?e.replace(/!(important)?$/,"").trim():e,Wi=(e,t)=>n=>{const r=String(t),o=(e=>/!(important)?$/.test(e))(r),i=Ui(r),a=e?`${e}.${i}`:i;let s=zi(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=Ui(s),o?`${s} !important`:s};function Vi(e){const{scale:t,transform:n,compose:r}=e;return(e,o)=>{var i;const a=Wi(t,e)(o);let s=null!=(i=null==n?void 0:n(a,o))?i:a;return r&&(s=r(s,o)),s}}var Hi=(...e)=>t=>e.reduce(((e,t)=>t(e)),t);function Ji(e,t){return n=>{const r={property:n,scale:e};return r.transform=Vi({scale:e,transform:t}),r}}var qi=({rtl:e,ltr:t})=>n=>"rtl"===n.direction?e:t,Ki=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"],Yi={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},Qi={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"},Zi={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},Xi={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},ea=new Set(Object.values(Xi)),ta=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),na=e=>e.trim(),ra=e=>"string"==typeof e&&e.includes("(")&&e.includes(")"),oa=e=>t=>`${e}(${t})`,ia={filter:e=>"auto"!==e?e:Yi,backdropFilter:e=>"auto"!==e?e:Qi,ring:e=>function(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}(ia.px(e)),bgClip:e=>"text"===e?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e},transform:e=>"auto"===e?["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...Ki].join(" "):"auto-gpu"===e?["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...Ki].join(" "):e,vh:e=>"$100vh"===e?"var(--chakra-vh)":e,px(e){if(null==e)return e;const{unitless:t}=(e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}})(e);return t||"number"==typeof e?`${e}px`:e},fraction:e=>"number"!=typeof e||e>1?e:100*e+"%",float:(e,t)=>"rtl"===t.direction?{left:"right",right:"left"}[e]:e,degree(e){if(function(e){return/^var\(--.+\)$/.test(e)}(e)||null==e)return e;const t="string"==typeof e&&!e.endsWith("deg");return"number"==typeof e||t?`${e}deg`:e},gradient:(e,t)=>function(e,t){if(null==e||ta.has(e))return e;if(!ra(e)&&!ta.has(e))return`url('${e}')`;const n=/(^[a-z-A-Z]+)\((.*)\)/g.exec(e),r=null==n?void 0:n[1],o=null==n?void 0:n[2];if(!r||!o)return e;const i=r.includes("-gradient")?r:`${r}-gradient`,[a,...s]=o.split(",").map(na).filter(Boolean);if(0===(null==s?void 0:s.length))return e;const l=a in Xi?Xi[a]:a;return s.unshift(l),`${i}(${s.map((e=>{if(ea.has(e))return e;const n=e.indexOf(" "),[r,o]=-1!==n?[e.substr(0,n),e.substr(n+1)]:[e],i=ra(o)?o:o&&o.split(" "),a=`colors.${r}`,s=a in t.__cssMap?t.__cssMap[a].varRef:r;return i?[s,...Array.isArray(i)?i:[i]].join(" "):s})).join(", ")})`}(e,null!=t?t:{}),blur:oa("blur"),opacity:oa("opacity"),brightness:oa("brightness"),contrast:oa("contrast"),dropShadow:oa("drop-shadow"),grayscale:oa("grayscale"),hueRotate:oa("hue-rotate"),invert:oa("invert"),saturate:oa("saturate"),sepia:oa("sepia"),bgImage:e=>null==e||ra(e)||ta.has(e)?e:`url(${e})`,outline(e){const t="0"===String(e)||"none"===String(e);return null!==e&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){var t;const{space:n,divide:r}=null!=(t=Zi[e])?t:{},o={flexDirection:e};return n&&(o[n]=1),r&&(o[r]=1),o}},aa={borderWidths:Ji("borderWidths"),borderStyles:Ji("borderStyles"),colors:Ji("colors"),borders:Ji("borders"),gradients:Ji("gradients",ia.gradient),radii:Ji("radii",ia.px),space:Ji("space",Hi(ia.vh,ia.px)),spaceT:Ji("space",Hi(ia.vh,ia.px)),degreeT:e=>({property:e,transform:ia.degree}),prop:(e,t,n)=>({property:e,scale:t,...t&&{transform:Vi({scale:t,transform:n})}}),propT:(e,t)=>({property:e,transform:t}),sizes:Ji("sizes",Hi(ia.vh,ia.px)),sizesT:Ji("sizes",Hi(ia.vh,ia.fraction)),shadows:Ji("shadows"),logical:function(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:qi(t),transform:n?Vi({scale:n,compose:r}):r}},blur:Ji("blur",ia.blur)},sa={background:aa.colors("background"),backgroundColor:aa.colors("backgroundColor"),backgroundImage:aa.gradients("backgroundImage"),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:ia.bgClip},bgSize:aa.prop("backgroundSize"),bgPosition:aa.prop("backgroundPosition"),bg:aa.colors("background"),bgColor:aa.colors("backgroundColor"),bgPos:aa.prop("backgroundPosition"),bgRepeat:aa.prop("backgroundRepeat"),bgAttachment:aa.prop("backgroundAttachment"),bgGradient:aa.gradients("backgroundImage"),bgClip:{transform:ia.bgClip}};Object.assign(sa,{bgImage:sa.backgroundImage,bgImg:sa.backgroundImage});var la={border:aa.borders("border"),borderWidth:aa.borderWidths("borderWidth"),borderStyle:aa.borderStyles("borderStyle"),borderColor:aa.colors("borderColor"),borderRadius:aa.radii("borderRadius"),borderTop:aa.borders("borderTop"),borderBlockStart:aa.borders("borderBlockStart"),borderTopLeftRadius:aa.radii("borderTopLeftRadius"),borderStartStartRadius:aa.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:aa.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:aa.radii("borderTopRightRadius"),borderStartEndRadius:aa.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:aa.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:aa.borders("borderRight"),borderInlineEnd:aa.borders("borderInlineEnd"),borderBottom:aa.borders("borderBottom"),borderBlockEnd:aa.borders("borderBlockEnd"),borderBottomLeftRadius:aa.radii("borderBottomLeftRadius"),borderBottomRightRadius:aa.radii("borderBottomRightRadius"),borderLeft:aa.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:aa.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:aa.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:aa.borders(["borderLeft","borderRight"]),borderInline:aa.borders("borderInline"),borderY:aa.borders(["borderTop","borderBottom"]),borderBlock:aa.borders("borderBlock"),borderTopWidth:aa.borderWidths("borderTopWidth"),borderBlockStartWidth:aa.borderWidths("borderBlockStartWidth"),borderTopColor:aa.colors("borderTopColor"),borderBlockStartColor:aa.colors("borderBlockStartColor"),borderTopStyle:aa.borderStyles("borderTopStyle"),borderBlockStartStyle:aa.borderStyles("borderBlockStartStyle"),borderBottomWidth:aa.borderWidths("borderBottomWidth"),borderBlockEndWidth:aa.borderWidths("borderBlockEndWidth"),borderBottomColor:aa.colors("borderBottomColor"),borderBlockEndColor:aa.colors("borderBlockEndColor"),borderBottomStyle:aa.borderStyles("borderBottomStyle"),borderBlockEndStyle:aa.borderStyles("borderBlockEndStyle"),borderLeftWidth:aa.borderWidths("borderLeftWidth"),borderInlineStartWidth:aa.borderWidths("borderInlineStartWidth"),borderLeftColor:aa.colors("borderLeftColor"),borderInlineStartColor:aa.colors("borderInlineStartColor"),borderLeftStyle:aa.borderStyles("borderLeftStyle"),borderInlineStartStyle:aa.borderStyles("borderInlineStartStyle"),borderRightWidth:aa.borderWidths("borderRightWidth"),borderInlineEndWidth:aa.borderWidths("borderInlineEndWidth"),borderRightColor:aa.colors("borderRightColor"),borderInlineEndColor:aa.colors("borderInlineEndColor"),borderRightStyle:aa.borderStyles("borderRightStyle"),borderInlineEndStyle:aa.borderStyles("borderInlineEndStyle"),borderTopRadius:aa.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:aa.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:aa.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:aa.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(la,{rounded:la.borderRadius,roundedTop:la.borderTopRadius,roundedTopLeft:la.borderTopLeftRadius,roundedTopRight:la.borderTopRightRadius,roundedTopStart:la.borderStartStartRadius,roundedTopEnd:la.borderStartEndRadius,roundedBottom:la.borderBottomRadius,roundedBottomLeft:la.borderBottomLeftRadius,roundedBottomRight:la.borderBottomRightRadius,roundedBottomStart:la.borderEndStartRadius,roundedBottomEnd:la.borderEndEndRadius,roundedLeft:la.borderLeftRadius,roundedRight:la.borderRightRadius,roundedStart:la.borderInlineStartRadius,roundedEnd:la.borderInlineEndRadius,borderStart:la.borderInlineStart,borderEnd:la.borderInlineEnd,borderTopStartRadius:la.borderStartStartRadius,borderTopEndRadius:la.borderStartEndRadius,borderBottomStartRadius:la.borderEndStartRadius,borderBottomEndRadius:la.borderEndEndRadius,borderStartRadius:la.borderInlineStartRadius,borderEndRadius:la.borderInlineEndRadius,borderStartWidth:la.borderInlineStartWidth,borderEndWidth:la.borderInlineEndWidth,borderStartColor:la.borderInlineStartColor,borderEndColor:la.borderInlineEndColor,borderStartStyle:la.borderInlineStartStyle,borderEndStyle:la.borderInlineEndStyle});var ca={color:aa.colors("color"),textColor:aa.colors("color"),fill:aa.colors("fill"),stroke:aa.colors("stroke")},da={boxShadow:aa.shadows("boxShadow"),mixBlendMode:!0,blendMode:aa.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:aa.prop("backgroundBlendMode"),opacity:!0};Object.assign(da,{shadow:da.boxShadow});var ua={filter:{transform:ia.filter},blur:aa.blur("--chakra-blur"),brightness:aa.propT("--chakra-brightness",ia.brightness),contrast:aa.propT("--chakra-contrast",ia.contrast),hueRotate:aa.degreeT("--chakra-hue-rotate"),invert:aa.propT("--chakra-invert",ia.invert),saturate:aa.propT("--chakra-saturate",ia.saturate),dropShadow:aa.propT("--chakra-drop-shadow",ia.dropShadow),backdropFilter:{transform:ia.backdropFilter},backdropBlur:aa.blur("--chakra-backdrop-blur"),backdropBrightness:aa.propT("--chakra-backdrop-brightness",ia.brightness),backdropContrast:aa.propT("--chakra-backdrop-contrast",ia.contrast),backdropHueRotate:aa.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:aa.propT("--chakra-backdrop-invert",ia.invert),backdropSaturate:aa.propT("--chakra-backdrop-saturate",ia.saturate)},pa={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:ia.flexDirection},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:aa.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:aa.space("gap"),rowGap:aa.space("rowGap"),columnGap:aa.space("columnGap")};Object.assign(pa,{flexDir:pa.flexDirection});var ha={gridGap:aa.space("gridGap"),gridColumnGap:aa.space("gridColumnGap"),gridRowGap:aa.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},ga={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:ia.outline},outlineOffset:!0,outlineColor:aa.colors("outlineColor")},fa={width:aa.sizesT("width"),inlineSize:aa.sizesT("inlineSize"),height:aa.sizes("height"),blockSize:aa.sizes("blockSize"),boxSize:aa.sizes(["width","height"]),minWidth:aa.sizes("minWidth"),minInlineSize:aa.sizes("minInlineSize"),minHeight:aa.sizes("minHeight"),minBlockSize:aa.sizes("minBlockSize"),maxWidth:aa.sizes("maxWidth"),maxInlineSize:aa.sizes("maxInlineSize"),maxHeight:aa.sizes("maxHeight"),maxBlockSize:aa.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,aspectRatio:!0,hideFrom:{scale:"breakpoints",transform:(e,t)=>{var n,r,o;return{[`@media screen and (min-width: ${null!=(o=null==(r=null==(n=t.__breakpoints)?void 0:n.get(e))?void 0:r.minW)?o:e})`]:{display:"none"}}}},hideBelow:{scale:"breakpoints",transform:(e,t)=>{var n,r,o;return{[`@media screen and (max-width: ${null!=(o=null==(r=null==(n=t.__breakpoints)?void 0:n.get(e))?void 0:r._minW)?o:e})`]:{display:"none"}}}},verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:aa.propT("float",ia.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(fa,{w:fa.width,h:fa.height,minW:fa.minWidth,maxW:fa.maxWidth,minH:fa.minHeight,maxH:fa.maxHeight,overscroll:fa.overscrollBehavior,overscrollX:fa.overscrollBehaviorX,overscrollY:fa.overscrollBehaviorY});var ma={listStyleType:!0,listStylePosition:!0,listStylePos:aa.prop("listStylePosition"),listStyleImage:!0,listStyleImg:aa.prop("listStyleImage")},ya=(e=>{const t=new WeakMap;return(n,r,o,i)=>{if(typeof n>"u")return e(n,r,o);t.has(n)||t.set(n,new Map);const a=t.get(n);if(a.has(r))return a.get(r);const s=e(n,r,o,i);return a.set(r,s),s}})((function(e,t,n,r){const o="string"==typeof t?t.split("."):[t];for(r=0;r{const r={},o=ya(e,t,{});for(const i in o)i in n&&null!=n[i]||(r[i]=o[i]);return r},xa={srOnly:{transform:e=>!0===e?ba:"focusable"===e?va:{}},layerStyle:{processResult:!0,transform:(e,t,n)=>wa(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>wa(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>wa(t,e,n)}},Sa={position:!0,pos:aa.prop("position"),zIndex:aa.prop("zIndex","zIndices"),inset:aa.spaceT("inset"),insetX:aa.spaceT(["left","right"]),insetInline:aa.spaceT("insetInline"),insetY:aa.spaceT(["top","bottom"]),insetBlock:aa.spaceT("insetBlock"),top:aa.spaceT("top"),insetBlockStart:aa.spaceT("insetBlockStart"),bottom:aa.spaceT("bottom"),insetBlockEnd:aa.spaceT("insetBlockEnd"),left:aa.spaceT("left"),insetInlineStart:aa.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:aa.spaceT("right"),insetInlineEnd:aa.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(Sa,{insetStart:Sa.insetInlineStart,insetEnd:Sa.insetInlineEnd});var ka={ring:{transform:ia.ring},ringColor:aa.colors("--chakra-ring-color"),ringOffset:aa.prop("--chakra-ring-offset-width"),ringOffsetColor:aa.colors("--chakra-ring-offset-color"),ringInset:aa.prop("--chakra-ring-inset")},Na={margin:aa.spaceT("margin"),marginTop:aa.spaceT("marginTop"),marginBlockStart:aa.spaceT("marginBlockStart"),marginRight:aa.spaceT("marginRight"),marginInlineEnd:aa.spaceT("marginInlineEnd"),marginBottom:aa.spaceT("marginBottom"),marginBlockEnd:aa.spaceT("marginBlockEnd"),marginLeft:aa.spaceT("marginLeft"),marginInlineStart:aa.spaceT("marginInlineStart"),marginX:aa.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:aa.spaceT("marginInline"),marginY:aa.spaceT(["marginTop","marginBottom"]),marginBlock:aa.spaceT("marginBlock"),padding:aa.space("padding"),paddingTop:aa.space("paddingTop"),paddingBlockStart:aa.space("paddingBlockStart"),paddingRight:aa.space("paddingRight"),paddingBottom:aa.space("paddingBottom"),paddingBlockEnd:aa.space("paddingBlockEnd"),paddingLeft:aa.space("paddingLeft"),paddingInlineStart:aa.space("paddingInlineStart"),paddingInlineEnd:aa.space("paddingInlineEnd"),paddingX:aa.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:aa.space("paddingInline"),paddingY:aa.space(["paddingTop","paddingBottom"]),paddingBlock:aa.space("paddingBlock")};Object.assign(Na,{m:Na.margin,mt:Na.marginTop,mr:Na.marginRight,me:Na.marginInlineEnd,marginEnd:Na.marginInlineEnd,mb:Na.marginBottom,ml:Na.marginLeft,ms:Na.marginInlineStart,marginStart:Na.marginInlineStart,mx:Na.marginX,my:Na.marginY,p:Na.padding,pt:Na.paddingTop,py:Na.paddingY,px:Na.paddingX,pb:Na.paddingBottom,pl:Na.paddingLeft,ps:Na.paddingInlineStart,paddingStart:Na.paddingInlineStart,pr:Na.paddingRight,pe:Na.paddingInlineEnd,paddingEnd:Na.paddingInlineEnd});var _a={textDecorationColor:aa.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:aa.shadows("textShadow")},Ra={clipPath:!0,transform:aa.propT("transform",ia.transform),transformOrigin:!0,translateX:aa.spaceT("--chakra-translate-x"),translateY:aa.spaceT("--chakra-translate-y"),skewX:aa.degreeT("--chakra-skew-x"),skewY:aa.degreeT("--chakra-skew-y"),scaleX:aa.prop("--chakra-scale-x"),scaleY:aa.prop("--chakra-scale-y"),scale:aa.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:aa.degreeT("--chakra-rotate")},Ta={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:aa.prop("transitionDuration","transition.duration"),transitionProperty:aa.prop("transitionProperty","transition.property"),transitionTimingFunction:aa.prop("transitionTimingFunction","transition.easing")},Ca={fontFamily:aa.prop("fontFamily","fonts"),fontSize:aa.prop("fontSize","fontSizes",ia.px),fontWeight:aa.prop("fontWeight","fontWeights"),lineHeight:aa.prop("lineHeight","lineHeights"),letterSpacing:aa.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,textIndent:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,isTruncated:{transform(e){if(!0===e)return{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}},noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},ja={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:aa.spaceT("scrollMargin"),scrollMarginTop:aa.spaceT("scrollMarginTop"),scrollMarginBottom:aa.spaceT("scrollMarginBottom"),scrollMarginLeft:aa.spaceT("scrollMarginLeft"),scrollMarginRight:aa.spaceT("scrollMarginRight"),scrollMarginX:aa.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:aa.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:aa.spaceT("scrollPadding"),scrollPaddingTop:aa.spaceT("scrollPaddingTop"),scrollPaddingBottom:aa.spaceT("scrollPaddingBottom"),scrollPaddingLeft:aa.spaceT("scrollPaddingLeft"),scrollPaddingRight:aa.spaceT("scrollPaddingRight"),scrollPaddingX:aa.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:aa.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function Oa(e){return zi(e)&&e.reference?e.reference:String(e)}var La=(e,...t)=>t.map(Oa).join(` ${e} `).replace(/calc/g,""),Aa=(...e)=>`calc(${La("+",...e)})`,Ea=(...e)=>`calc(${La("-",...e)})`,Ma=(...e)=>`calc(${La("*",...e)})`,Pa=(...e)=>`calc(${La("/",...e)})`,Ia=e=>{const t=Oa(e);return null==t||Number.isNaN(parseFloat(t))?Ma(t,-1):String(t).startsWith("-")?String(t).slice(1):`-${t}`},$a=Object.assign((e=>({add:(...t)=>$a(Aa(e,...t)),subtract:(...t)=>$a(Ea(e,...t)),multiply:(...t)=>$a(Ma(e,...t)),divide:(...t)=>$a(Pa(e,...t)),negate:()=>$a(Ia(e)),toString:()=>e.toString()})),{add:Aa,subtract:Ea,multiply:Ma,divide:Pa,negate:Ia});function za(e){if(null==e)return e;const{unitless:t}=function(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}(e);return t||"number"==typeof e?`${e}px`:e}function Ba(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${za(e)})`),t&&n.push("and",`(max-width: ${za(t)})`),n.join(" ")}var Da=(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,Ga=(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,Fa=(e,t)=>`${e}:focus-visible ${t}`,Ua=(e,t)=>`${e}:focus-within ${t}`,Wa=(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,Va=(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,Ha=(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,Ja=(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,qa=(e,t)=>`${e}:placeholder-shown ${t}`,Ka=e=>Qa((t=>e(t,"&")),"[role=group]","[data-group]",".group"),Ya=e=>Qa((t=>e(t,"~ &")),"[data-peer]",".peer"),Qa=(e,...t)=>t.map(e).join(", "),Za={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_firstLetter:"&::first-letter",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:Ka(Da),_peerHover:Ya(Da),_groupFocus:Ka(Ga),_peerFocus:Ya(Ga),_groupFocusVisible:Ka(Fa),_peerFocusVisible:Ya(Fa),_groupActive:Ka(Wa),_peerActive:Ya(Wa),_groupDisabled:Ka(Va),_peerDisabled:Ya(Va),_groupInvalid:Ka(Ha),_peerInvalid:Ya(Ha),_groupChecked:Ka(Ja),_peerChecked:Ya(Ja),_groupFocusWithin:Ka(Ua),_peerFocusWithin:Ya(Ua),_peerPlaceholderShown:Ya(qa),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]",_horizontal:"&[data-orientation=horizontal]",_vertical:"&[data-orientation=vertical]"},Xa=Object.keys(Za),es=Fi({},sa,la,ca,pa,fa,ua,ka,ga,ha,xa,Sa,da,Na,ja,Ca,_a,Ra,ma,Ta);Object.assign({},Na,fa,pa,ha,Sa);var ts=[...Object.keys(es),...Xa],ns={...es,...Za},rs=(e,t)=>e.startsWith("--")&&"string"==typeof t&&!function(e){return/^var\(--.+\)$/.test(e)}(t),os=(e,t)=>{var n,r;if(null==t)return t;const o=t=>{var n,r;return null==(r=null==(n=e.__cssMap)?void 0:n[t])?void 0:r.varRef},i=e=>{var t;return null!=(t=o(e))?t:e},[a,s]=function(e){const t=[];let n="",r=!1;for(let o=0;o{var a,s,l;const c=Bi(e,r),d=(e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:o}=t.__breakpoints,i={};for(const a in e){let s=Bi(e[a],t);if(null==s)continue;if(s=zi(s)&&n(s)?r(s):s,!Array.isArray(s)){i[a]=s;continue}const l=s.slice(0,o.length).length;for(let e=0;e{Fi(s,{[e]:d?g[e]:{[h]:g[e]}})}));continue}if(!u){d?Fi(s,g):s[h]=g;continue}s[h]=g}}return s}}function ls(e){return function(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}(e,["styleConfig","size","variant","colorScheme"])}var cs=typeof Element<"u",ds="function"==typeof Map,us="function"==typeof Set,ps="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function hs(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;var n,r,o,i;if(Array.isArray(e)){if((n=e.length)!=t.length)return!1;for(r=n;0!=r--;)if(!hs(e[r],t[r]))return!1;return!0}if(ds&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;for(i=e.entries();!(r=i.next()).done;)if(!hs(r.value[1],t.get(r.value[0])))return!1;return!0}if(us&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(ps&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if((n=e.length)!=t.length)return!1;for(r=n;0!=r--;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&"function"==typeof e.valueOf&&"function"==typeof t.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&"function"==typeof e.toString&&"function"==typeof t.toString)return e.toString()===t.toString();if((n=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;if(cs&&e instanceof Element)return!1;for(r=n;0!=r--;)if(("_owner"!==o[r]&&"__v"!==o[r]&&"__o"!==o[r]||!e.$$typeof)&&!hs(e[o[r]],t[o[r]]))return!1;return!0}return e!=e&&t!=t}const gs=si((function(e,t){try{return hs(e,t)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}}));function fs(e,t={}){var n;const{styleConfig:r,...o}=t,{theme:i,colorMode:a}=Ii(),s=e?G(i,`components.${e}`):void 0,l=r||s,c=F({theme:i,colorMode:a},null!=(n=null==l?void 0:l.defaultProps)?n:{},U(m(o,["children"]))),d=Me.useRef({});if(l){const e=function(e){return t=>{var n;const{variant:r,size:o,theme:i}=t,a=ss(i);return Fi({},Bi(null!=(n=e.baseStyle)?n:{},t),a(e,"sizes",o,t),a(e,"variants",r,t))}}(l)(c);gs(d.current,e)||(d.current=e)}return d.current}var ms=new Set([...ts,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),ys=new Set(["htmlWidth","htmlHeight","htmlSize","htmlTranslate"]);function bs(e){return ys.has(e)||!ms.has(e)}var vs,ws=null!=(vs=u.default)?vs:u,xs=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:o,sx:i,...a}=t,s=W(a,((e,t)=>(e=>e in ns)(t))),l=function(e,...t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");const n={...e};for(const r of t)if(null!=r)for(const e in r)Object.prototype.hasOwnProperty.call(r,e)&&(e in n&&delete n[e],n[e]=r[e]);return n}({},o,p(e,t),U(s),i),c=(e=>t=>is({theme:t,pseudos:Za,configs:es})(e))(l)(t.theme);return r?[c,r]:c};function Ss(e,t){const{baseStyle:n,...r}=null!=t?t:{};r.shouldForwardProp||(r.shouldForwardProp=bs);const o=xs({baseStyle:n}),i=ws(e,r)(o);return Pe.forwardRef((function(e,t){const{colorMode:n,forced:r}=Pi();return Pe.createElement(i,{ref:t,"data-theme":r?n:void 0,...e})}))}var ks=function(){const e=new Map;return new Proxy(Ss,{apply:(e,t,n)=>Ss(...n),get:(t,n)=>(e.has(n)||e.set(n,Ss(n)),e.get(n))})}();function Ns(e){return Me.forwardRef(e)}var _s={path:ui.jsxs("g",{stroke:"currentColor",strokeWidth:"1.5",children:[ui.jsx("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),ui.jsx("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),ui.jsx("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},Rs=Ns(((e,t)=>{const{as:n,viewBox:r,color:o="currentColor",focusable:i=!1,children:a,className:s,__css:l,...c}=e,d=$i("chakra-icon",s),u=function(e,t={}){return fs(e,t)}("Icon",e),p={ref:t,focusable:i,className:d,__css:{w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:o,...l,...u}},h=null!=r?r:_s.viewBox;if(n&&"string"!=typeof n)return ui.jsx(ks.svg,{as:n,...p,...c});const g=null!=a?a:_s.path;return ui.jsx(ks.svg,{verticalAlign:"middle",viewBox:h,...p,...c,children:g})}));Rs.displayName="Icon",Ns((function(e,t){const{spacing:n="0.5rem",spacingX:r,spacingY:o,children:i,justify:a,direction:s,align:l,className:c,shouldWrapChildren:d,...u}=e,p=Me.useMemo((()=>d?Me.Children.map(i,((e,t)=>ui.jsx(Ts,{children:e},t))):i),[i,d]);return ui.jsx(ks.div,{ref:t,className:$i("chakra-wrap",c),...u,children:ui.jsx(ks.ul,{className:"chakra-wrap__list",__css:{display:"flex",flexWrap:"wrap",justifyContent:a,alignItems:l,flexDirection:s,listStyleType:"none",gap:n,columnGap:r,rowGap:o,padding:"0"},children:p})})})).displayName="Wrap";var Ts=Ns((function(e,t){const{className:n,...r}=e;return ui.jsx(ks.li,{ref:t,__css:{display:"flex",alignItems:"flex-start"},className:$i("chakra-wrap__listitem",n),...r})}));Ts.displayName="WrapItem";var Cs=ks("div");Cs.displayName="Box";var js=Ns((function(e,t){const{size:n,centerContent:r=!0,...o}=e,i=r?{display:"flex",alignItems:"center",justifyContent:"center"}:{};return ui.jsx(Cs,{ref:t,boxSize:n,__css:{...i,flexShrink:0,flexGrow:0},...o})}));js.displayName="Square",Ns((function(e,t){const{size:n,...r}=e;return ui.jsx(js,{size:n,ref:t,borderRadius:"9999px",...r})})).displayName="Circle";var Os=Ns((function(e,t){const{direction:n,align:r,justify:o,wrap:i,basis:a,grow:s,shrink:l,...c}=e,d={display:"flex",flexDirection:n,alignItems:r,justifyContent:o,flexWrap:i,flexBasis:a,flexGrow:s,flexShrink:l};return ui.jsx(ks.div,{ref:t,__css:d,...c})}));Os.displayName="Flex";const Ls=e=>{const{getEmptyStateProps:t}=hi(),n=t(ui.jsx(Os,{...As,children:"No options found!"}));return ui.jsx(Cs,{...e,children:n})},As={fontSize:"sm",align:"center",justify:"center",fontWeight:"bold",fontStyle:"italic"},Es=["AutoCompleteGroup","AutoCompleteItem","AutoCompleteCreatable"],Ms=d(((e,t)=>{const{children:n,loadingState:r,...o}=e,{listRef:i,isLoading:a}=hi(),s=g(t,i),[l,c]=(e=>{const t=Pe.Children.map(e,((t,n)=>{var r;if("AutoCompleteGroup"===(null==(r=null==t?void 0:t.type)?void 0:r.displayName)){const r=Pe.Children.toArray(e)[n+1];return Pe.cloneElement(t,{groupSibling:!!r&&"AutoCompleteGroup"===r.type.displayName})}return t})),n=Pe.Children.toArray(t).filter((e=>{var t;return!Es.includes(null==(t=null==e?void 0:e.type)?void 0:t.displayName)}));return[Pe.Children.toArray(t).filter((e=>{var t;return Es.includes(null==(t=null==e?void 0:e.type)?void 0:t.displayName)})),n]})(n);return ui.jsxs(C,{ref:s,w:"inherit",...Ps,...o,children:[a&&ui.jsx(j,{children:r||ui.jsx(k,{size:"md"})}),!a&&ui.jsxs(ui.Fragment,{children:[l,ui.jsx(Ls,{}),c]})]})}));Ms.displayName="AutoCompleteList";const Ps={py:"4",opacity:"0",bg:"#232934",rounded:"md",maxH:"350px",border:"none",shadow:"base",zIndex:"popover",overflowY:"auto",_light:{bg:"#ffffff"},_focus:{boxShadow:"none"}};var[Is,$s]=function(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:o="Provider",errorMessage:i,defaultValue:a}=e,s=Me.createContext(a);return s.displayName=t,[s.Provider,function e(){var t;const a=Me.useContext(s);if(!a&&n){const n=new Error(null!=i?i:function(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}(r,o));throw n.name="ContextError",null==(t=Error.captureStackTrace)||t.call(Error,n,e),n}return a},s]}({name:"TagStylesContext",errorMessage:"useTagStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),zs=Ns(((e,t)=>{const n=function(e,t={}){return fs(e,t)}("Tag",e),r=ls(e),o={display:"inline-flex",verticalAlign:"top",alignItems:"center",maxWidth:"100%",...n.container};return ui.jsx(Is,{value:n,children:ui.jsx(ks.span,{ref:t,...r,__css:o})})}));zs.displayName="Tag";var Bs=Ns(((e,t)=>{const n=$s();return ui.jsx(ks.span,{ref:t,noOfLines:1,...e,__css:n.label})}));Bs.displayName="TagLabel",Ns(((e,t)=>ui.jsx(Rs,{ref:t,verticalAlign:"top",marginEnd:"0.5rem",...e}))).displayName="TagLeftIcon",Ns(((e,t)=>ui.jsx(Rs,{ref:t,verticalAlign:"top",marginStart:"0.5rem",...e}))).displayName="TagRightIcon";var Ds=e=>ui.jsx(Rs,{verticalAlign:"inherit",viewBox:"0 0 512 512",...e,children:ui.jsx("path",{fill:"currentColor",d:"M289.94 256l95-95A24 24 0 00351 127l-95 95-95-95a24 24 0 00-34 34l95 95-95 95a24 24 0 1034 34l95-95 95 95a24 24 0 0034-34z"})});Ds.displayName="TagCloseIcon";var Gs=Ns(((e,t)=>{const{isDisabled:n,children:r,...o}=e,i={display:"flex",alignItems:"center",justifyContent:"center",outline:"0",...$s().closeButton};return ui.jsx(ks.button,{ref:t,"aria-label":"close",...o,type:"button",disabled:n,__css:i,children:r||ui.jsx(Ds,{})})}));Gs.displayName="TagCloseButton",Me.memo((e=>{const{label:t,onRemove:n,disabled:r,...o}=e;return ui.jsx(Ts,{children:ui.jsxs(zs,{borderRadius:"md",fontWeight:"normal",...r&&Fs,...o,children:[ui.jsx(Bs,{children:t}),ui.jsx(Gs,{onClick:()=>!r&&p(n),cursor:"pointer",...r&&Fs})]})})}));const Fs={cursor:"text",userSelect:"none",opacity:.4,_focus:{boxShadow:"none"}};var Us=function(){return Us=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},Js=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},Xs=e("aX",Me.forwardRef((function(e,t){var n=e.validator,r=e.onDebouncedChange,o=e.delay,a=e.optionList,s=e.defaultValue;e.onChange;var l=Qs(e,["validator","onDebouncedChange","delay","optionList","defaultValue","onChange"]),c=Me.useRef(null),d=g(c,t),u=Me.useRef("datalist-"+(new Date).valueOf()),p=Zs(Me.useState(!1),2),h=p[0],f=p[1],m=Me.useRef();return Me.useEffect((function(){c.current&&(c.current.value=(null==s?void 0:s.toString())||"")}),[s]),i.jsxs(i.Fragment,{children:[i.jsx(x,Ys({ref:d,list:u.current,variant:"flushed",size:"sm",h:6,onChange:function(e){var t=e.target.value;window.clearTimeout(m.current),n&&f(!n(t)),m.current=window.setTimeout((function(){null==r||r(t),m.current=void 0}),null!=o?o:500)},onBlur:function(e){var t=e.target.value;void 0!==m.current&&(window.clearTimeout(m.current),n&&f(!n(t)),null==r||r(t),m.current=void 0)},isInvalid:h},l)),a&&i.jsx("datalist",{id:u.current,children:null==a?void 0:a.map((function(e,t){return i.jsx("option",{children:e},t)}))})]})}))),el=function(){return el=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},ol=function(e){switch(e){case nt.DEV:return"red";case nt.UAT:return"orange";case nt.PRD:return"green"}},il=function(e,t,n){var r=new Blob([n],{type:t});al(e,r)},al=function(e,t){var n=window.URL.createObjectURL(t),r=document.createElement("a");r.href=n,r.download=e,document.body.appendChild(r),r.click(),document.body.removeChild(r),window.URL.revokeObjectURL(n)},sl=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function ll(e){var t=e.cancelRef,n=e.isOpen,r=e.onClose,o=sl(Me.useState(!1),2),a=o[0],s=o[1];return i.jsxs(te,{leastDestructiveRef:t,isOpen:n,onClose:r,children:[i.jsx(ne,{}),i.jsxs(re,{children:[i.jsx(oe,{children:"Warning 警告"}),i.jsx(ie,{}),i.jsxs(ae,{sx:{"& p":{my:1}},children:[i.jsx(se,{children:"Are you sure you want to reset the app? The webpage local storage for this app will be cleared. A copy of the local storage will be downloaded and it may be used for restoration (varies with app)."}),i.jsx(se,{children:"確定重設該應用程式嗎?應用程式的網頁本地儲存將會被清除。本地儲存的副本可供下載及用於復原(因應用程式而異)。"}),i.jsx(se,{children:"确定重置本应用程序吗?应用程序的网页本地存储将会被清除。本地存储的拷贝可供下载以及用于还原(因应用程序而異)。"})]}),i.jsxs(le,{children:[i.jsx(J,{ref:t,onClick:r,children:"Cancel"}),i.jsx(J,{isLoading:a,colorScheme:"red",ml:3,onClick:function(){s(!0);var e=qn.storage.getAll(),t=qn.getAppName(),n="".concat(t,"_BACKUP_").concat((new Date).toISOString(),".json");il(n,"application/json",JSON.stringify(e)),qn.storage.clear(),setTimeout((function(){window.location.reload()}),2e3)},children:"Confirm and reload"})]})]})]})}var cl=function(){return cl=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function pl(e){var t=e.error,n=e.errorInfo,o=e.allowReset,a=e.sx,s=dl(e,["error","errorInfo","allowReset","sx"]),l=r("RmgErrorBoundary"),c=ce("primary.500","primary.300"),d=ul(Me.useState(!1),2),u=d[0],p=d[1],h=Me.useRef(null),g=function(e){return i.jsx(de,{color:c,role:"button",onClick:function(){return p(!0)},children:e})},f=qn.getAppName(),m=i.jsx(de,{color:c,href:"https://github.com/railmapgen/".concat(f,"/issues"),isExternal:!0,children:"GitHub Issue"});return i.jsxs(ue,cl({status:"error",sx:cl(cl({},l),a)},s,{children:[i.jsx(pe,{}),i.jsx(he,{children:"Something went wrong!"}),i.jsxs(ge,{children:[i.jsxs(se,{children:["Please try to refresh or re-import your configuration files. If the issue still persists, please consider upgrading your browser",o?i.jsxs(i.Fragment,{children:[" or ",g("reset this app")]}):"",". Should you need any help, please contact us by submitting an issue in ",m," with the details shown below."]}),i.jsxs(se,{children:["請嘗試重新整理或重新上載設定檔。如果問題仍然存在,請考慮更新你的瀏覽器",o?i.jsxs(i.Fragment,{children:["或",g("重設該應用程式")]}):"","。如需協助或與我們聯絡,請前往 ",m," 提交一個 Issue 並附以詳細資料。"]}),i.jsxs(se,{children:["请尝试刷新或者重新上传配置文件。如果问题仍然存在,请考虑更新您的浏览器",o?i.jsxs(i.Fragment,{children:["或者",g("重置本应用程序")]}):"","。如需帮助或者联系我们,请前往 ",m," 提交一个 Issue 并附上详细信息。"]}),i.jsxs(se,{as:"details",children:[null==t?void 0:t.toString(),i.jsx("br",{}),null==n?void 0:n.componentStack]}),o&&i.jsx(ll,{cancelRef:h,isOpen:u,onClose:function(){return p(!1)}})]})]}))}var hl,gl=(hl=function(e,t){return hl=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},hl(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}hl(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),fl=function(){return fl=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function Nl(e){var t=e.defaultValue,n=e.options,r=e.disabledOptions,o=Sl(e,["defaultValue","options","disabledOptions"]),a=Me.useRef(null);Me.useEffect((function(){a.current&&(a.current.value=(null==t?void 0:t.toString())||"")}),[t]);var s=function(e,t){return i.jsx("option",{value:e,disabled:void 0!==(null==r?void 0:r.find((function(t){return t.toString()===e}))),children:t},e)};return i.jsx(ye,xl({ref:a,variant:"flushed",size:"sm",h:6},o,{children:Object.entries(n).map((function(e){var t=kl(e,2),n=t[0],r=t[1];return"object"==typeof r?i.jsx("optgroup",{label:n,children:Object.entries(r).map((function(e){var t=kl(e,2),n=t[0],r=t[1];return s(n,r)}))},n):s(n,r)}))}))}var _l=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},Rl=(e("u",(function(e,t,n){var r=_l(Me.useState(t()),2),o=r[0],i=r[1];return Me.useEffect((function(){e.then((function(){console.debug("[rmg-components] Getter updates finished"),i(t())}))}),[]),o})),function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}),Tl=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function Ol(e){var t=e.defaultValue,n=e.min,o=e.max,a=e.step,s=e.onThrottledChange,l=e.leftIcon,c=e.rightIcon,d=r("RmgThrottledSlider"),u=jl(Me.useState(null!=t?t:0),2),p=u[0],h=u[1];Me.useEffect((function(){void 0!==t&&p!==t&&h(t)}),[t]);var g=Cl(null!=s?s:function(){},500);return i.jsxs(y,{sx:d,children:[l&&i.jsx(be,{size:"xs",variant:"ghost","aria-label":"Drag left",icon:l,onClick:function(){var e=Math.max(p-10*(null!=a?a:1),null!=n?n:0);null==s||s(e),h(e)}}),i.jsxs(ve,{value:p,min:n,max:o,step:a,onChange:function(e){g(e),h(e)},children:[i.jsx(we,{children:i.jsx(xe,{})}),i.jsx(Se,{})]}),c&&i.jsx(be,{size:"xs",variant:"ghost","aria-label":"Drag right",icon:c,onClick:function(){var e=Math.min(p+10*(null!=a?a:1),null!=o?o:100);null==s||s(e),h(e)}})]})}var Ll=function(e){var t=e.children,n=e.noWrap,o=r("RmgOutput",{noWrap:n});return i.jsx(s.output,{sx:o,children:t})};function Al(e){var t=e.fields,n=e.noLabel,r=e.minW;return i.jsx(y,{wrap:"wrap",children:t.map((function(e,t){if(e.hidden)return i.jsx(Me.Fragment,{},t);var o=e.minW||r,a="full"===o;return i.jsx(wl,{className:a?"mw-full":"",label:e.label,flex:a?void 0:1,minW:a?void 0:o,noLabel:n,oneLine:e.oneLine,children:function(e){switch(e.type){case"input":return i.jsx(Xs,{placeholder:e.placeholder,defaultValue:e.value,type:e.variant,validator:e.validator,onDebouncedChange:e.onChange,delay:e.debouncedDelay,optionList:e.optionList,isDisabled:e.isDisabled});case"output":return i.jsx(Ll,{noWrap:e.noWrap,children:e.value});case"textarea":return i.jsx(nl,{placeholder:e.placeholder,defaultValue:e.value,onDebouncedChange:e.onChange,isDisabled:e.isDisabled});case"slider":return i.jsx(Ol,{defaultValue:e.value,min:e.min,max:e.max,step:e.step,onThrottledChange:e.onChange,leftIcon:e.leftIcon,rightIcon:e.rightIcon,isDisabled:e.isDisabled});case"select":return i.jsx(Nl,{defaultValue:e.value,onChange:function(t){var n,r=t.target.value;return null===(n=e.onChange)||void 0===n?void 0:n.call(e,"number"==typeof e.value?Number(r):r.toString())},options:e.options,disabledOptions:e.disabledOptions,isInvalid:e.isInvalid,isDisabled:e.isDisabled});case"switch":return i.jsx(ke,{isChecked:e.isChecked,isDisabled:e.isDisabled,onChange:function(t){var n,r=t.target.checked;return null===(n=e.onChange)||void 0===n?void 0:n.call(e,r)}});case"custom":return e.component;default:return i.jsx("div",{})}}(e)},t)}))})}var El=function(){return El=Object.assign||function(e){for(var t,n=1,r=arguments.length;n span:last-of-type":{position:"absolute",right:8}},"& .rmg-multi-select__icon-wrapper":{display:"inline-flex",justifyContent:"center",w:6,h:"100%",position:"absolute",right:2,top:0,fontSize:"xl","& svg":{h:"1em",w:"1em"}},"& .chakra-popover__content":{w:"unset",minW:200},"& .chakra-popover__body":{p:0,"li label":{p:2,w:"100%",_hover:{bg:"dark"===n?"whiteAlpha.200":"gray.100"},_active:{bg:"dark"===n?"whiteAlpha.300":"gray.200"}}}}}},Vl=function(){return Vl=Object.assign||function(e){for(var t,n=1,r=arguments.length;n button:first-of-type":{ml:1}}},RmgLoader:{baseStyle:{w:"100%",h:"100%",position:"absolute",top:0,right:0,alignItems:"center",justifyContent:"center","& .rmg-loader__backdrop":{position:"absolute",w:"100%",h:"100%",zIndex:1500,bg:"blackAlpha.400"},"& .chakra-progress":{zIndex:2e3}}},RmgMultiSelect:Wl,RmgOutput:Jl,RmgPage:{baseStyle:{position:"relative",flexDirection:"column",flex:1,overflow:"hidden",background:"inherit"}},RmgPageHeader:{baseStyle:{alignItems:"center",flexWrap:"wrap",pl:2,pr:3,py:1,zIndex:10}},RmgSection:{baseStyle:{position:"relative",background:"inherit"}},RmgSectionHeader:{baseStyle:{display:"flex",alignItems:"center",flexWrap:"wrap",position:"sticky",top:0,background:"inherit",px:2,py:1,zIndex:5}},RmgSidePanel:{baseStyle:function(e){var t=e.colorMode,n=e.width,r=e.alwaysOverlay;return{height:"100%",position:r?"absolute":{base:"absolute",lg:"relative"},right:r?0:{base:0,lg:"unset"},background:"light"===t?"white":"gray.800",boxShadow:"lg",flexShrink:0,flexDirection:"column",transition:"0.3s ease-in-out",maxW:0,visibility:"hidden",zIndex:5,"&.show-side-panel":{maxW:{base:"100%",sm:n},w:{base:"100%",sm:"unset"},visibility:"initial"},"& .rmg-side-panel__inner":{flexDirection:"column",h:"100%",w:{base:"100vw",sm:n}},"& .rmg-side-panel__header":{flexShrink:0,pl:3,pr:1,py:0,"& button":{ml:"auto"}},"& .rmg-side-panel__body":{display:"flex",flexDirection:"column",flex:1,overflowY:"auto",p:1},"& .rmg-side-panel__footer":{display:"flex",justifyContent:"flex-end",p:1}}}},RmgThrottledSlider:{baseStyle:{h:6,alignItems:"center","& .chakra-button:first-of-type":{mr:1},"& .chakra-button:last-of-type":{ml:1}}},RmgWindow:{baseStyle:{position:"relative",flexDirection:"column",height:"100%",overflow:"hidden",background:"inherit"}},RmgWindowHeader:{baseStyle:{px:2,alignItems:"center",zIndex:15,minH:10,transition:"0.3s ease-in-out"}}},Kl=function(){return Kl=Object.assign||function(e){for(var t,n=1,r=arguments.length;n(e.RailMap="railmap",e.Platform="platform",e))(tc||{})),nc=e("aR",(e=>(e.Metro="metro",e.NationalRail="nationalrail",e.LightRail="lightrail",e.Footpath="footpath",e))(nc||{})),rc=e("E",(e=>(e.APP_LOAD="APP_LOAD",e.ADD_STATION="ADD_STATION",e.ADD_LINE="ADD_LINE",e.IMPORT_RMG_PARAM="IMPORT_RMG_PARAM",e.IMPORT_WORK_FROM_GALLERY="IMPORT_WORK_FROM_GALLERY",e.DOWNLOAD_PARAM="DOWNLOAD_PARAM",e.DOWNLOAD_IMAGES="DOWNLOAD_IMAGES",e.LOAD_TUTORIAL="LOAD_TUTORIAL",e))(rc||{})),oc=e("K",(e=>(e.LOGIN_STATE="rmp__login_state",e.APP="rmp__app",e.PARAM="rmp__param",e.PARAM_BACKUP="rmp__param__backup",e.DO_NOT_SHOW_RMT_MSG="rmp__doNotShowRMTMsg",e.ACCOUNT="rmg-home__account",e))(oc||{})),ic=e("C",(e=>(e.Other="other",e.Beijing="beijing",e.Berlin="berlin",e.Chongqing="chongqing",e.Foshan="foshan",e.Guangzhou="guangzhou",e.Hongkong="hongkong",e.Kunming="kunming",e.London="london",e.Qingdao="qingdao",e.Shanghai="shanghai",e.Shenzhen="shenzhen",e.Singapore="singapore",e.Suzhou="suzhou",e.Tokyo="tokyo",e))(ic||{}));const ac={RMP_CLOUD:!1,RMP_EXPORT:!1},sc=Ie({name:"account",initialState:{state:"logged-out",activeSubscriptions:ac,timeout:void 0},reducers:{setState:(e,t)=>{e.state=t.payload},setActiveSubscriptions:(e,t)=>{e.activeSubscriptions=t.payload},setLoginStateTimeout:(e,t)=>{e.timeout=t.payload}}}),{setState:lc,setActiveSubscriptions:cc,setLoginStateTimeout:dc}=sc.actions,uc=sc.reducer;var pc;e("M",pc),function(e){e.black="#000",e.white="#fff"}(pc||e("M",pc={}));var hc=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(Op){i(Op)}}function s(e){try{l(r.throw(e))}catch(Op){i(Op)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};let gc={};const fc=(e,t)=>hc(void 0,void 0,void 0,(function*(){return yield((e,t)=>hc(void 0,void 0,void 0,(function*(){if(e in gc)return gc[e];const n=yield fetch(e,t),r=yield n.json();return gc[e]=r,r})))(`/rmg-palette/resources/palettes/${e}.json`,{signal:t})}));var mc=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(Op){i(Op)}}function s(e){try{l(r.throw(e))}catch(Op){i(Op)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};e("Y",((e,t,n)=>mc(void 0,void 0,void 0,(function*(){const[t,n]=e;if("other"===t)return e;try{const r=(yield fc(t)).find((e=>e.id===n));return r?[t,n,r.colour,r.fg||pc.white]:(console.warn(`[rmg-palette] updateTheme(${t}, ${n}), line does not exist, returning old theme`),e)}catch(Op){throw console.error(`[rmg-palette] updateTheme(${t}, ${n}), unexpected error occurs`,Op),Op}})))),e("ar",(e=>{const t=e.currentTarget.getBoundingClientRect();return{x:e.clientX-t.left,y:e.clientY-t.top}})),e("U",((e,t,n,r)=>({x:e*n/100+r.x,y:t*n/100+r.y}))),e("av",((e,t)=>Math.round(e/t)*t)),e("e",(e=>{let[t,n,r,o]=[Number.MAX_VALUE,Number.MAX_VALUE,Number.MIN_VALUE,Number.MIN_VALUE];return e.forEachNode(((e,i)=>{const a=document.getElementById(e);if(a){const e=yc(a);t=Math.min(e.x,t),n=Math.min(e.y,n),r=Math.max(e.x+e.width,r),o=Math.max(e.y+e.height,o)}})),t-=50,n-=50,r+=100,o+=100,{xMin:t,yMin:n,xMax:r,yMax:o}})),e("p",(e=>{var t,n;return{width:(null!==(t=e.width)&&void 0!==t?t:720)-40,height:(null!==(n=e.height)&&void 0!==n?n:1280)-40}}));const yc=e=>{const t=e.getBBox(),n=e.ownerSVGElement,r=e.parentNode.getScreenCTM().inverse().multiply(e.getScreenCTM()),o=[n.createSVGPoint(),n.createSVGPoint(),n.createSVGPoint(),n.createSVGPoint()];o[0].x=t.x,o[0].y=t.y,o[1].x=t.x+t.width,o[1].y=t.y,o[2].x=t.x+t.width,o[2].y=t.y+t.height,o[3].x=t.x,o[3].y=t.y+t.height;let[i,a,s,l]=[Number.MAX_VALUE,Number.MAX_VALUE,Number.MIN_VALUE,Number.MIN_VALUE];return o.forEach((e=>{e=e.matrixTransform(r),i=Math.min(i,e.x),s=Math.max(s,e.x),a=Math.min(a,e.y),l=Math.max(l,e.y)})),t.x=i,t.width=s-i,t.y=a,t.height=l-a,t};e("a8",navigator.platform.startsWith("Mac")),e("aZ",(()=>`#${Math.floor(16777215*Math.random()).toString(16).padStart(6,"0")}`)),e("a_",(e=>(299*parseInt(e.slice(1,3),16)+587*parseInt(e.slice(3,5),16)+114*parseInt(e.slice(5,7),16))/1e3>=128?pc.black:pc.white));var bc=e("J",(e=>(e.SAVE_CHANGED="SAVE_CHANGED",e.TOKEN_REQUEST="TOKEN_REQUEST",e))(bc||{}));const vc=e("B",new BroadcastChannel("rmt-save-manager"));let wc;const xc=async e=>{const t=await(async(e,t="SHA-256")=>{const n=(new TextEncoder).encode(e),r=await crypto.subtle.digest(t,n);return Array.from(new Uint8Array(r)).map((e=>e.toString(16).padStart(2,"0"))).join("")})(JSON.stringify(e));wc&&wc!==t&&vc.postMessage({type:"SAVE_CHANGED",key:oc.PARAM,from:"rmp"}),wc=t},Sc=e("_",(async()=>{vc.postMessage({type:"TOKEN_REQUEST",from:"rmp"})}));let kc=e("n",((e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&n[e]];return t}));var Nc=e("k",(e=>(e.Diagonal="diagonal",e.Perpendicular="perpendicular",e.RotatePerpendicular="ro-perp",e.Simple="simple",e))(Nc||{})),_c=e("o",(e=>(e.SingleColor="single-color",e.ShanghaiSuburbanRailway="sh-sub-rwy",e.ShmetroVirtualInt="shmetro-virtual-int",e.GzmtrVirtualInt="gzmtr-virtual-int",e.ChinaRailway="china-railway",e.BjsubwaySingleColor="bjsubway-single-color",e.BjsubwayTram="bjsubway-tram",e.BjsubwayDotted="bjsubway-dotted",e.DualColor="dual-color",e.River="river",e.MTRRaceDays="mtr-race-days",e.MTRLightRail="mtr-light-rail",e.MTRUnpaidArea="mtr-unpaid-area",e.MTRPaidArea="mtr-paid-area",e.MRTUnderConstruction="mrt-under-constr",e.MRTSentosaExpress="mrt-sentosa-express",e.JREastSingleColor="jr-east-single-color",e.JREastSingleColorPattern="jr-east-single-color-pattern",e.LRTSingleColor="lrt-single-color",e.LondonTubeTerminal="london-tube-terminal",e.LondonTubeInternalInt="london-tube-internal-int",e.LondonTube10MinWalk="london-tube-10-min-walk",e.GuangdongIntercityRailway="gd-intercity-rwy",e))(_c||{}));e("L",["single-color","bjsubway-single-color","bjsubway-tram","bjsubway-dotted","china-railway","mtr-race-days","mtr-light-rail","mrt-under-constr","jr-east-single-color","jr-east-single-color-pattern","lrt-single-color"]);const Rc={offset:0},Tc={generatePath:(e,t,n,r,o=Rc)=>{const{offset:i=Rc.offset}=o,a=Math.abs((r-n)/(t-e));if(a===1/0)return`M ${e+i} ${n} L ${t+i} ${r}`;if(0===a)return`M ${e} ${n+i} L ${t} ${r+i}`;{const o=1/a,s=i/Math.sqrt(o*o+1),l=s*o*-Math.sign((t-e)*(r-n));return`M ${e+s} ${n+l} L ${t+s} ${r+l}`}},icon:i.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:i.jsx("path",{d:"M6,18L18,6",stroke:"currentColor",fill:"none"})}),defaultAttrs:Rc,attrsComponent:e=>{var t;const{id:n,attrs:r,handleAttrsUpdate:o}=e,{t:a}=$e(),s=[{type:"input",label:a("panel.details.lines.simple.offset"),value:(null!==(t=r.offset)&&void 0!==t?t:Rc.offset).toString(),variant:"number",onChange:e=>{r.offset=Number(e),o(n,r)},minW:"full"}];return i.jsx(Al,{fields:s})},metadata:{displayName:"panel.details.lines.simple.displayName"}},Cc=(e("aO",{translateX:0,translateY:0,scale:1,rotate:0}),e("ay",3));var jc=e("aw",(e=>(e.Virtual="virtual",e.ShmetroNumLineBadge="shmetro-num-line-badge",e.ShmetroTextLineBadge="shmetro-text-line-badge",e.GzmtrLineBadge="gzmtr-line-badge",e.BjsubwayNumLineBadge="bjsubway-num-line-badge",e.BjsubwayTextLineBadge="bjsubway-text-line-badge",e.SuzhouRTNumLineBadge="suzhourt-num-line-badge",e.BerlinSBahnLineBadge="berlin-s-bahn-line-badge",e.BerlinUBahnLineBadge="berlin-u-bahn-line-badge",e.ChongqingRTNumLineBadge="chongqingrt-num-line-badge",e.ChongqingRTTextLineBadge="chongqingrt-text-line-badge",e.ShenzhenMetroNumLineBadge="shenzhen-metro-num-line-badge",e.MRTDestinationNumbers="mrt-num-line-badge",e.JREastLineBadge="jr-east-line-badge",e.QingdaoMetroNumLineBadge="qingdao-metro-num-line-badge",e.MRTLineBadge="mrt-line-badge",e.GuangdongIntercityRailwayLineBadge="gd-intercity-rwy-line-badge",e.Facilities="facilities",e.Text="text",e.I18nText="i18n-text",e.Master="master",e))(jc||{})),Oc={en:{},"zh-Hans":{Action:"操作",Apps:"应用程序","Back to list":"返回列表","Background colour":"背景色",Black:"黑",Cancel:"取消",City:"城市",Components:"组件","Configuration file":"配置文件",Confirm:"确定",Continue:"继续","Country/Region":"国家/地区",Copy:"复制",Edit:"编辑","Foreground colour":"前景色","Go back":"返回",Language:"语言/Language",Justification:"理由",Name:"名称",Next:"下一步",Open:"打开",Palette:"调色板","Please select...":"请选择...",Previous:"上一步","Rail Map Generator":"铁路线路图生成器","Rail Map Painter":"地铁线路图绘制器","Rail Map Toolkit":"线路图工具包",Remove:"删除",Reset:"重置","RMG Templates":"RMG 模板","RMP Gallery":"RMP 画廊","RMP Designer":"RMP 设计师","Seed Project":"种子项目",Settings:"设置",Submit:"提交",Translate:"翻译",Upload:"上传",White:"白"},"zh-Hant":{Action:"動作",Apps:"應用程式","Back to list":"返回列表","Background colour":"背景色",Black:"黑",Cancel:"取消",City:"城市",Components:"元件","Configuration file":"設定檔",Confirm:"確定",Continue:"繼續",Copy:"複製","Country/Region":"國家/地區",Edit:"編輯","Foreground colour":"前景色","Go back":"返回",Language:"語言/Language",Justification:"理由",Name:"名稱",Next:"下一步",Open:"開啟",Palette:"調色盤","Please select...":"請選擇...",Previous:"上一步","Rail Map Generator":"鐵路路綫圖產生器","Rail Map Painter":"地鐵路綫圖繪製器","Rail Map Toolkit":"路綫圖工具組",Remove:"移除",Reset:"重設","RMG Templates":"RMG 範本","RMP Gallery":"RMP 畫廊","RMP Designer":"RMP 設計師","Seed Project":"種子項目",Settings:"設定",Submit:"提交",Translate:"翻譯",Upload:"上載",White:"白"},ja:{Language:"言語/Language",Palette:"調色板","Rail Map Generator":"鉄道路線図ジェネレータ","Rail Map Painter":"鉄道路線図画家","Rail Map Toolkit":"路線図ツールキット",Remove:"削除","RMG Templates":"RMG テンプレート","RMP Gallery":"RMP 画廊","RMP Designer":"RMP 図案家"},ko:{Action:"조작",Apps:"앱","Back to list":"다시 목록으로","Background colour":"배경색",Black:"블랙",Cancel:"취소",City:"도시",Components:"요소","Configuration file":"환경 설정 파일",Confirm:"확인",Copy:"복사","Country/Region":"국가/지역",Edit:"편집","Foreground colour":"전경색","Go back":"되돌아가",Language:"언어/Language",Justification:"이유",Name:"명칭",Next:"다음",Open:"열기",Palette:"팔레트","Please select...":"선택해주세요",Previous:"나아가","Rail Map Generator":"철도 노선도 생성기","Rail Map Painter":"지하철 노선도 그리기","Rail Map Toolkit":"노선도 툴킷",Remove:"삭제",Reset:"리셋","RMG Templates":"RMG 템플릿","RMP Gallery":"RMP 갤러리","RMP Designer":"RMP 디자이너","Seed Project":"종자 프로젝트",Settings:"설치",Submit:"제출",Translate:"번역",Upload:"업로드",White:"화이트"}};const Lc={color:"Color",warning:"Warning",cancel:"Cancel",apply:"Apply",remove:"Remove",close:"Close",noShowAgain:"Don't show me again",rmtPromotion:"The all-in-one toolkit you definitely do not want to miss!",panel:{tools:{showLess:"Show less",section:{lineDrawing:"Line drawing",stations:"Stations",miscellaneousNodes:"Miscellaneous nodes"},select:"Select",learnHowToAdd:{station:"Learn how to add your stations!","misc-node":"Learn how to add your nodes!",line:"Learn how to add your line styles!"}},details:{header:"Details",info:{title:"Basic information",id:"ID",zIndex:"Depth",stationType:"Station Type",linePathType:"Line Path Type",lineStyleType:"Line Style Type",type:"Type",parallel:"Parallel line",parallelIndex:"Parallel index"},multipleSelection:{title:"Multiple Selection",change:"Change selected attributes",selected:"Selected Objects:",show:"Show",station:"Stations",miscNode:"MiscNodes",edge:"Lines"},changeStationTypeContent:"Changing station's type will remove all attributes from the station except its names.",changeLineTypeContent:"Changing line's type will remove all attributes from the line.",changeType:"Change Type",nodePosition:{title:"Node Position",pos:{x:"Coordinate X",y:"Coordinate Y"}},lineExtremities:{title:"Line Extremities",source:"Source",target:"Target",sourceName:"Source Name",targetName:"Target Name"},specificAttrsTitle:"Specific Attributes",unknown:{error:"Oops :( We can't recognize this {{category}}. Maybe it is created in a newer version.",node:"node",linePath:"line path",lineStyle:"line style"},nodes:{common:{nameZh:"Line name in Chinese",nameEn:"Line name in English",nameJa:"Line name in Japanese",num:"Line number"},virtual:{displayName:"Virtual node"},shmetroNumLineBadge:{displayName:"Shanghai Metro num line badge"},shmetroTextLineBadge:{displayName:"Shanghai Metro text line badge"},gzmtrLineBadge:{displayName:"Guangzhou Metro line badge",tram:"Tram",span:"Row-spanning digits"},bjsubwayNumLineBadge:{displayName:"Beijing Subway num line badge"},bjsubwayTextLineBadge:{displayName:"Beijing Subway text line badge"},berlinSBahnLineBadge:{displayName:"Berlin S Bahn line badge"},berlinUBahnLineBadge:{displayName:"Berlin U Bahn line badge"},suzhouRTNumLineBadge:{displayName:"Suzhou Rail Transit num line badge",branch:"Is branch line"},chongqingRTNumLineBadge:{displayName:"Chongqing Rail Transit num line badge"},chongqingRTTextLineBadge:{displayName:"Chongqing Rail Transit text line badge"},shenzhenMetroNumLineBadge:{displayName:"Shenzhen Metro num line badge",branch:"Is branch line"},mrtDestinationNumbers:{displayName:"Singapore MRT destination numbers"},mrtLineBadge:{displayName:"Singapore MRT line badge",isTram:"Is LRT line badge"},jrEastLineBadge:{displayName:"JR East line badge",crosshatchPatternFill:"Fill with crosshatch pattern"},qingdaoMetroNumLineBadge:{displayName:"Qingdao Metro Num line badge",numEn:"Line number in English",showText:"Show text"},guangdongIntercityRailwayLineBadge:{displayName:"Guangdong Intercity Railway line badge"},master:{displayName:"Master node",type:"Master node type",undefined:"Undefined"},facilities:{displayName:"Facilities",type:"Type"},text:{displayName:"Arbitrary text",content:"Content",fontSize:"Font size",lineHeight:"Line height",textAnchor:"Text anchor",start:"Start",middle:"Middle",end:"End",auto:"Auto",hanging:"Hanging",dominantBaseline:"Dominant baseline",language:"Font family in which language",zh:"Chinese",en:"English",mtr__zh:"Hongkong MTR Chinese",mtr__en:"Hongkong MTR English",berlin:"Berlin S/U Bahn",mrt:"Singapore MRT",jreast_ja:"JR East Japanese",jreast_en:"JR East English",rotate:"Rotation",italic:"Italic",bold:"Bold"}},stations:{common:{nameZh:"Names in Chinese",nameEn:"Names in English",nameJa:"Names in Japanese",nameOffsetX:"Names offset X",nameOffsetY:"Names offset Y",rotate:"Icon rotation",lineCode:"Line code",stationCode:"Station code",left:"Left",middle:"Middle",right:"Right",top:"Top",bottom:"Bottom"},interchange:{title:"Interchanges",within:"Within-station interchange",outStation:"Out-of-station interchange",outSystem:"Out-of-system interchange",addGroup:"Add interchange group",noInterchanges:"No interchanges",nameZh:"Chinese name",nameEn:"English name",add:"Add interchange",copy:"Copy interchange",remove:"Remove interchange"},shmetroBasic:{displayName:"Shanghai Metro basic station"},shmetroBasic2020:{displayName:"Shanghai Metro basic station (2020)"},shmetroInt:{displayName:"Shanghai Metro interchange station",height:"Icon height",width:"Icon width"},shmetroOsysi:{displayName:"Shanghai Metro out-of-system interchange station"},shanghaiSuburbanRailway:{displayName:"Shanghai Suburban Railway station"},gzmtrBasic:{displayName:"Guangzhou Metro basic station",open:"Is opened",secondaryNameZh:"Secondary name in Chinese",secondaryNameEn:"Secondary name in English",tram:"Tram"},gzmtrInt:{displayName:"Guangzhou Metro interchange station",open:"Is opened",secondaryNameZh:"Secondary name in Chinese",secondaryNameEn:"Secondary name in English",foshan:"Foshan"},gzmtrInt2024:{displayName:"Guangzhou Metro interchange station (2024)",anchorAt:"Anchor at",anchorAtNone:"Center",preferVertical:"Vertical layout (2 interchanges only)"},bjsubwayBasic:{displayName:"Beijing Subway basic station",open:"Is opened"},bjsubwayInt:{displayName:"Beijing Subway interchange station",outOfStation:"Out of station interchange"},mtr:{displayName:"Hongkong MTR station",rotate:"Icon rotation"},suzhouRTBasic:{displayName:"Suzhou Rail Transit basic station",textVertical:"Vertical names"},suzhouRTInt:{displayName:"Suzhou Rail Transit interchange station"},kunmingRTBasic:{displayName:"Kunming Rail Transit basic station"},kunmingRTInt:{displayName:"Kunming Rail Transit interchange station"},MRTBasic:{displayName:"Singapore MRT basic station",isTram:"Is LRT station"},MRTInt:{displayName:"Singapore MRT interchange station"},jrEastBasic:{displayName:"JR East basic station",nameOffset:"Names offset",textOneLine:"Names in one line",textVertical:"Vertical names",important:"Important station",lines:"Interchange lines offset"},jrEastImportant:{displayName:"JR East important station",textVertical:"Vertical names",mostImportant:"Most important station",minLength:"Minimal length of the station"},foshanMetroBasic:{displayName:"Foshan Metro basic station",open:"Is opened",secondaryNameZh:"Secondary name in Chinese",secondaryNameEn:"Secondary name in English",tram:"Tram"},qingdaoMetro:{displayName:"Qingdao Metro station",isInt:"Is interchange station"},tokyoMetroBasic:{displayName:"Tokyo Metro basic station",nameOffset:"Names offset",textVertical:"Vertical names",lineCode:"Line code",stationCode:"Station code"},tokyoMetroInt:{displayName:"Tokyo Metro interchange station",mereOffset:{displayName:"Names mere offset",none:"None",left1:"Left (less)",left2:"Left (more)",right1:"Right (less)",right2:"Right (more)",up:"Up",down:"Down"},importance:{displayName:"Station importance",default:"Default",middle:"Middle",high:"High"},align:{displayName:"Icon align",horizontal:"Horizontal",vertical:"Vertical"}},londonTubeCommon:{stepFreeAccess:"Step free access",stepFreeAccessNone:"None",stepFreeAccessTrain:"From street to train",stepFreeAccessPlatform:"From street to platform"},londonTubeBasic:{displayName:"London Tube basic station",terminal:"Terminal station",shareTracks:"Track shares",shareTracksIndex:"Index of the track shares"},londonTubeInt:{displayName:"London Tube interchange station"},guangdongIntercityRailway:{displayName:"Guangdong Intercity Railway station"}},lines:{reconcileId:"Reconcile ID",common:{offsetFrom:"Offset From",offsetTo:"Offset To",startFrom:"Start From",from:"From",to:"To",roundCornerFactor:"Round Corner Factor",parallelDisabled:"Some attributes are disabled as this line is parallel.",changeInBaseLine:"Change them in the base line:"},simple:{displayName:"Simple path",offset:"Offset"},diagonal:{displayName:"135° diagonal path"},perpendicular:{displayName:"90° perpendicular path"},rotatePerpendicular:{displayName:"90° rotate perpendicular path"},singleColor:{displayName:"Single color style"},shmetroVirtualInt:{displayName:"Shanghai Metro out-of-station interchange style"},shanghaiSuburbanRailway:{displayName:"Shanghai Suburban Railway style",isEnd:"Is the ending line"},gzmtrVirtualInt:{displayName:"Guangzhou Metro out-of-station interchange style"},chinaRailway:{displayName:"China Railway style"},bjsubwaySingleColor:{displayName:"Beijing Subway single color style"},bjsubwayTram:{displayName:"Beijing Subway tram style"},bjsubwayDotted:{displayName:"Beijing Subway dotted style"},dualColor:{displayName:"Dual color style",swap:"Swap color",colorA:"Color A",colorB:"Color B"},river:{displayName:"River style",width:"Width"},mtrRaceDays:{displayName:"Hongkong MTR race days style"},mtrLightRail:{displayName:"Hongkong MTR light rail style"},mtrUnpaidArea:{displayName:"Hongkong MTR unpaid area style"},mtrPaidArea:{displayName:"Hongkong MTR paid area style"},mrtUnderConstruction:{displayName:"Singapore MRT under construction style"},mrtSentosaExpress:{displayName:"Singapore MRT Sentosa Express style"},jrEastSingleColor:{displayName:"JR East single color style"},jrEastSingleColorPattern:{displayName:"JR East single color filled with crosshatch pattern style"},lrtSingleColor:{displayName:"Singapore LRT single color style"},londonTubeInternalInt:{displayName:"London Tube internal interchange style"},londonTube10MinWalk:{displayName:"London Tube under a 10 minute walk interchange style"},londonTubeTerminal:{displayName:"London Tube terminal style"},guangdongIntercityRailway:{displayName:"Guangdong Intercity Railway style"}},edge:{},footer:{duplicate:"Duplicate",copy:"Copy",remove:"Remove"}}},header:{popoverHeader:"You're on <1>{{environment}} environment!",popoverBody:"We are currently testing the latest RMP. If you have any suggestions, feel free to raise at https://github.com/railmapgen/rmp/issues",search:"Search stations",open:{new:"New project",config:"Import project",projectRMG:"Import from RMG project",invalidType:"Invalid file type! Only file in JSON format is accepted.",unknownError:"Unknown error occurred while parsing the uploaded file! Please try again.",gallery:"Import from Gallery",tutorial:"Start tutorial",importFromRMPGallery:"Template {{id}} imported. Not satisfied with this change? Undo via Ctrl + Z or the undo button.",failToImportFromRMPGallery:"Fail to import {{id}} from the gallery. The file can not be found."},download:{config:"Export project",image:"Export image","2rmg":{title:"Export to RMG project",type:{line:"Line",loop:"Loop",branch:"Branch"},placeholder:{chinese:"Chinese name",english:"English name",lineCode:"Line code"},info1:"This function is designed to convert the RMP project into RMG projects.",info2:"The lines in the list following are the available lines for converting. You can enter the Chinese line name in the text box on the left, the English line name in the middle, the line code (for Guangzhou Metro style) on the right, and then click the download button on the right to save your RMG projects.",noline:"No available lines found.",download:"Download",downloadInfo:"Please select one of the following stations as the starting station and click it to download."},format:"Format",png:"PNG",svg:"SVG",svgVersion:"Version","svg1.1":"1.1 (Compatible with Adobe Illustrator)",svg2:"2 (Compatible with modern browsers)",transparent:"Transparency",scale:"Scale",disabledScaleOptions:"Some scale options are disabled due to your browser's canvas limitation.",disabledScaleOptionsWorkarounds:"Possible workarounds include generating the image from svg using this cli tool: ",imageTooBig:"The image is too big for your browser to generate!",useSystemFonts:"Use system fonts instead of fonts previewed in the canvas",shareInfo1:"I will attach ",shareInfo2:" and its link when I share this image.",termsAndConditions:"Terms and Conditions",termsAndConditionsInfo:"I agree to ",period:".",confirm:"Download"},donation:{title:"Donation",openCollective:"Open Collective",viaUSD:"Donate in USD via Paypal or Visa card.",afdian:"爱发电",viaCNY:"Donate in CNY via Alipay or Wechat Pay."},settings:{title:"Settings",pro:"This is a PRO feature and an account with a subscription is required.",proWithTrial:"This is a PRO feature with a limited free trial available.",proLimitExceed:{master:"Master nodes exceed the free tier.",parallel:"Parallel lines exceed the free tier.",solution:"Remove them to dismiss this warning, or subscribe to unlock more!"},subscription:{title:"Subscription Status","logged-out":"You are currently logged out.",free:"Logged In! Subscribe to unlock more features!",subscriber:"Thanks for your subscription! Enjoy all features!",expired:"Login status expired. Please log out and log in again."},preference:{title:"Preference",keepLastPath:"Keep drawing lines until clicking on the background in the next move",autoParallel:"Automatically set new lines to be parallel to existing lines"},shortcuts:{title:"Shortcuts",keys:"Keys",description:"Description",f:"Use the last tool.",s:"Select.",arrows:"Move the canvas a little bit.",ijkl:"Move the selected station(s) a little bit.",shift:"Multiple selection.",alt:"Precise movement.",delete:"Delete the selected station(s).",cut:"Cut.",copy:"Copy.",paste:"Paste.",undo:"Undo.",redo:"Redo."},procedures:{title:"Procedures",translate:{title:"Translate nodes' coordinates",content:"Add the following offset to all nodes' x and y:",x:"X axis",y:"Y axis"},scale:{title:"Scale nodes' coordinates",content:"Multiply the following value to all nodes' x and y:",factor:"Scale factor"},changeType:{title:"Change all objects' attributes",any:"Any"},changeZIndex:"Change depth in batch",changeStationType:{title:"Change stations type in batch",changeFrom:"Change all stations from this type:",changeTo:"To this type:",info:"Changing stations' type will remove all specific attributes from stations except their position and names. SAVE BEFORE CHANGE!"},changeLineStyleType:{title:"Change lines style in batch",changeFrom:"Change all lines from this style:",changeTo:"To this style:",info:"Changing lines' style will remove all specific attributes from lines except their connections. SAVE BEFORE CHANGE!"},changeLinePathType:{title:"Change lines path in batch",changeFrom:"Change all lines from this path:",changeTo:"To this path:"},changeColor:{title:"Change color in batch",changeFrom:"Change all objects from this color:",changeTo:"To this color:",any:"From any color"},removeLines:{title:"Remove lines with single color",content:"Remove lines that have this color: "},updateColor:{title:"Update color",content:"Update all colors with their latest value.",success:"Successfully update all colors.",error:"Error in updating all colors: {{e}}."},unlockSimplePath:{title:"Unlock simple path",content1:"The Rail Map Painter application endeavors to offer an interactive platform conducive to the creation of rail maps while adhering to established conventions. Among these conventions, one particularly renowned style finds its origins in the innovative work of Harry Beck. His pioneering contribution, officially endorsed in the year 1932, garnered instantaneous acclaim from the general populace. Presently, it stands as an exemplar of paramount significance within the realm of information design. This paradigmatic approach has found widespread implementation in transit cartography on a global scale, albeit with varying degrees of success.",content2:"The application inherently conceals the option to utilize a simple path, as its deployment has the potential to contravene established conventions. This particular feature remains discreetly tucked away by default. Additionally, submissions to the Rail Map Painter Gallery are subject to stringent scrutiny, with a categorical rejection of compositions that employ the simple path with a single color style approach.",content3:"Still, we reserve the opportunity to unlock this option and use the simple path when you subscribe. It should be noted that even after acquisition, the use of simple path is limited to single color.",check:"Unlock",unlocked:"Already Unlocked"},masterManager:{title:"Manage all master nodes",id:"Id",label:"Label",type:"Type",types:{MiscNode:"MiscNode",Station:"Station"},importTitle:"Upload master parameter",importFrom:"Use imported styles",importOther:"Import new style",importParam:"Paste configuration"}},telemetry:{title:"Telemetry",info:"To help improve Rail Map Painter and keep contributors motivated to enhance the project, anonymous usage data is collected through Google Analytics. This data is used solely for enhancing the user experience and optimizing the tool's functionality and is never shared with third parties.",essential:"Basic",essentialTooltip:"Change this global setting in Rail Map Toolkit",essentialInfo:"Rail Map Painter collects essential usage data that helps us understand how and when users interact with the tool. Rest assured, no personally identifiable information or data from your projects is ever collected.",essentialLink:"Click this link to see detailed fields that Google Analytics may collect.",additional:"Additional",additionalInfo:"Rail Map Painter also gathers data on interactions, such as project creation or station addition, when you input. These additional data is also anonymous and are only used for statistical analysis to help us make the tool better."}},about:{title:"About",rmp:"Rail Map Painter",railmapgen:"A Rail Map Toolkit project",desc:"Design your own rail map by freely dragging stations from different cities and connecting them with 90 or 135-degree rounded corners lines!",content1:"In memory of all the freedom and equality we once had.",content2:"06/01/2022 in Shanghai",contributors:"Contributors",coreContributors:"Core Contributors",styleContributors:"Style Contributors",langonginc:"Live a life you will remember.","203IhzElttil":"Special thanks for his diligent work in ensuring that the stations of Shanghai Metro match the original design.",Swiftiecott:"Special thanks for his diligent work in ensuring that the stations of Beijing Subway match the original design.",Minwtraft:"Special thanks for his diligent work in ensuring that the stations of Guangzhou Metro match the original design.",contactUs:"Contact Us",github:"Project repository",githubContent:"Face any problems? Search or raise an issue here!",slack:"Slack group",slackContent:"Chat in these Slack channels!"}}},Ac={colorA:"Color A",colorB:"Color B",color:"カラー",warning:"警告",cancel:"キャンセル",apply:"適用",remove:"削除",close:"閉じる",noShowAgain:"次回表示しない",rmtPromotion:"絶対に見逃せないオールインワンツールキット!",panel:{tools:{showLess:"表示を減らす",section:{lineDrawing:"路線描画",stations:"駅",miscellaneousNodes:"その他の節点"},select:"選択する",learnHowToAdd:{station:"駅を追加する方法を学ぶ!","misc-node":"節点を追加する方法を学ぶ!",line:"路線風格を追加する方法を学ぶ!"}},details:{header:"詳細",info:{title:"基本情報",id:"ID",zIndex:"深度",stationType:"駅の種類",linePathType:"路線経路の種類",lineStyleType:"路線風格の種類",type:"種類",parallel:"平行路線",parallelIndex:"平行路線索引"},multipleSelection:{title:"複数選択",change:"選択した属性を変更する",selected:"選択されたオブジェクト:",show:"見せる",station:"駅",miscNode:"その他のノード",edge:"ライン"},changeStationTypeContent:"駅の種類を変更すると、駅の名前以外のすべての属性が削除されます。",changeLineTypeContent:"路線の種類を変更すると、すべての属性が削除されます。",changeType:"種類を変更",nodePosition:{title:"節点の位置",pos:{x:"X座標",y:"Y座標"}},lineExtremities:{title:"路線の端点",source:"出発点",target:"到着点",sourceName:"出発点名",targetName:"到着点名"},specificAttrsTitle:"特定の属性",unknown:{error:"おっと :( これは{{category}}を認識できません。おそらくそれは新しいバージョンで作成されました。",node:"節点",linePath:"路線経路",lineStyle:"路線風格"},nodes:{common:{nameZh:"中国語の路線名",nameEn:"英語の路線名",nameJa:"日本語の路線名",num:"路線番号"},virtual:{displayName:"仮想節点"},shmetroNumLineBadge:{displayName:"上海地下鉄路線番号徽章"},shmetroTextLineBadge:{displayName:"上海地下鉄テキスト路線徽章"},gzmtrLineBadge:{displayName:"広州地下鉄路線徽章",tram:"路面電車",span:"行にまたがる数字"},bjsubwayNumLineBadge:{displayName:"北京地下鉄路線番号徽章"},bjsubwayTextLineBadge:{displayName:"北京地下鉄テキスト路線徽章"},berlinSBahnLineBadge:{displayName:"ベルリンSバーン番号徽章"},berlinUBahnLineBadge:{displayName:"ベルリン地下鉄番号徽章"},suzhouRTNumLineBadge:{displayName:"蘇州軌道交通路線番号徽章",branch:"支線"},chongqingRTNumLineBadge:{displayName:"重慶鉄道交通路線番号徽章"},chongqingRTTextLineBadge:{displayName:"重慶鉄道交通テキスト路線徽章"},shenzhenMetroNumLineBadge:{displayName:"深セン地下鉄路線番号徽章",branch:"支線"},mrtDestinationNumbers:{displayName:"シンガポールMRTの目的地番号"},mrtLineBadge:{displayName:"シンガポールMRT路線バッジ",isTram:"LRT路線バッジです"},jrEastLineBadge:{displayName:"JR東日本路線番号徽章",crosshatchPatternFill:"網目模様で塗りつぶす"},qingdaoMetroNumLineBadge:{displayName:"青島地下鉄番号線徽章",numEn:"英語の行番号",showText:"テキストを表示"},guangdongIntercityRailwayLineBadge:{displayName:"広東省都市間鉄道線徽章"},master:{displayName:"大師節点",type:"大師節点種類",undefined:"未定義"},facilities:{displayName:"施設",type:"種類"},text:{displayName:"任意のテキスト",content:"コンテンツ",fontSize:"書体サイズ",lineHeight:"行の高さ",textAnchor:"テキストのアンカー",start:"開始",middle:"中央",end:"終了",auto:"自動",hanging:"吊り下げ",dominantBaseline:"ドミナントベースライン",language:"言語での書体ファミリー",zh:"中国語",en:"英語",mtr__zh:"香港MTR中国語",mtr__en:"香港MTR英語",berlin:"ベルリンS/Uバーン",mrt:"シンガポールMRT",jreast_ja:"JR東日本日本語",jreast_en:"JR東日本英語",rotate:"回転",italic:"イタリック体",bold:"太字"}},stations:{common:{nameZh:"中国語の駅名",nameEn:"英語の駅名",nameJa:"日本語の駅名",nameOffsetX:"駅名補正値X",nameOffsetY:"駅名補正値Y",rotate:"アイコンの回転",lineCode:"路線番号",stationCode:"駅番号",left:"左",middle:"中央",right:"右",top:"上",bottom:"下"},interchange:{title:"乗り換え",within:"駅構内の乗り換え",outStation:"駅外の乗り換え",outSystem:"系統外の乗り換え",addGroup:"乗り換えグループを追加",noInterchanges:"乗り換えなし",nameZh:"中国語の駅名",nameEn:"英語の駅名",add:"乗り換えを追加",copy:"乗り換えをコピー",remove:"乗り換えを削除"},shmetroBasic:{displayName:"上海地下鉄基本駅"},shmetroBasic2020:{displayName:"上海地下鉄基本駅(令和2年)"},shmetroInt:{displayName:"上海地下鉄乗り換え駅",height:"アイコンの高さ",width:"アイコンの幅"},shmetroOsysi:{displayName:"上海地下鉄の系統外乗り換え駅"},shanghaiSuburbanRailway:{displayName:"上海市営鉄道駅"},gzmtrBasic:{displayName:"広州地下鉄基本駅",open:"開業済み",secondaryNameZh:"中国語の補助駅名",secondaryNameEn:"英語の補助駅名",tram:"路面電車"},gzmtrInt:{displayName:"広州地下鉄乗り換え駅",open:"開業済み",secondaryNameZh:"中国語の補助駅名",secondaryNameEn:"英語の補助駅名",foshan:"仏山"},gzmtrInt2024:{displayName:"広州地下鉄乗り換え駅(令和6年)",anchorAt:"錨位置",anchorAtNone:"中心",preferVertical:"縦向き版面構成(乗り換え駅2つのみ)"},bjsubwayBasic:{displayName:"北京地下鉄基本駅",open:"開業済み"},bjsubwayInt:{displayName:"北京地下鉄乗り換え駅",outOfStation:"駅外の乗り換え"},mtr:{displayName:"香港MTR駅",rotate:"アイコンの回転"},suzhouRTBasic:{displayName:"蘇州軌道交通基本駅",textVertical:"垂直の名前"},suzhouRTInt:{displayName:"蘇州軌道交通乗り換え駅"},kunmingRTBasic:{displayName:"昆明軌道交通基本駅"},kunmingRTInt:{displayName:"昆明軌道交通乗り換え駅"},MRTBasic:{displayName:"シンガポールMRT基本駅",isTram:"LRTの駅です"},MRTInt:{displayName:"シンガポールMRT乗り換え駅"},jrEastBasic:{displayName:"JR東日本基本駅",nameOffset:"名前の補正値",textOneLine:"1行での名前",textVertical:"垂直の名前",important:"重要な駅",lines:"乗り換え線の補正値"},jrEastImportant:{displayName:"JR東日本重要駅",textVertical:"垂直の名前",mostImportant:"最も重要な駅",minLength:"駅の最小長"},foshanMetroBasic:{displayName:"仏山地鐵基本車站",open:"開業済み",secondaryNameZh:"中国語の補助駅名",secondaryNameEn:"英語の補助駅名",tram:"路面電車"},qingdaoMetro:{displayName:"地下鉄青島駅",isInt:"乗換駅です"},tokyoMetroBasic:{displayName:"東京メトロの基本駅",nameOffset:"駅名補正値",textVertical:"垂直の名前"},tokyoMetroInt:{displayName:"東京メトロ乗換駅",mereOffset:{displayName:"名前は単なるオフセットです",none:"なし",left1:"左(少ない)",left2:"左(さらに)",right1:"右(少ない)",right2:"右(さらに)",up:"上",down:"下"},importance:{displayName:"駅の重要性",default:"デフォルト",middle:"真ん中",high:"高い"},align:{displayName:"アイコンの整列",horizontal:"水平",vertical:"垂直"}},londonTubeCommon:{stepFreeAccess:"段差のないアクセス",stepFreeAccessNone:"なし",stepFreeAccessTrain:"駅から電車まで",stepFreeAccessPlatform:"駅からプラットフォームまで"},londonTubeBasic:{displayName:"ロンドン地下鉄基本駅",terminal:"終着駅",shareTracks:"線路共有",shareTracksIndex:"線路共有索引"},londonTubeInt:{displayName:"ロンドン地下鉄乗換駅"},guangdongIntercityRailway:{displayName:"広東省都市間鉄道駅"}},lines:{reconcileId:"調整ID",common:{offsetFrom:"補正値(From)",offsetTo:"補正値(To)",startFrom:"開始位置",roundCornerFactor:"角の丸め係数",from:"から",to:"まで",parallelDisabled:"この路線が平行であるため、一部の属性が無効になっています。",changeInBaseLine:"基準線で変更してください:"},simple:{displayName:"簡単な経路",offset:"補正値"},diagonal:{displayName:"135°対角経路"},perpendicular:{displayName:"90°垂直経路"},rotatePerpendicular:{displayName:"90°回転する垂直経路"},singleColor:{displayName:"単色風格"},shmetroVirtualInt:{displayName:"上海地下鉄駅外乗り換え風格"},shanghaiSuburbanRailway:{displayName:"上海市営鉄道風格",isEnd:"終了行"},gzmtrVirtualInt:{displayName:"広州地下鉄駅外乗り換え風格"},chinaRailway:{displayName:"中国鉄道風格"},bjsubwaySingleColor:{displayName:"北京地下鉄単色風格"},bjsubwayTram:{displayName:"北京地下鉄路面電車風格"},bjsubwayDotted:{displayName:"北京地下鉄の点線風格"},dualColor:{displayName:"2色風格",swap:"色を交換",colorA:"色A",colorB:"色B"},river:{displayName:"河川風格",width:"幅"},mtrRaceDays:{displayName:"香港MTRレース日風格"},mtrLightRail:{displayName:"香港MTR軽軌風格"},mtrUnpaidArea:{displayName:"香港MTR改札外乗り換え風格"},mtrPaidArea:{displayName:"香港MTR改札内乗り換え風格"},mrtUnderConstruction:{displayName:"シンガポール MRT 工事中風格"},mrtSentosaExpress:{displayName:"シンガポール MRT セントーサ・エクスプレス風格"},jrEastSingleColor:{displayName:"JR東日本単色風格"},jrEastSingleColorPattern:{displayName:"JR東日本単色網目模様風格"},lrtSingleColor:{displayName:"シンガポールLRT単色風格"},londonTubeInternalInt:{displayName:"ロンドン地下鉄内部乗換風格"},londonTube10MinWalk:{displayName:"ロンドン地下鉄10分以内の乗換風格"},londonTubeTerminal:{displayName:"ロンドン地下鉄終着風格"},guangdongIntercityRailway:{displayName:"広東省都市間鉄道風格"}},edges:{},footer:{duplicate:"重複",copy:"複製",remove:"削除"}}},header:{popoverHeader:"<1>{{environment}} 環境です!",popoverBody:"現在、最新のRMPをテストしています。ご意見がありましたら、https://github.com/railmapgen/rmp/issues で提案してください",search:"駅を探す",open:{new:"新しい作品",config:"作品をインポート",projectRMG:"RMG作品からインポート",invalidType:"無効なファイルタイプです!JSON形式のファイルのみが受け付けられます。",unknownError:"アップロードされたファイルの解析中に不明なエラーが発生しました。もう一度お試しください。",gallery:"ギャラリーからインポート",tutorial:"指導を開始する",importFromRMPGallery:"テンプレート{{id}}がインポートされました。この変更に満足していませんか?Ctrl + Zまたは元に戻すボタンで元に戻せます。",failToImportFromRMPGallery:"ギャラリーから{{id}}のインポートに失敗しました。ファイルが見つかりませんでした。"},download:{config:"作品をエクスポート",image:"画像をエクスポート","2rmg":{title:"RMG作品へエクスポート",type:{line:"直線",loop:"環状線",branch:"支線"},placeholder:{chinese:"中国語のライン名",english:"英語の路線名",lineCode:"路線番号"},info1:"この機能は、RMP作品をRMG作品に変換するために設計されています。",info2:"以下のリストの行は、変換用に利用できます。左側のテキストボックスに中国語の行名、中央に英語の行名、右側に(広州メトロ風格用の)行コードを入力し、ダウンロードボタンをクリックしてRMG作品を保存できます。",noline:"利用可能な回線が見つかりません。",download:"ダウンロード",downloadInfo:"出発駅を選択してクリックしてください。"},format:"フォーマット",png:"PNG",svg:"SVG",svgVersion:"版","svg1.1":"1.1(Adobe Illustratorと互換性あり)",svg2:"2(現代のブラウザと互換性あり)",transparent:"透明性",scale:"スケール",disabledScaleOptions:"ブラウザのキャンバス制限のため、一部のスケールオプションが無効になっています。",disabledScaleOptionsWorkarounds:"回避策として、このCLIツールを使用してSVGから画像を生成する方法が考えられます:",imageTooBig:"画像が大きすぎてブラウザで生成できません!",useSystemFonts:"キャンバスで内覧された書体の代わりに系統書体を使用する",shareInfo1:"この画像を共有する際に、添付ファイル ",shareInfo2:" とリンクを添付します。",termsAndConditions:"利用規約",termsAndConditionsInfo:"以下の利用規約に同意します:",period:"。",confirm:"ダウンロード"},donation:{title:"寄付",openCollective:"Open Collective",viaUSD:"PaypalまたはVisaカードを使用してドルで寄付する。",afdian:"爱发电",viaCNY:"AlipayまたはWechat Payを使用して人民元で寄付する。"},settings:{title:"設定",pro:"これはPRO機能であり、サブスクリプションが必要です。",proWithTrial:"これはPRO機能で、無料の限定トライアルが利用可能です。",proLimitExceed:{master:"大師節点が無料枠を超えています。",parallel:"平行路線が無料枠を超えています。",solution:"これらを削除して警告を解除するか、サブスクリプションに登録してさらに多くの機能を利用してください!"},subscription:{title:"サブスクリプションステータス","logged-out":"現在ログアウトしています。",free:"ログイン済み!さらに多くの機能をアンロックするにはサブスクリプションを登録してください!",subscriber:"サブスクリプションありがとうございます!すべての機能をお楽しみください!",expired:"ログインステータスの有効期限が切れました。ログアウトして再度ログインしてください。"},preference:{title:"設定",keepLastPath:"次の移動で背景をクリックするまで、線を描き続ける",autoParallel:"新しい路線を既存の路線と平行に自動的に設定"},shortcuts:{title:"ショートカット",keys:"キー",description:"説明",f:"最後のツールを使用する。",s:"選択する。",arrows:"キャンバスを少し移動します。",ijkl:"選択した駅を少し移動します。",shift:"複数選択。",alt:"正確な移動。",delete:"選択した駅を削除します。",cut:"切り取る。",copy:"複製する。",paste:"貼り付ける。",undo:"元に戻す。",redo:"やり直す。"},procedures:{title:"手順",translate:{title:"節点の座標を変換",content:"すべての節点のX座標とY座標に次の補正値を追加する:",x:"X軸",y:"Y軸"},scale:{title:"節点の座標をスケーリング",content:"すべての節点のX座標とY座標に次の値を乗算する:",factor:"スケールファクター"},changeType:{title:"すべてのオブジェクトの属性を変更する",any:"どれでも"},changeZIndex:"深度を変更する",changeStationType:{title:"一括で駅の種類を変更",changeFrom:"すべての駅をこの種類から変更する:",changeTo:"この種類に変更する:",info:"駅の種類を変更すると、位置と名前以外の特定の属性がすべて削除されます。変更する前に保存してください!"},changeLineStyleType:{title:"線の風格を一括で変更",changeFrom:"この風格からすべての行を変更します:",changeTo:"この風格に:",info:"線の風格を変更すると、接続を除くすべての特定の属性が線から削除されます。 変更する前に保存してください!"},changeLinePathType:{title:"行のパスを一括で変更する",changeFrom:"このパスのすべての行を変更します:",changeTo:"この道へ:"},changeColor:{title:"一括で色を変更する",changeFrom:"すべてのオブジェクトをこの色から変更します:",changeTo:"この色に:",any:"どの色からも"},removeLines:{title:"単一色の路線を削除",content:"この色を持つ路線を削除する:"},updateColor:{title:"色を更新する",content:"最新の値ですべての色を更新します。",success:"すべての色を正常に更新しました。",error:"すべての色を更新する際にエラーが発生しました: {{e}}。"},unlockSimplePath:{title:"簡単な経路の解除",content1:"「地下鉄路線図画家」は、既存の慣例に従いつつ、鉄道地図の作成を支援するインタラクティブなプラットフォームを提供することを目指しています。その中でも、特に有名な風格の1つは、ハリー・ベックの革新的な作品に由来しています。彼の先駆的な貢献は1932年に正式に認められ、一般大衆から即座に称賛されました。現在では、情報デザインの領域において極めて重要な存在となっています。この典型的なアプローチは、世界規模の公共交通カートグラフィに広く採用されていますが、成功度は異なります。",content2:"アプリケーション自体は、既存の慣例に反する可能性があるため、簡単な経路を利用するオプションをデフォルトで控えめに隠しています。また、「地下鉄路線図画家ギャラリー」への投稿は厳格な審査を受けることになり、簡単な経路を単一の色の風格で使用する作品は断固として拒否されます。",content3:"それでも、このオプションのロックを解除し、寄付時にイージーパスを使用する機会を予約します。 取得後も、単純なパスの使用はモノクロスタイルに限定されることに注意してください。",check:"簡単な経路を解除",unlocked:"既に解除されています"},masterManager:{title:"すべての大師節点を管理する",id:"ID",label:"標識",type:"種類",types:{MiscNode:"その他節点",Station:"駅"},importTitle:"大師引数をアップロード",importFrom:"インポートしたスタイルを使用",importOther:"新しいスタイルをインポート",importParam:"設定情報を貼り付け"}},telemetry:{title:"テレメトリー",info:"鉄道路線図画家を改善し、貢献者がプロジェクトを向上させる意欲を維持するため、Google Analytics を通じて匿名の使用データを収集しています。このデータはユーザー体験の向上とツールの最適化のためだけに使用され、第三者と共有されることはありません。",essential:"基本",essentialTooltip:"鉄道路線図ツールキットでこのグローバル設定を変更する",essentialInfo:"鉄道路線図画家は、ツールがどのように、またいつ使用されるかを理解するための基本的な使用データを収集します。ご安心ください。個人を特定できる情報やプロジェクトデータは一切収集されません。",essentialLink:"Google Analytics が収集する可能性のある詳細フィールドを表示するには、こちらのリンクをクリックしてください。",additional:"追加",additionalInfo:"鉄道路線図画家は、プロジェクトの作成や駅の追加など、入力時のインタラクションに関するデータも収集します。これらの追加データも匿名であり、ツールを改善するための統計分析にのみ使用されます。"}},about:{title:"について",rmp:"地下鉄路線図画家",railmapgen:"地下鉄路線図ツールキットのプロジェクト",desc:"異なる都市の駅を自由にドラッグして、90度または135度の角丸線で接続して独自の鉄道地図を設計しましょう!",content1:"かつて私たちが持っていた自由と平等のすべての記憶に捧げます。",content2:"2022年6月1日、上海",contributors:"貢献者",coreContributors:"主要な貢献者",styleContributors:"風格の貢献者","203IhzElttil":"上海地下鉄の駅がオリジナルの設計と一致するように、彼の勤勉な仕事に特別な感謝を述べます。",Swiftiecott:"北京地下鉄の駅がオリジナルの設計と一致するように、彼の勤勉な仕事に特別な感謝を述べます。",Minwtraft:"広州地下鉄の駅がオリジナルの設計と一致するように、彼の勤勉な仕事に特別な感謝を述べます。",contactUs:"お問い合わせ",github:"プロジェクトリポジトリ",githubContent:"問題が発生しましたか?こちらで検索したり、問題を報告したりしてください!",slack:"Slackグループ",slackContent:"Slackのチャンネルでチャットしましょう!"}}},Ec={color:"색깔",warning:"경고",cancel:"취소",apply:"사용",remove:"삭제",close:"다시",noShowAgain:"표시하지 않기",rmtPromotion:"놓치고 싶지 않은 올인원 툴킷! 닫기.",panel:{tools:{showLess:"적게 표시",section:{lineDrawing:"선 그리기",stations:"역",miscellaneousNodes:"기타 노드"},select:"선택하다",learnHowToAdd:{station:"역을 추가하는 방법 배우기!","misc-node":"노드를 추가하는 방법 배우기!",line:"라인 스타일을 추가하는 방법 배우기!"}},details:{header:"상세한 상황",info:{title:"기본정보",id:"고유 식별자",zIndex:"깊이",stationType:"역 유형",linePathType:"선분 경로 유형",lineStyleType:"선분 스타일 유형",type:"유형",parallel:"평행선",parallelIndex:"평행 인덱스"},multipleSelection:{title:"다중 선택",change:"선택한 속성 변경",selected:"선택한 개체:",show:"보여주다",station:"역",miscNode:"기타 노드",edge:"윤곽"},changeStationTypeContent:"역 유형을 변경하면 이름을 제외한 모든 독특한 속성이 제거됩니다.",changeLineTypeContent:"선분 유형을 변경하면 모든 독특한 속성이 제거됩니다.",changeType:"종류 변경",nodePosition:{title:"노드 위치",pos:{x:"가로 좌표",y:"세로 좌표"}},lineExtremities:{title:"선분 양단",source:"시작점",target:"종말점",sourceName:"시작점 명칭",targetName:"종말점 명칭"},specificAttrsTitle:"독특 속성",unknown:{error:"이런 :( 우리는 이 {{category}}를 인식할 수 없습니다. 아마도 더 최근 버전에서 생성되었을 것입니다.",node:"노드",lineType:"선분 경로",lineStyle:"선분 스타일"},nodes:{common:{nameZh:"한자 노선명칭",nameEn:"영문 노선명칭",nameJa:"일본 노선명칭",num:"노선 번호"},virtual:{displayName:"가상 노드"},shmetroNumLineBadge:{displayName:"상해 지하철 디지털 노선 표지"},shmetroTextLineBadge:{displayName:"상해 지하철 문자 노선 표지"},gzmtrLineBadge:{displayName:"광저우 지하철 노선 표지",tram:"시가 전차",span:"행 범위 숫자"},bjsubwayNumLineBadge:{displayName:"베이징 지하철 노선 배지"},bjsubwayTextLineBadge:{displayName:"베이징 지하철 텍스트 라인 배지"},berlinSBahnLineBadge:{displayName:"베를린 S반 노선 배지"},berlinUBahnLineBadge:{displayName:"베를린 U반 노선 배지"},suzhouRTNumLineBadge:{displayName:"수주 철도 번호 라인 배지",branch:"지선입니다"},chongqingRTNumLineBadge:{displayName:"충칭 철도 교통 디지털 노선 식별"},chongqingRTTextLineBadge:{displayName:"충칭 철도 교통 텍스트 라인 표시"},shenzhenMetroNumLineBadge:{displayName:"심천 지하철 번호 라인 배지",branch:"지선입니다"},mrtDestinationNumbers:{displayName:"싱가포르 MRT 목적지 번호"},mrtLineBadge:{displayName:"싱가포르 MRT 노선 배지",isTram:"LRT 노선 배지입니다"},jrEastLineBadge:{displayName:"JR 동일본 라인 배지",crosshatchPatternFill:"크로스해치 패턴으로 채우기"},qingdaoMetroNumLineBadge:{displayName:"칭다오 지하철 번호 라인 배지",numEn:"영어로 된 줄 번호",showText:"텍스트 표시"},guangdongIntercityRailwayLineBadge:{displayName:"광동 시외 철도 노선 표지판"},master:{displayName:"마스터 노드",type:"마스터 노드 유형",undefined:"정의되지 않음"},facilities:{displayName:"시설",type:"유형"},text:{displayName:"임의 글자",content:"내용",fontSize:"글자 대소",lineHeight:"행고도",textAnchor:"글자 앵커",start:"시작",middle:"가운데",end:"끝",auto:"자동",hanging:"매달리는",dominantBaseline:"현성 바셀린",language:"언어로 된 글꼴 종류",zh:"중국어",en:"영어",mtr__zh:"홍콩 MTR 중국어",mtr__en:"홍콩 MTR 영어",berlin:"베를린 S/U Bahn",mrt:"싱가포르 MRT",jreast_ja:"JR 동일본어",jreast_en:"JR 동일본 영어",rotate:"회전",italic:"이탤릭체",bold:"굵게"}},stations:{common:{nameZh:"한자 명칭",nameEn:"영문 명칭",nameJa:"일본 명칭",nameOffsetX:"명칭 가로 이동",nameOffsetY:"명칭 세로 이동",rotate:"역회전각도",lineCode:"노선 번호",stationCode:"역 번호",left:"왼쪽",middle:"가운데",right:"오른쪽",top:"위",bottom:"아래"},interchange:{title:"환승",within:"같은 역에서 환승한",outStation:"역을 나가 환승한",outSystem:"시스템외환승",addGroup:"환승 조합 추가",noInterchanges:"비환승역",nameZh:"한자 명칭",nameEn:"영문 명칭",add:"환승 추가",copy:"환승 복제",remove:"환승 삭제"},shmetroBasic:{displayName:"상해 지하철의 기본 역"},shmetroBasic2020:{displayName:"상해 지하철 기본 역(2020년)"},shmetroInt:{displayName:"상해 지하철 환승역",height:"역 높이",width:"역 폭"},shmetroOsysi:{displayName:"상하이 지하철 시스템 외환승 역"},shanghaiSuburbanRailway:{displayName:"상하이 기차역"},gzmtrBasic:{displayName:"광저우 지하철 기본역",open:"개통여부",secondaryNameZh:"한자 제2명칭",secondaryNameEn:"영문 제2명칭",tram:"시가 전차"},gzmtrInt:{displayName:"광저우 지하철 환승역",open:"개통여부",secondaryNameZh:"한자 제2명칭",secondaryNameEn:"영문 제2명칭",foshan:"포산"},gzmtrInt2024:{displayName:"광저우 지하철 환승역 (2024)",anchorAt:"앵커 위치",anchorAtNone:"중앙",preferVertical:"세로 레이아웃 (환승 2개만)"},bjsubwayBasic:{displayName:"베이징 지하철 기본역",open:"개통여부"},bjsubwayInt:{displayName:"베이징 지하철 환승역",outOfStation:"역을 나가 환승"},mtr:{displayName:"홍콩 MTR 역"},suzhouRTBasic:{displayName:"쑤저우 궤도교통 기본역",textVertical:"수직 이름"},suzhouRTInt:{displayName:"쑤저우 궤도교통 환승역"},kunmingRTBasic:{displayName:"쿤밍 궤도교통 기본역"},kunmingRTInt:{displayName:"쿤밍 궤도교통 환승역"},MRTBasic:{displayName:"싱가포르MRT기본역",isTram:"LRT역이에요"},MRTInt:{displayName:"싱가포르MRT환승역"},jrEastBasic:{displayName:"JR 동일본 기본 역",nameOffset:"이름 오프셋",textOneLine:"한 줄로 표시된 이름",textVertical:"수직 이름",important:"중요한 역",lines:"환승 노선 오프셋"},jrEastImportant:{displayName:"JR 동일본 중요 역",textVertical:"수직 이름",mostImportant:"가장 중요한 역",minLength:"스테이션의 최소 길이"},foshanMetroBasic:{displayName:"포산 지하철 기본역",open:"개통여부",secondaryNameZh:"한자 제2명칭",secondaryNameEn:"영문 제2명칭",tram:"시가 전차"},qingdaoMetro:{displayName:"칭다오 지하철역",isInt:"환승역인가"},tokyoMetroBasic:{displayName:"도쿄메트로 기본역",nameOffset:"이름 오프셋",textVertical:"업종명",lineCode:"라인 코드",stationCode:"역 코드"},tokyoMetroInt:{displayName:"도쿄메트로 환승역",mereOffset:{displayName:"단순한 오프셋 이름",none:"없음",left1:"왼쪽(적음)",left2:"왼쪽(더)",right1:"오른쪽(적음)",right2:"맞아요 (더)",up:"위로",down:"아래에"},importance:{displayName:"역 중요성",default:"기본",middle:"가운데",high:"높은"},align:{displayName:"아이콘 정렬",horizontal:"수평의",vertical:"수직의"}},londonTubeCommon:{stepFreeAccess:"단차 없는 접근",stepFreeAccessNone:"없음",stepFreeAccessTrain:"거리에서 열차까지",stepFreeAccessPlatform:"거리에서 플랫폼까지"},londonTubeBasic:{displayName:"런던 지하철 기본역",terminal:"종착역",shareTracks:"선로 공유",shareTracksIndex:"선로 공유 지수"},londonTubeInt:{displayName:"런던 지하철 환승역"},guangdongIntercityRailway:{displayName:"광둥 시외 기차역"}},lines:{reconcileId:"연결 선분 고유 식별자",common:{offsetFrom:"시작점 오프셋",offsetTo:"끝점 오프셋",startFrom:"여기서부터 시작",roundCornerFactor:"회전원각인자",from:"에서",to:"까지",parallelDisabled:"이 선이 평행하기 때문에 일부 속성이 비활성화되었습니다.",changeInBaseLine:"기본선에서 변경하십시오:"},simple:{displayName:"기본 선분",offset:"오프셋"},diagonal:{displayName:"135° 접힌 선분"},perpendicular:{displayName:"90° 수직 선분"},rotatePerpendicular:{displayName:"90° 수직 경로 회전"},singleColor:{displayName:"단색 스타일"},shmetroVirtualInt:{displayName:"상해 지하철 역 환승 모습"},shanghaiSuburbanRailway:{displayName:"상하이 도시철도 스타일",isEnd:"끝 범위"},gzmtrVirtualInt:{displayName:"광저우 지하철 역 환승 모습"},chinaRailway:{displayName:"중국 철도 모습"},bjsubwaySingleColor:{displayName:"베이징 지하철 단색 스타일"},bjsubwayTram:{displayName:"베이징 지하철 노면 전차 모습"},bjsubwayDotted:{displayName:"베이징 지하철 점선 스타일"},dualColor:{displayName:"이색 스타일",swap:"색을 바꾸기",colorA:"색깔 A",colorB:"색깔 B"},river:{displayName:"강 스타일",width:"폭"},mtrRaceDays:{displayName:"홍콩 MTR 경마일 스타일"},mtrLightRail:{displayName:"홍콩 MTR 경전철 스타일"},mtrUnpaidArea:{displayName:"홍콩 MTR 미결제 구역 스타일"},mtrPaidArea:{displayName:"홍콩 MTR 결제완료 구역 스타일"},mrtUnderConstruction:{displayName:"싱가포르 MRT 공사중 스타일"},mrtSentosaExpress:{displayName:"싱가포르 MRT 센토사 익스프레스 스타일"},jrEastSingleColor:{displayName:"JR 동일본 단색 스타일"},jrEastSingleColorPattern:{displayName:"JR 동일본 단색 크로스해치 패턴 스타일"},lrtSingleColor:{displayName:"싱가포르 LRT 단색 스타일"},londonTubeInternalInt:{displayName:"런던 지하철 내부 환승 스타일"},londonTube10MinWalk:{displayName:"런던 지하철 10분 이내 도보 환승 스타일"},londonTubeTerminal:{displayName:"런던 지하철 종착 스타일"},guangdongIntercityRailway:{displayName:"광동성 도시간 철도 스타일"}},edges:{},footer:{duplicate:"복사",copy:"복사",remove:"삭제"}}},header:{popoverHeader:"당신은 환경을<1>{{environment}}탐색하고 있습니다",popoverBody:"최신 RMP를 테스트하고 있습니다.제안 사항이 있으시면 언제든지 https://github.com/railmapgen/rmp/issues에 제출해 주십시오.",search:"방송국 검색",open:{new:"신 프로젝트",config:"프로젝트 가져오기",projectRMG:"RMG 프로젝트에서 가져오기",invalidType:"잘못된 파일 형식입니다! JSON 형식의 파일만 허용됩니다.",unknownError:"업로드된 파일의 파싱 중 알 수 없는 오류가 발생했습니다. 다시 시도해주세요.",gallery:"갤러리에서 가져오기",tutorial:"튜토리얼 시작",importFromRMPGallery:"템플릿 {{id}}가 가져 왔습니다. 이 변경 사항에 만족하지 않으십니까? Ctrl + Z 또는 실행 취소 버튼을 사용하여 실행 취소하세요.",failToImportFromRMPGallery:"갤러리에서 {{id}}를 가져올 수 없습니다. 파일을 찾을 수 없습니다."},download:{config:"프로젝트 내보내기",image:"사진 내보내기","2rmg":{title:"RMG 프로젝트로 내보내기",type:{line:"일직선",loop:"고리",branch:"지선"},placeholder:{chinese:"중국어 라인 이름",english:"영어 줄 이름",lineCode:"노선 번호"},info1:"이 기능은 RMP 프로젝트를 RMG 프로젝트로 변환하는 데 사용됩니다.",info2:"변환할 수 있는 사용 가능한 라인들은 다음과 같습니다. 왼쪽 텍스트 상자에 중국어 라인 이름을 입력하고, 가운데에 영어 라인 이름을 입력하며, 오른쪽에 (광저우 메트로 스타일용) 라인 코드를 입력한 다음, 오른쪽의 다운로드 버튼을 클릭하여 RMG 프로젝트를 저장할 수 있습니다.",noline:"사용 가능한 라인이 없습니다.",download:"다운로드",downloadInfo:"출발 역을 선택하고 클릭하십시오."},format:"파일 종류",png:"PNG 이미지",svg:"SVG 이미지",svgVersion:"버전","svg1.1":"1.1 (Adobe Illustrator 호환)",svg2:"2 (현대 브라우저 호환)",transparent:"투명 배경",scale:"확대/축소",disabledScaleOptions:"브라우저의 캔버스 제한으로 인해 일부 스케일 옵션이 비활성화되었습니다.",disabledScaleOptionsWorkarounds:"가능한 해결 방법으로는 이 CLI 도구를 사용하여 SVG에서 이미지를 생성하는 것이 있습니다:",imageTooBig:"이미지가 너무 크기 때문에 브라우저에서 생성할 수 없습니다!",useSystemFonts:"캔버스에서 미리보기된 글꼴 대신 시스템 글꼴 사용",shareInfo1:"이 사진을 공유할 때",shareInfo2:"링크를 첨부할 것입니다.",termsAndConditions:"약관 및 세칙",termsAndConditionsInfo:"동의",period:".",confirm:"다운로드"},donation:{title:"기부",openCollective:"Open Collective",viaUSD:"Paypal 또는 Visa 카드를 통해 달러로 기부하기.",afdian:"爱发电",viaCNY:"Alipay 또는 Wechat Pay를 통해 인민폐로 기부하기."},settings:{title:"설정",pro:"이것은 PRO 기능이며, 구독이 필요한 계정입니다.",proWithTrial:"이것은 PRO 기능이며, 제한된 무료 체험이 가능합니다.",proLimitExceed:{master:"마스터 노드가 무료 사용 한도를 초과했습니다.",parallel:"평행선이 무료 사용 한도를 초과했습니다.",solution:"경고를 해제하려면 이 항목들을 제거하거나 구독을 통해 더 많은 기능을 잠금 해제하세요!"},subscription:{title:"구독 상태","logged-out":"현재 로그아웃 상태입니다.",free:"로그인 완료! 더 많은 기능을 사용하려면 구독하세요!",subscriber:"구독해주셔서 감사합니다! 모든 기능을 즐기세요!",expired:"로그인 상태가 만료되었습니다. 다시 로그인 해주세요."},preference:{title:"선호",keepLastPath:"다음 이동에서 배경을 클릭할 때까지 계속 선을 그립니다",autoParallel:"새 선을 기존 선과 평행하게 자동으로 설정합니다"},shortcuts:{title:"바로 가기",keys:"키",description:"설명",f:"마지막 도구 사용.",s:"선택하다.",arrows:"캔버스를 약간 이동합니다.",ijkl:"선택한 역을 약간 이동합니다.",shift:"여러 항목 선택.",alt:"정밀한 이동.",delete:"선택한 역을 삭제합니다.",cut:"잘라내기.",copy:"복사하다.",paste:"붙여넣다.",undo:"취소하다.",redo:"다시 하다."},procedures:{title:"절차",translate:{title:"노드 좌표 변환",content:"모든 노드의 x 및 y에 다음 오프셋을 추가:",x:"X축",y:"Y축"},scale:{title:"스케일 노드의 좌표",content:"모든 노드의 x 및 y에 다음 값을 곱하:",factor:"스케일 팩터"},changeType:{title:"모든 객체의 속성 변경",any:"어느"},changeZIndex:"일괄적으로 깊이 변경",changeStationType:{title:"역의 종류를 대량으로 수정",changeFrom:"이 유형의 모든 역:",changeTo:"이 유형의 역으로 변환:",info:"역 유형을 변경하면 이름을 제외한 모든 고유한 속성이 제거됩니다.저장했다가 다시 실행!"},changeLineStyleType:{title:"일괄적으로 선 스타일 변경",changeFrom:"이 스타일의 모든 선을 변경하세요:",changeTo:"이 스타일에:",info:"선 스타일을 변경하면 연결을 제외한 선의 모든 특정 속성이 제거됩니다. 변경하기 전에 저장하세요!"},changeLinePathType:{title:"일괄적으로 라인 경로 변경",changeFrom:"이 경로의 모든 줄을 변경하세요:",changeTo:"이 길로:"},changeColor:{title:"일괄 색상 변경",changeFrom:"이 색상의 모든 개체를 변경합니다.:",changeTo:"이 색상에:",any:"모든 색상에서"},removeLines:{title:"단일 색상의 선 제거",content:"이 색상의 선을 제거하세요: "},updateColor:{title:"색상 업데이트",content:"최신 값으로 모든 색상을 업데이트합니다.",success:"모든 색상을 성공적으로 업데이트했습니다.",error:"모든 색상을 업데이트하는 동안 오류가 발생했습니다: {{e}}."},unlockSimplePath:{title:"간단 경로 잠금 해제",content1:"Rail Map Painter 애플리케이션은 확립된 관례를 준수하면서도 철도지도 작성을 위한 대화식 플랫폼을 제공하기 위해 노력합니다. 이러한 관례 중 하나는 특히 해리 벡의 혁신적인 작업에서 비롯되었습니다. 그의 개척적인 기여는 공식적으로 1932년에 인정받았으며 일반 대중으로부터 즉각적인 찬사를 받았습니다. 현재는 정보 디자인 분야에서 중요한 본보기로 자리 잡고 있습니다. 이 패러다임적인 접근 방식은 전 세계적인 규모의 교통 카토그래피에서 널리 구현되었으나 성공의 정도는 다양합니다.",content2:"이 애플리케이션은 기존 관례에 위배될 가능성이 있기 때문에 간단한 경로를 활용하는 옵션을 기본 설정으로 가려놓았습니다. 또한 Rail Map Painter 갤러리에 제출되는 작품은 엄격한 심사를 받으며, 단일 색상 스타일로 간단한 경로를 사용하는 작품은 명확히 거부됩니다.",content3:"그래도 이 옵션을 잠금 해제하고 기부할 때 Easy Path를 사용할 수 있는 기회를 보유하고 있습니다. 획득 후에도 단순 경로의 사용은 단색 스타일로 제한된다는 점에 유의해야 합니다.",check:"간단한 경로 잠금 해제",unlocked:"이미 해제됨"},masterManager:{title:"모든 마스터 노드를 관리",id:"ID",label:"레이블",type:"유형",types:{MiscNode:"기타 노드",Station:"스테이션"},importTitle:"마스터 매개변수 업로드",importFrom:"가져온 스타일 사용",importOther:"새 스타일 가져오기",importParam:"구성 정보 붙여넣기"}},telemetry:{title:"원격 측정",info:"지하철 노선도 그리기를 개선하고 기여자가 프로젝트를 향상시키는 데 동기를 부여하기 위해 Google Analytics를 통해 익명의 사용 데이터를 수집합니다. 이 데이터는 사용자 경험을 향상하고 도구 기능을 최적화하는 데에만 사용되며, 제3자와 절대 공유되지 않습니다.",essential:"기본",essentialTooltip:"지하철 노선도 툴킷에서 이 전역 설정을 변경하세요",essentialInfo:"지하철 노선도 그리기는 도구를 언제, 어떻게 사용하는지 이해하기 위해 기본적인 사용 데이터를 수집합니다. 안심하세요. 개인 식별이 가능한 정보나 프로젝트 데이터는 절대 수집되지 않습니다.",essentialLink:"Google Analytics에서 수집할 수 있는 세부 필드를 보려면 이 링크를 클릭하세요.",additional:"추가",additionalInfo:"지하철 노선도 그리기는 프로젝트 생성이나 역 추가와 같은 입력 시의 상호작용 데이터도 수집합니다. 이러한 추가 데이터도 익명으로 처리되며, 도구를 개선하기 위한 통계 분석에만 사용됩니다."}},about:{title:"대함",rmp:"지하철 노선도 그리기",railmapgen:"철도 지도 툴킷 프로젝트 노선도 툴킷",desc:"다양한 도시의 역을 자유롭게 끌어서 90도 또는 135도의 둥근 모서리 선으로 연결함으로써 여러분만의 철도 지도를 디자인해요!",content1:"우리가 가졌던 자유와 평등을 기념한다.",content2:"2022년 6월 1일 상해",contributors:"기여자",coreContributors:"핵심 기여자",styleContributors:"스타일 기여자",langonginc:"기억에 남을 삶을 살아보세요.","203IhzElttil":"상하이 지하철의 역들이 원래 디자인과 일치하도록 확실한 작업을 해준 그에게 특별한 감사의 말씀을 전합니다.",Swiftiecott:"베이징 지하철의 역들이 원래 디자인과 일치하도록 확실한 작업을 해준 그에게 특별한 감사의 말씀을 전합니다.",Minwtraft:"광저우 지하철의 역들이 원래 디자인과 일치하도록 확실한 작업을 해준 그에게 특별한 감사의 말씀을 전합니다.",contactUs:"우리에게 연락하기",github:"프로젝트 저장소",githubContent:"무슨 문제라도 있나요? 여기서 문제를 검색하거나 제기하십시오!",slack:"슬랙 그룹",slackContent:"이 슬랙 채널에서 채팅해요!"}}},Mc={color:"颜色",warning:"警告",cancel:"取消",apply:"应用",remove:"移除",close:"关闭",noShowAgain:"不再显示",rmtPromotion:"您绝对不想错过的全能工具包!",panel:{tools:{showLess:"显示更少",section:{lineDrawing:"线段绘制",stations:"车站",miscellaneousNodes:"杂项节点"},select:"多选",learnHowToAdd:{station:"了解如何添加车站!","misc-node":"了解如何添加节点!",line:"了解如何添加线段样式!"}},details:{header:"详情",info:{title:"基本信息",id:"唯一识别符",zIndex:"深度",stationType:"车站类型",linePathType:"线段路径类型",lineStyleType:"线段样式类型",type:"类型",parallel:"平行线段",parallelIndex:"平行线段索引"},multipleSelection:{title:"多重选取",change:"修改选中对象的属性",selected:"选中的对象:",show:"显示",station:"车站",miscNode:"杂项节点",edge:"线段"},changeStationTypeContent:"修改车站类型会移除所有独特属性除了名称。",changeLineTypeContent:"修改线段类型会移除所有独特属性。",changeType:"更改类型",nodePosition:{title:"节点位置",pos:{x:"横坐标",y:"纵坐标"}},lineExtremities:{title:"线段两端",source:"起点",target:"终点",sourceName:"起点名称",targetName:"终点名称"},specificAttrsTitle:"独特属性",unknown:{error:"哎呀 :( 我们无法识别此{{category}}。也许它是在更新版本中创建的。",node:"节点",linePath:"线段路径",lineStyle:"线段样式"},nodes:{common:{nameZh:"中文线路名称",nameEn:"英文线路名称",nameJa:"日语线路名称",num:"线路号"},virtual:{displayName:"虚拟节点"},shmetroNumLineBadge:{displayName:"上海地铁数字线路标识"},shmetroTextLineBadge:{displayName:"上海地铁文字线路标识"},gzmtrLineBadge:{displayName:"广州地铁线路标识",tram:"有轨电车",span:"跨行显示数字"},bjsubwayNumLineBadge:{displayName:"北京地铁数字线路标识"},bjsubwayTextLineBadge:{displayName:"北京地铁文字线路标识"},berlinSBahnLineBadge:{displayName:"柏林城市快铁线路标识"},berlinUBahnLineBadge:{displayName:"柏林地铁线路标识"},suzhouRTNumLineBadge:{displayName:"苏州轨道交通数字线路标识",branch:"是否支线"},chongqingRTNumLineBadge:{displayName:"重庆轨道交通数字线路标识"},chongqingRTTextLineBadge:{displayName:"重庆轨道交通文字线路标识"},shenzhenMetroNumLineBadge:{displayName:"深圳地铁数字线路标识",branch:"是否为支线"},mrtDestinationNumbers:{displayName:"新加坡MRT终点数字"},mrtLineBadge:{displayName:"新加坡MRT线路标识",isTram:"是LRT线路标识"},jrEastLineBadge:{displayName:"JR东日本线路标识",crosshatchPatternFill:"用网状图案填充"},qingdaoMetroNumLineBadge:{displayName:"青岛地铁数字线路标识",numEn:"英文线路号",showText:"显示文字"},guangdongIntercityRailwayLineBadge:{displayName:"广东城际铁路线路标识"},master:{displayName:"大师节点",type:"大师节点类型",undefined:"未定义"},facilities:{displayName:"设施",type:"类型"},text:{displayName:"任意文字",content:"内容",fontSize:"文字大小",lineHeight:"行高度",textAnchor:"文字锚点",start:"开始",middle:"居中",end:"结束",auto:"自动",hanging:"悬挂",dominantBaseline:"显性基线",language:"哪个语言的字体系列",zh:"中文",en:"英文",mtr__zh:"港铁中文",mtr__en:"港铁英文",berlin:"柏林 S/U Bahn",mrt:"新加坡地铁",jreast_ja:"JR东日本日语",jreast_en:"JR东日本英语",rotate:"旋转",italic:"斜体",bold:"粗体"}},stations:{common:{nameZh:"中文名称",nameEn:"英文名称",nameJa:"日语名称",nameOffsetX:"名称横向偏移",nameOffsetY:"名称纵向偏移",rotate:"车站旋转角度",lineCode:"路线编号",stationCode:"车站编号",left:"左",middle:"中间",right:"右",top:"顶部",bottom:"底部"},interchange:{title:"换乘",within:"同站换乘",outStation:"出站换乘",outSystem:"系统外换乘",addGroup:"添加换乘组合",noInterchanges:"非换乘站",nameZh:"中文名称",nameEn:"英文名称",add:"添加换乘",copy:"复制换乘",remove:"删除换乘"},shmetroBasic:{displayName:"上海地铁基本车站"},shmetroBasic2020:{displayName:"上海地铁基本车站(2020)"},shmetroInt:{displayName:"上海地铁换乘车站",height:"车站高度",width:"车站宽度"},shmetroOsysi:{displayName:"上海地铁转乘车站"},shanghaiSuburbanRailway:{displayName:"上海市域铁路车站"},gzmtrBasic:{displayName:"广州地铁基本车站",open:"是否开通",secondaryNameZh:"中文第二名称",secondaryNameEn:"英文第二名称",tram:"有轨电车"},gzmtrInt:{displayName:"广州地铁换乘车站",open:"是否开通",secondaryNameZh:"中文第二名称",secondaryNameEn:"英文第二名称",foshan:"佛山"},gzmtrInt2024:{displayName:"广州地铁换乘站(2024)",anchorAt:"定位于",anchorAtNone:"中心",preferVertical:"垂直布局(仅限2个换乘)"},bjsubwayBasic:{displayName:"北京地铁基本车站",open:"是否开通"},bjsubwayInt:{displayName:"北京地铁换乘车站",outOfStation:"出站换乘"},mtr:{displayName:"香港MTR车站"},suzhouRTBasic:{displayName:"苏州轨道交通基本车站",textVertical:"垂直名称"},suzhouRTInt:{displayName:"苏州轨道交通换乘车站"},kunmingRTBasic:{displayName:"昆明轨道交通基本车站"},kunmingRTInt:{displayName:"昆明轨道交通换乘车站"},MRTBasic:{displayName:"新加坡MRT基本车站",isTram:"是LRT车站"},MRTInt:{displayName:"新加坡MRT换乘车站"},jrEastBasic:{displayName:"JR东日本基本车站",nameOffset:"名称偏移",textOneLine:"名称在一行中",textVertical:"垂直名称",important:"重要车站",lines:"换乘线偏移"},jrEastImportant:{displayName:"JR东日本重要车站",textVertical:"垂直名称",mostImportant:"最重要车站",minLength:"车站的最小长度"},foshanMetroBasic:{displayName:"佛山地铁基本车站",open:"是否开通",secondaryNameZh:"中文第二名称",secondaryNameEn:"英文第二名称",tram:"有轨电车"},qingdaoMetro:{displayName:"青岛地铁车站",isInt:"是换乘站"},tokyoMetroBasic:{displayName:"东京地铁基本车站",nameOffset:"名称偏移",textVertical:"垂直站名",lineCode:"线路编号",stationCode:"车站编号"},tokyoMetroInt:{displayName:"东京地铁换乘车站",mereOffset:{displayName:"名称微小偏移",none:"无",left1:"左 (较少)",left2:"左 (较大)",right1:"右 (较少)",right2:"右 (较大)",up:"上",down:"下"},importance:{displayName:"车站重要性",default:"默认",middle:"中",high:"高"},align:{displayName:"图标排列方向",horizontal:"横向",vertical:"纵向"}},londonTubeCommon:{stepFreeAccess:"无障碍通行",stepFreeAccessNone:"无",stepFreeAccessTrain:"从街道到列车",stepFreeAccessPlatform:"从街道到站台"},londonTubeBasic:{displayName:"伦敦地铁基本车站",terminal:"终点站",shareTracks:"轨道共享",shareTracksIndex:"轨道共享索引"},londonTubeInt:{displayName:"伦敦地铁换乘车站"},guangdongIntercityRailway:{displayName:"广东城际铁路车站"}},lines:{reconcileId:"合并线段唯一标识符",common:{offsetFrom:"起始点偏移",offsetTo:"结束点偏移",startFrom:"从这里开始",roundCornerFactor:"转折圆角因子",from:"从",to:"到",parallelDisabled:"由于此线段是平行的,因此某些属性已被禁用。",changeInBaseLine:"在基准线段中更改它们:"},simple:{displayName:"基本线段",offset:"偏移"},diagonal:{displayName:"135°折线线段"},perpendicular:{displayName:"90°垂直线段"},rotatePerpendicular:{displayName:"90°旋转垂直线段"},singleColor:{displayName:"纯色样式"},shmetroVirtualInt:{displayName:"上海地铁出站换乘样式"},shanghaiSuburbanRailway:{displayName:"上海市域铁路样式",isEnd:"结束区间"},gzmtrVirtualInt:{displayName:"广州地铁出站换乘样式"},chinaRailway:{displayName:"中国铁路样式"},bjsubwaySingleColor:{displayName:"北京地铁纯色样式"},bjsubwayTram:{displayName:"北京地铁有轨电车样式"},bjsubwayDotted:{displayName:"北京地铁虚线样式"},dualColor:{displayName:"双色样式",swap:"切换颜色",colorA:"颜色A",colorB:"颜色B"},river:{displayName:"河流样式",width:"宽度"},mtrRaceDays:{displayName:"香港MTR赛马日样式"},mtrLightRail:{displayName:"香港MTR轻铁样式"},mtrUnpaidArea:{displayName:"香港MTR未付费区域样式"},mtrPaidArea:{displayName:"香港MTR付费区域样式"},mrtUnderConstruction:{displayName:"新加坡MRT在建样式"},mrtSentosaExpress:{displayName:"新加坡MRT圣淘沙捷运样式"},jrEastSingleColor:{displayName:"JR东日本单色样式"},jrEastSingleColorPattern:{displayName:"JR东日本单色网状图案样式"},lrtSingleColor:{displayName:"新加坡LRT纯色样式"},londonTubeInternalInt:{displayName:"伦敦地铁内部换乘样式"},londonTube10MinWalk:{displayName:"伦敦地铁10分钟步行换乘样式"},londonTubeTerminal:{displayName:"伦敦地铁终点站样式"},guangdongIntercityRailway:{displayName:"广东城际铁路样式"}},edges:{},footer:{duplicate:"重复",copy:"复制",remove:"移除"}}},header:{popoverHeader:"你正在浏览<1>{{environment}}环境!",popoverBody:"我们正在测试最新的RMP。如果你有任何建议,欢迎在 https://github.com/railmapgen/rmp/issues 上提出。",search:"搜索车站",open:{new:"新项目",config:"导入项目",projectRMG:"从RMG项目中导入",invalidType:"无效的文件类型!仅接受JSON格式的文件。",unknownError:"解析上传文件时发生未知错误!请重试。",gallery:"从画廊中导入",tutorial:"开始教程",importFromRMPGallery:"模板 {{id}} 已导入。对此更改不满意?可通过 Ctrl + Z 或撤销按钮进行撤销。",failToImportFromRMPGallery:"无法从画廊导入{{id}},找不到文件。"},download:{config:"导出项目",image:"导出图片","2rmg":{title:"导出RMG项目",type:{line:"直线",loop:"环线",branch:"支线"},placeholder:{chinese:"中文线路名称",english:"英文线路名称",lineCode:"路线编号"},info1:"这个功能可将RMP项目导出为RMG项目。",info2:"下面的线路将可以被导出,你可以在左侧文本框中输入中文线路名称、在中间输入英文线路名称、右边输入线路编号(广州地铁样式专用),随后点击下载按钮即可导出RMG项目。",noline:"未找到可用线路。",download:"下载",downloadInfo:"请选择一个起始车站,并点击它。"},format:"文件种类",png:"PNG图像",svg:"SVG图像",svgVersion:"版本","svg1.1":"1.1(适用于Adobe Illustrator)",svg2:"2(适用于现代浏览器)",transparent:"透明背景",scale:"缩放",disabledScaleOptions:"由于浏览器的画布限制,部分缩放选项被禁用。",disabledScaleOptionsWorkarounds:"可能的解决方法包括使用此命令行工具从SVG生成图像:",imageTooBig:"图像太大,无法在您的浏览器中生成!",useSystemFonts:"使用系统字体而不是在画布上预览的字体",shareInfo1:"当我分享此图片时我会附上",shareInfo2:"和它的链接。",termsAndConditions:"条款及细则",termsAndConditionsInfo:"我同意",period:"。",confirm:"下载"},donation:{title:"捐赠",openCollective:"Open Collective",viaUSD:"通过Paypal或Visa卡以美元捐赠。",afdian:"爱发电",viaCNY:"通过支付宝或微信支付以人民币捐赠。"},settings:{title:"设置",pro:"这是一个专业功能,需要带有订阅的账户。",proWithTrial:"这是一个PRO功能,并提供有限的免费试用。",proLimitExceed:{master:"大师节点超出了免费额度。",parallel:"平行线段超出了免费额度。",solution:"移除它们以消除此警告,或订阅以解锁更多功能!"},subscription:{title:"订阅状态","logged-out":"您当前已登出。",free:"已登录!订阅以解锁更多功能!",subscriber:"感谢您的订阅!享受所有功能吧!",expired:"登录状态已过期。请登出后重新登录。"},preference:{title:"偏好",keepLastPath:"在下一次操作中持续画线段直到点击背景",autoParallel:"自动将新线段设置为与现有线段平行"},shortcuts:{title:"快捷键",keys:"键",description:"描述",f:"使用上一个工具。",s:"多选。",arrows:"稍微移动画布。",ijkl:"稍微移动所选站点。",shift:"多选。",alt:"精确移动。",delete:"删除所选站点。",cut:"剪切。",copy:"复制。",paste:"粘贴。",undo:"撤销。",redo:"重做。"},procedures:{title:"过程",translate:{title:"转化节点坐标",content:"将以下偏移加到所有节点的x和y上:",x:"横坐标",y:"纵坐标"},scale:{title:"缩放节点坐标",content:"将所有节点的x和y乘以以下值:",factor:"缩放因子"},changeType:{title:"修改所有对象的属性",any:"任意"},changeZIndex:"批量修改深度",changeStationType:{title:"批量修改车站种类",changeFrom:"将此类型的所有车站:",changeTo:"转换为这个类型的车站:",info:"修改车站类型会移除所有独特属性除了名称。保存再操作!"},changeLineStyleType:{title:"批量修改线段样式",changeFrom:"将此样式的所有线段:",changeTo:"转换为这个样式的线段:",info:"修改线段样式会移除所有独特属性除了连通性。保存再操作!"},changeLinePathType:{title:"批量修改线段类型",changeFrom:"将此类型的所有线段:",changeTo:"转换为这个类型的线段:"},changeColor:{title:"批量修改颜色",changeFrom:"将此颜色的所有对象:",changeTo:"转换为这个颜色:",any:"从任何颜色转换"},removeLines:{title:"移除所有纯色线段",content:"移除具有此颜色的所有线段: "},updateColor:{title:"更新颜色",content:"使用最新值更新所有颜色。",success:"成功更新所有颜色。",error:"更新所有颜色时出错:{{e}}。"},unlockSimplePath:{title:"解锁简单路径",content1:"地铁线路图绘制器应用致力于在遵循既定惯例的前提下,提供一个有利于创建地铁线路图的互动平台。在这些惯例中,一种特别著名的风格源自哈利·贝克的创新工作。他的开创性贡献于1932年得到官方认可,并在大众中迅速赢得了声誉。目前,它在信息设计领域具有重要的示范意义,在全球范围内的交通制图中得到了广泛的实施,尽管成功程度有所不同。",content2:"应用程序固有地隐藏了使用简单路径的选项,因为其部署有可能违反既定的惯例。默认情况下,此特定功能保持隐蔽。此外,提交到地铁线路图绘制器画廊的作品将经过严格的审查,坚决拒绝使用单色风格的简单路径的构图。",content3:"尽管如此,我们仍然保留了解锁此选项的机会,当您订阅后,方可使用简单路径。需要注意的是,即使获得后,简单路径的使用也仅限于单色风格。",check:"解锁简单路径",unlocked:"已解锁"},masterManager:{title:"管理全部大师节点",id:"唯一标识",label:"标签",type:"类型",types:{MiscNode:"杂项节点",Station:"车站"},importTitle:"上传大师节点参数",importFrom:"使用导入的样式",importOther:"导入新样式",importParam:"粘贴配置信息"}},telemetry:{title:"遥测",info:"为了帮助改进地铁线路图绘制器并激励贡献者提升项目,我们通过 Google Analytics 收集匿名使用数据。这些数据仅用于增强用户体验和优化工具功能,绝不会与第三方共享。",essential:"基础",essentialTooltip:"在地铁线路图工具包中更改此全局设置",essentialInfo:"地铁线路图绘制器收集一些基本使用数据,以帮助我们了解用户如何以及何时与工具交互。请放心,我们从不收集任何可识别个人身份的信息或您的项目数据。",essentialLink:"点击此链接查看 Google Analytics 可能收集的详细字段。",additional:"额外",additionalInfo:"地铁线路图绘制器还会收集有关交互的数据,例如项目创建或站点添加等操作。这些额外数据同样是匿名的,仅用于统计分析以帮助我们改进工具。"}},about:{title:"关于",rmp:"地铁线路图绘制器",railmapgen:"一个线路图工具包项目",desc:"通过自由拖动来自不同城市的车站并以 90 或 135 度圆角线段将它们连接起来,设计您自己的铁路地图!",content1:"谨以此纪念我们曾拥有的自由与平等。",content2:"06/01/2022于上海",contributors:"贡献者",coreContributors:"核心贡献者",styleContributors:"样式贡献者",langonginc:"活出值得铭记的人生。","203IhzElttil":"特别感谢他勤勉工作,确保上海地铁站与原始设计相符。",Swiftiecott:"特别感谢他勤勉工作,确保北京地铁站与原始设计相符。",Minwtraft:"特别感谢他勤勉工作,确保广州地铁站与原始设计相符。",contactUs:"联系我们",github:"项目仓库",githubContent:"遇到任何问题?在这里搜索或提出一个问题!",slack:"Slack群组",slackContent:"在这些Slack频道中讨论!"}}},Pc={color:"顏色",warning:"警告",cancel:"取消",apply:"應用",remove:"移除",close:"關閉",noShowAgain:"不要再顯示",rmtPromotion:"絕對不想錯過的多功能工具包!",panel:{tools:{showLess:"顯示更少",section:{lineDrawing:"線段繪製",stations:"車站",miscellaneousNodes:"雜項節點"},select:"多選",learnHowToAdd:{station:"了解如何添加車站!","misc-node":"了解如何添加節點!",line:"了解如何添加線條樣式!"}},details:{header:"詳情",info:{title:"基本信息",id:"唯一識別符",zIndex:"深度",stationType:"車站類型",linePathType:"線段路徑類型",lineStyleType:"線段樣式類型",type:"類型",parallel:"平行線段",parallelIndex:"平行線段索引"},multipleSelection:{title:"多重選取",change:"修改選取物件的屬性",selected:"選取的物件:",show:"顯示",station:"車站",miscNode:"雜項節點",edge:"線段"},changeStationTypeContent:"修改車站類型會移除所有獨特屬性除了名稱。",changeLineTypeContent:"修改線段類型會移除所有獨特屬性。",changeType:"更改類型",nodePosition:{title:"節點位置",pos:{x:"橫坐標",y:"縱坐標"}},lineExtremities:{title:"線段兩端",source:"起點",target:"終點",sourceName:"起點名稱",targetName:"終點名稱"},specificAttrsTitle:"獨特屬性",unknown:{error:"哎呀 :( 我們無法識別此{{category}}。也許它是在更新版本中創建的。",node:"節點",linePath:"線段路徑",lineStyle:"線段樣式"},nodes:{common:{nameZh:"中文線路名稱",nameEn:"英文線路名稱",nameJa:"日語線路名稱",num:"線路號"},virtual:{displayName:"虛擬節點"},shmetroNumLineBadge:{displayName:"上海地鐵數字線路標識"},shmetroTextLineBadge:{displayName:"上海地鐵文字線路標識"},gzmtrLineBadge:{displayName:"廣州地鐵線路標識",tram:"輕軌",span:"跨行顯示數字"},bjsubwayNumLineBadge:{displayName:"北京地鐵數字線路標識"},bjsubwayTextLineBadge:{displayName:"北京地鐵文字線路標識"},berlinSBahnLineBadge:{displayName:"柏林城市快鐵線路標識"},berlinUBahnLineBadge:{displayName:"柏林地鐵線路標識"},suzhouRTNumLineBadge:{displayName:"蘇州軌道交通數字線路標識",branch:"是否支線"},chongqingRTNumLineBadge:{displayName:"重慶軌道交通數字線路標識"},chongqingRTTextLineBadge:{displayName:"重慶軌道交通文字線路標識"},shenzhenMetroNumLineBadge:{displayName:"深圳地鐵數字線路標識",branch:"是否支線"},mrtDestinationNumbers:{displayName:"新加坡MRT終點數字"},mrtLineBadge:{displayName:"新加坡MRT線路標識",isTram:"是LRT線路標識"},jrEastLineBadge:{displayName:"JR東日本線路標識",crosshatchPatternFill:"用網狀圖案填充"},qingdaoMetroNumLineBadge:{displayName:"青島地鐵數位線路標識",numEn:"英文線路號",showText:"顯示文字"},guangdongIntercityRailwayLineBadge:{displayName:"廣東城際鐵路線標識"},master:{displayName:"大師節點",type:"大師節點類型",undefined:"未定義"},facilities:{displayName:"設施",type:"類型"},text:{displayName:"任意文字",content:"內容",fontSize:"文字大小",lineHeight:"行高度",textAnchor:"文字錨點",start:"開始",middle:"中間",end:"結束",auto:"自動",hanging:"懸吊",dominantBaseline:"顯性基線",language:"哪個語言的字體系列",zh:"中文",en:"英文",mtr__zh:"香港地鐵中文",mtr__en:"香港地鐵英文",berlin:"柏林 S/U 地鐵",mrt:"新加坡地鐵",jreast_ja:"JR 東日本日文",jreast_en:"JR 東日本英文",rotate:"旋轉",italic:"斜體",bold:"粗體"}},stations:{common:{nameZh:"中文名稱",nameEn:"英文名稱",nameJa:"日語名稱",nameOffsetX:"名稱橫向偏移",nameOffsetY:"名稱縱向偏移",rotate:"車站旋轉角度",lineCode:"路綫編碼",stationCode:"車站編碼",left:"左",middle:"中間",right:"右",top:"頂部",bottom:"底部"},interchange:{title:"換乘",within:"同站換乘",outStation:"出站換乘",outSystem:"系統外換乘",addGroup:"添加換乘組合",noInterchanges:"非換乘站",nameZh:"中文名稱",nameEn:"英文名稱",add:"添加換乘",copy:"復製換乘",remove:"刪除換乘"},shmetroBasic:{displayName:"上海地鐵基本車站"},shmetroBasic2020:{displayName:"上海地鐵基本車站(2020)"},shmetroInt:{displayName:"上海地鐵換乘車站",height:"車站高度",width:"車站寬度"},shmetroOsysi:{displayName:"上海地鐵轉乘車站"},shanghaiSuburbanRailway:{displayName:"上海市域鐵路車站"},gzmtrBasic:{displayName:"廣州地鐵基本車站",open:"是否開通",secondaryNameZh:"中文第二名稱",secondaryNameEn:"英文第二名稱",tram:"輕軌"},gzmtrInt:{displayName:"廣州地鐵換乘車站",open:"是否開通",secondaryNameZh:"中文第二名稱",secondaryNameEn:"英文第二名稱",foshan:"佛山"},gzmtrInt2024:{displayName:"廣州地鐵換乘站(2024)",anchorAt:"定位於",anchorAtNone:"中心",preferVertical:"垂直佈局(僅限2個換乘)"},bjsubwayBasic:{displayName:"北京地鐵基本車站",open:"是否開通"},bjsubwayInt:{displayName:"北京地鐵換乘車站",outOfStation:"出站轉車"},mtr:{displayName:"香港MTR車站"},suzhouRTBasic:{displayName:"蘇州軌道交通基本車站",textVertical:"垂直名稱"},suzhouRTInt:{displayName:"蘇州軌道交通換乘車站"},kunmingRTBasic:{displayName:"昆明軌道交通基本車站"},kunmingRTInt:{displayName:"昆明軌道交通換乘車站"},MRTBasic:{displayName:"新加坡MRT基本車站",isTram:"是LRT車站"},MRTInt:{displayName:"新加坡MRT換乘車站"},jrEastBasic:{displayName:"JR東日本基本車站",nameOffset:"名稱偏移",textOneLine:"名稱在一行中",textVertical:"垂直名稱",important:"重要車站",lines:"轉乘線偏移"},jrEastImportant:{displayName:"JR東日本重要車站",textVertical:"垂直名稱",mostImportant:"最重要車站",minLength:"車站的最小長度"},foshanMetroBasic:{displayName:"佛山地鐵基本車站",open:"是否開通",secondaryNameZh:"中文第二名稱",secondaryNameEn:"英文第二名稱",tram:"輕軌"},qingdaoMetro:{displayName:"青島地鐵基本車站",isInt:"是換乘站"},tokyoMetroBasic:{displayName:"東京地鐵基本車站",nameOffset:"名稱偏移",textVertical:"垂直站名",lineCode:"線路編號",stationCode:"車站編號"},tokyoMetroInt:{displayName:"東京地鐵轉乘車站",mereOffset:{displayName:"名稱微小偏移",none:"無",left1:"左 (较少)",left2:"左 (较大)",right1:"右 (较少)",right2:"右 (较大)",up:"上",down:"下"},importance:{displayName:"車站重要性",default:"預設",middle:"中",high:"高"},align:{displayName:"圖標排列方向",horizontal:"橫向",vertical:"縱向"}},londonTubeCommon:{stepFreeAccess:"無障礙通行",stepFreeAccessNone:"無",stepFreeAccessTrain:"從街道到列車",stepFreeAccessPlatform:"從街道到月台"},londonTubeBasic:{displayName:"倫敦地鐵基本車站",terminal:"終點站",shareTracks:"軌道共享",shareTracksIndex:"軌道共享指數"},londonTubeInt:{displayName:"倫敦地鐵換乘車站"},guangdongIntercityRailway:{displayName:"廣東城際鐵路車站"}},lines:{reconcileId:"合並線段唯一標識符",common:{offsetFrom:"起始點偏移",offsetTo:"結束點偏移",startFrom:"從這裏開始",roundCornerFactor:"轉折圓角因子",from:"從",to:"到",parallelDisabled:"由於此線段是平行的,因此某些屬性已被禁用。",changeInBaseLine:"在基準線段中更改它們:"},simple:{displayName:"基本線段",offset:"偏移"},diagonal:{displayName:"135°折線線段"},perpendicular:{displayName:"90°垂直線段"},rotatePerpendicular:{displayName:"90°旋轉垂直線段"},singleColor:{displayName:"純色樣式"},shmetroVirtualInt:{displayName:"上海地鐵出站換乘樣式"},shanghaiSuburbanRailway:{displayName:"上海市域鐵路樣式",isEnd:"結束區間"},gzmtrVirtualInt:{displayName:"廣州地鐵出站換乘樣式"},chinaRailway:{displayName:"中國鐵路樣式"},bjsubwaySingleColor:{displayName:"北京地鐵純色樣式"},bjsubwayTram:{displayName:"北京地鐵有軌電車樣式"},bjsubwayDotted:{displayName:"北京地鐵虛線樣式"},dualColor:{displayName:"雙色樣式",swap:"切換顏色",colorA:"顏色A",colorB:"顏色B"},river:{displayName:"河流樣式",width:"寬度"},mtrRaceDays:{displayName:"香港MTR賽馬日樣式"},mtrLightRail:{displayName:"香港MTR輕鐵樣式"},mtrUnpaidArea:{displayName:"香港MTR未付費區域樣式"},mtrPaidArea:{displayName:"香港MTR付費區域樣式"},mrtUnderConstruction:{displayName:"新加坡MRT在建樣式"},mrtSentosaExpress:{displayName:"新加坡MRT聖淘沙捷運樣式"},jrEastSingleColor:{displayName:"JR東日本單色樣式"},jrEastSingleColorPattern:{displayName:"JR東日本單色網狀圖案樣式"},lrtSingleColor:{displayName:"新加坡LRT純色樣式"},londonTubeInternalInt:{displayName:"倫敦地鐵內部換乘樣式"},londonTube10MinWalk:{displayName:"倫敦地鐵10分鐘步行換乘樣式"},londonTubeTerminal:{displayName:"倫敦地鐵終點站樣式"},guangdongIntercityRailway:{displayName:"廣東城際鐵路樣式"}},edges:{},footer:{duplicate:"重複",copy:"複製",remove:"移除"}}},header:{popoverHeader:"你正在瀏覽<1>{{environment}}環境!",popoverBody:"我們正在測試最新的RMP。如果妳有任何建議,歡迎在 https://github.com/railmapgen/rmp/issues 上提出。",search:"搜尋車站",open:{new:"新項目",config:"讀入項目",projectRMG:"從RMG專案中讀入",invalidType:"無效的文件類型!僅接受JSON格式的文件。",unknownError:"解析上傳文件時發生未知錯誤!請重試。",gallery:"從畫廊中讀入",tutorial:"開始教程",importFromRMPGallery:"範本 {{id}} 已匯入。對此更改不滿意?可通過 Ctrl + Z 或撤銷按鈕進行撤銷。",failToImportFromRMPGallery:"無法從畫廊導入{{id}},找不到檔案。"},download:{config:"導出項目",image:"導出圖片","2rmg":{title:"導出RMG項目",type:{line:"直線",loop:"環線",branch:"支線"},placeholder:{chinese:"中文線路名稱",english:"英文線路名稱",lineCode:"路綫編碼"},info1:"這個功能可將RMP項目導出為RMG項目。",info2:"下面的線路將可以被導出,你可以在左側文本框中輸入中文線路名稱、在中間輸入英文線路名稱、右邊輸入線路編號(廣州地鐵樣式專用),隨後點擊下載按鈕即可導出RMG項目。",noline:"未找到可用線路。",download:"下載",downloadInfo:"請選擇一個起始車站,並點擊它。"},format:"檔案種類",png:"PNG影像",svg:"SVG影像",svgVersion:"版本","svg1.1":"1.1(適用於Adobe Illustrator)",svg2:"2(適用於現代瀏覽器)",transparent:"透明背景",scale:"縮放",disabledScaleOptions:"由於您的瀏覽器的畫布限制,部分縮放選項已被禁用。",disabledScaleOptionsWorkarounds:"可能的解決方法包括使用此命令行工具從SVG生成圖像:",imageTooBig:"圖像太大,您的瀏覽器無法生成!",useSystemFonts:"使用系統字型而不是在畫布上預覽的字型",shareInfo1:"當我分享此圖片時我會附上",shareInfo2:"和它的鏈接。",termsAndConditions:"條款及細則",termsAndConditionsInfo:"我同意",period:"。",confirm:"下載"},donation:{title:"捐款",openCollective:"Open Collective",viaUSD:"通過Paypal或Visa卡以美元捐款。",afdian:"爱发电",viaCNY:"通過支付寶或微信支付以人民幣捐款。"},settings:{title:"設置",pro:"這是一個專業功能,需要带有訂閱的帳戶。",proWithTrial:"這是一個PRO功能,並提供有限的免費試用。",proLimitExceed:{master:"大師節點超出了免費額度。",parallel:"平行線段超出了免費額度。",solution:"移除它們以解除此警告,或訂閱以解鎖更多功能!"},subscription:{title:"訂閱狀態","logged-out":"您目前已登出。",free:"已登入!訂閱以解鎖更多功能!",subscriber:"感謝您的訂閱!享受所有功能吧!",expired:"登入狀態已過期。請登出後重新登入。"},preference:{title:"偏好",keepLastPath:"在下一次操作中持續畫線段直到點擊背景",autoParallel:"自動將新段線設置為與現有線段平行"},shortcuts:{title:"捷徑",keys:"按鍵",description:"描述",f:"使用上一個工具。",s:"多選。",arrows:"稍微移動畫布。",ijkl:"稍微移動所選站點。",shift:"多選。",alt:"精確移動。",delete:"刪除所選站點。",cut:"剪切。",copy:"複製。",paste:"貼上。",undo:"撤銷。",redo:"重做。"},procedures:{title:"过程",translate:{title:"轉化節點坐標",content:"將以下偏移加到所有節點的x和y上:",x:"橫坐標",y:"縱坐標"},scale:{title:"縮放節點坐標",content:"將所有節點的x和y乘以以下值:",factor:"縮放因子"},changeType:{title:"修改所有物件的屬性",any:"任意"},changeZIndex:"批量修改深度",changeStationType:{title:"批量修改車站種類",changeFrom:"將此類型的所有車站:",changeTo:"轉換為這個類型的車站:",info:"修改車站類型會移除所有獨特屬性除了名稱。保存再操作!"},changeLineStyleType:{title:"批量修改線段樣式",changeFrom:"將此樣式的所有線段:",changeTo:"轉換為這個樣式的線段:",info:"修改線段樣式會移除所有獨特屬性除了連通性。保存再操作!"},changeLinePathType:{title:"批量修改線段類型",changeFrom:"將此類型的所有線段:",changeTo:"轉換為這個類型的線段:"},changeColor:{title:"批量修改顏色",changeFrom:"將此顏色的所有對象:",changeTo:"轉換為這個顏色:",any:"從任何顏色轉換"},removeLines:{title:"移除所有純色線段",content:"移除具有此顏色的所有線段: "},updateColor:{title:"更新顏色",content:"使用最新值更新所有顏色。",success:"成功更新所有顏色。",error:"更新所有顏色時發生錯誤:{{e}}。"},unlockSimplePath:{title:"解鎖簡單路徑",content1:"地鐵線路圖繪製器應用致力於在遵循既定慣例的前提下,提供一個有利於創建地鐵線路圖的互動平台。在這些慣例中,一種特別著名的風格源自哈利·貝克的創新工作。他的開創性貢獻於1932年得到官方認可,並在大眾中迅速贏得了聲譽。目前,它在信息設計領域具有重要的示範意義,在全球範圍內的交通製圖中得到了廣泛的實施,儘管成功程度有所不同。",content2:"應用程式固有地隱藏了使用簡單路徑的選項,因為其部署有可能違反既定的慣例。默認情況下,此特定功能保持隱蔽。此外,提交到地鐵線路圖繪製器畫廊的作品將經過嚴格的審查,堅決拒絕使用單色風格的簡單路徑的構圖。",content3:"儘管如此,我們仍然保留瞭解鎖此選項的機會,當您訂閱后,方可使用簡單路徑。 需要注意的是,即使獲得后,簡單路徑的使用也僅限於單色風格。",check:"解鎖簡單路徑",unlocked:"已解鎖"},masterManager:{title:"管理全部大師節點",id:"唯一標識",label:"標籤",type:"類型",types:{MiscNode:"雜項節點",Station:"車站"},importTitle:"上傳大師節點參數",importFrom:"使用匯入的樣式",importOther:"導入新樣式",importParam:"貼上配置信息"}},telemetry:{title:"遙測",info:"為了協助改進地鐵路綫圖繪製器並激勵貢獻者提升項目,我們透過 Google Analytics 收集匿名使用數據。這些數據僅用於提升用戶體驗及優化工具功能,絕不會與第三方共享。",essential:"基本",essentialTooltip:"在地鐵路綫圖工具組中更改此全局設定",essentialInfo:"地鐵路綫圖繪製器收集一些基本使用數據,以協助我們了解用戶如何及何時與工具互動。請放心,我們絕不收集任何可識別個人身份的資訊或您的項目數據。",essentialLink:"點擊此鏈接查看 Google Analytics 可能收集的詳細字段。",additional:"額外",additionalInfo:"地鐵路綫圖繪製器還會收集與互動有關的數據,例如創建項目或新增站點等操作。這些額外數據同樣是匿名的,僅用於統計分析以協助我們改進工具。"}},about:{title:"關於",rmp:"地鐵線路圖繪製器",railmapgen:"一個路綫圖工具組的項目",desc:"通過自由拖動來自不同城市的車站並以 90 或 135 度圓角線段將它們連接起來,設計您自己的鐵路地圖!",content1:"謹以此紀念我們曾擁有的自由與平等。",content2:"06/01/2022於上海",contributors:"貢獻者",coreContributors:"核心貢獻者",styleContributors:"樣式貢獻者",langonginc:"活出值得銘記的人生。","203IhzElttil":"特別感謝他勤奮工作,確保上海地鐵站與原始設計相符。",Swiftiecott:"特別感謝他勤奮工作,確保北京地鐵站與原始設計相符。",Minwtraft:"特別感謝他勤奮工作,確保廣州地鐵站與原始設計相符。",contactUs:"聯繫我們",github:"項目倉庫",githubContent:"遇到任何問題?在這裡搜索或提出一個問題!",slack:"Slack群組",slackContent:"在這些Slack頻道中討論!"}}},Ic=e("aP",(new qn.I18nBuilder).use(ze).withAppName("Rail Map Painter").withLng(qn.getLanguage()).withDefaultResource(Oc).withResource("en",Lc).withResource("zh-Hans",Mc).withResource("zh-Hant",Pc).withResource("ja",Ac).withResource("ko",Ec).build()),{abs:$c,cos:zc,sin:Bc,acos:Dc,atan2:Gc,sqrt:Fc,pow:Uc}=Math;function Wc(e){return e<0?-Uc(-e,1/3):Uc(e,1/3)}const Vc=Math.PI,Hc=2*Vc,Jc=Vc/2,qc=Number.MAX_SAFE_INTEGER||9007199254740991,Kc=Number.MIN_SAFE_INTEGER||-9007199254740991,Yc={x:0,y:0,z:0},Qc={Tvalues:[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213],Cvalues:[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872],arcfn:function(e,t){const n=t(e);let r=n.x*n.x+n.y*n.y;return void 0!==n.z&&(r+=n.z*n.z),Fc(r)},compute:function(e,t,n){if(0===e)return t[0].t=0,t[0];const r=t.length-1;if(1===e)return t[r].t=1,t[r];const o=1-e;let i=t;if(0===r)return t[0].t=e,t[0];if(1===r){const t={x:o*i[0].x+e*i[1].x,y:o*i[0].y+e*i[1].y,t:e};return n&&(t.z=o*i[0].z+e*i[1].z),t}if(r<4){let t,a,s,l=o*o,c=e*e,d=0;2===r?(i=[i[0],i[1],i[2],Yc],t=l,a=o*e*2,s=c):3===r&&(t=l*o,a=l*e*3,s=o*c*3,d=e*c);const u={x:t*i[0].x+a*i[1].x+s*i[2].x+d*i[3].x,y:t*i[0].y+a*i[1].y+s*i[2].y+d*i[3].y,t:e};return n&&(u.z=t*i[0].z+a*i[1].z+s*i[2].z+d*i[3].z),u}const a=JSON.parse(JSON.stringify(t));for(;a.length>1;){for(let t=0;t1;o--,i--){const e=[];for(let n,o=0;oi.x.min&&(t=i.x.min),n>i.y.min&&(n=i.y.min),r0&&(a.c1=t,a.c2=r,a.s1=e,a.s2=n,i.push(a))}))})),i},makeshape:function(e,t,n){const r=t.points.length,o=e.points.length,i=Qc.makeline(t.points[r-1],e.points[0]),a=Qc.makeline(e.points[o-1],t.points[0]),s={startcap:i,forward:e,back:t,endcap:a,bbox:Qc.findbbox([i,e,t,a]),intersections:function(e){return Qc.shapeintersections(s,s.bbox,e,e.bbox,n)}};return s},getminmax:function(e,t,n){if(!n)return{min:0,max:0};let r,o,i=qc,a=Kc;-1===n.indexOf(0)&&(n=[0].concat(n)),-1===n.indexOf(1)&&n.push(1);for(let s=0,l=n.length;sa&&(a=o[t]);return{min:i,mid:(i+a)/2,max:a,size:a-i}},align:function(e,t){const n=t.p1.x,r=t.p1.y,o=-Gc(t.p2.y-r,t.p2.x-n);return e.map((function(e){return{x:(e.x-n)*zc(o)-(e.y-r)*Bc(o),y:(e.x-n)*Bc(o)+(e.y-r)*zc(o)}}))},roots:function(e,t){t=t||{p1:{x:0,y:0},p2:{x:1,y:0}};const n=e.length-1,r=Qc.align(e,t),o=function(e){return 0<=e&&e<=1};if(2===n){const e=r[0].y,t=r[1].y,n=r[2].y,i=e-2*t+n;if(0!==i){const r=-Fc(t*t-e*n),a=-e+t;return[-(r+a)/i,-(-r+a)/i].filter(o)}return t!==n&&0===i?[(2*t-n)/(2*t-2*n)].filter(o):[]}const i=r[0].y,a=r[1].y,s=r[2].y;let l=3*a-i-3*s+r[3].y,c=3*i-6*a+3*s,d=-3*i+3*a,u=i;if(Qc.approximately(l,0)){if(Qc.approximately(c,0))return Qc.approximately(d,0)?[]:[-u/d].filter(o);const e=Fc(d*d-4*c*u),t=2*c;return[(e-d)/t,(-d-e)/t].filter(o)}c/=l,d/=l,u/=l;const p=(3*d-c*c)/3,h=p/3,g=(2*c*c*c-9*c*d+27*u)/27,f=g/2,m=f*f+h*h*h;let y,b,v,w,x;if(m<0){const e=-p/3,t=Fc(e*e*e),n=-g/(2*t),r=Dc(n<-1?-1:n>1?1:n),i=2*Wc(t);return v=i*zc(r/3)-c/3,w=i*zc((r+Hc)/3)-c/3,x=i*zc((r+2*Hc)/3)-c/3,[v,w,x].filter(o)}if(0===m)return y=f<0?Wc(-f):-Wc(f),v=2*y-c/3,w=-y-c/3,[v,w].filter(o);{const e=Fc(m);return y=Wc(-f+e),b=Wc(f+e),[y-b-c/3].filter(o)}},droots:function(e){if(3===e.length){const t=e[0],n=e[1],r=e[2],o=t-2*n+r;if(0!==o){const e=-Fc(n*n-t*r),i=-t+n;return[-(e+i)/o,-(-e+i)/o]}return n!==r&&0===o?[(2*n-r)/(2*(n-r))]:[]}if(2===e.length){const t=e[0],n=e[1];return t!==n?[t/(t-n)]:[]}return[]},curvature:function(e,t,n,r,o){let i,a,s,l,c=0,d=0;const u=Qc.compute(e,t),p=Qc.compute(e,n),h=u.x*u.x+u.y*u.y;if(r?(i=Fc(Uc(u.y*p.z-p.y*u.z,2)+Uc(u.z*p.x-p.z*u.x,2)+Uc(u.x*p.y-p.x*u.y,2)),a=Uc(h+u.z*u.z,1.5)):(i=u.x*p.y-u.y*p.x,a=Uc(h,1.5)),0===i||0===a)return{k:0,r:0};if(c=i/a,d=a/i,!o){const o=Qc.curvature(e-.001,t,n,r,!0).k,i=Qc.curvature(e+.001,t,n,r,!0).k;l=(i-c+(c-o))/2,s=($c(i-c)+$c(c-o))/2}return{k:c,r:d,dk:l,adk:s}},inflections:function(e){if(e.length<4)return[];const t=Qc.align(e,{p1:e[0],p2:e.slice(-1)[0]}),n=t[2].x*t[1].y,r=t[3].x*t[1].y,o=t[1].x*t[2].y,i=18*(-3*n+2*r+3*o-t[3].x*t[2].y),a=18*(3*n-r-3*o),s=18*(o-n);if(Qc.approximately(i,0)){if(!Qc.approximately(a,0)){let e=-s/a;if(0<=e&&e<=1)return[e]}return[]}const l=2*i;if(Qc.approximately(l,0))return[];const c=a*a-4*i*s;if(c<0)return[];const d=Math.sqrt(c);return[(d-a)/l,-(a+d)/l].filter((function(e){return 0<=e&&e<=1}))},bboxoverlap:function(e,t){const n=["x","y"],r=n.length;for(let o,i,a,s,l=0;l=s)return!1;return!0},expandbox:function(e,t){t.x.mine.x.max&&(e.x.max=t.x.max),t.y.max>e.y.max&&(e.y.max=t.y.max),t.z&&t.z.max>e.z.max&&(e.z.max=t.z.max),e.x.mid=(e.x.min+e.x.max)/2,e.y.mid=(e.y.min+e.y.max)/2,e.z&&(e.z.mid=(e.z.min+e.z.max)/2),e.x.size=e.x.max-e.x.min,e.y.size=e.y.max-e.y.min,e.z&&(e.z.size=e.z.max-e.z.min)},pairiteration:function(e,t,n){const r=e.bbox(),o=t.bbox(),i=1e5,a=n||.5;if(r.x.size+r.y.sizek||k>N)&&(S+=Hc),S>N&&(x=N,N=S,S=x)):N4){if(1!==arguments.length)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");r=!0}}else if(6!==o&&8!==o&&9!==o&&12!==o&&1!==arguments.length)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");const i=this._3d=!r&&(9===o||12===o)||e&&e[0]&&void 0!==e[0].z,a=this.points=[];for(let p=0,h=i?3:2;pe+Xc(t.y)),0)0}length(){return Qc.length(this.derivative.bind(this))}static getABC(e=2,t,n,r,o=.5){const i=Qc.projectionratio(o,e),a=1-i,s={x:i*t.x+a*r.x,y:i*t.y+a*r.y},l=Qc.abcratio(o,e);return{A:{x:n.x+(n.x-s.x)/l,y:n.y+(n.y-s.y)/l},B:n,C:s,S:t,E:r}}getABC(e,t){t=t||this.get(e);let n=this.points[0],r=this.points[this.order];return sd.getABC(this.order,n,t,r,e)}getLUT(e){if(this.verify(),e=e||100,this._lut.length===e+1)return this._lut;this._lut=[],e++,this._lut=[];for(let t,n,r=0;r1?1:u,l=this.compute(u),l.t=u,l.d=c,l}get(e){return this.compute(e)}point(e){return this.points[e]}compute(e){return this.ratios?Qc.computeWithRatios(e,this.points,this.ratios,this._3d):Qc.compute(e,this.points,this._3d,this.ratios)}raise(){const e=this.points,t=[e[0]],n=e.length;for(let r,o,i=1;i1;){n=[];for(let i,a=0,s=t.length-1;a=0&&e<=1})),t=t.concat(e[n].sort(Qc.numberSort))}.bind(this)),e.values=t.sort(Qc.numberSort).filter((function(e,n){return t.indexOf(e)===n})),e}bbox(){const e=this.extrema(),t={};return this.dims.forEach(function(n){t[n]=Qc.getminmax(this,n,e[n])}.bind(this)),t}overlaps(e){const t=this.bbox(),n=e.bbox();return Qc.bboxoverlap(t,n)}offset(e,t){if(void 0!==t){const n=this.get(e),r=this.normal(e),o={c:n,n:r,x:n.x+r.x*t,y:n.y+r.y*t};return this._3d&&(o.z=n.z+r.z*t),o}if(this._linear){const t=this.normal(0),n=this.points.map((function(n){const r={x:n.x+e*t.x,y:n.y+e*t.y};return n.z&&t.z&&(r.z=n.z+e*t.z),r}));return[new sd(n)]}return this.reduce().map((function(t){return t._linear?t.offset(e)[0]:t.scale(e)}))}simple(){if(3===this.order){const e=Qc.angle(this.points[0],this.points[3],this.points[1]),t=Qc.angle(this.points[0],this.points[3],this.points[2]);if(e>0&&t<0||e<0&&t>0)return!1}const e=this.normal(0),t=this.normal(1);let n=e.x*t.x+e.y*t.y;return this._3d&&(n+=e.z*t.z),Xc(od(n))(1-o/r)*t+o/r*n));return new sd(this.points.map(((t,n)=>({x:t.x+e.x*o[n],y:t.y+e.y*o[n]}))))}scale(e){const t=this.order;let n=!1;if("function"==typeof e&&(n=e),n&&2===t)return this.raise().scale(n);const r=this.clockwise,o=this.points;if(this._linear)return this.translate(this.normal(0),n?n(0):e,n?n(1):e);const i=n?n(0):e,a=n?n(1):e,s=[this.offset(0,10),this.offset(1,10)],l=[],c=Qc.lli4(s[0],s[0].c,s[1],s[1].c);if(!c)throw new Error("cannot scale this curve. Try reducing it first.");return[0,1].forEach((function(e){const n=l[e*t]=Qc.copy(o[e*t]);n.x+=(e?a:i)*s[e].n.x,n.y+=(e?a:i)*s[e].n.y})),n?([0,1].forEach((function(i){if(2!==t||!i){var a=o[i+1],s={x:a.x-c.x,y:a.y-c.y},d=n?n((i+1)/t):e;n&&!r&&(d=-d);var u=id(s.x*s.x+s.y*s.y);s.x/=u,s.y/=u,l[i+1]={x:a.x+d*s.x,y:a.y+d*s.y}}})),new sd(l)):([0,1].forEach((e=>{if(2===t&&e)return;const n=l[e*t],r=this.derivative(e),i={x:n.x+r.x,y:n.y+r.y};l[e+1]=Qc.lli4(n,i,c,o[e+1])})),new sd(l))}outline(e,t,n,r){if(t=void 0===t?e:t,this._linear){const o=this.normal(0),i=this.points[0],a=this.points[this.points.length-1];let s,l,c;void 0===n&&(n=e,r=t),s={x:i.x+o.x*e,y:i.y+o.y*e},c={x:a.x+o.x*n,y:a.y+o.y*n},l={x:(s.x+c.x)/2,y:(s.y+c.y)/2};const d=[s,l,c];s={x:i.x-o.x*t,y:i.y-o.y*t},c={x:a.x-o.x*r,y:a.y-o.y*r},l={x:(s.x+c.x)/2,y:(s.y+c.y)/2};const u=[c,l,s],p=Qc.makeline(u[2],d[0]),h=Qc.makeline(d[2],u[0]),g=[p,new sd(d),h,new sd(u)];return new Zc(g)}const o=this.reduce(),i=o.length,a=[];let s,l=[],c=0,d=this.length();const u=void 0!==n&&void 0!==r;function p(e,t,n,r,o){return function(i){const a=r/n,s=(r+o)/n,l=t-e;return Qc.map(i,0,1,e+a*l,e+s*l)}}o.forEach((function(o){const i=o.length();u?(a.push(o.scale(p(e,n,d,c,i))),l.push(o.scale(p(-t,-r,d,c,i)))):(a.push(o.scale(e)),l.push(o.scale(-t))),c+=i})),l=l.map((function(e){return s=e.points,s[3]?e.points=[s[3],s[2],s[1],s[0]]:e.points=[s[2],s[1],s[0]],e})).reverse();const h=a[0].points[0],g=a[i-1].points[a[i-1].points.length-1],f=l[i-1].points[l[i-1].points.length-1],m=l[0].points[0],y=Qc.makeline(f,h),b=Qc.makeline(g,m),v=[y].concat(a).concat([b]).concat(l);return new Zc(v)}outlineshapes(e,t,n){t=t||e;const r=this.outline(e,t).curves,o=[];for(let i=1,a=r.length;i1,e.endcap.virtual=i{var i=this.get(e);return Qc.between(i.x,t,r)&&Qc.between(i.y,n,o)}))}selfintersects(e){const t=this.reduce(),n=t.length-2,r=[];for(let o,i,a,s=0;s0&&(o=o.concat(t))})),o}arcs(e){return e=e||.5,this._iterate(e,[])}_error(e,t,n,r){const o=(r-n)/4,i=this.get(n+o),a=this.get(r-o),s=Qc.dist(e,t),l=Qc.dist(e,i),c=Qc.dist(e,a);return Xc(l-s)+Xc(c-s)}_iterate(e,t){let n,r=0,o=1;do{n=0,o=1;let i,a,s,l,c,d=this.get(r),u=!1,p=!1,h=o,g=1;do{if(p=u,l=s,h=(r+o)/2,i=this.get(h),a=this.get(o),s=Qc.getccenter(d,i,a),s.interval={start:r,end:o},u=this._error(s,d,r,o)<=e,c=p&&!u,c||(g=o),u){if(o>=1){if(s.interval.end=g=1,l=s,o>1){let e={x:s.x+s.r*nd(s.e),y:s.y+s.r*rd(s.e)};s.e+=Qc.angle({x:s.x,y:s.y},e,this.get(1))}break}o+=(o-r)/2}else o=h}while(!c&&n++<100);if(n>=100)break;l=l||s,t.push(l),r=g}while(o<1);return t}}const ld=(e,t,n,r)=>{var o;r=null!==(o=r)&&void 0!==o?o:-n;const[i,a]=cd(e);if(!i||!a)return;if(i[0]===a[0]||i[1]===a[1]||t===Nc.Diagonal&&Math.abs(i[1]-a[1])===Math.abs(i[0]-a[0])){const e=Math.abs(n);return dd(i,a,e)}const[s,l]=pd(e);if(!s||!l)return;const c=new sd([...s,...l]),[d,u]=[c.scale(n),c.scale(r)],p=gd(i,s,a,c,d,u);if(!p)return;const{mA:[h,g],mB:[f,m],endA:[y,b],endB:[v,w]}=p;return[`M ${h} ${g} ${d.toSVG().replace("M","L")} L ${y} ${b}`,`M ${f} ${m} ${u.toSVG().replace("M","L")} L ${v} ${w}`]},cd=e=>{var t,n;return[null===(t=e.match(/M\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+/))||void 0===t||null===(t=t.at(0))||void 0===t?void 0:t.replace(/M\s*/,"").split(" ").map((e=>Number(e))),null===(n=e.match(/L\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+\s*$/))||void 0===n||null===(n=n.at(0))||void 0===n?void 0:n.replace(/L\s*/,"").split(" ").map((e=>Number(e)))]},dd=(e,t,n)=>{const[r,o,i,a]=[e[0],e[1],t[0],t[1]],s=Math.abs((a-o)/(i-r));if(s===1/0)return[`M ${r+n} ${o} L ${i+n} ${a}`,`M ${r-n} ${o} L ${i-n} ${a}`];if(0===s)return[`M ${r} ${o+n} L ${i} ${a+n}`,`M ${r} ${o-n} L ${i} ${a-n}`];{const e=1/s,t=n/Math.sqrt(e*e+1),l=t*e*-Math.sign((i-r)*(a-o));return[`M ${r+t} ${o+l} L ${i+t} ${a+l}`,`M ${r-t} ${o-l} L ${i-t} ${a-l}`]}},ud=(e,t,n)=>{const[r,o,i,a]=[e[0],e[1],t[0],t[1]],s=Math.abs((a-o)/(i-r));if(s===1/0)return`M ${r+n} ${o} L ${i+n} ${a} L ${i-n} ${a} L ${r-n} ${o} Z`;if(0===s)return`M ${r} ${o+n} L ${i} ${a+n} L ${i} ${a-n} L ${r} ${o-n} Z`;{const e=1/s,t=n/Math.sqrt(e*e+1),l=t*e*-Math.sign((i-r)*(a-o));return`M ${r+t} ${o+l} L ${i+t} ${a+l} L ${i-t} ${a-l} L ${r-t} ${o-l} Z`}},pd=e=>{var t,n;return[null===(t=e.match(/L\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+/))||void 0===t||null===(t=t.at(0))||void 0===t?void 0:t.replace(/L\s*/,"").split(" ").map((e=>Number(e))),null===(n=e.match(/C\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+/g))||void 0===n||null===(n=n.at(0))||void 0===n?void 0:n.replace(/C\s*/,"").split(" ").map((e=>Number(e)))]},hd=(e,t)=>[[t[4],t[5]],[t[2],t[3],t[0],t[1],e[0],e[1]]],gd=(e,t,n,r,o,i)=>{const a=[o.points.at(0).x,o.points.at(0).y],s=[i.points.at(0).x,i.points.at(0).y];if(!e)return;const[l,c]=fd(e[0],t[0],a[0],e[1],t[1],a[1]),[d,u]=fd(e[0],t[0],s[0],e[1],t[1],s[1]),p=[o.points.at(-1).x,o.points.at(-1).y],h=[i.points.at(-1).x,i.points.at(-1).y],g=[r.points.at(-1).x,r.points.at(-1).y];if(!n)return;const[f,m]=fd(p[0],g[0],n[0],p[1],g[1],n[1]),[y,b]=fd(h[0],g[0],n[0],h[1],g[1],n[1]);return{mA:[l,c],mB:[d,u],endA:[f,m],endB:[y,b]}},fd=(e,t,n,r,o,i)=>{const[a,s]=[e+n,r+i],[l,c]=[a-t,s-o];return[l,c]},md=(e("an",((e,t)=>{const n=t.edge,r=t.attributes.type,o=t.attributes[r],i=t.attributes.parallelIndex;if(r===Nc.Simple||i<0)return{normal:[t],parallel:[]};const a=[],[s,l]=e.extremities(n),c=[];for(const d of e.edgeEntries(s,l))d.attributes.parallelIndex<0?a.push(d):(d.attributes.type===r&&s===d.source&&d.attributes[r].startFrom===o.startFrom||d.attributes.type===r&&s===d.target&&d.attributes[r].startFrom!==o.startFrom)&&c.push(d);return{normal:a,parallel:c}})),e("ao",(e=>{let t=e.at(0);if(!t)return{};for(const h of e)h.attributes.parallelIndex{let i=!1;if(e===Nc.Diagonal)(Math.abs(r-t)t&&o>n)||Math.abs(r-t)>Math.abs(o-n)&&(r>t&&on))&&(i=!0);else if(e===Nc.Perpendicular)(r>t&&on)&&(i=!0);else if(e===Nc.RotatePerpendicular){const[e,a,s,l]=[t*Math.SQRT1_2+n*Math.SQRT1_2,-t*Math.SQRT1_2+n*Math.SQRT1_2,r*Math.SQRT1_2+o*Math.SQRT1_2,-r*Math.SQRT1_2+o*Math.SQRT1_2];(s>e&&la)&&(i=!0)}return i})(n,i,a,s,l),u={};for(const h of e){var p;const e=h.attributes.parallelIndex>0?h.attributes.parallelIndex:0;if(0===e){u[h.edge]=c;continue}const t=5*e,r=[`M ${i} ${a+t} L ${s} ${l+t}`,`M ${i} ${a-t} L ${s} ${l-t}`],[o,g]=null!==(p=ld(c,n,t))&&void 0!==p?p:r;u[h.edge]=d?o:g}return u})),e("m",((e,t,n,r,o)=>{if(t===Nc.Simple)return-1;const i=[];for(const s of e.edgeEntries(n,r)){const e=s.attributes;(t===e.type&&n===s.source&&e[t].startFrom===o||t===e.type&&n===s.target&&e[t].startFrom!==o)&&i.push(s.attributes.parallelIndex)}i.sort();let a=0;for(const s of i){if(s>a)break;a=s+1}return a})),(e,t,n)=>{if(t===Nc.Simple)return n;const r=e.getEdgeAttribute(n,"parallelIndex");if(r<0)return n;const o=e.getEdgeAttribute(n,t).startFrom,[i,a]=e.extremities(n);let s=Number.MAX_VALUE,l=n;for(const c of e.edgeEntries(i,a)){const e=c.attributes;(t===e.type&&i===c.source&&e[t].startFrom===o&&e.parallelIndex>=0&&e.parallelIndex=0&&e.parallelIndex{e.telemetry.app=t.payload},setTelemetryProject:(e,t)=>{e.telemetry.project=t.payload},setUnlockSimplePath:(e,t)=>{e.preference.unlockSimplePathAttempts=t.payload},setToolsPanelExpansion:(e,t)=>{e.preference.toolsPanel.expand=t.payload},setAutoParallel:(e,t)=>{e.preference.autoParallel=t.payload}}}),{setTelemetryApp:wd,setTelemetryProject:xd,setUnlockSimplePath:Sd,setToolsPanelExpansion:kd,setAutoParallel:Nd}=vd.actions;e({a9:xd,X:Sd,aL:kd,a2:Nd});const _d=vd.reducer,Rd={present:(new Oo).export(),past:[],future:[],svgViewBoxZoom:100,svgViewBoxMin:{x:0,y:0}},Td=e("ak",De("undo")),Cd=e("al",De("redo")),jd=Ie({name:"param",initialState:Rd,reducers:{setFullState:(e,t)=>structuredClone(t.payload),saveGraph:(e,t)=>{e.future=[],e.past.push(e.present),e.past.length>49&&e.past.shift(),e.present=structuredClone(t.payload)},setSvgViewBoxZoom:(e,t)=>{e.svgViewBoxZoom=t.payload},setSvgViewBoxMin:(e,t)=>{e.svgViewBoxMin=t.payload}},extraReducers:e=>{e.addCase(Td,(e=>{if(0===e.past.length)return;const t=e.past.pop();e.future.unshift(e.present),e.present=t,window.graph.clear(),window.graph.import(structuredClone(Be(t)))})).addCase(Cd,(e=>{if(0===e.future.length)return;const t=e.future.shift();e.past.push(e.present),e.present=t,window.graph.clear(),window.graph.import(structuredClone(Be(t)))}))}}),{setFullState:Od,saveGraph:Ld,setSvgViewBoxZoom:Ad,setSvgViewBoxMin:Ed}=jd.actions;e({v:Ld,z:Ad,A:Ed});const Md=jd.reducer,Pd={selected:new Set,active:void 0,refresh:{nodes:Date.now(),edges:Date.now()},mode:"free",lastTool:void 0,keepLastPath:!1,theme:[ic.Shanghai,"sh1","#E3002B",pc.white],paletteAppClip:{input:void 0,output:void 0},masterNodesCount:0,parallelLinesCount:0,globalAlerts:{}},Id=e("q",Ge("runtime/refreshNodes",(async(e,{getState:t,dispatch:n})=>{const r=t();if(n(Hd()),r.account.timeout)return;let o=0;window.graph.forEachNode(((e,t)=>{t.type===jc.Master&&(o+=1)})),n(Bd(o));const i=r.account.activeSubscriptions.RMP_CLOUD?1/0:Cc;o>i&&n(eu({status:"warning",message:`${Ic.t("header.settings.proLimitExceed.master")} ${Ic.t("header.settings.proLimitExceed.solution")}`}))}))),$d=e("t",Ge("runtime/refreshEdges",(async(e,{getState:t,dispatch:n})=>{const r=t();if(n(Jd()),r.account.timeout)return;const o=(e=>{let t=0;for(const n of e.edgeEntries())n.attributes.parallelIndex>=0&&(t+=1);return t})(window.graph);n(Dd(o));const i=r.account.activeSubscriptions.RMP_CLOUD?bd:yd;o>=i&&n(Nd(!1)),o>i&&n(eu({status:"warning",message:`${Ic.t("header.settings.proLimitExceed.parallel")} ${Ic.t("header.settings.proLimitExceed.solution")}`}))}))),zd=Ie({name:"runtime",initialState:Pd,reducers:{setSelected:(e,t)=>{e.selected=t.payload},addSelected:(e,t)=>{e.selected.add(t.payload)},removeSelected:(e,t)=>{e.selected.delete(t.payload)},clearSelected:e=>{e.selected=new Set},setActive:(e,t)=>{e.active=t.payload},setRefreshNodes:e=>{e.refresh.nodes=Date.now()},setRefreshEdges:e=>{e.refresh.edges=Date.now()},setMode:(e,t)=>{"free"!==e.mode&&(e.lastTool=e.mode),e.mode=t.payload},setKeepLastPath:(e,t)=>{e.keepLastPath=t.payload},setTheme:(e,t)=>{e.theme=t.payload},openPaletteAppClip:(e,t)=>{e.paletteAppClip.input=t.payload,e.paletteAppClip.output=void 0},closePaletteAppClip:e=>{e.paletteAppClip.input=void 0},onPaletteAppClipEmit:(e,t)=>{e.paletteAppClip.input=void 0,e.paletteAppClip.output=t.payload},setMasterNodesCount:(e,t)=>{e.masterNodesCount=t.payload},setParallelLinesCount:(e,t)=>{e.parallelLinesCount=t.payload},setGlobalAlert:(e,t)=>{const{status:n,message:r,url:o,linkedApp:i}=t.payload;e.globalAlerts[n]={message:r,url:o,linkedApp:i}},closeGlobalAlert:(e,t)=>{delete e.globalAlerts[t.payload]}},extraReducers:e=>{e.addCase(Td,(e=>{e.refresh.nodes=Date.now(),e.refresh.edges=Date.now()})).addCase(Cd,(e=>{e.refresh.nodes=Date.now(),e.refresh.edges=Date.now()}))}}),{setMasterNodesCount:Bd,setParallelLinesCount:Dd}=zd.actions,{setSelected:Gd,addSelected:Fd,removeSelected:Ud,clearSelected:Wd,setActive:Vd,setRefreshNodes:Hd,setRefreshEdges:Jd,setMode:qd,setKeepLastPath:Kd,setTheme:Yd,openPaletteAppClip:Qd,closePaletteAppClip:Zd,onPaletteAppClipEmit:Xd,setGlobalAlert:eu,closeGlobalAlert:tu}=zd.actions;e({T:Gd,au:Fd,at:Ud,y:Wd,as:Vd,aq:qd,a1:Kd,aH:Yd,W:Qd,j:eu,am:tu});const nu=zd.reducer,ru=(e,t,n)=>0===t?e:function(e,t,n){function r(e,t,n){var r=t.x-e.x,i=t.y-e.y,a=Math.sqrt(r*r+i*i);return o(e,t,Math.min(1,n/a))}function o(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}function i(e,t){e.length>2&&(e[e.length-2]=t.x,e[e.length-1]=t.y)}function a(e){return{x:parseFloat(e[e.length-2]),y:parseFloat(e[e.length-1])}}var s=e.split(/[,\s]/).reduce((function(e,t){var n=t.match("([a-zA-Z])(.+)");return n?(e.push(n[1]),e.push(n[2])):e.push(t),e}),[]),l=s.reduce((function(e,t){return parseFloat(t)==t&&e.length?e[e.length-1].push(t):e.push([t]),e}),[]),c=[];if(l.length>1){var d=a(l[0]),u=null;"Z"==l[l.length-1][0]&&l[0].length>2&&(u=["L",d.x,d.y],l[l.length-1]=u),c.push(l[0]);for(var p=1;p2&&"L"==g[0]&&f.length>2&&"L"==f[0]){var m,y,b=a(h),v=a(g),w=a(f);m=r(v,b,t),y=r(v,w,t),i(g,m),g.origPoint=v,c.push(g);var x=o(m,v,.5),S=o(v,y,.5),k=["C",x.x,x.y,S.x,S.y,y.x,y.y];k.origPoint=v,c.push(k)}else c.push(g)}if(u){var N=a(c[c.length-1]);c.push(["Z"]),i(c[0],N)}}else c=l;return c.reduce((function(e,t){return e+t.join(" ")+" "}),"")}(e,t),ou={startFrom:"from",offsetFrom:0,offsetTo:0,roundCornerFactor:10},iu={generatePath:(e,t,n,r,o=ou)=>{const{startFrom:i=ou.startFrom,offsetFrom:a=ou.offsetFrom,offsetTo:s=ou.offsetTo,roundCornerFactor:l=ou.roundCornerFactor}=o,[c,d,u,p]="from"===i?[e,n,t,r]:[t,r,e,n],h=Math.abs(u-c)0?-1:1):w,_="horizontal"===h?x:k+Math.abs(S-w)*(k-x>0?-1:1),[R,T,C,j]="from"===i?[w,x,S,k]:[S,k,w,x];return ru(`M ${R} ${T} L ${N} ${_} L ${C} ${j}`,l)},icon:i.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:i.jsx("path",{d:"M9,18V12L15,6",stroke:"currentColor",fill:"none"})}),defaultAttrs:ou,attrsComponent:e=>{var t,n,r;const{id:o,attrs:a,handleAttrsUpdate:s,recalculateParallelIndex:l,parallelIndex:c}=e,{t:d}=$e(),u=vp(),p=md(window.graph,Nc.Diagonal,o),h=c>=0&&p!==o,g=[{type:"select",label:d("panel.details.lines.common.startFrom"),value:a.startFrom,options:{from:d("panel.details.lines.common.from"),to:d("panel.details.lines.common.to")},onChange:e=>{l(o,e),a.startFrom=e,s(o,a)},minW:"full"},{type:"input",label:d("panel.details.lines.common.offsetFrom"),value:(null!==(t=a.offsetFrom)&&void 0!==t?t:ou.offsetFrom).toString(),variant:"number",onChange:e=>{Number.isNaN(e)&&(e="0"),a.offsetFrom=Number(e),s(o,a)},isDisabled:h,minW:"full"},{type:"input",label:d("panel.details.lines.common.offsetTo"),value:(null!==(n=a.offsetTo)&&void 0!==n?n:ou.offsetTo).toString(),variant:"number",onChange:e=>{Number.isNaN(e)&&(e="0"),a.offsetTo=Number(e),s(o,a)},isDisabled:h,minW:"full"},{type:"input",label:d("panel.details.lines.common.roundCornerFactor"),value:(null!==(r=null==a?void 0:a.roundCornerFactor)&&void 0!==r?r:ou.roundCornerFactor).toString(),variant:"number",onChange:e=>{(Number.isNaN(e)||Number(e)<0)&&(e="0"),a.roundCornerFactor=Number(e),s(o,a)},isDisabled:h,minW:"full"}];return h&&g.unshift({type:"custom",label:d("panel.details.lines.common.parallelDisabled"),component:i.jsxs(J,{size:"sm",variant:"link",onClick:()=>u(Gd(new Set([p]))),children:[d("panel.details.lines.common.changeInBaseLine")," ",p]})}),i.jsx(Al,{fields:g})},metadata:{displayName:"panel.details.lines.diagonal.displayName"}},au={startFrom:"from",offsetFrom:0,offsetTo:0,roundCornerFactor:18.33},su={generatePath:(e,t,n,r,o=au)=>{const{startFrom:i=au.startFrom,offsetFrom:a=au.offsetFrom,offsetTo:s=au.offsetTo,roundCornerFactor:l=au.roundCornerFactor}=o,[c,d]="from"===i?[a,s]:[s,a],[u,p,h,g]="from"===i?[0,c,d,0]:[c,0,0,d];return ru(`M ${e+u} ${n+p} L ${"from"===i?t+h:e+u} ${"from"===i?n+p:r+g} L ${t+h} ${r+g}`,l)},icon:i.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:i.jsx("path",{d:"M6,6H18V18",stroke:"currentColor",fill:"none"})}),defaultAttrs:au,attrsComponent:e=>{var t,n,r;const{id:o,attrs:a,handleAttrsUpdate:s,recalculateParallelIndex:l,parallelIndex:c}=e,{t:d}=$e(),u=vp(),p=md(window.graph,Nc.Perpendicular,o),h=c>=0&&p!==o,g=[{type:"select",label:d("panel.details.lines.common.startFrom"),value:a.startFrom,options:{from:d("panel.details.lines.common.from"),to:d("panel.details.lines.common.to")},onChange:e=>{l(o,e),a.startFrom=e,s(o,a)},minW:"full"},{type:"input",label:d("panel.details.lines.common.offsetFrom"),value:(null!==(t=a.offsetFrom)&&void 0!==t?t:au.offsetFrom).toString(),variant:"number",onChange:e=>{Number.isNaN(e)&&(e="0"),a.offsetFrom=Number(e),s(o,a)},isDisabled:h,minW:"full"},{type:"input",label:d("panel.details.lines.common.offsetTo"),value:(null!==(n=a.offsetTo)&&void 0!==n?n:au.offsetTo).toString(),variant:"number",onChange:e=>{Number.isNaN(e)&&(e="0"),a.offsetTo=Number(e),s(o,a)},isDisabled:h,minW:"full"},{type:"input",label:d("panel.details.lines.common.roundCornerFactor"),value:(null!==(r=null==a?void 0:a.roundCornerFactor)&&void 0!==r?r:au.roundCornerFactor).toString(),variant:"number",onChange:e=>{(Number.isNaN(e)||Number(e)<0)&&(e="0"),a.roundCornerFactor=Number(e),s(o,a)},isDisabled:h,minW:"full"}];return h&&g.unshift({type:"custom",label:d("panel.details.lines.common.parallelDisabled"),component:i.jsxs(J,{size:"sm",variant:"link",onClick:()=>u(Gd(new Set([p]))),children:[d("panel.details.lines.common.changeInBaseLine")," ",p]})}),i.jsx(Al,{fields:g})},metadata:{displayName:"panel.details.lines.perpendicular.displayName"}},lu={startFrom:"from",offsetFrom:0,offsetTo:0,roundCornerFactor:18.33},cu={generatePath:(e,t,n,r,o=lu)=>{const{startFrom:i=lu.startFrom,offsetFrom:a=lu.offsetFrom,offsetTo:s=lu.offsetTo,roundCornerFactor:l=lu.roundCornerFactor}=o,[c,d]="from"===i?[a,s]:[s,a],[u,p,h,g]="from"===i?[0,c,d,0]:[c,0,0,d],[f,m,y,b]=[e*Math.SQRT1_2+n*Math.SQRT1_2,-e*Math.SQRT1_2+n*Math.SQRT1_2,t*Math.SQRT1_2+r*Math.SQRT1_2,-t*Math.SQRT1_2+r*Math.SQRT1_2],[v,w,x,S]=[f+u,m+p,y+h,b+g],[k,N,_,R]=[v*Math.SQRT1_2-w*Math.SQRT1_2,v*Math.SQRT1_2+w*Math.SQRT1_2,x*Math.SQRT1_2-S*Math.SQRT1_2,x*Math.SQRT1_2+S*Math.SQRT1_2],T="from"===i?y+h:f+u,C="from"===i?m+p:b+g,[j,O]=[T*Math.SQRT1_2-C*Math.SQRT1_2,T*Math.SQRT1_2+C*Math.SQRT1_2];return ru(`M ${k} ${N} L ${j} ${O} L ${_} ${R}`,l)},icon:i.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:i.jsx("path",{d:"M9,6L15,12L9,18",stroke:"currentColor",fill:"none"})}),defaultAttrs:lu,attrsComponent:e=>{var t,n,r;const{id:o,attrs:a,handleAttrsUpdate:s,recalculateParallelIndex:l,parallelIndex:c}=e,{t:d}=$e(),u=vp(),p=md(window.graph,Nc.RotatePerpendicular,o),h=c>=0&&p!==o,g=[{type:"select",label:d("panel.details.lines.common.startFrom"),value:a.startFrom,options:{from:d("panel.details.lines.common.from"),to:d("panel.details.lines.common.to")},onChange:e=>{l(o,e),a.startFrom=e,s(o,a)},minW:"full"},{type:"input",label:d("panel.details.lines.common.offsetFrom"),value:(null!==(t=a.offsetFrom)&&void 0!==t?t:lu.offsetFrom).toString(),variant:"number",onChange:e=>{Number.isNaN(e)&&(e="0"),a.offsetFrom=Number(e),s(o,a)},isDisabled:h,minW:"full"},{type:"input",label:d("panel.details.lines.common.offsetTo"),value:(null!==(n=a.offsetTo)&&void 0!==n?n:lu.offsetTo).toString(),variant:"number",onChange:e=>{Number.isNaN(e)&&(e="0"),a.offsetTo=Number(e),s(o,a)},isDisabled:h,minW:"full"},{type:"input",label:d("panel.details.lines.common.roundCornerFactor"),value:(null!==(r=null==a?void 0:a.roundCornerFactor)&&void 0!==r?r:lu.roundCornerFactor).toString(),variant:"number",onChange:e=>{(Number.isNaN(e)||Number(e)<0)&&(e="0"),a.roundCornerFactor=Number(e),s(o,a)},isDisabled:h,minW:"full"}];return h&&g.unshift({type:"custom",label:d("panel.details.lines.common.parallelDisabled"),component:i.jsxs(J,{size:"sm",variant:"link",onClick:()=>u(Gd(new Set([p]))),children:[d("panel.details.lines.common.changeInBaseLine")," ",p]})}),i.jsx(Al,{fields:g})},metadata:{displayName:"panel.details.lines.rotatePerpendicular.displayName"}};var du=e("S",(e=>(e.ShmetroBasic="shmetro-basic",e.ShmetroBasic2020="shmetro-basic-2020",e.ShmetroInt="shmetro-int",e.ShmetroOutOfSystemInt="shmetro-osysi",e.ShanghaiSuburbanRailway="sh-sub-rwy",e.GzmtrBasic="gzmtr-basic",e.GzmtrInt="gzmtr-int",e.GzmtrInt2024="gzmtr-int-2024",e.BjsubwayBasic="bjsubway-basic",e.BjsubwayInt="bjsubway-int",e.MTR="mtr",e.SuzhouRTBasic="suzhourt-basic",e.SuzhouRTInt="suzhourt-int",e.KunmingRTBasic="kunmingrt-basic",e.KunmingRTInt="kunmingrt-int",e.MRTBasic="mrt-basic",e.MRTInt="mrt-int",e.JREastBasic="jr-east-basic",e.JREastImportant="jr-east-imp",e.FoshanMetroBasic="foshan-metro-basic",e.QingdaoMetroStation="qingdao-metro-basic",e.TokyoMetroBasic="tokyo-metro-basic",e.TokyoMetroInt="tokyo-metro-int",e.LondonTubeBasic="london-tube-basic",e.LondonTubeInt="london-tube-int",e.GuangdongIntercityRailway="gd-intercity-rwy",e))(du||{}));e("aG",["shmetro-basic-2020","gzmtr-basic","suzhourt-basic","kunmingrt-basic","mrt-basic","foshan-metro-basic","qingdao-metro-basic"]),e("aS",{names:["车站","Stn"]});class uu{static hexToRgb(e){return[parseInt(e.slice(1,3),16),parseInt(e.slice(3,5),16),parseInt(e.slice(5,7),16)]}static fade(e,t){return`rgba(${[...this.hexToRgb(e),t].join(",")})`}static euclideanDistance(e,t){return this.hexToRgb(e).reduce(((e,n,r)=>e+Math.pow(n-this.hexToRgb(t)[r],2)),0)}}function pu(e){return Le({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2z"},child:[]}]})(e)}function hu(e){return Le({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M16 17.01V10h-2v7.01h-3L15 21l4-3.99h-3zM9 3 5 6.99h3V14h2V6.99h3L9 3zm7 14.01V10h-2v7.01h-3L15 21l4-3.99h-3zM9 3 5 6.99h3V14h2V6.99h3L9 3z"},child:[]}]})(e)}function gu(e){const{theme:t,onClick:n}=e,{t:r}=$e();return i.jsx(be,{"aria-label":r("Color"),color:t[3],bg:t[2],size:"md",_hover:{bg:uu.fade(t[2],.7)},icon:i.jsx(pu,{}),onClick:n})}const fu=e("aN",(e=>{var t;const{type:n,colorKey:r="color",defaultTheme:o}=e,a=vp(),{selected:s,paletteAppClip:{output:l}}=wp((e=>e.runtime)),[c]=s,d=Pe.useCallback((()=>{a(Id()),a($d()),a(Ld(u.current.export()))}),[a,Id,$d,Ld]),u=Pe.useRef(window.graph),[p,h,g]=[].concat(Object.values(du)).concat(Object.values(jc)).find((e=>n===e))?[u.current.hasNode,u.current.getNodeAttribute,u.current.mergeNodeAttributes]:[u.current.hasEdge,u.current.getEdgeAttribute,u.current.mergeEdgeAttributes],[f,m]=Pe.useState(!1);Pe.useEffect((()=>{f&&l&&((e=>{if(c&&p.bind(u.current)(c)){const t=h.bind(u.current)(c,n);t[r]=e,g.bind(u.current)(c,{[n]:t}),d()}})(l),m(!1))}),[null==l?void 0:l.toString()]);const y=c&&p.bind(u.current)(c)&&(c.startsWith("stn")||c.startsWith("misc_node")?u.current.getNodeAttribute(c,"type")===n:u.current.getEdgeAttribute(c,"style")===n)?(null!==(t=h.bind(u.current)(c,n))&&void 0!==t?t:{[r]:o})[r]:o;return i.jsx(i.Fragment,{children:i.jsx(gu,{theme:y,onClick:()=>{m(!0),a(Qd(y))}})})})),mu={color:[ic.Shanghai,"sh1","#E4002B",pc.white]},yu=e("ax",{component:e=>{const{id:t,path:n,styleAttrs:r,newLine:o,handlePointerDown:a}=e,{color:s=mu.color}=null!=r?r:mu,l=Pe.useCallback((e=>a(t,e)),[t,a]);return i.jsx("path",{id:t,d:n,fill:"none",stroke:s[2],strokeWidth:"5",strokeLinecap:"round",cursor:"pointer",onPointerDown:o?void 0:l,pointerEvents:o?"none":void 0})},defaultAttrs:mu,attrsComponent:e=>{const t=[{type:"custom",label:"color",component:i.jsx(fu,{type:_c.SingleColor,defaultTheme:mu.color})}];return i.jsx(Al,{fields:t})},metadata:{displayName:"panel.details.lines.singleColor.displayName",supportLinePathType:[Nc.Diagonal,Nc.Perpendicular,Nc.RotatePerpendicular]}}),bu={component:e=>{const{id:t,path:n,handlePointerDown:r}=e,o=Pe.useCallback((e=>r(t,e)),[t,r]);return i.jsxs("g",{id:t,onPointerDown:o,cursor:"pointer",children:[i.jsx("path",{d:n,fill:"none",stroke:"black",strokeWidth:"7",strokeLinecap:"round"}),i.jsx("path",{d:n,fill:"none",stroke:"white",strokeWidth:"4.33",strokeLinecap:"round"})]})},defaultAttrs:{},attrsComponent:()=>{},metadata:{displayName:"panel.details.lines.shmetroVirtualInt.displayName",supportLinePathType:[Nc.Diagonal,Nc.Perpendicular,Nc.RotatePerpendicular,Nc.Simple]}},vu={isEnd:!1},wu={component:e=>{const{id:t,path:n,styleAttrs:r,handlePointerDown:o}=e,{isEnd:a=vu.isEnd}=r,s=Pe.useCallback((e=>o(t,e)),[t,o]),l=a?"round":void 0;return i.jsxs("g",{id:t,onPointerDown:s,cursor:"pointer",children:[i.jsx("path",{d:n,fill:"none",stroke:"#898989",strokeWidth:"5",strokeLinecap:l}),i.jsx("path",{d:n,fill:"none",stroke:"white",strokeWidth:"2",strokeLinecap:"round"})]})},defaultAttrs:vu,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:r}=e,{t:o}=$e(),a=[{type:"switch",label:o("panel.details.lines.shanghaiSuburbanRailway.isEnd"),isChecked:n.isEnd,onChange:e=>{n.isEnd=e,r(t,n)},oneLine:!0,minW:"full"}];return i.jsx(Al,{fields:a})},metadata:{displayName:"panel.details.lines.shanghaiSuburbanRailway.displayName",supportLinePathType:[Nc.Diagonal,Nc.Perpendicular,Nc.RotatePerpendicular]}},xu={component:e=>{const{id:t,path:n,handlePointerDown:r}=e,o=Pe.useCallback((e=>r(t,e)),[t,r]);return i.jsx("path",{id:t,d:n,fill:"none",stroke:"#565656",strokeWidth:"3",strokeDasharray:"3",cursor:"pointer",onPointerDown:o})},defaultAttrs:{},attrsComponent:()=>null,metadata:{displayName:"panel.details.lines.gzmtrVirtualInt.displayName",supportLinePathType:[Nc.Diagonal,Nc.Perpendicular,Nc.RotatePerpendicular,Nc.Simple]}},Su={color:[ic.Shanghai,"jsr","#000000",pc.white]},ku={component:e=>{const{id:t,path:n,styleAttrs:r,handlePointerDown:o}=e,{color:a=Su.color}=null!=r?r:Su,s=Pe.useCallback((e=>o(t,e)),[t,o]);return i.jsxs("g",{id:t,onPointerDown:s,cursor:"pointer",children:[i.jsx("path",{d:n,fill:"none",stroke:a[2],strokeWidth:"5",strokeLinecap:"round"}),i.jsx("path",{d:n,fill:"none",stroke:a[3],strokeWidth:"4.67",strokeDasharray:"17.5"})]})},defaultAttrs:Su,attrsComponent:e=>{const{t:t}=$e(),n=[{type:"custom",label:t("color"),component:i.jsx(fu,{type:_c.ChinaRailway,defaultTheme:Su.color})}];return i.jsx(Al,{fields:n})},metadata:{displayName:"panel.details.lines.chinaRailway.displayName",supportLinePathType:[Nc.Diagonal,Nc.Perpendicular,Nc.RotatePerpendicular]}},Nu={color:[ic.Beijing,"bj1","#c23a30",pc.white]},_u={component:e=>{const{id:t,path:n,styleAttrs:r,handlePointerDown:o}=e,{color:a=Nu.color}=null!=r?r:Nu,s=Pe.useCallback((e=>o(t,e)),[t,o]);return i.jsxs("g",{id:t,onPointerDown:s,cursor:"pointer",children:[i.jsx("path",{d:n,fill:"none",stroke:"white",strokeWidth:"6",strokeLinecap:"round"}),i.jsx("path",{d:n,fill:"none",stroke:a[2],strokeWidth:"5",strokeLinecap:"round"})]})},defaultAttrs:Nu,attrsComponent:e=>{$e();const t=[{type:"custom",label:"color",component:i.jsx(fu,{type:_c.BjsubwaySingleColor,defaultTheme:Nu.color})}];return i.jsx(Al,{fields:t})},metadata:{displayName:"panel.details.lines.bjsubwaySingleColor.displayName",supportLinePathType:[Nc.Diagonal,Nc.Perpendicular,Nc.RotatePerpendicular]}},Ru=e("aM",(e=>{const{t:t}=$e(),n=vp(),{selected:r}=wp((e=>e.runtime)),[o]=r,a=Pe.useRef(window.graph),s=[];if(1===r.size&&a.current.hasNode(o)){const r=a.current.getNodeAttribute(o,"type"),i=a.current.getNodeAttribute(o,r);s.push(...e.fields.filter((e=>"custom"!==e.type)).map((e=>{var s,l,c;return{type:e.type,label:t(e.label),value:null===(s=e.value)||void 0===s?void 0:s.call(e,i),isChecked:null===(l=e.isChecked)||void 0===l?void 0:l.call(e,i),hidden:null===(c=e.hidden)||void 0===c?void 0:c.call(e,i),options:e.options,disabledOptions:e.disabledOptions&&e.disabledOptions(i),validator:e.validator,oneLine:e.oneLine,onChange:s=>{let l;try{l=e.onChange(s,i)}catch(c){return void n(eu({status:"error",message:t(`err-code.${c}`)}))}a.current.mergeNodeAttributes(o,{[r]:l}),n(Id()),n(Ld(a.current.export()))}}})),...e.fields.filter((e=>"custom"===e.type)).map((e=>({...e,label:t(e.label)}))))}if(1===r.size&&a.current.hasEdge(o)&&"style"!==e.type){const r=a.current.getEdgeAttribute(o,"type"),i=a.current.getEdgeAttribute(o,r);s.push(...e.fields.map((e=>({type:e.type,label:t(e.label),value:e.value(i),options:e.options,disabledOptions:e.disabledOptions&&e.disabledOptions(i),validator:e.validator,onChange:t=>{a.current.mergeEdgeAttributes(o,{[r]:e.onChange(t,i)}),n($d()),n(Ld(a.current.export()))}}))))}if(1===r.size&&a.current.hasEdge(o)&&"style"===e.type){const r=a.current.getEdgeAttribute(o,"style"),i=a.current.getEdgeAttribute(o,r);s.push(...e.fields.filter((e=>"custom"!==e.type)).map((e=>({type:e.type,label:t(e.label),value:e.value(i),options:e.options,disabledOptions:e.disabledOptions&&e.disabledOptions(i),validator:e.validator,onChange:t=>{a.current.mergeEdgeAttributes(o,{[r]:e.onChange(t,i)}),n($d()),n(Ld(a.current.export()))}}))),...e.fields.filter((e=>"custom"===e.type)).map((e=>({...e,label:t(e.label)}))))}return i.jsx(Al,{fields:s,minW:276})})),Tu={color:[ic.Beijing,"bj1","#c23a30",pc.white]},Cu=[{type:"custom",label:"color",component:i.jsx(fu,{type:_c.BjsubwayTram,defaultTheme:Tu.color})}],ju={component:e=>{const{id:t,path:n,styleAttrs:r,handlePointerDown:o}=e,{color:a=Tu.color}=null!=r?r:Tu,s=Pe.useCallback((e=>o(t,e)),[t,o]);return i.jsxs("g",{id:t,onPointerDown:s,cursor:"pointer",children:[i.jsx("path",{d:n,fill:"none",stroke:a[2],strokeWidth:"5"}),i.jsx("path",{d:n,fill:"none",stroke:"white",strokeWidth:"1.67"})]})},defaultAttrs:Tu,attrsComponent:()=>i.jsx(Ru,{fields:Cu,type:"style"}),metadata:{displayName:"panel.details.lines.bjsubwayTram.displayName",supportLinePathType:[Nc.Diagonal,Nc.Perpendicular,Nc.RotatePerpendicular]}},Ou={colorA:[ic.Shanghai,"maglevA","#008B9A",pc.white],colorB:[ic.Shanghai,"maglevB","#F5A74E",pc.white]},Lu=()=>{const{t:e}=$e(),t=vp(),{selected:n}=wp((e=>e.runtime)),[r]=n,o=Pe.useRef(window.graph);return i.jsx(be,{"aria-label":e("panel.details.lines.dualColor.swap"),icon:i.jsx(hu,{}),size:"sm",onClick:()=>{var e;const n=null!==(e=o.current.getEdgeAttribute(r,_c.DualColor))&&void 0!==e?e:Ou,i=n.colorA;n.colorA=n.colorB,n.colorB=i,o.current.mergeEdgeAttributes(r,{[_c.DualColor]:n}),t($d()),t(Ld(o.current.export()))}})},Au={component:e=>{const{id:t,type:n,path:r,styleAttrs:o,handlePointerDown:a}=e,{colorA:s=Ou.colorA,colorB:l=Ou.colorB}=null!=o?o:Ou,c=Pe.useCallback((e=>a(t,e)),[t,a]),[d,u]=Pe.useState(r),[p,h]=Pe.useState(r);return Pe.useEffect((()=>{const e=ld(r,n,-1.25,1.25);e&&(u(e[0]),h(e[1]))}),[r]),i.jsxs("g",{id:t,onPointerDown:c,cursor:"pointer",children:[i.jsx("path",{d:d,fill:"none",stroke:s[2],strokeWidth:"2.5",strokeLinecap:"round"}),i.jsx("path",{d:p,fill:"none",stroke:l[2],strokeWidth:"2.5",strokeLinecap:"round"})]})},defaultAttrs:Ou,attrsComponent:e=>{const t=[{type:"custom",label:"panel.details.lines.dualColor.swap",component:i.jsx(Lu,{})},{type:"custom",label:"panel.details.lines.dualColor.colorA",component:i.jsx(fu,{type:_c.DualColor,colorKey:"colorA",defaultTheme:Ou.colorA})},{type:"custom",label:"panel.details.lines.dualColor.colorB",component:i.jsx(fu,{type:_c.DualColor,colorKey:"colorB",defaultTheme:Ou.colorB})}];return i.jsx(Al,{fields:t})},metadata:{displayName:"panel.details.lines.dualColor.displayName",supportLinePathType:[Nc.Diagonal,Nc.Perpendicular,Nc.RotatePerpendicular]}},Eu={color:[ic.Shanghai,"river","#B9E3F9",pc.white],width:20},Mu=[{type:"input",label:"panel.details.lines.river.width",variant:"number",value:e=>(null!=e?e:Eu).width,onChange:(e,t)=>{const n=null!=t?t:Eu;return n.width=Number(e),n}}],Pu={component:e=>{const{id:t,path:n,styleAttrs:r,handlePointerDown:o}=e,{color:a=Eu.color,width:s=Eu.width}=null!=r?r:Eu,l=Pe.useCallback((e=>o(t,e)),[t,o]);return i.jsx("path",{id:t,d:n,fill:"none",stroke:a[2],strokeWidth:s,strokeLinecap:"round",cursor:"pointer",onPointerDown:l})},defaultAttrs:Eu,attrsComponent:()=>i.jsx(Ru,{fields:Mu,type:"style"}),metadata:{displayName:"panel.details.lines.river.displayName",supportLinePathType:[Nc.Diagonal,Nc.Perpendicular,Nc.RotatePerpendicular,Nc.Simple]}},Iu={color:[ic.Hongkong,"twl","#E2231A",pc.white]},$u=[{type:"custom",label:"color",component:i.jsx(fu,{type:_c.MTRRaceDays,defaultTheme:Iu.color})}],zu={component:e=>{const{id:t,path:n,styleAttrs:r,handlePointerDown:o}=e,{color:a=Iu.color}=null!=r?r:Iu,s=Pe.useCallback((e=>o(t,e)),[t,o]);return i.jsx("path",{id:t,d:n,fill:"none",stroke:a[2],strokeWidth:"5",strokeLinecap:"butt",strokeDasharray:"5 2.5",cursor:"pointer",onPointerDown:s})},defaultAttrs:Iu,attrsComponent:()=>i.jsx(Ru,{fields:$u,type:"style"}),metadata:{displayName:"panel.details.lines.mtrRaceDays.displayName",supportLinePathType:[Nc.Diagonal,Nc.Perpendicular,Nc.RotatePerpendicular]}},Bu={color:[ic.Hongkong,"lrl","#CD9700",pc.white]},Du=[{type:"custom",label:"color",component:i.jsx(fu,{type:_c.MTRLightRail,defaultTheme:Bu.color})}],Gu={component:e=>{const{id:t,path:n,styleAttrs:r,handlePointerDown:o}=e,{color:a=Bu.color}=null!=r?r:Bu,s=Pe.useCallback((e=>o(t,e)),[t,o]);return i.jsx("path",{id:t,d:n,fill:"none",stroke:a[2],strokeWidth:"2.5",strokeLinecap:"round",cursor:"pointer",onPointerDown:s})},defaultAttrs:Bu,attrsComponent:()=>i.jsx(Ru,{fields:Du,type:"style"}),metadata:{displayName:"panel.details.lines.mtrLightRail.displayName",supportLinePathType:[Nc.Diagonal,Nc.Perpendicular,Nc.RotatePerpendicular]}},Fu={component:e=>{const{id:t,path:n,handlePointerDown:r}=e,o=Pe.useCallback((e=>r(t,e)),[t,r]);return i.jsx("path",{id:t,d:n,fill:"none",stroke:"black",strokeWidth:"1.33",strokeDasharray:"2.66 1.33",cursor:"pointer",onPointerDown:o})},defaultAttrs:{},attrsComponent:()=>{},metadata:{displayName:"panel.details.lines.mtrUnpaidArea.displayName",supportLinePathType:[Nc.Diagonal,Nc.Perpendicular,Nc.RotatePerpendicular,Nc.Simple]}},Uu={component:e=>{const{id:t,path:n,handlePointerDown:r}=e,o=Pe.useCallback((e=>r(t,e)),[t,r]);return i.jsx("path",{id:t,d:n,fill:"none",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",cursor:"pointer",onPointerDown:o})},defaultAttrs:{},attrsComponent:()=>i.jsx(Ru,{fields:[],type:"style"}),metadata:{displayName:"panel.details.lines.mtrPaidArea.displayName",supportLinePathType:[Nc.Diagonal,Nc.Perpendicular,Nc.RotatePerpendicular,Nc.Simple]}},Wu={color:[ic.Beijing,"bj1","#c23a30",pc.white]},Vu={component:e=>{const{id:t,path:n,styleAttrs:r,handlePointerDown:o}=e,{color:a=Wu.color}=null!=r?r:Wu,s=Pe.useCallback((e=>o(t,e)),[t,o]),l=ce("white","var(--chakra-colors-gray-800)");return i.jsxs("g",{id:t,onPointerDown:s,cursor:"pointer",children:[i.jsx("path",{d:n,fill:"none",stroke:a[2],strokeWidth:"5",strokeDasharray:"2 2"}),i.jsx("path",{d:n,fill:"none",stroke:l,strokeWidth:"3.4"})]})},defaultAttrs:Wu,attrsComponent:e=>{$e();const t=[{type:"custom",label:"color",component:i.jsx(fu,{type:_c.BjsubwayDotted,defaultTheme:Wu.color})}];return i.jsx(Al,{fields:t})},metadata:{displayName:"panel.details.lines.bjsubwayDotted.displayName",supportLinePathType:[Nc.Diagonal,Nc.Perpendicular,Nc.RotatePerpendicular]}},Hu={color:[ic.Singapore,"ewl","#009739",pc.white]},Ju={component:e=>{const{id:t,path:n,styleAttrs:r,handlePointerDown:o}=e,{color:a=Hu.color}=null!=r?r:Hu,s=Pe.useCallback((e=>o(t,e)),[t,o]);return i.jsx("path",{id:t,d:n,fill:"none",stroke:a[2],strokeWidth:"5",strokeDasharray:"0 10",strokeLinecap:"round",cursor:"pointer",onPointerDown:s})},defaultAttrs:Hu,attrsComponent:e=>{$e();const t=[{type:"custom",label:"color",component:i.jsx(fu,{type:_c.MRTUnderConstruction,defaultTheme:Hu.color})}];return i.jsx(Al,{fields:t})},metadata:{displayName:"panel.details.lines.mrtUnderConstruction.displayName",supportLinePathType:[Nc.Diagonal,Nc.Perpendicular,Nc.RotatePerpendicular]}},qu={component:e=>{const{id:t,path:n,handlePointerDown:r}=e,o=Pe.useCallback((e=>r(t,e)),[t,r]);return i.jsx("path",{id:t,d:n,fill:"none",stroke:"black",strokeWidth:"5",strokeDasharray:"0 10 10 10",strokeLinecap:"round",cursor:"pointer",onPointerDown:o})},defaultAttrs:{},attrsComponent:e=>null,metadata:{displayName:"panel.details.lines.mrtSentosaExpress.displayName",supportLinePathType:[Nc.Diagonal,Nc.Perpendicular,Nc.RotatePerpendicular]}},Ku={color:[ic.Tokyo,"jy","#9ACD32",pc.black]},Yu={component:e=>{const{id:t,path:n,styleAttrs:r,newLine:o,handlePointerDown:a}=e,{color:s=Ku.color}=null!=r?r:Ku,l=Pe.useCallback((e=>a(t,e)),[t,a]);return i.jsxs("g",{id:t,onPointerDown:l,cursor:"pointer",children:[i.jsx("path",{d:n,fill:"none",stroke:"black",strokeWidth:"5.1"}),i.jsx("path",{d:n,fill:"none",stroke:s[2],strokeWidth:"4.9"})]})},defaultAttrs:Ku,attrsComponent:e=>{const{t:t}=$e(),n=[{type:"custom",label:t("color"),component:i.jsx(fu,{type:_c.JREastSingleColor,defaultTheme:Ku.color})}];return i.jsx(Al,{fields:n})},metadata:{displayName:"panel.details.lines.jrEastSingleColor.displayName",supportLinePathType:[Nc.Diagonal,Nc.Perpendicular,Nc.RotatePerpendicular]}},Qu=5*Math.SQRT1_2,Zu=.25,Xu=(Qu*Math.SQRT2-Zu)/2*Math.SQRT2,ep={color:[ic.Tokyo,"jy","#9ACD32",pc.black]},tp={component:e=>{const{id:t,type:n,path:r,styleAttrs:o,newLine:a,handlePointerDown:s}=e,{color:l=ep.color}=null!=o?o:ep,c=Pe.useCallback((e=>s(t,e)),[t,s]),[d,u]=Pe.useState({outline:r,pA:r,pB:r});return Pe.useEffect((()=>{const e=((e,t,n,r)=>{var o;r=null!==(o=r)&&void 0!==o?o:-n;const[i,a]=cd(e);if(!i||!a)return;if(i[0]===a[0]||i[1]===a[1]||t===Nc.Diagonal&&Math.abs(i[1]-a[1])===Math.abs(i[0]-a[0])){const e=Math.abs(n),[t,r]=dd(i,a,e);return{outline:ud(i,a,e),pA:t,pB:r}}const[s,l]=pd(e);if(!s||!l)return;const c=new sd([...s,...l]),[d,u]=[c.scale(n),c.scale(r)],p=gd(i,s,a,c,d,u);if(!p)return;const{mA:[h,g],mB:[f,m],endA:[y,b],endB:[v,w]}=p,[x,S]=pd(u.toSVG().replace("M","L")),[k,N]=hd(x,S);return{outline:`M ${h} ${g} ${d.toSVG().replace("M","L")} L ${y} ${b} L ${v} ${w} L ${k.join(" ")} C ${N.join(" ")} L ${f} ${m} Z`,pA:`M ${h} ${g} ${d.toSVG().replace("M","L")} L ${y} ${b}`,pB:`M ${f} ${m} ${u.toSVG().replace("M","L")} L ${v} ${w}`}})(r,n,-2.5,2.5);e&&u(e)}),[r]),i.jsxs("g",{id:t,onPointerDown:c,cursor:"pointer",children:[i.jsxs("defs",{children:[i.jsxs("clipPath",{id:"jr_east_fill_pattern_clip_path",patternUnits:"userSpaceOnUse",children:[i.jsx("polygon",{points:`0,0 0,${Xu} ${Xu},0`}),i.jsx("polygon",{points:`${Qu},${Qu} ${Qu-Xu},${Qu} ${Qu},${Qu-Xu}`})]}),i.jsxs("pattern",{id:`jr_east_${t}_fill_pattern_${l[2]}`,width:Qu,height:Qu,patternUnits:"userSpaceOnUse",children:[i.jsx("rect",{width:Qu,height:Qu,fill:l[2]}),i.jsx("line",{x1:"0",y1:"0",x2:Qu,y2:Qu,stroke:"white",strokeWidth:Zu,strokeOpacity:"50%",clipPath:"url(#jr_east_fill_pattern_clip_path)"}),i.jsx("line",{x1:Qu,y1:"0",x2:"0",y2:Qu,stroke:"white",strokeWidth:Zu,strokeOpacity:"50%"})]})]}),i.jsx("path",{d:d.outline,fill:`url(#jr_east_${t}_fill_pattern_${l[2]})`}),i.jsx("path",{d:d.pA,fill:"none",stroke:"black",strokeWidth:"0.1"}),i.jsx("path",{d:d.pB,fill:"none",stroke:"black",strokeWidth:"0.1"})]})},defaultAttrs:ep,attrsComponent:e=>{const{t:t}=$e(),n=[{type:"custom",label:t("color"),component:i.jsx(fu,{type:_c.JREastSingleColorPattern,defaultTheme:ep.color})}];return i.jsx(Al,{fields:n})},metadata:{displayName:"panel.details.lines.jrEastSingleColorPattern.displayName",supportLinePathType:[Nc.Diagonal,Nc.Perpendicular,Nc.RotatePerpendicular]}},np={color:[ic.Singapore,"lrt","#708573",pc.white]},rp={component:e=>{const{id:t,path:n,styleAttrs:r,handlePointerDown:o}=e,{color:a=np.color}=null!=r?r:np,s=Pe.useCallback((e=>o(t,e)),[t,o]);return i.jsx("path",{id:t,d:n,fill:"none",stroke:a[2],strokeWidth:"2.157",strokeLinecap:"round",cursor:"pointer",onPointerDown:s})},defaultAttrs:np,attrsComponent:e=>{const t=[{type:"custom",label:"color",component:i.jsx(fu,{type:_c.LRTSingleColor,defaultTheme:np.color})}];return i.jsx(Al,{fields:t})},metadata:{displayName:"panel.details.lines.lrtSingleColor.displayName",supportLinePathType:[Nc.Diagonal,Nc.Perpendicular,Nc.RotatePerpendicular]}},op=(e,t)=>{if(e===du.LondonTubeBasic){var n;const{stepFreeAccess:e}=null!==(n=t[du.LondonTubeBasic])&&void 0!==n?n:{stepFreeAccess:"none"};if("none"!==e)return 7.5}if(e===du.LondonTubeInt){var r;const{stepFreeAccess:e}=null!==(r=t[du.LondonTubeInt])&&void 0!==r?r:{stepFreeAccess:"none"};if("none"!==e)return 7.5}return 5},ip={component:e=>{const{id:t,path:n,handlePointerDown:r}=e,o=Pe.useCallback((e=>r(t,e)),[t,r]);return i.jsx("g",{id:t,onPointerDown:o,cursor:"pointer",children:i.jsx("path",{d:n,fill:"none",stroke:"black",strokeWidth:"7.5",strokeLinecap:"round"})})},postComponent:e=>{const{id:t,path:n,handlePointerDown:r}=e,o=Pe.useCallback((e=>r(t,e)),[t,r]),[a,s]=window.graph.extremities(t),l=window.graph.getNodeAttribute(a,"x"),c=window.graph.getNodeAttribute(a,"y"),d=window.graph.getNodeAttribute(s,"x"),u=window.graph.getNodeAttribute(s,"y"),p=Math.min(l,d)-10,h=Math.min(c,u)-10,g=Math.abs(l-d)+20,f=Math.abs(c-u)+20,m=op(window.graph.getNodeAttribute(a,"type"),window.graph.getNodeAttributes(a)),y=op(window.graph.getNodeAttribute(s,"type"),window.graph.getNodeAttributes(s));return i.jsxs("g",{id:`${t}.post`,onPointerDown:o,cursor:"pointer",children:[i.jsxs("mask",{id:`tube_stn_icon_inner_${t}`,x:p,y:h,width:g,height:f,maskUnits:"userSpaceOnUse",children:[i.jsx("rect",{x:p,y:h,width:g,height:f,fill:"white"}),i.jsx("circle",{cx:l,cy:c,r:m-.05,fill:"black"}),i.jsx("circle",{cx:d,cy:u,r:y-.05,fill:"black"})]}),i.jsx("path",{d:n,fill:"none",stroke:"white",strokeWidth:"2.5",strokeLinecap:"round",mask:`url(#tube_stn_icon_inner_${t})`})]})},defaultAttrs:{},attrsComponent:()=>{},metadata:{displayName:"panel.details.lines.londonTubeInternalInt.displayName",supportLinePathType:[Nc.Diagonal,Nc.Perpendicular,Nc.RotatePerpendicular]}},ap={component:e=>{const{id:t,path:n,handlePointerDown:r}=e,o=Pe.useCallback((e=>r(t,e)),[t,r]);return i.jsx("path",{d:n,fill:"none",stroke:"black",strokeWidth:"5",strokeDasharray:"5 2.5",cursor:"pointer",onPointerDown:o})},defaultAttrs:{},attrsComponent:()=>{},metadata:{displayName:"panel.details.lines.londonTube10MinWalk.displayName",supportLinePathType:[Nc.Diagonal,Nc.Perpendicular,Nc.RotatePerpendicular]}},sp={color:[ic.London,"central","#DC241F",pc.white]},lp={component:e=>{const{id:t,path:n,styleAttrs:r,handlePointerDown:o}=e,{color:a=sp.color}=null!=r?r:sp,s=Pe.useCallback((e=>o(t,e)),[t,o]);return i.jsx("path",{id:t,d:n,fill:"none",stroke:a[2],strokeWidth:"5",cursor:"pointer",onPointerDown:s})},defaultAttrs:sp,attrsComponent:e=>{const{t:t}=$e(),n=[{type:"custom",label:t("color"),component:i.jsx(fu,{type:_c.LondonTubeTerminal,defaultTheme:sp.color})}];return i.jsx(Al,{fields:n})},metadata:{displayName:"panel.details.lines.londonTubeTerminal.displayName",supportLinePathType:[Nc.Diagonal,Nc.Perpendicular,Nc.RotatePerpendicular]}},cp={color:[ic.Guangzhou,"ir","#2559a8",pc.white]},dp={component:e=>{const{id:t,path:n,styleAttrs:r,handlePointerDown:o}=e,{color:a=cp.color}=null!=r?r:cp;console.log(r);const s=Pe.useCallback((e=>o(t,e)),[t,o]);return i.jsxs("g",{id:t,onPointerDown:s,cursor:"pointer",children:[i.jsx("path",{d:n,fill:"none",stroke:a[2],strokeWidth:"5",strokeLinecap:"round"}),i.jsx("path",{d:n,fill:"none",stroke:a[3],strokeWidth:"2.5",strokeDasharray:"7.5"})]})},defaultAttrs:cp,attrsComponent:()=>{},metadata:{displayName:"panel.details.lines.guangdongIntercityRailway.displayName",supportLinePathType:[Nc.Diagonal,Nc.Perpendicular,Nc.RotatePerpendicular]}},up=e("l",{[Nc.Diagonal]:iu,[Nc.Perpendicular]:su,[Nc.RotatePerpendicular]:cu,[Nc.Simple]:Tc}),pp=e("ap",{[_c.SingleColor]:yu,[_c.ShmetroVirtualInt]:bu,[_c.ShanghaiSuburbanRailway]:wu,[_c.GzmtrVirtualInt]:xu,[_c.ChinaRailway]:ku,[_c.BjsubwaySingleColor]:_u,[_c.BjsubwayTram]:ju,[_c.BjsubwayDotted]:Vu,[_c.DualColor]:Au,[_c.River]:Pu,[_c.MTRRaceDays]:zu,[_c.MTRLightRail]:Gu,[_c.MTRUnpaidArea]:Fu,[_c.MTRPaidArea]:Uu,[_c.MRTUnderConstruction]:Ju,[_c.MRTSentosaExpress]:qu,[_c.JREastSingleColor]:Yu,[_c.JREastSingleColorPattern]:tp,[_c.LRTSingleColor]:rp,[_c.LondonTubeTerminal]:lp,[_c.LondonTubeInternalInt]:ip,[_c.LondonTube10MinWalk]:ap,[_c.GuangdongIntercityRailway]:dp}),hp=e("I",(async()=>JSON.stringify((await Po((async()=>{const{default:e}=await n.import("./tutorial-legacy-DHxnaVOs.js");return{default:e}}))).default))),gp=e("x",(async e=>{let t=!1;e||(e=await hp(),t=!0);let n=JSON.parse(e);"version"in n&&Number.isInteger(n.version)||(n=JSON.parse(await hp()),t=!0);let r=Number(n.version),o=JSON.stringify(n);for(;r in mp;)o=mp[r](o),r=Number(JSON.parse(o).version),t=!0;return t&&(console.warn(`Upgrade save from version: ${n.version} to version: ${r}`),localStorage.setItem(oc.PARAM_BACKUP,e)),o})),fp=e("s",(e=>{const{present:t,past:n,future:r,...o}=e,i={...o,graph:t,version:42};return JSON.stringify(i)})),mp={0:e=>{var t;return JSON.stringify({version:1,graph:null===(t=JSON.parse(e))||void 0===t?void 0:t.graph,svgViewBoxZoom:100,svgViewBoxMin:{x:0,y:0}})},1:e=>{const t=JSON.parse(e),n=new Oo;return n.import(null==t?void 0:t.graph),n.filterNodes(((e,t)=>e.startsWith("stn")&&t.type!==du.GzmtrInt)).forEach((e=>{const t=n.getNodeAttribute(e,"type"),r=n.getNodeAttribute(e,t);r&&"transfer"in r&&delete r.transfer,n.mergeNodeAttributes(e,{[t]:r})})),JSON.stringify({...t,version:2,graph:n.export()})},2:e=>{const t=JSON.parse(e),n=new Oo;return n.import(null==t?void 0:t.graph),n.filterNodes(((e,t)=>e.startsWith("stn"))).forEach((e=>{const t=n.getNodeAttribute(e,"type"),r=n.getNodeAttribute(e,t);"middle"===(null==r?void 0:r.nameOffsetX)&&"middle"===(null==r?void 0:r.nameOffsetY)&&(r.nameOffsetX="right",r.nameOffsetY="top"),"up"===(null==r?void 0:r.nameOffsetY)&&(r.nameOffsetY="top"),n.mergeNodeAttributes(e,{[t]:r})})),JSON.stringify({...t,version:3,graph:n.export()})},3:e=>{const t=JSON.parse(e),n=new Oo;return n.import(null==t?void 0:t.graph),n.filterEdges(((e,t,n,r,o,i,a)=>e.startsWith("line"))).forEach((e=>{const t=n.getEdgeAttribute(e,"color");n.removeEdgeAttribute(e,"color"),n.mergeEdgeAttributes(e,{style:_c.SingleColor,[_c.SingleColor]:{color:t}})})),n.filterEdges(((e,t,n,r,o,i,a)=>e.startsWith("misc_edge"))).forEach((e=>{const t=`line_${kc(10)}`,[r,o]=n.extremities(e),i=n.getEdgeAttribute(e,"type"),a=i;n.addDirectedEdgeWithKey(t,r,o,{visible:!0,zIndex:0,type:Nc.Simple,[i]:structuredClone(up[Nc.Simple].defaultAttrs),style:a,[a]:structuredClone(pp[a].defaultAttrs),reconcileId:""}),n.dropEdge(e)})),JSON.stringify({...t,version:4,graph:n.export()})},4:e=>{const t=JSON.parse(e),n=new Oo;return n.import(null==t?void 0:t.graph),n.filterNodes(((e,t)=>e.startsWith("stn")&&(t.type===du.GzmtrBasic||t.type===du.GzmtrInt))).forEach((e=>{const t=n.getNodeAttribute(e,"type"),r=n.getNodeAttribute(e,t);r.open=!0,r.secondaryNames=["",""],n.mergeNodeAttributes(e,{[t]:r})})),JSON.stringify({...t,version:5,graph:n.export()})},5:e=>{const t=JSON.parse(e),n=new Oo;return n.import(null==t?void 0:t.graph),n.filterEdges(((e,t,n,r,o,i,a)=>e.startsWith("line")&&t.type===Nc.Simple)).forEach((e=>{var t;const r=null!==(t=n.getEdgeAttribute(e,Nc.Simple))&&void 0!==t?t:{offset:0};r.offset=0,n.mergeEdgeAttributes(e,{[Nc.Simple]:r})})),JSON.stringify({...t,version:6,graph:n.export()})},6:e=>{const t=JSON.parse(e),n=new Oo;return n.import(null==t?void 0:t.graph),n.filterNodes(((e,t)=>e.startsWith("stn")&&t.type===du.GzmtrBasic)).forEach((e=>{const t=n.getNodeAttribute(e,"type"),r=n.getNodeAttribute(e,t);r.tram=!1,n.mergeNodeAttributes(e,{[t]:r})})),JSON.stringify({...t,version:7,graph:n.export()})},7:e=>JSON.stringify({...JSON.parse(e),version:8}),8:e=>JSON.stringify({...JSON.parse(e),version:9}),9:e=>JSON.stringify({...JSON.parse(e),version:10}),10:e=>{const t=JSON.parse(e),n=new Oo;return n.import(null==t?void 0:t.graph),n.filterNodes(((e,t)=>e.startsWith("misc_node")&&t.type===jc.Text)).forEach((e=>{const t=n.getNodeAttribute(e,"type"),r=n.getNodeAttribute(e,t);r.color=[ic.Shanghai,"jsr","#000000",pc.white],n.mergeNodeAttributes(e,{[t]:r})})),JSON.stringify({...t,version:11,graph:n.export()})},11:e=>JSON.stringify({...JSON.parse(e),version:12}),12:e=>{const t=JSON.parse(e),n=new Oo;return n.import(null==t?void 0:t.graph),n.filterNodes(((e,t)=>e.startsWith("misc_node")&&t.type===jc.Text)).forEach((e=>{const t=n.getNodeAttribute(e,"type"),r=n.getNodeAttribute(e,t);r.rotate=0,r.italic=!1,n.mergeNodeAttributes(e,{[t]:r})})),JSON.stringify({...t,version:13,graph:n.export()})},13:e=>JSON.stringify({...JSON.parse(e),version:14}),14:e=>JSON.stringify({...JSON.parse(e),version:15}),15:e=>{const t=JSON.parse(e),n=new Oo;return n.import(null==t?void 0:t.graph),n.filterNodes(((e,t)=>e.startsWith("misc_node")&&t.type===jc.Text)).forEach((e=>{const t=n.getNodeAttribute(e,"type"),r=n.getNodeAttribute(e,t);r.italic=r.italic?"italic":"normal",r.bold="normal",n.mergeNodeAttributes(e,{[t]:r})})),JSON.stringify({...t,version:16,graph:n.export()})},16:e=>{const t=JSON.parse(e),n=new Oo;return n.import(null==t?void 0:t.graph),n.filterNodes(((e,t)=>e.startsWith("misc_node")&&t.type===jc.Facilities)).forEach((e=>{const t=n.getNodeAttribute(e,"type"),r=n.getNodeAttribute(e,t);let o=0;switch(r.type){case"airport":case"maglev":case"disney":case"railway":o+=12.5;break;case"hsr":case"airport_hk":case"disney_hk":o+=9.5}n.updateNodeAttribute(e,"y",(e=>(null!=e?e:0)+o))})),JSON.stringify({...t,version:17,graph:n.export()})},17:e=>JSON.stringify({...JSON.parse(e),version:18}),18:e=>JSON.stringify({...JSON.parse(e),version:19}),19:e=>JSON.stringify({...JSON.parse(e),version:20}),20:e=>JSON.stringify({...JSON.parse(e),version:21}),21:e=>JSON.stringify({...JSON.parse(e),version:22}),22:e=>JSON.stringify({...JSON.parse(e),version:23}),23:e=>JSON.stringify({...JSON.parse(e),version:24}),24:e=>{const t=JSON.parse(e),n=new Oo;return n.import(t.graph),n.filterNodes(((e,t)=>e.startsWith("stn")&&t.type===du.GzmtrInt||e.startsWith("misc_node")&&t.type===jc.GzmtrLineBadge)).forEach((e=>{const t=n.getNodeAttribute(e,"type"),r=n.getNodeAttribute(e,t);r.tram=!1,n.mergeNodeAttributes(e,{[t]:r})})),JSON.stringify({...t,version:25,graph:n.export()})},25:e=>JSON.stringify({...JSON.parse(e),version:26}),26:e=>{const t=JSON.parse(e),n=new Oo;return n.import(null==t?void 0:t.graph),n.filterNodes(((e,t)=>e.startsWith("misc_node")&&t.type===jc.GzmtrLineBadge)).forEach((e=>{const t=n.getNodeAttribute(e,"type"),r=n.getNodeAttribute(e,t);r.span=!0,n.mergeNodeAttributes(e,{[t]:r})})),JSON.stringify({...t,version:27,graph:n.export()})},27:e=>{const t=JSON.parse(e),n=new Oo;return n.import(null==t?void 0:t.graph),n.filterNodes(((e,t)=>e.startsWith("stn")&&t.type===du.GzmtrInt)).forEach((e=>{const t=n.getNodeAttribute(e,"type"),r=n.getNodeAttribute(e,t);for(let n=0;nJSON.stringify({...JSON.parse(e),version:29}),29:e=>JSON.stringify({...JSON.parse(e),version:30}),30:e=>JSON.stringify({...JSON.parse(e),version:31}),31:e=>{const t=JSON.parse(e),n=new Oo;return n.import(null==t?void 0:t.graph),n.filterEdges(((e,t)=>t.style===_c.ChinaRailway)).forEach((e=>{const t=n.getEdgeAttributes(e)[_c.ChinaRailway];n.mergeEdgeAttributes(e,{[_c.ChinaRailway]:{...t,color:[ic.Shanghai,"jsr","#000000",pc.white]}})})),JSON.stringify({...t,version:32,graph:n.export()})},32:e=>JSON.stringify({...JSON.parse(e),version:33}),33:e=>{const t=JSON.parse(e),n=new Oo;return n.import(null==t?void 0:t.graph),n.forEachDirectedEdge((e=>{n.setEdgeAttribute(e,"parallelIndex",-1),n.updateEdgeAttribute(e,"zIndex",(e=>Math.max(-10,(null!=e?e:0)-5)))})),n.forEachNode((e=>{n.updateNodeAttribute(e,"zIndex",(e=>Math.min(10,(null!=e?e:0)+5)))})),JSON.stringify({...t,version:34,graph:n.export()})},34:e=>JSON.stringify({...JSON.parse(e),version:35}),35:e=>JSON.stringify({...JSON.parse(e),version:36}),36:e=>JSON.stringify({...JSON.parse(e),version:37}),37:e=>JSON.stringify({...JSON.parse(e),version:38}),38:e=>JSON.stringify({...JSON.parse(e),version:39}),39:e=>{const t=JSON.parse(e),n=new Oo;return n.import(null==t?void 0:t.graph),n.filterNodes(((e,t)=>e.startsWith("misc_node")&&t.type===jc.Facilities)).forEach((e=>{const t=n.getNodeAttribute(e,"type"),r=n.getNodeAttribute(e,t);"qingdao_airport"===r.type?r.type="airport_qingdao":"qingdao_coach_station"===r.type?r.type="coach_station_qingdao":"qingdao_cruise_terminal"===r.type?r.type="cruise_terminal_qingdao":"qingdao_railway"===r.type?r.type="railway_qingdao":"qingdao_tram"===r.type&&(r.type="tram_qingdao"),n.mergeNodeAttributes(e,{[t]:r})})),JSON.stringify({...t,version:40,graph:n.export()})},40:e=>JSON.stringify({...JSON.parse(e),version:41}),41:e=>{const t=JSON.parse(e),n=new Oo;n.import(null==t?void 0:t.graph);const r=e=>e.map((e=>e.replaceAll("\\","\n")));return n.forEachNode(((e,t)=>{const o=n.getNodeAttribute(e,"type");let i;(o===du.BjsubwayBasic||o===du.BjsubwayInt||o===du.FoshanMetroBasic||o===du.GuangdongIntercityRailway||o===du.GzmtrBasic||o===du.GzmtrInt||o===du.JREastBasic||o===du.JREastImportant||o===du.KunmingRTBasic||o===du.KunmingRTInt||o===du.MRTBasic||o===du.MRTInt||o===du.MTR||o===du.ShanghaiSuburbanRailway||o===du.ShmetroBasic2020||o===du.ShmetroBasic||o===du.ShmetroInt||o===du.ShmetroOutOfSystemInt||o===du.SuzhouRTBasic||o===du.SuzhouRTInt||o===du.TokyoMetroBasic||o===du.TokyoMetroInt)&&(i=r(t[o].names)),i&&(t[o].names=i,n.mergeNodeAttributes(e,t))})),JSON.stringify({...t,version:42,graph:n.export()})}};He();const yp=Fe({account:uc,app:_d,param:Md,runtime:nu}),bp=((e={})=>Ue({reducer:yp,middleware:e=>e({serializableCheck:!1}),preloadedState:e}))();bp.subscribe((async()=>{await xc(bp.getState().param.present),localStorage.setItem(oc.PARAM,fp(bp.getState().param)),localStorage.setItem(oc.APP,JSON.stringify(bp.getState().app)),localStorage.setItem(oc.LOGIN_STATE,JSON.stringify(bp.getState().account))}));const vp=e("c",(()=>We())),wp=e("d",Ve),xp=Pe.lazy((()=>Po((()=>n.import("./page-header-legacy-C8DY0MtO.js"))))),Sp=Pe.lazy((()=>Po((()=>n.import("./tools-legacy-XMueayxR.js"))))),kp=Pe.lazy((()=>Po((()=>n.import("./svg-wrapper-legacy-CKReUCee.js"))))),Np=Pe.lazy((()=>Po((()=>n.import("./details-legacy-D1O4j9nR.js"))))),_p=Pe.lazy((()=>Po((()=>n.import("./rmg-palette-app-clip-legacy-D6xUcAS7.js")))));function Rp(){const e=vp(),{paletteAppClip:{input:t}}=wp((e=>e.runtime)),{t:n}=$e(),[r,o]=Pe.useState(!1);Pe.useEffect((()=>{qn.isStandaloneWindow()&&!window.localStorage.getItem(oc.DO_NOT_SHOW_RMT_MSG)&&o(!0)}),[]);const a=new Date,s=`${a.getFullYear()}${String(a.getMonth()+1).padStart(2,"0")}01`,l=`${String(a.getFullYear()).slice(-2)}.${a.getMonth()+1}.1`;return i.jsx(Xl,{children:i.jsx(Pl,{children:i.jsxs(Pe.Suspense,{fallback:i.jsxs(i.Fragment,{children:[i.jsx("p",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},children:"Rail Map Toolkit protocol... checked"}),i.jsxs("p",{style:{position:"absolute",top:"75%",left:"50%",transform:"translate(-50%, -50%)",fontSize:"small",color:"gray"},children:["Seeing this page for too long? Try another mirror"," ",i.jsx("a",{href:"https://railmapgen.github.io/?app=rmp",target:"_blank",rel:"noreferrer",children:"GitHub"})," ",i.jsx("a",{href:"https://railmapgen.gitlab.io/?app=rmp",target:"_blank",rel:"noreferrer",children:"Gitlab"})," ","or the"," ",i.jsx("a",{href:"https://github.com/railmapgen/railmapgen.github.io/releases",target:"_blank",rel:"noreferrer",children:"offline application"})," ",".",i.jsx("br",{}),i.jsx("br",{}),"Offline applications also available via ghgo.xyz"," ",i.jsx("a",{href:`https://ghgo.xyz/https://github.com/railmapgen/railmapgen.github.io/releases/download/tauri-${s}/railmapgen_${l}_x64-setup.exe`,children:"Windows"})," ",i.jsx("a",{href:`https://ghgo.xyz/https://github.com/railmapgen/railmapgen.github.io/releases/download/tauri-${s}/railmapgen_${l}_aarch64.dmg`,children:"MacOS"})," ",i.jsx("a",{href:`https://ghgo.xyz/https://github.com/railmapgen/railmapgen.github.io/releases/download/tauri-${s}/railmapgen_${l}_amd64.deb`,children:"Linux"})," ","if you are blocked by GFW :)"]})]}),children:[i.jsx(xp,{}),r&&i.jsxs(ue,{status:"info",variant:"solid",size:"xs",pl:3,pr:1,py:1,zIndex:"1",children:[i.jsx(pe,{}),i.jsxs(se,{children:[i.jsx(de,{href:"/?app=rmp",isExternal:!0,fontWeight:"bold",children:n("rmtPromotion")})," ",i.jsx(de,{as:"button",ml:"auto",textDecoration:"underline",onClick:()=>o(!1),children:n("close")})," | ",i.jsx(de,{as:"button",textDecoration:"underline",onClick:()=>{o(!1),window.localStorage.setItem(oc.DO_NOT_SHOW_RMT_MSG,"true")},children:n("noShowAgain")})]})]}),i.jsx(yl,{allowReset:!0,children:i.jsxs(y,{direction:"row",height:"100%",overflow:"hidden",sx:{position:"relative"},children:[i.jsx(Sp,{}),i.jsx(kp,{}),i.jsx(Np,{})]})}),i.jsx(_p,{isOpen:!!t,onClose:()=>e(Zd()),defaultTheme:t,onSelect:t=>e(Xd(t))})]})})})}const Tp=JSON.parse(null!==(Ke=localStorage.getItem(oc.LOGIN_STATE))&&void 0!==Ke?Ke:"{}"),Cp=JSON.parse(null!==(Ye=localStorage.getItem(oc.APP))&&void 0!==Ye?Ye:"{}"),jp=localStorage.getItem(oc.PARAM);"telemetry"in Cp&&("app"in Cp.telemetry&&bp.dispatch(wd(Cp.telemetry.app)),"project"in Cp.telemetry&&bp.dispatch(xd(Cp.telemetry.project))),"preference"in Cp&&("unlockSimplePathAttempts"in Cp.preference&&bp.dispatch(Sd(Cp.preference.unlockSimplePathAttempts)),"toolsPanel"in Cp.preference&&"expand"in Cp.preference.toolsPanel&&bp.dispatch(kd(Cp.preference.toolsPanel.expand)),"autoParallel"in Cp.preference&&bp.dispatch(Nd(Cp.preference.autoParallel))),"state"in Tp&&bp.dispatch(lc(Tp.state)),"activeSubscriptions"in Tp&&bp.dispatch(cc(Tp.activeSubscriptions)),gp(jp).then((e=>{const{version:t,graph:n,...r}=JSON.parse(e);window.graph=Oo.from(n);const o={...r,present:n,past:[],future:[]};bp.dispatch(Od(o)),bp.dispatch(Id()),bp.dispatch($d()),Eo(document.getElementById("root")).render(i.jsx(Pe.StrictMode,{children:i.jsx(Je,{store:bp,children:i.jsx(qe,{i18n:Ic,children:i.jsx(Rp,{})})})})),qn.injectUITools(),(async e=>{vc.addEventListener("message",(async t=>{const{type:n,token:r,from:o}=t.data;if("TOKEN_REQUEST"===n&&"rmt"===o){if(e.getState().account.timeout&&(window.clearTimeout(e.getState().account.timeout),e.dispatch(dc(void 0))),!r)return e.dispatch(lc("logged-out")),void e.dispatch(cc(ac));const t=await fetch("https://railmapgen.org/v1/subscription",{headers:{accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${r}`}});if(200!==t.status)return e.dispatch(lc("expired")),void e.dispatch(cc(ac));e.dispatch(lc("free"));const n=(await t.json()).subscriptions,o=structuredClone(ac);for(const r of n){const t=r.type;t in o&&(e.dispatch(lc("subscriber")),o[t]=!0)}e.dispatch(cc(o))}}))})(bp),Sc(),window.setInterval((()=>Sc()),9e5);const a=window.setTimeout((()=>{bp.dispatch(lc("logged-out")),bp.dispatch(cc(ac)),bp.dispatch(dc(void 0))}),6e3);bp.dispatch(dc(a))}))}}})); diff --git a/assets/master-manager-UVzPVFgJ.js b/assets/master-manager-DlQmLEpO.js similarity index 99% rename from assets/master-manager-UVzPVFgJ.js rename to assets/master-manager-DlQmLEpO.js index 4bd6b7783..507b5f16e 100644 --- a/assets/master-manager-UVzPVFgJ.js +++ b/assets/master-manager-DlQmLEpO.js @@ -1 +1 @@ -import{b as x,u as X,r as F}from"./react-DmTIgZys.js";import{i as H,S as k,aw as K,r as Un,C as B,M as R,aN as Ee,L as ua,e as pa,aP as ga,aQ as Z,aR as q,aS as $,c as tt,d as nt,aT as cn,aU as Pe,P as ge,V as Dt,W as Xt,aV as mn,aW as Ct,aM as dn,q as ht,v as ut,aX as xn,aY as xa,Q as Ca,R as qt,w as ya,aZ as ba,a_ as ja,aO as Oa,D as va,a as wa}from"./index-CgEQ4DK5.js";import{j as n,aK as Fe,a4 as fn,af as ve,ax as Ue,B as hn,a6 as _a,ad as Yt,O as pe,g as $t,b0 as Cn,b1 as yn,aL as Sa,at as Vn,$ as Gn,au as Zn,a1 as qn,a2 as Qn,a3 as Jn,Q as ka,a5 as Kn,al as Na}from"./chakra-t2DzLzXq.js";var ea=(s=>(s.Airport="airport",s.Airport2024="airport_2024",s.Maglev="maglev",s.Disney="disney",s.Railway="railway",s.Railway2024="railway_2024",s.HSR="hsr",s.AirportHK="airport_hk",s.DisneyHK="disney_hk",s.NgongPing360="ngong_ping_360",s.Tiananmen="tiananmen",s.AirportBJ="airport_bj",s.BusTerminalSuzhou="bus_terminal_suzhou",s.RailwaySuzhou="railway_suzhou",s.BusInterchange="bus_interchange",s.AirportSG="airport_sg",s.CruiseCentre="cruise_centre",s.SentosaExpress="sentosa_express",s.CableCar="cable_car",s.Merlion="merlion",s.MarinaBaySands="marina_bay_sands",s.GardensByTheBay="gardens_by_the_bay",s.SingaporeFlyer="singapore_flyer",s.Esplanade="esplanade",s.AirportQingdao="airport_qingdao",s.CoachStationQingdao="coach_station_qingdao",s.CruiseTerminalQingdao="cruise_terminal_qingdao",s.RailwayQingdao="railway_qingdao",s.TramQingdao="tram_qingdao",s.AirportGuangzhou="airport_guangzhou",s.RailwayGuangzhou="railway_guangzhou",s.IntercityGuangzhou="intercity_guangzhou",s))(ea||{});const Ma=s=>{const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{type:f=Qt.type}=a!=null?a:Qt,r=x.useRef(null),[l,c]=x.useState({width:25,height:25});x.useEffect(()=>c(r.current.getBBox()),[f,c,r]);const h=x.useCallback(g=>m(t,g),[t,m]),u=x.useCallback(g=>i(t,g),[t,i]),p=x.useCallback(g=>d(t,g),[t,d]);return n.jsx("g",{id:t,transform:"translate(".concat(e-l.width/2,", ").concat(o-l.height/2,")"),onPointerDown:h,onPointerMove:u,onPointerUp:p,style:{cursor:"move"},children:n.jsx("image",{ref:r,href:"/rmp/images/facilities/".concat(f,".svg"),onLoad:()=>c(r.current.getBBox())})})},Qt={type:"airport"},Aa=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:a}=X(),m=[{type:"select",label:a("panel.details.nodes.facilities.type"),value:e.type,options:{airport:"Airport",airport_2024:"Airport 2024",maglev:"Maglev",disney:"Disney",railway:"Railway",railway_2024:"Railway 2024",hsr:"HSR",airport_hk:"Airport Hongkong",disney_hk:"Disney Hongkong",ngong_ping_360:"Ngong Ping 360",tiananmen:"Tiananmen",airport_bj:"Airport Beijing",bus_terminal_suzhou:"Bus Terminal Suzhou",railway_suzhou:"Railway Suzhou",bus_interchange:"Bus Interchange",airport_sg:"Changi Airport",cruise_centre:"Cruise Centre",sentosa_express:"Sentosa Express",cable_car:"Cable Car",merlion:"Merlion",marina_bay_sands:"Marina Bay Sands",gardens_by_the_bay:"Gardens by the Bay",singapore_flyer:"Singapore Flyer",esplanade:"Esplanade",airport_qingdao:"Airport Qingdao",railway_qingdao:"Railway Qingdao",coach_station_qingdao:"Coach Station Qingdao",cruise_terminal_qingdao:"Cruise Terminal Qingdao",tram_qingdao:"Tram Qingdao",airport_guangzhou:"Airport Guangzhou",railway_guangzhou:"Railway Guangzhou",intercity_guangzhou:"Intercity Guangzhou"},onChange:i=>{e.type=i,o(t,e)}}];return n.jsx(H,{fields:m,minW:"full"})},za=n.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:n.jsxs("g",{transform:"translate(12, 0)scale(0.4)",children:[n.jsx("circle",{cx:"0",cy:"29.33899",r:"29.33899",fill:"currentColor"}),n.jsx("path",{id:"airport",d:"M28.9769,6.60134c1.711.013,3.111,2.53205,3.111,4.241v10.337s17.106,15.435,17.358,15.666a1.145,1.145,0,0,1,.488,1.152v2.833c0,.651-.451.61-.695.467-.334-.119-17.151-8.863-17.151-8.863-.004,1.458-.797,9.006-1.326,13.304,0,0,4.61,2.457,4.699,2.521.334.268.352.359.352.852v2.001c0,.477-.352.428-.51.324-.183-.062-5.693-1.921-5.693-1.921a2.56018,2.56018,0,0,0-.633-.127,2.31654,2.31654,0,0,0-.666.127s-5.477,1.859-5.672,1.921c-.185.104-.523.153-.523-.324v-2.001c0-.493.029-.584.367-.852.086-.064,4.678-2.521,4.678-2.521-.524-4.298-1.307-11.846-1.325-13.304,0,0-16.822,8.744-17.148,8.863-.217.143-.69.184-.69-.467v-2.833a1.16206,1.16206,0,0,1,.473-1.152c.276-.231,17.365-15.666,17.365-15.666v-10.337c0-1.709,1.403-4.228,3.14105-4.241",transform:"translate(-28.9697,0.14347)",fill:"white"})]})}),yi={component:Ma,icon:za,defaultAttrs:Qt,attrsComponent:Aa,metadata:{displayName:"panel.details.nodes.facilities.displayName",tags:[]}},bi=()=>navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome"),Mt={source:'url("./fonts/LTAIdentity-Medium.woff")',descriptors:{display:"swap"}},it={source:'url("./fonts/Mplus2-Medium.otf")',descriptors:{display:"swap"}},bn={source:'url("./fonts/Roboto-Bold.ttf")',descriptors:{display:"swap"}},jn={source:'url("./fonts/MontaguSlab.ttf")',descriptors:{display:"swap"}},On={source:'url("./fonts/Railway-PlyE.otf")',descriptors:{display:"swap"}},Bt={[k.MTR]:{className:[".rmp-name__mtr__zh",".rmp-name__mtr__en"],cssFont:{"MyriadPro-Semibold":void 0,"Vegur-Bold":void 0,"GenYoMinTW-SB":void 0},cssName:"fonts_mtr"},[k.MRTBasic]:{className:[".rmp-name__mrt"],cssFont:{IdentityFont:Mt},cssName:"fonts_mrt"},[k.MRTInt]:{className:[".rmp-name__mrt"],cssFont:{IdentityFont:Mt},cssName:"fonts_mrt"},[k.JREastBasic]:{className:[".rmp-name__jreast_ja",".rmp-name__jreast_en"],cssFont:{"M PLUS 2":it},cssName:"fonts_jreast"},[k.JREastImportant]:{className:[".rmp-name__jreast_ja",".rmp-name__jreast_en"],cssFont:{"M PLUS 2":it},cssName:"fonts_jreast"},[K.BerlinSBahnLineBadge]:{className:[".rmp-name__berlin"],cssFont:{Roboto:bn},cssName:"fonts_berlin"},[K.BerlinUBahnLineBadge]:{className:[".rmp-name__berlin"],cssFont:{Roboto:bn},cssName:"fonts_berlin"},[K.JREastLineBadge]:{className:[".rmp-name__jreast_ja",".rmp-name__jreast_en"],cssFont:{'"M PLUS 2"':it},cssName:"fonts_jreast"},[K.MRTDestinationNumbers]:{className:[".rmp-name__mrt"],cssFont:{IdentityFont:Mt},cssName:"fonts_mrt"},[K.MRTLineBadge]:{className:[".rmp-name__mrt"],cssFont:{IdentityFont:Mt},cssName:"fonts_mrt"},[k.TokyoMetroBasic]:{className:[".rmp-name__tokyo_en",".rmp-name__jreast_ja"],cssFont:{MontaguSlab:jn,"M PLUS 2":it},cssName:"fonts_tokyo"},[k.TokyoMetroInt]:{className:[".rmp-name__tokyo_en",".rmp-name__jreast_ja"],cssFont:{MontaguSlab:jn,"M PLUS 2":it},cssName:"fonts_tokyo"},[k.LondonTubeBasic]:{className:[".rmp-name__tube"],cssFont:{Railway:On},cssName:"fonts_tube"},[k.LondonTubeInt]:{className:[".rmp-name__tube"],cssFont:{Railway:On},cssName:"fonts_tube"}},vn=[],Ba=async s=>{const t=Bt[s];if(!t)return;const{cssFont:e,cssName:o}=t;if(vn.includes(o))return;vn.push(o),await Promise.all(Object.entries(e).map(([m,i])=>Un.loadFont(m,i&&{configs:[i]})));const a=document.createElement("link");a.rel="stylesheet",a.id=o,a.href="/rmp/styles/".concat(o,".css"),document.head.append(a)},Ta=async(s,t)=>{var m;const e=document.createElement("style");for(let i=document.styleSheets.length-1;i>=0;i=i-1)if((m=document.styleSheets[i].href)!=null&&m.endsWith("styles/".concat(t,".css"))){e.textContent=[...document.styleSheets[i].cssRules].map(d=>d.cssText).filter(d=>!d.startsWith("@font-face")).join("\n");break}e.textContent+="\n";const a=(await Promise.allSettled(Object.keys(s).map(Un.getFontCSS))).filter(i=>i.status==="fulfilled").map(i=>i.value);return e.textContent+=a.join("\n"),e},T=x.forwardRef((s,t)=>{const{text:e,lineHeight:o,grow:a,dominantBaseline:m=a==="up"?"auto":a==="down"?"hanging":"middle",baseOffset:i=2,funcDX:d=l=>0,...f}=s,r=a==="bidirectional"?-((e.length-1)*o)/2:0;return n.jsx("g",{ref:t,children:(a==="up"?[...e].reverse():e).map((l,c,h)=>n.jsx("text",{dy:(c*o+i)*(a==="up"?-1:1)+r,dx:d(c),dominantBaseline:m,...f,children:l},"".concat(l).concat(c)))})});T.displayName="MultilineText";const wn={zh:16,en:10},ee={top:{namesPos:1,lineHeight:wn.en,polarity:-1},middle:{namesPos:0,lineHeight:0,polarity:0},bottom:{namesPos:0,lineHeight:wn.zh,polarity:1}},ta={zh:k.ShmetroBasic,en:k.ShmetroBasic,mtr__zh:k.MTR,mtr__en:k.MTR,berlin:K.BerlinSBahnLineBadge,mrt:k.MRTBasic,jreast_ja:k.JREastBasic,jreast_en:k.JREastBasic,tokyo_en:k.TokyoMetroBasic,tube:k.LondonTubeBasic},Ia=s=>{const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{content:f=se.content,fontSize:r=se.fontSize,lineHeight:l=se.lineHeight,textAnchor:c=se.textAnchor,dominantBaseline:h=se.dominantBaseline,language:u=se.language,color:p=se.color,rotate:g=se.rotate,italic:C=se.italic,bold:y=se.bold}=a!=null?a:se,b=x.useRef(null),[O,w]=x.useState({x:0,y:0,width:32,height:16});x.useEffect(()=>w(b.current.getBBox()),[f,r,l,c,h,u,g,C,y,w,b]),x.useEffect(()=>{const j=ta[u];j&&Ba(j)},[u]);const v=x.useCallback(j=>m(t,j),[t,m]),N=x.useCallback(j=>i(t,j),[t,i]),S=x.useCallback(j=>d(t,j),[t,d]);return n.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")rotate(").concat(g,")"),onPointerDown:v,onPointerMove:N,onPointerUp:S,style:{cursor:"move"},children:[n.jsx("rect",{className:"removeMe",fill:"gray",fillOpacity:"0.1",x:O.x-1.5,y:O.y-1.5,width:O.width+3,height:O.height+3}),n.jsx(T,{ref:b,text:f.split("\n"),lineHeight:l,grow:"down",className:"rmp-name__".concat(u),fontSize:r,textAnchor:c,dominantBaseline:h,fill:p[2],fontStyle:C,fontWeight:y})]})},se={content:"Enter your text here",fontSize:16,lineHeight:16,textAnchor:"middle",dominantBaseline:"middle",language:"en",color:[B.Shanghai,"jsr","#000000",R.white],rotate:0,italic:"normal",bold:"normal"},Ea=s=>{var i,d,f,r,l,c,h;const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:a}=X(),m=[{type:"textarea",label:a("panel.details.nodes.text.content"),value:(i=e.content)!=null?i:se.content,onChange:u=>{e.content=u.toString(),o(t,e)},minW:"full"},{type:"input",label:a("panel.details.nodes.text.fontSize"),value:((d=e.fontSize)!=null?d:se.fontSize).toString(),validator:u=>Number.isInteger(u)&&Number(u)>0,onChange:u=>{e.fontSize=Number(u),o(t,e)},minW:"full"},{type:"input",label:a("panel.details.nodes.text.lineHeight"),value:((f=e.lineHeight)!=null?f:se.lineHeight).toString(),validator:u=>Number.isInteger(u)&&Number(u)>0,onChange:u=>{e.lineHeight=Number(u),o(t,e)},minW:"full"},{type:"select",label:a("panel.details.nodes.text.textAnchor"),value:(r=e.textAnchor)!=null?r:se.textAnchor,options:{start:a("panel.details.nodes.text.start"),middle:a("panel.details.nodes.text.middle"),end:a("panel.details.nodes.text.end")},onChange:u=>{e.textAnchor=u,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.nodes.text.dominantBaseline"),value:(l=e.dominantBaseline)!=null?l:se.dominantBaseline,options:{auto:a("panel.details.nodes.text.auto"),middle:a("panel.details.nodes.text.middle"),hanging:a("panel.details.nodes.text.hanging")},onChange:u=>{e.dominantBaseline=u,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.nodes.text.language"),value:(c=e.language)!=null?c:se.language,options:{zh:a("panel.details.nodes.text.zh"),en:a("panel.details.nodes.text.en"),mtr__zh:a("panel.details.nodes.text.mtr__zh"),mtr__en:a("panel.details.nodes.text.mtr__en"),berlin:a("panel.details.nodes.text.berlin"),mrt:a("panel.details.nodes.text.mrt"),jreast_ja:a("panel.details.nodes.text.jreast_ja"),jreast_en:a("panel.details.nodes.text.jreast_en"),tokyo_en:a("panel.details.nodes.text.tokyo_en"),tube:a("panel.details.nodes.text.tube")},onChange:u=>{e.language=u.toString(),o(t,e)},minW:"full"},{type:"select",label:a("panel.details.nodes.text.rotate"),value:(h=e.rotate)!=null?h:se.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:u=>{e.rotate=Number(u),o(t,e)},minW:"full"},{type:"switch",label:a("panel.details.nodes.text.italic"),isChecked:e.italic==="italic",onChange:u=>{e.italic=u?"italic":"normal",o(t,e)},minW:"full"},{type:"switch",label:a("panel.details.nodes.text.bold"),isChecked:e.bold==="bold",onChange:u=>{e.bold=u?"bold":"normal",o(t,e)},minW:"full"},{type:"custom",label:a("color"),component:n.jsx(Ee,{type:K.Text,defaultTheme:se.color})}];return n.jsx(H,{fields:m})},$a=n.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:n.jsx("text",{x:"12",y:"12",textAnchor:"middle",dominantBaseline:"middle",fontSize:"10",children:"Text"})}),ji={component:Ia,icon:$a,defaultAttrs:se,attrsComponent:Ea,metadata:{displayName:"panel.details.nodes.text.displayName",tags:[]}},Oi=(s,t)=>s.filterEdges((e,o,a,m,i,d,f)=>t.has(a)&&t.has(m)),Pa=s=>{const t=Object.fromEntries([...Object.values(k),Object.values(K)].map(e=>[e,!1]));return s.forEachNode(e=>{const o=s.getNodeAttribute(e,"type");t[o]=!0}),t},Wa=(s,t,e,o,a,m)=>s<=a&&a<=e&&t<=m&&m<=o,vi=(s,t,e,o,a)=>{const m=t<=o?t:o,i=e<=a?e:a,d=t<=o?o:t,f=e<=a?a:e;return s.filterNodes((r,l)=>Wa(m,i,d,f,l.x,l.y))},wi=(s,t,e)=>{const o=[],a=new Set;return t.forEach(m=>{const i=s.getNodeAttributes(m).type,d=s.getNodeAttribute(m,i);if(d.color!==void 0){const f=d.color;a.has(f.toString())||(o.push(f),a.add(f.toString()))}}),e.filter(m=>ua.includes(s.getEdgeAttribute(m,"style"))).forEach(m=>{const i=s.getEdgeAttributes(m),d=i[i.style].color;a.has(d.toString())||(o.push(d),a.add(d.toString()))}),o},na=s=>{const t=[],e=new Set;return s.filterNodes(o=>s.getNodeAttribute(o,"type")===K.Master).forEach(o=>{const a=s.getNodeAttributes(o)[K.Master];e.has(a.randomId)||(e.add(a.randomId),t.push(a))}),t},Ra=(s,t,e)=>{const o=new Blob([e],{type:t});Da(s,o)},Da=(s,t)=>{const e=window.URL.createObjectURL(t),o=document.createElement("a");o.href=e,o.download=s,document.body.appendChild(o),o.click(),document.body.removeChild(o),window.URL.revokeObjectURL(e)},_i=async(s,t,e,o)=>{const{xMin:a,yMin:m,xMax:i,yMax:d}=pa(s),[f,r]=[i-a,d-m],l=document.getElementById("canvas").cloneNode(!0);t||l.appendChild(await La(i-400,d-120)),l.setAttribute("viewBox","".concat(a," ").concat(m," ").concat(f," ").concat(r)),l.setAttribute("width",f.toString()),l.setAttribute("height",r.toString()),Object.entries({".rmp-name-outline":["paint-order","stroke","stroke-linejoin"]}).forEach(([h,u])=>{const p=document.querySelector(h);if(p===null)return;const g=window.getComputedStyle(p);l.querySelectorAll(h).forEach(C=>{if(h===".rmp-name-outline"&&o===1.1){const y=C.insertAdjacentElement("afterend",C.cloneNode(!0));y&&(y.classList.remove(h.slice(1)),y.classList.length===0&&C.removeAttribute("class"),y.removeAttribute("stroke-width"))}u.forEach(y=>{C.setAttribute(y,g.getPropertyValue(y))}),C.classList.remove(h.slice(1)),C.classList.length===0&&C.removeAttribute("class")})}),l.querySelectorAll('[fill="url(#opaque)"]').forEach(h=>{h.setAttribute("fill","white"),h.setAttribute("fill-opacity","0")}),l.querySelectorAll(".removeMe").forEach(h=>{h.remove()});const c=Pa(s);return await Xa(l,s,c,e),await Ya(l,s,c),{elem:l,width:f,height:r}},Xa=async(s,t,e,o)=>{var m;const a=new Set;if(Object.keys(Bt).filter(i=>e[i]).forEach(i=>a.add(i)),t.filterNodes((i,d)=>i.startsWith("misc_node_")&&d.type===K.Text).map(i=>t.getNodeAttribute(i,K.Text).language).map(i=>ta[i]).filter(i=>i!==k.ShmetroBasic).forEach(i=>a.add(i)),o)[".rmp-name__zh",".rmp-name__en"].forEach(i=>{s.querySelectorAll(i).forEach(d=>{d.classList.remove(i.slice(1)),d.classList.length===0&&d.removeAttribute("class")})}),a.forEach(i=>{Bt[i].className.forEach(d=>{s.querySelectorAll(d).forEach(f=>{f.classList.remove(d.slice(1)),f.classList.length===0&&f.removeAttribute("class")})})});else{const i=document.createElement("style");for(let d=0;df.cssText).join("\n");break}s.prepend(i),await Promise.all([...a.values()].map(d=>Bt[d]).map(async({cssName:d,cssFont:f})=>{try{s.prepend(await Ta(f,d))}catch(r){alert("Failed to load fonts. Fonts in the exported PNG will be missing."),console.error(r)}}))}},Ya=async(s,t,e)=>{if(e[K.Facilities]){const o=t.filterNodes((d,f)=>f.type===K.Facilities),a=Object.fromEntries(Object.values(ea).map(d=>[d,[]]));o.forEach(d=>{var r;const f=(r=t.getNodeAttribute(d,K.Facilities))==null?void 0:r.type;f&&a[f].push(d)});const m=Object.entries(a).filter(([d,f])=>f.length>0).map(([d,f])=>d),i=await Promise.all((await Promise.all(m.map(async d=>await fetch("/rmp//images/facilities/".concat(d,".svg"))))).map(d=>d.text()));m.forEach((d,f)=>{const r=document.createElement("div");r.innerHTML=i[f];const l=r.querySelector("svg"),c=document.createElementNS("http://www.w3.org/2000/svg","symbol");for(const h of l.attributes)c.setAttribute(h.name,h.value);for(;l.firstChild;)c.appendChild(l.firstChild);l.replaceWith(c),c.id=d,s.appendChild(c),a[d].forEach(h=>{const u=s.querySelector("#".concat(h)),p=u==null?void 0:u.querySelector("image");if(p){u.removeChild(p);const g=document.createElementNS("http://www.w3.org/2000/svg","use");g.setAttribute("href","#".concat(d)),g.setAttribute("height",c.getAttribute("height")),g.setAttribute("width",c.getAttribute("width")),u.appendChild(g)}}),r.remove()})}},La=async(s,t)=>{const e=document.createElementNS("http://www.w3.org/2000/svg","g");e.setAttribute("transform","translate(".concat(s,", ").concat(t,")scale(2)"));const a=await(await fetch("/rmp//logo.svg")).text(),m=document.createElement("div");m.innerHTML=a;const i=m.querySelector("svg"),d=document.createElement("g");d.setAttribute("transform","translate(-60, -25)scale(0.1)"),d.setAttribute("font-family","Arial, sans-serif"),d.innerHTML=i.innerHTML,e.appendChild(d);const f=document.createElementNS("http://www.w3.org/2000/svg","text");f.setAttribute("font-family","Arial, sans-serif"),f.setAttribute("font-size","16");const r=ga.t("Rail Map Painter");f.appendChild(document.createTextNode(r));const l=document.createElementNS("http://www.w3.org/2000/svg","text");l.setAttribute("font-family","Arial, sans-serif"),l.setAttribute("font-size","10"),l.setAttribute("y","10");const c=window.location.origin;let h="https://railmapgen.org/";return c.includes("github")?h="https://railmapgen.github.io/":c.includes("gitlab")&&(h="https://railmapgen.gitlab.io/"),h+="?app=rmp",l.appendChild(document.createTextNode(h)),e.appendChild(d),e.appendChild(f),e.appendChild(l),e},Si=()=>{const[s,t]=F.useState({width:void 0,height:void 0});return F.useEffect(()=>{function e(){t({width:window.innerWidth,height:window.innerHeight})}return window.addEventListener("resize",e),e(),()=>window.removeEventListener("resize",e)},[]),s};function ki(){const{i18n:s}=X();return t=>{var e,o;return(o=(e=s.languages.map(a=>t[a]).find(a=>a!==void 0))!=null?e:t.en)!=null?o:"(Translation Error)"}}const Je={top:{lineHeight:6.67,offset:3.5+1.5+5},middle:{lineHeight:0,offset:0},bottom:{lineHeight:12.67,offset:-.17+1+5}},Ha=s=>{var y;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,nameOffsetX:r=Tt.nameOffsetX,nameOffsetY:l=Tt.nameOffsetY}=(y=a[k.ShmetroBasic])!=null?y:Tt,c=x.useCallback(b=>m(t,b),[t,m]),h=x.useCallback(b=>i(t,b),[t,i]),u=x.useCallback(b=>d(t,b),[t,d]),p=r==="left"?-13.33:r==="right"?13.33:0,g=(f[ee[l].namesPos].split("\n").length*Je[l].lineHeight+Je[l].offset)*ee[l].polarity,C=r==="left"?"end":r==="right"?"start":"middle";return x.useMemo(()=>n.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[n.jsx("circle",{id:"stn_core_".concat(t),r:5,stroke:"#393332",strokeWidth:"1",fill:"white",onPointerDown:c,onPointerMove:h,onPointerUp:u,style:{cursor:"move"}}),n.jsxs("g",{transform:"translate(".concat(p,", ").concat(g,")"),textAnchor:C,className:"rmp-name-outline",strokeWidth:"1",children:[n.jsx(T,{text:f[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),n.jsx(T,{text:f[1].split("\n"),dx:r==="right"?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]}),[t,e,o,...f,r,l,c,h,u])},Tt={...$,nameOffsetX:"right",nameOffsetY:"top"},Fa=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:a}=X(),m=[{type:"textarea",label:a("panel.details.stations.common.nameZh"),value:e.names[0],onChange:i=>{e.names[0]=i,o(t,e)},minW:"full"},{type:"textarea",label:a("panel.details.stations.common.nameEn"),value:e.names[1],onChange:i=>{e.names[1]=i,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:a("panel.details.stations.common.left"),middle:a("panel.details.stations.common.middle"),right:a("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetX=i,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:a("panel.details.stations.common.top"),middle:a("panel.details.stations.common.middle"),bottom:a("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetY=i,o(t,e)},minW:"full"}];return n.jsx(H,{fields:m})},Ua=n.jsx("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:n.jsx("circle",{cx:"12",cy:"12",r:"5",stroke:"currentColor",fill:"none"})}),Va={component:Ha,icon:Ua,defaultAttrs:Tt,attrsComponent:Fa,metadata:{displayName:"panel.details.stations.shmetroBasic.displayName",cities:[B.Shanghai],canvas:[Z.RailMap],categories:[q.Metro],tags:[]}},xe={0:{textDx:0,textDy:-17.5,textAnchor:"middle",namesPos:1,lineHeight:6.67,polarity:-1},45:{textDx:1,textDy:-16.25,textAnchor:"start",namesPos:1,lineHeight:6.67,polarity:-1},90:{textDx:12,textDy:0,textAnchor:"start",namesPos:0,lineHeight:0,polarity:0},135:{textDx:5,textDy:21,textAnchor:"start",namesPos:0,lineHeight:12.67,polarity:1},180:{textDx:0,textDy:22.5,textAnchor:"middle",namesPos:0,lineHeight:12.67,polarity:1},225:{textDx:-5,textDy:21,textAnchor:"end",namesPos:0,lineHeight:12.67,polarity:1},270:{textDx:-12,textDy:0,textAnchor:"end",namesPos:0,lineHeight:0,polarity:0},315:{textDx:-1,textDy:-16.25,textAnchor:"end",namesPos:1,lineHeight:6.67,polarity:-1}},Ga=s=>{var g;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,color:r=pt.color,rotate:l=pt.rotate}=(g=a[k.ShmetroBasic2020])!=null?g:pt,c=xe[l].textDy+(f[xe[l].namesPos].split("\n").length-1)*xe[l].lineHeight*xe[l].polarity,h=x.useCallback(C=>m(t,C),[t,m]),u=x.useCallback(C=>i(t,C),[t,i]),p=x.useCallback(C=>d(t,C),[t,d]);return x.useMemo(()=>n.jsxs("g",{id:t,children:[n.jsx("g",{transform:"translate(".concat(e,", ").concat(o,")rotate(").concat(l,")"),children:n.jsx("rect",{id:"stn_core_".concat(t),x:"-2",y:"-7.83",width:"4",height:"7.83",stroke:"none",fill:r[2],onPointerDown:h,onPointerMove:u,onPointerUp:p,style:{cursor:"move"}})}),n.jsxs("g",{transform:"translate(".concat(e+xe[l].textDx,", ").concat(o+c,")"),textAnchor:xe[l].textAnchor,className:"rmp-name-outline",strokeWidth:"1",children:[n.jsx(T,{text:f[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),n.jsx(T,{text:f[1].split("\n"),dx:l>=45&&l<=135?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]}),[t,e,o,...f,l,r,h,u,p])},pt={...$,rotate:0,color:[B.Shanghai,"sh1","#E4002B",R.white]},Za=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:a}=X(),m=[{type:"textarea",label:a("panel.details.stations.common.nameZh"),value:e.names[0],onChange:i=>{e.names[0]=i,o(t,e)},minW:"full"},{type:"textarea",label:a("panel.details.stations.common.nameEn"),value:e.names[1],onChange:i=>{e.names[1]=i,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.rotate"),value:e.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:i=>{e.rotate=Number(i),o(t,e)},minW:"full"},{type:"custom",label:a("color"),component:n.jsx(Ee,{type:k.ShmetroBasic2020,defaultTheme:pt.color})}];return n.jsx(H,{fields:m})},qa=n.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:n.jsx("rect",{x:"6",y:"9",width:"12",height:"6",stroke:"currentColor",fill:"currentColor"})}),Qa={component:Ga,icon:qa,defaultAttrs:pt,attrsComponent:Za,metadata:{displayName:"panel.details.stations.shmetroBasic2020.displayName",cities:[B.Shanghai],canvas:[Z.RailMap],categories:[q.Metro],tags:[]}},_n={top:{lineHeight:6.67,offset:3.5+1.5},middle:{lineHeight:0,offset:0},bottom:{lineHeight:12.67,offset:-.17+1}},Ja=s=>{var j;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,nameOffsetX:r=De.nameOffsetX,nameOffsetY:l=De.nameOffsetY,rotate:c=De.rotate,width:h=De.width,height:u=De.height}=(j=a[k.ShmetroInt])!=null?j:De,p=x.useCallback(A=>m(t,A),[t,m]),g=x.useCallback(A=>i(t,A),[t,i]),C=x.useCallback(A=>d(t,A),[t,d]),y=c===0||c===180?h:c===90||c===270?u:h*Math.SQRT1_2,b=c===0||c===180?u:c===90||c===270?h:h*Math.SQRT1_2,O=r==="left"?-6.83:r==="right"?6.83:0,w=(Math.abs(O)+y/2)*Math.sign(O),v=(f[ee[l].namesPos].split("\n").length*_n[l].lineHeight+_n[l].offset)*ee[l].polarity,N=(Math.abs(v)+b/2)*Math.sign(v),S=r==="left"?"end":r==="right"?"start":"middle";return x.useMemo(()=>n.jsxs("g",{id:t,children:[n.jsx("g",{transform:"translate(".concat(e,", ").concat(o,")rotate(").concat(c,")"),children:n.jsx("rect",{id:"stn_core_".concat(t),x:-h/2,y:-u/2,height:u,width:h,ry:u/2,stroke:"#393332",strokeWidth:"1",fill:"white",onPointerDown:p,onPointerMove:g,onPointerUp:C,style:{cursor:"move"}})}),n.jsxs("g",{transform:"translate(".concat(e+w,", ").concat(o+N,")"),textAnchor:S,className:"rmp-name-outline",strokeWidth:"1",children:[n.jsx(T,{text:f[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),n.jsx(T,{text:f[1].split("\n"),dx:r==="right"?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]}),[t,e,o,...f,r,l,c,h,u,p,g,C])},De={...$,nameOffsetX:"right",nameOffsetY:"top",rotate:0,height:10,width:13},Ka=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:a}=X(),m=[{type:"textarea",label:a("panel.details.stations.common.nameZh"),value:e.names[0],onChange:i=>{e.names[0]=i,o(t,e)},minW:"full"},{type:"textarea",label:a("panel.details.stations.common.nameEn"),value:e.names[1],onChange:i=>{e.names[1]=i,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:a("panel.details.stations.common.left"),middle:a("panel.details.stations.common.middle"),right:a("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetX=i,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:a("panel.details.stations.common.top"),middle:a("panel.details.stations.common.middle"),bottom:a("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetY=i,o(t,e)},minW:"full"},{type:"input",label:a("panel.details.stations.shmetroInt.height"),value:e.height.toString(),validator:i=>Number.isInteger(i),onChange:i=>{e.height=Number(i),o(t,e)},minW:"full"},{type:"input",label:a("panel.details.stations.shmetroInt.width"),value:e.width.toString(),validator:i=>Number.isInteger(i),onChange:i=>{e.width=Number(i),o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.rotate"),value:e.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:i=>{e.rotate=Number(i),o(t,e)},minW:"full"}];return n.jsx(H,{fields:m})},es=n.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:n.jsx("rect",{x:"4.5",y:"7",height:"10",width:"15",ry:"5",stroke:"currentColor",fill:"none"})}),ts={component:Ja,icon:es,defaultAttrs:De,attrsComponent:Ka,metadata:{displayName:"panel.details.stations.shmetroInt.displayName",cities:[B.Shanghai],canvas:[Z.RailMap],categories:[q.Metro],tags:["interchange"]}},ns=s=>{var y;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,nameOffsetX:r=It.nameOffsetX,nameOffsetY:l=It.nameOffsetY}=(y=a[k.ShmetroOutOfSystemInt])!=null?y:It,c=x.useCallback(b=>m(t,b),[t,m]),h=x.useCallback(b=>i(t,b),[t,i]),u=x.useCallback(b=>d(t,b),[t,d]),p=r==="left"?-13.33:r==="right"?13.33:0,g=(f[ee[l].namesPos].split("\n").length*Je[l].lineHeight+Je[l].offset)*ee[l].polarity,C=r==="left"?"end":r==="right"?"start":"middle";return x.useMemo(()=>n.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[n.jsx("circle",{r:5,stroke:"#393332",strokeWidth:"1.33",fill:"white"}),n.jsx("circle",{r:2.3,stroke:"#393332",strokeWidth:"1.33",fill:"white"}),n.jsx("circle",{id:"stn_core_".concat(t),r:5+1.33/2,fill:"white",fillOpacity:"0",onPointerDown:c,onPointerMove:h,onPointerUp:u,style:{cursor:"move"}}),n.jsxs("g",{transform:"translate(".concat(p,", ").concat(g,")"),textAnchor:C,className:"rmp-name-outline",strokeWidth:"1",children:[n.jsx(T,{text:f[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),n.jsx(T,{text:f[1].split("\n"),dx:r==="right"?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]}),[t,e,o,...f,r,l,c,h,u])},It={...$,nameOffsetX:"right",nameOffsetY:"top"},as=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:a}=X(),m=[{type:"textarea",label:a("panel.details.stations.common.nameZh"),value:e.names[0],onChange:i=>{e.names[0]=i,o(t,e)},minW:"full"},{type:"textarea",label:a("panel.details.stations.common.nameEn"),value:e.names[1],onChange:i=>{e.names[1]=i,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:a("panel.details.stations.common.left"),middle:a("panel.details.stations.common.middle"),right:a("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetX=i,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:a("panel.details.stations.common.top"),middle:a("panel.details.stations.common.middle"),bottom:a("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetY=i,o(t,e)},minW:"full"}];return n.jsx(H,{fields:m})},ss=n.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[n.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2.67",fill:"white"}),n.jsx("circle",{cx:"12",cy:"12",r:"4.6",stroke:"currentColor",strokeWidth:"2.67",fill:"white"})]}),os={component:ns,icon:ss,defaultAttrs:It,attrsComponent:as,metadata:{displayName:"panel.details.stations.shmetroOsysi.displayName",cities:[B.Shanghai],canvas:[Z.RailMap],categories:[q.Metro],tags:[]}},is=s=>{var p;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,rotate:r=Jt.rotate}=(p=a[k.ShanghaiSuburbanRailway])!=null?p:Jt,l=xe[r].textDy+(f[xe[r].namesPos].split("\n").length-1)*xe[r].lineHeight*xe[r].polarity,c=x.useCallback(g=>m(t,g),[t,m]),h=x.useCallback(g=>i(t,g),[t,i]),u=x.useCallback(g=>d(t,g),[t,d]);return x.useMemo(()=>n.jsxs("g",{id:t,children:[n.jsxs("g",{transform:"translate(".concat(e,", ").concat(o,")rotate(").concat(r,")"),children:[n.jsx("rect",{x:"-2",y:"-7.83",width:"4",height:"7.83",stroke:"none",fill:"#666464"}),n.jsx("rect",{x:"-3.5",y:"-1",width:"7",height:"2",stroke:"none",fill:"white"}),n.jsx("rect",{x:-2+1.1675,y:-7.83+1.5,width:4*2/5,height:7.83-1.5,stroke:"none",fill:"white"}),n.jsx("rect",{id:"stn_core_".concat(t),x:"-2",y:"-7.83",width:"4",height:7.83+1.25,stroke:"none",fill:"white",fillOpacity:"0",onPointerDown:c,onPointerMove:h,onPointerUp:u,style:{cursor:"move"}})]}),n.jsxs("g",{transform:"translate(".concat(e+xe[r].textDx,", ").concat(o+l,")"),textAnchor:xe[r].textAnchor,className:"rmp-name-outline",strokeWidth:"2.5",children:[n.jsx(T,{text:f[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),n.jsx(T,{text:f[1].split("\n"),dx:r>=45&&r<=135?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]}),[t,e,o,...f,r,c,h,u])},Jt={...$,rotate:0},ls=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:a}=X(),m=[{type:"textarea",label:a("panel.details.stations.common.nameZh"),value:e.names[0],onChange:i=>{e.names[0]=i,o(t,e)},minW:"full"},{type:"textarea",label:a("panel.details.stations.common.nameEn"),value:e.names[1],onChange:i=>{e.names[1]=i,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.rotate"),value:e.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:i=>{e.rotate=Number(i),o(t,e)},minW:"full"}];return n.jsx(H,{fields:m})},rs=n.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:n.jsx("rect",{x:"6",y:"9",width:"12",height:"6",stroke:"currentColor",fill:"currentColor"})}),cs={component:is,icon:rs,defaultAttrs:Jt,attrsComponent:ls,metadata:{displayName:"panel.details.stations.shanghaiSuburbanRailway.displayName",cities:[B.Shanghai],canvas:[Z.RailMap],categories:[q.Metro],tags:[]}};var Ke=1.3,Lt=18.5,ms=Lt+Ke,ds=Lt*2+Ke;var Et=45,Ne=Et-3,aa=function(s,t){var e=[s,t].map(function(o){return o.match(/^(\w+).+$/)});if(e[0]&&e[1]&&e[0][1]===e[1][1])return e[0][1]},un=function(s){var t=s.match(/^(\d+)\D+$/);return t==null?void 0:t[1]},Kt=function(){return Kt=Object.assign||function(s){for(var t,e=1,o=arguments.length;e0)&&!(a=o.next()).done;)m.push(a.value)}catch(d){i={error:d}}finally{try{a&&!a.done&&(e=o.return)&&e.call(o)}finally{if(i)throw i.error}}return m},us=function(s,t){var e=un(s);if(e)return{isDigit:!0,spanningPart:e};var o=aa(s,t);return o?{isDigit:!1,spanningPart:o}:{isDigit:!1,spanningPart:""}};function Sn(s){var t=s.zhName,e=s.enName,o=s.foregroundColour,a=s.backgroundColour,m=s.zhClassName,i=s.enClassName,d=s.passed,f=us(t,e),r=f.isDigit,l=f.spanningPart,c=F.useRef(null),h=hs(F.useState({x:0,height:0,width:0}),2),u=h[0],p=h[1];F.useEffect(function(){c.current&&p(c.current.getBBox())},[t,e]);var g=Ne/Math.max(Ne,u.width),C=(-u.x-u.width/2)*g,y=u.height*(1-g)/2;return n.jsxs("g",{textAnchor:"middle",fill:d?R.white:o,children:[n.jsx(Ht,{fill:d?"#aaa":a}),n.jsx("g",{ref:c,transform:"translate(".concat(C,",").concat(y,")scale(").concat(g,")"),children:n.jsxs("text",{className:m,fontSize:21,x:-1,y:12,textAnchor:"end",dominantBaseline:"central",children:[l,n.jsx("tspan",{className:m,fontSize:10,x:0,dy:-4,textAnchor:"start",dominantBaseline:"central",children:t.slice(l.length).trim()}),n.jsx("tspan",{className:i,fontSize:6.5,letterSpacing:-.1,x:0,dy:10,textAnchor:"start",dominantBaseline:"middle",children:r?e:e.slice(l.length).trim()})]})})]})}var kn=function(s,t){var e=typeof Symbol=="function"&&s[Symbol.iterator];if(!e)return s;var o=e.call(s),a,m=[],i;try{for(;(t===void 0||t-- >0)&&!(a=o.next()).done;)m.push(a.value)}catch(d){i={error:d}}finally{try{a&&!a.done&&(e=o.return)&&e.call(o)}finally{if(i)throw i.error}}return m};function ps(s){var t,e=s.zhName,o=s.enName,a=s.foregroundColour,m=s.backgroundColour,i=s.zhClassName,d=s.enClassName,f=s.passed,r=(t=un(e))!==null&&t!==void 0?t:"",l=F.useRef(null),c=F.useRef(null),h=kn(F.useState({width:0}),2),u=h[0],p=h[1],g=kn(F.useState({width:0}),2),C=g[0],y=g[1];F.useEffect(function(){l.current&&p(l.current.getBBox()),c.current&&y(c.current.getBBox())},[e,o]);var b=Ne/Math.max(Ne,u.width),O=Ne/Math.max(Ne,C.width),w={nameZh:{y:7.3+13.5*(1-b)*b/2},nameEn:{y:19.5-9*(1-O)*O/2}};return n.jsxs("g",{textAnchor:"middle",fill:f?R.white:a,children:[n.jsx(Ht,{fill:f?"#aaa":m}),n.jsxs("text",{ref:l,className:i,fontSize:12,transform:"translate(0,".concat(w.nameZh.y,")scale(").concat(b,")"),dominantBaseline:"central",children:[n.jsx("tspan",{fontSize:16,dy:.7,dominantBaseline:"central",children:r}),n.jsx("tspan",{dy:-.7,dominantBaseline:"central",children:e.slice(r.length)})]}),n.jsx("text",{ref:c,className:d,fontSize:8,transform:"translate(0,".concat(w.nameEn.y,")scale(").concat(O,")"),dominantBaseline:"middle",children:o})]})}var gs=function(s,t){var e=typeof Symbol=="function"&&s[Symbol.iterator];if(!e)return s;var o=e.call(s),a,m=[],i;try{for(;(t===void 0||t-- >0)&&!(a=o.next()).done;)m.push(a.value)}catch(d){i={error:d}}finally{try{a&&!a.done&&(e=o.return)&&e.call(o)}finally{if(i)throw i.error}}return m};function xs(s){var t=s.zhName,e=s.enName,o=s.foregroundColour,a=s.backgroundColour,m=s.zhClassName,i=s.enClassName,d=s.passed,f=F.useRef(null),r=gs(F.useState({width:0}),2),l=r[0],c=r[1];F.useEffect(function(){f.current&&c(f.current.getBBox())},[t,e]);var h=Math.max(45,l.width+4);return n.jsxs("g",{textAnchor:"middle",fill:d?R.white:o,children:[n.jsx(Ht,{customWidth:h,fill:d?"#aaa":a}),n.jsxs("g",{ref:f,children:[n.jsx("text",{className:m,fontSize:8.5,y:8,dominantBaseline:"central",children:t}),n.jsx("text",{className:i,fontSize:5.5,y:18,dominantBaseline:"middle",children:e})]})]})}var Nn=function(s,t){var e=typeof Symbol=="function"&&s[Symbol.iterator];if(!e)return s;var o=e.call(s),a,m=[],i;try{for(;(t===void 0||t-- >0)&&!(a=o.next()).done;)m.push(a.value)}catch(d){i={error:d}}finally{try{a&&!a.done&&(e=o.return)&&e.call(o)}finally{if(i)throw i.error}}return m};function Cs(s){var t=s.zhName,e=s.enName,o=s.foregroundColour,a=s.backgroundColour,m=s.zhClassName,i=s.enClassName,d=s.passed,f=F.useRef(null),r=F.useRef(null),l=Nn(F.useState({width:0}),2),c=l[0],h=l[1],u=Nn(F.useState({width:0}),2),p=u[0],g=u[1];F.useEffect(function(){f.current&&h(f.current.getBBox()),r.current&&g(r.current.getBBox())},[t,e]);var C=Ne/Math.max(Ne,c.width),y=Ne/Math.max(Ne,p.width),b={nameZh:{y:7.3+13.5*(1-C)*C/2},nameEn:{y:19.5-9*(1-y)*y/2}};return n.jsxs("g",{textAnchor:"middle",fill:d?R.white:o,children:[n.jsx(Ht,{fill:d?"#aaa":a}),n.jsx("text",{ref:f,className:m,fontSize:12,transform:"translate(0,".concat(b.nameZh.y,")scale(").concat(C,")"),dominantBaseline:"central",children:t}),n.jsx("text",{ref:r,className:i,fontSize:8,transform:"translate(0,".concat(b.nameEn.y,")scale(").concat(y,")"),dominantBaseline:"middle",children:e})]})}var Ye=function(){return Ye=Object.assign||function(s){for(var t,e=1,o=arguments.length;e=5?n.jsx(xs,Ye({},t)):n.jsx(Cs,Ye({},t))}});var ys=function(s,t){var e=un(s);if(e!==void 0)return 1;var o=aa(s,t);return o!==void 0?2:3},en=function(){return en=Object.assign||function(s){for(var t,e=1,o=arguments.length;e0)&&!(a=o.next()).done;)m.push(a.value)}catch(d){i={error:d}}finally{try{a&&!a.done&&(e=o.return)&&e.call(o)}finally{if(i)throw i.error}}return m},At=15;function ia(s){var t=s.Icon,e=s.lineNum,o=s.stnNum,a=s.strokeColour,m=s.passed,i=s.size,d=s.textClassName,f=Os(s,["Icon","lineNum","stnNum","strokeColour","passed","size","textClassName"]),r=F.useRef(null),l=F.useRef(null),c=zn(F.useState({width:0}),2),h=c[0],u=c[1],p=zn(F.useState({width:0}),2),g=p[0],C=p[1];F.useEffect(function(){r.current&&u(r.current.getBBox()),l.current&&C(l.current.getBBox())},[e,o]);var y=At/Math.max(At,h.width),b=(e==null?void 0:e.length)===2&&(o==null?void 0:o.length)===2?y:At/Math.max(At,g.width),O=i==="sm"?"0.7":i==="lg"?"1.4":1;return n.jsx("g",nn({},f,{children:n.jsxs("g",{transform:"scale(".concat(O,")"),children:[n.jsx(t,{stroke:m?"#aaa":a,filled:!e&&!o}),(e||o)&&n.jsxs("g",{textAnchor:"middle",fontSize:13.5,fill:m?"#aaa":"#000",children:[n.jsx("g",{transform:"translate(-9.25,0)scale(".concat(y,")"),children:n.jsx("text",{ref:r,className:d,dominantBaseline:"central",x:.5,children:e})}),n.jsx("g",{transform:"translate(9.25,0)scale(".concat(b,")"),children:n.jsx("text",{ref:l,className:d,dominantBaseline:"central",children:o})})]})]})}))}var an=function(){return an=Object.assign||function(s){for(var t,e=1,o=arguments.length;e0)&&!(a=o.next()).done;)m.push(a.value)}catch(d){i={error:d}}finally{try{a&&!a.done&&(e=o.return)&&e.call(o)}finally{if(i)throw i.error}}return m},vs=function(s,t,e){if(e||arguments.length===2)for(var o=0,a=t.length,m;o=i.length)return console.warn(", anchor index ".concat(a," is out of bound")),[0,0];var l=on(i[a],2),c=l[0],h=l[1];return[-c,-h]},[i,a]),2),f=d[0],r=d[1];return n.jsxs("g",Pt({transform:"translate(".concat(f,",").concat(r,")")},m,{children:[t.map(function(l,c){var h=l.style,u=Tn(h);return n.jsx(u,{stroke:"#aaa",filled:!0,strokeWidth:Ke*7,transform:"translate(".concat(i[c][0],",").concat(i[c][1],")")},c)}),t.map(function(l,c){var h=l.style,u=Tn(h);return n.jsx(u,{stroke:"white",filled:!0,strokeWidth:Ke*2.6,transform:"translate(".concat(i[c][0],",").concat(i[c][1],")")},c)}),t.length&&n.jsx("rect",{fill:"white",x:-12,y:i[0][1],width:24,height:-i[0][1]*2}),t.map(function(l,c){var h=l.style,u=Bn(l,["style"]),p=h==="fmetro"?Ft:et;return n.jsx(p,Pt({transform:"translate(".concat(i[c][0],",").concat(i[c][1],")"),textClassName:e},u),c)})]}))}const _s=s=>{var ae,P,L;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,nameOffsetX:r=ye.nameOffsetX,nameOffsetY:l=ye.nameOffsetY,color:c=ye.color,lineCode:h=ye.lineCode,stationCode:u=ye.stationCode,open:p=ye.open,secondaryNames:g=ye.secondaryNames,tram:C=ye.tram}=(ae=a[k.GzmtrBasic])!=null?ae:ye,y=x.useCallback(z=>m(t,z),[t,m]),b=x.useCallback(z=>i(t,z),[t,i]),O=x.useCallback(z=>d(t,z),[t,d]),w=x.useRef(null);(L=(P=w.current)==null?void 0:P.querySelector("path"))==null||L.setAttribute("id","stn_core_".concat(t));const v={en:C?5.08:6.56,zh:C?7.29:13.13},N={top:{namesPos:1,lineHeight:v.en,polarity:-1},middle:{namesPos:0,lineHeight:0,polarity:0},bottom:{namesPos:0,lineHeight:v.zh,polarity:1}},S=C?11:15,j=r==="left"?-S:r==="right"?S:0,A=C?8:10,M=(f[N[l].namesPos].split("\n").length*N[l].lineHeight+A)*N[l].polarity,_=r==="left"?"end":r==="right"?"start":!p&&r==="middle"&&g.join("")===""?"end":"middle",E=x.useRef(null),[I,V]=x.useState(0);x.useEffect(()=>{var z,D;return V((D=(z=E.current)==null?void 0:z.getBBox().width)!=null?D:0)},[...g,C]);const G=x.useRef(null),[Q,Y]=x.useState(0);x.useEffect(()=>{var z,D;return Y((D=(z=G.current)==null?void 0:z.getBBox().width)!=null?D:0)},[...f,C]);const ce=r==="middle"?Q/2+(I+12*2)/2:(Q+(I+12*2)/2)*(r==="left"?-1:1),ne=r==="middle"&&g.join("")!==""?Q/2+(I+12*2):(Q+I+(I!==0?12*2:0))*(r==="left"?-1:r==="right"?1:0);return n.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[n.jsx("g",{transform:"scale(".concat(.57915*(C?.729:1),")"),onPointerDown:y,onPointerMove:b,onPointerUp:O,style:{cursor:"move"},ref:w,children:n.jsx(et,{id:"stn_core_".concat(t),strokeColour:c[2],lineNum:h===""?void 0:h,stnNum:u===""?void 0:u,textClassName:"rmp-name__zh"})}),n.jsxs("g",{ref:G,transform:"translate(".concat(j,", ").concat(M,")"),textAnchor:_,children:[n.jsx(T,{text:f[0].split("\n"),fontSize:v.zh,lineHeight:v.zh,grow:"up",className:"rmp-name__zh"}),n.jsx(T,{text:f[1].split("\n"),fontSize:v.en,lineHeight:v.en,grow:"down",className:"rmp-name__en"})]}),g.join("")!==""&&n.jsxs("g",{transform:"translate(".concat(j+ce,", ").concat(M,")"),textAnchor:"middle",children:[n.jsx("text",{fontSize:"13.13",dx:-(I+5)/2,textAnchor:"end",dominantBaseline:"middle",className:"rmp-name__zh",children:"("}),n.jsx("text",{fontSize:"13.13",dx:(I+5)/2,textAnchor:"start",dominantBaseline:"middle",className:"rmp-name__zh",children:")"}),n.jsxs("g",{ref:E,children:[n.jsx("text",{fontSize:"10",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:g[0]}),n.jsx("text",{fontSize:"5.42",dy:"2",dominantBaseline:"hanging",className:"rmp-name__en",children:g[1]})]})]}),!p&&n.jsxs("g",{transform:"translate(".concat(j+ne,", ").concat(M,")"),textAnchor:r==="middle"?"start":_,children:[n.jsx("text",{fontSize:"6.04",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:"(未开通)"}),n.jsx("text",{fontSize:"3.6",dy:"4",dominantBaseline:"hanging",className:"rmp-name__en",children:"(Under Construction)"})]})]})},ye={...$,nameOffsetX:"right",nameOffsetY:"top",color:[B.Guangzhou,"gz1","#F3D03E",R.black],lineCode:"1",stationCode:"01",open:!0,secondaryNames:["",""],tram:!1},Ss=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:a}=X(),m=[{type:"textarea",label:a("panel.details.stations.common.nameZh"),value:e.names[0],onChange:i=>{e.names[0]=i,o(t,e)},minW:"full"},{type:"textarea",label:a("panel.details.stations.common.nameEn"),value:e.names[1],onChange:i=>{e.names[1]=i,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:a("panel.details.stations.common.left"),middle:a("panel.details.stations.common.middle"),right:a("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetX=i,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:a("panel.details.stations.common.top"),middle:a("panel.details.stations.common.middle"),bottom:a("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetY=i,o(t,e)},minW:"full"},{type:"custom",label:a("color"),component:n.jsx(Ee,{type:k.GzmtrBasic,defaultTheme:ye.color})},{type:"input",label:a("panel.details.stations.common.lineCode"),value:e.lineCode,onChange:i=>{e.lineCode=i,o(t,e)},minW:"full"},{type:"input",label:a("panel.details.stations.common.stationCode"),value:e.stationCode,onChange:i=>{e.stationCode=i,o(t,e)},minW:"full"},{type:"switch",label:a("panel.details.stations.gzmtrBasic.open"),oneLine:!0,isChecked:e.open,onChange:i=>{e.open=i,o(t,e)},minW:"full"},{type:"input",label:a("panel.details.stations.gzmtrBasic.secondaryNameZh"),value:e.secondaryNames[0],onChange:i=>{e.secondaryNames[0]=i,o(t,e)},minW:"full"},{type:"input",label:a("panel.details.stations.gzmtrBasic.secondaryNameEn"),value:e.secondaryNames[1],onChange:i=>{e.secondaryNames[1]=i,o(t,e)},minW:"full"},{type:"switch",label:a("panel.details.stations.gzmtrBasic.tram"),oneLine:!0,isChecked:e.tram,onChange:i=>{e.tram=i,o(t,e)},minW:"full"}];return n.jsx(H,{fields:m})},ks=n.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:n.jsx("g",{transform:"translate(12,12)scale(0.45)",children:n.jsx(et,{strokeColour:"#000",lineNum:"1",stnNum:"01"})})}),Ns={component:_s,icon:ks,defaultAttrs:ye,attrsComponent:Ss,metadata:{displayName:"panel.details.stations.gzmtrBasic.displayName",cities:[B.Guangzhou],canvas:[Z.RailMap],categories:[q.Metro],tags:[]}},xt=[B.Guangzhou,"","#AAAAAA",R.white,"","","gz"];function ra(s){const{interchangeList:t,onAdd:e,onDelete:o,onUpdate:a}=s,m=tt(),{paletteAppClip:{output:i}}=nt(h=>h.runtime),{t:d}=X(),[f,r]=x.useState();x.useEffect(()=>{f!==void 0&&i&&(a==null||a(f,[...i,t[f][4],t[f][5],t[f][6]]),r(void 0))},[i==null?void 0:i.toString()]);const l=t.map((h,u)=>[{type:"input",label:d("panel.details.stations.common.lineCode"),value:h[4],minW:"80px",onChange:p=>a==null?void 0:a(u,[h[0],h[1],h[2],h[3],p,h[5],h[6]])},{type:"input",label:d("panel.details.stations.common.stationCode"),value:h[5],minW:"80px",onChange:p=>a==null?void 0:a(u,[h[0],h[1],h[2],h[3],h[4],p,h[6]])}]),c=(h,u,p)=>a==null?void 0:a(u,[h[0],h[1],h[2],h[3],h[4],h[5],p?"fs":"gz"]);return n.jsxs(cn,{direction:"column",children:[t.length===0&&n.jsxs(Fe,{spacing:.5,"data-testid":"interchange-card-stack",children:[n.jsx(fn,{as:"i",flex:1,align:"center",fontSize:"md",colorScheme:"gray",children:d("panel.details.stations.interchange.noInterchanges")}),n.jsx(ve,{size:"sm",variant:"ghost","aria-label":d("panel.details.stations.interchange.add"),onClick:()=>e==null?void 0:e(xt),icon:n.jsx(Pe,{})})]}),t.map((h,u)=>n.jsxs(Fe,{spacing:.5,"data-testid":"interchange-card-stack-".concat(u),children:[n.jsx(ge,{label:d("color"),minW:"40px",noLabel:u!==0,children:n.jsx(Dt,{theme:[h[0],h[1],h[2],h[3]],onClick:()=>{r(u),m(Xt([h[0],h[1],h[2],h[3]]))}})}),n.jsx(H,{fields:l[u],noLabel:u!==0}),n.jsxs(Ue,{children:[e&&u===l.length-1?n.jsx(ve,{size:"sm",variant:"ghost","aria-label":d("panel.details.stations.interchange.copy"),onClick:()=>e==null?void 0:e(t.slice(-1)[0]),icon:n.jsx(mn,{})}):n.jsx(hn,{minW:8}),o&&n.jsx(ve,{size:"sm",variant:"ghost","aria-label":d("panel.details.stations.interchange.remove"),onClick:()=>o==null?void 0:o(u),icon:n.jsx(Ct,{})}),n.jsx(H,{fields:[{type:"switch",label:d("panel.details.stations.gzmtrInt.foshan"),isChecked:h[6]==="fs",onChange:p=>c(h,u,p)}]})]})]},u))]})}const In=[[[0,0]],[[0,0]],[[-18,0],[18,0]],[[-19.395,-11.198],[19.395,-11.198],[0,22.395]],[[-15.836,-15.836],[15.836,-15.836],[15.836,15.836],[-15.836,15.836]]],Ms=s=>{var ae,P,L,z,D,he,ue,Ve,we,Me,bt,jt,Ot,at,st,Ge,vt,wt,_t,St,ot,le,kt,gn;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,nameOffsetX:r=Be.nameOffsetX,nameOffsetY:l=Be.nameOffsetY,transfer:c=Be.transfer,open:h=Be.open,secondaryNames:u=Be.secondaryNames,tram:p=Be.tram}=(ae=a[k.GzmtrInt])!=null?ae:Be,g=x.useCallback(U=>m(t,U),[t,m]),C=x.useCallback(U=>i(t,U),[t,i]),y=x.useCallback(U=>d(t,U),[t,d]),b=_a("white","var(--chakra-colors-gray-800)"),O={en:p?5.08:6.56,zh:p?7.29:13.13},w={top:{namesPos:1,lineHeight:O.en,polarity:-1},middle:{namesPos:0,lineHeight:0,polarity:0},bottom:{namesPos:0,lineHeight:O.zh,polarity:1}},v=p?13:20,N=(r==="left"?-v:r==="right"?v:0)*(l==="middle"?1.2:1),S=p?8:11,j=(f[w[l].namesPos].split("\n").length*w[l].lineHeight+S*(r==="middle"?1.8:1))*w[l].polarity,A=r==="left"?"end":r==="right"?"start":!h&&r==="middle"&&u.join("")===""?"end":"middle",M=c.flat().slice(0,4),_=[["black","black"],[(L=(P=M.at(0))==null?void 0:P.at(2))!=null?L:"black",(D=(z=M.at(0))==null?void 0:z.at(2))!=null?D:"black"],[(ue=(he=M.at(0))==null?void 0:he.at(2))!=null?ue:"black",(we=(Ve=M.at(1))==null?void 0:Ve.at(2))!=null?we:"black"],[(bt=(Me=M.at(0))==null?void 0:Me.at(2))!=null?bt:"black",(Ot=(jt=M.at(1))==null?void 0:jt.at(2))!=null?Ot:"black",(st=(at=M.at(2))==null?void 0:at.at(2))!=null?st:"black"],[(vt=(Ge=M.at(0))==null?void 0:Ge.at(2))!=null?vt:"black",(_t=(wt=M.at(1))==null?void 0:wt.at(2))!=null?_t:"black",(ot=(St=M.at(2))==null?void 0:St.at(2))!=null?ot:"black",(kt=(le=M.at(3))==null?void 0:le.at(2))!=null?kt:"black"]],E=x.useRef(null),[I,V]=x.useState(0);x.useEffect(()=>{var U,Ce;return V((Ce=(U=E.current)==null?void 0:U.getBBox().width)!=null?Ce:0)},[...u]);const G=x.useRef(null),[Q,Y]=x.useState(0);x.useEffect(()=>{var U,Ce;return Y((Ce=(U=G.current)==null?void 0:U.getBBox().width)!=null?Ce:0)},[...f]);const ce=(Q+(I+12*2)/2)*(r==="left"?-1:1),ne=(Q+I+(I!==0?12*2:0))*(r==="left"?-1:1);return n.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[M.map(U=>U[2]).filter((U,Ce,Nt)=>Nt.indexOf(U)===Ce).map(U=>n.jsx("marker",{id:"gzmtr_int_arrow_".concat(U),markerWidth:"5",markerHeight:"5",refX:"1",refY:"1.25",orient:"auto",children:n.jsx("polygon",{points:"0.25,0 0.25,2.5 2.25,1.25",fill:U})},"gzmtr_int_arrow_".concat(U))),n.jsxs("g",{transform:"scale(".concat(.57915*(p?.729:1),")"),children:[M.length<=2&&n.jsxs(n.Fragment,{children:[n.jsx("path",{d:"M -18,-12 A 24 24 0 0 1 18,-12 L 18,12 A 24 24 0 0 1 -18,12 Z",fill:b}),n.jsx("path",{d:"M -18,-12 A 24 24 0 0 1 18,-12",fill:"none",stroke:_[M.length][0],strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(_[M.length][0],")")}),n.jsx("path",{d:"M 18,12 A 24 24 0 0 1 -18,12",fill:"none",stroke:_[M.length][1],strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(_[M.length][1],")")})]}),M.length===3&&n.jsxs(n.Fragment,{children:[n.jsx("circle",{r:"22.395",fill:b}),n.jsx("path",{d:"M -19.3948,11.1976 A 22.395 22.395 0 0 1 0,-22.395",fill:"none",stroke:_[M.length][0],strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(_[M.length][0],")")}),n.jsx("path",{d:"M 0,-22.395 A 22.395 22.395 0 0 1 19.3948,11.1976",fill:"none",stroke:_[M.length][1],strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(_[M.length][1],")")}),n.jsx("path",{d:"M 19.3948,11.1976 A 22.395 22.395 0 0 1 -19.3948,11.1976",fill:"none",stroke:_[M.length][2],strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(_[M.length][2],")")}),n.jsx("path",{d:"M -19.3948,11.1976 A 22.395 22.395 0 0 1 0,-22.395",fill:"none",strokeOpacity:"0",stroke:"white",strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(_[M.length][0],")")}),n.jsx("path",{d:"M 0,-22.395 A 22.395 22.395 0 0 1 19.3948,11.1976",fill:"none",strokeOpacity:"0",stroke:"white",strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(_[M.length][1],")")})]}),M.length>=4&&n.jsxs(n.Fragment,{children:[n.jsx("circle",{r:"22.395",fill:b}),n.jsx("path",{d:"M -22.395,0 A 22.395 22.395 0 0 1 0,-22.395",fill:"none",stroke:_[M.length][0],strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(_[M.length][0],")")}),n.jsx("path",{d:"M 0,-22.395 A 22.395 22.395 0 0 1 22.395,0",fill:"none",stroke:_[M.length][1],strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(_[M.length][1],")")}),n.jsx("path",{d:"M 22.395,0 A 22.395 22.395 0 0 1 0,22.395",fill:"none",stroke:_[M.length][2],strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(_[M.length][2],")")}),n.jsx("path",{d:"M 0,22.395 A 22.395 22.395 0 0 1 -22.395,0",fill:"none",stroke:_[M.length][3],strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(_[M.length][3],")")}),n.jsx("path",{d:"M -22.395,0 A 22.395 22.395 0 0 1 0,-22.395",fill:"none",strokeOpacity:"0",stroke:"white",strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(_[M.length][0],")")}),n.jsx("path",{d:"M 0,-22.395 A 22.395 22.395 0 0 1 22.395,0",fill:"none",strokeOpacity:"0",stroke:"white",strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(_[M.length][1],")")}),n.jsx("path",{d:"M 22.395,0 A 22.395 22.395 0 0 1 0,22.395",fill:"none",strokeOpacity:"0",stroke:"white",strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(_[M.length][2],")")})]}),(gn=c[0])==null?void 0:gn.map((U,Ce,Nt)=>n.jsx("g",{transform:"translate(".concat(In[Nt.length][Ce][0],",").concat(In[Nt.length][Ce][1],")scale(0.6)"),children:U[6]==="gz"?n.jsx(et,{strokeColour:U[2],lineNum:U[4],stnNum:U[5],textClassName:"rmp-name__zh"}):n.jsx(Ft,{strokeColour:U[2],lineNum:U[4],stnNum:U[5],textClassName:"rmp-name__zh"})},"gzmtr_int_".concat(t,"_stn_").concat(Ce))),n.jsx("circle",{id:"stn_core_".concat(t),r:M.length===3?22.395:18,fill:"white",fillOpacity:"0",onPointerDown:g,onPointerMove:C,onPointerUp:y,style:{cursor:"move"}})]}),n.jsxs("g",{ref:G,transform:"translate(".concat(N,", ").concat(j,")"),textAnchor:A,children:[n.jsx(T,{text:f[0].split("\n"),fontSize:O.zh,lineHeight:O.zh,grow:"up",className:"rmp-name__zh"}),n.jsx(T,{text:f[1].split("\n"),fontSize:O.en,lineHeight:O.en,grow:"down",className:"rmp-name__en"})]}),u.join("")!==""&&n.jsxs("g",{transform:"translate(".concat(N+ce,", ").concat(j,")"),textAnchor:"middle",children:[n.jsx("text",{fontSize:"13.13",dx:-(I+5)/2,textAnchor:"end",dominantBaseline:"middle",className:"rmp-name__zh",children:"("}),n.jsx("text",{fontSize:"13.13",dx:(I+5)/2,textAnchor:"start",dominantBaseline:"middle",className:"rmp-name__zh",children:")"}),n.jsxs("g",{ref:E,children:[n.jsx("text",{fontSize:"10",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:u[0]}),n.jsx("text",{fontSize:"5.42",dy:"2",dominantBaseline:"hanging",className:"rmp-name__en",children:u[1]})]})]}),!h&&n.jsxs("g",{transform:"translate(".concat(N+ne,", ").concat(j,")"),textAnchor:A,children:[n.jsx("text",{fontSize:"6.04",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:"(未开通)"}),n.jsx("text",{fontSize:"3.6",dy:"4",dominantBaseline:"hanging",className:"rmp-name__en",children:"(Under Construction)"})]})]})},Be={...$,nameOffsetX:"right",nameOffsetY:"top",transfer:[[],[]],open:!0,secondaryNames:["",""],tram:!1},As=s=>{var h;const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:a}=X(),m=[{type:"textarea",label:a("panel.details.stations.common.nameZh"),value:e.names[0],onChange:u=>{e.names[0]=u,o(t,e)},minW:"full"},{type:"textarea",label:a("panel.details.stations.common.nameEn"),value:e.names[1],onChange:u=>{e.names[1]=u,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:a("panel.details.stations.common.left"),middle:a("panel.details.stations.common.middle"),right:a("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:u=>{e.nameOffsetX=u,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:a("panel.details.stations.common.top"),middle:a("panel.details.stations.common.middle"),bottom:a("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:u=>{e.nameOffsetY=u,o(t,e)},minW:"full"},{type:"switch",label:a("panel.details.stations.gzmtrInt.open"),oneLine:!0,isChecked:e.open,onChange:u=>{e.open=u,o(t,e)},minW:"full"},{type:"input",label:a("panel.details.stations.gzmtrInt.secondaryNameZh"),value:e.secondaryNames[0],onChange:u=>{e.secondaryNames[0]=u,o(t,e)},minW:"full"},{type:"input",label:a("panel.details.stations.gzmtrInt.secondaryNameEn"),value:e.secondaryNames[1],onChange:u=>{e.secondaryNames[1]=u.toString(),o(t,e)},minW:"full"},{type:"switch",label:a("panel.details.stations.gzmtrBasic.tram"),oneLine:!0,isChecked:e.tram,onChange:u=>{e.tram=u,o(t,e)},minW:"full"}],i=[4,4,0],d=(h=e.transfer)!=null?h:Be.transfer,f=u=>p=>{const g=structuredClone(d);if(g.length<=u)for(let C=g.length;C<=u;C++)g[C]=[xt];g[u].push(p),e.transfer=g,o(t,e)},r=u=>p=>{if(d.length>u&&d[u].length>p){const g=d.map((C,y)=>y===u?C.filter((b,O)=>O!==p):C);e.transfer=g,o(t,e)}},l=u=>(p,g)=>{if(d.length>u&&d[u].length>p){const C=d.map((y,b)=>b===u?y.map((O,w)=>w===p?[0,1,2,3,4,5,6].map(v=>g[v]===void 0?O[v]:g[v]):O):y);e.transfer=C,o(t,e)}},c=()=>f(d.length)(xt);return n.jsxs(n.Fragment,{children:[n.jsx(H,{fields:m}),n.jsx(ge,{label:a("panel.details.stations.interchange.title"),children:n.jsxs(Ue,{align:"flex-start",children:[d.map((u,p)=>n.jsxs(x.Fragment,{children:[n.jsx(Yt,{size:"xs",children:a(p===0?"panel.details.stations.interchange.within":p===1?"panel.details.stations.interchange.outStation":"panel.details.stations.interchange.outSystem")}),n.jsx(ra,{interchangeList:u,onAdd:i[p]>u.length?f(p):void 0,onDelete:r(p),onUpdate:l(p)})]},p)),i[d.length]>0&&n.jsx(pe,{size:"xs",variant:"ghost",alignSelf:"flex-end",leftIcon:n.jsx(Pe,{}),onClick:c,children:a("panel.details.stations.interchange.addGroup")})]})})]})},zs=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("g",{transform:"translate(6,12)scale(0.3)",children:n.jsx(et,{strokeColour:"currentColor",lineNum:"1",stnNum:"09"})}),n.jsx("g",{transform:"translate(18,12)scale(0.3)",children:n.jsx(et,{strokeColour:"currentColor",lineNum:"2",stnNum:"13"})}),n.jsx("marker",{id:"arrow",markerWidth:"5",markerHeight:"5",refX:"1",refY:"1.25",orient:"auto",children:n.jsx("polygon",{points:"0,0 0,3 2,1.5"})}),n.jsx("path",{d:"M 6,6 A 8 8 0 0 1 18,6",fill:"none",stroke:"currentColor",strokeWidth:"2",markerEnd:"url(#arrow)"}),n.jsx("path",{d:"M 18,18 A 8 8 0 0 1 6,18",fill:"none",stroke:"currentColor",strokeWidth:"2",markerEnd:"url(#arrow)"})]}),Bs={component:Ms,icon:zs,defaultAttrs:Be,attrsComponent:As,metadata:{displayName:"panel.details.stations.gzmtrInt.displayName",cities:[B.Guangzhou],canvas:[Z.RailMap],categories:[q.Metro],tags:[]}},ca={en:6.56,zh:13.13},gt=structuredClone(ee);gt.top.lineHeight=ca.en;gt.bottom.lineHeight=ca.zh;const Ts=s=>{var ae,P,L;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,nameOffsetX:r=_e.nameOffsetX,nameOffsetY:l=_e.nameOffsetY,transfer:c=_e.transfer,open:h=_e.open,secondaryNames:u=_e.secondaryNames,preferVertical:p=_e.preferVertical,anchorAt:g=_e.anchorAt}=(ae=a[k.GzmtrInt2024])!=null?ae:_e,C=x.useCallback(z=>m(t,z),[t,m]),y=x.useCallback(z=>i(t,z),[t,i]),b=x.useCallback(z=>d(t,z),[t,d]),O=c.flat().slice(0,4),w=x.useRef(null);(L=(P=w.current)==null?void 0:P.querySelectorAll("path"))==null||L.forEach(z=>z.setAttribute("id","stn_core_".concat(t)));const[v,N]=x.useState({x1:0,x2:0,y1:0,y2:0});x.useEffect(()=>{const{height:z,width:D,x:he,y:ue}=w.current.getBBox(),[Ve,we]=[he+D,ue+z];N({x1:he,x2:Ve,y1:ue,y2:we})},[JSON.stringify(O),p,g,N,w]);const S=p&&O.length===2?0:8,j=O.map(z=>({style:z[6]==="gz"?"gzmtr":"fmetro",lineNum:z[4],stnNum:z[5],strokeColour:z[2]})),A=r==="left"?v.x1+S:r==="right"?v.x2-S:0,M=(f[gt[l].namesPos].split("\n").length*gt[l].lineHeight+(v.y2-v.y1)/2)*gt[l].polarity,_=r==="left"?"end":r==="right"?"start":!h&&r==="middle"&&u.join("")===""?"end":"middle",E=x.useRef(null),[I,V]=x.useState(0);x.useEffect(()=>{var z,D;return V((D=(z=E.current)==null?void 0:z.getBBox().width)!=null?D:0)},[...u]);const G=x.useRef(null),[Q,Y]=x.useState(0);x.useEffect(()=>{var z,D;return Y((D=(z=G.current)==null?void 0:z.getBBox().width)!=null?D:0)},[...f]);const ce=(Q+(I+12*2)/2)*(r==="left"?-1:1),ne=(Q+I+(I!==0?12*2:0))*(r==="left"?-1:1);return n.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[n.jsx("g",{transform:"scale(0.56)",onPointerDown:C,onPointerMove:y,onPointerUp:b,style:{cursor:"move"},ref:w,children:n.jsx(la,{stations:j,textClassName:"rmp-name__zh",preferVertical:p,anchorAt:g>=0?g:void 0})}),n.jsxs("g",{ref:G,transform:"translate(".concat(A,", ").concat(M,")"),textAnchor:_,children:[n.jsx(T,{text:f[0].split("\n"),fontSize:13.13,lineHeight:13.13,grow:"up",className:"rmp-name__zh"}),n.jsx(T,{text:f[1].split("\n"),fontSize:6.56,lineHeight:6.56,grow:"down",className:"rmp-name__en"})]}),u.join("")!==""&&n.jsxs("g",{transform:"translate(".concat(A+ce,", ").concat(M,")"),textAnchor:"middle",children:[n.jsx("text",{fontSize:"13.13",dx:-(I+5)/2,textAnchor:"end",dominantBaseline:"middle",className:"rmp-name__zh",children:"("}),n.jsx("text",{fontSize:"13.13",dx:(I+5)/2,textAnchor:"start",dominantBaseline:"middle",className:"rmp-name__zh",children:")"}),n.jsxs("g",{ref:E,children:[n.jsx("text",{fontSize:"10",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:u[0]}),n.jsx("text",{fontSize:"5.42",dy:"2",dominantBaseline:"hanging",className:"rmp-name__en",children:u[1]})]})]}),!h&&n.jsxs("g",{transform:"translate(".concat(A+ne,", ").concat(M,")"),textAnchor:_,children:[n.jsx("text",{fontSize:"6.04",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:"(未开通)"}),n.jsx("text",{fontSize:"3.6",dy:"4",dominantBaseline:"hanging",className:"rmp-name__en",children:"(Under Construction)"})]})]})},_e={...$,nameOffsetX:"right",nameOffsetY:"top",transfer:[[[B.Guangzhou,"gz1","#F3D03E",R.white,"1","14","gz"],[B.Guangzhou,"gz3","#ECA154",R.white,"3","11","gz"]]],open:!0,secondaryNames:["",""],preferVertical:!0,anchorAt:-1},Is=s=>{var h,u;const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:a}=X(),m=[{type:"textarea",label:a("panel.details.stations.common.nameZh"),value:e.names[0],onChange:p=>{e.names[0]=p,o(t,e)},minW:"full"},{type:"textarea",label:a("panel.details.stations.common.nameEn"),value:e.names[1],onChange:p=>{e.names[1]=p,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:a("panel.details.stations.common.left"),middle:a("panel.details.stations.common.middle"),right:a("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:p=>{e.nameOffsetX=p,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:a("panel.details.stations.common.top"),middle:a("panel.details.stations.common.middle"),bottom:a("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:p=>{e.nameOffsetY=p,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.gzmtrInt2024.anchorAt"),value:(h=e.anchorAt)!=null?h:"-1",options:{"-1":a("panel.details.stations.gzmtrInt2024.anchorAtNone"),...Object.fromEntries(Array.from({length:Math.min(e.transfer.flat().length,4)},(p,g)=>[g.toString(),g]))},onChange:p=>{e.anchorAt=Number(p),o(t,e)},minW:"full"},{type:"switch",label:a("panel.details.stations.gzmtrInt2024.preferVertical"),oneLine:!0,isChecked:e.preferVertical,onChange:p=>{e.preferVertical=p,o(t,e)},minW:"full"},{type:"switch",label:a("panel.details.stations.gzmtrInt.open"),oneLine:!0,isChecked:e.open,onChange:p=>{e.open=p,o(t,e)},minW:"full"},{type:"input",label:a("panel.details.stations.gzmtrInt.secondaryNameZh"),value:e.secondaryNames[0],onChange:p=>{e.secondaryNames[0]=p,o(t,e)},minW:"full"},{type:"input",label:a("panel.details.stations.gzmtrInt.secondaryNameEn"),value:e.secondaryNames[1],onChange:p=>{e.secondaryNames[1]=p.toString(),o(t,e)},minW:"full"}],i=[4,4,0],d=(u=e.transfer)!=null?u:_e.transfer,f=p=>g=>{const C=structuredClone(d);if(C.length<=p)for(let y=C.length;y<=p;y++)C[y]=[xt];C[p].push(g),e.transfer=C,o(t,e)},r=p=>g=>{if(d.length>p&&d[p].length>g){const C=d.map((y,b)=>b===p?y.filter((O,w)=>w!==g):y);e.transfer=C,e.anchorAt=-1,o(t,e)}},l=p=>(g,C)=>{if(d.length>p&&d[p].length>g){const y=d.map((b,O)=>O===p?b.map((w,v)=>v===g?[0,1,2,3,4,5,6].map(N=>C[N]===void 0?w[N]:C[N]):w):b);e.transfer=y,o(t,e)}},c=()=>f(d.length)(xt);return n.jsxs(n.Fragment,{children:[n.jsx(H,{fields:m}),n.jsx(ge,{label:a("panel.details.stations.interchange.title"),children:n.jsxs(Ue,{align:"flex-start",children:[d.map((p,g)=>n.jsxs(x.Fragment,{children:[n.jsx(Yt,{size:"xs",children:a(g===0?"panel.details.stations.interchange.within":g===1?"panel.details.stations.interchange.outStation":"panel.details.stations.interchange.outSystem")}),n.jsx(ra,{interchangeList:p,onAdd:i[g]>p.length?f(g):void 0,onDelete:r(g),onUpdate:l(g)})]},g)),i[d.length]>0&&n.jsx(pe,{size:"xs",variant:"ghost",alignSelf:"flex-end",leftIcon:n.jsx(Pe,{}),onClick:c,children:a("panel.details.stations.interchange.addGroup")})]})})]})},Es=n.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:n.jsx(la,{stations:[{strokeColour:"currentColor",lineNum:"3",stnNum:"03"},{strokeColour:"currentColor",lineNum:"7",stnNum:"05"}],textClassName:"rmp-name__zh",preferVertical:!0,transform:"translate(12,12)scale(0.3)"})}),$s={component:Ts,icon:Es,defaultAttrs:_e,attrsComponent:Is,metadata:{displayName:"panel.details.stations.gzmtrInt2024.displayName",cities:[B.Guangzhou],canvas:[Z.RailMap],categories:[q.Metro],tags:[]}},te={zh:9,en:6.2,top:6.2+1,middle:0,bottom:10},Ps=s=>{var O;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,nameOffsetX:r=me.nameOffsetX,nameOffsetY:l=me.nameOffsetY,open:c=me.open}=(O=a[k.BjsubwayBasic])!=null?O:me,h=x.useCallback(w=>m(t,w),[t,m]),u=x.useCallback(w=>i(t,w),[t,i]),p=x.useCallback(w=>d(t,w),[t,d]),g=(w,v)=>w==="left"&&v==="top"?[-4,-(f[1].split("\n").length+(c?0:1))*te[v]-1]:w==="middle"&&v==="top"?[0,-(f[1].split("\n").length+(c?0:1))*te[v]-4]:w==="right"&&v==="top"?[4,-(f[1].split("\n").length+(c?0:1))*te[v]-1]:w==="left"&&v==="bottom"?[-4,f[0].split("\n").length*te[v]+1]:w==="middle"&&v==="bottom"?[0,f[0].split("\n").length*te[v]+4]:w==="right"&&v==="bottom"?[4,f[0].split("\n").length*te[v]+1]:w==="left"&&v==="middle"?[-5,0]:w==="right"&&v==="middle"?[5,0]:[0,0],[C,y]=g(r,l),b=r==="left"?"end":r==="right"?"start":"middle";return n.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[n.jsx("circle",{id:"stn_core_".concat(t),r:"4",stroke:"black",strokeWidth:"0.5",strokeDasharray:c?void 0:"1.5",fill:"white",onPointerDown:h,onPointerMove:u,onPointerUp:p,style:{cursor:"move"}}),n.jsxs("g",{transform:"translate(".concat(C,", ").concat(y,")"),textAnchor:b,children:[n.jsx(T,{text:f[0].split("\n"),fontSize:te.zh,lineHeight:te.zh,grow:"up",className:"rmp-name__zh",baseOffset:1}),n.jsx(T,{text:f[1].split("\n"),fontSize:te.en,lineHeight:te.en,grow:"down",className:"rmp-name__en",baseOffset:1}),!c&&n.jsx("text",{dy:f[1].split("\n").length*te.en+2,fontSize:te.en,dominantBaseline:"hanging",className:"rmp-name__zh",children:"(暂缓开通)"})]})]})},me={...$,nameOffsetX:"right",nameOffsetY:"top",open:!0},Ws=[{type:"textarea",label:"panel.details.stations.common.nameZh",value:s=>(s!=null?s:me).names[0],onChange:(s,t)=>{const e=t!=null?t:me;return e.names[0]=s.toString(),e}},{type:"textarea",label:"panel.details.stations.common.nameEn",value:s=>(s!=null?s:me).names[1],onChange:(s,t)=>{const e=t!=null?t:me;return e.names[1]=s.toString(),e}},{type:"select",label:"panel.details.stations.common.nameOffsetX",value:s=>(s!=null?s:me).nameOffsetX,options:{left:"left",middle:"middle",right:"right"},disabledOptions:s=>(s==null?void 0:s.nameOffsetY)==="middle"?["middle"]:[],onChange:(s,t)=>{const e=t!=null?t:me;return e.nameOffsetX=s,e}},{type:"select",label:"panel.details.stations.common.nameOffsetY",value:s=>(s!=null?s:me).nameOffsetY,options:{top:"top",middle:"middle",bottom:"bottom"},disabledOptions:s=>(s==null?void 0:s.nameOffsetX)==="middle"?["middle"]:[],onChange:(s,t)=>{const e=t!=null?t:me;return e.nameOffsetY=s,e}},{type:"switch",label:"panel.details.stations.bjsubwayBasic.open",oneLine:!0,isChecked:s=>(s!=null?s:me).open,onChange:(s,t)=>{const e=t!=null?t:me;return e.open=s,e}}],Rs=()=>n.jsx(dn,{fields:Ws}),Ds=n.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:n.jsx("circle",{cx:"12",cy:"12",r:"4",stroke:"currentColor",strokeWidth:"0.5",fill:"none"})}),Xs={component:Ps,icon:Ds,defaultAttrs:me,attrsComponent:Rs,metadata:{displayName:"panel.details.stations.bjsubwayBasic.displayName",cities:[B.Beijing],canvas:[Z.RailMap],categories:[q.Metro],tags:[]}},ma="M 8.359893 4.159288 C 8.368828 4.168825 8.460953 4.26852 8.57038 4.386985 C 8.679807 4.505449 8.860802 4.701382 8.972592 4.822389 C 9.084381 4.943397 9.238666 5.110407 9.315445 5.193521 C 9.392224 5.276636 9.519867 5.414817 9.599094 5.500589 C 9.678323 5.58636 9.801023 5.719209 9.871761 5.795812 C 9.942499 5.872413 10.000208 5.935256 9.999999 5.935465 C 9.999792 5.935671 9.975513 5.928466 9.946045 5.919453 C 9.916577 5.910439 9.831826 5.88438 9.757708 5.861543 C 9.683591 5.838706 9.532284 5.791997 9.421472 5.757746 C 9.310658 5.723495 9.190374 5.686309 9.154173 5.675113 C 9.11797 5.663918 9.048485 5.642428 8.99976 5.627359 C 8.951035 5.612291 8.910275 5.599729 8.909181 5.599446 C 8.907193 5.59893 8.907193 5.59893 8.907135 5.798288 C 8.907103 5.907935 8.906695 6.128369 8.906229 6.288144 C 8.905446 6.555825 8.905249 6.580968 8.903705 6.608245 C 8.902784 6.624527 8.90139 6.647987 8.900606 6.660379 C 8.899822 6.672773 8.898192 6.695836 8.896983 6.711632 C 8.895774 6.727427 8.893582 6.753074 8.892114 6.768627 C 8.890645 6.784179 8.888061 6.80923 8.88637 6.824296 C 8.884679 6.839362 8.88172 6.864065 8.879793 6.879189 C 8.877868 6.894315 8.874691 6.917777 8.872734 6.931325 C 8.870777 6.944874 8.867386 6.967292 8.865197 6.981143 C 8.863009 6.994995 8.859045 7.018654 8.856388 7.03372 C 8.853731 7.048786 8.849344 7.072617 8.84664 7.086676 C 8.843935 7.100736 8.839338 7.1236 8.836424 7.137486 C 8.833509 7.151371 8.828584 7.174065 8.825479 7.187916 C 8.822371 7.201767 8.817014 7.224831 8.81357 7.239167 C 8.810127 7.253505 8.80431 7.276767 8.800644 7.29086 C 8.796978 7.304955 8.791035 7.327222 8.787437 7.340344 C 8.78384 7.353467 8.77752 7.375735 8.773395 7.389829 C 8.769268 7.403923 8.762319 7.426986 8.757952 7.441081 C 8.753583 7.455174 8.746363 7.47784 8.741903 7.491448 C 8.737446 7.505056 8.729829 7.527523 8.724978 7.541374 C 8.720126 7.555225 8.712182 7.577493 8.707321 7.590858 C 8.702462 7.604224 8.6948 7.624901 8.690294 7.636807 C 8.68579 7.648715 8.677304 7.670452 8.671437 7.685113 C 8.665571 7.699773 8.656536 7.721842 8.651362 7.734155 C 8.646187 7.746468 8.63796 7.765688 8.63308 7.776865 C 8.628201 7.788043 8.620145 7.806136 8.615178 7.817071 C 8.610211 7.828006 8.60083 7.848286 8.594332 7.862138 C 8.587832 7.875988 8.573873 7.904618 8.563307 7.92576 C 8.552743 7.946901 8.537873 7.975929 8.530265 7.990266 C 8.522656 8.004602 8.511053 8.026075 8.504479 8.037983 C 8.497905 8.04989 8.486739 8.069772 8.479666 8.082165 C 8.472593 8.094558 8.460988 8.11444 8.453878 8.126348 C 8.446768 8.138254 8.435438 8.156944 8.428702 8.167879 C 8.421966 8.178814 8.410628 8.196906 8.403507 8.208085 C 8.396386 8.219262 8.384013 8.238349 8.37601 8.2505 C 8.36801 8.26265 8.354345 8.282929 8.345645 8.295566 C 8.336946 8.308201 8.322885 8.328276 8.314397 8.340175 C 8.305909 8.352074 8.292209 8.37096 8.283951 8.382147 C 8.275693 8.393333 8.261178 8.41259 8.251695 8.42494 C 8.242211 8.437289 8.225837 8.458165 8.215304 8.471332 C 8.204773 8.484497 8.189062 8.503819 8.18039 8.514267 C 8.17172 8.524716 8.157459 8.541616 8.148703 8.551823 C 8.139945 8.562029 8.125004 8.579116 8.115499 8.589793 C 8.105992 8.600471 8.091457 8.616575 8.083197 8.625581 C 8.074937 8.634586 8.060843 8.649709 8.05188 8.659185 C 8.042916 8.668662 8.018659 8.69335 7.997974 8.714046 C 7.977291 8.734741 7.953162 8.758432 7.944355 8.766693 C 7.935549 8.774953 7.920821 8.788638 7.911628 8.797104 C 7.902433 8.805571 7.887569 8.819082 7.878597 8.827129 C 7.869623 8.835177 7.853733 8.849096 7.843284 8.858062 C 7.832834 8.867027 7.816133 8.881153 7.806171 8.889453 C 7.796208 8.897753 7.779904 8.911098 7.769942 8.919111 C 7.759978 8.927123 7.743874 8.939848 7.734154 8.947388 C 7.724434 8.954926 7.708329 8.96721 7.698366 8.974683 C 7.688403 8.982156 7.673093 8.993497 7.664346 8.999885 C 7.655598 9.006271 7.637505 9.019163 7.62414 9.02853 C 7.610775 9.037899 7.588109 9.053377 7.573772 9.062926 C 7.559434 9.072475 7.538474 9.086151 7.527194 9.093318 C 7.515913 9.100485 7.497422 9.112045 7.486104 9.119009 C 7.474786 9.125973 7.454846 9.137918 7.441793 9.145553 C 7.428741 9.153188 7.405677 9.166317 7.390542 9.174728 C 7.375406 9.18314 7.352087 9.19579 7.338722 9.20284 C 7.325357 9.209889 7.303686 9.221025 7.290564 9.227587 C 7.277442 9.234147 7.256366 9.2444 7.243731 9.250369 C 7.231095 9.256339 7.211213 9.265569 7.199549 9.27088 C 7.187884 9.27619 7.168797 9.28464 7.157134 9.289659 C 7.145469 9.294676 7.124792 9.303333 7.111184 9.308895 C 7.097576 9.31446 7.075367 9.323255 7.061831 9.328442 C 7.048295 9.333629 7.027816 9.341289 7.016323 9.345462 C 7.00483 9.349636 6.978328 9.358748 6.95743 9.365711 C 6.936532 9.372675 6.906311 9.382359 6.890272 9.38723 C 6.874235 9.392101 6.849581 9.399302 6.835486 9.403231 C 6.821393 9.40716 6.796739 9.413705 6.7807 9.417776 C 6.764662 9.421847 6.740208 9.427785 6.726356 9.430971 C 6.712505 9.434157 6.689641 9.439174 6.675548 9.442118 C 6.661452 9.445063 6.639384 9.449434 6.626504 9.451833 C 6.613625 9.454231 6.591038 9.458187 6.57631 9.460623 C 6.561581 9.463058 6.538518 9.46664 6.525058 9.468584 C 6.511598 9.470528 6.487662 9.473704 6.471867 9.475644 C 6.456071 9.477583 6.433207 9.480169 6.421057 9.481392 C 6.408907 9.482615 6.387236 9.4846 6.372898 9.485805 C 6.358561 9.487008 6.333112 9.488794 6.316345 9.489771 C 6.299578 9.490749 6.276316 9.491956 6.264652 9.492452 C 6.252987 9.492949 6.216803 9.493517 6.18424 9.493716 C 6.151678 9.493916 6.114499 9.493756 6.10162 9.493363 C 6.088739 9.49297 6.06866 9.492202 6.056995 9.491656 C 6.045331 9.491112 6.026046 9.490059 6.014138 9.489319 C 6.002231 9.488579 5.982548 9.487186 5.970398 9.486226 C 5.958248 9.485266 5.939956 9.483668 5.92975 9.482677 C 5.919544 9.481687 5.902445 9.479897 5.891753 9.478702 C 5.881061 9.477505 5.864443 9.475529 5.854823 9.47431 C 5.845204 9.47309 5.827708 9.470707 5.815943 9.469012 C 5.804178 9.467319 5.784412 9.464314 5.77202 9.462336 C 5.759627 9.460358 5.745908 9.458071 5.741535 9.457253 C 5.733583 9.455767 5.733583 9.455767 5.750813 9.451963 C 5.76029 9.449871 5.778183 9.445793 5.790576 9.442902 C 5.802969 9.440009 5.82305 9.435088 5.8352 9.431966 C 5.847351 9.428843 5.867067 9.423503 5.879014 9.420099 C 5.890961 9.416695 5.911639 9.410524 5.924964 9.406386 C 5.938288 9.402248 5.960324 9.395124 5.973932 9.390556 C 5.98754 9.385988 6.008053 9.378835 6.019516 9.374659 C 6.030978 9.370483 6.050462 9.363131 6.062815 9.358321 C 6.075166 9.353508 6.094417 9.34577 6.105595 9.341125 C 6.116774 9.336478 6.135264 9.328524 6.146685 9.323448 C 6.158106 9.318373 6.177591 9.309499 6.189984 9.303728 C 6.202377 9.297957 6.224247 9.287379 6.238585 9.280221 C 6.252921 9.273063 6.273399 9.262563 6.284092 9.256887 C 6.294784 9.251213 6.314865 9.240225 6.328716 9.232468 C 6.342567 9.224712 6.361654 9.213777 6.371131 9.208166 C 6.380608 9.202557 6.396514 9.192982 6.406477 9.18689 C 6.41644 9.180798 6.432345 9.170843 6.441822 9.164769 C 6.4513 9.158695 6.467404 9.14816 6.47761 9.141357 C 6.487816 9.134555 6.50392 9.123611 6.513398 9.117039 C 6.522875 9.110467 6.539177 9.098936 6.549627 9.091415 C 6.560077 9.083895 6.577971 9.070704 6.589391 9.062101 C 6.600812 9.053498 6.618895 9.039583 6.629575 9.031179 C 6.640255 9.022773 6.656757 9.009534 6.666247 9.001758 C 6.675736 8.993981 6.692227 8.980227 6.702893 8.971191 C 6.713559 8.962157 6.730458 8.94742 6.740448 8.938442 C 6.750437 8.929464 6.766562 8.914768 6.776282 8.905784 C 6.786003 8.896801 6.803698 8.880239 6.815604 8.868983 C 6.827512 8.857727 6.843456 8.842402 6.851037 8.834927 C 6.858617 8.827451 6.873728 8.812176 6.884615 8.800982 C 6.895503 8.789788 6.912683 8.77174 6.922792 8.760878 C 6.932902 8.750012 6.949699 8.731606 6.960117 8.719973 C 6.970537 8.70834 6.986147 8.690599 6.994807 8.68055 C 7.003467 8.670501 7.017852 8.65353 7.026772 8.642838 C 7.035693 8.632146 7.053 8.610872 7.065231 8.595562 C 7.077464 8.580254 7.09533 8.557407 7.104936 8.544792 C 7.114541 8.532177 7.129989 8.511499 7.139265 8.498842 C 7.14854 8.486185 7.164221 8.464337 7.174109 8.450293 C 7.183999 8.436249 7.199718 8.413383 7.209044 8.399484 C 7.218369 8.385583 7.232209 8.364666 7.2398 8.353003 C 7.247391 8.341338 7.260236 8.321177 7.268346 8.3082 C 7.276455 8.295223 7.289493 8.27395 7.297318 8.260925 C 7.305143 8.247901 7.317313 8.227304 7.32436 8.215153 C 7.331408 8.203004 7.344023 8.180735 7.352394 8.165669 C 7.360765 8.150602 7.372812 8.128534 7.379167 8.116627 C 7.385522 8.104719 7.396764 8.083248 7.404151 8.06891 C 7.411537 8.054573 7.422352 8.0331 7.428184 8.021194 C 7.434016 8.009287 7.443347 7.990001 7.448918 7.978336 C 7.45449 7.966672 7.463351 7.947784 7.468609 7.936364 C 7.473868 7.924943 7.482234 7.906453 7.4872 7.895274 C 7.492166 7.884096 7.500586 7.86481 7.505909 7.852417 C 7.511233 7.840024 7.519759 7.819808 7.524855 7.807493 C 7.529951 7.795179 7.538242 7.7747 7.543279 7.761986 C 7.548316 7.749271 7.556671 7.727735 7.561847 7.714127 C 7.567022 7.700519 7.57545 7.677853 7.580575 7.663759 C 7.585701 7.649664 7.594637 7.624414 7.600433 7.607646 C 7.60623 7.59088 7.615365 7.563642 7.620735 7.547118 C 7.626104 7.530593 7.634661 7.503554 7.63975 7.48703 C 7.644838 7.470506 7.653173 7.442472 7.658273 7.424733 C 7.663371 7.406994 7.671309 7.378562 7.675913 7.361553 C 7.680518 7.344542 7.688414 7.314123 7.69346 7.293953 C 7.698508 7.273784 7.705483 7.244955 7.708961 7.229889 C 7.712439 7.214823 7.717614 7.19176 7.720461 7.178638 C 7.723308 7.165516 7.728016 7.143247 7.730923 7.129154 C 7.733829 7.115059 7.738621 7.090804 7.74157 7.075251 C 7.74452 7.0597 7.749294 7.033455 7.752179 7.016931 C 7.755066 7.000407 7.759431 6.974154 7.761884 6.958592 C 7.764333 6.94303 7.768123 6.917978 7.770304 6.902922 C 7.772485 6.887866 7.775877 6.86322 7.777843 6.848155 C 7.779809 6.833088 7.783001 6.807043 7.784938 6.790275 C 7.786876 6.773509 7.789651 6.74806 7.791106 6.733722 C 7.792561 6.719385 7.794953 6.693936 7.796421 6.677169 C 7.797888 6.660402 7.800071 6.632964 7.801272 6.616198 C 7.802474 6.599431 7.804076 6.575174 7.804832 6.562295 C 7.80559 6.549416 7.806592 6.532119 7.807061 6.523856 C 7.807529 6.515595 7.80835 6.421553 7.808886 6.314875 C 7.809421 6.208197 7.809724 6.003942 7.80956 5.860975 C 7.809398 5.718009 7.809015 5.600789 7.808712 5.600486 C 7.808408 5.600182 7.68663 5.63752 7.538092 5.68346 C 7.389553 5.7294 7.213946 5.783698 7.147853 5.804122 C 7.08176 5.824546 6.974794 5.857548 6.910151 5.877461 C 6.845508 5.897371 6.776261 5.918652 6.75627 5.924749 C 6.736279 5.930848 6.719744 5.935658 6.719525 5.93544 C 6.719306 5.935221 6.790938 5.857274 6.878708 5.762224 C 6.966477 5.667175 7.110461 5.511271 7.198671 5.415771 C 7.286881 5.320272 7.433807 5.161213 7.525173 5.062309 C 7.616539 4.963404 7.76605 4.801562 7.857421 4.702663 C 7.948792 4.603762 8.093983 4.446596 8.180069 4.353404 C 8.266154 4.260212 8.341831 4.178411 8.34824 4.171626 L 8.359893 4.159288 Z M 3.639928 8.15987 C 3.639606 8.15984 3.567056 8.081517 3.478708 7.985821 C 3.390359 7.890125 3.197014 7.680786 3.049051 7.520623 C 2.901089 7.36046 2.662314 7.101986 2.518441 6.946236 C 2.374568 6.790486 2.198977 6.60038 2.128238 6.523779 C 2.0575 6.447177 1.999793 6.384333 2 6.384126 C 2.000208 6.383919 2.024487 6.391125 2.053954 6.40014 C 2.083422 6.409154 2.157237 6.431839 2.217988 6.450549 C 2.278738 6.469259 2.375968 6.499262 2.434052 6.517222 C 2.492137 6.535182 2.553174 6.55407 2.569692 6.559195 C 2.586209 6.564321 2.709718 6.602509 2.844157 6.644057 C 2.978595 6.685606 3.089538 6.719839 3.090698 6.72013 C 3.092807 6.72066 3.092807 6.72066 3.092866 6.520418 C 3.092898 6.410285 3.093306 6.18985 3.093772 6.030562 C 3.094553 5.763748 3.094752 5.738617 3.096295 5.711344 C 3.097217 5.695064 3.098611 5.671603 3.099395 5.659211 C 3.100178 5.646816 3.101808 5.623754 3.103017 5.607958 C 3.104227 5.592164 3.106418 5.566515 3.107887 5.550963 C 3.109355 5.535411 3.111941 5.51036 3.113633 5.495295 C 3.115324 5.480227 3.118114 5.456767 3.119833 5.443159 C 3.121551 5.429551 3.124544 5.407283 3.126484 5.393674 C 3.128424 5.380066 3.13179 5.357599 3.133963 5.343748 C 3.136135 5.329897 3.139918 5.307034 3.142369 5.292939 C 3.144819 5.278845 3.149205 5.254788 3.152116 5.239479 C 3.155027 5.224168 3.159971 5.199397 3.163101 5.184428 C 3.16623 5.169459 3.171352 5.145801 3.174481 5.131851 C 3.17761 5.117902 3.182986 5.094759 3.18643 5.080422 C 3.189873 5.066085 3.19569 5.042824 3.199356 5.028729 C 3.203022 5.014635 3.208965 4.992367 3.212563 4.979245 C 3.21616 4.966123 3.222479 4.943855 3.226605 4.929761 C 3.230732 4.915667 3.237681 4.892604 3.242049 4.878509 C 3.246417 4.864415 3.253638 4.84175 3.258096 4.828142 C 3.262555 4.814533 3.270171 4.792067 3.275023 4.778216 C 3.279873 4.764364 3.287818 4.742096 3.292678 4.728731 C 3.297538 4.715366 3.3052 4.694689 3.309704 4.682783 C 3.31421 4.670875 3.322696 4.649137 3.328563 4.634478 C 3.33443 4.619817 3.343463 4.597748 3.348639 4.585434 C 3.353813 4.573122 3.36204 4.553902 3.36692 4.542725 C 3.371799 4.531547 3.379856 4.513454 3.384823 4.502518 C 3.389789 4.491583 3.39917 4.471303 3.405668 4.457452 C 3.412167 4.443601 3.426129 4.414971 3.436694 4.39383 C 3.44726 4.372689 3.461914 4.344058 3.469262 4.330207 C 3.476608 4.316357 3.488427 4.294487 3.495524 4.281607 C 3.502622 4.268728 3.514584 4.247454 3.522105 4.234332 C 3.529628 4.22121 3.541034 4.201699 3.547455 4.190976 C 3.553874 4.180251 3.564621 4.162556 3.571336 4.151653 C 3.578052 4.14075 3.589372 4.122683 3.596493 4.111505 C 3.603614 4.100327 3.615987 4.081241 3.623989 4.069091 C 3.631991 4.056941 3.645655 4.036661 3.654354 4.024024 C 3.663054 4.011388 3.677115 3.991314 3.685603 3.979416 C 3.694091 3.967517 3.707792 3.948628 3.716049 3.937443 C 3.724308 3.926256 3.738823 3.906999 3.748305 3.89465 C 3.757787 3.882301 3.774164 3.861424 3.784696 3.848259 C 3.795227 3.835093 3.810939 3.815771 3.81961 3.805323 C 3.828281 3.794872 3.84254 3.777973 3.851297 3.767766 C 3.860054 3.757562 3.874996 3.740475 3.884502 3.729796 C 3.894008 3.719119 3.908543 3.703013 3.916803 3.694009 C 3.925064 3.685003 3.939156 3.669882 3.94812 3.660404 C 3.957083 3.650928 3.981341 3.626241 4.002025 3.605544 C 4.02271 3.584848 4.046838 3.561157 4.055645 3.552897 C 4.064451 3.544637 4.079179 3.530951 4.088373 3.522486 C 4.097566 3.514019 4.11243 3.500508 4.121404 3.49246 C 4.130376 3.484412 4.146267 3.470493 4.156716 3.461528 C 4.167165 3.452562 4.183867 3.438437 4.19383 3.430137 C 4.203792 3.421837 4.220096 3.408491 4.230059 3.400478 C 4.240022 3.392467 4.256126 3.379735 4.265846 3.372187 C 4.275566 3.364638 4.294852 3.349997 4.308703 3.33965 C 4.322554 3.329302 4.342636 3.314602 4.353327 3.306981 C 4.364019 3.299361 4.382311 3.28654 4.393975 3.27849 C 4.405639 3.270441 4.42466 3.257609 4.436245 3.249977 C 4.447829 3.242345 4.465922 3.230637 4.476451 3.223961 C 4.486979 3.217284 4.504342 3.206445 4.515034 3.199872 C 4.525727 3.193299 4.545155 3.181674 4.558207 3.174039 C 4.571259 3.166403 4.594323 3.153273 4.609458 3.14486 C 4.624594 3.13645 4.647913 3.123799 4.661278 3.11675 C 4.674643 3.1097 4.696314 3.098564 4.709436 3.092004 C 4.722558 3.085442 4.74403 3.075004 4.757153 3.068806 C 4.770275 3.062607 4.791488 3.052789 4.804292 3.046986 C 4.817096 3.041182 4.837177 3.03234 4.848916 3.027336 C 4.860656 3.022333 4.879611 3.014428 4.89104 3.009769 C 4.902469 3.00511 4.923146 2.996942 4.93699 2.991619 C 4.950833 2.986296 4.971702 2.978476 4.983366 2.97424 C 4.99503 2.970004 5.021672 2.960841 5.042571 2.953878 C 5.063468 2.946914 5.093689 2.937231 5.109727 2.93236 C 5.125765 2.927489 5.150419 2.920288 5.164514 2.916359 C 5.178607 2.912431 5.203261 2.905885 5.219299 2.901814 C 5.235338 2.897742 5.259793 2.891805 5.273643 2.888619 C 5.287495 2.885432 5.310359 2.880417 5.324453 2.877472 C 5.338548 2.874528 5.360616 2.870155 5.373496 2.867757 C 5.386374 2.865358 5.408962 2.861403 5.42369 2.858968 C 5.438418 2.856532 5.461482 2.85295 5.474941 2.851007 C 5.488403 2.849062 5.512338 2.845885 5.528134 2.843946 C 5.543929 2.842007 5.566793 2.83942 5.578943 2.838198 C 5.591094 2.836976 5.612764 2.83499 5.627101 2.833786 C 5.641439 2.832582 5.666887 2.830797 5.683655 2.829821 C 5.700423 2.828844 5.724281 2.827635 5.736673 2.827131 C 5.749067 2.826628 5.779487 2.825963 5.804273 2.825654 C 5.831717 2.825312 5.864715 2.825499 5.888661 2.826133 C 5.910288 2.826705 5.935936 2.827562 5.945656 2.828037 C 5.955376 2.828513 5.97327 2.829513 5.98542 2.830258 C 5.99757 2.831004 6.017452 2.832401 6.029602 2.833363 C 6.041752 2.834323 6.060044 2.83592 6.07025 2.836912 C 6.080456 2.837903 6.097554 2.839693 6.108246 2.840889 C 6.118938 2.842084 6.135557 2.84406 6.145177 2.84528 C 6.154796 2.846498 6.172292 2.848883 6.184057 2.850577 C 6.195822 2.852271 6.215388 2.855248 6.227539 2.857194 C 6.239688 2.859139 6.253395 2.861429 6.257997 2.862283 C 6.266363 2.863834 6.266363 2.863834 6.249159 2.867633 C 6.239698 2.869721 6.221817 2.873796 6.209424 2.876689 C 6.197031 2.87958 6.17695 2.884501 6.1648 2.887624 C 6.152649 2.890747 6.132933 2.896087 6.120986 2.899491 C 6.109038 2.902895 6.088361 2.909066 6.075037 2.913204 C 6.061712 2.917341 6.039675 2.924465 6.026067 2.929032 C 6.012459 2.933601 5.991946 2.940756 5.980484 2.944931 C 5.969021 2.949106 5.949537 2.95646 5.937186 2.961273 C 5.924834 2.966085 5.905422 2.973896 5.894048 2.978628 C 5.882673 2.983361 5.864182 2.991314 5.852958 2.996302 C 5.841733 3.001288 5.822409 3.010091 5.810017 3.015862 C 5.797623 3.021632 5.775753 3.032209 5.761416 3.039369 C 5.747078 3.046527 5.726601 3.057027 5.715909 3.062701 C 5.705216 3.068377 5.685135 3.079366 5.671284 3.087121 C 5.657433 3.094877 5.638347 3.105814 5.628869 3.111423 C 5.619392 3.117034 5.603487 3.126609 5.593524 3.1327 C 5.58356 3.138793 5.567655 3.148746 5.558177 3.15482 C 5.5487 3.160895 5.532596 3.171429 5.522389 3.178233 C 5.512184 3.185035 5.496079 3.195978 5.486602 3.202551 C 5.477125 3.209123 5.460822 3.220655 5.450372 3.228179 C 5.439923 3.235703 5.423421 3.247832 5.413702 3.255136 C 5.403981 3.262436 5.386883 3.27556 5.375705 3.284297 C 5.364527 3.293035 5.346831 3.307168 5.336382 3.315704 C 5.325933 3.32424 5.308455 3.338784 5.297544 3.348024 C 5.286631 3.357265 5.269532 3.372169 5.259547 3.381148 C 5.249561 3.390125 5.233438 3.404821 5.223718 3.413807 C 5.213998 3.422791 5.196302 3.439351 5.184396 3.450605 C 5.172488 3.461862 5.156544 3.477188 5.148963 3.484664 C 5.141382 3.492139 5.126272 3.507414 5.115385 3.518608 C 5.104497 3.529801 5.087317 3.547848 5.077208 3.558713 C 5.067098 3.569577 5.050301 3.587983 5.039882 3.599617 C 5.029463 3.61125 5.013853 3.62899 5.005193 3.639039 C 4.996532 3.649089 4.982148 3.666059 4.973228 3.676752 C 4.964307 3.687445 4.947 3.708717 4.934769 3.724027 C 4.922537 3.739336 4.90467 3.762184 4.895064 3.774798 C 4.885458 3.787414 4.870011 3.808089 4.860735 3.820748 C 4.85146 3.833405 4.835779 3.855252 4.825891 3.869297 C 4.816002 3.883342 4.800281 3.906206 4.790956 3.920107 C 4.781631 3.934007 4.767791 3.954923 4.760201 3.966587 C 4.75261 3.978251 4.739764 3.998412 4.731654 4.01139 C 4.723545 4.024366 4.710507 4.04564 4.702682 4.058664 C 4.694856 4.071689 4.682687 4.092286 4.67564 4.104437 C 4.668592 4.116586 4.655977 4.138854 4.647606 4.15392 C 4.639235 4.168986 4.627187 4.191055 4.620833 4.202963 C 4.614478 4.214869 4.603237 4.236342 4.59585 4.250679 C 4.588463 4.265017 4.577648 4.286489 4.571816 4.298396 C 4.565984 4.310304 4.556654 4.329589 4.551082 4.341253 C 4.54551 4.352918 4.536649 4.371806 4.53139 4.383226 C 4.526132 4.394647 4.517766 4.413137 4.512801 4.424315 C 4.507834 4.435493 4.499414 4.45478 4.494091 4.467174 C 4.488767 4.479566 4.480241 4.499781 4.475145 4.512096 C 4.470048 4.524411 4.461758 4.544889 4.456721 4.557603 C 4.451684 4.570319 4.443329 4.591855 4.438153 4.605463 C 4.432978 4.619071 4.42455 4.641737 4.419425 4.65583 C 4.414299 4.669925 4.405364 4.695175 4.399567 4.711941 C 4.393771 4.72871 4.384635 4.755947 4.379265 4.772473 C 4.373896 4.788996 4.365339 4.816035 4.36025 4.83256 C 4.355162 4.849085 4.346827 4.877117 4.341728 4.894857 C 4.336629 4.912596 4.328691 4.941027 4.324087 4.958037 C 4.319483 4.975048 4.311586 5.005467 4.30654 5.025636 C 4.301492 5.045806 4.294517 5.074635 4.291039 5.0897 C 4.287562 5.104767 4.282386 5.12783 4.279539 5.140952 C 4.276692 5.154074 4.271984 5.176342 4.269077 5.190436 C 4.266171 5.20453 4.261379 5.228786 4.25843 5.244339 C 4.25548 5.259891 4.250707 5.286135 4.24782 5.302659 C 4.244935 5.319183 4.240569 5.345436 4.238118 5.360997 C 4.235666 5.37656 4.231877 5.40161 4.229696 5.416667 C 4.227515 5.431724 4.224122 5.456368 4.222157 5.471435 C 4.220191 5.486501 4.216998 5.512547 4.215061 5.529314 C 4.213124 5.546082 4.210349 5.571529 4.208893 5.585867 C 4.207439 5.600204 4.205048 5.625653 4.20358 5.642421 C 4.202112 5.659187 4.199928 5.686625 4.198727 5.703393 C 4.197526 5.720159 4.195924 5.744415 4.195167 5.757294 C 4.194409 5.770174 4.193407 5.787471 4.192938 5.795733 C 4.192471 5.803995 4.19165 5.898036 4.191115 6.004715 C 4.19058 6.111393 4.190277 6.315648 4.190439 6.458614 C 4.190602 6.601581 4.190984 6.718802 4.191288 6.719105 C 4.191591 6.719408 4.313371 6.682069 4.461908 6.636129 C 4.610447 6.590189 4.786054 6.535892 4.852147 6.515468 C 4.91824 6.495043 5.025205 6.462041 5.089849 6.442131 C 5.154491 6.422219 5.223739 6.400939 5.243729 6.39484 C 5.263721 6.388742 5.280256 6.383932 5.280475 6.38415 C 5.280694 6.384369 5.209062 6.462315 5.121291 6.557364 C 5.033521 6.652413 4.889537 6.808317 4.801327 6.903816 C 4.713117 6.999316 4.56619 7.158374 4.474826 7.25728 C 4.383461 7.356185 4.23395 7.518026 4.14258 7.616927 C 4.051209 7.715828 3.906015 7.872994 3.819926 7.966186 C 3.733837 8.059378 3.658251 8.141094 3.651957 8.147776 C 3.645663 8.154458 3.64025 8.159901 3.639928 8.15987 Z",Ys=s=>{var O;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,nameOffsetX:r=de.nameOffsetX,nameOffsetY:l=de.nameOffsetY,outOfStation:c=de.outOfStation}=(O=a[k.BjsubwayInt])!=null?O:de,h=x.useCallback(w=>m(t,w),[t,m]),u=x.useCallback(w=>i(t,w),[t,i]),p=x.useCallback(w=>d(t,w),[t,d]),g=(w,v)=>w==="left"&&v==="top"?[-5,-f[1].split("\n").length*te[v]-4]:w==="middle"&&v==="top"?[0,-f[1].split("\n").length*te[v]-7]:w==="right"&&v==="top"?[5,-f[1].split("\n").length*te[v]-4]:w==="left"&&v==="bottom"?[-5,f[0].split("\n").length*te[v]+4]:w==="middle"&&v==="bottom"?[0,f[0].split("\n").length*te[v]+7]:w==="right"&&v==="bottom"?[5,f[0].split("\n").length*te[v]+4]:w==="left"&&v==="middle"?[-8,0]:w==="right"&&v==="middle"?[8,0]:[0,0],[C,y]=g(r,l),b=r==="left"?"end":r==="right"?"start":"middle";return n.jsxs("g",{id:t,children:[n.jsxs("g",{transform:"translate(".concat(e-6,", ").concat(o-6,")"),children:[n.jsx("circle",{cx:"6",cy:"6",r:"6",stroke:"black",strokeWidth:"1",fill:"white"}),n.jsx("path",{d:ma,fill:c?"#898989":"black",stroke:c?"#898989":"black",strokeWidth:"0.533618",strokeLinecap:"round",strokeLinejoin:"round"}),n.jsx("circle",{id:"stn_core_".concat(t),cx:"6",cy:"6",r:"6",stroke:"black",strokeWidth:"1",strokeOpacity:"0",fill:"white",fillOpacity:"0",onPointerDown:h,onPointerMove:u,onPointerUp:p,style:{cursor:"move"}})]}),n.jsxs("g",{transform:"translate(".concat(e+C,", ").concat(o+y,")"),textAnchor:b,children:[n.jsx(T,{text:f[0].split("\n"),fontSize:te.zh,lineHeight:te.zh,grow:"up",className:"rmp-name__zh",baseOffset:1}),n.jsx(T,{text:f[1].split("\n"),fontSize:te.en,lineHeight:te.en,grow:"down",className:"rmp-name__en",baseOffset:1})]})]})},de={...$,nameOffsetX:"right",nameOffsetY:"top",outOfStation:!1},Ls=[{type:"textarea",label:"panel.details.stations.common.nameZh",value:s=>(s!=null?s:de).names[0],onChange:(s,t)=>{const e=t!=null?t:de;return e.names[0]=s.toString(),e}},{type:"textarea",label:"panel.details.stations.common.nameEn",value:s=>(s!=null?s:de).names[1],onChange:(s,t)=>{const e=t!=null?t:de;return e.names[1]=s.toString(),e}},{type:"select",label:"panel.details.stations.common.nameOffsetX",value:s=>(s!=null?s:de).nameOffsetX,options:{left:"left",middle:"middle",right:"right"},disabledOptions:s=>(s==null?void 0:s.nameOffsetY)==="middle"?["middle"]:[],onChange:(s,t)=>{const e=t!=null?t:de;return e.nameOffsetX=s,e}},{type:"select",label:"panel.details.stations.common.nameOffsetY",value:s=>(s!=null?s:de).nameOffsetY,options:{top:"top",middle:"middle",bottom:"bottom"},disabledOptions:s=>(s==null?void 0:s.nameOffsetX)==="middle"?["middle"]:[],onChange:(s,t)=>{const e=t!=null?t:de;return e.nameOffsetY=s,e}},{type:"switch",label:"panel.details.stations.bjsubwayInt.outOfStation",oneLine:!0,isChecked:s=>(s!=null?s:de).outOfStation,onChange:(s,t)=>{const e=t!=null?t:de;return e.outOfStation=s,e}}],Hs=()=>n.jsx(dn,{fields:Ls}),Fs=n.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:n.jsxs("g",{transform:"translate(6, 6)",children:[n.jsx("circle",{cx:"6",cy:"6",r:"6",stroke:"black",strokeWidth:"1",fill:"white"}),n.jsx("path",{d:ma,stroke:"black",strokeWidth:"0.533618",strokeLinecap:"round",strokeLinejoin:"round"})]})}),Us={component:Ys,icon:Fs,defaultAttrs:de,attrsComponent:Hs,metadata:{displayName:"panel.details.stations.bjsubwayInt.displayName",cities:[B.Beijing],canvas:[Z.RailMap],categories:[q.Metro],tags:["interchange"]}};function Vs(s){const{interchangeList:t,onAdd:e,onDelete:o,onUpdate:a}=s,m=tt(),{paletteAppClip:{output:i}}=nt(c=>c.runtime),{t:d}=X(),[f,r]=x.useState();x.useEffect(()=>{f!==void 0&&i&&(a==null||a(f,[...i,t[f][4],t[f][5]]),r(void 0))},[i==null?void 0:i.toString()]);const l=t.map((c,h)=>[{type:"input",label:d("panel.details.stations.common.lineCode"),value:c[4],minW:"80px",onChange:u=>a==null?void 0:a(h,[c[0],c[1],c[2],c[3],u,c[5]])},{type:"input",label:d("panel.details.stations.common.stationCode"),value:c[5],minW:"80px",onChange:u=>a==null?void 0:a(h,[c[0],c[1],c[2],c[3],c[4],u])}]);return n.jsxs(cn,{direction:"column",children:[t.length===0&&n.jsxs(Fe,{spacing:.5,"data-testid":"interchange-card-stack",children:[n.jsx(fn,{as:"i",flex:1,align:"center",fontSize:"md",colorScheme:"gray",children:d("panel.details.stations.interchange.noInterchanges")}),n.jsx(ve,{size:"sm",variant:"ghost","aria-label":d("panel.details.stations.interchange.add"),onClick:()=>e==null?void 0:e([B.Shanghai,"","#aaaaaa",R.white,"",""]),icon:n.jsx(Pe,{})})]}),t.map((c,h)=>n.jsxs(Fe,{spacing:.5,"data-testid":"interchange-card-stack-".concat(h),children:[n.jsx(ge,{label:d("color"),minW:"40px",noLabel:h!==0,children:n.jsx(Dt,{theme:[c[0],c[1],c[2],c[3]],onClick:()=>{r(h),m(Xt([c[0],c[1],c[2],c[3]]))}})}),n.jsx(H,{fields:l[h],noLabel:h!==0}),e&&h===l.length-1?n.jsx(ve,{size:"sm",variant:"ghost","aria-label":d("panel.details.stations.interchange.copy"),onClick:()=>e==null?void 0:e(t.slice(-1)[0]),icon:n.jsx(mn,{})}):n.jsx(hn,{minW:8}),o&&n.jsx(ve,{size:"sm",variant:"ghost","aria-label":d("panel.details.stations.interchange.remove"),onClick:()=>o==null?void 0:o(h),icon:n.jsx(Ct,{})})]},h))]})}const Ut=s=>{var C;const{stationType:t,defaultAttrs:e,maximumTransfers:o}=s,{t:a}=X(),m=tt(),i=x.useCallback(()=>{m(ht()),m(ut(r.current.export()))},[m,ht,ut]),{selected:d}=nt(y=>y.runtime),[f]=d,r=x.useRef(window.graph),l=f&&r.current.hasNode(f)&&r.current.getNodeAttribute(f,"type")===t?r.current.getNodeAttribute(f,t):e,c=(C=l.transfer)!=null?C:e.transfer,h=y=>b=>{const O=structuredClone(c);if(O.length<=y)for(let w=O.length;w<=y;w++)O[w]=[];O[y].push(b),l.transfer=O,r.current.mergeNodeAttributes(f,{[t]:l}),i()},u=y=>b=>{if(c.length>y&&c[y].length>b){const O=c.map((w,v)=>v===y?w.filter((N,S)=>S!==b):w);l.transfer=O,r.current.mergeNodeAttributes(f,{[t]:l}),i()}},p=y=>(b,O)=>{if(c.length>y&&c[y].length>b){const w=c.map((v,N)=>N===y?v.map((S,j)=>j===b?[0,1,2,3,4,5].map(A=>O[A]===void 0?S[A]:O[A]):S):v);l.transfer=w,r.current.mergeNodeAttributes(f,{[t]:l}),i()}},g=()=>h(l.transfer.length)([B.Guangzhou,"","#AAAAAA",R.white,"",""]);return n.jsxs(Ue,{align:"flex-start",children:[l.transfer.map((y,b)=>n.jsxs(x.Fragment,{children:[n.jsx(Yt,{size:"xs",children:a(b===0?"panel.details.stations.interchange.within":b===1?"panel.details.stations.interchange.outStation":"panel.details.stations.interchange.outSystem")}),n.jsx(Vs,{interchangeList:y,onAdd:o[b]>y.length?h(b):void 0,onDelete:u(b),onUpdate:p(b)})]},b)),o[l.transfer.length]>0&&n.jsx(pe,{size:"xs",variant:"ghost",alignSelf:"flex-end",leftIcon:n.jsx(Pe,{}),onClick:g,children:a("panel.details.stations.interchange.addGroup")})]})},Ze=5,Vt=5,Gs={top:7.5+1,middle:0,bottom:11},Zs=(s,t=Ze,e=[])=>{const o=Math.sqrt(s*s-t*t/4),a=e.length<2?e.length+1:e.length;let m="M ".concat(-s,",0 A ").concat(s,",").concat(s,",0,0,1,").concat(-t/2,",-").concat(o," ");for(let i=0;i=0;i=i-1)m+="A ".concat(s,",").concat(s,",0,0,1,").concat(i*t-t/2,",").concat(o," ");return m+="A ".concat(s,",").concat(s,",0,0,1,").concat(-s,",0 Z"),m},qs=s=>{var M;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,nameOffsetX:r=ie.nameOffsetX,nameOffsetY:l=ie.nameOffsetY,transfer:c=ie.transfer,rotate:h=ie.rotate}=(M=a[k.MTR])!=null?M:ie,u=x.useCallback(_=>m(t,_),[t,m]),p=x.useCallback(_=>i(t,_),[t,i]),g=x.useCallback(_=>d(t,_),[t,d]),C=c.at(0),y=Zs(Vt,Ze,C),b=C.length===0?0:C.length<=2?1:C.length-1,O=Math.cos(h*Math.PI/180)*b*Vt,w=Math.sin(h*Math.PI/180)*b*Vt,v=r==="left"?-8:r==="right"?8:0,N=Math.sign(O)===Math.sign(v)?O+v:v,S=(f[ee[l].namesPos].split("\n").length*Gs[l]+6)*ee[l].polarity,j=Math.sign(w)===Math.sign(S)?w+S:S,A=r==="left"?"end":r==="right"?"start":"middle";return x.useMemo(()=>n.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[n.jsx("path",{transform:"rotate(".concat(h,")"),d:y,stroke:"#001f50",strokeWidth:"1.5",fill:"white",onPointerDown:u,onPointerMove:p,onPointerUp:g,style:{cursor:"move"}}),c.at(0).length>1&&c.at(0).map(_=>_[2]).map((_,E)=>n.jsx("line",{transform:"rotate(".concat(h,")"),x1:-Ze/2+E*Ze,x2:Ze/2+E*Ze,stroke:_,strokeWidth:"2"},"".concat(E,"_").concat(_))),n.jsx("path",{id:"stn_core_".concat(t),transform:"rotate(".concat(h,")"),d:y,fill:"white",fillOpacity:"0",onPointerDown:u,onPointerMove:p,onPointerUp:g,style:{cursor:"move"}}),n.jsxs("g",{transform:"translate(".concat(N,", ").concat(j,")"),textAnchor:A,className:"rmp-name-outline",strokeWidth:"1.25",children:[n.jsx(T,{text:f[0].split("\n"),fontSize:10,lineHeight:10,grow:"up",baseOffset:1,fill:"#001f50",className:"rmp-name__mtr__zh"}),n.jsx(T,{text:f[1].split("\n"),fontSize:7.5,lineHeight:7.5,grow:"down",baseOffset:1,fill:"#001f50",className:"rmp-name__mtr__en"})]})]}),[t,e,o,...f,h,JSON.stringify(c),r,l,u,p,g])},ie={names:["車站","Stn"],nameOffsetX:"right",nameOffsetY:"top",rotate:0,transfer:[[]]},Qs=[{type:"textarea",label:"panel.details.stations.common.nameZh",value:s=>(s!=null?s:ie).names[0],onChange:(s,t)=>{const e=t!=null?t:ie;return e.names[0]=s.toString(),e}},{type:"textarea",label:"panel.details.stations.common.nameEn",value:s=>(s!=null?s:ie).names[1],onChange:(s,t)=>{const e=t!=null?t:ie;return e.names[1]=s.toString(),e}},{type:"select",label:"panel.details.stations.common.nameOffsetX",value:s=>(s!=null?s:ie).nameOffsetX,options:{left:"left",middle:"middle",right:"right"},disabledOptions:s=>(s==null?void 0:s.nameOffsetY)==="middle"?["middle"]:[],onChange:(s,t)=>{const e=t!=null?t:ie;return e.nameOffsetX=s,e}},{type:"select",label:"panel.details.stations.common.nameOffsetY",value:s=>(s!=null?s:ie).nameOffsetY,options:{top:"top",middle:"middle",bottom:"bottom"},disabledOptions:s=>(s==null?void 0:s.nameOffsetX)==="middle"?["middle"]:[],onChange:(s,t)=>{const e=t!=null?t:ie;return e.nameOffsetY=s,e}},{type:"select",label:"panel.details.stations.common.rotate",value:s=>{var t;return(t=s==null?void 0:s.rotate)!=null?t:ie.rotate},hidden:s=>{var t,e,o;return((o=(e=(t=s==null?void 0:s.transfer)==null?void 0:t.flat())==null?void 0:e.length)!=null?o:0)===0},options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:(s,t)=>{const e=t!=null?t:ie;return e.rotate=Number(s),e}},{type:"custom",label:"panel.details.stations.interchange.title",component:n.jsx(Ut,{stationType:k.MTR,defaultAttrs:ie,maximumTransfers:[99,0,0]})}],Js=()=>n.jsx(dn,{fields:Qs}),Ks=n.jsx("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:n.jsx("circle",{cx:"12",cy:"12",r:"5",stroke:"currentColor",strokeWidth:"1.5",fill:"none"})}),eo={component:qs,icon:Ks,defaultAttrs:ie,attrsComponent:Js,metadata:{displayName:"panel.details.stations.mtr.displayName",cities:[B.Hongkong],canvas:[Z.RailMap],categories:[q.Metro],tags:[]}},yt=x.forwardRef((s,t)=>{const{text:e,lineWidth:o,grow:a,dominantBaseline:m=a==="left"?"hanging":a==="right"?"auto":"central",baseOffset:i=2,baseDY:d=0,...f}=s,r=a==="bidirectional"?-((e.length-1)*o)/2:0;return n.jsx("g",{ref:t,children:[...e].reverse().map((l,c,h)=>n.jsx("text",{x:(c*o+i)*(a==="left"?-1:1)+r,dy:(c-(h.length-1)/2)*d,writingMode:"vertical-rl",dominantBaseline:m,...f,children:l},"".concat(l).concat(c)))})});yt.displayName="MultilineTextVertical";const oe={zh:{size:10,baseOffset:1},en:{size:5,baseOffset:1.5}},Gt={top:{lineHeight:5,offset:1+oe.en.baseOffset+2.5,polarity:-1},middle:{lineHeight:0,offset:oe.zh.size/2,polarity:1},bottom:{lineHeight:10,offset:0+oe.zh.baseOffset+2.5,polarity:1}},to=s=>{var N;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,color:r=Se.color,nameOffsetX:l=Se.nameOffsetX,nameOffsetY:c=Se.nameOffsetY,textVertical:h=Se.textVertical}=(N=a[k.SuzhouRTBasic])!=null?N:Se,u=x.useCallback(S=>m(t,S),[t,m]),p=x.useCallback(S=>i(t,S),[t,i]),g=x.useCallback(S=>d(t,S),[t,d]),C=l==="left"?-5:l==="right"?5:0,y=(f[ee[c].namesPos].split("\n").length*Gt[c].lineHeight+Gt[c].offset)*Gt[c].polarity,b=l==="left"?"end":l==="right"?"start":"middle",O=c==="top"?-2.5-2:2.5+2,w=c==="top"?"end":"start",v=f[0].split("\n").length*oe.zh.size/2+oe.en.baseOffset;return n.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[n.jsx("circle",{id:"stn_core_".concat(t),r:3,stroke:r[2],strokeWidth:"1",fill:"white",onPointerDown:u,onPointerMove:p,onPointerUp:g,style:{cursor:"move"}}),h?n.jsxs(n.Fragment,{children:[n.jsx("g",{transform:"translate(-1, ".concat(O,")"),textAnchor:w,children:n.jsx(yt,{text:f[0].split("\n"),fontSize:oe.zh.size,lineWidth:oe.zh.size,grow:"bidirectional",baseOffset:oe.zh.baseOffset,dominantBaseline:"central",className:"rmp-name__zh"})}),n.jsx("g",{transform:"translate(".concat(v,", ").concat(O,")rotate(90)"),textAnchor:w,children:n.jsx(T,{text:f[1].split("\n"),fontSize:oe.en.size,lineHeight:oe.en.size,grow:"up",baseOffset:oe.en.baseOffset,className:"rmp-name__en",dominantBaseline:"central",fill:"gray"})})]}):n.jsxs("g",{transform:"translate(".concat(C,", ").concat(y,")"),textAnchor:b,children:[n.jsx(T,{text:f[0].split("\n"),fontSize:oe.zh.size,lineHeight:oe.zh.size,grow:"up",baseOffset:oe.zh.baseOffset,className:"rmp-name__zh"}),n.jsx(T,{text:f[1].split("\n"),fontSize:oe.en.size,lineHeight:oe.en.size,grow:"down",baseOffset:oe.en.baseOffset,className:"rmp-name__en",fill:"gray"})]})]})},Se={...$,color:[B.Suzhou,"sz1","#78BA25",R.white],nameOffsetX:"right",nameOffsetY:"top",textVertical:!1},no=s=>{var i,d,f;const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:a}=X(),m=[{type:"textarea",label:a("panel.details.stations.common.nameZh"),value:e.names[0],onChange:r=>{e.names[0]=r,o(t,e)},minW:"full"},{type:"textarea",label:a("panel.details.stations.common.nameEn"),value:e.names[1],onChange:r=>{e.names[1]=r,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetX"),value:(i=e.nameOffsetX)!=null?i:Se.nameOffsetX,options:{left:a("panel.details.stations.common.left"),middle:a("panel.details.stations.common.middle"),right:a("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:r=>{e.nameOffsetX=r,e.nameOffsetX!=="middle"&&(e.textVertical=!1),o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetY"),value:(d=e.nameOffsetY)!=null?d:Se.nameOffsetY,options:{top:a("panel.details.stations.common.top"),middle:a("panel.details.stations.common.middle"),bottom:a("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:r=>{e.nameOffsetY=r,e.nameOffsetY==="middle"&&(e.textVertical=!1),o(t,e)},minW:"full"},{type:"switch",label:a("panel.details.stations.suzhouRTBasic.textVertical"),isChecked:(f=e.textVertical)!=null?f:Se.textVertical,isDisabled:e.nameOffsetY==="middle"||e.nameOffsetX!=="middle",onChange:r=>{e.textVertical=r,o(t,e)},oneLine:!0,minW:"full"},{type:"custom",label:a("color"),component:n.jsx(Ee,{type:k.SuzhouRTBasic,defaultTheme:Se.color})}];return n.jsx(H,{fields:m})},ao=n.jsx("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:n.jsx("circle",{cx:"12",cy:"12",r:"3",stroke:"currentColor",fill:"none"})}),so={component:to,icon:ao,defaultAttrs:Se,attrsComponent:no,metadata:{displayName:"panel.details.stations.suzhouRTBasic.displayName",cities:[B.Suzhou],canvas:[Z.RailMap],categories:[q.Metro],tags:[]}},We=6,je={zh:{size:10,baseOffset:1},en:{size:5,baseOffset:1.5}},Zt={top:{lineHeight:je.en.size,offset:0+je.en.baseOffset+3,polarity:-1},middle:{lineHeight:0,offset:je.zh.size/2,polarity:1},bottom:{lineHeight:je.zh.size,offset:0+je.zh.baseOffset+3,polarity:1}},oo=s=>{var S,j;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,nameOffsetX:r=ke.nameOffsetX,nameOffsetY:l=ke.nameOffsetY,rotate:c=ke.rotate,transfer:h=ke.transfer}=(S=a[k.SuzhouRTInt])!=null?S:ke,u=x.useCallback(A=>m(t,A),[t,m]),p=x.useCallback(A=>i(t,A),[t,i]),g=x.useCallback(A=>d(t,A),[t,d]),C=(We-1)*h.at(0).length+1,y=Math.abs(Math.cos(c*Math.PI/180)*C),b=Math.abs(Math.sin(c*Math.PI/180)*C),O=r==="left"?-1:r==="right"?1:0,w=(y/2+5)*O,v=(f[ee[l].namesPos].split("\n").length*Zt[l].lineHeight+Zt[l].offset+(l==="middle"?0:b/2))*Zt[l].polarity,N=r==="left"?"end":r==="right"?"start":"middle";return n.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[n.jsxs("g",{transform:"rotate(".concat(c,")"),onPointerDown:u,onPointerMove:p,onPointerUp:g,style:{cursor:"move"},children:[n.jsx("rect",{x:-C/2,y:-We/2,width:C,height:We,ry:We/2,stroke:"#616161",strokeWidth:"1",fill:"white"}),((j=h.at(0))!=null?j:[]).length>0&&h.at(0).map(A=>A[2]).map((A,M)=>n.jsx("circle",{r:2,cx:-C/2+3+M*5,fill:A},"".concat(M,"_").concat(A))),n.jsx("rect",{id:"stn_core_".concat(t),x:-C/2-.5,y:-We/2-.5,width:C+1,height:We+1,ry:We/2,fill:"white",opacity:"0"})]}),n.jsxs("g",{transform:"translate(".concat(w,", ").concat(v,")"),textAnchor:N,children:[n.jsx(T,{text:f[0].split("\n"),fontSize:je.zh.size,lineHeight:je.zh.size,grow:"up",baseOffset:je.zh.baseOffset,className:"rmp-name__zh"}),n.jsx(T,{text:f[1].split("\n"),fontSize:je.en.size,lineHeight:je.en.size,grow:"down",baseOffset:je.en.baseOffset,className:"rmp-name__en",fill:"gray"})]})]})},ke={...$,nameOffsetX:"right",nameOffsetY:"top",rotate:0,transfer:[[[B.Suzhou,"sz1","#78BA25",R.white,"",""],[B.Suzhou,"sz2","#ED3240",R.white,"",""]]]},io=s=>{var i,d,f,r,l,c;const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:a}=X(),m=[{type:"textarea",label:a("panel.details.stations.common.nameZh"),value:e.names[0],onChange:h=>{e.names[0]=h,o(t,e)},minW:"full"},{type:"textarea",label:a("panel.details.stations.common.nameEn"),value:e.names[1],onChange:h=>{e.names[1]=h,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetX"),value:(i=e.nameOffsetX)!=null?i:ke.nameOffsetX,options:{left:a("panel.details.stations.common.left"),middle:a("panel.details.stations.common.middle"),right:a("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:h=>{e.nameOffsetX=h,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetY"),value:(d=e.nameOffsetY)!=null?d:ke.nameOffsetY,options:{top:a("panel.details.stations.common.top"),middle:a("panel.details.stations.common.middle"),bottom:a("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:h=>{e.nameOffsetY=h,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.rotate"),value:(f=e.rotate)!=null?f:ke.rotate,hidden:((c=(l=(r=e==null?void 0:e.transfer)==null?void 0:r.flat())==null?void 0:l.length)!=null?c:0)===0,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:h=>{e.rotate=Number(h),o(t,e)},minW:"full"},{type:"custom",label:a("panel.details.stations.interchange.title"),component:n.jsx(Ut,{stationType:k.SuzhouRTInt,defaultAttrs:ke,maximumTransfers:[99,0,0]})}];return n.jsx(H,{fields:m})},lo=n.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[n.jsx("rect",{x:"6",y:"9",width:"12",height:"6",ry:"3",stroke:"currentColor",fill:"none"}),n.jsx("circle",{r:"2",cx:"9.5",cy:"12",fill:"currentColor"}),n.jsx("circle",{r:"2",cx:"14.5",cy:"12",fill:"currentColor"})]}),ro={component:oo,icon:lo,defaultAttrs:ke,attrsComponent:io,metadata:{displayName:"panel.details.stations.suzhouRTInt.displayName",cities:[B.Suzhou],canvas:[Z.RailMap],categories:[q.Metro],tags:[]}},En={top:{lineHeight:6.67,offset:3.5+1.5+5},middle:{lineHeight:0,offset:0},bottom:{lineHeight:12.67,offset:-.17+1+5}},co=s=>{var b;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,nameOffsetX:r=qe.nameOffsetX,nameOffsetY:l=qe.nameOffsetY,color:c=qe.color}=(b=a[k.KunmingRTBasic])!=null?b:qe,h=x.useCallback(O=>m(t,O),[t,m]),u=x.useCallback(O=>i(t,O),[t,i]),p=x.useCallback(O=>d(t,O),[t,d]),g=r==="left"?-13.33:r==="right"?13.33:0,C=(f[ee[l].namesPos].split("\n").length*En[l].lineHeight+En[l].offset)*ee[l].polarity,y=r==="left"?"end":r==="right"?"start":"middle";return x.useMemo(()=>n.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),onPointerDown:h,onPointerMove:u,onPointerUp:p,style:{cursor:"move"},children:[n.jsx("circle",{id:"stn_core_".concat(t),r:"5",stroke:c[2],strokeWidth:"1.33",fill:"white"}),n.jsxs("g",{transform:"translate(".concat(g,", ").concat(C,")"),textAnchor:y,className:"rmp-name-outline",strokeWidth:"2.5",children:[n.jsx(T,{text:f[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),n.jsx(T,{text:f[1].split("\n"),dx:r==="right"?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]}),[t,e,o,...f,r,l,c,h,u,p])},qe={...$,nameOffsetX:"right",nameOffsetY:"top",color:[B.Kunming,"km1","#ea3222",R.white]},mo=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:a}=X(),m=[{type:"textarea",label:a("panel.details.stations.common.nameZh"),value:e.names[0],onChange:i=>{e.names[0]=i,o(t,e)},minW:"full"},{type:"textarea",label:a("panel.details.stations.common.nameEn"),value:e.names[1],onChange:i=>{e.names[1]=i,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:a("panel.details.stations.common.left"),middle:a("panel.details.stations.common.middle"),right:a("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetX=i,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:a("panel.details.stations.common.top"),middle:a("panel.details.stations.common.middle"),bottom:a("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetY=i,o(t,e)},minW:"full"},{type:"custom",label:a("color"),component:n.jsx(Ee,{type:k.KunmingRTBasic,defaultTheme:qe.color})}];return n.jsx(H,{fields:m})},fo=n.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:n.jsx("circle",{r:"5",cx:"12",cy:"12",stroke:"currentColor",strokeWidth:"1.33",fill:"none"})}),ho={component:co,icon:fo,defaultAttrs:qe,attrsComponent:mo,metadata:{displayName:"panel.details.stations.kunmingRTBasic.displayName",cities:[B.Kunming],canvas:[Z.RailMap],categories:[q.Metro],tags:["interchange"]}},[zt,$n]=[15,9],Pn={top:{lineHeight:6.67,offset:3.5+1.5},middle:{lineHeight:0,offset:0},bottom:{lineHeight:12.67,offset:-.17+1}},uo=s=>{var S,j,A,M,_;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,nameOffsetX:r=Le.nameOffsetX,nameOffsetY:l=Le.nameOffsetY,rotate:c=Le.rotate,transfer:h=Le.transfer}=(S=a[k.KunmingRTInt])!=null?S:Le,u=x.useCallback(E=>m(t,E),[t,m]),p=x.useCallback(E=>i(t,E),[t,i]),g=x.useCallback(E=>d(t,E),[t,d]),C=c===0||c===180?zt:c===90||c===270?$n:zt*Math.SQRT1_2,y=c===0||c===180?$n:c===90||c===270?zt:zt*Math.SQRT1_2,b=r==="left"?-6.83:r==="right"?6.83:0,O=(Math.abs(b)+C/2)*Math.sign(b),w=(f[ee[l].namesPos].split("\n").length*Pn[l].lineHeight+Pn[l].offset)*ee[l].polarity,v=(Math.abs(w)+y/2)*Math.sign(w),N=r==="left"?"end":r==="right"?"start":"middle";return n.jsxs("g",{id:t,children:[n.jsx("g",{transform:"translate(".concat(e,", ").concat(o,")rotate(").concat(c,")"),onPointerDown:u,onPointerMove:p,onPointerUp:g,style:{cursor:"move"},children:h.at(0).length<=2?n.jsxs("g",{transform:"translate(-7.5,-4.5)",children:[n.jsx("rect",{id:"stn_core_".concat(t),height:"9",width:"15",ry:"4",stroke:"#393332",strokeWidth:"1",fill:"white"}),n.jsx("path",{fill:(A=(j=h.at(0).at(0))==null?void 0:j.at(2))!=null?A:"#ea3222",fillRule:"evenodd",stroke:"none",d:"M 3.833333 6.375 C 2.820813 6.375 2 5.535532 2 4.5 C 2 3.464468 2.820813 2.625 3.833333 2.625 L 4.444445 2.625 L 4.444445 2 L 6.888889 2.9375 L 4.444445 3.875 L 4.444445 3.25 L 3.833333 3.25 C 3.158321 3.25 2.611111 3.809647 2.611111 4.5 C 2.611111 5.190353 3.158321 5.75 3.833333 5.75 L 7.5 5.75 L 7.5 6.375 L 3.833333 6.375 Z"}),n.jsx("path",{fill:(_=(M=h.at(0).at(1))==null?void 0:M.at(2))!=null?_:"#03619e",fillRule:"evenodd",stroke:"none",d:"M 11.166667 2.625 C 12.179187 2.625 13 3.464468 13 4.5 C 13 5.535532 12.179187 6.375 11.166667 6.375 L 10.555555 6.375 L 10.555555 7 L 8.111111 6.0625 L 10.555555 5.125 L 10.555555 5.75 L 11.166667 5.75 C 11.841679 5.75 12.388889 5.190353 12.388889 4.5 C 12.388889 3.809647 11.841679 3.25 11.166667 3.25 L 7.5 3.25 L 7.5 2.625 L 11.166667 2.625 Z"})]}):n.jsxs("g",{transform:"translate(-8.5,-8.5)",children:[n.jsx("circle",{id:"stn_core_".concat(t),r:"8.5",cx:"8.5",cy:"8.5",stroke:"#000000",strokeWidth:"1",fill:"white"}),n.jsx("path",{fill:h.at(0).at(0).at(2),fillRule:"evenodd",stroke:"none",d:"M 8.900812 14 L 10.286572 11.992442 L 10.63521 12.569632 C 12.188999 11.790696 13.24999 10.23524 13.24999 8.441039 C 13.24999 8.070708 13.203481 7.710487 13.118152 7.365112 L 13.887206 7.365112 C 13.960998 7.712721 14 8.072591 14 8.441039 C 14 10.500518 12.789013 12.288074 11.01168 13.191653 L 11.411587 13.855702 L 8.900812 14 Z"}),n.jsx("path",{fill:h.at(0).at(1).at(2),fillRule:"evenodd",stroke:"none",d:"M 8 13.974609 C 5.462755 13.73554 3.426537 11.698185 3.0625 9.090137 L 2.5 9.090137 L 3.5 7 L 4.5 9.090137 L 4.074219 9.090137 C 4.422903 11.120208 6.015293 12.696354 8 12.925459 L 8 13.974609 Z"}),n.jsx("path",{fill:h.at(0).at(2).at(2),fillRule:"evenodd",stroke:"none",d:"M 12.68764 6.50351 L 10.588492 5.178213 L 11.35608 4.753726 C 10.531951 4.143034 9.498575 3.778666 8.375084 3.778666 C 6.644794 3.778666 5.125485 4.640751 4.260284 5.940329 L 3.718284 5.421978 C 4.730131 3.997121 6.438381 3.061381 8.375084 3.061381 C 9.781034 3.061381 11.063435 3.556896 12.04896 4.372667 L 12.536759 4.102285 L 12.68764 6.50351 Z"})]})}),n.jsxs("g",{transform:"translate(".concat(e+O,", ").concat(o+v,")"),textAnchor:N,className:"rmp-name-outline",strokeWidth:"2.5",children:[n.jsx(T,{text:f[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),n.jsx(T,{text:f[1].split("\n"),dx:r==="right"?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]})},Le={...$,nameOffsetX:"right",nameOffsetY:"top",rotate:0,transfer:[[[B.Kunming,"km1","#ea3222",R.white,"",""],[B.Kunming,"km2","#03619e",R.white,"",""],[B.Kunming,"km3","#a13187",R.white,"",""]]]},po=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:a}=X(),m=[{type:"textarea",label:a("panel.details.stations.common.nameZh"),value:e.names[0],onChange:i=>{e.names[0]=i,o(t,e)},minW:"full"},{type:"textarea",label:a("panel.details.stations.common.nameEn"),value:e.names[1],onChange:i=>{e.names[1]=i,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:a("panel.details.stations.common.left"),middle:a("panel.details.stations.common.middle"),right:a("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetX=i,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:a("panel.details.stations.common.top"),middle:a("panel.details.stations.common.middle"),bottom:a("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetY=i,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.rotate"),value:e.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:i=>{e.rotate=Number(i),o(t,e)},minW:"full"},{type:"custom",label:a("panel.details.stations.interchange.title"),component:n.jsx(Ut,{stationType:k.KunmingRTInt,defaultAttrs:Le,maximumTransfers:[3,0,0]})}];return n.jsx(H,{fields:m})},go=n.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:n.jsxs("g",{transform:"translate(3.5, 3.5)",children:[n.jsx("circle",{r:"8.5",cx:"8.5",cy:"8.5",stroke:"currentColor",strokeWidth:"1",fill:"none"}),n.jsx("path",{fill:"currentColor",fillRule:"evenodd",stroke:"none",d:"M 8.900812 14 L 10.286572 11.992442 L 10.63521 12.569632 C 12.188999 11.790696 13.24999 10.23524 13.24999 8.441039 C 13.24999 8.070708 13.203481 7.710487 13.118152 7.365112 L 13.887206 7.365112 C 13.960998 7.712721 14 8.072591 14 8.441039 C 14 10.500518 12.789013 12.288074 11.01168 13.191653 L 11.411587 13.855702 L 8.900812 14 Z"}),n.jsx("path",{fill:"currentColor",fillRule:"evenodd",stroke:"none",d:"M 8 13.974609 C 5.462755 13.73554 3.426537 11.698185 3.0625 9.090137 L 2.5 9.090137 L 3.5 7 L 4.5 9.090137 L 4.074219 9.090137 C 4.422903 11.120208 6.015293 12.696354 8 12.925459 L 8 13.974609 Z"}),n.jsx("path",{fill:"currentColor",fillRule:"evenodd",stroke:"none",d:"M 12.68764 6.50351 L 10.588492 5.178213 L 11.35608 4.753726 C 10.531951 4.143034 9.498575 3.778666 8.375084 3.778666 C 6.644794 3.778666 5.125485 4.640751 4.260284 5.940329 L 3.718284 5.421978 C 4.730131 3.997121 6.438381 3.061381 8.375084 3.061381 C 9.781034 3.061381 11.063435 3.556896 12.04896 4.372667 L 12.536759 4.102285 L 12.68764 6.50351 Z"})]})}),xo={component:uo,icon:go,defaultAttrs:Le,attrsComponent:po,metadata:{displayName:"panel.details.stations.kunmingRTInt.displayName",cities:[B.Kunming],canvas:[Z.RailMap],categories:[q.Metro],tags:["interchange"]}},Wn=5.2,Wt=8.2628,ln=0,Rn={top:{offset:Wt+ln,polarity:-1},middle:{offset:0,polarity:0},bottom:{offset:Wt+ln,polarity:1}},Co=s=>{var j;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,nameOffsetX:r=Te.nameOffsetX,nameOffsetY:l=Te.nameOffsetY,color:c=Te.color,lineCode:h=Te.lineCode,stationCode:u=Te.stationCode,isTram:p=Te.isTram}=(j=a[k.MRTBasic])!=null?j:Te,g=x.useCallback(A=>m(t,A),[t,m]),C=x.useCallback(A=>i(t,A),[t,i]),y=x.useCallback(A=>d(t,A),[t,d]),b=22.85,O=12.935,w=r==="left"?-1:r==="right"?1:0,v=(b/2+5)*w,N=Rn[l].offset*Rn[l].polarity,S=r==="left"?"end":r==="right"?"start":"middle";return x.useMemo(()=>n.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,") ").concat(p?"scale(0.81)":""),children:[n.jsxs("g",{onPointerDown:g,onPointerMove:C,onPointerUp:y,style:{cursor:"move"},children:[n.jsx("rect",{x:-b/2,y:-O/2,rx:"3",ry:"6",width:b,height:O,fill:c[2],stroke:"white",strokeWidth:"1"}),n.jsx("text",{fontSize:Wn,dx:"-4",dy:"0.5",className:"rmp-name__mrt",fill:c[3],textAnchor:"middle",dominantBaseline:"middle",children:h}),n.jsx("text",{fontSize:Wn,dx:"4",dy:"0.5",className:"rmp-name__mrt",fill:c[3],textAnchor:"middle",dominantBaseline:"middle",children:u}),n.jsx("rect",{id:"stn_core_".concat(t),x:-b/2,y:-O/2,rx:"3",ry:"6",width:b,height:O,fill:"white",opacity:"0"})]}),n.jsx("g",{transform:"translate(".concat(v,", ").concat(N,")"),textAnchor:S,children:n.jsx(T,{text:f[0].split("\n"),fontSize:Wt,lineHeight:Wt,grow:l==="top"?"up":l==="middle"?"bidirectional":"down",baseOffset:ln,className:"rmp-name__mrt"})})]}),[t,e,o,...f,r,l,c,h,u,p,g,C,y])},Te={names:["Marina South Pier"],nameOffsetX:"right",nameOffsetY:"top",lineCode:"NS",stationCode:"28",isTram:!1,color:[B.Singapore,"nsl","#DA291C",R.white]},yo=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:a}=X(),m=[{type:"textarea",label:a("panel.details.stations.common.nameEn"),value:e.names[0],onChange:i=>{e.names[0]=i,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:a("panel.details.stations.common.left"),middle:a("panel.details.stations.common.middle"),right:a("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetX=i,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:a("panel.details.stations.common.top"),middle:a("panel.details.stations.common.middle"),bottom:a("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetY=i,o(t,e)},minW:"full"},{type:"input",label:a("panel.details.stations.common.lineCode"),value:e.lineCode,onChange:i=>{e.lineCode=i,o(t,e)},minW:"full"},{type:"input",label:a("panel.details.stations.common.stationCode"),value:e.stationCode,onChange:i=>{e.stationCode=i,o(t,e)},minW:"full"},{type:"switch",label:a("panel.details.stations.MRTBasic.isTram"),isChecked:e.isTram,onChange:i=>{e.isTram=i,o(t,e)},minW:"full",oneLine:!0},{type:"custom",label:a("color"),component:n.jsx(Ee,{type:k.MRTBasic,defaultTheme:Te.color})}];return n.jsx(H,{fields:m})},bo=n.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[n.jsx("rect",{x:"6",y:"8.6035",rx:"1.575",ry:"3.151",width:"12",height:"6.793",fill:"currentColor"}),n.jsx("text",{fontSize:"3.5",dx:"10",dy:"13",className:"rmp-name__en",fill:"white",textAnchor:"middle",children:"NS"}),n.jsx("text",{fontSize:"3.5",dx:"15",dy:"13",className:"rmp-name__en",fill:"white",textAnchor:"middle",children:"28"})]}),jo={component:Co,icon:bo,defaultAttrs:Te,attrsComponent:yo,metadata:{displayName:"panel.details.stations.MRTBasic.displayName",cities:[B.Singapore],canvas:[Z.RailMap],categories:[q.Metro],tags:[]}},Dn=6.9,Rt=8.2628,Xn=2.5,Yn={top:{offset:Rt+Xn,polarity:-1},middle:{offset:0,polarity:0},bottom:{offset:Rt+Xn,polarity:1}},Oo=s=>{var S;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,nameOffsetX:r=Qe.nameOffsetX,nameOffsetY:l=Qe.nameOffsetY,transfer:c=Qe.transfer}=(S=a[k.MRTInt])!=null?S:Qe,h=x.useCallback(j=>m(t,j),[t,m]),u=x.useCallback(j=>i(t,j),[t,i]),p=x.useCallback(j=>d(t,j),[t,d]),g=c.at(0),C=(g.length-2)*29.625+57.8,y=16.77,b=[];for(let j=1;jn.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[n.jsx("g",{onPointerDown:h,onPointerMove:u,onPointerUp:p,style:{cursor:"move"},children:c.map(j=>({info:j,width:(j.length-2)*29.625+57.8})).map(({info:j,width:A},M)=>n.jsxs(x.Fragment,{children:[n.jsx("rect",{x:-A/2,y:-y/2,rx:"4.5",ry:"8",width:A,height:y,fill:"url(#".concat(t,"_grad_").concat(M,")"),stroke:"white",strokeWidth:"1"}),n.jsx("linearGradient",{id:"".concat(t,"_grad_").concat(M),y1:"0%",y2:"0%",x1:"0%",x2:"100%",children:j.map((_,E)=>n.jsxs(x.Fragment,{children:[n.jsx("stop",{offset:"".concat(100/j.length*E,"%"),stopColor:_[2]}),n.jsx("stop",{offset:"".concat(100/j.length*(E+1),"%"),stopColor:_[2]})]},_[2]))}),b.map(_=>n.jsx("line",{x1:_/j.length*A-A/2,x2:_/j.length*A-A/2,y1:-y/2,y2:y/2,stroke:"white",strokeWidth:"1"},_)),j.map((_,E,I)=>n.jsxs(x.Fragment,{children:[n.jsx("text",{fontSize:Dn,dx:(_[5]!==""?-5:-2)+A/I.length/2*(E*2+1)-A/2+1,dy:"0.5",className:"rmp-name__mrt",fill:_[3],textAnchor:"middle",dominantBaseline:"middle",children:_[4]}),n.jsx("text",{fontSize:Dn,dx:5+A/I.length/2*(E*2+1)-A/2+1,dy:"0.5",className:"rmp-name__mrt",fill:_[3],textAnchor:"middle",dominantBaseline:"middle",children:_[5]})]},_[2])),n.jsx("rect",{id:"stn_core_".concat(t),x:-A/2,y:-y/2,rx:"4.5",ry:"8",width:A,height:y,fill:"white",opacity:"0"})]},j.map(_=>_[2]).join("_")))}),n.jsx("g",{transform:"translate(".concat(w,", ").concat(v,")"),textAnchor:N,children:n.jsx(T,{text:f[0].split("\n"),fontSize:Rt,lineHeight:Rt,grow:l==="top"?"up":l==="middle"?"bidirectional":"down",baseOffset:0,className:"rmp-name__mrt"})})]}),[t,e,o,...f,r,l,JSON.stringify(c),h,u,p])},Qe={names:["Chinatown"],nameOffsetX:"right",nameOffsetY:"top",transfer:[[[B.Singapore,"nel","#9B26B6",R.white,"NE","4"],[B.Singapore,"dtl","#0057B7",R.white,"DT","19"]]]},vo=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:a}=X(),m=[{type:"textarea",label:a("panel.details.stations.common.nameEn"),value:e.names[0],onChange:i=>{e.names[0]=i,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:a("panel.details.stations.common.left"),middle:a("panel.details.stations.common.middle"),right:a("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetX=i,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:a("panel.details.stations.common.top"),middle:a("panel.details.stations.common.middle"),bottom:a("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetY=i,o(t,e)},minW:"full"},{type:"custom",label:a("panel.details.stations.interchange.title"),component:n.jsx(Ut,{stationType:k.MRTInt,defaultAttrs:Qe,maximumTransfers:[1/0,0,0]})}];return n.jsx(H,{fields:m})},wo=n.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[n.jsx("rect",{x:"2",y:"9.0985",rx:"1.038",ry:"2.076",width:"20",height:"5.803",fill:"currentColor"}),n.jsx("text",{fontSize:"3",dx:"5",dy:"13.25",className:"rmp-name__en",fill:"white",textAnchor:"middle",children:"NE"}),n.jsx("text",{fontSize:"3",dx:"9.5",dy:"13.25",className:"rmp-name__en",fill:"white",textAnchor:"middle",children:"4"}),n.jsx("text",{fontSize:"3",dx:"14.5",dy:"13.25",className:"rmp-name__en",fill:"white",textAnchor:"middle",children:"DT"}),n.jsx("text",{fontSize:"3",dx:"19",dy:"13.25",className:"rmp-name__en",fill:"white",textAnchor:"middle",children:"19"})]}),_o={component:Oo,icon:wo,defaultAttrs:Qe,attrsComponent:vo,metadata:{displayName:"panel.details.stations.MRTInt.displayName",cities:[B.Singapore],canvas:[Z.RailMap],categories:[q.Metro],tags:[]}},J={ja:{size:10,baseOffset:1},en:{size:5,baseOffset:1.5}},re=5,So=s=>{var ot;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,nameOffsetX:r=Ae.nameOffsetX,nameOffsetY:l=Ae.nameOffsetY,rotate:c=Ae.rotate,textOneLine:h=Ae.textOneLine,textVertical:u=Ae.textVertical,important:p=Ae.important,lines:g=Ae.lines}=(ot=a[k.JREastBasic])!=null?ot:Ae,C=x.useCallback(le=>m(t,le),[t,m]),y=x.useCallback(le=>i(t,le),[t,i]),b=x.useCallback(le=>d(t,le),[t,d]),O=(Math.max(...g)-Math.min(...g)+1)*re,w=(Math.min(...g)-.5)*re,v=Math.abs(Math.cos(c*Math.PI/180))*re*Math.min(...g)-re/2-1,N=Math.abs(Math.cos(c*Math.PI/180))*re*Math.max(...g)+re/2+1,S=Math.abs(Math.sin(c*Math.PI/180))*re*Math.min(...g)-re/2,j=Math.abs(Math.sin(c*Math.PI/180))*re*Math.max(...g)+re/2,A=r==="left"?v:r==="right"?N:0,M=f[0].split("\n").length*(l==="middle"?0:J.ja.size),_=(l==="middle"?0:l==="top"?2:1)+J.ja.baseOffset,E=(M+_)*ee[l].polarity+(l==="middle"?0:l==="top"?S:j),I=r==="left"?"end":r==="right"?"start":"middle",V={ja:l==="top"?"down":l==="bottom"?"up":"bidirectional",en:l==="top"||h?"up":"down"},G={ja:J.ja.baseOffset,en:(l==="middle"?h?-f[0].split("\n").length*J.ja.size/2-1:f[0].split("\n").length*J.ja.size/2:0)+(p&&!h?2:0)+J.en.baseOffset},Q=x.useRef(null),[Y,ce]=x.useState({width:0});x.useEffect(()=>ce(Q.current.getBBox()),[f[0],u,ce,Q]);const ne=(u?.2:.7)*J.ja.size,ae={left:-ne/2,middle:0,right:ne/2}[r],P={top:-2,middle:0,bottom:2}[l],L=c%90!==0&&r!=="middle"?(r==="left"?v:N)*Math.SQRT2:0,z=(p&&r!=="middle"?ae:0)+L,D={0:0,45:-1,90:0,135:1,180:0,225:-1,270:0,315:1}[c],he=D*J.ja.size,ue=h?(Math.abs(z)+Y.width+1+(p?ne:0))*(r==="left"?-1:1):c%90!==0&&r!=="middle"?f[0].split("\n").length/2*D*J.ja.size+(r==="left"?-1:1)*J.ja.size:0,Ve=(p?2:0)*ee[l].polarity,we=Y.width,Me=Y.height,bt={left:-(we+ne)+L,middle:-(we+ne)/2,right:L}[r],jt={top:-2-G.ja,middle:-Me/2,bottom:-Me+3+G.ja}[l],Ot={top:-Me+3-G.ja,middle:0,bottom:-3+G.ja}[l],at=(l==="top"?S-J.en.baseOffset:j+J.en.baseOffset)+((p?ne:0)+(c%90!==0?J.ja.size/2:0))*ee[l].polarity,st={ja:l==="top"?"end":"start",en:l==="top"?"start":"end"},Ge={0:0,45:-1,90:0,135:1,180:0,225:-1,270:0,315:1}[c],vt=Ge*J.ja.size,wt=f[0].split("\n").length*J.ja.size/2+J.en.baseOffset,_t=(p?1:0)*ee[l].polarity*-1,St=(f[0].split("\n").length-0)/2*(l==="top"?-1:1)*Ge*J.ja.size+(p?2:0)*ee[l].polarity*-1;return n.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[n.jsx("g",{transform:"rotate(".concat(c,")"),children:g.map((le,kt)=>n.jsx("circle",{cx:re*le,cy:"0",r:"1.5",stroke:"black",strokeWidth:"0.2",fill:"white"},"stn_core_".concat(t,"_").concat(kt)))}),u?n.jsxs(n.Fragment,{children:[n.jsxs("g",{transform:"translate(0, ".concat(at,")"),textAnchor:st.ja,children:[p&&n.jsx("rect",{x:-(we-8)/2,y:Ot,width:we-8,height:Me,rx:(we-8)/2,fill:"black"}),n.jsx(yt,{ref:Q,text:f[0].split("\n"),fontSize:J.ja.size,lineWidth:J.ja.size,grow:"bidirectional",baseOffset:0,baseDY:vt,y:p?2.75*ee[l].polarity:0,className:"rmp-name__jreast_ja",fill:p?"white":"black"})]}),n.jsx("g",{transform:"translate(".concat(_t,", ").concat(at+St,")rotate(270)"),textAnchor:st.en,children:n.jsx(T,{text:f[1].split("\n"),fontSize:J.en.size,lineHeight:J.en.size,grow:l==="top"?"down":"up",baseOffset:wt,funcDX:le=>le*re*Math.SQRT1_2*Ge*(l==="top"?-1:1),className:"rmp-name__jreast_en"})})]}):n.jsxs("g",{transform:"translate(".concat(A,", ").concat(E,")"),textAnchor:I,children:[p&&n.jsx("rect",{x:bt,y:jt+1.75,width:Y.width+ne,height:Me-3.5,ry:(Me-3.5)/2,fill:"black"}),n.jsx(T,{ref:Q,x:z,y:p&&l!=="middle"?P:0,text:f[0].split("\n"),fontSize:J.ja.size,lineHeight:J.ja.size,grow:V.ja,baseOffset:G.ja,funcDX:le=>(le-(f[0].split("\n").length-1)/2)*he,className:"rmp-name__jreast_ja",fill:p?"white":"black"}),n.jsx(T,{text:f[1].split("\n"),x:ue,y:Ve,fontSize:J.en.size,lineHeight:J.en.size,grow:V.en,baseOffset:G.en,funcDX:le=>le*re*Math.SQRT1_2*D,className:"rmp-name__jreast_en"})]}),n.jsx("g",{transform:"rotate(".concat(c,")"),children:n.jsx("rect",{id:"stn_core_".concat(t),fill:"url(#opaque)",fillOpacity:"50%",x:w,y:-re/2,rx:re/2,width:O,height:re,onPointerDown:C,onPointerMove:y,onPointerUp:b,style:{cursor:"move"}})})]})},Ae={names:["新宿","Shinjuku"],nameOffsetX:"right",nameOffsetY:"middle",rotate:0,textOneLine:!1,textVertical:!1,important:!1,lines:[-1,0,1]},ko=s=>{var r;const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:a}=X(),m=[{type:"textarea",label:a("panel.details.stations.common.nameJa"),value:e.names[0],onChange:l=>{e.names[0]=l.toString(),e.names[0].length>1&&(e.textOneLine=!1,e.important=!1),o(t,e)},minW:"full"},{type:"textarea",label:a("panel.details.stations.common.nameEn"),value:e.names[1],onChange:l=>{e.names[1]=l.toString(),e.names[1].length>1&&(e.textOneLine=!1,e.important=!1),o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.jrEastBasic.nameOffset"),value:e.nameOffsetX!=="middle"?e.nameOffsetX:e.nameOffsetY,options:{left:a("panel.details.stations.common.left"),right:a("panel.details.stations.common.right"),top:a("panel.details.stations.common.top"),bottom:a("panel.details.stations.common.bottom")},onChange:l=>{l==="left"||l==="right"?(e.nameOffsetX=l,e.nameOffsetY="middle",e.textVertical=!1):(e.nameOffsetX="middle",e.nameOffsetY=l,e.textOneLine=!1),o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.rotate"),value:e.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:l=>{e.rotate=Number(l),o(t,e)},minW:"full"},{type:"switch",label:a("panel.details.stations.jrEastBasic.textOneLine"),isChecked:e.textOneLine,isDisabled:e.nameOffsetY!=="middle"||e.names.some(l=>l.split("\n").length>1),onChange:l=>{e.textOneLine=l,o(t,e)},oneLine:!0,minW:"full"},{type:"switch",label:a("panel.details.stations.jrEastBasic.textVertical"),isChecked:e.textVertical,isDisabled:e.nameOffsetX!=="middle",onChange:l=>{e.textVertical=l,o(t,e)},oneLine:!0,minW:"full"},{type:"switch",label:a("panel.details.stations.jrEastBasic.important"),isChecked:(r=e.important)!=null?r:!1,isDisabled:e.names.some(l=>l.split("\n").length>1),onChange:l=>{e.important=l,o(t,e)},oneLine:!0,minW:"full"}],i=l=>{const c=l==="-"?-1:Number(l);Number.isNaN(c)||(e.lines.push(c),o(t,e))},d=(l,c)=>{if((l===""||l==="-")&&e.lines.length>1)e.lines.splice(c,1);else{const h=Number(l);if(Number.isNaN(h))return;e.lines[c]=h}o(t,e)},f=l=>{l.key==="Backspace"&&e.lines.length>1&&(e.lines.pop(),o(t,e))};return n.jsxs(n.Fragment,{children:[n.jsx(H,{fields:m}),n.jsx(ge,{label:a("panel.details.stations.jrEastBasic.lines"),children:n.jsxs($t,{flexWrap:"wrap",flexDirection:"row",pt:"1",children:[e.lines.map((l,c)=>n.jsx(Cn,{width:"80px",inputMode:"numeric",mr:"2",mb:"2",value:l,onChange:h=>d(h,c),children:n.jsx(yn,{})},c)),n.jsx(Cn,{width:"80px",inputMode:"numeric",mr:"2",mb:"2",value:"",onChange:l=>i(l),onKeyDown:l=>f(l),children:n.jsx(yn,{})})]})})]})},No=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("circle",{cx:"6",cy:"12",r:"2",stroke:"currentColor",strokeWidth:"0.5",fill:"none"}),n.jsx("circle",{cx:"12",cy:"12",r:"2",stroke:"currentColor",strokeWidth:"0.5",fill:"none"}),n.jsx("circle",{cx:"18",cy:"12",r:"2",stroke:"currentColor",strokeWidth:"0.5",fill:"none"})]}),Mo={component:So,icon:No,defaultAttrs:Ae,attrsComponent:ko,metadata:{displayName:"panel.details.stations.jrEastBasic.displayName",cities:[B.Tokyo],canvas:[Z.RailMap],categories:[q.NationalRail],tags:[]}},Re={ja:{size:10,baseOffset:1},en:{size:5,baseOffset:1.5}},Ln=1,Ao=s=>{var I;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,nameOffsetX:r=Xe.nameOffsetX,nameOffsetY:l=Xe.nameOffsetY,textVertical:c=Xe.textVertical,mostImportant:h=Xe.mostImportant,minLength:u=Xe.minLength}=(I=a[k.JREastImportant])!=null?I:Xe,p=x.useCallback(V=>m(t,V),[t,m]),g=x.useCallback(V=>i(t,V),[t,i]),C=x.useCallback(V=>d(t,V),[t,d]),y=x.useRef(null),[b,O]=x.useState({height:0,width:0});x.useEffect(()=>O(y.current.getBBox()),[f[0],c,O,y]);const w=Math.max(b.width,b.height),v=(c?.1:.7)*Re.ja.size,N=Math.max(w+v,u),S=c?Re.ja.size+Ln:N,j=c?N-5:Re.ja.size+Ln,A={left:-S/2-1,middle:0,right:S/2+1}[r],M={top:-j/2-1,middle:0,bottom:j/2+1}[l],_={left:"end",middle:"middle",right:"start"}[r],E=h?1.5:1;return n.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[n.jsxs("g",{transform:"scale(".concat(E,")"),children:[n.jsx("rect",{fill:"black",x:-S/2,y:-j/2,rx:c?void 0:j/2,ry:c?S/2:void 0,width:S,height:j}),c?n.jsx("text",{ref:y,className:"rmp-name__jreast_ja",textAnchor:"middle",writingMode:"vertical-rl",fontSize:Re.ja.size,fill:"white",dominantBaseline:"central",children:f[0]}):n.jsx("text",{ref:y,y:"-1",className:"rmp-name__jreast_ja",textAnchor:"middle",fontSize:Re.ja.size,fill:"white",dominantBaseline:"central",children:f[0]}),n.jsx("rect",{id:"stn_core_".concat(t),fill:"black",fillOpacity:"0",x:-S/2,y:-j/2,rx:c?void 0:S/2,ry:c?j/2:void 0,width:S,height:j,onPointerDown:p,onPointerMove:g,onPointerUp:C,style:{cursor:"move"}})]}),n.jsx("g",{transform:"translate(".concat(A*E,", ").concat(M*E,")"),textAnchor:_,children:n.jsx(T,{text:f[1].split("\n"),fontSize:Re.en.size,lineHeight:Re.en.size,grow:l==="top"?"up":l==="middle"?"bidirectional":"down",baseOffset:0,className:"rmp-name__jreast_en"})})]})},Xe={names:["東京","Tōkyō"],nameOffsetX:"left",nameOffsetY:"middle",textVertical:!1,mostImportant:!1,minLength:0},zo=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:a}=X(),m=[{type:"input",label:a("panel.details.stations.common.nameJa"),value:e.names[0],onChange:i=>{e.names[0]=i.toString(),o(t,e)},minW:"full"},{type:"textarea",label:a("panel.details.stations.common.nameEn"),value:e.names[1],onChange:i=>{e.names[1]=i.toString(),o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:a("panel.details.stations.common.left"),middle:a("panel.details.stations.common.middle"),right:a("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetX=i,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:a("panel.details.stations.common.top"),middle:a("panel.details.stations.common.middle"),bottom:a("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetY=i,o(t,e)},minW:"full"},{type:"switch",label:a("panel.details.stations.jrEastImportant.textVertical"),isChecked:e.textVertical,onChange:i=>{e.textVertical=i,o(t,e)},oneLine:!0,minW:"full"},{type:"switch",label:a("panel.details.stations.jrEastImportant.mostImportant"),isChecked:e.mostImportant,onChange:i=>{e.mostImportant=i,o(t,e)},oneLine:!0,minW:"full"},{type:"input",label:a("panel.details.stations.jrEastImportant.minLength"),value:e.minLength.toString(),onChange:i=>{Number.isNaN(i)?e.minLength=0:e.minLength=Number(i),o(t,e)},minW:"full"}];return n.jsx(H,{fields:m})},Bo=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{x:"3",y:"7.5",rx:"4.5",width:"18",height:"9",stroke:"currentColor",fill:"currentColor"}),n.jsx("text",{x:"12",y:"12",textAnchor:"middle",dominantBaseline:"middle",fontSize:"6",fill:"white",children:"東京"}),n.jsx("text",{x:"12",y:"20.25",textAnchor:"middle",dominantBaseline:"middle",fontSize:"3",children:"Tōkyō"})]}),To={component:Ao,icon:Bo,defaultAttrs:Xe,attrsComponent:zo,metadata:{displayName:"panel.details.stations.jrEastImportant.displayName",cities:[B.Tokyo],canvas:[Z.RailMap],categories:[q.NationalRail],tags:[]}},Io=s=>{var ae,P,L;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,nameOffsetX:r=be.nameOffsetX,nameOffsetY:l=be.nameOffsetY,color:c=be.color,lineCode:h=be.lineCode,stationCode:u=be.stationCode,open:p=be.open,secondaryNames:g=be.secondaryNames,tram:C=be.tram}=(ae=a[k.FoshanMetroBasic])!=null?ae:be,y=x.useCallback(z=>m(t,z),[t,m]),b=x.useCallback(z=>i(t,z),[t,i]),O=x.useCallback(z=>d(t,z),[t,d]),w=x.useRef(null);(L=(P=w.current)==null?void 0:P.querySelector("path"))==null||L.setAttribute("id","stn_core_".concat(t));const v={en:C?5.08:6.56,zh:C?7.29:13.13},N={top:{namesPos:1,lineHeight:v.en,polarity:-1},middle:{namesPos:0,lineHeight:0,polarity:0},bottom:{namesPos:0,lineHeight:v.zh,polarity:1}},S=C?11:15,j=r==="left"?-S:r==="right"?S:0,A=C?8:10,M=(f[N[l].namesPos].split("\n").length*N[l].lineHeight+A)*N[l].polarity,_=r==="left"?"end":r==="right"?"start":!p&&r==="middle"&&g.join("")===""?"end":"middle",E=x.useRef(null),[I,V]=x.useState(0);x.useEffect(()=>{var z,D;return V((D=(z=E.current)==null?void 0:z.getBBox().width)!=null?D:0)},[...g]);const G=x.useRef(null),[Q,Y]=x.useState(0);x.useEffect(()=>{var z,D;return Y((D=(z=G.current)==null?void 0:z.getBBox().width)!=null?D:0)},[...f]);const ce=r==="middle"?Q/2+(I+12*2)/2:(Q+(I+12*2)/2)*(r==="left"?-1:1),ne=r==="middle"&&g.join("")!==""?Q/2+(I+12*2):(Q+I+(I!==0?12*2:0))*(r==="left"?-1:r==="right"?1:0);return n.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[n.jsx("g",{transform:"scale(".concat(.57915*(C?.729:1),")"),onPointerDown:y,onPointerMove:b,onPointerUp:O,style:{cursor:"move"},ref:w,children:n.jsx(Ft,{id:"stn_core_".concat(t),strokeColour:c[2],lineNum:h===""?void 0:h,stnNum:u===""?void 0:u,textClassName:"rmp-name__zh"})}),n.jsxs("g",{ref:G,transform:"translate(".concat(j,", ").concat(M,")"),textAnchor:_,children:[n.jsx(T,{text:f[0].split("\n"),fontSize:v.zh,lineHeight:v.zh,grow:"up",className:"rmp-name__zh"}),n.jsx(T,{text:f[1].split("\n"),fontSize:v.en,lineHeight:v.en,grow:"down",className:"rmp-name__en"})]}),g.join("")!==""&&n.jsxs("g",{transform:"translate(".concat(j+ce,", ").concat(M,")"),textAnchor:"middle",children:[n.jsx("text",{fontSize:"13.13",dx:-(I+5)/2,textAnchor:"end",dominantBaseline:"middle",className:"rmp-name__zh",children:"("}),n.jsx("text",{fontSize:"13.13",dx:(I+5)/2,textAnchor:"start",dominantBaseline:"middle",className:"rmp-name__zh",children:")"}),n.jsxs("g",{ref:E,children:[n.jsx("text",{fontSize:"10",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:g[0]}),n.jsx("text",{fontSize:"5.42",dy:"2",dominantBaseline:"hanging",className:"rmp-name__en",children:g[1]})]})]}),!p&&n.jsxs("g",{transform:"translate(".concat(j+ne,", ").concat(M,")"),textAnchor:r==="middle"?"start":_,children:[n.jsx("text",{fontSize:"6.04",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:"(未开通)"}),n.jsx("text",{fontSize:"3.6",dy:"4",dominantBaseline:"hanging",className:"rmp-name__en",children:"(Under Construction)"})]})]})},be={...$,nameOffsetX:"right",nameOffsetY:"top",color:[B.Foshan,"fs1","#C4D600",R.black],lineCode:"GF",stationCode:"01",open:!0,secondaryNames:["",""],tram:!1},Eo=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:a}=X(),m=[{type:"textarea",label:a("panel.details.stations.common.nameZh"),value:e.names[0],onChange:i=>{e.names[0]=i,o(t,e)},minW:"full"},{type:"textarea",label:a("panel.details.stations.common.nameEn"),value:e.names[1],onChange:i=>{e.names[1]=i,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:a("panel.details.stations.common.left"),middle:a("panel.details.stations.common.middle"),right:a("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetX=i,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:a("panel.details.stations.common.top"),middle:a("panel.details.stations.common.middle"),bottom:a("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetY=i,o(t,e)},minW:"full"},{type:"custom",label:a("color"),component:n.jsx(Ee,{type:k.FoshanMetroBasic,defaultTheme:be.color})},{type:"input",label:a("panel.details.stations.common.lineCode"),value:e.lineCode,onChange:i=>{e.lineCode=i,o(t,e)},minW:"full"},{type:"input",label:a("panel.details.stations.common.stationCode"),value:e.stationCode,onChange:i=>{e.stationCode=i,o(t,e)},minW:"full"},{type:"switch",label:a("panel.details.stations.foshanMetroBasic.open"),oneLine:!0,isChecked:e.open,onChange:i=>{e.open=i,o(t,e)},minW:"full"},{type:"input",label:a("panel.details.stations.foshanMetroBasic.secondaryNameZh"),value:e.secondaryNames[0],onChange:i=>{e.secondaryNames[0]=i,o(t,e)},minW:"full"},{type:"input",label:a("panel.details.stations.foshanMetroBasic.secondaryNameEn"),value:e.secondaryNames[1],onChange:i=>{e.secondaryNames[1]=i,o(t,e)},minW:"full"},{type:"switch",label:a("panel.details.stations.foshanMetroBasic.tram"),oneLine:!0,isChecked:e.tram,onChange:i=>{e.tram=i,o(t,e)},minW:"full"}];return n.jsx(H,{fields:m})},$o=n.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:n.jsx("g",{transform:"translate(12,12)scale(0.45)",children:n.jsx(Ft,{strokeColour:"#000",lineNum:"1",stnNum:"01"})})}),Po={component:Io,icon:$o,defaultAttrs:be,attrsComponent:Eo,metadata:{displayName:"panel.details.stations.foshanMetroBasic.displayName",cities:[B.Foshan],canvas:[Z.RailMap],categories:[q.Metro],tags:[]}},$e={top:3.75,middle:0,bottom:8},Wo=s=>{var v;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,color:r=Oe.color,nameOffsetX:l=Oe.nameOffsetX,nameOffsetY:c=Oe.nameOffsetY,isInt:h=Oe.isInt}=(v=a[k.QingdaoMetroStation])!=null?v:Oe,u=x.useCallback(N=>m(t,N),[t,m]),p=x.useCallback(N=>i(t,N),[t,i]),g=x.useCallback(N=>d(t,N),[t,d]),C=(N,S)=>{const j=N==="left"?-6:N==="right"?6:0;return S==="top"?[j,-f[1].split("\n").length*$e[S]-5.5]:S==="bottom"?[j,f[0].split("\n").length*$e[S]+4]:[j,2]},y=(N,S)=>N==="left"&&S==="top"?[-6,-f[1].split("\n").length*$e[S]-6]:N==="middle"&&S==="top"?[0,-f[1].split("\n").length*$e[S]-10]:N==="right"&&S==="top"?[6,-f[1].split("\n").length*$e[S]-6]:N==="left"&&S==="bottom"?[-6,f[0].split("\n").length*$e[S]+6]:N==="middle"&&S==="bottom"?[0,f[0].split("\n").length*$e[S]+7]:N==="right"&&S==="bottom"?[6,f[0].split("\n").length*$e[S]+6]:N==="left"&&S==="middle"?[-8,2]:N==="right"&&S==="middle"?[8,2]:[0,0],[b,O]=h?y(l,c):C(l,c),w=l==="left"?"end":l==="right"?"start":"middle";return n.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[n.jsx("circle",{id:"stn_core_".concat(t),r:h?6:2.7,stroke:h?"black":r[2],strokeWidth:h?1.5:.2,fill:"white",onPointerDown:u,onPointerMove:p,onPointerUp:g,style:{cursor:"move"}}),n.jsxs("g",{transform:"translate(".concat(b,", ").concat(O,")"),textAnchor:w,children:[n.jsx(T,{text:f[0].split("\n"),fontSize:8,lineHeight:8,grow:"up",baseOffset:1,className:"rmp-name__zh"}),n.jsx(T,{text:f[1].split("\n"),fontSize:3.75,lineHeight:3.75,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]})},Oe={...$,color:[B.Qingdao,"qd1","#f7b000",R.white],nameOffsetX:"right",nameOffsetY:"top",isInt:!1},Ro=s=>{var i,d,f,r;const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:a}=X(),m=[{type:"textarea",label:a("panel.details.stations.common.nameZh"),value:(i=e.names[0])!=null?i:Oe.names[0],onChange:l=>{e.names[0]=l.toString(),o(t,e)},minW:"full"},{type:"textarea",label:a("panel.details.stations.common.nameEn"),value:(d=e.names[1])!=null?d:Oe.names[1],onChange:l=>{e.names[1]=l.toString(),o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetX"),value:(f=e.nameOffsetX)!=null?f:Oe.nameOffsetX,options:{left:a("panel.details.stations.common.left"),middle:a("panel.details.stations.common.middle"),right:a("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:l=>{e.nameOffsetX=l,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetY"),value:(r=e.nameOffsetY)!=null?r:Oe.nameOffsetY,options:{top:a("panel.details.stations.common.top"),middle:a("panel.details.stations.common.middle"),bottom:a("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:l=>{e.nameOffsetY=l,o(t,e)},minW:"full"},{type:"custom",label:a("color"),component:n.jsx(Ee,{type:k.QingdaoMetroStation,defaultTheme:Oe.color}),minW:"full"},{type:"switch",label:a("panel.details.stations.qingdaoMetro.isInt"),isChecked:e.isInt,oneLine:!0,onChange:l=>{e.isInt=l,o(t,e)},minW:"full"}];return n.jsx(H,{fields:m})},Do=n.jsx("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:n.jsx("circle",{cx:"12",cy:"12",r:"3",stroke:"currentColor",strokeWidth:"0.6",fill:"none"})}),Xo={component:Wo,icon:Do,defaultAttrs:Oe,attrsComponent:Ro,metadata:{displayName:"panel.details.stations.qingdaoMetro.displayName",cities:[B.Qingdao],canvas:[Z.RailMap],categories:[q.Metro],tags:[]}},rn=s=>{const{lineCode:t,stationCode:e,color:o,stroke:a}=s,[m,i,d]=[10,15,.8];return n.jsxs(n.Fragment,{children:[a&&n.jsx("rect",{x:-m/2-d,y:-i/2-d,width:m+2*d,height:i+2*d,rx:2.5,strokeWidth:d,stroke:"white",fill:"white"}),n.jsx("rect",{x:-m/2,y:-i/2,width:m,height:i,rx:2,strokeWidth:1.5,stroke:o[2],fill:"white"}),n.jsx("text",{x:0,y:t.length===1?-.75:-1.5,textAnchor:"middle",className:"rmp-name__tokyo_en",fontSize:t.length===1?7:4.5,fill:"black",children:t}),n.jsx("text",{x:e.length===1?0:-.4/e.length,y:5.5,textAnchor:"middle",className:"rmp-name__en",fontSize:7,fontWeight:"bold",letterSpacing:"-0.4",fill:"black",children:e})]})},Yo=s=>{var A;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,nameOffsetX:r=Ie.nameOffsetX,nameOffsetY:l=Ie.nameOffsetY,textVertical:c=Ie.textVertical,lineCode:h=Ie.lineCode,stationCode:u=Ie.stationCode,color:p=Ie.color}=(A=a[k.TokyoMetroBasic])!=null?A:Ie,g=x.useCallback(M=>m(t,M),[t,m]),C=x.useCallback(M=>i(t,M),[t,i]),y=x.useCallback(M=>d(t,M),[t,d]),[b,O]=x.useState(0);x.useEffect(()=>{let M=0;f[0].split("\n").forEach(_=>{M=Math.max(M,_.length)}),O(M)},[f[0]]);const w=r==="left"?-7:r==="right"?7:0,v=r==="left"?-12:r==="right"?12:0,N=l==="bottom"?20:l==="top"?-9:5.5,S=l==="bottom"?9+b*5:l==="top"?-9-b*5:-5,j=r==="left"?"end":r==="right"?"start":"middle";return n.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[n.jsx(rn,{lineCode:h,stationCode:u,color:p}),n.jsx("rect",{id:"stn_core_".concat(t),x:-5.8,y:-8.2,width:11.6,height:16.4,rx:2.5,opacity:0,onPointerDown:g,onPointerMove:C,onPointerUp:y,style:{cursor:"move"}}),n.jsx("g",{textAnchor:j,className:"rmp-name-outline",strokeWidth:"1",children:c?n.jsx("g",{transform:"translate(".concat(v,", ").concat(S,")"),textAnchor:j,children:n.jsx(yt,{text:f[0].split("\n"),fontSize:10,lineWidth:10,grow:"bidirectional",baseOffset:0,baseDY:0,className:"rmp-name__jreast_ja",fill:"black"})}):n.jsx("g",{transform:"translate(".concat(w,", ").concat(N,")"),textAnchor:j,children:n.jsx(T,{text:f[0].split("\n"),fontSize:10,lineHeight:10,grow:"up",funcDX:M=>(M-(f[0].split("\n").length-1)/2)*10,className:"rmp-name__jreast_ja",fill:"black"})})})]})},Ie={names:["京橋"],nameOffsetX:"right",nameOffsetY:"middle",textVertical:!1,lineCode:"G",stationCode:"10",color:[B.Tokyo,"g","#f9a328",R.white]},Lo=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:a}=X(),m=[{type:"textarea",label:a("panel.details.stations.common.nameJa"),value:e.names[0],onChange:i=>{e.names[0]=i.toString(),o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.tokyoMetroBasic.nameOffset"),value:e.nameOffsetX!=="middle"?e.nameOffsetX:e.nameOffsetY,options:{left:a("panel.details.stations.common.left"),right:a("panel.details.stations.common.right"),top:a("panel.details.stations.common.top"),bottom:a("panel.details.stations.common.bottom")},onChange:i=>{i==="left"||i==="right"?(e.nameOffsetX=i,e.nameOffsetY="middle",e.textVertical=!1):(e.nameOffsetX="middle",e.nameOffsetY=i),o(t,e)},minW:"full"},{type:"switch",label:a("panel.details.stations.tokyoMetroBasic.textVertical"),isChecked:e.textVertical,isDisabled:e.nameOffsetX!=="middle",onChange:i=>{e.textVertical=i,o(t,e)},oneLine:!0,minW:"full"},{type:"input",label:a("panel.details.stations.common.lineCode"),value:e.lineCode,onChange:i=>{e.lineCode=i,o(t,e)},minW:"full"},{type:"input",label:a("panel.details.stations.common.stationCode"),value:e.stationCode,onChange:i=>{e.stationCode=i,o(t,e)},minW:"full"},{type:"custom",label:a("color"),component:n.jsx(Ee,{type:k.TokyoMetroBasic,defaultTheme:Ie.color}),minW:"full"}];return n.jsx(H,{fields:m})},Ho=n.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[n.jsx("rect",{x:"6.5",y:"4.5",rx:"1.5",width:"10",height:"15",stroke:"currentColor",fill:"none"}),n.jsx("text",{x:"9",y:"11",fontSize:"7",fill:"currentColor",children:"G"}),n.jsx("text",{x:"7.75",y:"18",fontSize:"7",letterSpacing:"-0.8",fill:"currentColor",children:"10"})]}),Fo={component:Yo,icon:Ho,defaultAttrs:Ie,attrsComponent:Lo,metadata:{displayName:"panel.details.stations.tokyoMetroBasic.displayName",cities:[B.Tokyo],canvas:[Z.RailMap],categories:[q.Metro],tags:[]}},Uo=s=>{var ae;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,nameOffsetX:r=ze.nameOffsetX,nameOffsetY:l=ze.nameOffsetY,textVertical:c=ze.textVertical,interchanges:h=ze.interchanges,align:u=ze.align,importance:p=ze.importance,mereOffset:g=ze.mereOffset}=(ae=a[k.TokyoMetroInt])!=null?ae:ze,C=x.useCallback(P=>m(t,P),[t,m]),y=x.useCallback(P=>i(t,P),[t,i]),b=x.useCallback(P=>d(t,P),[t,d]),[O,w]=x.useState(0);x.useEffect(()=>{let P=0;f[0].split("\n").forEach(L=>{P=Math.max(P,L.length)}),w(P)},[f[0]]);const v=13,N=18,S=u==="horizontal"?h.length*v:0,j=u==="vertical"?h.length*N:0,_=r==="left"?-(u==="horizontal"?4:10)-S/2:r==="right"?(u==="horizontal"?2:9)+S/2:g==="left2"?-5:g==="right2"?5:0,E=()=>{const P=u==="vertical"?1:10,L=u==="vertical"?3:12,z=u==="vertical"?1:13,D=u==="vertical"?3:12,he=g==="left1"?-4:g==="left2"?-10:g==="right1"?4:g==="right2"?10:0,ue=g==="up"?3:g==="down"?10:0;return{fontSize:10,textXVer:(r==="left"?-12:r==="right"?12:-2)+he,textY:l==="bottom"?P+j/2:l==="top"?-L-j/2:-7.5+ue,textYVer:l==="bottom"?D+j/2+O*5:l==="top"?-z-j/2-O*5:-5}},I=()=>{const P=u==="vertical"?1:10,L=u==="vertical"?3:13,z=u==="vertical"?4:13,D=u==="vertical"?3:13,he=g==="left1"?-8:g==="left2"?-13:g==="right1"?8:g==="right2"?13:0,ue=g==="up"?4:g==="down"?12:0;return{fontSize:15,textXVer:(r==="left"?-12:r==="right"?12:-2)+he,textY:l==="bottom"?P+j/2:l==="top"?-L-j/2:-10+ue,textYVer:l==="bottom"?D+j/2+O*7.5:l==="top"?-z-j/2-O*7.5:-5}},V=()=>{const P=u==="vertical"?1:13,L=u==="vertical"?3:10,z=u==="vertical"?5:13,D=u==="vertical"?4:13,he=g==="left1"?-10:g==="left2"?-16:g==="right1"?10:g==="right2"?16:0,ue=g==="up"?6:g==="down"?15:0;return{fontSize:20,textXVer:(r==="left"?-12:r==="right"?12:-2)+he,textY:l==="bottom"?L+j/2:l==="top"?-P-j/2:-13+ue,textYVer:l==="bottom"?D+j/2+O*10:l==="top"?-z-j/2-O*10:-5}},{fontSize:G,textXVer:Q,textY:Y,textYVer:ce}=p==="default"?E():p==="high"?V():I(),ne=r==="left"||g==="left1"||g==="left2"?"end":r==="right"||g==="right1"||g==="right2"?"start":"middle";return n.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[u==="horizontal"?n.jsxs(n.Fragment,{children:[n.jsx("rect",{x:-(S+3)/2,y:-10.5,width:S+3,height:21,rx:3,fill:"#808285",stroke:"black",strokeWidth:"0.5"}),h.map((P,L)=>n.jsx("g",{transform:"translate(".concat(L*v-(S-v)/2,", 0)"),children:n.jsx(rn,{lineCode:P.lineCode,stationCode:P.stationCode,color:P.color,stroke:!0})},L)),n.jsx("rect",{id:"stn_core_".concat(t),x:-(S+3)/2,y:-10.5,width:S+3,height:21,rx:3,opacity:0,onPointerDown:C,onPointerMove:y,onPointerUp:b,style:{cursor:"move"}})]}):n.jsxs(n.Fragment,{children:[n.jsx("rect",{x:-8,y:-(j+3)/2,width:16,height:j+3,rx:3,fill:"#808285",stroke:"black",strokeWidth:"0.5"}),h.map((P,L)=>n.jsx("g",{transform:"translate(0, ".concat(L*N-(j-N)/2,")"),children:n.jsx(rn,{lineCode:P.lineCode,stationCode:P.stationCode,color:P.color,stroke:!0})},L)),n.jsx("rect",{id:"stn_core_".concat(t),x:-8,y:-(j+3)/2,width:16,height:j+3,rx:3,opacity:0,onPointerDown:C,onPointerMove:y,onPointerUp:b,style:{cursor:"move"}})]}),n.jsx("g",{textAnchor:ne,className:"rmp-name-outline",strokeWidth:"1",children:c?n.jsx("g",{transform:"translate(".concat(Q,", ").concat(ce,")"),textAnchor:"middle",children:n.jsx(yt,{text:f[0].split("\n"),fontSize:G,lineWidth:G,grow:"bidirectional",className:"rmp-name__jreast_ja",fill:"black",fontWeight:p!=="default"?"bold":"normal"})}):n.jsx("g",{transform:"translate(".concat(_,", ").concat(Y,")"),textAnchor:ne,children:n.jsx(T,{text:f[0].split("\n"),fontSize:G,lineHeight:G,grow:l==="top"||g==="up"?"up":"down",className:"rmp-name__jreast_ja",fill:"black",fontWeight:p!=="default"?"bold":"normal"})})})]})},ze={names:["日本橋"],nameOffsetX:"right",nameOffsetY:"middle",mereOffset:"none",textVertical:!1,interchanges:[{lineCode:"G",stationCode:"11",color:[B.Tokyo,"g","#f9a328",R.white]},{lineCode:"T",stationCode:"10",color:[B.Tokyo,"t","#00a4db",R.white]},{lineCode:"A",stationCode:"13",color:[B.Tokyo,"a","#dd4231",R.white]}],align:"horizontal",importance:"default"},Hn={lineCode:"",stationCode:"",color:[B.Tokyo,"","#AAAAAA",R.white]},Vo=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,a=tt(),{paletteAppClip:{output:m}}=nt(p=>p.runtime),{t:i}=X(),d=[{type:"textarea",label:i("panel.details.stations.common.nameJa"),value:e.names[0],onChange:p=>{e.names[0]=p.toString(),o(t,e)},minW:"full"},{type:"select",label:i("panel.details.stations.tokyoMetroBasic.nameOffset"),value:e.nameOffsetX!=="middle"?e.nameOffsetX:e.nameOffsetY,options:{left:i("panel.details.stations.common.left"),right:i("panel.details.stations.common.right"),top:i("panel.details.stations.common.top"),bottom:i("panel.details.stations.common.bottom")},onChange:p=>{p==="left"||p==="right"?(e.nameOffsetX=p,e.nameOffsetY="middle",e.textVertical=!1,(e.mereOffset==="left1"||e.mereOffset==="left2"||e.mereOffset==="right1"||e.mereOffset==="right2")&&(e.mereOffset="none")):(e.nameOffsetX="middle",e.nameOffsetY=p,(e.mereOffset==="up"||e.mereOffset==="down")&&(e.mereOffset="none")),o(t,e)},minW:"full"},{type:"select",label:i("panel.details.stations.tokyoMetroInt.mereOffset.displayName"),value:e.mereOffset,options:{none:i("panel.details.stations.tokyoMetroInt.mereOffset.none"),...e.nameOffsetX==="middle"?{left1:i("panel.details.stations.tokyoMetroInt.mereOffset.left1"),left2:i("panel.details.stations.tokyoMetroInt.mereOffset.left2"),right1:i("panel.details.stations.tokyoMetroInt.mereOffset.right1"),right2:i("panel.details.stations.tokyoMetroInt.mereOffset.right2")}:{up:i("panel.details.stations.tokyoMetroInt.mereOffset.up"),down:i("panel.details.stations.tokyoMetroInt.mereOffset.down")}},onChange:p=>{e.mereOffset=p,o(t,e)},minW:"full"},{type:"switch",label:i("panel.details.stations.tokyoMetroBasic.textVertical"),isChecked:e.textVertical,isDisabled:e.nameOffsetX!=="middle",onChange:p=>{e.textVertical=p,o(t,e)},oneLine:!0,minW:"full"},{type:"select",label:i("panel.details.stations.tokyoMetroInt.importance.displayName"),value:e.importance,options:{default:i("panel.details.stations.tokyoMetroInt.importance.default"),middle:i("panel.details.stations.tokyoMetroInt.importance.middle"),high:i("panel.details.stations.tokyoMetroInt.importance.high")},onChange:p=>{e.importance=p,o(t,e)},minW:"full"},{type:"select",label:i("panel.details.stations.tokyoMetroInt.align.displayName"),value:e.align,options:{horizontal:i("panel.details.stations.tokyoMetroInt.align.horizontal"),vertical:i("panel.details.stations.tokyoMetroInt.align.vertical")},onChange:p=>{e.align=p,o(t,e)},minW:"full"}],[f,r]=x.useState(void 0);x.useEffect(()=>{f!==void 0&&m&&(e.interchanges[f].color=m,o(t,e),r(void 0))},[m==null?void 0:m.toString()]);const l=p=>{const g=structuredClone(e.interchanges);g.push(Hn);for(let C=g.length-1;C>p;C--)g[C]=structuredClone(g[C-1]);g[p]=Hn,o(t,{...e,interchanges:g})},c=p=>{const g=e.interchanges.filter((C,y)=>y!==p);o(t,{...e,interchanges:g})},h=(p,g)=>{e.interchanges[g].lineCode=p,o(t,e)},u=(p,g)=>{e.interchanges[g].stationCode=p,o(t,e)};return n.jsxs(n.Fragment,{children:[n.jsx(H,{fields:d}),n.jsx(ge,{label:i("panel.details.stations.interchange.title"),children:n.jsxs(Ue,{align:"flex-start",children:[e.interchanges.map((p,g)=>n.jsxs(Fe,{children:[n.jsx(Dt,{theme:p.color,onClick:()=>{r(g),a(Xt(p.color))}}),n.jsx(ge,{label:i("panel.details.stations.common.lineCode"),children:n.jsx(xn,{defaultValue:p.lineCode,onDebouncedChange:C=>h(C,g)})}),n.jsx(ge,{label:i("panel.details.stations.common.stationCode"),children:n.jsx(xn,{defaultValue:p.stationCode,onDebouncedChange:C=>u(C,g)})}),n.jsx(ve,{size:"sm",variant:"ghost","aria-label":i("panel.details.stations.interchange.add"),icon:n.jsx(Pe,{}),onClick:()=>l(g)}),n.jsx(ve,{size:"sm",variant:"ghost","aria-label":i("panel.details.stations.interchange.add"),icon:n.jsx(Ct,{}),onClick:()=>c(g),isDisabled:e.interchanges.length===1})]},g)),n.jsx(pe,{size:"sm",width:"100%",variant:"outline",leftIcon:n.jsx(Pe,{}),onClick:()=>l(e.interchanges.length),children:i("panel.details.stations.interchange.title")})]})})]})},Go=n.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[n.jsx("rect",{x:"4",y:"8",rx:"1",width:"6.5",height:"10",stroke:"currentColor",fill:"none"}),n.jsx("rect",{x:"12.5",y:"8",rx:"1",width:"6.5",height:"10",stroke:"currentColor",fill:"none"}),n.jsx("text",{x:"5.5",y:"12.5",fontSize:"4",fill:"currentColor",children:"G"}),n.jsx("text",{x:"5",y:"16.25",fontSize:"4",letterSpacing:"-0.8",fill:"currentColor",children:"16"}),n.jsx("text",{x:"14.25",y:"12.5",fontSize:"4",fill:"currentColor",children:"H"}),n.jsx("text",{x:"13.75",y:"16.25",fontSize:"4",letterSpacing:"-0.8",fill:"currentColor",children:"18"})]}),Zo={component:Uo,icon:Go,defaultAttrs:ze,attrsComponent:Vo,metadata:{displayName:"panel.details.stations.tokyoMetroInt.displayName",cities:[B.Tokyo],canvas:[Z.RailMap],categories:[q.Metro],tags:[]}},W=5,da=2*W,qo=.85*da,lt={0:{textDx:0,textDy:-(W/2+W*1.33),textAnchor:"middle",dominantBaseline:"auto",polarity:-1,grow:"up"},45:{textDx:(W/2+W*1.33)*Math.SQRT1_2,textDy:-(W/2+W*1.33)*Math.SQRT1_2,textAnchor:"start",dominantBaseline:"auto",polarity:-1,grow:"up"},90:{textDx:W/2+W*1.33,textDy:0,textAnchor:"start",dominantBaseline:"middle",polarity:0,grow:"bidirectional"},135:{textDx:(W/2+W*1.33)*Math.SQRT1_2,textDy:(W/2+W*1.33)*Math.SQRT1_2,textAnchor:"start",dominantBaseline:"hanging",polarity:1,grow:"down"},180:{textDx:0,textDy:W/2+W*1.33,textAnchor:"middle",dominantBaseline:"hanging",polarity:1,grow:"down"},225:{textDx:-(W/2+W*1.33)*Math.SQRT1_2,textDy:(W/2+W*1.33)*Math.SQRT1_2,textAnchor:"end",dominantBaseline:"hanging",polarity:1,grow:"down"},270:{textDx:-(W/2+W*1.33),textDy:0,textAnchor:"end",dominantBaseline:"middle",polarity:0,grow:"bidirectional"},315:{textDx:-(W/2+W*1.33)*Math.SQRT1_2,textDy:-(W/2+W*1.33)*Math.SQRT1_2,textAnchor:"end",dominantBaseline:"auto",polarity:-1,grow:"up"}},pn=[B.London,"central","#DC241F",R.white,0],fa=x.memo(s=>{const{id:t,stepFreeAccess:e,...o}=s;return n.jsxs("g",{...o,children:[n.jsx("path",{fill:e==="train"?"#1C3E93":"white",stroke:"#1C3E93",strokeWidth:.5*W,d:"M0-31c17.1,0,31,13.9,31,31S17.1,31,0,31S-31,17.1-31,0S-17.1-31,0-31"}),n.jsx("path",{fill:e==="train"?"white":"#1C3E93",d:"M-10.5,9c1.4,4.9,6,8.4,11.3,8.4c6.5,0,11.8-5.3,11.8-11.8c0-3.4-1.5-6.5-3.8-8.7l0.7-5.1\n c4.6,2.9,7.6,8,7.6,13.8c0,9-7.3,16.3-16.3,16.3c-5.9,0-11-3.1-13.9-7.7L-10.5,9z"}),n.jsx("path",{fill:s.stepFreeAccess==="train"?"white":"#1C3E93",d:"M0.5-20.5c0,2.5,2,4.6,4.6,4.6c2.5,0,4.6-2.1,4.6-4.6s-2.1-4.6-4.6-4.6S0.5-23,0.5-20.5"}),n.jsx("path",{fill:e==="train"?"white":"#1C3E93",d:"M3-12.4L2.5-9.2h-9.9c0,0-2.1,0.2-2.1,2.2s2.1,2.2,2.1,2.2h9.3l-0.5,3h-12.5c0,0-0.9,0-1.3,0.5\n C-12.8-1-13.2,0-13.2,0l-7,14.2c0,0-0.8,1.8,1.2,2.9c2,1.1,3.3-1,3.3-1l5.5-11.3c0,0,0.5-0.7,1-1c0.6-0.3,1.1-0.3,1.1-0.3H3.4\n c0,0,1.2,0,2.2-0.9c0.9-0.9,1.1-2,1.1-2l1.7-12.4c0,0,0-2.6-2.7-2.7C3.6-14.5,3-12.4,3-12.4"}),n.jsx("path",{id:"stn_core_".concat(t),fill:e==="train"?"#1C3E93":"white",fillOpacity:"0",stroke:"#1C3E93",strokeWidth:.5*W,strokeOpacity:"0",d:"M0-31c17.1,0,31,13.9,31,31S17.1,31,0,31S-31,17.1-31,0S-17.1-31,0-31"})]})},(s,t)=>JSON.stringify(s)===JSON.stringify(t)),Qo=s=>{var S;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,transfer:r=He.transfer,rotate:l=He.rotate,terminal:c=He.terminal,stepFreeAccess:h=He.stepFreeAccess}=(S=a[k.LondonTubeBasic])!=null?S:He,u=x.useCallback(j=>m(t,j),[t,m]),p=x.useCallback(j=>i(t,j),[t,i]),g=x.useCallback(j=>d(t,j),[t,d]),C=(l-90)*Math.PI/180,y=(c?2:1)*(.66*W+W/2),b=lt[l].textDx+Math.cos(C)*Math.max(...r[0].map(j=>j[4]))*W,O=lt[l].textDy+Math.sin(C)*Math.max(...r[0].map(j=>j[4]))*W,w=-((Math.max(...r[0].map(j=>j[4]))+Math.min(...r[0].map(j=>j[4])))/2)*W,v=Math.sin(l*Math.PI/180)*w,N=Math.cos(l*Math.PI/180)*w;return n.jsxs("g",{id:t,children:[n.jsx("g",{transform:"translate(".concat(e,", ").concat(o,")rotate(").concat(l,")"),onPointerDown:u,onPointerMove:p,onPointerUp:g,style:{cursor:"move"},children:h==="none"?r[0].map(j=>n.jsx("rect",{id:"stn_core_".concat(t),x:-W*.66/2,y:-W*.66-W/2-W*j[4],width:W*.66,height:y,stroke:"none",fill:j[2]},"".concat(t,"_").concat(j[2],"_").concat(j[4]))):n.jsx(fa,{id:t,stepFreeAccess:h,transform:"translate(".concat(v,",").concat(N,")rotate(").concat(-l,")scale(0.2333)")},"stn_core_".concat(t))}),n.jsx("g",{transform:"translate(".concat(e+b,", ").concat(o+O,")"),textAnchor:lt[l].textAnchor,fill:"#003888",children:n.jsx(T,{text:f[0].split("\n"),fontSize:da,lineHeight:qo,dominantBaseline:lt[l].dominantBaseline,grow:lt[l].grow,baseOffset:0,className:"rmp-name__tube"})})]})},He={names:["Station"],transfer:[[pn]],rotate:0,terminal:!1,stepFreeAccess:"none"},Jo=s=>{var l;const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:a}=X(),m=[{type:"textarea",label:a("panel.details.stations.common.nameEn"),value:e.names[0],onChange:c=>{e.names[0]=c.toString(),o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.rotate"),value:e.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:c=>{e.rotate=Number(c),o(t,e)},minW:"full"},{type:"switch",label:a("panel.details.stations.londonTubeBasic.terminal"),isChecked:e.terminal,isDisabled:e.transfer[0].length>1,onChange:c=>{e.terminal=c,o(t,e)},oneLine:!0,minW:"full"},{type:"select",label:a("panel.details.stations.londonTubeCommon.stepFreeAccess"),value:e.stepFreeAccess,options:{none:a("panel.details.stations.londonTubeCommon.stepFreeAccessNone"),train:a("panel.details.stations.londonTubeCommon.stepFreeAccessTrain"),platform:a("panel.details.stations.londonTubeCommon.stepFreeAccessPlatform")},onChange:c=>{e.stepFreeAccess=c,o(t,e)},minW:"full"}],i=(l=e.transfer)!=null?l:He.transfer,d=c=>h=>{const u=structuredClone(i);if(u.length<=c)for(let p=u.length;p<=c;p++)u[p]=[pn];u[c].push(h),e.transfer=u,o(t,e)},f=c=>h=>{if(i.length>c&&i[c].length>h){const u=i.map((p,g)=>g===c?p.filter((C,y)=>y!==h):p);e.transfer=u,o(t,e)}},r=c=>(h,u)=>{if(i.length>c&&i[c].length>h){const p=i.map((g,C)=>C===c?g.map((y,b)=>b===h?[0,1,2,3,4,5,6].map(O=>u[O]===void 0?y[O]:u[O]):y):g);e.transfer=p,o(t,e)}};return n.jsxs(n.Fragment,{children:[n.jsx(H,{fields:m}),n.jsx(ge,{label:a("panel.details.stations.interchange.title"),children:n.jsxs(Ue,{align:"flex-start",children:[n.jsx(Yt,{size:"xs",children:a("panel.details.stations.londonTubeBasic.shareTracks")}),n.jsx(ti,{interchangeList:i[0],onAdd:d(0),onDelete:f(0),onUpdate:r(0)})]})})]})},Ko=n.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:n.jsx("rect",{x:"6",y:"9",width:"12",height:"6",stroke:"currentColor",fill:"currentColor"})}),ei={component:Qo,icon:Ko,defaultAttrs:He,attrsComponent:Jo,metadata:{displayName:"panel.details.stations.londonTubeBasic.displayName",cities:[B.London],canvas:[Z.RailMap],categories:[q.Metro],tags:[]}};function ti(s){const{interchangeList:t,onAdd:e,onDelete:o,onUpdate:a}=s,m=tt(),{paletteAppClip:{output:i}}=nt(l=>l.runtime),{t:d}=X(),[f,r]=x.useState();return x.useEffect(()=>{f!==void 0&&i&&(a==null||a(f,[...i,t[f][4]]),r(void 0))},[i==null?void 0:i.toString()]),n.jsxs(cn,{direction:"column",children:[t.length===0&&n.jsxs(Fe,{spacing:.5,"data-testid":"interchange-card-stack",children:[n.jsx(fn,{as:"i",flex:1,align:"center",fontSize:"md",colorScheme:"gray",children:d("panel.details.stations.interchange.noTrackShare")}),n.jsx(ve,{size:"sm",variant:"ghost","aria-label":d("panel.details.stations.interchange.add"),onClick:()=>e==null?void 0:e(pn),icon:n.jsx(Pe,{})})]}),t.map((l,c)=>n.jsxs(Fe,{spacing:.5,"data-testid":"interchange-card-stack-".concat(c),children:[n.jsx(ge,{label:d("color"),minW:"40px",noLabel:c!==0,children:n.jsx(Dt,{theme:[l[0],l[1],l[2],l[3]],onClick:()=>{r(c),m(Xt([l[0],l[1],l[2],l[3]]))}})}),n.jsx(ge,{label:d("panel.details.stations.londonTubeBasic.shareTracksIndex"),children:n.jsx(xa,{defaultValue:l[4],min:-5,max:5,step:1,onThrottledChange:h=>a==null?void 0:a(c,[l[0],l[1],l[2],l[3],h])})}),n.jsxs(Ue,{children:[e&&c===t.length-1?n.jsx(ve,{size:"sm",variant:"ghost","aria-label":d("panel.details.stations.interchange.copy"),onClick:()=>{const h=structuredClone(t.slice(-1)[0]);h[4]=Math.max(...t.map(u=>u[4]))+1,e==null||e(h)},icon:n.jsx(mn,{})}):n.jsx(hn,{minW:8}),o&&c!==0&&n.jsx(ve,{size:"sm",variant:"ghost","aria-label":d("panel.details.stations.interchange.remove"),onClick:()=>o==null?void 0:o(c),icon:n.jsx(Ct,{})})]})]},c))]})}const fe=5,ha=2*fe,ni=.85*ha,ai=s=>{var w;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,nameOffsetX:r=dt.nameOffsetX,nameOffsetY:l=dt.nameOffsetY,stepFreeAccess:c=dt.stepFreeAccess}=(w=a[k.LondonTubeInt])!=null?w:dt,h=x.useCallback(v=>m(t,v),[t,m]),u=x.useCallback(v=>i(t,v),[t,i]),p=x.useCallback(v=>d(t,v),[t,d]),g=.66*fe+fe/2,C=r==="left"?-(fe/2+fe*1.33):r==="right"?fe/2+fe*1.33:0,y=l==="top"?-(fe/2+fe*1.33):l==="bottom"?fe/2+fe*1.33:0,b=r==="left"?"end":r==="right"?"start":"middle",O=l==="top"?"auto":l==="bottom"?"hanging":"middle";return n.jsxs("g",{id:t,children:[n.jsx("g",{transform:"translate(".concat(e,", ").concat(o,")"),onPointerDown:h,onPointerMove:u,onPointerUp:p,style:{cursor:"move"},children:c==="none"?n.jsx("circle",{id:"stn_core_".concat(t),r:1.25*fe,width:fe*.66,height:g,stroke:"black",strokeWidth:.5*fe,fill:"white"}):n.jsx(fa,{id:t,stepFreeAccess:c,transform:"scale(0.2333)"})}),n.jsx("g",{transform:"translate(".concat(e+C,", ").concat(o+y,")"),textAnchor:b,fill:"#003888",children:n.jsx(T,{text:f[0].split("\n"),fontSize:ha,lineHeight:ni,dominantBaseline:O,grow:l==="top"?"up":l==="bottom"?"down":"bidirectional",baseOffset:1,className:"rmp-name__tube"})})]})},dt={names:["Station"],nameOffsetX:"right",nameOffsetY:"top",stepFreeAccess:"none"},si=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:a}=X(),m=[{type:"textarea",label:a("panel.details.stations.common.nameEn"),value:e.names[0],onChange:i=>{e.names[0]=i.toString(),o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:a("panel.details.stations.common.left"),middle:a("panel.details.stations.common.middle"),right:a("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetX=i,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:a("panel.details.stations.common.top"),middle:a("panel.details.stations.common.middle"),bottom:a("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetY=i,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.londonTubeCommon.stepFreeAccess"),value:e.stepFreeAccess,options:{none:a("panel.details.stations.londonTubeCommon.stepFreeAccessNone"),train:a("panel.details.stations.londonTubeCommon.stepFreeAccessTrain"),platform:a("panel.details.stations.londonTubeCommon.stepFreeAccessPlatform")},onChange:i=>{e.stepFreeAccess=i,o(t,e)},minW:"full"}];return n.jsx(H,{fields:m})},oi=n.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:n.jsx("circle",{cx:"12",cy:"12",r:"6",stroke:"currentColor",fill:"white"})}),ii={component:ai,icon:oi,defaultAttrs:dt,attrsComponent:si,metadata:{displayName:"panel.details.stations.londonTubeInt.displayName",cities:[B.London],canvas:[Z.RailMap],categories:[q.Metro],tags:[]}},li=s=>{var b;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,nameOffsetX:r=ft.nameOffsetX,nameOffsetY:l=ft.nameOffsetY,interchange:c=ft.interchange}=(b=a[k.GuangdongIntercityRailway])!=null?b:ft,h=x.useCallback(O=>m(t,O),[t,m]),u=x.useCallback(O=>i(t,O),[t,i]),p=x.useCallback(O=>d(t,O),[t,d]),g=r==="left"?-13.33:r==="right"?13.33:0,C=(f[ee[l].namesPos].split("\n").length*Je[l].lineHeight+Je[l].offset)*ee[l].polarity,y=r==="left"?"end":r==="right"?"start":"middle";return x.useMemo(()=>n.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[n.jsx("circle",{r:5,stroke:"#2559a8",strokeWidth:"1.5",fill:"white"}),c&&n.jsx("circle",{r:2.5,stroke:"#2559a8",strokeWidth:"1",fill:"white"}),n.jsx("circle",{id:"stn_core_".concat(t),r:5+1.33/2,fill:"white",fillOpacity:"0",onPointerDown:h,onPointerMove:u,onPointerUp:p,style:{cursor:"move"}}),n.jsxs("g",{transform:"translate(".concat(g,", ").concat(C,")"),textAnchor:y,className:"rmp-name-outline",strokeWidth:"1",children:[n.jsx(T,{text:f[0].split("\n"),fontSize:13.13,lineHeight:13.13,grow:"up",baseOffset:1,className:"rmp-name__zh"}),n.jsx(T,{text:f[1].split("\n"),dx:r==="right"?1.67:0,fontSize:5.83,lineHeight:5.83,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]}),[t,e,o,...f,r,l,c,h,u,p])},ft={...$,nameOffsetX:"right",nameOffsetY:"top",interchange:!1},ri=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:a}=X(),m=[{type:"textarea",label:a("panel.details.stations.common.nameZh"),value:e.names[0],onChange:i=>{e.names[0]=i.toString(),o(t,e)},minW:"full"},{type:"textarea",label:a("panel.details.stations.common.nameEn"),value:e.names[1],onChange:i=>{e.names[1]=i.toString(),o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:a("panel.details.stations.common.left"),middle:a("panel.details.stations.common.middle"),right:a("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetX=i,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:a("panel.details.stations.common.top"),middle:a("panel.details.stations.common.middle"),bottom:a("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetY=i,o(t,e)},minW:"full"},{type:"switch",label:a("panel.details.stations.interchange.title"),oneLine:!0,isChecked:e.interchange,onChange:i=>{e.interchange=i,o(t,e)},minW:"full"}];return n.jsx(H,{fields:m})},ci=n.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[n.jsx("circle",{cx:"12",cy:"12",r:"8",stroke:"currentColor",strokeWidth:"2.25",fill:"white"}),n.jsx("circle",{cx:"12",cy:"12",r:"4",stroke:"currentColor",strokeWidth:"1.5",fill:"white"})]}),mi={component:li,icon:ci,defaultAttrs:ft,attrsComponent:ri,metadata:{displayName:"panel.details.stations.guangdongIntercityRailway.displayName",cities:[B.Shanghai],canvas:[Z.RailMap],categories:[q.Metro],tags:[]}},Mi={[k.ShmetroBasic]:Va,[k.ShmetroBasic2020]:Qa,[k.ShmetroInt]:ts,[k.ShmetroOutOfSystemInt]:os,[k.ShanghaiSuburbanRailway]:cs,[k.GzmtrBasic]:Ns,[k.GzmtrInt]:Bs,[k.GzmtrInt2024]:$s,[k.BjsubwayBasic]:Xs,[k.BjsubwayInt]:Us,[k.MTR]:eo,[k.SuzhouRTBasic]:so,[k.SuzhouRTInt]:ro,[k.KunmingRTBasic]:ho,[k.KunmingRTInt]:xo,[k.MRTBasic]:jo,[k.MRTInt]:_o,[k.JREastBasic]:Mo,[k.JREastImportant]:To,[k.FoshanMetroBasic]:Po,[k.QingdaoMetroStation]:Xo,[k.TokyoMetroBasic]:Fo,[k.TokyoMetroInt]:Zo,[k.LondonTubeBasic]:ei,[k.LondonTubeInt]:ii,[k.GuangdongIntercityRailway]:mi},di="RMP_MASTER_CHANNEL",fi="MASTER_POST",Fn=new BroadcastChannel(di),rt={id:"null",value:"",param:null,bg:"#000000",fg:R.white},hi={h:"80%",w:"80%","& iframe":{h:"100%",w:"100%"},"& div":{h:"100%",w:"100%"}},ui=s=>{const{isOpen:t,onClose:e,onSubmit:o}=s,{t:a}=X(),m=x.useRef(window.graph),i=Sa(),[d,f]=x.useState([]),[r,l]=x.useState(rt),[c,h]=x.useState(""),[u,p]=x.useState(!1),[g,C]=x.useState(!1);x.useEffect(()=>{t&&(h(""),l(rt),p(!1),f(na(m.current).filter(_=>_.randomId).map(_=>{var E,I,V;return{id:_.randomId,value:(E=_.label)!=null?E:_.randomId,param:_,bg:(I=_.labelColorBg)!=null?I:rt.bg,fg:(V=_.labelColorFg)!=null?V:rt.fg}})))},[t]);const y=_=>{var E,I,V,G,Q;try{const Y=(E=r.param)!=null?E:JSON.parse(_),ce=Y.id?Y.id:Y.randomId,ne=(I=Y.labelColorBg)!=null?I:ba(),ae={randomId:ce,label:(V=Y.label)!=null?V:ce,labelColorBg:ne,labelColorFg:ja(ne),nodeType:(G=Y.nodeType)!=null?G:Y.type,transform:(Q=Y.transform)!=null?Q:Oa,svgs:Y.svgs,components:Y.components,color:Y.color,core:Y.core,version:Y.version};if(!ae.version||ae.version<2){i({title:"Outdated configuration!",status:"error",duration:9e3,isClosable:!0});return}o(ae)}catch(Y){C(!0);return}e()},b=x.useRef(t),[O,w]=x.useState("DESIGNER"),[v,N]=x.useState(!1);x.useEffect(()=>{b.current=t},[t]),x.useEffect(()=>{const _=E=>{const{event:I,data:V}=E.data;I===fi&&b.current&&(N(!1),y(V))};return Fn.addEventListener("message",_),()=>{Fn.removeEventListener("message",_)}},[]);const S=async()=>{w("DESIGNER"),N(!0)},j=()=>{w("GALLERY"),N(!0)},A=_=>{C(!1),h(_.target.value),l(rt)},M=_=>{l(_),p(!1),h("")};return n.jsxs(n.Fragment,{children:[n.jsxs(Vn,{isOpen:t,onClose:e,size:"sm",scrollBehavior:"inside",children:[n.jsx(Gn,{}),n.jsxs(Zn,{children:[n.jsx(qn,{children:a("header.settings.procedures.masterManager.importTitle")}),n.jsx(Qn,{}),n.jsxs(Jn,{children:[n.jsx(ge,{label:a("header.settings.procedures.masterManager.importFrom"),children:n.jsx(Ca,{data:d,displayHandler:_=>n.jsx(qt,{name:_.value,fg:_.fg,bg:_.bg,title:_.value,sx:{display:"inline-block",overflow:"hidden",textOverflow:"ellipsis"}}),filter:(_,E)=>E.id.toLowerCase().includes(_.toLowerCase())||Object.values(E.id).some(I=>I.toLowerCase().includes(_.toLowerCase())),value:r.value,onChange:M})}),n.jsxs(ge,{label:a("header.settings.procedures.masterManager.importOther"),children:[n.jsxs($t,{direction:"row",width:"100%",children:[n.jsx(pe,{m:1,width:"100%",onClick:S,children:a("RMP Designer")}),n.jsx(pe,{m:1,width:"100%",onClick:j,children:a("RMP Gallery")})]}),n.jsx(pe,{m:1,onClick:()=>p(!0),children:a("header.settings.procedures.masterManager.importParam")}),n.jsx(ka,{width:"100%",placeholder:"qwq",fontSize:"sm",fontFamily:"monospace",hidden:!u,onChange:A,isInvalid:g})]})]}),n.jsxs(Kn,{children:[n.jsx(pe,{colorScheme:"blue",variant:"outline",mr:"1",onClick:e,children:a("cancel")}),n.jsx(pe,{colorScheme:"blue",variant:"solid",mr:"1",onClick:()=>y(c),isDisabled:r.id==="null"&&c==="",children:a("apply")})]})]})]}),n.jsx(pi,{isOpen:v,onClose:()=>N(!1),source:O})]})},pi=s=>{const{isOpen:t,onClose:e,source:o}=s,a=o==="DESIGNER"?"/rmp-designer/#/export":"/rmp-gallery/?tabId=2&master=true";return n.jsxs(ya,{isOpen:t,onClose:e,size:"full",sx:hi,children:[n.jsx("iframe",{src:a,loading:"lazy"}),n.jsx(Na,{onClick:e,position:"fixed",top:"5px",right:"15px"})]})},Ai=s=>{const{isOpen:t,onClose:e}=s,{t:o}=X(),{refresh:{nodes:a}}=nt(C=>C.runtime),m=x.useRef(window.graph),i=tt(),[d,f]=x.useState([]);x.useEffect(()=>{t&&f(na(m.current))},[t,a]);const[r,l]=x.useState(void 0),c=C=>{m.current.filterNodes(y=>m.current.getNodeAttribute(y,"type")===K.Master&&m.current.getNodeAttributes(y)[K.Master].randomId===r).forEach(y=>{const b=structuredClone(C),O=m.current.getNodeAttributes(y),w=structuredClone(O[K.Master]),v=N=>{w.components.forEach(S=>{var j;if(S.id===N)return(j=S.value)!=null?j:S.defaultValue})};b.components.forEach((N,S)=>{var j;b.components[S].value=(j=v(N.id))!=null?j:N.defaultValue}),b.color!==void 0&&(b.color.value=w.color?b.color.value:b.color.defaultValue),m.current.mergeNodeAttributes(y,{[K.Master]:b})}),i(ht()),i(ut(m.current.export()))},h=C=>{const y={id:C.randomId,type:C.nodeType,label:C.label,svgs:C.svgs,components:C.components,color:C.color,core:C.core,transform:C.transform,version:C.version};y.components.forEach((b,O)=>{y.components[O].value=b.defaultValue}),Ra("RMP_Master_Node_".concat(new Date().valueOf(),".json"),"application/json",JSON.stringify(y))},u=C=>{m.current.filterNodes(y=>m.current.getNodeAttribute(y,"type")===K.Master&&m.current.getNodeAttributes(y)[K.Master].randomId===C).forEach(y=>{m.current.dropNode(y)}),i(ht()),i(ut(m.current.export()))},p=(C,y)=>{m.current.filterNodes(b=>m.current.getNodeAttribute(b,"type")===K.Master&&m.current.getNodeAttributes(b)[K.Master].randomId===C.randomId).forEach(b=>{m.current.mergeNodeAttributes(b,{[K.Master]:{...C,label:y}})}),i(ht()),i(ut(m.current.export()))},g=d.map(C=>{var b,O,w,v,N;const y=[{label:o("header.settings.procedures.masterManager.id"),type:"custom",component:n.jsx(qt,{name:(b=C.randomId)!=null?b:"undefined",fg:(O=C.labelColorFg)!=null?O:R.white,bg:(w=C.labelColorBg)!=null?w:"#000000"})},{label:o("header.settings.procedures.masterManager.label"),type:"input",value:(v=C.label)!=null?v:o("panel.details.nodes.master.undefined"),onChange:S=>p(C,S),hidden:!C.randomId},{label:o("header.settings.procedures.masterManager.label"),type:"output",value:(N=C.label)!=null?N:o("panel.details.nodes.master.undefined"),hidden:!!C.randomId},{label:o("header.settings.procedures.masterManager.type"),type:"custom",component:n.jsx(qt,{name:o("header.settings.procedures.masterManager.types.".concat(C.nodeType)),fg:R.white,bg:C.nodeType==="MiscNode"?"#FF8651":"#51BC00"})}];return n.jsxs($t,{width:"100%",direction:"row",children:[n.jsx(H,{fields:y,minW:"120px"}),n.jsxs($t,{direction:"row",mr:"auto",children:[n.jsx(pe,{onClick:()=>l(C.randomId),children:n.jsx(va,{})}),n.jsx(pe,{onClick:()=>h(C),isDisabled:!C.randomId,children:n.jsx(wa,{})}),n.jsx(pe,{onClick:()=>u(C.randomId),children:n.jsx(Ct,{})})]})]})});return n.jsxs(Vn,{isOpen:t,onClose:e,size:"xl",scrollBehavior:"inside",children:[n.jsx(Gn,{}),n.jsxs(Zn,{children:[n.jsx(qn,{children:o("header.settings.procedures.masterManager.title")}),n.jsx(Qn,{}),n.jsxs(Jn,{width:"100%",children:[...g,n.jsx(ui,{isOpen:!!r,onClose:()=>l(void 0),onSubmit:c})]}),n.jsx(Kn,{children:n.jsx(pe,{colorScheme:"blue",variant:"outline",mr:"1",onClick:e,children:o("close")})})]})]})};export{Bt as F,Ni as L,Ai as M,Da as a,vi as b,Oi as c,Ra as d,wi as e,Pa as f,T as g,se as h,bi as i,ki as j,ui as k,Ba as l,_i as m,yi as n,Mi as s,ji as t,Si as u}; +import{b as x,u as X,r as F}from"./react-DmTIgZys.js";import{i as H,S as k,aw as K,r as Un,C as B,M as R,aN as Ee,L as ua,e as pa,aP as ga,aQ as Z,aR as q,aS as $,c as tt,d as nt,aT as cn,aU as Pe,P as ge,V as Dt,W as Xt,aV as mn,aW as Ct,aM as dn,q as ht,v as ut,aX as xn,aY as xa,Q as Ca,R as qt,w as ya,aZ as ba,a_ as ja,aO as Oa,D as va,a as wa}from"./index-DRWG9Ar1.js";import{j as n,aK as Fe,a4 as fn,af as ve,ax as Ue,B as hn,a6 as _a,ad as Yt,O as pe,g as $t,b0 as Cn,b1 as yn,aL as Sa,at as Vn,$ as Gn,au as Zn,a1 as qn,a2 as Qn,a3 as Jn,Q as ka,a5 as Kn,al as Na}from"./chakra-t2DzLzXq.js";var ea=(s=>(s.Airport="airport",s.Airport2024="airport_2024",s.Maglev="maglev",s.Disney="disney",s.Railway="railway",s.Railway2024="railway_2024",s.HSR="hsr",s.AirportHK="airport_hk",s.DisneyHK="disney_hk",s.NgongPing360="ngong_ping_360",s.Tiananmen="tiananmen",s.AirportBJ="airport_bj",s.BusTerminalSuzhou="bus_terminal_suzhou",s.RailwaySuzhou="railway_suzhou",s.BusInterchange="bus_interchange",s.AirportSG="airport_sg",s.CruiseCentre="cruise_centre",s.SentosaExpress="sentosa_express",s.CableCar="cable_car",s.Merlion="merlion",s.MarinaBaySands="marina_bay_sands",s.GardensByTheBay="gardens_by_the_bay",s.SingaporeFlyer="singapore_flyer",s.Esplanade="esplanade",s.AirportQingdao="airport_qingdao",s.CoachStationQingdao="coach_station_qingdao",s.CruiseTerminalQingdao="cruise_terminal_qingdao",s.RailwayQingdao="railway_qingdao",s.TramQingdao="tram_qingdao",s.AirportGuangzhou="airport_guangzhou",s.RailwayGuangzhou="railway_guangzhou",s.IntercityGuangzhou="intercity_guangzhou",s))(ea||{});const Ma=s=>{const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{type:f=Qt.type}=a!=null?a:Qt,r=x.useRef(null),[l,c]=x.useState({width:25,height:25});x.useEffect(()=>c(r.current.getBBox()),[f,c,r]);const h=x.useCallback(g=>m(t,g),[t,m]),u=x.useCallback(g=>i(t,g),[t,i]),p=x.useCallback(g=>d(t,g),[t,d]);return n.jsx("g",{id:t,transform:"translate(".concat(e-l.width/2,", ").concat(o-l.height/2,")"),onPointerDown:h,onPointerMove:u,onPointerUp:p,style:{cursor:"move"},children:n.jsx("image",{ref:r,href:"/rmp/images/facilities/".concat(f,".svg"),onLoad:()=>c(r.current.getBBox())})})},Qt={type:"airport"},Aa=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:a}=X(),m=[{type:"select",label:a("panel.details.nodes.facilities.type"),value:e.type,options:{airport:"Airport",airport_2024:"Airport 2024",maglev:"Maglev",disney:"Disney",railway:"Railway",railway_2024:"Railway 2024",hsr:"HSR",airport_hk:"Airport Hongkong",disney_hk:"Disney Hongkong",ngong_ping_360:"Ngong Ping 360",tiananmen:"Tiananmen",airport_bj:"Airport Beijing",bus_terminal_suzhou:"Bus Terminal Suzhou",railway_suzhou:"Railway Suzhou",bus_interchange:"Bus Interchange",airport_sg:"Changi Airport",cruise_centre:"Cruise Centre",sentosa_express:"Sentosa Express",cable_car:"Cable Car",merlion:"Merlion",marina_bay_sands:"Marina Bay Sands",gardens_by_the_bay:"Gardens by the Bay",singapore_flyer:"Singapore Flyer",esplanade:"Esplanade",airport_qingdao:"Airport Qingdao",railway_qingdao:"Railway Qingdao",coach_station_qingdao:"Coach Station Qingdao",cruise_terminal_qingdao:"Cruise Terminal Qingdao",tram_qingdao:"Tram Qingdao",airport_guangzhou:"Airport Guangzhou",railway_guangzhou:"Railway Guangzhou",intercity_guangzhou:"Intercity Guangzhou"},onChange:i=>{e.type=i,o(t,e)}}];return n.jsx(H,{fields:m,minW:"full"})},za=n.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:n.jsxs("g",{transform:"translate(12, 0)scale(0.4)",children:[n.jsx("circle",{cx:"0",cy:"29.33899",r:"29.33899",fill:"currentColor"}),n.jsx("path",{id:"airport",d:"M28.9769,6.60134c1.711.013,3.111,2.53205,3.111,4.241v10.337s17.106,15.435,17.358,15.666a1.145,1.145,0,0,1,.488,1.152v2.833c0,.651-.451.61-.695.467-.334-.119-17.151-8.863-17.151-8.863-.004,1.458-.797,9.006-1.326,13.304,0,0,4.61,2.457,4.699,2.521.334.268.352.359.352.852v2.001c0,.477-.352.428-.51.324-.183-.062-5.693-1.921-5.693-1.921a2.56018,2.56018,0,0,0-.633-.127,2.31654,2.31654,0,0,0-.666.127s-5.477,1.859-5.672,1.921c-.185.104-.523.153-.523-.324v-2.001c0-.493.029-.584.367-.852.086-.064,4.678-2.521,4.678-2.521-.524-4.298-1.307-11.846-1.325-13.304,0,0-16.822,8.744-17.148,8.863-.217.143-.69.184-.69-.467v-2.833a1.16206,1.16206,0,0,1,.473-1.152c.276-.231,17.365-15.666,17.365-15.666v-10.337c0-1.709,1.403-4.228,3.14105-4.241",transform:"translate(-28.9697,0.14347)",fill:"white"})]})}),yi={component:Ma,icon:za,defaultAttrs:Qt,attrsComponent:Aa,metadata:{displayName:"panel.details.nodes.facilities.displayName",tags:[]}},bi=()=>navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome"),Mt={source:'url("./fonts/LTAIdentity-Medium.woff")',descriptors:{display:"swap"}},it={source:'url("./fonts/Mplus2-Medium.otf")',descriptors:{display:"swap"}},bn={source:'url("./fonts/Roboto-Bold.ttf")',descriptors:{display:"swap"}},jn={source:'url("./fonts/MontaguSlab.ttf")',descriptors:{display:"swap"}},On={source:'url("./fonts/Railway-PlyE.otf")',descriptors:{display:"swap"}},Bt={[k.MTR]:{className:[".rmp-name__mtr__zh",".rmp-name__mtr__en"],cssFont:{"MyriadPro-Semibold":void 0,"Vegur-Bold":void 0,"GenYoMinTW-SB":void 0},cssName:"fonts_mtr"},[k.MRTBasic]:{className:[".rmp-name__mrt"],cssFont:{IdentityFont:Mt},cssName:"fonts_mrt"},[k.MRTInt]:{className:[".rmp-name__mrt"],cssFont:{IdentityFont:Mt},cssName:"fonts_mrt"},[k.JREastBasic]:{className:[".rmp-name__jreast_ja",".rmp-name__jreast_en"],cssFont:{"M PLUS 2":it},cssName:"fonts_jreast"},[k.JREastImportant]:{className:[".rmp-name__jreast_ja",".rmp-name__jreast_en"],cssFont:{"M PLUS 2":it},cssName:"fonts_jreast"},[K.BerlinSBahnLineBadge]:{className:[".rmp-name__berlin"],cssFont:{Roboto:bn},cssName:"fonts_berlin"},[K.BerlinUBahnLineBadge]:{className:[".rmp-name__berlin"],cssFont:{Roboto:bn},cssName:"fonts_berlin"},[K.JREastLineBadge]:{className:[".rmp-name__jreast_ja",".rmp-name__jreast_en"],cssFont:{'"M PLUS 2"':it},cssName:"fonts_jreast"},[K.MRTDestinationNumbers]:{className:[".rmp-name__mrt"],cssFont:{IdentityFont:Mt},cssName:"fonts_mrt"},[K.MRTLineBadge]:{className:[".rmp-name__mrt"],cssFont:{IdentityFont:Mt},cssName:"fonts_mrt"},[k.TokyoMetroBasic]:{className:[".rmp-name__tokyo_en",".rmp-name__jreast_ja"],cssFont:{MontaguSlab:jn,"M PLUS 2":it},cssName:"fonts_tokyo"},[k.TokyoMetroInt]:{className:[".rmp-name__tokyo_en",".rmp-name__jreast_ja"],cssFont:{MontaguSlab:jn,"M PLUS 2":it},cssName:"fonts_tokyo"},[k.LondonTubeBasic]:{className:[".rmp-name__tube"],cssFont:{Railway:On},cssName:"fonts_tube"},[k.LondonTubeInt]:{className:[".rmp-name__tube"],cssFont:{Railway:On},cssName:"fonts_tube"}},vn=[],Ba=async s=>{const t=Bt[s];if(!t)return;const{cssFont:e,cssName:o}=t;if(vn.includes(o))return;vn.push(o),await Promise.all(Object.entries(e).map(([m,i])=>Un.loadFont(m,i&&{configs:[i]})));const a=document.createElement("link");a.rel="stylesheet",a.id=o,a.href="/rmp/styles/".concat(o,".css"),document.head.append(a)},Ta=async(s,t)=>{var m;const e=document.createElement("style");for(let i=document.styleSheets.length-1;i>=0;i=i-1)if((m=document.styleSheets[i].href)!=null&&m.endsWith("styles/".concat(t,".css"))){e.textContent=[...document.styleSheets[i].cssRules].map(d=>d.cssText).filter(d=>!d.startsWith("@font-face")).join("\n");break}e.textContent+="\n";const a=(await Promise.allSettled(Object.keys(s).map(Un.getFontCSS))).filter(i=>i.status==="fulfilled").map(i=>i.value);return e.textContent+=a.join("\n"),e},T=x.forwardRef((s,t)=>{const{text:e,lineHeight:o,grow:a,dominantBaseline:m=a==="up"?"auto":a==="down"?"hanging":"middle",baseOffset:i=2,funcDX:d=l=>0,...f}=s,r=a==="bidirectional"?-((e.length-1)*o)/2:0;return n.jsx("g",{ref:t,children:(a==="up"?[...e].reverse():e).map((l,c,h)=>n.jsx("text",{dy:(c*o+i)*(a==="up"?-1:1)+r,dx:d(c),dominantBaseline:m,...f,children:l},"".concat(l).concat(c)))})});T.displayName="MultilineText";const wn={zh:16,en:10},ee={top:{namesPos:1,lineHeight:wn.en,polarity:-1},middle:{namesPos:0,lineHeight:0,polarity:0},bottom:{namesPos:0,lineHeight:wn.zh,polarity:1}},ta={zh:k.ShmetroBasic,en:k.ShmetroBasic,mtr__zh:k.MTR,mtr__en:k.MTR,berlin:K.BerlinSBahnLineBadge,mrt:k.MRTBasic,jreast_ja:k.JREastBasic,jreast_en:k.JREastBasic,tokyo_en:k.TokyoMetroBasic,tube:k.LondonTubeBasic},Ia=s=>{const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{content:f=se.content,fontSize:r=se.fontSize,lineHeight:l=se.lineHeight,textAnchor:c=se.textAnchor,dominantBaseline:h=se.dominantBaseline,language:u=se.language,color:p=se.color,rotate:g=se.rotate,italic:C=se.italic,bold:y=se.bold}=a!=null?a:se,b=x.useRef(null),[O,w]=x.useState({x:0,y:0,width:32,height:16});x.useEffect(()=>w(b.current.getBBox()),[f,r,l,c,h,u,g,C,y,w,b]),x.useEffect(()=>{const j=ta[u];j&&Ba(j)},[u]);const v=x.useCallback(j=>m(t,j),[t,m]),N=x.useCallback(j=>i(t,j),[t,i]),S=x.useCallback(j=>d(t,j),[t,d]);return n.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")rotate(").concat(g,")"),onPointerDown:v,onPointerMove:N,onPointerUp:S,style:{cursor:"move"},children:[n.jsx("rect",{className:"removeMe",fill:"gray",fillOpacity:"0.1",x:O.x-1.5,y:O.y-1.5,width:O.width+3,height:O.height+3}),n.jsx(T,{ref:b,text:f.split("\n"),lineHeight:l,grow:"down",className:"rmp-name__".concat(u),fontSize:r,textAnchor:c,dominantBaseline:h,fill:p[2],fontStyle:C,fontWeight:y})]})},se={content:"Enter your text here",fontSize:16,lineHeight:16,textAnchor:"middle",dominantBaseline:"middle",language:"en",color:[B.Shanghai,"jsr","#000000",R.white],rotate:0,italic:"normal",bold:"normal"},Ea=s=>{var i,d,f,r,l,c,h;const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:a}=X(),m=[{type:"textarea",label:a("panel.details.nodes.text.content"),value:(i=e.content)!=null?i:se.content,onChange:u=>{e.content=u.toString(),o(t,e)},minW:"full"},{type:"input",label:a("panel.details.nodes.text.fontSize"),value:((d=e.fontSize)!=null?d:se.fontSize).toString(),validator:u=>Number.isInteger(u)&&Number(u)>0,onChange:u=>{e.fontSize=Number(u),o(t,e)},minW:"full"},{type:"input",label:a("panel.details.nodes.text.lineHeight"),value:((f=e.lineHeight)!=null?f:se.lineHeight).toString(),validator:u=>Number.isInteger(u)&&Number(u)>0,onChange:u=>{e.lineHeight=Number(u),o(t,e)},minW:"full"},{type:"select",label:a("panel.details.nodes.text.textAnchor"),value:(r=e.textAnchor)!=null?r:se.textAnchor,options:{start:a("panel.details.nodes.text.start"),middle:a("panel.details.nodes.text.middle"),end:a("panel.details.nodes.text.end")},onChange:u=>{e.textAnchor=u,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.nodes.text.dominantBaseline"),value:(l=e.dominantBaseline)!=null?l:se.dominantBaseline,options:{auto:a("panel.details.nodes.text.auto"),middle:a("panel.details.nodes.text.middle"),hanging:a("panel.details.nodes.text.hanging")},onChange:u=>{e.dominantBaseline=u,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.nodes.text.language"),value:(c=e.language)!=null?c:se.language,options:{zh:a("panel.details.nodes.text.zh"),en:a("panel.details.nodes.text.en"),mtr__zh:a("panel.details.nodes.text.mtr__zh"),mtr__en:a("panel.details.nodes.text.mtr__en"),berlin:a("panel.details.nodes.text.berlin"),mrt:a("panel.details.nodes.text.mrt"),jreast_ja:a("panel.details.nodes.text.jreast_ja"),jreast_en:a("panel.details.nodes.text.jreast_en"),tokyo_en:a("panel.details.nodes.text.tokyo_en"),tube:a("panel.details.nodes.text.tube")},onChange:u=>{e.language=u.toString(),o(t,e)},minW:"full"},{type:"select",label:a("panel.details.nodes.text.rotate"),value:(h=e.rotate)!=null?h:se.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:u=>{e.rotate=Number(u),o(t,e)},minW:"full"},{type:"switch",label:a("panel.details.nodes.text.italic"),isChecked:e.italic==="italic",onChange:u=>{e.italic=u?"italic":"normal",o(t,e)},minW:"full"},{type:"switch",label:a("panel.details.nodes.text.bold"),isChecked:e.bold==="bold",onChange:u=>{e.bold=u?"bold":"normal",o(t,e)},minW:"full"},{type:"custom",label:a("color"),component:n.jsx(Ee,{type:K.Text,defaultTheme:se.color})}];return n.jsx(H,{fields:m})},$a=n.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:n.jsx("text",{x:"12",y:"12",textAnchor:"middle",dominantBaseline:"middle",fontSize:"10",children:"Text"})}),ji={component:Ia,icon:$a,defaultAttrs:se,attrsComponent:Ea,metadata:{displayName:"panel.details.nodes.text.displayName",tags:[]}},Oi=(s,t)=>s.filterEdges((e,o,a,m,i,d,f)=>t.has(a)&&t.has(m)),Pa=s=>{const t=Object.fromEntries([...Object.values(k),Object.values(K)].map(e=>[e,!1]));return s.forEachNode(e=>{const o=s.getNodeAttribute(e,"type");t[o]=!0}),t},Wa=(s,t,e,o,a,m)=>s<=a&&a<=e&&t<=m&&m<=o,vi=(s,t,e,o,a)=>{const m=t<=o?t:o,i=e<=a?e:a,d=t<=o?o:t,f=e<=a?a:e;return s.filterNodes((r,l)=>Wa(m,i,d,f,l.x,l.y))},wi=(s,t,e)=>{const o=[],a=new Set;return t.forEach(m=>{const i=s.getNodeAttributes(m).type,d=s.getNodeAttribute(m,i);if(d.color!==void 0){const f=d.color;a.has(f.toString())||(o.push(f),a.add(f.toString()))}}),e.filter(m=>ua.includes(s.getEdgeAttribute(m,"style"))).forEach(m=>{const i=s.getEdgeAttributes(m),d=i[i.style].color;a.has(d.toString())||(o.push(d),a.add(d.toString()))}),o},na=s=>{const t=[],e=new Set;return s.filterNodes(o=>s.getNodeAttribute(o,"type")===K.Master).forEach(o=>{const a=s.getNodeAttributes(o)[K.Master];e.has(a.randomId)||(e.add(a.randomId),t.push(a))}),t},Ra=(s,t,e)=>{const o=new Blob([e],{type:t});Da(s,o)},Da=(s,t)=>{const e=window.URL.createObjectURL(t),o=document.createElement("a");o.href=e,o.download=s,document.body.appendChild(o),o.click(),document.body.removeChild(o),window.URL.revokeObjectURL(e)},_i=async(s,t,e,o)=>{const{xMin:a,yMin:m,xMax:i,yMax:d}=pa(s),[f,r]=[i-a,d-m],l=document.getElementById("canvas").cloneNode(!0);t||l.appendChild(await La(i-400,d-120)),l.setAttribute("viewBox","".concat(a," ").concat(m," ").concat(f," ").concat(r)),l.setAttribute("width",f.toString()),l.setAttribute("height",r.toString()),Object.entries({".rmp-name-outline":["paint-order","stroke","stroke-linejoin"]}).forEach(([h,u])=>{const p=document.querySelector(h);if(p===null)return;const g=window.getComputedStyle(p);l.querySelectorAll(h).forEach(C=>{if(h===".rmp-name-outline"&&o===1.1){const y=C.insertAdjacentElement("afterend",C.cloneNode(!0));y&&(y.classList.remove(h.slice(1)),y.classList.length===0&&C.removeAttribute("class"),y.removeAttribute("stroke-width"))}u.forEach(y=>{C.setAttribute(y,g.getPropertyValue(y))}),C.classList.remove(h.slice(1)),C.classList.length===0&&C.removeAttribute("class")})}),l.querySelectorAll('[fill="url(#opaque)"]').forEach(h=>{h.setAttribute("fill","white"),h.setAttribute("fill-opacity","0")}),l.querySelectorAll(".removeMe").forEach(h=>{h.remove()});const c=Pa(s);return await Xa(l,s,c,e),await Ya(l,s,c),{elem:l,width:f,height:r}},Xa=async(s,t,e,o)=>{var m;const a=new Set;if(Object.keys(Bt).filter(i=>e[i]).forEach(i=>a.add(i)),t.filterNodes((i,d)=>i.startsWith("misc_node_")&&d.type===K.Text).map(i=>t.getNodeAttribute(i,K.Text).language).map(i=>ta[i]).filter(i=>i!==k.ShmetroBasic).forEach(i=>a.add(i)),o)[".rmp-name__zh",".rmp-name__en"].forEach(i=>{s.querySelectorAll(i).forEach(d=>{d.classList.remove(i.slice(1)),d.classList.length===0&&d.removeAttribute("class")})}),a.forEach(i=>{Bt[i].className.forEach(d=>{s.querySelectorAll(d).forEach(f=>{f.classList.remove(d.slice(1)),f.classList.length===0&&f.removeAttribute("class")})})});else{const i=document.createElement("style");for(let d=0;df.cssText).join("\n");break}s.prepend(i),await Promise.all([...a.values()].map(d=>Bt[d]).map(async({cssName:d,cssFont:f})=>{try{s.prepend(await Ta(f,d))}catch(r){alert("Failed to load fonts. Fonts in the exported PNG will be missing."),console.error(r)}}))}},Ya=async(s,t,e)=>{if(e[K.Facilities]){const o=t.filterNodes((d,f)=>f.type===K.Facilities),a=Object.fromEntries(Object.values(ea).map(d=>[d,[]]));o.forEach(d=>{var r;const f=(r=t.getNodeAttribute(d,K.Facilities))==null?void 0:r.type;f&&a[f].push(d)});const m=Object.entries(a).filter(([d,f])=>f.length>0).map(([d,f])=>d),i=await Promise.all((await Promise.all(m.map(async d=>await fetch("/rmp//images/facilities/".concat(d,".svg"))))).map(d=>d.text()));m.forEach((d,f)=>{const r=document.createElement("div");r.innerHTML=i[f];const l=r.querySelector("svg"),c=document.createElementNS("http://www.w3.org/2000/svg","symbol");for(const h of l.attributes)c.setAttribute(h.name,h.value);for(;l.firstChild;)c.appendChild(l.firstChild);l.replaceWith(c),c.id=d,s.appendChild(c),a[d].forEach(h=>{const u=s.querySelector("#".concat(h)),p=u==null?void 0:u.querySelector("image");if(p){u.removeChild(p);const g=document.createElementNS("http://www.w3.org/2000/svg","use");g.setAttribute("href","#".concat(d)),g.setAttribute("height",c.getAttribute("height")),g.setAttribute("width",c.getAttribute("width")),u.appendChild(g)}}),r.remove()})}},La=async(s,t)=>{const e=document.createElementNS("http://www.w3.org/2000/svg","g");e.setAttribute("transform","translate(".concat(s,", ").concat(t,")scale(2)"));const a=await(await fetch("/rmp//logo.svg")).text(),m=document.createElement("div");m.innerHTML=a;const i=m.querySelector("svg"),d=document.createElement("g");d.setAttribute("transform","translate(-60, -25)scale(0.1)"),d.setAttribute("font-family","Arial, sans-serif"),d.innerHTML=i.innerHTML,e.appendChild(d);const f=document.createElementNS("http://www.w3.org/2000/svg","text");f.setAttribute("font-family","Arial, sans-serif"),f.setAttribute("font-size","16");const r=ga.t("Rail Map Painter");f.appendChild(document.createTextNode(r));const l=document.createElementNS("http://www.w3.org/2000/svg","text");l.setAttribute("font-family","Arial, sans-serif"),l.setAttribute("font-size","10"),l.setAttribute("y","10");const c=window.location.origin;let h="https://railmapgen.org/";return c.includes("github")?h="https://railmapgen.github.io/":c.includes("gitlab")&&(h="https://railmapgen.gitlab.io/"),h+="?app=rmp",l.appendChild(document.createTextNode(h)),e.appendChild(d),e.appendChild(f),e.appendChild(l),e},Si=()=>{const[s,t]=F.useState({width:void 0,height:void 0});return F.useEffect(()=>{function e(){t({width:window.innerWidth,height:window.innerHeight})}return window.addEventListener("resize",e),e(),()=>window.removeEventListener("resize",e)},[]),s};function ki(){const{i18n:s}=X();return t=>{var e,o;return(o=(e=s.languages.map(a=>t[a]).find(a=>a!==void 0))!=null?e:t.en)!=null?o:"(Translation Error)"}}const Je={top:{lineHeight:6.67,offset:3.5+1.5+5},middle:{lineHeight:0,offset:0},bottom:{lineHeight:12.67,offset:-.17+1+5}},Ha=s=>{var y;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,nameOffsetX:r=Tt.nameOffsetX,nameOffsetY:l=Tt.nameOffsetY}=(y=a[k.ShmetroBasic])!=null?y:Tt,c=x.useCallback(b=>m(t,b),[t,m]),h=x.useCallback(b=>i(t,b),[t,i]),u=x.useCallback(b=>d(t,b),[t,d]),p=r==="left"?-13.33:r==="right"?13.33:0,g=(f[ee[l].namesPos].split("\n").length*Je[l].lineHeight+Je[l].offset)*ee[l].polarity,C=r==="left"?"end":r==="right"?"start":"middle";return x.useMemo(()=>n.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[n.jsx("circle",{id:"stn_core_".concat(t),r:5,stroke:"#393332",strokeWidth:"1",fill:"white",onPointerDown:c,onPointerMove:h,onPointerUp:u,style:{cursor:"move"}}),n.jsxs("g",{transform:"translate(".concat(p,", ").concat(g,")"),textAnchor:C,className:"rmp-name-outline",strokeWidth:"1",children:[n.jsx(T,{text:f[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),n.jsx(T,{text:f[1].split("\n"),dx:r==="right"?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]}),[t,e,o,...f,r,l,c,h,u])},Tt={...$,nameOffsetX:"right",nameOffsetY:"top"},Fa=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:a}=X(),m=[{type:"textarea",label:a("panel.details.stations.common.nameZh"),value:e.names[0],onChange:i=>{e.names[0]=i,o(t,e)},minW:"full"},{type:"textarea",label:a("panel.details.stations.common.nameEn"),value:e.names[1],onChange:i=>{e.names[1]=i,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:a("panel.details.stations.common.left"),middle:a("panel.details.stations.common.middle"),right:a("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetX=i,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:a("panel.details.stations.common.top"),middle:a("panel.details.stations.common.middle"),bottom:a("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetY=i,o(t,e)},minW:"full"}];return n.jsx(H,{fields:m})},Ua=n.jsx("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:n.jsx("circle",{cx:"12",cy:"12",r:"5",stroke:"currentColor",fill:"none"})}),Va={component:Ha,icon:Ua,defaultAttrs:Tt,attrsComponent:Fa,metadata:{displayName:"panel.details.stations.shmetroBasic.displayName",cities:[B.Shanghai],canvas:[Z.RailMap],categories:[q.Metro],tags:[]}},xe={0:{textDx:0,textDy:-17.5,textAnchor:"middle",namesPos:1,lineHeight:6.67,polarity:-1},45:{textDx:1,textDy:-16.25,textAnchor:"start",namesPos:1,lineHeight:6.67,polarity:-1},90:{textDx:12,textDy:0,textAnchor:"start",namesPos:0,lineHeight:0,polarity:0},135:{textDx:5,textDy:21,textAnchor:"start",namesPos:0,lineHeight:12.67,polarity:1},180:{textDx:0,textDy:22.5,textAnchor:"middle",namesPos:0,lineHeight:12.67,polarity:1},225:{textDx:-5,textDy:21,textAnchor:"end",namesPos:0,lineHeight:12.67,polarity:1},270:{textDx:-12,textDy:0,textAnchor:"end",namesPos:0,lineHeight:0,polarity:0},315:{textDx:-1,textDy:-16.25,textAnchor:"end",namesPos:1,lineHeight:6.67,polarity:-1}},Ga=s=>{var g;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,color:r=pt.color,rotate:l=pt.rotate}=(g=a[k.ShmetroBasic2020])!=null?g:pt,c=xe[l].textDy+(f[xe[l].namesPos].split("\n").length-1)*xe[l].lineHeight*xe[l].polarity,h=x.useCallback(C=>m(t,C),[t,m]),u=x.useCallback(C=>i(t,C),[t,i]),p=x.useCallback(C=>d(t,C),[t,d]);return x.useMemo(()=>n.jsxs("g",{id:t,children:[n.jsx("g",{transform:"translate(".concat(e,", ").concat(o,")rotate(").concat(l,")"),children:n.jsx("rect",{id:"stn_core_".concat(t),x:"-2",y:"-7.83",width:"4",height:"7.83",stroke:"none",fill:r[2],onPointerDown:h,onPointerMove:u,onPointerUp:p,style:{cursor:"move"}})}),n.jsxs("g",{transform:"translate(".concat(e+xe[l].textDx,", ").concat(o+c,")"),textAnchor:xe[l].textAnchor,className:"rmp-name-outline",strokeWidth:"1",children:[n.jsx(T,{text:f[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),n.jsx(T,{text:f[1].split("\n"),dx:l>=45&&l<=135?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]}),[t,e,o,...f,l,r,h,u,p])},pt={...$,rotate:0,color:[B.Shanghai,"sh1","#E4002B",R.white]},Za=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:a}=X(),m=[{type:"textarea",label:a("panel.details.stations.common.nameZh"),value:e.names[0],onChange:i=>{e.names[0]=i,o(t,e)},minW:"full"},{type:"textarea",label:a("panel.details.stations.common.nameEn"),value:e.names[1],onChange:i=>{e.names[1]=i,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.rotate"),value:e.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:i=>{e.rotate=Number(i),o(t,e)},minW:"full"},{type:"custom",label:a("color"),component:n.jsx(Ee,{type:k.ShmetroBasic2020,defaultTheme:pt.color})}];return n.jsx(H,{fields:m})},qa=n.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:n.jsx("rect",{x:"6",y:"9",width:"12",height:"6",stroke:"currentColor",fill:"currentColor"})}),Qa={component:Ga,icon:qa,defaultAttrs:pt,attrsComponent:Za,metadata:{displayName:"panel.details.stations.shmetroBasic2020.displayName",cities:[B.Shanghai],canvas:[Z.RailMap],categories:[q.Metro],tags:[]}},_n={top:{lineHeight:6.67,offset:3.5+1.5},middle:{lineHeight:0,offset:0},bottom:{lineHeight:12.67,offset:-.17+1}},Ja=s=>{var j;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,nameOffsetX:r=De.nameOffsetX,nameOffsetY:l=De.nameOffsetY,rotate:c=De.rotate,width:h=De.width,height:u=De.height}=(j=a[k.ShmetroInt])!=null?j:De,p=x.useCallback(A=>m(t,A),[t,m]),g=x.useCallback(A=>i(t,A),[t,i]),C=x.useCallback(A=>d(t,A),[t,d]),y=c===0||c===180?h:c===90||c===270?u:h*Math.SQRT1_2,b=c===0||c===180?u:c===90||c===270?h:h*Math.SQRT1_2,O=r==="left"?-6.83:r==="right"?6.83:0,w=(Math.abs(O)+y/2)*Math.sign(O),v=(f[ee[l].namesPos].split("\n").length*_n[l].lineHeight+_n[l].offset)*ee[l].polarity,N=(Math.abs(v)+b/2)*Math.sign(v),S=r==="left"?"end":r==="right"?"start":"middle";return x.useMemo(()=>n.jsxs("g",{id:t,children:[n.jsx("g",{transform:"translate(".concat(e,", ").concat(o,")rotate(").concat(c,")"),children:n.jsx("rect",{id:"stn_core_".concat(t),x:-h/2,y:-u/2,height:u,width:h,ry:u/2,stroke:"#393332",strokeWidth:"1",fill:"white",onPointerDown:p,onPointerMove:g,onPointerUp:C,style:{cursor:"move"}})}),n.jsxs("g",{transform:"translate(".concat(e+w,", ").concat(o+N,")"),textAnchor:S,className:"rmp-name-outline",strokeWidth:"1",children:[n.jsx(T,{text:f[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),n.jsx(T,{text:f[1].split("\n"),dx:r==="right"?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]}),[t,e,o,...f,r,l,c,h,u,p,g,C])},De={...$,nameOffsetX:"right",nameOffsetY:"top",rotate:0,height:10,width:13},Ka=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:a}=X(),m=[{type:"textarea",label:a("panel.details.stations.common.nameZh"),value:e.names[0],onChange:i=>{e.names[0]=i,o(t,e)},minW:"full"},{type:"textarea",label:a("panel.details.stations.common.nameEn"),value:e.names[1],onChange:i=>{e.names[1]=i,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:a("panel.details.stations.common.left"),middle:a("panel.details.stations.common.middle"),right:a("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetX=i,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:a("panel.details.stations.common.top"),middle:a("panel.details.stations.common.middle"),bottom:a("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetY=i,o(t,e)},minW:"full"},{type:"input",label:a("panel.details.stations.shmetroInt.height"),value:e.height.toString(),validator:i=>Number.isInteger(i),onChange:i=>{e.height=Number(i),o(t,e)},minW:"full"},{type:"input",label:a("panel.details.stations.shmetroInt.width"),value:e.width.toString(),validator:i=>Number.isInteger(i),onChange:i=>{e.width=Number(i),o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.rotate"),value:e.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:i=>{e.rotate=Number(i),o(t,e)},minW:"full"}];return n.jsx(H,{fields:m})},es=n.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:n.jsx("rect",{x:"4.5",y:"7",height:"10",width:"15",ry:"5",stroke:"currentColor",fill:"none"})}),ts={component:Ja,icon:es,defaultAttrs:De,attrsComponent:Ka,metadata:{displayName:"panel.details.stations.shmetroInt.displayName",cities:[B.Shanghai],canvas:[Z.RailMap],categories:[q.Metro],tags:["interchange"]}},ns=s=>{var y;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,nameOffsetX:r=It.nameOffsetX,nameOffsetY:l=It.nameOffsetY}=(y=a[k.ShmetroOutOfSystemInt])!=null?y:It,c=x.useCallback(b=>m(t,b),[t,m]),h=x.useCallback(b=>i(t,b),[t,i]),u=x.useCallback(b=>d(t,b),[t,d]),p=r==="left"?-13.33:r==="right"?13.33:0,g=(f[ee[l].namesPos].split("\n").length*Je[l].lineHeight+Je[l].offset)*ee[l].polarity,C=r==="left"?"end":r==="right"?"start":"middle";return x.useMemo(()=>n.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[n.jsx("circle",{r:5,stroke:"#393332",strokeWidth:"1.33",fill:"white"}),n.jsx("circle",{r:2.3,stroke:"#393332",strokeWidth:"1.33",fill:"white"}),n.jsx("circle",{id:"stn_core_".concat(t),r:5+1.33/2,fill:"white",fillOpacity:"0",onPointerDown:c,onPointerMove:h,onPointerUp:u,style:{cursor:"move"}}),n.jsxs("g",{transform:"translate(".concat(p,", ").concat(g,")"),textAnchor:C,className:"rmp-name-outline",strokeWidth:"1",children:[n.jsx(T,{text:f[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),n.jsx(T,{text:f[1].split("\n"),dx:r==="right"?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]}),[t,e,o,...f,r,l,c,h,u])},It={...$,nameOffsetX:"right",nameOffsetY:"top"},as=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:a}=X(),m=[{type:"textarea",label:a("panel.details.stations.common.nameZh"),value:e.names[0],onChange:i=>{e.names[0]=i,o(t,e)},minW:"full"},{type:"textarea",label:a("panel.details.stations.common.nameEn"),value:e.names[1],onChange:i=>{e.names[1]=i,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:a("panel.details.stations.common.left"),middle:a("panel.details.stations.common.middle"),right:a("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetX=i,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:a("panel.details.stations.common.top"),middle:a("panel.details.stations.common.middle"),bottom:a("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetY=i,o(t,e)},minW:"full"}];return n.jsx(H,{fields:m})},ss=n.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[n.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2.67",fill:"white"}),n.jsx("circle",{cx:"12",cy:"12",r:"4.6",stroke:"currentColor",strokeWidth:"2.67",fill:"white"})]}),os={component:ns,icon:ss,defaultAttrs:It,attrsComponent:as,metadata:{displayName:"panel.details.stations.shmetroOsysi.displayName",cities:[B.Shanghai],canvas:[Z.RailMap],categories:[q.Metro],tags:[]}},is=s=>{var p;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,rotate:r=Jt.rotate}=(p=a[k.ShanghaiSuburbanRailway])!=null?p:Jt,l=xe[r].textDy+(f[xe[r].namesPos].split("\n").length-1)*xe[r].lineHeight*xe[r].polarity,c=x.useCallback(g=>m(t,g),[t,m]),h=x.useCallback(g=>i(t,g),[t,i]),u=x.useCallback(g=>d(t,g),[t,d]);return x.useMemo(()=>n.jsxs("g",{id:t,children:[n.jsxs("g",{transform:"translate(".concat(e,", ").concat(o,")rotate(").concat(r,")"),children:[n.jsx("rect",{x:"-2",y:"-7.83",width:"4",height:"7.83",stroke:"none",fill:"#898989"}),n.jsx("rect",{x:"-3.5",y:"-1",width:"7",height:"2",stroke:"none",fill:"white"}),n.jsx("rect",{x:-2+1.1675,y:-7.83+1.5,width:4*2/5,height:7.83-1.5,stroke:"none",fill:"white"}),n.jsx("rect",{id:"stn_core_".concat(t),x:"-2",y:"-7.83",width:"4",height:7.83+1.25,stroke:"none",fill:"white",fillOpacity:"0",onPointerDown:c,onPointerMove:h,onPointerUp:u,style:{cursor:"move"}})]}),n.jsxs("g",{transform:"translate(".concat(e+xe[r].textDx,", ").concat(o+l,")"),textAnchor:xe[r].textAnchor,className:"rmp-name-outline",strokeWidth:"2.5",children:[n.jsx(T,{text:f[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),n.jsx(T,{text:f[1].split("\n"),dx:r>=45&&r<=135?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]}),[t,e,o,...f,r,c,h,u])},Jt={...$,rotate:0},ls=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:a}=X(),m=[{type:"textarea",label:a("panel.details.stations.common.nameZh"),value:e.names[0],onChange:i=>{e.names[0]=i,o(t,e)},minW:"full"},{type:"textarea",label:a("panel.details.stations.common.nameEn"),value:e.names[1],onChange:i=>{e.names[1]=i,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.rotate"),value:e.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:i=>{e.rotate=Number(i),o(t,e)},minW:"full"}];return n.jsx(H,{fields:m})},rs=n.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:n.jsx("rect",{x:"6",y:"9",width:"12",height:"6",stroke:"currentColor",fill:"currentColor"})}),cs={component:is,icon:rs,defaultAttrs:Jt,attrsComponent:ls,metadata:{displayName:"panel.details.stations.shanghaiSuburbanRailway.displayName",cities:[B.Shanghai],canvas:[Z.RailMap],categories:[q.Metro],tags:[]}};var Ke=1.3,Lt=18.5,ms=Lt+Ke,ds=Lt*2+Ke;var Et=45,Ne=Et-3,aa=function(s,t){var e=[s,t].map(function(o){return o.match(/^(\w+).+$/)});if(e[0]&&e[1]&&e[0][1]===e[1][1])return e[0][1]},un=function(s){var t=s.match(/^(\d+)\D+$/);return t==null?void 0:t[1]},Kt=function(){return Kt=Object.assign||function(s){for(var t,e=1,o=arguments.length;e0)&&!(a=o.next()).done;)m.push(a.value)}catch(d){i={error:d}}finally{try{a&&!a.done&&(e=o.return)&&e.call(o)}finally{if(i)throw i.error}}return m},us=function(s,t){var e=un(s);if(e)return{isDigit:!0,spanningPart:e};var o=aa(s,t);return o?{isDigit:!1,spanningPart:o}:{isDigit:!1,spanningPart:""}};function Sn(s){var t=s.zhName,e=s.enName,o=s.foregroundColour,a=s.backgroundColour,m=s.zhClassName,i=s.enClassName,d=s.passed,f=us(t,e),r=f.isDigit,l=f.spanningPart,c=F.useRef(null),h=hs(F.useState({x:0,height:0,width:0}),2),u=h[0],p=h[1];F.useEffect(function(){c.current&&p(c.current.getBBox())},[t,e]);var g=Ne/Math.max(Ne,u.width),C=(-u.x-u.width/2)*g,y=u.height*(1-g)/2;return n.jsxs("g",{textAnchor:"middle",fill:d?R.white:o,children:[n.jsx(Ht,{fill:d?"#aaa":a}),n.jsx("g",{ref:c,transform:"translate(".concat(C,",").concat(y,")scale(").concat(g,")"),children:n.jsxs("text",{className:m,fontSize:21,x:-1,y:12,textAnchor:"end",dominantBaseline:"central",children:[l,n.jsx("tspan",{className:m,fontSize:10,x:0,dy:-4,textAnchor:"start",dominantBaseline:"central",children:t.slice(l.length).trim()}),n.jsx("tspan",{className:i,fontSize:6.5,letterSpacing:-.1,x:0,dy:10,textAnchor:"start",dominantBaseline:"middle",children:r?e:e.slice(l.length).trim()})]})})]})}var kn=function(s,t){var e=typeof Symbol=="function"&&s[Symbol.iterator];if(!e)return s;var o=e.call(s),a,m=[],i;try{for(;(t===void 0||t-- >0)&&!(a=o.next()).done;)m.push(a.value)}catch(d){i={error:d}}finally{try{a&&!a.done&&(e=o.return)&&e.call(o)}finally{if(i)throw i.error}}return m};function ps(s){var t,e=s.zhName,o=s.enName,a=s.foregroundColour,m=s.backgroundColour,i=s.zhClassName,d=s.enClassName,f=s.passed,r=(t=un(e))!==null&&t!==void 0?t:"",l=F.useRef(null),c=F.useRef(null),h=kn(F.useState({width:0}),2),u=h[0],p=h[1],g=kn(F.useState({width:0}),2),C=g[0],y=g[1];F.useEffect(function(){l.current&&p(l.current.getBBox()),c.current&&y(c.current.getBBox())},[e,o]);var b=Ne/Math.max(Ne,u.width),O=Ne/Math.max(Ne,C.width),w={nameZh:{y:7.3+13.5*(1-b)*b/2},nameEn:{y:19.5-9*(1-O)*O/2}};return n.jsxs("g",{textAnchor:"middle",fill:f?R.white:a,children:[n.jsx(Ht,{fill:f?"#aaa":m}),n.jsxs("text",{ref:l,className:i,fontSize:12,transform:"translate(0,".concat(w.nameZh.y,")scale(").concat(b,")"),dominantBaseline:"central",children:[n.jsx("tspan",{fontSize:16,dy:.7,dominantBaseline:"central",children:r}),n.jsx("tspan",{dy:-.7,dominantBaseline:"central",children:e.slice(r.length)})]}),n.jsx("text",{ref:c,className:d,fontSize:8,transform:"translate(0,".concat(w.nameEn.y,")scale(").concat(O,")"),dominantBaseline:"middle",children:o})]})}var gs=function(s,t){var e=typeof Symbol=="function"&&s[Symbol.iterator];if(!e)return s;var o=e.call(s),a,m=[],i;try{for(;(t===void 0||t-- >0)&&!(a=o.next()).done;)m.push(a.value)}catch(d){i={error:d}}finally{try{a&&!a.done&&(e=o.return)&&e.call(o)}finally{if(i)throw i.error}}return m};function xs(s){var t=s.zhName,e=s.enName,o=s.foregroundColour,a=s.backgroundColour,m=s.zhClassName,i=s.enClassName,d=s.passed,f=F.useRef(null),r=gs(F.useState({width:0}),2),l=r[0],c=r[1];F.useEffect(function(){f.current&&c(f.current.getBBox())},[t,e]);var h=Math.max(45,l.width+4);return n.jsxs("g",{textAnchor:"middle",fill:d?R.white:o,children:[n.jsx(Ht,{customWidth:h,fill:d?"#aaa":a}),n.jsxs("g",{ref:f,children:[n.jsx("text",{className:m,fontSize:8.5,y:8,dominantBaseline:"central",children:t}),n.jsx("text",{className:i,fontSize:5.5,y:18,dominantBaseline:"middle",children:e})]})]})}var Nn=function(s,t){var e=typeof Symbol=="function"&&s[Symbol.iterator];if(!e)return s;var o=e.call(s),a,m=[],i;try{for(;(t===void 0||t-- >0)&&!(a=o.next()).done;)m.push(a.value)}catch(d){i={error:d}}finally{try{a&&!a.done&&(e=o.return)&&e.call(o)}finally{if(i)throw i.error}}return m};function Cs(s){var t=s.zhName,e=s.enName,o=s.foregroundColour,a=s.backgroundColour,m=s.zhClassName,i=s.enClassName,d=s.passed,f=F.useRef(null),r=F.useRef(null),l=Nn(F.useState({width:0}),2),c=l[0],h=l[1],u=Nn(F.useState({width:0}),2),p=u[0],g=u[1];F.useEffect(function(){f.current&&h(f.current.getBBox()),r.current&&g(r.current.getBBox())},[t,e]);var C=Ne/Math.max(Ne,c.width),y=Ne/Math.max(Ne,p.width),b={nameZh:{y:7.3+13.5*(1-C)*C/2},nameEn:{y:19.5-9*(1-y)*y/2}};return n.jsxs("g",{textAnchor:"middle",fill:d?R.white:o,children:[n.jsx(Ht,{fill:d?"#aaa":a}),n.jsx("text",{ref:f,className:m,fontSize:12,transform:"translate(0,".concat(b.nameZh.y,")scale(").concat(C,")"),dominantBaseline:"central",children:t}),n.jsx("text",{ref:r,className:i,fontSize:8,transform:"translate(0,".concat(b.nameEn.y,")scale(").concat(y,")"),dominantBaseline:"middle",children:e})]})}var Ye=function(){return Ye=Object.assign||function(s){for(var t,e=1,o=arguments.length;e=5?n.jsx(xs,Ye({},t)):n.jsx(Cs,Ye({},t))}});var ys=function(s,t){var e=un(s);if(e!==void 0)return 1;var o=aa(s,t);return o!==void 0?2:3},en=function(){return en=Object.assign||function(s){for(var t,e=1,o=arguments.length;e0)&&!(a=o.next()).done;)m.push(a.value)}catch(d){i={error:d}}finally{try{a&&!a.done&&(e=o.return)&&e.call(o)}finally{if(i)throw i.error}}return m},At=15;function ia(s){var t=s.Icon,e=s.lineNum,o=s.stnNum,a=s.strokeColour,m=s.passed,i=s.size,d=s.textClassName,f=Os(s,["Icon","lineNum","stnNum","strokeColour","passed","size","textClassName"]),r=F.useRef(null),l=F.useRef(null),c=zn(F.useState({width:0}),2),h=c[0],u=c[1],p=zn(F.useState({width:0}),2),g=p[0],C=p[1];F.useEffect(function(){r.current&&u(r.current.getBBox()),l.current&&C(l.current.getBBox())},[e,o]);var y=At/Math.max(At,h.width),b=(e==null?void 0:e.length)===2&&(o==null?void 0:o.length)===2?y:At/Math.max(At,g.width),O=i==="sm"?"0.7":i==="lg"?"1.4":1;return n.jsx("g",nn({},f,{children:n.jsxs("g",{transform:"scale(".concat(O,")"),children:[n.jsx(t,{stroke:m?"#aaa":a,filled:!e&&!o}),(e||o)&&n.jsxs("g",{textAnchor:"middle",fontSize:13.5,fill:m?"#aaa":"#000",children:[n.jsx("g",{transform:"translate(-9.25,0)scale(".concat(y,")"),children:n.jsx("text",{ref:r,className:d,dominantBaseline:"central",x:.5,children:e})}),n.jsx("g",{transform:"translate(9.25,0)scale(".concat(b,")"),children:n.jsx("text",{ref:l,className:d,dominantBaseline:"central",children:o})})]})]})}))}var an=function(){return an=Object.assign||function(s){for(var t,e=1,o=arguments.length;e0)&&!(a=o.next()).done;)m.push(a.value)}catch(d){i={error:d}}finally{try{a&&!a.done&&(e=o.return)&&e.call(o)}finally{if(i)throw i.error}}return m},vs=function(s,t,e){if(e||arguments.length===2)for(var o=0,a=t.length,m;o=i.length)return console.warn(", anchor index ".concat(a," is out of bound")),[0,0];var l=on(i[a],2),c=l[0],h=l[1];return[-c,-h]},[i,a]),2),f=d[0],r=d[1];return n.jsxs("g",Pt({transform:"translate(".concat(f,",").concat(r,")")},m,{children:[t.map(function(l,c){var h=l.style,u=Tn(h);return n.jsx(u,{stroke:"#aaa",filled:!0,strokeWidth:Ke*7,transform:"translate(".concat(i[c][0],",").concat(i[c][1],")")},c)}),t.map(function(l,c){var h=l.style,u=Tn(h);return n.jsx(u,{stroke:"white",filled:!0,strokeWidth:Ke*2.6,transform:"translate(".concat(i[c][0],",").concat(i[c][1],")")},c)}),t.length&&n.jsx("rect",{fill:"white",x:-12,y:i[0][1],width:24,height:-i[0][1]*2}),t.map(function(l,c){var h=l.style,u=Bn(l,["style"]),p=h==="fmetro"?Ft:et;return n.jsx(p,Pt({transform:"translate(".concat(i[c][0],",").concat(i[c][1],")"),textClassName:e},u),c)})]}))}const _s=s=>{var ae,P,L;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,nameOffsetX:r=ye.nameOffsetX,nameOffsetY:l=ye.nameOffsetY,color:c=ye.color,lineCode:h=ye.lineCode,stationCode:u=ye.stationCode,open:p=ye.open,secondaryNames:g=ye.secondaryNames,tram:C=ye.tram}=(ae=a[k.GzmtrBasic])!=null?ae:ye,y=x.useCallback(z=>m(t,z),[t,m]),b=x.useCallback(z=>i(t,z),[t,i]),O=x.useCallback(z=>d(t,z),[t,d]),w=x.useRef(null);(L=(P=w.current)==null?void 0:P.querySelector("path"))==null||L.setAttribute("id","stn_core_".concat(t));const v={en:C?5.08:6.56,zh:C?7.29:13.13},N={top:{namesPos:1,lineHeight:v.en,polarity:-1},middle:{namesPos:0,lineHeight:0,polarity:0},bottom:{namesPos:0,lineHeight:v.zh,polarity:1}},S=C?11:15,j=r==="left"?-S:r==="right"?S:0,A=C?8:10,M=(f[N[l].namesPos].split("\n").length*N[l].lineHeight+A)*N[l].polarity,_=r==="left"?"end":r==="right"?"start":!p&&r==="middle"&&g.join("")===""?"end":"middle",E=x.useRef(null),[I,V]=x.useState(0);x.useEffect(()=>{var z,D;return V((D=(z=E.current)==null?void 0:z.getBBox().width)!=null?D:0)},[...g,C]);const G=x.useRef(null),[Q,Y]=x.useState(0);x.useEffect(()=>{var z,D;return Y((D=(z=G.current)==null?void 0:z.getBBox().width)!=null?D:0)},[...f,C]);const ce=r==="middle"?Q/2+(I+12*2)/2:(Q+(I+12*2)/2)*(r==="left"?-1:1),ne=r==="middle"&&g.join("")!==""?Q/2+(I+12*2):(Q+I+(I!==0?12*2:0))*(r==="left"?-1:r==="right"?1:0);return n.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[n.jsx("g",{transform:"scale(".concat(.57915*(C?.729:1),")"),onPointerDown:y,onPointerMove:b,onPointerUp:O,style:{cursor:"move"},ref:w,children:n.jsx(et,{id:"stn_core_".concat(t),strokeColour:c[2],lineNum:h===""?void 0:h,stnNum:u===""?void 0:u,textClassName:"rmp-name__zh"})}),n.jsxs("g",{ref:G,transform:"translate(".concat(j,", ").concat(M,")"),textAnchor:_,children:[n.jsx(T,{text:f[0].split("\n"),fontSize:v.zh,lineHeight:v.zh,grow:"up",className:"rmp-name__zh"}),n.jsx(T,{text:f[1].split("\n"),fontSize:v.en,lineHeight:v.en,grow:"down",className:"rmp-name__en"})]}),g.join("")!==""&&n.jsxs("g",{transform:"translate(".concat(j+ce,", ").concat(M,")"),textAnchor:"middle",children:[n.jsx("text",{fontSize:"13.13",dx:-(I+5)/2,textAnchor:"end",dominantBaseline:"middle",className:"rmp-name__zh",children:"("}),n.jsx("text",{fontSize:"13.13",dx:(I+5)/2,textAnchor:"start",dominantBaseline:"middle",className:"rmp-name__zh",children:")"}),n.jsxs("g",{ref:E,children:[n.jsx("text",{fontSize:"10",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:g[0]}),n.jsx("text",{fontSize:"5.42",dy:"2",dominantBaseline:"hanging",className:"rmp-name__en",children:g[1]})]})]}),!p&&n.jsxs("g",{transform:"translate(".concat(j+ne,", ").concat(M,")"),textAnchor:r==="middle"?"start":_,children:[n.jsx("text",{fontSize:"6.04",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:"(未开通)"}),n.jsx("text",{fontSize:"3.6",dy:"4",dominantBaseline:"hanging",className:"rmp-name__en",children:"(Under Construction)"})]})]})},ye={...$,nameOffsetX:"right",nameOffsetY:"top",color:[B.Guangzhou,"gz1","#F3D03E",R.black],lineCode:"1",stationCode:"01",open:!0,secondaryNames:["",""],tram:!1},Ss=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:a}=X(),m=[{type:"textarea",label:a("panel.details.stations.common.nameZh"),value:e.names[0],onChange:i=>{e.names[0]=i,o(t,e)},minW:"full"},{type:"textarea",label:a("panel.details.stations.common.nameEn"),value:e.names[1],onChange:i=>{e.names[1]=i,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:a("panel.details.stations.common.left"),middle:a("panel.details.stations.common.middle"),right:a("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetX=i,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:a("panel.details.stations.common.top"),middle:a("panel.details.stations.common.middle"),bottom:a("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetY=i,o(t,e)},minW:"full"},{type:"custom",label:a("color"),component:n.jsx(Ee,{type:k.GzmtrBasic,defaultTheme:ye.color})},{type:"input",label:a("panel.details.stations.common.lineCode"),value:e.lineCode,onChange:i=>{e.lineCode=i,o(t,e)},minW:"full"},{type:"input",label:a("panel.details.stations.common.stationCode"),value:e.stationCode,onChange:i=>{e.stationCode=i,o(t,e)},minW:"full"},{type:"switch",label:a("panel.details.stations.gzmtrBasic.open"),oneLine:!0,isChecked:e.open,onChange:i=>{e.open=i,o(t,e)},minW:"full"},{type:"input",label:a("panel.details.stations.gzmtrBasic.secondaryNameZh"),value:e.secondaryNames[0],onChange:i=>{e.secondaryNames[0]=i,o(t,e)},minW:"full"},{type:"input",label:a("panel.details.stations.gzmtrBasic.secondaryNameEn"),value:e.secondaryNames[1],onChange:i=>{e.secondaryNames[1]=i,o(t,e)},minW:"full"},{type:"switch",label:a("panel.details.stations.gzmtrBasic.tram"),oneLine:!0,isChecked:e.tram,onChange:i=>{e.tram=i,o(t,e)},minW:"full"}];return n.jsx(H,{fields:m})},ks=n.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:n.jsx("g",{transform:"translate(12,12)scale(0.45)",children:n.jsx(et,{strokeColour:"#000",lineNum:"1",stnNum:"01"})})}),Ns={component:_s,icon:ks,defaultAttrs:ye,attrsComponent:Ss,metadata:{displayName:"panel.details.stations.gzmtrBasic.displayName",cities:[B.Guangzhou],canvas:[Z.RailMap],categories:[q.Metro],tags:[]}},xt=[B.Guangzhou,"","#AAAAAA",R.white,"","","gz"];function ra(s){const{interchangeList:t,onAdd:e,onDelete:o,onUpdate:a}=s,m=tt(),{paletteAppClip:{output:i}}=nt(h=>h.runtime),{t:d}=X(),[f,r]=x.useState();x.useEffect(()=>{f!==void 0&&i&&(a==null||a(f,[...i,t[f][4],t[f][5],t[f][6]]),r(void 0))},[i==null?void 0:i.toString()]);const l=t.map((h,u)=>[{type:"input",label:d("panel.details.stations.common.lineCode"),value:h[4],minW:"80px",onChange:p=>a==null?void 0:a(u,[h[0],h[1],h[2],h[3],p,h[5],h[6]])},{type:"input",label:d("panel.details.stations.common.stationCode"),value:h[5],minW:"80px",onChange:p=>a==null?void 0:a(u,[h[0],h[1],h[2],h[3],h[4],p,h[6]])}]),c=(h,u,p)=>a==null?void 0:a(u,[h[0],h[1],h[2],h[3],h[4],h[5],p?"fs":"gz"]);return n.jsxs(cn,{direction:"column",children:[t.length===0&&n.jsxs(Fe,{spacing:.5,"data-testid":"interchange-card-stack",children:[n.jsx(fn,{as:"i",flex:1,align:"center",fontSize:"md",colorScheme:"gray",children:d("panel.details.stations.interchange.noInterchanges")}),n.jsx(ve,{size:"sm",variant:"ghost","aria-label":d("panel.details.stations.interchange.add"),onClick:()=>e==null?void 0:e(xt),icon:n.jsx(Pe,{})})]}),t.map((h,u)=>n.jsxs(Fe,{spacing:.5,"data-testid":"interchange-card-stack-".concat(u),children:[n.jsx(ge,{label:d("color"),minW:"40px",noLabel:u!==0,children:n.jsx(Dt,{theme:[h[0],h[1],h[2],h[3]],onClick:()=>{r(u),m(Xt([h[0],h[1],h[2],h[3]]))}})}),n.jsx(H,{fields:l[u],noLabel:u!==0}),n.jsxs(Ue,{children:[e&&u===l.length-1?n.jsx(ve,{size:"sm",variant:"ghost","aria-label":d("panel.details.stations.interchange.copy"),onClick:()=>e==null?void 0:e(t.slice(-1)[0]),icon:n.jsx(mn,{})}):n.jsx(hn,{minW:8}),o&&n.jsx(ve,{size:"sm",variant:"ghost","aria-label":d("panel.details.stations.interchange.remove"),onClick:()=>o==null?void 0:o(u),icon:n.jsx(Ct,{})}),n.jsx(H,{fields:[{type:"switch",label:d("panel.details.stations.gzmtrInt.foshan"),isChecked:h[6]==="fs",onChange:p=>c(h,u,p)}]})]})]},u))]})}const In=[[[0,0]],[[0,0]],[[-18,0],[18,0]],[[-19.395,-11.198],[19.395,-11.198],[0,22.395]],[[-15.836,-15.836],[15.836,-15.836],[15.836,15.836],[-15.836,15.836]]],Ms=s=>{var ae,P,L,z,D,he,ue,Ve,we,Me,bt,jt,Ot,at,st,Ge,vt,wt,_t,St,ot,le,kt,gn;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,nameOffsetX:r=Be.nameOffsetX,nameOffsetY:l=Be.nameOffsetY,transfer:c=Be.transfer,open:h=Be.open,secondaryNames:u=Be.secondaryNames,tram:p=Be.tram}=(ae=a[k.GzmtrInt])!=null?ae:Be,g=x.useCallback(U=>m(t,U),[t,m]),C=x.useCallback(U=>i(t,U),[t,i]),y=x.useCallback(U=>d(t,U),[t,d]),b=_a("white","var(--chakra-colors-gray-800)"),O={en:p?5.08:6.56,zh:p?7.29:13.13},w={top:{namesPos:1,lineHeight:O.en,polarity:-1},middle:{namesPos:0,lineHeight:0,polarity:0},bottom:{namesPos:0,lineHeight:O.zh,polarity:1}},v=p?13:20,N=(r==="left"?-v:r==="right"?v:0)*(l==="middle"?1.2:1),S=p?8:11,j=(f[w[l].namesPos].split("\n").length*w[l].lineHeight+S*(r==="middle"?1.8:1))*w[l].polarity,A=r==="left"?"end":r==="right"?"start":!h&&r==="middle"&&u.join("")===""?"end":"middle",M=c.flat().slice(0,4),_=[["black","black"],[(L=(P=M.at(0))==null?void 0:P.at(2))!=null?L:"black",(D=(z=M.at(0))==null?void 0:z.at(2))!=null?D:"black"],[(ue=(he=M.at(0))==null?void 0:he.at(2))!=null?ue:"black",(we=(Ve=M.at(1))==null?void 0:Ve.at(2))!=null?we:"black"],[(bt=(Me=M.at(0))==null?void 0:Me.at(2))!=null?bt:"black",(Ot=(jt=M.at(1))==null?void 0:jt.at(2))!=null?Ot:"black",(st=(at=M.at(2))==null?void 0:at.at(2))!=null?st:"black"],[(vt=(Ge=M.at(0))==null?void 0:Ge.at(2))!=null?vt:"black",(_t=(wt=M.at(1))==null?void 0:wt.at(2))!=null?_t:"black",(ot=(St=M.at(2))==null?void 0:St.at(2))!=null?ot:"black",(kt=(le=M.at(3))==null?void 0:le.at(2))!=null?kt:"black"]],E=x.useRef(null),[I,V]=x.useState(0);x.useEffect(()=>{var U,Ce;return V((Ce=(U=E.current)==null?void 0:U.getBBox().width)!=null?Ce:0)},[...u]);const G=x.useRef(null),[Q,Y]=x.useState(0);x.useEffect(()=>{var U,Ce;return Y((Ce=(U=G.current)==null?void 0:U.getBBox().width)!=null?Ce:0)},[...f]);const ce=(Q+(I+12*2)/2)*(r==="left"?-1:1),ne=(Q+I+(I!==0?12*2:0))*(r==="left"?-1:1);return n.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[M.map(U=>U[2]).filter((U,Ce,Nt)=>Nt.indexOf(U)===Ce).map(U=>n.jsx("marker",{id:"gzmtr_int_arrow_".concat(U),markerWidth:"5",markerHeight:"5",refX:"1",refY:"1.25",orient:"auto",children:n.jsx("polygon",{points:"0.25,0 0.25,2.5 2.25,1.25",fill:U})},"gzmtr_int_arrow_".concat(U))),n.jsxs("g",{transform:"scale(".concat(.57915*(p?.729:1),")"),children:[M.length<=2&&n.jsxs(n.Fragment,{children:[n.jsx("path",{d:"M -18,-12 A 24 24 0 0 1 18,-12 L 18,12 A 24 24 0 0 1 -18,12 Z",fill:b}),n.jsx("path",{d:"M -18,-12 A 24 24 0 0 1 18,-12",fill:"none",stroke:_[M.length][0],strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(_[M.length][0],")")}),n.jsx("path",{d:"M 18,12 A 24 24 0 0 1 -18,12",fill:"none",stroke:_[M.length][1],strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(_[M.length][1],")")})]}),M.length===3&&n.jsxs(n.Fragment,{children:[n.jsx("circle",{r:"22.395",fill:b}),n.jsx("path",{d:"M -19.3948,11.1976 A 22.395 22.395 0 0 1 0,-22.395",fill:"none",stroke:_[M.length][0],strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(_[M.length][0],")")}),n.jsx("path",{d:"M 0,-22.395 A 22.395 22.395 0 0 1 19.3948,11.1976",fill:"none",stroke:_[M.length][1],strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(_[M.length][1],")")}),n.jsx("path",{d:"M 19.3948,11.1976 A 22.395 22.395 0 0 1 -19.3948,11.1976",fill:"none",stroke:_[M.length][2],strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(_[M.length][2],")")}),n.jsx("path",{d:"M -19.3948,11.1976 A 22.395 22.395 0 0 1 0,-22.395",fill:"none",strokeOpacity:"0",stroke:"white",strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(_[M.length][0],")")}),n.jsx("path",{d:"M 0,-22.395 A 22.395 22.395 0 0 1 19.3948,11.1976",fill:"none",strokeOpacity:"0",stroke:"white",strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(_[M.length][1],")")})]}),M.length>=4&&n.jsxs(n.Fragment,{children:[n.jsx("circle",{r:"22.395",fill:b}),n.jsx("path",{d:"M -22.395,0 A 22.395 22.395 0 0 1 0,-22.395",fill:"none",stroke:_[M.length][0],strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(_[M.length][0],")")}),n.jsx("path",{d:"M 0,-22.395 A 22.395 22.395 0 0 1 22.395,0",fill:"none",stroke:_[M.length][1],strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(_[M.length][1],")")}),n.jsx("path",{d:"M 22.395,0 A 22.395 22.395 0 0 1 0,22.395",fill:"none",stroke:_[M.length][2],strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(_[M.length][2],")")}),n.jsx("path",{d:"M 0,22.395 A 22.395 22.395 0 0 1 -22.395,0",fill:"none",stroke:_[M.length][3],strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(_[M.length][3],")")}),n.jsx("path",{d:"M -22.395,0 A 22.395 22.395 0 0 1 0,-22.395",fill:"none",strokeOpacity:"0",stroke:"white",strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(_[M.length][0],")")}),n.jsx("path",{d:"M 0,-22.395 A 22.395 22.395 0 0 1 22.395,0",fill:"none",strokeOpacity:"0",stroke:"white",strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(_[M.length][1],")")}),n.jsx("path",{d:"M 22.395,0 A 22.395 22.395 0 0 1 0,22.395",fill:"none",strokeOpacity:"0",stroke:"white",strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(_[M.length][2],")")})]}),(gn=c[0])==null?void 0:gn.map((U,Ce,Nt)=>n.jsx("g",{transform:"translate(".concat(In[Nt.length][Ce][0],",").concat(In[Nt.length][Ce][1],")scale(0.6)"),children:U[6]==="gz"?n.jsx(et,{strokeColour:U[2],lineNum:U[4],stnNum:U[5],textClassName:"rmp-name__zh"}):n.jsx(Ft,{strokeColour:U[2],lineNum:U[4],stnNum:U[5],textClassName:"rmp-name__zh"})},"gzmtr_int_".concat(t,"_stn_").concat(Ce))),n.jsx("circle",{id:"stn_core_".concat(t),r:M.length===3?22.395:18,fill:"white",fillOpacity:"0",onPointerDown:g,onPointerMove:C,onPointerUp:y,style:{cursor:"move"}})]}),n.jsxs("g",{ref:G,transform:"translate(".concat(N,", ").concat(j,")"),textAnchor:A,children:[n.jsx(T,{text:f[0].split("\n"),fontSize:O.zh,lineHeight:O.zh,grow:"up",className:"rmp-name__zh"}),n.jsx(T,{text:f[1].split("\n"),fontSize:O.en,lineHeight:O.en,grow:"down",className:"rmp-name__en"})]}),u.join("")!==""&&n.jsxs("g",{transform:"translate(".concat(N+ce,", ").concat(j,")"),textAnchor:"middle",children:[n.jsx("text",{fontSize:"13.13",dx:-(I+5)/2,textAnchor:"end",dominantBaseline:"middle",className:"rmp-name__zh",children:"("}),n.jsx("text",{fontSize:"13.13",dx:(I+5)/2,textAnchor:"start",dominantBaseline:"middle",className:"rmp-name__zh",children:")"}),n.jsxs("g",{ref:E,children:[n.jsx("text",{fontSize:"10",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:u[0]}),n.jsx("text",{fontSize:"5.42",dy:"2",dominantBaseline:"hanging",className:"rmp-name__en",children:u[1]})]})]}),!h&&n.jsxs("g",{transform:"translate(".concat(N+ne,", ").concat(j,")"),textAnchor:A,children:[n.jsx("text",{fontSize:"6.04",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:"(未开通)"}),n.jsx("text",{fontSize:"3.6",dy:"4",dominantBaseline:"hanging",className:"rmp-name__en",children:"(Under Construction)"})]})]})},Be={...$,nameOffsetX:"right",nameOffsetY:"top",transfer:[[],[]],open:!0,secondaryNames:["",""],tram:!1},As=s=>{var h;const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:a}=X(),m=[{type:"textarea",label:a("panel.details.stations.common.nameZh"),value:e.names[0],onChange:u=>{e.names[0]=u,o(t,e)},minW:"full"},{type:"textarea",label:a("panel.details.stations.common.nameEn"),value:e.names[1],onChange:u=>{e.names[1]=u,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:a("panel.details.stations.common.left"),middle:a("panel.details.stations.common.middle"),right:a("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:u=>{e.nameOffsetX=u,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:a("panel.details.stations.common.top"),middle:a("panel.details.stations.common.middle"),bottom:a("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:u=>{e.nameOffsetY=u,o(t,e)},minW:"full"},{type:"switch",label:a("panel.details.stations.gzmtrInt.open"),oneLine:!0,isChecked:e.open,onChange:u=>{e.open=u,o(t,e)},minW:"full"},{type:"input",label:a("panel.details.stations.gzmtrInt.secondaryNameZh"),value:e.secondaryNames[0],onChange:u=>{e.secondaryNames[0]=u,o(t,e)},minW:"full"},{type:"input",label:a("panel.details.stations.gzmtrInt.secondaryNameEn"),value:e.secondaryNames[1],onChange:u=>{e.secondaryNames[1]=u.toString(),o(t,e)},minW:"full"},{type:"switch",label:a("panel.details.stations.gzmtrBasic.tram"),oneLine:!0,isChecked:e.tram,onChange:u=>{e.tram=u,o(t,e)},minW:"full"}],i=[4,4,0],d=(h=e.transfer)!=null?h:Be.transfer,f=u=>p=>{const g=structuredClone(d);if(g.length<=u)for(let C=g.length;C<=u;C++)g[C]=[xt];g[u].push(p),e.transfer=g,o(t,e)},r=u=>p=>{if(d.length>u&&d[u].length>p){const g=d.map((C,y)=>y===u?C.filter((b,O)=>O!==p):C);e.transfer=g,o(t,e)}},l=u=>(p,g)=>{if(d.length>u&&d[u].length>p){const C=d.map((y,b)=>b===u?y.map((O,w)=>w===p?[0,1,2,3,4,5,6].map(v=>g[v]===void 0?O[v]:g[v]):O):y);e.transfer=C,o(t,e)}},c=()=>f(d.length)(xt);return n.jsxs(n.Fragment,{children:[n.jsx(H,{fields:m}),n.jsx(ge,{label:a("panel.details.stations.interchange.title"),children:n.jsxs(Ue,{align:"flex-start",children:[d.map((u,p)=>n.jsxs(x.Fragment,{children:[n.jsx(Yt,{size:"xs",children:a(p===0?"panel.details.stations.interchange.within":p===1?"panel.details.stations.interchange.outStation":"panel.details.stations.interchange.outSystem")}),n.jsx(ra,{interchangeList:u,onAdd:i[p]>u.length?f(p):void 0,onDelete:r(p),onUpdate:l(p)})]},p)),i[d.length]>0&&n.jsx(pe,{size:"xs",variant:"ghost",alignSelf:"flex-end",leftIcon:n.jsx(Pe,{}),onClick:c,children:a("panel.details.stations.interchange.addGroup")})]})})]})},zs=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("g",{transform:"translate(6,12)scale(0.3)",children:n.jsx(et,{strokeColour:"currentColor",lineNum:"1",stnNum:"09"})}),n.jsx("g",{transform:"translate(18,12)scale(0.3)",children:n.jsx(et,{strokeColour:"currentColor",lineNum:"2",stnNum:"13"})}),n.jsx("marker",{id:"arrow",markerWidth:"5",markerHeight:"5",refX:"1",refY:"1.25",orient:"auto",children:n.jsx("polygon",{points:"0,0 0,3 2,1.5"})}),n.jsx("path",{d:"M 6,6 A 8 8 0 0 1 18,6",fill:"none",stroke:"currentColor",strokeWidth:"2",markerEnd:"url(#arrow)"}),n.jsx("path",{d:"M 18,18 A 8 8 0 0 1 6,18",fill:"none",stroke:"currentColor",strokeWidth:"2",markerEnd:"url(#arrow)"})]}),Bs={component:Ms,icon:zs,defaultAttrs:Be,attrsComponent:As,metadata:{displayName:"panel.details.stations.gzmtrInt.displayName",cities:[B.Guangzhou],canvas:[Z.RailMap],categories:[q.Metro],tags:[]}},ca={en:6.56,zh:13.13},gt=structuredClone(ee);gt.top.lineHeight=ca.en;gt.bottom.lineHeight=ca.zh;const Ts=s=>{var ae,P,L;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,nameOffsetX:r=_e.nameOffsetX,nameOffsetY:l=_e.nameOffsetY,transfer:c=_e.transfer,open:h=_e.open,secondaryNames:u=_e.secondaryNames,preferVertical:p=_e.preferVertical,anchorAt:g=_e.anchorAt}=(ae=a[k.GzmtrInt2024])!=null?ae:_e,C=x.useCallback(z=>m(t,z),[t,m]),y=x.useCallback(z=>i(t,z),[t,i]),b=x.useCallback(z=>d(t,z),[t,d]),O=c.flat().slice(0,4),w=x.useRef(null);(L=(P=w.current)==null?void 0:P.querySelectorAll("path"))==null||L.forEach(z=>z.setAttribute("id","stn_core_".concat(t)));const[v,N]=x.useState({x1:0,x2:0,y1:0,y2:0});x.useEffect(()=>{const{height:z,width:D,x:he,y:ue}=w.current.getBBox(),[Ve,we]=[he+D,ue+z];N({x1:he,x2:Ve,y1:ue,y2:we})},[JSON.stringify(O),p,g,N,w]);const S=p&&O.length===2?0:8,j=O.map(z=>({style:z[6]==="gz"?"gzmtr":"fmetro",lineNum:z[4],stnNum:z[5],strokeColour:z[2]})),A=r==="left"?v.x1+S:r==="right"?v.x2-S:0,M=(f[gt[l].namesPos].split("\n").length*gt[l].lineHeight+(v.y2-v.y1)/2)*gt[l].polarity,_=r==="left"?"end":r==="right"?"start":!h&&r==="middle"&&u.join("")===""?"end":"middle",E=x.useRef(null),[I,V]=x.useState(0);x.useEffect(()=>{var z,D;return V((D=(z=E.current)==null?void 0:z.getBBox().width)!=null?D:0)},[...u]);const G=x.useRef(null),[Q,Y]=x.useState(0);x.useEffect(()=>{var z,D;return Y((D=(z=G.current)==null?void 0:z.getBBox().width)!=null?D:0)},[...f]);const ce=(Q+(I+12*2)/2)*(r==="left"?-1:1),ne=(Q+I+(I!==0?12*2:0))*(r==="left"?-1:1);return n.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[n.jsx("g",{transform:"scale(0.56)",onPointerDown:C,onPointerMove:y,onPointerUp:b,style:{cursor:"move"},ref:w,children:n.jsx(la,{stations:j,textClassName:"rmp-name__zh",preferVertical:p,anchorAt:g>=0?g:void 0})}),n.jsxs("g",{ref:G,transform:"translate(".concat(A,", ").concat(M,")"),textAnchor:_,children:[n.jsx(T,{text:f[0].split("\n"),fontSize:13.13,lineHeight:13.13,grow:"up",className:"rmp-name__zh"}),n.jsx(T,{text:f[1].split("\n"),fontSize:6.56,lineHeight:6.56,grow:"down",className:"rmp-name__en"})]}),u.join("")!==""&&n.jsxs("g",{transform:"translate(".concat(A+ce,", ").concat(M,")"),textAnchor:"middle",children:[n.jsx("text",{fontSize:"13.13",dx:-(I+5)/2,textAnchor:"end",dominantBaseline:"middle",className:"rmp-name__zh",children:"("}),n.jsx("text",{fontSize:"13.13",dx:(I+5)/2,textAnchor:"start",dominantBaseline:"middle",className:"rmp-name__zh",children:")"}),n.jsxs("g",{ref:E,children:[n.jsx("text",{fontSize:"10",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:u[0]}),n.jsx("text",{fontSize:"5.42",dy:"2",dominantBaseline:"hanging",className:"rmp-name__en",children:u[1]})]})]}),!h&&n.jsxs("g",{transform:"translate(".concat(A+ne,", ").concat(M,")"),textAnchor:_,children:[n.jsx("text",{fontSize:"6.04",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:"(未开通)"}),n.jsx("text",{fontSize:"3.6",dy:"4",dominantBaseline:"hanging",className:"rmp-name__en",children:"(Under Construction)"})]})]})},_e={...$,nameOffsetX:"right",nameOffsetY:"top",transfer:[[[B.Guangzhou,"gz1","#F3D03E",R.white,"1","14","gz"],[B.Guangzhou,"gz3","#ECA154",R.white,"3","11","gz"]]],open:!0,secondaryNames:["",""],preferVertical:!0,anchorAt:-1},Is=s=>{var h,u;const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:a}=X(),m=[{type:"textarea",label:a("panel.details.stations.common.nameZh"),value:e.names[0],onChange:p=>{e.names[0]=p,o(t,e)},minW:"full"},{type:"textarea",label:a("panel.details.stations.common.nameEn"),value:e.names[1],onChange:p=>{e.names[1]=p,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:a("panel.details.stations.common.left"),middle:a("panel.details.stations.common.middle"),right:a("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:p=>{e.nameOffsetX=p,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:a("panel.details.stations.common.top"),middle:a("panel.details.stations.common.middle"),bottom:a("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:p=>{e.nameOffsetY=p,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.gzmtrInt2024.anchorAt"),value:(h=e.anchorAt)!=null?h:"-1",options:{"-1":a("panel.details.stations.gzmtrInt2024.anchorAtNone"),...Object.fromEntries(Array.from({length:Math.min(e.transfer.flat().length,4)},(p,g)=>[g.toString(),g]))},onChange:p=>{e.anchorAt=Number(p),o(t,e)},minW:"full"},{type:"switch",label:a("panel.details.stations.gzmtrInt2024.preferVertical"),oneLine:!0,isChecked:e.preferVertical,onChange:p=>{e.preferVertical=p,o(t,e)},minW:"full"},{type:"switch",label:a("panel.details.stations.gzmtrInt.open"),oneLine:!0,isChecked:e.open,onChange:p=>{e.open=p,o(t,e)},minW:"full"},{type:"input",label:a("panel.details.stations.gzmtrInt.secondaryNameZh"),value:e.secondaryNames[0],onChange:p=>{e.secondaryNames[0]=p,o(t,e)},minW:"full"},{type:"input",label:a("panel.details.stations.gzmtrInt.secondaryNameEn"),value:e.secondaryNames[1],onChange:p=>{e.secondaryNames[1]=p.toString(),o(t,e)},minW:"full"}],i=[4,4,0],d=(u=e.transfer)!=null?u:_e.transfer,f=p=>g=>{const C=structuredClone(d);if(C.length<=p)for(let y=C.length;y<=p;y++)C[y]=[xt];C[p].push(g),e.transfer=C,o(t,e)},r=p=>g=>{if(d.length>p&&d[p].length>g){const C=d.map((y,b)=>b===p?y.filter((O,w)=>w!==g):y);e.transfer=C,e.anchorAt=-1,o(t,e)}},l=p=>(g,C)=>{if(d.length>p&&d[p].length>g){const y=d.map((b,O)=>O===p?b.map((w,v)=>v===g?[0,1,2,3,4,5,6].map(N=>C[N]===void 0?w[N]:C[N]):w):b);e.transfer=y,o(t,e)}},c=()=>f(d.length)(xt);return n.jsxs(n.Fragment,{children:[n.jsx(H,{fields:m}),n.jsx(ge,{label:a("panel.details.stations.interchange.title"),children:n.jsxs(Ue,{align:"flex-start",children:[d.map((p,g)=>n.jsxs(x.Fragment,{children:[n.jsx(Yt,{size:"xs",children:a(g===0?"panel.details.stations.interchange.within":g===1?"panel.details.stations.interchange.outStation":"panel.details.stations.interchange.outSystem")}),n.jsx(ra,{interchangeList:p,onAdd:i[g]>p.length?f(g):void 0,onDelete:r(g),onUpdate:l(g)})]},g)),i[d.length]>0&&n.jsx(pe,{size:"xs",variant:"ghost",alignSelf:"flex-end",leftIcon:n.jsx(Pe,{}),onClick:c,children:a("panel.details.stations.interchange.addGroup")})]})})]})},Es=n.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:n.jsx(la,{stations:[{strokeColour:"currentColor",lineNum:"3",stnNum:"03"},{strokeColour:"currentColor",lineNum:"7",stnNum:"05"}],textClassName:"rmp-name__zh",preferVertical:!0,transform:"translate(12,12)scale(0.3)"})}),$s={component:Ts,icon:Es,defaultAttrs:_e,attrsComponent:Is,metadata:{displayName:"panel.details.stations.gzmtrInt2024.displayName",cities:[B.Guangzhou],canvas:[Z.RailMap],categories:[q.Metro],tags:[]}},te={zh:9,en:6.2,top:6.2+1,middle:0,bottom:10},Ps=s=>{var O;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,nameOffsetX:r=me.nameOffsetX,nameOffsetY:l=me.nameOffsetY,open:c=me.open}=(O=a[k.BjsubwayBasic])!=null?O:me,h=x.useCallback(w=>m(t,w),[t,m]),u=x.useCallback(w=>i(t,w),[t,i]),p=x.useCallback(w=>d(t,w),[t,d]),g=(w,v)=>w==="left"&&v==="top"?[-4,-(f[1].split("\n").length+(c?0:1))*te[v]-1]:w==="middle"&&v==="top"?[0,-(f[1].split("\n").length+(c?0:1))*te[v]-4]:w==="right"&&v==="top"?[4,-(f[1].split("\n").length+(c?0:1))*te[v]-1]:w==="left"&&v==="bottom"?[-4,f[0].split("\n").length*te[v]+1]:w==="middle"&&v==="bottom"?[0,f[0].split("\n").length*te[v]+4]:w==="right"&&v==="bottom"?[4,f[0].split("\n").length*te[v]+1]:w==="left"&&v==="middle"?[-5,0]:w==="right"&&v==="middle"?[5,0]:[0,0],[C,y]=g(r,l),b=r==="left"?"end":r==="right"?"start":"middle";return n.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[n.jsx("circle",{id:"stn_core_".concat(t),r:"4",stroke:"black",strokeWidth:"0.5",strokeDasharray:c?void 0:"1.5",fill:"white",onPointerDown:h,onPointerMove:u,onPointerUp:p,style:{cursor:"move"}}),n.jsxs("g",{transform:"translate(".concat(C,", ").concat(y,")"),textAnchor:b,children:[n.jsx(T,{text:f[0].split("\n"),fontSize:te.zh,lineHeight:te.zh,grow:"up",className:"rmp-name__zh",baseOffset:1}),n.jsx(T,{text:f[1].split("\n"),fontSize:te.en,lineHeight:te.en,grow:"down",className:"rmp-name__en",baseOffset:1}),!c&&n.jsx("text",{dy:f[1].split("\n").length*te.en+2,fontSize:te.en,dominantBaseline:"hanging",className:"rmp-name__zh",children:"(暂缓开通)"})]})]})},me={...$,nameOffsetX:"right",nameOffsetY:"top",open:!0},Ws=[{type:"textarea",label:"panel.details.stations.common.nameZh",value:s=>(s!=null?s:me).names[0],onChange:(s,t)=>{const e=t!=null?t:me;return e.names[0]=s.toString(),e}},{type:"textarea",label:"panel.details.stations.common.nameEn",value:s=>(s!=null?s:me).names[1],onChange:(s,t)=>{const e=t!=null?t:me;return e.names[1]=s.toString(),e}},{type:"select",label:"panel.details.stations.common.nameOffsetX",value:s=>(s!=null?s:me).nameOffsetX,options:{left:"left",middle:"middle",right:"right"},disabledOptions:s=>(s==null?void 0:s.nameOffsetY)==="middle"?["middle"]:[],onChange:(s,t)=>{const e=t!=null?t:me;return e.nameOffsetX=s,e}},{type:"select",label:"panel.details.stations.common.nameOffsetY",value:s=>(s!=null?s:me).nameOffsetY,options:{top:"top",middle:"middle",bottom:"bottom"},disabledOptions:s=>(s==null?void 0:s.nameOffsetX)==="middle"?["middle"]:[],onChange:(s,t)=>{const e=t!=null?t:me;return e.nameOffsetY=s,e}},{type:"switch",label:"panel.details.stations.bjsubwayBasic.open",oneLine:!0,isChecked:s=>(s!=null?s:me).open,onChange:(s,t)=>{const e=t!=null?t:me;return e.open=s,e}}],Rs=()=>n.jsx(dn,{fields:Ws}),Ds=n.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:n.jsx("circle",{cx:"12",cy:"12",r:"4",stroke:"currentColor",strokeWidth:"0.5",fill:"none"})}),Xs={component:Ps,icon:Ds,defaultAttrs:me,attrsComponent:Rs,metadata:{displayName:"panel.details.stations.bjsubwayBasic.displayName",cities:[B.Beijing],canvas:[Z.RailMap],categories:[q.Metro],tags:[]}},ma="M 8.359893 4.159288 C 8.368828 4.168825 8.460953 4.26852 8.57038 4.386985 C 8.679807 4.505449 8.860802 4.701382 8.972592 4.822389 C 9.084381 4.943397 9.238666 5.110407 9.315445 5.193521 C 9.392224 5.276636 9.519867 5.414817 9.599094 5.500589 C 9.678323 5.58636 9.801023 5.719209 9.871761 5.795812 C 9.942499 5.872413 10.000208 5.935256 9.999999 5.935465 C 9.999792 5.935671 9.975513 5.928466 9.946045 5.919453 C 9.916577 5.910439 9.831826 5.88438 9.757708 5.861543 C 9.683591 5.838706 9.532284 5.791997 9.421472 5.757746 C 9.310658 5.723495 9.190374 5.686309 9.154173 5.675113 C 9.11797 5.663918 9.048485 5.642428 8.99976 5.627359 C 8.951035 5.612291 8.910275 5.599729 8.909181 5.599446 C 8.907193 5.59893 8.907193 5.59893 8.907135 5.798288 C 8.907103 5.907935 8.906695 6.128369 8.906229 6.288144 C 8.905446 6.555825 8.905249 6.580968 8.903705 6.608245 C 8.902784 6.624527 8.90139 6.647987 8.900606 6.660379 C 8.899822 6.672773 8.898192 6.695836 8.896983 6.711632 C 8.895774 6.727427 8.893582 6.753074 8.892114 6.768627 C 8.890645 6.784179 8.888061 6.80923 8.88637 6.824296 C 8.884679 6.839362 8.88172 6.864065 8.879793 6.879189 C 8.877868 6.894315 8.874691 6.917777 8.872734 6.931325 C 8.870777 6.944874 8.867386 6.967292 8.865197 6.981143 C 8.863009 6.994995 8.859045 7.018654 8.856388 7.03372 C 8.853731 7.048786 8.849344 7.072617 8.84664 7.086676 C 8.843935 7.100736 8.839338 7.1236 8.836424 7.137486 C 8.833509 7.151371 8.828584 7.174065 8.825479 7.187916 C 8.822371 7.201767 8.817014 7.224831 8.81357 7.239167 C 8.810127 7.253505 8.80431 7.276767 8.800644 7.29086 C 8.796978 7.304955 8.791035 7.327222 8.787437 7.340344 C 8.78384 7.353467 8.77752 7.375735 8.773395 7.389829 C 8.769268 7.403923 8.762319 7.426986 8.757952 7.441081 C 8.753583 7.455174 8.746363 7.47784 8.741903 7.491448 C 8.737446 7.505056 8.729829 7.527523 8.724978 7.541374 C 8.720126 7.555225 8.712182 7.577493 8.707321 7.590858 C 8.702462 7.604224 8.6948 7.624901 8.690294 7.636807 C 8.68579 7.648715 8.677304 7.670452 8.671437 7.685113 C 8.665571 7.699773 8.656536 7.721842 8.651362 7.734155 C 8.646187 7.746468 8.63796 7.765688 8.63308 7.776865 C 8.628201 7.788043 8.620145 7.806136 8.615178 7.817071 C 8.610211 7.828006 8.60083 7.848286 8.594332 7.862138 C 8.587832 7.875988 8.573873 7.904618 8.563307 7.92576 C 8.552743 7.946901 8.537873 7.975929 8.530265 7.990266 C 8.522656 8.004602 8.511053 8.026075 8.504479 8.037983 C 8.497905 8.04989 8.486739 8.069772 8.479666 8.082165 C 8.472593 8.094558 8.460988 8.11444 8.453878 8.126348 C 8.446768 8.138254 8.435438 8.156944 8.428702 8.167879 C 8.421966 8.178814 8.410628 8.196906 8.403507 8.208085 C 8.396386 8.219262 8.384013 8.238349 8.37601 8.2505 C 8.36801 8.26265 8.354345 8.282929 8.345645 8.295566 C 8.336946 8.308201 8.322885 8.328276 8.314397 8.340175 C 8.305909 8.352074 8.292209 8.37096 8.283951 8.382147 C 8.275693 8.393333 8.261178 8.41259 8.251695 8.42494 C 8.242211 8.437289 8.225837 8.458165 8.215304 8.471332 C 8.204773 8.484497 8.189062 8.503819 8.18039 8.514267 C 8.17172 8.524716 8.157459 8.541616 8.148703 8.551823 C 8.139945 8.562029 8.125004 8.579116 8.115499 8.589793 C 8.105992 8.600471 8.091457 8.616575 8.083197 8.625581 C 8.074937 8.634586 8.060843 8.649709 8.05188 8.659185 C 8.042916 8.668662 8.018659 8.69335 7.997974 8.714046 C 7.977291 8.734741 7.953162 8.758432 7.944355 8.766693 C 7.935549 8.774953 7.920821 8.788638 7.911628 8.797104 C 7.902433 8.805571 7.887569 8.819082 7.878597 8.827129 C 7.869623 8.835177 7.853733 8.849096 7.843284 8.858062 C 7.832834 8.867027 7.816133 8.881153 7.806171 8.889453 C 7.796208 8.897753 7.779904 8.911098 7.769942 8.919111 C 7.759978 8.927123 7.743874 8.939848 7.734154 8.947388 C 7.724434 8.954926 7.708329 8.96721 7.698366 8.974683 C 7.688403 8.982156 7.673093 8.993497 7.664346 8.999885 C 7.655598 9.006271 7.637505 9.019163 7.62414 9.02853 C 7.610775 9.037899 7.588109 9.053377 7.573772 9.062926 C 7.559434 9.072475 7.538474 9.086151 7.527194 9.093318 C 7.515913 9.100485 7.497422 9.112045 7.486104 9.119009 C 7.474786 9.125973 7.454846 9.137918 7.441793 9.145553 C 7.428741 9.153188 7.405677 9.166317 7.390542 9.174728 C 7.375406 9.18314 7.352087 9.19579 7.338722 9.20284 C 7.325357 9.209889 7.303686 9.221025 7.290564 9.227587 C 7.277442 9.234147 7.256366 9.2444 7.243731 9.250369 C 7.231095 9.256339 7.211213 9.265569 7.199549 9.27088 C 7.187884 9.27619 7.168797 9.28464 7.157134 9.289659 C 7.145469 9.294676 7.124792 9.303333 7.111184 9.308895 C 7.097576 9.31446 7.075367 9.323255 7.061831 9.328442 C 7.048295 9.333629 7.027816 9.341289 7.016323 9.345462 C 7.00483 9.349636 6.978328 9.358748 6.95743 9.365711 C 6.936532 9.372675 6.906311 9.382359 6.890272 9.38723 C 6.874235 9.392101 6.849581 9.399302 6.835486 9.403231 C 6.821393 9.40716 6.796739 9.413705 6.7807 9.417776 C 6.764662 9.421847 6.740208 9.427785 6.726356 9.430971 C 6.712505 9.434157 6.689641 9.439174 6.675548 9.442118 C 6.661452 9.445063 6.639384 9.449434 6.626504 9.451833 C 6.613625 9.454231 6.591038 9.458187 6.57631 9.460623 C 6.561581 9.463058 6.538518 9.46664 6.525058 9.468584 C 6.511598 9.470528 6.487662 9.473704 6.471867 9.475644 C 6.456071 9.477583 6.433207 9.480169 6.421057 9.481392 C 6.408907 9.482615 6.387236 9.4846 6.372898 9.485805 C 6.358561 9.487008 6.333112 9.488794 6.316345 9.489771 C 6.299578 9.490749 6.276316 9.491956 6.264652 9.492452 C 6.252987 9.492949 6.216803 9.493517 6.18424 9.493716 C 6.151678 9.493916 6.114499 9.493756 6.10162 9.493363 C 6.088739 9.49297 6.06866 9.492202 6.056995 9.491656 C 6.045331 9.491112 6.026046 9.490059 6.014138 9.489319 C 6.002231 9.488579 5.982548 9.487186 5.970398 9.486226 C 5.958248 9.485266 5.939956 9.483668 5.92975 9.482677 C 5.919544 9.481687 5.902445 9.479897 5.891753 9.478702 C 5.881061 9.477505 5.864443 9.475529 5.854823 9.47431 C 5.845204 9.47309 5.827708 9.470707 5.815943 9.469012 C 5.804178 9.467319 5.784412 9.464314 5.77202 9.462336 C 5.759627 9.460358 5.745908 9.458071 5.741535 9.457253 C 5.733583 9.455767 5.733583 9.455767 5.750813 9.451963 C 5.76029 9.449871 5.778183 9.445793 5.790576 9.442902 C 5.802969 9.440009 5.82305 9.435088 5.8352 9.431966 C 5.847351 9.428843 5.867067 9.423503 5.879014 9.420099 C 5.890961 9.416695 5.911639 9.410524 5.924964 9.406386 C 5.938288 9.402248 5.960324 9.395124 5.973932 9.390556 C 5.98754 9.385988 6.008053 9.378835 6.019516 9.374659 C 6.030978 9.370483 6.050462 9.363131 6.062815 9.358321 C 6.075166 9.353508 6.094417 9.34577 6.105595 9.341125 C 6.116774 9.336478 6.135264 9.328524 6.146685 9.323448 C 6.158106 9.318373 6.177591 9.309499 6.189984 9.303728 C 6.202377 9.297957 6.224247 9.287379 6.238585 9.280221 C 6.252921 9.273063 6.273399 9.262563 6.284092 9.256887 C 6.294784 9.251213 6.314865 9.240225 6.328716 9.232468 C 6.342567 9.224712 6.361654 9.213777 6.371131 9.208166 C 6.380608 9.202557 6.396514 9.192982 6.406477 9.18689 C 6.41644 9.180798 6.432345 9.170843 6.441822 9.164769 C 6.4513 9.158695 6.467404 9.14816 6.47761 9.141357 C 6.487816 9.134555 6.50392 9.123611 6.513398 9.117039 C 6.522875 9.110467 6.539177 9.098936 6.549627 9.091415 C 6.560077 9.083895 6.577971 9.070704 6.589391 9.062101 C 6.600812 9.053498 6.618895 9.039583 6.629575 9.031179 C 6.640255 9.022773 6.656757 9.009534 6.666247 9.001758 C 6.675736 8.993981 6.692227 8.980227 6.702893 8.971191 C 6.713559 8.962157 6.730458 8.94742 6.740448 8.938442 C 6.750437 8.929464 6.766562 8.914768 6.776282 8.905784 C 6.786003 8.896801 6.803698 8.880239 6.815604 8.868983 C 6.827512 8.857727 6.843456 8.842402 6.851037 8.834927 C 6.858617 8.827451 6.873728 8.812176 6.884615 8.800982 C 6.895503 8.789788 6.912683 8.77174 6.922792 8.760878 C 6.932902 8.750012 6.949699 8.731606 6.960117 8.719973 C 6.970537 8.70834 6.986147 8.690599 6.994807 8.68055 C 7.003467 8.670501 7.017852 8.65353 7.026772 8.642838 C 7.035693 8.632146 7.053 8.610872 7.065231 8.595562 C 7.077464 8.580254 7.09533 8.557407 7.104936 8.544792 C 7.114541 8.532177 7.129989 8.511499 7.139265 8.498842 C 7.14854 8.486185 7.164221 8.464337 7.174109 8.450293 C 7.183999 8.436249 7.199718 8.413383 7.209044 8.399484 C 7.218369 8.385583 7.232209 8.364666 7.2398 8.353003 C 7.247391 8.341338 7.260236 8.321177 7.268346 8.3082 C 7.276455 8.295223 7.289493 8.27395 7.297318 8.260925 C 7.305143 8.247901 7.317313 8.227304 7.32436 8.215153 C 7.331408 8.203004 7.344023 8.180735 7.352394 8.165669 C 7.360765 8.150602 7.372812 8.128534 7.379167 8.116627 C 7.385522 8.104719 7.396764 8.083248 7.404151 8.06891 C 7.411537 8.054573 7.422352 8.0331 7.428184 8.021194 C 7.434016 8.009287 7.443347 7.990001 7.448918 7.978336 C 7.45449 7.966672 7.463351 7.947784 7.468609 7.936364 C 7.473868 7.924943 7.482234 7.906453 7.4872 7.895274 C 7.492166 7.884096 7.500586 7.86481 7.505909 7.852417 C 7.511233 7.840024 7.519759 7.819808 7.524855 7.807493 C 7.529951 7.795179 7.538242 7.7747 7.543279 7.761986 C 7.548316 7.749271 7.556671 7.727735 7.561847 7.714127 C 7.567022 7.700519 7.57545 7.677853 7.580575 7.663759 C 7.585701 7.649664 7.594637 7.624414 7.600433 7.607646 C 7.60623 7.59088 7.615365 7.563642 7.620735 7.547118 C 7.626104 7.530593 7.634661 7.503554 7.63975 7.48703 C 7.644838 7.470506 7.653173 7.442472 7.658273 7.424733 C 7.663371 7.406994 7.671309 7.378562 7.675913 7.361553 C 7.680518 7.344542 7.688414 7.314123 7.69346 7.293953 C 7.698508 7.273784 7.705483 7.244955 7.708961 7.229889 C 7.712439 7.214823 7.717614 7.19176 7.720461 7.178638 C 7.723308 7.165516 7.728016 7.143247 7.730923 7.129154 C 7.733829 7.115059 7.738621 7.090804 7.74157 7.075251 C 7.74452 7.0597 7.749294 7.033455 7.752179 7.016931 C 7.755066 7.000407 7.759431 6.974154 7.761884 6.958592 C 7.764333 6.94303 7.768123 6.917978 7.770304 6.902922 C 7.772485 6.887866 7.775877 6.86322 7.777843 6.848155 C 7.779809 6.833088 7.783001 6.807043 7.784938 6.790275 C 7.786876 6.773509 7.789651 6.74806 7.791106 6.733722 C 7.792561 6.719385 7.794953 6.693936 7.796421 6.677169 C 7.797888 6.660402 7.800071 6.632964 7.801272 6.616198 C 7.802474 6.599431 7.804076 6.575174 7.804832 6.562295 C 7.80559 6.549416 7.806592 6.532119 7.807061 6.523856 C 7.807529 6.515595 7.80835 6.421553 7.808886 6.314875 C 7.809421 6.208197 7.809724 6.003942 7.80956 5.860975 C 7.809398 5.718009 7.809015 5.600789 7.808712 5.600486 C 7.808408 5.600182 7.68663 5.63752 7.538092 5.68346 C 7.389553 5.7294 7.213946 5.783698 7.147853 5.804122 C 7.08176 5.824546 6.974794 5.857548 6.910151 5.877461 C 6.845508 5.897371 6.776261 5.918652 6.75627 5.924749 C 6.736279 5.930848 6.719744 5.935658 6.719525 5.93544 C 6.719306 5.935221 6.790938 5.857274 6.878708 5.762224 C 6.966477 5.667175 7.110461 5.511271 7.198671 5.415771 C 7.286881 5.320272 7.433807 5.161213 7.525173 5.062309 C 7.616539 4.963404 7.76605 4.801562 7.857421 4.702663 C 7.948792 4.603762 8.093983 4.446596 8.180069 4.353404 C 8.266154 4.260212 8.341831 4.178411 8.34824 4.171626 L 8.359893 4.159288 Z M 3.639928 8.15987 C 3.639606 8.15984 3.567056 8.081517 3.478708 7.985821 C 3.390359 7.890125 3.197014 7.680786 3.049051 7.520623 C 2.901089 7.36046 2.662314 7.101986 2.518441 6.946236 C 2.374568 6.790486 2.198977 6.60038 2.128238 6.523779 C 2.0575 6.447177 1.999793 6.384333 2 6.384126 C 2.000208 6.383919 2.024487 6.391125 2.053954 6.40014 C 2.083422 6.409154 2.157237 6.431839 2.217988 6.450549 C 2.278738 6.469259 2.375968 6.499262 2.434052 6.517222 C 2.492137 6.535182 2.553174 6.55407 2.569692 6.559195 C 2.586209 6.564321 2.709718 6.602509 2.844157 6.644057 C 2.978595 6.685606 3.089538 6.719839 3.090698 6.72013 C 3.092807 6.72066 3.092807 6.72066 3.092866 6.520418 C 3.092898 6.410285 3.093306 6.18985 3.093772 6.030562 C 3.094553 5.763748 3.094752 5.738617 3.096295 5.711344 C 3.097217 5.695064 3.098611 5.671603 3.099395 5.659211 C 3.100178 5.646816 3.101808 5.623754 3.103017 5.607958 C 3.104227 5.592164 3.106418 5.566515 3.107887 5.550963 C 3.109355 5.535411 3.111941 5.51036 3.113633 5.495295 C 3.115324 5.480227 3.118114 5.456767 3.119833 5.443159 C 3.121551 5.429551 3.124544 5.407283 3.126484 5.393674 C 3.128424 5.380066 3.13179 5.357599 3.133963 5.343748 C 3.136135 5.329897 3.139918 5.307034 3.142369 5.292939 C 3.144819 5.278845 3.149205 5.254788 3.152116 5.239479 C 3.155027 5.224168 3.159971 5.199397 3.163101 5.184428 C 3.16623 5.169459 3.171352 5.145801 3.174481 5.131851 C 3.17761 5.117902 3.182986 5.094759 3.18643 5.080422 C 3.189873 5.066085 3.19569 5.042824 3.199356 5.028729 C 3.203022 5.014635 3.208965 4.992367 3.212563 4.979245 C 3.21616 4.966123 3.222479 4.943855 3.226605 4.929761 C 3.230732 4.915667 3.237681 4.892604 3.242049 4.878509 C 3.246417 4.864415 3.253638 4.84175 3.258096 4.828142 C 3.262555 4.814533 3.270171 4.792067 3.275023 4.778216 C 3.279873 4.764364 3.287818 4.742096 3.292678 4.728731 C 3.297538 4.715366 3.3052 4.694689 3.309704 4.682783 C 3.31421 4.670875 3.322696 4.649137 3.328563 4.634478 C 3.33443 4.619817 3.343463 4.597748 3.348639 4.585434 C 3.353813 4.573122 3.36204 4.553902 3.36692 4.542725 C 3.371799 4.531547 3.379856 4.513454 3.384823 4.502518 C 3.389789 4.491583 3.39917 4.471303 3.405668 4.457452 C 3.412167 4.443601 3.426129 4.414971 3.436694 4.39383 C 3.44726 4.372689 3.461914 4.344058 3.469262 4.330207 C 3.476608 4.316357 3.488427 4.294487 3.495524 4.281607 C 3.502622 4.268728 3.514584 4.247454 3.522105 4.234332 C 3.529628 4.22121 3.541034 4.201699 3.547455 4.190976 C 3.553874 4.180251 3.564621 4.162556 3.571336 4.151653 C 3.578052 4.14075 3.589372 4.122683 3.596493 4.111505 C 3.603614 4.100327 3.615987 4.081241 3.623989 4.069091 C 3.631991 4.056941 3.645655 4.036661 3.654354 4.024024 C 3.663054 4.011388 3.677115 3.991314 3.685603 3.979416 C 3.694091 3.967517 3.707792 3.948628 3.716049 3.937443 C 3.724308 3.926256 3.738823 3.906999 3.748305 3.89465 C 3.757787 3.882301 3.774164 3.861424 3.784696 3.848259 C 3.795227 3.835093 3.810939 3.815771 3.81961 3.805323 C 3.828281 3.794872 3.84254 3.777973 3.851297 3.767766 C 3.860054 3.757562 3.874996 3.740475 3.884502 3.729796 C 3.894008 3.719119 3.908543 3.703013 3.916803 3.694009 C 3.925064 3.685003 3.939156 3.669882 3.94812 3.660404 C 3.957083 3.650928 3.981341 3.626241 4.002025 3.605544 C 4.02271 3.584848 4.046838 3.561157 4.055645 3.552897 C 4.064451 3.544637 4.079179 3.530951 4.088373 3.522486 C 4.097566 3.514019 4.11243 3.500508 4.121404 3.49246 C 4.130376 3.484412 4.146267 3.470493 4.156716 3.461528 C 4.167165 3.452562 4.183867 3.438437 4.19383 3.430137 C 4.203792 3.421837 4.220096 3.408491 4.230059 3.400478 C 4.240022 3.392467 4.256126 3.379735 4.265846 3.372187 C 4.275566 3.364638 4.294852 3.349997 4.308703 3.33965 C 4.322554 3.329302 4.342636 3.314602 4.353327 3.306981 C 4.364019 3.299361 4.382311 3.28654 4.393975 3.27849 C 4.405639 3.270441 4.42466 3.257609 4.436245 3.249977 C 4.447829 3.242345 4.465922 3.230637 4.476451 3.223961 C 4.486979 3.217284 4.504342 3.206445 4.515034 3.199872 C 4.525727 3.193299 4.545155 3.181674 4.558207 3.174039 C 4.571259 3.166403 4.594323 3.153273 4.609458 3.14486 C 4.624594 3.13645 4.647913 3.123799 4.661278 3.11675 C 4.674643 3.1097 4.696314 3.098564 4.709436 3.092004 C 4.722558 3.085442 4.74403 3.075004 4.757153 3.068806 C 4.770275 3.062607 4.791488 3.052789 4.804292 3.046986 C 4.817096 3.041182 4.837177 3.03234 4.848916 3.027336 C 4.860656 3.022333 4.879611 3.014428 4.89104 3.009769 C 4.902469 3.00511 4.923146 2.996942 4.93699 2.991619 C 4.950833 2.986296 4.971702 2.978476 4.983366 2.97424 C 4.99503 2.970004 5.021672 2.960841 5.042571 2.953878 C 5.063468 2.946914 5.093689 2.937231 5.109727 2.93236 C 5.125765 2.927489 5.150419 2.920288 5.164514 2.916359 C 5.178607 2.912431 5.203261 2.905885 5.219299 2.901814 C 5.235338 2.897742 5.259793 2.891805 5.273643 2.888619 C 5.287495 2.885432 5.310359 2.880417 5.324453 2.877472 C 5.338548 2.874528 5.360616 2.870155 5.373496 2.867757 C 5.386374 2.865358 5.408962 2.861403 5.42369 2.858968 C 5.438418 2.856532 5.461482 2.85295 5.474941 2.851007 C 5.488403 2.849062 5.512338 2.845885 5.528134 2.843946 C 5.543929 2.842007 5.566793 2.83942 5.578943 2.838198 C 5.591094 2.836976 5.612764 2.83499 5.627101 2.833786 C 5.641439 2.832582 5.666887 2.830797 5.683655 2.829821 C 5.700423 2.828844 5.724281 2.827635 5.736673 2.827131 C 5.749067 2.826628 5.779487 2.825963 5.804273 2.825654 C 5.831717 2.825312 5.864715 2.825499 5.888661 2.826133 C 5.910288 2.826705 5.935936 2.827562 5.945656 2.828037 C 5.955376 2.828513 5.97327 2.829513 5.98542 2.830258 C 5.99757 2.831004 6.017452 2.832401 6.029602 2.833363 C 6.041752 2.834323 6.060044 2.83592 6.07025 2.836912 C 6.080456 2.837903 6.097554 2.839693 6.108246 2.840889 C 6.118938 2.842084 6.135557 2.84406 6.145177 2.84528 C 6.154796 2.846498 6.172292 2.848883 6.184057 2.850577 C 6.195822 2.852271 6.215388 2.855248 6.227539 2.857194 C 6.239688 2.859139 6.253395 2.861429 6.257997 2.862283 C 6.266363 2.863834 6.266363 2.863834 6.249159 2.867633 C 6.239698 2.869721 6.221817 2.873796 6.209424 2.876689 C 6.197031 2.87958 6.17695 2.884501 6.1648 2.887624 C 6.152649 2.890747 6.132933 2.896087 6.120986 2.899491 C 6.109038 2.902895 6.088361 2.909066 6.075037 2.913204 C 6.061712 2.917341 6.039675 2.924465 6.026067 2.929032 C 6.012459 2.933601 5.991946 2.940756 5.980484 2.944931 C 5.969021 2.949106 5.949537 2.95646 5.937186 2.961273 C 5.924834 2.966085 5.905422 2.973896 5.894048 2.978628 C 5.882673 2.983361 5.864182 2.991314 5.852958 2.996302 C 5.841733 3.001288 5.822409 3.010091 5.810017 3.015862 C 5.797623 3.021632 5.775753 3.032209 5.761416 3.039369 C 5.747078 3.046527 5.726601 3.057027 5.715909 3.062701 C 5.705216 3.068377 5.685135 3.079366 5.671284 3.087121 C 5.657433 3.094877 5.638347 3.105814 5.628869 3.111423 C 5.619392 3.117034 5.603487 3.126609 5.593524 3.1327 C 5.58356 3.138793 5.567655 3.148746 5.558177 3.15482 C 5.5487 3.160895 5.532596 3.171429 5.522389 3.178233 C 5.512184 3.185035 5.496079 3.195978 5.486602 3.202551 C 5.477125 3.209123 5.460822 3.220655 5.450372 3.228179 C 5.439923 3.235703 5.423421 3.247832 5.413702 3.255136 C 5.403981 3.262436 5.386883 3.27556 5.375705 3.284297 C 5.364527 3.293035 5.346831 3.307168 5.336382 3.315704 C 5.325933 3.32424 5.308455 3.338784 5.297544 3.348024 C 5.286631 3.357265 5.269532 3.372169 5.259547 3.381148 C 5.249561 3.390125 5.233438 3.404821 5.223718 3.413807 C 5.213998 3.422791 5.196302 3.439351 5.184396 3.450605 C 5.172488 3.461862 5.156544 3.477188 5.148963 3.484664 C 5.141382 3.492139 5.126272 3.507414 5.115385 3.518608 C 5.104497 3.529801 5.087317 3.547848 5.077208 3.558713 C 5.067098 3.569577 5.050301 3.587983 5.039882 3.599617 C 5.029463 3.61125 5.013853 3.62899 5.005193 3.639039 C 4.996532 3.649089 4.982148 3.666059 4.973228 3.676752 C 4.964307 3.687445 4.947 3.708717 4.934769 3.724027 C 4.922537 3.739336 4.90467 3.762184 4.895064 3.774798 C 4.885458 3.787414 4.870011 3.808089 4.860735 3.820748 C 4.85146 3.833405 4.835779 3.855252 4.825891 3.869297 C 4.816002 3.883342 4.800281 3.906206 4.790956 3.920107 C 4.781631 3.934007 4.767791 3.954923 4.760201 3.966587 C 4.75261 3.978251 4.739764 3.998412 4.731654 4.01139 C 4.723545 4.024366 4.710507 4.04564 4.702682 4.058664 C 4.694856 4.071689 4.682687 4.092286 4.67564 4.104437 C 4.668592 4.116586 4.655977 4.138854 4.647606 4.15392 C 4.639235 4.168986 4.627187 4.191055 4.620833 4.202963 C 4.614478 4.214869 4.603237 4.236342 4.59585 4.250679 C 4.588463 4.265017 4.577648 4.286489 4.571816 4.298396 C 4.565984 4.310304 4.556654 4.329589 4.551082 4.341253 C 4.54551 4.352918 4.536649 4.371806 4.53139 4.383226 C 4.526132 4.394647 4.517766 4.413137 4.512801 4.424315 C 4.507834 4.435493 4.499414 4.45478 4.494091 4.467174 C 4.488767 4.479566 4.480241 4.499781 4.475145 4.512096 C 4.470048 4.524411 4.461758 4.544889 4.456721 4.557603 C 4.451684 4.570319 4.443329 4.591855 4.438153 4.605463 C 4.432978 4.619071 4.42455 4.641737 4.419425 4.65583 C 4.414299 4.669925 4.405364 4.695175 4.399567 4.711941 C 4.393771 4.72871 4.384635 4.755947 4.379265 4.772473 C 4.373896 4.788996 4.365339 4.816035 4.36025 4.83256 C 4.355162 4.849085 4.346827 4.877117 4.341728 4.894857 C 4.336629 4.912596 4.328691 4.941027 4.324087 4.958037 C 4.319483 4.975048 4.311586 5.005467 4.30654 5.025636 C 4.301492 5.045806 4.294517 5.074635 4.291039 5.0897 C 4.287562 5.104767 4.282386 5.12783 4.279539 5.140952 C 4.276692 5.154074 4.271984 5.176342 4.269077 5.190436 C 4.266171 5.20453 4.261379 5.228786 4.25843 5.244339 C 4.25548 5.259891 4.250707 5.286135 4.24782 5.302659 C 4.244935 5.319183 4.240569 5.345436 4.238118 5.360997 C 4.235666 5.37656 4.231877 5.40161 4.229696 5.416667 C 4.227515 5.431724 4.224122 5.456368 4.222157 5.471435 C 4.220191 5.486501 4.216998 5.512547 4.215061 5.529314 C 4.213124 5.546082 4.210349 5.571529 4.208893 5.585867 C 4.207439 5.600204 4.205048 5.625653 4.20358 5.642421 C 4.202112 5.659187 4.199928 5.686625 4.198727 5.703393 C 4.197526 5.720159 4.195924 5.744415 4.195167 5.757294 C 4.194409 5.770174 4.193407 5.787471 4.192938 5.795733 C 4.192471 5.803995 4.19165 5.898036 4.191115 6.004715 C 4.19058 6.111393 4.190277 6.315648 4.190439 6.458614 C 4.190602 6.601581 4.190984 6.718802 4.191288 6.719105 C 4.191591 6.719408 4.313371 6.682069 4.461908 6.636129 C 4.610447 6.590189 4.786054 6.535892 4.852147 6.515468 C 4.91824 6.495043 5.025205 6.462041 5.089849 6.442131 C 5.154491 6.422219 5.223739 6.400939 5.243729 6.39484 C 5.263721 6.388742 5.280256 6.383932 5.280475 6.38415 C 5.280694 6.384369 5.209062 6.462315 5.121291 6.557364 C 5.033521 6.652413 4.889537 6.808317 4.801327 6.903816 C 4.713117 6.999316 4.56619 7.158374 4.474826 7.25728 C 4.383461 7.356185 4.23395 7.518026 4.14258 7.616927 C 4.051209 7.715828 3.906015 7.872994 3.819926 7.966186 C 3.733837 8.059378 3.658251 8.141094 3.651957 8.147776 C 3.645663 8.154458 3.64025 8.159901 3.639928 8.15987 Z",Ys=s=>{var O;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,nameOffsetX:r=de.nameOffsetX,nameOffsetY:l=de.nameOffsetY,outOfStation:c=de.outOfStation}=(O=a[k.BjsubwayInt])!=null?O:de,h=x.useCallback(w=>m(t,w),[t,m]),u=x.useCallback(w=>i(t,w),[t,i]),p=x.useCallback(w=>d(t,w),[t,d]),g=(w,v)=>w==="left"&&v==="top"?[-5,-f[1].split("\n").length*te[v]-4]:w==="middle"&&v==="top"?[0,-f[1].split("\n").length*te[v]-7]:w==="right"&&v==="top"?[5,-f[1].split("\n").length*te[v]-4]:w==="left"&&v==="bottom"?[-5,f[0].split("\n").length*te[v]+4]:w==="middle"&&v==="bottom"?[0,f[0].split("\n").length*te[v]+7]:w==="right"&&v==="bottom"?[5,f[0].split("\n").length*te[v]+4]:w==="left"&&v==="middle"?[-8,0]:w==="right"&&v==="middle"?[8,0]:[0,0],[C,y]=g(r,l),b=r==="left"?"end":r==="right"?"start":"middle";return n.jsxs("g",{id:t,children:[n.jsxs("g",{transform:"translate(".concat(e-6,", ").concat(o-6,")"),children:[n.jsx("circle",{cx:"6",cy:"6",r:"6",stroke:"black",strokeWidth:"1",fill:"white"}),n.jsx("path",{d:ma,fill:c?"#898989":"black",stroke:c?"#898989":"black",strokeWidth:"0.533618",strokeLinecap:"round",strokeLinejoin:"round"}),n.jsx("circle",{id:"stn_core_".concat(t),cx:"6",cy:"6",r:"6",stroke:"black",strokeWidth:"1",strokeOpacity:"0",fill:"white",fillOpacity:"0",onPointerDown:h,onPointerMove:u,onPointerUp:p,style:{cursor:"move"}})]}),n.jsxs("g",{transform:"translate(".concat(e+C,", ").concat(o+y,")"),textAnchor:b,children:[n.jsx(T,{text:f[0].split("\n"),fontSize:te.zh,lineHeight:te.zh,grow:"up",className:"rmp-name__zh",baseOffset:1}),n.jsx(T,{text:f[1].split("\n"),fontSize:te.en,lineHeight:te.en,grow:"down",className:"rmp-name__en",baseOffset:1})]})]})},de={...$,nameOffsetX:"right",nameOffsetY:"top",outOfStation:!1},Ls=[{type:"textarea",label:"panel.details.stations.common.nameZh",value:s=>(s!=null?s:de).names[0],onChange:(s,t)=>{const e=t!=null?t:de;return e.names[0]=s.toString(),e}},{type:"textarea",label:"panel.details.stations.common.nameEn",value:s=>(s!=null?s:de).names[1],onChange:(s,t)=>{const e=t!=null?t:de;return e.names[1]=s.toString(),e}},{type:"select",label:"panel.details.stations.common.nameOffsetX",value:s=>(s!=null?s:de).nameOffsetX,options:{left:"left",middle:"middle",right:"right"},disabledOptions:s=>(s==null?void 0:s.nameOffsetY)==="middle"?["middle"]:[],onChange:(s,t)=>{const e=t!=null?t:de;return e.nameOffsetX=s,e}},{type:"select",label:"panel.details.stations.common.nameOffsetY",value:s=>(s!=null?s:de).nameOffsetY,options:{top:"top",middle:"middle",bottom:"bottom"},disabledOptions:s=>(s==null?void 0:s.nameOffsetX)==="middle"?["middle"]:[],onChange:(s,t)=>{const e=t!=null?t:de;return e.nameOffsetY=s,e}},{type:"switch",label:"panel.details.stations.bjsubwayInt.outOfStation",oneLine:!0,isChecked:s=>(s!=null?s:de).outOfStation,onChange:(s,t)=>{const e=t!=null?t:de;return e.outOfStation=s,e}}],Hs=()=>n.jsx(dn,{fields:Ls}),Fs=n.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:n.jsxs("g",{transform:"translate(6, 6)",children:[n.jsx("circle",{cx:"6",cy:"6",r:"6",stroke:"black",strokeWidth:"1",fill:"white"}),n.jsx("path",{d:ma,stroke:"black",strokeWidth:"0.533618",strokeLinecap:"round",strokeLinejoin:"round"})]})}),Us={component:Ys,icon:Fs,defaultAttrs:de,attrsComponent:Hs,metadata:{displayName:"panel.details.stations.bjsubwayInt.displayName",cities:[B.Beijing],canvas:[Z.RailMap],categories:[q.Metro],tags:["interchange"]}};function Vs(s){const{interchangeList:t,onAdd:e,onDelete:o,onUpdate:a}=s,m=tt(),{paletteAppClip:{output:i}}=nt(c=>c.runtime),{t:d}=X(),[f,r]=x.useState();x.useEffect(()=>{f!==void 0&&i&&(a==null||a(f,[...i,t[f][4],t[f][5]]),r(void 0))},[i==null?void 0:i.toString()]);const l=t.map((c,h)=>[{type:"input",label:d("panel.details.stations.common.lineCode"),value:c[4],minW:"80px",onChange:u=>a==null?void 0:a(h,[c[0],c[1],c[2],c[3],u,c[5]])},{type:"input",label:d("panel.details.stations.common.stationCode"),value:c[5],minW:"80px",onChange:u=>a==null?void 0:a(h,[c[0],c[1],c[2],c[3],c[4],u])}]);return n.jsxs(cn,{direction:"column",children:[t.length===0&&n.jsxs(Fe,{spacing:.5,"data-testid":"interchange-card-stack",children:[n.jsx(fn,{as:"i",flex:1,align:"center",fontSize:"md",colorScheme:"gray",children:d("panel.details.stations.interchange.noInterchanges")}),n.jsx(ve,{size:"sm",variant:"ghost","aria-label":d("panel.details.stations.interchange.add"),onClick:()=>e==null?void 0:e([B.Shanghai,"","#aaaaaa",R.white,"",""]),icon:n.jsx(Pe,{})})]}),t.map((c,h)=>n.jsxs(Fe,{spacing:.5,"data-testid":"interchange-card-stack-".concat(h),children:[n.jsx(ge,{label:d("color"),minW:"40px",noLabel:h!==0,children:n.jsx(Dt,{theme:[c[0],c[1],c[2],c[3]],onClick:()=>{r(h),m(Xt([c[0],c[1],c[2],c[3]]))}})}),n.jsx(H,{fields:l[h],noLabel:h!==0}),e&&h===l.length-1?n.jsx(ve,{size:"sm",variant:"ghost","aria-label":d("panel.details.stations.interchange.copy"),onClick:()=>e==null?void 0:e(t.slice(-1)[0]),icon:n.jsx(mn,{})}):n.jsx(hn,{minW:8}),o&&n.jsx(ve,{size:"sm",variant:"ghost","aria-label":d("panel.details.stations.interchange.remove"),onClick:()=>o==null?void 0:o(h),icon:n.jsx(Ct,{})})]},h))]})}const Ut=s=>{var C;const{stationType:t,defaultAttrs:e,maximumTransfers:o}=s,{t:a}=X(),m=tt(),i=x.useCallback(()=>{m(ht()),m(ut(r.current.export()))},[m,ht,ut]),{selected:d}=nt(y=>y.runtime),[f]=d,r=x.useRef(window.graph),l=f&&r.current.hasNode(f)&&r.current.getNodeAttribute(f,"type")===t?r.current.getNodeAttribute(f,t):e,c=(C=l.transfer)!=null?C:e.transfer,h=y=>b=>{const O=structuredClone(c);if(O.length<=y)for(let w=O.length;w<=y;w++)O[w]=[];O[y].push(b),l.transfer=O,r.current.mergeNodeAttributes(f,{[t]:l}),i()},u=y=>b=>{if(c.length>y&&c[y].length>b){const O=c.map((w,v)=>v===y?w.filter((N,S)=>S!==b):w);l.transfer=O,r.current.mergeNodeAttributes(f,{[t]:l}),i()}},p=y=>(b,O)=>{if(c.length>y&&c[y].length>b){const w=c.map((v,N)=>N===y?v.map((S,j)=>j===b?[0,1,2,3,4,5].map(A=>O[A]===void 0?S[A]:O[A]):S):v);l.transfer=w,r.current.mergeNodeAttributes(f,{[t]:l}),i()}},g=()=>h(l.transfer.length)([B.Guangzhou,"","#AAAAAA",R.white,"",""]);return n.jsxs(Ue,{align:"flex-start",children:[l.transfer.map((y,b)=>n.jsxs(x.Fragment,{children:[n.jsx(Yt,{size:"xs",children:a(b===0?"panel.details.stations.interchange.within":b===1?"panel.details.stations.interchange.outStation":"panel.details.stations.interchange.outSystem")}),n.jsx(Vs,{interchangeList:y,onAdd:o[b]>y.length?h(b):void 0,onDelete:u(b),onUpdate:p(b)})]},b)),o[l.transfer.length]>0&&n.jsx(pe,{size:"xs",variant:"ghost",alignSelf:"flex-end",leftIcon:n.jsx(Pe,{}),onClick:g,children:a("panel.details.stations.interchange.addGroup")})]})},Ze=5,Vt=5,Gs={top:7.5+1,middle:0,bottom:11},Zs=(s,t=Ze,e=[])=>{const o=Math.sqrt(s*s-t*t/4),a=e.length<2?e.length+1:e.length;let m="M ".concat(-s,",0 A ").concat(s,",").concat(s,",0,0,1,").concat(-t/2,",-").concat(o," ");for(let i=0;i=0;i=i-1)m+="A ".concat(s,",").concat(s,",0,0,1,").concat(i*t-t/2,",").concat(o," ");return m+="A ".concat(s,",").concat(s,",0,0,1,").concat(-s,",0 Z"),m},qs=s=>{var M;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,nameOffsetX:r=ie.nameOffsetX,nameOffsetY:l=ie.nameOffsetY,transfer:c=ie.transfer,rotate:h=ie.rotate}=(M=a[k.MTR])!=null?M:ie,u=x.useCallback(_=>m(t,_),[t,m]),p=x.useCallback(_=>i(t,_),[t,i]),g=x.useCallback(_=>d(t,_),[t,d]),C=c.at(0),y=Zs(Vt,Ze,C),b=C.length===0?0:C.length<=2?1:C.length-1,O=Math.cos(h*Math.PI/180)*b*Vt,w=Math.sin(h*Math.PI/180)*b*Vt,v=r==="left"?-8:r==="right"?8:0,N=Math.sign(O)===Math.sign(v)?O+v:v,S=(f[ee[l].namesPos].split("\n").length*Gs[l]+6)*ee[l].polarity,j=Math.sign(w)===Math.sign(S)?w+S:S,A=r==="left"?"end":r==="right"?"start":"middle";return x.useMemo(()=>n.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[n.jsx("path",{transform:"rotate(".concat(h,")"),d:y,stroke:"#001f50",strokeWidth:"1.5",fill:"white",onPointerDown:u,onPointerMove:p,onPointerUp:g,style:{cursor:"move"}}),c.at(0).length>1&&c.at(0).map(_=>_[2]).map((_,E)=>n.jsx("line",{transform:"rotate(".concat(h,")"),x1:-Ze/2+E*Ze,x2:Ze/2+E*Ze,stroke:_,strokeWidth:"2"},"".concat(E,"_").concat(_))),n.jsx("path",{id:"stn_core_".concat(t),transform:"rotate(".concat(h,")"),d:y,fill:"white",fillOpacity:"0",onPointerDown:u,onPointerMove:p,onPointerUp:g,style:{cursor:"move"}}),n.jsxs("g",{transform:"translate(".concat(N,", ").concat(j,")"),textAnchor:A,className:"rmp-name-outline",strokeWidth:"1.25",children:[n.jsx(T,{text:f[0].split("\n"),fontSize:10,lineHeight:10,grow:"up",baseOffset:1,fill:"#001f50",className:"rmp-name__mtr__zh"}),n.jsx(T,{text:f[1].split("\n"),fontSize:7.5,lineHeight:7.5,grow:"down",baseOffset:1,fill:"#001f50",className:"rmp-name__mtr__en"})]})]}),[t,e,o,...f,h,JSON.stringify(c),r,l,u,p,g])},ie={names:["車站","Stn"],nameOffsetX:"right",nameOffsetY:"top",rotate:0,transfer:[[]]},Qs=[{type:"textarea",label:"panel.details.stations.common.nameZh",value:s=>(s!=null?s:ie).names[0],onChange:(s,t)=>{const e=t!=null?t:ie;return e.names[0]=s.toString(),e}},{type:"textarea",label:"panel.details.stations.common.nameEn",value:s=>(s!=null?s:ie).names[1],onChange:(s,t)=>{const e=t!=null?t:ie;return e.names[1]=s.toString(),e}},{type:"select",label:"panel.details.stations.common.nameOffsetX",value:s=>(s!=null?s:ie).nameOffsetX,options:{left:"left",middle:"middle",right:"right"},disabledOptions:s=>(s==null?void 0:s.nameOffsetY)==="middle"?["middle"]:[],onChange:(s,t)=>{const e=t!=null?t:ie;return e.nameOffsetX=s,e}},{type:"select",label:"panel.details.stations.common.nameOffsetY",value:s=>(s!=null?s:ie).nameOffsetY,options:{top:"top",middle:"middle",bottom:"bottom"},disabledOptions:s=>(s==null?void 0:s.nameOffsetX)==="middle"?["middle"]:[],onChange:(s,t)=>{const e=t!=null?t:ie;return e.nameOffsetY=s,e}},{type:"select",label:"panel.details.stations.common.rotate",value:s=>{var t;return(t=s==null?void 0:s.rotate)!=null?t:ie.rotate},hidden:s=>{var t,e,o;return((o=(e=(t=s==null?void 0:s.transfer)==null?void 0:t.flat())==null?void 0:e.length)!=null?o:0)===0},options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:(s,t)=>{const e=t!=null?t:ie;return e.rotate=Number(s),e}},{type:"custom",label:"panel.details.stations.interchange.title",component:n.jsx(Ut,{stationType:k.MTR,defaultAttrs:ie,maximumTransfers:[99,0,0]})}],Js=()=>n.jsx(dn,{fields:Qs}),Ks=n.jsx("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:n.jsx("circle",{cx:"12",cy:"12",r:"5",stroke:"currentColor",strokeWidth:"1.5",fill:"none"})}),eo={component:qs,icon:Ks,defaultAttrs:ie,attrsComponent:Js,metadata:{displayName:"panel.details.stations.mtr.displayName",cities:[B.Hongkong],canvas:[Z.RailMap],categories:[q.Metro],tags:[]}},yt=x.forwardRef((s,t)=>{const{text:e,lineWidth:o,grow:a,dominantBaseline:m=a==="left"?"hanging":a==="right"?"auto":"central",baseOffset:i=2,baseDY:d=0,...f}=s,r=a==="bidirectional"?-((e.length-1)*o)/2:0;return n.jsx("g",{ref:t,children:[...e].reverse().map((l,c,h)=>n.jsx("text",{x:(c*o+i)*(a==="left"?-1:1)+r,dy:(c-(h.length-1)/2)*d,writingMode:"vertical-rl",dominantBaseline:m,...f,children:l},"".concat(l).concat(c)))})});yt.displayName="MultilineTextVertical";const oe={zh:{size:10,baseOffset:1},en:{size:5,baseOffset:1.5}},Gt={top:{lineHeight:5,offset:1+oe.en.baseOffset+2.5,polarity:-1},middle:{lineHeight:0,offset:oe.zh.size/2,polarity:1},bottom:{lineHeight:10,offset:0+oe.zh.baseOffset+2.5,polarity:1}},to=s=>{var N;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,color:r=Se.color,nameOffsetX:l=Se.nameOffsetX,nameOffsetY:c=Se.nameOffsetY,textVertical:h=Se.textVertical}=(N=a[k.SuzhouRTBasic])!=null?N:Se,u=x.useCallback(S=>m(t,S),[t,m]),p=x.useCallback(S=>i(t,S),[t,i]),g=x.useCallback(S=>d(t,S),[t,d]),C=l==="left"?-5:l==="right"?5:0,y=(f[ee[c].namesPos].split("\n").length*Gt[c].lineHeight+Gt[c].offset)*Gt[c].polarity,b=l==="left"?"end":l==="right"?"start":"middle",O=c==="top"?-2.5-2:2.5+2,w=c==="top"?"end":"start",v=f[0].split("\n").length*oe.zh.size/2+oe.en.baseOffset;return n.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[n.jsx("circle",{id:"stn_core_".concat(t),r:3,stroke:r[2],strokeWidth:"1",fill:"white",onPointerDown:u,onPointerMove:p,onPointerUp:g,style:{cursor:"move"}}),h?n.jsxs(n.Fragment,{children:[n.jsx("g",{transform:"translate(-1, ".concat(O,")"),textAnchor:w,children:n.jsx(yt,{text:f[0].split("\n"),fontSize:oe.zh.size,lineWidth:oe.zh.size,grow:"bidirectional",baseOffset:oe.zh.baseOffset,dominantBaseline:"central",className:"rmp-name__zh"})}),n.jsx("g",{transform:"translate(".concat(v,", ").concat(O,")rotate(90)"),textAnchor:w,children:n.jsx(T,{text:f[1].split("\n"),fontSize:oe.en.size,lineHeight:oe.en.size,grow:"up",baseOffset:oe.en.baseOffset,className:"rmp-name__en",dominantBaseline:"central",fill:"gray"})})]}):n.jsxs("g",{transform:"translate(".concat(C,", ").concat(y,")"),textAnchor:b,children:[n.jsx(T,{text:f[0].split("\n"),fontSize:oe.zh.size,lineHeight:oe.zh.size,grow:"up",baseOffset:oe.zh.baseOffset,className:"rmp-name__zh"}),n.jsx(T,{text:f[1].split("\n"),fontSize:oe.en.size,lineHeight:oe.en.size,grow:"down",baseOffset:oe.en.baseOffset,className:"rmp-name__en",fill:"gray"})]})]})},Se={...$,color:[B.Suzhou,"sz1","#78BA25",R.white],nameOffsetX:"right",nameOffsetY:"top",textVertical:!1},no=s=>{var i,d,f;const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:a}=X(),m=[{type:"textarea",label:a("panel.details.stations.common.nameZh"),value:e.names[0],onChange:r=>{e.names[0]=r,o(t,e)},minW:"full"},{type:"textarea",label:a("panel.details.stations.common.nameEn"),value:e.names[1],onChange:r=>{e.names[1]=r,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetX"),value:(i=e.nameOffsetX)!=null?i:Se.nameOffsetX,options:{left:a("panel.details.stations.common.left"),middle:a("panel.details.stations.common.middle"),right:a("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:r=>{e.nameOffsetX=r,e.nameOffsetX!=="middle"&&(e.textVertical=!1),o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetY"),value:(d=e.nameOffsetY)!=null?d:Se.nameOffsetY,options:{top:a("panel.details.stations.common.top"),middle:a("panel.details.stations.common.middle"),bottom:a("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:r=>{e.nameOffsetY=r,e.nameOffsetY==="middle"&&(e.textVertical=!1),o(t,e)},minW:"full"},{type:"switch",label:a("panel.details.stations.suzhouRTBasic.textVertical"),isChecked:(f=e.textVertical)!=null?f:Se.textVertical,isDisabled:e.nameOffsetY==="middle"||e.nameOffsetX!=="middle",onChange:r=>{e.textVertical=r,o(t,e)},oneLine:!0,minW:"full"},{type:"custom",label:a("color"),component:n.jsx(Ee,{type:k.SuzhouRTBasic,defaultTheme:Se.color})}];return n.jsx(H,{fields:m})},ao=n.jsx("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:n.jsx("circle",{cx:"12",cy:"12",r:"3",stroke:"currentColor",fill:"none"})}),so={component:to,icon:ao,defaultAttrs:Se,attrsComponent:no,metadata:{displayName:"panel.details.stations.suzhouRTBasic.displayName",cities:[B.Suzhou],canvas:[Z.RailMap],categories:[q.Metro],tags:[]}},We=6,je={zh:{size:10,baseOffset:1},en:{size:5,baseOffset:1.5}},Zt={top:{lineHeight:je.en.size,offset:0+je.en.baseOffset+3,polarity:-1},middle:{lineHeight:0,offset:je.zh.size/2,polarity:1},bottom:{lineHeight:je.zh.size,offset:0+je.zh.baseOffset+3,polarity:1}},oo=s=>{var S,j;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,nameOffsetX:r=ke.nameOffsetX,nameOffsetY:l=ke.nameOffsetY,rotate:c=ke.rotate,transfer:h=ke.transfer}=(S=a[k.SuzhouRTInt])!=null?S:ke,u=x.useCallback(A=>m(t,A),[t,m]),p=x.useCallback(A=>i(t,A),[t,i]),g=x.useCallback(A=>d(t,A),[t,d]),C=(We-1)*h.at(0).length+1,y=Math.abs(Math.cos(c*Math.PI/180)*C),b=Math.abs(Math.sin(c*Math.PI/180)*C),O=r==="left"?-1:r==="right"?1:0,w=(y/2+5)*O,v=(f[ee[l].namesPos].split("\n").length*Zt[l].lineHeight+Zt[l].offset+(l==="middle"?0:b/2))*Zt[l].polarity,N=r==="left"?"end":r==="right"?"start":"middle";return n.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[n.jsxs("g",{transform:"rotate(".concat(c,")"),onPointerDown:u,onPointerMove:p,onPointerUp:g,style:{cursor:"move"},children:[n.jsx("rect",{x:-C/2,y:-We/2,width:C,height:We,ry:We/2,stroke:"#616161",strokeWidth:"1",fill:"white"}),((j=h.at(0))!=null?j:[]).length>0&&h.at(0).map(A=>A[2]).map((A,M)=>n.jsx("circle",{r:2,cx:-C/2+3+M*5,fill:A},"".concat(M,"_").concat(A))),n.jsx("rect",{id:"stn_core_".concat(t),x:-C/2-.5,y:-We/2-.5,width:C+1,height:We+1,ry:We/2,fill:"white",opacity:"0"})]}),n.jsxs("g",{transform:"translate(".concat(w,", ").concat(v,")"),textAnchor:N,children:[n.jsx(T,{text:f[0].split("\n"),fontSize:je.zh.size,lineHeight:je.zh.size,grow:"up",baseOffset:je.zh.baseOffset,className:"rmp-name__zh"}),n.jsx(T,{text:f[1].split("\n"),fontSize:je.en.size,lineHeight:je.en.size,grow:"down",baseOffset:je.en.baseOffset,className:"rmp-name__en",fill:"gray"})]})]})},ke={...$,nameOffsetX:"right",nameOffsetY:"top",rotate:0,transfer:[[[B.Suzhou,"sz1","#78BA25",R.white,"",""],[B.Suzhou,"sz2","#ED3240",R.white,"",""]]]},io=s=>{var i,d,f,r,l,c;const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:a}=X(),m=[{type:"textarea",label:a("panel.details.stations.common.nameZh"),value:e.names[0],onChange:h=>{e.names[0]=h,o(t,e)},minW:"full"},{type:"textarea",label:a("panel.details.stations.common.nameEn"),value:e.names[1],onChange:h=>{e.names[1]=h,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetX"),value:(i=e.nameOffsetX)!=null?i:ke.nameOffsetX,options:{left:a("panel.details.stations.common.left"),middle:a("panel.details.stations.common.middle"),right:a("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:h=>{e.nameOffsetX=h,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetY"),value:(d=e.nameOffsetY)!=null?d:ke.nameOffsetY,options:{top:a("panel.details.stations.common.top"),middle:a("panel.details.stations.common.middle"),bottom:a("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:h=>{e.nameOffsetY=h,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.rotate"),value:(f=e.rotate)!=null?f:ke.rotate,hidden:((c=(l=(r=e==null?void 0:e.transfer)==null?void 0:r.flat())==null?void 0:l.length)!=null?c:0)===0,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:h=>{e.rotate=Number(h),o(t,e)},minW:"full"},{type:"custom",label:a("panel.details.stations.interchange.title"),component:n.jsx(Ut,{stationType:k.SuzhouRTInt,defaultAttrs:ke,maximumTransfers:[99,0,0]})}];return n.jsx(H,{fields:m})},lo=n.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[n.jsx("rect",{x:"6",y:"9",width:"12",height:"6",ry:"3",stroke:"currentColor",fill:"none"}),n.jsx("circle",{r:"2",cx:"9.5",cy:"12",fill:"currentColor"}),n.jsx("circle",{r:"2",cx:"14.5",cy:"12",fill:"currentColor"})]}),ro={component:oo,icon:lo,defaultAttrs:ke,attrsComponent:io,metadata:{displayName:"panel.details.stations.suzhouRTInt.displayName",cities:[B.Suzhou],canvas:[Z.RailMap],categories:[q.Metro],tags:[]}},En={top:{lineHeight:6.67,offset:3.5+1.5+5},middle:{lineHeight:0,offset:0},bottom:{lineHeight:12.67,offset:-.17+1+5}},co=s=>{var b;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,nameOffsetX:r=qe.nameOffsetX,nameOffsetY:l=qe.nameOffsetY,color:c=qe.color}=(b=a[k.KunmingRTBasic])!=null?b:qe,h=x.useCallback(O=>m(t,O),[t,m]),u=x.useCallback(O=>i(t,O),[t,i]),p=x.useCallback(O=>d(t,O),[t,d]),g=r==="left"?-13.33:r==="right"?13.33:0,C=(f[ee[l].namesPos].split("\n").length*En[l].lineHeight+En[l].offset)*ee[l].polarity,y=r==="left"?"end":r==="right"?"start":"middle";return x.useMemo(()=>n.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),onPointerDown:h,onPointerMove:u,onPointerUp:p,style:{cursor:"move"},children:[n.jsx("circle",{id:"stn_core_".concat(t),r:"5",stroke:c[2],strokeWidth:"1.33",fill:"white"}),n.jsxs("g",{transform:"translate(".concat(g,", ").concat(C,")"),textAnchor:y,className:"rmp-name-outline",strokeWidth:"2.5",children:[n.jsx(T,{text:f[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),n.jsx(T,{text:f[1].split("\n"),dx:r==="right"?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]}),[t,e,o,...f,r,l,c,h,u,p])},qe={...$,nameOffsetX:"right",nameOffsetY:"top",color:[B.Kunming,"km1","#ea3222",R.white]},mo=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:a}=X(),m=[{type:"textarea",label:a("panel.details.stations.common.nameZh"),value:e.names[0],onChange:i=>{e.names[0]=i,o(t,e)},minW:"full"},{type:"textarea",label:a("panel.details.stations.common.nameEn"),value:e.names[1],onChange:i=>{e.names[1]=i,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:a("panel.details.stations.common.left"),middle:a("panel.details.stations.common.middle"),right:a("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetX=i,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:a("panel.details.stations.common.top"),middle:a("panel.details.stations.common.middle"),bottom:a("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetY=i,o(t,e)},minW:"full"},{type:"custom",label:a("color"),component:n.jsx(Ee,{type:k.KunmingRTBasic,defaultTheme:qe.color})}];return n.jsx(H,{fields:m})},fo=n.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:n.jsx("circle",{r:"5",cx:"12",cy:"12",stroke:"currentColor",strokeWidth:"1.33",fill:"none"})}),ho={component:co,icon:fo,defaultAttrs:qe,attrsComponent:mo,metadata:{displayName:"panel.details.stations.kunmingRTBasic.displayName",cities:[B.Kunming],canvas:[Z.RailMap],categories:[q.Metro],tags:["interchange"]}},[zt,$n]=[15,9],Pn={top:{lineHeight:6.67,offset:3.5+1.5},middle:{lineHeight:0,offset:0},bottom:{lineHeight:12.67,offset:-.17+1}},uo=s=>{var S,j,A,M,_;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,nameOffsetX:r=Le.nameOffsetX,nameOffsetY:l=Le.nameOffsetY,rotate:c=Le.rotate,transfer:h=Le.transfer}=(S=a[k.KunmingRTInt])!=null?S:Le,u=x.useCallback(E=>m(t,E),[t,m]),p=x.useCallback(E=>i(t,E),[t,i]),g=x.useCallback(E=>d(t,E),[t,d]),C=c===0||c===180?zt:c===90||c===270?$n:zt*Math.SQRT1_2,y=c===0||c===180?$n:c===90||c===270?zt:zt*Math.SQRT1_2,b=r==="left"?-6.83:r==="right"?6.83:0,O=(Math.abs(b)+C/2)*Math.sign(b),w=(f[ee[l].namesPos].split("\n").length*Pn[l].lineHeight+Pn[l].offset)*ee[l].polarity,v=(Math.abs(w)+y/2)*Math.sign(w),N=r==="left"?"end":r==="right"?"start":"middle";return n.jsxs("g",{id:t,children:[n.jsx("g",{transform:"translate(".concat(e,", ").concat(o,")rotate(").concat(c,")"),onPointerDown:u,onPointerMove:p,onPointerUp:g,style:{cursor:"move"},children:h.at(0).length<=2?n.jsxs("g",{transform:"translate(-7.5,-4.5)",children:[n.jsx("rect",{id:"stn_core_".concat(t),height:"9",width:"15",ry:"4",stroke:"#393332",strokeWidth:"1",fill:"white"}),n.jsx("path",{fill:(A=(j=h.at(0).at(0))==null?void 0:j.at(2))!=null?A:"#ea3222",fillRule:"evenodd",stroke:"none",d:"M 3.833333 6.375 C 2.820813 6.375 2 5.535532 2 4.5 C 2 3.464468 2.820813 2.625 3.833333 2.625 L 4.444445 2.625 L 4.444445 2 L 6.888889 2.9375 L 4.444445 3.875 L 4.444445 3.25 L 3.833333 3.25 C 3.158321 3.25 2.611111 3.809647 2.611111 4.5 C 2.611111 5.190353 3.158321 5.75 3.833333 5.75 L 7.5 5.75 L 7.5 6.375 L 3.833333 6.375 Z"}),n.jsx("path",{fill:(_=(M=h.at(0).at(1))==null?void 0:M.at(2))!=null?_:"#03619e",fillRule:"evenodd",stroke:"none",d:"M 11.166667 2.625 C 12.179187 2.625 13 3.464468 13 4.5 C 13 5.535532 12.179187 6.375 11.166667 6.375 L 10.555555 6.375 L 10.555555 7 L 8.111111 6.0625 L 10.555555 5.125 L 10.555555 5.75 L 11.166667 5.75 C 11.841679 5.75 12.388889 5.190353 12.388889 4.5 C 12.388889 3.809647 11.841679 3.25 11.166667 3.25 L 7.5 3.25 L 7.5 2.625 L 11.166667 2.625 Z"})]}):n.jsxs("g",{transform:"translate(-8.5,-8.5)",children:[n.jsx("circle",{id:"stn_core_".concat(t),r:"8.5",cx:"8.5",cy:"8.5",stroke:"#000000",strokeWidth:"1",fill:"white"}),n.jsx("path",{fill:h.at(0).at(0).at(2),fillRule:"evenodd",stroke:"none",d:"M 8.900812 14 L 10.286572 11.992442 L 10.63521 12.569632 C 12.188999 11.790696 13.24999 10.23524 13.24999 8.441039 C 13.24999 8.070708 13.203481 7.710487 13.118152 7.365112 L 13.887206 7.365112 C 13.960998 7.712721 14 8.072591 14 8.441039 C 14 10.500518 12.789013 12.288074 11.01168 13.191653 L 11.411587 13.855702 L 8.900812 14 Z"}),n.jsx("path",{fill:h.at(0).at(1).at(2),fillRule:"evenodd",stroke:"none",d:"M 8 13.974609 C 5.462755 13.73554 3.426537 11.698185 3.0625 9.090137 L 2.5 9.090137 L 3.5 7 L 4.5 9.090137 L 4.074219 9.090137 C 4.422903 11.120208 6.015293 12.696354 8 12.925459 L 8 13.974609 Z"}),n.jsx("path",{fill:h.at(0).at(2).at(2),fillRule:"evenodd",stroke:"none",d:"M 12.68764 6.50351 L 10.588492 5.178213 L 11.35608 4.753726 C 10.531951 4.143034 9.498575 3.778666 8.375084 3.778666 C 6.644794 3.778666 5.125485 4.640751 4.260284 5.940329 L 3.718284 5.421978 C 4.730131 3.997121 6.438381 3.061381 8.375084 3.061381 C 9.781034 3.061381 11.063435 3.556896 12.04896 4.372667 L 12.536759 4.102285 L 12.68764 6.50351 Z"})]})}),n.jsxs("g",{transform:"translate(".concat(e+O,", ").concat(o+v,")"),textAnchor:N,className:"rmp-name-outline",strokeWidth:"2.5",children:[n.jsx(T,{text:f[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),n.jsx(T,{text:f[1].split("\n"),dx:r==="right"?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]})},Le={...$,nameOffsetX:"right",nameOffsetY:"top",rotate:0,transfer:[[[B.Kunming,"km1","#ea3222",R.white,"",""],[B.Kunming,"km2","#03619e",R.white,"",""],[B.Kunming,"km3","#a13187",R.white,"",""]]]},po=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:a}=X(),m=[{type:"textarea",label:a("panel.details.stations.common.nameZh"),value:e.names[0],onChange:i=>{e.names[0]=i,o(t,e)},minW:"full"},{type:"textarea",label:a("panel.details.stations.common.nameEn"),value:e.names[1],onChange:i=>{e.names[1]=i,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:a("panel.details.stations.common.left"),middle:a("panel.details.stations.common.middle"),right:a("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetX=i,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:a("panel.details.stations.common.top"),middle:a("panel.details.stations.common.middle"),bottom:a("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetY=i,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.rotate"),value:e.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:i=>{e.rotate=Number(i),o(t,e)},minW:"full"},{type:"custom",label:a("panel.details.stations.interchange.title"),component:n.jsx(Ut,{stationType:k.KunmingRTInt,defaultAttrs:Le,maximumTransfers:[3,0,0]})}];return n.jsx(H,{fields:m})},go=n.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:n.jsxs("g",{transform:"translate(3.5, 3.5)",children:[n.jsx("circle",{r:"8.5",cx:"8.5",cy:"8.5",stroke:"currentColor",strokeWidth:"1",fill:"none"}),n.jsx("path",{fill:"currentColor",fillRule:"evenodd",stroke:"none",d:"M 8.900812 14 L 10.286572 11.992442 L 10.63521 12.569632 C 12.188999 11.790696 13.24999 10.23524 13.24999 8.441039 C 13.24999 8.070708 13.203481 7.710487 13.118152 7.365112 L 13.887206 7.365112 C 13.960998 7.712721 14 8.072591 14 8.441039 C 14 10.500518 12.789013 12.288074 11.01168 13.191653 L 11.411587 13.855702 L 8.900812 14 Z"}),n.jsx("path",{fill:"currentColor",fillRule:"evenodd",stroke:"none",d:"M 8 13.974609 C 5.462755 13.73554 3.426537 11.698185 3.0625 9.090137 L 2.5 9.090137 L 3.5 7 L 4.5 9.090137 L 4.074219 9.090137 C 4.422903 11.120208 6.015293 12.696354 8 12.925459 L 8 13.974609 Z"}),n.jsx("path",{fill:"currentColor",fillRule:"evenodd",stroke:"none",d:"M 12.68764 6.50351 L 10.588492 5.178213 L 11.35608 4.753726 C 10.531951 4.143034 9.498575 3.778666 8.375084 3.778666 C 6.644794 3.778666 5.125485 4.640751 4.260284 5.940329 L 3.718284 5.421978 C 4.730131 3.997121 6.438381 3.061381 8.375084 3.061381 C 9.781034 3.061381 11.063435 3.556896 12.04896 4.372667 L 12.536759 4.102285 L 12.68764 6.50351 Z"})]})}),xo={component:uo,icon:go,defaultAttrs:Le,attrsComponent:po,metadata:{displayName:"panel.details.stations.kunmingRTInt.displayName",cities:[B.Kunming],canvas:[Z.RailMap],categories:[q.Metro],tags:["interchange"]}},Wn=5.2,Wt=8.2628,ln=0,Rn={top:{offset:Wt+ln,polarity:-1},middle:{offset:0,polarity:0},bottom:{offset:Wt+ln,polarity:1}},Co=s=>{var j;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,nameOffsetX:r=Te.nameOffsetX,nameOffsetY:l=Te.nameOffsetY,color:c=Te.color,lineCode:h=Te.lineCode,stationCode:u=Te.stationCode,isTram:p=Te.isTram}=(j=a[k.MRTBasic])!=null?j:Te,g=x.useCallback(A=>m(t,A),[t,m]),C=x.useCallback(A=>i(t,A),[t,i]),y=x.useCallback(A=>d(t,A),[t,d]),b=22.85,O=12.935,w=r==="left"?-1:r==="right"?1:0,v=(b/2+5)*w,N=Rn[l].offset*Rn[l].polarity,S=r==="left"?"end":r==="right"?"start":"middle";return x.useMemo(()=>n.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,") ").concat(p?"scale(0.81)":""),children:[n.jsxs("g",{onPointerDown:g,onPointerMove:C,onPointerUp:y,style:{cursor:"move"},children:[n.jsx("rect",{x:-b/2,y:-O/2,rx:"3",ry:"6",width:b,height:O,fill:c[2],stroke:"white",strokeWidth:"1"}),n.jsx("text",{fontSize:Wn,dx:"-4",dy:"0.5",className:"rmp-name__mrt",fill:c[3],textAnchor:"middle",dominantBaseline:"middle",children:h}),n.jsx("text",{fontSize:Wn,dx:"4",dy:"0.5",className:"rmp-name__mrt",fill:c[3],textAnchor:"middle",dominantBaseline:"middle",children:u}),n.jsx("rect",{id:"stn_core_".concat(t),x:-b/2,y:-O/2,rx:"3",ry:"6",width:b,height:O,fill:"white",opacity:"0"})]}),n.jsx("g",{transform:"translate(".concat(v,", ").concat(N,")"),textAnchor:S,children:n.jsx(T,{text:f[0].split("\n"),fontSize:Wt,lineHeight:Wt,grow:l==="top"?"up":l==="middle"?"bidirectional":"down",baseOffset:ln,className:"rmp-name__mrt"})})]}),[t,e,o,...f,r,l,c,h,u,p,g,C,y])},Te={names:["Marina South Pier"],nameOffsetX:"right",nameOffsetY:"top",lineCode:"NS",stationCode:"28",isTram:!1,color:[B.Singapore,"nsl","#DA291C",R.white]},yo=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:a}=X(),m=[{type:"textarea",label:a("panel.details.stations.common.nameEn"),value:e.names[0],onChange:i=>{e.names[0]=i,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:a("panel.details.stations.common.left"),middle:a("panel.details.stations.common.middle"),right:a("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetX=i,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:a("panel.details.stations.common.top"),middle:a("panel.details.stations.common.middle"),bottom:a("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetY=i,o(t,e)},minW:"full"},{type:"input",label:a("panel.details.stations.common.lineCode"),value:e.lineCode,onChange:i=>{e.lineCode=i,o(t,e)},minW:"full"},{type:"input",label:a("panel.details.stations.common.stationCode"),value:e.stationCode,onChange:i=>{e.stationCode=i,o(t,e)},minW:"full"},{type:"switch",label:a("panel.details.stations.MRTBasic.isTram"),isChecked:e.isTram,onChange:i=>{e.isTram=i,o(t,e)},minW:"full",oneLine:!0},{type:"custom",label:a("color"),component:n.jsx(Ee,{type:k.MRTBasic,defaultTheme:Te.color})}];return n.jsx(H,{fields:m})},bo=n.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[n.jsx("rect",{x:"6",y:"8.6035",rx:"1.575",ry:"3.151",width:"12",height:"6.793",fill:"currentColor"}),n.jsx("text",{fontSize:"3.5",dx:"10",dy:"13",className:"rmp-name__en",fill:"white",textAnchor:"middle",children:"NS"}),n.jsx("text",{fontSize:"3.5",dx:"15",dy:"13",className:"rmp-name__en",fill:"white",textAnchor:"middle",children:"28"})]}),jo={component:Co,icon:bo,defaultAttrs:Te,attrsComponent:yo,metadata:{displayName:"panel.details.stations.MRTBasic.displayName",cities:[B.Singapore],canvas:[Z.RailMap],categories:[q.Metro],tags:[]}},Dn=6.9,Rt=8.2628,Xn=2.5,Yn={top:{offset:Rt+Xn,polarity:-1},middle:{offset:0,polarity:0},bottom:{offset:Rt+Xn,polarity:1}},Oo=s=>{var S;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,nameOffsetX:r=Qe.nameOffsetX,nameOffsetY:l=Qe.nameOffsetY,transfer:c=Qe.transfer}=(S=a[k.MRTInt])!=null?S:Qe,h=x.useCallback(j=>m(t,j),[t,m]),u=x.useCallback(j=>i(t,j),[t,i]),p=x.useCallback(j=>d(t,j),[t,d]),g=c.at(0),C=(g.length-2)*29.625+57.8,y=16.77,b=[];for(let j=1;jn.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[n.jsx("g",{onPointerDown:h,onPointerMove:u,onPointerUp:p,style:{cursor:"move"},children:c.map(j=>({info:j,width:(j.length-2)*29.625+57.8})).map(({info:j,width:A},M)=>n.jsxs(x.Fragment,{children:[n.jsx("rect",{x:-A/2,y:-y/2,rx:"4.5",ry:"8",width:A,height:y,fill:"url(#".concat(t,"_grad_").concat(M,")"),stroke:"white",strokeWidth:"1"}),n.jsx("linearGradient",{id:"".concat(t,"_grad_").concat(M),y1:"0%",y2:"0%",x1:"0%",x2:"100%",children:j.map((_,E)=>n.jsxs(x.Fragment,{children:[n.jsx("stop",{offset:"".concat(100/j.length*E,"%"),stopColor:_[2]}),n.jsx("stop",{offset:"".concat(100/j.length*(E+1),"%"),stopColor:_[2]})]},_[2]))}),b.map(_=>n.jsx("line",{x1:_/j.length*A-A/2,x2:_/j.length*A-A/2,y1:-y/2,y2:y/2,stroke:"white",strokeWidth:"1"},_)),j.map((_,E,I)=>n.jsxs(x.Fragment,{children:[n.jsx("text",{fontSize:Dn,dx:(_[5]!==""?-5:-2)+A/I.length/2*(E*2+1)-A/2+1,dy:"0.5",className:"rmp-name__mrt",fill:_[3],textAnchor:"middle",dominantBaseline:"middle",children:_[4]}),n.jsx("text",{fontSize:Dn,dx:5+A/I.length/2*(E*2+1)-A/2+1,dy:"0.5",className:"rmp-name__mrt",fill:_[3],textAnchor:"middle",dominantBaseline:"middle",children:_[5]})]},_[2])),n.jsx("rect",{id:"stn_core_".concat(t),x:-A/2,y:-y/2,rx:"4.5",ry:"8",width:A,height:y,fill:"white",opacity:"0"})]},j.map(_=>_[2]).join("_")))}),n.jsx("g",{transform:"translate(".concat(w,", ").concat(v,")"),textAnchor:N,children:n.jsx(T,{text:f[0].split("\n"),fontSize:Rt,lineHeight:Rt,grow:l==="top"?"up":l==="middle"?"bidirectional":"down",baseOffset:0,className:"rmp-name__mrt"})})]}),[t,e,o,...f,r,l,JSON.stringify(c),h,u,p])},Qe={names:["Chinatown"],nameOffsetX:"right",nameOffsetY:"top",transfer:[[[B.Singapore,"nel","#9B26B6",R.white,"NE","4"],[B.Singapore,"dtl","#0057B7",R.white,"DT","19"]]]},vo=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:a}=X(),m=[{type:"textarea",label:a("panel.details.stations.common.nameEn"),value:e.names[0],onChange:i=>{e.names[0]=i,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:a("panel.details.stations.common.left"),middle:a("panel.details.stations.common.middle"),right:a("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetX=i,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:a("panel.details.stations.common.top"),middle:a("panel.details.stations.common.middle"),bottom:a("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetY=i,o(t,e)},minW:"full"},{type:"custom",label:a("panel.details.stations.interchange.title"),component:n.jsx(Ut,{stationType:k.MRTInt,defaultAttrs:Qe,maximumTransfers:[1/0,0,0]})}];return n.jsx(H,{fields:m})},wo=n.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[n.jsx("rect",{x:"2",y:"9.0985",rx:"1.038",ry:"2.076",width:"20",height:"5.803",fill:"currentColor"}),n.jsx("text",{fontSize:"3",dx:"5",dy:"13.25",className:"rmp-name__en",fill:"white",textAnchor:"middle",children:"NE"}),n.jsx("text",{fontSize:"3",dx:"9.5",dy:"13.25",className:"rmp-name__en",fill:"white",textAnchor:"middle",children:"4"}),n.jsx("text",{fontSize:"3",dx:"14.5",dy:"13.25",className:"rmp-name__en",fill:"white",textAnchor:"middle",children:"DT"}),n.jsx("text",{fontSize:"3",dx:"19",dy:"13.25",className:"rmp-name__en",fill:"white",textAnchor:"middle",children:"19"})]}),_o={component:Oo,icon:wo,defaultAttrs:Qe,attrsComponent:vo,metadata:{displayName:"panel.details.stations.MRTInt.displayName",cities:[B.Singapore],canvas:[Z.RailMap],categories:[q.Metro],tags:[]}},J={ja:{size:10,baseOffset:1},en:{size:5,baseOffset:1.5}},re=5,So=s=>{var ot;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,nameOffsetX:r=Ae.nameOffsetX,nameOffsetY:l=Ae.nameOffsetY,rotate:c=Ae.rotate,textOneLine:h=Ae.textOneLine,textVertical:u=Ae.textVertical,important:p=Ae.important,lines:g=Ae.lines}=(ot=a[k.JREastBasic])!=null?ot:Ae,C=x.useCallback(le=>m(t,le),[t,m]),y=x.useCallback(le=>i(t,le),[t,i]),b=x.useCallback(le=>d(t,le),[t,d]),O=(Math.max(...g)-Math.min(...g)+1)*re,w=(Math.min(...g)-.5)*re,v=Math.abs(Math.cos(c*Math.PI/180))*re*Math.min(...g)-re/2-1,N=Math.abs(Math.cos(c*Math.PI/180))*re*Math.max(...g)+re/2+1,S=Math.abs(Math.sin(c*Math.PI/180))*re*Math.min(...g)-re/2,j=Math.abs(Math.sin(c*Math.PI/180))*re*Math.max(...g)+re/2,A=r==="left"?v:r==="right"?N:0,M=f[0].split("\n").length*(l==="middle"?0:J.ja.size),_=(l==="middle"?0:l==="top"?2:1)+J.ja.baseOffset,E=(M+_)*ee[l].polarity+(l==="middle"?0:l==="top"?S:j),I=r==="left"?"end":r==="right"?"start":"middle",V={ja:l==="top"?"down":l==="bottom"?"up":"bidirectional",en:l==="top"||h?"up":"down"},G={ja:J.ja.baseOffset,en:(l==="middle"?h?-f[0].split("\n").length*J.ja.size/2-1:f[0].split("\n").length*J.ja.size/2:0)+(p&&!h?2:0)+J.en.baseOffset},Q=x.useRef(null),[Y,ce]=x.useState({width:0});x.useEffect(()=>ce(Q.current.getBBox()),[f[0],u,ce,Q]);const ne=(u?.2:.7)*J.ja.size,ae={left:-ne/2,middle:0,right:ne/2}[r],P={top:-2,middle:0,bottom:2}[l],L=c%90!==0&&r!=="middle"?(r==="left"?v:N)*Math.SQRT2:0,z=(p&&r!=="middle"?ae:0)+L,D={0:0,45:-1,90:0,135:1,180:0,225:-1,270:0,315:1}[c],he=D*J.ja.size,ue=h?(Math.abs(z)+Y.width+1+(p?ne:0))*(r==="left"?-1:1):c%90!==0&&r!=="middle"?f[0].split("\n").length/2*D*J.ja.size+(r==="left"?-1:1)*J.ja.size:0,Ve=(p?2:0)*ee[l].polarity,we=Y.width,Me=Y.height,bt={left:-(we+ne)+L,middle:-(we+ne)/2,right:L}[r],jt={top:-2-G.ja,middle:-Me/2,bottom:-Me+3+G.ja}[l],Ot={top:-Me+3-G.ja,middle:0,bottom:-3+G.ja}[l],at=(l==="top"?S-J.en.baseOffset:j+J.en.baseOffset)+((p?ne:0)+(c%90!==0?J.ja.size/2:0))*ee[l].polarity,st={ja:l==="top"?"end":"start",en:l==="top"?"start":"end"},Ge={0:0,45:-1,90:0,135:1,180:0,225:-1,270:0,315:1}[c],vt=Ge*J.ja.size,wt=f[0].split("\n").length*J.ja.size/2+J.en.baseOffset,_t=(p?1:0)*ee[l].polarity*-1,St=(f[0].split("\n").length-0)/2*(l==="top"?-1:1)*Ge*J.ja.size+(p?2:0)*ee[l].polarity*-1;return n.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[n.jsx("g",{transform:"rotate(".concat(c,")"),children:g.map((le,kt)=>n.jsx("circle",{cx:re*le,cy:"0",r:"1.5",stroke:"black",strokeWidth:"0.2",fill:"white"},"stn_core_".concat(t,"_").concat(kt)))}),u?n.jsxs(n.Fragment,{children:[n.jsxs("g",{transform:"translate(0, ".concat(at,")"),textAnchor:st.ja,children:[p&&n.jsx("rect",{x:-(we-8)/2,y:Ot,width:we-8,height:Me,rx:(we-8)/2,fill:"black"}),n.jsx(yt,{ref:Q,text:f[0].split("\n"),fontSize:J.ja.size,lineWidth:J.ja.size,grow:"bidirectional",baseOffset:0,baseDY:vt,y:p?2.75*ee[l].polarity:0,className:"rmp-name__jreast_ja",fill:p?"white":"black"})]}),n.jsx("g",{transform:"translate(".concat(_t,", ").concat(at+St,")rotate(270)"),textAnchor:st.en,children:n.jsx(T,{text:f[1].split("\n"),fontSize:J.en.size,lineHeight:J.en.size,grow:l==="top"?"down":"up",baseOffset:wt,funcDX:le=>le*re*Math.SQRT1_2*Ge*(l==="top"?-1:1),className:"rmp-name__jreast_en"})})]}):n.jsxs("g",{transform:"translate(".concat(A,", ").concat(E,")"),textAnchor:I,children:[p&&n.jsx("rect",{x:bt,y:jt+1.75,width:Y.width+ne,height:Me-3.5,ry:(Me-3.5)/2,fill:"black"}),n.jsx(T,{ref:Q,x:z,y:p&&l!=="middle"?P:0,text:f[0].split("\n"),fontSize:J.ja.size,lineHeight:J.ja.size,grow:V.ja,baseOffset:G.ja,funcDX:le=>(le-(f[0].split("\n").length-1)/2)*he,className:"rmp-name__jreast_ja",fill:p?"white":"black"}),n.jsx(T,{text:f[1].split("\n"),x:ue,y:Ve,fontSize:J.en.size,lineHeight:J.en.size,grow:V.en,baseOffset:G.en,funcDX:le=>le*re*Math.SQRT1_2*D,className:"rmp-name__jreast_en"})]}),n.jsx("g",{transform:"rotate(".concat(c,")"),children:n.jsx("rect",{id:"stn_core_".concat(t),fill:"url(#opaque)",fillOpacity:"50%",x:w,y:-re/2,rx:re/2,width:O,height:re,onPointerDown:C,onPointerMove:y,onPointerUp:b,style:{cursor:"move"}})})]})},Ae={names:["新宿","Shinjuku"],nameOffsetX:"right",nameOffsetY:"middle",rotate:0,textOneLine:!1,textVertical:!1,important:!1,lines:[-1,0,1]},ko=s=>{var r;const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:a}=X(),m=[{type:"textarea",label:a("panel.details.stations.common.nameJa"),value:e.names[0],onChange:l=>{e.names[0]=l.toString(),e.names[0].length>1&&(e.textOneLine=!1,e.important=!1),o(t,e)},minW:"full"},{type:"textarea",label:a("panel.details.stations.common.nameEn"),value:e.names[1],onChange:l=>{e.names[1]=l.toString(),e.names[1].length>1&&(e.textOneLine=!1,e.important=!1),o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.jrEastBasic.nameOffset"),value:e.nameOffsetX!=="middle"?e.nameOffsetX:e.nameOffsetY,options:{left:a("panel.details.stations.common.left"),right:a("panel.details.stations.common.right"),top:a("panel.details.stations.common.top"),bottom:a("panel.details.stations.common.bottom")},onChange:l=>{l==="left"||l==="right"?(e.nameOffsetX=l,e.nameOffsetY="middle",e.textVertical=!1):(e.nameOffsetX="middle",e.nameOffsetY=l,e.textOneLine=!1),o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.rotate"),value:e.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:l=>{e.rotate=Number(l),o(t,e)},minW:"full"},{type:"switch",label:a("panel.details.stations.jrEastBasic.textOneLine"),isChecked:e.textOneLine,isDisabled:e.nameOffsetY!=="middle"||e.names.some(l=>l.split("\n").length>1),onChange:l=>{e.textOneLine=l,o(t,e)},oneLine:!0,minW:"full"},{type:"switch",label:a("panel.details.stations.jrEastBasic.textVertical"),isChecked:e.textVertical,isDisabled:e.nameOffsetX!=="middle",onChange:l=>{e.textVertical=l,o(t,e)},oneLine:!0,minW:"full"},{type:"switch",label:a("panel.details.stations.jrEastBasic.important"),isChecked:(r=e.important)!=null?r:!1,isDisabled:e.names.some(l=>l.split("\n").length>1),onChange:l=>{e.important=l,o(t,e)},oneLine:!0,minW:"full"}],i=l=>{const c=l==="-"?-1:Number(l);Number.isNaN(c)||(e.lines.push(c),o(t,e))},d=(l,c)=>{if((l===""||l==="-")&&e.lines.length>1)e.lines.splice(c,1);else{const h=Number(l);if(Number.isNaN(h))return;e.lines[c]=h}o(t,e)},f=l=>{l.key==="Backspace"&&e.lines.length>1&&(e.lines.pop(),o(t,e))};return n.jsxs(n.Fragment,{children:[n.jsx(H,{fields:m}),n.jsx(ge,{label:a("panel.details.stations.jrEastBasic.lines"),children:n.jsxs($t,{flexWrap:"wrap",flexDirection:"row",pt:"1",children:[e.lines.map((l,c)=>n.jsx(Cn,{width:"80px",inputMode:"numeric",mr:"2",mb:"2",value:l,onChange:h=>d(h,c),children:n.jsx(yn,{})},c)),n.jsx(Cn,{width:"80px",inputMode:"numeric",mr:"2",mb:"2",value:"",onChange:l=>i(l),onKeyDown:l=>f(l),children:n.jsx(yn,{})})]})})]})},No=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("circle",{cx:"6",cy:"12",r:"2",stroke:"currentColor",strokeWidth:"0.5",fill:"none"}),n.jsx("circle",{cx:"12",cy:"12",r:"2",stroke:"currentColor",strokeWidth:"0.5",fill:"none"}),n.jsx("circle",{cx:"18",cy:"12",r:"2",stroke:"currentColor",strokeWidth:"0.5",fill:"none"})]}),Mo={component:So,icon:No,defaultAttrs:Ae,attrsComponent:ko,metadata:{displayName:"panel.details.stations.jrEastBasic.displayName",cities:[B.Tokyo],canvas:[Z.RailMap],categories:[q.NationalRail],tags:[]}},Re={ja:{size:10,baseOffset:1},en:{size:5,baseOffset:1.5}},Ln=1,Ao=s=>{var I;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,nameOffsetX:r=Xe.nameOffsetX,nameOffsetY:l=Xe.nameOffsetY,textVertical:c=Xe.textVertical,mostImportant:h=Xe.mostImportant,minLength:u=Xe.minLength}=(I=a[k.JREastImportant])!=null?I:Xe,p=x.useCallback(V=>m(t,V),[t,m]),g=x.useCallback(V=>i(t,V),[t,i]),C=x.useCallback(V=>d(t,V),[t,d]),y=x.useRef(null),[b,O]=x.useState({height:0,width:0});x.useEffect(()=>O(y.current.getBBox()),[f[0],c,O,y]);const w=Math.max(b.width,b.height),v=(c?.1:.7)*Re.ja.size,N=Math.max(w+v,u),S=c?Re.ja.size+Ln:N,j=c?N-5:Re.ja.size+Ln,A={left:-S/2-1,middle:0,right:S/2+1}[r],M={top:-j/2-1,middle:0,bottom:j/2+1}[l],_={left:"end",middle:"middle",right:"start"}[r],E=h?1.5:1;return n.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[n.jsxs("g",{transform:"scale(".concat(E,")"),children:[n.jsx("rect",{fill:"black",x:-S/2,y:-j/2,rx:c?void 0:j/2,ry:c?S/2:void 0,width:S,height:j}),c?n.jsx("text",{ref:y,className:"rmp-name__jreast_ja",textAnchor:"middle",writingMode:"vertical-rl",fontSize:Re.ja.size,fill:"white",dominantBaseline:"central",children:f[0]}):n.jsx("text",{ref:y,y:"-1",className:"rmp-name__jreast_ja",textAnchor:"middle",fontSize:Re.ja.size,fill:"white",dominantBaseline:"central",children:f[0]}),n.jsx("rect",{id:"stn_core_".concat(t),fill:"black",fillOpacity:"0",x:-S/2,y:-j/2,rx:c?void 0:S/2,ry:c?j/2:void 0,width:S,height:j,onPointerDown:p,onPointerMove:g,onPointerUp:C,style:{cursor:"move"}})]}),n.jsx("g",{transform:"translate(".concat(A*E,", ").concat(M*E,")"),textAnchor:_,children:n.jsx(T,{text:f[1].split("\n"),fontSize:Re.en.size,lineHeight:Re.en.size,grow:l==="top"?"up":l==="middle"?"bidirectional":"down",baseOffset:0,className:"rmp-name__jreast_en"})})]})},Xe={names:["東京","Tōkyō"],nameOffsetX:"left",nameOffsetY:"middle",textVertical:!1,mostImportant:!1,minLength:0},zo=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:a}=X(),m=[{type:"input",label:a("panel.details.stations.common.nameJa"),value:e.names[0],onChange:i=>{e.names[0]=i.toString(),o(t,e)},minW:"full"},{type:"textarea",label:a("panel.details.stations.common.nameEn"),value:e.names[1],onChange:i=>{e.names[1]=i.toString(),o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:a("panel.details.stations.common.left"),middle:a("panel.details.stations.common.middle"),right:a("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetX=i,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:a("panel.details.stations.common.top"),middle:a("panel.details.stations.common.middle"),bottom:a("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetY=i,o(t,e)},minW:"full"},{type:"switch",label:a("panel.details.stations.jrEastImportant.textVertical"),isChecked:e.textVertical,onChange:i=>{e.textVertical=i,o(t,e)},oneLine:!0,minW:"full"},{type:"switch",label:a("panel.details.stations.jrEastImportant.mostImportant"),isChecked:e.mostImportant,onChange:i=>{e.mostImportant=i,o(t,e)},oneLine:!0,minW:"full"},{type:"input",label:a("panel.details.stations.jrEastImportant.minLength"),value:e.minLength.toString(),onChange:i=>{Number.isNaN(i)?e.minLength=0:e.minLength=Number(i),o(t,e)},minW:"full"}];return n.jsx(H,{fields:m})},Bo=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{x:"3",y:"7.5",rx:"4.5",width:"18",height:"9",stroke:"currentColor",fill:"currentColor"}),n.jsx("text",{x:"12",y:"12",textAnchor:"middle",dominantBaseline:"middle",fontSize:"6",fill:"white",children:"東京"}),n.jsx("text",{x:"12",y:"20.25",textAnchor:"middle",dominantBaseline:"middle",fontSize:"3",children:"Tōkyō"})]}),To={component:Ao,icon:Bo,defaultAttrs:Xe,attrsComponent:zo,metadata:{displayName:"panel.details.stations.jrEastImportant.displayName",cities:[B.Tokyo],canvas:[Z.RailMap],categories:[q.NationalRail],tags:[]}},Io=s=>{var ae,P,L;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,nameOffsetX:r=be.nameOffsetX,nameOffsetY:l=be.nameOffsetY,color:c=be.color,lineCode:h=be.lineCode,stationCode:u=be.stationCode,open:p=be.open,secondaryNames:g=be.secondaryNames,tram:C=be.tram}=(ae=a[k.FoshanMetroBasic])!=null?ae:be,y=x.useCallback(z=>m(t,z),[t,m]),b=x.useCallback(z=>i(t,z),[t,i]),O=x.useCallback(z=>d(t,z),[t,d]),w=x.useRef(null);(L=(P=w.current)==null?void 0:P.querySelector("path"))==null||L.setAttribute("id","stn_core_".concat(t));const v={en:C?5.08:6.56,zh:C?7.29:13.13},N={top:{namesPos:1,lineHeight:v.en,polarity:-1},middle:{namesPos:0,lineHeight:0,polarity:0},bottom:{namesPos:0,lineHeight:v.zh,polarity:1}},S=C?11:15,j=r==="left"?-S:r==="right"?S:0,A=C?8:10,M=(f[N[l].namesPos].split("\n").length*N[l].lineHeight+A)*N[l].polarity,_=r==="left"?"end":r==="right"?"start":!p&&r==="middle"&&g.join("")===""?"end":"middle",E=x.useRef(null),[I,V]=x.useState(0);x.useEffect(()=>{var z,D;return V((D=(z=E.current)==null?void 0:z.getBBox().width)!=null?D:0)},[...g]);const G=x.useRef(null),[Q,Y]=x.useState(0);x.useEffect(()=>{var z,D;return Y((D=(z=G.current)==null?void 0:z.getBBox().width)!=null?D:0)},[...f]);const ce=r==="middle"?Q/2+(I+12*2)/2:(Q+(I+12*2)/2)*(r==="left"?-1:1),ne=r==="middle"&&g.join("")!==""?Q/2+(I+12*2):(Q+I+(I!==0?12*2:0))*(r==="left"?-1:r==="right"?1:0);return n.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[n.jsx("g",{transform:"scale(".concat(.57915*(C?.729:1),")"),onPointerDown:y,onPointerMove:b,onPointerUp:O,style:{cursor:"move"},ref:w,children:n.jsx(Ft,{id:"stn_core_".concat(t),strokeColour:c[2],lineNum:h===""?void 0:h,stnNum:u===""?void 0:u,textClassName:"rmp-name__zh"})}),n.jsxs("g",{ref:G,transform:"translate(".concat(j,", ").concat(M,")"),textAnchor:_,children:[n.jsx(T,{text:f[0].split("\n"),fontSize:v.zh,lineHeight:v.zh,grow:"up",className:"rmp-name__zh"}),n.jsx(T,{text:f[1].split("\n"),fontSize:v.en,lineHeight:v.en,grow:"down",className:"rmp-name__en"})]}),g.join("")!==""&&n.jsxs("g",{transform:"translate(".concat(j+ce,", ").concat(M,")"),textAnchor:"middle",children:[n.jsx("text",{fontSize:"13.13",dx:-(I+5)/2,textAnchor:"end",dominantBaseline:"middle",className:"rmp-name__zh",children:"("}),n.jsx("text",{fontSize:"13.13",dx:(I+5)/2,textAnchor:"start",dominantBaseline:"middle",className:"rmp-name__zh",children:")"}),n.jsxs("g",{ref:E,children:[n.jsx("text",{fontSize:"10",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:g[0]}),n.jsx("text",{fontSize:"5.42",dy:"2",dominantBaseline:"hanging",className:"rmp-name__en",children:g[1]})]})]}),!p&&n.jsxs("g",{transform:"translate(".concat(j+ne,", ").concat(M,")"),textAnchor:r==="middle"?"start":_,children:[n.jsx("text",{fontSize:"6.04",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:"(未开通)"}),n.jsx("text",{fontSize:"3.6",dy:"4",dominantBaseline:"hanging",className:"rmp-name__en",children:"(Under Construction)"})]})]})},be={...$,nameOffsetX:"right",nameOffsetY:"top",color:[B.Foshan,"fs1","#C4D600",R.black],lineCode:"GF",stationCode:"01",open:!0,secondaryNames:["",""],tram:!1},Eo=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:a}=X(),m=[{type:"textarea",label:a("panel.details.stations.common.nameZh"),value:e.names[0],onChange:i=>{e.names[0]=i,o(t,e)},minW:"full"},{type:"textarea",label:a("panel.details.stations.common.nameEn"),value:e.names[1],onChange:i=>{e.names[1]=i,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:a("panel.details.stations.common.left"),middle:a("panel.details.stations.common.middle"),right:a("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetX=i,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:a("panel.details.stations.common.top"),middle:a("panel.details.stations.common.middle"),bottom:a("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetY=i,o(t,e)},minW:"full"},{type:"custom",label:a("color"),component:n.jsx(Ee,{type:k.FoshanMetroBasic,defaultTheme:be.color})},{type:"input",label:a("panel.details.stations.common.lineCode"),value:e.lineCode,onChange:i=>{e.lineCode=i,o(t,e)},minW:"full"},{type:"input",label:a("panel.details.stations.common.stationCode"),value:e.stationCode,onChange:i=>{e.stationCode=i,o(t,e)},minW:"full"},{type:"switch",label:a("panel.details.stations.foshanMetroBasic.open"),oneLine:!0,isChecked:e.open,onChange:i=>{e.open=i,o(t,e)},minW:"full"},{type:"input",label:a("panel.details.stations.foshanMetroBasic.secondaryNameZh"),value:e.secondaryNames[0],onChange:i=>{e.secondaryNames[0]=i,o(t,e)},minW:"full"},{type:"input",label:a("panel.details.stations.foshanMetroBasic.secondaryNameEn"),value:e.secondaryNames[1],onChange:i=>{e.secondaryNames[1]=i,o(t,e)},minW:"full"},{type:"switch",label:a("panel.details.stations.foshanMetroBasic.tram"),oneLine:!0,isChecked:e.tram,onChange:i=>{e.tram=i,o(t,e)},minW:"full"}];return n.jsx(H,{fields:m})},$o=n.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:n.jsx("g",{transform:"translate(12,12)scale(0.45)",children:n.jsx(Ft,{strokeColour:"#000",lineNum:"1",stnNum:"01"})})}),Po={component:Io,icon:$o,defaultAttrs:be,attrsComponent:Eo,metadata:{displayName:"panel.details.stations.foshanMetroBasic.displayName",cities:[B.Foshan],canvas:[Z.RailMap],categories:[q.Metro],tags:[]}},$e={top:3.75,middle:0,bottom:8},Wo=s=>{var v;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,color:r=Oe.color,nameOffsetX:l=Oe.nameOffsetX,nameOffsetY:c=Oe.nameOffsetY,isInt:h=Oe.isInt}=(v=a[k.QingdaoMetroStation])!=null?v:Oe,u=x.useCallback(N=>m(t,N),[t,m]),p=x.useCallback(N=>i(t,N),[t,i]),g=x.useCallback(N=>d(t,N),[t,d]),C=(N,S)=>{const j=N==="left"?-6:N==="right"?6:0;return S==="top"?[j,-f[1].split("\n").length*$e[S]-5.5]:S==="bottom"?[j,f[0].split("\n").length*$e[S]+4]:[j,2]},y=(N,S)=>N==="left"&&S==="top"?[-6,-f[1].split("\n").length*$e[S]-6]:N==="middle"&&S==="top"?[0,-f[1].split("\n").length*$e[S]-10]:N==="right"&&S==="top"?[6,-f[1].split("\n").length*$e[S]-6]:N==="left"&&S==="bottom"?[-6,f[0].split("\n").length*$e[S]+6]:N==="middle"&&S==="bottom"?[0,f[0].split("\n").length*$e[S]+7]:N==="right"&&S==="bottom"?[6,f[0].split("\n").length*$e[S]+6]:N==="left"&&S==="middle"?[-8,2]:N==="right"&&S==="middle"?[8,2]:[0,0],[b,O]=h?y(l,c):C(l,c),w=l==="left"?"end":l==="right"?"start":"middle";return n.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[n.jsx("circle",{id:"stn_core_".concat(t),r:h?6:2.7,stroke:h?"black":r[2],strokeWidth:h?1.5:.2,fill:"white",onPointerDown:u,onPointerMove:p,onPointerUp:g,style:{cursor:"move"}}),n.jsxs("g",{transform:"translate(".concat(b,", ").concat(O,")"),textAnchor:w,children:[n.jsx(T,{text:f[0].split("\n"),fontSize:8,lineHeight:8,grow:"up",baseOffset:1,className:"rmp-name__zh"}),n.jsx(T,{text:f[1].split("\n"),fontSize:3.75,lineHeight:3.75,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]})},Oe={...$,color:[B.Qingdao,"qd1","#f7b000",R.white],nameOffsetX:"right",nameOffsetY:"top",isInt:!1},Ro=s=>{var i,d,f,r;const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:a}=X(),m=[{type:"textarea",label:a("panel.details.stations.common.nameZh"),value:(i=e.names[0])!=null?i:Oe.names[0],onChange:l=>{e.names[0]=l.toString(),o(t,e)},minW:"full"},{type:"textarea",label:a("panel.details.stations.common.nameEn"),value:(d=e.names[1])!=null?d:Oe.names[1],onChange:l=>{e.names[1]=l.toString(),o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetX"),value:(f=e.nameOffsetX)!=null?f:Oe.nameOffsetX,options:{left:a("panel.details.stations.common.left"),middle:a("panel.details.stations.common.middle"),right:a("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:l=>{e.nameOffsetX=l,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetY"),value:(r=e.nameOffsetY)!=null?r:Oe.nameOffsetY,options:{top:a("panel.details.stations.common.top"),middle:a("panel.details.stations.common.middle"),bottom:a("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:l=>{e.nameOffsetY=l,o(t,e)},minW:"full"},{type:"custom",label:a("color"),component:n.jsx(Ee,{type:k.QingdaoMetroStation,defaultTheme:Oe.color}),minW:"full"},{type:"switch",label:a("panel.details.stations.qingdaoMetro.isInt"),isChecked:e.isInt,oneLine:!0,onChange:l=>{e.isInt=l,o(t,e)},minW:"full"}];return n.jsx(H,{fields:m})},Do=n.jsx("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:n.jsx("circle",{cx:"12",cy:"12",r:"3",stroke:"currentColor",strokeWidth:"0.6",fill:"none"})}),Xo={component:Wo,icon:Do,defaultAttrs:Oe,attrsComponent:Ro,metadata:{displayName:"panel.details.stations.qingdaoMetro.displayName",cities:[B.Qingdao],canvas:[Z.RailMap],categories:[q.Metro],tags:[]}},rn=s=>{const{lineCode:t,stationCode:e,color:o,stroke:a}=s,[m,i,d]=[10,15,.8];return n.jsxs(n.Fragment,{children:[a&&n.jsx("rect",{x:-m/2-d,y:-i/2-d,width:m+2*d,height:i+2*d,rx:2.5,strokeWidth:d,stroke:"white",fill:"white"}),n.jsx("rect",{x:-m/2,y:-i/2,width:m,height:i,rx:2,strokeWidth:1.5,stroke:o[2],fill:"white"}),n.jsx("text",{x:0,y:t.length===1?-.75:-1.5,textAnchor:"middle",className:"rmp-name__tokyo_en",fontSize:t.length===1?7:4.5,fill:"black",children:t}),n.jsx("text",{x:e.length===1?0:-.4/e.length,y:5.5,textAnchor:"middle",className:"rmp-name__en",fontSize:7,fontWeight:"bold",letterSpacing:"-0.4",fill:"black",children:e})]})},Yo=s=>{var A;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,nameOffsetX:r=Ie.nameOffsetX,nameOffsetY:l=Ie.nameOffsetY,textVertical:c=Ie.textVertical,lineCode:h=Ie.lineCode,stationCode:u=Ie.stationCode,color:p=Ie.color}=(A=a[k.TokyoMetroBasic])!=null?A:Ie,g=x.useCallback(M=>m(t,M),[t,m]),C=x.useCallback(M=>i(t,M),[t,i]),y=x.useCallback(M=>d(t,M),[t,d]),[b,O]=x.useState(0);x.useEffect(()=>{let M=0;f[0].split("\n").forEach(_=>{M=Math.max(M,_.length)}),O(M)},[f[0]]);const w=r==="left"?-7:r==="right"?7:0,v=r==="left"?-12:r==="right"?12:0,N=l==="bottom"?20:l==="top"?-9:5.5,S=l==="bottom"?9+b*5:l==="top"?-9-b*5:-5,j=r==="left"?"end":r==="right"?"start":"middle";return n.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[n.jsx(rn,{lineCode:h,stationCode:u,color:p}),n.jsx("rect",{id:"stn_core_".concat(t),x:-5.8,y:-8.2,width:11.6,height:16.4,rx:2.5,opacity:0,onPointerDown:g,onPointerMove:C,onPointerUp:y,style:{cursor:"move"}}),n.jsx("g",{textAnchor:j,className:"rmp-name-outline",strokeWidth:"1",children:c?n.jsx("g",{transform:"translate(".concat(v,", ").concat(S,")"),textAnchor:j,children:n.jsx(yt,{text:f[0].split("\n"),fontSize:10,lineWidth:10,grow:"bidirectional",baseOffset:0,baseDY:0,className:"rmp-name__jreast_ja",fill:"black"})}):n.jsx("g",{transform:"translate(".concat(w,", ").concat(N,")"),textAnchor:j,children:n.jsx(T,{text:f[0].split("\n"),fontSize:10,lineHeight:10,grow:"up",funcDX:M=>(M-(f[0].split("\n").length-1)/2)*10,className:"rmp-name__jreast_ja",fill:"black"})})})]})},Ie={names:["京橋"],nameOffsetX:"right",nameOffsetY:"middle",textVertical:!1,lineCode:"G",stationCode:"10",color:[B.Tokyo,"g","#f9a328",R.white]},Lo=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:a}=X(),m=[{type:"textarea",label:a("panel.details.stations.common.nameJa"),value:e.names[0],onChange:i=>{e.names[0]=i.toString(),o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.tokyoMetroBasic.nameOffset"),value:e.nameOffsetX!=="middle"?e.nameOffsetX:e.nameOffsetY,options:{left:a("panel.details.stations.common.left"),right:a("panel.details.stations.common.right"),top:a("panel.details.stations.common.top"),bottom:a("panel.details.stations.common.bottom")},onChange:i=>{i==="left"||i==="right"?(e.nameOffsetX=i,e.nameOffsetY="middle",e.textVertical=!1):(e.nameOffsetX="middle",e.nameOffsetY=i),o(t,e)},minW:"full"},{type:"switch",label:a("panel.details.stations.tokyoMetroBasic.textVertical"),isChecked:e.textVertical,isDisabled:e.nameOffsetX!=="middle",onChange:i=>{e.textVertical=i,o(t,e)},oneLine:!0,minW:"full"},{type:"input",label:a("panel.details.stations.common.lineCode"),value:e.lineCode,onChange:i=>{e.lineCode=i,o(t,e)},minW:"full"},{type:"input",label:a("panel.details.stations.common.stationCode"),value:e.stationCode,onChange:i=>{e.stationCode=i,o(t,e)},minW:"full"},{type:"custom",label:a("color"),component:n.jsx(Ee,{type:k.TokyoMetroBasic,defaultTheme:Ie.color}),minW:"full"}];return n.jsx(H,{fields:m})},Ho=n.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[n.jsx("rect",{x:"6.5",y:"4.5",rx:"1.5",width:"10",height:"15",stroke:"currentColor",fill:"none"}),n.jsx("text",{x:"9",y:"11",fontSize:"7",fill:"currentColor",children:"G"}),n.jsx("text",{x:"7.75",y:"18",fontSize:"7",letterSpacing:"-0.8",fill:"currentColor",children:"10"})]}),Fo={component:Yo,icon:Ho,defaultAttrs:Ie,attrsComponent:Lo,metadata:{displayName:"panel.details.stations.tokyoMetroBasic.displayName",cities:[B.Tokyo],canvas:[Z.RailMap],categories:[q.Metro],tags:[]}},Uo=s=>{var ae;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,nameOffsetX:r=ze.nameOffsetX,nameOffsetY:l=ze.nameOffsetY,textVertical:c=ze.textVertical,interchanges:h=ze.interchanges,align:u=ze.align,importance:p=ze.importance,mereOffset:g=ze.mereOffset}=(ae=a[k.TokyoMetroInt])!=null?ae:ze,C=x.useCallback(P=>m(t,P),[t,m]),y=x.useCallback(P=>i(t,P),[t,i]),b=x.useCallback(P=>d(t,P),[t,d]),[O,w]=x.useState(0);x.useEffect(()=>{let P=0;f[0].split("\n").forEach(L=>{P=Math.max(P,L.length)}),w(P)},[f[0]]);const v=13,N=18,S=u==="horizontal"?h.length*v:0,j=u==="vertical"?h.length*N:0,_=r==="left"?-(u==="horizontal"?4:10)-S/2:r==="right"?(u==="horizontal"?2:9)+S/2:g==="left2"?-5:g==="right2"?5:0,E=()=>{const P=u==="vertical"?1:10,L=u==="vertical"?3:12,z=u==="vertical"?1:13,D=u==="vertical"?3:12,he=g==="left1"?-4:g==="left2"?-10:g==="right1"?4:g==="right2"?10:0,ue=g==="up"?3:g==="down"?10:0;return{fontSize:10,textXVer:(r==="left"?-12:r==="right"?12:-2)+he,textY:l==="bottom"?P+j/2:l==="top"?-L-j/2:-7.5+ue,textYVer:l==="bottom"?D+j/2+O*5:l==="top"?-z-j/2-O*5:-5}},I=()=>{const P=u==="vertical"?1:10,L=u==="vertical"?3:13,z=u==="vertical"?4:13,D=u==="vertical"?3:13,he=g==="left1"?-8:g==="left2"?-13:g==="right1"?8:g==="right2"?13:0,ue=g==="up"?4:g==="down"?12:0;return{fontSize:15,textXVer:(r==="left"?-12:r==="right"?12:-2)+he,textY:l==="bottom"?P+j/2:l==="top"?-L-j/2:-10+ue,textYVer:l==="bottom"?D+j/2+O*7.5:l==="top"?-z-j/2-O*7.5:-5}},V=()=>{const P=u==="vertical"?1:13,L=u==="vertical"?3:10,z=u==="vertical"?5:13,D=u==="vertical"?4:13,he=g==="left1"?-10:g==="left2"?-16:g==="right1"?10:g==="right2"?16:0,ue=g==="up"?6:g==="down"?15:0;return{fontSize:20,textXVer:(r==="left"?-12:r==="right"?12:-2)+he,textY:l==="bottom"?L+j/2:l==="top"?-P-j/2:-13+ue,textYVer:l==="bottom"?D+j/2+O*10:l==="top"?-z-j/2-O*10:-5}},{fontSize:G,textXVer:Q,textY:Y,textYVer:ce}=p==="default"?E():p==="high"?V():I(),ne=r==="left"||g==="left1"||g==="left2"?"end":r==="right"||g==="right1"||g==="right2"?"start":"middle";return n.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[u==="horizontal"?n.jsxs(n.Fragment,{children:[n.jsx("rect",{x:-(S+3)/2,y:-10.5,width:S+3,height:21,rx:3,fill:"#808285",stroke:"black",strokeWidth:"0.5"}),h.map((P,L)=>n.jsx("g",{transform:"translate(".concat(L*v-(S-v)/2,", 0)"),children:n.jsx(rn,{lineCode:P.lineCode,stationCode:P.stationCode,color:P.color,stroke:!0})},L)),n.jsx("rect",{id:"stn_core_".concat(t),x:-(S+3)/2,y:-10.5,width:S+3,height:21,rx:3,opacity:0,onPointerDown:C,onPointerMove:y,onPointerUp:b,style:{cursor:"move"}})]}):n.jsxs(n.Fragment,{children:[n.jsx("rect",{x:-8,y:-(j+3)/2,width:16,height:j+3,rx:3,fill:"#808285",stroke:"black",strokeWidth:"0.5"}),h.map((P,L)=>n.jsx("g",{transform:"translate(0, ".concat(L*N-(j-N)/2,")"),children:n.jsx(rn,{lineCode:P.lineCode,stationCode:P.stationCode,color:P.color,stroke:!0})},L)),n.jsx("rect",{id:"stn_core_".concat(t),x:-8,y:-(j+3)/2,width:16,height:j+3,rx:3,opacity:0,onPointerDown:C,onPointerMove:y,onPointerUp:b,style:{cursor:"move"}})]}),n.jsx("g",{textAnchor:ne,className:"rmp-name-outline",strokeWidth:"1",children:c?n.jsx("g",{transform:"translate(".concat(Q,", ").concat(ce,")"),textAnchor:"middle",children:n.jsx(yt,{text:f[0].split("\n"),fontSize:G,lineWidth:G,grow:"bidirectional",className:"rmp-name__jreast_ja",fill:"black",fontWeight:p!=="default"?"bold":"normal"})}):n.jsx("g",{transform:"translate(".concat(_,", ").concat(Y,")"),textAnchor:ne,children:n.jsx(T,{text:f[0].split("\n"),fontSize:G,lineHeight:G,grow:l==="top"||g==="up"?"up":"down",className:"rmp-name__jreast_ja",fill:"black",fontWeight:p!=="default"?"bold":"normal"})})})]})},ze={names:["日本橋"],nameOffsetX:"right",nameOffsetY:"middle",mereOffset:"none",textVertical:!1,interchanges:[{lineCode:"G",stationCode:"11",color:[B.Tokyo,"g","#f9a328",R.white]},{lineCode:"T",stationCode:"10",color:[B.Tokyo,"t","#00a4db",R.white]},{lineCode:"A",stationCode:"13",color:[B.Tokyo,"a","#dd4231",R.white]}],align:"horizontal",importance:"default"},Hn={lineCode:"",stationCode:"",color:[B.Tokyo,"","#AAAAAA",R.white]},Vo=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,a=tt(),{paletteAppClip:{output:m}}=nt(p=>p.runtime),{t:i}=X(),d=[{type:"textarea",label:i("panel.details.stations.common.nameJa"),value:e.names[0],onChange:p=>{e.names[0]=p.toString(),o(t,e)},minW:"full"},{type:"select",label:i("panel.details.stations.tokyoMetroBasic.nameOffset"),value:e.nameOffsetX!=="middle"?e.nameOffsetX:e.nameOffsetY,options:{left:i("panel.details.stations.common.left"),right:i("panel.details.stations.common.right"),top:i("panel.details.stations.common.top"),bottom:i("panel.details.stations.common.bottom")},onChange:p=>{p==="left"||p==="right"?(e.nameOffsetX=p,e.nameOffsetY="middle",e.textVertical=!1,(e.mereOffset==="left1"||e.mereOffset==="left2"||e.mereOffset==="right1"||e.mereOffset==="right2")&&(e.mereOffset="none")):(e.nameOffsetX="middle",e.nameOffsetY=p,(e.mereOffset==="up"||e.mereOffset==="down")&&(e.mereOffset="none")),o(t,e)},minW:"full"},{type:"select",label:i("panel.details.stations.tokyoMetroInt.mereOffset.displayName"),value:e.mereOffset,options:{none:i("panel.details.stations.tokyoMetroInt.mereOffset.none"),...e.nameOffsetX==="middle"?{left1:i("panel.details.stations.tokyoMetroInt.mereOffset.left1"),left2:i("panel.details.stations.tokyoMetroInt.mereOffset.left2"),right1:i("panel.details.stations.tokyoMetroInt.mereOffset.right1"),right2:i("panel.details.stations.tokyoMetroInt.mereOffset.right2")}:{up:i("panel.details.stations.tokyoMetroInt.mereOffset.up"),down:i("panel.details.stations.tokyoMetroInt.mereOffset.down")}},onChange:p=>{e.mereOffset=p,o(t,e)},minW:"full"},{type:"switch",label:i("panel.details.stations.tokyoMetroBasic.textVertical"),isChecked:e.textVertical,isDisabled:e.nameOffsetX!=="middle",onChange:p=>{e.textVertical=p,o(t,e)},oneLine:!0,minW:"full"},{type:"select",label:i("panel.details.stations.tokyoMetroInt.importance.displayName"),value:e.importance,options:{default:i("panel.details.stations.tokyoMetroInt.importance.default"),middle:i("panel.details.stations.tokyoMetroInt.importance.middle"),high:i("panel.details.stations.tokyoMetroInt.importance.high")},onChange:p=>{e.importance=p,o(t,e)},minW:"full"},{type:"select",label:i("panel.details.stations.tokyoMetroInt.align.displayName"),value:e.align,options:{horizontal:i("panel.details.stations.tokyoMetroInt.align.horizontal"),vertical:i("panel.details.stations.tokyoMetroInt.align.vertical")},onChange:p=>{e.align=p,o(t,e)},minW:"full"}],[f,r]=x.useState(void 0);x.useEffect(()=>{f!==void 0&&m&&(e.interchanges[f].color=m,o(t,e),r(void 0))},[m==null?void 0:m.toString()]);const l=p=>{const g=structuredClone(e.interchanges);g.push(Hn);for(let C=g.length-1;C>p;C--)g[C]=structuredClone(g[C-1]);g[p]=Hn,o(t,{...e,interchanges:g})},c=p=>{const g=e.interchanges.filter((C,y)=>y!==p);o(t,{...e,interchanges:g})},h=(p,g)=>{e.interchanges[g].lineCode=p,o(t,e)},u=(p,g)=>{e.interchanges[g].stationCode=p,o(t,e)};return n.jsxs(n.Fragment,{children:[n.jsx(H,{fields:d}),n.jsx(ge,{label:i("panel.details.stations.interchange.title"),children:n.jsxs(Ue,{align:"flex-start",children:[e.interchanges.map((p,g)=>n.jsxs(Fe,{children:[n.jsx(Dt,{theme:p.color,onClick:()=>{r(g),a(Xt(p.color))}}),n.jsx(ge,{label:i("panel.details.stations.common.lineCode"),children:n.jsx(xn,{defaultValue:p.lineCode,onDebouncedChange:C=>h(C,g)})}),n.jsx(ge,{label:i("panel.details.stations.common.stationCode"),children:n.jsx(xn,{defaultValue:p.stationCode,onDebouncedChange:C=>u(C,g)})}),n.jsx(ve,{size:"sm",variant:"ghost","aria-label":i("panel.details.stations.interchange.add"),icon:n.jsx(Pe,{}),onClick:()=>l(g)}),n.jsx(ve,{size:"sm",variant:"ghost","aria-label":i("panel.details.stations.interchange.add"),icon:n.jsx(Ct,{}),onClick:()=>c(g),isDisabled:e.interchanges.length===1})]},g)),n.jsx(pe,{size:"sm",width:"100%",variant:"outline",leftIcon:n.jsx(Pe,{}),onClick:()=>l(e.interchanges.length),children:i("panel.details.stations.interchange.title")})]})})]})},Go=n.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[n.jsx("rect",{x:"4",y:"8",rx:"1",width:"6.5",height:"10",stroke:"currentColor",fill:"none"}),n.jsx("rect",{x:"12.5",y:"8",rx:"1",width:"6.5",height:"10",stroke:"currentColor",fill:"none"}),n.jsx("text",{x:"5.5",y:"12.5",fontSize:"4",fill:"currentColor",children:"G"}),n.jsx("text",{x:"5",y:"16.25",fontSize:"4",letterSpacing:"-0.8",fill:"currentColor",children:"16"}),n.jsx("text",{x:"14.25",y:"12.5",fontSize:"4",fill:"currentColor",children:"H"}),n.jsx("text",{x:"13.75",y:"16.25",fontSize:"4",letterSpacing:"-0.8",fill:"currentColor",children:"18"})]}),Zo={component:Uo,icon:Go,defaultAttrs:ze,attrsComponent:Vo,metadata:{displayName:"panel.details.stations.tokyoMetroInt.displayName",cities:[B.Tokyo],canvas:[Z.RailMap],categories:[q.Metro],tags:[]}},W=5,da=2*W,qo=.85*da,lt={0:{textDx:0,textDy:-(W/2+W*1.33),textAnchor:"middle",dominantBaseline:"auto",polarity:-1,grow:"up"},45:{textDx:(W/2+W*1.33)*Math.SQRT1_2,textDy:-(W/2+W*1.33)*Math.SQRT1_2,textAnchor:"start",dominantBaseline:"auto",polarity:-1,grow:"up"},90:{textDx:W/2+W*1.33,textDy:0,textAnchor:"start",dominantBaseline:"middle",polarity:0,grow:"bidirectional"},135:{textDx:(W/2+W*1.33)*Math.SQRT1_2,textDy:(W/2+W*1.33)*Math.SQRT1_2,textAnchor:"start",dominantBaseline:"hanging",polarity:1,grow:"down"},180:{textDx:0,textDy:W/2+W*1.33,textAnchor:"middle",dominantBaseline:"hanging",polarity:1,grow:"down"},225:{textDx:-(W/2+W*1.33)*Math.SQRT1_2,textDy:(W/2+W*1.33)*Math.SQRT1_2,textAnchor:"end",dominantBaseline:"hanging",polarity:1,grow:"down"},270:{textDx:-(W/2+W*1.33),textDy:0,textAnchor:"end",dominantBaseline:"middle",polarity:0,grow:"bidirectional"},315:{textDx:-(W/2+W*1.33)*Math.SQRT1_2,textDy:-(W/2+W*1.33)*Math.SQRT1_2,textAnchor:"end",dominantBaseline:"auto",polarity:-1,grow:"up"}},pn=[B.London,"central","#DC241F",R.white,0],fa=x.memo(s=>{const{id:t,stepFreeAccess:e,...o}=s;return n.jsxs("g",{...o,children:[n.jsx("path",{fill:e==="train"?"#1C3E93":"white",stroke:"#1C3E93",strokeWidth:.5*W,d:"M0-31c17.1,0,31,13.9,31,31S17.1,31,0,31S-31,17.1-31,0S-17.1-31,0-31"}),n.jsx("path",{fill:e==="train"?"white":"#1C3E93",d:"M-10.5,9c1.4,4.9,6,8.4,11.3,8.4c6.5,0,11.8-5.3,11.8-11.8c0-3.4-1.5-6.5-3.8-8.7l0.7-5.1\n c4.6,2.9,7.6,8,7.6,13.8c0,9-7.3,16.3-16.3,16.3c-5.9,0-11-3.1-13.9-7.7L-10.5,9z"}),n.jsx("path",{fill:s.stepFreeAccess==="train"?"white":"#1C3E93",d:"M0.5-20.5c0,2.5,2,4.6,4.6,4.6c2.5,0,4.6-2.1,4.6-4.6s-2.1-4.6-4.6-4.6S0.5-23,0.5-20.5"}),n.jsx("path",{fill:e==="train"?"white":"#1C3E93",d:"M3-12.4L2.5-9.2h-9.9c0,0-2.1,0.2-2.1,2.2s2.1,2.2,2.1,2.2h9.3l-0.5,3h-12.5c0,0-0.9,0-1.3,0.5\n C-12.8-1-13.2,0-13.2,0l-7,14.2c0,0-0.8,1.8,1.2,2.9c2,1.1,3.3-1,3.3-1l5.5-11.3c0,0,0.5-0.7,1-1c0.6-0.3,1.1-0.3,1.1-0.3H3.4\n c0,0,1.2,0,2.2-0.9c0.9-0.9,1.1-2,1.1-2l1.7-12.4c0,0,0-2.6-2.7-2.7C3.6-14.5,3-12.4,3-12.4"}),n.jsx("path",{id:"stn_core_".concat(t),fill:e==="train"?"#1C3E93":"white",fillOpacity:"0",stroke:"#1C3E93",strokeWidth:.5*W,strokeOpacity:"0",d:"M0-31c17.1,0,31,13.9,31,31S17.1,31,0,31S-31,17.1-31,0S-17.1-31,0-31"})]})},(s,t)=>JSON.stringify(s)===JSON.stringify(t)),Qo=s=>{var S;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,transfer:r=He.transfer,rotate:l=He.rotate,terminal:c=He.terminal,stepFreeAccess:h=He.stepFreeAccess}=(S=a[k.LondonTubeBasic])!=null?S:He,u=x.useCallback(j=>m(t,j),[t,m]),p=x.useCallback(j=>i(t,j),[t,i]),g=x.useCallback(j=>d(t,j),[t,d]),C=(l-90)*Math.PI/180,y=(c?2:1)*(.66*W+W/2),b=lt[l].textDx+Math.cos(C)*Math.max(...r[0].map(j=>j[4]))*W,O=lt[l].textDy+Math.sin(C)*Math.max(...r[0].map(j=>j[4]))*W,w=-((Math.max(...r[0].map(j=>j[4]))+Math.min(...r[0].map(j=>j[4])))/2)*W,v=Math.sin(l*Math.PI/180)*w,N=Math.cos(l*Math.PI/180)*w;return n.jsxs("g",{id:t,children:[n.jsx("g",{transform:"translate(".concat(e,", ").concat(o,")rotate(").concat(l,")"),onPointerDown:u,onPointerMove:p,onPointerUp:g,style:{cursor:"move"},children:h==="none"?r[0].map(j=>n.jsx("rect",{id:"stn_core_".concat(t),x:-W*.66/2,y:-W*.66-W/2-W*j[4],width:W*.66,height:y,stroke:"none",fill:j[2]},"".concat(t,"_").concat(j[2],"_").concat(j[4]))):n.jsx(fa,{id:t,stepFreeAccess:h,transform:"translate(".concat(v,",").concat(N,")rotate(").concat(-l,")scale(0.2333)")},"stn_core_".concat(t))}),n.jsx("g",{transform:"translate(".concat(e+b,", ").concat(o+O,")"),textAnchor:lt[l].textAnchor,fill:"#003888",children:n.jsx(T,{text:f[0].split("\n"),fontSize:da,lineHeight:qo,dominantBaseline:lt[l].dominantBaseline,grow:lt[l].grow,baseOffset:0,className:"rmp-name__tube"})})]})},He={names:["Station"],transfer:[[pn]],rotate:0,terminal:!1,stepFreeAccess:"none"},Jo=s=>{var l;const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:a}=X(),m=[{type:"textarea",label:a("panel.details.stations.common.nameEn"),value:e.names[0],onChange:c=>{e.names[0]=c.toString(),o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.rotate"),value:e.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:c=>{e.rotate=Number(c),o(t,e)},minW:"full"},{type:"switch",label:a("panel.details.stations.londonTubeBasic.terminal"),isChecked:e.terminal,isDisabled:e.transfer[0].length>1,onChange:c=>{e.terminal=c,o(t,e)},oneLine:!0,minW:"full"},{type:"select",label:a("panel.details.stations.londonTubeCommon.stepFreeAccess"),value:e.stepFreeAccess,options:{none:a("panel.details.stations.londonTubeCommon.stepFreeAccessNone"),train:a("panel.details.stations.londonTubeCommon.stepFreeAccessTrain"),platform:a("panel.details.stations.londonTubeCommon.stepFreeAccessPlatform")},onChange:c=>{e.stepFreeAccess=c,o(t,e)},minW:"full"}],i=(l=e.transfer)!=null?l:He.transfer,d=c=>h=>{const u=structuredClone(i);if(u.length<=c)for(let p=u.length;p<=c;p++)u[p]=[pn];u[c].push(h),e.transfer=u,o(t,e)},f=c=>h=>{if(i.length>c&&i[c].length>h){const u=i.map((p,g)=>g===c?p.filter((C,y)=>y!==h):p);e.transfer=u,o(t,e)}},r=c=>(h,u)=>{if(i.length>c&&i[c].length>h){const p=i.map((g,C)=>C===c?g.map((y,b)=>b===h?[0,1,2,3,4,5,6].map(O=>u[O]===void 0?y[O]:u[O]):y):g);e.transfer=p,o(t,e)}};return n.jsxs(n.Fragment,{children:[n.jsx(H,{fields:m}),n.jsx(ge,{label:a("panel.details.stations.interchange.title"),children:n.jsxs(Ue,{align:"flex-start",children:[n.jsx(Yt,{size:"xs",children:a("panel.details.stations.londonTubeBasic.shareTracks")}),n.jsx(ti,{interchangeList:i[0],onAdd:d(0),onDelete:f(0),onUpdate:r(0)})]})})]})},Ko=n.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:n.jsx("rect",{x:"6",y:"9",width:"12",height:"6",stroke:"currentColor",fill:"currentColor"})}),ei={component:Qo,icon:Ko,defaultAttrs:He,attrsComponent:Jo,metadata:{displayName:"panel.details.stations.londonTubeBasic.displayName",cities:[B.London],canvas:[Z.RailMap],categories:[q.Metro],tags:[]}};function ti(s){const{interchangeList:t,onAdd:e,onDelete:o,onUpdate:a}=s,m=tt(),{paletteAppClip:{output:i}}=nt(l=>l.runtime),{t:d}=X(),[f,r]=x.useState();return x.useEffect(()=>{f!==void 0&&i&&(a==null||a(f,[...i,t[f][4]]),r(void 0))},[i==null?void 0:i.toString()]),n.jsxs(cn,{direction:"column",children:[t.length===0&&n.jsxs(Fe,{spacing:.5,"data-testid":"interchange-card-stack",children:[n.jsx(fn,{as:"i",flex:1,align:"center",fontSize:"md",colorScheme:"gray",children:d("panel.details.stations.interchange.noTrackShare")}),n.jsx(ve,{size:"sm",variant:"ghost","aria-label":d("panel.details.stations.interchange.add"),onClick:()=>e==null?void 0:e(pn),icon:n.jsx(Pe,{})})]}),t.map((l,c)=>n.jsxs(Fe,{spacing:.5,"data-testid":"interchange-card-stack-".concat(c),children:[n.jsx(ge,{label:d("color"),minW:"40px",noLabel:c!==0,children:n.jsx(Dt,{theme:[l[0],l[1],l[2],l[3]],onClick:()=>{r(c),m(Xt([l[0],l[1],l[2],l[3]]))}})}),n.jsx(ge,{label:d("panel.details.stations.londonTubeBasic.shareTracksIndex"),children:n.jsx(xa,{defaultValue:l[4],min:-5,max:5,step:1,onThrottledChange:h=>a==null?void 0:a(c,[l[0],l[1],l[2],l[3],h])})}),n.jsxs(Ue,{children:[e&&c===t.length-1?n.jsx(ve,{size:"sm",variant:"ghost","aria-label":d("panel.details.stations.interchange.copy"),onClick:()=>{const h=structuredClone(t.slice(-1)[0]);h[4]=Math.max(...t.map(u=>u[4]))+1,e==null||e(h)},icon:n.jsx(mn,{})}):n.jsx(hn,{minW:8}),o&&c!==0&&n.jsx(ve,{size:"sm",variant:"ghost","aria-label":d("panel.details.stations.interchange.remove"),onClick:()=>o==null?void 0:o(c),icon:n.jsx(Ct,{})})]})]},c))]})}const fe=5,ha=2*fe,ni=.85*ha,ai=s=>{var w;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,nameOffsetX:r=dt.nameOffsetX,nameOffsetY:l=dt.nameOffsetY,stepFreeAccess:c=dt.stepFreeAccess}=(w=a[k.LondonTubeInt])!=null?w:dt,h=x.useCallback(v=>m(t,v),[t,m]),u=x.useCallback(v=>i(t,v),[t,i]),p=x.useCallback(v=>d(t,v),[t,d]),g=.66*fe+fe/2,C=r==="left"?-(fe/2+fe*1.33):r==="right"?fe/2+fe*1.33:0,y=l==="top"?-(fe/2+fe*1.33):l==="bottom"?fe/2+fe*1.33:0,b=r==="left"?"end":r==="right"?"start":"middle",O=l==="top"?"auto":l==="bottom"?"hanging":"middle";return n.jsxs("g",{id:t,children:[n.jsx("g",{transform:"translate(".concat(e,", ").concat(o,")"),onPointerDown:h,onPointerMove:u,onPointerUp:p,style:{cursor:"move"},children:c==="none"?n.jsx("circle",{id:"stn_core_".concat(t),r:1.25*fe,width:fe*.66,height:g,stroke:"black",strokeWidth:.5*fe,fill:"white"}):n.jsx(fa,{id:t,stepFreeAccess:c,transform:"scale(0.2333)"})}),n.jsx("g",{transform:"translate(".concat(e+C,", ").concat(o+y,")"),textAnchor:b,fill:"#003888",children:n.jsx(T,{text:f[0].split("\n"),fontSize:ha,lineHeight:ni,dominantBaseline:O,grow:l==="top"?"up":l==="bottom"?"down":"bidirectional",baseOffset:1,className:"rmp-name__tube"})})]})},dt={names:["Station"],nameOffsetX:"right",nameOffsetY:"top",stepFreeAccess:"none"},si=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:a}=X(),m=[{type:"textarea",label:a("panel.details.stations.common.nameEn"),value:e.names[0],onChange:i=>{e.names[0]=i.toString(),o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:a("panel.details.stations.common.left"),middle:a("panel.details.stations.common.middle"),right:a("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetX=i,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:a("panel.details.stations.common.top"),middle:a("panel.details.stations.common.middle"),bottom:a("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetY=i,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.londonTubeCommon.stepFreeAccess"),value:e.stepFreeAccess,options:{none:a("panel.details.stations.londonTubeCommon.stepFreeAccessNone"),train:a("panel.details.stations.londonTubeCommon.stepFreeAccessTrain"),platform:a("panel.details.stations.londonTubeCommon.stepFreeAccessPlatform")},onChange:i=>{e.stepFreeAccess=i,o(t,e)},minW:"full"}];return n.jsx(H,{fields:m})},oi=n.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:n.jsx("circle",{cx:"12",cy:"12",r:"6",stroke:"currentColor",fill:"white"})}),ii={component:ai,icon:oi,defaultAttrs:dt,attrsComponent:si,metadata:{displayName:"panel.details.stations.londonTubeInt.displayName",cities:[B.London],canvas:[Z.RailMap],categories:[q.Metro],tags:[]}},li=s=>{var b;const{id:t,x:e,y:o,attrs:a,handlePointerDown:m,handlePointerMove:i,handlePointerUp:d}=s,{names:f=$.names,nameOffsetX:r=ft.nameOffsetX,nameOffsetY:l=ft.nameOffsetY,interchange:c=ft.interchange}=(b=a[k.GuangdongIntercityRailway])!=null?b:ft,h=x.useCallback(O=>m(t,O),[t,m]),u=x.useCallback(O=>i(t,O),[t,i]),p=x.useCallback(O=>d(t,O),[t,d]),g=r==="left"?-13.33:r==="right"?13.33:0,C=(f[ee[l].namesPos].split("\n").length*Je[l].lineHeight+Je[l].offset)*ee[l].polarity,y=r==="left"?"end":r==="right"?"start":"middle";return x.useMemo(()=>n.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[n.jsx("circle",{r:5,stroke:"#2559a8",strokeWidth:"1.5",fill:"white"}),c&&n.jsx("circle",{r:2.5,stroke:"#2559a8",strokeWidth:"1",fill:"white"}),n.jsx("circle",{id:"stn_core_".concat(t),r:5+1.33/2,fill:"white",fillOpacity:"0",onPointerDown:h,onPointerMove:u,onPointerUp:p,style:{cursor:"move"}}),n.jsxs("g",{transform:"translate(".concat(g,", ").concat(C,")"),textAnchor:y,className:"rmp-name-outline",strokeWidth:"1",children:[n.jsx(T,{text:f[0].split("\n"),fontSize:13.13,lineHeight:13.13,grow:"up",baseOffset:1,className:"rmp-name__zh"}),n.jsx(T,{text:f[1].split("\n"),dx:r==="right"?1.67:0,fontSize:5.83,lineHeight:5.83,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]}),[t,e,o,...f,r,l,c,h,u,p])},ft={...$,nameOffsetX:"right",nameOffsetY:"top",interchange:!1},ri=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:a}=X(),m=[{type:"textarea",label:a("panel.details.stations.common.nameZh"),value:e.names[0],onChange:i=>{e.names[0]=i.toString(),o(t,e)},minW:"full"},{type:"textarea",label:a("panel.details.stations.common.nameEn"),value:e.names[1],onChange:i=>{e.names[1]=i.toString(),o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:a("panel.details.stations.common.left"),middle:a("panel.details.stations.common.middle"),right:a("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetX=i,o(t,e)},minW:"full"},{type:"select",label:a("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:a("panel.details.stations.common.top"),middle:a("panel.details.stations.common.middle"),bottom:a("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetY=i,o(t,e)},minW:"full"},{type:"switch",label:a("panel.details.stations.interchange.title"),oneLine:!0,isChecked:e.interchange,onChange:i=>{e.interchange=i,o(t,e)},minW:"full"}];return n.jsx(H,{fields:m})},ci=n.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[n.jsx("circle",{cx:"12",cy:"12",r:"8",stroke:"currentColor",strokeWidth:"2.25",fill:"white"}),n.jsx("circle",{cx:"12",cy:"12",r:"4",stroke:"currentColor",strokeWidth:"1.5",fill:"white"})]}),mi={component:li,icon:ci,defaultAttrs:ft,attrsComponent:ri,metadata:{displayName:"panel.details.stations.guangdongIntercityRailway.displayName",cities:[B.Shanghai],canvas:[Z.RailMap],categories:[q.Metro],tags:[]}},Mi={[k.ShmetroBasic]:Va,[k.ShmetroBasic2020]:Qa,[k.ShmetroInt]:ts,[k.ShmetroOutOfSystemInt]:os,[k.ShanghaiSuburbanRailway]:cs,[k.GzmtrBasic]:Ns,[k.GzmtrInt]:Bs,[k.GzmtrInt2024]:$s,[k.BjsubwayBasic]:Xs,[k.BjsubwayInt]:Us,[k.MTR]:eo,[k.SuzhouRTBasic]:so,[k.SuzhouRTInt]:ro,[k.KunmingRTBasic]:ho,[k.KunmingRTInt]:xo,[k.MRTBasic]:jo,[k.MRTInt]:_o,[k.JREastBasic]:Mo,[k.JREastImportant]:To,[k.FoshanMetroBasic]:Po,[k.QingdaoMetroStation]:Xo,[k.TokyoMetroBasic]:Fo,[k.TokyoMetroInt]:Zo,[k.LondonTubeBasic]:ei,[k.LondonTubeInt]:ii,[k.GuangdongIntercityRailway]:mi},di="RMP_MASTER_CHANNEL",fi="MASTER_POST",Fn=new BroadcastChannel(di),rt={id:"null",value:"",param:null,bg:"#000000",fg:R.white},hi={h:"80%",w:"80%","& iframe":{h:"100%",w:"100%"},"& div":{h:"100%",w:"100%"}},ui=s=>{const{isOpen:t,onClose:e,onSubmit:o}=s,{t:a}=X(),m=x.useRef(window.graph),i=Sa(),[d,f]=x.useState([]),[r,l]=x.useState(rt),[c,h]=x.useState(""),[u,p]=x.useState(!1),[g,C]=x.useState(!1);x.useEffect(()=>{t&&(h(""),l(rt),p(!1),f(na(m.current).filter(_=>_.randomId).map(_=>{var E,I,V;return{id:_.randomId,value:(E=_.label)!=null?E:_.randomId,param:_,bg:(I=_.labelColorBg)!=null?I:rt.bg,fg:(V=_.labelColorFg)!=null?V:rt.fg}})))},[t]);const y=_=>{var E,I,V,G,Q;try{const Y=(E=r.param)!=null?E:JSON.parse(_),ce=Y.id?Y.id:Y.randomId,ne=(I=Y.labelColorBg)!=null?I:ba(),ae={randomId:ce,label:(V=Y.label)!=null?V:ce,labelColorBg:ne,labelColorFg:ja(ne),nodeType:(G=Y.nodeType)!=null?G:Y.type,transform:(Q=Y.transform)!=null?Q:Oa,svgs:Y.svgs,components:Y.components,color:Y.color,core:Y.core,version:Y.version};if(!ae.version||ae.version<2){i({title:"Outdated configuration!",status:"error",duration:9e3,isClosable:!0});return}o(ae)}catch(Y){C(!0);return}e()},b=x.useRef(t),[O,w]=x.useState("DESIGNER"),[v,N]=x.useState(!1);x.useEffect(()=>{b.current=t},[t]),x.useEffect(()=>{const _=E=>{const{event:I,data:V}=E.data;I===fi&&b.current&&(N(!1),y(V))};return Fn.addEventListener("message",_),()=>{Fn.removeEventListener("message",_)}},[]);const S=async()=>{w("DESIGNER"),N(!0)},j=()=>{w("GALLERY"),N(!0)},A=_=>{C(!1),h(_.target.value),l(rt)},M=_=>{l(_),p(!1),h("")};return n.jsxs(n.Fragment,{children:[n.jsxs(Vn,{isOpen:t,onClose:e,size:"sm",scrollBehavior:"inside",children:[n.jsx(Gn,{}),n.jsxs(Zn,{children:[n.jsx(qn,{children:a("header.settings.procedures.masterManager.importTitle")}),n.jsx(Qn,{}),n.jsxs(Jn,{children:[n.jsx(ge,{label:a("header.settings.procedures.masterManager.importFrom"),children:n.jsx(Ca,{data:d,displayHandler:_=>n.jsx(qt,{name:_.value,fg:_.fg,bg:_.bg,title:_.value,sx:{display:"inline-block",overflow:"hidden",textOverflow:"ellipsis"}}),filter:(_,E)=>E.id.toLowerCase().includes(_.toLowerCase())||Object.values(E.id).some(I=>I.toLowerCase().includes(_.toLowerCase())),value:r.value,onChange:M})}),n.jsxs(ge,{label:a("header.settings.procedures.masterManager.importOther"),children:[n.jsxs($t,{direction:"row",width:"100%",children:[n.jsx(pe,{m:1,width:"100%",onClick:S,children:a("RMP Designer")}),n.jsx(pe,{m:1,width:"100%",onClick:j,children:a("RMP Gallery")})]}),n.jsx(pe,{m:1,onClick:()=>p(!0),children:a("header.settings.procedures.masterManager.importParam")}),n.jsx(ka,{width:"100%",placeholder:"qwq",fontSize:"sm",fontFamily:"monospace",hidden:!u,onChange:A,isInvalid:g})]})]}),n.jsxs(Kn,{children:[n.jsx(pe,{colorScheme:"blue",variant:"outline",mr:"1",onClick:e,children:a("cancel")}),n.jsx(pe,{colorScheme:"blue",variant:"solid",mr:"1",onClick:()=>y(c),isDisabled:r.id==="null"&&c==="",children:a("apply")})]})]})]}),n.jsx(pi,{isOpen:v,onClose:()=>N(!1),source:O})]})},pi=s=>{const{isOpen:t,onClose:e,source:o}=s,a=o==="DESIGNER"?"/rmp-designer/#/export":"/rmp-gallery/?tabId=2&master=true";return n.jsxs(ya,{isOpen:t,onClose:e,size:"full",sx:hi,children:[n.jsx("iframe",{src:a,loading:"lazy"}),n.jsx(Na,{onClick:e,position:"fixed",top:"5px",right:"15px"})]})},Ai=s=>{const{isOpen:t,onClose:e}=s,{t:o}=X(),{refresh:{nodes:a}}=nt(C=>C.runtime),m=x.useRef(window.graph),i=tt(),[d,f]=x.useState([]);x.useEffect(()=>{t&&f(na(m.current))},[t,a]);const[r,l]=x.useState(void 0),c=C=>{m.current.filterNodes(y=>m.current.getNodeAttribute(y,"type")===K.Master&&m.current.getNodeAttributes(y)[K.Master].randomId===r).forEach(y=>{const b=structuredClone(C),O=m.current.getNodeAttributes(y),w=structuredClone(O[K.Master]),v=N=>{w.components.forEach(S=>{var j;if(S.id===N)return(j=S.value)!=null?j:S.defaultValue})};b.components.forEach((N,S)=>{var j;b.components[S].value=(j=v(N.id))!=null?j:N.defaultValue}),b.color!==void 0&&(b.color.value=w.color?b.color.value:b.color.defaultValue),m.current.mergeNodeAttributes(y,{[K.Master]:b})}),i(ht()),i(ut(m.current.export()))},h=C=>{const y={id:C.randomId,type:C.nodeType,label:C.label,svgs:C.svgs,components:C.components,color:C.color,core:C.core,transform:C.transform,version:C.version};y.components.forEach((b,O)=>{y.components[O].value=b.defaultValue}),Ra("RMP_Master_Node_".concat(new Date().valueOf(),".json"),"application/json",JSON.stringify(y))},u=C=>{m.current.filterNodes(y=>m.current.getNodeAttribute(y,"type")===K.Master&&m.current.getNodeAttributes(y)[K.Master].randomId===C).forEach(y=>{m.current.dropNode(y)}),i(ht()),i(ut(m.current.export()))},p=(C,y)=>{m.current.filterNodes(b=>m.current.getNodeAttribute(b,"type")===K.Master&&m.current.getNodeAttributes(b)[K.Master].randomId===C.randomId).forEach(b=>{m.current.mergeNodeAttributes(b,{[K.Master]:{...C,label:y}})}),i(ht()),i(ut(m.current.export()))},g=d.map(C=>{var b,O,w,v,N;const y=[{label:o("header.settings.procedures.masterManager.id"),type:"custom",component:n.jsx(qt,{name:(b=C.randomId)!=null?b:"undefined",fg:(O=C.labelColorFg)!=null?O:R.white,bg:(w=C.labelColorBg)!=null?w:"#000000"})},{label:o("header.settings.procedures.masterManager.label"),type:"input",value:(v=C.label)!=null?v:o("panel.details.nodes.master.undefined"),onChange:S=>p(C,S),hidden:!C.randomId},{label:o("header.settings.procedures.masterManager.label"),type:"output",value:(N=C.label)!=null?N:o("panel.details.nodes.master.undefined"),hidden:!!C.randomId},{label:o("header.settings.procedures.masterManager.type"),type:"custom",component:n.jsx(qt,{name:o("header.settings.procedures.masterManager.types.".concat(C.nodeType)),fg:R.white,bg:C.nodeType==="MiscNode"?"#FF8651":"#51BC00"})}];return n.jsxs($t,{width:"100%",direction:"row",children:[n.jsx(H,{fields:y,minW:"120px"}),n.jsxs($t,{direction:"row",mr:"auto",children:[n.jsx(pe,{onClick:()=>l(C.randomId),children:n.jsx(va,{})}),n.jsx(pe,{onClick:()=>h(C),isDisabled:!C.randomId,children:n.jsx(wa,{})}),n.jsx(pe,{onClick:()=>u(C.randomId),children:n.jsx(Ct,{})})]})]})});return n.jsxs(Vn,{isOpen:t,onClose:e,size:"xl",scrollBehavior:"inside",children:[n.jsx(Gn,{}),n.jsxs(Zn,{children:[n.jsx(qn,{children:o("header.settings.procedures.masterManager.title")}),n.jsx(Qn,{}),n.jsxs(Jn,{width:"100%",children:[...g,n.jsx(ui,{isOpen:!!r,onClose:()=>l(void 0),onSubmit:c})]}),n.jsx(Kn,{children:n.jsx(pe,{colorScheme:"blue",variant:"outline",mr:"1",onClick:e,children:o("close")})})]})]})};export{Bt as F,Ni as L,Ai as M,Da as a,vi as b,Oi as c,Ra as d,wi as e,Pa as f,T as g,se as h,bi as i,ki as j,ui as k,Ba as l,_i as m,yi as n,Mi as s,ji as t,Si as u}; diff --git a/assets/master-manager-legacy-BrdnNHXw.js b/assets/master-manager-legacy-CCeMINwh.js similarity index 99% rename from assets/master-manager-legacy-BrdnNHXw.js rename to assets/master-manager-legacy-CCeMINwh.js index 6f350050d..cf1027901 100644 --- a/assets/master-manager-legacy-BrdnNHXw.js +++ b/assets/master-manager-legacy-CCeMINwh.js @@ -1 +1 @@ -System.register(["./react-legacy-CB7hQk4J.js","./index-legacy-iSkJTZGA.js","./chakra-legacy--ElhKRU8.js"],(function(e,t){"use strict";var n,a,s,l,o,i,r,d,m,c,h,f,p,u,g,x,C,y,b,v,j,w,O,_,k,S,N,z,M,A,P,B,$,W,E,X,Y,R,T,L,D,I,H,U,F,V,G,Z,Q,q,J,K,ee,te,ne,ae,se,le,oe,ie;return{setters:[e=>{n=e.b,a=e.u,s=e.r},e=>{l=e.i,o=e.S,i=e.aw,r=e.r,d=e.C,m=e.M,c=e.aN,h=e.L,f=e.e,p=e.aP,u=e.aQ,g=e.aR,x=e.aS,C=e.c,y=e.d,b=e.aT,v=e.aU,j=e.P,w=e.V,O=e.W,_=e.aV,k=e.aW,S=e.aM,N=e.q,z=e.v,M=e.aX,A=e.aY,P=e.Q,B=e.R,$=e.w,W=e.aZ,E=e.a_,X=e.aO,Y=e.D,R=e.a},e=>{T=e.j,L=e.aK,D=e.a4,I=e.af,H=e.ax,U=e.B,F=e.a6,V=e.ad,G=e.O,Z=e.g,Q=e.b0,q=e.b1,J=e.aL,K=e.at,ee=e.$,te=e.au,ne=e.a1,ae=e.a2,se=e.a3,le=e.Q,oe=e.a5,ie=e.al}],execute:function(){e("j",(function(){const{i18n:e}=a();return t=>{var n,a;return null!==(n=null!==(a=e.languages.map((e=>t[e])).find((e=>void 0!==e)))&&void 0!==a?a:t.en)&&void 0!==n?n:"(Translation Error)"}}));var t=(e=>(e.Airport="airport",e.Airport2024="airport_2024",e.Maglev="maglev",e.Disney="disney",e.Railway="railway",e.Railway2024="railway_2024",e.HSR="hsr",e.AirportHK="airport_hk",e.DisneyHK="disney_hk",e.NgongPing360="ngong_ping_360",e.Tiananmen="tiananmen",e.AirportBJ="airport_bj",e.BusTerminalSuzhou="bus_terminal_suzhou",e.RailwaySuzhou="railway_suzhou",e.BusInterchange="bus_interchange",e.AirportSG="airport_sg",e.CruiseCentre="cruise_centre",e.SentosaExpress="sentosa_express",e.CableCar="cable_car",e.Merlion="merlion",e.MarinaBaySands="marina_bay_sands",e.GardensByTheBay="gardens_by_the_bay",e.SingaporeFlyer="singapore_flyer",e.Esplanade="esplanade",e.AirportQingdao="airport_qingdao",e.CoachStationQingdao="coach_station_qingdao",e.CruiseTerminalQingdao="cruise_terminal_qingdao",e.RailwayQingdao="railway_qingdao",e.TramQingdao="tram_qingdao",e.AirportGuangzhou="airport_guangzhou",e.RailwayGuangzhou="railway_guangzhou",e.IntercityGuangzhou="intercity_guangzhou",e))(t||{});const re={type:"airport"},de=(e("n",{component:e=>{const{id:t,x:a,y:s,attrs:l,handlePointerDown:o,handlePointerMove:i,handlePointerUp:r}=e,{type:d=re.type}=null!=l?l:re,m=n.useRef(null),[c,h]=n.useState({width:25,height:25});n.useEffect((()=>h(m.current.getBBox())),[d,h,m]);const f=n.useCallback((e=>o(t,e)),[t,o]),p=n.useCallback((e=>i(t,e)),[t,i]),u=n.useCallback((e=>r(t,e)),[t,r]);return T.jsx("g",{id:t,transform:`translate(${a-c.width/2}, ${s-c.height/2})`,onPointerDown:f,onPointerMove:p,onPointerUp:u,style:{cursor:"move"},children:T.jsx("image",{ref:m,href:`/rmp/images/facilities/${d}.svg`,onLoad:()=>h(m.current.getBBox())})})},icon:T.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:T.jsxs("g",{transform:"translate(12, 0)scale(0.4)",children:[T.jsx("circle",{cx:"0",cy:"29.33899",r:"29.33899",fill:"currentColor"}),T.jsx("path",{id:"airport",d:"M28.9769,6.60134c1.711.013,3.111,2.53205,3.111,4.241v10.337s17.106,15.435,17.358,15.666a1.145,1.145,0,0,1,.488,1.152v2.833c0,.651-.451.61-.695.467-.334-.119-17.151-8.863-17.151-8.863-.004,1.458-.797,9.006-1.326,13.304,0,0,4.61,2.457,4.699,2.521.334.268.352.359.352.852v2.001c0,.477-.352.428-.51.324-.183-.062-5.693-1.921-5.693-1.921a2.56018,2.56018,0,0,0-.633-.127,2.31654,2.31654,0,0,0-.666.127s-5.477,1.859-5.672,1.921c-.185.104-.523.153-.523-.324v-2.001c0-.493.029-.584.367-.852.086-.064,4.678-2.521,4.678-2.521-.524-4.298-1.307-11.846-1.325-13.304,0,0-16.822,8.744-17.148,8.863-.217.143-.69.184-.69-.467v-2.833a1.16206,1.16206,0,0,1,.473-1.152c.276-.231,17.365-15.666,17.365-15.666v-10.337c0-1.709,1.403-4.228,3.14105-4.241",transform:"translate(-28.9697,0.14347)",fill:"white"})]})}),defaultAttrs:re,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:s}=e,{t:o}=a(),i=[{type:"select",label:o("panel.details.nodes.facilities.type"),value:n.type,options:{airport:"Airport",airport_2024:"Airport 2024",maglev:"Maglev",disney:"Disney",railway:"Railway",railway_2024:"Railway 2024",hsr:"HSR",airport_hk:"Airport Hongkong",disney_hk:"Disney Hongkong",ngong_ping_360:"Ngong Ping 360",tiananmen:"Tiananmen",airport_bj:"Airport Beijing",bus_terminal_suzhou:"Bus Terminal Suzhou",railway_suzhou:"Railway Suzhou",bus_interchange:"Bus Interchange",airport_sg:"Changi Airport",cruise_centre:"Cruise Centre",sentosa_express:"Sentosa Express",cable_car:"Cable Car",merlion:"Merlion",marina_bay_sands:"Marina Bay Sands",gardens_by_the_bay:"Gardens by the Bay",singapore_flyer:"Singapore Flyer",esplanade:"Esplanade",airport_qingdao:"Airport Qingdao",railway_qingdao:"Railway Qingdao",coach_station_qingdao:"Coach Station Qingdao",cruise_terminal_qingdao:"Cruise Terminal Qingdao",tram_qingdao:"Tram Qingdao",airport_guangzhou:"Airport Guangzhou",railway_guangzhou:"Railway Guangzhou",intercity_guangzhou:"Intercity Guangzhou"},onChange:e=>{n.type=e,s(t,n)}}];return T.jsx(l,{fields:i,minW:"full"})},metadata:{displayName:"panel.details.nodes.facilities.displayName",tags:[]}}),e("i",(()=>navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome"))),{source:'url("./fonts/LTAIdentity-Medium.woff")',descriptors:{display:"swap"}}),me={source:'url("./fonts/Mplus2-Medium.otf")',descriptors:{display:"swap"}},ce={source:'url("./fonts/Roboto-Bold.ttf")',descriptors:{display:"swap"}},he={source:'url("./fonts/MontaguSlab.ttf")',descriptors:{display:"swap"}},fe={source:'url("./fonts/Railway-PlyE.otf")',descriptors:{display:"swap"}},pe=e("F",{[o.MTR]:{className:[".rmp-name__mtr__zh",".rmp-name__mtr__en"],cssFont:{"MyriadPro-Semibold":void 0,"Vegur-Bold":void 0,"GenYoMinTW-SB":void 0},cssName:"fonts_mtr"},[o.MRTBasic]:{className:[".rmp-name__mrt"],cssFont:{IdentityFont:de},cssName:"fonts_mrt"},[o.MRTInt]:{className:[".rmp-name__mrt"],cssFont:{IdentityFont:de},cssName:"fonts_mrt"},[o.JREastBasic]:{className:[".rmp-name__jreast_ja",".rmp-name__jreast_en"],cssFont:{"M PLUS 2":me},cssName:"fonts_jreast"},[o.JREastImportant]:{className:[".rmp-name__jreast_ja",".rmp-name__jreast_en"],cssFont:{"M PLUS 2":me},cssName:"fonts_jreast"},[i.BerlinSBahnLineBadge]:{className:[".rmp-name__berlin"],cssFont:{Roboto:ce},cssName:"fonts_berlin"},[i.BerlinUBahnLineBadge]:{className:[".rmp-name__berlin"],cssFont:{Roboto:ce},cssName:"fonts_berlin"},[i.JREastLineBadge]:{className:[".rmp-name__jreast_ja",".rmp-name__jreast_en"],cssFont:{'"M PLUS 2"':me},cssName:"fonts_jreast"},[i.MRTDestinationNumbers]:{className:[".rmp-name__mrt"],cssFont:{IdentityFont:de},cssName:"fonts_mrt"},[i.MRTLineBadge]:{className:[".rmp-name__mrt"],cssFont:{IdentityFont:de},cssName:"fonts_mrt"},[o.TokyoMetroBasic]:{className:[".rmp-name__tokyo_en",".rmp-name__jreast_ja"],cssFont:{MontaguSlab:he,"M PLUS 2":me},cssName:"fonts_tokyo"},[o.TokyoMetroInt]:{className:[".rmp-name__tokyo_en",".rmp-name__jreast_ja"],cssFont:{MontaguSlab:he,"M PLUS 2":me},cssName:"fonts_tokyo"},[o.LondonTubeBasic]:{className:[".rmp-name__tube"],cssFont:{Railway:fe},cssName:"fonts_tube"},[o.LondonTubeInt]:{className:[".rmp-name__tube"],cssFont:{Railway:fe},cssName:"fonts_tube"}}),ue=[],ge=e("l",(async e=>{const t=pe[e];if(!t)return;const{cssFont:n,cssName:a}=t;if(ue.includes(a))return;ue.push(a),await Promise.all(Object.entries(n).map((([e,t])=>r.loadFont(e,t&&{configs:[t]}))));const s=document.createElement("link");s.rel="stylesheet",s.id=a,s.href=`/rmp/styles/${a}.css`,document.head.append(s)})),xe=e("g",n.forwardRef(((e,t)=>{const{text:n,lineHeight:a,grow:s,dominantBaseline:l=("up"===s?"auto":"down"===s?"hanging":"middle"),baseOffset:o=2,funcDX:i=(e=>0),...r}=e,d="bidirectional"===s?-(n.length-1)*a/2:0;return T.jsx("g",{ref:t,children:("up"===s?[...n].reverse():n).map(((e,t,n)=>T.jsx("text",{dy:(t*a+o)*("up"===s?-1:1)+d,dx:i(t),dominantBaseline:l,...r,children:e},`${e}${t}`)))})})));xe.displayName="MultilineText";const Ce={top:{namesPos:1,lineHeight:10,polarity:-1},middle:{namesPos:0,lineHeight:0,polarity:0},bottom:{namesPos:0,lineHeight:16,polarity:1}},ye={zh:o.ShmetroBasic,en:o.ShmetroBasic,mtr__zh:o.MTR,mtr__en:o.MTR,berlin:i.BerlinSBahnLineBadge,mrt:o.MRTBasic,jreast_ja:o.JREastBasic,jreast_en:o.JREastBasic,tokyo_en:o.TokyoMetroBasic,tube:o.LondonTubeBasic},be=e("h",{content:"Enter your text here",fontSize:16,lineHeight:16,textAnchor:"middle",dominantBaseline:"middle",language:"en",color:[d.Shanghai,"jsr","#000000",m.white],rotate:0,italic:"normal",bold:"normal"}),ve=(e("t",{component:e=>{const{id:t,x:a,y:s,attrs:l,handlePointerDown:o,handlePointerMove:i,handlePointerUp:r}=e,{content:d=be.content,fontSize:m=be.fontSize,lineHeight:c=be.lineHeight,textAnchor:h=be.textAnchor,dominantBaseline:f=be.dominantBaseline,language:p=be.language,color:u=be.color,rotate:g=be.rotate,italic:x=be.italic,bold:C=be.bold}=null!=l?l:be,y=n.useRef(null),[b,v]=n.useState({x:0,y:0,width:32,height:16});n.useEffect((()=>v(y.current.getBBox())),[d,m,c,h,f,p,g,x,C,v,y]),n.useEffect((()=>{const e=ye[p];e&&ge(e)}),[p]);const j=n.useCallback((e=>o(t,e)),[t,o]),w=n.useCallback((e=>i(t,e)),[t,i]),O=n.useCallback((e=>r(t,e)),[t,r]);return T.jsxs("g",{id:t,transform:`translate(${a}, ${s})rotate(${g})`,onPointerDown:j,onPointerMove:w,onPointerUp:O,style:{cursor:"move"},children:[T.jsx("rect",{className:"removeMe",fill:"gray",fillOpacity:"0.1",x:b.x-1.5,y:b.y-1.5,width:b.width+3,height:b.height+3}),T.jsx(xe,{ref:y,text:d.split("\n"),lineHeight:c,grow:"down",className:`rmp-name__${p}`,fontSize:m,textAnchor:h,dominantBaseline:f,fill:u[2],fontStyle:x,fontWeight:C})]})},icon:T.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:T.jsx("text",{x:"12",y:"12",textAnchor:"middle",dominantBaseline:"middle",fontSize:"10",children:"Text"})}),defaultAttrs:be,attrsComponent:e=>{var t,n,s,o,r,d,m;const{id:h,attrs:f,handleAttrsUpdate:p}=e,{t:u}=a(),g=[{type:"textarea",label:u("panel.details.nodes.text.content"),value:null!==(t=f.content)&&void 0!==t?t:be.content,onChange:e=>{f.content=e.toString(),p(h,f)},minW:"full"},{type:"input",label:u("panel.details.nodes.text.fontSize"),value:(null!==(n=f.fontSize)&&void 0!==n?n:be.fontSize).toString(),validator:e=>Number.isInteger(e)&&Number(e)>0,onChange:e=>{f.fontSize=Number(e),p(h,f)},minW:"full"},{type:"input",label:u("panel.details.nodes.text.lineHeight"),value:(null!==(s=f.lineHeight)&&void 0!==s?s:be.lineHeight).toString(),validator:e=>Number.isInteger(e)&&Number(e)>0,onChange:e=>{f.lineHeight=Number(e),p(h,f)},minW:"full"},{type:"select",label:u("panel.details.nodes.text.textAnchor"),value:null!==(o=f.textAnchor)&&void 0!==o?o:be.textAnchor,options:{start:u("panel.details.nodes.text.start"),middle:u("panel.details.nodes.text.middle"),end:u("panel.details.nodes.text.end")},onChange:e=>{f.textAnchor=e,p(h,f)},minW:"full"},{type:"select",label:u("panel.details.nodes.text.dominantBaseline"),value:null!==(r=f.dominantBaseline)&&void 0!==r?r:be.dominantBaseline,options:{auto:u("panel.details.nodes.text.auto"),middle:u("panel.details.nodes.text.middle"),hanging:u("panel.details.nodes.text.hanging")},onChange:e=>{f.dominantBaseline=e,p(h,f)},minW:"full"},{type:"select",label:u("panel.details.nodes.text.language"),value:null!==(d=f.language)&&void 0!==d?d:be.language,options:{zh:u("panel.details.nodes.text.zh"),en:u("panel.details.nodes.text.en"),mtr__zh:u("panel.details.nodes.text.mtr__zh"),mtr__en:u("panel.details.nodes.text.mtr__en"),berlin:u("panel.details.nodes.text.berlin"),mrt:u("panel.details.nodes.text.mrt"),jreast_ja:u("panel.details.nodes.text.jreast_ja"),jreast_en:u("panel.details.nodes.text.jreast_en"),tokyo_en:u("panel.details.nodes.text.tokyo_en"),tube:u("panel.details.nodes.text.tube")},onChange:e=>{f.language=e.toString(),p(h,f)},minW:"full"},{type:"select",label:u("panel.details.nodes.text.rotate"),value:null!==(m=f.rotate)&&void 0!==m?m:be.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:e=>{f.rotate=Number(e),p(h,f)},minW:"full"},{type:"switch",label:u("panel.details.nodes.text.italic"),isChecked:"italic"===f.italic,onChange:e=>{f.italic=e?"italic":"normal",p(h,f)},minW:"full"},{type:"switch",label:u("panel.details.nodes.text.bold"),isChecked:"bold"===f.bold,onChange:e=>{f.bold=e?"bold":"normal",p(h,f)},minW:"full"},{type:"custom",label:u("color"),component:T.jsx(c,{type:i.Text,defaultTheme:be.color})}];return T.jsx(l,{fields:g})},metadata:{displayName:"panel.details.nodes.text.displayName",tags:[]}}),e("c",((e,t)=>e.filterEdges(((e,n,a,s,l,o,i)=>t.has(a)&&t.has(s))))),e("f",(e=>{const t=Object.fromEntries([...Object.values(o),Object.values(i)].map((e=>[e,!1])));return e.forEachNode((n=>{const a=e.getNodeAttribute(n,"type");t[a]=!0})),t}))),je=(e("b",((e,t,n,a,s)=>{const l=t<=a?t:a,o=n<=s?n:s,i=t<=a?a:t,r=n<=s?s:n;return e.filterNodes(((e,t)=>((e,t,n,a,s,l)=>e<=s&&s<=n&&t<=l&&l<=a)(l,o,i,r,t.x,t.y)))})),e("e",((e,t,n)=>{const a=[],s=new Set;return t.forEach((t=>{const n=e.getNodeAttributes(t).type,l=e.getNodeAttribute(t,n);if(void 0!==l.color){const e=l.color;s.has(e.toString())||(a.push(e),s.add(e.toString()))}})),n.filter((t=>h.includes(e.getEdgeAttribute(t,"style")))).forEach((t=>{const n=e.getEdgeAttributes(t),l=n[n.style].color;s.has(l.toString())||(a.push(l),s.add(l.toString()))})),a})),e=>{const t=[],n=new Set;return e.filterNodes((t=>e.getNodeAttribute(t,"type")===i.Master)).forEach((a=>{const s=e.getNodeAttributes(a)[i.Master];n.has(s.randomId)||(n.add(s.randomId),t.push(s))})),t}),we=e("d",((e,t,n)=>{const a=new Blob([n],{type:t});Oe(e,a)})),Oe=e("a",((e,t)=>{const n=window.URL.createObjectURL(t),a=document.createElement("a");a.href=n,a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),window.URL.revokeObjectURL(n)})),_e=(e("m",(async(e,t,n,a)=>{const{xMin:s,yMin:l,xMax:o,yMax:i}=f(e),[r,d]=[o-s,i-l],m=document.getElementById("canvas").cloneNode(!0);t||m.appendChild(await Se(o-400,i-120)),m.setAttribute("viewBox",`${s} ${l} ${r} ${d}`),m.setAttribute("width",r.toString()),m.setAttribute("height",d.toString()),Object.entries({".rmp-name-outline":["paint-order","stroke","stroke-linejoin"]}).forEach((([e,t])=>{const n=document.querySelector(e);if(null===n)return;const s=window.getComputedStyle(n);m.querySelectorAll(e).forEach((n=>{if(".rmp-name-outline"===e&&1.1===a){const t=n.insertAdjacentElement("afterend",n.cloneNode(!0));t&&(t.classList.remove(e.slice(1)),0===t.classList.length&&n.removeAttribute("class"),t.removeAttribute("stroke-width"))}t.forEach((e=>{n.setAttribute(e,s.getPropertyValue(e))})),n.classList.remove(e.slice(1)),0===n.classList.length&&n.removeAttribute("class")}))})),m.querySelectorAll('[fill="url(#opaque)"]').forEach((e=>{e.setAttribute("fill","white"),e.setAttribute("fill-opacity","0")})),m.querySelectorAll(".removeMe").forEach((e=>{e.remove()}));const c=ve(e);return await _e(m,e,c,n),await ke(m,e,c),{elem:m,width:r,height:d}})),async(e,t,n,a)=>{const s=new Set;if(Object.keys(pe).filter((e=>n[e])).forEach((e=>s.add(e))),t.filterNodes(((e,t)=>e.startsWith("misc_node_")&&t.type===i.Text)).map((e=>t.getNodeAttribute(e,i.Text).language)).map((e=>ye[e])).filter((e=>e!==o.ShmetroBasic)).forEach((e=>s.add(e))),a)[".rmp-name__zh",".rmp-name__en"].forEach((t=>{e.querySelectorAll(t).forEach((e=>{e.classList.remove(t.slice(1)),0===e.classList.length&&e.removeAttribute("class")}))})),s.forEach((t=>{pe[t].className.forEach((t=>{e.querySelectorAll(t).forEach((e=>{e.classList.remove(t.slice(1)),0===e.classList.length&&e.removeAttribute("class")}))}))}));else{const t=document.createElement("style");for(let e=0;ee.cssText)).join("\n");break}}e.prepend(t),await Promise.all([...s.values()].map((e=>pe[e])).map((async({cssName:t,cssFont:n})=>{try{e.prepend(await(async(e,t)=>{const n=document.createElement("style");for(let l=document.styleSheets.length-1;l>=0;l-=1){var a;if(null!==(a=document.styleSheets[l].href)&&void 0!==a&&a.endsWith(`styles/${t}.css`)){n.textContent=[...document.styleSheets[l].cssRules].map((e=>e.cssText)).filter((e=>!e.startsWith("@font-face"))).join("\n");break}}n.textContent+="\n";const s=(await Promise.allSettled(Object.keys(e).map(r.getFontCSS))).filter((e=>"fulfilled"===e.status)).map((e=>e.value));return n.textContent+=s.join("\n"),n})(n,t))}catch(a){alert("Failed to load fonts. Fonts in the exported PNG will be missing."),console.error(a)}})))}}),ke=async(e,n,a)=>{if(a[i.Facilities]){const a=n.filterNodes(((e,t)=>t.type===i.Facilities)),s=Object.fromEntries(Object.values(t).map((e=>[e,[]])));a.forEach((e=>{var t;const a=null===(t=n.getNodeAttribute(e,i.Facilities))||void 0===t?void 0:t.type;a&&s[a].push(e)}));const l=Object.entries(s).filter((([e,t])=>t.length>0)).map((([e,t])=>e)),o=await Promise.all((await Promise.all(l.map((async e=>await fetch(`/rmp//images/facilities/${e}.svg`))))).map((e=>e.text())));l.forEach(((t,n)=>{const a=document.createElement("div");a.innerHTML=o[n];const l=a.querySelector("svg"),i=document.createElementNS("http://www.w3.org/2000/svg","symbol");for(const e of l.attributes)i.setAttribute(e.name,e.value);for(;l.firstChild;)i.appendChild(l.firstChild);l.replaceWith(i),i.id=t,e.appendChild(i),s[t].forEach((n=>{const a=e.querySelector(`#${n}`),s=null==a?void 0:a.querySelector("image");if(s){a.removeChild(s);const e=document.createElementNS("http://www.w3.org/2000/svg","use");e.setAttribute("href",`#${t}`),e.setAttribute("height",i.getAttribute("height")),e.setAttribute("width",i.getAttribute("width")),a.appendChild(e)}})),a.remove()}))}},Se=async(e,t)=>{const n=document.createElementNS("http://www.w3.org/2000/svg","g");n.setAttribute("transform",`translate(${e}, ${t})scale(2)`);const a=await fetch("/rmp//logo.svg"),s=await a.text(),l=document.createElement("div");l.innerHTML=s;const o=l.querySelector("svg"),i=document.createElement("g");i.setAttribute("transform","translate(-60, -25)scale(0.1)"),i.setAttribute("font-family","Arial, sans-serif"),i.innerHTML=o.innerHTML,n.appendChild(i);const r=document.createElementNS("http://www.w3.org/2000/svg","text");r.setAttribute("font-family","Arial, sans-serif"),r.setAttribute("font-size","16");const d=p.t("Rail Map Painter");r.appendChild(document.createTextNode(d));const m=document.createElementNS("http://www.w3.org/2000/svg","text");m.setAttribute("font-family","Arial, sans-serif"),m.setAttribute("font-size","10"),m.setAttribute("y","10");const c=window.location.origin;let h="https://railmapgen.org/";return c.includes("github")?h="https://railmapgen.github.io/":c.includes("gitlab")&&(h="https://railmapgen.gitlab.io/"),h+="?app=rmp",m.appendChild(document.createTextNode(h)),n.appendChild(i),n.appendChild(r),n.appendChild(m),n};e("u",(()=>{const[e,t]=s.useState({width:void 0,height:void 0});return s.useEffect((()=>{function e(){t({width:window.innerWidth,height:window.innerHeight})}return window.addEventListener("resize",e),e(),()=>window.removeEventListener("resize",e)}),[]),e}));const Ne={top:{lineHeight:6.67,offset:10},middle:{lineHeight:0,offset:0},bottom:{lineHeight:12.67,offset:5.83}},ze={...x,nameOffsetX:"right",nameOffsetY:"top"},Me={component:e=>{var t;const{id:a,x:s,y:l,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,nameOffsetX:h=ze.nameOffsetX,nameOffsetY:f=ze.nameOffsetY}=null!==(t=i[o.ShmetroBasic])&&void 0!==t?t:ze,p=n.useCallback((e=>r(a,e)),[a,r]),u=n.useCallback((e=>d(a,e)),[a,d]),g=n.useCallback((e=>m(a,e)),[a,m]),C="left"===h?-13.33:"right"===h?13.33:0,y=(c[Ce[f].namesPos].split("\n").length*Ne[f].lineHeight+Ne[f].offset)*Ce[f].polarity,b="left"===h?"end":"right"===h?"start":"middle";return n.useMemo((()=>T.jsxs("g",{id:a,transform:`translate(${s}, ${l})`,children:[T.jsx("circle",{id:`stn_core_${a}`,r:5,stroke:"#393332",strokeWidth:"1",fill:"white",onPointerDown:p,onPointerMove:u,onPointerUp:g,style:{cursor:"move"}}),T.jsxs("g",{transform:`translate(${C}, ${y})`,textAnchor:b,className:"rmp-name-outline",strokeWidth:"1",children:[T.jsx(xe,{text:c[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),T.jsx(xe,{text:c[1].split("\n"),dx:"right"===h?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]})),[a,s,l,...c,h,f,p,u,g])},icon:T.jsx("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:T.jsx("circle",{cx:"12",cy:"12",r:"5",stroke:"currentColor",fill:"none"})}),defaultAttrs:ze,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:s}=e,{t:o}=a(),i=[{type:"textarea",label:o("panel.details.stations.common.nameZh"),value:n.names[0],onChange:e=>{n.names[0]=e,s(t,n)},minW:"full"},{type:"textarea",label:o("panel.details.stations.common.nameEn"),value:n.names[1],onChange:e=>{n.names[1]=e,s(t,n)},minW:"full"},{type:"select",label:o("panel.details.stations.common.nameOffsetX"),value:n.nameOffsetX,options:{left:o("panel.details.stations.common.left"),middle:o("panel.details.stations.common.middle"),right:o("panel.details.stations.common.right")},disabledOptions:"middle"===n.nameOffsetY?["middle"]:[],onChange:e=>{n.nameOffsetX=e,s(t,n)},minW:"full"},{type:"select",label:o("panel.details.stations.common.nameOffsetY"),value:n.nameOffsetY,options:{top:o("panel.details.stations.common.top"),middle:o("panel.details.stations.common.middle"),bottom:o("panel.details.stations.common.bottom")},disabledOptions:"middle"===n.nameOffsetX?["middle"]:[],onChange:e=>{n.nameOffsetY=e,s(t,n)},minW:"full"}];return T.jsx(l,{fields:i})},metadata:{displayName:"panel.details.stations.shmetroBasic.displayName",cities:[d.Shanghai],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},Ae={0:{textDx:0,textDy:-17.5,textAnchor:"middle",namesPos:1,lineHeight:6.67,polarity:-1},45:{textDx:1,textDy:-16.25,textAnchor:"start",namesPos:1,lineHeight:6.67,polarity:-1},90:{textDx:12,textDy:0,textAnchor:"start",namesPos:0,lineHeight:0,polarity:0},135:{textDx:5,textDy:21,textAnchor:"start",namesPos:0,lineHeight:12.67,polarity:1},180:{textDx:0,textDy:22.5,textAnchor:"middle",namesPos:0,lineHeight:12.67,polarity:1},225:{textDx:-5,textDy:21,textAnchor:"end",namesPos:0,lineHeight:12.67,polarity:1},270:{textDx:-12,textDy:0,textAnchor:"end",namesPos:0,lineHeight:0,polarity:0},315:{textDx:-1,textDy:-16.25,textAnchor:"end",namesPos:1,lineHeight:6.67,polarity:-1}},Pe={...x,rotate:0,color:[d.Shanghai,"sh1","#E4002B",m.white]},Be={component:e=>{var t;const{id:a,x:s,y:l,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,color:h=Pe.color,rotate:f=Pe.rotate}=null!==(t=i[o.ShmetroBasic2020])&&void 0!==t?t:Pe,p=Ae[f].textDy+(c[Ae[f].namesPos].split("\n").length-1)*Ae[f].lineHeight*Ae[f].polarity,u=n.useCallback((e=>r(a,e)),[a,r]),g=n.useCallback((e=>d(a,e)),[a,d]),C=n.useCallback((e=>m(a,e)),[a,m]);return n.useMemo((()=>T.jsxs("g",{id:a,children:[T.jsx("g",{transform:`translate(${s}, ${l})rotate(${f})`,children:T.jsx("rect",{id:`stn_core_${a}`,x:"-2",y:"-7.83",width:"4",height:"7.83",stroke:"none",fill:h[2],onPointerDown:u,onPointerMove:g,onPointerUp:C,style:{cursor:"move"}})}),T.jsxs("g",{transform:`translate(${s+Ae[f].textDx}, ${l+p})`,textAnchor:Ae[f].textAnchor,className:"rmp-name-outline",strokeWidth:"1",children:[T.jsx(xe,{text:c[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),T.jsx(xe,{text:c[1].split("\n"),dx:f>=45&&f<=135?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]})),[a,s,l,...c,f,h,u,g,C])},icon:T.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:T.jsx("rect",{x:"6",y:"9",width:"12",height:"6",stroke:"currentColor",fill:"currentColor"})}),defaultAttrs:Pe,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:s}=e,{t:i}=a(),r=[{type:"textarea",label:i("panel.details.stations.common.nameZh"),value:n.names[0],onChange:e=>{n.names[0]=e,s(t,n)},minW:"full"},{type:"textarea",label:i("panel.details.stations.common.nameEn"),value:n.names[1],onChange:e=>{n.names[1]=e,s(t,n)},minW:"full"},{type:"select",label:i("panel.details.stations.common.rotate"),value:n.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:e=>{n.rotate=Number(e),s(t,n)},minW:"full"},{type:"custom",label:i("color"),component:T.jsx(c,{type:o.ShmetroBasic2020,defaultTheme:Pe.color})}];return T.jsx(l,{fields:r})},metadata:{displayName:"panel.details.stations.shmetroBasic2020.displayName",cities:[d.Shanghai],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},$e={top:{lineHeight:6.67,offset:5},middle:{lineHeight:0,offset:0},bottom:{lineHeight:12.67,offset:.83}},We={...x,nameOffsetX:"right",nameOffsetY:"top",rotate:0,height:10,width:13},Ee={component:e=>{var t;const{id:a,x:s,y:l,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,nameOffsetX:h=We.nameOffsetX,nameOffsetY:f=We.nameOffsetY,rotate:p=We.rotate,width:u=We.width,height:g=We.height}=null!==(t=i[o.ShmetroInt])&&void 0!==t?t:We,C=n.useCallback((e=>r(a,e)),[a,r]),y=n.useCallback((e=>d(a,e)),[a,d]),b=n.useCallback((e=>m(a,e)),[a,m]),v=0===p||180===p?u:90===p||270===p?g:u*Math.SQRT1_2,j=0===p||180===p?g:90===p||270===p?u:u*Math.SQRT1_2,w="left"===h?-6.83:"right"===h?6.83:0,O=(Math.abs(w)+v/2)*Math.sign(w),_=(c[Ce[f].namesPos].split("\n").length*$e[f].lineHeight+$e[f].offset)*Ce[f].polarity,k=(Math.abs(_)+j/2)*Math.sign(_),S="left"===h?"end":"right"===h?"start":"middle";return n.useMemo((()=>T.jsxs("g",{id:a,children:[T.jsx("g",{transform:`translate(${s}, ${l})rotate(${p})`,children:T.jsx("rect",{id:`stn_core_${a}`,x:-u/2,y:-g/2,height:g,width:u,ry:g/2,stroke:"#393332",strokeWidth:"1",fill:"white",onPointerDown:C,onPointerMove:y,onPointerUp:b,style:{cursor:"move"}})}),T.jsxs("g",{transform:`translate(${s+O}, ${l+k})`,textAnchor:S,className:"rmp-name-outline",strokeWidth:"1",children:[T.jsx(xe,{text:c[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),T.jsx(xe,{text:c[1].split("\n"),dx:"right"===h?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]})),[a,s,l,...c,h,f,p,u,g,C,y,b])},icon:T.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:T.jsx("rect",{x:"4.5",y:"7",height:"10",width:"15",ry:"5",stroke:"currentColor",fill:"none"})}),defaultAttrs:We,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:s}=e,{t:o}=a(),i=[{type:"textarea",label:o("panel.details.stations.common.nameZh"),value:n.names[0],onChange:e=>{n.names[0]=e,s(t,n)},minW:"full"},{type:"textarea",label:o("panel.details.stations.common.nameEn"),value:n.names[1],onChange:e=>{n.names[1]=e,s(t,n)},minW:"full"},{type:"select",label:o("panel.details.stations.common.nameOffsetX"),value:n.nameOffsetX,options:{left:o("panel.details.stations.common.left"),middle:o("panel.details.stations.common.middle"),right:o("panel.details.stations.common.right")},disabledOptions:"middle"===n.nameOffsetY?["middle"]:[],onChange:e=>{n.nameOffsetX=e,s(t,n)},minW:"full"},{type:"select",label:o("panel.details.stations.common.nameOffsetY"),value:n.nameOffsetY,options:{top:o("panel.details.stations.common.top"),middle:o("panel.details.stations.common.middle"),bottom:o("panel.details.stations.common.bottom")},disabledOptions:"middle"===n.nameOffsetX?["middle"]:[],onChange:e=>{n.nameOffsetY=e,s(t,n)},minW:"full"},{type:"input",label:o("panel.details.stations.shmetroInt.height"),value:n.height.toString(),validator:e=>Number.isInteger(e),onChange:e=>{n.height=Number(e),s(t,n)},minW:"full"},{type:"input",label:o("panel.details.stations.shmetroInt.width"),value:n.width.toString(),validator:e=>Number.isInteger(e),onChange:e=>{n.width=Number(e),s(t,n)},minW:"full"},{type:"select",label:o("panel.details.stations.common.rotate"),value:n.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:e=>{n.rotate=Number(e),s(t,n)},minW:"full"}];return T.jsx(l,{fields:i})},metadata:{displayName:"panel.details.stations.shmetroInt.displayName",cities:[d.Shanghai],canvas:[u.RailMap],categories:[g.Metro],tags:["interchange"]}},Xe={...x,nameOffsetX:"right",nameOffsetY:"top"},Ye={component:e=>{var t;const{id:a,x:s,y:l,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,nameOffsetX:h=Xe.nameOffsetX,nameOffsetY:f=Xe.nameOffsetY}=null!==(t=i[o.ShmetroOutOfSystemInt])&&void 0!==t?t:Xe,p=n.useCallback((e=>r(a,e)),[a,r]),u=n.useCallback((e=>d(a,e)),[a,d]),g=n.useCallback((e=>m(a,e)),[a,m]),C="left"===h?-13.33:"right"===h?13.33:0,y=(c[Ce[f].namesPos].split("\n").length*Ne[f].lineHeight+Ne[f].offset)*Ce[f].polarity,b="left"===h?"end":"right"===h?"start":"middle";return n.useMemo((()=>T.jsxs("g",{id:a,transform:`translate(${s}, ${l})`,children:[T.jsx("circle",{r:5,stroke:"#393332",strokeWidth:"1.33",fill:"white"}),T.jsx("circle",{r:2.3,stroke:"#393332",strokeWidth:"1.33",fill:"white"}),T.jsx("circle",{id:`stn_core_${a}`,r:5.665,fill:"white",fillOpacity:"0",onPointerDown:p,onPointerMove:u,onPointerUp:g,style:{cursor:"move"}}),T.jsxs("g",{transform:`translate(${C}, ${y})`,textAnchor:b,className:"rmp-name-outline",strokeWidth:"1",children:[T.jsx(xe,{text:c[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),T.jsx(xe,{text:c[1].split("\n"),dx:"right"===h?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]})),[a,s,l,...c,h,f,p,u,g])},icon:T.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[T.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2.67",fill:"white"}),T.jsx("circle",{cx:"12",cy:"12",r:"4.6",stroke:"currentColor",strokeWidth:"2.67",fill:"white"})]}),defaultAttrs:Xe,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:s}=e,{t:o}=a(),i=[{type:"textarea",label:o("panel.details.stations.common.nameZh"),value:n.names[0],onChange:e=>{n.names[0]=e,s(t,n)},minW:"full"},{type:"textarea",label:o("panel.details.stations.common.nameEn"),value:n.names[1],onChange:e=>{n.names[1]=e,s(t,n)},minW:"full"},{type:"select",label:o("panel.details.stations.common.nameOffsetX"),value:n.nameOffsetX,options:{left:o("panel.details.stations.common.left"),middle:o("panel.details.stations.common.middle"),right:o("panel.details.stations.common.right")},disabledOptions:"middle"===n.nameOffsetY?["middle"]:[],onChange:e=>{n.nameOffsetX=e,s(t,n)},minW:"full"},{type:"select",label:o("panel.details.stations.common.nameOffsetY"),value:n.nameOffsetY,options:{top:o("panel.details.stations.common.top"),middle:o("panel.details.stations.common.middle"),bottom:o("panel.details.stations.common.bottom")},disabledOptions:"middle"===n.nameOffsetX?["middle"]:[],onChange:e=>{n.nameOffsetY=e,s(t,n)},minW:"full"}];return T.jsx(l,{fields:i})},metadata:{displayName:"panel.details.stations.shmetroOsysi.displayName",cities:[d.Shanghai],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},Re={...x,rotate:0},Te={component:e=>{var t;const{id:a,x:s,y:l,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,rotate:h=Re.rotate}=null!==(t=i[o.ShanghaiSuburbanRailway])&&void 0!==t?t:Re,f=Ae[h].textDy+(c[Ae[h].namesPos].split("\n").length-1)*Ae[h].lineHeight*Ae[h].polarity,p=n.useCallback((e=>r(a,e)),[a,r]),u=n.useCallback((e=>d(a,e)),[a,d]),g=n.useCallback((e=>m(a,e)),[a,m]);return n.useMemo((()=>T.jsxs("g",{id:a,children:[T.jsxs("g",{transform:`translate(${s}, ${l})rotate(${h})`,children:[T.jsx("rect",{x:"-2",y:"-7.83",width:"4",height:"7.83",stroke:"none",fill:"#666464"}),T.jsx("rect",{x:"-3.5",y:"-1",width:"7",height:"2",stroke:"none",fill:"white"}),T.jsx("rect",{x:-.8325,y:-6.33,width:1.6,height:6.33,stroke:"none",fill:"white"}),T.jsx("rect",{id:`stn_core_${a}`,x:"-2",y:"-7.83",width:"4",height:9.08,stroke:"none",fill:"white",fillOpacity:"0",onPointerDown:p,onPointerMove:u,onPointerUp:g,style:{cursor:"move"}})]}),T.jsxs("g",{transform:`translate(${s+Ae[h].textDx}, ${l+f})`,textAnchor:Ae[h].textAnchor,className:"rmp-name-outline",strokeWidth:"2.5",children:[T.jsx(xe,{text:c[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),T.jsx(xe,{text:c[1].split("\n"),dx:h>=45&&h<=135?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]})),[a,s,l,...c,h,p,u,g])},icon:T.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:T.jsx("rect",{x:"6",y:"9",width:"12",height:"6",stroke:"currentColor",fill:"currentColor"})}),defaultAttrs:Re,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:s}=e,{t:o}=a(),i=[{type:"textarea",label:o("panel.details.stations.common.nameZh"),value:n.names[0],onChange:e=>{n.names[0]=e,s(t,n)},minW:"full"},{type:"textarea",label:o("panel.details.stations.common.nameEn"),value:n.names[1],onChange:e=>{n.names[1]=e,s(t,n)},minW:"full"},{type:"select",label:o("panel.details.stations.common.rotate"),value:n.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:e=>{n.rotate=Number(e),s(t,n)},minW:"full"}];return T.jsx(l,{fields:i})},metadata:{displayName:"panel.details.stations.shanghaiSuburbanRailway.displayName",cities:[d.Shanghai],canvas:[u.RailMap],categories:[g.Metro],tags:[]}};var Le=1.3,De=45,Ie=De-3,He=function(e,t){var n=[e,t].map((function(e){return e.match(/^(\w+).+$/)}));if(n[0]&&n[1]&&n[0][1]===n[1][1])return n[0][1]},Ue=function(e){var t=e.match(/^(\d+)\D+$/);return null==t?void 0:t[1]},Fe=function(){return Fe=Object.assign||function(e){for(var t,n=1,a=arguments.length;n0)&&!(a=l.next()).done;)o.push(a.value)}catch(i){s={error:i}}finally{try{a&&!a.done&&(n=l.return)&&n.call(l)}finally{if(s)throw s.error}}return o};function Qe(e){var t=e.zhName,n=e.enName,a=e.foregroundColour,l=e.backgroundColour,o=e.zhClassName,i=e.enClassName,r=e.passed,d=function(e,t){var n=Ue(e);if(n)return{isDigit:!0,spanningPart:n};var a=He(e,t);return a?{isDigit:!1,spanningPart:a}:{isDigit:!1,spanningPart:""}}(t,n),c=d.isDigit,h=d.spanningPart,f=s.useRef(null),p=Ze(s.useState({x:0,height:0,width:0}),2),u=p[0],g=p[1];s.useEffect((function(){f.current&&g(f.current.getBBox())}),[t,n]);var x=Ie/Math.max(Ie,u.width),C=(-u.x-u.width/2)*x,y=u.height*(1-x)/2;return T.jsxs("g",{textAnchor:"middle",fill:r?m.white:a,children:[T.jsx(Ge,{fill:r?"#aaa":l}),T.jsx("g",{ref:f,transform:"translate(".concat(C,",").concat(y,")scale(").concat(x,")"),children:T.jsxs("text",{className:o,fontSize:21,x:-1,y:12,textAnchor:"end",dominantBaseline:"central",children:[h,T.jsx("tspan",{className:o,fontSize:10,x:0,dy:-4,textAnchor:"start",dominantBaseline:"central",children:t.slice(h.length).trim()}),T.jsx("tspan",{className:i,fontSize:6.5,letterSpacing:-.1,x:0,dy:10,textAnchor:"start",dominantBaseline:"middle",children:c?n:n.slice(h.length).trim()})]})})]})}var qe=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var a,s,l=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(a=l.next()).done;)o.push(a.value)}catch(i){s={error:i}}finally{try{a&&!a.done&&(n=l.return)&&n.call(l)}finally{if(s)throw s.error}}return o};function Je(e){var t,n=e.zhName,a=e.enName,l=e.foregroundColour,o=e.backgroundColour,i=e.zhClassName,r=e.enClassName,d=e.passed,c=null!==(t=Ue(n))&&void 0!==t?t:"",h=s.useRef(null),f=s.useRef(null),p=qe(s.useState({width:0}),2),u=p[0],g=p[1],x=qe(s.useState({width:0}),2),C=x[0],y=x[1];s.useEffect((function(){h.current&&g(h.current.getBBox()),f.current&&y(f.current.getBBox())}),[n,a]);var b=Ie/Math.max(Ie,u.width),v=Ie/Math.max(Ie,C.width),j={nameZh:{y:7.3+13.5*(1-b)*b/2},nameEn:{y:19.5-9*(1-v)*v/2}};return T.jsxs("g",{textAnchor:"middle",fill:d?m.white:l,children:[T.jsx(Ge,{fill:d?"#aaa":o}),T.jsxs("text",{ref:h,className:i,fontSize:12,transform:"translate(0,".concat(j.nameZh.y,")scale(").concat(b,")"),dominantBaseline:"central",children:[T.jsx("tspan",{fontSize:16,dy:.7,dominantBaseline:"central",children:c}),T.jsx("tspan",{dy:-.7,dominantBaseline:"central",children:n.slice(c.length)})]}),T.jsx("text",{ref:f,className:r,fontSize:8,transform:"translate(0,".concat(j.nameEn.y,")scale(").concat(v,")"),dominantBaseline:"middle",children:a})]})}var Ke=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var a,s,l=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(a=l.next()).done;)o.push(a.value)}catch(i){s={error:i}}finally{try{a&&!a.done&&(n=l.return)&&n.call(l)}finally{if(s)throw s.error}}return o};function et(e){var t=e.zhName,n=e.enName,a=e.foregroundColour,l=e.backgroundColour,o=e.zhClassName,i=e.enClassName,r=e.passed,d=s.useRef(null),c=Ke(s.useState({width:0}),2),h=c[0],f=c[1];s.useEffect((function(){d.current&&f(d.current.getBBox())}),[t,n]);var p=Math.max(45,h.width+4);return T.jsxs("g",{textAnchor:"middle",fill:r?m.white:a,children:[T.jsx(Ge,{customWidth:p,fill:r?"#aaa":l}),T.jsxs("g",{ref:d,children:[T.jsx("text",{className:o,fontSize:8.5,y:8,dominantBaseline:"central",children:t}),T.jsx("text",{className:i,fontSize:5.5,y:18,dominantBaseline:"middle",children:n})]})]})}var tt=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var a,s,l=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(a=l.next()).done;)o.push(a.value)}catch(i){s={error:i}}finally{try{a&&!a.done&&(n=l.return)&&n.call(l)}finally{if(s)throw s.error}}return o};function nt(e){var t=e.zhName,n=e.enName,a=e.foregroundColour,l=e.backgroundColour,o=e.zhClassName,i=e.enClassName,r=e.passed,d=s.useRef(null),c=s.useRef(null),h=tt(s.useState({width:0}),2),f=h[0],p=h[1],u=tt(s.useState({width:0}),2),g=u[0],x=u[1];s.useEffect((function(){d.current&&p(d.current.getBBox()),c.current&&x(c.current.getBBox())}),[t,n]);var C=Ie/Math.max(Ie,f.width),y=Ie/Math.max(Ie,g.width),b={nameZh:{y:7.3+13.5*(1-C)*C/2},nameEn:{y:19.5-9*(1-y)*y/2}};return T.jsxs("g",{textAnchor:"middle",fill:r?m.white:a,children:[T.jsx(Ge,{fill:r?"#aaa":l}),T.jsx("text",{ref:d,className:o,fontSize:12,transform:"translate(0,".concat(b.nameZh.y,")scale(").concat(C,")"),dominantBaseline:"central",children:t}),T.jsx("text",{ref:c,className:i,fontSize:8,transform:"translate(0,".concat(b.nameEn.y,")scale(").concat(y,")"),dominantBaseline:"middle",children:n})]})}var at=function(){return at=Object.assign||function(e){for(var t,n=1,a=arguments.length;n=5?T.jsx(et,at({},e)):T.jsx(nt,at({},e))}})));var st=function(e,t){return void 0!==Ue(e)?1:void 0!==He(e,t)?2:3},lt=function(){return lt=Object.assign||function(e){for(var t,n=1,a=arguments.length;n0)&&!(a=l.next()).done;)o.push(a.value)}catch(i){s={error:i}}finally{try{a&&!a.done&&(n=l.return)&&n.call(l)}finally{if(s)throw s.error}}return o},ut=15;function gt(e){var t=e.Icon,n=e.lineNum,a=e.stnNum,l=e.strokeColour,o=e.passed,i=e.size,r=e.textClassName,d=ft(e,["Icon","lineNum","stnNum","strokeColour","passed","size","textClassName"]),m=s.useRef(null),c=s.useRef(null),h=pt(s.useState({width:0}),2),f=h[0],p=h[1],u=pt(s.useState({width:0}),2),g=u[0],x=u[1];s.useEffect((function(){m.current&&p(m.current.getBBox()),c.current&&x(c.current.getBBox())}),[n,a]);var C=ut/Math.max(ut,f.width),y=2===(null==n?void 0:n.length)&&2===(null==a?void 0:a.length)?C:ut/Math.max(ut,g.width),b="sm"===i?"0.7":"lg"===i?"1.4":1;return T.jsx("g",ht({},d,{children:T.jsxs("g",{transform:"scale(".concat(b,")"),children:[T.jsx(t,{stroke:o?"#aaa":l,filled:!n&&!a}),(n||a)&&T.jsxs("g",{textAnchor:"middle",fontSize:13.5,fill:o?"#aaa":"#000",children:[T.jsx("g",{transform:"translate(-9.25,0)scale(".concat(C,")"),children:T.jsx("text",{ref:m,className:r,dominantBaseline:"central",x:.5,children:n})}),T.jsx("g",{transform:"translate(9.25,0)scale(".concat(y,")"),children:T.jsx("text",{ref:c,className:r,dominantBaseline:"central",children:a})})]})]})}))}var xt=function(){return xt=Object.assign||function(e){for(var t,n=1,a=arguments.length;n0)&&!(a=l.next()).done;)o.push(a.value)}catch(i){s={error:i}}finally{try{a&&!a.done&&(n=l.return)&&n.call(l)}finally{if(s)throw s.error}}return o},Ot=function(e,t,n){if(n||2===arguments.length)for(var a,s=0,l=t.length;s=i.length)return console.warn(", anchor index ".concat(l," is out of bound")),[0,0];var e=wt(i[l],2);return[-e[0],-e[1]]}),[i,l]),2),d=r[0],m=r[1];return T.jsxs("g",vt({transform:"translate(".concat(d,",").concat(m,")")},o,{children:[t.map((function(e,t){var n=e.style,a=_t(n);return T.jsx(a,{stroke:"#aaa",filled:!0,strokeWidth:9.1,transform:"translate(".concat(i[t][0],",").concat(i[t][1],")")},t)})),t.map((function(e,t){var n=e.style,a=_t(n);return T.jsx(a,{stroke:"white",filled:!0,strokeWidth:3.3800000000000003,transform:"translate(".concat(i[t][0],",").concat(i[t][1],")")},t)})),t.length&&T.jsx("rect",{fill:"white",x:-12,y:i[0][1],width:24,height:2*-i[0][1]}),t.map((function(e,t){var a=e.style,s=jt(e,["style"]),l="fmetro"===a?Ct:bt;return T.jsx(l,vt({transform:"translate(".concat(i[t][0],",").concat(i[t][1],")"),textClassName:n},s),t)}))]}))}const St={...x,nameOffsetX:"right",nameOffsetY:"top",color:[d.Guangzhou,"gz1","#F3D03E",m.black],lineCode:"1",stationCode:"01",open:!0,secondaryNames:["",""],tram:!1},Nt={component:e=>{var t,a;const{id:s,x:l,y:i,attrs:r,handlePointerDown:d,handlePointerMove:m,handlePointerUp:c}=e,{names:h=x.names,nameOffsetX:f=St.nameOffsetX,nameOffsetY:p=St.nameOffsetY,color:u=St.color,lineCode:g=St.lineCode,stationCode:C=St.stationCode,open:y=St.open,secondaryNames:b=St.secondaryNames,tram:v=St.tram}=null!==(t=r[o.GzmtrBasic])&&void 0!==t?t:St,j=n.useCallback((e=>d(s,e)),[s,d]),w=n.useCallback((e=>m(s,e)),[s,m]),O=n.useCallback((e=>c(s,e)),[s,c]),_=n.useRef(null);null===(a=_.current)||void 0===a||null===(a=a.querySelector("path"))||void 0===a||a.setAttribute("id",`stn_core_${s}`);const k={en:v?5.08:6.56,zh:v?7.29:13.13},S={top:{namesPos:1,lineHeight:k.en,polarity:-1},middle:{namesPos:0,lineHeight:0,polarity:0},bottom:{namesPos:0,lineHeight:k.zh,polarity:1}},N=v?11:15,z="left"===f?-N:"right"===f?N:0,M=v?8:10,A=(h[S[p].namesPos].split("\n").length*S[p].lineHeight+M)*S[p].polarity,P="left"===f?"end":"right"===f?"start":y||"middle"!==f||""!==b.join("")?"middle":"end",B=n.useRef(null),[$,W]=n.useState(0);n.useEffect((()=>{var e,t;return W(null!==(e=null===(t=B.current)||void 0===t?void 0:t.getBBox().width)&&void 0!==e?e:0)}),[...b,v]);const E=n.useRef(null),[X,Y]=n.useState(0);n.useEffect((()=>{var e,t;return Y(null!==(e=null===(t=E.current)||void 0===t?void 0:t.getBBox().width)&&void 0!==e?e:0)}),[...h,v]);const R="middle"===f?X/2+($+24)/2:(X+($+24)/2)*("left"===f?-1:1),L="middle"===f&&""!==b.join("")?X/2+($+24):(X+$+(0!==$?24:0))*("left"===f?-1:"right"===f?1:0);return T.jsxs("g",{id:s,transform:`translate(${l}, ${i})`,children:[T.jsx("g",{transform:`scale(${.57915*(v?.729:1)})`,onPointerDown:j,onPointerMove:w,onPointerUp:O,style:{cursor:"move"},ref:_,children:T.jsx(bt,{id:`stn_core_${s}`,strokeColour:u[2],lineNum:""===g?void 0:g,stnNum:""===C?void 0:C,textClassName:"rmp-name__zh"})}),T.jsxs("g",{ref:E,transform:`translate(${z}, ${A})`,textAnchor:P,children:[T.jsx(xe,{text:h[0].split("\n"),fontSize:k.zh,lineHeight:k.zh,grow:"up",className:"rmp-name__zh"}),T.jsx(xe,{text:h[1].split("\n"),fontSize:k.en,lineHeight:k.en,grow:"down",className:"rmp-name__en"})]}),""!==b.join("")&&T.jsxs("g",{transform:`translate(${z+R}, ${A})`,textAnchor:"middle",children:[T.jsx("text",{fontSize:"13.13",dx:-($+5)/2,textAnchor:"end",dominantBaseline:"middle",className:"rmp-name__zh",children:"("}),T.jsx("text",{fontSize:"13.13",dx:($+5)/2,textAnchor:"start",dominantBaseline:"middle",className:"rmp-name__zh",children:")"}),T.jsxs("g",{ref:B,children:[T.jsx("text",{fontSize:"10",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:b[0]}),T.jsx("text",{fontSize:"5.42",dy:"2",dominantBaseline:"hanging",className:"rmp-name__en",children:b[1]})]})]}),!y&&T.jsxs("g",{transform:`translate(${z+L}, ${A})`,textAnchor:"middle"===f?"start":P,children:[T.jsx("text",{fontSize:"6.04",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:"(未开通)"}),T.jsx("text",{fontSize:"3.6",dy:"4",dominantBaseline:"hanging",className:"rmp-name__en",children:"(Under Construction)"})]})]})},icon:T.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:T.jsx("g",{transform:"translate(12,12)scale(0.45)",children:T.jsx(bt,{strokeColour:"#000",lineNum:"1",stnNum:"01"})})}),defaultAttrs:St,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:s}=e,{t:i}=a(),r=[{type:"textarea",label:i("panel.details.stations.common.nameZh"),value:n.names[0],onChange:e=>{n.names[0]=e,s(t,n)},minW:"full"},{type:"textarea",label:i("panel.details.stations.common.nameEn"),value:n.names[1],onChange:e=>{n.names[1]=e,s(t,n)},minW:"full"},{type:"select",label:i("panel.details.stations.common.nameOffsetX"),value:n.nameOffsetX,options:{left:i("panel.details.stations.common.left"),middle:i("panel.details.stations.common.middle"),right:i("panel.details.stations.common.right")},disabledOptions:"middle"===n.nameOffsetY?["middle"]:[],onChange:e=>{n.nameOffsetX=e,s(t,n)},minW:"full"},{type:"select",label:i("panel.details.stations.common.nameOffsetY"),value:n.nameOffsetY,options:{top:i("panel.details.stations.common.top"),middle:i("panel.details.stations.common.middle"),bottom:i("panel.details.stations.common.bottom")},disabledOptions:"middle"===n.nameOffsetX?["middle"]:[],onChange:e=>{n.nameOffsetY=e,s(t,n)},minW:"full"},{type:"custom",label:i("color"),component:T.jsx(c,{type:o.GzmtrBasic,defaultTheme:St.color})},{type:"input",label:i("panel.details.stations.common.lineCode"),value:n.lineCode,onChange:e=>{n.lineCode=e,s(t,n)},minW:"full"},{type:"input",label:i("panel.details.stations.common.stationCode"),value:n.stationCode,onChange:e=>{n.stationCode=e,s(t,n)},minW:"full"},{type:"switch",label:i("panel.details.stations.gzmtrBasic.open"),oneLine:!0,isChecked:n.open,onChange:e=>{n.open=e,s(t,n)},minW:"full"},{type:"input",label:i("panel.details.stations.gzmtrBasic.secondaryNameZh"),value:n.secondaryNames[0],onChange:e=>{n.secondaryNames[0]=e,s(t,n)},minW:"full"},{type:"input",label:i("panel.details.stations.gzmtrBasic.secondaryNameEn"),value:n.secondaryNames[1],onChange:e=>{n.secondaryNames[1]=e,s(t,n)},minW:"full"},{type:"switch",label:i("panel.details.stations.gzmtrBasic.tram"),oneLine:!0,isChecked:n.tram,onChange:e=>{n.tram=e,s(t,n)},minW:"full"}];return T.jsx(l,{fields:r})},metadata:{displayName:"panel.details.stations.gzmtrBasic.displayName",cities:[d.Guangzhou],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},zt=[d.Guangzhou,"","#AAAAAA",m.white,"","","gz"];function Mt(e){const{interchangeList:t,onAdd:s,onDelete:o,onUpdate:i}=e,r=C(),{paletteAppClip:{output:d}}=y((e=>e.runtime)),{t:m}=a(),[c,h]=n.useState();n.useEffect((()=>{void 0!==c&&d&&(null==i||i(c,[...d,t[c][4],t[c][5],t[c][6]]),h(void 0))}),[null==d?void 0:d.toString()]);const f=t.map(((e,t)=>[{type:"input",label:m("panel.details.stations.common.lineCode"),value:e[4],minW:"80px",onChange:n=>null==i?void 0:i(t,[e[0],e[1],e[2],e[3],n,e[5],e[6]])},{type:"input",label:m("panel.details.stations.common.stationCode"),value:e[5],minW:"80px",onChange:n=>null==i?void 0:i(t,[e[0],e[1],e[2],e[3],e[4],n,e[6]])}]));return T.jsxs(b,{direction:"column",children:[0===t.length&&T.jsxs(L,{spacing:.5,"data-testid":"interchange-card-stack",children:[T.jsx(D,{as:"i",flex:1,align:"center",fontSize:"md",colorScheme:"gray",children:m("panel.details.stations.interchange.noInterchanges")}),T.jsx(I,{size:"sm",variant:"ghost","aria-label":m("panel.details.stations.interchange.add"),onClick:()=>null==s?void 0:s(zt),icon:T.jsx(v,{})})]}),t.map(((e,n)=>T.jsxs(L,{spacing:.5,"data-testid":`interchange-card-stack-${n}`,children:[T.jsx(j,{label:m("color"),minW:"40px",noLabel:0!==n,children:T.jsx(w,{theme:[e[0],e[1],e[2],e[3]],onClick:()=>{h(n),r(O([e[0],e[1],e[2],e[3]]))}})}),T.jsx(l,{fields:f[n],noLabel:0!==n}),T.jsxs(H,{children:[s&&n===f.length-1?T.jsx(I,{size:"sm",variant:"ghost","aria-label":m("panel.details.stations.interchange.copy"),onClick:()=>null==s?void 0:s(t.slice(-1)[0]),icon:T.jsx(_,{})}):T.jsx(U,{minW:8}),o&&T.jsx(I,{size:"sm",variant:"ghost","aria-label":m("panel.details.stations.interchange.remove"),onClick:()=>null==o?void 0:o(n),icon:T.jsx(k,{})}),T.jsx(l,{fields:[{type:"switch",label:m("panel.details.stations.gzmtrInt.foshan"),isChecked:"fs"===e[6],onChange:t=>((e,t,n)=>null==i?void 0:i(t,[e[0],e[1],e[2],e[3],e[4],e[5],n?"fs":"gz"]))(e,n,t)}]})]})]},n)))]})}const At=[[[0,0]],[[0,0]],[[-18,0],[18,0]],[[-19.395,-11.198],[19.395,-11.198],[0,22.395]],[[-15.836,-15.836],[15.836,-15.836],[15.836,15.836],[-15.836,15.836]]],Pt={...x,nameOffsetX:"right",nameOffsetY:"top",transfer:[[],[]],open:!0,secondaryNames:["",""],tram:!1},Bt={component:e=>{var t,a,s,l,i,r,d,m,c,h,f,p,u,g,C,y,b,v,j,w,O,_,k,S;const{id:N,x:z,y:M,attrs:A,handlePointerDown:P,handlePointerMove:B,handlePointerUp:$}=e,{names:W=x.names,nameOffsetX:E=Pt.nameOffsetX,nameOffsetY:X=Pt.nameOffsetY,transfer:Y=Pt.transfer,open:R=Pt.open,secondaryNames:L=Pt.secondaryNames,tram:D=Pt.tram}=null!==(t=A[o.GzmtrInt])&&void 0!==t?t:Pt,I=n.useCallback((e=>P(N,e)),[N,P]),H=n.useCallback((e=>B(N,e)),[N,B]),U=n.useCallback((e=>$(N,e)),[N,$]),V=F("white","var(--chakra-colors-gray-800)"),G={en:D?5.08:6.56,zh:D?7.29:13.13},Z={top:{namesPos:1,lineHeight:G.en,polarity:-1},middle:{namesPos:0,lineHeight:0,polarity:0},bottom:{namesPos:0,lineHeight:G.zh,polarity:1}},Q=D?13:20,q=("left"===E?-Q:"right"===E?Q:0)*("middle"===X?1.2:1),J=D?8:11,K=(W[Z[X].namesPos].split("\n").length*Z[X].lineHeight+J*("middle"===E?1.8:1))*Z[X].polarity,ee="left"===E?"end":"right"===E?"start":R||"middle"!==E||""!==L.join("")?"middle":"end",te=Y.flat().slice(0,4),ne=[["black","black"],[null!==(a=null===(s=te.at(0))||void 0===s?void 0:s.at(2))&&void 0!==a?a:"black",null!==(l=null===(i=te.at(0))||void 0===i?void 0:i.at(2))&&void 0!==l?l:"black"],[null!==(r=null===(d=te.at(0))||void 0===d?void 0:d.at(2))&&void 0!==r?r:"black",null!==(m=null===(c=te.at(1))||void 0===c?void 0:c.at(2))&&void 0!==m?m:"black"],[null!==(h=null===(f=te.at(0))||void 0===f?void 0:f.at(2))&&void 0!==h?h:"black",null!==(p=null===(u=te.at(1))||void 0===u?void 0:u.at(2))&&void 0!==p?p:"black",null!==(g=null===(C=te.at(2))||void 0===C?void 0:C.at(2))&&void 0!==g?g:"black"],[null!==(y=null===(b=te.at(0))||void 0===b?void 0:b.at(2))&&void 0!==y?y:"black",null!==(v=null===(j=te.at(1))||void 0===j?void 0:j.at(2))&&void 0!==v?v:"black",null!==(w=null===(O=te.at(2))||void 0===O?void 0:O.at(2))&&void 0!==w?w:"black",null!==(_=null===(k=te.at(3))||void 0===k?void 0:k.at(2))&&void 0!==_?_:"black"]],ae=n.useRef(null),[se,le]=n.useState(0);n.useEffect((()=>{var e,t;return le(null!==(e=null===(t=ae.current)||void 0===t?void 0:t.getBBox().width)&&void 0!==e?e:0)}),[...L]);const oe=n.useRef(null),[ie,re]=n.useState(0);n.useEffect((()=>{var e,t;return re(null!==(e=null===(t=oe.current)||void 0===t?void 0:t.getBBox().width)&&void 0!==e?e:0)}),[...W]);const de=(ie+(se+24)/2)*("left"===E?-1:1),me=(ie+se+(0!==se?24:0))*("left"===E?-1:1);return T.jsxs("g",{id:N,transform:`translate(${z}, ${M})`,children:[te.map((e=>e[2])).filter(((e,t,n)=>n.indexOf(e)===t)).map((e=>T.jsx("marker",{id:`gzmtr_int_arrow_${e}`,markerWidth:"5",markerHeight:"5",refX:"1",refY:"1.25",orient:"auto",children:T.jsx("polygon",{points:"0.25,0 0.25,2.5 2.25,1.25",fill:e})},`gzmtr_int_arrow_${e}`))),T.jsxs("g",{transform:`scale(${.57915*(D?.729:1)})`,children:[te.length<=2&&T.jsxs(T.Fragment,{children:[T.jsx("path",{d:"M -18,-12 A 24 24 0 0 1 18,-12 L 18,12 A 24 24 0 0 1 -18,12 Z",fill:V}),T.jsx("path",{d:"M -18,-12 A 24 24 0 0 1 18,-12",fill:"none",stroke:ne[te.length][0],strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][0]})`}),T.jsx("path",{d:"M 18,12 A 24 24 0 0 1 -18,12",fill:"none",stroke:ne[te.length][1],strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][1]})`})]}),3===te.length&&T.jsxs(T.Fragment,{children:[T.jsx("circle",{r:"22.395",fill:V}),T.jsx("path",{d:"M -19.3948,11.1976 A 22.395 22.395 0 0 1 0,-22.395",fill:"none",stroke:ne[te.length][0],strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][0]})`}),T.jsx("path",{d:"M 0,-22.395 A 22.395 22.395 0 0 1 19.3948,11.1976",fill:"none",stroke:ne[te.length][1],strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][1]})`}),T.jsx("path",{d:"M 19.3948,11.1976 A 22.395 22.395 0 0 1 -19.3948,11.1976",fill:"none",stroke:ne[te.length][2],strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][2]})`}),T.jsx("path",{d:"M -19.3948,11.1976 A 22.395 22.395 0 0 1 0,-22.395",fill:"none",strokeOpacity:"0",stroke:"white",strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][0]})`}),T.jsx("path",{d:"M 0,-22.395 A 22.395 22.395 0 0 1 19.3948,11.1976",fill:"none",strokeOpacity:"0",stroke:"white",strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][1]})`})]}),te.length>=4&&T.jsxs(T.Fragment,{children:[T.jsx("circle",{r:"22.395",fill:V}),T.jsx("path",{d:"M -22.395,0 A 22.395 22.395 0 0 1 0,-22.395",fill:"none",stroke:ne[te.length][0],strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][0]})`}),T.jsx("path",{d:"M 0,-22.395 A 22.395 22.395 0 0 1 22.395,0",fill:"none",stroke:ne[te.length][1],strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][1]})`}),T.jsx("path",{d:"M 22.395,0 A 22.395 22.395 0 0 1 0,22.395",fill:"none",stroke:ne[te.length][2],strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][2]})`}),T.jsx("path",{d:"M 0,22.395 A 22.395 22.395 0 0 1 -22.395,0",fill:"none",stroke:ne[te.length][3],strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][3]})`}),T.jsx("path",{d:"M -22.395,0 A 22.395 22.395 0 0 1 0,-22.395",fill:"none",strokeOpacity:"0",stroke:"white",strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][0]})`}),T.jsx("path",{d:"M 0,-22.395 A 22.395 22.395 0 0 1 22.395,0",fill:"none",strokeOpacity:"0",stroke:"white",strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][1]})`}),T.jsx("path",{d:"M 22.395,0 A 22.395 22.395 0 0 1 0,22.395",fill:"none",strokeOpacity:"0",stroke:"white",strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][2]})`})]}),null===(S=Y[0])||void 0===S?void 0:S.map(((e,t,n)=>T.jsx("g",{transform:`translate(${At[n.length][t][0]},${At[n.length][t][1]})scale(0.6)`,children:"gz"===e[6]?T.jsx(bt,{strokeColour:e[2],lineNum:e[4],stnNum:e[5],textClassName:"rmp-name__zh"}):T.jsx(Ct,{strokeColour:e[2],lineNum:e[4],stnNum:e[5],textClassName:"rmp-name__zh"})},`gzmtr_int_${N}_stn_${t}`))),T.jsx("circle",{id:`stn_core_${N}`,r:3===te.length?22.395:18,fill:"white",fillOpacity:"0",onPointerDown:I,onPointerMove:H,onPointerUp:U,style:{cursor:"move"}})]}),T.jsxs("g",{ref:oe,transform:`translate(${q}, ${K})`,textAnchor:ee,children:[T.jsx(xe,{text:W[0].split("\n"),fontSize:G.zh,lineHeight:G.zh,grow:"up",className:"rmp-name__zh"}),T.jsx(xe,{text:W[1].split("\n"),fontSize:G.en,lineHeight:G.en,grow:"down",className:"rmp-name__en"})]}),""!==L.join("")&&T.jsxs("g",{transform:`translate(${q+de}, ${K})`,textAnchor:"middle",children:[T.jsx("text",{fontSize:"13.13",dx:-(se+5)/2,textAnchor:"end",dominantBaseline:"middle",className:"rmp-name__zh",children:"("}),T.jsx("text",{fontSize:"13.13",dx:(se+5)/2,textAnchor:"start",dominantBaseline:"middle",className:"rmp-name__zh",children:")"}),T.jsxs("g",{ref:ae,children:[T.jsx("text",{fontSize:"10",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:L[0]}),T.jsx("text",{fontSize:"5.42",dy:"2",dominantBaseline:"hanging",className:"rmp-name__en",children:L[1]})]})]}),!R&&T.jsxs("g",{transform:`translate(${q+me}, ${K})`,textAnchor:ee,children:[T.jsx("text",{fontSize:"6.04",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:"(未开通)"}),T.jsx("text",{fontSize:"3.6",dy:"4",dominantBaseline:"hanging",className:"rmp-name__en",children:"(Under Construction)"})]})]})},icon:T.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[T.jsx("g",{transform:"translate(6,12)scale(0.3)",children:T.jsx(bt,{strokeColour:"currentColor",lineNum:"1",stnNum:"09"})}),T.jsx("g",{transform:"translate(18,12)scale(0.3)",children:T.jsx(bt,{strokeColour:"currentColor",lineNum:"2",stnNum:"13"})}),T.jsx("marker",{id:"arrow",markerWidth:"5",markerHeight:"5",refX:"1",refY:"1.25",orient:"auto",children:T.jsx("polygon",{points:"0,0 0,3 2,1.5"})}),T.jsx("path",{d:"M 6,6 A 8 8 0 0 1 18,6",fill:"none",stroke:"currentColor",strokeWidth:"2",markerEnd:"url(#arrow)"}),T.jsx("path",{d:"M 18,18 A 8 8 0 0 1 6,18",fill:"none",stroke:"currentColor",strokeWidth:"2",markerEnd:"url(#arrow)"})]}),defaultAttrs:Pt,attrsComponent:e=>{var t;const{id:s,attrs:o,handleAttrsUpdate:i}=e,{t:r}=a(),d=[{type:"textarea",label:r("panel.details.stations.common.nameZh"),value:o.names[0],onChange:e=>{o.names[0]=e,i(s,o)},minW:"full"},{type:"textarea",label:r("panel.details.stations.common.nameEn"),value:o.names[1],onChange:e=>{o.names[1]=e,i(s,o)},minW:"full"},{type:"select",label:r("panel.details.stations.common.nameOffsetX"),value:o.nameOffsetX,options:{left:r("panel.details.stations.common.left"),middle:r("panel.details.stations.common.middle"),right:r("panel.details.stations.common.right")},disabledOptions:"middle"===o.nameOffsetY?["middle"]:[],onChange:e=>{o.nameOffsetX=e,i(s,o)},minW:"full"},{type:"select",label:r("panel.details.stations.common.nameOffsetY"),value:o.nameOffsetY,options:{top:r("panel.details.stations.common.top"),middle:r("panel.details.stations.common.middle"),bottom:r("panel.details.stations.common.bottom")},disabledOptions:"middle"===o.nameOffsetX?["middle"]:[],onChange:e=>{o.nameOffsetY=e,i(s,o)},minW:"full"},{type:"switch",label:r("panel.details.stations.gzmtrInt.open"),oneLine:!0,isChecked:o.open,onChange:e=>{o.open=e,i(s,o)},minW:"full"},{type:"input",label:r("panel.details.stations.gzmtrInt.secondaryNameZh"),value:o.secondaryNames[0],onChange:e=>{o.secondaryNames[0]=e,i(s,o)},minW:"full"},{type:"input",label:r("panel.details.stations.gzmtrInt.secondaryNameEn"),value:o.secondaryNames[1],onChange:e=>{o.secondaryNames[1]=e.toString(),i(s,o)},minW:"full"},{type:"switch",label:r("panel.details.stations.gzmtrBasic.tram"),oneLine:!0,isChecked:o.tram,onChange:e=>{o.tram=e,i(s,o)},minW:"full"}],m=[4,4,0],c=null!==(t=o.transfer)&&void 0!==t?t:Pt.transfer,h=e=>t=>{const n=structuredClone(c);if(n.length<=e)for(let a=n.length;a<=e;a++)n[a]=[zt];n[e].push(t),o.transfer=n,i(s,o)},f=e=>(t,n)=>{if(c.length>e&&c[e].length>t){const a=c.map(((a,s)=>s===e?a.map(((e,a)=>a===t?[0,1,2,3,4,5,6].map((t=>void 0===n[t]?e[t]:n[t])):e)):a));o.transfer=a,i(s,o)}};return T.jsxs(T.Fragment,{children:[T.jsx(l,{fields:d}),T.jsx(j,{label:r("panel.details.stations.interchange.title"),children:T.jsxs(H,{align:"flex-start",children:[c.map(((e,t)=>{return T.jsxs(n.Fragment,{children:[T.jsx(V,{size:"xs",children:r(0===t?"panel.details.stations.interchange.within":1===t?"panel.details.stations.interchange.outStation":"panel.details.stations.interchange.outSystem")}),T.jsx(Mt,{interchangeList:e,onAdd:m[t]>e.length?h(t):void 0,onDelete:(a=t,e=>{if(c.length>a&&c[a].length>e){const t=c.map(((t,n)=>n===a?t.filter(((t,n)=>n!==e)):t));o.transfer=t,i(s,o)}}),onUpdate:f(t)})]},t);var a})),m[c.length]>0&&T.jsx(G,{size:"xs",variant:"ghost",alignSelf:"flex-end",leftIcon:T.jsx(v,{}),onClick:()=>h(c.length)(zt),children:r("panel.details.stations.interchange.addGroup")})]})})]})},metadata:{displayName:"panel.details.stations.gzmtrInt.displayName",cities:[d.Guangzhou],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},$t=6.56,Wt=13.13,Et=structuredClone(Ce);Et.top.lineHeight=$t,Et.bottom.lineHeight=Wt;const Xt={...x,nameOffsetX:"right",nameOffsetY:"top",transfer:[[[d.Guangzhou,"gz1","#F3D03E",m.white,"1","14","gz"],[d.Guangzhou,"gz3","#ECA154",m.white,"3","11","gz"]]],open:!0,secondaryNames:["",""],preferVertical:!0,anchorAt:-1},Yt={component:e=>{var t,a;const{id:s,x:l,y:i,attrs:r,handlePointerDown:d,handlePointerMove:m,handlePointerUp:c}=e,{names:h=x.names,nameOffsetX:f=Xt.nameOffsetX,nameOffsetY:p=Xt.nameOffsetY,transfer:u=Xt.transfer,open:g=Xt.open,secondaryNames:C=Xt.secondaryNames,preferVertical:y=Xt.preferVertical,anchorAt:b=Xt.anchorAt}=null!==(t=r[o.GzmtrInt2024])&&void 0!==t?t:Xt,v=n.useCallback((e=>d(s,e)),[s,d]),j=n.useCallback((e=>m(s,e)),[s,m]),w=n.useCallback((e=>c(s,e)),[s,c]),O=u.flat().slice(0,4),_=n.useRef(null);null===(a=_.current)||void 0===a||null===(a=a.querySelectorAll("path"))||void 0===a||a.forEach((e=>e.setAttribute("id",`stn_core_${s}`)));const[k,S]=n.useState({x1:0,x2:0,y1:0,y2:0});n.useEffect((()=>{const{height:e,width:t,x:n,y:a}=_.current.getBBox(),[s,l]=[n+t,a+e];S({x1:n,x2:s,y1:a,y2:l})}),[JSON.stringify(O),y,b,S,_]);const N=y&&2===O.length?0:8,z=O.map((e=>({style:"gz"===e[6]?"gzmtr":"fmetro",lineNum:e[4],stnNum:e[5],strokeColour:e[2]}))),M="left"===f?k.x1+N:"right"===f?k.x2-N:0,A=(h[Et[p].namesPos].split("\n").length*Et[p].lineHeight+(k.y2-k.y1)/2)*Et[p].polarity,P="left"===f?"end":"right"===f?"start":g||"middle"!==f||""!==C.join("")?"middle":"end",B=n.useRef(null),[$,W]=n.useState(0);n.useEffect((()=>{var e,t;return W(null!==(e=null===(t=B.current)||void 0===t?void 0:t.getBBox().width)&&void 0!==e?e:0)}),[...C]);const E=n.useRef(null),[X,Y]=n.useState(0);n.useEffect((()=>{var e,t;return Y(null!==(e=null===(t=E.current)||void 0===t?void 0:t.getBBox().width)&&void 0!==e?e:0)}),[...h]);const R=(X+($+24)/2)*("left"===f?-1:1),L=(X+$+(0!==$?24:0))*("left"===f?-1:1);return T.jsxs("g",{id:s,transform:`translate(${l}, ${i})`,children:[T.jsx("g",{transform:"scale(0.56)",onPointerDown:v,onPointerMove:j,onPointerUp:w,style:{cursor:"move"},ref:_,children:T.jsx(kt,{stations:z,textClassName:"rmp-name__zh",preferVertical:y,anchorAt:b>=0?b:void 0})}),T.jsxs("g",{ref:E,transform:`translate(${M}, ${A})`,textAnchor:P,children:[T.jsx(xe,{text:h[0].split("\n"),fontSize:13.13,lineHeight:13.13,grow:"up",className:"rmp-name__zh"}),T.jsx(xe,{text:h[1].split("\n"),fontSize:6.56,lineHeight:6.56,grow:"down",className:"rmp-name__en"})]}),""!==C.join("")&&T.jsxs("g",{transform:`translate(${M+R}, ${A})`,textAnchor:"middle",children:[T.jsx("text",{fontSize:"13.13",dx:-($+5)/2,textAnchor:"end",dominantBaseline:"middle",className:"rmp-name__zh",children:"("}),T.jsx("text",{fontSize:"13.13",dx:($+5)/2,textAnchor:"start",dominantBaseline:"middle",className:"rmp-name__zh",children:")"}),T.jsxs("g",{ref:B,children:[T.jsx("text",{fontSize:"10",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:C[0]}),T.jsx("text",{fontSize:"5.42",dy:"2",dominantBaseline:"hanging",className:"rmp-name__en",children:C[1]})]})]}),!g&&T.jsxs("g",{transform:`translate(${M+L}, ${A})`,textAnchor:P,children:[T.jsx("text",{fontSize:"6.04",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:"(未开通)"}),T.jsx("text",{fontSize:"3.6",dy:"4",dominantBaseline:"hanging",className:"rmp-name__en",children:"(Under Construction)"})]})]})},icon:T.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:T.jsx(kt,{stations:[{strokeColour:"currentColor",lineNum:"3",stnNum:"03"},{strokeColour:"currentColor",lineNum:"7",stnNum:"05"}],textClassName:"rmp-name__zh",preferVertical:!0,transform:"translate(12,12)scale(0.3)"})}),defaultAttrs:Xt,attrsComponent:e=>{var t,s;const{id:o,attrs:i,handleAttrsUpdate:r}=e,{t:d}=a(),m=[{type:"textarea",label:d("panel.details.stations.common.nameZh"),value:i.names[0],onChange:e=>{i.names[0]=e,r(o,i)},minW:"full"},{type:"textarea",label:d("panel.details.stations.common.nameEn"),value:i.names[1],onChange:e=>{i.names[1]=e,r(o,i)},minW:"full"},{type:"select",label:d("panel.details.stations.common.nameOffsetX"),value:i.nameOffsetX,options:{left:d("panel.details.stations.common.left"),middle:d("panel.details.stations.common.middle"),right:d("panel.details.stations.common.right")},disabledOptions:"middle"===i.nameOffsetY?["middle"]:[],onChange:e=>{i.nameOffsetX=e,r(o,i)},minW:"full"},{type:"select",label:d("panel.details.stations.common.nameOffsetY"),value:i.nameOffsetY,options:{top:d("panel.details.stations.common.top"),middle:d("panel.details.stations.common.middle"),bottom:d("panel.details.stations.common.bottom")},disabledOptions:"middle"===i.nameOffsetX?["middle"]:[],onChange:e=>{i.nameOffsetY=e,r(o,i)},minW:"full"},{type:"select",label:d("panel.details.stations.gzmtrInt2024.anchorAt"),value:null!==(t=i.anchorAt)&&void 0!==t?t:"-1",options:{"-1":d("panel.details.stations.gzmtrInt2024.anchorAtNone"),...Object.fromEntries(Array.from({length:Math.min(i.transfer.flat().length,4)},((e,t)=>[t.toString(),t])))},onChange:e=>{i.anchorAt=Number(e),r(o,i)},minW:"full"},{type:"switch",label:d("panel.details.stations.gzmtrInt2024.preferVertical"),oneLine:!0,isChecked:i.preferVertical,onChange:e=>{i.preferVertical=e,r(o,i)},minW:"full"},{type:"switch",label:d("panel.details.stations.gzmtrInt.open"),oneLine:!0,isChecked:i.open,onChange:e=>{i.open=e,r(o,i)},minW:"full"},{type:"input",label:d("panel.details.stations.gzmtrInt.secondaryNameZh"),value:i.secondaryNames[0],onChange:e=>{i.secondaryNames[0]=e,r(o,i)},minW:"full"},{type:"input",label:d("panel.details.stations.gzmtrInt.secondaryNameEn"),value:i.secondaryNames[1],onChange:e=>{i.secondaryNames[1]=e.toString(),r(o,i)},minW:"full"}],c=[4,4,0],h=null!==(s=i.transfer)&&void 0!==s?s:Xt.transfer,f=e=>t=>{const n=structuredClone(h);if(n.length<=e)for(let a=n.length;a<=e;a++)n[a]=[zt];n[e].push(t),i.transfer=n,r(o,i)},p=e=>(t,n)=>{if(h.length>e&&h[e].length>t){const a=h.map(((a,s)=>s===e?a.map(((e,a)=>a===t?[0,1,2,3,4,5,6].map((t=>void 0===n[t]?e[t]:n[t])):e)):a));i.transfer=a,r(o,i)}};return T.jsxs(T.Fragment,{children:[T.jsx(l,{fields:m}),T.jsx(j,{label:d("panel.details.stations.interchange.title"),children:T.jsxs(H,{align:"flex-start",children:[h.map(((e,t)=>{return T.jsxs(n.Fragment,{children:[T.jsx(V,{size:"xs",children:d(0===t?"panel.details.stations.interchange.within":1===t?"panel.details.stations.interchange.outStation":"panel.details.stations.interchange.outSystem")}),T.jsx(Mt,{interchangeList:e,onAdd:c[t]>e.length?f(t):void 0,onDelete:(a=t,e=>{if(h.length>a&&h[a].length>e){const t=h.map(((t,n)=>n===a?t.filter(((t,n)=>n!==e)):t));i.transfer=t,i.anchorAt=-1,r(o,i)}}),onUpdate:p(t)})]},t);var a})),c[h.length]>0&&T.jsx(G,{size:"xs",variant:"ghost",alignSelf:"flex-end",leftIcon:T.jsx(v,{}),onClick:()=>f(h.length)(zt),children:d("panel.details.stations.interchange.addGroup")})]})})]})},metadata:{displayName:"panel.details.stations.gzmtrInt2024.displayName",cities:[d.Guangzhou],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},Rt={zh:9,en:6.2,top:7.2,middle:0,bottom:10},Tt={...x,nameOffsetX:"right",nameOffsetY:"top",open:!0},Lt=[{type:"textarea",label:"panel.details.stations.common.nameZh",value:e=>(null!=e?e:Tt).names[0],onChange:(e,t)=>{const n=null!=t?t:Tt;return n.names[0]=e.toString(),n}},{type:"textarea",label:"panel.details.stations.common.nameEn",value:e=>(null!=e?e:Tt).names[1],onChange:(e,t)=>{const n=null!=t?t:Tt;return n.names[1]=e.toString(),n}},{type:"select",label:"panel.details.stations.common.nameOffsetX",value:e=>(null!=e?e:Tt).nameOffsetX,options:{left:"left",middle:"middle",right:"right"},disabledOptions:e=>"middle"===(null==e?void 0:e.nameOffsetY)?["middle"]:[],onChange:(e,t)=>{const n=null!=t?t:Tt;return n.nameOffsetX=e,n}},{type:"select",label:"panel.details.stations.common.nameOffsetY",value:e=>(null!=e?e:Tt).nameOffsetY,options:{top:"top",middle:"middle",bottom:"bottom"},disabledOptions:e=>"middle"===(null==e?void 0:e.nameOffsetX)?["middle"]:[],onChange:(e,t)=>{const n=null!=t?t:Tt;return n.nameOffsetY=e,n}},{type:"switch",label:"panel.details.stations.bjsubwayBasic.open",oneLine:!0,isChecked:e=>(null!=e?e:Tt).open,onChange:(e,t)=>{const n=null!=t?t:Tt;return n.open=e,n}}],Dt={component:e=>{var t;const{id:a,x:s,y:l,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,nameOffsetX:h=Tt.nameOffsetX,nameOffsetY:f=Tt.nameOffsetY,open:p=Tt.open}=null!==(t=i[o.BjsubwayBasic])&&void 0!==t?t:Tt,u=n.useCallback((e=>r(a,e)),[a,r]),g=n.useCallback((e=>d(a,e)),[a,d]),C=n.useCallback((e=>m(a,e)),[a,m]),[y,b]=(j=f,"left"===(v=h)&&"top"===j?[-4,-(c[1].split("\n").length+(p?0:1))*Rt[j]-1]:"middle"===v&&"top"===j?[0,-(c[1].split("\n").length+(p?0:1))*Rt[j]-4]:"right"===v&&"top"===j?[4,-(c[1].split("\n").length+(p?0:1))*Rt[j]-1]:"left"===v&&"bottom"===j?[-4,c[0].split("\n").length*Rt[j]+1]:"middle"===v&&"bottom"===j?[0,c[0].split("\n").length*Rt[j]+4]:"right"===v&&"bottom"===j?[4,c[0].split("\n").length*Rt[j]+1]:"left"===v&&"middle"===j?[-5,0]:"right"===v&&"middle"===j?[5,0]:[0,0]);var v,j;const w="left"===h?"end":"right"===h?"start":"middle";return T.jsxs("g",{id:a,transform:`translate(${s}, ${l})`,children:[T.jsx("circle",{id:`stn_core_${a}`,r:"4",stroke:"black",strokeWidth:"0.5",strokeDasharray:p?void 0:"1.5",fill:"white",onPointerDown:u,onPointerMove:g,onPointerUp:C,style:{cursor:"move"}}),T.jsxs("g",{transform:`translate(${y}, ${b})`,textAnchor:w,children:[T.jsx(xe,{text:c[0].split("\n"),fontSize:Rt.zh,lineHeight:Rt.zh,grow:"up",className:"rmp-name__zh",baseOffset:1}),T.jsx(xe,{text:c[1].split("\n"),fontSize:Rt.en,lineHeight:Rt.en,grow:"down",className:"rmp-name__en",baseOffset:1}),!p&&T.jsx("text",{dy:c[1].split("\n").length*Rt.en+2,fontSize:Rt.en,dominantBaseline:"hanging",className:"rmp-name__zh",children:"(暂缓开通)"})]})]})},icon:T.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:T.jsx("circle",{cx:"12",cy:"12",r:"4",stroke:"currentColor",strokeWidth:"0.5",fill:"none"})}),defaultAttrs:Tt,attrsComponent:()=>T.jsx(S,{fields:Lt}),metadata:{displayName:"panel.details.stations.bjsubwayBasic.displayName",cities:[d.Beijing],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},It="M 8.359893 4.159288 C 8.368828 4.168825 8.460953 4.26852 8.57038 4.386985 C 8.679807 4.505449 8.860802 4.701382 8.972592 4.822389 C 9.084381 4.943397 9.238666 5.110407 9.315445 5.193521 C 9.392224 5.276636 9.519867 5.414817 9.599094 5.500589 C 9.678323 5.58636 9.801023 5.719209 9.871761 5.795812 C 9.942499 5.872413 10.000208 5.935256 9.999999 5.935465 C 9.999792 5.935671 9.975513 5.928466 9.946045 5.919453 C 9.916577 5.910439 9.831826 5.88438 9.757708 5.861543 C 9.683591 5.838706 9.532284 5.791997 9.421472 5.757746 C 9.310658 5.723495 9.190374 5.686309 9.154173 5.675113 C 9.11797 5.663918 9.048485 5.642428 8.99976 5.627359 C 8.951035 5.612291 8.910275 5.599729 8.909181 5.599446 C 8.907193 5.59893 8.907193 5.59893 8.907135 5.798288 C 8.907103 5.907935 8.906695 6.128369 8.906229 6.288144 C 8.905446 6.555825 8.905249 6.580968 8.903705 6.608245 C 8.902784 6.624527 8.90139 6.647987 8.900606 6.660379 C 8.899822 6.672773 8.898192 6.695836 8.896983 6.711632 C 8.895774 6.727427 8.893582 6.753074 8.892114 6.768627 C 8.890645 6.784179 8.888061 6.80923 8.88637 6.824296 C 8.884679 6.839362 8.88172 6.864065 8.879793 6.879189 C 8.877868 6.894315 8.874691 6.917777 8.872734 6.931325 C 8.870777 6.944874 8.867386 6.967292 8.865197 6.981143 C 8.863009 6.994995 8.859045 7.018654 8.856388 7.03372 C 8.853731 7.048786 8.849344 7.072617 8.84664 7.086676 C 8.843935 7.100736 8.839338 7.1236 8.836424 7.137486 C 8.833509 7.151371 8.828584 7.174065 8.825479 7.187916 C 8.822371 7.201767 8.817014 7.224831 8.81357 7.239167 C 8.810127 7.253505 8.80431 7.276767 8.800644 7.29086 C 8.796978 7.304955 8.791035 7.327222 8.787437 7.340344 C 8.78384 7.353467 8.77752 7.375735 8.773395 7.389829 C 8.769268 7.403923 8.762319 7.426986 8.757952 7.441081 C 8.753583 7.455174 8.746363 7.47784 8.741903 7.491448 C 8.737446 7.505056 8.729829 7.527523 8.724978 7.541374 C 8.720126 7.555225 8.712182 7.577493 8.707321 7.590858 C 8.702462 7.604224 8.6948 7.624901 8.690294 7.636807 C 8.68579 7.648715 8.677304 7.670452 8.671437 7.685113 C 8.665571 7.699773 8.656536 7.721842 8.651362 7.734155 C 8.646187 7.746468 8.63796 7.765688 8.63308 7.776865 C 8.628201 7.788043 8.620145 7.806136 8.615178 7.817071 C 8.610211 7.828006 8.60083 7.848286 8.594332 7.862138 C 8.587832 7.875988 8.573873 7.904618 8.563307 7.92576 C 8.552743 7.946901 8.537873 7.975929 8.530265 7.990266 C 8.522656 8.004602 8.511053 8.026075 8.504479 8.037983 C 8.497905 8.04989 8.486739 8.069772 8.479666 8.082165 C 8.472593 8.094558 8.460988 8.11444 8.453878 8.126348 C 8.446768 8.138254 8.435438 8.156944 8.428702 8.167879 C 8.421966 8.178814 8.410628 8.196906 8.403507 8.208085 C 8.396386 8.219262 8.384013 8.238349 8.37601 8.2505 C 8.36801 8.26265 8.354345 8.282929 8.345645 8.295566 C 8.336946 8.308201 8.322885 8.328276 8.314397 8.340175 C 8.305909 8.352074 8.292209 8.37096 8.283951 8.382147 C 8.275693 8.393333 8.261178 8.41259 8.251695 8.42494 C 8.242211 8.437289 8.225837 8.458165 8.215304 8.471332 C 8.204773 8.484497 8.189062 8.503819 8.18039 8.514267 C 8.17172 8.524716 8.157459 8.541616 8.148703 8.551823 C 8.139945 8.562029 8.125004 8.579116 8.115499 8.589793 C 8.105992 8.600471 8.091457 8.616575 8.083197 8.625581 C 8.074937 8.634586 8.060843 8.649709 8.05188 8.659185 C 8.042916 8.668662 8.018659 8.69335 7.997974 8.714046 C 7.977291 8.734741 7.953162 8.758432 7.944355 8.766693 C 7.935549 8.774953 7.920821 8.788638 7.911628 8.797104 C 7.902433 8.805571 7.887569 8.819082 7.878597 8.827129 C 7.869623 8.835177 7.853733 8.849096 7.843284 8.858062 C 7.832834 8.867027 7.816133 8.881153 7.806171 8.889453 C 7.796208 8.897753 7.779904 8.911098 7.769942 8.919111 C 7.759978 8.927123 7.743874 8.939848 7.734154 8.947388 C 7.724434 8.954926 7.708329 8.96721 7.698366 8.974683 C 7.688403 8.982156 7.673093 8.993497 7.664346 8.999885 C 7.655598 9.006271 7.637505 9.019163 7.62414 9.02853 C 7.610775 9.037899 7.588109 9.053377 7.573772 9.062926 C 7.559434 9.072475 7.538474 9.086151 7.527194 9.093318 C 7.515913 9.100485 7.497422 9.112045 7.486104 9.119009 C 7.474786 9.125973 7.454846 9.137918 7.441793 9.145553 C 7.428741 9.153188 7.405677 9.166317 7.390542 9.174728 C 7.375406 9.18314 7.352087 9.19579 7.338722 9.20284 C 7.325357 9.209889 7.303686 9.221025 7.290564 9.227587 C 7.277442 9.234147 7.256366 9.2444 7.243731 9.250369 C 7.231095 9.256339 7.211213 9.265569 7.199549 9.27088 C 7.187884 9.27619 7.168797 9.28464 7.157134 9.289659 C 7.145469 9.294676 7.124792 9.303333 7.111184 9.308895 C 7.097576 9.31446 7.075367 9.323255 7.061831 9.328442 C 7.048295 9.333629 7.027816 9.341289 7.016323 9.345462 C 7.00483 9.349636 6.978328 9.358748 6.95743 9.365711 C 6.936532 9.372675 6.906311 9.382359 6.890272 9.38723 C 6.874235 9.392101 6.849581 9.399302 6.835486 9.403231 C 6.821393 9.40716 6.796739 9.413705 6.7807 9.417776 C 6.764662 9.421847 6.740208 9.427785 6.726356 9.430971 C 6.712505 9.434157 6.689641 9.439174 6.675548 9.442118 C 6.661452 9.445063 6.639384 9.449434 6.626504 9.451833 C 6.613625 9.454231 6.591038 9.458187 6.57631 9.460623 C 6.561581 9.463058 6.538518 9.46664 6.525058 9.468584 C 6.511598 9.470528 6.487662 9.473704 6.471867 9.475644 C 6.456071 9.477583 6.433207 9.480169 6.421057 9.481392 C 6.408907 9.482615 6.387236 9.4846 6.372898 9.485805 C 6.358561 9.487008 6.333112 9.488794 6.316345 9.489771 C 6.299578 9.490749 6.276316 9.491956 6.264652 9.492452 C 6.252987 9.492949 6.216803 9.493517 6.18424 9.493716 C 6.151678 9.493916 6.114499 9.493756 6.10162 9.493363 C 6.088739 9.49297 6.06866 9.492202 6.056995 9.491656 C 6.045331 9.491112 6.026046 9.490059 6.014138 9.489319 C 6.002231 9.488579 5.982548 9.487186 5.970398 9.486226 C 5.958248 9.485266 5.939956 9.483668 5.92975 9.482677 C 5.919544 9.481687 5.902445 9.479897 5.891753 9.478702 C 5.881061 9.477505 5.864443 9.475529 5.854823 9.47431 C 5.845204 9.47309 5.827708 9.470707 5.815943 9.469012 C 5.804178 9.467319 5.784412 9.464314 5.77202 9.462336 C 5.759627 9.460358 5.745908 9.458071 5.741535 9.457253 C 5.733583 9.455767 5.733583 9.455767 5.750813 9.451963 C 5.76029 9.449871 5.778183 9.445793 5.790576 9.442902 C 5.802969 9.440009 5.82305 9.435088 5.8352 9.431966 C 5.847351 9.428843 5.867067 9.423503 5.879014 9.420099 C 5.890961 9.416695 5.911639 9.410524 5.924964 9.406386 C 5.938288 9.402248 5.960324 9.395124 5.973932 9.390556 C 5.98754 9.385988 6.008053 9.378835 6.019516 9.374659 C 6.030978 9.370483 6.050462 9.363131 6.062815 9.358321 C 6.075166 9.353508 6.094417 9.34577 6.105595 9.341125 C 6.116774 9.336478 6.135264 9.328524 6.146685 9.323448 C 6.158106 9.318373 6.177591 9.309499 6.189984 9.303728 C 6.202377 9.297957 6.224247 9.287379 6.238585 9.280221 C 6.252921 9.273063 6.273399 9.262563 6.284092 9.256887 C 6.294784 9.251213 6.314865 9.240225 6.328716 9.232468 C 6.342567 9.224712 6.361654 9.213777 6.371131 9.208166 C 6.380608 9.202557 6.396514 9.192982 6.406477 9.18689 C 6.41644 9.180798 6.432345 9.170843 6.441822 9.164769 C 6.4513 9.158695 6.467404 9.14816 6.47761 9.141357 C 6.487816 9.134555 6.50392 9.123611 6.513398 9.117039 C 6.522875 9.110467 6.539177 9.098936 6.549627 9.091415 C 6.560077 9.083895 6.577971 9.070704 6.589391 9.062101 C 6.600812 9.053498 6.618895 9.039583 6.629575 9.031179 C 6.640255 9.022773 6.656757 9.009534 6.666247 9.001758 C 6.675736 8.993981 6.692227 8.980227 6.702893 8.971191 C 6.713559 8.962157 6.730458 8.94742 6.740448 8.938442 C 6.750437 8.929464 6.766562 8.914768 6.776282 8.905784 C 6.786003 8.896801 6.803698 8.880239 6.815604 8.868983 C 6.827512 8.857727 6.843456 8.842402 6.851037 8.834927 C 6.858617 8.827451 6.873728 8.812176 6.884615 8.800982 C 6.895503 8.789788 6.912683 8.77174 6.922792 8.760878 C 6.932902 8.750012 6.949699 8.731606 6.960117 8.719973 C 6.970537 8.70834 6.986147 8.690599 6.994807 8.68055 C 7.003467 8.670501 7.017852 8.65353 7.026772 8.642838 C 7.035693 8.632146 7.053 8.610872 7.065231 8.595562 C 7.077464 8.580254 7.09533 8.557407 7.104936 8.544792 C 7.114541 8.532177 7.129989 8.511499 7.139265 8.498842 C 7.14854 8.486185 7.164221 8.464337 7.174109 8.450293 C 7.183999 8.436249 7.199718 8.413383 7.209044 8.399484 C 7.218369 8.385583 7.232209 8.364666 7.2398 8.353003 C 7.247391 8.341338 7.260236 8.321177 7.268346 8.3082 C 7.276455 8.295223 7.289493 8.27395 7.297318 8.260925 C 7.305143 8.247901 7.317313 8.227304 7.32436 8.215153 C 7.331408 8.203004 7.344023 8.180735 7.352394 8.165669 C 7.360765 8.150602 7.372812 8.128534 7.379167 8.116627 C 7.385522 8.104719 7.396764 8.083248 7.404151 8.06891 C 7.411537 8.054573 7.422352 8.0331 7.428184 8.021194 C 7.434016 8.009287 7.443347 7.990001 7.448918 7.978336 C 7.45449 7.966672 7.463351 7.947784 7.468609 7.936364 C 7.473868 7.924943 7.482234 7.906453 7.4872 7.895274 C 7.492166 7.884096 7.500586 7.86481 7.505909 7.852417 C 7.511233 7.840024 7.519759 7.819808 7.524855 7.807493 C 7.529951 7.795179 7.538242 7.7747 7.543279 7.761986 C 7.548316 7.749271 7.556671 7.727735 7.561847 7.714127 C 7.567022 7.700519 7.57545 7.677853 7.580575 7.663759 C 7.585701 7.649664 7.594637 7.624414 7.600433 7.607646 C 7.60623 7.59088 7.615365 7.563642 7.620735 7.547118 C 7.626104 7.530593 7.634661 7.503554 7.63975 7.48703 C 7.644838 7.470506 7.653173 7.442472 7.658273 7.424733 C 7.663371 7.406994 7.671309 7.378562 7.675913 7.361553 C 7.680518 7.344542 7.688414 7.314123 7.69346 7.293953 C 7.698508 7.273784 7.705483 7.244955 7.708961 7.229889 C 7.712439 7.214823 7.717614 7.19176 7.720461 7.178638 C 7.723308 7.165516 7.728016 7.143247 7.730923 7.129154 C 7.733829 7.115059 7.738621 7.090804 7.74157 7.075251 C 7.74452 7.0597 7.749294 7.033455 7.752179 7.016931 C 7.755066 7.000407 7.759431 6.974154 7.761884 6.958592 C 7.764333 6.94303 7.768123 6.917978 7.770304 6.902922 C 7.772485 6.887866 7.775877 6.86322 7.777843 6.848155 C 7.779809 6.833088 7.783001 6.807043 7.784938 6.790275 C 7.786876 6.773509 7.789651 6.74806 7.791106 6.733722 C 7.792561 6.719385 7.794953 6.693936 7.796421 6.677169 C 7.797888 6.660402 7.800071 6.632964 7.801272 6.616198 C 7.802474 6.599431 7.804076 6.575174 7.804832 6.562295 C 7.80559 6.549416 7.806592 6.532119 7.807061 6.523856 C 7.807529 6.515595 7.80835 6.421553 7.808886 6.314875 C 7.809421 6.208197 7.809724 6.003942 7.80956 5.860975 C 7.809398 5.718009 7.809015 5.600789 7.808712 5.600486 C 7.808408 5.600182 7.68663 5.63752 7.538092 5.68346 C 7.389553 5.7294 7.213946 5.783698 7.147853 5.804122 C 7.08176 5.824546 6.974794 5.857548 6.910151 5.877461 C 6.845508 5.897371 6.776261 5.918652 6.75627 5.924749 C 6.736279 5.930848 6.719744 5.935658 6.719525 5.93544 C 6.719306 5.935221 6.790938 5.857274 6.878708 5.762224 C 6.966477 5.667175 7.110461 5.511271 7.198671 5.415771 C 7.286881 5.320272 7.433807 5.161213 7.525173 5.062309 C 7.616539 4.963404 7.76605 4.801562 7.857421 4.702663 C 7.948792 4.603762 8.093983 4.446596 8.180069 4.353404 C 8.266154 4.260212 8.341831 4.178411 8.34824 4.171626 L 8.359893 4.159288 Z M 3.639928 8.15987 C 3.639606 8.15984 3.567056 8.081517 3.478708 7.985821 C 3.390359 7.890125 3.197014 7.680786 3.049051 7.520623 C 2.901089 7.36046 2.662314 7.101986 2.518441 6.946236 C 2.374568 6.790486 2.198977 6.60038 2.128238 6.523779 C 2.0575 6.447177 1.999793 6.384333 2 6.384126 C 2.000208 6.383919 2.024487 6.391125 2.053954 6.40014 C 2.083422 6.409154 2.157237 6.431839 2.217988 6.450549 C 2.278738 6.469259 2.375968 6.499262 2.434052 6.517222 C 2.492137 6.535182 2.553174 6.55407 2.569692 6.559195 C 2.586209 6.564321 2.709718 6.602509 2.844157 6.644057 C 2.978595 6.685606 3.089538 6.719839 3.090698 6.72013 C 3.092807 6.72066 3.092807 6.72066 3.092866 6.520418 C 3.092898 6.410285 3.093306 6.18985 3.093772 6.030562 C 3.094553 5.763748 3.094752 5.738617 3.096295 5.711344 C 3.097217 5.695064 3.098611 5.671603 3.099395 5.659211 C 3.100178 5.646816 3.101808 5.623754 3.103017 5.607958 C 3.104227 5.592164 3.106418 5.566515 3.107887 5.550963 C 3.109355 5.535411 3.111941 5.51036 3.113633 5.495295 C 3.115324 5.480227 3.118114 5.456767 3.119833 5.443159 C 3.121551 5.429551 3.124544 5.407283 3.126484 5.393674 C 3.128424 5.380066 3.13179 5.357599 3.133963 5.343748 C 3.136135 5.329897 3.139918 5.307034 3.142369 5.292939 C 3.144819 5.278845 3.149205 5.254788 3.152116 5.239479 C 3.155027 5.224168 3.159971 5.199397 3.163101 5.184428 C 3.16623 5.169459 3.171352 5.145801 3.174481 5.131851 C 3.17761 5.117902 3.182986 5.094759 3.18643 5.080422 C 3.189873 5.066085 3.19569 5.042824 3.199356 5.028729 C 3.203022 5.014635 3.208965 4.992367 3.212563 4.979245 C 3.21616 4.966123 3.222479 4.943855 3.226605 4.929761 C 3.230732 4.915667 3.237681 4.892604 3.242049 4.878509 C 3.246417 4.864415 3.253638 4.84175 3.258096 4.828142 C 3.262555 4.814533 3.270171 4.792067 3.275023 4.778216 C 3.279873 4.764364 3.287818 4.742096 3.292678 4.728731 C 3.297538 4.715366 3.3052 4.694689 3.309704 4.682783 C 3.31421 4.670875 3.322696 4.649137 3.328563 4.634478 C 3.33443 4.619817 3.343463 4.597748 3.348639 4.585434 C 3.353813 4.573122 3.36204 4.553902 3.36692 4.542725 C 3.371799 4.531547 3.379856 4.513454 3.384823 4.502518 C 3.389789 4.491583 3.39917 4.471303 3.405668 4.457452 C 3.412167 4.443601 3.426129 4.414971 3.436694 4.39383 C 3.44726 4.372689 3.461914 4.344058 3.469262 4.330207 C 3.476608 4.316357 3.488427 4.294487 3.495524 4.281607 C 3.502622 4.268728 3.514584 4.247454 3.522105 4.234332 C 3.529628 4.22121 3.541034 4.201699 3.547455 4.190976 C 3.553874 4.180251 3.564621 4.162556 3.571336 4.151653 C 3.578052 4.14075 3.589372 4.122683 3.596493 4.111505 C 3.603614 4.100327 3.615987 4.081241 3.623989 4.069091 C 3.631991 4.056941 3.645655 4.036661 3.654354 4.024024 C 3.663054 4.011388 3.677115 3.991314 3.685603 3.979416 C 3.694091 3.967517 3.707792 3.948628 3.716049 3.937443 C 3.724308 3.926256 3.738823 3.906999 3.748305 3.89465 C 3.757787 3.882301 3.774164 3.861424 3.784696 3.848259 C 3.795227 3.835093 3.810939 3.815771 3.81961 3.805323 C 3.828281 3.794872 3.84254 3.777973 3.851297 3.767766 C 3.860054 3.757562 3.874996 3.740475 3.884502 3.729796 C 3.894008 3.719119 3.908543 3.703013 3.916803 3.694009 C 3.925064 3.685003 3.939156 3.669882 3.94812 3.660404 C 3.957083 3.650928 3.981341 3.626241 4.002025 3.605544 C 4.02271 3.584848 4.046838 3.561157 4.055645 3.552897 C 4.064451 3.544637 4.079179 3.530951 4.088373 3.522486 C 4.097566 3.514019 4.11243 3.500508 4.121404 3.49246 C 4.130376 3.484412 4.146267 3.470493 4.156716 3.461528 C 4.167165 3.452562 4.183867 3.438437 4.19383 3.430137 C 4.203792 3.421837 4.220096 3.408491 4.230059 3.400478 C 4.240022 3.392467 4.256126 3.379735 4.265846 3.372187 C 4.275566 3.364638 4.294852 3.349997 4.308703 3.33965 C 4.322554 3.329302 4.342636 3.314602 4.353327 3.306981 C 4.364019 3.299361 4.382311 3.28654 4.393975 3.27849 C 4.405639 3.270441 4.42466 3.257609 4.436245 3.249977 C 4.447829 3.242345 4.465922 3.230637 4.476451 3.223961 C 4.486979 3.217284 4.504342 3.206445 4.515034 3.199872 C 4.525727 3.193299 4.545155 3.181674 4.558207 3.174039 C 4.571259 3.166403 4.594323 3.153273 4.609458 3.14486 C 4.624594 3.13645 4.647913 3.123799 4.661278 3.11675 C 4.674643 3.1097 4.696314 3.098564 4.709436 3.092004 C 4.722558 3.085442 4.74403 3.075004 4.757153 3.068806 C 4.770275 3.062607 4.791488 3.052789 4.804292 3.046986 C 4.817096 3.041182 4.837177 3.03234 4.848916 3.027336 C 4.860656 3.022333 4.879611 3.014428 4.89104 3.009769 C 4.902469 3.00511 4.923146 2.996942 4.93699 2.991619 C 4.950833 2.986296 4.971702 2.978476 4.983366 2.97424 C 4.99503 2.970004 5.021672 2.960841 5.042571 2.953878 C 5.063468 2.946914 5.093689 2.937231 5.109727 2.93236 C 5.125765 2.927489 5.150419 2.920288 5.164514 2.916359 C 5.178607 2.912431 5.203261 2.905885 5.219299 2.901814 C 5.235338 2.897742 5.259793 2.891805 5.273643 2.888619 C 5.287495 2.885432 5.310359 2.880417 5.324453 2.877472 C 5.338548 2.874528 5.360616 2.870155 5.373496 2.867757 C 5.386374 2.865358 5.408962 2.861403 5.42369 2.858968 C 5.438418 2.856532 5.461482 2.85295 5.474941 2.851007 C 5.488403 2.849062 5.512338 2.845885 5.528134 2.843946 C 5.543929 2.842007 5.566793 2.83942 5.578943 2.838198 C 5.591094 2.836976 5.612764 2.83499 5.627101 2.833786 C 5.641439 2.832582 5.666887 2.830797 5.683655 2.829821 C 5.700423 2.828844 5.724281 2.827635 5.736673 2.827131 C 5.749067 2.826628 5.779487 2.825963 5.804273 2.825654 C 5.831717 2.825312 5.864715 2.825499 5.888661 2.826133 C 5.910288 2.826705 5.935936 2.827562 5.945656 2.828037 C 5.955376 2.828513 5.97327 2.829513 5.98542 2.830258 C 5.99757 2.831004 6.017452 2.832401 6.029602 2.833363 C 6.041752 2.834323 6.060044 2.83592 6.07025 2.836912 C 6.080456 2.837903 6.097554 2.839693 6.108246 2.840889 C 6.118938 2.842084 6.135557 2.84406 6.145177 2.84528 C 6.154796 2.846498 6.172292 2.848883 6.184057 2.850577 C 6.195822 2.852271 6.215388 2.855248 6.227539 2.857194 C 6.239688 2.859139 6.253395 2.861429 6.257997 2.862283 C 6.266363 2.863834 6.266363 2.863834 6.249159 2.867633 C 6.239698 2.869721 6.221817 2.873796 6.209424 2.876689 C 6.197031 2.87958 6.17695 2.884501 6.1648 2.887624 C 6.152649 2.890747 6.132933 2.896087 6.120986 2.899491 C 6.109038 2.902895 6.088361 2.909066 6.075037 2.913204 C 6.061712 2.917341 6.039675 2.924465 6.026067 2.929032 C 6.012459 2.933601 5.991946 2.940756 5.980484 2.944931 C 5.969021 2.949106 5.949537 2.95646 5.937186 2.961273 C 5.924834 2.966085 5.905422 2.973896 5.894048 2.978628 C 5.882673 2.983361 5.864182 2.991314 5.852958 2.996302 C 5.841733 3.001288 5.822409 3.010091 5.810017 3.015862 C 5.797623 3.021632 5.775753 3.032209 5.761416 3.039369 C 5.747078 3.046527 5.726601 3.057027 5.715909 3.062701 C 5.705216 3.068377 5.685135 3.079366 5.671284 3.087121 C 5.657433 3.094877 5.638347 3.105814 5.628869 3.111423 C 5.619392 3.117034 5.603487 3.126609 5.593524 3.1327 C 5.58356 3.138793 5.567655 3.148746 5.558177 3.15482 C 5.5487 3.160895 5.532596 3.171429 5.522389 3.178233 C 5.512184 3.185035 5.496079 3.195978 5.486602 3.202551 C 5.477125 3.209123 5.460822 3.220655 5.450372 3.228179 C 5.439923 3.235703 5.423421 3.247832 5.413702 3.255136 C 5.403981 3.262436 5.386883 3.27556 5.375705 3.284297 C 5.364527 3.293035 5.346831 3.307168 5.336382 3.315704 C 5.325933 3.32424 5.308455 3.338784 5.297544 3.348024 C 5.286631 3.357265 5.269532 3.372169 5.259547 3.381148 C 5.249561 3.390125 5.233438 3.404821 5.223718 3.413807 C 5.213998 3.422791 5.196302 3.439351 5.184396 3.450605 C 5.172488 3.461862 5.156544 3.477188 5.148963 3.484664 C 5.141382 3.492139 5.126272 3.507414 5.115385 3.518608 C 5.104497 3.529801 5.087317 3.547848 5.077208 3.558713 C 5.067098 3.569577 5.050301 3.587983 5.039882 3.599617 C 5.029463 3.61125 5.013853 3.62899 5.005193 3.639039 C 4.996532 3.649089 4.982148 3.666059 4.973228 3.676752 C 4.964307 3.687445 4.947 3.708717 4.934769 3.724027 C 4.922537 3.739336 4.90467 3.762184 4.895064 3.774798 C 4.885458 3.787414 4.870011 3.808089 4.860735 3.820748 C 4.85146 3.833405 4.835779 3.855252 4.825891 3.869297 C 4.816002 3.883342 4.800281 3.906206 4.790956 3.920107 C 4.781631 3.934007 4.767791 3.954923 4.760201 3.966587 C 4.75261 3.978251 4.739764 3.998412 4.731654 4.01139 C 4.723545 4.024366 4.710507 4.04564 4.702682 4.058664 C 4.694856 4.071689 4.682687 4.092286 4.67564 4.104437 C 4.668592 4.116586 4.655977 4.138854 4.647606 4.15392 C 4.639235 4.168986 4.627187 4.191055 4.620833 4.202963 C 4.614478 4.214869 4.603237 4.236342 4.59585 4.250679 C 4.588463 4.265017 4.577648 4.286489 4.571816 4.298396 C 4.565984 4.310304 4.556654 4.329589 4.551082 4.341253 C 4.54551 4.352918 4.536649 4.371806 4.53139 4.383226 C 4.526132 4.394647 4.517766 4.413137 4.512801 4.424315 C 4.507834 4.435493 4.499414 4.45478 4.494091 4.467174 C 4.488767 4.479566 4.480241 4.499781 4.475145 4.512096 C 4.470048 4.524411 4.461758 4.544889 4.456721 4.557603 C 4.451684 4.570319 4.443329 4.591855 4.438153 4.605463 C 4.432978 4.619071 4.42455 4.641737 4.419425 4.65583 C 4.414299 4.669925 4.405364 4.695175 4.399567 4.711941 C 4.393771 4.72871 4.384635 4.755947 4.379265 4.772473 C 4.373896 4.788996 4.365339 4.816035 4.36025 4.83256 C 4.355162 4.849085 4.346827 4.877117 4.341728 4.894857 C 4.336629 4.912596 4.328691 4.941027 4.324087 4.958037 C 4.319483 4.975048 4.311586 5.005467 4.30654 5.025636 C 4.301492 5.045806 4.294517 5.074635 4.291039 5.0897 C 4.287562 5.104767 4.282386 5.12783 4.279539 5.140952 C 4.276692 5.154074 4.271984 5.176342 4.269077 5.190436 C 4.266171 5.20453 4.261379 5.228786 4.25843 5.244339 C 4.25548 5.259891 4.250707 5.286135 4.24782 5.302659 C 4.244935 5.319183 4.240569 5.345436 4.238118 5.360997 C 4.235666 5.37656 4.231877 5.40161 4.229696 5.416667 C 4.227515 5.431724 4.224122 5.456368 4.222157 5.471435 C 4.220191 5.486501 4.216998 5.512547 4.215061 5.529314 C 4.213124 5.546082 4.210349 5.571529 4.208893 5.585867 C 4.207439 5.600204 4.205048 5.625653 4.20358 5.642421 C 4.202112 5.659187 4.199928 5.686625 4.198727 5.703393 C 4.197526 5.720159 4.195924 5.744415 4.195167 5.757294 C 4.194409 5.770174 4.193407 5.787471 4.192938 5.795733 C 4.192471 5.803995 4.19165 5.898036 4.191115 6.004715 C 4.19058 6.111393 4.190277 6.315648 4.190439 6.458614 C 4.190602 6.601581 4.190984 6.718802 4.191288 6.719105 C 4.191591 6.719408 4.313371 6.682069 4.461908 6.636129 C 4.610447 6.590189 4.786054 6.535892 4.852147 6.515468 C 4.91824 6.495043 5.025205 6.462041 5.089849 6.442131 C 5.154491 6.422219 5.223739 6.400939 5.243729 6.39484 C 5.263721 6.388742 5.280256 6.383932 5.280475 6.38415 C 5.280694 6.384369 5.209062 6.462315 5.121291 6.557364 C 5.033521 6.652413 4.889537 6.808317 4.801327 6.903816 C 4.713117 6.999316 4.56619 7.158374 4.474826 7.25728 C 4.383461 7.356185 4.23395 7.518026 4.14258 7.616927 C 4.051209 7.715828 3.906015 7.872994 3.819926 7.966186 C 3.733837 8.059378 3.658251 8.141094 3.651957 8.147776 C 3.645663 8.154458 3.64025 8.159901 3.639928 8.15987 Z",Ht={...x,nameOffsetX:"right",nameOffsetY:"top",outOfStation:!1},Ut=[{type:"textarea",label:"panel.details.stations.common.nameZh",value:e=>(null!=e?e:Ht).names[0],onChange:(e,t)=>{const n=null!=t?t:Ht;return n.names[0]=e.toString(),n}},{type:"textarea",label:"panel.details.stations.common.nameEn",value:e=>(null!=e?e:Ht).names[1],onChange:(e,t)=>{const n=null!=t?t:Ht;return n.names[1]=e.toString(),n}},{type:"select",label:"panel.details.stations.common.nameOffsetX",value:e=>(null!=e?e:Ht).nameOffsetX,options:{left:"left",middle:"middle",right:"right"},disabledOptions:e=>"middle"===(null==e?void 0:e.nameOffsetY)?["middle"]:[],onChange:(e,t)=>{const n=null!=t?t:Ht;return n.nameOffsetX=e,n}},{type:"select",label:"panel.details.stations.common.nameOffsetY",value:e=>(null!=e?e:Ht).nameOffsetY,options:{top:"top",middle:"middle",bottom:"bottom"},disabledOptions:e=>"middle"===(null==e?void 0:e.nameOffsetX)?["middle"]:[],onChange:(e,t)=>{const n=null!=t?t:Ht;return n.nameOffsetY=e,n}},{type:"switch",label:"panel.details.stations.bjsubwayInt.outOfStation",oneLine:!0,isChecked:e=>(null!=e?e:Ht).outOfStation,onChange:(e,t)=>{const n=null!=t?t:Ht;return n.outOfStation=e,n}}],Ft={component:e=>{var t;const{id:a,x:s,y:l,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,nameOffsetX:h=Ht.nameOffsetX,nameOffsetY:f=Ht.nameOffsetY,outOfStation:p=Ht.outOfStation}=null!==(t=i[o.BjsubwayInt])&&void 0!==t?t:Ht,u=n.useCallback((e=>r(a,e)),[a,r]),g=n.useCallback((e=>d(a,e)),[a,d]),C=n.useCallback((e=>m(a,e)),[a,m]),[y,b]=(j=f,"left"===(v=h)&&"top"===j?[-5,-c[1].split("\n").length*Rt[j]-4]:"middle"===v&&"top"===j?[0,-c[1].split("\n").length*Rt[j]-7]:"right"===v&&"top"===j?[5,-c[1].split("\n").length*Rt[j]-4]:"left"===v&&"bottom"===j?[-5,c[0].split("\n").length*Rt[j]+4]:"middle"===v&&"bottom"===j?[0,c[0].split("\n").length*Rt[j]+7]:"right"===v&&"bottom"===j?[5,c[0].split("\n").length*Rt[j]+4]:"left"===v&&"middle"===j?[-8,0]:"right"===v&&"middle"===j?[8,0]:[0,0]);var v,j;const w="left"===h?"end":"right"===h?"start":"middle";return T.jsxs("g",{id:a,children:[T.jsxs("g",{transform:`translate(${s-6}, ${l-6})`,children:[T.jsx("circle",{cx:"6",cy:"6",r:"6",stroke:"black",strokeWidth:"1",fill:"white"}),T.jsx("path",{d:It,fill:p?"#898989":"black",stroke:p?"#898989":"black",strokeWidth:"0.533618",strokeLinecap:"round",strokeLinejoin:"round"}),T.jsx("circle",{id:`stn_core_${a}`,cx:"6",cy:"6",r:"6",stroke:"black",strokeWidth:"1",strokeOpacity:"0",fill:"white",fillOpacity:"0",onPointerDown:u,onPointerMove:g,onPointerUp:C,style:{cursor:"move"}})]}),T.jsxs("g",{transform:`translate(${s+y}, ${l+b})`,textAnchor:w,children:[T.jsx(xe,{text:c[0].split("\n"),fontSize:Rt.zh,lineHeight:Rt.zh,grow:"up",className:"rmp-name__zh",baseOffset:1}),T.jsx(xe,{text:c[1].split("\n"),fontSize:Rt.en,lineHeight:Rt.en,grow:"down",className:"rmp-name__en",baseOffset:1})]})]})},icon:T.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:T.jsxs("g",{transform:"translate(6, 6)",children:[T.jsx("circle",{cx:"6",cy:"6",r:"6",stroke:"black",strokeWidth:"1",fill:"white"}),T.jsx("path",{d:It,stroke:"black",strokeWidth:"0.533618",strokeLinecap:"round",strokeLinejoin:"round"})]})}),defaultAttrs:Ht,attrsComponent:()=>T.jsx(S,{fields:Ut}),metadata:{displayName:"panel.details.stations.bjsubwayInt.displayName",cities:[d.Beijing],canvas:[u.RailMap],categories:[g.Metro],tags:["interchange"]}};function Vt(e){const{interchangeList:t,onAdd:s,onDelete:o,onUpdate:i}=e,r=C(),{paletteAppClip:{output:c}}=y((e=>e.runtime)),{t:h}=a(),[f,p]=n.useState();n.useEffect((()=>{void 0!==f&&c&&(null==i||i(f,[...c,t[f][4],t[f][5]]),p(void 0))}),[null==c?void 0:c.toString()]);const u=t.map(((e,t)=>[{type:"input",label:h("panel.details.stations.common.lineCode"),value:e[4],minW:"80px",onChange:n=>null==i?void 0:i(t,[e[0],e[1],e[2],e[3],n,e[5]])},{type:"input",label:h("panel.details.stations.common.stationCode"),value:e[5],minW:"80px",onChange:n=>null==i?void 0:i(t,[e[0],e[1],e[2],e[3],e[4],n])}]));return T.jsxs(b,{direction:"column",children:[0===t.length&&T.jsxs(L,{spacing:.5,"data-testid":"interchange-card-stack",children:[T.jsx(D,{as:"i",flex:1,align:"center",fontSize:"md",colorScheme:"gray",children:h("panel.details.stations.interchange.noInterchanges")}),T.jsx(I,{size:"sm",variant:"ghost","aria-label":h("panel.details.stations.interchange.add"),onClick:()=>null==s?void 0:s([d.Shanghai,"","#aaaaaa",m.white,"",""]),icon:T.jsx(v,{})})]}),t.map(((e,n)=>T.jsxs(L,{spacing:.5,"data-testid":`interchange-card-stack-${n}`,children:[T.jsx(j,{label:h("color"),minW:"40px",noLabel:0!==n,children:T.jsx(w,{theme:[e[0],e[1],e[2],e[3]],onClick:()=>{p(n),r(O([e[0],e[1],e[2],e[3]]))}})}),T.jsx(l,{fields:u[n],noLabel:0!==n}),s&&n===u.length-1?T.jsx(I,{size:"sm",variant:"ghost","aria-label":h("panel.details.stations.interchange.copy"),onClick:()=>null==s?void 0:s(t.slice(-1)[0]),icon:T.jsx(_,{})}):T.jsx(U,{minW:8}),o&&T.jsx(I,{size:"sm",variant:"ghost","aria-label":h("panel.details.stations.interchange.remove"),onClick:()=>null==o?void 0:o(n),icon:T.jsx(k,{})})]},n)))]})}const Gt=e=>{var t;const{stationType:s,defaultAttrs:l,maximumTransfers:o}=e,{t:i}=a(),r=C(),c=n.useCallback((()=>{r(N()),r(z(p.current.export()))}),[r,N,z]),{selected:h}=y((e=>e.runtime)),[f]=h,p=n.useRef(window.graph),u=f&&p.current.hasNode(f)&&p.current.getNodeAttribute(f,"type")===s?p.current.getNodeAttribute(f,s):l,g=null!==(t=u.transfer)&&void 0!==t?t:l.transfer,x=e=>t=>{const n=structuredClone(g);if(n.length<=e)for(let a=n.length;a<=e;a++)n[a]=[];n[e].push(t),u.transfer=n,p.current.mergeNodeAttributes(f,{[s]:u}),c()},b=e=>(t,n)=>{if(g.length>e&&g[e].length>t){const a=g.map(((a,s)=>s===e?a.map(((e,a)=>a===t?[0,1,2,3,4,5].map((t=>void 0===n[t]?e[t]:n[t])):e)):a));u.transfer=a,p.current.mergeNodeAttributes(f,{[s]:u}),c()}};return T.jsxs(H,{align:"flex-start",children:[u.transfer.map(((e,t)=>{return T.jsxs(n.Fragment,{children:[T.jsx(V,{size:"xs",children:i(0===t?"panel.details.stations.interchange.within":1===t?"panel.details.stations.interchange.outStation":"panel.details.stations.interchange.outSystem")}),T.jsx(Vt,{interchangeList:e,onAdd:o[t]>e.length?x(t):void 0,onDelete:(a=t,e=>{if(g.length>a&&g[a].length>e){const t=g.map(((t,n)=>n===a?t.filter(((t,n)=>n!==e)):t));u.transfer=t,p.current.mergeNodeAttributes(f,{[s]:u}),c()}}),onUpdate:b(t)})]},t);var a})),o[u.transfer.length]>0&&T.jsx(G,{size:"xs",variant:"ghost",alignSelf:"flex-end",leftIcon:T.jsx(v,{}),onClick:()=>x(u.transfer.length)([d.Guangzhou,"","#AAAAAA",m.white,"",""]),children:i("panel.details.stations.interchange.addGroup")})]})},Zt={top:8.5,middle:0,bottom:11},Qt={names:["車站","Stn"],nameOffsetX:"right",nameOffsetY:"top",rotate:0,transfer:[[]]},qt=[{type:"textarea",label:"panel.details.stations.common.nameZh",value:e=>(null!=e?e:Qt).names[0],onChange:(e,t)=>{const n=null!=t?t:Qt;return n.names[0]=e.toString(),n}},{type:"textarea",label:"panel.details.stations.common.nameEn",value:e=>(null!=e?e:Qt).names[1],onChange:(e,t)=>{const n=null!=t?t:Qt;return n.names[1]=e.toString(),n}},{type:"select",label:"panel.details.stations.common.nameOffsetX",value:e=>(null!=e?e:Qt).nameOffsetX,options:{left:"left",middle:"middle",right:"right"},disabledOptions:e=>"middle"===(null==e?void 0:e.nameOffsetY)?["middle"]:[],onChange:(e,t)=>{const n=null!=t?t:Qt;return n.nameOffsetX=e,n}},{type:"select",label:"panel.details.stations.common.nameOffsetY",value:e=>(null!=e?e:Qt).nameOffsetY,options:{top:"top",middle:"middle",bottom:"bottom"},disabledOptions:e=>"middle"===(null==e?void 0:e.nameOffsetX)?["middle"]:[],onChange:(e,t)=>{const n=null!=t?t:Qt;return n.nameOffsetY=e,n}},{type:"select",label:"panel.details.stations.common.rotate",value:e=>{var t;return null!==(t=null==e?void 0:e.rotate)&&void 0!==t?t:Qt.rotate},hidden:e=>{var t,n;return 0===(null!==(t=null==e||null===(n=e.transfer)||void 0===n||null===(n=n.flat())||void 0===n?void 0:n.length)&&void 0!==t?t:0)},options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:(e,t)=>{const n=null!=t?t:Qt;return n.rotate=Number(e),n}},{type:"custom",label:"panel.details.stations.interchange.title",component:T.jsx(Gt,{stationType:o.MTR,defaultAttrs:Qt,maximumTransfers:[99,0,0]})}],Jt={component:e=>{var t;const{id:a,x:s,y:l,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,nameOffsetX:h=Qt.nameOffsetX,nameOffsetY:f=Qt.nameOffsetY,transfer:p=Qt.transfer,rotate:u=Qt.rotate}=null!==(t=i[o.MTR])&&void 0!==t?t:Qt,g=n.useCallback((e=>r(a,e)),[a,r]),C=n.useCallback((e=>d(a,e)),[a,d]),y=n.useCallback((e=>m(a,e)),[a,m]),b=p.at(0),v=((e,t=5,n=[])=>{const a=Math.sqrt(e*e-t*t/4),s=n.length<2?n.length+1:n.length;let l=`M ${-e},0 A ${e},${e},0,0,1,${-t/2},-${a} `;for(let o=0;o=0;o-=1)l+=`A ${e},${e},0,0,1,${o*t-t/2},${a} `;return l+=`A ${e},${e},0,0,1,${-e},0 Z`,l})(5,5,b),j=0===b.length?0:b.length<=2?1:b.length-1,w=Math.cos(u*Math.PI/180)*j*5,O=Math.sin(u*Math.PI/180)*j*5,_="left"===h?-8:"right"===h?8:0,k=Math.sign(w)===Math.sign(_)?w+_:_,S=(c[Ce[f].namesPos].split("\n").length*Zt[f]+6)*Ce[f].polarity,N=Math.sign(O)===Math.sign(S)?O+S:S,z="left"===h?"end":"right"===h?"start":"middle";return n.useMemo((()=>T.jsxs("g",{id:a,transform:`translate(${s}, ${l})`,children:[T.jsx("path",{transform:`rotate(${u})`,d:v,stroke:"#001f50",strokeWidth:"1.5",fill:"white",onPointerDown:g,onPointerMove:C,onPointerUp:y,style:{cursor:"move"}}),p.at(0).length>1&&p.at(0).map((e=>e[2])).map(((e,t)=>T.jsx("line",{transform:`rotate(${u})`,x1:5*t-2.5,x2:2.5+5*t,stroke:e,strokeWidth:"2"},`${t}_${e}`))),T.jsx("path",{id:`stn_core_${a}`,transform:`rotate(${u})`,d:v,fill:"white",fillOpacity:"0",onPointerDown:g,onPointerMove:C,onPointerUp:y,style:{cursor:"move"}}),T.jsxs("g",{transform:`translate(${k}, ${N})`,textAnchor:z,className:"rmp-name-outline",strokeWidth:"1.25",children:[T.jsx(xe,{text:c[0].split("\n"),fontSize:10,lineHeight:10,grow:"up",baseOffset:1,fill:"#001f50",className:"rmp-name__mtr__zh"}),T.jsx(xe,{text:c[1].split("\n"),fontSize:7.5,lineHeight:7.5,grow:"down",baseOffset:1,fill:"#001f50",className:"rmp-name__mtr__en"})]})]})),[a,s,l,...c,u,JSON.stringify(p),h,f,g,C,y])},icon:T.jsx("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:T.jsx("circle",{cx:"12",cy:"12",r:"5",stroke:"currentColor",strokeWidth:"1.5",fill:"none"})}),defaultAttrs:Qt,attrsComponent:()=>T.jsx(S,{fields:qt}),metadata:{displayName:"panel.details.stations.mtr.displayName",cities:[d.Hongkong],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},Kt=n.forwardRef(((e,t)=>{const{text:n,lineWidth:a,grow:s,dominantBaseline:l=("left"===s?"hanging":"right"===s?"auto":"central"),baseOffset:o=2,baseDY:i=0,...r}=e,d="bidirectional"===s?-(n.length-1)*a/2:0;return T.jsx("g",{ref:t,children:[...n].reverse().map(((e,t,n)=>T.jsx("text",{x:(t*a+o)*("left"===s?-1:1)+d,dy:(t-(n.length-1)/2)*i,writingMode:"vertical-rl",dominantBaseline:l,...r,children:e},`${e}${t}`)))})}));Kt.displayName="MultilineTextVertical";const en={size:10,baseOffset:1},tn={size:5,baseOffset:1.5},nn={top:{lineHeight:5,offset:1+tn.baseOffset+2.5,polarity:-1},middle:{lineHeight:0,offset:en.size/2,polarity:1},bottom:{lineHeight:10,offset:0+en.baseOffset+2.5,polarity:1}},an={...x,color:[d.Suzhou,"sz1","#78BA25",m.white],nameOffsetX:"right",nameOffsetY:"top",textVertical:!1},sn={component:e=>{var t;const{id:a,x:s,y:l,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,color:h=an.color,nameOffsetX:f=an.nameOffsetX,nameOffsetY:p=an.nameOffsetY,textVertical:u=an.textVertical}=null!==(t=i[o.SuzhouRTBasic])&&void 0!==t?t:an,g=n.useCallback((e=>r(a,e)),[a,r]),C=n.useCallback((e=>d(a,e)),[a,d]),y=n.useCallback((e=>m(a,e)),[a,m]),b="left"===f?-5:"right"===f?5:0,v=(c[Ce[p].namesPos].split("\n").length*nn[p].lineHeight+nn[p].offset)*nn[p].polarity,j="left"===f?"end":"right"===f?"start":"middle",w="top"===p?-4.5:4.5,O="top"===p?"end":"start",_=c[0].split("\n").length*en.size/2+tn.baseOffset;return T.jsxs("g",{id:a,transform:`translate(${s}, ${l})`,children:[T.jsx("circle",{id:`stn_core_${a}`,r:3,stroke:h[2],strokeWidth:"1",fill:"white",onPointerDown:g,onPointerMove:C,onPointerUp:y,style:{cursor:"move"}}),u?T.jsxs(T.Fragment,{children:[T.jsx("g",{transform:`translate(-1, ${w})`,textAnchor:O,children:T.jsx(Kt,{text:c[0].split("\n"),fontSize:en.size,lineWidth:en.size,grow:"bidirectional",baseOffset:en.baseOffset,dominantBaseline:"central",className:"rmp-name__zh"})}),T.jsx("g",{transform:`translate(${_}, ${w})rotate(90)`,textAnchor:O,children:T.jsx(xe,{text:c[1].split("\n"),fontSize:tn.size,lineHeight:tn.size,grow:"up",baseOffset:tn.baseOffset,className:"rmp-name__en",dominantBaseline:"central",fill:"gray"})})]}):T.jsxs("g",{transform:`translate(${b}, ${v})`,textAnchor:j,children:[T.jsx(xe,{text:c[0].split("\n"),fontSize:en.size,lineHeight:en.size,grow:"up",baseOffset:en.baseOffset,className:"rmp-name__zh"}),T.jsx(xe,{text:c[1].split("\n"),fontSize:tn.size,lineHeight:tn.size,grow:"down",baseOffset:tn.baseOffset,className:"rmp-name__en",fill:"gray"})]})]})},icon:T.jsx("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:T.jsx("circle",{cx:"12",cy:"12",r:"3",stroke:"currentColor",fill:"none"})}),defaultAttrs:an,attrsComponent:e=>{var t,n,s;const{id:i,attrs:r,handleAttrsUpdate:d}=e,{t:m}=a(),h=[{type:"textarea",label:m("panel.details.stations.common.nameZh"),value:r.names[0],onChange:e=>{r.names[0]=e,d(i,r)},minW:"full"},{type:"textarea",label:m("panel.details.stations.common.nameEn"),value:r.names[1],onChange:e=>{r.names[1]=e,d(i,r)},minW:"full"},{type:"select",label:m("panel.details.stations.common.nameOffsetX"),value:null!==(t=r.nameOffsetX)&&void 0!==t?t:an.nameOffsetX,options:{left:m("panel.details.stations.common.left"),middle:m("panel.details.stations.common.middle"),right:m("panel.details.stations.common.right")},disabledOptions:"middle"===r.nameOffsetY?["middle"]:[],onChange:e=>{r.nameOffsetX=e,"middle"!==r.nameOffsetX&&(r.textVertical=!1),d(i,r)},minW:"full"},{type:"select",label:m("panel.details.stations.common.nameOffsetY"),value:null!==(n=r.nameOffsetY)&&void 0!==n?n:an.nameOffsetY,options:{top:m("panel.details.stations.common.top"),middle:m("panel.details.stations.common.middle"),bottom:m("panel.details.stations.common.bottom")},disabledOptions:"middle"===r.nameOffsetX?["middle"]:[],onChange:e=>{r.nameOffsetY=e,"middle"===r.nameOffsetY&&(r.textVertical=!1),d(i,r)},minW:"full"},{type:"switch",label:m("panel.details.stations.suzhouRTBasic.textVertical"),isChecked:null!==(s=r.textVertical)&&void 0!==s?s:an.textVertical,isDisabled:"middle"===r.nameOffsetY||"middle"!==r.nameOffsetX,onChange:e=>{r.textVertical=e,d(i,r)},oneLine:!0,minW:"full"},{type:"custom",label:m("color"),component:T.jsx(c,{type:o.SuzhouRTBasic,defaultTheme:an.color})}];return T.jsx(l,{fields:h})},metadata:{displayName:"panel.details.stations.suzhouRTBasic.displayName",cities:[d.Suzhou],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},ln={size:10,baseOffset:1},on={size:5,baseOffset:1.5},rn={top:{lineHeight:on.size,offset:0+on.baseOffset+3,polarity:-1},middle:{lineHeight:0,offset:ln.size/2,polarity:1},bottom:{lineHeight:ln.size,offset:0+ln.baseOffset+3,polarity:1}},dn={...x,nameOffsetX:"right",nameOffsetY:"top",rotate:0,transfer:[[[d.Suzhou,"sz1","#78BA25",m.white,"",""],[d.Suzhou,"sz2","#ED3240",m.white,"",""]]]},mn={component:e=>{var t,a;const{id:s,x:l,y:i,attrs:r,handlePointerDown:d,handlePointerMove:m,handlePointerUp:c}=e,{names:h=x.names,nameOffsetX:f=dn.nameOffsetX,nameOffsetY:p=dn.nameOffsetY,rotate:u=dn.rotate,transfer:g=dn.transfer}=null!==(t=r[o.SuzhouRTInt])&&void 0!==t?t:dn,C=n.useCallback((e=>d(s,e)),[s,d]),y=n.useCallback((e=>m(s,e)),[s,m]),b=n.useCallback((e=>c(s,e)),[s,c]),v=5*g.at(0).length+1,j=Math.abs(Math.cos(u*Math.PI/180)*v),w=Math.abs(Math.sin(u*Math.PI/180)*v),O=(j/2+5)*("left"===f?-1:"right"===f?1:0),_=(h[Ce[p].namesPos].split("\n").length*rn[p].lineHeight+rn[p].offset+("middle"===p?0:w/2))*rn[p].polarity,k="left"===f?"end":"right"===f?"start":"middle";return T.jsxs("g",{id:s,transform:`translate(${l}, ${i})`,children:[T.jsxs("g",{transform:`rotate(${u})`,onPointerDown:C,onPointerMove:y,onPointerUp:b,style:{cursor:"move"},children:[T.jsx("rect",{x:-v/2,y:-3,width:v,height:6,ry:3,stroke:"#616161",strokeWidth:"1",fill:"white"}),(null!==(a=g.at(0))&&void 0!==a?a:[]).length>0&&g.at(0).map((e=>e[2])).map(((e,t)=>T.jsx("circle",{r:2,cx:-v/2+3+5*t,fill:e},`${t}_${e}`))),T.jsx("rect",{id:`stn_core_${s}`,x:-v/2-.5,y:-3.5,width:v+1,height:7,ry:3,fill:"white",opacity:"0"})]}),T.jsxs("g",{transform:`translate(${O}, ${_})`,textAnchor:k,children:[T.jsx(xe,{text:h[0].split("\n"),fontSize:ln.size,lineHeight:ln.size,grow:"up",baseOffset:ln.baseOffset,className:"rmp-name__zh"}),T.jsx(xe,{text:h[1].split("\n"),fontSize:on.size,lineHeight:on.size,grow:"down",baseOffset:on.baseOffset,className:"rmp-name__en",fill:"gray"})]})]})},icon:T.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[T.jsx("rect",{x:"6",y:"9",width:"12",height:"6",ry:"3",stroke:"currentColor",fill:"none"}),T.jsx("circle",{r:"2",cx:"9.5",cy:"12",fill:"currentColor"}),T.jsx("circle",{r:"2",cx:"14.5",cy:"12",fill:"currentColor"})]}),defaultAttrs:dn,attrsComponent:e=>{var t,n,s,i,r;const{id:d,attrs:m,handleAttrsUpdate:c}=e,{t:h}=a(),f=[{type:"textarea",label:h("panel.details.stations.common.nameZh"),value:m.names[0],onChange:e=>{m.names[0]=e,c(d,m)},minW:"full"},{type:"textarea",label:h("panel.details.stations.common.nameEn"),value:m.names[1],onChange:e=>{m.names[1]=e,c(d,m)},minW:"full"},{type:"select",label:h("panel.details.stations.common.nameOffsetX"),value:null!==(t=m.nameOffsetX)&&void 0!==t?t:dn.nameOffsetX,options:{left:h("panel.details.stations.common.left"),middle:h("panel.details.stations.common.middle"),right:h("panel.details.stations.common.right")},disabledOptions:"middle"===m.nameOffsetY?["middle"]:[],onChange:e=>{m.nameOffsetX=e,c(d,m)},minW:"full"},{type:"select",label:h("panel.details.stations.common.nameOffsetY"),value:null!==(n=m.nameOffsetY)&&void 0!==n?n:dn.nameOffsetY,options:{top:h("panel.details.stations.common.top"),middle:h("panel.details.stations.common.middle"),bottom:h("panel.details.stations.common.bottom")},disabledOptions:"middle"===m.nameOffsetX?["middle"]:[],onChange:e=>{m.nameOffsetY=e,c(d,m)},minW:"full"},{type:"select",label:h("panel.details.stations.common.rotate"),value:null!==(s=m.rotate)&&void 0!==s?s:dn.rotate,hidden:0===(null!==(i=null==m||null===(r=m.transfer)||void 0===r||null===(r=r.flat())||void 0===r?void 0:r.length)&&void 0!==i?i:0),options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:e=>{m.rotate=Number(e),c(d,m)},minW:"full"},{type:"custom",label:h("panel.details.stations.interchange.title"),component:T.jsx(Gt,{stationType:o.SuzhouRTInt,defaultAttrs:dn,maximumTransfers:[99,0,0]})}];return T.jsx(l,{fields:f})},metadata:{displayName:"panel.details.stations.suzhouRTInt.displayName",cities:[d.Suzhou],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},cn={top:{lineHeight:6.67,offset:10},middle:{lineHeight:0,offset:0},bottom:{lineHeight:12.67,offset:5.83}},hn={...x,nameOffsetX:"right",nameOffsetY:"top",color:[d.Kunming,"km1","#ea3222",m.white]},fn={component:e=>{var t;const{id:a,x:s,y:l,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,nameOffsetX:h=hn.nameOffsetX,nameOffsetY:f=hn.nameOffsetY,color:p=hn.color}=null!==(t=i[o.KunmingRTBasic])&&void 0!==t?t:hn,u=n.useCallback((e=>r(a,e)),[a,r]),g=n.useCallback((e=>d(a,e)),[a,d]),C=n.useCallback((e=>m(a,e)),[a,m]),y="left"===h?-13.33:"right"===h?13.33:0,b=(c[Ce[f].namesPos].split("\n").length*cn[f].lineHeight+cn[f].offset)*Ce[f].polarity,v="left"===h?"end":"right"===h?"start":"middle";return n.useMemo((()=>T.jsxs("g",{id:a,transform:`translate(${s}, ${l})`,onPointerDown:u,onPointerMove:g,onPointerUp:C,style:{cursor:"move"},children:[T.jsx("circle",{id:`stn_core_${a}`,r:"5",stroke:p[2],strokeWidth:"1.33",fill:"white"}),T.jsxs("g",{transform:`translate(${y}, ${b})`,textAnchor:v,className:"rmp-name-outline",strokeWidth:"2.5",children:[T.jsx(xe,{text:c[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),T.jsx(xe,{text:c[1].split("\n"),dx:"right"===h?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]})),[a,s,l,...c,h,f,p,u,g,C])},icon:T.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:T.jsx("circle",{r:"5",cx:"12",cy:"12",stroke:"currentColor",strokeWidth:"1.33",fill:"none"})}),defaultAttrs:hn,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:s}=e,{t:i}=a(),r=[{type:"textarea",label:i("panel.details.stations.common.nameZh"),value:n.names[0],onChange:e=>{n.names[0]=e,s(t,n)},minW:"full"},{type:"textarea",label:i("panel.details.stations.common.nameEn"),value:n.names[1],onChange:e=>{n.names[1]=e,s(t,n)},minW:"full"},{type:"select",label:i("panel.details.stations.common.nameOffsetX"),value:n.nameOffsetX,options:{left:i("panel.details.stations.common.left"),middle:i("panel.details.stations.common.middle"),right:i("panel.details.stations.common.right")},disabledOptions:"middle"===n.nameOffsetY?["middle"]:[],onChange:e=>{n.nameOffsetX=e,s(t,n)},minW:"full"},{type:"select",label:i("panel.details.stations.common.nameOffsetY"),value:n.nameOffsetY,options:{top:i("panel.details.stations.common.top"),middle:i("panel.details.stations.common.middle"),bottom:i("panel.details.stations.common.bottom")},disabledOptions:"middle"===n.nameOffsetX?["middle"]:[],onChange:e=>{n.nameOffsetY=e,s(t,n)},minW:"full"},{type:"custom",label:i("color"),component:T.jsx(c,{type:o.KunmingRTBasic,defaultTheme:hn.color})}];return T.jsx(l,{fields:r})},metadata:{displayName:"panel.details.stations.kunmingRTBasic.displayName",cities:[d.Kunming],canvas:[u.RailMap],categories:[g.Metro],tags:["interchange"]}},[pn,un]=[15,9],gn={top:{lineHeight:6.67,offset:5},middle:{lineHeight:0,offset:0},bottom:{lineHeight:12.67,offset:.83}},xn={...x,nameOffsetX:"right",nameOffsetY:"top",rotate:0,transfer:[[[d.Kunming,"km1","#ea3222",m.white,"",""],[d.Kunming,"km2","#03619e",m.white,"",""],[d.Kunming,"km3","#a13187",m.white,"",""]]]},Cn={component:e=>{var t,a,s,l,i;const{id:r,x:d,y:m,attrs:c,handlePointerDown:h,handlePointerMove:f,handlePointerUp:p}=e,{names:u=x.names,nameOffsetX:g=xn.nameOffsetX,nameOffsetY:C=xn.nameOffsetY,rotate:y=xn.rotate,transfer:b=xn.transfer}=null!==(t=c[o.KunmingRTInt])&&void 0!==t?t:xn,v=n.useCallback((e=>h(r,e)),[r,h]),j=n.useCallback((e=>f(r,e)),[r,f]),w=n.useCallback((e=>p(r,e)),[r,p]),O=0===y||180===y?pn:90===y||270===y?un:pn*Math.SQRT1_2,_=0===y||180===y?un:90===y||270===y?pn:pn*Math.SQRT1_2,k="left"===g?-6.83:"right"===g?6.83:0,S=(Math.abs(k)+O/2)*Math.sign(k),N=(u[Ce[C].namesPos].split("\n").length*gn[C].lineHeight+gn[C].offset)*Ce[C].polarity,z=(Math.abs(N)+_/2)*Math.sign(N),M="left"===g?"end":"right"===g?"start":"middle";return T.jsxs("g",{id:r,children:[T.jsx("g",{transform:`translate(${d}, ${m})rotate(${y})`,onPointerDown:v,onPointerMove:j,onPointerUp:w,style:{cursor:"move"},children:b.at(0).length<=2?T.jsxs("g",{transform:"translate(-7.5,-4.5)",children:[T.jsx("rect",{id:`stn_core_${r}`,height:"9",width:"15",ry:"4",stroke:"#393332",strokeWidth:"1",fill:"white"}),T.jsx("path",{fill:null!==(a=null===(s=b.at(0).at(0))||void 0===s?void 0:s.at(2))&&void 0!==a?a:"#ea3222",fillRule:"evenodd",stroke:"none",d:"M 3.833333 6.375 C 2.820813 6.375 2 5.535532 2 4.5 C 2 3.464468 2.820813 2.625 3.833333 2.625 L 4.444445 2.625 L 4.444445 2 L 6.888889 2.9375 L 4.444445 3.875 L 4.444445 3.25 L 3.833333 3.25 C 3.158321 3.25 2.611111 3.809647 2.611111 4.5 C 2.611111 5.190353 3.158321 5.75 3.833333 5.75 L 7.5 5.75 L 7.5 6.375 L 3.833333 6.375 Z"}),T.jsx("path",{fill:null!==(l=null===(i=b.at(0).at(1))||void 0===i?void 0:i.at(2))&&void 0!==l?l:"#03619e",fillRule:"evenodd",stroke:"none",d:"M 11.166667 2.625 C 12.179187 2.625 13 3.464468 13 4.5 C 13 5.535532 12.179187 6.375 11.166667 6.375 L 10.555555 6.375 L 10.555555 7 L 8.111111 6.0625 L 10.555555 5.125 L 10.555555 5.75 L 11.166667 5.75 C 11.841679 5.75 12.388889 5.190353 12.388889 4.5 C 12.388889 3.809647 11.841679 3.25 11.166667 3.25 L 7.5 3.25 L 7.5 2.625 L 11.166667 2.625 Z"})]}):T.jsxs("g",{transform:"translate(-8.5,-8.5)",children:[T.jsx("circle",{id:`stn_core_${r}`,r:"8.5",cx:"8.5",cy:"8.5",stroke:"#000000",strokeWidth:"1",fill:"white"}),T.jsx("path",{fill:b.at(0).at(0).at(2),fillRule:"evenodd",stroke:"none",d:"M 8.900812 14 L 10.286572 11.992442 L 10.63521 12.569632 C 12.188999 11.790696 13.24999 10.23524 13.24999 8.441039 C 13.24999 8.070708 13.203481 7.710487 13.118152 7.365112 L 13.887206 7.365112 C 13.960998 7.712721 14 8.072591 14 8.441039 C 14 10.500518 12.789013 12.288074 11.01168 13.191653 L 11.411587 13.855702 L 8.900812 14 Z"}),T.jsx("path",{fill:b.at(0).at(1).at(2),fillRule:"evenodd",stroke:"none",d:"M 8 13.974609 C 5.462755 13.73554 3.426537 11.698185 3.0625 9.090137 L 2.5 9.090137 L 3.5 7 L 4.5 9.090137 L 4.074219 9.090137 C 4.422903 11.120208 6.015293 12.696354 8 12.925459 L 8 13.974609 Z"}),T.jsx("path",{fill:b.at(0).at(2).at(2),fillRule:"evenodd",stroke:"none",d:"M 12.68764 6.50351 L 10.588492 5.178213 L 11.35608 4.753726 C 10.531951 4.143034 9.498575 3.778666 8.375084 3.778666 C 6.644794 3.778666 5.125485 4.640751 4.260284 5.940329 L 3.718284 5.421978 C 4.730131 3.997121 6.438381 3.061381 8.375084 3.061381 C 9.781034 3.061381 11.063435 3.556896 12.04896 4.372667 L 12.536759 4.102285 L 12.68764 6.50351 Z"})]})}),T.jsxs("g",{transform:`translate(${d+S}, ${m+z})`,textAnchor:M,className:"rmp-name-outline",strokeWidth:"2.5",children:[T.jsx(xe,{text:u[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),T.jsx(xe,{text:u[1].split("\n"),dx:"right"===g?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]})},icon:T.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:T.jsxs("g",{transform:"translate(3.5, 3.5)",children:[T.jsx("circle",{r:"8.5",cx:"8.5",cy:"8.5",stroke:"currentColor",strokeWidth:"1",fill:"none"}),T.jsx("path",{fill:"currentColor",fillRule:"evenodd",stroke:"none",d:"M 8.900812 14 L 10.286572 11.992442 L 10.63521 12.569632 C 12.188999 11.790696 13.24999 10.23524 13.24999 8.441039 C 13.24999 8.070708 13.203481 7.710487 13.118152 7.365112 L 13.887206 7.365112 C 13.960998 7.712721 14 8.072591 14 8.441039 C 14 10.500518 12.789013 12.288074 11.01168 13.191653 L 11.411587 13.855702 L 8.900812 14 Z"}),T.jsx("path",{fill:"currentColor",fillRule:"evenodd",stroke:"none",d:"M 8 13.974609 C 5.462755 13.73554 3.426537 11.698185 3.0625 9.090137 L 2.5 9.090137 L 3.5 7 L 4.5 9.090137 L 4.074219 9.090137 C 4.422903 11.120208 6.015293 12.696354 8 12.925459 L 8 13.974609 Z"}),T.jsx("path",{fill:"currentColor",fillRule:"evenodd",stroke:"none",d:"M 12.68764 6.50351 L 10.588492 5.178213 L 11.35608 4.753726 C 10.531951 4.143034 9.498575 3.778666 8.375084 3.778666 C 6.644794 3.778666 5.125485 4.640751 4.260284 5.940329 L 3.718284 5.421978 C 4.730131 3.997121 6.438381 3.061381 8.375084 3.061381 C 9.781034 3.061381 11.063435 3.556896 12.04896 4.372667 L 12.536759 4.102285 L 12.68764 6.50351 Z"})]})}),defaultAttrs:xn,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:s}=e,{t:i}=a(),r=[{type:"textarea",label:i("panel.details.stations.common.nameZh"),value:n.names[0],onChange:e=>{n.names[0]=e,s(t,n)},minW:"full"},{type:"textarea",label:i("panel.details.stations.common.nameEn"),value:n.names[1],onChange:e=>{n.names[1]=e,s(t,n)},minW:"full"},{type:"select",label:i("panel.details.stations.common.nameOffsetX"),value:n.nameOffsetX,options:{left:i("panel.details.stations.common.left"),middle:i("panel.details.stations.common.middle"),right:i("panel.details.stations.common.right")},disabledOptions:"middle"===n.nameOffsetY?["middle"]:[],onChange:e=>{n.nameOffsetX=e,s(t,n)},minW:"full"},{type:"select",label:i("panel.details.stations.common.nameOffsetY"),value:n.nameOffsetY,options:{top:i("panel.details.stations.common.top"),middle:i("panel.details.stations.common.middle"),bottom:i("panel.details.stations.common.bottom")},disabledOptions:"middle"===n.nameOffsetX?["middle"]:[],onChange:e=>{n.nameOffsetY=e,s(t,n)},minW:"full"},{type:"select",label:i("panel.details.stations.common.rotate"),value:n.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:e=>{n.rotate=Number(e),s(t,n)},minW:"full"},{type:"custom",label:i("panel.details.stations.interchange.title"),component:T.jsx(Gt,{stationType:o.KunmingRTInt,defaultAttrs:xn,maximumTransfers:[3,0,0]})}];return T.jsx(l,{fields:r})},metadata:{displayName:"panel.details.stations.kunmingRTInt.displayName",cities:[d.Kunming],canvas:[u.RailMap],categories:[g.Metro],tags:["interchange"]}},yn=8.2628,bn={top:{offset:8.2628,polarity:-1},middle:{offset:0,polarity:0},bottom:{offset:8.2628,polarity:1}},vn={names:["Marina South Pier"],nameOffsetX:"right",nameOffsetY:"top",lineCode:"NS",stationCode:"28",isTram:!1,color:[d.Singapore,"nsl","#DA291C",m.white]},jn={component:e=>{var t;const{id:a,x:s,y:l,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,nameOffsetX:h=vn.nameOffsetX,nameOffsetY:f=vn.nameOffsetY,color:p=vn.color,lineCode:u=vn.lineCode,stationCode:g=vn.stationCode,isTram:C=vn.isTram}=null!==(t=i[o.MRTBasic])&&void 0!==t?t:vn,y=n.useCallback((e=>r(a,e)),[a,r]),b=n.useCallback((e=>d(a,e)),[a,d]),v=n.useCallback((e=>m(a,e)),[a,m]),j=22.85,w=12.935,O=16.425*("left"===h?-1:"right"===h?1:0),_=bn[f].offset*bn[f].polarity,k="left"===h?"end":"right"===h?"start":"middle";return n.useMemo((()=>T.jsxs("g",{id:a,transform:`translate(${s}, ${l}) ${C?"scale(0.81)":""}`,children:[T.jsxs("g",{onPointerDown:y,onPointerMove:b,onPointerUp:v,style:{cursor:"move"},children:[T.jsx("rect",{x:-11.425,y:-6.4675,rx:"3",ry:"6",width:j,height:w,fill:p[2],stroke:"white",strokeWidth:"1"}),T.jsx("text",{fontSize:5.2,dx:"-4",dy:"0.5",className:"rmp-name__mrt",fill:p[3],textAnchor:"middle",dominantBaseline:"middle",children:u}),T.jsx("text",{fontSize:5.2,dx:"4",dy:"0.5",className:"rmp-name__mrt",fill:p[3],textAnchor:"middle",dominantBaseline:"middle",children:g}),T.jsx("rect",{id:`stn_core_${a}`,x:-11.425,y:-6.4675,rx:"3",ry:"6",width:j,height:w,fill:"white",opacity:"0"})]}),T.jsx("g",{transform:`translate(${O}, ${_})`,textAnchor:k,children:T.jsx(xe,{text:c[0].split("\n"),fontSize:yn,lineHeight:yn,grow:"top"===f?"up":"middle"===f?"bidirectional":"down",baseOffset:0,className:"rmp-name__mrt"})})]})),[a,s,l,...c,h,f,p,u,g,C,y,b,v])},icon:T.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[T.jsx("rect",{x:"6",y:"8.6035",rx:"1.575",ry:"3.151",width:"12",height:"6.793",fill:"currentColor"}),T.jsx("text",{fontSize:"3.5",dx:"10",dy:"13",className:"rmp-name__en",fill:"white",textAnchor:"middle",children:"NS"}),T.jsx("text",{fontSize:"3.5",dx:"15",dy:"13",className:"rmp-name__en",fill:"white",textAnchor:"middle",children:"28"})]}),defaultAttrs:vn,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:s}=e,{t:i}=a(),r=[{type:"textarea",label:i("panel.details.stations.common.nameEn"),value:n.names[0],onChange:e=>{n.names[0]=e,s(t,n)},minW:"full"},{type:"select",label:i("panel.details.stations.common.nameOffsetX"),value:n.nameOffsetX,options:{left:i("panel.details.stations.common.left"),middle:i("panel.details.stations.common.middle"),right:i("panel.details.stations.common.right")},disabledOptions:"middle"===n.nameOffsetY?["middle"]:[],onChange:e=>{n.nameOffsetX=e,s(t,n)},minW:"full"},{type:"select",label:i("panel.details.stations.common.nameOffsetY"),value:n.nameOffsetY,options:{top:i("panel.details.stations.common.top"),middle:i("panel.details.stations.common.middle"),bottom:i("panel.details.stations.common.bottom")},disabledOptions:"middle"===n.nameOffsetX?["middle"]:[],onChange:e=>{n.nameOffsetY=e,s(t,n)},minW:"full"},{type:"input",label:i("panel.details.stations.common.lineCode"),value:n.lineCode,onChange:e=>{n.lineCode=e,s(t,n)},minW:"full"},{type:"input",label:i("panel.details.stations.common.stationCode"),value:n.stationCode,onChange:e=>{n.stationCode=e,s(t,n)},minW:"full"},{type:"switch",label:i("panel.details.stations.MRTBasic.isTram"),isChecked:n.isTram,onChange:e=>{n.isTram=e,s(t,n)},minW:"full",oneLine:!0},{type:"custom",label:i("color"),component:T.jsx(c,{type:o.MRTBasic,defaultTheme:vn.color})}];return T.jsx(l,{fields:r})},metadata:{displayName:"panel.details.stations.MRTBasic.displayName",cities:[d.Singapore],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},wn=8.2628,On={top:{offset:10.7628,polarity:-1},middle:{offset:0,polarity:0},bottom:{offset:10.7628,polarity:1}},_n={names:["Chinatown"],nameOffsetX:"right",nameOffsetY:"top",transfer:[[[d.Singapore,"nel","#9B26B6",m.white,"NE","4"],[d.Singapore,"dtl","#0057B7",m.white,"DT","19"]]]},kn={component:e=>{var t;const{id:a,x:s,y:l,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,nameOffsetX:h=_n.nameOffsetX,nameOffsetY:f=_n.nameOffsetY,transfer:p=_n.transfer}=null!==(t=i[o.MRTInt])&&void 0!==t?t:_n,u=n.useCallback((e=>r(a,e)),[a,r]),g=n.useCallback((e=>d(a,e)),[a,d]),C=n.useCallback((e=>m(a,e)),[a,m]),y=p.at(0),b=29.625*(y.length-2)+57.8,v=16.77,j=[];for(let n=1;nT.jsxs("g",{id:a,transform:`translate(${s}, ${l})`,children:[T.jsx("g",{onPointerDown:u,onPointerMove:g,onPointerUp:C,style:{cursor:"move"},children:p.map((e=>({info:e,width:29.625*(e.length-2)+57.8}))).map((({info:e,width:t},s)=>T.jsxs(n.Fragment,{children:[T.jsx("rect",{x:-t/2,y:-8.385,rx:"4.5",ry:"8",width:t,height:v,fill:`url(#${a}_grad_${s})`,stroke:"white",strokeWidth:"1"}),T.jsx("linearGradient",{id:`${a}_grad_${s}`,y1:"0%",y2:"0%",x1:"0%",x2:"100%",children:e.map(((t,a)=>T.jsxs(n.Fragment,{children:[T.jsx("stop",{offset:100/e.length*a+"%",stopColor:t[2]}),T.jsx("stop",{offset:100/e.length*(a+1)+"%",stopColor:t[2]})]},t[2])))}),j.map((n=>T.jsx("line",{x1:n/e.length*t-t/2,x2:n/e.length*t-t/2,y1:-8.385,y2:8.385,stroke:"white",strokeWidth:"1"},n))),e.map(((e,a,s)=>T.jsxs(n.Fragment,{children:[T.jsx("text",{fontSize:6.9,dx:(""!==e[5]?-5:-2)+t/s.length/2*(2*a+1)-t/2+1,dy:"0.5",className:"rmp-name__mrt",fill:e[3],textAnchor:"middle",dominantBaseline:"middle",children:e[4]}),T.jsx("text",{fontSize:6.9,dx:5+t/s.length/2*(2*a+1)-t/2+1,dy:"0.5",className:"rmp-name__mrt",fill:e[3],textAnchor:"middle",dominantBaseline:"middle",children:e[5]})]},e[2]))),T.jsx("rect",{id:`stn_core_${a}`,x:-t/2,y:-8.385,rx:"4.5",ry:"8",width:t,height:v,fill:"white",opacity:"0"})]},e.map((e=>e[2])).join("_"))))}),T.jsx("g",{transform:`translate(${w}, ${O})`,textAnchor:_,children:T.jsx(xe,{text:c[0].split("\n"),fontSize:wn,lineHeight:wn,grow:"top"===f?"up":"middle"===f?"bidirectional":"down",baseOffset:0,className:"rmp-name__mrt"})})]})),[a,s,l,...c,h,f,JSON.stringify(p),u,g,C])},icon:T.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[T.jsx("rect",{x:"2",y:"9.0985",rx:"1.038",ry:"2.076",width:"20",height:"5.803",fill:"currentColor"}),T.jsx("text",{fontSize:"3",dx:"5",dy:"13.25",className:"rmp-name__en",fill:"white",textAnchor:"middle",children:"NE"}),T.jsx("text",{fontSize:"3",dx:"9.5",dy:"13.25",className:"rmp-name__en",fill:"white",textAnchor:"middle",children:"4"}),T.jsx("text",{fontSize:"3",dx:"14.5",dy:"13.25",className:"rmp-name__en",fill:"white",textAnchor:"middle",children:"DT"}),T.jsx("text",{fontSize:"3",dx:"19",dy:"13.25",className:"rmp-name__en",fill:"white",textAnchor:"middle",children:"19"})]}),defaultAttrs:_n,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:s}=e,{t:i}=a(),r=[{type:"textarea",label:i("panel.details.stations.common.nameEn"),value:n.names[0],onChange:e=>{n.names[0]=e,s(t,n)},minW:"full"},{type:"select",label:i("panel.details.stations.common.nameOffsetX"),value:n.nameOffsetX,options:{left:i("panel.details.stations.common.left"),middle:i("panel.details.stations.common.middle"),right:i("panel.details.stations.common.right")},disabledOptions:"middle"===n.nameOffsetY?["middle"]:[],onChange:e=>{n.nameOffsetX=e,s(t,n)},minW:"full"},{type:"select",label:i("panel.details.stations.common.nameOffsetY"),value:n.nameOffsetY,options:{top:i("panel.details.stations.common.top"),middle:i("panel.details.stations.common.middle"),bottom:i("panel.details.stations.common.bottom")},disabledOptions:"middle"===n.nameOffsetX?["middle"]:[],onChange:e=>{n.nameOffsetY=e,s(t,n)},minW:"full"},{type:"custom",label:i("panel.details.stations.interchange.title"),component:T.jsx(Gt,{stationType:o.MRTInt,defaultAttrs:_n,maximumTransfers:[1/0,0,0]})}];return T.jsx(l,{fields:r})},metadata:{displayName:"panel.details.stations.MRTInt.displayName",cities:[d.Singapore],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},Sn={size:10,baseOffset:1},Nn={size:5,baseOffset:1.5},zn={names:["新宿","Shinjuku"],nameOffsetX:"right",nameOffsetY:"middle",rotate:0,textOneLine:!1,textVertical:!1,important:!1,lines:[-1,0,1]},Mn={component:e=>{var t;const{id:a,x:s,y:l,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,nameOffsetX:h=zn.nameOffsetX,nameOffsetY:f=zn.nameOffsetY,rotate:p=zn.rotate,textOneLine:u=zn.textOneLine,textVertical:g=zn.textVertical,important:C=zn.important,lines:y=zn.lines}=null!==(t=i[o.JREastBasic])&&void 0!==t?t:zn,b=n.useCallback((e=>r(a,e)),[a,r]),v=n.useCallback((e=>d(a,e)),[a,d]),j=n.useCallback((e=>m(a,e)),[a,m]),w=5*(Math.max(...y)-Math.min(...y)+1),O=5*(Math.min(...y)-.5),_=5*Math.abs(Math.cos(p*Math.PI/180))*Math.min(...y)-2.5-1,k=5*Math.abs(Math.cos(p*Math.PI/180))*Math.max(...y)+2.5+1,S=5*Math.abs(Math.sin(p*Math.PI/180))*Math.min(...y)-2.5,N=5*Math.abs(Math.sin(p*Math.PI/180))*Math.max(...y)+2.5,z="left"===h?_:"right"===h?k:0,M=(c[0].split("\n").length*("middle"===f?0:Sn.size)+(("middle"===f?0:"top"===f?2:1)+Sn.baseOffset))*Ce[f].polarity+("middle"===f?0:"top"===f?S:N),A="left"===h?"end":"right"===h?"start":"middle",P={ja:"top"===f?"down":"bottom"===f?"up":"bidirectional",en:"top"===f||u?"up":"down"},B={ja:Sn.baseOffset,en:("middle"===f?u?-c[0].split("\n").length*Sn.size/2-1:c[0].split("\n").length*Sn.size/2:0)+(C&&!u?2:0)+Nn.baseOffset},$=n.useRef(null),[W,E]=n.useState({width:0});n.useEffect((()=>E($.current.getBBox())),[c[0],g,E,$]);const X=(g?.2:.7)*Sn.size,Y={left:-X/2,middle:0,right:X/2}[h],R={top:-2,middle:0,bottom:2}[f],L=p%90!=0&&"middle"!==h?("left"===h?_:k)*Math.SQRT2:0,D=(C&&"middle"!==h?Y:0)+L,I={0:0,45:-1,90:0,135:1,180:0,225:-1,270:0,315:1}[p],H=I*Sn.size,U=u?(Math.abs(D)+W.width+1+(C?X:0))*("left"===h?-1:1):p%90!=0&&"middle"!==h?c[0].split("\n").length/2*I*Sn.size+("left"===h?-1:1)*Sn.size:0,F=(C?2:0)*Ce[f].polarity,V=W.width,G=W.height,Z={left:-(V+X)+L,middle:-(V+X)/2,right:L}[h],Q={top:-2-B.ja,middle:-G/2,bottom:3-G+B.ja}[f],q={top:3-G-B.ja,middle:0,bottom:-3+B.ja}[f],J=("top"===f?S-Nn.baseOffset:N+Nn.baseOffset)+((C?X:0)+(p%90!=0?Sn.size/2:0))*Ce[f].polarity,K={ja:"top"===f?"end":"start",en:"top"===f?"start":"end"},ee={0:0,45:-1,90:0,135:1,180:0,225:-1,270:0,315:1}[p],te=ee*Sn.size,ne=c[0].split("\n").length*Sn.size/2+Nn.baseOffset,ae=(C?1:0)*Ce[f].polarity*-1,se=(c[0].split("\n").length-0)/2*("top"===f?-1:1)*ee*Sn.size+(C?2:0)*Ce[f].polarity*-1;return T.jsxs("g",{id:a,transform:`translate(${s}, ${l})`,children:[T.jsx("g",{transform:`rotate(${p})`,children:y.map(((e,t)=>T.jsx("circle",{cx:5*e,cy:"0",r:"1.5",stroke:"black",strokeWidth:"0.2",fill:"white"},`stn_core_${a}_${t}`)))}),g?T.jsxs(T.Fragment,{children:[T.jsxs("g",{transform:`translate(0, ${J})`,textAnchor:K.ja,children:[C&&T.jsx("rect",{x:-(V-8)/2,y:q,width:V-8,height:G,rx:(V-8)/2,fill:"black"}),T.jsx(Kt,{ref:$,text:c[0].split("\n"),fontSize:Sn.size,lineWidth:Sn.size,grow:"bidirectional",baseOffset:0,baseDY:te,y:C?2.75*Ce[f].polarity:0,className:"rmp-name__jreast_ja",fill:C?"white":"black"})]}),T.jsx("g",{transform:`translate(${ae}, ${J+se})rotate(270)`,textAnchor:K.en,children:T.jsx(xe,{text:c[1].split("\n"),fontSize:Nn.size,lineHeight:Nn.size,grow:"top"===f?"down":"up",baseOffset:ne,funcDX:e=>5*e*Math.SQRT1_2*ee*("top"===f?-1:1),className:"rmp-name__jreast_en"})})]}):T.jsxs("g",{transform:`translate(${z}, ${M})`,textAnchor:A,children:[C&&T.jsx("rect",{x:Z,y:Q+1.75,width:W.width+X,height:G-3.5,ry:(G-3.5)/2,fill:"black"}),T.jsx(xe,{ref:$,x:D,y:C&&"middle"!==f?R:0,text:c[0].split("\n"),fontSize:Sn.size,lineHeight:Sn.size,grow:P.ja,baseOffset:B.ja,funcDX:e=>(e-(c[0].split("\n").length-1)/2)*H,className:"rmp-name__jreast_ja",fill:C?"white":"black"}),T.jsx(xe,{text:c[1].split("\n"),x:U,y:F,fontSize:Nn.size,lineHeight:Nn.size,grow:P.en,baseOffset:B.en,funcDX:e=>5*e*Math.SQRT1_2*I,className:"rmp-name__jreast_en"})]}),T.jsx("g",{transform:`rotate(${p})`,children:T.jsx("rect",{id:`stn_core_${a}`,fill:"url(#opaque)",fillOpacity:"50%",x:O,y:-2.5,rx:2.5,width:w,height:5,onPointerDown:b,onPointerMove:v,onPointerUp:j,style:{cursor:"move"}})})]})},icon:T.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[T.jsx("circle",{cx:"6",cy:"12",r:"2",stroke:"currentColor",strokeWidth:"0.5",fill:"none"}),T.jsx("circle",{cx:"12",cy:"12",r:"2",stroke:"currentColor",strokeWidth:"0.5",fill:"none"}),T.jsx("circle",{cx:"18",cy:"12",r:"2",stroke:"currentColor",strokeWidth:"0.5",fill:"none"})]}),defaultAttrs:zn,attrsComponent:e=>{var t;const{id:n,attrs:s,handleAttrsUpdate:o}=e,{t:i}=a(),r=[{type:"textarea",label:i("panel.details.stations.common.nameJa"),value:s.names[0],onChange:e=>{s.names[0]=e.toString(),s.names[0].length>1&&(s.textOneLine=!1,s.important=!1),o(n,s)},minW:"full"},{type:"textarea",label:i("panel.details.stations.common.nameEn"),value:s.names[1],onChange:e=>{s.names[1]=e.toString(),s.names[1].length>1&&(s.textOneLine=!1,s.important=!1),o(n,s)},minW:"full"},{type:"select",label:i("panel.details.stations.jrEastBasic.nameOffset"),value:"middle"!==s.nameOffsetX?s.nameOffsetX:s.nameOffsetY,options:{left:i("panel.details.stations.common.left"),right:i("panel.details.stations.common.right"),top:i("panel.details.stations.common.top"),bottom:i("panel.details.stations.common.bottom")},onChange:e=>{"left"===e||"right"===e?(s.nameOffsetX=e,s.nameOffsetY="middle",s.textVertical=!1):(s.nameOffsetX="middle",s.nameOffsetY=e,s.textOneLine=!1),o(n,s)},minW:"full"},{type:"select",label:i("panel.details.stations.common.rotate"),value:s.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:e=>{s.rotate=Number(e),o(n,s)},minW:"full"},{type:"switch",label:i("panel.details.stations.jrEastBasic.textOneLine"),isChecked:s.textOneLine,isDisabled:"middle"!==s.nameOffsetY||s.names.some((e=>e.split("\n").length>1)),onChange:e=>{s.textOneLine=e,o(n,s)},oneLine:!0,minW:"full"},{type:"switch",label:i("panel.details.stations.jrEastBasic.textVertical"),isChecked:s.textVertical,isDisabled:"middle"!==s.nameOffsetX,onChange:e=>{s.textVertical=e,o(n,s)},oneLine:!0,minW:"full"},{type:"switch",label:i("panel.details.stations.jrEastBasic.important"),isChecked:null!==(t=s.important)&&void 0!==t&&t,isDisabled:s.names.some((e=>e.split("\n").length>1)),onChange:e=>{s.important=e,o(n,s)},oneLine:!0,minW:"full"}];return T.jsxs(T.Fragment,{children:[T.jsx(l,{fields:r}),T.jsx(j,{label:i("panel.details.stations.jrEastBasic.lines"),children:T.jsxs(Z,{flexWrap:"wrap",flexDirection:"row",pt:"1",children:[s.lines.map(((e,t)=>T.jsx(Q,{width:"80px",inputMode:"numeric",mr:"2",mb:"2",value:e,onChange:e=>((e,t)=>{if((""===e||"-"===e)&&s.lines.length>1)s.lines.splice(t,1);else{const n=Number(e);if(Number.isNaN(n))return;s.lines[t]=n}o(n,s)})(e,t),children:T.jsx(q,{})},t))),T.jsx(Q,{width:"80px",inputMode:"numeric",mr:"2",mb:"2",value:"",onChange:e=>(e=>{const t="-"===e?-1:Number(e);Number.isNaN(t)||(s.lines.push(t),o(n,s))})(e),onKeyDown:e=>(e=>{"Backspace"===e.key&&s.lines.length>1&&(s.lines.pop(),o(n,s))})(e),children:T.jsx(q,{})})]})})]})},metadata:{displayName:"panel.details.stations.jrEastBasic.displayName",cities:[d.Tokyo],canvas:[u.RailMap],categories:[g.NationalRail],tags:[]}},An={size:10,baseOffset:1},Pn={size:5,baseOffset:1.5},Bn={names:["東京","Tōkyō"],nameOffsetX:"left",nameOffsetY:"middle",textVertical:!1,mostImportant:!1,minLength:0},$n={component:e=>{var t;const{id:a,x:s,y:l,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,nameOffsetX:h=Bn.nameOffsetX,nameOffsetY:f=Bn.nameOffsetY,textVertical:p=Bn.textVertical,mostImportant:u=Bn.mostImportant,minLength:g=Bn.minLength}=null!==(t=i[o.JREastImportant])&&void 0!==t?t:Bn,C=n.useCallback((e=>r(a,e)),[a,r]),y=n.useCallback((e=>d(a,e)),[a,d]),b=n.useCallback((e=>m(a,e)),[a,m]),v=n.useRef(null),[j,w]=n.useState({height:0,width:0});n.useEffect((()=>w(v.current.getBBox())),[c[0],p,w,v]);const O=Math.max(j.width,j.height),_=(p?.1:.7)*An.size,k=Math.max(O+_,g),S=p?An.size+1:k,N=p?k-5:An.size+1,z={left:-S/2-1,middle:0,right:S/2+1}[h],M={top:-N/2-1,middle:0,bottom:N/2+1}[f],A={left:"end",middle:"middle",right:"start"}[h],P=u?1.5:1;return T.jsxs("g",{id:a,transform:`translate(${s}, ${l})`,children:[T.jsxs("g",{transform:`scale(${P})`,children:[T.jsx("rect",{fill:"black",x:-S/2,y:-N/2,rx:p?void 0:N/2,ry:p?S/2:void 0,width:S,height:N}),p?T.jsx("text",{ref:v,className:"rmp-name__jreast_ja",textAnchor:"middle",writingMode:"vertical-rl",fontSize:An.size,fill:"white",dominantBaseline:"central",children:c[0]}):T.jsx("text",{ref:v,y:"-1",className:"rmp-name__jreast_ja",textAnchor:"middle",fontSize:An.size,fill:"white",dominantBaseline:"central",children:c[0]}),T.jsx("rect",{id:`stn_core_${a}`,fill:"black",fillOpacity:"0",x:-S/2,y:-N/2,rx:p?void 0:S/2,ry:p?N/2:void 0,width:S,height:N,onPointerDown:C,onPointerMove:y,onPointerUp:b,style:{cursor:"move"}})]}),T.jsx("g",{transform:`translate(${z*P}, ${M*P})`,textAnchor:A,children:T.jsx(xe,{text:c[1].split("\n"),fontSize:Pn.size,lineHeight:Pn.size,grow:"top"===f?"up":"middle"===f?"bidirectional":"down",baseOffset:0,className:"rmp-name__jreast_en"})})]})},icon:T.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[T.jsx("rect",{x:"3",y:"7.5",rx:"4.5",width:"18",height:"9",stroke:"currentColor",fill:"currentColor"}),T.jsx("text",{x:"12",y:"12",textAnchor:"middle",dominantBaseline:"middle",fontSize:"6",fill:"white",children:"東京"}),T.jsx("text",{x:"12",y:"20.25",textAnchor:"middle",dominantBaseline:"middle",fontSize:"3",children:"Tōkyō"})]}),defaultAttrs:Bn,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:s}=e,{t:o}=a(),i=[{type:"input",label:o("panel.details.stations.common.nameJa"),value:n.names[0],onChange:e=>{n.names[0]=e.toString(),s(t,n)},minW:"full"},{type:"textarea",label:o("panel.details.stations.common.nameEn"),value:n.names[1],onChange:e=>{n.names[1]=e.toString(),s(t,n)},minW:"full"},{type:"select",label:o("panel.details.stations.common.nameOffsetX"),value:n.nameOffsetX,options:{left:o("panel.details.stations.common.left"),middle:o("panel.details.stations.common.middle"),right:o("panel.details.stations.common.right")},disabledOptions:"middle"===n.nameOffsetY?["middle"]:[],onChange:e=>{n.nameOffsetX=e,s(t,n)},minW:"full"},{type:"select",label:o("panel.details.stations.common.nameOffsetY"),value:n.nameOffsetY,options:{top:o("panel.details.stations.common.top"),middle:o("panel.details.stations.common.middle"),bottom:o("panel.details.stations.common.bottom")},disabledOptions:"middle"===n.nameOffsetX?["middle"]:[],onChange:e=>{n.nameOffsetY=e,s(t,n)},minW:"full"},{type:"switch",label:o("panel.details.stations.jrEastImportant.textVertical"),isChecked:n.textVertical,onChange:e=>{n.textVertical=e,s(t,n)},oneLine:!0,minW:"full"},{type:"switch",label:o("panel.details.stations.jrEastImportant.mostImportant"),isChecked:n.mostImportant,onChange:e=>{n.mostImportant=e,s(t,n)},oneLine:!0,minW:"full"},{type:"input",label:o("panel.details.stations.jrEastImportant.minLength"),value:n.minLength.toString(),onChange:e=>{Number.isNaN(e)?n.minLength=0:n.minLength=Number(e),s(t,n)},minW:"full"}];return T.jsx(l,{fields:i})},metadata:{displayName:"panel.details.stations.jrEastImportant.displayName",cities:[d.Tokyo],canvas:[u.RailMap],categories:[g.NationalRail],tags:[]}},Wn={...x,nameOffsetX:"right",nameOffsetY:"top",color:[d.Foshan,"fs1","#C4D600",m.black],lineCode:"GF",stationCode:"01",open:!0,secondaryNames:["",""],tram:!1},En={component:e=>{var t,a;const{id:s,x:l,y:i,attrs:r,handlePointerDown:d,handlePointerMove:m,handlePointerUp:c}=e,{names:h=x.names,nameOffsetX:f=Wn.nameOffsetX,nameOffsetY:p=Wn.nameOffsetY,color:u=Wn.color,lineCode:g=Wn.lineCode,stationCode:C=Wn.stationCode,open:y=Wn.open,secondaryNames:b=Wn.secondaryNames,tram:v=Wn.tram}=null!==(t=r[o.FoshanMetroBasic])&&void 0!==t?t:Wn,j=n.useCallback((e=>d(s,e)),[s,d]),w=n.useCallback((e=>m(s,e)),[s,m]),O=n.useCallback((e=>c(s,e)),[s,c]),_=n.useRef(null);null===(a=_.current)||void 0===a||null===(a=a.querySelector("path"))||void 0===a||a.setAttribute("id",`stn_core_${s}`);const k={en:v?5.08:6.56,zh:v?7.29:13.13},S={top:{namesPos:1,lineHeight:k.en,polarity:-1},middle:{namesPos:0,lineHeight:0,polarity:0},bottom:{namesPos:0,lineHeight:k.zh,polarity:1}},N=v?11:15,z="left"===f?-N:"right"===f?N:0,M=v?8:10,A=(h[S[p].namesPos].split("\n").length*S[p].lineHeight+M)*S[p].polarity,P="left"===f?"end":"right"===f?"start":y||"middle"!==f||""!==b.join("")?"middle":"end",B=n.useRef(null),[$,W]=n.useState(0);n.useEffect((()=>{var e,t;return W(null!==(e=null===(t=B.current)||void 0===t?void 0:t.getBBox().width)&&void 0!==e?e:0)}),[...b]);const E=n.useRef(null),[X,Y]=n.useState(0);n.useEffect((()=>{var e,t;return Y(null!==(e=null===(t=E.current)||void 0===t?void 0:t.getBBox().width)&&void 0!==e?e:0)}),[...h]);const R="middle"===f?X/2+($+24)/2:(X+($+24)/2)*("left"===f?-1:1),L="middle"===f&&""!==b.join("")?X/2+($+24):(X+$+(0!==$?24:0))*("left"===f?-1:"right"===f?1:0);return T.jsxs("g",{id:s,transform:`translate(${l}, ${i})`,children:[T.jsx("g",{transform:`scale(${.57915*(v?.729:1)})`,onPointerDown:j,onPointerMove:w,onPointerUp:O,style:{cursor:"move"},ref:_,children:T.jsx(Ct,{id:`stn_core_${s}`,strokeColour:u[2],lineNum:""===g?void 0:g,stnNum:""===C?void 0:C,textClassName:"rmp-name__zh"})}),T.jsxs("g",{ref:E,transform:`translate(${z}, ${A})`,textAnchor:P,children:[T.jsx(xe,{text:h[0].split("\n"),fontSize:k.zh,lineHeight:k.zh,grow:"up",className:"rmp-name__zh"}),T.jsx(xe,{text:h[1].split("\n"),fontSize:k.en,lineHeight:k.en,grow:"down",className:"rmp-name__en"})]}),""!==b.join("")&&T.jsxs("g",{transform:`translate(${z+R}, ${A})`,textAnchor:"middle",children:[T.jsx("text",{fontSize:"13.13",dx:-($+5)/2,textAnchor:"end",dominantBaseline:"middle",className:"rmp-name__zh",children:"("}),T.jsx("text",{fontSize:"13.13",dx:($+5)/2,textAnchor:"start",dominantBaseline:"middle",className:"rmp-name__zh",children:")"}),T.jsxs("g",{ref:B,children:[T.jsx("text",{fontSize:"10",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:b[0]}),T.jsx("text",{fontSize:"5.42",dy:"2",dominantBaseline:"hanging",className:"rmp-name__en",children:b[1]})]})]}),!y&&T.jsxs("g",{transform:`translate(${z+L}, ${A})`,textAnchor:"middle"===f?"start":P,children:[T.jsx("text",{fontSize:"6.04",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:"(未开通)"}),T.jsx("text",{fontSize:"3.6",dy:"4",dominantBaseline:"hanging",className:"rmp-name__en",children:"(Under Construction)"})]})]})},icon:T.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:T.jsx("g",{transform:"translate(12,12)scale(0.45)",children:T.jsx(Ct,{strokeColour:"#000",lineNum:"1",stnNum:"01"})})}),defaultAttrs:Wn,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:s}=e,{t:i}=a(),r=[{type:"textarea",label:i("panel.details.stations.common.nameZh"),value:n.names[0],onChange:e=>{n.names[0]=e,s(t,n)},minW:"full"},{type:"textarea",label:i("panel.details.stations.common.nameEn"),value:n.names[1],onChange:e=>{n.names[1]=e,s(t,n)},minW:"full"},{type:"select",label:i("panel.details.stations.common.nameOffsetX"),value:n.nameOffsetX,options:{left:i("panel.details.stations.common.left"),middle:i("panel.details.stations.common.middle"),right:i("panel.details.stations.common.right")},disabledOptions:"middle"===n.nameOffsetY?["middle"]:[],onChange:e=>{n.nameOffsetX=e,s(t,n)},minW:"full"},{type:"select",label:i("panel.details.stations.common.nameOffsetY"),value:n.nameOffsetY,options:{top:i("panel.details.stations.common.top"),middle:i("panel.details.stations.common.middle"),bottom:i("panel.details.stations.common.bottom")},disabledOptions:"middle"===n.nameOffsetX?["middle"]:[],onChange:e=>{n.nameOffsetY=e,s(t,n)},minW:"full"},{type:"custom",label:i("color"),component:T.jsx(c,{type:o.FoshanMetroBasic,defaultTheme:Wn.color})},{type:"input",label:i("panel.details.stations.common.lineCode"),value:n.lineCode,onChange:e=>{n.lineCode=e,s(t,n)},minW:"full"},{type:"input",label:i("panel.details.stations.common.stationCode"),value:n.stationCode,onChange:e=>{n.stationCode=e,s(t,n)},minW:"full"},{type:"switch",label:i("panel.details.stations.foshanMetroBasic.open"),oneLine:!0,isChecked:n.open,onChange:e=>{n.open=e,s(t,n)},minW:"full"},{type:"input",label:i("panel.details.stations.foshanMetroBasic.secondaryNameZh"),value:n.secondaryNames[0],onChange:e=>{n.secondaryNames[0]=e,s(t,n)},minW:"full"},{type:"input",label:i("panel.details.stations.foshanMetroBasic.secondaryNameEn"),value:n.secondaryNames[1],onChange:e=>{n.secondaryNames[1]=e,s(t,n)},minW:"full"},{type:"switch",label:i("panel.details.stations.foshanMetroBasic.tram"),oneLine:!0,isChecked:n.tram,onChange:e=>{n.tram=e,s(t,n)},minW:"full"}];return T.jsx(l,{fields:r})},metadata:{displayName:"panel.details.stations.foshanMetroBasic.displayName",cities:[d.Foshan],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},Xn={top:3.75,middle:0,bottom:8},Yn={...x,color:[d.Qingdao,"qd1","#f7b000",m.white],nameOffsetX:"right",nameOffsetY:"top",isInt:!1},Rn={component:e=>{var t;const{id:a,x:s,y:l,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,color:h=Yn.color,nameOffsetX:f=Yn.nameOffsetX,nameOffsetY:p=Yn.nameOffsetY,isInt:u=Yn.isInt}=null!==(t=i[o.QingdaoMetroStation])&&void 0!==t?t:Yn,g=n.useCallback((e=>r(a,e)),[a,r]),C=n.useCallback((e=>d(a,e)),[a,d]),y=n.useCallback((e=>m(a,e)),[a,m]),[b,v]=u?(w=p,"left"===(j=f)&&"top"===w?[-6,-c[1].split("\n").length*Xn[w]-6]:"middle"===j&&"top"===w?[0,-c[1].split("\n").length*Xn[w]-10]:"right"===j&&"top"===w?[6,-c[1].split("\n").length*Xn[w]-6]:"left"===j&&"bottom"===w?[-6,c[0].split("\n").length*Xn[w]+6]:"middle"===j&&"bottom"===w?[0,c[0].split("\n").length*Xn[w]+7]:"right"===j&&"bottom"===w?[6,c[0].split("\n").length*Xn[w]+6]:"left"===j&&"middle"===w?[-8,2]:"right"===j&&"middle"===w?[8,2]:[0,0]):((e,t)=>{const n="left"===e?-6:"right"===e?6:0;return"top"===t?[n,-c[1].split("\n").length*Xn[t]-5.5]:"bottom"===t?[n,c[0].split("\n").length*Xn[t]+4]:[n,2]})(f,p);var j,w;const O="left"===f?"end":"right"===f?"start":"middle";return T.jsxs("g",{id:a,transform:`translate(${s}, ${l})`,children:[T.jsx("circle",{id:`stn_core_${a}`,r:u?6:2.7,stroke:u?"black":h[2],strokeWidth:u?1.5:.2,fill:"white",onPointerDown:g,onPointerMove:C,onPointerUp:y,style:{cursor:"move"}}),T.jsxs("g",{transform:`translate(${b}, ${v})`,textAnchor:O,children:[T.jsx(xe,{text:c[0].split("\n"),fontSize:8,lineHeight:8,grow:"up",baseOffset:1,className:"rmp-name__zh"}),T.jsx(xe,{text:c[1].split("\n"),fontSize:3.75,lineHeight:3.75,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]})},icon:T.jsx("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:T.jsx("circle",{cx:"12",cy:"12",r:"3",stroke:"currentColor",strokeWidth:"0.6",fill:"none"})}),defaultAttrs:Yn,attrsComponent:e=>{var t,n,s,i;const{id:r,attrs:d,handleAttrsUpdate:m}=e,{t:h}=a(),f=[{type:"textarea",label:h("panel.details.stations.common.nameZh"),value:null!==(t=d.names[0])&&void 0!==t?t:Yn.names[0],onChange:e=>{d.names[0]=e.toString(),m(r,d)},minW:"full"},{type:"textarea",label:h("panel.details.stations.common.nameEn"),value:null!==(n=d.names[1])&&void 0!==n?n:Yn.names[1],onChange:e=>{d.names[1]=e.toString(),m(r,d)},minW:"full"},{type:"select",label:h("panel.details.stations.common.nameOffsetX"),value:null!==(s=d.nameOffsetX)&&void 0!==s?s:Yn.nameOffsetX,options:{left:h("panel.details.stations.common.left"),middle:h("panel.details.stations.common.middle"),right:h("panel.details.stations.common.right")},disabledOptions:"middle"===d.nameOffsetY?["middle"]:[],onChange:e=>{d.nameOffsetX=e,m(r,d)},minW:"full"},{type:"select",label:h("panel.details.stations.common.nameOffsetY"),value:null!==(i=d.nameOffsetY)&&void 0!==i?i:Yn.nameOffsetY,options:{top:h("panel.details.stations.common.top"),middle:h("panel.details.stations.common.middle"),bottom:h("panel.details.stations.common.bottom")},disabledOptions:"middle"===d.nameOffsetX?["middle"]:[],onChange:e=>{d.nameOffsetY=e,m(r,d)},minW:"full"},{type:"custom",label:h("color"),component:T.jsx(c,{type:o.QingdaoMetroStation,defaultTheme:Yn.color}),minW:"full"},{type:"switch",label:h("panel.details.stations.qingdaoMetro.isInt"),isChecked:d.isInt,oneLine:!0,onChange:e=>{d.isInt=e,m(r,d)},minW:"full"}];return T.jsx(l,{fields:f})},metadata:{displayName:"panel.details.stations.qingdaoMetro.displayName",cities:[d.Qingdao],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},Tn=e=>{const{lineCode:t,stationCode:n,color:a,stroke:s}=e,[l,o,i]=[10,15,.8];return T.jsxs(T.Fragment,{children:[s&&T.jsx("rect",{x:-l/2-i,y:-o/2-i,width:l+2*i,height:o+2*i,rx:2.5,strokeWidth:i,stroke:"white",fill:"white"}),T.jsx("rect",{x:-l/2,y:-o/2,width:l,height:o,rx:2,strokeWidth:1.5,stroke:a[2],fill:"white"}),T.jsx("text",{x:0,y:1===t.length?-.75:-1.5,textAnchor:"middle",className:"rmp-name__tokyo_en",fontSize:1===t.length?7:4.5,fill:"black",children:t}),T.jsx("text",{x:1===n.length?0:-.4/n.length,y:5.5,textAnchor:"middle",className:"rmp-name__en",fontSize:7,fontWeight:"bold",letterSpacing:"-0.4",fill:"black",children:n})]})},Ln={names:["京橋"],nameOffsetX:"right",nameOffsetY:"middle",textVertical:!1,lineCode:"G",stationCode:"10",color:[d.Tokyo,"g","#f9a328",m.white]},Dn={component:e=>{var t;const{id:a,x:s,y:l,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,nameOffsetX:h=Ln.nameOffsetX,nameOffsetY:f=Ln.nameOffsetY,textVertical:p=Ln.textVertical,lineCode:u=Ln.lineCode,stationCode:g=Ln.stationCode,color:C=Ln.color}=null!==(t=i[o.TokyoMetroBasic])&&void 0!==t?t:Ln,y=n.useCallback((e=>r(a,e)),[a,r]),b=n.useCallback((e=>d(a,e)),[a,d]),v=n.useCallback((e=>m(a,e)),[a,m]),[j,w]=n.useState(0);n.useEffect((()=>{let e=0;c[0].split("\n").forEach((t=>{e=Math.max(e,t.length)})),w(e)}),[c[0]]);const O="left"===h?-7:"right"===h?7:0,_="left"===h?-12:"right"===h?12:0,k="bottom"===f?20:"top"===f?-9:5.5,S="bottom"===f?9+5*j:"top"===f?-9-5*j:-5,N="left"===h?"end":"right"===h?"start":"middle";return T.jsxs("g",{id:a,transform:`translate(${s}, ${l})`,children:[T.jsx(Tn,{lineCode:u,stationCode:g,color:C}),T.jsx("rect",{id:`stn_core_${a}`,x:-5.8,y:-8.2,width:11.6,height:16.4,rx:2.5,opacity:0,onPointerDown:y,onPointerMove:b,onPointerUp:v,style:{cursor:"move"}}),T.jsx("g",{textAnchor:N,className:"rmp-name-outline",strokeWidth:"1",children:p?T.jsx("g",{transform:`translate(${_}, ${S})`,textAnchor:N,children:T.jsx(Kt,{text:c[0].split("\n"),fontSize:10,lineWidth:10,grow:"bidirectional",baseOffset:0,baseDY:0,className:"rmp-name__jreast_ja",fill:"black"})}):T.jsx("g",{transform:`translate(${O}, ${k})`,textAnchor:N,children:T.jsx(xe,{text:c[0].split("\n"),fontSize:10,lineHeight:10,grow:"up",funcDX:e=>10*(e-(c[0].split("\n").length-1)/2),className:"rmp-name__jreast_ja",fill:"black"})})})]})},icon:T.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[T.jsx("rect",{x:"6.5",y:"4.5",rx:"1.5",width:"10",height:"15",stroke:"currentColor",fill:"none"}),T.jsx("text",{x:"9",y:"11",fontSize:"7",fill:"currentColor",children:"G"}),T.jsx("text",{x:"7.75",y:"18",fontSize:"7",letterSpacing:"-0.8",fill:"currentColor",children:"10"})]}),defaultAttrs:Ln,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:s}=e,{t:i}=a(),r=[{type:"textarea",label:i("panel.details.stations.common.nameJa"),value:n.names[0],onChange:e=>{n.names[0]=e.toString(),s(t,n)},minW:"full"},{type:"select",label:i("panel.details.stations.tokyoMetroBasic.nameOffset"),value:"middle"!==n.nameOffsetX?n.nameOffsetX:n.nameOffsetY,options:{left:i("panel.details.stations.common.left"),right:i("panel.details.stations.common.right"),top:i("panel.details.stations.common.top"),bottom:i("panel.details.stations.common.bottom")},onChange:e=>{"left"===e||"right"===e?(n.nameOffsetX=e,n.nameOffsetY="middle",n.textVertical=!1):(n.nameOffsetX="middle",n.nameOffsetY=e),s(t,n)},minW:"full"},{type:"switch",label:i("panel.details.stations.tokyoMetroBasic.textVertical"),isChecked:n.textVertical,isDisabled:"middle"!==n.nameOffsetX,onChange:e=>{n.textVertical=e,s(t,n)},oneLine:!0,minW:"full"},{type:"input",label:i("panel.details.stations.common.lineCode"),value:n.lineCode,onChange:e=>{n.lineCode=e,s(t,n)},minW:"full"},{type:"input",label:i("panel.details.stations.common.stationCode"),value:n.stationCode,onChange:e=>{n.stationCode=e,s(t,n)},minW:"full"},{type:"custom",label:i("color"),component:T.jsx(c,{type:o.TokyoMetroBasic,defaultTheme:Ln.color}),minW:"full"}];return T.jsx(l,{fields:r})},metadata:{displayName:"panel.details.stations.tokyoMetroBasic.displayName",cities:[d.Tokyo],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},In={names:["日本橋"],nameOffsetX:"right",nameOffsetY:"middle",mereOffset:"none",textVertical:!1,interchanges:[{lineCode:"G",stationCode:"11",color:[d.Tokyo,"g","#f9a328",m.white]},{lineCode:"T",stationCode:"10",color:[d.Tokyo,"t","#00a4db",m.white]},{lineCode:"A",stationCode:"13",color:[d.Tokyo,"a","#dd4231",m.white]}],align:"horizontal",importance:"default"},Hn={lineCode:"",stationCode:"",color:[d.Tokyo,"","#AAAAAA",m.white]},Un={component:e=>{var t;const{id:a,x:s,y:l,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,nameOffsetX:h=In.nameOffsetX,nameOffsetY:f=In.nameOffsetY,textVertical:p=In.textVertical,interchanges:u=In.interchanges,align:g=In.align,importance:C=In.importance,mereOffset:y=In.mereOffset}=null!==(t=i[o.TokyoMetroInt])&&void 0!==t?t:In,b=n.useCallback((e=>r(a,e)),[a,r]),v=n.useCallback((e=>d(a,e)),[a,d]),j=n.useCallback((e=>m(a,e)),[a,m]),[w,O]=n.useState(0);n.useEffect((()=>{let e=0;c[0].split("\n").forEach((t=>{e=Math.max(e,t.length)})),O(e)}),[c[0]]);const _="horizontal"===g?13*u.length:0,k="vertical"===g?18*u.length:0,S="left"===h?-("horizontal"===g?4:10)-_/2:"right"===h?("horizontal"===g?2:9)+_/2:"left2"===y?-5:"right2"===y?5:0,{fontSize:N,textXVer:z,textY:M,textYVer:A}="default"===C?{fontSize:10,textXVer:("left"===h?-12:"right"===h?12:-2)+("left1"===y?-4:"left2"===y?-10:"right1"===y?4:"right2"===y?10:0),textY:"bottom"===f?("vertical"===g?1:10)+k/2:"top"===f?-("vertical"===g?3:12)-k/2:("up"===y?3:"down"===y?10:0)-7.5,textYVer:"bottom"===f?("vertical"===g?3:12)+k/2+5*w:"top"===f?-("vertical"===g?1:13)-k/2-5*w:-5}:"high"===C?{fontSize:20,textXVer:("left"===h?-12:"right"===h?12:-2)+("left1"===y?-10:"left2"===y?-16:"right1"===y?10:"right2"===y?16:0),textY:"bottom"===f?("vertical"===g?3:10)+k/2:"top"===f?-("vertical"===g?1:13)-k/2:("up"===y?6:"down"===y?15:0)-13,textYVer:"bottom"===f?("vertical"===g?4:13)+k/2+10*w:"top"===f?-("vertical"===g?5:13)-k/2-10*w:-5}:{fontSize:15,textXVer:("left"===h?-12:"right"===h?12:-2)+("left1"===y?-8:"left2"===y?-13:"right1"===y?8:"right2"===y?13:0),textY:"bottom"===f?("vertical"===g?1:10)+k/2:"top"===f?-("vertical"===g?3:13)-k/2:("up"===y?4:"down"===y?12:0)-10,textYVer:"bottom"===f?("vertical"===g?3:13)+k/2+7.5*w:"top"===f?-("vertical"===g?4:13)-k/2-7.5*w:-5},P="left"===h||"left1"===y||"left2"===y?"end":"right"===h||"right1"===y||"right2"===y?"start":"middle";return T.jsxs("g",{id:a,transform:`translate(${s}, ${l})`,children:["horizontal"===g?T.jsxs(T.Fragment,{children:[T.jsx("rect",{x:-(_+3)/2,y:-10.5,width:_+3,height:21,rx:3,fill:"#808285",stroke:"black",strokeWidth:"0.5"}),u.map(((e,t)=>T.jsx("g",{transform:`translate(${13*t-(_-13)/2}, 0)`,children:T.jsx(Tn,{lineCode:e.lineCode,stationCode:e.stationCode,color:e.color,stroke:!0})},t))),T.jsx("rect",{id:`stn_core_${a}`,x:-(_+3)/2,y:-10.5,width:_+3,height:21,rx:3,opacity:0,onPointerDown:b,onPointerMove:v,onPointerUp:j,style:{cursor:"move"}})]}):T.jsxs(T.Fragment,{children:[T.jsx("rect",{x:-8,y:-(k+3)/2,width:16,height:k+3,rx:3,fill:"#808285",stroke:"black",strokeWidth:"0.5"}),u.map(((e,t)=>T.jsx("g",{transform:`translate(0, ${18*t-(k-18)/2})`,children:T.jsx(Tn,{lineCode:e.lineCode,stationCode:e.stationCode,color:e.color,stroke:!0})},t))),T.jsx("rect",{id:`stn_core_${a}`,x:-8,y:-(k+3)/2,width:16,height:k+3,rx:3,opacity:0,onPointerDown:b,onPointerMove:v,onPointerUp:j,style:{cursor:"move"}})]}),T.jsx("g",{textAnchor:P,className:"rmp-name-outline",strokeWidth:"1",children:p?T.jsx("g",{transform:`translate(${z}, ${A})`,textAnchor:"middle",children:T.jsx(Kt,{text:c[0].split("\n"),fontSize:N,lineWidth:N,grow:"bidirectional",className:"rmp-name__jreast_ja",fill:"black",fontWeight:"default"!==C?"bold":"normal"})}):T.jsx("g",{transform:`translate(${S}, ${M})`,textAnchor:P,children:T.jsx(xe,{text:c[0].split("\n"),fontSize:N,lineHeight:N,grow:"top"===f||"up"===y?"up":"down",className:"rmp-name__jreast_ja",fill:"black",fontWeight:"default"!==C?"bold":"normal"})})})]})},icon:T.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[T.jsx("rect",{x:"4",y:"8",rx:"1",width:"6.5",height:"10",stroke:"currentColor",fill:"none"}),T.jsx("rect",{x:"12.5",y:"8",rx:"1",width:"6.5",height:"10",stroke:"currentColor",fill:"none"}),T.jsx("text",{x:"5.5",y:"12.5",fontSize:"4",fill:"currentColor",children:"G"}),T.jsx("text",{x:"5",y:"16.25",fontSize:"4",letterSpacing:"-0.8",fill:"currentColor",children:"16"}),T.jsx("text",{x:"14.25",y:"12.5",fontSize:"4",fill:"currentColor",children:"H"}),T.jsx("text",{x:"13.75",y:"16.25",fontSize:"4",letterSpacing:"-0.8",fill:"currentColor",children:"18"})]}),defaultAttrs:In,attrsComponent:e=>{const{id:t,attrs:s,handleAttrsUpdate:o}=e,i=C(),{paletteAppClip:{output:r}}=y((e=>e.runtime)),{t:d}=a(),m=[{type:"textarea",label:d("panel.details.stations.common.nameJa"),value:s.names[0],onChange:e=>{s.names[0]=e.toString(),o(t,s)},minW:"full"},{type:"select",label:d("panel.details.stations.tokyoMetroBasic.nameOffset"),value:"middle"!==s.nameOffsetX?s.nameOffsetX:s.nameOffsetY,options:{left:d("panel.details.stations.common.left"),right:d("panel.details.stations.common.right"),top:d("panel.details.stations.common.top"),bottom:d("panel.details.stations.common.bottom")},onChange:e=>{"left"===e||"right"===e?(s.nameOffsetX=e,s.nameOffsetY="middle",s.textVertical=!1,"left1"!==s.mereOffset&&"left2"!==s.mereOffset&&"right1"!==s.mereOffset&&"right2"!==s.mereOffset||(s.mereOffset="none")):(s.nameOffsetX="middle",s.nameOffsetY=e,"up"!==s.mereOffset&&"down"!==s.mereOffset||(s.mereOffset="none")),o(t,s)},minW:"full"},{type:"select",label:d("panel.details.stations.tokyoMetroInt.mereOffset.displayName"),value:s.mereOffset,options:{none:d("panel.details.stations.tokyoMetroInt.mereOffset.none"),..."middle"===s.nameOffsetX?{left1:d("panel.details.stations.tokyoMetroInt.mereOffset.left1"),left2:d("panel.details.stations.tokyoMetroInt.mereOffset.left2"),right1:d("panel.details.stations.tokyoMetroInt.mereOffset.right1"),right2:d("panel.details.stations.tokyoMetroInt.mereOffset.right2")}:{up:d("panel.details.stations.tokyoMetroInt.mereOffset.up"),down:d("panel.details.stations.tokyoMetroInt.mereOffset.down")}},onChange:e=>{s.mereOffset=e,o(t,s)},minW:"full"},{type:"switch",label:d("panel.details.stations.tokyoMetroBasic.textVertical"),isChecked:s.textVertical,isDisabled:"middle"!==s.nameOffsetX,onChange:e=>{s.textVertical=e,o(t,s)},oneLine:!0,minW:"full"},{type:"select",label:d("panel.details.stations.tokyoMetroInt.importance.displayName"),value:s.importance,options:{default:d("panel.details.stations.tokyoMetroInt.importance.default"),middle:d("panel.details.stations.tokyoMetroInt.importance.middle"),high:d("panel.details.stations.tokyoMetroInt.importance.high")},onChange:e=>{s.importance=e,o(t,s)},minW:"full"},{type:"select",label:d("panel.details.stations.tokyoMetroInt.align.displayName"),value:s.align,options:{horizontal:d("panel.details.stations.tokyoMetroInt.align.horizontal"),vertical:d("panel.details.stations.tokyoMetroInt.align.vertical")},onChange:e=>{s.align=e,o(t,s)},minW:"full"}],[c,h]=n.useState(void 0);n.useEffect((()=>{void 0!==c&&r&&(s.interchanges[c].color=r,o(t,s),h(void 0))}),[null==r?void 0:r.toString()]);const f=e=>{const n=structuredClone(s.interchanges);n.push(Hn);for(let t=n.length-1;t>e;t--)n[t]=structuredClone(n[t-1]);n[e]=Hn,o(t,{...s,interchanges:n})};return T.jsxs(T.Fragment,{children:[T.jsx(l,{fields:m}),T.jsx(j,{label:d("panel.details.stations.interchange.title"),children:T.jsxs(H,{align:"flex-start",children:[s.interchanges.map(((e,n)=>T.jsxs(L,{children:[T.jsx(w,{theme:e.color,onClick:()=>{h(n),i(O(e.color))}}),T.jsx(j,{label:d("panel.details.stations.common.lineCode"),children:T.jsx(M,{defaultValue:e.lineCode,onDebouncedChange:e=>((e,n)=>{s.interchanges[n].lineCode=e,o(t,s)})(e,n)})}),T.jsx(j,{label:d("panel.details.stations.common.stationCode"),children:T.jsx(M,{defaultValue:e.stationCode,onDebouncedChange:e=>((e,n)=>{s.interchanges[n].stationCode=e,o(t,s)})(e,n)})}),T.jsx(I,{size:"sm",variant:"ghost","aria-label":d("panel.details.stations.interchange.add"),icon:T.jsx(v,{}),onClick:()=>f(n)}),T.jsx(I,{size:"sm",variant:"ghost","aria-label":d("panel.details.stations.interchange.add"),icon:T.jsx(k,{}),onClick:()=>(e=>{const n=s.interchanges.filter(((t,n)=>n!==e));o(t,{...s,interchanges:n})})(n),isDisabled:1===s.interchanges.length})]},n))),T.jsx(G,{size:"sm",width:"100%",variant:"outline",leftIcon:T.jsx(v,{}),onClick:()=>f(s.interchanges.length),children:d("panel.details.stations.interchange.title")})]})})]})},metadata:{displayName:"panel.details.stations.tokyoMetroInt.displayName",cities:[d.Tokyo],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},Fn={0:{textDx:0,textDy:-9.15,textAnchor:"middle",dominantBaseline:"auto",polarity:-1,grow:"up"},45:{textDx:9.15*Math.SQRT1_2,textDy:-9.15*Math.SQRT1_2,textAnchor:"start",dominantBaseline:"auto",polarity:-1,grow:"up"},90:{textDx:9.15,textDy:0,textAnchor:"start",dominantBaseline:"middle",polarity:0,grow:"bidirectional"},135:{textDx:9.15*Math.SQRT1_2,textDy:9.15*Math.SQRT1_2,textAnchor:"start",dominantBaseline:"hanging",polarity:1,grow:"down"},180:{textDx:0,textDy:9.15,textAnchor:"middle",dominantBaseline:"hanging",polarity:1,grow:"down"},225:{textDx:-9.15*Math.SQRT1_2,textDy:9.15*Math.SQRT1_2,textAnchor:"end",dominantBaseline:"hanging",polarity:1,grow:"down"},270:{textDx:-9.15,textDy:0,textAnchor:"end",dominantBaseline:"middle",polarity:0,grow:"bidirectional"},315:{textDx:-9.15*Math.SQRT1_2,textDy:-9.15*Math.SQRT1_2,textAnchor:"end",dominantBaseline:"auto",polarity:-1,grow:"up"}},Vn=[d.London,"central","#DC241F",m.white,0],Gn=n.memo((e=>{const{id:t,stepFreeAccess:n,...a}=e;return T.jsxs("g",{...a,children:[T.jsx("path",{fill:"train"===n?"#1C3E93":"white",stroke:"#1C3E93",strokeWidth:2.5,d:"M0-31c17.1,0,31,13.9,31,31S17.1,31,0,31S-31,17.1-31,0S-17.1-31,0-31"}),T.jsx("path",{fill:"train"===n?"white":"#1C3E93",d:"M-10.5,9c1.4,4.9,6,8.4,11.3,8.4c6.5,0,11.8-5.3,11.8-11.8c0-3.4-1.5-6.5-3.8-8.7l0.7-5.1\n\tc4.6,2.9,7.6,8,7.6,13.8c0,9-7.3,16.3-16.3,16.3c-5.9,0-11-3.1-13.9-7.7L-10.5,9z"}),T.jsx("path",{fill:"train"===e.stepFreeAccess?"white":"#1C3E93",d:"M0.5-20.5c0,2.5,2,4.6,4.6,4.6c2.5,0,4.6-2.1,4.6-4.6s-2.1-4.6-4.6-4.6S0.5-23,0.5-20.5"}),T.jsx("path",{fill:"train"===n?"white":"#1C3E93",d:"M3-12.4L2.5-9.2h-9.9c0,0-2.1,0.2-2.1,2.2s2.1,2.2,2.1,2.2h9.3l-0.5,3h-12.5c0,0-0.9,0-1.3,0.5\n\tC-12.8-1-13.2,0-13.2,0l-7,14.2c0,0-0.8,1.8,1.2,2.9c2,1.1,3.3-1,3.3-1l5.5-11.3c0,0,0.5-0.7,1-1c0.6-0.3,1.1-0.3,1.1-0.3H3.4\n\tc0,0,1.2,0,2.2-0.9c0.9-0.9,1.1-2,1.1-2l1.7-12.4c0,0,0-2.6-2.7-2.7C3.6-14.5,3-12.4,3-12.4"}),T.jsx("path",{id:`stn_core_${t}`,fill:"train"===n?"#1C3E93":"white",fillOpacity:"0",stroke:"#1C3E93",strokeWidth:2.5,strokeOpacity:"0",d:"M0-31c17.1,0,31,13.9,31,31S17.1,31,0,31S-31,17.1-31,0S-17.1-31,0-31"})]})}),((e,t)=>JSON.stringify(e)===JSON.stringify(t))),Zn={names:["Station"],transfer:[[Vn]],rotate:0,terminal:!1,stepFreeAccess:"none"},Qn={component:e=>{var t;const{id:a,x:s,y:l,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,transfer:h=Zn.transfer,rotate:f=Zn.rotate,terminal:p=Zn.terminal,stepFreeAccess:u=Zn.stepFreeAccess}=null!==(t=i[o.LondonTubeBasic])&&void 0!==t?t:Zn,g=n.useCallback((e=>r(a,e)),[a,r]),C=n.useCallback((e=>d(a,e)),[a,d]),y=n.useCallback((e=>m(a,e)),[a,m]),b=(f-90)*Math.PI/180,v=(p?2:1)*(.66*5+2.5),j=Fn[f].textDx+Math.cos(b)*Math.max(...h[0].map((e=>e[4])))*5,w=Fn[f].textDy+Math.sin(b)*Math.max(...h[0].map((e=>e[4])))*5,O=-(Math.max(...h[0].map((e=>e[4])))+Math.min(...h[0].map((e=>e[4]))))/2*5,_=Math.sin(f*Math.PI/180)*O,k=Math.cos(f*Math.PI/180)*O;return T.jsxs("g",{id:a,children:[T.jsx("g",{transform:`translate(${s}, ${l})rotate(${f})`,onPointerDown:g,onPointerMove:C,onPointerUp:y,style:{cursor:"move"},children:"none"===u?h[0].map((e=>T.jsx("rect",{id:`stn_core_${a}`,x:.66*-5/2,y:.66*-5-2.5-5*e[4],width:5*.66,height:v,stroke:"none",fill:e[2]},`${a}_${e[2]}_${e[4]}`))):T.jsx(Gn,{id:a,stepFreeAccess:u,transform:`translate(${_},${k})rotate(${-f})scale(0.2333)`},`stn_core_${a}`)}),T.jsx("g",{transform:`translate(${s+j}, ${l+w})`,textAnchor:Fn[f].textAnchor,fill:"#003888",children:T.jsx(xe,{text:c[0].split("\n"),fontSize:10,lineHeight:8.5,dominantBaseline:Fn[f].dominantBaseline,grow:Fn[f].grow,baseOffset:0,className:"rmp-name__tube"})})]})},icon:T.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:T.jsx("rect",{x:"6",y:"9",width:"12",height:"6",stroke:"currentColor",fill:"currentColor"})}),defaultAttrs:Zn,attrsComponent:e=>{var t;const{id:n,attrs:s,handleAttrsUpdate:o}=e,{t:i}=a(),r=[{type:"textarea",label:i("panel.details.stations.common.nameEn"),value:s.names[0],onChange:e=>{s.names[0]=e.toString(),o(n,s)},minW:"full"},{type:"select",label:i("panel.details.stations.common.rotate"),value:s.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:e=>{s.rotate=Number(e),o(n,s)},minW:"full"},{type:"switch",label:i("panel.details.stations.londonTubeBasic.terminal"),isChecked:s.terminal,isDisabled:s.transfer[0].length>1,onChange:e=>{s.terminal=e,o(n,s)},oneLine:!0,minW:"full"},{type:"select",label:i("panel.details.stations.londonTubeCommon.stepFreeAccess"),value:s.stepFreeAccess,options:{none:i("panel.details.stations.londonTubeCommon.stepFreeAccessNone"),train:i("panel.details.stations.londonTubeCommon.stepFreeAccessTrain"),platform:i("panel.details.stations.londonTubeCommon.stepFreeAccessPlatform")},onChange:e=>{s.stepFreeAccess=e,o(n,s)},minW:"full"}],d=null!==(t=s.transfer)&&void 0!==t?t:Zn.transfer;return T.jsxs(T.Fragment,{children:[T.jsx(l,{fields:r}),T.jsx(j,{label:i("panel.details.stations.interchange.title"),children:T.jsxs(H,{align:"flex-start",children:[T.jsx(V,{size:"xs",children:i("panel.details.stations.londonTubeBasic.shareTracks")}),T.jsx(qn,{interchangeList:d[0],onAdd:(m=0,e=>{const t=structuredClone(d);if(t.length<=m)for(let n=t.length;n<=m;n++)t[n]=[Vn];t[m].push(e),s.transfer=t,o(n,s)}),onDelete:(e=>t=>{if(d.length>e&&d[e].length>t){const a=d.map(((n,a)=>a===e?n.filter(((e,n)=>n!==t)):n));s.transfer=a,o(n,s)}})(0),onUpdate:(e=>(t,a)=>{if(d.length>e&&d[e].length>t){const l=d.map(((n,s)=>s===e?n.map(((e,n)=>n===t?[0,1,2,3,4,5,6].map((t=>void 0===a[t]?e[t]:a[t])):e)):n));s.transfer=l,o(n,s)}})(0)})]})})]});var m},metadata:{displayName:"panel.details.stations.londonTubeBasic.displayName",cities:[d.London],canvas:[u.RailMap],categories:[g.Metro],tags:[]}};function qn(e){const{interchangeList:t,onAdd:s,onDelete:l,onUpdate:o}=e,i=C(),{paletteAppClip:{output:r}}=y((e=>e.runtime)),{t:d}=a(),[m,c]=n.useState();return n.useEffect((()=>{void 0!==m&&r&&(null==o||o(m,[...r,t[m][4]]),c(void 0))}),[null==r?void 0:r.toString()]),T.jsxs(b,{direction:"column",children:[0===t.length&&T.jsxs(L,{spacing:.5,"data-testid":"interchange-card-stack",children:[T.jsx(D,{as:"i",flex:1,align:"center",fontSize:"md",colorScheme:"gray",children:d("panel.details.stations.interchange.noTrackShare")}),T.jsx(I,{size:"sm",variant:"ghost","aria-label":d("panel.details.stations.interchange.add"),onClick:()=>null==s?void 0:s(Vn),icon:T.jsx(v,{})})]}),t.map(((e,n)=>T.jsxs(L,{spacing:.5,"data-testid":`interchange-card-stack-${n}`,children:[T.jsx(j,{label:d("color"),minW:"40px",noLabel:0!==n,children:T.jsx(w,{theme:[e[0],e[1],e[2],e[3]],onClick:()=>{c(n),i(O([e[0],e[1],e[2],e[3]]))}})}),T.jsx(j,{label:d("panel.details.stations.londonTubeBasic.shareTracksIndex"),children:T.jsx(A,{defaultValue:e[4],min:-5,max:5,step:1,onThrottledChange:t=>null==o?void 0:o(n,[e[0],e[1],e[2],e[3],t])})}),T.jsxs(H,{children:[s&&n===t.length-1?T.jsx(I,{size:"sm",variant:"ghost","aria-label":d("panel.details.stations.interchange.copy"),onClick:()=>{const e=structuredClone(t.slice(-1)[0]);e[4]=Math.max(...t.map((e=>e[4])))+1,null==s||s(e)},icon:T.jsx(_,{})}):T.jsx(U,{minW:8}),l&&0!==n&&T.jsx(I,{size:"sm",variant:"ghost","aria-label":d("panel.details.stations.interchange.remove"),onClick:()=>null==l?void 0:l(n),icon:T.jsx(k,{})})]})]},n)))]})}const Jn={names:["Station"],nameOffsetX:"right",nameOffsetY:"top",stepFreeAccess:"none"},Kn={component:e=>{var t;const{id:a,x:s,y:l,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,nameOffsetX:h=Jn.nameOffsetX,nameOffsetY:f=Jn.nameOffsetY,stepFreeAccess:p=Jn.stepFreeAccess}=null!==(t=i[o.LondonTubeInt])&&void 0!==t?t:Jn,u=n.useCallback((e=>r(a,e)),[a,r]),g=n.useCallback((e=>d(a,e)),[a,d]),C=n.useCallback((e=>m(a,e)),[a,m]),y="left"===h?-9.15:"right"===h?9.15:0,b="top"===f?-9.15:"bottom"===f?9.15:0,v="left"===h?"end":"right"===h?"start":"middle",j="top"===f?"auto":"bottom"===f?"hanging":"middle";return T.jsxs("g",{id:a,children:[T.jsx("g",{transform:`translate(${s}, ${l})`,onPointerDown:u,onPointerMove:g,onPointerUp:C,style:{cursor:"move"},children:"none"===p?T.jsx("circle",{id:`stn_core_${a}`,r:6.25,width:5*.66,height:5.800000000000001,stroke:"black",strokeWidth:2.5,fill:"white"}):T.jsx(Gn,{id:a,stepFreeAccess:p,transform:"scale(0.2333)"})}),T.jsx("g",{transform:`translate(${s+y}, ${l+b})`,textAnchor:v,fill:"#003888",children:T.jsx(xe,{text:c[0].split("\n"),fontSize:10,lineHeight:8.5,dominantBaseline:j,grow:"top"===f?"up":"bottom"===f?"down":"bidirectional",baseOffset:1,className:"rmp-name__tube"})})]})},icon:T.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:T.jsx("circle",{cx:"12",cy:"12",r:"6",stroke:"currentColor",fill:"white"})}),defaultAttrs:Jn,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:s}=e,{t:o}=a(),i=[{type:"textarea",label:o("panel.details.stations.common.nameEn"),value:n.names[0],onChange:e=>{n.names[0]=e.toString(),s(t,n)},minW:"full"},{type:"select",label:o("panel.details.stations.common.nameOffsetX"),value:n.nameOffsetX,options:{left:o("panel.details.stations.common.left"),middle:o("panel.details.stations.common.middle"),right:o("panel.details.stations.common.right")},disabledOptions:"middle"===n.nameOffsetY?["middle"]:[],onChange:e=>{n.nameOffsetX=e,s(t,n)},minW:"full"},{type:"select",label:o("panel.details.stations.common.nameOffsetY"),value:n.nameOffsetY,options:{top:o("panel.details.stations.common.top"),middle:o("panel.details.stations.common.middle"),bottom:o("panel.details.stations.common.bottom")},disabledOptions:"middle"===n.nameOffsetX?["middle"]:[],onChange:e=>{n.nameOffsetY=e,s(t,n)},minW:"full"},{type:"select",label:o("panel.details.stations.londonTubeCommon.stepFreeAccess"),value:n.stepFreeAccess,options:{none:o("panel.details.stations.londonTubeCommon.stepFreeAccessNone"),train:o("panel.details.stations.londonTubeCommon.stepFreeAccessTrain"),platform:o("panel.details.stations.londonTubeCommon.stepFreeAccessPlatform")},onChange:e=>{n.stepFreeAccess=e,s(t,n)},minW:"full"}];return T.jsx(l,{fields:i})},metadata:{displayName:"panel.details.stations.londonTubeInt.displayName",cities:[d.London],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},ea={...x,nameOffsetX:"right",nameOffsetY:"top",interchange:!1},ta={component:e=>{var t;const{id:a,x:s,y:l,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,nameOffsetX:h=ea.nameOffsetX,nameOffsetY:f=ea.nameOffsetY,interchange:p=ea.interchange}=null!==(t=i[o.GuangdongIntercityRailway])&&void 0!==t?t:ea,u=n.useCallback((e=>r(a,e)),[a,r]),g=n.useCallback((e=>d(a,e)),[a,d]),C=n.useCallback((e=>m(a,e)),[a,m]),y="left"===h?-13.33:"right"===h?13.33:0,b=(c[Ce[f].namesPos].split("\n").length*Ne[f].lineHeight+Ne[f].offset)*Ce[f].polarity,v="left"===h?"end":"right"===h?"start":"middle";return n.useMemo((()=>T.jsxs("g",{id:a,transform:`translate(${s}, ${l})`,children:[T.jsx("circle",{r:5,stroke:"#2559a8",strokeWidth:"1.5",fill:"white"}),p&&T.jsx("circle",{r:2.5,stroke:"#2559a8",strokeWidth:"1",fill:"white"}),T.jsx("circle",{id:`stn_core_${a}`,r:5.665,fill:"white",fillOpacity:"0",onPointerDown:u,onPointerMove:g,onPointerUp:C,style:{cursor:"move"}}),T.jsxs("g",{transform:`translate(${y}, ${b})`,textAnchor:v,className:"rmp-name-outline",strokeWidth:"1",children:[T.jsx(xe,{text:c[0].split("\n"),fontSize:13.13,lineHeight:13.13,grow:"up",baseOffset:1,className:"rmp-name__zh"}),T.jsx(xe,{text:c[1].split("\n"),dx:"right"===h?1.67:0,fontSize:5.83,lineHeight:5.83,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]})),[a,s,l,...c,h,f,p,u,g,C])},icon:T.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[T.jsx("circle",{cx:"12",cy:"12",r:"8",stroke:"currentColor",strokeWidth:"2.25",fill:"white"}),T.jsx("circle",{cx:"12",cy:"12",r:"4",stroke:"currentColor",strokeWidth:"1.5",fill:"white"})]}),defaultAttrs:ea,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:s}=e,{t:o}=a(),i=[{type:"textarea",label:o("panel.details.stations.common.nameZh"),value:n.names[0],onChange:e=>{n.names[0]=e.toString(),s(t,n)},minW:"full"},{type:"textarea",label:o("panel.details.stations.common.nameEn"),value:n.names[1],onChange:e=>{n.names[1]=e.toString(),s(t,n)},minW:"full"},{type:"select",label:o("panel.details.stations.common.nameOffsetX"),value:n.nameOffsetX,options:{left:o("panel.details.stations.common.left"),middle:o("panel.details.stations.common.middle"),right:o("panel.details.stations.common.right")},disabledOptions:"middle"===n.nameOffsetY?["middle"]:[],onChange:e=>{n.nameOffsetX=e,s(t,n)},minW:"full"},{type:"select",label:o("panel.details.stations.common.nameOffsetY"),value:n.nameOffsetY,options:{top:o("panel.details.stations.common.top"),middle:o("panel.details.stations.common.middle"),bottom:o("panel.details.stations.common.bottom")},disabledOptions:"middle"===n.nameOffsetX?["middle"]:[],onChange:e=>{n.nameOffsetY=e,s(t,n)},minW:"full"},{type:"switch",label:o("panel.details.stations.interchange.title"),oneLine:!0,isChecked:n.interchange,onChange:e=>{n.interchange=e,s(t,n)},minW:"full"}];return T.jsx(l,{fields:i})},metadata:{displayName:"panel.details.stations.guangdongIntercityRailway.displayName",cities:[d.Shanghai],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},na=(e("s",{[o.ShmetroBasic]:Me,[o.ShmetroBasic2020]:Be,[o.ShmetroInt]:Ee,[o.ShmetroOutOfSystemInt]:Ye,[o.ShanghaiSuburbanRailway]:Te,[o.GzmtrBasic]:Nt,[o.GzmtrInt]:Bt,[o.GzmtrInt2024]:Yt,[o.BjsubwayBasic]:Dt,[o.BjsubwayInt]:Ft,[o.MTR]:Jt,[o.SuzhouRTBasic]:sn,[o.SuzhouRTInt]:mn,[o.KunmingRTBasic]:fn,[o.KunmingRTInt]:Cn,[o.MRTBasic]:jn,[o.MRTInt]:kn,[o.JREastBasic]:Mn,[o.JREastImportant]:$n,[o.FoshanMetroBasic]:En,[o.QingdaoMetroStation]:Rn,[o.TokyoMetroBasic]:Dn,[o.TokyoMetroInt]:Un,[o.LondonTubeBasic]:Qn,[o.LondonTubeInt]:Kn,[o.GuangdongIntercityRailway]:ta}),new BroadcastChannel("RMP_MASTER_CHANNEL")),aa={id:"null",value:"",param:null,bg:"#000000",fg:m.white},sa={h:"80%",w:"80%","& iframe":{h:"100%",w:"100%"},"& div":{h:"100%",w:"100%"}},la=e("k",(e=>{const{isOpen:t,onClose:s,onSubmit:l}=e,{t:o}=a(),i=n.useRef(window.graph),r=J(),[d,m]=n.useState([]),[c,h]=n.useState(aa),[f,p]=n.useState(""),[u,g]=n.useState(!1),[x,C]=n.useState(!1);n.useEffect((()=>{t&&(p(""),h(aa),g(!1),m(je(i.current).filter((e=>e.randomId)).map((e=>{var t,n,a;return{id:e.randomId,value:null!==(t=e.label)&&void 0!==t?t:e.randomId,param:e,bg:null!==(n=e.labelColorBg)&&void 0!==n?n:aa.bg,fg:null!==(a=e.labelColorFg)&&void 0!==a?a:aa.fg}}))))}),[t]);const y=e=>{try{var t,n,a,o,i;const s=null!==(t=c.param)&&void 0!==t?t:JSON.parse(e),d=s.id?s.id:s.randomId,m=null!==(n=s.labelColorBg)&&void 0!==n?n:W(),h={randomId:d,label:null!==(a=s.label)&&void 0!==a?a:d,labelColorBg:m,labelColorFg:E(m),nodeType:null!==(o=s.nodeType)&&void 0!==o?o:s.type,transform:null!==(i=s.transform)&&void 0!==i?i:X,svgs:s.svgs,components:s.components,color:s.color,core:s.core,version:s.version};if(!h.version||h.version<2)return void r({title:"Outdated configuration!",status:"error",duration:9e3,isClosable:!0});l(h)}catch(d){return void C(!0)}s()},b=n.useRef(t),[v,w]=n.useState("DESIGNER"),[O,_]=n.useState(!1);return n.useEffect((()=>{b.current=t}),[t]),n.useEffect((()=>{const e=e=>{const{event:t,data:n}=e.data;"MASTER_POST"===t&&b.current&&(_(!1),y(n))};return na.addEventListener("message",e),()=>{na.removeEventListener("message",e)}}),[]),T.jsxs(T.Fragment,{children:[T.jsxs(K,{isOpen:t,onClose:s,size:"sm",scrollBehavior:"inside",children:[T.jsx(ee,{}),T.jsxs(te,{children:[T.jsx(ne,{children:o("header.settings.procedures.masterManager.importTitle")}),T.jsx(ae,{}),T.jsxs(se,{children:[T.jsx(j,{label:o("header.settings.procedures.masterManager.importFrom"),children:T.jsx(P,{data:d,displayHandler:e=>T.jsx(B,{name:e.value,fg:e.fg,bg:e.bg,title:e.value,sx:{display:"inline-block",overflow:"hidden",textOverflow:"ellipsis"}}),filter:(e,t)=>t.id.toLowerCase().includes(e.toLowerCase())||Object.values(t.id).some((t=>t.toLowerCase().includes(e.toLowerCase()))),value:c.value,onChange:e=>{h(e),g(!1),p("")}})}),T.jsxs(j,{label:o("header.settings.procedures.masterManager.importOther"),children:[T.jsxs(Z,{direction:"row",width:"100%",children:[T.jsx(G,{m:1,width:"100%",onClick:async()=>{w("DESIGNER"),_(!0)},children:o("RMP Designer")}),T.jsx(G,{m:1,width:"100%",onClick:()=>{w("GALLERY"),_(!0)},children:o("RMP Gallery")})]}),T.jsx(G,{m:1,onClick:()=>g(!0),children:o("header.settings.procedures.masterManager.importParam")}),T.jsx(le,{width:"100%",placeholder:"qwq",fontSize:"sm",fontFamily:"monospace",hidden:!u,onChange:e=>{C(!1),p(e.target.value),h(aa)},isInvalid:x})]})]}),T.jsxs(oe,{children:[T.jsx(G,{colorScheme:"blue",variant:"outline",mr:"1",onClick:s,children:o("cancel")}),T.jsx(G,{colorScheme:"blue",variant:"solid",mr:"1",onClick:()=>y(f),isDisabled:"null"===c.id&&""===f,children:o("apply")})]})]})]}),T.jsx(oa,{isOpen:O,onClose:()=>_(!1),source:v})]})})),oa=e=>{const{isOpen:t,onClose:n,source:a}=e,s="DESIGNER"===a?"/rmp-designer/#/export":"/rmp-gallery/?tabId=2&master=true";return T.jsxs($,{isOpen:t,onClose:n,size:"full",sx:sa,children:[T.jsx("iframe",{src:s,loading:"lazy"}),T.jsx(ie,{onClick:n,position:"fixed",top:"5px",right:"15px"})]})};e("M",(e=>{const{isOpen:t,onClose:s}=e,{t:o}=a(),{refresh:{nodes:r}}=y((e=>e.runtime)),d=n.useRef(window.graph),c=C(),[h,f]=n.useState([]);n.useEffect((()=>{t&&f(je(d.current))}),[t,r]);const[p,u]=n.useState(void 0),g=h.map((e=>{var t,n,a,s,r;const h=[{label:o("header.settings.procedures.masterManager.id"),type:"custom",component:T.jsx(B,{name:null!==(t=e.randomId)&&void 0!==t?t:"undefined",fg:null!==(n=e.labelColorFg)&&void 0!==n?n:m.white,bg:null!==(a=e.labelColorBg)&&void 0!==a?a:"#000000"})},{label:o("header.settings.procedures.masterManager.label"),type:"input",value:null!==(s=e.label)&&void 0!==s?s:o("panel.details.nodes.master.undefined"),onChange:t=>{return n=e,a=t,d.current.filterNodes((e=>d.current.getNodeAttribute(e,"type")===i.Master&&d.current.getNodeAttributes(e)[i.Master].randomId===n.randomId)).forEach((e=>{d.current.mergeNodeAttributes(e,{[i.Master]:{...n,label:a}})})),c(N()),void c(z(d.current.export()));var n,a},hidden:!e.randomId},{label:o("header.settings.procedures.masterManager.label"),type:"output",value:null!==(r=e.label)&&void 0!==r?r:o("panel.details.nodes.master.undefined"),hidden:!!e.randomId},{label:o("header.settings.procedures.masterManager.type"),type:"custom",component:T.jsx(B,{name:o(`header.settings.procedures.masterManager.types.${e.nodeType}`),fg:m.white,bg:"MiscNode"===e.nodeType?"#FF8651":"#51BC00"})}];return T.jsxs(Z,{width:"100%",direction:"row",children:[T.jsx(l,{fields:h,minW:"120px"}),T.jsxs(Z,{direction:"row",mr:"auto",children:[T.jsx(G,{onClick:()=>u(e.randomId),children:T.jsx(Y,{})}),T.jsx(G,{onClick:()=>(e=>{const t={id:e.randomId,type:e.nodeType,label:e.label,svgs:e.svgs,components:e.components,color:e.color,core:e.core,transform:e.transform,version:e.version};t.components.forEach(((e,n)=>{t.components[n].value=e.defaultValue})),we(`RMP_Master_Node_${(new Date).valueOf()}.json`,"application/json",JSON.stringify(t))})(e),isDisabled:!e.randomId,children:T.jsx(R,{})}),T.jsx(G,{onClick:()=>{return t=e.randomId,d.current.filterNodes((e=>d.current.getNodeAttribute(e,"type")===i.Master&&d.current.getNodeAttributes(e)[i.Master].randomId===t)).forEach((e=>{d.current.dropNode(e)})),c(N()),void c(z(d.current.export()));var t},children:T.jsx(k,{})})]})]})}));return T.jsxs(K,{isOpen:t,onClose:s,size:"xl",scrollBehavior:"inside",children:[T.jsx(ee,{}),T.jsxs(te,{children:[T.jsx(ne,{children:o("header.settings.procedures.masterManager.title")}),T.jsx(ae,{}),T.jsxs(se,{width:"100%",children:[...g,T.jsx(la,{isOpen:!!p,onClose:()=>u(void 0),onSubmit:e=>{d.current.filterNodes((e=>d.current.getNodeAttribute(e,"type")===i.Master&&d.current.getNodeAttributes(e)[i.Master].randomId===p)).forEach((t=>{const n=structuredClone(e),a=d.current.getNodeAttributes(t),s=structuredClone(a[i.Master]);n.components.forEach(((e,t)=>{var a,l;n.components[t].value=null!==(l=e.id,a=void s.components.forEach((e=>{var t;if(e.id===l)return null!==(t=e.value)&&void 0!==t?t:e.defaultValue})))&&void 0!==a?a:e.defaultValue})),void 0!==n.color&&(n.color.value=s.color?n.color.value:n.color.defaultValue),d.current.mergeNodeAttributes(t,{[i.Master]:n})})),c(N()),c(z(d.current.export()))}})]}),T.jsx(oe,{children:T.jsx(G,{colorScheme:"blue",variant:"outline",mr:"1",onClick:s,children:o("close")})})]})]})}))}}})); +System.register(["./react-legacy-CB7hQk4J.js","./index-legacy-jqOeRlnz.js","./chakra-legacy--ElhKRU8.js"],(function(e,t){"use strict";var n,a,s,l,o,i,r,d,m,c,h,f,p,u,g,x,C,y,b,v,j,w,O,_,k,S,N,z,M,A,P,B,$,W,E,X,Y,R,T,L,D,I,H,U,F,V,G,Z,Q,q,J,K,ee,te,ne,ae,se,le,oe,ie;return{setters:[e=>{n=e.b,a=e.u,s=e.r},e=>{l=e.i,o=e.S,i=e.aw,r=e.r,d=e.C,m=e.M,c=e.aN,h=e.L,f=e.e,p=e.aP,u=e.aQ,g=e.aR,x=e.aS,C=e.c,y=e.d,b=e.aT,v=e.aU,j=e.P,w=e.V,O=e.W,_=e.aV,k=e.aW,S=e.aM,N=e.q,z=e.v,M=e.aX,A=e.aY,P=e.Q,B=e.R,$=e.w,W=e.aZ,E=e.a_,X=e.aO,Y=e.D,R=e.a},e=>{T=e.j,L=e.aK,D=e.a4,I=e.af,H=e.ax,U=e.B,F=e.a6,V=e.ad,G=e.O,Z=e.g,Q=e.b0,q=e.b1,J=e.aL,K=e.at,ee=e.$,te=e.au,ne=e.a1,ae=e.a2,se=e.a3,le=e.Q,oe=e.a5,ie=e.al}],execute:function(){e("j",(function(){const{i18n:e}=a();return t=>{var n,a;return null!==(n=null!==(a=e.languages.map((e=>t[e])).find((e=>void 0!==e)))&&void 0!==a?a:t.en)&&void 0!==n?n:"(Translation Error)"}}));var t=(e=>(e.Airport="airport",e.Airport2024="airport_2024",e.Maglev="maglev",e.Disney="disney",e.Railway="railway",e.Railway2024="railway_2024",e.HSR="hsr",e.AirportHK="airport_hk",e.DisneyHK="disney_hk",e.NgongPing360="ngong_ping_360",e.Tiananmen="tiananmen",e.AirportBJ="airport_bj",e.BusTerminalSuzhou="bus_terminal_suzhou",e.RailwaySuzhou="railway_suzhou",e.BusInterchange="bus_interchange",e.AirportSG="airport_sg",e.CruiseCentre="cruise_centre",e.SentosaExpress="sentosa_express",e.CableCar="cable_car",e.Merlion="merlion",e.MarinaBaySands="marina_bay_sands",e.GardensByTheBay="gardens_by_the_bay",e.SingaporeFlyer="singapore_flyer",e.Esplanade="esplanade",e.AirportQingdao="airport_qingdao",e.CoachStationQingdao="coach_station_qingdao",e.CruiseTerminalQingdao="cruise_terminal_qingdao",e.RailwayQingdao="railway_qingdao",e.TramQingdao="tram_qingdao",e.AirportGuangzhou="airport_guangzhou",e.RailwayGuangzhou="railway_guangzhou",e.IntercityGuangzhou="intercity_guangzhou",e))(t||{});const re={type:"airport"},de=(e("n",{component:e=>{const{id:t,x:a,y:s,attrs:l,handlePointerDown:o,handlePointerMove:i,handlePointerUp:r}=e,{type:d=re.type}=null!=l?l:re,m=n.useRef(null),[c,h]=n.useState({width:25,height:25});n.useEffect((()=>h(m.current.getBBox())),[d,h,m]);const f=n.useCallback((e=>o(t,e)),[t,o]),p=n.useCallback((e=>i(t,e)),[t,i]),u=n.useCallback((e=>r(t,e)),[t,r]);return T.jsx("g",{id:t,transform:`translate(${a-c.width/2}, ${s-c.height/2})`,onPointerDown:f,onPointerMove:p,onPointerUp:u,style:{cursor:"move"},children:T.jsx("image",{ref:m,href:`/rmp/images/facilities/${d}.svg`,onLoad:()=>h(m.current.getBBox())})})},icon:T.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:T.jsxs("g",{transform:"translate(12, 0)scale(0.4)",children:[T.jsx("circle",{cx:"0",cy:"29.33899",r:"29.33899",fill:"currentColor"}),T.jsx("path",{id:"airport",d:"M28.9769,6.60134c1.711.013,3.111,2.53205,3.111,4.241v10.337s17.106,15.435,17.358,15.666a1.145,1.145,0,0,1,.488,1.152v2.833c0,.651-.451.61-.695.467-.334-.119-17.151-8.863-17.151-8.863-.004,1.458-.797,9.006-1.326,13.304,0,0,4.61,2.457,4.699,2.521.334.268.352.359.352.852v2.001c0,.477-.352.428-.51.324-.183-.062-5.693-1.921-5.693-1.921a2.56018,2.56018,0,0,0-.633-.127,2.31654,2.31654,0,0,0-.666.127s-5.477,1.859-5.672,1.921c-.185.104-.523.153-.523-.324v-2.001c0-.493.029-.584.367-.852.086-.064,4.678-2.521,4.678-2.521-.524-4.298-1.307-11.846-1.325-13.304,0,0-16.822,8.744-17.148,8.863-.217.143-.69.184-.69-.467v-2.833a1.16206,1.16206,0,0,1,.473-1.152c.276-.231,17.365-15.666,17.365-15.666v-10.337c0-1.709,1.403-4.228,3.14105-4.241",transform:"translate(-28.9697,0.14347)",fill:"white"})]})}),defaultAttrs:re,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:s}=e,{t:o}=a(),i=[{type:"select",label:o("panel.details.nodes.facilities.type"),value:n.type,options:{airport:"Airport",airport_2024:"Airport 2024",maglev:"Maglev",disney:"Disney",railway:"Railway",railway_2024:"Railway 2024",hsr:"HSR",airport_hk:"Airport Hongkong",disney_hk:"Disney Hongkong",ngong_ping_360:"Ngong Ping 360",tiananmen:"Tiananmen",airport_bj:"Airport Beijing",bus_terminal_suzhou:"Bus Terminal Suzhou",railway_suzhou:"Railway Suzhou",bus_interchange:"Bus Interchange",airport_sg:"Changi Airport",cruise_centre:"Cruise Centre",sentosa_express:"Sentosa Express",cable_car:"Cable Car",merlion:"Merlion",marina_bay_sands:"Marina Bay Sands",gardens_by_the_bay:"Gardens by the Bay",singapore_flyer:"Singapore Flyer",esplanade:"Esplanade",airport_qingdao:"Airport Qingdao",railway_qingdao:"Railway Qingdao",coach_station_qingdao:"Coach Station Qingdao",cruise_terminal_qingdao:"Cruise Terminal Qingdao",tram_qingdao:"Tram Qingdao",airport_guangzhou:"Airport Guangzhou",railway_guangzhou:"Railway Guangzhou",intercity_guangzhou:"Intercity Guangzhou"},onChange:e=>{n.type=e,s(t,n)}}];return T.jsx(l,{fields:i,minW:"full"})},metadata:{displayName:"panel.details.nodes.facilities.displayName",tags:[]}}),e("i",(()=>navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome"))),{source:'url("./fonts/LTAIdentity-Medium.woff")',descriptors:{display:"swap"}}),me={source:'url("./fonts/Mplus2-Medium.otf")',descriptors:{display:"swap"}},ce={source:'url("./fonts/Roboto-Bold.ttf")',descriptors:{display:"swap"}},he={source:'url("./fonts/MontaguSlab.ttf")',descriptors:{display:"swap"}},fe={source:'url("./fonts/Railway-PlyE.otf")',descriptors:{display:"swap"}},pe=e("F",{[o.MTR]:{className:[".rmp-name__mtr__zh",".rmp-name__mtr__en"],cssFont:{"MyriadPro-Semibold":void 0,"Vegur-Bold":void 0,"GenYoMinTW-SB":void 0},cssName:"fonts_mtr"},[o.MRTBasic]:{className:[".rmp-name__mrt"],cssFont:{IdentityFont:de},cssName:"fonts_mrt"},[o.MRTInt]:{className:[".rmp-name__mrt"],cssFont:{IdentityFont:de},cssName:"fonts_mrt"},[o.JREastBasic]:{className:[".rmp-name__jreast_ja",".rmp-name__jreast_en"],cssFont:{"M PLUS 2":me},cssName:"fonts_jreast"},[o.JREastImportant]:{className:[".rmp-name__jreast_ja",".rmp-name__jreast_en"],cssFont:{"M PLUS 2":me},cssName:"fonts_jreast"},[i.BerlinSBahnLineBadge]:{className:[".rmp-name__berlin"],cssFont:{Roboto:ce},cssName:"fonts_berlin"},[i.BerlinUBahnLineBadge]:{className:[".rmp-name__berlin"],cssFont:{Roboto:ce},cssName:"fonts_berlin"},[i.JREastLineBadge]:{className:[".rmp-name__jreast_ja",".rmp-name__jreast_en"],cssFont:{'"M PLUS 2"':me},cssName:"fonts_jreast"},[i.MRTDestinationNumbers]:{className:[".rmp-name__mrt"],cssFont:{IdentityFont:de},cssName:"fonts_mrt"},[i.MRTLineBadge]:{className:[".rmp-name__mrt"],cssFont:{IdentityFont:de},cssName:"fonts_mrt"},[o.TokyoMetroBasic]:{className:[".rmp-name__tokyo_en",".rmp-name__jreast_ja"],cssFont:{MontaguSlab:he,"M PLUS 2":me},cssName:"fonts_tokyo"},[o.TokyoMetroInt]:{className:[".rmp-name__tokyo_en",".rmp-name__jreast_ja"],cssFont:{MontaguSlab:he,"M PLUS 2":me},cssName:"fonts_tokyo"},[o.LondonTubeBasic]:{className:[".rmp-name__tube"],cssFont:{Railway:fe},cssName:"fonts_tube"},[o.LondonTubeInt]:{className:[".rmp-name__tube"],cssFont:{Railway:fe},cssName:"fonts_tube"}}),ue=[],ge=e("l",(async e=>{const t=pe[e];if(!t)return;const{cssFont:n,cssName:a}=t;if(ue.includes(a))return;ue.push(a),await Promise.all(Object.entries(n).map((([e,t])=>r.loadFont(e,t&&{configs:[t]}))));const s=document.createElement("link");s.rel="stylesheet",s.id=a,s.href=`/rmp/styles/${a}.css`,document.head.append(s)})),xe=e("g",n.forwardRef(((e,t)=>{const{text:n,lineHeight:a,grow:s,dominantBaseline:l=("up"===s?"auto":"down"===s?"hanging":"middle"),baseOffset:o=2,funcDX:i=(e=>0),...r}=e,d="bidirectional"===s?-(n.length-1)*a/2:0;return T.jsx("g",{ref:t,children:("up"===s?[...n].reverse():n).map(((e,t,n)=>T.jsx("text",{dy:(t*a+o)*("up"===s?-1:1)+d,dx:i(t),dominantBaseline:l,...r,children:e},`${e}${t}`)))})})));xe.displayName="MultilineText";const Ce={top:{namesPos:1,lineHeight:10,polarity:-1},middle:{namesPos:0,lineHeight:0,polarity:0},bottom:{namesPos:0,lineHeight:16,polarity:1}},ye={zh:o.ShmetroBasic,en:o.ShmetroBasic,mtr__zh:o.MTR,mtr__en:o.MTR,berlin:i.BerlinSBahnLineBadge,mrt:o.MRTBasic,jreast_ja:o.JREastBasic,jreast_en:o.JREastBasic,tokyo_en:o.TokyoMetroBasic,tube:o.LondonTubeBasic},be=e("h",{content:"Enter your text here",fontSize:16,lineHeight:16,textAnchor:"middle",dominantBaseline:"middle",language:"en",color:[d.Shanghai,"jsr","#000000",m.white],rotate:0,italic:"normal",bold:"normal"}),ve=(e("t",{component:e=>{const{id:t,x:a,y:s,attrs:l,handlePointerDown:o,handlePointerMove:i,handlePointerUp:r}=e,{content:d=be.content,fontSize:m=be.fontSize,lineHeight:c=be.lineHeight,textAnchor:h=be.textAnchor,dominantBaseline:f=be.dominantBaseline,language:p=be.language,color:u=be.color,rotate:g=be.rotate,italic:x=be.italic,bold:C=be.bold}=null!=l?l:be,y=n.useRef(null),[b,v]=n.useState({x:0,y:0,width:32,height:16});n.useEffect((()=>v(y.current.getBBox())),[d,m,c,h,f,p,g,x,C,v,y]),n.useEffect((()=>{const e=ye[p];e&&ge(e)}),[p]);const j=n.useCallback((e=>o(t,e)),[t,o]),w=n.useCallback((e=>i(t,e)),[t,i]),O=n.useCallback((e=>r(t,e)),[t,r]);return T.jsxs("g",{id:t,transform:`translate(${a}, ${s})rotate(${g})`,onPointerDown:j,onPointerMove:w,onPointerUp:O,style:{cursor:"move"},children:[T.jsx("rect",{className:"removeMe",fill:"gray",fillOpacity:"0.1",x:b.x-1.5,y:b.y-1.5,width:b.width+3,height:b.height+3}),T.jsx(xe,{ref:y,text:d.split("\n"),lineHeight:c,grow:"down",className:`rmp-name__${p}`,fontSize:m,textAnchor:h,dominantBaseline:f,fill:u[2],fontStyle:x,fontWeight:C})]})},icon:T.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:T.jsx("text",{x:"12",y:"12",textAnchor:"middle",dominantBaseline:"middle",fontSize:"10",children:"Text"})}),defaultAttrs:be,attrsComponent:e=>{var t,n,s,o,r,d,m;const{id:h,attrs:f,handleAttrsUpdate:p}=e,{t:u}=a(),g=[{type:"textarea",label:u("panel.details.nodes.text.content"),value:null!==(t=f.content)&&void 0!==t?t:be.content,onChange:e=>{f.content=e.toString(),p(h,f)},minW:"full"},{type:"input",label:u("panel.details.nodes.text.fontSize"),value:(null!==(n=f.fontSize)&&void 0!==n?n:be.fontSize).toString(),validator:e=>Number.isInteger(e)&&Number(e)>0,onChange:e=>{f.fontSize=Number(e),p(h,f)},minW:"full"},{type:"input",label:u("panel.details.nodes.text.lineHeight"),value:(null!==(s=f.lineHeight)&&void 0!==s?s:be.lineHeight).toString(),validator:e=>Number.isInteger(e)&&Number(e)>0,onChange:e=>{f.lineHeight=Number(e),p(h,f)},minW:"full"},{type:"select",label:u("panel.details.nodes.text.textAnchor"),value:null!==(o=f.textAnchor)&&void 0!==o?o:be.textAnchor,options:{start:u("panel.details.nodes.text.start"),middle:u("panel.details.nodes.text.middle"),end:u("panel.details.nodes.text.end")},onChange:e=>{f.textAnchor=e,p(h,f)},minW:"full"},{type:"select",label:u("panel.details.nodes.text.dominantBaseline"),value:null!==(r=f.dominantBaseline)&&void 0!==r?r:be.dominantBaseline,options:{auto:u("panel.details.nodes.text.auto"),middle:u("panel.details.nodes.text.middle"),hanging:u("panel.details.nodes.text.hanging")},onChange:e=>{f.dominantBaseline=e,p(h,f)},minW:"full"},{type:"select",label:u("panel.details.nodes.text.language"),value:null!==(d=f.language)&&void 0!==d?d:be.language,options:{zh:u("panel.details.nodes.text.zh"),en:u("panel.details.nodes.text.en"),mtr__zh:u("panel.details.nodes.text.mtr__zh"),mtr__en:u("panel.details.nodes.text.mtr__en"),berlin:u("panel.details.nodes.text.berlin"),mrt:u("panel.details.nodes.text.mrt"),jreast_ja:u("panel.details.nodes.text.jreast_ja"),jreast_en:u("panel.details.nodes.text.jreast_en"),tokyo_en:u("panel.details.nodes.text.tokyo_en"),tube:u("panel.details.nodes.text.tube")},onChange:e=>{f.language=e.toString(),p(h,f)},minW:"full"},{type:"select",label:u("panel.details.nodes.text.rotate"),value:null!==(m=f.rotate)&&void 0!==m?m:be.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:e=>{f.rotate=Number(e),p(h,f)},minW:"full"},{type:"switch",label:u("panel.details.nodes.text.italic"),isChecked:"italic"===f.italic,onChange:e=>{f.italic=e?"italic":"normal",p(h,f)},minW:"full"},{type:"switch",label:u("panel.details.nodes.text.bold"),isChecked:"bold"===f.bold,onChange:e=>{f.bold=e?"bold":"normal",p(h,f)},minW:"full"},{type:"custom",label:u("color"),component:T.jsx(c,{type:i.Text,defaultTheme:be.color})}];return T.jsx(l,{fields:g})},metadata:{displayName:"panel.details.nodes.text.displayName",tags:[]}}),e("c",((e,t)=>e.filterEdges(((e,n,a,s,l,o,i)=>t.has(a)&&t.has(s))))),e("f",(e=>{const t=Object.fromEntries([...Object.values(o),Object.values(i)].map((e=>[e,!1])));return e.forEachNode((n=>{const a=e.getNodeAttribute(n,"type");t[a]=!0})),t}))),je=(e("b",((e,t,n,a,s)=>{const l=t<=a?t:a,o=n<=s?n:s,i=t<=a?a:t,r=n<=s?s:n;return e.filterNodes(((e,t)=>((e,t,n,a,s,l)=>e<=s&&s<=n&&t<=l&&l<=a)(l,o,i,r,t.x,t.y)))})),e("e",((e,t,n)=>{const a=[],s=new Set;return t.forEach((t=>{const n=e.getNodeAttributes(t).type,l=e.getNodeAttribute(t,n);if(void 0!==l.color){const e=l.color;s.has(e.toString())||(a.push(e),s.add(e.toString()))}})),n.filter((t=>h.includes(e.getEdgeAttribute(t,"style")))).forEach((t=>{const n=e.getEdgeAttributes(t),l=n[n.style].color;s.has(l.toString())||(a.push(l),s.add(l.toString()))})),a})),e=>{const t=[],n=new Set;return e.filterNodes((t=>e.getNodeAttribute(t,"type")===i.Master)).forEach((a=>{const s=e.getNodeAttributes(a)[i.Master];n.has(s.randomId)||(n.add(s.randomId),t.push(s))})),t}),we=e("d",((e,t,n)=>{const a=new Blob([n],{type:t});Oe(e,a)})),Oe=e("a",((e,t)=>{const n=window.URL.createObjectURL(t),a=document.createElement("a");a.href=n,a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),window.URL.revokeObjectURL(n)})),_e=(e("m",(async(e,t,n,a)=>{const{xMin:s,yMin:l,xMax:o,yMax:i}=f(e),[r,d]=[o-s,i-l],m=document.getElementById("canvas").cloneNode(!0);t||m.appendChild(await Se(o-400,i-120)),m.setAttribute("viewBox",`${s} ${l} ${r} ${d}`),m.setAttribute("width",r.toString()),m.setAttribute("height",d.toString()),Object.entries({".rmp-name-outline":["paint-order","stroke","stroke-linejoin"]}).forEach((([e,t])=>{const n=document.querySelector(e);if(null===n)return;const s=window.getComputedStyle(n);m.querySelectorAll(e).forEach((n=>{if(".rmp-name-outline"===e&&1.1===a){const t=n.insertAdjacentElement("afterend",n.cloneNode(!0));t&&(t.classList.remove(e.slice(1)),0===t.classList.length&&n.removeAttribute("class"),t.removeAttribute("stroke-width"))}t.forEach((e=>{n.setAttribute(e,s.getPropertyValue(e))})),n.classList.remove(e.slice(1)),0===n.classList.length&&n.removeAttribute("class")}))})),m.querySelectorAll('[fill="url(#opaque)"]').forEach((e=>{e.setAttribute("fill","white"),e.setAttribute("fill-opacity","0")})),m.querySelectorAll(".removeMe").forEach((e=>{e.remove()}));const c=ve(e);return await _e(m,e,c,n),await ke(m,e,c),{elem:m,width:r,height:d}})),async(e,t,n,a)=>{const s=new Set;if(Object.keys(pe).filter((e=>n[e])).forEach((e=>s.add(e))),t.filterNodes(((e,t)=>e.startsWith("misc_node_")&&t.type===i.Text)).map((e=>t.getNodeAttribute(e,i.Text).language)).map((e=>ye[e])).filter((e=>e!==o.ShmetroBasic)).forEach((e=>s.add(e))),a)[".rmp-name__zh",".rmp-name__en"].forEach((t=>{e.querySelectorAll(t).forEach((e=>{e.classList.remove(t.slice(1)),0===e.classList.length&&e.removeAttribute("class")}))})),s.forEach((t=>{pe[t].className.forEach((t=>{e.querySelectorAll(t).forEach((e=>{e.classList.remove(t.slice(1)),0===e.classList.length&&e.removeAttribute("class")}))}))}));else{const t=document.createElement("style");for(let e=0;ee.cssText)).join("\n");break}}e.prepend(t),await Promise.all([...s.values()].map((e=>pe[e])).map((async({cssName:t,cssFont:n})=>{try{e.prepend(await(async(e,t)=>{const n=document.createElement("style");for(let l=document.styleSheets.length-1;l>=0;l-=1){var a;if(null!==(a=document.styleSheets[l].href)&&void 0!==a&&a.endsWith(`styles/${t}.css`)){n.textContent=[...document.styleSheets[l].cssRules].map((e=>e.cssText)).filter((e=>!e.startsWith("@font-face"))).join("\n");break}}n.textContent+="\n";const s=(await Promise.allSettled(Object.keys(e).map(r.getFontCSS))).filter((e=>"fulfilled"===e.status)).map((e=>e.value));return n.textContent+=s.join("\n"),n})(n,t))}catch(a){alert("Failed to load fonts. Fonts in the exported PNG will be missing."),console.error(a)}})))}}),ke=async(e,n,a)=>{if(a[i.Facilities]){const a=n.filterNodes(((e,t)=>t.type===i.Facilities)),s=Object.fromEntries(Object.values(t).map((e=>[e,[]])));a.forEach((e=>{var t;const a=null===(t=n.getNodeAttribute(e,i.Facilities))||void 0===t?void 0:t.type;a&&s[a].push(e)}));const l=Object.entries(s).filter((([e,t])=>t.length>0)).map((([e,t])=>e)),o=await Promise.all((await Promise.all(l.map((async e=>await fetch(`/rmp//images/facilities/${e}.svg`))))).map((e=>e.text())));l.forEach(((t,n)=>{const a=document.createElement("div");a.innerHTML=o[n];const l=a.querySelector("svg"),i=document.createElementNS("http://www.w3.org/2000/svg","symbol");for(const e of l.attributes)i.setAttribute(e.name,e.value);for(;l.firstChild;)i.appendChild(l.firstChild);l.replaceWith(i),i.id=t,e.appendChild(i),s[t].forEach((n=>{const a=e.querySelector(`#${n}`),s=null==a?void 0:a.querySelector("image");if(s){a.removeChild(s);const e=document.createElementNS("http://www.w3.org/2000/svg","use");e.setAttribute("href",`#${t}`),e.setAttribute("height",i.getAttribute("height")),e.setAttribute("width",i.getAttribute("width")),a.appendChild(e)}})),a.remove()}))}},Se=async(e,t)=>{const n=document.createElementNS("http://www.w3.org/2000/svg","g");n.setAttribute("transform",`translate(${e}, ${t})scale(2)`);const a=await fetch("/rmp//logo.svg"),s=await a.text(),l=document.createElement("div");l.innerHTML=s;const o=l.querySelector("svg"),i=document.createElement("g");i.setAttribute("transform","translate(-60, -25)scale(0.1)"),i.setAttribute("font-family","Arial, sans-serif"),i.innerHTML=o.innerHTML,n.appendChild(i);const r=document.createElementNS("http://www.w3.org/2000/svg","text");r.setAttribute("font-family","Arial, sans-serif"),r.setAttribute("font-size","16");const d=p.t("Rail Map Painter");r.appendChild(document.createTextNode(d));const m=document.createElementNS("http://www.w3.org/2000/svg","text");m.setAttribute("font-family","Arial, sans-serif"),m.setAttribute("font-size","10"),m.setAttribute("y","10");const c=window.location.origin;let h="https://railmapgen.org/";return c.includes("github")?h="https://railmapgen.github.io/":c.includes("gitlab")&&(h="https://railmapgen.gitlab.io/"),h+="?app=rmp",m.appendChild(document.createTextNode(h)),n.appendChild(i),n.appendChild(r),n.appendChild(m),n};e("u",(()=>{const[e,t]=s.useState({width:void 0,height:void 0});return s.useEffect((()=>{function e(){t({width:window.innerWidth,height:window.innerHeight})}return window.addEventListener("resize",e),e(),()=>window.removeEventListener("resize",e)}),[]),e}));const Ne={top:{lineHeight:6.67,offset:10},middle:{lineHeight:0,offset:0},bottom:{lineHeight:12.67,offset:5.83}},ze={...x,nameOffsetX:"right",nameOffsetY:"top"},Me={component:e=>{var t;const{id:a,x:s,y:l,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,nameOffsetX:h=ze.nameOffsetX,nameOffsetY:f=ze.nameOffsetY}=null!==(t=i[o.ShmetroBasic])&&void 0!==t?t:ze,p=n.useCallback((e=>r(a,e)),[a,r]),u=n.useCallback((e=>d(a,e)),[a,d]),g=n.useCallback((e=>m(a,e)),[a,m]),C="left"===h?-13.33:"right"===h?13.33:0,y=(c[Ce[f].namesPos].split("\n").length*Ne[f].lineHeight+Ne[f].offset)*Ce[f].polarity,b="left"===h?"end":"right"===h?"start":"middle";return n.useMemo((()=>T.jsxs("g",{id:a,transform:`translate(${s}, ${l})`,children:[T.jsx("circle",{id:`stn_core_${a}`,r:5,stroke:"#393332",strokeWidth:"1",fill:"white",onPointerDown:p,onPointerMove:u,onPointerUp:g,style:{cursor:"move"}}),T.jsxs("g",{transform:`translate(${C}, ${y})`,textAnchor:b,className:"rmp-name-outline",strokeWidth:"1",children:[T.jsx(xe,{text:c[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),T.jsx(xe,{text:c[1].split("\n"),dx:"right"===h?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]})),[a,s,l,...c,h,f,p,u,g])},icon:T.jsx("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:T.jsx("circle",{cx:"12",cy:"12",r:"5",stroke:"currentColor",fill:"none"})}),defaultAttrs:ze,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:s}=e,{t:o}=a(),i=[{type:"textarea",label:o("panel.details.stations.common.nameZh"),value:n.names[0],onChange:e=>{n.names[0]=e,s(t,n)},minW:"full"},{type:"textarea",label:o("panel.details.stations.common.nameEn"),value:n.names[1],onChange:e=>{n.names[1]=e,s(t,n)},minW:"full"},{type:"select",label:o("panel.details.stations.common.nameOffsetX"),value:n.nameOffsetX,options:{left:o("panel.details.stations.common.left"),middle:o("panel.details.stations.common.middle"),right:o("panel.details.stations.common.right")},disabledOptions:"middle"===n.nameOffsetY?["middle"]:[],onChange:e=>{n.nameOffsetX=e,s(t,n)},minW:"full"},{type:"select",label:o("panel.details.stations.common.nameOffsetY"),value:n.nameOffsetY,options:{top:o("panel.details.stations.common.top"),middle:o("panel.details.stations.common.middle"),bottom:o("panel.details.stations.common.bottom")},disabledOptions:"middle"===n.nameOffsetX?["middle"]:[],onChange:e=>{n.nameOffsetY=e,s(t,n)},minW:"full"}];return T.jsx(l,{fields:i})},metadata:{displayName:"panel.details.stations.shmetroBasic.displayName",cities:[d.Shanghai],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},Ae={0:{textDx:0,textDy:-17.5,textAnchor:"middle",namesPos:1,lineHeight:6.67,polarity:-1},45:{textDx:1,textDy:-16.25,textAnchor:"start",namesPos:1,lineHeight:6.67,polarity:-1},90:{textDx:12,textDy:0,textAnchor:"start",namesPos:0,lineHeight:0,polarity:0},135:{textDx:5,textDy:21,textAnchor:"start",namesPos:0,lineHeight:12.67,polarity:1},180:{textDx:0,textDy:22.5,textAnchor:"middle",namesPos:0,lineHeight:12.67,polarity:1},225:{textDx:-5,textDy:21,textAnchor:"end",namesPos:0,lineHeight:12.67,polarity:1},270:{textDx:-12,textDy:0,textAnchor:"end",namesPos:0,lineHeight:0,polarity:0},315:{textDx:-1,textDy:-16.25,textAnchor:"end",namesPos:1,lineHeight:6.67,polarity:-1}},Pe={...x,rotate:0,color:[d.Shanghai,"sh1","#E4002B",m.white]},Be={component:e=>{var t;const{id:a,x:s,y:l,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,color:h=Pe.color,rotate:f=Pe.rotate}=null!==(t=i[o.ShmetroBasic2020])&&void 0!==t?t:Pe,p=Ae[f].textDy+(c[Ae[f].namesPos].split("\n").length-1)*Ae[f].lineHeight*Ae[f].polarity,u=n.useCallback((e=>r(a,e)),[a,r]),g=n.useCallback((e=>d(a,e)),[a,d]),C=n.useCallback((e=>m(a,e)),[a,m]);return n.useMemo((()=>T.jsxs("g",{id:a,children:[T.jsx("g",{transform:`translate(${s}, ${l})rotate(${f})`,children:T.jsx("rect",{id:`stn_core_${a}`,x:"-2",y:"-7.83",width:"4",height:"7.83",stroke:"none",fill:h[2],onPointerDown:u,onPointerMove:g,onPointerUp:C,style:{cursor:"move"}})}),T.jsxs("g",{transform:`translate(${s+Ae[f].textDx}, ${l+p})`,textAnchor:Ae[f].textAnchor,className:"rmp-name-outline",strokeWidth:"1",children:[T.jsx(xe,{text:c[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),T.jsx(xe,{text:c[1].split("\n"),dx:f>=45&&f<=135?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]})),[a,s,l,...c,f,h,u,g,C])},icon:T.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:T.jsx("rect",{x:"6",y:"9",width:"12",height:"6",stroke:"currentColor",fill:"currentColor"})}),defaultAttrs:Pe,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:s}=e,{t:i}=a(),r=[{type:"textarea",label:i("panel.details.stations.common.nameZh"),value:n.names[0],onChange:e=>{n.names[0]=e,s(t,n)},minW:"full"},{type:"textarea",label:i("panel.details.stations.common.nameEn"),value:n.names[1],onChange:e=>{n.names[1]=e,s(t,n)},minW:"full"},{type:"select",label:i("panel.details.stations.common.rotate"),value:n.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:e=>{n.rotate=Number(e),s(t,n)},minW:"full"},{type:"custom",label:i("color"),component:T.jsx(c,{type:o.ShmetroBasic2020,defaultTheme:Pe.color})}];return T.jsx(l,{fields:r})},metadata:{displayName:"panel.details.stations.shmetroBasic2020.displayName",cities:[d.Shanghai],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},$e={top:{lineHeight:6.67,offset:5},middle:{lineHeight:0,offset:0},bottom:{lineHeight:12.67,offset:.83}},We={...x,nameOffsetX:"right",nameOffsetY:"top",rotate:0,height:10,width:13},Ee={component:e=>{var t;const{id:a,x:s,y:l,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,nameOffsetX:h=We.nameOffsetX,nameOffsetY:f=We.nameOffsetY,rotate:p=We.rotate,width:u=We.width,height:g=We.height}=null!==(t=i[o.ShmetroInt])&&void 0!==t?t:We,C=n.useCallback((e=>r(a,e)),[a,r]),y=n.useCallback((e=>d(a,e)),[a,d]),b=n.useCallback((e=>m(a,e)),[a,m]),v=0===p||180===p?u:90===p||270===p?g:u*Math.SQRT1_2,j=0===p||180===p?g:90===p||270===p?u:u*Math.SQRT1_2,w="left"===h?-6.83:"right"===h?6.83:0,O=(Math.abs(w)+v/2)*Math.sign(w),_=(c[Ce[f].namesPos].split("\n").length*$e[f].lineHeight+$e[f].offset)*Ce[f].polarity,k=(Math.abs(_)+j/2)*Math.sign(_),S="left"===h?"end":"right"===h?"start":"middle";return n.useMemo((()=>T.jsxs("g",{id:a,children:[T.jsx("g",{transform:`translate(${s}, ${l})rotate(${p})`,children:T.jsx("rect",{id:`stn_core_${a}`,x:-u/2,y:-g/2,height:g,width:u,ry:g/2,stroke:"#393332",strokeWidth:"1",fill:"white",onPointerDown:C,onPointerMove:y,onPointerUp:b,style:{cursor:"move"}})}),T.jsxs("g",{transform:`translate(${s+O}, ${l+k})`,textAnchor:S,className:"rmp-name-outline",strokeWidth:"1",children:[T.jsx(xe,{text:c[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),T.jsx(xe,{text:c[1].split("\n"),dx:"right"===h?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]})),[a,s,l,...c,h,f,p,u,g,C,y,b])},icon:T.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:T.jsx("rect",{x:"4.5",y:"7",height:"10",width:"15",ry:"5",stroke:"currentColor",fill:"none"})}),defaultAttrs:We,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:s}=e,{t:o}=a(),i=[{type:"textarea",label:o("panel.details.stations.common.nameZh"),value:n.names[0],onChange:e=>{n.names[0]=e,s(t,n)},minW:"full"},{type:"textarea",label:o("panel.details.stations.common.nameEn"),value:n.names[1],onChange:e=>{n.names[1]=e,s(t,n)},minW:"full"},{type:"select",label:o("panel.details.stations.common.nameOffsetX"),value:n.nameOffsetX,options:{left:o("panel.details.stations.common.left"),middle:o("panel.details.stations.common.middle"),right:o("panel.details.stations.common.right")},disabledOptions:"middle"===n.nameOffsetY?["middle"]:[],onChange:e=>{n.nameOffsetX=e,s(t,n)},minW:"full"},{type:"select",label:o("panel.details.stations.common.nameOffsetY"),value:n.nameOffsetY,options:{top:o("panel.details.stations.common.top"),middle:o("panel.details.stations.common.middle"),bottom:o("panel.details.stations.common.bottom")},disabledOptions:"middle"===n.nameOffsetX?["middle"]:[],onChange:e=>{n.nameOffsetY=e,s(t,n)},minW:"full"},{type:"input",label:o("panel.details.stations.shmetroInt.height"),value:n.height.toString(),validator:e=>Number.isInteger(e),onChange:e=>{n.height=Number(e),s(t,n)},minW:"full"},{type:"input",label:o("panel.details.stations.shmetroInt.width"),value:n.width.toString(),validator:e=>Number.isInteger(e),onChange:e=>{n.width=Number(e),s(t,n)},minW:"full"},{type:"select",label:o("panel.details.stations.common.rotate"),value:n.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:e=>{n.rotate=Number(e),s(t,n)},minW:"full"}];return T.jsx(l,{fields:i})},metadata:{displayName:"panel.details.stations.shmetroInt.displayName",cities:[d.Shanghai],canvas:[u.RailMap],categories:[g.Metro],tags:["interchange"]}},Xe={...x,nameOffsetX:"right",nameOffsetY:"top"},Ye={component:e=>{var t;const{id:a,x:s,y:l,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,nameOffsetX:h=Xe.nameOffsetX,nameOffsetY:f=Xe.nameOffsetY}=null!==(t=i[o.ShmetroOutOfSystemInt])&&void 0!==t?t:Xe,p=n.useCallback((e=>r(a,e)),[a,r]),u=n.useCallback((e=>d(a,e)),[a,d]),g=n.useCallback((e=>m(a,e)),[a,m]),C="left"===h?-13.33:"right"===h?13.33:0,y=(c[Ce[f].namesPos].split("\n").length*Ne[f].lineHeight+Ne[f].offset)*Ce[f].polarity,b="left"===h?"end":"right"===h?"start":"middle";return n.useMemo((()=>T.jsxs("g",{id:a,transform:`translate(${s}, ${l})`,children:[T.jsx("circle",{r:5,stroke:"#393332",strokeWidth:"1.33",fill:"white"}),T.jsx("circle",{r:2.3,stroke:"#393332",strokeWidth:"1.33",fill:"white"}),T.jsx("circle",{id:`stn_core_${a}`,r:5.665,fill:"white",fillOpacity:"0",onPointerDown:p,onPointerMove:u,onPointerUp:g,style:{cursor:"move"}}),T.jsxs("g",{transform:`translate(${C}, ${y})`,textAnchor:b,className:"rmp-name-outline",strokeWidth:"1",children:[T.jsx(xe,{text:c[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),T.jsx(xe,{text:c[1].split("\n"),dx:"right"===h?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]})),[a,s,l,...c,h,f,p,u,g])},icon:T.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[T.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2.67",fill:"white"}),T.jsx("circle",{cx:"12",cy:"12",r:"4.6",stroke:"currentColor",strokeWidth:"2.67",fill:"white"})]}),defaultAttrs:Xe,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:s}=e,{t:o}=a(),i=[{type:"textarea",label:o("panel.details.stations.common.nameZh"),value:n.names[0],onChange:e=>{n.names[0]=e,s(t,n)},minW:"full"},{type:"textarea",label:o("panel.details.stations.common.nameEn"),value:n.names[1],onChange:e=>{n.names[1]=e,s(t,n)},minW:"full"},{type:"select",label:o("panel.details.stations.common.nameOffsetX"),value:n.nameOffsetX,options:{left:o("panel.details.stations.common.left"),middle:o("panel.details.stations.common.middle"),right:o("panel.details.stations.common.right")},disabledOptions:"middle"===n.nameOffsetY?["middle"]:[],onChange:e=>{n.nameOffsetX=e,s(t,n)},minW:"full"},{type:"select",label:o("panel.details.stations.common.nameOffsetY"),value:n.nameOffsetY,options:{top:o("panel.details.stations.common.top"),middle:o("panel.details.stations.common.middle"),bottom:o("panel.details.stations.common.bottom")},disabledOptions:"middle"===n.nameOffsetX?["middle"]:[],onChange:e=>{n.nameOffsetY=e,s(t,n)},minW:"full"}];return T.jsx(l,{fields:i})},metadata:{displayName:"panel.details.stations.shmetroOsysi.displayName",cities:[d.Shanghai],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},Re={...x,rotate:0},Te={component:e=>{var t;const{id:a,x:s,y:l,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,rotate:h=Re.rotate}=null!==(t=i[o.ShanghaiSuburbanRailway])&&void 0!==t?t:Re,f=Ae[h].textDy+(c[Ae[h].namesPos].split("\n").length-1)*Ae[h].lineHeight*Ae[h].polarity,p=n.useCallback((e=>r(a,e)),[a,r]),u=n.useCallback((e=>d(a,e)),[a,d]),g=n.useCallback((e=>m(a,e)),[a,m]);return n.useMemo((()=>T.jsxs("g",{id:a,children:[T.jsxs("g",{transform:`translate(${s}, ${l})rotate(${h})`,children:[T.jsx("rect",{x:"-2",y:"-7.83",width:"4",height:"7.83",stroke:"none",fill:"#898989"}),T.jsx("rect",{x:"-3.5",y:"-1",width:"7",height:"2",stroke:"none",fill:"white"}),T.jsx("rect",{x:-.8325,y:-6.33,width:1.6,height:6.33,stroke:"none",fill:"white"}),T.jsx("rect",{id:`stn_core_${a}`,x:"-2",y:"-7.83",width:"4",height:9.08,stroke:"none",fill:"white",fillOpacity:"0",onPointerDown:p,onPointerMove:u,onPointerUp:g,style:{cursor:"move"}})]}),T.jsxs("g",{transform:`translate(${s+Ae[h].textDx}, ${l+f})`,textAnchor:Ae[h].textAnchor,className:"rmp-name-outline",strokeWidth:"2.5",children:[T.jsx(xe,{text:c[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),T.jsx(xe,{text:c[1].split("\n"),dx:h>=45&&h<=135?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]})),[a,s,l,...c,h,p,u,g])},icon:T.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:T.jsx("rect",{x:"6",y:"9",width:"12",height:"6",stroke:"currentColor",fill:"currentColor"})}),defaultAttrs:Re,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:s}=e,{t:o}=a(),i=[{type:"textarea",label:o("panel.details.stations.common.nameZh"),value:n.names[0],onChange:e=>{n.names[0]=e,s(t,n)},minW:"full"},{type:"textarea",label:o("panel.details.stations.common.nameEn"),value:n.names[1],onChange:e=>{n.names[1]=e,s(t,n)},minW:"full"},{type:"select",label:o("panel.details.stations.common.rotate"),value:n.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:e=>{n.rotate=Number(e),s(t,n)},minW:"full"}];return T.jsx(l,{fields:i})},metadata:{displayName:"panel.details.stations.shanghaiSuburbanRailway.displayName",cities:[d.Shanghai],canvas:[u.RailMap],categories:[g.Metro],tags:[]}};var Le=1.3,De=45,Ie=De-3,He=function(e,t){var n=[e,t].map((function(e){return e.match(/^(\w+).+$/)}));if(n[0]&&n[1]&&n[0][1]===n[1][1])return n[0][1]},Ue=function(e){var t=e.match(/^(\d+)\D+$/);return null==t?void 0:t[1]},Fe=function(){return Fe=Object.assign||function(e){for(var t,n=1,a=arguments.length;n0)&&!(a=l.next()).done;)o.push(a.value)}catch(i){s={error:i}}finally{try{a&&!a.done&&(n=l.return)&&n.call(l)}finally{if(s)throw s.error}}return o};function Qe(e){var t=e.zhName,n=e.enName,a=e.foregroundColour,l=e.backgroundColour,o=e.zhClassName,i=e.enClassName,r=e.passed,d=function(e,t){var n=Ue(e);if(n)return{isDigit:!0,spanningPart:n};var a=He(e,t);return a?{isDigit:!1,spanningPart:a}:{isDigit:!1,spanningPart:""}}(t,n),c=d.isDigit,h=d.spanningPart,f=s.useRef(null),p=Ze(s.useState({x:0,height:0,width:0}),2),u=p[0],g=p[1];s.useEffect((function(){f.current&&g(f.current.getBBox())}),[t,n]);var x=Ie/Math.max(Ie,u.width),C=(-u.x-u.width/2)*x,y=u.height*(1-x)/2;return T.jsxs("g",{textAnchor:"middle",fill:r?m.white:a,children:[T.jsx(Ge,{fill:r?"#aaa":l}),T.jsx("g",{ref:f,transform:"translate(".concat(C,",").concat(y,")scale(").concat(x,")"),children:T.jsxs("text",{className:o,fontSize:21,x:-1,y:12,textAnchor:"end",dominantBaseline:"central",children:[h,T.jsx("tspan",{className:o,fontSize:10,x:0,dy:-4,textAnchor:"start",dominantBaseline:"central",children:t.slice(h.length).trim()}),T.jsx("tspan",{className:i,fontSize:6.5,letterSpacing:-.1,x:0,dy:10,textAnchor:"start",dominantBaseline:"middle",children:c?n:n.slice(h.length).trim()})]})})]})}var qe=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var a,s,l=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(a=l.next()).done;)o.push(a.value)}catch(i){s={error:i}}finally{try{a&&!a.done&&(n=l.return)&&n.call(l)}finally{if(s)throw s.error}}return o};function Je(e){var t,n=e.zhName,a=e.enName,l=e.foregroundColour,o=e.backgroundColour,i=e.zhClassName,r=e.enClassName,d=e.passed,c=null!==(t=Ue(n))&&void 0!==t?t:"",h=s.useRef(null),f=s.useRef(null),p=qe(s.useState({width:0}),2),u=p[0],g=p[1],x=qe(s.useState({width:0}),2),C=x[0],y=x[1];s.useEffect((function(){h.current&&g(h.current.getBBox()),f.current&&y(f.current.getBBox())}),[n,a]);var b=Ie/Math.max(Ie,u.width),v=Ie/Math.max(Ie,C.width),j={nameZh:{y:7.3+13.5*(1-b)*b/2},nameEn:{y:19.5-9*(1-v)*v/2}};return T.jsxs("g",{textAnchor:"middle",fill:d?m.white:l,children:[T.jsx(Ge,{fill:d?"#aaa":o}),T.jsxs("text",{ref:h,className:i,fontSize:12,transform:"translate(0,".concat(j.nameZh.y,")scale(").concat(b,")"),dominantBaseline:"central",children:[T.jsx("tspan",{fontSize:16,dy:.7,dominantBaseline:"central",children:c}),T.jsx("tspan",{dy:-.7,dominantBaseline:"central",children:n.slice(c.length)})]}),T.jsx("text",{ref:f,className:r,fontSize:8,transform:"translate(0,".concat(j.nameEn.y,")scale(").concat(v,")"),dominantBaseline:"middle",children:a})]})}var Ke=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var a,s,l=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(a=l.next()).done;)o.push(a.value)}catch(i){s={error:i}}finally{try{a&&!a.done&&(n=l.return)&&n.call(l)}finally{if(s)throw s.error}}return o};function et(e){var t=e.zhName,n=e.enName,a=e.foregroundColour,l=e.backgroundColour,o=e.zhClassName,i=e.enClassName,r=e.passed,d=s.useRef(null),c=Ke(s.useState({width:0}),2),h=c[0],f=c[1];s.useEffect((function(){d.current&&f(d.current.getBBox())}),[t,n]);var p=Math.max(45,h.width+4);return T.jsxs("g",{textAnchor:"middle",fill:r?m.white:a,children:[T.jsx(Ge,{customWidth:p,fill:r?"#aaa":l}),T.jsxs("g",{ref:d,children:[T.jsx("text",{className:o,fontSize:8.5,y:8,dominantBaseline:"central",children:t}),T.jsx("text",{className:i,fontSize:5.5,y:18,dominantBaseline:"middle",children:n})]})]})}var tt=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var a,s,l=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(a=l.next()).done;)o.push(a.value)}catch(i){s={error:i}}finally{try{a&&!a.done&&(n=l.return)&&n.call(l)}finally{if(s)throw s.error}}return o};function nt(e){var t=e.zhName,n=e.enName,a=e.foregroundColour,l=e.backgroundColour,o=e.zhClassName,i=e.enClassName,r=e.passed,d=s.useRef(null),c=s.useRef(null),h=tt(s.useState({width:0}),2),f=h[0],p=h[1],u=tt(s.useState({width:0}),2),g=u[0],x=u[1];s.useEffect((function(){d.current&&p(d.current.getBBox()),c.current&&x(c.current.getBBox())}),[t,n]);var C=Ie/Math.max(Ie,f.width),y=Ie/Math.max(Ie,g.width),b={nameZh:{y:7.3+13.5*(1-C)*C/2},nameEn:{y:19.5-9*(1-y)*y/2}};return T.jsxs("g",{textAnchor:"middle",fill:r?m.white:a,children:[T.jsx(Ge,{fill:r?"#aaa":l}),T.jsx("text",{ref:d,className:o,fontSize:12,transform:"translate(0,".concat(b.nameZh.y,")scale(").concat(C,")"),dominantBaseline:"central",children:t}),T.jsx("text",{ref:c,className:i,fontSize:8,transform:"translate(0,".concat(b.nameEn.y,")scale(").concat(y,")"),dominantBaseline:"middle",children:n})]})}var at=function(){return at=Object.assign||function(e){for(var t,n=1,a=arguments.length;n=5?T.jsx(et,at({},e)):T.jsx(nt,at({},e))}})));var st=function(e,t){return void 0!==Ue(e)?1:void 0!==He(e,t)?2:3},lt=function(){return lt=Object.assign||function(e){for(var t,n=1,a=arguments.length;n0)&&!(a=l.next()).done;)o.push(a.value)}catch(i){s={error:i}}finally{try{a&&!a.done&&(n=l.return)&&n.call(l)}finally{if(s)throw s.error}}return o},ut=15;function gt(e){var t=e.Icon,n=e.lineNum,a=e.stnNum,l=e.strokeColour,o=e.passed,i=e.size,r=e.textClassName,d=ft(e,["Icon","lineNum","stnNum","strokeColour","passed","size","textClassName"]),m=s.useRef(null),c=s.useRef(null),h=pt(s.useState({width:0}),2),f=h[0],p=h[1],u=pt(s.useState({width:0}),2),g=u[0],x=u[1];s.useEffect((function(){m.current&&p(m.current.getBBox()),c.current&&x(c.current.getBBox())}),[n,a]);var C=ut/Math.max(ut,f.width),y=2===(null==n?void 0:n.length)&&2===(null==a?void 0:a.length)?C:ut/Math.max(ut,g.width),b="sm"===i?"0.7":"lg"===i?"1.4":1;return T.jsx("g",ht({},d,{children:T.jsxs("g",{transform:"scale(".concat(b,")"),children:[T.jsx(t,{stroke:o?"#aaa":l,filled:!n&&!a}),(n||a)&&T.jsxs("g",{textAnchor:"middle",fontSize:13.5,fill:o?"#aaa":"#000",children:[T.jsx("g",{transform:"translate(-9.25,0)scale(".concat(C,")"),children:T.jsx("text",{ref:m,className:r,dominantBaseline:"central",x:.5,children:n})}),T.jsx("g",{transform:"translate(9.25,0)scale(".concat(y,")"),children:T.jsx("text",{ref:c,className:r,dominantBaseline:"central",children:a})})]})]})}))}var xt=function(){return xt=Object.assign||function(e){for(var t,n=1,a=arguments.length;n0)&&!(a=l.next()).done;)o.push(a.value)}catch(i){s={error:i}}finally{try{a&&!a.done&&(n=l.return)&&n.call(l)}finally{if(s)throw s.error}}return o},Ot=function(e,t,n){if(n||2===arguments.length)for(var a,s=0,l=t.length;s=i.length)return console.warn(", anchor index ".concat(l," is out of bound")),[0,0];var e=wt(i[l],2);return[-e[0],-e[1]]}),[i,l]),2),d=r[0],m=r[1];return T.jsxs("g",vt({transform:"translate(".concat(d,",").concat(m,")")},o,{children:[t.map((function(e,t){var n=e.style,a=_t(n);return T.jsx(a,{stroke:"#aaa",filled:!0,strokeWidth:9.1,transform:"translate(".concat(i[t][0],",").concat(i[t][1],")")},t)})),t.map((function(e,t){var n=e.style,a=_t(n);return T.jsx(a,{stroke:"white",filled:!0,strokeWidth:3.3800000000000003,transform:"translate(".concat(i[t][0],",").concat(i[t][1],")")},t)})),t.length&&T.jsx("rect",{fill:"white",x:-12,y:i[0][1],width:24,height:2*-i[0][1]}),t.map((function(e,t){var a=e.style,s=jt(e,["style"]),l="fmetro"===a?Ct:bt;return T.jsx(l,vt({transform:"translate(".concat(i[t][0],",").concat(i[t][1],")"),textClassName:n},s),t)}))]}))}const St={...x,nameOffsetX:"right",nameOffsetY:"top",color:[d.Guangzhou,"gz1","#F3D03E",m.black],lineCode:"1",stationCode:"01",open:!0,secondaryNames:["",""],tram:!1},Nt={component:e=>{var t,a;const{id:s,x:l,y:i,attrs:r,handlePointerDown:d,handlePointerMove:m,handlePointerUp:c}=e,{names:h=x.names,nameOffsetX:f=St.nameOffsetX,nameOffsetY:p=St.nameOffsetY,color:u=St.color,lineCode:g=St.lineCode,stationCode:C=St.stationCode,open:y=St.open,secondaryNames:b=St.secondaryNames,tram:v=St.tram}=null!==(t=r[o.GzmtrBasic])&&void 0!==t?t:St,j=n.useCallback((e=>d(s,e)),[s,d]),w=n.useCallback((e=>m(s,e)),[s,m]),O=n.useCallback((e=>c(s,e)),[s,c]),_=n.useRef(null);null===(a=_.current)||void 0===a||null===(a=a.querySelector("path"))||void 0===a||a.setAttribute("id",`stn_core_${s}`);const k={en:v?5.08:6.56,zh:v?7.29:13.13},S={top:{namesPos:1,lineHeight:k.en,polarity:-1},middle:{namesPos:0,lineHeight:0,polarity:0},bottom:{namesPos:0,lineHeight:k.zh,polarity:1}},N=v?11:15,z="left"===f?-N:"right"===f?N:0,M=v?8:10,A=(h[S[p].namesPos].split("\n").length*S[p].lineHeight+M)*S[p].polarity,P="left"===f?"end":"right"===f?"start":y||"middle"!==f||""!==b.join("")?"middle":"end",B=n.useRef(null),[$,W]=n.useState(0);n.useEffect((()=>{var e,t;return W(null!==(e=null===(t=B.current)||void 0===t?void 0:t.getBBox().width)&&void 0!==e?e:0)}),[...b,v]);const E=n.useRef(null),[X,Y]=n.useState(0);n.useEffect((()=>{var e,t;return Y(null!==(e=null===(t=E.current)||void 0===t?void 0:t.getBBox().width)&&void 0!==e?e:0)}),[...h,v]);const R="middle"===f?X/2+($+24)/2:(X+($+24)/2)*("left"===f?-1:1),L="middle"===f&&""!==b.join("")?X/2+($+24):(X+$+(0!==$?24:0))*("left"===f?-1:"right"===f?1:0);return T.jsxs("g",{id:s,transform:`translate(${l}, ${i})`,children:[T.jsx("g",{transform:`scale(${.57915*(v?.729:1)})`,onPointerDown:j,onPointerMove:w,onPointerUp:O,style:{cursor:"move"},ref:_,children:T.jsx(bt,{id:`stn_core_${s}`,strokeColour:u[2],lineNum:""===g?void 0:g,stnNum:""===C?void 0:C,textClassName:"rmp-name__zh"})}),T.jsxs("g",{ref:E,transform:`translate(${z}, ${A})`,textAnchor:P,children:[T.jsx(xe,{text:h[0].split("\n"),fontSize:k.zh,lineHeight:k.zh,grow:"up",className:"rmp-name__zh"}),T.jsx(xe,{text:h[1].split("\n"),fontSize:k.en,lineHeight:k.en,grow:"down",className:"rmp-name__en"})]}),""!==b.join("")&&T.jsxs("g",{transform:`translate(${z+R}, ${A})`,textAnchor:"middle",children:[T.jsx("text",{fontSize:"13.13",dx:-($+5)/2,textAnchor:"end",dominantBaseline:"middle",className:"rmp-name__zh",children:"("}),T.jsx("text",{fontSize:"13.13",dx:($+5)/2,textAnchor:"start",dominantBaseline:"middle",className:"rmp-name__zh",children:")"}),T.jsxs("g",{ref:B,children:[T.jsx("text",{fontSize:"10",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:b[0]}),T.jsx("text",{fontSize:"5.42",dy:"2",dominantBaseline:"hanging",className:"rmp-name__en",children:b[1]})]})]}),!y&&T.jsxs("g",{transform:`translate(${z+L}, ${A})`,textAnchor:"middle"===f?"start":P,children:[T.jsx("text",{fontSize:"6.04",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:"(未开通)"}),T.jsx("text",{fontSize:"3.6",dy:"4",dominantBaseline:"hanging",className:"rmp-name__en",children:"(Under Construction)"})]})]})},icon:T.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:T.jsx("g",{transform:"translate(12,12)scale(0.45)",children:T.jsx(bt,{strokeColour:"#000",lineNum:"1",stnNum:"01"})})}),defaultAttrs:St,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:s}=e,{t:i}=a(),r=[{type:"textarea",label:i("panel.details.stations.common.nameZh"),value:n.names[0],onChange:e=>{n.names[0]=e,s(t,n)},minW:"full"},{type:"textarea",label:i("panel.details.stations.common.nameEn"),value:n.names[1],onChange:e=>{n.names[1]=e,s(t,n)},minW:"full"},{type:"select",label:i("panel.details.stations.common.nameOffsetX"),value:n.nameOffsetX,options:{left:i("panel.details.stations.common.left"),middle:i("panel.details.stations.common.middle"),right:i("panel.details.stations.common.right")},disabledOptions:"middle"===n.nameOffsetY?["middle"]:[],onChange:e=>{n.nameOffsetX=e,s(t,n)},minW:"full"},{type:"select",label:i("panel.details.stations.common.nameOffsetY"),value:n.nameOffsetY,options:{top:i("panel.details.stations.common.top"),middle:i("panel.details.stations.common.middle"),bottom:i("panel.details.stations.common.bottom")},disabledOptions:"middle"===n.nameOffsetX?["middle"]:[],onChange:e=>{n.nameOffsetY=e,s(t,n)},minW:"full"},{type:"custom",label:i("color"),component:T.jsx(c,{type:o.GzmtrBasic,defaultTheme:St.color})},{type:"input",label:i("panel.details.stations.common.lineCode"),value:n.lineCode,onChange:e=>{n.lineCode=e,s(t,n)},minW:"full"},{type:"input",label:i("panel.details.stations.common.stationCode"),value:n.stationCode,onChange:e=>{n.stationCode=e,s(t,n)},minW:"full"},{type:"switch",label:i("panel.details.stations.gzmtrBasic.open"),oneLine:!0,isChecked:n.open,onChange:e=>{n.open=e,s(t,n)},minW:"full"},{type:"input",label:i("panel.details.stations.gzmtrBasic.secondaryNameZh"),value:n.secondaryNames[0],onChange:e=>{n.secondaryNames[0]=e,s(t,n)},minW:"full"},{type:"input",label:i("panel.details.stations.gzmtrBasic.secondaryNameEn"),value:n.secondaryNames[1],onChange:e=>{n.secondaryNames[1]=e,s(t,n)},minW:"full"},{type:"switch",label:i("panel.details.stations.gzmtrBasic.tram"),oneLine:!0,isChecked:n.tram,onChange:e=>{n.tram=e,s(t,n)},minW:"full"}];return T.jsx(l,{fields:r})},metadata:{displayName:"panel.details.stations.gzmtrBasic.displayName",cities:[d.Guangzhou],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},zt=[d.Guangzhou,"","#AAAAAA",m.white,"","","gz"];function Mt(e){const{interchangeList:t,onAdd:s,onDelete:o,onUpdate:i}=e,r=C(),{paletteAppClip:{output:d}}=y((e=>e.runtime)),{t:m}=a(),[c,h]=n.useState();n.useEffect((()=>{void 0!==c&&d&&(null==i||i(c,[...d,t[c][4],t[c][5],t[c][6]]),h(void 0))}),[null==d?void 0:d.toString()]);const f=t.map(((e,t)=>[{type:"input",label:m("panel.details.stations.common.lineCode"),value:e[4],minW:"80px",onChange:n=>null==i?void 0:i(t,[e[0],e[1],e[2],e[3],n,e[5],e[6]])},{type:"input",label:m("panel.details.stations.common.stationCode"),value:e[5],minW:"80px",onChange:n=>null==i?void 0:i(t,[e[0],e[1],e[2],e[3],e[4],n,e[6]])}]));return T.jsxs(b,{direction:"column",children:[0===t.length&&T.jsxs(L,{spacing:.5,"data-testid":"interchange-card-stack",children:[T.jsx(D,{as:"i",flex:1,align:"center",fontSize:"md",colorScheme:"gray",children:m("panel.details.stations.interchange.noInterchanges")}),T.jsx(I,{size:"sm",variant:"ghost","aria-label":m("panel.details.stations.interchange.add"),onClick:()=>null==s?void 0:s(zt),icon:T.jsx(v,{})})]}),t.map(((e,n)=>T.jsxs(L,{spacing:.5,"data-testid":`interchange-card-stack-${n}`,children:[T.jsx(j,{label:m("color"),minW:"40px",noLabel:0!==n,children:T.jsx(w,{theme:[e[0],e[1],e[2],e[3]],onClick:()=>{h(n),r(O([e[0],e[1],e[2],e[3]]))}})}),T.jsx(l,{fields:f[n],noLabel:0!==n}),T.jsxs(H,{children:[s&&n===f.length-1?T.jsx(I,{size:"sm",variant:"ghost","aria-label":m("panel.details.stations.interchange.copy"),onClick:()=>null==s?void 0:s(t.slice(-1)[0]),icon:T.jsx(_,{})}):T.jsx(U,{minW:8}),o&&T.jsx(I,{size:"sm",variant:"ghost","aria-label":m("panel.details.stations.interchange.remove"),onClick:()=>null==o?void 0:o(n),icon:T.jsx(k,{})}),T.jsx(l,{fields:[{type:"switch",label:m("panel.details.stations.gzmtrInt.foshan"),isChecked:"fs"===e[6],onChange:t=>((e,t,n)=>null==i?void 0:i(t,[e[0],e[1],e[2],e[3],e[4],e[5],n?"fs":"gz"]))(e,n,t)}]})]})]},n)))]})}const At=[[[0,0]],[[0,0]],[[-18,0],[18,0]],[[-19.395,-11.198],[19.395,-11.198],[0,22.395]],[[-15.836,-15.836],[15.836,-15.836],[15.836,15.836],[-15.836,15.836]]],Pt={...x,nameOffsetX:"right",nameOffsetY:"top",transfer:[[],[]],open:!0,secondaryNames:["",""],tram:!1},Bt={component:e=>{var t,a,s,l,i,r,d,m,c,h,f,p,u,g,C,y,b,v,j,w,O,_,k,S;const{id:N,x:z,y:M,attrs:A,handlePointerDown:P,handlePointerMove:B,handlePointerUp:$}=e,{names:W=x.names,nameOffsetX:E=Pt.nameOffsetX,nameOffsetY:X=Pt.nameOffsetY,transfer:Y=Pt.transfer,open:R=Pt.open,secondaryNames:L=Pt.secondaryNames,tram:D=Pt.tram}=null!==(t=A[o.GzmtrInt])&&void 0!==t?t:Pt,I=n.useCallback((e=>P(N,e)),[N,P]),H=n.useCallback((e=>B(N,e)),[N,B]),U=n.useCallback((e=>$(N,e)),[N,$]),V=F("white","var(--chakra-colors-gray-800)"),G={en:D?5.08:6.56,zh:D?7.29:13.13},Z={top:{namesPos:1,lineHeight:G.en,polarity:-1},middle:{namesPos:0,lineHeight:0,polarity:0},bottom:{namesPos:0,lineHeight:G.zh,polarity:1}},Q=D?13:20,q=("left"===E?-Q:"right"===E?Q:0)*("middle"===X?1.2:1),J=D?8:11,K=(W[Z[X].namesPos].split("\n").length*Z[X].lineHeight+J*("middle"===E?1.8:1))*Z[X].polarity,ee="left"===E?"end":"right"===E?"start":R||"middle"!==E||""!==L.join("")?"middle":"end",te=Y.flat().slice(0,4),ne=[["black","black"],[null!==(a=null===(s=te.at(0))||void 0===s?void 0:s.at(2))&&void 0!==a?a:"black",null!==(l=null===(i=te.at(0))||void 0===i?void 0:i.at(2))&&void 0!==l?l:"black"],[null!==(r=null===(d=te.at(0))||void 0===d?void 0:d.at(2))&&void 0!==r?r:"black",null!==(m=null===(c=te.at(1))||void 0===c?void 0:c.at(2))&&void 0!==m?m:"black"],[null!==(h=null===(f=te.at(0))||void 0===f?void 0:f.at(2))&&void 0!==h?h:"black",null!==(p=null===(u=te.at(1))||void 0===u?void 0:u.at(2))&&void 0!==p?p:"black",null!==(g=null===(C=te.at(2))||void 0===C?void 0:C.at(2))&&void 0!==g?g:"black"],[null!==(y=null===(b=te.at(0))||void 0===b?void 0:b.at(2))&&void 0!==y?y:"black",null!==(v=null===(j=te.at(1))||void 0===j?void 0:j.at(2))&&void 0!==v?v:"black",null!==(w=null===(O=te.at(2))||void 0===O?void 0:O.at(2))&&void 0!==w?w:"black",null!==(_=null===(k=te.at(3))||void 0===k?void 0:k.at(2))&&void 0!==_?_:"black"]],ae=n.useRef(null),[se,le]=n.useState(0);n.useEffect((()=>{var e,t;return le(null!==(e=null===(t=ae.current)||void 0===t?void 0:t.getBBox().width)&&void 0!==e?e:0)}),[...L]);const oe=n.useRef(null),[ie,re]=n.useState(0);n.useEffect((()=>{var e,t;return re(null!==(e=null===(t=oe.current)||void 0===t?void 0:t.getBBox().width)&&void 0!==e?e:0)}),[...W]);const de=(ie+(se+24)/2)*("left"===E?-1:1),me=(ie+se+(0!==se?24:0))*("left"===E?-1:1);return T.jsxs("g",{id:N,transform:`translate(${z}, ${M})`,children:[te.map((e=>e[2])).filter(((e,t,n)=>n.indexOf(e)===t)).map((e=>T.jsx("marker",{id:`gzmtr_int_arrow_${e}`,markerWidth:"5",markerHeight:"5",refX:"1",refY:"1.25",orient:"auto",children:T.jsx("polygon",{points:"0.25,0 0.25,2.5 2.25,1.25",fill:e})},`gzmtr_int_arrow_${e}`))),T.jsxs("g",{transform:`scale(${.57915*(D?.729:1)})`,children:[te.length<=2&&T.jsxs(T.Fragment,{children:[T.jsx("path",{d:"M -18,-12 A 24 24 0 0 1 18,-12 L 18,12 A 24 24 0 0 1 -18,12 Z",fill:V}),T.jsx("path",{d:"M -18,-12 A 24 24 0 0 1 18,-12",fill:"none",stroke:ne[te.length][0],strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][0]})`}),T.jsx("path",{d:"M 18,12 A 24 24 0 0 1 -18,12",fill:"none",stroke:ne[te.length][1],strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][1]})`})]}),3===te.length&&T.jsxs(T.Fragment,{children:[T.jsx("circle",{r:"22.395",fill:V}),T.jsx("path",{d:"M -19.3948,11.1976 A 22.395 22.395 0 0 1 0,-22.395",fill:"none",stroke:ne[te.length][0],strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][0]})`}),T.jsx("path",{d:"M 0,-22.395 A 22.395 22.395 0 0 1 19.3948,11.1976",fill:"none",stroke:ne[te.length][1],strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][1]})`}),T.jsx("path",{d:"M 19.3948,11.1976 A 22.395 22.395 0 0 1 -19.3948,11.1976",fill:"none",stroke:ne[te.length][2],strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][2]})`}),T.jsx("path",{d:"M -19.3948,11.1976 A 22.395 22.395 0 0 1 0,-22.395",fill:"none",strokeOpacity:"0",stroke:"white",strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][0]})`}),T.jsx("path",{d:"M 0,-22.395 A 22.395 22.395 0 0 1 19.3948,11.1976",fill:"none",strokeOpacity:"0",stroke:"white",strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][1]})`})]}),te.length>=4&&T.jsxs(T.Fragment,{children:[T.jsx("circle",{r:"22.395",fill:V}),T.jsx("path",{d:"M -22.395,0 A 22.395 22.395 0 0 1 0,-22.395",fill:"none",stroke:ne[te.length][0],strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][0]})`}),T.jsx("path",{d:"M 0,-22.395 A 22.395 22.395 0 0 1 22.395,0",fill:"none",stroke:ne[te.length][1],strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][1]})`}),T.jsx("path",{d:"M 22.395,0 A 22.395 22.395 0 0 1 0,22.395",fill:"none",stroke:ne[te.length][2],strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][2]})`}),T.jsx("path",{d:"M 0,22.395 A 22.395 22.395 0 0 1 -22.395,0",fill:"none",stroke:ne[te.length][3],strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][3]})`}),T.jsx("path",{d:"M -22.395,0 A 22.395 22.395 0 0 1 0,-22.395",fill:"none",strokeOpacity:"0",stroke:"white",strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][0]})`}),T.jsx("path",{d:"M 0,-22.395 A 22.395 22.395 0 0 1 22.395,0",fill:"none",strokeOpacity:"0",stroke:"white",strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][1]})`}),T.jsx("path",{d:"M 22.395,0 A 22.395 22.395 0 0 1 0,22.395",fill:"none",strokeOpacity:"0",stroke:"white",strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][2]})`})]}),null===(S=Y[0])||void 0===S?void 0:S.map(((e,t,n)=>T.jsx("g",{transform:`translate(${At[n.length][t][0]},${At[n.length][t][1]})scale(0.6)`,children:"gz"===e[6]?T.jsx(bt,{strokeColour:e[2],lineNum:e[4],stnNum:e[5],textClassName:"rmp-name__zh"}):T.jsx(Ct,{strokeColour:e[2],lineNum:e[4],stnNum:e[5],textClassName:"rmp-name__zh"})},`gzmtr_int_${N}_stn_${t}`))),T.jsx("circle",{id:`stn_core_${N}`,r:3===te.length?22.395:18,fill:"white",fillOpacity:"0",onPointerDown:I,onPointerMove:H,onPointerUp:U,style:{cursor:"move"}})]}),T.jsxs("g",{ref:oe,transform:`translate(${q}, ${K})`,textAnchor:ee,children:[T.jsx(xe,{text:W[0].split("\n"),fontSize:G.zh,lineHeight:G.zh,grow:"up",className:"rmp-name__zh"}),T.jsx(xe,{text:W[1].split("\n"),fontSize:G.en,lineHeight:G.en,grow:"down",className:"rmp-name__en"})]}),""!==L.join("")&&T.jsxs("g",{transform:`translate(${q+de}, ${K})`,textAnchor:"middle",children:[T.jsx("text",{fontSize:"13.13",dx:-(se+5)/2,textAnchor:"end",dominantBaseline:"middle",className:"rmp-name__zh",children:"("}),T.jsx("text",{fontSize:"13.13",dx:(se+5)/2,textAnchor:"start",dominantBaseline:"middle",className:"rmp-name__zh",children:")"}),T.jsxs("g",{ref:ae,children:[T.jsx("text",{fontSize:"10",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:L[0]}),T.jsx("text",{fontSize:"5.42",dy:"2",dominantBaseline:"hanging",className:"rmp-name__en",children:L[1]})]})]}),!R&&T.jsxs("g",{transform:`translate(${q+me}, ${K})`,textAnchor:ee,children:[T.jsx("text",{fontSize:"6.04",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:"(未开通)"}),T.jsx("text",{fontSize:"3.6",dy:"4",dominantBaseline:"hanging",className:"rmp-name__en",children:"(Under Construction)"})]})]})},icon:T.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[T.jsx("g",{transform:"translate(6,12)scale(0.3)",children:T.jsx(bt,{strokeColour:"currentColor",lineNum:"1",stnNum:"09"})}),T.jsx("g",{transform:"translate(18,12)scale(0.3)",children:T.jsx(bt,{strokeColour:"currentColor",lineNum:"2",stnNum:"13"})}),T.jsx("marker",{id:"arrow",markerWidth:"5",markerHeight:"5",refX:"1",refY:"1.25",orient:"auto",children:T.jsx("polygon",{points:"0,0 0,3 2,1.5"})}),T.jsx("path",{d:"M 6,6 A 8 8 0 0 1 18,6",fill:"none",stroke:"currentColor",strokeWidth:"2",markerEnd:"url(#arrow)"}),T.jsx("path",{d:"M 18,18 A 8 8 0 0 1 6,18",fill:"none",stroke:"currentColor",strokeWidth:"2",markerEnd:"url(#arrow)"})]}),defaultAttrs:Pt,attrsComponent:e=>{var t;const{id:s,attrs:o,handleAttrsUpdate:i}=e,{t:r}=a(),d=[{type:"textarea",label:r("panel.details.stations.common.nameZh"),value:o.names[0],onChange:e=>{o.names[0]=e,i(s,o)},minW:"full"},{type:"textarea",label:r("panel.details.stations.common.nameEn"),value:o.names[1],onChange:e=>{o.names[1]=e,i(s,o)},minW:"full"},{type:"select",label:r("panel.details.stations.common.nameOffsetX"),value:o.nameOffsetX,options:{left:r("panel.details.stations.common.left"),middle:r("panel.details.stations.common.middle"),right:r("panel.details.stations.common.right")},disabledOptions:"middle"===o.nameOffsetY?["middle"]:[],onChange:e=>{o.nameOffsetX=e,i(s,o)},minW:"full"},{type:"select",label:r("panel.details.stations.common.nameOffsetY"),value:o.nameOffsetY,options:{top:r("panel.details.stations.common.top"),middle:r("panel.details.stations.common.middle"),bottom:r("panel.details.stations.common.bottom")},disabledOptions:"middle"===o.nameOffsetX?["middle"]:[],onChange:e=>{o.nameOffsetY=e,i(s,o)},minW:"full"},{type:"switch",label:r("panel.details.stations.gzmtrInt.open"),oneLine:!0,isChecked:o.open,onChange:e=>{o.open=e,i(s,o)},minW:"full"},{type:"input",label:r("panel.details.stations.gzmtrInt.secondaryNameZh"),value:o.secondaryNames[0],onChange:e=>{o.secondaryNames[0]=e,i(s,o)},minW:"full"},{type:"input",label:r("panel.details.stations.gzmtrInt.secondaryNameEn"),value:o.secondaryNames[1],onChange:e=>{o.secondaryNames[1]=e.toString(),i(s,o)},minW:"full"},{type:"switch",label:r("panel.details.stations.gzmtrBasic.tram"),oneLine:!0,isChecked:o.tram,onChange:e=>{o.tram=e,i(s,o)},minW:"full"}],m=[4,4,0],c=null!==(t=o.transfer)&&void 0!==t?t:Pt.transfer,h=e=>t=>{const n=structuredClone(c);if(n.length<=e)for(let a=n.length;a<=e;a++)n[a]=[zt];n[e].push(t),o.transfer=n,i(s,o)},f=e=>(t,n)=>{if(c.length>e&&c[e].length>t){const a=c.map(((a,s)=>s===e?a.map(((e,a)=>a===t?[0,1,2,3,4,5,6].map((t=>void 0===n[t]?e[t]:n[t])):e)):a));o.transfer=a,i(s,o)}};return T.jsxs(T.Fragment,{children:[T.jsx(l,{fields:d}),T.jsx(j,{label:r("panel.details.stations.interchange.title"),children:T.jsxs(H,{align:"flex-start",children:[c.map(((e,t)=>{return T.jsxs(n.Fragment,{children:[T.jsx(V,{size:"xs",children:r(0===t?"panel.details.stations.interchange.within":1===t?"panel.details.stations.interchange.outStation":"panel.details.stations.interchange.outSystem")}),T.jsx(Mt,{interchangeList:e,onAdd:m[t]>e.length?h(t):void 0,onDelete:(a=t,e=>{if(c.length>a&&c[a].length>e){const t=c.map(((t,n)=>n===a?t.filter(((t,n)=>n!==e)):t));o.transfer=t,i(s,o)}}),onUpdate:f(t)})]},t);var a})),m[c.length]>0&&T.jsx(G,{size:"xs",variant:"ghost",alignSelf:"flex-end",leftIcon:T.jsx(v,{}),onClick:()=>h(c.length)(zt),children:r("panel.details.stations.interchange.addGroup")})]})})]})},metadata:{displayName:"panel.details.stations.gzmtrInt.displayName",cities:[d.Guangzhou],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},$t=6.56,Wt=13.13,Et=structuredClone(Ce);Et.top.lineHeight=$t,Et.bottom.lineHeight=Wt;const Xt={...x,nameOffsetX:"right",nameOffsetY:"top",transfer:[[[d.Guangzhou,"gz1","#F3D03E",m.white,"1","14","gz"],[d.Guangzhou,"gz3","#ECA154",m.white,"3","11","gz"]]],open:!0,secondaryNames:["",""],preferVertical:!0,anchorAt:-1},Yt={component:e=>{var t,a;const{id:s,x:l,y:i,attrs:r,handlePointerDown:d,handlePointerMove:m,handlePointerUp:c}=e,{names:h=x.names,nameOffsetX:f=Xt.nameOffsetX,nameOffsetY:p=Xt.nameOffsetY,transfer:u=Xt.transfer,open:g=Xt.open,secondaryNames:C=Xt.secondaryNames,preferVertical:y=Xt.preferVertical,anchorAt:b=Xt.anchorAt}=null!==(t=r[o.GzmtrInt2024])&&void 0!==t?t:Xt,v=n.useCallback((e=>d(s,e)),[s,d]),j=n.useCallback((e=>m(s,e)),[s,m]),w=n.useCallback((e=>c(s,e)),[s,c]),O=u.flat().slice(0,4),_=n.useRef(null);null===(a=_.current)||void 0===a||null===(a=a.querySelectorAll("path"))||void 0===a||a.forEach((e=>e.setAttribute("id",`stn_core_${s}`)));const[k,S]=n.useState({x1:0,x2:0,y1:0,y2:0});n.useEffect((()=>{const{height:e,width:t,x:n,y:a}=_.current.getBBox(),[s,l]=[n+t,a+e];S({x1:n,x2:s,y1:a,y2:l})}),[JSON.stringify(O),y,b,S,_]);const N=y&&2===O.length?0:8,z=O.map((e=>({style:"gz"===e[6]?"gzmtr":"fmetro",lineNum:e[4],stnNum:e[5],strokeColour:e[2]}))),M="left"===f?k.x1+N:"right"===f?k.x2-N:0,A=(h[Et[p].namesPos].split("\n").length*Et[p].lineHeight+(k.y2-k.y1)/2)*Et[p].polarity,P="left"===f?"end":"right"===f?"start":g||"middle"!==f||""!==C.join("")?"middle":"end",B=n.useRef(null),[$,W]=n.useState(0);n.useEffect((()=>{var e,t;return W(null!==(e=null===(t=B.current)||void 0===t?void 0:t.getBBox().width)&&void 0!==e?e:0)}),[...C]);const E=n.useRef(null),[X,Y]=n.useState(0);n.useEffect((()=>{var e,t;return Y(null!==(e=null===(t=E.current)||void 0===t?void 0:t.getBBox().width)&&void 0!==e?e:0)}),[...h]);const R=(X+($+24)/2)*("left"===f?-1:1),L=(X+$+(0!==$?24:0))*("left"===f?-1:1);return T.jsxs("g",{id:s,transform:`translate(${l}, ${i})`,children:[T.jsx("g",{transform:"scale(0.56)",onPointerDown:v,onPointerMove:j,onPointerUp:w,style:{cursor:"move"},ref:_,children:T.jsx(kt,{stations:z,textClassName:"rmp-name__zh",preferVertical:y,anchorAt:b>=0?b:void 0})}),T.jsxs("g",{ref:E,transform:`translate(${M}, ${A})`,textAnchor:P,children:[T.jsx(xe,{text:h[0].split("\n"),fontSize:13.13,lineHeight:13.13,grow:"up",className:"rmp-name__zh"}),T.jsx(xe,{text:h[1].split("\n"),fontSize:6.56,lineHeight:6.56,grow:"down",className:"rmp-name__en"})]}),""!==C.join("")&&T.jsxs("g",{transform:`translate(${M+R}, ${A})`,textAnchor:"middle",children:[T.jsx("text",{fontSize:"13.13",dx:-($+5)/2,textAnchor:"end",dominantBaseline:"middle",className:"rmp-name__zh",children:"("}),T.jsx("text",{fontSize:"13.13",dx:($+5)/2,textAnchor:"start",dominantBaseline:"middle",className:"rmp-name__zh",children:")"}),T.jsxs("g",{ref:B,children:[T.jsx("text",{fontSize:"10",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:C[0]}),T.jsx("text",{fontSize:"5.42",dy:"2",dominantBaseline:"hanging",className:"rmp-name__en",children:C[1]})]})]}),!g&&T.jsxs("g",{transform:`translate(${M+L}, ${A})`,textAnchor:P,children:[T.jsx("text",{fontSize:"6.04",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:"(未开通)"}),T.jsx("text",{fontSize:"3.6",dy:"4",dominantBaseline:"hanging",className:"rmp-name__en",children:"(Under Construction)"})]})]})},icon:T.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:T.jsx(kt,{stations:[{strokeColour:"currentColor",lineNum:"3",stnNum:"03"},{strokeColour:"currentColor",lineNum:"7",stnNum:"05"}],textClassName:"rmp-name__zh",preferVertical:!0,transform:"translate(12,12)scale(0.3)"})}),defaultAttrs:Xt,attrsComponent:e=>{var t,s;const{id:o,attrs:i,handleAttrsUpdate:r}=e,{t:d}=a(),m=[{type:"textarea",label:d("panel.details.stations.common.nameZh"),value:i.names[0],onChange:e=>{i.names[0]=e,r(o,i)},minW:"full"},{type:"textarea",label:d("panel.details.stations.common.nameEn"),value:i.names[1],onChange:e=>{i.names[1]=e,r(o,i)},minW:"full"},{type:"select",label:d("panel.details.stations.common.nameOffsetX"),value:i.nameOffsetX,options:{left:d("panel.details.stations.common.left"),middle:d("panel.details.stations.common.middle"),right:d("panel.details.stations.common.right")},disabledOptions:"middle"===i.nameOffsetY?["middle"]:[],onChange:e=>{i.nameOffsetX=e,r(o,i)},minW:"full"},{type:"select",label:d("panel.details.stations.common.nameOffsetY"),value:i.nameOffsetY,options:{top:d("panel.details.stations.common.top"),middle:d("panel.details.stations.common.middle"),bottom:d("panel.details.stations.common.bottom")},disabledOptions:"middle"===i.nameOffsetX?["middle"]:[],onChange:e=>{i.nameOffsetY=e,r(o,i)},minW:"full"},{type:"select",label:d("panel.details.stations.gzmtrInt2024.anchorAt"),value:null!==(t=i.anchorAt)&&void 0!==t?t:"-1",options:{"-1":d("panel.details.stations.gzmtrInt2024.anchorAtNone"),...Object.fromEntries(Array.from({length:Math.min(i.transfer.flat().length,4)},((e,t)=>[t.toString(),t])))},onChange:e=>{i.anchorAt=Number(e),r(o,i)},minW:"full"},{type:"switch",label:d("panel.details.stations.gzmtrInt2024.preferVertical"),oneLine:!0,isChecked:i.preferVertical,onChange:e=>{i.preferVertical=e,r(o,i)},minW:"full"},{type:"switch",label:d("panel.details.stations.gzmtrInt.open"),oneLine:!0,isChecked:i.open,onChange:e=>{i.open=e,r(o,i)},minW:"full"},{type:"input",label:d("panel.details.stations.gzmtrInt.secondaryNameZh"),value:i.secondaryNames[0],onChange:e=>{i.secondaryNames[0]=e,r(o,i)},minW:"full"},{type:"input",label:d("panel.details.stations.gzmtrInt.secondaryNameEn"),value:i.secondaryNames[1],onChange:e=>{i.secondaryNames[1]=e.toString(),r(o,i)},minW:"full"}],c=[4,4,0],h=null!==(s=i.transfer)&&void 0!==s?s:Xt.transfer,f=e=>t=>{const n=structuredClone(h);if(n.length<=e)for(let a=n.length;a<=e;a++)n[a]=[zt];n[e].push(t),i.transfer=n,r(o,i)},p=e=>(t,n)=>{if(h.length>e&&h[e].length>t){const a=h.map(((a,s)=>s===e?a.map(((e,a)=>a===t?[0,1,2,3,4,5,6].map((t=>void 0===n[t]?e[t]:n[t])):e)):a));i.transfer=a,r(o,i)}};return T.jsxs(T.Fragment,{children:[T.jsx(l,{fields:m}),T.jsx(j,{label:d("panel.details.stations.interchange.title"),children:T.jsxs(H,{align:"flex-start",children:[h.map(((e,t)=>{return T.jsxs(n.Fragment,{children:[T.jsx(V,{size:"xs",children:d(0===t?"panel.details.stations.interchange.within":1===t?"panel.details.stations.interchange.outStation":"panel.details.stations.interchange.outSystem")}),T.jsx(Mt,{interchangeList:e,onAdd:c[t]>e.length?f(t):void 0,onDelete:(a=t,e=>{if(h.length>a&&h[a].length>e){const t=h.map(((t,n)=>n===a?t.filter(((t,n)=>n!==e)):t));i.transfer=t,i.anchorAt=-1,r(o,i)}}),onUpdate:p(t)})]},t);var a})),c[h.length]>0&&T.jsx(G,{size:"xs",variant:"ghost",alignSelf:"flex-end",leftIcon:T.jsx(v,{}),onClick:()=>f(h.length)(zt),children:d("panel.details.stations.interchange.addGroup")})]})})]})},metadata:{displayName:"panel.details.stations.gzmtrInt2024.displayName",cities:[d.Guangzhou],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},Rt={zh:9,en:6.2,top:7.2,middle:0,bottom:10},Tt={...x,nameOffsetX:"right",nameOffsetY:"top",open:!0},Lt=[{type:"textarea",label:"panel.details.stations.common.nameZh",value:e=>(null!=e?e:Tt).names[0],onChange:(e,t)=>{const n=null!=t?t:Tt;return n.names[0]=e.toString(),n}},{type:"textarea",label:"panel.details.stations.common.nameEn",value:e=>(null!=e?e:Tt).names[1],onChange:(e,t)=>{const n=null!=t?t:Tt;return n.names[1]=e.toString(),n}},{type:"select",label:"panel.details.stations.common.nameOffsetX",value:e=>(null!=e?e:Tt).nameOffsetX,options:{left:"left",middle:"middle",right:"right"},disabledOptions:e=>"middle"===(null==e?void 0:e.nameOffsetY)?["middle"]:[],onChange:(e,t)=>{const n=null!=t?t:Tt;return n.nameOffsetX=e,n}},{type:"select",label:"panel.details.stations.common.nameOffsetY",value:e=>(null!=e?e:Tt).nameOffsetY,options:{top:"top",middle:"middle",bottom:"bottom"},disabledOptions:e=>"middle"===(null==e?void 0:e.nameOffsetX)?["middle"]:[],onChange:(e,t)=>{const n=null!=t?t:Tt;return n.nameOffsetY=e,n}},{type:"switch",label:"panel.details.stations.bjsubwayBasic.open",oneLine:!0,isChecked:e=>(null!=e?e:Tt).open,onChange:(e,t)=>{const n=null!=t?t:Tt;return n.open=e,n}}],Dt={component:e=>{var t;const{id:a,x:s,y:l,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,nameOffsetX:h=Tt.nameOffsetX,nameOffsetY:f=Tt.nameOffsetY,open:p=Tt.open}=null!==(t=i[o.BjsubwayBasic])&&void 0!==t?t:Tt,u=n.useCallback((e=>r(a,e)),[a,r]),g=n.useCallback((e=>d(a,e)),[a,d]),C=n.useCallback((e=>m(a,e)),[a,m]),[y,b]=(j=f,"left"===(v=h)&&"top"===j?[-4,-(c[1].split("\n").length+(p?0:1))*Rt[j]-1]:"middle"===v&&"top"===j?[0,-(c[1].split("\n").length+(p?0:1))*Rt[j]-4]:"right"===v&&"top"===j?[4,-(c[1].split("\n").length+(p?0:1))*Rt[j]-1]:"left"===v&&"bottom"===j?[-4,c[0].split("\n").length*Rt[j]+1]:"middle"===v&&"bottom"===j?[0,c[0].split("\n").length*Rt[j]+4]:"right"===v&&"bottom"===j?[4,c[0].split("\n").length*Rt[j]+1]:"left"===v&&"middle"===j?[-5,0]:"right"===v&&"middle"===j?[5,0]:[0,0]);var v,j;const w="left"===h?"end":"right"===h?"start":"middle";return T.jsxs("g",{id:a,transform:`translate(${s}, ${l})`,children:[T.jsx("circle",{id:`stn_core_${a}`,r:"4",stroke:"black",strokeWidth:"0.5",strokeDasharray:p?void 0:"1.5",fill:"white",onPointerDown:u,onPointerMove:g,onPointerUp:C,style:{cursor:"move"}}),T.jsxs("g",{transform:`translate(${y}, ${b})`,textAnchor:w,children:[T.jsx(xe,{text:c[0].split("\n"),fontSize:Rt.zh,lineHeight:Rt.zh,grow:"up",className:"rmp-name__zh",baseOffset:1}),T.jsx(xe,{text:c[1].split("\n"),fontSize:Rt.en,lineHeight:Rt.en,grow:"down",className:"rmp-name__en",baseOffset:1}),!p&&T.jsx("text",{dy:c[1].split("\n").length*Rt.en+2,fontSize:Rt.en,dominantBaseline:"hanging",className:"rmp-name__zh",children:"(暂缓开通)"})]})]})},icon:T.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:T.jsx("circle",{cx:"12",cy:"12",r:"4",stroke:"currentColor",strokeWidth:"0.5",fill:"none"})}),defaultAttrs:Tt,attrsComponent:()=>T.jsx(S,{fields:Lt}),metadata:{displayName:"panel.details.stations.bjsubwayBasic.displayName",cities:[d.Beijing],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},It="M 8.359893 4.159288 C 8.368828 4.168825 8.460953 4.26852 8.57038 4.386985 C 8.679807 4.505449 8.860802 4.701382 8.972592 4.822389 C 9.084381 4.943397 9.238666 5.110407 9.315445 5.193521 C 9.392224 5.276636 9.519867 5.414817 9.599094 5.500589 C 9.678323 5.58636 9.801023 5.719209 9.871761 5.795812 C 9.942499 5.872413 10.000208 5.935256 9.999999 5.935465 C 9.999792 5.935671 9.975513 5.928466 9.946045 5.919453 C 9.916577 5.910439 9.831826 5.88438 9.757708 5.861543 C 9.683591 5.838706 9.532284 5.791997 9.421472 5.757746 C 9.310658 5.723495 9.190374 5.686309 9.154173 5.675113 C 9.11797 5.663918 9.048485 5.642428 8.99976 5.627359 C 8.951035 5.612291 8.910275 5.599729 8.909181 5.599446 C 8.907193 5.59893 8.907193 5.59893 8.907135 5.798288 C 8.907103 5.907935 8.906695 6.128369 8.906229 6.288144 C 8.905446 6.555825 8.905249 6.580968 8.903705 6.608245 C 8.902784 6.624527 8.90139 6.647987 8.900606 6.660379 C 8.899822 6.672773 8.898192 6.695836 8.896983 6.711632 C 8.895774 6.727427 8.893582 6.753074 8.892114 6.768627 C 8.890645 6.784179 8.888061 6.80923 8.88637 6.824296 C 8.884679 6.839362 8.88172 6.864065 8.879793 6.879189 C 8.877868 6.894315 8.874691 6.917777 8.872734 6.931325 C 8.870777 6.944874 8.867386 6.967292 8.865197 6.981143 C 8.863009 6.994995 8.859045 7.018654 8.856388 7.03372 C 8.853731 7.048786 8.849344 7.072617 8.84664 7.086676 C 8.843935 7.100736 8.839338 7.1236 8.836424 7.137486 C 8.833509 7.151371 8.828584 7.174065 8.825479 7.187916 C 8.822371 7.201767 8.817014 7.224831 8.81357 7.239167 C 8.810127 7.253505 8.80431 7.276767 8.800644 7.29086 C 8.796978 7.304955 8.791035 7.327222 8.787437 7.340344 C 8.78384 7.353467 8.77752 7.375735 8.773395 7.389829 C 8.769268 7.403923 8.762319 7.426986 8.757952 7.441081 C 8.753583 7.455174 8.746363 7.47784 8.741903 7.491448 C 8.737446 7.505056 8.729829 7.527523 8.724978 7.541374 C 8.720126 7.555225 8.712182 7.577493 8.707321 7.590858 C 8.702462 7.604224 8.6948 7.624901 8.690294 7.636807 C 8.68579 7.648715 8.677304 7.670452 8.671437 7.685113 C 8.665571 7.699773 8.656536 7.721842 8.651362 7.734155 C 8.646187 7.746468 8.63796 7.765688 8.63308 7.776865 C 8.628201 7.788043 8.620145 7.806136 8.615178 7.817071 C 8.610211 7.828006 8.60083 7.848286 8.594332 7.862138 C 8.587832 7.875988 8.573873 7.904618 8.563307 7.92576 C 8.552743 7.946901 8.537873 7.975929 8.530265 7.990266 C 8.522656 8.004602 8.511053 8.026075 8.504479 8.037983 C 8.497905 8.04989 8.486739 8.069772 8.479666 8.082165 C 8.472593 8.094558 8.460988 8.11444 8.453878 8.126348 C 8.446768 8.138254 8.435438 8.156944 8.428702 8.167879 C 8.421966 8.178814 8.410628 8.196906 8.403507 8.208085 C 8.396386 8.219262 8.384013 8.238349 8.37601 8.2505 C 8.36801 8.26265 8.354345 8.282929 8.345645 8.295566 C 8.336946 8.308201 8.322885 8.328276 8.314397 8.340175 C 8.305909 8.352074 8.292209 8.37096 8.283951 8.382147 C 8.275693 8.393333 8.261178 8.41259 8.251695 8.42494 C 8.242211 8.437289 8.225837 8.458165 8.215304 8.471332 C 8.204773 8.484497 8.189062 8.503819 8.18039 8.514267 C 8.17172 8.524716 8.157459 8.541616 8.148703 8.551823 C 8.139945 8.562029 8.125004 8.579116 8.115499 8.589793 C 8.105992 8.600471 8.091457 8.616575 8.083197 8.625581 C 8.074937 8.634586 8.060843 8.649709 8.05188 8.659185 C 8.042916 8.668662 8.018659 8.69335 7.997974 8.714046 C 7.977291 8.734741 7.953162 8.758432 7.944355 8.766693 C 7.935549 8.774953 7.920821 8.788638 7.911628 8.797104 C 7.902433 8.805571 7.887569 8.819082 7.878597 8.827129 C 7.869623 8.835177 7.853733 8.849096 7.843284 8.858062 C 7.832834 8.867027 7.816133 8.881153 7.806171 8.889453 C 7.796208 8.897753 7.779904 8.911098 7.769942 8.919111 C 7.759978 8.927123 7.743874 8.939848 7.734154 8.947388 C 7.724434 8.954926 7.708329 8.96721 7.698366 8.974683 C 7.688403 8.982156 7.673093 8.993497 7.664346 8.999885 C 7.655598 9.006271 7.637505 9.019163 7.62414 9.02853 C 7.610775 9.037899 7.588109 9.053377 7.573772 9.062926 C 7.559434 9.072475 7.538474 9.086151 7.527194 9.093318 C 7.515913 9.100485 7.497422 9.112045 7.486104 9.119009 C 7.474786 9.125973 7.454846 9.137918 7.441793 9.145553 C 7.428741 9.153188 7.405677 9.166317 7.390542 9.174728 C 7.375406 9.18314 7.352087 9.19579 7.338722 9.20284 C 7.325357 9.209889 7.303686 9.221025 7.290564 9.227587 C 7.277442 9.234147 7.256366 9.2444 7.243731 9.250369 C 7.231095 9.256339 7.211213 9.265569 7.199549 9.27088 C 7.187884 9.27619 7.168797 9.28464 7.157134 9.289659 C 7.145469 9.294676 7.124792 9.303333 7.111184 9.308895 C 7.097576 9.31446 7.075367 9.323255 7.061831 9.328442 C 7.048295 9.333629 7.027816 9.341289 7.016323 9.345462 C 7.00483 9.349636 6.978328 9.358748 6.95743 9.365711 C 6.936532 9.372675 6.906311 9.382359 6.890272 9.38723 C 6.874235 9.392101 6.849581 9.399302 6.835486 9.403231 C 6.821393 9.40716 6.796739 9.413705 6.7807 9.417776 C 6.764662 9.421847 6.740208 9.427785 6.726356 9.430971 C 6.712505 9.434157 6.689641 9.439174 6.675548 9.442118 C 6.661452 9.445063 6.639384 9.449434 6.626504 9.451833 C 6.613625 9.454231 6.591038 9.458187 6.57631 9.460623 C 6.561581 9.463058 6.538518 9.46664 6.525058 9.468584 C 6.511598 9.470528 6.487662 9.473704 6.471867 9.475644 C 6.456071 9.477583 6.433207 9.480169 6.421057 9.481392 C 6.408907 9.482615 6.387236 9.4846 6.372898 9.485805 C 6.358561 9.487008 6.333112 9.488794 6.316345 9.489771 C 6.299578 9.490749 6.276316 9.491956 6.264652 9.492452 C 6.252987 9.492949 6.216803 9.493517 6.18424 9.493716 C 6.151678 9.493916 6.114499 9.493756 6.10162 9.493363 C 6.088739 9.49297 6.06866 9.492202 6.056995 9.491656 C 6.045331 9.491112 6.026046 9.490059 6.014138 9.489319 C 6.002231 9.488579 5.982548 9.487186 5.970398 9.486226 C 5.958248 9.485266 5.939956 9.483668 5.92975 9.482677 C 5.919544 9.481687 5.902445 9.479897 5.891753 9.478702 C 5.881061 9.477505 5.864443 9.475529 5.854823 9.47431 C 5.845204 9.47309 5.827708 9.470707 5.815943 9.469012 C 5.804178 9.467319 5.784412 9.464314 5.77202 9.462336 C 5.759627 9.460358 5.745908 9.458071 5.741535 9.457253 C 5.733583 9.455767 5.733583 9.455767 5.750813 9.451963 C 5.76029 9.449871 5.778183 9.445793 5.790576 9.442902 C 5.802969 9.440009 5.82305 9.435088 5.8352 9.431966 C 5.847351 9.428843 5.867067 9.423503 5.879014 9.420099 C 5.890961 9.416695 5.911639 9.410524 5.924964 9.406386 C 5.938288 9.402248 5.960324 9.395124 5.973932 9.390556 C 5.98754 9.385988 6.008053 9.378835 6.019516 9.374659 C 6.030978 9.370483 6.050462 9.363131 6.062815 9.358321 C 6.075166 9.353508 6.094417 9.34577 6.105595 9.341125 C 6.116774 9.336478 6.135264 9.328524 6.146685 9.323448 C 6.158106 9.318373 6.177591 9.309499 6.189984 9.303728 C 6.202377 9.297957 6.224247 9.287379 6.238585 9.280221 C 6.252921 9.273063 6.273399 9.262563 6.284092 9.256887 C 6.294784 9.251213 6.314865 9.240225 6.328716 9.232468 C 6.342567 9.224712 6.361654 9.213777 6.371131 9.208166 C 6.380608 9.202557 6.396514 9.192982 6.406477 9.18689 C 6.41644 9.180798 6.432345 9.170843 6.441822 9.164769 C 6.4513 9.158695 6.467404 9.14816 6.47761 9.141357 C 6.487816 9.134555 6.50392 9.123611 6.513398 9.117039 C 6.522875 9.110467 6.539177 9.098936 6.549627 9.091415 C 6.560077 9.083895 6.577971 9.070704 6.589391 9.062101 C 6.600812 9.053498 6.618895 9.039583 6.629575 9.031179 C 6.640255 9.022773 6.656757 9.009534 6.666247 9.001758 C 6.675736 8.993981 6.692227 8.980227 6.702893 8.971191 C 6.713559 8.962157 6.730458 8.94742 6.740448 8.938442 C 6.750437 8.929464 6.766562 8.914768 6.776282 8.905784 C 6.786003 8.896801 6.803698 8.880239 6.815604 8.868983 C 6.827512 8.857727 6.843456 8.842402 6.851037 8.834927 C 6.858617 8.827451 6.873728 8.812176 6.884615 8.800982 C 6.895503 8.789788 6.912683 8.77174 6.922792 8.760878 C 6.932902 8.750012 6.949699 8.731606 6.960117 8.719973 C 6.970537 8.70834 6.986147 8.690599 6.994807 8.68055 C 7.003467 8.670501 7.017852 8.65353 7.026772 8.642838 C 7.035693 8.632146 7.053 8.610872 7.065231 8.595562 C 7.077464 8.580254 7.09533 8.557407 7.104936 8.544792 C 7.114541 8.532177 7.129989 8.511499 7.139265 8.498842 C 7.14854 8.486185 7.164221 8.464337 7.174109 8.450293 C 7.183999 8.436249 7.199718 8.413383 7.209044 8.399484 C 7.218369 8.385583 7.232209 8.364666 7.2398 8.353003 C 7.247391 8.341338 7.260236 8.321177 7.268346 8.3082 C 7.276455 8.295223 7.289493 8.27395 7.297318 8.260925 C 7.305143 8.247901 7.317313 8.227304 7.32436 8.215153 C 7.331408 8.203004 7.344023 8.180735 7.352394 8.165669 C 7.360765 8.150602 7.372812 8.128534 7.379167 8.116627 C 7.385522 8.104719 7.396764 8.083248 7.404151 8.06891 C 7.411537 8.054573 7.422352 8.0331 7.428184 8.021194 C 7.434016 8.009287 7.443347 7.990001 7.448918 7.978336 C 7.45449 7.966672 7.463351 7.947784 7.468609 7.936364 C 7.473868 7.924943 7.482234 7.906453 7.4872 7.895274 C 7.492166 7.884096 7.500586 7.86481 7.505909 7.852417 C 7.511233 7.840024 7.519759 7.819808 7.524855 7.807493 C 7.529951 7.795179 7.538242 7.7747 7.543279 7.761986 C 7.548316 7.749271 7.556671 7.727735 7.561847 7.714127 C 7.567022 7.700519 7.57545 7.677853 7.580575 7.663759 C 7.585701 7.649664 7.594637 7.624414 7.600433 7.607646 C 7.60623 7.59088 7.615365 7.563642 7.620735 7.547118 C 7.626104 7.530593 7.634661 7.503554 7.63975 7.48703 C 7.644838 7.470506 7.653173 7.442472 7.658273 7.424733 C 7.663371 7.406994 7.671309 7.378562 7.675913 7.361553 C 7.680518 7.344542 7.688414 7.314123 7.69346 7.293953 C 7.698508 7.273784 7.705483 7.244955 7.708961 7.229889 C 7.712439 7.214823 7.717614 7.19176 7.720461 7.178638 C 7.723308 7.165516 7.728016 7.143247 7.730923 7.129154 C 7.733829 7.115059 7.738621 7.090804 7.74157 7.075251 C 7.74452 7.0597 7.749294 7.033455 7.752179 7.016931 C 7.755066 7.000407 7.759431 6.974154 7.761884 6.958592 C 7.764333 6.94303 7.768123 6.917978 7.770304 6.902922 C 7.772485 6.887866 7.775877 6.86322 7.777843 6.848155 C 7.779809 6.833088 7.783001 6.807043 7.784938 6.790275 C 7.786876 6.773509 7.789651 6.74806 7.791106 6.733722 C 7.792561 6.719385 7.794953 6.693936 7.796421 6.677169 C 7.797888 6.660402 7.800071 6.632964 7.801272 6.616198 C 7.802474 6.599431 7.804076 6.575174 7.804832 6.562295 C 7.80559 6.549416 7.806592 6.532119 7.807061 6.523856 C 7.807529 6.515595 7.80835 6.421553 7.808886 6.314875 C 7.809421 6.208197 7.809724 6.003942 7.80956 5.860975 C 7.809398 5.718009 7.809015 5.600789 7.808712 5.600486 C 7.808408 5.600182 7.68663 5.63752 7.538092 5.68346 C 7.389553 5.7294 7.213946 5.783698 7.147853 5.804122 C 7.08176 5.824546 6.974794 5.857548 6.910151 5.877461 C 6.845508 5.897371 6.776261 5.918652 6.75627 5.924749 C 6.736279 5.930848 6.719744 5.935658 6.719525 5.93544 C 6.719306 5.935221 6.790938 5.857274 6.878708 5.762224 C 6.966477 5.667175 7.110461 5.511271 7.198671 5.415771 C 7.286881 5.320272 7.433807 5.161213 7.525173 5.062309 C 7.616539 4.963404 7.76605 4.801562 7.857421 4.702663 C 7.948792 4.603762 8.093983 4.446596 8.180069 4.353404 C 8.266154 4.260212 8.341831 4.178411 8.34824 4.171626 L 8.359893 4.159288 Z M 3.639928 8.15987 C 3.639606 8.15984 3.567056 8.081517 3.478708 7.985821 C 3.390359 7.890125 3.197014 7.680786 3.049051 7.520623 C 2.901089 7.36046 2.662314 7.101986 2.518441 6.946236 C 2.374568 6.790486 2.198977 6.60038 2.128238 6.523779 C 2.0575 6.447177 1.999793 6.384333 2 6.384126 C 2.000208 6.383919 2.024487 6.391125 2.053954 6.40014 C 2.083422 6.409154 2.157237 6.431839 2.217988 6.450549 C 2.278738 6.469259 2.375968 6.499262 2.434052 6.517222 C 2.492137 6.535182 2.553174 6.55407 2.569692 6.559195 C 2.586209 6.564321 2.709718 6.602509 2.844157 6.644057 C 2.978595 6.685606 3.089538 6.719839 3.090698 6.72013 C 3.092807 6.72066 3.092807 6.72066 3.092866 6.520418 C 3.092898 6.410285 3.093306 6.18985 3.093772 6.030562 C 3.094553 5.763748 3.094752 5.738617 3.096295 5.711344 C 3.097217 5.695064 3.098611 5.671603 3.099395 5.659211 C 3.100178 5.646816 3.101808 5.623754 3.103017 5.607958 C 3.104227 5.592164 3.106418 5.566515 3.107887 5.550963 C 3.109355 5.535411 3.111941 5.51036 3.113633 5.495295 C 3.115324 5.480227 3.118114 5.456767 3.119833 5.443159 C 3.121551 5.429551 3.124544 5.407283 3.126484 5.393674 C 3.128424 5.380066 3.13179 5.357599 3.133963 5.343748 C 3.136135 5.329897 3.139918 5.307034 3.142369 5.292939 C 3.144819 5.278845 3.149205 5.254788 3.152116 5.239479 C 3.155027 5.224168 3.159971 5.199397 3.163101 5.184428 C 3.16623 5.169459 3.171352 5.145801 3.174481 5.131851 C 3.17761 5.117902 3.182986 5.094759 3.18643 5.080422 C 3.189873 5.066085 3.19569 5.042824 3.199356 5.028729 C 3.203022 5.014635 3.208965 4.992367 3.212563 4.979245 C 3.21616 4.966123 3.222479 4.943855 3.226605 4.929761 C 3.230732 4.915667 3.237681 4.892604 3.242049 4.878509 C 3.246417 4.864415 3.253638 4.84175 3.258096 4.828142 C 3.262555 4.814533 3.270171 4.792067 3.275023 4.778216 C 3.279873 4.764364 3.287818 4.742096 3.292678 4.728731 C 3.297538 4.715366 3.3052 4.694689 3.309704 4.682783 C 3.31421 4.670875 3.322696 4.649137 3.328563 4.634478 C 3.33443 4.619817 3.343463 4.597748 3.348639 4.585434 C 3.353813 4.573122 3.36204 4.553902 3.36692 4.542725 C 3.371799 4.531547 3.379856 4.513454 3.384823 4.502518 C 3.389789 4.491583 3.39917 4.471303 3.405668 4.457452 C 3.412167 4.443601 3.426129 4.414971 3.436694 4.39383 C 3.44726 4.372689 3.461914 4.344058 3.469262 4.330207 C 3.476608 4.316357 3.488427 4.294487 3.495524 4.281607 C 3.502622 4.268728 3.514584 4.247454 3.522105 4.234332 C 3.529628 4.22121 3.541034 4.201699 3.547455 4.190976 C 3.553874 4.180251 3.564621 4.162556 3.571336 4.151653 C 3.578052 4.14075 3.589372 4.122683 3.596493 4.111505 C 3.603614 4.100327 3.615987 4.081241 3.623989 4.069091 C 3.631991 4.056941 3.645655 4.036661 3.654354 4.024024 C 3.663054 4.011388 3.677115 3.991314 3.685603 3.979416 C 3.694091 3.967517 3.707792 3.948628 3.716049 3.937443 C 3.724308 3.926256 3.738823 3.906999 3.748305 3.89465 C 3.757787 3.882301 3.774164 3.861424 3.784696 3.848259 C 3.795227 3.835093 3.810939 3.815771 3.81961 3.805323 C 3.828281 3.794872 3.84254 3.777973 3.851297 3.767766 C 3.860054 3.757562 3.874996 3.740475 3.884502 3.729796 C 3.894008 3.719119 3.908543 3.703013 3.916803 3.694009 C 3.925064 3.685003 3.939156 3.669882 3.94812 3.660404 C 3.957083 3.650928 3.981341 3.626241 4.002025 3.605544 C 4.02271 3.584848 4.046838 3.561157 4.055645 3.552897 C 4.064451 3.544637 4.079179 3.530951 4.088373 3.522486 C 4.097566 3.514019 4.11243 3.500508 4.121404 3.49246 C 4.130376 3.484412 4.146267 3.470493 4.156716 3.461528 C 4.167165 3.452562 4.183867 3.438437 4.19383 3.430137 C 4.203792 3.421837 4.220096 3.408491 4.230059 3.400478 C 4.240022 3.392467 4.256126 3.379735 4.265846 3.372187 C 4.275566 3.364638 4.294852 3.349997 4.308703 3.33965 C 4.322554 3.329302 4.342636 3.314602 4.353327 3.306981 C 4.364019 3.299361 4.382311 3.28654 4.393975 3.27849 C 4.405639 3.270441 4.42466 3.257609 4.436245 3.249977 C 4.447829 3.242345 4.465922 3.230637 4.476451 3.223961 C 4.486979 3.217284 4.504342 3.206445 4.515034 3.199872 C 4.525727 3.193299 4.545155 3.181674 4.558207 3.174039 C 4.571259 3.166403 4.594323 3.153273 4.609458 3.14486 C 4.624594 3.13645 4.647913 3.123799 4.661278 3.11675 C 4.674643 3.1097 4.696314 3.098564 4.709436 3.092004 C 4.722558 3.085442 4.74403 3.075004 4.757153 3.068806 C 4.770275 3.062607 4.791488 3.052789 4.804292 3.046986 C 4.817096 3.041182 4.837177 3.03234 4.848916 3.027336 C 4.860656 3.022333 4.879611 3.014428 4.89104 3.009769 C 4.902469 3.00511 4.923146 2.996942 4.93699 2.991619 C 4.950833 2.986296 4.971702 2.978476 4.983366 2.97424 C 4.99503 2.970004 5.021672 2.960841 5.042571 2.953878 C 5.063468 2.946914 5.093689 2.937231 5.109727 2.93236 C 5.125765 2.927489 5.150419 2.920288 5.164514 2.916359 C 5.178607 2.912431 5.203261 2.905885 5.219299 2.901814 C 5.235338 2.897742 5.259793 2.891805 5.273643 2.888619 C 5.287495 2.885432 5.310359 2.880417 5.324453 2.877472 C 5.338548 2.874528 5.360616 2.870155 5.373496 2.867757 C 5.386374 2.865358 5.408962 2.861403 5.42369 2.858968 C 5.438418 2.856532 5.461482 2.85295 5.474941 2.851007 C 5.488403 2.849062 5.512338 2.845885 5.528134 2.843946 C 5.543929 2.842007 5.566793 2.83942 5.578943 2.838198 C 5.591094 2.836976 5.612764 2.83499 5.627101 2.833786 C 5.641439 2.832582 5.666887 2.830797 5.683655 2.829821 C 5.700423 2.828844 5.724281 2.827635 5.736673 2.827131 C 5.749067 2.826628 5.779487 2.825963 5.804273 2.825654 C 5.831717 2.825312 5.864715 2.825499 5.888661 2.826133 C 5.910288 2.826705 5.935936 2.827562 5.945656 2.828037 C 5.955376 2.828513 5.97327 2.829513 5.98542 2.830258 C 5.99757 2.831004 6.017452 2.832401 6.029602 2.833363 C 6.041752 2.834323 6.060044 2.83592 6.07025 2.836912 C 6.080456 2.837903 6.097554 2.839693 6.108246 2.840889 C 6.118938 2.842084 6.135557 2.84406 6.145177 2.84528 C 6.154796 2.846498 6.172292 2.848883 6.184057 2.850577 C 6.195822 2.852271 6.215388 2.855248 6.227539 2.857194 C 6.239688 2.859139 6.253395 2.861429 6.257997 2.862283 C 6.266363 2.863834 6.266363 2.863834 6.249159 2.867633 C 6.239698 2.869721 6.221817 2.873796 6.209424 2.876689 C 6.197031 2.87958 6.17695 2.884501 6.1648 2.887624 C 6.152649 2.890747 6.132933 2.896087 6.120986 2.899491 C 6.109038 2.902895 6.088361 2.909066 6.075037 2.913204 C 6.061712 2.917341 6.039675 2.924465 6.026067 2.929032 C 6.012459 2.933601 5.991946 2.940756 5.980484 2.944931 C 5.969021 2.949106 5.949537 2.95646 5.937186 2.961273 C 5.924834 2.966085 5.905422 2.973896 5.894048 2.978628 C 5.882673 2.983361 5.864182 2.991314 5.852958 2.996302 C 5.841733 3.001288 5.822409 3.010091 5.810017 3.015862 C 5.797623 3.021632 5.775753 3.032209 5.761416 3.039369 C 5.747078 3.046527 5.726601 3.057027 5.715909 3.062701 C 5.705216 3.068377 5.685135 3.079366 5.671284 3.087121 C 5.657433 3.094877 5.638347 3.105814 5.628869 3.111423 C 5.619392 3.117034 5.603487 3.126609 5.593524 3.1327 C 5.58356 3.138793 5.567655 3.148746 5.558177 3.15482 C 5.5487 3.160895 5.532596 3.171429 5.522389 3.178233 C 5.512184 3.185035 5.496079 3.195978 5.486602 3.202551 C 5.477125 3.209123 5.460822 3.220655 5.450372 3.228179 C 5.439923 3.235703 5.423421 3.247832 5.413702 3.255136 C 5.403981 3.262436 5.386883 3.27556 5.375705 3.284297 C 5.364527 3.293035 5.346831 3.307168 5.336382 3.315704 C 5.325933 3.32424 5.308455 3.338784 5.297544 3.348024 C 5.286631 3.357265 5.269532 3.372169 5.259547 3.381148 C 5.249561 3.390125 5.233438 3.404821 5.223718 3.413807 C 5.213998 3.422791 5.196302 3.439351 5.184396 3.450605 C 5.172488 3.461862 5.156544 3.477188 5.148963 3.484664 C 5.141382 3.492139 5.126272 3.507414 5.115385 3.518608 C 5.104497 3.529801 5.087317 3.547848 5.077208 3.558713 C 5.067098 3.569577 5.050301 3.587983 5.039882 3.599617 C 5.029463 3.61125 5.013853 3.62899 5.005193 3.639039 C 4.996532 3.649089 4.982148 3.666059 4.973228 3.676752 C 4.964307 3.687445 4.947 3.708717 4.934769 3.724027 C 4.922537 3.739336 4.90467 3.762184 4.895064 3.774798 C 4.885458 3.787414 4.870011 3.808089 4.860735 3.820748 C 4.85146 3.833405 4.835779 3.855252 4.825891 3.869297 C 4.816002 3.883342 4.800281 3.906206 4.790956 3.920107 C 4.781631 3.934007 4.767791 3.954923 4.760201 3.966587 C 4.75261 3.978251 4.739764 3.998412 4.731654 4.01139 C 4.723545 4.024366 4.710507 4.04564 4.702682 4.058664 C 4.694856 4.071689 4.682687 4.092286 4.67564 4.104437 C 4.668592 4.116586 4.655977 4.138854 4.647606 4.15392 C 4.639235 4.168986 4.627187 4.191055 4.620833 4.202963 C 4.614478 4.214869 4.603237 4.236342 4.59585 4.250679 C 4.588463 4.265017 4.577648 4.286489 4.571816 4.298396 C 4.565984 4.310304 4.556654 4.329589 4.551082 4.341253 C 4.54551 4.352918 4.536649 4.371806 4.53139 4.383226 C 4.526132 4.394647 4.517766 4.413137 4.512801 4.424315 C 4.507834 4.435493 4.499414 4.45478 4.494091 4.467174 C 4.488767 4.479566 4.480241 4.499781 4.475145 4.512096 C 4.470048 4.524411 4.461758 4.544889 4.456721 4.557603 C 4.451684 4.570319 4.443329 4.591855 4.438153 4.605463 C 4.432978 4.619071 4.42455 4.641737 4.419425 4.65583 C 4.414299 4.669925 4.405364 4.695175 4.399567 4.711941 C 4.393771 4.72871 4.384635 4.755947 4.379265 4.772473 C 4.373896 4.788996 4.365339 4.816035 4.36025 4.83256 C 4.355162 4.849085 4.346827 4.877117 4.341728 4.894857 C 4.336629 4.912596 4.328691 4.941027 4.324087 4.958037 C 4.319483 4.975048 4.311586 5.005467 4.30654 5.025636 C 4.301492 5.045806 4.294517 5.074635 4.291039 5.0897 C 4.287562 5.104767 4.282386 5.12783 4.279539 5.140952 C 4.276692 5.154074 4.271984 5.176342 4.269077 5.190436 C 4.266171 5.20453 4.261379 5.228786 4.25843 5.244339 C 4.25548 5.259891 4.250707 5.286135 4.24782 5.302659 C 4.244935 5.319183 4.240569 5.345436 4.238118 5.360997 C 4.235666 5.37656 4.231877 5.40161 4.229696 5.416667 C 4.227515 5.431724 4.224122 5.456368 4.222157 5.471435 C 4.220191 5.486501 4.216998 5.512547 4.215061 5.529314 C 4.213124 5.546082 4.210349 5.571529 4.208893 5.585867 C 4.207439 5.600204 4.205048 5.625653 4.20358 5.642421 C 4.202112 5.659187 4.199928 5.686625 4.198727 5.703393 C 4.197526 5.720159 4.195924 5.744415 4.195167 5.757294 C 4.194409 5.770174 4.193407 5.787471 4.192938 5.795733 C 4.192471 5.803995 4.19165 5.898036 4.191115 6.004715 C 4.19058 6.111393 4.190277 6.315648 4.190439 6.458614 C 4.190602 6.601581 4.190984 6.718802 4.191288 6.719105 C 4.191591 6.719408 4.313371 6.682069 4.461908 6.636129 C 4.610447 6.590189 4.786054 6.535892 4.852147 6.515468 C 4.91824 6.495043 5.025205 6.462041 5.089849 6.442131 C 5.154491 6.422219 5.223739 6.400939 5.243729 6.39484 C 5.263721 6.388742 5.280256 6.383932 5.280475 6.38415 C 5.280694 6.384369 5.209062 6.462315 5.121291 6.557364 C 5.033521 6.652413 4.889537 6.808317 4.801327 6.903816 C 4.713117 6.999316 4.56619 7.158374 4.474826 7.25728 C 4.383461 7.356185 4.23395 7.518026 4.14258 7.616927 C 4.051209 7.715828 3.906015 7.872994 3.819926 7.966186 C 3.733837 8.059378 3.658251 8.141094 3.651957 8.147776 C 3.645663 8.154458 3.64025 8.159901 3.639928 8.15987 Z",Ht={...x,nameOffsetX:"right",nameOffsetY:"top",outOfStation:!1},Ut=[{type:"textarea",label:"panel.details.stations.common.nameZh",value:e=>(null!=e?e:Ht).names[0],onChange:(e,t)=>{const n=null!=t?t:Ht;return n.names[0]=e.toString(),n}},{type:"textarea",label:"panel.details.stations.common.nameEn",value:e=>(null!=e?e:Ht).names[1],onChange:(e,t)=>{const n=null!=t?t:Ht;return n.names[1]=e.toString(),n}},{type:"select",label:"panel.details.stations.common.nameOffsetX",value:e=>(null!=e?e:Ht).nameOffsetX,options:{left:"left",middle:"middle",right:"right"},disabledOptions:e=>"middle"===(null==e?void 0:e.nameOffsetY)?["middle"]:[],onChange:(e,t)=>{const n=null!=t?t:Ht;return n.nameOffsetX=e,n}},{type:"select",label:"panel.details.stations.common.nameOffsetY",value:e=>(null!=e?e:Ht).nameOffsetY,options:{top:"top",middle:"middle",bottom:"bottom"},disabledOptions:e=>"middle"===(null==e?void 0:e.nameOffsetX)?["middle"]:[],onChange:(e,t)=>{const n=null!=t?t:Ht;return n.nameOffsetY=e,n}},{type:"switch",label:"panel.details.stations.bjsubwayInt.outOfStation",oneLine:!0,isChecked:e=>(null!=e?e:Ht).outOfStation,onChange:(e,t)=>{const n=null!=t?t:Ht;return n.outOfStation=e,n}}],Ft={component:e=>{var t;const{id:a,x:s,y:l,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,nameOffsetX:h=Ht.nameOffsetX,nameOffsetY:f=Ht.nameOffsetY,outOfStation:p=Ht.outOfStation}=null!==(t=i[o.BjsubwayInt])&&void 0!==t?t:Ht,u=n.useCallback((e=>r(a,e)),[a,r]),g=n.useCallback((e=>d(a,e)),[a,d]),C=n.useCallback((e=>m(a,e)),[a,m]),[y,b]=(j=f,"left"===(v=h)&&"top"===j?[-5,-c[1].split("\n").length*Rt[j]-4]:"middle"===v&&"top"===j?[0,-c[1].split("\n").length*Rt[j]-7]:"right"===v&&"top"===j?[5,-c[1].split("\n").length*Rt[j]-4]:"left"===v&&"bottom"===j?[-5,c[0].split("\n").length*Rt[j]+4]:"middle"===v&&"bottom"===j?[0,c[0].split("\n").length*Rt[j]+7]:"right"===v&&"bottom"===j?[5,c[0].split("\n").length*Rt[j]+4]:"left"===v&&"middle"===j?[-8,0]:"right"===v&&"middle"===j?[8,0]:[0,0]);var v,j;const w="left"===h?"end":"right"===h?"start":"middle";return T.jsxs("g",{id:a,children:[T.jsxs("g",{transform:`translate(${s-6}, ${l-6})`,children:[T.jsx("circle",{cx:"6",cy:"6",r:"6",stroke:"black",strokeWidth:"1",fill:"white"}),T.jsx("path",{d:It,fill:p?"#898989":"black",stroke:p?"#898989":"black",strokeWidth:"0.533618",strokeLinecap:"round",strokeLinejoin:"round"}),T.jsx("circle",{id:`stn_core_${a}`,cx:"6",cy:"6",r:"6",stroke:"black",strokeWidth:"1",strokeOpacity:"0",fill:"white",fillOpacity:"0",onPointerDown:u,onPointerMove:g,onPointerUp:C,style:{cursor:"move"}})]}),T.jsxs("g",{transform:`translate(${s+y}, ${l+b})`,textAnchor:w,children:[T.jsx(xe,{text:c[0].split("\n"),fontSize:Rt.zh,lineHeight:Rt.zh,grow:"up",className:"rmp-name__zh",baseOffset:1}),T.jsx(xe,{text:c[1].split("\n"),fontSize:Rt.en,lineHeight:Rt.en,grow:"down",className:"rmp-name__en",baseOffset:1})]})]})},icon:T.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:T.jsxs("g",{transform:"translate(6, 6)",children:[T.jsx("circle",{cx:"6",cy:"6",r:"6",stroke:"black",strokeWidth:"1",fill:"white"}),T.jsx("path",{d:It,stroke:"black",strokeWidth:"0.533618",strokeLinecap:"round",strokeLinejoin:"round"})]})}),defaultAttrs:Ht,attrsComponent:()=>T.jsx(S,{fields:Ut}),metadata:{displayName:"panel.details.stations.bjsubwayInt.displayName",cities:[d.Beijing],canvas:[u.RailMap],categories:[g.Metro],tags:["interchange"]}};function Vt(e){const{interchangeList:t,onAdd:s,onDelete:o,onUpdate:i}=e,r=C(),{paletteAppClip:{output:c}}=y((e=>e.runtime)),{t:h}=a(),[f,p]=n.useState();n.useEffect((()=>{void 0!==f&&c&&(null==i||i(f,[...c,t[f][4],t[f][5]]),p(void 0))}),[null==c?void 0:c.toString()]);const u=t.map(((e,t)=>[{type:"input",label:h("panel.details.stations.common.lineCode"),value:e[4],minW:"80px",onChange:n=>null==i?void 0:i(t,[e[0],e[1],e[2],e[3],n,e[5]])},{type:"input",label:h("panel.details.stations.common.stationCode"),value:e[5],minW:"80px",onChange:n=>null==i?void 0:i(t,[e[0],e[1],e[2],e[3],e[4],n])}]));return T.jsxs(b,{direction:"column",children:[0===t.length&&T.jsxs(L,{spacing:.5,"data-testid":"interchange-card-stack",children:[T.jsx(D,{as:"i",flex:1,align:"center",fontSize:"md",colorScheme:"gray",children:h("panel.details.stations.interchange.noInterchanges")}),T.jsx(I,{size:"sm",variant:"ghost","aria-label":h("panel.details.stations.interchange.add"),onClick:()=>null==s?void 0:s([d.Shanghai,"","#aaaaaa",m.white,"",""]),icon:T.jsx(v,{})})]}),t.map(((e,n)=>T.jsxs(L,{spacing:.5,"data-testid":`interchange-card-stack-${n}`,children:[T.jsx(j,{label:h("color"),minW:"40px",noLabel:0!==n,children:T.jsx(w,{theme:[e[0],e[1],e[2],e[3]],onClick:()=>{p(n),r(O([e[0],e[1],e[2],e[3]]))}})}),T.jsx(l,{fields:u[n],noLabel:0!==n}),s&&n===u.length-1?T.jsx(I,{size:"sm",variant:"ghost","aria-label":h("panel.details.stations.interchange.copy"),onClick:()=>null==s?void 0:s(t.slice(-1)[0]),icon:T.jsx(_,{})}):T.jsx(U,{minW:8}),o&&T.jsx(I,{size:"sm",variant:"ghost","aria-label":h("panel.details.stations.interchange.remove"),onClick:()=>null==o?void 0:o(n),icon:T.jsx(k,{})})]},n)))]})}const Gt=e=>{var t;const{stationType:s,defaultAttrs:l,maximumTransfers:o}=e,{t:i}=a(),r=C(),c=n.useCallback((()=>{r(N()),r(z(p.current.export()))}),[r,N,z]),{selected:h}=y((e=>e.runtime)),[f]=h,p=n.useRef(window.graph),u=f&&p.current.hasNode(f)&&p.current.getNodeAttribute(f,"type")===s?p.current.getNodeAttribute(f,s):l,g=null!==(t=u.transfer)&&void 0!==t?t:l.transfer,x=e=>t=>{const n=structuredClone(g);if(n.length<=e)for(let a=n.length;a<=e;a++)n[a]=[];n[e].push(t),u.transfer=n,p.current.mergeNodeAttributes(f,{[s]:u}),c()},b=e=>(t,n)=>{if(g.length>e&&g[e].length>t){const a=g.map(((a,s)=>s===e?a.map(((e,a)=>a===t?[0,1,2,3,4,5].map((t=>void 0===n[t]?e[t]:n[t])):e)):a));u.transfer=a,p.current.mergeNodeAttributes(f,{[s]:u}),c()}};return T.jsxs(H,{align:"flex-start",children:[u.transfer.map(((e,t)=>{return T.jsxs(n.Fragment,{children:[T.jsx(V,{size:"xs",children:i(0===t?"panel.details.stations.interchange.within":1===t?"panel.details.stations.interchange.outStation":"panel.details.stations.interchange.outSystem")}),T.jsx(Vt,{interchangeList:e,onAdd:o[t]>e.length?x(t):void 0,onDelete:(a=t,e=>{if(g.length>a&&g[a].length>e){const t=g.map(((t,n)=>n===a?t.filter(((t,n)=>n!==e)):t));u.transfer=t,p.current.mergeNodeAttributes(f,{[s]:u}),c()}}),onUpdate:b(t)})]},t);var a})),o[u.transfer.length]>0&&T.jsx(G,{size:"xs",variant:"ghost",alignSelf:"flex-end",leftIcon:T.jsx(v,{}),onClick:()=>x(u.transfer.length)([d.Guangzhou,"","#AAAAAA",m.white,"",""]),children:i("panel.details.stations.interchange.addGroup")})]})},Zt={top:8.5,middle:0,bottom:11},Qt={names:["車站","Stn"],nameOffsetX:"right",nameOffsetY:"top",rotate:0,transfer:[[]]},qt=[{type:"textarea",label:"panel.details.stations.common.nameZh",value:e=>(null!=e?e:Qt).names[0],onChange:(e,t)=>{const n=null!=t?t:Qt;return n.names[0]=e.toString(),n}},{type:"textarea",label:"panel.details.stations.common.nameEn",value:e=>(null!=e?e:Qt).names[1],onChange:(e,t)=>{const n=null!=t?t:Qt;return n.names[1]=e.toString(),n}},{type:"select",label:"panel.details.stations.common.nameOffsetX",value:e=>(null!=e?e:Qt).nameOffsetX,options:{left:"left",middle:"middle",right:"right"},disabledOptions:e=>"middle"===(null==e?void 0:e.nameOffsetY)?["middle"]:[],onChange:(e,t)=>{const n=null!=t?t:Qt;return n.nameOffsetX=e,n}},{type:"select",label:"panel.details.stations.common.nameOffsetY",value:e=>(null!=e?e:Qt).nameOffsetY,options:{top:"top",middle:"middle",bottom:"bottom"},disabledOptions:e=>"middle"===(null==e?void 0:e.nameOffsetX)?["middle"]:[],onChange:(e,t)=>{const n=null!=t?t:Qt;return n.nameOffsetY=e,n}},{type:"select",label:"panel.details.stations.common.rotate",value:e=>{var t;return null!==(t=null==e?void 0:e.rotate)&&void 0!==t?t:Qt.rotate},hidden:e=>{var t,n;return 0===(null!==(t=null==e||null===(n=e.transfer)||void 0===n||null===(n=n.flat())||void 0===n?void 0:n.length)&&void 0!==t?t:0)},options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:(e,t)=>{const n=null!=t?t:Qt;return n.rotate=Number(e),n}},{type:"custom",label:"panel.details.stations.interchange.title",component:T.jsx(Gt,{stationType:o.MTR,defaultAttrs:Qt,maximumTransfers:[99,0,0]})}],Jt={component:e=>{var t;const{id:a,x:s,y:l,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,nameOffsetX:h=Qt.nameOffsetX,nameOffsetY:f=Qt.nameOffsetY,transfer:p=Qt.transfer,rotate:u=Qt.rotate}=null!==(t=i[o.MTR])&&void 0!==t?t:Qt,g=n.useCallback((e=>r(a,e)),[a,r]),C=n.useCallback((e=>d(a,e)),[a,d]),y=n.useCallback((e=>m(a,e)),[a,m]),b=p.at(0),v=((e,t=5,n=[])=>{const a=Math.sqrt(e*e-t*t/4),s=n.length<2?n.length+1:n.length;let l=`M ${-e},0 A ${e},${e},0,0,1,${-t/2},-${a} `;for(let o=0;o=0;o-=1)l+=`A ${e},${e},0,0,1,${o*t-t/2},${a} `;return l+=`A ${e},${e},0,0,1,${-e},0 Z`,l})(5,5,b),j=0===b.length?0:b.length<=2?1:b.length-1,w=Math.cos(u*Math.PI/180)*j*5,O=Math.sin(u*Math.PI/180)*j*5,_="left"===h?-8:"right"===h?8:0,k=Math.sign(w)===Math.sign(_)?w+_:_,S=(c[Ce[f].namesPos].split("\n").length*Zt[f]+6)*Ce[f].polarity,N=Math.sign(O)===Math.sign(S)?O+S:S,z="left"===h?"end":"right"===h?"start":"middle";return n.useMemo((()=>T.jsxs("g",{id:a,transform:`translate(${s}, ${l})`,children:[T.jsx("path",{transform:`rotate(${u})`,d:v,stroke:"#001f50",strokeWidth:"1.5",fill:"white",onPointerDown:g,onPointerMove:C,onPointerUp:y,style:{cursor:"move"}}),p.at(0).length>1&&p.at(0).map((e=>e[2])).map(((e,t)=>T.jsx("line",{transform:`rotate(${u})`,x1:5*t-2.5,x2:2.5+5*t,stroke:e,strokeWidth:"2"},`${t}_${e}`))),T.jsx("path",{id:`stn_core_${a}`,transform:`rotate(${u})`,d:v,fill:"white",fillOpacity:"0",onPointerDown:g,onPointerMove:C,onPointerUp:y,style:{cursor:"move"}}),T.jsxs("g",{transform:`translate(${k}, ${N})`,textAnchor:z,className:"rmp-name-outline",strokeWidth:"1.25",children:[T.jsx(xe,{text:c[0].split("\n"),fontSize:10,lineHeight:10,grow:"up",baseOffset:1,fill:"#001f50",className:"rmp-name__mtr__zh"}),T.jsx(xe,{text:c[1].split("\n"),fontSize:7.5,lineHeight:7.5,grow:"down",baseOffset:1,fill:"#001f50",className:"rmp-name__mtr__en"})]})]})),[a,s,l,...c,u,JSON.stringify(p),h,f,g,C,y])},icon:T.jsx("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:T.jsx("circle",{cx:"12",cy:"12",r:"5",stroke:"currentColor",strokeWidth:"1.5",fill:"none"})}),defaultAttrs:Qt,attrsComponent:()=>T.jsx(S,{fields:qt}),metadata:{displayName:"panel.details.stations.mtr.displayName",cities:[d.Hongkong],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},Kt=n.forwardRef(((e,t)=>{const{text:n,lineWidth:a,grow:s,dominantBaseline:l=("left"===s?"hanging":"right"===s?"auto":"central"),baseOffset:o=2,baseDY:i=0,...r}=e,d="bidirectional"===s?-(n.length-1)*a/2:0;return T.jsx("g",{ref:t,children:[...n].reverse().map(((e,t,n)=>T.jsx("text",{x:(t*a+o)*("left"===s?-1:1)+d,dy:(t-(n.length-1)/2)*i,writingMode:"vertical-rl",dominantBaseline:l,...r,children:e},`${e}${t}`)))})}));Kt.displayName="MultilineTextVertical";const en={size:10,baseOffset:1},tn={size:5,baseOffset:1.5},nn={top:{lineHeight:5,offset:1+tn.baseOffset+2.5,polarity:-1},middle:{lineHeight:0,offset:en.size/2,polarity:1},bottom:{lineHeight:10,offset:0+en.baseOffset+2.5,polarity:1}},an={...x,color:[d.Suzhou,"sz1","#78BA25",m.white],nameOffsetX:"right",nameOffsetY:"top",textVertical:!1},sn={component:e=>{var t;const{id:a,x:s,y:l,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,color:h=an.color,nameOffsetX:f=an.nameOffsetX,nameOffsetY:p=an.nameOffsetY,textVertical:u=an.textVertical}=null!==(t=i[o.SuzhouRTBasic])&&void 0!==t?t:an,g=n.useCallback((e=>r(a,e)),[a,r]),C=n.useCallback((e=>d(a,e)),[a,d]),y=n.useCallback((e=>m(a,e)),[a,m]),b="left"===f?-5:"right"===f?5:0,v=(c[Ce[p].namesPos].split("\n").length*nn[p].lineHeight+nn[p].offset)*nn[p].polarity,j="left"===f?"end":"right"===f?"start":"middle",w="top"===p?-4.5:4.5,O="top"===p?"end":"start",_=c[0].split("\n").length*en.size/2+tn.baseOffset;return T.jsxs("g",{id:a,transform:`translate(${s}, ${l})`,children:[T.jsx("circle",{id:`stn_core_${a}`,r:3,stroke:h[2],strokeWidth:"1",fill:"white",onPointerDown:g,onPointerMove:C,onPointerUp:y,style:{cursor:"move"}}),u?T.jsxs(T.Fragment,{children:[T.jsx("g",{transform:`translate(-1, ${w})`,textAnchor:O,children:T.jsx(Kt,{text:c[0].split("\n"),fontSize:en.size,lineWidth:en.size,grow:"bidirectional",baseOffset:en.baseOffset,dominantBaseline:"central",className:"rmp-name__zh"})}),T.jsx("g",{transform:`translate(${_}, ${w})rotate(90)`,textAnchor:O,children:T.jsx(xe,{text:c[1].split("\n"),fontSize:tn.size,lineHeight:tn.size,grow:"up",baseOffset:tn.baseOffset,className:"rmp-name__en",dominantBaseline:"central",fill:"gray"})})]}):T.jsxs("g",{transform:`translate(${b}, ${v})`,textAnchor:j,children:[T.jsx(xe,{text:c[0].split("\n"),fontSize:en.size,lineHeight:en.size,grow:"up",baseOffset:en.baseOffset,className:"rmp-name__zh"}),T.jsx(xe,{text:c[1].split("\n"),fontSize:tn.size,lineHeight:tn.size,grow:"down",baseOffset:tn.baseOffset,className:"rmp-name__en",fill:"gray"})]})]})},icon:T.jsx("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:T.jsx("circle",{cx:"12",cy:"12",r:"3",stroke:"currentColor",fill:"none"})}),defaultAttrs:an,attrsComponent:e=>{var t,n,s;const{id:i,attrs:r,handleAttrsUpdate:d}=e,{t:m}=a(),h=[{type:"textarea",label:m("panel.details.stations.common.nameZh"),value:r.names[0],onChange:e=>{r.names[0]=e,d(i,r)},minW:"full"},{type:"textarea",label:m("panel.details.stations.common.nameEn"),value:r.names[1],onChange:e=>{r.names[1]=e,d(i,r)},minW:"full"},{type:"select",label:m("panel.details.stations.common.nameOffsetX"),value:null!==(t=r.nameOffsetX)&&void 0!==t?t:an.nameOffsetX,options:{left:m("panel.details.stations.common.left"),middle:m("panel.details.stations.common.middle"),right:m("panel.details.stations.common.right")},disabledOptions:"middle"===r.nameOffsetY?["middle"]:[],onChange:e=>{r.nameOffsetX=e,"middle"!==r.nameOffsetX&&(r.textVertical=!1),d(i,r)},minW:"full"},{type:"select",label:m("panel.details.stations.common.nameOffsetY"),value:null!==(n=r.nameOffsetY)&&void 0!==n?n:an.nameOffsetY,options:{top:m("panel.details.stations.common.top"),middle:m("panel.details.stations.common.middle"),bottom:m("panel.details.stations.common.bottom")},disabledOptions:"middle"===r.nameOffsetX?["middle"]:[],onChange:e=>{r.nameOffsetY=e,"middle"===r.nameOffsetY&&(r.textVertical=!1),d(i,r)},minW:"full"},{type:"switch",label:m("panel.details.stations.suzhouRTBasic.textVertical"),isChecked:null!==(s=r.textVertical)&&void 0!==s?s:an.textVertical,isDisabled:"middle"===r.nameOffsetY||"middle"!==r.nameOffsetX,onChange:e=>{r.textVertical=e,d(i,r)},oneLine:!0,minW:"full"},{type:"custom",label:m("color"),component:T.jsx(c,{type:o.SuzhouRTBasic,defaultTheme:an.color})}];return T.jsx(l,{fields:h})},metadata:{displayName:"panel.details.stations.suzhouRTBasic.displayName",cities:[d.Suzhou],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},ln={size:10,baseOffset:1},on={size:5,baseOffset:1.5},rn={top:{lineHeight:on.size,offset:0+on.baseOffset+3,polarity:-1},middle:{lineHeight:0,offset:ln.size/2,polarity:1},bottom:{lineHeight:ln.size,offset:0+ln.baseOffset+3,polarity:1}},dn={...x,nameOffsetX:"right",nameOffsetY:"top",rotate:0,transfer:[[[d.Suzhou,"sz1","#78BA25",m.white,"",""],[d.Suzhou,"sz2","#ED3240",m.white,"",""]]]},mn={component:e=>{var t,a;const{id:s,x:l,y:i,attrs:r,handlePointerDown:d,handlePointerMove:m,handlePointerUp:c}=e,{names:h=x.names,nameOffsetX:f=dn.nameOffsetX,nameOffsetY:p=dn.nameOffsetY,rotate:u=dn.rotate,transfer:g=dn.transfer}=null!==(t=r[o.SuzhouRTInt])&&void 0!==t?t:dn,C=n.useCallback((e=>d(s,e)),[s,d]),y=n.useCallback((e=>m(s,e)),[s,m]),b=n.useCallback((e=>c(s,e)),[s,c]),v=5*g.at(0).length+1,j=Math.abs(Math.cos(u*Math.PI/180)*v),w=Math.abs(Math.sin(u*Math.PI/180)*v),O=(j/2+5)*("left"===f?-1:"right"===f?1:0),_=(h[Ce[p].namesPos].split("\n").length*rn[p].lineHeight+rn[p].offset+("middle"===p?0:w/2))*rn[p].polarity,k="left"===f?"end":"right"===f?"start":"middle";return T.jsxs("g",{id:s,transform:`translate(${l}, ${i})`,children:[T.jsxs("g",{transform:`rotate(${u})`,onPointerDown:C,onPointerMove:y,onPointerUp:b,style:{cursor:"move"},children:[T.jsx("rect",{x:-v/2,y:-3,width:v,height:6,ry:3,stroke:"#616161",strokeWidth:"1",fill:"white"}),(null!==(a=g.at(0))&&void 0!==a?a:[]).length>0&&g.at(0).map((e=>e[2])).map(((e,t)=>T.jsx("circle",{r:2,cx:-v/2+3+5*t,fill:e},`${t}_${e}`))),T.jsx("rect",{id:`stn_core_${s}`,x:-v/2-.5,y:-3.5,width:v+1,height:7,ry:3,fill:"white",opacity:"0"})]}),T.jsxs("g",{transform:`translate(${O}, ${_})`,textAnchor:k,children:[T.jsx(xe,{text:h[0].split("\n"),fontSize:ln.size,lineHeight:ln.size,grow:"up",baseOffset:ln.baseOffset,className:"rmp-name__zh"}),T.jsx(xe,{text:h[1].split("\n"),fontSize:on.size,lineHeight:on.size,grow:"down",baseOffset:on.baseOffset,className:"rmp-name__en",fill:"gray"})]})]})},icon:T.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[T.jsx("rect",{x:"6",y:"9",width:"12",height:"6",ry:"3",stroke:"currentColor",fill:"none"}),T.jsx("circle",{r:"2",cx:"9.5",cy:"12",fill:"currentColor"}),T.jsx("circle",{r:"2",cx:"14.5",cy:"12",fill:"currentColor"})]}),defaultAttrs:dn,attrsComponent:e=>{var t,n,s,i,r;const{id:d,attrs:m,handleAttrsUpdate:c}=e,{t:h}=a(),f=[{type:"textarea",label:h("panel.details.stations.common.nameZh"),value:m.names[0],onChange:e=>{m.names[0]=e,c(d,m)},minW:"full"},{type:"textarea",label:h("panel.details.stations.common.nameEn"),value:m.names[1],onChange:e=>{m.names[1]=e,c(d,m)},minW:"full"},{type:"select",label:h("panel.details.stations.common.nameOffsetX"),value:null!==(t=m.nameOffsetX)&&void 0!==t?t:dn.nameOffsetX,options:{left:h("panel.details.stations.common.left"),middle:h("panel.details.stations.common.middle"),right:h("panel.details.stations.common.right")},disabledOptions:"middle"===m.nameOffsetY?["middle"]:[],onChange:e=>{m.nameOffsetX=e,c(d,m)},minW:"full"},{type:"select",label:h("panel.details.stations.common.nameOffsetY"),value:null!==(n=m.nameOffsetY)&&void 0!==n?n:dn.nameOffsetY,options:{top:h("panel.details.stations.common.top"),middle:h("panel.details.stations.common.middle"),bottom:h("panel.details.stations.common.bottom")},disabledOptions:"middle"===m.nameOffsetX?["middle"]:[],onChange:e=>{m.nameOffsetY=e,c(d,m)},minW:"full"},{type:"select",label:h("panel.details.stations.common.rotate"),value:null!==(s=m.rotate)&&void 0!==s?s:dn.rotate,hidden:0===(null!==(i=null==m||null===(r=m.transfer)||void 0===r||null===(r=r.flat())||void 0===r?void 0:r.length)&&void 0!==i?i:0),options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:e=>{m.rotate=Number(e),c(d,m)},minW:"full"},{type:"custom",label:h("panel.details.stations.interchange.title"),component:T.jsx(Gt,{stationType:o.SuzhouRTInt,defaultAttrs:dn,maximumTransfers:[99,0,0]})}];return T.jsx(l,{fields:f})},metadata:{displayName:"panel.details.stations.suzhouRTInt.displayName",cities:[d.Suzhou],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},cn={top:{lineHeight:6.67,offset:10},middle:{lineHeight:0,offset:0},bottom:{lineHeight:12.67,offset:5.83}},hn={...x,nameOffsetX:"right",nameOffsetY:"top",color:[d.Kunming,"km1","#ea3222",m.white]},fn={component:e=>{var t;const{id:a,x:s,y:l,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,nameOffsetX:h=hn.nameOffsetX,nameOffsetY:f=hn.nameOffsetY,color:p=hn.color}=null!==(t=i[o.KunmingRTBasic])&&void 0!==t?t:hn,u=n.useCallback((e=>r(a,e)),[a,r]),g=n.useCallback((e=>d(a,e)),[a,d]),C=n.useCallback((e=>m(a,e)),[a,m]),y="left"===h?-13.33:"right"===h?13.33:0,b=(c[Ce[f].namesPos].split("\n").length*cn[f].lineHeight+cn[f].offset)*Ce[f].polarity,v="left"===h?"end":"right"===h?"start":"middle";return n.useMemo((()=>T.jsxs("g",{id:a,transform:`translate(${s}, ${l})`,onPointerDown:u,onPointerMove:g,onPointerUp:C,style:{cursor:"move"},children:[T.jsx("circle",{id:`stn_core_${a}`,r:"5",stroke:p[2],strokeWidth:"1.33",fill:"white"}),T.jsxs("g",{transform:`translate(${y}, ${b})`,textAnchor:v,className:"rmp-name-outline",strokeWidth:"2.5",children:[T.jsx(xe,{text:c[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),T.jsx(xe,{text:c[1].split("\n"),dx:"right"===h?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]})),[a,s,l,...c,h,f,p,u,g,C])},icon:T.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:T.jsx("circle",{r:"5",cx:"12",cy:"12",stroke:"currentColor",strokeWidth:"1.33",fill:"none"})}),defaultAttrs:hn,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:s}=e,{t:i}=a(),r=[{type:"textarea",label:i("panel.details.stations.common.nameZh"),value:n.names[0],onChange:e=>{n.names[0]=e,s(t,n)},minW:"full"},{type:"textarea",label:i("panel.details.stations.common.nameEn"),value:n.names[1],onChange:e=>{n.names[1]=e,s(t,n)},minW:"full"},{type:"select",label:i("panel.details.stations.common.nameOffsetX"),value:n.nameOffsetX,options:{left:i("panel.details.stations.common.left"),middle:i("panel.details.stations.common.middle"),right:i("panel.details.stations.common.right")},disabledOptions:"middle"===n.nameOffsetY?["middle"]:[],onChange:e=>{n.nameOffsetX=e,s(t,n)},minW:"full"},{type:"select",label:i("panel.details.stations.common.nameOffsetY"),value:n.nameOffsetY,options:{top:i("panel.details.stations.common.top"),middle:i("panel.details.stations.common.middle"),bottom:i("panel.details.stations.common.bottom")},disabledOptions:"middle"===n.nameOffsetX?["middle"]:[],onChange:e=>{n.nameOffsetY=e,s(t,n)},minW:"full"},{type:"custom",label:i("color"),component:T.jsx(c,{type:o.KunmingRTBasic,defaultTheme:hn.color})}];return T.jsx(l,{fields:r})},metadata:{displayName:"panel.details.stations.kunmingRTBasic.displayName",cities:[d.Kunming],canvas:[u.RailMap],categories:[g.Metro],tags:["interchange"]}},[pn,un]=[15,9],gn={top:{lineHeight:6.67,offset:5},middle:{lineHeight:0,offset:0},bottom:{lineHeight:12.67,offset:.83}},xn={...x,nameOffsetX:"right",nameOffsetY:"top",rotate:0,transfer:[[[d.Kunming,"km1","#ea3222",m.white,"",""],[d.Kunming,"km2","#03619e",m.white,"",""],[d.Kunming,"km3","#a13187",m.white,"",""]]]},Cn={component:e=>{var t,a,s,l,i;const{id:r,x:d,y:m,attrs:c,handlePointerDown:h,handlePointerMove:f,handlePointerUp:p}=e,{names:u=x.names,nameOffsetX:g=xn.nameOffsetX,nameOffsetY:C=xn.nameOffsetY,rotate:y=xn.rotate,transfer:b=xn.transfer}=null!==(t=c[o.KunmingRTInt])&&void 0!==t?t:xn,v=n.useCallback((e=>h(r,e)),[r,h]),j=n.useCallback((e=>f(r,e)),[r,f]),w=n.useCallback((e=>p(r,e)),[r,p]),O=0===y||180===y?pn:90===y||270===y?un:pn*Math.SQRT1_2,_=0===y||180===y?un:90===y||270===y?pn:pn*Math.SQRT1_2,k="left"===g?-6.83:"right"===g?6.83:0,S=(Math.abs(k)+O/2)*Math.sign(k),N=(u[Ce[C].namesPos].split("\n").length*gn[C].lineHeight+gn[C].offset)*Ce[C].polarity,z=(Math.abs(N)+_/2)*Math.sign(N),M="left"===g?"end":"right"===g?"start":"middle";return T.jsxs("g",{id:r,children:[T.jsx("g",{transform:`translate(${d}, ${m})rotate(${y})`,onPointerDown:v,onPointerMove:j,onPointerUp:w,style:{cursor:"move"},children:b.at(0).length<=2?T.jsxs("g",{transform:"translate(-7.5,-4.5)",children:[T.jsx("rect",{id:`stn_core_${r}`,height:"9",width:"15",ry:"4",stroke:"#393332",strokeWidth:"1",fill:"white"}),T.jsx("path",{fill:null!==(a=null===(s=b.at(0).at(0))||void 0===s?void 0:s.at(2))&&void 0!==a?a:"#ea3222",fillRule:"evenodd",stroke:"none",d:"M 3.833333 6.375 C 2.820813 6.375 2 5.535532 2 4.5 C 2 3.464468 2.820813 2.625 3.833333 2.625 L 4.444445 2.625 L 4.444445 2 L 6.888889 2.9375 L 4.444445 3.875 L 4.444445 3.25 L 3.833333 3.25 C 3.158321 3.25 2.611111 3.809647 2.611111 4.5 C 2.611111 5.190353 3.158321 5.75 3.833333 5.75 L 7.5 5.75 L 7.5 6.375 L 3.833333 6.375 Z"}),T.jsx("path",{fill:null!==(l=null===(i=b.at(0).at(1))||void 0===i?void 0:i.at(2))&&void 0!==l?l:"#03619e",fillRule:"evenodd",stroke:"none",d:"M 11.166667 2.625 C 12.179187 2.625 13 3.464468 13 4.5 C 13 5.535532 12.179187 6.375 11.166667 6.375 L 10.555555 6.375 L 10.555555 7 L 8.111111 6.0625 L 10.555555 5.125 L 10.555555 5.75 L 11.166667 5.75 C 11.841679 5.75 12.388889 5.190353 12.388889 4.5 C 12.388889 3.809647 11.841679 3.25 11.166667 3.25 L 7.5 3.25 L 7.5 2.625 L 11.166667 2.625 Z"})]}):T.jsxs("g",{transform:"translate(-8.5,-8.5)",children:[T.jsx("circle",{id:`stn_core_${r}`,r:"8.5",cx:"8.5",cy:"8.5",stroke:"#000000",strokeWidth:"1",fill:"white"}),T.jsx("path",{fill:b.at(0).at(0).at(2),fillRule:"evenodd",stroke:"none",d:"M 8.900812 14 L 10.286572 11.992442 L 10.63521 12.569632 C 12.188999 11.790696 13.24999 10.23524 13.24999 8.441039 C 13.24999 8.070708 13.203481 7.710487 13.118152 7.365112 L 13.887206 7.365112 C 13.960998 7.712721 14 8.072591 14 8.441039 C 14 10.500518 12.789013 12.288074 11.01168 13.191653 L 11.411587 13.855702 L 8.900812 14 Z"}),T.jsx("path",{fill:b.at(0).at(1).at(2),fillRule:"evenodd",stroke:"none",d:"M 8 13.974609 C 5.462755 13.73554 3.426537 11.698185 3.0625 9.090137 L 2.5 9.090137 L 3.5 7 L 4.5 9.090137 L 4.074219 9.090137 C 4.422903 11.120208 6.015293 12.696354 8 12.925459 L 8 13.974609 Z"}),T.jsx("path",{fill:b.at(0).at(2).at(2),fillRule:"evenodd",stroke:"none",d:"M 12.68764 6.50351 L 10.588492 5.178213 L 11.35608 4.753726 C 10.531951 4.143034 9.498575 3.778666 8.375084 3.778666 C 6.644794 3.778666 5.125485 4.640751 4.260284 5.940329 L 3.718284 5.421978 C 4.730131 3.997121 6.438381 3.061381 8.375084 3.061381 C 9.781034 3.061381 11.063435 3.556896 12.04896 4.372667 L 12.536759 4.102285 L 12.68764 6.50351 Z"})]})}),T.jsxs("g",{transform:`translate(${d+S}, ${m+z})`,textAnchor:M,className:"rmp-name-outline",strokeWidth:"2.5",children:[T.jsx(xe,{text:u[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),T.jsx(xe,{text:u[1].split("\n"),dx:"right"===g?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]})},icon:T.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:T.jsxs("g",{transform:"translate(3.5, 3.5)",children:[T.jsx("circle",{r:"8.5",cx:"8.5",cy:"8.5",stroke:"currentColor",strokeWidth:"1",fill:"none"}),T.jsx("path",{fill:"currentColor",fillRule:"evenodd",stroke:"none",d:"M 8.900812 14 L 10.286572 11.992442 L 10.63521 12.569632 C 12.188999 11.790696 13.24999 10.23524 13.24999 8.441039 C 13.24999 8.070708 13.203481 7.710487 13.118152 7.365112 L 13.887206 7.365112 C 13.960998 7.712721 14 8.072591 14 8.441039 C 14 10.500518 12.789013 12.288074 11.01168 13.191653 L 11.411587 13.855702 L 8.900812 14 Z"}),T.jsx("path",{fill:"currentColor",fillRule:"evenodd",stroke:"none",d:"M 8 13.974609 C 5.462755 13.73554 3.426537 11.698185 3.0625 9.090137 L 2.5 9.090137 L 3.5 7 L 4.5 9.090137 L 4.074219 9.090137 C 4.422903 11.120208 6.015293 12.696354 8 12.925459 L 8 13.974609 Z"}),T.jsx("path",{fill:"currentColor",fillRule:"evenodd",stroke:"none",d:"M 12.68764 6.50351 L 10.588492 5.178213 L 11.35608 4.753726 C 10.531951 4.143034 9.498575 3.778666 8.375084 3.778666 C 6.644794 3.778666 5.125485 4.640751 4.260284 5.940329 L 3.718284 5.421978 C 4.730131 3.997121 6.438381 3.061381 8.375084 3.061381 C 9.781034 3.061381 11.063435 3.556896 12.04896 4.372667 L 12.536759 4.102285 L 12.68764 6.50351 Z"})]})}),defaultAttrs:xn,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:s}=e,{t:i}=a(),r=[{type:"textarea",label:i("panel.details.stations.common.nameZh"),value:n.names[0],onChange:e=>{n.names[0]=e,s(t,n)},minW:"full"},{type:"textarea",label:i("panel.details.stations.common.nameEn"),value:n.names[1],onChange:e=>{n.names[1]=e,s(t,n)},minW:"full"},{type:"select",label:i("panel.details.stations.common.nameOffsetX"),value:n.nameOffsetX,options:{left:i("panel.details.stations.common.left"),middle:i("panel.details.stations.common.middle"),right:i("panel.details.stations.common.right")},disabledOptions:"middle"===n.nameOffsetY?["middle"]:[],onChange:e=>{n.nameOffsetX=e,s(t,n)},minW:"full"},{type:"select",label:i("panel.details.stations.common.nameOffsetY"),value:n.nameOffsetY,options:{top:i("panel.details.stations.common.top"),middle:i("panel.details.stations.common.middle"),bottom:i("panel.details.stations.common.bottom")},disabledOptions:"middle"===n.nameOffsetX?["middle"]:[],onChange:e=>{n.nameOffsetY=e,s(t,n)},minW:"full"},{type:"select",label:i("panel.details.stations.common.rotate"),value:n.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:e=>{n.rotate=Number(e),s(t,n)},minW:"full"},{type:"custom",label:i("panel.details.stations.interchange.title"),component:T.jsx(Gt,{stationType:o.KunmingRTInt,defaultAttrs:xn,maximumTransfers:[3,0,0]})}];return T.jsx(l,{fields:r})},metadata:{displayName:"panel.details.stations.kunmingRTInt.displayName",cities:[d.Kunming],canvas:[u.RailMap],categories:[g.Metro],tags:["interchange"]}},yn=8.2628,bn={top:{offset:8.2628,polarity:-1},middle:{offset:0,polarity:0},bottom:{offset:8.2628,polarity:1}},vn={names:["Marina South Pier"],nameOffsetX:"right",nameOffsetY:"top",lineCode:"NS",stationCode:"28",isTram:!1,color:[d.Singapore,"nsl","#DA291C",m.white]},jn={component:e=>{var t;const{id:a,x:s,y:l,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,nameOffsetX:h=vn.nameOffsetX,nameOffsetY:f=vn.nameOffsetY,color:p=vn.color,lineCode:u=vn.lineCode,stationCode:g=vn.stationCode,isTram:C=vn.isTram}=null!==(t=i[o.MRTBasic])&&void 0!==t?t:vn,y=n.useCallback((e=>r(a,e)),[a,r]),b=n.useCallback((e=>d(a,e)),[a,d]),v=n.useCallback((e=>m(a,e)),[a,m]),j=22.85,w=12.935,O=16.425*("left"===h?-1:"right"===h?1:0),_=bn[f].offset*bn[f].polarity,k="left"===h?"end":"right"===h?"start":"middle";return n.useMemo((()=>T.jsxs("g",{id:a,transform:`translate(${s}, ${l}) ${C?"scale(0.81)":""}`,children:[T.jsxs("g",{onPointerDown:y,onPointerMove:b,onPointerUp:v,style:{cursor:"move"},children:[T.jsx("rect",{x:-11.425,y:-6.4675,rx:"3",ry:"6",width:j,height:w,fill:p[2],stroke:"white",strokeWidth:"1"}),T.jsx("text",{fontSize:5.2,dx:"-4",dy:"0.5",className:"rmp-name__mrt",fill:p[3],textAnchor:"middle",dominantBaseline:"middle",children:u}),T.jsx("text",{fontSize:5.2,dx:"4",dy:"0.5",className:"rmp-name__mrt",fill:p[3],textAnchor:"middle",dominantBaseline:"middle",children:g}),T.jsx("rect",{id:`stn_core_${a}`,x:-11.425,y:-6.4675,rx:"3",ry:"6",width:j,height:w,fill:"white",opacity:"0"})]}),T.jsx("g",{transform:`translate(${O}, ${_})`,textAnchor:k,children:T.jsx(xe,{text:c[0].split("\n"),fontSize:yn,lineHeight:yn,grow:"top"===f?"up":"middle"===f?"bidirectional":"down",baseOffset:0,className:"rmp-name__mrt"})})]})),[a,s,l,...c,h,f,p,u,g,C,y,b,v])},icon:T.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[T.jsx("rect",{x:"6",y:"8.6035",rx:"1.575",ry:"3.151",width:"12",height:"6.793",fill:"currentColor"}),T.jsx("text",{fontSize:"3.5",dx:"10",dy:"13",className:"rmp-name__en",fill:"white",textAnchor:"middle",children:"NS"}),T.jsx("text",{fontSize:"3.5",dx:"15",dy:"13",className:"rmp-name__en",fill:"white",textAnchor:"middle",children:"28"})]}),defaultAttrs:vn,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:s}=e,{t:i}=a(),r=[{type:"textarea",label:i("panel.details.stations.common.nameEn"),value:n.names[0],onChange:e=>{n.names[0]=e,s(t,n)},minW:"full"},{type:"select",label:i("panel.details.stations.common.nameOffsetX"),value:n.nameOffsetX,options:{left:i("panel.details.stations.common.left"),middle:i("panel.details.stations.common.middle"),right:i("panel.details.stations.common.right")},disabledOptions:"middle"===n.nameOffsetY?["middle"]:[],onChange:e=>{n.nameOffsetX=e,s(t,n)},minW:"full"},{type:"select",label:i("panel.details.stations.common.nameOffsetY"),value:n.nameOffsetY,options:{top:i("panel.details.stations.common.top"),middle:i("panel.details.stations.common.middle"),bottom:i("panel.details.stations.common.bottom")},disabledOptions:"middle"===n.nameOffsetX?["middle"]:[],onChange:e=>{n.nameOffsetY=e,s(t,n)},minW:"full"},{type:"input",label:i("panel.details.stations.common.lineCode"),value:n.lineCode,onChange:e=>{n.lineCode=e,s(t,n)},minW:"full"},{type:"input",label:i("panel.details.stations.common.stationCode"),value:n.stationCode,onChange:e=>{n.stationCode=e,s(t,n)},minW:"full"},{type:"switch",label:i("panel.details.stations.MRTBasic.isTram"),isChecked:n.isTram,onChange:e=>{n.isTram=e,s(t,n)},minW:"full",oneLine:!0},{type:"custom",label:i("color"),component:T.jsx(c,{type:o.MRTBasic,defaultTheme:vn.color})}];return T.jsx(l,{fields:r})},metadata:{displayName:"panel.details.stations.MRTBasic.displayName",cities:[d.Singapore],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},wn=8.2628,On={top:{offset:10.7628,polarity:-1},middle:{offset:0,polarity:0},bottom:{offset:10.7628,polarity:1}},_n={names:["Chinatown"],nameOffsetX:"right",nameOffsetY:"top",transfer:[[[d.Singapore,"nel","#9B26B6",m.white,"NE","4"],[d.Singapore,"dtl","#0057B7",m.white,"DT","19"]]]},kn={component:e=>{var t;const{id:a,x:s,y:l,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,nameOffsetX:h=_n.nameOffsetX,nameOffsetY:f=_n.nameOffsetY,transfer:p=_n.transfer}=null!==(t=i[o.MRTInt])&&void 0!==t?t:_n,u=n.useCallback((e=>r(a,e)),[a,r]),g=n.useCallback((e=>d(a,e)),[a,d]),C=n.useCallback((e=>m(a,e)),[a,m]),y=p.at(0),b=29.625*(y.length-2)+57.8,v=16.77,j=[];for(let n=1;nT.jsxs("g",{id:a,transform:`translate(${s}, ${l})`,children:[T.jsx("g",{onPointerDown:u,onPointerMove:g,onPointerUp:C,style:{cursor:"move"},children:p.map((e=>({info:e,width:29.625*(e.length-2)+57.8}))).map((({info:e,width:t},s)=>T.jsxs(n.Fragment,{children:[T.jsx("rect",{x:-t/2,y:-8.385,rx:"4.5",ry:"8",width:t,height:v,fill:`url(#${a}_grad_${s})`,stroke:"white",strokeWidth:"1"}),T.jsx("linearGradient",{id:`${a}_grad_${s}`,y1:"0%",y2:"0%",x1:"0%",x2:"100%",children:e.map(((t,a)=>T.jsxs(n.Fragment,{children:[T.jsx("stop",{offset:100/e.length*a+"%",stopColor:t[2]}),T.jsx("stop",{offset:100/e.length*(a+1)+"%",stopColor:t[2]})]},t[2])))}),j.map((n=>T.jsx("line",{x1:n/e.length*t-t/2,x2:n/e.length*t-t/2,y1:-8.385,y2:8.385,stroke:"white",strokeWidth:"1"},n))),e.map(((e,a,s)=>T.jsxs(n.Fragment,{children:[T.jsx("text",{fontSize:6.9,dx:(""!==e[5]?-5:-2)+t/s.length/2*(2*a+1)-t/2+1,dy:"0.5",className:"rmp-name__mrt",fill:e[3],textAnchor:"middle",dominantBaseline:"middle",children:e[4]}),T.jsx("text",{fontSize:6.9,dx:5+t/s.length/2*(2*a+1)-t/2+1,dy:"0.5",className:"rmp-name__mrt",fill:e[3],textAnchor:"middle",dominantBaseline:"middle",children:e[5]})]},e[2]))),T.jsx("rect",{id:`stn_core_${a}`,x:-t/2,y:-8.385,rx:"4.5",ry:"8",width:t,height:v,fill:"white",opacity:"0"})]},e.map((e=>e[2])).join("_"))))}),T.jsx("g",{transform:`translate(${w}, ${O})`,textAnchor:_,children:T.jsx(xe,{text:c[0].split("\n"),fontSize:wn,lineHeight:wn,grow:"top"===f?"up":"middle"===f?"bidirectional":"down",baseOffset:0,className:"rmp-name__mrt"})})]})),[a,s,l,...c,h,f,JSON.stringify(p),u,g,C])},icon:T.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[T.jsx("rect",{x:"2",y:"9.0985",rx:"1.038",ry:"2.076",width:"20",height:"5.803",fill:"currentColor"}),T.jsx("text",{fontSize:"3",dx:"5",dy:"13.25",className:"rmp-name__en",fill:"white",textAnchor:"middle",children:"NE"}),T.jsx("text",{fontSize:"3",dx:"9.5",dy:"13.25",className:"rmp-name__en",fill:"white",textAnchor:"middle",children:"4"}),T.jsx("text",{fontSize:"3",dx:"14.5",dy:"13.25",className:"rmp-name__en",fill:"white",textAnchor:"middle",children:"DT"}),T.jsx("text",{fontSize:"3",dx:"19",dy:"13.25",className:"rmp-name__en",fill:"white",textAnchor:"middle",children:"19"})]}),defaultAttrs:_n,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:s}=e,{t:i}=a(),r=[{type:"textarea",label:i("panel.details.stations.common.nameEn"),value:n.names[0],onChange:e=>{n.names[0]=e,s(t,n)},minW:"full"},{type:"select",label:i("panel.details.stations.common.nameOffsetX"),value:n.nameOffsetX,options:{left:i("panel.details.stations.common.left"),middle:i("panel.details.stations.common.middle"),right:i("panel.details.stations.common.right")},disabledOptions:"middle"===n.nameOffsetY?["middle"]:[],onChange:e=>{n.nameOffsetX=e,s(t,n)},minW:"full"},{type:"select",label:i("panel.details.stations.common.nameOffsetY"),value:n.nameOffsetY,options:{top:i("panel.details.stations.common.top"),middle:i("panel.details.stations.common.middle"),bottom:i("panel.details.stations.common.bottom")},disabledOptions:"middle"===n.nameOffsetX?["middle"]:[],onChange:e=>{n.nameOffsetY=e,s(t,n)},minW:"full"},{type:"custom",label:i("panel.details.stations.interchange.title"),component:T.jsx(Gt,{stationType:o.MRTInt,defaultAttrs:_n,maximumTransfers:[1/0,0,0]})}];return T.jsx(l,{fields:r})},metadata:{displayName:"panel.details.stations.MRTInt.displayName",cities:[d.Singapore],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},Sn={size:10,baseOffset:1},Nn={size:5,baseOffset:1.5},zn={names:["新宿","Shinjuku"],nameOffsetX:"right",nameOffsetY:"middle",rotate:0,textOneLine:!1,textVertical:!1,important:!1,lines:[-1,0,1]},Mn={component:e=>{var t;const{id:a,x:s,y:l,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,nameOffsetX:h=zn.nameOffsetX,nameOffsetY:f=zn.nameOffsetY,rotate:p=zn.rotate,textOneLine:u=zn.textOneLine,textVertical:g=zn.textVertical,important:C=zn.important,lines:y=zn.lines}=null!==(t=i[o.JREastBasic])&&void 0!==t?t:zn,b=n.useCallback((e=>r(a,e)),[a,r]),v=n.useCallback((e=>d(a,e)),[a,d]),j=n.useCallback((e=>m(a,e)),[a,m]),w=5*(Math.max(...y)-Math.min(...y)+1),O=5*(Math.min(...y)-.5),_=5*Math.abs(Math.cos(p*Math.PI/180))*Math.min(...y)-2.5-1,k=5*Math.abs(Math.cos(p*Math.PI/180))*Math.max(...y)+2.5+1,S=5*Math.abs(Math.sin(p*Math.PI/180))*Math.min(...y)-2.5,N=5*Math.abs(Math.sin(p*Math.PI/180))*Math.max(...y)+2.5,z="left"===h?_:"right"===h?k:0,M=(c[0].split("\n").length*("middle"===f?0:Sn.size)+(("middle"===f?0:"top"===f?2:1)+Sn.baseOffset))*Ce[f].polarity+("middle"===f?0:"top"===f?S:N),A="left"===h?"end":"right"===h?"start":"middle",P={ja:"top"===f?"down":"bottom"===f?"up":"bidirectional",en:"top"===f||u?"up":"down"},B={ja:Sn.baseOffset,en:("middle"===f?u?-c[0].split("\n").length*Sn.size/2-1:c[0].split("\n").length*Sn.size/2:0)+(C&&!u?2:0)+Nn.baseOffset},$=n.useRef(null),[W,E]=n.useState({width:0});n.useEffect((()=>E($.current.getBBox())),[c[0],g,E,$]);const X=(g?.2:.7)*Sn.size,Y={left:-X/2,middle:0,right:X/2}[h],R={top:-2,middle:0,bottom:2}[f],L=p%90!=0&&"middle"!==h?("left"===h?_:k)*Math.SQRT2:0,D=(C&&"middle"!==h?Y:0)+L,I={0:0,45:-1,90:0,135:1,180:0,225:-1,270:0,315:1}[p],H=I*Sn.size,U=u?(Math.abs(D)+W.width+1+(C?X:0))*("left"===h?-1:1):p%90!=0&&"middle"!==h?c[0].split("\n").length/2*I*Sn.size+("left"===h?-1:1)*Sn.size:0,F=(C?2:0)*Ce[f].polarity,V=W.width,G=W.height,Z={left:-(V+X)+L,middle:-(V+X)/2,right:L}[h],Q={top:-2-B.ja,middle:-G/2,bottom:3-G+B.ja}[f],q={top:3-G-B.ja,middle:0,bottom:-3+B.ja}[f],J=("top"===f?S-Nn.baseOffset:N+Nn.baseOffset)+((C?X:0)+(p%90!=0?Sn.size/2:0))*Ce[f].polarity,K={ja:"top"===f?"end":"start",en:"top"===f?"start":"end"},ee={0:0,45:-1,90:0,135:1,180:0,225:-1,270:0,315:1}[p],te=ee*Sn.size,ne=c[0].split("\n").length*Sn.size/2+Nn.baseOffset,ae=(C?1:0)*Ce[f].polarity*-1,se=(c[0].split("\n").length-0)/2*("top"===f?-1:1)*ee*Sn.size+(C?2:0)*Ce[f].polarity*-1;return T.jsxs("g",{id:a,transform:`translate(${s}, ${l})`,children:[T.jsx("g",{transform:`rotate(${p})`,children:y.map(((e,t)=>T.jsx("circle",{cx:5*e,cy:"0",r:"1.5",stroke:"black",strokeWidth:"0.2",fill:"white"},`stn_core_${a}_${t}`)))}),g?T.jsxs(T.Fragment,{children:[T.jsxs("g",{transform:`translate(0, ${J})`,textAnchor:K.ja,children:[C&&T.jsx("rect",{x:-(V-8)/2,y:q,width:V-8,height:G,rx:(V-8)/2,fill:"black"}),T.jsx(Kt,{ref:$,text:c[0].split("\n"),fontSize:Sn.size,lineWidth:Sn.size,grow:"bidirectional",baseOffset:0,baseDY:te,y:C?2.75*Ce[f].polarity:0,className:"rmp-name__jreast_ja",fill:C?"white":"black"})]}),T.jsx("g",{transform:`translate(${ae}, ${J+se})rotate(270)`,textAnchor:K.en,children:T.jsx(xe,{text:c[1].split("\n"),fontSize:Nn.size,lineHeight:Nn.size,grow:"top"===f?"down":"up",baseOffset:ne,funcDX:e=>5*e*Math.SQRT1_2*ee*("top"===f?-1:1),className:"rmp-name__jreast_en"})})]}):T.jsxs("g",{transform:`translate(${z}, ${M})`,textAnchor:A,children:[C&&T.jsx("rect",{x:Z,y:Q+1.75,width:W.width+X,height:G-3.5,ry:(G-3.5)/2,fill:"black"}),T.jsx(xe,{ref:$,x:D,y:C&&"middle"!==f?R:0,text:c[0].split("\n"),fontSize:Sn.size,lineHeight:Sn.size,grow:P.ja,baseOffset:B.ja,funcDX:e=>(e-(c[0].split("\n").length-1)/2)*H,className:"rmp-name__jreast_ja",fill:C?"white":"black"}),T.jsx(xe,{text:c[1].split("\n"),x:U,y:F,fontSize:Nn.size,lineHeight:Nn.size,grow:P.en,baseOffset:B.en,funcDX:e=>5*e*Math.SQRT1_2*I,className:"rmp-name__jreast_en"})]}),T.jsx("g",{transform:`rotate(${p})`,children:T.jsx("rect",{id:`stn_core_${a}`,fill:"url(#opaque)",fillOpacity:"50%",x:O,y:-2.5,rx:2.5,width:w,height:5,onPointerDown:b,onPointerMove:v,onPointerUp:j,style:{cursor:"move"}})})]})},icon:T.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[T.jsx("circle",{cx:"6",cy:"12",r:"2",stroke:"currentColor",strokeWidth:"0.5",fill:"none"}),T.jsx("circle",{cx:"12",cy:"12",r:"2",stroke:"currentColor",strokeWidth:"0.5",fill:"none"}),T.jsx("circle",{cx:"18",cy:"12",r:"2",stroke:"currentColor",strokeWidth:"0.5",fill:"none"})]}),defaultAttrs:zn,attrsComponent:e=>{var t;const{id:n,attrs:s,handleAttrsUpdate:o}=e,{t:i}=a(),r=[{type:"textarea",label:i("panel.details.stations.common.nameJa"),value:s.names[0],onChange:e=>{s.names[0]=e.toString(),s.names[0].length>1&&(s.textOneLine=!1,s.important=!1),o(n,s)},minW:"full"},{type:"textarea",label:i("panel.details.stations.common.nameEn"),value:s.names[1],onChange:e=>{s.names[1]=e.toString(),s.names[1].length>1&&(s.textOneLine=!1,s.important=!1),o(n,s)},minW:"full"},{type:"select",label:i("panel.details.stations.jrEastBasic.nameOffset"),value:"middle"!==s.nameOffsetX?s.nameOffsetX:s.nameOffsetY,options:{left:i("panel.details.stations.common.left"),right:i("panel.details.stations.common.right"),top:i("panel.details.stations.common.top"),bottom:i("panel.details.stations.common.bottom")},onChange:e=>{"left"===e||"right"===e?(s.nameOffsetX=e,s.nameOffsetY="middle",s.textVertical=!1):(s.nameOffsetX="middle",s.nameOffsetY=e,s.textOneLine=!1),o(n,s)},minW:"full"},{type:"select",label:i("panel.details.stations.common.rotate"),value:s.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:e=>{s.rotate=Number(e),o(n,s)},minW:"full"},{type:"switch",label:i("panel.details.stations.jrEastBasic.textOneLine"),isChecked:s.textOneLine,isDisabled:"middle"!==s.nameOffsetY||s.names.some((e=>e.split("\n").length>1)),onChange:e=>{s.textOneLine=e,o(n,s)},oneLine:!0,minW:"full"},{type:"switch",label:i("panel.details.stations.jrEastBasic.textVertical"),isChecked:s.textVertical,isDisabled:"middle"!==s.nameOffsetX,onChange:e=>{s.textVertical=e,o(n,s)},oneLine:!0,minW:"full"},{type:"switch",label:i("panel.details.stations.jrEastBasic.important"),isChecked:null!==(t=s.important)&&void 0!==t&&t,isDisabled:s.names.some((e=>e.split("\n").length>1)),onChange:e=>{s.important=e,o(n,s)},oneLine:!0,minW:"full"}];return T.jsxs(T.Fragment,{children:[T.jsx(l,{fields:r}),T.jsx(j,{label:i("panel.details.stations.jrEastBasic.lines"),children:T.jsxs(Z,{flexWrap:"wrap",flexDirection:"row",pt:"1",children:[s.lines.map(((e,t)=>T.jsx(Q,{width:"80px",inputMode:"numeric",mr:"2",mb:"2",value:e,onChange:e=>((e,t)=>{if((""===e||"-"===e)&&s.lines.length>1)s.lines.splice(t,1);else{const n=Number(e);if(Number.isNaN(n))return;s.lines[t]=n}o(n,s)})(e,t),children:T.jsx(q,{})},t))),T.jsx(Q,{width:"80px",inputMode:"numeric",mr:"2",mb:"2",value:"",onChange:e=>(e=>{const t="-"===e?-1:Number(e);Number.isNaN(t)||(s.lines.push(t),o(n,s))})(e),onKeyDown:e=>(e=>{"Backspace"===e.key&&s.lines.length>1&&(s.lines.pop(),o(n,s))})(e),children:T.jsx(q,{})})]})})]})},metadata:{displayName:"panel.details.stations.jrEastBasic.displayName",cities:[d.Tokyo],canvas:[u.RailMap],categories:[g.NationalRail],tags:[]}},An={size:10,baseOffset:1},Pn={size:5,baseOffset:1.5},Bn={names:["東京","Tōkyō"],nameOffsetX:"left",nameOffsetY:"middle",textVertical:!1,mostImportant:!1,minLength:0},$n={component:e=>{var t;const{id:a,x:s,y:l,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,nameOffsetX:h=Bn.nameOffsetX,nameOffsetY:f=Bn.nameOffsetY,textVertical:p=Bn.textVertical,mostImportant:u=Bn.mostImportant,minLength:g=Bn.minLength}=null!==(t=i[o.JREastImportant])&&void 0!==t?t:Bn,C=n.useCallback((e=>r(a,e)),[a,r]),y=n.useCallback((e=>d(a,e)),[a,d]),b=n.useCallback((e=>m(a,e)),[a,m]),v=n.useRef(null),[j,w]=n.useState({height:0,width:0});n.useEffect((()=>w(v.current.getBBox())),[c[0],p,w,v]);const O=Math.max(j.width,j.height),_=(p?.1:.7)*An.size,k=Math.max(O+_,g),S=p?An.size+1:k,N=p?k-5:An.size+1,z={left:-S/2-1,middle:0,right:S/2+1}[h],M={top:-N/2-1,middle:0,bottom:N/2+1}[f],A={left:"end",middle:"middle",right:"start"}[h],P=u?1.5:1;return T.jsxs("g",{id:a,transform:`translate(${s}, ${l})`,children:[T.jsxs("g",{transform:`scale(${P})`,children:[T.jsx("rect",{fill:"black",x:-S/2,y:-N/2,rx:p?void 0:N/2,ry:p?S/2:void 0,width:S,height:N}),p?T.jsx("text",{ref:v,className:"rmp-name__jreast_ja",textAnchor:"middle",writingMode:"vertical-rl",fontSize:An.size,fill:"white",dominantBaseline:"central",children:c[0]}):T.jsx("text",{ref:v,y:"-1",className:"rmp-name__jreast_ja",textAnchor:"middle",fontSize:An.size,fill:"white",dominantBaseline:"central",children:c[0]}),T.jsx("rect",{id:`stn_core_${a}`,fill:"black",fillOpacity:"0",x:-S/2,y:-N/2,rx:p?void 0:S/2,ry:p?N/2:void 0,width:S,height:N,onPointerDown:C,onPointerMove:y,onPointerUp:b,style:{cursor:"move"}})]}),T.jsx("g",{transform:`translate(${z*P}, ${M*P})`,textAnchor:A,children:T.jsx(xe,{text:c[1].split("\n"),fontSize:Pn.size,lineHeight:Pn.size,grow:"top"===f?"up":"middle"===f?"bidirectional":"down",baseOffset:0,className:"rmp-name__jreast_en"})})]})},icon:T.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[T.jsx("rect",{x:"3",y:"7.5",rx:"4.5",width:"18",height:"9",stroke:"currentColor",fill:"currentColor"}),T.jsx("text",{x:"12",y:"12",textAnchor:"middle",dominantBaseline:"middle",fontSize:"6",fill:"white",children:"東京"}),T.jsx("text",{x:"12",y:"20.25",textAnchor:"middle",dominantBaseline:"middle",fontSize:"3",children:"Tōkyō"})]}),defaultAttrs:Bn,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:s}=e,{t:o}=a(),i=[{type:"input",label:o("panel.details.stations.common.nameJa"),value:n.names[0],onChange:e=>{n.names[0]=e.toString(),s(t,n)},minW:"full"},{type:"textarea",label:o("panel.details.stations.common.nameEn"),value:n.names[1],onChange:e=>{n.names[1]=e.toString(),s(t,n)},minW:"full"},{type:"select",label:o("panel.details.stations.common.nameOffsetX"),value:n.nameOffsetX,options:{left:o("panel.details.stations.common.left"),middle:o("panel.details.stations.common.middle"),right:o("panel.details.stations.common.right")},disabledOptions:"middle"===n.nameOffsetY?["middle"]:[],onChange:e=>{n.nameOffsetX=e,s(t,n)},minW:"full"},{type:"select",label:o("panel.details.stations.common.nameOffsetY"),value:n.nameOffsetY,options:{top:o("panel.details.stations.common.top"),middle:o("panel.details.stations.common.middle"),bottom:o("panel.details.stations.common.bottom")},disabledOptions:"middle"===n.nameOffsetX?["middle"]:[],onChange:e=>{n.nameOffsetY=e,s(t,n)},minW:"full"},{type:"switch",label:o("panel.details.stations.jrEastImportant.textVertical"),isChecked:n.textVertical,onChange:e=>{n.textVertical=e,s(t,n)},oneLine:!0,minW:"full"},{type:"switch",label:o("panel.details.stations.jrEastImportant.mostImportant"),isChecked:n.mostImportant,onChange:e=>{n.mostImportant=e,s(t,n)},oneLine:!0,minW:"full"},{type:"input",label:o("panel.details.stations.jrEastImportant.minLength"),value:n.minLength.toString(),onChange:e=>{Number.isNaN(e)?n.minLength=0:n.minLength=Number(e),s(t,n)},minW:"full"}];return T.jsx(l,{fields:i})},metadata:{displayName:"panel.details.stations.jrEastImportant.displayName",cities:[d.Tokyo],canvas:[u.RailMap],categories:[g.NationalRail],tags:[]}},Wn={...x,nameOffsetX:"right",nameOffsetY:"top",color:[d.Foshan,"fs1","#C4D600",m.black],lineCode:"GF",stationCode:"01",open:!0,secondaryNames:["",""],tram:!1},En={component:e=>{var t,a;const{id:s,x:l,y:i,attrs:r,handlePointerDown:d,handlePointerMove:m,handlePointerUp:c}=e,{names:h=x.names,nameOffsetX:f=Wn.nameOffsetX,nameOffsetY:p=Wn.nameOffsetY,color:u=Wn.color,lineCode:g=Wn.lineCode,stationCode:C=Wn.stationCode,open:y=Wn.open,secondaryNames:b=Wn.secondaryNames,tram:v=Wn.tram}=null!==(t=r[o.FoshanMetroBasic])&&void 0!==t?t:Wn,j=n.useCallback((e=>d(s,e)),[s,d]),w=n.useCallback((e=>m(s,e)),[s,m]),O=n.useCallback((e=>c(s,e)),[s,c]),_=n.useRef(null);null===(a=_.current)||void 0===a||null===(a=a.querySelector("path"))||void 0===a||a.setAttribute("id",`stn_core_${s}`);const k={en:v?5.08:6.56,zh:v?7.29:13.13},S={top:{namesPos:1,lineHeight:k.en,polarity:-1},middle:{namesPos:0,lineHeight:0,polarity:0},bottom:{namesPos:0,lineHeight:k.zh,polarity:1}},N=v?11:15,z="left"===f?-N:"right"===f?N:0,M=v?8:10,A=(h[S[p].namesPos].split("\n").length*S[p].lineHeight+M)*S[p].polarity,P="left"===f?"end":"right"===f?"start":y||"middle"!==f||""!==b.join("")?"middle":"end",B=n.useRef(null),[$,W]=n.useState(0);n.useEffect((()=>{var e,t;return W(null!==(e=null===(t=B.current)||void 0===t?void 0:t.getBBox().width)&&void 0!==e?e:0)}),[...b]);const E=n.useRef(null),[X,Y]=n.useState(0);n.useEffect((()=>{var e,t;return Y(null!==(e=null===(t=E.current)||void 0===t?void 0:t.getBBox().width)&&void 0!==e?e:0)}),[...h]);const R="middle"===f?X/2+($+24)/2:(X+($+24)/2)*("left"===f?-1:1),L="middle"===f&&""!==b.join("")?X/2+($+24):(X+$+(0!==$?24:0))*("left"===f?-1:"right"===f?1:0);return T.jsxs("g",{id:s,transform:`translate(${l}, ${i})`,children:[T.jsx("g",{transform:`scale(${.57915*(v?.729:1)})`,onPointerDown:j,onPointerMove:w,onPointerUp:O,style:{cursor:"move"},ref:_,children:T.jsx(Ct,{id:`stn_core_${s}`,strokeColour:u[2],lineNum:""===g?void 0:g,stnNum:""===C?void 0:C,textClassName:"rmp-name__zh"})}),T.jsxs("g",{ref:E,transform:`translate(${z}, ${A})`,textAnchor:P,children:[T.jsx(xe,{text:h[0].split("\n"),fontSize:k.zh,lineHeight:k.zh,grow:"up",className:"rmp-name__zh"}),T.jsx(xe,{text:h[1].split("\n"),fontSize:k.en,lineHeight:k.en,grow:"down",className:"rmp-name__en"})]}),""!==b.join("")&&T.jsxs("g",{transform:`translate(${z+R}, ${A})`,textAnchor:"middle",children:[T.jsx("text",{fontSize:"13.13",dx:-($+5)/2,textAnchor:"end",dominantBaseline:"middle",className:"rmp-name__zh",children:"("}),T.jsx("text",{fontSize:"13.13",dx:($+5)/2,textAnchor:"start",dominantBaseline:"middle",className:"rmp-name__zh",children:")"}),T.jsxs("g",{ref:B,children:[T.jsx("text",{fontSize:"10",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:b[0]}),T.jsx("text",{fontSize:"5.42",dy:"2",dominantBaseline:"hanging",className:"rmp-name__en",children:b[1]})]})]}),!y&&T.jsxs("g",{transform:`translate(${z+L}, ${A})`,textAnchor:"middle"===f?"start":P,children:[T.jsx("text",{fontSize:"6.04",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:"(未开通)"}),T.jsx("text",{fontSize:"3.6",dy:"4",dominantBaseline:"hanging",className:"rmp-name__en",children:"(Under Construction)"})]})]})},icon:T.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:T.jsx("g",{transform:"translate(12,12)scale(0.45)",children:T.jsx(Ct,{strokeColour:"#000",lineNum:"1",stnNum:"01"})})}),defaultAttrs:Wn,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:s}=e,{t:i}=a(),r=[{type:"textarea",label:i("panel.details.stations.common.nameZh"),value:n.names[0],onChange:e=>{n.names[0]=e,s(t,n)},minW:"full"},{type:"textarea",label:i("panel.details.stations.common.nameEn"),value:n.names[1],onChange:e=>{n.names[1]=e,s(t,n)},minW:"full"},{type:"select",label:i("panel.details.stations.common.nameOffsetX"),value:n.nameOffsetX,options:{left:i("panel.details.stations.common.left"),middle:i("panel.details.stations.common.middle"),right:i("panel.details.stations.common.right")},disabledOptions:"middle"===n.nameOffsetY?["middle"]:[],onChange:e=>{n.nameOffsetX=e,s(t,n)},minW:"full"},{type:"select",label:i("panel.details.stations.common.nameOffsetY"),value:n.nameOffsetY,options:{top:i("panel.details.stations.common.top"),middle:i("panel.details.stations.common.middle"),bottom:i("panel.details.stations.common.bottom")},disabledOptions:"middle"===n.nameOffsetX?["middle"]:[],onChange:e=>{n.nameOffsetY=e,s(t,n)},minW:"full"},{type:"custom",label:i("color"),component:T.jsx(c,{type:o.FoshanMetroBasic,defaultTheme:Wn.color})},{type:"input",label:i("panel.details.stations.common.lineCode"),value:n.lineCode,onChange:e=>{n.lineCode=e,s(t,n)},minW:"full"},{type:"input",label:i("panel.details.stations.common.stationCode"),value:n.stationCode,onChange:e=>{n.stationCode=e,s(t,n)},minW:"full"},{type:"switch",label:i("panel.details.stations.foshanMetroBasic.open"),oneLine:!0,isChecked:n.open,onChange:e=>{n.open=e,s(t,n)},minW:"full"},{type:"input",label:i("panel.details.stations.foshanMetroBasic.secondaryNameZh"),value:n.secondaryNames[0],onChange:e=>{n.secondaryNames[0]=e,s(t,n)},minW:"full"},{type:"input",label:i("panel.details.stations.foshanMetroBasic.secondaryNameEn"),value:n.secondaryNames[1],onChange:e=>{n.secondaryNames[1]=e,s(t,n)},minW:"full"},{type:"switch",label:i("panel.details.stations.foshanMetroBasic.tram"),oneLine:!0,isChecked:n.tram,onChange:e=>{n.tram=e,s(t,n)},minW:"full"}];return T.jsx(l,{fields:r})},metadata:{displayName:"panel.details.stations.foshanMetroBasic.displayName",cities:[d.Foshan],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},Xn={top:3.75,middle:0,bottom:8},Yn={...x,color:[d.Qingdao,"qd1","#f7b000",m.white],nameOffsetX:"right",nameOffsetY:"top",isInt:!1},Rn={component:e=>{var t;const{id:a,x:s,y:l,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,color:h=Yn.color,nameOffsetX:f=Yn.nameOffsetX,nameOffsetY:p=Yn.nameOffsetY,isInt:u=Yn.isInt}=null!==(t=i[o.QingdaoMetroStation])&&void 0!==t?t:Yn,g=n.useCallback((e=>r(a,e)),[a,r]),C=n.useCallback((e=>d(a,e)),[a,d]),y=n.useCallback((e=>m(a,e)),[a,m]),[b,v]=u?(w=p,"left"===(j=f)&&"top"===w?[-6,-c[1].split("\n").length*Xn[w]-6]:"middle"===j&&"top"===w?[0,-c[1].split("\n").length*Xn[w]-10]:"right"===j&&"top"===w?[6,-c[1].split("\n").length*Xn[w]-6]:"left"===j&&"bottom"===w?[-6,c[0].split("\n").length*Xn[w]+6]:"middle"===j&&"bottom"===w?[0,c[0].split("\n").length*Xn[w]+7]:"right"===j&&"bottom"===w?[6,c[0].split("\n").length*Xn[w]+6]:"left"===j&&"middle"===w?[-8,2]:"right"===j&&"middle"===w?[8,2]:[0,0]):((e,t)=>{const n="left"===e?-6:"right"===e?6:0;return"top"===t?[n,-c[1].split("\n").length*Xn[t]-5.5]:"bottom"===t?[n,c[0].split("\n").length*Xn[t]+4]:[n,2]})(f,p);var j,w;const O="left"===f?"end":"right"===f?"start":"middle";return T.jsxs("g",{id:a,transform:`translate(${s}, ${l})`,children:[T.jsx("circle",{id:`stn_core_${a}`,r:u?6:2.7,stroke:u?"black":h[2],strokeWidth:u?1.5:.2,fill:"white",onPointerDown:g,onPointerMove:C,onPointerUp:y,style:{cursor:"move"}}),T.jsxs("g",{transform:`translate(${b}, ${v})`,textAnchor:O,children:[T.jsx(xe,{text:c[0].split("\n"),fontSize:8,lineHeight:8,grow:"up",baseOffset:1,className:"rmp-name__zh"}),T.jsx(xe,{text:c[1].split("\n"),fontSize:3.75,lineHeight:3.75,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]})},icon:T.jsx("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:T.jsx("circle",{cx:"12",cy:"12",r:"3",stroke:"currentColor",strokeWidth:"0.6",fill:"none"})}),defaultAttrs:Yn,attrsComponent:e=>{var t,n,s,i;const{id:r,attrs:d,handleAttrsUpdate:m}=e,{t:h}=a(),f=[{type:"textarea",label:h("panel.details.stations.common.nameZh"),value:null!==(t=d.names[0])&&void 0!==t?t:Yn.names[0],onChange:e=>{d.names[0]=e.toString(),m(r,d)},minW:"full"},{type:"textarea",label:h("panel.details.stations.common.nameEn"),value:null!==(n=d.names[1])&&void 0!==n?n:Yn.names[1],onChange:e=>{d.names[1]=e.toString(),m(r,d)},minW:"full"},{type:"select",label:h("panel.details.stations.common.nameOffsetX"),value:null!==(s=d.nameOffsetX)&&void 0!==s?s:Yn.nameOffsetX,options:{left:h("panel.details.stations.common.left"),middle:h("panel.details.stations.common.middle"),right:h("panel.details.stations.common.right")},disabledOptions:"middle"===d.nameOffsetY?["middle"]:[],onChange:e=>{d.nameOffsetX=e,m(r,d)},minW:"full"},{type:"select",label:h("panel.details.stations.common.nameOffsetY"),value:null!==(i=d.nameOffsetY)&&void 0!==i?i:Yn.nameOffsetY,options:{top:h("panel.details.stations.common.top"),middle:h("panel.details.stations.common.middle"),bottom:h("panel.details.stations.common.bottom")},disabledOptions:"middle"===d.nameOffsetX?["middle"]:[],onChange:e=>{d.nameOffsetY=e,m(r,d)},minW:"full"},{type:"custom",label:h("color"),component:T.jsx(c,{type:o.QingdaoMetroStation,defaultTheme:Yn.color}),minW:"full"},{type:"switch",label:h("panel.details.stations.qingdaoMetro.isInt"),isChecked:d.isInt,oneLine:!0,onChange:e=>{d.isInt=e,m(r,d)},minW:"full"}];return T.jsx(l,{fields:f})},metadata:{displayName:"panel.details.stations.qingdaoMetro.displayName",cities:[d.Qingdao],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},Tn=e=>{const{lineCode:t,stationCode:n,color:a,stroke:s}=e,[l,o,i]=[10,15,.8];return T.jsxs(T.Fragment,{children:[s&&T.jsx("rect",{x:-l/2-i,y:-o/2-i,width:l+2*i,height:o+2*i,rx:2.5,strokeWidth:i,stroke:"white",fill:"white"}),T.jsx("rect",{x:-l/2,y:-o/2,width:l,height:o,rx:2,strokeWidth:1.5,stroke:a[2],fill:"white"}),T.jsx("text",{x:0,y:1===t.length?-.75:-1.5,textAnchor:"middle",className:"rmp-name__tokyo_en",fontSize:1===t.length?7:4.5,fill:"black",children:t}),T.jsx("text",{x:1===n.length?0:-.4/n.length,y:5.5,textAnchor:"middle",className:"rmp-name__en",fontSize:7,fontWeight:"bold",letterSpacing:"-0.4",fill:"black",children:n})]})},Ln={names:["京橋"],nameOffsetX:"right",nameOffsetY:"middle",textVertical:!1,lineCode:"G",stationCode:"10",color:[d.Tokyo,"g","#f9a328",m.white]},Dn={component:e=>{var t;const{id:a,x:s,y:l,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,nameOffsetX:h=Ln.nameOffsetX,nameOffsetY:f=Ln.nameOffsetY,textVertical:p=Ln.textVertical,lineCode:u=Ln.lineCode,stationCode:g=Ln.stationCode,color:C=Ln.color}=null!==(t=i[o.TokyoMetroBasic])&&void 0!==t?t:Ln,y=n.useCallback((e=>r(a,e)),[a,r]),b=n.useCallback((e=>d(a,e)),[a,d]),v=n.useCallback((e=>m(a,e)),[a,m]),[j,w]=n.useState(0);n.useEffect((()=>{let e=0;c[0].split("\n").forEach((t=>{e=Math.max(e,t.length)})),w(e)}),[c[0]]);const O="left"===h?-7:"right"===h?7:0,_="left"===h?-12:"right"===h?12:0,k="bottom"===f?20:"top"===f?-9:5.5,S="bottom"===f?9+5*j:"top"===f?-9-5*j:-5,N="left"===h?"end":"right"===h?"start":"middle";return T.jsxs("g",{id:a,transform:`translate(${s}, ${l})`,children:[T.jsx(Tn,{lineCode:u,stationCode:g,color:C}),T.jsx("rect",{id:`stn_core_${a}`,x:-5.8,y:-8.2,width:11.6,height:16.4,rx:2.5,opacity:0,onPointerDown:y,onPointerMove:b,onPointerUp:v,style:{cursor:"move"}}),T.jsx("g",{textAnchor:N,className:"rmp-name-outline",strokeWidth:"1",children:p?T.jsx("g",{transform:`translate(${_}, ${S})`,textAnchor:N,children:T.jsx(Kt,{text:c[0].split("\n"),fontSize:10,lineWidth:10,grow:"bidirectional",baseOffset:0,baseDY:0,className:"rmp-name__jreast_ja",fill:"black"})}):T.jsx("g",{transform:`translate(${O}, ${k})`,textAnchor:N,children:T.jsx(xe,{text:c[0].split("\n"),fontSize:10,lineHeight:10,grow:"up",funcDX:e=>10*(e-(c[0].split("\n").length-1)/2),className:"rmp-name__jreast_ja",fill:"black"})})})]})},icon:T.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[T.jsx("rect",{x:"6.5",y:"4.5",rx:"1.5",width:"10",height:"15",stroke:"currentColor",fill:"none"}),T.jsx("text",{x:"9",y:"11",fontSize:"7",fill:"currentColor",children:"G"}),T.jsx("text",{x:"7.75",y:"18",fontSize:"7",letterSpacing:"-0.8",fill:"currentColor",children:"10"})]}),defaultAttrs:Ln,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:s}=e,{t:i}=a(),r=[{type:"textarea",label:i("panel.details.stations.common.nameJa"),value:n.names[0],onChange:e=>{n.names[0]=e.toString(),s(t,n)},minW:"full"},{type:"select",label:i("panel.details.stations.tokyoMetroBasic.nameOffset"),value:"middle"!==n.nameOffsetX?n.nameOffsetX:n.nameOffsetY,options:{left:i("panel.details.stations.common.left"),right:i("panel.details.stations.common.right"),top:i("panel.details.stations.common.top"),bottom:i("panel.details.stations.common.bottom")},onChange:e=>{"left"===e||"right"===e?(n.nameOffsetX=e,n.nameOffsetY="middle",n.textVertical=!1):(n.nameOffsetX="middle",n.nameOffsetY=e),s(t,n)},minW:"full"},{type:"switch",label:i("panel.details.stations.tokyoMetroBasic.textVertical"),isChecked:n.textVertical,isDisabled:"middle"!==n.nameOffsetX,onChange:e=>{n.textVertical=e,s(t,n)},oneLine:!0,minW:"full"},{type:"input",label:i("panel.details.stations.common.lineCode"),value:n.lineCode,onChange:e=>{n.lineCode=e,s(t,n)},minW:"full"},{type:"input",label:i("panel.details.stations.common.stationCode"),value:n.stationCode,onChange:e=>{n.stationCode=e,s(t,n)},minW:"full"},{type:"custom",label:i("color"),component:T.jsx(c,{type:o.TokyoMetroBasic,defaultTheme:Ln.color}),minW:"full"}];return T.jsx(l,{fields:r})},metadata:{displayName:"panel.details.stations.tokyoMetroBasic.displayName",cities:[d.Tokyo],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},In={names:["日本橋"],nameOffsetX:"right",nameOffsetY:"middle",mereOffset:"none",textVertical:!1,interchanges:[{lineCode:"G",stationCode:"11",color:[d.Tokyo,"g","#f9a328",m.white]},{lineCode:"T",stationCode:"10",color:[d.Tokyo,"t","#00a4db",m.white]},{lineCode:"A",stationCode:"13",color:[d.Tokyo,"a","#dd4231",m.white]}],align:"horizontal",importance:"default"},Hn={lineCode:"",stationCode:"",color:[d.Tokyo,"","#AAAAAA",m.white]},Un={component:e=>{var t;const{id:a,x:s,y:l,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,nameOffsetX:h=In.nameOffsetX,nameOffsetY:f=In.nameOffsetY,textVertical:p=In.textVertical,interchanges:u=In.interchanges,align:g=In.align,importance:C=In.importance,mereOffset:y=In.mereOffset}=null!==(t=i[o.TokyoMetroInt])&&void 0!==t?t:In,b=n.useCallback((e=>r(a,e)),[a,r]),v=n.useCallback((e=>d(a,e)),[a,d]),j=n.useCallback((e=>m(a,e)),[a,m]),[w,O]=n.useState(0);n.useEffect((()=>{let e=0;c[0].split("\n").forEach((t=>{e=Math.max(e,t.length)})),O(e)}),[c[0]]);const _="horizontal"===g?13*u.length:0,k="vertical"===g?18*u.length:0,S="left"===h?-("horizontal"===g?4:10)-_/2:"right"===h?("horizontal"===g?2:9)+_/2:"left2"===y?-5:"right2"===y?5:0,{fontSize:N,textXVer:z,textY:M,textYVer:A}="default"===C?{fontSize:10,textXVer:("left"===h?-12:"right"===h?12:-2)+("left1"===y?-4:"left2"===y?-10:"right1"===y?4:"right2"===y?10:0),textY:"bottom"===f?("vertical"===g?1:10)+k/2:"top"===f?-("vertical"===g?3:12)-k/2:("up"===y?3:"down"===y?10:0)-7.5,textYVer:"bottom"===f?("vertical"===g?3:12)+k/2+5*w:"top"===f?-("vertical"===g?1:13)-k/2-5*w:-5}:"high"===C?{fontSize:20,textXVer:("left"===h?-12:"right"===h?12:-2)+("left1"===y?-10:"left2"===y?-16:"right1"===y?10:"right2"===y?16:0),textY:"bottom"===f?("vertical"===g?3:10)+k/2:"top"===f?-("vertical"===g?1:13)-k/2:("up"===y?6:"down"===y?15:0)-13,textYVer:"bottom"===f?("vertical"===g?4:13)+k/2+10*w:"top"===f?-("vertical"===g?5:13)-k/2-10*w:-5}:{fontSize:15,textXVer:("left"===h?-12:"right"===h?12:-2)+("left1"===y?-8:"left2"===y?-13:"right1"===y?8:"right2"===y?13:0),textY:"bottom"===f?("vertical"===g?1:10)+k/2:"top"===f?-("vertical"===g?3:13)-k/2:("up"===y?4:"down"===y?12:0)-10,textYVer:"bottom"===f?("vertical"===g?3:13)+k/2+7.5*w:"top"===f?-("vertical"===g?4:13)-k/2-7.5*w:-5},P="left"===h||"left1"===y||"left2"===y?"end":"right"===h||"right1"===y||"right2"===y?"start":"middle";return T.jsxs("g",{id:a,transform:`translate(${s}, ${l})`,children:["horizontal"===g?T.jsxs(T.Fragment,{children:[T.jsx("rect",{x:-(_+3)/2,y:-10.5,width:_+3,height:21,rx:3,fill:"#808285",stroke:"black",strokeWidth:"0.5"}),u.map(((e,t)=>T.jsx("g",{transform:`translate(${13*t-(_-13)/2}, 0)`,children:T.jsx(Tn,{lineCode:e.lineCode,stationCode:e.stationCode,color:e.color,stroke:!0})},t))),T.jsx("rect",{id:`stn_core_${a}`,x:-(_+3)/2,y:-10.5,width:_+3,height:21,rx:3,opacity:0,onPointerDown:b,onPointerMove:v,onPointerUp:j,style:{cursor:"move"}})]}):T.jsxs(T.Fragment,{children:[T.jsx("rect",{x:-8,y:-(k+3)/2,width:16,height:k+3,rx:3,fill:"#808285",stroke:"black",strokeWidth:"0.5"}),u.map(((e,t)=>T.jsx("g",{transform:`translate(0, ${18*t-(k-18)/2})`,children:T.jsx(Tn,{lineCode:e.lineCode,stationCode:e.stationCode,color:e.color,stroke:!0})},t))),T.jsx("rect",{id:`stn_core_${a}`,x:-8,y:-(k+3)/2,width:16,height:k+3,rx:3,opacity:0,onPointerDown:b,onPointerMove:v,onPointerUp:j,style:{cursor:"move"}})]}),T.jsx("g",{textAnchor:P,className:"rmp-name-outline",strokeWidth:"1",children:p?T.jsx("g",{transform:`translate(${z}, ${A})`,textAnchor:"middle",children:T.jsx(Kt,{text:c[0].split("\n"),fontSize:N,lineWidth:N,grow:"bidirectional",className:"rmp-name__jreast_ja",fill:"black",fontWeight:"default"!==C?"bold":"normal"})}):T.jsx("g",{transform:`translate(${S}, ${M})`,textAnchor:P,children:T.jsx(xe,{text:c[0].split("\n"),fontSize:N,lineHeight:N,grow:"top"===f||"up"===y?"up":"down",className:"rmp-name__jreast_ja",fill:"black",fontWeight:"default"!==C?"bold":"normal"})})})]})},icon:T.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[T.jsx("rect",{x:"4",y:"8",rx:"1",width:"6.5",height:"10",stroke:"currentColor",fill:"none"}),T.jsx("rect",{x:"12.5",y:"8",rx:"1",width:"6.5",height:"10",stroke:"currentColor",fill:"none"}),T.jsx("text",{x:"5.5",y:"12.5",fontSize:"4",fill:"currentColor",children:"G"}),T.jsx("text",{x:"5",y:"16.25",fontSize:"4",letterSpacing:"-0.8",fill:"currentColor",children:"16"}),T.jsx("text",{x:"14.25",y:"12.5",fontSize:"4",fill:"currentColor",children:"H"}),T.jsx("text",{x:"13.75",y:"16.25",fontSize:"4",letterSpacing:"-0.8",fill:"currentColor",children:"18"})]}),defaultAttrs:In,attrsComponent:e=>{const{id:t,attrs:s,handleAttrsUpdate:o}=e,i=C(),{paletteAppClip:{output:r}}=y((e=>e.runtime)),{t:d}=a(),m=[{type:"textarea",label:d("panel.details.stations.common.nameJa"),value:s.names[0],onChange:e=>{s.names[0]=e.toString(),o(t,s)},minW:"full"},{type:"select",label:d("panel.details.stations.tokyoMetroBasic.nameOffset"),value:"middle"!==s.nameOffsetX?s.nameOffsetX:s.nameOffsetY,options:{left:d("panel.details.stations.common.left"),right:d("panel.details.stations.common.right"),top:d("panel.details.stations.common.top"),bottom:d("panel.details.stations.common.bottom")},onChange:e=>{"left"===e||"right"===e?(s.nameOffsetX=e,s.nameOffsetY="middle",s.textVertical=!1,"left1"!==s.mereOffset&&"left2"!==s.mereOffset&&"right1"!==s.mereOffset&&"right2"!==s.mereOffset||(s.mereOffset="none")):(s.nameOffsetX="middle",s.nameOffsetY=e,"up"!==s.mereOffset&&"down"!==s.mereOffset||(s.mereOffset="none")),o(t,s)},minW:"full"},{type:"select",label:d("panel.details.stations.tokyoMetroInt.mereOffset.displayName"),value:s.mereOffset,options:{none:d("panel.details.stations.tokyoMetroInt.mereOffset.none"),..."middle"===s.nameOffsetX?{left1:d("panel.details.stations.tokyoMetroInt.mereOffset.left1"),left2:d("panel.details.stations.tokyoMetroInt.mereOffset.left2"),right1:d("panel.details.stations.tokyoMetroInt.mereOffset.right1"),right2:d("panel.details.stations.tokyoMetroInt.mereOffset.right2")}:{up:d("panel.details.stations.tokyoMetroInt.mereOffset.up"),down:d("panel.details.stations.tokyoMetroInt.mereOffset.down")}},onChange:e=>{s.mereOffset=e,o(t,s)},minW:"full"},{type:"switch",label:d("panel.details.stations.tokyoMetroBasic.textVertical"),isChecked:s.textVertical,isDisabled:"middle"!==s.nameOffsetX,onChange:e=>{s.textVertical=e,o(t,s)},oneLine:!0,minW:"full"},{type:"select",label:d("panel.details.stations.tokyoMetroInt.importance.displayName"),value:s.importance,options:{default:d("panel.details.stations.tokyoMetroInt.importance.default"),middle:d("panel.details.stations.tokyoMetroInt.importance.middle"),high:d("panel.details.stations.tokyoMetroInt.importance.high")},onChange:e=>{s.importance=e,o(t,s)},minW:"full"},{type:"select",label:d("panel.details.stations.tokyoMetroInt.align.displayName"),value:s.align,options:{horizontal:d("panel.details.stations.tokyoMetroInt.align.horizontal"),vertical:d("panel.details.stations.tokyoMetroInt.align.vertical")},onChange:e=>{s.align=e,o(t,s)},minW:"full"}],[c,h]=n.useState(void 0);n.useEffect((()=>{void 0!==c&&r&&(s.interchanges[c].color=r,o(t,s),h(void 0))}),[null==r?void 0:r.toString()]);const f=e=>{const n=structuredClone(s.interchanges);n.push(Hn);for(let t=n.length-1;t>e;t--)n[t]=structuredClone(n[t-1]);n[e]=Hn,o(t,{...s,interchanges:n})};return T.jsxs(T.Fragment,{children:[T.jsx(l,{fields:m}),T.jsx(j,{label:d("panel.details.stations.interchange.title"),children:T.jsxs(H,{align:"flex-start",children:[s.interchanges.map(((e,n)=>T.jsxs(L,{children:[T.jsx(w,{theme:e.color,onClick:()=>{h(n),i(O(e.color))}}),T.jsx(j,{label:d("panel.details.stations.common.lineCode"),children:T.jsx(M,{defaultValue:e.lineCode,onDebouncedChange:e=>((e,n)=>{s.interchanges[n].lineCode=e,o(t,s)})(e,n)})}),T.jsx(j,{label:d("panel.details.stations.common.stationCode"),children:T.jsx(M,{defaultValue:e.stationCode,onDebouncedChange:e=>((e,n)=>{s.interchanges[n].stationCode=e,o(t,s)})(e,n)})}),T.jsx(I,{size:"sm",variant:"ghost","aria-label":d("panel.details.stations.interchange.add"),icon:T.jsx(v,{}),onClick:()=>f(n)}),T.jsx(I,{size:"sm",variant:"ghost","aria-label":d("panel.details.stations.interchange.add"),icon:T.jsx(k,{}),onClick:()=>(e=>{const n=s.interchanges.filter(((t,n)=>n!==e));o(t,{...s,interchanges:n})})(n),isDisabled:1===s.interchanges.length})]},n))),T.jsx(G,{size:"sm",width:"100%",variant:"outline",leftIcon:T.jsx(v,{}),onClick:()=>f(s.interchanges.length),children:d("panel.details.stations.interchange.title")})]})})]})},metadata:{displayName:"panel.details.stations.tokyoMetroInt.displayName",cities:[d.Tokyo],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},Fn={0:{textDx:0,textDy:-9.15,textAnchor:"middle",dominantBaseline:"auto",polarity:-1,grow:"up"},45:{textDx:9.15*Math.SQRT1_2,textDy:-9.15*Math.SQRT1_2,textAnchor:"start",dominantBaseline:"auto",polarity:-1,grow:"up"},90:{textDx:9.15,textDy:0,textAnchor:"start",dominantBaseline:"middle",polarity:0,grow:"bidirectional"},135:{textDx:9.15*Math.SQRT1_2,textDy:9.15*Math.SQRT1_2,textAnchor:"start",dominantBaseline:"hanging",polarity:1,grow:"down"},180:{textDx:0,textDy:9.15,textAnchor:"middle",dominantBaseline:"hanging",polarity:1,grow:"down"},225:{textDx:-9.15*Math.SQRT1_2,textDy:9.15*Math.SQRT1_2,textAnchor:"end",dominantBaseline:"hanging",polarity:1,grow:"down"},270:{textDx:-9.15,textDy:0,textAnchor:"end",dominantBaseline:"middle",polarity:0,grow:"bidirectional"},315:{textDx:-9.15*Math.SQRT1_2,textDy:-9.15*Math.SQRT1_2,textAnchor:"end",dominantBaseline:"auto",polarity:-1,grow:"up"}},Vn=[d.London,"central","#DC241F",m.white,0],Gn=n.memo((e=>{const{id:t,stepFreeAccess:n,...a}=e;return T.jsxs("g",{...a,children:[T.jsx("path",{fill:"train"===n?"#1C3E93":"white",stroke:"#1C3E93",strokeWidth:2.5,d:"M0-31c17.1,0,31,13.9,31,31S17.1,31,0,31S-31,17.1-31,0S-17.1-31,0-31"}),T.jsx("path",{fill:"train"===n?"white":"#1C3E93",d:"M-10.5,9c1.4,4.9,6,8.4,11.3,8.4c6.5,0,11.8-5.3,11.8-11.8c0-3.4-1.5-6.5-3.8-8.7l0.7-5.1\n\tc4.6,2.9,7.6,8,7.6,13.8c0,9-7.3,16.3-16.3,16.3c-5.9,0-11-3.1-13.9-7.7L-10.5,9z"}),T.jsx("path",{fill:"train"===e.stepFreeAccess?"white":"#1C3E93",d:"M0.5-20.5c0,2.5,2,4.6,4.6,4.6c2.5,0,4.6-2.1,4.6-4.6s-2.1-4.6-4.6-4.6S0.5-23,0.5-20.5"}),T.jsx("path",{fill:"train"===n?"white":"#1C3E93",d:"M3-12.4L2.5-9.2h-9.9c0,0-2.1,0.2-2.1,2.2s2.1,2.2,2.1,2.2h9.3l-0.5,3h-12.5c0,0-0.9,0-1.3,0.5\n\tC-12.8-1-13.2,0-13.2,0l-7,14.2c0,0-0.8,1.8,1.2,2.9c2,1.1,3.3-1,3.3-1l5.5-11.3c0,0,0.5-0.7,1-1c0.6-0.3,1.1-0.3,1.1-0.3H3.4\n\tc0,0,1.2,0,2.2-0.9c0.9-0.9,1.1-2,1.1-2l1.7-12.4c0,0,0-2.6-2.7-2.7C3.6-14.5,3-12.4,3-12.4"}),T.jsx("path",{id:`stn_core_${t}`,fill:"train"===n?"#1C3E93":"white",fillOpacity:"0",stroke:"#1C3E93",strokeWidth:2.5,strokeOpacity:"0",d:"M0-31c17.1,0,31,13.9,31,31S17.1,31,0,31S-31,17.1-31,0S-17.1-31,0-31"})]})}),((e,t)=>JSON.stringify(e)===JSON.stringify(t))),Zn={names:["Station"],transfer:[[Vn]],rotate:0,terminal:!1,stepFreeAccess:"none"},Qn={component:e=>{var t;const{id:a,x:s,y:l,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,transfer:h=Zn.transfer,rotate:f=Zn.rotate,terminal:p=Zn.terminal,stepFreeAccess:u=Zn.stepFreeAccess}=null!==(t=i[o.LondonTubeBasic])&&void 0!==t?t:Zn,g=n.useCallback((e=>r(a,e)),[a,r]),C=n.useCallback((e=>d(a,e)),[a,d]),y=n.useCallback((e=>m(a,e)),[a,m]),b=(f-90)*Math.PI/180,v=(p?2:1)*(.66*5+2.5),j=Fn[f].textDx+Math.cos(b)*Math.max(...h[0].map((e=>e[4])))*5,w=Fn[f].textDy+Math.sin(b)*Math.max(...h[0].map((e=>e[4])))*5,O=-(Math.max(...h[0].map((e=>e[4])))+Math.min(...h[0].map((e=>e[4]))))/2*5,_=Math.sin(f*Math.PI/180)*O,k=Math.cos(f*Math.PI/180)*O;return T.jsxs("g",{id:a,children:[T.jsx("g",{transform:`translate(${s}, ${l})rotate(${f})`,onPointerDown:g,onPointerMove:C,onPointerUp:y,style:{cursor:"move"},children:"none"===u?h[0].map((e=>T.jsx("rect",{id:`stn_core_${a}`,x:.66*-5/2,y:.66*-5-2.5-5*e[4],width:5*.66,height:v,stroke:"none",fill:e[2]},`${a}_${e[2]}_${e[4]}`))):T.jsx(Gn,{id:a,stepFreeAccess:u,transform:`translate(${_},${k})rotate(${-f})scale(0.2333)`},`stn_core_${a}`)}),T.jsx("g",{transform:`translate(${s+j}, ${l+w})`,textAnchor:Fn[f].textAnchor,fill:"#003888",children:T.jsx(xe,{text:c[0].split("\n"),fontSize:10,lineHeight:8.5,dominantBaseline:Fn[f].dominantBaseline,grow:Fn[f].grow,baseOffset:0,className:"rmp-name__tube"})})]})},icon:T.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:T.jsx("rect",{x:"6",y:"9",width:"12",height:"6",stroke:"currentColor",fill:"currentColor"})}),defaultAttrs:Zn,attrsComponent:e=>{var t;const{id:n,attrs:s,handleAttrsUpdate:o}=e,{t:i}=a(),r=[{type:"textarea",label:i("panel.details.stations.common.nameEn"),value:s.names[0],onChange:e=>{s.names[0]=e.toString(),o(n,s)},minW:"full"},{type:"select",label:i("panel.details.stations.common.rotate"),value:s.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:e=>{s.rotate=Number(e),o(n,s)},minW:"full"},{type:"switch",label:i("panel.details.stations.londonTubeBasic.terminal"),isChecked:s.terminal,isDisabled:s.transfer[0].length>1,onChange:e=>{s.terminal=e,o(n,s)},oneLine:!0,minW:"full"},{type:"select",label:i("panel.details.stations.londonTubeCommon.stepFreeAccess"),value:s.stepFreeAccess,options:{none:i("panel.details.stations.londonTubeCommon.stepFreeAccessNone"),train:i("panel.details.stations.londonTubeCommon.stepFreeAccessTrain"),platform:i("panel.details.stations.londonTubeCommon.stepFreeAccessPlatform")},onChange:e=>{s.stepFreeAccess=e,o(n,s)},minW:"full"}],d=null!==(t=s.transfer)&&void 0!==t?t:Zn.transfer;return T.jsxs(T.Fragment,{children:[T.jsx(l,{fields:r}),T.jsx(j,{label:i("panel.details.stations.interchange.title"),children:T.jsxs(H,{align:"flex-start",children:[T.jsx(V,{size:"xs",children:i("panel.details.stations.londonTubeBasic.shareTracks")}),T.jsx(qn,{interchangeList:d[0],onAdd:(m=0,e=>{const t=structuredClone(d);if(t.length<=m)for(let n=t.length;n<=m;n++)t[n]=[Vn];t[m].push(e),s.transfer=t,o(n,s)}),onDelete:(e=>t=>{if(d.length>e&&d[e].length>t){const a=d.map(((n,a)=>a===e?n.filter(((e,n)=>n!==t)):n));s.transfer=a,o(n,s)}})(0),onUpdate:(e=>(t,a)=>{if(d.length>e&&d[e].length>t){const l=d.map(((n,s)=>s===e?n.map(((e,n)=>n===t?[0,1,2,3,4,5,6].map((t=>void 0===a[t]?e[t]:a[t])):e)):n));s.transfer=l,o(n,s)}})(0)})]})})]});var m},metadata:{displayName:"panel.details.stations.londonTubeBasic.displayName",cities:[d.London],canvas:[u.RailMap],categories:[g.Metro],tags:[]}};function qn(e){const{interchangeList:t,onAdd:s,onDelete:l,onUpdate:o}=e,i=C(),{paletteAppClip:{output:r}}=y((e=>e.runtime)),{t:d}=a(),[m,c]=n.useState();return n.useEffect((()=>{void 0!==m&&r&&(null==o||o(m,[...r,t[m][4]]),c(void 0))}),[null==r?void 0:r.toString()]),T.jsxs(b,{direction:"column",children:[0===t.length&&T.jsxs(L,{spacing:.5,"data-testid":"interchange-card-stack",children:[T.jsx(D,{as:"i",flex:1,align:"center",fontSize:"md",colorScheme:"gray",children:d("panel.details.stations.interchange.noTrackShare")}),T.jsx(I,{size:"sm",variant:"ghost","aria-label":d("panel.details.stations.interchange.add"),onClick:()=>null==s?void 0:s(Vn),icon:T.jsx(v,{})})]}),t.map(((e,n)=>T.jsxs(L,{spacing:.5,"data-testid":`interchange-card-stack-${n}`,children:[T.jsx(j,{label:d("color"),minW:"40px",noLabel:0!==n,children:T.jsx(w,{theme:[e[0],e[1],e[2],e[3]],onClick:()=>{c(n),i(O([e[0],e[1],e[2],e[3]]))}})}),T.jsx(j,{label:d("panel.details.stations.londonTubeBasic.shareTracksIndex"),children:T.jsx(A,{defaultValue:e[4],min:-5,max:5,step:1,onThrottledChange:t=>null==o?void 0:o(n,[e[0],e[1],e[2],e[3],t])})}),T.jsxs(H,{children:[s&&n===t.length-1?T.jsx(I,{size:"sm",variant:"ghost","aria-label":d("panel.details.stations.interchange.copy"),onClick:()=>{const e=structuredClone(t.slice(-1)[0]);e[4]=Math.max(...t.map((e=>e[4])))+1,null==s||s(e)},icon:T.jsx(_,{})}):T.jsx(U,{minW:8}),l&&0!==n&&T.jsx(I,{size:"sm",variant:"ghost","aria-label":d("panel.details.stations.interchange.remove"),onClick:()=>null==l?void 0:l(n),icon:T.jsx(k,{})})]})]},n)))]})}const Jn={names:["Station"],nameOffsetX:"right",nameOffsetY:"top",stepFreeAccess:"none"},Kn={component:e=>{var t;const{id:a,x:s,y:l,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,nameOffsetX:h=Jn.nameOffsetX,nameOffsetY:f=Jn.nameOffsetY,stepFreeAccess:p=Jn.stepFreeAccess}=null!==(t=i[o.LondonTubeInt])&&void 0!==t?t:Jn,u=n.useCallback((e=>r(a,e)),[a,r]),g=n.useCallback((e=>d(a,e)),[a,d]),C=n.useCallback((e=>m(a,e)),[a,m]),y="left"===h?-9.15:"right"===h?9.15:0,b="top"===f?-9.15:"bottom"===f?9.15:0,v="left"===h?"end":"right"===h?"start":"middle",j="top"===f?"auto":"bottom"===f?"hanging":"middle";return T.jsxs("g",{id:a,children:[T.jsx("g",{transform:`translate(${s}, ${l})`,onPointerDown:u,onPointerMove:g,onPointerUp:C,style:{cursor:"move"},children:"none"===p?T.jsx("circle",{id:`stn_core_${a}`,r:6.25,width:5*.66,height:5.800000000000001,stroke:"black",strokeWidth:2.5,fill:"white"}):T.jsx(Gn,{id:a,stepFreeAccess:p,transform:"scale(0.2333)"})}),T.jsx("g",{transform:`translate(${s+y}, ${l+b})`,textAnchor:v,fill:"#003888",children:T.jsx(xe,{text:c[0].split("\n"),fontSize:10,lineHeight:8.5,dominantBaseline:j,grow:"top"===f?"up":"bottom"===f?"down":"bidirectional",baseOffset:1,className:"rmp-name__tube"})})]})},icon:T.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:T.jsx("circle",{cx:"12",cy:"12",r:"6",stroke:"currentColor",fill:"white"})}),defaultAttrs:Jn,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:s}=e,{t:o}=a(),i=[{type:"textarea",label:o("panel.details.stations.common.nameEn"),value:n.names[0],onChange:e=>{n.names[0]=e.toString(),s(t,n)},minW:"full"},{type:"select",label:o("panel.details.stations.common.nameOffsetX"),value:n.nameOffsetX,options:{left:o("panel.details.stations.common.left"),middle:o("panel.details.stations.common.middle"),right:o("panel.details.stations.common.right")},disabledOptions:"middle"===n.nameOffsetY?["middle"]:[],onChange:e=>{n.nameOffsetX=e,s(t,n)},minW:"full"},{type:"select",label:o("panel.details.stations.common.nameOffsetY"),value:n.nameOffsetY,options:{top:o("panel.details.stations.common.top"),middle:o("panel.details.stations.common.middle"),bottom:o("panel.details.stations.common.bottom")},disabledOptions:"middle"===n.nameOffsetX?["middle"]:[],onChange:e=>{n.nameOffsetY=e,s(t,n)},minW:"full"},{type:"select",label:o("panel.details.stations.londonTubeCommon.stepFreeAccess"),value:n.stepFreeAccess,options:{none:o("panel.details.stations.londonTubeCommon.stepFreeAccessNone"),train:o("panel.details.stations.londonTubeCommon.stepFreeAccessTrain"),platform:o("panel.details.stations.londonTubeCommon.stepFreeAccessPlatform")},onChange:e=>{n.stepFreeAccess=e,s(t,n)},minW:"full"}];return T.jsx(l,{fields:i})},metadata:{displayName:"panel.details.stations.londonTubeInt.displayName",cities:[d.London],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},ea={...x,nameOffsetX:"right",nameOffsetY:"top",interchange:!1},ta={component:e=>{var t;const{id:a,x:s,y:l,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,nameOffsetX:h=ea.nameOffsetX,nameOffsetY:f=ea.nameOffsetY,interchange:p=ea.interchange}=null!==(t=i[o.GuangdongIntercityRailway])&&void 0!==t?t:ea,u=n.useCallback((e=>r(a,e)),[a,r]),g=n.useCallback((e=>d(a,e)),[a,d]),C=n.useCallback((e=>m(a,e)),[a,m]),y="left"===h?-13.33:"right"===h?13.33:0,b=(c[Ce[f].namesPos].split("\n").length*Ne[f].lineHeight+Ne[f].offset)*Ce[f].polarity,v="left"===h?"end":"right"===h?"start":"middle";return n.useMemo((()=>T.jsxs("g",{id:a,transform:`translate(${s}, ${l})`,children:[T.jsx("circle",{r:5,stroke:"#2559a8",strokeWidth:"1.5",fill:"white"}),p&&T.jsx("circle",{r:2.5,stroke:"#2559a8",strokeWidth:"1",fill:"white"}),T.jsx("circle",{id:`stn_core_${a}`,r:5.665,fill:"white",fillOpacity:"0",onPointerDown:u,onPointerMove:g,onPointerUp:C,style:{cursor:"move"}}),T.jsxs("g",{transform:`translate(${y}, ${b})`,textAnchor:v,className:"rmp-name-outline",strokeWidth:"1",children:[T.jsx(xe,{text:c[0].split("\n"),fontSize:13.13,lineHeight:13.13,grow:"up",baseOffset:1,className:"rmp-name__zh"}),T.jsx(xe,{text:c[1].split("\n"),dx:"right"===h?1.67:0,fontSize:5.83,lineHeight:5.83,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]})),[a,s,l,...c,h,f,p,u,g,C])},icon:T.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[T.jsx("circle",{cx:"12",cy:"12",r:"8",stroke:"currentColor",strokeWidth:"2.25",fill:"white"}),T.jsx("circle",{cx:"12",cy:"12",r:"4",stroke:"currentColor",strokeWidth:"1.5",fill:"white"})]}),defaultAttrs:ea,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:s}=e,{t:o}=a(),i=[{type:"textarea",label:o("panel.details.stations.common.nameZh"),value:n.names[0],onChange:e=>{n.names[0]=e.toString(),s(t,n)},minW:"full"},{type:"textarea",label:o("panel.details.stations.common.nameEn"),value:n.names[1],onChange:e=>{n.names[1]=e.toString(),s(t,n)},minW:"full"},{type:"select",label:o("panel.details.stations.common.nameOffsetX"),value:n.nameOffsetX,options:{left:o("panel.details.stations.common.left"),middle:o("panel.details.stations.common.middle"),right:o("panel.details.stations.common.right")},disabledOptions:"middle"===n.nameOffsetY?["middle"]:[],onChange:e=>{n.nameOffsetX=e,s(t,n)},minW:"full"},{type:"select",label:o("panel.details.stations.common.nameOffsetY"),value:n.nameOffsetY,options:{top:o("panel.details.stations.common.top"),middle:o("panel.details.stations.common.middle"),bottom:o("panel.details.stations.common.bottom")},disabledOptions:"middle"===n.nameOffsetX?["middle"]:[],onChange:e=>{n.nameOffsetY=e,s(t,n)},minW:"full"},{type:"switch",label:o("panel.details.stations.interchange.title"),oneLine:!0,isChecked:n.interchange,onChange:e=>{n.interchange=e,s(t,n)},minW:"full"}];return T.jsx(l,{fields:i})},metadata:{displayName:"panel.details.stations.guangdongIntercityRailway.displayName",cities:[d.Shanghai],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},na=(e("s",{[o.ShmetroBasic]:Me,[o.ShmetroBasic2020]:Be,[o.ShmetroInt]:Ee,[o.ShmetroOutOfSystemInt]:Ye,[o.ShanghaiSuburbanRailway]:Te,[o.GzmtrBasic]:Nt,[o.GzmtrInt]:Bt,[o.GzmtrInt2024]:Yt,[o.BjsubwayBasic]:Dt,[o.BjsubwayInt]:Ft,[o.MTR]:Jt,[o.SuzhouRTBasic]:sn,[o.SuzhouRTInt]:mn,[o.KunmingRTBasic]:fn,[o.KunmingRTInt]:Cn,[o.MRTBasic]:jn,[o.MRTInt]:kn,[o.JREastBasic]:Mn,[o.JREastImportant]:$n,[o.FoshanMetroBasic]:En,[o.QingdaoMetroStation]:Rn,[o.TokyoMetroBasic]:Dn,[o.TokyoMetroInt]:Un,[o.LondonTubeBasic]:Qn,[o.LondonTubeInt]:Kn,[o.GuangdongIntercityRailway]:ta}),new BroadcastChannel("RMP_MASTER_CHANNEL")),aa={id:"null",value:"",param:null,bg:"#000000",fg:m.white},sa={h:"80%",w:"80%","& iframe":{h:"100%",w:"100%"},"& div":{h:"100%",w:"100%"}},la=e("k",(e=>{const{isOpen:t,onClose:s,onSubmit:l}=e,{t:o}=a(),i=n.useRef(window.graph),r=J(),[d,m]=n.useState([]),[c,h]=n.useState(aa),[f,p]=n.useState(""),[u,g]=n.useState(!1),[x,C]=n.useState(!1);n.useEffect((()=>{t&&(p(""),h(aa),g(!1),m(je(i.current).filter((e=>e.randomId)).map((e=>{var t,n,a;return{id:e.randomId,value:null!==(t=e.label)&&void 0!==t?t:e.randomId,param:e,bg:null!==(n=e.labelColorBg)&&void 0!==n?n:aa.bg,fg:null!==(a=e.labelColorFg)&&void 0!==a?a:aa.fg}}))))}),[t]);const y=e=>{try{var t,n,a,o,i;const s=null!==(t=c.param)&&void 0!==t?t:JSON.parse(e),d=s.id?s.id:s.randomId,m=null!==(n=s.labelColorBg)&&void 0!==n?n:W(),h={randomId:d,label:null!==(a=s.label)&&void 0!==a?a:d,labelColorBg:m,labelColorFg:E(m),nodeType:null!==(o=s.nodeType)&&void 0!==o?o:s.type,transform:null!==(i=s.transform)&&void 0!==i?i:X,svgs:s.svgs,components:s.components,color:s.color,core:s.core,version:s.version};if(!h.version||h.version<2)return void r({title:"Outdated configuration!",status:"error",duration:9e3,isClosable:!0});l(h)}catch(d){return void C(!0)}s()},b=n.useRef(t),[v,w]=n.useState("DESIGNER"),[O,_]=n.useState(!1);return n.useEffect((()=>{b.current=t}),[t]),n.useEffect((()=>{const e=e=>{const{event:t,data:n}=e.data;"MASTER_POST"===t&&b.current&&(_(!1),y(n))};return na.addEventListener("message",e),()=>{na.removeEventListener("message",e)}}),[]),T.jsxs(T.Fragment,{children:[T.jsxs(K,{isOpen:t,onClose:s,size:"sm",scrollBehavior:"inside",children:[T.jsx(ee,{}),T.jsxs(te,{children:[T.jsx(ne,{children:o("header.settings.procedures.masterManager.importTitle")}),T.jsx(ae,{}),T.jsxs(se,{children:[T.jsx(j,{label:o("header.settings.procedures.masterManager.importFrom"),children:T.jsx(P,{data:d,displayHandler:e=>T.jsx(B,{name:e.value,fg:e.fg,bg:e.bg,title:e.value,sx:{display:"inline-block",overflow:"hidden",textOverflow:"ellipsis"}}),filter:(e,t)=>t.id.toLowerCase().includes(e.toLowerCase())||Object.values(t.id).some((t=>t.toLowerCase().includes(e.toLowerCase()))),value:c.value,onChange:e=>{h(e),g(!1),p("")}})}),T.jsxs(j,{label:o("header.settings.procedures.masterManager.importOther"),children:[T.jsxs(Z,{direction:"row",width:"100%",children:[T.jsx(G,{m:1,width:"100%",onClick:async()=>{w("DESIGNER"),_(!0)},children:o("RMP Designer")}),T.jsx(G,{m:1,width:"100%",onClick:()=>{w("GALLERY"),_(!0)},children:o("RMP Gallery")})]}),T.jsx(G,{m:1,onClick:()=>g(!0),children:o("header.settings.procedures.masterManager.importParam")}),T.jsx(le,{width:"100%",placeholder:"qwq",fontSize:"sm",fontFamily:"monospace",hidden:!u,onChange:e=>{C(!1),p(e.target.value),h(aa)},isInvalid:x})]})]}),T.jsxs(oe,{children:[T.jsx(G,{colorScheme:"blue",variant:"outline",mr:"1",onClick:s,children:o("cancel")}),T.jsx(G,{colorScheme:"blue",variant:"solid",mr:"1",onClick:()=>y(f),isDisabled:"null"===c.id&&""===f,children:o("apply")})]})]})]}),T.jsx(oa,{isOpen:O,onClose:()=>_(!1),source:v})]})})),oa=e=>{const{isOpen:t,onClose:n,source:a}=e,s="DESIGNER"===a?"/rmp-designer/#/export":"/rmp-gallery/?tabId=2&master=true";return T.jsxs($,{isOpen:t,onClose:n,size:"full",sx:sa,children:[T.jsx("iframe",{src:s,loading:"lazy"}),T.jsx(ie,{onClick:n,position:"fixed",top:"5px",right:"15px"})]})};e("M",(e=>{const{isOpen:t,onClose:s}=e,{t:o}=a(),{refresh:{nodes:r}}=y((e=>e.runtime)),d=n.useRef(window.graph),c=C(),[h,f]=n.useState([]);n.useEffect((()=>{t&&f(je(d.current))}),[t,r]);const[p,u]=n.useState(void 0),g=h.map((e=>{var t,n,a,s,r;const h=[{label:o("header.settings.procedures.masterManager.id"),type:"custom",component:T.jsx(B,{name:null!==(t=e.randomId)&&void 0!==t?t:"undefined",fg:null!==(n=e.labelColorFg)&&void 0!==n?n:m.white,bg:null!==(a=e.labelColorBg)&&void 0!==a?a:"#000000"})},{label:o("header.settings.procedures.masterManager.label"),type:"input",value:null!==(s=e.label)&&void 0!==s?s:o("panel.details.nodes.master.undefined"),onChange:t=>{return n=e,a=t,d.current.filterNodes((e=>d.current.getNodeAttribute(e,"type")===i.Master&&d.current.getNodeAttributes(e)[i.Master].randomId===n.randomId)).forEach((e=>{d.current.mergeNodeAttributes(e,{[i.Master]:{...n,label:a}})})),c(N()),void c(z(d.current.export()));var n,a},hidden:!e.randomId},{label:o("header.settings.procedures.masterManager.label"),type:"output",value:null!==(r=e.label)&&void 0!==r?r:o("panel.details.nodes.master.undefined"),hidden:!!e.randomId},{label:o("header.settings.procedures.masterManager.type"),type:"custom",component:T.jsx(B,{name:o(`header.settings.procedures.masterManager.types.${e.nodeType}`),fg:m.white,bg:"MiscNode"===e.nodeType?"#FF8651":"#51BC00"})}];return T.jsxs(Z,{width:"100%",direction:"row",children:[T.jsx(l,{fields:h,minW:"120px"}),T.jsxs(Z,{direction:"row",mr:"auto",children:[T.jsx(G,{onClick:()=>u(e.randomId),children:T.jsx(Y,{})}),T.jsx(G,{onClick:()=>(e=>{const t={id:e.randomId,type:e.nodeType,label:e.label,svgs:e.svgs,components:e.components,color:e.color,core:e.core,transform:e.transform,version:e.version};t.components.forEach(((e,n)=>{t.components[n].value=e.defaultValue})),we(`RMP_Master_Node_${(new Date).valueOf()}.json`,"application/json",JSON.stringify(t))})(e),isDisabled:!e.randomId,children:T.jsx(R,{})}),T.jsx(G,{onClick:()=>{return t=e.randomId,d.current.filterNodes((e=>d.current.getNodeAttribute(e,"type")===i.Master&&d.current.getNodeAttributes(e)[i.Master].randomId===t)).forEach((e=>{d.current.dropNode(e)})),c(N()),void c(z(d.current.export()));var t},children:T.jsx(k,{})})]})]})}));return T.jsxs(K,{isOpen:t,onClose:s,size:"xl",scrollBehavior:"inside",children:[T.jsx(ee,{}),T.jsxs(te,{children:[T.jsx(ne,{children:o("header.settings.procedures.masterManager.title")}),T.jsx(ae,{}),T.jsxs(se,{width:"100%",children:[...g,T.jsx(la,{isOpen:!!p,onClose:()=>u(void 0),onSubmit:e=>{d.current.filterNodes((e=>d.current.getNodeAttribute(e,"type")===i.Master&&d.current.getNodeAttributes(e)[i.Master].randomId===p)).forEach((t=>{const n=structuredClone(e),a=d.current.getNodeAttributes(t),s=structuredClone(a[i.Master]);n.components.forEach(((e,t)=>{var a,l;n.components[t].value=null!==(l=e.id,a=void s.components.forEach((e=>{var t;if(e.id===l)return null!==(t=e.value)&&void 0!==t?t:e.defaultValue})))&&void 0!==a?a:e.defaultValue})),void 0!==n.color&&(n.color.value=s.color?n.color.value:n.color.defaultValue),d.current.mergeNodeAttributes(t,{[i.Master]:n})})),c(N()),c(z(d.current.export()))}})]}),T.jsx(oe,{children:T.jsx(G,{colorScheme:"blue",variant:"outline",mr:"1",onClick:s,children:o("close")})})]})]})}))}}})); diff --git a/assets/misc-nodes-CZ4-M6fq.js b/assets/misc-nodes-DMfi7tU1.js similarity index 99% rename from assets/misc-nodes-CZ4-M6fq.js rename to assets/misc-nodes-DMfi7tU1.js index 843261bd9..c4f790da8 100644 --- a/assets/misc-nodes-CZ4-M6fq.js +++ b/assets/misc-nodes-DMfi7tU1.js @@ -1 +1 @@ -import{aM as U,C as T,M as L,aN as k,aw as b,i as M,aO as ue,c as xe,d as pe,V as ge,W as fe,P as ye,R as de,D as be,ai as je}from"./index-CgEQ4DK5.js";import{j as n,g as me,a$ as Be,af as we,O as Ne}from"./chakra-t2DzLzXq.js";import{b as i,u as D}from"./react-DmTIgZys.js";import{L as Ce,g as re,h as Le,t as se,j as ve,k as Se,M as Pe,n as Te}from"./master-manager-UVzPVFgJ.js";const ze=o=>{const{id:e,x:t,y:r,handlePointerDown:l,handlePointerMove:s,handlePointerUp:a}=o,m=i.useCallback(c=>l(e,c),[e,l]),d=i.useCallback(c=>s(e,c),[e,s]),h=i.useCallback(c=>a(e,c),[e,a]);return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(r,")rotate(45)"),onPointerDown:m,onPointerMove:d,onPointerUp:h,style:{cursor:"move"},className:"removeMe",children:[n.jsx("line",{x1:"-5",y1:"0",x2:"5",y2:"0",stroke:"black"}),n.jsx("line",{x1:"0",y1:"-5",x2:"0",y2:"5",stroke:"black"}),n.jsx("circle",{id:"virtual_circle_".concat(e),r:5,stroke:"black",fill:"white",fillOpacity:"0"})]})},ke={},Ae=()=>n.jsx(U,{fields:[]}),Me=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,transform:"rotate(45)",focusable:!1,children:[n.jsx("circle",{cx:"12",cy:"12",r:"6",stroke:"currentColor",fill:"none"}),n.jsx("line",{x1:"6",y1:"12",x2:"18",y2:"12",stroke:"currentColor"}),n.jsx("line",{x1:"12",y1:"6",x2:"12",y2:"18",stroke:"currentColor"})]}),_e={component:ze,icon:Me,defaultAttrs:ke,attrsComponent:Ae,metadata:{displayName:"panel.details.nodes.virtual.displayName",tags:[]}},$e=o=>{const{id:e,x:t,y:r,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{num:d=O.num,color:h=O.color}=l!=null?l:O,[c,y]=d>=10?[22.67,10.75]:[21,10],g=i.useCallback(x=>s(e,x),[e,s]),f=i.useCallback(x=>a(e,x),[e,a]),u=i.useCallback(x=>m(e,x),[e,m]);return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(r,")"),onPointerDown:g,onPointerMove:f,onPointerUp:u,style:{cursor:"move"},children:[n.jsx("rect",{fill:h[2],width:c,height:"22.67"}),n.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",x:y,y:"19",fill:h[3],fontSize:"21.33",letterSpacing:"-1.75",children:d}),n.jsx("text",{className:"rmp-name__zh",x:c+2,y:"12",fontSize:"14.67",children:"号线"}),n.jsxs("text",{className:"rmp-name__en",x:c+4,y:"21.5",fontSize:"8",children:["Line ",d]})]})},O={num:1,color:[T.Shanghai,"sh1","#E4002B",L.white]},Re=[{type:"input",label:"panel.details.nodes.common.num",value:o=>(o!=null?o:O).num,validator:o=>!Number.isNaN(o),onChange:(o,e)=>{const t=e!=null?e:O;return Number.isNaN(o)||(t.num=Number(o)),t}},{type:"custom",label:"color",component:n.jsx(k,{type:b.ShmetroNumLineBadge,defaultTheme:O.color})}],Ue=()=>n.jsx(U,{fields:Re}),De=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"4",width:"10",height:"16"}),n.jsx("text",{x:"4",y:"18",fill:"white",children:"1"}),n.jsx("text",{x:"14",y:"10",fontSize:"5",children:"号线"}),n.jsx("text",{x:"14",y:"18",fontSize:"4",children:"Line 1"})]}),Ie={component:$e,icon:De,defaultAttrs:O,attrsComponent:Ue,metadata:{displayName:"panel.details.nodes.shmetroNumLineBadge.displayName",tags:[]}},Ee=o=>{const{id:e,x:t,y:r,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{names:d=Y.names,color:h=Y.color}=l!=null?l:Y,c=i.useRef(null),[y,g]=i.useState({width:12});i.useEffect(()=>g(c.current.getBBox()),[...d,g,c]);const f=i.useCallback(p=>s(e,p),[e,s]),u=i.useCallback(p=>a(e,p),[e,a]),x=i.useCallback(p=>m(e,p),[e,m]);return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(r,")"),onPointerDown:f,onPointerMove:u,onPointerUp:x,style:{cursor:"move"},children:[n.jsx("rect",{fill:h[2],x:"0",width:y.width+7,height:"21"}),n.jsxs("g",{ref:c,children:[n.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",dominantBaseline:"hanging",x:(y.width+7)/2,y:"3",fontSize:"10",fill:h[3],letterSpacing:"-0.25",children:d[0]}),n.jsx("text",{className:"rmp-name__en",textAnchor:"middle",dominantBaseline:"hanging",x:(y.width+7)/2,y:"14",fontSize:"5",fill:h[3],letterSpacing:"-0.25",children:d[1]})]})]})},Y={names:["浦江线","Pujiang Line"],color:[T.Shanghai,"pjl","#B5B5B6",L.white]},We=o=>{const{id:e,attrs:t,handleAttrsUpdate:r}=o,{t:l}=D(),s=[{type:"input",label:l("panel.details.nodes.common.nameZh"),value:t.names[0],onChange:a=>{t.names[0]=a,r(e,t)},minW:"full"},{type:"input",label:l("panel.details.nodes.common.nameEn"),value:t.names[1],onChange:a=>{t.names[1]=a,r(e,t)},minW:"full"},{type:"custom",label:l("color"),component:n.jsx(k,{type:b.ShmetroTextLineBadge,defaultTheme:Y.color})}];return n.jsx(M,{fields:s})},Fe=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"6",width:"20",height:"12"}),n.jsx("text",{x:"5",y:"11",fontSize:"5",fill:"white",children:"浦江线"}),n.jsx("text",{x:"3",y:"16",fontSize:"4",fill:"white",children:"Pujiang Line"})]}),qe={component:Ee,icon:Fe,defaultAttrs:Y,attrsComponent:We,metadata:{displayName:"panel.details.nodes.shmetroTextLineBadge.displayName",tags:[]}},Oe=o=>{var x,p;const{id:e,x:t,y:r,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{names:d=W.names,color:h=W.color,tram:c=W.tram,span:y=W.span}=l!=null?l:W,g=i.useCallback(w=>s(e,w),[e,s]),f=i.useCallback(w=>a(e,w),[e,a]),u=i.useCallback(w=>m(e,w),[e,m]);return n.jsx("g",{id:e,transform:"translate(".concat(t,", ").concat(r,")scale(").concat(c?.5:1,")"),onPointerDown:g,onPointerMove:f,onPointerUp:u,style:{cursor:"move"},children:n.jsx(Ce,{zhName:(x=d.at(0))!=null?x:"",enName:(p=d.at(1))!=null?p:"",zhClassName:"rmp-name__zh",enClassName:"rmp-name__en",foregroundColour:h[3],backgroundColour:h[2],spanDigits:y})})},W={names:["1号线","Line 1"],color:[T.Guangzhou,"gz1","#F3D03E",L.black],tram:!1,span:!0},Ve=o=>{const{id:e,attrs:t,handleAttrsUpdate:r}=o,{t:l}=D(),s=[{type:"input",label:l("panel.details.nodes.common.nameZh"),value:t.names[0],onChange:a=>{t.names[0]=a,r(e,t)},minW:"full"},{type:"input",label:l("panel.details.nodes.common.nameEn"),value:t.names[1],onChange:a=>{t.names[1]=a,r(e,t)},minW:"full"},{type:"switch",label:l("panel.details.nodes.gzmtrLineBadge.tram"),oneLine:!0,isChecked:t.tram,onChange:a=>{t.tram=a,r(e,t)},minW:"full"},{type:"switch",label:l("panel.details.nodes.gzmtrLineBadge.span"),oneLine:!0,isChecked:t.span,onChange:a=>{t.span=a,r(e,t)},minW:"full"},{type:"custom",label:l("color"),component:n.jsx(k,{type:b.GzmtrLineBadge,defaultTheme:W.color})}];return n.jsx(M,{fields:s})},Ge=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"5",width:"20",height:"14",rx:"1"}),n.jsx("text",{x:"6",y:"15",textAnchor:"middle",fontSize:"10",fill:"white",children:"1"}),n.jsx("text",{x:"15",y:"12",textAnchor:"middle",fontSize:"6",fill:"white",children:"号线"}),n.jsx("text",{x:"14.5",y:"17",textAnchor:"middle",fontSize:"4",fill:"white",children:"Line 1"})]}),He={component:Oe,icon:Ge,defaultAttrs:W,attrsComponent:Ve,metadata:{displayName:"panel.details.nodes.gzmtrLineBadge.displayName",tags:[]}},ee=11.84375,Qe=o=>{const{id:e,x:t,y:r,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{num:d=V.num,color:h=V.color}=l!=null?l:V,c=i.useCallback(u=>s(e,u),[e,s]),y=i.useCallback(u=>a(e,u),[e,a]),g=i.useCallback(u=>m(e,u),[e,m]),f=h[3]===L.black?"#003670":L.white;return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(r,")"),onPointerDown:c,onPointerMove:y,onPointerUp:g,style:{cursor:"move"},children:[n.jsx("rect",{fill:h[2],x:"0",width:ee+21,height:"16",rx:"2"}),n.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",x:ee/2+2,y:"13.5",fill:f,fontSize:"15",letterSpacing:"-1.5",children:d}),n.jsx("text",{className:"rmp-name__zh",x:ee+(d>9?5.5:3),y:"8.5",fontSize:"7",fill:f,children:"号线"}),n.jsxs("text",{className:"rmp-name__en",x:ee+(d>9?6:4.5),y:"13.5",fontSize:"4",fill:f,children:["Line ",d]})]})},V={num:1,color:[T.Beijing,"bj1","#c23a30",L.white]},Xe=[{type:"input",label:"panel.details.nodes.common.num",value:o=>(o!=null?o:V).num,validator:o=>!Number.isNaN(o),onChange:(o,e)=>{const t=e!=null?e:V;return Number.isNaN(o)||(t.num=Number(o)),t}},{type:"custom",label:"color",component:n.jsx(k,{type:b.BjsubwayNumLineBadge,defaultTheme:V.color})}],Ze=()=>n.jsx(U,{fields:Xe}),Je=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"4",width:"20",height:"16",rx:"2"}),n.jsx("text",{x:"4",y:"17",fill:"white",fontSize:"14",children:"1"}),n.jsx("text",{x:"11",y:"11",fill:"white",fontSize:"5",children:"号线"}),n.jsx("text",{x:"11",y:"17",fill:"white",fontSize:"4",children:"Line 1"})]}),Ye={component:Qe,icon:Je,defaultAttrs:V,attrsComponent:Ze,metadata:{displayName:"panel.details.nodes.bjsubwayNumLineBadge.displayName",tags:[]}},Ke=28.84375,en=o=>{const{id:e,x:t,y:r,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{names:d=$.names,color:h=$.color}=l!=null?l:$,c=i.useRef(null),[y,g]=i.useState({width:12});i.useEffect(()=>g(c.current.getBBox()),[...d,g,c]);const f=i.useCallback(C=>s(e,C),[e,s]),u=i.useCallback(C=>a(e,C),[e,a]),x=i.useCallback(C=>m(e,C),[e,m]),p=Math.max(Ke,y.width),w=h[3]===L.black?"#003670":L.white;return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(r,")"),onPointerDown:f,onPointerMove:u,onPointerUp:x,style:{cursor:"move"},children:[n.jsx("rect",{fill:h[2],x:"0",width:p+4,height:"16",rx:"2"}),n.jsxs("g",{ref:c,children:[n.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",x:(p+4)/2,y:"8",fontSize:"7",fill:w,children:d[0]}),n.jsx("text",{className:"rmp-name__en",textAnchor:"middle",x:(p+4)/2,y:"13.5",fontSize:"4",fill:w,children:d[1]})]})]})},$={names:["八通线","Batong Line"],color:[T.Beijing,"bj1","#c23a30",L.white]},nn=[{type:"input",label:"panel.details.nodes.common.nameZh",value:o=>(o!=null?o:$).names[0],onChange:(o,e)=>{const t=e!=null?e:$;return t.names[0]=o.toString(),t}},{type:"input",label:"panel.details.nodes.common.nameEn",value:o=>(o!=null?o:$).names[1],onChange:(o,e)=>{const t=e!=null?e:$;return t.names[1]=o.toString(),t}},{type:"custom",label:"color",component:n.jsx(k,{type:b.BjsubwayTextLineBadge,defaultTheme:$.color})}],tn=()=>n.jsx(U,{fields:nn}),on=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"6",width:"20",height:"12",rx:"2"}),n.jsx("text",{x:"3",y:"12",fontSize:"6",fill:"white",children:"八通线"}),n.jsx("text",{x:"3",y:"16",fontSize:"3.2",fill:"white",children:"Batong Line"})]}),ln={component:en,icon:on,defaultAttrs:$,attrsComponent:tn,metadata:{displayName:"panel.details.nodes.bjsubwayTextLineBadge.displayName",tags:[]}},an=o=>{const{id:e,x:t,y:r,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{num:d=A.num,branch:h=A.branch,color:c=A.color}=l!=null?l:A,y=i.useCallback(u=>s(e,u),[e,s]),g=i.useCallback(u=>a(e,u),[e,a]),f=i.useCallback(u=>m(e,u),[e,m]);return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(r,")"),onPointerDown:y,onPointerMove:g,onPointerUp:f,style:{cursor:"move"},children:[n.jsx("rect",{fill:c[2],width:"20",height:"20",rx:"2",ry:"2"}),n.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",dominantBaseline:"middle",x:"10",y:"11.4",fill:c[3],fontSize:"15",letterSpacing:"-1",children:d}),h&&n.jsxs(n.Fragment,{children:[n.jsx("text",{className:"rmp-name__zh",x:20+2.5,y:"10",fontSize:"10",children:"支线"}),n.jsx("text",{className:"rmp-name__en",x:20+2.5,y:"18",fontSize:"5",fill:"gray",children:"Branch line"})]})]})},A={num:1,branch:!1,color:[T.Suzhou,"sz1","#78BA25",L.white]},sn=[{type:"input",label:"panel.details.nodes.common.num",value:o=>(o!=null?o:A).num,validator:o=>!Number.isNaN(o),onChange:(o,e)=>{const t=e!=null?e:A;return Number.isNaN(o)||(t.num=Number(o)),t}},{type:"switch",label:"panel.details.nodes.suzhouRTNumLineBadge.branch",isChecked:o=>{var e;return(e=o==null?void 0:o.branch)!=null?e:A.branch},onChange:(o,e)=>{const t=e!=null?e:A;return t.branch=o,t}},{type:"custom",label:"color",component:n.jsx(k,{type:b.SuzhouRTNumLineBadge,defaultTheme:A.color})}],rn=()=>n.jsx(U,{fields:sn}),cn=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"4",y:"4",width:"16",height:"16",rx:"3",ry:"3"}),n.jsx("text",{x:"12",y:"13.4",textAnchor:"middle",dominantBaseline:"middle",fill:"white",fontSize:"14",children:"1"})]}),dn={component:an,icon:cn,defaultAttrs:A,attrsComponent:rn,metadata:{displayName:"panel.details.nodes.suzhouRTNumLineBadge.displayName",tags:[]}},mn=o=>{const{id:e,x:t,y:r,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{num:d=G.num,color:h=G.color}=l!=null?l:G,c=i.useCallback(u=>s(e,u),[e,s]),y=i.useCallback(u=>a(e,u),[e,a]),g=i.useCallback(u=>m(e,u),[e,m]),f=h[3];return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(r,")"),onPointerDown:c,onPointerMove:y,onPointerUp:g,style:{cursor:"move"},children:[n.jsx("rect",{fill:h[2],x:"0",width:"25",height:"15"}),n.jsxs("text",{className:"rmp-name__berlin",textAnchor:"middle",x:"12.5",y:"12.5",fill:f,fontSize:"14",letterSpacing:"1",children:["U",d]})]})},G={num:1,color:[T.Berlin,"bu1","#62AD2D",L.white]},hn=[{type:"input",label:"panel.details.nodes.common.num",value:o=>(o!=null?o:G).num,validator:o=>!Number.isNaN(o),onChange:(o,e)=>{const t=e!=null?e:G;return Number.isNaN(o)||(t.num=Number(o)),t}},{type:"custom",label:"color",component:n.jsx(k,{type:b.BerlinUBahnLineBadge,defaultTheme:G.color})}],un=()=>n.jsx(U,{fields:hn}),xn=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"4",width:"20",height:"16"}),n.jsx("text",{x:"4",y:"17",fill:"white",fontSize:"14",children:"U1"})]}),pn={component:mn,icon:xn,defaultAttrs:G,attrsComponent:un,metadata:{displayName:"panel.details.nodes.berlinUBahnLineBadge.displayName",tags:[]}},gn=o=>{const{id:e,x:t,y:r,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{num:d=H.num,color:h=H.color}=l!=null?l:H,[c,y]=d>=10?[6,19.75]:[10,20],g=i.useCallback(p=>s(e,p),[e,s]),f=i.useCallback(p=>a(e,p),[e,a]),u=i.useCallback(p=>m(e,p),[e,m]),x=h[3];return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(r,")"),onPointerDown:g,onPointerMove:f,onPointerUp:u,style:{cursor:"move"},children:[n.jsx("rect",{fill:h[2],x:"0",width:"30",height:"15",rx:"8"}),n.jsx("text",{className:"rmp-name__berlin",textAnchor:"middle",x:c,y:"12.5",fill:x,fontSize:"14",letterSpacing:"0",children:"S"}),n.jsx("text",{className:"rmp-name__berlin",textAnchor:"middle",x:y,y:"12.5",fill:x,fontSize:"14",letterSpacing:"-0.2",children:d})]})},H={num:1,color:[T.Berlin,"bs1","#DD6CA6",L.white]},fn=[{type:"input",label:"panel.details.nodes.common.num",value:o=>(o!=null?o:H).num,validator:o=>!Number.isNaN(o),onChange:(o,e)=>{const t=e!=null?e:H;return Number.isNaN(o)||(t.num=Number(o)),t}},{type:"custom",label:"color",component:n.jsx(k,{type:b.BerlinSBahnLineBadge,defaultTheme:H.color})}],yn=()=>n.jsx(U,{fields:fn}),bn=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"4",width:"20",height:"16",rx:"8"}),n.jsx("text",{x:"4.5",y:"16.5",fill:"white",fontSize:"14",children:"S1"})]}),jn={component:gn,icon:bn,defaultAttrs:H,attrsComponent:yn,metadata:{displayName:"panel.details.nodes.berlinSBahnLineBadge.displayName",tags:[]}},Bn=o=>{const{id:e,x:t,y:r,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{num:d=Q.num,color:h=Q.color}=l!=null?l:Q,c=i.useCallback(w=>s(e,w),[e,s]),y=i.useCallback(w=>a(e,w),[e,a]),g=i.useCallback(w=>m(e,w),[e,m]),f=h[3],u=Number.isInteger(d)?16:15,[x,p]=Number.isInteger(d)?Number(d)>=10?[-1.2,1.5]:[0,5.5]:[0,2.55];return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(r,")"),onPointerDown:c,onPointerMove:y,onPointerUp:g,style:{cursor:"move"},children:[n.jsx("rect",{fill:h[2],x:"0",width:"20",height:"20",rx:"10",ry:"10"}),n.jsx("text",{className:"rmp-name__zh",textAnchor:"left",x:p,y:"10",fill:f,fontSize:u,letterSpacing:x,dominantBaseline:"central",children:d})]})},Q={num:1,color:[T.Chongqing,"cq1","#e4002b",L.white]},wn=[{type:"input",label:"panel.details.nodes.common.num",value:o=>(o!=null?o:Q).num,validator:o=>!Number.isNaN(o),onChange:(o,e)=>{const t=e!=null?e:Q;return Number.isNaN(Number(o))?t.num=o:t.num=Number(o),t}},{type:"custom",label:"color",component:n.jsx(k,{type:b.ChongqingRTNumLineBadge,defaultTheme:Q.color})}],Nn=()=>n.jsx(U,{fields:wn}),Cn=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"2",rx:"10",ry:"10",width:"20",height:"20"}),n.jsx("text",{x:"8",y:"18",fill:"white",fontSize:"18",children:"1"})]}),Ln={component:Bn,icon:Cn,defaultAttrs:Q,attrsComponent:Nn,metadata:{displayName:"panel.details.nodes.chongqingRTNumLineBadge.displayName",tags:[]}},vn=o=>{const{id:e,x:t,y:r,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{names:d=R.names,color:h=R.color}=l!=null?l:R,c=i.useRef(null),y=i.useCallback(x=>s(e,x),[e,s]),g=i.useCallback(x=>a(e,x),[e,a]),f=i.useCallback(x=>m(e,x),[e,m]),u=h[3];return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(r,")"),onPointerDown:y,onPointerMove:g,onPointerUp:f,style:{cursor:"move"},children:[n.jsx("rect",{fill:h[2],x:"0",width:"20",height:"20",rx:"10",ry:"10"}),n.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",x:"10",y:"10.5",fill:u,fontSize:"6",letterSpacing:"0",children:d[0]}),n.jsx(re,{ref:c,text:d[1].split("\n"),className:"rmp-name__en",textAnchor:"middle",x:"10",y:"9.25",fill:u,fontSize:"2.5",letterSpacing:"0",lineHeight:2.25,grow:"down"})]})},R={names:["空港线","Konggang Line"],color:[T.Chongqing,"cq3","#003da5",L.white]},Sn=[{type:"input",label:"panel.details.nodes.common.nameZh",value:o=>(o!=null?o:R).names[0],onChange:(o,e)=>{const t=e!=null?e:R;return t.names[0]=o.toString(),t}},{type:"textarea",label:"panel.details.nodes.common.nameEn",value:o=>(o!=null?o:R).names[1],onChange:(o,e)=>{const t=e!=null?e:R;return t.names[1]=o.toString(),t}},{type:"custom",label:"color",component:n.jsx(k,{type:b.ChongqingRTTextLineBadge,defaultTheme:R.color})}],Pn=()=>n.jsx(U,{fields:Sn}),Tn=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"2",rx:"10",ry:"10",width:"20",height:"20"}),n.jsx("text",{x:"4.5",y:"12.5",fill:"white",fontSize:"5",children:"空港线"}),n.jsx("text",{x:"4.5",y:"15",fill:"white",fontSize:"2",children:"Konggang Line"})]}),zn={component:vn,icon:Tn,defaultAttrs:R,attrsComponent:Pn,metadata:{displayName:"panel.details.nodes.chongqingRTTextLineBadge.displayName",tags:[]}},ne=11.84375,kn=o=>{const{id:e,x:t,y:r,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{num:d=X.num,color:h=X.color,isBranch:c=X.isBranch}=l!=null?l:X,y=i.useCallback(j=>s(e,j),[e,s]),g=i.useCallback(j=>a(e,j),[e,a]),f=i.useCallback(j=>m(e,j),[e,m]),u=h[3]===L.black?"#003670":L.white,x=c?10:ne+(d>9?6.5:3),p=c?-1:0,w=c?11:ne+(d>9?7:3.5),C=c?6:ne/2+4;return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(r,")"),onPointerDown:y,onPointerMove:g,onPointerUp:f,style:{cursor:"move"},children:[n.jsx("rect",{fill:h[2],x:"0",width:ne+21,height:"16",rx:"2"}),n.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",x:C,y:"13.5",fill:u,fontSize:"15",letterSpacing:"-1",children:d}),n.jsxs("text",{className:"rmp-name__zh",x,y:"9.5",fontSize:"6",fill:u,letterSpacing:p,children:["号线",c?"支线":""]}),n.jsxs("text",{className:"rmp-name__en",x:w,y:"13.5",fontSize:"3",fill:u,children:[c?"Branch":""," Line ",d]})]})},X={num:1,color:[T.Shenzhen,"sz1","#00b140",L.white],isBranch:!1},An=o=>{const{id:e,attrs:t,handleAttrsUpdate:r}=o,{t:l}=D(),s=[{type:"input",label:l("panel.details.nodes.common.num"),value:String(t.num),validator:a=>!Number.isNaN(a),onChange:a=>{t.num=Number(a),r(e,t)},minW:"full"},{type:"custom",label:l("color"),component:n.jsx(k,{type:b.ShenzhenMetroNumLineBadge,defaultTheme:X.color}),minW:"full"},{type:"switch",label:l("panel.details.nodes.shenzhenMetroNumLineBadge.branch"),oneLine:!0,isChecked:t.isBranch,onChange:a=>{t.isBranch=a,r(e,t)},minW:"full"}];return n.jsx(M,{fields:s})},Mn=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"4",width:"20",height:"16",rx:"2"}),n.jsx("text",{x:"4",y:"17",fill:"white",fontSize:"14",children:"1"}),n.jsx("text",{x:"11",y:"14",fill:"white",fontSize:"5",children:"号线"}),n.jsx("text",{x:"12",y:"17",fill:"white",fontSize:"3",children:"Line 1"})]}),_n={component:kn,icon:Mn,defaultAttrs:X,attrsComponent:An,metadata:{displayName:"panel.details.nodes.shenzhenMetroNumLineBadge.displayName",tags:[]}},$n=o=>{const{id:e,x:t,y:r,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{num:d=K.num,color:h=K.color}=l!=null?l:K,c=i.useCallback(x=>s(e,x),[e,s]),y=i.useCallback(x=>a(e,x),[e,a]),g=i.useCallback(x=>m(e,x),[e,m]),f=h[3],u=h[2];return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(r,")"),onPointerDown:c,onPointerMove:y,onPointerUp:g,style:{cursor:"move"},children:[n.jsx("circle",{r:"8",fill:u}),n.jsx("text",{className:"rmp-name__mrt",textAnchor:"middle",x:"0",y:"0",width:"12",height:"12",fill:f,fontSize:"12",dominantBaseline:"central",letterSpacing:"-0.2",children:d})]})},K={num:1,color:[T.Singapore,"ewl","#009739",L.white]},Rn=o=>{const{id:e,attrs:t,handleAttrsUpdate:r}=o,{t:l}=D(),s=[{type:"input",label:l("panel.details.nodes.common.num"),value:String(t.num),validator:a=>!Number.isNaN(a),onChange:a=>{t.num=Number(a),r(e,t)},minW:"full"},{type:"custom",label:l("color"),component:n.jsx(k,{type:b.MRTDestinationNumbers,defaultTheme:K.color}),minW:"full"}];return n.jsx(M,{fields:s})},Un=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"2",rx:"10",ry:"10",width:"20",height:"20"}),n.jsx("text",{x:"9",y:"17",fill:"white",fontSize:"14",children:"1"})]}),Dn={component:$n,icon:Un,defaultAttrs:K,attrsComponent:Rn,metadata:{displayName:"panel.details.nodes.mrtDestinationNumbers.displayName",tags:[]}},In=o=>{const{id:e,x:t,y:r,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{lineCode:d=E.lineCode,color:h=E.color,lines:c=E.lines,name:y=E.name,isTram:g=E.isTram}=l!=null?l:E,f=i.useCallback(B=>s(e,B),[e,s]),u=i.useCallback(B=>a(e,B),[e,a]),x=i.useCallback(B=>m(e,B),[e,m]),p=22.85,w=12.935,C=h[3],j=h[2];return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(r,")"),onPointerDown:f,onPointerMove:u,onPointerUp:x,style:{cursor:"move"},children:[n.jsx("rect",{transform:"scale(1.8)",x:-p/2,y:-w/2,rx:"3",ry:"6",width:p,height:w,fill:j,stroke:"white",strokeWidth:"1"}),n.jsx("text",{className:"rmp-name__mrt",textAnchor:"middle",fill:C,fontSize:"15",dominantBaseline:"central",letterSpacing:"-0.2",children:d}),n.jsx("text",{className:"rmp-name__mrt",textAnchor:"left",x:"28",y:g?3.5:-3,fill:"black",fontSize:"10",letterSpacing:"-0.2",children:y}),!g&&c.split(",").map((B,_)=>n.jsx("g",{transform:"translate(".concat(34+14*_,", ").concat(4.5,")"),children:B.trim()!=="airport"?n.jsxs(n.Fragment,{children:[n.jsx("circle",{r:"6",fill:j}),n.jsx("text",{className:"rmp-name__mrt",textAnchor:"middle",fill:C,fontSize:"9",dominantBaseline:"central",letterSpacing:"-0.2",children:B})]}):n.jsxs("g",{transform:"translate(-6, -6) scale(4.5)",children:[n.jsx("path",{d:"M2.467 0H.226A.226.226 0 0 0 0 .226v2.241a.225.225 0 0 0 .226.225h2.241a.225.225 0 0 0 .225-.225V.226A.226.226 0 0 0 2.467 0",style:{fill:"#2d2a26"}}),n.jsx("path",{d:"M1.5.746v.3l.73.642a.08.08 0 0 1 .022.05v.12c0 .017-.012.025-.027.018L1.5 1.529l-.06.541.2.113a.03.03 0 0 1 .013.023V2.3a.01.01 0 0 1-.014.011l-.293-.091-.286.087a.01.01 0 0 1-.014-.007v-.09a.03.03 0 0 1 .013-.023l.2-.113-.059-.545-.724.348a.018.018 0 0 1-.028-.018v-.12a.07.07 0 0 1 .023-.05l.73-.642v-.3c0-.482.3-.482.3 0",style:{fill:"#fff",fillRule:"evenodd"}})]})},_))]})},E={lineCode:"EWL",name:"East-West Line",lines:"1, 2, 3, airport",isTram:!1,color:[T.Singapore,"ewl","#009739",L.white]},En=o=>{const{id:e,attrs:t,handleAttrsUpdate:r}=o,{t:l}=D(),s=[{type:"input",label:l("panel.details.nodes.common.nameEn"),value:t.name,onChange:a=>{t.name=a,r(e,t)},minW:"full"},{type:"input",label:l("panel.details.stations.common.lineCode"),value:t.lineCode,onChange:a=>{t.lineCode=a,r(e,t)},minW:"full"},{type:"switch",label:l("panel.details.nodes.mrtLineBadge.isTram"),isChecked:t.isTram,onChange:a=>{t.isTram=a,r(e,t)},minW:"full",oneLine:!0},...t.isTram?[]:[{type:"input",label:l("panel.details.nodes.common.num"),value:t.lines,onChange:a=>{t.lines=a,r(e,t)},minW:"full"}],{type:"custom",label:l("color"),component:n.jsx(k,{type:b.MRTLineBadge,defaultTheme:E.color}),minW:"full"}];return n.jsx(M,{fields:s})},Wn=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"2",rx:"10",ry:"10",width:"20",height:"20"}),n.jsx("text",{x:"9",y:"17",fill:"white",fontSize:"14",children:"1"})]}),Fn={component:In,icon:Wn,defaultAttrs:E,attrsComponent:En,metadata:{displayName:"panel.details.nodes.mrtLineBadge.displayName",tags:[]}},te=4,ie=7,oe=10,he=5,qn=5,z=qn*Math.SQRT1_2,ce=.25,le=(z*Math.SQRT2-ce)/2*Math.SQRT2,On=o=>{const{id:e,x:t,y:r,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{names:d=F.names,num:h=F.num,color:c=F.color,crosshatchPatternFill:y=F.crosshatchPatternFill}=l!=null?l:F,g=i.useRef(null),[f,u]=i.useState({height:10,width:12});i.useEffect(()=>u(g.current.getBBox()),[...d,u,g]);const x=i.useCallback(C=>s(e,C),[e,s]),p=i.useCallback(C=>a(e,C),[e,a]),w=i.useCallback(C=>m(e,C),[e,m]);return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(r,")"),onPointerDown:x,onPointerMove:p,onPointerUp:w,style:{cursor:"move"},children:[n.jsxs("defs",{children:[n.jsxs("clipPath",{id:"jr_east_fill_pattern_clip_path",patternUnits:"userSpaceOnUse",children:[n.jsx("polygon",{points:"0,0 0,".concat(le," ").concat(le,",0")}),n.jsx("polygon",{points:"".concat(z,",").concat(z," ").concat(z-le,",").concat(z," ").concat(z,",").concat(z-le)})]}),n.jsxs("pattern",{id:"jr_east_".concat(e,"_fill_pattern_").concat(c[2]),width:z,height:z,patternUnits:"userSpaceOnUse",children:[n.jsx("rect",{width:z,height:z,fill:c[2]}),n.jsx("line",{x1:"0",y1:"0",x2:z,y2:z,stroke:"white",strokeWidth:ce,strokeOpacity:"33%",clipPath:"url(#jr_east_fill_pattern_clip_path)"}),n.jsx("line",{x1:z,y1:"0",x2:"0",y2:z,stroke:"white",strokeWidth:ce,strokeOpacity:"33%"})]})]}),n.jsx("rect",{fill:y?"url(#jr_east_".concat(e,"_fill_pattern_").concat(c[2],")"):c[2],x:"0",y:"-1",width:f.width+te+10,height:f.height+1,rx:"1",stroke:"black",strokeWidth:"0.25"}),n.jsx("circle",{r:te,cx:ie,cy:oe/2+1,stroke:"black",strokeWidth:"0.25",fill:c[3]}),n.jsx("text",{x:ie,y:oe/2+1.75,textAnchor:"middle",dominantBaseline:"middle",fill:c[3]==="#000"?"white":c[2],fontSize:h>9?7:8,className:"rmp-name__jreast_en",children:h}),n.jsx(re,{ref:g,text:d[0].split("\n"),x:ie+te+1,y:"-1",fill:c[3],fontSize:oe,lineHeight:oe,grow:"down",className:"rmp-name__jreast_ja"}),n.jsx(re,{text:d[1].split("\n"),textAnchor:"middle",dominantBaseline:"hanging",x:(f.width+te+10)/2,y:f.height+1,fontSize:he,lineHeight:he,baseOffset:0,grow:"down",className:"rmp-name__jreast_en"})]})},F={names:["山手線","Yamanote Line"],color:[T.Tokyo,"jy","#9ACD32",L.black],num:9,crosshatchPatternFill:!1},Vn=o=>{const{id:e,attrs:t,handleAttrsUpdate:r}=o,{t:l}=D(),s=[{type:"input",label:l("panel.details.nodes.common.num"),value:String(t.num),validator:a=>!Number.isNaN(a),onChange:a=>{t.num=Number(a),r(e,t)},minW:"full"},{type:"textarea",label:l("panel.details.nodes.common.nameJa"),value:t.names[0],onChange:a=>{t.names[0]=a,r(e,t)},minW:"full"},{type:"textarea",label:l("panel.details.nodes.common.nameEn"),value:t.names[1],onChange:a=>{t.names[1]=a,r(e,t)},minW:"full"},{type:"switch",label:l("panel.details.nodes.jrEastLineBadge.crosshatchPatternFill"),oneLine:!0,isChecked:t.crosshatchPatternFill,onChange:a=>{t.crosshatchPatternFill=a,r(e,t)},minW:"full"},{type:"custom",label:l("color"),component:n.jsx(k,{type:b.JREastLineBadge,defaultTheme:F.color})}];return n.jsx(M,{fields:s})},Gn=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"1",y:"6",width:"22",height:"7"}),n.jsx("circle",{cx:"3.5",cy:"9.25",r:"2",fill:"white"}),n.jsx("text",{x:"3",y:"10.5",fontSize:"3",children:"9"}),n.jsx("text",{x:"6",y:"11.25",fontSize:"5",fill:"white",children:"山手線"}),n.jsx("text",{x:"1.5",y:"16",fontSize:"3",children:"Yamanote Line"})]}),Hn={component:On,icon:Gn,defaultAttrs:F,attrsComponent:Vn,metadata:{displayName:"panel.details.nodes.jrEastLineBadge.displayName",tags:[]}},Qn=o=>{const{id:e,x:t,y:r,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{num:d=q.num,numEn:h=q.numEn,color:c=q.color,showText:y=q.showText}=l!=null?l:q,g=i.useCallback(B=>s(e,B),[e,s]),f=i.useCallback(B=>a(e,B),[e,a]),u=i.useCallback(B=>m(e,B),[e,m]),x=c[3],[p,w,C,j]=Number(d)>=10?[-2.4,0,10.25,20]:[0,4,10,22];return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(r,")"),onPointerDown:g,onPointerMove:f,onPointerUp:u,style:{cursor:"move"},children:[n.jsx("rect",{fill:c[2],x:"0",width:"20",height:"20",rx:"2",ry:"2"}),n.jsx("text",{className:"rmp-name__zh",textAnchor:"left",x:w,y:C,fill:x,fontSize:j,fontWeight:"bold",letterSpacing:p,dominantBaseline:"central",children:d}),y&&n.jsxs(n.Fragment,{children:[n.jsx("text",{className:"rmp-name__zh",x:"22",y:"10.5",fontSize:"13",children:"号线"}),n.jsxs("text",{className:"rmp-name__en",x:"22.5",y:"19.5",fontSize:"8",children:["Line ",h]})]})]})},q={num:1,numEn:"1",showText:!0,color:[T.Qingdao,"qd1","#f7b000",L.white]},Xn=o=>{const{id:e,attrs:t,handleAttrsUpdate:r}=o,{t:l}=D(),s=[{type:"input",label:l("panel.details.nodes.common.num"),value:t.num.toString(),onChange:a=>{t.num=Number(a),t.numEn=a,r(e,t)}},{type:"input",label:l("panel.details.nodes.qingdaoMetroNumLineBadge.numEn"),value:t.numEn.toString(),onChange:a=>{t.numEn=a,r(e,t)}},{type:"switch",label:l("panel.details.nodes.qingdaoMetroNumLineBadge.showText"),isChecked:t.showText,oneLine:!0,onChange:a=>{t.showText=a,r(e,t)}},{type:"custom",label:l("color"),component:n.jsx(k,{type:b.QingdaoMetroNumLineBadge,defaultTheme:q.color})}];return n.jsx(M,{fields:s,minW:"full"})},Zn=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"6",rx:"1",ry:"1",width:"10",height:"10"}),n.jsx("text",{x:"4",y:"15",fill:"white",fontSize:"12",children:"1"}),n.jsx("text",{x:"12",y:"11.5",fill:"black",fontSize:"6",children:"号线"}),n.jsx("text",{x:"12",y:"15.5",fill:"black",fontSize:"4",children:"Line1"})]}),Jn={component:Qn,icon:Zn,defaultAttrs:q,attrsComponent:Xn,metadata:{displayName:"panel.details.nodes.qingdaoMetroNumLineBadge.displayName",tags:[]}},Yn=o=>{const{id:e,x:t,y:r,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{names:d=ae.names,color:h=ae.color}=l!=null?l:ae,c=i.useRef(null),[y,g]=i.useState({width:12});i.useEffect(()=>g(c.current.getBBox()),[...d,g,c]);const f=i.useCallback(p=>s(e,p),[e,s]),u=i.useCallback(p=>a(e,p),[e,a]),x=i.useCallback(p=>m(e,p),[e,m]);return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(r,")"),onPointerDown:f,onPointerMove:u,onPointerUp:x,style:{cursor:"move"},children:[n.jsx("rect",{rx:"2",ry:"2",fill:h[2],x:"0",width:y.width+7,height:"21"}),n.jsxs("g",{ref:c,children:[n.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",dominantBaseline:"hanging",x:(y.width+7)/2,y:"3",fontSize:"8.63",fill:h[3],children:d[0]}),n.jsx("text",{className:"rmp-name__en",textAnchor:"middle",dominantBaseline:"hanging",x:(y.width+7)/2,y:"14",fontSize:"3.54",fill:h[3],children:d[1]})]})]})},ae={names:["广清城际","Guangzhou-Qingyuan Intercity"],color:[T.Guangzhou,"ir","#2559a8",L.white]},Kn=o=>{const{id:e,attrs:t,handleAttrsUpdate:r}=o,{t:l}=D(),s=[{type:"input",label:l("panel.details.nodes.common.nameZh"),value:t.names[0],onChange:a=>{t.names[0]=a,r(e,t)},minW:"full"},{type:"input",label:l("panel.details.nodes.common.nameEn"),value:t.names[1],onChange:a=>{t.names[1]=a,r(e,t)},minW:"full"}];return n.jsx(M,{fields:s})},et=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"6",width:"20",height:"12"}),n.jsx("text",{x:"4.5",y:"11",fontSize:"4",fill:"white",children:"广清城际"}),n.jsx("text",{x:"3",y:"16",fontSize:"2",fill:"white",children:"Guangzhou-Qingyuan Intercity"})]}),nt={component:Yn,icon:et,defaultAttrs:ae,attrsComponent:Kn,metadata:{displayName:"panel.details.nodes.guangdongIntercityRailwayLineBadge.displayName",tags:[]}},tt=o=>{const{id:e,x:t,y:r,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,d=ve();l.content=d(l.contents);const h=se.component;return n.jsx(h,{id:e,x:t,y:r,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m,attrs:l})},ot={contents:{},...Le},lt={component:tt,icon:se.icon,defaultAttrs:ot,attrsComponent:se.attrsComponent,metadata:{displayName:"panel.details.nodes.i18nText.displayName",tags:[]}},at=o=>{var C;const{id:e,x:t,y:r,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,d=i.useCallback(j=>s(e,j),[e,s]),h=i.useCallback(j=>a(e,j),[e,a]),c=i.useCallback(j=>m(e,j),[e,m]),y=(j,...B)=>new Function(...B,"return ".concat(j)),g=(j,B,_)=>{var S;const N={};for(const P in j)if(Object.prototype.hasOwnProperty.call(j,P))try{N[P]=y(j[P].slice(1),...l.components.map(v=>v.label),"color")(...B.map((v,Z)=>_[Z]==="number"&&!Number.isNaN(Number(v))?Number(v):v),l.color?(S=l.color.value)!=null?S:l.color.defaultValue:"")}catch(v){N[P]=""}return N},f=l.nodeType==="MiscNode"?{onPointerDown:d,onPointerMove:h,onPointerUp:c,style:{cursor:"move"}}:{},u=j=>j.replace(/(^|,)\s*([^{},]+)/g,"$1 #".concat(e," $2")),x=j=>j.map(B=>{var S,P;const _=l.nodeType==="Station"&&l.core&&l.core===B.id?{id:"stn_core_".concat(e),onPointerDown:d,onPointerMove:h,onPointerUp:c,style:{cursor:"move"}}:{},N=g(B.attrs,l.components.map(v=>v.value),l.components.map(v=>v.type));return n.jsx("g",{transform:"translate(".concat((S=N.x)!=null?S:0,", ").concat((P=N.y)!=null?P:0,")"),children:i.createElement(B.type,{...N,x:0,y:0,..._},B.children?x(B.children):"_rmp_children_text"in N?B.type==="style"?u(N._rmp_children_text):N._rmp_children_text:null)},B.id)}),p=(C=l.transform)!=null?C:ue,w=i.useMemo(()=>x(l.svgs),[l]);return i.createElement("g",{id:e,transform:"translate(".concat(t,", ").concat(r,")"),...f},l.randomId?n.jsx("g",{transform:"translate(".concat(p.translateX,", ").concat(p.translateY,") scale(").concat(p.scale,") rotate(").concat(p.rotate,")"),children:w}):n.jsxs("g",{children:[n.jsx("circle",{r:"5.5"}),n.jsx("g",{transform:"translate(-4.7, -5) scale(0.8)",children:n.jsx("polygon",{points:"6,1 7.5,4.25 11,4.65 8.5,7.1 9.2,10.75 6,9 2.8,10.75 3.5,7.1 1,4.65 4.5,4.25",fill:"white"})})]}))},st={randomId:void 0,label:void 0,transform:ue,nodeType:"MiscNode",svgs:[],components:[]},it=o=>{var w,C,j,B,_;const{id:e,attrs:t,handleAttrsUpdate:r}=o,l=xe(),{paletteAppClip:{output:s}}=pe(N=>N.runtime),{t:a}=D(),[m,d]=i.useState(!1),[h,c]=i.useState(!1),y=N=>{var P;const S=t.components.find(v=>v.id===N);return S?(P=S.value)!=null?P:S.defaultValue:void 0},g=N=>{N.components.forEach((S,P)=>{var v;N.components[P].value=(v=y(S.id))!=null?v:S.defaultValue}),N.color!==void 0&&(N.color.value=t.color?t.color.value:N.color.defaultValue),r(e,N)},f=t.components.map((N,S)=>{const{label:P,type:v,defaultValue:Z,value:I}=N;return v==="number"||v==="text"?{label:a(P),type:"input",value:I!=null?I:Z,onChange:J=>{t.components[S].value=J,r(e,{...t,components:t.components})}}:v==="switch"?{label:a(P),type:"switch",isChecked:I!==void 0?!!I:Z,onChange:J=>{t.components[S].value=J,r(e,{...t,components:t.components})}}:v==="textarea"?{label:a(P),type:"textarea",value:I!=null?I:Z,onChange:J=>{t.components[S].value=J,r(e,{...t,components:t.components})}}:{type:"input",label:"undefined",value:"none"}}),[u,x]=i.useState(!1);i.useEffect(()=>{t.color&&u&&s&&(t.color.value=s,r(e,{...t,color:t.color}),x(!1))},[s==null?void 0:s.toString()]);const p=[{type:"custom",label:a("color"),component:n.jsx(ge,{theme:(w=t.color)==null?void 0:w.value,onClick:()=>{var N;x(!0),l(fe((N=t.color)==null?void 0:N.value))}})}];return n.jsxs(n.Fragment,{children:[n.jsxs(me,{direction:"row",mr:"auto",width:"100%",children:[n.jsx(ye,{width:"100%",overflow:"hidden",label:a("panel.details.nodes.master.type"),children:n.jsxs(me,{width:"100%",overflow:"hidden",children:[n.jsx(de,{name:(C=t.label)!=null?C:a("panel.details.nodes.master.undefined"),fg:(j=t.labelColorFg)!=null?j:L.white,bg:(B=t.labelColorBg)!=null?B:"#000000",sx:{display:"inline-block",overflow:"hidden",textOverflow:"ellipsis"},mr:1}),n.jsx(de,{name:(_=t.randomId)!=null?_:"UNDEFINED",fg:L.white,bg:t.randomId?"#19B3EA":"#000000",sx:{display:"inline-block"},mr:1})]})}),n.jsx(Be,{}),n.jsx(we,{icon:n.jsx(be,{}),onClick:()=>d(!0),"aria-label":"upload"})]}),n.jsx(Ne,{width:"100%",leftIcon:n.jsx(je,{}),onClick:()=>c(!0),children:a("header.settings.procedures.masterManager.title")}),t.randomId&&n.jsx(M,{fields:f,minW:"full"}),t.randomId&&t.color!==void 0&&n.jsx(M,{fields:p,minW:"full"}),n.jsx(Se,{isOpen:m,onClose:()=>d(!1),onSubmit:g}),n.jsx(Pe,{isOpen:h,onClose:()=>c(!1)})]})},rt=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("circle",{cx:"12",cy:"12",r:"6",stroke:"currentColor",fill:"none"}),n.jsx("g",{transform:"translate(7.25, 7) scale(0.8)",children:n.jsx("polygon",{points:"6,1 7.5,4.25 11,4.65 8.5,7.1 9.2,10.75 6,9 2.8,10.75 3.5,7.1 1,4.65 4.5,4.25",fill:"currentColor"})})]}),ct={component:at,icon:rt,defaultAttrs:st,attrsComponent:it,metadata:{displayName:"panel.details.nodes.master.displayName",tags:[]}},xt={[b.Virtual]:_e,[b.ShmetroNumLineBadge]:Ie,[b.ShmetroTextLineBadge]:qe,[b.GzmtrLineBadge]:He,[b.BjsubwayNumLineBadge]:Ye,[b.BjsubwayTextLineBadge]:ln,[b.SuzhouRTNumLineBadge]:dn,[b.BerlinSBahnLineBadge]:jn,[b.BerlinUBahnLineBadge]:pn,[b.ChongqingRTNumLineBadge]:Ln,[b.ChongqingRTTextLineBadge]:zn,[b.ShenzhenMetroNumLineBadge]:_n,[b.MRTDestinationNumbers]:Dn,[b.MRTLineBadge]:Fn,[b.JREastLineBadge]:Hn,[b.QingdaoMetroNumLineBadge]:Jn,[b.GuangdongIntercityRailwayLineBadge]:nt,[b.Facilities]:Te,[b.Text]:se,[b.I18nText]:lt,[b.Master]:ct};export{xt as m}; +import{aM as U,C as T,M as L,aN as k,aw as b,i as M,aO as ue,c as xe,d as pe,V as ge,W as fe,P as ye,R as de,D as be,ai as je}from"./index-DRWG9Ar1.js";import{j as n,g as me,a$ as Be,af as we,O as Ne}from"./chakra-t2DzLzXq.js";import{b as i,u as D}from"./react-DmTIgZys.js";import{L as Ce,g as re,h as Le,t as se,j as ve,k as Se,M as Pe,n as Te}from"./master-manager-DlQmLEpO.js";const ze=o=>{const{id:e,x:t,y:r,handlePointerDown:l,handlePointerMove:s,handlePointerUp:a}=o,m=i.useCallback(c=>l(e,c),[e,l]),d=i.useCallback(c=>s(e,c),[e,s]),h=i.useCallback(c=>a(e,c),[e,a]);return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(r,")rotate(45)"),onPointerDown:m,onPointerMove:d,onPointerUp:h,style:{cursor:"move"},className:"removeMe",children:[n.jsx("line",{x1:"-5",y1:"0",x2:"5",y2:"0",stroke:"black"}),n.jsx("line",{x1:"0",y1:"-5",x2:"0",y2:"5",stroke:"black"}),n.jsx("circle",{id:"virtual_circle_".concat(e),r:5,stroke:"black",fill:"white",fillOpacity:"0"})]})},ke={},Ae=()=>n.jsx(U,{fields:[]}),Me=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,transform:"rotate(45)",focusable:!1,children:[n.jsx("circle",{cx:"12",cy:"12",r:"6",stroke:"currentColor",fill:"none"}),n.jsx("line",{x1:"6",y1:"12",x2:"18",y2:"12",stroke:"currentColor"}),n.jsx("line",{x1:"12",y1:"6",x2:"12",y2:"18",stroke:"currentColor"})]}),_e={component:ze,icon:Me,defaultAttrs:ke,attrsComponent:Ae,metadata:{displayName:"panel.details.nodes.virtual.displayName",tags:[]}},$e=o=>{const{id:e,x:t,y:r,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{num:d=O.num,color:h=O.color}=l!=null?l:O,[c,y]=d>=10?[22.67,10.75]:[21,10],g=i.useCallback(x=>s(e,x),[e,s]),f=i.useCallback(x=>a(e,x),[e,a]),u=i.useCallback(x=>m(e,x),[e,m]);return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(r,")"),onPointerDown:g,onPointerMove:f,onPointerUp:u,style:{cursor:"move"},children:[n.jsx("rect",{fill:h[2],width:c,height:"22.67"}),n.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",x:y,y:"19",fill:h[3],fontSize:"21.33",letterSpacing:"-1.75",children:d}),n.jsx("text",{className:"rmp-name__zh",x:c+2,y:"12",fontSize:"14.67",children:"号线"}),n.jsxs("text",{className:"rmp-name__en",x:c+4,y:"21.5",fontSize:"8",children:["Line ",d]})]})},O={num:1,color:[T.Shanghai,"sh1","#E4002B",L.white]},Re=[{type:"input",label:"panel.details.nodes.common.num",value:o=>(o!=null?o:O).num,validator:o=>!Number.isNaN(o),onChange:(o,e)=>{const t=e!=null?e:O;return Number.isNaN(o)||(t.num=Number(o)),t}},{type:"custom",label:"color",component:n.jsx(k,{type:b.ShmetroNumLineBadge,defaultTheme:O.color})}],Ue=()=>n.jsx(U,{fields:Re}),De=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"4",width:"10",height:"16"}),n.jsx("text",{x:"4",y:"18",fill:"white",children:"1"}),n.jsx("text",{x:"14",y:"10",fontSize:"5",children:"号线"}),n.jsx("text",{x:"14",y:"18",fontSize:"4",children:"Line 1"})]}),Ie={component:$e,icon:De,defaultAttrs:O,attrsComponent:Ue,metadata:{displayName:"panel.details.nodes.shmetroNumLineBadge.displayName",tags:[]}},Ee=o=>{const{id:e,x:t,y:r,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{names:d=Y.names,color:h=Y.color}=l!=null?l:Y,c=i.useRef(null),[y,g]=i.useState({width:12});i.useEffect(()=>g(c.current.getBBox()),[...d,g,c]);const f=i.useCallback(p=>s(e,p),[e,s]),u=i.useCallback(p=>a(e,p),[e,a]),x=i.useCallback(p=>m(e,p),[e,m]);return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(r,")"),onPointerDown:f,onPointerMove:u,onPointerUp:x,style:{cursor:"move"},children:[n.jsx("rect",{fill:h[2],x:"0",width:y.width+7,height:"21"}),n.jsxs("g",{ref:c,children:[n.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",dominantBaseline:"hanging",x:(y.width+7)/2,y:"3",fontSize:"10",fill:h[3],letterSpacing:"-0.25",children:d[0]}),n.jsx("text",{className:"rmp-name__en",textAnchor:"middle",dominantBaseline:"hanging",x:(y.width+7)/2,y:"14",fontSize:"5",fill:h[3],letterSpacing:"-0.25",children:d[1]})]})]})},Y={names:["浦江线","Pujiang Line"],color:[T.Shanghai,"pjl","#B5B5B6",L.white]},We=o=>{const{id:e,attrs:t,handleAttrsUpdate:r}=o,{t:l}=D(),s=[{type:"input",label:l("panel.details.nodes.common.nameZh"),value:t.names[0],onChange:a=>{t.names[0]=a,r(e,t)},minW:"full"},{type:"input",label:l("panel.details.nodes.common.nameEn"),value:t.names[1],onChange:a=>{t.names[1]=a,r(e,t)},minW:"full"},{type:"custom",label:l("color"),component:n.jsx(k,{type:b.ShmetroTextLineBadge,defaultTheme:Y.color})}];return n.jsx(M,{fields:s})},Fe=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"6",width:"20",height:"12"}),n.jsx("text",{x:"5",y:"11",fontSize:"5",fill:"white",children:"浦江线"}),n.jsx("text",{x:"3",y:"16",fontSize:"4",fill:"white",children:"Pujiang Line"})]}),qe={component:Ee,icon:Fe,defaultAttrs:Y,attrsComponent:We,metadata:{displayName:"panel.details.nodes.shmetroTextLineBadge.displayName",tags:[]}},Oe=o=>{var x,p;const{id:e,x:t,y:r,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{names:d=W.names,color:h=W.color,tram:c=W.tram,span:y=W.span}=l!=null?l:W,g=i.useCallback(w=>s(e,w),[e,s]),f=i.useCallback(w=>a(e,w),[e,a]),u=i.useCallback(w=>m(e,w),[e,m]);return n.jsx("g",{id:e,transform:"translate(".concat(t,", ").concat(r,")scale(").concat(c?.5:1,")"),onPointerDown:g,onPointerMove:f,onPointerUp:u,style:{cursor:"move"},children:n.jsx(Ce,{zhName:(x=d.at(0))!=null?x:"",enName:(p=d.at(1))!=null?p:"",zhClassName:"rmp-name__zh",enClassName:"rmp-name__en",foregroundColour:h[3],backgroundColour:h[2],spanDigits:y})})},W={names:["1号线","Line 1"],color:[T.Guangzhou,"gz1","#F3D03E",L.black],tram:!1,span:!0},Ve=o=>{const{id:e,attrs:t,handleAttrsUpdate:r}=o,{t:l}=D(),s=[{type:"input",label:l("panel.details.nodes.common.nameZh"),value:t.names[0],onChange:a=>{t.names[0]=a,r(e,t)},minW:"full"},{type:"input",label:l("panel.details.nodes.common.nameEn"),value:t.names[1],onChange:a=>{t.names[1]=a,r(e,t)},minW:"full"},{type:"switch",label:l("panel.details.nodes.gzmtrLineBadge.tram"),oneLine:!0,isChecked:t.tram,onChange:a=>{t.tram=a,r(e,t)},minW:"full"},{type:"switch",label:l("panel.details.nodes.gzmtrLineBadge.span"),oneLine:!0,isChecked:t.span,onChange:a=>{t.span=a,r(e,t)},minW:"full"},{type:"custom",label:l("color"),component:n.jsx(k,{type:b.GzmtrLineBadge,defaultTheme:W.color})}];return n.jsx(M,{fields:s})},Ge=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"5",width:"20",height:"14",rx:"1"}),n.jsx("text",{x:"6",y:"15",textAnchor:"middle",fontSize:"10",fill:"white",children:"1"}),n.jsx("text",{x:"15",y:"12",textAnchor:"middle",fontSize:"6",fill:"white",children:"号线"}),n.jsx("text",{x:"14.5",y:"17",textAnchor:"middle",fontSize:"4",fill:"white",children:"Line 1"})]}),He={component:Oe,icon:Ge,defaultAttrs:W,attrsComponent:Ve,metadata:{displayName:"panel.details.nodes.gzmtrLineBadge.displayName",tags:[]}},ee=11.84375,Qe=o=>{const{id:e,x:t,y:r,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{num:d=V.num,color:h=V.color}=l!=null?l:V,c=i.useCallback(u=>s(e,u),[e,s]),y=i.useCallback(u=>a(e,u),[e,a]),g=i.useCallback(u=>m(e,u),[e,m]),f=h[3]===L.black?"#003670":L.white;return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(r,")"),onPointerDown:c,onPointerMove:y,onPointerUp:g,style:{cursor:"move"},children:[n.jsx("rect",{fill:h[2],x:"0",width:ee+21,height:"16",rx:"2"}),n.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",x:ee/2+2,y:"13.5",fill:f,fontSize:"15",letterSpacing:"-1.5",children:d}),n.jsx("text",{className:"rmp-name__zh",x:ee+(d>9?5.5:3),y:"8.5",fontSize:"7",fill:f,children:"号线"}),n.jsxs("text",{className:"rmp-name__en",x:ee+(d>9?6:4.5),y:"13.5",fontSize:"4",fill:f,children:["Line ",d]})]})},V={num:1,color:[T.Beijing,"bj1","#c23a30",L.white]},Xe=[{type:"input",label:"panel.details.nodes.common.num",value:o=>(o!=null?o:V).num,validator:o=>!Number.isNaN(o),onChange:(o,e)=>{const t=e!=null?e:V;return Number.isNaN(o)||(t.num=Number(o)),t}},{type:"custom",label:"color",component:n.jsx(k,{type:b.BjsubwayNumLineBadge,defaultTheme:V.color})}],Ze=()=>n.jsx(U,{fields:Xe}),Je=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"4",width:"20",height:"16",rx:"2"}),n.jsx("text",{x:"4",y:"17",fill:"white",fontSize:"14",children:"1"}),n.jsx("text",{x:"11",y:"11",fill:"white",fontSize:"5",children:"号线"}),n.jsx("text",{x:"11",y:"17",fill:"white",fontSize:"4",children:"Line 1"})]}),Ye={component:Qe,icon:Je,defaultAttrs:V,attrsComponent:Ze,metadata:{displayName:"panel.details.nodes.bjsubwayNumLineBadge.displayName",tags:[]}},Ke=28.84375,en=o=>{const{id:e,x:t,y:r,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{names:d=$.names,color:h=$.color}=l!=null?l:$,c=i.useRef(null),[y,g]=i.useState({width:12});i.useEffect(()=>g(c.current.getBBox()),[...d,g,c]);const f=i.useCallback(C=>s(e,C),[e,s]),u=i.useCallback(C=>a(e,C),[e,a]),x=i.useCallback(C=>m(e,C),[e,m]),p=Math.max(Ke,y.width),w=h[3]===L.black?"#003670":L.white;return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(r,")"),onPointerDown:f,onPointerMove:u,onPointerUp:x,style:{cursor:"move"},children:[n.jsx("rect",{fill:h[2],x:"0",width:p+4,height:"16",rx:"2"}),n.jsxs("g",{ref:c,children:[n.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",x:(p+4)/2,y:"8",fontSize:"7",fill:w,children:d[0]}),n.jsx("text",{className:"rmp-name__en",textAnchor:"middle",x:(p+4)/2,y:"13.5",fontSize:"4",fill:w,children:d[1]})]})]})},$={names:["八通线","Batong Line"],color:[T.Beijing,"bj1","#c23a30",L.white]},nn=[{type:"input",label:"panel.details.nodes.common.nameZh",value:o=>(o!=null?o:$).names[0],onChange:(o,e)=>{const t=e!=null?e:$;return t.names[0]=o.toString(),t}},{type:"input",label:"panel.details.nodes.common.nameEn",value:o=>(o!=null?o:$).names[1],onChange:(o,e)=>{const t=e!=null?e:$;return t.names[1]=o.toString(),t}},{type:"custom",label:"color",component:n.jsx(k,{type:b.BjsubwayTextLineBadge,defaultTheme:$.color})}],tn=()=>n.jsx(U,{fields:nn}),on=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"6",width:"20",height:"12",rx:"2"}),n.jsx("text",{x:"3",y:"12",fontSize:"6",fill:"white",children:"八通线"}),n.jsx("text",{x:"3",y:"16",fontSize:"3.2",fill:"white",children:"Batong Line"})]}),ln={component:en,icon:on,defaultAttrs:$,attrsComponent:tn,metadata:{displayName:"panel.details.nodes.bjsubwayTextLineBadge.displayName",tags:[]}},an=o=>{const{id:e,x:t,y:r,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{num:d=A.num,branch:h=A.branch,color:c=A.color}=l!=null?l:A,y=i.useCallback(u=>s(e,u),[e,s]),g=i.useCallback(u=>a(e,u),[e,a]),f=i.useCallback(u=>m(e,u),[e,m]);return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(r,")"),onPointerDown:y,onPointerMove:g,onPointerUp:f,style:{cursor:"move"},children:[n.jsx("rect",{fill:c[2],width:"20",height:"20",rx:"2",ry:"2"}),n.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",dominantBaseline:"middle",x:"10",y:"11.4",fill:c[3],fontSize:"15",letterSpacing:"-1",children:d}),h&&n.jsxs(n.Fragment,{children:[n.jsx("text",{className:"rmp-name__zh",x:20+2.5,y:"10",fontSize:"10",children:"支线"}),n.jsx("text",{className:"rmp-name__en",x:20+2.5,y:"18",fontSize:"5",fill:"gray",children:"Branch line"})]})]})},A={num:1,branch:!1,color:[T.Suzhou,"sz1","#78BA25",L.white]},sn=[{type:"input",label:"panel.details.nodes.common.num",value:o=>(o!=null?o:A).num,validator:o=>!Number.isNaN(o),onChange:(o,e)=>{const t=e!=null?e:A;return Number.isNaN(o)||(t.num=Number(o)),t}},{type:"switch",label:"panel.details.nodes.suzhouRTNumLineBadge.branch",isChecked:o=>{var e;return(e=o==null?void 0:o.branch)!=null?e:A.branch},onChange:(o,e)=>{const t=e!=null?e:A;return t.branch=o,t}},{type:"custom",label:"color",component:n.jsx(k,{type:b.SuzhouRTNumLineBadge,defaultTheme:A.color})}],rn=()=>n.jsx(U,{fields:sn}),cn=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"4",y:"4",width:"16",height:"16",rx:"3",ry:"3"}),n.jsx("text",{x:"12",y:"13.4",textAnchor:"middle",dominantBaseline:"middle",fill:"white",fontSize:"14",children:"1"})]}),dn={component:an,icon:cn,defaultAttrs:A,attrsComponent:rn,metadata:{displayName:"panel.details.nodes.suzhouRTNumLineBadge.displayName",tags:[]}},mn=o=>{const{id:e,x:t,y:r,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{num:d=G.num,color:h=G.color}=l!=null?l:G,c=i.useCallback(u=>s(e,u),[e,s]),y=i.useCallback(u=>a(e,u),[e,a]),g=i.useCallback(u=>m(e,u),[e,m]),f=h[3];return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(r,")"),onPointerDown:c,onPointerMove:y,onPointerUp:g,style:{cursor:"move"},children:[n.jsx("rect",{fill:h[2],x:"0",width:"25",height:"15"}),n.jsxs("text",{className:"rmp-name__berlin",textAnchor:"middle",x:"12.5",y:"12.5",fill:f,fontSize:"14",letterSpacing:"1",children:["U",d]})]})},G={num:1,color:[T.Berlin,"bu1","#62AD2D",L.white]},hn=[{type:"input",label:"panel.details.nodes.common.num",value:o=>(o!=null?o:G).num,validator:o=>!Number.isNaN(o),onChange:(o,e)=>{const t=e!=null?e:G;return Number.isNaN(o)||(t.num=Number(o)),t}},{type:"custom",label:"color",component:n.jsx(k,{type:b.BerlinUBahnLineBadge,defaultTheme:G.color})}],un=()=>n.jsx(U,{fields:hn}),xn=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"4",width:"20",height:"16"}),n.jsx("text",{x:"4",y:"17",fill:"white",fontSize:"14",children:"U1"})]}),pn={component:mn,icon:xn,defaultAttrs:G,attrsComponent:un,metadata:{displayName:"panel.details.nodes.berlinUBahnLineBadge.displayName",tags:[]}},gn=o=>{const{id:e,x:t,y:r,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{num:d=H.num,color:h=H.color}=l!=null?l:H,[c,y]=d>=10?[6,19.75]:[10,20],g=i.useCallback(p=>s(e,p),[e,s]),f=i.useCallback(p=>a(e,p),[e,a]),u=i.useCallback(p=>m(e,p),[e,m]),x=h[3];return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(r,")"),onPointerDown:g,onPointerMove:f,onPointerUp:u,style:{cursor:"move"},children:[n.jsx("rect",{fill:h[2],x:"0",width:"30",height:"15",rx:"8"}),n.jsx("text",{className:"rmp-name__berlin",textAnchor:"middle",x:c,y:"12.5",fill:x,fontSize:"14",letterSpacing:"0",children:"S"}),n.jsx("text",{className:"rmp-name__berlin",textAnchor:"middle",x:y,y:"12.5",fill:x,fontSize:"14",letterSpacing:"-0.2",children:d})]})},H={num:1,color:[T.Berlin,"bs1","#DD6CA6",L.white]},fn=[{type:"input",label:"panel.details.nodes.common.num",value:o=>(o!=null?o:H).num,validator:o=>!Number.isNaN(o),onChange:(o,e)=>{const t=e!=null?e:H;return Number.isNaN(o)||(t.num=Number(o)),t}},{type:"custom",label:"color",component:n.jsx(k,{type:b.BerlinSBahnLineBadge,defaultTheme:H.color})}],yn=()=>n.jsx(U,{fields:fn}),bn=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"4",width:"20",height:"16",rx:"8"}),n.jsx("text",{x:"4.5",y:"16.5",fill:"white",fontSize:"14",children:"S1"})]}),jn={component:gn,icon:bn,defaultAttrs:H,attrsComponent:yn,metadata:{displayName:"panel.details.nodes.berlinSBahnLineBadge.displayName",tags:[]}},Bn=o=>{const{id:e,x:t,y:r,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{num:d=Q.num,color:h=Q.color}=l!=null?l:Q,c=i.useCallback(w=>s(e,w),[e,s]),y=i.useCallback(w=>a(e,w),[e,a]),g=i.useCallback(w=>m(e,w),[e,m]),f=h[3],u=Number.isInteger(d)?16:15,[x,p]=Number.isInteger(d)?Number(d)>=10?[-1.2,1.5]:[0,5.5]:[0,2.55];return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(r,")"),onPointerDown:c,onPointerMove:y,onPointerUp:g,style:{cursor:"move"},children:[n.jsx("rect",{fill:h[2],x:"0",width:"20",height:"20",rx:"10",ry:"10"}),n.jsx("text",{className:"rmp-name__zh",textAnchor:"left",x:p,y:"10",fill:f,fontSize:u,letterSpacing:x,dominantBaseline:"central",children:d})]})},Q={num:1,color:[T.Chongqing,"cq1","#e4002b",L.white]},wn=[{type:"input",label:"panel.details.nodes.common.num",value:o=>(o!=null?o:Q).num,validator:o=>!Number.isNaN(o),onChange:(o,e)=>{const t=e!=null?e:Q;return Number.isNaN(Number(o))?t.num=o:t.num=Number(o),t}},{type:"custom",label:"color",component:n.jsx(k,{type:b.ChongqingRTNumLineBadge,defaultTheme:Q.color})}],Nn=()=>n.jsx(U,{fields:wn}),Cn=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"2",rx:"10",ry:"10",width:"20",height:"20"}),n.jsx("text",{x:"8",y:"18",fill:"white",fontSize:"18",children:"1"})]}),Ln={component:Bn,icon:Cn,defaultAttrs:Q,attrsComponent:Nn,metadata:{displayName:"panel.details.nodes.chongqingRTNumLineBadge.displayName",tags:[]}},vn=o=>{const{id:e,x:t,y:r,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{names:d=R.names,color:h=R.color}=l!=null?l:R,c=i.useRef(null),y=i.useCallback(x=>s(e,x),[e,s]),g=i.useCallback(x=>a(e,x),[e,a]),f=i.useCallback(x=>m(e,x),[e,m]),u=h[3];return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(r,")"),onPointerDown:y,onPointerMove:g,onPointerUp:f,style:{cursor:"move"},children:[n.jsx("rect",{fill:h[2],x:"0",width:"20",height:"20",rx:"10",ry:"10"}),n.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",x:"10",y:"10.5",fill:u,fontSize:"6",letterSpacing:"0",children:d[0]}),n.jsx(re,{ref:c,text:d[1].split("\n"),className:"rmp-name__en",textAnchor:"middle",x:"10",y:"9.25",fill:u,fontSize:"2.5",letterSpacing:"0",lineHeight:2.25,grow:"down"})]})},R={names:["空港线","Konggang Line"],color:[T.Chongqing,"cq3","#003da5",L.white]},Sn=[{type:"input",label:"panel.details.nodes.common.nameZh",value:o=>(o!=null?o:R).names[0],onChange:(o,e)=>{const t=e!=null?e:R;return t.names[0]=o.toString(),t}},{type:"textarea",label:"panel.details.nodes.common.nameEn",value:o=>(o!=null?o:R).names[1],onChange:(o,e)=>{const t=e!=null?e:R;return t.names[1]=o.toString(),t}},{type:"custom",label:"color",component:n.jsx(k,{type:b.ChongqingRTTextLineBadge,defaultTheme:R.color})}],Pn=()=>n.jsx(U,{fields:Sn}),Tn=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"2",rx:"10",ry:"10",width:"20",height:"20"}),n.jsx("text",{x:"4.5",y:"12.5",fill:"white",fontSize:"5",children:"空港线"}),n.jsx("text",{x:"4.5",y:"15",fill:"white",fontSize:"2",children:"Konggang Line"})]}),zn={component:vn,icon:Tn,defaultAttrs:R,attrsComponent:Pn,metadata:{displayName:"panel.details.nodes.chongqingRTTextLineBadge.displayName",tags:[]}},ne=11.84375,kn=o=>{const{id:e,x:t,y:r,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{num:d=X.num,color:h=X.color,isBranch:c=X.isBranch}=l!=null?l:X,y=i.useCallback(j=>s(e,j),[e,s]),g=i.useCallback(j=>a(e,j),[e,a]),f=i.useCallback(j=>m(e,j),[e,m]),u=h[3]===L.black?"#003670":L.white,x=c?10:ne+(d>9?6.5:3),p=c?-1:0,w=c?11:ne+(d>9?7:3.5),C=c?6:ne/2+4;return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(r,")"),onPointerDown:y,onPointerMove:g,onPointerUp:f,style:{cursor:"move"},children:[n.jsx("rect",{fill:h[2],x:"0",width:ne+21,height:"16",rx:"2"}),n.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",x:C,y:"13.5",fill:u,fontSize:"15",letterSpacing:"-1",children:d}),n.jsxs("text",{className:"rmp-name__zh",x,y:"9.5",fontSize:"6",fill:u,letterSpacing:p,children:["号线",c?"支线":""]}),n.jsxs("text",{className:"rmp-name__en",x:w,y:"13.5",fontSize:"3",fill:u,children:[c?"Branch":""," Line ",d]})]})},X={num:1,color:[T.Shenzhen,"sz1","#00b140",L.white],isBranch:!1},An=o=>{const{id:e,attrs:t,handleAttrsUpdate:r}=o,{t:l}=D(),s=[{type:"input",label:l("panel.details.nodes.common.num"),value:String(t.num),validator:a=>!Number.isNaN(a),onChange:a=>{t.num=Number(a),r(e,t)},minW:"full"},{type:"custom",label:l("color"),component:n.jsx(k,{type:b.ShenzhenMetroNumLineBadge,defaultTheme:X.color}),minW:"full"},{type:"switch",label:l("panel.details.nodes.shenzhenMetroNumLineBadge.branch"),oneLine:!0,isChecked:t.isBranch,onChange:a=>{t.isBranch=a,r(e,t)},minW:"full"}];return n.jsx(M,{fields:s})},Mn=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"4",width:"20",height:"16",rx:"2"}),n.jsx("text",{x:"4",y:"17",fill:"white",fontSize:"14",children:"1"}),n.jsx("text",{x:"11",y:"14",fill:"white",fontSize:"5",children:"号线"}),n.jsx("text",{x:"12",y:"17",fill:"white",fontSize:"3",children:"Line 1"})]}),_n={component:kn,icon:Mn,defaultAttrs:X,attrsComponent:An,metadata:{displayName:"panel.details.nodes.shenzhenMetroNumLineBadge.displayName",tags:[]}},$n=o=>{const{id:e,x:t,y:r,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{num:d=K.num,color:h=K.color}=l!=null?l:K,c=i.useCallback(x=>s(e,x),[e,s]),y=i.useCallback(x=>a(e,x),[e,a]),g=i.useCallback(x=>m(e,x),[e,m]),f=h[3],u=h[2];return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(r,")"),onPointerDown:c,onPointerMove:y,onPointerUp:g,style:{cursor:"move"},children:[n.jsx("circle",{r:"8",fill:u}),n.jsx("text",{className:"rmp-name__mrt",textAnchor:"middle",x:"0",y:"0",width:"12",height:"12",fill:f,fontSize:"12",dominantBaseline:"central",letterSpacing:"-0.2",children:d})]})},K={num:1,color:[T.Singapore,"ewl","#009739",L.white]},Rn=o=>{const{id:e,attrs:t,handleAttrsUpdate:r}=o,{t:l}=D(),s=[{type:"input",label:l("panel.details.nodes.common.num"),value:String(t.num),validator:a=>!Number.isNaN(a),onChange:a=>{t.num=Number(a),r(e,t)},minW:"full"},{type:"custom",label:l("color"),component:n.jsx(k,{type:b.MRTDestinationNumbers,defaultTheme:K.color}),minW:"full"}];return n.jsx(M,{fields:s})},Un=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"2",rx:"10",ry:"10",width:"20",height:"20"}),n.jsx("text",{x:"9",y:"17",fill:"white",fontSize:"14",children:"1"})]}),Dn={component:$n,icon:Un,defaultAttrs:K,attrsComponent:Rn,metadata:{displayName:"panel.details.nodes.mrtDestinationNumbers.displayName",tags:[]}},In=o=>{const{id:e,x:t,y:r,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{lineCode:d=E.lineCode,color:h=E.color,lines:c=E.lines,name:y=E.name,isTram:g=E.isTram}=l!=null?l:E,f=i.useCallback(B=>s(e,B),[e,s]),u=i.useCallback(B=>a(e,B),[e,a]),x=i.useCallback(B=>m(e,B),[e,m]),p=22.85,w=12.935,C=h[3],j=h[2];return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(r,")"),onPointerDown:f,onPointerMove:u,onPointerUp:x,style:{cursor:"move"},children:[n.jsx("rect",{transform:"scale(1.8)",x:-p/2,y:-w/2,rx:"3",ry:"6",width:p,height:w,fill:j,stroke:"white",strokeWidth:"1"}),n.jsx("text",{className:"rmp-name__mrt",textAnchor:"middle",fill:C,fontSize:"15",dominantBaseline:"central",letterSpacing:"-0.2",children:d}),n.jsx("text",{className:"rmp-name__mrt",textAnchor:"left",x:"28",y:g?3.5:-3,fill:"black",fontSize:"10",letterSpacing:"-0.2",children:y}),!g&&c.split(",").map((B,_)=>n.jsx("g",{transform:"translate(".concat(34+14*_,", ").concat(4.5,")"),children:B.trim()!=="airport"?n.jsxs(n.Fragment,{children:[n.jsx("circle",{r:"6",fill:j}),n.jsx("text",{className:"rmp-name__mrt",textAnchor:"middle",fill:C,fontSize:"9",dominantBaseline:"central",letterSpacing:"-0.2",children:B})]}):n.jsxs("g",{transform:"translate(-6, -6) scale(4.5)",children:[n.jsx("path",{d:"M2.467 0H.226A.226.226 0 0 0 0 .226v2.241a.225.225 0 0 0 .226.225h2.241a.225.225 0 0 0 .225-.225V.226A.226.226 0 0 0 2.467 0",style:{fill:"#2d2a26"}}),n.jsx("path",{d:"M1.5.746v.3l.73.642a.08.08 0 0 1 .022.05v.12c0 .017-.012.025-.027.018L1.5 1.529l-.06.541.2.113a.03.03 0 0 1 .013.023V2.3a.01.01 0 0 1-.014.011l-.293-.091-.286.087a.01.01 0 0 1-.014-.007v-.09a.03.03 0 0 1 .013-.023l.2-.113-.059-.545-.724.348a.018.018 0 0 1-.028-.018v-.12a.07.07 0 0 1 .023-.05l.73-.642v-.3c0-.482.3-.482.3 0",style:{fill:"#fff",fillRule:"evenodd"}})]})},_))]})},E={lineCode:"EWL",name:"East-West Line",lines:"1, 2, 3, airport",isTram:!1,color:[T.Singapore,"ewl","#009739",L.white]},En=o=>{const{id:e,attrs:t,handleAttrsUpdate:r}=o,{t:l}=D(),s=[{type:"input",label:l("panel.details.nodes.common.nameEn"),value:t.name,onChange:a=>{t.name=a,r(e,t)},minW:"full"},{type:"input",label:l("panel.details.stations.common.lineCode"),value:t.lineCode,onChange:a=>{t.lineCode=a,r(e,t)},minW:"full"},{type:"switch",label:l("panel.details.nodes.mrtLineBadge.isTram"),isChecked:t.isTram,onChange:a=>{t.isTram=a,r(e,t)},minW:"full",oneLine:!0},...t.isTram?[]:[{type:"input",label:l("panel.details.nodes.common.num"),value:t.lines,onChange:a=>{t.lines=a,r(e,t)},minW:"full"}],{type:"custom",label:l("color"),component:n.jsx(k,{type:b.MRTLineBadge,defaultTheme:E.color}),minW:"full"}];return n.jsx(M,{fields:s})},Wn=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"2",rx:"10",ry:"10",width:"20",height:"20"}),n.jsx("text",{x:"9",y:"17",fill:"white",fontSize:"14",children:"1"})]}),Fn={component:In,icon:Wn,defaultAttrs:E,attrsComponent:En,metadata:{displayName:"panel.details.nodes.mrtLineBadge.displayName",tags:[]}},te=4,ie=7,oe=10,he=5,qn=5,z=qn*Math.SQRT1_2,ce=.25,le=(z*Math.SQRT2-ce)/2*Math.SQRT2,On=o=>{const{id:e,x:t,y:r,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{names:d=F.names,num:h=F.num,color:c=F.color,crosshatchPatternFill:y=F.crosshatchPatternFill}=l!=null?l:F,g=i.useRef(null),[f,u]=i.useState({height:10,width:12});i.useEffect(()=>u(g.current.getBBox()),[...d,u,g]);const x=i.useCallback(C=>s(e,C),[e,s]),p=i.useCallback(C=>a(e,C),[e,a]),w=i.useCallback(C=>m(e,C),[e,m]);return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(r,")"),onPointerDown:x,onPointerMove:p,onPointerUp:w,style:{cursor:"move"},children:[n.jsxs("defs",{children:[n.jsxs("clipPath",{id:"jr_east_fill_pattern_clip_path",patternUnits:"userSpaceOnUse",children:[n.jsx("polygon",{points:"0,0 0,".concat(le," ").concat(le,",0")}),n.jsx("polygon",{points:"".concat(z,",").concat(z," ").concat(z-le,",").concat(z," ").concat(z,",").concat(z-le)})]}),n.jsxs("pattern",{id:"jr_east_".concat(e,"_fill_pattern_").concat(c[2]),width:z,height:z,patternUnits:"userSpaceOnUse",children:[n.jsx("rect",{width:z,height:z,fill:c[2]}),n.jsx("line",{x1:"0",y1:"0",x2:z,y2:z,stroke:"white",strokeWidth:ce,strokeOpacity:"33%",clipPath:"url(#jr_east_fill_pattern_clip_path)"}),n.jsx("line",{x1:z,y1:"0",x2:"0",y2:z,stroke:"white",strokeWidth:ce,strokeOpacity:"33%"})]})]}),n.jsx("rect",{fill:y?"url(#jr_east_".concat(e,"_fill_pattern_").concat(c[2],")"):c[2],x:"0",y:"-1",width:f.width+te+10,height:f.height+1,rx:"1",stroke:"black",strokeWidth:"0.25"}),n.jsx("circle",{r:te,cx:ie,cy:oe/2+1,stroke:"black",strokeWidth:"0.25",fill:c[3]}),n.jsx("text",{x:ie,y:oe/2+1.75,textAnchor:"middle",dominantBaseline:"middle",fill:c[3]==="#000"?"white":c[2],fontSize:h>9?7:8,className:"rmp-name__jreast_en",children:h}),n.jsx(re,{ref:g,text:d[0].split("\n"),x:ie+te+1,y:"-1",fill:c[3],fontSize:oe,lineHeight:oe,grow:"down",className:"rmp-name__jreast_ja"}),n.jsx(re,{text:d[1].split("\n"),textAnchor:"middle",dominantBaseline:"hanging",x:(f.width+te+10)/2,y:f.height+1,fontSize:he,lineHeight:he,baseOffset:0,grow:"down",className:"rmp-name__jreast_en"})]})},F={names:["山手線","Yamanote Line"],color:[T.Tokyo,"jy","#9ACD32",L.black],num:9,crosshatchPatternFill:!1},Vn=o=>{const{id:e,attrs:t,handleAttrsUpdate:r}=o,{t:l}=D(),s=[{type:"input",label:l("panel.details.nodes.common.num"),value:String(t.num),validator:a=>!Number.isNaN(a),onChange:a=>{t.num=Number(a),r(e,t)},minW:"full"},{type:"textarea",label:l("panel.details.nodes.common.nameJa"),value:t.names[0],onChange:a=>{t.names[0]=a,r(e,t)},minW:"full"},{type:"textarea",label:l("panel.details.nodes.common.nameEn"),value:t.names[1],onChange:a=>{t.names[1]=a,r(e,t)},minW:"full"},{type:"switch",label:l("panel.details.nodes.jrEastLineBadge.crosshatchPatternFill"),oneLine:!0,isChecked:t.crosshatchPatternFill,onChange:a=>{t.crosshatchPatternFill=a,r(e,t)},minW:"full"},{type:"custom",label:l("color"),component:n.jsx(k,{type:b.JREastLineBadge,defaultTheme:F.color})}];return n.jsx(M,{fields:s})},Gn=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"1",y:"6",width:"22",height:"7"}),n.jsx("circle",{cx:"3.5",cy:"9.25",r:"2",fill:"white"}),n.jsx("text",{x:"3",y:"10.5",fontSize:"3",children:"9"}),n.jsx("text",{x:"6",y:"11.25",fontSize:"5",fill:"white",children:"山手線"}),n.jsx("text",{x:"1.5",y:"16",fontSize:"3",children:"Yamanote Line"})]}),Hn={component:On,icon:Gn,defaultAttrs:F,attrsComponent:Vn,metadata:{displayName:"panel.details.nodes.jrEastLineBadge.displayName",tags:[]}},Qn=o=>{const{id:e,x:t,y:r,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{num:d=q.num,numEn:h=q.numEn,color:c=q.color,showText:y=q.showText}=l!=null?l:q,g=i.useCallback(B=>s(e,B),[e,s]),f=i.useCallback(B=>a(e,B),[e,a]),u=i.useCallback(B=>m(e,B),[e,m]),x=c[3],[p,w,C,j]=Number(d)>=10?[-2.4,0,10.25,20]:[0,4,10,22];return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(r,")"),onPointerDown:g,onPointerMove:f,onPointerUp:u,style:{cursor:"move"},children:[n.jsx("rect",{fill:c[2],x:"0",width:"20",height:"20",rx:"2",ry:"2"}),n.jsx("text",{className:"rmp-name__zh",textAnchor:"left",x:w,y:C,fill:x,fontSize:j,fontWeight:"bold",letterSpacing:p,dominantBaseline:"central",children:d}),y&&n.jsxs(n.Fragment,{children:[n.jsx("text",{className:"rmp-name__zh",x:"22",y:"10.5",fontSize:"13",children:"号线"}),n.jsxs("text",{className:"rmp-name__en",x:"22.5",y:"19.5",fontSize:"8",children:["Line ",h]})]})]})},q={num:1,numEn:"1",showText:!0,color:[T.Qingdao,"qd1","#f7b000",L.white]},Xn=o=>{const{id:e,attrs:t,handleAttrsUpdate:r}=o,{t:l}=D(),s=[{type:"input",label:l("panel.details.nodes.common.num"),value:t.num.toString(),onChange:a=>{t.num=Number(a),t.numEn=a,r(e,t)}},{type:"input",label:l("panel.details.nodes.qingdaoMetroNumLineBadge.numEn"),value:t.numEn.toString(),onChange:a=>{t.numEn=a,r(e,t)}},{type:"switch",label:l("panel.details.nodes.qingdaoMetroNumLineBadge.showText"),isChecked:t.showText,oneLine:!0,onChange:a=>{t.showText=a,r(e,t)}},{type:"custom",label:l("color"),component:n.jsx(k,{type:b.QingdaoMetroNumLineBadge,defaultTheme:q.color})}];return n.jsx(M,{fields:s,minW:"full"})},Zn=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"6",rx:"1",ry:"1",width:"10",height:"10"}),n.jsx("text",{x:"4",y:"15",fill:"white",fontSize:"12",children:"1"}),n.jsx("text",{x:"12",y:"11.5",fill:"black",fontSize:"6",children:"号线"}),n.jsx("text",{x:"12",y:"15.5",fill:"black",fontSize:"4",children:"Line1"})]}),Jn={component:Qn,icon:Zn,defaultAttrs:q,attrsComponent:Xn,metadata:{displayName:"panel.details.nodes.qingdaoMetroNumLineBadge.displayName",tags:[]}},Yn=o=>{const{id:e,x:t,y:r,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{names:d=ae.names,color:h=ae.color}=l!=null?l:ae,c=i.useRef(null),[y,g]=i.useState({width:12});i.useEffect(()=>g(c.current.getBBox()),[...d,g,c]);const f=i.useCallback(p=>s(e,p),[e,s]),u=i.useCallback(p=>a(e,p),[e,a]),x=i.useCallback(p=>m(e,p),[e,m]);return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(r,")"),onPointerDown:f,onPointerMove:u,onPointerUp:x,style:{cursor:"move"},children:[n.jsx("rect",{rx:"2",ry:"2",fill:h[2],x:"0",width:y.width+7,height:"21"}),n.jsxs("g",{ref:c,children:[n.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",dominantBaseline:"hanging",x:(y.width+7)/2,y:"3",fontSize:"8.63",fill:h[3],children:d[0]}),n.jsx("text",{className:"rmp-name__en",textAnchor:"middle",dominantBaseline:"hanging",x:(y.width+7)/2,y:"14",fontSize:"3.54",fill:h[3],children:d[1]})]})]})},ae={names:["广清城际","Guangzhou-Qingyuan Intercity"],color:[T.Guangzhou,"ir","#2559a8",L.white]},Kn=o=>{const{id:e,attrs:t,handleAttrsUpdate:r}=o,{t:l}=D(),s=[{type:"input",label:l("panel.details.nodes.common.nameZh"),value:t.names[0],onChange:a=>{t.names[0]=a,r(e,t)},minW:"full"},{type:"input",label:l("panel.details.nodes.common.nameEn"),value:t.names[1],onChange:a=>{t.names[1]=a,r(e,t)},minW:"full"}];return n.jsx(M,{fields:s})},et=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"6",width:"20",height:"12"}),n.jsx("text",{x:"4.5",y:"11",fontSize:"4",fill:"white",children:"广清城际"}),n.jsx("text",{x:"3",y:"16",fontSize:"2",fill:"white",children:"Guangzhou-Qingyuan Intercity"})]}),nt={component:Yn,icon:et,defaultAttrs:ae,attrsComponent:Kn,metadata:{displayName:"panel.details.nodes.guangdongIntercityRailwayLineBadge.displayName",tags:[]}},tt=o=>{const{id:e,x:t,y:r,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,d=ve();l.content=d(l.contents);const h=se.component;return n.jsx(h,{id:e,x:t,y:r,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m,attrs:l})},ot={contents:{},...Le},lt={component:tt,icon:se.icon,defaultAttrs:ot,attrsComponent:se.attrsComponent,metadata:{displayName:"panel.details.nodes.i18nText.displayName",tags:[]}},at=o=>{var C;const{id:e,x:t,y:r,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,d=i.useCallback(j=>s(e,j),[e,s]),h=i.useCallback(j=>a(e,j),[e,a]),c=i.useCallback(j=>m(e,j),[e,m]),y=(j,...B)=>new Function(...B,"return ".concat(j)),g=(j,B,_)=>{var S;const N={};for(const P in j)if(Object.prototype.hasOwnProperty.call(j,P))try{N[P]=y(j[P].slice(1),...l.components.map(v=>v.label),"color")(...B.map((v,Z)=>_[Z]==="number"&&!Number.isNaN(Number(v))?Number(v):v),l.color?(S=l.color.value)!=null?S:l.color.defaultValue:"")}catch(v){N[P]=""}return N},f=l.nodeType==="MiscNode"?{onPointerDown:d,onPointerMove:h,onPointerUp:c,style:{cursor:"move"}}:{},u=j=>j.replace(/(^|,)\s*([^{},]+)/g,"$1 #".concat(e," $2")),x=j=>j.map(B=>{var S,P;const _=l.nodeType==="Station"&&l.core&&l.core===B.id?{id:"stn_core_".concat(e),onPointerDown:d,onPointerMove:h,onPointerUp:c,style:{cursor:"move"}}:{},N=g(B.attrs,l.components.map(v=>v.value),l.components.map(v=>v.type));return n.jsx("g",{transform:"translate(".concat((S=N.x)!=null?S:0,", ").concat((P=N.y)!=null?P:0,")"),children:i.createElement(B.type,{...N,x:0,y:0,..._},B.children?x(B.children):"_rmp_children_text"in N?B.type==="style"?u(N._rmp_children_text):N._rmp_children_text:null)},B.id)}),p=(C=l.transform)!=null?C:ue,w=i.useMemo(()=>x(l.svgs),[l]);return i.createElement("g",{id:e,transform:"translate(".concat(t,", ").concat(r,")"),...f},l.randomId?n.jsx("g",{transform:"translate(".concat(p.translateX,", ").concat(p.translateY,") scale(").concat(p.scale,") rotate(").concat(p.rotate,")"),children:w}):n.jsxs("g",{children:[n.jsx("circle",{r:"5.5"}),n.jsx("g",{transform:"translate(-4.7, -5) scale(0.8)",children:n.jsx("polygon",{points:"6,1 7.5,4.25 11,4.65 8.5,7.1 9.2,10.75 6,9 2.8,10.75 3.5,7.1 1,4.65 4.5,4.25",fill:"white"})})]}))},st={randomId:void 0,label:void 0,transform:ue,nodeType:"MiscNode",svgs:[],components:[]},it=o=>{var w,C,j,B,_;const{id:e,attrs:t,handleAttrsUpdate:r}=o,l=xe(),{paletteAppClip:{output:s}}=pe(N=>N.runtime),{t:a}=D(),[m,d]=i.useState(!1),[h,c]=i.useState(!1),y=N=>{var P;const S=t.components.find(v=>v.id===N);return S?(P=S.value)!=null?P:S.defaultValue:void 0},g=N=>{N.components.forEach((S,P)=>{var v;N.components[P].value=(v=y(S.id))!=null?v:S.defaultValue}),N.color!==void 0&&(N.color.value=t.color?t.color.value:N.color.defaultValue),r(e,N)},f=t.components.map((N,S)=>{const{label:P,type:v,defaultValue:Z,value:I}=N;return v==="number"||v==="text"?{label:a(P),type:"input",value:I!=null?I:Z,onChange:J=>{t.components[S].value=J,r(e,{...t,components:t.components})}}:v==="switch"?{label:a(P),type:"switch",isChecked:I!==void 0?!!I:Z,onChange:J=>{t.components[S].value=J,r(e,{...t,components:t.components})}}:v==="textarea"?{label:a(P),type:"textarea",value:I!=null?I:Z,onChange:J=>{t.components[S].value=J,r(e,{...t,components:t.components})}}:{type:"input",label:"undefined",value:"none"}}),[u,x]=i.useState(!1);i.useEffect(()=>{t.color&&u&&s&&(t.color.value=s,r(e,{...t,color:t.color}),x(!1))},[s==null?void 0:s.toString()]);const p=[{type:"custom",label:a("color"),component:n.jsx(ge,{theme:(w=t.color)==null?void 0:w.value,onClick:()=>{var N;x(!0),l(fe((N=t.color)==null?void 0:N.value))}})}];return n.jsxs(n.Fragment,{children:[n.jsxs(me,{direction:"row",mr:"auto",width:"100%",children:[n.jsx(ye,{width:"100%",overflow:"hidden",label:a("panel.details.nodes.master.type"),children:n.jsxs(me,{width:"100%",overflow:"hidden",children:[n.jsx(de,{name:(C=t.label)!=null?C:a("panel.details.nodes.master.undefined"),fg:(j=t.labelColorFg)!=null?j:L.white,bg:(B=t.labelColorBg)!=null?B:"#000000",sx:{display:"inline-block",overflow:"hidden",textOverflow:"ellipsis"},mr:1}),n.jsx(de,{name:(_=t.randomId)!=null?_:"UNDEFINED",fg:L.white,bg:t.randomId?"#19B3EA":"#000000",sx:{display:"inline-block"},mr:1})]})}),n.jsx(Be,{}),n.jsx(we,{icon:n.jsx(be,{}),onClick:()=>d(!0),"aria-label":"upload"})]}),n.jsx(Ne,{width:"100%",leftIcon:n.jsx(je,{}),onClick:()=>c(!0),children:a("header.settings.procedures.masterManager.title")}),t.randomId&&n.jsx(M,{fields:f,minW:"full"}),t.randomId&&t.color!==void 0&&n.jsx(M,{fields:p,minW:"full"}),n.jsx(Se,{isOpen:m,onClose:()=>d(!1),onSubmit:g}),n.jsx(Pe,{isOpen:h,onClose:()=>c(!1)})]})},rt=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("circle",{cx:"12",cy:"12",r:"6",stroke:"currentColor",fill:"none"}),n.jsx("g",{transform:"translate(7.25, 7) scale(0.8)",children:n.jsx("polygon",{points:"6,1 7.5,4.25 11,4.65 8.5,7.1 9.2,10.75 6,9 2.8,10.75 3.5,7.1 1,4.65 4.5,4.25",fill:"currentColor"})})]}),ct={component:at,icon:rt,defaultAttrs:st,attrsComponent:it,metadata:{displayName:"panel.details.nodes.master.displayName",tags:[]}},xt={[b.Virtual]:_e,[b.ShmetroNumLineBadge]:Ie,[b.ShmetroTextLineBadge]:qe,[b.GzmtrLineBadge]:He,[b.BjsubwayNumLineBadge]:Ye,[b.BjsubwayTextLineBadge]:ln,[b.SuzhouRTNumLineBadge]:dn,[b.BerlinSBahnLineBadge]:jn,[b.BerlinUBahnLineBadge]:pn,[b.ChongqingRTNumLineBadge]:Ln,[b.ChongqingRTTextLineBadge]:zn,[b.ShenzhenMetroNumLineBadge]:_n,[b.MRTDestinationNumbers]:Dn,[b.MRTLineBadge]:Fn,[b.JREastLineBadge]:Hn,[b.QingdaoMetroNumLineBadge]:Jn,[b.GuangdongIntercityRailwayLineBadge]:nt,[b.Facilities]:Te,[b.Text]:se,[b.I18nText]:lt,[b.Master]:ct};export{xt as m}; diff --git a/assets/misc-nodes-legacy-CSfzn9IA.js b/assets/misc-nodes-legacy-DUcImzkb.js similarity index 99% rename from assets/misc-nodes-legacy-CSfzn9IA.js rename to assets/misc-nodes-legacy-DUcImzkb.js index e7451eaf8..d2e7a6f5c 100644 --- a/assets/misc-nodes-legacy-CSfzn9IA.js +++ b/assets/misc-nodes-legacy-DUcImzkb.js @@ -1 +1 @@ -System.register(["./index-legacy-iSkJTZGA.js","./chakra-legacy--ElhKRU8.js","./react-legacy-CB7hQk4J.js","./master-manager-legacy-BrdnNHXw.js"],(function(e,n){"use strict";var t,l,a,o,i,s,r,d,c,m,h,u,x,p,f,g,y,j,b,w,v,N,C,P,S,B,_,z,k,L;return{setters:[e=>{t=e.aM,l=e.C,a=e.M,o=e.aN,i=e.aw,s=e.i,r=e.aO,d=e.c,c=e.d,m=e.V,h=e.W,u=e.P,x=e.R,p=e.D,f=e.ai},e=>{g=e.j,y=e.g,j=e.a$,b=e.af,w=e.O},e=>{v=e.b,N=e.u},e=>{C=e.L,P=e.g,S=e.h,B=e.t,_=e.j,z=e.k,k=e.M,L=e.n}],execute:function(){const n={component:e=>{const{id:n,x:t,y:l,handlePointerDown:a,handlePointerMove:o,handlePointerUp:i}=e,s=v.useCallback((e=>a(n,e)),[n,a]),r=v.useCallback((e=>o(n,e)),[n,o]),d=v.useCallback((e=>i(n,e)),[n,i]);return g.jsxs("g",{id:n,transform:`translate(${t}, ${l})rotate(45)`,onPointerDown:s,onPointerMove:r,onPointerUp:d,style:{cursor:"move"},className:"removeMe",children:[g.jsx("line",{x1:"-5",y1:"0",x2:"5",y2:"0",stroke:"black"}),g.jsx("line",{x1:"0",y1:"-5",x2:"0",y2:"5",stroke:"black"}),g.jsx("circle",{id:`virtual_circle_${n}`,r:5,stroke:"black",fill:"white",fillOpacity:"0"})]})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,transform:"rotate(45)",focusable:!1,children:[g.jsx("circle",{cx:"12",cy:"12",r:"6",stroke:"currentColor",fill:"none"}),g.jsx("line",{x1:"6",y1:"12",x2:"18",y2:"12",stroke:"currentColor"}),g.jsx("line",{x1:"12",y1:"6",x2:"12",y2:"18",stroke:"currentColor"})]}),defaultAttrs:{},attrsComponent:()=>g.jsx(t,{fields:[]}),metadata:{displayName:"panel.details.nodes.virtual.displayName",tags:[]}},M={num:1,color:[l.Shanghai,"sh1","#E4002B",a.white]},A=[{type:"input",label:"panel.details.nodes.common.num",value:e=>(null!=e?e:M).num,validator:e=>!Number.isNaN(e),onChange:(e,n)=>{const t=null!=n?n:M;return Number.isNaN(e)||(t.num=Number(e)),t}},{type:"custom",label:"color",component:g.jsx(o,{type:i.ShmetroNumLineBadge,defaultTheme:M.color})}],$={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:s}=e,{num:r=M.num,color:d=M.color}=null!=a?a:M,[c,m]=r>=10?[22.67,10.75]:[21,10],h=v.useCallback((e=>o(n,e)),[n,o]),u=v.useCallback((e=>i(n,e)),[n,i]),x=v.useCallback((e=>s(n,e)),[n,s]);return g.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:h,onPointerMove:u,onPointerUp:x,style:{cursor:"move"},children:[g.jsx("rect",{fill:d[2],width:c,height:"22.67"}),g.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",x:m,y:"19",fill:d[3],fontSize:"21.33",letterSpacing:"-1.75",children:r}),g.jsx("text",{className:"rmp-name__zh",x:c+2,y:"12",fontSize:"14.67",children:"号线"}),g.jsxs("text",{className:"rmp-name__en",x:c+4,y:"21.5",fontSize:"8",children:["Line ",r]})]})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("rect",{fill:"currentColor",x:"2",y:"4",width:"10",height:"16"}),g.jsx("text",{x:"4",y:"18",fill:"white",children:"1"}),g.jsx("text",{x:"14",y:"10",fontSize:"5",children:"号线"}),g.jsx("text",{x:"14",y:"18",fontSize:"4",children:"Line 1"})]}),defaultAttrs:M,attrsComponent:()=>g.jsx(t,{fields:A}),metadata:{displayName:"panel.details.nodes.shmetroNumLineBadge.displayName",tags:[]}},T={names:["浦江线","Pujiang Line"],color:[l.Shanghai,"pjl","#B5B5B6",a.white]},U={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:s}=e,{names:r=T.names,color:d=T.color}=null!=a?a:T,c=v.useRef(null),[m,h]=v.useState({width:12});v.useEffect((()=>h(c.current.getBBox())),[...r,h,c]);const u=v.useCallback((e=>o(n,e)),[n,o]),x=v.useCallback((e=>i(n,e)),[n,i]),p=v.useCallback((e=>s(n,e)),[n,s]);return g.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:u,onPointerMove:x,onPointerUp:p,style:{cursor:"move"},children:[g.jsx("rect",{fill:d[2],x:"0",width:m.width+7,height:"21"}),g.jsxs("g",{ref:c,children:[g.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",dominantBaseline:"hanging",x:(m.width+7)/2,y:"3",fontSize:"10",fill:d[3],letterSpacing:"-0.25",children:r[0]}),g.jsx("text",{className:"rmp-name__en",textAnchor:"middle",dominantBaseline:"hanging",x:(m.width+7)/2,y:"14",fontSize:"5",fill:d[3],letterSpacing:"-0.25",children:r[1]})]})]})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("rect",{fill:"currentColor",x:"2",y:"6",width:"20",height:"12"}),g.jsx("text",{x:"5",y:"11",fontSize:"5",fill:"white",children:"浦江线"}),g.jsx("text",{x:"3",y:"16",fontSize:"4",fill:"white",children:"Pujiang Line"})]}),defaultAttrs:T,attrsComponent:e=>{const{id:n,attrs:t,handleAttrsUpdate:l}=e,{t:a}=N(),r=[{type:"input",label:a("panel.details.nodes.common.nameZh"),value:t.names[0],onChange:e=>{t.names[0]=e,l(n,t)},minW:"full"},{type:"input",label:a("panel.details.nodes.common.nameEn"),value:t.names[1],onChange:e=>{t.names[1]=e,l(n,t)},minW:"full"},{type:"custom",label:a("color"),component:g.jsx(o,{type:i.ShmetroTextLineBadge,defaultTheme:T.color})}];return g.jsx(s,{fields:r})},metadata:{displayName:"panel.details.nodes.shmetroTextLineBadge.displayName",tags:[]}},D={names:["1号线","Line 1"],color:[l.Guangzhou,"gz1","#F3D03E",a.black],tram:!1,span:!0},W={component:e=>{var n,t;const{id:l,x:a,y:o,attrs:i,handlePointerDown:s,handlePointerMove:r,handlePointerUp:d}=e,{names:c=D.names,color:m=D.color,tram:h=D.tram,span:u=D.span}=null!=i?i:D,x=v.useCallback((e=>s(l,e)),[l,s]),p=v.useCallback((e=>r(l,e)),[l,r]),f=v.useCallback((e=>d(l,e)),[l,d]);return g.jsx("g",{id:l,transform:`translate(${a}, ${o})scale(${h?.5:1})`,onPointerDown:x,onPointerMove:p,onPointerUp:f,style:{cursor:"move"},children:g.jsx(C,{zhName:null!==(n=c.at(0))&&void 0!==n?n:"",enName:null!==(t=c.at(1))&&void 0!==t?t:"",zhClassName:"rmp-name__zh",enClassName:"rmp-name__en",foregroundColour:m[3],backgroundColour:m[2],spanDigits:u})})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("rect",{fill:"currentColor",x:"2",y:"5",width:"20",height:"14",rx:"1"}),g.jsx("text",{x:"6",y:"15",textAnchor:"middle",fontSize:"10",fill:"white",children:"1"}),g.jsx("text",{x:"15",y:"12",textAnchor:"middle",fontSize:"6",fill:"white",children:"号线"}),g.jsx("text",{x:"14.5",y:"17",textAnchor:"middle",fontSize:"4",fill:"white",children:"Line 1"})]}),defaultAttrs:D,attrsComponent:e=>{const{id:n,attrs:t,handleAttrsUpdate:l}=e,{t:a}=N(),r=[{type:"input",label:a("panel.details.nodes.common.nameZh"),value:t.names[0],onChange:e=>{t.names[0]=e,l(n,t)},minW:"full"},{type:"input",label:a("panel.details.nodes.common.nameEn"),value:t.names[1],onChange:e=>{t.names[1]=e,l(n,t)},minW:"full"},{type:"switch",label:a("panel.details.nodes.gzmtrLineBadge.tram"),oneLine:!0,isChecked:t.tram,onChange:e=>{t.tram=e,l(n,t)},minW:"full"},{type:"switch",label:a("panel.details.nodes.gzmtrLineBadge.span"),oneLine:!0,isChecked:t.span,onChange:e=>{t.span=e,l(n,t)},minW:"full"},{type:"custom",label:a("color"),component:g.jsx(o,{type:i.GzmtrLineBadge,defaultTheme:D.color})}];return g.jsx(s,{fields:r})},metadata:{displayName:"panel.details.nodes.gzmtrLineBadge.displayName",tags:[]}},E=11.84375,R={num:1,color:[l.Beijing,"bj1","#c23a30",a.white]},F=[{type:"input",label:"panel.details.nodes.common.num",value:e=>(null!=e?e:R).num,validator:e=>!Number.isNaN(e),onChange:(e,n)=>{const t=null!=n?n:R;return Number.isNaN(e)||(t.num=Number(e)),t}},{type:"custom",label:"color",component:g.jsx(o,{type:i.BjsubwayNumLineBadge,defaultTheme:R.color})}],I={component:e=>{const{id:n,x:t,y:l,attrs:o,handlePointerDown:i,handlePointerMove:s,handlePointerUp:r}=e,{num:d=R.num,color:c=R.color}=null!=o?o:R,m=v.useCallback((e=>i(n,e)),[n,i]),h=v.useCallback((e=>s(n,e)),[n,s]),u=v.useCallback((e=>r(n,e)),[n,r]),x=c[3]===a.black?"#003670":a.white;return g.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:m,onPointerMove:h,onPointerUp:u,style:{cursor:"move"},children:[g.jsx("rect",{fill:c[2],x:"0",width:32.84375,height:"16",rx:"2"}),g.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",x:7.921875,y:"13.5",fill:x,fontSize:"15",letterSpacing:"-1.5",children:d}),g.jsx("text",{className:"rmp-name__zh",x:E+(d>9?5.5:3),y:"8.5",fontSize:"7",fill:x,children:"号线"}),g.jsxs("text",{className:"rmp-name__en",x:E+(d>9?6:4.5),y:"13.5",fontSize:"4",fill:x,children:["Line ",d]})]})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("rect",{fill:"currentColor",x:"2",y:"4",width:"20",height:"16",rx:"2"}),g.jsx("text",{x:"4",y:"17",fill:"white",fontSize:"14",children:"1"}),g.jsx("text",{x:"11",y:"11",fill:"white",fontSize:"5",children:"号线"}),g.jsx("text",{x:"11",y:"17",fill:"white",fontSize:"4",children:"Line 1"})]}),defaultAttrs:R,attrsComponent:()=>g.jsx(t,{fields:F}),metadata:{displayName:"panel.details.nodes.bjsubwayNumLineBadge.displayName",tags:[]}},q={names:["八通线","Batong Line"],color:[l.Beijing,"bj1","#c23a30",a.white]},O=[{type:"input",label:"panel.details.nodes.common.nameZh",value:e=>(null!=e?e:q).names[0],onChange:(e,n)=>{const t=null!=n?n:q;return t.names[0]=e.toString(),t}},{type:"input",label:"panel.details.nodes.common.nameEn",value:e=>(null!=e?e:q).names[1],onChange:(e,n)=>{const t=null!=n?n:q;return t.names[1]=e.toString(),t}},{type:"custom",label:"color",component:g.jsx(o,{type:i.BjsubwayTextLineBadge,defaultTheme:q.color})}],V={component:e=>{const{id:n,x:t,y:l,attrs:o,handlePointerDown:i,handlePointerMove:s,handlePointerUp:r}=e,{names:d=q.names,color:c=q.color}=null!=o?o:q,m=v.useRef(null),[h,u]=v.useState({width:12});v.useEffect((()=>u(m.current.getBBox())),[...d,u,m]);const x=v.useCallback((e=>i(n,e)),[n,i]),p=v.useCallback((e=>s(n,e)),[n,s]),f=v.useCallback((e=>r(n,e)),[n,r]),y=Math.max(28.84375,h.width),j=c[3]===a.black?"#003670":a.white;return g.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:x,onPointerMove:p,onPointerUp:f,style:{cursor:"move"},children:[g.jsx("rect",{fill:c[2],x:"0",width:y+4,height:"16",rx:"2"}),g.jsxs("g",{ref:m,children:[g.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",x:(y+4)/2,y:"8",fontSize:"7",fill:j,children:d[0]}),g.jsx("text",{className:"rmp-name__en",textAnchor:"middle",x:(y+4)/2,y:"13.5",fontSize:"4",fill:j,children:d[1]})]})]})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("rect",{fill:"currentColor",x:"2",y:"6",width:"20",height:"12",rx:"2"}),g.jsx("text",{x:"3",y:"12",fontSize:"6",fill:"white",children:"八通线"}),g.jsx("text",{x:"3",y:"16",fontSize:"3.2",fill:"white",children:"Batong Line"})]}),defaultAttrs:q,attrsComponent:()=>g.jsx(t,{fields:O}),metadata:{displayName:"panel.details.nodes.bjsubwayTextLineBadge.displayName",tags:[]}},Q={num:1,branch:!1,color:[l.Suzhou,"sz1","#78BA25",a.white]},G=[{type:"input",label:"panel.details.nodes.common.num",value:e=>(null!=e?e:Q).num,validator:e=>!Number.isNaN(e),onChange:(e,n)=>{const t=null!=n?n:Q;return Number.isNaN(e)||(t.num=Number(e)),t}},{type:"switch",label:"panel.details.nodes.suzhouRTNumLineBadge.branch",isChecked:e=>{var n;return null!==(n=null==e?void 0:e.branch)&&void 0!==n?n:Q.branch},onChange:(e,n)=>{const t=null!=n?n:Q;return t.branch=e,t}},{type:"custom",label:"color",component:g.jsx(o,{type:i.SuzhouRTNumLineBadge,defaultTheme:Q.color})}],Z={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:s}=e,{num:r=Q.num,branch:d=Q.branch,color:c=Q.color}=null!=a?a:Q,m=v.useCallback((e=>o(n,e)),[n,o]),h=v.useCallback((e=>i(n,e)),[n,i]),u=v.useCallback((e=>s(n,e)),[n,s]);return g.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:m,onPointerMove:h,onPointerUp:u,style:{cursor:"move"},children:[g.jsx("rect",{fill:c[2],width:"20",height:"20",rx:"2",ry:"2"}),g.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",dominantBaseline:"middle",x:"10",y:"11.4",fill:c[3],fontSize:"15",letterSpacing:"-1",children:r}),d&&g.jsxs(g.Fragment,{children:[g.jsx("text",{className:"rmp-name__zh",x:22.5,y:"10",fontSize:"10",children:"支线"}),g.jsx("text",{className:"rmp-name__en",x:22.5,y:"18",fontSize:"5",fill:"gray",children:"Branch line"})]})]})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("rect",{fill:"currentColor",x:"4",y:"4",width:"16",height:"16",rx:"3",ry:"3"}),g.jsx("text",{x:"12",y:"13.4",textAnchor:"middle",dominantBaseline:"middle",fill:"white",fontSize:"14",children:"1"})]}),defaultAttrs:Q,attrsComponent:()=>g.jsx(t,{fields:G}),metadata:{displayName:"panel.details.nodes.suzhouRTNumLineBadge.displayName",tags:[]}},H={num:1,color:[l.Berlin,"bu1","#62AD2D",a.white]},J=[{type:"input",label:"panel.details.nodes.common.num",value:e=>(null!=e?e:H).num,validator:e=>!Number.isNaN(e),onChange:(e,n)=>{const t=null!=n?n:H;return Number.isNaN(e)||(t.num=Number(e)),t}},{type:"custom",label:"color",component:g.jsx(o,{type:i.BerlinUBahnLineBadge,defaultTheme:H.color})}],Y={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:s}=e,{num:r=H.num,color:d=H.color}=null!=a?a:H,c=v.useCallback((e=>o(n,e)),[n,o]),m=v.useCallback((e=>i(n,e)),[n,i]),h=v.useCallback((e=>s(n,e)),[n,s]),u=d[3];return g.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:c,onPointerMove:m,onPointerUp:h,style:{cursor:"move"},children:[g.jsx("rect",{fill:d[2],x:"0",width:"25",height:"15"}),g.jsxs("text",{className:"rmp-name__berlin",textAnchor:"middle",x:"12.5",y:"12.5",fill:u,fontSize:"14",letterSpacing:"1",children:["U",r]})]})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("rect",{fill:"currentColor",x:"2",y:"4",width:"20",height:"16"}),g.jsx("text",{x:"4",y:"17",fill:"white",fontSize:"14",children:"U1"})]}),defaultAttrs:H,attrsComponent:()=>g.jsx(t,{fields:J}),metadata:{displayName:"panel.details.nodes.berlinUBahnLineBadge.displayName",tags:[]}},K={num:1,color:[l.Berlin,"bs1","#DD6CA6",a.white]},X=[{type:"input",label:"panel.details.nodes.common.num",value:e=>(null!=e?e:K).num,validator:e=>!Number.isNaN(e),onChange:(e,n)=>{const t=null!=n?n:K;return Number.isNaN(e)||(t.num=Number(e)),t}},{type:"custom",label:"color",component:g.jsx(o,{type:i.BerlinSBahnLineBadge,defaultTheme:K.color})}],ee={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:s}=e,{num:r=K.num,color:d=K.color}=null!=a?a:K,[c,m]=r>=10?[6,19.75]:[10,20],h=v.useCallback((e=>o(n,e)),[n,o]),u=v.useCallback((e=>i(n,e)),[n,i]),x=v.useCallback((e=>s(n,e)),[n,s]),p=d[3];return g.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:h,onPointerMove:u,onPointerUp:x,style:{cursor:"move"},children:[g.jsx("rect",{fill:d[2],x:"0",width:"30",height:"15",rx:"8"}),g.jsx("text",{className:"rmp-name__berlin",textAnchor:"middle",x:c,y:"12.5",fill:p,fontSize:"14",letterSpacing:"0",children:"S"}),g.jsx("text",{className:"rmp-name__berlin",textAnchor:"middle",x:m,y:"12.5",fill:p,fontSize:"14",letterSpacing:"-0.2",children:r})]})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("rect",{fill:"currentColor",x:"2",y:"4",width:"20",height:"16",rx:"8"}),g.jsx("text",{x:"4.5",y:"16.5",fill:"white",fontSize:"14",children:"S1"})]}),defaultAttrs:K,attrsComponent:()=>g.jsx(t,{fields:X}),metadata:{displayName:"panel.details.nodes.berlinSBahnLineBadge.displayName",tags:[]}},ne={num:1,color:[l.Chongqing,"cq1","#e4002b",a.white]},te=[{type:"input",label:"panel.details.nodes.common.num",value:e=>(null!=e?e:ne).num,validator:e=>!Number.isNaN(e),onChange:(e,n)=>{const t=null!=n?n:ne;return Number.isNaN(Number(e))?t.num=e:t.num=Number(e),t}},{type:"custom",label:"color",component:g.jsx(o,{type:i.ChongqingRTNumLineBadge,defaultTheme:ne.color})}],le={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:s}=e,{num:r=ne.num,color:d=ne.color}=null!=a?a:ne,c=v.useCallback((e=>o(n,e)),[n,o]),m=v.useCallback((e=>i(n,e)),[n,i]),h=v.useCallback((e=>s(n,e)),[n,s]),u=d[3],x=Number.isInteger(r)?16:15,[p,f]=Number.isInteger(r)?Number(r)>=10?[-1.2,1.5]:[0,5.5]:[0,2.55];return g.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:c,onPointerMove:m,onPointerUp:h,style:{cursor:"move"},children:[g.jsx("rect",{fill:d[2],x:"0",width:"20",height:"20",rx:"10",ry:"10"}),g.jsx("text",{className:"rmp-name__zh",textAnchor:"left",x:f,y:"10",fill:u,fontSize:x,letterSpacing:p,dominantBaseline:"central",children:r})]})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("rect",{fill:"currentColor",x:"2",y:"2",rx:"10",ry:"10",width:"20",height:"20"}),g.jsx("text",{x:"8",y:"18",fill:"white",fontSize:"18",children:"1"})]}),defaultAttrs:ne,attrsComponent:()=>g.jsx(t,{fields:te}),metadata:{displayName:"panel.details.nodes.chongqingRTNumLineBadge.displayName",tags:[]}},ae={names:["空港线","Konggang Line"],color:[l.Chongqing,"cq3","#003da5",a.white]},oe=[{type:"input",label:"panel.details.nodes.common.nameZh",value:e=>(null!=e?e:ae).names[0],onChange:(e,n)=>{const t=null!=n?n:ae;return t.names[0]=e.toString(),t}},{type:"textarea",label:"panel.details.nodes.common.nameEn",value:e=>(null!=e?e:ae).names[1],onChange:(e,n)=>{const t=null!=n?n:ae;return t.names[1]=e.toString(),t}},{type:"custom",label:"color",component:g.jsx(o,{type:i.ChongqingRTTextLineBadge,defaultTheme:ae.color})}],ie={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:s}=e,{names:r=ae.names,color:d=ae.color}=null!=a?a:ae,c=v.useRef(null),m=v.useCallback((e=>o(n,e)),[n,o]),h=v.useCallback((e=>i(n,e)),[n,i]),u=v.useCallback((e=>s(n,e)),[n,s]),x=d[3];return g.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:m,onPointerMove:h,onPointerUp:u,style:{cursor:"move"},children:[g.jsx("rect",{fill:d[2],x:"0",width:"20",height:"20",rx:"10",ry:"10"}),g.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",x:"10",y:"10.5",fill:x,fontSize:"6",letterSpacing:"0",children:r[0]}),g.jsx(P,{ref:c,text:r[1].split("\n"),className:"rmp-name__en",textAnchor:"middle",x:"10",y:"9.25",fill:x,fontSize:"2.5",letterSpacing:"0",lineHeight:2.25,grow:"down"})]})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("rect",{fill:"currentColor",x:"2",y:"2",rx:"10",ry:"10",width:"20",height:"20"}),g.jsx("text",{x:"4.5",y:"12.5",fill:"white",fontSize:"5",children:"空港线"}),g.jsx("text",{x:"4.5",y:"15",fill:"white",fontSize:"2",children:"Konggang Line"})]}),defaultAttrs:ae,attrsComponent:()=>g.jsx(t,{fields:oe}),metadata:{displayName:"panel.details.nodes.chongqingRTTextLineBadge.displayName",tags:[]}},se=11.84375,re={num:1,color:[l.Shenzhen,"sz1","#00b140",a.white],isBranch:!1},de={component:e=>{const{id:n,x:t,y:l,attrs:o,handlePointerDown:i,handlePointerMove:s,handlePointerUp:r}=e,{num:d=re.num,color:c=re.color,isBranch:m=re.isBranch}=null!=o?o:re,h=v.useCallback((e=>i(n,e)),[n,i]),u=v.useCallback((e=>s(n,e)),[n,s]),x=v.useCallback((e=>r(n,e)),[n,r]),p=c[3]===a.black?"#003670":a.white,f=m?10:se+(d>9?6.5:3),y=m?-1:0,j=m?11:se+(d>9?7:3.5),b=m?6:9.921875;return g.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:h,onPointerMove:u,onPointerUp:x,style:{cursor:"move"},children:[g.jsx("rect",{fill:c[2],x:"0",width:32.84375,height:"16",rx:"2"}),g.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",x:b,y:"13.5",fill:p,fontSize:"15",letterSpacing:"-1",children:d}),g.jsxs("text",{className:"rmp-name__zh",x:f,y:"9.5",fontSize:"6",fill:p,letterSpacing:y,children:["号线",m?"支线":""]}),g.jsxs("text",{className:"rmp-name__en",x:j,y:"13.5",fontSize:"3",fill:p,children:[m?"Branch":""," Line ",d]})]})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("rect",{fill:"currentColor",x:"2",y:"4",width:"20",height:"16",rx:"2"}),g.jsx("text",{x:"4",y:"17",fill:"white",fontSize:"14",children:"1"}),g.jsx("text",{x:"11",y:"14",fill:"white",fontSize:"5",children:"号线"}),g.jsx("text",{x:"12",y:"17",fill:"white",fontSize:"3",children:"Line 1"})]}),defaultAttrs:re,attrsComponent:e=>{const{id:n,attrs:t,handleAttrsUpdate:l}=e,{t:a}=N(),r=[{type:"input",label:a("panel.details.nodes.common.num"),value:String(t.num),validator:e=>!Number.isNaN(e),onChange:e=>{t.num=Number(e),l(n,t)},minW:"full"},{type:"custom",label:a("color"),component:g.jsx(o,{type:i.ShenzhenMetroNumLineBadge,defaultTheme:re.color}),minW:"full"},{type:"switch",label:a("panel.details.nodes.shenzhenMetroNumLineBadge.branch"),oneLine:!0,isChecked:t.isBranch,onChange:e=>{t.isBranch=e,l(n,t)},minW:"full"}];return g.jsx(s,{fields:r})},metadata:{displayName:"panel.details.nodes.shenzhenMetroNumLineBadge.displayName",tags:[]}},ce={num:1,color:[l.Singapore,"ewl","#009739",a.white]},me={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:s}=e,{num:r=ce.num,color:d=ce.color}=null!=a?a:ce,c=v.useCallback((e=>o(n,e)),[n,o]),m=v.useCallback((e=>i(n,e)),[n,i]),h=v.useCallback((e=>s(n,e)),[n,s]),u=d[3],x=d[2];return g.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:c,onPointerMove:m,onPointerUp:h,style:{cursor:"move"},children:[g.jsx("circle",{r:"8",fill:x}),g.jsx("text",{className:"rmp-name__mrt",textAnchor:"middle",x:"0",y:"0",width:"12",height:"12",fill:u,fontSize:"12",dominantBaseline:"central",letterSpacing:"-0.2",children:r})]})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("rect",{fill:"currentColor",x:"2",y:"2",rx:"10",ry:"10",width:"20",height:"20"}),g.jsx("text",{x:"9",y:"17",fill:"white",fontSize:"14",children:"1"})]}),defaultAttrs:ce,attrsComponent:e=>{const{id:n,attrs:t,handleAttrsUpdate:l}=e,{t:a}=N(),r=[{type:"input",label:a("panel.details.nodes.common.num"),value:String(t.num),validator:e=>!Number.isNaN(e),onChange:e=>{t.num=Number(e),l(n,t)},minW:"full"},{type:"custom",label:a("color"),component:g.jsx(o,{type:i.MRTDestinationNumbers,defaultTheme:ce.color}),minW:"full"}];return g.jsx(s,{fields:r})},metadata:{displayName:"panel.details.nodes.mrtDestinationNumbers.displayName",tags:[]}},he={lineCode:"EWL",name:"East-West Line",lines:"1, 2, 3, airport",isTram:!1,color:[l.Singapore,"ewl","#009739",a.white]},ue={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:s}=e,{lineCode:r=he.lineCode,color:d=he.color,lines:c=he.lines,name:m=he.name,isTram:h=he.isTram}=null!=a?a:he,u=v.useCallback((e=>o(n,e)),[n,o]),x=v.useCallback((e=>i(n,e)),[n,i]),p=v.useCallback((e=>s(n,e)),[n,s]),f=12.935,y=d[3],j=d[2];return g.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:u,onPointerMove:x,onPointerUp:p,style:{cursor:"move"},children:[g.jsx("rect",{transform:"scale(1.8)",x:-11.425,y:-6.4675,rx:"3",ry:"6",width:22.85,height:f,fill:j,stroke:"white",strokeWidth:"1"}),g.jsx("text",{className:"rmp-name__mrt",textAnchor:"middle",fill:y,fontSize:"15",dominantBaseline:"central",letterSpacing:"-0.2",children:r}),g.jsx("text",{className:"rmp-name__mrt",textAnchor:"left",x:"28",y:h?3.5:-3,fill:"black",fontSize:"10",letterSpacing:"-0.2",children:m}),!h&&c.split(",").map(((e,n)=>g.jsx("g",{transform:`translate(${34+14*n}, 4.5)`,children:"airport"!==e.trim()?g.jsxs(g.Fragment,{children:[g.jsx("circle",{r:"6",fill:j}),g.jsx("text",{className:"rmp-name__mrt",textAnchor:"middle",fill:y,fontSize:"9",dominantBaseline:"central",letterSpacing:"-0.2",children:e})]}):g.jsxs("g",{transform:"translate(-6, -6) scale(4.5)",children:[g.jsx("path",{d:"M2.467 0H.226A.226.226 0 0 0 0 .226v2.241a.225.225 0 0 0 .226.225h2.241a.225.225 0 0 0 .225-.225V.226A.226.226 0 0 0 2.467 0",style:{fill:"#2d2a26"}}),g.jsx("path",{d:"M1.5.746v.3l.73.642a.08.08 0 0 1 .022.05v.12c0 .017-.012.025-.027.018L1.5 1.529l-.06.541.2.113a.03.03 0 0 1 .013.023V2.3a.01.01 0 0 1-.014.011l-.293-.091-.286.087a.01.01 0 0 1-.014-.007v-.09a.03.03 0 0 1 .013-.023l.2-.113-.059-.545-.724.348a.018.018 0 0 1-.028-.018v-.12a.07.07 0 0 1 .023-.05l.73-.642v-.3c0-.482.3-.482.3 0",style:{fill:"#fff",fillRule:"evenodd"}})]})},n)))]})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("rect",{fill:"currentColor",x:"2",y:"2",rx:"10",ry:"10",width:"20",height:"20"}),g.jsx("text",{x:"9",y:"17",fill:"white",fontSize:"14",children:"1"})]}),defaultAttrs:he,attrsComponent:e=>{const{id:n,attrs:t,handleAttrsUpdate:l}=e,{t:a}=N(),r=[{type:"input",label:a("panel.details.nodes.common.nameEn"),value:t.name,onChange:e=>{t.name=e,l(n,t)},minW:"full"},{type:"input",label:a("panel.details.stations.common.lineCode"),value:t.lineCode,onChange:e=>{t.lineCode=e,l(n,t)},minW:"full"},{type:"switch",label:a("panel.details.nodes.mrtLineBadge.isTram"),isChecked:t.isTram,onChange:e=>{t.isTram=e,l(n,t)},minW:"full",oneLine:!0},...t.isTram?[]:[{type:"input",label:a("panel.details.nodes.common.num"),value:t.lines,onChange:e=>{t.lines=e,l(n,t)},minW:"full"}],{type:"custom",label:a("color"),component:g.jsx(o,{type:i.MRTLineBadge,defaultTheme:he.color}),minW:"full"}];return g.jsx(s,{fields:r})},metadata:{displayName:"panel.details.nodes.mrtLineBadge.displayName",tags:[]}},xe=5*Math.SQRT1_2,pe=.25,fe=(xe*Math.SQRT2-pe)/2*Math.SQRT2,ge={names:["山手線","Yamanote Line"],color:[l.Tokyo,"jy","#9ACD32",a.black],num:9,crosshatchPatternFill:!1},ye={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:s}=e,{names:r=ge.names,num:d=ge.num,color:c=ge.color,crosshatchPatternFill:m=ge.crosshatchPatternFill}=null!=a?a:ge,h=v.useRef(null),[u,x]=v.useState({height:10,width:12});v.useEffect((()=>x(h.current.getBBox())),[...r,x,h]);const p=v.useCallback((e=>o(n,e)),[n,o]),f=v.useCallback((e=>i(n,e)),[n,i]),y=v.useCallback((e=>s(n,e)),[n,s]);return g.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:p,onPointerMove:f,onPointerUp:y,style:{cursor:"move"},children:[g.jsxs("defs",{children:[g.jsxs("clipPath",{id:"jr_east_fill_pattern_clip_path",patternUnits:"userSpaceOnUse",children:[g.jsx("polygon",{points:`0,0 0,${fe} ${fe},0`}),g.jsx("polygon",{points:`${xe},${xe} ${xe-fe},${xe} ${xe},${xe-fe}`})]}),g.jsxs("pattern",{id:`jr_east_${n}_fill_pattern_${c[2]}`,width:xe,height:xe,patternUnits:"userSpaceOnUse",children:[g.jsx("rect",{width:xe,height:xe,fill:c[2]}),g.jsx("line",{x1:"0",y1:"0",x2:xe,y2:xe,stroke:"white",strokeWidth:pe,strokeOpacity:"33%",clipPath:"url(#jr_east_fill_pattern_clip_path)"}),g.jsx("line",{x1:xe,y1:"0",x2:"0",y2:xe,stroke:"white",strokeWidth:pe,strokeOpacity:"33%"})]})]}),g.jsx("rect",{fill:m?`url(#jr_east_${n}_fill_pattern_${c[2]})`:c[2],x:"0",y:"-1",width:u.width+4+10,height:u.height+1,rx:"1",stroke:"black",strokeWidth:"0.25"}),g.jsx("circle",{r:4,cx:7,cy:6,stroke:"black",strokeWidth:"0.25",fill:c[3]}),g.jsx("text",{x:7,y:6.75,textAnchor:"middle",dominantBaseline:"middle",fill:"#000"===c[3]?"white":c[2],fontSize:d>9?7:8,className:"rmp-name__jreast_en",children:d}),g.jsx(P,{ref:h,text:r[0].split("\n"),x:12,y:"-1",fill:c[3],fontSize:10,lineHeight:10,grow:"down",className:"rmp-name__jreast_ja"}),g.jsx(P,{text:r[1].split("\n"),textAnchor:"middle",dominantBaseline:"hanging",x:(u.width+4+10)/2,y:u.height+1,fontSize:5,lineHeight:5,baseOffset:0,grow:"down",className:"rmp-name__jreast_en"})]})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("rect",{fill:"currentColor",x:"1",y:"6",width:"22",height:"7"}),g.jsx("circle",{cx:"3.5",cy:"9.25",r:"2",fill:"white"}),g.jsx("text",{x:"3",y:"10.5",fontSize:"3",children:"9"}),g.jsx("text",{x:"6",y:"11.25",fontSize:"5",fill:"white",children:"山手線"}),g.jsx("text",{x:"1.5",y:"16",fontSize:"3",children:"Yamanote Line"})]}),defaultAttrs:ge,attrsComponent:e=>{const{id:n,attrs:t,handleAttrsUpdate:l}=e,{t:a}=N(),r=[{type:"input",label:a("panel.details.nodes.common.num"),value:String(t.num),validator:e=>!Number.isNaN(e),onChange:e=>{t.num=Number(e),l(n,t)},minW:"full"},{type:"textarea",label:a("panel.details.nodes.common.nameJa"),value:t.names[0],onChange:e=>{t.names[0]=e,l(n,t)},minW:"full"},{type:"textarea",label:a("panel.details.nodes.common.nameEn"),value:t.names[1],onChange:e=>{t.names[1]=e,l(n,t)},minW:"full"},{type:"switch",label:a("panel.details.nodes.jrEastLineBadge.crosshatchPatternFill"),oneLine:!0,isChecked:t.crosshatchPatternFill,onChange:e=>{t.crosshatchPatternFill=e,l(n,t)},minW:"full"},{type:"custom",label:a("color"),component:g.jsx(o,{type:i.JREastLineBadge,defaultTheme:ge.color})}];return g.jsx(s,{fields:r})},metadata:{displayName:"panel.details.nodes.jrEastLineBadge.displayName",tags:[]}},je={num:1,numEn:"1",showText:!0,color:[l.Qingdao,"qd1","#f7b000",a.white]},be={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:s}=e,{num:r=je.num,numEn:d=je.numEn,color:c=je.color,showText:m=je.showText}=null!=a?a:je,h=v.useCallback((e=>o(n,e)),[n,o]),u=v.useCallback((e=>i(n,e)),[n,i]),x=v.useCallback((e=>s(n,e)),[n,s]),p=c[3],[f,y,j,b]=Number(r)>=10?[-2.4,0,10.25,20]:[0,4,10,22];return g.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:h,onPointerMove:u,onPointerUp:x,style:{cursor:"move"},children:[g.jsx("rect",{fill:c[2],x:"0",width:"20",height:"20",rx:"2",ry:"2"}),g.jsx("text",{className:"rmp-name__zh",textAnchor:"left",x:y,y:j,fill:p,fontSize:b,fontWeight:"bold",letterSpacing:f,dominantBaseline:"central",children:r}),m&&g.jsxs(g.Fragment,{children:[g.jsx("text",{className:"rmp-name__zh",x:"22",y:"10.5",fontSize:"13",children:"号线"}),g.jsxs("text",{className:"rmp-name__en",x:"22.5",y:"19.5",fontSize:"8",children:["Line ",d]})]})]})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("rect",{fill:"currentColor",x:"2",y:"6",rx:"1",ry:"1",width:"10",height:"10"}),g.jsx("text",{x:"4",y:"15",fill:"white",fontSize:"12",children:"1"}),g.jsx("text",{x:"12",y:"11.5",fill:"black",fontSize:"6",children:"号线"}),g.jsx("text",{x:"12",y:"15.5",fill:"black",fontSize:"4",children:"Line1"})]}),defaultAttrs:je,attrsComponent:e=>{const{id:n,attrs:t,handleAttrsUpdate:l}=e,{t:a}=N(),r=[{type:"input",label:a("panel.details.nodes.common.num"),value:t.num.toString(),onChange:e=>{t.num=Number(e),t.numEn=e,l(n,t)}},{type:"input",label:a("panel.details.nodes.qingdaoMetroNumLineBadge.numEn"),value:t.numEn.toString(),onChange:e=>{t.numEn=e,l(n,t)}},{type:"switch",label:a("panel.details.nodes.qingdaoMetroNumLineBadge.showText"),isChecked:t.showText,oneLine:!0,onChange:e=>{t.showText=e,l(n,t)}},{type:"custom",label:a("color"),component:g.jsx(o,{type:i.QingdaoMetroNumLineBadge,defaultTheme:je.color})}];return g.jsx(s,{fields:r,minW:"full"})},metadata:{displayName:"panel.details.nodes.qingdaoMetroNumLineBadge.displayName",tags:[]}},we={names:["广清城际","Guangzhou-Qingyuan Intercity"],color:[l.Guangzhou,"ir","#2559a8",a.white]},ve={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:s}=e,{names:r=we.names,color:d=we.color}=null!=a?a:we,c=v.useRef(null),[m,h]=v.useState({width:12});v.useEffect((()=>h(c.current.getBBox())),[...r,h,c]);const u=v.useCallback((e=>o(n,e)),[n,o]),x=v.useCallback((e=>i(n,e)),[n,i]),p=v.useCallback((e=>s(n,e)),[n,s]);return g.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:u,onPointerMove:x,onPointerUp:p,style:{cursor:"move"},children:[g.jsx("rect",{rx:"2",ry:"2",fill:d[2],x:"0",width:m.width+7,height:"21"}),g.jsxs("g",{ref:c,children:[g.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",dominantBaseline:"hanging",x:(m.width+7)/2,y:"3",fontSize:"8.63",fill:d[3],children:r[0]}),g.jsx("text",{className:"rmp-name__en",textAnchor:"middle",dominantBaseline:"hanging",x:(m.width+7)/2,y:"14",fontSize:"3.54",fill:d[3],children:r[1]})]})]})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("rect",{fill:"currentColor",x:"2",y:"6",width:"20",height:"12"}),g.jsx("text",{x:"4.5",y:"11",fontSize:"4",fill:"white",children:"广清城际"}),g.jsx("text",{x:"3",y:"16",fontSize:"2",fill:"white",children:"Guangzhou-Qingyuan Intercity"})]}),defaultAttrs:we,attrsComponent:e=>{const{id:n,attrs:t,handleAttrsUpdate:l}=e,{t:a}=N(),o=[{type:"input",label:a("panel.details.nodes.common.nameZh"),value:t.names[0],onChange:e=>{t.names[0]=e,l(n,t)},minW:"full"},{type:"input",label:a("panel.details.nodes.common.nameEn"),value:t.names[1],onChange:e=>{t.names[1]=e,l(n,t)},minW:"full"}];return g.jsx(s,{fields:o})},metadata:{displayName:"panel.details.nodes.guangdongIntercityRailwayLineBadge.displayName",tags:[]}},Ne={contents:{},...S},Ce={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:s}=e,r=_();a.content=r(a.contents);const d=B.component;return g.jsx(d,{id:n,x:t,y:l,handlePointerDown:o,handlePointerMove:i,handlePointerUp:s,attrs:a})},icon:B.icon,defaultAttrs:Ne,attrsComponent:B.attrsComponent,metadata:{displayName:"panel.details.nodes.i18nText.displayName",tags:[]}},Pe={randomId:void 0,label:void 0,transform:r,nodeType:"MiscNode",svgs:[],components:[]},Se={component:e=>{var n;const{id:t,x:l,y:a,attrs:o,handlePointerDown:i,handlePointerMove:s,handlePointerUp:d}=e,c=v.useCallback((e=>i(t,e)),[t,i]),m=v.useCallback((e=>s(t,e)),[t,s]),h=v.useCallback((e=>d(t,e)),[t,d]),u=(e,...n)=>new Function(...n,`return ${e}`),x="MiscNode"===o.nodeType?{onPointerDown:c,onPointerMove:m,onPointerUp:h,style:{cursor:"move"}}:{},p=e=>e.map((e=>{var n,l;const a="Station"===o.nodeType&&o.core&&o.core===e.id?{id:`stn_core_${t}`,onPointerDown:c,onPointerMove:m,onPointerUp:h,style:{cursor:"move"}}:{},i=((e,n,t)=>{const l={};for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s))try{var a;l[s]=u(e[s].slice(1),...o.components.map((e=>e.label)),"color")(...n.map(((e,n)=>"number"!==t[n]||Number.isNaN(Number(e))?e:Number(e))),o.color?null!==(a=o.color.value)&&void 0!==a?a:o.color.defaultValue:"")}catch(i){l[s]=""}return l})(e.attrs,o.components.map((e=>e.value)),o.components.map((e=>e.type)));return g.jsx("g",{transform:`translate(${null!==(n=i.x)&&void 0!==n?n:0}, ${null!==(l=i.y)&&void 0!==l?l:0})`,children:v.createElement(e.type,{...i,x:0,y:0,...a},e.children?p(e.children):"_rmp_children_text"in i?"style"===e.type?(s=i._rmp_children_text,s.replace(/(^|,)\s*([^{},]+)/g,`$1 #${t} $2`)):i._rmp_children_text:null)},e.id);var s})),f=null!==(n=o.transform)&&void 0!==n?n:r,y=v.useMemo((()=>p(o.svgs)),[o]);return v.createElement("g",{id:t,transform:`translate(${l}, ${a})`,...x},o.randomId?g.jsx("g",{transform:`translate(${f.translateX}, ${f.translateY}) scale(${f.scale}) rotate(${f.rotate})`,children:y}):g.jsxs("g",{children:[g.jsx("circle",{r:"5.5"}),g.jsx("g",{transform:"translate(-4.7, -5) scale(0.8)",children:g.jsx("polygon",{points:"6,1 7.5,4.25 11,4.65 8.5,7.1 9.2,10.75 6,9 2.8,10.75 3.5,7.1 1,4.65 4.5,4.25",fill:"white"})})]}))},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("circle",{cx:"12",cy:"12",r:"6",stroke:"currentColor",fill:"none"}),g.jsx("g",{transform:"translate(7.25, 7) scale(0.8)",children:g.jsx("polygon",{points:"6,1 7.5,4.25 11,4.65 8.5,7.1 9.2,10.75 6,9 2.8,10.75 3.5,7.1 1,4.65 4.5,4.25",fill:"currentColor"})})]}),defaultAttrs:Pe,attrsComponent:e=>{var n,t,l,o,i;const{id:r,attrs:C,handleAttrsUpdate:P}=e,S=d(),{paletteAppClip:{output:B}}=c((e=>e.runtime)),{t:_}=N(),[L,M]=v.useState(!1),[A,$]=v.useState(!1),T=C.components.map(((e,n)=>{const{label:t,type:l,defaultValue:a,value:o}=e;return"number"===l||"text"===l?{label:_(t),type:"input",value:null!=o?o:a,onChange:e=>{C.components[n].value=e,P(r,{...C,components:C.components})}}:"switch"===l?{label:_(t),type:"switch",isChecked:void 0!==o?!!o:a,onChange:e=>{C.components[n].value=e,P(r,{...C,components:C.components})}}:"textarea"===l?{label:_(t),type:"textarea",value:null!=o?o:a,onChange:e=>{C.components[n].value=e,P(r,{...C,components:C.components})}}:{type:"input",label:"undefined",value:"none"}})),[U,D]=v.useState(!1);v.useEffect((()=>{C.color&&U&&B&&(C.color.value=B,P(r,{...C,color:C.color}),D(!1))}),[null==B?void 0:B.toString()]);const W=[{type:"custom",label:_("color"),component:g.jsx(m,{theme:null===(n=C.color)||void 0===n?void 0:n.value,onClick:()=>{var e;D(!0),S(h(null===(e=C.color)||void 0===e?void 0:e.value))}})}];return g.jsxs(g.Fragment,{children:[g.jsxs(y,{direction:"row",mr:"auto",width:"100%",children:[g.jsx(u,{width:"100%",overflow:"hidden",label:_("panel.details.nodes.master.type"),children:g.jsxs(y,{width:"100%",overflow:"hidden",children:[g.jsx(x,{name:null!==(t=C.label)&&void 0!==t?t:_("panel.details.nodes.master.undefined"),fg:null!==(l=C.labelColorFg)&&void 0!==l?l:a.white,bg:null!==(o=C.labelColorBg)&&void 0!==o?o:"#000000",sx:{display:"inline-block",overflow:"hidden",textOverflow:"ellipsis"},mr:1}),g.jsx(x,{name:null!==(i=C.randomId)&&void 0!==i?i:"UNDEFINED",fg:a.white,bg:C.randomId?"#19B3EA":"#000000",sx:{display:"inline-block"},mr:1})]})}),g.jsx(j,{}),g.jsx(b,{icon:g.jsx(p,{}),onClick:()=>M(!0),"aria-label":"upload"})]}),g.jsx(w,{width:"100%",leftIcon:g.jsx(f,{}),onClick:()=>$(!0),children:_("header.settings.procedures.masterManager.title")}),C.randomId&&g.jsx(s,{fields:T,minW:"full"}),C.randomId&&void 0!==C.color&&g.jsx(s,{fields:W,minW:"full"}),g.jsx(z,{isOpen:L,onClose:()=>M(!1),onSubmit:e=>{e.components.forEach(((n,t)=>{var l;e.components[t].value=null!==(l=(e=>{var n;const t=C.components.find((n=>n.id===e));return t?null!==(n=t.value)&&void 0!==n?n:t.defaultValue:void 0})(n.id))&&void 0!==l?l:n.defaultValue})),void 0!==e.color&&(e.color.value=C.color?C.color.value:e.color.defaultValue),P(r,e)}}),g.jsx(k,{isOpen:A,onClose:()=>$(!1)})]})},metadata:{displayName:"panel.details.nodes.master.displayName",tags:[]}};e("m",{[i.Virtual]:n,[i.ShmetroNumLineBadge]:$,[i.ShmetroTextLineBadge]:U,[i.GzmtrLineBadge]:W,[i.BjsubwayNumLineBadge]:I,[i.BjsubwayTextLineBadge]:V,[i.SuzhouRTNumLineBadge]:Z,[i.BerlinSBahnLineBadge]:ee,[i.BerlinUBahnLineBadge]:Y,[i.ChongqingRTNumLineBadge]:le,[i.ChongqingRTTextLineBadge]:ie,[i.ShenzhenMetroNumLineBadge]:de,[i.MRTDestinationNumbers]:me,[i.MRTLineBadge]:ue,[i.JREastLineBadge]:ye,[i.QingdaoMetroNumLineBadge]:be,[i.GuangdongIntercityRailwayLineBadge]:ve,[i.Facilities]:L,[i.Text]:B,[i.I18nText]:Ce,[i.Master]:Se})}}})); +System.register(["./index-legacy-jqOeRlnz.js","./chakra-legacy--ElhKRU8.js","./react-legacy-CB7hQk4J.js","./master-manager-legacy-CCeMINwh.js"],(function(e,n){"use strict";var t,l,a,o,i,s,r,d,c,m,h,u,x,p,f,g,y,j,b,w,v,N,C,P,S,B,_,z,k,L;return{setters:[e=>{t=e.aM,l=e.C,a=e.M,o=e.aN,i=e.aw,s=e.i,r=e.aO,d=e.c,c=e.d,m=e.V,h=e.W,u=e.P,x=e.R,p=e.D,f=e.ai},e=>{g=e.j,y=e.g,j=e.a$,b=e.af,w=e.O},e=>{v=e.b,N=e.u},e=>{C=e.L,P=e.g,S=e.h,B=e.t,_=e.j,z=e.k,k=e.M,L=e.n}],execute:function(){const n={component:e=>{const{id:n,x:t,y:l,handlePointerDown:a,handlePointerMove:o,handlePointerUp:i}=e,s=v.useCallback((e=>a(n,e)),[n,a]),r=v.useCallback((e=>o(n,e)),[n,o]),d=v.useCallback((e=>i(n,e)),[n,i]);return g.jsxs("g",{id:n,transform:`translate(${t}, ${l})rotate(45)`,onPointerDown:s,onPointerMove:r,onPointerUp:d,style:{cursor:"move"},className:"removeMe",children:[g.jsx("line",{x1:"-5",y1:"0",x2:"5",y2:"0",stroke:"black"}),g.jsx("line",{x1:"0",y1:"-5",x2:"0",y2:"5",stroke:"black"}),g.jsx("circle",{id:`virtual_circle_${n}`,r:5,stroke:"black",fill:"white",fillOpacity:"0"})]})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,transform:"rotate(45)",focusable:!1,children:[g.jsx("circle",{cx:"12",cy:"12",r:"6",stroke:"currentColor",fill:"none"}),g.jsx("line",{x1:"6",y1:"12",x2:"18",y2:"12",stroke:"currentColor"}),g.jsx("line",{x1:"12",y1:"6",x2:"12",y2:"18",stroke:"currentColor"})]}),defaultAttrs:{},attrsComponent:()=>g.jsx(t,{fields:[]}),metadata:{displayName:"panel.details.nodes.virtual.displayName",tags:[]}},M={num:1,color:[l.Shanghai,"sh1","#E4002B",a.white]},A=[{type:"input",label:"panel.details.nodes.common.num",value:e=>(null!=e?e:M).num,validator:e=>!Number.isNaN(e),onChange:(e,n)=>{const t=null!=n?n:M;return Number.isNaN(e)||(t.num=Number(e)),t}},{type:"custom",label:"color",component:g.jsx(o,{type:i.ShmetroNumLineBadge,defaultTheme:M.color})}],$={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:s}=e,{num:r=M.num,color:d=M.color}=null!=a?a:M,[c,m]=r>=10?[22.67,10.75]:[21,10],h=v.useCallback((e=>o(n,e)),[n,o]),u=v.useCallback((e=>i(n,e)),[n,i]),x=v.useCallback((e=>s(n,e)),[n,s]);return g.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:h,onPointerMove:u,onPointerUp:x,style:{cursor:"move"},children:[g.jsx("rect",{fill:d[2],width:c,height:"22.67"}),g.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",x:m,y:"19",fill:d[3],fontSize:"21.33",letterSpacing:"-1.75",children:r}),g.jsx("text",{className:"rmp-name__zh",x:c+2,y:"12",fontSize:"14.67",children:"号线"}),g.jsxs("text",{className:"rmp-name__en",x:c+4,y:"21.5",fontSize:"8",children:["Line ",r]})]})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("rect",{fill:"currentColor",x:"2",y:"4",width:"10",height:"16"}),g.jsx("text",{x:"4",y:"18",fill:"white",children:"1"}),g.jsx("text",{x:"14",y:"10",fontSize:"5",children:"号线"}),g.jsx("text",{x:"14",y:"18",fontSize:"4",children:"Line 1"})]}),defaultAttrs:M,attrsComponent:()=>g.jsx(t,{fields:A}),metadata:{displayName:"panel.details.nodes.shmetroNumLineBadge.displayName",tags:[]}},T={names:["浦江线","Pujiang Line"],color:[l.Shanghai,"pjl","#B5B5B6",a.white]},U={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:s}=e,{names:r=T.names,color:d=T.color}=null!=a?a:T,c=v.useRef(null),[m,h]=v.useState({width:12});v.useEffect((()=>h(c.current.getBBox())),[...r,h,c]);const u=v.useCallback((e=>o(n,e)),[n,o]),x=v.useCallback((e=>i(n,e)),[n,i]),p=v.useCallback((e=>s(n,e)),[n,s]);return g.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:u,onPointerMove:x,onPointerUp:p,style:{cursor:"move"},children:[g.jsx("rect",{fill:d[2],x:"0",width:m.width+7,height:"21"}),g.jsxs("g",{ref:c,children:[g.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",dominantBaseline:"hanging",x:(m.width+7)/2,y:"3",fontSize:"10",fill:d[3],letterSpacing:"-0.25",children:r[0]}),g.jsx("text",{className:"rmp-name__en",textAnchor:"middle",dominantBaseline:"hanging",x:(m.width+7)/2,y:"14",fontSize:"5",fill:d[3],letterSpacing:"-0.25",children:r[1]})]})]})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("rect",{fill:"currentColor",x:"2",y:"6",width:"20",height:"12"}),g.jsx("text",{x:"5",y:"11",fontSize:"5",fill:"white",children:"浦江线"}),g.jsx("text",{x:"3",y:"16",fontSize:"4",fill:"white",children:"Pujiang Line"})]}),defaultAttrs:T,attrsComponent:e=>{const{id:n,attrs:t,handleAttrsUpdate:l}=e,{t:a}=N(),r=[{type:"input",label:a("panel.details.nodes.common.nameZh"),value:t.names[0],onChange:e=>{t.names[0]=e,l(n,t)},minW:"full"},{type:"input",label:a("panel.details.nodes.common.nameEn"),value:t.names[1],onChange:e=>{t.names[1]=e,l(n,t)},minW:"full"},{type:"custom",label:a("color"),component:g.jsx(o,{type:i.ShmetroTextLineBadge,defaultTheme:T.color})}];return g.jsx(s,{fields:r})},metadata:{displayName:"panel.details.nodes.shmetroTextLineBadge.displayName",tags:[]}},D={names:["1号线","Line 1"],color:[l.Guangzhou,"gz1","#F3D03E",a.black],tram:!1,span:!0},W={component:e=>{var n,t;const{id:l,x:a,y:o,attrs:i,handlePointerDown:s,handlePointerMove:r,handlePointerUp:d}=e,{names:c=D.names,color:m=D.color,tram:h=D.tram,span:u=D.span}=null!=i?i:D,x=v.useCallback((e=>s(l,e)),[l,s]),p=v.useCallback((e=>r(l,e)),[l,r]),f=v.useCallback((e=>d(l,e)),[l,d]);return g.jsx("g",{id:l,transform:`translate(${a}, ${o})scale(${h?.5:1})`,onPointerDown:x,onPointerMove:p,onPointerUp:f,style:{cursor:"move"},children:g.jsx(C,{zhName:null!==(n=c.at(0))&&void 0!==n?n:"",enName:null!==(t=c.at(1))&&void 0!==t?t:"",zhClassName:"rmp-name__zh",enClassName:"rmp-name__en",foregroundColour:m[3],backgroundColour:m[2],spanDigits:u})})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("rect",{fill:"currentColor",x:"2",y:"5",width:"20",height:"14",rx:"1"}),g.jsx("text",{x:"6",y:"15",textAnchor:"middle",fontSize:"10",fill:"white",children:"1"}),g.jsx("text",{x:"15",y:"12",textAnchor:"middle",fontSize:"6",fill:"white",children:"号线"}),g.jsx("text",{x:"14.5",y:"17",textAnchor:"middle",fontSize:"4",fill:"white",children:"Line 1"})]}),defaultAttrs:D,attrsComponent:e=>{const{id:n,attrs:t,handleAttrsUpdate:l}=e,{t:a}=N(),r=[{type:"input",label:a("panel.details.nodes.common.nameZh"),value:t.names[0],onChange:e=>{t.names[0]=e,l(n,t)},minW:"full"},{type:"input",label:a("panel.details.nodes.common.nameEn"),value:t.names[1],onChange:e=>{t.names[1]=e,l(n,t)},minW:"full"},{type:"switch",label:a("panel.details.nodes.gzmtrLineBadge.tram"),oneLine:!0,isChecked:t.tram,onChange:e=>{t.tram=e,l(n,t)},minW:"full"},{type:"switch",label:a("panel.details.nodes.gzmtrLineBadge.span"),oneLine:!0,isChecked:t.span,onChange:e=>{t.span=e,l(n,t)},minW:"full"},{type:"custom",label:a("color"),component:g.jsx(o,{type:i.GzmtrLineBadge,defaultTheme:D.color})}];return g.jsx(s,{fields:r})},metadata:{displayName:"panel.details.nodes.gzmtrLineBadge.displayName",tags:[]}},E=11.84375,R={num:1,color:[l.Beijing,"bj1","#c23a30",a.white]},F=[{type:"input",label:"panel.details.nodes.common.num",value:e=>(null!=e?e:R).num,validator:e=>!Number.isNaN(e),onChange:(e,n)=>{const t=null!=n?n:R;return Number.isNaN(e)||(t.num=Number(e)),t}},{type:"custom",label:"color",component:g.jsx(o,{type:i.BjsubwayNumLineBadge,defaultTheme:R.color})}],I={component:e=>{const{id:n,x:t,y:l,attrs:o,handlePointerDown:i,handlePointerMove:s,handlePointerUp:r}=e,{num:d=R.num,color:c=R.color}=null!=o?o:R,m=v.useCallback((e=>i(n,e)),[n,i]),h=v.useCallback((e=>s(n,e)),[n,s]),u=v.useCallback((e=>r(n,e)),[n,r]),x=c[3]===a.black?"#003670":a.white;return g.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:m,onPointerMove:h,onPointerUp:u,style:{cursor:"move"},children:[g.jsx("rect",{fill:c[2],x:"0",width:32.84375,height:"16",rx:"2"}),g.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",x:7.921875,y:"13.5",fill:x,fontSize:"15",letterSpacing:"-1.5",children:d}),g.jsx("text",{className:"rmp-name__zh",x:E+(d>9?5.5:3),y:"8.5",fontSize:"7",fill:x,children:"号线"}),g.jsxs("text",{className:"rmp-name__en",x:E+(d>9?6:4.5),y:"13.5",fontSize:"4",fill:x,children:["Line ",d]})]})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("rect",{fill:"currentColor",x:"2",y:"4",width:"20",height:"16",rx:"2"}),g.jsx("text",{x:"4",y:"17",fill:"white",fontSize:"14",children:"1"}),g.jsx("text",{x:"11",y:"11",fill:"white",fontSize:"5",children:"号线"}),g.jsx("text",{x:"11",y:"17",fill:"white",fontSize:"4",children:"Line 1"})]}),defaultAttrs:R,attrsComponent:()=>g.jsx(t,{fields:F}),metadata:{displayName:"panel.details.nodes.bjsubwayNumLineBadge.displayName",tags:[]}},q={names:["八通线","Batong Line"],color:[l.Beijing,"bj1","#c23a30",a.white]},O=[{type:"input",label:"panel.details.nodes.common.nameZh",value:e=>(null!=e?e:q).names[0],onChange:(e,n)=>{const t=null!=n?n:q;return t.names[0]=e.toString(),t}},{type:"input",label:"panel.details.nodes.common.nameEn",value:e=>(null!=e?e:q).names[1],onChange:(e,n)=>{const t=null!=n?n:q;return t.names[1]=e.toString(),t}},{type:"custom",label:"color",component:g.jsx(o,{type:i.BjsubwayTextLineBadge,defaultTheme:q.color})}],V={component:e=>{const{id:n,x:t,y:l,attrs:o,handlePointerDown:i,handlePointerMove:s,handlePointerUp:r}=e,{names:d=q.names,color:c=q.color}=null!=o?o:q,m=v.useRef(null),[h,u]=v.useState({width:12});v.useEffect((()=>u(m.current.getBBox())),[...d,u,m]);const x=v.useCallback((e=>i(n,e)),[n,i]),p=v.useCallback((e=>s(n,e)),[n,s]),f=v.useCallback((e=>r(n,e)),[n,r]),y=Math.max(28.84375,h.width),j=c[3]===a.black?"#003670":a.white;return g.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:x,onPointerMove:p,onPointerUp:f,style:{cursor:"move"},children:[g.jsx("rect",{fill:c[2],x:"0",width:y+4,height:"16",rx:"2"}),g.jsxs("g",{ref:m,children:[g.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",x:(y+4)/2,y:"8",fontSize:"7",fill:j,children:d[0]}),g.jsx("text",{className:"rmp-name__en",textAnchor:"middle",x:(y+4)/2,y:"13.5",fontSize:"4",fill:j,children:d[1]})]})]})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("rect",{fill:"currentColor",x:"2",y:"6",width:"20",height:"12",rx:"2"}),g.jsx("text",{x:"3",y:"12",fontSize:"6",fill:"white",children:"八通线"}),g.jsx("text",{x:"3",y:"16",fontSize:"3.2",fill:"white",children:"Batong Line"})]}),defaultAttrs:q,attrsComponent:()=>g.jsx(t,{fields:O}),metadata:{displayName:"panel.details.nodes.bjsubwayTextLineBadge.displayName",tags:[]}},Q={num:1,branch:!1,color:[l.Suzhou,"sz1","#78BA25",a.white]},G=[{type:"input",label:"panel.details.nodes.common.num",value:e=>(null!=e?e:Q).num,validator:e=>!Number.isNaN(e),onChange:(e,n)=>{const t=null!=n?n:Q;return Number.isNaN(e)||(t.num=Number(e)),t}},{type:"switch",label:"panel.details.nodes.suzhouRTNumLineBadge.branch",isChecked:e=>{var n;return null!==(n=null==e?void 0:e.branch)&&void 0!==n?n:Q.branch},onChange:(e,n)=>{const t=null!=n?n:Q;return t.branch=e,t}},{type:"custom",label:"color",component:g.jsx(o,{type:i.SuzhouRTNumLineBadge,defaultTheme:Q.color})}],Z={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:s}=e,{num:r=Q.num,branch:d=Q.branch,color:c=Q.color}=null!=a?a:Q,m=v.useCallback((e=>o(n,e)),[n,o]),h=v.useCallback((e=>i(n,e)),[n,i]),u=v.useCallback((e=>s(n,e)),[n,s]);return g.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:m,onPointerMove:h,onPointerUp:u,style:{cursor:"move"},children:[g.jsx("rect",{fill:c[2],width:"20",height:"20",rx:"2",ry:"2"}),g.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",dominantBaseline:"middle",x:"10",y:"11.4",fill:c[3],fontSize:"15",letterSpacing:"-1",children:r}),d&&g.jsxs(g.Fragment,{children:[g.jsx("text",{className:"rmp-name__zh",x:22.5,y:"10",fontSize:"10",children:"支线"}),g.jsx("text",{className:"rmp-name__en",x:22.5,y:"18",fontSize:"5",fill:"gray",children:"Branch line"})]})]})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("rect",{fill:"currentColor",x:"4",y:"4",width:"16",height:"16",rx:"3",ry:"3"}),g.jsx("text",{x:"12",y:"13.4",textAnchor:"middle",dominantBaseline:"middle",fill:"white",fontSize:"14",children:"1"})]}),defaultAttrs:Q,attrsComponent:()=>g.jsx(t,{fields:G}),metadata:{displayName:"panel.details.nodes.suzhouRTNumLineBadge.displayName",tags:[]}},H={num:1,color:[l.Berlin,"bu1","#62AD2D",a.white]},J=[{type:"input",label:"panel.details.nodes.common.num",value:e=>(null!=e?e:H).num,validator:e=>!Number.isNaN(e),onChange:(e,n)=>{const t=null!=n?n:H;return Number.isNaN(e)||(t.num=Number(e)),t}},{type:"custom",label:"color",component:g.jsx(o,{type:i.BerlinUBahnLineBadge,defaultTheme:H.color})}],Y={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:s}=e,{num:r=H.num,color:d=H.color}=null!=a?a:H,c=v.useCallback((e=>o(n,e)),[n,o]),m=v.useCallback((e=>i(n,e)),[n,i]),h=v.useCallback((e=>s(n,e)),[n,s]),u=d[3];return g.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:c,onPointerMove:m,onPointerUp:h,style:{cursor:"move"},children:[g.jsx("rect",{fill:d[2],x:"0",width:"25",height:"15"}),g.jsxs("text",{className:"rmp-name__berlin",textAnchor:"middle",x:"12.5",y:"12.5",fill:u,fontSize:"14",letterSpacing:"1",children:["U",r]})]})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("rect",{fill:"currentColor",x:"2",y:"4",width:"20",height:"16"}),g.jsx("text",{x:"4",y:"17",fill:"white",fontSize:"14",children:"U1"})]}),defaultAttrs:H,attrsComponent:()=>g.jsx(t,{fields:J}),metadata:{displayName:"panel.details.nodes.berlinUBahnLineBadge.displayName",tags:[]}},K={num:1,color:[l.Berlin,"bs1","#DD6CA6",a.white]},X=[{type:"input",label:"panel.details.nodes.common.num",value:e=>(null!=e?e:K).num,validator:e=>!Number.isNaN(e),onChange:(e,n)=>{const t=null!=n?n:K;return Number.isNaN(e)||(t.num=Number(e)),t}},{type:"custom",label:"color",component:g.jsx(o,{type:i.BerlinSBahnLineBadge,defaultTheme:K.color})}],ee={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:s}=e,{num:r=K.num,color:d=K.color}=null!=a?a:K,[c,m]=r>=10?[6,19.75]:[10,20],h=v.useCallback((e=>o(n,e)),[n,o]),u=v.useCallback((e=>i(n,e)),[n,i]),x=v.useCallback((e=>s(n,e)),[n,s]),p=d[3];return g.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:h,onPointerMove:u,onPointerUp:x,style:{cursor:"move"},children:[g.jsx("rect",{fill:d[2],x:"0",width:"30",height:"15",rx:"8"}),g.jsx("text",{className:"rmp-name__berlin",textAnchor:"middle",x:c,y:"12.5",fill:p,fontSize:"14",letterSpacing:"0",children:"S"}),g.jsx("text",{className:"rmp-name__berlin",textAnchor:"middle",x:m,y:"12.5",fill:p,fontSize:"14",letterSpacing:"-0.2",children:r})]})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("rect",{fill:"currentColor",x:"2",y:"4",width:"20",height:"16",rx:"8"}),g.jsx("text",{x:"4.5",y:"16.5",fill:"white",fontSize:"14",children:"S1"})]}),defaultAttrs:K,attrsComponent:()=>g.jsx(t,{fields:X}),metadata:{displayName:"panel.details.nodes.berlinSBahnLineBadge.displayName",tags:[]}},ne={num:1,color:[l.Chongqing,"cq1","#e4002b",a.white]},te=[{type:"input",label:"panel.details.nodes.common.num",value:e=>(null!=e?e:ne).num,validator:e=>!Number.isNaN(e),onChange:(e,n)=>{const t=null!=n?n:ne;return Number.isNaN(Number(e))?t.num=e:t.num=Number(e),t}},{type:"custom",label:"color",component:g.jsx(o,{type:i.ChongqingRTNumLineBadge,defaultTheme:ne.color})}],le={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:s}=e,{num:r=ne.num,color:d=ne.color}=null!=a?a:ne,c=v.useCallback((e=>o(n,e)),[n,o]),m=v.useCallback((e=>i(n,e)),[n,i]),h=v.useCallback((e=>s(n,e)),[n,s]),u=d[3],x=Number.isInteger(r)?16:15,[p,f]=Number.isInteger(r)?Number(r)>=10?[-1.2,1.5]:[0,5.5]:[0,2.55];return g.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:c,onPointerMove:m,onPointerUp:h,style:{cursor:"move"},children:[g.jsx("rect",{fill:d[2],x:"0",width:"20",height:"20",rx:"10",ry:"10"}),g.jsx("text",{className:"rmp-name__zh",textAnchor:"left",x:f,y:"10",fill:u,fontSize:x,letterSpacing:p,dominantBaseline:"central",children:r})]})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("rect",{fill:"currentColor",x:"2",y:"2",rx:"10",ry:"10",width:"20",height:"20"}),g.jsx("text",{x:"8",y:"18",fill:"white",fontSize:"18",children:"1"})]}),defaultAttrs:ne,attrsComponent:()=>g.jsx(t,{fields:te}),metadata:{displayName:"panel.details.nodes.chongqingRTNumLineBadge.displayName",tags:[]}},ae={names:["空港线","Konggang Line"],color:[l.Chongqing,"cq3","#003da5",a.white]},oe=[{type:"input",label:"panel.details.nodes.common.nameZh",value:e=>(null!=e?e:ae).names[0],onChange:(e,n)=>{const t=null!=n?n:ae;return t.names[0]=e.toString(),t}},{type:"textarea",label:"panel.details.nodes.common.nameEn",value:e=>(null!=e?e:ae).names[1],onChange:(e,n)=>{const t=null!=n?n:ae;return t.names[1]=e.toString(),t}},{type:"custom",label:"color",component:g.jsx(o,{type:i.ChongqingRTTextLineBadge,defaultTheme:ae.color})}],ie={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:s}=e,{names:r=ae.names,color:d=ae.color}=null!=a?a:ae,c=v.useRef(null),m=v.useCallback((e=>o(n,e)),[n,o]),h=v.useCallback((e=>i(n,e)),[n,i]),u=v.useCallback((e=>s(n,e)),[n,s]),x=d[3];return g.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:m,onPointerMove:h,onPointerUp:u,style:{cursor:"move"},children:[g.jsx("rect",{fill:d[2],x:"0",width:"20",height:"20",rx:"10",ry:"10"}),g.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",x:"10",y:"10.5",fill:x,fontSize:"6",letterSpacing:"0",children:r[0]}),g.jsx(P,{ref:c,text:r[1].split("\n"),className:"rmp-name__en",textAnchor:"middle",x:"10",y:"9.25",fill:x,fontSize:"2.5",letterSpacing:"0",lineHeight:2.25,grow:"down"})]})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("rect",{fill:"currentColor",x:"2",y:"2",rx:"10",ry:"10",width:"20",height:"20"}),g.jsx("text",{x:"4.5",y:"12.5",fill:"white",fontSize:"5",children:"空港线"}),g.jsx("text",{x:"4.5",y:"15",fill:"white",fontSize:"2",children:"Konggang Line"})]}),defaultAttrs:ae,attrsComponent:()=>g.jsx(t,{fields:oe}),metadata:{displayName:"panel.details.nodes.chongqingRTTextLineBadge.displayName",tags:[]}},se=11.84375,re={num:1,color:[l.Shenzhen,"sz1","#00b140",a.white],isBranch:!1},de={component:e=>{const{id:n,x:t,y:l,attrs:o,handlePointerDown:i,handlePointerMove:s,handlePointerUp:r}=e,{num:d=re.num,color:c=re.color,isBranch:m=re.isBranch}=null!=o?o:re,h=v.useCallback((e=>i(n,e)),[n,i]),u=v.useCallback((e=>s(n,e)),[n,s]),x=v.useCallback((e=>r(n,e)),[n,r]),p=c[3]===a.black?"#003670":a.white,f=m?10:se+(d>9?6.5:3),y=m?-1:0,j=m?11:se+(d>9?7:3.5),b=m?6:9.921875;return g.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:h,onPointerMove:u,onPointerUp:x,style:{cursor:"move"},children:[g.jsx("rect",{fill:c[2],x:"0",width:32.84375,height:"16",rx:"2"}),g.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",x:b,y:"13.5",fill:p,fontSize:"15",letterSpacing:"-1",children:d}),g.jsxs("text",{className:"rmp-name__zh",x:f,y:"9.5",fontSize:"6",fill:p,letterSpacing:y,children:["号线",m?"支线":""]}),g.jsxs("text",{className:"rmp-name__en",x:j,y:"13.5",fontSize:"3",fill:p,children:[m?"Branch":""," Line ",d]})]})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("rect",{fill:"currentColor",x:"2",y:"4",width:"20",height:"16",rx:"2"}),g.jsx("text",{x:"4",y:"17",fill:"white",fontSize:"14",children:"1"}),g.jsx("text",{x:"11",y:"14",fill:"white",fontSize:"5",children:"号线"}),g.jsx("text",{x:"12",y:"17",fill:"white",fontSize:"3",children:"Line 1"})]}),defaultAttrs:re,attrsComponent:e=>{const{id:n,attrs:t,handleAttrsUpdate:l}=e,{t:a}=N(),r=[{type:"input",label:a("panel.details.nodes.common.num"),value:String(t.num),validator:e=>!Number.isNaN(e),onChange:e=>{t.num=Number(e),l(n,t)},minW:"full"},{type:"custom",label:a("color"),component:g.jsx(o,{type:i.ShenzhenMetroNumLineBadge,defaultTheme:re.color}),minW:"full"},{type:"switch",label:a("panel.details.nodes.shenzhenMetroNumLineBadge.branch"),oneLine:!0,isChecked:t.isBranch,onChange:e=>{t.isBranch=e,l(n,t)},minW:"full"}];return g.jsx(s,{fields:r})},metadata:{displayName:"panel.details.nodes.shenzhenMetroNumLineBadge.displayName",tags:[]}},ce={num:1,color:[l.Singapore,"ewl","#009739",a.white]},me={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:s}=e,{num:r=ce.num,color:d=ce.color}=null!=a?a:ce,c=v.useCallback((e=>o(n,e)),[n,o]),m=v.useCallback((e=>i(n,e)),[n,i]),h=v.useCallback((e=>s(n,e)),[n,s]),u=d[3],x=d[2];return g.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:c,onPointerMove:m,onPointerUp:h,style:{cursor:"move"},children:[g.jsx("circle",{r:"8",fill:x}),g.jsx("text",{className:"rmp-name__mrt",textAnchor:"middle",x:"0",y:"0",width:"12",height:"12",fill:u,fontSize:"12",dominantBaseline:"central",letterSpacing:"-0.2",children:r})]})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("rect",{fill:"currentColor",x:"2",y:"2",rx:"10",ry:"10",width:"20",height:"20"}),g.jsx("text",{x:"9",y:"17",fill:"white",fontSize:"14",children:"1"})]}),defaultAttrs:ce,attrsComponent:e=>{const{id:n,attrs:t,handleAttrsUpdate:l}=e,{t:a}=N(),r=[{type:"input",label:a("panel.details.nodes.common.num"),value:String(t.num),validator:e=>!Number.isNaN(e),onChange:e=>{t.num=Number(e),l(n,t)},minW:"full"},{type:"custom",label:a("color"),component:g.jsx(o,{type:i.MRTDestinationNumbers,defaultTheme:ce.color}),minW:"full"}];return g.jsx(s,{fields:r})},metadata:{displayName:"panel.details.nodes.mrtDestinationNumbers.displayName",tags:[]}},he={lineCode:"EWL",name:"East-West Line",lines:"1, 2, 3, airport",isTram:!1,color:[l.Singapore,"ewl","#009739",a.white]},ue={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:s}=e,{lineCode:r=he.lineCode,color:d=he.color,lines:c=he.lines,name:m=he.name,isTram:h=he.isTram}=null!=a?a:he,u=v.useCallback((e=>o(n,e)),[n,o]),x=v.useCallback((e=>i(n,e)),[n,i]),p=v.useCallback((e=>s(n,e)),[n,s]),f=12.935,y=d[3],j=d[2];return g.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:u,onPointerMove:x,onPointerUp:p,style:{cursor:"move"},children:[g.jsx("rect",{transform:"scale(1.8)",x:-11.425,y:-6.4675,rx:"3",ry:"6",width:22.85,height:f,fill:j,stroke:"white",strokeWidth:"1"}),g.jsx("text",{className:"rmp-name__mrt",textAnchor:"middle",fill:y,fontSize:"15",dominantBaseline:"central",letterSpacing:"-0.2",children:r}),g.jsx("text",{className:"rmp-name__mrt",textAnchor:"left",x:"28",y:h?3.5:-3,fill:"black",fontSize:"10",letterSpacing:"-0.2",children:m}),!h&&c.split(",").map(((e,n)=>g.jsx("g",{transform:`translate(${34+14*n}, 4.5)`,children:"airport"!==e.trim()?g.jsxs(g.Fragment,{children:[g.jsx("circle",{r:"6",fill:j}),g.jsx("text",{className:"rmp-name__mrt",textAnchor:"middle",fill:y,fontSize:"9",dominantBaseline:"central",letterSpacing:"-0.2",children:e})]}):g.jsxs("g",{transform:"translate(-6, -6) scale(4.5)",children:[g.jsx("path",{d:"M2.467 0H.226A.226.226 0 0 0 0 .226v2.241a.225.225 0 0 0 .226.225h2.241a.225.225 0 0 0 .225-.225V.226A.226.226 0 0 0 2.467 0",style:{fill:"#2d2a26"}}),g.jsx("path",{d:"M1.5.746v.3l.73.642a.08.08 0 0 1 .022.05v.12c0 .017-.012.025-.027.018L1.5 1.529l-.06.541.2.113a.03.03 0 0 1 .013.023V2.3a.01.01 0 0 1-.014.011l-.293-.091-.286.087a.01.01 0 0 1-.014-.007v-.09a.03.03 0 0 1 .013-.023l.2-.113-.059-.545-.724.348a.018.018 0 0 1-.028-.018v-.12a.07.07 0 0 1 .023-.05l.73-.642v-.3c0-.482.3-.482.3 0",style:{fill:"#fff",fillRule:"evenodd"}})]})},n)))]})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("rect",{fill:"currentColor",x:"2",y:"2",rx:"10",ry:"10",width:"20",height:"20"}),g.jsx("text",{x:"9",y:"17",fill:"white",fontSize:"14",children:"1"})]}),defaultAttrs:he,attrsComponent:e=>{const{id:n,attrs:t,handleAttrsUpdate:l}=e,{t:a}=N(),r=[{type:"input",label:a("panel.details.nodes.common.nameEn"),value:t.name,onChange:e=>{t.name=e,l(n,t)},minW:"full"},{type:"input",label:a("panel.details.stations.common.lineCode"),value:t.lineCode,onChange:e=>{t.lineCode=e,l(n,t)},minW:"full"},{type:"switch",label:a("panel.details.nodes.mrtLineBadge.isTram"),isChecked:t.isTram,onChange:e=>{t.isTram=e,l(n,t)},minW:"full",oneLine:!0},...t.isTram?[]:[{type:"input",label:a("panel.details.nodes.common.num"),value:t.lines,onChange:e=>{t.lines=e,l(n,t)},minW:"full"}],{type:"custom",label:a("color"),component:g.jsx(o,{type:i.MRTLineBadge,defaultTheme:he.color}),minW:"full"}];return g.jsx(s,{fields:r})},metadata:{displayName:"panel.details.nodes.mrtLineBadge.displayName",tags:[]}},xe=5*Math.SQRT1_2,pe=.25,fe=(xe*Math.SQRT2-pe)/2*Math.SQRT2,ge={names:["山手線","Yamanote Line"],color:[l.Tokyo,"jy","#9ACD32",a.black],num:9,crosshatchPatternFill:!1},ye={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:s}=e,{names:r=ge.names,num:d=ge.num,color:c=ge.color,crosshatchPatternFill:m=ge.crosshatchPatternFill}=null!=a?a:ge,h=v.useRef(null),[u,x]=v.useState({height:10,width:12});v.useEffect((()=>x(h.current.getBBox())),[...r,x,h]);const p=v.useCallback((e=>o(n,e)),[n,o]),f=v.useCallback((e=>i(n,e)),[n,i]),y=v.useCallback((e=>s(n,e)),[n,s]);return g.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:p,onPointerMove:f,onPointerUp:y,style:{cursor:"move"},children:[g.jsxs("defs",{children:[g.jsxs("clipPath",{id:"jr_east_fill_pattern_clip_path",patternUnits:"userSpaceOnUse",children:[g.jsx("polygon",{points:`0,0 0,${fe} ${fe},0`}),g.jsx("polygon",{points:`${xe},${xe} ${xe-fe},${xe} ${xe},${xe-fe}`})]}),g.jsxs("pattern",{id:`jr_east_${n}_fill_pattern_${c[2]}`,width:xe,height:xe,patternUnits:"userSpaceOnUse",children:[g.jsx("rect",{width:xe,height:xe,fill:c[2]}),g.jsx("line",{x1:"0",y1:"0",x2:xe,y2:xe,stroke:"white",strokeWidth:pe,strokeOpacity:"33%",clipPath:"url(#jr_east_fill_pattern_clip_path)"}),g.jsx("line",{x1:xe,y1:"0",x2:"0",y2:xe,stroke:"white",strokeWidth:pe,strokeOpacity:"33%"})]})]}),g.jsx("rect",{fill:m?`url(#jr_east_${n}_fill_pattern_${c[2]})`:c[2],x:"0",y:"-1",width:u.width+4+10,height:u.height+1,rx:"1",stroke:"black",strokeWidth:"0.25"}),g.jsx("circle",{r:4,cx:7,cy:6,stroke:"black",strokeWidth:"0.25",fill:c[3]}),g.jsx("text",{x:7,y:6.75,textAnchor:"middle",dominantBaseline:"middle",fill:"#000"===c[3]?"white":c[2],fontSize:d>9?7:8,className:"rmp-name__jreast_en",children:d}),g.jsx(P,{ref:h,text:r[0].split("\n"),x:12,y:"-1",fill:c[3],fontSize:10,lineHeight:10,grow:"down",className:"rmp-name__jreast_ja"}),g.jsx(P,{text:r[1].split("\n"),textAnchor:"middle",dominantBaseline:"hanging",x:(u.width+4+10)/2,y:u.height+1,fontSize:5,lineHeight:5,baseOffset:0,grow:"down",className:"rmp-name__jreast_en"})]})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("rect",{fill:"currentColor",x:"1",y:"6",width:"22",height:"7"}),g.jsx("circle",{cx:"3.5",cy:"9.25",r:"2",fill:"white"}),g.jsx("text",{x:"3",y:"10.5",fontSize:"3",children:"9"}),g.jsx("text",{x:"6",y:"11.25",fontSize:"5",fill:"white",children:"山手線"}),g.jsx("text",{x:"1.5",y:"16",fontSize:"3",children:"Yamanote Line"})]}),defaultAttrs:ge,attrsComponent:e=>{const{id:n,attrs:t,handleAttrsUpdate:l}=e,{t:a}=N(),r=[{type:"input",label:a("panel.details.nodes.common.num"),value:String(t.num),validator:e=>!Number.isNaN(e),onChange:e=>{t.num=Number(e),l(n,t)},minW:"full"},{type:"textarea",label:a("panel.details.nodes.common.nameJa"),value:t.names[0],onChange:e=>{t.names[0]=e,l(n,t)},minW:"full"},{type:"textarea",label:a("panel.details.nodes.common.nameEn"),value:t.names[1],onChange:e=>{t.names[1]=e,l(n,t)},minW:"full"},{type:"switch",label:a("panel.details.nodes.jrEastLineBadge.crosshatchPatternFill"),oneLine:!0,isChecked:t.crosshatchPatternFill,onChange:e=>{t.crosshatchPatternFill=e,l(n,t)},minW:"full"},{type:"custom",label:a("color"),component:g.jsx(o,{type:i.JREastLineBadge,defaultTheme:ge.color})}];return g.jsx(s,{fields:r})},metadata:{displayName:"panel.details.nodes.jrEastLineBadge.displayName",tags:[]}},je={num:1,numEn:"1",showText:!0,color:[l.Qingdao,"qd1","#f7b000",a.white]},be={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:s}=e,{num:r=je.num,numEn:d=je.numEn,color:c=je.color,showText:m=je.showText}=null!=a?a:je,h=v.useCallback((e=>o(n,e)),[n,o]),u=v.useCallback((e=>i(n,e)),[n,i]),x=v.useCallback((e=>s(n,e)),[n,s]),p=c[3],[f,y,j,b]=Number(r)>=10?[-2.4,0,10.25,20]:[0,4,10,22];return g.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:h,onPointerMove:u,onPointerUp:x,style:{cursor:"move"},children:[g.jsx("rect",{fill:c[2],x:"0",width:"20",height:"20",rx:"2",ry:"2"}),g.jsx("text",{className:"rmp-name__zh",textAnchor:"left",x:y,y:j,fill:p,fontSize:b,fontWeight:"bold",letterSpacing:f,dominantBaseline:"central",children:r}),m&&g.jsxs(g.Fragment,{children:[g.jsx("text",{className:"rmp-name__zh",x:"22",y:"10.5",fontSize:"13",children:"号线"}),g.jsxs("text",{className:"rmp-name__en",x:"22.5",y:"19.5",fontSize:"8",children:["Line ",d]})]})]})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("rect",{fill:"currentColor",x:"2",y:"6",rx:"1",ry:"1",width:"10",height:"10"}),g.jsx("text",{x:"4",y:"15",fill:"white",fontSize:"12",children:"1"}),g.jsx("text",{x:"12",y:"11.5",fill:"black",fontSize:"6",children:"号线"}),g.jsx("text",{x:"12",y:"15.5",fill:"black",fontSize:"4",children:"Line1"})]}),defaultAttrs:je,attrsComponent:e=>{const{id:n,attrs:t,handleAttrsUpdate:l}=e,{t:a}=N(),r=[{type:"input",label:a("panel.details.nodes.common.num"),value:t.num.toString(),onChange:e=>{t.num=Number(e),t.numEn=e,l(n,t)}},{type:"input",label:a("panel.details.nodes.qingdaoMetroNumLineBadge.numEn"),value:t.numEn.toString(),onChange:e=>{t.numEn=e,l(n,t)}},{type:"switch",label:a("panel.details.nodes.qingdaoMetroNumLineBadge.showText"),isChecked:t.showText,oneLine:!0,onChange:e=>{t.showText=e,l(n,t)}},{type:"custom",label:a("color"),component:g.jsx(o,{type:i.QingdaoMetroNumLineBadge,defaultTheme:je.color})}];return g.jsx(s,{fields:r,minW:"full"})},metadata:{displayName:"panel.details.nodes.qingdaoMetroNumLineBadge.displayName",tags:[]}},we={names:["广清城际","Guangzhou-Qingyuan Intercity"],color:[l.Guangzhou,"ir","#2559a8",a.white]},ve={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:s}=e,{names:r=we.names,color:d=we.color}=null!=a?a:we,c=v.useRef(null),[m,h]=v.useState({width:12});v.useEffect((()=>h(c.current.getBBox())),[...r,h,c]);const u=v.useCallback((e=>o(n,e)),[n,o]),x=v.useCallback((e=>i(n,e)),[n,i]),p=v.useCallback((e=>s(n,e)),[n,s]);return g.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:u,onPointerMove:x,onPointerUp:p,style:{cursor:"move"},children:[g.jsx("rect",{rx:"2",ry:"2",fill:d[2],x:"0",width:m.width+7,height:"21"}),g.jsxs("g",{ref:c,children:[g.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",dominantBaseline:"hanging",x:(m.width+7)/2,y:"3",fontSize:"8.63",fill:d[3],children:r[0]}),g.jsx("text",{className:"rmp-name__en",textAnchor:"middle",dominantBaseline:"hanging",x:(m.width+7)/2,y:"14",fontSize:"3.54",fill:d[3],children:r[1]})]})]})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("rect",{fill:"currentColor",x:"2",y:"6",width:"20",height:"12"}),g.jsx("text",{x:"4.5",y:"11",fontSize:"4",fill:"white",children:"广清城际"}),g.jsx("text",{x:"3",y:"16",fontSize:"2",fill:"white",children:"Guangzhou-Qingyuan Intercity"})]}),defaultAttrs:we,attrsComponent:e=>{const{id:n,attrs:t,handleAttrsUpdate:l}=e,{t:a}=N(),o=[{type:"input",label:a("panel.details.nodes.common.nameZh"),value:t.names[0],onChange:e=>{t.names[0]=e,l(n,t)},minW:"full"},{type:"input",label:a("panel.details.nodes.common.nameEn"),value:t.names[1],onChange:e=>{t.names[1]=e,l(n,t)},minW:"full"}];return g.jsx(s,{fields:o})},metadata:{displayName:"panel.details.nodes.guangdongIntercityRailwayLineBadge.displayName",tags:[]}},Ne={contents:{},...S},Ce={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:s}=e,r=_();a.content=r(a.contents);const d=B.component;return g.jsx(d,{id:n,x:t,y:l,handlePointerDown:o,handlePointerMove:i,handlePointerUp:s,attrs:a})},icon:B.icon,defaultAttrs:Ne,attrsComponent:B.attrsComponent,metadata:{displayName:"panel.details.nodes.i18nText.displayName",tags:[]}},Pe={randomId:void 0,label:void 0,transform:r,nodeType:"MiscNode",svgs:[],components:[]},Se={component:e=>{var n;const{id:t,x:l,y:a,attrs:o,handlePointerDown:i,handlePointerMove:s,handlePointerUp:d}=e,c=v.useCallback((e=>i(t,e)),[t,i]),m=v.useCallback((e=>s(t,e)),[t,s]),h=v.useCallback((e=>d(t,e)),[t,d]),u=(e,...n)=>new Function(...n,`return ${e}`),x="MiscNode"===o.nodeType?{onPointerDown:c,onPointerMove:m,onPointerUp:h,style:{cursor:"move"}}:{},p=e=>e.map((e=>{var n,l;const a="Station"===o.nodeType&&o.core&&o.core===e.id?{id:`stn_core_${t}`,onPointerDown:c,onPointerMove:m,onPointerUp:h,style:{cursor:"move"}}:{},i=((e,n,t)=>{const l={};for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s))try{var a;l[s]=u(e[s].slice(1),...o.components.map((e=>e.label)),"color")(...n.map(((e,n)=>"number"!==t[n]||Number.isNaN(Number(e))?e:Number(e))),o.color?null!==(a=o.color.value)&&void 0!==a?a:o.color.defaultValue:"")}catch(i){l[s]=""}return l})(e.attrs,o.components.map((e=>e.value)),o.components.map((e=>e.type)));return g.jsx("g",{transform:`translate(${null!==(n=i.x)&&void 0!==n?n:0}, ${null!==(l=i.y)&&void 0!==l?l:0})`,children:v.createElement(e.type,{...i,x:0,y:0,...a},e.children?p(e.children):"_rmp_children_text"in i?"style"===e.type?(s=i._rmp_children_text,s.replace(/(^|,)\s*([^{},]+)/g,`$1 #${t} $2`)):i._rmp_children_text:null)},e.id);var s})),f=null!==(n=o.transform)&&void 0!==n?n:r,y=v.useMemo((()=>p(o.svgs)),[o]);return v.createElement("g",{id:t,transform:`translate(${l}, ${a})`,...x},o.randomId?g.jsx("g",{transform:`translate(${f.translateX}, ${f.translateY}) scale(${f.scale}) rotate(${f.rotate})`,children:y}):g.jsxs("g",{children:[g.jsx("circle",{r:"5.5"}),g.jsx("g",{transform:"translate(-4.7, -5) scale(0.8)",children:g.jsx("polygon",{points:"6,1 7.5,4.25 11,4.65 8.5,7.1 9.2,10.75 6,9 2.8,10.75 3.5,7.1 1,4.65 4.5,4.25",fill:"white"})})]}))},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("circle",{cx:"12",cy:"12",r:"6",stroke:"currentColor",fill:"none"}),g.jsx("g",{transform:"translate(7.25, 7) scale(0.8)",children:g.jsx("polygon",{points:"6,1 7.5,4.25 11,4.65 8.5,7.1 9.2,10.75 6,9 2.8,10.75 3.5,7.1 1,4.65 4.5,4.25",fill:"currentColor"})})]}),defaultAttrs:Pe,attrsComponent:e=>{var n,t,l,o,i;const{id:r,attrs:C,handleAttrsUpdate:P}=e,S=d(),{paletteAppClip:{output:B}}=c((e=>e.runtime)),{t:_}=N(),[L,M]=v.useState(!1),[A,$]=v.useState(!1),T=C.components.map(((e,n)=>{const{label:t,type:l,defaultValue:a,value:o}=e;return"number"===l||"text"===l?{label:_(t),type:"input",value:null!=o?o:a,onChange:e=>{C.components[n].value=e,P(r,{...C,components:C.components})}}:"switch"===l?{label:_(t),type:"switch",isChecked:void 0!==o?!!o:a,onChange:e=>{C.components[n].value=e,P(r,{...C,components:C.components})}}:"textarea"===l?{label:_(t),type:"textarea",value:null!=o?o:a,onChange:e=>{C.components[n].value=e,P(r,{...C,components:C.components})}}:{type:"input",label:"undefined",value:"none"}})),[U,D]=v.useState(!1);v.useEffect((()=>{C.color&&U&&B&&(C.color.value=B,P(r,{...C,color:C.color}),D(!1))}),[null==B?void 0:B.toString()]);const W=[{type:"custom",label:_("color"),component:g.jsx(m,{theme:null===(n=C.color)||void 0===n?void 0:n.value,onClick:()=>{var e;D(!0),S(h(null===(e=C.color)||void 0===e?void 0:e.value))}})}];return g.jsxs(g.Fragment,{children:[g.jsxs(y,{direction:"row",mr:"auto",width:"100%",children:[g.jsx(u,{width:"100%",overflow:"hidden",label:_("panel.details.nodes.master.type"),children:g.jsxs(y,{width:"100%",overflow:"hidden",children:[g.jsx(x,{name:null!==(t=C.label)&&void 0!==t?t:_("panel.details.nodes.master.undefined"),fg:null!==(l=C.labelColorFg)&&void 0!==l?l:a.white,bg:null!==(o=C.labelColorBg)&&void 0!==o?o:"#000000",sx:{display:"inline-block",overflow:"hidden",textOverflow:"ellipsis"},mr:1}),g.jsx(x,{name:null!==(i=C.randomId)&&void 0!==i?i:"UNDEFINED",fg:a.white,bg:C.randomId?"#19B3EA":"#000000",sx:{display:"inline-block"},mr:1})]})}),g.jsx(j,{}),g.jsx(b,{icon:g.jsx(p,{}),onClick:()=>M(!0),"aria-label":"upload"})]}),g.jsx(w,{width:"100%",leftIcon:g.jsx(f,{}),onClick:()=>$(!0),children:_("header.settings.procedures.masterManager.title")}),C.randomId&&g.jsx(s,{fields:T,minW:"full"}),C.randomId&&void 0!==C.color&&g.jsx(s,{fields:W,minW:"full"}),g.jsx(z,{isOpen:L,onClose:()=>M(!1),onSubmit:e=>{e.components.forEach(((n,t)=>{var l;e.components[t].value=null!==(l=(e=>{var n;const t=C.components.find((n=>n.id===e));return t?null!==(n=t.value)&&void 0!==n?n:t.defaultValue:void 0})(n.id))&&void 0!==l?l:n.defaultValue})),void 0!==e.color&&(e.color.value=C.color?C.color.value:e.color.defaultValue),P(r,e)}}),g.jsx(k,{isOpen:A,onClose:()=>$(!1)})]})},metadata:{displayName:"panel.details.nodes.master.displayName",tags:[]}};e("m",{[i.Virtual]:n,[i.ShmetroNumLineBadge]:$,[i.ShmetroTextLineBadge]:U,[i.GzmtrLineBadge]:W,[i.BjsubwayNumLineBadge]:I,[i.BjsubwayTextLineBadge]:V,[i.SuzhouRTNumLineBadge]:Z,[i.BerlinSBahnLineBadge]:ee,[i.BerlinUBahnLineBadge]:Y,[i.ChongqingRTNumLineBadge]:le,[i.ChongqingRTTextLineBadge]:ie,[i.ShenzhenMetroNumLineBadge]:de,[i.MRTDestinationNumbers]:me,[i.MRTLineBadge]:ue,[i.JREastLineBadge]:ye,[i.QingdaoMetroNumLineBadge]:be,[i.GuangdongIntercityRailwayLineBadge]:ve,[i.Facilities]:L,[i.Text]:B,[i.I18nText]:Ce,[i.Master]:Se})}}})); diff --git a/assets/page-header-Bgpft2Tp.js b/assets/page-header-BAx6PiVa.js similarity index 99% rename from assets/page-header-Bgpft2Tp.js rename to assets/page-header-BAx6PiVa.js index 25997eb47..ce87ee519 100644 --- a/assets/page-header-Bgpft2Tp.js +++ b/assets/page-header-BAx6PiVa.js @@ -1,4 +1,4 @@ -import{j as e,at as Y,$ as F,au as J,a1 as q,a2 as X,a3 as Q,g as ks,av as it,a4 as w,B as E,aw as Ce,ax as Re,ay as ne,az as re,aA as oe,h as Je,O as T,a5 as xe,aB as at,aC as lt,aD as ye,a7 as M,aE as N,a6 as Ps,aF as ps,aG as gs,af as ee,aH as xs,aI as le,U as be,aJ as qe,aK as ct,aL as Gs,al as Ds,d as Us,R as Zs,q as Vs,Z as Ks,aM as Ee,aN as dt,ak as Be,aO as ht,aP as ut,aQ as D,aR as Os,aS as pt,aT as k,aU as C,W as gt,m as ie,a8 as xt,a9 as mt}from"./chakra-t2DzLzXq.js";import{u as ft,r as R,C as jt,M as ms,n as rs,L as Ys,S as I,R as Ms,a as Fs,b as A,c as G,d as B,e as bt,f as wt,g as St,h as yt,i as ze,E as Oe,s as Ct,j as Ue,k as Xe,m as vt,l as zt,o as As,p as fs,q as K,t as Z,v as se,w as Js,x as qs,y as os,z as ke,A as _e,B as Ts,D as Rs,F as kt,G as Ot,H as Mt,I as At,J as Tt,K as Es,N as Rt,O as Et,P as Nt,Q as _t,T as It,U as Ht,V as Wt,W as Lt,X as Bt,Y as Pt,Z as Gt,_ as Dt,$ as Ut,a0 as Zt,a1 as Vt,a2 as Kt,a3 as me,a4 as Yt,a5 as Ft,a6 as Jt,a7 as qt,a8 as ue,a9 as Xt,aa as Ns,ab as Qt,ac as Qe,ad as $t,ae as en,af as sn,ag as tn,ah as nn,ai as rn,aj as on,ak as an,al as ln,am as cn}from"./index-CgEQ4DK5.js";import{u as H,b as f,r as Pe,T as _s}from"./react-DmTIgZys.js";import{d as is,m as dn,a as hn,i as un,s as pn,u as js,M as gn}from"./master-manager-UVzPVFgJ.js";import{C as xn}from"./change-type-modal-DKvpGHTO.js";var Is=function(s){return ft(R.ready(),s)},mn={ar:{ar:"العربية",en:"Arabic",ko:"아랍어","zh-Hans":"阿拉伯文","zh-Hant":"阿拉伯文"},az:{az:"Azərbaycanca",en:"Azerbaijani",ko:"아제르바이잔어","zh-Hans":"阿塞拜疆文","zh-Hant":"阿塞拜疆文"},ca:{ca:"Català",en:"Catalan",ko:"카탈루냐어","zh-Hans":"加泰罗尼亚文","zh-Hant":"加泰隆尼亞文"},da:{da:"Dansk",en:"Danish",ko:"덴마크어","zh-Hans":"丹麦文","zh-Hant":"丹麥文"},de:{de:"Deutsch",en:"German",ko:"독일어","zh-Hans":"德文","zh-Hant":"德文"},el:{el:"Ελληνικά",en:"Greek",ko:"그리스어","zh-Hans":"希腊文","zh-Hant":"希臘文"},en:{en:"English",ja:"英語",ko:"영어","zh-Hans":"英文","zh-Hant":"英文"},es:{en:"Spanish",es:"Español",ko:"스페인어","zh-Hans":"西班牙文","zh-Hant":"西班牙文"},fa:{en:"Persian",fa:"فارسی",ko:"페르시아어","zh-Hans":"波斯文","zh-Hant":"波斯文"},fr:{en:"French",fr:"Français",ko:"프랑스어","zh-Hans":"法文","zh-Hant":"法文"},ga:{en:"Irish",ga:"Gaeilge",ko:"아일랜드어","zh-Hans":"爱尔兰文","zh-Hant":"愛爾蘭文"},gd:{en:"Scottish Gaelic",gd:"Gàidhlig",ko:"스코틀랜드 게일어","zh-Hans":"苏格兰盖尔文","zh-Hant":"蘇格蘭蓋爾文"},hi:{en:"Hindi",hi:"हिन्दी",ko:"힌디어","zh-Hans":"印地文","zh-Hant":"印地文"},hu:{en:"Hungarian",hu:"Magyar",ko:"헝가리어","zh-Hans":"匈牙利文","zh-Hant":"匈牙利文"},id:{en:"Indoesian",id:"Bahasa Indonesia",ko:"인도네시아어","zh-Hans":"印尼文","zh-Hant":"印尼文"},it:{en:"Italian",it:"Italiano",ko:"이탈리아어","zh-Hans":"意大利文","zh-Hant":"意大利文"},ja:{en:"Japanese",ja:"日本語",ko:"일본어","zh-Hans":"日文","zh-Hant":"日文"},kk:{en:"Kazakh",kk:"Қазақша",ko:"카자흐어","zh-Hans":"哈萨克文","zh-Hant":"哈薩克文"},ko:{en:"Korean",ja:"韓国語",ko:"한국어","zh-Hans":"韩文","zh-Hant":"韓文"},ms:{en:"Malay",ko:"말레이어",ms:"Bahasa Melayu","zh-Hans":"马来文","zh-Hant":"馬來文"},no:{en:"Norwegian",ko:"노르웨이어",no:"Norsk","zh-Hans":"挪威文","zh-Hant":"挪威文"},pl:{en:"Polish",ko:"폴란드어",pl:"Polski","zh-Hans":"波兰文","zh-Hant":"波蘭文"},pt:{en:"Portuguese",ko:"포르투갈어",pt:"Português","zh-Hans":"葡萄牙文","zh-Hant":"葡萄牙文"},ro:{en:"Romanian",ko:"루마니아어",ro:"Română","zh-Hans":"罗马尼亚文","zh-Hant":"羅馬尼亞文"},ru:{en:"Russian",ko:"러시아어",ru:"Русский","zh-Hans":"俄文","zh-Hant":"俄文"},sv:{en:"Swedish",ko:"스웨덴어",sv:"Svenska","zh-Hans":"瑞典文","zh-Hant":"瑞典文"},th:{en:"Thai",ko:"태국어",th:"ภาษาไทย","zh-Hans":"泰文","zh-Hant":"泰文"},tr:{en:"Turkish",ko:"튀르키예어",tr:"Türkçe","zh-Hans":"土耳其文","zh-Hant":"土耳其文"},uk:{en:"Ukrainian",ko:"우크라이나어",uk:"Українська","zh-Hans":"乌克兰文","zh-Hant":"烏克蘭文"},ur:{en:"Urdo",ko:"우르두어",ur:"اردو","zh-Hans":"乌尔都文","zh-Hant":"烏爾都文"},uz:{en:"Uzbek",ko:"우즈베크어",uz:"Oʻzbekcha","zh-Hans":"乌兹别克文","zh-Hant":"烏茲別克文"},vi:{en:"Vietnamese",ko:"베트남어",vi:"Tiếng Việt","zh-Hans":"越南文","zh-Hant":"越南文"},zh:{en:"Chinese",ja:"中国語",ko:"중국어",zh:"中文","zh-Hans":"中文","zh-Hant":"中文"},"zh-Hans":{en:"Simplified Chinese",ja:"中国語(簡体字)",ko:"중국어 간체자","zh-Hans":"简体中文","zh-Hant":"簡體中文"},"zh-Hant":{en:"Traditional Chinese",ja:"中国語(繁体字)",ko:"중국어 정체자","zh-Hans":"繁体中文","zh-Hant":"繁體中文"}};const fn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAMAAAC5zwKfAAAC9FBMVEUAAACabOutif+ve/+FbLiVcuaQaOCWb+WYceiLYtuccOingvOYcOeRad6ZcuifeumXcOWhfO6jfPCmhPOUa+aLYtyac+iVbuSMZN2VbeWNZt6RaeGRauKhee2acumQauClfvGTa+OOZd6JYNqWb+Sog/SSauGPaOCogvSNZN2NZN2ngfKogvSngPOfeu6bdemTauSlfvGYcOiohPSngfKQaOCXb+aifO+XcOaVbuWTbOOogfOlf/GmgPKTbOOYceaMZN2pg/WQaN+hee2OZt6RaeCRauGKYtuSa9+bdOmog/SifO+ddumie+6Zcuelf/GSa+Ked+uYcealf/GSauGJYdqpg/SQaOCJYduOZd6jffCJX9qNZN6mgfKMZN2SauKfeOyKYtuXcOWpg/SngfOdduuJYNqQaN+WbuWUbeWmgfOLY9yUbOWlf/GZceeKYNqOaN6mgvKpgvSZceiMZNyVb+WNZt2cdumSauOfee2Wb+WPaN+geu2ddeqMZNypg/Wheu6lf/GZcueJYNmQaN+jffCTbOSphPWog/SWb+WmgPKWb+aYcuekf/Gac+iKYtuVbuWWbuSogvSSa+KWb+SOZt6ifO+feeyngfKRaeGpg/SYcOefeOujfe+VbeSMZd6ac+iJYdqVbeSog/OVbOWcdeqKYtungvObdOmfd+uSa+KNZNyeduuRaeGjfe+XcOWMY9ybdOmngvSOZt6UbuWacuiSbOKgee2bdOmMY9yVbuOmgvSUbeKviP6xif+UaueVa+mMY92ZcOyqhPaOZOKuh/2shPybcu2mf/WhePKcdO6ddeyYb+qZceirhPmpgfmedfCacuuWbuWogfemffefdfKacuqSaOaPZeSRaOKyiv+qg/iogvShd/SYbuyWbeiQZuWNZN+MYt+thvqlffSie/CXbeqTaOeKYdu1jP+jevOccvCbce6Xbeuth/uqgvukevinf/eiePaVau2WbOqXb+ahdvuUaumfdPehee+thP6bb/MemaUsAAAAvXRSTlMAAwEEAwb+/Qv6Cfv8IRAOXiwaFP7++9p3TkwvJSEeGf7++/r59+ri0MmCeFZCPjk3NDEk9PHi4NLIwq2djHp1bmNZUVBIPzwU/v38+fj49/bz6+rl5N7a0s7Hw8LAvq+opqSjlZOSiIBuaGRjYmJaVU1HREQ1KykW+/X19O7r6OXf29vV0c3Mxry4taupnpqZlZGRi4uGgXxzbWtjWlJG8/Px7ezk3dfQwbq4tp2Zh3t6cVxaVtrXz7GdcGlhNM13AAAH1ElEQVRYw+1YVVgbQRDezd2RkODu7pS6u7u7u7u7u7u7u7slkCZESUKCuxQoLVD3vnSPSyW9S6ClD33o/xHOdv6b2f1nZhPwH//xz4EFcRwi/CU2RKY/hayK0+EYdWhr6eGN6CrKCEk6qzZNtwxY0Wtxr8EtK8qIob+Zo/v6i7Ozk8U54jeFMwFeoaUAcMIA/2RxrjhZ6O9v7n/szWjA+nMXkWWbAbni3Nzk3BXDhvUSmpsnZ08BsCJ8E/yTC8XCXqPbzHbpa24u/ODoUpE5hGBKbm6h44ApELj1TRLnvMm50IYUDoQ4UiWGQJBAB/IfXuaLcDB3RXLhsdFbwtyHfXjiKDa/51aWIKBJmRJgilBYOLXpmyfm2ULznNCWsHTRWZDgWLX1tvRwr9p6ZquWU5sjtDwyy9LqW0axjEd8NTm7Lwj7UohWw9Hx9OCBoQMHDx44MLRfv5V9goMX11qwwM8MISUlxcysVtDK8zsmuhOkHW40ZJds8WkOMUyY9CQ7R5jyITIp6UmkHlFRUW8RCkpKSjIzM2MyMwsKYmKyuq4e05owSokBN0ehGC3rkS39FvulILIoPSIjfZFXfgtq1QoK6hkcHNwzqFZX35ji4pismGLf+g/bIlsWY8jc0CeO5jfQKWf2zOZNXcLG7Nq1a0xY2NV9TSfcmOp2pHVV99keHpZeXmg+W0/dt61+z6yiGJ1U6tyEg6wZXWyVkyMUhnHLm6aWh7c5a6U6raLuYdKaBpRjTZPEwshQUi5IbKVxsCgZYjRQLrW9uU4n1SlU962QYBlTxS/KL8nsghundBIIAofMFQ6SiqFIW63TJrIz6s5CNximEbQJjUryi0rpN6aVN/USjMAgi17hWHoZkiSTaycEJMy/xTSRLBxwXYJLIs0iM836DGnsZknoXcIxXJ8WLETnbeNOMeqvvTbKLbSJBxiXhhzustKhxME361GBWc/6l/a18uB89w2WumTjHFt7zo86CdFbxypVKsUBetR64Vu1vNTHLKsgqyDz0aMs36DVQ3aMc61qyaUmpfoGrSrx9WFA/Jy1YLJTYjulDWBKROqmVevGQ/p0dXiEEEN+fLsGrd7qygXWY+cr2FrpcA6Ahia3nNopnWYAjLnrUYOtZk3ccf72cZ20qKiY5E2Q1h9XL0P3LsHZ5tfpghDYKJ3kpzwBZrwvU2dzq9qMHV7f+WSAtIiti03QshMCdralTT+pwibPnOIvskxUeCQ04ttT69kzXHfOfxcQoIpdVwUtHaPkNsd3jL8G8LLKrte4nY1noGnnbmWz32V0PwCRUpiLi/XZZ8pu1QFmui1UdU5QKLS1m9jUTmArFBs9qNLCzFi5ozJ+qMkuhAOi3ssAaaxOoZCi/Ko9mZx+E014VN4n5CJhqi3MOa7S1a3HZltYSJXDLUk3TI5elB+/x9SGCANzl8cmbtj2jm2R0d2Gthj0cjU079U5DEBTvfpKLFulstDKN3jS3aO//2B+3lKkRVNREHVjLSwyOjdBEwrL7sTVFubNq2yCED2Z3F1l8bouqb3ybBW8lsryWwBonA9FnJiYMdyKWtyyPbSvI8s7BKBRPtbm1xZKVZPSelIuQrulr3yMeggB3Piys7y7K6llDC/X7sh24asOEVT2MSYn4ltuC6haDcuzXW2RH9fDFh2ZdX/ttZP8rBdyD/F5o/jL4eHuuBerrAHO/LZZnZWxy70AQTKNPTlkbhl1BEKk6P4aSUPmYBDJqJftjlYBBMnt7vDx/TiTwqH8r9JJFjeJeRwOrO/K5aNK8xICb+f3Dq4GA1m/9lZgd7kR3C3RLLMHXMaIUaLLlS3QkSpiW28alCVIZq5hGjd8KhlUJ12y3p756xIOKjvJj1YH8Ec8LMP4DOseIkztEifz8emybKQnumQgnNHu2SIkmW8zDg348Mb1Jv7isl3/p+k+6XFxaYIelRgYMVCl47OOVQDOLA/XovcOyH0DnzmNaqplXWQSXnTaJADphJ6nnuUfREdmwuKPBoQQWI/cZGsfUdk2YlMaj3+iBs0QAuJcfN5QNNuMEmEZhozMw58+7bHXljw/xEt/3gxg9ETZE/+pWzVaWWBeFByMT+epU3khjabVaFZTpKYTohu23fLjLwIjjCxDbSDzQfzA9qJoQfuaj3kCKmSayagX817tZmCkawZZT6qZns4TCdSP+aJUwX4AGavlHc082Z6yaj/VusJFoseBlaaP6B3YPnANKRvmxr1Q1kkz1A6dYkZLTWml9Gwg4Imej0eX9tUiqhHGej0E0zppOr2oc5BL2jF2W0h6Z319SWpgtGg8GvRjQ2ikJFau87mDTNN/vJ1+rw5Z3wEhTrIBu/0hAjXv6ZJpiB6ZYGiQqW/4nps0cR1exNW53MLu+034IxGtp4/szee35/Mb1ChXHyNjOLRKkybTSHyWNQifXoPz0zP7as0anuHxo0XR/JBKtD2UiU7KmdS/g0SSlqZW+/QIWd+wUfj1B+F7t48Y1DvwMf/5Y75AtKYZlxxYTpCBwIjtq7pI+BK1WhLN50cj8AUCRBYtSBX1HjENI0f99k85EXsbnKmZxhcgJgSBIDVVIFqydnslO0qIZYIuDlJjlcJHNhi0NiRkzdr1Ixrtn16Dq9f1HwD/bga5HGuOPh1pkv9NPw3FDXHyukKgRIhTH1Q9/uM//nl8BYlod8WjsBdLAAAAAElFTkSuQmCC",jn="data:image/svg+xml,%3csvg%20width='98'%20height='96'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M48.854%200C21.839%200%200%2022%200%2049.217c0%2021.756%2013.993%2040.172%2033.405%2046.69%202.427.49%203.316-1.059%203.316-2.362%200-1.141-.08-5.052-.08-9.127-13.59%202.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015%204.934.326%207.523%205.052%207.523%205.052%204.367%207.496%2011.404%205.378%2014.235%204.074.404-3.178%201.699-5.378%203.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283%200-5.378%201.94-9.778%205.014-13.2-.485-1.222-2.184-6.275.486-13.038%200%200%204.125-1.304%2013.426%205.052a46.97%2046.97%200%200%201%2012.214-1.63c4.125%200%208.33.571%2012.213%201.63%209.302-6.356%2013.427-5.052%2013.427-5.052%202.67%206.763.97%2011.816.485%2013.038%203.155%203.422%205.015%207.822%205.015%2013.2%200%2018.905-11.404%2023.06-22.324%2024.283%201.78%201.548%203.316%204.481%203.316%209.126%200%206.6-.08%2011.897-.08%2013.526%200%201.304.89%202.853%203.316%202.364%2019.412-6.52%2033.405-24.935%2033.405-46.691C97.707%2022%2075.788%200%2048.854%200z'%20fill='%2324292f'/%3e%3c/svg%3e",bn="/rmp/assets/opencollective-icon-Ciasch0w.webp",wn="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2023.0.1,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20270%20270'%20style='enable-background:new%200%200%20270%20270;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%23E01E5A;}%20.st1{fill:%2336C5F0;}%20.st2{fill:%232EB67D;}%20.st3{fill:%23ECB22E;}%20%3c/style%3e%3cg%3e%3cg%3e%3cpath%20class='st0'%20d='M99.4,151.2c0,7.1-5.8,12.9-12.9,12.9c-7.1,0-12.9-5.8-12.9-12.9c0-7.1,5.8-12.9,12.9-12.9h12.9V151.2z'/%3e%3cpath%20class='st0'%20d='M105.9,151.2c0-7.1,5.8-12.9,12.9-12.9s12.9,5.8,12.9,12.9v32.3c0,7.1-5.8,12.9-12.9,12.9%20s-12.9-5.8-12.9-12.9V151.2z'/%3e%3c/g%3e%3cg%3e%3cpath%20class='st1'%20d='M118.8,99.4c-7.1,0-12.9-5.8-12.9-12.9c0-7.1,5.8-12.9,12.9-12.9s12.9,5.8,12.9,12.9v12.9H118.8z'/%3e%3cpath%20class='st1'%20d='M118.8,105.9c7.1,0,12.9,5.8,12.9,12.9s-5.8,12.9-12.9,12.9H86.5c-7.1,0-12.9-5.8-12.9-12.9%20s5.8-12.9,12.9-12.9H118.8z'/%3e%3c/g%3e%3cg%3e%3cpath%20class='st2'%20d='M170.6,118.8c0-7.1,5.8-12.9,12.9-12.9c7.1,0,12.9,5.8,12.9,12.9s-5.8,12.9-12.9,12.9h-12.9V118.8z'/%3e%3cpath%20class='st2'%20d='M164.1,118.8c0,7.1-5.8,12.9-12.9,12.9c-7.1,0-12.9-5.8-12.9-12.9V86.5c0-7.1,5.8-12.9,12.9-12.9%20c7.1,0,12.9,5.8,12.9,12.9V118.8z'/%3e%3c/g%3e%3cg%3e%3cpath%20class='st3'%20d='M151.2,170.6c7.1,0,12.9,5.8,12.9,12.9c0,7.1-5.8,12.9-12.9,12.9c-7.1,0-12.9-5.8-12.9-12.9v-12.9H151.2z'/%3e%3cpath%20class='st3'%20d='M151.2,164.1c-7.1,0-12.9-5.8-12.9-12.9c0-7.1,5.8-12.9,12.9-12.9h32.3c7.1,0,12.9,5.8,12.9,12.9%20c0,7.1-5.8,12.9-12.9,12.9H151.2z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Sn=s=>{const{isOpen:a,onClose:i}=s,{t:n}=H(),o=R.getAppVersion();return e.jsxs(Y,{isOpen:a,onClose:i,size:"xl",scrollBehavior:"inside",children:[e.jsx(F,{}),e.jsxs(J,{children:[e.jsx(q,{children:n("header.about.title")}),e.jsx(X,{}),e.jsxs(Q,{paddingBottom:10,children:[e.jsxs(ks,{direction:"row",children:[e.jsx(it,{boxSize:"128px",src:"/rmp//logo192.png"}),e.jsxs(ks,{direction:"column",width:"100%",alignItems:"center",justifyContent:"center",children:[e.jsx(w,{fontSize:"xl",as:"b",children:n("header.about.rmp")}),e.jsx(w,{children:o}),e.jsx(w,{}),e.jsx(w,{fontSize:"sm",children:n("header.about.railmapgen")})]})]}),e.jsx(E,{margin:5,children:e.jsx(w,{fontSize:"xl",children:n("header.about.desc")})}),e.jsx(Ce,{as:"h5",size:"sm",mt:3,mb:2,children:n("header.about.contributors")}),e.jsx(Ce,{as:"h6",size:"xs",my:2,children:n("header.about.coreContributors")}),e.jsxs(Re,{children:[e.jsxs(ne,{size:"lg",w:"85%",onClick:()=>window.open("https://github.com/thekingofcity","_blank"),cursor:"pointer",children:[e.jsx(re,{src:"https://github.com/thekingofcity.png",size:"lg",my:2,ml:-1,mr:2}),e.jsxs(oe,{display:"block",width:"100%",children:[e.jsx(w,{fontSize:"lg",fontWeight:"bold",mb:1,children:"thekingofcity"}),e.jsx(w,{fontSize:"sm",children:n("header.about.content1")}),e.jsx(w,{fontSize:"sm",align:"right",mb:1,children:n("header.about.content2")})]})]}),e.jsxs(ne,{size:"lg",w:"85%",onClick:()=>window.open("https://github.com/langonginc","_blank"),cursor:"pointer",children:[e.jsx(re,{src:"https://github.com/langonginc.png",size:"lg",my:2,ml:-1,mr:2}),e.jsxs(oe,{display:"block",width:"100%",children:[e.jsx(w,{fontSize:"lg",fontWeight:"bold",mb:1,children:"langonginc"}),e.jsx(w,{fontSize:"sm",children:n("header.about.langonginc")}),e.jsx(w,{fontSize:"sm",align:"right",mb:1,children:"--Avicii"})]})]})]}),e.jsx(Ce,{as:"h6",size:"xs",my:2,children:n("header.about.styleContributors")}),e.jsxs(Re,{children:[e.jsxs(ne,{size:"lg",w:"85%",onClick:()=>window.open("https://github.com/203IhzElttil","_blank"),cursor:"pointer",children:[e.jsx(re,{src:"https://github.com/203IhzElttil.png",size:"lg",my:2,ml:-1,mr:2}),e.jsxs(oe,{display:"block",width:"100%",children:[e.jsx(w,{fontSize:"lg",fontWeight:"bold",mb:1,children:"203IhzElttil"}),e.jsx(w,{fontSize:"sm",mb:1,children:n("header.about.203IhzElttil")})]})]}),e.jsxs(ne,{size:"lg",w:"85%",onClick:()=>window.open("https://github.com/Swiftiecott","_blank"),cursor:"pointer",children:[e.jsx(re,{src:"https://github.com/Swiftiecott.png",size:"lg",my:2,ml:-1,mr:2}),e.jsxs(oe,{display:"block",width:"100%",children:[e.jsx(w,{fontSize:"lg",fontWeight:"bold",mb:1,children:"Swiftiecott"}),e.jsx(w,{fontSize:"sm",mb:1,children:n("header.about.Swiftiecott")})]})]}),e.jsxs(ne,{size:"lg",w:"85%",onClick:()=>window.open("https://github.com/Minwtraft","_blank"),cursor:"pointer",children:[e.jsx(re,{src:"https://github.com/Minwtraft.png",size:"lg",my:2,ml:-1,mr:2}),e.jsxs(oe,{display:"block",width:"100%",children:[e.jsx(w,{fontSize:"lg",fontWeight:"bold",mb:1,children:"Minwtraft"}),e.jsx(w,{fontSize:"sm",mb:1,children:n("header.about.Minwtraft")})]})]})]}),e.jsx(Ce,{as:"h5",size:"sm",mt:3,mb:2,children:n("header.about.contactUs")}),e.jsxs(Re,{children:[e.jsxs(ne,{size:"lg",w:"85%",onClick:()=>window.open("https://github.com/railmapgen/rmp/issues","_blank"),cursor:"pointer",children:[e.jsx(re,{src:jn,size:"lg",my:2,ml:-1,mr:2}),e.jsxs(oe,{display:"block",width:"100%",children:[e.jsx(w,{fontSize:"lg",fontWeight:"bold",mb:1,children:n("header.about.github")}),e.jsx(w,{fontSize:"sm",children:n("header.about.githubContent")})]})]}),e.jsxs(ne,{size:"lg",w:"85%",onClick:()=>window.open("https://join.slack.com/t/railmapgenerator/shared_invite/zt-1odhhta3n-DdZF~fnVwo_q0S0RJmgV8A","_blank"),cursor:"pointer",children:[e.jsx(re,{src:wn,size:"lg",my:2,ml:-1,mr:2}),e.jsxs(oe,{display:"block",width:"100%",children:[e.jsx(w,{fontSize:"lg",fontWeight:"bold",mb:1,children:n("header.about.slack")}),e.jsx(w,{fontSize:"sm",children:n("header.about.slackContent")}),e.jsx(w,{fontSize:"sm",as:"i",children:"#rmp, #gallery, #rmg, #palette-and-templates"})]})]})]}),e.jsx(Ce,{as:"h5",size:"sm",mt:3,mb:2,children:n("header.donation.title")}),e.jsxs(Re,{children:[e.jsxs(ne,{size:"lg",w:"85%",onClick:()=>window.open("https://afdian.com/a/rail-map-toolkit","_blank"),cursor:"pointer",children:[e.jsx(re,{src:fn,size:"lg",my:2,ml:-1,mr:2}),e.jsxs(oe,{display:"block",width:"100%",pb:1,children:[e.jsx(w,{fontSize:"lg",fontWeight:"bold",mb:1,children:n("header.donation.afdian")}),e.jsx(w,{fontSize:"sm",children:n("header.donation.viaCNY")})]})]}),e.jsxs(ne,{size:"lg",w:"85%",onClick:()=>window.open("https://opencollective.com/rail-map-toolkit","_blank"),cursor:"pointer",children:[e.jsx(re,{src:bn,size:"lg",my:2,ml:-1,mr:2}),e.jsxs(oe,{display:"block",width:"100%",pb:1,children:[e.jsx(w,{fontSize:"lg",fontWeight:"bold",mb:1,children:n("header.donation.openCollective")}),e.jsx(w,{fontSize:"sm",children:n("header.donation.viaUSD")})]})]})]})]})]})]})};/*! +import{j as e,at as Y,$ as F,au as J,a1 as q,a2 as X,a3 as Q,g as ks,av as it,a4 as w,B as E,aw as Ce,ax as Re,ay as ne,az as re,aA as oe,h as Je,O as T,a5 as xe,aB as at,aC as lt,aD as ye,a7 as M,aE as N,a6 as Ps,aF as ps,aG as gs,af as ee,aH as xs,aI as le,U as be,aJ as qe,aK as ct,aL as Gs,al as Ds,d as Us,R as Zs,q as Vs,Z as Ks,aM as Ee,aN as dt,ak as Be,aO as ht,aP as ut,aQ as D,aR as Os,aS as pt,aT as k,aU as C,W as gt,m as ie,a8 as xt,a9 as mt}from"./chakra-t2DzLzXq.js";import{u as ft,r as R,C as jt,M as ms,n as rs,L as Ys,S as I,R as Ms,a as Fs,b as A,c as G,d as B,e as bt,f as wt,g as St,h as yt,i as ze,E as Oe,s as Ct,j as Ue,k as Xe,m as vt,l as zt,o as As,p as fs,q as K,t as Z,v as se,w as Js,x as qs,y as os,z as ke,A as _e,B as Ts,D as Rs,F as kt,G as Ot,H as Mt,I as At,J as Tt,K as Es,N as Rt,O as Et,P as Nt,Q as _t,T as It,U as Ht,V as Wt,W as Lt,X as Bt,Y as Pt,Z as Gt,_ as Dt,$ as Ut,a0 as Zt,a1 as Vt,a2 as Kt,a3 as me,a4 as Yt,a5 as Ft,a6 as Jt,a7 as qt,a8 as ue,a9 as Xt,aa as Ns,ab as Qt,ac as Qe,ad as $t,ae as en,af as sn,ag as tn,ah as nn,ai as rn,aj as on,ak as an,al as ln,am as cn}from"./index-DRWG9Ar1.js";import{u as H,b as f,r as Pe,T as _s}from"./react-DmTIgZys.js";import{d as is,m as dn,a as hn,i as un,s as pn,u as js,M as gn}from"./master-manager-DlQmLEpO.js";import{C as xn}from"./change-type-modal-CfyQxI5Y.js";var Is=function(s){return ft(R.ready(),s)},mn={ar:{ar:"العربية",en:"Arabic",ko:"아랍어","zh-Hans":"阿拉伯文","zh-Hant":"阿拉伯文"},az:{az:"Azərbaycanca",en:"Azerbaijani",ko:"아제르바이잔어","zh-Hans":"阿塞拜疆文","zh-Hant":"阿塞拜疆文"},ca:{ca:"Català",en:"Catalan",ko:"카탈루냐어","zh-Hans":"加泰罗尼亚文","zh-Hant":"加泰隆尼亞文"},da:{da:"Dansk",en:"Danish",ko:"덴마크어","zh-Hans":"丹麦文","zh-Hant":"丹麥文"},de:{de:"Deutsch",en:"German",ko:"독일어","zh-Hans":"德文","zh-Hant":"德文"},el:{el:"Ελληνικά",en:"Greek",ko:"그리스어","zh-Hans":"希腊文","zh-Hant":"希臘文"},en:{en:"English",ja:"英語",ko:"영어","zh-Hans":"英文","zh-Hant":"英文"},es:{en:"Spanish",es:"Español",ko:"스페인어","zh-Hans":"西班牙文","zh-Hant":"西班牙文"},fa:{en:"Persian",fa:"فارسی",ko:"페르시아어","zh-Hans":"波斯文","zh-Hant":"波斯文"},fr:{en:"French",fr:"Français",ko:"프랑스어","zh-Hans":"法文","zh-Hant":"法文"},ga:{en:"Irish",ga:"Gaeilge",ko:"아일랜드어","zh-Hans":"爱尔兰文","zh-Hant":"愛爾蘭文"},gd:{en:"Scottish Gaelic",gd:"Gàidhlig",ko:"스코틀랜드 게일어","zh-Hans":"苏格兰盖尔文","zh-Hant":"蘇格蘭蓋爾文"},hi:{en:"Hindi",hi:"हिन्दी",ko:"힌디어","zh-Hans":"印地文","zh-Hant":"印地文"},hu:{en:"Hungarian",hu:"Magyar",ko:"헝가리어","zh-Hans":"匈牙利文","zh-Hant":"匈牙利文"},id:{en:"Indoesian",id:"Bahasa Indonesia",ko:"인도네시아어","zh-Hans":"印尼文","zh-Hant":"印尼文"},it:{en:"Italian",it:"Italiano",ko:"이탈리아어","zh-Hans":"意大利文","zh-Hant":"意大利文"},ja:{en:"Japanese",ja:"日本語",ko:"일본어","zh-Hans":"日文","zh-Hant":"日文"},kk:{en:"Kazakh",kk:"Қазақша",ko:"카자흐어","zh-Hans":"哈萨克文","zh-Hant":"哈薩克文"},ko:{en:"Korean",ja:"韓国語",ko:"한국어","zh-Hans":"韩文","zh-Hant":"韓文"},ms:{en:"Malay",ko:"말레이어",ms:"Bahasa Melayu","zh-Hans":"马来文","zh-Hant":"馬來文"},no:{en:"Norwegian",ko:"노르웨이어",no:"Norsk","zh-Hans":"挪威文","zh-Hant":"挪威文"},pl:{en:"Polish",ko:"폴란드어",pl:"Polski","zh-Hans":"波兰文","zh-Hant":"波蘭文"},pt:{en:"Portuguese",ko:"포르투갈어",pt:"Português","zh-Hans":"葡萄牙文","zh-Hant":"葡萄牙文"},ro:{en:"Romanian",ko:"루마니아어",ro:"Română","zh-Hans":"罗马尼亚文","zh-Hant":"羅馬尼亞文"},ru:{en:"Russian",ko:"러시아어",ru:"Русский","zh-Hans":"俄文","zh-Hant":"俄文"},sv:{en:"Swedish",ko:"스웨덴어",sv:"Svenska","zh-Hans":"瑞典文","zh-Hant":"瑞典文"},th:{en:"Thai",ko:"태국어",th:"ภาษาไทย","zh-Hans":"泰文","zh-Hant":"泰文"},tr:{en:"Turkish",ko:"튀르키예어",tr:"Türkçe","zh-Hans":"土耳其文","zh-Hant":"土耳其文"},uk:{en:"Ukrainian",ko:"우크라이나어",uk:"Українська","zh-Hans":"乌克兰文","zh-Hant":"烏克蘭文"},ur:{en:"Urdo",ko:"우르두어",ur:"اردو","zh-Hans":"乌尔都文","zh-Hant":"烏爾都文"},uz:{en:"Uzbek",ko:"우즈베크어",uz:"Oʻzbekcha","zh-Hans":"乌兹别克文","zh-Hant":"烏茲別克文"},vi:{en:"Vietnamese",ko:"베트남어",vi:"Tiếng Việt","zh-Hans":"越南文","zh-Hant":"越南文"},zh:{en:"Chinese",ja:"中国語",ko:"중국어",zh:"中文","zh-Hans":"中文","zh-Hant":"中文"},"zh-Hans":{en:"Simplified Chinese",ja:"中国語(簡体字)",ko:"중국어 간체자","zh-Hans":"简体中文","zh-Hant":"簡體中文"},"zh-Hant":{en:"Traditional Chinese",ja:"中国語(繁体字)",ko:"중국어 정체자","zh-Hans":"繁体中文","zh-Hant":"繁體中文"}};const fn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAMAAAC5zwKfAAAC9FBMVEUAAACabOutif+ve/+FbLiVcuaQaOCWb+WYceiLYtuccOingvOYcOeRad6ZcuifeumXcOWhfO6jfPCmhPOUa+aLYtyac+iVbuSMZN2VbeWNZt6RaeGRauKhee2acumQauClfvGTa+OOZd6JYNqWb+Sog/SSauGPaOCogvSNZN2NZN2ngfKogvSngPOfeu6bdemTauSlfvGYcOiohPSngfKQaOCXb+aifO+XcOaVbuWTbOOogfOlf/GmgPKTbOOYceaMZN2pg/WQaN+hee2OZt6RaeCRauGKYtuSa9+bdOmog/SifO+ddumie+6Zcuelf/GSa+Ked+uYcealf/GSauGJYdqpg/SQaOCJYduOZd6jffCJX9qNZN6mgfKMZN2SauKfeOyKYtuXcOWpg/SngfOdduuJYNqQaN+WbuWUbeWmgfOLY9yUbOWlf/GZceeKYNqOaN6mgvKpgvSZceiMZNyVb+WNZt2cdumSauOfee2Wb+WPaN+geu2ddeqMZNypg/Wheu6lf/GZcueJYNmQaN+jffCTbOSphPWog/SWb+WmgPKWb+aYcuekf/Gac+iKYtuVbuWWbuSogvSSa+KWb+SOZt6ifO+feeyngfKRaeGpg/SYcOefeOujfe+VbeSMZd6ac+iJYdqVbeSog/OVbOWcdeqKYtungvObdOmfd+uSa+KNZNyeduuRaeGjfe+XcOWMY9ybdOmngvSOZt6UbuWacuiSbOKgee2bdOmMY9yVbuOmgvSUbeKviP6xif+UaueVa+mMY92ZcOyqhPaOZOKuh/2shPybcu2mf/WhePKcdO6ddeyYb+qZceirhPmpgfmedfCacuuWbuWogfemffefdfKacuqSaOaPZeSRaOKyiv+qg/iogvShd/SYbuyWbeiQZuWNZN+MYt+thvqlffSie/CXbeqTaOeKYdu1jP+jevOccvCbce6Xbeuth/uqgvukevinf/eiePaVau2WbOqXb+ahdvuUaumfdPehee+thP6bb/MemaUsAAAAvXRSTlMAAwEEAwb+/Qv6Cfv8IRAOXiwaFP7++9p3TkwvJSEeGf7++/r59+ri0MmCeFZCPjk3NDEk9PHi4NLIwq2djHp1bmNZUVBIPzwU/v38+fj49/bz6+rl5N7a0s7Hw8LAvq+opqSjlZOSiIBuaGRjYmJaVU1HREQ1KykW+/X19O7r6OXf29vV0c3Mxry4taupnpqZlZGRi4uGgXxzbWtjWlJG8/Px7ezk3dfQwbq4tp2Zh3t6cVxaVtrXz7GdcGlhNM13AAAH1ElEQVRYw+1YVVgbQRDezd2RkODu7pS6u7u7u7u7u7u7u7slkCZESUKCuxQoLVD3vnSPSyW9S6ClD33o/xHOdv6b2f1nZhPwH//xz4EFcRwi/CU2RKY/hayK0+EYdWhr6eGN6CrKCEk6qzZNtwxY0Wtxr8EtK8qIob+Zo/v6i7Ozk8U54jeFMwFeoaUAcMIA/2RxrjhZ6O9v7n/szWjA+nMXkWWbAbni3Nzk3BXDhvUSmpsnZ08BsCJ8E/yTC8XCXqPbzHbpa24u/ODoUpE5hGBKbm6h44ApELj1TRLnvMm50IYUDoQ4UiWGQJBAB/IfXuaLcDB3RXLhsdFbwtyHfXjiKDa/51aWIKBJmRJgilBYOLXpmyfm2ULznNCWsHTRWZDgWLX1tvRwr9p6ZquWU5sjtDwyy9LqW0axjEd8NTm7Lwj7UohWw9Hx9OCBoQMHDx44MLRfv5V9goMX11qwwM8MISUlxcysVtDK8zsmuhOkHW40ZJds8WkOMUyY9CQ7R5jyITIp6UmkHlFRUW8RCkpKSjIzM2MyMwsKYmKyuq4e05owSokBN0ehGC3rkS39FvulILIoPSIjfZFXfgtq1QoK6hkcHNwzqFZX35ji4pismGLf+g/bIlsWY8jc0CeO5jfQKWf2zOZNXcLG7Nq1a0xY2NV9TSfcmOp2pHVV99keHpZeXmg+W0/dt61+z6yiGJ1U6tyEg6wZXWyVkyMUhnHLm6aWh7c5a6U6raLuYdKaBpRjTZPEwshQUi5IbKVxsCgZYjRQLrW9uU4n1SlU962QYBlTxS/KL8nsghundBIIAofMFQ6SiqFIW63TJrIz6s5CNximEbQJjUryi0rpN6aVN/USjMAgi17hWHoZkiSTaycEJMy/xTSRLBxwXYJLIs0iM836DGnsZknoXcIxXJ8WLETnbeNOMeqvvTbKLbSJBxiXhhzustKhxME361GBWc/6l/a18uB89w2WumTjHFt7zo86CdFbxypVKsUBetR64Vu1vNTHLKsgqyDz0aMs36DVQ3aMc61qyaUmpfoGrSrx9WFA/Jy1YLJTYjulDWBKROqmVevGQ/p0dXiEEEN+fLsGrd7qygXWY+cr2FrpcA6Ahia3nNopnWYAjLnrUYOtZk3ccf72cZ20qKiY5E2Q1h9XL0P3LsHZ5tfpghDYKJ3kpzwBZrwvU2dzq9qMHV7f+WSAtIiti03QshMCdralTT+pwibPnOIvskxUeCQ04ttT69kzXHfOfxcQoIpdVwUtHaPkNsd3jL8G8LLKrte4nY1noGnnbmWz32V0PwCRUpiLi/XZZ8pu1QFmui1UdU5QKLS1m9jUTmArFBs9qNLCzFi5ozJ+qMkuhAOi3ssAaaxOoZCi/Ko9mZx+E014VN4n5CJhqi3MOa7S1a3HZltYSJXDLUk3TI5elB+/x9SGCANzl8cmbtj2jm2R0d2Gthj0cjU079U5DEBTvfpKLFulstDKN3jS3aO//2B+3lKkRVNREHVjLSwyOjdBEwrL7sTVFubNq2yCED2Z3F1l8bouqb3ybBW8lsryWwBonA9FnJiYMdyKWtyyPbSvI8s7BKBRPtbm1xZKVZPSelIuQrulr3yMeggB3Piys7y7K6llDC/X7sh24asOEVT2MSYn4ltuC6haDcuzXW2RH9fDFh2ZdX/ttZP8rBdyD/F5o/jL4eHuuBerrAHO/LZZnZWxy70AQTKNPTlkbhl1BEKk6P4aSUPmYBDJqJftjlYBBMnt7vDx/TiTwqH8r9JJFjeJeRwOrO/K5aNK8xICb+f3Dq4GA1m/9lZgd7kR3C3RLLMHXMaIUaLLlS3QkSpiW28alCVIZq5hGjd8KhlUJ12y3p756xIOKjvJj1YH8Ec8LMP4DOseIkztEifz8emybKQnumQgnNHu2SIkmW8zDg348Mb1Jv7isl3/p+k+6XFxaYIelRgYMVCl47OOVQDOLA/XovcOyH0DnzmNaqplXWQSXnTaJADphJ6nnuUfREdmwuKPBoQQWI/cZGsfUdk2YlMaj3+iBs0QAuJcfN5QNNuMEmEZhozMw58+7bHXljw/xEt/3gxg9ETZE/+pWzVaWWBeFByMT+epU3khjabVaFZTpKYTohu23fLjLwIjjCxDbSDzQfzA9qJoQfuaj3kCKmSayagX817tZmCkawZZT6qZns4TCdSP+aJUwX4AGavlHc082Z6yaj/VusJFoseBlaaP6B3YPnANKRvmxr1Q1kkz1A6dYkZLTWml9Gwg4Imej0eX9tUiqhHGej0E0zppOr2oc5BL2jF2W0h6Z319SWpgtGg8GvRjQ2ikJFau87mDTNN/vJ1+rw5Z3wEhTrIBu/0hAjXv6ZJpiB6ZYGiQqW/4nps0cR1exNW53MLu+034IxGtp4/szee35/Mb1ChXHyNjOLRKkybTSHyWNQifXoPz0zP7as0anuHxo0XR/JBKtD2UiU7KmdS/g0SSlqZW+/QIWd+wUfj1B+F7t48Y1DvwMf/5Y75AtKYZlxxYTpCBwIjtq7pI+BK1WhLN50cj8AUCRBYtSBX1HjENI0f99k85EXsbnKmZxhcgJgSBIDVVIFqydnslO0qIZYIuDlJjlcJHNhi0NiRkzdr1Ixrtn16Dq9f1HwD/bga5HGuOPh1pkv9NPw3FDXHyukKgRIhTH1Q9/uM//nl8BYlod8WjsBdLAAAAAElFTkSuQmCC",jn="data:image/svg+xml,%3csvg%20width='98'%20height='96'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M48.854%200C21.839%200%200%2022%200%2049.217c0%2021.756%2013.993%2040.172%2033.405%2046.69%202.427.49%203.316-1.059%203.316-2.362%200-1.141-.08-5.052-.08-9.127-13.59%202.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015%204.934.326%207.523%205.052%207.523%205.052%204.367%207.496%2011.404%205.378%2014.235%204.074.404-3.178%201.699-5.378%203.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283%200-5.378%201.94-9.778%205.014-13.2-.485-1.222-2.184-6.275.486-13.038%200%200%204.125-1.304%2013.426%205.052a46.97%2046.97%200%200%201%2012.214-1.63c4.125%200%208.33.571%2012.213%201.63%209.302-6.356%2013.427-5.052%2013.427-5.052%202.67%206.763.97%2011.816.485%2013.038%203.155%203.422%205.015%207.822%205.015%2013.2%200%2018.905-11.404%2023.06-22.324%2024.283%201.78%201.548%203.316%204.481%203.316%209.126%200%206.6-.08%2011.897-.08%2013.526%200%201.304.89%202.853%203.316%202.364%2019.412-6.52%2033.405-24.935%2033.405-46.691C97.707%2022%2075.788%200%2048.854%200z'%20fill='%2324292f'/%3e%3c/svg%3e",bn="/rmp/assets/opencollective-icon-Ciasch0w.webp",wn="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2023.0.1,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20270%20270'%20style='enable-background:new%200%200%20270%20270;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%23E01E5A;}%20.st1{fill:%2336C5F0;}%20.st2{fill:%232EB67D;}%20.st3{fill:%23ECB22E;}%20%3c/style%3e%3cg%3e%3cg%3e%3cpath%20class='st0'%20d='M99.4,151.2c0,7.1-5.8,12.9-12.9,12.9c-7.1,0-12.9-5.8-12.9-12.9c0-7.1,5.8-12.9,12.9-12.9h12.9V151.2z'/%3e%3cpath%20class='st0'%20d='M105.9,151.2c0-7.1,5.8-12.9,12.9-12.9s12.9,5.8,12.9,12.9v32.3c0,7.1-5.8,12.9-12.9,12.9%20s-12.9-5.8-12.9-12.9V151.2z'/%3e%3c/g%3e%3cg%3e%3cpath%20class='st1'%20d='M118.8,99.4c-7.1,0-12.9-5.8-12.9-12.9c0-7.1,5.8-12.9,12.9-12.9s12.9,5.8,12.9,12.9v12.9H118.8z'/%3e%3cpath%20class='st1'%20d='M118.8,105.9c7.1,0,12.9,5.8,12.9,12.9s-5.8,12.9-12.9,12.9H86.5c-7.1,0-12.9-5.8-12.9-12.9%20s5.8-12.9,12.9-12.9H118.8z'/%3e%3c/g%3e%3cg%3e%3cpath%20class='st2'%20d='M170.6,118.8c0-7.1,5.8-12.9,12.9-12.9c7.1,0,12.9,5.8,12.9,12.9s-5.8,12.9-12.9,12.9h-12.9V118.8z'/%3e%3cpath%20class='st2'%20d='M164.1,118.8c0,7.1-5.8,12.9-12.9,12.9c-7.1,0-12.9-5.8-12.9-12.9V86.5c0-7.1,5.8-12.9,12.9-12.9%20c7.1,0,12.9,5.8,12.9,12.9V118.8z'/%3e%3c/g%3e%3cg%3e%3cpath%20class='st3'%20d='M151.2,170.6c7.1,0,12.9,5.8,12.9,12.9c0,7.1-5.8,12.9-12.9,12.9c-7.1,0-12.9-5.8-12.9-12.9v-12.9H151.2z'/%3e%3cpath%20class='st3'%20d='M151.2,164.1c-7.1,0-12.9-5.8-12.9-12.9c0-7.1,5.8-12.9,12.9-12.9h32.3c7.1,0,12.9,5.8,12.9,12.9%20c0,7.1-5.8,12.9-12.9,12.9H151.2z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Sn=s=>{const{isOpen:a,onClose:i}=s,{t:n}=H(),o=R.getAppVersion();return e.jsxs(Y,{isOpen:a,onClose:i,size:"xl",scrollBehavior:"inside",children:[e.jsx(F,{}),e.jsxs(J,{children:[e.jsx(q,{children:n("header.about.title")}),e.jsx(X,{}),e.jsxs(Q,{paddingBottom:10,children:[e.jsxs(ks,{direction:"row",children:[e.jsx(it,{boxSize:"128px",src:"/rmp//logo192.png"}),e.jsxs(ks,{direction:"column",width:"100%",alignItems:"center",justifyContent:"center",children:[e.jsx(w,{fontSize:"xl",as:"b",children:n("header.about.rmp")}),e.jsx(w,{children:o}),e.jsx(w,{}),e.jsx(w,{fontSize:"sm",children:n("header.about.railmapgen")})]})]}),e.jsx(E,{margin:5,children:e.jsx(w,{fontSize:"xl",children:n("header.about.desc")})}),e.jsx(Ce,{as:"h5",size:"sm",mt:3,mb:2,children:n("header.about.contributors")}),e.jsx(Ce,{as:"h6",size:"xs",my:2,children:n("header.about.coreContributors")}),e.jsxs(Re,{children:[e.jsxs(ne,{size:"lg",w:"85%",onClick:()=>window.open("https://github.com/thekingofcity","_blank"),cursor:"pointer",children:[e.jsx(re,{src:"https://github.com/thekingofcity.png",size:"lg",my:2,ml:-1,mr:2}),e.jsxs(oe,{display:"block",width:"100%",children:[e.jsx(w,{fontSize:"lg",fontWeight:"bold",mb:1,children:"thekingofcity"}),e.jsx(w,{fontSize:"sm",children:n("header.about.content1")}),e.jsx(w,{fontSize:"sm",align:"right",mb:1,children:n("header.about.content2")})]})]}),e.jsxs(ne,{size:"lg",w:"85%",onClick:()=>window.open("https://github.com/langonginc","_blank"),cursor:"pointer",children:[e.jsx(re,{src:"https://github.com/langonginc.png",size:"lg",my:2,ml:-1,mr:2}),e.jsxs(oe,{display:"block",width:"100%",children:[e.jsx(w,{fontSize:"lg",fontWeight:"bold",mb:1,children:"langonginc"}),e.jsx(w,{fontSize:"sm",children:n("header.about.langonginc")}),e.jsx(w,{fontSize:"sm",align:"right",mb:1,children:"--Avicii"})]})]})]}),e.jsx(Ce,{as:"h6",size:"xs",my:2,children:n("header.about.styleContributors")}),e.jsxs(Re,{children:[e.jsxs(ne,{size:"lg",w:"85%",onClick:()=>window.open("https://github.com/203IhzElttil","_blank"),cursor:"pointer",children:[e.jsx(re,{src:"https://github.com/203IhzElttil.png",size:"lg",my:2,ml:-1,mr:2}),e.jsxs(oe,{display:"block",width:"100%",children:[e.jsx(w,{fontSize:"lg",fontWeight:"bold",mb:1,children:"203IhzElttil"}),e.jsx(w,{fontSize:"sm",mb:1,children:n("header.about.203IhzElttil")})]})]}),e.jsxs(ne,{size:"lg",w:"85%",onClick:()=>window.open("https://github.com/Swiftiecott","_blank"),cursor:"pointer",children:[e.jsx(re,{src:"https://github.com/Swiftiecott.png",size:"lg",my:2,ml:-1,mr:2}),e.jsxs(oe,{display:"block",width:"100%",children:[e.jsx(w,{fontSize:"lg",fontWeight:"bold",mb:1,children:"Swiftiecott"}),e.jsx(w,{fontSize:"sm",mb:1,children:n("header.about.Swiftiecott")})]})]}),e.jsxs(ne,{size:"lg",w:"85%",onClick:()=>window.open("https://github.com/Minwtraft","_blank"),cursor:"pointer",children:[e.jsx(re,{src:"https://github.com/Minwtraft.png",size:"lg",my:2,ml:-1,mr:2}),e.jsxs(oe,{display:"block",width:"100%",children:[e.jsx(w,{fontSize:"lg",fontWeight:"bold",mb:1,children:"Minwtraft"}),e.jsx(w,{fontSize:"sm",mb:1,children:n("header.about.Minwtraft")})]})]})]}),e.jsx(Ce,{as:"h5",size:"sm",mt:3,mb:2,children:n("header.about.contactUs")}),e.jsxs(Re,{children:[e.jsxs(ne,{size:"lg",w:"85%",onClick:()=>window.open("https://github.com/railmapgen/rmp/issues","_blank"),cursor:"pointer",children:[e.jsx(re,{src:jn,size:"lg",my:2,ml:-1,mr:2}),e.jsxs(oe,{display:"block",width:"100%",children:[e.jsx(w,{fontSize:"lg",fontWeight:"bold",mb:1,children:n("header.about.github")}),e.jsx(w,{fontSize:"sm",children:n("header.about.githubContent")})]})]}),e.jsxs(ne,{size:"lg",w:"85%",onClick:()=>window.open("https://join.slack.com/t/railmapgenerator/shared_invite/zt-1odhhta3n-DdZF~fnVwo_q0S0RJmgV8A","_blank"),cursor:"pointer",children:[e.jsx(re,{src:wn,size:"lg",my:2,ml:-1,mr:2}),e.jsxs(oe,{display:"block",width:"100%",children:[e.jsx(w,{fontSize:"lg",fontWeight:"bold",mb:1,children:n("header.about.slack")}),e.jsx(w,{fontSize:"sm",children:n("header.about.slackContent")}),e.jsx(w,{fontSize:"sm",as:"i",children:"#rmp, #gallery, #rmg, #palette-and-templates"})]})]})]}),e.jsx(Ce,{as:"h5",size:"sm",mt:3,mb:2,children:n("header.donation.title")}),e.jsxs(Re,{children:[e.jsxs(ne,{size:"lg",w:"85%",onClick:()=>window.open("https://afdian.com/a/rail-map-toolkit","_blank"),cursor:"pointer",children:[e.jsx(re,{src:fn,size:"lg",my:2,ml:-1,mr:2}),e.jsxs(oe,{display:"block",width:"100%",pb:1,children:[e.jsx(w,{fontSize:"lg",fontWeight:"bold",mb:1,children:n("header.donation.afdian")}),e.jsx(w,{fontSize:"sm",children:n("header.donation.viaCNY")})]})]}),e.jsxs(ne,{size:"lg",w:"85%",onClick:()=>window.open("https://opencollective.com/rail-map-toolkit","_blank"),cursor:"pointer",children:[e.jsx(re,{src:bn,size:"lg",my:2,ml:-1,mr:2}),e.jsxs(oe,{display:"block",width:"100%",pb:1,children:[e.jsx(w,{fontSize:"lg",fontWeight:"bold",mb:1,children:n("header.donation.openCollective")}),e.jsx(w,{fontSize:"sm",children:n("header.donation.viaUSD")})]})]})]})]})]})]})};/*! * canvas-size * v2.0.0 * https://github.com/jhildenbiddle/canvas-size diff --git a/assets/page-header-legacy-YLn36u35.js b/assets/page-header-legacy-C8DY0MtO.js similarity index 99% rename from assets/page-header-legacy-YLn36u35.js rename to assets/page-header-legacy-C8DY0MtO.js index ca67db7eb..baa7dbc2b 100644 --- a/assets/page-header-legacy-YLn36u35.js +++ b/assets/page-header-legacy-C8DY0MtO.js @@ -1,4 +1,4 @@ -System.register(["./chakra-legacy--ElhKRU8.js","./index-legacy-iSkJTZGA.js","./react-legacy-CB7hQk4J.js","./master-manager-legacy-BrdnNHXw.js","./change-type-modal-legacy-BWY8KDxU.js"],(function(e,s){"use strict";var t,n,r,i,a,o,l,c,d,h,u,x,p,g,m,j,f,b,w,y,v,z,S,C,k,O,M,E,_,A,H,N,R,W,T,P,I,L,B,Z,G,U,D,K,Y,V,F,J,q,X,Q,$,ee,se,te,ne,re,ie,ae,oe,le,ce,de,he,ue,xe,pe,ge,me,je,fe,be,we,ye,ve,ze,Se,Ce,ke,Oe,Me,Ee,_e,Ae,He,Ne,Re,We,Te,Pe,Ie,Le,Be,Ze,Ge,Ue,De,Ke,Ye,Ve,Fe,Je,qe,Xe,Qe,$e,es,ss,ts,ns,rs,is,as,os,ls,cs,ds,hs,us,xs,ps,gs,ms,js,fs,bs,ws,ys,vs,zs,Ss,Cs,ks,Os,Ms,Es,_s,As,Hs,Ns,Rs,Ws;return{setters:[e=>{t=e.j,n=e.at,r=e.$,i=e.au,a=e.a1,o=e.a2,l=e.a3,c=e.g,d=e.av,h=e.a4,u=e.B,x=e.aw,p=e.ax,g=e.ay,m=e.az,j=e.aA,f=e.h,b=e.O,w=e.a5,y=e.aB,v=e.aC,z=e.aD,S=e.a7,C=e.aE,k=e.a6,O=e.aF,M=e.aG,E=e.af,_=e.aH,A=e.aI,H=e.U,N=e.aJ,R=e.aK,W=e.aL,T=e.al,P=e.d,I=e.R,L=e.q,B=e.Z,Z=e.aM,G=e.aN,U=e.ak,D=e.aO,K=e.aP,Y=e.aQ,V=e.aR,F=e.aS,J=e.aT,q=e.aU,X=e.W,Q=e.m,$=e.a8,ee=e.a9},e=>{se=e.u,te=e.r,ne=e.C,re=e.M,ie=e.n,ae=e.L,oe=e.S,le=e.R,ce=e.a,de=e.b,he=e.c,ue=e.d,xe=e.e,pe=e.f,ge=e.g,me=e.h,je=e.i,fe=e.E,be=e.s,we=e.j,ye=e.k,ve=e.m,ze=e.l,Se=e.o,Ce=e.p,ke=e.q,Oe=e.t,Me=e.v,Ee=e.w,_e=e.x,Ae=e.y,He=e.z,Ne=e.A,Re=e.B,We=e.D,Te=e.F,Pe=e.G,Ie=e.H,Le=e.I,Be=e.J,Ze=e.K,Ge=e.N,Ue=e.O,De=e.P,Ke=e.Q,Ye=e.T,Ve=e.U,Fe=e.V,Je=e.W,qe=e.X,Xe=e.Y,Qe=e.Z,$e=e._,es=e.$,ss=e.a0,ts=e.a1,ns=e.a2,rs=e.a3,is=e.a4,as=e.a5,os=e.a6,ls=e.a7,cs=e.a8,ds=e.a9,hs=e.aa,us=e.ab,xs=e.ac,ps=e.ad,gs=e.ae,ms=e.af,js=e.ag,fs=e.ah,bs=e.ai,ws=e.aj,ys=e.ak,vs=e.al,zs=e.am},e=>{Ss=e.u,Cs=e.b,ks=e.r,Os=e.T},e=>{Ms=e.d,Es=e.m,_s=e.a,As=e.i,Hs=e.s,Ns=e.u,Rs=e.M},e=>{Ws=e.C}],execute:function(){e("default",(function(){return t.jsxs(t.Fragment,{children:[t.jsx($t,{}),t.jsx(en,{})]})}));var s=function(e){return se(te.ready(),e)},Ts={ar:{ar:"العربية",en:"Arabic",ko:"아랍어","zh-Hans":"阿拉伯文","zh-Hant":"阿拉伯文"},az:{az:"Azərbaycanca",en:"Azerbaijani",ko:"아제르바이잔어","zh-Hans":"阿塞拜疆文","zh-Hant":"阿塞拜疆文"},ca:{ca:"Català",en:"Catalan",ko:"카탈루냐어","zh-Hans":"加泰罗尼亚文","zh-Hant":"加泰隆尼亞文"},da:{da:"Dansk",en:"Danish",ko:"덴마크어","zh-Hans":"丹麦文","zh-Hant":"丹麥文"},de:{de:"Deutsch",en:"German",ko:"독일어","zh-Hans":"德文","zh-Hant":"德文"},el:{el:"Ελληνικά",en:"Greek",ko:"그리스어","zh-Hans":"希腊文","zh-Hant":"希臘文"},en:{en:"English",ja:"英語",ko:"영어","zh-Hans":"英文","zh-Hant":"英文"},es:{en:"Spanish",es:"Español",ko:"스페인어","zh-Hans":"西班牙文","zh-Hant":"西班牙文"},fa:{en:"Persian",fa:"فارسی",ko:"페르시아어","zh-Hans":"波斯文","zh-Hant":"波斯文"},fr:{en:"French",fr:"Français",ko:"프랑스어","zh-Hans":"法文","zh-Hant":"法文"},ga:{en:"Irish",ga:"Gaeilge",ko:"아일랜드어","zh-Hans":"爱尔兰文","zh-Hant":"愛爾蘭文"},gd:{en:"Scottish Gaelic",gd:"Gàidhlig",ko:"스코틀랜드 게일어","zh-Hans":"苏格兰盖尔文","zh-Hant":"蘇格蘭蓋爾文"},hi:{en:"Hindi",hi:"हिन्दी",ko:"힌디어","zh-Hans":"印地文","zh-Hant":"印地文"},hu:{en:"Hungarian",hu:"Magyar",ko:"헝가리어","zh-Hans":"匈牙利文","zh-Hant":"匈牙利文"},id:{en:"Indoesian",id:"Bahasa Indonesia",ko:"인도네시아어","zh-Hans":"印尼文","zh-Hant":"印尼文"},it:{en:"Italian",it:"Italiano",ko:"이탈리아어","zh-Hans":"意大利文","zh-Hant":"意大利文"},ja:{en:"Japanese",ja:"日本語",ko:"일본어","zh-Hans":"日文","zh-Hant":"日文"},kk:{en:"Kazakh",kk:"Қазақша",ko:"카자흐어","zh-Hans":"哈萨克文","zh-Hant":"哈薩克文"},ko:{en:"Korean",ja:"韓国語",ko:"한국어","zh-Hans":"韩文","zh-Hant":"韓文"},ms:{en:"Malay",ko:"말레이어",ms:"Bahasa Melayu","zh-Hans":"马来文","zh-Hant":"馬來文"},no:{en:"Norwegian",ko:"노르웨이어",no:"Norsk","zh-Hans":"挪威文","zh-Hant":"挪威文"},pl:{en:"Polish",ko:"폴란드어",pl:"Polski","zh-Hans":"波兰文","zh-Hant":"波蘭文"},pt:{en:"Portuguese",ko:"포르투갈어",pt:"Português","zh-Hans":"葡萄牙文","zh-Hant":"葡萄牙文"},ro:{en:"Romanian",ko:"루마니아어",ro:"Română","zh-Hans":"罗马尼亚文","zh-Hant":"羅馬尼亞文"},ru:{en:"Russian",ko:"러시아어",ru:"Русский","zh-Hans":"俄文","zh-Hant":"俄文"},sv:{en:"Swedish",ko:"스웨덴어",sv:"Svenska","zh-Hans":"瑞典文","zh-Hant":"瑞典文"},th:{en:"Thai",ko:"태국어",th:"ภาษาไทย","zh-Hans":"泰文","zh-Hant":"泰文"},tr:{en:"Turkish",ko:"튀르키예어",tr:"Türkçe","zh-Hans":"土耳其文","zh-Hant":"土耳其文"},uk:{en:"Ukrainian",ko:"우크라이나어",uk:"Українська","zh-Hans":"乌克兰文","zh-Hant":"烏克蘭文"},ur:{en:"Urdo",ko:"우르두어",ur:"اردو","zh-Hans":"乌尔都文","zh-Hant":"烏爾都文"},uz:{en:"Uzbek",ko:"우즈베크어",uz:"Oʻzbekcha","zh-Hans":"乌兹别克文","zh-Hant":"烏茲別克文"},vi:{en:"Vietnamese",ko:"베트남어",vi:"Tiếng Việt","zh-Hans":"越南文","zh-Hant":"越南文"},zh:{en:"Chinese",ja:"中国語",ko:"중국어",zh:"中文","zh-Hans":"中文","zh-Hant":"中文"},"zh-Hans":{en:"Simplified Chinese",ja:"中国語(簡体字)",ko:"중국어 간체자","zh-Hans":"简体中文","zh-Hant":"簡體中文"},"zh-Hant":{en:"Traditional Chinese",ja:"中国語(繁体字)",ko:"중국어 정체자","zh-Hans":"繁体中文","zh-Hant":"繁體中文"}};const Ps=e=>{const{isOpen:s,onClose:f}=e,{t:b}=Ss(),w=te.getAppVersion();return t.jsxs(n,{isOpen:s,onClose:f,size:"xl",scrollBehavior:"inside",children:[t.jsx(r,{}),t.jsxs(i,{children:[t.jsx(a,{children:b("header.about.title")}),t.jsx(o,{}),t.jsxs(l,{paddingBottom:10,children:[t.jsxs(c,{direction:"row",children:[t.jsx(d,{boxSize:"128px",src:"/rmp//logo192.png"}),t.jsxs(c,{direction:"column",width:"100%",alignItems:"center",justifyContent:"center",children:[t.jsx(h,{fontSize:"xl",as:"b",children:b("header.about.rmp")}),t.jsx(h,{children:w}),t.jsx(h,{}),t.jsx(h,{fontSize:"sm",children:b("header.about.railmapgen")})]})]}),t.jsx(u,{margin:5,children:t.jsx(h,{fontSize:"xl",children:b("header.about.desc")})}),t.jsx(x,{as:"h5",size:"sm",mt:3,mb:2,children:b("header.about.contributors")}),t.jsx(x,{as:"h6",size:"xs",my:2,children:b("header.about.coreContributors")}),t.jsxs(p,{children:[t.jsxs(g,{size:"lg",w:"85%",onClick:()=>window.open("https://github.com/thekingofcity","_blank"),cursor:"pointer",children:[t.jsx(m,{src:"https://github.com/thekingofcity.png",size:"lg",my:2,ml:-1,mr:2}),t.jsxs(j,{display:"block",width:"100%",children:[t.jsx(h,{fontSize:"lg",fontWeight:"bold",mb:1,children:"thekingofcity"}),t.jsx(h,{fontSize:"sm",children:b("header.about.content1")}),t.jsx(h,{fontSize:"sm",align:"right",mb:1,children:b("header.about.content2")})]})]}),t.jsxs(g,{size:"lg",w:"85%",onClick:()=>window.open("https://github.com/langonginc","_blank"),cursor:"pointer",children:[t.jsx(m,{src:"https://github.com/langonginc.png",size:"lg",my:2,ml:-1,mr:2}),t.jsxs(j,{display:"block",width:"100%",children:[t.jsx(h,{fontSize:"lg",fontWeight:"bold",mb:1,children:"langonginc"}),t.jsx(h,{fontSize:"sm",children:b("header.about.langonginc")}),t.jsx(h,{fontSize:"sm",align:"right",mb:1,children:"--Avicii"})]})]})]}),t.jsx(x,{as:"h6",size:"xs",my:2,children:b("header.about.styleContributors")}),t.jsxs(p,{children:[t.jsxs(g,{size:"lg",w:"85%",onClick:()=>window.open("https://github.com/203IhzElttil","_blank"),cursor:"pointer",children:[t.jsx(m,{src:"https://github.com/203IhzElttil.png",size:"lg",my:2,ml:-1,mr:2}),t.jsxs(j,{display:"block",width:"100%",children:[t.jsx(h,{fontSize:"lg",fontWeight:"bold",mb:1,children:"203IhzElttil"}),t.jsx(h,{fontSize:"sm",mb:1,children:b("header.about.203IhzElttil")})]})]}),t.jsxs(g,{size:"lg",w:"85%",onClick:()=>window.open("https://github.com/Swiftiecott","_blank"),cursor:"pointer",children:[t.jsx(m,{src:"https://github.com/Swiftiecott.png",size:"lg",my:2,ml:-1,mr:2}),t.jsxs(j,{display:"block",width:"100%",children:[t.jsx(h,{fontSize:"lg",fontWeight:"bold",mb:1,children:"Swiftiecott"}),t.jsx(h,{fontSize:"sm",mb:1,children:b("header.about.Swiftiecott")})]})]}),t.jsxs(g,{size:"lg",w:"85%",onClick:()=>window.open("https://github.com/Minwtraft","_blank"),cursor:"pointer",children:[t.jsx(m,{src:"https://github.com/Minwtraft.png",size:"lg",my:2,ml:-1,mr:2}),t.jsxs(j,{display:"block",width:"100%",children:[t.jsx(h,{fontSize:"lg",fontWeight:"bold",mb:1,children:"Minwtraft"}),t.jsx(h,{fontSize:"sm",mb:1,children:b("header.about.Minwtraft")})]})]})]}),t.jsx(x,{as:"h5",size:"sm",mt:3,mb:2,children:b("header.about.contactUs")}),t.jsxs(p,{children:[t.jsxs(g,{size:"lg",w:"85%",onClick:()=>window.open("https://github.com/railmapgen/rmp/issues","_blank"),cursor:"pointer",children:[t.jsx(m,{src:"data:image/svg+xml,%3csvg%20width='98'%20height='96'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M48.854%200C21.839%200%200%2022%200%2049.217c0%2021.756%2013.993%2040.172%2033.405%2046.69%202.427.49%203.316-1.059%203.316-2.362%200-1.141-.08-5.052-.08-9.127-13.59%202.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015%204.934.326%207.523%205.052%207.523%205.052%204.367%207.496%2011.404%205.378%2014.235%204.074.404-3.178%201.699-5.378%203.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283%200-5.378%201.94-9.778%205.014-13.2-.485-1.222-2.184-6.275.486-13.038%200%200%204.125-1.304%2013.426%205.052a46.97%2046.97%200%200%201%2012.214-1.63c4.125%200%208.33.571%2012.213%201.63%209.302-6.356%2013.427-5.052%2013.427-5.052%202.67%206.763.97%2011.816.485%2013.038%203.155%203.422%205.015%207.822%205.015%2013.2%200%2018.905-11.404%2023.06-22.324%2024.283%201.78%201.548%203.316%204.481%203.316%209.126%200%206.6-.08%2011.897-.08%2013.526%200%201.304.89%202.853%203.316%202.364%2019.412-6.52%2033.405-24.935%2033.405-46.691C97.707%2022%2075.788%200%2048.854%200z'%20fill='%2324292f'/%3e%3c/svg%3e",size:"lg",my:2,ml:-1,mr:2}),t.jsxs(j,{display:"block",width:"100%",children:[t.jsx(h,{fontSize:"lg",fontWeight:"bold",mb:1,children:b("header.about.github")}),t.jsx(h,{fontSize:"sm",children:b("header.about.githubContent")})]})]}),t.jsxs(g,{size:"lg",w:"85%",onClick:()=>window.open("https://join.slack.com/t/railmapgenerator/shared_invite/zt-1odhhta3n-DdZF~fnVwo_q0S0RJmgV8A","_blank"),cursor:"pointer",children:[t.jsx(m,{src:"data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2023.0.1,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20270%20270'%20style='enable-background:new%200%200%20270%20270;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%23E01E5A;}%20.st1{fill:%2336C5F0;}%20.st2{fill:%232EB67D;}%20.st3{fill:%23ECB22E;}%20%3c/style%3e%3cg%3e%3cg%3e%3cpath%20class='st0'%20d='M99.4,151.2c0,7.1-5.8,12.9-12.9,12.9c-7.1,0-12.9-5.8-12.9-12.9c0-7.1,5.8-12.9,12.9-12.9h12.9V151.2z'/%3e%3cpath%20class='st0'%20d='M105.9,151.2c0-7.1,5.8-12.9,12.9-12.9s12.9,5.8,12.9,12.9v32.3c0,7.1-5.8,12.9-12.9,12.9%20s-12.9-5.8-12.9-12.9V151.2z'/%3e%3c/g%3e%3cg%3e%3cpath%20class='st1'%20d='M118.8,99.4c-7.1,0-12.9-5.8-12.9-12.9c0-7.1,5.8-12.9,12.9-12.9s12.9,5.8,12.9,12.9v12.9H118.8z'/%3e%3cpath%20class='st1'%20d='M118.8,105.9c7.1,0,12.9,5.8,12.9,12.9s-5.8,12.9-12.9,12.9H86.5c-7.1,0-12.9-5.8-12.9-12.9%20s5.8-12.9,12.9-12.9H118.8z'/%3e%3c/g%3e%3cg%3e%3cpath%20class='st2'%20d='M170.6,118.8c0-7.1,5.8-12.9,12.9-12.9c7.1,0,12.9,5.8,12.9,12.9s-5.8,12.9-12.9,12.9h-12.9V118.8z'/%3e%3cpath%20class='st2'%20d='M164.1,118.8c0,7.1-5.8,12.9-12.9,12.9c-7.1,0-12.9-5.8-12.9-12.9V86.5c0-7.1,5.8-12.9,12.9-12.9%20c7.1,0,12.9,5.8,12.9,12.9V118.8z'/%3e%3c/g%3e%3cg%3e%3cpath%20class='st3'%20d='M151.2,170.6c7.1,0,12.9,5.8,12.9,12.9c0,7.1-5.8,12.9-12.9,12.9c-7.1,0-12.9-5.8-12.9-12.9v-12.9H151.2z'/%3e%3cpath%20class='st3'%20d='M151.2,164.1c-7.1,0-12.9-5.8-12.9-12.9c0-7.1,5.8-12.9,12.9-12.9h32.3c7.1,0,12.9,5.8,12.9,12.9%20c0,7.1-5.8,12.9-12.9,12.9H151.2z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",size:"lg",my:2,ml:-1,mr:2}),t.jsxs(j,{display:"block",width:"100%",children:[t.jsx(h,{fontSize:"lg",fontWeight:"bold",mb:1,children:b("header.about.slack")}),t.jsx(h,{fontSize:"sm",children:b("header.about.slackContent")}),t.jsx(h,{fontSize:"sm",as:"i",children:"#rmp, #gallery, #rmg, #palette-and-templates"})]})]})]}),t.jsx(x,{as:"h5",size:"sm",mt:3,mb:2,children:b("header.donation.title")}),t.jsxs(p,{children:[t.jsxs(g,{size:"lg",w:"85%",onClick:()=>window.open("https://afdian.com/a/rail-map-toolkit","_blank"),cursor:"pointer",children:[t.jsx(m,{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAMAAAC5zwKfAAAC9FBMVEUAAACabOutif+ve/+FbLiVcuaQaOCWb+WYceiLYtuccOingvOYcOeRad6ZcuifeumXcOWhfO6jfPCmhPOUa+aLYtyac+iVbuSMZN2VbeWNZt6RaeGRauKhee2acumQauClfvGTa+OOZd6JYNqWb+Sog/SSauGPaOCogvSNZN2NZN2ngfKogvSngPOfeu6bdemTauSlfvGYcOiohPSngfKQaOCXb+aifO+XcOaVbuWTbOOogfOlf/GmgPKTbOOYceaMZN2pg/WQaN+hee2OZt6RaeCRauGKYtuSa9+bdOmog/SifO+ddumie+6Zcuelf/GSa+Ked+uYcealf/GSauGJYdqpg/SQaOCJYduOZd6jffCJX9qNZN6mgfKMZN2SauKfeOyKYtuXcOWpg/SngfOdduuJYNqQaN+WbuWUbeWmgfOLY9yUbOWlf/GZceeKYNqOaN6mgvKpgvSZceiMZNyVb+WNZt2cdumSauOfee2Wb+WPaN+geu2ddeqMZNypg/Wheu6lf/GZcueJYNmQaN+jffCTbOSphPWog/SWb+WmgPKWb+aYcuekf/Gac+iKYtuVbuWWbuSogvSSa+KWb+SOZt6ifO+feeyngfKRaeGpg/SYcOefeOujfe+VbeSMZd6ac+iJYdqVbeSog/OVbOWcdeqKYtungvObdOmfd+uSa+KNZNyeduuRaeGjfe+XcOWMY9ybdOmngvSOZt6UbuWacuiSbOKgee2bdOmMY9yVbuOmgvSUbeKviP6xif+UaueVa+mMY92ZcOyqhPaOZOKuh/2shPybcu2mf/WhePKcdO6ddeyYb+qZceirhPmpgfmedfCacuuWbuWogfemffefdfKacuqSaOaPZeSRaOKyiv+qg/iogvShd/SYbuyWbeiQZuWNZN+MYt+thvqlffSie/CXbeqTaOeKYdu1jP+jevOccvCbce6Xbeuth/uqgvukevinf/eiePaVau2WbOqXb+ahdvuUaumfdPehee+thP6bb/MemaUsAAAAvXRSTlMAAwEEAwb+/Qv6Cfv8IRAOXiwaFP7++9p3TkwvJSEeGf7++/r59+ri0MmCeFZCPjk3NDEk9PHi4NLIwq2djHp1bmNZUVBIPzwU/v38+fj49/bz6+rl5N7a0s7Hw8LAvq+opqSjlZOSiIBuaGRjYmJaVU1HREQ1KykW+/X19O7r6OXf29vV0c3Mxry4taupnpqZlZGRi4uGgXxzbWtjWlJG8/Px7ezk3dfQwbq4tp2Zh3t6cVxaVtrXz7GdcGlhNM13AAAH1ElEQVRYw+1YVVgbQRDezd2RkODu7pS6u7u7u7u7u7u7u7slkCZESUKCuxQoLVD3vnSPSyW9S6ClD33o/xHOdv6b2f1nZhPwH//xz4EFcRwi/CU2RKY/hayK0+EYdWhr6eGN6CrKCEk6qzZNtwxY0Wtxr8EtK8qIob+Zo/v6i7Ozk8U54jeFMwFeoaUAcMIA/2RxrjhZ6O9v7n/szWjA+nMXkWWbAbni3Nzk3BXDhvUSmpsnZ08BsCJ8E/yTC8XCXqPbzHbpa24u/ODoUpE5hGBKbm6h44ApELj1TRLnvMm50IYUDoQ4UiWGQJBAB/IfXuaLcDB3RXLhsdFbwtyHfXjiKDa/51aWIKBJmRJgilBYOLXpmyfm2ULznNCWsHTRWZDgWLX1tvRwr9p6ZquWU5sjtDwyy9LqW0axjEd8NTm7Lwj7UohWw9Hx9OCBoQMHDx44MLRfv5V9goMX11qwwM8MISUlxcysVtDK8zsmuhOkHW40ZJds8WkOMUyY9CQ7R5jyITIp6UmkHlFRUW8RCkpKSjIzM2MyMwsKYmKyuq4e05owSokBN0ehGC3rkS39FvulILIoPSIjfZFXfgtq1QoK6hkcHNwzqFZX35ji4pismGLf+g/bIlsWY8jc0CeO5jfQKWf2zOZNXcLG7Nq1a0xY2NV9TSfcmOp2pHVV99keHpZeXmg+W0/dt61+z6yiGJ1U6tyEg6wZXWyVkyMUhnHLm6aWh7c5a6U6raLuYdKaBpRjTZPEwshQUi5IbKVxsCgZYjRQLrW9uU4n1SlU962QYBlTxS/KL8nsghundBIIAofMFQ6SiqFIW63TJrIz6s5CNximEbQJjUryi0rpN6aVN/USjMAgi17hWHoZkiSTaycEJMy/xTSRLBxwXYJLIs0iM836DGnsZknoXcIxXJ8WLETnbeNOMeqvvTbKLbSJBxiXhhzustKhxME361GBWc/6l/a18uB89w2WumTjHFt7zo86CdFbxypVKsUBetR64Vu1vNTHLKsgqyDz0aMs36DVQ3aMc61qyaUmpfoGrSrx9WFA/Jy1YLJTYjulDWBKROqmVevGQ/p0dXiEEEN+fLsGrd7qygXWY+cr2FrpcA6Ahia3nNopnWYAjLnrUYOtZk3ccf72cZ20qKiY5E2Q1h9XL0P3LsHZ5tfpghDYKJ3kpzwBZrwvU2dzq9qMHV7f+WSAtIiti03QshMCdralTT+pwibPnOIvskxUeCQ04ttT69kzXHfOfxcQoIpdVwUtHaPkNsd3jL8G8LLKrte4nY1noGnnbmWz32V0PwCRUpiLi/XZZ8pu1QFmui1UdU5QKLS1m9jUTmArFBs9qNLCzFi5ozJ+qMkuhAOi3ssAaaxOoZCi/Ko9mZx+E014VN4n5CJhqi3MOa7S1a3HZltYSJXDLUk3TI5elB+/x9SGCANzl8cmbtj2jm2R0d2Gthj0cjU079U5DEBTvfpKLFulstDKN3jS3aO//2B+3lKkRVNREHVjLSwyOjdBEwrL7sTVFubNq2yCED2Z3F1l8bouqb3ybBW8lsryWwBonA9FnJiYMdyKWtyyPbSvI8s7BKBRPtbm1xZKVZPSelIuQrulr3yMeggB3Piys7y7K6llDC/X7sh24asOEVT2MSYn4ltuC6haDcuzXW2RH9fDFh2ZdX/ttZP8rBdyD/F5o/jL4eHuuBerrAHO/LZZnZWxy70AQTKNPTlkbhl1BEKk6P4aSUPmYBDJqJftjlYBBMnt7vDx/TiTwqH8r9JJFjeJeRwOrO/K5aNK8xICb+f3Dq4GA1m/9lZgd7kR3C3RLLMHXMaIUaLLlS3QkSpiW28alCVIZq5hGjd8KhlUJ12y3p756xIOKjvJj1YH8Ec8LMP4DOseIkztEifz8emybKQnumQgnNHu2SIkmW8zDg348Mb1Jv7isl3/p+k+6XFxaYIelRgYMVCl47OOVQDOLA/XovcOyH0DnzmNaqplXWQSXnTaJADphJ6nnuUfREdmwuKPBoQQWI/cZGsfUdk2YlMaj3+iBs0QAuJcfN5QNNuMEmEZhozMw58+7bHXljw/xEt/3gxg9ETZE/+pWzVaWWBeFByMT+epU3khjabVaFZTpKYTohu23fLjLwIjjCxDbSDzQfzA9qJoQfuaj3kCKmSayagX817tZmCkawZZT6qZns4TCdSP+aJUwX4AGavlHc082Z6yaj/VusJFoseBlaaP6B3YPnANKRvmxr1Q1kkz1A6dYkZLTWml9Gwg4Imej0eX9tUiqhHGej0E0zppOr2oc5BL2jF2W0h6Z319SWpgtGg8GvRjQ2ikJFau87mDTNN/vJ1+rw5Z3wEhTrIBu/0hAjXv6ZJpiB6ZYGiQqW/4nps0cR1exNW53MLu+034IxGtp4/szee35/Mb1ChXHyNjOLRKkybTSHyWNQifXoPz0zP7as0anuHxo0XR/JBKtD2UiU7KmdS/g0SSlqZW+/QIWd+wUfj1B+F7t48Y1DvwMf/5Y75AtKYZlxxYTpCBwIjtq7pI+BK1WhLN50cj8AUCRBYtSBX1HjENI0f99k85EXsbnKmZxhcgJgSBIDVVIFqydnslO0qIZYIuDlJjlcJHNhi0NiRkzdr1Ixrtn16Dq9f1HwD/bga5HGuOPh1pkv9NPw3FDXHyukKgRIhTH1Q9/uM//nl8BYlod8WjsBdLAAAAAElFTkSuQmCC",size:"lg",my:2,ml:-1,mr:2}),t.jsxs(j,{display:"block",width:"100%",pb:1,children:[t.jsx(h,{fontSize:"lg",fontWeight:"bold",mb:1,children:b("header.donation.afdian")}),t.jsx(h,{fontSize:"sm",children:b("header.donation.viaCNY")})]})]}),t.jsxs(g,{size:"lg",w:"85%",onClick:()=>window.open("https://opencollective.com/rail-map-toolkit","_blank"),cursor:"pointer",children:[t.jsx(m,{src:"/rmp/assets/opencollective-icon-Ciasch0w.webp",size:"lg",my:2,ml:-1,mr:2}),t.jsxs(j,{display:"block",width:"100%",pb:1,children:[t.jsx(h,{fontSize:"lg",fontWeight:"bold",mb:1,children:b("header.donation.openCollective")}),t.jsx(h,{fontSize:"sm",children:b("header.donation.viaUSD")})]})]})]})]})]})]})}; +System.register(["./chakra-legacy--ElhKRU8.js","./index-legacy-jqOeRlnz.js","./react-legacy-CB7hQk4J.js","./master-manager-legacy-CCeMINwh.js","./change-type-modal-legacy-BfNFaO9v.js"],(function(e,s){"use strict";var t,n,r,i,a,o,l,c,d,h,u,x,p,g,m,j,f,b,w,y,v,z,S,C,k,O,M,E,_,A,H,N,R,W,T,P,I,L,B,Z,G,U,D,K,Y,V,F,J,q,X,Q,$,ee,se,te,ne,re,ie,ae,oe,le,ce,de,he,ue,xe,pe,ge,me,je,fe,be,we,ye,ve,ze,Se,Ce,ke,Oe,Me,Ee,_e,Ae,He,Ne,Re,We,Te,Pe,Ie,Le,Be,Ze,Ge,Ue,De,Ke,Ye,Ve,Fe,Je,qe,Xe,Qe,$e,es,ss,ts,ns,rs,is,as,os,ls,cs,ds,hs,us,xs,ps,gs,ms,js,fs,bs,ws,ys,vs,zs,Ss,Cs,ks,Os,Ms,Es,_s,As,Hs,Ns,Rs,Ws;return{setters:[e=>{t=e.j,n=e.at,r=e.$,i=e.au,a=e.a1,o=e.a2,l=e.a3,c=e.g,d=e.av,h=e.a4,u=e.B,x=e.aw,p=e.ax,g=e.ay,m=e.az,j=e.aA,f=e.h,b=e.O,w=e.a5,y=e.aB,v=e.aC,z=e.aD,S=e.a7,C=e.aE,k=e.a6,O=e.aF,M=e.aG,E=e.af,_=e.aH,A=e.aI,H=e.U,N=e.aJ,R=e.aK,W=e.aL,T=e.al,P=e.d,I=e.R,L=e.q,B=e.Z,Z=e.aM,G=e.aN,U=e.ak,D=e.aO,K=e.aP,Y=e.aQ,V=e.aR,F=e.aS,J=e.aT,q=e.aU,X=e.W,Q=e.m,$=e.a8,ee=e.a9},e=>{se=e.u,te=e.r,ne=e.C,re=e.M,ie=e.n,ae=e.L,oe=e.S,le=e.R,ce=e.a,de=e.b,he=e.c,ue=e.d,xe=e.e,pe=e.f,ge=e.g,me=e.h,je=e.i,fe=e.E,be=e.s,we=e.j,ye=e.k,ve=e.m,ze=e.l,Se=e.o,Ce=e.p,ke=e.q,Oe=e.t,Me=e.v,Ee=e.w,_e=e.x,Ae=e.y,He=e.z,Ne=e.A,Re=e.B,We=e.D,Te=e.F,Pe=e.G,Ie=e.H,Le=e.I,Be=e.J,Ze=e.K,Ge=e.N,Ue=e.O,De=e.P,Ke=e.Q,Ye=e.T,Ve=e.U,Fe=e.V,Je=e.W,qe=e.X,Xe=e.Y,Qe=e.Z,$e=e._,es=e.$,ss=e.a0,ts=e.a1,ns=e.a2,rs=e.a3,is=e.a4,as=e.a5,os=e.a6,ls=e.a7,cs=e.a8,ds=e.a9,hs=e.aa,us=e.ab,xs=e.ac,ps=e.ad,gs=e.ae,ms=e.af,js=e.ag,fs=e.ah,bs=e.ai,ws=e.aj,ys=e.ak,vs=e.al,zs=e.am},e=>{Ss=e.u,Cs=e.b,ks=e.r,Os=e.T},e=>{Ms=e.d,Es=e.m,_s=e.a,As=e.i,Hs=e.s,Ns=e.u,Rs=e.M},e=>{Ws=e.C}],execute:function(){e("default",(function(){return t.jsxs(t.Fragment,{children:[t.jsx($t,{}),t.jsx(en,{})]})}));var s=function(e){return se(te.ready(),e)},Ts={ar:{ar:"العربية",en:"Arabic",ko:"아랍어","zh-Hans":"阿拉伯文","zh-Hant":"阿拉伯文"},az:{az:"Azərbaycanca",en:"Azerbaijani",ko:"아제르바이잔어","zh-Hans":"阿塞拜疆文","zh-Hant":"阿塞拜疆文"},ca:{ca:"Català",en:"Catalan",ko:"카탈루냐어","zh-Hans":"加泰罗尼亚文","zh-Hant":"加泰隆尼亞文"},da:{da:"Dansk",en:"Danish",ko:"덴마크어","zh-Hans":"丹麦文","zh-Hant":"丹麥文"},de:{de:"Deutsch",en:"German",ko:"독일어","zh-Hans":"德文","zh-Hant":"德文"},el:{el:"Ελληνικά",en:"Greek",ko:"그리스어","zh-Hans":"希腊文","zh-Hant":"希臘文"},en:{en:"English",ja:"英語",ko:"영어","zh-Hans":"英文","zh-Hant":"英文"},es:{en:"Spanish",es:"Español",ko:"스페인어","zh-Hans":"西班牙文","zh-Hant":"西班牙文"},fa:{en:"Persian",fa:"فارسی",ko:"페르시아어","zh-Hans":"波斯文","zh-Hant":"波斯文"},fr:{en:"French",fr:"Français",ko:"프랑스어","zh-Hans":"法文","zh-Hant":"法文"},ga:{en:"Irish",ga:"Gaeilge",ko:"아일랜드어","zh-Hans":"爱尔兰文","zh-Hant":"愛爾蘭文"},gd:{en:"Scottish Gaelic",gd:"Gàidhlig",ko:"스코틀랜드 게일어","zh-Hans":"苏格兰盖尔文","zh-Hant":"蘇格蘭蓋爾文"},hi:{en:"Hindi",hi:"हिन्दी",ko:"힌디어","zh-Hans":"印地文","zh-Hant":"印地文"},hu:{en:"Hungarian",hu:"Magyar",ko:"헝가리어","zh-Hans":"匈牙利文","zh-Hant":"匈牙利文"},id:{en:"Indoesian",id:"Bahasa Indonesia",ko:"인도네시아어","zh-Hans":"印尼文","zh-Hant":"印尼文"},it:{en:"Italian",it:"Italiano",ko:"이탈리아어","zh-Hans":"意大利文","zh-Hant":"意大利文"},ja:{en:"Japanese",ja:"日本語",ko:"일본어","zh-Hans":"日文","zh-Hant":"日文"},kk:{en:"Kazakh",kk:"Қазақша",ko:"카자흐어","zh-Hans":"哈萨克文","zh-Hant":"哈薩克文"},ko:{en:"Korean",ja:"韓国語",ko:"한국어","zh-Hans":"韩文","zh-Hant":"韓文"},ms:{en:"Malay",ko:"말레이어",ms:"Bahasa Melayu","zh-Hans":"马来文","zh-Hant":"馬來文"},no:{en:"Norwegian",ko:"노르웨이어",no:"Norsk","zh-Hans":"挪威文","zh-Hant":"挪威文"},pl:{en:"Polish",ko:"폴란드어",pl:"Polski","zh-Hans":"波兰文","zh-Hant":"波蘭文"},pt:{en:"Portuguese",ko:"포르투갈어",pt:"Português","zh-Hans":"葡萄牙文","zh-Hant":"葡萄牙文"},ro:{en:"Romanian",ko:"루마니아어",ro:"Română","zh-Hans":"罗马尼亚文","zh-Hant":"羅馬尼亞文"},ru:{en:"Russian",ko:"러시아어",ru:"Русский","zh-Hans":"俄文","zh-Hant":"俄文"},sv:{en:"Swedish",ko:"스웨덴어",sv:"Svenska","zh-Hans":"瑞典文","zh-Hant":"瑞典文"},th:{en:"Thai",ko:"태국어",th:"ภาษาไทย","zh-Hans":"泰文","zh-Hant":"泰文"},tr:{en:"Turkish",ko:"튀르키예어",tr:"Türkçe","zh-Hans":"土耳其文","zh-Hant":"土耳其文"},uk:{en:"Ukrainian",ko:"우크라이나어",uk:"Українська","zh-Hans":"乌克兰文","zh-Hant":"烏克蘭文"},ur:{en:"Urdo",ko:"우르두어",ur:"اردو","zh-Hans":"乌尔都文","zh-Hant":"烏爾都文"},uz:{en:"Uzbek",ko:"우즈베크어",uz:"Oʻzbekcha","zh-Hans":"乌兹别克文","zh-Hant":"烏茲別克文"},vi:{en:"Vietnamese",ko:"베트남어",vi:"Tiếng Việt","zh-Hans":"越南文","zh-Hant":"越南文"},zh:{en:"Chinese",ja:"中国語",ko:"중국어",zh:"中文","zh-Hans":"中文","zh-Hant":"中文"},"zh-Hans":{en:"Simplified Chinese",ja:"中国語(簡体字)",ko:"중국어 간체자","zh-Hans":"简体中文","zh-Hant":"簡體中文"},"zh-Hant":{en:"Traditional Chinese",ja:"中国語(繁体字)",ko:"중국어 정체자","zh-Hans":"繁体中文","zh-Hant":"繁體中文"}};const Ps=e=>{const{isOpen:s,onClose:f}=e,{t:b}=Ss(),w=te.getAppVersion();return t.jsxs(n,{isOpen:s,onClose:f,size:"xl",scrollBehavior:"inside",children:[t.jsx(r,{}),t.jsxs(i,{children:[t.jsx(a,{children:b("header.about.title")}),t.jsx(o,{}),t.jsxs(l,{paddingBottom:10,children:[t.jsxs(c,{direction:"row",children:[t.jsx(d,{boxSize:"128px",src:"/rmp//logo192.png"}),t.jsxs(c,{direction:"column",width:"100%",alignItems:"center",justifyContent:"center",children:[t.jsx(h,{fontSize:"xl",as:"b",children:b("header.about.rmp")}),t.jsx(h,{children:w}),t.jsx(h,{}),t.jsx(h,{fontSize:"sm",children:b("header.about.railmapgen")})]})]}),t.jsx(u,{margin:5,children:t.jsx(h,{fontSize:"xl",children:b("header.about.desc")})}),t.jsx(x,{as:"h5",size:"sm",mt:3,mb:2,children:b("header.about.contributors")}),t.jsx(x,{as:"h6",size:"xs",my:2,children:b("header.about.coreContributors")}),t.jsxs(p,{children:[t.jsxs(g,{size:"lg",w:"85%",onClick:()=>window.open("https://github.com/thekingofcity","_blank"),cursor:"pointer",children:[t.jsx(m,{src:"https://github.com/thekingofcity.png",size:"lg",my:2,ml:-1,mr:2}),t.jsxs(j,{display:"block",width:"100%",children:[t.jsx(h,{fontSize:"lg",fontWeight:"bold",mb:1,children:"thekingofcity"}),t.jsx(h,{fontSize:"sm",children:b("header.about.content1")}),t.jsx(h,{fontSize:"sm",align:"right",mb:1,children:b("header.about.content2")})]})]}),t.jsxs(g,{size:"lg",w:"85%",onClick:()=>window.open("https://github.com/langonginc","_blank"),cursor:"pointer",children:[t.jsx(m,{src:"https://github.com/langonginc.png",size:"lg",my:2,ml:-1,mr:2}),t.jsxs(j,{display:"block",width:"100%",children:[t.jsx(h,{fontSize:"lg",fontWeight:"bold",mb:1,children:"langonginc"}),t.jsx(h,{fontSize:"sm",children:b("header.about.langonginc")}),t.jsx(h,{fontSize:"sm",align:"right",mb:1,children:"--Avicii"})]})]})]}),t.jsx(x,{as:"h6",size:"xs",my:2,children:b("header.about.styleContributors")}),t.jsxs(p,{children:[t.jsxs(g,{size:"lg",w:"85%",onClick:()=>window.open("https://github.com/203IhzElttil","_blank"),cursor:"pointer",children:[t.jsx(m,{src:"https://github.com/203IhzElttil.png",size:"lg",my:2,ml:-1,mr:2}),t.jsxs(j,{display:"block",width:"100%",children:[t.jsx(h,{fontSize:"lg",fontWeight:"bold",mb:1,children:"203IhzElttil"}),t.jsx(h,{fontSize:"sm",mb:1,children:b("header.about.203IhzElttil")})]})]}),t.jsxs(g,{size:"lg",w:"85%",onClick:()=>window.open("https://github.com/Swiftiecott","_blank"),cursor:"pointer",children:[t.jsx(m,{src:"https://github.com/Swiftiecott.png",size:"lg",my:2,ml:-1,mr:2}),t.jsxs(j,{display:"block",width:"100%",children:[t.jsx(h,{fontSize:"lg",fontWeight:"bold",mb:1,children:"Swiftiecott"}),t.jsx(h,{fontSize:"sm",mb:1,children:b("header.about.Swiftiecott")})]})]}),t.jsxs(g,{size:"lg",w:"85%",onClick:()=>window.open("https://github.com/Minwtraft","_blank"),cursor:"pointer",children:[t.jsx(m,{src:"https://github.com/Minwtraft.png",size:"lg",my:2,ml:-1,mr:2}),t.jsxs(j,{display:"block",width:"100%",children:[t.jsx(h,{fontSize:"lg",fontWeight:"bold",mb:1,children:"Minwtraft"}),t.jsx(h,{fontSize:"sm",mb:1,children:b("header.about.Minwtraft")})]})]})]}),t.jsx(x,{as:"h5",size:"sm",mt:3,mb:2,children:b("header.about.contactUs")}),t.jsxs(p,{children:[t.jsxs(g,{size:"lg",w:"85%",onClick:()=>window.open("https://github.com/railmapgen/rmp/issues","_blank"),cursor:"pointer",children:[t.jsx(m,{src:"data:image/svg+xml,%3csvg%20width='98'%20height='96'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M48.854%200C21.839%200%200%2022%200%2049.217c0%2021.756%2013.993%2040.172%2033.405%2046.69%202.427.49%203.316-1.059%203.316-2.362%200-1.141-.08-5.052-.08-9.127-13.59%202.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015%204.934.326%207.523%205.052%207.523%205.052%204.367%207.496%2011.404%205.378%2014.235%204.074.404-3.178%201.699-5.378%203.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283%200-5.378%201.94-9.778%205.014-13.2-.485-1.222-2.184-6.275.486-13.038%200%200%204.125-1.304%2013.426%205.052a46.97%2046.97%200%200%201%2012.214-1.63c4.125%200%208.33.571%2012.213%201.63%209.302-6.356%2013.427-5.052%2013.427-5.052%202.67%206.763.97%2011.816.485%2013.038%203.155%203.422%205.015%207.822%205.015%2013.2%200%2018.905-11.404%2023.06-22.324%2024.283%201.78%201.548%203.316%204.481%203.316%209.126%200%206.6-.08%2011.897-.08%2013.526%200%201.304.89%202.853%203.316%202.364%2019.412-6.52%2033.405-24.935%2033.405-46.691C97.707%2022%2075.788%200%2048.854%200z'%20fill='%2324292f'/%3e%3c/svg%3e",size:"lg",my:2,ml:-1,mr:2}),t.jsxs(j,{display:"block",width:"100%",children:[t.jsx(h,{fontSize:"lg",fontWeight:"bold",mb:1,children:b("header.about.github")}),t.jsx(h,{fontSize:"sm",children:b("header.about.githubContent")})]})]}),t.jsxs(g,{size:"lg",w:"85%",onClick:()=>window.open("https://join.slack.com/t/railmapgenerator/shared_invite/zt-1odhhta3n-DdZF~fnVwo_q0S0RJmgV8A","_blank"),cursor:"pointer",children:[t.jsx(m,{src:"data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2023.0.1,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20270%20270'%20style='enable-background:new%200%200%20270%20270;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%23E01E5A;}%20.st1{fill:%2336C5F0;}%20.st2{fill:%232EB67D;}%20.st3{fill:%23ECB22E;}%20%3c/style%3e%3cg%3e%3cg%3e%3cpath%20class='st0'%20d='M99.4,151.2c0,7.1-5.8,12.9-12.9,12.9c-7.1,0-12.9-5.8-12.9-12.9c0-7.1,5.8-12.9,12.9-12.9h12.9V151.2z'/%3e%3cpath%20class='st0'%20d='M105.9,151.2c0-7.1,5.8-12.9,12.9-12.9s12.9,5.8,12.9,12.9v32.3c0,7.1-5.8,12.9-12.9,12.9%20s-12.9-5.8-12.9-12.9V151.2z'/%3e%3c/g%3e%3cg%3e%3cpath%20class='st1'%20d='M118.8,99.4c-7.1,0-12.9-5.8-12.9-12.9c0-7.1,5.8-12.9,12.9-12.9s12.9,5.8,12.9,12.9v12.9H118.8z'/%3e%3cpath%20class='st1'%20d='M118.8,105.9c7.1,0,12.9,5.8,12.9,12.9s-5.8,12.9-12.9,12.9H86.5c-7.1,0-12.9-5.8-12.9-12.9%20s5.8-12.9,12.9-12.9H118.8z'/%3e%3c/g%3e%3cg%3e%3cpath%20class='st2'%20d='M170.6,118.8c0-7.1,5.8-12.9,12.9-12.9c7.1,0,12.9,5.8,12.9,12.9s-5.8,12.9-12.9,12.9h-12.9V118.8z'/%3e%3cpath%20class='st2'%20d='M164.1,118.8c0,7.1-5.8,12.9-12.9,12.9c-7.1,0-12.9-5.8-12.9-12.9V86.5c0-7.1,5.8-12.9,12.9-12.9%20c7.1,0,12.9,5.8,12.9,12.9V118.8z'/%3e%3c/g%3e%3cg%3e%3cpath%20class='st3'%20d='M151.2,170.6c7.1,0,12.9,5.8,12.9,12.9c0,7.1-5.8,12.9-12.9,12.9c-7.1,0-12.9-5.8-12.9-12.9v-12.9H151.2z'/%3e%3cpath%20class='st3'%20d='M151.2,164.1c-7.1,0-12.9-5.8-12.9-12.9c0-7.1,5.8-12.9,12.9-12.9h32.3c7.1,0,12.9,5.8,12.9,12.9%20c0,7.1-5.8,12.9-12.9,12.9H151.2z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",size:"lg",my:2,ml:-1,mr:2}),t.jsxs(j,{display:"block",width:"100%",children:[t.jsx(h,{fontSize:"lg",fontWeight:"bold",mb:1,children:b("header.about.slack")}),t.jsx(h,{fontSize:"sm",children:b("header.about.slackContent")}),t.jsx(h,{fontSize:"sm",as:"i",children:"#rmp, #gallery, #rmg, #palette-and-templates"})]})]})]}),t.jsx(x,{as:"h5",size:"sm",mt:3,mb:2,children:b("header.donation.title")}),t.jsxs(p,{children:[t.jsxs(g,{size:"lg",w:"85%",onClick:()=>window.open("https://afdian.com/a/rail-map-toolkit","_blank"),cursor:"pointer",children:[t.jsx(m,{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAMAAAC5zwKfAAAC9FBMVEUAAACabOutif+ve/+FbLiVcuaQaOCWb+WYceiLYtuccOingvOYcOeRad6ZcuifeumXcOWhfO6jfPCmhPOUa+aLYtyac+iVbuSMZN2VbeWNZt6RaeGRauKhee2acumQauClfvGTa+OOZd6JYNqWb+Sog/SSauGPaOCogvSNZN2NZN2ngfKogvSngPOfeu6bdemTauSlfvGYcOiohPSngfKQaOCXb+aifO+XcOaVbuWTbOOogfOlf/GmgPKTbOOYceaMZN2pg/WQaN+hee2OZt6RaeCRauGKYtuSa9+bdOmog/SifO+ddumie+6Zcuelf/GSa+Ked+uYcealf/GSauGJYdqpg/SQaOCJYduOZd6jffCJX9qNZN6mgfKMZN2SauKfeOyKYtuXcOWpg/SngfOdduuJYNqQaN+WbuWUbeWmgfOLY9yUbOWlf/GZceeKYNqOaN6mgvKpgvSZceiMZNyVb+WNZt2cdumSauOfee2Wb+WPaN+geu2ddeqMZNypg/Wheu6lf/GZcueJYNmQaN+jffCTbOSphPWog/SWb+WmgPKWb+aYcuekf/Gac+iKYtuVbuWWbuSogvSSa+KWb+SOZt6ifO+feeyngfKRaeGpg/SYcOefeOujfe+VbeSMZd6ac+iJYdqVbeSog/OVbOWcdeqKYtungvObdOmfd+uSa+KNZNyeduuRaeGjfe+XcOWMY9ybdOmngvSOZt6UbuWacuiSbOKgee2bdOmMY9yVbuOmgvSUbeKviP6xif+UaueVa+mMY92ZcOyqhPaOZOKuh/2shPybcu2mf/WhePKcdO6ddeyYb+qZceirhPmpgfmedfCacuuWbuWogfemffefdfKacuqSaOaPZeSRaOKyiv+qg/iogvShd/SYbuyWbeiQZuWNZN+MYt+thvqlffSie/CXbeqTaOeKYdu1jP+jevOccvCbce6Xbeuth/uqgvukevinf/eiePaVau2WbOqXb+ahdvuUaumfdPehee+thP6bb/MemaUsAAAAvXRSTlMAAwEEAwb+/Qv6Cfv8IRAOXiwaFP7++9p3TkwvJSEeGf7++/r59+ri0MmCeFZCPjk3NDEk9PHi4NLIwq2djHp1bmNZUVBIPzwU/v38+fj49/bz6+rl5N7a0s7Hw8LAvq+opqSjlZOSiIBuaGRjYmJaVU1HREQ1KykW+/X19O7r6OXf29vV0c3Mxry4taupnpqZlZGRi4uGgXxzbWtjWlJG8/Px7ezk3dfQwbq4tp2Zh3t6cVxaVtrXz7GdcGlhNM13AAAH1ElEQVRYw+1YVVgbQRDezd2RkODu7pS6u7u7u7u7u7u7u7slkCZESUKCuxQoLVD3vnSPSyW9S6ClD33o/xHOdv6b2f1nZhPwH//xz4EFcRwi/CU2RKY/hayK0+EYdWhr6eGN6CrKCEk6qzZNtwxY0Wtxr8EtK8qIob+Zo/v6i7Ozk8U54jeFMwFeoaUAcMIA/2RxrjhZ6O9v7n/szWjA+nMXkWWbAbni3Nzk3BXDhvUSmpsnZ08BsCJ8E/yTC8XCXqPbzHbpa24u/ODoUpE5hGBKbm6h44ApELj1TRLnvMm50IYUDoQ4UiWGQJBAB/IfXuaLcDB3RXLhsdFbwtyHfXjiKDa/51aWIKBJmRJgilBYOLXpmyfm2ULznNCWsHTRWZDgWLX1tvRwr9p6ZquWU5sjtDwyy9LqW0axjEd8NTm7Lwj7UohWw9Hx9OCBoQMHDx44MLRfv5V9goMX11qwwM8MISUlxcysVtDK8zsmuhOkHW40ZJds8WkOMUyY9CQ7R5jyITIp6UmkHlFRUW8RCkpKSjIzM2MyMwsKYmKyuq4e05owSokBN0ehGC3rkS39FvulILIoPSIjfZFXfgtq1QoK6hkcHNwzqFZX35ji4pismGLf+g/bIlsWY8jc0CeO5jfQKWf2zOZNXcLG7Nq1a0xY2NV9TSfcmOp2pHVV99keHpZeXmg+W0/dt61+z6yiGJ1U6tyEg6wZXWyVkyMUhnHLm6aWh7c5a6U6raLuYdKaBpRjTZPEwshQUi5IbKVxsCgZYjRQLrW9uU4n1SlU962QYBlTxS/KL8nsghundBIIAofMFQ6SiqFIW63TJrIz6s5CNximEbQJjUryi0rpN6aVN/USjMAgi17hWHoZkiSTaycEJMy/xTSRLBxwXYJLIs0iM836DGnsZknoXcIxXJ8WLETnbeNOMeqvvTbKLbSJBxiXhhzustKhxME361GBWc/6l/a18uB89w2WumTjHFt7zo86CdFbxypVKsUBetR64Vu1vNTHLKsgqyDz0aMs36DVQ3aMc61qyaUmpfoGrSrx9WFA/Jy1YLJTYjulDWBKROqmVevGQ/p0dXiEEEN+fLsGrd7qygXWY+cr2FrpcA6Ahia3nNopnWYAjLnrUYOtZk3ccf72cZ20qKiY5E2Q1h9XL0P3LsHZ5tfpghDYKJ3kpzwBZrwvU2dzq9qMHV7f+WSAtIiti03QshMCdralTT+pwibPnOIvskxUeCQ04ttT69kzXHfOfxcQoIpdVwUtHaPkNsd3jL8G8LLKrte4nY1noGnnbmWz32V0PwCRUpiLi/XZZ8pu1QFmui1UdU5QKLS1m9jUTmArFBs9qNLCzFi5ozJ+qMkuhAOi3ssAaaxOoZCi/Ko9mZx+E014VN4n5CJhqi3MOa7S1a3HZltYSJXDLUk3TI5elB+/x9SGCANzl8cmbtj2jm2R0d2Gthj0cjU079U5DEBTvfpKLFulstDKN3jS3aO//2B+3lKkRVNREHVjLSwyOjdBEwrL7sTVFubNq2yCED2Z3F1l8bouqb3ybBW8lsryWwBonA9FnJiYMdyKWtyyPbSvI8s7BKBRPtbm1xZKVZPSelIuQrulr3yMeggB3Piys7y7K6llDC/X7sh24asOEVT2MSYn4ltuC6haDcuzXW2RH9fDFh2ZdX/ttZP8rBdyD/F5o/jL4eHuuBerrAHO/LZZnZWxy70AQTKNPTlkbhl1BEKk6P4aSUPmYBDJqJftjlYBBMnt7vDx/TiTwqH8r9JJFjeJeRwOrO/K5aNK8xICb+f3Dq4GA1m/9lZgd7kR3C3RLLMHXMaIUaLLlS3QkSpiW28alCVIZq5hGjd8KhlUJ12y3p756xIOKjvJj1YH8Ec8LMP4DOseIkztEifz8emybKQnumQgnNHu2SIkmW8zDg348Mb1Jv7isl3/p+k+6XFxaYIelRgYMVCl47OOVQDOLA/XovcOyH0DnzmNaqplXWQSXnTaJADphJ6nnuUfREdmwuKPBoQQWI/cZGsfUdk2YlMaj3+iBs0QAuJcfN5QNNuMEmEZhozMw58+7bHXljw/xEt/3gxg9ETZE/+pWzVaWWBeFByMT+epU3khjabVaFZTpKYTohu23fLjLwIjjCxDbSDzQfzA9qJoQfuaj3kCKmSayagX817tZmCkawZZT6qZns4TCdSP+aJUwX4AGavlHc082Z6yaj/VusJFoseBlaaP6B3YPnANKRvmxr1Q1kkz1A6dYkZLTWml9Gwg4Imej0eX9tUiqhHGej0E0zppOr2oc5BL2jF2W0h6Z319SWpgtGg8GvRjQ2ikJFau87mDTNN/vJ1+rw5Z3wEhTrIBu/0hAjXv6ZJpiB6ZYGiQqW/4nps0cR1exNW53MLu+034IxGtp4/szee35/Mb1ChXHyNjOLRKkybTSHyWNQifXoPz0zP7as0anuHxo0XR/JBKtD2UiU7KmdS/g0SSlqZW+/QIWd+wUfj1B+F7t48Y1DvwMf/5Y75AtKYZlxxYTpCBwIjtq7pI+BK1WhLN50cj8AUCRBYtSBX1HjENI0f99k85EXsbnKmZxhcgJgSBIDVVIFqydnslO0qIZYIuDlJjlcJHNhi0NiRkzdr1Ixrtn16Dq9f1HwD/bga5HGuOPh1pkv9NPw3FDXHyukKgRIhTH1Q9/uM//nl8BYlod8WjsBdLAAAAAElFTkSuQmCC",size:"lg",my:2,ml:-1,mr:2}),t.jsxs(j,{display:"block",width:"100%",pb:1,children:[t.jsx(h,{fontSize:"lg",fontWeight:"bold",mb:1,children:b("header.donation.afdian")}),t.jsx(h,{fontSize:"sm",children:b("header.donation.viaCNY")})]})]}),t.jsxs(g,{size:"lg",w:"85%",onClick:()=>window.open("https://opencollective.com/rail-map-toolkit","_blank"),cursor:"pointer",children:[t.jsx(m,{src:"/rmp/assets/opencollective-icon-Ciasch0w.webp",size:"lg",my:2,ml:-1,mr:2}),t.jsxs(j,{display:"block",width:"100%",pb:1,children:[t.jsx(h,{fontSize:"lg",fontWeight:"bold",mb:1,children:b("header.donation.openCollective")}),t.jsx(h,{fontSize:"sm",children:b("header.donation.viaUSD")})]})]})]})]})]})]})}; /*! * canvas-size * v2.0.0 diff --git a/assets/rmg-palette-app-clip-aSI_7pb8.js b/assets/rmg-palette-app-clip-BwGDxhpZ.js similarity index 93% rename from assets/rmg-palette-app-clip-aSI_7pb8.js rename to assets/rmg-palette-app-clip-BwGDxhpZ.js index 1a5d4aa3a..960bab39a 100644 --- a/assets/rmg-palette-app-clip-aSI_7pb8.js +++ b/assets/rmg-palette-app-clip-BwGDxhpZ.js @@ -1 +1 @@ -import{j as n,al as C}from"./chakra-t2DzLzXq.js";import{r as E,w as R}from"./index-CgEQ4DK5.js";import{b as s}from"./react-DmTIgZys.js";const x="rmg-palette-bridge--",h={position:"relative",h:460,maxH:"70%","& > button":{position:"absolute",right:1,top:1},"& iframe":{h:"100%",w:"100%"}};function v(p){const{isOpen:c,onClose:o,defaultTheme:t,onSelect:l}=p,[r]=s.useState(crypto.randomUUID()),[m,f]=s.useState(!1),d="/rmg-palette/#/picker?"+new URLSearchParams({parentComponent:E.getAppName(),parentId:r}),i=s.useRef();return s.useEffect(()=>{const e=new BroadcastChannel(x+r);return i.current=e,e.onmessage=u=>{const{event:a,data:g}=u.data;console.log("[rmp] Received event from Palette app clip:",a),a==="CLOSE"?o():a==="SELECT"?l(g):a==="LOADED"&&f(!0)},()=>{e.close()}},[]),s.useEffect(()=>{var e;t&&((e=i.current)==null||e.postMessage({event:"OPEN",data:t}))},[m,t==null?void 0:t.toString()]),n.jsxs(R,{size:"md",isOpen:c,onClose:o,sx:h,children:[n.jsx(C,{onClick:o}),n.jsx("iframe",{src:d,loading:"eager"})]})}export{v as default}; +import{j as n,al as C}from"./chakra-t2DzLzXq.js";import{r as E,w as R}from"./index-DRWG9Ar1.js";import{b as s}from"./react-DmTIgZys.js";const x="rmg-palette-bridge--",h={position:"relative",h:460,maxH:"70%","& > button":{position:"absolute",right:1,top:1},"& iframe":{h:"100%",w:"100%"}};function v(p){const{isOpen:c,onClose:o,defaultTheme:t,onSelect:l}=p,[r]=s.useState(crypto.randomUUID()),[m,f]=s.useState(!1),d="/rmg-palette/#/picker?"+new URLSearchParams({parentComponent:E.getAppName(),parentId:r}),i=s.useRef();return s.useEffect(()=>{const e=new BroadcastChannel(x+r);return i.current=e,e.onmessage=u=>{const{event:a,data:g}=u.data;console.log("[rmp] Received event from Palette app clip:",a),a==="CLOSE"?o():a==="SELECT"?l(g):a==="LOADED"&&f(!0)},()=>{e.close()}},[]),s.useEffect(()=>{var e;t&&((e=i.current)==null||e.postMessage({event:"OPEN",data:t}))},[m,t==null?void 0:t.toString()]),n.jsxs(R,{size:"md",isOpen:c,onClose:o,sx:h,children:[n.jsx(C,{onClick:o}),n.jsx("iframe",{src:d,loading:"eager"})]})}export{v as default}; diff --git a/assets/rmg-palette-app-clip-legacy-z6rXRe5N.js b/assets/rmg-palette-app-clip-legacy-D6xUcAS7.js similarity index 88% rename from assets/rmg-palette-app-clip-legacy-z6rXRe5N.js rename to assets/rmg-palette-app-clip-legacy-D6xUcAS7.js index 315d93042..d8205a14d 100644 --- a/assets/rmg-palette-app-clip-legacy-z6rXRe5N.js +++ b/assets/rmg-palette-app-clip-legacy-D6xUcAS7.js @@ -1 +1 @@ -System.register(["./chakra-legacy--ElhKRU8.js","./index-legacy-iSkJTZGA.js","./react-legacy-CB7hQk4J.js"],(function(e,t){"use strict";var n,a,s,r,o;return{setters:[e=>{n=e.j,a=e.al},e=>{s=e.r,r=e.w},e=>{o=e.b}],execute:function(){e("default",(function(e){const{isOpen:i,onClose:l,defaultTheme:u,onSelect:p}=e,[d]=o.useState(crypto.randomUUID()),[g,m]=o.useState(!1),f="/rmg-palette/#/picker?"+new URLSearchParams({parentComponent:s.getAppName(),parentId:d}),v=o.useRef();return o.useEffect((()=>{const e=new BroadcastChannel(t+d);return v.current=e,e.onmessage=e=>{const{event:t,data:n}=e.data;console.log("[rmp] Received event from Palette app clip:",t),"CLOSE"===t?l():"SELECT"===t?p(n):"LOADED"===t&&m(!0)},()=>{e.close()}}),[]),o.useEffect((()=>{var e;u&&(null===(e=v.current)||void 0===e||e.postMessage({event:"OPEN",data:u}))}),[g,null==u?void 0:u.toString()]),n.jsxs(r,{size:"md",isOpen:i,onClose:l,sx:c,children:[n.jsx(a,{onClick:l}),n.jsx("iframe",{src:f,loading:"eager"})]})}));const t="rmg-palette-bridge--",c={position:"relative",h:460,maxH:"70%","& > button":{position:"absolute",right:1,top:1},"& iframe":{h:"100%",w:"100%"}}}}})); +System.register(["./chakra-legacy--ElhKRU8.js","./index-legacy-jqOeRlnz.js","./react-legacy-CB7hQk4J.js"],(function(e,t){"use strict";var n,a,s,r,o;return{setters:[e=>{n=e.j,a=e.al},e=>{s=e.r,r=e.w},e=>{o=e.b}],execute:function(){e("default",(function(e){const{isOpen:i,onClose:l,defaultTheme:u,onSelect:p}=e,[d]=o.useState(crypto.randomUUID()),[g,m]=o.useState(!1),f="/rmg-palette/#/picker?"+new URLSearchParams({parentComponent:s.getAppName(),parentId:d}),v=o.useRef();return o.useEffect((()=>{const e=new BroadcastChannel(t+d);return v.current=e,e.onmessage=e=>{const{event:t,data:n}=e.data;console.log("[rmp] Received event from Palette app clip:",t),"CLOSE"===t?l():"SELECT"===t?p(n):"LOADED"===t&&m(!0)},()=>{e.close()}}),[]),o.useEffect((()=>{var e;u&&(null===(e=v.current)||void 0===e||e.postMessage({event:"OPEN",data:u}))}),[g,null==u?void 0:u.toString()]),n.jsxs(r,{size:"md",isOpen:i,onClose:l,sx:c,children:[n.jsx(a,{onClick:l}),n.jsx("iframe",{src:f,loading:"eager"})]})}));const t="rmg-palette-bridge--",c={position:"relative",h:460,maxH:"70%","& > button":{position:"absolute",right:1,top:1},"& iframe":{h:"100%",w:"100%"}}}}})); diff --git a/assets/svg-wrapper-pwXZizLy.js b/assets/svg-wrapper-C2oLWHER.js similarity index 98% rename from assets/svg-wrapper-pwXZizLy.js rename to assets/svg-wrapper-C2oLWHER.js index 45f64a38a..78ea8e73d 100644 --- a/assets/svg-wrapper-pwXZizLy.js +++ b/assets/svg-wrapper-C2oLWHER.js @@ -1 +1 @@ -import{j as E}from"./chakra-t2DzLzXq.js";import{k as H,l as Y,an as Nt,ao as _t,ap as vt,c as Ct,d as et,aq as Q,ar as G,as as at,T as ot,at as bt,au as St,av as V,q as lt,t as it,S as It,aw as At,n as rt,m as jt,o as Pt,r as dt,E as ut,v as gt,y as xt,U as Z,ax as Lt,p as Tt,ay as $t,a0 as Kt,a1 as Wt,A as pt,z as wt,a8 as tt,ak as Bt,al as zt}from"./index-CgEQ4DK5.js";import{b as _}from"./react-DmTIgZys.js";import{u as B,e as Ot,i as Rt}from"./clipboard-CUes04zp.js";import{s as ft,u as Ft,f as Xt,F as Yt,l as Ut,b as Vt,c as Zt}from"./master-manager-UVzPVFgJ.js";import{m as yt}from"./misc-nodes-CZ4-M6fq.js";const Mt=(t,e,u,d,i,o,a)=>{if(!("offsetFrom"in o)||!("offsetTo"in o)||Number.isNaN(o.offsetFrom)||Number.isNaN(o.offsetTo))return;if(o.offsetFrom===o.offsetTo)return Et(t,e,u,d,i)?a<0?{x1:e,y1:u,x2:d,y2:i,offset:o.offsetFrom}:e===d?{x1:e+5*a,y1:u,x2:d+5*a,y2:i,offset:o.offsetFrom}:u===i?{x1:e,y1:u+5*a,x2:d,y2:i+5*a,offset:o.offsetFrom}:{x1:e+5*Math.SQRT1_2*a,y1:u+5*Math.SQRT1_2*a,x2:d+5*Math.SQRT1_2*a,y2:i+5*Math.SQRT1_2*a,offset:o.offsetFrom}:void 0;const[h,n]=[o.offsetFrom,o.offsetTo];for(let p=0;p!!((e===d||u===i)&&[H.Diagonal,H.Perpendicular].includes(t)||Math.abs((i-u)/(d-e))===1&&[H.Diagonal,H.RotatePerpendicular].includes(t)),Qt=(t,e)=>{const u=[],d=[];return Object.values(e).forEach(i=>{var I;if(i.length===1){d.push(...i.map(f=>f.edge));return}const o=t.getEdgeAttribute(i.at(0),"type");if(!i.every(f=>t.getEdgeAttribute(f,"type")===o)){d.push(...i.map(f=>f.edge));return}const a=t.getEdgeAttribute(i.at(0),"style");if(!i.every(f=>t.getEdgeAttribute(f,"style")===a)){d.push(...i.map(f=>f.edge));return}const h={},n=new Set,p=new Set,r=Object.fromEntries(i.map(f=>{var l,w;const[D,c]=t.extremities(f);return h[D]=((l=h[D])!=null?l:0)+1,h[c]=((w=h[c])!=null?w:0)+1,n.add(D),p.add(c),[D,[f.edge,c]]})),x=Array.from(n).filter(f=>h[f]===1),A=Array.from(p).filter(f=>h[f]===1);if(x.length!==1||A.length!==1){d.push(...i.map(f=>f.edge));return}const v=x[0],b=A[0];if(v===b){d.push(...i.map(f=>f.edge));return}const M=[r[v][0]];let j=r[v][1];for(let f=1;fc.edge));return}M.push(r[j][0]),j=D}if(j!==b||M.length!==i.length){d.push(...i.map(f=>f.edge));return}u.push(M)}),{allReconciledLines:u,danglingLines:d}},qt=(t,e)=>{if(!e.every(i=>t.hasEdge(i)))return;const u=e.map(i=>{var v,b,M;const[o,a]=t.extremities(i),h=t.getNodeAttributes(o),n=t.getNodeAttributes(a),{type:p,parallelIndex:r}=t.getEdgeAttributes(i),x=(v=t.getEdgeAttribute(i,p))!=null?v:Y[p].defaultAttrs,A=Mt(p,h.x,h.y,n.x,n.y,x,r);if(A){const{x1:j,y1:I,x2:f,y2:D,offset:c}=A;return Y[H.Simple].generatePath(j,f,I,D,{offset:c})}return(M=(b=Y[p])==null?void 0:b.generatePath(h.x,n.x,h.y,n.y,x))!=null?M:"M ".concat(h.x," ").concat(h.y," L ").concat(n.x," ").concat(n.y)});let d="".concat(u[0]," ");for(let i=1;i[...t.nodeEntries()].map(e=>e.node.startsWith("stn")?{id:e.node,type:"station",station:e.attributes}:{id:e.node,type:"misc-node",miscNode:e.attributes}),Ht=t=>{const e={},u=[],d={},i=[];for(const n of t.edgeEntries()){const[p,r,x,A]=[n.sourceAttributes.x,n.sourceAttributes.y,n.targetAttributes.x,n.targetAttributes.y],v=Mt(n.attributes.type,p,r,x,A,n.attributes[n.attributes.type],n.attributes.parallelIndex);if(!v){if(n.attributes.parallelIndex>=0){u.push(n);continue}}if(n.attributes.reconcileId!==""){const b=n.attributes.reconcileId;b in d?d[b].push(n):d[b]=[n];continue}if(v){const b=n.edge,M=n.attributes,{x1:j,y1:I,x2:f,y2:D,offset:c}=v;e[b]={id:b,attr:M,path:Y[H.Simple].generatePath(j,f,I,D,{offset:c})};continue}i.push(n)}const o=new Set;for(;u.length;){const n=u.pop();if(o.has(n.edge))continue;const{normal:p,parallel:r}=Nt(t,n);if(!r.length)continue;r.forEach(A=>o.add(A.edge)),i.push(...p);const x=_t(r);for(const A of r){const v=A.edge;e[v]={id:A.edge,attr:A.attributes,path:x[v]}}}const{allReconciledLines:a,danglingLines:h}=Qt(t,d);for(const n of a){const p=qt(t,n);if(!p)continue;const r=n[0];e[r]={id:r,attr:t.getEdgeAttributes(r),path:p}}for(const n of h){const p=t.getEdgeAttributes(n),[r,x]=t.extremities(n),A=t.getNodeAttributes(r),v=t.getNodeAttributes(x);e[n]={id:n,attr:p,path:Y[H.Simple].generatePath(A.x,v.x,A.y,v.y,Y[H.Simple].defaultAttrs)}}for(const n of i){const p=n.edge,r=n.attributes.type,x=n.attributes,[A,v,b,M]=[n.sourceAttributes.x,n.sourceAttributes.y,n.targetAttributes.x,n.targetAttributes.y];if(!(r in Y)){e[p]={id:p,attr:x,path:"M ".concat(A," ").concat(v," L ").concat(b," ").concat(M)};continue}e[p]={id:p,attr:x,path:Y[r].generatePath(A,b,v,M,x[r])}}return Object.values(e).map(n=>({id:n.id,type:"line",line:n}))},kt=t=>{const{id:e,x:u,y:d,handlePointerDown:i,handlePointerMove:o,handlePointerUp:a}=t,h=_.useCallback(r=>i(e,r),[e,i]),n=_.useCallback(r=>o(e,r),[e,o]),p=_.useCallback(r=>a(e,r),[e,a]);return E.jsx("g",{id:e,transform:"translate(".concat(u-6.4," ").concat(d-6.4,")scale(0.025)"),onPointerDown:h,onPointerMove:n,onPointerUp:p,style:{cursor:"move"},children:E.jsx("path",{id:"stn_core_".concat(e),fillRule:"evenodd",clipRule:"evenodd",d:"M256 0c70.69 0 134.7 28.66 181.02 74.98C483.34 121.31 512 185.31 512 256c0 70.69-28.66 134.7-74.98 181.02C390.7 483.34 326.69 512 256 512c-70.69 0-134.69-28.66-181.02-74.98C28.66 390.7 0 326.69 0 256c0-70.69 28.66-134.69 74.98-181.02C121.31 28.66 185.31 0 256 0zm-21.91 302.69v-2.07c.16-13.72 1.51-24.59 4.15-32.67 2.59-8.08 6.32-14.65 11.18-19.63 4.87-5.02 10.72-9.58 17.56-13.72 4.4-2.8 8.39-5.9 11.91-9.37 3.52-3.42 6.32-7.41 8.38-11.91 2.07-4.46 3.11-9.42 3.11-14.91 0-6.53-1.55-12.18-4.66-16.99-3.05-4.77-7.19-8.44-12.27-11.08-5.13-2.59-10.82-3.89-17.09-3.89-5.65 0-11.03 1.15-16.21 3.53-5.12 2.33-9.42 6-12.79 10.97-3.36 4.98-5.33 11.35-5.85 19.11h-33.56c.53-13.21 3.89-24.39 10.05-33.55 6.21-9.16 14.4-16.11 24.55-20.82 10.2-4.71 21.49-7.04 33.81-7.04 13.57 0 25.38 2.48 35.52 7.56 10.15 5.02 18.08 12.06 23.72 21.08 5.59 9 8.44 19.47 8.44 31.48 0 8.23-1.29 15.64-3.88 22.21-2.59 6.58-6.22 12.48-10.98 17.61-4.77 5.18-10.41 9.73-17.03 13.67-6.27 3.94-11.35 7.97-15.18 12.17-3.88 4.19-6.68 9.17-8.44 14.86-1.76 5.74-2.75 12.84-2.9 21.33v2.07h-31.54zm16.68 70.67c-6.06 0-11.24-2.18-15.59-6.48-4.34-4.29-6.47-9.53-6.47-15.63 0-6.01 2.12-11.19 6.47-15.49 4.35-4.3 9.53-6.47 15.59-6.47 5.95 0 11.12 2.19 15.48 6.47 4.39 4.31 6.58 9.48 6.58 15.49 0 4.04-1.05 7.76-3.06 11.08-2.02 3.35-4.66 6.07-7.97 8.03-3.31 1.96-6.99 3-11.03 3z"})})},Jt=t=>{const{id:e,path:u,handlePointerDown:d}=t,i=_.useCallback(o=>d(e,o),[e,d]);return E.jsx("path",{id:e,d:u,fill:"none",stroke:"grey",strokeWidth:"5",strokeLinecap:"round",cursor:"pointer",onPointerDown:i})},te=_.memo(t=>{var n,p,r,x,A,v,b,M,j,I,f,D;const{elements:e,handlePointerDown:u,handlePointerMove:d,handlePointerUp:i,handleEdgePointerDown:o}=t,a=Object.fromEntries(Array.from({length:21},(c,l)=>[l-10,{pre:[],main:[],post:[]}]));for(const c of e)if(c.type==="line"){const l=c.line.attr.type,w=c.line.attr.style,k=c.line.attr[w],m=(n=vt[w])==null?void 0:n.preComponent;m&&a[c.line.attr.zIndex].pre.push(E.jsx(m,{id:c.id,type:l,path:c.line.path,styleAttrs:k,newLine:!1,handlePointerDown:o},"".concat(c.id,".pre")));const S=(r=(p=vt[w])==null?void 0:p.component)!=null?r:Jt;a[c.line.attr.zIndex].main.push(E.jsx(S,{id:c.id,type:l,path:c.line.path,styleAttrs:k,newLine:!1,handlePointerDown:o},c.id));const L=(x=vt[w])==null?void 0:x.postComponent;L&&a[c.line.attr.zIndex].post.push(E.jsx(L,{id:c.id,type:l,path:c.line.path,styleAttrs:k,newLine:!1,handlePointerDown:o},"".concat(c.id,".post")))}else if(c.type==="station"){const l=c.station,w=l.type,k=(A=ft[w])==null?void 0:A.preComponent;k&&a[c.station.zIndex].pre.push(E.jsx(k,{id:c.id,x:l.x,y:l.y,attrs:l,handlePointerDown:u,handlePointerMove:d,handlePointerUp:i},"".concat(c.id,".pre")));const m=(b=(v=ft[w])==null?void 0:v.component)!=null?b:kt;a[c.station.zIndex].main.push(E.jsx(m,{id:c.id,x:l.x,y:l.y,attrs:l,handlePointerDown:u,handlePointerMove:d,handlePointerUp:i},c.id));const S=(M=ft[w])==null?void 0:M.postComponent;S&&a[c.station.zIndex].post.push(E.jsx(S,{id:c.id,x:l.x,y:l.y,attrs:l,handlePointerDown:u,handlePointerMove:d,handlePointerUp:i},"".concat(c.id,".post")))}else if(c.type==="misc-node"){const l=c.miscNode,w=l.type,k=(j=yt[w])==null?void 0:j.preComponent;k&&a[c.miscNode.zIndex].pre.push(E.jsx(k,{id:c.id,x:l.x,y:l.y,attrs:l[w],handlePointerDown:u,handlePointerMove:d,handlePointerUp:i},"".concat(c.id,".pre")));const m=(f=(I=yt[w])==null?void 0:I.component)!=null?f:kt;a[c.miscNode.zIndex].main.push(E.jsx(m,{id:c.id,x:l.x,y:l.y,attrs:l[w],handlePointerDown:u,handlePointerMove:d,handlePointerUp:i},c.id));const S=(D=yt[w])==null?void 0:D.postComponent;S&&a[c.miscNode.zIndex].post.push(E.jsx(S,{id:c.id,x:l.x,y:l.y,attrs:l[w],handlePointerDown:u,handlePointerMove:d,handlePointerUp:i},"".concat(c.id,".post")))}return Array.from({length:21},(c,l)=>(l-10).toString()).map(c=>[...a[c].pre,...a[c].main,...a[c].post]).flat()},(t,e)=>t.elements===e.elements),ee=()=>{const t=Ct(),e=_.useRef(window.graph),u=()=>{t(lt()),t(it()),t(gt(e.current.export()))},{telemetry:{project:d},preference:{autoParallel:i}}=et(m=>m.app),{svgViewBoxZoom:o,svgViewBoxMin:a}=et(m=>m.param),{selected:h,refresh:{nodes:n,edges:p},mode:r,active:x,keepLastPath:A,theme:v}=et(m=>m.runtime),[b,M]=_.useState({x:0,y:0}),[j,I]=_.useState({x:0,y:0}),f=B((m,S)=>{S.stopPropagation(),r==="select"&&t(Q("free"));const L=S.currentTarget,{x:$,y:z}=G(S);L.setPointerCapture(S.pointerId),M({x:$,y:z}),t(at(m)),S.shiftKey?h.has(m)?t(bt(m)):t(St(m)):h.has(m)||t(ot(new Set([m])))}),D=B((m,S)=>{const{x:L,y:$}=G(S);r==="free"&&x===m?(h.forEach(z=>{e.current.hasNode(z)&&e.current.updateNodeAttributes(z,O=>({...O,x:V(O.x-(b.x-L)*o/100,S.altKey?1:5),y:V(O.y-(b.y-$)*o/100,S.altKey?1:5)}))}),t(lt()),t(it())):r.startsWith("line")&&I({x:(b.x-L)*o/100,y:(b.y-$)*o/100})}),c=B((m,S)=>{if(r.startsWith("line")){A||t(Q("free"));const L=[...Object.values(It),At.Virtual,At.Master],$=e.current.hasNode(x)&&L.includes(e.current.getNodeAttribute(x,"type"));["stn_core_","virtual_circle_"].forEach(O=>{var st,R;const W=(R=(st=document.elementsFromPoint(S.clientX,S.clientY)[0].attributes)==null?void 0:st.getNamedItem("id"))==null?void 0:R.value,ct=W==null?void 0:W.startsWith(O);if($&&ct){const K=r.slice(5),nt="line_".concat(rt(10)),[F,U]=[x,W.slice(O.length)],X=i?jt(e.current,K,F,U,"from"):-1;e.current.addDirectedEdgeWithKey(nt,F,U,{visible:!0,zIndex:0,type:K,[K]:structuredClone(Y[K].defaultAttrs),style:Pt.SingleColor,[Pt.SingleColor]:{color:v},reconcileId:"",parallelIndex:X}),d&&dt.event(ut.ADD_LINE,{type:K})}}),t(it()),t(gt(e.current.export()))}else if(r==="free"&&x){const{x:L,y:$}=G(S);b.x-L===0&&b.y-$===0||t(gt(e.current.export()))}t(at(void 0))}),l=B((m,S)=>{if(S.stopPropagation(),S.shiftKey||t(xt()),S.shiftKey&&h.has(m)?t(bt(m)):t(St(m)),r.startsWith("station")||r.startsWith("misc-node-virtual")||r.startsWith("misc-node-master")){const L=S.clientX-document.getElementById("canvas").getBoundingClientRect().left,$=S.clientY-document.getElementById("canvas").getBoundingClientRect().top,z=r.startsWith("station"),O=rt(10),J=z?"stn_".concat(O):"misc_node_".concat(O),W=z?r.slice(8):r.slice(10),{x:ct,y:st}=Z(L,$,o,a),R=z?structuredClone(ft[W].defaultAttrs):structuredClone(yt[W].defaultAttrs);"color"in R&&(R.color=v),e.current.addNode(J,{visible:!0,zIndex:0,x:V(ct,5),y:V(st,5),type:W,[W]:R});const K=e.current.getEdgeAttributes(m),{zIndex:nt,type:F,style:U}=K,X=K[F],ht=K[U],[s,y]=e.current.extremities(m),g=i?0:-1;e.current.addDirectedEdgeWithKey("line_".concat(rt(10)),s,J,{visible:!0,zIndex:nt,type:F,[F]:structuredClone(X),style:U,[U]:structuredClone(ht),reconcileId:"",parallelIndex:g}),e.current.addDirectedEdgeWithKey("line_".concat(rt(10)),J,y,{visible:!0,zIndex:nt,type:F,[F]:structuredClone(X),style:U,[U]:structuredClone(ht),reconcileId:"",parallelIndex:g}),e.current.dropEdge(m),u(),d&&(dt.event(ut.ADD_STATION,{type:W}),dt.event(ut.ADD_LINE,{type:F})),t(Q("free")),t(ot(new Set([J])))}}),w=_.useMemo(()=>[...Ht(e.current),...Gt(e.current)],[p,n]),k=Lt.component;return E.jsxs(E.Fragment,{children:[E.jsx(te,{elements:w,handlePointerDown:f,handlePointerMove:D,handlePointerUp:c,handleEdgePointerDown:l}),r.startsWith("line")&&x&&x!=="background"&&E.jsx(k,{id:"line_create_in_progress___no_use",type:r.slice(5),path:Y[r.slice(5)].generatePath(e.current.getNodeAttribute(x,"x"),e.current.getNodeAttribute(x,"x")-j.x,e.current.getNodeAttribute(x,"y"),e.current.getNodeAttribute(x,"y")-j.y,Y[r.slice(5)].defaultAttrs),styleAttrs:{color:v},newLine:!0,handlePointerDown:()=>{}})]})},ae=()=>{const t=Ct(),e=_.useRef(window.graph),u=()=>{t(lt()),t(it()),t(gt(e.current.export()))},{activeSubscriptions:d}=et(s=>s.account),{telemetry:{project:i}}=et(s=>s.app),{svgViewBoxZoom:o,svgViewBoxMin:a}=et(s=>s.param),{mode:h,lastTool:n,active:p,selected:r,keepLastPath:x,theme:A,refresh:{nodes:v},masterNodesCount:b,parallelLinesCount:M}=et(s=>s.runtime),j=Ft(),{height:I,width:f}=Tt(j),D=!d.RMP_CLOUD&&b+1>$t,c=!d.RMP_CLOUD&&M+1>Kt;_.useEffect(()=>{const s=Xt(e.current);Object.entries(s).filter(([y,g])=>g&&y in Yt).forEach(([y])=>Ut(y))},[v]);const[l,w]=_.useState({x:0,y:0}),[k,m]=_.useState({x:0,y:0}),[S,L]=_.useState({x:0,y:0}),[$,z]=_.useState({x:0,y:0}),O=B(s=>{const{x:y,y:g}=G(s);if(h.startsWith("station")){t(Q("free"));const N=rt(10),C="stn_".concat(N),P=h.slice(8),T=structuredClone(ft[P].defaultAttrs);"color"in T&&(T.color=A);const{x:q,y:mt}=Z(y,g,o,a);e.current.addNode(C,{visible:!0,zIndex:0,x:V(q,5),y:V(mt,5),type:P,[P]:T}),u(),i&&dt.event(ut.ADD_STATION,{type:P}),t(ot(new Set([C])))}else if(h.startsWith("misc-node")){t(Q("free"));const N=rt(10),C="misc_node_".concat(N),P=h.slice(10),{x:T,y:q}=Z(y,g,o,a);e.current.addNode(C,{visible:!0,zIndex:0,x:V(T,5),y:V(q,5),type:P,[P]:structuredClone(yt[P].defaultAttrs)}),u(),i&&dt.event(ut.ADD_STATION,{type:P}),t(ot(new Set([C])))}else h==="free"||h.startsWith("line")?(h.startsWith("line")&&(t(Q("free")),x&&t(Wt(!1))),L({x:y,y:g}),z(a),s.shiftKey||(t(at("background")),t(xt()))):h==="select"&&(w(Z(y,g,o,a)),m(Z(y,g,o,a)))}),J=B(s=>{if(h==="select"){if(l.x!=0&&l.y!=0){const{x:y,y:g}=G(s);m(Z(y,g,o,a))}}else if(p==="background"){const{x:y,y:g}=G(s);t(pt({x:$.x+(S.x-y)*o/100,y:$.y+(S.y-g)*o/100}))}}),W=B(s=>{if(h==="select"){const{x:y,y:g}=G(s),{x:N,y:C}=Z(y,g,o,a),P=Vt(e.current,l.x,l.y,N,C),T=Zt(e.current,new Set(P));t(ot(new Set([...s.shiftKey?r:[],...P,...T]))),t(Q("free")),w({x:0,y:0}),m({x:0,y:0})}p==="background"&&!s.shiftKey&&t(at(void 0))}),ct=B(s=>{let y=o;s.deltaY>0&&o+10<400?y=o+10:s.deltaY<0&&o-10>0&&(y=o-10),t(wt(y));const{x:g,y:N}=G(s),C=s.currentTarget.getBoundingClientRect(),[P,T]=[g/C.width,N/C.height];t(pt({x:a.x+g*o/100-f*y/100*P,y:a.y+N*o/100-I*y/100*T}))}),st=B(async s=>{if(tt?s.key==="Backspace":s.key==="Delete")r.size>0&&(r.forEach(y=>{e.current.hasNode(y)?e.current.dropNode(y):e.current.hasEdge(y)&&e.current.dropEdge(y)}),t(xt()),u());else if(s.key.startsWith("Arrow")){const g=s.key.endsWith("Left")?-1:s.key.endsWith("Right")?1:0,N=s.key.endsWith("Up")?-1:s.key.endsWith("Down")?1:0;t(pt(Z(100*g,100*N,o,a)))}else if(s.key==="i"||s.key==="j"||s.key==="k"||s.key==="l"){const g=(s.key==="j"?-1:s.key==="l"?1:0)*10,N=(s.key==="i"?-1:s.key==="k"?1:0)*10;r.size>0&&r.forEach(C=>{e.current.hasNode(C)&&(e.current.updateNodeAttribute(C,"x",P=>(P!=null?P:0)+g),e.current.updateNodeAttribute(C,"y",P=>(P!=null?P:0)+N),u())})}else if(s.key==="f"&&n)t(Q(n));else if(s.key==="z"&&(tt?s.metaKey&&!s.shiftKey:s.ctrlKey))tt&&s.preventDefault(),t(Bt()),t(lt()),t(it());else if(s.key==="s")t(Q("select"));else if((s.key==="c"||s.key==="x")&&(tt?s.metaKey&&!s.shiftKey:s.ctrlKey)){const y=Ot(e.current,r);navigator.clipboard.writeText(y),s.key==="x"&&(t(xt()),r.forEach(g=>{e.current.hasNode(g)?e.current.dropNode(g):e.current.hasEdge(g)&&e.current.dropEdge(g)}),u())}else if(s.key==="v"&&(tt?s.metaKey&&!s.shiftKey:s.ctrlKey)){const y=await navigator.clipboard.readText(),{x:g,y:N}=Z(f/2,I/2,o,a),{nodes:C,edges:P}=Rt(y,e.current,D,c,V(g,5),V(N,5));u();const T=structuredClone(C);P.forEach(q=>T.add(q)),t(ot(T))}else(tt&&s.key==="z"&&s.metaKey&&s.shiftKey||!tt&&s.key==="y"&&s.ctrlKey)&&(t(zt()),t(lt()),t(it()))}),[R,K]=_.useState(0),nt=B(s=>{if(s.touches.length===2){t(at(void 0));const[y,g]=[s.touches[0].clientX-s.touches[1].clientX,s.touches[0].clientY-s.touches[1].clientY];K(y*y+g*g)}}),F=B(s=>{if(R!==0&&s.touches.length===2){const[y,g]=[s.touches[0].clientX-s.touches[1].clientX,s.touches[0].clientY-s.touches[1].clientY],N=y*y+g*g;let C=o;N-R<0&&o+10<=390?C=o+10:N-R>0&&o-10>=10&&(C=o-10),t(wt(C)),K(N);const P=s.currentTarget.getBoundingClientRect(),[T,q]=[(s.touches[0].clientX+s.touches[1].clientX)/2-P.left,(s.touches[0].clientY+s.touches[1].clientY)/2-P.top],[mt,Dt]=[T/P.width,q/P.height];t(pt({x:a.x+T*o/100-f*C/100*mt,y:a.y+q*o/100-I*C/100*Dt}))}}),U=B(s=>{R!==0&&K(0)}),[X,ht]=_.useState({sx:0,sy:0,ex:0,ey:0});return _.useEffect(()=>{ht({sx:l.x<=k.x?l.x:k.x,ex:l.x>k.x?l.x:k.x,sy:l.y<=k.y?l.y:k.y,ey:l.y>k.y?l.y:k.y})},[k.x,k.y]),E.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",id:"canvas",style:{position:"fixed",top:40,left:40,userSelect:"none",touchAction:"none"},height:I,width:f,viewBox:"".concat(a.x," ").concat(a.y," ").concat(f*o/100," ").concat(I*o/100),onPointerDown:O,onPointerMove:J,onPointerUp:W,onTouchStart:nt,onTouchMove:F,onTouchEnd:U,onWheel:ct,tabIndex:0,onKeyDown:st,children:[E.jsx(ee,{}),h==="select"&&l.x!=0&&l.y!=0&&E.jsx("rect",{x:X.sx,y:X.sy,width:X.ex-X.sx,height:X.ey-X.sy,rx:"2",stroke:"#b5b5b6",strokeWidth:"2",strokeOpacity:"0.4",fill:"#b5b5b6",opacity:"0.75"}),E.jsx("defs",{children:E.jsxs("pattern",{id:"opaque",width:"5",height:"5",patternUnits:"userSpaceOnUse",children:[E.jsx("rect",{x:"0",y:"0",width:"2.5",height:"2.5",fill:"black",fillOpacity:"50%"}),E.jsx("rect",{x:"2.5",y:"2.5",width:"2.5",height:"2.5",fill:"black",fillOpacity:"50%"})]})})]})};export{ae as default}; +import{j as E}from"./chakra-t2DzLzXq.js";import{k as H,l as Y,an as Nt,ao as _t,ap as vt,c as Ct,d as et,aq as Q,ar as G,as as at,T as ot,at as bt,au as St,av as V,q as lt,t as it,S as It,aw as At,n as rt,m as jt,o as Pt,r as dt,E as ut,v as gt,y as xt,U as Z,ax as Lt,p as Tt,ay as $t,a0 as Kt,a1 as Wt,A as pt,z as wt,a8 as tt,ak as Bt,al as zt}from"./index-DRWG9Ar1.js";import{b as _}from"./react-DmTIgZys.js";import{u as B,e as Ot,i as Rt}from"./clipboard-DPvCegxP.js";import{s as ft,u as Ft,f as Xt,F as Yt,l as Ut,b as Vt,c as Zt}from"./master-manager-DlQmLEpO.js";import{m as yt}from"./misc-nodes-DMfi7tU1.js";const Mt=(t,e,u,d,i,o,a)=>{if(!("offsetFrom"in o)||!("offsetTo"in o)||Number.isNaN(o.offsetFrom)||Number.isNaN(o.offsetTo))return;if(o.offsetFrom===o.offsetTo)return Et(t,e,u,d,i)?a<0?{x1:e,y1:u,x2:d,y2:i,offset:o.offsetFrom}:e===d?{x1:e+5*a,y1:u,x2:d+5*a,y2:i,offset:o.offsetFrom}:u===i?{x1:e,y1:u+5*a,x2:d,y2:i+5*a,offset:o.offsetFrom}:{x1:e+5*Math.SQRT1_2*a,y1:u+5*Math.SQRT1_2*a,x2:d+5*Math.SQRT1_2*a,y2:i+5*Math.SQRT1_2*a,offset:o.offsetFrom}:void 0;const[h,n]=[o.offsetFrom,o.offsetTo];for(let p=0;p!!((e===d||u===i)&&[H.Diagonal,H.Perpendicular].includes(t)||Math.abs((i-u)/(d-e))===1&&[H.Diagonal,H.RotatePerpendicular].includes(t)),Qt=(t,e)=>{const u=[],d=[];return Object.values(e).forEach(i=>{var I;if(i.length===1){d.push(...i.map(f=>f.edge));return}const o=t.getEdgeAttribute(i.at(0),"type");if(!i.every(f=>t.getEdgeAttribute(f,"type")===o)){d.push(...i.map(f=>f.edge));return}const a=t.getEdgeAttribute(i.at(0),"style");if(!i.every(f=>t.getEdgeAttribute(f,"style")===a)){d.push(...i.map(f=>f.edge));return}const h={},n=new Set,p=new Set,r=Object.fromEntries(i.map(f=>{var l,w;const[D,c]=t.extremities(f);return h[D]=((l=h[D])!=null?l:0)+1,h[c]=((w=h[c])!=null?w:0)+1,n.add(D),p.add(c),[D,[f.edge,c]]})),x=Array.from(n).filter(f=>h[f]===1),A=Array.from(p).filter(f=>h[f]===1);if(x.length!==1||A.length!==1){d.push(...i.map(f=>f.edge));return}const v=x[0],b=A[0];if(v===b){d.push(...i.map(f=>f.edge));return}const M=[r[v][0]];let j=r[v][1];for(let f=1;fc.edge));return}M.push(r[j][0]),j=D}if(j!==b||M.length!==i.length){d.push(...i.map(f=>f.edge));return}u.push(M)}),{allReconciledLines:u,danglingLines:d}},qt=(t,e)=>{if(!e.every(i=>t.hasEdge(i)))return;const u=e.map(i=>{var v,b,M;const[o,a]=t.extremities(i),h=t.getNodeAttributes(o),n=t.getNodeAttributes(a),{type:p,parallelIndex:r}=t.getEdgeAttributes(i),x=(v=t.getEdgeAttribute(i,p))!=null?v:Y[p].defaultAttrs,A=Mt(p,h.x,h.y,n.x,n.y,x,r);if(A){const{x1:j,y1:I,x2:f,y2:D,offset:c}=A;return Y[H.Simple].generatePath(j,f,I,D,{offset:c})}return(M=(b=Y[p])==null?void 0:b.generatePath(h.x,n.x,h.y,n.y,x))!=null?M:"M ".concat(h.x," ").concat(h.y," L ").concat(n.x," ").concat(n.y)});let d="".concat(u[0]," ");for(let i=1;i[...t.nodeEntries()].map(e=>e.node.startsWith("stn")?{id:e.node,type:"station",station:e.attributes}:{id:e.node,type:"misc-node",miscNode:e.attributes}),Ht=t=>{const e={},u=[],d={},i=[];for(const n of t.edgeEntries()){const[p,r,x,A]=[n.sourceAttributes.x,n.sourceAttributes.y,n.targetAttributes.x,n.targetAttributes.y],v=Mt(n.attributes.type,p,r,x,A,n.attributes[n.attributes.type],n.attributes.parallelIndex);if(!v){if(n.attributes.parallelIndex>=0){u.push(n);continue}}if(n.attributes.reconcileId!==""){const b=n.attributes.reconcileId;b in d?d[b].push(n):d[b]=[n];continue}if(v){const b=n.edge,M=n.attributes,{x1:j,y1:I,x2:f,y2:D,offset:c}=v;e[b]={id:b,attr:M,path:Y[H.Simple].generatePath(j,f,I,D,{offset:c})};continue}i.push(n)}const o=new Set;for(;u.length;){const n=u.pop();if(o.has(n.edge))continue;const{normal:p,parallel:r}=Nt(t,n);if(!r.length)continue;r.forEach(A=>o.add(A.edge)),i.push(...p);const x=_t(r);for(const A of r){const v=A.edge;e[v]={id:A.edge,attr:A.attributes,path:x[v]}}}const{allReconciledLines:a,danglingLines:h}=Qt(t,d);for(const n of a){const p=qt(t,n);if(!p)continue;const r=n[0];e[r]={id:r,attr:t.getEdgeAttributes(r),path:p}}for(const n of h){const p=t.getEdgeAttributes(n),[r,x]=t.extremities(n),A=t.getNodeAttributes(r),v=t.getNodeAttributes(x);e[n]={id:n,attr:p,path:Y[H.Simple].generatePath(A.x,v.x,A.y,v.y,Y[H.Simple].defaultAttrs)}}for(const n of i){const p=n.edge,r=n.attributes.type,x=n.attributes,[A,v,b,M]=[n.sourceAttributes.x,n.sourceAttributes.y,n.targetAttributes.x,n.targetAttributes.y];if(!(r in Y)){e[p]={id:p,attr:x,path:"M ".concat(A," ").concat(v," L ").concat(b," ").concat(M)};continue}e[p]={id:p,attr:x,path:Y[r].generatePath(A,b,v,M,x[r])}}return Object.values(e).map(n=>({id:n.id,type:"line",line:n}))},kt=t=>{const{id:e,x:u,y:d,handlePointerDown:i,handlePointerMove:o,handlePointerUp:a}=t,h=_.useCallback(r=>i(e,r),[e,i]),n=_.useCallback(r=>o(e,r),[e,o]),p=_.useCallback(r=>a(e,r),[e,a]);return E.jsx("g",{id:e,transform:"translate(".concat(u-6.4," ").concat(d-6.4,")scale(0.025)"),onPointerDown:h,onPointerMove:n,onPointerUp:p,style:{cursor:"move"},children:E.jsx("path",{id:"stn_core_".concat(e),fillRule:"evenodd",clipRule:"evenodd",d:"M256 0c70.69 0 134.7 28.66 181.02 74.98C483.34 121.31 512 185.31 512 256c0 70.69-28.66 134.7-74.98 181.02C390.7 483.34 326.69 512 256 512c-70.69 0-134.69-28.66-181.02-74.98C28.66 390.7 0 326.69 0 256c0-70.69 28.66-134.69 74.98-181.02C121.31 28.66 185.31 0 256 0zm-21.91 302.69v-2.07c.16-13.72 1.51-24.59 4.15-32.67 2.59-8.08 6.32-14.65 11.18-19.63 4.87-5.02 10.72-9.58 17.56-13.72 4.4-2.8 8.39-5.9 11.91-9.37 3.52-3.42 6.32-7.41 8.38-11.91 2.07-4.46 3.11-9.42 3.11-14.91 0-6.53-1.55-12.18-4.66-16.99-3.05-4.77-7.19-8.44-12.27-11.08-5.13-2.59-10.82-3.89-17.09-3.89-5.65 0-11.03 1.15-16.21 3.53-5.12 2.33-9.42 6-12.79 10.97-3.36 4.98-5.33 11.35-5.85 19.11h-33.56c.53-13.21 3.89-24.39 10.05-33.55 6.21-9.16 14.4-16.11 24.55-20.82 10.2-4.71 21.49-7.04 33.81-7.04 13.57 0 25.38 2.48 35.52 7.56 10.15 5.02 18.08 12.06 23.72 21.08 5.59 9 8.44 19.47 8.44 31.48 0 8.23-1.29 15.64-3.88 22.21-2.59 6.58-6.22 12.48-10.98 17.61-4.77 5.18-10.41 9.73-17.03 13.67-6.27 3.94-11.35 7.97-15.18 12.17-3.88 4.19-6.68 9.17-8.44 14.86-1.76 5.74-2.75 12.84-2.9 21.33v2.07h-31.54zm16.68 70.67c-6.06 0-11.24-2.18-15.59-6.48-4.34-4.29-6.47-9.53-6.47-15.63 0-6.01 2.12-11.19 6.47-15.49 4.35-4.3 9.53-6.47 15.59-6.47 5.95 0 11.12 2.19 15.48 6.47 4.39 4.31 6.58 9.48 6.58 15.49 0 4.04-1.05 7.76-3.06 11.08-2.02 3.35-4.66 6.07-7.97 8.03-3.31 1.96-6.99 3-11.03 3z"})})},Jt=t=>{const{id:e,path:u,handlePointerDown:d}=t,i=_.useCallback(o=>d(e,o),[e,d]);return E.jsx("path",{id:e,d:u,fill:"none",stroke:"grey",strokeWidth:"5",strokeLinecap:"round",cursor:"pointer",onPointerDown:i})},te=_.memo(t=>{var n,p,r,x,A,v,b,M,j,I,f,D;const{elements:e,handlePointerDown:u,handlePointerMove:d,handlePointerUp:i,handleEdgePointerDown:o}=t,a=Object.fromEntries(Array.from({length:21},(c,l)=>[l-10,{pre:[],main:[],post:[]}]));for(const c of e)if(c.type==="line"){const l=c.line.attr.type,w=c.line.attr.style,k=c.line.attr[w],m=(n=vt[w])==null?void 0:n.preComponent;m&&a[c.line.attr.zIndex].pre.push(E.jsx(m,{id:c.id,type:l,path:c.line.path,styleAttrs:k,newLine:!1,handlePointerDown:o},"".concat(c.id,".pre")));const S=(r=(p=vt[w])==null?void 0:p.component)!=null?r:Jt;a[c.line.attr.zIndex].main.push(E.jsx(S,{id:c.id,type:l,path:c.line.path,styleAttrs:k,newLine:!1,handlePointerDown:o},c.id));const L=(x=vt[w])==null?void 0:x.postComponent;L&&a[c.line.attr.zIndex].post.push(E.jsx(L,{id:c.id,type:l,path:c.line.path,styleAttrs:k,newLine:!1,handlePointerDown:o},"".concat(c.id,".post")))}else if(c.type==="station"){const l=c.station,w=l.type,k=(A=ft[w])==null?void 0:A.preComponent;k&&a[c.station.zIndex].pre.push(E.jsx(k,{id:c.id,x:l.x,y:l.y,attrs:l,handlePointerDown:u,handlePointerMove:d,handlePointerUp:i},"".concat(c.id,".pre")));const m=(b=(v=ft[w])==null?void 0:v.component)!=null?b:kt;a[c.station.zIndex].main.push(E.jsx(m,{id:c.id,x:l.x,y:l.y,attrs:l,handlePointerDown:u,handlePointerMove:d,handlePointerUp:i},c.id));const S=(M=ft[w])==null?void 0:M.postComponent;S&&a[c.station.zIndex].post.push(E.jsx(S,{id:c.id,x:l.x,y:l.y,attrs:l,handlePointerDown:u,handlePointerMove:d,handlePointerUp:i},"".concat(c.id,".post")))}else if(c.type==="misc-node"){const l=c.miscNode,w=l.type,k=(j=yt[w])==null?void 0:j.preComponent;k&&a[c.miscNode.zIndex].pre.push(E.jsx(k,{id:c.id,x:l.x,y:l.y,attrs:l[w],handlePointerDown:u,handlePointerMove:d,handlePointerUp:i},"".concat(c.id,".pre")));const m=(f=(I=yt[w])==null?void 0:I.component)!=null?f:kt;a[c.miscNode.zIndex].main.push(E.jsx(m,{id:c.id,x:l.x,y:l.y,attrs:l[w],handlePointerDown:u,handlePointerMove:d,handlePointerUp:i},c.id));const S=(D=yt[w])==null?void 0:D.postComponent;S&&a[c.miscNode.zIndex].post.push(E.jsx(S,{id:c.id,x:l.x,y:l.y,attrs:l[w],handlePointerDown:u,handlePointerMove:d,handlePointerUp:i},"".concat(c.id,".post")))}return Array.from({length:21},(c,l)=>(l-10).toString()).map(c=>[...a[c].pre,...a[c].main,...a[c].post]).flat()},(t,e)=>t.elements===e.elements),ee=()=>{const t=Ct(),e=_.useRef(window.graph),u=()=>{t(lt()),t(it()),t(gt(e.current.export()))},{telemetry:{project:d},preference:{autoParallel:i}}=et(m=>m.app),{svgViewBoxZoom:o,svgViewBoxMin:a}=et(m=>m.param),{selected:h,refresh:{nodes:n,edges:p},mode:r,active:x,keepLastPath:A,theme:v}=et(m=>m.runtime),[b,M]=_.useState({x:0,y:0}),[j,I]=_.useState({x:0,y:0}),f=B((m,S)=>{S.stopPropagation(),r==="select"&&t(Q("free"));const L=S.currentTarget,{x:$,y:z}=G(S);L.setPointerCapture(S.pointerId),M({x:$,y:z}),t(at(m)),S.shiftKey?h.has(m)?t(bt(m)):t(St(m)):h.has(m)||t(ot(new Set([m])))}),D=B((m,S)=>{const{x:L,y:$}=G(S);r==="free"&&x===m?(h.forEach(z=>{e.current.hasNode(z)&&e.current.updateNodeAttributes(z,O=>({...O,x:V(O.x-(b.x-L)*o/100,S.altKey?1:5),y:V(O.y-(b.y-$)*o/100,S.altKey?1:5)}))}),t(lt()),t(it())):r.startsWith("line")&&I({x:(b.x-L)*o/100,y:(b.y-$)*o/100})}),c=B((m,S)=>{if(r.startsWith("line")){A||t(Q("free"));const L=[...Object.values(It),At.Virtual,At.Master],$=e.current.hasNode(x)&&L.includes(e.current.getNodeAttribute(x,"type"));["stn_core_","virtual_circle_"].forEach(O=>{var st,R;const W=(R=(st=document.elementsFromPoint(S.clientX,S.clientY)[0].attributes)==null?void 0:st.getNamedItem("id"))==null?void 0:R.value,ct=W==null?void 0:W.startsWith(O);if($&&ct){const K=r.slice(5),nt="line_".concat(rt(10)),[F,U]=[x,W.slice(O.length)],X=i?jt(e.current,K,F,U,"from"):-1;e.current.addDirectedEdgeWithKey(nt,F,U,{visible:!0,zIndex:0,type:K,[K]:structuredClone(Y[K].defaultAttrs),style:Pt.SingleColor,[Pt.SingleColor]:{color:v},reconcileId:"",parallelIndex:X}),d&&dt.event(ut.ADD_LINE,{type:K})}}),t(it()),t(gt(e.current.export()))}else if(r==="free"&&x){const{x:L,y:$}=G(S);b.x-L===0&&b.y-$===0||t(gt(e.current.export()))}t(at(void 0))}),l=B((m,S)=>{if(S.stopPropagation(),S.shiftKey||t(xt()),S.shiftKey&&h.has(m)?t(bt(m)):t(St(m)),r.startsWith("station")||r.startsWith("misc-node-virtual")||r.startsWith("misc-node-master")){const L=S.clientX-document.getElementById("canvas").getBoundingClientRect().left,$=S.clientY-document.getElementById("canvas").getBoundingClientRect().top,z=r.startsWith("station"),O=rt(10),J=z?"stn_".concat(O):"misc_node_".concat(O),W=z?r.slice(8):r.slice(10),{x:ct,y:st}=Z(L,$,o,a),R=z?structuredClone(ft[W].defaultAttrs):structuredClone(yt[W].defaultAttrs);"color"in R&&(R.color=v),e.current.addNode(J,{visible:!0,zIndex:0,x:V(ct,5),y:V(st,5),type:W,[W]:R});const K=e.current.getEdgeAttributes(m),{zIndex:nt,type:F,style:U}=K,X=K[F],ht=K[U],[s,y]=e.current.extremities(m),g=i?0:-1;e.current.addDirectedEdgeWithKey("line_".concat(rt(10)),s,J,{visible:!0,zIndex:nt,type:F,[F]:structuredClone(X),style:U,[U]:structuredClone(ht),reconcileId:"",parallelIndex:g}),e.current.addDirectedEdgeWithKey("line_".concat(rt(10)),J,y,{visible:!0,zIndex:nt,type:F,[F]:structuredClone(X),style:U,[U]:structuredClone(ht),reconcileId:"",parallelIndex:g}),e.current.dropEdge(m),u(),d&&(dt.event(ut.ADD_STATION,{type:W}),dt.event(ut.ADD_LINE,{type:F})),t(Q("free")),t(ot(new Set([J])))}}),w=_.useMemo(()=>[...Ht(e.current),...Gt(e.current)],[p,n]),k=Lt.component;return E.jsxs(E.Fragment,{children:[E.jsx(te,{elements:w,handlePointerDown:f,handlePointerMove:D,handlePointerUp:c,handleEdgePointerDown:l}),r.startsWith("line")&&x&&x!=="background"&&E.jsx(k,{id:"line_create_in_progress___no_use",type:r.slice(5),path:Y[r.slice(5)].generatePath(e.current.getNodeAttribute(x,"x"),e.current.getNodeAttribute(x,"x")-j.x,e.current.getNodeAttribute(x,"y"),e.current.getNodeAttribute(x,"y")-j.y,Y[r.slice(5)].defaultAttrs),styleAttrs:{color:v},newLine:!0,handlePointerDown:()=>{}})]})},ae=()=>{const t=Ct(),e=_.useRef(window.graph),u=()=>{t(lt()),t(it()),t(gt(e.current.export()))},{activeSubscriptions:d}=et(s=>s.account),{telemetry:{project:i}}=et(s=>s.app),{svgViewBoxZoom:o,svgViewBoxMin:a}=et(s=>s.param),{mode:h,lastTool:n,active:p,selected:r,keepLastPath:x,theme:A,refresh:{nodes:v},masterNodesCount:b,parallelLinesCount:M}=et(s=>s.runtime),j=Ft(),{height:I,width:f}=Tt(j),D=!d.RMP_CLOUD&&b+1>$t,c=!d.RMP_CLOUD&&M+1>Kt;_.useEffect(()=>{const s=Xt(e.current);Object.entries(s).filter(([y,g])=>g&&y in Yt).forEach(([y])=>Ut(y))},[v]);const[l,w]=_.useState({x:0,y:0}),[k,m]=_.useState({x:0,y:0}),[S,L]=_.useState({x:0,y:0}),[$,z]=_.useState({x:0,y:0}),O=B(s=>{const{x:y,y:g}=G(s);if(h.startsWith("station")){t(Q("free"));const N=rt(10),C="stn_".concat(N),P=h.slice(8),T=structuredClone(ft[P].defaultAttrs);"color"in T&&(T.color=A);const{x:q,y:mt}=Z(y,g,o,a);e.current.addNode(C,{visible:!0,zIndex:0,x:V(q,5),y:V(mt,5),type:P,[P]:T}),u(),i&&dt.event(ut.ADD_STATION,{type:P}),t(ot(new Set([C])))}else if(h.startsWith("misc-node")){t(Q("free"));const N=rt(10),C="misc_node_".concat(N),P=h.slice(10),{x:T,y:q}=Z(y,g,o,a);e.current.addNode(C,{visible:!0,zIndex:0,x:V(T,5),y:V(q,5),type:P,[P]:structuredClone(yt[P].defaultAttrs)}),u(),i&&dt.event(ut.ADD_STATION,{type:P}),t(ot(new Set([C])))}else h==="free"||h.startsWith("line")?(h.startsWith("line")&&(t(Q("free")),x&&t(Wt(!1))),L({x:y,y:g}),z(a),s.shiftKey||(t(at("background")),t(xt()))):h==="select"&&(w(Z(y,g,o,a)),m(Z(y,g,o,a)))}),J=B(s=>{if(h==="select"){if(l.x!=0&&l.y!=0){const{x:y,y:g}=G(s);m(Z(y,g,o,a))}}else if(p==="background"){const{x:y,y:g}=G(s);t(pt({x:$.x+(S.x-y)*o/100,y:$.y+(S.y-g)*o/100}))}}),W=B(s=>{if(h==="select"){const{x:y,y:g}=G(s),{x:N,y:C}=Z(y,g,o,a),P=Vt(e.current,l.x,l.y,N,C),T=Zt(e.current,new Set(P));t(ot(new Set([...s.shiftKey?r:[],...P,...T]))),t(Q("free")),w({x:0,y:0}),m({x:0,y:0})}p==="background"&&!s.shiftKey&&t(at(void 0))}),ct=B(s=>{let y=o;s.deltaY>0&&o+10<400?y=o+10:s.deltaY<0&&o-10>0&&(y=o-10),t(wt(y));const{x:g,y:N}=G(s),C=s.currentTarget.getBoundingClientRect(),[P,T]=[g/C.width,N/C.height];t(pt({x:a.x+g*o/100-f*y/100*P,y:a.y+N*o/100-I*y/100*T}))}),st=B(async s=>{if(tt?s.key==="Backspace":s.key==="Delete")r.size>0&&(r.forEach(y=>{e.current.hasNode(y)?e.current.dropNode(y):e.current.hasEdge(y)&&e.current.dropEdge(y)}),t(xt()),u());else if(s.key.startsWith("Arrow")){const g=s.key.endsWith("Left")?-1:s.key.endsWith("Right")?1:0,N=s.key.endsWith("Up")?-1:s.key.endsWith("Down")?1:0;t(pt(Z(100*g,100*N,o,a)))}else if(s.key==="i"||s.key==="j"||s.key==="k"||s.key==="l"){const g=(s.key==="j"?-1:s.key==="l"?1:0)*10,N=(s.key==="i"?-1:s.key==="k"?1:0)*10;r.size>0&&r.forEach(C=>{e.current.hasNode(C)&&(e.current.updateNodeAttribute(C,"x",P=>(P!=null?P:0)+g),e.current.updateNodeAttribute(C,"y",P=>(P!=null?P:0)+N),u())})}else if(s.key==="f"&&n)t(Q(n));else if(s.key==="z"&&(tt?s.metaKey&&!s.shiftKey:s.ctrlKey))tt&&s.preventDefault(),t(Bt()),t(lt()),t(it());else if(s.key==="s")t(Q("select"));else if((s.key==="c"||s.key==="x")&&(tt?s.metaKey&&!s.shiftKey:s.ctrlKey)){const y=Ot(e.current,r);navigator.clipboard.writeText(y),s.key==="x"&&(t(xt()),r.forEach(g=>{e.current.hasNode(g)?e.current.dropNode(g):e.current.hasEdge(g)&&e.current.dropEdge(g)}),u())}else if(s.key==="v"&&(tt?s.metaKey&&!s.shiftKey:s.ctrlKey)){const y=await navigator.clipboard.readText(),{x:g,y:N}=Z(f/2,I/2,o,a),{nodes:C,edges:P}=Rt(y,e.current,D,c,V(g,5),V(N,5));u();const T=structuredClone(C);P.forEach(q=>T.add(q)),t(ot(T))}else(tt&&s.key==="z"&&s.metaKey&&s.shiftKey||!tt&&s.key==="y"&&s.ctrlKey)&&(t(zt()),t(lt()),t(it()))}),[R,K]=_.useState(0),nt=B(s=>{if(s.touches.length===2){t(at(void 0));const[y,g]=[s.touches[0].clientX-s.touches[1].clientX,s.touches[0].clientY-s.touches[1].clientY];K(y*y+g*g)}}),F=B(s=>{if(R!==0&&s.touches.length===2){const[y,g]=[s.touches[0].clientX-s.touches[1].clientX,s.touches[0].clientY-s.touches[1].clientY],N=y*y+g*g;let C=o;N-R<0&&o+10<=390?C=o+10:N-R>0&&o-10>=10&&(C=o-10),t(wt(C)),K(N);const P=s.currentTarget.getBoundingClientRect(),[T,q]=[(s.touches[0].clientX+s.touches[1].clientX)/2-P.left,(s.touches[0].clientY+s.touches[1].clientY)/2-P.top],[mt,Dt]=[T/P.width,q/P.height];t(pt({x:a.x+T*o/100-f*C/100*mt,y:a.y+q*o/100-I*C/100*Dt}))}}),U=B(s=>{R!==0&&K(0)}),[X,ht]=_.useState({sx:0,sy:0,ex:0,ey:0});return _.useEffect(()=>{ht({sx:l.x<=k.x?l.x:k.x,ex:l.x>k.x?l.x:k.x,sy:l.y<=k.y?l.y:k.y,ey:l.y>k.y?l.y:k.y})},[k.x,k.y]),E.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",id:"canvas",style:{position:"fixed",top:40,left:40,userSelect:"none",touchAction:"none"},height:I,width:f,viewBox:"".concat(a.x," ").concat(a.y," ").concat(f*o/100," ").concat(I*o/100),onPointerDown:O,onPointerMove:J,onPointerUp:W,onTouchStart:nt,onTouchMove:F,onTouchEnd:U,onWheel:ct,tabIndex:0,onKeyDown:st,children:[E.jsx(ee,{}),h==="select"&&l.x!=0&&l.y!=0&&E.jsx("rect",{x:X.sx,y:X.sy,width:X.ex-X.sx,height:X.ey-X.sy,rx:"2",stroke:"#b5b5b6",strokeWidth:"2",strokeOpacity:"0.4",fill:"#b5b5b6",opacity:"0.75"}),E.jsx("defs",{children:E.jsxs("pattern",{id:"opaque",width:"5",height:"5",patternUnits:"userSpaceOnUse",children:[E.jsx("rect",{x:"0",y:"0",width:"2.5",height:"2.5",fill:"black",fillOpacity:"50%"}),E.jsx("rect",{x:"2.5",y:"2.5",width:"2.5",height:"2.5",fill:"black",fillOpacity:"50%"})]})})]})};export{ae as default}; diff --git a/assets/svg-wrapper-legacy-BY1AcpM1.js b/assets/svg-wrapper-legacy-CKReUCee.js similarity index 98% rename from assets/svg-wrapper-legacy-BY1AcpM1.js rename to assets/svg-wrapper-legacy-CKReUCee.js index 907ba3286..3a64cc3c3 100644 --- a/assets/svg-wrapper-legacy-BY1AcpM1.js +++ b/assets/svg-wrapper-legacy-CKReUCee.js @@ -1 +1 @@ -System.register(["./chakra-legacy--ElhKRU8.js","./index-legacy-iSkJTZGA.js","./react-legacy-CB7hQk4J.js","./clipboard-legacy-D46oyBay.js","./master-manager-legacy-BrdnNHXw.js","./misc-nodes-legacy-CSfzn9IA.js"],(function(e,t){"use strict";var n,r,o,s,i,a,l,d,c,u,y,h,p,f,x,g,m,v,b,P,w,A,k,E,D,I,N,j,S,C,M,_,$,z,K,T,W,L,R,U,O,B,F,Y,X,V,Q,q,Z;return{setters:[e=>{n=e.j},e=>{r=e.k,o=e.l,s=e.an,i=e.ao,a=e.ap,l=e.c,d=e.d,c=e.aq,u=e.ar,y=e.as,h=e.T,p=e.at,f=e.au,x=e.av,g=e.q,m=e.t,v=e.S,b=e.aw,P=e.n,w=e.m,A=e.o,k=e.r,E=e.E,D=e.v,I=e.y,N=e.U,j=e.ax,S=e.p,C=e.ay,M=e.a0,_=e.a1,$=e.A,z=e.z,K=e.a8,T=e.ak,W=e.al},e=>{L=e.b},e=>{R=e.u,U=e.e,O=e.i},e=>{B=e.s,F=e.u,Y=e.f,X=e.F,V=e.l,Q=e.b,q=e.c},e=>{Z=e.m}],execute:function(){const t=(e,t,n,r,o,s,i)=>{if(!("offsetFrom"in s)||!("offsetTo"in s))return;if(Number.isNaN(s.offsetFrom)||Number.isNaN(s.offsetTo))return;if(s.offsetFrom===s.offsetTo)return G(e,t,n,r,o)?i<0?{x1:t,y1:n,x2:r,y2:o,offset:s.offsetFrom}:t===r?{x1:t+5*i,y1:n,x2:r+5*i,y2:o,offset:s.offsetFrom}:n===o?{x1:t,y1:n+5*i,x2:r,y2:o+5*i,offset:s.offsetFrom}:{x1:t+5*Math.SQRT1_2*i,y1:n+5*Math.SQRT1_2*i,x2:r+5*Math.SQRT1_2*i,y2:o+5*Math.SQRT1_2*i,offset:s.offsetFrom}:void 0;const[a,l]=[s.offsetFrom,s.offsetTo];for(let d=0;d!(t!==o&&n!==s||![r.Diagonal,r.Perpendicular].includes(e))||!(1!==Math.abs((s-n)/(o-t))||![r.Diagonal,r.RotatePerpendicular].includes(e)),H=(e,n)=>{if(!n.every((t=>e.hasEdge(t))))return;const s=n.map((n=>{var s,i,a;const[l,d]=e.extremities(n),c=e.getNodeAttributes(l),u=e.getNodeAttributes(d),{type:y,parallelIndex:h}=e.getEdgeAttributes(n),p=null!==(s=e.getEdgeAttribute(n,y))&&void 0!==s?s:o[y].defaultAttrs,f=t(y,c.x,c.y,u.x,u.y,p,h);if(f){const{x1:e,y1:t,x2:n,y2:s,offset:i}=f;return o[r.Simple].generatePath(e,n,t,s,{offset:i})}return null!==(i=null===(a=o[y])||void 0===a?void 0:a.generatePath(c.x,u.x,c.y,u.y,p))&&void 0!==i?i:`M ${c.x} ${c.y} L ${u.x} ${u.y}`}));let i=`${s[0]} `;for(let t=1;t[...e.nodeEntries()].map((e=>e.node.startsWith("stn")?{id:e.node,type:"station",station:e.attributes}:{id:e.node,type:"misc-node",miscNode:e.attributes})),ee=e=>{const n={},a=[],l={},d=[];for(const s of e.edgeEntries()){const[e,i,c,u]=[s.sourceAttributes.x,s.sourceAttributes.y,s.targetAttributes.x,s.targetAttributes.y],y=t(s.attributes.type,e,i,c,u,s.attributes[s.attributes.type],s.attributes.parallelIndex);if(y);else if(s.attributes.parallelIndex>=0){a.push(s);continue}if(""===s.attributes.reconcileId)if(y){const e=s.edge,t=s.attributes,{x1:i,y1:a,x2:l,y2:d,offset:c}=y;n[e]={id:e,attr:t,path:o[r.Simple].generatePath(i,l,a,d,{offset:c})}}else d.push(s);else{const e=s.attributes.reconcileId;e in l?l[e].push(s):l[e]=[s]}}const c=new Set;for(;a.length;){const t=a.pop();if(c.has(t.edge))continue;const{normal:r,parallel:o}=s(e,t);if(!o.length)continue;o.forEach((e=>c.add(e.edge))),d.push(...r);const l=i(o);for(const e of o){const t=e.edge;n[t]={id:e.edge,attr:e.attributes,path:l[t]}}}const{allReconciledLines:u,danglingLines:y}=((e,t)=>{const n=[],r=[];return Object.values(t).forEach((t=>{if(1===t.length)return void r.push(...t.map((e=>e.edge)));const o=e.getEdgeAttribute(t.at(0),"type");if(!t.every((t=>e.getEdgeAttribute(t,"type")===o)))return void r.push(...t.map((e=>e.edge)));const s=e.getEdgeAttribute(t.at(0),"style");if(!t.every((t=>e.getEdgeAttribute(t,"style")===s)))return void r.push(...t.map((e=>e.edge)));const i={},a=new Set,l=new Set,d=Object.fromEntries(t.map((t=>{var n,r;const[o,s]=e.extremities(t);return i[o]=(null!==(n=i[o])&&void 0!==n?n:0)+1,i[s]=(null!==(r=i[s])&&void 0!==r?r:0)+1,a.add(o),l.add(s),[o,[t.edge,s]]}))),c=Array.from(a).filter((e=>1===i[e])),u=Array.from(l).filter((e=>1===i[e]));if(1!==c.length||1!==u.length)return void r.push(...t.map((e=>e.edge)));const y=c[0],h=u[0];if(y===h)return void r.push(...t.map((e=>e.edge)));const p=[d[y][0]];let f=d[y][1];for(let e=1;ee.edge)));p.push(d[f][0]),f=e}f===h&&p.length===t.length?n.push(p):r.push(...t.map((e=>e.edge)))})),{allReconciledLines:n,danglingLines:r}})(e,l);for(const t of u){const r=H(e,t);if(!r)continue;const o=t[0];n[o]={id:o,attr:e.getEdgeAttributes(o),path:r}}for(const t of y){const s=e.getEdgeAttributes(t),[i,a]=e.extremities(t),l=e.getNodeAttributes(i),d=e.getNodeAttributes(a);n[t]={id:t,attr:s,path:o[r.Simple].generatePath(l.x,d.x,l.y,d.y,o[r.Simple].defaultAttrs)}}for(const t of d){const e=t.edge,r=t.attributes.type,s=t.attributes,[i,a,l,d]=[t.sourceAttributes.x,t.sourceAttributes.y,t.targetAttributes.x,t.targetAttributes.y];n[e]=r in o?{id:e,attr:s,path:o[r].generatePath(i,l,a,d,s[r])}:{id:e,attr:s,path:`M ${i} ${a} L ${l} ${d}`}}return Object.values(n).map((e=>({id:e.id,type:"line",line:e})))},te=e=>{const{id:t,x:r,y:o,handlePointerDown:s,handlePointerMove:i,handlePointerUp:a}=e,l=L.useCallback((e=>s(t,e)),[t,s]),d=L.useCallback((e=>i(t,e)),[t,i]),c=L.useCallback((e=>a(t,e)),[t,a]);return n.jsx("g",{id:t,transform:`translate(${r-6.4} ${o-6.4})scale(0.025)`,onPointerDown:l,onPointerMove:d,onPointerUp:c,style:{cursor:"move"},children:n.jsx("path",{id:`stn_core_${t}`,fillRule:"evenodd",clipRule:"evenodd",d:"M256 0c70.69 0 134.7 28.66 181.02 74.98C483.34 121.31 512 185.31 512 256c0 70.69-28.66 134.7-74.98 181.02C390.7 483.34 326.69 512 256 512c-70.69 0-134.69-28.66-181.02-74.98C28.66 390.7 0 326.69 0 256c0-70.69 28.66-134.69 74.98-181.02C121.31 28.66 185.31 0 256 0zm-21.91 302.69v-2.07c.16-13.72 1.51-24.59 4.15-32.67 2.59-8.08 6.32-14.65 11.18-19.63 4.87-5.02 10.72-9.58 17.56-13.72 4.4-2.8 8.39-5.9 11.91-9.37 3.52-3.42 6.32-7.41 8.38-11.91 2.07-4.46 3.11-9.42 3.11-14.91 0-6.53-1.55-12.18-4.66-16.99-3.05-4.77-7.19-8.44-12.27-11.08-5.13-2.59-10.82-3.89-17.09-3.89-5.65 0-11.03 1.15-16.21 3.53-5.12 2.33-9.42 6-12.79 10.97-3.36 4.98-5.33 11.35-5.85 19.11h-33.56c.53-13.21 3.89-24.39 10.05-33.55 6.21-9.16 14.4-16.11 24.55-20.82 10.2-4.71 21.49-7.04 33.81-7.04 13.57 0 25.38 2.48 35.52 7.56 10.15 5.02 18.08 12.06 23.72 21.08 5.59 9 8.44 19.47 8.44 31.48 0 8.23-1.29 15.64-3.88 22.21-2.59 6.58-6.22 12.48-10.98 17.61-4.77 5.18-10.41 9.73-17.03 13.67-6.27 3.94-11.35 7.97-15.18 12.17-3.88 4.19-6.68 9.17-8.44 14.86-1.76 5.74-2.75 12.84-2.9 21.33v2.07h-31.54zm16.68 70.67c-6.06 0-11.24-2.18-15.59-6.48-4.34-4.29-6.47-9.53-6.47-15.63 0-6.01 2.12-11.19 6.47-15.49 4.35-4.3 9.53-6.47 15.59-6.47 5.95 0 11.12 2.19 15.48 6.47 4.39 4.31 6.58 9.48 6.58 15.49 0 4.04-1.05 7.76-3.06 11.08-2.02 3.35-4.66 6.07-7.97 8.03-3.31 1.96-6.99 3-11.03 3z"})})},ne=e=>{const{id:t,path:r,handlePointerDown:o}=e,s=L.useCallback((e=>o(t,e)),[t,o]);return n.jsx("path",{id:t,d:r,fill:"none",stroke:"grey",strokeWidth:"5",strokeLinecap:"round",cursor:"pointer",onPointerDown:s})},re=L.memo((e=>{const{elements:t,handlePointerDown:r,handlePointerMove:o,handlePointerUp:s,handleEdgePointerDown:i}=e,l=Object.fromEntries(Array.from({length:21},((e,t)=>[t-10,{pre:[],main:[],post:[]}])));for(const P of t)if("line"===P.type){var d,c,u,y;const e=P.line.attr.type,t=P.line.attr.style,r=P.line.attr[t],o=null===(d=a[t])||void 0===d?void 0:d.preComponent;o&&l[P.line.attr.zIndex].pre.push(n.jsx(o,{id:P.id,type:e,path:P.line.path,styleAttrs:r,newLine:!1,handlePointerDown:i},`${P.id}.pre`));const s=null!==(c=null===(u=a[t])||void 0===u?void 0:u.component)&&void 0!==c?c:ne;l[P.line.attr.zIndex].main.push(n.jsx(s,{id:P.id,type:e,path:P.line.path,styleAttrs:r,newLine:!1,handlePointerDown:i},P.id));const h=null===(y=a[t])||void 0===y?void 0:y.postComponent;h&&l[P.line.attr.zIndex].post.push(n.jsx(h,{id:P.id,type:e,path:P.line.path,styleAttrs:r,newLine:!1,handlePointerDown:i},`${P.id}.post`))}else if("station"===P.type){var h,p,f,x;const e=P.station,t=e.type,i=null===(h=B[t])||void 0===h?void 0:h.preComponent;i&&l[P.station.zIndex].pre.push(n.jsx(i,{id:P.id,x:e.x,y:e.y,attrs:e,handlePointerDown:r,handlePointerMove:o,handlePointerUp:s},`${P.id}.pre`));const a=null!==(p=null===(f=B[t])||void 0===f?void 0:f.component)&&void 0!==p?p:te;l[P.station.zIndex].main.push(n.jsx(a,{id:P.id,x:e.x,y:e.y,attrs:e,handlePointerDown:r,handlePointerMove:o,handlePointerUp:s},P.id));const d=null===(x=B[t])||void 0===x?void 0:x.postComponent;d&&l[P.station.zIndex].post.push(n.jsx(d,{id:P.id,x:e.x,y:e.y,attrs:e,handlePointerDown:r,handlePointerMove:o,handlePointerUp:s},`${P.id}.post`))}else if("misc-node"===P.type){var g,m,v,b;const e=P.miscNode,t=e.type,i=null===(g=Z[t])||void 0===g?void 0:g.preComponent;i&&l[P.miscNode.zIndex].pre.push(n.jsx(i,{id:P.id,x:e.x,y:e.y,attrs:e[t],handlePointerDown:r,handlePointerMove:o,handlePointerUp:s},`${P.id}.pre`));const a=null!==(m=null===(v=Z[t])||void 0===v?void 0:v.component)&&void 0!==m?m:te;l[P.miscNode.zIndex].main.push(n.jsx(a,{id:P.id,x:e.x,y:e.y,attrs:e[t],handlePointerDown:r,handlePointerMove:o,handlePointerUp:s},P.id));const d=null===(b=Z[t])||void 0===b?void 0:b.postComponent;d&&l[P.miscNode.zIndex].post.push(n.jsx(d,{id:P.id,x:e.x,y:e.y,attrs:e[t],handlePointerDown:r,handlePointerMove:o,handlePointerUp:s},`${P.id}.post`))}return Array.from({length:21},((e,t)=>(t-10).toString())).map((e=>[...l[e].pre,...l[e].main,...l[e].post])).flat()}),((e,t)=>e.elements===t.elements)),oe=()=>{const e=l(),t=L.useRef(window.graph),{telemetry:{project:r},preference:{autoParallel:s}}=d((e=>e.app)),{svgViewBoxZoom:i,svgViewBoxMin:a}=d((e=>e.param)),{selected:S,refresh:{nodes:C,edges:M},mode:_,active:$,keepLastPath:z,theme:K}=d((e=>e.runtime)),[T,W]=L.useState({x:0,y:0}),[U,O]=L.useState({x:0,y:0}),F=R(((t,n)=>{n.stopPropagation(),"select"===_&&e(c("free"));const r=n.currentTarget,{x:o,y:s}=u(n);r.setPointerCapture(n.pointerId),W({x:o,y:s}),e(y(t)),n.shiftKey?S.has(t)?e(p(t)):e(f(t)):S.has(t)||e(h(new Set([t])))})),Y=R(((n,r)=>{const{x:o,y:s}=u(r);"free"===_&&$===n?(S.forEach((e=>{t.current.hasNode(e)&&t.current.updateNodeAttributes(e,(e=>({...e,x:x(e.x-(T.x-o)*i/100,r.altKey?1:5),y:x(e.y-(T.y-s)*i/100,r.altKey?1:5)})))})),e(g()),e(m())):_.startsWith("line")&&O({x:(T.x-o)*i/100,y:(T.y-s)*i/100})})),X=R(((n,i)=>{if(_.startsWith("line")){z||e(c("free"));const n=[...Object.values(v),b.Virtual,b.Master],a=t.current.hasNode($)&&n.includes(t.current.getNodeAttribute($,"type"));["stn_core_","virtual_circle_"].forEach((e=>{var n;const l=null===(n=document.elementsFromPoint(i.clientX,i.clientY)[0].attributes)||void 0===n||null===(n=n.getNamedItem("id"))||void 0===n?void 0:n.value,d=null==l?void 0:l.startsWith(e);if(a&&d){const n=_.slice(5),i=`line_${P(10)}`,[a,d]=[$,l.slice(e.length)],c=s?w(t.current,n,a,d,"from"):-1;t.current.addDirectedEdgeWithKey(i,a,d,{visible:!0,zIndex:0,type:n,[n]:structuredClone(o[n].defaultAttrs),style:A.SingleColor,[A.SingleColor]:{color:K},reconcileId:"",parallelIndex:c}),r&&k.event(E.ADD_LINE,{type:n})}})),e(m()),e(D(t.current.export()))}else if("free"===_&&$){const{x:n,y:r}=u(i);T.x-n==0&&T.y-r==0||e(D(t.current.export()))}e(y(void 0))})),V=R(((n,o)=>{if(o.stopPropagation(),o.shiftKey||e(I()),o.shiftKey&&S.has(n)?e(p(n)):e(f(n)),_.startsWith("station")||_.startsWith("misc-node-virtual")||_.startsWith("misc-node-master")){const l=o.clientX-document.getElementById("canvas").getBoundingClientRect().left,d=o.clientY-document.getElementById("canvas").getBoundingClientRect().top,u=_.startsWith("station"),y=P(10),p=u?`stn_${y}`:`misc_node_${y}`,f=u?_.slice(8):_.slice(10),{x:v,y:b}=N(l,d,i,a),w=u?structuredClone(B[f].defaultAttrs):structuredClone(Z[f].defaultAttrs);"color"in w&&(w.color=K),t.current.addNode(p,{visible:!0,zIndex:0,x:x(v,5),y:x(b,5),type:f,[f]:w});const A=t.current.getEdgeAttributes(n),{zIndex:I,type:j,style:S}=A,C=A[j],M=A[S],[$,z]=t.current.extremities(n),T=s?0:-1;t.current.addDirectedEdgeWithKey(`line_${P(10)}`,$,p,{visible:!0,zIndex:I,type:j,[j]:structuredClone(C),style:S,[S]:structuredClone(M),reconcileId:"",parallelIndex:T}),t.current.addDirectedEdgeWithKey(`line_${P(10)}`,p,z,{visible:!0,zIndex:I,type:j,[j]:structuredClone(C),style:S,[S]:structuredClone(M),reconcileId:"",parallelIndex:T}),t.current.dropEdge(n),e(g()),e(m()),e(D(t.current.export())),r&&(k.event(E.ADD_STATION,{type:f}),k.event(E.ADD_LINE,{type:j})),e(c("free")),e(h(new Set([p])))}})),Q=L.useMemo((()=>[...ee(t.current),...J(t.current)]),[M,C]),q=j.component;return n.jsxs(n.Fragment,{children:[n.jsx(re,{elements:Q,handlePointerDown:F,handlePointerMove:Y,handlePointerUp:X,handleEdgePointerDown:V}),_.startsWith("line")&&$&&"background"!==$&&n.jsx(q,{id:"line_create_in_progress___no_use",type:_.slice(5),path:o[_.slice(5)].generatePath(t.current.getNodeAttribute($,"x"),t.current.getNodeAttribute($,"x")-U.x,t.current.getNodeAttribute($,"y"),t.current.getNodeAttribute($,"y")-U.y,o[_.slice(5)].defaultAttrs),styleAttrs:{color:K},newLine:!0,handlePointerDown:()=>{}})]})};e("default",(()=>{const e=l(),t=L.useRef(window.graph),r=()=>{e(g()),e(m()),e(D(t.current.export()))},{activeSubscriptions:o}=d((e=>e.account)),{telemetry:{project:s}}=d((e=>e.app)),{svgViewBoxZoom:i,svgViewBoxMin:a}=d((e=>e.param)),{mode:p,lastTool:f,active:v,selected:b,keepLastPath:w,theme:A,refresh:{nodes:j},masterNodesCount:G,parallelLinesCount:H}=d((e=>e.runtime)),J=F(),{height:ee,width:te}=S(J),ne=!o.RMP_CLOUD&&G+1>C,re=!o.RMP_CLOUD&&H+1>M;L.useEffect((()=>{const e=Y(t.current);Object.entries(e).filter((([e,t])=>t&&e in X)).forEach((([e])=>V(e)))}),[j]);const[se,ie]=L.useState({x:0,y:0}),[ae,le]=L.useState({x:0,y:0}),[de,ce]=L.useState({x:0,y:0}),[ue,ye]=L.useState({x:0,y:0}),he=R((n=>{const{x:o,y:l}=u(n);if(p.startsWith("station")){e(c("free"));const n=`stn_${P(10)}`,d=p.slice(8),u=structuredClone(B[d].defaultAttrs);"color"in u&&(u.color=A);const{x:y,y:f}=N(o,l,i,a);t.current.addNode(n,{visible:!0,zIndex:0,x:x(y,5),y:x(f,5),type:d,[d]:u}),r(),s&&k.event(E.ADD_STATION,{type:d}),e(h(new Set([n])))}else if(p.startsWith("misc-node")){e(c("free"));const n=`misc_node_${P(10)}`,d=p.slice(10),{x:u,y:y}=N(o,l,i,a);t.current.addNode(n,{visible:!0,zIndex:0,x:x(u,5),y:x(y,5),type:d,[d]:structuredClone(Z[d].defaultAttrs)}),r(),s&&k.event(E.ADD_STATION,{type:d}),e(h(new Set([n])))}else"free"===p||p.startsWith("line")?(p.startsWith("line")&&(e(c("free")),w&&e(_(!1))),ce({x:o,y:l}),ye(a),n.shiftKey||(e(y("background")),e(I()))):"select"===p&&(ie(N(o,l,i,a)),le(N(o,l,i,a)))})),pe=R((t=>{if("select"===p){if(0!=se.x&&0!=se.y){const{x:e,y:n}=u(t);le(N(e,n,i,a))}}else if("background"===v){const{x:n,y:r}=u(t);e($({x:ue.x+(de.x-n)*i/100,y:ue.y+(de.y-r)*i/100}))}})),fe=R((n=>{if("select"===p){const{x:r,y:o}=u(n),{x:s,y:l}=N(r,o,i,a),d=Q(t.current,se.x,se.y,s,l),y=q(t.current,new Set(d));e(h(new Set([...n.shiftKey?b:[],...d,...y]))),e(c("free")),ie({x:0,y:0}),le({x:0,y:0})}"background"!==v||n.shiftKey||e(y(void 0))})),xe=R((t=>{let n=i;t.deltaY>0&&i+10<400?n=i+10:t.deltaY<0&&i-10>0&&(n=i-10),e(z(n));const{x:r,y:o}=u(t),s=t.currentTarget.getBoundingClientRect(),[l,d]=[r/s.width,o/s.height];e($({x:a.x+r*i/100-te*n/100*l,y:a.y+o*i/100-ee*n/100*d}))})),ge=R((async n=>{if(K?"Backspace"===n.key:"Delete"===n.key)b.size>0&&(b.forEach((e=>{t.current.hasNode(e)?t.current.dropNode(e):t.current.hasEdge(e)&&t.current.dropEdge(e)})),e(I()),r());else if(n.key.startsWith("Arrow")){const t=100,r=n.key.endsWith("Left")?-1:n.key.endsWith("Right")?1:0,o=n.key.endsWith("Up")?-1:n.key.endsWith("Down")?1:0;e($(N(t*r,t*o,i,a)))}else if("i"===n.key||"j"===n.key||"k"===n.key||"l"===n.key){const e=10,o=("j"===n.key?-1:"l"===n.key?1:0)*e,s=("i"===n.key?-1:"k"===n.key?1:0)*e;b.size>0&&b.forEach((e=>{t.current.hasNode(e)&&(t.current.updateNodeAttribute(e,"x",(e=>(null!=e?e:0)+o)),t.current.updateNodeAttribute(e,"y",(e=>(null!=e?e:0)+s)),r())}))}else if("f"===n.key&&f)e(c(f));else if("z"===n.key&&(K?n.metaKey&&!n.shiftKey:n.ctrlKey))K&&n.preventDefault(),e(T()),e(g()),e(m());else if("s"===n.key)e(c("select"));else if("c"!==n.key&&"x"!==n.key||!(K?n.metaKey&&!n.shiftKey:n.ctrlKey))if("v"===n.key&&(K?n.metaKey&&!n.shiftKey:n.ctrlKey)){const n=await navigator.clipboard.readText(),{x:o,y:s}=N(te/2,ee/2,i,a),{nodes:l,edges:d}=O(n,t.current,ne,re,x(o,5),x(s,5));r();const c=structuredClone(l);d.forEach((e=>c.add(e))),e(h(c))}else(K&&"z"===n.key&&n.metaKey&&n.shiftKey||!K&&"y"===n.key&&n.ctrlKey)&&(e(W()),e(g()),e(m()));else{const o=U(t.current,b);navigator.clipboard.writeText(o),"x"===n.key&&(e(I()),b.forEach((e=>{t.current.hasNode(e)?t.current.dropNode(e):t.current.hasEdge(e)&&t.current.dropEdge(e)})),r())}})),[me,ve]=L.useState(0),be=R((t=>{if(2===t.touches.length){e(y(void 0));const[n,r]=[t.touches[0].clientX-t.touches[1].clientX,t.touches[0].clientY-t.touches[1].clientY];ve(n*n+r*r)}})),Pe=R((t=>{if(0!==me&&2===t.touches.length){const[n,r]=[t.touches[0].clientX-t.touches[1].clientX,t.touches[0].clientY-t.touches[1].clientY],o=n*n+r*r;let s=i;o-me<0&&i+10<=390?s=i+10:o-me>0&&i-10>=10&&(s=i-10),e(z(s)),ve(o);const l=t.currentTarget.getBoundingClientRect(),[d,c]=[(t.touches[0].clientX+t.touches[1].clientX)/2-l.left,(t.touches[0].clientY+t.touches[1].clientY)/2-l.top],[u,y]=[d/l.width,c/l.height];e($({x:a.x+d*i/100-te*s/100*u,y:a.y+c*i/100-ee*s/100*y}))}})),we=R((e=>{0!==me&&ve(0)})),[Ae,ke]=L.useState({sx:0,sy:0,ex:0,ey:0});return L.useEffect((()=>{ke({sx:se.x<=ae.x?se.x:ae.x,ex:se.x>ae.x?se.x:ae.x,sy:se.y<=ae.y?se.y:ae.y,ey:se.y>ae.y?se.y:ae.y})}),[ae.x,ae.y]),n.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",id:"canvas",style:{position:"fixed",top:40,left:40,userSelect:"none",touchAction:"none"},height:ee,width:te,viewBox:`${a.x} ${a.y} ${te*i/100} ${ee*i/100}`,onPointerDown:he,onPointerMove:pe,onPointerUp:fe,onTouchStart:be,onTouchMove:Pe,onTouchEnd:we,onWheel:xe,tabIndex:0,onKeyDown:ge,children:[n.jsx(oe,{}),"select"===p&&0!=se.x&&0!=se.y&&n.jsx("rect",{x:Ae.sx,y:Ae.sy,width:Ae.ex-Ae.sx,height:Ae.ey-Ae.sy,rx:"2",stroke:"#b5b5b6",strokeWidth:"2",strokeOpacity:"0.4",fill:"#b5b5b6",opacity:"0.75"}),n.jsx("defs",{children:n.jsxs("pattern",{id:"opaque",width:"5",height:"5",patternUnits:"userSpaceOnUse",children:[n.jsx("rect",{x:"0",y:"0",width:"2.5",height:"2.5",fill:"black",fillOpacity:"50%"}),n.jsx("rect",{x:"2.5",y:"2.5",width:"2.5",height:"2.5",fill:"black",fillOpacity:"50%"})]})})]})}))}}})); +System.register(["./chakra-legacy--ElhKRU8.js","./index-legacy-jqOeRlnz.js","./react-legacy-CB7hQk4J.js","./clipboard-legacy-CN3xDKAv.js","./master-manager-legacy-CCeMINwh.js","./misc-nodes-legacy-DUcImzkb.js"],(function(e,t){"use strict";var n,r,o,s,i,a,l,d,c,u,y,h,p,f,x,g,m,v,b,P,w,A,k,E,D,I,N,j,S,C,M,_,$,z,K,T,W,L,R,U,O,B,F,Y,X,V,Q,q,Z;return{setters:[e=>{n=e.j},e=>{r=e.k,o=e.l,s=e.an,i=e.ao,a=e.ap,l=e.c,d=e.d,c=e.aq,u=e.ar,y=e.as,h=e.T,p=e.at,f=e.au,x=e.av,g=e.q,m=e.t,v=e.S,b=e.aw,P=e.n,w=e.m,A=e.o,k=e.r,E=e.E,D=e.v,I=e.y,N=e.U,j=e.ax,S=e.p,C=e.ay,M=e.a0,_=e.a1,$=e.A,z=e.z,K=e.a8,T=e.ak,W=e.al},e=>{L=e.b},e=>{R=e.u,U=e.e,O=e.i},e=>{B=e.s,F=e.u,Y=e.f,X=e.F,V=e.l,Q=e.b,q=e.c},e=>{Z=e.m}],execute:function(){const t=(e,t,n,r,o,s,i)=>{if(!("offsetFrom"in s)||!("offsetTo"in s))return;if(Number.isNaN(s.offsetFrom)||Number.isNaN(s.offsetTo))return;if(s.offsetFrom===s.offsetTo)return G(e,t,n,r,o)?i<0?{x1:t,y1:n,x2:r,y2:o,offset:s.offsetFrom}:t===r?{x1:t+5*i,y1:n,x2:r+5*i,y2:o,offset:s.offsetFrom}:n===o?{x1:t,y1:n+5*i,x2:r,y2:o+5*i,offset:s.offsetFrom}:{x1:t+5*Math.SQRT1_2*i,y1:n+5*Math.SQRT1_2*i,x2:r+5*Math.SQRT1_2*i,y2:o+5*Math.SQRT1_2*i,offset:s.offsetFrom}:void 0;const[a,l]=[s.offsetFrom,s.offsetTo];for(let d=0;d!(t!==o&&n!==s||![r.Diagonal,r.Perpendicular].includes(e))||!(1!==Math.abs((s-n)/(o-t))||![r.Diagonal,r.RotatePerpendicular].includes(e)),H=(e,n)=>{if(!n.every((t=>e.hasEdge(t))))return;const s=n.map((n=>{var s,i,a;const[l,d]=e.extremities(n),c=e.getNodeAttributes(l),u=e.getNodeAttributes(d),{type:y,parallelIndex:h}=e.getEdgeAttributes(n),p=null!==(s=e.getEdgeAttribute(n,y))&&void 0!==s?s:o[y].defaultAttrs,f=t(y,c.x,c.y,u.x,u.y,p,h);if(f){const{x1:e,y1:t,x2:n,y2:s,offset:i}=f;return o[r.Simple].generatePath(e,n,t,s,{offset:i})}return null!==(i=null===(a=o[y])||void 0===a?void 0:a.generatePath(c.x,u.x,c.y,u.y,p))&&void 0!==i?i:`M ${c.x} ${c.y} L ${u.x} ${u.y}`}));let i=`${s[0]} `;for(let t=1;t[...e.nodeEntries()].map((e=>e.node.startsWith("stn")?{id:e.node,type:"station",station:e.attributes}:{id:e.node,type:"misc-node",miscNode:e.attributes})),ee=e=>{const n={},a=[],l={},d=[];for(const s of e.edgeEntries()){const[e,i,c,u]=[s.sourceAttributes.x,s.sourceAttributes.y,s.targetAttributes.x,s.targetAttributes.y],y=t(s.attributes.type,e,i,c,u,s.attributes[s.attributes.type],s.attributes.parallelIndex);if(y);else if(s.attributes.parallelIndex>=0){a.push(s);continue}if(""===s.attributes.reconcileId)if(y){const e=s.edge,t=s.attributes,{x1:i,y1:a,x2:l,y2:d,offset:c}=y;n[e]={id:e,attr:t,path:o[r.Simple].generatePath(i,l,a,d,{offset:c})}}else d.push(s);else{const e=s.attributes.reconcileId;e in l?l[e].push(s):l[e]=[s]}}const c=new Set;for(;a.length;){const t=a.pop();if(c.has(t.edge))continue;const{normal:r,parallel:o}=s(e,t);if(!o.length)continue;o.forEach((e=>c.add(e.edge))),d.push(...r);const l=i(o);for(const e of o){const t=e.edge;n[t]={id:e.edge,attr:e.attributes,path:l[t]}}}const{allReconciledLines:u,danglingLines:y}=((e,t)=>{const n=[],r=[];return Object.values(t).forEach((t=>{if(1===t.length)return void r.push(...t.map((e=>e.edge)));const o=e.getEdgeAttribute(t.at(0),"type");if(!t.every((t=>e.getEdgeAttribute(t,"type")===o)))return void r.push(...t.map((e=>e.edge)));const s=e.getEdgeAttribute(t.at(0),"style");if(!t.every((t=>e.getEdgeAttribute(t,"style")===s)))return void r.push(...t.map((e=>e.edge)));const i={},a=new Set,l=new Set,d=Object.fromEntries(t.map((t=>{var n,r;const[o,s]=e.extremities(t);return i[o]=(null!==(n=i[o])&&void 0!==n?n:0)+1,i[s]=(null!==(r=i[s])&&void 0!==r?r:0)+1,a.add(o),l.add(s),[o,[t.edge,s]]}))),c=Array.from(a).filter((e=>1===i[e])),u=Array.from(l).filter((e=>1===i[e]));if(1!==c.length||1!==u.length)return void r.push(...t.map((e=>e.edge)));const y=c[0],h=u[0];if(y===h)return void r.push(...t.map((e=>e.edge)));const p=[d[y][0]];let f=d[y][1];for(let e=1;ee.edge)));p.push(d[f][0]),f=e}f===h&&p.length===t.length?n.push(p):r.push(...t.map((e=>e.edge)))})),{allReconciledLines:n,danglingLines:r}})(e,l);for(const t of u){const r=H(e,t);if(!r)continue;const o=t[0];n[o]={id:o,attr:e.getEdgeAttributes(o),path:r}}for(const t of y){const s=e.getEdgeAttributes(t),[i,a]=e.extremities(t),l=e.getNodeAttributes(i),d=e.getNodeAttributes(a);n[t]={id:t,attr:s,path:o[r.Simple].generatePath(l.x,d.x,l.y,d.y,o[r.Simple].defaultAttrs)}}for(const t of d){const e=t.edge,r=t.attributes.type,s=t.attributes,[i,a,l,d]=[t.sourceAttributes.x,t.sourceAttributes.y,t.targetAttributes.x,t.targetAttributes.y];n[e]=r in o?{id:e,attr:s,path:o[r].generatePath(i,l,a,d,s[r])}:{id:e,attr:s,path:`M ${i} ${a} L ${l} ${d}`}}return Object.values(n).map((e=>({id:e.id,type:"line",line:e})))},te=e=>{const{id:t,x:r,y:o,handlePointerDown:s,handlePointerMove:i,handlePointerUp:a}=e,l=L.useCallback((e=>s(t,e)),[t,s]),d=L.useCallback((e=>i(t,e)),[t,i]),c=L.useCallback((e=>a(t,e)),[t,a]);return n.jsx("g",{id:t,transform:`translate(${r-6.4} ${o-6.4})scale(0.025)`,onPointerDown:l,onPointerMove:d,onPointerUp:c,style:{cursor:"move"},children:n.jsx("path",{id:`stn_core_${t}`,fillRule:"evenodd",clipRule:"evenodd",d:"M256 0c70.69 0 134.7 28.66 181.02 74.98C483.34 121.31 512 185.31 512 256c0 70.69-28.66 134.7-74.98 181.02C390.7 483.34 326.69 512 256 512c-70.69 0-134.69-28.66-181.02-74.98C28.66 390.7 0 326.69 0 256c0-70.69 28.66-134.69 74.98-181.02C121.31 28.66 185.31 0 256 0zm-21.91 302.69v-2.07c.16-13.72 1.51-24.59 4.15-32.67 2.59-8.08 6.32-14.65 11.18-19.63 4.87-5.02 10.72-9.58 17.56-13.72 4.4-2.8 8.39-5.9 11.91-9.37 3.52-3.42 6.32-7.41 8.38-11.91 2.07-4.46 3.11-9.42 3.11-14.91 0-6.53-1.55-12.18-4.66-16.99-3.05-4.77-7.19-8.44-12.27-11.08-5.13-2.59-10.82-3.89-17.09-3.89-5.65 0-11.03 1.15-16.21 3.53-5.12 2.33-9.42 6-12.79 10.97-3.36 4.98-5.33 11.35-5.85 19.11h-33.56c.53-13.21 3.89-24.39 10.05-33.55 6.21-9.16 14.4-16.11 24.55-20.82 10.2-4.71 21.49-7.04 33.81-7.04 13.57 0 25.38 2.48 35.52 7.56 10.15 5.02 18.08 12.06 23.72 21.08 5.59 9 8.44 19.47 8.44 31.48 0 8.23-1.29 15.64-3.88 22.21-2.59 6.58-6.22 12.48-10.98 17.61-4.77 5.18-10.41 9.73-17.03 13.67-6.27 3.94-11.35 7.97-15.18 12.17-3.88 4.19-6.68 9.17-8.44 14.86-1.76 5.74-2.75 12.84-2.9 21.33v2.07h-31.54zm16.68 70.67c-6.06 0-11.24-2.18-15.59-6.48-4.34-4.29-6.47-9.53-6.47-15.63 0-6.01 2.12-11.19 6.47-15.49 4.35-4.3 9.53-6.47 15.59-6.47 5.95 0 11.12 2.19 15.48 6.47 4.39 4.31 6.58 9.48 6.58 15.49 0 4.04-1.05 7.76-3.06 11.08-2.02 3.35-4.66 6.07-7.97 8.03-3.31 1.96-6.99 3-11.03 3z"})})},ne=e=>{const{id:t,path:r,handlePointerDown:o}=e,s=L.useCallback((e=>o(t,e)),[t,o]);return n.jsx("path",{id:t,d:r,fill:"none",stroke:"grey",strokeWidth:"5",strokeLinecap:"round",cursor:"pointer",onPointerDown:s})},re=L.memo((e=>{const{elements:t,handlePointerDown:r,handlePointerMove:o,handlePointerUp:s,handleEdgePointerDown:i}=e,l=Object.fromEntries(Array.from({length:21},((e,t)=>[t-10,{pre:[],main:[],post:[]}])));for(const P of t)if("line"===P.type){var d,c,u,y;const e=P.line.attr.type,t=P.line.attr.style,r=P.line.attr[t],o=null===(d=a[t])||void 0===d?void 0:d.preComponent;o&&l[P.line.attr.zIndex].pre.push(n.jsx(o,{id:P.id,type:e,path:P.line.path,styleAttrs:r,newLine:!1,handlePointerDown:i},`${P.id}.pre`));const s=null!==(c=null===(u=a[t])||void 0===u?void 0:u.component)&&void 0!==c?c:ne;l[P.line.attr.zIndex].main.push(n.jsx(s,{id:P.id,type:e,path:P.line.path,styleAttrs:r,newLine:!1,handlePointerDown:i},P.id));const h=null===(y=a[t])||void 0===y?void 0:y.postComponent;h&&l[P.line.attr.zIndex].post.push(n.jsx(h,{id:P.id,type:e,path:P.line.path,styleAttrs:r,newLine:!1,handlePointerDown:i},`${P.id}.post`))}else if("station"===P.type){var h,p,f,x;const e=P.station,t=e.type,i=null===(h=B[t])||void 0===h?void 0:h.preComponent;i&&l[P.station.zIndex].pre.push(n.jsx(i,{id:P.id,x:e.x,y:e.y,attrs:e,handlePointerDown:r,handlePointerMove:o,handlePointerUp:s},`${P.id}.pre`));const a=null!==(p=null===(f=B[t])||void 0===f?void 0:f.component)&&void 0!==p?p:te;l[P.station.zIndex].main.push(n.jsx(a,{id:P.id,x:e.x,y:e.y,attrs:e,handlePointerDown:r,handlePointerMove:o,handlePointerUp:s},P.id));const d=null===(x=B[t])||void 0===x?void 0:x.postComponent;d&&l[P.station.zIndex].post.push(n.jsx(d,{id:P.id,x:e.x,y:e.y,attrs:e,handlePointerDown:r,handlePointerMove:o,handlePointerUp:s},`${P.id}.post`))}else if("misc-node"===P.type){var g,m,v,b;const e=P.miscNode,t=e.type,i=null===(g=Z[t])||void 0===g?void 0:g.preComponent;i&&l[P.miscNode.zIndex].pre.push(n.jsx(i,{id:P.id,x:e.x,y:e.y,attrs:e[t],handlePointerDown:r,handlePointerMove:o,handlePointerUp:s},`${P.id}.pre`));const a=null!==(m=null===(v=Z[t])||void 0===v?void 0:v.component)&&void 0!==m?m:te;l[P.miscNode.zIndex].main.push(n.jsx(a,{id:P.id,x:e.x,y:e.y,attrs:e[t],handlePointerDown:r,handlePointerMove:o,handlePointerUp:s},P.id));const d=null===(b=Z[t])||void 0===b?void 0:b.postComponent;d&&l[P.miscNode.zIndex].post.push(n.jsx(d,{id:P.id,x:e.x,y:e.y,attrs:e[t],handlePointerDown:r,handlePointerMove:o,handlePointerUp:s},`${P.id}.post`))}return Array.from({length:21},((e,t)=>(t-10).toString())).map((e=>[...l[e].pre,...l[e].main,...l[e].post])).flat()}),((e,t)=>e.elements===t.elements)),oe=()=>{const e=l(),t=L.useRef(window.graph),{telemetry:{project:r},preference:{autoParallel:s}}=d((e=>e.app)),{svgViewBoxZoom:i,svgViewBoxMin:a}=d((e=>e.param)),{selected:S,refresh:{nodes:C,edges:M},mode:_,active:$,keepLastPath:z,theme:K}=d((e=>e.runtime)),[T,W]=L.useState({x:0,y:0}),[U,O]=L.useState({x:0,y:0}),F=R(((t,n)=>{n.stopPropagation(),"select"===_&&e(c("free"));const r=n.currentTarget,{x:o,y:s}=u(n);r.setPointerCapture(n.pointerId),W({x:o,y:s}),e(y(t)),n.shiftKey?S.has(t)?e(p(t)):e(f(t)):S.has(t)||e(h(new Set([t])))})),Y=R(((n,r)=>{const{x:o,y:s}=u(r);"free"===_&&$===n?(S.forEach((e=>{t.current.hasNode(e)&&t.current.updateNodeAttributes(e,(e=>({...e,x:x(e.x-(T.x-o)*i/100,r.altKey?1:5),y:x(e.y-(T.y-s)*i/100,r.altKey?1:5)})))})),e(g()),e(m())):_.startsWith("line")&&O({x:(T.x-o)*i/100,y:(T.y-s)*i/100})})),X=R(((n,i)=>{if(_.startsWith("line")){z||e(c("free"));const n=[...Object.values(v),b.Virtual,b.Master],a=t.current.hasNode($)&&n.includes(t.current.getNodeAttribute($,"type"));["stn_core_","virtual_circle_"].forEach((e=>{var n;const l=null===(n=document.elementsFromPoint(i.clientX,i.clientY)[0].attributes)||void 0===n||null===(n=n.getNamedItem("id"))||void 0===n?void 0:n.value,d=null==l?void 0:l.startsWith(e);if(a&&d){const n=_.slice(5),i=`line_${P(10)}`,[a,d]=[$,l.slice(e.length)],c=s?w(t.current,n,a,d,"from"):-1;t.current.addDirectedEdgeWithKey(i,a,d,{visible:!0,zIndex:0,type:n,[n]:structuredClone(o[n].defaultAttrs),style:A.SingleColor,[A.SingleColor]:{color:K},reconcileId:"",parallelIndex:c}),r&&k.event(E.ADD_LINE,{type:n})}})),e(m()),e(D(t.current.export()))}else if("free"===_&&$){const{x:n,y:r}=u(i);T.x-n==0&&T.y-r==0||e(D(t.current.export()))}e(y(void 0))})),V=R(((n,o)=>{if(o.stopPropagation(),o.shiftKey||e(I()),o.shiftKey&&S.has(n)?e(p(n)):e(f(n)),_.startsWith("station")||_.startsWith("misc-node-virtual")||_.startsWith("misc-node-master")){const l=o.clientX-document.getElementById("canvas").getBoundingClientRect().left,d=o.clientY-document.getElementById("canvas").getBoundingClientRect().top,u=_.startsWith("station"),y=P(10),p=u?`stn_${y}`:`misc_node_${y}`,f=u?_.slice(8):_.slice(10),{x:v,y:b}=N(l,d,i,a),w=u?structuredClone(B[f].defaultAttrs):structuredClone(Z[f].defaultAttrs);"color"in w&&(w.color=K),t.current.addNode(p,{visible:!0,zIndex:0,x:x(v,5),y:x(b,5),type:f,[f]:w});const A=t.current.getEdgeAttributes(n),{zIndex:I,type:j,style:S}=A,C=A[j],M=A[S],[$,z]=t.current.extremities(n),T=s?0:-1;t.current.addDirectedEdgeWithKey(`line_${P(10)}`,$,p,{visible:!0,zIndex:I,type:j,[j]:structuredClone(C),style:S,[S]:structuredClone(M),reconcileId:"",parallelIndex:T}),t.current.addDirectedEdgeWithKey(`line_${P(10)}`,p,z,{visible:!0,zIndex:I,type:j,[j]:structuredClone(C),style:S,[S]:structuredClone(M),reconcileId:"",parallelIndex:T}),t.current.dropEdge(n),e(g()),e(m()),e(D(t.current.export())),r&&(k.event(E.ADD_STATION,{type:f}),k.event(E.ADD_LINE,{type:j})),e(c("free")),e(h(new Set([p])))}})),Q=L.useMemo((()=>[...ee(t.current),...J(t.current)]),[M,C]),q=j.component;return n.jsxs(n.Fragment,{children:[n.jsx(re,{elements:Q,handlePointerDown:F,handlePointerMove:Y,handlePointerUp:X,handleEdgePointerDown:V}),_.startsWith("line")&&$&&"background"!==$&&n.jsx(q,{id:"line_create_in_progress___no_use",type:_.slice(5),path:o[_.slice(5)].generatePath(t.current.getNodeAttribute($,"x"),t.current.getNodeAttribute($,"x")-U.x,t.current.getNodeAttribute($,"y"),t.current.getNodeAttribute($,"y")-U.y,o[_.slice(5)].defaultAttrs),styleAttrs:{color:K},newLine:!0,handlePointerDown:()=>{}})]})};e("default",(()=>{const e=l(),t=L.useRef(window.graph),r=()=>{e(g()),e(m()),e(D(t.current.export()))},{activeSubscriptions:o}=d((e=>e.account)),{telemetry:{project:s}}=d((e=>e.app)),{svgViewBoxZoom:i,svgViewBoxMin:a}=d((e=>e.param)),{mode:p,lastTool:f,active:v,selected:b,keepLastPath:w,theme:A,refresh:{nodes:j},masterNodesCount:G,parallelLinesCount:H}=d((e=>e.runtime)),J=F(),{height:ee,width:te}=S(J),ne=!o.RMP_CLOUD&&G+1>C,re=!o.RMP_CLOUD&&H+1>M;L.useEffect((()=>{const e=Y(t.current);Object.entries(e).filter((([e,t])=>t&&e in X)).forEach((([e])=>V(e)))}),[j]);const[se,ie]=L.useState({x:0,y:0}),[ae,le]=L.useState({x:0,y:0}),[de,ce]=L.useState({x:0,y:0}),[ue,ye]=L.useState({x:0,y:0}),he=R((n=>{const{x:o,y:l}=u(n);if(p.startsWith("station")){e(c("free"));const n=`stn_${P(10)}`,d=p.slice(8),u=structuredClone(B[d].defaultAttrs);"color"in u&&(u.color=A);const{x:y,y:f}=N(o,l,i,a);t.current.addNode(n,{visible:!0,zIndex:0,x:x(y,5),y:x(f,5),type:d,[d]:u}),r(),s&&k.event(E.ADD_STATION,{type:d}),e(h(new Set([n])))}else if(p.startsWith("misc-node")){e(c("free"));const n=`misc_node_${P(10)}`,d=p.slice(10),{x:u,y:y}=N(o,l,i,a);t.current.addNode(n,{visible:!0,zIndex:0,x:x(u,5),y:x(y,5),type:d,[d]:structuredClone(Z[d].defaultAttrs)}),r(),s&&k.event(E.ADD_STATION,{type:d}),e(h(new Set([n])))}else"free"===p||p.startsWith("line")?(p.startsWith("line")&&(e(c("free")),w&&e(_(!1))),ce({x:o,y:l}),ye(a),n.shiftKey||(e(y("background")),e(I()))):"select"===p&&(ie(N(o,l,i,a)),le(N(o,l,i,a)))})),pe=R((t=>{if("select"===p){if(0!=se.x&&0!=se.y){const{x:e,y:n}=u(t);le(N(e,n,i,a))}}else if("background"===v){const{x:n,y:r}=u(t);e($({x:ue.x+(de.x-n)*i/100,y:ue.y+(de.y-r)*i/100}))}})),fe=R((n=>{if("select"===p){const{x:r,y:o}=u(n),{x:s,y:l}=N(r,o,i,a),d=Q(t.current,se.x,se.y,s,l),y=q(t.current,new Set(d));e(h(new Set([...n.shiftKey?b:[],...d,...y]))),e(c("free")),ie({x:0,y:0}),le({x:0,y:0})}"background"!==v||n.shiftKey||e(y(void 0))})),xe=R((t=>{let n=i;t.deltaY>0&&i+10<400?n=i+10:t.deltaY<0&&i-10>0&&(n=i-10),e(z(n));const{x:r,y:o}=u(t),s=t.currentTarget.getBoundingClientRect(),[l,d]=[r/s.width,o/s.height];e($({x:a.x+r*i/100-te*n/100*l,y:a.y+o*i/100-ee*n/100*d}))})),ge=R((async n=>{if(K?"Backspace"===n.key:"Delete"===n.key)b.size>0&&(b.forEach((e=>{t.current.hasNode(e)?t.current.dropNode(e):t.current.hasEdge(e)&&t.current.dropEdge(e)})),e(I()),r());else if(n.key.startsWith("Arrow")){const t=100,r=n.key.endsWith("Left")?-1:n.key.endsWith("Right")?1:0,o=n.key.endsWith("Up")?-1:n.key.endsWith("Down")?1:0;e($(N(t*r,t*o,i,a)))}else if("i"===n.key||"j"===n.key||"k"===n.key||"l"===n.key){const e=10,o=("j"===n.key?-1:"l"===n.key?1:0)*e,s=("i"===n.key?-1:"k"===n.key?1:0)*e;b.size>0&&b.forEach((e=>{t.current.hasNode(e)&&(t.current.updateNodeAttribute(e,"x",(e=>(null!=e?e:0)+o)),t.current.updateNodeAttribute(e,"y",(e=>(null!=e?e:0)+s)),r())}))}else if("f"===n.key&&f)e(c(f));else if("z"===n.key&&(K?n.metaKey&&!n.shiftKey:n.ctrlKey))K&&n.preventDefault(),e(T()),e(g()),e(m());else if("s"===n.key)e(c("select"));else if("c"!==n.key&&"x"!==n.key||!(K?n.metaKey&&!n.shiftKey:n.ctrlKey))if("v"===n.key&&(K?n.metaKey&&!n.shiftKey:n.ctrlKey)){const n=await navigator.clipboard.readText(),{x:o,y:s}=N(te/2,ee/2,i,a),{nodes:l,edges:d}=O(n,t.current,ne,re,x(o,5),x(s,5));r();const c=structuredClone(l);d.forEach((e=>c.add(e))),e(h(c))}else(K&&"z"===n.key&&n.metaKey&&n.shiftKey||!K&&"y"===n.key&&n.ctrlKey)&&(e(W()),e(g()),e(m()));else{const o=U(t.current,b);navigator.clipboard.writeText(o),"x"===n.key&&(e(I()),b.forEach((e=>{t.current.hasNode(e)?t.current.dropNode(e):t.current.hasEdge(e)&&t.current.dropEdge(e)})),r())}})),[me,ve]=L.useState(0),be=R((t=>{if(2===t.touches.length){e(y(void 0));const[n,r]=[t.touches[0].clientX-t.touches[1].clientX,t.touches[0].clientY-t.touches[1].clientY];ve(n*n+r*r)}})),Pe=R((t=>{if(0!==me&&2===t.touches.length){const[n,r]=[t.touches[0].clientX-t.touches[1].clientX,t.touches[0].clientY-t.touches[1].clientY],o=n*n+r*r;let s=i;o-me<0&&i+10<=390?s=i+10:o-me>0&&i-10>=10&&(s=i-10),e(z(s)),ve(o);const l=t.currentTarget.getBoundingClientRect(),[d,c]=[(t.touches[0].clientX+t.touches[1].clientX)/2-l.left,(t.touches[0].clientY+t.touches[1].clientY)/2-l.top],[u,y]=[d/l.width,c/l.height];e($({x:a.x+d*i/100-te*s/100*u,y:a.y+c*i/100-ee*s/100*y}))}})),we=R((e=>{0!==me&&ve(0)})),[Ae,ke]=L.useState({sx:0,sy:0,ex:0,ey:0});return L.useEffect((()=>{ke({sx:se.x<=ae.x?se.x:ae.x,ex:se.x>ae.x?se.x:ae.x,sy:se.y<=ae.y?se.y:ae.y,ey:se.y>ae.y?se.y:ae.y})}),[ae.x,ae.y]),n.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",id:"canvas",style:{position:"fixed",top:40,left:40,userSelect:"none",touchAction:"none"},height:ee,width:te,viewBox:`${a.x} ${a.y} ${te*i/100} ${ee*i/100}`,onPointerDown:he,onPointerMove:pe,onPointerUp:fe,onTouchStart:be,onTouchMove:Pe,onTouchEnd:we,onWheel:xe,tabIndex:0,onKeyDown:ge,children:[n.jsx(oe,{}),"select"===p&&0!=se.x&&0!=se.y&&n.jsx("rect",{x:Ae.sx,y:Ae.sy,width:Ae.ex-Ae.sx,height:Ae.ey-Ae.sy,rx:"2",stroke:"#b5b5b6",strokeWidth:"2",strokeOpacity:"0.4",fill:"#b5b5b6",opacity:"0.75"}),n.jsx("defs",{children:n.jsxs("pattern",{id:"opaque",width:"5",height:"5",patternUnits:"userSpaceOnUse",children:[n.jsx("rect",{x:"0",y:"0",width:"2.5",height:"2.5",fill:"black",fillOpacity:"50%"}),n.jsx("rect",{x:"2.5",y:"2.5",width:"2.5",height:"2.5",fill:"black",fillOpacity:"50%"})]})})]})}))}}})); diff --git a/assets/tools-BJtAFyoe.js b/assets/tools-CgHBlRFk.js similarity index 95% rename from assets/tools-BJtAFyoe.js rename to assets/tools-CgHBlRFk.js index 8df0518c7..e2d9e4bac 100644 --- a/assets/tools-BJtAFyoe.js +++ b/assets/tools-CgHBlRFk.js @@ -1 +1 @@ -import{a6 as F,j as e,g as f,O as i,aV as H,aW as b,aX as g,B as v,aY as M,aZ as T,a4 as q,U as k,aM as U,aK as X,a_ as K,a7 as J,aE as Y}from"./chakra-t2DzLzXq.js";import{u as O,b as I}from"./react-DmTIgZys.js";import{c as Z,d as S,aH as G,ay as Q,aI as ee,aJ as se,aq as m,V as ae,W as te,k as E,l as P,aw as n,S as oe,aK as ne,b as le,aL as ie}from"./index-CgEQ4DK5.js";import{m as d}from"./misc-nodes-CZ4-M6fq.js";import{s as R}from"./master-manager-UVzPVFgJ.js";const c={justifyContent:"flex-start",p:0,w:"100%",h:10},w={p:2.5,h:10},A={p:0,display:"flex",flexDirection:"column"},ce=e.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:e.jsx("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2",stroke:"currentColor",strokeDasharray:"2",fill:"none"})}),$=.3,ue=()=>{const{t}=O(),o=Z(),{activeSubscriptions:u}=S(s=>s.account),{preference:{unlockSimplePathAttempts:p,toolsPanel:{expand:r}}}=S(s=>s.app),{mode:l,theme:h,paletteAppClip:{output:x},masterNodesCount:V}=S(s=>s.runtime),B=F("white","var(--chakra-colors-gray-800)"),[L,C]=I.useState(!1);I.useEffect(()=>{L&&x&&(o(G(x)),C(!1))},[x==null?void 0:x.toString()]);const[a,N]=I.useState(r),_=()=>{r?N(!1):setTimeout(()=>N(!0),($+.02)*1e3),o(ie(!r))},y=s=>o(m("station-".concat(s))),z=s=>o(m("line-".concat(s))),j=s=>o(m("misc-node-".concat(s))),W=!u.RMP_CLOUD&&V+1>Q;return e.jsxs(f,{flexShrink:"0",direction:"column",width:r?450:10,maxWidth:"100%",height:"100%",bg:B,zIndex:"5",transition:"width ".concat($,"s ease-in-out"),children:[e.jsx(i,{"aria-label":"Menu",leftIcon:a?e.jsx(ee,{size:40,transform:"rotate(90)"}):e.jsx(se,{size:40,transform:"rotate(90)"}),onClick:_,sx:c,children:a?t("panel.tools.showLess"):void 0}),e.jsx(f,{className:"tools",overflow:"auto",children:e.jsxs(H,{width:"100%",allowMultiple:!0,defaultIndex:[0,1,2],children:[e.jsx(i,{"aria-label":"select",leftIcon:ce,onClick:()=>o(m(l==="select"?"free":"select")),variant:l==="select"?"solid":"outline",sx:c,children:a?t("panel.tools.select"):void 0}),e.jsxs(b,{children:[e.jsxs(g,{sx:w,children:[a&&e.jsx(v,{as:"span",flex:"1",textAlign:"left",children:t("panel.tools.section.lineDrawing")}),e.jsx(M,{})]}),e.jsxs(T,{sx:A,children:[e.jsxs(f,{children:[e.jsx(ae,{theme:h,onClick:()=>{C(!0),o(te(h))}}),e.jsx(q,{fontWeight:"600",pl:"1",alignSelf:"center",children:a?t("color"):void 0})]}),Object.values(E).filter(s=>!(s===E.Simple&&p>=0)).map(s=>e.jsx(i,{"aria-label":s,leftIcon:P[s].icon,onClick:()=>z(s),variant:l==="line-".concat(s)?"solid":"outline",sx:c,children:a?t(P[s].metadata.displayName):void 0},s)),e.jsx(i,{"aria-label":n.Virtual,leftIcon:d[n.Virtual].icon,onClick:()=>j(n.Virtual),variant:l==="misc-node-".concat(n.Virtual)?"solid":"outline",sx:c,children:a?t(d[n.Virtual].metadata.displayName):void 0})]})]}),e.jsxs(b,{children:[e.jsxs(g,{sx:w,children:[a&&e.jsx(v,{as:"span",flex:"1",textAlign:"left",children:t("panel.tools.section.stations")}),e.jsx(M,{})]}),e.jsxs(T,{sx:A,children:[Object.values(oe).map(s=>e.jsx(i,{"aria-label":s,leftIcon:R[s].icon,onClick:()=>y(s),variant:l==="station-".concat(s)?"solid":"outline",sx:c,children:a?t(R[s].metadata.displayName):void 0},s)),e.jsx(D,{type:"station",expand:a})]})]}),e.jsxs(b,{children:[e.jsxs(g,{sx:w,children:[a&&e.jsx(v,{as:"span",flex:"1",textAlign:"left",children:t("panel.tools.section.miscellaneousNodes")}),e.jsx(M,{})]}),e.jsxs(T,{sx:A,children:[e.jsxs(i,{"aria-label":n.Master,leftIcon:d[n.Master].icon,onClick:()=>j(n.Master),variant:l==="misc-node-".concat(n.Master)?"solid":"outline",isDisabled:W,sx:c,children:[a?t(d[n.Master].metadata.displayName):void 0,a?e.jsxs(e.Fragment,{children:[e.jsx(k,{ml:"1",colorScheme:"green",children:"New"}),e.jsx(U,{label:t("header.settings.proWithTrial"),children:e.jsx(k,{ml:"1",color:"gray.50",background:"radial-gradient(circle, #3f5efb, #fc466b)",mr:"auto",children:"PRO"})})]}):void 0]}),Object.values(n).filter(s=>s!==n.Virtual&&s!==n.I18nText&&s!==n.Master).map(s=>e.jsx(i,{"aria-label":s,leftIcon:d[s].icon,onClick:()=>j(s),variant:l==="misc-node-".concat(s)?"solid":"outline",sx:c,children:a?t(d[s].metadata.displayName):void 0},s)),e.jsx(D,{type:"misc-node",expand:a})]})]})]})})]})},D=t=>{const{type:o,expand:u}=t,{t:p}=O(),r=o==="misc-node"?"nodes":o==="station"?"stations":"line-styles",l=o==="line"?"xs":void 0,h=o==="line"?"30px":"40px";return e.jsxs(X,{fontSize:l,children:[o!=="line"&&e.jsx(K.Provider,{value:{style:{padding:5},size:h},children:e.jsx(ne,{})}),u&&e.jsxs(e.Fragment,{children:[e.jsx(J,{color:"teal.500",href:"https://github.com/railmapgen/rmp/blob/main/docs/".concat(r,".md"),isExternal:!0,children:p("panel.tools.learnHowToAdd.".concat(o))}),e.jsx(Y,{as:le,color:"teal.500",mr:"auto"})]})]})};export{D as LearnHowToAdd,ue as default}; +import{a6 as F,j as e,g as f,O as i,aV as H,aW as b,aX as g,B as v,aY as M,aZ as T,a4 as q,U as k,aM as U,aK as X,a_ as K,a7 as J,aE as Y}from"./chakra-t2DzLzXq.js";import{u as O,b as I}from"./react-DmTIgZys.js";import{c as Z,d as S,aH as G,ay as Q,aI as ee,aJ as se,aq as m,V as ae,W as te,k as E,l as P,aw as n,S as oe,aK as ne,b as le,aL as ie}from"./index-DRWG9Ar1.js";import{m as d}from"./misc-nodes-DMfi7tU1.js";import{s as R}from"./master-manager-DlQmLEpO.js";const c={justifyContent:"flex-start",p:0,w:"100%",h:10},w={p:2.5,h:10},A={p:0,display:"flex",flexDirection:"column"},ce=e.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:e.jsx("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2",stroke:"currentColor",strokeDasharray:"2",fill:"none"})}),$=.3,ue=()=>{const{t}=O(),o=Z(),{activeSubscriptions:u}=S(s=>s.account),{preference:{unlockSimplePathAttempts:p,toolsPanel:{expand:r}}}=S(s=>s.app),{mode:l,theme:h,paletteAppClip:{output:x},masterNodesCount:V}=S(s=>s.runtime),B=F("white","var(--chakra-colors-gray-800)"),[L,C]=I.useState(!1);I.useEffect(()=>{L&&x&&(o(G(x)),C(!1))},[x==null?void 0:x.toString()]);const[a,N]=I.useState(r),_=()=>{r?N(!1):setTimeout(()=>N(!0),($+.02)*1e3),o(ie(!r))},y=s=>o(m("station-".concat(s))),z=s=>o(m("line-".concat(s))),j=s=>o(m("misc-node-".concat(s))),W=!u.RMP_CLOUD&&V+1>Q;return e.jsxs(f,{flexShrink:"0",direction:"column",width:r?450:10,maxWidth:"100%",height:"100%",bg:B,zIndex:"5",transition:"width ".concat($,"s ease-in-out"),children:[e.jsx(i,{"aria-label":"Menu",leftIcon:a?e.jsx(ee,{size:40,transform:"rotate(90)"}):e.jsx(se,{size:40,transform:"rotate(90)"}),onClick:_,sx:c,children:a?t("panel.tools.showLess"):void 0}),e.jsx(f,{className:"tools",overflow:"auto",children:e.jsxs(H,{width:"100%",allowMultiple:!0,defaultIndex:[0,1,2],children:[e.jsx(i,{"aria-label":"select",leftIcon:ce,onClick:()=>o(m(l==="select"?"free":"select")),variant:l==="select"?"solid":"outline",sx:c,children:a?t("panel.tools.select"):void 0}),e.jsxs(b,{children:[e.jsxs(g,{sx:w,children:[a&&e.jsx(v,{as:"span",flex:"1",textAlign:"left",children:t("panel.tools.section.lineDrawing")}),e.jsx(M,{})]}),e.jsxs(T,{sx:A,children:[e.jsxs(f,{children:[e.jsx(ae,{theme:h,onClick:()=>{C(!0),o(te(h))}}),e.jsx(q,{fontWeight:"600",pl:"1",alignSelf:"center",children:a?t("color"):void 0})]}),Object.values(E).filter(s=>!(s===E.Simple&&p>=0)).map(s=>e.jsx(i,{"aria-label":s,leftIcon:P[s].icon,onClick:()=>z(s),variant:l==="line-".concat(s)?"solid":"outline",sx:c,children:a?t(P[s].metadata.displayName):void 0},s)),e.jsx(i,{"aria-label":n.Virtual,leftIcon:d[n.Virtual].icon,onClick:()=>j(n.Virtual),variant:l==="misc-node-".concat(n.Virtual)?"solid":"outline",sx:c,children:a?t(d[n.Virtual].metadata.displayName):void 0})]})]}),e.jsxs(b,{children:[e.jsxs(g,{sx:w,children:[a&&e.jsx(v,{as:"span",flex:"1",textAlign:"left",children:t("panel.tools.section.stations")}),e.jsx(M,{})]}),e.jsxs(T,{sx:A,children:[Object.values(oe).map(s=>e.jsx(i,{"aria-label":s,leftIcon:R[s].icon,onClick:()=>y(s),variant:l==="station-".concat(s)?"solid":"outline",sx:c,children:a?t(R[s].metadata.displayName):void 0},s)),e.jsx(D,{type:"station",expand:a})]})]}),e.jsxs(b,{children:[e.jsxs(g,{sx:w,children:[a&&e.jsx(v,{as:"span",flex:"1",textAlign:"left",children:t("panel.tools.section.miscellaneousNodes")}),e.jsx(M,{})]}),e.jsxs(T,{sx:A,children:[e.jsxs(i,{"aria-label":n.Master,leftIcon:d[n.Master].icon,onClick:()=>j(n.Master),variant:l==="misc-node-".concat(n.Master)?"solid":"outline",isDisabled:W,sx:c,children:[a?t(d[n.Master].metadata.displayName):void 0,a?e.jsxs(e.Fragment,{children:[e.jsx(k,{ml:"1",colorScheme:"green",children:"New"}),e.jsx(U,{label:t("header.settings.proWithTrial"),children:e.jsx(k,{ml:"1",color:"gray.50",background:"radial-gradient(circle, #3f5efb, #fc466b)",mr:"auto",children:"PRO"})})]}):void 0]}),Object.values(n).filter(s=>s!==n.Virtual&&s!==n.I18nText&&s!==n.Master).map(s=>e.jsx(i,{"aria-label":s,leftIcon:d[s].icon,onClick:()=>j(s),variant:l==="misc-node-".concat(s)?"solid":"outline",sx:c,children:a?t(d[s].metadata.displayName):void 0},s)),e.jsx(D,{type:"misc-node",expand:a})]})]})]})})]})},D=t=>{const{type:o,expand:u}=t,{t:p}=O(),r=o==="misc-node"?"nodes":o==="station"?"stations":"line-styles",l=o==="line"?"xs":void 0,h=o==="line"?"30px":"40px";return e.jsxs(X,{fontSize:l,children:[o!=="line"&&e.jsx(K.Provider,{value:{style:{padding:5},size:h},children:e.jsx(ne,{})}),u&&e.jsxs(e.Fragment,{children:[e.jsx(J,{color:"teal.500",href:"https://github.com/railmapgen/rmp/blob/main/docs/".concat(r,".md"),isExternal:!0,children:p("panel.tools.learnHowToAdd.".concat(o))}),e.jsx(Y,{as:le,color:"teal.500",mr:"auto"})]})]})};export{D as LearnHowToAdd,ue as default}; diff --git a/assets/tools-legacy-Dm25lVuJ.js b/assets/tools-legacy-XMueayxR.js similarity index 97% rename from assets/tools-legacy-Dm25lVuJ.js rename to assets/tools-legacy-XMueayxR.js index c8712a242..462a3d5af 100644 --- a/assets/tools-legacy-Dm25lVuJ.js +++ b/assets/tools-legacy-XMueayxR.js @@ -1 +1 @@ -System.register(["./chakra-legacy--ElhKRU8.js","./react-legacy-CB7hQk4J.js","./index-legacy-iSkJTZGA.js","./misc-nodes-legacy-CSfzn9IA.js","./master-manager-legacy-BrdnNHXw.js"],(function(e,s){"use strict";var a,l,t,i,n,o,r,c,d,x,h,j,m,u,p,f,g,v,b,y,k,w,C,S,I,M,$,N,V,A,O,z,D,P,T,W,L;return{setters:[e=>{a=e.a6,l=e.j,t=e.g,i=e.O,n=e.aV,o=e.aW,r=e.aX,c=e.B,d=e.aY,x=e.aZ,h=e.a4,j=e.U,m=e.aM,u=e.aK,p=e.a_,f=e.a7,g=e.aE},e=>{v=e.u,b=e.b},e=>{y=e.c,k=e.d,w=e.aH,C=e.ay,S=e.aI,I=e.aJ,M=e.aq,$=e.V,N=e.W,V=e.k,A=e.l,O=e.aw,z=e.S,D=e.aK,P=e.b,T=e.aL},e=>{W=e.m},e=>{L=e.s}],execute:function(){const s={justifyContent:"flex-start",p:0,w:"100%",h:10},E={p:2.5,h:10},H={p:0,display:"flex",flexDirection:"column"},B=l.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:l.jsx("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2",stroke:"currentColor",strokeDasharray:"2",fill:"none"})}),F=(e("default",(()=>{const{t:e}=v(),u=y(),{activeSubscriptions:p}=k((e=>e.account)),{preference:{unlockSimplePathAttempts:f,toolsPanel:{expand:g}}}=k((e=>e.app)),{mode:D,theme:P,paletteAppClip:{output:K},masterNodesCount:R}=k((e=>e.runtime)),U=a("white","var(--chakra-colors-gray-800)"),[_,q]=b.useState(!1);b.useEffect((()=>{_&&K&&(u(w(K)),q(!1))}),[null==K?void 0:K.toString()]);const[J,X]=b.useState(g),Y=e=>u(M(`misc-node-${e}`)),Z=!p.RMP_CLOUD&&R+1>C;return l.jsxs(t,{flexShrink:"0",direction:"column",width:g?450:10,maxWidth:"100%",height:"100%",bg:U,zIndex:"5",transition:"width 0.3s ease-in-out",children:[l.jsx(i,{"aria-label":"Menu",leftIcon:J?l.jsx(S,{size:40,transform:"rotate(90)"}):l.jsx(I,{size:40,transform:"rotate(90)"}),onClick:()=>{g?X(!1):setTimeout((()=>X(!0)),320),u(T(!g))},sx:s,children:J?e("panel.tools.showLess"):void 0}),l.jsx(t,{className:"tools",overflow:"auto",children:l.jsxs(n,{width:"100%",allowMultiple:!0,defaultIndex:[0,1,2],children:[l.jsx(i,{"aria-label":"select",leftIcon:B,onClick:()=>u(M("select"===D?"free":"select")),variant:"select"===D?"solid":"outline",sx:s,children:J?e("panel.tools.select"):void 0}),l.jsxs(o,{children:[l.jsxs(r,{sx:E,children:[J&&l.jsx(c,{as:"span",flex:"1",textAlign:"left",children:e("panel.tools.section.lineDrawing")}),l.jsx(d,{})]}),l.jsxs(x,{sx:H,children:[l.jsxs(t,{children:[l.jsx($,{theme:P,onClick:()=>{q(!0),u(N(P))}}),l.jsx(h,{fontWeight:"600",pl:"1",alignSelf:"center",children:J?e("color"):void 0})]}),Object.values(V).filter((e=>!(e===V.Simple&&f>=0))).map((a=>l.jsx(i,{"aria-label":a,leftIcon:A[a].icon,onClick:()=>(e=>u(M(`line-${e}`)))(a),variant:D===`line-${a}`?"solid":"outline",sx:s,children:J?e(A[a].metadata.displayName):void 0},a))),l.jsx(i,{"aria-label":O.Virtual,leftIcon:W[O.Virtual].icon,onClick:()=>Y(O.Virtual),variant:D===`misc-node-${O.Virtual}`?"solid":"outline",sx:s,children:J?e(W[O.Virtual].metadata.displayName):void 0})]})]}),l.jsxs(o,{children:[l.jsxs(r,{sx:E,children:[J&&l.jsx(c,{as:"span",flex:"1",textAlign:"left",children:e("panel.tools.section.stations")}),l.jsx(d,{})]}),l.jsxs(x,{sx:H,children:[Object.values(z).map((a=>l.jsx(i,{"aria-label":a,leftIcon:L[a].icon,onClick:()=>(e=>u(M(`station-${e}`)))(a),variant:D===`station-${a}`?"solid":"outline",sx:s,children:J?e(L[a].metadata.displayName):void 0},a))),l.jsx(F,{type:"station",expand:J})]})]}),l.jsxs(o,{children:[l.jsxs(r,{sx:E,children:[J&&l.jsx(c,{as:"span",flex:"1",textAlign:"left",children:e("panel.tools.section.miscellaneousNodes")}),l.jsx(d,{})]}),l.jsxs(x,{sx:H,children:[l.jsxs(i,{"aria-label":O.Master,leftIcon:W[O.Master].icon,onClick:()=>Y(O.Master),variant:D===`misc-node-${O.Master}`?"solid":"outline",isDisabled:Z,sx:s,children:[J?e(W[O.Master].metadata.displayName):void 0,J?l.jsxs(l.Fragment,{children:[l.jsx(j,{ml:"1",colorScheme:"green",children:"New"}),l.jsx(m,{label:e("header.settings.proWithTrial"),children:l.jsx(j,{ml:"1",color:"gray.50",background:"radial-gradient(circle, #3f5efb, #fc466b)",mr:"auto",children:"PRO"})})]}):void 0]}),Object.values(O).filter((e=>e!==O.Virtual&&e!==O.I18nText&&e!==O.Master)).map((a=>l.jsx(i,{"aria-label":a,leftIcon:W[a].icon,onClick:()=>Y(a),variant:D===`misc-node-${a}`?"solid":"outline",sx:s,children:J?e(W[a].metadata.displayName):void 0},a))),l.jsx(F,{type:"misc-node",expand:J})]})]})]})})]})})),e("LearnHowToAdd",(e=>{const{type:s,expand:a}=e,{t:t}=v(),i="misc-node"===s?"nodes":"station"===s?"stations":"line-styles",n="line"===s?"xs":void 0,o="line"===s?"30px":"40px";return l.jsxs(u,{fontSize:n,children:["line"!==s&&l.jsx(p.Provider,{value:{style:{padding:5},size:o},children:l.jsx(D,{})}),a&&l.jsxs(l.Fragment,{children:[l.jsx(f,{color:"teal.500",href:`https://github.com/railmapgen/rmp/blob/main/docs/${i}.md`,isExternal:!0,children:t(`panel.tools.learnHowToAdd.${s}`)}),l.jsx(g,{as:P,color:"teal.500",mr:"auto"})]})]})})))}}})); +System.register(["./chakra-legacy--ElhKRU8.js","./react-legacy-CB7hQk4J.js","./index-legacy-jqOeRlnz.js","./misc-nodes-legacy-DUcImzkb.js","./master-manager-legacy-CCeMINwh.js"],(function(e,s){"use strict";var a,l,t,i,n,o,r,c,d,x,h,j,m,u,p,f,g,v,b,y,k,w,C,S,I,M,$,N,V,A,O,z,D,P,T,W,L;return{setters:[e=>{a=e.a6,l=e.j,t=e.g,i=e.O,n=e.aV,o=e.aW,r=e.aX,c=e.B,d=e.aY,x=e.aZ,h=e.a4,j=e.U,m=e.aM,u=e.aK,p=e.a_,f=e.a7,g=e.aE},e=>{v=e.u,b=e.b},e=>{y=e.c,k=e.d,w=e.aH,C=e.ay,S=e.aI,I=e.aJ,M=e.aq,$=e.V,N=e.W,V=e.k,A=e.l,O=e.aw,z=e.S,D=e.aK,P=e.b,T=e.aL},e=>{W=e.m},e=>{L=e.s}],execute:function(){const s={justifyContent:"flex-start",p:0,w:"100%",h:10},E={p:2.5,h:10},H={p:0,display:"flex",flexDirection:"column"},B=l.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:l.jsx("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2",stroke:"currentColor",strokeDasharray:"2",fill:"none"})}),F=(e("default",(()=>{const{t:e}=v(),u=y(),{activeSubscriptions:p}=k((e=>e.account)),{preference:{unlockSimplePathAttempts:f,toolsPanel:{expand:g}}}=k((e=>e.app)),{mode:D,theme:P,paletteAppClip:{output:K},masterNodesCount:R}=k((e=>e.runtime)),U=a("white","var(--chakra-colors-gray-800)"),[_,q]=b.useState(!1);b.useEffect((()=>{_&&K&&(u(w(K)),q(!1))}),[null==K?void 0:K.toString()]);const[J,X]=b.useState(g),Y=e=>u(M(`misc-node-${e}`)),Z=!p.RMP_CLOUD&&R+1>C;return l.jsxs(t,{flexShrink:"0",direction:"column",width:g?450:10,maxWidth:"100%",height:"100%",bg:U,zIndex:"5",transition:"width 0.3s ease-in-out",children:[l.jsx(i,{"aria-label":"Menu",leftIcon:J?l.jsx(S,{size:40,transform:"rotate(90)"}):l.jsx(I,{size:40,transform:"rotate(90)"}),onClick:()=>{g?X(!1):setTimeout((()=>X(!0)),320),u(T(!g))},sx:s,children:J?e("panel.tools.showLess"):void 0}),l.jsx(t,{className:"tools",overflow:"auto",children:l.jsxs(n,{width:"100%",allowMultiple:!0,defaultIndex:[0,1,2],children:[l.jsx(i,{"aria-label":"select",leftIcon:B,onClick:()=>u(M("select"===D?"free":"select")),variant:"select"===D?"solid":"outline",sx:s,children:J?e("panel.tools.select"):void 0}),l.jsxs(o,{children:[l.jsxs(r,{sx:E,children:[J&&l.jsx(c,{as:"span",flex:"1",textAlign:"left",children:e("panel.tools.section.lineDrawing")}),l.jsx(d,{})]}),l.jsxs(x,{sx:H,children:[l.jsxs(t,{children:[l.jsx($,{theme:P,onClick:()=>{q(!0),u(N(P))}}),l.jsx(h,{fontWeight:"600",pl:"1",alignSelf:"center",children:J?e("color"):void 0})]}),Object.values(V).filter((e=>!(e===V.Simple&&f>=0))).map((a=>l.jsx(i,{"aria-label":a,leftIcon:A[a].icon,onClick:()=>(e=>u(M(`line-${e}`)))(a),variant:D===`line-${a}`?"solid":"outline",sx:s,children:J?e(A[a].metadata.displayName):void 0},a))),l.jsx(i,{"aria-label":O.Virtual,leftIcon:W[O.Virtual].icon,onClick:()=>Y(O.Virtual),variant:D===`misc-node-${O.Virtual}`?"solid":"outline",sx:s,children:J?e(W[O.Virtual].metadata.displayName):void 0})]})]}),l.jsxs(o,{children:[l.jsxs(r,{sx:E,children:[J&&l.jsx(c,{as:"span",flex:"1",textAlign:"left",children:e("panel.tools.section.stations")}),l.jsx(d,{})]}),l.jsxs(x,{sx:H,children:[Object.values(z).map((a=>l.jsx(i,{"aria-label":a,leftIcon:L[a].icon,onClick:()=>(e=>u(M(`station-${e}`)))(a),variant:D===`station-${a}`?"solid":"outline",sx:s,children:J?e(L[a].metadata.displayName):void 0},a))),l.jsx(F,{type:"station",expand:J})]})]}),l.jsxs(o,{children:[l.jsxs(r,{sx:E,children:[J&&l.jsx(c,{as:"span",flex:"1",textAlign:"left",children:e("panel.tools.section.miscellaneousNodes")}),l.jsx(d,{})]}),l.jsxs(x,{sx:H,children:[l.jsxs(i,{"aria-label":O.Master,leftIcon:W[O.Master].icon,onClick:()=>Y(O.Master),variant:D===`misc-node-${O.Master}`?"solid":"outline",isDisabled:Z,sx:s,children:[J?e(W[O.Master].metadata.displayName):void 0,J?l.jsxs(l.Fragment,{children:[l.jsx(j,{ml:"1",colorScheme:"green",children:"New"}),l.jsx(m,{label:e("header.settings.proWithTrial"),children:l.jsx(j,{ml:"1",color:"gray.50",background:"radial-gradient(circle, #3f5efb, #fc466b)",mr:"auto",children:"PRO"})})]}):void 0]}),Object.values(O).filter((e=>e!==O.Virtual&&e!==O.I18nText&&e!==O.Master)).map((a=>l.jsx(i,{"aria-label":a,leftIcon:W[a].icon,onClick:()=>Y(a),variant:D===`misc-node-${a}`?"solid":"outline",sx:s,children:J?e(W[a].metadata.displayName):void 0},a))),l.jsx(F,{type:"misc-node",expand:J})]})]})]})})]})})),e("LearnHowToAdd",(e=>{const{type:s,expand:a}=e,{t:t}=v(),i="misc-node"===s?"nodes":"station"===s?"stations":"line-styles",n="line"===s?"xs":void 0,o="line"===s?"30px":"40px";return l.jsxs(u,{fontSize:n,children:["line"!==s&&l.jsx(p.Provider,{value:{style:{padding:5},size:o},children:l.jsx(D,{})}),a&&l.jsxs(l.Fragment,{children:[l.jsx(f,{color:"teal.500",href:`https://github.com/railmapgen/rmp/blob/main/docs/${i}.md`,isExternal:!0,children:t(`panel.tools.learnHowToAdd.${s}`)}),l.jsx(g,{as:P,color:"teal.500",mr:"auto"})]})]})})))}}})); diff --git a/images/facilities/airport_2024.svg b/images/facilities/airport_2024.svg index 58c57a55d..aa2febb9a 100644 --- a/images/facilities/airport_2024.svg +++ b/images/facilities/airport_2024.svg @@ -1,5 +1,5 @@ - - - + + + diff --git a/images/facilities/railway_2024.svg b/images/facilities/railway_2024.svg index 35ce31d22..7fe507cfa 100644 --- a/images/facilities/railway_2024.svg +++ b/images/facilities/railway_2024.svg @@ -1,8 +1,8 @@ - - - + + + - - + + diff --git a/index.html b/index.html index d415d694d..bd75ae296 100644 --- a/index.html +++ b/index.html @@ -15,7 +15,7 @@ Rail Map Painter - + @@ -52,6 +52,6 @@ - + diff --git a/info.json b/info.json index 790eed4c8..683874c43 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "component": "rmp", - "version": "5.1.19", + "version": "5.1.20", "environment": "PRD", "instance": "GitHub" }