import{b as Te}from"./chunk-B25ZVICI.js";import{h as Ee,i as we,j as be,n as Se}from"./chunk-XJSLYW76.js";import{$a as ce,A as y,Ab as Ie,Bb as c,C as q,Cb as l,D as z,Db as f,Ea as se,Eb as m,G as J,H as Q,Pa as ae,Q as X,Qa as x,S as ee,T as O,V as R,Y as A,Z as P,a as V,ca as re,d as j,db as F,e as T,ea as L,eb as le,f as $,fb as pe,g,gb as ge,ha as D,i as K,ia as W,j as C,ja as te,l as M,m as U,n as h,o as w,p as d,pa as ne,pb as de,q as B,s as H,sb as ue,t as b,tb as he,u as Z,ub as fe,vb as me,wb as ve,x as S,xa as ie,xb as ye,y as G,ya as oe,yb as ke,z as Y}from"./chunk-4UQFIB2X.js";import"./chunk-7CZEEXB7.js";import"./chunk-RNPCBO76.js";import"./chunk-62ZNVPKS.js";import"./chunk-BKYVOSBZ.js";import"./chunk-DBTSN7V4.js";import"./chunk-CPP4EFWI.js";import"./chunk-2F7EAEOP.js";import"./chunk-ORNSWNYM.js";import"./chunk-CBTCPHC5.js";import"./chunk-C6YNHNI5.js";import"./chunk-DROM25MW.js";import"./chunk-F4PI7WOR.js";import"./chunk-ILNDS6YC.js";import"./chunk-7T7YRGPO.js";import{a as _}from"./chunk-GY54SATL.js";var I="Service workers are disabled or not supported by this browser";function Pe(n){return C(()=>$(new Error(n)))}var v=class{constructor(e){if(this.serviceWorker=e,!e)this.worker=this.events=this.registration=Pe(I);else{let r=M(e,"controllerchange").pipe(g(()=>e.controller)),t=C(()=>T(e.controller)),o=K(t,r);this.worker=o.pipe(w(u=>!!u)),this.registration=this.worker.pipe(b(()=>e.getRegistration()));let E=M(e,"message").pipe(g(u=>u.data)).pipe(w(u=>u&&u.type)).pipe(H());E.connect(),this.events=E}}postMessage(e,i){return this.worker.pipe(d(1),Z(r=>{r.postMessage(_({action:e},i))})).toPromise().then(()=>{})}postMessageWithOperation(e,i,r){let t=this.waitForOperationCompleted(r),o=this.postMessage(e,i);return Promise.all([o,t]).then(([,a])=>a)}generateNonce(){return Math.round(Math.random()*1e7)}eventsOfType(e){let i;return typeof e=="string"?i=r=>r.type===e:i=r=>e.includes(r.type),this.events.pipe(w(i))}nextEventOfType(e){return this.eventsOfType(e).pipe(d(1))}waitForOperationCompleted(e){return this.eventsOfType("OPERATION_COMPLETED").pipe(w(i=>i.nonce===e),d(1),g(i=>{if(i.result!==void 0)return i.result;throw new Error(i.error)})).toPromise()}get isEnabled(){return!!this.serviceWorker}},Ce=(()=>{let e=class e{get isEnabled(){return this.sw.isEnabled}constructor(r){if(this.sw=r,this.pushManager=null,this.subscriptionChanges=new V,!r.isEnabled){this.messages=h,this.notificationClicks=h,this.subscription=h;return}this.messages=this.sw.eventsOfType("PUSH").pipe(g(o=>o.data)),this.notificationClicks=this.sw.eventsOfType("NOTIFICATION_CLICK").pipe(g(o=>o.data)),this.pushManager=this.sw.registration.pipe(g(o=>o.pushManager));let t=this.pushManager.pipe(b(o=>o.getSubscription()));this.subscription=U(t,this.subscriptionChanges)}requestSubscription(r){if(!this.sw.isEnabled||this.pushManager===null)return Promise.reject(new Error(I));let t={userVisibleOnly:!0},o=this.decodeBase64(r.serverPublicKey.replace(/_/g,"/").replace(/-/g,"+")),a=new Uint8Array(new ArrayBuffer(o.length));for(let s=0;s<o.length;s++)a[s]=o.charCodeAt(s);return t.applicationServerKey=a,this.pushManager.pipe(b(s=>s.subscribe(t)),d(1)).toPromise().then(s=>(this.subscriptionChanges.next(s),s))}unsubscribe(){if(!this.sw.isEnabled)return Promise.reject(new Error(I));let r=t=>{if(t===null)throw new Error("Not subscribed to push notifications.");return t.unsubscribe().then(o=>{if(!o)throw new Error("Unsubscribe failed!");this.subscriptionChanges.next(null)})};return this.subscription.pipe(d(1),b(r)).toPromise()}decodeBase64(r){return atob(r)}};e.\u0275fac=function(t){return new(t||e)(y(v))},e.\u0275prov=S({token:e,factory:e.\u0275fac});let n=e;return n})(),N=(()=>{let e=class e{get isEnabled(){return this.sw.isEnabled}constructor(r){if(this.sw=r,!r.isEnabled){this.versionUpdates=h,this.unrecoverable=h;return}this.versionUpdates=this.sw.eventsOfType(["VERSION_DETECTED","VERSION_INSTALLATION_FAILED","VERSION_READY","NO_NEW_VERSION_DETECTED"]),this.unrecoverable=this.sw.eventsOfType("UNRECOVERABLE_STATE")}checkForUpdate(){if(!this.sw.isEnabled)return Promise.reject(new Error(I));let r=this.sw.generateNonce();return this.sw.postMessageWithOperation("CHECK_FOR_UPDATES",{nonce:r},r)}activateUpdate(){if(!this.sw.isEnabled)return Promise.reject(new Error(I));let r=this.sw.generateNonce();return this.sw.postMessageWithOperation("ACTIVATE_UPDATE",{nonce:r},r)}};e.\u0275fac=function(t){return new(t||e)(y(v))},e.\u0275prov=S({token:e,factory:e.\u0275fac});let n=e;return n})();var Oe=new Y("");function Le(n,e,i,r){return()=>{if(!(F(r)&&"serviceWorker"in navigator&&i.enabled!==!1))return;let t=n.get(ee),o=n.get(x);t.runOutsideAngular(()=>{let s=navigator.serviceWorker,p=()=>s.controller?.postMessage({action:"INITIALIZE"});s.addEventListener("controllerchange",p),o.onDestroy(()=>{s.removeEventListener("controllerchange",p)})});let a;if(typeof i.registrationStrategy=="function")a=i.registrationStrategy();else{let[s,...p]=(i.registrationStrategy||"registerWhenStable:30000").split(":");switch(s){case"registerImmediately":a=T(null);break;case"registerWithDelay":a=Ae(+p[0]||0);break;case"registerWhenStable":let E=j(n.get(x).whenStable());a=p[0]?U(E,Ae(+p[0])):E;break;default:throw new Error(`Unknown ServiceWorker registration strategy: ${i.registrationStrategy}`)}}t.runOutsideAngular(()=>a.pipe(d(1)).subscribe(()=>navigator.serviceWorker.register(e,{scope:i.scope}).catch(s=>console.error("Service worker registration failed with:",s))))}}function Ae(n){return T(null).pipe(B(n))}function De(n,e){return new v(F(e)&&n.enabled!==!1?navigator.serviceWorker:void 0)}var k=class{};function We(n,e={}){return J([Ce,N,{provide:Oe,useValue:n},{provide:k,useValue:e},{provide:v,useFactory:De,deps:[k,R]},{provide:ae,useFactory:Le,deps:[X,Oe,k,R],multi:!0}])}var Me=(()=>{let e=class e{static register(r,t={}){return{ngModule:e,providers:[We(r,t)]}}};e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=z({type:e}),e.\u0275inj=G({providers:[Ce,N]});let n=e;return n})();var Ue=(()=>{let e=class e extends O{constructor(r){super(),this.loggingService=r}handleError(r){this.loggingService.logException(r);let t=this.getOriginalError(r);t!==r&&this.loggingService.logException(t)}getOriginalError(r){for(;r&&r.originalError;)r=r.originalError;return r}};e.\u0275fac=function(t){return new(t||e)(y(m))},e.\u0275prov=S({token:e,factory:e.\u0275fac});let n=e;return n})();function _e(n,e){if(n&1&&(D(0,"div",2)(1,"span",3),ie(2),W()()),n&2){let i=ne();A(2),oe(i.envName)}}var Re=(()=>{let e=class e{constructor(r,t){this.loggingService=r,this.swUpdates=t,this.envName=f.envName,this.setUpExternalLinkTracking(),this.setUpPrintTracking(),this.handleServiceWorkerUpdates(),this.handleServiceWorkerErrors()}setUpExternalLinkTracking(){document.addEventListener("click",r=>{let t=r.target;if(t.tagName!=="A"&&!t.closest("a"))return;let o=t.tagName==="A"?t:t.closest("a");o.hostname!==window.location.hostname&&this.loggingService.logEvent(c.ai,l.ExternalLinkClick,{href:o.href,linkText:o.innerText||"",metaKey:r.metaKey||void 0,shiftKey:r.shiftKey||void 0,ctrlKey:r.ctrlKey||void 0})},{capture:!1,passive:!0})}setUpPrintTracking(){window.addEventListener("beforeprint",()=>{this.loggingService.logEvent(c.ai,l.Print,{})})}handleServiceWorkerUpdates(){this.swUpdates.versionUpdates.subscribe(r=>{switch(r.type){case"VERSION_READY":console.log(`ServiceWorker: New version ready: ${r.latestVersion.hash}`),this.loggingService.logEvent(c.sw,l.SwUpdateAvailable,{name:r.latestVersion.hash}),this.swUpdates.activateUpdate().then(t=>(console.log("ServiceWorker: activateUpdate: ",t,r.latestVersion.hash),t?(this.loggingService.logEvent(c.sw,l.SwUpdateActivated,{name:r.latestVersion.hash}),document.location.reload(),t):(this.loggingService.logEvent(c.sw,l.SwUpdateNotActivated,{name:r.latestVersion.hash}),t))).catch(t=>{console.error("ServiceWorker: activateUpdate: ",t),this.loggingService.logEvent(c.error,l.error,{name:"ServiceWorker: activateUpdate error"})});break;case"NO_NEW_VERSION_DETECTED":this.loggingService.logEvent(c.sw,l.SwUpdateNotAvailable,{name:r.version.hash});break;case"VERSION_INSTALLATION_FAILED":console.warn(`ServiceWorker: Failed to install version: '${r.version.hash}`,r.error),this.loggingService.logEvent(c.error,l.error,{name:"ServiceWorker: VERSION_INSTALLATION_FAILED"});break}})}handleServiceWorkerErrors(){this.swUpdates.unrecoverable.subscribe(r=>{console.error("ServiceWorker unrecoverable error:",r),this.loggingService.logEvent(c.error,l.error,{name:"ServiceWorker: unrecoverable error",reason:r.reason}),document.location.reload()})}};e.\u0275fac=function(t){return new(t||e)(P(m),P(N))},e.\u0275cmp=q({type:e,selectors:[["app-root"]],standalone:!0,features:[se],decls:3,vars:2,consts:[[3,"animated"],["class","env-label no-print",4,"ngIf"],[1,"env-label","no-print"],[1,"env-label--name"]],template:function(t,o){t&1&&(D(0,"ion-app"),te(1,"ion-router-outlet",0),W(),re(2,_e,3,1,"div",1)),t&2&&(A(),L("animated",!1),A(),L("ngIf",o.envName))},dependencies:[ce,be,we],encapsulation:2});let n=e;return n})();function Ve(){let n=new ye;return n.heading=(e,i)=>(i=i<3?3:i,i=i>6?6:i,`<h${i}>${e}</h${i}>`),n.link=(e,i,r)=>{let t=!(e.startsWith(window.location.origin)||e.startsWith("/")),a=`external noopener noreferrer ${e.includes(r)?"x-plain-url":""}`;return`<a href="${e}"
     ${t?`target="_blank" rel="${a}"`:""}
     ${i?` title="${i}"`:""}
     >${r}</a>`},n.html=e=>e.replaceAll(/(?<raw_a_href>href=[\s"']*(?:http|\/\/))/gi,' target="_blank" rel="external noopener noreferrer" $<raw_a_href>'),{renderer:n,gfm:!0,breaks:!0,pedantic:!1}}function je(){return Ie.forRoot({markedOptions:{provide:ke,useFactory:Ve}})}f.production&&void 0;ge(Re,{providers:[he(Te,ve({paramsInheritanceStrategy:"always",urlUpdateStrategy:"eager"}),me(ue),fe({anchorScrolling:"enabled",scrollPositionRestoration:"top"})),Q(Me.register("ngsw-worker.js",{enabled:f.useServiceWorker&&f.production,registrationStrategy:"registerWhenStable:3000"}),je()),m,{provide:O,useClass:Ue},{provide:de,useClass:Ee},le(pe()),Se({mode:"md",animated:!1})]}).catch(n=>console.error(n));export{je as ngxMarkdownModuleFactory};
//# sourceMappingURL=main-4KTHGXW7.js.map
