import{a as sl}from"./chunk-P6XHS3O6.js";import{$ as ri,A as ga,Aa as tl,B as _e,Ba as il,C as va,Ca as xe,Da as rl,E as ya,Ea as Oi,F as js,Fa as nl,G as $s,Ga as al,H as ke,Ha as ol,J as Ns,L as Gs,M as Us,N as Vs,O as zs,P as Hs,Q as Y,R as ve,U as Dt,V as Ws,Y as re,Z as qs,aa as Ne,ba as Ys,ca as Xs,da as qr,e as Es,ea as Js,f as ae,ga as Yr,k as Ts,ka as Ks,l as ha,n as _s,o as ks,oa as Qs,p as Ls,pa as Xr,s as Fs,t as As,u as Ds,ua as Be,v as Os,va as se,w as Bs,x as Rs,xa as Zs,ya as Ot,za as el}from"./chunk-5LKVUOEV.js";import{a as Is}from"./chunk-5N3DKVKN.js";import{b as Di,d as Gr}from"./chunk-E7Z5WLMS.js";import{$a as It,$b as Wr,Bb as Lt,D as Ze,Db as Ft,Eb as At,Fa as bt,G as et,Ga as xt,H as ts,Hb as xs,I as is,J as tt,Kb as ii,Lb as zr,Mb as Ps,N as rt,Oa as ps,Ob as Ss,P as Ai,Q as at,Qa as ds,Ra as Pt,Ta as St,Ua as fs,Va as wt,Wa as ms,X as st,Xa as Ct,Y as lt,Ya as Ur,Z as ct,Za as Vr,_ as ut,_a as Mt,_b as Hr,ac as ws,b as Tr,ba as pt,c as qo,cb as Et,cc as Cs,d as Yo,da as dt,dc as Ms,fb as Tt,gb as hs,ha as ft,hb as gs,i as Je,ib as vs,j as ki,jb as ys,k as _r,ka as mt,kb as bs,lb as _t,m as kr,ma as ht,n as Jt,o as Xo,p as Li,q as Fi,r as Ke,s as Lr,ta as gt,va as us,wa as vt,wb as kt,y as Jo,z as Qe,za as yt}from"./chunk-ANM32OM3.js";import{$a as Ao,A as Io,Ab as y,Ac as Er,Af as Zt,Bb as z,Bf as as,Ca as d,Cb as E,Da as B,Db as Ut,Dc as fa,Dd as Ye,E as Ii,Eb as Pr,Ef as os,Fc as Xt,Ff as nt,Ge as Ko,Hf as ei,I as Eo,Ia as Fo,Ie as Fr,If as ma,Jb as Sr,Jf as ti,Kb as Te,L as To,Lb as Go,Le as Ar,Lf as $r,Mb as ze,Me as Dr,Na as Xi,Nb as wr,Nd as Xe,Ne as Qo,Oe as Zo,Pf as ss,Qa as G,Qe as Or,Qf as C,Rb as x,Re as Ji,Sb as L,Sf as ot,Ta as xr,Tb as ie,Tf as ls,Ua as k,Ub as He,Uf as ge,V as j,We as Br,Wf as Oe,Xf as Me,Y as M,Yc as Ho,Z as V,Za as ye,Zc as Wo,Ze as Rr,Zf as cs,a as Ci,aa as Ee,ab as Do,af as es,bb as Oo,ca as vr,cb as h,cg as Nr,d as H,da as _o,db as v,eb as K,ef as Kt,fb as Bo,ga as yr,gb as Ro,gc as Uo,ha as fe,ia as me,ib as be,ic as Ei,jb as jo,jc as Ti,jf as rs,kc as _i,lb as he,mc as Vo,nb as D,oa as W,ob as $o,oc as Cr,of as jr,pa as ko,pb as No,pf as ns,q as Yt,qc as Mr,qd as We,r as de,ta as Lo,tf as ue,ub as ua,uc as zo,ud as qe,uf as Ce,vb as pa,vc as Ir,vf as Qt,wb as da,wf as it,y as Mi,ya as br,z as Mo,zf as F}from"./chunk-OJGO5OO4.js";import{a as I,b as ee,d as ca,f as gr}from"./chunk-XBKOOFWL.js";var ul=ca((xa,Pa)=>{(function(t,e){typeof define=="function"&&define.amd?define([],e):typeof xa<"u"?e():(e(),t.FileSaver={})})(xa,function(){"use strict";function t(s,l){return typeof l>"u"?l={autoBom:!1}:typeof l!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),l={autoBom:!l}),l.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(s.type)?new Blob(["\uFEFF",s],{type:s.type}):s}function e(s,l,c){var u=new XMLHttpRequest;u.open("GET",s),u.responseType="blob",u.onload=function(){o(u.response,l,c)},u.onerror=function(){console.error("could not download file")},u.send()}function n(s){var l=new XMLHttpRequest;l.open("HEAD",s,!1);try{l.send()}catch{}return 200<=l.status&&299>=l.status}function i(s){try{s.dispatchEvent(new MouseEvent("click"))}catch{var l=document.createEvent("MouseEvents");l.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),s.dispatchEvent(l)}}var r=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:void 0,a=r.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),o=r.saveAs||(typeof window!="object"||window!==r?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(s,l,c){var u=r.URL||r.webkitURL,m=document.createElement("a");l=l||s.name||"download",m.download=l,m.rel="noopener",typeof s=="string"?(m.href=s,m.origin===location.origin?i(m):n(m.href)?e(s,l,c):i(m,m.target="_blank")):(m.href=u.createObjectURL(s),setTimeout(function(){u.revokeObjectURL(m.href)},4e4),setTimeout(function(){i(m)},0))}:"msSaveOrOpenBlob"in navigator?function(s,l,c){if(l=l||s.name||"download",typeof s!="string")navigator.msSaveOrOpenBlob(t(s,c),l);else if(n(s))e(s,l,c);else{var u=document.createElement("a");u.href=s,u.target="_blank",setTimeout(function(){i(u)})}}:function(s,l,c,u){if(u=u||open("","_blank"),u&&(u.document.title=u.document.body.innerText="downloading..."),typeof s=="string")return e(s,l,c);var m=s.type==="application/octet-stream",b=/constructor/i.test(r.HTMLElement)||r.safari,T=/CriOS\/[\d]+/.test(navigator.userAgent);if((T||m&&b||a)&&typeof FileReader<"u"){var O=new FileReader;O.onloadend=function(){var f=O.result;f=T?f:f.replace(/^data:[^;]*;/,"data:attachment/file;"),u?u.location.href=f:location=f,u=null},O.readAsDataURL(s)}else{var N=r.URL||r.webkitURL,p=N.createObjectURL(s);u?u.location=p:location.href=p,u=null,setTimeout(function(){N.revokeObjectURL(p)},4e4)}});r.saveAs=o.saveAs=o,typeof Pa<"u"&&(Pa.exports=o)})});var no=ca((kh,Pc)=>{"use strict";Pc.exports=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var i,r,a;if(Array.isArray(e)){if(i=e.length,i!=n.length)return!1;for(r=i;r--!==0;)if(!t(e[r],n[r]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(a=Object.keys(e),i=a.length,i!==Object.keys(n).length)return!1;for(r=i;r--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[r]))return!1;for(r=i;r--!==0;){var o=a[r];if(!t(e[o],n[o]))return!1}return!0}return e!==e&&n!==n}});var Nc=ca((ho,go)=>{(function(t,e){typeof ho=="object"&&typeof go<"u"?go.exports=e():typeof define=="function"&&define.amd?define(e):(t=t||self).RBush=e()})(ho,function(){"use strict";function t(p,f,g,P,w){(function S(_,R,$,U,Z){for(;U>$;){if(U-$>600){var q=U-$+1,oe=R-$+1,qi=Math.log(q),di=.5*Math.exp(2*qi/3),Si=.5*Math.sqrt(qi*di*(q-di)/q)*(oe-q/2<0?-1:1),wi=Math.max($,Math.floor(R-oe*di/q+Si)),bu=Math.min(U,Math.floor(R+(q-oe)*di/q+Si));S(_,R,wi,bu,Z)}var hr=_[R],Yi=$,$e=U;for(e(_,$,R),Z(_[U],hr)>0&&e(_,$,U);Yi<$e;){for(e(_,Yi,$e),Yi++,$e--;Z(_[Yi],hr)<0;)Yi++;for(;Z(_[$e],hr)>0;)$e--}Z(_[$],hr)===0?e(_,$,$e):e(_,++$e,U),$e<=R&&($=$e+1),R<=$e&&(U=$e-1)}})(p,f,g||0,P||p.length-1,w||n)}function e(p,f,g){var P=p[f];p[f]=p[g],p[g]=P}function n(p,f){return p<f?-1:p>f?1:0}var i=function(p){p===void 0&&(p=9),this._maxEntries=Math.max(4,p),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function r(p,f,g){if(!g)return f.indexOf(p);for(var P=0;P<f.length;P++)if(g(p,f[P]))return P;return-1}function a(p,f){o(p,0,p.children.length,f,p)}function o(p,f,g,P,w){w||(w=O(null)),w.minX=1/0,w.minY=1/0,w.maxX=-1/0,w.maxY=-1/0;for(var S=f;S<g;S++){var _=p.children[S];s(w,p.leaf?P(_):_)}return w}function s(p,f){return p.minX=Math.min(p.minX,f.minX),p.minY=Math.min(p.minY,f.minY),p.maxX=Math.max(p.maxX,f.maxX),p.maxY=Math.max(p.maxY,f.maxY),p}function l(p,f){return p.minX-f.minX}function c(p,f){return p.minY-f.minY}function u(p){return(p.maxX-p.minX)*(p.maxY-p.minY)}function m(p){return p.maxX-p.minX+(p.maxY-p.minY)}function b(p,f){return p.minX<=f.minX&&p.minY<=f.minY&&f.maxX<=p.maxX&&f.maxY<=p.maxY}function T(p,f){return f.minX<=p.maxX&&f.minY<=p.maxY&&f.maxX>=p.minX&&f.maxY>=p.minY}function O(p){return{children:p,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function N(p,f,g,P,w){for(var S=[f,g];S.length;)if(!((g=S.pop())-(f=S.pop())<=P)){var _=f+Math.ceil((g-f)/P/2)*P;t(p,_,f,g,w),S.push(f,_,_,g)}}return i.prototype.all=function(){return this._all(this.data,[])},i.prototype.search=function(p){var f=this.data,g=[];if(!T(p,f))return g;for(var P=this.toBBox,w=[];f;){for(var S=0;S<f.children.length;S++){var _=f.children[S],R=f.leaf?P(_):_;T(p,R)&&(f.leaf?g.push(_):b(p,R)?this._all(_,g):w.push(_))}f=w.pop()}return g},i.prototype.collides=function(p){var f=this.data;if(!T(p,f))return!1;for(var g=[];f;){for(var P=0;P<f.children.length;P++){var w=f.children[P],S=f.leaf?this.toBBox(w):w;if(T(p,S)){if(f.leaf||b(p,S))return!0;g.push(w)}}f=g.pop()}return!1},i.prototype.load=function(p){if(!p||!p.length)return this;if(p.length<this._minEntries){for(var f=0;f<p.length;f++)this.insert(p[f]);return this}var g=this._build(p.slice(),0,p.length-1,0);if(this.data.children.length)if(this.data.height===g.height)this._splitRoot(this.data,g);else{if(this.data.height<g.height){var P=this.data;this.data=g,g=P}this._insert(g,this.data.height-g.height-1,!0)}else this.data=g;return this},i.prototype.insert=function(p){return p&&this._insert(p,this.data.height-1),this},i.prototype.clear=function(){return this.data=O([]),this},i.prototype.remove=function(p,f){if(!p)return this;for(var g,P,w,S=this.data,_=this.toBBox(p),R=[],$=[];S||R.length;){if(S||(S=R.pop(),P=R[R.length-1],g=$.pop(),w=!0),S.leaf){var U=r(p,S.children,f);if(U!==-1)return S.children.splice(U,1),R.push(S),this._condense(R),this}w||S.leaf||!b(S,_)?P?(g++,S=P.children[g],w=!1):S=null:(R.push(S),$.push(g),g=0,P=S,S=S.children[0])}return this},i.prototype.toBBox=function(p){return p},i.prototype.compareMinX=function(p,f){return p.minX-f.minX},i.prototype.compareMinY=function(p,f){return p.minY-f.minY},i.prototype.toJSON=function(){return this.data},i.prototype.fromJSON=function(p){return this.data=p,this},i.prototype._all=function(p,f){for(var g=[];p;)p.leaf?f.push.apply(f,p.children):g.push.apply(g,p.children),p=g.pop();return f},i.prototype._build=function(p,f,g,P){var w,S=g-f+1,_=this._maxEntries;if(S<=_)return a(w=O(p.slice(f,g+1)),this.toBBox),w;P||(P=Math.ceil(Math.log(S)/Math.log(_)),_=Math.ceil(S/Math.pow(_,P-1))),(w=O([])).leaf=!1,w.height=P;var R=Math.ceil(S/_),$=R*Math.ceil(Math.sqrt(_));N(p,f,g,$,this.compareMinX);for(var U=f;U<=g;U+=$){var Z=Math.min(U+$-1,g);N(p,U,Z,R,this.compareMinY);for(var q=U;q<=Z;q+=R){var oe=Math.min(q+R-1,Z);w.children.push(this._build(p,q,oe,P-1))}}return a(w,this.toBBox),w},i.prototype._chooseSubtree=function(p,f,g,P){for(;P.push(f),!f.leaf&&P.length-1!==g;){for(var w=1/0,S=1/0,_=void 0,R=0;R<f.children.length;R++){var $=f.children[R],U=u($),Z=(q=p,oe=$,(Math.max(oe.maxX,q.maxX)-Math.min(oe.minX,q.minX))*(Math.max(oe.maxY,q.maxY)-Math.min(oe.minY,q.minY))-U);Z<S?(S=Z,w=U<w?U:w,_=$):Z===S&&U<w&&(w=U,_=$)}f=_||f.children[0]}var q,oe;return f},i.prototype._insert=function(p,f,g){var P=g?p:this.toBBox(p),w=[],S=this._chooseSubtree(P,this.data,f,w);for(S.children.push(p),s(S,P);f>=0&&w[f].children.length>this._maxEntries;)this._split(w,f),f--;this._adjustParentBBoxes(P,w,f)},i.prototype._split=function(p,f){var g=p[f],P=g.children.length,w=this._minEntries;this._chooseSplitAxis(g,w,P);var S=this._chooseSplitIndex(g,w,P),_=O(g.children.splice(S,g.children.length-S));_.height=g.height,_.leaf=g.leaf,a(g,this.toBBox),a(_,this.toBBox),f?p[f-1].children.push(_):this._splitRoot(g,_)},i.prototype._splitRoot=function(p,f){this.data=O([p,f]),this.data.height=p.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},i.prototype._chooseSplitIndex=function(p,f,g){for(var P,w,S,_,R,$,U,Z=1/0,q=1/0,oe=f;oe<=g-f;oe++){var qi=o(p,0,oe,this.toBBox),di=o(p,oe,g,this.toBBox),Si=(w=qi,S=di,_=void 0,R=void 0,$=void 0,U=void 0,_=Math.max(w.minX,S.minX),R=Math.max(w.minY,S.minY),$=Math.min(w.maxX,S.maxX),U=Math.min(w.maxY,S.maxY),Math.max(0,$-_)*Math.max(0,U-R)),wi=u(qi)+u(di);Si<Z?(Z=Si,P=oe,q=wi<q?wi:q):Si===Z&&wi<q&&(q=wi,P=oe)}return P||g-f},i.prototype._chooseSplitAxis=function(p,f,g){var P=p.leaf?this.compareMinX:l,w=p.leaf?this.compareMinY:c;this._allDistMargin(p,f,g,P)<this._allDistMargin(p,f,g,w)&&p.children.sort(P)},i.prototype._allDistMargin=function(p,f,g,P){p.children.sort(P);for(var w=this.toBBox,S=o(p,0,f,w),_=o(p,g-f,g,w),R=m(S)+m(_),$=f;$<g-f;$++){var U=p.children[$];s(S,p.leaf?w(U):U),R+=m(S)}for(var Z=g-f-1;Z>=f;Z--){var q=p.children[Z];s(_,p.leaf?w(q):q),R+=m(_)}return R},i.prototype._adjustParentBBoxes=function(p,f,g){for(var P=g;P>=0;P--)s(f[P],p)},i.prototype._condense=function(p){for(var f=p.length-1,g=void 0;f>=0;f--)p[f].children.length===0?f>0?(g=p[f-1].children).splice(g.indexOf(p[f]),1):this.clear():a(p[f],this.toBBox)},i})});var ll={showDelay:0,hideDelay:0,touchendHideDelay:0,disableTooltipInteractivity:!0},Rm={showDelay:400,hideDelay:0,touchendHideDelay:0,disableTooltipInteractivity:!0};var cl=(()=>{let e=class e extends ti{constructor(i,r){super(i),this.pathService=r}getUploadedFiles(){return this.http.get(`${this.pathService.companyBasePath}/user-files`)}deleteFile(i){return this.http.delete(`${this.apiUrl}/user-files/${i}`)}processFile(i){return this.http.get(`${this.apiUrl}/user-files/${i}/process`)}downloadFile(i){return this.http.get(`${this.apiUrl}/user-files/${i}`,{responseType:"blob"})}exportFile(i){return this.http.post(`${this.apiUrl}/path-plans-export`,i)}downloadExportFile(i){return this.http.get(`${this.apiUrl}/path-plans-export/${i}/file`,{responseType:"blob",observe:"response"}).pipe(Yt(r=>{let a=r.headers.get("Content-Disposition"),o=this.extractFilenameFromHeader(a);return{blob:r.body,filename:o}}))}extractFilenameFromHeader(i){let r=i.match(/filename=([^;]+)/);return r&&r.length>1?r[1]:"download.zip"}getFileName(i){return this.http.get(`${this.apiUrl}/path-plans-export/${i}/file-name`)}};e.\u0275fac=function(r){return new(r||e)(M(Xt),M(cs))},e.\u0275prov=j({token:e,factory:e.\u0275fac});let t=e;return t})();var Sa=gr(ul());var pl=(()=>{let e=class e extends ti{constructor(i,r){super(i),this.userService=r}fileUpload(i){return this.http.post(`${this.apiUrl}/companies/${this.userService.companyId}/user-files/file-upload`,i)}upload(i,r){return this.http.post(`${this.apiUrl}/${r}`,i,{reportProgress:!0,observe:"events"}).pipe(Yt(a=>{switch(a.type){case fa.UploadProgress:return{status:"progress",message:Math.round(100*a.loaded/a.total)};case fa.Response:return a.body;default:return`Unhandled event: ${a.type}`}}))}saveAsLocalFile(i,r,a=null){Nr.isString(r)?(0,Sa.saveAs)(new Blob([r],{type:a||"text/plain"}),this.sanitizeFilename(i)):(0,Sa.saveAs)(new Blob([r],{type:a||"application/octet-stream"}),this.sanitizeFilename(i))}timeFormat(){return new Intl.DateTimeFormat("en-US",{year:"numeric",month:"2-digit",day:"2-digit"}).format(new Date).split("/").join("")}sanitizeFilename(i,r=255){let a=i.replace(/\s+/g,"_");return a=a.replace(/[^\w\d-._]/g,""),a.length>r&&(a=a.substring(0,r)),a}};e.\u0275fac=function(r){return new(r||e)(M(Xt),M(Oe))},e.\u0275prov=j({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var dl=()=>{},Va={},Bl={},Rl=null,jl={mark:dl,measure:dl};try{typeof window<"u"&&(Va=window),typeof document<"u"&&(Bl=document),typeof MutationObserver<"u"&&(Rl=MutationObserver),typeof performance<"u"&&(jl=performance)}catch{}var{userAgent:fl=""}=Va.navigator||{},oi=Va,J=Bl,ml=Rl,Jr=jl,Wm=!!oi.document,Ht=!!J.documentElement&&!!J.head&&typeof J.addEventListener=="function"&&typeof J.createElement=="function",$l=~fl.indexOf("MSIE")||~fl.indexOf("Trident/"),Q="classic",Nl="duotone",Le="sharp",Fe="sharp-duotone",wu=[Q,Nl,Le,Fe],Cu={classic:{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},sharp:{900:"fass",400:"fasr",300:"fasl",100:"fast"},"sharp-duotone":{900:"fasds"}},hl={kit:{fak:"kit","fa-kit":"kit"},"kit-duotone":{fakd:"kit-duotone","fa-kit-duotone":"kit-duotone"}},Mu=["kit"],Iu=/fa(s|r|l|t|d|b|k|kd|ss|sr|sl|st|sds)?[\-\ ]/,Eu=/Font ?Awesome ?([56 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp Duotone|Sharp|Kit)?.*/i,Tu={"Font Awesome 5 Free":{900:"fas",400:"far"},"Font Awesome 5 Pro":{900:"fas",400:"far",normal:"far",300:"fal"},"Font Awesome 5 Brands":{400:"fab",normal:"fab"},"Font Awesome 5 Duotone":{900:"fad"}},_u={"Font Awesome 6 Free":{900:"fas",400:"far"},"Font Awesome 6 Pro":{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},"Font Awesome 6 Brands":{400:"fab",normal:"fab"},"Font Awesome 6 Duotone":{900:"fad"},"Font Awesome 6 Sharp":{900:"fass",400:"fasr",normal:"fasr",300:"fasl",100:"fast"},"Font Awesome 6 Sharp Duotone":{900:"fasds"}},ku={classic:{"fa-brands":"fab","fa-duotone":"fad","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"},sharp:{"fa-solid":"fass","fa-regular":"fasr","fa-light":"fasl","fa-thin":"fast"},"sharp-duotone":{"fa-solid":"fasds"}},Lu={classic:["fas","far","fal","fat"],sharp:["fass","fasr","fasl","fast"],"sharp-duotone":["fasds"]},Fu={classic:{fab:"fa-brands",fad:"fa-duotone",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"},sharp:{fass:"fa-solid",fasr:"fa-regular",fasl:"fa-light",fast:"fa-thin"},"sharp-duotone":{fasds:"fa-solid"}},Au={classic:{solid:"fas",regular:"far",light:"fal",thin:"fat",duotone:"fad",brands:"fab"},sharp:{solid:"fass",regular:"fasr",light:"fasl",thin:"fast"},"sharp-duotone":{solid:"fasds"}},Gl={classic:{fa:"solid",fas:"solid","fa-solid":"solid",far:"regular","fa-regular":"regular",fal:"light","fa-light":"light",fat:"thin","fa-thin":"thin",fad:"duotone","fa-duotone":"duotone",fab:"brands","fa-brands":"brands"},sharp:{fa:"solid",fass:"solid","fa-solid":"solid",fasr:"regular","fa-regular":"regular",fasl:"light","fa-light":"light",fast:"thin","fa-thin":"thin"},"sharp-duotone":{fa:"solid",fasds:"solid","fa-solid":"solid"}},Du=["solid","regular","light","thin","duotone","brands"],Ul=[1,2,3,4,5,6,7,8,9,10],Ou=Ul.concat([11,12,13,14,15,16,17,18,19,20]),Ki={GROUP:"duotone-group",SWAP_OPACITY:"swap-opacity",PRIMARY:"primary",SECONDARY:"secondary"},Bu=[...Object.keys(Lu),...Du,"2xs","xs","sm","lg","xl","2xl","beat","border","fade","beat-fade","bounce","flip-both","flip-horizontal","flip-vertical","flip","fw","inverse","layers-counter","layers-text","layers","li","pull-left","pull-right","pulse","rotate-180","rotate-270","rotate-90","rotate-by","shake","spin-pulse","spin-reverse","spin","stack-1x","stack-2x","stack","ul",Ki.GROUP,Ki.SWAP_OPACITY,Ki.PRIMARY,Ki.SECONDARY].concat(Ul.map(t=>"".concat(t,"x"))).concat(Ou.map(t=>"w-".concat(t))),Ru={"Font Awesome Kit":{400:"fak",normal:"fak"},"Font Awesome Kit Duotone":{400:"fakd",normal:"fakd"}},ju={kit:{"fa-kit":"fak"},"kit-duotone":{"fa-kit-duotone":"fakd"}},$u={kit:{fak:"fa-kit"},"kit-duotone":{fakd:"fa-kit-duotone"}},gl={kit:{kit:"fak"},"kit-duotone":{"kit-duotone":"fakd"}},Vt="___FONT_AWESOME___",Ta=16,Vl="fa",zl="svg-inline--fa",gi="data-fa-i2svg",_a="data-fa-pseudo-element",Nu="data-fa-pseudo-element-pending",za="data-prefix",Ha="data-icon",vl="fontawesome-i2svg",Gu="async",Uu=["HTML","HEAD","STYLE","SCRIPT"],Hl=(()=>{try{return!0}catch{return!1}})(),Wl=[Q,Le,Fe];function rr(t){return new Proxy(t,{get(e,n){return n in e?e[n]:e[Q]}})}var ql=I({},Gl);ql[Q]=I(I(I({},Gl[Q]),hl.kit),hl["kit-duotone"]);var mi=rr(ql),ka=I({},Au);ka[Q]=I(I(I({},ka[Q]),gl.kit),gl["kit-duotone"]);var tr=rr(ka),La=I({},Fu);La[Q]=I(I({},La[Q]),$u.kit);var hi=rr(La),Fa=I({},ku);Fa[Q]=I(I({},Fa[Q]),ju.kit);var Vu=rr(Fa),zu=Iu,Yl="fa-layers-text",Hu=Eu,Wu=I({},Cu),qm=rr(Wu),qu=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],wa=Ki,ji=new Set;Object.keys(tr[Q]).map(ji.add.bind(ji));Object.keys(tr[Le]).map(ji.add.bind(ji));Object.keys(tr[Fe]).map(ji.add.bind(ji));var Yu=[...Mu,...Bu],Zi=oi.FontAwesomeConfig||{};function Xu(t){var e=J.querySelector("script["+t+"]");if(e)return e.getAttribute(t)}function Ju(t){return t===""?!0:t==="false"?!1:t==="true"?!0:t}J&&typeof J.querySelector=="function"&&[["data-family-prefix","familyPrefix"],["data-css-prefix","cssPrefix"],["data-family-default","familyDefault"],["data-style-default","styleDefault"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-auto-a11y","autoA11y"],["data-search-pseudo-elements","searchPseudoElements"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]].forEach(e=>{let[n,i]=e,r=Ju(Xu(n));r!=null&&(Zi[i]=r)});var Xl={styleDefault:"solid",familyDefault:"classic",cssPrefix:Vl,replacementClass:zl,autoReplaceSvg:!0,autoAddCss:!0,autoA11y:!0,searchPseudoElements:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0};Zi.familyPrefix&&(Zi.cssPrefix=Zi.familyPrefix);var $i=I(I({},Xl),Zi);$i.autoReplaceSvg||($i.observeMutations=!1);var A={};Object.keys(Xl).forEach(t=>{Object.defineProperty(A,t,{enumerable:!0,set:function(e){$i[t]=e,er.forEach(n=>n(A))},get:function(){return $i[t]}})});Object.defineProperty(A,"familyPrefix",{enumerable:!0,set:function(t){$i.cssPrefix=t,er.forEach(e=>e(A))},get:function(){return $i.cssPrefix}});oi.FontAwesomeConfig=A;var er=[];function Ku(t){return er.push(t),()=>{er.splice(er.indexOf(t),1)}}var ni=Ta,Bt={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function Qu(t){if(!t||!Ht)return;let e=J.createElement("style");e.setAttribute("type","text/css"),e.innerHTML=t;let n=J.head.childNodes,i=null;for(let r=n.length-1;r>-1;r--){let a=n[r],o=(a.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(o)>-1&&(i=a)}return J.head.insertBefore(e,i),t}var Zu="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function ir(){let t=12,e="";for(;t-- >0;)e+=Zu[Math.random()*62|0];return e}function Ni(t){let e=[];for(let n=(t||[]).length>>>0;n--;)e[n]=t[n];return e}function Wa(t){return t.classList?Ni(t.classList):(t.getAttribute("class")||"").split(" ").filter(e=>e)}function Jl(t){return"".concat(t).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function ep(t){return Object.keys(t||{}).reduce((e,n)=>e+"".concat(n,'="').concat(Jl(t[n]),'" '),"").trim()}function tn(t){return Object.keys(t||{}).reduce((e,n)=>e+"".concat(n,": ").concat(t[n].trim(),";"),"")}function qa(t){return t.size!==Bt.size||t.x!==Bt.x||t.y!==Bt.y||t.rotate!==Bt.rotate||t.flipX||t.flipY}function tp(t){let{transform:e,containerWidth:n,iconWidth:i}=t,r={transform:"translate(".concat(n/2," 256)")},a="translate(".concat(e.x*32,", ").concat(e.y*32,") "),o="scale(".concat(e.size/16*(e.flipX?-1:1),", ").concat(e.size/16*(e.flipY?-1:1),") "),s="rotate(".concat(e.rotate," 0 0)"),l={transform:"".concat(a," ").concat(o," ").concat(s)},c={transform:"translate(".concat(i/2*-1," -256)")};return{outer:r,inner:l,path:c}}function ip(t){let{transform:e,width:n=Ta,height:i=Ta,startCentered:r=!1}=t,a="";return r&&$l?a+="translate(".concat(e.x/ni-n/2,"em, ").concat(e.y/ni-i/2,"em) "):r?a+="translate(calc(-50% + ".concat(e.x/ni,"em), calc(-50% + ").concat(e.y/ni,"em)) "):a+="translate(".concat(e.x/ni,"em, ").concat(e.y/ni,"em) "),a+="scale(".concat(e.size/ni*(e.flipX?-1:1),", ").concat(e.size/ni*(e.flipY?-1:1),") "),a+="rotate(".concat(e.rotate,"deg) "),a}var rp=`:root, :host {
  --fa-font-solid: normal 900 1em/1 "Font Awesome 6 Free";
  --fa-font-regular: normal 400 1em/1 "Font Awesome 6 Free";
  --fa-font-light: normal 300 1em/1 "Font Awesome 6 Pro";
  --fa-font-thin: normal 100 1em/1 "Font Awesome 6 Pro";
  --fa-font-duotone: normal 900 1em/1 "Font Awesome 6 Duotone";
  --fa-font-brands: normal 400 1em/1 "Font Awesome 6 Brands";
  --fa-font-sharp-solid: normal 900 1em/1 "Font Awesome 6 Sharp";
  --fa-font-sharp-regular: normal 400 1em/1 "Font Awesome 6 Sharp";
  --fa-font-sharp-light: normal 300 1em/1 "Font Awesome 6 Sharp";
  --fa-font-sharp-thin: normal 100 1em/1 "Font Awesome 6 Sharp";
  --fa-font-sharp-duotone-solid: normal 900 1em/1 "Font Awesome 6 Sharp Duotone";
}

svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
  overflow: visible;
  box-sizing: content-box;
}

.svg-inline--fa {
  display: var(--fa-display, inline-block);
  height: 1em;
  overflow: visible;
  vertical-align: -0.125em;
}
.svg-inline--fa.fa-2xs {
  vertical-align: 0.1em;
}
.svg-inline--fa.fa-xs {
  vertical-align: 0em;
}
.svg-inline--fa.fa-sm {
  vertical-align: -0.0714285705em;
}
.svg-inline--fa.fa-lg {
  vertical-align: -0.2em;
}
.svg-inline--fa.fa-xl {
  vertical-align: -0.25em;
}
.svg-inline--fa.fa-2xl {
  vertical-align: -0.3125em;
}
.svg-inline--fa.fa-pull-left {
  margin-right: var(--fa-pull-margin, 0.3em);
  width: auto;
}
.svg-inline--fa.fa-pull-right {
  margin-left: var(--fa-pull-margin, 0.3em);
  width: auto;
}
.svg-inline--fa.fa-li {
  width: var(--fa-li-width, 2em);
  top: 0.25em;
}
.svg-inline--fa.fa-fw {
  width: var(--fa-fw-width, 1.25em);
}

.fa-layers svg.svg-inline--fa {
  bottom: 0;
  left: 0;
  margin: auto;
  position: absolute;
  right: 0;
  top: 0;
}

.fa-layers-counter, .fa-layers-text {
  display: inline-block;
  position: absolute;
  text-align: center;
}

.fa-layers {
  display: inline-block;
  height: 1em;
  position: relative;
  text-align: center;
  vertical-align: -0.125em;
  width: 1em;
}
.fa-layers svg.svg-inline--fa {
  transform-origin: center center;
}

.fa-layers-text {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  transform-origin: center center;
}

.fa-layers-counter {
  background-color: var(--fa-counter-background-color, #ff253a);
  border-radius: var(--fa-counter-border-radius, 1em);
  box-sizing: border-box;
  color: var(--fa-inverse, #fff);
  line-height: var(--fa-counter-line-height, 1);
  max-width: var(--fa-counter-max-width, 5em);
  min-width: var(--fa-counter-min-width, 1.5em);
  overflow: hidden;
  padding: var(--fa-counter-padding, 0.25em 0.5em);
  right: var(--fa-right, 0);
  text-overflow: ellipsis;
  top: var(--fa-top, 0);
  transform: scale(var(--fa-counter-scale, 0.25));
  transform-origin: top right;
}

.fa-layers-bottom-right {
  bottom: var(--fa-bottom, 0);
  right: var(--fa-right, 0);
  top: auto;
  transform: scale(var(--fa-layers-scale, 0.25));
  transform-origin: bottom right;
}

.fa-layers-bottom-left {
  bottom: var(--fa-bottom, 0);
  left: var(--fa-left, 0);
  right: auto;
  top: auto;
  transform: scale(var(--fa-layers-scale, 0.25));
  transform-origin: bottom left;
}

.fa-layers-top-right {
  top: var(--fa-top, 0);
  right: var(--fa-right, 0);
  transform: scale(var(--fa-layers-scale, 0.25));
  transform-origin: top right;
}

.fa-layers-top-left {
  left: var(--fa-left, 0);
  right: auto;
  top: var(--fa-top, 0);
  transform: scale(var(--fa-layers-scale, 0.25));
  transform-origin: top left;
}

.fa-1x {
  font-size: 1em;
}

.fa-2x {
  font-size: 2em;
}

.fa-3x {
  font-size: 3em;
}

.fa-4x {
  font-size: 4em;
}

.fa-5x {
  font-size: 5em;
}

.fa-6x {
  font-size: 6em;
}

.fa-7x {
  font-size: 7em;
}

.fa-8x {
  font-size: 8em;
}

.fa-9x {
  font-size: 9em;
}

.fa-10x {
  font-size: 10em;
}

.fa-2xs {
  font-size: 0.625em;
  line-height: 0.1em;
  vertical-align: 0.225em;
}

.fa-xs {
  font-size: 0.75em;
  line-height: 0.0833333337em;
  vertical-align: 0.125em;
}

.fa-sm {
  font-size: 0.875em;
  line-height: 0.0714285718em;
  vertical-align: 0.0535714295em;
}

.fa-lg {
  font-size: 1.25em;
  line-height: 0.05em;
  vertical-align: -0.075em;
}

.fa-xl {
  font-size: 1.5em;
  line-height: 0.0416666682em;
  vertical-align: -0.125em;
}

.fa-2xl {
  font-size: 2em;
  line-height: 0.03125em;
  vertical-align: -0.1875em;
}

.fa-fw {
  text-align: center;
  width: 1.25em;
}

.fa-ul {
  list-style-type: none;
  margin-left: var(--fa-li-margin, 2.5em);
  padding-left: 0;
}
.fa-ul > li {
  position: relative;
}

.fa-li {
  left: calc(-1 * var(--fa-li-width, 2em));
  position: absolute;
  text-align: center;
  width: var(--fa-li-width, 2em);
  line-height: inherit;
}

.fa-border {
  border-color: var(--fa-border-color, #eee);
  border-radius: var(--fa-border-radius, 0.1em);
  border-style: var(--fa-border-style, solid);
  border-width: var(--fa-border-width, 0.08em);
  padding: var(--fa-border-padding, 0.2em 0.25em 0.15em);
}

.fa-pull-left {
  float: left;
  margin-right: var(--fa-pull-margin, 0.3em);
}

.fa-pull-right {
  float: right;
  margin-left: var(--fa-pull-margin, 0.3em);
}

.fa-beat {
  animation-name: fa-beat;
  animation-delay: var(--fa-animation-delay, 0s);
  animation-direction: var(--fa-animation-direction, normal);
  animation-duration: var(--fa-animation-duration, 1s);
  animation-iteration-count: var(--fa-animation-iteration-count, infinite);
  animation-timing-function: var(--fa-animation-timing, ease-in-out);
}

.fa-bounce {
  animation-name: fa-bounce;
  animation-delay: var(--fa-animation-delay, 0s);
  animation-direction: var(--fa-animation-direction, normal);
  animation-duration: var(--fa-animation-duration, 1s);
  animation-iteration-count: var(--fa-animation-iteration-count, infinite);
  animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));
}

.fa-fade {
  animation-name: fa-fade;
  animation-delay: var(--fa-animation-delay, 0s);
  animation-direction: var(--fa-animation-direction, normal);
  animation-duration: var(--fa-animation-duration, 1s);
  animation-iteration-count: var(--fa-animation-iteration-count, infinite);
  animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));
}

.fa-beat-fade {
  animation-name: fa-beat-fade;
  animation-delay: var(--fa-animation-delay, 0s);
  animation-direction: var(--fa-animation-direction, normal);
  animation-duration: var(--fa-animation-duration, 1s);
  animation-iteration-count: var(--fa-animation-iteration-count, infinite);
  animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));
}

.fa-flip {
  animation-name: fa-flip;
  animation-delay: var(--fa-animation-delay, 0s);
  animation-direction: var(--fa-animation-direction, normal);
  animation-duration: var(--fa-animation-duration, 1s);
  animation-iteration-count: var(--fa-animation-iteration-count, infinite);
  animation-timing-function: var(--fa-animation-timing, ease-in-out);
}

.fa-shake {
  animation-name: fa-shake;
  animation-delay: var(--fa-animation-delay, 0s);
  animation-direction: var(--fa-animation-direction, normal);
  animation-duration: var(--fa-animation-duration, 1s);
  animation-iteration-count: var(--fa-animation-iteration-count, infinite);
  animation-timing-function: var(--fa-animation-timing, linear);
}

.fa-spin {
  animation-name: fa-spin;
  animation-delay: var(--fa-animation-delay, 0s);
  animation-direction: var(--fa-animation-direction, normal);
  animation-duration: var(--fa-animation-duration, 2s);
  animation-iteration-count: var(--fa-animation-iteration-count, infinite);
  animation-timing-function: var(--fa-animation-timing, linear);
}

.fa-spin-reverse {
  --fa-animation-direction: reverse;
}

.fa-pulse,
.fa-spin-pulse {
  animation-name: fa-spin;
  animation-direction: var(--fa-animation-direction, normal);
  animation-duration: var(--fa-animation-duration, 1s);
  animation-iteration-count: var(--fa-animation-iteration-count, infinite);
  animation-timing-function: var(--fa-animation-timing, steps(8));
}

@media (prefers-reduced-motion: reduce) {
  .fa-beat,
.fa-bounce,
.fa-fade,
.fa-beat-fade,
.fa-flip,
.fa-pulse,
.fa-shake,
.fa-spin,
.fa-spin-pulse {
    animation-delay: -1ms;
    animation-duration: 1ms;
    animation-iteration-count: 1;
    transition-delay: 0s;
    transition-duration: 0s;
  }
}
@keyframes fa-beat {
  0%, 90% {
    transform: scale(1);
  }
  45% {
    transform: scale(var(--fa-beat-scale, 1.25));
  }
}
@keyframes fa-bounce {
  0% {
    transform: scale(1, 1) translateY(0);
  }
  10% {
    transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);
  }
  30% {
    transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));
  }
  50% {
    transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);
  }
  57% {
    transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));
  }
  64% {
    transform: scale(1, 1) translateY(0);
  }
  100% {
    transform: scale(1, 1) translateY(0);
  }
}
@keyframes fa-fade {
  50% {
    opacity: var(--fa-fade-opacity, 0.4);
  }
}
@keyframes fa-beat-fade {
  0%, 100% {
    opacity: var(--fa-beat-fade-opacity, 0.4);
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(var(--fa-beat-fade-scale, 1.125));
  }
}
@keyframes fa-flip {
  50% {
    transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));
  }
}
@keyframes fa-shake {
  0% {
    transform: rotate(-15deg);
  }
  4% {
    transform: rotate(15deg);
  }
  8%, 24% {
    transform: rotate(-18deg);
  }
  12%, 28% {
    transform: rotate(18deg);
  }
  16% {
    transform: rotate(-22deg);
  }
  20% {
    transform: rotate(22deg);
  }
  32% {
    transform: rotate(-12deg);
  }
  36% {
    transform: rotate(12deg);
  }
  40%, 100% {
    transform: rotate(0deg);
  }
}
@keyframes fa-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
.fa-rotate-90 {
  transform: rotate(90deg);
}

.fa-rotate-180 {
  transform: rotate(180deg);
}

.fa-rotate-270 {
  transform: rotate(270deg);
}

.fa-flip-horizontal {
  transform: scale(-1, 1);
}

.fa-flip-vertical {
  transform: scale(1, -1);
}

.fa-flip-both,
.fa-flip-horizontal.fa-flip-vertical {
  transform: scale(-1, -1);
}

.fa-rotate-by {
  transform: rotate(var(--fa-rotate-angle, 0));
}

.fa-stack {
  display: inline-block;
  vertical-align: middle;
  height: 2em;
  position: relative;
  width: 2.5em;
}

.fa-stack-1x,
.fa-stack-2x {
  bottom: 0;
  left: 0;
  margin: auto;
  position: absolute;
  right: 0;
  top: 0;
  z-index: var(--fa-stack-z-index, auto);
}

.svg-inline--fa.fa-stack-1x {
  height: 1em;
  width: 1.25em;
}
.svg-inline--fa.fa-stack-2x {
  height: 2em;
  width: 2.5em;
}

.fa-inverse {
  color: var(--fa-inverse, #fff);
}

.sr-only,
.fa-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.sr-only-focusable:not(:focus),
.fa-sr-only-focusable:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.svg-inline--fa .fa-primary {
  fill: var(--fa-primary-color, currentColor);
  opacity: var(--fa-primary-opacity, 1);
}

.svg-inline--fa .fa-secondary {
  fill: var(--fa-secondary-color, currentColor);
  opacity: var(--fa-secondary-opacity, 0.4);
}

.svg-inline--fa.fa-swap-opacity .fa-primary {
  opacity: var(--fa-secondary-opacity, 0.4);
}

.svg-inline--fa.fa-swap-opacity .fa-secondary {
  opacity: var(--fa-primary-opacity, 1);
}

.svg-inline--fa mask .fa-primary,
.svg-inline--fa mask .fa-secondary {
  fill: black;
}

.fad.fa-inverse,
.fa-duotone.fa-inverse {
  color: var(--fa-inverse, #fff);
}`;function Kl(){let t=Vl,e=zl,n=A.cssPrefix,i=A.replacementClass,r=rp;if(n!==t||i!==e){let a=new RegExp("\\.".concat(t,"\\-"),"g"),o=new RegExp("\\--".concat(t,"\\-"),"g"),s=new RegExp("\\.".concat(e),"g");r=r.replace(a,".".concat(n,"-")).replace(o,"--".concat(n,"-")).replace(s,".".concat(i))}return r}var yl=!1;function Ca(){A.autoAddCss&&!yl&&(Qu(Kl()),yl=!0)}var np={mixout(){return{dom:{css:Kl,insertCss:Ca}}},hooks(){return{beforeDOMElementCreation(){Ca()},beforeI2svg(){Ca()}}}},zt=oi||{};zt[Vt]||(zt[Vt]={});zt[Vt].styles||(zt[Vt].styles={});zt[Vt].hooks||(zt[Vt].hooks={});zt[Vt].shims||(zt[Vt].shims=[]);var Rt=zt[Vt],Ql=[],Zl=function(){J.removeEventListener("DOMContentLoaded",Zl),Zr=1,Ql.map(t=>t())},Zr=!1;Ht&&(Zr=(J.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(J.readyState),Zr||J.addEventListener("DOMContentLoaded",Zl));function ap(t){Ht&&(Zr?setTimeout(t,0):Ql.push(t))}function nr(t){let{tag:e,attributes:n={},children:i=[]}=t;return typeof t=="string"?Jl(t):"<".concat(e," ").concat(ep(n),">").concat(i.map(nr).join(""),"</").concat(e,">")}function bl(t,e,n){if(t&&t[e]&&t[e][n])return{prefix:e,iconName:n,icon:t[e][n]}}var op=function(e,n){return function(i,r,a,o){return e.call(n,i,r,a,o)}},Ma=function(e,n,i,r){var a=Object.keys(e),o=a.length,s=r!==void 0?op(n,r):n,l,c,u;for(i===void 0?(l=1,u=e[a[0]]):(l=0,u=i);l<o;l++)c=a[l],u=s(u,e[c],c,e);return u};function sp(t){let e=[],n=0,i=t.length;for(;n<i;){let r=t.charCodeAt(n++);if(r>=55296&&r<=56319&&n<i){let a=t.charCodeAt(n++);(a&64512)==56320?e.push(((r&1023)<<10)+(a&1023)+65536):(e.push(r),n--)}else e.push(r)}return e}function Aa(t){let e=sp(t);return e.length===1?e[0].toString(16):null}function lp(t,e){let n=t.length,i=t.charCodeAt(e),r;return i>=55296&&i<=56319&&n>e+1&&(r=t.charCodeAt(e+1),r>=56320&&r<=57343)?(i-55296)*1024+r-56320+65536:i}function xl(t){return Object.keys(t).reduce((e,n)=>{let i=t[n];return!!i.icon?e[i.iconName]=i.icon:e[n]=i,e},{})}function Da(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{skipHooks:i=!1}=n,r=xl(e);typeof Rt.hooks.addPack=="function"&&!i?Rt.hooks.addPack(t,xl(e)):Rt.styles[t]=I(I({},Rt.styles[t]||{}),r),t==="fas"&&Da("fa",e)}var{styles:fi,shims:cp}=Rt,up={[Q]:Object.values(hi[Q]),[Le]:Object.values(hi[Le]),[Fe]:Object.values(hi[Fe])},Ya=null,ec={},tc={},ic={},rc={},nc={},pp={[Q]:Object.keys(mi[Q]),[Le]:Object.keys(mi[Le]),[Fe]:Object.keys(mi[Fe])};function dp(t){return~Yu.indexOf(t)}function fp(t,e){let n=e.split("-"),i=n[0],r=n.slice(1).join("-");return i===t&&r!==""&&!dp(r)?r:null}var ac=()=>{let t=i=>Ma(fi,(r,a,o)=>(r[o]=Ma(a,i,{}),r),{});ec=t((i,r,a)=>(r[3]&&(i[r[3]]=a),r[2]&&r[2].filter(s=>typeof s=="number").forEach(s=>{i[s.toString(16)]=a}),i)),tc=t((i,r,a)=>(i[a]=a,r[2]&&r[2].filter(s=>typeof s=="string").forEach(s=>{i[s]=a}),i)),nc=t((i,r,a)=>{let o=r[2];return i[a]=a,o.forEach(s=>{i[s]=a}),i});let e="far"in fi||A.autoFetchSvg,n=Ma(cp,(i,r)=>{let a=r[0],o=r[1],s=r[2];return o==="far"&&!e&&(o="fas"),typeof a=="string"&&(i.names[a]={prefix:o,iconName:s}),typeof a=="number"&&(i.unicodes[a.toString(16)]={prefix:o,iconName:s}),i},{names:{},unicodes:{}});ic=n.names,rc=n.unicodes,Ya=rn(A.styleDefault,{family:A.familyDefault})};Ku(t=>{Ya=rn(t.styleDefault,{family:A.familyDefault})});ac();function Xa(t,e){return(ec[t]||{})[e]}function mp(t,e){return(tc[t]||{})[e]}function ai(t,e){return(nc[t]||{})[e]}function oc(t){return ic[t]||{prefix:null,iconName:null}}function hp(t){let e=rc[t],n=Xa("fas",t);return e||(n?{prefix:"fas",iconName:n}:null)||{prefix:null,iconName:null}}function si(){return Ya}var Ja=()=>({prefix:null,iconName:null,rest:[]});function rn(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{family:n=Q}=e,i=mi[n][t],r=tr[n][t]||tr[n][i],a=t in Rt.styles?t:null;return r||a||null}var gp={[Q]:Object.keys(hi[Q]),[Le]:Object.keys(hi[Le]),[Fe]:Object.keys(hi[Fe])};function nn(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{skipLookups:n=!1}=e,i={[Q]:"".concat(A.cssPrefix,"-").concat(Q),[Le]:"".concat(A.cssPrefix,"-").concat(Le),[Fe]:"".concat(A.cssPrefix,"-").concat(Fe)},r=null,a=Q,o=wu.filter(l=>l!==Nl);o.forEach(l=>{(t.includes(i[l])||t.some(c=>gp[l].includes(c)))&&(a=l)});let s=t.reduce((l,c)=>{let u=fp(A.cssPrefix,c);if(fi[c]?(c=up[a].includes(c)?Vu[a][c]:c,r=c,l.prefix=c):pp[a].indexOf(c)>-1?(r=c,l.prefix=rn(c,{family:a})):u?l.iconName=u:c!==A.replacementClass&&!o.some(m=>c===i[m])&&l.rest.push(c),!n&&l.prefix&&l.iconName){let m=r==="fa"?oc(l.iconName):{},b=ai(l.prefix,l.iconName);m.prefix&&(r=null),l.iconName=m.iconName||b||l.iconName,l.prefix=m.prefix||l.prefix,l.prefix==="far"&&!fi.far&&fi.fas&&!A.autoFetchSvg&&(l.prefix="fas")}return l},Ja());return(t.includes("fa-brands")||t.includes("fab"))&&(s.prefix="fab"),(t.includes("fa-duotone")||t.includes("fad"))&&(s.prefix="fad"),!s.prefix&&a===Le&&(fi.fass||A.autoFetchSvg)&&(s.prefix="fass",s.iconName=ai(s.prefix,s.iconName)||s.iconName),!s.prefix&&a===Fe&&(fi.fasds||A.autoFetchSvg)&&(s.prefix="fasds",s.iconName=ai(s.prefix,s.iconName)||s.iconName),(s.prefix==="fa"||r==="fa")&&(s.prefix=si()||"fas"),s}var Oa=class{constructor(){this.definitions={}}add(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];let r=n.reduce(this._pullDefinitions,{});Object.keys(r).forEach(a=>{this.definitions[a]=I(I({},this.definitions[a]||{}),r[a]),Da(a,r[a]);let o=hi[Q][a];o&&Da(o,r[a]),ac()})}reset(){this.definitions={}}_pullDefinitions(e,n){let i=n.prefix&&n.iconName&&n.icon?{0:n}:n;return Object.keys(i).map(r=>{let{prefix:a,iconName:o,icon:s}=i[r],l=s[2];e[a]||(e[a]={}),l.length>0&&l.forEach(c=>{typeof c=="string"&&(e[a][c]=s)}),e[a][o]=s}),e}},Pl=[],Bi={},Ri={},vp=Object.keys(Ri);function yp(t,e){let{mixoutsTo:n}=e;return Pl=t,Bi={},Object.keys(Ri).forEach(i=>{vp.indexOf(i)===-1&&delete Ri[i]}),Pl.forEach(i=>{let r=i.mixout?i.mixout():{};if(Object.keys(r).forEach(a=>{typeof r[a]=="function"&&(n[a]=r[a]),typeof r[a]=="object"&&Object.keys(r[a]).forEach(o=>{n[a]||(n[a]={}),n[a][o]=r[a][o]})}),i.hooks){let a=i.hooks();Object.keys(a).forEach(o=>{Bi[o]||(Bi[o]=[]),Bi[o].push(a[o])})}i.provides&&i.provides(Ri)}),n}function Ba(t,e){for(var n=arguments.length,i=new Array(n>2?n-2:0),r=2;r<n;r++)i[r-2]=arguments[r];return(Bi[t]||[]).forEach(o=>{e=o.apply(null,[e,...i])}),e}function vi(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];(Bi[t]||[]).forEach(a=>{a.apply(null,n)})}function li(){let t=arguments[0],e=Array.prototype.slice.call(arguments,1);return Ri[t]?Ri[t].apply(null,e):void 0}function Ra(t){t.prefix==="fa"&&(t.prefix="fas");let{iconName:e}=t,n=t.prefix||si();if(e)return e=ai(n,e)||e,bl(sc.definitions,n,e)||bl(Rt.styles,n,e)}var sc=new Oa,bp=()=>{A.autoReplaceSvg=!1,A.observeMutations=!1,vi("noAuto")},xp={i2svg:function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Ht?(vi("beforeI2svg",t),li("pseudoElements2svg",t),li("i2svg",t)):Promise.reject(new Error("Operation requires a DOM of some kind."))},watch:function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{autoReplaceSvgRoot:e}=t;A.autoReplaceSvg===!1&&(A.autoReplaceSvg=!0),A.observeMutations=!0,ap(()=>{Sp({autoReplaceSvgRoot:e}),vi("watch",t)})}},Pp={icon:t=>{if(t===null)return null;if(typeof t=="object"&&t.prefix&&t.iconName)return{prefix:t.prefix,iconName:ai(t.prefix,t.iconName)||t.iconName};if(Array.isArray(t)&&t.length===2){let e=t[1].indexOf("fa-")===0?t[1].slice(3):t[1],n=rn(t[0]);return{prefix:n,iconName:ai(n,e)||e}}if(typeof t=="string"&&(t.indexOf("".concat(A.cssPrefix,"-"))>-1||t.match(zu))){let e=nn(t.split(" "),{skipLookups:!0});return{prefix:e.prefix||si(),iconName:ai(e.prefix,e.iconName)||e.iconName}}if(typeof t=="string"){let e=si();return{prefix:e,iconName:ai(e,t)||t}}}},Ae={noAuto:bp,config:A,dom:xp,parse:Pp,library:sc,findIconDefinition:Ra,toHtml:nr},Sp=function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{autoReplaceSvgRoot:e=J}=t;(Object.keys(Rt.styles).length>0||A.autoFetchSvg)&&Ht&&A.autoReplaceSvg&&Ae.dom.i2svg({node:e})};function an(t,e){return Object.defineProperty(t,"abstract",{get:e}),Object.defineProperty(t,"html",{get:function(){return t.abstract.map(n=>nr(n))}}),Object.defineProperty(t,"node",{get:function(){if(!Ht)return;let n=J.createElement("div");return n.innerHTML=t.html,n.children}}),t}function wp(t){let{children:e,main:n,mask:i,attributes:r,styles:a,transform:o}=t;if(qa(o)&&n.found&&!i.found){let{width:s,height:l}=n,c={x:s/l/2,y:.5};r.style=tn(ee(I({},a),{"transform-origin":"".concat(c.x+o.x/16,"em ").concat(c.y+o.y/16,"em")}))}return[{tag:"svg",attributes:r,children:e}]}function Cp(t){let{prefix:e,iconName:n,children:i,attributes:r,symbol:a}=t,o=a===!0?"".concat(e,"-").concat(A.cssPrefix,"-").concat(n):a;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:ee(I({},r),{id:o}),children:i}]}]}function Ka(t){let{icons:{main:e,mask:n},prefix:i,iconName:r,transform:a,symbol:o,title:s,maskId:l,titleId:c,extra:u,watchable:m=!1}=t,{width:b,height:T}=n.found?n:e,O=i==="fak",N=[A.replacementClass,r?"".concat(A.cssPrefix,"-").concat(r):""].filter(S=>u.classes.indexOf(S)===-1).filter(S=>S!==""||!!S).concat(u.classes).join(" "),p={children:[],attributes:ee(I({},u.attributes),{"data-prefix":i,"data-icon":r,class:N,role:u.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(b," ").concat(T)})},f=O&&!~u.classes.indexOf("fa-fw")?{width:"".concat(b/T*16*.0625,"em")}:{};m&&(p.attributes[gi]=""),s&&(p.children.push({tag:"title",attributes:{id:p.attributes["aria-labelledby"]||"title-".concat(c||ir())},children:[s]}),delete p.attributes.title);let g=ee(I({},p),{prefix:i,iconName:r,main:e,mask:n,maskId:l,transform:a,symbol:o,styles:I(I({},f),u.styles)}),{children:P,attributes:w}=n.found&&e.found?li("generateAbstractMask",g)||{children:[],attributes:{}}:li("generateAbstractIcon",g)||{children:[],attributes:{}};return g.children=P,g.attributes=w,o?Cp(g):wp(g)}function Sl(t){let{content:e,width:n,height:i,transform:r,title:a,extra:o,watchable:s=!1}=t,l=ee(I(I({},o.attributes),a?{title:a}:{}),{class:o.classes.join(" ")});s&&(l[gi]="");let c=I({},o.styles);qa(r)&&(c.transform=ip({transform:r,startCentered:!0,width:n,height:i}),c["-webkit-transform"]=c.transform);let u=tn(c);u.length>0&&(l.style=u);let m=[];return m.push({tag:"span",attributes:l,children:[e]}),a&&m.push({tag:"span",attributes:{class:"sr-only"},children:[a]}),m}function Mp(t){let{content:e,title:n,extra:i}=t,r=ee(I(I({},i.attributes),n?{title:n}:{}),{class:i.classes.join(" ")}),a=tn(i.styles);a.length>0&&(r.style=a);let o=[];return o.push({tag:"span",attributes:r,children:[e]}),n&&o.push({tag:"span",attributes:{class:"sr-only"},children:[n]}),o}var{styles:Ia}=Rt;function ja(t){let e=t[0],n=t[1],[i]=t.slice(4),r=null;return Array.isArray(i)?r={tag:"g",attributes:{class:"".concat(A.cssPrefix,"-").concat(wa.GROUP)},children:[{tag:"path",attributes:{class:"".concat(A.cssPrefix,"-").concat(wa.SECONDARY),fill:"currentColor",d:i[0]}},{tag:"path",attributes:{class:"".concat(A.cssPrefix,"-").concat(wa.PRIMARY),fill:"currentColor",d:i[1]}}]}:r={tag:"path",attributes:{fill:"currentColor",d:i}},{found:!0,width:e,height:n,icon:r}}var Ip={found:!1,width:512,height:512};function Ep(t,e){!Hl&&!A.showMissingIcons&&t&&console.error('Icon with name "'.concat(t,'" and prefix "').concat(e,'" is missing.'))}function $a(t,e){let n=e;return e==="fa"&&A.styleDefault!==null&&(e=si()),new Promise((i,r)=>{if(n==="fa"){let a=oc(t)||{};t=a.iconName||t,e=a.prefix||e}if(t&&e&&Ia[e]&&Ia[e][t]){let a=Ia[e][t];return i(ja(a))}Ep(t,e),i(ee(I({},Ip),{icon:A.showMissingIcons&&t?li("missingIconAbstract")||{}:{}}))})}var wl=()=>{},Na=A.measurePerformance&&Jr&&Jr.mark&&Jr.measure?Jr:{mark:wl,measure:wl},Qi='FA "6.6.0"',Tp=t=>(Na.mark("".concat(Qi," ").concat(t," begins")),()=>lc(t)),lc=t=>{Na.mark("".concat(Qi," ").concat(t," ends")),Na.measure("".concat(Qi," ").concat(t),"".concat(Qi," ").concat(t," begins"),"".concat(Qi," ").concat(t," ends"))},Qa={begin:Tp,end:lc},Kr=()=>{};function Cl(t){return typeof(t.getAttribute?t.getAttribute(gi):null)=="string"}function _p(t){let e=t.getAttribute?t.getAttribute(za):null,n=t.getAttribute?t.getAttribute(Ha):null;return e&&n}function kp(t){return t&&t.classList&&t.classList.contains&&t.classList.contains(A.replacementClass)}function Lp(){return A.autoReplaceSvg===!0?Qr.replace:Qr[A.autoReplaceSvg]||Qr.replace}function Fp(t){return J.createElementNS("http://www.w3.org/2000/svg",t)}function Ap(t){return J.createElement(t)}function cc(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{ceFn:n=t.tag==="svg"?Fp:Ap}=e;if(typeof t=="string")return J.createTextNode(t);let i=n(t.tag);return Object.keys(t.attributes||[]).forEach(function(a){i.setAttribute(a,t.attributes[a])}),(t.children||[]).forEach(function(a){i.appendChild(cc(a,{ceFn:n}))}),i}function Dp(t){let e=" ".concat(t.outerHTML," ");return e="".concat(e,"Font Awesome fontawesome.com "),e}var Qr={replace:function(t){let e=t[0];if(e.parentNode)if(t[1].forEach(n=>{e.parentNode.insertBefore(cc(n),e)}),e.getAttribute(gi)===null&&A.keepOriginalSource){let n=J.createComment(Dp(e));e.parentNode.replaceChild(n,e)}else e.remove()},nest:function(t){let e=t[0],n=t[1];if(~Wa(e).indexOf(A.replacementClass))return Qr.replace(t);let i=new RegExp("".concat(A.cssPrefix,"-.*"));if(delete n[0].attributes.id,n[0].attributes.class){let a=n[0].attributes.class.split(" ").reduce((o,s)=>(s===A.replacementClass||s.match(i)?o.toSvg.push(s):o.toNode.push(s),o),{toNode:[],toSvg:[]});n[0].attributes.class=a.toSvg.join(" "),a.toNode.length===0?e.removeAttribute("class"):e.setAttribute("class",a.toNode.join(" "))}let r=n.map(a=>nr(a)).join(`
`);e.setAttribute(gi,""),e.innerHTML=r}};function Ml(t){t()}function uc(t,e){let n=typeof e=="function"?e:Kr;if(t.length===0)n();else{let i=Ml;A.mutateApproach===Gu&&(i=oi.requestAnimationFrame||Ml),i(()=>{let r=Lp(),a=Qa.begin("mutate");t.map(r),a(),n()})}}var Za=!1;function pc(){Za=!0}function Ga(){Za=!1}var en=null;function Il(t){if(!ml||!A.observeMutations)return;let{treeCallback:e=Kr,nodeCallback:n=Kr,pseudoElementsCallback:i=Kr,observeMutationsRoot:r=J}=t;en=new ml(a=>{if(Za)return;let o=si();Ni(a).forEach(s=>{if(s.type==="childList"&&s.addedNodes.length>0&&!Cl(s.addedNodes[0])&&(A.searchPseudoElements&&i(s.target),e(s.target)),s.type==="attributes"&&s.target.parentNode&&A.searchPseudoElements&&i(s.target.parentNode),s.type==="attributes"&&Cl(s.target)&&~qu.indexOf(s.attributeName))if(s.attributeName==="class"&&_p(s.target)){let{prefix:l,iconName:c}=nn(Wa(s.target));s.target.setAttribute(za,l||o),c&&s.target.setAttribute(Ha,c)}else kp(s.target)&&n(s.target)})}),Ht&&en.observe(r,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}function Op(){en&&en.disconnect()}function Bp(t){let e=t.getAttribute("style"),n=[];return e&&(n=e.split(";").reduce((i,r)=>{let a=r.split(":"),o=a[0],s=a.slice(1);return o&&s.length>0&&(i[o]=s.join(":").trim()),i},{})),n}function Rp(t){let e=t.getAttribute("data-prefix"),n=t.getAttribute("data-icon"),i=t.innerText!==void 0?t.innerText.trim():"",r=nn(Wa(t));return r.prefix||(r.prefix=si()),e&&n&&(r.prefix=e,r.iconName=n),r.iconName&&r.prefix||(r.prefix&&i.length>0&&(r.iconName=mp(r.prefix,t.innerText)||Xa(r.prefix,Aa(t.innerText))),!r.iconName&&A.autoFetchSvg&&t.firstChild&&t.firstChild.nodeType===Node.TEXT_NODE&&(r.iconName=t.firstChild.data)),r}function jp(t){let e=Ni(t.attributes).reduce((r,a)=>(r.name!=="class"&&r.name!=="style"&&(r[a.name]=a.value),r),{}),n=t.getAttribute("title"),i=t.getAttribute("data-fa-title-id");return A.autoA11y&&(n?e["aria-labelledby"]="".concat(A.replacementClass,"-title-").concat(i||ir()):(e["aria-hidden"]="true",e.focusable="false")),e}function $p(){return{iconName:null,title:null,titleId:null,prefix:null,transform:Bt,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function El(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0},{iconName:n,prefix:i,rest:r}=Rp(t),a=jp(t),o=Ba("parseNodeAttributes",{},t),s=e.styleParser?Bp(t):[];return I({iconName:n,title:t.getAttribute("title"),titleId:t.getAttribute("data-fa-title-id"),prefix:i,transform:Bt,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:r,styles:s,attributes:a}},o)}var{styles:Np}=Rt;function dc(t){let e=A.autoReplaceSvg==="nest"?El(t,{styleParser:!1}):El(t);return~e.extra.classes.indexOf(Yl)?li("generateLayersText",t,e):li("generateSvgReplacementMutation",t,e)}var jt=new Set;Wl.map(t=>{jt.add("fa-".concat(t))});Object.keys(mi[Q]).map(jt.add.bind(jt));Object.keys(mi[Le]).map(jt.add.bind(jt));Object.keys(mi[Fe]).map(jt.add.bind(jt));jt=[...jt];function Tl(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!Ht)return Promise.resolve();let n=J.documentElement.classList,i=u=>n.add("".concat(vl,"-").concat(u)),r=u=>n.remove("".concat(vl,"-").concat(u)),a=A.autoFetchSvg?jt:Wl.map(u=>"fa-".concat(u)).concat(Object.keys(Np));a.includes("fa")||a.push("fa");let o=[".".concat(Yl,":not([").concat(gi,"])")].concat(a.map(u=>".".concat(u,":not([").concat(gi,"])"))).join(", ");if(o.length===0)return Promise.resolve();let s=[];try{s=Ni(t.querySelectorAll(o))}catch{}if(s.length>0)i("pending"),r("complete");else return Promise.resolve();let l=Qa.begin("onTree"),c=s.reduce((u,m)=>{try{let b=dc(m);b&&u.push(b)}catch(b){Hl||b.name==="MissingIcon"&&console.error(b)}return u},[]);return new Promise((u,m)=>{Promise.all(c).then(b=>{uc(b,()=>{i("active"),i("complete"),r("pending"),typeof e=="function"&&e(),l(),u()})}).catch(b=>{l(),m(b)})})}function Gp(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;dc(t).then(n=>{n&&uc([n],e)})}function Up(t){return function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=(e||{}).icon?e:Ra(e||{}),{mask:r}=n;return r&&(r=(r||{}).icon?r:Ra(r||{})),t(i,ee(I({},n),{mask:r}))}}var Vp=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{transform:n=Bt,symbol:i=!1,mask:r=null,maskId:a=null,title:o=null,titleId:s=null,classes:l=[],attributes:c={},styles:u={}}=e;if(!t)return;let{prefix:m,iconName:b,icon:T}=t;return an(I({type:"icon"},t),()=>(vi("beforeDOMElementCreation",{iconDefinition:t,params:e}),A.autoA11y&&(o?c["aria-labelledby"]="".concat(A.replacementClass,"-title-").concat(s||ir()):(c["aria-hidden"]="true",c.focusable="false")),Ka({icons:{main:ja(T),mask:r?ja(r.icon):{found:!1,width:null,height:null,icon:{}}},prefix:m,iconName:b,transform:I(I({},Bt),n),symbol:i,title:o,maskId:a,titleId:s,extra:{attributes:c,styles:u,classes:l}})))},zp={mixout(){return{icon:Up(Vp)}},hooks(){return{mutationObserverCallbacks(t){return t.treeCallback=Tl,t.nodeCallback=Gp,t}}},provides(t){t.i2svg=function(e){let{node:n=J,callback:i=()=>{}}=e;return Tl(n,i)},t.generateSvgReplacementMutation=function(e,n){let{iconName:i,title:r,titleId:a,prefix:o,transform:s,symbol:l,mask:c,maskId:u,extra:m}=n;return new Promise((b,T)=>{Promise.all([$a(i,o),c.iconName?$a(c.iconName,c.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(O=>{let[N,p]=O;b([e,Ka({icons:{main:N,mask:p},prefix:o,iconName:i,transform:s,symbol:l,maskId:u,title:r,titleId:a,extra:m,watchable:!0})])}).catch(T)})},t.generateAbstractIcon=function(e){let{children:n,attributes:i,main:r,transform:a,styles:o}=e,s=tn(o);s.length>0&&(i.style=s);let l;return qa(a)&&(l=li("generateAbstractTransformGrouping",{main:r,transform:a,containerWidth:r.width,iconWidth:r.width})),n.push(l||r.icon),{children:n,attributes:i}}}},Hp={mixout(){return{layer(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{classes:n=[]}=e;return an({type:"layer"},()=>{vi("beforeDOMElementCreation",{assembler:t,params:e});let i=[];return t(r=>{Array.isArray(r)?r.map(a=>{i=i.concat(a.abstract)}):i=i.concat(r.abstract)}),[{tag:"span",attributes:{class:["".concat(A.cssPrefix,"-layers"),...n].join(" ")},children:i}]})}}}},Wp={mixout(){return{counter(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{title:n=null,classes:i=[],attributes:r={},styles:a={}}=e;return an({type:"counter",content:t},()=>(vi("beforeDOMElementCreation",{content:t,params:e}),Mp({content:t.toString(),title:n,extra:{attributes:r,styles:a,classes:["".concat(A.cssPrefix,"-layers-counter"),...i]}})))}}}},qp={mixout(){return{text(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{transform:n=Bt,title:i=null,classes:r=[],attributes:a={},styles:o={}}=e;return an({type:"text",content:t},()=>(vi("beforeDOMElementCreation",{content:t,params:e}),Sl({content:t,transform:I(I({},Bt),n),title:i,extra:{attributes:a,styles:o,classes:["".concat(A.cssPrefix,"-layers-text"),...r]}})))}}},provides(t){t.generateLayersText=function(e,n){let{title:i,transform:r,extra:a}=n,o=null,s=null;if($l){let l=parseInt(getComputedStyle(e).fontSize,10),c=e.getBoundingClientRect();o=c.width/l,s=c.height/l}return A.autoA11y&&!i&&(a.attributes["aria-hidden"]="true"),Promise.resolve([e,Sl({content:e.innerHTML,width:o,height:s,transform:r,title:i,extra:a,watchable:!0})])}}},Yp=new RegExp('"',"ug"),_l=[1105920,1112319],kl=I(I(I({FontAwesome:{normal:"fas",400:"fas"}},_u),Tu),Ru),Ua=Object.keys(kl).reduce((t,e)=>(t[e.toLowerCase()]=kl[e],t),{}),Xp=Object.keys(Ua).reduce((t,e)=>{let n=Ua[e];return t[e]=n[900]||[...Object.entries(n)][0][1],t},{});function Jp(t){let e=t.replace(Yp,""),n=lp(e,0),i=n>=_l[0]&&n<=_l[1],r=e.length===2?e[0]===e[1]:!1;return{value:Aa(r?e[0]:e),isSecondary:i||r}}function Kp(t,e){let n=t.replace(/^['"]|['"]$/g,"").toLowerCase(),i=parseInt(e),r=isNaN(i)?"normal":i;return(Ua[n]||{})[r]||Xp[n]}function Ll(t,e){let n="".concat(Nu).concat(e.replace(":","-"));return new Promise((i,r)=>{if(t.getAttribute(n)!==null)return i();let o=Ni(t.children).filter(b=>b.getAttribute(_a)===e)[0],s=oi.getComputedStyle(t,e),l=s.getPropertyValue("font-family"),c=l.match(Hu),u=s.getPropertyValue("font-weight"),m=s.getPropertyValue("content");if(o&&!c)return t.removeChild(o),i();if(c&&m!=="none"&&m!==""){let b=s.getPropertyValue("content"),T=Kp(l,u),{value:O,isSecondary:N}=Jp(b),p=c[0].startsWith("FontAwesome"),f=Xa(T,O),g=f;if(p){let P=hp(O);P.iconName&&P.prefix&&(f=P.iconName,T=P.prefix)}if(f&&!N&&(!o||o.getAttribute(za)!==T||o.getAttribute(Ha)!==g)){t.setAttribute(n,g),o&&t.removeChild(o);let P=$p(),{extra:w}=P;w.attributes[_a]=e,$a(f,T).then(S=>{let _=Ka(ee(I({},P),{icons:{main:S,mask:Ja()},prefix:T,iconName:g,extra:w,watchable:!0})),R=J.createElementNS("http://www.w3.org/2000/svg","svg");e==="::before"?t.insertBefore(R,t.firstChild):t.appendChild(R),R.outerHTML=_.map($=>nr($)).join(`
`),t.removeAttribute(n),i()}).catch(r)}else i()}else i()})}function Qp(t){return Promise.all([Ll(t,"::before"),Ll(t,"::after")])}function Zp(t){return t.parentNode!==document.head&&!~Uu.indexOf(t.tagName.toUpperCase())&&!t.getAttribute(_a)&&(!t.parentNode||t.parentNode.tagName!=="svg")}function Fl(t){if(Ht)return new Promise((e,n)=>{let i=Ni(t.querySelectorAll("*")).filter(Zp).map(Qp),r=Qa.begin("searchPseudoElements");pc(),Promise.all(i).then(()=>{r(),Ga(),e()}).catch(()=>{r(),Ga(),n()})})}var ed={hooks(){return{mutationObserverCallbacks(t){return t.pseudoElementsCallback=Fl,t}}},provides(t){t.pseudoElements2svg=function(e){let{node:n=J}=e;A.searchPseudoElements&&Fl(n)}}},Al=!1,td={mixout(){return{dom:{unwatch(){pc(),Al=!0}}}},hooks(){return{bootstrap(){Il(Ba("mutationObserverCallbacks",{}))},noAuto(){Op()},watch(t){let{observeMutationsRoot:e}=t;Al?Ga():Il(Ba("mutationObserverCallbacks",{observeMutationsRoot:e}))}}}},Dl=t=>{let e={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return t.toLowerCase().split(" ").reduce((n,i)=>{let r=i.toLowerCase().split("-"),a=r[0],o=r.slice(1).join("-");if(a&&o==="h")return n.flipX=!0,n;if(a&&o==="v")return n.flipY=!0,n;if(o=parseFloat(o),isNaN(o))return n;switch(a){case"grow":n.size=n.size+o;break;case"shrink":n.size=n.size-o;break;case"left":n.x=n.x-o;break;case"right":n.x=n.x+o;break;case"up":n.y=n.y-o;break;case"down":n.y=n.y+o;break;case"rotate":n.rotate=n.rotate+o;break}return n},e)},id={mixout(){return{parse:{transform:t=>Dl(t)}}},hooks(){return{parseNodeAttributes(t,e){let n=e.getAttribute("data-fa-transform");return n&&(t.transform=Dl(n)),t}}},provides(t){t.generateAbstractTransformGrouping=function(e){let{main:n,transform:i,containerWidth:r,iconWidth:a}=e,o={transform:"translate(".concat(r/2," 256)")},s="translate(".concat(i.x*32,", ").concat(i.y*32,") "),l="scale(".concat(i.size/16*(i.flipX?-1:1),", ").concat(i.size/16*(i.flipY?-1:1),") "),c="rotate(".concat(i.rotate," 0 0)"),u={transform:"".concat(s," ").concat(l," ").concat(c)},m={transform:"translate(".concat(a/2*-1," -256)")},b={outer:o,inner:u,path:m};return{tag:"g",attributes:I({},b.outer),children:[{tag:"g",attributes:I({},b.inner),children:[{tag:n.icon.tag,children:n.icon.children,attributes:I(I({},n.icon.attributes),b.path)}]}]}}}},Ea={x:0,y:0,width:"100%",height:"100%"};function Ol(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return t.attributes&&(t.attributes.fill||e)&&(t.attributes.fill="black"),t}function rd(t){return t.tag==="g"?t.children:[t]}var nd={hooks(){return{parseNodeAttributes(t,e){let n=e.getAttribute("data-fa-mask"),i=n?nn(n.split(" ").map(r=>r.trim())):Ja();return i.prefix||(i.prefix=si()),t.mask=i,t.maskId=e.getAttribute("data-fa-mask-id"),t}}},provides(t){t.generateAbstractMask=function(e){let{children:n,attributes:i,main:r,mask:a,maskId:o,transform:s}=e,{width:l,icon:c}=r,{width:u,icon:m}=a,b=tp({transform:s,containerWidth:u,iconWidth:l}),T={tag:"rect",attributes:ee(I({},Ea),{fill:"white"})},O=c.children?{children:c.children.map(Ol)}:{},N={tag:"g",attributes:I({},b.inner),children:[Ol(I({tag:c.tag,attributes:I(I({},c.attributes),b.path)},O))]},p={tag:"g",attributes:I({},b.outer),children:[N]},f="mask-".concat(o||ir()),g="clip-".concat(o||ir()),P={tag:"mask",attributes:ee(I({},Ea),{id:f,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[T,p]},w={tag:"defs",children:[{tag:"clipPath",attributes:{id:g},children:rd(m)},P]};return n.push(w,{tag:"rect",attributes:I({fill:"currentColor","clip-path":"url(#".concat(g,")"),mask:"url(#".concat(f,")")},Ea)}),{children:n,attributes:i}}}},ad={provides(t){let e=!1;oi.matchMedia&&(e=oi.matchMedia("(prefers-reduced-motion: reduce)").matches),t.missingIconAbstract=function(){let n=[],i={fill:"currentColor"},r={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};n.push({tag:"path",attributes:ee(I({},i),{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});let a=ee(I({},r),{attributeName:"opacity"}),o={tag:"circle",attributes:ee(I({},i),{cx:"256",cy:"364",r:"28"}),children:[]};return e||o.children.push({tag:"animate",attributes:ee(I({},r),{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:ee(I({},a),{values:"1;0;1;1;0;1;"})}),n.push(o),n.push({tag:"path",attributes:ee(I({},i),{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:e?[]:[{tag:"animate",attributes:ee(I({},a),{values:"1;0;0;0;0;1;"})}]}),e||n.push({tag:"path",attributes:ee(I({},i),{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:ee(I({},a),{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:n}}}},od={hooks(){return{parseNodeAttributes(t,e){let n=e.getAttribute("data-fa-symbol"),i=n===null?!1:n===""?!0:n;return t.symbol=i,t}}}},sd=[np,zp,Hp,Wp,qp,ed,td,id,nd,ad,od];yp(sd,{mixoutsTo:Ae});var Ym=Ae.noAuto,fc=Ae.config,Xm=Ae.library,mc=Ae.dom,hc=Ae.parse,Jm=Ae.findIconDefinition,Km=Ae.toHtml,gc=Ae.icon,Qm=Ae.layer,ld=Ae.text,cd=Ae.counter;var ud=["*"],pd=t=>{throw new Error(`Could not find icon with iconName=${t.iconName} and prefix=${t.prefix} in the icon library.`)},dd=()=>{throw new Error("Property `icon` is required for `fa-icon`/`fa-duotone-icon` components.")},fd=t=>{let e={[`fa-${t.animation}`]:t.animation!=null&&!t.animation.startsWith("spin"),"fa-spin":t.animation==="spin"||t.animation==="spin-reverse","fa-spin-pulse":t.animation==="spin-pulse"||t.animation==="spin-pulse-reverse","fa-spin-reverse":t.animation==="spin-reverse"||t.animation==="spin-pulse-reverse","fa-pulse":t.animation==="spin-pulse"||t.animation==="spin-pulse-reverse","fa-fw":t.fixedWidth,"fa-border":t.border,"fa-inverse":t.inverse,"fa-layers-counter":t.counter,"fa-flip-horizontal":t.flip==="horizontal"||t.flip==="both","fa-flip-vertical":t.flip==="vertical"||t.flip==="both",[`fa-${t.size}`]:t.size!==null,[`fa-rotate-${t.rotate}`]:t.rotate!==null,[`fa-pull-${t.pull}`]:t.pull!==null,[`fa-stack-${t.stackItemSize}`]:t.stackItemSize!=null};return Object.keys(e).map(n=>e[n]?n:null).filter(n=>n)},eo=new WeakSet,vc="fa-auto-css";function md(t,e){if(!e.autoAddCss||eo.has(t))return;if(t.getElementById(vc)!=null){e.autoAddCss=!1,eo.add(t);return}let n=t.createElement("style");n.setAttribute("type","text/css"),n.setAttribute("id",vc),n.innerHTML=mc.css();let i=t.head.childNodes,r=null;for(let a=i.length-1;a>-1;a--){let o=i[a],s=o.nodeName.toUpperCase();["STYLE","LINK"].indexOf(s)>-1&&(r=o)}t.head.insertBefore(n,r),e.autoAddCss=!1,eo.add(t)}var hd=t=>t.prefix!==void 0&&t.iconName!==void 0,gd=(t,e)=>hd(t)?t:Array.isArray(t)&&t.length===2?{prefix:t[0],iconName:t[1]}:{prefix:e,iconName:t},vd=(()=>{let e=class e{constructor(){this.defaultPrefix="fas",this.fallbackIcon=null,this._autoAddCss=!0}set autoAddCss(i){fc.autoAddCss=i,this._autoAddCss=i}get autoAddCss(){return this._autoAddCss}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=j({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),yd=(()=>{let e=class e{constructor(){this.definitions={}}addIcons(...i){for(let r of i){r.prefix in this.definitions||(this.definitions[r.prefix]={}),this.definitions[r.prefix][r.iconName]=r;for(let a of r.icon[2])typeof a=="string"&&(this.definitions[r.prefix][a]=r)}}addIconPacks(...i){for(let r of i){let a=Object.keys(r).map(o=>r[o]);this.addIcons(...a)}}getIconDefinition(i,r){return i in this.definitions&&r in this.definitions[i]?this.definitions[i][r]:null}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=j({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),bd=(()=>{let e=class e{constructor(){this.stackItemSize="1x"}ngOnChanges(i){if("size"in i)throw new Error('fa-icon is not allowed to customize size when used inside fa-stack. Set size on the enclosing fa-stack instead: <fa-stack size="4x">...</fa-stack>.')}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=vr({type:e,selectors:[["fa-icon","stackItemSize",""],["fa-duotone-icon","stackItemSize",""]],inputs:{stackItemSize:"stackItemSize",size:"size"},standalone:!0,features:[yr]});let t=e;return t})(),xd=(()=>{let e=class e{constructor(i,r){this.renderer=i,this.elementRef=r}ngOnInit(){this.renderer.addClass(this.elementRef.nativeElement,"fa-stack")}ngOnChanges(i){"size"in i&&(i.size.currentValue!=null&&this.renderer.addClass(this.elementRef.nativeElement,`fa-${i.size.currentValue}`),i.size.previousValue!=null&&this.renderer.removeClass(this.elementRef.nativeElement,`fa-${i.size.previousValue}`))}};e.\u0275fac=function(r){return new(r||e)(B(Fo),B(Lo))},e.\u0275cmp=Ee({type:e,selectors:[["fa-stack"]],inputs:{size:"size"},standalone:!0,features:[yr,Te],ngContentSelectors:ud,decls:1,vars:0,template:function(r,a){r&1&&($o(),No(0))},encapsulation:2});let t=e;return t})(),gh=(()=>{let e=class e{constructor(i,r,a,o,s){this.sanitizer=i,this.config=r,this.iconLibrary=a,this.stackItem=o,this.document=V(Uo),s!=null&&o==null&&console.error('FontAwesome: fa-icon and fa-duotone-icon elements must specify stackItemSize attribute when wrapped into fa-stack. Example: <fa-icon stackItemSize="2x"></fa-icon>.')}ngOnChanges(i){if(this.icon==null&&this.config.fallbackIcon==null){dd();return}if(i){let r=this.findIconDefinition(this.icon??this.config.fallbackIcon);if(r!=null){let a=this.buildParams();md(this.document,this.config);let o=gc(r,a);this.renderedIconHTML=this.sanitizer.bypassSecurityTrustHtml(o.html.join(`
`))}}}render(){this.ngOnChanges({})}findIconDefinition(i){let r=gd(i,this.config.defaultPrefix);if("icon"in r)return r;let a=this.iconLibrary.getIconDefinition(r.prefix,r.iconName);return a??(pd(r),null)}buildParams(){let i={flip:this.flip,animation:this.animation,border:this.border,inverse:this.inverse,size:this.size||null,pull:this.pull||null,rotate:this.rotate||null,fixedWidth:typeof this.fixedWidth=="boolean"?this.fixedWidth:this.config.fixedWidth,stackItemSize:this.stackItem!=null?this.stackItem.stackItemSize:null},r=typeof this.transform=="string"?hc.transform(this.transform):this.transform;return{title:this.title,transform:r,classes:fd(i),mask:this.mask!=null?this.findIconDefinition(this.mask):null,symbol:this.symbol,attributes:{role:this.a11yRole}}}};e.\u0275fac=function(r){return new(r||e)(B(rs),B(vd),B(yd),B(bd,8),B(xd,8))},e.\u0275cmp=Ee({type:e,selectors:[["fa-icon"]],hostAttrs:[1,"ng-fa-icon"],hostVars:2,hostBindings:function(r,a){r&2&&(jo("innerHTML",a.renderedIconHTML,br),xr("title",a.title))},inputs:{icon:"icon",title:"title",animation:"animation",mask:"mask",flip:"flip",size:"size",pull:"pull",border:"border",inverse:"inverse",symbol:"symbol",rotate:"rotate",fixedWidth:"fixedWidth",transform:"transform",a11yRole:"a11yRole"},standalone:!0,features:[yr,Te],decls:0,vars:0,template:function(r,a){},encapsulation:2});let t=e;return t})();var to=class extends Gs{constructor(e){e=e||{},super(e)}},yc=to;var io=class extends Hs{constructor(e){super(e),this.image=null}getImage(){return this.image?this.image.getImage():null}prepareFrame(e){let n=e.layerStatesArray[e.layerIndex],i=e.pixelRatio,r=e.viewState,a=r.resolution,o=this.getLayer().getSource(),s=e.viewHints,l=e.extent;if(n.extent!==void 0&&(l=As(l,ya(n.extent,r.projection))),!s[ha.ANIMATING]&&!s[ha.INTERACTING]&&!Bs(l))if(o){let c=r.projection,u=o.getImage(l,a,i,c);u&&(this.loadImage(u)?this.image=u:u.getState()===Us.EMPTY&&(this.image=null))}else this.image=null;return!!this.image}getData(e){let n=this.frameState;if(!n)return null;let i=this.getLayer(),r=js(n.pixelToCoordinateTransform,e.slice()),a=i.getExtent();if(a&&!_s(a,r))return null;let o=this.image.getExtent(),s=this.image.getImage(),l=Ds(o),c=Math.floor(s.width*((r[0]-o[0])/l));if(c<0||c>=s.width)return null;let u=Fs(o),m=Math.floor(s.height*((o[3]-r[1])/u));return m<0||m>=s.height?null:this.getImageData(s,c,m)}renderFrame(e,n){let i=this.image,r=i.getExtent(),a=i.getResolution(),[o,s]=Array.isArray(a)?a:[a,a],l=i.getPixelRatio(),c=e.layerStatesArray[e.layerIndex],u=e.pixelRatio,m=e.viewState,b=m.center,T=m.resolution,O=u*o/(T*l),N=u*s/(T*l);this.prepareContainer(e,n);let p=this.context.canvas.width,f=this.context.canvas.height,g=this.getRenderContext(e),P=!1,w=!0;if(c.extent){let U=ya(c.extent,m.projection);w=Os(U,e.extent),P=w&&!ks(U,e.extent),P&&this.clipUnrotated(g,e,U)}let S=i.getImage(),_=$s(this.tempTransform,p/2,f/2,O,N,0,l*(r[0]-b[0])/o,l*(b[1]-r[3])/s);this.renderedResolution=s*u/l;let R=S.width*_[0],$=S.height*_[3];if(this.getLayer().getSource().getInterpolate()||(g.imageSmoothingEnabled=!1),this.preRender(g,e),w&&R>=.5&&$>=.5){let U=_[4],Z=_[5],q=c.opacity;q!==1&&(g.save(),g.globalAlpha=q),g.drawImage(S,0,0,+S.width,+S.height,U,Z,R,$),q!==1&&g.restore()}return this.postRender(this.context,e),P&&g.restore(),g.imageSmoothingEnabled=!0,this.container}},bc=io;var ro=class extends yc{constructor(e){super(e)}createRenderer(){return new bc(this)}getData(e){return super.getData(e)}},xc=ro;var ao=gr(no());var ar=class{static areFeaturesEqual(e,n){let i=I({},e.getProperties()),r=I({},n.getProperties());if(delete i.geometry,delete r.geometry,!(0,ao.default)(i,r))return!1;let a=e.getGeometry(),o=n.getGeometry();return this.areGeometriesEqual(a,o)}static areGeometriesEqual(e,n){if(e.getType()!==n.getType())return!1;switch(e.getType()){case"LineString":{let i=e.getCoordinates(),r=n.getCoordinates();return(0,ao.default)(i,r)}default:return console.warn("Unsupported geometry type for comparison: "+e.getType()),!1}}static refreshLayersInLayerGroup(e){e?.getLayers()?.forEach(n=>{n.getSource()?.changed()})}static updateVectorSourceWithFeatures(e,n){e.clear(),n&&e.addFeatures(n)}};var Gi=class{constructor(e=null,n=null,i,r,a){!i&&!r&&a?(this.minSlope=e,this.maxSlope=n,this.distance=a.filter(o=>o.start>=e&&o.start<n).reduce((o,s)=>o+s.distance,0),this.percent=this.distance/a.reduce((o,s)=>o+s.distance,0)*100):(this.minSlope=e,this.maxSlope=n,this.distance=i,this.percent=r)}};var on=(()=>{let e=class e{constructor(i){this.pathPlanningRequestsService=i,this.subs=new Ci}ngOnDestroy(){this.subs.unsubscribe()}onCheckPostProcessingJobStatus(i,r,a){let o=Mi(500).pipe(Ii(()=>this.pathPlanningRequestsService.getGuidancePostProcessJobStatus(i))).subscribe({next:s=>{s.error&&(a(i),o.unsubscribe()),!(!s.records||!s.records[0]||!s.records[0].completed)&&(o.unsubscribe(),r(s,i))},error:()=>{a(i),o.unsubscribe()}});this.subs.add(o)}};e.\u0275fac=function(r){return new(r||e)(M($t))},e.\u0275prov=j({token:e,factory:e.\u0275fac});let t=e;return t})();var Pe=63710088e-1,wc={centimeters:Pe*100,centimetres:Pe*100,degrees:360/(2*Math.PI),feet:Pe*3.28084,inches:Pe*39.37,kilometers:Pe/1e3,kilometres:Pe/1e3,meters:Pe,metres:Pe,miles:Pe/1609.344,millimeters:Pe*1e3,millimetres:Pe*1e3,nauticalmiles:Pe/1852,radians:1,yards:Pe*1.0936};function De(t,e,n={}){let i={type:"Feature"};return(n.id===0||n.id)&&(i.id=n.id),n.bbox&&(i.bbox=n.bbox),i.properties=e||{},i.geometry=t,i}function ne(t,e,n={}){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Sc(t[0])||!Sc(t[1]))throw new Error("coordinates must contain numbers");return De({type:"Point",coordinates:t},e,n)}function Ge(t,e,n={}){for(let r of t){if(r.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(r[r.length-1].length!==r[0].length)throw new Error("First and last Position are not equivalent.");for(let a=0;a<r[r.length-1].length;a++)if(r[r.length-1][a]!==r[0][a])throw new Error("First and last Position are not equivalent.")}return De({type:"Polygon",coordinates:t},e,n)}function te(t,e,n={}){if(t.length<2)throw new Error("coordinates must be an array of two or more positions");return De({type:"LineString",coordinates:t},e,n)}function Re(t,e={}){let n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}function Cc(t,e,n={}){return De({type:"MultiLineString",coordinates:t},e,n)}function oo(t,e="kilometers"){let n=wc[e];if(!n)throw new Error(e+" units is invalid");return t*n}function so(t,e="kilometers"){let n=wc[e];if(!n)throw new Error(e+" units is invalid");return t/n}function sr(t){return t%(2*Math.PI)*180/Math.PI}function Ie(t){return t%360*Math.PI/180}function sn(t,e="kilometers",n="kilometers"){if(!(t>=0))throw new Error("length must be a positive number");return oo(so(t,e),n)}function Sc(t){return!isNaN(t)&&t!==null&&!Array.isArray(t)}function lo(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function Se(t){if(!t)throw new Error("coord is required");if(!Array.isArray(t)){if(t.type==="Feature"&&t.geometry!==null&&t.geometry.type==="Point")return[...t.geometry.coordinates];if(t.type==="Point")return[...t.coordinates]}if(Array.isArray(t)&&t.length>=2&&!Array.isArray(t[0])&&!Array.isArray(t[1]))return[...t];throw new Error("coord must be GeoJSON Point or an Array of numbers")}function je(t){if(Array.isArray(t))return t;if(t.type==="Feature"){if(t.geometry!==null)return t.geometry.coordinates}else if(t.coordinates)return t.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function co(t,e,n){if(!t)throw new Error("No feature passed");if(!n)throw new Error(".featureOf() requires a name");if(!t||t.type!=="Feature"||!t.geometry)throw new Error("Invalid input to "+n+", Feature with geometry required");if(!t.geometry||t.geometry.type!==e)throw new Error("Invalid input to "+n+": must be a "+e+", given "+t.geometry.type)}function le(t){return t.type==="Feature"?t.geometry:t}function ci(t,e,n={}){if(n.final===!0)return Sd(t,e);let i=Se(t),r=Se(e),a=Ie(i[0]),o=Ie(r[0]),s=Ie(i[1]),l=Ie(r[1]),c=Math.sin(o-a)*Math.cos(l),u=Math.cos(s)*Math.sin(l)-Math.sin(s)*Math.cos(l)*Math.cos(o-a);return sr(Math.atan2(c,u))}function Sd(t,e){let n=ci(e,t);return n=(n+180)%360,n}function lr(t,e,n,i={}){let r=Se(t),a=Ie(r[0]),o=Ie(r[1]),s=Ie(n),l=so(e,i.units),c=Math.asin(Math.sin(o)*Math.cos(l)+Math.cos(o)*Math.sin(l)*Math.cos(s)),u=a+Math.atan2(Math.sin(s)*Math.sin(l)*Math.cos(o),Math.cos(l)-Math.sin(o)*Math.sin(c)),m=sr(u),b=sr(c);return ne([m,b],i.properties)}function we(t,e,n={}){var i=Se(t),r=Se(e),a=Ie(r[1]-i[1]),o=Ie(r[0]-i[0]),s=Ie(i[1]),l=Ie(r[1]),c=Math.pow(Math.sin(a/2),2)+Math.pow(Math.sin(o/2),2)*Math.cos(s)*Math.cos(l);return oo(2*Math.atan2(Math.sqrt(c),Math.sqrt(1-c)),n.units)}function ln(t,e,n={}){let r=le(t).coordinates,a=0;for(let o=0;o<r.length&&!(e>=a&&o===r.length-1);o++)if(a>=e){let s=e-a;if(s){let l=ci(r[o],r[o-1])-180;return lr(r[o],s,l,n)}else return ne(r[o])}else a+=we(r[o],r[o+1],n);return ne(r[r.length-1])}function cn(t,e,n){if(t!==null)for(var i,r,a,o,s,l,c,u=0,m=0,b,T=t.type,O=T==="FeatureCollection",N=T==="Feature",p=O?t.features.length:1,f=0;f<p;f++){c=O?t.features[f].geometry:N?t.geometry:t,b=c?c.type==="GeometryCollection":!1,s=b?c.geometries.length:1;for(var g=0;g<s;g++){var P=0,w=0;if(o=b?c.geometries[g]:c,o!==null){l=o.coordinates;var S=o.type;switch(u=n&&(S==="Polygon"||S==="MultiPolygon")?1:0,S){case null:break;case"Point":if(e(l,m,f,P,w)===!1)return!1;m++,P++;break;case"LineString":case"MultiPoint":for(i=0;i<l.length;i++){if(e(l[i],m,f,P,w)===!1)return!1;m++,S==="MultiPoint"&&P++}S==="LineString"&&P++;break;case"Polygon":case"MultiLineString":for(i=0;i<l.length;i++){for(r=0;r<l[i].length-u;r++){if(e(l[i][r],m,f,P,w)===!1)return!1;m++}S==="MultiLineString"&&P++,S==="Polygon"&&w++}S==="Polygon"&&P++;break;case"MultiPolygon":for(i=0;i<l.length;i++){for(w=0,r=0;r<l[i].length;r++){for(a=0;a<l[i][r].length-u;a++){if(e(l[i][r][a],m,f,P,w)===!1)return!1;m++}w++}P++}break;case"GeometryCollection":for(i=0;i<o.geometries.length;i++)if(cn(o.geometries[i],e,n)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function un(t,e){if(t.type==="Feature")e(t,0);else if(t.type==="FeatureCollection")for(var n=0;n<t.features.length&&e(t.features[n],n)!==!1;n++);}function wd(t,e){var n,i,r,a,o,s,l,c,u,m,b=0,T=t.type==="FeatureCollection",O=t.type==="Feature",N=T?t.features.length:1;for(n=0;n<N;n++){for(s=T?t.features[n].geometry:O?t.geometry:t,c=T?t.features[n].properties:O?t.properties:{},u=T?t.features[n].bbox:O?t.bbox:void 0,m=T?t.features[n].id:O?t.id:void 0,l=s?s.type==="GeometryCollection":!1,o=l?s.geometries.length:1,r=0;r<o;r++){if(a=l?s.geometries[r]:s,a===null){if(e(null,b,c,u,m)===!1)return!1;continue}switch(a.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(e(a,b,c,u,m)===!1)return!1;break}case"GeometryCollection":{for(i=0;i<a.geometries.length;i++)if(e(a.geometries[i],b,c,u,m)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}b++}}function Ue(t,e){wd(t,function(n,i,r,a,o){var s=n===null?null:n.type;switch(s){case null:case"Point":case"LineString":case"Polygon":return e(De(n,r,{bbox:a,id:o}),i,0)===!1?!1:void 0}var l;switch(s){case"MultiPoint":l="Point";break;case"MultiLineString":l="LineString";break;case"MultiPolygon":l="Polygon";break}for(var c=0;c<n.coordinates.length;c++){var u=n.coordinates[c],m={type:l,coordinates:u};if(e(De(m,r),i,c)===!1)return!1}})}function Nt(t,e){Ue(t,function(n,i,r){var a=0;if(n.geometry){var o=n.geometry.type;if(!(o==="Point"||o==="MultiPoint")){var s,l=0,c=0,u=0;if(cn(n,function(m,b,T,O,N){if(s===void 0||i>l||O>c||N>u){s=m,l=i,c=O,u=N,a=0;return}var p=te([s,m],n.properties);if(e(p,i,r,N,a)===!1)return!1;a++,s=m})===!1)return!1}}})}function Mc(t,e,n){var i=n,r=!1;return Nt(t,function(a,o,s,l,c){r===!1&&n===void 0?i=a:i=e(i,a,o,s,l,c),r=!0}),i}function yi(t,e={}){if(t.bbox!=null&&e.recompute!==!0)return t.bbox;let n=[1/0,1/0,-1/0,-1/0];return cn(t,i=>{n[0]>i[0]&&(n[0]=i[0]),n[1]>i[1]&&(n[1]=i[1]),n[2]<i[0]&&(n[2]=i[0]),n[3]<i[1]&&(n[3]=i[1])}),n}function Cd(t,e={}){let n=Number(t[0]),i=Number(t[1]),r=Number(t[2]),a=Number(t[3]);if(t.length===6)throw new Error("@turf/bbox-polygon does not support BBox with 6 positions");let o=[n,i];return Ge([[o,[r,i],[r,a],[n,a],o]],e.properties,{bbox:t,id:e.id})}var Md=class{constructor(t){this.points=t.points||[],this.duration=t.duration||1e4,this.sharpness=t.sharpness||.85,this.centers=[],this.controls=[],this.stepLength=t.stepLength||60,this.length=this.points.length,this.delay=0;for(let e=0;e<this.length;e++)this.points[e].z=this.points[e].z||0;for(let e=0;e<this.length-1;e++){let n=this.points[e],i=this.points[e+1];this.centers.push({x:(n.x+i.x)/2,y:(n.y+i.y)/2,z:(n.z+i.z)/2})}this.controls.push([this.points[0],this.points[0]]);for(let e=0;e<this.centers.length-1;e++){let n=this.points[e+1].x-(this.centers[e].x+this.centers[e+1].x)/2,i=this.points[e+1].y-(this.centers[e].y+this.centers[e+1].y)/2,r=this.points[e+1].z-(this.centers[e].y+this.centers[e+1].z)/2;this.controls.push([{x:(1-this.sharpness)*this.points[e+1].x+this.sharpness*(this.centers[e].x+n),y:(1-this.sharpness)*this.points[e+1].y+this.sharpness*(this.centers[e].y+i),z:(1-this.sharpness)*this.points[e+1].z+this.sharpness*(this.centers[e].z+r)},{x:(1-this.sharpness)*this.points[e+1].x+this.sharpness*(this.centers[e+1].x+n),y:(1-this.sharpness)*this.points[e+1].y+this.sharpness*(this.centers[e+1].y+i),z:(1-this.sharpness)*this.points[e+1].z+this.sharpness*(this.centers[e+1].z+r)}])}return this.controls.push([this.points[this.length-1],this.points[this.length-1]]),this.steps=this.cacheSteps(this.stepLength),this}cacheSteps(t){let e=[],n=this.pos(0);e.push(0);for(let i=0;i<this.duration;i+=10){let r=this.pos(i);Math.sqrt((r.x-n.x)*(r.x-n.x)+(r.y-n.y)*(r.y-n.y)+(r.z-n.z)*(r.z-n.z))>t&&(e.push(i),n=r)}return e}vector(t){let e=this.pos(t+10),n=this.pos(t-10);return{angle:180*Math.atan2(e.y-n.y,e.x-n.x)/3.14,speed:Math.sqrt((n.x-e.x)*(n.x-e.x)+(n.y-e.y)*(n.y-e.y)+(n.z-e.z)*(n.z-e.z))}}pos(t){let e=t-this.delay;e<0&&(e=0),e>this.duration&&(e=this.duration-1);let n=e/this.duration;if(n>=1)return this.points[this.length-1];let i=Math.floor((this.points.length-1)*n),r=(this.length-1)*n-i;return Id(r,this.points[i],this.controls[i][1],this.controls[i+1][0],this.points[i+1])}};function Id(t,e,n,i,r){let a=Ed(t);return{x:r.x*a[0]+i.x*a[1]+n.x*a[2]+e.x*a[3],y:r.y*a[0]+i.y*a[1]+n.y*a[2]+e.y*a[3],z:r.z*a[0]+i.z*a[1]+n.z*a[2]+e.z*a[3]}}function Ed(t){let e=t*t;return[e*t,3*e*(1-t),3*t*(1-t)*(1-t),(1-t)*(1-t)*(1-t)]}function Td(t,e={}){let n=e.resolution||1e4,i=e.sharpness||.85,r=[],a=le(t).coordinates.map(c=>({x:c[0],y:c[1]})),o=new Md({duration:n,points:a,sharpness:i}),s=c=>{var u=o.pos(c);Math.floor(c/100)%2===0&&r.push([u.x,u.y])};for(var l=0;l<o.duration;l+=10)s(l);return s(o.duration),te(r,e.properties)}function _d(t,e){var n=0,i=0,r=0,a=0,o=0,s=0,l=0,c=0,u=null,m=null,b=t[0],T=t[1],O=e.length;for(n;n<O;n++){i=0;var N=e[n].length-1,p=e[n];if(u=p[0],u[0]!==p[N][0]&&u[1]!==p[N][1])throw new Error("First and last coordinates in a ring must be the same");for(o=u[0]-b,s=u[1]-T,i;i<N;i++){if(m=p[i+1],c=m[1]-T,s<0&&c<0||s>0&&c>0){u=m,s=c,o=u[0]-b;continue}if(l=m[0]-t[0],c>0&&s<=0){if(a=o*c-l*s,a>0)r=r+1;else if(a===0)return 0}else if(s>0&&c<=0){if(a=o*c-l*s,a<0)r=r+1;else if(a===0)return 0}else if(c===0&&s<0){if(a=o*c-l*s,a===0)return 0}else if(s===0&&c<0){if(a=o*c-l*s,a===0)return 0}else if(s===0&&c===0){if(l<=0&&o>=0)return 0;if(o<=0&&l>=0)return 0}u=m,s=c,o=l}}return r%2!==0}var Ic=_d;function ui(t,e,n={}){if(!t)throw new Error("point is required");if(!e)throw new Error("polygon is required");let i=Se(t),r=le(e),a=r.type,o=e.bbox,s=r.coordinates;if(o&&kd(i,o)===!1)return!1;a==="Polygon"&&(s=[s]);let l=!1;for(var c=0;c<s.length;++c){let u=Ic(i,s[c]);if(u===0)return!n.ignoreBoundary;u&&(l=!0)}return l}function kd(t,e){return e[0]<=t[0]&&e[1]<=t[1]&&e[2]>=t[0]&&e[3]>=t[1]}function bi(t,e,n={}){let i=Se(t),r=je(e);for(let a=0;a<r.length-1;a++){let o=!1;if(n.ignoreEndVertices&&(a===0&&(o="start"),a===r.length-2&&(o="end"),a===0&&a+1===r.length-1&&(o="both")),Ld(r[a],r[a+1],i,o,typeof n.epsilon>"u"?null:n.epsilon))return!0}return!1}function Ld(t,e,n,i,r){let a=n[0],o=n[1],s=t[0],l=t[1],c=e[0],u=e[1],m=n[0]-s,b=n[1]-l,T=c-s,O=u-l,N=m*O-b*T;if(r!==null){if(Math.abs(N)>r)return!1}else if(N!==0)return!1;if(i){if(i==="start")return Math.abs(T)>=Math.abs(O)?T>0?s<a&&a<=c:c<=a&&a<s:O>0?l<o&&o<=u:u<=o&&o<l;if(i==="end")return Math.abs(T)>=Math.abs(O)?T>0?s<=a&&a<c:c<a&&a<=s:O>0?l<=o&&o<u:u<o&&o<=l;if(i==="both")return Math.abs(T)>=Math.abs(O)?T>0?s<a&&a<c:c<a&&a<s:O>0?l<o&&o<u:u<o&&o<l}else return Math.abs(T)>=Math.abs(O)?T>0?s<=a&&a<=c:c<=a&&a<=s:O>0?l<=o&&o<=u:u<=o&&o<=l;return!1}var mn=class{constructor(e=[],n=Fd){if(this.data=e,this.length=this.data.length,this.compare=n,this.length>0)for(let i=(this.length>>1)-1;i>=0;i--)this._down(i)}push(e){this.data.push(e),this.length++,this._up(this.length-1)}pop(){if(this.length===0)return;let e=this.data[0],n=this.data.pop();return this.length--,this.length>0&&(this.data[0]=n,this._down(0)),e}peek(){return this.data[0]}_up(e){let{data:n,compare:i}=this,r=n[e];for(;e>0;){let a=e-1>>1,o=n[a];if(i(r,o)>=0)break;n[e]=o,e=a}n[e]=r}_down(e){let{data:n,compare:i}=this,r=this.length>>1,a=n[e];for(;e<r;){let o=(e<<1)+1,s=n[o],l=o+1;if(l<this.length&&i(n[l],s)<0&&(o=l,s=n[l]),i(s,a)>=0)break;n[e]=s,e=o}n[e]=a}};function Fd(t,e){return t<e?-1:t>e?1:0}function Tc(t,e){return t.p.x>e.p.x?1:t.p.x<e.p.x?-1:t.p.y!==e.p.y?t.p.y>e.p.y?1:-1:1}function Ad(t,e){return t.rightSweepEvent.p.x>e.rightSweepEvent.p.x?1:t.rightSweepEvent.p.x<e.rightSweepEvent.p.x?-1:t.rightSweepEvent.p.y!==e.rightSweepEvent.p.y?t.rightSweepEvent.p.y<e.rightSweepEvent.p.y?1:-1:1}var hn=class{constructor(e,n,i,r){this.p={x:e[0],y:e[1]},this.featureId=n,this.ringId=i,this.eventId=r,this.otherEvent=null,this.isLeftEndpoint=null}isSamePoint(e){return this.p.x===e.p.x&&this.p.y===e.p.y}};function Dd(t,e){if(t.type==="FeatureCollection"){let n=t.features;for(let i=0;i<n.length;i++)Ec(n[i],e)}else Ec(t,e)}var pn=0,dn=0,fn=0;function Ec(t,e){let n=t.type==="Feature"?t.geometry:t,i=n.coordinates;(n.type==="Polygon"||n.type==="MultiLineString")&&(i=[i]),n.type==="LineString"&&(i=[[i]]);for(let r=0;r<i.length;r++)for(let a=0;a<i[r].length;a++){let o=i[r][a][0],s=null;dn=dn+1;for(let l=0;l<i[r][a].length-1;l++){s=i[r][a][l+1];let c=new hn(o,pn,dn,fn),u=new hn(s,pn,dn,fn+1);c.otherEvent=u,u.otherEvent=c,Tc(c,u)>0?(u.isLeftEndpoint=!0,c.isLeftEndpoint=!1):(c.isLeftEndpoint=!0,u.isLeftEndpoint=!1),e.push(c),e.push(u),o=s,fn=fn+1}}pn=pn+1}var uo=class{constructor(e){this.leftSweepEvent=e,this.rightSweepEvent=e.otherEvent}};function Od(t,e){if(t===null||e===null||t.leftSweepEvent.ringId===e.leftSweepEvent.ringId&&(t.rightSweepEvent.isSamePoint(e.leftSweepEvent)||t.rightSweepEvent.isSamePoint(e.leftSweepEvent)||t.rightSweepEvent.isSamePoint(e.rightSweepEvent)||t.leftSweepEvent.isSamePoint(e.leftSweepEvent)||t.leftSweepEvent.isSamePoint(e.rightSweepEvent)))return!1;let n=t.leftSweepEvent.p.x,i=t.leftSweepEvent.p.y,r=t.rightSweepEvent.p.x,a=t.rightSweepEvent.p.y,o=e.leftSweepEvent.p.x,s=e.leftSweepEvent.p.y,l=e.rightSweepEvent.p.x,c=e.rightSweepEvent.p.y,u=(c-s)*(r-n)-(l-o)*(a-i),m=(l-o)*(i-s)-(c-s)*(n-o),b=(r-n)*(i-s)-(a-i)*(n-o);if(u===0)return!1;let T=m/u,O=b/u;if(T>=0&&T<=1&&O>=0&&O<=1){let N=n+T*(r-n),p=i+T*(a-i);return[N,p]}return!1}function Bd(t,e){e=e||!1;let n=[],i=new mn([],Ad);for(;t.length;){let r=t.pop();if(r.isLeftEndpoint){let a=new uo(r);for(let o=0;o<i.data.length;o++){let s=i.data[o];if(e&&s.leftSweepEvent.featureId===r.featureId)continue;let l=Od(a,s);l!==!1&&n.push(l)}i.push(a)}else r.isLeftEndpoint===!1&&i.pop()}return n}function Rd(t,e){let n=new mn([],Tc);return Dd(t,n),Bd(n,e)}var _c=Rd;var jd=_c;function pe(t,e,n={}){let{removeDuplicates:i=!0,ignoreSelfIntersections:r=!1}=n,a=[];t.type==="FeatureCollection"?a=a.concat(t.features):t.type==="Feature"?a.push(t):(t.type==="LineString"||t.type==="Polygon"||t.type==="MultiLineString"||t.type==="MultiPolygon")&&a.push(De(t)),e.type==="FeatureCollection"?a=a.concat(e.features):e.type==="Feature"?a.push(e):(e.type==="LineString"||e.type==="Polygon"||e.type==="MultiLineString"||e.type==="MultiPolygon")&&a.push(De(e));let o=jd(Re(a),r),s=[];if(i){let l={};o.forEach(c=>{let u=c.join(",");l[u]||(l[u]=!0,s.push(c))})}else s=o;return Re(s.map(l=>ne(l)))}function Ui(t,e={}){let n=le(t);switch(!e.properties&&t.type==="Feature"&&(e.properties=t.properties),n.type){case"Polygon":return $d(n,e);case"MultiPolygon":return Nd(n,e);default:throw new Error("invalid poly")}}function $d(t,e={}){let i=le(t).coordinates,r=e.properties?e.properties:t.type==="Feature"?t.properties:{};return kc(i,r)}function Nd(t,e={}){let i=le(t).coordinates,r=e.properties?e.properties:t.type==="Feature"?t.properties:{},a=[];return i.forEach(o=>{a.push(kc(o,r))}),Re(a)}function kc(t,e){return t.length>1?Cc(t,e):te(t[0],e)}function Dc(t,e){var n=le(t),i=le(e),r=n.type,a=i.type;switch(r){case"MultiPoint":switch(a){case"LineString":return Lc(n,i);case"Polygon":return Ac(n,i);default:throw new Error("feature2 "+a+" geometry not supported")}case"LineString":switch(a){case"MultiPoint":return Lc(i,n);case"LineString":return Gd(n,i);case"Polygon":return Fc(n,i);default:throw new Error("feature2 "+a+" geometry not supported")}case"Polygon":switch(a){case"MultiPoint":return Ac(i,n);case"LineString":return Fc(i,n);default:throw new Error("feature2 "+a+" geometry not supported")}default:throw new Error("feature1 "+r+" geometry not supported")}}function Lc(t,e){for(var n=!1,i=!1,r=t.coordinates.length,a=0;a<r&&!n&&!i;){for(var o=0;o<e.coordinates.length-1;o++){var s=!0;(o===0||o===e.coordinates.length-2)&&(s=!1),Oc(e.coordinates[o],e.coordinates[o+1],t.coordinates[a],s)?n=!0:i=!0}a++}return n&&i}function Gd(t,e){var n=pe(t,e);if(n.features.length>0)for(var i=0;i<t.coordinates.length-1;i++)for(var r=0;r<e.coordinates.length-1;r++){var a=!0;if((r===0||r===e.coordinates.length-2)&&(a=!1),Oc(t.coordinates[i],t.coordinates[i+1],e.coordinates[r],a))return!0}return!1}function Fc(t,e){let n=Ui(e);return pe(t,n).features.length>0}function Ac(t,e){var n=!1,i=!1,r=t.coordinates.length;for(let a=0;a<r&&(!n||!i);a++)ui(ne(t.coordinates[a]),e)?n=!0:i=!0;return i&&n}function Oc(t,e,n,i){var r=n[0]-t[0],a=n[1]-t[1],o=e[0]-t[0],s=e[1]-t[1],l=r*s-a*o;return l!==0?!1:i?Math.abs(o)>=Math.abs(s)?o>0?t[0]<=n[0]&&n[0]<=e[0]:e[0]<=n[0]&&n[0]<=t[0]:s>0?t[1]<=n[1]&&n[1]<=e[1]:e[1]<=n[1]&&n[1]<=t[1]:Math.abs(o)>=Math.abs(s)?o>0?t[0]<n[0]&&n[0]<e[0]:e[0]<n[0]&&n[0]<t[0]:s>0?t[1]<n[1]&&n[1]<e[1]:e[1]<n[1]&&n[1]<t[1]}function gn(t,e,n={}){var i;let r=(i=n.ignoreSelfIntersections)!=null?i:!1,a=!0;return Ue(t,o=>{Ue(e,s=>{if(a===!1)return!1;a=Ud(o.geometry,s.geometry,r)})}),a}function Ud(t,e,n){switch(t.type){case"Point":switch(e.type){case"Point":return!Wd(t.coordinates,e.coordinates);case"LineString":return!Bc(e,t);case"Polygon":return!ui(t,e)}break;case"LineString":switch(e.type){case"Point":return!Bc(t,e);case"LineString":return!Vd(t,e,n);case"Polygon":return!Rc(e,t,n)}break;case"Polygon":switch(e.type){case"Point":return!ui(e,t);case"LineString":return!Rc(t,e,n);case"Polygon":return!zd(e,t,n)}}return!1}function Bc(t,e){for(let n=0;n<t.coordinates.length-1;n++)if(Hd(t.coordinates[n],t.coordinates[n+1],e.coordinates))return!0;return!1}function Vd(t,e,n){return pe(t,e,{ignoreSelfIntersections:n}).features.length>0}function Rc(t,e,n){for(let r of e.coordinates)if(ui(r,t))return!0;return pe(e,Ui(t),{ignoreSelfIntersections:n}).features.length>0}function zd(t,e,n){for(let r of t.coordinates[0])if(ui(r,e))return!0;for(let r of e.coordinates[0])if(ui(r,t))return!0;return pe(Ui(t),Ui(e),{ignoreSelfIntersections:n}).features.length>0}function Hd(t,e,n){let i=n[0]-t[0],r=n[1]-t[1],a=e[0]-t[0],o=e[1]-t[1];return i*o-r*a!==0?!1:Math.abs(a)>=Math.abs(o)?a>0?t[0]<=n[0]&&n[0]<=e[0]:e[0]<=n[0]&&n[0]<=t[0]:o>0?t[1]<=n[1]&&n[1]<=e[1]:e[1]<=n[1]&&n[1]<=t[1]}function Wd(t,e){return t[0]===e[0]&&t[1]===e[1]}var qd=Object.defineProperty,Vi=(t,e)=>qd(t,"name",{value:e,configurable:!0}),$c=class{constructor(e){this.direction=!1,this.compareProperties=!0;var n,i,r;this.precision=10**-((n=e?.precision)!=null?n:17),this.direction=(i=e?.direction)!=null?i:!1,this.compareProperties=(r=e?.compareProperties)!=null?r:!0}compare(e,n){if(e.type!==n.type||!cr(e,n))return!1;switch(e.type){case"Point":return this.compareCoord(e.coordinates,n.coordinates);case"LineString":return this.compareLine(e.coordinates,n.coordinates);case"Polygon":return this.comparePolygon(e,n);case"GeometryCollection":return this.compareGeometryCollection(e,n);case"Feature":return this.compareFeature(e,n);case"FeatureCollection":return this.compareFeatureCollection(e,n);default:if(e.type.startsWith("Multi")){let i=po(e),r=po(n);return i.every(a=>r.some(o=>this.compare(a,o)))}}return!1}compareCoord(e,n){return e.length===n.length&&e.every((i,r)=>Math.abs(i-n[r])<this.precision)}compareLine(e,n,i=0,r=!1){if(!cr(e,n))return!1;let a=e,o=n;if(r&&!this.compareCoord(a[0],o[0])){let l=this.fixStartIndex(o,a);if(l)o=l;else return!1}let s=this.compareCoord(a[i],o[i]);return this.direction||s?this.comparePath(a,o):this.compareCoord(a[i],o[o.length-(1+i)])?this.comparePath(a.slice().reverse(),o):!1}fixStartIndex(e,n){let i,r=-1;for(let a=0;a<e.length;a++)if(this.compareCoord(e[a],n[0])){r=a;break}return r>=0&&(i=[].concat(e.slice(r,e.length),e.slice(1,r+1))),i}comparePath(e,n){return e.every((i,r)=>this.compareCoord(i,n[r]))}comparePolygon(e,n){if(this.compareLine(e.coordinates[0],n.coordinates[0],1,!0)){let i=e.coordinates.slice(1,e.coordinates.length),r=n.coordinates.slice(1,n.coordinates.length);return i.every(a=>r.some(o=>this.compareLine(a,o,1,!0)))}return!1}compareGeometryCollection(e,n){return cr(e.geometries,n.geometries)&&this.compareBBox(e,n)&&e.geometries.every((i,r)=>this.compare(i,n.geometries[r]))}compareFeature(e,n){return e.id===n.id&&(this.compareProperties?mo(e.properties,n.properties):!0)&&this.compareBBox(e,n)&&this.compare(e.geometry,n.geometry)}compareFeatureCollection(e,n){return cr(e.features,n.features)&&this.compareBBox(e,n)&&e.features.every((i,r)=>this.compare(i,n.features[r]))}compareBBox(e,n){return!e.bbox&&!n.bbox||(e.bbox&&n.bbox?this.compareCoord(e.bbox,n.bbox):!1)}};Vi($c,"GeojsonEquality");var Yd=$c;function cr(t,e){return t.coordinates?t.coordinates.length===e.coordinates.length:t.length===e.length}Vi(cr,"sameLength");function po(t){return t.coordinates.map(e=>({type:t.type.replace("Multi",""),coordinates:e}))}Vi(po,"explode");function fo(t,e,n){return new Yd(n).compare(t,e)}Vi(fo,"geojsonEquality");function mo(t,e){if(t===null&&e===null)return!0;if(t===null||e===null)return!1;let n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(var r of n){let a=t[r],o=e[r],s=jc(a)&&jc(o);if(s&&!mo(a,o)||!s&&a!==o)return!1}return!0}Vi(mo,"equal");var jc=Vi(t=>t!=null&&typeof t=="object","isObject");function Xd(t,e,n={}){var i;let r=(i=n.ignoreSelfIntersections)!=null?i:!1,a=!1;return Ue(t,o=>{Ue(e,s=>{if(a===!0)return!0;a=!gn(o.geometry,s.geometry,{ignoreSelfIntersections:r})})}),a}var Ve=gr(Nc(),1);function Gc(t){var e=new Ve.default(t);return e.insert=function(n){if(n.type!=="Feature")throw new Error("invalid feature");return n.bbox=n.bbox?n.bbox:yi(n),Ve.default.prototype.insert.call(this,n)},e.load=function(n){var i=[];return Array.isArray(n)?n.forEach(function(r){if(r.type!=="Feature")throw new Error("invalid features");r.bbox=r.bbox?r.bbox:yi(r),i.push(r)}):un(n,function(r){if(r.type!=="Feature")throw new Error("invalid features");r.bbox=r.bbox?r.bbox:yi(r),i.push(r)}),Ve.default.prototype.load.call(this,i)},e.remove=function(n,i){if(n.type!=="Feature")throw new Error("invalid feature");return n.bbox=n.bbox?n.bbox:yi(n),Ve.default.prototype.remove.call(this,n,i)},e.clear=function(){return Ve.default.prototype.clear.call(this)},e.search=function(n){var i=Ve.default.prototype.search.call(this,this.toBBox(n));return Re(i)},e.collides=function(n){return Ve.default.prototype.collides.call(this,this.toBBox(n))},e.all=function(){var n=Ve.default.prototype.all.call(this);return Re(n)},e.toJSON=function(){return Ve.default.prototype.toJSON.call(this)},e.fromJSON=function(n){return Ve.default.prototype.fromJSON.call(this,n)},e.toBBox=function(n){var i;if(n.bbox)i=n.bbox;else if(Array.isArray(n)&&n.length===4)i=n;else if(Array.isArray(n)&&n.length===6)i=[n[0],n[1],n[3],n[4]];else if(n.type==="Feature")i=yi(n);else if(n.type==="FeatureCollection")i=yi(n);else throw new Error("invalid geojson");return{minX:i[0],minY:i[1],maxX:i[2],maxY:i[3]}},e}function ur(t){if(!t)throw new Error("geojson is required");let e=[];return Ue(t,n=>{Jd(n,e)}),Re(e)}function Jd(t,e){let n=[],i=t.geometry;if(i!==null){switch(i.type){case"Polygon":n=je(i);break;case"LineString":n=[je(i)]}n.forEach(r=>{Kd(r,t.properties).forEach(o=>{o.id=e.length,e.push(o)})})}}function Kd(t,e){let n=[];return t.reduce((i,r)=>{let a=te([i,r],e);return a.bbox=Qd(i,r),n.push(a),r}),n}function Qd(t,e){let n=t[0],i=t[1],r=e[0],a=e[1],o=n<r?n:r,s=i<a?i:a,l=n>r?n:r,c=i>a?i:a;return[o,s,l,c]}var Zd=Object.defineProperty,ef=Object.defineProperties,tf=Object.getOwnPropertyDescriptors,Uc=Object.getOwnPropertySymbols,rf=Object.prototype.hasOwnProperty,nf=Object.prototype.propertyIsEnumerable,Vc=(t,e,n)=>e in t?Zd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,xi=(t,e)=>{for(var n in e||(e={}))rf.call(e,n)&&Vc(t,n,e[n]);if(Uc)for(var n of Uc(e))nf.call(e,n)&&Vc(t,n,e[n]);return t},Pi=(t,e)=>ef(t,tf(e));function pr(t,e,n={}){if(!t||!e)throw new Error("lines and pt are required arguments");let i=ne([1/0,1/0],{dist:1/0,index:-1,multiFeatureIndex:-1,location:-1}),r=0;return Ue(t,function(a,o,s){let l=je(a);for(let c=0;c<l.length-1;c++){let u=ne(l[c]);u.properties.dist=we(e,u,n);let m=ne(l[c+1]);m.properties.dist=we(e,m,n);let b=we(u,m,n),T=Math.max(u.properties.dist,m.properties.dist),O=ci(u,m),N=lr(e,T,O+90,n),p=lr(e,T,O-90,n),f=pe(te([N.geometry.coordinates,p.geometry.coordinates]),te([u.geometry.coordinates,m.geometry.coordinates])),g;f.features.length>0&&f.features[0]&&(g=Pi(xi({},f.features[0]),{properties:{dist:we(e,f.features[0],n),multiFeatureIndex:s,location:r+we(u,f.features[0],n)}})),u.properties.dist<i.properties.dist&&(i=Pi(xi({},u),{properties:Pi(xi({},u.properties),{index:c,multiFeatureIndex:s,location:r})})),m.properties.dist<i.properties.dist&&(i=Pi(xi({},m),{properties:Pi(xi({},m.properties),{index:c+1,multiFeatureIndex:s,location:r+b})})),g&&g.properties.dist<i.properties.dist&&(i=Pi(xi({},g),{properties:Pi(xi({},g.properties),{index:c})})),r+=b}}),i}var zi=gr(no(),1);function zc(t,e,n={}){if(n=n||{},!lo(n))throw new Error("options is invalid");var i=n.tolerance||0,r=[],a=Gc();let o=ur(t);a.load(o);var s;let l=[];return Nt(e,function(c){var u=!1;c&&(un(a.search(c),function(m){if(u===!1){var b=je(c).sort(),T=je(m).sort();if((0,zi.default)(b,T))u=!0,s?s=vo(s,c)||s:s=c;else if(i===0?bi(b[0],m)&&bi(b[1],m):pr(m,b[0]).properties.dist<=i&&pr(m,b[1]).properties.dist<=i)u=!0,s?s=vo(s,c)||s:s=c;else if(i===0?bi(T[0],c)&&bi(T[1],c):pr(c,T[0]).properties.dist<=i&&pr(c,T[1]).properties.dist<=i)if(s){let O=vo(s,m);O?s=O:l.push(m)}else s=m}}),u===!1&&s&&(r.push(s),l.length&&(r=r.concat(l),l=[]),s=void 0))}),s&&r.push(s),Re(r)}function vo(t,e){var n=je(e),i=je(t),r=i[0],a=i[i.length-1],o=t.geometry.coordinates;if((0,zi.default)(n[0],r))o.unshift(n[1]);else if((0,zi.default)(n[0],a))o.push(n[1]);else if((0,zi.default)(n[1],r))o.unshift(n[0]);else if((0,zi.default)(n[1],a))o.push(n[0]);else return;return t}function af(t,e){let n=le(t),i=le(e),r=n.type,a=i.type;if(r==="MultiPoint"&&a!=="MultiPoint"||(r==="LineString"||r==="MultiLineString")&&a!=="LineString"&&a!=="MultiLineString"||(r==="Polygon"||r==="MultiPolygon")&&a!=="Polygon"&&a!=="MultiPolygon")throw new Error("features must be of the same type");if(r==="Point")throw new Error("Point geometry not supported");if(fo(t,e,{precision:6}))return!1;let o=0;switch(r){case"MultiPoint":for(var s=0;s<n.coordinates.length;s++)for(var l=0;l<i.coordinates.length;l++){var c=n.coordinates[s],u=i.coordinates[l];if(c[0]===u[0]&&c[1]===u[1])return!0}return!1;case"LineString":case"MultiLineString":Nt(t,m=>{Nt(e,b=>{zc(m,b).features.length&&o++})});break;case"Polygon":case"MultiPolygon":Nt(t,m=>{Nt(e,b=>{pe(m,b).features.length&&o++})});break}return o>0}function of(t){if(!t.type)return!1;let e=le(t),n=e.type,i=e.coordinates;switch(n){case"Point":return i.length>1;case"MultiPoint":for(var r=0;r<i.length;r++)if(i[r].length<2)return!1;return!0;case"LineString":if(i.length<2)return!1;for(var r=0;r<i.length;r++)if(i[r].length<2)return!1;return!0;case"MultiLineString":if(i.length<2)return!1;for(var r=0;r<i.length;r++)if(i[r].length<2)return!1;return!0;case"Polygon":for(var r=0;r<e.coordinates.length;r++)if(i[r].length<4||!Hc(i[r])||Wc(i[r])||r>0&&pe(Ge([i[0]]),Ge([i[r]])).features.length>1)return!1;return!0;case"MultiPolygon":for(var r=0;r<e.coordinates.length;r++)for(var a=e.coordinates[r],o=0;o<a.length;o++)if(a[o].length<4||!Hc(a[o])||Wc(a[o])||o===0&&!sf(a,e.coordinates,r)||o>0&&pe(Ge([a[0]]),Ge([a[o]])).features.length>1)return!1;return!0;default:return!1}}function Hc(t){return t[0][0]===t[t.length-1][0]&&t[0][1]===t[t.length-1][1]}function Wc(t){for(var e=0;e<t.length-1;e++)for(var n=t[e],i=e+1;i<t.length-2;i++){var r=[t[i],t[i+1]];if(bi(n,te(r)))return!0}return!1}function sf(t,e,n){for(var i=Ge(t),r=n+1;r<e.length;r++)if(!gn(i,Ge(e[r]))&&Dc(i,te(e[r][0])))return!1;return!0}function qc(t,e,n={}){let i=Se(t),r=Se(e);r[0]+=r[0]-i[0]>180?-360:i[0]-r[0]>180?360:0;let a=lf(i,r);return sn(a,"meters",n.units)}function lf(t,e,n){n=n===void 0?Pe:Number(n);let i=n,r=t[1]*Math.PI/180,a=e[1]*Math.PI/180,o=a-r,s=Math.abs(e[0]-t[0])*Math.PI/180;s>Math.PI&&(s-=2*Math.PI);let l=Math.log(Math.tan(a/2+Math.PI/4)/Math.tan(r/2+Math.PI/4)),c=Math.abs(l)>1e-11?o/l:Math.cos(r);return Math.sqrt(o*o+c*c*s*s)*i}function dr(t,e={}){return Mc(t,(n,i)=>{let r=i.geometry.coordinates;return n+we(r[0],r[1],e)},0)}function bo(t,e,n={}){if(n.method||(n.method="geodesic"),n.units||(n.units="kilometers"),!t)throw new Error("pt is required");if(Array.isArray(t)?t=ne(t):t.type==="Point"?t=De(t):co(t,"Point","point"),!e)throw new Error("line is required");Array.isArray(e)?e=te(e):e.type==="LineString"?e=De(e):co(e,"LineString","line");let i=1/0,r=t.geometry.coordinates;return Nt(e,a=>{let o=a.geometry.coordinates[0],s=a.geometry.coordinates[1],l=cf(r,o,s,n);l<i&&(i=l)}),sn(i,"degrees",n.units)}function cf(t,e,n,i){let r=[n[0]-e[0],n[1]-e[1]],a=[t[0]-e[0],t[1]-e[1]],o=Yc(a,r);if(o<=0)return yo(t,e,{method:i.method,units:"degrees"});let s=Yc(r,r);if(s<=o)return yo(t,n,{method:i.method,units:"degrees"});let l=o/s,c=[e[0]+l*r[0],e[1]+l*r[1]];return yo(t,c,{method:i.method,units:"degrees"})}function Yc(t,e){return t[0]*e[0]+t[1]*e[1]}function yo(t,e,n){return n.method==="planar"?qc(t,e,n):we(t,e,n)}var fr=class{constructor(e){e&&Object.assign(this,e)}};var Xc=(()=>{let e=class e{constructor(i){this.userService=i,this.onFeatureSelectedFromMap=new ko,this.generateGuidance=new C,this.nonAnchorGenerateGuidance=new C,this.pushToPathPlansList=new C,this.forceSelectActivity=new C,this.forceSelectAlgorithm=new C,this.forceSetOptions=new C,this.bearingToggled=new C,this.customHeadingPanelVisible=new C,this.currentPathPlan=new C,this.resetBearings=new C,this.companyActivities=new C,this.selectedActivity=new H(null),this.currentField=new C,this.currentBoundaryArea=new C,this.isSaved=new H(!1),this.isDirty=new C,this.currentCurvedGuidanceRequest=new C,this.currentStraightGuidanceRequest=new C,this.currentGuidanceResultsViewModel=new C,this.updatingResults=new C,this.pathPlanParams=[new fr({selectedActivity:null,exteriorHeadlandPasses:1,interiorHeadlandPasses:1,units:null,boundaryId:null,constraints:null,pathPlanId:null,isAnchorActivity:!1,name:null,equipmentOverride:{swathWidth:null,speedTurning:null,speedWorking:null}})],this.guidanceResults=new C,this.guidanceResultsArray=[void 0,void 0,void 0],this.rememberBearings=[],this.chosenResults=[],this.currentAlgorithm=new C,this.currentVBoundary=new C,this.currentBoundaryIndex=new C,this.currentBulkRequest={boundaryIds:[],name:null,options:[{bulkGuidanceOptionId:"1",onlySuggested:!0,onlySummary:!1,exteriorPasses:1,interiorPasses:1,equipmentOverride:{swathWidth:null,speedTurning:null,speedWorking:null},swathWidthOriginalUnit:"m",fieldOperationType:null}]},this.bulkJobId$=new C,this.efficiency=new C,this.efficiency$=this.efficiency.asObservable()}ngOnDestroy(){this.generateGuidance.unsubscribe(),this.generateGuidance=null,this.nonAnchorGenerateGuidance.unsubscribe(),this.nonAnchorGenerateGuidance=null,this.pushToPathPlansList.unsubscribe(),this.pushToPathPlansList=null,this.forceSelectActivity.unsubscribe(),this.forceSelectActivity=null,this.forceSelectAlgorithm.unsubscribe(),this.forceSelectAlgorithm=null,this.forceSetOptions.unsubscribe(),this.forceSetOptions=null,this.bearingToggled.unsubscribe(),this.bearingToggled=null,this.currentPathPlan.unsubscribe(),this.currentPathPlan=null,this.resetBearings.unsubscribe(),this.resetBearings=null,this.currentAlgorithm.unsubscribe(),this.currentAlgorithm=null,this.currentVBoundary.unsubscribe(),this.currentVBoundary=null,this.currentBoundaryIndex.unsubscribe(),this.currentBoundaryIndex=null,this.bulkJobId$.unsubscribe(),this.bulkJobId$=null}clearPathPlanParams(){this.pathPlanParams.forEach(i=>{i.selectedActivity=void 0,i.equipmentOverride.swathWidth=void 0,i.name=void 0})}setPathPlanParams(i){this.pathPlanParams[0]=new fr({selectedActivity:i.activity,algorithm:i.algorithm,units:i.swathWidthOriginalUnit,exteriorHeadlandPasses:i.exteriorHeadlandCount,interiorHeadlandPasses:i.interiorHeadlandCount,boundaryId:i.boundaryId,equipmentOverride:{swathWidth:i.swathWidth??0}})}};e.\u0275fac=function(r){return new(r||e)(M(Oe))},e.\u0275prov=j({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var Jc=(()=>{let e=class e extends Oi{constructor(i,r){super(),this.pathPlanningService=i,this.notificationManagerService=r,this.sidePanelWidth=ei.sidebarWidthLg,this.selectedFieldsList$=new C,this.bulkSelectedFields$=new C,this.multiSelectFields=new C,this.boundaries$=new C,this.headlands=[],this.headlandsFeature=new C,this.resultsFeature=new C,this.innerBoundariesFeature=new C,this.crossHatchFeature=new C,this.referencedEdgeFeature=new C,this.referencedLineFeature=new C,this.lineOfBestFitFeature=new C,this.abLineFeature=new C,this.coverageAvailable$=new H(!1),this.coverageLayerVisibilityChanges=new C,this.slopesLayerVisibilityChanges=new C,this.hasSlopes=new H(!1),this.isPassable=new H(!1),this.isTurnRows=new H(!1),this.computeAutoDecomposition=new H(!1),this.extendTracks=new H(!1),this.mapContentHeight$=new C,this.fieldPartBBoxScaleFactor=1.2,this.referenceLineScaleFactor=20,this.slopeCategories=[{minSlope:0,maxSlope:1},{minSlope:1,maxSlope:3},{minSlope:3,maxSlope:5},{minSlope:5,maxSlope:8},{minSlope:8,maxSlope:100}]}addSimpleBoundary(i){this.singleFieldBoundary=new ae(i.map(r=>new Me(r))),this.boundaries$.next(this.singleFieldBoundary)}addVBoundaryGroup(i){i.forEach(r=>{this.groupOfVBoundaries.push(this.convertVBoundaryToGeojson(r,!1).features)}),this.singleFieldBoundary=new ae([].concat(...this.groupOfVBoundaries)),this.boundaries$.next(this.singleFieldBoundary)}addVBoundary(i){this.singleFieldBoundary=this.convertVBoundaryToGeojson(i,!1),this.boundaryLabels=this.convertVBoundaryToGeojson(i,!0),this.boundaries$.next(this.singleFieldBoundary)}changeVBoundary(i,r){this.groupOfVBoundaries.splice(r,1,this.convertVBoundaryToGeojson(i,!1).features),this.singleFieldBoundary=new ae([].concat(...this.groupOfVBoundaries)),this.boundaries$.next(this.singleFieldBoundary)}addHeadlands(i,r,a,o){let s=[],l=[];i.forEach(c=>{let u=0;c.exteriorPasses&&c.exteriorPasses.forEach(m=>{s.push(this.convertCoordinatesToGeojson(m,"LineString",new xe({isHeadland:!0,trackColor:a,slopeColor:ei.topographyColors[0],swathWidth:o,jobId:r,headlandIndex:u}))),u++}),c.exteriorCrossHatches&&l.push(this.addCrossHatchExtension(c.exteriorCrossHatches,r,a,o)),c.interiorCrossHatches&&l.push(this.addCrossHatchExtension(c.interiorCrossHatches,r,a,o)),c.interiorPasses&&c.interiorPasses.forEach(m=>{s.push(this.convertCoordinatesToGeojson(m,"LineString",new xe({isHeadland:!0,trackColor:a,slopeColor:ei.topographyColors[0],swathWidth:o,jobId:r,headlandIndex:u}))),u++})}),this.headlands=s,s.length&&this.headlandsFeature.next(new ae(s))}addCrossHatchFeatures(i,r){let a=[],o=i[0].jobId,s=r.colour,l=r.headlands.swathWidth;i.forEach(c=>{c.error||(c.trackCrossHatches&&a.push(this.addCrossHatchExtension(c.trackCrossHatches,c.jobId,r.colour,c.swathWidth)),c.headlands?.exteriorCrossHatches&&a.push(this.addCrossHatchExtension(c.headlands.exteriorCrossHatches,o,s,l)),c.headlands?.interiorCrossHatches&&a.push(this.addCrossHatchExtension(c.headlands.interiorCrossHatches,o,s,l)))}),a.length&&this.crossHatchFeature.next(new ae(a))}updateResultFeatures(i,r,a){this.hasSlopes.value&&this.showErrorIfSlopesNotAvailable(i);let o=[];i.forEach(s=>{s.error||(this.hasSlopes.value?s.tracksWithSlopes.map(l=>{l.forEach(c=>{o.push(this.convertCoordinatesToGeojson([[c[0],c[1]],[c[2],c[3]]],"LineString",new xe({swathWidth:s.swathWidth,trackColor:r.colour,slopeColor:this.colorBySlope(s.slopesTable,Math.abs(c[4])),jobId:s.jobId})))})}):(s.tracks.forEach(l=>{o.push(this.convertCoordinatesToGeojson(l,"LineString",new xe({swathWidth:s.swathWidth,trackColor:r.colour,jobId:s.jobId})))}),a&&s.trackTurns.forEach(l=>{o.push(this.convertCoordinatesToGeojson(l,"LineString",new xe({isTurn:!0,swathWidth:s.swathWidth,trackColor:"#00FFFF",jobId:s.jobId})))})),s.startingPoint&&o.push(this.convertCoordinatesToGeojson(s.startingPoint,"Point",new xe({trackColor:r.colour}))))}),o.length&&this.resultsFeature.next(new ae(o)),this.isTurnRows.value&&this.updateTurnRows(i,r)}addCrossHatchExtension(i,r,a,o){let s=[];return i.forEach(l=>{s.push([l.originalPoint,l.firstExtensionPoint]),s.push([l.originalPoint,l.secondExtensionPoint])}),this.convertCoordinatesToGeojson(s,"MultiLineString",new xe({trackColor:a,slopeColor:ei.topographyColors[0],jobId:r}))}updateTurnRows(i,r){let a=[];i.map(o=>{!o.error&&o.headlands&&a.push(o.headlands)}),a.length&&this.addHeadlands(a,r.jobId,r.colour,r.headlands.swathWidth)}updateReferencedEdgeAndLineFeatures(i,r,a){this.updateReferencedEdgeFeatures(i,r,a),this.updateReferencedLinesFeatures(i,r,a),this.updateLineOfBestFitFeatures(i,r,a)}updateABLine(i,r){let a=[],o=new Dt([i,r]);a.push(this.convertCoordinatesToGeojson(o.getCoordinates(),Di.LINE_STRING)),a.length?this.abLineFeature.next(new ae(a)):this.abLineFeature.next(null)}updateReferencedEdgeFeatures(i,r,a){let o=[];i.forEach((s,l)=>{s.results[0].bearingResults?.forEach(c=>{c.referenceCluster!=null&&c.referenceCluster.forEach(u=>{o.push(this.convertCoordinatesToGeojson(u,Di.LINE_STRING,new xe({boundaryIndex:l,bearing:c.bearing,isSelected:r[l]?.bearing==c.bearing})))})}),o.push(...this.processABHeadings(a,l,r))}),o.length?this.referencedEdgeFeature.next(new ae(o)):this.referencedEdgeFeature.next(null)}updateReferencedLinesFeatures(i,r,a){let o=[];i.forEach((s,l)=>{s.results[0].bearingResults?.forEach(c=>{if(c.straightEdge!=null){let u=this.tryToScaleLineToBBox(this.getScaledBBoxForTheBoundary(l),new Dt(c.straightEdge));o.push(this.convertCoordinatesToGeojson(u.getCoordinates(),Di.LINE_STRING,new xe({boundaryIndex:l,bearing:c.bearing})))}}),o.push(...this.processABHeadings(a,l,r))}),o.length?this.referencedLineFeature.next(new ae(o)):this.referencedLineFeature.next(null)}tryToScaleLineToBBox(i,r){r.scale(this.referenceLineScaleFactor,this.referenceLineScaleFactor);let a=te(r.getCoordinates()),o=Ge(i.getCoordinates()),s=pe(a,o);return s.features.length==2?new Dt([s.features[0].geometry.coordinates,s.features[1].geometry.coordinates]):r}updateLineOfBestFitFeatures(i,r,a){let o=[];i.forEach((s,l)=>{s.results[0].bearingResults?.forEach(c=>{c.straightEdge!=null&&o.push(this.convertCoordinatesToGeojson(c.straightEdge,Di.LINE_STRING,new xe({boundaryIndex:l,bearing:c.bearing,isSelected:r[l]?.bearing==c.bearing})))}),o.push(...this.processABHeadings(a,l,r))}),o.length?this.lineOfBestFitFeature.next(new ae(o)):this.lineOfBestFitFeature.next(null)}processABHeadings(i,r,a){let o=[];return i&&i[r]&&i[r].forEach(s=>{let l=[s.pointA,s.pointB];o.push(this.convertCoordinatesToGeojson(l,Di.LINE_STRING,new xe({boundaryIndex:r,bearing:s.heading,isSelected:a[r]?.bearing===s.heading})))}),o}getScaledBBoxForTheBoundary(i){let r=null;return this.boundaries$.subscribe(a=>{let o=a.features[i],s=new rl().readFeatures(o)[0],l=Ns(s.getGeometry().getExtent());l.scale(this.fieldPartBBoxScaleFactor,this.fieldPartBBoxScaleFactor),r=l}).unsubscribe(),r}colorBySlope(i,r){let a;for(let o of i)r>=o.minSlope&&r<o.maxSlope&&(a=i.indexOf(o));return ei.topographyColors[a]}addInnerBoundaries(i){i&&i.length&&this.innerBoundariesFeature.next(new ae([this.convertCoordinatesToGeojson(i.flat(),"MultiPolygon")]))}makeCategories(i){return i.forEach(r=>{r.error||r.results.forEach(a=>{a.error||(a.bearingResults||a.curvedResults).forEach(s=>{s.error||(s.slopesTable=[],this.slopeCategories.forEach(l=>{s.slopesTable.push(new Gi(l.minSlope,l.maxSlope,void 0,void 0,s.slopeDistances))}))})})}),i}showErrorIfSlopesNotAvailable(i){i.some(a=>a.tracksWithSlopes?.length>0)||(this.hasSlopes.next(!1),this.notificationManagerService.notify(new al(ue("pathPlanning.pathPlanningError.slopesError"),ue("pathPlanning.pathPlanningError.slopesErrorDescription"),nl.Error)))}};e.\u0275fac=function(r){return new(r||e)(M(Xc),M(ol))},e.\u0275prov=j({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var yn=(()=>{let e=class e{constructor(i){this.mapProviderService=i}createPathPlanInnerBoundariesLayer(i){return new Y({properties:{name:"innerBoundaries"},source:i,style:se.PathPlan.Boundary.Inner})}createPathPlanHeadlandsLayer(i){return new Y({properties:{name:"headlands"},style:r=>se.PathPlan.Tracks.HeadlandPrimary(r),declutter:!0,source:i})}createPathPlanCrossHatchLayer(i){return new Y({properties:{name:"headlands"},style:r=>se.PathPlan.Tracks.HeadlandPrimary(r),declutter:!0,source:i})}createPathPlanTracksLayer(i){return new Y({properties:{name:"tracks"},source:i,style:se.PathPlan.Tracks.Primary})}createPathPlanLabelsLayer(i){return new Y({properties:{name:"labels"},source:i,style:se.PathPlan.Label})}createPathPlanLayerGroup(i){return this.createLayerGroup(i,"pathPlan")}createPathPlanCoverageInnerBoundariesLayer(i){return new Y({properties:{name:"innerBoundariesCoverage"},source:i,style:se.PathPlan.Boundary.Inner})}createPathPlanCoverageHeadlandsLayer(i){return new Y({properties:{name:"headlandsCoverage"},style:(r,a)=>se.PathPlan.Tracks.HeadlandCoverage(r,this.getCurrentFeatureResolution(r,a)),source:i})}createPathPlanCoverageTracksLayer(i){return new Y({properties:{name:"tracksCoverage"},source:i,style:(r,a)=>se.PathPlan.Tracks.Coverage(r,this.getCurrentFeatureResolution(r,a))})}createPathPlanCoverageLayerGroup(i){let r=this.createLayerGroup(i,"pathPlanCoverage");return r.setVisible(!1),r}createLayerGroup(i,r){return new ri({properties:{name:r},layers:i.filter(a=>a!=null)})}getCurrentFeatureResolution(i,r){let a=i.getGeometry(),o=this.mapProviderService.getMap()?.getView()?.getProjection();return a instanceof Dt?ga(o,r,a.getFirstCoordinate()):a instanceof Ws?ga(o,r,a.getFirstCoordinate()):1}};e.\u0275fac=function(r){return new(r||e)(M(Ot))},e.\u0275prov=j({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var bn=(()=>{let e=class e{constructor(i,r,a,o,s,l){this.translocoService=i,this.pathPlanningRequestsService=r,this.guidancePostProcessJobPollingService=a,this.mapService=o,this.pathPlanLayerCreatorService=s,this.menuService=l,this.isFetching$=new H(!1),this.isAvailable$=new H(!1),this.tracksData$=new C,this.headlandsData$=new C,this.tracksVectorSource=new re,this.tracksLayer=new Y({properties:{name:"trackSlopes"},source:this.tracksVectorSource,style:(c,u)=>se.PathPlan.Tracks.Slopes(c,this.pathPlanLayerCreatorService.getCurrentFeatureResolution(c,u))}),this.headlandsVectorSource=new re,this.headlandsLayer=new Y({properties:{name:"headlandSlopes"},source:this.headlandsVectorSource,style:se.PathPlan.Tracks.HeadlandSlopes}),this.layerGroup=new ri({properties:{name:"pathPlanSlopes"},visible:!1,layers:[this.headlandsLayer,this.tracksLayer]}),this.legendItem=new Ne("slopes",this.translocoService.translate("pathPlanning.resultDetail.slope"),"assets/icons/map-legend-icons/slopes-icon.svg",this.layerGroup),this.destroyRef=V(W),this.tracksData$.pipe(F(this.destroyRef)).subscribe(c=>{this.tracksVectorSource.clear(),c?ar.updateVectorSourceWithFeatures(this.tracksVectorSource,this.mapService.convertGeojsonToFeature(c)):this.layerGroup.setVisible(!1)}),this.headlandsData$.pipe(F(this.destroyRef)).subscribe(c=>{this.headlandsVectorSource.clear(),c&&ar.updateVectorSourceWithFeatures(this.headlandsVectorSource,this.mapService.convertGeojsonToFeature(c))}),this.isFetching$.pipe(F(this.destroyRef)).subscribe(c=>{this.legendItem.isLoading$.next(c)})}ngOnDestroy(){this.guidancePostProcessRequestSubscription&&this.guidancePostProcessRequestSubscription.unsubscribe()}cancelSlopesRequest(){this.guidancePostProcessRequestSubscription&&(this.guidancePostProcessRequestSubscription.unsubscribe(),this.isFetching$.next(!1))}getSlopes(i){this.cancelSlopesRequest(),this.isFetching$.next(!0),this.guidancePostProcessRequestSubscription=this.pathPlanningRequestsService.generateGuidancePostProcess({pathPlanId:i,generateSlopes:!0}).subscribe({next:r=>{r.jobId&&this.guidancePostProcessJobPollingService.onCheckPostProcessingJobStatus(r.jobId,a=>{let o=a.records[0].details,s=this.getTrackSlopes(o),l=this.getHeadlandSlopes(o);this.tracksData$.next(new ae(s)),this.headlandsData$.next(new ae(l)),this.isAvailable$.next(!0),this.isFetching$.next(!1)},a=>{this.layerGroup.setVisible(!1),this.isFetching$.next(!1),this.isAvailable$.next(!1),this.menuService.notify(ue("pathPlanning.pathPlanningError.slopesErrorDescription"),0,!0),console.error(a)})}})}getSlopesTable(i){return this.mapService.slopeCategories.map(r=>new Gi(r.minSlope,r.maxSlope,void 0,void 0,i.slopeDistances))}getTrackSlopes(i){return i.slopesResult.tracksWithSlopes.map(r=>r.map(a=>this.mapService.convertCoordinatesToGeojson([a.a,a.b],"LineString",new xe({swathWidth:i.swathWidth,slopeColor:this.mapService.colorBySlope(this.getSlopesTable(i.slopesResult),Math.abs(a.slopePercent))})))).flat()}getHeadlandSlopes(i){return[Me.fromGeometry(i.exteriorHeadlandPassesGeojson),Me.fromGeometry(i.interiorHeadlandPassesGeojson)].map(r=>(r.properties=new xe({slopeColor:ei.topographyColors[0]}),r))}getLayer(){return this.layerGroup}getLegendItem(){return this.legendItem}clearSlopesData(){this.cancelSlopesRequest(),this.layerGroup.setVisible(!1),this.isAvailable$.next(!1),this.tracksData$.next(null),this.headlandsData$.next(null)}};e.\u0275fac=function(r){return new(r||e)(M(Ce),M($t),M(on),M(Jc),M(yn),M(ge))},e.\u0275prov=j({token:e,factory:e.\u0275fac});let t=e;return t})();var Qc=(()=>{let e=class e{constructor(){this.uomConversionService=V(ws)}transform(i){return this.uomConversionService.liquidTransform(i)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275pipe=_o({name:"uomLiquid",type:e,pure:!0,standalone:!0});let t=e;return t})();var Kv=(()=>{let e=class e{constructor(i){this.enumProvider=i}};e.\u0275fac=function(r){return new(r||e)(B(Gr))},e.\u0275cmp=Ee({type:e,selectors:[["app-refill-popup"]],inputs:{data:"data"},standalone:!0,features:[Te],decls:29,vars:47,consts:[[1,"ol-popup",2,"width","235px"],[1,"m-0"],[1,"fw-bold"]],template:function(r,a){r&1&&(h(0,"div",0)(1,"h5"),y(2),x(3,"transloco"),v(),h(4,"p",1)(5,"span",2),y(6),x(7,"transloco"),v(),y(8),x(9,"uomLiquid"),x(10,"number"),x(11,"translateUnits"),x(12,"number"),v(),h(13,"p",1)(14,"span",2),y(15),x(16,"transloco"),v(),y(17),x(18,"uomArea"),x(19,"number"),x(20,"translateUnits"),v(),h(21,"p",1)(22,"span",2),y(23),x(24,"transloco"),v(),y(25),x(26,"uomArea"),x(27,"number"),x(28,"translateUnits"),v()()),r&2&&(d(2),Ut("",L(3,12,"common.stopNumber"),"",a.data==null?null:a.data.stopNumber,""),d(4),E("",L(7,14,"common.capacityLeft")," "),d(2),Pr(" ",ie(10,18,L(9,16,a.data==null?null:a.data.spaceLeft),"1.0-2")," ",ie(11,21,a.enumProvider.UnitType.Fuel,a.enumProvider.getUom())," (",ie(12,24,a.data==null?null:a.data.percentageSpaceLeft,"1.0-2"),"%) "),d(7),E(" ",L(16,27,"common.areaRemaining")," "),d(2),Ut(" ",ie(19,31,L(18,29,a.data==null?null:a.data.totalAreaRemaining),"1.0-2")," ",ie(20,34,a.enumProvider.UnitType.Area,a.enumProvider.getUom())," "),d(6),z(L(24,37,"common.areaToNextFill")),d(2),Ut(" ",ie(27,41,L(26,39,a.data==null?null:a.data.areaToNextFill),"1.0-2")," ",ie(28,44,a.enumProvider.UnitType.Area,a.enumProvider.getUom())," "))},dependencies:[Ft,nt,ht,Je,We,Ke,bt,gt,Ye,Mt,Xe,Ze,Pt,et,at,rt,It,ot,Qe,vt,wt,Ct,pt,kt,Lt,St,Tt,At,ct,ut,yt,qe,ft,_t,lt,xt,tt,dt,mt,st,Et,Wr,Hr,Ir,it,Qc],encapsulation:2});let t=e;return t})();var Gt=(()=>{let e=class e{constructor(i,r,a){this.userService=i,this.companyService=r,this.settingService=a,this.isReady=new C,this.isReady$=this.isReady.asObservable(),this.activeCompany=null,this.activeCompany$=new C,this._isPpTrial=!1,this.isPpTrial=new C,this.isPpTrial$=this.isPpTrial.asObservable(),this.isPpCore=new C,this.isPpPro=new C,this.isPpPro$=this.isPpPro.asObservable(),this._savedPathPlansCount=0,this.savedPathPlansCount=new C,this.savedPathPlansCount$=this.savedPathPlansCount.asObservable(),this._savedPathPlansLimit=0,this.savedPathPlansLimit=new C,this.savedPathPlansLimit$=this.savedPathPlansLimit.asObservable(),this.canCreateNewPathPlan=new C,this.canCreateNewPathPlan$=this.canCreateNewPathPlan.asObservable(),this.exportedPathPlansCount$=new C,this.exportedPathPlansLimit$=new C,this.exportedPathPlanLimitReached=new C,this.exportedPathPlanLimitReached$=this.exportedPathPlanLimitReached.asObservable(),this.canExportPathPlan=new C,this.canExportPathPlan$=this.canExportPathPlan.asObservable(),this._isEeTrial=!1,this.isEeTrial=new C,this.isEeTrial$=this.isEeTrial.asObservable(),this.isEeCore=new C,this.isEePro=new C,this.savedEeScenariosCount=new C,this.savedEeScenariosCount$=this.savedEeScenariosCount.asObservable(),this.savedEeScenariosLimit=new C,this.savedEeScenariosLimit$=this.savedEeScenariosLimit.asObservable(),this.canCreateNewEeScenario=new C,this.canCreateNewEeScenario$=this.canCreateNewEeScenario.asObservable(),this.hasAnyPpPaidOrgs=new C,this.hasAnyPpPaidOrgs$=this.hasAnyPpPaidOrgs.asObservable(),this.hasAnyEePaidOrgs=new C,this.hasAnyEePaidOrgs$=this.hasAnyEePaidOrgs.asObservable(),this.hasAnyPpOrEePaidOrgs=new C,this.hasAnyPpOrEePaidOrgs$=this.hasAnyPpOrEePaidOrgs.asObservable(),this.trialExpiryDate=new C,this.trialExpiryDate$=this.trialExpiryDate.asObservable(),this.daysLeftInTrial=new C,this.daysLeftInTrial$=this.daysLeftInTrial.asObservable(),this.isAllLimitsReached$=de([this.canCreateNewPathPlan$,this.canCreateNewEeScenario$]).pipe(Yt(([o,s])=>!o&&!s)),this.destroyRef=V(W),this.isEeTrial$.pipe(F()).subscribe(o=>{this._isEeTrial=o}),this.isPpTrial$.pipe(F()).subscribe(o=>{this._isPpTrial=o}),this.savedPathPlansLimit$.pipe(F()).subscribe(o=>{this._savedPathPlansLimit=o}),this.savedPathPlansCount$.pipe(F()).subscribe(o=>{this._savedPathPlansCount=o}),this.userService.user$.pipe(F()).subscribe(o=>{if(this.activeCompany$.next(o?.activeCompany),o===null){this.hasAnyPpPaidOrgs.next(!0),this.hasAnyEePaidOrgs.next(!0),this.trialExpiryDate.next(null);return}if(this.hasAnyPpPaidOrgs.next(!!o.hasPpPaidOrganizations),this.hasAnyEePaidOrgs.next(!!o.hasEePaidOrganizations),!o.hasPpPaidOrganizations&&!o.hasEePaidOrganizations&&o.trialExpiryDate){let s=new Date(o.trialExpiryDate);this.trialExpiryDate.next(s);let l=864e5,c=s.getTime()-new Date().getTime(),u=Math.round(c/l),m=u>=0?u:0;this.daysLeftInTrial.next(m)}else this.trialExpiryDate.next(null)}),de([this.hasAnyPpPaidOrgs$,this.hasAnyEePaidOrgs$]).pipe(F()).subscribe(([o,s])=>{this.hasAnyPpOrEePaidOrgs.next(o||s)}),de([this.activeCompany$,this.userService.user$]).pipe(Io(([o,s])=>!!o&&!!s),F()).subscribe(([o,s])=>{this.activeCompany=o;let l=s?.isAdminPrivate||s?.isSystemAdminPrivate,c=this.activeCompany.featureBundles?.includes("ppCore");this.isPpCore.next(c);let u=this.activeCompany.featureBundles?.includes("ppPro")||l;this.isPpPro.next(u),this.isPpTrial.next(!c&&!u&&!l);let m=this.activeCompany.featureBundles?.includes("eeCore");this.isEeCore.next(m);let b=this.activeCompany.featureBundles?.includes("eePro")||l;this.isEePro.next(b),this.isEeTrial.next(!m&&!b&&!l),this.refreshCompanyLimits()}),de([this.isEeTrial$,this.savedEeScenariosCount$,this.savedEeScenariosLimit$]).pipe(F()).subscribe(([o,s,l])=>{if(!o){this.canCreateNewEeScenario.next(!0);return}let c=(s||0)<l;this.canCreateNewEeScenario.next(c)}),de([this.isPpTrial$,this.savedPathPlansCount$,this.savedPathPlansLimit$,this.exportedPathPlansCount$,this.exportedPathPlansLimit$]).pipe(F()).subscribe(([o,s,l,c,u])=>{if(!o){this.canCreateNewPathPlan.next(!0),this.canExportPathPlan.next(!0);return}let m=(s||0)<l;this.canCreateNewPathPlan.next(m);let b=(c||0)<u;this.canExportPathPlan.next(b)})}canCreateNewPathPlans(i=1){return this._isPpTrial?this._savedPathPlansCount+i<=this._savedPathPlansLimit:!0}refreshCompanyLimits(){if(!this._isPpTrial&&!this._isEeTrial){this.canCreateNewPathPlan.next(!0),this.canCreateNewEeScenario.next(!0),this.canExportPathPlan.next(!0),this.isReady.next(!0);return}this.activeCompany!==null&&this.companyService.getCompanyLimits(this.activeCompany.companyId).pipe(F(this.destroyRef)).subscribe(i=>{this.savedPathPlansCount.next(i.pathPlanSavedCount??0),this.savedPathPlansLimit.next(i.pathPlanSavedLimit??0),this.exportedPathPlansCount$.next(i.pathPlanExportCount??0),this.exportedPathPlansLimit$.next(i.pathPlanExportLimit??0),this.savedEeScenariosCount.next(i.eeScenarioSavedCount??0),this.savedEeScenariosLimit.next(i.eeScenarioSavedLimit??0);let r=this._isPpTrial&&(i.pathPlanExportLimit??0)<1;this.exportedPathPlanLimitReached.next(r),this.isReady.next(!0)})}navigateToContactUs(){window.open(ma.contactUs,"_blank")}navigateToTrialBundles(){window.open(ma.trialBundles,"_blank")}resetTrial(){this.isEeTrial.next(null),this.isEeCore.next(null),this.isEePro.next(null),this.isPpTrial.next(null),this.isPpCore.next(null),this.isPpPro.next(null),this.trialExpiryDate.next(null),this.isReady.next(!1)}extendExportLimit(){this.settingService.upsertUser(xs.exportedPathPlanLimit,"1",this.userService.userId),this.exportedPathPlansLimit$.next(1)}isTrialDateExpired(i){return i?i<=new Date:!1}};e.\u0275fac=function(r){return new(r||e)(M(Oe),M(Is),M(ii))},e.\u0275prov=j({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var Zc=(()=>{let e=class e{constructor(i,r,a){this.translocoService=i,this.requestsService=r,this.menuService=a,this.isFetching=new C,this.isFetching$=this.isFetching.asObservable(),this.isAvailable$=new H(!1),this.isLayerVisible$=new C,this.rasterData$=new C,this.layer=new xc({properties:{name:"DEM"},visible:!1}),this.legendItem=new Ne("dem",this.translocoService.translate("common.dem"),"assets/icons/map-legend-icons/dem-icon.png",this.layer),this.destroyRef=V(W),this.rasterData$.pipe(F(this.destroyRef)).subscribe(o=>{if(o){let s=new qs(o);this.layer.setSource(s)}else this.layer.setSource(null)}),this.isLayerVisible$.pipe(F(this.destroyRef)).subscribe(o=>{this.layer.setVisible(o)}),this.isFetching$.pipe(F(this.destroyRef)).subscribe(o=>{this.legendItem.isLoading$.next(o)})}cancelDemRasterRequest(){this.requestSubscription&&(this.requestSubscription.unsubscribe(),this.isFetching.next(!1))}getDemRasterData(i){this.cancelDemRasterRequest(),this.isFetching.next(!0),this.requestSubscription=this.requestsService.getDemRaster(i).subscribe(r=>{this.rasterData$.next({url:r.url,projection:"EPSG:4326",imageExtent:r.extent}),this.isAvailable$.next(!0),this.isFetching.next(!1)},()=>{this.isFetching.next(!1),this.isLayerVisible$.next(!1),this.isAvailable$.next(!1),this.menuService.notify(ue("pathPlanning.pathPlanningError.demFailed"),0,!0)})}getLayer(){return this.layer}getLegendItem(){return this.legendItem}clearDemRasterData(){this.cancelDemRasterRequest(),this.isLayerVisible$.next(!1),this.isAvailable$.next(!1),this.rasterData$.next(null)}};e.\u0275fac=function(r){return new(r||e)(M(Ce),M($t),M(ge))},e.\u0275prov=j({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var eu=(()=>{let e=class e{constructor(i,r,a,o){this.translocoService=i,this.requestsService=r,this.mapBaseService=a,this.menuService=o,this.isFetching$=new H(!1),this.isAvailable$=new H(!1),this.wheelTracksData$=new C,this.layer=new Y({properties:{name:"wheelTracks"},style:se.PathPlan.Tracks.WheelTracks,visible:!1}),this.legendItem=new Ne("wheelTracks",this.translocoService.translate("common.wheelTracks"),"assets/icons/map-legend-icons/wheel-tracks-icon.svg",this.layer),this.destroyRef=V(W),this.wheelTracksData$.pipe(F(this.destroyRef)).subscribe(s=>{s?this.layer.setSource(new re({features:s})):(this.layer.setVisible(!1),this.layer.setSource(null))}),this.isFetching$.pipe(F(this.destroyRef)).subscribe(s=>{this.legendItem.isLoading$.next(s)})}cancelWheelTracksRequest(){this.requestSubscription&&(this.requestSubscription.unsubscribe(),this.isFetching$.next(!1))}getWheelTracks(i,r){this.cancelWheelTracksRequest(),this.isFetching$.next(!0),this.requestSubscription=this.requestsService.getWheelTrafficGeoJson(i,r).subscribe({next:a=>{let o=this.mapBaseService.convertGeojsonToFeature(a);o&&o.length&&this.wheelTracksData$.next(o),this.isAvailable$.next(!0),this.isFetching$.next(!1)},error:()=>{this.layer.setVisible(!1),this.isFetching$.next(!1),this.isAvailable$.next(!1),this.menuService.notify(ue("pathPlanning.pathPlanningError.wheelTracksFailed"),0,!0)}})}getLayer(){return this.layer}getLegendItem(){return this.legendItem}clearWheelTracksData(){this.cancelWheelTracksRequest(),this.layer.setVisible(!1),this.isAvailable$.next(!1),this.wheelTracksData$.next(null)}};e.\u0275fac=function(r){return new(r||e)(M(Ce),M($t),M(Oi),M(ge))},e.\u0275prov=j({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var ce=(()=>{let e=class e{constructor(){this.routes$=new H(null),this.isRouteDataAvailableSubject=new H(!1),this.isRouteDataAvailable$=this.isRouteDataAvailableSubject.asObservable(),this.routesDataClearedSubject=new C,this.routesDataCleared$=this.routesDataClearedSubject.asObservable(),this.destroyRef=V(W),this.routes$.pipe(F(this.destroyRef)).subscribe(i=>{this.isRouteDataAvailableSubject.next(!!(i&&i.length>0))}),this.routesDataCleared$.pipe(F(this.destroyRef)).subscribe(()=>{this.routes$.next(null)})}clearRouteData(){this.routesDataClearedSubject.next(!0)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=j({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var tu=(()=>{let e=class e extends ti{constructor(i){super(i)}generateRoute(i){return this.http.post(`${this.apiUrl}/routes`,i)}generateShareRoute(i){return this.http.post(`${this.apiUrl}/default-routes`,i)}getJobRouteResult(i,r){let a=new Er().append("saveRoute",r);return this.http.get(`${this.apiUrl}/routes/jobs/${i}`,{params:a})}};e.\u0275fac=function(r){return new(r||e)(M(Xt))},e.\u0275prov=j({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var iu=(()=>{let e=class e{constructor(){this.cache=new Map,this.lastCacheKey=null}setCache(i,r){this.cache.set(i,r),this.lastCacheKey=i}getCache(i){return this.cache.has(i)?this.cache.get(i):null}getLastCache(){return this.lastCacheKey?this.cache.get(this.lastCacheKey):null}clearCache(i){this.cache.delete(i)}clearAllCache(){this.cache.clear(),this.lastCacheKey=null}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=j({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var Wi=(()=>{let e=class e{constructor(i,r){this.mapProviderService=i,this.routesDataStorageService=r,this.startEndPointPositionChanged$=new C,this.isTrackStartEndPointInteractionAvailable$=new H(!1),this.isInteractionInProgress$=new H(!1),this.interactionWasAddedToTheMap$=new H(!1),this.snapPointsLayer=new Y({properties:{name:"snapPoints"},source:new re}),this.startEndTrackNodesLayer=new Y({properties:{name:"startEndTrackNodes"},source:new re,style:a=>Be.Styles.TrackStartEndNodesStyle(a,this.interactionWasAddedToTheMap$.value,!1)}),this.trackStartEndPointsDragInteraction=new Qs({source:this.startEndTrackNodesLayer.getSource(),condition:()=>this.isTrackStartEndPointInteractionAvailable$.value,style:a=>{let o=a.getProperties().features[0];return Be.Styles.TrackStartEndNodesStyle(o,this.interactionWasAddedToTheMap$.value,this.isTrackStartEndPointInteractionAvailable$.value)}}),this.destroyRef=V(W),this.routesDataStorageService.routes$.pipe(F(this.destroyRef)).subscribe(a=>{this.startEndTrackNodesLayer.getSource().clear(),a&&a.forEach(o=>{if(!o)return;let s=o.routeParts.filter(u=>u.routePartType==="track");if(!s||!s.length)return;let l=s[0];this.startEndTrackNodesLayer.getSource().addFeature(new ve({geometry:new ke(_e(l?.routePartGeometry[0])),type:"trackStart",fieldPartIndex:o.partFieldIndex,nodeIndex:l?.sortedStartNodeIndex,trackIndex:l?.trackIndex}));let c=s.at(-1);this.startEndTrackNodesLayer.getSource().addFeature(new ve({geometry:new ke(_e(c?.routePartGeometry.at(-1))),type:"trackEnd",fieldPartIndex:o.partFieldIndex,nodeIndex:c?.sortedEndNodeIndex,trackIndex:c?.trackIndex}))})}),this.trackStartEndPointsDragInteraction.on("modifystart",a=>{this.createSnapPoints(a.features.getArray()[0]),this.isInteractionInProgress$.next(!0)}),this.trackStartEndPointsDragInteraction.on("modifyend",a=>{a.features.getArray().forEach(o=>{this.snapPointFeature(o)}),this.startEndPointPositionChanged$.next(!0),this.snapPointsLayer.getSource().clear(),this.isInteractionInProgress$.next(!1)})}getLayer(){return this.startEndTrackNodesLayer}addInteractionToMap(){this.mapProviderService.getMap()?.addInteraction(this.trackStartEndPointsDragInteraction),this.interactionWasAddedToTheMap$.next(!0),this.isInteractionInProgress$.next(!1)}removeInteractionFromMap(){this.mapProviderService.getMap()?.removeInteraction(this.trackStartEndPointsDragInteraction),this.interactionWasAddedToTheMap$.next(!1),this.isInteractionInProgress$.next(!1)}getTrackStartOrEndNodeIndex(i,r){let a=this.startEndTrackNodesLayer.getSource().getFeatures().filter(o=>o.getProperties().type===r&&o.getProperties().fieldPartIndex===i).at(0);return a?a.getProperties().nodeIndex:null}createSnapPoints(i){if(this.snapPointsLayer.getSource().clear(),!i||i.getGeometry().getType()!=="Point")return;let r=i.getProperties().fieldPartIndex,a=i.getProperties().type,o=this.routesDataStorageService.routes$.value.find(u=>u&&u.partFieldIndex===r);if(!o)return;let s=o.routeParts.filter(u=>u.routePartType==="track");if(!s||!s.length)return;s.forEach(u=>{this.snapPointsLayer.getSource().addFeature(new ve({geometry:new ke(_e(u.routePartGeometry[0])),nodeIndex:u.sortedStartNodeIndex,trackIndex:u.trackIndex})),this.snapPointsLayer.getSource().addFeature(new ve({geometry:new ke(_e(u.routePartGeometry.at(-1))),nodeIndex:u.sortedEndNodeIndex,trackIndex:u.trackIndex}))});let l=this.startEndTrackNodesLayer.getSource().getFeatures().filter(u=>u.getProperties().fieldPartIndex===r&&u.getProperties().type!==a)[0],c=this.snapPointsLayer.getSource().getFeatures().filter(u=>u.getProperties().trackIndex===l?.getProperties().trackIndex);c&&this.snapPointsLayer.getSource().removeFeatures(c)}snapPointFeature(i){if(i.getGeometry().getType()!=="Point")return;let r=i.getGeometry(),a=this.getClosestSnapPoint(r.getCoordinates());a&&(i.setProperties({nodeIndex:a.getProperties().nodeIndex}),i.setGeometry(a.getGeometry()))}getClosestSnapPoint(i){let r=null,a=1/0;return this.snapPointsLayer.getSource().getFeatures().forEach(o=>{let s=we(ne(va(i)),ne(va(o.getGeometry().getCoordinates())));s<a&&(a=s,r=o)}),r}};e.\u0275fac=function(r){return new(r||e)(M(Ot),M(ce))},e.\u0275prov=j({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var ru=(()=>{let e=class e{constructor(i,r,a){this.cachingService=i,this.routesDataStorageService=r,this.routesTrackStartEndPointsInteractionProviderService=a,this.destroyRef=V(W),this.routesDataStorageService.routesDataCleared$.pipe(F(this.destroyRef)).subscribe(()=>{this.cachingService.clearAllCache()})}set(i,r){let a=this.toString(this.getCacheKey(i));this.cachingService.setCache(a,r);let o=this.toString(this.getDefaultCacheKey(i));this.cachingService.getCache(o)==null&&this.cachingService.setCache(o,r)}get(i){let r=this.toString(this.getCacheKey(i));return this.cachingService.getCache(r)}getDefaultCacheKey(i){return i?i.map(r=>{let a={trackStartNodeIndex:null,trackEndNodeIndex:null};return r.referenceLine?(a.referenceLine=r.referenceLine,a):r.bearing?(a.bearing=r.bearing,a):null}):null}getCacheKey(i){return i?this.getDefaultCacheKey(i).map((a,o)=>a?(a.trackStartNodeIndex=this.routesTrackStartEndPointsInteractionProviderService.getTrackStartOrEndNodeIndex(o,"trackStart"),a.trackEndNodeIndex=this.routesTrackStartEndPointsInteractionProviderService.getTrackStartOrEndNodeIndex(o,"trackEnd"),a):null):null}toString(i){return JSON.stringify(i)}};e.\u0275fac=function(r){return new(r||e)(M(iu),M(ce),M(Wi))},e.\u0275prov=j({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var nu=(()=>{let e=class e{constructor(i){this.routesDataStorageService=i,this.rotationLineSegmentsLayer=new Y({properties:{name:"rotationLineSegments"},source:new re,style:Be.Styles.RotationLineSegment}),this.startPointLayer=new Y({properties:{name:"routeStartEndPoints"},source:new re,style:Be.Styles.StartEndPoints}),this.arrowsLayer=new Y({properties:{name:"routeArrows"},source:new re,declutter:!0}),this.layerGroup=new ri({layers:[this.arrowsLayer,this.startPointLayer]}),this.destroyRef=V(W),this.routesDataStorageService.routes$.pipe(F(this.destroyRef)).subscribe(r=>{this.arrowsLayer.getSource().clear(),this.startPointLayer.getSource().clear(),this.rotationLineSegmentsLayer.getSource().clear(),!(!r||!r.some(o=>o?.routeParts?.some(s=>s.routePartType==="track")))&&r.forEach(o=>{o&&(this.addStartPoint(o),this.addArrows(o))})})}getLayer(){return this.layerGroup}addStartPoint(i){let a=i.routeParts[0].routePartGeometry[0];this.startPointLayer.getSource().addFeature(new ve({geometry:new ke(_e(a)),type:"start"}))}getAverageTrackLength(i){let r=i.filter(o=>o.routePartType=="track"),a=0;return r.forEach(o=>{if(o.routePartGeometry.length>=2){let s=te(o.routePartGeometry);a+=dr(s)}}),r.length>0?a/r.length:0}addArrows(i){let r=this.getAverageTrackLength(i.routeParts);i.routeParts.forEach(a=>{a.routePartGeometry.length<2||(a.routePartType=="track"?this.handleTracks(i.partFieldIndex,a.routePartGeometry):a.routePartType=="headland pass"?this.handleHeadlands(i.partFieldIndex,a.routePartGeometry,r):(a.routePartType=="turn"||a.routePartType=="headland connector"||a.routePartType=="headland turn")&&this.handleTurns(i.partFieldIndex,a.routePartGeometry))}),this.setStyle()}handleTracks(i,r){let a=r[0],o=this.getRotation(r,a);this.addArrowFeature(a,o,i);let s=this.getMidpoint(r),l=this.getRotation(r,s);this.addArrowFeature(s,l,i);let c=r[r.length-1],u=this.getRotation(r,c);this.addArrowFeature(c,u,i)}handleTurns(i,r){if(Rs(r[0],r[1]))return;let a=this.getMidpoint(r),o=this.getRotation(r,a);this.addArrowFeature(a,o,i)}getMidpoint(i){let r=te(i),a=dr(r);return ln(r,a/2).geometry.coordinates}getRotation(i,r){let a=this.getClosestSegmentToPoint(i,r);return this.rotationLineSegmentsLayer.getSource().addFeature(new ve(new Dt(a.geometry.coordinates).transform("EPSG:4326","EPSG:3857"))),ci(a.geometry.coordinates[0],a.geometry.coordinates[1])}getClosestSegmentToPoint(i,r){let a=te(i);return ur(a).features.reduce((l,c)=>{let u=bo(ne(r),c);return l===null||u<l.distance?{segment:c,distance:u}:l},null).segment}handleHeadlands(i,r,a){if(a){let o=te(r),s=dr(o),l=Math.round(s/a)*2,c=s/l;if(l>0)for(let u=1;u<l;u++){let m=ln(o,u*c),b=this.getRotation(r,m.geometry.coordinates);this.addArrowFeature(m.geometry.coordinates,b,i)}}}addArrowFeature(i,r,a,o=null){let s=this.arrowsLayer.getSource().getFeatures().filter(c=>c.get("partFieldIndex")==a).length+1,l=new ve({geometry:new ke(_e(i)),rotation:r,color:o,featureIndex:s,partFieldIndex:a});this.arrowsLayer.getSource().addFeature(l)}setStyle(){this.arrowsLayer.getSource().getFeatures().forEach(i=>{let r=i.get("featureIndex"),a=i.get("partFieldIndex"),o=this.arrowsLayer.getSource().getFeatures().filter(u=>u.get("partFieldIndex")==a).length,s=Math.min(255,255*r/Math.max(o-1,1)),l=Math.min(255,255-255*r/Math.max(o-1,1)),c=i.get("color")?i.get("color"):`rgba(${s}, ${l}, 0, 1)`;i.setStyle(Be.Styles.Arrows(i,c))})}};e.\u0275fac=function(r){return new(r||e)(M(ce))},e.\u0275prov=j({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var au=(()=>{let e=class e{constructor(i,r){this.userSettingService=i,this.routesDataStorageService=r,this.routesLayer=new Y({properties:{name:"routes"},source:new re}),this.routeTrackColor="white",this.routeTurnColor="black",this.routeHeadlandPassColor="white",this.routeHeadlandConnectorColor="black",this.routeHeadlandTurnColor="black",this.routeTurnWidth=2,this.routeTrackWidth=2,this.routeHeadlandPassWidth=2,this.routeHeadlandConnectorWidth=2,this.routeHeadlandTurnWidth=2,this.destroyRef=V(W),this.userSettingService.settings$.pipe(F(this.destroyRef)).subscribe(a=>{let o=a.routeTrackColor||this.routeTrackColor,s=a.routeTurnColor||this.routeTurnColor,l=a.routeHeadlandPassColor||this.routeHeadlandPassColor,c=a.routeHeadlandTurnColor||this.routeHeadlandTurnColor,u=a.routeHeadlandConnectorColor||this.routeHeadlandConnectorColor,m=+a.routeTrackWidth||this.routeTurnWidth,b=+a.routeTrackWidth||this.routeTrackWidth,T=+a.routeHeadlandPassWidth||this.routeHeadlandPassWidth,O=+a.routeHeadlandTurnWidth||this.routeHeadlandTurnWidth,N=+a.routeHeadlandConnectorWidth||this.routeHeadlandConnectorWidth,p=a.routeIsWorking,f=a.routeIsWorkingColor||this.routeTrackColor,g=a.routeIsNonWorkingColor||this.routeTurnColor,P=+a.routeWorkingWidth||this.routeTrackWidth,w=+a.routeNonWorkingWidth||this.routeTrackWidth;this.routesLayer.setStyle(S=>{let _=S.get("routePartType"),R,$;return p?_==="track"||_==="headland pass"?(R=f,$=P):(R=g,$=w):_==="track"?(R=o,$=b):_==="turn"?(R=s,$=m):_==="headland pass"?(R=l,$=T):_==="headland turn"?(R=c,$=O):_==="headland connector"&&(R=u,$=N),new zs({stroke:new Vs({color:R,width:$})})})}),this.routesDataStorageService.routes$.pipe(F(this.destroyRef)).subscribe(a=>{this.routesLayer.getSource().clear(),a&&(a=a.filter(o=>o!==null).sort((o,s)=>o.partFieldIndex-s.partFieldIndex),a.forEach(o=>{o&&o.routeParts.forEach(s=>{let l=s.routePartGeometry,c=new Dt(l).transform("EPSG:4326","EPSG:3857");this.routesLayer.getSource().addFeature(new ve({geometry:c,routePartType:s.routePartType,trackIndex:s.trackIndex,isReversed:s.isReversed}))})}))})}getLayer(){return this.routesLayer}};e.\u0275fac=function(r){return new(r||e)(M(ii),M(ce))},e.\u0275prov=j({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var ou=(()=>{let e=class e{constructor(i,r,a){this.userSettingService=i,this.mapProviderService=r,this.routesDataStorageService=a,this.interactionWasAddedToTheMap$=new H(!1),this.nodesLayer=new Y({properties:{name:"nodes"},source:new re,style:Be.Styles.Nodes()}),this.selectInteraction=new Xr({condition:Yr,layers:[this.nodesLayer]}),this.destroyRef=V(W),this.routesDataStorageService.routes$.pipe(F(this.destroyRef)).subscribe(o=>{this.nodesLayer.getSource().clear(),o&&o.forEach(s=>{s&&s.routeParts.forEach(l=>{if(l.routePartType==="track"){let c=new ke(_e(l.routePartGeometry[0])),u=new ke(_e(l.routePartGeometry.at(-1))),m=new ve({geometry:c,nodeIndex:l.sortedStartNodeIndex,headlandIndex:l.startNodeHeadlandIndex,headlandGroupIndex:l.startNodeHeadlandGroupIndex,trackIndex:l.trackIndex}),b=new ve({geometry:u,nodeIndex:l.sortedEndNodeIndex,headlandIndex:l.endNodeHeadlandIndex,headlandGroupIndex:l.endNodeHeadlandGroupIndex,trackIndex:l.trackIndex});this.nodesLayer.getSource().addFeature(m),this.nodesLayer.getSource().addFeature(b)}})})}),de([this.userSettingService.settings$,this.interactionWasAddedToTheMap$]).pipe(F(this.destroyRef)).subscribe(([o,s])=>{this.nodesLayer.setVisible(o?.routingDebugMode===!0&&s)}),this.selectInteraction.on("select",()=>{let o=this.selectInteraction.getFeatures().getArray();if(o.length>0){let s=o[0].getProperties();console.log(s)}})}getLayer(){return this.nodesLayer}addInteractionToMap(){this.mapProviderService.getMap()?.addInteraction(this.selectInteraction),this.interactionWasAddedToTheMap$.next(!0)}removeInteractionFromMap(){this.interactionWasAddedToTheMap$.next(!1),this.mapProviderService.getMap()?.removeInteraction(this.selectInteraction)}};e.\u0275fac=function(r){return new(r||e)(M(ii),M(Ot),M(ce))},e.\u0275prov=j({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var su=(()=>{let e=class e{constructor(i,r){this.mapProviderService=i,this.routesDataStorageService=r,this.selectedRefillPoint$=new H(null),this.interactionWasAddedToTheMap$=new H(!1),this.refillLayer=new Y({properties:{name:"refill"},source:new re,style:Be.Styles.RefillPoints()}),this.refillPointOverlay=new Ks({element:void 0,autoPan:{animation:{duration:250}}}),this.refillPointSelect=new Xr({condition:Yr,style:Be.Styles.RefillPoints(),layers:[this.refillLayer]}),this.destroyRef=V(W),this.interactionWasAddedToTheMap$.pipe(F(this.destroyRef)).subscribe(a=>{this.refillLayer.setVisible(a)}),this.routesDataStorageService.routes$.pipe(F(this.destroyRef)).subscribe(a=>{this.toggleOverlayOff(),this.refillLayer.getSource().clear(),a?a.forEach(o=>{o&&o.refillPoints&&o.refillPoints.forEach(s=>{this.refillLayer.getSource().addFeature(new ve({geometry:new ke(_e(s.coordinate)),refillPointData:s}))})}):this.toggleOverlayOff()}),this.refillPointSelect.on("select",a=>{let o=this.refillPointSelect.getFeatures().getArray();if(o.length>0){let s=o[0];this.refillPointOverlay.setPosition(a.mapBrowserEvent.coordinate),this.selectedRefillPoint$.next(s.getProperties().refillPointData)}else this.refillPointOverlay.setPosition(void 0),this.selectedRefillPoint$.next(null)})}getLayer(){return this.refillLayer}setOverlayElement(i){this.refillPointOverlay.setElement(i)}addInteractionToMap(){this.mapProviderService.getMap()?.addOverlay(this.refillPointOverlay),this.mapProviderService.getMap()?.addInteraction(this.refillPointSelect),this.interactionWasAddedToTheMap$.next(!0)}removeInteractionFromMap(){this.toggleOverlayOff(),this.mapProviderService.getMap()?.removeOverlay(this.refillPointOverlay),this.mapProviderService.getMap()?.removeInteraction(this.refillPointSelect),this.interactionWasAddedToTheMap$.next(!1)}toggleOverlayOff(){this.refillPointOverlay.setPosition(void 0),this.selectedRefillPoint$.next(null)}};e.\u0275fac=function(r){return new(r||e)(M(Ot),M(ce))},e.\u0275prov=j({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var na=(()=>{let e=class e{constructor(i,r,a,o,s,l,c,u,m){this.translocoService=i,this.menuService=r,this.userSettingService=a,this.routesDataStorageService=o,this.routesDirectionService=s,this.routesLayerProviderService=l,this.routesNodeInteractionProviderService=c,this.routesRefillPointsInteractionProviderService=u,this.routesTrackStartEndPointsInteractionProviderService=m,this.isRoutesLayerAvailable$=new H(!1),this.layerGroup=new ri({layers:[this.routesNodeInteractionProviderService.getLayer(),this.routesLayerProviderService.getLayer(),this.routesDirectionService.getLayer(),this.routesTrackStartEndPointsInteractionProviderService.getLayer(),this.routesRefillPointsInteractionProviderService.getLayer()],visible:!1}),this.legendItem=new Ne("routes",this.translocoService.translate("pathPlanning.planningDetail.route"),"assets/icons/map-legend-icons/route-icon.svg",this.layerGroup),this.destroyRef=V(W),de([this.menuService.isAdmin$,this.userSettingService.settings$]).pipe(F(this.destroyRef)).subscribe(([b,T])=>{this.isRoutesLayerAvailable$.next(b||T.enableRouting)}),this.isRoutesLayerAvailable$.pipe(F(this.destroyRef)).subscribe(b=>{b||this.routesDataStorageService.clearRouteData()}),this.routesDataStorageService.routes$.pipe(F(this.destroyRef)).subscribe(b=>{b==null&&this.setIsLoading(!1)}),this.routesDataStorageService.routesDataCleared$.pipe(F(this.destroyRef)).subscribe(()=>{this.setIsVisible(!1),this.setIsLoading(!1)}),this.legendItem.isVisible$.pipe(F(this.destroyRef)).subscribe(b=>{this.layerGroup.setVisible(b),b||this.routesRefillPointsInteractionProviderService.toggleOverlayOff()}),de([this.legendItem.isVisible$,this.legendItem.isLoading$]).pipe(F(this.destroyRef)).subscribe(([b,T])=>{this.routesTrackStartEndPointsInteractionProviderService.isTrackStartEndPointInteractionAvailable$.next(b&&!T)})}getLayerGroup(){return this.layerGroup}getLegendItem(){return this.legendItem}setIsVisible(i){this.legendItem.isVisible$.next(i)}setIsLoading(i){this.legendItem.isLoading$.next(i)}};e.\u0275fac=function(r){return new(r||e)(M(Ce),M(ge),M(ii),M(ce),M(nu),M(au),M(ou),M(su),M(Wi))},e.\u0275prov=j({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var cu=(()=>{let e=class e{constructor(i,r,a,o,s,l,c,u){this.routesRequestsService=i,this.routesCacheService=r,this.routesDataStorageService=a,this.routesLayerGroupProviderService=o,this.routesTrackStartEndPointsInteractionProviderService=s,this.menuService=l,this.userService=c,this.translocoService=u,this.requestSubscription=null,this.destroyRef=V(W),this.routesDataStorageService.routes$.pipe(F(this.destroyRef)).subscribe(m=>{m==null&&this.clearSubscriptions()}),this.routesDataStorageService.routesDataCleared$.pipe(F(this.destroyRef)).subscribe(()=>{this.clearSubscriptions()})}ngOnDestroy(){this.clearSubscriptions()}getRoutes(i,r,a){this.clearSubscriptions();let o=this.routesCacheService.get(r);if(o)this.routesDataStorageService.routes$.next(o);else{let s=this.createRouteRequests(i,r,a);this.startGeneratingRoutes(s,{chosenResult:r})}}getRoutesForExistingPathPlan(i,r,a){let o=i.features[0].geometry.coordinates.map((s,l)=>({pathPlanId:r,partFieldIndex:l,autoSave:a}));this.startGeneratingRoutes(o,{saveRequest:a})}createRouteRequests(i,r=null,a){return i.map((o,s)=>{let l=null;return o.results[0].bearingResults?l=o.results[0].bearingResults?.find(c=>c.bearing===r[s].bearing)?.tracks:o.results[0].curvedResults&&(l=o.results[0].curvedResults[0].tracks),{pathPlanId:o.pathPlanId,partFieldIndex:s,partFieldGeometry:{fieldPart:a.features[s].geometry.coordinates.flat(1),tracks:l,exteriorPasses:o.headlands.exteriorPasses,interiorPasses:o.headlands.interiorPasses},adjustments:{startPointNodeIndex:this.routesTrackStartEndPointsInteractionProviderService.getTrackStartOrEndNodeIndex(s,"trackStart"),endPointNodeIndex:this.routesTrackStartEndPointsInteractionProviderService.getTrackStartOrEndNodeIndex(s,"trackEnd")}}})}startGeneratingRoutes(i,r){if(this.clearSubscriptions(),!this.routesLayerGroupProviderService.isRoutesLayerAvailable$.value)return;this.routesLayerGroupProviderService.setIsLoading(!0);let a=this.userService.userId!=null?this.routesRequestsService.generateRoute(i):this.routesRequestsService.generateShareRoute(i);this.requestSubscription=a.subscribe({next:o=>{if(o.error){this.handleError();return}o.jobId&&(this.checkRouteJobSubscription=Mi(500).pipe(Ii(()=>this.routesRequestsService.getJobRouteResult(o.jobId,r.saveRequest))).subscribe({next:s=>{if(!s.completed)return;if(this.checkRouteJobSubscription?.unsubscribe(),s.error){this.handleError();return}let l=s.records.map(c=>c.details);this.routesDataStorageService.routes$.next(l),this.routesCacheService.set(r.chosenResult,l),this.routesLayerGroupProviderService.setIsVisible(!0),this.routesLayerGroupProviderService.setIsLoading(!1)},error:()=>this.handleError()}))},error:()=>this.handleError()})}handleError(){this.routesDataStorageService.routes$.next(null),this.routesLayerGroupProviderService.setIsLoading(!1),this.routesLayerGroupProviderService.setIsVisible(!1),this.menuService.notify(this.translocoService.translate("pathPlanning.planningDetail.issueInitiatingRoutes"),0,!0),this.clearSubscriptions()}clearSubscriptions(){this.requestSubscription?.unsubscribe(),this.checkRouteJobSubscription?.unsubscribe()}};e.\u0275fac=function(r){return new(r||e)(M(tu),M(ru),M(ce),M(na),M(Wi),M(ge),M(Oe),M(Ce))},e.\u0275prov=j({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var Ef=["fieldsList"],Tf=["stepper"],_f=t=>({"d-none":t}),kf=t=>({hideJdOperations:t}),Lf=t=>[t];function Ff(t,e){if(t&1&&(h(0,"div",30),y(1),h(2,"a",31),y(3),x(4,"transloco"),v(),y(5,". "),v()),t&2){let n=D(2).$implicit;d(),E(" ",n("cannotStartJob")," "),d(2),z(L(4,2,"common.contactUs"))}}function Af(t,e){t&1&&K(0,"mat-icon",32)}function Df(t,e){t&1&&K(0,"mat-icon",32)}function Of(t,e){if(t&1&&y(0),t&2){let n=D(2).$implicit;z(n("exportType"))}}function Bf(t,e){if(t&1&&(Bo(0),h(1,"mat-radio-button",33),y(2),v(),Ro()),t&2){let n=e.$implicit,i=D(3);d(),k("value",n)("ngClass",ze(3,kf,n.value==="jdpush"&&!i.isJdCompany)),d(),E(" ",n.name," ")}}function Rf(t,e){if(t&1&&y(0),t&2){let n=D(3).$implicit;z(n("monitorType"))}}function jf(t,e){if(t&1&&(h(0,"mat-radio-button",36),y(1),h(2,"span",37),y(3),v()()),t&2){let n=e.$implicit;k("value",n.value),d(),E(" ",n.name," "),d(2),z(n.subString)}}function $f(t,e){if(t&1&&(h(0,"mat-step",23),G(1,Rf,1,1,"ng-template",17),h(2,"mat-radio-group",34),G(3,jf,4,3,"mat-radio-button",35),v(),h(4,"div")(5,"button",21),y(6),x(7,"transloco"),v()()()),t&2){let n=D(3);k("stepControl",n.exportMonitorTypeCtrl)("completed",n.exportMonitorTypeCtrl.valid),d(2),k("name","exportTypeMonitor"),d(),k("ngForOf",n.selectedExportType.monitors),d(2),k("disabled",!n.exportMonitorTypeCtrl.valid),d(),E(" ",L(7,6,"common.next")," ")}}function Nf(t,e){if(t&1&&y(0),t&2){let n=D(2).$implicit;z(n("setupDataExportTypes"))}}function Gf(t,e){if(t&1&&(h(0,"mat-list-option",38)(1,"span",39),y(2),K(3,"mat-icon",40),v()()),t&2){let n=e.$implicit,i=D(2).$implicit,r=D();k("value",n.name)("hidden",r.separatePassesTracksDisabled&&n.name==="separatePassesTracks"||n.name==="separatePassesTracks"&&r.hideSeparatePassesTracks),d(),k("ngClass",ze(5,Lf,n.name==="separatePassesTracks"?"p-2 text-muted border-top border-dark":"lp-mat-list-item")),d(),E(" ",i(n.name)," "),d(),k("matTooltip",r.toolTipMessage(n.name))}}function Uf(t,e){t&1&&(y(0),x(1,"transloco")),t&2&&E(" ",L(1,1,"common.finish")," ")}function Vf(t,e){if(t&1){let n=be();h(0,"div"),G(1,Ff,6,4,"div",11),h(2,"mat-stepper",13,0),G(4,Af,1,0,"ng-template",14)(5,Df,1,0,"ng-template",15),h(6,"mat-step",16),G(7,Of,1,1,"ng-template",17),h(8,"mat-label",18)(9,"mat-radio-group",19),G(10,Bf,3,5,"ng-container",20),v()(),h(11,"div")(12,"button",21),y(13),x(14,"transloco"),v()()(),G(15,$f,8,8,"mat-step",22),h(16,"mat-step",23),G(17,Nf,1,1,"ng-template",17),h(18,"mat-selection-list",24),G(19,Gf,4,7,"mat-list-option",25),v(),h(20,"div")(21,"button",21),y(22),x(23,"transloco"),v()()(),h(24,"mat-step",26),G(25,Uf,2,3,"ng-template",17),h(26,"mat-dialog-actions",27)(27,"button",28),y(28),x(29,"transloco"),v(),h(30,"button",29),he("click",function(){fe(n);let r=D(2);return me(r.onExport())}),y(31),x(32,"transloco"),v()()()()()}if(t&2){let n=D(2);d(),k("ngIf",n.hasJobStarted),d(),k("linear",!n.isLinear),d(4),k("stepControl",n.exportTypeCtrl),d(4),k("ngForOf",n.exportTypes),d(2),k("disabled",!n.exportTypeCtrl.valid),d(),E(" ",L(14,18,"common.next")," "),d(2),k("ngIf",n.selectedExportType==null?null:n.selectedExportType.monitors),d(),k("stepControl",n.exportTypeOptionsCtrl)("completed",n.exportTypeOptionsCtrl.valid),d(3),k("ngForOf",n.selectedExportType==null?null:n.selectedExportType.options),d(2),k("disabled",!n.exportTypeOptionsCtrl.valid),d(),E(" ",L(23,20,"common.next")," "),d(2),k("completed",n.exportTypeOptionsCtrl.valid&&(n.selectedExportType.monitors?n.exportMonitorTypeCtrl.valid:!0)&&n.exportTypeCtrl.valid),d(3),k("color",n.showMessageDetail==="ok"?"primary":"none"),xr("data-cy",n.showMessageDetail),d(),E(" ",L(29,22,"common."+n.showMessageDetail)," "),d(2),k("ngClass",ze(26,_f,n.showDownload||(n.errorMessage==null?null:n.errorMessage.length)>0)),d(),E(" ",L(32,24,"common.export")," ")}}function zf(t,e){t&1&&(h(0,"div",41),K(1,"mat-spinner"),v())}function Hf(t,e){if(t&1&&(h(0,"p",45),y(1),v()),t&2){let n=D(2).$implicit;d(),z(n("fileReady"))}}function Wf(t,e){if(t&1&&(h(0,"div",42)(1,"div"),K(2,"mat-icon",43),v(),G(3,Hf,2,1,"p",44),v()),t&2){let n=D(2);d(3),k("ngIf",!n.isJdExportType)}}function qf(t,e){if(t&1&&(h(0,"div",46)(1,"p"),y(2),v()()),t&2){let n=D().$implicit;d(2),z(n("gdSuccessfullyPushedToJD"))}}function Yf(t,e){if(t&1&&(h(0,"div",46)(1,"p",30),y(2),h(3,"a",31),y(4),x(5,"transloco"),x(6,"titlecase"),v(),y(7),v()()),t&2){let n=D().$implicit;d(2),E(" ",n("partialSuccess")+n("partialSuccessContinue")," "),d(2),z(L(6,5,L(5,3,"common.contactUs"))),d(3),E(" ",n("partialSuccessDetails")," ")}}function Xf(t,e){if(t&1&&(h(0,"div",30),y(1),v()),t&2){let n=D(2);d(),z(n.showMessage)}}function Jf(t,e){if(t&1&&(h(0,"p",51),y(1),v()),t&2){let n=D(3);d(),E(" ",n.errorMessage," ")}}function Kf(t,e){if(t&1){let n=be();h(0,"div",47)(1,"div")(2,"button",48),he("click",function(){fe(n);let r=D(2);return me(r.toggle())}),K(3,"mat-icon",49),y(4),v(),G(5,Jf,2,1,"p",50),v()()}if(t&2){let n=D().$implicit,i=D();d(4),E(" ",n("errorDetails")," "),d(),k("ngIf",i.expanded)}}function Qf(t,e){if(t&1){let n=be();h(0,"a",55),he("click",function(){fe(n);let r=D(3);return me(r.downloadFile())}),y(1),v()}if(t&2){let n=D(2).$implicit;d(),z(n("downloadFile"))}}function Zf(t,e){if(t&1&&(h(0,"div",42)(1,"div",52)(2,"button",53),y(3),x(4,"transloco"),v(),G(5,Qf,2,1,"a",54),v()()),t&2){let n=D(2);d(3),E(" ",L(4,2,"common."+n.showMessageDetail)," "),d(2),k("ngIf",n.showDownload&&!n.isJdExportType)}}function em(t,e){if(t&1&&(h(0,"div",2)(1,"div",3),y(2),x(3,"transloco"),x(4,"transloco"),h(5,"button",4),K(6,"mat-icon",5),v()(),h(7,"div",6),G(8,Vf,33,28,"div",7)(9,zf,2,0,"div",8)(10,Wf,4,1,"div",9)(11,qf,3,1,"div",10)(12,Yf,8,7,"div",10)(13,Xf,2,1,"div",11)(14,Kf,6,2,"div",12)(15,Zf,6,4,"div",9),v()()),t&2){let n=D();k("formGroup",n.form),d(2),Pr(" ",L(3,12,"common.export")," ",n.numberOfExportFiles," ",L(4,14,"common.pathPlans")," "),d(6),k("ngIf",!n.isRequesting&&!n.showDownload&&!n.showPartial&&!((n.errorMessage==null?null:n.errorMessage.length)>0)),d(),k("ngIf",n.isRequesting),d(),k("ngIf",n.showDownload),d(),k("ngIf",n.isJdExportType&&n.showDownload),d(),k("ngIf",n.showPartial),d(),k("ngIf",(n.showMessage==null?null:n.showMessage.length)>0),d(),k("ngIf",(n.errorMessage==null?null:n.errorMessage.length)>0),d(),k("ngIf",n.showDownload)}}var uu=(()=>{let e=class e{constructor(i,r,a,o,s,l,c,u,m){this.requestsService=i,this.menuService=r,this.userFileService=a,this.fileUploadService=o,this.userService=s,this.analyticsService=l,this.featureBundleService=c,this.exportService=u,this.data=m,this.outerBoundaryMessage=!1,this.separatePassesTracksDisabled=!0,this.showDefaultSeparateOnce=!0,this.isLinear=!1,this.exportTypeCtrl=new Ji(void 0,[Fr.required]),this.exportMonitorTypeCtrl=new Ji(void 0,[Fr.required]),this.exportTypeOptionsCtrl=new Ji(void 0,[Fr.required]),this.exportMonitorFormControl=new Ji(void 0),this.form=new Zo({exportTypeCtrl:this.exportTypeCtrl,exportMonitorTypeCtrl:this.exportMonitorTypeCtrl,exportTypeOptionsCtrl:this.exportTypeOptionsCtrl}),this.expanded=!1,this.subs=new Ci,this.generalOptions=[{name:"abLines",value:!0},{name:"headlands",value:!1},{name:"adaptiveCurve",value:!1},{name:"exteriorBoundary",value:!1},{name:"interiorBoundary",value:!1},{name:"separatePassesTracks",value:!1}],this.optionsForAgres=[{name:"headlands",value:!1},{name:"adaptiveCurve",value:!1},{name:"exteriorBoundary",value:!1},{name:"separatePassesTracks",value:!0}],this.optionsForKml=[{name:"abLines",value:!0},{name:"headlands",value:!1},{name:"adaptiveCurve",value:!1},{name:"exteriorBoundary",value:!1},{name:"interiorBoundary",value:!1},{name:"separatePassesTracks",value:!0}],this._exportTypes=[{name:"CNH CN1",value:"cn1",options:this.generalOptions},{name:"ISO XML",value:"isoxml",options:this.generalOptions},{name:"KML",value:"kml",options:this.optionsForKml}],this.isPathPlansExportJobResultViewModel=b=>Object.keys(b).includes("records"),this.isJobStartModel=b=>Object.keys(b).includes("jobId")}ngOnDestroy(){this.clearJobInterval(),this.subs&&this.subs.unsubscribe(),this.subJob&&this.subJob.unsubscribe()}ngOnInit(){de([this.menuService.isAdmin$,this.userService.user$]).subscribe(([i,r])=>{this.companyId=r.activeCompany.companyId,this.companyName=r.activeCompany.name,r&&(this.isJdCompany=r.activeCompany.sourceType==ss.Jd);let a=this._exportTypes;a.findIndex(o=>o.value==="jdfile")===-1&&a.push({name:"JD File",value:"jdfile",monitors:[{name:"4600 CommandCenter",value:"GS4_4600",selected:!0},{name:"4640 Universal Display",value:"GS4_4640"},{name:"GS3 2630",value:"GS3_2630"},{name:"GS2 2600",value:"GS2_2600"},{name:"GS2 1800",value:"GS2_1800"},{name:"GS2 CommandCenter",value:"GS2_CommandCenter"}],options:this.generalOptions}),this.isJdCompany&&a.findIndex(o=>o.value==="jdpush")===-1&&a.push({name:"JD Operations Center",value:"jdpush",options:this.generalOptions}),a.findIndex(o=>o.value==="trimble")===-1&&a.push({name:"Trimble",value:"trimble",monitors:[{name:"AgGPS",value:"aggps",subString:"(CFX, FMX, EZ-Guide, FM)",selected:!0},{name:"AgData",value:"agdata",subString:"(TMX, MMX, GFX, XCN)"}],options:this.generalOptions}),a.findIndex(o=>o.value==="shapefile")===-1&&a.push({name:"Shapefile",value:"shapefile",monitors:[{name:"Generic",value:"generic",selected:!0},{name:"Agres",value:"agres"}],options:this.generalOptions}),this.exportTypes=a.sort((o,s)=>o.value==="jdpush"?-1:s.value==="jdpush"?1:0)}),this.exportTypeCtrl.valueChanges.subscribe(i=>{if(this.status=null,this.guidanceExportBatchId=null,this.showMessage=null,!!i){if(this.exportMonitorTypeCtrl.setValue(null),i?.monitors){let r=i.monitors.find(a=>a.selected).value;this.exportMonitorTypeCtrl.setValue(r)}if(this.selectedExportTypeName=i.value,this.selectedExportType=this.exportTypes.find(r=>r.value===i.value),i?.options){let r=this.selectedExportType.options.filter(a=>a.value).map(a=>a.name);r.length&&this.exportTypeOptionsCtrl.setValue(r)}}}),this.exportMonitorTypeCtrl.valueChanges.subscribe(i=>{this.monitor=i;let r=this.monitor==="agres"?this.optionsForAgres:this.generalOptions,a=this.exportTypes.findIndex(o=>o.value==="shapefile");this.exportTypes[a].options=r}),this.exportTypeOptionsCtrl.valueChanges.pipe(To()).subscribe(([i,r])=>{if(this.selectedExportTypeName!="jdpush"){if(r.includes("interiorBoundary")&&!i.includes("exteriorBoundary")?(this.outerBoundaryMessage||(this.outerBoundaryMessage=!0),r.includes("exteriorBoundary")||(r.push("exteriorBoundary"),this.exportTypeOptionsCtrl.setValue(r,{emitEvent:!1}))):this.outerBoundaryMessage=!1,r.includes("interiorBoundary")&&i.includes("exteriorBoundary"))if(i.includes("exteriorBoundary")&&r.includes("exteriorBoundary")&&r.includes("interiorBoundary"))this.outerBoundaryMessage=!0,r.includes("interiorBoundary")&&r.includes("exteriorBoundary")||(r.push("interiorBoundary","exteriorBoundary"),this.exportTypeOptionsCtrl.setValue(r,{emitEvent:!1}));else{let a=["interiorBoundary","exteriorBoundary"];r=r.filter(o=>!a.includes(o)),this.outerBoundaryMessage=!1,this.exportTypeOptionsCtrl.setValue(r,{emitEvent:!1})}if(r.includes("headlands")&&r.includes("adaptiveCurve")||r.includes("adaptiveCurve")&&r.includes("headlands"))if(this.separatePassesTracksDisabled=!1,this.exportTypeOptionsCtrl.value.includes("separatePassesTracks")||this.showDefaultSeparateOnce){r.push("separatePassesTracks"),this.exportTypeOptionsCtrl.setValue(r,{emitEvent:!1}),this.showDefaultSeparateOnce=!1;return}else{let a="separatePassesTracks";r=r.filter(o=>!a.includes(o)),this.exportTypeOptionsCtrl.setValue(r,{emitEvent:!1})}else{this.separatePassesTracksDisabled=!0;let a="separatePassesTracks";r=r.filter(o=>!a.includes(o)),this.exportTypeOptionsCtrl.setValue(r,{emitEvent:!1})}}}),this.subs.add(this.exportService.export.subscribe(i=>{this.numberOfExportFiles=i?.length,this.listOfExportFiles=i})),this.subs.add(this.exportMonitorFormControl.valueChanges.subscribe(i=>{this.monitor=i}))}get hideSeparatePassesTracks(){return this.selectedExportTypeName=="shapefile"&&this.exportMonitorTypeCtrl.value=="agres"||this.selectedExportTypeName=="kml"}toolTipMessage(i=null){return this.outerBoundaryMessage&&i==="exteriorBoundary"?this.outerBoundaryMessage&&i==="exteriorBoundary"?ue("pathPlanning.pushScreen."+i+"TooltipRequired"):ue(i+"Tooltip"):!this.separatePassesTracksDisabled&&i==="separatePassesTracks"?ue("pathPlanning.pushScreen."+i+"Tooltip"):ue("pathPlanning.pushScreen."+i+"Tooltip")}onExport(){this.isRequesting=!0,this.clearJobInterval();let i=this.exportTypeOptionsCtrl.value.reduce((r,a)=>ee(I({},r),{[a]:{include:!0}}),{});this.selectedExportTypeName!="jdpush"&&i.separatePassesTracks===void 0&&i.headlands&&i.adaptiveCurve&&(i.separatePassesTracks={include:!1}),this.request={companyId:this.companyId,companyName:this.companyName,exportType:this.selectedExportTypeName,monitor:this.monitor,pathPlanIds:this.listOfExportFiles,exportOptions:i},this.userFileService.exportFile(this.request).subscribe(r=>{if(r.error!=null){this.isRequesting=!1,this.hasJobStarted=!0;return}this.isJobStartModel(r)&&this.onCheckJobStatus(r.jobId),this.isPathPlansExportJobResultViewModel(r)&&(this.onCompleteStatus(r),this.isRequesting=!1),this.showDownload&&(this.isRequesting=!1)},r=>{this.clearJobInterval(),console.error(r),this.isRequesting=!1})}downloadFile(){this.subs.add(this.userFileService.downloadExportFile(this.guidanceExportBatchId).subscribe(i=>{i!=null&&i.blob.size>0?(this.fileUploadService.saveAsLocalFile(i.filename,i.blob),this.menuService.notify(ue("pathPlanning.pushScreen.complete"))):this.menuService.notify(ue("common.error"),0,!0)},i=>{i&&this.menuService.notify(i.statusText,0,!0)})),this.analyticsService.sendEvent("download-file","export","export",1),this.analyticsService.sendEvent("export-types",this.exportTypeOptionsCtrl.value,"export",1)}get isJdExportType(){return this.selectedExportTypeName==="jdpush"}get showDownload(){return!this.isRequesting&&(this.status==="success"||this.status==="complete"||this.status==="partial")}get showMessageDetail(){return this.showDownload?this.selectedExportTypeName==="jdpush"?"ok":"close":"cancel"}onCheckJobStatus(i){this.subJob=Mi(2e3).pipe(Ii(()=>this.requestsService.getJobExportResult(i))).subscribe(r=>{this.onCompleteStatus(r)},r=>{console.error(r),this.onDoneJob()})}onCompleteStatus(i){i.completed&&(this.status=null,i?.records&&(this.status=i.records[0]?.details?.status),i.error?.message&&(this.errorMessage=i.error.message),this.guidanceExportBatchId=null,i?.records&&(this.guidanceExportBatchId=i.records[0]?.details?.batchId),this.status==="partial"&&(this.showPartial=!0),this.status==="fail"&&(this.showMessage=ue("pathPlanning.pushScreen.problemExporting").concat(`\r
`+i.records[0]?.details?.correlationId)),this.featureBundleService.refreshCompanyLimits(),this.onDoneJob())}onDoneJob(){this.isRequesting=!1,this.subJob&&this.subJob.unsubscribe(),this.exportService.export.next(null)}clearJobInterval(){this.timerId&&clearInterval(this.timerId)}toggle(){this.expanded=!this.expanded}};e.\u0275fac=function(r){return new(r||e)(B($t),B(ge),B(cl),B(pl),B(Oe),B(Es),B(Gt),B(aa),B(_r))},e.\u0275cmp=Ee({type:e,selectors:[["app-push-screen"]],viewQuery:function(r,a){if(r&1&&(ua(Ef,5),ua(Tf,5)),r&2){let o;pa(o=da())&&(a.input=o.first),pa(o=da())&&(a.stepper=o.first)}},standalone:!0,features:[Sr([{provide:ts,useValue:ll}]),Te],decls:1,vars:1,consts:[["stepper",""],["class","d-flex align-items-center flex-column",3,"formGroup",4,"transloco","translocoRead"],[1,"d-flex","align-items-center","flex-column",3,"formGroup"],["mat-dialog-title","",1,"d-flex","align-items-center","w-100"],["mat-icon-button","","mat-dialog-close","",1,"ms-auto"],["svgIcon","xmark"],["mat-dialog-content",""],[4,"ngIf"],["class","mt-5 mb-5 d-flex justify-content-center",4,"ngIf"],["class","d-flex align-items-center flex-column",4,"ngIf"],["class","mt-4 d-flex justify-content-center flex-column",4,"ngIf"],["class","alert alert-danger",4,"ngIf"],["class","mb-2","style","height: 120px",4,"ngIf"],["orientation","vertical",3,"linear"],["matStepperIcon","edit"],["matStepperIcon","done"],["state","home",3,"stepControl"],["matStepLabel",""],[1,"align-items-center","justify-content-center"],["matInput","","aria-labelledby","export-types","formControlName","exportTypeCtrl","required","",1,"radio-vertical"],[4,"ngFor","ngForOf"],["mat-raised-button","","color","primary","mat-button","","matStepperNext","",1,"button-secondary",3,"disabled"],[3,"stepControl","completed",4,"ngIf"],[3,"stepControl","completed"],["formControlName","exportTypeOptionsCtrl"],["color","primary",3,"value","hidden",4,"ngFor","ngForOf"],[3,"completed"],["align","end",1,"buttons"],["mat-raised-button","","mat-dialog-close","",1,"button-secondary",3,"color"],["mat-raised-button","","color","primary","data-cy","export",1,"button-primary",3,"click","ngClass"],[1,"alert","alert-danger"],["routerLink","/contact","mat-dialog-close",""],["svgIcon","check"],["required","","color","primary",3,"value","ngClass"],["aria-labelledby","monitor-types","formControlName","exportMonitorTypeCtrl",1,"radio-group",3,"name"],["class","radio-vertical","color","primary","required","",3,"value",4,"ngFor","ngForOf"],["color","primary","required","",1,"radio-vertical",3,"value"],[1,"small","text-muted"],["color","primary",3,"value","hidden"],["matline","",3,"ngClass"],["svgIcon","circle-info","matTooltipPosition","below","matTooltipClass","tooltip-pre-line",3,"matTooltip"],[1,"mt-5","mb-5","d-flex","justify-content-center"],[1,"d-flex","align-items-center","flex-column"],["mat-list-icon","","svgIcon","circle-check",1,"mat-icon-xl","text-success"],["class","mt-4",4,"ngIf"],[1,"mt-4"],[1,"mt-4","d-flex","justify-content-center","flex-column"],[1,"mb-2",2,"height","120px"],["mat-flat-button","",3,"click"],["svgIcon","info"],["class","small overflow-auto text-break","style","max-height: 100px",4,"ngIf"],[1,"small","overflow-auto","text-break",2,"max-height","100px"],[1,"mb-2"],["mat-raised-button","","mat-dialog-close","",1,"button-secondary"],["mat-button","","class","ms-4 button-primary","type","button",3,"click",4,"ngIf"],["mat-button","","type","button",1,"ms-4","button-primary",3,"click"]],template:function(r,a){r&1&&G(0,em,16,16,"div",1),r&2&&k("translocoRead","pathPlanning.pushScreen")},dependencies:[Kt,Ar,Dr,es,Br,Rr,ns,it,Mr,_i,Ti,Ei,Qt,Ft,nt,as,Zt,os,ht,Je,We,Ke,Jt,Xo,Fi,Li,bt,gt,Ye,Mt,Ur,Vr,Xe,Ze,Lr,Pt,ds,ps,et,at,Ai,rt,It,ot,Qe,vt,wt,Ct,ms,pt,kt,Lt,St,Tt,At,ct,ut,yt,qe,ft,_t,vs,hs,ys,bs,gs,lt,xt,tt,is,dt,mt,st,Et],styles:[".buttons[_ngcontent-%COMP%]{padding:0!important}"]});let t=e;return t})();var im=(t,e)=>({"rocket-icon-desktop":t,"rocket-icon-mobile":e}),rm=t=>({"flex-column-reverse w-100":t}),du=t=>({"w-100":t});function nm(t,e){if(t&1){let n=be();h(0,"a",14),he("click",function(){fe(n);let r=D(2);return me(r.signOut())}),y(1),v()}if(t&2){let n=D().$implicit;d(),z(n("signOut"))}}function am(t,e){t&1&&K(0,"button",4)}function om(t,e){t&1&&(h(0,"span",9),y(1),x(2,"transloco"),v()),t&2&&(d(),z(L(2,1,"common.trialEnded")))}function sm(t,e){if(t&1&&(h(0,"div",15),K(1,"mat-icon",16),h(2,"span",17),y(3),v()()),t&2){let n=e.$implicit,i=D().$implicit;d(3),E(" ",i(n)," ")}}function lm(t,e){if(t&1){let n=be();h(0,"div",18),x(1,"async"),h(2,"button",19),x(3,"async"),he("click",function(){fe(n);let r=D(2);return me(r.featureBundleService.navigateToTrialBundles())}),y(4),v(),h(5,"button",20),x(6,"async"),he("click",function(){fe(n);let r=D(2);return me(r.featureBundleService.navigateToContactUs())}),y(7),v()()}if(t&2){let n=e.$implicit,i=D(2);k("ngClass",ze(11,rm,L(1,5,i.isMobile$)===!0)),d(2),k("ngClass",ze(13,du,L(3,7,i.isMobile$)===!0)),d(2),E(" ",n("trialBundles")," "),d(),k("ngClass",ze(15,du,L(6,9,i.isMobile$)===!0)),d(2),E(" ",n("contactUs")," ")}}function cm(t,e){if(t&1&&(h(0,"div",1)(1,"div",2),G(2,nm,2,1,"a",3)(3,am,1,0,"button",4),v(),h(4,"div",5)(5,"div",6),K(6,"img",7),x(7,"async"),x(8,"async"),h(9,"div",8),G(10,om,3,3,"span",9),h(11,"h2",10),y(12),v()(),h(13,"div",11),G(14,sm,4,1,"div",12),v()()(),G(15,lm,8,17,"div",13),v()),t&2){let n=e.$implicit,i=D();d(2),ye(i.showSignOut?2:3),d(4),k("ngClass",wr(10,im,L(7,6,i.isMobile$)===!1,L(8,8,i.isMobile$)===!0)),d(4),ye(i.showSignOut?10:-1),d(2),E(" ",n("upgradeTrialMessage")," "),d(2),k("ngForOf",i.points),d(),k("translocoRead","featureBundle")}}var fu=(()=>{let e=class e{constructor(i,r,a,o,s){this.breakpointObserver=i,this.featureBundleService=r,this.userService=a,this.dialogRef=o,this.router=s,this.points=["featureListPoints.unlimitedPlans","featureListPoints.straightCurvedPlans","featureListPoints.exportPlansAndScenarios","featureListPoints.andMore"],this.isMobile$=this.breakpointObserver.observe(Wo.XSmall).pipe(Yt(l=>l.matches))}ngOnInit(){this.featureBundleService.trialExpiryDate$.subscribe(i=>{this.showSignOut=this.featureBundleService.isTrialDateExpired(i)})}signOut(){this.dialogRef.close(),this.router.navigateByUrl("/login"),this.userService.logout()}};e.\u0275fac=function(r){return new(r||e)(B(Ho),B(Gt),B(Oe),B(ki),B(jr))},e.\u0275cmp=Ee({type:e,selectors:[["app-trial-ended"]],standalone:!0,features:[Te],decls:1,vars:1,consts:[["class","pb-6",4,"transloco","translocoRead"],[1,"pb-6"],[1,"d-flex","align-items-center","w-100","pt-6","pe-6"],[1,"ms-auto","sign-out"],["mat-dialog-close","",1,"ms-auto","btn-close"],["mat-dialog-content","",1,"d-flex","flex-column","justify-center","align-items-center","gap-8"],[1,"d-flex","flex-column","justify-center","align-items-center","gap-8"],["src","assets/icons/rocket.svg",3,"ngClass"],[1,"d-flex","flex-column","justify-center","align-items-center"],[1,"subtitle"],[1,"title","mb-0"],[1,"list"],["class","d-flex align-items-center",4,"ngFor","ngForOf"],["mat-dialog-actions","","class","d-flex justify-content-center align-items-center gap-3 pb-5",3,"ngClass",4,"transloco","translocoRead"],[1,"ms-auto","sign-out",3,"click"],[1,"d-flex","align-items-center"],["svgIcon","circle-check",1,"me-2","flex-shrink-0"],[1,"flex-shrink-1"],["mat-dialog-actions","",1,"d-flex","justify-content-center","align-items-center","gap-3","pb-5",3,"ngClass"],["mat-button","",1,"button-secondary",3,"click","ngClass"],["mat-button","",1,"button-primary","ms-0",3,"click","ngClass"]],template:function(r,a){r&1&&G(0,cm,16,13,"div",0),r&2&&k("translocoRead","featureBundle")},dependencies:[it,Cr,Ti,Ei,Qt,Ft,nt,Zt,ht,Je,We,Ke,Jt,Fi,Li,bt,gt,Ye,Mt,Xe,Ze,Pt,et,at,Ai,rt,It,ot,Qe,vt,wt,Ct,pt,kt,Lt,St,Tt,At,ct,ut,yt,qe,ft,_t,lt,xt,tt,dt,mt,st,Et,Kt],styles:[".sign-out[_ngcontent-%COMP%]{color:var(--primary-500);text-decoration:none;cursor:pointer}.subtitle[_ngcontent-%COMP%]{text-align:center;font-size:var(--caption-font-size);font-weight:var(--regular-font-weight);letter-spacing:var(--positive2-letter-spacing);text-transform:uppercase}.title[_ngcontent-%COMP%]{text-align:center}.list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--spacing-4)}.rocket-icon-desktop[_ngcontent-%COMP%]{width:204px}.rocket-icon-mobile[_ngcontent-%COMP%]{width:90%;height:90%}"]});let t=e;return t})();var Co=function(t){return t.LpSignin="lpsignin",t.LpSignup="lpsignup",t.JdSignup="jdsignup",t.JdSignin="jdsignin",t.JdLpSignin="jdlpsignin",t.TrimbleSignup="trimblesignup",t.TrimbleSignin="trimblesignin",t.TrimbleLpSignin="trimblelpsignin",t.CnhSignup="cnhsignup",t.CnhSignin="cnhsignin",t.AgSignin="agrocadsignin",t.AgSignup="agrocadsignup",t.IpInfo="ipinfo",t.UserFeedback="userfeedback",t}(Co||{});var pm=t=>({"bg-primary-500":t}),dm=(t,e)=>({"text-gray-0":t,"text-gray-600":e});function fm(t,e){if(t&1){let n=be();h(0,"button",17),he("click",function(){let r=fe(n).$implicit,a=D(3);return me(a.rate(r))}),h(1,"h4",18),y(2),v()()}if(t&2){let n=e.$implicit,i=D(3);k("ngClass",ze(3,pm,i.selectedRating===n)),d(),k("ngClass",wr(5,dm,i.selectedRating===n,i.selectedRating!==n)),d(),E(" ",n," ")}}function mm(t,e){if(t&1&&(h(0,"div")(1,"p"),y(2),v(),h(3,"div",13)(4,"div",14),G(5,fm,3,8,"button",15),v(),h(6,"div",16)(7,"span"),y(8),v(),h(9,"span"),y(10),v()()()()),t&2){let n=D().$implicit,i=D();d(2),z(n("pathPlanSatisfaction")),d(3),k("ngForOf",i.ratings),d(3),z(n("extremelyDissatisfied")),d(2),z(n("extremelySatisfied"))}}function hm(t,e){if(t&1&&(h(0,"mat-radio-button",20),y(1),v()),t&2){let n=e.$implicit;k("value",n.key),d(),z(n.value)}}function gm(t,e){if(t&1&&(h(0,"div")(1,"p"),y(2),v(),h(3,"mat-radio-group",19),Do(4,hm,2,2,"mat-radio-button",20,Ao),x(6,"keyvalue"),v()()),t&2){let n=D().$implicit,i=D();d(2),z(n("appliesToUser")),d(2),Oo(L(6,1,i.appliesToUserOption))}}function vm(t,e){if(t&1&&(h(0,"div")(1,"p"),y(2),v(),h(3,"mat-form-field",21),K(4,"textarea",22),v()()),t&2){let n=D().$implicit;d(2),z(n("pathPlanningImprovements")),d(2),k("placeholder",n("recommendationPlaceholder"))}}function ym(t,e){if(t&1){let n=be();h(0,"button",23),he("click",function(){fe(n);let r=D(2);return me(r.goToPreviousStep())}),y(1),v()}if(t&2){let n=D().$implicit;d(),E(" ",n("previous")," ")}}function bm(t,e){if(t&1){let n=be();h(0,"button",24),he("click",function(){fe(n);let r=D(2);return me(r.goToNextStep())}),y(1),x(2,"transloco"),v()}t&2&&(d(),E(" ",L(2,1,"common.next")," "))}function xm(t,e){if(t&1){let n=be();h(0,"button",25),he("click",function(){fe(n);let r=D(2);return me(r.onDone())}),y(1),x(2,"transloco"),v()}t&2&&(d(),E(" ",L(2,1,"common.done")," "))}function Pm(t,e){if(t&1&&(h(0,"mat-card")(1,"div",1)(2,"mat-card-title",2)(3,"h4",2),y(4),v()(),h(5,"div",3),K(6,"button",4),v()(),K(7,"hr"),h(8,"div",5),K(9,"p",6),G(10,mm,11,4,"div",7)(11,gm,7,3,"div",7)(12,vm,5,2,"div",7),v(),K(13,"hr",8),h(14,"div",9)(15,"div"),y(16),v(),h(17,"div"),G(18,ym,2,1,"button",10)(19,bm,3,3,"button",11)(20,xm,3,3,"button",12),v()()()),t&2){let n=e.$implicit,i=D();d(4),z(n("unlockExport")),d(4),k("formGroup",i.form),d(),k("innerHtml",n("unlockExportDescription"),br),d(),k("ngIf",i.currentStep===1),d(),k("ngIf",i.currentStep===2),d(),k("ngIf",i.currentStep===3),d(4),Ut("",i.currentStep," ",n("ofThree"),""),d(2),k("ngIf",i.currentStep>1),d(),k("ngIf",i.currentStep<3),d(),k("ngIf",i.currentStep===3)}}var mu=(()=>{let e=class e{constructor(i,r,a,o,s){this.dialogRef=i,this.translocoService=r,this.featureBundleService=a,this.userEventService=o,this.translationService=s,this.currentLanguage=this.translationService.activeLang,this.ratings=[1,2,3,4,5],this.selectedRating=null,this.appliesToUserOption={planSomeFields:this.translocoService.translate("featureBundle.unlockExport.planSomeFields"),believesPrePlanningHelps:this.translocoService.translate("featureBundle.unlockExport.believesPrePlanningHelps"),strugglesWithSoilErosion:this.translocoService.translate("featureBundle.unlockExport.strugglesWithSoilErosion"),manageSoilCompaction:this.translocoService.translate("featureBundle.unlockExport.manageSoilCompaction")},this.currentStep=1,this.destroyRef=V(W),this.ratingFormControl=new Or(null),this.userDescription=new Or(null),this.improvementsFormControl=new Or(null),this.form=new Qo({rating:this.ratingFormControl,userDescription:this.userDescription,improvements:this.improvementsFormControl})}rate(i){this.ratingFormControl.setValue(i),this.selectedRating=i}goToNextStep(){this.currentStep<3&&this.currentStep++}goToPreviousStep(){this.currentStep>1&&this.currentStep--}onDone(){let i=null;this.form.value.userDescription!=null&&(i=this.translocoService.translate(`featureBundle.unlockExport.${this.form.value.userDescription}`,{},Ps));let r={rating:this.form.value.rating,userDescription:i,improvements:this.form.value.improvements};this.userEventService.logUserAction(Co.UserFeedback,JSON.stringify(r),!0),this.featureBundleService.extendExportLimit(),this.dialogRef.close(!0)}};e.\u0275fac=function(r){return new(r||e)(B(ki),B(Ce),B(Gt),B(sl),B(zr))},e.\u0275cmp=Ee({type:e,selectors:[["app-unlock-export-dialog"]],standalone:!0,features:[Te],decls:1,vars:1,consts:[[4,"transloco","translocoRead"],[1,"w-100","d-flex","justify-content-between","p-5"],[1,"mb-0"],[1,"align-content-center"],["mat-dialog-close","",1,"ms-auto","btn-close"],["mat-dialog-content","",3,"formGroup"],[1,"mb-8",3,"innerHtml"],[4,"ngIf"],[1,"pt-3"],["mat-dialog-actions","",1,"d-flex","justify-content-between"],["mat-raised-button","","class","button-secondary ms-2",3,"click",4,"ngIf"],["mat-raised-button","","color","primary","class","button-primaryme",3,"click",4,"ngIf"],["mat-raised-button","","color","primary","class","button-primary",3,"click",4,"ngIf"],[1,"d-flex","flex-column",2,"width","304px"],[1,"d-flex","gap-4"],["mat-button","","class","rating-button bg-primary-100",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"d-flex","justify-content-between","smallest-font-size"],["mat-button","",1,"rating-button","bg-primary-100",3,"click","ngClass"],[1,"mb-0",3,"ngClass"],["formControlName","userDescription",1,"d-flex","flex-column"],["color","primary",1,"m-1",3,"value"],[1,"w-100"],["matInput","","formControlName","improvements",2,"resize","vertical","min-height","100px",3,"placeholder"],["mat-raised-button","",1,"button-secondary","ms-2",3,"click"],["mat-raised-button","","color","primary",1,"button-primaryme",3,"click"],["mat-raised-button","","color","primary",1,"button-primary",3,"click"]],template:function(r,a){r&1&&G(0,Pm,21,11,"mat-card",0),r&2&&k("translocoRead","featureBundle.unlockExport")},dependencies:[Kt,Ko,Ar,Dr,Br,Rr,it,zo,_i,Ti,Ei,Qt,Ft,nt,Zt,ht,Je,Tr,qo,We,Ke,Jt,Fi,Li,bt,gt,Ye,Mt,Ur,Vr,Xe,Ze,Jo,Pt,et,at,rt,It,ot,Qe,vt,us,wt,Ct,pt,kt,Lt,St,Tt,At,ct,ut,yt,qe,ft,_t,lt,xt,tt,dt,mt,st,Et],styles:[".rating-button[_ngcontent-%COMP%]{min-width:48px!important;width:48px!important;height:48px!important;padding:0!important}.custom-textarea[_ngcontent-%COMP%]{min-width:432px;min-height:116px}"]});let t=e;return t})();var aa=(()=>{let e=class e{constructor(i,r,a){this.featureBundleService=i,this.dialog=r,this.menuService=a,this.export=new C,this.destroyRef=V(W),this.initialize()}initialize(){this.menuService.isMobile$.pipe(F(this.destroyRef)).subscribe(i=>{this.isMobile=i})}initializeExportObservables(){this.featureBundleService.canExportPathPlan$.pipe(F(this.destroyRef)).subscribe(i=>{this.canExportPathPlan=i}),this.featureBundleService.exportedPathPlanLimitReached$.pipe(F(this.destroyRef)).subscribe(i=>{this.exportedPathPlanLimitReached=i})}onExport(i){this.initializeExportObservables();let a={pathPlanId:i[0],overwrite:!0,template:"",push:!0};!this.canExportPathPlan&&this.exportedPathPlanLimitReached?this.handleUnlockExportDialog(a):this.canExportPathPlan&&!this.exportedPathPlanLimitReached?this.openPushScreenComponent(a):this.openTrialEndedComponent()}handleUnlockExportDialog(i){this.dialog.open(mu,{position:{bottom:"24px",right:"40px"},maxWidth:"480px"}).afterClosed().subscribe(a=>{a===!0&&this.canExportPathPlan?this.openPushScreenComponent(i):this.export.next(null)})}openPushScreenComponent(i){this.dialog.open(uu,{width:"425px",data:{pathPlan:i,pathPlansPageService:this.export}}).afterClosed().subscribe(()=>{this.export.next(null)})}openTrialEndedComponent(){this.dialog.open(fu,{minWidth:this.isMobile?"100vw":"538px",maxHeight:this.isMobile?"100vh":"",panelClass:"background-primary-100"}).afterClosed().subscribe(()=>{this.export.next(null)})}exportPlans(i){this.export.next(i)}};e.\u0275fac=function(r){return new(r||e)(M(Gt),M(kr),M(ge))},e.\u0275prov=j({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var Sm=()=>({height:"100vh"});function wm(t,e){if(t&1&&(h(0,"div",22)(1,"div")(2,"h5",23),y(3),v(),h(4,"mat-label",24),y(5),x(6,"transloco"),v()()()),t&2){let n=D();d(3),E(" ",n.data==null||n.data.pathPlan==null?null:n.data.pathPlan.pathPlanName," "),d(2),z(L(6,2,"common.pathPlan"))}}function Cm(t,e){if(t&1&&(h(0,"span"),y(1),x(2,"number"),v()),t&2){let n=D(3);d(),E(" (",ie(2,1,n.data==null||n.data.pathPlan==null?null:n.data.pathPlan.trafficAreaPercent,"1.0-2")," %) ")}}function Mm(t,e){if(t&1&&(h(0,"div",12)(1,"p",13),y(2),x(3,"transloco"),v(),h(4,"p",14),y(5),x(6,"uomArea"),x(7,"number"),h(8,"span"),y(9),x(10,"translateUnits"),v(),G(11,Cm,3,4,"span"),v()()),t&2){let n=D(2);d(2),E(" ",L(3,4,"seasonal.wheelTrafficArea")," "),d(3),E(" ",He(7,8,L(6,6,n.data==null||n.data.pathPlan==null?null:n.data.pathPlan.trafficArea),"1.0-2",n.currentLanguage)," "),d(4),E(" ",ie(10,12,n.enumProvider.UnitType.Area,n.enumProvider.getUom()),""),d(2),ye(!(n.data==null||n.data.pathPlan==null)&&n.data.pathPlan.trafficAreaPercent?11:-1)}}function Im(t,e){if(t&1&&(h(0,"div",12)(1,"p",13),y(2),x(3,"transloco"),v(),h(4,"p",14),y(5),x(6,"uomArea"),x(7,"number"),h(8,"span"),y(9),x(10,"translateUnits"),v()()()),t&2){let n=D(2);d(2),E(" ",L(3,3,"seasonal.cumulativeTrafficArea")," "),d(3),E(" ",He(7,7,L(6,5,n.data==null||n.data.pathPlan==null?null:n.data.pathPlan.cumulativeTrafficArea),"1.0-2",n.currentLanguage)," "),d(4),E(" ",ie(10,11,n.enumProvider.UnitType.Area,n.enumProvider.getUom()),"")}}function Em(t,e){if(t&1&&(h(0,"span"),y(1),x(2,"number"),v()),t&2){let n=D(3);d(),E(" (",ie(2,1,n.data==null||n.data.pathPlan==null?null:n.data.pathPlan.tramlineAreaPercent,"1.0-2")," %) ")}}function Tm(t,e){if(t&1&&(h(0,"div",12)(1,"p",13),y(2),x(3,"transloco"),v(),h(4,"p",14),y(5),x(6,"uomArea"),x(7,"number"),h(8,"span"),y(9),x(10,"translateUnits"),v(),G(11,Em,3,4,"span"),v()()),t&2){let n=D(2);d(2),E(" ",L(3,4,"seasonal.tramlineArea")," "),d(3),E(" ",He(7,8,L(6,6,n.data==null||n.data.pathPlan==null?null:n.data.pathPlan.tramlineArea),"1.0-2",n.currentLanguage)," "),d(4),E(" ",ie(10,12,n.enumProvider.UnitType.Area,n.enumProvider.getUom()),""),d(2),ye(!(n.data==null||n.data.pathPlan==null)&&n.data.pathPlan.tramlineAreaPercent?11:-1)}}function _m(t,e){if(t&1&&(h(0,"div",12)(1,"p",13),y(2),x(3,"transloco"),v(),h(4,"p",25),y(5),x(6,"uomArea"),x(7,"number"),h(8,"span"),y(9),x(10,"translateUnits"),v()()()),t&2){let n=D(2);d(2),E(" ",L(3,3,"seasonal.overlapArea")," "),d(3),E(" ",He(7,7,L(6,5,n.data==null||n.data.pathPlan==null?null:n.data.pathPlan.overlapArea),"1.0-2",n.currentLanguage)," "),d(4),E(" ",ie(10,11,n.enumProvider.UnitType.Area,n.enumProvider.getUom()),"")}}function km(t,e){if(t&1&&(h(0,"div",12)(1,"p",13),y(2),x(3,"transloco"),v(),h(4,"p",25),y(5),x(6,"uomArea"),x(7,"number"),h(8,"span"),y(9),x(10,"translateUnits"),v()()()),t&2){let n=D(2);d(2),E(" ",L(3,3,"seasonal.missedArea")," "),d(3),E(" ",He(7,7,L(6,5,n.data==null||n.data.pathPlan==null?null:n.data.pathPlan.missedArea),"1.0-2",n.currentLanguage)," "),d(4),E(" ",ie(10,11,n.enumProvider.UnitType.Area,n.enumProvider.getUom()),"")}}function Lm(t,e){if(t&1&&(h(0,"mat-card")(1,"mat-card-content")(2,"div",11),G(3,Mm,12,15,"div",12)(4,Im,11,14,"div",12)(5,Tm,12,15,"div",12)(6,_m,11,14,"div",12)(7,km,11,14,"div",12),v()()()),t&2){let n=D();d(3),ye(!(n.data==null||n.data.pathPlan==null)&&n.data.pathPlan.trafficArea?3:-1),d(),ye(!(n.data==null||n.data.pathPlan==null)&&n.data.pathPlan.cumulativeTrafficArea?4:-1),d(),ye(!(n.data==null||n.data.pathPlan==null)&&n.data.pathPlan.tramlineArea?5:-1),d(),ye((n.data==null||n.data.pathPlan==null?null:n.data.pathPlan.overlapArea)!=null?6:-1),d(),ye((n.data==null||n.data.pathPlan==null?null:n.data.pathPlan.missedArea)!=null?7:-1)}}function Fm(t,e){if(t&1){let n=be();h(0,"button",30),he("click",function(){fe(n);let r=D(2);return me(r.onEditPathPlan())}),y(1),x(2,"transloco"),v()}if(t&2){let n=D(2);k("disabled",n.isCurvedPathPlan),d(),E(" ",L(2,2,"common.edit")," ")}}function Am(t,e){if(t&1){let n=be();h(0,"div",26)(1,"div",27),G(2,Fm,3,4,"button",28),h(3,"button",29),he("click",function(){fe(n);let r=D();return me(r.onExportPathPlan())}),y(4),x(5,"transloco"),v()()()}if(t&2){let n=D();d(2),ye(!n.isAgroCadPathPlan&&(n.data!=null&&n.data.editButtonAvailable)?2:-1),d(2),E(" ",L(5,2,"common.export")," ")}}function Dm(t,e){t&1&&K(0,"mat-progress-bar",19)}function Om(t,e){if(t&1&&K(0,"app-measuring-tool",31)(1,"app-map-legend",32),t&2){let n=D();k("map",n.map),d(),k("mapLegend",n.mapLegend$.value)}}function Bm(t,e){t&1&&K(0,"app-map-attributions")}var hu=(()=>{let e=class e extends el{constructor(i,r,a,o,s,l,c,u,m,b,T,O,N,p,f,g,P,w,S,_,R){super(f,g,P,w,S),this.data=i,this.enumProvider=r,this.featureBundleService=a,this.router=o,this.translationService=s,this.mapBaseService=l,this.dialogRef=c,this.pathPlanLayerCreatorService=u,this.demBackgroundRasterService=m,this.wheelTracksProviderService=b,this.slopesProviderService=T,this.routesDataStorageService=O,this.routesRetrieverService=N,this.routesLayerGroupProviderService=p,this.baseMapsProviderService=S,this.menuService=_,this.exportService=R,this.currentLanguage=this.translationService.activeLang,this.boundaryVectorSource=new re,this.boundaryLayer=new Y({source:this.boundaryVectorSource,style:()=>this.slopesProviderService.getLayer()?.getVisible()&&this.slopesProviderService.isAvailable$?.value?se.PathPlan.Boundary.Slopes():this.pathPlanCoverageLayerGroup.getVisible()?se.PathPlan.Boundary.CoveragePart():se.Default.DefaultBoundary()}),this.tracksVectorSource=new re,this.innerBoundaryVectorSource=new re,this.pathPlanLayerGroup=this.pathPlanLayerCreatorService.createPathPlanLayerGroup([this.pathPlanLayerCreatorService.createPathPlanInnerBoundariesLayer(this.innerBoundaryVectorSource),this.pathPlanLayerCreatorService.createPathPlanTracksLayer(this.tracksVectorSource)]),this.pathPlanCoverageLayerGroup=this.pathPlanLayerCreatorService.createPathPlanCoverageLayerGroup([this.pathPlanLayerCreatorService.createPathPlanCoverageInnerBoundariesLayer(this.innerBoundaryVectorSource),this.pathPlanLayerCreatorService.createPathPlanCoverageTracksLayer(this.tracksVectorSource)]),this.coverageLegendItem=new Ne("coverage",this.translocoService.translate("common.coverage"),"assets/icons/map-legend-icons/coverage-icon.svg",this.pathPlanCoverageLayerGroup),this.tracksLegendItem=new Ne("tracks",this.translocoService.translate("common.tracks"),"assets/icons/map-legend-icons/tracks-icon.svg",this.pathPlanLayerGroup),this.mapViewPadding=100,this.baseMapsSourcePage=this.data?.pathPlan?.sourceType,this.destroyRef=V(W)}ngOnInit(){super.ngOnInit(),Mo(this.tracksLegendItem.isVisible$,this.coverageLegendItem.isVisible$,this.slopesProviderService.getLegendItem().isVisible$,this.slopesProviderService.isAvailable$).pipe(F(this.destroyRef)).subscribe(()=>{this.boundaryVectorSource.changed()}),this.demBackgroundRasterService.getLegendItem().isVisible$.pipe(F(this.destroyRef)).subscribe(i=>{i&&!this.demBackgroundRasterService.isAvailable$.value&&this.demBackgroundRasterService.getDemRasterData(this.data?.pathPlan?.boundaryId)}),this.wheelTracksProviderService.getLegendItem().isVisible$.pipe(F(this.destroyRef)).subscribe(i=>{i&&!this.wheelTracksProviderService.isAvailable$.value&&this.wheelTracksProviderService.getWheelTracks(this.data?.pathPlan?.pathPlanId,this.data?.pathPlan?.equipmentSnapshot)}),this.slopesProviderService.getLegendItem().isVisible$.pipe(F(this.destroyRef)).subscribe(i=>{i&&!this.slopesProviderService.isAvailable$.value&&this.slopesProviderService.getSlopes(this.data?.pathPlan?.pathPlanId)}),de([this.featureBundleService.isPpTrial$,this.featureBundleService.isPpPro$]).pipe(F(this.destroyRef)).subscribe(([i,r])=>{r||(this.slopesProviderService.getLegendItem().showProTag$.next(!0),i||this.slopesProviderService.getLegendItem().isDisabled$.next(!0))}),this.routesLayerVisibilitySubscription=de([this.routesLayerGroupProviderService.getLegendItem().isLoading$,this.routesLayerGroupProviderService.getLegendItem().isVisible$,this.routesDataStorageService.isRouteDataAvailable$]).pipe(F(this.destroyRef),Eo((i,r)=>i[0]===r[0]&&i[1]===r[1]&&i[2]===r[2]),F(this.destroyRef)).subscribe(([i,r,a])=>{i===!1&&r===!0&&a===!1&&this.routesRetrieverService.getRoutesForExistingPathPlan(this.data?.pathPlan?.boundaryGeojson,this.data.pathPlan.pathPlanId,!0)}),this.mapInitialized$.pipe(F(this.destroyRef)).subscribe(()=>{if(this.data?.pathPlan?.boundaryGeojson&&this.boundaryVectorSource.addFeatures(this.mapBaseService.convertGeojsonToFeature(this.data?.pathPlan?.boundaryGeojson)),this.data?.pathPlan?.tracksGeojson&&!this.mapBaseService.isEmptyGeojson(this.data?.pathPlan?.tracksGeojson)){let r=this.mapBaseService.convertGeojsonToFeature(this.data?.pathPlan?.tracksGeojson);r.forEach(a=>{a.get("swathWidth")||a.setProperties({swathWidth:this.data?.pathPlan?.swathWidth})}),this.tracksVectorSource.addFeatures(r)}this.isAgroCadPathPlan&&this.data?.pathPlan?.innerBoundaryGeojson&&!this.mapBaseService.isEmptyGeojson(this.data?.pathPlan?.innerBoundaryGeojson)&&this.innerBoundaryVectorSource.addFeatures(this.mapBaseService.convertGeojsonToFeature(this.data?.pathPlan?.innerBoundaryGeojson)),this.menuService.isAdmin$.pipe(F(this.destroyRef)).subscribe(r=>{this.isAdmin=r}),this.map.addLayer(this.demBackgroundRasterService.getLayer()),this.map.addLayer(this.boundaryLayer),this.map.addLayer(this.pathPlanLayerGroup),this.map.addLayer(this.pathPlanCoverageLayerGroup),this.map.addLayer(this.slopesProviderService.getLayer()),this.map.addLayer(this.wheelTracksProviderService.getLayer()),this.map.addLayer(this.routesLayerGroupProviderService.getLayerGroup()),this.map.getView().fit(this.boundaryVectorSource.getExtent(),{size:this.map.getSize(),padding:[this.mapViewPadding,this.mapViewPadding,this.mapViewPadding,this.mapViewPadding]});let i=[this.routesLayerGroupProviderService.isRoutesLayerAvailable$.value?this.routesLayerGroupProviderService.getLegendItem():null,this.canRequestWheelTracks()?this.wheelTracksProviderService.getLegendItem():null,this.slopesProviderService.getLegendItem(),this.coverageLegendItem,this.tracksLegendItem,this.demBackgroundRasterService.getLegendItem()].filter(r=>r);this.mapLegend$.next(new tl([new Ys("layers",null,i),this.baseMapsProviderService.mapTypesLegendGroup])),this.routesLayerGroupProviderService.isRoutesLayerAvailable$.value&&this.data.pathPlan.routes?.length>0&&this.routesDataStorageService.routes$.next(this.data.pathPlan.routes)}),this.exportService.export.pipe(F(this.destroyRef)).subscribe(i=>{i&&this.exportService.onExport(i)})}ngOnDestroy(){super.ngOnDestroy(),this.routesLayerVisibilitySubscription?.unsubscribe(),this.demBackgroundRasterService.clearDemRasterData(),this.wheelTracksProviderService.clearWheelTracksData(),this.slopesProviderService.clearSlopesData(),this.routesDataStorageService.clearRouteData()}onEditPathPlan(){this.mapProviderService.removeMap(this.map),this.router.navigateByUrl(`/path-planning/path-plan/${this.data?.pathPlan?.pathPlanId}`),this.dialogRef.close(!0)}onExportPathPlan(){this.exportService.export.next([this.data?.pathPlan?.pathPlanId])}get isAgroCadPathPlan(){return this.data?.pathPlan?.source==="agk"}get isCurvedPathPlan(){return this.data?.pathPlan?.algorithm?.includes("curvedtracks.v3")||!1}canRequestWheelTracks(){return this.data?.pathPlan?.equipmentSnapshot?.tireWidths?.length>0&&this.data?.pathPlan?.equipmentSnapshot?.trackWidths?.length>0}};e.\u0275fac=function(r){return new(r||e)(B(_r),B(Gr),B(Gt),B(jr),B(zr),B(Oi),B(ki),B(yn),B(Zc),B(eu),B(bn),B(ce),B(cu),B(na),B(Ce),B(Ot),B(Xs),B(ls),B(qr),B(ge),B(aa))},e.\u0275cmp=Ee({type:e,selectors:[["app-path-plan-view"]],standalone:!0,features:[Sr([Ts,qr,bn,on]),Xi,Te],decls:134,vars:115,consts:[["mapContainer",""],["mapContent",""],["zoomControls",""],[1,"path-plan-preview-map","position-relative",3,"ngStyle"],[1,"d-flex"],[1,"sidebar","sidebar-sm","view-sidebar","vh-100","mat-elevation-z4","p-6","d-flex","flex-column"],[1,"card","card-header"],["mat-raised-button","","mat-dialog-close","",1,"button-ghost","button-left-icon"],["svgIcon","arrow-left"],["class","mt-2",4,"transloco","translocoRead"],[1,"d-flex","flex-column","flex-grow-1","overflow-auto","gap-4","mt-4"],[1,"d-flex","flex-column","gap-2"],[1,"card-label-value-sm","d-flex","justify-content-between"],[1,"caption-label","text-nowrap","me-2"],[1,"text-end","text-break"],["class","card card-header footer mt-auto",4,"transloco","translocoRead"],[1,"flex-grow-1"],[1,"position-relative","w-100","h-100"],[1,"w-100","map-content"],["mode","indeterminate",1,"app-progress-bar"],[1,"map-controls-container"],[4,"ngIf"],[1,"mt-2"],[1,"plan-name","mb-0"],[1,"mat-caption","text-muted","path-plan-caption"],[1,"text-end"],[1,"card","card-header","footer","mt-auto"],[1,"d-flex","flex-column","pt-6"],["mat-raised-button","","data-cy","editPathPlan",1,"w-100","button-primary",3,"disabled"],["mat-raised-button","",1,"w-100","button-secondary",3,"click"],["mat-raised-button","","data-cy","editPathPlan",1,"w-100","button-primary",3,"click","disabled"],[1,"measuring-tool",3,"map"],[3,"mapLegend"]],template:function(r,a){r&1&&(h(0,"div",3)(1,"div",4)(2,"div",5)(3,"div",6)(4,"button",7),K(5,"mat-icon",8),y(6),x(7,"transloco"),v()(),G(8,wm,7,4,"div",9),h(9,"div",10)(10,"mat-card")(11,"mat-card-content")(12,"div",11)(13,"div",12)(14,"p",13),y(15),x(16,"transloco"),v(),h(17,"p",14),y(18),v()(),h(19,"div",12)(20,"p",13),y(21),x(22,"transloco"),v(),h(23,"p",14),y(24),v()(),h(25,"div",12)(26,"p",13),y(27),x(28,"transloco"),v(),h(29,"p",14),y(30),v()(),h(31,"div",12)(32,"p",13),y(33),x(34,"transloco"),v(),h(35,"p",14),y(36),x(37,"titlecase"),v()()()()(),h(38,"mat-card")(39,"mat-card-content")(40,"div",11)(41,"div",12)(42,"p",13),y(43),x(44,"transloco"),v(),h(45,"p",14),y(46),x(47,"uomShortLength"),x(48,"number"),h(49,"span"),y(50),x(51,"translateUnits"),v()()(),h(52,"div",12)(53,"p",13),y(54),x(55,"transloco"),v(),h(56,"p",14),y(57),v()(),h(58,"div",12)(59,"p",13),y(60),x(61,"transloco"),v(),h(62,"p",14),y(63),x(64,"uomLongLength"),x(65,"number"),h(66,"span"),y(67),x(68,"translateUnits"),v()()(),h(69,"div",12)(70,"p",13),y(71),x(72,"transloco"),v(),h(73,"p",14),y(74),x(75,"uomLongLength"),x(76,"number"),h(77,"span"),y(78),x(79,"translateUnits"),v()()(),h(80,"div",12)(81,"p",13),y(82),x(83,"transloco"),v(),h(84,"p",14),y(85),x(86,"uomLongLength"),x(87,"number"),h(88,"span"),y(89),x(90,"translateUnits"),v()()()()()(),G(91,Lm,8,5,"mat-card"),h(92,"mat-card")(93,"mat-card-content")(94,"div",11)(95,"div",12)(96,"p",13),y(97),x(98,"transloco"),v(),h(99,"p",14),y(100),v()(),h(101,"div",12)(102,"p",13),y(103),x(104,"transloco"),v(),h(105,"p",14),y(106),x(107,"date"),v()(),h(108,"div",12)(109,"p",13),y(110),x(111,"transloco"),v(),h(112,"p",14),y(113),x(114,"date"),v()(),h(115,"div",12)(116,"p",13),y(117),x(118,"transloco"),v(),h(119,"p",14),y(120),v()()()()()(),G(121,Am,6,4,"div",15),v(),h(122,"div",16)(123,"div",17,0)(125,"div",18,1),G(127,Dm,1,0,"mat-progress-bar",19),x(128,"async"),h(129,"div",20),K(130,"div",null,2),G(132,Om,2,2),v()(),G(133,Bm,1,0,"app-map-attributions",21),v()()()()),r&2&&(k("ngStyle",Go(114,Sm)),d(6),E(" ",L(7,40,"common.back")," "),d(2),k("translocoRead","pathPlanning.resultsDetail"),d(7),z(L(16,42,"common.grower")),d(3),z(a.data==null||a.data.pathPlan==null?null:a.data.pathPlan.growerName),d(3),z(L(22,44,"common.farm")),d(3),z(a.data==null||a.data.pathPlan==null?null:a.data.pathPlan.farmName),d(3),z(L(28,46,"common.field")),d(3),z(a.data==null||a.data.pathPlan==null?null:a.data.pathPlan.fieldName),d(3),E(" ",L(34,48,"common.operation")," "),d(3),z(L(37,50,a.data==null||a.data.pathPlan==null?null:a.data.pathPlan.activity)),d(7),E(" ",L(44,52,"common.swathWidth")," "),d(3),E(" ",He(48,56,L(47,54,a.data==null||a.data.pathPlan==null?null:a.data.pathPlan.swathWidth),"1.0-2",a.currentLanguage),""),d(4),E(" ",ie(51,60,a.enumProvider.UnitType.ShortDistance,a.enumProvider.getUom()),""),d(4),E(" ",L(55,63,"common.numberOfTracks")," "),d(3),z(a.data==null||a.data.pathPlan==null?null:a.data.pathPlan.numberOfTracks),d(3),E(" ",L(61,65,"common.trackDistance")," "),d(3),E(" ",He(65,69,L(64,67,a.data==null||a.data.pathPlan==null?null:a.data.pathPlan.trackDistance),"1.0-2",a.currentLanguage),""),d(4),E(" ",ie(68,73,a.enumProvider.UnitType.LongDistance,a.enumProvider.getUom()),""),d(4),E(" ",L(72,76,"common.headlandDistance")," "),d(3),E(" ",He(76,80,L(75,78,a.data==null||a.data.pathPlan==null?null:a.data.pathPlan.headlandDistance),"1.0-2",a.currentLanguage),""),d(4),E(" ",ie(79,84,a.enumProvider.UnitType.LongDistance,a.enumProvider.getUom()),""),d(4),E(" ",L(83,87,"common.totalDistance")," "),d(3),E(" ",He(87,91,L(86,89,a.data==null||a.data.pathPlan==null?null:a.data.pathPlan.totalDistance),"1.0-2",a.currentLanguage),""),d(4),E(" ",ie(90,95,a.enumProvider.UnitType.LongDistance,a.enumProvider.getUom()),""),d(2),ye(!(a.data==null||a.data.pathPlan==null)&&a.data.pathPlan.trafficArea||!(a.data==null||a.data.pathPlan==null)&&a.data.pathPlan.cumulativeTrafficArea||!(a.data==null||a.data.pathPlan==null)&&a.data.pathPlan.overlapArea||!(a.data==null||a.data.pathPlan==null)&&a.data.pathPlan.missedArea||!(a.data==null||a.data.pathPlan==null)&&a.data.pathPlan.tramlineArea?91:-1),d(6),E(" ",L(98,98,"common.createdBy")," "),d(3),Ut(" ",a.data==null||a.data.pathPlan==null||a.data.pathPlan.createdBy==null?null:a.data.pathPlan.createdBy.firstName," ",a.data==null||a.data.pathPlan==null||a.data.pathPlan.createdBy==null?null:a.data.pathPlan.createdBy.lastName," "),d(3),E(" ",L(104,100,"common.createdAt")," "),d(3),E(" ",ie(107,102,a.data==null||a.data.pathPlan==null?null:a.data.pathPlan.createdAt,"medium")," "),d(4),E(" ",L(111,105,"common.modifiedAt")," "),d(3),E(" ",ie(114,107,a.data==null||a.data.pathPlan==null?null:a.data.pathPlan.modifiedAt,"medium")," "),d(4),E(" ",L(118,110,"common.headlands")," "),d(3),Ut(" ",a.data==null||a.data.pathPlan==null?null:a.data.pathPlan.interiorHeadlandCount,"/",a.data==null||a.data.pathPlan==null?null:a.data.pathPlan.exteriorHeadlandCount," "),d(),k("translocoRead","pathPlanning.sidebarFooter"),d(6),ye(L(128,112,a.areLayersLoading$)===!0?127:-1),d(5),ye(a.isMapInitialized?132:-1),d(),k("ngIf",a.isMapInitialized))},dependencies:[il,Zs,Js,Ss,Wr,Hr,Cs,Ms,Ir,it,Mr,Cr,_i,Vo,Qt,Ft,nt,Zt,ht,Je,Tr,Yo,We,Ke,Jt,bt,gt,Ye,Mt,Xe,Ze,Lr,Pt,et,at,Ai,rt,It,ot,Qe,vt,wt,fs,Ct,pt,kt,Lt,St,Tt,At,ct,ut,yt,qe,ft,_t,lt,xt,tt,dt,mt,st,Et,Kt],styles:['@font-face{font-family:Montserrat;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v26/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCtr6Hw0aXpsog.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Montserrat;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v26/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCtr6Hw9aXpsog.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Montserrat;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v26/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCtr6Hw2aXpsog.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Montserrat;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v26/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCtr6Hw3aXpsog.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Montserrat;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v26/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCtr6Hw5aXo.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}.view-sidebar[_ngcontent-%COMP%]{background-color:var(--primary-50);width:320px}.view-sidebar[_ngcontent-%COMP%]   .plan-name[_ngcontent-%COMP%]{font-weight:var(--medium-font-weight)}.view-sidebar[_ngcontent-%COMP%]   .path-plan-caption[_ngcontent-%COMP%]{letter-spacing:var(--positive2-letter-spacing);font-size:var(--caption-font-size);line-height:16px;font-weight:var(--regular-font-weight)}.view-sidebar[_ngcontent-%COMP%]   .mat-mdc-card-content[_ngcontent-%COMP%]{padding:var(--spacing-16) var(--spacing-24)}.view-sidebar[_ngcontent-%COMP%]   .mat-mdc-card-content[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin-bottom:0}.view-sidebar[_ngcontent-%COMP%]   .footer[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{gap:var(--spacing-12)}']});let t=e;return t})();var oa=class{constructor(e,n){this.boundaryGeojson=new ae([Me.fromGeometry(e.boundaryGeojson)]),this.tracksGeojson=new ae([Me.fromGeometry(e.tracksGeojson),Me.fromGeometry(e.exteriorHeadlandPassesGeojson),Me.fromGeometry(e.interiorHeadlandPassesGeojson),Me.fromGeometry(e.trackCrossHatchesGeojson),Me.fromGeometry(e.exteriorCrossHatchesGeojson),Me.fromGeometry(e.interiorCrossHatchesGeojson)]),this.innerBoundaryGeojson=new ae([Me.fromGeometry(e.innerBoundaryGeojson)]),this.numberOfTracks=e.numberOfTracks,this.trackDistance=e.trackDistance,this.headlandDistance=e.headlandDistance,this.totalDistance=e.trackDistance+e.turnDistance+e.headlandDistance,this.pathPlanName=e.pathPlanName,this.pathPlanId=e.pathPlanId,this.fieldName=e.fieldName,this.farmName=e.farmName,this.growerName=e.growerName,this.activity=e.activity,this.swathWidth=e.swathWidth,this.sourceType=n,this.source=e.source,this.algorithm=e.algorithm,this.createdAt=e.createdAt,this.createdBy=e.createdBy,this.modifiedAt=e.modifiedAt,this.exteriorHeadlandCount=e.exteriorHeadlandCount,this.interiorHeadlandCount=e.interiorHeadlandCount,this.trafficArea=e.trafficArea,this.trafficAreaPercent=e.trafficAreaPercent,this.cumulativeTrafficArea=e.cumulativeTrafficArea,this.overlapArea=e.overlapArea,this.missedArea=e.missedArea,this.boundaryId=e.boundaryId,this.equipmentSnapshot=e.equipmentSnapshot,this.tramlineArea=e.tramlineArea,this.tramlineAreaPercent=e.tramlineAreaPercent,this.routes=e.routes}};var $t=(()=>{let e=class e extends ti{constructor(i,r){super(i),this.dialog=r,this.subscriptions=new Ci}ngOnDestroy(){this.subscriptions.unsubscribe()}generateBulkGuidance(i){return this.http.post(`${this.apiUrl}/bulk-guidance`,i)}getBulkJobResults(i){return this.http.get(`${this.apiUrl}/bulk-guidance/jobs/${i}`)}fetchVBoundary(i){return this.http.get(`${this.apiUrl}/vboundary/${i}`)}fetchFieldWithBoundariesInfo(i){return this.http.post(`${this.apiUrl}/fields/field-with-boundaries`,i)}fetchPathPlansById(i){return this.http.get(`${this.apiUrl}/path-plans/${i}/list-item`)}fetchPathPlanGeoById(i,r=!1,a=!1,o=!1){let s=new Er;return r&&(s=s.append("calculateWheelTraffic","true")),a&&(s=s.append("includeRoutes","true")),o&&(s=s.append("includeCrossHatches","true")),this.http.get(`${this.apiUrl}/path-plans/${i}/geo`,{params:s})}fetchSeasonalSummaryResult(i){return this.http.post(`${this.apiUrl}/path-plans/seasonal-summary-result`,i)}deletePathPlanById(i){return this.http.delete(`${this.apiUrl}/path-plans/${i}`)}deletePathPlans(i){return this.http.post(`${this.apiUrl}/path-plans/delete`,i)}generateGuidance(i){return this.http.post(`${this.apiUrl}/guidance`,i)}generateGuidanceCurvedTracks(i){return this.http.post(`${this.apiUrl}/guidance`,i)}getGuidanceJobStatus(i,r=!1){return this.http.get(`${this.apiUrl}/guidance/jobs/${i}?omitPathPlanDetails=${r}`)}generateDefaultContours(i){return this.http.post(`${this.apiUrl}/reference-lines/default-contours/geojson`,i)}fetchSmoothedLine(i){return this.http.post(`${this.apiUrl}/geometry/smoothline`,i)}fetchDefaultLines(i){return this.http.post(`${this.apiUrl}/reference-lines/default-lines-deprecated`,i)}getJobExportResult(i){return this.http.get(`${this.apiUrl}/path-plans-export/jobs/${i}`)}saveCurvePathPlan(i){return this.http.post(`${this.apiUrl}/path-plans/upsert`,i)}fetchFieldOperations(i){return this.http.get(`${this.apiUrl}/fields/${i}/operations`)}fetchFieldOperationsInfo(i,r){return this.http.get(`${this.apiUrl}/fields/${i}/operations/${r}`)}getDemRaster(i){return this.http.get(`${this.apiUrl}/admin/dem-raster/${i}`)}getWheelTrafficGeoJson(i,r){return this.http.post(`${this.apiUrl}/wheel-traffic-summary/${i}/geojson`,r,{responseType:"json"})}wheelInfoUpdate(i,r){return this.http.post(`${this.apiUrl}/path-plans/${i}/update-equipment-snapshot`,r)}openPathPlanView(i){this.subscriptions.add(this.fetchPathPlanGeoById(i,!0,!0,!0).subscribe(r=>{this.dialog.open(hu,{height:"100vh",width:"100vw",minWidth:"100vw",panelClass:"fullscreen-dialog",data:{editButtonAvailable:!0,pathPlan:new oa(r,"path-planning")}})}))}generateGuidancePostProcess(i){return this.http.post(`${this.apiUrl}/guidance-post-process`,i)}getGuidancePostProcessJobStatus(i){return this.http.get(`${this.apiUrl}/guidance/post-processing-jobs/${i}`)}analyzePathPlans(i){let r=new URL(`${window.location.origin}/analyze`);r.searchParams.set("pathPlans",i.join(",")),window.open(r,"_blank")}};e.\u0275fac=function(r){return new(r||e)(B(Xt),B(kr))},e.\u0275dir=vr({type:e,features:[Xi]}),e.\u0275prov=j({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var sa=class extends $r{};var gu=class extends sa{constructor(e){super(),this.isAll=!1,e&&Object.assign(this,e)}};var la=class extends $r{};var vu=class extends la{constructor(e){super(),this.isAll=!1,e&&Object.assign(this,e)}};var yu=class{static getDistanceInPxBetween2Coords(e,n,i){let r=e.getPixelFromCoordinate(n),a=e.getPixelFromCoordinate(i),o=r[0]-a[0],s=r[1]-a[1];return Math.sqrt(o*o+s*s)}static isExtentEmpty(e){let n=Ls();return Nr.deepEqual(n,e)}static metersToMercatorUnits(e,n){return e/Math.cos(n*Math.PI/180)}};export{Gt as a,fu as b,gh as c,no as d,ar as e,Gi as f,te as g,Cd as h,Td as i,Xd as j,af as k,of as l,dr as m,fr as n,Xc as o,Jc as p,yn as q,Kv as r,Zc as s,ce as t,Wi as u,ou as v,su as w,na as x,cu as y,Rm as z,cl as A,pl as B,Co as C,aa as D,hu as E,oa as F,$t as G,yu as H,gu as I,vu as J};
