@mxtommy/kip 3.9.0-beta.8 → 3.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/copilot-instructions.md +1 -1
- package/.github/instructions/angular.instructions.md +46 -0
- package/CHANGELOG.md +11 -0
- package/README.md +1 -1
- package/package.json +3 -5
- package/public/3rdpartylicenses.txt +129 -129
- package/public/assets/apple-icon-180.png +0 -0
- package/public/assets/apple-splash-1125-2436.jpg +0 -0
- package/public/assets/apple-splash-1136-640.jpg +0 -0
- package/public/assets/apple-splash-1170-2532.jpg +0 -0
- package/public/assets/apple-splash-1179-2556.jpg +0 -0
- package/public/assets/apple-splash-1206-2622.jpg +0 -0
- package/public/assets/apple-splash-1242-2208.jpg +0 -0
- package/public/assets/apple-splash-1242-2688.jpg +0 -0
- package/public/assets/apple-splash-1284-2778.jpg +0 -0
- package/public/assets/apple-splash-1290-2796.jpg +0 -0
- package/public/assets/apple-splash-1320-2868.jpg +0 -0
- package/public/assets/apple-splash-1334-750.jpg +0 -0
- package/public/assets/apple-splash-1488-2266.jpg +0 -0
- package/public/assets/apple-splash-1536-2048.jpg +0 -0
- package/public/assets/apple-splash-1620-2160.jpg +0 -0
- package/public/assets/apple-splash-1640-2360.jpg +0 -0
- package/public/assets/apple-splash-1668-2224.jpg +0 -0
- package/public/assets/apple-splash-1668-2388.jpg +0 -0
- package/public/assets/apple-splash-1792-828.jpg +0 -0
- package/public/assets/apple-splash-2048-1536.jpg +0 -0
- package/public/assets/apple-splash-2048-2732.jpg +0 -0
- package/public/assets/apple-splash-2160-1620.jpg +0 -0
- package/public/assets/apple-splash-2208-1242.jpg +0 -0
- package/public/assets/apple-splash-2224-1668.jpg +0 -0
- package/public/assets/apple-splash-2266-1488.jpg +0 -0
- package/public/assets/apple-splash-2360-1640.jpg +0 -0
- package/public/assets/apple-splash-2388-1668.jpg +0 -0
- package/public/assets/apple-splash-2436-1125.jpg +0 -0
- package/public/assets/apple-splash-2532-1170.jpg +0 -0
- package/public/assets/apple-splash-2556-1179.jpg +0 -0
- package/public/assets/apple-splash-2622-1206.jpg +0 -0
- package/public/assets/apple-splash-2688-1242.jpg +0 -0
- package/public/assets/apple-splash-2732-2048.jpg +0 -0
- package/public/assets/apple-splash-2778-1284.jpg +0 -0
- package/public/assets/apple-splash-2796-1290.jpg +0 -0
- package/public/assets/apple-splash-2868-1320.jpg +0 -0
- package/public/assets/apple-splash-640-1136.jpg +0 -0
- package/public/assets/apple-splash-750-1334.jpg +0 -0
- package/public/assets/apple-splash-828-1792.jpg +0 -0
- package/public/assets/apple-touch-icon.png +0 -0
- package/public/assets/favicon-16x16.png +0 -0
- package/public/assets/favicon-32x32.png +0 -0
- package/public/assets/favicon-64x64.png +0 -0
- package/public/assets/favicon.ico +0 -0
- package/public/assets/favicon.svg +25 -73
- package/public/assets/faviconn.ico +0 -0
- package/public/assets/help-docs/configuration.md +4 -4
- package/public/assets/help-docs/dashboards.md +4 -2
- package/public/assets/help-docs/welcome.md +14 -9
- package/public/assets/icon-192x192.png +0 -0
- package/public/assets/icon-256x256.png +0 -0
- package/public/assets/icon-384x384.png +0 -0
- package/public/assets/icon-512x512.png +0 -0
- package/public/assets/icon-64x64.png +0 -0
- package/public/assets/icon-72x72.png +0 -0
- package/public/assets/manifest-icon-192.maskable.png +0 -0
- package/public/assets/manifest-icon-512.maskable.png +0 -0
- package/public/assets/svg/icons.svg +436 -45
- package/public/{chunk-2YVW3TBK.js → chunk-25PZU2O2.js} +1 -1
- package/public/chunk-2RLXZJPK.js +7 -0
- package/public/chunk-3IUMPTFN.js +6 -0
- package/public/chunk-5KVBD33V.js +4 -0
- package/public/chunk-6WOHGZ7K.js +11 -0
- package/public/{chunk-CQXWGD3T.js → chunk-BYWGV2DR.js} +2 -2
- package/public/chunk-CW3ZK4N3.js +2 -0
- package/public/chunk-DNBBDEKP.js +6 -0
- package/public/chunk-FYD5M4IT.js +16 -0
- package/public/{chunk-KTDDP73O.js → chunk-HECHZXLY.js} +1 -1
- package/public/chunk-N6T2NRWF.js +1 -0
- package/public/chunk-NEYBKWJP.js +1 -0
- package/public/{chunk-4JJLPUET.js → chunk-NHAQWUX3.js} +1 -1
- package/public/chunk-RIG2POCP.js +1 -0
- package/public/chunk-TGXMWTBW.js +1 -0
- package/public/chunk-TP7LH2BI.js +11 -0
- package/public/chunk-ZJO5PJKQ.js +5 -0
- package/public/chunk-ZMNGRHMV.js +1 -0
- package/public/index.html +18 -16
- package/public/main-AQ7CLM7C.js +53 -0
- package/public/{styles-RECKN66R.css → styles-PDNHT2L2.css} +1 -1
- package/public/assets/favicon.png +0 -0
- package/public/assets/hammer.min.js +0 -7
- package/public/chunk-35L7BBBD.js +0 -15
- package/public/chunk-3LEMFOCV.js +0 -3
- package/public/chunk-4R5CMHNA.js +0 -1
- package/public/chunk-5EKHF7EF.js +0 -11
- package/public/chunk-6VZOEK74.js +0 -1
- package/public/chunk-CBUY7NMR.js +0 -2
- package/public/chunk-HCXH72CD.js +0 -5
- package/public/chunk-JY3WVS7C.js +0 -2
- package/public/chunk-LZDK7UWR.js +0 -1
- package/public/chunk-NMEZOCU2.js +0 -1
- package/public/chunk-NS2FPVWM.js +0 -4
- package/public/chunk-O5TE5WOD.js +0 -2
- package/public/chunk-OTC6RE7Y.js +0 -6
- package/public/chunk-PKNLASTF.js +0 -4
- package/public/chunk-Q2Y75POI.js +0 -1
- package/public/chunk-RRTCHHRC.js +0 -3
- package/public/chunk-TA4GACKT.js +0 -4
- package/public/chunk-TXPLRBW5.js +0 -2
- package/public/chunk-VHFBF47T.js +0 -1
- package/public/chunk-VYUMZVH2.js +0 -2
- package/public/chunk-ZBCOJLI4.js +0 -6
- package/public/main-A3JGSNJ3.js +0 -53
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{$b as N,$d as Ot,A as ke,Aa as he,Ac as si,B as ho,Ba as mr,Bb as Je,Bd as yr,Ca as At,Cb as Q,Cd as Bo,Ce as fi,Db as Z,Ea as Ao,Eb as Mt,Ed as Wo,Ee as Jo,F as ri,Fa as re,Fb as Oo,Fc as Et,Fe as Yo,G as po,Gb as Io,Gc as Uo,Ge as Xo,H as go,Hb as pr,I as _o,Ic as Xe,Ie as ui,J as vo,Ja as pe,Jd as Ho,Je as en,K as oi,Ka as ee,Kc as et,Kd as zo,L as le,Lb as Ro,Ld as Go,M as Ke,Ma as P,Mb as Fe,Mc as jo,N as bo,Nb as oe,Nd as qo,Ne as mi,Oc as br,Od as ce,Pb as Oe,Pd as ci,Qb as gr,R as Qe,Rb as de,Sb as Ye,Tb as ne,Ub as O,V as yo,Vb as I,Vd as Ft,Wa as V,Wb as Po,Wd as Se,Xa as Mo,Xb as kt,Ya as ko,Yb as _r,Yc as $o,Za as ge,Zb as vr,Zd as xr,_ as xo,_a as g,a as T,ae as it,b as Y,ca as Co,cc as Vo,dc as No,ea as Ze,eb as xe,f as X,fa as So,fb as G,fd as tt,g as ti,ga as ni,gb as p,h as lo,ha as Do,ib as w,j as Tt,jb as Eo,ka as ai,kb as Ee,kd as k,la as H,m as h,ma as x,mb as te,me as Cr,n as co,na as z,nb as j,ne as Ko,o as y,ob as hr,oe as Qo,p as qe,pa as C,pc as A,qb as Fo,r as fo,ra as d,re as It,s as uo,se as Rt,t as mo,u as ur,ub as $,vb as q,vd as li,wa as wo,wb as K,wc as Lo,x as ie,xa as To,xd as Ie,yc as Ce,ye as Zo,z as ii,zc as _e,zd as di}from"./chunk-FYD5M4IT.js";var f=(function(t){return t.Disconnected="Disconnected",t.HTTPDiscovering="HTTPDiscovering",t.HTTPConnected="HTTPConnected",t.HTTPError="HTTPError",t.HTTPRetrying="HTTPRetrying",t.WebSocketConnecting="WebSocketConnecting",t.Connected="Connected",t.WebSocketError="WebSocketError",t.WebSocketRetrying="WebSocketRetrying",t.PermanentFailure="PermanentFailure",t})(f||{}),hi=(()=>{class t{config={httpRetryCount:3,webSocketRetryCount:5,retryIntervals:[2e3,3e3,5e3],notificationDebounceMs:0};_currentState$=new y(f.Disconnected);_status$=new y(this.createStatus(f.Disconnected,"Not connected"));_httpRetryCount=0;_webSocketRetryCount=0;_retryTimeout=null;_notificationTimeout=null;_httpRetryCallback=null;_webSocketRetryCallback=null;_isInitializationMode=!0;constructor(){console.log("[ConnectionStateMachine] Service initialized")}get state$(){return this._currentState$.asObservable()}get status$(){return this._status$.asObservable()}get currentState(){return this._currentState$.getValue()}enableWebSocketMode(){this._isInitializationMode=!1,console.log("[ConnectionStateMachine] WebSocket mode enabled");let e=this._status$.getValue();console.log(`[ConnectionStateMachine] Current status when enabling WebSocket mode: ${e.state} - ${e.message}`),this._status$.next(e)}setHTTPRetryCallback(e){this._httpRetryCallback=e}setWebSocketRetryCallback(e){this._webSocketRetryCallback=e}startHTTPDiscovery(e="Connection request"){console.log(`[ConnectionStateMachine] Starting HTTP discovery: ${e}`),this._httpRetryCount=0,this.setState(f.HTTPDiscovering,"Discovering Signal K server...")}onHTTPDiscoverySuccess(){console.log("[ConnectionStateMachine] HTTP discovery successful"),this._httpRetryCount=0,this.setState(f.HTTPConnected,"Signal K server discovered"),this._isInitializationMode||this.startWebSocketConnection()}onHTTPDiscoveryError(e){console.log(`[ConnectionStateMachine] HTTP discovery failed: ${e}`),this._httpRetryCount<this.config.httpRetryCount?(this._httpRetryCount++,this.setState(f.HTTPRetrying,`HTTP connection failed. Retrying (${this._httpRetryCount}/${this.config.httpRetryCount})...`,this._httpRetryCount,this.config.httpRetryCount),this.scheduleHTTPRetry()):this.setState(f.PermanentFailure,`HTTP connection failed after ${this.config.httpRetryCount} attempts. Check server URL.`,this.config.httpRetryCount,this.config.httpRetryCount)}startWebSocketConnection(){if(!(this.currentState===f.HTTPConnected||this.currentState===f.WebSocketRetrying||this.currentState===f.WebSocketConnecting||this.currentState===f.Connected))return this.currentState===f.HTTPDiscovering,void 0;console.log("[ConnectionStateMachine] Starting WebSocket connection"),this._webSocketRetryCount=0,this.setState(f.WebSocketConnecting,"Connecting to Signal K Websocket...")}onWebSocketConnected(){console.log("[ConnectionStateMachine] WebSocket connected"),this._webSocketRetryCount=0,this.setState(f.Connected,"Connected to Signal K server")}onWebSocketError(e){if(console.log(`[ConnectionStateMachine] WebSocket error: ${e}`),this.currentState!==f.HTTPConnected&&this.currentState!==f.WebSocketConnecting&&this.currentState!==f.Connected&&this.currentState!==f.WebSocketRetrying){console.log("[ConnectionStateMachine] HTTP connection lost, restarting HTTP discovery"),this.startHTTPDiscovery("HTTP connection lost during WebSocket operation");return}this._webSocketRetryCount++,this.setState(f.WebSocketRetrying,`WebSocket connection failed. Retry attempt ${this._webSocketRetryCount}...`,this._webSocketRetryCount,this.config.webSocketRetryCount),this.scheduleWebSocketRetry()}shutdown(e="App shutdown"){console.log(`[ConnectionStateMachine] Shutting down all connections: ${e}`),this.clearRetryTimer(),this.clearNotificationTimeout(),this._httpRetryCount=0,this._webSocketRetryCount=0,this.setState(f.Disconnected,"Application restarting...")}isHTTPConnected(){return this.currentState===f.HTTPConnected||this.currentState===f.WebSocketConnecting||this.currentState===f.Connected||this.currentState===f.WebSocketRetrying}isFullyConnected(){return this.currentState===f.Connected}setState(e,i,o,n){this._currentState$.next(e);let a=this.createStatus(e,i,o,n);e===f.HTTPDiscovering||e===f.WebSocketConnecting?this._status$.next(a):e===f.Connected?(this.clearNotificationTimeout(),this._notificationTimeout=setTimeout(()=>{this._status$.next(a)},this.config.notificationDebounceMs)):(this.clearNotificationTimeout(),this._status$.next(a))}createStatus(e,i,o,n){return{state:e,operation:this.stateToOperationCode(e),message:i,retryCount:o||0,maxRetries:n||0,timestamp:new Date}}stateToOperationCode(e){switch(e){case f.Disconnected:return 0;case f.HTTPDiscovering:case f.WebSocketConnecting:return 1;case f.Connected:return 2;case f.HTTPError:case f.WebSocketError:case f.HTTPRetrying:case f.WebSocketRetrying:return 3;case f.HTTPConnected:return 2;case f.PermanentFailure:return 5;default:return 0}}scheduleHTTPRetry(){this.clearRetryTimer();let e=Math.min(this._httpRetryCount-1,this.config.retryIntervals.length-1),i=this.config.retryIntervals[e];console.log(`[ConnectionStateMachine] Scheduling HTTP retry in ${i}ms`),this._retryTimeout=setTimeout(()=>{this._httpRetryCallback?(console.log(`[ConnectionStateMachine] Executing HTTP retry ${this._httpRetryCount}/${this.config.httpRetryCount}`),this._httpRetryCallback()):(console.error("[ConnectionStateMachine] No HTTP retry callback set!"),this.setState(f.Disconnected,"HTTP retry callback not configured"))},i)}scheduleWebSocketRetry(){this.clearRetryTimer(),console.log(`[ConnectionStateMachine] Scheduling WebSocket retry in ${this.config.retryIntervals[1]}ms`),this._retryTimeout=setTimeout(()=>{this._webSocketRetryCallback?(console.log(`[ConnectionStateMachine] Executing WebSocket retry ${this._webSocketRetryCount}/${this.config.webSocketRetryCount}`),this._webSocketRetryCallback()):(console.log("[ConnectionStateMachine] No WebSocket retry callback - using state change method"),this.setState(f.WebSocketConnecting,`Retrying WebSocket connection (${this._webSocketRetryCount}/${this.config.webSocketRetryCount})...`,this._webSocketRetryCount,this.config.webSocketRetryCount))},this.config.retryIntervals[1])}clearRetryTimer(){this._retryTimeout&&(clearTimeout(this._retryTimeout),this._retryTimeout=null)}clearNotificationTimeout(){this._notificationTimeout&&(clearTimeout(this._notificationTimeout),this._notificationTimeout=null)}ngOnDestroy(){this.clearRetryTimer(),this.clearNotificationTimeout(),this._httpRetryCallback=null,this._webSocketRetryCallback=null,this._currentState$?.complete(),this._status$?.complete()}static \u0275fac=function(i){return new(i||t)};static \u0275prov=x({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var rt=(()=>{class t{TIMEOUT_DURATION=1e4;connectionStateMachine=d(hi);constructor(){this.connectionStateMachine.setHTTPRetryCallback(()=>{console.log("[SignalKConnectionService] Executing HTTP retry via callback"),this.retryCurrentConnection()})}serverServiceEndpoint$=new y({operation:0,message:"Not connected",serverDescription:null,httpServiceUrl:null,WsServiceUrl:null});signalKURL;serverName;serverVersion$=new y(null);serverRoles=[];http=d(tt);currentProxyEnabled;currentSubscribeAll;validateSignalKUrl(e){return X(this,null,function*(){if(!e)throw new Error("Please enter a server URL");try{let o=new URL(e);if(!["http:","https:"].includes(o.protocol))throw new Error("URL must start with http:// or https://")}catch{throw new Error("Invalid URL format - please check for typos and ensure it starts with http:// or https://")}let i=e;i.endsWith("signalk/")||(i+="/signalk/"),console.log(`[Connection Service] Validating Signal K server at: ${e}`);try{if(!(yield ie(this.http.get(i,{observe:"response"}).pipe(ii(5e3),Ke(n=>{throw console.error("[Connection Service] HTTP Error details:",n),n.name==="TimeoutError"?(console.error("[Connection Service] Validation timed out after 5000ms"),new Error("Server is not responding - check if the URL is correct and the server is running")):n.status===0||n.status===void 0?new Error("Cannot connect to server - check the URL format and ensure the server is accessible"):n.status===404?new Error("Server found but no Signal K service detected - verify this is a Signal K server"):n.status===403?new Error("Server refused connection - check if the server allows connections from this browser"):n.status>=500?new Error(`Server error (${n.status}) - the Signal K server may be having issues`):new Error(`Connection failed (${n.status}) - ${n.statusText||"please check the server URL"}`)})))).body?.endpoints?.v1)throw new Error("Server responded but doesn't appear to be a Signal K server - missing required endpoints");console.log(`[Connection Service] Validation successful for: ${e}`)}catch(o){throw console.error(`[Connection Service] Validation failed for ${e}:`,o.message),o}})}initializeConnection(e,i,o){return X(this,null,function*(){if(!e.url){console.log("[Connection Service] Connection initialization called with null or empty URL value");return}this.currentProxyEnabled=i,this.currentSubscribeAll=o;let n={operation:1,message:"Connecting...",serverDescription:null,httpServiceUrl:null,WsServiceUrl:null};this.signalKURL=e,this.serverServiceEndpoint$.next(n),this.connectionStateMachine.startHTTPDiscovery(`Connecting to ${e.url}`);let a=this.signalKURL.url;a.endsWith("signalk/")||(a+="/signalk/");try{console.log("[Connection Service] Connecting to: "+this.signalKURL.url);let s=yield ie(this.http.get(a,{observe:"response"}).pipe(ii(this.TIMEOUT_DURATION),Ke(l=>(l.name==="TimeoutError"&&console.error("[Connection Service] Connection request timed out after "+this.TIMEOUT_DURATION+"ms"),ur(l)))));Object.assign(n,this.processEndpointResponse(s,i,o)),this.connectionStateMachine.onHTTPDiscoverySuccess()}catch(s){n.operation=3,n.message=s.message,this.connectionStateMachine.onHTTPDiscoveryError(s.message),this.handleError(s)}finally{n.subscribeAll=!!o,this.serverServiceEndpoint$.next(n)}})}retryCurrentConnection(){if(!this.signalKURL?.url){console.error("[SignalKConnectionService] Cannot retry - no current URL stored");return}console.log(`[SignalKConnectionService] Retrying connection to ${this.signalKURL.url}`),this.performHTTPDiscovery()}performHTTPDiscovery(){return X(this,null,function*(){if(!this.signalKURL?.url){console.error("[SignalKConnectionService] No URL available for HTTP discovery");return}let e=this.signalKURL.url;e.endsWith("signalk/")||(e+="/signalk/");try{console.log("[Connection Service] Connecting to: "+this.signalKURL.url);let i=yield ie(this.http.get(e,{observe:"response"}).pipe(ii(this.TIMEOUT_DURATION),Ke(n=>(n.name==="TimeoutError"&&console.error("[Connection Service] Connection request timed out after "+this.TIMEOUT_DURATION+"ms"),ur(n))))),o=this.processEndpointResponse(i,this.currentProxyEnabled,this.currentSubscribeAll);this.connectionStateMachine.onHTTPDiscoverySuccess(),this.serverServiceEndpoint$.next(o)}catch(i){let o={operation:3,message:i.message,serverDescription:null,httpServiceUrl:null,WsServiceUrl:null};this.connectionStateMachine.onHTTPDiscoveryError(i.message),this.serverServiceEndpoint$.next(o),this.handleError(i)}})}processEndpointResponse(e,i,o){console.debug("[Connection Service] Signal K HTTP Endpoints retrieved"),this.serverVersion$.next(e.body.server.version);let n=e.body.endpoints.v1["signalk-http"],a=e.body.endpoints.v1["signalk-ws"],s={operation:2,message:e.status?.toString()||"Connected",serverDescription:`${e.body.server.id} ${e.body.server.version}`,httpServiceUrl:null,WsServiceUrl:null};if(i)console.debug("[Connection Service] Proxy Mode Enabled"),s.httpServiceUrl=window.location.origin+new URL(n).pathname,s.WsServiceUrl=window.location.protocol.replace("http","ws")+"//"+window.location.host+new URL(a).pathname;else{s.httpServiceUrl=n;let l=window.location.protocol==="https:";s.WsServiceUrl=l?a.replace("ws://","wss://"):a}return console.debug("[Connection Service] HTTP URI: "+s.httpServiceUrl),console.debug("[Connection Service] WebSocket URI: "+s.WsServiceUrl),s.subscribeAll=!!o,s}handleError(e){let i=e.status===0?`[Connection Service] ${e.name}: ${e.message}`:`[Connection Service] Backend returned code ${e.status}, body was: ${e.error}`;throw console.error(i),e}getServiceEndpointStatusAsO(){return this.serverServiceEndpoint$.asObservable()}setServerInfo(e,i,o){this.serverName=e,this.serverRoles=o,console.log(`[Connection Service] Server Name: ${e}, Version: ${i}, Roles: ${JSON.stringify(o)}`)}get skServerName(){return this.serverName}get skServerVersion(){return this.serverVersion$.getValue()}get skServerRoles(){return this.serverRoles}static \u0275fac=function(i){return new(i||t)};static \u0275prov=x({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var kl="/signalk/v1/",tn="auth/login",El="auth/logout",Fl="auth/validate",Ol=60,pi=(()=>{class t{http=d(tt);conn=d(rt);_IsLoggedIn$=new y(!1);isLoggedIn$=this._IsLoggedIn$.asObservable();_authToken$=new y(null);authToken$=this._authToken$.asObservable();connectionEndpointSubscription=null;authTokenSubscription=null;isRenewingToken=!1;loginUrl=null;logoutUrl=null;validateTokenUrl=null;constructor(){let e=JSON.parse(localStorage.getItem("authorization_token"));e&&(e.isDeviceAccessToken?e.expiry===null?(console.log("[Authentication Service] Device Access Token found with expiry: NEVER"),this._authToken$.next(e)):this.isTokenExpired(e.expiry)?(console.log("[Authentication Service] Device Access Token expired. Deleting token"),localStorage.removeItem("authorization_token")):(console.log("[Authentication Service] Device Access Token found in Local Storage"),this._authToken$.next(e)):(console.log("[Authentication Service] User session token found in Local Storage"),console.log("[Authentication Service] Deleting user session token"),localStorage.removeItem("authorization_token"))),this.authTokenSubscription=this._authToken$.pipe(le(i=>!!i&&i.expiry!==null),yo((i,o)=>i.expiry===o.expiry),ke(i=>{let o=this.getTokenExpirationDate(i.expiry,Ol),n=o.getTime()-Date.now();return console.log(`[Authentication Service] Token refresh timer set for ${n} ms (Token Expiry: ${o.toISOString()})`),Math.max(n,0)}),So(i=>_o(i))).subscribe(()=>{this.handleTokenRenewal()}),this.connectionEndpointSubscription=this.conn.serverServiceEndpoint$.subscribe(i=>{if(i.operation===2){let o=i.httpServiceUrl.substring(0,i.httpServiceUrl.length-4);this.loginUrl=o+tn,this.logoutUrl=o+El,this.validateTokenUrl=o+Fl}})}handleTokenRenewal(){if(this.isRenewingToken){console.warn("[Authentication Service] Token renewal already in progress.");return}this.isRenewingToken=!0;let e=JSON.parse(localStorage.getItem("authorization_token"));if(!e){console.warn("[Authentication Service] No token found in local storage. Cannot renew."),this.isRenewingToken=!1;return}if(e.isDeviceAccessToken)console.warn("[Authentication Service] Device Access Token expired. Manual renewal required."),this.isRenewingToken=!1;else if(this.isTokenExpired(e.expiry))console.log("[Authentication Service] User session Token expired. Cannot renew."),this.isRenewingToken=!1;else{console.log("[Authentication Service] User session Token expires soon. Renewing token...");let i=JSON.parse(localStorage.getItem("connectionConfig"));this.login({usr:i.loginName,pwd:i.loginPassword}).then(()=>{console.log("[Authentication Service] Token successfully renewed.")}).catch(o=>{console.error("[Authentication Service] Token renewal failed. Server returned:",o.error)}).finally(()=>{this.isRenewingToken=!1})}}login(n){return X(this,arguments,function*({usr:e,pwd:i,newUrl:o}){let a;if(o?a=o.replace(/\/+$/,"")+kl+tn:a=this.loginUrl,this._IsLoggedIn$.getValue()&&(yield this.logout(!0)),!a)throw console.error("[Authentication Service] Login URL is not set. Cannot perform login."),this.deleteToken(),new Error("Login URL is not set.");yield ie(this.http.post(a,{username:e,password:i},{observe:"response"})).then(s=>{console.log("[Authentication Service] User "+e+" login successful"),this.setSession(s.body.token)}).catch(s=>{this.deleteToken(),this.handleError(s)})})}handleError(e){throw e.status===0&&this.deleteToken(),e}setSession(e){if(e){let i=JSON.parse(atob(e.split(".")[1])).exp,o={token:null,expiry:null,isDeviceAccessToken:!1};i===void 0?(o.token=e,console.log("[Authentication Service] User Session Token received. Token Expiration: NEVER"),this._IsLoggedIn$.next(!0),this._authToken$.next(o),localStorage.setItem("authorization_token",JSON.stringify(o))):this.isTokenExpired(i)?console.log("[Authentication Service] Received expired Session Token from server"):(o.token=e,o.expiry=i,console.log("[Authentication Service] Session Authorization Token received. Token Expiration: "+this.getTokenExpirationDate(o.expiry)),this._IsLoggedIn$.next(!0),this._authToken$.next(o),localStorage.setItem("authorization_token",JSON.stringify(o)))}}isTokenExpired(e){return Math.floor(new Date().getTime()/1e3)>=e}getTokenExpirationDate(e,i){let o=new Date(0);if(i){let n=new Date(0);n.setUTCSeconds(e-i),o=n}else o.setUTCSeconds(e);return o}renewToken(){return this.http.post(this.validateTokenUrl,null,{observe:"response"})}logout(e){return X(this,null,function*(){localStorage.removeItem("authorization_token"),yield ie(this.http.put(this.logoutUrl,null)).then(()=>{this._IsLoggedIn$.next(!1),e||this._authToken$.next(null),console.log("[Authentication Service] User logged out")}).catch(i=>{console.error(i)})})}deleteToken(){this._authToken$&&(console.log("[Authentication Service] Deleting Authorization token"),localStorage.removeItem("authorization_token"),this._IsLoggedIn$.next(!1),this._authToken$.next(null))}setDeviceAccessToken(e){if(e){let i=JSON.parse(atob(e.split(".")[1])).exp,o={token:null,expiry:null,isDeviceAccessToken:!0};i===void 0?(o.token=e,console.log("[Authentication Service] Device Access Token received. Token Expiration: NEVER"),this._IsLoggedIn$.next(!1),this._authToken$.next(o),localStorage.setItem("authorization_token",JSON.stringify(o))):this.isTokenExpired(i)?console.log("[Authentication Service] Received expired Device Access Token from server"):(o.token=e,o.expiry=i,console.log("[Authentication Service] Device Access Token received. Token Expiration: "+this.getTokenExpirationDate(o.expiry)),this._IsLoggedIn$.next(!1),this._authToken$.next(o),localStorage.setItem("authorization_token",JSON.stringify(o)))}}ngOnDestroy(){this.connectionEndpointSubscription?.unsubscribe(),this.authTokenSubscription?.unsubscribe()}static \u0275fac=function(i){return new(i||t)};static \u0275prov=x({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Il=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,Sr=t=>{if(typeof t!="string")throw new TypeError("Invalid argument expected string");let r=t.match(Il);if(!r)throw new Error(`Invalid argument not valid semver ('${t}' received)`);return r.shift(),r},rn=t=>t==="*"||t==="x"||t==="X",on=t=>{let r=parseInt(t,10);return isNaN(r)?t:r},Rl=(t,r)=>typeof t!=typeof r?[String(t),String(r)]:[t,r],Pl=(t,r)=>{if(rn(t)||rn(r))return 0;let[e,i]=Rl(on(t),on(r));return e>i?1:e<i?-1:0},Dr=(t,r)=>{for(let e=0;e<Math.max(t.length,r.length);e++){let i=Pl(t[e]||"0",r[e]||"0");if(i!==0)return i}return 0};var nn=(t,r)=>{let e=Sr(t),i=Sr(r),o=e.pop(),n=i.pop(),a=Dr(e,i);return a!==0?a:o&&n?Dr(o.split("."),n.split(".")):o||n?o?-1:1:0};var wr=(t,r,e)=>{Vl(e);let i=nn(t,r);return sn[e].includes(i)},sn={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},an=Object.keys(sn),Vl=t=>{if(typeof t!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof t}`);if(an.indexOf(t)===-1)throw new Error(`Invalid operator, expected one of ${an.join("|")}`)};var ln=(()=>{class t{server=d(rt);http=d(tt);_auth=d(pi);serverEndpoint=null;isAppDataSupported=!1;configFileVersion=null;sharedConfigName;InitConfig=null;storageServiceReady$=new y(!1);_isLoggedIn=!1;_networkStatus=void 0;patchQueue$=new h;patch=function(e){return this.http.post(e.url,e.document).pipe(Do(()=>console.log("[Storage Service] Remote config patch request completed successfully")),Ke(i=>this.handleError(i)))};constructor(){let e=this.server;this._auth.isLoggedIn$.pipe(k()).subscribe(i=>{this._isLoggedIn=i,this.isStorageServiceReady()}),e.serverServiceEndpoint$.pipe(k()).subscribe(i=>{this._networkStatus=i,this.isStorageServiceReady()}),e.serverVersion$.pipe(k()).subscribe(i=>{i&&(this.isAppDataSupported=wr(i,"1.27.0",">="))}),this.patchQueue$.pipe(bo(i=>this.patch(i)),k()).subscribe(()=>{})}isStorageServiceReady(){this._networkStatus?.httpServiceUrl&&(this.serverEndpoint=this._networkStatus.httpServiceUrl.substring(0,this._networkStatus.httpServiceUrl.length-4)+"applicationData/"),this._networkStatus?.operation===2&&this._isLoggedIn&&this.serverEndpoint?(this.storageServiceReady$.next(!0),console.log(`[Remote Storage Service] Authenticated ${this._isLoggedIn} ,AppData API: ${this.serverEndpoint}`)):this.storageServiceReady$.next(!1)}ensureReady(){if(!this.storageServiceReady$.getValue())throw new Error("[StorageService] Not ready: storageServiceReady is false")}listConfigs(e){return X(this,null,function*(){this.ensureReady();let i=[];if(!this.serverEndpoint)return console.warn("[Storage Service] No server endpoint set. Cannot retrieve config list"),null;let o=this.serverEndpoint,n=o+"global/kip/"+this.configFileVersion+"/?keys=true",a=o+"user/kip/"+this.configFileVersion+"/?keys=true";return e&&(n=o+"global/kip/"+e+"/?keys=true",a=o+"user/kip/"+e+"/?keys=true"),yield ie(this.http.get(n)).then(s=>{for(let l of s)i.push({scope:"global",name:l});console.log("[Storage Service] Retrieved Global config list")}).catch(s=>{this.handleError(s)}),yield ie(this.http.get(a)).then(s=>{for(let l of s)i.push({scope:"user",name:l});console.log("[Storage Service] Retrieved User config list")}).catch(s=>{this.handleError(s)}),i})}getConfig(e,i,o,n){return X(this,null,function*(){this.ensureReady();let a=null,s=this.serverEndpoint+e+"/kip/"+this.configFileVersion+"/"+i;return o&&(s=this.serverEndpoint+e+"/kip/"+o+"/"+i),yield ie(this.http.get(s)).then(l=>{a=l,console.log(`[Storage Service] Retrieved config [${i}] from [${e}] scope`),n&&(this.InitConfig=l)}).catch(l=>{this.handleError(l)}),a})}setConfig(e,i,o,n){return X(this,null,function*(){this.ensureReady();let a=this.serverEndpoint+e+"/kip/"+this.configFileVersion+"/"+i,s=null;return n&&(a=this.serverEndpoint+e+"/kip/"+n+"/"+i),yield ie(this.http.post(a,o)).then(l=>{console.log(`[Storage Service] Saved config [${i}] to [${e}] scope`),s=l}).catch(l=>{this.handleError(l)}),s})}patchConfig(e,i,o){this.ensureReady();let n=this.serverEndpoint+"user/kip/"+this.configFileVersion,a;switch(o&&(n=this.serverEndpoint+"user/kip/"+o),e){case"IAppConfig":a=[{op:"replace",path:`/${this.sharedConfigName}/app`,value:i}];break;case"IThemeConfig":a=[{op:"replace",path:`/${this.sharedConfigName}/theme/themeName`,value:i.themeName}];break;case"IWidgetConfig":a=[{op:"replace",path:`/${this.sharedConfigName}/widget`,value:i}];break;case"ILayoutConfig":a=[{op:"replace",path:`/${this.sharedConfigName}/layout`,value:i}];break;case"Dashboards":a=[{op:"replace",path:`/${this.sharedConfigName}/dashboards`,value:i}];break;case"Array<IUnitDefaults>":a=[{op:"replace",path:`/${this.sharedConfigName}/app/unitDefaults`,value:i}];break;case"Array<IDatasetDef>":a=[{op:"replace",path:`/${this.sharedConfigName}/app/dataSets`,value:i}];break;case"INotificationConfig":a=[{op:"replace",path:`/${this.sharedConfigName}/app/notificationConfig`,value:i}];break;default:console.warn("[Storage Service] JSON Patch request type unknown");break}let s={url:n,document:a};this.patchQueue$.next(s)}patchGlobal(e,i,o,n,a){this.ensureReady();let s=this.serverEndpoint+i+"/kip/"+this.configFileVersion;a&&(s=this.serverEndpoint+i+"/kip/"+a);let l;switch(n){case"add":l=[{op:"add",path:`/${e}`,value:o}];break;case"replace":l=[{op:"replace",path:`/${e}`,value:o}];break;case"remove":l=[{op:"remove",path:`/${e}`,value:o}];break;default:console.warn("[Storage Service] JSON Patch operation request type unknown");break}let c={url:s,document:l};this.patchQueue$.next(c)}removeItem(e,i,o){this.ensureReady();let n=this.serverEndpoint+e+"/kip/"+this.configFileVersion;o&&(n=this.serverEndpoint+e+"/kip/"+o);let a=[{op:"remove",path:`/${i}`}],s={url:n,document:a};this.patchQueue$.next(s)}clear(){this.ensureReady()}set activeConfigFileVersion(e){this.configFileVersion=e}handleError(e){throw e.status===0?console.error("[Storage Service] An error occurred:",e.error):console.error("[Storage Service] Backend returned error: ",e.message),e}get initConfig(){return this.InitConfig}static \u0275fac=function(i){return new(i||t)};static \u0275prov=x({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Re=class{static create(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(r){let e=Math.random()*16|0;return(r=="x"?e:e&3|8).toString(16)})}};var Pt={disableNotifications:!1,menuGrouping:!0,security:{disableSecurity:!0},devices:{disableDevices:!1,showNormalState:!1,showNominalState:!1},sound:{disableSound:!1,muteNormal:!0,muteNominal:!0,muteWarn:!0,muteAlert:!1,muteAlarm:!1,muteEmergency:!1}};var gi={Unitless:"unitless",Speed:"knots",Flow:"l/h",Temperature:"celsius",Length:"m",Volume:"liter",Current:"A",Potential:"V",Charge:"C",Power:"W",Energy:"J",Pressure:"mmHg","Fuel Distance":"nm/l","Energy Distance":"nm/kWh",Density:"kg/m3",Time:"Hours","Angular Velocity":"deg/min",Angle:"deg",Frequency:"Hz",Ratio:"ratio",Resistance:"ohm"};var dn={configVersion:11,autoNightMode:!0,redNightMode:!1,nightModeBrightness:.27,dataSets:[],unitDefaults:gi,notificationConfig:Pt},cn={themeName:""};var fn={configVersion:11,kipUUID:Re.create(),signalKUrl:null,proxyEnabled:!1,signalKSubscribeAll:!1,useDeviceToken:!1,loginName:null,loginPassword:null,useSharedConfig:!1,sharedConfigName:"default"};var Tr={configVersion:11,autoNightMode:!1,redNightMode:!1,nightModeBrightness:.27,dataSets:[{uuid:"afbe4e41-26f5-404f-a55d-9f7b9b76fbd1",path:"self.environment.wind.speedApparent",pathSource:"default",period:1,baseUnit:"m/s",label:"self.environment.wind.speedApparent, Source: default, Scale: minute, Period: 1",timeScaleFormat:"minute"}],unitDefaults:{Unitless:"unitless",Speed:"knots",Flow:"l/h",Temperature:"celsius",Length:"m",Volume:"liter",Current:"A",Potential:"V",Charge:"C",Power:"W",Energy:"J",Pressure:"mmHg","Fuel Distance":"nm/l","Energy Distance":"nm/kWh",Density:"kg/m3",Time:"Hours","Angular Velocity":"deg/min",Angle:"deg",Frequency:"Hz",Ratio:"ratio",Resistance:"ohm"},notificationConfig:{disableNotifications:!1,menuGrouping:!0,security:{disableSecurity:!0},devices:{disableDevices:!1,showNormalState:!1,showNominalState:!1},sound:{disableSound:!1,muteNormal:!0,muteNominal:!0,muteWarn:!0,muteAlert:!1,muteAlarm:!1,muteEmergency:!1}}},Ar=[{id:"3e0825ee-95fd-4ad4-8802-e0507845b668",name:"Sailing",icon:"dashboard-sailing",configuration:[{w:3,h:4,id:"339698a7-2cff-4ab9-9b50-d8056f971471",selector:"widget-numeric",input:{widgetProperties:{type:"widget-numeric",uuid:"339698a7-2cff-4ab9-9b50-d8056f971471",config:{displayName:"Depth",filterSelfPaths:!0,paths:{numericPath:{description:"Numeric Data",path:"self.environment.depth.belowTransducer",source:"default",pathType:"number",isPathConfigurable:!0,convertUnitTo:"m",showPathSkUnitsFilter:!0,pathSkUnitsFilter:null,sampleTime:500}},showMax:!1,showMin:!1,numDecimal:1,showMiniChart:!0,yScaleMin:0,yScaleMax:100,inverseYAxis:!1,verticalChart:!1,color:"blue",enableTimeout:!1,dataTimeout:5,ignoreZones:!1}}},x:0,y:0},{w:5,h:10,id:"a44028e0-dfee-4492-895b-2b03a60f3a69",selector:"widget-wind-steer",input:{widgetProperties:{type:"widget-wind-steer",uuid:"a44028e0-dfee-4492-895b-2b03a60f3a69",config:{filterSelfPaths:!0,paths:{headingPath:{description:"True Heading",path:"self.navigation.headingTrue",source:"default",pathType:"number",isPathConfigurable:!0,pathRequired:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",convertUnitTo:"deg",showConvertUnitTo:!1,sampleTime:500},appWindAngle:{description:"Apparent Wind Angle",path:"self.environment.wind.angleApparent",source:"default",pathType:"number",isPathConfigurable:!0,pathRequired:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",convertUnitTo:"deg",showConvertUnitTo:!1,sampleTime:500},appWindSpeed:{description:"Apparent Wind Speed",path:"self.environment.wind.speedApparent",source:"default",pathType:"number",isPathConfigurable:!0,pathRequired:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"m/s",convertUnitTo:"knots",sampleTime:500},trueWindAngle:{description:"True Wind Angle",path:"self.environment.wind.angleTrueWater",source:"default",pathType:"number",isPathConfigurable:!0,pathRequired:!1,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",convertUnitTo:"deg",showConvertUnitTo:!1,sampleTime:500},trueWindSpeed:{description:"True Wind Speed",path:"self.environment.wind.speedTrue",source:"default",pathType:"number",isPathConfigurable:!0,pathRequired:!1,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"m/s",convertUnitTo:"knots",sampleTime:500},courseOverGround:{description:"True Course Over Ground",path:"self.navigation.courseOverGroundTrue",source:"default",pathType:"number",isPathConfigurable:!0,pathRequired:!1,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",showConvertUnitTo:!1,convertUnitTo:"deg",sampleTime:500},nextWaypointBearing:{description:"Next Waypoint True Bearing",path:"self.navigation.courseGreatCircle.nextPoint.bearingTrue",source:"default",pathType:"number",isPathConfigurable:!1,pathRequired:!1,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",convertUnitTo:"deg",showConvertUnitTo:!1,sampleTime:500},set:{description:"True Drift Set",path:"self.environment.current.setTrue",source:"default",pathType:"number",isPathConfigurable:!0,pathRequired:!1,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",convertUnitTo:"deg",showConvertUnitTo:!1,sampleTime:500},drift:{description:"Drift Speed Impact",path:"self.environment.current.drift",source:"default",pathType:"number",isPathConfigurable:!0,pathRequired:!1,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"m/s",convertUnitTo:"knots",sampleTime:500}},windSectorEnable:!0,windSectorWindowSeconds:5,laylineEnable:!0,laylineAngle:40,waypointEnable:!0,courseOverGroundEnable:!0,driftEnable:!0,awsEnable:!0,twsEnable:!0,sailSetupEnable:!1,enableTimeout:!1,dataTimeout:5}}},x:3,y:0},{w:4,h:6,id:"24406c15-7738-4dc1-a206-7a4862c2931d",selector:"widget-gauge-ng-radial",input:{widgetProperties:{type:"widget-gauge-ng-radial",uuid:"24406c15-7738-4dc1-a206-7a4862c2931d",config:{displayName:"SOG",filterSelfPaths:!0,paths:{gaugePath:{description:"Numeric Data",path:"self.navigation.speedOverGround",source:"default",pathType:"number",isPathConfigurable:!0,showPathSkUnitsFilter:!0,pathSkUnitsFilter:null,convertUnitTo:"knots",sampleTime:500}},displayScale:{lower:0,upper:10,type:"linear"},gauge:{type:"ngRadial",subType:"measuring",enableTicks:!0,compassUseNumbers:!1,highlightsWidth:5,scaleStart:180},numInt:1,numDecimal:1,enableTimeout:!1,color:"yellow",dataTimeout:5,ignoreZones:!1}}},x:8,y:0},{w:3,h:4,id:"c6bcaa53-afa1-42c7-ad92-d5f7dba14734",selector:"widget-numeric",input:{widgetProperties:{type:"widget-numeric",uuid:"c6bcaa53-afa1-42c7-ad92-d5f7dba14734",config:{displayName:"STW",filterSelfPaths:!0,paths:{numericPath:{description:"Numeric Data",path:"self.navigation.speedThroughWater",source:"default",pathType:"number",isPathConfigurable:!0,convertUnitTo:"knots",showPathSkUnitsFilter:!0,pathSkUnitsFilter:null,sampleTime:500}},showMax:!0,showMin:!0,numDecimal:1,showMiniChart:!1,yScaleMin:0,yScaleMax:10,inverseYAxis:!1,verticalChart:!1,color:"contrast",enableTimeout:!1,dataTimeout:5,ignoreZones:!1}}},x:0,y:4},{w:4,h:6,id:"973c8804-be09-4923-bb5d-48c13b65db69",selector:"widget-data-chart",input:{widgetProperties:{type:"widget-data-chart",uuid:"973c8804-be09-4923-bb5d-48c13b65db69",config:{displayName:"Chart Label",filterSelfPaths:!0,convertUnitTo:"knots",datasetUUID:"afbe4e41-26f5-404f-a55d-9f7b9b76fbd1",inverseYAxis:!1,datasetAverageArray:"sma",showAverageData:!0,trackAgainstAverage:!1,showDatasetMinimumValueLine:!1,showDatasetMaximumValueLine:!1,showDatasetAverageValueLine:!0,showDatasetAngleAverageValueLine:!1,showLabel:!1,showTimeScale:!0,startScaleAtZero:!1,verticalChart:!1,showYScale:!0,yScaleSuggestedMin:null,yScaleSuggestedMax:null,enableMinMaxScaleLimit:!1,yScaleMin:null,yScaleMax:null,numDecimal:1,color:"orange",invertData:!1,verticalGraph:!1}}},x:8,y:6},{x:0,y:8,w:3,h:4,minW:1,minH:1,id:"5289a84d-18fd-4ee7-9724-72249af403f2",selector:"widget-position",input:{widgetProperties:{type:"widget-position",uuid:"5289a84d-18fd-4ee7-9724-72249af403f2",config:{displayName:"Position",filterSelfPaths:!0,paths:{longPath:{description:"Longitude",path:"self.navigation.position.longitude",source:"default",pathType:"number",isPathConfigurable:!0,convertUnitTo:"longitudeMin",showPathSkUnitsFilter:!0,pathSkUnitsFilter:null,sampleTime:500},latPath:{description:"Latitude",path:"self.navigation.position.latitude",source:"default",pathType:"number",isPathConfigurable:!0,convertUnitTo:"latitudeMin",showPathSkUnitsFilter:!0,pathSkUnitsFilter:null,sampleTime:500}},color:"grey",enableTimeout:!1,dataTimeout:5}}}},{w:5,h:2,id:"1a7a3f79-2eb4-4092-a0c3-9a61db8a8586",selector:"widget-simple-linear",input:{widgetProperties:{type:"widget-simple-linear",uuid:"1a7a3f79-2eb4-4092-a0c3-9a61db8a8586",config:{displayName:"House Bank",filterSelfPaths:!0,paths:{gaugePath:{description:"Numeric Data",path:"self.electrical.batteries.1.voltage",source:"default",pathType:"number",isPathConfigurable:!0,showPathSkUnitsFilter:!0,pathSkUnitsFilter:"V",convertUnitTo:"V",sampleTime:500}},displayScale:{lower:0,upper:15,type:"linear"},gauge:{type:"simpleLinear",unitLabelFormat:"full"},numInt:1,numDecimal:2,ignoreZones:!1,color:"green",enableTimeout:!1,dataTimeout:5}}},x:3,y:10}]},{id:"7c67c8c5-dc55-4e1d-9fc5-3dd95fd41bea",name:"Charting",icon:"dashboard-map",configuration:[{x:0,y:0,w:8,h:12,id:"488d620a-37d4-4b98-849d-304cd18003e9",selector:"widget-freeboardsk",input:{widgetProperties:{type:"widget-freeboardsk",uuid:"488d620a-37d4-4b98-849d-304cd18003e9"}}},{x:8,y:0,w:2,h:3,id:"26a2a150-5af8-4f1d-aaab-0cb2a406fc17",selector:"widget-gauge-ng-compass",input:{widgetProperties:{type:"widget-gauge-ng-compass",uuid:"26a2a150-5af8-4f1d-aaab-0cb2a406fc17",config:{displayName:"COG (T)",filterSelfPaths:!0,paths:{gaugePath:{description:"Numeric Data",path:"self.navigation.courseOverGroundTrue",source:"default",pathType:"number",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",showConvertUnitTo:!1,convertUnitTo:"deg",sampleTime:500}},gauge:{type:"ngRadial",subType:"marineCompass",enableTicks:!0,compassUseNumbers:!0,showValueBox:!1},enableTimeout:!1,color:"purple",dataTimeout:5}}}},{x:10,y:0,w:2,h:3,id:"caf9ca47-fcf6-4736-a314-2b5210edaf03",selector:"widget-datetime",input:{widgetProperties:{type:"widget-datetime",uuid:"caf9ca47-fcf6-4736-a314-2b5210edaf03",config:{displayName:"Next WP Arrival",filterSelfPaths:!0,paths:{gaugePath:{description:"String Data",path:"self.navigation.datetime",source:"default",pathType:"Date",isPathConfigurable:!0,sampleTime:500}},dateFormat:"dd/MM HH:mm",dateTimezone:"America/Toronto",color:"contrast",enableTimeout:!1,dataTimeout:5}}}},{x:8,y:3,w:4,h:9,id:"daa21350-009e-4d99-8209-364f9b99caee",selector:"widget-autopilot",input:{widgetProperties:{type:"widget-autopilot",uuid:"daa21350-009e-4d99-8209-364f9b99caee",config:{filterSelfPaths:!0,paths:{autopilotState:{description:"Autopilot State",path:"self.steering.autopilot.state",source:"default",pathType:"string",isPathConfigurable:!1,showPathSkUnitsFilter:!1,convertUnitTo:"",sampleTime:500},autopilotTargetHeading:{description:"Autopilot Target Magnetic Heading",path:"self.steering.autopilot.target.headingMagnetic",source:"default",pathType:"number",convertUnitTo:"deg",isPathConfigurable:!1,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",sampleTime:500},autopilotTargetWindHeading:{description:"Autopilot Target Apparent Wind Angle",path:"self.steering.autopilot.target.windAngleApparent",source:"default",pathType:"number",convertUnitTo:"deg",isPathConfigurable:!1,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",sampleTime:500},rudderAngle:{description:"Rudder Angle",path:"self.steering.rudderAngle",source:"default",pathType:"number",convertUnitTo:"deg",isPathConfigurable:!1,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",sampleTime:500},courseXte:{description:"Cross Track Error",path:"self.navigation.course.calcValues.crossTrackError",source:"default",pathType:"number",isPathConfigurable:!1,convertUnitTo:"m",showPathSkUnitsFilter:!0,pathRequired:!1,pathSkUnitsFilter:"m",sampleTime:500},headingMag:{description:"Magnetic Heading",path:"self.navigation.headingMagnetic",source:"default",pathType:"number",convertUnitTo:"deg",isPathConfigurable:!0,pathRequired:!1,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",showConvertUnitTo:!1,sampleTime:500},headingTrue:{description:"True Heading",path:"self.navigation.headingTrue",source:"default",pathType:"number",convertUnitTo:"deg",isPathConfigurable:!0,pathRequired:!1,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",showConvertUnitTo:!1,sampleTime:500},windAngleApparent:{description:"Apparent Wind Angle",path:"self.environment.wind.angleApparent",source:"default",pathType:"number",convertUnitTo:"deg",isPathConfigurable:!0,pathRequired:!1,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",showConvertUnitTo:!1,sampleTime:500},windAngleTrueWater:{description:"Wind Angle True Water",path:"self.environment.wind.angleTrueWater",source:"default",pathType:"number",convertUnitTo:"deg",isPathConfigurable:!0,pathRequired:!1,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",showConvertUnitTo:!1,sampleTime:500}},invertRudder:!0,headingDirectionTrue:!1,courseDirectionTrue:!1,enableTimeout:!1,dataTimeout:5,autopilotInstance:"_default"}}}}]}],Mr={themeName:""};var Ng={configVersion:11,kipUUID:Re.create(),signalKUrl:"https://demo.signalk.org",proxyEnabled:!1,signalKSubscribeAll:!1,useDeviceToken:!1,loginName:null,loginPassword:null,useSharedConfig:!1,sharedConfigName:"default"};var Nl="",Ll=11,Vt=11,Kg=(()=>{class t{storage=d(ln);unitDefaults=new y({});themeName=new y(Nl);kipKNotificationConfig=new y(Pt);autoNightMode=new y(!1);redNightMode=new y(!1);nightModeBrightness=new y(1);proxyEnabled=!1;signalKSubscribeAll=!1;useDeviceToken=!1;loginName;loginPassword;useSharedConfig;sharedConfigName;activeConfig={app:null,theme:null,dashboards:null};kipUUID;signalkUrl;widgets;_dashboards=[];dataSets=[];configUpgrade=re(!1);constructor(){if(console.log("[AppSettings Service] Service startup..."),this.storage.activeConfigFileVersion=Ll,!window.localStorage)console.error(`[AppSettings Service] LocalStorage NOT SUPPORTED by browser
|
|
2
|
+
This is a requirement to run Kip. See browser documentation to enable this feature.`);else{this.loadConnectionConfig();let e;if(this.storage.initConfig===null&&this.useSharedConfig&&this.loginName!==null&&this.loginPassword!==null&&this.signalkUrl.url!==null?this.resetSettings():e=this.storage.initConfig,e)console.log("[AppSettings Service] Remote configuration storage enabled"),this.checkConfigUpgradeRequired(!1),this.activeConfig=e,this.pushSettings();else{console.log("[AppSettings Service] LocalStorage enabled");let i={app:null,theme:null,dashboards:null};i.app=this.loadConfigFromLocalStorage("appConfig"),i.app.configVersion!==Vt&&this.checkConfigUpgradeRequired(!0),i.dashboards=this.loadConfigFromLocalStorage("dashboardsConfig"),i.theme=this.loadConfigFromLocalStorage("themeConfig"),this.activeConfig=i,this.pushSettings()}}}loadConnectionConfig(){let e=this.loadConfigFromLocalStorage("connectionConfig");switch(e.configVersion){case 11:break;default:console.error(`[AppSettings Service] Invalid connectionConfig version ${e.configVersion}. Resetting and loading connection configuration default`),this.resetConnection();break}this.signalkUrl={url:e.signalKUrl,new:!1},this.proxyEnabled=e.proxyEnabled,this.signalKSubscribeAll=e.signalKSubscribeAll,this.useDeviceToken=e.useDeviceToken,this.loginName=e.loginName,this.loginPassword=e.loginPassword,this.useSharedConfig=e.useSharedConfig,this.sharedConfigName=e.sharedConfigName,this.kipUUID=e.kipUUID}resetConnection(){localStorage.setItem("connectionConfig",JSON.stringify(this.getDefaultConnectionConfig())),this.reloadApp()}checkConfigUpgradeRequired(e){e?this.configUpgrade.set(!0):this.storage.listConfigs(9).then(i=>X(this,null,function*(){for(let o of i)try{if((yield this.storage.getConfig(o.scope,o.name,9)).app?.configVersion===10){this.configUpgrade.set(!0),console.log("[AppSettings Service] Configuration upgrade required for version 10.");break}}catch(n){console.error(`[AppSettings Service] Error fetching configuration for ${o.name}:`,n)}})).catch(i=>{console.error("[AppSettings Service] Error fetching configuration data:",i)})}loadConfigFromLocalStorage(e){let i=JSON.parse(localStorage.getItem(e));if(i===null)switch(console.log(`[AppSettings Service] Error loading ${e} config. Force loading ${e} defaults`),e){case"appConfig":i=this.getDefaultAppConfig();break;case"connectionConfig":i=this.getDefaultConnectionConfig();break;case"dashboardsConfig":i=this.getDefaultDashboardsConfig();break;case"themeConfig":i=this.getDefaultThemeConfig();break;default:console.error(`[AppSettings Service] Invalid ${e} default config requested`);break}if(e==="connectionConfig"&&i.configVersion!==Vt)switch(console.log(`[AppSettings Service] Invalid ${e} version. Force loading defaults`),e){case"connectionConfig":i=this.getDefaultConnectionConfig();break}return i}pushSettings(){this.themeName.next(this.activeConfig.theme.themeName),this.dataSets=this.activeConfig.app.dataSets,this.unitDefaults.next(this.activeConfig.app.unitDefaults),this.kipKNotificationConfig.next(this.activeConfig.app.notificationConfig),this.activeConfig.app.autoNightMode===void 0?this.setAutoNightMode(!1):this.autoNightMode.next(this.activeConfig.app.autoNightMode),this.activeConfig.app.redNightMode===void 0?this.setRedNightMode(!1):this.redNightMode.next(this.activeConfig.app.redNightMode),this.activeConfig.app.nightModeBrightness===void 0?this.setNightModeBrightness(.2):this.nightModeBrightness.next(this.activeConfig.app.nightModeBrightness),this.activeConfig.dashboards===void 0?this._dashboards=[]:this._dashboards=this.activeConfig.dashboards}getDefaultUnitsAsO(){return this.unitDefaults.asObservable()}getDefaultUnits(){return this.unitDefaults.getValue()}setDefaultUnits(e){this.unitDefaults.next(e),this.useSharedConfig?this.storage.patchConfig("Array<IUnitDefaults>",e):this.saveAppConfigToLocalStorage()}getAppConfig(){return this.buildAppStorageObject()}getConnectionConfig(){return this.buildConnectionStorageObject()}setConnectionConfig(e){this.loginName=e.loginName,this.loginPassword=e.loginPassword,this.useSharedConfig=e.useSharedConfig,this.proxyEnabled=e.proxyEnabled,this.signalKSubscribeAll=e.signalKSubscribeAll,this.signalkUrl.url=e.signalKUrl,e.useSharedConfig?this.useDeviceToken=!1:this.useDeviceToken=!0,this.saveConnectionConfigToLocalStorage()}setUseDeviceToken(e){this.useDeviceToken=e,this.saveConnectionConfigToLocalStorage()}getDashboardConfig(){return this.buildDashboardStorageObject()}getThemeConfig(){return this.buildThemeStorageObject()}get KipUUID(){return this.kipUUID}getThemeNameAsO(){return this.themeName.asObservable()}setThemeName(e){if(this.themeName.next(e),this.useSharedConfig){let i={themeName:e};this.storage.patchConfig("IThemeConfig",i)}else this.saveThemeConfigToLocalStorage()}getThemeName(){return this.themeName.getValue()}getAutoNightModeAsO(){return this.autoNightMode.asObservable()}setAutoNightMode(e){this.autoNightMode.next(e);let i=this.buildAppStorageObject();this.useSharedConfig?this.storage.patchConfig("IAppConfig",i):this.saveAppConfigToLocalStorage()}getAutoNightMode(){return this.autoNightMode.getValue()}getRedNightModeAsO(){return this.redNightMode.asObservable()}getRedNightMode(){return this.redNightMode.getValue()}setRedNightMode(e){this.redNightMode.next(e);let i=this.buildAppStorageObject();this.useSharedConfig?this.storage.patchConfig("IAppConfig",i):this.saveAppConfigToLocalStorage()}getNightModeBrightness(){return this.nightModeBrightness.getValue()}setNightModeBrightness(e){this.nightModeBrightness.next(e);let i=this.buildAppStorageObject();this.useSharedConfig?this.storage.patchConfig("IAppConfig",i):this.saveAppConfigToLocalStorage()}getWidgets(){return this.widgets}saveDashboards(e){this.useSharedConfig?this.storage.storageServiceReady$.getValue()&&this.storage.patchConfig("Dashboards",e):this.saveLDashboardsConfigToLocalStorage(e),this._dashboards=e}saveDataSets(e){this.dataSets=e,this.useSharedConfig?this.storage.patchConfig("Array<IDatasetDef>",e):this.saveAppConfigToLocalStorage()}getDataSets(){return this.dataSets}getNotificationServiceConfigAsO(){return this.kipKNotificationConfig.asObservable()}getNotificationConfig(){return this.kipKNotificationConfig.getValue()}setNotificationConfig(e){this.kipKNotificationConfig.next(e),this.useSharedConfig?this.storage.patchConfig("INotificationConfig",e):this.saveAppConfigToLocalStorage()}resetSettings(){let e={app:null,theme:null,dashboards:null};e.app=this.getDefaultAppConfig(),e.theme=this.getDefaultThemeConfig(),e.dashboards=this.getDefaultDashboardsConfig(),this.useSharedConfig?this.storage.storageServiceReady$.getValue()&&this.storage.setConfig("user",this.sharedConfigName,e).then(()=>{console.log("[AppSettings Service] Replaced server config name: "+this.sharedConfigName+", with default configuration values"),this.reloadApp()}).catch(i=>{console.error("[AppSettings Service] Error replacing server config name: "+this.sharedConfigName+", with default configuration values",i)}):this.reloadApp()}replaceConfig(e,i,o){let n=JSON.stringify(i);localStorage.setItem(e,n),o&&this.reloadApp()}loadDemoConfig(){if(this.useSharedConfig){let e={app:Tr,dashboards:Ar,theme:Mr};console.log("[AppSettings Service] Loading Demo configuration settings as remote config: "+this.useSharedConfig+" and reloading app."),this.storage.setConfig("user",this.sharedConfigName,e),this.reloadApp()}else console.log("[AppSettings Service] Loading Demo configuration settings to LocalStorage"),this.replaceConfig("appConfig",Tr),this.replaceConfig("dashboardsConfig",Ar),this.replaceConfig("themeConfig",Mr,!0)}reloadApp(){console.log("[AppSettings Service] Reload app"),!window.__KIP_TEST__&&location.replace("./")}buildAppStorageObject(){return{configVersion:Vt,autoNightMode:this.autoNightMode.getValue(),redNightMode:this.redNightMode.getValue(),nightModeBrightness:this.nightModeBrightness.getValue(),dataSets:this.dataSets,unitDefaults:this.unitDefaults.getValue(),notificationConfig:this.kipKNotificationConfig.getValue()}}buildConnectionStorageObject(){return{configVersion:Vt,kipUUID:this.kipUUID,signalKUrl:this.signalkUrl.url,proxyEnabled:this.proxyEnabled,signalKSubscribeAll:this.signalKSubscribeAll,useDeviceToken:this.useDeviceToken,loginName:this.loginName,loginPassword:this.loginPassword,useSharedConfig:this.useSharedConfig,sharedConfigName:this.sharedConfigName}}buildDashboardStorageObject(){return this._dashboards}buildThemeStorageObject(){return{themeName:this.themeName.getValue()}}saveAppConfigToLocalStorage(){console.log("[AppSettings Service] Saving Application config to LocalStorage"),localStorage.setItem("appConfig",JSON.stringify(this.buildAppStorageObject()))}saveConnectionConfigToLocalStorage(){console.log("[AppSettings Service] Saving Connection config to LocalStorage"),localStorage.setItem("connectionConfig",JSON.stringify(this.buildConnectionStorageObject()))}saveLDashboardsConfigToLocalStorage(e){console.log("[AppSettings Service] Saving Dashboard config to LocalStorage"),localStorage.setItem("dashboardsConfig",JSON.stringify(e))}saveThemeConfigToLocalStorage(){console.log("[AppSettings Service] Saving Theme config to LocalStorage"),localStorage.setItem("themeConfig",JSON.stringify(this.buildThemeStorageObject()))}getDefaultAppConfig(){let e=dn;return e.notificationConfig=Pt,e.unitDefaults=gi,e.configVersion=Vt,localStorage.setItem("appConfig",JSON.stringify(e)),e}getDefaultConnectionConfig(){let e=fn;return e.kipUUID=Re.create(),e.signalKUrl=window.location.origin,localStorage.setItem("connectionConfig",JSON.stringify(e)),e}getDefaultDashboardsConfig(){let e=[];return localStorage.setItem("dashboardsConfig",JSON.stringify(e)),e}getDefaultThemeConfig(){let e=cn;return localStorage.setItem("themeConfig",JSON.stringify(e)),e}static \u0275fac=function(i){return new(i||t)};static \u0275prov=x({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Ul={url:"",deserializer:t=>JSON.parse(t.data),serializer:t=>JSON.stringify(t)},jl="WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }",_i=class t extends co{constructor(r,e){if(super(),this._socket=null,r instanceof Tt)this.destination=e,this.source=r;else{let i=this._config=Object.assign({},Ul);if(this._output=new h,typeof r=="string")i.url=r;else for(let o in r)r.hasOwnProperty(o)&&(i[o]=r[o]);if(!i.WebSocketCtor&&WebSocket)i.WebSocketCtor=WebSocket;else if(!i.WebSocketCtor)throw new Error("no WebSocket constructor can be found");this.destination=new qe}}lift(r){let e=new t(this._config,this.destination);return e.operator=r,e.source=this,e}_resetState(){this._socket=null,this.source||(this.destination=new qe),this._output=new h}multiplex(r,e,i){let o=this;return new Tt(n=>{try{o.next(r())}catch(s){n.error(s)}let a=o.subscribe({next:s=>{try{i(s)&&n.next(s)}catch(l){n.error(l)}},error:s=>n.error(s),complete:()=>n.complete()});return()=>{try{o.next(e())}catch(s){n.error(s)}a.unsubscribe()}})}_connectSocket(){let{WebSocketCtor:r,protocol:e,url:i,binaryType:o}=this._config,n=this._output,a=null;try{a=e?new r(i,e):new r(i),this._socket=a,o&&(this._socket.binaryType=o)}catch(l){n.error(l);return}let s=new ti(()=>{this._socket=null,a&&a.readyState===1&&a.close()});a.onopen=l=>{let{_socket:c}=this;if(!c){a.close(),this._resetState();return}let{openObserver:_}=this._config;_&&_.next(l);let m=this.destination;this.destination=lo.create(u=>{if(a.readyState===1)try{let{serializer:b}=this._config;a.send(b(u))}catch(b){this.destination.error(b)}},u=>{let{closingObserver:b}=this._config;b&&b.next(void 0),u&&u.code?a.close(u.code,u.reason):n.error(new TypeError(jl)),this._resetState()},()=>{let{closingObserver:u}=this._config;u&&u.next(void 0),a.close(),this._resetState()}),m&&m instanceof qe&&s.add(m.subscribe(this.destination))},a.onerror=l=>{this._resetState(),n.error(l)},a.onclose=l=>{a===this._socket&&this._resetState();let{closeObserver:c}=this._config;c&&c.next(l),l.wasClean?n.complete():n.error(l)},a.onmessage=l=>{try{let{deserializer:c}=this._config;n.next(c(l))}catch(c){n.error(c)}}}_subscribe(r){let{source:e}=this;return e?e.subscribe(r):(this._socket||this._connectSocket(),this._output.subscribe(r),r.add(()=>{let{_socket:i}=this;this._output.observers.length===0&&(i&&(i.readyState===1||i.readyState===0)&&i.close(),this._resetState())}),r)}unsubscribe(){let{_socket:r}=this;r&&(r.readyState===1||r.readyState===0)&&r.close(),this._resetState(),super.unsubscribe()}};function kr(t){return new _i(t)}var un=(()=>{class t{_destroyRef=d(At);_skRequests$=new h;_skNotificationsMsg$=new h;_skValue$=new h;_skMetadata$=new h;_vesselSelfUrn$=new h;_selfUrn=void 0;streamEndpoint={operation:0,message:"Not connected",hasToken:!1};streamEndpoint$=new y(this.streamEndpoint);endpointWS=null;SubscriptionType="self";WS_CONNECTION_SUBSCRIBE="?subscribe=";WS_CONNECTION_META="&sendMeta=all";socketWS$;socketWSCloseEvent$=new h;socketWSOpenEvent$=new h;authToken=null;server=d(rt);auth=d(pi);connectionStateMachine=d(hi);zones=d(j);FLATTEN_CONFIG={maxDepth:3,maxObjectSize:20,enableFlattening:!0};constructor(){this.connectionStateMachine.setWebSocketRetryCallback(()=>{console.log("[Delta Service] Executing WebSocket retry via callback"),this.retryWebSocketConnection()}),this.server.serverServiceEndpoint$.pipe(k(this._destroyRef)).subscribe(e=>{e.operation===2&&(this.endpointWS=e.WsServiceUrl,e.subscribeAll?this.SubscriptionType="all":this.SubscriptionType="self")}),this.connectionStateMachine.state$.pipe(k(this._destroyRef)).subscribe(e=>{switch(e){case f.WebSocketConnecting:this.handleWebSocketConnecting();break;case f.Connected:break;case f.Disconnected:case f.WebSocketError:case f.PermanentFailure:this.handleDisconnection();break}}),this.auth.authToken$.pipe(k(this._destroyRef)).subscribe(e=>{this.authToken!=e&&(this.authToken=e,this.socketWS$&&this.connectionStateMachine.isFullyConnected()&&(this.closeWS("Token changed"),this.connectionStateMachine.startWebSocketConnection()))}),this.socketWSOpenEvent$.pipe(k(this._destroyRef)).subscribe(()=>{this.streamEndpoint.message="Connected",this.streamEndpoint.operation=2,this.authToken?console.log("[Delta Service] WebSocket connected with Authorization Token"):console.log("[Delta Service] WebSocket connected without Authorization Token"),this.streamEndpoint$.next(this.streamEndpoint),this.connectionStateMachine.onWebSocketConnected()}),this.socketWSCloseEvent$.pipe(k(this._destroyRef)).subscribe(e=>{e.wasClean?(console.log("[Delta Service] WebSocket closed cleanly"),this.streamEndpoint.message="WebSocket closed",this.streamEndpoint.operation=0):(console.log("[Delta Service] WebSocket terminated due to socket error"),this.streamEndpoint.message="WebSocket error",this.streamEndpoint.operation=3,this.connectionStateMachine.onWebSocketError("WebSocket connection lost")),this.streamEndpoint$.next(this.streamEndpoint)}),go(document,"visibilitychange").pipe(k(this._destroyRef)).subscribe(()=>{document.visibilityState==="visible"?(console.log("[Delta Service] App resumed, checking WebSocket connection..."),this.checkAndReconnect("App resumed")):document.visibilityState==="hidden"&&console.log("[Delta Service] App suspended")})}connectWS(e){this.streamEndpoint.message="Connecting",this.streamEndpoint.operation=1,console.log(`[Delta Service] ${e}: WebSocket opening...`),this.streamEndpoint$.next(this.streamEndpoint),this.socketWS$=this.getNewWebSocket(),this.zones.runOutsideAngular(()=>{this.socketWS$.pipe(k(this._destroyRef)).subscribe({next:i=>this.processWebsocketMessage(i),error:i=>{console.error("[Delta Service] WebSocket error:",i)}})})}retryWebSocketConnection(){if(console.log("[Delta Service] Retrying WebSocket connection"),!this.endpointWS){console.warn("[Delta Service] No WebSocket endpoint available for retry"),this.connectionStateMachine.onWebSocketError("No WebSocket endpoint available");return}this.socketWS$&&this.closeWS("Retrying connection"),this.connectWS("WebSocket retry attempt")}handleWebSocketConnecting(){if(!this.endpointWS){console.warn("[Delta Service] No WebSocket endpoint available"),this.connectionStateMachine.onWebSocketError("No WebSocket endpoint available");return}this.socketWS$&&this.closeWS("Starting new connection"),this.connectWS("ConnectionStateMachine request")}handleDisconnection(){this.socketWS$&&this.closeWS("ConnectionStateMachine disconnection"),this.streamEndpoint.message="Not connected",this.streamEndpoint.operation=0,this.streamEndpoint$.next(this.streamEndpoint)}getNewWebSocket(){let e=this.WS_CONNECTION_SUBSCRIBE+this.SubscriptionType+this.WS_CONNECTION_META;return this.authToken!=null?(e+="&token="+this.authToken.token,this.streamEndpoint.hasToken=!0):this.streamEndpoint.hasToken=!1,kr({url:this.endpointWS+e,closeObserver:this.socketWSCloseEvent$,openObserver:this.socketWSOpenEvent$})}closeWS(e){this.socketWS$&&(this.streamEndpoint.operation=4,console.log("[Delta Service] "+e+": WebSocket closing..."),this.socketWS$.complete())}publishDelta(e){this.socketWS$?(console.log("[Delta Service] WebSocket sending message"),this.socketWS$.next(e)):console.log("[Delta Service] No WebSocket present to send message - dropping message")}processWebsocketMessage(e){if(e.updates){this.parseUpdates(e.updates,e.context);return}if(e.requestId){this._skRequests$.next(e);return}if(e.errorMessage){console.warn("[Delta Service] Service received stream error message: "+e.errorMessage);return}if(e.self){this._selfUrn=e.self,this._vesselSelfUrn$.next(e.self),this.server.setServerInfo(e.name,e.version,e.roles);return}console.warn("[Delta Service] Unknown message type. Message content:"+e)}parseUpdates(e,i){e.forEach(o=>{o.meta!==void 0&&o.meta.forEach(n=>this.parseSkMeta(n,i)),o.values!==void 0&&o.values.forEach(n=>{if(n.path.startsWith("notifications."))this._skNotificationsMsg$.next(n);else if(typeof n.value=="object"&&n.value!==null)this.FLATTEN_CONFIG.enableFlattening&&this.canFlattenCompletely(n.value,this.FLATTEN_CONFIG.maxDepth,this.FLATTEN_CONFIG.maxObjectSize)?this.flattenObjectValue(n.value,n.path).forEach(s=>{let l={context:i,path:s.path,source:o.$source,timestamp:o.timestamp,value:s.value};this._skValue$.next(l)}):Object.keys(n.value).forEach(a=>{let s={context:i,path:`${n.path}.${a}`,source:o.$source,timestamp:o.timestamp,value:n.value[a]};this._skValue$.next(s)});else{let a={context:i,path:n.path,source:o.$source,timestamp:o.timestamp,value:n.value};this._skValue$.next(a)}})})}canFlattenCompletely(e,i,o,n=0){if(n>=i)return!1;if(typeof e!="object"||e===null)return!0;let a=Object.keys(e);if(a.length>o)return!1;for(let s of a)if(!this.canFlattenCompletely(e[s],i,o,n+1))return!1;return!0}flattenObjectValue(e,i,o=0){let n=[];if(typeof e!="object"||e===null||o>=this.FLATTEN_CONFIG.maxDepth)return[{path:i,value:e}];let a=Object.keys(e);for(let s of a){let l=i?`${i}.${s}`:s,c=this.flattenObjectValue(e[s],l,o+1);n.push(...c)}return n}parseSkMeta(e,i){e.value.properties!==void 0?Object.keys(e.value.properties).forEach(o=>{this._skMetadata$.next({context:i,path:`${e.path}.${o}`,meta:e.value.properties[o]})}):this._skMetadata$.next({context:i,path:e.path,meta:e.value})}getDataStreamStatusAsO(){return this.streamEndpoint$.asObservable()}subscribeRequestUpdates(){return this._skRequests$.asObservable()}subscribeNotificationsUpdates(){return this._skNotificationsMsg$.asObservable()}subscribeDataPathsUpdates(){return this._skValue$.asObservable()}subscribeMetadataUpdates(){return this._skMetadata$.asObservable()}subscribeSelfUpdates(){return this._vesselSelfUrn$.asObservable()}checkAndReconnect(e){this.connectionStateMachine.isFullyConnected()?console.log(`[Delta Service] ${e}: Connection is active.`):this.connectionStateMachine.isHTTPConnected()&&this.connectionStateMachine.currentState!==f.WebSocketRetrying?(console.log(`[Delta Service] ${e}: WebSocket disconnected, requesting reconnection...`),this.connectionStateMachine.startWebSocketConnection()):console.log(`[Delta Service] ${e}: HTTP not connected, cannot start WebSocket`)}ngOnDestroy(){this.closeWS("App terminated"),this._skRequests$.complete(),this._skNotificationsMsg$.complete(),this._skValue$.complete(),this._skMetadata$.complete(),this._vesselSelfUrn$.complete(),this.streamEndpoint$.complete(),this.socketWSOpenEvent$.complete(),this.socketWSCloseEvent$.complete(),this.socketWS$?.complete()}static \u0275fac=function(i){return new(i||t)};static \u0275prov=x({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var ot=(function(t){return t.Normal="normal",t.Nominal="nominal",t.Alert="alert",t.Warn="warn",t.Alarm="alarm",t.Emergency="emergency",t})(ot||{});var $l=(function(t){return t.Visual="visual",t.Sound="sound",t})($l||{});var Bl=typeof global=="object"&&global&&global.Object===Object&&global,vi=Bl;var Wl=typeof self=="object"&&self&&self.Object===Object&&self,Hl=vi||Wl||Function("return this")(),M=Hl;var zl=M.Symbol,ae=zl;var mn=Object.prototype,Gl=mn.hasOwnProperty,ql=mn.toString,Nt=ae?ae.toStringTag:void 0;function Kl(t){var r=Gl.call(t,Nt),e=t[Nt];try{t[Nt]=void 0;var i=!0}catch{}var o=ql.call(t);return i&&(r?t[Nt]=e:delete t[Nt]),o}var hn=Kl;var Ql=Object.prototype,Zl=Ql.toString;function Jl(t){return Zl.call(t)}var pn=Jl;var Yl="[object Null]",Xl="[object Undefined]",gn=ae?ae.toStringTag:void 0;function ed(t){return t==null?t===void 0?Xl:Yl:gn&&gn in Object(t)?hn(t):pn(t)}var fe=ed;function td(t){return t!=null&&typeof t=="object"}var R=td;var id=Array.isArray,se=id;function rd(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}var L=rd;function od(t){return t}var bi=od;var nd="[object AsyncFunction]",ad="[object Function]",sd="[object GeneratorFunction]",ld="[object Proxy]";function dd(t){if(!L(t))return!1;var r=fe(t);return r==ad||r==sd||r==nd||r==ld}var nt=dd;var cd=M["__core-js_shared__"],yi=cd;var _n=(function(){var t=/[^.]+$/.exec(yi&&yi.keys&&yi.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function fd(t){return!!_n&&_n in t}var vn=fd;var ud=Function.prototype,md=ud.toString;function hd(t){if(t!=null){try{return md.call(t)}catch{}try{return t+""}catch{}}return""}var De=hd;var pd=/[\\^$.*+?()[\]{}|]/g,gd=/^\[object .+?Constructor\]$/,_d=Function.prototype,vd=Object.prototype,bd=_d.toString,yd=vd.hasOwnProperty,xd=RegExp("^"+bd.call(yd).replace(pd,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Cd(t){if(!L(t)||vn(t))return!1;var r=nt(t)?xd:gd;return r.test(De(t))}var bn=Cd;function Sd(t,r){return t?.[r]}var yn=Sd;function Dd(t,r){var e=yn(t,r);return bn(e)?e:void 0}var J=Dd;var wd=J(M,"WeakMap"),xi=wd;var xn=Object.create,Td=(function(){function t(){}return function(r){if(!L(r))return{};if(xn)return xn(r);t.prototype=r;var e=new t;return t.prototype=void 0,e}})(),Cn=Td;function Ad(t,r,e){switch(e.length){case 0:return t.call(r);case 1:return t.call(r,e[0]);case 2:return t.call(r,e[0],e[1]);case 3:return t.call(r,e[0],e[1],e[2])}return t.apply(r,e)}var Sn=Ad;function Md(t,r){var e=-1,i=t.length;for(r||(r=Array(i));++e<i;)r[e]=t[e];return r}var Ci=Md;var kd=800,Ed=16,Fd=Date.now;function Od(t){var r=0,e=0;return function(){var i=Fd(),o=Ed-(i-e);if(e=i,o>0){if(++r>=kd)return arguments[0]}else r=0;return t.apply(void 0,arguments)}}var Dn=Od;function Id(t){return function(){return t}}var wn=Id;var Rd=(function(){try{var t=J(Object,"defineProperty");return t({},"",{}),t}catch{}})(),at=Rd;var Pd=at?function(t,r){return at(t,"toString",{configurable:!0,enumerable:!1,value:wn(r),writable:!0})}:bi,Tn=Pd;var Vd=Dn(Tn),An=Vd;function Nd(t,r){for(var e=-1,i=t==null?0:t.length;++e<i&&r(t[e],e,t)!==!1;);return t}var Mn=Nd;var Ld=9007199254740991,Ud=/^(?:0|[1-9]\d*)$/;function jd(t,r){var e=typeof t;return r=r??Ld,!!r&&(e=="number"||e!="symbol"&&Ud.test(t))&&t>-1&&t%1==0&&t<r}var Si=jd;function $d(t,r,e){r=="__proto__"&&at?at(t,r,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[r]=e}var st=$d;function Bd(t,r){return t===r||t!==t&&r!==r}var ve=Bd;var Wd=Object.prototype,Hd=Wd.hasOwnProperty;function zd(t,r,e){var i=t[r];(!(Hd.call(t,r)&&ve(i,e))||e===void 0&&!(r in t))&&st(t,r,e)}var Di=zd;function Gd(t,r,e,i){var o=!e;e||(e={});for(var n=-1,a=r.length;++n<a;){var s=r[n],l=i?i(e[s],t[s],s,e,t):void 0;l===void 0&&(l=t[s]),o?st(e,s,l):Di(e,s,l)}return e}var be=Gd;var kn=Math.max;function qd(t,r,e){return r=kn(r===void 0?t.length-1:r,0),function(){for(var i=arguments,o=-1,n=kn(i.length-r,0),a=Array(n);++o<n;)a[o]=i[r+o];o=-1;for(var s=Array(r+1);++o<r;)s[o]=i[o];return s[r]=e(a),Sn(t,this,s)}}var En=qd;function Kd(t,r){return An(En(t,r,bi),t+"")}var Fn=Kd;var Qd=9007199254740991;function Zd(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Qd}var wi=Zd;function Jd(t){return t!=null&&wi(t.length)&&!nt(t)}var Pe=Jd;function Yd(t,r,e){if(!L(e))return!1;var i=typeof r;return(i=="number"?Pe(e)&&Si(r,e.length):i=="string"&&r in e)?ve(e[r],t):!1}var On=Yd;function Xd(t){return Fn(function(r,e){var i=-1,o=e.length,n=o>1?e[o-1]:void 0,a=o>2?e[2]:void 0;for(n=t.length>3&&typeof n=="function"?(o--,n):void 0,a&&On(e[0],e[1],a)&&(n=o<3?void 0:n,o=1),r=Object(r);++i<o;){var s=e[i];s&&t(r,s,i,n)}return r})}var In=Xd;var ec=Object.prototype;function tc(t){var r=t&&t.constructor,e=typeof r=="function"&&r.prototype||ec;return t===e}var lt=tc;function ic(t,r){for(var e=-1,i=Array(t);++e<t;)i[e]=r(e);return i}var Rn=ic;var rc="[object Arguments]";function oc(t){return R(t)&&fe(t)==rc}var Er=oc;var Pn=Object.prototype,nc=Pn.hasOwnProperty,ac=Pn.propertyIsEnumerable,sc=Er((function(){return arguments})())?Er:function(t){return R(t)&&nc.call(t,"callee")&&!ac.call(t,"callee")},Lt=sc;function lc(){return!1}var Vn=lc;var Un=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Nn=Un&&typeof module=="object"&&module&&!module.nodeType&&module,dc=Nn&&Nn.exports===Un,Ln=dc?M.Buffer:void 0,cc=Ln?Ln.isBuffer:void 0,fc=cc||Vn,we=fc;var uc="[object Arguments]",mc="[object Array]",hc="[object Boolean]",pc="[object Date]",gc="[object Error]",_c="[object Function]",vc="[object Map]",bc="[object Number]",yc="[object Object]",xc="[object RegExp]",Cc="[object Set]",Sc="[object String]",Dc="[object WeakMap]",wc="[object ArrayBuffer]",Tc="[object DataView]",Ac="[object Float32Array]",Mc="[object Float64Array]",kc="[object Int8Array]",Ec="[object Int16Array]",Fc="[object Int32Array]",Oc="[object Uint8Array]",Ic="[object Uint8ClampedArray]",Rc="[object Uint16Array]",Pc="[object Uint32Array]",D={};D[Ac]=D[Mc]=D[kc]=D[Ec]=D[Fc]=D[Oc]=D[Ic]=D[Rc]=D[Pc]=!0;D[uc]=D[mc]=D[wc]=D[hc]=D[Tc]=D[pc]=D[gc]=D[_c]=D[vc]=D[bc]=D[yc]=D[xc]=D[Cc]=D[Sc]=D[Dc]=!1;function Vc(t){return R(t)&&wi(t.length)&&!!D[fe(t)]}var jn=Vc;function Nc(t){return function(r){return t(r)}}var dt=Nc;var $n=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ut=$n&&typeof module=="object"&&module&&!module.nodeType&&module,Lc=Ut&&Ut.exports===$n,Fr=Lc&&vi.process,Uc=(function(){try{var t=Ut&&Ut.require&&Ut.require("util").types;return t||Fr&&Fr.binding&&Fr.binding("util")}catch{}})(),Te=Uc;var Bn=Te&&Te.isTypedArray,jc=Bn?dt(Bn):jn,ct=jc;var $c=Object.prototype,Bc=$c.hasOwnProperty;function Wc(t,r){var e=se(t),i=!e&&Lt(t),o=!e&&!i&&we(t),n=!e&&!i&&!o&&ct(t),a=e||i||o||n,s=a?Rn(t.length,String):[],l=s.length;for(var c in t)(r||Bc.call(t,c))&&!(a&&(c=="length"||o&&(c=="offset"||c=="parent")||n&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Si(c,l)))&&s.push(c);return s}var Ti=Wc;function Hc(t,r){return function(e){return t(r(e))}}var Ai=Hc;var zc=Ai(Object.keys,Object),Wn=zc;var Gc=Object.prototype,qc=Gc.hasOwnProperty;function Kc(t){if(!lt(t))return Wn(t);var r=[];for(var e in Object(t))qc.call(t,e)&&e!="constructor"&&r.push(e);return r}var Hn=Kc;function Qc(t){return Pe(t)?Ti(t):Hn(t)}var ft=Qc;function Zc(t){var r=[];if(t!=null)for(var e in Object(t))r.push(e);return r}var zn=Zc;var Jc=Object.prototype,Yc=Jc.hasOwnProperty;function Xc(t){if(!L(t))return zn(t);var r=lt(t),e=[];for(var i in t)i=="constructor"&&(r||!Yc.call(t,i))||e.push(i);return e}var Gn=Xc;function ef(t){return Pe(t)?Ti(t,!0):Gn(t)}var ye=ef;var tf=J(Object,"create"),Ae=tf;function rf(){this.__data__=Ae?Ae(null):{},this.size=0}var qn=rf;function of(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}var Kn=of;var nf="__lodash_hash_undefined__",af=Object.prototype,sf=af.hasOwnProperty;function lf(t){var r=this.__data__;if(Ae){var e=r[t];return e===nf?void 0:e}return sf.call(r,t)?r[t]:void 0}var Qn=lf;var df=Object.prototype,cf=df.hasOwnProperty;function ff(t){var r=this.__data__;return Ae?r[t]!==void 0:cf.call(r,t)}var Zn=ff;var uf="__lodash_hash_undefined__";function mf(t,r){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=Ae&&r===void 0?uf:r,this}var Jn=mf;function ut(t){var r=-1,e=t==null?0:t.length;for(this.clear();++r<e;){var i=t[r];this.set(i[0],i[1])}}ut.prototype.clear=qn;ut.prototype.delete=Kn;ut.prototype.get=Qn;ut.prototype.has=Zn;ut.prototype.set=Jn;var Or=ut;function hf(){this.__data__=[],this.size=0}var Yn=hf;function pf(t,r){for(var e=t.length;e--;)if(ve(t[e][0],r))return e;return-1}var Ve=pf;var gf=Array.prototype,_f=gf.splice;function vf(t){var r=this.__data__,e=Ve(r,t);if(e<0)return!1;var i=r.length-1;return e==i?r.pop():_f.call(r,e,1),--this.size,!0}var Xn=vf;function bf(t){var r=this.__data__,e=Ve(r,t);return e<0?void 0:r[e][1]}var ea=bf;function yf(t){return Ve(this.__data__,t)>-1}var ta=yf;function xf(t,r){var e=this.__data__,i=Ve(e,t);return i<0?(++this.size,e.push([t,r])):e[i][1]=r,this}var ia=xf;function mt(t){var r=-1,e=t==null?0:t.length;for(this.clear();++r<e;){var i=t[r];this.set(i[0],i[1])}}mt.prototype.clear=Yn;mt.prototype.delete=Xn;mt.prototype.get=ea;mt.prototype.has=ta;mt.prototype.set=ia;var Ne=mt;var Cf=J(M,"Map"),Le=Cf;function Sf(){this.size=0,this.__data__={hash:new Or,map:new(Le||Ne),string:new Or}}var ra=Sf;function Df(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}var oa=Df;function wf(t,r){var e=t.__data__;return oa(r)?e[typeof r=="string"?"string":"hash"]:e.map}var Ue=wf;function Tf(t){var r=Ue(this,t).delete(t);return this.size-=r?1:0,r}var na=Tf;function Af(t){return Ue(this,t).get(t)}var aa=Af;function Mf(t){return Ue(this,t).has(t)}var sa=Mf;function kf(t,r){var e=Ue(this,t),i=e.size;return e.set(t,r),this.size+=e.size==i?0:1,this}var la=kf;function ht(t){var r=-1,e=t==null?0:t.length;for(this.clear();++r<e;){var i=t[r];this.set(i[0],i[1])}}ht.prototype.clear=ra;ht.prototype.delete=na;ht.prototype.get=aa;ht.prototype.has=sa;ht.prototype.set=la;var Mi=ht;function Ef(t,r){for(var e=-1,i=r.length,o=t.length;++e<i;)t[o+e]=r[e];return t}var ki=Ef;var Ff=Ai(Object.getPrototypeOf,Object),pt=Ff;var Of="[object Object]",If=Function.prototype,Rf=Object.prototype,da=If.toString,Pf=Rf.hasOwnProperty,Vf=da.call(Object);function Nf(t){if(!R(t)||fe(t)!=Of)return!1;var r=pt(t);if(r===null)return!0;var e=Pf.call(r,"constructor")&&r.constructor;return typeof e=="function"&&e instanceof e&&da.call(e)==Vf}var ca=Nf;function Lf(){this.__data__=new Ne,this.size=0}var fa=Lf;function Uf(t){var r=this.__data__,e=r.delete(t);return this.size=r.size,e}var ua=Uf;function jf(t){return this.__data__.get(t)}var ma=jf;function $f(t){return this.__data__.has(t)}var ha=$f;var Bf=200;function Wf(t,r){var e=this.__data__;if(e instanceof Ne){var i=e.__data__;if(!Le||i.length<Bf-1)return i.push([t,r]),this.size=++e.size,this;e=this.__data__=new Mi(i)}return e.set(t,r),this.size=e.size,this}var pa=Wf;function gt(t){var r=this.__data__=new Ne(t);this.size=r.size}gt.prototype.clear=fa;gt.prototype.delete=ua;gt.prototype.get=ma;gt.prototype.has=ha;gt.prototype.set=pa;var je=gt;function Hf(t,r){return t&&be(r,ft(r),t)}var ga=Hf;function zf(t,r){return t&&be(r,ye(r),t)}var _a=zf;var xa=typeof exports=="object"&&exports&&!exports.nodeType&&exports,va=xa&&typeof module=="object"&&module&&!module.nodeType&&module,Gf=va&&va.exports===xa,ba=Gf?M.Buffer:void 0,ya=ba?ba.allocUnsafe:void 0;function qf(t,r){if(r)return t.slice();var e=t.length,i=ya?ya(e):new t.constructor(e);return t.copy(i),i}var Ei=qf;function Kf(t,r){for(var e=-1,i=t==null?0:t.length,o=0,n=[];++e<i;){var a=t[e];r(a,e,t)&&(n[o++]=a)}return n}var Ca=Kf;function Qf(){return[]}var Fi=Qf;var Zf=Object.prototype,Jf=Zf.propertyIsEnumerable,Sa=Object.getOwnPropertySymbols,Yf=Sa?function(t){return t==null?[]:(t=Object(t),Ca(Sa(t),function(r){return Jf.call(t,r)}))}:Fi,_t=Yf;function Xf(t,r){return be(t,_t(t),r)}var Da=Xf;var eu=Object.getOwnPropertySymbols,tu=eu?function(t){for(var r=[];t;)ki(r,_t(t)),t=pt(t);return r}:Fi,Oi=tu;function iu(t,r){return be(t,Oi(t),r)}var wa=iu;function ru(t,r,e){var i=r(t);return se(t)?i:ki(i,e(t))}var Ii=ru;function ou(t){return Ii(t,ft,_t)}var jt=ou;function nu(t){return Ii(t,ye,Oi)}var Ta=nu;var au=J(M,"DataView"),Ri=au;var su=J(M,"Promise"),Pi=su;var lu=J(M,"Set"),Vi=lu;var Aa="[object Map]",du="[object Object]",Ma="[object Promise]",ka="[object Set]",Ea="[object WeakMap]",Fa="[object DataView]",cu=De(Ri),fu=De(Le),uu=De(Pi),mu=De(Vi),hu=De(xi),He=fe;(Ri&&He(new Ri(new ArrayBuffer(1)))!=Fa||Le&&He(new Le)!=Aa||Pi&&He(Pi.resolve())!=Ma||Vi&&He(new Vi)!=ka||xi&&He(new xi)!=Ea)&&(He=function(t){var r=fe(t),e=r==du?t.constructor:void 0,i=e?De(e):"";if(i)switch(i){case cu:return Fa;case fu:return Aa;case uu:return Ma;case mu:return ka;case hu:return Ea}return r});var Me=He;var pu=Object.prototype,gu=pu.hasOwnProperty;function _u(t){var r=t.length,e=new t.constructor(r);return r&&typeof t[0]=="string"&&gu.call(t,"index")&&(e.index=t.index,e.input=t.input),e}var Oa=_u;var vu=M.Uint8Array,vt=vu;function bu(t){var r=new t.constructor(t.byteLength);return new vt(r).set(new vt(t)),r}var bt=bu;function yu(t,r){var e=r?bt(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.byteLength)}var Ia=yu;var xu=/\w*$/;function Cu(t){var r=new t.constructor(t.source,xu.exec(t));return r.lastIndex=t.lastIndex,r}var Ra=Cu;var Pa=ae?ae.prototype:void 0,Va=Pa?Pa.valueOf:void 0;function Su(t){return Va?Object(Va.call(t)):{}}var Na=Su;function Du(t,r){var e=r?bt(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)}var Ni=Du;var wu="[object Boolean]",Tu="[object Date]",Au="[object Map]",Mu="[object Number]",ku="[object RegExp]",Eu="[object Set]",Fu="[object String]",Ou="[object Symbol]",Iu="[object ArrayBuffer]",Ru="[object DataView]",Pu="[object Float32Array]",Vu="[object Float64Array]",Nu="[object Int8Array]",Lu="[object Int16Array]",Uu="[object Int32Array]",ju="[object Uint8Array]",$u="[object Uint8ClampedArray]",Bu="[object Uint16Array]",Wu="[object Uint32Array]";function Hu(t,r,e){var i=t.constructor;switch(r){case Iu:return bt(t);case wu:case Tu:return new i(+t);case Ru:return Ia(t,e);case Pu:case Vu:case Nu:case Lu:case Uu:case ju:case $u:case Bu:case Wu:return Ni(t,e);case Au:return new i;case Mu:case Fu:return new i(t);case ku:return Ra(t);case Eu:return new i;case Ou:return Na(t)}}var La=Hu;function zu(t){return typeof t.constructor=="function"&&!lt(t)?Cn(pt(t)):{}}var Li=zu;var Gu="[object Map]";function qu(t){return R(t)&&Me(t)==Gu}var Ua=qu;var ja=Te&&Te.isMap,Ku=ja?dt(ja):Ua,$a=Ku;var Qu="[object Set]";function Zu(t){return R(t)&&Me(t)==Qu}var Ba=Zu;var Wa=Te&&Te.isSet,Ju=Wa?dt(Wa):Ba,Ha=Ju;var Yu=1,Xu=2,em=4,za="[object Arguments]",tm="[object Array]",im="[object Boolean]",rm="[object Date]",om="[object Error]",Ga="[object Function]",nm="[object GeneratorFunction]",am="[object Map]",sm="[object Number]",qa="[object Object]",lm="[object RegExp]",dm="[object Set]",cm="[object String]",fm="[object Symbol]",um="[object WeakMap]",mm="[object ArrayBuffer]",hm="[object DataView]",pm="[object Float32Array]",gm="[object Float64Array]",_m="[object Int8Array]",vm="[object Int16Array]",bm="[object Int32Array]",ym="[object Uint8Array]",xm="[object Uint8ClampedArray]",Cm="[object Uint16Array]",Sm="[object Uint32Array]",S={};S[za]=S[tm]=S[mm]=S[hm]=S[im]=S[rm]=S[pm]=S[gm]=S[_m]=S[vm]=S[bm]=S[am]=S[sm]=S[qa]=S[lm]=S[dm]=S[cm]=S[fm]=S[ym]=S[xm]=S[Cm]=S[Sm]=!0;S[om]=S[Ga]=S[um]=!1;function Ui(t,r,e,i,o,n){var a,s=r&Yu,l=r&Xu,c=r&em;if(e&&(a=o?e(t,i,o,n):e(t)),a!==void 0)return a;if(!L(t))return t;var _=se(t);if(_){if(a=Oa(t),!s)return Ci(t,a)}else{var m=Me(t),u=m==Ga||m==nm;if(we(t))return Ei(t,s);if(m==qa||m==za||u&&!o){if(a=l||u?{}:Li(t),!s)return l?wa(t,_a(a,t)):Da(t,ga(a,t))}else{if(!S[m])return o?t:{};a=La(t,m,s)}}n||(n=new je);var b=n.get(t);if(b)return b;n.set(t,a),Ha(t)?t.forEach(function(F){a.add(Ui(F,r,e,F,t,n))}):$a(t)&&t.forEach(function(F,U){a.set(U,Ui(F,r,e,U,t,n))});var v=c?l?Ta:jt:l?ye:ft,E=_?void 0:v(t);return Mn(E||t,function(F,U){E&&(U=F,F=t[U]),Di(a,U,Ui(F,r,e,U,t,n))}),a}var Ka=Ui;var Dm=1,wm=4;function Tm(t){return Ka(t,Dm|wm)}var Ir=Tm;var Am="__lodash_hash_undefined__";function Mm(t){return this.__data__.set(t,Am),this}var Qa=Mm;function km(t){return this.__data__.has(t)}var Za=km;function ji(t){var r=-1,e=t==null?0:t.length;for(this.__data__=new Mi;++r<e;)this.add(t[r])}ji.prototype.add=ji.prototype.push=Qa;ji.prototype.has=Za;var Ja=ji;function Em(t,r){for(var e=-1,i=t==null?0:t.length;++e<i;)if(r(t[e],e,t))return!0;return!1}var Ya=Em;function Fm(t,r){return t.has(r)}var Xa=Fm;var Om=1,Im=2;function Rm(t,r,e,i,o,n){var a=e&Om,s=t.length,l=r.length;if(s!=l&&!(a&&l>s))return!1;var c=n.get(t),_=n.get(r);if(c&&_)return c==r&&_==t;var m=-1,u=!0,b=e&Im?new Ja:void 0;for(n.set(t,r),n.set(r,t);++m<s;){var v=t[m],E=r[m];if(i)var F=a?i(E,v,m,r,t,n):i(v,E,m,t,r,n);if(F!==void 0){if(F)continue;u=!1;break}if(b){if(!Ya(r,function(U,We){if(!Xa(b,We)&&(v===U||o(v,U,e,i,n)))return b.push(We)})){u=!1;break}}else if(!(v===E||o(v,E,e,i,n))){u=!1;break}}return n.delete(t),n.delete(r),u}var $i=Rm;function Pm(t){var r=-1,e=Array(t.size);return t.forEach(function(i,o){e[++r]=[o,i]}),e}var es=Pm;function Vm(t){var r=-1,e=Array(t.size);return t.forEach(function(i){e[++r]=i}),e}var ts=Vm;var Nm=1,Lm=2,Um="[object Boolean]",jm="[object Date]",$m="[object Error]",Bm="[object Map]",Wm="[object Number]",Hm="[object RegExp]",zm="[object Set]",Gm="[object String]",qm="[object Symbol]",Km="[object ArrayBuffer]",Qm="[object DataView]",is=ae?ae.prototype:void 0,Rr=is?is.valueOf:void 0;function Zm(t,r,e,i,o,n,a){switch(e){case Qm:if(t.byteLength!=r.byteLength||t.byteOffset!=r.byteOffset)return!1;t=t.buffer,r=r.buffer;case Km:return!(t.byteLength!=r.byteLength||!n(new vt(t),new vt(r)));case Um:case jm:case Wm:return ve(+t,+r);case $m:return t.name==r.name&&t.message==r.message;case Hm:case Gm:return t==r+"";case Bm:var s=es;case zm:var l=i&Nm;if(s||(s=ts),t.size!=r.size&&!l)return!1;var c=a.get(t);if(c)return c==r;i|=Lm,a.set(t,r);var _=$i(s(t),s(r),i,o,n,a);return a.delete(t),_;case qm:if(Rr)return Rr.call(t)==Rr.call(r)}return!1}var rs=Zm;var Jm=1,Ym=Object.prototype,Xm=Ym.hasOwnProperty;function eh(t,r,e,i,o,n){var a=e&Jm,s=jt(t),l=s.length,c=jt(r),_=c.length;if(l!=_&&!a)return!1;for(var m=l;m--;){var u=s[m];if(!(a?u in r:Xm.call(r,u)))return!1}var b=n.get(t),v=n.get(r);if(b&&v)return b==r&&v==t;var E=!0;n.set(t,r),n.set(r,t);for(var F=a;++m<l;){u=s[m];var U=t[u],We=r[u];if(i)var so=a?i(We,U,u,r,t,n):i(U,We,u,t,r,n);if(!(so===void 0?U===We||o(U,We,e,i,n):so)){E=!1;break}F||(F=u=="constructor")}if(E&&!F){var Xt=t.constructor,ei=r.constructor;Xt!=ei&&"constructor"in t&&"constructor"in r&&!(typeof Xt=="function"&&Xt instanceof Xt&&typeof ei=="function"&&ei instanceof ei)&&(E=!1)}return n.delete(t),n.delete(r),E}var os=eh;var th=1,ns="[object Arguments]",as="[object Array]",Bi="[object Object]",ih=Object.prototype,ss=ih.hasOwnProperty;function rh(t,r,e,i,o,n){var a=se(t),s=se(r),l=a?as:Me(t),c=s?as:Me(r);l=l==ns?Bi:l,c=c==ns?Bi:c;var _=l==Bi,m=c==Bi,u=l==c;if(u&&we(t)){if(!we(r))return!1;a=!0,_=!1}if(u&&!_)return n||(n=new je),a||ct(t)?$i(t,r,e,i,o,n):rs(t,r,l,e,i,o,n);if(!(e&th)){var b=_&&ss.call(t,"__wrapped__"),v=m&&ss.call(r,"__wrapped__");if(b||v){var E=b?t.value():t,F=v?r.value():r;return n||(n=new je),o(E,F,e,i,n)}}return u?(n||(n=new je),os(t,r,e,i,o,n)):!1}var ls=rh;function ds(t,r,e,i,o){return t===r?!0:t==null||r==null||!R(t)&&!R(r)?t!==t&&r!==r:ls(t,r,e,i,ds,o)}var cs=ds;function oh(t){return function(r,e,i){for(var o=-1,n=Object(r),a=i(r),s=a.length;s--;){var l=a[t?s:++o];if(e(n[l],l,n)===!1)break}return r}}var fs=oh;var nh=fs(),us=nh;function ah(t,r,e){(e!==void 0&&!ve(t[r],e)||e===void 0&&!(r in t))&&st(t,r,e)}var $t=ah;function sh(t){return R(t)&&Pe(t)}var ms=sh;function lh(t,r){if(!(r==="constructor"&&typeof t[r]=="function")&&r!="__proto__")return t[r]}var Bt=lh;function dh(t){return be(t,ye(t))}var hs=dh;function ch(t,r,e,i,o,n,a){var s=Bt(t,e),l=Bt(r,e),c=a.get(l);if(c){$t(t,e,c);return}var _=n?n(s,l,e+"",t,r,a):void 0,m=_===void 0;if(m){var u=se(l),b=!u&&we(l),v=!u&&!b&&ct(l);_=l,u||b||v?se(s)?_=s:ms(s)?_=Ci(s):b?(m=!1,_=Ei(l,!0)):v?(m=!1,_=Ni(l,!0)):_=[]:ca(l)||Lt(l)?(_=s,Lt(s)?_=hs(s):(!L(s)||nt(s))&&(_=Li(l))):m=!1}m&&(a.set(l,_),o(_,l,i,n,a),a.delete(l)),$t(t,e,_)}var ps=ch;function gs(t,r,e,i,o){t!==r&&us(r,function(n,a){if(o||(o=new je),L(n))ps(t,r,a,e,gs,i,o);else{var s=i?i(Bt(t,a),n,a+"",t,r,o):void 0;s===void 0&&(s=n),$t(t,a,s)}},ye)}var _s=gs;function fh(t,r){return cs(t,r)}var uh=fh;var mh=In(function(t,r,e){_s(t,r,e)}),Pr=mh;var hh="self",vs=t=>isFinite(+(t instanceof Date?t:new Date(t)))?!!new RegExp("^([0-9]+)-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(.[0-9]+)?(([Zz])|([+|-]([01][0-9]|2[0-3]):[0-5][0-9]))$").test(t):!1,bs=t=>{if(t)return t==="RFC 3339 (UTC)"?"Date":"number"},Z0=(()=>{class t{delta=d(un);_destroyRef=d(At);_deltaUpdatesCounter=0;_deltaUpdatesSubject=new qe(10);_isSkDataFullTreeActive=!1;_skDataSubject$=new y([]);_dataServiceMeta=[];_isSkMetaFullTreeActive=!1;_dataServiceMetaSubject$=new y([]);_skNotificationMsg$=new h;_skNotificationMeta$=new h;_isReset=new h;_selfUrn="self";_skData=[];_pathRegister=[];constructor(){vo(1e3).pipe(k(this._destroyRef)).subscribe(()=>{let e={timestamp:Date.now(),value:this._deltaUpdatesCounter};this._deltaUpdatesSubject.next(e),this._deltaUpdatesCounter=0}),this.delta.subscribeDataPathsUpdates().pipe(k(this._destroyRef)).subscribe(e=>{this.updatePathData(e)}),this.delta.subscribeMetadataUpdates().pipe(k(this._destroyRef)).subscribe(e=>{this.setMeta(e)}),this.delta.subscribeNotificationsUpdates().pipe(k(this._destroyRef)).subscribe(e=>{let i=e.path.replace("notifications.","self."),o=this._skData.find(n=>n.path==i);if(o&&o.state!==e.value.state){o.state=e.value.state;let n=this._pathRegister.find(a=>a.path==i);n&&n._pathState$.next(o.state)}this._skNotificationMsg$.next(e)}),this.delta.subscribeSelfUpdates().pipe(k(this._destroyRef)).subscribe(e=>{this.setSelfUrn(e)})}getSignalkDeltaUpdateStatistics(){return this._deltaUpdatesSubject.asObservable()}resetSignalKData(){this._skData=[],this._selfUrn="self",this._isReset.next(!0)}unsubscribePath(e){let i=this._pathRegister.findIndex(o=>o.path===e);if(i!==-1){let o=this._pathRegister[i];o.combinedSub?.unsubscribe(),o._pathData$?.complete(),o._pathState$?.complete(),o.pathDataUpdate$?.complete(),o.pathMeta$?.complete(),this._pathRegister.splice(i,1)}}subscribePath(e,i){let o=this._pathRegister.find(v=>v.path===e&&v.source===i);if(o)return o.pathDataUpdate$;let n=null,a=null,s=null,l=ot.Normal,c={data:{value:null,timestamp:null},state:l},_=null,m=this._skData.find(v=>v.path==e);this._skData.length&&m&&(n=i==="default"?m.pathValue:m.sources?.[i]?.sourceValue??null,a=i==="default"?m.pathTimestamp:m.sources?.[i]?.sourceTimestamp??null,s=a?new Date(a):null,c={data:{value:n,timestamp:s},state:m.state||l},l=m.state||l,_=m.meta||null);let u={path:e,source:i,_pathData$:new y(c.data),_pathState$:new y(c.state),pathDataUpdate$:new y(c),pathMeta$:new y(_)},b=ho([u._pathData$,u._pathState$]).pipe(ke(([v,E])=>({data:v,state:E})));return u.combinedSub=b.subscribe(v=>u.pathDataUpdate$.next(v)),this._pathRegister.push(u),u.pathDataUpdate$}updatePathData(e){this._deltaUpdatesCounter++;let i=this.setPathContext(e.context,e.path),o=this._skData.find(a=>a.path==i);if(o)o.defaultSource===void 0&&(o.defaultSource=e.source),o.type===void 0&&e.value!==null&&(o.type=typeof e.value,o.type==="string"&&vs(e.value)&&(o.type="Date")),o.pathValue=e.value,o.pathTimestamp=e.timestamp,o.sources[e.source]={sourceTimestamp:e.timestamp,sourceValue:e.value};else{let a=typeof e.value;a==="string"&&vs(e.value)&&(a="Date"),o={path:i,pathValue:e.value,pathTimestamp:e.timestamp,defaultSource:e.source,type:a,state:ot.Normal,sources:{[e.source]:{sourceTimestamp:e.timestamp,sourceValue:e.value}}},this._skData.push(o)}let n=this._pathRegister.filter(a=>a.path===i);if(n.length){let a={value:o.pathValue,timestamp:new Date(o.pathTimestamp)},s=n.find(c=>c.source==="default");s&&s._pathData$.next(a);let l=n.find(c=>c.source===e.source);l&&l._pathData$.next(a)}this._isSkDataFullTreeActive&&this._skDataSubject$.next(this._skData)}setMeta(e){if(e.path.startsWith("notifications."))this._skNotificationMeta$.next(e);else{let i=this.setPathContext(e.context,e.path),o=this._skData.find(a=>a.path===i);o?(o.type==="object"&&e.meta.units&&(o.type=bs(e.meta.units)),o.meta=Pr(o.meta,e.meta)):(o={path:i,pathValue:void 0,pathTimestamp:void 0,type:bs(e.meta.units),state:ot.Normal,defaultSource:void 0,sources:{},meta:e.meta},this._skData.push(o));let n=this._pathRegister.find(a=>a.path===i);n&&n.pathMeta$.next(o.meta),this._isSkMetaFullTreeActive&&(this._dataServiceMeta.push({path:i,meta:o.meta}),this._dataServiceMetaSubject$.next(this._dataServiceMeta))}}startSkMetaFullTree(){return this._isSkMetaFullTreeActive=!0,this._dataServiceMeta=this._skData.filter(e=>e.meta!==void 0&&e.path.startsWith("self.")).map(e=>({path:e.path,meta:e.meta})),this._dataServiceMetaSubject$.next(this._dataServiceMeta),this._dataServiceMetaSubject$}stopSkMetaFullTree(){this._isSkMetaFullTreeActive=!1,this._dataServiceMetaSubject$.next(null),this._dataServiceMeta=null}startSkDataFullTree(){return this._isSkDataFullTreeActive=!0,this._skDataSubject$.next(this._skData),this._skDataSubject$}stopSkDataFullTree(){this._isSkDataFullTreeActive=!1}setSelfUrn(e){e!==""&&e!==null?(console.debug("[Signal K Data Service] Setting self to: "+e),this._selfUrn=e):console.error("[Signal K Data Service] Invalid self URN: "+e)}setPathContext(e,i){return e!==this._selfUrn?`${e}.${i}`:`${hh}.${i}`}getPathsByType(e,i){return this._skData.filter(o=>o.type===e&&(!i||o.path.startsWith("self"))).map(o=>o.path)}getPathsAndMetaByType(e,i,o){return this._skData.filter(n=>{let a=n.type===e,s=!o||n.path.startsWith("self"),l=i===!0?n.meta?.supportsPut===!0:!0;return a&&s&&l}).map(n=>({path:n.path,meta:n.meta}))}getPathObject(e){return Ir(this._skData.find(i=>i.path===e))||null}getPathUnitType(e){return this._skData.find(i=>i.path===e)?.meta?.units||null}timeoutPathObservable(e,i){let o=this._pathRegister.find(n=>n.path==e);if(o){let n;["string","Date","number"].includes(i)&&(n={data:{value:null,timestamp:null},state:ot.Normal}),o.pathDataUpdate$.next(n)}}getNotificationMsgObservable(){return this._skNotificationMsg$.asObservable()}getNotificationMetaObservable(){return this._skNotificationMeta$.asObservable()}getPathMetaObservable(e){return this._pathRegister.find(o=>o.path==e)?.pathMeta$.asObservable()||mo(null)}getPathMeta(e){return this._skData.find(i=>i.path===e)?.meta||null}isResetService(){return this._isReset.asObservable()}ngOnDestroy(){this._deltaUpdatesSubject?.complete(),this._skNotificationMsg$?.complete(),this._skNotificationMeta$?.complete(),this._isReset?.complete(),this._skDataSubject$?.complete(),this._dataServiceMetaSubject$?.complete()}static \u0275fac=function(i){return new(i||t)};static \u0275prov=x({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function ph(t,r){}var $e=class{viewContainerRef;injector;id;role="dialog";panelClass="";hasBackdrop=!0;backdropClass="";disableClose=!1;closePredicate;width="";height="";minWidth;minHeight;maxWidth;maxHeight;positionStrategy;data=null;direction;ariaDescribedBy=null;ariaLabelledBy=null;ariaLabel=null;ariaModal=!1;autoFocus="first-tabbable";restoreFocus=!0;scrollStrategy;closeOnNavigation=!0;closeOnDestroy=!0;closeOnOverlayDetachments=!0;disableAnimations=!1;providers;container;templateContext};var Nr=(()=>{class t extends Qo{_elementRef=d(P);_focusTrapFactory=d(Go);_config;_interactivityChecker=d(zo);_ngZone=d(j);_focusMonitor=d(Bo);_renderer=d(ge);_changeDetectorRef=d(Xe);_injector=d(he);_platform=d(Ie);_document=d(mr);_portalOutlet;_focusTrapped=new h;_focusTrap=null;_elementFocusedBeforeDialogWasOpened=null;_closeInteractionType=null;_ariaLabelledByQueue=[];_isDestroyed=!1;constructor(){super(),this._config=d($e,{optional:!0})||new $e,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(e){this._ariaLabelledByQueue.push(e),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(e){let i=this._ariaLabelledByQueue.indexOf(e);i>-1&&(this._ariaLabelledByQueue.splice(i,1),this._changeDetectorRef.markForCheck())}_contentAttached(){this._initializeFocusTrap(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._focusTrapped.complete(),this._isDestroyed=!0,this._restoreFocus()}attachComponentPortal(e){this._portalOutlet.hasAttached();let i=this._portalOutlet.attachComponentPortal(e);return this._contentAttached(),i}attachTemplatePortal(e){this._portalOutlet.hasAttached();let i=this._portalOutlet.attachTemplatePortal(e);return this._contentAttached(),i}attachDomPortal=e=>{this._portalOutlet.hasAttached();let i=this._portalOutlet.attachDomPortal(e);return this._contentAttached(),i};_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(e,i){this._interactivityChecker.isFocusable(e)||(e.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let o=()=>{n(),a(),e.removeAttribute("tabindex")},n=this._renderer.listen(e,"blur",o),a=this._renderer.listen(e,"mousedown",o)})),e.focus(i)}_focusByCssSelector(e,i){let o=this._elementRef.nativeElement.querySelector(e);o&&this._forceFocus(o,i)}_trapFocus(e){this._isDestroyed||hr(()=>{let i=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||i.focus(e);break;case!0:case"first-tabbable":this._focusTrap?.focusInitialElement(e)||this._focusDialogContainer(e);break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]',e);break;default:this._focusByCssSelector(this._config.autoFocus,e);break}this._focusTrapped.next()},{injector:this._injector})}_restoreFocus(){let e=this._config.restoreFocus,i=null;if(typeof e=="string"?i=this._document.querySelector(e):typeof e=="boolean"?i=e?this._elementFocusedBeforeDialogWasOpened:null:e&&(i=e),this._config.restoreFocus&&i&&typeof i.focus=="function"){let o=li(),n=this._elementRef.nativeElement;(!o||o===this._document.body||o===n||n.contains(o))&&(this._focusMonitor?(this._focusMonitor.focusVia(i,this._closeInteractionType),this._closeInteractionType=null):i.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(e){this._elementRef.nativeElement.focus?.(e)}_containsFocus(){let e=this._elementRef.nativeElement,i=li();return e===i||e.contains(i)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=li()))}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=xe({type:t,selectors:[["cdk-dialog-container"]],viewQuery:function(i,o){if(i&1&&ne(It,7),i&2){let n;O(n=I())&&(o._portalOutlet=n.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(i,o){i&2&&$("id",o._config.id||null)("role",o._config.role)("aria-modal",o._config.ariaModal)("aria-labelledby",o._config.ariaLabel?null:o._ariaLabelledByQueue[0])("aria-label",o._config.ariaLabel)("aria-describedby",o._config.ariaDescribedBy||null)},features:[w],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(i,o){i&1&&Ee(0,ph,0,0,"ng-template",0)},dependencies:[It],styles:[`.cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}
|
|
3
|
+
`],encapsulation:2})}return t})(),Wt=class{overlayRef;config;componentInstance;componentRef;containerInstance;disableClose;closed=new h;backdropClick;keydownEvents;outsidePointerEvents;id;_detachSubscription;constructor(r,e){this.overlayRef=r,this.config=e,this.disableClose=e.disableClose,this.backdropClick=r.backdropClick(),this.keydownEvents=r.keydownEvents(),this.outsidePointerEvents=r.outsidePointerEvents(),this.id=e.id,this.keydownEvents.subscribe(i=>{i.keyCode===27&&!this.disableClose&&!ci(i)&&(i.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{!this.disableClose&&this._canClose()?this.close(void 0,{focusOrigin:"mouse"}):this.containerInstance._recaptureFocus?.()}),this._detachSubscription=r.detachments().subscribe(()=>{e.closeOnOverlayDetachments!==!1&&this.close()})}close(r,e){if(this._canClose(r)){let i=this.closed;this.containerInstance._closeInteractionType=e?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),i.next(r),i.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(r="",e=""){return this.overlayRef.updateSize({width:r,height:e}),this}addPanelClass(r){return this.overlayRef.addPanelClass(r),this}removePanelClass(r){return this.overlayRef.removePanelClass(r),this}_canClose(r){let e=this.config;return!!this.containerInstance&&(!e.closePredicate||e.closePredicate(r,e,this.componentInstance))}},gh=new C("DialogScrollStrategy",{providedIn:"root",factory:()=>{let t=d(he);return()=>fi(t)}}),_h=new C("DialogData"),vh=new C("DefaultDialogConfig");function bh(t){let r=re(t),e=new te;return{valueSignal:r,get value(){return r()},change:e,ngOnDestroy(){e.complete()}}}var Lr=(()=>{class t{_injector=d(he);_defaultOptions=d(vh,{optional:!0});_parentDialog=d(t,{optional:!0,skipSelf:!0});_overlayContainer=d(Yo);_idGenerator=d(ce);_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new h;_afterOpenedAtThisLevel=new h;_ariaHiddenElements=new Map;_scrollStrategy=d(gh);get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}afterAllClosed=ri(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Ze(void 0)));constructor(){}open(e,i){let o=this._defaultOptions||new $e;i=T(T({},o),i),i.id=i.id||this._idGenerator.getId("cdk-dialog-"),i.id&&this.getDialogById(i.id);let n=this._getOverlayConfig(i),a=en(this._injector,n),s=new Wt(a,i),l=this._attachContainer(a,s,i);if(s.containerInstance=l,!this.openDialogs.length){let c=this._overlayContainer.getContainerElement();l._focusTrapped?l._focusTrapped.pipe(Qe(1)).subscribe(()=>{this._hideNonDialogContentFromAssistiveTechnology(c)}):this._hideNonDialogContentFromAssistiveTechnology(c)}return this._attachDialogContent(e,s,l,i),this.openDialogs.push(s),s.closed.subscribe(()=>this._removeOpenDialog(s,!0)),this.afterOpened.next(s),s}closeAll(){Vr(this.openDialogs,e=>e.close())}getDialogById(e){return this.openDialogs.find(i=>i.id===e)}ngOnDestroy(){Vr(this._openDialogsAtThisLevel,e=>{e.config.closeOnDestroy===!1&&this._removeOpenDialog(e,!1)}),Vr(this._openDialogsAtThisLevel,e=>e.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(e){let i=new Jo({positionStrategy:e.positionStrategy||ui().centerHorizontally().centerVertically(),scrollStrategy:e.scrollStrategy||this._scrollStrategy(),panelClass:e.panelClass,hasBackdrop:e.hasBackdrop,direction:e.direction,minWidth:e.minWidth,minHeight:e.minHeight,maxWidth:e.maxWidth,maxHeight:e.maxHeight,width:e.width,height:e.height,disposeOnNavigation:e.closeOnNavigation,disableAnimations:e.disableAnimations});return e.backdropClass&&(i.backdropClass=e.backdropClass),i}_attachContainer(e,i,o){let n=o.injector||o.viewContainerRef?.injector,a=[{provide:$e,useValue:o},{provide:Wt,useValue:i},{provide:Xo,useValue:e}],s;o.container?typeof o.container=="function"?s=o.container:(s=o.container.type,a.push(...o.container.providers(o))):s=Nr;let l=new Cr(s,o.viewContainerRef,he.create({parent:n||this._injector,providers:a}));return e.attach(l).instance}_attachDialogContent(e,i,o,n){if(e instanceof Mo){let a=this._createInjector(n,i,o,void 0),s={$implicit:n.data,dialogRef:i};n.templateContext&&(s=T(T({},s),typeof n.templateContext=="function"?n.templateContext():n.templateContext)),o.attachTemplatePortal(new Ko(e,null,s,a))}else{let a=this._createInjector(n,i,o,this._injector),s=o.attachComponentPortal(new Cr(e,n.viewContainerRef,a));i.componentRef=s,i.componentInstance=s.instance}}_createInjector(e,i,o,n){let a=e.injector||e.viewContainerRef?.injector,s=[{provide:_h,useValue:e.data},{provide:Wt,useValue:i}];return e.providers&&(typeof e.providers=="function"?s.push(...e.providers(i,e,o)):s.push(...e.providers)),e.direction&&(!a||!a.get(Ft,null,{optional:!0}))&&s.push({provide:Ft,useValue:bh(e.direction)}),he.create({parent:a||n,providers:s})}_removeOpenDialog(e,i){let o=this.openDialogs.indexOf(e);o>-1&&(this.openDialogs.splice(o,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((n,a)=>{n?a.setAttribute("aria-hidden",n):a.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),i&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(e){if(e.parentElement){let i=e.parentElement.children;for(let o=i.length-1;o>-1;o--){let n=i[o];n!==e&&n.nodeName!=="SCRIPT"&&n.nodeName!=="STYLE"&&!n.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(n,n.getAttribute("aria-hidden")),n.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){let e=this._parentDialog;return e?e._getAfterAllClosed():this._afterAllClosedAtThisLevel}static \u0275fac=function(i){return new(i||t)};static \u0275prov=x({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Vr(t,r){let e=t.length;for(;e--;)r(t[e])}var xs=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=G({type:t});static \u0275inj=z({providers:[Lr],imports:[mi,Rt,qo,Rt]})}return t})();function yh(t,r){}var zt=class{viewContainerRef;injector;id;role="dialog";panelClass="";hasBackdrop=!0;backdropClass="";disableClose=!1;closePredicate;width="";height="";minWidth;minHeight;maxWidth;maxHeight;position;data=null;direction;ariaDescribedBy=null;ariaLabelledBy=null;ariaLabel=null;ariaModal=!1;autoFocus="first-tabbable";restoreFocus=!0;delayFocusTrap=!0;scrollStrategy;closeOnNavigation=!0;enterAnimationDuration;exitAnimationDuration},Ur="mdc-dialog--open",Cs="mdc-dialog--opening",Ss="mdc-dialog--closing",xh=150,Ch=75,Ts=(()=>{class t extends Nr{_animationStateChanged=new te;_animationsEnabled=!Ot();_actionSectionCount=0;_hostElement=this._elementRef.nativeElement;_enterAnimationDuration=this._animationsEnabled?ws(this._config.enterAnimationDuration)??xh:0;_exitAnimationDuration=this._animationsEnabled?ws(this._config.exitAnimationDuration)??Ch:0;_animationTimer=null;_contentAttached(){super._contentAttached(),this._startOpenAnimation()}_startOpenAnimation(){this._animationStateChanged.emit({state:"opening",totalTime:this._enterAnimationDuration}),this._animationsEnabled?(this._hostElement.style.setProperty(Ds,`${this._enterAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(Cs,Ur)),this._waitForAnimationToComplete(this._enterAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(Ur),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._exitAnimationDuration}),this._hostElement.classList.remove(Ur),this._animationsEnabled?(this._hostElement.style.setProperty(Ds,`${this._exitAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(Ss)),this._waitForAnimationToComplete(this._exitAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_updateActionSectionCount(e){this._actionSectionCount+=e,this._changeDetectorRef.markForCheck()}_finishDialogOpen=()=>{this._clearAnimationClasses(),this._openAnimationDone(this._enterAnimationDuration)};_finishDialogClose=()=>{this._clearAnimationClasses(),this._animationStateChanged.emit({state:"closed",totalTime:this._exitAnimationDuration})};_clearAnimationClasses(){this._hostElement.classList.remove(Cs,Ss)}_waitForAnimationToComplete(e,i){this._animationTimer!==null&&clearTimeout(this._animationTimer),this._animationTimer=setTimeout(i,e)}_requestAnimationFrame(e){this._ngZone.runOutsideAngular(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(e):e()})}_captureInitialFocus(){this._config.delayFocusTrap||this._trapFocus()}_openAnimationDone(e){this._config.delayFocusTrap&&this._trapFocus(),this._animationStateChanged.next({state:"opened",totalTime:e})}ngOnDestroy(){super.ngOnDestroy(),this._animationTimer!==null&&clearTimeout(this._animationTimer)}attachComponentPortal(e){let i=super.attachComponentPortal(e);return i.location.nativeElement.classList.add("mat-mdc-dialog-component-host"),i}static \u0275fac=(()=>{let e;return function(o){return(e||(e=ee(t)))(o||t)}})();static \u0275cmp=xe({type:t,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:10,hostBindings:function(i,o){i&2&&(Fe("id",o._config.id),$("aria-modal",o._config.ariaModal)("role",o._config.role)("aria-labelledby",o._config.ariaLabel?null:o._ariaLabelledByQueue[0])("aria-label",o._config.ariaLabel)("aria-describedby",o._config.ariaDescribedBy||null),N("_mat-animation-noopable",!o._animationsEnabled)("mat-mdc-dialog-container-with-actions",o._actionSectionCount>0))},features:[w],decls:3,vars:0,consts:[[1,"mat-mdc-dialog-inner-container","mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(i,o){i&1&&(Q(0,"div",0)(1,"div",1),Ee(2,yh,0,0,"ng-template",2),Z()())},dependencies:[It],styles:[`.mat-mdc-dialog-container{width:100%;height:100%;display:block;box-sizing:border-box;max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;outline:0}.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-max-width, 560px);min-width:var(--mat-dialog-container-min-width, 280px)}@media(max-width: 599px){.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-small-max-width, calc(100vw - 32px))}}.mat-mdc-dialog-inner-container{display:flex;flex-direction:row;align-items:center;justify-content:space-around;box-sizing:border-box;height:100%;opacity:0;transition:opacity linear var(--mat-dialog-transition-duration, 0ms);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit}.mdc-dialog--closing .mat-mdc-dialog-inner-container{transition:opacity 75ms linear;transform:none}.mdc-dialog--open .mat-mdc-dialog-inner-container{opacity:1}._mat-animation-noopable .mat-mdc-dialog-inner-container{transition:none}.mat-mdc-dialog-surface{display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;box-sizing:border-box;width:100%;height:100%;position:relative;overflow-y:auto;outline:0;transform:scale(0.8);transition:transform var(--mat-dialog-transition-duration, 0ms) cubic-bezier(0, 0, 0.2, 1);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;box-shadow:var(--mat-dialog-container-elevation-shadow, none);border-radius:var(--mat-dialog-container-shape, var(--mat-sys-corner-extra-large, 4px));background-color:var(--mat-dialog-container-color, var(--mat-sys-surface, white))}[dir=rtl] .mat-mdc-dialog-surface{text-align:right}.mdc-dialog--open .mat-mdc-dialog-surface,.mdc-dialog--closing .mat-mdc-dialog-surface{transform:none}._mat-animation-noopable .mat-mdc-dialog-surface{transition:none}.mat-mdc-dialog-surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:2px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}.mat-mdc-dialog-title{display:block;position:relative;flex-shrink:0;box-sizing:border-box;margin:0 0 1px;padding:var(--mat-dialog-headline-padding, 6px 24px 13px)}.mat-mdc-dialog-title::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}[dir=rtl] .mat-mdc-dialog-title{text-align:right}.mat-mdc-dialog-container .mat-mdc-dialog-title{color:var(--mat-dialog-subhead-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mat-dialog-subhead-font, var(--mat-sys-headline-small-font, inherit));line-height:var(--mat-dialog-subhead-line-height, var(--mat-sys-headline-small-line-height, 1.5rem));font-size:var(--mat-dialog-subhead-size, var(--mat-sys-headline-small-size, 1rem));font-weight:var(--mat-dialog-subhead-weight, var(--mat-sys-headline-small-weight, 400));letter-spacing:var(--mat-dialog-subhead-tracking, var(--mat-sys-headline-small-tracking, 0.03125em))}.mat-mdc-dialog-content{display:block;flex-grow:1;box-sizing:border-box;margin:0;overflow:auto;max-height:65vh}.mat-mdc-dialog-content>:first-child{margin-top:0}.mat-mdc-dialog-content>:last-child{margin-bottom:0}.mat-mdc-dialog-container .mat-mdc-dialog-content{color:var(--mat-dialog-supporting-text-color, var(--mat-sys-on-surface-variant, rgba(0, 0, 0, 0.6)));font-family:var(--mat-dialog-supporting-text-font, var(--mat-sys-body-medium-font, inherit));line-height:var(--mat-dialog-supporting-text-line-height, var(--mat-sys-body-medium-line-height, 1.5rem));font-size:var(--mat-dialog-supporting-text-size, var(--mat-sys-body-medium-size, 1rem));font-weight:var(--mat-dialog-supporting-text-weight, var(--mat-sys-body-medium-weight, 400));letter-spacing:var(--mat-dialog-supporting-text-tracking, var(--mat-sys-body-medium-tracking, 0.03125em))}.mat-mdc-dialog-container .mat-mdc-dialog-content{padding:var(--mat-dialog-content-padding, 20px 24px)}.mat-mdc-dialog-container-with-actions .mat-mdc-dialog-content{padding:var(--mat-dialog-with-actions-content-padding, 20px 24px 0)}.mat-mdc-dialog-container .mat-mdc-dialog-title+.mat-mdc-dialog-content{padding-top:0}.mat-mdc-dialog-actions{display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;align-items:center;box-sizing:border-box;min-height:52px;margin:0;border-top:1px solid rgba(0,0,0,0);padding:var(--mat-dialog-actions-padding, 16px 24px);justify-content:var(--mat-dialog-actions-alignment, flex-end)}@media(forced-colors: active){.mat-mdc-dialog-actions{border-top-color:CanvasText}}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-start,.mat-mdc-dialog-actions[align=start]{justify-content:start}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-center,.mat-mdc-dialog-actions[align=center]{justify-content:center}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-end,.mat-mdc-dialog-actions[align=end]{justify-content:flex-end}.mat-mdc-dialog-actions .mat-button-base+.mat-button-base,.mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-mdc-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}.mat-mdc-dialog-component-host{display:contents}
|
|
4
|
+
`],encapsulation:2})}return t})(),Ds="--mat-dialog-transition-duration";function ws(t){return t==null?null:typeof t=="number"?t:t.endsWith("ms")?di(t.substring(0,t.length-2)):t.endsWith("s")?di(t.substring(0,t.length-1))*1e3:t==="0"?0:null}var Ht=(function(t){return t[t.OPEN=0]="OPEN",t[t.CLOSING=1]="CLOSING",t[t.CLOSED=2]="CLOSED",t})(Ht||{}),yt=class{_ref;_config;_containerInstance;componentInstance;componentRef;disableClose;id;_afterOpened=new h;_beforeClosed=new h;_result;_closeFallbackTimeout;_state=Ht.OPEN;_closeInteractionType;constructor(r,e,i){this._ref=r,this._config=e,this._containerInstance=i,this.disableClose=e.disableClose,this.id=r.id,r.addPanelClass("mat-mdc-dialog-panel"),i._animationStateChanged.pipe(le(o=>o.state==="opened"),Qe(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),i._animationStateChanged.pipe(le(o=>o.state==="closed"),Qe(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),r.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),oi(this.backdropClick(),this.keydownEvents().pipe(le(o=>o.keyCode===27&&!this.disableClose&&!ci(o)))).subscribe(o=>{this.disableClose||(o.preventDefault(),jr(this,o.type==="keydown"?"keyboard":"mouse"))})}close(r){let e=this._config.closePredicate;e&&!e(r,this._config,this.componentInstance)||(this._result=r,this._containerInstance._animationStateChanged.pipe(le(i=>i.state==="closing"),Qe(1)).subscribe(i=>{this._beforeClosed.next(r),this._beforeClosed.complete(),this._ref.overlayRef.detachBackdrop(),this._closeFallbackTimeout=setTimeout(()=>this._finishDialogClose(),i.totalTime+100)}),this._state=Ht.CLOSING,this._containerInstance._startExitAnimation())}afterOpened(){return this._afterOpened}afterClosed(){return this._ref.closed}beforeClosed(){return this._beforeClosed}backdropClick(){return this._ref.backdropClick}keydownEvents(){return this._ref.keydownEvents}updatePosition(r){let e=this._ref.config.positionStrategy;return r&&(r.left||r.right)?r.left?e.left(r.left):e.right(r.right):e.centerHorizontally(),r&&(r.top||r.bottom)?r.top?e.top(r.top):e.bottom(r.bottom):e.centerVertically(),this._ref.updatePosition(),this}updateSize(r="",e=""){return this._ref.updateSize(r,e),this}addPanelClass(r){return this._ref.addPanelClass(r),this}removePanelClass(r){return this._ref.removePanelClass(r),this}getState(){return this._state}_finishDialogClose(){this._state=Ht.CLOSED,this._ref.close(this._result,{focusOrigin:this._closeInteractionType}),this.componentInstance=null}};function jr(t,r,e){return t._closeInteractionType=r,t.close(e)}var As=new C("MatMdcDialogData"),Ms=new C("mat-mdc-dialog-default-options"),ks=new C("mat-mdc-dialog-scroll-strategy",{providedIn:"root",factory:()=>{let t=d(he);return()=>fi(t)}}),Wi=(()=>{class t{_defaultOptions=d(Ms,{optional:!0});_scrollStrategy=d(ks);_parentDialog=d(t,{optional:!0,skipSelf:!0});_idGenerator=d(ce);_injector=d(he);_dialog=d(Lr);_animationsDisabled=Ot();_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new h;_afterOpenedAtThisLevel=new h;dialogConfigClass=zt;_dialogRefConstructor;_dialogContainerType;_dialogDataToken;get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}_getAfterAllClosed(){let e=this._parentDialog;return e?e._getAfterAllClosed():this._afterAllClosedAtThisLevel}afterAllClosed=ri(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Ze(void 0)));constructor(){this._dialogRefConstructor=yt,this._dialogContainerType=Ts,this._dialogDataToken=As}open(e,i){let o;i=T(T({},this._defaultOptions||new zt),i),i.id=i.id||this._idGenerator.getId("mat-mdc-dialog-"),i.scrollStrategy=i.scrollStrategy||this._scrollStrategy();let n=this._dialog.open(e,Y(T({},i),{positionStrategy:ui(this._injector).centerHorizontally().centerVertically(),disableClose:!0,closePredicate:void 0,closeOnDestroy:!1,closeOnOverlayDetachments:!1,disableAnimations:this._animationsDisabled||i.enterAnimationDuration?.toLocaleString()==="0"||i.exitAnimationDuration?.toString()==="0",container:{type:this._dialogContainerType,providers:()=>[{provide:this.dialogConfigClass,useValue:i},{provide:$e,useValue:i}]},templateContext:()=>({dialogRef:o}),providers:(a,s,l)=>(o=new this._dialogRefConstructor(a,i,l),o.updatePosition(i?.position),[{provide:this._dialogContainerType,useValue:l},{provide:this._dialogDataToken,useValue:s.data},{provide:this._dialogRefConstructor,useValue:o}])}));return o.componentRef=n.componentRef,o.componentInstance=n.componentInstance,this.openDialogs.push(o),this.afterOpened.next(o),o.afterClosed().subscribe(()=>{let a=this.openDialogs.indexOf(o);a>-1&&(this.openDialogs.splice(a,1),this.openDialogs.length||this._getAfterAllClosed().next())}),o}closeAll(){this._closeDialogs(this.openDialogs)}getDialogById(e){return this.openDialogs.find(i=>i.id===e)}ngOnDestroy(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}_closeDialogs(e){let i=e.length;for(;i--;)e[i].close()}static \u0275fac=function(i){return new(i||t)};static \u0275prov=x({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Sh=(()=>{class t{dialogRef=d(yt,{optional:!0});_elementRef=d(P);_dialog=d(Wi);ariaLabel;type="button";dialogResult;_matDialogClose;constructor(){}ngOnInit(){this.dialogRef||(this.dialogRef=Fs(this._elementRef,this._dialog.openDialogs))}ngOnChanges(e){let i=e._matDialogClose||e._matDialogCloseResult;i&&(this.dialogResult=i.currentValue)}_onButtonClick(e){jr(this.dialogRef,e.screenX===0&&e.screenY===0?"keyboard":"mouse",this.dialogResult)}static \u0275fac=function(i){return new(i||t)};static \u0275dir=p({type:t,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(i,o){i&1&&oe("click",function(a){return o._onButtonClick(a)}),i&2&&$("aria-label",o.ariaLabel||null)("type",o.type)},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],type:"type",dialogResult:[0,"mat-dialog-close","dialogResult"],_matDialogClose:[0,"matDialogClose","_matDialogClose"]},exportAs:["matDialogClose"],features:[pe]})}return t})(),Es=(()=>{class t{_dialogRef=d(yt,{optional:!0});_elementRef=d(P);_dialog=d(Wi);constructor(){}ngOnInit(){this._dialogRef||(this._dialogRef=Fs(this._elementRef,this._dialog.openDialogs)),this._dialogRef&&Promise.resolve().then(()=>{this._onAdd()})}ngOnDestroy(){this._dialogRef?._containerInstance&&Promise.resolve().then(()=>{this._onRemove()})}static \u0275fac=function(i){return new(i||t)};static \u0275dir=p({type:t})}return t})(),Dh=(()=>{class t extends Es{id=d(ce).getId("mat-mdc-dialog-title-");_onAdd(){this._dialogRef._containerInstance?._addAriaLabelledBy?.(this.id)}_onRemove(){this._dialogRef?._containerInstance?._removeAriaLabelledBy?.(this.id)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=ee(t)))(o||t)}})();static \u0275dir=p({type:t,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(i,o){i&2&&Fe("id",o.id)},inputs:{id:"id"},exportAs:["matDialogTitle"],features:[w]})}return t})(),wh=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275dir=p({type:t,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"],features:[Eo([Zo])]})}return t})(),Th=(()=>{class t extends Es{align;_onAdd(){this._dialogRef._containerInstance?._updateActionSectionCount?.(1)}_onRemove(){this._dialogRef._containerInstance?._updateActionSectionCount?.(-1)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=ee(t)))(o||t)}})();static \u0275dir=p({type:t,selectors:[["","mat-dialog-actions",""],["mat-dialog-actions"],["","matDialogActions",""]],hostAttrs:[1,"mat-mdc-dialog-actions","mdc-dialog__actions"],hostVars:6,hostBindings:function(i,o){i&2&&N("mat-mdc-dialog-actions-align-start",o.align==="start")("mat-mdc-dialog-actions-align-center",o.align==="center")("mat-mdc-dialog-actions-align-end",o.align==="end")},inputs:{align:"align"},features:[w]})}return t})();function Fs(t,r){let e=t.nativeElement.parentElement;for(;e&&!e.classList.contains("mat-mdc-dialog-container");)e=e.parentElement;return e?r.find(i=>i.id===e.id):null}var Ah=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=G({type:t});static \u0275inj=z({providers:[Wi],imports:[xs,mi,Rt,Se,Se]})}return t})();var $r=class{_box;_destroyed=new h;_resizeSubject=new h;_resizeObserver;_elementObservables=new Map;constructor(r){this._box=r,typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(e=>this._resizeSubject.next(e)))}observe(r){return this._elementObservables.has(r)||this._elementObservables.set(r,new Tt(e=>{let i=this._resizeSubject.subscribe(e);return this._resizeObserver?.observe(r,{box:this._box}),()=>{this._resizeObserver?.unobserve(r),i.unsubscribe(),this._elementObservables.delete(r)}}).pipe(le(e=>e.some(i=>i.target===r)),Co({bufferSize:1,refCount:!0}),ni(this._destroyed))),this._elementObservables.get(r)}destroy(){this._destroyed.next(),this._destroyed.complete(),this._resizeSubject.complete(),this._elementObservables.clear()}},Os=(()=>{class t{_cleanupErrorListener;_observers=new Map;_ngZone=d(j);constructor(){typeof ResizeObserver<"u"}ngOnDestroy(){for(let[,e]of this._observers)e.destroy();this._observers.clear(),this._cleanupErrorListener?.()}observe(e,i){let o=i?.box||"content-box";return this._observers.has(o)||this._observers.set(o,new $r(o)),this._observers.get(o).observe(e)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=x({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Mh=["notch"],kh=["matFormFieldNotchedOutline",""],Eh=["*"],Is=["iconPrefixContainer"],Rs=["textPrefixContainer"],Ps=["iconSuffixContainer"],Vs=["textSuffixContainer"],Fh=["textField"],Oh=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],Ih=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];function Rh(t,r){t&1&&Mt(0,"span",20)}function Ph(t,r){if(t&1&&(Q(0,"label",19),de(1,1),q(2,Rh,1,0,"span",20),Z()),t&2){let e=Oe(2);Je("floating",e._shouldLabelFloat())("monitorResize",e._hasOutline())("id",e._labelId),$("for",e._control.disableAutomaticLabeling?null:e._control.id),V(2),K(!e.hideRequiredMarker&&e._control.required?2:-1)}}function Vh(t,r){if(t&1&&q(0,Ph,3,5,"label",19),t&2){let e=Oe();K(e._hasFloatingLabel()?0:-1)}}function Nh(t,r){t&1&&Mt(0,"div",7)}function Lh(t,r){}function Uh(t,r){if(t&1&&Ee(0,Lh,0,0,"ng-template",13),t&2){Oe(2);let e=vr(1);Je("ngTemplateOutlet",e)}}function jh(t,r){if(t&1&&(Q(0,"div",9),q(1,Uh,1,1,null,13),Z()),t&2){let e=Oe();Je("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat()),V(),K(e._forceDisplayInfixLabel()?-1:1)}}function $h(t,r){t&1&&(Q(0,"div",10,2),de(2,2),Z())}function Bh(t,r){t&1&&(Q(0,"div",11,3),de(2,3),Z())}function Wh(t,r){}function Hh(t,r){if(t&1&&Ee(0,Wh,0,0,"ng-template",13),t&2){Oe();let e=vr(1);Je("ngTemplateOutlet",e)}}function zh(t,r){t&1&&(Q(0,"div",14,4),de(2,4),Z())}function Gh(t,r){t&1&&(Q(0,"div",15,5),de(2,5),Z())}function qh(t,r){t&1&&Mt(0,"div",16)}function Kh(t,r){t&1&&de(0,6)}function Qh(t,r){if(t&1&&(Q(0,"mat-hint",21),Vo(1),Z()),t&2){let e=Oe(2);Je("id",e._hintLabelId),V(),No(e.hintLabel)}}function Zh(t,r){if(t&1&&(q(0,Qh,2,2,"mat-hint",21),de(1,7),Mt(2,"div",22),de(3,8)),t&2){let e=Oe();K(e.hintLabel?0:-1)}}var Br=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275dir=p({type:t,selectors:[["mat-label"]]})}return t})(),Hr=new C("MatError"),Jh=(()=>{class t{id=d(ce).getId("mat-mdc-error-");constructor(){}static \u0275fac=function(i){return new(i||t)};static \u0275dir=p({type:t,selectors:[["mat-error"],["","matError",""]],hostAttrs:[1,"mat-mdc-form-field-error","mat-mdc-form-field-bottom-align"],hostVars:1,hostBindings:function(i,o){i&2&&Fe("id",o.id)},inputs:{id:"id"},features:[A([{provide:Hr,useExisting:t}])]})}return t})(),Wr=(()=>{class t{align="start";id=d(ce).getId("mat-mdc-hint-");static \u0275fac=function(i){return new(i||t)};static \u0275dir=p({type:t,selectors:[["mat-hint"]],hostAttrs:[1,"mat-mdc-form-field-hint","mat-mdc-form-field-bottom-align"],hostVars:4,hostBindings:function(i,o){i&2&&(Fe("id",o.id),$("align",null),N("mat-mdc-form-field-hint-end",o.align==="end"))},inputs:{align:"align",id:"id"}})}return t})(),Ws=new C("MatPrefix");var zr=new C("MatSuffix"),Yh=(()=>{class t{set _isTextSelector(e){this._isText=!0}_isText=!1;static \u0275fac=function(i){return new(i||t)};static \u0275dir=p({type:t,selectors:[["","matSuffix",""],["","matIconSuffix",""],["","matTextSuffix",""]],inputs:{_isTextSelector:[0,"matTextSuffix","_isTextSelector"]},features:[A([{provide:zr,useExisting:t}])]})}return t})(),Hs=new C("FloatingLabelParent"),Ns=(()=>{class t{_elementRef=d(P);get floating(){return this._floating}set floating(e){this._floating=e,this.monitorResize&&this._handleResize()}_floating=!1;get monitorResize(){return this._monitorResize}set monitorResize(e){this._monitorResize=e,this._monitorResize?this._subscribeToResize():this._resizeSubscription.unsubscribe()}_monitorResize=!1;_resizeObserver=d(Os);_ngZone=d(j);_parent=d(Hs);_resizeSubscription=new ti;constructor(){}ngOnDestroy(){this._resizeSubscription.unsubscribe()}getWidth(){return Xh(this._elementRef.nativeElement)}get element(){return this._elementRef.nativeElement}_handleResize(){setTimeout(()=>this._parent._handleLabelResized())}_subscribeToResize(){this._resizeSubscription.unsubscribe(),this._ngZone.runOutsideAngular(()=>{this._resizeSubscription=this._resizeObserver.observe(this._elementRef.nativeElement,{box:"border-box"}).subscribe(()=>this._handleResize())})}static \u0275fac=function(i){return new(i||t)};static \u0275dir=p({type:t,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(i,o){i&2&&N("mdc-floating-label--float-above",o.floating)},inputs:{floating:"floating",monitorResize:"monitorResize"}})}return t})();function Xh(t){let r=t;if(r.offsetParent!==null)return r.scrollWidth;let e=r.cloneNode(!0);e.style.setProperty("position","absolute"),e.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(e);let i=e.scrollWidth;return e.remove(),i}var Ls="mdc-line-ripple--active",Hi="mdc-line-ripple--deactivating",Us=(()=>{class t{_elementRef=d(P);_cleanupTransitionEnd;constructor(){let e=d(j),i=d(ge);e.runOutsideAngular(()=>{this._cleanupTransitionEnd=i.listen(this._elementRef.nativeElement,"transitionend",this._handleTransitionEnd)})}activate(){let e=this._elementRef.nativeElement.classList;e.remove(Hi),e.add(Ls)}deactivate(){this._elementRef.nativeElement.classList.add(Hi)}_handleTransitionEnd=e=>{let i=this._elementRef.nativeElement.classList,o=i.contains(Hi);e.propertyName==="opacity"&&o&&i.remove(Ls,Hi)};ngOnDestroy(){this._cleanupTransitionEnd()}static \u0275fac=function(i){return new(i||t)};static \u0275dir=p({type:t,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]})}return t})(),js=(()=>{class t{_elementRef=d(P);_ngZone=d(j);open=!1;_notch;ngAfterViewInit(){let e=this._elementRef.nativeElement,i=e.querySelector(".mdc-floating-label");i?(e.classList.add("mdc-notched-outline--upgraded"),typeof requestAnimationFrame=="function"&&(i.style.transitionDuration="0s",this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>i.style.transitionDuration="")}))):e.classList.add("mdc-notched-outline--no-label")}_setNotchWidth(e){let i=this._notch.nativeElement;!this.open||!e?i.style.width="":i.style.width=`calc(${e}px * var(--mat-mdc-form-field-floating-label-scale, 0.75) + 9px)`}_setMaxWidth(e){this._notch.nativeElement.style.setProperty("--mat-form-field-notch-max-width",`calc(100% - ${e}px)`)}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=xe({type:t,selectors:[["div","matFormFieldNotchedOutline",""]],viewQuery:function(i,o){if(i&1&&ne(Mh,5),i&2){let n;O(n=I())&&(o._notch=n.first)}},hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(i,o){i&2&&N("mdc-notched-outline--notched",o.open)},inputs:{open:[0,"matFormFieldNotchedOutlineOpen","open"]},attrs:kh,ngContentSelectors:Eh,decls:5,vars:0,consts:[["notch",""],[1,"mat-mdc-notch-piece","mdc-notched-outline__leading"],[1,"mat-mdc-notch-piece","mdc-notched-outline__notch"],[1,"mat-mdc-notch-piece","mdc-notched-outline__trailing"]],template:function(i,o){i&1&&(gr(),pr(0,"div",1),Oo(1,"div",2,0),de(3),Io(),pr(4,"div",3))},encapsulation:2,changeDetection:0})}return t})(),zi=(()=>{class t{value;stateChanges;id;placeholder;ngControl;focused;empty;shouldLabelFloat;required;disabled;errorState;controlType;autofilled;userAriaDescribedBy;disableAutomaticLabeling;describedByIds;static \u0275fac=function(i){return new(i||t)};static \u0275dir=p({type:t})}return t})();var Gi=new C("MatFormField"),zs=new C("MAT_FORM_FIELD_DEFAULT_OPTIONS"),$s="fill",ep="auto",Bs="fixed",tp="translateY(-50%)",Gr=(()=>{class t{_elementRef=d(P);_changeDetectorRef=d(Xe);_platform=d(Ie);_idGenerator=d(ce);_ngZone=d(j);_defaults=d(zs,{optional:!0});_currentDirection;_textField;_iconPrefixContainer;_textPrefixContainer;_iconSuffixContainer;_textSuffixContainer;_floatingLabel;_notchedOutline;_lineRipple;_iconPrefixContainerSignal=Et("iconPrefixContainer");_textPrefixContainerSignal=Et("textPrefixContainer");_iconSuffixContainerSignal=Et("iconSuffixContainer");_textSuffixContainerSignal=Et("textSuffixContainer");_prefixSuffixContainers=_e(()=>[this._iconPrefixContainerSignal(),this._textPrefixContainerSignal(),this._iconSuffixContainerSignal(),this._textSuffixContainerSignal()].map(e=>e?.nativeElement).filter(e=>e!==void 0));_formFieldControl;_prefixChildren;_suffixChildren;_errorChildren;_hintChildren;_labelChild=Uo(Br);get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(e){this._hideRequiredMarker=it(e)}_hideRequiredMarker=!1;color="primary";get floatLabel(){return this._floatLabel||this._defaults?.floatLabel||ep}set floatLabel(e){e!==this._floatLabel&&(this._floatLabel=e,this._changeDetectorRef.markForCheck())}_floatLabel;get appearance(){return this._appearanceSignal()}set appearance(e){let i=e||this._defaults?.appearance||$s;this._appearanceSignal.set(i)}_appearanceSignal=re($s);get subscriptSizing(){return this._subscriptSizing||this._defaults?.subscriptSizing||Bs}set subscriptSizing(e){this._subscriptSizing=e||this._defaults?.subscriptSizing||Bs}_subscriptSizing=null;get hintLabel(){return this._hintLabel}set hintLabel(e){this._hintLabel=e,this._processHints()}_hintLabel="";_hasIconPrefix=!1;_hasTextPrefix=!1;_hasIconSuffix=!1;_hasTextSuffix=!1;_labelId=this._idGenerator.getId("mat-mdc-form-field-label-");_hintLabelId=this._idGenerator.getId("mat-mdc-hint-");_describedByIds;get _control(){return this._explicitFormFieldControl||this._formFieldControl}set _control(e){this._explicitFormFieldControl=e}_destroyed=new h;_isFocused=null;_explicitFormFieldControl;_previousControl=null;_previousControlValidatorFn=null;_stateChanges;_valueChanges;_describedByChanges;_outlineLabelOffsetResizeObserver=null;_animationsDisabled=Ot();constructor(){let e=this._defaults,i=d(Ft);e&&(e.appearance&&(this.appearance=e.appearance),this._hideRequiredMarker=!!e?.hideRequiredMarker,e.color&&(this.color=e.color)),si(()=>this._currentDirection=i.valueSignal()),this._syncOutlineLabelOffset()}ngAfterViewInit(){this._updateFocusState(),this._animationsDisabled||this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{this._elementRef.nativeElement.classList.add("mat-form-field-animations-enabled")},300)}),this._changeDetectorRef.detectChanges()}ngAfterContentInit(){this._assertFormFieldControl(),this._initializeSubscript(),this._initializePrefixAndSuffix()}ngAfterContentChecked(){this._assertFormFieldControl(),this._control!==this._previousControl&&(this._initializeControl(this._previousControl),this._control.ngControl&&this._control.ngControl.control&&(this._previousControlValidatorFn=this._control.ngControl.control.validator),this._previousControl=this._control),this._control.ngControl&&this._control.ngControl.control&&this._control.ngControl.control.validator!==this._previousControlValidatorFn&&this._changeDetectorRef.markForCheck()}ngOnDestroy(){this._outlineLabelOffsetResizeObserver?.disconnect(),this._stateChanges?.unsubscribe(),this._valueChanges?.unsubscribe(),this._describedByChanges?.unsubscribe(),this._destroyed.next(),this._destroyed.complete()}getLabelId=_e(()=>this._hasFloatingLabel()?this._labelId:null);getConnectedOverlayOrigin(){return this._textField||this._elementRef}_animateAndLockLabel(){this._hasFloatingLabel()&&(this.floatLabel="always")}_initializeControl(e){let i=this._control,o="mat-mdc-form-field-type-";e&&this._elementRef.nativeElement.classList.remove(o+e.controlType),i.controlType&&this._elementRef.nativeElement.classList.add(o+i.controlType),this._stateChanges?.unsubscribe(),this._stateChanges=i.stateChanges.subscribe(()=>{this._updateFocusState(),this._changeDetectorRef.markForCheck()}),this._describedByChanges?.unsubscribe(),this._describedByChanges=i.stateChanges.pipe(Ze([void 0,void 0]),ke(()=>[i.errorState,i.userAriaDescribedBy]),xo(),le(([[n,a],[s,l]])=>n!==s||a!==l)).subscribe(()=>this._syncDescribedByIds()),this._valueChanges?.unsubscribe(),i.ngControl&&i.ngControl.valueChanges&&(this._valueChanges=i.ngControl.valueChanges.pipe(ni(this._destroyed)).subscribe(()=>this._changeDetectorRef.markForCheck()))}_checkPrefixAndSuffixTypes(){this._hasIconPrefix=!!this._prefixChildren.find(e=>!e._isText),this._hasTextPrefix=!!this._prefixChildren.find(e=>e._isText),this._hasIconSuffix=!!this._suffixChildren.find(e=>!e._isText),this._hasTextSuffix=!!this._suffixChildren.find(e=>e._isText)}_initializePrefixAndSuffix(){this._checkPrefixAndSuffixTypes(),oi(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(()=>{this._checkPrefixAndSuffixTypes(),this._changeDetectorRef.markForCheck()})}_initializeSubscript(){this._hintChildren.changes.subscribe(()=>{this._processHints(),this._changeDetectorRef.markForCheck()}),this._errorChildren.changes.subscribe(()=>{this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),this._validateHints(),this._syncDescribedByIds()}_assertFormFieldControl(){this._control}_updateFocusState(){let e=this._control.focused;e&&!this._isFocused?(this._isFocused=!0,this._lineRipple?.activate()):!e&&(this._isFocused||this._isFocused===null)&&(this._isFocused=!1,this._lineRipple?.deactivate()),this._elementRef.nativeElement.classList.toggle("mat-focused",e),this._textField?.nativeElement.classList.toggle("mdc-text-field--focused",e)}_syncOutlineLabelOffset(){jo({earlyRead:()=>{if(this._appearanceSignal()!=="outline")return this._outlineLabelOffsetResizeObserver?.disconnect(),null;if(globalThis.ResizeObserver){this._outlineLabelOffsetResizeObserver||=new globalThis.ResizeObserver(()=>{this._writeOutlinedLabelStyles(this._getOutlinedLabelOffset())});for(let e of this._prefixSuffixContainers())this._outlineLabelOffsetResizeObserver.observe(e,{box:"border-box"})}return this._getOutlinedLabelOffset()},write:e=>this._writeOutlinedLabelStyles(e())})}_shouldAlwaysFloat(){return this.floatLabel==="always"}_hasOutline(){return this.appearance==="outline"}_forceDisplayInfixLabel(){return!this._platform.isBrowser&&this._prefixChildren.length&&!this._shouldLabelFloat()}_hasFloatingLabel=_e(()=>!!this._labelChild());_shouldLabelFloat(){return this._hasFloatingLabel()?this._control.shouldLabelFloat||this._shouldAlwaysFloat():!1}_shouldForward(e){let i=this._control?this._control.ngControl:null;return i&&i[e]}_getSubscriptMessageType(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_handleLabelResized(){this._refreshOutlineNotchWidth()}_refreshOutlineNotchWidth(){!this._hasOutline()||!this._floatingLabel||!this._shouldLabelFloat()?this._notchedOutline?._setNotchWidth(0):this._notchedOutline?._setNotchWidth(this._floatingLabel.getWidth())}_processHints(){this._validateHints(),this._syncDescribedByIds()}_validateHints(){this._hintChildren}_syncDescribedByIds(){if(this._control){let e=[];if(this._control.userAriaDescribedBy&&typeof this._control.userAriaDescribedBy=="string"&&e.push(...this._control.userAriaDescribedBy.split(" ")),this._getSubscriptMessageType()==="hint"){let n=this._hintChildren?this._hintChildren.find(s=>s.align==="start"):null,a=this._hintChildren?this._hintChildren.find(s=>s.align==="end"):null;n?e.push(n.id):this._hintLabel&&e.push(this._hintLabelId),a&&e.push(a.id)}else this._errorChildren&&e.push(...this._errorChildren.map(n=>n.id));let i=this._control.describedByIds,o;if(i){let n=this._describedByIds||e;o=e.concat(i.filter(a=>a&&!n.includes(a)))}else o=e;this._control.setDescribedByIds(o),this._describedByIds=e}}_getOutlinedLabelOffset(){if(!this._hasOutline()||!this._floatingLabel)return null;if(!this._iconPrefixContainer&&!this._textPrefixContainer)return["",null];if(!this._isAttachedToDom())return null;let e=this._iconPrefixContainer?.nativeElement,i=this._textPrefixContainer?.nativeElement,o=this._iconSuffixContainer?.nativeElement,n=this._textSuffixContainer?.nativeElement,a=e?.getBoundingClientRect().width??0,s=i?.getBoundingClientRect().width??0,l=o?.getBoundingClientRect().width??0,c=n?.getBoundingClientRect().width??0,_=this._currentDirection==="rtl"?"-1":"1",m=`${a+s}px`,b=`calc(${_} * (${m} + var(--mat-mdc-form-field-label-offset-x, 0px)))`,v=`var(--mat-mdc-form-field-label-transform, ${tp} translateX(${b}))`,E=a+s+l+c;return[v,E]}_writeOutlinedLabelStyles(e){if(e!==null){let[i,o]=e;this._floatingLabel&&(this._floatingLabel.element.style.transform=i),o!==null&&this._notchedOutline?._setMaxWidth(o)}}_isAttachedToDom(){let e=this._elementRef.nativeElement;if(e.getRootNode){let i=e.getRootNode();return i&&i!==e}return document.documentElement.contains(e)}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=xe({type:t,selectors:[["mat-form-field"]],contentQueries:function(i,o,n){if(i&1&&(Po(n,o._labelChild,Br,5),Ye(n,zi,5),Ye(n,Ws,5),Ye(n,zr,5),Ye(n,Hr,5),Ye(n,Wr,5)),i&2){_r();let a;O(a=I())&&(o._formFieldControl=a.first),O(a=I())&&(o._prefixChildren=a),O(a=I())&&(o._suffixChildren=a),O(a=I())&&(o._errorChildren=a),O(a=I())&&(o._hintChildren=a)}},viewQuery:function(i,o){if(i&1&&(kt(o._iconPrefixContainerSignal,Is,5),kt(o._textPrefixContainerSignal,Rs,5),kt(o._iconSuffixContainerSignal,Ps,5),kt(o._textSuffixContainerSignal,Vs,5),ne(Fh,5),ne(Is,5),ne(Rs,5),ne(Ps,5),ne(Vs,5),ne(Ns,5),ne(js,5),ne(Us,5)),i&2){_r(4);let n;O(n=I())&&(o._textField=n.first),O(n=I())&&(o._iconPrefixContainer=n.first),O(n=I())&&(o._textPrefixContainer=n.first),O(n=I())&&(o._iconSuffixContainer=n.first),O(n=I())&&(o._textSuffixContainer=n.first),O(n=I())&&(o._floatingLabel=n.first),O(n=I())&&(o._notchedOutline=n.first),O(n=I())&&(o._lineRipple=n.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:38,hostBindings:function(i,o){i&2&&N("mat-mdc-form-field-label-always-float",o._shouldAlwaysFloat())("mat-mdc-form-field-has-icon-prefix",o._hasIconPrefix)("mat-mdc-form-field-has-icon-suffix",o._hasIconSuffix)("mat-form-field-invalid",o._control.errorState)("mat-form-field-disabled",o._control.disabled)("mat-form-field-autofilled",o._control.autofilled)("mat-form-field-appearance-fill",o.appearance=="fill")("mat-form-field-appearance-outline",o.appearance=="outline")("mat-form-field-hide-placeholder",o._hasFloatingLabel()&&!o._shouldLabelFloat())("mat-primary",o.color!=="accent"&&o.color!=="warn")("mat-accent",o.color==="accent")("mat-warn",o.color==="warn")("ng-untouched",o._shouldForward("untouched"))("ng-touched",o._shouldForward("touched"))("ng-pristine",o._shouldForward("pristine"))("ng-dirty",o._shouldForward("dirty"))("ng-valid",o._shouldForward("valid"))("ng-invalid",o._shouldForward("invalid"))("ng-pending",o._shouldForward("pending"))},inputs:{hideRequiredMarker:"hideRequiredMarker",color:"color",floatLabel:"floatLabel",appearance:"appearance",subscriptSizing:"subscriptSizing",hintLabel:"hintLabel"},exportAs:["matFormField"],features:[A([{provide:Gi,useExisting:t},{provide:Hs,useExisting:t}])],ngContentSelectors:Ih,decls:19,vars:25,consts:[["labelTemplate",""],["textField",""],["iconPrefixContainer",""],["textPrefixContainer",""],["textSuffixContainer",""],["iconSuffixContainer",""],[1,"mat-mdc-text-field-wrapper","mdc-text-field",3,"click"],[1,"mat-mdc-form-field-focus-overlay"],[1,"mat-mdc-form-field-flex"],["matFormFieldNotchedOutline","",3,"matFormFieldNotchedOutlineOpen"],[1,"mat-mdc-form-field-icon-prefix"],[1,"mat-mdc-form-field-text-prefix"],[1,"mat-mdc-form-field-infix"],[3,"ngTemplateOutlet"],[1,"mat-mdc-form-field-text-suffix"],[1,"mat-mdc-form-field-icon-suffix"],["matFormFieldLineRipple",""],[1,"mat-mdc-form-field-subscript-wrapper","mat-mdc-form-field-bottom-align"],["aria-atomic","true","aria-live","polite"],["matFormFieldFloatingLabel","",3,"floating","monitorResize","id"],["aria-hidden","true",1,"mat-mdc-form-field-required-marker","mdc-floating-label--required"],[3,"id"],[1,"mat-mdc-form-field-hint-spacer"]],template:function(i,o){if(i&1){let n=Ro();gr(Oh),Ee(0,Vh,1,1,"ng-template",null,0,Lo),Q(2,"div",6,1),oe("click",function(s){return wo(n),To(o._control.onContainerClick(s))}),q(4,Nh,1,0,"div",7),Q(5,"div",8),q(6,jh,2,2,"div",9),q(7,$h,3,0,"div",10),q(8,Bh,3,0,"div",11),Q(9,"div",12),q(10,Hh,1,1,null,13),de(11),Z(),q(12,zh,3,0,"div",14),q(13,Gh,3,0,"div",15),Z(),q(14,qh,1,0,"div",16),Z(),Q(15,"div",17)(16,"div",18),q(17,Kh,1,0)(18,Zh,4,1),Z()()}if(i&2){let n;V(2),N("mdc-text-field--filled",!o._hasOutline())("mdc-text-field--outlined",o._hasOutline())("mdc-text-field--no-label",!o._hasFloatingLabel())("mdc-text-field--disabled",o._control.disabled)("mdc-text-field--invalid",o._control.errorState),V(2),K(!o._hasOutline()&&!o._control.disabled?4:-1),V(2),K(o._hasOutline()?6:-1),V(),K(o._hasIconPrefix?7:-1),V(),K(o._hasTextPrefix?8:-1),V(2),K(!o._hasOutline()||o._forceDisplayInfixLabel()?10:-1),V(2),K(o._hasTextSuffix?12:-1),V(),K(o._hasIconSuffix?13:-1),V(),K(o._hasOutline()?-1:14),V(),N("mat-mdc-form-field-subscript-dynamic-size",o.subscriptSizing==="dynamic");let a=o._getSubscriptMessageType();V(),N("mat-mdc-form-field-error-wrapper",a==="error")("mat-mdc-form-field-hint-wrapper",a==="hint"),V(),K((n=a)==="error"?17:n==="hint"?18:-1)}},dependencies:[Ns,js,$o,Us,Wr],styles:[`.mdc-text-field{display:inline-flex;align-items:baseline;padding:0 16px;position:relative;box-sizing:border-box;overflow:hidden;will-change:opacity,transform,color;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.mdc-text-field__input{width:100%;min-width:0;border:none;border-radius:0;background:none;padding:0;-moz-appearance:none;-webkit-appearance:none;height:28px}.mdc-text-field__input::-webkit-calendar-picker-indicator,.mdc-text-field__input::-webkit-search-cancel-button{display:none}.mdc-text-field__input::-ms-clear{display:none}.mdc-text-field__input:focus{outline:none}.mdc-text-field__input:invalid{box-shadow:none}.mdc-text-field__input::placeholder{opacity:0}.mdc-text-field__input::-moz-placeholder{opacity:0}.mdc-text-field__input::-webkit-input-placeholder{opacity:0}.mdc-text-field__input:-ms-input-placeholder{opacity:0}.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mdc-text-field--focused .mdc-text-field__input::placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input::-moz-placeholder,.mdc-text-field--focused .mdc-text-field__input::-moz-placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input::-webkit-input-placeholder,.mdc-text-field--focused .mdc-text-field__input::-webkit-input-placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{opacity:1}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive::placeholder{opacity:0}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive::-moz-placeholder{opacity:0}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive::-webkit-input-placeholder{opacity:0}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive:-ms-input-placeholder{opacity:0}.mdc-text-field--outlined .mdc-text-field__input,.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{height:100%}.mdc-text-field--outlined .mdc-text-field__input{display:flex;border:none !important;background-color:rgba(0,0,0,0)}.mdc-text-field--disabled .mdc-text-field__input{pointer-events:auto}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input{color:var(--mat-form-field-filled-input-text-color, var(--mat-sys-on-surface));caret-color:var(--mat-form-field-filled-caret-color, var(--mat-sys-primary))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:var(--mat-form-field-filled-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::-moz-placeholder{color:var(--mat-form-field-filled-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::-webkit-input-placeholder{color:var(--mat-form-field-filled-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:var(--mat-form-field-filled-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input{color:var(--mat-form-field-outlined-input-text-color, var(--mat-sys-on-surface));caret-color:var(--mat-form-field-outlined-caret-color, var(--mat-sys-primary))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:var(--mat-form-field-outlined-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::-moz-placeholder{color:var(--mat-form-field-outlined-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::-webkit-input-placeholder{color:var(--mat-form-field-outlined-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:var(--mat-form-field-outlined-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mat-form-field-filled-error-caret-color, var(--mat-sys-error))}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mat-form-field-outlined-error-caret-color, var(--mat-sys-error))}.mdc-text-field--filled.mdc-text-field--disabled .mdc-text-field__input{color:var(--mat-form-field-filled-disabled-input-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-text-field__input{color:var(--mat-form-field-outlined-disabled-input-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}@media(forced-colors: active){.mdc-text-field--disabled .mdc-text-field__input{background-color:Window}}.mdc-text-field--filled{height:56px;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:var(--mat-form-field-filled-container-shape, var(--mat-sys-corner-extra-small));border-top-right-radius:var(--mat-form-field-filled-container-shape, var(--mat-sys-corner-extra-small))}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:var(--mat-form-field-filled-container-color, var(--mat-sys-surface-variant))}.mdc-text-field--filled.mdc-text-field--disabled{background-color:var(--mat-form-field-filled-disabled-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 4%, transparent))}.mdc-text-field--outlined{height:56px;overflow:visible;padding-right:max(16px,var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small)));padding-left:max(16px,var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small)) + 4px)}[dir=rtl] .mdc-text-field--outlined{padding-right:max(16px,var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small)) + 4px);padding-left:max(16px,var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small)))}.mdc-floating-label{position:absolute;left:0;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform}[dir=rtl] .mdc-floating-label{right:0;left:auto;transform-origin:right top;text-align:right}.mdc-text-field .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-text-field--outlined .mdc-floating-label{left:4px;right:auto}[dir=rtl] .mdc-text-field--outlined .mdc-floating-label{left:auto;right:4px}.mdc-text-field--filled .mdc-floating-label{left:16px;right:auto}[dir=rtl] .mdc-text-field--filled .mdc-floating-label{left:auto;right:16px}.mdc-text-field--disabled .mdc-floating-label{cursor:default}@media(forced-colors: active){.mdc-text-field--disabled .mdc-floating-label{z-index:1}}.mdc-text-field--filled.mdc-text-field--no-label .mdc-floating-label{display:none}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-floating-label{color:var(--mat-form-field-filled-label-text-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label{color:var(--mat-form-field-filled-focus-label-text-color, var(--mat-sys-primary))}.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label{color:var(--mat-form-field-filled-hover-label-text-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled.mdc-text-field--disabled .mdc-floating-label{color:var(--mat-form-field-filled-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-floating-label{color:var(--mat-form-field-filled-error-label-text-color, var(--mat-sys-error))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mdc-floating-label{color:var(--mat-form-field-filled-error-focus-label-text-color, var(--mat-sys-error))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-floating-label{color:var(--mat-form-field-filled-error-hover-label-text-color, var(--mat-sys-on-error-container))}.mdc-text-field--filled .mdc-floating-label{font-family:var(--mat-form-field-filled-label-text-font, var(--mat-sys-body-large-font));font-size:var(--mat-form-field-filled-label-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-form-field-filled-label-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mat-form-field-filled-label-text-tracking, var(--mat-sys-body-large-tracking))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-floating-label{color:var(--mat-form-field-outlined-label-text-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label{color:var(--mat-form-field-outlined-focus-label-text-color, var(--mat-sys-primary))}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label{color:var(--mat-form-field-outlined-hover-label-text-color, var(--mat-sys-on-surface))}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-floating-label{color:var(--mat-form-field-outlined-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-floating-label{color:var(--mat-form-field-outlined-error-label-text-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mdc-floating-label{color:var(--mat-form-field-outlined-error-focus-label-text-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-floating-label{color:var(--mat-form-field-outlined-error-hover-label-text-color, var(--mat-sys-on-error-container))}.mdc-text-field--outlined .mdc-floating-label{font-family:var(--mat-form-field-outlined-label-text-font, var(--mat-sys-body-large-font));font-size:var(--mat-form-field-outlined-label-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-form-field-outlined-label-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mat-form-field-outlined-label-text-tracking, var(--mat-sys-body-large-tracking))}.mdc-floating-label--float-above{cursor:auto;transform:translateY(-106%) scale(0.75)}.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1);font-size:.75rem}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:133.3333333333%}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after{margin-left:1px;margin-right:0;content:"*"}[dir=rtl] .mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after{margin-left:0;margin-right:1px}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline{text-align:right}.mdc-text-field--outlined .mdc-notched-outline{z-index:1}.mat-mdc-notch-piece{box-sizing:border-box;height:100%;pointer-events:none;border-top:1px solid;border-bottom:1px solid}.mdc-text-field--focused .mat-mdc-notch-piece{border-width:2px}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mat-mdc-notch-piece{border-color:var(--mat-form-field-outlined-outline-color, var(--mat-sys-outline));border-width:var(--mat-form-field-outlined-outline-width, 1px)}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mat-mdc-notch-piece{border-color:var(--mat-form-field-outlined-hover-outline-color, var(--mat-sys-on-surface))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mat-mdc-notch-piece{border-color:var(--mat-form-field-outlined-focus-outline-color, var(--mat-sys-primary))}.mdc-text-field--outlined.mdc-text-field--disabled .mat-mdc-notch-piece{border-color:var(--mat-form-field-outlined-disabled-outline-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid .mat-mdc-notch-piece{border-color:var(--mat-form-field-outlined-error-outline-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--focused):hover .mdc-notched-outline .mat-mdc-notch-piece{border-color:var(--mat-form-field-outlined-error-hover-outline-color, var(--mat-sys-on-error-container))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mat-mdc-notch-piece{border-color:var(--mat-form-field-outlined-error-focus-outline-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline .mat-mdc-notch-piece{border-width:var(--mat-form-field-outlined-focus-outline-width, 2px)}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;border-top-right-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small));border-bottom-left-radius:var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small))}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px,var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small)))}[dir=rtl] .mdc-notched-outline__leading{border-left:none;border-right:1px solid;border-bottom-left-radius:0;border-top-left-radius:0;border-top-right-radius:var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small));border-bottom-right-radius:var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small))}.mdc-notched-outline__trailing{flex-grow:1;border-left:none;border-right:1px solid;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small));border-bottom-right-radius:var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small))}[dir=rtl] .mdc-notched-outline__trailing{border-left:1px solid;border-right:none;border-top-right-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small));border-bottom-left-radius:var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small))}.mdc-notched-outline__notch{flex:0 0 auto;width:auto}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:min(var(--mat-form-field-notch-max-width, 100%),calc(100% - max(12px, var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small))) * 2))}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{max-width:min(100%,calc(100% - max(12px, var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small))) * 2))}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-text-field--focused.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{z-index:1;border-bottom-width:var(--mat-form-field-filled-active-indicator-height, 1px)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:var(--mat-form-field-filled-active-indicator-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-line-ripple::before{border-bottom-color:var(--mat-form-field-filled-hover-active-indicator-color, var(--mat-sys-on-surface))}.mdc-text-field--filled.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:var(--mat-form-field-filled-disabled-active-indicator-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-line-ripple::before{border-bottom-color:var(--mat-form-field-filled-error-active-indicator-color, var(--mat-sys-error))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--focused):hover .mdc-line-ripple::before{border-bottom-color:var(--mat-form-field-filled-error-hover-active-indicator-color, var(--mat-sys-on-error-container))}.mdc-line-ripple::after{transform:scaleX(0);opacity:0;z-index:2}.mdc-text-field--filled .mdc-line-ripple::after{border-bottom-width:var(--mat-form-field-filled-focus-active-indicator-height, 2px)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:var(--mat-form-field-filled-focus-active-indicator-color, var(--mat-sys-primary))}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:var(--mat-form-field-filled-error-focus-active-indicator-color, var(--mat-sys-error))}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mdc-text-field--disabled{pointer-events:none}.mat-mdc-form-field-textarea-control{vertical-align:middle;resize:vertical;box-sizing:border-box;height:auto;margin:0;padding:0;border:none;overflow:auto}.mat-mdc-form-field-input-control.mat-mdc-form-field-input-control{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font:inherit;letter-spacing:inherit;text-decoration:inherit;text-transform:inherit;border:none}.mat-mdc-form-field .mat-mdc-floating-label.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;line-height:normal;pointer-events:all;will-change:auto}.mat-mdc-form-field:not(.mat-form-field-disabled) .mat-mdc-floating-label.mdc-floating-label{cursor:inherit}.mdc-text-field--no-label:not(.mdc-text-field--textarea) .mat-mdc-form-field-input-control.mdc-text-field__input,.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control{height:auto}.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control.mdc-text-field__input[type=color]{height:23px}.mat-mdc-text-field-wrapper{height:auto;flex:auto;will-change:auto}.mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-left:0;--mat-mdc-form-field-label-offset-x: -16px}.mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-right:0}[dir=rtl] .mat-mdc-text-field-wrapper{padding-left:16px;padding-right:16px}[dir=rtl] .mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-left:0}[dir=rtl] .mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-right:0}.mat-form-field-disabled .mdc-text-field__input::placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-disabled .mdc-text-field__input::-moz-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-disabled .mdc-text-field__input::-webkit-input-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-disabled .mdc-text-field__input:-ms-input-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-form-field-label-always-float .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}.mat-mdc-text-field-wrapper .mat-mdc-form-field-infix .mat-mdc-floating-label{left:auto;right:auto}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-text-field__input{display:inline-block}.mat-mdc-form-field .mat-mdc-text-field-wrapper.mdc-text-field .mdc-notched-outline__notch{padding-top:0}.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch{border-left:1px solid rgba(0,0,0,0)}[dir=rtl] .mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch{border-left:none;border-right:1px solid rgba(0,0,0,0)}.mat-mdc-form-field-infix{min-height:var(--mat-form-field-container-height, 56px);padding-top:var(--mat-form-field-filled-with-label-container-padding-top, 24px);padding-bottom:var(--mat-form-field-filled-with-label-container-padding-bottom, 8px)}.mdc-text-field--outlined .mat-mdc-form-field-infix,.mdc-text-field--no-label .mat-mdc-form-field-infix{padding-top:var(--mat-form-field-container-vertical-padding, 16px);padding-bottom:var(--mat-form-field-container-vertical-padding, 16px)}.mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:calc(var(--mat-form-field-container-height, 56px)/2)}.mdc-text-field--filled .mat-mdc-floating-label{display:var(--mat-form-field-filled-label-display, block)}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{--mat-mdc-form-field-label-transform: translateY(calc(calc(6.75px + var(--mat-form-field-container-height, 56px) / 2) * -1)) scale(var(--mat-mdc-form-field-floating-label-scale, 0.75));transform:var(--mat-mdc-form-field-label-transform)}@keyframes _mat-form-field-subscript-animation{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}.mat-mdc-form-field-subscript-wrapper{box-sizing:border-box;width:100%;position:relative}.mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-error-wrapper{position:absolute;top:0;left:0;right:0;padding:0 16px;opacity:1;transform:translateY(0);animation:_mat-form-field-subscript-animation 0ms cubic-bezier(0.55, 0, 0.55, 0.2)}.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-error-wrapper{position:static}.mat-mdc-form-field-bottom-align::before{content:"";display:inline-block;height:16px}.mat-mdc-form-field-bottom-align.mat-mdc-form-field-subscript-dynamic-size::before{content:unset}.mat-mdc-form-field-hint-end{order:1}.mat-mdc-form-field-hint-wrapper{display:flex}.mat-mdc-form-field-hint-spacer{flex:1 0 1em}.mat-mdc-form-field-error{display:block;color:var(--mat-form-field-error-text-color, var(--mat-sys-error))}.mat-mdc-form-field-subscript-wrapper,.mat-mdc-form-field-bottom-align::before{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-form-field-subscript-text-font, var(--mat-sys-body-small-font));line-height:var(--mat-form-field-subscript-text-line-height, var(--mat-sys-body-small-line-height));font-size:var(--mat-form-field-subscript-text-size, var(--mat-sys-body-small-size));letter-spacing:var(--mat-form-field-subscript-text-tracking, var(--mat-sys-body-small-tracking));font-weight:var(--mat-form-field-subscript-text-weight, var(--mat-sys-body-small-weight))}.mat-mdc-form-field-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;opacity:0;pointer-events:none;background-color:var(--mat-form-field-state-layer-color, var(--mat-sys-on-surface))}.mat-mdc-text-field-wrapper:hover .mat-mdc-form-field-focus-overlay{opacity:var(--mat-form-field-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-form-field.mat-focused .mat-mdc-form-field-focus-overlay{opacity:var(--mat-form-field-focus-state-layer-opacity, 0)}select.mat-mdc-form-field-input-control{-moz-appearance:none;-webkit-appearance:none;background-color:rgba(0,0,0,0);display:inline-flex;box-sizing:border-box}select.mat-mdc-form-field-input-control:not(:disabled){cursor:pointer}select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) option{color:var(--mat-form-field-select-option-text-color, var(--mat-sys-neutral10))}select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) option:disabled{color:var(--mat-form-field-select-disabled-option-text-color, color-mix(in srgb, var(--mat-sys-neutral10) 38%, transparent))}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{content:"";width:0;height:0;border-left:5px solid rgba(0,0,0,0);border-right:5px solid rgba(0,0,0,0);border-top:5px solid;position:absolute;right:0;top:50%;margin-top:-2.5px;pointer-events:none;color:var(--mat-form-field-enabled-select-arrow-color, var(--mat-sys-on-surface-variant))}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{right:auto;left:0}.mat-mdc-form-field-type-mat-native-select.mat-focused .mat-mdc-form-field-infix::after{color:var(--mat-form-field-focus-select-arrow-color, var(--mat-sys-primary))}.mat-mdc-form-field-type-mat-native-select.mat-form-field-disabled .mat-mdc-form-field-infix::after{color:var(--mat-form-field-disabled-select-arrow-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:15px}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:0;padding-left:15px}@media(forced-colors: active){.mat-form-field-appearance-fill .mat-mdc-text-field-wrapper{outline:solid 1px}}@media(forced-colors: active){.mat-form-field-appearance-fill.mat-form-field-disabled .mat-mdc-text-field-wrapper{outline-color:GrayText}}@media(forced-colors: active){.mat-form-field-appearance-fill.mat-focused .mat-mdc-text-field-wrapper{outline:dashed 3px}}@media(forced-colors: active){.mat-mdc-form-field.mat-focused .mdc-notched-outline{border:dashed 3px}}.mat-mdc-form-field-input-control[type=date],.mat-mdc-form-field-input-control[type=datetime],.mat-mdc-form-field-input-control[type=datetime-local],.mat-mdc-form-field-input-control[type=month],.mat-mdc-form-field-input-control[type=week],.mat-mdc-form-field-input-control[type=time]{line-height:1}.mat-mdc-form-field-input-control::-webkit-datetime-edit{line-height:1;padding:0;margin-bottom:-2px}.mat-mdc-form-field{--mat-mdc-form-field-floating-label-scale: 0.75;display:inline-flex;flex-direction:column;min-width:0;text-align:left;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-form-field-container-text-font, var(--mat-sys-body-large-font));line-height:var(--mat-form-field-container-text-line-height, var(--mat-sys-body-large-line-height));font-size:var(--mat-form-field-container-text-size, var(--mat-sys-body-large-size));letter-spacing:var(--mat-form-field-container-text-tracking, var(--mat-sys-body-large-tracking));font-weight:var(--mat-form-field-container-text-weight, var(--mat-sys-body-large-weight))}.mat-mdc-form-field .mdc-text-field--outlined .mdc-floating-label--float-above{font-size:calc(var(--mat-form-field-outlined-label-text-populated-size)*var(--mat-mdc-form-field-floating-label-scale))}.mat-mdc-form-field .mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:var(--mat-form-field-outlined-label-text-populated-size)}[dir=rtl] .mat-mdc-form-field{text-align:right}.mat-mdc-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-mdc-text-field-wrapper{width:100%;z-index:0}.mat-mdc-form-field-icon-prefix,.mat-mdc-form-field-icon-suffix{align-self:center;line-height:0;pointer-events:auto;position:relative;z-index:1}.mat-mdc-form-field-icon-prefix>.mat-icon,.mat-mdc-form-field-icon-suffix>.mat-icon{padding:0 12px;box-sizing:content-box}.mat-mdc-form-field-icon-prefix{color:var(--mat-form-field-leading-icon-color, var(--mat-sys-on-surface-variant))}.mat-form-field-disabled .mat-mdc-form-field-icon-prefix{color:var(--mat-form-field-disabled-leading-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-trailing-icon-color, var(--mat-sys-on-surface-variant))}.mat-form-field-disabled .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-disabled-trailing-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-invalid .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-trailing-icon-color, var(--mat-sys-error))}.mat-form-field-invalid:not(.mat-focused):not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper:hover .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-hover-trailing-icon-color, var(--mat-sys-on-error-container))}.mat-form-field-invalid.mat-focused .mat-mdc-text-field-wrapper .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-focus-trailing-icon-color, var(--mat-sys-error))}.mat-mdc-form-field-icon-prefix,[dir=rtl] .mat-mdc-form-field-icon-suffix{padding:0 4px 0 0}.mat-mdc-form-field-icon-suffix,[dir=rtl] .mat-mdc-form-field-icon-prefix{padding:0 0 0 4px}.mat-mdc-form-field-subscript-wrapper .mat-icon,.mat-mdc-form-field label .mat-icon{width:1em;height:1em;font-size:inherit}.mat-mdc-form-field-infix{flex:auto;min-width:0;width:180px;position:relative;box-sizing:border-box}.mat-mdc-form-field-infix:has(textarea[cols]){width:auto}.mat-mdc-form-field .mdc-notched-outline__notch{margin-left:-1px;-webkit-clip-path:inset(-9em -999em -9em 1px);clip-path:inset(-9em -999em -9em 1px)}[dir=rtl] .mat-mdc-form-field .mdc-notched-outline__notch{margin-left:0;margin-right:-1px;-webkit-clip-path:inset(-9em 1px -9em -999em);clip-path:inset(-9em 1px -9em -999em)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-floating-label{transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field__input{transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field__input::placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field__input::-moz-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field__input::-webkit-input-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field__input:-ms-input-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--focused .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--no-label .mdc-text-field__input::-moz-placeholder,.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--focused .mdc-text-field__input::-moz-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--no-label .mdc-text-field__input::-webkit-input-placeholder,.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--focused .mdc-text-field__input::-webkit-input-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field--filled:not(.mdc-ripple-upgraded):focus .mdc-text-field__ripple::before{transition-duration:75ms}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field.mat-form-field-animations-enabled .mat-mdc-form-field-error-wrapper{animation-duration:300ms}.mdc-notched-outline .mdc-floating-label{max-width:calc(100% + 1px)}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(133.3333333333% + 1px)}
|
|
5
|
+
`],encapsulation:2,changeDetection:0})}return t})();var qi=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=G({type:t});static \u0275inj=z({imports:[Se,Ho,Gr,Se]})}return t})();var ip=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275cmp=xe({type:t,selectors:[["ng-component"]],hostAttrs:["cdk-text-field-style-loader",""],decls:0,vars:0,template:function(i,o){},styles:[`textarea.cdk-textarea-autosize{resize:none}textarea.cdk-textarea-autosize-measuring{padding:2px 0 !important;box-sizing:content-box !important;height:auto !important;overflow:hidden !important}textarea.cdk-textarea-autosize-measuring-firefox{padding:2px 0 !important;box-sizing:content-box !important;height:0 !important}@keyframes cdk-text-field-autofill-start{/*!*/}@keyframes cdk-text-field-autofill-end{/*!*/}.cdk-text-field-autofill-monitored:-webkit-autofill{animation:cdk-text-field-autofill-start 0s 1ms}.cdk-text-field-autofill-monitored:not(:-webkit-autofill){animation:cdk-text-field-autofill-end 0s 1ms}
|
|
6
|
+
`],encapsulation:2,changeDetection:0})}return t})(),rp={passive:!0},Gs=(()=>{class t{_platform=d(Ie);_ngZone=d(j);_renderer=d(ko).createRenderer(null,null);_styleLoader=d(Wo);_monitoredElements=new Map;constructor(){}monitor(e){if(!this._platform.isBrowser)return fo;this._styleLoader.load(ip);let i=yr(e),o=this._monitoredElements.get(i);if(o)return o.subject;let n=new h,a="cdk-text-field-autofilled",s=c=>{c.animationName==="cdk-text-field-autofill-start"&&!i.classList.contains(a)?(i.classList.add(a),this._ngZone.run(()=>n.next({target:c.target,isAutofilled:!0}))):c.animationName==="cdk-text-field-autofill-end"&&i.classList.contains(a)&&(i.classList.remove(a),this._ngZone.run(()=>n.next({target:c.target,isAutofilled:!1})))},l=this._ngZone.runOutsideAngular(()=>(i.classList.add("cdk-text-field-autofill-monitored"),this._renderer.listen(i,"animationstart",s,rp)));return this._monitoredElements.set(i,{subject:n,unlisten:l}),n}stopMonitoring(e){let i=yr(e),o=this._monitoredElements.get(i);o&&(o.unlisten(),o.subject.complete(),i.classList.remove("cdk-text-field-autofill-monitored"),i.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(i))}ngOnDestroy(){this._monitoredElements.forEach((e,i)=>this.stopMonitoring(i))}static \u0275fac=function(i){return new(i||t)};static \u0275prov=x({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var qs=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=G({type:t});static \u0275inj=z({})}return t})();var tl=(()=>{class t{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,i){this._renderer=e,this._elementRef=i}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static \u0275fac=function(i){return new(i||t)(g(ge),g(P))};static \u0275dir=p({type:t})}return t})(),il=(()=>{class t extends tl{static \u0275fac=(()=>{let e;return function(o){return(e||(e=ee(t)))(o||t)}})();static \u0275dir=p({type:t,features:[w]})}return t})(),Yt=new C("");var op={provide:Yt,useExisting:H(()=>rl),multi:!0};function np(){let t=br()?br().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}var ap=new C(""),rl=(()=>{class t extends tl{_compositionMode;_composing=!1;constructor(e,i,o){super(e,i),this._compositionMode=o,this._compositionMode==null&&(this._compositionMode=!np())}writeValue(e){let i=e??"";this.setProperty("value",i)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static \u0275fac=function(i){return new(i||t)(g(ge),g(P),g(ap,8))};static \u0275dir=p({type:t,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(i,o){i&1&&oe("input",function(a){return o._handleInput(a.target.value)})("blur",function(){return o.onTouched()})("compositionstart",function(){return o._compositionStart()})("compositionend",function(a){return o._compositionEnd(a.target.value)})},standalone:!1,features:[A([op]),w]})}return t})();function Zr(t){return t==null||Jr(t)===0}function Jr(t){return t==null?null:Array.isArray(t)||typeof t=="string"?t.length:t instanceof Set?t.size:null}var me=new C(""),Ge=new C(""),sp=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Qi=class{static min(r){return ol(r)}static max(r){return nl(r)}static required(r){return al(r)}static requiredTrue(r){return lp(r)}static email(r){return dp(r)}static minLength(r){return cp(r)}static maxLength(r){return fp(r)}static pattern(r){return sl(r)}static nullValidator(r){return Zi()}static compose(r){return ml(r)}static composeAsync(r){return hl(r)}};function ol(t){return r=>{if(r.value==null||t==null)return null;let e=parseFloat(r.value);return!isNaN(e)&&e<t?{min:{min:t,actual:r.value}}:null}}function nl(t){return r=>{if(r.value==null||t==null)return null;let e=parseFloat(r.value);return!isNaN(e)&&e>t?{max:{max:t,actual:r.value}}:null}}function al(t){return Zr(t.value)?{required:!0}:null}function lp(t){return t.value===!0?null:{required:!0}}function dp(t){return Zr(t.value)||sp.test(t.value)?null:{email:!0}}function cp(t){return r=>{let e=r.value?.length??Jr(r.value);return e===null||e===0?null:e<t?{minlength:{requiredLength:t,actualLength:e}}:null}}function fp(t){return r=>{let e=r.value?.length??Jr(r.value);return e!==null&&e>t?{maxlength:{requiredLength:t,actualLength:e}}:null}}function sl(t){if(!t)return Zi;let r,e;return typeof t=="string"?(e="",t.charAt(0)!=="^"&&(e+="^"),e+=t,t.charAt(t.length-1)!=="$"&&(e+="$"),r=new RegExp(e)):(e=t.toString(),r=t),i=>{if(Zr(i.value))return null;let o=i.value;return r.test(o)?null:{pattern:{requiredPattern:e,actualValue:o}}}}function Zi(t){return null}function ll(t){return t!=null}function dl(t){return Fo(t)?uo(t):t}function cl(t){let r={};return t.forEach(e=>{r=e!=null?T(T({},r),e):r}),Object.keys(r).length===0?null:r}function fl(t,r){return r.map(e=>e(t))}function up(t){return!t.validate}function ul(t){return t.map(r=>up(r)?r:e=>r.validate(e))}function ml(t){if(!t)return null;let r=t.filter(ll);return r.length==0?null:function(e){return cl(fl(e,r))}}function Yr(t){return t!=null?ml(ul(t)):null}function hl(t){if(!t)return null;let r=t.filter(ll);return r.length==0?null:function(e){let i=fl(e,r).map(dl);return po(i).pipe(ke(cl))}}function Xr(t){return t!=null?hl(ul(t)):null}function Ks(t,r){return t===null?[r]:Array.isArray(t)?[...t,r]:[t,r]}function pl(t){return t._rawValidators}function gl(t){return t._rawAsyncValidators}function qr(t){return t?Array.isArray(t)?t:[t]:[]}function Ji(t,r){return Array.isArray(t)?t.includes(r):t===r}function Qs(t,r){let e=qr(r);return qr(t).forEach(o=>{Ji(e,o)||e.push(o)}),e}function Zs(t,r){return qr(r).filter(e=>!Ji(t,e))}var Yi=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(r){this._rawValidators=r||[],this._composedValidatorFn=Yr(this._rawValidators)}_setAsyncValidators(r){this._rawAsyncValidators=r||[],this._composedAsyncValidatorFn=Xr(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(r){this._onDestroyCallbacks.push(r)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(r=>r()),this._onDestroyCallbacks=[]}reset(r=void 0){this.control&&this.control.reset(r)}hasError(r,e){return this.control?this.control.hasError(r,e):!1}getError(r,e){return this.control?this.control.getError(r,e):null}},W=class extends Yi{name;get formDirective(){return null}get path(){return null}},ue=class extends Yi{_parent=null;name=null;valueAccessor=null},Xi=class{_cd;constructor(r){this._cd=r}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},mp={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},nT=Y(T({},mp),{"[class.ng-submitted]":"isSubmitted"}),aT=(()=>{class t extends Xi{constructor(e){super(e)}static \u0275fac=function(i){return new(i||t)(g(ue,2))};static \u0275dir=p({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,o){i&2&&N("ng-untouched",o.isUntouched)("ng-touched",o.isTouched)("ng-pristine",o.isPristine)("ng-dirty",o.isDirty)("ng-valid",o.isValid)("ng-invalid",o.isInvalid)("ng-pending",o.isPending)},standalone:!1,features:[w]})}return t})(),sT=(()=>{class t extends Xi{constructor(e){super(e)}static \u0275fac=function(i){return new(i||t)(g(W,10))};static \u0275dir=p({type:t,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(i,o){i&2&&N("ng-untouched",o.isUntouched)("ng-touched",o.isTouched)("ng-pristine",o.isPristine)("ng-dirty",o.isDirty)("ng-valid",o.isValid)("ng-invalid",o.isInvalid)("ng-pending",o.isPending)("ng-submitted",o.isSubmitted)},standalone:!1,features:[w]})}return t})();var Gt="VALID",Ki="INVALID",xt="PENDING",qt="DISABLED",Be=class{},er=class extends Be{value;source;constructor(r,e){super(),this.value=r,this.source=e}},Qt=class extends Be{pristine;source;constructor(r,e){super(),this.pristine=r,this.source=e}},Zt=class extends Be{touched;source;constructor(r,e){super(),this.touched=r,this.source=e}},Ct=class extends Be{status;source;constructor(r,e){super(),this.status=r,this.source=e}},tr=class extends Be{source;constructor(r){super(),this.source=r}},ir=class extends Be{source;constructor(r){super(),this.source=r}};function eo(t){return(ar(t)?t.validators:t)||null}function hp(t){return Array.isArray(t)?Yr(t):t||null}function to(t,r){return(ar(r)?r.asyncValidators:t)||null}function pp(t){return Array.isArray(t)?Xr(t):t||null}function ar(t){return t!=null&&!Array.isArray(t)&&typeof t=="object"}function _l(t,r,e){let i=t.controls;if(!(r?Object.keys(i):i).length)throw new ai(1e3,"");if(!i[e])throw new ai(1001,"")}function vl(t,r,e){t._forEachChild((i,o)=>{if(e[o]===void 0)throw new ai(1002,"")})}var Dt=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(r,e){this._assignValidators(r),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(r){this._rawValidators=this._composedValidatorFn=r}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(r){this._rawAsyncValidators=this._composedAsyncValidatorFn=r}get parent(){return this._parent}get status(){return Ce(this.statusReactive)}set status(r){Ce(()=>this.statusReactive.set(r))}_status=_e(()=>this.statusReactive());statusReactive=re(void 0);get valid(){return this.status===Gt}get invalid(){return this.status===Ki}get pending(){return this.status==xt}get disabled(){return this.status===qt}get enabled(){return this.status!==qt}errors;get pristine(){return Ce(this.pristineReactive)}set pristine(r){Ce(()=>this.pristineReactive.set(r))}_pristine=_e(()=>this.pristineReactive());pristineReactive=re(!0);get dirty(){return!this.pristine}get touched(){return Ce(this.touchedReactive)}set touched(r){Ce(()=>this.touchedReactive.set(r))}_touched=_e(()=>this.touchedReactive());touchedReactive=re(!1);get untouched(){return!this.touched}_events=new h;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(r){this._assignValidators(r)}setAsyncValidators(r){this._assignAsyncValidators(r)}addValidators(r){this.setValidators(Qs(r,this._rawValidators))}addAsyncValidators(r){this.setAsyncValidators(Qs(r,this._rawAsyncValidators))}removeValidators(r){this.setValidators(Zs(r,this._rawValidators))}removeAsyncValidators(r){this.setAsyncValidators(Zs(r,this._rawAsyncValidators))}hasValidator(r){return Ji(this._rawValidators,r)}hasAsyncValidator(r){return Ji(this._rawAsyncValidators,r)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(r={}){let e=this.touched===!1;this.touched=!0;let i=r.sourceControl??this;this._parent&&!r.onlySelf&&this._parent.markAsTouched(Y(T({},r),{sourceControl:i})),e&&r.emitEvent!==!1&&this._events.next(new Zt(!0,i))}markAllAsDirty(r={}){this.markAsDirty({onlySelf:!0,emitEvent:r.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsDirty(r))}markAllAsTouched(r={}){this.markAsTouched({onlySelf:!0,emitEvent:r.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(r))}markAsUntouched(r={}){let e=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let i=r.sourceControl??this;this._forEachChild(o=>{o.markAsUntouched({onlySelf:!0,emitEvent:r.emitEvent,sourceControl:i})}),this._parent&&!r.onlySelf&&this._parent._updateTouched(r,i),e&&r.emitEvent!==!1&&this._events.next(new Zt(!1,i))}markAsDirty(r={}){let e=this.pristine===!0;this.pristine=!1;let i=r.sourceControl??this;this._parent&&!r.onlySelf&&this._parent.markAsDirty(Y(T({},r),{sourceControl:i})),e&&r.emitEvent!==!1&&this._events.next(new Qt(!1,i))}markAsPristine(r={}){let e=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let i=r.sourceControl??this;this._forEachChild(o=>{o.markAsPristine({onlySelf:!0,emitEvent:r.emitEvent})}),this._parent&&!r.onlySelf&&this._parent._updatePristine(r,i),e&&r.emitEvent!==!1&&this._events.next(new Qt(!0,i))}markAsPending(r={}){this.status=xt;let e=r.sourceControl??this;r.emitEvent!==!1&&(this._events.next(new Ct(this.status,e)),this.statusChanges.emit(this.status)),this._parent&&!r.onlySelf&&this._parent.markAsPending(Y(T({},r),{sourceControl:e}))}disable(r={}){let e=this._parentMarkedDirty(r.onlySelf);this.status=qt,this.errors=null,this._forEachChild(o=>{o.disable(Y(T({},r),{onlySelf:!0}))}),this._updateValue();let i=r.sourceControl??this;r.emitEvent!==!1&&(this._events.next(new er(this.value,i)),this._events.next(new Ct(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Y(T({},r),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(o=>o(!0))}enable(r={}){let e=this._parentMarkedDirty(r.onlySelf);this.status=Gt,this._forEachChild(i=>{i.enable(Y(T({},r),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:r.emitEvent}),this._updateAncestors(Y(T({},r),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(r,e){this._parent&&!r.onlySelf&&(this._parent.updateValueAndValidity(r),r.skipPristineCheck||this._parent._updatePristine({},e),this._parent._updateTouched({},e))}setParent(r){this._parent=r}getRawValue(){return this.value}updateValueAndValidity(r={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let i=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Gt||this.status===xt)&&this._runAsyncValidator(i,r.emitEvent)}let e=r.sourceControl??this;r.emitEvent!==!1&&(this._events.next(new er(this.value,e)),this._events.next(new Ct(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!r.onlySelf&&this._parent.updateValueAndValidity(Y(T({},r),{sourceControl:e}))}_updateTreeValidity(r={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(r)),this.updateValueAndValidity({onlySelf:!0,emitEvent:r.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?qt:Gt}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(r,e){if(this.asyncValidator){this.status=xt,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1,shouldHaveEmitted:r!==!1};let i=dl(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(o=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(o,{emitEvent:e,shouldHaveEmitted:r})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let r=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,r}return!1}setErrors(r,e={}){this.errors=r,this._updateControlsErrors(e.emitEvent!==!1,this,e.shouldHaveEmitted)}get(r){let e=r;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((i,o)=>i&&i._find(o),this)}getError(r,e){let i=e?this.get(e):this;return i&&i.errors?i.errors[r]:null}hasError(r,e){return!!this.getError(r,e)}get root(){let r=this;for(;r._parent;)r=r._parent;return r}_updateControlsErrors(r,e,i){this.status=this._calculateStatus(),r&&this.statusChanges.emit(this.status),(r||i)&&this._events.next(new Ct(this.status,e)),this._parent&&this._parent._updateControlsErrors(r,e,i)}_initObservables(){this.valueChanges=new te,this.statusChanges=new te}_calculateStatus(){return this._allControlsDisabled()?qt:this.errors?Ki:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(xt)?xt:this._anyControlsHaveStatus(Ki)?Ki:Gt}_anyControlsHaveStatus(r){return this._anyControls(e=>e.status===r)}_anyControlsDirty(){return this._anyControls(r=>r.dirty)}_anyControlsTouched(){return this._anyControls(r=>r.touched)}_updatePristine(r,e){let i=!this._anyControlsDirty(),o=this.pristine!==i;this.pristine=i,this._parent&&!r.onlySelf&&this._parent._updatePristine(r,e),o&&this._events.next(new Qt(this.pristine,e))}_updateTouched(r={},e){this.touched=this._anyControlsTouched(),this._events.next(new Zt(this.touched,e)),this._parent&&!r.onlySelf&&this._parent._updateTouched(r,e)}_onDisabledChange=[];_registerOnCollectionChange(r){this._onCollectionChange=r}_setUpdateStrategy(r){ar(r)&&r.updateOn!=null&&(this._updateOn=r.updateOn)}_parentMarkedDirty(r){let e=this._parent&&this._parent.dirty;return!r&&!!e&&!this._parent._anyControlsDirty()}_find(r){return null}_assignValidators(r){this._rawValidators=Array.isArray(r)?r.slice():r,this._composedValidatorFn=hp(this._rawValidators)}_assignAsyncValidators(r){this._rawAsyncValidators=Array.isArray(r)?r.slice():r,this._composedAsyncValidatorFn=pp(this._rawAsyncValidators)}},ze=class extends Dt{constructor(r,e,i){super(eo(e),to(i,e)),this.controls=r,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;registerControl(r,e){return this.controls[r]?this.controls[r]:(this.controls[r]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(r,e,i={}){this.registerControl(r,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(r,e={}){this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),delete this.controls[r],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(r,e,i={}){this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),delete this.controls[r],e&&this.registerControl(r,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(r){return this.controls.hasOwnProperty(r)&&this.controls[r].enabled}setValue(r,e={}){vl(this,!0,r),Object.keys(r).forEach(i=>{_l(this,!0,i),this.controls[i].setValue(r[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(r,e={}){r!=null&&(Object.keys(r).forEach(i=>{let o=this.controls[i];o&&o.patchValue(r[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(r={},e={}){this._forEachChild((i,o)=>{i.reset(r?r[o]:null,{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(r,e,i)=>(r[i]=e.getRawValue(),r))}_syncPendingControls(){let r=this._reduceChildren(!1,(e,i)=>i._syncPendingControls()?!0:e);return r&&this.updateValueAndValidity({onlySelf:!0}),r}_forEachChild(r){Object.keys(this.controls).forEach(e=>{let i=this.controls[e];i&&r(i,e)})}_setUpControls(){this._forEachChild(r=>{r.setParent(this),r._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(r){for(let[e,i]of Object.entries(this.controls))if(this.contains(e)&&r(i))return!0;return!1}_reduceValue(){let r={};return this._reduceChildren(r,(e,i,o)=>((i.enabled||this.disabled)&&(e[o]=i.value),e))}_reduceChildren(r,e){let i=r;return this._forEachChild((o,n)=>{i=e(i,o,n)}),i}_allControlsDisabled(){for(let r of Object.keys(this.controls))if(this.controls[r].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(r){return this.controls.hasOwnProperty(r)?this.controls[r]:null}};var lT=ze;var Kr=class extends ze{};var wt=new C("",{providedIn:"root",factory:()=>sr}),sr="always";function lr(t,r){return[...r.path,t]}function Jt(t,r,e=sr){io(t,r),r.valueAccessor.writeValue(t.value),(t.disabled||e==="always")&&r.valueAccessor.setDisabledState?.(t.disabled),_p(t,r),bp(t,r),vp(t,r),gp(t,r)}function rr(t,r,e=!0){let i=()=>{};r.valueAccessor&&(r.valueAccessor.registerOnChange(i),r.valueAccessor.registerOnTouched(i)),nr(t,r),t&&(r._invokeOnDestroyCallbacks(),t._registerOnCollectionChange(()=>{}))}function or(t,r){t.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(r)})}function gp(t,r){if(r.valueAccessor.setDisabledState){let e=i=>{r.valueAccessor.setDisabledState(i)};t.registerOnDisabledChange(e),r._registerOnDestroy(()=>{t._unregisterOnDisabledChange(e)})}}function io(t,r){let e=pl(t);r.validator!==null?t.setValidators(Ks(e,r.validator)):typeof e=="function"&&t.setValidators([e]);let i=gl(t);r.asyncValidator!==null?t.setAsyncValidators(Ks(i,r.asyncValidator)):typeof i=="function"&&t.setAsyncValidators([i]);let o=()=>t.updateValueAndValidity();or(r._rawValidators,o),or(r._rawAsyncValidators,o)}function nr(t,r){let e=!1;if(t!==null){if(r.validator!==null){let o=pl(t);if(Array.isArray(o)&&o.length>0){let n=o.filter(a=>a!==r.validator);n.length!==o.length&&(e=!0,t.setValidators(n))}}if(r.asyncValidator!==null){let o=gl(t);if(Array.isArray(o)&&o.length>0){let n=o.filter(a=>a!==r.asyncValidator);n.length!==o.length&&(e=!0,t.setAsyncValidators(n))}}}let i=()=>{};return or(r._rawValidators,i),or(r._rawAsyncValidators,i),e}function _p(t,r){r.valueAccessor.registerOnChange(e=>{t._pendingValue=e,t._pendingChange=!0,t._pendingDirty=!0,t.updateOn==="change"&&bl(t,r)})}function vp(t,r){r.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,t.updateOn==="blur"&&t._pendingChange&&bl(t,r),t.updateOn!=="submit"&&t.markAsTouched()})}function bl(t,r){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),r.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function bp(t,r){let e=(i,o)=>{r.valueAccessor.writeValue(i),o&&r.viewToModelUpdate(i)};t.registerOnChange(e),r._registerOnDestroy(()=>{t._unregisterOnChange(e)})}function yl(t,r){t==null,io(t,r)}function yp(t,r){return nr(t,r)}function ro(t,r){if(!t.hasOwnProperty("model"))return!1;let e=t.model;return e.isFirstChange()?!0:!Object.is(r,e.currentValue)}function xp(t){return Object.getPrototypeOf(t.constructor)===il}function xl(t,r){t._syncPendingControls(),r.forEach(e=>{let i=e.control;i.updateOn==="submit"&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}function oo(t,r){if(!r)return null;Array.isArray(r);let e,i,o;return r.forEach(n=>{n.constructor===rl?e=n:xp(n)?i=n:o=n}),o||i||e||null}function Cp(t,r){let e=t.indexOf(r);e>-1&&t.splice(e,1)}var Sp={provide:W,useExisting:H(()=>no)},Kt=Promise.resolve(),no=(()=>{class t extends W{callSetDisabledState;get submitted(){return Ce(this.submittedReactive)}_submitted=_e(()=>this.submittedReactive());submittedReactive=re(!1);_directives=new Set;form;ngSubmit=new te;options;constructor(e,i,o){super(),this.callSetDisabledState=o,this.form=new ze({},Yr(e),Xr(i))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){Kt.then(()=>{let i=this._findContainer(e.path);e.control=i.registerControl(e.name,e.control),Jt(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){Kt.then(()=>{let i=this._findContainer(e.path);i&&i.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){Kt.then(()=>{let i=this._findContainer(e.path),o=new ze({});yl(o,e),i.registerControl(e.name,o),o.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){Kt.then(()=>{let i=this._findContainer(e.path);i&&i.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,i){Kt.then(()=>{this.form.get(e.path).setValue(i)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submittedReactive.set(!0),xl(this.form,this._directives),this.ngSubmit.emit(e),this.form._events.next(new tr(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this.submittedReactive.set(!1),this.form._events.next(new ir(this.form))}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}static \u0275fac=function(i){return new(i||t)(g(me,10),g(Ge,10),g(wt,8))};static \u0275dir=p({type:t,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(i,o){i&1&&oe("submit",function(a){return o.onSubmit(a)})("reset",function(){return o.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[A([Sp]),w]})}return t})();function Js(t,r){let e=t.indexOf(r);e>-1&&t.splice(e,1)}function Ys(t){return typeof t=="object"&&t!==null&&Object.keys(t).length===2&&"value"in t&&"disabled"in t}var St=class extends Dt{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(r=null,e,i){super(eo(e),to(i,e)),this._applyFormState(r),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),ar(e)&&(e.nonNullable||e.initialValueIsDefault)&&(Ys(r)?this.defaultValue=r.value:this.defaultValue=r)}setValue(r,e={}){this.value=this._pendingValue=r,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(i=>i(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)}patchValue(r,e={}){this.setValue(r,e)}reset(r=this.defaultValue,e={}){this._applyFormState(r),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(r){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(r){this._onChange.push(r)}_unregisterOnChange(r){Js(this._onChange,r)}registerOnDisabledChange(r){this._onDisabledChange.push(r)}_unregisterOnDisabledChange(r){Js(this._onDisabledChange,r)}_forEachChild(r){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(r){Ys(r)?(this.value=this._pendingValue=r.value,r.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=r}},cT=St,Dp=t=>t instanceof St,wp=(()=>{class t extends W{_parent;ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return lr(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}static \u0275fac=(()=>{let e;return function(o){return(e||(e=ee(t)))(o||t)}})();static \u0275dir=p({type:t,standalone:!1,features:[w]})}return t})();var Tp={provide:ue,useExisting:H(()=>Ap)},Xs=Promise.resolve(),Ap=(()=>{class t extends ue{_changeDetectorRef;callSetDisabledState;control=new St;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new te;constructor(e,i,o,n,a,s){super(),this._changeDetectorRef=a,this.callSetDisabledState=s,this._parent=e,this._setValidators(i),this._setAsyncValidators(o),this.valueAccessor=oo(this,n)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let i=e.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),ro(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){Jt(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(e){Xs.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let i=e.isDisabled.currentValue,o=i!==0&&et(i);Xs.then(()=>{o&&!this.control.disabled?this.control.disable():!o&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?lr(e,this._parent):[e]}static \u0275fac=function(i){return new(i||t)(g(W,9),g(me,10),g(Ge,10),g(Yt,10),g(Xe,8),g(wt,8))};static \u0275dir=p({type:t,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[A([Tp]),w,pe]})}return t})();var fT=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275dir=p({type:t,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return t})(),Mp={provide:Yt,useExisting:H(()=>kp),multi:!0},kp=(()=>{class t extends il{writeValue(e){let i=e??"";this.setProperty("value",i)}registerOnChange(e){this.onChange=i=>{e(i==""?null:parseFloat(i))}}static \u0275fac=(()=>{let e;return function(o){return(e||(e=ee(t)))(o||t)}})();static \u0275dir=p({type:t,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(i,o){i&1&&oe("input",function(a){return o.onChange(a.target.value)})("blur",function(){return o.onTouched()})},standalone:!1,features:[A([Mp]),w]})}return t})();var ao=new C(""),Ep={provide:ue,useExisting:H(()=>Fp)},Fp=(()=>{class t extends ue{_ngModelWarningConfig;callSetDisabledState;viewModel;form;set isDisabled(e){}model;update=new te;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,i,o,n,a){super(),this._ngModelWarningConfig=n,this.callSetDisabledState=a,this._setValidators(e),this._setAsyncValidators(i),this.valueAccessor=oo(this,o)}ngOnChanges(e){if(this._isControlChanged(e)){let i=e.form.previousValue;i&&rr(i,this,!1),Jt(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}ro(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&rr(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_isControlChanged(e){return e.hasOwnProperty("form")}static \u0275fac=function(i){return new(i||t)(g(me,10),g(Ge,10),g(Yt,10),g(ao,8),g(wt,8))};static \u0275dir=p({type:t,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],standalone:!1,features:[A([Ep]),w,pe]})}return t})(),Op={provide:W,useExisting:H(()=>dr)},dr=(()=>{class t extends W{callSetDisabledState;get submitted(){return Ce(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}_submitted=_e(()=>this._submittedReactive());_submittedReactive=re(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];form=null;ngSubmit=new te;constructor(e,i,o){super(),this.callSetDisabledState=o,this._setValidators(e),this._setAsyncValidators(i)}ngOnChanges(e){e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(nr(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){let i=this.form.get(e.path);return Jt(i,e,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){rr(e.control||null,e,!1),Cp(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,i){this.form.get(e.path).setValue(i)}onSubmit(e){return this._submittedReactive.set(!0),xl(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new tr(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0,i={}){this.form.reset(e,i),this._submittedReactive.set(!1),i?.emitEvent!==!1&&this.form._events.next(new ir(this.form))}_updateDomValue(){this.directives.forEach(e=>{let i=e.control,o=this.form.get(e.path);i!==o&&(rr(i||null,e),Dp(o)&&(Jt(o,e,this.callSetDisabledState),e.control=o))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let i=this.form.get(e.path);yl(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){let i=this.form.get(e.path);i&&yp(i,e)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){io(this.form,this),this._oldForm&&nr(this._oldForm,this)}static \u0275fac=function(i){return new(i||t)(g(me,10),g(Ge,10),g(wt,8))};static \u0275dir=p({type:t,selectors:[["","formGroup",""]],hostBindings:function(i,o){i&1&&oe("submit",function(a){return o.onSubmit(a)})("reset",function(){return o.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[A([Op]),w,pe]})}return t})(),Ip={provide:W,useExisting:H(()=>Cl)},Cl=(()=>{class t extends wp{name=null;constructor(e,i,o){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(o)}_checkParentType(){Dl(this._parent)}static \u0275fac=function(i){return new(i||t)(g(W,13),g(me,10),g(Ge,10))};static \u0275dir=p({type:t,selectors:[["","formGroupName",""]],inputs:{name:[0,"formGroupName","name"]},standalone:!1,features:[A([Ip]),w]})}return t})(),Rp={provide:W,useExisting:H(()=>Sl)},Sl=(()=>{class t extends W{_parent;name=null;constructor(e,i,o){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(o)}ngOnInit(){Dl(this._parent),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective?.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return lr(this.name==null?this.name:this.name.toString(),this._parent)}static \u0275fac=function(i){return new(i||t)(g(W,13),g(me,10),g(Ge,10))};static \u0275dir=p({type:t,selectors:[["","formArrayName",""]],inputs:{name:[0,"formArrayName","name"]},standalone:!1,features:[A([Rp]),w]})}return t})();function Dl(t){return!(t instanceof Cl)&&!(t instanceof dr)&&!(t instanceof Sl)}var Pp={provide:ue,useExisting:H(()=>Vp)},Vp=(()=>{class t extends ue{_ngModelWarningConfig;_added=!1;viewModel;control;name=null;set isDisabled(e){}model;update=new te;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,i,o,n,a){super(),this._ngModelWarningConfig=a,this._parent=e,this._setValidators(i),this._setAsyncValidators(o),this.valueAccessor=oo(this,n)}ngOnChanges(e){this._added||this._setUpControl(),ro(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return lr(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_setUpControl(){this.control=this.formDirective.addControl(this),this._added=!0}static \u0275fac=function(i){return new(i||t)(g(W,13),g(me,10),g(Ge,10),g(Yt,10),g(ao,8))};static \u0275dir=p({type:t,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:!1,features:[A([Pp]),w,pe]})}return t})();function wl(t){return typeof t=="number"?t:parseFloat(t)}var cr=(()=>{class t{_validator=Zi;_onChange;_enabled;ngOnChanges(e){if(this.inputName in e){let i=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):Zi,this._onChange&&this._onChange()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return e!=null}static \u0275fac=function(i){return new(i||t)};static \u0275dir=p({type:t,features:[pe]})}return t})(),Np={provide:me,useExisting:H(()=>Lp),multi:!0},Lp=(()=>{class t extends cr{max;inputName="max";normalizeInput=e=>wl(e);createValidator=e=>nl(e);static \u0275fac=(()=>{let e;return function(o){return(e||(e=ee(t)))(o||t)}})();static \u0275dir=p({type:t,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(i,o){i&2&&$("max",o._enabled?o.max:null)},inputs:{max:"max"},standalone:!1,features:[A([Np]),w]})}return t})(),Up={provide:me,useExisting:H(()=>jp),multi:!0},jp=(()=>{class t extends cr{min;inputName="min";normalizeInput=e=>wl(e);createValidator=e=>ol(e);static \u0275fac=(()=>{let e;return function(o){return(e||(e=ee(t)))(o||t)}})();static \u0275dir=p({type:t,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(i,o){i&2&&$("min",o._enabled?o.min:null)},inputs:{min:"min"},standalone:!1,features:[A([Up]),w]})}return t})(),$p={provide:me,useExisting:H(()=>Bp),multi:!0};var Bp=(()=>{class t extends cr{required;inputName="required";normalizeInput=et;createValidator=e=>al;enabled(e){return e}static \u0275fac=(()=>{let e;return function(o){return(e||(e=ee(t)))(o||t)}})();static \u0275dir=p({type:t,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(i,o){i&2&&$("required",o._enabled?"":null)},inputs:{required:"required"},standalone:!1,features:[A([$p]),w]})}return t})();var Wp={provide:me,useExisting:H(()=>Hp),multi:!0},Hp=(()=>{class t extends cr{pattern;inputName="pattern";normalizeInput=e=>e;createValidator=e=>sl(e);static \u0275fac=(()=>{let e;return function(o){return(e||(e=ee(t)))(o||t)}})();static \u0275dir=p({type:t,selectors:[["","pattern","","formControlName",""],["","pattern","","formControl",""],["","pattern","","ngModel",""]],hostVars:1,hostBindings:function(i,o){i&2&&$("pattern",o._enabled?o.pattern:null)},inputs:{pattern:"pattern"},standalone:!1,features:[A([Wp]),w]})}return t})();var Tl=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=G({type:t});static \u0275inj=z({})}return t})(),Qr=class extends Dt{constructor(r,e,i){super(eo(e),to(i,e)),this.controls=r,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;at(r){return this.controls[this._adjustIndex(r)]}push(r,e={}){this.controls.push(r),this._registerControl(r),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(r,e,i={}){this.controls.splice(r,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(r,e={}){let i=this._adjustIndex(r);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(r,e,i={}){let o=this._adjustIndex(r);o<0&&(o=0),this.controls[o]&&this.controls[o]._registerOnCollectionChange(()=>{}),this.controls.splice(o,1),e&&(this.controls.splice(o,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(r,e={}){vl(this,!1,r),r.forEach((i,o)=>{_l(this,!1,o),this.at(o).setValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(r,e={}){r!=null&&(r.forEach((i,o)=>{this.at(o)&&this.at(o).patchValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(r=[],e={}){this._forEachChild((i,o)=>{i.reset(r[o],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(r=>r.getRawValue())}clear(r={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:r.emitEvent}))}_adjustIndex(r){return r<0?r+this.length:r}_syncPendingControls(){let r=this.controls.reduce((e,i)=>i._syncPendingControls()?!0:e,!1);return r&&this.updateValueAndValidity({onlySelf:!0}),r}_forEachChild(r){this.controls.forEach((e,i)=>{r(e,i)})}_updateValue(){this.value=this.controls.filter(r=>r.enabled||this.disabled).map(r=>r.value)}_anyControls(r){return this.controls.some(e=>e.enabled&&r(e))}_setUpControls(){this._forEachChild(r=>this._registerControl(r))}_allControlsDisabled(){for(let r of this.controls)if(r.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(r){r.setParent(this),r._registerOnCollectionChange(this._onCollectionChange)}_find(r){return this.at(r)??null}};function el(t){return!!t&&(t.asyncValidators!==void 0||t.validators!==void 0||t.updateOn!==void 0)}var zp=(()=>{class t{useNonNullable=!1;get nonNullable(){let e=new t;return e.useNonNullable=!0,e}group(e,i=null){let o=this._reduceControls(e),n={};return el(i)?n=i:i!==null&&(n.validators=i.validator,n.asyncValidators=i.asyncValidator),new ze(o,n)}record(e,i=null){let o=this._reduceControls(e);return new Kr(o,i)}control(e,i,o){let n={};return this.useNonNullable?(el(i)?n=i:(n.validators=i,n.asyncValidators=o),new St(e,Y(T({},n),{nonNullable:!0}))):new St(e,i,o)}array(e,i,o){let n=e.map(a=>this._createControl(a));return new Qr(n,i,o)}_reduceControls(e){let i={};return Object.keys(e).forEach(o=>{i[o]=this._createControl(e[o])}),i}_createControl(e){if(e instanceof St)return e;if(e instanceof Dt)return e;if(Array.isArray(e)){let i=e[0],o=e.length>1?e[1]:null,n=e.length>2?e[2]:null;return this.control(i,o,n)}else return this.control(e)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=x({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var uT=(()=>{class t extends zp{group(e,i=null){return super.group(e,i)}control(e,i,o){return super.control(e,i,o)}array(e,i,o){return super.array(e,i,o)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=ee(t)))(o||t)}})();static \u0275prov=x({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var mT=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:wt,useValue:e.callSetDisabledState??sr}]}}static \u0275fac=function(i){return new(i||t)};static \u0275mod=G({type:t});static \u0275inj=z({imports:[Tl]})}return t})(),hT=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:ao,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:wt,useValue:e.callSetDisabledState??sr}]}}static \u0275fac=function(i){return new(i||t)};static \u0275mod=G({type:t});static \u0275inj=z({imports:[Tl]})}return t})();var Al=new C("MAT_INPUT_VALUE_ACCESSOR");var Ml=(()=>{class t{isErrorState(e,i){return!!(e&&e.invalid&&(e.touched||i&&i.submitted))}static \u0275fac=function(i){return new(i||t)};static \u0275prov=x({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var fr=class{_defaultMatcher;ngControl;_parentFormGroup;_parentForm;_stateChanges;errorState=!1;matcher;constructor(r,e,i,o,n){this._defaultMatcher=r,this.ngControl=e,this._parentFormGroup=i,this._parentForm=o,this._stateChanges=n}updateErrorState(){let r=this.errorState,e=this._parentFormGroup||this._parentForm,i=this.matcher||this._defaultMatcher,o=this.ngControl?this.ngControl.control:null,n=i?.isErrorState(o,e)??!1;n!==r&&(this.errorState=n,this._stateChanges.next())}};var Gp=["button","checkbox","file","hidden","image","radio","range","reset","submit"],qp=new C("MAT_INPUT_CONFIG"),NT=(()=>{class t{_elementRef=d(P);_platform=d(Ie);ngControl=d(ue,{optional:!0,self:!0});_autofillMonitor=d(Gs);_ngZone=d(j);_formField=d(Gi,{optional:!0});_renderer=d(ge);_uid=d(ce).getId("mat-input-");_previousNativeValue;_inputValueAccessor;_signalBasedValueAccessor;_previousPlaceholder;_errorStateTracker;_config=d(qp,{optional:!0});_cleanupIosKeyup;_cleanupWebkitWheel;_isServer;_isNativeSelect;_isTextarea;_isInFormField;focused=!1;stateChanges=new h;controlType="mat-input";autofilled=!1;get disabled(){return this._disabled}set disabled(e){this._disabled=it(e),this.focused&&(this.focused=!1,this.stateChanges.next())}_disabled=!1;get id(){return this._id}set id(e){this._id=e||this._uid}_id;placeholder;name;get required(){return this._required??this.ngControl?.control?.hasValidator(Qi.required)??!1}set required(e){this._required=it(e)}_required;get type(){return this._type}set type(e){this._type=e||"text",this._validateType(),!this._isTextarea&&xr().has(this._type)&&(this._elementRef.nativeElement.type=this._type)}_type="text";get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(e){this._errorStateTracker.matcher=e}userAriaDescribedBy;get value(){return this._signalBasedValueAccessor?this._signalBasedValueAccessor.value():this._inputValueAccessor.value}set value(e){e!==this.value&&(this._signalBasedValueAccessor?this._signalBasedValueAccessor.value.set(e):this._inputValueAccessor.value=e,this.stateChanges.next())}get readonly(){return this._readonly}set readonly(e){this._readonly=it(e)}_readonly=!1;disabledInteractive;get errorState(){return this._errorStateTracker.errorState}set errorState(e){this._errorStateTracker.errorState=e}_neverEmptyInputTypes=["date","datetime","datetime-local","month","time","week"].filter(e=>xr().has(e));constructor(){let e=d(no,{optional:!0}),i=d(dr,{optional:!0}),o=d(Ml),n=d(Al,{optional:!0,self:!0}),a=this._elementRef.nativeElement,s=a.nodeName.toLowerCase();n?Ao(n.value)?this._signalBasedValueAccessor=n:this._inputValueAccessor=n:this._inputValueAccessor=a,this._previousNativeValue=this.value,this.id=this.id,this._platform.IOS&&this._ngZone.runOutsideAngular(()=>{this._cleanupIosKeyup=this._renderer.listen(a,"keyup",this._iOSKeyupListener)}),this._errorStateTracker=new fr(o,this.ngControl,i,e,this.stateChanges),this._isServer=!this._platform.isBrowser,this._isNativeSelect=s==="select",this._isTextarea=s==="textarea",this._isInFormField=!!this._formField,this.disabledInteractive=this._config?.disabledInteractive||!1,this._isNativeSelect&&(this.controlType=a.multiple?"mat-native-select-multiple":"mat-native-select"),this._signalBasedValueAccessor&&si(()=>{this._signalBasedValueAccessor.value(),this.stateChanges.next()})}ngAfterViewInit(){this._platform.isBrowser&&this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(e=>{this.autofilled=e.isAutofilled,this.stateChanges.next()})}ngOnChanges(){this.stateChanges.next()}ngOnDestroy(){this.stateChanges.complete(),this._platform.isBrowser&&this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement),this._cleanupIosKeyup?.(),this._cleanupWebkitWheel?.()}ngDoCheck(){this.ngControl&&(this.updateErrorState(),this.ngControl.disabled!==null&&this.ngControl.disabled!==this.disabled&&(this.disabled=this.ngControl.disabled,this.stateChanges.next())),this._dirtyCheckNativeValue(),this._dirtyCheckPlaceholder()}focus(e){this._elementRef.nativeElement.focus(e)}updateErrorState(){this._errorStateTracker.updateErrorState()}_focusChanged(e){if(e!==this.focused){if(!this._isNativeSelect&&e&&this.disabled&&this.disabledInteractive){let i=this._elementRef.nativeElement;i.type==="number"?(i.type="text",i.setSelectionRange(0,0),i.type="number"):i.setSelectionRange(0,0)}this.focused=e,this.stateChanges.next()}}_onInput(){}_dirtyCheckNativeValue(){let e=this._elementRef.nativeElement.value;this._previousNativeValue!==e&&(this._previousNativeValue=e,this.stateChanges.next())}_dirtyCheckPlaceholder(){let e=this._getPlaceholder();if(e!==this._previousPlaceholder){let i=this._elementRef.nativeElement;this._previousPlaceholder=e,e?i.setAttribute("placeholder",e):i.removeAttribute("placeholder")}}_getPlaceholder(){return this.placeholder||null}_validateType(){Gp.indexOf(this._type)>-1}_isNeverEmpty(){return this._neverEmptyInputTypes.indexOf(this._type)>-1}_isBadInput(){let e=this._elementRef.nativeElement.validity;return e&&e.badInput}get empty(){return!this._isNeverEmpty()&&!this._elementRef.nativeElement.value&&!this._isBadInput()&&!this.autofilled}get shouldLabelFloat(){if(this._isNativeSelect){let e=this._elementRef.nativeElement,i=e.options[0];return this.focused||e.multiple||!this.empty||!!(e.selectedIndex>-1&&i&&i.label)}else return this.focused&&!this.disabled||!this.empty}get describedByIds(){return this._elementRef.nativeElement.getAttribute("aria-describedby")?.split(" ")||[]}setDescribedByIds(e){let i=this._elementRef.nativeElement;e.length?i.setAttribute("aria-describedby",e.join(" ")):i.removeAttribute("aria-describedby")}onContainerClick(){this.focused||this.focus()}_isInlineSelect(){let e=this._elementRef.nativeElement;return this._isNativeSelect&&(e.multiple||e.size>1)}_iOSKeyupListener=e=>{let i=e.target;!i.value&&i.selectionStart===0&&i.selectionEnd===0&&(i.setSelectionRange(1,1),i.setSelectionRange(0,0))};_getReadonlyAttribute(){return this._isNativeSelect?null:this.readonly||this.disabled&&this.disabledInteractive?"true":null}static \u0275fac=function(i){return new(i||t)};static \u0275dir=p({type:t,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-mdc-input-element"],hostVars:21,hostBindings:function(i,o){i&1&&oe("focus",function(){return o._focusChanged(!0)})("blur",function(){return o._focusChanged(!1)})("input",function(){return o._onInput()}),i&2&&(Fe("id",o.id)("disabled",o.disabled&&!o.disabledInteractive)("required",o.required),$("name",o.name||null)("readonly",o._getReadonlyAttribute())("aria-disabled",o.disabled&&o.disabledInteractive?"true":null)("aria-invalid",o.empty&&o.required?null:o.errorState)("aria-required",o.required)("id",o.id),N("mat-input-server",o._isServer)("mat-mdc-form-field-textarea-control",o._isInFormField&&o._isTextarea)("mat-mdc-form-field-input-control",o._isInFormField)("mat-mdc-input-disabled-interactive",o.disabledInteractive)("mdc-text-field__input",o._isInFormField)("mat-mdc-native-select-inline",o._isInlineSelect()))},inputs:{disabled:"disabled",id:"id",placeholder:"placeholder",name:"name",required:"required",type:"type",errorStateMatcher:"errorStateMatcher",userAriaDescribedBy:[0,"aria-describedby","userAriaDescribedBy"],value:"value",readonly:"readonly",disabledInteractive:[2,"disabledInteractive","disabledInteractive",et]},exportAs:["matInput"],features:[A([{provide:zi,useExisting:t}]),pe]})}return t})(),LT=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=G({type:t});static \u0275inj=z({imports:[Se,qi,qi,qs,Se]})}return t})();export{Re as a,Pt as b,fn as c,hi as d,rt as e,wr as f,pi as g,ln as h,Kg as i,uh as j,Ir as k,ot as l,$l as m,un as n,Pr as o,Z0 as p,Nr as q,Lr as r,xs as s,yt as t,As as u,Ms as v,Wi as w,Sh as x,Dh as y,wh as z,Th as A,Ah as B,Yt as C,rl as D,me as E,Qi as F,W as G,ue as H,aT as I,sT as J,ze as K,lT as L,no as M,St as N,cT as O,Ap as P,fT as Q,kp as R,Fp as S,dr as T,Cl as U,Sl as V,Vp as W,Lp as X,jp as Y,Bp as Z,Hp as _,uT as $,mT as aa,hT as ba,Os as ca,Br as da,Jh as ea,Wr as fa,Yh as ga,zi as ha,Gi as ia,zs as ja,Gr as ka,qi as la,Ml as ma,fr as na,NT as oa,LT as pa};
|