homebridge-config-ui-x
Version:
A web based management, configuration and control platform for Homebridge.
1 lines • 79 kB
JavaScript
import{l as hn}from"./chunk-R3JWGCC5.js";import{$ as U,$b as Xr,$c as de,A as Ee,Aa as xr,B as Ar,C as Ze,Ca as Oe,Cb as Wr,Da as zt,Db as Bt,Ea as _r,Eb as Gr,Ec as tn,Fa as Ft,Fb as Qr,Gb as Kr,Gc as rn,H,Ic as nn,K as re,Kc as on,L as ne,N as Lt,Nc as tt,O as he,Qb as Yr,Qc as rt,S as Xe,Sc as sn,T as Q,U as jt,V as Tr,W as Er,Xb as Zr,Xc as an,Yc as De,Za as Lr,_ as Or,_c as un,a as l,aa as kt,ad as cn,b as D,ba as S,bc as Jr,cc as en,da as C,eb as qt,fb as x,ga as R,gb as jr,h as yr,ha as Mr,hb as kr,i as Sr,ia as Dr,ib as $r,j as Cr,ja as A,jb as zr,k as wr,ka as K,kb as et,l as xt,la as h,lb as Fr,m as _t,mb as qr,n as q,nb as Me,o as N,p as B,pa as ie,q as w,qa as L,r as d,rd as ln,s as Te,t as br,tb as oe,u as Ir,ua as $t,ub as Br,va as Nr,wa as Ur,wb as Hr,x as g,xb as Vr,y as Ye,ya as Je,z as I,za as Pr}from"./chunk-QSPBB6EE.js";var f="primary",Be=Symbol("RouteTitle"),Qt=class{params;constructor(n){this.params=n||{}}has(n){return Object.prototype.hasOwnProperty.call(this.params,n)}get(n){if(this.has(n)){let e=this.params[n];return Array.isArray(e)?e[0]:e}return null}getAll(n){if(this.has(n)){let e=this.params[n];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}};function ue(t){return new Qt(t)}function yn(t,n,e){let r=e.path.split("/");if(r.length>t.length||e.pathMatch==="full"&&(n.hasChildren()||r.length<t.length))return null;let i={};for(let o=0;o<r.length;o++){let s=r[o],a=t[o];if(s[0]===":")i[s.substring(1)]=a;else if(s!==a.path)return null}return{consumed:t.slice(0,r.length),posParams:i}}function hi(t,n){if(t.length!==n.length)return!1;for(let e=0;e<t.length;++e)if(!j(t[e],n[e]))return!1;return!0}function j(t,n){let e=t?Kt(t):void 0,r=n?Kt(n):void 0;if(!e||!r||e.length!=r.length)return!1;let i;for(let o=0;o<e.length;o++)if(i=e[o],!Sn(t[i],n[i]))return!1;return!0}function Kt(t){return[...Object.keys(t),...Object.getOwnPropertySymbols(t)]}function Sn(t,n){if(Array.isArray(t)&&Array.isArray(n)){if(t.length!==n.length)return!1;let e=[...t].sort(),r=[...n].sort();return e.every((i,o)=>r[o]===i)}else return t===n}function Cn(t){return t.length>0?t[t.length-1]:null}function W(t){return br(t)?t:Wr(t)?w(Promise.resolve(t)):d(t)}var di={exact:bn,subset:In},wn={exact:fi,subset:pi,ignored:()=>!0};function dn(t,n,e){return di[e.paths](t.root,n.root,e.matrixParams)&&wn[e.queryParams](t.queryParams,n.queryParams)&&!(e.fragment==="exact"&&t.fragment!==n.fragment)}function fi(t,n){return j(t,n)}function bn(t,n,e){if(!se(t.segments,n.segments)||!ot(t.segments,n.segments,e)||t.numberOfChildren!==n.numberOfChildren)return!1;for(let r in n.children)if(!t.children[r]||!bn(t.children[r],n.children[r],e))return!1;return!0}function pi(t,n){return Object.keys(n).length<=Object.keys(t).length&&Object.keys(n).every(e=>Sn(t[e],n[e]))}function In(t,n,e){return An(t,n,n.segments,e)}function An(t,n,e,r){if(t.segments.length>e.length){let i=t.segments.slice(0,e.length);return!(!se(i,e)||n.hasChildren()||!ot(i,e,r))}else if(t.segments.length===e.length){if(!se(t.segments,e)||!ot(t.segments,e,r))return!1;for(let i in n.children)if(!t.children[i]||!In(t.children[i],n.children[i],r))return!1;return!0}else{let i=e.slice(0,t.segments.length),o=e.slice(t.segments.length);return!se(t.segments,i)||!ot(t.segments,i,r)||!t.children[f]?!1:An(t.children[f],n,o,r)}}function ot(t,n,e){return n.every((r,i)=>wn[e](t[i].parameters,r.parameters))}var $=class{root;queryParams;fragment;_queryParamMap;constructor(n=new p([],{}),e={},r=null){this.root=n,this.queryParams=e,this.fragment=r}get queryParamMap(){return this._queryParamMap??=ue(this.queryParams),this._queryParamMap}toString(){return mi.serialize(this)}},p=class{segments;children;parent=null;constructor(n,e){this.segments=n,this.children=e,Object.values(e).forEach(r=>r.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return st(this)}},Y=class{path;parameters;_parameterMap;constructor(n,e){this.path=n,this.parameters=e}get parameterMap(){return this._parameterMap??=ue(this.parameters),this._parameterMap}toString(){return En(this)}};function gi(t,n){return se(t,n)&&t.every((e,r)=>j(e.parameters,n[r].parameters))}function se(t,n){return t.length!==n.length?!1:t.every((e,r)=>e.path===n[r].path)}function vi(t,n){let e=[];return Object.entries(t.children).forEach(([r,i])=>{r===f&&(e=e.concat(n(i,r)))}),Object.entries(t.children).forEach(([r,i])=>{r!==f&&(e=e.concat(n(i,r)))}),e}var ce=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=R({token:t,factory:()=>new Z,providedIn:"root"})}return t})(),Z=class{parse(n){let e=new Zt(n);return new $(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(n){let e=`/${Ne(n.root,!0)}`,r=Si(n.queryParams),i=typeof n.fragment=="string"?`#${Ri(n.fragment)}`:"";return`${e}${r}${i}`}},mi=new Z;function st(t){return t.segments.map(n=>En(n)).join("/")}function Ne(t,n){if(!t.hasChildren())return st(t);if(n){let e=t.children[f]?Ne(t.children[f],!1):"",r=[];return Object.entries(t.children).forEach(([i,o])=>{i!==f&&r.push(`${i}:${Ne(o,!1)}`)}),r.length>0?`${e}(${r.join("//")})`:e}else{let e=vi(t,(r,i)=>i===f?[Ne(t.children[f],!1)]:[`${i}:${Ne(r,!1)}`]);return Object.keys(t.children).length===1&&t.children[f]!=null?`${st(t)}/${e[0]}`:`${st(t)}/(${e.join("//")})`}}function Tn(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function nt(t){return Tn(t).replace(/%3B/gi,";")}function Ri(t){return encodeURI(t)}function Yt(t){return Tn(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function at(t){return decodeURIComponent(t)}function fn(t){return at(t.replace(/\+/g,"%20"))}function En(t){return`${Yt(t.path)}${yi(t.parameters)}`}function yi(t){return Object.entries(t).map(([n,e])=>`;${Yt(n)}=${Yt(e)}`).join("")}function Si(t){let n=Object.entries(t).map(([e,r])=>Array.isArray(r)?r.map(i=>`${nt(e)}=${nt(i)}`).join("&"):`${nt(e)}=${nt(r)}`).filter(e=>e);return n.length?`?${n.join("&")}`:""}var Ci=/^[^\/()?;#]+/;function Ht(t){let n=t.match(Ci);return n?n[0]:""}var wi=/^[^\/()?;=#]+/;function bi(t){let n=t.match(wi);return n?n[0]:""}var Ii=/^[^=?&#]+/;function Ai(t){let n=t.match(Ii);return n?n[0]:""}var Ti=/^[^&#]+/;function Ei(t){let n=t.match(Ti);return n?n[0]:""}var Zt=class{url;remaining;constructor(n){this.url=n,this.remaining=n}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new p([],{}):new p([],this.parseChildren())}parseQueryParams(){let n={};if(this.consumeOptional("?"))do this.parseQueryParam(n);while(this.consumeOptional("&"));return n}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(this.remaining==="")return{};this.consumeOptional("/");let n=[];for(this.peekStartsWith("(")||n.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),n.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let r={};return this.peekStartsWith("(")&&(r=this.parseParens(!1)),(n.length>0||Object.keys(e).length>0)&&(r[f]=new p(n,e)),r}parseSegment(){let n=Ht(this.remaining);if(n===""&&this.peekStartsWith(";"))throw new C(4009,!1);return this.capture(n),new Y(at(n),this.parseMatrixParams())}parseMatrixParams(){let n={};for(;this.consumeOptional(";");)this.parseParam(n);return n}parseParam(n){let e=bi(this.remaining);if(!e)return;this.capture(e);let r="";if(this.consumeOptional("=")){let i=Ht(this.remaining);i&&(r=i,this.capture(r))}n[at(e)]=at(r)}parseQueryParam(n){let e=Ai(this.remaining);if(!e)return;this.capture(e);let r="";if(this.consumeOptional("=")){let s=Ei(this.remaining);s&&(r=s,this.capture(r))}let i=fn(e),o=fn(r);if(n.hasOwnProperty(i)){let s=n[i];Array.isArray(s)||(s=[s],n[i]=s),s.push(o)}else n[i]=o}parseParens(n){let e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let r=Ht(this.remaining),i=this.remaining[r.length];if(i!=="/"&&i!==")"&&i!==";")throw new C(4010,!1);let o;r.indexOf(":")>-1?(o=r.slice(0,r.indexOf(":")),this.capture(o),this.capture(":")):n&&(o=f);let s=this.parseChildren();e[o]=Object.keys(s).length===1?s[f]:new p([],s),this.consumeOptional("//")}return e}peekStartsWith(n){return this.remaining.startsWith(n)}consumeOptional(n){return this.peekStartsWith(n)?(this.remaining=this.remaining.substring(n.length),!0):!1}capture(n){if(!this.consumeOptional(n))throw new C(4011,!1)}};function On(t){return t.segments.length>0?new p([],{[f]:t}):t}function Mn(t){let n={};for(let[r,i]of Object.entries(t.children)){let o=Mn(i);if(r===f&&o.segments.length===0&&o.hasChildren())for(let[s,a]of Object.entries(o.children))n[s]=a;else(o.segments.length>0||o.hasChildren())&&(n[r]=o)}let e=new p(t.segments,n);return Oi(e)}function Oi(t){if(t.numberOfChildren===1&&t.children[f]){let n=t.children[f];return new p(t.segments.concat(n.segments),n.children)}return t}function X(t){return t instanceof $}function Dn(t,n,e=null,r=null){let i=Nn(t);return Un(i,n,e,r)}function Nn(t){let n;function e(o){let s={};for(let u of o.children){let c=e(u);s[u.outlet]=c}let a=new p(o.url,s);return o===t&&(n=a),a}let r=e(t.root),i=On(r);return n??i}function Un(t,n,e,r){let i=t;for(;i.parent;)i=i.parent;if(n.length===0)return Vt(i,i,i,e,r);let o=Mi(n);if(o.toRoot())return Vt(i,i,new p([],{}),e,r);let s=Di(o,i,t),a=s.processChildren?Pe(s.segmentGroup,s.index,o.commands):xn(s.segmentGroup,s.index,o.commands);return Vt(i,s.segmentGroup,a,e,r)}function ut(t){return typeof t=="object"&&t!=null&&!t.outlets&&!t.segmentPath}function _e(t){return typeof t=="object"&&t!=null&&t.outlets}function Vt(t,n,e,r,i){let o={};r&&Object.entries(r).forEach(([u,c])=>{o[u]=Array.isArray(c)?c.map(v=>`${v}`):`${c}`});let s;t===n?s=e:s=Pn(t,n,e);let a=On(Mn(s));return new $(a,o,i)}function Pn(t,n,e){let r={};return Object.entries(t.children).forEach(([i,o])=>{o===n?r[i]=e:r[i]=Pn(o,n,e)}),new p(t.segments,r)}var ct=class{isAbsolute;numberOfDoubleDots;commands;constructor(n,e,r){if(this.isAbsolute=n,this.numberOfDoubleDots=e,this.commands=r,n&&r.length>0&&ut(r[0]))throw new C(4003,!1);let i=r.find(_e);if(i&&i!==Cn(r))throw new C(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function Mi(t){if(typeof t[0]=="string"&&t.length===1&&t[0]==="/")return new ct(!0,0,t);let n=0,e=!1,r=t.reduce((i,o,s)=>{if(typeof o=="object"&&o!=null){if(o.outlets){let a={};return Object.entries(o.outlets).forEach(([u,c])=>{a[u]=typeof c=="string"?c.split("/"):c}),[...i,{outlets:a}]}if(o.segmentPath)return[...i,o.segmentPath]}return typeof o!="string"?[...i,o]:s===0?(o.split("/").forEach((a,u)=>{u==0&&a==="."||(u==0&&a===""?e=!0:a===".."?n++:a!=""&&i.push(a))}),i):[...i,o]},[]);return new ct(e,n,r)}var ge=class{segmentGroup;processChildren;index;constructor(n,e,r){this.segmentGroup=n,this.processChildren=e,this.index=r}};function Di(t,n,e){if(t.isAbsolute)return new ge(n,!0,0);if(!e)return new ge(n,!1,NaN);if(e.parent===null)return new ge(e,!0,0);let r=ut(t.commands[0])?0:1,i=e.segments.length-1+r;return Ni(e,i,t.numberOfDoubleDots)}function Ni(t,n,e){let r=t,i=n,o=e;for(;o>i;){if(o-=i,r=r.parent,!r)throw new C(4005,!1);i=r.segments.length}return new ge(r,!1,i-o)}function Ui(t){return _e(t[0])?t[0].outlets:{[f]:t}}function xn(t,n,e){if(t??=new p([],{}),t.segments.length===0&&t.hasChildren())return Pe(t,n,e);let r=Pi(t,n,e),i=e.slice(r.commandIndex);if(r.match&&r.pathIndex<t.segments.length){let o=new p(t.segments.slice(0,r.pathIndex),{});return o.children[f]=new p(t.segments.slice(r.pathIndex),t.children),Pe(o,0,i)}else return r.match&&i.length===0?new p(t.segments,{}):r.match&&!t.hasChildren()?Xt(t,n,e):r.match?Pe(t,0,i):Xt(t,n,e)}function Pe(t,n,e){if(e.length===0)return new p(t.segments,{});{let r=Ui(e),i={};if(Object.keys(r).some(o=>o!==f)&&t.children[f]&&t.numberOfChildren===1&&t.children[f].segments.length===0){let o=Pe(t.children[f],n,e);return new p(t.segments,o.children)}return Object.entries(r).forEach(([o,s])=>{typeof s=="string"&&(s=[s]),s!==null&&(i[o]=xn(t.children[o],n,s))}),Object.entries(t.children).forEach(([o,s])=>{r[o]===void 0&&(i[o]=s)}),new p(t.segments,i)}}function Pi(t,n,e){let r=0,i=n,o={match:!1,pathIndex:0,commandIndex:0};for(;i<t.segments.length;){if(r>=e.length)return o;let s=t.segments[i],a=e[r];if(_e(a))break;let u=`${a}`,c=r<e.length-1?e[r+1]:null;if(i>0&&u===void 0)break;if(u&&c&&typeof c=="object"&&c.outlets===void 0){if(!gn(u,c,s))return o;r+=2}else{if(!gn(u,{},s))return o;r++}i++}return{match:!0,pathIndex:i,commandIndex:r}}function Xt(t,n,e){let r=t.segments.slice(0,n),i=0;for(;i<e.length;){let o=e[i];if(_e(o)){let u=xi(o.outlets);return new p(r,u)}if(i===0&&ut(e[0])){let u=t.segments[n];r.push(new Y(u.path,pn(e[0]))),i++;continue}let s=_e(o)?o.outlets[f]:`${o}`,a=i<e.length-1?e[i+1]:null;s&&a&&ut(a)?(r.push(new Y(s,pn(a))),i+=2):(r.push(new Y(s,{})),i++)}return new p(r,{})}function xi(t){let n={};return Object.entries(t).forEach(([e,r])=>{typeof r=="string"&&(r=[r]),r!==null&&(n[e]=Xt(new p([],{}),0,r))}),n}function pn(t){let n={};return Object.entries(t).forEach(([e,r])=>n[e]=`${r}`),n}function gn(t,n,e){return t==e.path&&j(n,e.parameters)}var ve="imperative",m=function(t){return t[t.NavigationStart=0]="NavigationStart",t[t.NavigationEnd=1]="NavigationEnd",t[t.NavigationCancel=2]="NavigationCancel",t[t.NavigationError=3]="NavigationError",t[t.RoutesRecognized=4]="RoutesRecognized",t[t.ResolveStart=5]="ResolveStart",t[t.ResolveEnd=6]="ResolveEnd",t[t.GuardsCheckStart=7]="GuardsCheckStart",t[t.GuardsCheckEnd=8]="GuardsCheckEnd",t[t.RouteConfigLoadStart=9]="RouteConfigLoadStart",t[t.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",t[t.ChildActivationStart=11]="ChildActivationStart",t[t.ChildActivationEnd=12]="ChildActivationEnd",t[t.ActivationStart=13]="ActivationStart",t[t.ActivationEnd=14]="ActivationEnd",t[t.Scroll=15]="Scroll",t[t.NavigationSkipped=16]="NavigationSkipped",t}(m||{}),O=class{id;url;constructor(n,e){this.id=n,this.url=e}},J=class extends O{type=m.NavigationStart;navigationTrigger;restoredState;constructor(n,e,r="imperative",i=null){super(n,e),this.navigationTrigger=r,this.restoredState=i}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},M=class extends O{urlAfterRedirects;type=m.NavigationEnd;constructor(n,e,r){super(n,e),this.urlAfterRedirects=r}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},b=function(t){return t[t.Redirect=0]="Redirect",t[t.SupersededByNewNavigation=1]="SupersededByNewNavigation",t[t.NoDataFromResolver=2]="NoDataFromResolver",t[t.GuardRejected=3]="GuardRejected",t[t.Aborted=4]="Aborted",t}(b||{}),Re=function(t){return t[t.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",t[t.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",t}(Re||{}),k=class extends O{reason;code;type=m.NavigationCancel;constructor(n,e,r,i){super(n,e),this.reason=r,this.code=i}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},z=class extends O{reason;code;type=m.NavigationSkipped;constructor(n,e,r,i){super(n,e),this.reason=r,this.code=i}},ye=class extends O{error;target;type=m.NavigationError;constructor(n,e,r,i){super(n,e),this.error=r,this.target=i}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},Le=class extends O{urlAfterRedirects;state;type=m.RoutesRecognized;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},lt=class extends O{urlAfterRedirects;state;type=m.GuardsCheckStart;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},ht=class extends O{urlAfterRedirects;state;shouldActivate;type=m.GuardsCheckEnd;constructor(n,e,r,i,o){super(n,e),this.urlAfterRedirects=r,this.state=i,this.shouldActivate=o}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},dt=class extends O{urlAfterRedirects;state;type=m.ResolveStart;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},ft=class extends O{urlAfterRedirects;state;type=m.ResolveEnd;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},pt=class{route;type=m.RouteConfigLoadStart;constructor(n){this.route=n}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},gt=class{route;type=m.RouteConfigLoadEnd;constructor(n){this.route=n}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},vt=class{snapshot;type=m.ChildActivationStart;constructor(n){this.snapshot=n}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},mt=class{snapshot;type=m.ChildActivationEnd;constructor(n){this.snapshot=n}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Rt=class{snapshot;type=m.ActivationStart;constructor(n){this.snapshot=n}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},yt=class{snapshot;type=m.ActivationEnd;constructor(n){this.snapshot=n}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Se=class{routerEvent;position;anchor;type=m.Scroll;constructor(n,e,r){this.routerEvent=n,this.position=e,this.anchor=r}toString(){let n=this.position?`${this.position[0]}, ${this.position[1]}`:null;return`Scroll(anchor: '${this.anchor}', position: '${n}')`}},je=class{},Ce=class{url;navigationBehaviorOptions;constructor(n,e){this.url=n,this.navigationBehaviorOptions=e}};function _i(t){return!(t instanceof je)&&!(t instanceof Ce)}function Li(t,n){return t.providers&&!t._injector&&(t._injector=et(t.providers,n,`Route: ${t.path}`)),t._injector??n}function _(t){return t.outlet||f}function ji(t,n){let e=t.filter(r=>_(r)===n);return e.push(...t.filter(r=>_(r)!==n)),e}function He(t){if(!t)return null;if(t.routeConfig?._injector)return t.routeConfig._injector;for(let n=t.parent;n;n=n.parent){let e=n.routeConfig;if(e?._loadedInjector)return e._loadedInjector;if(e?._injector)return e._injector}return null}var St=class{rootInjector;outlet=null;route=null;children;attachRef=null;get injector(){return He(this.route?.snapshot)??this.rootInjector}constructor(n){this.rootInjector=n,this.children=new le(this.rootInjector)}},le=(()=>{class t{rootInjector;contexts=new Map;constructor(e){this.rootInjector=e}onChildOutletCreated(e,r){let i=this.getOrCreateContext(e);i.outlet=r,this.contexts.set(e,i)}onChildOutletDestroyed(e){let r=this.getContext(e);r&&(r.outlet=null,r.attachRef=null)}onOutletDeactivated(){let e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let r=this.getContext(e);return r||(r=new St(this.rootInjector),this.contexts.set(e,r)),r}getContext(e){return this.contexts.get(e)||null}static \u0275fac=function(r){return new(r||t)(K(ie))};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Ct=class{_root;constructor(n){this._root=n}get root(){return this._root.value}parent(n){let e=this.pathFromRoot(n);return e.length>1?e[e.length-2]:null}children(n){let e=Jt(n,this._root);return e?e.children.map(r=>r.value):[]}firstChild(n){let e=Jt(n,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(n){let e=er(n,this._root);return e.length<2?[]:e[e.length-2].children.map(i=>i.value).filter(i=>i!==n)}pathFromRoot(n){return er(n,this._root).map(e=>e.value)}};function Jt(t,n){if(t===n.value)return n;for(let e of n.children){let r=Jt(t,e);if(r)return r}return null}function er(t,n){if(t===n.value)return[n];for(let e of n.children){let r=er(t,e);if(r.length)return r.unshift(n),r}return[]}var E=class{value;children;constructor(n,e){this.value=n,this.children=e}toString(){return`TreeNode(${this.value})`}};function pe(t){let n={};return t&&t.children.forEach(e=>n[e.value.outlet]=e),n}var ke=class extends Ct{snapshot;constructor(n,e){super(n),this.snapshot=e,ur(this,n)}toString(){return this.snapshot.toString()}};function _n(t){let n=ki(t),e=new N([new Y("",{})]),r=new N({}),i=new N({}),o=new N({}),s=new N(""),a=new V(e,r,o,s,i,f,t,n.root);return a.snapshot=n.root,new ke(new E(a,[]),n)}function ki(t){let n={},e={},r={},i="",o=new ae([],n,r,i,e,f,t,null,{});return new $e("",new E(o,[]))}var V=class{urlSubject;paramsSubject;queryParamsSubject;fragmentSubject;dataSubject;outlet;component;snapshot;_futureSnapshot;_routerState;_paramMap;_queryParamMap;title;url;params;queryParams;fragment;data;constructor(n,e,r,i,o,s,a,u){this.urlSubject=n,this.paramsSubject=e,this.queryParamsSubject=r,this.fragmentSubject=i,this.dataSubject=o,this.outlet=s,this.component=a,this._futureSnapshot=u,this.title=this.dataSubject?.pipe(g(c=>c[Be]))??d(void 0),this.url=n,this.params=e,this.queryParams=r,this.fragment=i,this.data=o}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(g(n=>ue(n))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(g(n=>ue(n))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function wt(t,n,e="emptyOnly"){let r,{routeConfig:i}=t;return n!==null&&(e==="always"||i?.path===""||!n.component&&!n.routeConfig?.loadComponent)?r={params:l(l({},n.params),t.params),data:l(l({},n.data),t.data),resolve:l(l(l(l({},t.data),n.data),i?.data),t._resolvedData)}:r={params:l({},t.params),data:l({},t.data),resolve:l(l({},t.data),t._resolvedData??{})},i&&jn(i)&&(r.resolve[Be]=i.title),r}var ae=class{url;params;queryParams;fragment;data;outlet;component;routeConfig;_resolve;_resolvedData;_routerState;_paramMap;_queryParamMap;get title(){return this.data?.[Be]}constructor(n,e,r,i,o,s,a,u,c){this.url=n,this.params=e,this.queryParams=r,this.fragment=i,this.data=o,this.outlet=s,this.component=a,this.routeConfig=u,this._resolve=c}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=ue(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=ue(this.queryParams),this._queryParamMap}toString(){let n=this.url.map(r=>r.toString()).join("/"),e=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${n}', path:'${e}')`}},$e=class extends Ct{url;constructor(n,e){super(e),this.url=n,ur(this,e)}toString(){return Ln(this._root)}};function ur(t,n){n.value._routerState=t,n.children.forEach(e=>ur(t,e))}function Ln(t){let n=t.children.length>0?` { ${t.children.map(Ln).join(", ")} } `:"";return`${t.value}${n}`}function Wt(t){if(t.snapshot){let n=t.snapshot,e=t._futureSnapshot;t.snapshot=e,j(n.queryParams,e.queryParams)||t.queryParamsSubject.next(e.queryParams),n.fragment!==e.fragment&&t.fragmentSubject.next(e.fragment),j(n.params,e.params)||t.paramsSubject.next(e.params),hi(n.url,e.url)||t.urlSubject.next(e.url),j(n.data,e.data)||t.dataSubject.next(e.data)}else t.snapshot=t._futureSnapshot,t.dataSubject.next(t._futureSnapshot.data)}function tr(t,n){let e=j(t.params,n.params)&&gi(t.url,n.url),r=!t.parent!=!n.parent;return e&&!r&&(!t.parent||tr(t.parent,n.parent))}function jn(t){return typeof t.title=="string"||t.title===null}var kn=new A(""),cr=(()=>{class t{activated=null;get activatedComponentRef(){return this.activated}_activatedRoute=null;name=f;activateEvents=new oe;deactivateEvents=new oe;attachEvents=new oe;detachEvents=new oe;routerOutletData=on(void 0);parentContexts=h(le);location=h(kr);changeDetector=h(tt);inputBinder=h(Ve,{optional:!0});supportsBindingToComponentInputs=!0;ngOnChanges(e){if(e.name){let{firstChange:r,previousValue:i}=e.name;if(r)return;this.isTrackedInParentContexts(i)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(i)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(e){return this.parentContexts.getContext(e)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let e=this.parentContexts.getContext(this.name);e?.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new C(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new C(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new C(4012,!1);this.location.detach();let e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,r){this.activated=e,this._activatedRoute=r,this.location.insert(e.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){let e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,r){if(this.isActivated)throw new C(4013,!1);this._activatedRoute=e;let i=this.location,s=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,u=new rr(e,a,i.injector,this.routerOutletData);this.activated=i.createComponent(s,{index:i.length,injector:u,environmentInjector:r}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Me({type:t,selectors:[["router-outlet"]],inputs:{name:"name",routerOutletData:[1,"routerOutletData"]},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],features:[Oe]})}return t})(),rr=class{route;childContexts;parent;outletData;constructor(n,e,r,i){this.route=n,this.childContexts=e,this.parent=r,this.outletData=i}get(n,e){return n===V?this.route:n===le?this.childContexts:n===kn?this.outletData:this.parent.get(n,e)}},Ve=new A(""),lr=(()=>{class t{outletDataSubscriptions=new Map;bindActivatedRouteToOutletComponent(e){this.unsubscribeFromRouteData(e),this.subscribeToRouteData(e)}unsubscribeFromRouteData(e){this.outletDataSubscriptions.get(e)?.unsubscribe(),this.outletDataSubscriptions.delete(e)}subscribeToRouteData(e){let{activatedRoute:r}=e,i=Ye([r.queryParams,r.params,r.data]).pipe(U(([o,s,a],u)=>(a=l(l(l({},o),s),a),u===0?d(a):Promise.resolve(a)))).subscribe(o=>{if(!e.isActivated||!e.activatedComponentRef||e.activatedRoute!==r||r.component===null){this.unsubscribeFromRouteData(e);return}let s=sn(r.component);if(!s){this.unsubscribeFromRouteData(e);return}for(let{templateName:a}of s.inputs)e.activatedComponentRef.setInput(a,o[a])});this.outletDataSubscriptions.set(e,i)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})(),hr=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Fr({type:t,selectors:[["ng-component"]],exportAs:["emptyRouterOutlet"],decls:1,vars:0,template:function(r,i){r&1&&Yr(0,"router-outlet")},dependencies:[cr],encapsulation:2})}return t})();function dr(t){let n=t.children&&t.children.map(dr),e=n?D(l({},t),{children:n}):l({},t);return!e.component&&!e.loadComponent&&(n||e.loadChildren)&&e.outlet&&e.outlet!==f&&(e.component=hr),e}function $i(t,n,e){let r=ze(t,n._root,e?e._root:void 0);return new ke(r,n)}function ze(t,n,e){if(e&&t.shouldReuseRoute(n.value,e.value.snapshot)){let r=e.value;r._futureSnapshot=n.value;let i=zi(t,n,e);return new E(r,i)}else{if(t.shouldAttach(n.value)){let o=t.retrieve(n.value);if(o!==null){let s=o.route;return s.value._futureSnapshot=n.value,s.children=n.children.map(a=>ze(t,a)),s}}let r=Fi(n.value),i=n.children.map(o=>ze(t,o));return new E(r,i)}}function zi(t,n,e){return n.children.map(r=>{for(let i of e.children)if(t.shouldReuseRoute(r.value,i.value.snapshot))return ze(t,r,i);return ze(t,r)})}function Fi(t){return new V(new N(t.url),new N(t.params),new N(t.queryParams),new N(t.fragment),new N(t.data),t.outlet,t.component,t)}var we=class{redirectTo;navigationBehaviorOptions;constructor(n,e){this.redirectTo=n,this.navigationBehaviorOptions=e}},$n="ngNavigationCancelingError";function bt(t,n){let{redirectTo:e,navigationBehaviorOptions:r}=X(n)?{redirectTo:n,navigationBehaviorOptions:void 0}:n,i=zn(!1,b.Redirect);return i.url=e,i.navigationBehaviorOptions=r,i}function zn(t,n){let e=new Error(`NavigationCancelingError: ${t||""}`);return e[$n]=!0,e.cancellationCode=n,e}function qi(t){return Fn(t)&&X(t.url)}function Fn(t){return!!t&&t[$n]}var Bi=(t,n,e,r)=>g(i=>(new nr(n,i.targetRouterState,i.currentRouterState,e,r).activate(t),i)),nr=class{routeReuseStrategy;futureState;currState;forwardEvent;inputBindingEnabled;constructor(n,e,r,i,o){this.routeReuseStrategy=n,this.futureState=e,this.currState=r,this.forwardEvent=i,this.inputBindingEnabled=o}activate(n){let e=this.futureState._root,r=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,r,n),Wt(this.futureState.root),this.activateChildRoutes(e,r,n)}deactivateChildRoutes(n,e,r){let i=pe(e);n.children.forEach(o=>{let s=o.value.outlet;this.deactivateRoutes(o,i[s],r),delete i[s]}),Object.values(i).forEach(o=>{this.deactivateRouteAndItsChildren(o,r)})}deactivateRoutes(n,e,r){let i=n.value,o=e?e.value:null;if(i===o)if(i.component){let s=r.getContext(i.outlet);s&&this.deactivateChildRoutes(n,e,s.children)}else this.deactivateChildRoutes(n,e,r);else o&&this.deactivateRouteAndItsChildren(e,r)}deactivateRouteAndItsChildren(n,e){n.value.component&&this.routeReuseStrategy.shouldDetach(n.value.snapshot)?this.detachAndStoreRouteSubtree(n,e):this.deactivateRouteAndOutlet(n,e)}detachAndStoreRouteSubtree(n,e){let r=e.getContext(n.value.outlet),i=r&&n.value.component?r.children:e,o=pe(n);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,i);if(r&&r.outlet){let s=r.outlet.detach(),a=r.children.onOutletDeactivated();this.routeReuseStrategy.store(n.value.snapshot,{componentRef:s,route:n,contexts:a})}}deactivateRouteAndOutlet(n,e){let r=e.getContext(n.value.outlet),i=r&&n.value.component?r.children:e,o=pe(n);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,i);r&&(r.outlet&&(r.outlet.deactivate(),r.children.onOutletDeactivated()),r.attachRef=null,r.route=null)}activateChildRoutes(n,e,r){let i=pe(e);n.children.forEach(o=>{this.activateRoutes(o,i[o.value.outlet],r),this.forwardEvent(new yt(o.value.snapshot))}),n.children.length&&this.forwardEvent(new mt(n.value.snapshot))}activateRoutes(n,e,r){let i=n.value,o=e?e.value:null;if(Wt(i),i===o)if(i.component){let s=r.getOrCreateContext(i.outlet);this.activateChildRoutes(n,e,s.children)}else this.activateChildRoutes(n,e,r);else if(i.component){let s=r.getOrCreateContext(i.outlet);if(this.routeReuseStrategy.shouldAttach(i.snapshot)){let a=this.routeReuseStrategy.retrieve(i.snapshot);this.routeReuseStrategy.store(i.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),Wt(a.route.value),this.activateChildRoutes(n,null,s.children)}else s.attachRef=null,s.route=i,s.outlet&&s.outlet.activateWith(i,s.injector),this.activateChildRoutes(n,null,s.children)}else this.activateChildRoutes(n,null,r)}},It=class{path;route;constructor(n){this.path=n,this.route=this.path[this.path.length-1]}},me=class{component;route;constructor(n,e){this.component=n,this.route=e}};function Hi(t,n,e){let r=t._root,i=n?n._root:null;return Ue(r,i,e,[r.value])}function Vi(t){let n=t.routeConfig?t.routeConfig.canActivateChild:null;return!n||n.length===0?null:{node:t,guards:n}}function Ie(t,n){let e=Symbol(),r=n.get(t,e);return r===e?typeof t=="function"&&!Dr(t)?t:n.get(t):r}function Ue(t,n,e,r,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=pe(n);return t.children.forEach(s=>{Wi(s,o[s.value.outlet],e,r.concat([s.value]),i),delete o[s.value.outlet]}),Object.entries(o).forEach(([s,a])=>xe(a,e.getContext(s),i)),i}function Wi(t,n,e,r,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=t.value,s=n?n.value:null,a=e?e.getContext(t.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){let u=Gi(s,o,o.routeConfig.runGuardsAndResolvers);u?i.canActivateChecks.push(new It(r)):(o.data=s.data,o._resolvedData=s._resolvedData),o.component?Ue(t,n,a?a.children:null,r,i):Ue(t,n,e,r,i),u&&a&&a.outlet&&a.outlet.isActivated&&i.canDeactivateChecks.push(new me(a.outlet.component,s))}else s&&xe(n,a,i),i.canActivateChecks.push(new It(r)),o.component?Ue(t,null,a?a.children:null,r,i):Ue(t,null,e,r,i);return i}function Gi(t,n,e){if(typeof e=="function")return e(t,n);switch(e){case"pathParamsChange":return!se(t.url,n.url);case"pathParamsOrQueryParamsChange":return!se(t.url,n.url)||!j(t.queryParams,n.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!tr(t,n)||!j(t.queryParams,n.queryParams);case"paramsChange":default:return!tr(t,n)}}function xe(t,n,e){let r=pe(t),i=t.value;Object.entries(r).forEach(([o,s])=>{i.component?n?xe(s,n.children.getContext(o),e):xe(s,null,e):xe(s,n,e)}),i.component?n&&n.outlet&&n.outlet.isActivated?e.canDeactivateChecks.push(new me(n.outlet.component,i)):e.canDeactivateChecks.push(new me(null,i)):e.canDeactivateChecks.push(new me(null,i))}function We(t){return typeof t=="function"}function Qi(t){return typeof t=="boolean"}function Ki(t){return t&&We(t.canLoad)}function Yi(t){return t&&We(t.canActivate)}function Zi(t){return t&&We(t.canActivateChild)}function Xi(t){return t&&We(t.canDeactivate)}function Ji(t){return t&&We(t.canMatch)}function qn(t){return t instanceof Ir||t?.name==="EmptyError"}var it=Symbol("INITIAL_VALUE");function be(){return U(t=>Ye(t.map(n=>n.pipe(he(1),Or(it)))).pipe(g(n=>{for(let e of n)if(e!==!0){if(e===it)return it;if(e===!1||eo(e))return e}return!0}),H(n=>n!==it),he(1)))}function eo(t){return X(t)||t instanceof we}function to(t,n){return I(e=>{let{targetSnapshot:r,currentSnapshot:i,guards:{canActivateChecks:o,canDeactivateChecks:s}}=e;return s.length===0&&o.length===0?d(D(l({},e),{guardsResult:!0})):ro(s,r,i,t).pipe(I(a=>a&&Qi(a)?no(r,o,t,n):d(a)),g(a=>D(l({},e),{guardsResult:a})))})}function ro(t,n,e,r){return w(t).pipe(I(i=>uo(i.component,i.route,e,n,r)),Q(i=>i!==!0,!0))}function no(t,n,e,r){return w(n).pipe(ne(i=>Ar(oo(i.route.parent,r),io(i.route,r),ao(t,i.path,e),so(t,i.route,e))),Q(i=>i!==!0,!0))}function io(t,n){return t!==null&&n&&n(new Rt(t)),d(!0)}function oo(t,n){return t!==null&&n&&n(new vt(t)),d(!0)}function so(t,n,e){let r=n.routeConfig?n.routeConfig.canActivate:null;if(!r||r.length===0)return d(!0);let i=r.map(o=>Ze(()=>{let s=He(n)??e,a=Ie(o,s),u=Yi(a)?a.canActivate(n,t):L(s,()=>a(n,t));return W(u).pipe(Q())}));return d(i).pipe(be())}function ao(t,n,e){let r=n[n.length-1],o=n.slice(0,n.length-1).reverse().map(s=>Vi(s)).filter(s=>s!==null).map(s=>Ze(()=>{let a=s.guards.map(u=>{let c=He(s.node)??e,v=Ie(u,c),y=Zi(v)?v.canActivateChild(r,t):L(c,()=>v(r,t));return W(y).pipe(Q())});return d(a).pipe(be())}));return d(o).pipe(be())}function uo(t,n,e,r,i){let o=n&&n.routeConfig?n.routeConfig.canDeactivate:null;if(!o||o.length===0)return d(!0);let s=o.map(a=>{let u=He(n)??i,c=Ie(a,u),v=Xi(c)?c.canDeactivate(t,n,e,r):L(u,()=>c(t,n,e,r));return W(v).pipe(Q())});return d(s).pipe(be())}function co(t,n,e,r){let i=n.canLoad;if(i===void 0||i.length===0)return d(!0);let o=i.map(s=>{let a=Ie(s,t),u=Ki(a)?a.canLoad(n,e):L(t,()=>a(n,e));return W(u)});return d(o).pipe(be(),Bn(r))}function Bn(t){return Cr(S(n=>{if(typeof n!="boolean")throw bt(t,n)}),g(n=>n===!0))}function lo(t,n,e,r){let i=n.canMatch;if(!i||i.length===0)return d(!0);let o=i.map(s=>{let a=Ie(s,t),u=Ji(a)?a.canMatch(n,e):L(t,()=>a(n,e));return W(u)});return d(o).pipe(be(),Bn(r))}var Fe=class{segmentGroup;constructor(n){this.segmentGroup=n||null}},qe=class extends Error{urlTree;constructor(n){super(),this.urlTree=n}};function fe(t){return Te(new Fe(t))}function ho(t){return Te(new C(4e3,!1))}function fo(t){return Te(zn(!1,b.GuardRejected))}var ir=class{urlSerializer;urlTree;constructor(n,e){this.urlSerializer=n,this.urlTree=e}lineralizeSegments(n,e){let r=[],i=e.root;for(;;){if(r=r.concat(i.segments),i.numberOfChildren===0)return d(r);if(i.numberOfChildren>1||!i.children[f])return ho(`${n.redirectTo}`);i=i.children[f]}}applyRedirectCommands(n,e,r,i,o){return po(e,i,o).pipe(g(s=>{if(s instanceof $)throw new qe(s);let a=this.applyRedirectCreateUrlTree(s,this.urlSerializer.parse(s),n,r);if(s[0]==="/")throw new qe(a);return a}))}applyRedirectCreateUrlTree(n,e,r,i){let o=this.createSegmentGroup(n,e.root,r,i);return new $(o,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(n,e){let r={};return Object.entries(n).forEach(([i,o])=>{if(typeof o=="string"&&o[0]===":"){let a=o.substring(1);r[i]=e[a]}else r[i]=o}),r}createSegmentGroup(n,e,r,i){let o=this.createSegments(n,e.segments,r,i),s={};return Object.entries(e.children).forEach(([a,u])=>{s[a]=this.createSegmentGroup(n,u,r,i)}),new p(o,s)}createSegments(n,e,r,i){return e.map(o=>o.path[0]===":"?this.findPosParam(n,o,i):this.findOrReturn(o,r))}findPosParam(n,e,r){let i=r[e.path.substring(1)];if(!i)throw new C(4001,!1);return i}findOrReturn(n,e){let r=0;for(let i of e){if(i.path===n.path)return e.splice(r),i;r++}return n}};function po(t,n,e){if(typeof t=="string")return d(t);let r=t,{queryParams:i,fragment:o,routeConfig:s,url:a,outlet:u,params:c,data:v,title:y}=n;return W(L(e,()=>r({params:c,data:v,queryParams:i,fragment:o,routeConfig:s,url:a,outlet:u,title:y})))}var or={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function go(t,n,e,r,i){let o=Hn(t,n,e);return o.matched?(r=Li(n,r),lo(r,n,e,i).pipe(g(s=>s===!0?o:l({},or)))):d(o)}function Hn(t,n,e){if(n.path==="**")return vo(e);if(n.path==="")return n.pathMatch==="full"&&(t.hasChildren()||e.length>0)?l({},or):{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};let i=(n.matcher||yn)(e,t,n);if(!i)return l({},or);let o={};Object.entries(i.posParams??{}).forEach(([a,u])=>{o[a]=u.path});let s=i.consumed.length>0?l(l({},o),i.consumed[i.consumed.length-1].parameters):o;return{matched:!0,consumedSegments:i.consumed,remainingSegments:e.slice(i.consumed.length),parameters:s,positionalParamSegments:i.posParams??{}}}function vo(t){return{matched:!0,parameters:t.length>0?Cn(t).parameters:{},consumedSegments:t,remainingSegments:[],positionalParamSegments:{}}}function vn(t,n,e,r){return e.length>0&&yo(t,e,r)?{segmentGroup:new p(n,Ro(r,new p(e,t.children))),slicedSegments:[]}:e.length===0&&So(t,e,r)?{segmentGroup:new p(t.segments,mo(t,e,r,t.children)),slicedSegments:e}:{segmentGroup:new p(t.segments,t.children),slicedSegments:e}}function mo(t,n,e,r){let i={};for(let o of e)if(Tt(t,n,o)&&!r[_(o)]){let s=new p([],{});i[_(o)]=s}return l(l({},r),i)}function Ro(t,n){let e={};e[f]=n;for(let r of t)if(r.path===""&&_(r)!==f){let i=new p([],{});e[_(r)]=i}return e}function yo(t,n,e){return e.some(r=>Tt(t,n,r)&&_(r)!==f)}function So(t,n,e){return e.some(r=>Tt(t,n,r))}function Tt(t,n,e){return(t.hasChildren()||n.length>0)&&e.pathMatch==="full"?!1:e.path===""}function Co(t,n,e){return n.length===0&&!t.children[e]}var sr=class{};function wo(t,n,e,r,i,o,s="emptyOnly"){return new ar(t,n,e,r,i,s,o).recognize()}var bo=31,ar=class{injector;configLoader;rootComponentType;config;urlTree;paramsInheritanceStrategy;urlSerializer;applyRedirects;absoluteRedirectCount=0;allowRedirects=!0;constructor(n,e,r,i,o,s,a){this.injector=n,this.configLoader=e,this.rootComponentType=r,this.config=i,this.urlTree=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a,this.applyRedirects=new ir(this.urlSerializer,this.urlTree)}noMatchError(n){return new C(4002,`'${n.segmentGroup}'`)}recognize(){let n=vn(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(n).pipe(g(({children:e,rootSnapshot:r})=>{let i=new E(r,e),o=new $e("",i),s=Dn(r,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,o.url=this.urlSerializer.serialize(s),{state:o,tree:s}}))}match(n){let e=new ae([],Object.freeze({}),Object.freeze(l({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),f,this.rootComponentType,null,{});return this.processSegmentGroup(this.injector,this.config,n,f,e).pipe(g(r=>({children:r,rootSnapshot:e})),re(r=>{if(r instanceof qe)return this.urlTree=r.urlTree,this.match(r.urlTree.root);throw r instanceof Fe?this.noMatchError(r):r}))}processSegmentGroup(n,e,r,i,o){return r.segments.length===0&&r.hasChildren()?this.processChildren(n,e,r,o):this.processSegment(n,e,r,r.segments,i,!0,o).pipe(g(s=>s instanceof E?[s]:[]))}processChildren(n,e,r,i){let o=[];for(let s of Object.keys(r.children))s==="primary"?o.unshift(s):o.push(s);return w(o).pipe(ne(s=>{let a=r.children[s],u=ji(e,s);return this.processSegmentGroup(n,u,a,s,i)}),Er((s,a)=>(s.push(...a),s)),Lt(null),Tr(),I(s=>{if(s===null)return fe(r);let a=Vn(s);return Io(a),d(a)}))}processSegment(n,e,r,i,o,s,a){return w(e).pipe(ne(u=>this.processSegmentAgainstRoute(u._injector??n,e,u,r,i,o,s,a).pipe(re(c=>{if(c instanceof Fe)return d(null);throw c}))),Q(u=>!!u),re(u=>{if(qn(u))return Co(r,i,o)?d(new sr):fe(r);throw u}))}processSegmentAgainstRoute(n,e,r,i,o,s,a,u){return _(r)!==s&&(s===f||!Tt(i,o,r))?fe(i):r.redirectTo===void 0?this.matchSegmentAgainstRoute(n,i,r,o,s,u):this.allowRedirects&&a?this.expandSegmentAgainstRouteUsingRedirect(n,i,e,r,o,s,u):fe(i)}expandSegmentAgainstRouteUsingRedirect(n,e,r,i,o,s,a){let{matched:u,parameters:c,consumedSegments:v,positionalParamSegments:y,remainingSegments:P}=Hn(e,i,o);if(!u)return fe(e);typeof i.redirectTo=="string"&&i.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>bo&&(this.allowRedirects=!1));let G=new ae(o,c,Object.freeze(l({},this.urlTree.queryParams)),this.urlTree.fragment,mn(i),_(i),i.component??i._loadedComponent??null,i,Rn(i)),T=wt(G,a,this.paramsInheritanceStrategy);return G.params=Object.freeze(T.params),G.data=Object.freeze(T.data),this.applyRedirects.applyRedirectCommands(v,i.redirectTo,y,G,n).pipe(U(te=>this.applyRedirects.lineralizeSegments(i,te)),I(te=>this.processSegment(n,r,e,te.concat(P),s,!1,a)))}matchSegmentAgainstRoute(n,e,r,i,o,s){let a=go(e,r,i,n,this.urlSerializer);return r.path==="**"&&(e.children={}),a.pipe(U(u=>u.matched?(n=r._injector??n,this.getChildConfig(n,r,i).pipe(U(({routes:c})=>{let v=r._loadedInjector??n,{parameters:y,consumedSegments:P,remainingSegments:G}=u,T=new ae(P,y,Object.freeze(l({},this.urlTree.queryParams)),this.urlTree.fragment,mn(r),_(r),r.component??r._loadedComponent??null,r,Rn(r)),Ut=wt(T,s,this.paramsInheritanceStrategy);T.params=Object.freeze(Ut.params),T.data=Object.freeze(Ut.data);let{segmentGroup:te,slicedSegments:Pt}=vn(e,P,G,c);if(Pt.length===0&&te.hasChildren())return this.processChildren(v,c,te,T).pipe(g(Ke=>new E(T,Ke)));if(c.length===0&&Pt.length===0)return d(new E(T,[]));let ci=_(r)===o;return this.processSegment(v,c,te,Pt,ci?f:o,!0,T).pipe(g(Ke=>new E(T,Ke instanceof E?[Ke]:[])))}))):fe(e)))}getChildConfig(n,e,r){return e.children?d({routes:e.children,injector:n}):e.loadChildren?e._loadedRoutes!==void 0?d({routes:e._loadedRoutes,injector:e._loadedInjector}):co(n,e,r,this.urlSerializer).pipe(I(i=>i?this.configLoader.loadChildren(n,e).pipe(S(o=>{e._loadedRoutes=o.routes,e._loadedInjector=o.injector})):fo(e))):d({routes:[],injector:n})}};function Io(t){t.sort((n,e)=>n.value.outlet===f?-1:e.value.outlet===f?1:n.value.outlet.localeCompare(e.value.outlet))}function Ao(t){let n=t.value.routeConfig;return n&&n.path===""}function Vn(t){let n=[],e=new Set;for(let r of t){if(!Ao(r)){n.push(r);continue}let i=n.find(o=>r.value.routeConfig===o.value.routeConfig);i!==void 0?(i.children.push(...r.children),e.add(i)):n.push(r)}for(let r of e){let i=Vn(r.children);n.push(new E(r.value,i))}return n.filter(r=>!e.has(r))}function mn(t){return t.data||{}}function Rn(t){return t.resolve||{}}function To(t,n,e,r,i,o){return I(s=>wo(t,n,e,r,s.extractedUrl,i,o).pipe(g(({state:a,tree:u})=>D(l({},s),{targetSnapshot:a,urlAfterRedirects:u}))))}function Eo(t,n){return I(e=>{let{targetSnapshot:r,guards:{canActivateChecks:i}}=e;if(!i.length)return d(e);let o=new Set(i.map(u=>u.route)),s=new Set;for(let u of o)if(!s.has(u))for(let c of Wn(u))s.add(c);let a=0;return w(s).pipe(ne(u=>o.has(u)?Oo(u,r,t,n):(u.data=wt(u,u.parent,t).resolve,d(void 0))),S(()=>a++),jt(1),I(u=>a===s.size?d(e):B))})}function Wn(t){let n=t.children.map(e=>Wn(e)).flat();return[t,...n]}function Oo(t,n,e,r){let i=t.routeConfig,o=t._resolve;return i?.title!==void 0&&!jn(i)&&(o[Be]=i.title),Ze(()=>(t.data=wt(t,t.parent,e).resolve,Mo(o,t,n,r).pipe(g(s=>(t._resolvedData=s,t.data=l(l({},t.data),s),null)))))}function Mo(t,n,e,r){let i=Kt(t);if(i.length===0)return d({});let o={};return w(i).pipe(I(s=>Do(t[s],n,e,r).pipe(Q(),S(a=>{if(a instanceof we)throw bt(new Z,a);o[s]=a}))),jt(1),g(()=>o),re(s=>qn(s)?B:Te(s)))}function Do(t,n,e,r){let i=He(n)??r,o=Ie(t,i),s=o.resolve?o.resolve(n,e):L(i,()=>o(n,e));return W(s)}function Gt(t){return U(n=>{let e=t(n);return e?w(e).pipe(g(()=>n)):d(n)})}var fr=(()=>{class t{buildTitle(e){let r,i=e.root;for(;i!==void 0;)r=this.getResolvedTitleForRoute(i)??r,i=i.children.find(o=>o.outlet===f);return r}getResolvedTitleForRoute(e){return e.data[Be]}static \u0275fac=function(r){return new(r||t)};static \u0275prov=R({token:t,factory:()=>h(Gn),providedIn:"root"})}return t})(),Gn=(()=>{class t extends fr{title;constructor(e){super(),this.title=e}updateTitle(e){let r=this.buildTitle(e);r!==void 0&&this.title.setTitle(r)}static \u0275fac=function(r){return new(r||t)(K(hn))};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),ee=new A("",{providedIn:"root",factory:()=>({})}),Ae=new A(""),Et=(()=>{class t{componentLoaders=new WeakMap;childrenLoaders=new WeakMap;onLoadStartListener;onLoadEndListener;compiler=h(tn);loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return d(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);let r=W(e.loadComponent()).pipe(g(Kn),S(o=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=o}),Xe(()=>{this.componentLoaders.delete(e)})),i=new _t(r,()=>new q).pipe(xt());return this.componentLoaders.set(e,i),i}loadChildren(e,r){if(this.childrenLoaders.get(r))return this.childrenLoaders.get(r);if(r._loadedRoutes)return d({routes:r._loadedRoutes,injector:r._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(r);let o=Qn(r,this.compiler,e,this.onLoadEndListener).pipe(Xe(()=>{this.childrenLoaders.delete(r)})),s=new _t(o,()=>new q).pipe(xt());return this.childrenLoaders.set(r,s),s}static \u0275fac=function(r){return new(r||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Qn(t,n,e,r){return W(t.loadChildren()).pipe(g(Kn),I(i=>i instanceof zr||Array.isArray(i)?d(i):w(n.compileModuleAsync(i))),g(i=>{r&&r(t);let o,s,a=!1;return Array.isArray(i)?(s=i,a=!0):(o=i.create(e).injector,s=o.get(Ae,[],{optional:!0,self:!0}).flat()),{routes:s.map(dr),injector:o}}))}function No(t){return t&&typeof t=="object"&&"default"in t}function Kn(t){return No(t)?t.default:t}var Ot=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=R({token:t,factory:()=>h(Uo),providedIn:"root"})}return t})(),Uo=(()=>{class t{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,r){return e}static \u0275fac=function(r){return new(r||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),pr=new A(""),gr=new A("");function Yn(t,n,e){let r=t.get(gr),i=t.get(Nr);if(!i.startViewTransition||r.skipNextTransition)return r.skipNextTransition=!1,new Promise(c=>setTimeout(c));let o,s=new Promise(c=>{o=c}),a=i.startViewTransition(()=>(o(),Po(t))),{onViewTransitionCreated:u}=r;return u&&L(t,()=>u({transition:a,from:n,to:e})),s}function Po(t){return new Promise(n=>{Hr({read:()=>setTimeout(n)},{injector:t})})}var vr=new A(""),Mt=(()=>{class t{currentNavigation=null;currentTransition=null;lastSuccessfulNavigation=null;events=new q;transitionAbortWithErrorSubject=new q;configLoader=h(Et);environmentInjector=h(ie);destroyRef=h(Ur);urlSerializer=h(ce);rootContexts=h(le);location=h(de);inputBindingEnabled=h(Ve,{optional:!0})!==null;titleStrategy=h(fr);options=h(ee,{optional:!0})||{};paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyO