@signalk/freeboard-sk 3.4.0 → 3.5.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/README.md +3 -1
  2. package/package.json +2 -2
  3. package/public/assets/features/radar-overlay-2.jpg +0 -0
  4. package/public/assets/features/radar-targets-1.jpg +0 -0
  5. package/public/assets/features/route-styles-1.jpg +0 -0
  6. package/public/assets/features-corpus.json +1 -1
  7. package/public/assets/help/img/ais_shiptypes.png +0 -0
  8. package/public/assets/help/index.html +81 -27
  9. package/public/assets/img/routes/route-end.svg +6 -0
  10. package/public/assets/img/routes/route-start.svg +6 -0
  11. package/public/assets/img/routes/route-waypoint.svg +9 -0
  12. package/public/assets/img/vessels/ais_fishing.svg +33 -0
  13. package/public/chunk-2EKPI63M.js +1 -0
  14. package/public/{chunk-VBSJZWSI.js → chunk-2H73O7R4.js} +1 -1
  15. package/public/{chunk-DN6IX7CO.js → chunk-2JAD5V57.js} +1 -1
  16. package/public/{chunk-GJZ7P5CR.js → chunk-4LLIVPOH.js} +1 -1
  17. package/public/chunk-67S772YL.js +1 -0
  18. package/public/{chunk-O7ZJUEKN.js → chunk-6BSDRWQ3.js} +1 -1
  19. package/public/{chunk-PWZFOOT4.js → chunk-6EZKIXYQ.js} +1 -1
  20. package/public/{chunk-MWETYHR7.js → chunk-7ISDSY26.js} +1 -1
  21. package/public/chunk-7VLEFGRK.js +1 -0
  22. package/public/{chunk-ZQSUYMH2.js → chunk-BNDXOOFA.js} +1 -1
  23. package/public/{chunk-PWNYMCP2.js → chunk-CJARACLQ.js} +1 -1
  24. package/public/{chunk-RENDTMDT.js → chunk-G5EXGCP4.js} +1 -1
  25. package/public/chunk-GHLF3D5Z.js +2 -0
  26. package/public/chunk-GVY3IGQP.js +1 -0
  27. package/public/{chunk-AZQNOMPD.js → chunk-HHVNH6WV.js} +1 -1
  28. package/public/{chunk-A6WPZCNE.js → chunk-IQVXAJGE.js} +1 -1
  29. package/public/{chunk-WOU2FNU3.js → chunk-JPTPBTTP.js} +1 -1
  30. package/public/{chunk-VT4GQY5X.js → chunk-LH5NA6FP.js} +1 -1
  31. package/public/{chunk-DSUCHYD7.js → chunk-LRYGINIX.js} +1 -1
  32. package/public/{chunk-BC2VITG4.js → chunk-MFWKSXF7.js} +1 -1
  33. package/public/chunk-MR5B4XRH.js +1 -0
  34. package/public/{chunk-MZ3YWFFB.js → chunk-NXLWB5IV.js} +1 -1
  35. package/public/chunk-QD2NEHGC.js +1 -0
  36. package/public/{chunk-YBVURHD5.js → chunk-QJ2QMZLA.js} +1 -1
  37. package/public/{chunk-SIFYI3HU.js → chunk-SJSHCZKD.js} +1 -1
  38. package/public/{chunk-IP2UNZAT.js → chunk-TCWGFZUF.js} +1 -1
  39. package/public/{chunk-DC5AFSD6.js → chunk-THOUUI2P.js} +1 -1
  40. package/public/chunk-TLNMSJUF.js +1 -0
  41. package/public/{chunk-VXYZIAGN.js → chunk-TO4IOJWS.js} +1 -1
  42. package/public/{chunk-2GVS7ZQR.js → chunk-UOK6WTQH.js} +1 -1
  43. package/public/{chunk-S3D6SFT3.js → chunk-URCOHSFB.js} +127 -127
  44. package/public/chunk-V3SPESMB.js +7 -0
  45. package/public/{chunk-LAEWLVI3.js → chunk-VH2NXKOR.js} +1 -1
  46. package/public/chunk-W5SXKI6G.js +1 -0
  47. package/public/chunk-W7TSMHU3.js +1 -0
  48. package/public/chunk-XDKT43CW.js +4 -0
  49. package/public/{chunk-2QKJQDG4.js → chunk-XXJX5CGO.js} +14 -14
  50. package/public/index.html +1 -1
  51. package/public/main-ZCGBRKVF.js +359 -0
  52. package/public/worker-DI2XYCRR.js +3 -0
  53. package/public/chunk-6WBZNWRD.js +0 -1
  54. package/public/chunk-7TRPB24O.js +0 -1
  55. package/public/chunk-CRWXCOWS.js +0 -1
  56. package/public/chunk-K4EGDHPT.js +0 -2
  57. package/public/chunk-KVAJ5GVN.js +0 -1
  58. package/public/chunk-LEEF5WZZ.js +0 -1
  59. package/public/chunk-R6ABX6RX.js +0 -4
  60. package/public/chunk-RYULE37H.js +0 -1
  61. package/public/chunk-VX5OMNYT.js +0 -1
  62. package/public/chunk-WARJYBQ7.js +0 -7
  63. package/public/chunk-Z2IWHI3C.js +0 -1
  64. package/public/main-4HT3LEFF.js +0 -358
  65. package/public/worker-CDFJSLG6.js +0 -3
