@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.
- package/dist-embed-interview/rr0-interview.mjs +8 -7
- package/dist-embed-scene/{AdsbLolArchiveProvider-Ju7E64iO.js → AdsbLolArchiveProvider-CL1XUape.js} +1 -1
- package/dist-embed-scene/{ContrailSystem-BlsY0hsn.js → ContrailSystem-CG5BhBF7.js} +1 -1
- package/dist-embed-scene/GLTFLoader-CowOlg4J.js +1 -0
- package/dist-embed-scene/{HeadlightSystem-k2VkX7hN.js → HeadlightSystem-OwCRe0Vs.js} +1 -1
- package/dist-embed-scene/RailwaySystem-usuVIAY1.js +41 -0
- package/dist-embed-scene/{RoadMarkings-Bd5i68iF.js → RoadMarkings-DbE4nCJ2.js} +1 -1
- package/dist-embed-scene/SceneNames_es-B9tudMDH.js +1 -0
- package/dist-embed-scene/SceneNames_fr-DAd-g0yB.js +1 -0
- package/dist-embed-scene/SceneNames_it-BLLX--oG.js +1 -0
- package/dist-embed-scene/{TraceSystem-D2DpL5Qj.js → TraceSystem-B9WBM9ut.js} +1 -1
- package/dist-embed-scene/WaterSystem-yC8sKIc5.js +1 -0
- package/dist-embed-scene/rr0-scene.mjs +374 -334
- package/dist-embed-scene/sightingSchema-v2l1p6Ld.js +1 -0
- package/dist-embed-sighting/{AdsbLolArchiveProvider-BUE3bdCg.js → AdsbLolArchiveProvider-DvCD0VGc.js} +1 -1
- package/dist-embed-sighting/ContrailSystem-XVzDvxFV.js +1 -0
- package/dist-embed-sighting/GLTFLoader-DjN5_ISf.js +1 -0
- package/dist-embed-sighting/{HeadlightSystem-DmXqrF-e.js → HeadlightSystem-BAkFE-MU.js} +1 -1
- package/dist-embed-sighting/RailwaySystem-BMOTAo7T.js +41 -0
- package/dist-embed-sighting/{RoadMarkings-C_046g21.js → RoadMarkings-DtoEUDmh.js} +1 -1
- package/dist-embed-sighting/SceneNames_es-VHJ-mGWu.js +1 -0
- package/dist-embed-sighting/SceneNames_fr-BtjbcaRx.js +1 -0
- package/dist-embed-sighting/SceneNames_it-Ck8f90Z6.js +1 -0
- package/dist-embed-sighting/{SightingMessages_es-C88y-33t.js → SightingMessages_es-OXYzPf-m.js} +1 -1
- package/dist-embed-sighting/{SightingMessages_fr-DC2iwVp3.js → SightingMessages_fr-ylqIoox7.js} +1 -1
- package/dist-embed-sighting/{SightingMessages_it-B5t71z1M.js → SightingMessages_it-B9f92W5s.js} +1 -1
- package/dist-embed-sighting/{TraceSystem-DxQWm8ZH.js → TraceSystem-DpokUmzt.js} +2 -2
- package/dist-embed-sighting/WaterSystem-BLt9Dsxc.js +1 -0
- package/dist-embed-sighting/rr0-sighting.mjs +379 -339
- package/dist-embed-sighting/sightingSchema-v2l1p6Ld.js +1 -0
- package/dist-embed-sighting-editor/{AdsbLolArchiveProvider-CFgVABcu.js → AdsbLolArchiveProvider-BtbGVTLo.js} +1 -1
- package/dist-embed-sighting-editor/{BodyEditor-Dg97ZrRa.js → BodyEditor-DinH26FA.js} +1 -1
- package/dist-embed-sighting-editor/ContrailSystem-Bh3PmOP9.js +1 -0
- package/dist-embed-sighting-editor/{CoverageAssessor-8zrC-ZY0.js → CoverageAssessor-DCGCl8ic.js} +1 -1
- package/dist-embed-sighting-editor/{GLTFLoader-RPFGUAaO.js → GLTFLoader-Bpggnw6G.js} +1 -1
- package/dist-embed-sighting-editor/{HeadlightSystem-DbRok2GO.js → HeadlightSystem-DOjC-oxf.js} +1 -1
- package/dist-embed-sighting-editor/HynekAssessor-DTuaJ9gE.js +1 -0
- package/dist-embed-sighting-editor/{InterviewEditorElement-DRjEJwEk.js → InterviewEditorElement-BRL8pvdi.js} +8 -7
- package/dist-embed-sighting-editor/{LaunchEditor-byu9U1W7.js → LaunchEditor-CFmH6y0N.js} +1 -1
- package/dist-embed-sighting-editor/ModelSource-SZRN-dar.js +1 -0
- package/dist-embed-sighting-editor/{ModelThumbnails-hmPAkRbd.js → ModelThumbnails-6N7NAP44.js} +1 -1
- package/dist-embed-sighting-editor/{ModelViewer-Mvug9CHB.js → ModelViewer-C_mVYZ1c.js} +1 -1
- package/dist-embed-sighting-editor/RailwaySystem-BTm6OfuJ.js +41 -0
- package/dist-embed-sighting-editor/{RoadMarkings-BKfyWjdC.js → RoadMarkings-AaLPDthv.js} +1 -1
- package/dist-embed-sighting-editor/SceneNames_es-4pppn42v.js +1 -0
- package/dist-embed-sighting-editor/SceneNames_fr-odZ6uYWU.js +1 -0
- package/dist-embed-sighting-editor/SceneNames_it-lXfB7y6i.js +1 -0
- package/dist-embed-sighting-editor/{SightingEditorMessages_es-DvIK6dPp.js → SightingEditorMessages_es-1QZ2n8km.js} +2 -2
- package/dist-embed-sighting-editor/{SightingEditorMessages_fr-Ds1GsY_1.js → SightingEditorMessages_fr-DAg8lRfr.js} +2 -2
- package/dist-embed-sighting-editor/{SightingEditorMessages_it-Y2D8aYCY.js → SightingEditorMessages_it-C2TQ7muu.js} +2 -2
- package/dist-embed-sighting-editor/{SightingFileEditor-C0NC8jbz.js → SightingFileEditor-7inIgp24.js} +1 -1
- package/dist-embed-sighting-editor/{TraceSystem-BMYhHoF0.js → TraceSystem-D8oL7SlQ.js} +2 -2
- package/dist-embed-sighting-editor/WaterSystem-1r0jEJ6E.js +1 -0
- package/dist-embed-sighting-editor/{caseSchema-BDFgjA8v.js → caseSchema-ByeWR3Rx.js} +1 -1
- package/dist-embed-sighting-editor/{interviewSchema-CMRZUnRy.js → interviewSchema-m_h5f8H0.js} +1 -1
- package/dist-embed-sighting-editor/rr0-sighting-editor.mjs +403 -425
- package/dist-embed-sighting-editor/sightingSchema-v2l1p6Ld.js +1 -0
- package/dist-embed-sighting-editor/surroundingsSources-98rSCu2Y.js +1 -0
- package/dist-embed-sighting-editor/{trafficRuntime-BtljEizX.js → trafficRuntime-Dk4XdgcY.js} +1 -1
- package/package.json +3 -1
- package/dist-embed-scene/GLTFLoader-BHGcTcu1.js +0 -1
- package/dist-embed-scene/SceneNames_es-b8rqu51e.js +0 -1
- package/dist-embed-scene/SceneNames_fr-sF9gfZV2.js +0 -1
- package/dist-embed-scene/SceneNames_it-CoR2S3bM.js +0 -1
- package/dist-embed-scene/sightingSchema-kkSSrggd.js +0 -1
- package/dist-embed-sighting/ContrailSystem-DjBzEFUl.js +0 -1
- package/dist-embed-sighting/GLTFLoader-DvLBfH-C.js +0 -1
- package/dist-embed-sighting/SceneNames_es-rKjN2baM.js +0 -1
- package/dist-embed-sighting/SceneNames_fr-CSUSeZT0.js +0 -1
- package/dist-embed-sighting/SceneNames_it-C-mVddAw.js +0 -1
- package/dist-embed-sighting/sightingSchema-kkSSrggd.js +0 -1
- package/dist-embed-sighting-editor/ContrailSystem-DSdLswxr.js +0 -1
- package/dist-embed-sighting-editor/HynekAssessor-9gYrshkH.js +0 -1
- package/dist-embed-sighting-editor/ModelSource-f1GhdDou.js +0 -1
- package/dist-embed-sighting-editor/SceneNames_es-cN-l95fv.js +0 -1
- package/dist-embed-sighting-editor/SceneNames_fr-ZUtpsigH.js +0 -1
- package/dist-embed-sighting-editor/SceneNames_it-DLqJc0Rc.js +0 -1
- package/dist-embed-sighting-editor/sightingSchema-kkSSrggd.js +0 -1
- package/dist-embed-sighting-editor/surroundingsSources-BtDVuj-U.js +0 -1
package/dist-embed-sighting-editor/{SightingFileEditor-C0NC8jbz.js → SightingFileEditor-7inIgp24.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Lf from"./sightingSchema-
|
|
1
|
+
import Lf from"./sightingSchema-v2l1p6Ld.js";let rr=[],Da=[];(()=>{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(e=>e?parseInt(e,36):1);for(let e=0,t=0;e<s.length;e++)(e%2?Da:rr).push(t=t+s[e])})();function Ef(s){if(s<768)return!1;for(let e=0,t=rr.length;;){let i=e+t>>1;if(s<rr[i])t=i;else if(s>=Da[i])e=i+1;else return!0;if(e==t)return!1}}function Vo(s){return s>=127462&&s<=127487}const zo=8205;function If(s,e,t=!0,i=!0){return(t?Ra:Nf)(s,e,i)}function Ra(s,e,t){if(e==s.length)return e;e&&Ba(s.charCodeAt(e))&&Pa(s.charCodeAt(e-1))&&e--;let i=Ds(s,e);for(e+=$o(i);e<s.length;){let n=Ds(s,e);if(i==zo||n==zo||t&&Ef(n))e+=$o(n),i=n;else if(Vo(n)){let r=0,o=e-2;for(;o>=0&&Vo(Ds(s,o));)r++,o-=2;if(r%2==0)break;e+=2}else break}return e}function Nf(s,e,t){for(;e>1;){let i=Ra(s,e-2,t);if(i<e)return i;e--}return 0}function Ds(s,e){let t=s.charCodeAt(e);if(!Pa(t)||e+1==s.length)return t;let i=s.charCodeAt(e+1);return Ba(i)?(t-55296<<10)+(i-56320)+65536:t}function Ba(s){return s>=56320&&s<57344}function Pa(s){return s>=55296&&s<56320}function $o(s){return s<65536?1:2}class F{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,i){[e,t]=ai(this,e,t);let n=[];return this.decompose(0,e,n,2),i.length&&i.decompose(0,i.length,n,3),this.decompose(t,this.length,n,1),Xe.from(n,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=ai(this,e,t);let i=[];return this.decompose(e,t,i,0),Xe.from(i,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),n=new vi(this),r=new vi(e);for(let o=t,l=t;;){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(e=1){return new vi(this,e)}iterRange(e,t=this.length){return new La(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let n=this.line(e).from;i=this.iterRange(n,Math.max(n,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new Ea(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?F.empty:e.length<=32?new _(e):Xe.from(_.split(e,[]))}}class _ extends F{constructor(e,t=Wf(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,n){for(let r=0;;r++){let o=this.text[r],l=n+o.length;if((t?i:l)>=e)return new Hf(n,l,i,o);n=l+1,i++}}decompose(e,t,i,n){let r=e<=0&&t>=this.length?this:new _(qo(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(n&1){let o=i.pop(),l=Cn(r.text,o.text.slice(),0,r.length);if(l.length<=32)i.push(new _(l,o.length+r.length));else{let a=l.length>>1;i.push(new _(l.slice(0,a)),new _(l.slice(a)))}}else i.push(r)}replace(e,t,i){if(!(i instanceof _))return super.replace(e,t,i);[e,t]=ai(this,e,t);let n=Cn(this.text,Cn(i.text,qo(this.text,0,e)),t),r=this.length+i.length-(t-e);return n.length<=32?new _(n,r):Xe.from(_.split(n,[]),r)}sliceString(e,t=this.length,i=`
|
|
2
2
|
`){[e,t]=ai(this,e,t);let n="";for(let r=0,o=0;r<=t&&o<this.text.length;o++){let l=this.text[o],a=r+l.length;r>e&&o&&(n+=i),e<a&&t>r&&(n+=l.slice(Math.max(0,e-r),t-r)),r=a+1}return n}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let i=[],n=-1;for(let r of e)i.push(r),n+=r.length+1,i.length==32&&(t.push(new _(i,n)),i=[],n=-1);return n>-1&&t.push(new _(i,n)),t}}class Xe extends F{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,t,i,n){for(let r=0;;r++){let o=this.children[r],l=n+o.length,a=i+o.lines-1;if((t?a:l)>=e)return o.lineInner(e,t,i,n);n=l+1,i=a+1}}decompose(e,t,i,n){for(let r=0,o=0;o<=t&&r<this.children.length;r++){let l=this.children[r],a=o+l.length;if(e<=a&&t>=o){let h=n&((o<=e?1:0)|(a>=t?2:0));o>=e&&a<=t&&!h?i.push(l):l.decompose(e-o,t-o,i,h)}o=a+1}}replace(e,t,i){if([e,t]=ai(this,e,t),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(e>=r&&t<=l){let a=o.replace(e-r,t-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 Xe(c,this.length-(t-e)+i.length)}return super.replace(r,l,a)}r=l+1}return super.replace(e,t,i)}sliceString(e,t=this.length,i=`
|
|
3
3
|
`){[e,t]=ai(this,e,t);let n="";for(let r=0,o=0;r<this.children.length&&o<=t;r++){let l=this.children[r],a=o+l.length;o>e&&r&&(n+=i),e<a&&t>o&&(n+=l.sliceString(e-o,t-o,i)),o=a+1}return n}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof Xe))return 0;let i=0,[n,r,o,l]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;n+=t,r+=t){if(n==o||r==l)return i;let a=this.children[n],h=e.children[r];if(a!=h)return i+a.scanIdentical(h,t);i+=a.length+1}}static from(e,t=e.reduce((i,n)=>i+n.length+1,-1)){let i=0;for(let d of e)i+=d.lines;if(i<32){let d=[];for(let p of e)p.flatten(d);return new _(d,t)}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 Xe)for(let m of d.children)f(m);else d.lines>o&&(a>o||!a)?(u(),l.push(d)):d instanceof _&&a&&(p=c[c.length-1])instanceof _&&d.lines+p.lines<=32?(a+=d.lines,h+=d.length+1,c[c.length-1]=new _(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]:Xe.from(c,h)),h=-1,a=c.length=0)}for(let d of e)f(d);return u(),l.length==1?l[0]:new Xe(l,t)}}F.empty=new _([""],0);function Wf(s){let e=-1;for(let t of s)e+=t.length+1;return e}function Cn(s,e,t=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>=t&&(a>i&&(l=l.slice(0,i-n)),n<t&&(l=l.slice(t-n)),o?(e[e.length-1]+=l,o=!1):e.push(l)),n=a+1}return e}function qo(s,e,t){return Cn(s,[""],e,t)}class vi{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof _?e.text.length:e.children.length)<<1]}nextInner(e,t){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 _?n.text.length:n.children.length;if(o==(t>0?l:0)){if(i==0)return this.done=!0,this.value="",this;t>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((r&1)==(t>0?0:1)){if(this.offsets[i]+=t,e==0)return this.lineBreak=!0,this.value=`
|
|
4
4
|
`,this;e--}else if(n instanceof _){let a=n.text[o+(t<0?-1:0)];if(this.offsets[i]+=t,a.length>Math.max(0,e))return this.value=e==0?a:t>0?a.slice(e):a.slice(0,a.length-e),this;e-=a.length}else{let a=n.children[o+(t<0?-1:0)];e>a.length?(e-=a.length,this.offsets[i]+=t):(t<0&&this.offsets[i]--,this.nodes.push(a),this.offsets.push(t>0?1:(a instanceof _?a.text.length:a.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class La{constructor(e,t,i){this.value="",this.done=!1,this.cursor=new vi(e,t>i?-1:1),this.pos=t>i?e.length:0,this.from=Math.min(t,i),this.to=Math.max(t,i)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let i=t<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:n}=this.cursor.next(e);return this.pos+=(n.length+e)*t,this.value=n.length<=i?n:t<0?n.slice(n.length-i):n.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class Ea{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:i,value:n}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(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"&&(F.prototype[Symbol.iterator]=function(){return this.iter()},vi.prototype[Symbol.iterator]=La.prototype[Symbol.iterator]=Ea.prototype[Symbol.iterator]=function(){return this});class Hf{constructor(e,t,i,n){this.from=e,this.to=t,this.number=i,this.text=n}get length(){return this.to-this.from}}function ai(s,e,t){return e=Math.max(0,Math.min(s.length,e)),[e,Math.max(e,Math.min(s.length,t))]}function se(s,e,t=!0,i=!0){return If(s,e,t,i)}function Ff(s){return s>=56320&&s<57344}function Vf(s){return s>=55296&&s<56320}function xe(s,e){let t=s.charCodeAt(e);if(!Vf(t)||e+1==s.length)return t;let i=s.charCodeAt(e+1);return Ff(i)?(t-55296<<10)+(i-56320)+65536:t}function Xr(s){return s<=65535?String.fromCharCode(s):(s-=65536,String.fromCharCode((s>>10)+55296,(s&1023)+56320))}function _e(s){return s<65536?1:2}const or=/\r\n?|\n/;var me=(function(s){return s[s.Simple=0]="Simple",s[s.TrackDel=1]="TrackDel",s[s.TrackBefore=2]="TrackBefore",s[s.TrackAfter=3]="TrackAfter",s})(me||(me={}));class nt{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let i=this.sections[t+1];e+=i<0?this.sections[t]:i}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,i=0,n=0;t<this.sections.length;){let r=this.sections[t++],o=this.sections[t++];o<0?(e(i,n,r),n+=r):n+=o,i+=r}}iterChangedRanges(e,t=!1){lr(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let i=this.sections[t++],n=this.sections[t++];n<0?e.push(i,n):e.push(n,i)}return new nt(e)}composeDesc(e){return this.empty?e:e.empty?this:Ia(this,e)}mapDesc(e,t=!1){return e.empty?this:ar(this,e,t)}mapPos(e,t=-1,i=me.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>e)return r+(e-n);r+=l}else{if(i!=me.Simple&&h>=e&&(i==me.TrackDel&&n<e&&h>e||i==me.TrackBefore&&n<e||i==me.TrackAfter&&h>e))return null;if(h>e||h==e&&t<0&&!l)return e==n||t<0?r:r+a;r+=a}n=h}if(e>n)throw new RangeError(`Position ${e} is out of range for changeset of length ${n}`);return r}touchesRange(e,t=e){for(let i=0,n=0;i<this.sections.length&&n<=t;){let r=this.sections[i++],o=this.sections[i++],l=n+r;if(o>=0&&n<=t&&l>=e)return n<e&&l>t?"cover":!0;n=l}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let i=this.sections[t++],n=this.sections[t++];e+=(e?" ":"")+i+(n>=0?":"+n:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new nt(e)}static create(e){return new nt(e)}}class ee extends nt{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return lr(this,(t,i,n,r,o)=>e=e.replace(n,n+(i-t),o),!1),e}mapDesc(e,t=!1){return ar(this,e,t,!0)}invert(e){let t=this.sections.slice(),i=[];for(let n=0,r=0;n<t.length;n+=2){let o=t[n],l=t[n+1];if(l>=0){t[n]=l,t[n+1]=o;let a=n>>1;for(;i.length<a;)i.push(F.empty);i.push(o?e.slice(r,r+o):F.empty)}r+=o}return new ee(t,i)}compose(e){return this.empty?e:e.empty?this:Ia(this,e,!0)}map(e,t=!1){return e.empty?this:ar(this,e,t,!0)}iterChanges(e,t=!1){lr(this,e,t)}get desc(){return nt.create(this.sections)}filter(e){let t=[],i=[],n=[],r=new Ri(this);e:for(let o=0,l=0;;){let a=o==e.length?1e9:e[o++];for(;l<a||l==a&&r.len==0;){if(r.done)break e;let c=Math.min(r.len,a-l);fe(n,c,-1);let f=r.ins==-1?-1:r.off==0?r.ins:0;fe(t,c,f),f>0&&bt(i,t,r.text),r.forward(c),l+=c}let h=e[o++];for(;l<h;){if(r.done)break e;let c=Math.min(r.len,h-l);fe(t,c,-1),fe(n,c,r.ins==-1?-1:r.off==0?r.ins:0),r.forward(c),l+=c}}return{changes:new ee(t,i),filtered:nt.create(n)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let i=this.sections[t],n=this.sections[t+1];n<0?e.push(i):n==0?e.push([i]):e.push([i].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,i){let n=[],r=[],o=0,l=null;function a(c=!1){if(!c&&!n.length)return;o<t&&fe(n,t-o,-1);let f=new ee(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 ee){if(c.length!=t)throw new RangeError(`Mismatched change set length (got ${c.length}, expected ${t})`);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>t)throw new RangeError(`Invalid change range ${f} to ${u} (in doc of length ${t})`);let p=d?typeof d=="string"?F.of(d.split(i||or)):d:F.empty,m=p.length;if(f==u&&m==0)return;f<o&&a(),f>o&&fe(n,f-o,-1),fe(n,u-f,m),bt(r,n,p),o=u}}return h(e),a(!l),l}static empty(e){return new ee(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],i=[];for(let n=0;n<e.length;n++){let r=e[n];if(typeof r=="number")t.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)t.push(r[0],0);else{for(;i.length<n;)i.push(F.empty);i[n]=F.of(r.slice(1)),t.push(r[0],i[n].length)}}}return new ee(t,i)}static createSet(e,t){return new ee(e,t)}}function fe(s,e,t,i=!1){if(e==0&&t<=0)return;let n=s.length-2;n>=0&&t<=0&&t==s[n+1]?s[n]+=e:n>=0&&e==0&&s[n]==0?s[n+1]+=t:i?(s[n]+=e,s[n+1]+=t):s.push(e,t)}function bt(s,e,t){if(t.length==0)return;let i=e.length-2>>1;if(i<s.length)s[s.length-1]=s[s.length-1].append(t);else{for(;s.length<i;)s.push(F.empty);s.push(t)}}function lr(s,e,t){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=F.empty;for(;h+=l,c+=a,a&&i&&(f=f.append(i[o-2>>1])),!(t||o==s.sections.length||s.sections[o+1]<0);)l=s.sections[o++],a=s.sections[o++];e(n,h,r,c,f),n=h,r=c}}}function ar(s,e,t,i=!1){let n=[],r=i?[]:null,o=new Ri(s),l=new Ri(e);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);fe(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&&!t))){let h=l.len;for(fe(n,l.ins,-1);h;){let c=Math.min(o.len,h);o.ins>=0&&a<o.i&&o.len<=c&&(fe(n,0,o.ins),r&&bt(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;fe(n,h,a<o.i?o.ins:0),r&&a<o.i&&bt(r,n,o.text),a=o.i,o.forward(o.len-c)}else{if(o.done&&l.done)return r?ee.createSet(n,r):nt.create(n);throw new Error("Mismatched change set lengths")}}}function Ia(s,e,t=!1){let i=[],n=t?[]:null,r=new Ri(s),o=new Ri(e);for(let l=!1;;){if(r.done&&o.done)return n?ee.createSet(i,n):nt.create(i);if(r.ins==0)fe(i,r.len,0,l),r.next();else if(o.len==0&&!o.done)fe(i,0,o.ins,l),n&&bt(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;fe(i,a,c,l),n&&c&&bt(n,i,o.text)}else o.ins==-1?(fe(i,r.off?0:r.len,a,l),n&&bt(n,i,r.textBit(a))):(fe(i,r.off?0:r.len,o.off?0:o.ins,l),n&&!o.off&&bt(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 Ri{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[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:e}=this.set,t=this.i-2>>1;return t>=e.length?F.empty:e[t]}textBit(e){let{inserted:t}=this.set,i=this.i-2>>1;return i>=t.length&&!e?F.empty:t[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class mt{constructor(e,t,i,n){this.from=e,this.to=t,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 e=this.flags&7;return e==7?null:e}map(e,t=-1){let i,n;return this.empty?i=n=e.mapPos(this.from,t):(i=e.mapPos(this.from,1),n=e.mapPos(this.to,-1)),i==this.from&&n==this.to?this:new mt(i,n,this.flags,this.goalColumn)}extend(e,t=e,i=0){if(e<=this.anchor&&t>=this.anchor)return y.range(e,t,void 0,void 0,i);let n=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return y.range(this.anchor,n,void 0,void 0,i)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return y.range(e.anchor,e.head)}static create(e,t,i,n){return new mt(e,t,i,n)}}class y{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:y.create(this.ranges.map(i=>i.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let i=0;i<this.ranges.length;i++)if(!this.ranges[i].eq(e.ranges[i],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new y([this.main],0)}addRange(e,t=!0){return y.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let i=this.ranges.slice();return i[t]=e,y.create(i,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new y(e.ranges.map(t=>mt.fromJSON(t)),e.main)}static single(e,t=e){return new y([y.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,n=0;n<e.length;n++){let r=e[n];if(r.empty?r.from<=i:r.from<i)return y.normalized(e.slice(),t);i=r.to}return new y(e,t)}static cursor(e,t=0,i,n){return mt.create(e,e,(t==0?0:t<0?8:16)|(i==null?7:Math.min(6,i)),n)}static range(e,t,i,n,r){let o=n==null?7:Math.min(6,n);return!r&&e!=t&&(r=t<e?1:-1),r&&(o|=r<0?8:16),t<e?mt.create(t,e,o|32,i):mt.create(e,t,o,i)}static undirectionalRange(e,t){return mt.create(e,t,64,void 0)}static normalized(e,t=0){let i=e[t];e.sort((n,r)=>n.from-r.from),t=e.indexOf(i);for(let n=1;n<e.length;n++){let r=e[n],o=e[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<=t&&t--,e.splice(--n,2,r.anchor>r.head?y.range(a,l):y.range(l,a))}}return new y(e,t)}}function Na(s,e){for(let t of s.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let _r=0;class M{constructor(e,t,i,n,r){this.combine=e,this.compareInput=t,this.compare=i,this.isStatic=n,this.id=_r++,this.default=e([]),this.extensions=typeof r=="function"?r(this):r}get reader(){return this}static define(e={}){return new M(e.combine||(t=>t),e.compareInput||((t,i)=>t===i),e.compare||(e.combine?(t,i)=>t===i:Jr),!!e.static,e.enables)}of(e){return new An([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new An(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new An(e,this,2,t)}from(e,t){return t||(t=i=>i),this.compute([e],i=>t(i.field(e)))}}function Jr(s,e){return s==e||s.length==e.length&&s.every((t,i)=>t===e[i])}class An{constructor(e,t,i,n){this.dependencies=e,this.facet=t,this.type=i,this.value=n,this.id=_r++}dynamicSlot(e){var t;let i=this.value,n=this.facet.compareInput,r=this.id,o=e[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:(((t=e[f.id])!==null&&t!==void 0?t:1)&1)==0&&c.push(e[f.id]);return{create(f){return f.values[o]=i(f),1},update(f,u){if(a&&u.docChanged||h&&(u.docChanged||u.selection)||hr(f,c)){let d=i(f);if(l?!Ko(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=In(u,p);if(this.dependencies.every(g=>g instanceof M?u.facet(g)===f.facet(g):g instanceof ie?u.field(g,!1)==f.field(g,!1):!0)||(l?Ko(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 Ko(s,e,t){if(s.length!=e.length)return!1;for(let i=0;i<s.length;i++)if(!t(s[i],e[i]))return!1;return!0}function hr(s,e){let t=!1;for(let i of e)Si(s,i)&1&&(t=!0);return t}function zf(s,e,t){let i=t.map(a=>s[a.id]),n=t.map(a=>a.type),r=i.filter(a=>!(a&1)),o=s[e.id]>>1;function l(a){let h=[];for(let c=0;c<i.length;c++){let f=In(a,i[c]);if(n[c]==2)for(let u of f)h.push(u);else h.push(f)}return e.combine(h)}return{create(a){for(let h of i)Si(a,h);return a.values[o]=l(a),1},update(a,h){if(!hr(a,r))return 0;let c=l(a);return e.compare(c,a.values[o])?0:(a.values[o]=c,1)},reconfigure(a,h){let c=hr(a,i),f=h.config.facets[e.id],u=h.facet(e);if(f&&!c&&Jr(t,f))return a.values[o]=u,0;let d=l(a);return e.compare(d,u)?(a.values[o]=u,0):(a.values[o]=d,1)}}}const Zi=M.define({static:!0});class ie{constructor(e,t,i,n,r){this.id=e,this.createF=t,this.updateF=i,this.compareF=n,this.spec=r,this.provides=void 0}static define(e){let t=new ie(_r++,e.create,e.update,e.compare||((i,n)=>i===n),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(Zi).find(i=>i.field==this);return(t?.create||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:i=>(i.values[t]=this.create(i),1),update:(i,n)=>{let r=i.values[t],o=this.updateF(r,n);return this.compareF(r,o)?0:(i.values[t]=o,1)},reconfigure:(i,n)=>{let r=i.facet(Zi),o=n.facet(Zi),l;return(l=r.find(a=>a.field==this))&&l!=o.find(a=>a.field==this)?(i.values[t]=l.create(i),1):n.config.address[this.id]!=null?(i.values[t]=n.field(this),0):(i.values[t]=this.create(i),1)}}}init(e){return[this,Zi.of({field:this,create:e})]}get extension(){return this}}const Bt={lowest:4,low:3,default:2,high:1,highest:0};function mi(s){return e=>new Wa(e,s)}const $t={highest:mi(Bt.highest),high:mi(Bt.high),default:mi(Bt.default),low:mi(Bt.low),lowest:mi(Bt.lowest)};class Wa{constructor(e,t){this.inner=e,this.prec=t}get extension(){return this}}class cs{of(e){return new cr(this,e)}reconfigure(e){return cs.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class cr{constructor(e,t){this.compartment=e,this.inner=t}get extension(){return this}}class En{constructor(e,t,i,n,r,o){for(this.base=e,this.compartments=t,this.dynamicSlots=i,this.address=n,this.staticValues=r,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<i.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(e,t,i){let n=[],r=Object.create(null),o=new Map;for(let u of $f(e,t,o))u instanceof ie?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,Jr(m,d))a.push(i.facet(p));else{let g=p.combine(d.map(b=>b.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(b=>g.dynamicSlot(b)));l[p.id]=h.length<<1,h.push(g=>zf(g,p,d))}}let f=h.map(u=>u(l));return new En(e,o,f,l,a,r)}}function $f(s,e,t){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 cr&&t.delete(o.compartment)}if(n.set(o,l),Array.isArray(o))for(let h of o)r(h,l);else if(o instanceof cr){if(t.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let h=e.get(o.compartment)||o.inner;t.set(o.compartment,h),r(h,l)}else if(o instanceof Wa)r(o.inner,o.prec);else if(o instanceof ie)i[l].push(o),o.provides&&r(o.provides,l);else if(o instanceof An)i[l].push(o),o.facet.extensions&&r(o.facet.extensions,Bt.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,Bt.default),i.reduce((o,l)=>o.concat(l))}function Si(s,e){if(e&1)return 2;let t=e>>1,i=s.status[t];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;s.status[t]=4;let n=s.computeSlot(s,s.config.dynamicSlots[t]);return s.status[t]=2|n}function In(s,e){return e&1?s.config.staticValues[e>>1]:s.values[e>>1]}const Ha=M.define(),fr=M.define({combine:s=>s.some(e=>e),static:!0}),Fa=M.define({combine:s=>s.length?s[0]:void 0,static:!0}),Va=M.define(),za=M.define(),$a=M.define(),qa=M.define({combine:s=>s.length?s[0]:!1});class ft{constructor(e,t){this.type=e,this.value=t}static define(){return new qf}}class qf{of(e){return new ft(this,e)}}class Kf{constructor(e){this.map=e}of(e){return new B(this,e)}}class B{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new B(this.type,t)}is(e){return this.type==e}static define(e={}){return new Kf(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let i=[];for(let n of e){let r=n.map(t);r&&i.push(r)}return i}}B.reconfigure=B.define();B.appendConfig=B.define();class te{constructor(e,t,i,n,r,o){this.startState=e,this.changes=t,this.selection=i,this.effects=n,this.annotations=r,this.scrollIntoView=o,this._doc=null,this._state=null,i&&Na(i,t.newLength),r.some(l=>l.type==te.time)||(this.annotations=r.concat(te.time.of(Date.now())))}static create(e,t,i,n,r,o){return new te(e,t,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(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(te.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}te.time=ft.define();te.userEvent=ft.define();te.addToHistory=ft.define();te.remote=ft.define();function jf(s,e){let t=[];for(let i=0,n=0;;){let r,o;if(i<s.length&&(n==e.length||e[n]>=s[i]))r=s[i++],o=s[i++];else if(n<e.length)r=e[n++],o=e[n++];else return t;!t.length||t[t.length-1]<r?t.push(r,o):t[t.length-1]<o&&(t[t.length-1]=o)}}function Ka(s,e,t){var i;let n,r,o;return t?(n=e.changes,r=ee.empty(e.changes.length),o=s.changes.compose(e.changes)):(n=e.changes.map(s.changes),r=s.changes.mapDesc(e.changes,!0),o=s.changes.compose(n)),{changes:o,selection:e.selection?e.selection.map(r):(i=s.selection)===null||i===void 0?void 0:i.map(n),effects:B.mapEffects(s.effects,n).concat(B.mapEffects(e.effects,r)),annotations:s.annotations.length?s.annotations.concat(e.annotations):e.annotations,scrollIntoView:s.scrollIntoView||e.scrollIntoView}}function ur(s,e,t){let i=e.selection,n=ei(e.annotations);return e.userEvent&&(n=n.concat(te.userEvent.of(e.userEvent))),{changes:e.changes instanceof ee?e.changes:ee.of(e.changes||[],t,s.facet(Fa)),selection:i&&(i instanceof y?i:y.single(i.anchor,i.head)),effects:ei(e.effects),annotations:n,scrollIntoView:!!e.scrollIntoView}}function ja(s,e,t){let i=ur(s,e.length?e[0]:{},s.doc.length);e.length&&e[0].filter===!1&&(t=!1);for(let r=1;r<e.length;r++){e[r].filter===!1&&(t=!1);let o=!!e[r].sequential;i=Ka(i,ur(s,e[r],o?i.changes.newLength:s.doc.length),o)}let n=te.create(s,i.changes,i.selection,i.effects,i.annotations,i.scrollIntoView);return Gf(t?Uf(n):n)}function Uf(s){let e=s.startState,t=!0;for(let n of e.facet(Va)){let r=n(s);if(r===!1){t=!1;break}Array.isArray(r)&&(t=t===!0?r:jf(t,r))}if(t!==!0){let n,r;if(t===!1)r=s.changes.invertedDesc,n=ee.empty(e.doc.length);else{let o=s.changes.filter(t);n=o.changes,r=o.filtered.mapDesc(o.changes).invertedDesc}s=te.create(e,n,s.selection&&s.selection.map(r),B.mapEffects(s.effects,r),s.annotations,s.scrollIntoView)}let i=e.facet(za);for(let n=i.length-1;n>=0;n--){let r=i[n](s);r instanceof te?s=r:Array.isArray(r)&&r.length==1&&r[0]instanceof te?s=r[0]:s=ja(e,ei(r),!1)}return s}function Gf(s){let e=s.startState,t=e.facet($a),i=s;for(let n=t.length-1;n>=0;n--){let r=t[n](s);r&&Object.keys(r).length&&(i=Ka(i,ur(e,r,s.changes.newLength),!0))}return i==s?s:te.create(e,s.changes,s.selection,i.effects,i.annotations,i.scrollIntoView)}const Qf=[];function ei(s){return s==null?Qf:Array.isArray(s)?s:[s]}var Z=(function(s){return s[s.Word=0]="Word",s[s.Space=1]="Space",s[s.Other=2]="Other",s})(Z||(Z={}));const Yf=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let dr;try{dr=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function Xf(s){if(dr)return dr.test(s);for(let e=0;e<s.length;e++){let t=s[e];if(/\w/.test(t)||t>""&&(t.toUpperCase()!=t.toLowerCase()||Yf.test(t)))return!0}return!1}function _f(s){return e=>{if(!/\S/.test(e))return Z.Space;if(Xf(e))return Z.Word;for(let t=0;t<s.length;t++)if(e.indexOf(s[t])>-1)return Z.Word;return Z.Other}}class H{constructor(e,t,i,n,r,o){this.config=e,this.doc=t,this.selection=i,this.values=n,this.status=e.statusTemplate.slice(),this.computeSlot=r,o&&(o._state=this);for(let l=0;l<this.config.dynamicSlots.length;l++)Si(this,l<<1);this.computeSlot=null}field(e,t=!0){let i=this.config.address[e.id];if(i==null){if(t)throw new RangeError("Field is not present in this state");return}return Si(this,i),In(this,i)}update(...e){return ja(this,e,!0)}applyTransaction(e){let t=this.config,{base:i,compartments:n}=t;for(let l of e.effects)l.is(cs.reconfigure)?(t&&(n=new Map,t.compartments.forEach((a,h)=>n.set(h,a)),t=null),n.set(l.value.compartment,l.value.extension)):l.is(B.reconfigure)?(t=null,i=l.value):l.is(B.appendConfig)&&(t=null,i=ei(i).concat(l.value));let r;t?r=e.startState.values.slice():(t=En.resolve(i,n,this),r=new H(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(a,h)=>h.reconfigure(a,this),null).values);let o=e.startState.facet(fr)?e.newSelection:e.newSelection.asSingle();new H(t,e.newDoc,o,r,(l,a)=>a.update(l,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:y.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,i=e(t.ranges[0]),n=this.changes(i.changes),r=[i.range],o=ei(i.effects);for(let l=1;l<t.ranges.length;l++){let a=e(t.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=B.mapEffects(o,c).concat(B.mapEffects(ei(a.effects),f))}return{changes:n,selection:y.create(r,t.mainIndex),effects:o}}changes(e=[]){return e instanceof ee?e:ee.of(e,this.doc.length,this.facet(H.lineSeparator))}toText(e){return F.of(e.split(this.facet(H.lineSeparator)||or))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return t==null?e.default:(Si(this,t),In(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let i in e){let n=e[i];n instanceof ie&&this.config.address[n.id]!=null&&(t[i]=n.spec.toJSON(this.field(e[i]),this))}return t}static fromJSON(e,t={},i){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let n=[];if(i){for(let r in i)if(Object.prototype.hasOwnProperty.call(e,r)){let o=i[r],l=e[r];n.push(o.init(a=>o.spec.fromJSON(l,a)))}}return H.create({doc:e.doc,selection:y.fromJSON(e.selection),extensions:t.extensions?n.concat([t.extensions]):n})}static create(e={}){let t=En.resolve(e.extensions||[],new Map),i=e.doc instanceof F?e.doc:F.of((e.doc||"").split(t.staticFacet(H.lineSeparator)||or)),n=e.selection?e.selection instanceof y?e.selection:y.single(e.selection.anchor,e.selection.head):y.single(0);return Na(n,i.length),t.staticFacet(fr)||(n=n.asSingle()),new H(t,i,n,t.dynamicSlots.map(()=>null),(r,o)=>o.create(r),null)}get tabSize(){return this.facet(H.tabSize)}get lineBreak(){return this.facet(H.lineSeparator)||`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{ab as ee,a8 as F,ac as G,ad as M,ae as te,F as j,J as Z,Y as E,af as ie,ag as O,ah as $,a5 as ne,ai as I,M as se,aj as B,ak as oe,al as ae,am as re,G as le,a3 as ce,an as de,a7 as fe,ao as ue,ap as pe,aq as he,ar as me,as as V,a4 as ge}from"./rr0-sighting-editor.mjs";const k=new j,P=new E;class Y extends ee{constructor(){super(),this.isLineSegmentsGeometry=!0,this.type="LineSegmentsGeometry";const e=[-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],n=[-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],i=[0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5];this.setIndex(i),this.setAttribute("position",new F(e,3)),this.setAttribute("uv",new F(n,2))}applyMatrix4(e){const n=this.attributes.instanceStart,i=this.attributes.instanceEnd;return n!==void 0&&(n.applyMatrix4(e),i.applyMatrix4(e),n.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}setPositions(e){let n;e instanceof Float32Array?n=e:Array.isArray(e)&&(n=new Float32Array(e));const i=new G(n,6,1);return this.setAttribute("instanceStart",new M(i,3,0)),this.setAttribute("instanceEnd",new M(i,3,3)),this.instanceCount=this.attributes.instanceStart.count,this.computeBoundingBox(),this.computeBoundingSphere(),this}setColors(e){let n;e instanceof Float32Array?n=e:Array.isArray(e)&&(n=new Float32Array(e));const i=new G(n,6,1);return this.setAttribute("instanceColorStart",new M(i,3,0)),this.setAttribute("instanceColorEnd",new M(i,3,3)),this}fromWireframeGeometry(e){return this.setPositions(e.attributes.position.array),this}fromEdgesGeometry(e){return this.setPositions(e.attributes.position.array),this}fromMesh(e){return this.fromWireframeGeometry(new te(e.geometry)),this}fromLineSegments(e){const n=e.geometry;return this.setPositions(n.attributes.position.array),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new j);const e=this.attributes.instanceStart,n=this.attributes.instanceEnd;e!==void 0&&n!==void 0&&(this.boundingBox.setFromBufferAttribute(e),k.setFromBufferAttribute(n),this.boundingBox.union(k))}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Z),this.boundingBox===null&&this.computeBoundingBox();const e=this.attributes.instanceStart,n=this.attributes.instanceEnd;if(e!==void 0&&n!==void 0){const i=this.boundingSphere.center;this.boundingBox.getCenter(i);let t=0;for(let o=0,l=e.count;o<l;o++)P.fromBufferAttribute(e,o),t=Math.max(t,i.distanceToSquared(P)),P.fromBufferAttribute(n,o),t=Math.max(t,i.distanceToSquared(P));this.boundingSphere.radius=Math.sqrt(t),isNaN(this.boundingSphere.radius)&&console.error("THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.",this)}}toJSON(){}}I.line={worldUnits:{value:1},linewidth:{value:1},resolution:{value:new ne},dashOffset:{value:0},dashScale:{value:1},dashSize:{value:1},gapSize:{value:1}};O.line={uniforms:$.merge([I.common,I.fog,I.line]),vertexShader:`
|
|
2
2
|
#include <common>
|
|
3
3
|
#include <color_pars_vertex>
|
|
4
4
|
#include <fog_pars_vertex>
|
|
@@ -390,4 +390,4 @@ import{Z as ee,$ as F,a0 as G,a1 as M,a2 as te,x as j,y as $,K as E,a3 as ie,a4
|
|
|
390
390
|
#include <premultiplied_alpha_fragment>
|
|
391
391
|
|
|
392
392
|
}
|
|
393
|
-
`};class N extends ie{constructor(e){super({type:"LineMaterial",uniforms
|
|
393
|
+
`};class N extends ie{constructor(e){super({type:"LineMaterial",uniforms:$.clone(O.line.uniforms),vertexShader:O.line.vertexShader,fragmentShader:O.line.fragmentShader,clipping:!0}),this.isLineMaterial=!0,this.setValues(e)}get color(){return this.uniforms.diffuse.value}set color(e){this.uniforms.diffuse.value=e}get worldUnits(){return"WORLD_UNITS"in this.defines}set worldUnits(e){e===!0!==this.worldUnits&&(this.needsUpdate=!0),e===!0?this.defines.WORLD_UNITS="":delete this.defines.WORLD_UNITS}get linewidth(){return this.uniforms.linewidth.value}set linewidth(e){this.uniforms.linewidth&&(this.uniforms.linewidth.value=e)}get dashed(){return"USE_DASH"in this.defines}set dashed(e){e===!0!==this.dashed&&(this.needsUpdate=!0),e===!0?this.defines.USE_DASH="":delete this.defines.USE_DASH}get dashScale(){return this.uniforms.dashScale.value}set dashScale(e){this.uniforms.dashScale.value=e}get dashSize(){return this.uniforms.dashSize.value}set dashSize(e){this.uniforms.dashSize.value=e}get dashOffset(){return this.uniforms.dashOffset.value}set dashOffset(e){this.uniforms.dashOffset.value=e}get gapSize(){return this.uniforms.gapSize.value}set gapSize(e){this.uniforms.gapSize.value=e}get opacity(){return this.uniforms.opacity.value}set opacity(e){this.uniforms&&(this.uniforms.opacity.value=e)}get resolution(){return this.uniforms.resolution.value}set resolution(e){this.uniforms.resolution.value.copy(e)}get alphaToCoverage(){return"USE_ALPHA_TO_COVERAGE"in this.defines}set alphaToCoverage(e){this.defines&&(e===!0!==this.alphaToCoverage&&(this.needsUpdate=!0),e===!0?this.defines.USE_ALPHA_TO_COVERAGE="":delete this.defines.USE_ALPHA_TO_COVERAGE)}}const H=new B,q=new E,X=new E,f=new B,u=new B,x=new B,W=new E,R=new ae,p=new oe,J=new E,T=new j,C=new Z,S=new B;let b,z;function K(h,e,n){return S.set(0,0,-e,1).applyMatrix4(h.projectionMatrix),S.multiplyScalar(1/S.w),S.x=z/n.width,S.y=z/n.height,S.applyMatrix4(h.projectionMatrixInverse),S.multiplyScalar(1/S.w),Math.abs(Math.max(S.x,S.y))}function ve(h,e){const n=h.matrixWorld,i=h.geometry,t=i.attributes.instanceStart,o=i.attributes.instanceEnd,l=Math.min(i.instanceCount,t.count);for(let s=0,a=l;s<a;s++){p.start.fromBufferAttribute(t,s),p.end.fromBufferAttribute(o,s),p.applyMatrix4(n);const d=new E,m=new E;b.distanceSqToSegment(p.start,p.end,m,d),m.distanceTo(d)<z*.5&&e.push({point:m,pointOnLine:d,distance:b.origin.distanceTo(m),object:h,face:null,faceIndex:s,uv:null,uv1:null})}}function ye(h,e,n){const i=e.projectionMatrix,o=h.material.resolution,l=h.matrixWorld,s=h.geometry,a=s.attributes.instanceStart,d=s.attributes.instanceEnd,m=Math.min(s.instanceCount,a.count),c=-e.near;b.at(1,x),x.w=1,x.applyMatrix4(e.matrixWorldInverse),x.applyMatrix4(i),x.multiplyScalar(1/x.w),x.x*=o.x/2,x.y*=o.y/2,x.z=0,W.copy(x),R.multiplyMatrices(e.matrixWorldInverse,l);for(let g=0,r=m;g<r;g++){if(f.fromBufferAttribute(a,g),u.fromBufferAttribute(d,g),f.w=1,u.w=1,f.applyMatrix4(R),u.applyMatrix4(R),f.z>c&&u.z>c)continue;if(f.z>c){const _=f.z-u.z,w=(f.z-c)/_;f.lerp(u,w)}else if(u.z>c){const _=u.z-f.z,w=(u.z-c)/_;u.lerp(f,w)}f.applyMatrix4(i),u.applyMatrix4(i),f.multiplyScalar(1/f.w),u.multiplyScalar(1/u.w),f.x*=o.x/2,f.y*=o.y/2,u.x*=o.x/2,u.y*=o.y/2,p.start.copy(f),p.start.z=0,p.end.copy(u),p.end.z=0;const y=p.closestPointToPointParameter(W,!0);p.at(y,J);const L=re.lerp(f.z,u.z,y),U=L>=-1&&L<=1,D=W.distanceTo(J)<z*.5;if(U&&D){p.start.fromBufferAttribute(a,g),p.end.fromBufferAttribute(d,g),p.start.applyMatrix4(l),p.end.applyMatrix4(l);const _=new E,w=new E;b.distanceSqToSegment(p.start,p.end,w,_),n.push({point:w,pointOnLine:_,distance:b.origin.distanceTo(w),object:h,face:null,faceIndex:g,uv:null,uv1:null})}}}class we extends se{constructor(e=new Y,n=new N({color:Math.random()*16777215})){super(e,n),this.isLineSegments2=!0,this.type="LineSegments2"}computeLineDistances(){const e=this.geometry,n=e.attributes.instanceStart,i=e.attributes.instanceEnd,t=new Float32Array(2*n.count);for(let l=0,s=0,a=n.count;l<a;l++,s+=2)q.fromBufferAttribute(n,l),X.fromBufferAttribute(i,l),t[s]=s===0?0:t[s-1],t[s+1]=t[s]+q.distanceTo(X);const o=new G(t,2,1);return e.setAttribute("instanceDistanceStart",new M(o,1,0)),e.setAttribute("instanceDistanceEnd",new M(o,1,1)),this}raycast(e,n){const i=this.material.worldUnits,t=e.camera;if(t===null&&!i&&console.error('LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2 while worldUnits is set to false.'),i===!1&&(this.material.resolution.x===0||this.material.resolution.y===0))return;const o=e.params.Line2!==void 0&&e.params.Line2.threshold||0;b=e.ray;const l=this.matrixWorld,s=this.geometry,a=this.material;z=a.linewidth+o,s.boundingSphere===null&&s.computeBoundingSphere(),C.copy(s.boundingSphere).applyMatrix4(l);let d;if(i)d=z*.5;else{const c=Math.max(t.near,C.distanceToPoint(b.origin));d=K(t,c,a.resolution)}if(C.radius+=d,b.intersectsSphere(C)===!1)return;s.boundingBox===null&&s.computeBoundingBox(),T.copy(s.boundingBox).applyMatrix4(l);let m;if(i)m=z*.5;else{const c=Math.max(t.near,T.distanceToPoint(b.origin));m=K(t,c,a.resolution)}T.expandByScalar(m),b.intersectsBox(T)!==!1&&(i?ve(this,n):ye(this,t,n))}onBeforeRender(e){const n=this.material.uniforms;n&&n.resolution&&(e.getViewport(H),this.material.uniforms.resolution.value.set(H.z,H.w))}}class Q extends Y{constructor(){super(),this.isLineGeometry=!0,this.type="LineGeometry"}setPositions(e){const n=e.length-3,i=new Float32Array(2*n);for(let t=0;t<n;t+=3)i[2*t]=e[t],i[2*t+1]=e[t+1],i[2*t+2]=e[t+2],i[2*t+3]=e[t+3],i[2*t+4]=e[t+4],i[2*t+5]=e[t+5];return super.setPositions(i),this}setColors(e){const n=e.length-3,i=new Float32Array(2*n);for(let t=0;t<n;t+=3)i[2*t]=e[t],i[2*t+1]=e[t+1],i[2*t+2]=e[t+2],i[2*t+3]=e[t+3],i[2*t+4]=e[t+4],i[2*t+5]=e[t+5];return super.setColors(i),this}setFromPoints(e){const n=e.length-1,i=new Float32Array(6*n);for(let t=0;t<n;t++)i[6*t]=e[t].x,i[6*t+1]=e[t].y,i[6*t+2]=e[t].z||0,i[6*t+3]=e[t+1].x,i[6*t+4]=e[t+1].y,i[6*t+5]=e[t+1].z||0;return super.setPositions(i),this}fromLine(e){const n=e.geometry;return this.setPositions(n.attributes.position.array),this}}class xe extends we{constructor(e=new Q,n=new N({color:Math.random()*16777215})){super(e,n),this.isLine2=!0,this.type="Line2"}}class A{constructor(e){this.layer=e,this.group.name="traces"}static LINE_WIDTH_PX=2.5;static MARKER_SIZE_PX=9;static LABEL_HEIGHT_PX=15;static STEP_M=15;static LIFT_M=.3;group=new le;materials=[];pointsMaterials=[];labels=[];viewportHeightPx=720;fovDeg=60;set(e,n,i,t,o,l){this.empty();for(const s of e){const a=this.positions(s,i,t,o,l),d=new ce(s.color??de),m=n.get(s.id);if(m&&a.length>=3&&this.addLabel(m,this.labelAnchor(a,s.kind)),s.kind==="point"){const c=new fe;c.setAttribute("position",new F(a.slice(0,3),3));const g=new ue({color:d,size:A.MARKER_SIZE_PX,sizeAttenuation:!1,depthTest:!1,fog:!1});this.pointsMaterials.push(g);const r=new pe(c,g);r.name="trace point",r.frustumCulled=!1,r.layers.set(this.layer),this.group.add(r)}else if(a.length>=6){const c=new Q;c.setPositions(s.kind==="polygon"?[...a,a[0],a[1],a[2]]:a);const g=new N({color:d.getHex(),linewidth:A.LINE_WIDTH_PX,worldUnits:!1,transparent:!0,opacity:.92,depthTest:!1,fog:!1});this.materials.push(g);const r=new xe(c,g);r.name=`trace ${s.kind}`,r.frustumCulled=!1,r.layers.set(this.layer),this.group.add(r)}}}setView(e,n){for(const i of this.materials)i.resolution.copy(e);e.y===this.viewportHeightPx&&n===this.fovDeg||(this.viewportHeightPx=e.y,this.fovDeg=n,this.scaleLabels())}get any(){return this.group.children.length>0}dispose(){this.empty()}labelAnchor(e,n){let i=0;if(n==="line"){let t=-1;for(let o=0;o+2<e.length;o+=3){const l=Math.hypot(e[o],e[o+2]);l>t&&(t=l,i=o)}}return[e[i],e[i+1],e[i+2]]}addLabel(e,n){const i=document.createElement("canvas"),t=i.getContext("2d");if(!t)return;const o="bold 30px sans-serif";t.font=o;const l=10;i.width=Math.ceil(t.measureText(e).width)+l*2,i.height=44,t.font=o,t.fillStyle="rgba(0, 0, 0, 0.6)",t.beginPath(),t.roundRect(0,0,i.width,i.height,10),t.fill(),t.fillStyle="#ffffff",t.textBaseline="middle",t.fillText(e,l,i.height/2+2);const s=new he({map:new me(i),depthTest:!1,depthWrite:!1,fog:!1,sizeAttenuation:!1}),a=new V(s);a.name="trace name",a.center.set(0,0),a.position.set(n[0],n[1],n[2]),a.frustumCulled=!1,a.layers.set(this.layer),this.labels.push({sprite:a,aspect:i.width/i.height}),this.group.add(a),this.scaleLabels()}scaleLabels(){const e=A.LABEL_HEIGHT_PX/(this.viewportHeightPx/2)*Math.tan(this.fovDeg*Math.PI/360);for(const{sprite:n,aspect:i}of this.labels)n.scale.set(e*i,e,1)}empty(){for(const e of[...this.group.children])this.group.remove(e),e instanceof V?(e.material.map?.dispose(),e.material.dispose()):e.geometry.dispose();this.labels.length=0;for(const e of this.materials.splice(0))e.dispose();for(const e of this.pointsMaterials.splice(0))e.dispose()}positions(e,n,i,t,o){const l=e.altitude??"ground",s=e.points.map(r=>{const{x:v,z:y}=ge(r.lat,r.lng,n,i);return{x:v,z:y,altM:r.altM??0}}),a=l!=="absolute",d=[],m=(r,v,y)=>l==="absolute"?y-t:o(r,v)+(l==="relative"?y:0)+A.LIFT_M,c=e.kind==="polygon",g=c?s.length:s.length-1;for(let r=0;r<Math.max(g,1);r++){const v=s[r],y=s[(r+1)%s.length],L=a&&e.kind!=="point"?Math.max(1,Math.ceil(Math.hypot(y.x-v.x,y.z-v.z)/A.STEP_M)):1;for(let U=0;U<L;U++){const D=U/L,_=v.x+(y.x-v.x)*D,w=v.z+(y.z-v.z)*D;d.push(_,m(_,w,v.altM+(y.altM-v.altM)*D),w)}}if(!c&&e.kind!=="point"){const r=s[s.length-1];d.push(r.x,m(r.x,r.z,r.altM),r.z)}return d}}export{A as TraceSystem};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{G as O,a2 as w,a3 as A,a4 as M,M as R,a5 as v,a6 as D,a7 as N,a8 as L}from"./rr0-sighting-editor.mjs";class r{static LIFT_M=.05;static RENDER_ORDER=1.04;static LEVEL_QUANTILE=.2;static BODY_ALBEDO=[.035,.045,.04];static IOR=1.33;static ROUGHNESS=.08;static MAX_SAMPLES=48;group=new O;material=new w({color:new A(...r.BODY_ALBEDO),roughness:r.ROUGHNESS,metalness:0,ior:r.IOR,polygonOffset:!0,polygonOffsetFactor:-2,polygonOffsetUnits:-2});constructor(){this.group.name="water"}set(s,e,n,p,t,o){this.clear();for(const a of s){const f=a.rings.map(i=>r.clip(i.map(h=>M(h.lat,h.lng,e,n)),t)),l=f[0];if(!l||l.length<3)continue;const g=f.slice(1).filter(i=>i.length>=3),u=r.level(l,g,p,o);if(u===void 0)continue;const c=r.geometry(l,g,u+r.LIFT_M);if(!c)continue;const x=new R(c,this.material);x.name=`water ${a.id}`,x.renderOrder=r.RENDER_ORDER,x.receiveShadow=!0,this.group.add(x)}}get count(){return this.group.children.length}clear(){for(const s of[...this.group.children])s.geometry.dispose(),this.group.remove(s)}dispose(){this.clear(),this.material.dispose()}static level(s,e,n,p){const t=s.map(i=>i.x),o=s.map(i=>i.z),[a,f,l,g]=[Math.min(...t),Math.max(...t),Math.min(...o),Math.max(...o)],u=Math.max(p,(f-a)/r.MAX_SAMPLES,(g-l)/r.MAX_SAMPLES,.5),c=[];for(let i=l+u/2;i<g;i+=u)for(let h=a+u/2;h<f;h+=u){const z={x:h,z:i};if(!r.contains(s,z)||e.some(E=>r.contains(E,z)))continue;const d=n(h,i);Number.isFinite(d)&&c.push(d)}if(c.length===0)for(const i of s)c.push(n(i.x,i.z));const x=c.filter(Number.isFinite).sort((i,h)=>i-h);if(x.length!==0)return x[Math.floor((x.length-1)*r.LEVEL_QUANTILE)]}static clip(s,e){let n=s;const p=[{inside:t=>t.x>=-e,cross:(t,o)=>r.atX(t,o,-e)},{inside:t=>t.x<=e,cross:(t,o)=>r.atX(t,o,e)},{inside:t=>t.z>=-e,cross:(t,o)=>r.atZ(t,o,-e)},{inside:t=>t.z<=e,cross:(t,o)=>r.atZ(t,o,e)}];for(const t of p){const o=[];for(let a=0;a<n.length;a++){const f=n[a],l=n[(a+n.length-1)%n.length];t.inside(f)?(t.inside(l)||o.push(t.cross(l,f)),o.push(f)):t.inside(l)&&o.push(t.cross(l,f))}if(n=o,n.length===0)break}return n}static atX(s,e,n){return{x:n,z:s.z+(e.z-s.z)*(n-s.x)/(e.x-s.x)}}static atZ(s,e,n){return{x:s.x+(e.x-s.x)*(n-s.z)/(e.z-s.z),z:n}}static contains(s,e){let n=!1;for(let p=0,t=s.length-1;p<s.length;t=p++){const o=s[p],a=s[t];o.z>e.z!=a.z>e.z&&e.x<(a.x-o.x)*(e.z-o.z)/(a.z-o.z)+o.x&&(n=!n)}return n}static geometry(s,e,n){const p=c=>new v(c.x,c.z),t=s.map(p),o=e.map(c=>c.map(p)),a=D.triangulateShape(t,o);if(a.length===0)return;const f=[...t,...o.flat()],l=[];for(const[c,x,i]of a){const[h,z,d]=[f[c],f[x],f[i]],E=(z.y-h.y)*(d.x-h.x)-(z.x-h.x)*(d.y-h.y)>0;for(const m of E?[h,z,d]:[h,d,z])l.push(m.x,n,m.y)}const g=new N;g.setAttribute("position",new L(l,3));const u=new Float32Array(l.length);for(let c=1;c<u.length;c+=3)u[c]=1;return g.setAttribute("normal",new L(u,3)),g.computeBoundingSphere(),g}}export{r as WaterSystem};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e={type:"string",doc:"The case's identifier."},t={type:"string"},i={type:"string",doc:"What a link to this case says of it where it is shared as a card (see the Player's share card): a sentence or two, translatable.",loose:!0},s={type:"string",doc:"A picture standing for the case where it is only linked to — see SightingEvent.image."},n={type:"string",doc:'When it happened, as RR0 writes a time ("1948-07-24 02:45", "1954").'},a={type:"array",fields:{type:{type:"enum",values:["event"]},eventType:{type:"string",doc:"What kind of event it is.",suggest:["sighting","interview","interpretation","article","image","book"]},id:{type:"string",doc:"What a reading names an account by (`interpretationOf`), local to the case: it has to be unique among the case's events and nowhere else, so that a reference can be read in the file that writes it."},url:{type:"string"},time:{type:"string"},place:{type:"string",doc:"Where it happened, as RR0 names a place."},by:{type:"array",doc:"Who did it: who held an interview, who made a reading."},medium:{type:"enum",doc:"An interview's: what it was held through (see InterviewMedium).",values:["letter","in-person","phone","video","chat","email"
|
|
1
|
+
const e={type:"string",doc:"The case's identifier."},t={type:"string"},i={type:"string",doc:"What a link to this case says of it where it is shared as a card (see the Player's share card): a sentence or two, translatable.",loose:!0},s={type:"string",doc:"A picture standing for the case where it is only linked to — see SightingEvent.image."},n={type:"string",doc:'When it happened, as RR0 writes a time ("1948-07-24 02:45", "1954").'},a={type:"array",fields:{type:{type:"enum",values:["event"]},eventType:{type:"string",doc:"What kind of event it is.",suggest:["sighting","interview","interpretation","article","image","book"]},id:{type:"string",doc:"What a reading names an account by (`interpretationOf`), local to the case: it has to be unique among the case's events and nowhere else, so that a reference can be read in the file that writes it."},url:{type:"string"},time:{type:"string"},place:{type:"string",doc:"Where it happened, as RR0 names a place."},by:{type:"array",doc:"Who did it: who held an interview, who made a reading."},medium:{type:"enum",doc:"An interview's: what it was held through (see InterviewMedium).",values:["letter","other","in-person","phone","video","chat","email"]},title:{type:"string",loose:!0},sighting:{type:"string",doc:"An interpretation's, in the older form: the `id` of the recording it interprets."},interpretationOf:{type:"string",doc:"An interpretation's: the `id`, or the ids, of the sightings this one is a reading of.",loose:!0},interviewOf:{type:"string",doc:"An interview's: the `id`, or the ids, of the sighting events of the witnesses it was held with (see CaseFile.INTERVIEW_EVENT).",loose:!0},summary:{type:"string",doc:"What an event says of itself where its title is not enough: an interview's, what it established.",loose:!0}}},r={id:e,title:t,summary:i,image:s,time:n,events:a};export{r as default,a as events,e as id,s as image,i as summary,n as time,t as title};
|
package/dist-embed-sighting-editor/{interviewSchema-CMRZUnRy.js → interviewSchema-m_h5f8H0.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e={type:"number"},t={type:"string"},s={type:"string"},n={type:"string",doc:"What the interview is called, in the languages it has.",loose:!0},i={type:"string",doc:"When it was held, as RR0 writes a time."},o={type:"enum",doc:"What it was held through: face to face (`in-person`), by `phone`, in a `video` call, by `chat`, by `email`, by `letter`, or `other`.",values:["letter","in-person","phone","video","chat","email"
|
|
1
|
+
const e={type:"number"},t={type:"string"},s={type:"string"},n={type:"string",doc:"What the interview is called, in the languages it has.",loose:!0},i={type:"string",doc:"When it was held, as RR0 writes a time."},o={type:"enum",doc:"What it was held through: face to face (`in-person`), by `phone`, in a `video` call, by `chat`, by `email`, by `letter`, or `other`.",values:["letter","other","in-person","phone","video","chat","email"]},a={type:"array",doc:"Who held it."},r={type:"string",doc:"The `id`, or the ids, of the sighting events of the case it was held with.",loose:!0},c={type:"string",doc:"What it established, in the languages it has.",loose:!0},h={type:"object"},p={type:"object",fields:{method:{type:"enum",values:["automatic","manual"]},engine:{type:"string"},note:{type:"string"}}},d={type:"object",doc:"Who approved the transcript, by speaker id."},y={type:"object",doc:"What was taken out to anonymise it, and what stands in its place.",fields:{replaced:{type:"array"},marker:{type:"string"}}},l={type:"array",fields:{speaker:{type:"string"},start:{type:"number"},end:{type:"number"},text:{type:"string"},redacted:{type:"object",fields:{reason:{type:"string",doc:"Why, in the languages it has: what kind of passage (private life, identifying detail, small talk, recognition error).",loose:!0}}},parts:{type:"array"},refs:{type:"array",doc:"The moments of the observation this passage tells of.",fields:{sighting:{type:"string",doc:"The `id` of the sighting event of the case; the interview's own `interviewOf` when omitted."},at:{type:"number",doc:"Seconds since the beginning of the observation."},range:{type:"object",doc:"The part of the segment's text it is about, as `[from, to)` character offsets."}}}}},g={version:e,id:t,language:s,title:n,time:i,medium:o,by:a,interviewOf:r,summary:c,speakers:h,transcription:p,proofreading:d,anonymization:y,segments:l};export{y as anonymization,a as by,g as default,t as id,r as interviewOf,s as language,o as medium,d as proofreading,l as segments,h as speakers,c as summary,i as time,n as title,p as transcription,e as version};
|