import{a as ae,b as Xe,c as Je,d as w,h as V,p as Ge,r as ce,s as z}from"./chunk-ZEDFMZ3B.js";import{$ as ee,A as Ne,Aa as xe,Ba as re,Ca as Ce,D as Oe,Da as b,Fa as se,Ga as L,Ha as P,Ia as N,Ja as je,K as H,Ka as Fe,La as Ue,Ma as _e,Na as Be,Oa as Ve,Pa as ze,Qa as M,T as Ie,Wa as $e,X as T,Za as oe,_ as m,a as B,b as De,ca as v,da as d,db as O,ea as E,f as Ae,fa as k,ia as te,kb as ie,kc as Ke,m as Pe,n as Q,r as S,ua as ne,wa as Se,xa as ke,ya as Le}from"./chunk-PEWEDMBK.js";var C=class{},K=class{},D=class t{constructor(e){this.normalizedNames=new Map,this.lazyUpdate=null,e?typeof e=="string"?this.lazyInit=()=>{this.headers=new Map,e.split(` `).forEach(s=>{let n=s.indexOf(":");if(n>0){let r=s.slice(0,n),o=r.toLowerCase(),a=s.slice(n+1).trim();this.maybeSetNormalizedName(r,o),this.headers.has(o)?this.headers.get(o).push(a):this.headers.set(o,[a])}})}:typeof Headers<"u"&&e instanceof Headers?(this.headers=new Map,e.forEach((s,n)=>{this.setHeaderEntries(n,s)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(e).forEach(([s,n])=>{this.setHeaderEntries(s,n)})}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();let s=this.headers.get(e.toLowerCase());return s&&s.length>0?s[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(e){return this.init(),this.headers.get(e.toLowerCase())||null}append(e,s){return this.clone({name:e,value:s,op:"a"})}set(e,s){return this.clone({name:e,value:s,op:"s"})}delete(e,s){return this.clone({name:e,value:s,op:"d"})}maybeSetNormalizedName(e,s){this.normalizedNames.has(s)||this.normalizedNames.set(s,e)}init(){this.lazyInit&&(this.lazyInit instanceof t?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(e=>this.applyUpdate(e)),this.lazyUpdate=null))}copyFrom(e){e.init(),Array.from(e.headers.keys()).forEach(s=>{this.headers.set(s,e.headers.get(s)),this.normalizedNames.set(s,e.normalizedNames.get(s))})}clone(e){let s=new t;return s.lazyInit=this.lazyInit&&this.lazyInit instanceof t?this.lazyInit:this,s.lazyUpdate=(this.lazyUpdate||[]).concat([e]),s}applyUpdate(e){let s=e.name.toLowerCase();switch(e.op){case"a":case"s":let n=e.value;if(typeof n=="string"&&(n=[n]),n.length===0)return;this.maybeSetNormalizedName(e.name,s);let r=(e.op==="a"?this.headers.get(s):void 0)||[];r.push(...n),this.headers.set(s,r);break;case"d":let o=e.value;if(!o)this.headers.delete(s),this.normalizedNames.delete(s);else{let a=this.headers.get(s);if(!a)return;a=a.filter(i=>o.indexOf(i)===-1),a.length===0?(this.headers.delete(s),this.normalizedNames.delete(s)):this.headers.set(s,a)}break}}setHeaderEntries(e,s){let n=(Array.isArray(s)?s:[s]).map(o=>o.toString()),r=e.toLowerCase();this.headers.set(r,n),this.maybeSetNormalizedName(e,r)}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach(s=>e(this.normalizedNames.get(s),this.headers.get(s)))}};var de=class{encodeKey(e){return qe(e)}encodeValue(e){return qe(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}};function vt(t,e){let s=new Map;return t.length>0&&t.replace(/^\?/,"").split("&").forEach(r=>{let o=r.indexOf("="),[a,i]=o==-1?[e.decodeKey(r),""]:[e.decodeKey(r.slice(0,o)),e.decodeValue(r.slice(o+1))],l=s.get(a)||[];l.push(i),s.set(a,l)}),s}var wt=/%(\d[a-f0-9])/gi,Et={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function qe(t){return encodeURIComponent(t).replace(wt,(e,s)=>Et[s]??e)}function $(t){return`${t}`}var R=class t{constructor(e={}){if(this.updates=null,this.cloneFrom=null,this.encoder=e.encoder||new de,e.fromString){if(e.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=vt(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(s=>{let n=e.fromObject[s],r=Array.isArray(n)?n.map($):[$(n)];this.map.set(s,r)})):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();let s=this.map.get(e);return s?s[0]:null}getAll(e){return this.init(),this.map.get(e)||null}keys(){return this.init(),Array.from(this.map.keys())}append(e,s){return this.clone({param:e,value:s,op:"a"})}appendAll(e){let s=[];return Object.keys(e).forEach(n=>{let r=e[n];Array.isArray(r)?r.forEach(o=>{s.push({param:n,value:o,op:"a"})}):s.push({param:n,value:r,op:"a"})}),this.clone(s)}set(e,s){return this.clone({param:e,value:s,op:"s"})}delete(e,s){return this.clone({param:e,value:s,op:"d"})}toString(){return this.init(),this.keys().map(e=>{let s=this.encoder.encodeKey(e);return this.map.get(e).map(n=>s+"="+this.encoder.encodeValue(n)).join("&")}).filter(e=>e!=="").join("&")}clone(e){let s=new t({encoder:this.encoder});return s.cloneFrom=this.cloneFrom||this,s.updates=(this.updates||[]).concat(e),s}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(e=>this.map.set(e,this.cloneFrom.map.get(e))),this.updates.forEach(e=>{switch(e.op){case"a":case"s":let s=(e.op==="a"?this.map.get(e.param):void 0)||[];s.push($(e.value)),this.map.set(e.param,s);break;case"d":if(e.value!==void 0){let n=this.map.get(e.param)||[],r=n.indexOf($(e.value));r!==-1&&n.splice(r,1),n.length>0?this.map.set(e.param,n):this.map.delete(e.param)}else{this.map.delete(e.param);break}}}),this.cloneFrom=this.updates=null)}};var ue=class{constructor(){this.map=new Map}set(e,s){return this.map.set(e,s),this}get(e){return this.map.has(e)||this.map.set(e,e.defaultValue()),this.map.get(e)}delete(e){return this.map.delete(e),this}has(e){return this.map.has(e)}keys(){return this.map.keys()}};function Tt(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function We(t){return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer}function Ze(t){return typeof Blob<"u"&&t instanceof Blob}function Ye(t){return typeof FormData<"u"&&t instanceof FormData}function Rt(t){return typeof URLSearchParams<"u"&&t instanceof URLSearchParams}var x=class t{constructor(e,s,n,r){this.url=s,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=e.toUpperCase();let o;if(Tt(this.method)||r?(this.body=n!==void 0?n:null,o=r):o=n,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params),this.transferCache=o.transferCache),this.headers??=new D,this.context??=new ue,!this.params)this.params=new R,this.urlWithParams=s;else{let a=this.params.toString();if(a.length===0)this.urlWithParams=s;else{let i=s.indexOf("?"),l=i===-1?"?":ip.set(y,e.setHeaders[y]),l)),e.setParams&&(c=Object.keys(e.setParams).reduce((p,y)=>p.set(y,e.setParams[y]),c)),new t(s,n,o,{params:c,headers:l,context:h,reportProgress:i,responseType:r,withCredentials:a})}},I=function(t){return t[t.Sent=0]="Sent",t[t.UploadProgress=1]="UploadProgress",t[t.ResponseHeader=2]="ResponseHeader",t[t.DownloadProgress=3]="DownloadProgress",t[t.Response=4]="Response",t[t.User=5]="User",t}(I||{}),j=class{constructor(e,s=G.Ok,n="OK"){this.headers=e.headers||new D,this.status=e.status!==void 0?e.status:s,this.statusText=e.statusText||n,this.url=e.url||null,this.ok=this.status>=200&&this.status<300}},he=class t extends j{constructor(e={}){super(e),this.type=I.ResponseHeader}clone(e={}){return new t({headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}},X=class t extends j{constructor(e={}){super(e),this.type=I.Response,this.body=e.body!==void 0?e.body:null}clone(e={}){return new t({body:e.body!==void 0?e.body:this.body,headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}},J=class extends j{constructor(e){super(e,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${e.url||"(unknown url)"}`:this.message=`Http failure response for ${e.url||"(unknown url)"}: ${e.status} ${e.statusText}`,this.error=e.error||null}},G=function(t){return t[t.Continue=100]="Continue",t[t.SwitchingProtocols=101]="SwitchingProtocols",t[t.Processing=102]="Processing",t[t.EarlyHints=103]="EarlyHints",t[t.Ok=200]="Ok",t[t.Created=201]="Created",t[t.Accepted=202]="Accepted",t[t.NonAuthoritativeInformation=203]="NonAuthoritativeInformation",t[t.NoContent=204]="NoContent",t[t.ResetContent=205]="ResetContent",t[t.PartialContent=206]="PartialContent",t[t.MultiStatus=207]="MultiStatus",t[t.AlreadyReported=208]="AlreadyReported",t[t.ImUsed=226]="ImUsed",t[t.MultipleChoices=300]="MultipleChoices",t[t.MovedPermanently=301]="MovedPermanently",t[t.Found=302]="Found",t[t.SeeOther=303]="SeeOther",t[t.NotModified=304]="NotModified",t[t.UseProxy=305]="UseProxy",t[t.Unused=306]="Unused",t[t.TemporaryRedirect=307]="TemporaryRedirect",t[t.PermanentRedirect=308]="PermanentRedirect",t[t.BadRequest=400]="BadRequest",t[t.Unauthorized=401]="Unauthorized",t[t.PaymentRequired=402]="PaymentRequired",t[t.Forbidden=403]="Forbidden",t[t.NotFound=404]="NotFound",t[t.MethodNotAllowed=405]="MethodNotAllowed",t[t.NotAcceptable=406]="NotAcceptable",t[t.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",t[t.RequestTimeout=408]="RequestTimeout",t[t.Conflict=409]="Conflict",t[t.Gone=410]="Gone",t[t.LengthRequired=411]="LengthRequired",t[t.PreconditionFailed=412]="PreconditionFailed",t[t.PayloadTooLarge=413]="PayloadTooLarge",t[t.UriTooLong=414]="UriTooLong",t[t.UnsupportedMediaType=415]="UnsupportedMediaType",t[t.RangeNotSatisfiable=416]="RangeNotSatisfiable",t[t.ExpectationFailed=417]="ExpectationFailed",t[t.ImATeapot=418]="ImATeapot",t[t.MisdirectedRequest=421]="MisdirectedRequest",t[t.UnprocessableEntity=422]="UnprocessableEntity",t[t.Locked=423]="Locked",t[t.FailedDependency=424]="FailedDependency",t[t.TooEarly=425]="TooEarly",t[t.UpgradeRequired=426]="UpgradeRequired",t[t.PreconditionRequired=428]="PreconditionRequired",t[t.TooManyRequests=429]="TooManyRequests",t[t.RequestHeaderFieldsTooLarge=431]="RequestHeaderFieldsTooLarge",t[t.UnavailableForLegalReasons=451]="UnavailableForLegalReasons",t[t.InternalServerError=500]="InternalServerError",t[t.NotImplemented=501]="NotImplemented",t[t.BadGateway=502]="BadGateway",t[t.ServiceUnavailable=503]="ServiceUnavailable",t[t.GatewayTimeout=504]="GatewayTimeout",t[t.HttpVersionNotSupported=505]="HttpVersionNotSupported",t[t.VariantAlsoNegotiates=506]="VariantAlsoNegotiates",t[t.InsufficientStorage=507]="InsufficientStorage",t[t.LoopDetected=508]="LoopDetected",t[t.NotExtended=510]="NotExtended",t[t.NetworkAuthenticationRequired=511]="NetworkAuthenticationRequired",t}(G||{});function le(t,e){return{body:e,headers:t.headers,context:t.context,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials,transferCache:t.transferCache}}var bt=(()=>{let e=class e{constructor(n){this.handler=n}request(n,r,o={}){let a;if(n instanceof x)a=n;else{let c;o.headers instanceof D?c=o.headers:c=new D(o.headers);let h;o.params&&(o.params instanceof R?h=o.params:h=new R({fromObject:o.params})),a=new x(n,r,o.body!==void 0?o.body:null,{headers:c,context:o.context,params:h,reportProgress:o.reportProgress,responseType:o.responseType||"json",withCredentials:o.withCredentials,transferCache:o.transferCache})}let i=Q(a).pipe(Oe(c=>this.handler.handle(c)));if(n instanceof x||o.observe==="events")return i;let l=i.pipe(Ne(c=>c instanceof X));switch(o.observe||"body"){case"body":switch(a.responseType){case"arraybuffer":return l.pipe(S(c=>{if(c.body!==null&&!(c.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return c.body}));case"blob":return l.pipe(S(c=>{if(c.body!==null&&!(c.body instanceof Blob))throw new Error("Response is not a Blob.");return c.body}));case"text":return l.pipe(S(c=>{if(c.body!==null&&typeof c.body!="string")throw new Error("Response is not a string.");return c.body}));case"json":default:return l.pipe(S(c=>c.body))}case"response":return l;default:throw new Error(`Unreachable: unhandled observe type ${o.observe}}`)}}delete(n,r={}){return this.request("DELETE",n,r)}get(n,r={}){return this.request("GET",n,r)}head(n,r={}){return this.request("HEAD",n,r)}jsonp(n,r){return this.request("JSONP",n,{params:new R().append(r,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(n,r={}){return this.request("OPTIONS",n,r)}patch(n,r,o={}){return this.request("PATCH",n,le(o,r))}post(n,r,o={}){return this.request("POST",n,le(o,r))}put(n,r,o={}){return this.request("PUT",n,le(o,r))}};e.\u0275fac=function(r){return new(r||e)(d(C))},e.\u0275prov=m({token:e,factory:e.\u0275fac});let t=e;return t})();function tt(t,e){return e(t)}function Mt(t,e){return(s,n)=>e.intercept(s,{handle:r=>t(r,n)})}function Dt(t,e,s){return(n,r)=>Le(s,()=>e(n,o=>t(o,r)))}var At=new v(""),fe=new v(""),Pt=new v(""),Nt=new v("");function Ot(){let t=null;return(e,s)=>{t===null&&(t=(E(At,{optional:!0})??[]).reduceRight(Mt,tt));let n=E(ie),r=n.add();return t(e,s).pipe(H(()=>n.remove(r)))}}var Qe=(()=>{let e=class e extends C{constructor(n,r){super(),this.backend=n,this.injector=r,this.chain=null,this.pendingTasks=E(ie);let o=E(Nt,{optional:!0});this.backend=o??n}handle(n){if(this.chain===null){let o=Array.from(new Set([...this.injector.get(fe),...this.injector.get(Pt,[])]));this.chain=o.reduceRight((a,i)=>Dt(a,i,this.injector),tt)}let r=this.pendingTasks.add();return this.chain(n,o=>this.backend.handle(o)).pipe(H(()=>this.pendingTasks.remove(r)))}};e.\u0275fac=function(r){return new(r||e)(d(K),d(ke))},e.\u0275prov=m({token:e,factory:e.\u0275fac});let t=e;return t})();var It=/^\)\]\}',?\n/;function St(t){return"responseURL"in t&&t.responseURL?t.responseURL:/^X-Request-URL:/m.test(t.getAllResponseHeaders())?t.getResponseHeader("X-Request-URL"):null}var He=(()=>{let e=class e{constructor(n){this.xhrFactory=n}handle(n){if(n.method==="JSONP")throw new T(-2800,!1);let r=this.xhrFactory;return(r.\u0275loadImpl?Pe(r.\u0275loadImpl()):Q(null)).pipe(Ie(()=>new Ae(a=>{let i=r.build();if(i.open(n.method,n.urlWithParams),n.withCredentials&&(i.withCredentials=!0),n.headers.forEach((u,f)=>i.setRequestHeader(u,f.join(","))),n.headers.has("Accept")||i.setRequestHeader("Accept","application/json, text/plain, */*"),!n.headers.has("Content-Type")){let u=n.detectContentTypeHeader();u!==null&&i.setRequestHeader("Content-Type",u)}if(n.responseType){let u=n.responseType.toLowerCase();i.responseType=u!=="json"?u:"text"}let l=n.serializeBody(),c=null,h=()=>{if(c!==null)return c;let u=i.statusText||"OK",f=new D(i.getAllResponseHeaders()),A=St(i)||n.url;return c=new he({headers:f,status:i.status,statusText:u,url:A}),c},p=()=>{let{headers:u,status:f,statusText:A,url:Me}=h(),g=null;f!==G.NoContent&&(g=typeof i.response>"u"?i.responseText:i.response),f===0&&(f=g?G.Ok:0);let Y=f>=200&&f<300;if(n.responseType==="json"&&typeof g=="string"){let ut=g;g=g.replace(It,"");try{g=g!==""?JSON.parse(g):null}catch(ht){g=ut,Y&&(Y=!1,g={error:ht,text:g})}}Y?(a.next(new X({body:g,headers:u,status:f,statusText:A,url:Me||void 0})),a.complete()):a.error(new J({error:g,headers:u,status:f,statusText:A,url:Me||void 0}))},y=u=>{let{url:f}=h(),A=new J({error:u,status:i.status||0,statusText:i.statusText||"Unknown Error",url:f||void 0});a.error(A)},Te=!1,Re=u=>{Te||(a.next(h()),Te=!0);let f={type:I.DownloadProgress,loaded:u.loaded};u.lengthComputable&&(f.total=u.total),n.responseType==="text"&&i.responseText&&(f.partialText=i.responseText),a.next(f)},be=u=>{let f={type:I.UploadProgress,loaded:u.loaded};u.lengthComputable&&(f.total=u.total),a.next(f)};return i.addEventListener("load",p),i.addEventListener("error",y),i.addEventListener("timeout",y),i.addEventListener("abort",y),n.reportProgress&&(i.addEventListener("progress",Re),l!==null&&i.upload&&i.upload.addEventListener("progress",be)),i.send(l),a.next({type:I.Sent}),()=>{i.removeEventListener("error",y),i.removeEventListener("abort",y),i.removeEventListener("load",p),i.removeEventListener("timeout",y),n.reportProgress&&(i.removeEventListener("progress",Re),l!==null&&i.upload&&i.upload.removeEventListener("progress",be)),i.readyState!==i.DONE&&i.abort()}})))}};e.\u0275fac=function(r){return new(r||e)(d(z))},e.\u0275prov=m({token:e,factory:e.\u0275fac});let t=e;return t})(),nt=new v(""),kt="XSRF-TOKEN",Lt=new v("",{providedIn:"root",factory:()=>kt}),xt="X-XSRF-TOKEN",Ct=new v("",{providedIn:"root",factory:()=>xt}),q=class{},jt=(()=>{let e=class e{constructor(n,r,o){this.doc=n,this.platform=r,this.cookieName=o,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if(this.platform==="server")return null;let n=this.doc.cookie||"";return n!==this.lastCookieString&&(this.parseCount++,this.lastToken=V(n,this.cookieName),this.lastCookieString=n),this.lastToken}};e.\u0275fac=function(r){return new(r||e)(d(w),d(b),d(Lt))},e.\u0275prov=m({token:e,factory:e.\u0275fac});let t=e;return t})();function Ft(t,e){let s=t.url.toLowerCase();if(!E(nt)||t.method==="GET"||t.method==="HEAD"||s.startsWith("http://")||s.startsWith("https://"))return e(t);let n=E(q).getToken(),r=E(Ct);return n!=null&&!t.headers.has(r)&&(t=t.clone({headers:t.headers.set(r,n)})),e(t)}var rt=function(t){return t[t.Interceptors=0]="Interceptors",t[t.LegacyInterceptors=1]="LegacyInterceptors",t[t.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",t[t.NoXsrfProtection=3]="NoXsrfProtection",t[t.JsonpSupport=4]="JsonpSupport",t[t.RequestsMadeViaParent=5]="RequestsMadeViaParent",t[t.Fetch=6]="Fetch",t}(rt||{});function Ut(t,e){return{\u0275kind:t,\u0275providers:e}}function _t(...t){let e=[bt,He,Qe,{provide:C,useExisting:Qe},{provide:K,useExisting:He},{provide:fe,useValue:Ft,multi:!0},{provide:nt,useValue:!0},{provide:q,useClass:jt}];for(let s of t)e.push(...s.\u0275providers);return ne(e)}var et=new v("");function Bt(){return Ut(rt.LegacyInterceptors,[{provide:et,useFactory:Ot},{provide:fe,useExisting:et,multi:!0}])}var Pn=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=te({type:e}),e.\u0275inj=ee({providers:[_t(Bt())]});let t=e;return t})();var me=class extends Je{constructor(){super(...arguments),this.supportsDOMEvents=!0}},ge=class t extends me{static makeCurrent(){Xe(new t)}onAndCancel(e,s,n){return e.addEventListener(s,n),()=>{e.removeEventListener(s,n)}}dispatchEvent(e,s){e.dispatchEvent(s)}remove(e){e.parentNode&&e.parentNode.removeChild(e)}createElement(e,s){return s=s||this.getDefaultDocument(),s.createElement(e)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(e){return e.nodeType===Node.ELEMENT_NODE}isShadowRoot(e){return e instanceof DocumentFragment}getGlobalEventTarget(e,s){return s==="window"?window:s==="document"?e:s==="body"?e.body:null}getBaseHref(e){let s=zt();return s==null?null:$t(s)}resetBaseElement(){F=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return V(document.cookie,e)}},F=null;function zt(){return F=F||document.querySelector("base"),F?F.getAttribute("href"):null}function $t(t){return new URL(t,document.baseURI).pathname}var Kt=(()=>{let e=class e{build(){return new XMLHttpRequest}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=m({token:e,factory:e.\u0275fac});let t=e;return t})(),ve=new v(""),at=(()=>{let e=class e{constructor(n,r){this._zone=r,this._eventNameToPlugin=new Map,n.forEach(o=>{o.manager=this}),this._plugins=n.slice().reverse()}addEventListener(n,r,o){return this._findPluginFor(r).addEventListener(n,r,o)}getZone(){return this._zone}_findPluginFor(n){let r=this._eventNameToPlugin.get(n);if(r)return r;if(r=this._plugins.find(a=>a.supports(n)),!r)throw new T(5101,!1);return this._eventNameToPlugin.set(n,r),r}};e.\u0275fac=function(r){return new(r||e)(d(ve),d(O))},e.\u0275prov=m({token:e,factory:e.\u0275fac});let t=e;return t})(),W=class{constructor(e){this._doc=e}},pe="ng-app-id",ct=(()=>{let e=class e{constructor(n,r,o,a={}){this.doc=n,this.appId=r,this.nonce=o,this.platformId=a,this.styleRef=new Map,this.hostNodes=new Set,this.styleNodesInDOM=this.collectServerRenderedStyles(),this.platformIsServer=ce(a),this.resetHostNodes()}addStyles(n){for(let r of n)this.changeUsageCount(r,1)===1&&this.onStyleAdded(r)}removeStyles(n){for(let r of n)this.changeUsageCount(r,-1)<=0&&this.onStyleRemoved(r)}ngOnDestroy(){let n=this.styleNodesInDOM;n&&(n.forEach(r=>r.remove()),n.clear());for(let r of this.getAllStyles())this.onStyleRemoved(r);this.resetHostNodes()}addHost(n){this.hostNodes.add(n);for(let r of this.getAllStyles())this.addStyleToHost(n,r)}removeHost(n){this.hostNodes.delete(n)}getAllStyles(){return this.styleRef.keys()}onStyleAdded(n){for(let r of this.hostNodes)this.addStyleToHost(r,n)}onStyleRemoved(n){let r=this.styleRef;r.get(n)?.elements?.forEach(o=>o.remove()),r.delete(n)}collectServerRenderedStyles(){let n=this.doc.head?.querySelectorAll(`style[${pe}="${this.appId}"]`);if(n?.length){let r=new Map;return n.forEach(o=>{o.textContent!=null&&r.set(o.textContent,o)}),r}return null}changeUsageCount(n,r){let o=this.styleRef;if(o.has(n)){let a=o.get(n);return a.usage+=r,a.usage}return o.set(n,{usage:r,elements:[]}),r}getStyleElement(n,r){let o=this.styleNodesInDOM,a=o?.get(r);if(a?.parentNode===n)return o.delete(r),a.removeAttribute(pe),a;{let i=this.doc.createElement("style");return this.nonce&&i.setAttribute("nonce",this.nonce),i.textContent=r,this.platformIsServer&&i.setAttribute(pe,this.appId),n.appendChild(i),i}}addStyleToHost(n,r){let o=this.getStyleElement(n,r),a=this.styleRef,i=a.get(r)?.elements;i?i.push(o):a.set(r,{elements:[o],usage:1})}resetHostNodes(){let n=this.hostNodes;n.clear(),n.add(this.doc.head)}};e.\u0275fac=function(r){return new(r||e)(d(w),d(re),d(se,8),d(b))},e.\u0275prov=m({token:e,factory:e.\u0275fac});let t=e;return t})(),ye={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},Ee=/%COMP%/g,lt="%COMP%",Xt=`_nghost-${lt}`,Jt=`_ngcontent-${lt}`,Gt=!0,qt=new v("",{providedIn:"root",factory:()=>Gt});function Wt(t){return Jt.replace(Ee,t)}function Zt(t){return Xt.replace(Ee,t)}function dt(t,e){return e.map(s=>s.replace(Ee,t))}var st=(()=>{let e=class e{constructor(n,r,o,a,i,l,c,h=null){this.eventManager=n,this.sharedStylesHost=r,this.appId=o,this.removeStylesOnCompDestroy=a,this.doc=i,this.platformId=l,this.ngZone=c,this.nonce=h,this.rendererByCompId=new Map,this.platformIsServer=ce(l),this.defaultRenderer=new U(n,i,c,this.platformIsServer)}createRenderer(n,r){if(!n||!r)return this.defaultRenderer;this.platformIsServer&&r.encapsulation===k.ShadowDom&&(r=De(B({},r),{encapsulation:k.Emulated}));let o=this.getOrCreateRenderer(n,r);return o instanceof Z?o.applyToHost(n):o instanceof _&&o.applyStyles(),o}getOrCreateRenderer(n,r){let o=this.rendererByCompId,a=o.get(r.id);if(!a){let i=this.doc,l=this.ngZone,c=this.eventManager,h=this.sharedStylesHost,p=this.removeStylesOnCompDestroy,y=this.platformIsServer;switch(r.encapsulation){case k.Emulated:a=new Z(c,h,r,this.appId,p,i,l,y);break;case k.ShadowDom:return new we(c,h,n,r,i,l,this.nonce,y);default:a=new _(c,h,r,p,i,l,y);break}o.set(r.id,a)}return a}ngOnDestroy(){this.rendererByCompId.clear()}};e.\u0275fac=function(r){return new(r||e)(d(at),d(ct),d(re),d(qt),d(w),d(b),d(O),d(se))},e.\u0275prov=m({token:e,factory:e.\u0275fac});let t=e;return t})(),U=class{constructor(e,s,n,r){this.eventManager=e,this.doc=s,this.ngZone=n,this.platformIsServer=r,this.data=Object.create(null),this.throwOnSyntheticProps=!0,this.destroyNode=null}destroy(){}createElement(e,s){return s?this.doc.createElementNS(ye[s]||s,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,s){(ot(e)?e.content:e).appendChild(s)}insertBefore(e,s,n){e&&(ot(e)?e.content:e).insertBefore(s,n)}removeChild(e,s){e&&e.removeChild(s)}selectRootElement(e,s){let n=typeof e=="string"?this.doc.querySelector(e):e;if(!n)throw new T(-5104,!1);return s||(n.textContent=""),n}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,s,n,r){if(r){s=r+":"+s;let o=ye[r];o?e.setAttributeNS(o,s,n):e.setAttribute(s,n)}else e.setAttribute(s,n)}removeAttribute(e,s,n){if(n){let r=ye[n];r?e.removeAttributeNS(r,s):e.removeAttribute(`${n}:${s}`)}else e.removeAttribute(s)}addClass(e,s){e.classList.add(s)}removeClass(e,s){e.classList.remove(s)}setStyle(e,s,n,r){r&(L.DashCase|L.Important)?e.style.setProperty(s,n,r&L.Important?"important":""):e.style[s]=n}removeStyle(e,s,n){n&L.DashCase?e.style.removeProperty(s):e.style[s]=""}setProperty(e,s,n){e!=null&&(e[s]=n)}setValue(e,s){e.nodeValue=s}listen(e,s,n){if(typeof e=="string"&&(e=ae().getGlobalEventTarget(this.doc,e),!e))throw new Error(`Unsupported event target ${e} for event ${s}`);return this.eventManager.addEventListener(e,s,this.decoratePreventDefault(n))}decoratePreventDefault(e){return s=>{if(s==="__ngUnwrap__")return e;(this.platformIsServer?this.ngZone.runGuarded(()=>e(s)):e(s))===!1&&s.preventDefault()}}};function ot(t){return t.tagName==="TEMPLATE"&&t.content!==void 0}var we=class extends U{constructor(e,s,n,r,o,a,i,l){super(e,o,a,l),this.sharedStylesHost=s,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let c=dt(r.id,r.styles);for(let h of c){let p=document.createElement("style");i&&p.setAttribute("nonce",i),p.textContent=h,this.shadowRoot.appendChild(p)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,s){return super.appendChild(this.nodeOrShadowRoot(e),s)}insertBefore(e,s,n){return super.insertBefore(this.nodeOrShadowRoot(e),s,n)}removeChild(e,s){return super.removeChild(this.nodeOrShadowRoot(e),s)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},_=class extends U{constructor(e,s,n,r,o,a,i,l){super(e,o,a,i),this.sharedStylesHost=s,this.removeStylesOnCompDestroy=r,this.styles=l?dt(l,n.styles):n.styles}applyStyles(){this.sharedStylesHost.addStyles(this.styles)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles)}},Z=class extends _{constructor(e,s,n,r,o,a,i,l){let c=r+"-"+n.id;super(e,s,n,o,a,i,l,c),this.contentAttr=Wt(c),this.hostAttr=Zt(c)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,"")}createElement(e,s){let n=super.createElement(e,s);return super.setAttribute(n,this.contentAttr,""),n}},Yt=(()=>{let e=class e extends W{constructor(n){super(n)}supports(n){return!0}addEventListener(n,r,o){return n.addEventListener(r,o,!1),()=>this.removeEventListener(n,r,o)}removeEventListener(n,r,o){return n.removeEventListener(r,o)}};e.\u0275fac=function(r){return new(r||e)(d(w))},e.\u0275prov=m({token:e,factory:e.\u0275fac});let t=e;return t})(),it=["alt","control","meta","shift"],Qt={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Ht={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey},en=(()=>{let e=class e extends W{constructor(n){super(n)}supports(n){return e.parseEventName(n)!=null}addEventListener(n,r,o){let a=e.parseEventName(r),i=e.eventCallback(a.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>ae().onAndCancel(n,a.domEventName,i))}static parseEventName(n){let r=n.toLowerCase().split("."),o=r.shift();if(r.length===0||!(o==="keydown"||o==="keyup"))return null;let a=e._normalizeKey(r.pop()),i="",l=r.indexOf("code");if(l>-1&&(r.splice(l,1),i="code."),it.forEach(h=>{let p=r.indexOf(h);p>-1&&(r.splice(p,1),i+=h+".")}),i+=a,r.length!=0||a.length===0)return null;let c={};return c.domEventName=o,c.fullKey=i,c}static matchEventFullKeyCode(n,r){let o=Qt[n.key]||n.key,a="";return r.indexOf("code.")>-1&&(o=n.code,a="code."),o==null||!o?!1:(o=o.toLowerCase(),o===" "?o="space":o==="."&&(o="dot"),it.forEach(i=>{if(i!==o){let l=Ht[i];l(n)&&(a+=i+".")}}),a+=o,a===r)}static eventCallback(n,r,o){return a=>{e.matchEventFullKeyCode(a,n)&&o.runGuarded(()=>r(a))}}static _normalizeKey(n){return n==="esc"?"escape":n}};e.\u0275fac=function(r){return new(r||e)(d(w))},e.\u0275prov=m({token:e,factory:e.\u0275fac});let t=e;return t})();function Yn(t,e){return Ke(B({rootComponent:t},tn(e)))}function tn(t){return{appProviders:[...an,...t?.providers??[]],platformProviders:on}}function nn(){ge.makeCurrent()}function rn(){return new oe}function sn(){return xe(document),document}var on=[{provide:b,useValue:Ge},{provide:Ce,useValue:nn,multi:!0},{provide:w,useFactory:sn,deps:[]}];var an=[{provide:Se,useValue:"root"},{provide:oe,useFactory:rn,deps:[]},{provide:ve,useClass:Yt,multi:!0,deps:[w,O,b]},{provide:ve,useClass:en,multi:!0,deps:[w]},st,ct,at,{provide:$e,useExisting:st},{provide:z,useClass:Kt,deps:[]},[]];var Qn=(()=>{let e=class e{constructor(n){this._doc=n}getTitle(){return this._doc.title}setTitle(n){this._doc.title=n||""}};e.\u0275fac=function(r){return new(r||e)(d(w))},e.\u0275prov=m({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var cn=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=m({token:e,factory:function(r){let o=null;return r?o=new(r||e):o=d(ln),o},providedIn:"root"});let t=e;return t})(),ln=(()=>{let e=class e extends cn{constructor(n){super(),this._doc=n}sanitize(n,r){if(r==null)return null;switch(n){case M.NONE:return r;case M.HTML:return N(r,"HTML")?P(r):ze(this._doc,String(r)).toString();case M.STYLE:return N(r,"Style")?P(r):r;case M.SCRIPT:if(N(r,"Script"))return P(r);throw new T(5200,!1);case M.URL:return N(r,"URL")?P(r):Ve(String(r));case M.RESOURCE_URL:if(N(r,"ResourceURL"))return P(r);throw new T(5201,!1);default:throw new T(5202,!1)}}bypassSecurityTrustHtml(n){return je(n)}bypassSecurityTrustStyle(n){return Fe(n)}bypassSecurityTrustScript(n){return Ue(n)}bypassSecurityTrustUrl(n){return _e(n)}bypassSecurityTrustResourceUrl(n){return Be(n)}};e.\u0275fac=function(r){return new(r||e)(d(w))},e.\u0275prov=m({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();export{D as a,bt as b,Pn as c,st as d,Yn as e,Qn as f,cn as g};