@rr0/ufoathome 0.89.0 → 0.89.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.
- package/dist-embed-scene/rr0-scene.mjs +4 -4
- package/dist-embed-scene/sightingSchema-Bsub_0vA.js +1 -0
- package/dist-embed-sighting/rr0-sighting.mjs +6 -6
- package/dist-embed-sighting/sightingSchema-Bsub_0vA.js +1 -0
- package/dist-embed-sighting-editor/{SightingFileEditor-Dd7giSWi.js → SightingFileEditor-CiwT0fmr.js} +1 -1
- package/dist-embed-sighting-editor/rr0-sighting-editor.mjs +6 -6
- package/dist-embed-sighting-editor/sightingSchema-Bsub_0vA.js +1 -0
- package/package.json +1 -1
- package/dist-embed-scene/sightingSchema-D7VMkxdw.js +0 -1
- package/dist-embed-sighting/sightingSchema-D7VMkxdw.js +0 -1
- package/dist-embed-sighting-editor/sightingSchema-D7VMkxdw.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={type:"number"},t={type:"string",doc:'Which account this is, unique across every recording anywhere: the day it happened, then who saw it ("1964-04-24-ZamoraLonnie"), or where for an anonymous observer.'},o={type:"object",fields:{year:{type:"number"},month:{type:"number"},day:{type:"number"},hour:{type:"number"},minute:{type:"number"},second:{type:"number"},raw:{type:"string",doc:"The exact EDTF-ish text as typed in the editor UI (e.g."}}},r={type:"object",doc:"See SightingEvent.endTime.",fields:{year:{type:"number"},month:{type:"number"},day:{type:"number"},hour:{type:"number"},minute:{type:"number"},second:{type:"number"},raw:{type:"string",doc:"The exact EDTF-ish text as typed in the editor UI (e.g."}}},n={type:"number",doc:"See SightingEvent.durationSeconds."},i={type:"number",doc:"See SightingEvent.utcOffsetHours — the legal time zone `time`/`endTime` are expressed in."},s={type:"string",doc:"See SightingEvent.timeZone — the IANA rule `utcOffsetHours` was derived from, when it was."},a={type:"array",fields:{lat:{type:"number"},lng:{type:"number"},name:{type:"string",doc:'The place as it is named, fully qualified — "Valensole, Alpes-de-Haute-Provence, …, France".'}}},d={type:"object",doc:"See Sighting.observer.",fields:{id:{type:"string",doc:'Who this is, as a reference: last name then first names, run together ("ZamoraLonnie"), whether or not a page exists for them yet.'},title:{type:"string"},lastName:{type:"string"},firstNames:{type:"array"}}},c={type:"object",doc:"Who saw it and how their account travelled — see Account, and Sighting.account.",fields:{observerAgeYears:{type:"number",doc:"The main observer's age in years AT THE TIME, not today — a 1974 account is read by whoever finds it decades later, and the number that means anything is the one from then."},observerOccupation:{type:"string",doc:'What the main observer did, as they are described: "boulanger", "pilote de ligne", "gendarme".',loose:!0},source:{type:"enum",doc:"How the account reached the person who wrote this recording.",values:["on-site","interview","telephone","questionnaire","letter","social-media","press"]},followedUp:{type:"boolean",doc:"Whether the observer was gone back to after the first account."}}},l={type:"number",doc:"How much the observer's body sways the view at rest: 1 a person, 0 a tripod — see Sighting.sway."},h={type:"object",doc:"The vehicle the observer was in, when the decor does not draw it — see Sighting.vehicle.",fields:{kind:{type:"enum",values:["car","van","truck","motorcycle","generic"]},windowsOpen:{type:"boolean",doc:"Whether the windows were open: the road and the wind come in, the cabin no longer muffles the engine."},noise:{type:"number",doc:'How loud it was, against an ordinary one of its kind: 1 by default, 1.5 for "very noisy".'}}},u={type:"string",doc:"See SightingEvent.description — a plain string, or one per language.",loose:!0},p={type:"array",doc:"See SightingEvent.tags."},y={type:"object",fields:{keyframes:{type:"array",fields:{t:{type:"number"},shapes:{type:"array",fields:{sourceId:{type:"string"},shape:{type:"object",fields:{kind:{type:"enum",values:["oval","polygon"]},bounds:{type:"object",fields:{x:{type:"number"},y:{type:"number"},width:{type:"number"},height:{type:"number"}}},color:{type:"string",doc:"CSS color"},angle:{type:"number",doc:"Rotation in radians about the shape's centre, positive = clockwise on screen; 0 = no rotation"},transparency:{type:"number",doc:"0 = opaque, 1 = fully transparent"},haloScale:{type:"number",doc:"0 = no halo/glow, >1 = larger glow radius"},blur:{type:"number",doc:"How indistinct the observer said its edges were — 0 for a hard outline, 1 for a shape with no edge at all."},brightness:{type:"number",doc:"How dazzling the observer said it was — 0 for a light you can look at, 1 for one you cannot."},selected:{type:"boolean"},title:{type:"string",doc:"What the observer calls it, if anything.",loose:!0},angular:{type:"object",doc:"How big this looked to the observer, in degrees of arc (see AngularExtent) — the recording's OWN statement of size, and the one it is allowed to make.",fields:{widthDeg:{type:"number",doc:"How wide it looked, in degrees of arc."},heightDeg:{type:"number",doc:"How tall it looked, in degrees of arc."}}},aim:{type:"object",doc:"Where the phenomenon itself was in the observer's sky (the direction of the shape's centre, not the way the observer was facing) — degrees of azimuth from true north and of altitude above the horizon, the same conventions as ObserverPose.",fields:{azimuthDeg:{type:"number",doc:"Degrees clockwise from true north, the same convention as ObserverPose.headingDeg."},altitudeDeg:{type:"number",doc:"Degrees above (positive) or below the horizon."}}},points:{type:"array",doc:"Points relative to bounds origin (0,0 = bounds.x, bounds.y)",fields:{x:{type:"number"},y:{type:"number"}}}}}}}}},order:{type:"array",doc:"Back-to-front paint/hit-test order — see Timeline's own `order` field."},groups:{type:"array",doc:"Each inner array is one group's member sourceIds (always >= 2 members) — see Timeline's own `groups` field."}}},m={type:"object",doc:"The observer's position/elevation/orientation over time — absent for older recordings, which fall back to the legacy static place[0] (see Sighting.ts's resolveObserverPoseAt).",fields:{keyframes:{type:"array",fields:{t:{type:"number"},pose:{type:"object",fields:{lat:{type:"number",doc:"Decimal degrees."},lng:{type:"number"},elevationM:{type:"number",doc:"Metres above the local ground under the observer, not above sea level: 0 for someone standing on it, the height of a window or a cliff top otherwise."},headingDeg:{type:"number",doc:"Degrees clockwise from true north."},pitchDeg:{type:"number",doc:"Degrees above (positive) or below (negative) the local horizontal — how far up/down the observer was looking, e.g."},rollDeg:{type:"number",doc:"How far the instrument itself was tilted about its own line of sight, degrees, positive clockwise as the observer saw it — a camera held askew, a head leaned over."},fovDeg:{type:"number",doc:"Vertical field of view in degrees, as a Three.js PerspectiveCamera would take it."},fNumber:{type:"number",doc:"How far the lens was stopped down — undefined for anything the recording did not state, which then falls back to the instrument's own setting (see Instrument.fNumber)."},focusDistanceM:{type:"number",doc:"How far away the lens was focused, metres — undefined meaning at infinity, which is where a camera pointed at the sky sits and the only setting under which everything celestial comes out sharp."}}}}}}},g={type:"object",doc:"Weather over time — absent for older recordings, which fall back to the legacy static `weather` field below (see Sighting.ts's resolveWeatherAt).",fields:{keyframes:{type:"array",fields:{t:{type:"number"},weather:{type:"object",fields:{cloudLayers:{type:"array",doc:"Explicit layers override the historical cloud fields; [] means no clouds.",fields:{id:{type:"string",doc:"Stable across keyframes: reordering layers must not regenerate their cloud pattern."},instances:{type:"array",doc:"Optional explicit masses, independent of the generated coverage percentage.",fields:{id:{type:"string"},eastM:{type:"number",doc:"Position relative to the recording's initial observer, in metres east/north."},northM:{type:"number"},baseM:{type:"number"},thicknessM:{type:"number"},widthM:{type:"number"},depthM:{type:"number"},rotationDeg:{type:"number"},density:{type:"number"},darkness:{type:"number",doc:"Visual shading, 0 (white) to 1 (very dark); absent inherits the parent layer."},seed:{type:"number"}}},type:{type:"enum",values:["cumulus","stratus","stratocumulus","cirrus","unknown"]},baseM:{type:"number",doc:"Base in metres above the recording's reference ground, not above the moving observer."},thicknessM:{type:"number",doc:"Vertical extent in metres."},coverage:{type:"number",doc:"Horizontal coverage, 0–1."},sizeM:{type:"number",doc:"Characteristic horizontal cloud size in metres."},density:{type:"number",doc:"Relative optical density, 0–2; zero is transparent."},darkness:{type:"number",doc:"Visual shading, 0 (white) to 1 (very dark)."},iceCrystalAlignment:{type:"number",doc:"Degree of preferential crystal orientation, meaningful only for cirrus."},seed:{type:"number",doc:"Reproducible variation; defaults to a hash of the stable layer id."},windDirectionDeg:{type:"number",doc:"Optional wind overrides; bearing TOWARD which the cloud travels, clockwise from north."},windSpeed:{type:"number"}}},cloudCover:{type:"number",doc:"0 = clear sky, 1 = fully overcast."},cloudDarkness:{type:"number",doc:"0 = light/clear clouds, 1 = dark/stormy character."},cloudBaseM:{type:"number",doc:"Height of the cloud layer's BASE above the ground, in meters — 600 to 2000 m covers most real low cloud."},highCloudCover:{type:"number",doc:"How much of the sky the HIGH deck covered, 0 to 1 — cirrus and cirrostratus, above about six kilometres, where anything present is ice rather than water."},lowerCloudCover:{type:"number",doc:"How much of the sky the LOW and MIDDLE decks covered, 0 to 1 — the cloud that stands between a observer and anything higher up."},iceCrystalAlignment:{type:"number",doc:"How steadily the ice crystals were falling, 0 to 1 — the one thing about the sky that decides which halo forms stood, and the one thing no record of any sighting holds."},relativeHumidity:{type:"number",doc:"Relative humidity near the ground, 0 to 1."},precipitationType:{type:"enum",values:["none","rain","snow","hail"]},precipitationIntensity:{type:"number",doc:'0-1; meaningless while precipitationType is "none".'},precipitationAmount:{type:"number",doc:"How much of that precipitation is actually falling yet, 0 to 1 — absent meaning all of it."},windDirectionDeg:{type:"number",doc:"Degrees clockwise from true north — same convention as ObserverPose.headingDeg, and the direction the wind blows *toward*, not the one it comes from: SceneRenderer drifts every precipitation particle and cloud field along exactly this bearing (`sin/-cos`, north = -Z), so 0 means snow drifting northward."},windSpeed:{type:"number",doc:"Real-world wind speed in m/s (0 = calm, ~30 = violent storm/hurricane-force) — drives both cloud advection, visual precipitation drift and wind audio volume directly."},storm:{type:"boolean",doc:"Whether a thunderstorm was reported — drives both a scene-fog lightning flash and a delayed thunderclap (see SceneRenderer's lightning-flash scheduling, named for the visual mechanism it implements internally, not for this field)."}}}}}}},b={type:"object",doc:`Legacy static weather condition, kept only as weatherTrack's own fallback for recordings made before it existed — absent means "unknown/not recorded", not "clear skies" (renderers default to DEFAULT_WEATHER, see Weather.ts).`,fields:{cloudLayers:{type:"array",doc:"Explicit layers override the historical cloud fields; [] means no clouds.",fields:{id:{type:"string",doc:"Stable across keyframes: reordering layers must not regenerate their cloud pattern."},instances:{type:"array",doc:"Optional explicit masses, independent of the generated coverage percentage.",fields:{id:{type:"string"},eastM:{type:"number",doc:"Position relative to the recording's initial observer, in metres east/north."},northM:{type:"number"},baseM:{type:"number"},thicknessM:{type:"number"},widthM:{type:"number"},depthM:{type:"number"},rotationDeg:{type:"number"},density:{type:"number"},darkness:{type:"number",doc:"Visual shading, 0 (white) to 1 (very dark); absent inherits the parent layer."},seed:{type:"number"}}},type:{type:"enum",values:["cumulus","stratus","stratocumulus","cirrus","unknown"]},baseM:{type:"number",doc:"Base in metres above the recording's reference ground, not above the moving observer."},thicknessM:{type:"number",doc:"Vertical extent in metres."},coverage:{type:"number",doc:"Horizontal coverage, 0–1."},sizeM:{type:"number",doc:"Characteristic horizontal cloud size in metres."},density:{type:"number",doc:"Relative optical density, 0–2; zero is transparent."},darkness:{type:"number",doc:"Visual shading, 0 (white) to 1 (very dark)."},iceCrystalAlignment:{type:"number",doc:"Degree of preferential crystal orientation, meaningful only for cirrus."},seed:{type:"number",doc:"Reproducible variation; defaults to a hash of the stable layer id."},windDirectionDeg:{type:"number",doc:"Optional wind overrides; bearing TOWARD which the cloud travels, clockwise from north."},windSpeed:{type:"number"}}},cloudCover:{type:"number",doc:"0 = clear sky, 1 = fully overcast."},cloudDarkness:{type:"number",doc:"0 = light/clear clouds, 1 = dark/stormy character."},cloudBaseM:{type:"number",doc:"Height of the cloud layer's BASE above the ground, in meters — 600 to 2000 m covers most real low cloud."},highCloudCover:{type:"number",doc:"How much of the sky the HIGH deck covered, 0 to 1 — cirrus and cirrostratus, above about six kilometres, where anything present is ice rather than water."},lowerCloudCover:{type:"number",doc:"How much of the sky the LOW and MIDDLE decks covered, 0 to 1 — the cloud that stands between a observer and anything higher up."},iceCrystalAlignment:{type:"number",doc:"How steadily the ice crystals were falling, 0 to 1 — the one thing about the sky that decides which halo forms stood, and the one thing no record of any sighting holds."},relativeHumidity:{type:"number",doc:"Relative humidity near the ground, 0 to 1."},precipitationType:{type:"enum",values:["none","rain","snow","hail"]},precipitationIntensity:{type:"number",doc:'0-1; meaningless while precipitationType is "none".'},precipitationAmount:{type:"number",doc:"How much of that precipitation is actually falling yet, 0 to 1 — absent meaning all of it."},windDirectionDeg:{type:"number",doc:"Degrees clockwise from true north — same convention as ObserverPose.headingDeg, and the direction the wind blows *toward*, not the one it comes from: SceneRenderer drifts every precipitation particle and cloud field along exactly this bearing (`sin/-cos`, north = -Z), so 0 means snow drifting northward."},windSpeed:{type:"number",doc:"Real-world wind speed in m/s (0 = calm, ~30 = violent storm/hurricane-force) — drives both cloud advection, visual precipitation drift and wind audio volume directly."},storm:{type:"boolean",doc:"Whether a thunderstorm was reported — drives both a scene-fog lightning flash and a delayed thunderclap (see SceneRenderer's lightning-flash scheduling, named for the visual mechanism it implements internally, not for this field)."}}},f={type:"object",doc:"What the sighting sounded like over time — see SoundTrack.",fields:{keyframes:{type:"array",fields:{t:{type:"number"},sound:{type:"object",fields:{kind:{type:"enum",values:["none","hum","whistle","rumble","crackle"]},volume:{type:"number",doc:"How loud it was, 0 (inaudible) to 1 (as loud as the observer could describe) — deliberately relative rather than a dB SPL figure: nobody reports a sound level in decibels, and inventing one would claim a measurement where there is only an impression."},pitchHz:{type:"number",doc:`The sound's own frequency in Hz — the oscillator's pitch for the pitched kinds ("hum", "whistle"), and the noise filter's centre for the unpitched ones ("rumble", "crackle"), where it reads as how deep or how sharp the noise is.`},src:{type:"string",doc:"An actual audio recording of the sound, when one exists (a observer who filmed the event, a later recording of the same phenomenon) — replaces synthesis entirely while it is set, with `volume` still scaling it."}}}}}}},w={type:"array",doc:"See Sighting.decor.",fields:{id:{type:"string"},kind:{type:"enum",values:["building","tree","crop","mound","streetlight","vehicle","observer","aircraft","shrub","bridge","entity"]},title:{type:"string",doc:'Optional display name, same role as Shape.title — falls back to a generic "{kind} {n}" label (see SightingEditorElement.decorLabel) when absent.',loose:!0},eastM:{type:"number",doc:"Meters from the observer's own position — eastM positive = east, northM positive = north."},northM:{type:"number"},headingDeg:{type:"number",doc:"Degrees clockwise from true north, same convention as ObserverPose.headingDeg — which way a vehicle is facing, or a observer looking."},lit:{type:"boolean",doc:"Streetlight lamp / vehicle headlights switched on."},litKeyframes:{type:"array",doc:"Sorted by t.",fields:{t:{type:"number"},lit:{type:"boolean"}}},lights:{type:"array",doc:"The object's individual lamps, each with its own place on the body and its own rhythm — see DecorLight, and LIGHT_RIGS for the ready-made sets.",fields:{id:{type:"string"},offsetM:{type:"object",doc:"Where it sits on the object, in meters relative to the object's own centre and heading: +x is its right, +y up, +z its front.",fields:{x:{type:"number"},y:{type:"number"},z:{type:"number"}}},color:{type:"string",doc:"CSS hex colour, as emitted — the regulated red/green/white of navigation lights, the amber of a hazard flasher."},intensity:{type:"number",doc:"Peak luminous intensity as a ratio to an ordinary navigation light's (1, about a hundred candela — see DecorSystem's LAMP_CANDELA); the airliner rig (LIGHT_RIGS) gives its beacon 1.5 and its wingtip strobes 20."},pattern:{type:"object",fields:{kind:{type:"enum",values:["steady","flash"]},perMinute:{type:"number"},dutyCycle:{type:"number"},phase:{type:"number"}}}}},track:{type:"array",doc:"Where the object is over time, when it moves — an aircraft crossing the sky, a car driving past.",fields:{t:{type:"number"},eastM:{type:"number"},northM:{type:"number"},altitudeM:{type:"number",doc:"Meters above the observer's own elevation."},headingDeg:{type:"number"}}},sightingUrl:{type:"string",doc:`For kind "observer" only: the URL of that observer's own sighting.json recording, if known — lets the 3D scene's own context menu offer "view this observer's account" (loading it the same way SightingEditorElement.importFromUrl already does).`},windows:{type:"object",doc:"Per-side window opacity, 0 (fully open — the pane is invisible, and DecorSystem.addRoom's own interior wall panel is skipped there too, same as no window at all) to 100 (fully closed — a solid-looking pane)."},color:{type:"string",doc:'What colour this object actually is, as a CSS colour — the same way a shape states its own (see Shape.color), because a recording is written and read by people and "#8f86a8" is a colour a person can type.'},observerSide:{type:"enum",values:["front","behind","left","right","front-left","front-right","behind-left","behind-right"]},engine:{type:"object",doc:"A vehicle heard running — see DecorEngine: its engine turning with its own `track`, heard less the further it is from the observer.",fields:{kind:{type:"enum",doc:'Which sound: a decor object\'s own `kind` says only "vehicle".',values:["car","van","truck","motorcycle","generic"]},noise:{type:"number",doc:"As ObserverVehicle.noise."}}},bridge:{type:"object",doc:'Kind "bridge" only: how it is built, where that is known — see BridgeStructure.',fields:{spanM:{type:"number",doc:"Metres of open span under the deck, centred on the object."},deckThicknessM:{type:"number",doc:"Thickness of the deck slab, metres."},railing:{type:"object",doc:"The railing along both edges: its height above the road, the spacing of its posts, and how many horizontal rails it has — two rails make two rows of rectangular openings.",fields:{heightM:{type:"number"},postSpacingM:{type:"number"},rails:{type:"number"}}}}},floors:{type:"number",doc:'Kind "building" only: number of upper stories above the ground floor, set when the building is created (default 2, see SightingEditorElement.addDecor) and editable afterward.'},occupiedFloor:{type:"number",doc:'Kind "building" only, meaningful once observerSide is set: which floor the observer is on, 0 (ground floor) up to floors.'},occludesSourceIds:{type:"array",doc:"Shape sourceIds (see Timeline.sourceIds/Shape) this decor object sits in front of, from the observer's own reported viewpoint — occluding that shape wherever their screen positions line up (see SceneRenderer.isScreenPointOccluded)."},sizeM:{type:"object",doc:"How big it really is, in meters, along its own axes — see DecorSize.",fields:{widthM:{type:"number"},lengthM:{type:"number"},heightM:{type:"number"}}},model:{type:"object",doc:"The real 3D model that stands in for the primitive, if one does — see DecorModelRef.",fields:{id:{type:"string",doc:"Catalogue entry, resolved by the live DecorModelProvider."},url:{type:"string",doc:"Direct glTF/GLB address, taking precedence over `id`."},headingOffsetDeg:{type:"number",doc:"Degrees to turn the loaded model about its own vertical axis so its nose points the way this scene's heading convention expects (0 faces -Z — see DecorSystem's build)."},credit:{type:"object",doc:"Who made it and under what licence.",fields:{title:{type:"string"},author:{type:"string"},license:{type:"string",doc:"Licence name as its author states it, e.g."},sourceUrl:{type:"string",doc:"Where it came from, so the claim can be checked."}}}}}}},v={type:"array",doc:"The roads the account's own plan draws — see Sighting.roads and Road.ts.",fields:{id:{type:"string"},title:{type:"string",doc:"What the account calls it, where it calls it anything.",loose:!0},surface:{type:"enum",values:["paved","gravel","dirt"]},widthM:{type:"number",doc:"Carriageway width, metres."},path:{type:"array",doc:"The centre line, in metres east and north of the observer's place at t=0.",fields:{eastM:{type:"number"},northM:{type:"number"}}},source:{type:"string",doc:"Where this line comes from — the plan, the survey, the report it was read off.",loose:!0}}},k={type:"array",doc:"What an investigator drew over the place, imported from their file — see Sighting.traces and Trace.ts.",fields:{id:{type:"string"},title:{type:"string",doc:'What its author called it ("Ligne de visée depuis la ferme").',loose:!0},kind:{type:"enum",values:["polygon","point","line"]},points:{type:"array",doc:"One point for a marker, the vertices of a line, the vertices of an outline (not repeated at the end: it is closed by being a polygon).",fields:{lat:{type:"number"},lng:{type:"number"},altM:{type:"number",doc:"Metres, read as `InvestigatorTrace.altitude` says."}}},altitude:{type:"enum",doc:"How `altM` is read.",values:["ground","relative","absolute"]},color:{type:"string",doc:"CSS colour the author gave it, `#rrggbb`."},source:{type:"string",doc:"Whose it is and where it comes from — the person, the report, the file.",loose:!0}}},S={type:"object",doc:"Which meteorological record `weatherTrack` was looked up from, when it wasn't the observer who stated the conditions — see Sighting.weatherSource.",fields:{id:{type:"string",doc:"Stable dataset id, e.g."},name:{type:"string",doc:"Human-readable dataset name, e.g."},url:{type:"string",doc:"The exact request that produced these values, so the claim stays checkable years later."}}},D={type:"string",doc:"Which INSTRUMENTS entry this was observed through — see Sighting.instrumentId."},M={type:"number",doc:"How long the shutter stayed open, seconds — one value for the whole observation, see Sighting.exposureSeconds."},T={type:"number",doc:"The speed of the film or sensor this picture was taken on — see Sighting.iso."},W={type:"number",doc:`How bright the night sky is at the place, towns and all: the zenith of a moonless night in magnitudes per square arcsecond, a Sky Quality Meter's reading or the World Atlas's "SQM" figure (Falchi et al.`},j={type:"boolean",doc:"Whether the map of where the observer stood starts open — see Sighting.observerMap."},H={type:"array",doc:"The named moments of the account — see Milestone.",fields:{t:{type:"number",doc:"When, in milliseconds from the start of the recording — the same scale every track uses."},label:{type:"string",doc:'Short label, shown on the seek bar: the letter or number the account itself uses ("A", "B"), or a couple of words where it uses none.',loose:!0},note:{type:"string",doc:"What happened at that moment, in the account's own words where possible.",loose:!0}}},x={type:"array",doc:"Pictures of the place, laid over the reconstruction at the direction each was registered in — see SceneReference.",fields:{id:{type:"string",doc:"Stable id, what the editor's own list and a future trace on the picture name."},kind:{type:"enum",values:["photo","panorama"]},src:{type:"string",doc:"Where the picture is: an address, or the picture itself as a `data:` URL."},title:{type:"string",doc:'What to call it — "Vue depuis le muret, fin été 1968".',loose:!0},credit:{type:"string",doc:"Who made it and on what terms — shown wherever the picture is, because a credit that is not displayed is not a licence (see DataSource for the same rule on the data)."},creditUrl:{type:"string",doc:"Where that credit points: the source page, the licence."},t:{type:"number",doc:"The instant of the timeline it was taken at, milliseconds, for a picture made DURING the observation — by the observer, or by whoever was there."},from:{type:"object",doc:"Where it was taken from — the one point its registration holds for.",fields:{lat:{type:"number"},lng:{type:"number"}}},drawing:{type:"boolean",doc:"Whether somebody drew on it — a trajectory, an outline, an arrow — so that what the picture shows of the phenomenon is a statement made afterwards, not a thing the camera recorded."},opacity:{type:"number",doc:"How much of it shows, 0 to 1 — the starting point of the reader's own slider, since the comparison is made by sliding: all picture, all render, and the registration checked at every step between."},registration:{type:"object",fields:{headingDeg:{type:"number",doc:"Degrees clockwise from true north, the direction the picture's centre looks at."},pitchDeg:{type:"number",doc:"Degrees above the local horizontal, positive up."},rollDeg:{type:"number",doc:"Degrees the picture is tilted about its own axis, positive clockwise as it is looked at — see ObserverPose.rollDeg."},fovDeg:{type:"number",doc:"The picture's VERTICAL field, degrees — what the lens took in top to bottom, its horizontal field following from the image's own aspect ratio."}}},landmarks:{type:"array",doc:"The details it was lined up on — see PictureLandmark.",fields:{id:{type:"string"},label:{type:"string",doc:'What the detail is — "Arbre masquant", "barrière".',loose:!0},picture:{type:"object",doc:"Where it is on the picture, 0..1 from the top-left corner.",fields:{u:{type:"number"},v:{type:"number"}}},scene:{type:"object",doc:"Where it is from the observer, in the scene.",fields:{azimuthDeg:{type:"number"},altitudeDeg:{type:"number"}}}}}}},C={type:"array",doc:"Where the account can be read as it was given, each one a source — see RecordingSource.",fields:{type:{type:"enum",values:["book","article"]},title:{type:"string"},authors:{type:"array",doc:"The author(s) name(s): for a post, the account that posted it."},url:{type:"string",doc:"Where it can be read."},publication:{type:"object",doc:"Who published it and when (EDTF).",fields:{publisher:{type:"string"},time:{type:"string"}}},index:{type:"string",doc:"Chapter, page, etc."}}},I={type:"object",doc:"What the observer took it to be, in metres — see InterpretationJson.",fields:{title:{type:"string",doc:'What the claim is, in a few words — "Craft on its legs", "Weather balloon at 3 km".',loose:!0},bodies:{type:"array",fields:{id:{type:"string"},title:{type:"string",loose:!0},explains:{type:"array",doc:"The phenomena of the account (their `sourceId`s) this body claims to be — what its projected outline is measured against at each instant, and what is drawn as a ghost beside it."},model:{type:"object",doc:"What it is shaped like.",fields:{id:{type:"string",doc:"Catalogue entry, resolved by the live DecorModelProvider."},url:{type:"string",doc:"Direct glTF/GLB address, taking precedence over `id`."},headingOffsetDeg:{type:"number",doc:"Degrees to turn the loaded model about its own vertical axis so its nose points the way this scene's heading convention expects (0 faces -Z — see DecorSystem's build)."},credit:{type:"object",doc:"Who made it and under what licence.",fields:{title:{type:"string"},author:{type:"string"},license:{type:"string",doc:"Licence name as its author states it, e.g."},sourceUrl:{type:"string",doc:"Where it came from, so the claim can be checked."}}}}},outlineNode:{type:"string",doc:'The node of the model that IS what the observer drew — "hull" for a craft on legs the observer drew as an oval — and so what its outline is measured by (see BodyConfrontation).'},track:{type:"array",fields:{t:{type:"number"},eastM:{type:"number"},northM:{type:"number"},azimuthDeg:{type:"number"},altitudeDeg:{type:"number"},distanceM:{type:"number"},onGround:{type:"boolean",doc:"Standing on the ground."},present:{type:"boolean",doc:"Gone from here on — `false` — or back — `true`."},altitudeAboveGroundM:{type:"number",doc:"Metres between the ground under it and its lowest point."},sizeM:{type:"object",fields:{widthM:{type:"number"},lengthM:{type:"number"},heightM:{type:"number"}}},attitude:{type:"object",fields:{headingDeg:{type:"number"},pitchDeg:{type:"number"},rollDeg:{type:"number"}}},appearance:{type:"object",fields:{color:{type:"string",doc:"Its surface colour, CSS."},albedo:{type:"number",doc:"How much of the light falling on it it sends back, 0-1: aluminium ~0.7, a matt dark hull ~0.1."},luminanceCdM2:{type:"number",doc:"What it gives out of itself, candela per square metre — read through the scene's own photometry exactly as a flame's is (see BodyFlame), so that the same figure is a lamp at night and nothing at all against a noon sky."}}},flame:{type:"object",doc:"A flame coming out of it, from here on — see BodyFlame.",fields:{node:{type:"string"},lengthM:{type:"number",doc:"How far it reaches from the node, metres."},widthM:{type:"number",doc:"How wide it is at its widest, metres."},color:{type:"string",doc:"Its colour where it leaves the node, CSS."},tipColor:{type:"string",doc:"Its colour at its far end; the same as `color` when absent."},luminanceCdM2:{type:"number"},raisesDust:{type:"boolean",doc:"Whether it raises dust where it meets the ground — a flame reaching loose, dry soil does, the more the nearer it gets."}}},motions:{type:"object",doc:"How far along each of its model's own movements it is, by the movement's name in the model (a glTF animation): 0 at its start, 1 at its end, and on past 1 for one that repeats — a turn made three times is 3."},lights:{type:"object",doc:"The luminance of each of its model's own lights, cd/m², by the name of the light's material in the model: what lets one body carry lights that behave each their own way — a steady white at each end, a red one flashing between."}}}}},smoke:{type:"array",doc:"Fires the interpretation lights on the ground, as their smoke — see SmokeSource.",fields:{eastM:{type:"number"},northM:{type:"number"},fromT:{type:"number"},untilT:{type:"number"},halfLifeS:{type:"number",doc:"How fast it dies down, seconds to half its thickness — brush flares and smoulders."}}},reentries:{type:"array",doc:"Re-entries it claims were seen: placed on the Earth, not round the observer — see ReentryJson.",fields:{id:{type:"string"},title:{type:"string",loose:!0},explains:{type:"array",doc:"The phenomena of the account (their `sourceId`s) this re-entry claims to be — see BodyJson.explains."},object:{type:"object",doc:"The object that came down, when it is known — the catalogue says which piece it was.",fields:{name:{type:"string",doc:'Its catalogue name — "SL-12 R/B".'},cosparId:{type:"string",doc:'International designator — "1968-013C".'},norad:{type:"number",doc:"US Space Surveillance Network catalogue number — 3136."}}},track:{type:"array",doc:"Where the leading point of the break-up was, at instants of the recording.",fields:{t:{type:"number"},lat:{type:"number"},lng:{type:"number"},altitudeKm:{type:"number",doc:"Height above the ellipsoid, km."}}},fragments:{type:"array",doc:"The pieces seen, each following the same path some seconds behind the leading point.",fields:{id:{type:"string"},lagS:{type:"number",doc:"Seconds behind the leading point, along the same path."},fromT:{type:"number",doc:"When it is first seen, ms of the recording — when it broke off, or when it began to glow."},untilT:{type:"number",doc:"When it goes out, ms — burned up, or slowed below glowing."},absoluteMagnitude:{type:"number",doc:"Its brightness as a magnitude at 100 km — the meteor astronomers' absolute magnitude, which a fireball report gives — from which the brightness at the observer's actual distance follows."},color:{type:"string",doc:"Its colour, as a CSS hex colour."},trainS:{type:"number",doc:"How long a stretch of its own past path still glows behind it, seconds: the tail observers describe."}}}}}}},z={version:e,id:t,time:o,endTime:r,durationSeconds:n,utcOffsetHours:i,timeZone:s,place:a,observer:d,account:c,sway:l,vehicle:h,description:u,tags:p,timeline:y,observerTrack:m,weatherTrack:g,weather:b,soundTrack:f,decor:w,roads:v,traces:k,weatherSource:S,instrument:D,exposureSeconds:M,iso:T,lightPollution:W,observerMap:j,milestones:H,references:x,sources:C,interpretation:I};export{c as account,w as decor,z as default,u as description,n as durationSeconds,r as endTime,M as exposureSeconds,t as id,D as instrument,I as interpretation,T as iso,W as lightPollution,H as milestones,d as observer,j as observerMap,m as observerTrack,a as place,x as references,v as roads,f as soundTrack,C as sources,l as sway,p as tags,o as time,s as timeZone,y as timeline,k as traces,i as utcOffsetHours,h as vehicle,e as version,b as weather,S as weatherSource,g as weatherTrack};
|
package/dist-embed-sighting-editor/{SightingFileEditor-Dd7giSWi.js → SightingFileEditor-CiwT0fmr.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Vc from"./sightingSchema-
|
|
1
|
+
import Vc from"./sightingSchema-Bsub_0vA.js";let Es=[],Ul=[];(()=>{let s="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,1n,9,16,o,,x,1i,3,,i,,7,a,2,t,3,1k,,,7,2,2,2,3,9,,a,2,q,,2,3,1k,,,5,4,2,2,3,3,,u,2,3,,b,3,1k,,,8,,3,,3,k,2,m,6,,3,1k,,,7,2,2,2,3,7,3,a,2,u,,1n,5,3,3,,4,9,,14,5,1j,,,7,,3,,4,7,2,b,2,t,3,1k,,,7,,3,,4,7,2,b,2,f,,c,4,1j,2,,7,,3,,4,9,,a,2,t,3,1y,,4,6,,,,8,i,2,1p,,,8,c,8,2q,,,a,b,7,21,2,r,,,,,,4,2,1d,k,,2,5,b,,10,9,,2u,b,,6,n,4,4,3,g,4,d,,,3,6,,f,,jj,3,qa,4,s,3,t,2,u,2,1s,w,9,,19,3,,,39,2,y,,3a,c,4,c,63,5,1l,a,,,,,2,o,2,,1c,1a,2,c,k,5,1b,h,12,9,c,3,u,d,1k,e,1c,k,48,3,,l,4,,6,,2,3,5i,1s,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,n,5,4,,2b,2,1e,i,q,i,d,,12,8,p,d,18,4,1b,e,10,,1v,e,c,,8,2,1a,,1f,,,3,2,2,5,2,,,15,5,5,2,6k,8,,2,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,1t,5,8t,2,25,6,1y,b,1d,4,3e,3,1h,f,15,,2,2,a,4,19,b,7,,1p,3,10,e,g,2,18,,c,3,1c,e,8,4,,2,2k,c,6,,2,,4d,c,l,4,1j,2,,7,2,2,2,3,9,,a,2,2,7,3,5,1v,9,,,2,,,4,,5,,,e,2,2a,i,n,,29,k,6j,7,2,9,r,2,2a,h,2y,d,2t,3,2,a,74,f,6t,6,,2,2,4,,,,2,3x,7,2,7,3,,s,a,14,7,,4,8,,9,b,1a,g,5i,8,5j,8,,8,2a,m,,e,3e,6,3,,,2,,7,,,1u,5,,2,,5,9n,4,9,2,,,1c,7,3,5,n,,44l,,6,f,8ug,i,1xc,5,1n,7,t4,,,1j,7,4,29,,b,2,f57,2,3mp,1a,2,n,f2,5,3,6,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,2s,,4g,7,af,,1p,4,e4,4,72,2,6r,,2,,7,2,5,,d6,7,31,7,240,5".split(",").map(t=>t?parseInt(t,36):1);for(let t=0,e=0;t<s.length;t++)(t%2?Ul:Es).push(e=e+s[t])})();function zc(s){if(s<768)return!1;for(let t=0,e=Es.length;;){let i=t+e>>1;if(s<Es[i])e=i;else if(s>=Ul[i])t=i+1;else return!0;if(t==e)return!1}}function ro(s){return s>=127462&&s<=127487}const oo=8205;function $c(s,t,e=!0,i=!0){return(e?Gl:qc)(s,t,i)}function Gl(s,t,e){if(t==s.length)return t;t&&Yl(s.charCodeAt(t))&&Ql(s.charCodeAt(t-1))&&t--;let i=os(s,t);for(t+=lo(i);t<s.length;){let n=os(s,t);if(i==oo||n==oo||e&&zc(n))t+=lo(n),i=n;else if(ro(n)){let r=0,o=t-2;for(;o>=0&&ro(os(s,o));)r++,o-=2;if(r%2==0)break;t+=2}else break}return t}function qc(s,t,e){for(;t>1;){let i=Gl(s,t-2,e);if(i<t)return i;t--}return 0}function os(s,t){let e=s.charCodeAt(t);if(!Ql(e)||t+1==s.length)return e;let i=s.charCodeAt(t+1);return Yl(i)?(e-55296<<10)+(i-56320)+65536:e}function Yl(s){return s>=56320&&s<57344}function Ql(s){return s>=55296&&s<56320}function lo(s){return s<65536?1:2}class W{lineAt(t){if(t<0||t>this.length)throw new RangeError(`Invalid position ${t} in document of length ${this.length}`);return this.lineInner(t,!1,1,0)}line(t){if(t<1||t>this.lines)throw new RangeError(`Invalid line number ${t} in ${this.lines}-line document`);return this.lineInner(t,!0,1,0)}replace(t,e,i){[t,e]=Je(this,t,e);let n=[];return this.decompose(0,t,n,2),i.length&&i.decompose(0,i.length,n,3),this.decompose(e,this.length,n,1),Ut.from(n,this.length-(e-t)+i.length)}append(t){return this.replace(this.length,this.length,t)}slice(t,e=this.length){[t,e]=Je(this,t,e);let i=[];return this.decompose(t,e,i,0),Ut.from(i,e-t)}eq(t){if(t==this)return!0;if(t.length!=this.length||t.lines!=this.lines)return!1;let e=this.scanIdentical(t,1),i=this.length-this.scanIdentical(t,-1),n=new di(this),r=new di(t);for(let o=e,l=e;;){if(n.next(o),r.next(o),o=0,n.lineBreak!=r.lineBreak||n.done!=r.done||n.value!=r.value)return!1;if(l+=n.value.length,n.done||l>=i)return!0}}iter(t=1){return new di(this,t)}iterRange(t,e=this.length){return new Xl(this,t,e)}iterLines(t,e){let i;if(t==null)i=this.iter();else{e==null&&(e=this.lines+1);let n=this.line(t).from;i=this.iterRange(n,Math.max(n,e==this.lines+1?this.length:e<=1?0:this.line(e-1).to))}return new _l(i)}toString(){return this.sliceString(0)}toJSON(){let t=[];return this.flatten(t),t}constructor(){}static of(t){if(t.length==0)throw new RangeError("A document must have at least one line");return t.length==1&&!t[0]?W.empty:t.length<=32?new Q(t):Ut.from(Q.split(t,[]))}}class Q extends W{constructor(t,e=jc(t)){super(),this.text=t,this.length=e}get lines(){return this.text.length}get children(){return null}lineInner(t,e,i,n){for(let r=0;;r++){let o=this.text[r],l=n+o.length;if((e?i:l)>=t)return new Kc(n,l,i,o);n=l+1,i++}}decompose(t,e,i,n){let r=t<=0&&e>=this.length?this:new Q(ao(this.text,t,e),Math.min(e,this.length)-Math.max(0,t));if(n&1){let o=i.pop(),l=hn(r.text,o.text.slice(),0,r.length);if(l.length<=32)i.push(new Q(l,o.length+r.length));else{let a=l.length>>1;i.push(new Q(l.slice(0,a)),new Q(l.slice(a)))}}else i.push(r)}replace(t,e,i){if(!(i instanceof Q))return super.replace(t,e,i);[t,e]=Je(this,t,e);let n=hn(this.text,hn(i.text,ao(this.text,0,t)),e),r=this.length+i.length-(e-t);return n.length<=32?new Q(n,r):Ut.from(Q.split(n,[]),r)}sliceString(t,e=this.length,i=`
|
|
2
2
|
`){[t,e]=Je(this,t,e);let n="";for(let r=0,o=0;r<=e&&o<this.text.length;o++){let l=this.text[o],a=r+l.length;r>t&&o&&(n+=i),t<a&&e>r&&(n+=l.slice(Math.max(0,t-r),e-r)),r=a+1}return n}flatten(t){for(let e of this.text)t.push(e)}scanIdentical(){return 0}static split(t,e){let i=[],n=-1;for(let r of t)i.push(r),n+=r.length+1,i.length==32&&(e.push(new Q(i,n)),i=[],n=-1);return n>-1&&e.push(new Q(i,n)),e}}class Ut extends W{constructor(t,e){super(),this.children=t,this.length=e,this.lines=0;for(let i of t)this.lines+=i.lines}lineInner(t,e,i,n){for(let r=0;;r++){let o=this.children[r],l=n+o.length,a=i+o.lines-1;if((e?a:l)>=t)return o.lineInner(t,e,i,n);n=l+1,i=a+1}}decompose(t,e,i,n){for(let r=0,o=0;o<=e&&r<this.children.length;r++){let l=this.children[r],a=o+l.length;if(t<=a&&e>=o){let h=n&((o<=t?1:0)|(a>=e?2:0));o>=t&&a<=e&&!h?i.push(l):l.decompose(t-o,e-o,i,h)}o=a+1}}replace(t,e,i){if([t,e]=Je(this,t,e),i.lines<this.lines)for(let n=0,r=0;n<this.children.length;n++){let o=this.children[n],l=r+o.length;if(t>=r&&e<=l){let a=o.replace(t-r,e-r,i),h=this.lines-o.lines+a.lines;if(a.lines<h>>4&&a.lines>h>>6){let c=this.children.slice();return c[n]=a,new Ut(c,this.length-(e-t)+i.length)}return super.replace(r,l,a)}r=l+1}return super.replace(t,e,i)}sliceString(t,e=this.length,i=`
|
|
3
3
|
`){[t,e]=Je(this,t,e);let n="";for(let r=0,o=0;r<this.children.length&&o<=e;r++){let l=this.children[r],a=o+l.length;o>t&&r&&(n+=i),t<a&&e>o&&(n+=l.sliceString(t-o,e-o,i)),o=a+1}return n}flatten(t){for(let e of this.children)e.flatten(t)}scanIdentical(t,e){if(!(t instanceof Ut))return 0;let i=0,[n,r,o,l]=e>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;n+=e,r+=e){if(n==o||r==l)return i;let a=this.children[n],h=t.children[r];if(a!=h)return i+a.scanIdentical(h,e);i+=a.length+1}}static from(t,e=t.reduce((i,n)=>i+n.length+1,-1)){let i=0;for(let d of t)i+=d.lines;if(i<32){let d=[];for(let p of t)p.flatten(d);return new Q(d,e)}let n=Math.max(32,i>>5),r=n<<1,o=n>>1,l=[],a=0,h=-1,c=[];function f(d){let p;if(d.lines>r&&d instanceof Ut)for(let m of d.children)f(m);else d.lines>o&&(a>o||!a)?(u(),l.push(d)):d instanceof Q&&a&&(p=c[c.length-1])instanceof Q&&d.lines+p.lines<=32?(a+=d.lines,h+=d.length+1,c[c.length-1]=new Q(p.text.concat(d.text),p.length+1+d.length)):(a+d.lines>n&&u(),a+=d.lines,h+=d.length+1,c.push(d))}function u(){a!=0&&(l.push(c.length==1?c[0]:Ut.from(c,h)),h=-1,a=c.length=0)}for(let d of t)f(d);return u(),l.length==1?l[0]:new Ut(l,e)}}W.empty=new Q([""],0);function jc(s){let t=-1;for(let e of s)t+=e.length+1;return t}function hn(s,t,e=0,i=1e9){for(let n=0,r=0,o=!0;r<s.length&&n<=i;r++){let l=s[r],a=n+l.length;a>=e&&(a>i&&(l=l.slice(0,i-n)),n<e&&(l=l.slice(e-n)),o?(t[t.length-1]+=l,o=!1):t.push(l)),n=a+1}return t}function ao(s,t,e){return hn(s,[""],t,e)}class di{constructor(t,e=1){this.dir=e,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[t],this.offsets=[e>0?1:(t instanceof Q?t.text.length:t.children.length)<<1]}nextInner(t,e){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,n=this.nodes[i],r=this.offsets[i],o=r>>1,l=n instanceof Q?n.text.length:n.children.length;if(o==(e>0?l:0)){if(i==0)return this.done=!0,this.value="",this;e>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((r&1)==(e>0?0:1)){if(this.offsets[i]+=e,t==0)return this.lineBreak=!0,this.value=`
|
|
4
4
|
`,this;t--}else if(n instanceof Q){let a=n.text[o+(e<0?-1:0)];if(this.offsets[i]+=e,a.length>Math.max(0,t))return this.value=t==0?a:e>0?a.slice(t):a.slice(0,a.length-t),this;t-=a.length}else{let a=n.children[o+(e<0?-1:0)];t>a.length?(t-=a.length,this.offsets[i]+=e):(e<0&&this.offsets[i]--,this.nodes.push(a),this.offsets.push(e>0?1:(a instanceof Q?a.text.length:a.children.length)<<1))}}}next(t=0){return t<0&&(this.nextInner(-t,-this.dir),t=this.value.length),this.nextInner(t,this.dir)}}class Xl{constructor(t,e,i){this.value="",this.done=!1,this.cursor=new di(t,e>i?-1:1),this.pos=e>i?t.length:0,this.from=Math.min(e,i),this.to=Math.max(e,i)}nextInner(t,e){if(e<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;t+=Math.max(0,e<0?this.pos-this.to:this.from-this.pos);let i=e<0?this.pos-this.from:this.to-this.pos;t>i&&(t=i),i-=t;let{value:n}=this.cursor.next(t);return this.pos+=(n.length+t)*e,this.value=n.length<=i?n:e<0?n.slice(n.length-i):n.slice(0,i),this.done=!this.value,this}next(t=0){return t<0?t=Math.max(t,this.from-this.pos):t>0&&(t=Math.min(t,this.to-this.pos)),this.nextInner(t,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class _l{constructor(t){this.inner=t,this.afterBreak=!0,this.value="",this.done=!1}next(t=0){let{done:e,lineBreak:i,value:n}=this.inner.next(t);return e&&this.afterBreak?(this.value="",this.afterBreak=!1):e?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=n,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(W.prototype[Symbol.iterator]=function(){return this.iter()},di.prototype[Symbol.iterator]=Xl.prototype[Symbol.iterator]=_l.prototype[Symbol.iterator]=function(){return this});class Kc{constructor(t,e,i,n){this.from=t,this.to=e,this.number=i,this.text=n}get length(){return this.to-this.from}}function Je(s,t,e){return t=Math.max(0,Math.min(s.length,t)),[t,Math.max(t,Math.min(s.length,e))]}function lt(s,t,e=!0,i=!0){return $c(s,t,e,i)}function Uc(s){return s>=56320&&s<57344}function Gc(s){return s>=55296&&s<56320}function St(s,t){let e=s.charCodeAt(t);if(!Gc(e)||t+1==s.length)return e;let i=s.charCodeAt(t+1);return Uc(i)?(e-55296<<10)+(i-56320)+65536:e}function Jl(s){return s<=65535?String.fromCharCode(s):(s-=65536,String.fromCharCode((s>>10)+55296,(s&1023)+56320))}function ie(s){return s<65536?1:2}const Is=/\r\n?|\n/;var ft=(function(s){return s[s.Simple=0]="Simple",s[s.TrackDel=1]="TrackDel",s[s.TrackBefore=2]="TrackBefore",s[s.TrackAfter=3]="TrackAfter",s})(ft||(ft={}));class Zt{constructor(t){this.sections=t}get length(){let t=0;for(let e=0;e<this.sections.length;e+=2)t+=this.sections[e];return t}get newLength(){let t=0;for(let e=0;e<this.sections.length;e+=2){let i=this.sections[e+1];t+=i<0?this.sections[e]:i}return t}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(t){for(let e=0,i=0,n=0;e<this.sections.length;){let r=this.sections[e++],o=this.sections[e++];o<0?(t(i,n,r),n+=r):n+=o,i+=r}}iterChangedRanges(t,e=!1){Ns(this,t,e)}get invertedDesc(){let t=[];for(let e=0;e<this.sections.length;){let i=this.sections[e++],n=this.sections[e++];n<0?t.push(i,n):t.push(n,i)}return new Zt(t)}composeDesc(t){return this.empty?t:t.empty?this:Zl(this,t)}mapDesc(t,e=!1){return t.empty?this:Hs(this,t,e)}mapPos(t,e=-1,i=ft.Simple){let n=0,r=0;for(let o=0;o<this.sections.length;){let l=this.sections[o++],a=this.sections[o++],h=n+l;if(a<0){if(h>t)return r+(t-n);r+=l}else{if(i!=ft.Simple&&h>=t&&(i==ft.TrackDel&&n<t&&h>t||i==ft.TrackBefore&&n<t||i==ft.TrackAfter&&h>t))return null;if(h>t||h==t&&e<0&&!l)return t==n||e<0?r:r+a;r+=a}n=h}if(t>n)throw new RangeError(`Position ${t} is out of range for changeset of length ${n}`);return r}touchesRange(t,e=t){for(let i=0,n=0;i<this.sections.length&&n<=e;){let r=this.sections[i++],o=this.sections[i++],l=n+r;if(o>=0&&n<=e&&l>=t)return n<t&&l>e?"cover":!0;n=l}return!1}toString(){let t="";for(let e=0;e<this.sections.length;){let i=this.sections[e++],n=this.sections[e++];t+=(t?" ":"")+i+(n>=0?":"+n:"")}return t}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some(e=>typeof e!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Zt(t)}static create(t){return new Zt(t)}}class _ extends Zt{constructor(t,e){super(t),this.inserted=e}apply(t){if(this.length!=t.length)throw new RangeError("Applying change set to a document with the wrong length");return Ns(this,(e,i,n,r,o)=>t=t.replace(n,n+(i-e),o),!1),t}mapDesc(t,e=!1){return Hs(this,t,e,!0)}invert(t){let e=this.sections.slice(),i=[];for(let n=0,r=0;n<e.length;n+=2){let o=e[n],l=e[n+1];if(l>=0){e[n]=l,e[n+1]=o;let a=n>>1;for(;i.length<a;)i.push(W.empty);i.push(o?t.slice(r,r+o):W.empty)}r+=o}return new _(e,i)}compose(t){return this.empty?t:t.empty?this:Zl(this,t,!0)}map(t,e=!1){return t.empty?this:Hs(this,t,e,!0)}iterChanges(t,e=!1){Ns(this,t,e)}get desc(){return Zt.create(this.sections)}filter(t){let e=[],i=[],n=[],r=new ki(this);t:for(let o=0,l=0;;){let a=o==t.length?1e9:t[o++];for(;l<a||l==a&&r.len==0;){if(r.done)break t;let c=Math.min(r.len,a-l);ot(n,c,-1);let f=r.ins==-1?-1:r.off==0?r.ins:0;ot(e,c,f),f>0&&me(i,e,r.text),r.forward(c),l+=c}let h=t[o++];for(;l<h;){if(r.done)break t;let c=Math.min(r.len,h-l);ot(e,c,-1),ot(n,c,r.ins==-1?-1:r.off==0?r.ins:0),r.forward(c),l+=c}}return{changes:new _(e,i),filtered:Zt.create(n)}}toJSON(){let t=[];for(let e=0;e<this.sections.length;e+=2){let i=this.sections[e],n=this.sections[e+1];n<0?t.push(i):n==0?t.push([i]):t.push([i].concat(this.inserted[e>>1].toJSON()))}return t}static of(t,e,i){let n=[],r=[],o=0,l=null;function a(c=!1){if(!c&&!n.length)return;o<e&&ot(n,e-o,-1);let f=new _(n,r);l=l?l.compose(f.map(l)):f,n=[],r=[],o=0}function h(c){if(Array.isArray(c))for(let f of c)h(f);else if(c instanceof _){if(c.length!=e)throw new RangeError(`Mismatched change set length (got ${c.length}, expected ${e})`);a(),l=l?l.compose(c.map(l)):c}else{let{from:f,to:u=f,insert:d}=c;if(f>u||f<0||u>e)throw new RangeError(`Invalid change range ${f} to ${u} (in doc of length ${e})`);let p=d?typeof d=="string"?W.of(d.split(i||Is)):d:W.empty,m=p.length;if(f==u&&m==0)return;f<o&&a(),f>o&&ot(n,f-o,-1),ot(n,u-f,m),me(r,n,p),o=u}}return h(t),a(!l),l}static empty(t){return new _(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw new RangeError("Invalid JSON representation of ChangeSet");let e=[],i=[];for(let n=0;n<t.length;n++){let r=t[n];if(typeof r=="number")e.push(r,-1);else{if(!Array.isArray(r)||typeof r[0]!="number"||r.some((o,l)=>l&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(r.length==1)e.push(r[0],0);else{for(;i.length<n;)i.push(W.empty);i[n]=W.of(r.slice(1)),e.push(r[0],i[n].length)}}}return new _(e,i)}static createSet(t,e){return new _(t,e)}}function ot(s,t,e,i=!1){if(t==0&&e<=0)return;let n=s.length-2;n>=0&&e<=0&&e==s[n+1]?s[n]+=t:n>=0&&t==0&&s[n]==0?s[n+1]+=e:i?(s[n]+=t,s[n+1]+=e):s.push(t,e)}function me(s,t,e){if(e.length==0)return;let i=t.length-2>>1;if(i<s.length)s[s.length-1]=s[s.length-1].append(e);else{for(;s.length<i;)s.push(W.empty);s.push(e)}}function Ns(s,t,e){let i=s.inserted;for(let n=0,r=0,o=0;o<s.sections.length;){let l=s.sections[o++],a=s.sections[o++];if(a<0)n+=l,r+=l;else{let h=n,c=r,f=W.empty;for(;h+=l,c+=a,a&&i&&(f=f.append(i[o-2>>1])),!(e||o==s.sections.length||s.sections[o+1]<0);)l=s.sections[o++],a=s.sections[o++];t(n,h,r,c,f),n=h,r=c}}}function Hs(s,t,e,i=!1){let n=[],r=i?[]:null,o=new ki(s),l=new ki(t);for(let a=-1;;){if(o.done&&l.len||l.done&&o.len)throw new Error("Mismatched change set lengths");if(o.ins==-1&&l.ins==-1){let h=Math.min(o.len,l.len);ot(n,h,-1),o.forward(h),l.forward(h)}else if(l.ins>=0&&(o.ins<0||a==o.i||o.off==0&&(l.len<o.len||l.len==o.len&&!e))){let h=l.len;for(ot(n,l.ins,-1);h;){let c=Math.min(o.len,h);o.ins>=0&&a<o.i&&o.len<=c&&(ot(n,0,o.ins),r&&me(r,n,o.text),a=o.i),o.forward(c),h-=c}l.next()}else if(o.ins>=0){let h=0,c=o.len;for(;c;)if(l.ins==-1){let f=Math.min(c,l.len);h+=f,c-=f,l.forward(f)}else if(l.ins==0&&l.len<c)c-=l.len,l.next();else break;ot(n,h,a<o.i?o.ins:0),r&&a<o.i&&me(r,n,o.text),a=o.i,o.forward(o.len-c)}else{if(o.done&&l.done)return r?_.createSet(n,r):Zt.create(n);throw new Error("Mismatched change set lengths")}}}function Zl(s,t,e=!1){let i=[],n=e?[]:null,r=new ki(s),o=new ki(t);for(let l=!1;;){if(r.done&&o.done)return n?_.createSet(i,n):Zt.create(i);if(r.ins==0)ot(i,r.len,0,l),r.next();else if(o.len==0&&!o.done)ot(i,0,o.ins,l),n&&me(n,i,o.text),o.next();else{if(r.done||o.done)throw new Error("Mismatched change set lengths");{let a=Math.min(r.len2,o.len),h=i.length;if(r.ins==-1){let c=o.ins==-1?-1:o.off?0:o.ins;ot(i,a,c,l),n&&c&&me(n,i,o.text)}else o.ins==-1?(ot(i,r.off?0:r.len,a,l),n&&me(n,i,r.textBit(a))):(ot(i,r.off?0:r.len,o.off?0:o.ins,l),n&&!o.off&&me(n,i,o.text));l=(r.ins>a||o.ins>=0&&o.len>a)&&(l||i.length>h),r.forward2(a),o.forward(a)}}}}class ki{constructor(t){this.set=t,this.i=0,this.next()}next(){let{sections:t}=this.set;this.i<t.length?(this.len=t[this.i++],this.ins=t[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:t}=this.set,e=this.i-2>>1;return e>=t.length?W.empty:t[e]}textBit(t){let{inserted:e}=this.set,i=this.i-2>>1;return i>=e.length&&!t?W.empty:e[i].slice(this.off,t==null?void 0:this.off+t)}forward(t){t==this.len?this.next():(this.len-=t,this.off+=t)}forward2(t){this.ins==-1?this.forward(t):t==this.ins?this.next():(this.ins-=t,this.off+=t)}}class de{constructor(t,e,i,n){this.from=t,this.to=e,this.flags=i,this.goalColumn=n}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get undirectional(){return(this.flags&64)>0}get bidiLevel(){let t=this.flags&7;return t==7?null:t}map(t,e=-1){let i,n;return this.empty?i=n=t.mapPos(this.from,e):(i=t.mapPos(this.from,1),n=t.mapPos(this.to,-1)),i==this.from&&n==this.to?this:new de(i,n,this.flags,this.goalColumn)}extend(t,e=t,i=0){if(t<=this.anchor&&e>=this.anchor)return x.range(t,e,void 0,void 0,i);let n=Math.abs(t-this.anchor)>Math.abs(e-this.anchor)?t:e;return x.range(this.anchor,n,void 0,void 0,i)}eq(t,e=!1){return this.anchor==t.anchor&&this.head==t.head&&this.goalColumn==t.goalColumn&&(!e||!this.empty||this.assoc==t.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(t){if(!t||typeof t.anchor!="number"||typeof t.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return x.range(t.anchor,t.head)}static create(t,e,i,n){return new de(t,e,i,n)}}class x{constructor(t,e){this.ranges=t,this.mainIndex=e}map(t,e=-1){return t.empty?this:x.create(this.ranges.map(i=>i.map(t,e)),this.mainIndex)}eq(t,e=!1){if(this.ranges.length!=t.ranges.length||this.mainIndex!=t.mainIndex)return!1;for(let i=0;i<this.ranges.length;i++)if(!this.ranges[i].eq(t.ranges[i],e))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new x([this.main],0)}addRange(t,e=!0){return x.create([t].concat(this.ranges),e?0:this.mainIndex+1)}replaceRange(t,e=this.mainIndex){let i=this.ranges.slice();return i[e]=t,x.create(i,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(t=>t.toJSON()),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||typeof t.main!="number"||t.main>=t.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new x(t.ranges.map(e=>de.fromJSON(e)),t.main)}static single(t,e=t){return new x([x.range(t,e)],0)}static create(t,e=0){if(t.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,n=0;n<t.length;n++){let r=t[n];if(r.empty?r.from<=i:r.from<i)return x.normalized(t.slice(),e);i=r.to}return new x(t,e)}static cursor(t,e=0,i,n){return de.create(t,t,(e==0?0:e<0?8:16)|(i==null?7:Math.min(6,i)),n)}static range(t,e,i,n,r){let o=n==null?7:Math.min(6,n);return!r&&t!=e&&(r=e<t?1:-1),r&&(o|=r<0?8:16),e<t?de.create(e,t,o|32,i):de.create(t,e,o,i)}static undirectionalRange(t,e){return de.create(t,e,64,void 0)}static normalized(t,e=0){let i=t[e];t.sort((n,r)=>n.from-r.from),e=t.indexOf(i);for(let n=1;n<t.length;n++){let r=t[n],o=t[n-1];if(r.empty?r.from<=o.to:r.from<o.to){let l=o.from,a=Math.max(r.to,o.to);n<=e&&e--,t.splice(--n,2,r.anchor>r.head?x.range(a,l):x.range(l,a))}}return new x(t,e)}}function ta(s,t){for(let e of s.ranges)if(e.to>t)throw new RangeError("Selection points outside of document")}let Ar=0;class M{constructor(t,e,i,n,r){this.combine=t,this.compareInput=e,this.compare=i,this.isStatic=n,this.id=Ar++,this.default=t([]),this.extensions=typeof r=="function"?r(this):r}get reader(){return this}static define(t={}){return new M(t.combine||(e=>e),t.compareInput||((e,i)=>e===i),t.compare||(t.combine?(e,i)=>e===i:Mr),!!t.static,t.enables)}of(t){return new cn([],this,0,t)}compute(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new cn(t,this,1,e)}computeN(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new cn(t,this,2,e)}from(t,e){return e||(e=i=>i),this.compute([t],i=>e(i.field(t)))}}function Mr(s,t){return s==t||s.length==t.length&&s.every((e,i)=>e===t[i])}class cn{constructor(t,e,i,n){this.dependencies=t,this.facet=e,this.type=i,this.value=n,this.id=Ar++}dynamicSlot(t){var e;let i=this.value,n=this.facet.compareInput,r=this.id,o=t[r]>>1,l=this.type==2,a=!1,h=!1,c=[];for(let f of this.dependencies)f=="doc"?a=!0:f=="selection"?h=!0:(((e=t[f.id])!==null&&e!==void 0?e:1)&1)==0&&c.push(t[f.id]);return{create(f){return f.values[o]=i(f),1},update(f,u){if(a&&u.docChanged||h&&(u.docChanged||u.selection)||Ws(f,c)){let d=i(f);if(l?!ho(d,f.values[o],n):!n(d,f.values[o]))return f.values[o]=d,1}return 0},reconfigure:(f,u)=>{let d,p=u.config.address[r];if(p!=null){let m=xn(u,p);if(this.dependencies.every(g=>g instanceof M?u.facet(g)===f.facet(g):g instanceof mt?u.field(g,!1)==f.field(g,!1):!0)||(l?ho(d=i(f),m,n):n(d=i(f),m)))return f.values[o]=m,0}else d=i(f);return f.values[o]=d,1}}}get extension(){return this}}function ho(s,t,e){if(s.length!=t.length)return!1;for(let i=0;i<s.length;i++)if(!e(s[i],t[i]))return!1;return!0}function Ws(s,t){let e=!1;for(let i of t)pi(s,i)&1&&(e=!0);return e}function Yc(s,t,e){let i=e.map(a=>s[a.id]),n=e.map(a=>a.type),r=i.filter(a=>!(a&1)),o=s[t.id]>>1;function l(a){let h=[];for(let c=0;c<i.length;c++){let f=xn(a,i[c]);if(n[c]==2)for(let u of f)h.push(u);else h.push(f)}return t.combine(h)}return{create(a){for(let h of i)pi(a,h);return a.values[o]=l(a),1},update(a,h){if(!Ws(a,r))return 0;let c=l(a);return t.compare(c,a.values[o])?0:(a.values[o]=c,1)},reconfigure(a,h){let c=Ws(a,i),f=h.config.facets[t.id],u=h.facet(t);if(f&&!c&&Mr(e,f))return a.values[o]=u,0;let d=l(a);return t.compare(d,u)?(a.values[o]=u,0):(a.values[o]=d,1)}}}const Vi=M.define({static:!0});class mt{constructor(t,e,i,n,r){this.id=t,this.createF=e,this.updateF=i,this.compareF=n,this.spec=r,this.provides=void 0}static define(t){let e=new mt(Ar++,t.create,t.update,t.compare||((i,n)=>i===n),t);return t.provide&&(e.provides=t.provide(e)),e}create(t){let e=t.facet(Vi).find(i=>i.field==this);return(e?.create||this.createF)(t)}slot(t){let e=t[this.id]>>1;return{create:i=>(i.values[e]=this.create(i),1),update:(i,n)=>{let r=i.values[e],o=this.updateF(r,n);return this.compareF(r,o)?0:(i.values[e]=o,1)},reconfigure:(i,n)=>{let r=i.facet(Vi),o=n.facet(Vi),l;return(l=r.find(a=>a.field==this))&&l!=o.find(a=>a.field==this)?(i.values[e]=l.create(i),1):n.config.address[this.id]!=null?(i.values[e]=n.field(this),0):(i.values[e]=this.create(i),1)}}}init(t){return[this,Vi.of({field:this,create:t})]}get extension(){return this}}const Te={lowest:4,low:3,default:2,high:1,highest:0};function oi(s){return t=>new ea(t,s)}const si={highest:oi(Te.highest),high:oi(Te.high),default:oi(Te.default),low:oi(Te.low),lowest:oi(Te.lowest)};class ea{constructor(t,e){this.inner=t,this.prec=e}get extension(){return this}}class $n{of(t){return new Fs(this,t)}reconfigure(t){return $n.reconfigure.of({compartment:this,extension:t})}get(t){return t.config.compartments.get(this)}}class Fs{constructor(t,e){this.compartment=t,this.inner=e}get extension(){return this}}class bn{constructor(t,e,i,n,r,o){for(this.base=t,this.compartments=e,this.dynamicSlots=i,this.address=n,this.staticValues=r,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<i.length;)this.statusTemplate.push(0)}staticFacet(t){let e=this.address[t.id];return e==null?t.default:this.staticValues[e>>1]}static resolve(t,e,i){let n=[],r=Object.create(null),o=new Map;for(let u of Qc(t,e,o))u instanceof mt?n.push(u):(r[u.facet.id]||(r[u.facet.id]=[])).push(u);let l=Object.create(null),a=[],h=[];for(let u of n)l[u.id]=h.length<<1,h.push(d=>u.slot(d));let c=i?.config.facets;for(let u in r){let d=r[u],p=d[0].facet,m=c&&c[u]||[];if(d.every(g=>g.type==0))if(l[p.id]=a.length<<1|1,Mr(m,d))a.push(i.facet(p));else{let g=p.combine(d.map(y=>y.value));a.push(i&&p.compare(g,i.facet(p))?i.facet(p):g)}else{for(let g of d)g.type==0?(l[g.id]=a.length<<1|1,a.push(g.value)):(l[g.id]=h.length<<1,h.push(y=>g.dynamicSlot(y)));l[p.id]=h.length<<1,h.push(g=>Yc(g,p,d))}}let f=h.map(u=>u(l));return new bn(t,o,f,l,a,r)}}function Qc(s,t,e){let i=[[],[],[],[],[]],n=new Map;function r(o,l){let a=n.get(o);if(a!=null){if(a<=l)return;let h=i[a].indexOf(o);h>-1&&i[a].splice(h,1),o instanceof Fs&&e.delete(o.compartment)}if(n.set(o,l),Array.isArray(o))for(let h of o)r(h,l);else if(o instanceof Fs){if(e.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let h=t.get(o.compartment)||o.inner;e.set(o.compartment,h),r(h,l)}else if(o instanceof ea)r(o.inner,o.prec);else if(o instanceof mt)i[l].push(o),o.provides&&r(o.provides,l);else if(o instanceof cn)i[l].push(o),o.facet.extensions&&r(o.facet.extensions,Te.default);else{let h=o.extension;if(!h)throw new Error(`Unrecognized extension value in extension set (${o}).`);if(h==o)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);r(h,l)}}return r(s,Te.default),i.reduce((o,l)=>o.concat(l))}function pi(s,t){if(t&1)return 2;let e=t>>1,i=s.status[e];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;s.status[e]=4;let n=s.computeSlot(s,s.config.dynamicSlots[e]);return s.status[e]=2|n}function xn(s,t){return t&1?s.config.staticValues[t>>1]:s.values[t>>1]}const ia=M.define(),Vs=M.define({combine:s=>s.some(t=>t),static:!0}),na=M.define({combine:s=>s.length?s[0]:void 0,static:!0}),sa=M.define(),ra=M.define(),oa=M.define(),la=M.define({combine:s=>s.length?s[0]:!1});class ae{constructor(t,e){this.type=t,this.value=e}static define(){return new Xc}}class Xc{of(t){return new ae(this,t)}}class _c{constructor(t){this.map=t}of(t){return new I(this,t)}}class I{constructor(t,e){this.type=t,this.value=e}map(t){let e=this.type.map(this.value,t);return e===void 0?void 0:e==this.value?this:new I(this.type,e)}is(t){return this.type==t}static define(t={}){return new _c(t.map||(e=>e))}static mapEffects(t,e){if(!t.length)return t;let i=[];for(let n of t){let r=n.map(e);r&&i.push(r)}return i}}I.reconfigure=I.define();I.appendConfig=I.define();class J{constructor(t,e,i,n,r,o){this.startState=t,this.changes=e,this.selection=i,this.effects=n,this.annotations=r,this.scrollIntoView=o,this._doc=null,this._state=null,i&&ta(i,e.newLength),r.some(l=>l.type==J.time)||(this.annotations=r.concat(J.time.of(Date.now())))}static create(t,e,i,n,r,o){return new J(t,e,i,n,r,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(t){for(let e of this.annotations)if(e.type==t)return e.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let e=this.annotation(J.userEvent);return!!(e&&(e==t||e.length>t.length&&e.slice(0,t.length)==t&&e[t.length]=="."))}}J.time=ae.define();J.userEvent=ae.define();J.addToHistory=ae.define();J.remote=ae.define();function Jc(s,t){let e=[];for(let i=0,n=0;;){let r,o;if(i<s.length&&(n==t.length||t[n]>=s[i]))r=s[i++],o=s[i++];else if(n<t.length)r=t[n++],o=t[n++];else return e;!e.length||e[e.length-1]<r?e.push(r,o):e[e.length-1]<o&&(e[e.length-1]=o)}}function aa(s,t,e){var i;let n,r,o;return e?(n=t.changes,r=_.empty(t.changes.length),o=s.changes.compose(t.changes)):(n=t.changes.map(s.changes),r=s.changes.mapDesc(t.changes,!0),o=s.changes.compose(n)),{changes:o,selection:t.selection?t.selection.map(r):(i=s.selection)===null||i===void 0?void 0:i.map(n),effects:I.mapEffects(s.effects,n).concat(I.mapEffects(t.effects,r)),annotations:s.annotations.length?s.annotations.concat(t.annotations):t.annotations,scrollIntoView:s.scrollIntoView||t.scrollIntoView}}function zs(s,t,e){let i=t.selection,n=Ue(t.annotations);return t.userEvent&&(n=n.concat(J.userEvent.of(t.userEvent))),{changes:t.changes instanceof _?t.changes:_.of(t.changes||[],e,s.facet(na)),selection:i&&(i instanceof x?i:x.single(i.anchor,i.head)),effects:Ue(t.effects),annotations:n,scrollIntoView:!!t.scrollIntoView}}function ha(s,t,e){let i=zs(s,t.length?t[0]:{},s.doc.length);t.length&&t[0].filter===!1&&(e=!1);for(let r=1;r<t.length;r++){t[r].filter===!1&&(e=!1);let o=!!t[r].sequential;i=aa(i,zs(s,t[r],o?i.changes.newLength:s.doc.length),o)}let n=J.create(s,i.changes,i.selection,i.effects,i.annotations,i.scrollIntoView);return tf(e?Zc(n):n)}function Zc(s){let t=s.startState,e=!0;for(let n of t.facet(sa)){let r=n(s);if(r===!1){e=!1;break}Array.isArray(r)&&(e=e===!0?r:Jc(e,r))}if(e!==!0){let n,r;if(e===!1)r=s.changes.invertedDesc,n=_.empty(t.doc.length);else{let o=s.changes.filter(e);n=o.changes,r=o.filtered.mapDesc(o.changes).invertedDesc}s=J.create(t,n,s.selection&&s.selection.map(r),I.mapEffects(s.effects,r),s.annotations,s.scrollIntoView)}let i=t.facet(ra);for(let n=i.length-1;n>=0;n--){let r=i[n](s);r instanceof J?s=r:Array.isArray(r)&&r.length==1&&r[0]instanceof J?s=r[0]:s=ha(t,Ue(r),!1)}return s}function tf(s){let t=s.startState,e=t.facet(oa),i=s;for(let n=e.length-1;n>=0;n--){let r=e[n](s);r&&Object.keys(r).length&&(i=aa(i,zs(t,r,s.changes.newLength),!0))}return i==s?s:J.create(t,s.changes,s.selection,i.effects,i.annotations,i.scrollIntoView)}const ef=[];function Ue(s){return s==null?ef:Array.isArray(s)?s:[s]}var Tt=(function(s){return s[s.Word=0]="Word",s[s.Space=1]="Space",s[s.Other=2]="Other",s})(Tt||(Tt={}));const nf=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let $s;try{$s=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function sf(s){if($s)return $s.test(s);for(let t=0;t<s.length;t++){let e=s[t];if(/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||nf.test(e)))return!0}return!1}function rf(s){return t=>{if(!/\S/.test(t))return Tt.Space;if(sf(t))return Tt.Word;for(let e=0;e<s.length;e++)if(t.indexOf(s[e])>-1)return Tt.Word;return Tt.Other}}class V{constructor(t,e,i,n,r,o){this.config=t,this.doc=e,this.selection=i,this.values=n,this.status=t.statusTemplate.slice(),this.computeSlot=r,o&&(o._state=this);for(let l=0;l<this.config.dynamicSlots.length;l++)pi(this,l<<1);this.computeSlot=null}field(t,e=!0){let i=this.config.address[t.id];if(i==null){if(e)throw new RangeError("Field is not present in this state");return}return pi(this,i),xn(this,i)}update(...t){return ha(this,t,!0)}applyTransaction(t){let e=this.config,{base:i,compartments:n}=e;for(let l of t.effects)l.is($n.reconfigure)?(e&&(n=new Map,e.compartments.forEach((a,h)=>n.set(h,a)),e=null),n.set(l.value.compartment,l.value.extension)):l.is(I.reconfigure)?(e=null,i=l.value):l.is(I.appendConfig)&&(e=null,i=Ue(i).concat(l.value));let r;e?r=t.startState.values.slice():(e=bn.resolve(i,n,this),r=new V(e,this.doc,this.selection,e.dynamicSlots.map(()=>null),(a,h)=>h.reconfigure(a,this),null).values);let o=t.startState.facet(Vs)?t.newSelection:t.newSelection.asSingle();new V(e,t.newDoc,o,r,(l,a)=>a.update(l,t),t)}replaceSelection(t){return typeof t=="string"&&(t=this.toText(t)),this.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:t},range:x.cursor(e.from+t.length)}))}changeByRange(t){let e=this.selection,i=t(e.ranges[0]),n=this.changes(i.changes),r=[i.range],o=Ue(i.effects);for(let l=1;l<e.ranges.length;l++){let a=t(e.ranges[l]),h=this.changes(a.changes),c=h.map(n);for(let u=0;u<l;u++)r[u]=r[u].map(c);let f=n.mapDesc(h,!0);r.push(a.range.map(f)),n=n.compose(c),o=I.mapEffects(o,c).concat(I.mapEffects(Ue(a.effects),f))}return{changes:n,selection:x.create(r,e.mainIndex),effects:o}}changes(t=[]){return t instanceof _?t:_.of(t,this.doc.length,this.facet(V.lineSeparator))}toText(t){return W.of(t.split(this.facet(V.lineSeparator)||Is))}sliceDoc(t=0,e=this.doc.length){return this.doc.sliceString(t,e,this.lineBreak)}facet(t){let e=this.config.address[t.id];return e==null?t.default:(pi(this,e),xn(this,e))}toJSON(t){let e={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(t)for(let i in t){let n=t[i];n instanceof mt&&this.config.address[n.id]!=null&&(e[i]=n.spec.toJSON(this.field(t[i]),this))}return e}static fromJSON(t,e={},i){if(!t||typeof t.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let n=[];if(i){for(let r in i)if(Object.prototype.hasOwnProperty.call(t,r)){let o=i[r],l=t[r];n.push(o.init(a=>o.spec.fromJSON(l,a)))}}return V.create({doc:t.doc,selection:x.fromJSON(t.selection),extensions:e.extensions?n.concat([e.extensions]):n})}static create(t={}){let e=bn.resolve(t.extensions||[],new Map),i=t.doc instanceof W?t.doc:W.of((t.doc||"").split(e.staticFacet(V.lineSeparator)||Is)),n=t.selection?t.selection instanceof x?t.selection:x.single(t.selection.anchor,t.selection.head):x.single(0);return ta(n,i.length),e.staticFacet(Vs)||(n=n.asSingle()),new V(e,i,n,e.dynamicSlots.map(()=>null),(r,o)=>o.create(r),null)}get tabSize(){return this.facet(V.tabSize)}get lineBreak(){return this.facet(V.lineSeparator)||`
|