ship.6fc4607c.js 39 KB

1
  1. import{u as Qe,r as $,ad as ge,_ as Pe,P as Ye,L as Ne,g as P,o as T,h as fe,m as u,i as F,w as R,t as G,k as p,j as ne,U as Ue,V as We,W as He,N,X as dt,M as ut,z as ct,B as ht,l as Se}from"./vendor.0bc3c1d4.js";import{e as gt,l as Xe,g as me,h as D,i as re,m as ft,j as mt,k as pt,n as De,o as yt,p as vt,q as Ct,r as Ze,C as _t,s as wt,t as At,G as Ft,u as Et,v as Pt,E as St,w as xt,x as Gt,y as Rt,z as Mt,A as Ot,B as It,D as bt,H as Lt,J as kt,K as Tt,P as U,L as Bt,N as Vt,O as jt,Q as Qt,R as Yt,U as Nt,W as Ut,Y as Ke,Z as Wt,_ as Ht,$ as Xt,a0 as Dt,a1 as xe,a2 as Zt,a3 as Kt,a4 as W,a5 as zt,a6 as S,F as Z,a7 as Jt,a8 as qt,S as K,a9 as Ge,aa as $t,d as oe,f as ee,b as ae,a as le,I as pe,c as ze,T as ye,X as ve,M as Je,V as qe}from"./Map.e82b79a7.js";import{_ as $e,d as es,e as ts,s as ss,b as is,c as ns}from"./index.fceaba64.js";function et(n,e,t,s,i,r,o){let a,l;const g=(t-e)/s;if(g===1)a=e;else if(g===2)a=e,l=i;else if(g!==0){let h=n[e],w=n[e+1],y=0;const _=[0];for(let b=e+s;b<t;b+=s){const M=n[b],H=n[b+1];y+=Math.sqrt((M-h)*(M-h)+(H-w)*(H-w)),_.push(y),h=M,w=H}const f=i*y,E=gt(_,f);E<0?(l=(f-_[-E-2])/(_[-E-1]-_[-E-2]),a=e+(-E-2)*s):a=e+E*s}o=o>1?o:2,r=r||new Array(o);for(let h=0;h<o;++h)r[h]=a===void 0?NaN:l===void 0?n[a+h]:Xe(n[a+h],n[a+s+h],l);return r}function Re(n,e,t,s,i,r){if(t==e)return null;let o;if(i<n[e+s-1])return r?(o=n.slice(e,e+s),o[s-1]=i,o):null;if(n[t-1]<i)return r?(o=n.slice(t-s,t),o[s-1]=i,o):null;if(i==n[e+s-1])return n.slice(e,e+s);let a=e/s,l=t/s;for(;a<l;){const y=a+l>>1;i<n[(y+1)*s-1]?l=y:a=y+1}const g=n[a*s-1];if(i==g)return n.slice((a-1)*s,(a-1)*s+s);const h=n[(a+1)*s-1],w=(i-g)/(h-g);o=[];for(let y=0;y<s-1;++y)o.push(Xe(n[(a-1)*s+y],n[a*s+y],w));return o.push(i),o}function rs(n,e,t,s,i,r,o){if(o)return Re(n,e,t[t.length-1],s,i,r);let a;if(i<n[s-1])return r?(a=n.slice(0,s),a[s-1]=i,a):null;if(n[n.length-1]<i)return r?(a=n.slice(n.length-s),a[s-1]=i,a):null;for(let l=0,g=t.length;l<g;++l){const h=t[l];if(e!=h){if(i<n[e+s-1])return null;if(i<=n[h-1])return Re(n,e,h,s,i,!1);e=h}}return null}class Ce extends me{constructor(e,t){super();this.flatMidpoint_=null,this.flatMidpointRevision_=-1,this.maxDelta_=-1,this.maxDeltaRevision_=-1,t!==void 0&&!Array.isArray(e[0])?this.setFlatCoordinates(t,e):this.setCoordinates(e,t)}appendCoordinate(e){this.flatCoordinates?D(this.flatCoordinates,e):this.flatCoordinates=e.slice(),this.changed()}clone(){const e=new Ce(this.flatCoordinates.slice(),this.layout);return e.applyProperties(this),e}closestPointXY(e,t,s,i){return i<re(this.getExtent(),e,t)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(ft(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),mt(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,e,t,s,i))}forEachSegment(e){return pt(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)}getCoordinateAtM(e,t){return this.layout!="XYM"&&this.layout!="XYZM"?null:(t=t!==void 0?t:!1,Re(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,t))}getCoordinates(){return De(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinateAt(e,t){return et(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,t,this.stride)}getLength(){return yt(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getFlatMidpoint(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_}getSimplifiedGeometryInternal(e){const t=[];return t.length=vt(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,t,0),new Ce(t,"XY")}getType(){return"LineString"}intersectsExtent(e){return Ct(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)}setCoordinates(e,t){this.setLayout(t,e,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Ze(this.flatCoordinates,0,e,this.stride),this.changed()}}var Me=Ce;function os(n){if(!(n.context instanceof CanvasRenderingContext2D))throw new Error("Only works for render events from Canvas 2D layers");const e=n.inversePixelTransform[0],t=n.frameState,s=wt(n.inversePixelTransform.slice(),t.coordinateToPixelTransform),i=At(t.viewState.resolution,e);let r;return new _t(n.context,e,t.extent,s,t.viewState.rotation,i,r)}class _e extends Ft{constructor(e){super();this.geometries_=e||null,this.changeEventsKeys_=[],this.listenGeometriesChange_()}unlistenGeometriesChange_(){this.changeEventsKeys_.forEach(Et),this.changeEventsKeys_.length=0}listenGeometriesChange_(){if(!!this.geometries_)for(let e=0,t=this.geometries_.length;e<t;++e)this.changeEventsKeys_.push(Pt(this.geometries_[e],St.CHANGE,this.changed,this))}clone(){const e=new _e(null);return e.setGeometries(this.geometries_),e.applyProperties(this),e}closestPointXY(e,t,s,i){if(i<re(this.getExtent(),e,t))return i;const r=this.geometries_;for(let o=0,a=r.length;o<a;++o)i=r[o].closestPointXY(e,t,s,i);return i}containsXY(e,t){const s=this.geometries_;for(let i=0,r=s.length;i<r;++i)if(s[i].containsXY(e,t))return!0;return!1}computeExtent(e){xt(e);const t=this.geometries_;for(let s=0,i=t.length;s<i;++s)Gt(e,t[s].getExtent());return e}getGeometries(){return tt(this.geometries_)}getGeometriesArray(){return this.geometries_}getGeometriesArrayRecursive(){let e=[];const t=this.geometries_;for(let s=0,i=t.length;s<i;++s)t[s].getType()===this.getType()?e=e.concat(t[s].getGeometriesArrayRecursive()):e.push(t[s]);return e}getSimplifiedGeometry(e){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),e<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&e<this.simplifiedGeometryMaxMinSquaredTolerance)return this;const t=[],s=this.geometries_;let i=!1;for(let r=0,o=s.length;r<o;++r){const a=s[r],l=a.getSimplifiedGeometry(e);t.push(l),l!==a&&(i=!0)}if(i){const r=new _e(null);return r.setGeometriesArray(t),r}else return this.simplifiedGeometryMaxMinSquaredTolerance=e,this}getType(){return"GeometryCollection"}intersectsExtent(e){const t=this.geometries_;for(let s=0,i=t.length;s<i;++s)if(t[s].intersectsExtent(e))return!0;return!1}isEmpty(){return this.geometries_.length===0}rotate(e,t){const s=this.geometries_;for(let i=0,r=s.length;i<r;++i)s[i].rotate(e,t);this.changed()}scale(e,t,s){s||(s=Rt(this.getExtent()));const i=this.geometries_;for(let r=0,o=i.length;r<o;++r)i[r].scale(e,t,s);this.changed()}setGeometries(e){this.setGeometriesArray(tt(e))}setGeometriesArray(e){this.unlistenGeometriesChange_(),this.geometries_=e,this.listenGeometriesChange_(),this.changed()}applyTransform(e){const t=this.geometries_;for(let s=0,i=t.length;s<i;++s)t[s].applyTransform(e);this.changed()}translate(e,t){const s=this.geometries_;for(let i=0,r=s.length;i<r;++i)s[i].translate(e,t);this.changed()}disposeInternal(){this.unlistenGeometriesChange_(),super.disposeInternal()}}function tt(n){const e=[];for(let t=0,s=n.length;t<s;++t)e.push(n[t].clone());return e}var as=_e;class we extends me{constructor(e,t,s){super();if(this.ends_=[],this.maxDelta_=-1,this.maxDeltaRevision_=-1,Array.isArray(e[0]))this.setCoordinates(e,t);else if(t!==void 0&&s)this.setFlatCoordinates(t,e),this.ends_=s;else{let i=this.getLayout();const r=e,o=[],a=[];for(let l=0,g=r.length;l<g;++l){const h=r[l];l===0&&(i=h.getLayout()),D(o,h.getFlatCoordinates()),a.push(o.length)}this.setFlatCoordinates(i,o),this.ends_=a}}appendLineString(e){this.flatCoordinates?D(this.flatCoordinates,e.getFlatCoordinates().slice()):this.flatCoordinates=e.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const e=new we(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return e.applyProperties(this),e}closestPointXY(e,t,s,i){return i<re(this.getExtent(),e,t)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Mt(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Ot(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,e,t,s,i))}getCoordinateAtM(e,t,s){return this.layout!="XYM"&&this.layout!="XYZM"||this.flatCoordinates.length===0?null:(t=t!==void 0?t:!1,s=s!==void 0?s:!1,rs(this.flatCoordinates,0,this.ends_,this.stride,e,t,s))}getCoordinates(){return It(this.flatCoordinates,0,this.ends_,this.stride)}getEnds(){return this.ends_}getLineString(e){return e<0||this.ends_.length<=e?null:new Me(this.flatCoordinates.slice(e===0?0:this.ends_[e-1],this.ends_[e]),this.layout)}getLineStrings(){const e=this.flatCoordinates,t=this.ends_,s=this.layout,i=[];let r=0;for(let o=0,a=t.length;o<a;++o){const l=t[o],g=new Me(e.slice(r,l),s);i.push(g),r=l}return i}getFlatMidpoints(){const e=[],t=this.flatCoordinates;let s=0;const i=this.ends_,r=this.stride;for(let o=0,a=i.length;o<a;++o){const l=i[o],g=et(t,s,l,r,.5);D(e,g),s=l}return e}getSimplifiedGeometryInternal(e){const t=[],s=[];return t.length=bt(this.flatCoordinates,0,this.ends_,this.stride,e,t,0,s),new we(t,"XY",s)}getType(){return"MultiLineString"}intersectsExtent(e){return Lt(this.flatCoordinates,0,this.ends_,this.stride,e)}setCoordinates(e,t){this.setLayout(t,e,2),this.flatCoordinates||(this.flatCoordinates=[]);const s=kt(this.flatCoordinates,0,e,this.stride,this.ends_);this.flatCoordinates.length=s.length===0?0:s[s.length-1],this.changed()}}var ls=we;class Oe extends me{constructor(e,t){super();t&&!Array.isArray(e[0])?this.setFlatCoordinates(t,e):this.setCoordinates(e,t)}appendPoint(e){this.flatCoordinates?D(this.flatCoordinates,e.getFlatCoordinates()):this.flatCoordinates=e.getFlatCoordinates().slice(),this.changed()}clone(){const e=new Oe(this.flatCoordinates.slice(),this.layout);return e.applyProperties(this),e}closestPointXY(e,t,s,i){if(i<re(this.getExtent(),e,t))return i;const r=this.flatCoordinates,o=this.stride;for(let a=0,l=r.length;a<l;a+=o){const g=Tt(e,t,r[a],r[a+1]);if(g<i){i=g;for(let h=0;h<o;++h)s[h]=r[a+h];s.length=o}}return i}getCoordinates(){return De(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getPoint(e){const t=this.flatCoordinates?this.flatCoordinates.length/this.stride:0;return e<0||t<=e?null:new U(this.flatCoordinates.slice(e*this.stride,(e+1)*this.stride),this.layout)}getPoints(){const e=this.flatCoordinates,t=this.layout,s=this.stride,i=[];for(let r=0,o=e.length;r<o;r+=s){const a=new U(e.slice(r,r+s),t);i.push(a)}return i}getType(){return"MultiPoint"}intersectsExtent(e){const t=this.flatCoordinates,s=this.stride;for(let i=0,r=t.length;i<r;i+=s){const o=t[i],a=t[i+1];if(Bt(e,o,a))return!0}return!1}setCoordinates(e,t){this.setLayout(t,e,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Ze(this.flatCoordinates,0,e,this.stride),this.changed()}}var st=Oe;function ds(n,e,t,s){const i=[];let r=jt();for(let o=0,a=t.length;o<a;++o){const l=t[o];r=Vt(n,e,l[0],s),i.push((r[0]+r[2])/2,(r[1]+r[3])/2),e=l[l.length-1]}return i}class Ae extends me{constructor(e,t,s){super();if(this.endss_=[],this.flatInteriorPointsRevision_=-1,this.flatInteriorPoints_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,!s&&!Array.isArray(e[0])){let i=this.getLayout();const r=e,o=[],a=[];for(let l=0,g=r.length;l<g;++l){const h=r[l];l===0&&(i=h.getLayout());const w=o.length,y=h.getEnds();for(let _=0,f=y.length;_<f;++_)y[_]+=w;D(o,h.getFlatCoordinates()),a.push(y)}t=i,e=o,s=a}t!==void 0&&s?(this.setFlatCoordinates(t,e),this.endss_=s):this.setCoordinates(e,t)}appendPolygon(e){let t;if(!this.flatCoordinates)this.flatCoordinates=e.getFlatCoordinates().slice(),t=e.getEnds().slice(),this.endss_.push();else{const s=this.flatCoordinates.length;D(this.flatCoordinates,e.getFlatCoordinates()),t=e.getEnds().slice();for(let i=0,r=t.length;i<r;++i)t[i]+=s}this.endss_.push(t),this.changed()}clone(){const e=this.endss_.length,t=new Array(e);for(let i=0;i<e;++i)t[i]=this.endss_[i].slice();const s=new Ae(this.flatCoordinates.slice(),this.layout,t);return s.applyProperties(this),s}closestPointXY(e,t,s,i){return i<re(this.getExtent(),e,t)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Qt(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Yt(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,e,t,s,i))}containsXY(e,t){return Nt(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,e,t)}getArea(){return Ut(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)}getCoordinates(e){let t;return e!==void 0?(t=this.getOrientedFlatCoordinates().slice(),Ke(t,0,this.endss_,this.stride,e)):t=this.flatCoordinates,Wt(t,0,this.endss_,this.stride)}getEndss(){return this.endss_}getFlatInteriorPoints(){if(this.flatInteriorPointsRevision_!=this.getRevision()){const e=ds(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=Ht(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,e),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_}getInteriorPoints(){return new st(this.getFlatInteriorPoints().slice(),"XYM")}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const e=this.flatCoordinates;Xt(e,0,this.endss_,this.stride)?this.orientedFlatCoordinates_=e:(this.orientedFlatCoordinates_=e.slice(),this.orientedFlatCoordinates_.length=Ke(this.orientedFlatCoordinates_,0,this.endss_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(e){const t=[],s=[];return t.length=Dt(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(e),t,0,s),new Ae(t,"XY",s)}getPolygon(e){if(e<0||this.endss_.length<=e)return null;let t;if(e===0)t=0;else{const r=this.endss_[e-1];t=r[r.length-1]}const s=this.endss_[e].slice(),i=s[s.length-1];if(t!==0)for(let r=0,o=s.length;r<o;++r)s[r]-=t;return new xe(this.flatCoordinates.slice(t,i),this.layout,s)}getPolygons(){const e=this.layout,t=this.flatCoordinates,s=this.endss_,i=[];let r=0;for(let o=0,a=s.length;o<a;++o){const l=s[o].slice(),g=l[l.length-1];if(r!==0)for(let w=0,y=l.length;w<y;++w)l[w]-=r;const h=new xe(t.slice(r,g),e,l);i.push(h),r=g}return i}getType(){return"MultiPolygon"}intersectsExtent(e){return Zt(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,e)}setCoordinates(e,t){this.setLayout(t,e,3),this.flatCoordinates||(this.flatCoordinates=[]);const s=Kt(this.flatCoordinates,0,e,this.stride,this.endss_);if(s.length===0)this.flatCoordinates.length=0;else{const i=s[s.length-1];this.flatCoordinates.length=i.length===0?0:i[i.length-1]}this.changed()}}var us=Ae,cs="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAvCAYAAADjNOpjAAABX0lEQVRIiWNkQAJyE/4zYAOK56aJPDRMfy13aYH9A/3kQ9jUPCqAGEWUgSx/fv7/w8LOwPz3N8NfZlZGbGpgBjJhNQEJyN5YNwdkGAj8ZWZlkL69ZQM+9QRdyPj/////jBiOwhAgyoViz08/wWIYg8jLC69w6cFr4CtJU2ls4m/EDURJNhDkOnyWiby8+JokA19LmGB1HQy8EdcXIdpA2VvrF2ILO3QgfQczxrHGMsufH///sHAQNJDl7y+GP8xsYDPwxjIxhoHVMbNhiGEYKPH4yE2iTIMCsWenHuI18K2EsRopBr4T05fDa+BvVk5SzGOAZUusBipcmudLkmkwfZcXJmI18Iu40VxyDPwsYdKL3UB+BWFyDPzCJyeA1cBfbDwEizNs4DcbFzw9oxjwn5GZHPMY/iMZg2Yg4eyG1UAkfWR5ER8YNXDUwFEDRw0cNXDUwFEDB4+BgxwwMDAAAAgmX6RKSPmqAAAAAElFTkSuQmCC",hs="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAzCAYAAAB8F5OAAAAAWUlEQVRYhe3YOwrAMBADUcn3v7NcuHECgeBPwGSmXl6xpRwp6kus0eyL1fAZ8Ck7ZTnatRV3khdnY537FnBwcHBwcHDw3+Pg4ODg4B/jtxljWYevFruWIkkV0WQUXM8Qu78AAAAASUVORK5CYII=";class gs{constructor(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.supportedMediaTypes=null}getReadOptions(e,t){if(t){let s=t.dataProjection?W(t.dataProjection):this.readProjection(e);t.extent&&s&&s.getUnits()==="tile-pixels"&&(s=W(s),s.setWorldExtent(t.extent)),t={dataProjection:s,featureProjection:t.featureProjection}}return this.adaptOptions(t)}adaptOptions(e){return Object.assign({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection},e)}getType(){return S()}readFeature(e,t){return S()}readFeatures(e,t){return S()}readGeometry(e,t){return S()}readProjection(e){return S()}writeFeature(e,t){return S()}writeFeatures(e,t){return S()}writeGeometry(e,t){return S()}}function it(n,e,t){const s=t?W(t.featureProjection):null,i=t?W(t.dataProjection):null;let r;if(s&&i&&!zt(s,i)?r=(e?n.clone():n).transform(e?s:i,e?i:s):r=n,e&&t&&t.decimals!==void 0){const o=Math.pow(10,t.decimals),a=function(l){for(let g=0,h=l.length;g<h;++g)l[g]=Math.round(l[g]*o)/o;return l};r===n&&(r=n.clone()),r.applyTransform(a)}return r}class fs extends gs{constructor(){super()}getType(){return"json"}readFeature(e,t){return this.readFeatureFromObject(Fe(e),this.getReadOptions(e,t))}readFeatures(e,t){return this.readFeaturesFromObject(Fe(e),this.getReadOptions(e,t))}readFeatureFromObject(e,t){return S()}readFeaturesFromObject(e,t){return S()}readGeometry(e,t){return this.readGeometryFromObject(Fe(e),this.getReadOptions(e,t))}readGeometryFromObject(e,t){return S()}readProjection(e){return this.readProjectionFromObject(Fe(e))}readProjectionFromObject(e){return S()}writeFeature(e,t){return JSON.stringify(this.writeFeatureObject(e,t))}writeFeatureObject(e,t){return S()}writeFeatures(e,t){return JSON.stringify(this.writeFeaturesObject(e,t))}writeFeaturesObject(e,t){return S()}writeGeometry(e,t){return JSON.stringify(this.writeGeometryObject(e,t))}writeGeometryObject(e,t){return S()}}function Fe(n){if(typeof n=="string"){const e=JSON.parse(n);return e||null}else return n!==null?n:null}var ms=fs;class ps extends ms{constructor(e){e=e||{};super();this.dataProjection=W(e.dataProjection?e.dataProjection:"EPSG:4326"),e.featureProjection&&(this.defaultFeatureProjection=W(e.featureProjection)),this.geometryName_=e.geometryName,this.extractGeometryName_=e.extractGeometryName,this.supportedMediaTypes=["application/geo+json","application/vnd.geo+json"]}readFeatureFromObject(e,t){let s=null;e.type==="Feature"?s=e:s={type:"Feature",geometry:e,properties:null};const i=Ie(s.geometry,t),r=new Z;return this.geometryName_?r.setGeometryName(this.geometryName_):this.extractGeometryName_&&"geometry_name"in s!==void 0&&r.setGeometryName(s.geometry_name),r.setGeometry(i),"id"in s&&r.setId(s.id),s.properties&&r.setProperties(s.properties,!0),r}readFeaturesFromObject(e,t){const s=e;let i=null;if(s.type==="FeatureCollection"){const r=e;i=[];const o=r.features;for(let a=0,l=o.length;a<l;++a)i.push(this.readFeatureFromObject(o[a],t))}else i=[this.readFeatureFromObject(e,t)];return i}readGeometryFromObject(e,t){return Ie(e,t)}readProjectionFromObject(e){const t=e.crs;let s;return t?t.type=="name"?s=W(t.properties.name):t.type==="EPSG"?s=W("EPSG:"+t.properties.code):Jt(!1,36):s=this.dataProjection,s}writeFeatureObject(e,t){t=this.adaptOptions(t);const s={type:"Feature",geometry:null,properties:null},i=e.getId();if(i!==void 0&&(s.id=i),!e.hasProperties())return s;const r=e.getProperties(),o=e.getGeometry();return o&&(s.geometry=be(o,t),delete r[e.getGeometryName()]),qt(r)||(s.properties=r),s}writeFeaturesObject(e,t){t=this.adaptOptions(t);const s=[];for(let i=0,r=e.length;i<r;++i)s.push(this.writeFeatureObject(e[i],t));return{type:"FeatureCollection",features:s}}writeGeometryObject(e,t){return be(e,this.adaptOptions(t))}}function Ie(n,e){if(!n)return null;let t;switch(n.type){case"Point":{t=vs(n);break}case"LineString":{t=Cs(n);break}case"Polygon":{t=Fs(n);break}case"MultiPoint":{t=ws(n);break}case"MultiLineString":{t=_s(n);break}case"MultiPolygon":{t=As(n);break}case"GeometryCollection":{t=ys(n);break}default:throw new Error("Unsupported GeoJSON type: "+n.type)}return it(t,!1,e)}function ys(n,e){const t=n.geometries.map(function(s){return Ie(s,e)});return new as(t)}function vs(n){return new U(n.coordinates)}function Cs(n){return new Me(n.coordinates)}function _s(n){return new ls(n.coordinates)}function ws(n){return new st(n.coordinates)}function As(n){return new us(n.coordinates)}function Fs(n){return new xe(n.coordinates)}function be(n,e){n=it(n,!0,e);const t=n.getType();let s;switch(t){case"Point":{s=Rs(n);break}case"LineString":{s=Ps(n);break}case"Polygon":{s=Ms(n,e);break}case"MultiPoint":{s=xs(n);break}case"MultiLineString":{s=Ss(n);break}case"MultiPolygon":{s=Gs(n,e);break}case"GeometryCollection":{s=Es(n,e);break}case"Circle":{s={type:"GeometryCollection",geometries:[]};break}default:throw new Error("Unsupported geometry type: "+t)}return s}function Es(n,e){e=Object.assign({},e),delete e.featureProjection;const t=n.getGeometriesArray().map(function(s){return be(s,e)});return{type:"GeometryCollection",geometries:t}}function Ps(n,e){return{type:"LineString",coordinates:n.getCoordinates()}}function Ss(n,e){return{type:"MultiLineString",coordinates:n.getCoordinates()}}function xs(n,e){return{type:"MultiPoint",coordinates:n.getCoordinates()}}function Gs(n,e){let t;return e&&(t=e.rightHanded),{type:"MultiPolygon",coordinates:n.getCoordinates(t)}}function Rs(n,e){return{type:"Point",coordinates:n.getCoordinates()}}function Ms(n,e){let t;return e&&(t=e.rightHanded),{type:"Polygon",coordinates:n.getCoordinates(t)}}var Os=ps,Is="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEEAAABBCAYAAACO98lFAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABtRJREFUeNrsmQlMVEcYgP+3LLu6LLuc2op44g3UpgYv1FKj0Vql2iguobVEoyXRtCmRiLZSLIpgJFAVr1J7qaU2JdKq2IpHpUKoVQsWRIKt4AEsXWAP5Np9nZm3+96uxKrJXjbzJ3/evGFm+Od7//wz/yzDsiw4WYKQLkI6EWkIUqW5/hrSRqQnkJY60yDGiRBikSY060yR52q64EZjDzRojKDr5P7/2OfEECAXwczRUnhhsCeGsRfpDqQP/g8Q5uHJX6nvWZRTrAP0fGwHDCN+mheoIvqDpweTjKq2P8sQ3m9/YNr54XEt4K//tPK80gO2LVbApKGSHPSaiNT4rEFIq23u3fRefhvUa2xtn4VcPmKYBIb4e4CiH0Pqqu/3knbFN7qgSSu0R54A6+fKkVfI8PJY5wgQjoKwFk1oV+ynGkCewFe+NUUGsZNlEOTj8Z+dT1Z2QuqPWujoFmzbON8bg9htBuH2EML0XWxFXJ4G6tS9fOXOpUqYO77fEw9y/V4PpP6gRQGUG0OEHObAm74webjkA/S61Z4GixzgBQnZZ3Q2APJW+D4VACyhgzzh2Bp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fR0glgZQLIwelck2z4NlCRXnMCvZrUruwJQ4xfr6I8ffFiaVLWLu6fXu2EOryriFh3FikfB2KJi1bCn2sVrF3q5B8ce3cDaqBI+hUSZcwdmmoWcU9OcMz0a/2LGkref78Ofn7xg0S0bEDObJiOSvTOnv7fXs8a6e7x6yf9wttxotnRecQU2oSnQXhUm6b30Q+YUPZ9shlNItkxT0pHQr/Pg3yk7d/P7qNHy9snCqCB4O37AtYCs7jcDagVNK1jHPkpIoaHGd8+skHoDtIiqKrFqp9GY32yZ1MhnlVqCVQNxXeTrlEhfgKwE5ImFSRck2wUgKlcqZ6w48scAr/x3WYd8fW+tZfZ1zOBUEASrNZi6kAsVYBpORNptc2l8auCS+LWydUKCMToRg2vn5npjJUfzYERPeQ3br6+MHjyFUqajsAwrbUGXKMbcFxOv2Mcai0HHgYip3H4NKj38vPiuC/mQWSbknMurRQw+PQJfpXgeYXt4iCd+DPwUoRlMopmph9ULbrJFTyy6aDv5lT56fAbVkrCEDRfJdABYh8WQApeZMiUFIVrT2XtIpPgYt7TQ5EXwwSMRfEXFXrkEQSooH9thxE8zkraS6BZpmX1/0KB6LWgMQWXZF+VJR2KwzsQwoKCmwWu060HzDMD6b7AZqb86rLr7OJQG0zzTfaD7QgZCR59OgRKdgZJarXhwYSugUnhAx6nU+HowEisEz0i73bxEKETRXdP/10qDWHOLY+f84qAhOi9Ie1ooHbJ2bp/ywIIVMb4svhaIQInlSIkm/DRAIUj+pGuGfFVIDQhvpyZhGo+TEh1i+wCDDGj3DFOuFg9H8RgZqPdY2omQFhjfXhcPwLEaw2u+YTaXRfGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZBwfAPyS0NpIuz6SbAAAAAElFTkSuQmCC",Ls="./assets/gps.6db62e8f.png";const B=n=>(We("data-v-5b71bffe"),n=n(),He(),n),ks=B(()=>u("div",{id:"mapHis",style:{height:"calc(100vh - 84px)",width:"100%"}},null,-1)),Ts={style:{position:"absolute",left:"0.5em",top:"0.5em"}},Bs={slot:"header",class:"clearfix bg-blue padding-sm"},Vs={class:"padding-sm"},js={class:"item flex align-center"},Qs={style:{width:"60px","font-size":"28px"}},Ys={style:{width:"calc(100% - 60px)"}},Ns={class:"item flex align-center margin-tb-sm"},Us=B(()=>u("div",{style:{width:"60px"}},"\u901F\u5EA6\uFF1A",-1)),Ws={style:{width:"calc(100% - 60px)"}},Hs={class:"item flex align-center"},Xs=B(()=>u("div",{style:{width:"50px"}},"\u5F00\u59CB\uFF1A",-1)),Ds={class:"item flex align-center margin-tb-sm"},Zs=B(()=>u("div",{style:{width:"50px"}},"\u7ED3\u675F\uFF1A",-1)),Ks={class:"item",style:{"padding-left":"50px"}},zs=N("\u67E5\u8BE2"),Js={id:"mapOpen",class:"mapOpen"},qs={class:"mapTitle"},$s={id:"mapCont",class:"mapCont"},ei=B(()=>u("div",null,"\u7ECF\u5EA6\uFF1A",-1)),ti=B(()=>u("div",null,"\u7ECF\u5EA6\uFF1A",-1)),si=B(()=>u("div",null,"\u822A\u901F\uFF1A",-1)),ii=B(()=>u("div",null,"\u8239\u824F\u5411\uFF1A",-1)),ni=B(()=>u("div",null,"\u822A\u8FF9\u5411\uFF1A",-1)),ri={props:{oneShip:{type:Object,default:{}}},setup(n){const e=n;Qe();const{proxy:t}=dt(),s=$(!1);let i=0,r,o=["---","---","---","---","---","---","---","---"],a=$(null);var l=null,g=null,h=null,w=null,y=null,_=null,f=null,E={route:new K({stroke:new Ge({width:6,color:[237,212,0,0]})}),geoMarker:new K({image:new $t({radius:7,fill:new oe({color:"black"}),stroke:new Ge({color:"red",width:2})})})};const b=ge({center:ee([118.26718,22.45402]),zoom:14,minZoom:2,maxZoom:18}),{oneShip:M}=Pe(e);Ye(M,v=>{c(),i=0,ue()},{deep:!0});const H=ge({queryParams:{key:"643a63b2f21104345c47104702061afe",mmsi:"",start:"",end:""},selectedDays:[t.parseTime(new Date,"{y}-{m}-{d}")+" 00:00:00",t.parseTime(new Date,"{y}-{m}-{d}")+" 23:59:59"],lengSli:0,speedSli:4,nowHis:["---","---","---","---","---","---","---","---"]}),{queryParams:L,selectedDays:V,lengSli:j,speedSli:z,nowHis:A}=Pe(H),de=function(){const v=new ye({visible:!0,source:new ve({url:"https://t1.tianditu.gov.cn/vec_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=vec&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILECOL={x}&TILEROW={y}&TILEMATRIX={z}&tk=317e52a409b6b382957e09003ee7e235"}),isGroup:!0,name:"\u5929\u5730\u56FE\u8DEF\u7F51"}),C=new ye({visible:!0,source:new ve({url:"https://t3.tianditu.gov.cn/cva_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=cva&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILECOL={x}&TILEROW={y}&TILEMATRIX={z}&tk=317e52a409b6b382957e09003ee7e235"}),isGroup:!0,name:"\u5929\u5730\u56FE\u6587\u5B57\u6807\u6CE8"});a.value=new Je({layers:[v,C],view:new qe(b),target:"mapHis"})},ue=function(){M.value.mmsi!=""&&(L.value.mmsi=M.value.mmsi,L.value.start=new Date(V.value[0]).getTime(),L.value.end=new Date(V.value[1]).getTime(),es(L.value).then(v=>{let C=[],O=ts(v.data)[L.value.mmsi];O=O.reverse(),O.forEach((m,x)=>{let J=ee([m.lon,m.lat],"EPSG:4326");m.glng=J[0],m.glat=J[1],C.push([m.glng,m.glat,t.parseTime(new Date(parseInt(m.createdAt)),"{y}-{m}-{d} {h}:{m}:{s}"),m.speed==""?0:m.speed,m.hdg==""?0:m.hdg,m.cog==""?0:m.cog,m.lon,m.lat])}),A.value=C[0],o=C[C.length-1];const Q={type:"Feature",properties:{},geometry:{type:"LineString",coordinates:C}};_=new Os().readFeature(Q,{dataProjection:"EPSG:4326",featureProjection:"EPSG:3857"}).getGeometry();const I=new Z({type:"route",geometry:_});f=new U(_.getFirstCoordinate()),y=new Z({type:"geoMarker",geometry:f}),ce(),l=new ae({source:new le({features:[I]}),style:se,zIndex:2}),g=new ae({source:new le({features:[I,y]}),style:function(m){return E[m.get("type")]},zIndex:100}),h=Y(_.getFirstCoordinate(),Is),w=Y(_.getLastCoordinate(),bs),a.value.addLayer(h),a.value.addLayer(w),a.value.addLayer(g),a.value.addLayer(l),a.value.getView().animate({center:_.getFirstCoordinate(),duration:1e3});function k(m){return new K({image:new pe({src:m,anchor:[.5,.5],scale:1.1})})}function Y(m,x){return new ae({style:k(x),source:new le({features:[new Z({geometryName:"centerMark",geometry:new U(m)})]})})}function se(m,x){for(var J=m.getGeometry(),nt=J.getLength(),rt=100*x/nt,Le=1e4,ke=[new K({stroke:new Ge({color:"red",width:2})})],Ee=0;Ee<=1;Ee+=rt){var ie=J.getCoordinateAt(Ee);J.forEachSegment(function(q,X){if(!(q[0]==X[0]||q[1]==X[1])){var Te=X[0]-ie[0],Be=X[1]-ie[1],Ve=ie[0]-q[0],je=ie[1]-q[1];if(Te!=Ve&&Be!=je&&Math.abs(Le*Te*je-Le*Ve*Be)<.001){var ot=X[0]-q[0],at=X[1]-q[1],lt=Math.atan2(at,ot);ke.push(new K({geometry:new U(ie),image:new pe({scale:.1,src:Ls,anchor:[.5,.5],rotation:-lt+Math.PI*3/2}),text:new ze({text:X[2],textAlign:"center",textBaseline:"middle",font:"normal 10px \u5FAE\u8F6F\u96C5\u9ED1",offsetX:0,offsetY:16,fill:new oe({color:"#000"}),backgroundFill:new oe({color:"rgba(255, 255, 255, 0.8)"}),padding:[2,4,2,4]})}))}}})}return ke}}))},ce=function(){l!=null&&(i=0,j.value=0,l.getSource().clear(),g.getSource().clear(),h.getSource().clear(),w.getSource().clear())};function he(v){const C=Number(z.value),O=v.frameState.time,Q=O-r;if(i=(i+C*10*Q/1e6)%2,r=O,i>1){c(),i=0,A.value=o;return}j.value=i;const I=_.getCoordinateAt(i);f.setCoordinates(I);const k=os(v);k.setStyle(E.geoMarker),k.drawGeometry(f),A.value=I,a.value.render()}function d(){s.value=!0,r=Date.now(),g.on("postrender",he),y.setGeometry(null)}function c(){s.value=!1,y.setGeometry(f),g.un("postrender",he)}return Ne(()=>{de()}),(v,C)=>{const O=P("videoPlay"),Q=P("el-icon"),I=P("videoPause"),k=P("el-slider"),Y=P("el-date-picker"),se=P("el-button"),m=P("el-card");return T(),fe("div",null,[ks,u("div",Ts,[F(m,{class:"box-card","body-style":{width:"300px",padding:"0px !important"}},{default:R(()=>[u("div",Bs,[u("span",null,G(p(M).name),1)]),u("div",Vs,[u("div",js,[u("div",Qs,[s.value?(T(),ne(Q,{key:1,onClick:c},{default:R(()=>[F(I)]),_:1})):(T(),ne(Q,{key:0,onClick:d},{default:R(()=>[F(O)]),_:1}))]),u("div",Ys,[F(k,{modelValue:p(j),"onUpdate:modelValue":C[0]||(C[0]=x=>Ue(j)?j.value=x:null),max:1,min:0},null,8,["modelValue"])])]),u("div",Ns,[Us,u("div",Ws,[F(k,{modelValue:p(z),"onUpdate:modelValue":C[1]||(C[1]=x=>Ue(z)?z.value=x:null),max:10,min:0},null,8,["modelValue"])])]),u("div",Hs,[Xs,F(Y,{modelValue:p(V)[0],"onUpdate:modelValue":C[2]||(C[2]=x=>p(V)[0]=x),type:"datetime",placeholder:"\u9009\u62E9\u65E5\u671F\u65F6\u95F4"},null,8,["modelValue"])]),u("div",Ds,[Zs,F(Y,{modelValue:p(V)[1],"onUpdate:modelValue":C[3]||(C[3]=x=>p(V)[1]=x),type:"datetime",placeholder:"\u9009\u62E9\u65E5\u671F\u65F6\u95F4"},null,8,["modelValue"])]),u("div",Ks,[F(se,{style:{width:"100%"},type:"primary",onClick:ue},{default:R(()=>[zs]),_:1})])])]),_:1})]),u("div",Js,[u("div",qs,G(p(A)[2].split("NaN")[0]),1),u("div",$s,[u("div",null,[ei,u("div",null,G(p(A)[6]=="---"?"---":parseFloat(p(A)[6])),1)]),u("div",null,[ti,u("div",null,G(p(A)[7]=="---"?"---":parseFloat(p(A)[7])),1)]),u("div",null,[si,u("div",null,G(p(A)[3]=="---"?"---":parseFloat(p(A)[3]).toFixed(1))+" km/h",1)]),u("div",null,[ii,u("div",null,G(p(A)[4]=="---"?"---":parseFloat(p(A)[4]).toFixed(1))+" \xB0",1)]),u("div",null,[ni,u("div",null,G(p(A)[5]=="---"?"---":parseFloat(p(A)[5]).toFixed(1))+" \xB0",1)])])])])}}};var oi=$e(ri,[["__scopeId","data-v-5b71bffe"]]);const te=n=>(We("data-v-3b24add4"),n=n(),He(),n),ai={class:"padding-lr-sm"},li={class:"head-container"},di={class:"head-container",style:{height:"calc(100vh - 126px)","overflow-y":"auto"}},ui=te(()=>u("div",{id:"map",style:{height:"calc(100vh - 84px)",width:"100%"}},null,-1)),ci={style:{position:"absolute",left:"0.5em",top:"0.5em"}},hi={slot:"header",class:"clearfix bg-blue padding-sm"},gi={style:{padding:"10px 20px"}},fi={class:"text item"},mi=te(()=>u("span",{class:"text-blue"},"\u7ECF\u5EA6\uFF1A",-1)),pi={class:"text item",style:{padding:"5px 0"}},yi=te(()=>u("span",{class:"text-blue"},"\u7EAC\u5EA6\uFF1A",-1)),vi={class:"text item"},Ci=te(()=>u("span",{class:"text-blue"},"\u822A\u901F\uFF1A",-1)),_i={class:"text item"},wi=te(()=>u("span",{class:"text-blue"},"\u5403\u6C34\uFF1A",-1)),Ai={class:"text item",style:{padding:"5px 0"}},Fi=te(()=>u("span",{class:"text-blue"},"\u8239\u824F\u5411\uFF1A",-1)),Ei={style:{position:"absolute",right:"0.5em",top:"0.5em","z-index":"2005"}},Pi=N("\u5386\u53F2\u8F68\u8FF9"),Si=N("\u5B9E\u65F6\u4F4D\u7F6E"),xi={key:0,style:{position:"absolute",right:"0",top:"0",width:"100%","z-index":"2000","background-color":"#000"}},Gi={setup(n){const e=Qe();let t=$(null),s=$(null);const i=ge({center:ee([118.26718,22.45402]),zoom:14,minZoom:2,maxZoom:18});let r=ns(),o=null,a=[],l=!1,g={},h=null;const w=$(""),y=$([]),_=ge({nowShip:{mmsi:"",name:"-----",lon:"-----",lat:"-----",hdg:"-----",sog:"-----"},hisShip:{},showHis:!1}),{nowShip:f,showHis:E,hisShip:b}=Pe(_),M=function(d){L(d)},H=function(d){if(d=="")y.value=a;else{let c=[];a.forEach(v=>{JSON.stringify(v).indexOf(d)!=-1&&c.push(v)}),y.value=c}},L=function(d){if(f.value.mmsi!=d){let c=y.value;for(let v=0;v<c.length;v++)if(c[v].mmsi==d){f.value=c[v],ce(f.value);break}}},V=function(){let d=document.getElementById("map");for(;d.firstChild;)d.removeChild(d.firstChild);t.value!=null&&t.value.clear();const c=new ye({visible:!0,source:new ve({url:"https://t1.tianditu.gov.cn/vec_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=vec&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILECOL={x}&TILEROW={y}&TILEMATRIX={z}&tk=317e52a409b6b382957e09003ee7e235"}),isGroup:!0,name:"\u5929\u5730\u56FE\u8DEF\u7F51"}),v=new ye({visible:!0,source:new ve({url:"https://t3.tianditu.gov.cn/cva_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=cva&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILECOL={x}&TILEROW={y}&TILEMATRIX={z}&tk=317e52a409b6b382957e09003ee7e235"}),isGroup:!0,name:"\u5929\u5730\u56FE\u6587\u5B57\u6807\u6CE8"});t.value=new Je({layers:[c,v],view:new qe(i),target:"map"});var C=new Z({});C.setStyle(j(C)),s.value=new le({features:[C]}),h!=null&&t.value.removeLayer(h),h=new ae({source:s.value}),t.value.addLayer(h)},j=function(d){return new K({image:new pe({anchor:d.values_==null?[0,0]:d.values_.anchor==null?[.5,.98]:d.values_.anchor,anchorOrigin:"top-right",src:hs,rotation:(d.values_==null||d.values_.cog==null?0:d.values_.cog)*(Math.PI/180)})})},z=function(d){var c=new Z({geometry:new U(ee(d.ol)),name:d.name,key:d.mmsi,cog:d.hdg,anchor:d.anchor,status:d.sog});c.setStyle(A(c)),g[d.mmsi]=new ae({source:new le({features:[c]})}),t.value.addLayer(g[d.mmsi])},A=function(d){return new K({image:new pe({anchor:d.values_==null?[0,0]:d.values_.anchor==null?[.5,1]:d.values_.anchor,anchorOrigin:"top-right",src:cs,rotation:(d.values_==null||d.values_.cog==null?0:d.values_.cog)*(Math.PI/180)}),text:new ze({textAlign:"center",font:"10px \u5FAE\u8F6F\u96C5\u9ED1",offsetX:0,offsetY:16,text:d.get("name"),fill:new oe({color:"#000"}),backgroundFill:new oe({color:"rgba(255, 255, 255, 0.8)"}),padding:[2,4,2,4]})})},de=function(){ss(r.toString()).then(d=>{if(d.data!=null){let c="";d.data!=null?(c=d.data,localStorage.setItem("Histroy-List",c)):localStorage.getItem("Histroy-List")!=null&&localStorage.getItem("Histroy-List")!=null?c=localStorage.getItem("Histroy-List"):c="";let v=is(c);f.value=v[0],ue(v)}})},ue=function(d){d.forEach(c=>{g[c.mmsi]!=null&&(g[c.mmsi].getSource().clear(),t.value.removeLayer(g[c.mmsi])),z(c)}),e.state.data.shipList=d,e.state.data.curShipMMsi==null&&(e.state.data.curShipMMsi="413859981"),f.value=d.filter(c=>c.mmsi==e.state.data.curShipMMsi)[0],e.state.data.curShipMMsi=f.value.mmsi,e.state.data.curShipSn=f.value.sn,e.state.data.curShipDevice=f.value.device,y.value=d,a=d,l||(l=!0,ce(f.value))},ce=function(d){s.value.clear();var c=new Z({geometry:new U(ee(d.ol)),cog:d.hdg,anchor:d.anchor,status:d.sog});c.setStyle(j(c)),s.value.addFeature(c),t.value.getView().animate({center:ee(f.value.ol),duration:1e3}),b.value=f.value,e.state.data.curShipMMsi=f.value.mmsi,e.state.data.curShipSn=f.value.sn,e.state.data.curShipDevice=f.value.device},he=function(){t.value&&t.value.on("click",function(d){if(!!t.value){var c=t.value.forEachFeatureAtPixel(d.pixel,function(v,C){return v});c!=null&&L(c.values_.key)}})};return Ye([()=>e.state.data.curShipMMsi],([d])=>{L(d)}),Ne(()=>{V(),l=!1,setTimeout(()=>{de(),o=setInterval(()=>{de()},30*1e3),he()},100)}),ut(()=>{clearInterval(o)}),(d,c)=>{const v=P("el-input"),C=P("svg-icon"),O=P("el-menu-item"),Q=P("el-menu"),I=P("el-col"),k=P("el-card"),Y=P("el-button"),se=P("el-row");return T(),fe("div",ai,[F(se,{gutter:20},{default:R(()=>[F(I,{span:3,xs:6},{default:R(()=>[u("div",li,[F(v,{placeholder:"\u8BF7\u8F93\u5165\u8239\u8236\u540D\u79F0",clearable:"","prefix-icon":"Search",style:{"margin-top":"10px"},onInput:H,modelValue:w.value,"onUpdate:modelValue":c[0]||(c[0]=m=>w.value=m)},null,8,["modelValue"])]),u("div",di,[F(Q,{"default-active":""+p(f).mmsi,onSelect:M},{default:R(()=>[(T(!0),fe(ct,null,ht(y.value,(m,x)=>(T(),ne(O,{index:""+m.mmsi,key:x},{title:R(()=>[F(C,{"icon-class":"ship",class:"text-blue"}),u("span",null,G(m.name),1)]),_:2},1032,["index"]))),128))]),_:1},8,["default-active"])])]),_:1}),F(I,{span:21,xs:18,style:{position:"relative",padding:"0"}},{default:R(()=>[ui,u("div",ci,[F(k,{class:"box-card","body-style":{width:"200px",padding:"0px !important"}},{default:R(()=>[u("div",hi,[u("span",null,G(p(f).name),1)]),u("div",gi,[u("div",fi,[mi,N(G(p(f).lon),1)]),u("div",pi,[yi,N(G(p(f).lat),1)]),u("div",vi,[Ci,N(G(p(f).sog)+" \u8282",1)]),u("div",_i,[wi,N(G(p(f).draught)+" m",1)]),u("div",Ai,[Fi,N(G(p(f).hdg)+" \xB0",1)])])]),_:1})]),u("div",Ei,[p(E)?Se("",!0):(T(),ne(Y,{key:0,type:"primary",onClick:c[1]||(c[1]=m=>E.value=!0)},{default:R(()=>[Pi]),_:1})),p(E)?(T(),ne(Y,{key:1,type:"primary",onClick:c[2]||(c[2]=m=>E.value=!1)},{default:R(()=>[Si]),_:1})):Se("",!0)]),p(E)?(T(),fe("div",xi,[F(p(oi),{oneShip:p(b)},null,8,["oneShip"])])):Se("",!0)]),_:1})]),_:1})])}}};var Ii=$e(Gi,[["__scopeId","data-v-3b24add4"]]);export{Ii as default};