@rr0/ufoathome 0.124.0 → 0.125.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/dist-embed-interview/rr0-interview.mjs +8 -7
  2. package/dist-embed-scene/{AdsbLolArchiveProvider-Ju7E64iO.js → AdsbLolArchiveProvider-CL1XUape.js} +1 -1
  3. package/dist-embed-scene/{ContrailSystem-BlsY0hsn.js → ContrailSystem-CG5BhBF7.js} +1 -1
  4. package/dist-embed-scene/GLTFLoader-CowOlg4J.js +1 -0
  5. package/dist-embed-scene/{HeadlightSystem-k2VkX7hN.js → HeadlightSystem-OwCRe0Vs.js} +1 -1
  6. package/dist-embed-scene/RailwaySystem-usuVIAY1.js +41 -0
  7. package/dist-embed-scene/{RoadMarkings-Bd5i68iF.js → RoadMarkings-DbE4nCJ2.js} +1 -1
  8. package/dist-embed-scene/SceneNames_es-B9tudMDH.js +1 -0
  9. package/dist-embed-scene/SceneNames_fr-DAd-g0yB.js +1 -0
  10. package/dist-embed-scene/SceneNames_it-BLLX--oG.js +1 -0
  11. package/dist-embed-scene/{TraceSystem-D2DpL5Qj.js → TraceSystem-B9WBM9ut.js} +1 -1
  12. package/dist-embed-scene/WaterSystem-yC8sKIc5.js +1 -0
  13. package/dist-embed-scene/rr0-scene.mjs +374 -334
  14. package/dist-embed-scene/sightingSchema-v2l1p6Ld.js +1 -0
  15. package/dist-embed-sighting/{AdsbLolArchiveProvider-BUE3bdCg.js → AdsbLolArchiveProvider-DvCD0VGc.js} +1 -1
  16. package/dist-embed-sighting/ContrailSystem-XVzDvxFV.js +1 -0
  17. package/dist-embed-sighting/GLTFLoader-DjN5_ISf.js +1 -0
  18. package/dist-embed-sighting/{HeadlightSystem-DmXqrF-e.js → HeadlightSystem-BAkFE-MU.js} +1 -1
  19. package/dist-embed-sighting/RailwaySystem-BMOTAo7T.js +41 -0
  20. package/dist-embed-sighting/{RoadMarkings-C_046g21.js → RoadMarkings-DtoEUDmh.js} +1 -1
  21. package/dist-embed-sighting/SceneNames_es-VHJ-mGWu.js +1 -0
  22. package/dist-embed-sighting/SceneNames_fr-BtjbcaRx.js +1 -0
  23. package/dist-embed-sighting/SceneNames_it-Ck8f90Z6.js +1 -0
  24. package/dist-embed-sighting/{SightingMessages_es-C88y-33t.js → SightingMessages_es-OXYzPf-m.js} +1 -1
  25. package/dist-embed-sighting/{SightingMessages_fr-DC2iwVp3.js → SightingMessages_fr-ylqIoox7.js} +1 -1
  26. package/dist-embed-sighting/{SightingMessages_it-B5t71z1M.js → SightingMessages_it-B9f92W5s.js} +1 -1
  27. package/dist-embed-sighting/{TraceSystem-DxQWm8ZH.js → TraceSystem-DpokUmzt.js} +2 -2
  28. package/dist-embed-sighting/WaterSystem-BLt9Dsxc.js +1 -0
  29. package/dist-embed-sighting/rr0-sighting.mjs +379 -339
  30. package/dist-embed-sighting/sightingSchema-v2l1p6Ld.js +1 -0
  31. package/dist-embed-sighting-editor/{AdsbLolArchiveProvider-CFgVABcu.js → AdsbLolArchiveProvider-BtbGVTLo.js} +1 -1
  32. package/dist-embed-sighting-editor/{BodyEditor-Dg97ZrRa.js → BodyEditor-DinH26FA.js} +1 -1
  33. package/dist-embed-sighting-editor/ContrailSystem-Bh3PmOP9.js +1 -0
  34. package/dist-embed-sighting-editor/{CoverageAssessor-8zrC-ZY0.js → CoverageAssessor-DCGCl8ic.js} +1 -1
  35. package/dist-embed-sighting-editor/{GLTFLoader-RPFGUAaO.js → GLTFLoader-Bpggnw6G.js} +1 -1
  36. package/dist-embed-sighting-editor/{HeadlightSystem-DbRok2GO.js → HeadlightSystem-DOjC-oxf.js} +1 -1
  37. package/dist-embed-sighting-editor/HynekAssessor-DTuaJ9gE.js +1 -0
  38. package/dist-embed-sighting-editor/{InterviewEditorElement-DRjEJwEk.js → InterviewEditorElement-BRL8pvdi.js} +8 -7
  39. package/dist-embed-sighting-editor/{LaunchEditor-byu9U1W7.js → LaunchEditor-CFmH6y0N.js} +1 -1
  40. package/dist-embed-sighting-editor/ModelSource-SZRN-dar.js +1 -0
  41. package/dist-embed-sighting-editor/{ModelThumbnails-hmPAkRbd.js → ModelThumbnails-6N7NAP44.js} +1 -1
  42. package/dist-embed-sighting-editor/{ModelViewer-Mvug9CHB.js → ModelViewer-C_mVYZ1c.js} +1 -1
  43. package/dist-embed-sighting-editor/RailwaySystem-BTm6OfuJ.js +41 -0
  44. package/dist-embed-sighting-editor/{RoadMarkings-BKfyWjdC.js → RoadMarkings-AaLPDthv.js} +1 -1
  45. package/dist-embed-sighting-editor/SceneNames_es-4pppn42v.js +1 -0
  46. package/dist-embed-sighting-editor/SceneNames_fr-odZ6uYWU.js +1 -0
  47. package/dist-embed-sighting-editor/SceneNames_it-lXfB7y6i.js +1 -0
  48. package/dist-embed-sighting-editor/{SightingEditorMessages_es-DvIK6dPp.js → SightingEditorMessages_es-1QZ2n8km.js} +2 -2
  49. package/dist-embed-sighting-editor/{SightingEditorMessages_fr-Ds1GsY_1.js → SightingEditorMessages_fr-DAg8lRfr.js} +2 -2
  50. package/dist-embed-sighting-editor/{SightingEditorMessages_it-Y2D8aYCY.js → SightingEditorMessages_it-C2TQ7muu.js} +2 -2
  51. package/dist-embed-sighting-editor/{SightingFileEditor-C0NC8jbz.js → SightingFileEditor-7inIgp24.js} +1 -1
  52. package/dist-embed-sighting-editor/{TraceSystem-BMYhHoF0.js → TraceSystem-D8oL7SlQ.js} +2 -2
  53. package/dist-embed-sighting-editor/WaterSystem-1r0jEJ6E.js +1 -0
  54. package/dist-embed-sighting-editor/{caseSchema-BDFgjA8v.js → caseSchema-ByeWR3Rx.js} +1 -1
  55. package/dist-embed-sighting-editor/{interviewSchema-CMRZUnRy.js → interviewSchema-m_h5f8H0.js} +1 -1
  56. package/dist-embed-sighting-editor/rr0-sighting-editor.mjs +403 -425
  57. package/dist-embed-sighting-editor/sightingSchema-v2l1p6Ld.js +1 -0
  58. package/dist-embed-sighting-editor/surroundingsSources-98rSCu2Y.js +1 -0
  59. package/dist-embed-sighting-editor/{trafficRuntime-BtljEizX.js → trafficRuntime-Dk4XdgcY.js} +1 -1
  60. package/package.json +3 -1
  61. package/dist-embed-scene/GLTFLoader-BHGcTcu1.js +0 -1
  62. package/dist-embed-scene/SceneNames_es-b8rqu51e.js +0 -1
  63. package/dist-embed-scene/SceneNames_fr-sF9gfZV2.js +0 -1
  64. package/dist-embed-scene/SceneNames_it-CoR2S3bM.js +0 -1
  65. package/dist-embed-scene/sightingSchema-kkSSrggd.js +0 -1
  66. package/dist-embed-sighting/ContrailSystem-DjBzEFUl.js +0 -1
  67. package/dist-embed-sighting/GLTFLoader-DvLBfH-C.js +0 -1
  68. package/dist-embed-sighting/SceneNames_es-rKjN2baM.js +0 -1
  69. package/dist-embed-sighting/SceneNames_fr-CSUSeZT0.js +0 -1
  70. package/dist-embed-sighting/SceneNames_it-C-mVddAw.js +0 -1
  71. package/dist-embed-sighting/sightingSchema-kkSSrggd.js +0 -1
  72. package/dist-embed-sighting-editor/ContrailSystem-DSdLswxr.js +0 -1
  73. package/dist-embed-sighting-editor/HynekAssessor-9gYrshkH.js +0 -1
  74. package/dist-embed-sighting-editor/ModelSource-f1GhdDou.js +0 -1
  75. package/dist-embed-sighting-editor/SceneNames_es-cN-l95fv.js +0 -1
  76. package/dist-embed-sighting-editor/SceneNames_fr-ZUtpsigH.js +0 -1
  77. package/dist-embed-sighting-editor/SceneNames_it-DLqJc0Rc.js +0 -1
  78. package/dist-embed-sighting-editor/sightingSchema-kkSSrggd.js +0 -1
  79. package/dist-embed-sighting-editor/surroundingsSources-BtDVuj-U.js +0 -1
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./SightingFileEditor-C0NC8jbz.js","./sightingSchema-kkSSrggd.js"])))=>i.map(i=>d[i]);
2
- import{S as x,a as y,H as O,s as R,U as j,l as I,I as U,b as B,c as g,_ as T,d as M}from"./rr0-sighting-editor.mjs";import{interviewMessages_en as k}from"./InterviewMessages_en-cs-wWpmz.js";import{InterviewMedia as A}from"./InterviewMedia-CvAxC62V.js";import{InterviewFile as v}from"./interviewJson-CfwBPiuG.js";const N="rr0-interview",D=`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./SightingFileEditor-7inIgp24.js","./sightingSchema-v2l1p6Ld.js"])))=>i.map(i=>d[i]);
2
+ import{S as x,a as y,H as O,s as R,U as j,l as I,I as U,P as B,b as M,c as g,_ as T,d as P}from"./rr0-sighting-editor.mjs";import{interviewMessages_en as k}from"./InterviewMessages_en-cs-wWpmz.js";import{InterviewMedia as A}from"./InterviewMedia-CvAxC62V.js";import{InterviewFile as v}from"./interviewJson-CfwBPiuG.js";const N="rr0-interview",H=`
3
3
  rr0-interview { display: block; --rr0-interview-line: color-mix(in srgb, currentColor 35%, transparent); }
4
4
  rr0-interview [hidden] { display: none !important; }
5
5
  rr0-interview .rr0-interview-status { font-size: .85em; opacity: .85; margin: 0 0 .5em; }
@@ -24,8 +24,9 @@ rr0-interview .bar::after { content: attr(data-tip); display: none; position: ab
24
24
  rr0-interview .bar:hover::after, rr0-interview .bar:focus::after { display: block; }
25
25
  rr0-interview .turn .refs { display: flex; flex-wrap: wrap; gap: .25em; }
26
26
  rr0-interview .turn .ref { font: inherit; font-size: .8em; cursor: pointer; border: 1px solid var(--rr0-interview-line); border-radius: 999px; background: transparent; color: inherit;
27
- padding: 0 .35em; font-variant-numeric: tabular-nums; white-space: nowrap; }
28
- `;class L extends HTMLElement{messages=k;said=new x(["en"]);localeToken=0;loadToken=0;json;loading;base;status=document.createElement("p");turns=document.createElement("div");blocks=new Map;constructor(){super(),this.status.className="rr0-interview-status",this.status.setAttribute("role","status"),this.turns.className="rr0-interview-turns"}static get observedAttributes(){return["src"]}attributeChangedCallback(e,t,i){e==="src"&&i!==t&&this.isConnected&&this.load()}connectedCallback(){L.styleRoot(this.getRootNode()),this.contains(this.turns)||this.replaceChildren(this.status,this.turns),this.loadLocale(),this.hasAttribute("src")&&this.json===void 0&&this.loading!==this.getAttribute("src")&&this.load()}get interview(){return this.json}set interview(e){this.loadToken++,this.json=e,this.draw()}set documentUrl(e){this.base=e}static styleRoot(e){const t=e instanceof ShadowRoot?e:document.head;if(t.querySelector("style[data-rr0-interview]"))return;const i=document.createElement("style");i.dataset.rr0Interview="",i.textContent=D,t.append(i)}async load(){const e=this.getAttribute("src"),t=++this.loadToken;if(this.loading=e??void 0,!e)return;const i=new URL(e,location.href).href;let s;try{s=await y.json(i)}catch{s=void 0}t===this.loadToken&&(this.base=i,this.json=s,this.draw())}async loadLocale(){const e=++this.localeToken,t=O.preferencesFor(this),i=R(t,j),s=i==="en"?k:await I(i);e===this.localeToken&&(this.said=new x(t),this.messages=s,this.draw())}speakerName(e,t){const i=v.speakerName(e,t),s=e.speakers?.[t]?.role;return i===s&&s in this.messages.roles?this.messages.roles[s]:i}seek(e){const t=this.json,i={sighting:e.sighting??v.sightingsOf(t)[0],at:e.at};this.dispatchEvent(new CustomEvent(U,{bubbles:!0,composed:!0,detail:i}));const s=this.getAttribute("player");if(!s)return;const c=this.getRootNode().getElementById?.(s);typeof c?.seekTo=="function"&&(c.scrollIntoView?.({block:"center",behavior:"smooth"}),c.seekTo(i.at,i.sighting))}gap(e,t){const i=document.createElement(t),s=document.createElement("span");s.className="bar";const r=`${this.messages.redacted} : ${this.said.read(e)??""}`;return s.dataset.tip=r,s.tabIndex=0,s.setAttribute("role","img"),s.setAttribute("aria-label",r),i.append(s),i}saidNodes(e){if(!/[<&]/.test(e))return[document.createTextNode(e)];const t=document.createElement("template");t.innerHTML=e;for(const i of t.content.querySelectorAll("*")){if(["SCRIPT","STYLE","IFRAME","OBJECT","EMBED"].includes(i.tagName)){i.remove();continue}for(const s of[...i.attributes])if(/^on/i.test(s.name)||/^\s*javascript:/i.test(s.value))i.removeAttribute(s.name);else if(["href","src"].includes(s.name))try{s.value=new URL(s.value,this.base??location.href).href}catch{}}return[...t.content.childNodes]}draw(){const e=this.messages,t=this.json;this.blocks.clear();const i=Array.isArray(t?.segments)?t.segments:[];if(!t||i.length===0){this.status.hidden=!0;const n=document.createElement("p");n.textContent=e.exchangesEmpty,this.turns.replaceChildren(n);return}const s=t.speakers??{},r=Object.keys(s);if(t.proofreading){const n=r.filter(h=>!["approved","covered"].includes(t.proofreading?.[h]?.status??""));this.status.textContent=n.length===0?e.proofreadAll:e.proofreadPending.replace("{names}",n.map(h=>this.speakerName(t,h)).join(", ")),this.status.hidden=!1}else this.status.hidden=!0;const c=[];let a,p=!1,l,o;i.forEach((n,h)=>{const E=n.redacted?JSON.stringify(n.redacted.reason):void 0;if(E!==void 0&&l?.reason===E){this.blocks.set(h,l.block),n.speaker!==o&&(o=void 0);return}const m=document.createElement("div");m.className="turn",m.dataset.segment=String(h);const w=document.createElement("div");w.className="who";const C=document.createElement("span");if(C.textContent=n.redacted?"":this.speakerName(t,n.speaker),n.start!==void 0&&(m.dataset.time=v.clock(n.start,!0)),o!==n.speaker&&(a=document.createElement("div"),a.className="intervention",a.style.setProperty("--speaker-hue",String((Math.max(0,r.indexOf(n.speaker))*67+210)%360)),c.push(a),p=!1),n.redacted||(p&&m.classList.add("goes-on"),p=!0),a.append(m),o=n.speaker,w.append(C),n.redacted){m.classList.add("is-redacted");const u=this.gap(n.redacted.reason,"p");u.className="redacted",l={block:m,reason:E},m.append(w,u)}else{const u=document.createElement("p");if(u.className="said",n.parts){let b="";for(const f of n.parts){const S="redacted"in f?"▮":v.plain(f.text);/[\p{L}\p{N}.,;:!?)»”…▮]$/u.test(b)&&/^[\p{L}\p{N}(«“▮]/u.test(S)&&u.append(" "),"redacted"in f?u.append(this.gap(f.redacted.reason,"span")):u.append(...this.saidNodes(f.text)),b=S}}else u.append(...this.saidNodes(n.text??""));l=void 0,m.append(w,u)}if(n.refs?.length){const u=document.createElement("div");u.className="refs";for(const b of n.refs){const f=document.createElement("button");f.type="button",f.className="ref",f.textContent=`↗ ${v.clock(b.at,!0)}`,f.addEventListener("click",()=>this.seek(b)),u.append(f)}m.append(u)}this.blocks.set(h,m)}),this.turns.replaceChildren(...c)}revealSegment(e){const t=this.blocks.get(e);t&&(t.scrollIntoView?.({block:"center"}),t.classList.add("flash"),window.setTimeout(()=>t.classList.remove("flash"),1600))}}function H(){customElements.get(N)||customElements.define(N,L)}const F="rr0-interview-editor",P=`
27
+ padding: 0 .35em; font-variant-numeric: tabular-nums; white-space: nowrap; display: inline-flex; align-items: center; gap: .15em; }
28
+ rr0-interview .turn .ref svg { width: 1.1em; height: 1.1em; }
29
+ `;class L extends HTMLElement{messages=k;said=new x(["en"]);localeToken=0;loadToken=0;json;loading;base;status=document.createElement("p");turns=document.createElement("div");blocks=new Map;constructor(){super(),this.status.className="rr0-interview-status",this.status.setAttribute("role","status"),this.turns.className="rr0-interview-turns"}static get observedAttributes(){return["src"]}attributeChangedCallback(e,t,i){e==="src"&&i!==t&&this.isConnected&&this.load()}connectedCallback(){L.styleRoot(this.getRootNode()),this.contains(this.turns)||this.replaceChildren(this.status,this.turns),this.loadLocale(),this.hasAttribute("src")&&this.json===void 0&&this.loading!==this.getAttribute("src")&&this.load()}get interview(){return this.json}set interview(e){this.loadToken++,this.json=e,this.draw()}set documentUrl(e){this.base=e}static styleRoot(e){const t=e instanceof ShadowRoot?e:document.head;if(t.querySelector("style[data-rr0-interview]"))return;const i=document.createElement("style");i.dataset.rr0Interview="",i.textContent=H,t.append(i)}async load(){const e=this.getAttribute("src"),t=++this.loadToken;if(this.loading=e??void 0,!e)return;const i=new URL(e,location.href).href;let s;try{s=await y.json(i)}catch{s=void 0}t===this.loadToken&&(this.base=i,this.json=s,this.draw())}async loadLocale(){const e=++this.localeToken,t=O.preferencesFor(this),i=R(t,j),s=i==="en"?k:await I(i);e===this.localeToken&&(this.said=new x(t),this.messages=s,this.draw())}speakerName(e,t){const i=v.speakerName(e,t),s=e.speakers?.[t]?.role;return i===s&&s in this.messages.roles?this.messages.roles[s]:i}seek(e){const t=this.json,i={sighting:e.sighting??v.sightingsOf(t)[0],at:e.at};this.dispatchEvent(new CustomEvent(U,{bubbles:!0,composed:!0,detail:i}));const s=this.getAttribute("player");if(!s)return;const c=this.getRootNode().getElementById?.(s);typeof c?.seekTo=="function"&&(c.scrollIntoView?.({block:"center",behavior:"smooth"}),c.seekTo(i.at,i.sighting))}gap(e,t){const i=document.createElement(t),s=document.createElement("span");s.className="bar";const r=`${this.messages.redacted} : ${this.said.read(e)??""}`;return s.dataset.tip=r,s.tabIndex=0,s.setAttribute("role","img"),s.setAttribute("aria-label",r),i.append(s),i}saidNodes(e){if(!/[<&]/.test(e))return[document.createTextNode(e)];const t=document.createElement("template");t.innerHTML=e;for(const i of t.content.querySelectorAll("*")){if(["SCRIPT","STYLE","IFRAME","OBJECT","EMBED"].includes(i.tagName)){i.remove();continue}for(const s of[...i.attributes])if(/^on/i.test(s.name)||/^\s*javascript:/i.test(s.value))i.removeAttribute(s.name);else if(["href","src"].includes(s.name))try{s.value=new URL(s.value,this.base??location.href).href}catch{}}return[...t.content.childNodes]}draw(){const e=this.messages,t=this.json;this.blocks.clear();const i=Array.isArray(t?.segments)?t.segments:[];if(!t||i.length===0){this.status.hidden=!0;const n=document.createElement("p");n.textContent=e.exchangesEmpty,this.turns.replaceChildren(n);return}const s=t.speakers??{},r=Object.keys(s);if(t.proofreading){const n=r.filter(h=>!["approved","covered"].includes(t.proofreading?.[h]?.status??""));this.status.textContent=n.length===0?e.proofreadAll:e.proofreadPending.replace("{names}",n.map(h=>this.speakerName(t,h)).join(", ")),this.status.hidden=!1}else this.status.hidden=!0;const c=[];let a,p=!1,l,o;i.forEach((n,h)=>{const E=n.redacted?JSON.stringify(n.redacted.reason):void 0;if(E!==void 0&&l?.reason===E){this.blocks.set(h,l.block),n.speaker!==o&&(o=void 0);return}const f=document.createElement("div");f.className="turn",f.dataset.segment=String(h);const w=document.createElement("div");w.className="who";const S=document.createElement("span");if(S.textContent=n.redacted?"":this.speakerName(t,n.speaker),n.start!==void 0&&(f.dataset.time=v.clock(n.start,!0)),o!==n.speaker&&(a=document.createElement("div"),a.className="intervention",a.style.setProperty("--speaker-hue",String((Math.max(0,r.indexOf(n.speaker))*67+210)%360)),c.push(a),p=!1),n.redacted||(p&&f.classList.add("goes-on"),p=!0),a.append(f),o=n.speaker,w.append(S),n.redacted){f.classList.add("is-redacted");const u=this.gap(n.redacted.reason,"p");u.className="redacted",l={block:f,reason:E},f.append(w,u)}else{const u=document.createElement("p");if(u.className="said",n.parts){let b="";for(const m of n.parts){const C="redacted"in m?"▮":v.plain(m.text);/[\p{L}\p{N}.,;:!?)»”…▮]$/u.test(b)&&/^[\p{L}\p{N}(«“▮]/u.test(C)&&u.append(" "),"redacted"in m?u.append(this.gap(m.redacted.reason,"span")):u.append(...this.saidNodes(m.text)),b=C}}else u.append(...this.saidNodes(n.text??""));l=void 0,f.append(w,u)}if(n.refs?.length){const u=document.createElement("div");u.className="refs";for(const b of n.refs){const m=document.createElement("button");m.type="button",m.className="ref",m.innerHTML=B.PLAY,m.append(v.clock(b.at,!0)),m.addEventListener("click",()=>this.seek(b)),u.append(m)}f.append(u)}this.blocks.set(h,f)}),this.turns.replaceChildren(...c)}revealSegment(e){const t=this.blocks.get(e);t&&(t.scrollIntoView?.({block:"center"}),t.classList.add("flash"),window.setTimeout(()=>t.classList.remove("flash"),1600))}}function D(){customElements.get(N)||customElements.define(N,L)}const F="rr0-interview-editor",J=`
29
30
  <style>