@@ -0,0 +1,359 @@
1
+ import{d as qr}from"./chunk-LH5NA6FP.js";import{$ as To,$a as lr,$b as Tn,A as lo,Aa as No,B as Ge,Ba as Bo,C as Ve,Ca as $o,D as pn,Da as zo,Db as Er,E as co,Ea as Uo,Eb as Tr,F as dt,Fa as qo,Fb as Mr,G as ut,Ga as Wo,Gb as Sr,Ha as Ho,Hb as Pr,Ia as Go,Ib as Ar,J as po,K as uo,Ka as jo,Kb as En,L as mo,La as Ko,Lb as kr,M as fo,Ma as Xo,Mb as Ir,N as ho,Na as Zo,Nb as Or,O as mt,Oa as wn,Ob as Rr,P as _o,Pa as bn,Pb as Dr,Q as go,Qa as Qo,Qb as Lr,R as vo,Ra as Yo,Rb as Vr,S as Co,Sa as Jo,Sb as Fr,T as dn,Ta as er,Tb as Nr,Ua as tr,V as ft,Va as nr,W as wo,Wa as ir,X as hn,Xa as or,Xb as Br,Y as Eo,Ya as rr,Z as ht,Za as ar,Zb as $r,_ as _n,_a as sr,_b as zr,a as Fi,b as Yi,d as Ji,da as j,db as cr,dc as xt,ea as Mo,eb as pr,ec as Ur,fa as gn,fb as dr,ga as vn,gb as ur,h as sn,ha as So,hb as mr,i as ln,ia as Cn,ib as Fe,ja as _t,jb as xn,ka as Po,kb as yn,la as Ao,lb as fr,ma as ko,mb as je,na as Io,nb as hr,oa as Oo,ob as bt,pa as Ro,pb as _r,q as oo,qa as gt,qb as gr,ra as vt,rb as vr,sa as Ct,sb as Cr,t as ro,ta as wt,tb as wr,ua as Do,ub as br,v as ao,va as Lo,vb as xr,w as He,wb as yr,xa as Vo,y as so,ya as Fo,z as cn}from"./chunk-URCOHSFB.js";import{c as Le}from"./chunk-QJ2QMZLA.js";import{d as yo}from"./chunk-CI2BDMX2.js";import{a as eo,g as to,i as no,k as io}from"./chunk-LRYGINIX.js";import"./chunk-NXLWB5IV.js";import"./chunk-SJSHCZKD.js";import{a as De}from"./chunk-4LLIVPOH.js";import"./chunk-G5EXGCP4.js";import"./chunk-2JAD5V57.js";import"./chunk-BNDXOOFA.js";import"./chunk-THOUUI2P.js";import{$a as we,C as $i,E as zi,F as Oe,G as Ui,Ha as Xi,K as an,Na as de,Oa as ue,U as qi,Wa as Re,Y as pt,Ya as Zi,_a as Qi,a as Oi,b as lt,e as Ri,f as Di,ha as Wi,k as Li,l as Vi,m as pe,ma as Hi,n as ct,na as Gi,pa as ji,q as Ni,ua as Me,w as rn,xa as Ki,y as Bi}from"./chunk-XXJX5CGO.js";import"./chunk-QD2NEHGC.js";import"./chunk-7FANVIZX.js";import"./chunk-GHLF3D5Z.js";import{c as un,d as bo,f as mn,h as xo,j as fn}from"./chunk-W7TSMHU3.js";import{$b as z,Ab as Ci,Bb as ot,Dc as Ai,E as li,Eb as We,Ec as G,F as ci,Fb as E,Fc as on,G as Qt,Gb as ke,Jb as h,Jc as ki,Kb as wi,Lb as c,Lc as st,Ma as mi,Mb as Ee,Na as ae,Nb as oe,O as Yt,Oa as fi,Ob as tn,Pa as ze,Pb as ee,Q as re,Qa as p,Qb as F,Qc as Ii,Rb as N,Tb as bi,Ua as Ue,Ub as xi,V as pi,Vb as Te,W as di,Wb as H,X as Jt,Xa as hi,Xb as V,Ya as Ae,Yb as rt,Z as _,Zb as at,_b as u,ab as D,ac as ve,bb as _i,cb as gi,d as ge,da as m,ea as f,fb as qe,gb as it,gc as yi,ha as en,hb as se,hc as Ei,ia as et,ic as Ti,ka as tt,kc as Ie,la as X,lb as le,lc as Mi,mb as ce,mc as nn,na as O,nc as Si,ob as Q,pa as $,pb as g,qb as v,r as Be,ra as nt,sb as ye,ta as Y,tb as q,ua as ui,ub as W,vb as w,vc as Pi,wb as s,xb as l,xc as Ce,y as si,yb as T,yc as R,z as $e,zb as vi}from"./chunk-XDKT43CW.js";import"./chunk-7ISDSY26.js";import"./chunk-V3SPESMB.js";import{a as ie,b as he,d as P,f as cl,g as B}from"./chunk-BZGM3F3K.js";var Se=P((Gf,jr)=>{"use strict";var yl="2.0.0",El=Number.MAX_SAFE_INTEGER||9007199254740991,Tl=16,Ml=250,Sl=[" ",`
2
+ `,"\v","\f","\r"," ","\xA0","\u1680","\u2000","\u2001","\u2002","\u2003","\u2004","\u2005","\u2006","\u2007","\u2008","\u2009","\u200A","\u2028","\u2029","\u202F","\u205F","\u3000","\uFEFF"],Pl=["major","premajor","minor","preminor","patch","prepatch","prerelease"];jr.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:Tl,MAX_SAFE_BUILD_LENGTH:Ml,MAX_SAFE_INTEGER:El,WHITESPACE_CHARACTERS:Sl,RELEASE_TYPES:Pl,SEMVER_SPEC_VERSION:yl,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Ke=P((jf,Kr)=>{"use strict";var Al=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...i)=>console.error("SEMVER",...i):()=>{};Kr.exports=Al});var Ne=P((fe,Xr)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:kn,MAX_SAFE_BUILD_LENGTH:kl,MAX_LENGTH:Il}=Se(),Ol=Ke();fe=Xr.exports={};var Rl=fe.re=[],Dl=fe.safeRe=[],b=fe.src=[],Ll=fe.safeSrc=[],x=fe.t={},Vl=0,In="[a-zA-Z0-9-]",Fl=[["\\s",1],["\\d",Il],[In,kl]],Nl=i=>{for(let[t,e]of Fl)i=i.split(`${t}*`).join(`${t}{0,${e}}`).split(`${t}+`).join(`${t}{1,${e}}`);return i},k=(i,t,e)=>{let n=Nl(t),o=Vl++;Ol(i,o,t),x[i]=o,b[o]=t,Ll[o]=n,Rl[o]=new RegExp(t,e?"g":void 0),Dl[o]=new RegExp(n,e?"g":void 0)};k("NUMERICIDENTIFIER","0|[1-9]\\d*");k("NUMERICIDENTIFIERLOOSE","\\d+");k("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${In}*`);k("MAINVERSION",`(${b[x.NUMERICIDENTIFIER]})\\.(${b[x.NUMERICIDENTIFIER]})\\.(${b[x.NUMERICIDENTIFIER]})`);k("MAINVERSIONLOOSE",`(${b[x.NUMERICIDENTIFIERLOOSE]})\\.(${b[x.NUMERICIDENTIFIERLOOSE]})\\.(${b[x.NUMERICIDENTIFIERLOOSE]})`);k("PRERELEASEIDENTIFIER",`(?:${b[x.NONNUMERICIDENTIFIER]}|${b[x.NUMERICIDENTIFIER]})`);k("PRERELEASEIDENTIFIERLOOSE",`(?:${b[x.NONNUMERICIDENTIFIER]}|${b[x.NUMERICIDENTIFIERLOOSE]})`);k("PRERELEASE",`(?:-(${b[x.PRERELEASEIDENTIFIER]}(?:\\.${b[x.PRERELEASEIDENTIFIER]})*))`);k("PRERELEASELOOSE",`(?:-?(${b[x.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${b[x.PRERELEASEIDENTIFIERLOOSE]})*))`);k("BUILDIDENTIFIER",`${In}+`);k("BUILD",`(?:\\+(${b[x.BUILDIDENTIFIER]}(?:\\.${b[x.BUILDIDENTIFIER]})*))`);k("FULLPLAIN",`v?${b[x.MAINVERSION]}${b[x.PRERELEASE]}?${b[x.BUILD]}?`);k("FULL",`^${b[x.FULLPLAIN]}$`);k("LOOSEPLAIN",`[v=\\s]*${b[x.MAINVERSIONLOOSE]}${b[x.PRERELEASELOOSE]}?${b[x.BUILD]}?`);k("LOOSE",`^${b[x.LOOSEPLAIN]}$`);k("GTLT","((?:<|>)?=?)");k("XRANGEIDENTIFIERLOOSE",`${b[x.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);k("XRANGEIDENTIFIER",`${b[x.NUMERICIDENTIFIER]}|x|X|\\*`);k("XRANGEPLAIN",`[v=\\s]*(${b[x.XRANGEIDENTIFIER]})(?:\\.(${b[x.XRANGEIDENTIFIER]})(?:\\.(${b[x.XRANGEIDENTIFIER]})(?:${b[x.PRERELEASE]})?${b[x.BUILD]}?)?)?`);k("XRANGEPLAINLOOSE",`[v=\\s]*(${b[x.XRANGEIDENTIFIERLOOSE]})(?:\\.(${b[x.XRANGEIDENTIFIERLOOSE]})(?:\\.(${b[x.XRANGEIDENTIFIERLOOSE]})(?:${b[x.PRERELEASELOOSE]})?${b[x.BUILD]}?)?)?`);k("XRANGE",`^${b[x.GTLT]}\\s*${b[x.XRANGEPLAIN]}$`);k("XRANGELOOSE",`^${b[x.GTLT]}\\s*${b[x.XRANGEPLAINLOOSE]}$`);k("COERCEPLAIN",`(^|[^\\d])(\\d{1,${kn}})(?:\\.(\\d{1,${kn}}))?(?:\\.(\\d{1,${kn}}))?`);k("COERCE",`${b[x.COERCEPLAIN]}(?:$|[^\\d])`);k("COERCEFULL",b[x.COERCEPLAIN]+`(?:${b[x.PRERELEASE]})?(?:${b[x.BUILD]})?(?:$|[^\\d])`);k("COERCERTL",b[x.COERCE],!0);k("COERCERTLFULL",b[x.COERCEFULL],!0);k("LONETILDE","(?:~>?)");k("TILDETRIM",`(\\s*)${b[x.LONETILDE]}\\s+`,!0);fe.tildeTrimReplace="$1~";k("TILDE",`^${b[x.LONETILDE]}${b[x.XRANGEPLAIN]}$`);k("TILDELOOSE",`^${b[x.LONETILDE]}${b[x.XRANGEPLAINLOOSE]}$`);k("LONECARET","(?:\\^)");k("CARETTRIM",`(\\s*)${b[x.LONECARET]}\\s+`,!0);fe.caretTrimReplace="$1^";k("CARET",`^${b[x.LONECARET]}${b[x.XRANGEPLAIN]}$`);k("CARETLOOSE",`^${b[x.LONECARET]}${b[x.XRANGEPLAINLOOSE]}$`);k("COMPARATORLOOSE",`^${b[x.GTLT]}\\s*(${b[x.LOOSEPLAIN]})$|^$`);k("COMPARATOR",`^${b[x.GTLT]}\\s*(${b[x.FULLPLAIN]})$|^$`);k("COMPARATORTRIM",`(\\s*)${b[x.GTLT]}\\s*(${b[x.LOOSEPLAIN]}|${b[x.XRANGEPLAIN]})`,!0);fe.comparatorTrimReplace="$1$2$3";k("HYPHENRANGE",`^\\s*(${b[x.XRANGEPLAIN]})\\s+-\\s+(${b[x.XRANGEPLAIN]})\\s*$`);k("HYPHENRANGELOOSE",`^\\s*(${b[x.XRANGEPLAINLOOSE]})\\s+-\\s+(${b[x.XRANGEPLAINLOOSE]})\\s*$`);k("STAR","(<|>)?=?\\s*\\*");k("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");k("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Mt=P((Kf,Zr)=>{"use strict";var Bl=Object.freeze({loose:!0}),$l=Object.freeze({}),zl=i=>i?typeof i!="object"?Bl:i:$l;Zr.exports=zl});var On=P((Xf,Jr)=>{"use strict";var Qr=/^[0-9]+$/,Yr=(i,t)=>{if(typeof i=="number"&&typeof t=="number")return i===t?0:i<t?-1:1;let e=Qr.test(i),n=Qr.test(t);return e&&n&&(i=+i,t=+t),i===t?0:e&&!n?-1:n&&!e?1:i<t?-1:1},Ul=(i,t)=>Yr(t,i);Jr.exports={compareIdentifiers:Yr,rcompareIdentifiers:Ul}});var K=P((Zf,ta)=>{"use strict";var St=Ke(),{MAX_LENGTH:ea,MAX_SAFE_INTEGER:Pt}=Se(),{safeRe:At,t:kt}=Ne(),ql=Mt(),{compareIdentifiers:Rn}=On(),Wl=(i,t)=>{let e=t.split(".");if(e.length>i.length)return!1;for(let n=0;n<e.length;n++)if(Rn(i[n],e[n])!==0)return!1;return!0},Dn=class i{constructor(t,e){if(e=ql(e),t instanceof i){if(t.loose===!!e.loose&&t.includePrerelease===!!e.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>ea)throw new TypeError(`version is longer than ${ea} characters`);St("SemVer",t,e),this.options=e,this.loose=!!e.loose,this.includePrerelease=!!e.includePrerelease;let n=t.trim().match(e.loose?At[kt.LOOSE]:At[kt.FULL]);if(!n)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>Pt||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Pt||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Pt||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(o=>{if(/^[0-9]+$/.test(o)){let r=+o;if(r>=0&&r<Pt)return r}return o}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(St("SemVer.compare",this.version,this.options,t),!(t instanceof i)){if(typeof t=="string"&&t===this.version)return 0;t=new i(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof i||(t=new i(t,this.options)),this.major<t.major?-1:this.major>t.major?1:this.minor<t.minor?-1:this.minor>t.minor?1:this.patch<t.patch?-1:this.patch>t.patch?1:0}comparePre(t){if(t instanceof i||(t=new i(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let e=0;do{let n=this.prerelease[e],o=t.prerelease[e];if(St("prerelease compare",e,n,o),n===void 0&&o===void 0)return 0;if(o===void 0)return 1;if(n===void 0)return-1;if(n===o)continue;return Rn(n,o)}while(++e)}compareBuild(t){t instanceof i||(t=new i(t,this.options));let e=0;do{let n=this.build[e],o=t.build[e];if(St("build compare",e,n,o),n===void 0&&o===void 0)return 0;if(o===void 0)return 1;if(n===void 0)return-1;if(n===o)continue;return Rn(n,o)}while(++e)}inc(t,e,n){if(t.startsWith("pre")){if(!e&&n===!1)throw new Error("invalid increment argument: identifier is empty");if(e){let o=`-${e}`.match(this.options.loose?At[kt.PRERELEASELOOSE]:At[kt.PRERELEASE]);if(!o||o[1]!==e)throw new Error(`invalid identifier: ${e}`)}}switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",e,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",e,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",e,n),this.inc("pre",e,n);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",e,n),this.inc("pre",e,n);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let o=Number(n)?1:0;if(this.prerelease.length===0)this.prerelease=[o];else{let r=this.prerelease.length;for(;--r>=0;)typeof this.prerelease[r]=="number"&&(this.prerelease[r]++,r=-2);if(r===-1){if(e===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(o)}}if(e){let r=[e,o];if(n===!1&&(r=[e]),Wl(this.prerelease,e)){let a=this.prerelease[e.split(".").length];isNaN(a)&&(this.prerelease=r)}else this.prerelease=r}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};ta.exports=Dn});var be=P((Qf,ia)=>{"use strict";var na=K(),Hl=(i,t,e=!1)=>{if(i instanceof na)return i;try{return new na(i,t)}catch(n){if(!e)return null;throw n}};ia.exports=Hl});var ra=P((Yf,oa)=>{"use strict";var Gl=be(),jl=(i,t)=>{let e=Gl(i,t);return e?e.version:null};oa.exports=jl});var sa=P((Jf,aa)=>{"use strict";var Kl=be(),Xl=(i,t)=>{let e=Kl(i.trim().replace(/^[=v]+/,""),t);return e?e.version:null};aa.exports=Xl});var pa=P((eh,ca)=>{"use strict";var la=K(),Zl=(i,t,e,n,o)=>{typeof e=="string"&&(o=n,n=e,e=void 0);try{return new la(i instanceof la?i.version:i,e).inc(t,n,o).version}catch(r){return null}};ca.exports=Zl});var ma=P((th,ua)=>{"use strict";var da=be(),Ql=(i,t)=>{let e=da(i,null,!0),n=da(t,null,!0),o=e.compare(n);if(o===0)return null;let r=o>0,a=r?e:n,d=r?n:e,C=!!a.prerelease.length;if(!!d.prerelease.length&&!C){if(!d.patch&&!d.minor)return"major";if(d.compareMain(a)===0)return d.minor&&!d.patch?"minor":"patch"}let A=C?"pre":"";return e.major!==n.major?A+"major":e.minor!==n.minor?A+"minor":e.patch!==n.patch?A+"patch":"prerelease"};ua.exports=Ql});var ha=P((nh,fa)=>{"use strict";var Yl=K(),Jl=(i,t)=>new Yl(i,t).major;fa.exports=Jl});var ga=P((ih,_a)=>{"use strict";var ec=K(),tc=(i,t)=>new ec(i,t).minor;_a.exports=tc});var Ca=P((oh,va)=>{"use strict";var nc=K(),ic=(i,t)=>new nc(i,t).patch;va.exports=ic});var ba=P((rh,wa)=>{"use strict";var oc=be(),rc=(i,t)=>{let e=oc(i,t);return e&&e.prerelease.length?e.prerelease:null};wa.exports=rc});var te=P((ah,ya)=>{"use strict";var xa=K(),ac=(i,t,e)=>new xa(i,e).compare(new xa(t,e));ya.exports=ac});var Ta=P((sh,Ea)=>{"use strict";var sc=te(),lc=(i,t,e)=>sc(t,i,e);Ea.exports=lc});var Sa=P((lh,Ma)=>{"use strict";var cc=te(),pc=(i,t)=>cc(i,t,!0);Ma.exports=pc});var It=P((ch,Aa)=>{"use strict";var Pa=K(),dc=(i,t,e)=>{let n=new Pa(i,e),o=new Pa(t,e);return n.compare(o)||n.compareBuild(o)};Aa.exports=dc});var Ia=P((ph,ka)=>{"use strict";var uc=It(),mc=(i,t)=>i.sort((e,n)=>uc(e,n,t));ka.exports=mc});var Ra=P((dh,Oa)=>{"use strict";var fc=It(),hc=(i,t)=>i.sort((e,n)=>fc(n,e,t));Oa.exports=hc});var Xe=P((uh,Da)=>{"use strict";var _c=te(),gc=(i,t,e)=>_c(i,t,e)>0;Da.exports=gc});var Ot=P((mh,La)=>{"use strict";var vc=te(),Cc=(i,t,e)=>vc(i,t,e)<0;La.exports=Cc});var Ln=P((fh,Va)=>{"use strict";var wc=te(),bc=(i,t,e)=>wc(i,t,e)===0;Va.exports=bc});var Vn=P((hh,Fa)=>{"use strict";var xc=te(),yc=(i,t,e)=>xc(i,t,e)!==0;Fa.exports=yc});var Rt=P((_h,Na)=>{"use strict";var Ec=te(),Tc=(i,t,e)=>Ec(i,t,e)>=0;Na.exports=Tc});var Dt=P((gh,Ba)=>{"use strict";var Mc=te(),Sc=(i,t,e)=>Mc(i,t,e)<=0;Ba.exports=Sc});var Fn=P((vh,$a)=>{"use strict";var Pc=Ln(),Ac=Vn(),kc=Xe(),Ic=Rt(),Oc=Ot(),Rc=Dt(),Dc=(i,t,e,n)=>{switch(t){case"===":return typeof i=="object"&&(i=i.version),typeof e=="object"&&(e=e.version),i===e;case"!==":return typeof i=="object"&&(i=i.version),typeof e=="object"&&(e=e.version),i!==e;case"":case"=":case"==":return Pc(i,e,n);case"!=":return Ac(i,e,n);case">":return kc(i,e,n);case">=":return Ic(i,e,n);case"<":return Oc(i,e,n);case"<=":return Rc(i,e,n);default:throw new TypeError(`Invalid operator: ${t}`)}};$a.exports=Dc});var Ua=P((Ch,za)=>{"use strict";var Lc=K(),Vc=be(),{safeRe:Lt,t:Vt}=Ne(),Fc=(i,t)=>{if(i instanceof Lc)return i;if(typeof i=="number"&&(i=String(i)),typeof i!="string")return null;t=t||{};let e=null;if(!t.rtl)e=i.match(t.includePrerelease?Lt[Vt.COERCEFULL]:Lt[Vt.COERCE]);else{let C=t.includePrerelease?Lt[Vt.COERCERTLFULL]:Lt[Vt.COERCERTL],y;for(;(y=C.exec(i))&&(!e||e.index+e[0].length!==i.length);)(!e||y.index+y[0].length!==e.index+e[0].length)&&(e=y),C.lastIndex=y.index+y[1].length+y[2].length;C.lastIndex=-1}if(e===null)return null;let n=e[2],o=e[3]||"0",r=e[4]||"0",a=t.includePrerelease&&e[5]?`-${e[5]}`:"",d=t.includePrerelease&&e[6]?`+${e[6]}`:"";return Vc(`${n}.${o}.${r}${a}${d}`,t)};za.exports=Fc});var Wa=P((wh,qa)=>{"use strict";var Nc=be(),Bc=Se(),$c=K(),zc=(i,t,e)=>{if(!Bc.RELEASE_TYPES.includes(t))return null;let n=Uc(i,e);return n&&qc(n,t)},Uc=(i,t)=>{let e=i instanceof $c?i.version:i;return Nc(e,t)},qc=(i,t)=>{if(Wc(t))return i.version;switch(i.prerelease=[],t){case"major":i.minor=0,i.patch=0;break;case"minor":i.patch=0;break}return i.format()},Wc=i=>i.startsWith("pre");qa.exports=zc});var Ga=P((bh,Ha)=>{"use strict";var Nn=class{constructor(){this.max=1e3,this.map=new Map}get(t){let e=this.map.get(t);if(e!==void 0)return this.map.delete(t),this.map.set(t,e),e}delete(t){return this.map.delete(t)}set(t,e){if(!this.delete(t)&&e!==void 0){if(this.map.size>=this.max){let o=this.map.keys().next().value;this.delete(o)}this.map.set(t,e)}return this}};Ha.exports=Nn});var os=P((xh,is)=>{"use strict";var{MAX_LENGTH:$n,MAX_SAFE_BUILD_LENGTH:Za,WHITESPACE_CHARACTERS:Hc}=Se(),Qa=new Uint8Array(65536);for(let i of Hc)Qa[i.charCodeAt(0)]=1;var zn=i=>i!==void 0&&Qa[i.charCodeAt(0)]===1,ja=i=>i==="v"||i==="="||zn(i),Ze=i=>i!==void 0&&i>="0"&&i<="9",Ya=i=>i!==void 0&&(i>="a"&&i<="z"||i>="A"&&i<="Z"),Ja=i=>Ze(i)||Ya(i)||i==="-",Un=i=>Ze(i)||i==="x"||i==="X"||i==="*",es=(i,t,e,n)=>{if(!Ze(i[t]))return t;if(t>=n.start&&t<n.end)return Math.min(t+e,n.end);if(t>=n.previousStart&&t<n.previousEnd)return Math.min(t+e,n.previousEnd);let o=t+1;for(;Ze(i[o]);)o++;return n.previousStart=n.start,n.previousEnd=n.end,n.start=t,n.end=o,Math.min(t+e,o)},qn=(i,t,e,n)=>!e&&i[t]==="0"?t+1:es(i,t,e?$n:$n+1,n),Bn=(i,t,e,n)=>{let o=es(i,t,$n,n);if(Ya(i[o])||i[o]==="-"){let r=o+1,a=r+Za;for(;r<a&&Ja(i[r]);)r++;return r}return qn(i,t,e,n)},ts=(i,t,e,n)=>{let o=i[t]==="-";if(!e&&!o)return t;let r=t+(o?1:0),a=Bn(i,r,e,n);if(a===r){if(!e||!o)return t;a=Bn(i,t,e,n)}for(;i[a]===".";){let d=Bn(i,a+1,e,n);if(d===a+1)break;a=d}return a},Ka=(i,t)=>{let e=t;for(;e-t<Za&&Ja(i[e]);)e++;return e},ns=(i,t)=>{if(i[t]!=="+")return t;let e=Ka(i,t+1);if(e===t+1)return t;for(;i[e]===".";){let n=Ka(i,e+1);if(n===e+1)break;e=n}return e},Gc=(i,t,e)=>{let n=t;for(let r=0;r<3;r++){let a=qn(i,n,!0,e);if(a===n)return t;if(n=a,r<2){if(i[n]!==".")return t;n++}}let o=ts(i,n,!0,e);return ns(i,o)},Xa=(i,t,e)=>Ze(i[t])?qn(i,t,!1,e):Un(i[t])?t+1:t,jc=(i,t,e)=>{let n=Xa(i,t,e);for(let r=0;r<2;r++){if(i[n]!==".")return n;let a=Xa(i,n+1,e);if(a===n+1)return n;n=a}let o=ts(i,n,!1,e);return ns(i,o)},Kc=(i,t,e)=>{let n=Gc(i,t,e);return n!==t?n:jc(i,t,e)},Xc=(i,t)=>{let e=t;return zn(i[e])&&e++,(i[e]==="<"||i[e]===">")&&e++,i[e]==="="&&e++,zn(i[e])?e:-1},Zc=i=>{let t="",e=0,n=0,o={start:-1,end:-1,previousStart:-1,previousEnd:-1};for(;n<i.length;){let r=n;if(i[n]==="<"||i[n]===">")n++;else if(!ja(i[n])&&!Un(i[n])){n++;continue}for(;n<i.length&&ja(i[n]);)n++;if(!Un(i[n]))continue;let a=Xc(i,r);a!==-1&&(t+=i.slice(e,a),e=a+1),n=Kc(i,n,o)}return t+i.slice(e)};is.exports=Zc});var ne=P((yh,ls)=>{"use strict";var Qc=/\s+/g,Wn=class i{constructor(t,e){if(e=Jc(e),t instanceof i)return t.loose===!!e.loose&&t.includePrerelease===!!e.includePrerelease?t:new i(t.raw,e);if(t instanceof Hn)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=e,this.loose=!!e.loose,this.includePrerelease=!!e.includePrerelease,this.raw=t.trim().replace(Qc," "),this.set=this.raw.split("||").map(n=>this.parseRange(n.trim())).filter(n=>n.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let n=this.set[0];if(this.set=this.set.filter(o=>!as(o[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(let o of this.set)if(o.length===1&&lp(o[0])){this.set=[o];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let t=0;t<this.set.length;t++){t>0&&(this.formatted+="||");let e=this.set[t];for(let n=0;n<e.length;n++)n>0&&(this.formatted+=" "),this.formatted+=e[n].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(t){t=t.replace(sp,"");let n=((this.options.includePrerelease&&rp)|(this.options.loose&&ap))+":"+t,o=rs.get(n);if(o)return o;let r=this.options.loose,a=r?J[Z.HYPHENRANGELOOSE]:J[Z.HYPHENRANGE];t=t.replace(a,Cp(this.options.includePrerelease)),L("hyphen replace",t),t=tp(t),L("comparator trim",t),t=t.replace(J[Z.TILDETRIM],ip),L("tilde trim",t),t=t.replace(J[Z.CARETTRIM],op),L("caret trim",t);let d=t.split(" ").map(M=>cp(M,this.options)).join(" ").split(/\s+/).map(M=>vp(M,this.options));r&&(d=d.filter(M=>(L("loose invalid filter",M,this.options),!!M.match(J[Z.COMPARATORLOOSE])))),L("range list",d);let C=new Map,y=d.map(M=>new Hn(M,this.options));for(let M of y){if(as(M))return[M];C.set(M.value,M)}C.size>1&&C.has("")&&C.delete("");let A=[...C.values()];return rs.set(n,A),A}intersects(t,e){if(!(t instanceof i))throw new TypeError("a Range is required");return this.set.some(n=>ss(n,e)&&t.set.some(o=>ss(o,e)&&n.every(r=>o.every(a=>r.intersects(a,e)))))}test(t){if(!t)return!1;if(typeof t=="string")try{t=new ep(t,this.options)}catch(e){return!1}for(let e=0;e<this.set.length;e++)if(wp(this.set[e],t,this.options))return!0;return!1}};ls.exports=Wn;var Yc=Ga(),rs=new Yc,Jc=Mt(),Hn=Qe(),L=Ke(),ep=K(),tp=os(),{safeRe:J,src:np,t:Z,tildeTrimReplace:ip,caretTrimReplace:op}=Ne(),{FLAG_INCLUDE_PRERELEASE:rp,FLAG_LOOSE:ap}=Se(),sp=new RegExp(np[Z.BUILD],"g"),as=i=>i.value==="<0.0.0-0",lp=i=>i.value==="",ss=(i,t)=>{let e=!0,n=i.slice(),o=n.pop();for(;e&&n.length;)e=n.every(r=>o.intersects(r,t)),o=n.pop();return e},cp=(i,t)=>(i=i.replace(J[Z.BUILD],""),L("comp",i,t),i=mp(i,t),L("caret",i),i=dp(i,t),L("tildes",i),i=hp(i,t),L("xrange",i),i=gp(i,t),L("stars",i),i),U=i=>!i||i.toLowerCase()==="x"||i==="*",pp=(i,t,e)=>U(i)&&!U(t)||U(t)&&e&&!U(e),dp=(i,t)=>i.trim().split(/\s+/).map(e=>up(e,t)).join(" "),up=(i,t)=>{let e=t.loose?J[Z.TILDELOOSE]:J[Z.TILDE],n=t.includePrerelease?"-0":"";return i.replace(e,(o,r,a,d,C)=>{L("tilde",i,o,r,a,d,C);let y;return U(r)?y="":U(a)?y=`>=${r}.0.0${n} <${+r+1}.0.0-0`:U(d)?y=`>=${r}.${a}.0${n} <${r}.${+a+1}.0-0`:C?(L("replaceTilde pr",C),y=`>=${r}.${a}.${d}-${C} <${r}.${+a+1}.0-0`):y=`>=${r}.${a}.${d} <${r}.${+a+1}.0-0`,L("tilde return",y),y})},mp=(i,t)=>i.trim().split(/\s+/).map(e=>fp(e,t)).join(" "),fp=(i,t)=>{L("caret",i,t);let e=t.loose?J[Z.CARETLOOSE]:J[Z.CARET],n=t.includePrerelease?"-0":"";return i.replace(e,(o,r,a,d,C)=>{L("caret",i,o,r,a,d,C);let y;return U(r)?y="":U(a)?y=`>=${r}.0.0${n} <${+r+1}.0.0-0`:U(d)?r==="0"?y=`>=${r}.${a}.0${n} <${r}.${+a+1}.0-0`:y=`>=${r}.${a}.0${n} <${+r+1}.0.0-0`:C?(L("replaceCaret pr",C),r==="0"?a==="0"?y=`>=${r}.${a}.${d}-${C} <${r}.${a}.${+d+1}-0`:y=`>=${r}.${a}.${d}-${C} <${r}.${+a+1}.0-0`:y=`>=${r}.${a}.${d}-${C} <${+r+1}.0.0-0`):(L("no pr"),r==="0"?a==="0"?y=`>=${r}.${a}.${d} <${r}.${a}.${+d+1}-0`:y=`>=${r}.${a}.${d} <${r}.${+a+1}.0-0`:y=`>=${r}.${a}.${d} <${+r+1}.0.0-0`),L("caret return",y),y})},hp=(i,t)=>(L("replaceXRanges",i,t),i.split(/\s+/).map(e=>_p(e,t)).join(" ")),_p=(i,t)=>{i=i.trim();let e=t.loose?J[Z.XRANGELOOSE]:J[Z.XRANGE];return i.replace(e,(n,o,r,a,d,C)=>{if(L("xRange",i,n,o,r,a,d,C),pp(r,a,d))return i;let y=U(r),A=y||U(a),M=A||U(d),I=M;return o==="="&&I&&(o=""),C=t.includePrerelease?"-0":"",y?o===">"||o==="<"?n="<0.0.0-0":n="*":o&&I?(A&&(a=0),d=0,o===">"?(o=">=",A?(r=+r+1,a=0,d=0):(a=+a+1,d=0)):o==="<="&&(o="<",A?r=+r+1:a=+a+1),o==="<"&&(C="-0"),n=`${o+r}.${a}.${d}${C}`):A?n=`>=${r}.0.0${C} <${+r+1}.0.0-0`:M&&(n=`>=${r}.${a}.0${C} <${r}.${+a+1}.0-0`),L("xRange return",n),n})},gp=(i,t)=>(L("replaceStars",i,t),i.trim().replace(J[Z.STAR],"")),vp=(i,t)=>(L("replaceGTE0",i,t),i.trim().replace(J[t.includePrerelease?Z.GTE0PRE:Z.GTE0],"")),Cp=i=>(t,e,n,o,r,a,d,C,y,A,M,I)=>(U(n)?e="":U(o)?e=`>=${n}.0.0${i?"-0":""}`:U(r)?e=`>=${n}.${o}.0${i?"-0":""}`:a?e=`>=${e}`:e=`>=${e}${i?"-0":""}`,U(y)?C="":U(A)?C=`<${+y+1}.0.0-0`:U(M)?C=`<${y}.${+A+1}.0-0`:I?C=`<=${y}.${A}.${M}-${I}`:i?C=`<${y}.${A}.${+M+1}-0`:C=`<=${C}`,`${e} ${C}`.trim()),wp=(i,t,e)=>{for(let n=0;n<i.length;n++)if(!i[n].test(t))return!1;if(t.prerelease.length&&!e.includePrerelease){for(let n=0;n<i.length;n++)if(L(i[n].semver),i[n].semver!==Hn.ANY&&i[n].semver.prerelease.length>0){let o=i[n].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch)return!0}return!1}return!0}});var Qe=P((Eh,fs)=>{"use strict";var Ye=Symbol("SemVer ANY"),Kn=class i{static get ANY(){return Ye}constructor(t,e){if(e=cs(e),t instanceof i){if(t.loose===!!e.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(" "),jn("comparator",t,e),this.options=e,this.loose=!!e.loose,this.parse(t),this.semver===Ye?this.value="":this.value=this.operator+this.semver.version,jn("comp",this)}parse(t){let e=this.options.loose?ps[ds.COMPARATORLOOSE]:ps[ds.COMPARATOR],n=t.match(e);if(!n)throw new TypeError(`Invalid comparator: ${t}`);this.operator=n[1]!==void 0?n[1]:"",this.operator==="="&&(this.operator=""),n[2]?this.semver=new us(n[2],this.options.loose):this.semver=Ye}toString(){return this.value}test(t){if(jn("Comparator.test",t,this.options.loose),this.semver===Ye||t===Ye)return!0;if(typeof t=="string")try{t=new us(t,this.options)}catch(e){return!1}return Gn(t,this.operator,this.semver,this.options)}intersects(t,e){if(!(t instanceof i))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new ms(t.value,e).test(this.value):t.operator===""?t.value===""?!0:new ms(this.value,e).test(t.semver):(e=cs(e),e.includePrerelease&&(this.value==="<0.0.0-0"||t.value==="<0.0.0-0")||!e.includePrerelease&&(this.value.startsWith("<0.0.0")||t.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&t.operator.startsWith(">")||this.operator.startsWith("<")&&t.operator.startsWith("<")||this.semver.version===t.semver.version&&this.operator.includes("=")&&t.operator.includes("=")||Gn(this.semver,"<",t.semver,e)&&this.operator.startsWith(">")&&t.operator.startsWith("<")||Gn(this.semver,">",t.semver,e)&&this.operator.startsWith("<")&&t.operator.startsWith(">")))}};fs.exports=Kn;var cs=Mt(),{safeRe:ps,t:ds}=Ne(),Gn=Fn(),jn=Ke(),us=K(),ms=ne()});var Je=P((Th,hs)=>{"use strict";var bp=ne(),xp=(i,t,e)=>{try{t=new bp(t,e)}catch(n){return!1}return t.test(i)};hs.exports=xp});var gs=P((Mh,_s)=>{"use strict";var yp=ne(),Ep=(i,t)=>new yp(i,t).set.map(e=>e.map(n=>n.value).join(" ").trim().split(" "));_s.exports=Ep});var Cs=P((Sh,vs)=>{"use strict";var Tp=K(),Mp=ne(),Sp=(i,t,e)=>{let n=null,o=null,r=null;try{r=new Mp(t,e)}catch(a){return null}return i.forEach(a=>{r.test(a)&&(!n||o.compare(a)===-1)&&(n=a,o=new Tp(n,e))}),n};vs.exports=Sp});var bs=P((Ph,ws)=>{"use strict";var Pp=K(),Ap=ne(),kp=(i,t,e)=>{let n=null,o=null,r=null;try{r=new Ap(t,e)}catch(a){return null}return i.forEach(a=>{r.test(a)&&(!n||o.compare(a)===1)&&(n=a,o=new Pp(n,e))}),n};ws.exports=kp});var Es=P((Ah,ys)=>{"use strict";var Xn=K(),Ip=ne(),xs=Xe(),Op=(i,t)=>{i=new Ip(i,t);let e=new Xn("0.0.0");if(i.test(e)||(e=new Xn("0.0.0-0"),i.test(e)))return e;e=null;for(let n=0;n<i.set.length;++n){let o=i.set[n],r=null;o.forEach(a=>{let d=new Xn(a.semver.version);switch(a.operator){case">":d.prerelease.length===0?d.patch++:d.prerelease.push(0),d.raw=d.format();case"":case">=":(!r||xs(d,r))&&(r=d);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${a.operator}`)}}),r&&(!e||xs(e,r))&&(e=r)}return e&&i.test(e)?e:null};ys.exports=Op});var Ms=P((kh,Ts)=>{"use strict";var Rp=ne(),Dp=(i,t)=>{try{return new Rp(i,t).range||"*"}catch(e){return null}};Ts.exports=Dp});var Ft=P((Ih,ks)=>{"use strict";var Lp=K(),As=Qe(),{ANY:Vp}=As,Fp=ne(),Np=Je(),Ss=Xe(),Ps=Ot(),Bp=Dt(),$p=Rt(),zp=(i,t,e,n)=>{i=new Lp(i,n),t=new Fp(t,n);let o,r,a,d,C;switch(e){case">":o=Ss,r=Bp,a=Ps,d=">",C=">=";break;case"<":o=Ps,r=$p,a=Ss,d="<",C="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Np(i,t,n))return!1;for(let y=0;y<t.set.length;++y){let A=t.set[y],M=null,I=null;if(A.forEach(S=>{S.semver===Vp&&(S=new As(">=0.0.0")),M=M||S,I=I||S,o(S.semver,M.semver,n)?M=S:a(S.semver,I.semver,n)&&(I=S)}),M.operator===d||M.operator===C||(!I.operator||I.operator===d)&&r(i,I.semver))return!1;if(I.operator===C&&a(i,I.semver))return!1}return!0};ks.exports=zp});var Os=P((Oh,Is)=>{"use strict";var Up=Ft(),qp=(i,t,e)=>Up(i,t,">",e);Is.exports=qp});var Ds=P((Rh,Rs)=>{"use strict";var Wp=Ft(),Hp=(i,t,e)=>Wp(i,t,"<",e);Rs.exports=Hp});var Fs=P((Dh,Vs)=>{"use strict";var Ls=ne(),Gp=(i,t,e)=>(i=new Ls(i,e),t=new Ls(t,e),i.intersects(t,e));Vs.exports=Gp});var Bs=P((Lh,Ns)=>{"use strict";var jp=Je(),Kp=te();Ns.exports=(i,t,e)=>{let n=[],o=null,r=null,a=i.sort((A,M)=>Kp(A,M,e));for(let A of a)jp(A,t,e)?(r=A,o||(o=A)):(r&&n.push([o,r]),r=null,o=null);o&&n.push([o,null]);let d=[];for(let[A,M]of n)A===M?d.push(A):!M&&A===a[0]?d.push("*"):M?A===a[0]?d.push(`<=${M}`):d.push(`${A} - ${M}`):d.push(`>=${A}`);let C=d.join(" || "),y=typeof t.raw=="string"?t.raw:String(t);return C.length<y.length?C:t}});var Hs=P((Vh,Ws)=>{"use strict";var $s=ne(),Yn=Qe(),{ANY:Zn}=Yn,Qn=Je(),Jn=te(),Xp=(i,t,e={})=>{if(i===t)return!0;i=new $s(i,e),t=new $s(t,e);let n=!1;e:for(let o of i.set){for(let r of t.set){let a=Qp(o,r,e);if(n=n||a!==null,a)continue e}if(n)return!1}return!0},Zp=[new Yn(">=0.0.0-0")],zs=[new Yn(">=0.0.0")],Qp=(i,t,e)=>{if(i===t)return!0;if(i.length===1&&i[0].semver===Zn){if(t.length===1&&t[0].semver===Zn)return!0;e.includePrerelease?i=Zp:i=zs}if(t.length===1&&t[0].semver===Zn){if(e.includePrerelease)return!0;t=zs}let n=new Set,o,r;for(let S of i)S.operator===">"||S.operator===">="?o=Us(o,S,e):S.operator==="<"||S.operator==="<="?r=qs(r,S,e):n.add(S.semver);if(n.size>1)return null;let a;if(o&&r){if(a=Jn(o.semver,r.semver,e),a>0)return null;if(a===0&&(o.operator!==">="||r.operator!=="<="))return null}for(let S of n){if(o&&!Qn(S,String(o),e)||r&&!Qn(S,String(r),e))return null;for(let Zt of t)if(!Qn(S,String(Zt),e))return!1;return!0}let d,C,y,A,M=r&&!e.includePrerelease&&r.semver.prerelease.length?r.semver:!1,I=o&&!e.includePrerelease&&o.semver.prerelease.length?o.semver:!1;M&&M.prerelease.length===1&&r.operator==="<"&&M.prerelease[0]===0&&(M=!1);for(let S of t){if(A=A||S.operator===">"||S.operator===">=",y=y||S.operator==="<"||S.operator==="<=",o){if(I&&S.semver.prerelease&&S.semver.prerelease.length&&S.semver.major===I.major&&S.semver.minor===I.minor&&S.semver.patch===I.patch&&(I=!1),S.operator===">"||S.operator===">="){if(d=Us(o,S,e),d===S&&d!==o)return!1}else if(o.operator===">="&&!S.test(o.semver))return!1}if(r){if(M&&S.semver.prerelease&&S.semver.prerelease.length&&S.semver.major===M.major&&S.semver.minor===M.minor&&S.semver.patch===M.patch&&(M=!1),S.operator==="<"||S.operator==="<="){if(C=qs(r,S,e),C===S&&C!==r)return!1}else if(r.operator==="<="&&!S.test(r.semver))return!1}if(!S.operator&&(r||o)&&a!==0)return!1}return!(o&&y&&!r&&a!==0||r&&A&&!o&&a!==0||I||M)},Us=(i,t,e)=>{if(!i)return t;let n=Jn(i.semver,t.semver,e);return n>0?i:n<0||t.operator===">"&&i.operator===">="?t:i},qs=(i,t,e)=>{if(!i)return t;let n=Jn(i.semver,t.semver,e);return n<0?i:n>0||t.operator==="<"&&i.operator==="<="?t:i};Ws.exports=Xp});var Xs=P((Fh,Ks)=>{"use strict";var ei=Ne(),Gs=Se(),Yp=K(),js=On(),Jp=be(),ed=ra(),td=sa(),nd=pa(),id=ma(),od=ha(),rd=ga(),ad=Ca(),sd=ba(),ld=te(),cd=Ta(),pd=Sa(),dd=It(),ud=Ia(),md=Ra(),fd=Xe(),hd=Ot(),_d=Ln(),gd=Vn(),vd=Rt(),Cd=Dt(),wd=Fn(),bd=Ua(),xd=Wa(),yd=Qe(),Ed=ne(),Td=Je(),Md=gs(),Sd=Cs(),Pd=bs(),Ad=Es(),kd=Ms(),Id=Ft(),Od=Os(),Rd=Ds(),Dd=Fs(),Ld=Bs(),Vd=Hs();Ks.exports={parse:Jp,valid:ed,clean:td,inc:nd,diff:id,major:od,minor:rd,patch:ad,prerelease:sd,compare:ld,rcompare:cd,compareLoose:pd,compareBuild:dd,sort:ud,rsort:md,gt:fd,lt:hd,eq:_d,neq:gd,gte:vd,lte:Cd,cmp:wd,coerce:bd,truncate:xd,Comparator:yd,Range:Ed,satisfies:Td,toComparators:Md,maxSatisfying:Sd,minSatisfying:Pd,minVersion:Ad,validRange:kd,outside:Id,gtr:Od,ltr:Rd,intersects:Dd,simplifyRange:Ld,subset:Vd,SemVer:Yp,re:ei.re,src:ei.src,tokens:ei.t,SEMVER_SPEC_VERSION:Gs.SEMVER_SPEC_VERSION,RELEASE_TYPES:Gs.RELEASE_TYPES,compareIdentifiers:js.compareIdentifiers,rcompareIdentifiers:js.rcompareIdentifiers}});var Tt=["*"],dl=["content"],ul=[[["mat-drawer"]],[["mat-drawer-content"]],"*"],ml=["mat-drawer","mat-drawer-content","*"];function fl(i,t){if(i&1){let e=E();s(0,"div",1),h("click",function(){m(e);let o=c();return f(o._onBackdropClicked())}),l()}if(i&2){let e=c();V("mat-drawer-shown",e._isShowingBackdrop())}}function hl(i,t){i&1&&(s(0,"mat-drawer-content"),oe(1,2),l())}var _l=[[["mat-sidenav"]],[["mat-sidenav-content"]],"*"],gl=["mat-sidenav","mat-sidenav-content","*"];function vl(i,t){if(i&1){let e=E();s(0,"div",1),h("click",function(){m(e);let o=c();return f(o._onBackdropClicked())}),l()}if(i&2){let e=c();V("mat-drawer-shown",e._isShowingBackdrop())}}function Cl(i,t){i&1&&(s(0,"mat-sidenav-content"),oe(1,2),l())}var wl=`.mat-drawer-container {
3
+ position: relative;
4
+ z-index: 1;
5
+ color: var(--mat-sidenav-content-text-color, var(--mat-sys-on-background));
6
+ background-color: var(--mat-sidenav-content-background-color, var(--mat-sys-background));
7
+ box-sizing: border-box;
8
+ display: block;
9
+ overflow: hidden;
10
+ }
11
+ .mat-drawer-container[fullscreen] {
12
+ top: 0;
13
+ left: 0;
14
+ right: 0;
15
+ bottom: 0;
16
+ position: absolute;
17
+ }
18
+ .mat-drawer-container[fullscreen].mat-drawer-container-has-open {
19
+ overflow: hidden;
20
+ }
21
+ .mat-drawer-container.mat-drawer-container-explicit-backdrop .mat-drawer-side {
22
+ z-index: 3;
23
+ }
24
+ .mat-drawer-container.ng-animate-disabled .mat-drawer-backdrop,
25
+ .mat-drawer-container.ng-animate-disabled .mat-drawer-content, .ng-animate-disabled .mat-drawer-container .mat-drawer-backdrop,
26
+ .ng-animate-disabled .mat-drawer-container .mat-drawer-content {
27
+ transition: none;
28
+ }
29
+
30
+ .mat-drawer-backdrop {
31
+ top: 0;
32
+ left: 0;
33
+ right: 0;
34
+ bottom: 0;
35
+ position: absolute;
36
+ display: block;
37
+ z-index: 3;
38
+ visibility: hidden;
39
+ }
40
+ .mat-drawer-backdrop.mat-drawer-shown {
41
+ visibility: visible;
42
+ background-color: var(--mat-sidenav-scrim-color, color-mix(in srgb, var(--mat-sys-neutral-variant20) 40%, transparent));
43
+ }
44
+ .mat-drawer-transition .mat-drawer-backdrop {
45
+ transition-duration: 400ms;
46
+ transition-timing-function: cubic-bezier(0.25, 0.8, 0.25, 1);
47
+ transition-property: background-color, visibility;
48
+ }
49
+ @media (forced-colors: active) {
50
+ .mat-drawer-backdrop {
51
+ opacity: 0.5;
52
+ }
53
+ }
54
+
55
+ .mat-drawer-content {
56
+ position: relative;
57
+ z-index: 1;
58
+ display: block;
59
+ height: 100%;
60
+ overflow: auto;
61
+ }
62
+ .mat-drawer-content.mat-drawer-content-hidden {
63
+ opacity: 0;
64
+ }
65
+ .mat-drawer-transition .mat-drawer-content {
66
+ transition-duration: 400ms;
67
+ transition-timing-function: cubic-bezier(0.25, 0.8, 0.25, 1);
68
+ transition-property: transform, margin-left, margin-right;
69
+ }
70
+
71
+ .mat-drawer {
72
+ position: relative;
73
+ z-index: 4;
74
+ color: var(--mat-sidenav-container-text-color, var(--mat-sys-on-surface-variant));
75
+ box-shadow: var(--mat-sidenav-container-elevation-shadow, none);
76
+ background-color: var(--mat-sidenav-container-background-color, var(--mat-sys-surface));
77
+ border-top-right-radius: var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));
78
+ border-bottom-right-radius: var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));
79
+ width: var(--mat-sidenav-container-width, 360px);
80
+ display: block;
81
+ position: absolute;
82
+ top: 0;
83
+ bottom: 0;
84
+ z-index: 3;
85
+ outline: 0;
86
+ box-sizing: border-box;
87
+ overflow-y: auto;
88
+ transform: translate3d(-100%, 0, 0);
89
+ }
90
+ @media (forced-colors: active) {
91
+ .mat-drawer, [dir=rtl] .mat-drawer.mat-drawer-end {
92
+ border-right: solid 1px currentColor;
93
+ }
94
+ }
95
+ @media (forced-colors: active) {
96
+ [dir=rtl] .mat-drawer, .mat-drawer.mat-drawer-end {
97
+ border-left: solid 1px currentColor;
98
+ border-right: none;
99
+ }
100
+ }
101
+ .mat-drawer.mat-drawer-side {
102
+ z-index: 2;
103
+ }
104
+ .mat-drawer.mat-drawer-end {
105
+ right: 0;
106
+ transform: translate3d(100%, 0, 0);
107
+ border-top-left-radius: var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));
108
+ border-bottom-left-radius: var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));
109
+ border-top-right-radius: 0;
110
+ border-bottom-right-radius: 0;
111
+ }
112
+ [dir=rtl] .mat-drawer {
113
+ border-top-left-radius: var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));
114
+ border-bottom-left-radius: var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));
115
+ border-top-right-radius: 0;
116
+ border-bottom-right-radius: 0;
117
+ transform: translate3d(100%, 0, 0);
118
+ }
119
+ [dir=rtl] .mat-drawer.mat-drawer-end {
120
+ border-top-right-radius: var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));
121
+ border-bottom-right-radius: var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));
122
+ border-top-left-radius: 0;
123
+ border-bottom-left-radius: 0;
124
+ left: 0;
125
+ right: auto;
126
+ transform: translate3d(-100%, 0, 0);
127
+ }
128
+ .mat-drawer-transition .mat-drawer {
129
+ transition: transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1);
130
+ }
131
+ .mat-drawer:not(.mat-drawer-opened):not(.mat-drawer-animating) {
132
+ visibility: hidden;
133
+ box-shadow: none;
134
+ }
135
+ .mat-drawer:not(.mat-drawer-opened):not(.mat-drawer-animating) .mat-drawer-inner-container {
136
+ display: none;
137
+ }
138
+ .mat-drawer.mat-drawer-opened.mat-drawer-opened {
139
+ transform: none;
140
+ }
141
+
142
+ .mat-drawer-side {
143
+ box-shadow: none;
144
+ border-right-color: var(--mat-sidenav-container-divider-color, transparent);
145
+ border-right-width: 1px;
146
+ border-right-style: solid;
147
+ }
148
+ .mat-drawer-side.mat-drawer-end {
149
+ border-left-color: var(--mat-sidenav-container-divider-color, transparent);
150
+ border-left-width: 1px;
151
+ border-left-style: solid;
152
+ border-right: none;
153
+ }
154
+ [dir=rtl] .mat-drawer-side {
155
+ border-left-color: var(--mat-sidenav-container-divider-color, transparent);
156
+ border-left-width: 1px;
157
+ border-left-style: solid;
158
+ border-right: none;
159
+ }
160
+ [dir=rtl] .mat-drawer-side.mat-drawer-end {
161
+ border-right-color: var(--mat-sidenav-container-divider-color, transparent);
162
+ border-right-width: 1px;
163
+ border-right-style: solid;
164
+ border-left: none;
165
+ }
166
+
167
+ .mat-drawer-inner-container {
168
+ width: 100%;
169
+ height: 100%;
170
+ overflow: auto;
171
+ }
172
+
173
+ .mat-sidenav-fixed {
174
+ position: fixed;
175
+ }
176
+ `;var bl=new Jt("MAT_DRAWER_DEFAULT_AUTOSIZE",{providedIn:"root",factory:()=>!1}),Pn=new Jt("MAT_DRAWER_CONTAINER"),yt=(()=>{class i extends Oe{_platform=_(ct);_changeDetectorRef=_(st);_container=_(Sn);constructor(){let e=_(Y),n=_(zi),o=_(X);super(e,n,o)}ngAfterContentInit(){this._container._contentMarginChanges.subscribe(()=>{this._changeDetectorRef.markForCheck()})}_shouldBeHidden(){if(this._platform.isBrowser)return!1;let{start:e,end:n}=this._container;return e!=null&&e.mode!=="over"&&e.opened||n!=null&&n.mode!=="over"&&n.opened}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=D({type:i,selectors:[["mat-drawer-content"]],hostAttrs:[1,"mat-drawer-content"],hostVars:6,hostBindings:function(n,o){n&2&&(H("margin-left",o._container._contentMargins.left,"px")("margin-right",o._container._contentMargins.right,"px"),V("mat-drawer-content-hidden",o._shouldBeHidden()))},features:[Ie([{provide:Oe,useExisting:i}]),qe],ngContentSelectors:Tt,decls:1,vars:0,template:function(n,o){n&1&&(Ee(),oe(0))},encapsulation:2,changeDetection:0})}return i})(),Mn=(()=>{class i{_elementRef=_(Y);_focusTrapFactory=_(Gi);_focusMonitor=_(Wi);_platform=_(ct);_ngZone=_(X);_renderer=_(hi);_interactivityChecker=_(Hi);_doc=_(et);_container=_(Pn,{optional:!0});_focusTrap=null;_elementFocusedBeforeDrawerWasOpened=null;_eventCleanups;_isAttached=!1;_anchor=null;get position(){return this._position}set position(e){e=e==="end"?"end":"start",e!==this._position&&(this._isAttached&&this._updatePositionInParent(e),this._position=e,this.onPositionChanged.emit())}_position="start";get mode(){return this._mode}set mode(e){this._mode=e,this._updateFocusTrapState(),this._modeChanged.next()}_mode="over";get disableClose(){return this._disableClose}set disableClose(e){this._disableClose=Me(e)}_disableClose=!1;get autoFocus(){let e=this._autoFocus;return e??(this.mode==="side"?"dialog":"first-tabbable")}set autoFocus(e){(e==="true"||e==="false"||e==null)&&(e=Me(e)),this._autoFocus=e}_autoFocus;get opened(){return this._opened()}set opened(e){this.toggle(Me(e))}_opened=O(!1);_openedVia=null;_animationStarted=new ge;_animationEnd=new ge;openedChange=new tt(!0);_openedStream=this.openedChange.pipe($e(e=>e),Be(()=>{}));openedStart=this._animationStarted.pipe($e(()=>this.opened),Qt(void 0));_closedStream=this.openedChange.pipe($e(e=>!e),Be(()=>{}));closedStart=this._animationStarted.pipe($e(()=>!this.opened),Qt(void 0));_destroyed=new ge;onPositionChanged=new tt;_content;_modeChanged=new ge;_injector=_(en);_changeDetectorRef=_(st);constructor(){this.openedChange.pipe(re(this._destroyed)).subscribe(e=>{e?(this._elementFocusedBeforeDrawerWasOpened=this._doc.activeElement,this._takeFocus()):this._isFocusWithinDrawer()&&this._restoreFocus(this._openedVia||"program")}),this._eventCleanups=this._ngZone.runOutsideAngular(()=>{let e=this._renderer,n=this._elementRef.nativeElement;return[e.listen(n,"keydown",o=>{o.keyCode===27&&!this.disableClose&&!qi(o)&&this._ngZone.run(()=>{this.close(),o.stopPropagation(),o.preventDefault()})}),e.listen(n,"transitionend",this._handleTransitionEvent),e.listen(n,"transitioncancel",this._handleTransitionEvent)]}),this._animationEnd.subscribe(()=>{this.openedChange.emit(this.opened)})}_forceFocus(e,n){this._interactivityChecker.isFocusable(e)||(e.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let o=()=>{r(),a(),e.removeAttribute("tabindex")},r=this._renderer.listen(e,"blur",o),a=this._renderer.listen(e,"mousedown",o)})),e.focus(n)}_focusByCssSelector(e,n){let o=this._elementRef.nativeElement.querySelector(e);o&&this._forceFocus(o,n)}_takeFocus(){if(!this._focusTrap)return;let e=this._elementRef.nativeElement;switch(this.autoFocus){case!1:case"dialog":return;case!0:case"first-tabbable":Ue(()=>{!this._focusTrap.focusInitialElement()&&typeof e.focus=="function"&&e.focus()},{injector:this._injector});break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]');break;default:this._focusByCssSelector(this.autoFocus);break}}_restoreFocus(e){this.autoFocus!=="dialog"&&(this._elementFocusedBeforeDrawerWasOpened?this._focusMonitor.focusVia(this._elementFocusedBeforeDrawerWasOpened,e):this._elementRef.nativeElement.blur(),this._elementFocusedBeforeDrawerWasOpened=null)}_isFocusWithinDrawer(){let e=this._doc.activeElement;return!!e&&this._elementRef.nativeElement.contains(e)}ngAfterViewInit(){this._isAttached=!0,this._position==="end"&&this._updatePositionInParent("end"),this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._updateFocusTrapState())}ngOnDestroy(){this._eventCleanups.forEach(e=>e()),this._focusTrap?.destroy(),this._anchor?.remove(),this._anchor=null,this._animationStarted.complete(),this._animationEnd.complete(),this._modeChanged.complete(),this._destroyed.next(),this._destroyed.complete()}open(e){return this.toggle(!0,e)}close(){return this.toggle(!1)}_closeViaBackdropClick(){return this._setOpen(!1,!0,"mouse")}toggle(e=!this.opened,n){e&&n&&(this._openedVia=n);let o=this._setOpen(e,!e&&this._isFocusWithinDrawer(),this._openedVia||"program");return e||(this._openedVia=null),o}_setOpen(e,n,o){return e===this.opened?Promise.resolve(e?"open":"close"):(this._opened.set(e),this._container?._transitionsEnabled?(this._setIsAnimating(!0),setTimeout(()=>this._animationStarted.next())):setTimeout(()=>{this._animationStarted.next(),this._animationEnd.next()}),this._elementRef.nativeElement.classList.toggle("mat-drawer-opened",e),!e&&n&&this._restoreFocus(o),this._changeDetectorRef.markForCheck(),this._updateFocusTrapState(),new Promise(r=>{this.openedChange.pipe(ci(1)).subscribe(a=>r(a?"open":"close"))}))}_setIsAnimating(e){this._elementRef.nativeElement.classList.toggle("mat-drawer-animating",e)}_getWidth(){return this._elementRef.nativeElement.offsetWidth||0}_updateFocusTrapState(){this._focusTrap&&(this._focusTrap.enabled=this.opened&&!!this._container?._isShowingBackdrop())}_updatePositionInParent(e){if(!this._platform.isBrowser)return;let n=this._elementRef.nativeElement,o=n.parentNode;e==="end"?(this._anchor||(this._anchor=this._doc.createComment("mat-drawer-anchor"),o.insertBefore(this._anchor,n)),o.appendChild(n)):this._anchor&&this._anchor.parentNode.insertBefore(n,this._anchor)}_handleTransitionEvent=e=>{let n=this._elementRef.nativeElement;e.target===n&&this._ngZone.run(()=>{e.type==="transitionend"&&this._setIsAnimating(!1),this._animationEnd.next(e)})};static \u0275fac=function(n){return new(n||i)};static \u0275cmp=D({type:i,selectors:[["mat-drawer"]],viewQuery:function(n,o){if(n&1&&ee(dl,5),n&2){let r;F(r=N())&&(o._content=r.first)}},hostAttrs:[1,"mat-drawer"],hostVars:12,hostBindings:function(n,o){n&2&&(Q("align",null)("tabIndex",o.mode!=="side"?"-1":null),H("visibility",!o._container&&!o.opened?"hidden":null),V("mat-drawer-end",o.position==="end")("mat-drawer-over",o.mode==="over")("mat-drawer-push",o.mode==="push")("mat-drawer-side",o.mode==="side"))},inputs:{position:"position",mode:"mode",disableClose:"disableClose",autoFocus:"autoFocus",opened:"opened"},outputs:{openedChange:"openedChange",_openedStream:"opened",openedStart:"openedStart",_closedStream:"closed",closedStart:"closedStart",onPositionChanged:"positionChanged"},exportAs:["matDrawer"],ngContentSelectors:Tt,decls:3,vars:0,consts:[["content",""],["cdkScrollable","",1,"mat-drawer-inner-container"]],template:function(n,o){n&1&&(Ee(),s(0,"div",1,0),oe(2),l())},dependencies:[Oe],encapsulation:2,changeDetection:0})}return i})(),Sn=(()=>{class i{_dir=_(Bi,{optional:!0});_element=_(Y);_ngZone=_(X);_changeDetectorRef=_(st);_animationDisabled=Ki();_transitionsEnabled=!1;_allDrawers;_drawers=new ui;_content;_userContent;get start(){return this._start}get end(){return this._end}get autosize(){return this._autosize}set autosize(e){this._autosize=Me(e)}_autosize=_(bl);get hasBackdrop(){return this._drawerHasBackdrop(this._start)||this._drawerHasBackdrop(this._end)}set hasBackdrop(e){this._backdropOverride=e==null?null:Me(e)}_backdropOverride=null;backdropClick=new tt;_start=null;_end=null;_left=null;_right=null;_destroyed=new ge;_doCheckSubject=new ge;_contentMargins={left:null,right:null};_contentMarginChanges=new ge;get scrollable(){return this._userContent||this._content}_injector=_(en);constructor(){let e=_(ct),n=_(Ui);this._dir?.change.pipe(re(this._destroyed)).subscribe(()=>{this._validateDrawers(),this.updateContentMargins()}),n.change().pipe(re(this._destroyed)).subscribe(()=>this.updateContentMargins()),!this._animationDisabled&&e.isBrowser&&this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{this._element.nativeElement.classList.add("mat-drawer-transition"),this._transitionsEnabled=!0},200)})}ngAfterContentInit(){this._allDrawers.changes.pipe(Yt(this._allDrawers),re(this._destroyed)).subscribe(e=>{this._drawers.reset(e.filter(n=>!n._container||n._container===this)),this._drawers.notifyOnChanges()}),this._drawers.changes.pipe(Yt(null)).subscribe(()=>{this._validateDrawers(),this._drawers.forEach(e=>{this._watchDrawerToggle(e),this._watchDrawerPosition(e),this._watchDrawerMode(e)}),(!this._drawers.length||this._isDrawerOpen(this._start)||this._isDrawerOpen(this._end))&&this.updateContentMargins(),this._changeDetectorRef.markForCheck()}),this._ngZone.runOutsideAngular(()=>{this._doCheckSubject.pipe(li(10),re(this._destroyed)).subscribe(()=>this.updateContentMargins())})}ngOnDestroy(){this._contentMarginChanges.complete(),this._doCheckSubject.complete(),this._drawers.destroy(),this._destroyed.next(),this._destroyed.complete()}open(){this._drawers.forEach(e=>e.open())}close(){this._drawers.forEach(e=>e.close())}updateContentMargins(){let e=0,n=0;if(this._left&&this._left.opened){if(this._left.mode=="side")e+=this._left._getWidth();else if(this._left.mode=="push"){let o=this._left._getWidth();e+=o,n-=o}}if(this._right&&this._right.opened){if(this._right.mode=="side")n+=this._right._getWidth();else if(this._right.mode=="push"){let o=this._right._getWidth();n+=o,e-=o}}e=e||null,n=n||null,(e!==this._contentMargins.left||n!==this._contentMargins.right)&&(this._contentMargins={left:e,right:n},this._ngZone.run(()=>this._contentMarginChanges.next(this._contentMargins)))}ngDoCheck(){this._autosize&&this._isPushed()&&this._ngZone.runOutsideAngular(()=>this._doCheckSubject.next())}_watchDrawerToggle(e){e._animationStarted.pipe(re(this._drawers.changes)).subscribe(()=>{this.updateContentMargins(),this._changeDetectorRef.markForCheck()}),e.mode!=="side"&&e.openedChange.pipe(re(this._drawers.changes)).subscribe(()=>this._setContainerClass(e.opened))}_watchDrawerPosition(e){e.onPositionChanged.pipe(re(this._drawers.changes)).subscribe(()=>{Ue({read:()=>this._validateDrawers()},{injector:this._injector})})}_watchDrawerMode(e){e._modeChanged.pipe(re(si(this._drawers.changes,this._destroyed))).subscribe(()=>{this.updateContentMargins(),this._changeDetectorRef.markForCheck()})}_setContainerClass(e){let n=this._element.nativeElement.classList,o="mat-drawer-container-has-open";e?n.add(o):n.remove(o)}_validateDrawers(){this._start=this._end=null,this._drawers.forEach(e=>{e.position=="end"?(this._end!=null,this._end=e):(this._start!=null,this._start=e)}),this._right=this._left=null,this._dir&&this._dir.value==="rtl"?(this._left=this._end,this._right=this._start):(this._left=this._start,this._right=this._end)}_isPushed(){return this._isDrawerOpen(this._start)&&this._start.mode!="over"||this._isDrawerOpen(this._end)&&this._end.mode!="over"}_onBackdropClicked(){this.backdropClick.emit(),this._closeModalDrawersViaBackdrop()}_closeModalDrawersViaBackdrop(){[this._start,this._end].filter(e=>e&&!e.disableClose&&this._drawerHasBackdrop(e)).forEach(e=>e._closeViaBackdropClick())}_isShowingBackdrop(){return this._isDrawerOpen(this._start)&&this._drawerHasBackdrop(this._start)||this._isDrawerOpen(this._end)&&this._drawerHasBackdrop(this._end)}_isDrawerOpen(e){return e!=null&&e.opened}_drawerHasBackdrop(e){return this._backdropOverride==null?!!e&&e.mode!=="side":this._backdropOverride}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=D({type:i,selectors:[["mat-drawer-container"]],contentQueries:function(n,o,r){if(n&1&&tn(r,yt,5)(r,Mn,5),n&2){let a;F(a=N())&&(o._content=a.first),F(a=N())&&(o._allDrawers=a)}},viewQuery:function(n,o){if(n&1&&ee(yt,5),n&2){let r;F(r=N())&&(o._userContent=r.first)}},hostAttrs:[1,"mat-drawer-container"],hostVars:2,hostBindings:function(n,o){n&2&&V("mat-drawer-container-explicit-backdrop",o._backdropOverride)},inputs:{autosize:"autosize",hasBackdrop:"hasBackdrop"},outputs:{backdropClick:"backdropClick"},exportAs:["matDrawerContainer"],features:[Ie([{provide:Pn,useExisting:i}])],ngContentSelectors:ml,decls:4,vars:2,consts:[[1,"mat-drawer-backdrop",3,"mat-drawer-shown"],[1,"mat-drawer-backdrop",3,"click"]],template:function(n,o){n&1&&(Ee(ul),g(0,fl,1,2,"div",0),oe(1),oe(2,1),g(3,hl,2,0,"mat-drawer-content")),n&2&&(v(o.hasBackdrop?0:-1),p(3),v(o._content?-1:3))},dependencies:[yt],styles:[`.mat-drawer-container {
177
+ position: relative;
178
+ z-index: 1;
179
+ color: var(--mat-sidenav-content-text-color, var(--mat-sys-on-background));
180
+ background-color: var(--mat-sidenav-content-background-color, var(--mat-sys-background));
181
+ box-sizing: border-box;
182
+ display: block;
183
+ overflow: hidden;
184
+ }
185
+ .mat-drawer-container[fullscreen] {
186
+ top: 0;
187
+ left: 0;
188
+ right: 0;
189
+ bottom: 0;
190
+ position: absolute;
191
+ }
192
+ .mat-drawer-container[fullscreen].mat-drawer-container-has-open {
193
+ overflow: hidden;
194
+ }
195
+ .mat-drawer-container.mat-drawer-container-explicit-backdrop .mat-drawer-side {
196
+ z-index: 3;
197
+ }
198
+ .mat-drawer-container.ng-animate-disabled .mat-drawer-backdrop,
199
+ .mat-drawer-container.ng-animate-disabled .mat-drawer-content, .ng-animate-disabled .mat-drawer-container .mat-drawer-backdrop,
200
+ .ng-animate-disabled .mat-drawer-container .mat-drawer-content {
201
+ transition: none;
202
+ }
203
+
204
+ .mat-drawer-backdrop {
205
+ top: 0;
206
+ left: 0;
207
+ right: 0;
208
+ bottom: 0;
209
+ position: absolute;
210
+ display: block;
211
+ z-index: 3;
212
+ visibility: hidden;
213
+ }
214
+ .mat-drawer-backdrop.mat-drawer-shown {
215
+ visibility: visible;
216
+ background-color: var(--mat-sidenav-scrim-color, color-mix(in srgb, var(--mat-sys-neutral-variant20) 40%, transparent));
217
+ }
218
+ .mat-drawer-transition .mat-drawer-backdrop {
219
+ transition-duration: 400ms;
220
+ transition-timing-function: cubic-bezier(0.25, 0.8, 0.25, 1);
221
+ transition-property: background-color, visibility;
222
+ }
223
+ @media (forced-colors: active) {
224
+ .mat-drawer-backdrop {
225
+ opacity: 0.5;
226
+ }
227
+ }
228
+
229
+ .mat-drawer-content {
230
+ position: relative;
231
+ z-index: 1;
232
+ display: block;
233
+ height: 100%;
234
+ overflow: auto;
235
+ }
236
+ .mat-drawer-content.mat-drawer-content-hidden {
237
+ opacity: 0;
238
+ }
239
+ .mat-drawer-transition .mat-drawer-content {
240
+ transition-duration: 400ms;
241
+ transition-timing-function: cubic-bezier(0.25, 0.8, 0.25, 1);
242
+ transition-property: transform, margin-left, margin-right;
243
+ }
244
+
245
+ .mat-drawer {
246
+ position: relative;
247
+ z-index: 4;
248
+ color: var(--mat-sidenav-container-text-color, var(--mat-sys-on-surface-variant));
249
+ box-shadow: var(--mat-sidenav-container-elevation-shadow, none);
250
+ background-color: var(--mat-sidenav-container-background-color, var(--mat-sys-surface));
251
+ border-top-right-radius: var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));
252
+ border-bottom-right-radius: var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));
253
+ width: var(--mat-sidenav-container-width, 360px);
254
+ display: block;
255
+ position: absolute;
256
+ top: 0;
257
+ bottom: 0;
258
+ z-index: 3;
259
+ outline: 0;
260
+ box-sizing: border-box;
261
+ overflow-y: auto;
262
+ transform: translate3d(-100%, 0, 0);
263
+ }
264
+ @media (forced-colors: active) {
265
+ .mat-drawer, [dir=rtl] .mat-drawer.mat-drawer-end {
266
+ border-right: solid 1px currentColor;
267
+ }
268
+ }
269
+ @media (forced-colors: active) {
270
+ [dir=rtl] .mat-drawer, .mat-drawer.mat-drawer-end {
271
+ border-left: solid 1px currentColor;
272
+ border-right: none;
273
+ }
274
+ }
275
+ .mat-drawer.mat-drawer-side {
276
+ z-index: 2;
277
+ }
278
+ .mat-drawer.mat-drawer-end {
279
+ right: 0;
280
+ transform: translate3d(100%, 0, 0);
281
+ border-top-left-radius: var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));
282
+ border-bottom-left-radius: var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));
283
+ border-top-right-radius: 0;
284
+ border-bottom-right-radius: 0;
285
+ }
286
+ [dir=rtl] .mat-drawer {
287
+ border-top-left-radius: var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));
288
+ border-bottom-left-radius: var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));
289
+ border-top-right-radius: 0;
290
+ border-bottom-right-radius: 0;
291
+ transform: translate3d(100%, 0, 0);
292
+ }
293
+ [dir=rtl] .mat-drawer.mat-drawer-end {
294
+ border-top-right-radius: var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));
295
+ border-bottom-right-radius: var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));
296
+ border-top-left-radius: 0;
297
+ border-bottom-left-radius: 0;
298
+ left: 0;
299
+ right: auto;
300
+ transform: translate3d(-100%, 0, 0);
301
+ }
302
+ .mat-drawer-transition .mat-drawer {
303
+ transition: transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1);
304
+ }
305
+ .mat-drawer:not(.mat-drawer-opened):not(.mat-drawer-animating) {
306
+ visibility: hidden;
307
+ box-shadow: none;
308
+ }
309
+ .mat-drawer:not(.mat-drawer-opened):not(.mat-drawer-animating) .mat-drawer-inner-container {
310
+ display: none;
311
+ }
312
+ .mat-drawer.mat-drawer-opened.mat-drawer-opened {
313
+ transform: none;
314
+ }
315
+
316
+ .mat-drawer-side {
317
+ box-shadow: none;
318
+ border-right-color: var(--mat-sidenav-container-divider-color, transparent);
319
+ border-right-width: 1px;
320
+ border-right-style: solid;
321
+ }
322
+ .mat-drawer-side.mat-drawer-end {
323
+ border-left-color: var(--mat-sidenav-container-divider-color, transparent);
324
+ border-left-width: 1px;
325
+ border-left-style: solid;
326
+ border-right: none;
327
+ }
328
+ [dir=rtl] .mat-drawer-side {
329
+ border-left-color: var(--mat-sidenav-container-divider-color, transparent);
330
+ border-left-width: 1px;
331
+ border-left-style: solid;
332
+ border-right: none;
333
+ }
334
+ [dir=rtl] .mat-drawer-side.mat-drawer-end {
335
+ border-right-color: var(--mat-sidenav-container-divider-color, transparent);
336
+ border-right-width: 1px;
337
+ border-right-style: solid;
338
+ border-left: none;
339
+ }
340
+
341
+ .mat-drawer-inner-container {
342
+ width: 100%;
343
+ height: 100%;
344
+ overflow: auto;
345
+ }
346
+
347
+ .mat-sidenav-fixed {
348
+ position: fixed;
349
+ }
350
+ `],encapsulation:2,changeDetection:0})}return i})(),Et=(()=>{class i extends yt{static \u0275fac=(()=>{let e;return function(o){return(e||(e=nt(i)))(o||i)}})();static \u0275cmp=D({type:i,selectors:[["mat-sidenav-content"]],hostAttrs:[1,"mat-drawer-content","mat-sidenav-content"],features:[Ie([{provide:Oe,useExisting:i}]),qe],ngContentSelectors:Tt,decls:1,vars:0,template:function(n,o){n&1&&(Ee(),oe(0))},encapsulation:2,changeDetection:0})}return i})(),An=(()=>{class i extends Mn{get fixedInViewport(){return this._fixedInViewport}set fixedInViewport(e){this._fixedInViewport=Me(e)}_fixedInViewport=!1;get fixedTopGap(){return this._fixedTopGap}set fixedTopGap(e){this._fixedTopGap=rn(e)}_fixedTopGap=0;get fixedBottomGap(){return this._fixedBottomGap}set fixedBottomGap(e){this._fixedBottomGap=rn(e)}_fixedBottomGap=0;static \u0275fac=(()=>{let e;return function(o){return(e||(e=nt(i)))(o||i)}})();static \u0275cmp=D({type:i,selectors:[["mat-sidenav"]],hostAttrs:[1,"mat-drawer","mat-sidenav"],hostVars:16,hostBindings:function(n,o){n&2&&(Q("tabIndex",o.mode!=="side"?"-1":null)("align",null),H("top",o.fixedInViewport?o.fixedTopGap:null,"px")("bottom",o.fixedInViewport?o.fixedBottomGap:null,"px"),V("mat-drawer-end",o.position==="end")("mat-drawer-over",o.mode==="over")("mat-drawer-push",o.mode==="push")("mat-drawer-side",o.mode==="side")("mat-sidenav-fixed",o.fixedInViewport))},inputs:{fixedInViewport:"fixedInViewport",fixedTopGap:"fixedTopGap",fixedBottomGap:"fixedBottomGap"},exportAs:["matSidenav"],features:[Ie([{provide:Mn,useExisting:i}]),qe],ngContentSelectors:Tt,decls:3,vars:0,consts:[["content",""],["cdkScrollable","",1,"mat-drawer-inner-container"]],template:function(n,o){n&1&&(Ee(),s(0,"div",1,0),oe(2),l())},dependencies:[Oe],encapsulation:2,changeDetection:0})}return i})(),Wr=(()=>{class i extends Sn{_allDrawers=void 0;_content=void 0;static \u0275fac=(()=>{let e;return function(o){return(e||(e=nt(i)))(o||i)}})();static \u0275cmp=D({type:i,selectors:[["mat-sidenav-container"]],contentQueries:function(n,o,r){if(n&1&&tn(r,Et,5)(r,An,5),n&2){let a;F(a=N())&&(o._content=a.first),F(a=N())&&(o._allDrawers=a)}},hostAttrs:[1,"mat-drawer-container","mat-sidenav-container"],hostVars:2,hostBindings:function(n,o){n&2&&V("mat-drawer-container-explicit-backdrop",o._backdropOverride)},exportAs:["matSidenavContainer"],features:[Ie([{provide:Pn,useExisting:i},{provide:Sn,useExisting:i}]),qe],ngContentSelectors:gl,decls:4,vars:2,consts:[[1,"mat-drawer-backdrop",3,"mat-drawer-shown"],[1,"mat-drawer-backdrop",3,"click"]],template:function(n,o){n&1&&(Ee(_l),g(0,vl,1,2,"div",0),oe(1),oe(2,1),g(3,Cl,2,0,"mat-sidenav-content")),n&2&&(v(o.hasBackdrop?0:-1),p(3),v(o._content?-1:3))},dependencies:[Et],styles:[wl],encapsulation:2,changeDetection:0})}return i})(),Hr=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=_i({type:i});static \u0275inj=di({imports:[an,$i,an]})}return i})();function Gr(i){if(!((i.ctrlKey||i.metaKey)&&!i.shiftKey&&i.key.toLowerCase()==="z"))return!1;let e=i.target,n=e?.tagName;return!(n==="INPUT"||n==="TEXTAREA"||n==="SELECT"||e?.isContentEditable)}var ri=cl(Xs(),1);function ti(i){let t=[];for(let e of i)for(let n of e.events)t.push(`${e.id}:${n.pr}`);return t}function Zs(i,t){if(!Array.isArray(t))return i;let e=new Set(t.filter(n=>typeof n=="string"));return i.filter(n=>!e.has(n))}var Qs="fb-whats-new-seen",Nt=class i{corpus=_(qr);_hasUnseen=O(!1);hasUnseen=this._hasUnseen.asReadonly();init(){return B(this,null,function*(){let t=yield this.corpus.load(),e=Zs(ti(t),this.readSeen());this._hasUnseen.set(e.length>0)})}markAllSeen(){return B(this,null,function*(){let t=yield this.corpus.load();this.writeSeen(ti(t)),this._hasUnseen.set(!1)})}readSeen(){try{let t=localStorage.getItem(Qs);return t===null?null:JSON.parse(t)}catch(t){return null}}writeSeen(t){try{localStorage.setItem(Qs,JSON.stringify(t))}catch(e){}}static \u0275fac=function(e){return new(e||i)};static \u0275prov=pi({token:i,factory:i.\u0275fac,providedIn:"root"})};var Bd=["frame"],Bt=class i{constructor(t,e){this.service=t;this.sanitizer=e}service;sanitizer;placed=G.required();frame;url;detach=null;ngOnInit(){let t=this.service.widgetDef(this.placed().extension,this.placed().widget);this.url=this.sanitizer.bypassSecurityTrustResourceUrl(t?.url?this.service.resolveAssetUrl(t.url):"about:blank"),this.detach=this.service.attachWidget(this.frame.nativeElement,this.placed())}onFrameLoad(){}ngOnDestroy(){this.detach?.(),this.detach=null}static \u0275fac=function(e){return new(e||i)(Ae(j),Ae(pe))};static \u0275cmp=D({type:i,selectors:[["fb-plotterext-widget"]],viewQuery:function(e,n){if(e&1&&ee(Bd,7),e&2){let o;F(o=N())&&(n.frame=o.first)}},inputs:{placed:[1,"placed"]},decls:2,vars:2,consts:[["frame",""],["sandbox","allow-scripts allow-same-origin allow-forms",3,"load","src","title"]],template:function(e,n){e&1&&(vi(0,"iframe",1,0),wi("load",function(){return n.onFrameLoad()}),Ci()),e&2&&ke("src",n.url,ae)("title",n.placed().widget)},styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}iframe[_ngcontent-%COMP%]{display:block;width:100%;height:100%;border:none;background:transparent}"]})};var $d=(i,t)=>t.type+t.extension,zd=(i,t)=>t.instanceId,Ud=(i,t)=>t.col+","+t.row;function qd(i,t){if(i&1){let e=E();s(0,"div",4)(1,"mat-icon",5),u(2,"filter_alt"),l(),s(3,"span",6),u(4),l(),s(5,"button",7),h("click",function(){let o=m(e).$implicit,r=c(2);return f(r.clearChip(o))}),s(6,"mat-icon"),u(7,"close"),l()()()}if(i&2){let e=t.$implicit;p(4),z(e.label)}}function Wd(i,t){if(i&1&&(s(0,"div",3),q(1,qd,8,1,"div",4,$d),l()),i&2){let e=c();V("pe-chips-low",e.byAnchor().ct.length>0),p(),W(e.service.filterChips())}}function Hd(i,t){if(i&1){let e=E();s(0,"div",14),h("pointerdown",function(o){m(e);let r=c(3);return f(r.dragStart(o))})("pointermove",function(o){m(e);let r=c(3);return f(r.dragMove(o))})("pointerup",function(o){m(e);let r=c(3);return f(r.dragEnd(o))})("pointercancel",function(){m(e);let o=c(3);return f(o.dragCancel())}),l()}}function Gd(i,t){if(i&1&&(s(0,"div",11),T(1,"fb-plotterext-widget",12),g(2,Hd,1,0,"div",13),l()),i&2){let e=t.$implicit,n=c(2),o=e===n.service.movingWidget();rt(n.cellStyle(e)),H("transform",o?n.dragTransform():null),V("pe-moving",o),p(),w("placed",e),p(),v(o?2:-1)}}function jd(i,t){if(i&1){let e=E();s(0,"div",15),h("click",function(){let o=m(e).$implicit,r=c().$implicit,a=c();return f(a.service.dropMovingWidget(r,o))})("keydown.enter",function(){let o=m(e).$implicit,r=c().$implicit,a=c();return f(a.service.dropMovingWidget(r,o))})("keydown.space",function(o){let r=m(e).$implicit,a=c().$implicit,d=c();return o.preventDefault(),f(d.service.dropMovingWidget(a,r))}),l()}if(i&2){let e=t.$implicit,n=c().$implicit,o=c();rt(o.slotStyle(e)),V("pe-slot-hover",o.isHovered(n,e)),Q("aria-label","Move widget here: "+o.anchorLabels[n])}}function Kd(i,t){if(i&1&&(s(0,"div",8),q(1,Gd,3,8,"div",9,zd),q(3,jd,1,5,"div",10,Ud),l()),i&2){let e=t.$implicit,n=c();rt(n.anchorStyle(e)),at("pe-"+e),Q("data-anchor",e),p(),W(n.byAnchor()[e]),p(2),W(n.service.moveTargets()[e])}}function Xd(i,t){if(i&1){let e=E();s(0,"div",2)(1,"mat-icon"),u(2,"open_with"),l(),s(3,"span"),u(4,"Drag the widget, or tap where it should go"),l(),s(5,"button",16),h("click",function(){m(e);let o=c();return f(o.cancelMove())}),u(6,"Cancel"),l()()}}var Zd=1500,$t=15,zt=class i{anchors=un;anchorLabels=bo;byAnchor=R(()=>{let t={};for(let e of un)t[e]=[];for(let e of this.service.activeWidgets())t[e.anchor]?.push(e);return t});service=_(j);zone=_(X);host=_(Y);holdTimer=null;downPoint=null;onPointerDown=t=>this.pointerDown(t);onPointerMove=t=>this.pointerMove(t);onPointerEnd=()=>this.cancelHold();unregisterHitTester=null;ngOnInit(){this.unregisterHitTester=this.service.registerHitTester((t,e)=>this.hitTest(t,e)),this.zone.runOutsideAngular(()=>{document.addEventListener("pointerdown",this.onPointerDown,!0),document.addEventListener("pointermove",this.onPointerMove,!0),document.addEventListener("pointerup",this.onPointerEnd,!0),document.addEventListener("pointercancel",this.onPointerEnd,!0)})}ngOnDestroy(){this.cancelHold(),this.unregisterHitTester?.(),this.unregisterHitTester=null,document.removeEventListener("pointerdown",this.onPointerDown,!0),document.removeEventListener("pointermove",this.onPointerMove,!0),document.removeEventListener("pointerup",this.onPointerEnd,!0),document.removeEventListener("pointercancel",this.onPointerEnd,!0)}anchorStyle(t){let e={"grid-template-columns":`repeat(${mn[t].cols}, var(--pe-cell-w))`};if(t!=="ct"&&t!=="cb")return e;let n=new Set;for(let r of this.byAnchor()[t]??[]){let a=this.service.widgetDef(r.extension,r.widget),{cols:d}=fn(a?.size??"1x1");for(let C=r.col;C<r.col+d&&C<2;C++)n.add(C)}let o="0px";return n.size===1&&(o=n.has(0)?"calc((var(--pe-cell-w) + var(--pe-gap)) / 2)":"calc((var(--pe-cell-w) + var(--pe-gap)) / -2)"),e["--pe-center-shift"]=o,e}cellStyle(t){let e=this.service.widgetDef(t.extension,t.widget),{cols:n,rows:o}=fn(e?.size??"1x1");return{"grid-column":`${t.col+1} / span ${n}`,"grid-row":`${t.row+1} / span ${o}`}}slotStyle(t){return{"grid-column":`${t.col+1}`,"grid-row":`${t.row+1}`}}clearChip(t){this.service.clearResourceFilter(t.extension,t.type)}drag=null;dragOffset=O(null);dragOver=O(null);dragTransform=R(()=>{let t=this.dragOffset();return t?`translate(${t.x}px, ${t.y}px)`:null});isHovered(t,e){let n=this.dragOver();return!!n&&n.anchor===t&&n.cell.col===e.col&&n.cell.row===e.row}dragStart(t){!t.isPrimary||t.pointerType==="mouse"&&t.button!==0||(t.target.setPointerCapture(t.pointerId),this.drag={x:t.clientX,y:t.clientY,moved:!1})}dragMove(t){if(!this.drag)return;let e=t.clientX-this.drag.x,n=t.clientY-this.drag.y;if(!this.drag.moved&&e*e+n*n<=$t*$t)return;this.drag.moved=!0,this.dragOffset.set({x:e,y:n});let o=this.hitTest(t.clientX,t.clientY),a=(o?this.service.moveTargets()[o.anchor]:[]).some(d=>d.col===o?.cell.col&&d.row===o?.cell.row);this.dragOver.set(a?o:null)}dragEnd(t){let e=this.drag;if(this.dragCancel(),!e)return;if(!e.moved){this.cancelMove();return}let n=this.hitTest(t.clientX,t.clientY);n&&this.service.dropMovingWidget(n.anchor,n.cell)}cancelMove(){this.dragCancel(),this.service.cancelMove()}dragCancel(){this.drag=null,this.dragOffset.set(null),this.dragOver.set(null)}pointerDown(t){if(this.cancelHold(),!t.isPrimary||t.pointerType==="mouse"&&t.button!==0||this.service.movingWidget()||t.target?.closest(".cdk-overlay-container, mat-dialog-container, button, mat-toolbar, .pe-cell, .pe-chips, .fb-pe-window, .fb-pe-window-backdrop, [fbMovablePanel]"))return;let n=this.hitTest(t.clientX,t.clientY);n&&(this.service.cellOccupied(n.anchor,n.cell)||(this.downPoint={x:t.clientX,y:t.clientY},this.holdTimer=setTimeout(()=>{this.holdTimer=null,this.zone.run(()=>this.service.openAddWidgetPicker(n.anchor,n.cell))},Zd)))}pointerMove(t){if(!this.holdTimer||!this.downPoint)return;let e=t.clientX-this.downPoint.x,n=t.clientY-this.downPoint.y;e*e+n*n>$t*$t&&this.cancelHold()}cancelHold(){this.holdTimer&&clearTimeout(this.holdTimer),this.holdTimer=null,this.downPoint=null}hitTest(t,e){let n=this.host.nativeElement.querySelectorAll(".pe-anchor");for(let o of Array.from(n)){let r=o.getBoundingClientRect();if(t<r.left||t>r.right||e<r.top||e>r.bottom)continue;let a=o.dataset.anchor,{cols:d,rows:C}=mn[a],y=Math.min(d-1,Math.max(0,Math.floor((t-r.left)/r.width*d))),A=Math.min(C-1,Math.max(0,Math.floor((e-r.top)/r.height*C)));return{anchor:a,cell:{col:y,row:A}}}return null}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=D({type:i,selectors:[["fb-plotterext-overlay"]],decls:4,vars:2,consts:[[1,"pe-chips",3,"pe-chips-low"],[1,"pe-anchor",3,"class","style"],[1,"pe-move-bar"],[1,"pe-chips"],[1,"pe-chip"],[1,"pe-chip-icon"],[1,"pe-chip-label"],["aria-label","Clear filter",1,"pe-chip-clear",3,"click"],[1,"pe-anchor"],[1,"pe-cell",3,"pe-moving","style","transform"],["role","button","tabindex","0",1,"pe-slot",3,"pe-slot-hover","style"],[1,"pe-cell"],[3,"placed"],[1,"pe-move-shield"],[1,"pe-move-shield",3,"pointerdown","pointermove","pointerup","pointercancel"],["role","button","tabindex","0",1,"pe-slot",3,"click","keydown.enter","keydown.space"],["mat-button","",3,"click"]],template:function(e,n){e&1&&(g(0,Wd,3,2,"div",0),q(1,Kd,5,5,"div",1,ye),g(3,Xd,7,0,"div",2)),e&2&&(v(n.service.filterChips().length?0:-1),p(),W(n.anchors),p(2),v(n.service.movingWidget()?3:-1))},dependencies:[Bt,we,Zi,ue,de],styles:["[_nghost-%COMP%]{position:absolute;inset:0;z-index:2000;pointer-events:none;--pe-cell-w: clamp(96px, 11vw, 150px);--pe-cell-h: clamp(84px, 9.5vw, 124px);--pe-gap: 6px;--pe-margin: 10px}.pe-anchor[_ngcontent-%COMP%]{position:absolute;display:grid;grid-template-rows:repeat(2,var(--pe-cell-h));gap:var(--pe-gap);pointer-events:none}.pe-tr[_ngcontent-%COMP%]{top:0;right:0}.pe-ct[_ngcontent-%COMP%]{top:0;left:50%;transform:translate(calc(-50% + var(--pe-center-shift, 0px)))}.pe-cb[_ngcontent-%COMP%]{bottom:0;left:50%;transform:translate(calc(-50% + var(--pe-center-shift, 0px)))}.pe-bl[_ngcontent-%COMP%]{bottom:0;left:0}.pe-br[_ngcontent-%COMP%]{bottom:0;right:0}.pe-cell[_ngcontent-%COMP%]{pointer-events:auto;overflow:hidden;border-radius:10px;box-shadow:0 1px 5px #00000059}.pe-moving[_ngcontent-%COMP%]{position:relative;z-index:2;outline:3px solid #29b6f6;opacity:.85}.pe-move-shield[_ngcontent-%COMP%]{position:absolute;inset:0;cursor:grab;touch-action:none}.pe-slot[_ngcontent-%COMP%]{pointer-events:auto;border-radius:10px;border:2px dashed #29b6f6;background:#29b6f626;cursor:pointer}.pe-slot[_ngcontent-%COMP%]:focus-visible{outline:3px solid #29b6f6}.pe-slot-hover[_ngcontent-%COMP%]{background:#29b6f673}.pe-move-bar[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;align-items:center;gap:8px;padding:4px 4px 4px 12px;border-radius:20px;background:#141a20d9;color:#e8edf2;pointer-events:auto;box-shadow:0 1px 4px #00000059}.pe-move-bar[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{color:#29b6f6}.pe-chips[_ngcontent-%COMP%]{position:absolute;top:8px;left:50%;transform:translate(-50%);display:flex;gap:6px;pointer-events:auto;z-index:1}.pe-chips-low[_ngcontent-%COMP%]{top:calc(2 * var(--pe-cell-h) + var(--pe-gap) + 10px)}.pe-chip[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;background:#141a20d9;color:#e8edf2;border-radius:16px;padding:3px 6px 3px 10px;font-size:12px;max-width:320px;box-shadow:0 1px 4px #00000059}.pe-chip-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px;color:#29b6f6}.pe-chip-label[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pe-chip-clear[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;border:none;background:#ffffff26;color:#e8edf2;border-radius:50%;width:20px;height:20px;padding:0;cursor:pointer}.pe-chip-clear[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:14px;width:14px;height:14px}"]})};var Qd=".pe-bl .pe-cell, .pe-br .pe-cell",Yd=".pe-cb .pe-cell";function Jd(i,t,e,n,o){let r=o;for(let a of t)a.left<i.right&&a.right>i.left&&(r=Math.max(r,e-a.top+(a.center?o:xo)));return Math.max(o,Math.min(r,n-i.height))}function eu(i,t,e){let n=e.left+e.width,o=/^(-?[\d.]+)px$/.exec(t),r=/^([\d.]+)%$/.exec(t),a=/^calc\(([\d.]+)% - ([\d.]+)px\)$/.exec(t),d=o?Number(o[1]):r?e.width*Number(r[1])/100:a?e.width*Number(a[1])/100-Number(a[2]):1/0;return Math.min(n,i+d)}var qt=class i{fbBottomClearance=G.required();clearance=Ai();el=_(Y).nativeElement;zone=_(X);plotterExt=_(j);resizeObserver;last=null;constructor(){Ii(()=>{this.plotterExt.activeWidgets(),this.measure()}),Ue(()=>{typeof ResizeObserver>"u"||this.zone.runOutsideAngular(()=>{this.resizeObserver=new ResizeObserver(()=>this.measure()),this.resizeObserver.observe(this.el);let t=this.el.offsetParent;t&&this.resizeObserver.observe(t)})})}ngOnDestroy(){this.resizeObserver?.disconnect()}measure(){let t=this.el.offsetParent;if(!t)return;let e=t.getBoundingClientRect(),n=this.el.getBoundingClientRect(),o=(d,C)=>Array.from(document.querySelectorAll(d),y=>{let A=y.getBoundingClientRect();return{left:A.left,right:A.right,top:A.top,center:C}}),r=[...o(Qd,!1),...o(Yd,!0)],a=Math.round(Jd({left:n.left,right:Math.max(n.right,eu(n.left,getComputedStyle(this.el).maxWidth,e)),height:n.height},r,e.bottom,e.height,this.fbBottomClearance()));a!==this.last&&(this.last=a,this.zone.run(()=>this.clearance.emit(a)))}static \u0275fac=function(e){return new(e||i)};static \u0275dir=gi({type:i,selectors:[["","fbBottomClearance",""]],inputs:{fbBottomClearance:[1,"fbBottomClearance"]},outputs:{clearance:"clearance"}})};var tu=["frame"],nu=(i,t)=>t.key;function iu(i,t){if(i&1&&T(0,"fb-plotterext-runtime",0),i&2){let e=t.$implicit;w("entry",e)}}var ii=class i{constructor(t,e){this.service=t;this.sanitizer=e}service;sanitizer;entry=G.required();frame;url;detach=null;ngOnInit(){let{extension:t,runtime:e}=this.entry();this.url=this.sanitizer.bypassSecurityTrustResourceUrl(e.url?this.service.resolveAssetUrl(e.url):"about:blank"),this.detach=this.service.attachBackground(this.frame.nativeElement,{extension:t,runtime:e})}ngOnDestroy(){this.detach?.(),this.detach=null}static \u0275fac=function(e){return new(e||i)(Ae(j),Ae(pe))};static \u0275cmp=D({type:i,selectors:[["fb-plotterext-runtime"]],viewQuery:function(e,n){if(e&1&&ee(tu,7),e&2){let o;F(o=N())&&(n.frame=o.first)}},inputs:{entry:[1,"entry"]},decls:2,vars:2,consts:[["frame",""],["sandbox","allow-scripts allow-same-origin allow-forms","aria-hidden","true",3,"src","title"]],template:function(e,n){e&1&&ot(0,"iframe",1,0),e&2&&ke("src",n.url,ae)("title",n.entry().runtime.id)},styles:["[_nghost-%COMP%]{display:none}"]})},Wt=class i{service=_(j);static \u0275fac=function(e){return new(e||i)};static \u0275cmp=D({type:i,selectors:[["fb-plotterext-runtimes"]],decls:2,vars:0,consts:[[3,"entry"]],template:function(e,n){e&1&&q(0,iu,1,1,"fb-plotterext-runtime",0,nu),e&2&&W(n.service.backgroundRuntimes())},dependencies:[ii],styles:["[_nghost-%COMP%]{display:none}"]})};var ou=["frame"],ru=(i,t)=>t.key;function au(i,t){if(i&1){let e=E();s(0,"div",1)(1,"span"),u(2),l(),s(3,"button",4),h("click",function(){m(e);let o=c();return f(o.service.closeVisiblePanel())}),s(4,"mat-icon"),u(5,"close"),l()()()}i&2&&(p(2),z(t.panel.title))}function su(i,t){if(i&1&&(s(0,"div",5),T(1,"fb-plotterext-panel-frame",6),l()),i&2){let e=t.$implicit;V("pe-body-hidden",!e.visible),p(),w("panelKey",e.key)("extension",e.extension)("panel",e.panel)("invocation",e.invocation)}}var oi=class i{panelKey=G.required();extension=G.required();panel=G.required();invocation=G();frame;url;detach=null;service=_(j);sanitizer=_(pe);ngOnInit(){let{url:t}=this.panel();this.url=this.sanitizer.bypassSecurityTrustResourceUrl(t?this.service.resolveAssetUrl(t):"about:blank"),this.detach=this.service.attachPanel(this.frame.nativeElement,{extension:this.extension(),panel:this.panel(),invocation:this.invocation(),close:()=>this.service.closePanel(this.panelKey())})}ngOnDestroy(){this.detach?.(),this.detach=null}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=D({type:i,selectors:[["fb-plotterext-panel-frame"]],viewQuery:function(e,n){if(e&1&&ee(ou,7),e&2){let o;F(o=N())&&(n.frame=o.first)}},inputs:{panelKey:[1,"panelKey"],extension:[1,"extension"],panel:[1,"panel"],invocation:[1,"invocation"]},decls:2,vars:2,consts:[["frame",""],["sandbox","allow-scripts allow-same-origin allow-forms",3,"src","title"]],template:function(e,n){e&1&&ot(0,"iframe",1,0),e&2&&ke("src",n.url,ae)("title",n.panel().title)},styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}iframe[_ngcontent-%COMP%]{display:block;width:100%;height:100%;border:none}"]})},Ht=class i{service=_(j);isOpen=R(()=>!!this.service.visiblePanel());constructor(){let t=!0;$(()=>{if(this.isOpen(),t){t=!1;return}this.service.pulseMapResize()})}onTransitionEnd(t){t.propertyName==="width"&&this.service.pulseMapResize(80)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=D({type:i,selectors:[["fb-plotterext-panel-drawer"]],hostVars:2,hostBindings:function(e,n){e&2&&V("pe-open",n.isOpen())},decls:5,vars:1,consts:[[1,"pe-drawer-inner",3,"transitionend"],[1,"pe-drawer-head"],[1,"pe-drawer-bodies"],[1,"pe-drawer-body",3,"pe-body-hidden"],["mat-icon-button","","aria-label","Close panel",3,"click"],[1,"pe-drawer-body"],[3,"panelKey","extension","panel","invocation"]],template:function(e,n){if(e&1&&(s(0,"div",0),h("transitionend",function(r){return n.onTransitionEnd(r)}),g(1,au,6,1,"div",1),s(2,"div",2),q(3,su,2,6,"div",3,ru),l()()),e&2){let o;p(),v((o=n.service.visiblePanel())?1:-1,o),p(2),W(n.service.openPanels())}},dependencies:[we,Re,ue,de,oi],styles:["[_nghost-%COMP%]{flex:0 0 auto;height:100%;width:0;max-width:92vw;overflow:hidden;background:#1d242b;color:#e8edf2}.pe-open[_nghost-%COMP%]{width:390px;box-shadow:-2px 0 8px #0006}.pe-drawer-inner[_ngcontent-%COMP%]{width:390px;max-width:92vw;height:100%;display:flex;flex-direction:column}.pe-drawer-head[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:4px 4px 4px 14px;font-weight:600;border-bottom:1px solid rgba(255,255,255,.12);flex:0 0 auto}.pe-drawer-bodies[_ngcontent-%COMP%]{flex:1;min-height:0;position:relative}.pe-drawer-body[_ngcontent-%COMP%]{position:absolute;inset:0}.pe-body-hidden[_ngcontent-%COMP%]{visibility:hidden;pointer-events:none}"]})};var cu=["frame"];function pu(i,t){if(i&1){let e=E();s(0,"button",10),h("pointerenter",function(o){m(e);let r=c();return f(r.onHoverReveal(o))})("pointerdown",function(o){m(e);let r=c();return r.revealBar(),f(r.startGesture(o,"move"))})("click",function(){m(e);let o=c();return f(o.revealBar())}),l()}if(i&2){let e=c();Q("tabindex",e.barShown()?-1:0)}}function du(i,t){if(i&1){let e=E();s(0,"button",5),h("click",function(){m(e);let o=c();return f(o.toggleCollapsed())}),s(1,"mat-icon"),u(2),l()(),s(3,"button",11),h("menuOpened",function(){m(e);let o=c();return f(o.holdBar("menu"))})("menuClosed",function(){m(e);let o=c();return f(o.releaseBar("menu"))}),s(4,"mat-icon"),u(5,"more_vert"),l()()}if(i&2){let e=c(),n=Te(9);w("matTooltip",e.def().collapsed?"Expand":"Collapse"),Q("aria-label",e.def().collapsed?"Expand":"Collapse"),p(2),z(e.def().collapsed?"expand_more":"expand_less"),p(),w("matMenuTriggerFor",n)}}function uu(i,t){if(i&1){let e=E();s(0,"button",12),h("click",function(){let o=m(e).$implicit,r=c();return f(r.windows.setOpacity(r.def().id,o))}),s(1,"mat-icon"),u(2),l(),s(3,"span"),u(4),l()()}if(i&2){let e=t.$implicit,n=c();Q("aria-checked",n.def().opacity===e),p(2),z(n.def().opacity===e?"radio_button_checked":"radio_button_unchecked"),p(2),ve("Opacity ",e*100,"%")}}function mu(i,t){if(i&1){let e=E();s(0,"div",14),h("pointerenter",function(o){let r=m(e).$implicit,a=c(2);return f(r.includes("n")&&a.onHoverReveal(o))})("pointerdown",function(o){let r=m(e).$implicit,a=c(2);return f(a.startGesture(o,r))}),l()}if(i&2){let e=t.$implicit;Q("data-mode",e)}}function fu(i,t){if(i&1&&q(0,mu,1,1,"div",13,ye),i&2){let e=c();W(e.resizeModes)}}var hu=hn.barH,Ys=3e3,_u=1e3,Gt=class i{def=G.required();frame;resizeModes=["n","s","e","w","ne","nw","se","sw"];opacities=[1,.8,.6,.4];windows=_(ht);host=_(j);sanitizer=_(pe);zone=_(X);el=_(Y).nativeElement;src;detach=null;z=R(()=>(this.windows.zOrder().indexOf(this.def().id)+1)*2);blocked=R(()=>{let t=this.windows.activeModal();return!!t&&t.id!==this.def().id});front=R(()=>this.windows.zOrder().at(-1)===this.def().id);presentation=R(()=>this.windows.presentation(this.def(),this.windows.area()));floating=R(()=>this.presentation()==="floating");movable=R(()=>this.floating()&&this.def().movable);resizable=R(()=>this.floating()&&this.def().resizable&&!this.def().collapsed);hides=R(()=>this.def().userClose==="hide"&&!this.def().modal);rect=R(()=>this.windows.rectOf(this.def(),this.windows.area()));drawn=R(()=>{let t=this.rect();return this.def().collapsed?he(ie({},t),{h:hu}):t});autoHide=R(()=>this.def().titleBar==="autoHide"&&!this.def().collapsed);barShown=O(!0);barHolds=new Set;barTimer;gesture=null;frameReq=0;constructor(){$(()=>{this.autoHide()&&Ce(()=>this.revealBar())}),$(()=>{let t=this.drawn();this.gesture||this.applyRect(t)})}ngOnInit(){let t=this.def().panel.url;this.src=this.sanitizer.bypassSecurityTrustResourceUrl(t?this.host.resolveAssetUrl(t):"about:blank"),this.detach=this.host.attachWindow(this.frame.nativeElement,this.def()),this.frame.nativeElement.addEventListener("load",this.watchEscape)}watchEscape=()=>{try{this.frame.nativeElement.contentWindow?.addEventListener("keydown",t=>{t.key==="Escape"&&this.def().modal&&this.zone.run(()=>this.windows.close(this.def().id,"user"))})}catch(t){}};ngOnDestroy(){this.frame.nativeElement.removeEventListener("load",this.watchEscape),this.endGesture(),clearTimeout(this.barTimer),this.detach?.(),this.detach=null}revealBar(){this.barShown.set(!0),this.scheduleBarHide(Ys)}holdBar(t){this.barHolds.add(t),clearTimeout(this.barTimer),this.barShown.set(!0)}releaseBar(t,e=Ys){this.barHolds.delete(t)&&this.scheduleBarHide(e)}scheduleBarHide(t){clearTimeout(this.barTimer),!this.barHolds.size&&(this.barTimer=setTimeout(()=>this.barShown.set(!1),t))}isHover(t){return t.pointerType==="mouse"||t.pointerType==="pen"}onHoverReveal(t){this.autoHide()&&this.isHover(t)&&this.revealBar()}onBarEnter(t){this.isHover(t)&&this.holdBar("hover")}onBarLeave(t){this.isHover(t)&&this.releaseBar("hover",_u)}onFocusIn(t){let e=t.target;e.closest(".fb-pe-window__bar, .fb-pe-window__grip")&&e.matches(":focus-visible")&&this.holdBar("focus")}startGesture(t,e){if(this.gesture||!t.isPrimary||t.pointerType==="mouse"&&t.button!==0||(e==="move"?!this.movable():!this.resizable()))return;let n=t.currentTarget,o=t.target.closest("a, button");if(e==="move"&&o&&o!==n)return;t.preventDefault();let r=this.drawn();this.gesture={pointerId:t.pointerId,mode:e,startX:t.clientX,startY:t.clientY,start:r,current:r,target:n},n.setPointerCapture(t.pointerId),this.holdBar("gesture"),this.windows.gestureActive.set(!0),this.zone.runOutsideAngular(()=>{n.addEventListener("pointermove",this.onMove),n.addEventListener("pointerup",this.onEnd),n.addEventListener("pointercancel",this.onEnd),n.addEventListener("lostpointercapture",this.onEnd)})}onMove=t=>{let e=this.gesture;if(!e||t.pointerId!==e.pointerId)return;let n=this.windows.area(),o=this.windows.gestureArea(this.def(),n);e.current=Eo(e.start,e.mode,t.clientX-e.startX,t.clientY-e.startY,o,hn,o.w>n.w?n.w:void 0),this.frameReq||(this.frameReq=requestAnimationFrame(()=>{this.frameReq=0,this.gesture&&this.applyRect(this.gesture.current)}))};onEnd=t=>{this.gesture&&t.pointerId===this.gesture.pointerId&&this.zone.run(()=>this.endGesture(!0))};endGesture(t=!1){let e=this.gesture;if(e){if(this.gesture=null,this.frameReq&&(cancelAnimationFrame(this.frameReq),this.frameReq=0),e.target.removeEventListener("pointermove",this.onMove),e.target.removeEventListener("pointerup",this.onEnd),e.target.removeEventListener("pointercancel",this.onEnd),e.target.removeEventListener("lostpointercapture",this.onEnd),e.target.hasPointerCapture(e.pointerId)&&e.target.releasePointerCapture(e.pointerId),this.windows.gestureActive.set(!1),this.releaseBar("gesture"),t&&e.current!==e.start){let{w:n,h:o}=this.def().collapsed?this.rect():e.current;this.windows.setRectFromGesture(this.def().id,{x:e.current.x,y:e.current.y,w:n,h:o})}this.applyRect(t?e.current:this.drawn())}}toggleCollapsed(){this.windows.setCollapsed(this.def().id,!this.def().collapsed)}onBarDoubleClick(t){this.def().modal||t.target.closest("a, button")||this.toggleCollapsed()}applyRect(t){this.el.style.transform=`translate(${Math.round(t.x)}px, ${Math.round(t.y)}px)`,this.el.style.width=`${Math.round(t.w)}px`,this.el.style.height=`${Math.round(t.h)}px`}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=D({type:i,selectors:[["fb-pe-window"]],viewQuery:function(e,n){if(e&1&&ee(cu,7),e&2){let o;F(o=N())&&(n.frame=o.first)}},hostAttrs:[1,"fb-pe-window"],hostVars:20,hostBindings:function(e,n){e&1&&h("pointerdown",function(){return n.windows.focus(n.def().id)})("focusin",function(r){return n.onFocusIn(r)})("focusout",function(){return n.releaseBar("focus")}),e&2&&(Q("data-window-id",n.def().id)("inert",n.blocked()?"":null),H("z-index",n.z())("opacity",n.def().opacity),V("collapsed",n.def().collapsed)("hidden",!n.def().visible)("modal",n.def().modal)("fullscreen",n.presentation()==="fullscreen")("fixed-place",!n.movable())("bar-overlay",n.autoHide())("bar-hidden",n.autoHide()&&!n.barShown()))},inputs:{def:[1,"def"]},decls:16,vars:12,consts:[["moremenu","matMenu"],["frame",""],["aria-label","Show title bar",1,"fb-pe-window__grip"],[1,"fb-pe-window__bar",3,"pointerenter","pointerleave","pointerdown","dblclick"],[1,"fb-pe-window__title",3,"title"],["mat-icon-button","",1,"fb-pe-window__btn",3,"click","matTooltip"],["xPosition","before"],["mat-menu-item","","role","menuitemradio"],[1,"fb-pe-window__body"],["sandbox","allow-scripts allow-same-origin allow-forms",3,"src","title"],["aria-label","Show title bar",1,"fb-pe-window__grip",3,"pointerenter","pointerdown","click"],["mat-icon-button","","matTooltip","More","aria-label","More",1,"fb-pe-window__btn",3,"menuOpened","menuClosed","matMenuTriggerFor"],["mat-menu-item","","role","menuitemradio",3,"click"],[1,"fb-pe-window__handle"],[1,"fb-pe-window__handle",3,"pointerenter","pointerdown"]],template:function(e,n){if(e&1){let o=E();g(0,pu,1,1,"button",2),s(1,"div",3),h("pointerenter",function(a){return n.onBarEnter(a)})("pointerleave",function(a){return n.onBarLeave(a)})("pointerdown",function(a){return m(o),n.revealBar(),f(n.startGesture(a,"move"))})("dblclick",function(a){return n.onBarDoubleClick(a)}),s(2,"span",4),u(3),l(),g(4,du,6,4),s(5,"button",5),h("click",function(){return n.windows.userClose(n.def().id)}),s(6,"mat-icon"),u(7),l()()(),s(8,"mat-menu",6,0),q(10,uu,5,3,"button",7,ye),l(),s(12,"div",8),T(13,"iframe",9,1),l(),g(15,fu,2,0)}e&2&&(v(n.autoHide()?0:-1),p(),V("front",n.front()),p(),w("title",n.def().title),p(),z(n.def().title),p(),v(n.def().modal?-1:4),p(),w("matTooltip",n.hides()?"Hide":"Close"),Q("aria-label",n.hides()?"Hide":"Close"),p(2),z(n.hides()?"remove":"close"),p(3),W(n.opacities),p(3),w("src",n.src,ae)("title",n.def().title),p(2),v(n.resizable()?15:-1))},dependencies:[we,Re,ue,de,wt,vt,gt,Ct,Le,De],styles:['[_nghost-%COMP%]{position:absolute;top:0;left:0;display:flex;flex-direction:column;pointer-events:auto;box-sizing:border-box;background:#fafafa;border:1px solid rgba(0,0,0,.3);border-radius:6px;box-shadow:0 4px 16px #00000059;overflow:visible}.dark-theme[_nghost-%COMP%], .dark-theme [_nghost-%COMP%]{background:#303030;border-color:#ffffff40}.fb-pe-window__bar[_ngcontent-%COMP%]{flex:0 0 32px;height:32px;display:flex;align-items:center;gap:2px;padding-left:8px;cursor:grab;touch-action:none;-webkit-user-select:none;user-select:none;border-radius:6px 6px 0 0;background:#e0e0e0;color:#000000de}.fb-pe-window__bar.front[_ngcontent-%COMP%]{background:#c5cae9}.dark-theme[_nghost-%COMP%] .fb-pe-window__bar[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .fb-pe-window__bar[_ngcontent-%COMP%]{background:#424242;color:#fff}.dark-theme[_nghost-%COMP%] .fb-pe-window__bar.front[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .fb-pe-window__bar.front[_ngcontent-%COMP%]{background:#3949ab}.fb-pe-window__title[_ngcontent-%COMP%]{flex:1 1 auto;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:13px;font-weight:500}.fb-pe-window__btn[_ngcontent-%COMP%]{--mat-icon-button-state-layer-size: 28px;width:28px;height:28px;padding:2px;cursor:pointer}.fb-pe-window__btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px}.fb-pe-window__body[_ngcontent-%COMP%]{position:relative;flex:1 1 auto;min-height:0;border-radius:0 0 6px 6px;overflow:hidden}.fb-pe-window__body[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{display:block;width:100%;height:100%;border:0;background:#fff}.bar-overlay[_nghost-%COMP%] .fb-pe-window__bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0;z-index:2;transition:opacity .15s ease-out,transform .15s ease-out}.bar-overlay[_nghost-%COMP%] .fb-pe-window__body[_ngcontent-%COMP%]{border-radius:6px}.bar-hidden[_nghost-%COMP%] .fb-pe-window__bar[_ngcontent-%COMP%]{opacity:0;transform:translateY(-6px);visibility:hidden;transition:opacity .3s ease-in,transform .3s ease-in,visibility 0s linear .3s}.fb-pe-window__grip[_ngcontent-%COMP%]{position:absolute;top:0;left:50%;z-index:1;width:64px;height:16px;margin:0 0 0 -32px;padding:0;border:0;background:transparent;cursor:grab;touch-action:none;transition:opacity .15s ease-out}.fb-pe-window__grip[_ngcontent-%COMP%]:before{content:"";position:absolute;top:5px;left:14px;right:14px;height:5px;border-radius:3px;background:#00000073;box-shadow:0 0 0 1px #fff9}[_nghost-%COMP%]:not(.bar-hidden) .fb-pe-window__grip[_ngcontent-%COMP%]{opacity:0}@media(pointer:coarse){.fb-pe-window__grip[_ngcontent-%COMP%]{width:96px;height:24px;margin-left:-48px}.fb-pe-window__grip[_ngcontent-%COMP%]:before{top:9px;left:24px;right:24px}}@media(prefers-reduced-motion:reduce){.fb-pe-window__bar[_ngcontent-%COMP%], .fb-pe-window__grip[_ngcontent-%COMP%]{transition:none!important}}.collapsed[_nghost-%COMP%] .fb-pe-window__body[_ngcontent-%COMP%]{visibility:hidden}.collapsed[_nghost-%COMP%] .fb-pe-window__bar[_ngcontent-%COMP%]{border-radius:6px}.collapsed[_nghost-%COMP%] .fb-pe-window__handle[_ngcontent-%COMP%]{display:none}.fb-pe-window__handle[_ngcontent-%COMP%]{position:absolute;z-index:3;touch-action:none;--edge: 10px;--out: calc(var(--edge) / -2)}@media(pointer:coarse){.fb-pe-window__handle[_ngcontent-%COMP%]{--edge: 16px}}.fb-pe-window__handle[data-mode*=n][_ngcontent-%COMP%]{top:var(--out)}.fb-pe-window__handle[data-mode*=s][_ngcontent-%COMP%]{bottom:var(--out)}.fb-pe-window__handle[data-mode*=e][_ngcontent-%COMP%]{right:var(--out)}.fb-pe-window__handle[data-mode*=w][_ngcontent-%COMP%]{left:var(--out)}.fb-pe-window__handle[data-mode=n][_ngcontent-%COMP%], .fb-pe-window__handle[data-mode=s][_ngcontent-%COMP%]{left:var(--edge);right:var(--edge);height:var(--edge);cursor:ns-resize}.fb-pe-window__handle[data-mode=e][_ngcontent-%COMP%], .fb-pe-window__handle[data-mode=w][_ngcontent-%COMP%]{top:var(--edge);bottom:var(--edge);width:var(--edge);cursor:ew-resize}.fb-pe-window__handle[data-mode=ne][_ngcontent-%COMP%], .fb-pe-window__handle[data-mode=nw][_ngcontent-%COMP%], .fb-pe-window__handle[data-mode=se][_ngcontent-%COMP%], .fb-pe-window__handle[data-mode=sw][_ngcontent-%COMP%]{width:calc(var(--edge) * 1.5);height:calc(var(--edge) * 1.5)}.fb-pe-window__handle[data-mode=ne][_ngcontent-%COMP%], .fb-pe-window__handle[data-mode=sw][_ngcontent-%COMP%]{cursor:nesw-resize}.fb-pe-window__handle[data-mode=nw][_ngcontent-%COMP%], .fb-pe-window__handle[data-mode=se][_ngcontent-%COMP%]{cursor:nwse-resize}.hidden[_nghost-%COMP%]{display:none}.fullscreen[_nghost-%COMP%]{border-radius:0}.fullscreen[_nghost-%COMP%] .fb-pe-window__bar[_ngcontent-%COMP%], .fullscreen[_nghost-%COMP%] .fb-pe-window__body[_ngcontent-%COMP%]{border-radius:0;cursor:default}.fixed-place[_nghost-%COMP%] .fb-pe-window__bar[_ngcontent-%COMP%]{cursor:default}'],changeDetection:0})};var gu=(i,t)=>t.id;function vu(i,t){if(i&1&&(s(0,"div",2),h("pointerdown",function(n){return n.stopPropagation()}),l()),i&2){let e=c();H("z-index",t)("right",e.inset(),"px")}}function Cu(i,t){if(i&1&&T(0,"fb-pe-window",1),i&2){let e=t.$implicit;w("def",e)}}var wu="fb-pe-window-gesture",jt=class i{inset=G(0);service=_(ht);overlays=_(pt);document=_(et);el=_(Y).nativeElement;zone=_(X);observer=null;backdropZ=R(()=>{let t=this.service.activeModal();return t?(this.service.zOrder().indexOf(t.id)+1)*2-1:0});constructor(){$(()=>{this.document.body.classList.toggle(wu,this.service.gestureActive())})}ngAfterViewInit(){this.measure(),!(typeof ResizeObserver>"u")&&(this.observer=new ResizeObserver(()=>this.zone.run(()=>this.measure())),this.observer.observe(this.el))}ngOnDestroy(){this.observer?.disconnect()}measure(){let t=this.el.getBoundingClientRect(),e=this.inset();t.width>e&&t.height>0&&this.service.setArea({w:t.width-e,h:t.height},e)}onEscape(t){if(t.defaultPrevented||this.overlays.getContainerElement().querySelector(".cdk-overlay-pane"))return;let e=this.service.activeModal();e&&this.service.close(e.id,"user")}onWindowBlur(){setTimeout(()=>{let t=this.document.activeElement;if(t?.tagName!=="IFRAME")return;let e=t.closest("[data-window-id]")?.getAttribute("data-window-id");e&&this.service.focus(e)})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=D({type:i,selectors:[["fb-pe-window-layer"]],hostVars:2,hostBindings:function(e,n){e&1&&h("blur",function(){return n.onWindowBlur()},fi)("keydown.escape",function(r){return n.onEscape(r)},ze),e&2&&H("left",n.inset(),"px")},inputs:{inset:[1,"inset"]},decls:3,vars:1,consts:[[1,"fb-pe-window-backdrop",3,"z-index","right"],[3,"def"],[1,"fb-pe-window-backdrop",3,"pointerdown"]],template:function(e,n){if(e&1&&(g(0,vu,1,4,"div",0),q(1,Cu,1,1,"fb-pe-window",1,gu)),e&2){let o;v((o=n.backdropZ())?0:-1,o),p(),W(n.service.windows())}},dependencies:[Gt],styles:["[_nghost-%COMP%]{position:absolute;inset:0;z-index:4850;pointer-events:none;overflow:hidden}.fb-pe-window-backdrop[_ngcontent-%COMP%]{position:absolute;inset:0;pointer-events:auto;background:#00000052}"],changeDetection:0})};var tl=new Set(["map","layers",Cn]),el=new WeakSet;function bu(i){let t=document.createElement("div"),e=null;return new Ge({source:i.getSource()??void 0,render:n=>{let o=e?.style.cssText,r=i.render(n,null);return r instanceof HTMLElement&&(e=r,t.className=r.className,t.style.cssText=r.style.cssText,o!==void 0?r.style.cssText=o:i.changed()),t}})}function xu(i){if(i instanceof dt){let n=new dt;return{twin:n,stopChildren:nl(i.getLayers(),n.getLayers())}}let t=i.getClassName(),e=i instanceof Ve?{declutter:i.getDeclutter(),renderBuffer:i.getRenderBuffer(),updateWhileAnimating:i.getUpdateWhileAnimating(),updateWhileInteracting:i.getUpdateWhileInteracting()}:{};return i instanceof bn?{twin:new bn(he(ie({className:t},e),{renderMode:i.getRenderMode()}))}:i instanceof pn?{twin:new pn(ie({className:t},e))}:i instanceof En?{twin:new En({className:t,source:i.getSource()??void 0})}:i instanceof gn?{twin:new gn({className:t})}:i instanceof wn?i.getSource()instanceof Qo?null:{twin:new wn({className:t})}:Object.getPrototypeOf(i)===Ge.prototype?{twin:bu(i)}:null}function yu(i,t){let e=ie({},i.getProperties());tl.forEach(n=>delete e[n]),t.setProperties(e)}function Eu(i){let t=null,e=[],n,o=()=>{He(e),t?.stopChildren?.(),n?.()};try{if(t=xu(i),!t)return el.has(i)||(el.add(i),console.warn("Split view: a layer of this kind is not shown in the second pane",i)),null;let{twin:r}=t;yu(i,r);let a=i.getBackground();return a&&r.setBackground(a),e.push(i.on("propertychange",d=>{tl.has(d.key)||r.set(d.key,i.get(d.key))})),r instanceof Ge&&(e.push(...Yo(r)),n=i.get(Cn)?.(r),i instanceof Ve&&r instanceof Ve&&r.setStyle(i.getStyle()),e.push(i.on("change",()=>{let d=i.getBackground()||void 0;r.getBackground()!==d&&r.setBackground(d),i instanceof Ve&&r instanceof Ve&&r.getStyle()!==i.getStyle()?r.setStyle(i.getStyle()):r.changed()}))),{layer:r,stop:o}}catch(r){return o(),t?.twin.dispose(),console.warn("Split view: a layer could not be shown in both panes",r),null}}function nl(i,t){let e=new Map,n=a=>{if(e.has(a))return;let d=Eu(a);if(!d)return;e.set(a,d);let C=i.getArray().filter(y=>e.has(y)).indexOf(a);t.insertAt(C<0?t.getLength():C,d.layer)},o=a=>{let d=e.get(a);if(!d)return;t.remove(d.layer),d.stop();let C=d.layer;C instanceof Ge&&(C.setSource(null),Po(C)),setTimeout(()=>C.dispose(),0),e.delete(a)};i.forEach(n);let r=[i.on("add",a=>n(a.element)),i.on("remove",a=>o(a.element))];return()=>{He(r),[...e.keys()].forEach(o)}}function il(i,t){let e=new dt;t.addLayer(e);let n=nl(i.getLayers(),e.getLayers());return()=>{n(),t.removeLayer(e),e.dispose()}}function Tu(i,t){i&1&&(s(0,"ol-control")(1,"ol-content"),We(2,3),l()()),i&2&&(p(2),w("ngTemplateOutlet",t))}var ol=100;function rl(i){return getComputedStyle(i).position!=="static"?[i]:[...i.children].flatMap(rl)}var Kt=class i{app=_(xt);skstream=_(ft);split=_(bt);mapInteract=_(ut);host=_(Y);interactionList=[];interactionsFor;olControls=Vr;scaleUnits=G("");statusBar=G(null);zoom=O(10);center=O([0,0]);heading=O(0);rotation=R(()=>this.split.northUp()?0:0-this.heading());footprint=O(null);map;mainMap;stopMirror;stopUseWatch=[];panelSize;gripFrame=0;gripRatio=null;vessels;commands;pressedAt=0;gripRect=null;gripPanel=null;gripStacked=!1;gripStart=0;gripOffset=0;overscans=[];endDrag=null;zone=_(X);announcer=_(ji);dragging=O(!1);tabbed=!1;documentListeners=[];constructor(){$(()=>{this.split.follow()&&Ce(()=>this.centerOnVessel())}),$(()=>{let e=this.scaleUnits();Ce(()=>this.setScaleUnits(e))}),$(()=>{this.interacting()&&Ce(()=>this.split.activate("main"))});let t;$(()=>{let e=this.split.secondaryActive();t!==void 0&&e!==t&&this.announcer.announce(e?"Second chart active":"Main chart active"),t=e})}ngOnInit(){this.heading.set(this.app.data.vessels.active.orientation??0);let{min:t,max:e}=this.app.MAP_ZOOM_EXTENT,n=this.split.lastView();this.zoom.set(Math.min(e,Math.max(t,n.zoom??this.app.config.map.zoomLevel-3))),!this.split.follow()&&n.center?this.center.set(n.center):this.centerOnVessel()||this.center.set(n.center??[...this.app.config.map.center]),this.vessels=this.skstream.vessels$().subscribe(()=>this.onVessels()),this.commands=this.split.commands$.subscribe(o=>this.onCommand(o))}ngAfterViewInit(){this.documentListeners=[["keydown",e=>this.onDocumentKey(e)],["pointerdown",()=>this.onDocumentPress()]],this.zone.runOutsideAngular(()=>this.documentListeners.forEach(([e,n])=>document.addEventListener(e,n,!0)));let t=this.host.nativeElement.parentElement;t&&(this.panelSize=new ResizeObserver(()=>{let[e,n]=[t.clientWidth,t.clientHeight];this.split.setPanelSize(e,n);let o=this.gripPanel;o&&(o[0]!==e||o[1]!==n)&&this.zone.run(()=>this.gripUp())}),this.panelSize.observe(t))}ngOnDestroy(){this.documentListeners.forEach(([t,e])=>document.removeEventListener(t,e,!0)),this.vessels?.unsubscribe(),this.commands?.unsubscribe(),this.split.flush(),this.panelSize?.disconnect(),cancelAnimationFrame(this.gripFrame),this.endDrag?.(),this.stopMirror?.(),this.stopUseWatch.forEach(t=>t()),this.mainMap?.un("moveend",this.onMainMoved),this.split.setSecondaryMap(null)}onMapReady(t){this.map=t.map,this.mainMap=t.mapService.getMaps().find(e=>e!==t.map),this.mainMap&&(this.stopMirror=il(this.mainMap,t.map),this.mainMap.on("moveend",this.onMainMoved),this.stopUseWatch.push(this.activateOnUse(this.mainMap,"main"),this.nameChart(this.mainMap,"Main chart"))),this.stopUseWatch.push(this.activateOnUse(t.map,"secondary"),this.nameChart(t.map,"Second chart")),this.updateFootprint(),this.setScaleUnits(this.scaleUnits()),this.split.rememberView(this.zoom(),this.center(),!1),this.split.setSecondaryMap(t.map)}activateOnUse(t,e){let n=t.getViewport(),o=d=>!t.getOverlayContainerStopEvent().contains(d.target),r=d=>{o(d)&&this.split.activate(e)},a=d=>{o(d)&&this.tabbed&&this.split.activate(e)};return n.addEventListener("pointerdown",r),t.getTargetElement()?.addEventListener("focusin",a),()=>{n.removeEventListener("pointerdown",r),t.getTargetElement()?.removeEventListener("focusin",a)}}onDocumentKey(t){this.tabbed=t.key==="Tab"}onDocumentPress(){this.tabbed=!1}nameChart(t,e){let n=t.getTargetElement();if(!n)return()=>{};let o=n.tabIndex;return n.tabIndex=0,n.setAttribute("role","region"),n.setAttribute("aria-label",e),()=>{n.tabIndex=o,n.removeAttribute("role"),n.removeAttribute("aria-label")}}interacting(){return this.mapInteract.isDrawing()||this.mapInteract.isModifying()||this.mapInteract.isMeasuring()||this.mapInteract.isBoxSelecting()}onPress(){this.pressedAt=Date.now()}onPointerMove(t){this.split.forwardPointer(t.lonlat,t.originalEvent?.pointerType)}onTap(t){this.map&&!this.interacting()&&this.split.forwardTap({kind:"click",event:t,map:this.map,pressedAt:this.pressedAt})}onContextMenu(t){t.preventDefault();let e=this.map;if(!e||this.interacting())return;let n=e.getEventCoordinate(t),o=cn(e.getView().getProjection().getExtent());this.split.forwardTap(he(ie({kind:"contextmenu",event:t},Ao(e,e.getEventPixel(t),So(t.pointerType,ko,Io))),{lonlat:lo(n),worldOffset:vn(n[0],o),map:e,zoom:e.getView().getZoom()??this.zoom()}))}onMoveEnd(t){if(this.zoom.set(t.zoom),t.map?.get(_t))return;let e=this.split.follow()&&t.zoom===this.split.zoom();this.split.rememberView(t.zoom,[t.lonlat[0],t.lonlat[1]],!e)}setScaleUnits(t){this.map?.getControls().getArray().find(n=>n instanceof Tr)?.setUnits(Dr(t))}onDrag(){this.split.follow()&&this.split.setFollow(!1)}interactions(){let t=!!this.app.config.map.doubleClickZoom;return t!==this.interactionsFor&&(this.interactionsFor=t,this.interactionList=Lr(t)),this.interactionList}onKeydown(t){this.map?.getOverlayContainerStopEvent().contains(t.target)||this.split.activate("secondary");let e=Or(t);e?(t.preventDefault(),this.onCommand({kind:"zoom",step:e==="in"?1:-1})):Rr(t)&&this.onDrag()}onCommand(t){let{min:e,max:n}=this.app.MAP_ZOOM_EXTENT,o=r=>Math.min(n,Math.max(e,r));if(t.kind==="zoom"){this.zoom.set(o(this.zoom()+t.step));return}this.split.follow()&&this.split.setFollow(!1),this.center.set([...t.position]),typeof t.zoom=="number"&&(t.exactZoom||t.zoom>this.zoom())&&this.zoom.set(o(t.zoom))}centerOnVessel(){let t=this.app.data.vessels.active;return!t?.positionReceived||!Array.isArray(t.position)?!1:(this.center.set([...t.position]),!0)}splitPercent(){return this.percent(this.split.shownRatio())}percent(t){return Math.round(t*100)}gripDown(t){let e=this.host.nativeElement.parentElement;if(!e||this.endDrag||!t.isPrimary||t.button!==0)return;this.gripRect=e.getBoundingClientRect(),this.gripPanel=[e.clientWidth,e.clientHeight],this.gripStacked=this.split.stacked(),this.gripRatio=null;let n=t.currentTarget;n.setPointerCapture?.(t.pointerId),t.preventDefault(),this.dragging.set(!0);let o=this.gripStacked?this.gripRect.height:this.gripRect.width,r=this.split.shownRatio();this.gripStart=r,this.gripOffset=this.gripStacked?t.clientY-(this.gripRect.top+r*o):t.clientX-(this.gripRect.left+r*o),this.zone.runOutsideAngular(()=>{let a=y=>this.gripMove(y),d=()=>this.zone.run(()=>this.gripUp()),C=["pointerup","pointercancel","lostpointercapture"];n.addEventListener("pointermove",a),C.forEach(y=>n.addEventListener(y,d)),this.endDrag=()=>{n.removeEventListener("pointermove",a),C.forEach(y=>n.removeEventListener(y,d)),cancelAnimationFrame(this.gripFrame),this.overscans.forEach(y=>this.release(y)),this.overscans=[],e.style.removeProperty(Fe)}}),this.overscan(this.mainMap,(je(yn,o)-r)*o,1),this.overscan(this.map,(r-je(xn,o))*o,-1)}gripMove(t){let e=this.host.nativeElement.parentElement;if(!this.gripRect||!e)return;let n=fr(this.gripRect,t.clientX-(this.gripStacked?0:this.gripOffset),t.clientY-(this.gripStacked?this.gripOffset:0),this.gripStacked);if(n===null)return;this.gripRatio=n;let o=this.gripStacked?this.gripRect.height:this.gripRect.width,r=je(n,o),a=(r-this.gripStart)*o;cancelAnimationFrame(this.gripFrame),this.gripFrame=requestAnimationFrame(()=>{e.style.setProperty(Fe,`${r*100}%`),this.overscans.forEach(d=>this.shift(d,d.shown+d.grows*a))})}gripUp(){let t=this.gripRect;if(t){if(this.gripRect=null,this.gripPanel=null,this.gripRatio!==null){let e=this.gripStacked?t.height:t.width;this.host.nativeElement.parentElement?.style.setProperty(Fe,`${je(this.gripRatio,e)*100}%`),this.split.setRatio(this.gripRatio),this.gripRatio=null}this.endDrag?.(),this.endDrag=null,this.dragging.set(!1),this.updateFootprint()}}overscan(t,e,n){let o=t?.getTargetElement();if(!t||!o)return;let r=this.gripStacked?"height":"width",a=o.getBoundingClientRect()[r],d=Math.round(a+Math.max(0,e)),{width:C,height:y,transform:A,willChange:M}=o.style,I=[...t.getOverlayContainerStopEvent()?.children??[]].filter(xe=>!xe.classList.contains("ol-overlay-container")).flatMap(rl),S=xe=>{let _e=xe.getBoundingClientRect();return this.gripStacked?_e.top+_e.height/2:_e.left+_e.width/2},Zt=I.map(S);o.style[r]=`${a+ol}px`;let ll=I.map((xe,_e)=>(S(xe)-Zt[_e])/ol);o.style[r]=`${d}px`;let ai={map:t,target:o,shown:a,max:d,grows:n,controls:I.map((xe,_e)=>({el:xe,k:ll[_e]})),style:{width:C,height:y,transform:A,willChange:M}};this.overscans.push(ai),o.style.willChange="transform",this.shift(ai,a),t.set(_t,!0),t.updateSize(),t.renderSync()}shift(t,e){let n=Math.round((e-t.max)/2);t.target.style.transform=this.gripStacked?`translateY(${n}px)`:`translateX(${n}px)`,t.controls.forEach(({el:o,k:r})=>{let a=Math.round((2*r-1)*n);o.style.translate=this.gripStacked?`0 ${a}px`:`${a}px 0`})}release(t){if(Object.assign(t.target.style,t.style),t.controls.forEach(({el:o})=>o.style.translate=""),t.map.set(_t,!1),!t.map.getTargetElement())return;let e=!1,n=t.map.once("moveend",()=>e=!0);t.map.updateSize(),t.map.renderSync(),He(n),e||t.map.dispatchEvent(new co("moveend",t.map))}gripKey(t){let e=this.split.stacked(),n=e?"ArrowUp":"ArrowLeft",o=e?"ArrowDown":"ArrowRight",r=t.key==="Home"?xn:t.key==="End"?yn:t.key===n?this.split.shownRatio()-.05:t.key===o?this.split.shownRatio()+.05:null;r!==null&&(t.preventDefault(),this.split.setRatio(r))}onVessels(){this.split.follow()&&this.centerOnVessel();let t=this.app.data.vessels.active;typeof t.orientation=="number"&&this.heading.set(t.orientation)}onMainMoved=()=>{this.dragging()||this.updateFootprint()};updateFootprint(){let t=this.mainMap,e=t?hr(t):null;if(!t||!e){this.footprint.set(null);return}let n=t.getView(),o=vn(n.getCenter()[0],cn(n.getProjection().getExtent()));this.footprint.set(e.map(([r,a])=>[r-o,a]))}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=D({type:i,selectors:[["fb-split-map"]],hostVars:4,hostBindings:function(e,n){e&2&&V("active-pane",n.split.secondaryActive())("stacked",n.split.stacked())},inputs:{scaleUnits:[1,"scaleUnits"],statusBar:[1,"statusBar"]},decls:6,vars:18,consts:[["role","separator","tabindex","0","aria-label","Main chart","aria-controls","fb-main-chart","matTooltip","Drag, or use the arrow keys, to resize",1,"split-grip",3,"pointerdown","contextmenu","keydown","matTooltipDisabled"],["olView","",1,"split-ol-map",3,"mapReady","mapMoveEnd","mapPointerDown","mapPointerDrag","mapPointerMove","mapSingleClick","mapContextMenu","contextmenu","keydown","secondary","logo","olInteractions","olControls","zoom","center","rotation","minZoom","maxZoom","enableAnimation"],[3,"ring","zIndex"],[3,"ngTemplateOutlet"]],template:function(e,n){if(e&1&&(s(0,"div",0),h("pointerdown",function(r){return n.gripDown(r)})("contextmenu",function(r){return r.preventDefault()})("keydown",function(r){return n.gripKey(r)}),s(1,"mat-icon"),u(2,"drag_indicator"),l()(),s(3,"ol-map",1),h("mapReady",function(r){return n.onMapReady(r)})("mapMoveEnd",function(r){return n.onMoveEnd(r)})("mapPointerDown",function(){return n.onPress()})("mapPointerDrag",function(){return n.onDrag()})("mapPointerMove",function(r){return n.onPointerMove(r)})("mapSingleClick",function(r){return n.onTap(r)})("mapContextMenu",function(r){return n.onContextMenu(r)})("contextmenu",function(r){return n.onContextMenu(r)})("keydown",function(r){return n.onKeydown(r)}),T(4,"fb-view-footprint",2),g(5,Tu,3,1,"ol-control"),l()),e&2){let o;w("matTooltipDisabled",n.dragging()),Q("aria-orientation",n.split.stacked()?"horizontal":"vertical")("aria-valuenow",n.splitPercent())("aria-valuemin",n.percent(n.split.shownRange().min))("aria-valuemax",n.percent(n.split.shownRange().max)),p(3),w("secondary",!0)("logo",!1)("olInteractions",n.interactions())("olControls",n.olControls)("zoom",n.zoom())("center",n.center())("rotation",n.rotation())("minZoom",n.app.MAP_ZOOM_EXTENT.min)("maxZoom",n.app.MAP_ZOOM_EXTENT.max)("enableAnimation",!1),p(),w("ring",n.footprint())("zIndex",950),p(),v((o=n.split.secondaryActive()&&n.statusBar())?5:-1,o)}},dependencies:[Ir,Pr,Mr,Er,Oo,Sr,Ar,kr,ue,de,Le,De,lt],styles:['[_nghost-%COMP%]{position:relative;display:block;flex:1 1 0;min-width:0;min-height:0;box-sizing:border-box;border-left:8px solid #2b3846}.split-ol-map[_ngcontent-%COMP%]{display:block;width:100%;height:100%;overflow:hidden}.active-pane[_nghost-%COMP%]:after{content:"";position:absolute;inset:0;z-index:2;pointer-events:none;box-shadow:inset 0 0 0 3px #367abe}@media(forced-colors:active){.active-pane[_nghost-%COMP%]:after{box-shadow:none;outline:3px solid Highlight;outline-offset:-3px}}.split-grip[_ngcontent-%COMP%]{position:absolute;top:50%;left:-4px;transform:translate(-50%,-50%);z-index:3;width:28px;height:56px;padding:0;border:1px solid #8c95bd;border-radius:14px;background-color:#e0e0ff;color:#2b3846;display:flex;align-items:center;justify-content:center;cursor:col-resize;touch-action:none}.split-grip[_ngcontent-%COMP%]:before{content:"";position:absolute;inset:-10px}.split-grip[_ngcontent-%COMP%]:focus-visible{outline:3px solid rgb(54,122,190);outline-offset:2px}.stacked[_nghost-%COMP%]{border-left:0;border-top:8px solid #2b3846}.stacked[_nghost-%COMP%] .split-grip[_ngcontent-%COMP%]{top:-4px;left:75%;width:56px;height:28px;cursor:row-resize}.stacked[_nghost-%COMP%] .split-grip[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{transform:rotate(90deg)}']})};var Mu=["leftToolbar"],Su=["sideright"],Pu=["fbMap"],Au=["layersmenu"],ku=["editmenu"],Iu=["settingsmenu"],Ou=()=>[tr],Ru=()=>[sr],Du=()=>[Jo],Lu=()=>[zo],Vu=()=>[qo],Fu=()=>[er],Nu=()=>[jo],Bu=()=>[cr],$u=()=>[ur],zu=(i,t)=>({"dark-theme":i,"app-night":t}),Uu=()=>[],sl=i=>({$implicit:i}),qu=(i,t)=>t.id,Wu=(i,t)=>t[0];function Hu(i,t){if(i&1){let e=E();s(0,"button",11),h("click",function(){m(e);let o=c();return f(o.displayLeftMenu("resourceGroups",!0))}),s(1,"mat-icon"),u(2,"category"),l(),u(3," \xA0Groups "),l()}}function Gu(i,t){if(i&1){let e=E();s(0,"button",11),h("click",function(){m(e);let o=c();return f(o.showOverlaysMoved())}),s(1,"mat-icon"),u(2,"layers"),l(),u(3," \xA0Overlays "),l()}}function ju(i,t){if(i&1){let e=E();s(0,"button",11),h("click",function(){m(e);let o=c();return f(o.displayLeftMenu("trackList",!0))}),s(1,"mat-icon",40),u(2,"show_chart"),l(),u(3," \xA0Tracks "),l()}}function Ku(i,t){if(i&1){let e=E();s(0,"div")(1,"button",11),h("click",function(){let o=m(e).$implicit,r=c(2);return f(r.openExperiment({choice:o,value:null}))}),T(2,"mat-icon",41),u(3),l()()}if(i&2){let e=t.$implicit;p(3),ve(" \xA0",e," ")}}function Xu(i,t){if(i&1&&(s(0,"div"),q(1,Ku,4,1,"div",null,ye),l()),i&2){let e=c();p(),W(e.app.config.resources.paths.sort())}}function Zu(i,t){i&1&&We(0)}function Qu(i,t){if(i&1&&(s(0,"button",42),it(1,Zu,1,0,"ng-container",44),s(2,"span"),u(3),l()()),i&2){let e=c().$implicit,n=c(),o=Te(49);w("disabled",e.disabled)("matMenuTriggerFor",e.menu),p(),w("ngTemplateOutlet",o)("ngTemplateOutletContext",nn(5,sl,e)),p(2),z(n.toolbarMenuLabel(e))}}function Yu(i,t){i&1&&We(0)}function Ju(i,t){if(i&1){let e=E();s(0,"button",45),h("click",function(){let o;m(e);let r=c().$implicit,a=c();return f((o=a.leftToolbar())==null?null:o.run(r))}),it(1,Yu,1,0,"ng-container",44),s(2,"span"),u(3),l()()}if(i&2){let e=c().$implicit,n=c(),o=Te(49);w("disabled",e.disabled),p(),w("ngTemplateOutlet",o)("ngTemplateOutletContext",nn(4,sl,e)),p(2),z(n.toolbarMenuLabel(e))}}function em(i,t){if(i&1&&g(0,Qu,4,7,"button",42)(1,Ju,4,6,"button",43),i&2){let e=t.$implicit;v(e.menu?0:1)}}function tm(i,t){i&1&&T(0,"mat-divider")}function nm(i,t){if(i&1){let e=E();s(0,"a",11),h("click",function(){m(e);let o=c(2);return f(o.clearTrail(o.app.data.serverTrail))}),s(1,"mat-icon"),u(2,"clear_all"),l(),s(3,"span"),u(4),l()(),s(5,"a",11),h("click",function(){m(e);let o=c(2);return f(o.trailToRoute())}),s(6,"mat-icon"),u(7,"insights"),l(),s(8,"span"),u(9,"Trail to Route"),l()(),T(10,"mat-divider")}if(i&2){let e=c(2);p(4),ve("",e.app.data.serverTrail?"Refresh":"Clear"," Trail")}}function im(i,t){if(i&1){let e=E();s(0,"a",11),h("click",function(){m(e);let o=c(2);return f(o.clearDestination())}),s(1,"mat-icon"),u(2,"clear_all"),l(),s(3,"span"),u(4,"Stop Navigating"),l()(),s(5,"a",11),h("click",function(){m(e);let o=c(2);return f(o.clearCourseData())}),s(6,"mat-icon"),u(7,"clear_all"),l(),s(8,"span"),u(9,"Clear Course Data"),l()(),T(10,"mat-divider")}}function om(i,t){if(i&1){let e=E();T(0,"mat-divider"),s(1,"a",11),h("click",function(){m(e);let o=c(2);return f(o.showWeather("forecast"))}),s(2,"mat-icon"),u(3,"air"),l(),s(4,"span"),u(5,"Weather Forecast"),l()()}}function rm(i,t){if(i&1){let e=E();T(0,"mat-divider"),s(1,"a",11),h("click",function(){m(e);let o=c(2);return f(o.openFeatureBrowser())}),s(2,"mat-icon",22),u(3,"tips_and_updates"),l(),s(4,"span"),u(5,"What's New"),l()()}}function am(i,t){if(i&1){let e=E();g(0,nm,11,1),g(1,im,11,0),s(2,"a",11),h("click",function(){m(e);let o=c();return f(o.toggleCourseData())}),s(3,"mat-icon"),u(4),l(),s(5,"span"),u(6),l()(),s(7,"a",11),h("click",function(){m(e);let o=c();return f(o.toggleAisTargets())}),s(8,"mat-icon"),u(9),l(),s(10,"span"),u(11),l()(),s(12,"a",11),h("click",function(){m(e);let o=c();return f(o.toggleNotes())}),s(13,"mat-icon"),u(14),l(),s(15,"span"),u(16),l()(),g(17,om,6,0),T(18,"mat-divider"),s(19,"a",11),h("click",function(){m(e);let o=c();return f(o.openSettings())}),s(20,"mat-icon"),u(21,"settings"),l(),s(22,"span"),u(23,"Settings"),l()(),g(24,rm,6,0)}if(i&2){let e=c(),n=Ti(43);v(e.app.config.vessels.trail&&e.app.selfTrail().length!==0?0:-1),p(),v(e.course.courseData().position?1:-1),p(3),z(e.app.config.ui.showCourseData?"visibility_off":"compare_arrows"),p(2),ve("",e.app.config.ui.showCourseData?"Hide":"Show"," Course Data"),p(3),z(e.app.config.ui.showAisTargets?"visibility_off":"directions_boat"),p(2),ve("",e.app.config.ui.showAisTargets?"Hide":"Show"," Vessels"),p(3),z(e.app.config.ui.showNotes?"visibility_off":"local_offer"),p(2),ve("",e.app.config.ui.showNotes?"Hide":"Show"," Notes"),p(),v(e.app.featureFlags().weatherApi&&e.app.data.vessels.showSelf?17:-1),p(7),v(e.overflowHas(n,"whatsNew")?-1:24)}}function sm(i,t){if(i&1&&(s(0,"mat-icon",46),u(1),l()),i&2){let e=t.$implicit;at((e.iconClass??"")+(e.active?" icon-primary":"")),w("svgIcon",e.svgIcon),p(),z(e.svgIcon?"":e.icon)}}function lm(i,t){if(i&1){let e=E();s(0,"a",11),h("click",function(){m(e);let o=c();return f(o.newWaypointAtVessel())}),s(1,"mat-icon",13),u(2,"add_location"),l(),s(3,"span"),u(4,"Add Waypoint at Vessel"),l()()}}function cm(i,t){if(i&1){let e=E();s(0,"a",11),h("click",function(){m(e);let o=c();return f(o.drawFeature("note"))}),s(1,"mat-icon"),u(2,"local_offer"),l(),s(3,"span"),u(4,"Add Note"),l()()}}function pm(i,t){if(i&1){let e=E();s(0,"a",11),h("click",function(){m(e);let o=c();return f(o.showLogin(null,!1))}),s(1,"mat-icon",47),u(2," account_circle "),l(),s(3,"span"),u(4),l()(),T(5,"mat-divider")}if(i&2){let e=c();p(),w("matBadgeHidden",e.app.isLoggedIn()),p(3),z(e.app.isLoggedIn()?"Change User":"Login")}}function dm(i,t){if(i&1){let e=E();s(0,"a",11),h("click",function(){m(e);let o=c();return f(o.displayLeftMenu("anchorWatch",!0))}),s(1,"mat-icon"),u(2,"anchor"),l(),s(3,"span"),u(4,"Anchor Watch"),l()()}}function um(i,t){i&1&&(s(0,"mat-icon",22),u(1,"check_box"),l())}function mm(i,t){i&1&&T(0,"mat-icon",48)}function fm(i,t){if(i&1){let e=E();s(0,"a",11),h("click",function(){m(e);let o=c();return f(o.toggleRadarOverlay())}),g(1,um,2,0,"mat-icon",22)(2,mm,1,0,"mat-icon",48),s(3,"span"),u(4,"Radar Overlay"),l()()}if(i&2){let e=c();p(),v(e.app.uiCtrl().radarLayer?1:2)}}function hm(i,t){if(i&1){let e=E();s(0,"a",11),h("click",function(){m(e);let o=c();return f(o.showPlaybackSettings())}),s(1,"mat-icon"),u(2,"history"),l(),s(3,"span"),u(4,"Playback History"),l()()}}function _m(i,t){if(i&1){let e=E();s(0,"radar-panel",54),h("connect",function(){m(e);let o=c(3);return f(o.connectRadar())})("disconnect",function(){m(e);let o=c(3);return f(o.disconnectRadar())}),l()}}function gm(i,t){if(i&1){let e=E();s(0,"note-panel",55),h("edit",function(o){m(e);let r=c(3);return f(r.skres.showNoteEditor({id:o}))})("move",function(o){m(e);let r=c(3);return f(r.onNoteMove(o))})("panTo",function(o){m(e);let r=c(3);return f(r.centerAndZoom(o.center,o.zoomLevel))}),l()}if(i&2){let e=c(),n=c(2);w("note",e.resource)("id",e.id)("interacting",n.isInteracting())}}function vm(i,t){if(i&1){let e=E();s(0,"region-panel",56),h("edit",function(o){m(e);let r=c(3);return f(r.skres.editRegionInfo(o))})("panTo",function(o){m(e);let r=c(3);return f(r.centerAndZoom(o.center,o.zoomLevel))}),l()}if(i&2){let e=c(),n=c(2);w("region",e.resource)("id",e.id)("related",n.infoPanel.related())("interacting",n.isInteracting())}}function Cm(i,t){if(i&1){let e=E();s(0,"waypoint-panel",57),h("edit",function(o){m(e);let r=c(3);return f(r.skres.editWaypointInfo(o))})("panTo",function(o){m(e);let r=c(3);return f(r.centerAndZoom(o.center,o.zoomLevel))}),l()}if(i&2){let e=c(),n=c(2);w("waypoint",e.resource)("id",e.id)("related",n.infoPanel.related())("interacting",n.isInteracting())}}function wm(i,t){if(i&1){let e=E();s(0,"route-panel",58),h("edit",function(o){m(e);let r=c(3);return f(r.onRouteInfoEdit(o))})("activate",function(o){m(e);let r=c(3);return f(r.activateRoute(o))})("panTo",function(o){m(e);let r=c(3);return f(r.centerAndZoom(o.center,o.zoomLevel))}),l()}if(i&2){let e=c(),n=c(2);w("route",e.resource)("id",e.id)("related",n.infoPanel.related())("interacting",n.isInteracting())}}function bm(i,t){if(i&1&&(g(0,_m,1,0,"radar-panel"),g(1,gm,1,3,"note-panel",50),g(2,vm,1,4,"region-panel",51),g(3,Cm,1,4,"waypoint-panel",52),g(4,wm,1,4,"route-panel",53)),i&2){let e=t;v(e.type==="radars"?0:-1),p(),v(e.type==="notes"?1:-1),p(),v(e.type==="regions"?2:-1),p(),v(e.type==="waypoints"?3:-1),p(),v(e.type==="routes"?4:-1)}}function xm(i,t){if(i&1){let e=E();s(0,"info-panel",49),h("closed",function(){m(e);let o=c();return f(o.closeDrawer())}),g(1,bm,5,5),l()}if(i&2){let e,n=c();p(),v((e=n.infoPanel.item())?1:-1,e)}}function ym(i,t){if(i&1){let e=E();s(0,"a",66),h("click",function(){m(e);let o=c(2);return f(o.closeInstrumentPanel())}),s(1,"mat-icon"),u(2,"open_in_new"),l()()}if(i&2){let e=c(2);w("href",e.instUrl(),mi)}}function Em(i,t){if(i&1&&T(0,"iframe",65),i&2){let e=c(2);w("src",e.instUrl(),ae)}}function Tm(i,t){if(i&1){let e=E();s(0,"div",26)(1,"mat-nav-list")(2,"a",59)(3,"a",60),h("click",function(){m(e);let o=c();return f(o.closeInstrumentPanel())}),s(4,"mat-icon"),u(5,"arrow_forward"),l()(),u(6," \xA0\xA0\xA0\xA0 "),g(7,ym,3,1,"a",61),s(8,"a",62),h("click",function(){m(e);let o=c();return f(o.selectPlugin())}),s(9,"mat-icon"),u(10,"arrow_back_ios"),l()(),s(11,"a",63),h("click",function(){m(e);let o=c();return f(o.selectPlugin(!0))}),s(12,"mat-icon"),u(13,"arrow_forward_ios"),l()()(),T(14,"mat-divider"),l(),s(15,"div",64),g(16,Em,1,1,"iframe",65),l()()}if(i&2){let e=c();p(7),v(e.app.config.display.plugins.instruments?7:-1),p(),w("disabled",e.app.config.display.plugins.favourites.length===0),p(3),w("disabled",e.app.config.display.plugins.favourites.length===0),p(5),v(e.app.instrumentPanel().activate?16:-1)}}function Mm(i,t){i&1&&(s(0,"div",28),T(1,"mat-progress-bar",67),l())}function Sm(i,t){if(i&1){let e=E();s(0,"autopilot-console",68),h("close",function(){m(e);let o=c();return f(o.toggleAutopilotConsole(!1))}),l()}if(i&2){let e=c();w("apData",e.app.data.vessels.self.autopilot)}}function Pm(i,t){if(i&1){let e=E();s(0,"route-builder",69),h("save",function(o){m(e);let r=c();return f(r.skres.newRouteAt(o.coordinates,o.meta))})("close",function(){m(e);let o=c();return f(o.toggleRouteBuilderConsole(!1))}),l()}}function Am(i,t){if(i&1&&T(0,"fb-map-toolbar",73,8),i&2){let e=c(2);w("items",e.leftToolbarItems())}}function km(i,t){if(i&1){let e=E();s(0,"route-list",80),h("activate",function(o){m(e);let r=c(4);return f(r.activateRoute(o.id))})("deactivate",function(){m(e);let o=c(4);return f(o.clearDestination())})("select",function(o){m(e);let r=c(4);return f(r.handleResourceInfo("routes",o.id))})("points",function(o){m(e);let r=c(4);return f(r.featureProperties({id:o.id,type:"route"}))})("notes",function(o){m(e);let r=c(4);return f(r.skres.showRelatedNotes(o.id,"route",o.readOnly))})("closed",function(){m(e);let o=c(4);return f(o.displayLeftMenu())}),l()}if(i&2){let e=c(4);w("activeRoute",e.app.data.activeRoute)("editingRouteId",e.app.data.editingId)}}function Im(i,t){i&1&&(se(0,km,1,2),le(1,0,Ou),ce())}function Om(i,t){if(i&1){let e=E();s(0,"waypoint-list",81),h("select",function(o){m(e);let r=c(4);return f(r.handleResourceInfo("waypoints",o.id))})("goto",function(o){m(e);let r=c(4);return f(r.course.navigateToWaypoint(o.id))})("deactivate",function(){m(e);let o=c(4);return f(o.clearDestination())})("center",function(o){m(e);let r=c(4);return f(r.centerAndZoom(o))})("notes",function(o){m(e);let r=c(4);return f(r.skres.showRelatedNotes(o.id,"waypoint",o.readOnly))})("closed",function(){m(e);let o=c(4);return f(o.displayLeftMenu())}),l()}if(i&2){let e=c(4);w("activeWaypoint",e.app.data.activeWaypoint)("editingWaypointId",e.app.data.editingId)}}function Rm(i,t){i&1&&(se(0,Om,1,2),le(1,0,Ru),ce())}function Dm(i,t){if(i&1){let e=E();s(0,"chart-list",82),h("closed",function(){m(e);let o=c(4);return f(o.displayLeftMenu())}),l()}if(i&2){let e=c(4);w("selectedCharts",e.app.config.selections.charts)}}function Lm(i,t){i&1&&(se(0,Dm,1,1),le(1,0,Du),ce())}function Vm(i,t){if(i&1){let e=E();s(0,"note-list",83),h("select",function(o){m(e);let r=c(4);return f(r.handleResourceInfo("notes",o.id))})("pan",function(o){m(e);let r=c(4);return f(r.centerAndZoom(o.center,o.zoomLevel))})("closed",function(){m(e);let o=c(4);return f(o.displayLeftMenu())}),l()}if(i&2){let e=c(4);w("notes",e.skres.notes())}}function Fm(i,t){i&1&&(se(0,Vm,1,1),le(1,0,Lu),ce())}function Nm(i,t){if(i&1){let e=E();s(0,"region-list",84),h("select",function(o){m(e);let r=c(4);return f(r.handleResourceInfo("regions",o.id))})("pan",function(o){m(e);let r=c(4);return f(r.centerAndZoom(o.center,o.zoomLevel))})("closed",function(){m(e);let o=c(4);return f(o.displayLeftMenu())}),l()}if(i&2){let e=c(4);w("regions",e.skres.regions())}}function Bm(i,t){i&1&&(se(0,Nm,1,1),le(1,0,Vu),ce())}function $m(i,t){if(i&1){let e=E();s(0,"track-list",85),h("center",function(o){m(e);let r=c(4);return f(r.centerAndZoom(o))})("closed",function(){m(e);let o=c(4);return f(o.displayLeftMenu())}),l()}}function zm(i,t){i&1&&(se(0,$m,1,0),le(1,0,Fu),ce())}function Um(i,t){if(i&1){let e=E();s(0,"ais-list",86),h("properties",function(o){m(e);let r=c(4);return f(r.featureProperties({id:o,type:"ais"}))})("closed",function(){m(e);let o=c(4);return f(o.displayLeftMenu())})("focusVessel",function(o){m(e);let r=c(4);return f(r.switchActiveVessel(o))})("pan",function(o){m(e);let r=c(4);return f(r.centerAndZoom(o.center,o.zoomLevel))}),l()}if(i&2){let e=c(4);w("focusId",e.app.data.vessels.activeId)}}function qm(i,t){i&1&&(se(0,Um,1,1),le(1,0,Nu),ce())}function Wm(i,t){if(i&1){let e=E();s(0,"group-list",49),h("closed",function(){m(e);let o=c(4);return f(o.displayLeftMenu())}),l()}}function Hm(i,t){i&1&&(se(0,Wm,1,0),le(1,0,Bu),ce())}function Gm(i,t){if(i&1){let e=E();s(0,"anchor-watch",87),h("closed",function(){m(e);let o=c(3);return f(o.displayLeftMenu())}),l()}if(i&2){let e=c(3);w("showSelf",e.app.data.vessels.showSelf)("radius",e.anchor.radius())("raised",e.anchor.raised())}}function jm(i,t){if(i&1){let e=E();s(0,"weather-list",49),h("closed",function(){m(e);let o=c(4);return f(o.displayLeftMenu())}),l()}}function Km(i,t){i&1&&(se(0,jm,1,0),le(1,0,$u),ce())}function Xm(i,t){if(i&1&&(s(0,"div",74),g(1,Im,3,0),g(2,Rm,3,0),g(3,Lm,3,0),g(4,Fm,3,0),g(5,Bm,3,0),g(6,zm,3,0),g(7,qm,3,0),g(8,Hm,3,0),g(9,Gm,1,3,"anchor-watch",79),g(10,Km,3,0),l()),i&2){let e=c(2);p(),v(e.leftMenuCtrl().routeList?1:-1),p(),v(e.leftMenuCtrl().waypointList?2:-1),p(),v(e.leftMenuCtrl().chartList?3:-1),p(),v(e.leftMenuCtrl().noteList?4:-1),p(),v(e.leftMenuCtrl().regionList?5:-1),p(),v(e.leftMenuCtrl().trackList?6:-1),p(),v(e.leftMenuCtrl().aisList?7:-1),p(),v(e.leftMenuCtrl().resourceGroups?8:-1),p(),v(e.leftMenuCtrl().anchorWatch?9:-1),p(),v(e.leftMenuCtrl().weatherList?10:-1)}}function Zm(i,t){i&1&&(s(0,"div",76)(1,"mat-icon",88),u(2,"visibility_off "),l()())}function Qm(i,t){i&1&&(s(0,"div",76)(1,"mat-icon",89),u(2,"compare_arrows "),l()())}function Ym(i,t){i&1&&(s(0,"div",76)(1,"mat-icon",90),u(2,"directions_boat "),l()())}function Jm(i,t){i&1&&(s(0,"div",76)(1,"mat-icon",91),u(2,"local_offer "),l()())}function ef(i,t){i&1&&(s(0,"div",76)(1,"mat-icon",92),u(2,"signal_wifi_statusbar_connected_no_internet_4 "),l()())}function tf(i,t){if(i&1){let e=E();s(0,"pip-video",95),h("click",function(){m(e);let o=c(3);return f(o.focusMap())}),l()}if(i&2){let e=c(3);w("src",e.vidUrl())("muted",!0)}}function nf(i,t){if(i&1&&(T(0,"fb-map-toolbar",93),g(1,tf,1,2,"pip-video",94)),i&2){let e=c(2);H("top",60+e.plotterExt.toolbarTopOffset(),"px")("bottom",e.rightToolbarBottom(),"px"),w("items",e.rightToolbarItems()),p(),v(e.app.config.resources.video.enable&&e.app.config.resources.video.url?1:-1)}}function of(i,t){if(i&1){let e=E();s(0,"div",70)(1,"div",71)(2,"button",72)(3,"mat-icon"),u(4,"menu"),l()()()(),g(5,Am,2,1,"fb-map-toolbar",73),g(6,Xm,11,10,"div",74),s(7,"div",75),g(8,Zm,3,0,"div",76),g(9,Qm,3,0,"div",76),g(10,Ym,3,0,"div",76),g(11,Jm,3,0,"div",76),g(12,ef,3,0,"div",76),l(),s(13,"div",77)(14,"div",71)(15,"button",78),h("click",function(){m(e);let o=c();return f(o.toggleToolbarButtons())}),s(16,"mat-icon"),u(17),l()()()(),g(18,nf,2,6)}if(i&2){let e=c(),n=Te(86);p(2),w("disabled",e.isInteracting())("matBadgeHidden",e.app.isLoggedIn())("matMenuTriggerFor",n),p(3),v(e.app.uiConfig().toolbarButtons?5:-1),p(),v(e.leftMenuCtrl().leftMenuPanel?6:-1),p(),H("top",20+e.plotterExt.toolbarTopOffset(),"px"),p(),v(!e.wakeLock.enabled()&&e.wakeLock.isAvailable?8:-1),p(),v(e.app.uiConfig().showCourseData?-1:9),p(),v(e.app.uiConfig().showAisTargets?-1:10),p(),v(e.app.uiConfig().showNotes?-1:11),p(),v(e.stream.watchDogAlarm()?12:-1),p(),H("top",e.plotterExt.toolbarTopOffset(),"px"),p(2),w("matTooltip",e.app.uiConfig().toolbarButtons?"Hide Toolbars":"Show Toolbars"),p(2),z(e.app.uiConfig().toolbarButtons?"apps":"apps_outage"),p(),v(e.app.uiConfig().toolbarButtons?18:-1)}}function rf(i,t){if(i&1&&T(0,"fb-split-map",33),i&2){let e=c(),n=Te(137);w("scaleUnits",e.app.config.units.distance)("statusBar",n.statusBar)}}function af(i,t){if(i&1&&(s(0,"div",37)(1,"div",96)(2,"mat-icon"),u(3,"access_time"),l(),s(4,"b"),u(5,"Playback:"),l()(),s(6,"div",97),u(7),l()()),i&2){let e=c();p(7),z(e.playbackTime())}}function sf(i,t){if(i&1){let e=E();s(0,"alert-list",101),h("closed",function(){m(e);let o=c(2);return f(o.toggleAlertList(!1))}),l()}if(i&2){let e=c(2);w("alerts",e.notiMgr.alerts())}}function lf(i,t){if(i&1){let e=E();s(0,"span",100)(1,"fb-alert",102),h("nextPoint",function(){m(e);let o=c(2);return f(o.course.coursePointIndex(o.course.courseData().pointIndex+1))})("routeEnd",function(){m(e);let o=c(2);return f(o.clearDestination())}),l()()}if(i&2){let e=t.$implicit,n=c(2);p(),w("audioStatus",n.audioStatus())("alert",e[1])("acknowledged",e[1].acknowledged)("silenced",e[1].silenced)("doNotPlaySound",n.app.config.display.muteSound)}}function cf(i,t){if(i&1&&(g(0,sf,1,1,"alert-list",98),s(1,"div",99),q(2,lf,2,5,"span",100,Wu),l()),i&2){let e=c();v(e.app.uiCtrl().alertList?0:-1),p(2),W(e.notiMgr.alerts())}}function pf(i,t){if(i&1){let e=E();s(0,"fb-interact-help",103),h("finish",function(){m(e);let o=c();return f(o.handleInteractionFinish())})("cancel",function(){m(e);let o=c();return f(o.closeInteraction())})("undo",function(){m(e);let o=c();return f(o.handleInteractionUndo())}),l()}}function df(i,t){if(i&1){let e=E();s(0,"fb-interact-help",104),h("cancel",function(){m(e);let o=c();return f(o.mapInteract.cancelPick("user"))}),l()}}function uf(i,t){if(i&1){let e=E();s(0,"route-nextpoint",108),h("selected",function(o){m(e);let r=c(2);return f(r.routeNextPoint(o))}),l()}if(i&2){let e=c(2);w("index",e.course.courseData().pointIndex)("total",e.course.courseData().pointTotal)("circular",e.app.data.activeRouteCircular)}}function mf(i,t){if(i&1&&T(0,"ap-dial-text",118),i&2){let e=c(3);w("title","VMG")("value",e.app.formatSpeed(e.course.courseData().vmg,!0))("units",e.app.formattedSpeedUnits)}}function ff(i,t){if(i&1&&T(0,"ap-dial-text",118),i&2){let e=c(3);w("title","BRG")("value",t.toFixed(1))("units",e.course.courseData().bearing.type==="M"?"deg (M)":"deg (T)")}}function hf(i,t){if(i&1&&T(0,"ap-dial-text",118),i&2){let e=t,n=c(3);w("title","XTE")("value",e>10?e.toFixed(1):e.toFixed(3))("units",n.convert.getSymbol(n.app.config.units.distance))}}function _f(i,t){if(i&1&&T(0,"ap-dial-text",121),i&2){let e=c(4);w("title","DTG")("value",t.toFixed(1))("units",e.convert.getSymbol(e.app.config.units.distance))}}function gf(i,t){i&1&&T(0,"ap-dial-ttg",122),i&2&&w("value",t)}function vf(i,t){i&1&&T(0,"ap-dial-eta",123),i&2&&w("title","ETA")("value",t)}function Cf(i,t){if(i&1&&(g(0,_f,1,3,"ap-dial-text",121),g(1,gf,1,1,"ap-dial-ttg",122),g(2,vf,1,2,"ap-dial-eta",123)),i&2){let e,n,o,r=c(3);v((e=r.course.courseData().route.dtg)?0:-1,e),p(),v((n=r.course.courseData().route.ttg)?1:-1,n),p(),v((o=r.course.courseData().route.eta)?2:-1,o)}}function wf(i,t){if(i&1&&T(0,"ap-dial-text",118),i&2){let e=c(3);w("title","DTG")("value",t.toFixed(1))("units",e.convert.getSymbol(e.app.config.units.distance))}}function bf(i,t){i&1&&T(0,"ap-dial-ttg",119),i&2&&w("value",t)}function xf(i,t){i&1&&T(0,"ap-dial-eta",120),i&2&&w("title","ETA")("value",t)}function yf(i,t){if(i&1){let e=E();s(0,"div",107)(1,"div",109)(2,"div",110)(3,"button",111),h("click",function(){m(e);let o=c(2);return f(o.openCourseSettings())}),T(4,"mat-icon",112),l(),T(5,"br"),s(6,"button",113),h("click",function(){m(e);let o=c(2);return f(o.autopilot.engage())}),T(7,"mat-icon",114),l()(),s(8,"div")(9,"button",115),h("click",function(){m(e);let o=c(2);return f(o.course.courseRestart())}),s(10,"mat-icon"),u(11,"replay"),l()(),T(12,"br"),s(13,"button",116),h("click",function(){m(e);let o=c(2);return f(o.course.courseReverse())}),s(14,"mat-icon",117),u(15," multiple_stop "),l()()()(),g(16,mf,1,3,"ap-dial-text",118),g(17,ff,1,3,"ap-dial-text",118),g(18,hf,1,3,"ap-dial-text",118),g(19,Cf,3,3),g(20,wf,1,3,"ap-dial-text",118),g(21,bf,1,1,"ap-dial-ttg",119),g(22,xf,1,2,"ap-dial-eta",120),l()}if(i&2){let e,n,o,r,a,d=c(2);p(6),w("disabled",!d.app.featureFlags().autopilotApi||!d.app.data.vessels.self.autopilot.default),p(),w("color",d.navDataPanel().apModeColor),p(6),w("disabled",!d.app.data.activeRoute),p(),w("color",d.app.data.activeRouteReversed?"primary":"none"),p(2),v(d.course.courseData().vmg?16:-1),p(),v((e=d.course.courseData().bearing.value)?17:-1,e),p(),v((n=d.course.courseData().xte)?18:-1,n),p(),v(d.app.data.activeRoute?19:-1),p(),v((o=d.course.courseData().dtg)?20:-1,o),p(),v((r=d.course.courseData().ttg)?21:-1,r),p(),v((a=d.course.courseData().eta)?22:-1,a)}}function Ef(i,t){if(i&1){let e=E();s(0,"div",105),h("clearance",function(o){m(e);let r=c();return f(r.navDataBottom.set(o))}),g(1,uf,1,3,"route-nextpoint",106),g(2,yf,23,11,"div",107),l()}if(i&2){let e=c();w("fbMovablePanelRestingBottom",e.navDataBottom())("fbBottomClearance",30),p(),v(e.navDataPanel().nextPointCtrl?1:-1),p(),v(e.app.config.ui.showCourseData&&e.navDataPanel().show?2:-1)}}function Tf(i,t){if(i&1){let e=E();s(0,"mfb-container",124),h("radarClick",function(){m(e);let o=c();return f(o.toggleRadarPanel())}),l()}if(i&2){let e=c();w("action",e.app.config.display.fab)("extensionButton",e.extensionActionButton())}}var al="fb-track-api-notice-dismissed",Xt=class i{sideright;fbMap;layersMenu;editMenu;settingsMenu;experiments;pipVideo=on(mt);leftToolbar=on("leftToolbar");navDataPanel=O({show:!1,nextPointCtrl:!1,apModeColor:"",apModeText:""});playbackTime=O(null);leftMenuCtrl=O({leftMenuPanel:!1,routeList:!1,waypointList:!1,chartList:!1,noteList:!1,regionList:!1,trackList:!1,aisList:!1,resourceGroups:!1,anchorWatch:!1,weatherList:!1});displayFullscreen=O({active:!1,enabled:document.fullscreenEnabled});features={playbackAPI:!0};mode=0;timers=[];userConfigLoaded=Promise.resolve(!1);trackApiNoticeShown=!1;instUrl=O(null);selFavourite=-1;vidUrl=O(null);convert=sn;toolbarMenuLabel=vo;obsList=[];streamOptions={options:null,toMode:null};mapSetFocus=O("");mapCenter=O([0,0]);audioStatus=O("");isInteracting=R(()=>this.mapInteract.isMeasuring()||this.mapInteract.isDrawing()||this.mapInteract.isModifying()||this.mapInteract.isBoxSelecting());app=_(xt);splitView=_(bt);viewNorthUp=R(()=>this.splitView.secondaryActive()?this.splitView.northUp():this.app.uiConfig().mapNorthUp);infoPanel=_(nr);mapInteract=_(ut);anchor=_(Cr);notiMgr=_(mr);mob=_(_r);course=_(Bo);stream=_(ft);skres=_(Vo);gpxExport=_(Ur);skresOther=_(Fo);signalk=_(ao);dom=_(pe);overlayContainer=_(pt);bottomSheet=_(oo);dialog=_(Xi);wakeLock=_(Yi);settings=_($r);autopilot=_(br);radarApi=_(wo);symbols=_(so);routeBuffers=_(To);plotterExt=_(j);temporaryRoutes=_(ir);whatsNew=_(Nt);narrowScreen=Fi(_(Ni).observe("(max-width: 800px)").pipe(Be(t=>t.matches)),{initialValue:!1});navDataBottom=O(null);rightToolbarBottom=R(()=>{let t=this.plotterExt.actionButtonLift();return(t>0?t:23)+57});constructor(){this.app.data.vessels.active=this.app.data.vessels.self,$(()=>{this.app.debug("** skAuthChange Event:",this.app.skAuthChange()),this.handleSKAuthChange()}),$(()=>{this.app.debug("** kioskMode Event:",this.app.kioskMode()),this.toggleSuppressContextMenu(this.app.kioskMode())}),$(()=>{this.handleSelectionEnded(this.mapInteract.selection())}),$(()=>{this.app.uiConfig(),this.handleSettingChangeEvent()}),$(()=>{this.infoPanel.opened()||this.app.instrumentPanel().activate?this.sideright?.opened||this.openDrawer():this.sideright?.opened&&this.closeDrawer()}),$(()=>{let t=this.app.mapMoveRequest();t&&Ce(()=>this.applyMapMove(t))})}ngAfterViewInit(){setTimeout(()=>{this.app.config.display.disableWakelock||this.wakeLock.enable()},500)}enableAudio(){this.app.audio.context&&this.app.audio.context.resume()}ngOnInit(){this.whatsNew.init(),this.audioStatus.update(()=>this.app.audio.context.state),this.app.debug("audio state:",this.audioStatus()),this.app.audio.context.onstatechange=()=>{this.app.debug("audio statechange:",this.app.audio.context.state),this.audioStatus.update(()=>this.app.audio.context.state)},this.mapCenter.update(()=>this.app.config.map.center),this.app.instrumentPanel.update(t=>Object.assign({},t,{activate:!this.app.config.display.plugins.startOnOpen})),this.setDarkTheme(),this.instUrl.update(()=>this.dom.bypassSecurityTrustResourceUrl(this.formatInstrumentsUrl())),this.vidUrl.update(()=>this.dom.bypassSecurityTrustResourceUrl(`${this.app.config.resources.video.url}`)),this.connectSignalKServer(),this.obsList.push(this.stream.delta$().subscribe(t=>this.onMessage(t))),this.obsList.push(this.stream.connect$().subscribe(t=>this.onConnect(t))),this.obsList.push(this.stream.close$().subscribe(t=>this.onClose(t))),this.obsList.push(this.stream.error$().subscribe(t=>this.onError(t))),this.obsList.push(this.stream.trail$().subscribe(t=>this.handleTrailUpdate(t))),this.obsList.push(this.stream.trackSource$().subscribe(t=>this.handleTrackSource(t))),this.obsList.push(this.settings.change$.subscribe(t=>this.handleSettingChangeEvent(t))),document.addEventListener("fullscreenchange",()=>{this.displayFullscreen.update(t=>Object.assign({},t,{active:!!document.fullscreenElement}))}),document.addEventListener("fullscreenerror",()=>{this.displayFullscreen.update(t=>Object.assign({},t,{active:!1}))})}ngOnDestroy(){this.stopTimers(),this.stream.terminate(),this.signalk.disconnect(),this.obsList.forEach(t=>t.unsubscribe())}getOrientation(){return this.app.uiConfig().mapNorthUp?"rotate(0deg)":"rotate("+(0-this.app.data.vessels.active.orientation)+"rad)"}showRadarPanel(){if(!this.radarApi.hasWebGL){this.radarApi.showNoWebGLMessage();return}this.app.instrumentPanel().open&&this.closeInstrumentPanel(),this.connectRadar(),this.infoPanel.openRadar(this.radarApi.radar()),this.focusMap()}toggleRadarPanel(){this.infoPanel.item()?.type==="radars"?(this.infoPanel.close(),this.closeDrawer()):this.showRadarPanel()}connectRadar(){this.app.showRadarOverlay(!0)}toggleRadarOverlay(){this.app.uiCtrl().radarLayer?this.disconnectRadar():this.showRadarPanel()}disconnectRadar(){this.app.showRadarOverlay(!1)}toggleMoveMap(t=!1){this.app.uiConfig.update(e=>{let n=t?!1:!e.mapMove;return Object.assign({},e,{mapMove:n})}),this.focusMap()}resumeMoveMap(){this.app.uiConfig.update(t=>Object.assign({},t,{mapMove:!0})),this.focusMap()}toggleFollow(){if(this.splitView.secondaryActive()){this.splitView.setFollow(!this.splitView.follow()),this.focusMap();return}this.toggleMoveMap()}toggleNorthUp(){if(this.splitView.secondaryActive()){this.splitView.setNorthUp(!this.splitView.northUp()),this.focusMap();return}this.app.uiConfig.update(t=>Object.assign({},t,{mapNorthUp:!t.mapNorthUp})),this.focusMap()}toggleToolbarButtons(){this.app.uiConfig.update(t=>Object.assign({},t,{toolbarButtons:!t.toolbarButtons})),this.focusMap()}leftToolbarItems(){let t=this.isInteracting(),e=this.viewNorthUp(),n=this.app.activePaneFollows(),o=[{id:"alarms",svgIcon:"alert-list",iconClass:"ob",tooltip:"Alarms",buttonClass:"button-warn",badge:this.notiMgr.alerts().length,action:()=>this.toggleAlertList(!0)},{id:"layers",icon:"layers",tooltip:"Routes, Waypoints, Notes, etc.",buttonClass:"button-accent",disabled:t,menu:this.layersMenu},{id:"draw",icon:"edit",tooltip:"Draw / Measure / Select",disabled:t,menu:this.editMenu},{id:"northUp",svgIcon:e?"heading-n-up":"heading-h-up",iconClass:"ob",tooltip:e?"Show Heading Up":"Show North Up",active:!e,action:()=>this.toggleNorthUp()},{id:"follow",svgIcon:"cent-iec",iconClass:"ob",tooltip:n?"Turn off Follow Vessel":"Center & Follow Vessel",active:n,disabled:!this.app.data.vessels.showSelf,action:()=>this.toggleFollow()},{id:"more",icon:"more_horiz",tooltip:"More actions",disabled:t,menu:this.settingsMenu,overflowAnchor:!0}];return this.mode===1&&o.push({id:"exitPlayback",icon:"cancel",tooltip:"Exit playback mode",buttonClass:"button-warn",active:!0,action:()=>this.showSelectMode()}),this.whatsNew.hasUnseen()&&o.push({id:"whatsNew",icon:"tips_and_updates",tooltip:"What's New",buttonClass:"button-accent",active:!0,action:()=>this.openFeatureBrowser()}),o.push({id:"mob",svgIcon:"alarm-mob",iconClass:"ob",tooltip:"Person Overboard",buttonClass:"button-warn",pinned:!0,action:()=>{this.mob.raise()}}),o}overflowHas(t,e){return t.some(n=>n.id===e)}rightToolbarItems(){let t=[],e=this.app.uiConfig();if(this.app.instrumentPanelAvailable()&&this.app.config.display.plugins.instruments&&!this.narrowScreen()&&t.push({id:"instruments",icon:"av_timer",tooltip:"Instruments",disabled:this.app.instrumentPanel().open||this.infoPanel.opened()||this.isInteracting()||!!this.app.data.vessels.activeId,action:()=>this.openInstrumentPanel()}),this.audioStatus()!=="running"&&t.push({id:"audio",icon:"volume_off",iconClass:"icon-warn",tooltip:"Web Audio off! Click to enable.",buttonClass:"button-toolbar",active:!0,action:()=>this.enableAudio()}),this.app.isTopWindow()&&this.displayFullscreen().enabled){let n=this.displayFullscreen().active;t.push({id:"fullscreen",icon:n?"fullscreen_exit":"fullscreen",tooltip:n?"Exit Fullscreen":"Go Fullscreen",active:n,action:()=>this.toggleFullscreen()})}if(t.push({id:"constrainZoom",icon:"zoom_in_map",tooltip:"Constrain map zoom",active:e.mapConstrainZoom,action:()=>this.toggleConstrainMapZoom()},{id:"invertColor",icon:"invert_colors",tooltip:"Invert feature text color",active:e.invertColor,action:()=>this.invertFeatureLabelColor()}),this.app.config.display.splitView){let n=this.splitView.enabled();t.push({id:"splitView",icon:"vertical_split",tooltip:n?"Close split view":"Split view: a second chart",active:n,action:()=>this.splitView.toggle()})}return this.app.config.experiments&&t.push({id:"experiments",icon:"science",tooltip:"Experiments",menu:this.experiments.menu}),this.app.config.resources.video.enable&&this.app.config.resources.video.url&&t.push({id:"pip",icon:"videocam",tooltip:"Show Video",disabled:!this.pipVideo()?.canStart(),action:()=>this.pipVideo()?.initPiP()}),this.app.featureFlags().autopilotApi&&this.app.data.vessels.self.autopilot.default&&this.app.config.display.fab!=="autopilot"&&t.push({id:"autopilot",svgIcon:"command-autopilot",iconClass:"ob",tooltip:"Autopilot",active:this.app.data.vessels.self.autopilot.enabled,action:()=>this.toggleAutopilotConsole(!this.app.uiCtrl().autopilotConsole)}),this.app.featureFlags().radarApi&&this.radarApi.radarId()&&this.app.config.display.fab!=="radar"&&t.push({id:"radar",svgIcon:"radar-iec",iconClass:"ob",tooltip:"Radar",active:this.app.uiCtrl().radarLayer,disabled:this.app.instrumentPanel().open,action:()=>this.toggleRadarPanel()}),t.push(...dn(this.extensionToolbarItems(),this.app.config.display.fab).toolbar),t}extensionActionButton(){return dn(this.extensionToolbarItems(),this.app.config.display.fab).actionButton}extensionToolbarItems(){return this.plotterExt.toolbarButtons().map(t=>he(ie({id:Co(t.extension,t.button.id),icon:t.button.icon||"extension",tooltip:t.button.title||t.extensionName},yo(t.decoration)),{action:()=>this.plotterExt.handleButtonAction(t.extension,t.button)}))}splitActive(){return!!this.app.config.display.splitView&&!this.app.kioskMode()&&this.splitView.enabled()}mainShare=R(()=>`var(${Fe}, ${this.splitView.shownRatio()*100}%)`);toggleConstrainMapZoom(){this.app.uiConfig.update(t=>Object.assign({},t,{mapConstrainZoom:!t.mapConstrainZoom})),this.skres.setMapZoomRange(),this.focusMap()}invertFeatureLabelColor(){this.app.uiConfig.update(t=>Object.assign({},t,{invertColor:!t.invertColor})),this.focusMap()}toggleAlertList(t){this.app.uiCtrl.update(e=>Object.assign({},e,{alertList:t}))}toggleAutopilotConsole(t){this.app.uiCtrl.update(e=>Object.assign({},e,{autopilotConsole:t}))}toggleRouteBuilderConsole(t){this.app.uiCtrl.update(e=>Object.assign({},e,{routeBuilder:t}))}toggleSuppressContextMenu(t){this.app.uiCtrl.update(e=>Object.assign({},e,{suppressContextMenu:t}))}toggleFullscreen(){let t=document.documentElement,e=t.requestFullscreen||t.webkitRequestFullScreen||t.mozRequestFullscreen||t.msRequestFullscreen;e&&(document.fullscreenElement?document.exitFullscreen&&document.exitFullscreen():e.call(t),this.focusMap())}darkThemeApplied;setDarkTheme(){let t=window.matchMedia("(prefers-color-scheme: dark)"),e=this.app.config.display.darkMode.source===0&&t.matches||this.app.config.display.darkMode.source===1&&this.app.data.vessels.self.environment.mode==="night"||this.app.config.display.darkMode.source===-1;if(e===this.darkThemeApplied)return;this.darkThemeApplied=e;let n=this.overlayContainer.getContainerElement();e?n.classList.add("dark-theme"):n.classList.remove("dark-theme"),this.app.config.display.darkMode.enabled=e}formatInstrumentsUrl(){let t=`${this.app.hostDef.url}${this.app.config.display.plugins.instruments}`,e=this.app.config.display.plugins.parameters?this.app.config.display.plugins.parameters.length>0&&this.app.config.display.plugins.parameters[0]!=="?"?`?${this.app.config.display.plugins.parameters}`:this.app.config.display.plugins.parameters:"";return e?`${t}/${e}`:t}selectPlugin(t=!1){t?this.selFavourite===-1?this.selFavourite=0:this.selFavourite===this.app.config.display.plugins.favourites.length-1?this.selFavourite=-1:this.selFavourite++:this.selFavourite===-1?this.selFavourite=this.app.config.display.plugins.favourites.length-1:this.selFavourite===0?this.selFavourite=-1:this.selFavourite--;let e=this.selFavourite===-1?this.formatInstrumentsUrl():`${this.app.hostDef.url}${this.app.config.display.plugins.favourites[this.selFavourite]}`;this.instUrl.update(()=>this.dom.bypassSecurityTrustResourceUrl(e))}showOverlaysMoved(){this.app.showMsgBox("Overlays have moved",`Overlays have moved to the Chart list.
351
+
352
+ Your existing overlays appear there as charts, with the same Time control and auto-refresh.`)}handleContextMenuSelection(t){switch(t){case"cleartrail":this.clearTrail(this.app.data.serverTrail);break;case"trail2route":this.trailToRoute();break;case"cleardestination":this.clearDestination();break;case"anchor":this.displayLeftMenu("anchorWatch",!0);break;case"weather_forecast":this.showWeather("forecast");break}}trailToRoute(){return B(this,null,function*(){let{Trail2RouteDialog:t}=yield import("./chunk-7VLEFGRK.js");this.dialog.open(t,{disableClose:!0,data:{trail:this.app.selfTrail()}}).afterClosed().subscribe(e=>{e.result&&this.skres.newRouteAt(e.data),this.focusMap()})})}showWeather(t){t==="forecast"&&this.bottomSheet.open(zr,{disableClose:!0,data:{title:"Forecast",position:this.app.data.vessels.self.position,subTitle:"Location: Vessel Position"}}).afterDismissed().subscribe(()=>{this.focusMap()})}openExperiment(t){t.choice==="debugCapture"?window.isSecureContext?(navigator.clipboard.writeText(JSON.stringify({data:this.app.data,config:this.app.config})),this.app.showMessage("Debug data catpured to clipboard.")):this.app.showAlert("Feature Unavailable",`This feature is only available in a secure context!
353
+ e.g. https, http://localhost, http://127.0.0.1`):this.app.config.resources.paths.includes(t.choice)&&this.bottomSheet.open(pr,{disableClose:!0,data:{path:t.choice}}).afterDismissed().subscribe(()=>{this.focusMap()})}openCourseSettings(){this.bottomSheet.open(No,{disableClose:!0,data:{title:"Course Settings"}}).afterDismissed().subscribe(()=>{this.focusMap()})}handleSKAuthChange(){this.signalk.getLoginStatus().subscribe({next:t=>{this.app.data.loginRequired=t.authenticationRequired??!1,this.app.isLoggedIn.update(()=>t.status==="loggedIn"),this.signalk.get("/plugins/freeboard-sk").subscribe(()=>{this.app.debug("User Authenticated"),this.app.isLoggedIn.set(!0)},e=>{e.status===401&&(this.app.debug("User NOT Authenticated"),this.app.isLoggedIn.set(!1))})},error:()=>this.app.debug("Login status not available")})}connectSignalKServer(){this.app.data.selfId=null,this.app.data.server=null,this.signalk.proxied=this.app.config.signalk.proxied,this.signalk.connect(this.app.hostDef.name,this.app.hostDef.port,this.app.hostDef.ssl).subscribe({next:()=>{this.signalk.authToken=this.app.getFBToken(),this.app.watchSKLogin(),this.userConfigLoaded=this.app.loadUserConfigfromServer().finally(()=>{this.loadSymbolsThenFetchResources(),this.plotterExt.init()}),this.getFeatures(),this.app.data.server=this.signalk.server.info,this.openSKStream()},error:()=>{this.app.showMessage("Unable to contact Signal K server! (Retrying in 5 secs)",!1,5e3),setTimeout(()=>this.connectSignalKServer(),5e3)}})}getFeatures(){return B(this,null,function*(){let t={anchorApi:!1,autopilotApi:!1,weatherApi:!1,radarApi:!1,notificationApi:!1,buddyList:!1,tidalApi:!1};this.signalk.get("/signalk/v2/features?enabled=1").subscribe(o=>{t.weatherApi=o.apis.includes("weather"),t.autopilotApi=o.apis.includes("autopilot"),t.radarApi=o.apis.includes("radar"),t.notificationApi=o.apis.includes("notifications");let r={charts:!1,pmTiles:!1,anchorAlarm:!1,hoekensAnchorAlarm:!1};o.plugins.forEach(a=>{a.id==="anchoralarm"&&(this.app.debug("*** found anchoralarm plugin"),t.anchorApi=!0,r.anchorAlarm=!0),a.id==="hoekens-anchor-alarm"&&ri.satisfies(a.version,">=2.12.0")&&(this.app.debug("*** found hoekens-anchor-alarm plugin"),t.anchorApi=!0,r.hoekensAnchorAlarm=!0),a.id==="signalk-buddylist-plugin"&&(this.app.debug("*** found buddylist plugin"),t.buddyList=!!ri.satisfies(a.version,">1.2.0")),a.id==="signalk-pmtiles-plugin"&&(this.app.debug("*** found PMTiles plugin"),r.pmTiles=!0),a.id==="signalk-tidal-currents"&&(this.app.debug("*** found signalk-tidal-currents plugin"),t.tidalApi=!0)}),this.anchor.setPlugin(r.hoekensAnchorAlarm&&!r.anchorAlarm?"hoekens-anchor-alarm":"anchoralarm"),this.app.featureFlags.update(a=>Object.assign({},a,t))},()=>{this.app.debug("*** Features API not present!")}),this.app.fetchUnitPrefsFromSKServer();let e=yield this.skres.detectTrackStore(),n=yield this.skresOther.initCustomCollections(e?["tracks"]:[]);this.app.featureFlags.update(o=>Object.assign({},o,n,{trackStore:e})),e&&this.app.featureFlags().resourceTracks&&((yield this.userConfigLoaded)||!this.app.isLoggedIn())&&(yield this.moveResourceTracks()),this.app.tracksAvailable()&&this.skres.refreshTracks()})}moveResourceTracks(){return B(this,null,function*(){try{let t=yield this.skres.migrateResourceTracks();t!==0&&(this.app.saveConfig(),this.app.showMessage(`Moved ${t} track${t===1?"":"s"} to the Track API.`))}catch(t){console.warn("Tracks not moved to the Track API:",t)}})}startTimers(){this.app.debug("Starting Trail logging timer..."),this.timers.push(setInterval(()=>{this.processTrail()},5e3))}stopTimers(){this.app.debug("Stopping timers:"),this.timers.forEach(t=>clearInterval(t)),this.timers=[]}processTrail(t){if(!this.app.config.vessels.trail)return;let e=this.app.selfTrail().slice(-1),n=this.app.data.vessels.self.position;if(this.app.data.vessels.showSelf&&n){if(e.length===0){this.app.stampTrailPoint(n),this.app.selfTrail.update(r=>{let a=[].concat(r);return a.push(n),a});return}(n[0]!==e[0][0]||n[1]!==e[0][1])&&(this.app.stampTrailPoint(n),this.app.selfTrail.update(r=>{let a=[].concat(r);return a.push(n),a}))}if(!t||t.length===0)this.app.selfTrail().length%60===0&&this.app.data.serverTrail&&this.app.serverTrailWanted()&&this.stream.requestTrailFromServer(!0),this.app.selfTrail.update(r=>r.slice(-5e3));else{let r=t.slice(-1),a=r.length!==0?r[0].slice(-1):t.length>1?t[t.length-2].slice(-1):[],d=this.app.selfTrailTimed()?.times,C=d?.[d.length-1]?.slice(-1)[0];a[0]&&C&&this.app.stampTrailPoint(a[0],C),this.app.selfTrail.update(()=>a)}let o=this.mode===1?"history":"self";this.app.db.saveTrail(o,this.app.selfTrail())}handleTrackSource(t){this.app.debug("Track source:",t),this.app.config.vessels.trail&&this.app.serverTrailWanted()&&this.stream.requestTrailFromServer(),this.showTrackApiNotice(t)}onVisibilityChange(){document.visibilityState==="visible"&&this.mode===0&&this.app.config.vessels.trail&&this.app.serverTrailWanted()&&this.stream.requestTrailFromServer()}showTrackApiNotice(t){if(!(t.api!=="v1"||this.trackApiNoticeShown)){try{if(localStorage.getItem(al))return}catch(e){}this.trackApiNoticeShown=!0,this.app.showAlert("Vessel Tracks",Ji(t),"OK","Don't show this message again").subscribe(e=>{if(e?.checked)try{localStorage.setItem(al,"1")}catch(n){}})}}handleTrailUpdate(t){t.action==="get"&&t.mode==="trail"&&(this.app.serverTrailWanted()&&this.app.selfTrailFromServer.update(()=>t.data),this.processTrail(t.data))}handleSettingChangeEvent(t){t?.includes("darkTheme")&&this.setDarkTheme(),t?.includes("headingAttribute")&&(this.app.debug("True / Magnetic selection changed.."),this.app.data.vessels.self.heading=this.app.useMagnetic?this.app.data.vessels.self.headingMagnetic:this.app.data.vessels.self.headingTrue,this.app.data.vessels.self.cog=this.app.useMagnetic?this.app.data.vessels.self.cogMagnetic:this.app.data.vessels.self.cogTrue,this.app.data.vessels.self.wind.direction=this.app.useMagnetic?this.app.data.vessels.self.wind.mwd:this.app.data.vessels.self.wind.twd,this.app.data.vessels.aisTargets.forEach(e=>{e.heading=this.app.useMagnetic?e.headingMagnetic:e.headingTrue,e.cog=this.app.useMagnetic?e.cogMagnetic:e.cogTrue,e.wind.direction=this.app.useMagnetic?e.wind.mwd:e.wind.twd}),this.app.sTrueMagChoice.set(this.app.config.units.headingAttribute)),(t?.includes("pluginParameters")||t?.includes("pluginInstruments")||t?.includes("pluginStartOnOpen"))&&(this.instUrl.update(()=>this.dom.bypassSecurityTrustResourceUrl(this.formatInstrumentsUrl())),this.app.instrumentPanel.update(e=>Object.assign({},e,{activate:this.app.config.display.plugins.startOnOpen?!!e.open:!0}))),t?.includes("videoUrl")&&this.vidUrl.update(()=>this.dom.bypassSecurityTrustResourceUrl(`${this.app.config.resources.video.url}`)),(t?.includes("vesselTrail")||t?.includes("trailSource"))&&this.app.config.vessels.trail&&(this.app.serverTrailWanted()?this.stream.requestTrailFromServer():this.app.data.serverTrail=!1)}focusMap(){let t=this.splitView.secondaryActive()?this.splitView.secondaryMap():null;if(t){t.getTargetElement()?.focus();return}this.mapSetFocus.update(()=>Date().valueOf())}openDrawer(){this.sideright.open()}closeDrawer(){this.sideright.close()}openInstrumentPanel(){this.app.instrumentPanel().open||(this.infoPanel.opened()&&this.infoPanel.close(),this.app.instrumentPanel.update(t=>Object.assign({},t,{open:!0,activate:!0})))}closeInstrumentPanel(){this.app.instrumentPanel.update(t=>Object.assign({},t,{open:!1,activate:this.app.config.display.plugins.startOnOpen?!1:t.activate})),this.focusMap()}displayLeftMenu(t="",e=!1){let n={leftMenuPanel:e,routeList:!1,waypointList:!1,chartList:!1,noteList:!1,regionList:!1,trackList:!1,aisList:!1,resourceGroups:!1,anchorWatch:!1,weatherList:!1};switch(t){case"routeList":n.routeList=e;break;case"waypointList":n.waypointList=e;break;case"chartList":n.chartList=e;break;case"noteList":n.noteList=e;break;case"regionList":n.regionList=e;break;case"trackList":n.trackList=e;break;case"anchorWatch":n.anchorWatch=e;break;case"aisList":n.aisList=e;break;case"resourceGroups":n.resourceGroups=e;break;case"weatherList":n.weatherList=e;break;default:n.leftMenuPanel=!1}this.leftMenuCtrl.update(()=>n),e||this.focusMap()}handleResourceInfo(t,e){t==="notes"&&!this.app.useInfoPanel()?this.skres.noteSelected(e,!1):t==="regions"&&!this.app.useInfoPanel()?this.skres.editRegionInfo(e):t==="waypoints"&&!this.app.useInfoPanel()?this.skres.editWaypointInfo(e):t==="routes"&&!this.app.useInfoPanel()?this.skres.editRouteInfo(e):this.infoPanel.open(t,e)}onNoteMove(t){this.infoPanel.opened()&&(this.infoPanel.close(),this.closeDrawer()),this.skres.startNoteModify(t)}openAbout(){return B(this,null,function*(){let{AboutDialog:t}=yield import("./chunk-W5SXKI6G.js");this.dialog.open(t,{disableClose:!1,data:{name:this.app.name,version:this.app.version,description:this.app.description,logo:this.app.logo,url:this.app.url}}).afterClosed().subscribe(()=>this.focusMap())})}openSettings(){return B(this,null,function*(){let{SettingsDialog:t}=yield import("./chunk-67S772YL.js");this.dialog.open(t,{disableClose:!0,data:{},width:"1000px",maxWidth:"96vw",height:"80vh"}).afterClosed().subscribe(()=>{this.focusMap()})})}openFeatureBrowser(){return B(this,null,function*(){this.whatsNew.markAllSeen();let{FeatureBrowserDialog:t}=yield import("./chunk-UOK6WTQH.js");this.dialog.open(t,{data:{},width:"900px",maxWidth:"96vw"}).afterClosed().subscribe(()=>{this.focusMap()})})}importFile(t){t.data.indexOf("<gpx ")!==-1?this.processGPX(t):t.data.indexOf('"type": "FeatureCollection",')!==-1?this.processGeoJSON(t):this.app.showAlert("Import","File format not supported!"),this.focusMap()}processGPX(t){return B(this,null,function*(){let{GPXImportDialog:e}=yield import("./chunk-IQVXAJGE.js");this.dialog.open(e,{disableClose:!0,data:{fileData:t.data,fileName:t.name}}).afterClosed().subscribe(n=>{if(typeof n.errCount>"u"||n.errCount<0){this.focusMap();return}this.fetchResources(),n.errCount===0?this.app.showMsgBox("GPX Load","GPX file resources loaded successfully."):this.app.showErrorList(n.errList),this.focusMap()})})}exportToGPX(){return B(this,null,function*(){yield this.gpxExport.exportResources(),this.focusMap()})}processGeoJSON(t){return B(this,null,function*(){let{GeoJSONImportDialog:e}=yield import("./chunk-MR5B4XRH.js");this.dialog.open(e,{disableClose:!0,data:{fileData:t.data,fileName:t.name}}).afterClosed().subscribe(n=>{n<0||(this.fetchResources(),n===0?this.app.showMsgBox("GeoJSON Load","GeoJSON features loaded successfully."):this.app.showAlert("GeoJSON Load",`Completed with errors!
354
+ Not all features were loaded.`),this.focusMap())})})}importResourceSet(){return B(this,null,function*(){let{ResourceImportDialog:t}=yield import("./chunk-VH2NXKOR.js");this.dialog.open(t,{disableClose:!0,data:{}}).afterClosed().subscribe(e=>{if(e){try{let n=JSON.parse(e.data);this.skres.postToServer(e.path,n)}catch(n){this.app.showAlert("Load Resource",`Resources were not loaded!
355
+ Invalid JSON.`)}this.focusMap()}})})}showLogin(t,e=!0,n){return B(this,null,function*(){let{LoginDialog:o}=yield import("./chunk-W5SXKI6G.js");this.dialog.open(o,{disableClose:!0,data:{message:t||"Login to Signal K server."}}).afterClosed().subscribe(r=>{r.cancel?(this.app.hasAuthToken.set(!1),this.signalk.isLoggedIn().subscribe(a=>{this.app.isLoggedIn.set(a)}),n?this.showLogin(null,!1,!0):e&&this.app.showAlert("Login Cancelled:","Update operations are NOT available until you have authenticated to the Signal K server.")):this.signalk.login(r.user,r.pwd).subscribe({next:a=>{this.app.setAuthToken(a.token),this.app.loadUserConfigfromServer().then(d=>{d&&(this.loadSymbolsThenFetchResources(),this.plotterExt.init())}),n&&this.queryAfterConnect(),this.app.isLoggedIn.set(!0)},error:()=>{this.app.setAuthToken(null),this.signalk.isLoggedIn().subscribe(a=>{this.app.isLoggedIn.set(a)}),n?this.app.showConfirm("Invalid Username or Password.","Authentication Failed:","Try Again").subscribe(()=>{this.showLogin(null,!1,!0)}):this.app.showConfirm(`Invalid Username or Password.
356
+ Note: Choosing CLOSE may make operations requiring authentication unavailable.`,"Authentication Failed:","Try Again","Close").subscribe(a=>{a&&this.showLogin()})}}),this.focusMap()})})}showPlaybackSettings(){return B(this,null,function*(){let{PlaybackDialog:t}=yield import("./chunk-2EKPI63M.js");this.dialog.open(t,{disableClose:!1}).afterClosed().subscribe(e=>{e.result?this.switchMode(1,e.query):this.switchMode(0),this.focusMap()})})}centerAndZoom(t,e){if(this.splitView.secondaryActive()){this.splitView.centerOn(t,e??void 0);return}this.centerMainChart(t,typeof e=="number"&&e>this.app.config.map.zoomLevel?e:void 0)}applyMapMove(t){if(t.activePane&&this.splitView.secondaryActive()){this.splitView.centerOn(t.center,t.zoom,t.exactZoom);return}this.app.uiConfig.update(e=>e.mapMove?he(ie({},e),{mapMove:!1}):e),this.centerMainChart(t.center,t.zoom)}centerMainChart(t,e){this.mapCenter.update(()=>t),typeof e=="number"&&(this.app.config.map.zoomLevel=e)}toggleAisTargets(){this.app.config.ui.showAisTargets=!this.app.config.ui.showAisTargets,this.app.config.ui.showAisTargets&&this.stream.aisTargetUpdated(),this.app.saveConfig()}toggleCourseData(){this.app.config.ui.showCourseData=!this.app.config.ui.showCourseData,this.app.saveConfig()}toggleNotes(){this.app.config.ui.showNotes=!this.app.config.ui.showNotes,this.app.saveConfig()}clearTrail(t=!1){let e=()=>{this.app.data.serverTrail?this.app.serverTrailWanted()&&this.stream.requestTrailFromServer():this.app.selfTrail.set([])};t?e():this.app.data.serverTrail||this.app.showConfirm("Clear Vessel Trail","Do you want to delete the vessel trail?").subscribe(n=>{n&&e()})}clearCourseData(){this.course.initCourseData()}clearDestination(){this.course.clearCourse()}activateRoute(t){return B(this,null,function*(){let e=this.routeBuffers.get(t);e?.saved&&e.href&&(t=e.href);let n=this.temporaryRoutes.isDraft(t),o=n?this.routeBuffers.get(t)?.points.map(d=>d.position):this.skres.fromCache("routes",t)?.[1].feature.geometry.coordinates;if(!o)try{o=(yield this.skres.fromServer("routes",t)).feature.geometry.coordinates}catch(d){this.app.parseHttpErrorResponse(d);return}let r=d=>n?this.temporaryRoutes.start(t,d):this.course.activateRoute(t,d),a=ln.closestForwardPoint(o,this.app.data.vessels.self.position,sn.radiansToDegrees(this.app.data.vessels.self.heading??void 0));if(a===-1){this.app.showConfirm(`Closest point is behind vessel!
357
+ Do you want to start from the first point?`,"Start Route").subscribe(d=>{d&&r()});return}r(a)})}routeNextPoint(t){this.course.rejoinRouteAt(t),this.focusMap()}featureProperties(t){return B(this,null,function*(){let e;if(t.type==="route")try{let n=!!t.resource,o;t.resource?o=t.resource[1]:(this.app.sIsFetching.set(!0),o=yield this.skres.fromServer("routes",t.id),this.app.sIsFetching.set(!1)),o&&this.bottomSheet.open($o,{disableClose:!0,data:{title:"Route Properties",resource:[t.id,o,!1],type:t.type,noButtons:n}}).afterDismissed().subscribe(r=>{r&&this.clearDestination(),this.focusMap()})}catch(n){this.app.sIsFetching.set(!1),this.app.parseHttpErrorResponse(n)}else if(t.type==="aton"||t.type==="meteo"){let n,o,r;t.type==="meteo"?(e=this.app.data.meteo.get(t.id),n="Meteo Properties",o="air",r=t.type):t.id.slice(0,3)==="sar"?(e=this.app.data.sar.get(t.id),n="SaR Properties",o="tour",r="sar"):t.id.startsWith("targets.")?(e=Fr(this.app.data.targets,new Map,this.app.data.vessels.self).get(t.id)??this.app.data.targets.get(t.id),n="Target Properties",o="radar",r="aton"):(e=this.app.data.atons.get(t.id),n="AtoN Properties",o="beenhere",r="aton"),e&&this.bottomSheet.open(Xo,{disableClose:!0,data:{title:n,target:e,id:t.id,icon:o,type:r}}).afterDismissed().subscribe(()=>this.focusMap())}else if(t.type==="aircraft")e=this.app.data.aircraft.get(t.id),e&&this.bottomSheet.open(Zo,{disableClose:!0,data:{title:"Aircraft Properties",target:e,id:t.id}}).afterDismissed().subscribe(()=>this.focusMap());else if(t.type==="alarm")this.notiMgr.showAlertInfo(t.id);else if(t.type==="rset"){let n=this.skresOther.fromResourceSetCache(t.id);n&&this.bottomSheet.open(dr,{disableClose:!0,data:{id:t.id,item:n}}).afterDismissed().subscribe(()=>{this.focusMap()})}else{let n=t.type==="self"?t.type:t.id.includes("vessels.")?t.id.split(".")[1]:t.id;try{this.app.sIsFetching.set(!0),e=yield this.skres.vesselFromServer(n),this.app.sIsFetching.set(!1),e&&this.bottomSheet.open(Ko,{disableClose:!0,data:{title:"Vessel Properties",target:e}}).afterDismissed().subscribe(()=>this.focusMap())}catch(o){this.app.sIsFetching.set(!1),this.app.parseHttpErrorResponse(o)}}})}mapDragOver(t){t.preventDefault()}mapDrop(t){t.preventDefault();let e=t.dataTransfer?.files;if(e)if(e.length>1)this.app.showAlert("Load Resources",`Multiple files provided!
358
+ Please select only one file for processing.`);else{let n=new FileReader;if(n.onerror=()=>{this.app.showAlert("File Load error","There was an error reading the file contents!")},!e[0]?.name)return;let o=e[0].name;n.onload=()=>{this.processGPX({name:o,data:n.result})},n.readAsText(e[0])}}switchActiveVessel(t=null){if(this.app.data.vessels.activeId=t,!t)this.app.data.vessels.active=this.app.data.vessels.self;else{let e=this.app.data.vessels.aisTargets.get(t);e?(this.app.data.vessels.active=e,this.sideright.close()):(this.app.data.vessels.active=this.app.data.vessels.self,this.app.data.vessels.activeId=null)}this.app.data.activeRoute=null,this.clearCourseData(),this.app.debug(`** Active vessel: ${this.app.data.vessels.activeId} `),this.app.debug(this.app.data.vessels.active)}switchMode(t,e){this.app.debug(`switchMode from: ${this.mode} to ${t}`),t===1?(this.app.db.saveTrail("self",this.app.selfTrail()),this.app.selfTrail.set([])):this.app.db.getTrail("self").then(n=>{this.app.selfTrail.update(()=>n&&n.value?n.value:[])}),this.switchActiveVessel(),this.openSKStream(e,t,!0)}showSelectMode(){this.mode===0?this.app.showConfirm("Do you want to change to History Playback mode?","Switch Mode").subscribe(t=>{t&&this.showPlaybackSettings()}):this.app.showConfirm("Do you want to exit History Playback mode?","Exit History Playback").subscribe(t=>{t&&this.switchMode(0)})}handleSelectionEnded(t){t.mode==="seedChart"&&this.skres.seedChartCache(t.data,t.bbox)}drawFeature(t){this.mapInteract.startDrawing(t)}newWaypointAtVessel(){let t=this.app.data.vessels.active.position;t&&this.skres.newWaypointAt(t)}onRouteInfoEdit(t){let e=this.routeBuffers.getForRoute(t);e&&(!e.saved||e.dirty)?this.saveRouteBuffer(e.routeId):this.skres.editRouteInfo(t)}saveRouteBuffer(t){return B(this,null,function*(){try{let e=yield this.plotterExt.saveBuffer(t,{dialog:!0,promote:!0});e&&this.infoPanel.open("routes",e.href)}catch(e){}})}handleDrawEnded(t){switch(this.mapInteract.isDrawing(),this.app.data.editingId="",this.mapInteract.draw.resourceType){case"note":{let e={position:t.coordinates};this.mapInteract.draw.properties.group&&(e.group=this.mapInteract.draw.properties.group),this.skres.showNoteEditor(e);break}case"waypoint":this.skres.newWaypointAt(t.coordinates);break;case"route":this.routeBuffers.create({points:_n(t.coordinates,t.coordsMetadata)});break;case"region":{let e=new po;e.feature.geometry.coordinates=[ln.normaliseCoords(t.coordinates)],this.skres.newRegion(e);break}}}handleInteractionFinish(){this.mapInteract.isDrawing()?this.fbMap.finishDrawing():this.closeInteraction(!0)}handleInteractionUndo(){this.fbMap.undoInteraction()}onDocumentKeydown(t){!Gr(t)||!this.mapInteract.canUndo()||(t.preventDefault(),this.handleInteractionUndo())}closeInteraction(t=!1){if(this.app.data.editingId="",this.mapInteract.isBoxSelecting()&&this.mapInteract.stopBoxSelection(),this.mapInteract.isMeasuring()&&this.mapInteract.stopMeasuring(),this.mapInteract.isDrawing()&&this.mapInteract.stopDrawing(),this.mapInteract.isModifying()&&(this.mapInteract.stopModifying(),this.app.data.activeRouteIsEditing=!1,this.mapInteract.draw.forSave?.id)){if(this.mapInteract.draw.forSave.id==="anchor"){this.mapInteract.draw.forSave=null,this.focusMap();return}let e=this.mapInteract.draw.forSave.id.split(".");if(e[0]==="route"){this.applyModifyResult(t);return}this.app.showConfirm(`Do you want to save the changes made to ${e[0]}?`,"Save Changes").subscribe(n=>this.applyModifyResult(n))}}applyModifyResult(t){let e=this.mapInteract.draw.forSave;if(!e?.id)return;let n=e.id.split("."),o=e.coords;if(t){if(n[0]==="route"){let r=this.routeBuffers.get(n[1]);if(r&&!r.saved){let a=e.coordsMetadata;this.routeBuffers.replace(n[1],_n(o,a))}else this.plotterExt.saveNativeRouteEdit(n[1],o,e.coordsMetadata)}n[0]==="waypoint"&&(this.skres.updateWaypointPosition(n[1],o),n[1]===this.app.data.activeWaypoint&&this.course.setDestination({latitude:o[1],longitude:o[0]})),n[0]==="note"&&this.skres.updateNotePosition(n[1],o),n[0]==="region"&&this.skres.updateRegionCoords(n[1],o)}else{if(n[0]==="route"){let r=this.routeBuffers.get(n[1]);r&&(!r.saved||r.dirty)?this.routeBuffers.refresh():this.skres.refreshRoutes()}n[0]==="waypoint"&&this.skres.refreshWaypoints(),n[0]==="note"&&this.skres.refreshNotes(),n[0]==="region"&&this.skres.refreshRegions()}this.mapInteract.draw.forSave=null,this.focusMap()}loadSymbolsThenFetchResources(){return B(this,null,function*(){yield this.symbols.load(),ro(this.symbols),this.fetchResources(!0)})}fetchResources(t=!1){this.skres.refreshRoutes(),this.skres.refreshWaypoints(),this.skres.refreshCharts(),this.skres.refreshRegions(),t&&this.fetchOtherResources()}fetchOtherResources(){this.skres.refreshTracks(),this.skresOther.refreshResourceSetsInBounds()}openSKStream(t=null,e=0,n=!1){if(n){this.streamOptions={options:t,toMode:e},this.stream.close();return}this.stream.sendConfig(this.app.config),this.stream.open(t??void 0)}queryAfterConnect(){this.signalk.server.info.version.split(".")[0]==="1"&&this.app.showAlert("Unsupported Server Version:",`The connected Signal K server is not supported by this version of Freeboard-SK.
359
+ Signal K server version 2 or later is required!`),this.app.alignCustomResourcesPaths(),this.signalk.api.getSelf().subscribe(t=>{this.stream.post({cmd:"vessel",options:{context:"self",name:t.name}}),this.anchor.queryAnchorStatus("self",this.app.data.vessels.self.position??void 0),this.radarApi.init()},t=>{t.status&&t.status===401&&this.showLogin(null,!1,!0),this.app.debug("No vessel data available!")})}onConnect(t){this.app.showMessage("Connection Open.",!1,2e3),this.app.debug(t),this.queryAfterConnect(),this.startTimers(),this.temporaryRoutes.sweep()}onClose(t){if(this.app.debug("onClose: STREAM connection closed..."),this.app.debug(t),this.stopTimers(),t.result)this.openSKStream(this.streamOptions.options,this.streamOptions.toMode);else{let e={title:"Connection Closed:",buttonText:"Re-connect",message:""};t.playback?(e.buttonText="OK",e.message="Unable to open Playback connection.",this.app.showAlert(e.message,e.title,e.buttonText).subscribe(()=>{this.mode===0?this.switchMode(this.mode):this.showPlaybackSettings()})):this.reconnecting||(this.reconnecting=!0,setTimeout(()=>{this.reconnecting=!1,this.openSKStream(this.streamOptions.options,this.mode)},5e3))}}reconnecting=!1;onError(t){this.app.showMessage("Connection Error!",!1,2e3),console.warn("Stream Error!",t)}onMessage(t){if(t.action==="hello"){this.app.debug(t),this.mob.playback=!!t.playback,t.playback?this.mode=1:(this.mode=0,this.stream.subscribe()),this.app.data.selfId=t.self;return}else if(t.action==="update"){if(this.mode===1){let e=new Date(t.timestamp);this.playbackTime.update(()=>`${e.toDateString().slice(4)} ${e.toTimeString().slice(0,8)}`)}else this.playbackTime.set(null),this.setDarkTheme();this.updateNavPanel()}}updateNavPanel(){this.navDataPanel.update(()=>({show:!!(this.app.data.activeRoute||this.app.data.activeWaypoint||this.course.courseData().position),nextPointCtrl:!!this.app.data.activeRoute,apModeColor:this.app.data.vessels.self.autopilot.enabled?"primary":"",apModeText:this.app.data.vessels.self.autopilot.default?`Autopilot: ${this.app.data.vessels.self.autopilot.default}`:""}))}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=D({type:i,selectors:[["app-root"]],viewQuery:function(e,n){if(e&1&&(bi(n.pipVideo,mt,5)(n.leftToolbar,Mu,5),ee(Su,5)(Pu,5)(Au,7)(ku,7)(Iu,7)(Tn,7)),e&2){xi(2);let o;F(o=N())&&(n.sideright=o.first),F(o=N())&&(n.fbMap=o.first),F(o=N())&&(n.layersMenu=o.first),F(o=N())&&(n.editMenu=o.first),F(o=N())&&(n.settingsMenu=o.first),F(o=N())&&(n.experiments=o.first)}},hostBindings:function(e,n){e&1&&h("visibilitychange",function(){return n.onVisibilityChange()},ze)("keydown",function(r){return n.onDocumentKeydown(r)},ze)},decls:152,vars:56,consts:[["layersmenu","matMenu"],["settingsmenu","matMenu"],["toolbarMenuIcon",""],["editmenu","matMenu"],["mainmenu","matMenu"],["sideright",""],["fbMap",""],["northArrow",""],["leftToolbar",""],[3,"ngClass"],[1,"appframe","mat-app-background"],["mat-menu-item","",3,"click"],["svgIcon","route",1,"icon-route"],[1,"icon-waypoint"],["mat-menu-item",""],["accept",".gpx,.json",3,"chosen","astext"],["svgIcon","route-import",1,"ob"],["svgIcon","route-export",1,"ob"],[3,"selected"],["svgIcon","bearing-distance"],[1,"icon-route"],["svgIcon","route-planning",1,"icon-route"],[1,"icon-accent"],["theme-main","",1,"view"],["hasBackdrop","false",1,"pe-view-main"],["mode","side","position","end",3,"disableClose"],[2,"display","flex","flex-direction","column","position","relative"],[2,"overflow","hidden"],[2,"z-index","4700","position","fixed","top","0px","left","0px","width","100%"],[3,"apData"],[1,"mapPanel",3,"dragover","drop"],["id","fb-main-chart",1,"mapMain"],[3,"drawEnded","activate","deactivate","exitMovingMap","resumeMovingMap","focusVessel","info","menuItemSelected","scaleUnits","setFocus","mapCenter","mapZoom","northUp","movingMap","vesselTrail","activeRoute","dblClickZoom","overZoomTiles","measureMode","drawMode"],[3,"scaleUnits","statusBar"],[3,"inset"],[2,"position","absolute","top","60px","left","56px","width","50px"],["src","./assets/img/north_arrow.svg","width","50","height","70"],[1,"playbackPanel","mat-app-background"],["fbMovablePanel","fb-navdata-panel-position",1,"navdataPanel",3,"fbMovablePanelRestingBottom","fbBottomClearance"],[3,"action","extensionButton"],[1,"icon-warn"],["svgIcon","chart-display-settings-iec",1,"ob"],["mat-menu-item","",3,"disabled","matMenuTriggerFor"],["mat-menu-item","",3,"disabled"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["mat-menu-item","",3,"click","disabled"],[3,"svgIcon"],["matBadge","!","matBadgeOverlap","true","matBadgeSize","medium","matBadgePosition","below after","aria-hidden","false",3,"matBadgeHidden"],["svgIcon","radar-iec",1,"ob"],[3,"closed"],[3,"note","id","interacting"],[3,"region","id","related","interacting"],[3,"waypoint","id","related","interacting"],[3,"route","id","related","interacting"],[3,"connect","disconnect"],[3,"edit","move","panTo","note","id","interacting"],[3,"edit","panTo","region","id","related","interacting"],[3,"edit","panTo","waypoint","id","related","interacting"],[3,"edit","activate","panTo","route","id","related","interacting"],["mat-list-item",""],["mat-icon-button","",3,"click"],["mat-icon-button","","target","_blank","matTooltip","Open Instruments in window.","matTooltipPosition","right",3,"href"],["mat-icon-button","","matTooltip","Previous plugin","matTooltipPosition","below",3,"click","disabled"],["mat-icon-button","","matTooltip","Next plugin","matTooltipPosition","below",3,"click","disabled"],[2,"position","fixed","bottom","0","top","48px","overflow","auto","-webkit-overfow-scrolling","touch"],["sandbox","allow-scripts allow-same-origin allow-forms",2,"width","345px","height","100%",3,"src"],["mat-icon-button","","target","_blank","matTooltip","Open Instruments in window.","matTooltipPosition","right",3,"click","href"],["mode","query"],[3,"close","apData"],[3,"save","close"],[1,"leftTop","buttonPanel"],[1,"buttonPanelItem"],["mat-mini-fab","","matBadge","!","matBadgeOverlap","true","matTooltip","Menu","matTooltipPosition","right","aria-hidden","false",1,"button-secondary",3,"disabled","matBadgeHidden","matMenuTriggerFor"],["side","left",2,"top","60px","bottom","0",3,"items"],[1,"leftMenuPanel"],[1,"statusBar"],[1,"statusBarItem"],[1,"rightTop","buttonPanel"],["mat-mini-fab","","matTooltipPosition","before",1,"button-secondary",3,"click","matTooltip"],[3,"showSelf","radius","raised"],[3,"activate","deactivate","select","points","notes","closed","activeRoute","editingRouteId"],[3,"select","goto","deactivate","center","notes","closed","activeWaypoint","editingWaypointId"],[3,"closed","selectedCharts"],[3,"select","pan","closed","notes"],[3,"select","pan","closed","regions"],[3,"center","closed"],[3,"properties","closed","focusVessel","pan","focusId"],[3,"closed","showSelf","radius","raised"],["matTooltip","WakeLock is turned off","matTooltipPosition","below"],["matTooltip","Course data is hidden","matTooltipPosition","below"],["matTooltip","Vessels are hidden","matTooltipPosition","below"],["matTooltip","Notes are hidden","matTooltipPosition","below"],["matTooltip","No server messages!","matTooltipPosition","below",2,"background-color","red","color","white"],["side","right",3,"items"],[3,"src","muted"],[3,"click","src","muted"],[2,"border-radius","5px"],[2,"text-align","center"],[3,"alerts"],[1,"alarmPanel"],[2,"margin-bottom","5px"],[3,"closed","alerts"],[3,"nextPoint","routeEnd","audioStatus","alert","acknowledged","silenced","doNotPlaySound"],[3,"finish","cancel","undo"],[3,"cancel"],["fbMovablePanel","fb-navdata-panel-position",1,"navdataPanel",3,"clearance","fbMovablePanelRestingBottom","fbBottomClearance"],[3,"index","total","circular"],[2,"display","flex","flex-wrap","nowrap"],[3,"selected","index","total","circular"],[1,"mat-app-background",2,"display","flex"],[2,"width","40px"],["mat-icon-button","","matTooltip","Course Settings",3,"click"],["svgIcon","navigation-route",1,"ob"],["mat-icon-button","","matTooltip","Autopilot Console","matTooltipPosition","above","matTooltip","Engage Autopilot",3,"click","disabled"],["svgIcon","command-autopilot",1,"ob",3,"color"],["mat-icon-button","","matTooltip","Restart XTE",3,"click"],["mat-icon-button","","matTooltip","Reverse route direction","matTooltipPosition","above",3,"click","disabled"],[3,"color"],[3,"title","value","units"],[3,"value"],[3,"title","value"],["subTitle","RT",3,"title","value","units"],["subTitle","RT",3,"value"],["subTitle","RT",3,"title","value"],[3,"radarClick","action","extensionButton"]],template:function(e,n){if(e&1&&(s(0,"div",9)(1,"div",10)(2,"mat-menu",null,0)(4,"button",11),h("click",function(){return n.displayLeftMenu("routeList",!0)}),T(5,"mat-icon",12),u(6," \xA0Routes "),l(),s(7,"button",11),h("click",function(){return n.displayLeftMenu("waypointList",!0)}),s(8,"mat-icon",13),u(9,"location_on"),l(),u(10," \xA0Waypoints "),l(),s(11,"button",11),h("click",function(){return n.displayLeftMenu("noteList",!0)}),s(12,"mat-icon"),u(13,"local_offer"),l(),u(14," \xA0Notes "),l(),s(15,"button",11),h("click",function(){return n.displayLeftMenu("regionList",!0)}),s(16,"mat-icon"),u(17,"tab_unselected"),l(),u(18," \xA0Regions "),l(),s(19,"button",11),h("click",function(){return n.displayLeftMenu("chartList",!0)}),s(20,"mat-icon"),u(21,"map"),l(),u(22," \xA0Charts "),l(),s(23,"button",11),h("click",function(){return n.displayLeftMenu("weatherList",!0)}),s(24,"mat-icon"),u(25,"cloud"),l(),u(26," \xA0Weather "),l(),g(27,Hu,4,0,"button",14),g(28,Gu,4,0,"button",14),T(29,"mat-divider"),s(30,"button",14)(31,"ap-file-input",15),h("chosen",function(r){return n.importFile(r)}),T(32,"mat-icon",16),u(33," Import "),l()(),s(34,"button",11),h("click",function(){return n.exportToGPX()}),T(35,"mat-icon",17),u(36," \xA0Export "),l(),T(37,"mat-divider"),g(38,ju,4,0,"button",14),g(39,Xu,3,0,"div"),l(),s(40,"fb-experiments",18),h("selected",function(r){return n.openExperiment(r)}),l(),s(41,"mat-menu",null,1),yi(43),q(44,em,2,1,null,null,qu),g(46,tm,1,0,"mat-divider"),g(47,am,25,10),l(),it(48,sm,2,4,"ng-template",null,2,Pi),s(50,"mat-menu",null,3)(52,"a",11),h("click",function(){return n.mapInteract.startMeasuring("LineString")}),s(53,"mat-icon"),u(54,"straighten"),l(),s(55,"span"),u(56,"Measure"),l()(),s(57,"a",11),h("click",function(){return n.mapInteract.startMeasuring("BearingDistance")}),T(58,"mat-icon",19),s(59,"span"),u(60,"Bearing & Distance"),l()(),T(61,"mat-divider"),s(62,"a",11),h("click",function(){return n.drawFeature("route")}),s(63,"mat-icon",20),u(64,"draw"),l(),s(65,"span"),u(66,"Draw Route"),l()(),s(67,"a",11),h("click",function(){return n.toggleRouteBuilderConsole(!0)}),T(68,"mat-icon",21),s(69,"span"),u(70,"Build Route"),l()(),T(71,"mat-divider"),g(72,lm,5,0,"a",14),s(73,"a",11),h("click",function(){return n.drawFeature("waypoint")}),s(74,"mat-icon",13),u(75,"add_location_alt"),l(),s(76,"span"),u(77,"Drop Waypoint"),l()(),T(78,"mat-divider"),g(79,cm,5,0,"a",14),s(80,"a",11),h("click",function(){return n.drawFeature("region")}),s(81,"mat-icon"),u(82,"tab_unselected"),l(),s(83,"span"),u(84,"Draw Region"),l()()(),s(85,"mat-menu",null,4),g(87,pm,6,2),g(88,dm,5,0,"a",14),g(89,fm,5,1,"a",14),s(90,"a",11),h("click",function(){return n.displayLeftMenu("aisList",!0)}),s(91,"mat-icon"),u(92,"directions_boat"),l(),s(93,"span"),u(94,"Vessels"),l()(),s(95,"a",11),h("click",function(){return n.importResourceSet()}),s(96,"mat-icon"),u(97,"upload"),l(),s(98,"span"),u(99,"Resource Sets"),l()(),g(100,hm,5,0,"a",14),T(101,"mat-divider"),s(102,"a",11),h("click",function(){return n.openSettings()}),s(103,"mat-icon"),u(104,"settings"),l(),s(105,"span"),u(106,"Settings"),l()(),T(107,"mat-divider"),s(108,"a",11),h("click",function(){return n.openAbout()}),s(109,"mat-icon",22),u(110,"info_outline"),l(),s(111,"span"),u(112,"About"),l()(),s(113,"a",11),h("click",function(){return n.openFeatureBrowser()}),s(114,"mat-icon",22),u(115,"tips_and_updates"),l(),s(116,"span"),u(117,"What's New"),l()(),s(118,"button",11),h("click",function(){return n.app.showHelp()}),s(119,"mat-icon",22),u(120,"help"),l(),s(121,"span"),u(122,"Help"),l()()(),s(123,"div",23)(124,"mat-sidenav-container",24)(125,"mat-sidenav",25,5),g(127,xm,2,1,"info-panel")(128,Tm,17,4,"div",26),l(),s(129,"mat-sidenav-content",27),g(130,Mm,2,0,"div",28),g(131,Sm,1,1,"autopilot-console",29),g(132,Pm,1,0,"route-builder"),g(133,of,19,17),s(134,"div",30),h("dragover",function(r){return n.mapDragOver(r)})("drop",function(r){return n.mapDrop(r)}),s(135,"div",31)(136,"fb-map",32,6),h("drawEnded",function(r){return n.handleDrawEnded(r)})("activate",function(r){return n.activateRoute(r)})("deactivate",function(){return n.clearDestination()})("exitMovingMap",function(r){return n.toggleMoveMap(r)})("resumeMovingMap",function(){return n.resumeMoveMap()})("focusVessel",function(r){return n.switchActiveVessel(r)})("info",function(r){return n.featureProperties(r)})("menuItemSelected",function(r){return n.handleContextMenuSelection(r)}),l()(),g(138,rf,1,2,"fb-split-map",33),l(),T(139,"fb-plotterext-overlay")(140,"fb-pe-window-layer",34),s(141,"div",35),T(142,"img",36,7),l(),g(144,af,8,1,"div",37),g(145,cf,4,1),g(146,pf,1,0,"fb-interact-help")(147,df,1,0,"fb-interact-help"),g(148,Ef,3,4,"div",38),g(149,Tf,1,2,"mfb-container",39),l()(),T(150,"fb-plotterext-panel-drawer")(151,"fb-plotterext-runtimes"),l()()()),e&2){let o;w("ngClass",Si(52,zu,n.app.config.display.darkMode.enabled,n.stream.selfNightMode()||n.app.uiCtrl().forceNightMode)),p(27),v(n.app.featureFlags().resourceGroups?27:-1),p(),v(n.app.featureFlags().infoLayers?28:-1),p(3),w("astext",!0),p(7),v(n.app.tracksAvailable()?38:-1),p(),v(n.app.config.resources.paths.length!==0?39:-1),p(4);let r=Ei(((o=n.leftToolbar())==null?null:o.overflow())??Mi(55,Uu));p(),W(r),p(2),v(r.length!==0?46:-1),p(),v(n.isInteracting()?-1:47),p(25),v(n.app.data.vessels.showSelf?72:-1),p(7),v(n.app.config.map.zoomLevel>=n.app.config.resources.notes.minZoom?79:-1),p(8),v(!n.app.hostDef.params.token&&n.app.data.loginRequired?87:-1),p(),v(!n.isInteracting()&&n.app.featureFlags().anchorApi?88:-1),p(),v(!n.isInteracting()&&n.app.featureFlags().radarApi&&n.radarApi.radarId()&&!n.app.instrumentPanel().open&&n.app.data.vessels.showSelf?89:-1),p(11),v(n.features.playbackAPI?100:-1),p(25),H("width",n.app.instrumentPanel().open?"350px":"250px"),w("disableClose",!1),p(2),v(n.app.instrumentPanel().open?128:127),p(3),v(n.app.sIsFetching()?130:-1),p(),v(n.app.uiCtrl().autopilotConsole?131:-1),p(),v(n.app.uiCtrl().routeBuilder?132:-1),p(),v(!n.app.kioskMode()&&!n.app.uiCtrl().suppressContextMenu?133:-1),p(),V("split",n.splitActive())("stacked",n.splitActive()&&n.splitView.stacked()),p(),H("flex-basis",n.splitActive()?n.mainShare():"100%"),V("active-pane",n.splitActive()&&!n.splitView.secondaryActive()),p(),w("scaleUnits",n.app.config.units.distance)("setFocus",n.mapSetFocus())("mapCenter",n.mapCenter())("mapZoom",n.app.config.map.zoomLevel)("northUp",n.app.uiConfig().mapNorthUp)("movingMap",n.app.uiConfig().mapMove)("vesselTrail",n.app.selfTrail())("activeRoute",n.app.data.activeRoute)("dblClickZoom",n.app.config.map.doubleClickZoom)("overZoomTiles",n.app.config.map.overZoomTiles)("measureMode",n.mapInteract.isMeasuring())("drawMode",n.mapInteract.isDrawing()),p(2),v(n.splitActive()?138:-1),p(2),w("inset",!n.app.kioskMode()&&!n.app.uiCtrl().suppressContextMenu?54:0),p(2),H("transform",n.getOrientation()),p(2),v(n.mode===1?144:-1),p(),v(n.app.kioskMode()?-1:145),p(),v(n.isInteracting()?146:n.mapInteract.pick()?147:-1),p(2),v(!n.isInteracting()&&!n.plotterExt.movingWidget()?148:-1),p(),v(!n.isInteracting()&&!n.app.kioskMode()?149:-1)}},dependencies:[wt,vt,gt,Ct,Hr,An,Wr,Et,go,_o,we,Qi,Re,io,no,to,eo,ue,de,Le,De,Go,Ho,Ri,Oi,lt,uo,mo,fo,ho,mt,Do,Mo,Ro,Nr,Tn,wr,vr,gr,xr,ar,Lo,qt,rr,yr,Uo,Wo,lr,or,Br,zt,Wt,Ht,jt,Kt],styles:["mat-sidenav-container[_ngcontent-%COMP%]{height:100%}mat-sidenav[_ngcontent-%COMP%]{width:200px}mat-nav-list[_ngcontent-%COMP%]{padding-top:0}.appframe[_ngcontent-%COMP%]{width:100vw;height:100vh;background-color:#000;color:#fff;overflow:hidden}.view[_ngcontent-%COMP%]{inset:0;overflow:hidden;scrollbar-width:none;position:fixed;border-top:silver 0px solid;display:flex;flex-direction:row}.view[_ngcontent-%COMP%] .pe-view-main[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0;height:100%}.leftMenuPanel[_ngcontent-%COMP%]{position:absolute;top:0;left:0;bottom:0;padding-left:0;z-index:5000;background-color:#c8c8c866;width:315px}.statusBar[_ngcontent-%COMP%]{width:max-content;z-index:4800;position:absolute;right:55px;top:20px;padding:1px;overflow:hidden;text-align:right;display:flex}.statusBarItem[_ngcontent-%COMP%]{padding-left:5px}.statusBarItem[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{background-color:#ffffff80;color:#000;border-radius:10px}.buttonPanel[_ngcontent-%COMP%]{width:50px;z-index:4800;position:absolute;padding:5px 2px 2px;overflow:auto;scrollbar-width:none}.buttonPanel.rightTop[_ngcontent-%COMP%]{right:0;top:0;padding:9px 2px 10px}.buttonPanel.leftTop[_ngcontent-%COMP%]{left:0;top:0;padding:9px 2px 10px}.buttonPanel.left[_ngcontent-%COMP%]{top:60px;left:0;bottom:0}.buttonPanel.right[_ngcontent-%COMP%]{top:60px;right:0;bottom:80px}.buttonPanel[_ngcontent-%COMP%] .buttonPanelItem[_ngcontent-%COMP%]{text-align:center;height:48px;padding:5px 0}.mapButton[_ngcontent-%COMP%]{position:fixed;z-index:4900}.alarmPanel[_ngcontent-%COMP%]{position:absolute;z-index:4902;top:55px;left:15%;right:15%}.measurePanel[_ngcontent-%COMP%]{font-family:roboto;font-size:10pt}.playbackPanel[_ngcontent-%COMP%]{position:absolute;z-index:4900;bottom:150px;left:50px;top:auto;width:100px;border:gray 1px solid;border-radius:5px;font-family:roboto;text-align:center}.navdataPanel[_ngcontent-%COMP%]{position:absolute;z-index:4901;bottom:30px;left:10px;max-width:calc(100% - 75px);max-height:100px;text-align:center;display:flex;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;border:gray 1px solid;border-radius:10px}.bottomSheet[_ngcontent-%COMP%]{position:absolute;z-index:4902;bottom:0;left:15%;min-width:400px;max-width:100%;height:180px;overflow:auto}.bottomSheet[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{flex:1 1 auto;text-align:center;font-family:roboto;font-weight:500;line-height:2.5em}.control[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-start;margin:20px}.ol-mouse-position[_ngcontent-%COMP%]{position:fixed;bottom:10px;right:45%;color:#1e1e1e;font-family:roboto;background-color:#fafafab3}.ol-zoom[_ngcontent-%COMP%]{position:fixed;top:10px;left:100px;color:#1e1e1e;font-family:roboto;background-color:transparent;height:45px}.instrumentPanelToggle[_ngcontent-%COMP%]{display:block}@media only screen and (max-width:650px){.bottomSheet[_ngcontent-%COMP%]{left:0;min-width:100%}}@media only screen and (max-width:800px){.instrumentPanelToggle[_ngcontent-%COMP%]{display:none}}@media only screen and (max-height:600px){.navdataPanel[_ngcontent-%COMP%]{left:50px;max-width:calc(100% - 115px)}}"]})};Di(Xt,{providers:[ki({eventCoalescing:!0,runCoalescing:!0}),Li(Vi())]}).then(i=>{try{if(new URLSearchParams(window.location.search).has("perfprobe")){let t=i.injector.get(X),e=window;e.__cd=0,t.onMicrotaskEmpty.subscribe(()=>{e.__cd++})}}catch(t){}}).catch(i=>console.error(i));