30
31
  :host { display: block; }
31
32
  /* The colours of the transcript's text editor (see SightingFileEditor): a key, a string, a number or a word, and a mistake. Dark mode redefines them. */
@@ -53,7 +54,7 @@ rr0-interview .turn .ref { font: inherit; font-size: .8em; cursor: pointer; bord
53
54
  input[type="text"] { min-width: 0; }
54
55
  #by { width: 16em; }
55
56
  input[type="url"] { width: 18em; max-width: 100%; }
56
- ${B.CSS}
57
+ ${M.CSS}
57
58
  select { min-width: 0; max-width: 100%; text-overflow: ellipsis; }
58
59
  fieldset.witnesses { display: flex; flex-wrap: wrap; align-items: center; gap: .25em .75em; border: 0; margin: 0; padding: 0; min-width: 0; }
59
60
  fieldset.witnesses legend { float: left; padding: 0; margin-right: .4em; }
@@ -96,5 +97,5 @@ rr0-interview .turn .ref { font: inherit; font-size: .8em; cursor: pointer; bord
96
97
  <p id="file-note" class="file-note" hidden role="status"></p>
97
98
  <div id="file-editor" class="file-editor"></div>
98
99
  </section>
99
- `;class d extends HTMLElement{shadow=this.attachShadow({mode:"open"});messages=k;said=new x(["en"]);language="en";localeToken=0;current;options=[];group="summary";base;text;fileEditor;fileEditorLoading;shownFor;constructor(){super(),this.shadow.innerHTML=P;for(const e of["title","time","by","url","summary","witness","medium"])this.shadow.getElementById(e).addEventListener(e==="witness"||e==="medium"?"change":"input",()=>this.write(e));for(const e of this.shadow.querySelectorAll("#tabs .group-tab"))e.addEventListener("click",()=>this.openGroup(d.GROUPS[e.getAttribute("aria-controls")]??"summary"));this.shadow.getElementById("url").addEventListener("change",()=>{this.shownFor=void 0,this.text===void 0&&this.group==="file"&&this.showTranscript()}),this.shadow.getElementById("import-file").addEventListener("change",()=>void this.importFromFile()),this.shadow.getElementById("import-url-button").addEventListener("click",()=>void this.importFromUrl()),this.shadow.getElementById("save").addEventListener("click",()=>this.save())}static GROUPS={"group-summary":"summary","group-exchanges":"exchanges","group-transcript":"file"};static get observedAttributes(){return["readonly"]}attributeChangedCallback(){this.applyReadonly()}connectedCallback(){this.loadLocale()}get event(){return this.current}set event(e){e!==this.current&&(this.shownFor=void 0),this.current=e,this.render(),this.group==="file"&&this.showTranscript(),this.group==="exchanges"&&this.showExchanges()}set witnesses(e){this.options=e,this.render()}set documentUrl(e){this.base=e}get transcriptText(){return this.text}set transcriptText(e){this.text=e,this.shownFor=void 0}field(e){return this.shadow.getElementById(e)}async loadLocale(){const e=++this.localeToken,t=O.preferencesFor(this),i=R(t,j),s=i==="en"?k:await I(i);e===this.localeToken&&(this.language=i,this.said=new x(t),this.messages=s,this.render())}applyReadonly(){const e=this.hasAttribute("readonly");for(const t of["title","time","by","url","summary"])this.field(t).readOnly=e;for(const t of this.shadow.querySelectorAll("#witness input"))t.disabled=e;this.field("medium").disabled=e;for(const t of["import-file","import-url","import-url-button"])this.field(t).disabled=e}static byText(e){return(e??[]).map(t=>"people"in t?t.people:"org"in t?t.org:t.title??"").filter(t=>t!=="").join(", ")}render(){const e=this.messages,t=(o,n)=>{this.shadow.getElementById(o).textContent=n};t("label-summary-group",e.summaryTab),t("label-file-group",e.fileTab),t("label-exchanges-group",e.exchangesTab),t("label-title",e.title),t("label-witness",e.witness),t("label-medium",e.medium),t("label-time",e.time),t("label-by",e.by),t("label-summary",e.summary),t("label-url",e.transcript),t("label-import-file",e.importFile),t("label-import-url",e.importUrl),t("import-url-button",e.importButton),t("save",e.saveButton),this.field("url").title=e.transcriptHint,this.field("by").title=e.byHint;const i=this.current,s=this.shadow.activeElement,r=(o,n)=>{this.field(o)!==s&&(this.field(o).value=n)};r("title",this.said.read(i?.title)??""),r("time",i?.time??""),r("by",d.byText(i?.by)),r("url",i?.url??""),r("summary",this.said.read(i?.summary)??"");const c=[i?.interviewOf].flat().filter(o=>typeof o=="string"),a=this.shadow.getElementById("witness"),p=[...this.options,...c.filter(o=>!this.options.some(n=>n.id===o)).map(o=>({id:o,label:o}))];a.replaceChildren(a.querySelector("legend"),...p.map(o=>{const n=document.createElement("label"),h=document.createElement("input");return h.type="checkbox",h.value=o.id,h.checked=c.includes(o.id),n.append(h,o.label),n}));const l=this.shadow.getElementById("medium");if(l.replaceChildren(...A.ALL.map(o=>new Option(A.label(o,this.language),o))),i?.medium!==void 0&&!A.ALL.includes(i.medium)&&l.append(new Option(String(i.medium),String(i.medium))),i?.medium===void 0){const o=new Option(e.witnessNone,"");o.disabled=!0,o.hidden=!0,l.prepend(o)}l.value=i?.medium??"",this.applyReadonly()}write(e){const t=this.current;if(!t)return;const i=e==="witness"?"":this.field(e).value;switch(e){case"title":{const s=this.said.write(t.title,i,this.language);s===void 0?delete t.title:t.title=s;break}case"summary":{const s=this.said.write(t.summary,i,this.language);s===void 0?delete t.summary:t.summary=s;break}case"time":i.trim()===""?delete t.time:t.time=i.trim();break;case"url":i.trim()===""?delete t.url:t.url=i.trim();break;case"by":{const s=i.split(",").map(r=>r.trim()).filter(r=>r!=="");s.length===0?delete t.by:t.by=s.map(r=>({people:r}));break}case"witness":{const s=[...this.shadow.querySelectorAll("#witness input:checked")].map(r=>r.value);if(s.length===0){this.render();return}t.interviewOf=s.length===1?s[0]:s;break}case"medium":i===""?delete t.medium:t.medium=i;break}this.dispatchEvent(new CustomEvent(g,{bubbles:!0,composed:!0,detail:{field:e,event:t}})),e==="medium"&&this.render(),e!=="url"&&this.syncFileFromEvent()}openGroup(e){this.group=e;const t={summary:"group-summary",exchanges:"group-exchanges",file:"group-transcript"};for(const i of this.shadow.querySelectorAll("#tabs .group-tab"))i.setAttribute("aria-expanded",String(i.getAttribute("aria-controls")===t[e]));for(const[i,s]of Object.entries(t))this.shadow.getElementById(s).hidden=i!==e;e==="file"&&this.showTranscript(),e==="exchanges"&&this.showExchanges()}exchangesToken=0;async transcriptJson(e){try{const t=this.fileEditor?.text??this.text;if(t!==void 0)return JSON.parse(t);const i=this.transcriptUrl(e);if(i!==void 0)return await y.json(i)}catch{}}async showExchanges(){const e=this.current;if(!e)return;const t=++this.exchangesToken,i=await this.transcriptJson(e);t!==this.exchangesToken||this.current!==e||this.drawExchanges(i)}drawExchanges(e){const t=this.shadow.getElementById("exchanges");t.documentUrl=this.current?this.transcriptUrl(this.current):void 0,t.interview=e}async revealSegment(e){this.openGroup("exchanges"),await this.showExchanges(),this.shadow.getElementById("exchanges").revealSegment(e)}note(e){const t=this.shadow.getElementById("file-note");t.textContent=e??"",t.hidden=e===void 0}transcriptUrl(e){return e.url?new URL(e.url,this.base??location.href).href:void 0}static pretty(e){return JSON.stringify(e,null,2)+`
100
- `}static SHARED=["title","time","medium","by","interviewOf","summary"];static ORDER=["version","id","language","title","time","medium","by","interviewOf","summary","speakers","transcription","proofreading","anonymization","segments"];static ordered(e){const t={};for(const i of d.ORDER)i in e&&(t[i]=e[i]);for(const i of Object.keys(e))i in t||(t[i]=e[i]);return t}static witnessesOf(e){return[e].flat().filter(t=>typeof t=="string")}static withEventFields(e,t){const i={...e};for(const r of d.SHARED)t[r]===void 0?delete i[r]:i[r]=structuredClone(t[r]);const s=i.speakers;if(typeof s=="object"&&s!==null){const r={...s},c=(a,p,l)=>{l.forEach((o,n)=>{const h=n===0?a:`${a}${n+1}`;r[h]?r[h]={...r[h],[p]:o}:n>0&&(r[h]={role:a,[p]:o})})};c("interviewer","by",t.by??[]),c("witness","of",d.witnessesOf(t.interviewOf)),i.speakers=r}return d.ordered(i)}applyFileToEvent(e,t){const i=this.current;if(!i)return!1;const s=JSON.stringify(d.SHARED.map(a=>i[a])),r=a=>typeof a=="string"||typeof a=="object"&&a!==null&&!Array.isArray(a),c={title:r,summary:r,time:a=>typeof a=="string",medium:a=>typeof a=="string",by:a=>Array.isArray(a),interviewOf:a=>typeof a=="string"||Array.isArray(a)};for(const a of d.SHARED){const p=e[a];p!==void 0&&c[a](p)?i[a]=structuredClone(p):t&&delete i[a]}return JSON.stringify(d.SHARED.map(a=>i[a]))!==s}syncFileFromEvent(){const e=this.current,t=this.fileEditor?.text??this.text;if(!e||t===void 0)return;let i;try{i=JSON.parse(t)}catch{return}if(typeof i!="object"||i===null||Array.isArray(i))return;const s=d.pretty(d.withEventFields(i,e));s!==t&&(this.text=s,this.fileEditor?.replaceText(s,!1),this.dispatchEvent(new CustomEvent(g,{bubbles:!0,composed:!0,detail:{field:"transcript",event:e,text:s}})))}template(e){return d.pretty(d.withEventFields({version:1,language:this.language,speakers:{interviewer:{role:"interviewer"},witness:{role:"witness"}},segments:[]},e))}loadFileEditor(e){return this.fileEditorLoading??=(async()=>{try{const[{SightingFileEditor:t},{default:i},s]=await Promise.all([T(()=>import("./SightingFileEditor-C0NC8jbz.js"),__vite__mapDeps([0,1]),import.meta.url),T(()=>import("./interviewSchema-CMRZUnRy.js"),[],import.meta.url),M(this.language)]);return this.fileEditor=new t(this.shadow.getElementById("file-editor"),e,r=>this.onEdited(r),this.messages.editorLabel,{baseline:e,phrases:s.fileSearchPhrases,schema:i}),this.fileEditor}catch(t){throw this.fileEditorLoading=void 0,t}})(),this.fileEditorLoading}async showTranscript(){const e=this.current;if(!e||this.shownFor===e)return;this.note(this.messages.loading);let t=this.text;if(t===void 0){const i=this.transcriptUrl(e);if(i!==void 0)try{const s=await y.json(i);this.current===e&&typeof s=="object"&&s!==null&&!Array.isArray(s)?(this.applyFileToEvent(s,!1)&&this.fileChangedEvent(),t=d.pretty(d.withEventFields(s,e))):t=d.pretty(s)}catch{this.note(this.messages.loadFailed)}t??=this.template(e)}if(this.current===e)try{const i=await this.loadFileEditor(t);if(this.current!==e)return;i.replaceText(t,!1),this.shownFor=e,this.text!==void 0||this.transcriptUrl(e)===void 0?this.note(void 0):this.shadow.getElementById("file-note").textContent===this.messages.loading&&this.note(void 0)}catch{this.note(this.messages.loadFailed)}}onEdited(e){this.text=e;let t,i=!0;try{t=JSON.parse(e)}catch{i=!1}this.note(i?void 0:this.messages.invalid);const s=this.current;if(i&&s&&typeof t=="object"&&t!==null&&!Array.isArray(t)&&this.applyFileToEvent(t,!0)&&this.fileChangedEvent(),s&&!s.url&&e.trim()!==""){const r=s.id??"1";s.url=`${r.startsWith("interview")?r:`interview-${r}`}.json`,this.field("url").value=s.url,this.dispatchEvent(new CustomEvent(g,{bubbles:!0,composed:!0,detail:{field:"url",event:s}}))}this.dispatchEvent(new CustomEvent(g,{bubbles:!0,composed:!0,detail:{field:"transcript",event:s,text:e}})),this.group==="exchanges"&&this.showExchanges()}fileChangedEvent(){this.render(),this.dispatchEvent(new CustomEvent(g,{bubbles:!0,composed:!0,detail:{field:"file",event:this.current}}))}async take(e){if(typeof e!="object"||e===null||!Array.isArray(e.segments)){this.note(this.messages.notATranscript);return}const t=this.current;t&&this.applyFileToEvent(e,!1)&&this.fileChangedEvent();const i=d.pretty(t?d.withEventFields(e,t):e);await this.loadFileEditor(i).then(s=>s.replaceText(i,!1),()=>{}),this.shownFor=this.current,this.note(void 0),this.onEdited(i)}async importFromFile(){const e=this.field("import-file"),t=e.files?.[0];if(t){try{const i=await t.text();let s;try{s=JSON.parse(i)}catch{s=void 0}if(typeof s!="object"||s===null){const{InterviewImport:r}=await T(async()=>{const{InterviewImport:l}=await import("./interviewImport-C-TiARLK.js");return{InterviewImport:l}},[],import.meta.url),c=this.current,a=[c?.interviewOf].flat().filter(l=>typeof l=="string"),p=r.parse(i,{by:(c?.by??[]).map(l=>d.byText([l])).filter(l=>l!==""),witnesses:this.options.filter(l=>a.length===0||a.includes(l.id))});s=p&&{...p,transcription:{note:`Imported from ${t.name}: who speaks and when are as the file gave them, to be checked.`}}}s===void 0?this.note(this.messages.notATranscript):await this.take(s)}catch{this.note(this.messages.loadFailed)}e.value=""}}async importFromUrl(){const e=this.field("import-url").value.trim();if(e!=="")try{await this.take(await y.json(new URL(e,this.base??location.href).href))}catch{this.note(this.messages.loadFailed)}}save(){const e=this.fileEditor?.text??this.text;if(e===void 0)return;const t=(this.current?.url??"").split("/").pop()||`${this.current?.id??"interview"}.json`,i=URL.createObjectURL(new Blob([e],{type:"application/json"})),s=document.createElement("a");s.href=i,s.download=t,s.click(),URL.revokeObjectURL(i)}}function _(){H(),customElements.get(F)||customElements.define(F,d)}export{g as INTERVIEW_CHANGE_EVENT,F as INTERVIEW_EDITOR_ELEMENT_NAME,U as INTERVIEW_SEEK_EVENT,d as InterviewEditorElement,_ as register};
100
+ `;class d extends HTMLElement{shadow=this.attachShadow({mode:"open"});messages=k;said=new x(["en"]);language="en";localeToken=0;current;options=[];group="summary";base;text;fileEditor;fileEditorLoading;shownFor;constructor(){super(),this.shadow.innerHTML=J;for(const e of["title","time","by","url","summary","witness","medium"])this.shadow.getElementById(e).addEventListener(e==="witness"||e==="medium"?"change":"input",()=>this.write(e));for(const e of this.shadow.querySelectorAll("#tabs .group-tab"))e.addEventListener("click",()=>this.openGroup(d.GROUPS[e.getAttribute("aria-controls")]??"summary"));this.shadow.getElementById("url").addEventListener("change",()=>{this.shownFor=void 0,this.text===void 0&&this.group==="file"&&this.showTranscript()}),this.shadow.getElementById("import-file").addEventListener("change",()=>void this.importFromFile()),this.shadow.getElementById("import-url-button").addEventListener("click",()=>void this.importFromUrl()),this.shadow.getElementById("save").addEventListener("click",()=>this.save())}static GROUPS={"group-summary":"summary","group-exchanges":"exchanges","group-transcript":"file"};static get observedAttributes(){return["readonly"]}attributeChangedCallback(){this.applyReadonly()}connectedCallback(){this.loadLocale()}get event(){return this.current}set event(e){e!==this.current&&(this.shownFor=void 0),this.current=e,this.render(),this.group==="file"&&this.showTranscript(),this.group==="exchanges"&&this.showExchanges()}set witnesses(e){this.options=e,this.render()}set documentUrl(e){this.base=e}get transcriptText(){return this.text}set transcriptText(e){this.text=e,this.shownFor=void 0}field(e){return this.shadow.getElementById(e)}async loadLocale(){const e=++this.localeToken,t=O.preferencesFor(this),i=R(t,j),s=i==="en"?k:await I(i);e===this.localeToken&&(this.language=i,this.said=new x(t),this.messages=s,this.render())}applyReadonly(){const e=this.hasAttribute("readonly");for(const t of["title","time","by","url","summary"])this.field(t).readOnly=e;for(const t of this.shadow.querySelectorAll("#witness input"))t.disabled=e;this.field("medium").disabled=e;for(const t of["import-file","import-url","import-url-button"])this.field(t).disabled=e}static byText(e){return(e??[]).map(t=>"people"in t?t.people:"org"in t?t.org:t.title??"").filter(t=>t!=="").join(", ")}render(){const e=this.messages,t=(o,n)=>{this.shadow.getElementById(o).textContent=n};t("label-summary-group",e.summaryTab),t("label-file-group",e.fileTab),t("label-exchanges-group",e.exchangesTab),t("label-title",e.title),t("label-witness",e.witness),t("label-medium",e.medium),t("label-time",e.time),t("label-by",e.by),t("label-summary",e.summary),t("label-url",e.transcript),t("label-import-file",e.importFile),t("label-import-url",e.importUrl),t("import-url-button",e.importButton),t("save",e.saveButton),this.field("url").title=e.transcriptHint,this.field("by").title=e.byHint;const i=this.current,s=this.shadow.activeElement,r=(o,n)=>{this.field(o)!==s&&(this.field(o).value=n)};r("title",this.said.read(i?.title)??""),r("time",i?.time??""),r("by",d.byText(i?.by)),r("url",i?.url??""),r("summary",this.said.read(i?.summary)??"");const c=[i?.interviewOf].flat().filter(o=>typeof o=="string"),a=this.shadow.getElementById("witness"),p=[...this.options,...c.filter(o=>!this.options.some(n=>n.id===o)).map(o=>({id:o,label:o}))];a.replaceChildren(a.querySelector("legend"),...p.map(o=>{const n=document.createElement("label"),h=document.createElement("input");return h.type="checkbox",h.value=o.id,h.checked=c.includes(o.id),n.append(h,o.label),n}));const l=this.shadow.getElementById("medium");if(l.replaceChildren(...A.ALL.map(o=>new Option(A.label(o,this.language),o))),i?.medium!==void 0&&!A.ALL.includes(i.medium)&&l.append(new Option(String(i.medium),String(i.medium))),i?.medium===void 0){const o=new Option(e.witnessNone,"");o.disabled=!0,o.hidden=!0,l.prepend(o)}l.value=i?.medium??"",this.applyReadonly()}write(e){const t=this.current;if(!t)return;const i=e==="witness"?"":this.field(e).value;switch(e){case"title":{const s=this.said.write(t.title,i,this.language);s===void 0?delete t.title:t.title=s;break}case"summary":{const s=this.said.write(t.summary,i,this.language);s===void 0?delete t.summary:t.summary=s;break}case"time":i.trim()===""?delete t.time:t.time=i.trim();break;case"url":i.trim()===""?delete t.url:t.url=i.trim();break;case"by":{const s=i.split(",").map(r=>r.trim()).filter(r=>r!=="");s.length===0?delete t.by:t.by=s.map(r=>({people:r}));break}case"witness":{const s=[...this.shadow.querySelectorAll("#witness input:checked")].map(r=>r.value);if(s.length===0){this.render();return}t.interviewOf=s.length===1?s[0]:s;break}case"medium":i===""?delete t.medium:t.medium=i;break}this.dispatchEvent(new CustomEvent(g,{bubbles:!0,composed:!0,detail:{field:e,event:t}})),e==="medium"&&this.render(),e!=="url"&&this.syncFileFromEvent()}openGroup(e){this.group=e;const t={summary:"group-summary",exchanges:"group-exchanges",file:"group-transcript"};for(const i of this.shadow.querySelectorAll("#tabs .group-tab"))i.setAttribute("aria-expanded",String(i.getAttribute("aria-controls")===t[e]));for(const[i,s]of Object.entries(t))this.shadow.getElementById(s).hidden=i!==e;e==="file"&&this.showTranscript(),e==="exchanges"&&this.showExchanges()}exchangesToken=0;async transcriptJson(e){try{const t=this.fileEditor?.text??this.text;if(t!==void 0)return JSON.parse(t);const i=this.transcriptUrl(e);if(i!==void 0)return await y.json(i)}catch{}}async showExchanges(){const e=this.current;if(!e)return;const t=++this.exchangesToken,i=await this.transcriptJson(e);t!==this.exchangesToken||this.current!==e||this.drawExchanges(i)}drawExchanges(e){const t=this.shadow.getElementById("exchanges");t.documentUrl=this.current?this.transcriptUrl(this.current):void 0,t.interview=e}async revealSegment(e){this.openGroup("exchanges"),await this.showExchanges(),this.shadow.getElementById("exchanges").revealSegment(e)}note(e){const t=this.shadow.getElementById("file-note");t.textContent=e??"",t.hidden=e===void 0}transcriptUrl(e){return e.url?new URL(e.url,this.base??location.href).href:void 0}static pretty(e){return JSON.stringify(e,null,2)+`
101
+ `}static SHARED=["title","time","medium","by","interviewOf","summary"];static ORDER=["version","id","language","title","time","medium","by","interviewOf","summary","speakers","transcription","proofreading","anonymization","segments"];static ordered(e){const t={};for(const i of d.ORDER)i in e&&(t[i]=e[i]);for(const i of Object.keys(e))i in t||(t[i]=e[i]);return t}static witnessesOf(e){return[e].flat().filter(t=>typeof t=="string")}static withEventFields(e,t){const i={...e};for(const r of d.SHARED)t[r]===void 0?delete i[r]:i[r]=structuredClone(t[r]);const s=i.speakers;if(typeof s=="object"&&s!==null){const r={...s},c=(a,p,l)=>{l.forEach((o,n)=>{const h=n===0?a:`${a}${n+1}`;r[h]?r[h]={...r[h],[p]:o}:n>0&&(r[h]={role:a,[p]:o})})};c("interviewer","by",t.by??[]),c("witness","of",d.witnessesOf(t.interviewOf)),i.speakers=r}return d.ordered(i)}applyFileToEvent(e,t){const i=this.current;if(!i)return!1;const s=JSON.stringify(d.SHARED.map(a=>i[a])),r=a=>typeof a=="string"||typeof a=="object"&&a!==null&&!Array.isArray(a),c={title:r,summary:r,time:a=>typeof a=="string",medium:a=>typeof a=="string",by:a=>Array.isArray(a),interviewOf:a=>typeof a=="string"||Array.isArray(a)};for(const a of d.SHARED){const p=e[a];p!==void 0&&c[a](p)?i[a]=structuredClone(p):t&&delete i[a]}return JSON.stringify(d.SHARED.map(a=>i[a]))!==s}syncFileFromEvent(){const e=this.current,t=this.fileEditor?.text??this.text;if(!e||t===void 0)return;let i;try{i=JSON.parse(t)}catch{return}if(typeof i!="object"||i===null||Array.isArray(i))return;const s=d.pretty(d.withEventFields(i,e));s!==t&&(this.text=s,this.fileEditor?.replaceText(s,!1),this.dispatchEvent(new CustomEvent(g,{bubbles:!0,composed:!0,detail:{field:"transcript",event:e,text:s}})))}template(e){return d.pretty(d.withEventFields({version:1,language:this.language,speakers:{interviewer:{role:"interviewer"},witness:{role:"witness"}},segments:[]},e))}loadFileEditor(e){return this.fileEditorLoading??=(async()=>{try{const[{SightingFileEditor:t},{default:i},s]=await Promise.all([T(()=>import("./SightingFileEditor-7inIgp24.js"),__vite__mapDeps([0,1]),import.meta.url),T(()=>import("./interviewSchema-m_h5f8H0.js"),[],import.meta.url),P(this.language)]);return this.fileEditor=new t(this.shadow.getElementById("file-editor"),e,r=>this.onEdited(r),this.messages.editorLabel,{baseline:e,phrases:s.fileSearchPhrases,schema:i}),this.fileEditor}catch(t){throw this.fileEditorLoading=void 0,t}})(),this.fileEditorLoading}async showTranscript(){const e=this.current;if(!e||this.shownFor===e)return;this.note(this.messages.loading);let t=this.text;if(t===void 0){const i=this.transcriptUrl(e);if(i!==void 0)try{const s=await y.json(i);this.current===e&&typeof s=="object"&&s!==null&&!Array.isArray(s)?(this.applyFileToEvent(s,!1)&&this.fileChangedEvent(),t=d.pretty(d.withEventFields(s,e))):t=d.pretty(s)}catch{this.note(this.messages.loadFailed)}t??=this.template(e)}if(this.current===e)try{const i=await this.loadFileEditor(t);if(this.current!==e)return;i.replaceText(t,!1),this.shownFor=e,this.text!==void 0||this.transcriptUrl(e)===void 0?this.note(void 0):this.shadow.getElementById("file-note").textContent===this.messages.loading&&this.note(void 0)}catch{this.note(this.messages.loadFailed)}}onEdited(e){this.text=e;let t,i=!0;try{t=JSON.parse(e)}catch{i=!1}this.note(i?void 0:this.messages.invalid);const s=this.current;if(i&&s&&typeof t=="object"&&t!==null&&!Array.isArray(t)&&this.applyFileToEvent(t,!0)&&this.fileChangedEvent(),s&&!s.url&&e.trim()!==""){const r=s.id??"1";s.url=`${r.startsWith("interview")?r:`interview-${r}`}.json`,this.field("url").value=s.url,this.dispatchEvent(new CustomEvent(g,{bubbles:!0,composed:!0,detail:{field:"url",event:s}}))}this.dispatchEvent(new CustomEvent(g,{bubbles:!0,composed:!0,detail:{field:"transcript",event:s,text:e}})),this.group==="exchanges"&&this.showExchanges()}fileChangedEvent(){this.render(),this.dispatchEvent(new CustomEvent(g,{bubbles:!0,composed:!0,detail:{field:"file",event:this.current}}))}async take(e){if(typeof e!="object"||e===null||!Array.isArray(e.segments)){this.note(this.messages.notATranscript);return}const t=this.current;t&&this.applyFileToEvent(e,!1)&&this.fileChangedEvent();const i=d.pretty(t?d.withEventFields(e,t):e);await this.loadFileEditor(i).then(s=>s.replaceText(i,!1),()=>{}),this.shownFor=this.current,this.note(void 0),this.onEdited(i)}async importFromFile(){const e=this.field("import-file"),t=e.files?.[0];if(t){try{const i=await t.text();let s;try{s=JSON.parse(i)}catch{s=void 0}if(typeof s!="object"||s===null){const{InterviewImport:r}=await T(async()=>{const{InterviewImport:l}=await import("./interviewImport-C-TiARLK.js");return{InterviewImport:l}},[],import.meta.url),c=this.current,a=[c?.interviewOf].flat().filter(l=>typeof l=="string"),p=r.parse(i,{by:(c?.by??[]).map(l=>d.byText([l])).filter(l=>l!==""),witnesses:this.options.filter(l=>a.length===0||a.includes(l.id))});s=p&&{...p,transcription:{note:`Imported from ${t.name}: who speaks and when are as the file gave them, to be checked.`}}}s===void 0?this.note(this.messages.notATranscript):await this.take(s)}catch{this.note(this.messages.loadFailed)}e.value=""}}async importFromUrl(){const e=this.field("import-url").value.trim();if(e!=="")try{await this.take(await y.json(new URL(e,this.base??location.href).href))}catch{this.note(this.messages.loadFailed)}}save(){const e=this.fileEditor?.text??this.text;if(e===void 0)return;const t=(this.current?.url??"").split("/").pop()||`${this.current?.id??"interview"}.json`,i=URL.createObjectURL(new Blob([e],{type:"application/json"})),s=document.createElement("a");s.href=i,s.download=t,s.click(),URL.revokeObjectURL(i)}}function G(){D(),customElements.get(F)||customElements.define(F,d)}export{g as INTERVIEW_CHANGE_EVENT,F as INTERVIEW_EDITOR_ELEMENT_NAME,U as INTERVIEW_SEEK_EVENT,d as InterviewEditorElement,G as register};
@@ -1,4 +1,4 @@
1
- import{L as h,j as r,U as p,k as m,P as c,E as u,i as g}from"./rr0-sighting-editor.mjs";import{launchEditorMessages_en as d}from"./LaunchEditorMessages_en-j4RgQPZu.js";class n{static plumeValue(e){return t=>h.plumeOf(t)[e]}static plume(e,t){return{type:"number",key:`plume.${e}`,effective:n.plumeValue(e),...t}}static burn(e,t){return{type:"number",key:e,min:-3600,max:36e3,step:.1,unit:"s",scale:.001,label:t.label,hint:t.hint,group:{en:"Engine",fr:"Moteur",es:"Motor",it:"Motore"},effective:a=>t.ends(a.track??[])?.t}}static nextPlace(e){const t=e[e.length-1]??{t:0,lat:0,lng:0,altitudeKm:0},a=e[e.length-2]??t,i=(s,l=0)=>e.length>1?t[s]-a[s]:l;return{t:t.t+(e.length>1?i("t"):1e4),lat:t.lat+i("lat"),lng:t.lng+i("lng"),altitudeKm:Math.max(0,t.altitudeKm+i("altitudeKm"))}}static SET={kind:"launch",title:{en:"Launch",fr:"Lancement",es:"Lanzamiento",it:"Lancio"},parameters:[{type:"said",key:"title",label:{en:"Name",fr:"Nom",es:"Nombre",it:"Nome"},group:{en:"Vehicle",fr:"Lanceur",es:"Lanzador",it:"Lanciatore"}},{type:"text",key:"vehicle.name",label:{en:"Vehicle",fr:"Lanceur",es:"Lanzador",it:"Lanciatore"},placeholder:"Falcon 9",group:{en:"Vehicle",fr:"Lanceur",es:"Lanzador",it:"Lanciatore"}},{type:"text",key:"vehicle.mission",label:{en:"Mission",fr:"Mission",es:"Misión",it:"Missione"},placeholder:"Starlink Group 10-49",group:{en:"Vehicle",fr:"Lanceur",es:"Lanzador",it:"Lanciatore"}},{type:"number",key:"vehicle.engine.thrustKN",min:1,max:1e5,step:1,unit:"kN",label:{en:"Thrust (vacuum)",fr:"Poussée (dans le vide)",es:"Empuje (en el vacío)",it:"Spinta (nel vuoto)"},hint:{en:"Merlin Vacuum 934, RL10 110, a solid booster several thousand. With the specific impulse, it sets how much exhaust leaves each second.",fr:"Merlin Vacuum 934, RL10 110, un booster à poudre plusieurs milliers. Avec l'impulsion spécifique, elle fixe le débit d'échappement.",es:"Merlin Vacuum 934, RL10 110, un propulsor sólido varios miles. Con el impulso específico, fija el caudal de escape.",it:"Merlin Vacuum 934, RL10 110, un booster solido diverse migliaia. Con l'impulso specifico, fissa la portata dello scarico."},group:{en:"Engine",fr:"Moteur",es:"Motor",it:"Motore"}},{type:"number",key:"vehicle.engine.specificImpulseS",min:100,max:500,step:1,unit:"s",label:{en:"Specific impulse (vacuum)",fr:"Impulsion spécifique (dans le vide)",es:"Impulso específico (en el vacío)",it:"Impulso specifico (nel vuoto)"},hint:{en:"Times 9.81 m/s² it is the exhaust velocity, which sets how fast the exhaust spreads round the stage: 348 s is 3.4 km/s.",fr:"Multipliée par 9,81 m/s², c'est la vitesse d'éjection, qui fixe la vitesse à laquelle l'échappement s'étale autour de l'étage : 348 s font 3,4 km/s.",es:"Multiplicado por 9,81 m/s² es la velocidad de escape, que fija la rapidez con que el escape se extiende alrededor de la etapa: 348 s son 3,4 km/s.",it:"Moltiplicato per 9,81 m/s² è la velocità di scarico, che fissa quanto in fretta lo scarico si allarga attorno allo stadio: 348 s sono 3,4 km/s."},group:{en:"Engine",fr:"Moteur",es:"Motor",it:"Motore"}},{type:"choice",key:"vehicle.engine.propellant",label:{en:"Propellant",fr:"Ergols",es:"Propelentes",it:"Propellenti"},hint:{en:"What the exhaust is made of decides how much of it turns into particles that scatter light.",fr:"Ce dont l'échappement est fait décide quelle part devient des particules qui diffusent la lumière.",es:"De qué está hecho el escape decide qué parte se vuelve partículas que difunden la luz.",it:"Di cosa è fatto lo scarico decide quanta parte diventa particelle che diffondono la luce."},choices:[{value:"rp1-lox",label:{en:"Kerosene and oxygen",fr:"Kérosène et oxygène",es:"Queroseno y oxígeno",it:"Cherosene e ossigeno"}},{value:"methane-lox",label:{en:"Methane and oxygen",fr:"Méthane et oxygène",es:"Metano y oxígeno",it:"Metano e ossigeno"}},{value:"hydrogen-lox",label:{en:"Hydrogen and oxygen",fr:"Hydrogène et oxygène",es:"Hidrógeno y oxígeno",it:"Idrogeno e ossigeno"}},{value:"hypergolic",label:{en:"Hypergolic",fr:"Hypergolique",es:"Hipergólico",it:"Ipergolico"}},{value:"solid",label:{en:"Solid",fr:"Poudre",es:"Sólido",it:"Solido"}}],group:{en:"Engine",fr:"Moteur",es:"Motor",it:"Motore"}},n.burn("burnFromT",{label:{en:"Engine start",fr:"Allumage du moteur",es:"Encendido del motor",it:"Accensione del motore"},hint:{en:"When the engine started, in seconds of the recording; it may be before it. Empty: the first point of the path.",fr:"Quand le moteur s'est allumé, en secondes de l'enregistrement ; avant lui si besoin. Vide : le premier point du chemin.",es:"Cuándo se encendió el motor, en segundos de la grabación; puede ser antes. Vacío: el primer punto de la trayectoria.",it:"Quando si è acceso il motore, in secondi della registrazione; può essere prima. Vuoto: il primo punto del percorso."},ends:e=>e[0]}),n.burn("burnUntilT",{label:{en:"Engine cut-off",fr:"Extinction du moteur",es:"Apagado del motor",it:"Spegnimento del motore"},hint:{en:"When the engine stopped, in seconds of the recording. Empty: the last point of the path. Nothing is let go after it.",fr:"Quand le moteur s'est éteint, en secondes de l'enregistrement. Vide : le dernier point du chemin. Rien n'est lâché après.",es:"Cuándo se apagó el motor, en segundos de la grabación. Vacío: el último punto de la trayectoria. Nada se suelta después.",it:"Quando si è spento il motore, in secondi della registrazione. Vuoto: l'ultimo punto del percorso. Dopo non si rilascia nulla."},ends:e=>e[e.length-1]}),n.plume("exhaustKgPerS",{min:.1,max:1e5,step:.1,unit:"kg/s",label:{en:"Exhaust flow",fr:"Débit d'échappement",es:"Caudal de escape",it:"Portata di scarico"},hint:{en:"How much exhaust leaves the engine each second: how bright the plume is. Thrust over exhaust velocity when the engine is stated.",fr:"La masse d'échappement qui sort du moteur chaque seconde : la luminosité du panache. La poussée sur la vitesse d'éjection quand le moteur est donné.",es:"La masa de escape que sale del motor cada segundo: el brillo de la estela. El empuje sobre la velocidad de escape cuando se da el motor.",it:"La massa di scarico che esce dal motore ogni secondo: la luminosità della scia. La spinta sulla velocità di scarico quando il motore è dato."},group:{en:"Plume",fr:"Panache",es:"Estela",it:"Scia"}}),n.plume("condensedShare",{min:0,max:1,step:.01,label:{en:"Share that scatters",fr:"Part qui diffuse",es:"Parte que difunde",it:"Parte che diffonde"},hint:{en:"The share of the exhaust that ends up as particles that scatter the Sun's light. Nobody has measured it for a launch: the one number to fit against a photograph.",fr:"La part de l'échappement qui devient des particules diffusant la lumière du Soleil. Personne ne l'a mesurée pour un lancement : le seul nombre à caler sur une photographie.",es:"La parte del escape que acaba como partículas que difunden la luz del Sol. Nadie la ha medido para un lanzamiento: el único número que ajustar con una fotografía.",it:"La parte dello scarico che diventa particelle che diffondono la luce del Sole. Nessuno l'ha misurata per un lancio: l'unico numero da tarare su una fotografia."},group:{en:"Plume",fr:"Panache",es:"Estela",it:"Scia"}}),n.plume("particleRadiusUm",{min:.05,max:5,step:.05,unit:"µm",label:{en:"Particle radius",fr:"Rayon des particules",es:"Radio de las partículas",it:"Raggio delle particelle"},group:{en:"Plume",fr:"Panache",es:"Estela",it:"Scia"}}),n.plume("lifetimeS",{min:10,max:3600,step:10,unit:"s",label:{en:"Trail lifetime",fr:"Durée de la traînée",es:"Duración de la estela",it:"Durata della scia"},hint:{en:"How long the narrow trail lasts before the particles have gone.",fr:"Combien de temps la traînée étroite dure avant que les particules aient disparu.",es:"Cuánto dura la estela estrecha antes de que las partículas hayan desaparecido.",it:"Quanto dura la scia stretta prima che le particelle siano sparite."},group:{en:"Plume",fr:"Panache",es:"Estela",it:"Scia"}}),n.plume("expansionKmPerS",{min:0,max:5,step:.01,unit:"km/s",label:{en:"Trail spreading",fr:"Étalement de la traînée",es:"Expansión de la estela",it:"Espansione della scia"},group:{en:"Plume",fr:"Panache",es:"Estela",it:"Scia"}}),n.plume("initialRadiusKm",{min:0,max:50,step:.1,unit:"km",label:{en:"Radius at release",fr:"Rayon au lâcher",es:"Radio al soltar",it:"Raggio al rilascio"},group:{en:"Plume",fr:"Panache",es:"Estela",it:"Scia"}}),n.plume("collarShare",{min:0,max:1,step:.01,label:{en:"Share in the collar",fr:"Part dans la collerette",es:"Parte en el collar",it:"Parte nel collare"},hint:{en:"The collar is the exhaust just let go, which spreads fast into a wide short-lived shell round the stage; the rest stays behind as the narrow trail.",fr:"La collerette est l'échappement qui vient d'être lâché, qui s'étale vite en une coque large et brève autour de l'étage ; le reste demeure derrière en traînée étroite.",es:"El collar es el escape recién soltado, que se extiende rápido en una envoltura ancha y breve alrededor de la etapa; el resto queda detrás como estela estrecha.",it:"Il collare è lo scarico appena rilasciato, che si allarga in fretta in un guscio largo e breve attorno allo stadio; il resto resta dietro come scia stretta."},group:{en:"Collar",fr:"Collerette",es:"Collar",it:"Collare"}}),n.plume("collarExpansionKmPerS",{min:0,max:10,step:.05,unit:"km/s",label:{en:"Collar spreading",fr:"Étalement de la collerette",es:"Expansión del collar",it:"Espansione del collare"},hint:{en:"How fast the collar widens: three quarters of the exhaust velocity when the engine is stated.",fr:"La vitesse à laquelle la collerette s'élargit : les trois quarts de la vitesse d'éjection quand le moteur est donné.",es:"La rapidez con que el collar se ensancha: tres cuartos de la velocidad de escape cuando se da el motor.",it:"Quanto in fretta il collare si allarga: tre quarti della velocità di scarico quando il motore è dato."},group:{en:"Collar",fr:"Collerette",es:"Collar",it:"Collare"}}),n.plume("collarLifetimeS",{min:1,max:300,step:1,unit:"s",label:{en:"Collar lifetime",fr:"Durée de la collerette",es:"Duración del collar",it:"Durata del collare"},group:{en:"Collar",fr:"Collerette",es:"Collar",it:"Collare"}})]};static PLACE={kind:"launch-place",title:{en:"Place of the path",fr:"Point du chemin",es:"Punto de la trayectoria",it:"Punto del percorso"},parameters:[{type:"number",key:"t",min:-3600,max:36e3,step:.1,unit:"s",scale:.001,required:!0,label:{en:"Time",fr:"Instant",es:"Instante",it:"Istante"},hint:{en:"Seconds of the recording; negative before it began: a stage seen minutes after its launch was already high when the recording started.",fr:"Secondes de l'enregistrement ; négatives avant son début : un étage vu des minutes après son lancement était déjà haut quand l'enregistrement a commencé.",es:"Segundos de la grabación; negativos antes de que empezara: una etapa vista minutos después de su lanzamiento ya estaba alta cuando empezó la grabación.",it:"Secondi della registrazione; negativi prima del suo inizio: uno stadio visto minuti dopo il lancio era già alto quando la registrazione è iniziata."}},{type:"number",key:"lat",min:-90,max:90,step:1e-4,unit:"°",required:!0,label:{en:"Latitude",fr:"Latitude",es:"Latitud",it:"Latitudine"}},{type:"number",key:"lng",min:-180,max:180,step:1e-4,unit:"°",required:!0,label:{en:"Longitude",fr:"Longitude",es:"Longitud",it:"Longitudine"}},{type:"number",key:"altitudeKm",min:0,max:2e3,step:.1,unit:"km",required:!0,label:{en:"Altitude",fr:"Altitude",es:"Altitud",it:"Altitudine"}}]};static publish(){r.publish(n.SET)}}class o{constructor(e,t,a){this.container=e,this.host=t,this.language=a,r.of("launch")||n.publish(),this.render(),this.setLanguage(a)}messages=d;languageToken=0;currentId;form;list;places;placeForm;placeIndex=0;language;shown=[];async setLanguage(e){const t=++this.languageToken;this.language=e;const a=p.includes(e)?e:"en",i=a==="en"?d:await m(a);t===this.languageToken&&(this.messages=i,this.render(),this.sync())}sync(){const e=this.launches;this.shown=[...e],e.some(i=>i.id===this.currentId)||(this.currentId=e[0]?.id),this.list?.setItems(e.map(i=>({id:i.id,label:this.labelOf(i)})),this.currentId),this.list?.setAddState(this.startOfNew()!==void 0,this.startOfNew()===void 0?this.messages.addLaunchNowhere:void 0),this.element("launch-none").hidden=e.length>0;const t=this.current;if(this.element("launch-fields").hidden=t===void 0,!t)return;this.syncPlaces(t);const a=r.of("launch");this.form??=new c(this.element("launch-parameters"),this.language,"",{said:()=>this.host.said(),writingLanguage:()=>this.host.writingLanguage()}),this.form.show(a,t,()=>this.written())}refresh(){const e=this.launches;e.length===this.shown.length&&e.every((t,a)=>t===this.shown[a])||this.sync()}get current(){return this.launches.find(e=>e.id===this.currentId)}show(e){this.currentId=e,this.placeIndex=0,this.sync()}render(){const e=this.messages;this.form=void 0,this.container.innerHTML=`<div class="launch-editor">
1
+ import{L as h,n as r,U as p,o as m,k as c,E as u,m as g}from"./rr0-sighting-editor.mjs";import{launchEditorMessages_en as d}from"./LaunchEditorMessages_en-j4RgQPZu.js";class n{static plumeValue(e){return t=>h.plumeOf(t)[e]}static plume(e,t){return{type:"number",key:`plume.${e}`,effective:n.plumeValue(e),...t}}static burn(e,t){return{type:"number",key:e,min:-3600,max:36e3,step:.1,unit:"s",scale:.001,label:t.label,hint:t.hint,group:{en:"Engine",fr:"Moteur",es:"Motor",it:"Motore"},effective:a=>t.ends(a.track??[])?.t}}static nextPlace(e){const t=e[e.length-1]??{t:0,lat:0,lng:0,altitudeKm:0},a=e[e.length-2]??t,i=(s,l=0)=>e.length>1?t[s]-a[s]:l;return{t:t.t+(e.length>1?i("t"):1e4),lat:t.lat+i("lat"),lng:t.lng+i("lng"),altitudeKm:Math.max(0,t.altitudeKm+i("altitudeKm"))}}static SET={kind:"launch",title:{en:"Launch",fr:"Lancement",es:"Lanzamiento",it:"Lancio"},parameters:[{type:"said",key:"title",label:{en:"Name",fr:"Nom",es:"Nombre",it:"Nome"},group:{en:"Vehicle",fr:"Lanceur",es:"Lanzador",it:"Lanciatore"}},{type:"text",key:"vehicle.name",label:{en:"Vehicle",fr:"Lanceur",es:"Lanzador",it:"Lanciatore"},placeholder:"Falcon 9",group:{en:"Vehicle",fr:"Lanceur",es:"Lanzador",it:"Lanciatore"}},{type:"text",key:"vehicle.mission",label:{en:"Mission",fr:"Mission",es:"Misión",it:"Missione"},placeholder:"Starlink Group 10-49",group:{en:"Vehicle",fr:"Lanceur",es:"Lanzador",it:"Lanciatore"}},{type:"number",key:"vehicle.engine.thrustKN",min:1,max:1e5,step:1,unit:"kN",label:{en:"Thrust (vacuum)",fr:"Poussée (dans le vide)",es:"Empuje (en el vacío)",it:"Spinta (nel vuoto)"},hint:{en:"Merlin Vacuum 934, RL10 110, a solid booster several thousand. With the specific impulse, it sets how much exhaust leaves each second.",fr:"Merlin Vacuum 934, RL10 110, un booster à poudre plusieurs milliers. Avec l'impulsion spécifique, elle fixe le débit d'échappement.",es:"Merlin Vacuum 934, RL10 110, un propulsor sólido varios miles. Con el impulso específico, fija el caudal de escape.",it:"Merlin Vacuum 934, RL10 110, un booster solido diverse migliaia. Con l'impulso specifico, fissa la portata dello scarico."},group:{en:"Engine",fr:"Moteur",es:"Motor",it:"Motore"}},{type:"number",key:"vehicle.engine.specificImpulseS",min:100,max:500,step:1,unit:"s",label:{en:"Specific impulse (vacuum)",fr:"Impulsion spécifique (dans le vide)",es:"Impulso específico (en el vacío)",it:"Impulso specifico (nel vuoto)"},hint:{en:"Times 9.81 m/s² it is the exhaust velocity, which sets how fast the exhaust spreads round the stage: 348 s is 3.4 km/s.",fr:"Multipliée par 9,81 m/s², c'est la vitesse d'éjection, qui fixe la vitesse à laquelle l'échappement s'étale autour de l'étage : 348 s font 3,4 km/s.",es:"Multiplicado por 9,81 m/s² es la velocidad de escape, que fija la rapidez con que el escape se extiende alrededor de la etapa: 348 s son 3,4 km/s.",it:"Moltiplicato per 9,81 m/s² è la velocità di scarico, che fissa quanto in fretta lo scarico si allarga attorno allo stadio: 348 s sono 3,4 km/s."},group:{en:"Engine",fr:"Moteur",es:"Motor",it:"Motore"}},{type:"choice",key:"vehicle.engine.propellant",label:{en:"Propellant",fr:"Ergols",es:"Propelentes",it:"Propellenti"},hint:{en:"What the exhaust is made of decides how much of it turns into particles that scatter light.",fr:"Ce dont l'échappement est fait décide quelle part devient des particules qui diffusent la lumière.",es:"De qué está hecho el escape decide qué parte se vuelve partículas que difunden la luz.",it:"Di cosa è fatto lo scarico decide quanta parte diventa particelle che diffondono la luce."},choices:[{value:"rp1-lox",label:{en:"Kerosene and oxygen",fr:"Kérosène et oxygène",es:"Queroseno y oxígeno",it:"Cherosene e ossigeno"}},{value:"methane-lox",label:{en:"Methane and oxygen",fr:"Méthane et oxygène",es:"Metano y oxígeno",it:"Metano e ossigeno"}},{value:"hydrogen-lox",label:{en:"Hydrogen and oxygen",fr:"Hydrogène et oxygène",es:"Hidrógeno y oxígeno",it:"Idrogeno e ossigeno"}},{value:"hypergolic",label:{en:"Hypergolic",fr:"Hypergolique",es:"Hipergólico",it:"Ipergolico"}},{value:"solid",label:{en:"Solid",fr:"Poudre",es:"Sólido",it:"Solido"}}],group:{en:"Engine",fr:"Moteur",es:"Motor",it:"Motore"}},n.burn("burnFromT",{label:{en:"Engine start",fr:"Allumage du moteur",es:"Encendido del motor",it:"Accensione del motore"},hint:{en:"When the engine started, in seconds of the recording; it may be before it. Empty: the first point of the path.",fr:"Quand le moteur s'est allumé, en secondes de l'enregistrement ; avant lui si besoin. Vide : le premier point du chemin.",es:"Cuándo se encendió el motor, en segundos de la grabación; puede ser antes. Vacío: el primer punto de la trayectoria.",it:"Quando si è acceso il motore, in secondi della registrazione; può essere prima. Vuoto: il primo punto del percorso."},ends:e=>e[0]}),n.burn("burnUntilT",{label:{en:"Engine cut-off",fr:"Extinction du moteur",es:"Apagado del motor",it:"Spegnimento del motore"},hint:{en:"When the engine stopped, in seconds of the recording. Empty: the last point of the path. Nothing is let go after it.",fr:"Quand le moteur s'est éteint, en secondes de l'enregistrement. Vide : le dernier point du chemin. Rien n'est lâché après.",es:"Cuándo se apagó el motor, en segundos de la grabación. Vacío: el último punto de la trayectoria. Nada se suelta después.",it:"Quando si è spento il motore, in secondi della registrazione. Vuoto: l'ultimo punto del percorso. Dopo non si rilascia nulla."},ends:e=>e[e.length-1]}),n.plume("exhaustKgPerS",{min:.1,max:1e5,step:.1,unit:"kg/s",label:{en:"Exhaust flow",fr:"Débit d'échappement",es:"Caudal de escape",it:"Portata di scarico"},hint:{en:"How much exhaust leaves the engine each second: how bright the plume is. Thrust over exhaust velocity when the engine is stated.",fr:"La masse d'échappement qui sort du moteur chaque seconde : la luminosité du panache. La poussée sur la vitesse d'éjection quand le moteur est donné.",es:"La masa de escape que sale del motor cada segundo: el brillo de la estela. El empuje sobre la velocidad de escape cuando se da el motor.",it:"La massa di scarico che esce dal motore ogni secondo: la luminosità della scia. La spinta sulla velocità di scarico quando il motore è dato."},group:{en:"Plume",fr:"Panache",es:"Estela",it:"Scia"}}),n.plume("condensedShare",{min:0,max:1,step:.01,label:{en:"Share that scatters",fr:"Part qui diffuse",es:"Parte que difunde",it:"Parte che diffonde"},hint:{en:"The share of the exhaust that ends up as particles that scatter the Sun's light. Nobody has measured it for a launch: the one number to fit against a photograph.",fr:"La part de l'échappement qui devient des particules diffusant la lumière du Soleil. Personne ne l'a mesurée pour un lancement : le seul nombre à caler sur une photographie.",es:"La parte del escape que acaba como partículas que difunden la luz del Sol. Nadie la ha medido para un lanzamiento: el único número que ajustar con una fotografía.",it:"La parte dello scarico che diventa particelle che diffondono la luce del Sole. Nessuno l'ha misurata per un lancio: l'unico numero da tarare su una fotografia."},group:{en:"Plume",fr:"Panache",es:"Estela",it:"Scia"}}),n.plume("particleRadiusUm",{min:.05,max:5,step:.05,unit:"µm",label:{en:"Particle radius",fr:"Rayon des particules",es:"Radio de las partículas",it:"Raggio delle particelle"},group:{en:"Plume",fr:"Panache",es:"Estela",it:"Scia"}}),n.plume("lifetimeS",{min:10,max:3600,step:10,unit:"s",label:{en:"Trail lifetime",fr:"Durée de la traînée",es:"Duración de la estela",it:"Durata della scia"},hint:{en:"How long the narrow trail lasts before the particles have gone.",fr:"Combien de temps la traînée étroite dure avant que les particules aient disparu.",es:"Cuánto dura la estela estrecha antes de que las partículas hayan desaparecido.",it:"Quanto dura la scia stretta prima che le particelle siano sparite."},group:{en:"Plume",fr:"Panache",es:"Estela",it:"Scia"}}),n.plume("expansionKmPerS",{min:0,max:5,step:.01,unit:"km/s",label:{en:"Trail spreading",fr:"Étalement de la traînée",es:"Expansión de la estela",it:"Espansione della scia"},group:{en:"Plume",fr:"Panache",es:"Estela",it:"Scia"}}),n.plume("initialRadiusKm",{min:0,max:50,step:.1,unit:"km",label:{en:"Radius at release",fr:"Rayon au lâcher",es:"Radio al soltar",it:"Raggio al rilascio"},group:{en:"Plume",fr:"Panache",es:"Estela",it:"Scia"}}),n.plume("collarShare",{min:0,max:1,step:.01,label:{en:"Share in the collar",fr:"Part dans la collerette",es:"Parte en el collar",it:"Parte nel collare"},hint:{en:"The collar is the exhaust just let go, which spreads fast into a wide short-lived shell round the stage; the rest stays behind as the narrow trail.",fr:"La collerette est l'échappement qui vient d'être lâché, qui s'étale vite en une coque large et brève autour de l'étage ; le reste demeure derrière en traînée étroite.",es:"El collar es el escape recién soltado, que se extiende rápido en una envoltura ancha y breve alrededor de la etapa; el resto queda detrás como estela estrecha.",it:"Il collare è lo scarico appena rilasciato, che si allarga in fretta in un guscio largo e breve attorno allo stadio; il resto resta dietro come scia stretta."},group:{en:"Collar",fr:"Collerette",es:"Collar",it:"Collare"}}),n.plume("collarExpansionKmPerS",{min:0,max:10,step:.05,unit:"km/s",label:{en:"Collar spreading",fr:"Étalement de la collerette",es:"Expansión del collar",it:"Espansione del collare"},hint:{en:"How fast the collar widens: three quarters of the exhaust velocity when the engine is stated.",fr:"La vitesse à laquelle la collerette s'élargit : les trois quarts de la vitesse d'éjection quand le moteur est donné.",es:"La rapidez con que el collar se ensancha: tres cuartos de la velocidad de escape cuando se da el motor.",it:"Quanto in fretta il collare si allarga: tre quarti della velocità di scarico quando il motore è dato."},group:{en:"Collar",fr:"Collerette",es:"Collar",it:"Collare"}}),n.plume("collarLifetimeS",{min:1,max:300,step:1,unit:"s",label:{en:"Collar lifetime",fr:"Durée de la collerette",es:"Duración del collar",it:"Durata del collare"},group:{en:"Collar",fr:"Collerette",es:"Collar",it:"Collare"}})]};static PLACE={kind:"launch-place",title:{en:"Place of the path",fr:"Point du chemin",es:"Punto de la trayectoria",it:"Punto del percorso"},parameters:[{type:"number",key:"t",min:-3600,max:36e3,step:.1,unit:"s",scale:.001,required:!0,label:{en:"Time",fr:"Instant",es:"Instante",it:"Istante"},hint:{en:"Seconds of the recording; negative before it began: a stage seen minutes after its launch was already high when the recording started.",fr:"Secondes de l'enregistrement ; négatives avant son début : un étage vu des minutes après son lancement était déjà haut quand l'enregistrement a commencé.",es:"Segundos de la grabación; negativos antes de que empezara: una etapa vista minutos después de su lanzamiento ya estaba alta cuando empezó la grabación.",it:"Secondi della registrazione; negativi prima del suo inizio: uno stadio visto minuti dopo il lancio era già alto quando la registrazione è iniziata."}},{type:"number",key:"lat",min:-90,max:90,step:1e-4,unit:"°",required:!0,label:{en:"Latitude",fr:"Latitude",es:"Latitud",it:"Latitudine"}},{type:"number",key:"lng",min:-180,max:180,step:1e-4,unit:"°",required:!0,label:{en:"Longitude",fr:"Longitude",es:"Longitud",it:"Longitudine"}},{type:"number",key:"altitudeKm",min:0,max:2e3,step:.1,unit:"km",required:!0,label:{en:"Altitude",fr:"Altitude",es:"Altitud",it:"Altitudine"}}]};static publish(){r.publish(n.SET)}}class o{constructor(e,t,a){this.container=e,this.host=t,this.language=a,r.of("launch")||n.publish(),this.render(),this.setLanguage(a)}messages=d;languageToken=0;currentId;form;list;places;placeForm;placeIndex=0;language;shown=[];async setLanguage(e){const t=++this.languageToken;this.language=e;const a=p.includes(e)?e:"en",i=a==="en"?d:await m(a);t===this.languageToken&&(this.messages=i,this.render(),this.sync())}sync(){const e=this.launches;this.shown=[...e],e.some(i=>i.id===this.currentId)||(this.currentId=e[0]?.id),this.list?.setItems(e.map(i=>({id:i.id,label:this.labelOf(i)})),this.currentId),this.list?.setAddState(this.startOfNew()!==void 0,this.startOfNew()===void 0?this.messages.addLaunchNowhere:void 0),this.element("launch-none").hidden=e.length>0;const t=this.current;if(this.element("launch-fields").hidden=t===void 0,!t)return;this.syncPlaces(t);const a=r.of("launch");this.form??=new c(this.element("launch-parameters"),this.language,"",{said:()=>this.host.said(),writingLanguage:()=>this.host.writingLanguage()}),this.form.show(a,t,()=>this.written())}refresh(){const e=this.launches;e.length===this.shown.length&&e.every((t,a)=>t===this.shown[a])||this.sync()}get current(){return this.launches.find(e=>e.id===this.currentId)}show(e){this.currentId=e,this.placeIndex=0,this.sync()}render(){const e=this.messages;this.form=void 0,this.container.innerHTML=`<div class="launch-editor">
2
2
  <p class="launch-intro">${e.intro}</p>
3
3
  <p id="launch-none" class="launch-intro">${e.none}</p>
4
4
  <div id="launch-list"></div>
@@ -0,0 +1 @@
1
+ import{G as d,x as c,y as l,M as f,z as m,C as u,F as w,J as y,K as M,N as g,Q as S,X as v,Y as O}from"./rr0-sighting-editor.mjs";class h{static key(e){return"url"in e?`url:${e.url}|${e.headingOffsetDeg??0}`:"shape"in e?`shape:${e.shape}`:`decor:${e.decorKind}`}static async build(e){const s=new d;if("url"in e){const t=await c(e.url);t.rotation.y=-(e.headingOffsetDeg??0)*Math.PI/180,s.add(t)}else"shape"in e?s.add(h.shapeOf(e.shape)):s.add(l.build({id:"preview",kind:e.decorKind,eastM:0,northM:0},!1));return s}static shapeOf(e){if(e==="figure")return l.build({id:"preview",kind:"entity",eastM:0,northM:0},!1);const s=new f(m.unitGeometry(e),new u({color:13158608,roughness:.5,metalness:0}));return e==="ellipsoid"&&s.scale.set(1,.55,1),s}static dispose(e){e.traverse(s=>{const t=s;if(t.isMesh){t.geometry?.dispose();for(const a of[t.material].flat())a.dispose()}})}static stage(e,s){const t=new w().setFromObject(e);if(t.isEmpty())return;const a=t.getBoundingSphere(new y),r=new d;e.position.sub(a.center),r.add(e);const n=new M;n.add(r),n.add(new g(16777215,6715272,1.6));const o=new S(16777215,2.5);o.position.set(1,2,1.5),n.add(o);const i=new v(30,s,a.radius*.05,a.radius*20),p=a.radius/Math.sin(i.fov*Math.PI/360)*1.05;return i.position.copy(new O(.55,.3,-.78).normalize().multiplyScalar(p)),i.lookAt(0,0,0),{scene:n,camera:i,pivot:r}}}export{h as M};
@@ -1 +1 @@
1
- import{W as c}from"./rr0-sighting-editor.mjs";import{M as i}from"./ModelSource-f1GhdDou.js";class l{static SIZE_PX={width:192,height:144};static cache=new Map;static queue=Promise.resolve();static pending=0;static renderer;static of(r){const t=i.key(r);let e=this.cache.get(t);return e||(this.pending++,e=this.queue.then(()=>this.draw(r)).catch(()=>{}).finally(()=>{--this.pending===0&&this.release()}),this.queue=e,this.cache.set(t,e)),e}static async draw(r){const t=await i.build(r);try{const{width:e,height:n}=this.SIZE_PX,a=i.stage(t,e/n);if(!a)return;const s=this.renderer??=new c({antialias:!0,alpha:!0,preserveDrawingBuffer:!0});return s.setSize(e,n,!1),s.setClearColor(0,0),s.render(a.scene,a.camera),s.domElement.toDataURL("image/png")}finally{i.dispose(t)}}static release(){this.renderer?.dispose(),this.renderer?.forceContextLoss(),this.renderer=void 0}}export{l as ModelThumbnails};
1
+ import{W as c}from"./rr0-sighting-editor.mjs";import{M as i}from"./ModelSource-SZRN-dar.js";class l{static SIZE_PX={width:192,height:144};static cache=new Map;static queue=Promise.resolve();static pending=0;static renderer;static of(r){const t=i.key(r);let e=this.cache.get(t);return e||(this.pending++,e=this.queue.then(()=>this.draw(r)).catch(()=>{}).finally(()=>{--this.pending===0&&this.release()}),this.queue=e,this.cache.set(t,e)),e}static async draw(r){const t=await i.build(r);try{const{width:e,height:n}=this.SIZE_PX,a=i.stage(t,e/n);if(!a)return;const s=this.renderer??=new c({antialias:!0,alpha:!0,preserveDrawingBuffer:!0});return s.setSize(e,n,!1),s.setClearColor(0,0),s.render(a.scene,a.camera),s.domElement.toDataURL("image/png")}finally{i.dispose(t)}}static release(){this.renderer?.dispose(),this.renderer?.forceContextLoss(),this.renderer=void 0}}export{l as ModelThumbnails};
@@ -1 +1 @@
1
- import{W as h}from"./rr0-sighting-editor.mjs";import{M as c}from"./ModelSource-f1GhdDou.js";class a{constructor(t,e){this.container=t,this.source=e,this.canvas=document.createElement("canvas"),this.canvas.className="model-live",this.canvas.style.cssText="position:absolute;inset:0;width:100%;height:100%;touch-action:none;cursor:grab;display:none",this.canvas.addEventListener("pointerdown",s=>this.press(s)),this.canvas.addEventListener("pointermove",s=>this.move(s)),this.canvas.addEventListener("pointerup",()=>this.release()),this.canvas.addEventListener("pointercancel",()=>this.release())}static renderer;static SPIN_RAD_PER_S=.7;static DRAG_RAD_PER_PX=.012;static CLICK_TOLERANCE_PX=4;static current;object;stage;frame=0;stopped=!1;last=0;dragging;draggedPastClick=!1;canvas;static show(t,e){a.current?.stop();const s=new a(t,e);return a.current=s,s.start(),s}static end(){a.current?.stop(),a.current=void 0,a.renderer?.dispose(),a.renderer?.forceContextLoss(),a.renderer=void 0}consumeDrag(){const t=this.draggedPastClick;return this.draggedPastClick=!1,t}get active(){return!this.stopped}stop(){this.stopped=!0,cancelAnimationFrame(this.frame),this.canvas.remove(),this.object&&c.dispose(this.object),this.object=void 0,a.current===this&&(a.current=void 0)}async start(){try{const t=await c.build(this.source);if(this.stopped){c.dispose(t);return}this.object=t;const{width:e,height:s}=this.container.getBoundingClientRect(),i=e>0&&s>0?e/s:4/3;if(this.stage=c.stage(t,i),!this.stage)return;(a.renderer??=new h({antialias:!0,alpha:!0})).setClearColor(0,0),this.container.append(this.canvas),this.canvas.style.display="block",this.last=performance.now(),this.tick()}catch{}}tick=()=>{if(this.stopped||!this.stage)return;const t=performance.now(),e=Math.min(.1,(t-this.last)/1e3);this.last=t,this.dragging||(this.stage.pivot.rotation.y+=a.SPIN_RAD_PER_S*e);const s=a.renderer,{width:i,height:n}=this.canvas.getBoundingClientRect(),r=Math.min(2,window.devicePixelRatio||1);(this.canvas.width!==Math.round(i*r)||this.canvas.height!==Math.round(n*r))&&(s.setPixelRatio(r),s.setSize(i,n,!1),this.canvas.width=Math.round(i*r),this.canvas.height=Math.round(n*r),this.stage.camera.aspect=i/Math.max(1,n),this.stage.camera.updateProjectionMatrix()),s.render(this.stage.scene,this.stage.camera);const o=this.canvas.getContext("2d");o?.clearRect(0,0,this.canvas.width,this.canvas.height),o?.drawImage(s.domElement,0,0,this.canvas.width,this.canvas.height),this.frame=requestAnimationFrame(this.tick)};press(t){this.dragging={x:t.clientX,y:t.clientY,moved:!1},this.canvas.setPointerCapture(t.pointerId),this.canvas.style.cursor="grabbing"}move(t){const e=this.dragging;if(!e||!this.stage)return;const s=t.clientX-e.x,i=t.clientY-e.y;!e.moved&&Math.hypot(s,i)<a.CLICK_TOLERANCE_PX||(e.moved=!0,this.draggedPastClick=!0,this.stage.pivot.rotation.y+=s*a.DRAG_RAD_PER_PX,this.stage.pivot.rotation.x=Math.max(-1.4,Math.min(1.4,this.stage.pivot.rotation.x-i*a.DRAG_RAD_PER_PX)),e.x=t.clientX,e.y=t.clientY)}release(){this.dragging=void 0,this.canvas.style.cursor="grab"}}export{a as ModelViewer};
1
+ import{W as h}from"./rr0-sighting-editor.mjs";import{M as c}from"./ModelSource-SZRN-dar.js";class a{constructor(t,e){this.container=t,this.source=e,this.canvas=document.createElement("canvas"),this.canvas.className="model-live",this.canvas.style.cssText="position:absolute;inset:0;width:100%;height:100%;touch-action:none;cursor:grab;display:none",this.canvas.addEventListener("pointerdown",s=>this.press(s)),this.canvas.addEventListener("pointermove",s=>this.move(s)),this.canvas.addEventListener("pointerup",()=>this.release()),this.canvas.addEventListener("pointercancel",()=>this.release())}static renderer;static SPIN_RAD_PER_S=.7;static DRAG_RAD_PER_PX=.012;static CLICK_TOLERANCE_PX=4;static current;object;stage;frame=0;stopped=!1;last=0;dragging;draggedPastClick=!1;canvas;static show(t,e){a.current?.stop();const s=new a(t,e);return a.current=s,s.start(),s}static end(){a.current?.stop(),a.current=void 0,a.renderer?.dispose(),a.renderer?.forceContextLoss(),a.renderer=void 0}consumeDrag(){const t=this.draggedPastClick;return this.draggedPastClick=!1,t}get active(){return!this.stopped}stop(){this.stopped=!0,cancelAnimationFrame(this.frame),this.canvas.remove(),this.object&&c.dispose(this.object),this.object=void 0,a.current===this&&(a.current=void 0)}async start(){try{const t=await c.build(this.source);if(this.stopped){c.dispose(t);return}this.object=t;const{width:e,height:s}=this.container.getBoundingClientRect(),i=e>0&&s>0?e/s:4/3;if(this.stage=c.stage(t,i),!this.stage)return;(a.renderer??=new h({antialias:!0,alpha:!0})).setClearColor(0,0),this.container.append(this.canvas),this.canvas.style.display="block",this.last=performance.now(),this.tick()}catch{}}tick=()=>{if(this.stopped||!this.stage)return;const t=performance.now(),e=Math.min(.1,(t-this.last)/1e3);this.last=t,this.dragging||(this.stage.pivot.rotation.y+=a.SPIN_RAD_PER_S*e);const s=a.renderer,{width:i,height:n}=this.canvas.getBoundingClientRect(),r=Math.min(2,window.devicePixelRatio||1);(this.canvas.width!==Math.round(i*r)||this.canvas.height!==Math.round(n*r))&&(s.setPixelRatio(r),s.setSize(i,n,!1),this.canvas.width=Math.round(i*r),this.canvas.height=Math.round(n*r),this.stage.camera.aspect=i/Math.max(1,n),this.stage.camera.updateProjectionMatrix()),s.render(this.stage.scene,this.stage.camera);const o=this.canvas.getContext("2d");o?.clearRect(0,0,this.canvas.width,this.canvas.height),o?.drawImage(s.domElement,0,0,this.canvas.width,this.canvas.height),this.frame=requestAnimationFrame(this.tick)};press(t){this.dragging={x:t.clientX,y:t.clientY,moved:!1},this.canvas.setPointerCapture(t.pointerId),this.canvas.style.cursor="grabbing"}move(t){const e=this.dragging;if(!e||!this.stage)return;const s=t.clientX-e.x,i=t.clientY-e.y;!e.moved&&Math.hypot(s,i)<a.CLICK_TOLERANCE_PX||(e.moved=!0,this.draggedPastClick=!0,this.stage.pivot.rotation.y+=s*a.DRAG_RAD_PER_PX,this.stage.pivot.rotation.x=Math.max(-1.4,Math.min(1.4,this.stage.pivot.rotation.x-i*a.DRAG_RAD_PER_PX)),e.x=t.clientX,e.y=t.clientY)}release(){this.dragging=void 0,this.canvas.style.cursor="grab"}}export{a as ModelViewer};
@@ -0,0 +1,41 @@
1
+ import{G as F,C as P,a3 as H,a4 as w,a7 as K,a9 as N,M as U,aa as k}from"./rr0-sighting-editor.mjs";class S{static HOLLOW_M=1;static WINDOW_M=30;static SAMPLE_M=4;static MAX_GRADE={rail:.025,highSpeed:.035,subway:.04,light_rail:.06,tram:.08,funicular:1/0};static heights(t,n,s){const e=t.map(r=>r.level===0),o=t.map((r,l)=>e[l]?S.targets(r,n,s):[]),i=t.map((r,l)=>e[l]?S.samples(r,o[l]):[]),a=new Map;t.forEach((r,l)=>{if(e[l])for(const p of S.ends(r)){const h=S.key(p),E=a.get(h);E?E.push(l):a.set(h,[l])}});const M=r=>{const l=a.get(S.key(r));if(l)return S.median(l.flatMap(p=>i[p]),r)};return t.map((r,l)=>{if(e[l]){const p=[...new Set([l,...S.ends(r).flatMap(f=>a.get(S.key(f))??[])])].flatMap(f=>i[f]),h=r.centre.map((f,O)=>S.median(p,f)??o[l][O]),[E,L]=S.ends(r);return h[0]=M(E)??h[0],h[h.length-1]=M(L)??h[h.length-1],S.graded(h,r.along,r.highSpeed?S.MAX_GRADE.highSpeed:S.MAX_GRADE[r.kind])}return S.carried(r,n,s,M)})}static targets(t,n,s){return t.centre.map(e=>{const o=n(e.x,e.z);if(s===void 0||e.altitudeM===void 0)return o;const i=e.altitudeM+s;return i-o>S.HOLLOW_M?i:o})}static samples(t,n){const s=[];let e=0;return t.centre.forEach((o,i)=>{t.along[i]+1e-6<e&&i<t.centre.length-1||(s.push({x:o.x,z:o.z,y:n[i]}),e=t.along[i]+S.SAMPLE_M)}),s}static median(t,n){const s=[];for(const o of t)Math.hypot(o.x-n.x,o.z-n.z)<=S.WINDOW_M&&s.push(o.y);if(s.length===0)return;s.sort((o,i)=>o-i);const e=s.length>>1;return s.length%2===1?s[e]:(s[e-1]+s[e])/2}static graded(t,n,s){if(!Number.isFinite(s)||t.length<3)return t;const e=[...t],o=e.length-1,i=n[o];if(Math.abs(e[o]-e[0])>s*i)return n.map(a=>e[0]+(e[o]-e[0])*a/i);for(let a=1;a<o;a++){const M=s*(n[a]-n[a-1]);e[a]=Math.min(e[a-1]+M,Math.max(e[a-1]-M,e[a]))}for(let a=o-1;a>0;a--){const M=s*(n[a+1]-n[a]);e[a]=Math.min(e[a+1]+M,Math.max(e[a+1]-M,e[a]))}return e}static carried(t,n,s,e){const[o,i]=S.ends(t),a=t.along[t.along.length-1],M=e(o),r=e(i);if(s!==void 0&&t.centre.every(h=>h.altitudeM!==void 0)){const h=t.centre.map(f=>f.altitudeM+s),E=M!==void 0?M-h[0]:0,L=r!==void 0?r-h[h.length-1]:0;return h.map((f,O)=>f+E+(L-E)*t.along[O]/a)}const l=M??n(o.x,o.z),p=r??n(i.x,i.z);return t.along.map(h=>l+(p-l)*h/a)}static ends(t){return[t.centre[0],t.centre[t.centre.length-1]]}static key(t){return`${Math.round(t.x*2)},${Math.round(t.z*2)}`}}class I{positions=[];indices=[];along=[];get vertexCount(){return this.positions.length/3}strip(t,n,s){const e=this.vertexCount;for(let o=0;o<t.length;o++)this.positions.push(t[o].x,t[o].y,t[o].z,n[o].x,n[o].y,n[o].z),s&&this.along.push(s[o],s[o]);for(let o=0;o<t.length-1;o++){const i=e+o*2;this.indices.push(i,i+2,i+1,i+1,i+2,i+3)}}beam(t,n,s,e=!0){const o=n.x-t.x,i=n.y-t.y,a=n.z-t.z,M=Math.hypot(o,i,a);if(M<1e-6)return;const r={x:o/M,y:i/M,z:a/M},l=Math.abs(r.y)>.9?{x:1,y:0,z:0}:{x:0,y:1,z:0},p=r.y*l.z-r.z*l.y,h=r.z*l.x-r.x*l.z,E=r.x*l.y-r.y*l.x,L=Math.hypot(p,h,E),f={x:p/L*s/2,y:h/L*s/2,z:E/L*s/2},O={x:r.y*f.z-r.z*f.y,y:r.z*f.x-r.x*f.z,z:r.x*f.y-r.y*f.x},g=(u,A,d)=>({x:u.x+f.x*A+O.x*d,y:u.y+f.y*A+O.y*d,z:u.z+f.z*A+O.z*d}),_=[[1,1],[-1,1],[-1,-1],[1,-1]];for(let u=0;u<4;u++){const[A,d]=_[u],[x,v]=_[(u+1)%4];this.quad(g(t,A,d),g(t,x,v),g(n,x,v),g(n,A,d))}e&&(this.quad(...[..._].reverse().map(([u,A])=>g(t,u,A))),this.quad(..._.map(([u,A])=>g(n,u,A))))}quad(t,n,s,e){const o=this.vertexCount;this.positions.push(t.x,t.y,t.z,n.x,n.y,n.z,s.x,s.y,s.z,e.x,e.y,e.z),this.indices.push(o,o+1,o+2,o,o+2,o+3)}}class c{static STEP_M=6;static BALLAST_HEIGHT_M=.5;static BALLAST_SLOPE=1.5;static BALLAST_SHOULDER_M=.45;static DECK_DEPTH_M=.8;static BANK_SLOPE=1.5;static SLEEPER_LENGTH_M=2.4;static SLEEPER_WIDTH_M=.29;static SLEEPER_SPACING_M=.6;static RAIL_HEAD_M=.072;static RAIL_HEIGHT_M=.18;static TRAM_RAIL_HEIGHT_M=.03;static LIFT_M=.06;static CATENARY={rail:{contactM:5.5,systemM:1.4,spanM:54,staggerM:.2},highSpeed:{contactM:5.08,systemM:1.4,spanM:63,staggerM:.2},service:{contactM:5.5,systemM:1.2,spanM:45,staggerM:.2},tram:{contactM:6,systemM:0,spanM:30,staggerM:.2}};static MESSENGER_SAG_M=.55;static MAST_SIDE_M=.26;static MAST_OFFSET_M=3.1;static MAST_ABOVE_M=.6;static CONTACT_DIAMETER_M=.012;static MESSENGER_DIAMETER_M=.011;static ARM_SIDE_M=.06;static TRACK_SPACING_M={rail:3.7,highSpeed:4.5,tram:3.1,subway:3.4,light_rail:3.4,funicular:3.2};static BALLAST_ALBEDO=[.17,.16,.15];static BANK_ALBEDO=[.085,.09,.05];static DECK_ALBEDO=[.26,.255,.24];static CONCRETE_ALBEDO=[.36,.35,.33];static WOOD_ALBEDO=[.07,.055,.045];static RUST_ALBEDO=[.085,.068,.058];static STEEL_ALBEDO=[.3,.31,.32];static COPPER_ALBEDO=[.09,.085,.07];group=new F;stepM=c.STEP_M;drawn=0;ballastMaterial=c.pebbled(c.lambert(c.BALLAST_ALBEDO,!0));earthMaterial=c.lambert(c.BANK_ALBEDO,!0);deckMaterial=c.lambert(c.DECK_ALBEDO,!1);concreteSleepers=c.sleeperMaterial(c.CONCRETE_ALBEDO);woodSleepers=c.sleeperMaterial(c.WOOD_ALBEDO);rustMaterial=c.lambert(c.RUST_ALBEDO,!0);headMaterial=new P({color:new H(.62,.62,.62),metalness:1,roughness:.28,polygonOffset:!0,polygonOffsetFactor:-2,polygonOffsetUnits:-2});steelMaterial=c.lambert(c.STEEL_ALBEDO,!1);wireMaterial=c.lambert(c.COPPER_ALBEDO,!1);constructor(){this.group.name="railways"}get count(){return this.drawn}setGroundSpacing(t){this.stepM=Number.isFinite(t)&&t>0?Math.min(c.STEP_M,Math.max(1.5,t/2)):c.STEP_M}set(t,n,s,e,o=1/0){this.clear();const a=t.map(E=>({line:E,path:E.points.map(L=>({...w(L.lat,L.lng,n,s),altitudeM:L.altitudeM}))})).filter(({line:E,path:L})=>E.level>=0&&c.within(L,o)),M=c.altitudeOffset(a,e),r=a.flatMap(({line:E,path:L})=>{const f=this.layoutOf(E,L);return f?[{line:E,layout:f}]:[]}),l=S.heights(r.map(({layout:E})=>E),e,M),p={ballast:new I,earth:new I,deck:new I,concrete:new I,wood:new I,rust:new I,head:new I,steel:new I,wire:new I};r.forEach(({line:E,layout:L},f)=>{this.lay(E,{...L,y:l[f]},e,p),this.drawn++});const h=[[p.ballast,this.ballastMaterial,"ballast",!1],[p.earth,this.earthMaterial,"embankments",!1],[p.deck,this.deckMaterial,"decks",!0],[p.concrete,this.concreteSleepers,"sleepers",!1],[p.wood,this.woodSleepers,"sleepers wood",!1],[p.rust,this.rustMaterial,"rails",!1],[p.head,this.headMaterial,"rail heads",!1],[p.steel,this.steelMaterial,"catenary masts",!0],[p.wire,this.wireMaterial,"catenary wires",!1]];for(const[E,L,f,O]of h){const g=c.meshOf(E,L);g&&(g.name=`railways ${f}`,g.castShadow=O,g.receiveShadow=!0,this.group.add(g))}}clear(){for(const t of[...this.group.children])this.group.remove(t),t.geometry?.dispose();this.drawn=0}dispose(){this.clear();for(const t of[this.ballastMaterial,this.earthMaterial,this.deckMaterial,this.concreteSleepers,this.woodSleepers,this.rustMaterial,this.headMaterial,this.steelMaterial,this.wireMaterial])t.dispose()}static within(t,n){if(!Number.isFinite(n))return!0;const s=n*1.1+100;return t.some((e,o)=>Math.hypot(e.x,e.z)<=s||o>0&&Math.hypot((e.x+t[o-1].x)/2,(e.z+t[o-1].z)/2)<=s)}static altitudeOffset(t,n){const s=[];for(const{line:e,path:o}of t)if(e.level===0)for(const i of o)i.altitudeM!==void 0&&s.push(n(i.x,i.z)-i.altitudeM);if(!(s.length<5))return s.sort((e,o)=>e-o),s[Math.floor(s.length/2)]}layoutOf(t,n){const s=[];for(let i=0;i<n.length-1;i++){const a=n[i],M=n[i+1],r=Math.max(1,Math.ceil(Math.hypot(M.x-a.x,M.z-a.z)/this.stepM));for(let l=0;l<r;l++){const p=l/r,h=a.altitudeM!==void 0&&M.altitudeM!==void 0?a.altitudeM+(M.altitudeM-a.altitudeM)*p:void 0;s.push({x:a.x+(M.x-a.x)*p,z:a.z+(M.z-a.z)*p,altitudeM:h})}}if(s.push(n[n.length-1]),s.length<2)return;const e=[0];for(let i=1;i<s.length;i++)e.push(e[i-1]+Math.hypot(s[i].x-s[i-1].x,s[i].z-s[i-1].z));if(e[e.length-1]<.5)return;const o=s.map((i,a)=>{const M=s[Math.max(0,a-1)],r=s[Math.min(s.length-1,a+1)],l=r.x-M.x,p=r.z-M.z,h=Math.hypot(l,p);return h<1e-6?{x:1,z:0}:{x:l/h,z:p/h}});return{kind:t.kind,...t.highSpeed?{highSpeed:!0}:{},level:t.level,centre:s,along:e,dir:o}}lay(t,n,s,e){const o=t.highSpeed?c.TRACK_SPACING_M.highSpeed:c.TRACK_SPACING_M[t.kind],i=Math.min(8,Math.max(1,t.tracks)),a=Array.from({length:i},(g,_)=>(_-(i-1)/2)*o),M=t.kind==="tram",r=M?0:c.BALLAST_HEIGHT_M,l=c.LIFT_M,p=(g,_,u)=>({x:n.centre[g].x-n.dir[g].z*_,y:n.y[g]+u,z:n.centre[g].z+n.dir[g].x*_}),h=n.centre.map((g,_)=>_);if(!M){const g=c.SLEEPER_LENGTH_M/2+c.BALLAST_SHOULDER_M+(a[a.length-1]??0),_=h.map(A=>p(A,g,r+l)),u=h.map(A=>p(A,-g,r+l));if(e.ballast.strip(_,u),t.level===0){const A=g+r*c.BALLAST_SLOPE;for(const d of[1,-1]){const x=[],v=[];let m=!1;for(const z of h){const D=p(z,d*A,l),C=s(D.x,D.z)+l,b=D.y-C;b<0&&(D.y=Math.min(C,n.y[z]+r-.05+l)),x.push(D);const B=p(z,d*(A+Math.max(0,b)*c.BANK_SLOPE),l);B.y=Math.min(s(B.x,B.z)+l,D.y),D.y-B.y>.02&&(m=!0),v.push(B)}const T=d>0?_:u;d>0?e.ballast.strip(x,T):e.ballast.strip(T,x),m&&(d>0?e.earth.strip(v,x):e.earth.strip(x,v))}}else{const A=-c.DECK_DEPTH_M,d=g+.15,x=h.map(z=>p(z,d,r+l+.1)),v=h.map(z=>p(z,-d,r+l+.1)),m=h.map(z=>p(z,d,A)),T=h.map(z=>p(z,-d,A));e.deck.strip(m,x),e.deck.strip(v,T),e.deck.strip(T,m),e.deck.strip(x,h.map(z=>p(z,g,r+l+.1))),e.deck.strip(h.map(z=>p(z,-g,r+l+.1)),v)}}const E=t.service?e.wood:e.concrete,L=t.gaugeMm/2e3+c.RAIL_HEAD_M/2,f=M?c.TRAM_RAIL_HEIGHT_M:c.RAIL_HEIGHT_M,O=r+l;for(const g of a){if(!M){const _=c.SLEEPER_LENGTH_M/2;E.strip(h.map(u=>p(u,g+_,O+.004)),h.map(u=>p(u,g-_,O+.004)),n.along)}for(const _ of[1,-1]){const u=g+_*L,A=c.RAIL_HEAD_M/2,d=h.map(v=>p(v,u+A,O+f)),x=h.map(v=>p(v,u-A,O+f));e.head.strip(d,x),e.rust.strip(h.map(v=>p(v,u+A,O)),d),e.rust.strip(x,h.map(v=>p(v,u-A,O)))}}t.electrification==="overhead"&&t.kind!=="subway"&&t.kind!=="funicular"&&this.catenary(t,n,a,O+f,p,s,e)}catenary(t,n,s,e,o,i,a){const M=t.kind==="tram"?c.CATENARY.tram:t.highSpeed?c.CATENARY.highSpeed:t.service?c.CATENARY.service:c.CATENARY.rail,r=n.along[n.along.length-1],l=Math.max(1,Math.round(r/M.spanM)),p=r/l,h=Array.from({length:l},(d,x)=>(x+.5)*p),E=e+M.contactM,L=E+M.systemM,f=(M.systemM>0?L:E)+c.MAST_ABOVE_M,O=s[s.length-1],g=s.length>2,_=s.length===1?[1]:[1,-1],u=(d,x,v)=>{let m=0,T=n.along.length-2;for(;m<T;){const b=m+T+1>>1;n.along[b]<=d?m=b:T=b-1}const z=Math.min(1,Math.max(0,(d-n.along[m])/Math.max(1e-6,n.along[m+1]-n.along[m]))),D=o(m,x,v),C=o(m+1,x,v);return{x:D.x+(C.x-D.x)*z,y:D.y+(C.y-D.y)*z,z:D.z+(C.z-D.z)*z}};for(const d of h){for(const x of _){const v=x*(O+c.MAST_OFFSET_M),m=u(d,v,0);t.level===0&&(m.y=i(m.x,m.z));const T=u(d,v,f);if(a.steel.beam(m,T,c.MAST_SIDE_M),g)continue;const D=(_.length===1?s[0]:x*O)-x*.6,C=M.systemM>0?L:E+.3;a.steel.beam(u(d,v,C),u(d,D,C),c.ARM_SIDE_M),a.steel.beam(u(d,v,E-.4),u(d,D,C),c.ARM_SIDE_M)}if(g){const x=O+c.MAST_OFFSET_M;a.steel.beam(u(d,x,f-.2),u(d,-x,f-.2),c.MAST_SIDE_M*.8)}}const A=[0,...h,r];for(const[d,x]of s.entries()){const v=m=>m===0||m===A.length-1?0:((m+d)%2===0?1:-1)*M.staggerM;for(let m=0;m<A.length-1;m++){const T=A[m],z=A[m+1];if(z-T<.1||(a.wire.beam(u(T,x+v(m),E),u(z,x+v(m+1),E),c.CONTACT_DIAMETER_M,!1),M.systemM<=0))continue;const D=4,C=b=>{const B=m===0?.5+b/2:m===A.length-2?b/2:b;return L-c.MESSENGER_SAG_M*4*B*(1-B)};for(let b=0;b<D;b++){const B=b/D,G=(b+1)/D;a.wire.beam(u(T+(z-T)*B,x,C(B)),u(T+(z-T)*G,x,C(G)),c.MESSENGER_DIAMETER_M,!1)}}}}static meshOf(t,n){if(t.indices.length===0)return;const s=new K;return s.setAttribute("position",new N(new Float32Array(t.positions),3)),t.along.length>0&&s.setAttribute("aAlong",new N(new Float32Array(t.along),1)),s.setIndex(new N(new Uint32Array(t.indices),1)),s.computeVertexNormals(),new U(s,n)}static lambert(t,n){return new k({color:new H(...t),...n?{polygonOffset:!0,polygonOffsetFactor:-2,polygonOffsetUnits:-2}:{}})}static pebbled(t){return t.onBeforeCompile=n=>{n.vertexShader=n.vertexShader.replace("#include <common>",`#include <common>
2
+ varying vec3 vBallast;`).replace("#include <begin_vertex>",`#include <begin_vertex>
3
+ vBallast = position;`),n.fragmentShader=n.fragmentShader.replace("#include <common>",`#include <common>
4
+ varying vec3 vBallast;
5
+ float ballastHash(vec2 p) {
6
+ p = fract(p * vec2(127.1, 311.7));
7
+ p += dot(p, p + 34.5);
8
+ return fract(p.x * p.y);
9
+ }
10
+ float ballastNoise(vec2 p) {
11
+ vec2 i = floor(p);
12
+ vec2 f = fract(p);
13
+ f = f * f * (3.0 - 2.0 * f);
14
+ return mix(mix(ballastHash(i), ballastHash(i + vec2(1.0, 0.0)), f.x), mix(ballastHash(i + vec2(0.0, 1.0)), ballastHash(i + vec2(1.0, 1.0)), f.x), f.y);
15
+ }`).replace("#include <map_fragment>",`#include <map_fragment>
16
+ {
17
+ float eye = length(vViewPosition);
18
+ vec2 at = vBallast.xz + vec2(0.0, vBallast.y);
19
+ float stones = (ballastHash(floor(at * 22.0)) - 0.5) * 0.9 * (1.0 - smoothstep(4.0, 18.0, eye))
20
+ + (ballastNoise(at * 6.0) - 0.5) * 0.5 * (1.0 - smoothstep(15.0, 60.0, eye))
21
+ + (ballastNoise(at * 0.7) - 0.5) * 0.35 * (1.0 - smoothstep(80.0, 300.0, eye));
22
+ diffuseColor.rgb *= 1.0 + stones;
23
+ }`)},t.customProgramCacheKey=()=>"rr0-railway-ballast",t}static sleeperMaterial(t){const n=new k({color:new H(1,1,1),polygonOffset:!0,polygonOffsetFactor:-3,polygonOffsetUnits:-3}),s=new H(...t),e=new H(...c.BALLAST_ALBEDO);return n.onBeforeCompile=o=>{o.uniforms.uSleeper={value:s},o.uniforms.uCrib={value:e},o.uniforms.uSpacing={value:c.SLEEPER_SPACING_M},o.uniforms.uDuty={value:c.SLEEPER_WIDTH_M/c.SLEEPER_SPACING_M},o.vertexShader=o.vertexShader.replace("#include <common>",`#include <common>
24
+ attribute float aAlong;
25
+ varying float vAlong;`).replace("#include <begin_vertex>",`#include <begin_vertex>
26
+ vAlong = aAlong;`),o.fragmentShader=o.fragmentShader.replace("#include <common>",`#include <common>
27
+ varying float vAlong;
28
+ uniform vec3 uSleeper;
29
+ uniform vec3 uCrib;
30
+ uniform float uSpacing;
31
+ uniform float uDuty;
32
+ // How much of [0, x] periods is sleeper: the integral of a pulse of width uDuty at the start of each period.
33
+ float sleeperIntegral(float x) {
34
+ return floor(x) * uDuty + min(fract(x), uDuty);
35
+ }`).replace("#include <map_fragment>",`#include <map_fragment>
36
+ {
37
+ float u = vAlong / uSpacing;
38
+ float w = max(fwidth(u), 1e-4);
39
+ float cover = (sleeperIntegral(u + 0.5 * w) - sleeperIntegral(u - 0.5 * w)) / w;
40
+ diffuseColor.rgb *= mix(uCrib, uSleeper, clamp(cover, 0.0, 1.0));
41
+ }`)},n.customProgramCacheKey=()=>"rr0-railway-sleepers",n}}export{c as RailwaySystem};
@@ -1 +1 @@
1
- import{ak as D}from"./rr0-sighting-editor.mjs";class l{static MIN_ROAD_M=5.5;static WIDE_ROAD_M=9;static LINE_WIDTH_M=.12;static DASH_M=3;static GAP_M=10;static RIVE_DASH_M=2.5;static RIVE_GAP_M=3.5;static MIN_DASH_M=.5;static LANE_M=3.5;static SHOULDER_MIN_M=1.5;static SOLID_EDGE_FROM_M=7;static SOLID_EDGE_FROM_KMH=80;static BEND_RADIUS_M=300;static EDGE_SETBACK_M=.4;static PAINT_RADIUS_M=450;static LIFT_M=.015;static BARRIER_MAX_AXES_M=40;static BARRIER_MIN_AXES_M=5;static BARRIER_HEIGHT_M=.8;static BARRIER_HALF_WIDTH_M=.2;static BARRIER_STEP_M=4;static painted(t){return t.surface==="paved"&&t.widthM>=l.MIN_ROAD_M&&t.kind!=="roundabout"}static plan(t){if(!l.painted(t))return[];const M=t.widthM,r=M/2,c=l.EDGE_SETBACK_M;if(!(t.direction!==void 0&&t.lanes!==void 0)){const I=[{offsetM:r-c,pattern:"solid"},{offsetM:-(r-c),pattern:"solid"}],A=M>=l.WIDE_ROAD_M?[-M/4,M/4]:[0];for(const x of A)I.push({offsetM:x,pattern:"dashed"});return I}const s=t.lanes,n=M>=l.SOLID_EDGE_FROM_M||(t.speedKmh??0)>=l.SOLID_EDGE_FROM_KMH?"solid":"rive";if(t.direction==="both"){if(s<2)return[];const I=[{offsetM:r-c,pattern:n},{offsetM:-(r-c),pattern:n}];if(s>=4){I.push({offsetM:.1,pattern:"solid"},{offsetM:-.1,pattern:"solid"});const A=Math.floor(s/2),x=M/s;for(let z=1;z<A;z++)I.push({offsetM:z*x,pattern:"dashed"},{offsetM:-z*x,pattern:"dashed"})}else I.push({offsetM:0,pattern:"dashed",solidInBends:!0});return I}const u=t.direction==="backward"?-1:1,o=I=>u*(r-I),i=Math.min(l.LANE_M,M/Math.max(s,1)),h=s*i,_=M-h,d=(t.kind==="motorway"||t.kind==="dual")&&_>=l.SHOULDER_MIN_M,E=[{offsetM:o(c),pattern:t.kind==="motorway"||t.kind==="dual"?"solid":n}];E.push({offsetM:o(d?h:M-c),pattern:t.kind==="motorway"||t.kind==="dual"?"solid":n});for(let I=1;I<s;I++)E.push({offsetM:o(I*i),pattern:"dashed"});return E}static lay(t,M,r,c){let e=0;const s=(f,n)=>{c(f,l.LINE_WIDTH_M,{offsetM:n,liftM:l.LIFT_M,minHalfM:l.LINE_WIDTH_M/2}),e++};for(const f of t){const n=l.plan(f);if(n.length===0)continue;const u=f.points.map(o=>D(o.lat,o.lng,M,r));for(const o of l.near(u,l.PAINT_RADIUS_M))for(const i of n){if(i.pattern==="solid"){s(o,i.offsetM);continue}const[h,_]=i.pattern==="dashed"?[l.DASH_M,l.GAP_M]:[l.RIVE_DASH_M,l.RIVE_GAP_M];for(const d of i.solidInBends?l.byBends(o):[{path:o,bend:!1}])if(d.bend)s(d.path,i.offsetM);else for(const E of l.dashes(d.path,h,_))s(E,i.offsetM)}}return e}static byBends(t){if(t.length<3)return[{path:t,bend:!1}];const M=(e,s)=>Math.atan2(s.x-e.x,-(s.z-e.z)),r=new Array(t.length-1).fill(!1);for(let e=1;e<t.length-1;e++){const s=Math.hypot(t[e].x-t[e-1].x,t[e].z-t[e-1].z),f=Math.hypot(t[e+1].x-t[e].x,t[e+1].z-t[e].z);if(s<1e-6||f<1e-6)continue;let n=Math.abs(M(t[e],t[e+1])-M(t[e-1],t[e]));n>Math.PI&&(n=2*Math.PI-n),(s+f)/2/Math.max(n,1e-6)<l.BEND_RADIUS_M&&(r[e-1]=!0,r[e]=!0)}const c=[];for(let e=0;e<r.length;e++){const s=c.at(-1);s&&s.bend===r[e]?s.path.push(t[e+1]):c.push({path:[t[e],t[e+1]],bend:r[e]})}return c}static barriers(t,M,r){const c=t.filter(n=>(n.kind==="motorway"||n.kind==="dual")&&(n.direction==="forward"||n.direction==="backward")),e=c.map(n=>{const u=n.points.map(o=>D(o.lat,o.lng,M,r));return n.direction==="backward"?[...u].reverse():u}),s=[],f=l.BARRIER_STEP_M;return c.forEach((n,u)=>{for(const o of l.near(e[u],l.PAINT_RADIUS_M)){let i=[];for(const h of l.resample(o,f)){const _=l.midwayToOpposite(h,u,c,e);_?i.push(_):i.length>0&&(i.length>=2&&s.push(i),i=[])}i.length>=2&&s.push(i)}}),s}static midwayToOpposite(t,M,r,c){let e;for(let s=0;s<c.length;s++){if(s===M||r[s].id<r[M].id)continue;const f=c[s];for(let n=0;n<f.length-1;n++){const u=f[n+1].x-f[n].x,o=f[n+1].z-f[n].z,i=u*u+o*o;if(i<1e-9||(u*t.dx+o*t.dz)/Math.sqrt(i)>-.9)continue;const h=Math.max(0,Math.min(1,((t.x-f[n].x)*u+(t.z-f[n].z)*o)/i)),_={x:f[n].x+u*h,z:f[n].z+o*h},d=Math.hypot(t.x-_.x,t.z-_.z);d<l.BARRIER_MIN_AXES_M||d>l.BARRIER_MAX_AXES_M||(!e||d<e.distance)&&(e={distance:d,point:_})}}return e?{x:(t.x+e.point.x)/2,z:(t.z+e.point.z)/2}:void 0}static resample(t,M){const r=[];for(let c=0;c<t.length-1;c++){const e=Math.hypot(t[c+1].x-t[c].x,t[c+1].z-t[c].z);if(e<1e-6)continue;const s=(t[c+1].x-t[c].x)/e,f=(t[c+1].z-t[c].z)/e;for(let n=0;n<e;n+=M)r.push({x:t[c].x+s*n,z:t[c].z+f*n,dx:s,dz:f})}return r}static barrierGeometry(t,M){const r=[],c=[],e=l.BARRIER_HALF_WIDTH_M;for(const s of t){if(s.length<2)continue;const f=r.length/3;for(let n=0;n<s.length;n++){const u=s[Math.max(0,n-1)],o=s[Math.min(s.length-1,n+1)],i=Math.hypot(o.x-u.x,o.z-u.z)||1,h=-(o.z-u.z)/i*e,_=(o.x-u.x)/i*e,d=M(s[n].x,s[n].z);r.push(s[n].x+h,d,s[n].z+_,s[n].x+h,d+l.BARRIER_HEIGHT_M,s[n].z+_,s[n].x-h,d+l.BARRIER_HEIGHT_M,s[n].z-_,s[n].x-h,d,s[n].z-_)}for(let n=0;n<s.length-1;n++){const u=f+n*4,o=u+4;for(let i=0;i<3;i++)c.push(u+i,o+i,u+i+1,u+i+1,o+i,o+i+1)}}return{positions:r,indices:c}}static near(t,M){const r=[];let c;for(let e=0;e<t.length-1;e++)Math.min(Math.hypot(t[e].x,t[e].z),Math.hypot(t[e+1].x,t[e+1].z))<=M||Math.hypot((t[e].x+t[e+1].x)/2,(t[e].z+t[e+1].z)/2)<=M?(c||(c=[t[e]]),c.push(t[e+1])):c&&(r.push(c),c=void 0);return c&&r.push(c),r}static dashes(t,M,r){const c=[],e=M+r;let s=0,f;const n=(o,i)=>({x:t[o].x+(t[o+1].x-t[o].x)*i,z:t[o].z+(t[o+1].z-t[o].z)*i});for(let o=0;o<t.length-1;o++){const i=Math.hypot(t[o+1].x-t[o].x,t[o+1].z-t[o].z);if(i<1e-6)continue;let h=0;for(;h<i;){const _=(s+h)%e,d=_<M,E=d?M-_:e-_,I=Math.min(i,h+E);d&&(f||(f=[n(o,h/i)]),f.push(n(o,I/i)),I-h>=E-1e-9&&(c.push(f),f=void 0)),h=I}s+=i}f&&f.length>=2&&c.push(f);const u=o=>o.slice(1).reduce((i,h,_)=>i+Math.hypot(h.x-o[_].x,h.z-o[_].z),0);return c.filter(o=>o.length>=2&&u(o)>=l.MIN_DASH_M)}}export{l as RoadMarkings};
1
+ import{a4 as D}from"./rr0-sighting-editor.mjs";class l{static MIN_ROAD_M=5.5;static WIDE_ROAD_M=9;static LINE_WIDTH_M=.12;static DASH_M=3;static GAP_M=10;static RIVE_DASH_M=2.5;static RIVE_GAP_M=3.5;static MIN_DASH_M=.5;static LANE_M=3.5;static SHOULDER_MIN_M=1.5;static SOLID_EDGE_FROM_M=7;static SOLID_EDGE_FROM_KMH=80;static BEND_RADIUS_M=300;static EDGE_SETBACK_M=.4;static PAINT_RADIUS_M=450;static LIFT_M=.015;static BARRIER_MAX_AXES_M=40;static BARRIER_MIN_AXES_M=5;static BARRIER_HEIGHT_M=.8;static BARRIER_HALF_WIDTH_M=.2;static BARRIER_STEP_M=4;static painted(t){return t.surface==="paved"&&t.widthM>=l.MIN_ROAD_M&&t.kind!=="roundabout"}static plan(t){if(!l.painted(t))return[];const M=t.widthM,r=M/2,c=l.EDGE_SETBACK_M;if(!(t.direction!==void 0&&t.lanes!==void 0)){const I=[{offsetM:r-c,pattern:"solid"},{offsetM:-(r-c),pattern:"solid"}],A=M>=l.WIDE_ROAD_M?[-M/4,M/4]:[0];for(const x of A)I.push({offsetM:x,pattern:"dashed"});return I}const s=t.lanes,n=M>=l.SOLID_EDGE_FROM_M||(t.speedKmh??0)>=l.SOLID_EDGE_FROM_KMH?"solid":"rive";if(t.direction==="both"){if(s<2)return[];const I=[{offsetM:r-c,pattern:n},{offsetM:-(r-c),pattern:n}];if(s>=4){I.push({offsetM:.1,pattern:"solid"},{offsetM:-.1,pattern:"solid"});const A=Math.floor(s/2),x=M/s;for(let z=1;z<A;z++)I.push({offsetM:z*x,pattern:"dashed"},{offsetM:-z*x,pattern:"dashed"})}else I.push({offsetM:0,pattern:"dashed",solidInBends:!0});return I}const u=t.direction==="backward"?-1:1,o=I=>u*(r-I),i=Math.min(l.LANE_M,M/Math.max(s,1)),h=s*i,_=M-h,d=(t.kind==="motorway"||t.kind==="dual")&&_>=l.SHOULDER_MIN_M,E=[{offsetM:o(c),pattern:t.kind==="motorway"||t.kind==="dual"?"solid":n}];E.push({offsetM:o(d?h:M-c),pattern:t.kind==="motorway"||t.kind==="dual"?"solid":n});for(let I=1;I<s;I++)E.push({offsetM:o(I*i),pattern:"dashed"});return E}static lay(t,M,r,c){let e=0;const s=(f,n)=>{c(f,l.LINE_WIDTH_M,{offsetM:n,liftM:l.LIFT_M,minHalfM:l.LINE_WIDTH_M/2}),e++};for(const f of t){const n=l.plan(f);if(n.length===0)continue;const u=f.points.map(o=>D(o.lat,o.lng,M,r));for(const o of l.near(u,l.PAINT_RADIUS_M))for(const i of n){if(i.pattern==="solid"){s(o,i.offsetM);continue}const[h,_]=i.pattern==="dashed"?[l.DASH_M,l.GAP_M]:[l.RIVE_DASH_M,l.RIVE_GAP_M];for(const d of i.solidInBends?l.byBends(o):[{path:o,bend:!1}])if(d.bend)s(d.path,i.offsetM);else for(const E of l.dashes(d.path,h,_))s(E,i.offsetM)}}return e}static byBends(t){if(t.length<3)return[{path:t,bend:!1}];const M=(e,s)=>Math.atan2(s.x-e.x,-(s.z-e.z)),r=new Array(t.length-1).fill(!1);for(let e=1;e<t.length-1;e++){const s=Math.hypot(t[e].x-t[e-1].x,t[e].z-t[e-1].z),f=Math.hypot(t[e+1].x-t[e].x,t[e+1].z-t[e].z);if(s<1e-6||f<1e-6)continue;let n=Math.abs(M(t[e],t[e+1])-M(t[e-1],t[e]));n>Math.PI&&(n=2*Math.PI-n),(s+f)/2/Math.max(n,1e-6)<l.BEND_RADIUS_M&&(r[e-1]=!0,r[e]=!0)}const c=[];for(let e=0;e<r.length;e++){const s=c.at(-1);s&&s.bend===r[e]?s.path.push(t[e+1]):c.push({path:[t[e],t[e+1]],bend:r[e]})}return c}static barriers(t,M,r){const c=t.filter(n=>(n.kind==="motorway"||n.kind==="dual")&&(n.direction==="forward"||n.direction==="backward")),e=c.map(n=>{const u=n.points.map(o=>D(o.lat,o.lng,M,r));return n.direction==="backward"?[...u].reverse():u}),s=[],f=l.BARRIER_STEP_M;return c.forEach((n,u)=>{for(const o of l.near(e[u],l.PAINT_RADIUS_M)){let i=[];for(const h of l.resample(o,f)){const _=l.midwayToOpposite(h,u,c,e);_?i.push(_):i.length>0&&(i.length>=2&&s.push(i),i=[])}i.length>=2&&s.push(i)}}),s}static midwayToOpposite(t,M,r,c){let e;for(let s=0;s<c.length;s++){if(s===M||r[s].id<r[M].id)continue;const f=c[s];for(let n=0;n<f.length-1;n++){const u=f[n+1].x-f[n].x,o=f[n+1].z-f[n].z,i=u*u+o*o;if(i<1e-9||(u*t.dx+o*t.dz)/Math.sqrt(i)>-.9)continue;const h=Math.max(0,Math.min(1,((t.x-f[n].x)*u+(t.z-f[n].z)*o)/i)),_={x:f[n].x+u*h,z:f[n].z+o*h},d=Math.hypot(t.x-_.x,t.z-_.z);d<l.BARRIER_MIN_AXES_M||d>l.BARRIER_MAX_AXES_M||(!e||d<e.distance)&&(e={distance:d,point:_})}}return e?{x:(t.x+e.point.x)/2,z:(t.z+e.point.z)/2}:void 0}static resample(t,M){const r=[];for(let c=0;c<t.length-1;c++){const e=Math.hypot(t[c+1].x-t[c].x,t[c+1].z-t[c].z);if(e<1e-6)continue;const s=(t[c+1].x-t[c].x)/e,f=(t[c+1].z-t[c].z)/e;for(let n=0;n<e;n+=M)r.push({x:t[c].x+s*n,z:t[c].z+f*n,dx:s,dz:f})}return r}static barrierGeometry(t,M){const r=[],c=[],e=l.BARRIER_HALF_WIDTH_M;for(const s of t){if(s.length<2)continue;const f=r.length/3;for(let n=0;n<s.length;n++){const u=s[Math.max(0,n-1)],o=s[Math.min(s.length-1,n+1)],i=Math.hypot(o.x-u.x,o.z-u.z)||1,h=-(o.z-u.z)/i*e,_=(o.x-u.x)/i*e,d=M(s[n].x,s[n].z);r.push(s[n].x+h,d,s[n].z+_,s[n].x+h,d+l.BARRIER_HEIGHT_M,s[n].z+_,s[n].x-h,d+l.BARRIER_HEIGHT_M,s[n].z-_,s[n].x-h,d,s[n].z-_)}for(let n=0;n<s.length-1;n++){const u=f+n*4,o=u+4;for(let i=0;i<3;i++)c.push(u+i,o+i,u+i+1,u+i+1,o+i,o+i+1)}}return{positions:r,indices:c}}static near(t,M){const r=[];let c;for(let e=0;e<t.length-1;e++)Math.min(Math.hypot(t[e].x,t[e].z),Math.hypot(t[e+1].x,t[e+1].z))<=M||Math.hypot((t[e].x+t[e+1].x)/2,(t[e].z+t[e+1].z)/2)<=M?(c||(c=[t[e]]),c.push(t[e+1])):c&&(r.push(c),c=void 0);return c&&r.push(c),r}static dashes(t,M,r){const c=[],e=M+r;let s=0,f;const n=(o,i)=>({x:t[o].x+(t[o+1].x-t[o].x)*i,z:t[o].z+(t[o+1].z-t[o].z)*i});for(let o=0;o<t.length-1;o++){const i=Math.hypot(t[o+1].x-t[o].x,t[o+1].z-t[o].z);if(i<1e-6)continue;let h=0;for(;h<i;){const _=(s+h)%e,d=_<M,E=d?M-_:e-_,I=Math.min(i,h+E);d&&(f||(f=[n(o,h/i)]),f.push(n(o,I/i)),I-h>=E-1e-9&&(c.push(f),f=void 0)),h=I}s+=i}f&&f.length>=2&&c.push(f);const u=o=>o.slice(1).reduce((i,h,_)=>i+Math.hypot(h.x-o[_].x,h.z-o[_].z),0);return c.filter(o=>o.length>=2&&u(o)>=l.MIN_DASH_M)}}export{l as RoadMarkings};
@@ -0,0 +1 @@
1
+ import{V as a,D as o}from"./rr0-sighting-editor.mjs";const l={bodies:{sun:"Sol",moon:"Luna",Venus:"Venus",Mars:"Marte",Jupiter:"Júpiter",Saturn:"Saturno"},stars:{Sirius:"Sirio",Canopus:"Canopo",Arcturus:"Arturo",Capella:"Capela",Procyon:"Proción",Aldebaran:"Aldebarán",Spica:"Espiga",Pollux:"Pólux",Castor:"Cástor",Regulus:"Régulo"},comets:{"halley-1910":"cometa Halley","brooks-1911":"cometa Brooks","skjellerup-maristany-1927":"cometa Skjellerup-Maristany","de-kock-paraskevopoulos-1941":"cometa de Kock-Paraskevopoulos","southern-1947":"cometa austral","eclipse-1948":"cometa del eclipse","arend-roland-1957":"cometa Arend-Roland","mrkos-1957":"cometa Mrkos","seki-lines-1962":"cometa Seki-Lines","ikeya-seki-1965":"cometa Ikeya-Seki","bennett-1970":"cometa Bennett","white-ortiz-bolelli-1970":"cometa White-Ortiz-Bolelli","kohoutek-1973":"cometa Kohoutek","west-1976":"cometa West","iras-araki-alcock-1983":"cometa IRAS-Araki-Alcock","halley-1986":"cometa Halley","hyakutake-1996":"cometa Hyakutake","hale-bopp-1997":"cometa Hale-Bopp","mcnaught-2007":"cometa McNaught","lovejoy-2011":"cometa Lovejoy","panstarrs-2013":"cometa PANSTARRS","neowise-2020":"cometa NEOWISE","tsuchinshan-atlas-2024":"cometa Tsuchinshan-ATLAS"},novae:{"sn-1006":"supernova de 1006","sn-1054":"supernova de 1054","sn-1181":"supernova de 1181","sn-1572":"supernova de Tycho","sn-1604":"supernova de Kepler","t-crb-1866":"nova de la Corona Boreal 1866","t-aur-1891":"nova de Auriga 1891","gk-per-1901":"nova de Perseo 1901","dn-gem-1912":"nova de Géminis 1912","v603-aql-1918":"nova del Águila 1918","v476-cyg-1920":"nova del Cisne 1920","rr-pic-1925":"nova del Pintor 1925","dq-her-1934":"nova de Hércules 1934","cp-lac-1936":"nova del Lagarto 1936","cp-pup-1942":"nova de la Popa 1942","t-crb-1946":"nova de la Corona Boreal 1946","v446-her-1960":"nova de Hércules 1960","v533-her-1963":"nova de Hércules 1963","hr-del-1967":"nova del Delfín 1967","lv-vul-1968":"nova de la Zorra 1968","fh-ser-1970":"nova de la Serpiente 1970","v1500-cyg-1975":"nova del Cisne 1975","v842-cen-1986":"nova del Centauro 1986","sn-1987a":"supernova 1987A","v1974-cyg-1992":"nova del Cisne 1992","v382-vel-1999":"nova de las Velas 1999","v1494-aql-1999":"nova del Águila 1999","v4743-sgr-2002":"nova de Sagitario 2002","rs-oph-2006":"nova de Ofiuco 2006","v1280-sco-2007":"nova de Escorpio 2007","v339-del-2013":"nova del Delfín 2013","v1369-cen-2013":"nova del Centauro 2013","rs-oph-2021":"nova de Ofiuco 2021"},satelliteClasses:{echo:"los globos Echo","iridium-flares":"los destellos de los Iridium",iss:"la Estación Espacial Internacional","starlink-trains":"los trenes de Starlink"},showers:{quadrantids:"Cuadrántidas",lyrids:"Líridas de abril","eta-aquariids":"Eta Acuáridas","alpha-capricornids":"Alfa Capricórnidas","southern-delta-aquariids":"Delta Acuáridas del Sur",perseids:"Perseidas","southern-taurids":"Táuridas del Sur",draconids:"Dracónidas de octubre",orionids:"Oriónidas","northern-taurids":"Táuridas del Norte",leonids:"Leónidas",geminids:"Gemínidas",ursids:"Úrsidas"},lightRigs:{airliner:"Avión de pasajeros",helicopter:"Helicóptero","car-headlights":"Coche, faros encendidos","car-hazards":"Coche, luces de emergencia","emergency-beacons":"Rotativos de vehículo de emergencia","traffic-signal":"Semáforo","pedestrian-signal":"Semáforo peatonal",streetlamp:"Farola"},instruments:{eye:"A simple vista","rectilinear-lens":"Cámara, modelo desconocido","roamer-1-120":"Roamer 1, película 120","instamatic-126":"Instamatic, película 126","slr-35mm-50":"Réflex 35 mm, objetivo 50 mm","slr-35mm-zoom":"Réflex 35 mm, zoom 70-210 mm","phone-landscape":"Teléfono, en horizontal","phone-portrait":"Teléfono, en vertical",...o.names(),...a.names()},decorKinds:{building:"Edificio",tree:"Árbol",shrub:"Arbusto",bridge:"Puente",wire:"Línea aérea",crop:"Hilera de cultivo",terrace:"Bancal (terraza)",mound:"Montón de piedras",wall:"Muro de piedra seca",streetlight:"Farola",trafficlight:"Semáforo",crossing:"Paso de peatones",roadsign:"Señal de tráfico",vehicle:"Vehículo",observer:"Observador",aircraft:"Aeronave",entity:"Ser"},compassPoints:["N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSO","SO","OSO","O","ONO","NO","NNO"],towards:e=>`al ${e}`,starTooltip:"{name} — mag {mag}, {alt}° sobre el horizonte",starTooltipBelow:"{name} — mag {mag}, {alt}° bajo la horizontal",decorTooltip:"{name} — {size}, a {distance}",satelliteTooltip:"{name} — satélite, mag {mag}, a {height} km de altitud",opticsTooltips:{halo22:"Halo de 22° — un anillo alrededor del Sol, por luz desviada en cristales de hielo hexagonales de los cirros; su borde interior es rojo, a 21,7°",halo46:"Halo de 46° — un anillo más raro y débil: la luz entra por una cara lateral del cristal y sale por una cara del extremo",oddRadius:"Halo de {angle}° — un anillo de radio impar, raro y débil, hecho por cristales de hielo con extremos piramidales",parhelion:"Parhelio — una mancha brillante de colores junto al Sol, a su altura, por placas de hielo que caen planas; rojo hacia el Sol",parhelion120:"Parhelio de 120° — una mancha blanca débil a 120° del Sol, por luz reflejada dentro de placas planas",upperTangentArc:"Arco tangente superior — un arco brillante apoyado sobre el halo de 22°, por columnas tumbadas en horizontal",lowerTangentArc:"Arco tangente inferior — un arco que toca la base del halo de 22°, por columnas tumbadas en horizontal",circumzenithal:"Arco circuncenital — una banda de colores vivos cerca del cenit, por luz que entra por la cara superior de placas planas (solo con el Sol bajo 32°)",circumhorizontal:"Arco circunhorizontal — una banda de colores baja en el cielo, por luz que entra por la cara lateral de placas planas (solo con el Sol sobre 58°)",parhelicCircle:"Círculo parhélico — un círculo blanco alrededor de todo el cielo a la altura del Sol, por reflejos en las caras verticales de placas planas",pillar:"Pilar de luz — una columna de luz sobre el Sol, por reflejos en placas planas ligeramente inclinadas",subsun:"Subsol — una imagen del Sol bajo el horizonte, por reflejos en las caras planas de las placas"},trafficTooltip:{unnamed:"Aeronave {hex}",altitude:"{value} ft",speed:"{value} kt",heading:"rumbo {value}°",position:"a {distance} km, {elevation}° sobre el horizonte, {bearing}",heard:"Se oye a {level} dB(A), salió del avión hace {delay} s, {lag}° detrás de él: {character}{pitch}",rumble:"un rumor grave, nada por encima de {cutoff} Hz",muffled:"un ruido sordo, nada por encima de {cutoff} Hz",broad:"un rugido ancho",pitchHigher:", sonido {percent} % más agudo",pitchLower:", sonido {percent} % más grave",inaudible:"Inaudible aquí: {level} dB(A) frente a {ambient} dB(A) de ruido ambiente",soundUnknown:"Sonido no calculable: el avión aún no estaba registrado cuando salió",contrailPersistent:"Deja una estela que dura: el aire está sobresaturado respecto al hielo ({rhi} % respecto al hielo)",contrailShort:"Deja una estela breve: el aire está seco respecto al hielo ({rhi} % respecto al hielo)",military:"militar",restricted:"identidad oculta por su propietario",candidate:"Un candidato compatible, no una identificación"},credits:"Créditos",notAVideo:"Esto no es un vídeo",isASimulation:"Es una simulación en tiempo real."};export{l as sceneNames_es};
@@ -0,0 +1 @@
1
+ import{V as a,D as r}from"./rr0-sighting-editor.mjs";const n={bodies:{sun:"Soleil",moon:"Lune",Venus:"Vénus",Saturn:"Saturne"},stars:{Betelgeuse:"Bételgeuse",Vega:"Véga",Altair:"Altaïr",Aldebaran:"Aldébaran",Regulus:"Régulus",Antares:"Antarès"},comets:{"halley-1910":"comète de Halley","brooks-1911":"comète Brooks","skjellerup-maristany-1927":"comète Skjellerup-Maristany","de-kock-paraskevopoulos-1941":"comète de Kock-Paraskevopoulos","southern-1947":"comète australe","eclipse-1948":"comète de l'éclipse","arend-roland-1957":"comète Arend-Roland","mrkos-1957":"comète Mrkos","seki-lines-1962":"comète Seki-Lines","ikeya-seki-1965":"comète Ikeya-Seki","bennett-1970":"comète Bennett","white-ortiz-bolelli-1970":"comète White-Ortiz-Bolelli","kohoutek-1973":"comète Kohoutek","west-1976":"comète West","iras-araki-alcock-1983":"comète IRAS-Araki-Alcock","halley-1986":"comète de Halley","hyakutake-1996":"comète Hyakutake","hale-bopp-1997":"comète Hale-Bopp","mcnaught-2007":"comète McNaught","lovejoy-2011":"comète Lovejoy","panstarrs-2013":"comète PANSTARRS","neowise-2020":"comète NEOWISE","tsuchinshan-atlas-2024":"comète Tsuchinshan-ATLAS"},novae:{"sn-1006":"supernova de 1006","sn-1054":"supernova de 1054","sn-1181":"supernova de 1181","sn-1572":"supernova de Tycho","sn-1604":"supernova de Kepler","t-crb-1866":"nova de la Couronne boréale 1866","t-aur-1891":"nova du Cocher 1891","gk-per-1901":"nova de Persée 1901","dn-gem-1912":"nova des Gémeaux 1912","v603-aql-1918":"nova de l'Aigle 1918","v476-cyg-1920":"nova du Cygne 1920","rr-pic-1925":"nova du Peintre 1925","dq-her-1934":"nova d'Hercule 1934","cp-lac-1936":"nova du Lézard 1936","cp-pup-1942":"nova de la Poupe 1942","t-crb-1946":"nova de la Couronne boréale 1946","v446-her-1960":"nova d'Hercule 1960","v533-her-1963":"nova d'Hercule 1963","hr-del-1967":"nova du Dauphin 1967","lv-vul-1968":"nova du Petit Renard 1968","fh-ser-1970":"nova du Serpent 1970","v1500-cyg-1975":"nova du Cygne 1975","v842-cen-1986":"nova du Centaure 1986","sn-1987a":"supernova 1987A","v1974-cyg-1992":"nova du Cygne 1992","v382-vel-1999":"nova des Voiles 1999","v1494-aql-1999":"nova de l'Aigle 1999","v4743-sgr-2002":"nova du Sagittaire 2002","rs-oph-2006":"nova d'Ophiuchus 2006","v1280-sco-2007":"nova du Scorpion 2007","v339-del-2013":"nova du Dauphin 2013","v1369-cen-2013":"nova du Centaure 2013","rs-oph-2021":"nova d'Ophiuchus 2021"},satelliteClasses:{echo:"les ballons Echo","iridium-flares":"les flashes d'Iridium",iss:"la Station spatiale internationale","starlink-trains":"les trains de Starlink"},showers:{quadrantids:"Quadrantides",lyrids:"Lyrides d'avril","eta-aquariids":"Êta Aquarides","alpha-capricornids":"Alpha Capricornides","southern-delta-aquariids":"Delta Aquarides du Sud",perseids:"Perséides","southern-taurids":"Taurides du Sud",draconids:"Draconides d'octobre",orionids:"Orionides","northern-taurids":"Taurides du Nord",leonids:"Léonides",geminids:"Géminides",ursids:"Ursides"},lightRigs:{airliner:"Avion de ligne",helicopter:"Hélicoptère","car-headlights":"Voiture, phares allumés","car-hazards":"Voiture, feux de détresse","emergency-beacons":"Gyrophares de véhicule d'urgence","traffic-signal":"Feu de circulation","pedestrian-signal":"Feu piéton",streetlamp:"Lampadaire"},instruments:{eye:"Œil nu","rectilinear-lens":"Appareil, modèle inconnu","roamer-1-120":"Roamer 1, film 120","instamatic-126":"Instamatic, film 126","slr-35mm-50":"Reflex 35 mm, objectif 50 mm","slr-35mm-zoom":"Reflex 35 mm, zoom 70-210 mm","phone-landscape":"Téléphone, tenu couché","phone-portrait":"Téléphone, tenu debout",...r.names(),...a.names()},decorKinds:{building:"Bâtiment",tree:"Arbre",shrub:"Buisson",bridge:"Pont",wire:"Ligne aérienne",crop:"Rang de culture",terrace:"Restanque (terrasse)",mound:"Tas de pierres",wall:"Muret de pierres sèches",streetlight:"Lampadaire",trafficlight:"Feu de circulation",crossing:"Passage piéton",roadsign:"Panneau de signalisation",vehicle:"Véhicule",observer:"Observateur",aircraft:"Aéronef",entity:"Être"},compassPoints:["N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSO","SO","OSO","O","ONO","NO","NNO"],towards:e=>/^[EO]/.test(e)?`à l'${e}`:`au ${e}`,starTooltip:"{name} — mag {mag}, {alt}° au-dessus de l'horizon",starTooltipBelow:"{name} — mag {mag}, {alt}° sous l'horizontale",decorTooltip:"{name} — {size}, à {distance}",satelliteTooltip:"{name} — satellite, mag {mag}, à {height} km d'altitude",opticsTooltips:{halo22:"Halo de 22° — un anneau autour du Soleil, dû à la lumière déviée par des cristaux de glace hexagonaux dans les cirrus ; son bord interne est rouge, à 21,7°",halo46:"Halo de 46° — un anneau plus rare et plus faible : la lumière entre par une face latérale d'un cristal et sort par une face de bout",oddRadius:"Halo de {angle}° — un anneau à rayon impair, rare et faible, dû à des cristaux de glace à bouts pyramidaux",parhelion:"Parhélie — une tache brillante colorée à côté du Soleil, à sa hauteur, due à des plaquettes de glace tombant à plat ; rouge côté Soleil",parhelion120:"Parhélie à 120° — une faible tache blanche à 120° du Soleil, due à la lumière réfléchie à l'intérieur de plaquettes à plat",upperTangentArc:"Arc tangent supérieur — un arc brillant posé sur le haut du halo de 22°, dû à des colonnes couchées à l'horizontale",lowerTangentArc:"Arc tangent inférieur — un arc touchant le bas du halo de 22°, dû à des colonnes couchées à l'horizontale",circumzenithal:"Arc circumzénithal — une bande vivement colorée près du zénith, due à la lumière entrant par la face du dessus de plaquettes à plat (seulement Soleil sous 32°)",circumhorizontal:"Arc circumhorizontal — une bande colorée basse dans le ciel, due à la lumière entrant par la face latérale de plaquettes à plat (seulement Soleil au-dessus de 58°)",parhelicCircle:"Cercle parhélique — un cercle blanc faisant tout le tour du ciel à la hauteur du Soleil, dû aux reflets sur les faces verticales de plaquettes à plat",pillar:"Pilier de lumière — une colonne de lumière dressée au-dessus du Soleil, due aux reflets sur des plaquettes à plat légèrement inclinées",subsun:"Sous-soleil — une image du Soleil sous l'horizon, due aux reflets sur les faces plates de plaquettes"},trafficTooltip:{unnamed:"Aéronef {hex}",altitude:"{value} ft",speed:"{value} kt",heading:"cap {value}°",position:"à {distance} km, {elevation}° au-dessus de l'horizon, {bearing}",heard:"Entendu à {level} dB(A), parti de l'avion il y a {delay} s, {lag}° derrière lui : {character}{pitch}",rumble:"un grondement grave, rien au-delà de {cutoff} Hz",muffled:"un bruit sourd, rien au-delà de {cutoff} Hz",broad:"un souffle large",pitchHigher:", son plus aigu de {percent} %",pitchLower:", son plus grave de {percent} %",inaudible:"Inaudible ici : {level} dB(A) contre {ambient} dB(A) de bruit ambiant",soundUnknown:"Son non calculable : l'avion n'était pas encore enregistré quand il est parti",contrailPersistent:"Laisse une traînée qui dure : l'air est sursaturé en glace ({rhi} % par rapport à la glace)",contrailShort:"Laisse une traînée brève : l'air est sec par rapport à la glace ({rhi} % par rapport à la glace)",military:"militaire",restricted:"identité masquée par son propriétaire",candidate:"Un candidat compatible, pas une identification"},credits:"Crédits",notAVideo:"Ceci n'est pas une vidéo",isASimulation:"C'est une simulation en temps réel."};export{n as sceneNames_fr};
@@ -0,0 +1 @@
1
+ import{V as a,D as o}from"./rr0-sighting-editor.mjs";const l={bodies:{sun:"Sole",moon:"Luna",Venus:"Venere",Mars:"Marte",Jupiter:"Giove",Saturn:"Saturno"},stars:{Sirius:"Sirio",Canopus:"Canopo",Arcturus:"Arturo",Procyon:"Procione",Pollux:"Polluce",Castor:"Castore",Regulus:"Regolo"},comets:{"halley-1910":"cometa di Halley","brooks-1911":"cometa Brooks","skjellerup-maristany-1927":"cometa Skjellerup-Maristany","de-kock-paraskevopoulos-1941":"cometa de Kock-Paraskevopoulos","southern-1947":"cometa australe","eclipse-1948":"cometa dell'eclisse","arend-roland-1957":"cometa Arend-Roland","mrkos-1957":"cometa Mrkos","seki-lines-1962":"cometa Seki-Lines","ikeya-seki-1965":"cometa Ikeya-Seki","bennett-1970":"cometa Bennett","white-ortiz-bolelli-1970":"cometa White-Ortiz-Bolelli","kohoutek-1973":"cometa Kohoutek","west-1976":"cometa West","iras-araki-alcock-1983":"cometa IRAS-Araki-Alcock","halley-1986":"cometa di Halley","hyakutake-1996":"cometa Hyakutake","hale-bopp-1997":"cometa Hale-Bopp","mcnaught-2007":"cometa McNaught","lovejoy-2011":"cometa Lovejoy","panstarrs-2013":"cometa PANSTARRS","neowise-2020":"cometa NEOWISE","tsuchinshan-atlas-2024":"cometa Tsuchinshan-ATLAS"},novae:{"sn-1006":"supernova del 1006","sn-1054":"supernova del 1054","sn-1181":"supernova del 1181","sn-1572":"supernova di Tycho","sn-1604":"supernova di Keplero","t-crb-1866":"nova della Corona Boreale 1866","t-aur-1891":"nova dell'Auriga 1891","gk-per-1901":"nova di Perseo 1901","dn-gem-1912":"nova dei Gemelli 1912","v603-aql-1918":"nova dell'Aquila 1918","v476-cyg-1920":"nova del Cigno 1920","rr-pic-1925":"nova del Pittore 1925","dq-her-1934":"nova di Ercole 1934","cp-lac-1936":"nova della Lucertola 1936","cp-pup-1942":"nova della Poppa 1942","t-crb-1946":"nova della Corona Boreale 1946","v446-her-1960":"nova di Ercole 1960","v533-her-1963":"nova di Ercole 1963","hr-del-1967":"nova del Delfino 1967","lv-vul-1968":"nova della Volpetta 1968","fh-ser-1970":"nova del Serpente 1970","v1500-cyg-1975":"nova del Cigno 1975","v842-cen-1986":"nova del Centauro 1986","sn-1987a":"supernova 1987A","v1974-cyg-1992":"nova del Cigno 1992","v382-vel-1999":"nova delle Vele 1999","v1494-aql-1999":"nova dell'Aquila 1999","v4743-sgr-2002":"nova del Sagittario 2002","rs-oph-2006":"nova di Ofiuco 2006","v1280-sco-2007":"nova dello Scorpione 2007","v339-del-2013":"nova del Delfino 2013","v1369-cen-2013":"nova del Centauro 2013","rs-oph-2021":"nova di Ofiuco 2021"},satelliteClasses:{echo:"i palloni Echo","iridium-flares":"i lampi degli Iridium",iss:"la Stazione Spaziale Internazionale","starlink-trains":"i treni di Starlink"},showers:{quadrantids:"Quadrantidi",lyrids:"Liridi di aprile","eta-aquariids":"Eta Aquaridi","alpha-capricornids":"Alfa Capricornidi","southern-delta-aquariids":"Delta Aquaridi australi",perseids:"Perseidi","southern-taurids":"Tauridi australi",draconids:"Draconidi di ottobre",orionids:"Orionidi","northern-taurids":"Tauridi boreali",leonids:"Leonidi",geminids:"Geminidi",ursids:"Ursidi"},lightRigs:{airliner:"Aereo di linea",helicopter:"Elicottero","car-headlights":"Auto, fari accesi","car-hazards":"Auto, luci di emergenza","emergency-beacons":"Lampeggianti di veicolo di soccorso","traffic-signal":"Semaforo","pedestrian-signal":"Semaforo pedonale",streetlamp:"Lampione"},instruments:{eye:"Occhio nudo","rectilinear-lens":"Fotocamera, modello sconosciuto","roamer-1-120":"Roamer 1, pellicola 120","instamatic-126":"Instamatic, pellicola 126","slr-35mm-50":"Reflex 35 mm, obiettivo 50 mm","slr-35mm-zoom":"Reflex 35 mm, zoom 70-210 mm","phone-landscape":"Telefono, in orizzontale","phone-portrait":"Telefono, in verticale",...o.names(),...a.names()},decorKinds:{building:"Edificio",tree:"Albero",shrub:"Arbusto",bridge:"Ponte",wire:"Linea aerea",crop:"Filare di coltura",terrace:"Terrazzamento",mound:"Mucchio di pietre",wall:"Muretto a secco",streetlight:"Lampione",trafficlight:"Semaforo",crossing:"Attraversamento pedonale",roadsign:"Segnale stradale",vehicle:"Veicolo",observer:"Osservatore",aircraft:"Aeromobile",entity:"Essere"},compassPoints:["N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSO","SO","OSO","O","ONO","NO","NNO"],towards:e=>`verso ${e}`,starTooltip:"{name} — mag {mag}, {alt}° sopra l'orizzonte",starTooltipBelow:"{name} — mag {mag}, {alt}° sotto l'orizzontale",decorTooltip:"{name} — {size}, a {distance}",satelliteTooltip:"{name} — satellite, mag {mag}, a {height} km di quota",opticsTooltips:{halo22:"Alone di 22° — un anello attorno al Sole, dovuto alla luce deviata da cristalli di ghiaccio esagonali nei cirri; il bordo interno è rosso, a 21,7°",halo46:"Alone di 46° — un anello più raro e debole: la luce entra da una faccia laterale del cristallo ed esce da una faccia di estremità",oddRadius:"Alone di {angle}° — un anello a raggio dispari, raro e debole, prodotto da cristalli di ghiaccio con estremità piramidali",parhelion:"Parelio — una macchia luminosa colorata accanto al Sole, alla sua altezza, da lastrine di ghiaccio che cadono piatte; rosso verso il Sole",parhelion120:"Parelio di 120° — una debole macchia bianca a 120° dal Sole, da luce riflessa dentro lastrine piatte",upperTangentArc:"Arco tangente superiore — un arco luminoso appoggiato sull'alone di 22°, da colonne coricate in orizzontale",lowerTangentArc:"Arco tangente inferiore — un arco che tocca la base dell'alone di 22°, da colonne coricate in orizzontale",circumzenithal:"Arco circumzenitale — una banda di colori vivi vicino allo zenit, da luce che entra dalla faccia superiore di lastrine piatte (solo con il Sole sotto i 32°)",circumhorizontal:"Arco circumorizzontale — una banda colorata bassa nel cielo, da luce che entra dalla faccia laterale di lastrine piatte (solo con il Sole sopra i 58°)",parhelicCircle:"Cerchio parelico — un cerchio bianco attorno a tutto il cielo all'altezza del Sole, da riflessi sulle facce verticali di lastrine piatte",pillar:"Colonna di luce — un fascio di luce sopra il Sole, da riflessi su lastrine piatte leggermente inclinate",subsun:"Sotto-sole — un'immagine del Sole sotto l'orizzonte, da riflessi sulle facce piatte delle lastrine"},trafficTooltip:{unnamed:"Aeromobile {hex}",altitude:"{value} ft",speed:"{value} kt",heading:"prua {value}°",position:"a {distance} km, {elevation}° sopra l'orizzonte, {bearing}",heard:"Si sente a {level} dB(A), partito dall'aereo {delay} s fa, {lag}° dietro di esso: {character}{pitch}",rumble:"un rombo grave, nulla oltre {cutoff} Hz",muffled:"un rumore sordo, nulla oltre {cutoff} Hz",broad:"un fragore ampio",pitchHigher:", suono più acuto del {percent} %",pitchLower:", suono più grave del {percent} %",inaudible:"Non si sente qui: {level} dB(A) contro {ambient} dB(A) di rumore ambientale",soundUnknown:"Suono non calcolabile: l'aereo non era ancora registrato quando è partito",contrailPersistent:"Lascia una scia che dura: l'aria è sovrasatura rispetto al ghiaccio ({rhi} % rispetto al ghiaccio)",contrailShort:"Lascia una scia breve: l'aria è secca rispetto al ghiaccio ({rhi} % rispetto al ghiaccio)",military:"militare",restricted:"identità nascosta dal proprietario",candidate:"Un candidato compatibile, non un'identificazione"},credits:"Crediti",notAVideo:"Questo non è un video",isASimulation:"È una simulazione in tempo reale."};export{l as sceneNames_it};