@mapvx/website-component 0.14.0 → 0.14.1

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.
@@ -1509,7 +1509,7 @@ If it declares any Font Awesome CSS pseudo-elements, they will not be rendered a
1509
1509
  `))});document=Re(wi);sanitizer=Re(ey);config=Re(_U);iconLibrary=Re(uy);stackItem=Re(IU,{optional:!0});stack=Re(DU,{optional:!0});constructor(){this.stack!=null&&this.stackItem==null&&console.error('FontAwesome: fa-icon and fa-duotone-icon elements must specify stackItemSize attribute when wrapped into fa-stack. Example: <fa-icon stackItemSize="2x" />.')}findIconDefinition(i){let l=EU(i,this.config.defaultPrefix);if("icon"in l)return l;let d=this.iconLibrary.getIconDefinition(l.prefix,l.iconName);return d??(bU(l),null)}buildParams(){let i=this.fixedWidth(),l={flip:this.flip(),animation:this.animation(),border:this.border(),inverse:this.inverse(),size:this.size(),pull:this.pull(),rotate:this.rotate(),fixedWidth:typeof i=="boolean"?i:this.config.fixedWidth,stackItemSize:this.stackItem!=null?this.stackItem.stackItemSize():void 0},d=this.transform(),a=typeof d=="string"?Bk.transform(d):d,E=this.mask(),L=E!=null?this.findIconDefinition(E):null,N={},Z=this.a11yRole();Z!=null&&(N.role=Z);let ee={};return l.rotate!=null&&!Vk(l.rotate)&&(ee["--fa-rotate-angle"]=`${l.rotate}`),{title:this.title(),transform:a,classes:xU(l),mask:L??void 0,symbol:this.symbol(),attributes:N,styles:ee}}static \u0275fac=function(l){return new(l||n)};static \u0275cmp=hn({type:n,selectors:[["fa-icon"]],hostAttrs:[1,"ng-fa-icon"],hostVars:2,hostBindings:function(l,d){l&2&&(K0("innerHTML",d.renderedIconHTML(),Od),Ng("title",d.title()??void 0))},inputs:{icon:[1,"icon"],title:[1,"title"],animation:[1,"animation"],mask:[1,"mask"],flip:[1,"flip"],size:[1,"size"],pull:[1,"pull"],border:[1,"border"],inverse:[1,"inverse"],symbol:[1,"symbol"],rotate:[1,"rotate"],fixedWidth:[1,"fixedWidth"],transform:[1,"transform"],a11yRole:[1,"a11yRole"]},outputs:{icon:"iconChange",title:"titleChange",animation:"animationChange",mask:"maskChange",flip:"flipChange",size:"sizeChange",pull:"pullChange",border:"borderChange",inverse:"inverseChange",symbol:"symbolChange",rotate:"rotateChange",fixedWidth:"fixedWidthChange",transform:"transformChange",a11yRole:"a11yRoleChange"},decls:0,vars:0,template:function(l,d){},encapsulation:2,changeDetection:0})}return n})();var T_=(()=>{class n{static \u0275fac=function(l){return new(l||n)};static \u0275mod=hc({type:n});static \u0275inj=yl({})}return n})();var Yn=class n{iconLibrary=Re(uy);logger=Re(jn);getIconDefinition(r,i){let l=this.iconLibrary.getIconDefinition(r,i);return l||(this.logger.logWarning(new Error(`Icon definition not found for ${r} ${i}`)),uC)}static \u0275fac=function(i){return new(i||n)};static \u0275prov=Vt({token:n,factory:n.\u0275fac})};var Vn="primary",Ey=Symbol("RouteTitle"),KC=class{params;constructor(r){this.params=r||{}}has(r){return Object.prototype.hasOwnProperty.call(this.params,r)}get(r){if(this.has(r)){let i=this.params[r];return Array.isArray(i)?i[0]:i}return null}getAll(r){if(this.has(r)){let i=this.params[r];return Array.isArray(i)?i:[i]}return[]}get keys(){return Object.keys(this.params)}};function ff(n){return new KC(n)}function Yk(n,r,i){let l=i.path.split("/");if(l.length>n.length||i.pathMatch==="full"&&(r.hasChildren()||l.length<n.length))return null;let d={};for(let a=0;a<l.length;a++){let E=l[a],L=n[a];if(E[0]===":")d[E.substring(1)]=L;else if(E!==L.path)return null}return{consumed:n.slice(0,l.length),posParams:d}}function MU(n,r){if(n.length!==r.length)return!1;for(let i=0;i<n.length;++i)if(!gc(n[i],r[i]))return!1;return!0}function gc(n,r){let i=n?XC(n):void 0,l=r?XC(r):void 0;if(!i||!l||i.length!=l.length)return!1;let d;for(let a=0;a<i.length;a++)if(d=i[a],!Kk(n[d],r[d]))return!1;return!0}function XC(n){return[...Object.keys(n),...Object.getOwnPropertySymbols(n)]}function Kk(n,r){if(Array.isArray(n)&&Array.isArray(r)){if(n.length!==r.length)return!1;let i=[...n].sort(),l=[...r].sort();return i.every((d,a)=>l[a]===d)}else return n===r}function Xk(n){return n.length>0?n[n.length-1]:null}function Pu(n){return Wb(n)?n:sf(n)?ai(Promise.resolve(n)):Sn(n)}var PU={exact:Qk,subset:eR},Jk={exact:AU,subset:kU,ignored:()=>!0};function Uk(n,r,i){return PU[i.paths](n.root,r.root,i.matrixParams)&&Jk[i.queryParams](n.queryParams,r.queryParams)&&!(i.fragment==="exact"&&n.fragment!==r.fragment)}function AU(n,r){return gc(n,r)}function Qk(n,r,i){if(!df(n.segments,r.segments)||!A_(n.segments,r.segments,i)||n.numberOfChildren!==r.numberOfChildren)return!1;for(let l in r.children)if(!n.children[l]||!Qk(n.children[l],r.children[l],i))return!1;return!0}function kU(n,r){return Object.keys(r).length<=Object.keys(n).length&&Object.keys(r).every(i=>Kk(n[i],r[i]))}function eR(n,r,i){return tR(n,r,r.segments,i)}function tR(n,r,i,l){if(n.segments.length>i.length){let d=n.segments.slice(0,i.length);return!(!df(d,i)||r.hasChildren()||!A_(d,i,l))}else if(n.segments.length===i.length){if(!df(n.segments,i)||!A_(n.segments,i,l))return!1;for(let d in r.children)if(!n.children[d]||!eR(n.children[d],r.children[d],l))return!1;return!0}else{let d=i.slice(0,n.segments.length),a=i.slice(n.segments.length);return!df(n.segments,d)||!A_(n.segments,d,l)||!n.children[Vn]?!1:tR(n.children[Vn],r,a,l)}}function A_(n,r,i){return r.every((l,d)=>Jk[i](n[d].parameters,l.parameters))}var vc=class{root;queryParams;fragment;_queryParamMap;constructor(r=new Fr([],{}),i={},l=null){this.root=r,this.queryParams=i,this.fragment=l}get queryParamMap(){return this._queryParamMap??=ff(this.queryParams),this._queryParamMap}toString(){return LU.serialize(this)}},Fr=class{segments;children;parent=null;constructor(r,i){this.segments=r,this.children=i,Object.values(i).forEach(l=>l.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return k_(this)}},$d=class{path;parameters;_parameterMap;constructor(r,i){this.path=r,this.parameters=i}get parameterMap(){return this._parameterMap??=ff(this.parameters),this._parameterMap}toString(){return rR(this)}};function RU(n,r){return df(n,r)&&n.every((i,l)=>gc(i.parameters,r[l].parameters))}function df(n,r){return n.length!==r.length?!1:n.every((i,l)=>i.path===r[l].path)}function OU(n,r){let i=[];return Object.entries(n.children).forEach(([l,d])=>{l===Vn&&(i=i.concat(r(d,l)))}),Object.entries(n.children).forEach(([l,d])=>{l!==Vn&&(i=i.concat(r(d,l)))}),i}var Iy=(()=>{class n{static \u0275fac=function(l){return new(l||n)};static \u0275prov=Vt({token:n,factory:()=>new pf,providedIn:"root"})}return n})(),pf=class{parse(r){let i=new QC(r);return new vc(i.parseRootSegment(),i.parseQueryParams(),i.parseFragment())}serialize(r){let i=`/${dy(r.root,!0)}`,l=zU(r.queryParams),d=typeof r.fragment=="string"?`#${FU(r.fragment)}`:"";return`${i}${l}${d}`}},LU=new pf;function k_(n){return n.segments.map(r=>rR(r)).join("/")}function dy(n,r){if(!n.hasChildren())return k_(n);if(r){let i=n.children[Vn]?dy(n.children[Vn],!1):"",l=[];return Object.entries(n.children).forEach(([d,a])=>{d!==Vn&&l.push(`${d}:${dy(a,!1)}`)}),l.length>0?`${i}(${l.join("//")})`:i}else{let i=OU(n,(l,d)=>d===Vn?[dy(n.children[Vn],!1)]:[`${d}:${dy(l,!1)}`]);return Object.keys(n.children).length===1&&n.children[Vn]!=null?`${k_(n)}/${i[0]}`:`${k_(n)}/(${i.join("//")})`}}function nR(n){return encodeURIComponent(n).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function M_(n){return nR(n).replace(/%3B/gi,";")}function FU(n){return encodeURI(n)}function JC(n){return nR(n).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function R_(n){return decodeURIComponent(n)}function $k(n){return R_(n.replace(/\+/g,"%20"))}function rR(n){return`${JC(n.path)}${NU(n.parameters)}`}function NU(n){return Object.entries(n).map(([r,i])=>`;${JC(r)}=${JC(i)}`).join("")}function zU(n){let r=Object.entries(n).map(([i,l])=>Array.isArray(l)?l.map(d=>`${M_(i)}=${M_(d)}`).join("&"):`${M_(i)}=${M_(l)}`).filter(i=>i);return r.length?`?${r.join("&")}`:""}var BU=/^[^\/()?;#]+/;function qC(n){let r=n.match(BU);return r?r[0]:""}var jU=/^[^\/()?;=#]+/;function VU(n){let r=n.match(jU);return r?r[0]:""}var UU=/^[^=?&#]+/;function $U(n){let r=n.match(UU);return r?r[0]:""}var GU=/^[^&#]+/;function HU(n){let r=n.match(GU);return r?r[0]:""}var QC=class{url;remaining;constructor(r){this.url=r,this.remaining=r}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new Fr([],{}):new Fr([],this.parseChildren())}parseQueryParams(){let r={};if(this.consumeOptional("?"))do this.parseQueryParam(r);while(this.consumeOptional("&"));return r}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(this.remaining==="")return{};this.consumeOptional("/");let r=[];for(this.peekStartsWith("(")||r.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),r.push(this.parseSegment());let i={};this.peekStartsWith("/(")&&(this.capture("/"),i=this.parseParens(!0));let l={};return this.peekStartsWith("(")&&(l=this.parseParens(!1)),(r.length>0||Object.keys(i).length>0)&&(l[Vn]=new Fr(r,i)),l}parseSegment(){let r=qC(this.remaining);if(r===""&&this.peekStartsWith(";"))throw new Zt(4009,!1);return this.capture(r),new $d(R_(r),this.parseMatrixParams())}parseMatrixParams(){let r={};for(;this.consumeOptional(";");)this.parseParam(r);return r}parseParam(r){let i=VU(this.remaining);if(!i)return;this.capture(i);let l="";if(this.consumeOptional("=")){let d=qC(this.remaining);d&&(l=d,this.capture(l))}r[R_(i)]=R_(l)}parseQueryParam(r){let i=$U(this.remaining);if(!i)return;this.capture(i);let l="";if(this.consumeOptional("=")){let E=HU(this.remaining);E&&(l=E,this.capture(l))}let d=$k(i),a=$k(l);if(r.hasOwnProperty(d)){let E=r[d];Array.isArray(E)||(E=[E],r[d]=E),E.push(a)}else r[d]=a}parseParens(r){let i={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let l=qC(this.remaining),d=this.remaining[l.length];if(d!=="/"&&d!==")"&&d!==";")throw new Zt(4010,!1);let a;l.indexOf(":")>-1?(a=l.slice(0,l.indexOf(":")),this.capture(a),this.capture(":")):r&&(a=Vn);let E=this.parseChildren();i[a??Vn]=Object.keys(E).length===1&&E[Vn]?E[Vn]:new Fr([],E),this.consumeOptional("//")}return i}peekStartsWith(r){return this.remaining.startsWith(r)}consumeOptional(r){return this.peekStartsWith(r)?(this.remaining=this.remaining.substring(r.length),!0):!1}capture(r){if(!this.consumeOptional(r))throw new Zt(4011,!1)}};function iR(n){return n.segments.length>0?new Fr([],{[Vn]:n}):n}function oR(n){let r={};for(let[l,d]of Object.entries(n.children)){let a=oR(d);if(l===Vn&&a.segments.length===0&&a.hasChildren())for(let[E,L]of Object.entries(a.children))r[E]=L;else(a.segments.length>0||a.hasChildren())&&(r[l]=a)}let i=new Fr(n.segments,r);return qU(i)}function qU(n){if(n.numberOfChildren===1&&n.children[Vn]){let r=n.children[Vn];return new Fr(n.segments.concat(r.segments),r.children)}return n}function om(n){return n instanceof vc}function sR(n,r,i=null,l=null){let d=aR(n);return lR(d,r,i,l)}function aR(n){let r;function i(a){let E={};for(let N of a.children){let Z=i(N);E[N.outlet]=Z}let L=new Fr(a.url,E);return a===n&&(r=L),L}let l=i(n.root),d=iR(l);return r??d}function lR(n,r,i,l){let d=n;for(;d.parent;)d=d.parent;if(r.length===0)return WC(d,d,d,i,l);let a=WU(r);if(a.toRoot())return WC(d,d,new Fr([],{}),i,l);let E=ZU(a,d,n),L=E.processChildren?fy(E.segmentGroup,E.index,a.commands):uR(E.segmentGroup,E.index,a.commands);return WC(d,E.segmentGroup,L,i,l)}function O_(n){return typeof n=="object"&&n!=null&&!n.outlets&&!n.segmentPath}function gy(n){return typeof n=="object"&&n!=null&&n.outlets}function WC(n,r,i,l,d){let a={};l&&Object.entries(l).forEach(([N,Z])=>{a[N]=Array.isArray(Z)?Z.map(ee=>`${ee}`):`${Z}`});let E;n===r?E=i:E=cR(n,r,i);let L=iR(oR(E));return new vc(L,a,d)}function cR(n,r,i){let l={};return Object.entries(n.children).forEach(([d,a])=>{a===r?l[d]=i:l[d]=cR(a,r,i)}),new Fr(n.segments,l)}var L_=class{isAbsolute;numberOfDoubleDots;commands;constructor(r,i,l){if(this.isAbsolute=r,this.numberOfDoubleDots=i,this.commands=l,r&&l.length>0&&O_(l[0]))throw new Zt(4003,!1);let d=l.find(gy);if(d&&d!==Xk(l))throw new Zt(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function WU(n){if(typeof n[0]=="string"&&n.length===1&&n[0]==="/")return new L_(!0,0,n);let r=0,i=!1,l=n.reduce((d,a,E)=>{if(typeof a=="object"&&a!=null){if(a.outlets){let L={};return Object.entries(a.outlets).forEach(([N,Z])=>{L[N]=typeof Z=="string"?Z.split("/"):Z}),[...d,{outlets:L}]}if(a.segmentPath)return[...d,a.segmentPath]}return typeof a!="string"?[...d,a]:E===0?(a.split("/").forEach((L,N)=>{N==0&&L==="."||(N==0&&L===""?i=!0:L===".."?r++:L!=""&&d.push(L))}),d):[...d,a]},[]);return new L_(i,r,l)}var rm=class{segmentGroup;processChildren;index;constructor(r,i,l){this.segmentGroup=r,this.processChildren=i,this.index=l}};function ZU(n,r,i){if(n.isAbsolute)return new rm(r,!0,0);if(!i)return new rm(r,!1,NaN);if(i.parent===null)return new rm(i,!0,0);let l=O_(n.commands[0])?0:1,d=i.segments.length-1+l;return YU(i,d,n.numberOfDoubleDots)}function YU(n,r,i){let l=n,d=r,a=i;for(;a>d;){if(a-=d,l=l.parent,!l)throw new Zt(4005,!1);d=l.segments.length}return new rm(l,!1,d-a)}function KU(n){return gy(n[0])?n[0].outlets:{[Vn]:n}}function uR(n,r,i){if(n??=new Fr([],{}),n.segments.length===0&&n.hasChildren())return fy(n,r,i);let l=XU(n,r,i),d=i.slice(l.commandIndex);if(l.match&&l.pathIndex<n.segments.length){let a=new Fr(n.segments.slice(0,l.pathIndex),{});return a.children[Vn]=new Fr(n.segments.slice(l.pathIndex),n.children),fy(a,0,d)}else return l.match&&d.length===0?new Fr(n.segments,{}):l.match&&!n.hasChildren()?eS(n,r,i):l.match?fy(n,0,d):eS(n,r,i)}function fy(n,r,i){if(i.length===0)return new Fr(n.segments,{});{let l=KU(i),d={};if(Object.keys(l).some(a=>a!==Vn)&&n.children[Vn]&&n.numberOfChildren===1&&n.children[Vn].segments.length===0){let a=fy(n.children[Vn],r,i);return new Fr(n.segments,a.children)}return Object.entries(l).forEach(([a,E])=>{typeof E=="string"&&(E=[E]),E!==null&&(d[a]=uR(n.children[a],r,E))}),Object.entries(n.children).forEach(([a,E])=>{l[a]===void 0&&(d[a]=E)}),new Fr(n.segments,d)}}function XU(n,r,i){let l=0,d=r,a={match:!1,pathIndex:0,commandIndex:0};for(;d<n.segments.length;){if(l>=i.length)return a;let E=n.segments[d],L=i[l];if(gy(L))break;let N=`${L}`,Z=l<i.length-1?i[l+1]:null;if(d>0&&N===void 0)break;if(N&&Z&&typeof Z=="object"&&Z.outlets===void 0){if(!Hk(N,Z,E))return a;l+=2}else{if(!Hk(N,{},E))return a;l++}d++}return{match:!0,pathIndex:d,commandIndex:l}}function eS(n,r,i){let l=n.segments.slice(0,r),d=0;for(;d<i.length;){let a=i[d];if(gy(a)){let N=JU(a.outlets);return new Fr(l,N)}if(d===0&&O_(i[0])){let N=n.segments[r];l.push(new $d(N.path,Gk(i[0]))),d++;continue}let E=gy(a)?a.outlets[Vn]:`${a}`,L=d<i.length-1?i[d+1]:null;E&&L&&O_(L)?(l.push(new $d(E,Gk(L))),d+=2):(l.push(new $d(E,{})),d++)}return new Fr(l,{})}function JU(n){let r={};return Object.entries(n).forEach(([i,l])=>{typeof l=="string"&&(l=[l]),l!==null&&(r[i]=eS(new Fr([],{}),0,l))}),r}function Gk(n){let r={};return Object.entries(n).forEach(([i,l])=>r[i]=`${l}`),r}function Hk(n,r,i){return n==i.path&&gc(r,i.parameters)}var py="imperative",Wo=(function(n){return n[n.NavigationStart=0]="NavigationStart",n[n.NavigationEnd=1]="NavigationEnd",n[n.NavigationCancel=2]="NavigationCancel",n[n.NavigationError=3]="NavigationError",n[n.RoutesRecognized=4]="RoutesRecognized",n[n.ResolveStart=5]="ResolveStart",n[n.ResolveEnd=6]="ResolveEnd",n[n.GuardsCheckStart=7]="GuardsCheckStart",n[n.GuardsCheckEnd=8]="GuardsCheckEnd",n[n.RouteConfigLoadStart=9]="RouteConfigLoadStart",n[n.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",n[n.ChildActivationStart=11]="ChildActivationStart",n[n.ChildActivationEnd=12]="ChildActivationEnd",n[n.ActivationStart=13]="ActivationStart",n[n.ActivationEnd=14]="ActivationEnd",n[n.Scroll=15]="Scroll",n[n.NavigationSkipped=16]="NavigationSkipped",n})(Wo||{}),xa=class{id;url;constructor(r,i){this.id=r,this.url=i}},mf=class extends xa{type=Wo.NavigationStart;navigationTrigger;restoredState;constructor(r,i,l="imperative",d=null){super(r,i),this.navigationTrigger=l,this.restoredState=d}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},Tu=class extends xa{urlAfterRedirects;type=Wo.NavigationEnd;constructor(r,i,l){super(r,i),this.urlAfterRedirects=l}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},Us=(function(n){return n[n.Redirect=0]="Redirect",n[n.SupersededByNewNavigation=1]="SupersededByNewNavigation",n[n.NoDataFromResolver=2]="NoDataFromResolver",n[n.GuardRejected=3]="GuardRejected",n[n.Aborted=4]="Aborted",n})(Us||{}),yy=(function(n){return n[n.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",n[n.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",n})(yy||{}),yc=class extends xa{reason;code;type=Wo.NavigationCancel;constructor(r,i,l,d){super(r,i),this.reason=l,this.code=d}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},Mu=class extends xa{reason;code;type=Wo.NavigationSkipped;constructor(r,i,l,d){super(r,i),this.reason=l,this.code=d}},sm=class extends xa{error;target;type=Wo.NavigationError;constructor(r,i,l,d){super(r,i),this.error=l,this.target=d}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},vy=class extends xa{urlAfterRedirects;state;type=Wo.RoutesRecognized;constructor(r,i,l,d){super(r,i),this.urlAfterRedirects=l,this.state=d}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},F_=class extends xa{urlAfterRedirects;state;type=Wo.GuardsCheckStart;constructor(r,i,l,d){super(r,i),this.urlAfterRedirects=l,this.state=d}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},N_=class extends xa{urlAfterRedirects;state;shouldActivate;type=Wo.GuardsCheckEnd;constructor(r,i,l,d,a){super(r,i),this.urlAfterRedirects=l,this.state=d,this.shouldActivate=a}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},z_=class extends xa{urlAfterRedirects;state;type=Wo.ResolveStart;constructor(r,i,l,d){super(r,i),this.urlAfterRedirects=l,this.state=d}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},B_=class extends xa{urlAfterRedirects;state;type=Wo.ResolveEnd;constructor(r,i,l,d){super(r,i),this.urlAfterRedirects=l,this.state=d}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},j_=class{route;type=Wo.RouteConfigLoadStart;constructor(r){this.route=r}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},V_=class{route;type=Wo.RouteConfigLoadEnd;constructor(r){this.route=r}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},U_=class{snapshot;type=Wo.ChildActivationStart;constructor(r){this.snapshot=r}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},$_=class{snapshot;type=Wo.ChildActivationEnd;constructor(r){this.snapshot=r}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},G_=class{snapshot;type=Wo.ActivationStart;constructor(r){this.snapshot=r}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},H_=class{snapshot;type=Wo.ActivationEnd;constructor(r){this.snapshot=r}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}};var _y=class{},am=class{url;navigationBehaviorOptions;constructor(r,i){this.url=r,this.navigationBehaviorOptions=i}};function QU(n){return!(n instanceof _y)&&!(n instanceof am)}function e$(n,r){return n.providers&&!n._injector&&(n._injector=Fg(n.providers,r,`Route: ${n.path}`)),n._injector??r}function kl(n){return n.outlet||Vn}function t$(n,r){let i=n.filter(l=>kl(l)===r);return i.push(...n.filter(l=>kl(l)!==r)),i}function um(n){if(!n)return null;if(n.routeConfig?._injector)return n.routeConfig._injector;for(let r=n.parent;r;r=r.parent){let i=r.routeConfig;if(i?._loadedInjector)return i._loadedInjector;if(i?._injector)return i._injector}return null}var q_=class{rootInjector;outlet=null;route=null;children;attachRef=null;get injector(){return um(this.route?.snapshot)??this.rootInjector}constructor(r){this.rootInjector=r,this.children=new dm(this.rootInjector)}},dm=(()=>{class n{rootInjector;contexts=new Map;constructor(i){this.rootInjector=i}onChildOutletCreated(i,l){let d=this.getOrCreateContext(i);d.outlet=l,this.contexts.set(i,d)}onChildOutletDestroyed(i){let l=this.getContext(i);l&&(l.outlet=null,l.attachRef=null)}onOutletDeactivated(){let i=this.contexts;return this.contexts=new Map,i}onOutletReAttached(i){this.contexts=i}getOrCreateContext(i){let l=this.getContext(i);return l||(l=new q_(this.rootInjector),this.contexts.set(i,l)),l}getContext(i){return this.contexts.get(i)||null}static \u0275fac=function(l){return new(l||n)(Wn(as))};static \u0275prov=Vt({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),W_=class{_root;constructor(r){this._root=r}get root(){return this._root.value}parent(r){let i=this.pathFromRoot(r);return i.length>1?i[i.length-2]:null}children(r){let i=tS(r,this._root);return i?i.children.map(l=>l.value):[]}firstChild(r){let i=tS(r,this._root);return i&&i.children.length>0?i.children[0].value:null}siblings(r){let i=nS(r,this._root);return i.length<2?[]:i[i.length-2].children.map(d=>d.value).filter(d=>d!==r)}pathFromRoot(r){return nS(r,this._root).map(i=>i.value)}};function tS(n,r){if(n===r.value)return r;for(let i of r.children){let l=tS(n,i);if(l)return l}return null}function nS(n,r){if(n===r.value)return[r];for(let i of r.children){let l=nS(n,i);if(l.length)return l.unshift(r),l}return[]}var wa=class{value;children;constructor(r,i){this.value=r,this.children=i}toString(){return`TreeNode(${this.value})`}};function nm(n){let r={};return n&&n.children.forEach(i=>r[i.value.outlet]=i),r}var by=class extends W_{snapshot;constructor(r,i){super(r),this.snapshot=i,uS(this,r)}toString(){return this.snapshot.toString()}};function dR(n){let r=n$(n),i=new Hr([new $d("",{})]),l=new Hr({}),d=new Hr({}),a=new Hr({}),E=new Hr(""),L=new Ha(i,l,a,E,d,Vn,n,r.root);return L.snapshot=r.root,new by(new wa(L,[]),r)}function n$(n){let r={},i={},l={},a=new hf([],r,l,"",i,Vn,n,null,{});return new wy("",new wa(a,[]))}var Ha=class{urlSubject;paramsSubject;queryParamsSubject;fragmentSubject;dataSubject;outlet;component;snapshot;_futureSnapshot;_routerState;_paramMap;_queryParamMap;title;url;params;queryParams;fragment;data;constructor(r,i,l,d,a,E,L,N){this.urlSubject=r,this.paramsSubject=i,this.queryParamsSubject=l,this.fragmentSubject=d,this.dataSubject=a,this.outlet=E,this.component=L,this._futureSnapshot=N,this.title=this.dataSubject?.pipe(En(Z=>Z[Ey]))??Sn(void 0),this.url=r,this.params=i,this.queryParams=l,this.fragment=d,this.data=a}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(En(r=>ff(r))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(En(r=>ff(r))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function Z_(n,r,i="emptyOnly"){let l,{routeConfig:d}=n;return r!==null&&(i==="always"||d?.path===""||!r.component&&!r.routeConfig?.loadComponent)?l={params:zt(zt({},r.params),n.params),data:zt(zt({},r.data),n.data),resolve:zt(zt(zt(zt({},n.data),r.data),d?.data),n._resolvedData)}:l={params:zt({},n.params),data:zt({},n.data),resolve:zt(zt({},n.data),n._resolvedData??{})},d&&fR(d)&&(l.resolve[Ey]=d.title),l}var hf=class{url;params;queryParams;fragment;data;outlet;component;routeConfig;_resolve;_resolvedData;_routerState;_paramMap;_queryParamMap;get title(){return this.data?.[Ey]}constructor(r,i,l,d,a,E,L,N,Z){this.url=r,this.params=i,this.queryParams=l,this.fragment=d,this.data=a,this.outlet=E,this.component=L,this.routeConfig=N,this._resolve=Z}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??=ff(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=ff(this.queryParams),this._queryParamMap}toString(){let r=this.url.map(l=>l.toString()).join("/"),i=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${r}', path:'${i}')`}},wy=class extends W_{url;constructor(r,i){super(i),this.url=r,uS(this,i)}toString(){return hR(this._root)}};function uS(n,r){r.value._routerState=n,r.children.forEach(i=>uS(n,i))}function hR(n){let r=n.children.length>0?` { ${n.children.map(hR).join(", ")} } `:"";return`${n.value}${r}`}function ZC(n){if(n.snapshot){let r=n.snapshot,i=n._futureSnapshot;n.snapshot=i,gc(r.queryParams,i.queryParams)||n.queryParamsSubject.next(i.queryParams),r.fragment!==i.fragment&&n.fragmentSubject.next(i.fragment),gc(r.params,i.params)||n.paramsSubject.next(i.params),MU(r.url,i.url)||n.urlSubject.next(i.url),gc(r.data,i.data)||n.dataSubject.next(i.data)}else n.snapshot=n._futureSnapshot,n.dataSubject.next(n._futureSnapshot.data)}function rS(n,r){let i=gc(n.params,r.params)&&RU(n.url,r.url),l=!n.parent!=!r.parent;return i&&!l&&(!n.parent||rS(n.parent,r.parent))}function fR(n){return typeof n.title=="string"||n.title===null}var pR=new bn(""),gf=(()=>{class n{activated=null;get activatedComponentRef(){return this.activated}_activatedRoute=null;name=Vn;activateEvents=new vs;deactivateEvents=new vs;attachEvents=new vs;detachEvents=new vs;routerOutletData=dr();parentContexts=Re(dm);location=Re(of);changeDetector=Re(o_);inputBinder=Re(J_,{optional:!0});supportsBindingToComponentInputs=!0;ngOnChanges(i){if(i.name){let{firstChange:l,previousValue:d}=i.name;if(l)return;this.isTrackedInParentContexts(d)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(d)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(i){return this.parentContexts.getContext(i)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let i=this.parentContexts.getContext(this.name);i?.route&&(i.attachRef?this.attach(i.attachRef,i.route):this.activateWith(i.route,i.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Zt(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Zt(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new Zt(4012,!1);this.location.detach();let i=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(i.instance),i}attach(i,l){this.activated=i,this._activatedRoute=l,this.location.insert(i.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(i.instance)}deactivate(){if(this.activated){let i=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(i)}}activateWith(i,l){if(this.isActivated)throw new Zt(4013,!1);this._activatedRoute=i;let d=this.location,E=i.snapshot.component,L=this.parentContexts.getOrCreateContext(this.name).children,N=new iS(i,L,d.injector,this.routerOutletData);this.activated=d.createComponent(E,{index:d.length,injector:N,environmentInjector:l}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static \u0275fac=function(l){return new(l||n)};static \u0275dir=Fd({type:n,selectors:[["router-outlet"]],inputs:{name:"name",routerOutletData:[1,"routerOutletData"]},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],features:[Mg]})}return n})(),iS=class{route;childContexts;parent;outletData;constructor(r,i,l,d){this.route=r,this.childContexts=i,this.parent=l,this.outletData=d}get(r,i){return r===Ha?this.route:r===dm?this.childContexts:r===pR?this.outletData:this.parent.get(r,i)}},J_=new bn("");var dS=(()=>{class n{static \u0275fac=function(l){return new(l||n)};static \u0275cmp=hn({type:n,selectors:[["ng-component"]],exportAs:["emptyRouterOutlet"],decls:1,vars:0,template:function(l,d){l&1&&Mt(0,"router-outlet")},dependencies:[gf],encapsulation:2})}return n})();function hS(n){let r=n.children&&n.children.map(hS),i=r?or(zt({},n),{children:r}):zt({},n);return!i.component&&!i.loadComponent&&(r||i.loadChildren)&&i.outlet&&i.outlet!==Vn&&(i.component=dS),i}function r$(n,r,i){let l=xy(n,r._root,i?i._root:void 0);return new by(l,r)}function xy(n,r,i){if(i&&n.shouldReuseRoute(r.value,i.value.snapshot)){let l=i.value;l._futureSnapshot=r.value;let d=i$(n,r,i);return new wa(l,d)}else{if(n.shouldAttach(r.value)){let a=n.retrieve(r.value);if(a!==null){let E=a.route;return E.value._futureSnapshot=r.value,E.children=r.children.map(L=>xy(n,L)),E}}let l=o$(r.value),d=r.children.map(a=>xy(n,a));return new wa(l,d)}}function i$(n,r,i){return r.children.map(l=>{for(let d of i.children)if(n.shouldReuseRoute(l.value,d.value.snapshot))return xy(n,l,d);return xy(n,l)})}function o$(n){return new Ha(new Hr(n.url),new Hr(n.params),new Hr(n.queryParams),new Hr(n.fragment),new Hr(n.data),n.outlet,n.component,n)}var lm=class{redirectTo;navigationBehaviorOptions;constructor(r,i){this.redirectTo=r,this.navigationBehaviorOptions=i}},mR="ngNavigationCancelingError";function Y_(n,r){let{redirectTo:i,navigationBehaviorOptions:l}=om(r)?{redirectTo:r,navigationBehaviorOptions:void 0}:r,d=gR(!1,Us.Redirect);return d.url=i,d.navigationBehaviorOptions=l,d}function gR(n,r){let i=new Error(`NavigationCancelingError: ${n||""}`);return i[mR]=!0,i.cancellationCode=r,i}function s$(n){return yR(n)&&om(n.url)}function yR(n){return!!n&&n[mR]}var a$=(n,r,i,l)=>En(d=>(new oS(r,d.targetRouterState,d.currentRouterState,i,l).activate(n),d)),oS=class{routeReuseStrategy;futureState;currState;forwardEvent;inputBindingEnabled;constructor(r,i,l,d,a){this.routeReuseStrategy=r,this.futureState=i,this.currState=l,this.forwardEvent=d,this.inputBindingEnabled=a}activate(r){let i=this.futureState._root,l=this.currState?this.currState._root:null;this.deactivateChildRoutes(i,l,r),ZC(this.futureState.root),this.activateChildRoutes(i,l,r)}deactivateChildRoutes(r,i,l){let d=nm(i);r.children.forEach(a=>{let E=a.value.outlet;this.deactivateRoutes(a,d[E],l),delete d[E]}),Object.values(d).forEach(a=>{this.deactivateRouteAndItsChildren(a,l)})}deactivateRoutes(r,i,l){let d=r.value,a=i?i.value:null;if(d===a)if(d.component){let E=l.getContext(d.outlet);E&&this.deactivateChildRoutes(r,i,E.children)}else this.deactivateChildRoutes(r,i,l);else a&&this.deactivateRouteAndItsChildren(i,l)}deactivateRouteAndItsChildren(r,i){r.value.component&&this.routeReuseStrategy.shouldDetach(r.value.snapshot)?this.detachAndStoreRouteSubtree(r,i):this.deactivateRouteAndOutlet(r,i)}detachAndStoreRouteSubtree(r,i){let l=i.getContext(r.value.outlet),d=l&&r.value.component?l.children:i,a=nm(r);for(let E of Object.values(a))this.deactivateRouteAndItsChildren(E,d);if(l&&l.outlet){let E=l.outlet.detach(),L=l.children.onOutletDeactivated();this.routeReuseStrategy.store(r.value.snapshot,{componentRef:E,route:r,contexts:L})}}deactivateRouteAndOutlet(r,i){let l=i.getContext(r.value.outlet),d=l&&r.value.component?l.children:i,a=nm(r);for(let E of Object.values(a))this.deactivateRouteAndItsChildren(E,d);l&&(l.outlet&&(l.outlet.deactivate(),l.children.onOutletDeactivated()),l.attachRef=null,l.route=null)}activateChildRoutes(r,i,l){let d=nm(i);r.children.forEach(a=>{this.activateRoutes(a,d[a.value.outlet],l),this.forwardEvent(new H_(a.value.snapshot))}),r.children.length&&this.forwardEvent(new $_(r.value.snapshot))}activateRoutes(r,i,l){let d=r.value,a=i?i.value:null;if(ZC(d),d===a)if(d.component){let E=l.getOrCreateContext(d.outlet);this.activateChildRoutes(r,i,E.children)}else this.activateChildRoutes(r,i,l);else if(d.component){let E=l.getOrCreateContext(d.outlet);if(this.routeReuseStrategy.shouldAttach(d.snapshot)){let L=this.routeReuseStrategy.retrieve(d.snapshot);this.routeReuseStrategy.store(d.snapshot,null),E.children.onOutletReAttached(L.contexts),E.attachRef=L.componentRef,E.route=L.route.value,E.outlet&&E.outlet.attach(L.componentRef,L.route.value),ZC(L.route.value),this.activateChildRoutes(r,null,E.children)}else E.attachRef=null,E.route=d,E.outlet&&E.outlet.activateWith(d,E.injector),this.activateChildRoutes(r,null,E.children)}else this.activateChildRoutes(r,null,l)}},K_=class{path;route;constructor(r){this.path=r,this.route=this.path[this.path.length-1]}},im=class{component;route;constructor(r,i){this.component=r,this.route=i}};function l$(n,r,i){let l=n._root,d=r?r._root:null;return hy(l,d,i,[l.value])}function c$(n){let r=n.routeConfig?n.routeConfig.canActivateChild:null;return!r||r.length===0?null:{node:n,guards:r}}function hm(n,r){let i=Symbol(),l=r.get(n,i);return l===i?typeof n=="function"&&!p2(n)?n:r.get(n):l}function hy(n,r,i,l,d={canDeactivateChecks:[],canActivateChecks:[]}){let a=nm(r);return n.children.forEach(E=>{u$(E,a[E.value.outlet],i,l.concat([E.value]),d),delete a[E.value.outlet]}),Object.entries(a).forEach(([E,L])=>my(L,i.getContext(E),d)),d}function u$(n,r,i,l,d={canDeactivateChecks:[],canActivateChecks:[]}){let a=n.value,E=r?r.value:null,L=i?i.getContext(n.value.outlet):null;if(E&&a.routeConfig===E.routeConfig){let N=d$(E,a,a.routeConfig.runGuardsAndResolvers);N?d.canActivateChecks.push(new K_(l)):(a.data=E.data,a._resolvedData=E._resolvedData),a.component?hy(n,r,L?L.children:null,l,d):hy(n,r,i,l,d),N&&L&&L.outlet&&L.outlet.isActivated&&d.canDeactivateChecks.push(new im(L.outlet.component,E))}else E&&my(r,L,d),d.canActivateChecks.push(new K_(l)),a.component?hy(n,null,L?L.children:null,l,d):hy(n,null,i,l,d);return d}function d$(n,r,i){if(typeof i=="function")return i(n,r);switch(i){case"pathParamsChange":return!df(n.url,r.url);case"pathParamsOrQueryParamsChange":return!df(n.url,r.url)||!gc(n.queryParams,r.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!rS(n,r)||!gc(n.queryParams,r.queryParams);case"paramsChange":default:return!rS(n,r)}}function my(n,r,i){let l=nm(n),d=n.value;Object.entries(l).forEach(([a,E])=>{d.component?r?my(E,r.children.getContext(a),i):my(E,null,i):my(E,r,i)}),d.component?r&&r.outlet&&r.outlet.isActivated?i.canDeactivateChecks.push(new im(r.outlet.component,d)):i.canDeactivateChecks.push(new im(null,d)):i.canDeactivateChecks.push(new im(null,d))}function Dy(n){return typeof n=="function"}function h$(n){return typeof n=="boolean"}function f$(n){return n&&Dy(n.canLoad)}function p$(n){return n&&Dy(n.canActivate)}function m$(n){return n&&Dy(n.canActivateChild)}function g$(n){return n&&Dy(n.canDeactivate)}function y$(n){return n&&Dy(n.canMatch)}function vR(n){return n instanceof su||n?.name==="EmptyError"}var P_=Symbol("INITIAL_VALUE");function cm(){return Yi(n=>Xs(n.map(r=>r.pipe(Ls(1),t2(P_)))).pipe(En(r=>{for(let i of r)if(i!==!0){if(i===P_)return P_;if(i===!1||v$(i))return i}return!0}),_i(r=>r!==P_),Ls(1)))}function v$(n){return om(n)||n instanceof lm}function _$(n,r){return Do(i=>{let{targetSnapshot:l,currentSnapshot:d,guards:{canActivateChecks:a,canDeactivateChecks:E}}=i;return E.length===0&&a.length===0?Sn(or(zt({},i),{guardsResult:!0})):b$(E,l,d,n).pipe(Do(L=>L&&h$(L)?w$(l,a,n,r):Sn(L)),En(L=>or(zt({},i),{guardsResult:L})))})}function b$(n,r,i,l){return ai(n).pipe(Do(d=>I$(d.component,d.route,i,r,l)),au(d=>d!==!0,!0))}function w$(n,r,i,l){return ai(r).pipe(Tp(d=>Dp(C$(d.route.parent,l),x$(d.route,l),E$(n,d.path,i),S$(n,d.route,i))),au(d=>d!==!0,!0))}function x$(n,r){return n!==null&&r&&r(new G_(n)),Sn(!0)}function C$(n,r){return n!==null&&r&&r(new U_(n)),Sn(!0)}function S$(n,r,i){let l=r.routeConfig?r.routeConfig.canActivate:null;if(!l||l.length===0)return Sn(!0);let d=l.map(a=>tg(()=>{let E=um(r)??i,L=hm(a,E),N=p$(L)?L.canActivate(r,n):Ns(E,()=>L(r,n));return Pu(N).pipe(au())}));return Sn(d).pipe(cm())}function E$(n,r,i){let l=r[r.length-1],a=r.slice(0,r.length-1).reverse().map(E=>c$(E)).filter(E=>E!==null).map(E=>tg(()=>{let L=E.guards.map(N=>{let Z=um(E.node)??i,ee=hm(N,Z),X=m$(ee)?ee.canActivateChild(l,n):Ns(Z,()=>ee(l,n));return Pu(X).pipe(au())});return Sn(L).pipe(cm())}));return Sn(a).pipe(cm())}function I$(n,r,i,l,d){let a=r&&r.routeConfig?r.routeConfig.canDeactivate:null;if(!a||a.length===0)return Sn(!0);let E=a.map(L=>{let N=um(r)??d,Z=hm(L,N),ee=g$(Z)?Z.canDeactivate(n,r,i,l):Ns(N,()=>Z(n,r,i,l));return Pu(ee).pipe(au())});return Sn(E).pipe(cm())}function D$(n,r,i,l){let d=r.canLoad;if(d===void 0||d.length===0)return Sn(!0);let a=d.map(E=>{let L=hm(E,n),N=f$(L)?L.canLoad(r,i):Ns(n,()=>L(r,i));return Pu(N)});return Sn(a).pipe(cm(),_R(l))}function _R(n){return Ub(Ki(r=>{if(typeof r!="boolean")throw Y_(n,r)}),En(r=>r===!0))}function T$(n,r,i,l){let d=r.canMatch;if(!d||d.length===0)return Sn(!0);let a=d.map(E=>{let L=hm(E,n),N=y$(L)?L.canMatch(r,i):Ns(n,()=>L(r,i));return Pu(N)});return Sn(a).pipe(cm(),_R(l))}var Cy=class{segmentGroup;constructor(r){this.segmentGroup=r||null}},Sy=class extends Error{urlTree;constructor(r){super(),this.urlTree=r}};function tm(n){return Ip(new Cy(n))}function M$(n){return Ip(new Zt(4e3,!1))}function P$(n){return Ip(gR(!1,Us.GuardRejected))}var sS=class{urlSerializer;urlTree;constructor(r,i){this.urlSerializer=r,this.urlTree=i}lineralizeSegments(r,i){let l=[],d=i.root;for(;;){if(l=l.concat(d.segments),d.numberOfChildren===0)return Sn(l);if(d.numberOfChildren>1||!d.children[Vn])return M$(`${r.redirectTo}`);d=d.children[Vn]}}applyRedirectCommands(r,i,l,d,a){return A$(i,d,a).pipe(En(E=>{if(E instanceof vc)throw new Sy(E);let L=this.applyRedirectCreateUrlTree(E,this.urlSerializer.parse(E),r,l);if(E[0]==="/")throw new Sy(L);return L}))}applyRedirectCreateUrlTree(r,i,l,d){let a=this.createSegmentGroup(r,i.root,l,d);return new vc(a,this.createQueryParams(i.queryParams,this.urlTree.queryParams),i.fragment)}createQueryParams(r,i){let l={};return Object.entries(r).forEach(([d,a])=>{if(typeof a=="string"&&a[0]===":"){let L=a.substring(1);l[d]=i[L]}else l[d]=a}),l}createSegmentGroup(r,i,l,d){let a=this.createSegments(r,i.segments,l,d),E={};return Object.entries(i.children).forEach(([L,N])=>{E[L]=this.createSegmentGroup(r,N,l,d)}),new Fr(a,E)}createSegments(r,i,l,d){return i.map(a=>a.path[0]===":"?this.findPosParam(r,a,d):this.findOrReturn(a,l))}findPosParam(r,i,l){let d=l[i.path.substring(1)];if(!d)throw new Zt(4001,!1);return d}findOrReturn(r,i){let l=0;for(let d of i){if(d.path===r.path)return i.splice(l),d;l++}return r}};function A$(n,r,i){if(typeof n=="string")return Sn(n);let l=n,{queryParams:d,fragment:a,routeConfig:E,url:L,outlet:N,params:Z,data:ee,title:X}=r;return Pu(Ns(i,()=>l({params:Z,data:ee,queryParams:d,fragment:a,routeConfig:E,url:L,outlet:N,title:X})))}var aS={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function k$(n,r,i,l,d){let a=bR(n,r,i);return a.matched?(l=e$(r,l),T$(l,r,i,d).pipe(En(E=>E===!0?a:zt({},aS)))):Sn(a)}function bR(n,r,i){if(r.path==="**")return R$(i);if(r.path==="")return r.pathMatch==="full"&&(n.hasChildren()||i.length>0)?zt({},aS):{matched:!0,consumedSegments:[],remainingSegments:i,parameters:{},positionalParamSegments:{}};let d=(r.matcher||Yk)(i,n,r);if(!d)return zt({},aS);let a={};Object.entries(d.posParams??{}).forEach(([L,N])=>{a[L]=N.path});let E=d.consumed.length>0?zt(zt({},a),d.consumed[d.consumed.length-1].parameters):a;return{matched:!0,consumedSegments:d.consumed,remainingSegments:i.slice(d.consumed.length),parameters:E,positionalParamSegments:d.posParams??{}}}function R$(n){return{matched:!0,parameters:n.length>0?Xk(n).parameters:{},consumedSegments:n,remainingSegments:[],positionalParamSegments:{}}}function qk(n,r,i,l){return i.length>0&&F$(n,i,l)?{segmentGroup:new Fr(r,L$(l,new Fr(i,n.children))),slicedSegments:[]}:i.length===0&&N$(n,i,l)?{segmentGroup:new Fr(n.segments,O$(n,i,l,n.children)),slicedSegments:i}:{segmentGroup:new Fr(n.segments,n.children),slicedSegments:i}}function O$(n,r,i,l){let d={};for(let a of i)if(Q_(n,r,a)&&!l[kl(a)]){let E=new Fr([],{});d[kl(a)]=E}return zt(zt({},l),d)}function L$(n,r){let i={};i[Vn]=r;for(let l of n)if(l.path===""&&kl(l)!==Vn){let d=new Fr([],{});i[kl(l)]=d}return i}function F$(n,r,i){return i.some(l=>Q_(n,r,l)&&kl(l)!==Vn)}function N$(n,r,i){return i.some(l=>Q_(n,r,l))}function Q_(n,r,i){return(n.hasChildren()||r.length>0)&&i.pathMatch==="full"?!1:i.path===""}function z$(n,r,i){return r.length===0&&!n.children[i]}var lS=class{};function B$(n,r,i,l,d,a,E="emptyOnly"){return new cS(n,r,i,l,d,E,a).recognize()}var j$=31,cS=class{injector;configLoader;rootComponentType;config;urlTree;paramsInheritanceStrategy;urlSerializer;applyRedirects;absoluteRedirectCount=0;allowRedirects=!0;constructor(r,i,l,d,a,E,L){this.injector=r,this.configLoader=i,this.rootComponentType=l,this.config=d,this.urlTree=a,this.paramsInheritanceStrategy=E,this.urlSerializer=L,this.applyRedirects=new sS(this.urlSerializer,this.urlTree)}noMatchError(r){return new Zt(4002,`'${r.segmentGroup}'`)}recognize(){let r=qk(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(r).pipe(En(({children:i,rootSnapshot:l})=>{let d=new wa(l,i),a=new wy("",d),E=sR(l,[],this.urlTree.queryParams,this.urlTree.fragment);return E.queryParams=this.urlTree.queryParams,a.url=this.urlSerializer.serialize(E),{state:a,tree:E}}))}match(r){let i=new hf([],Object.freeze({}),Object.freeze(zt({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),Vn,this.rootComponentType,null,{});return this.processSegmentGroup(this.injector,this.config,r,Vn,i).pipe(En(l=>({children:l,rootSnapshot:i})),bd(l=>{if(l instanceof Sy)return this.urlTree=l.urlTree,this.match(l.urlTree.root);throw l instanceof Cy?this.noMatchError(l):l}))}processSegmentGroup(r,i,l,d,a){return l.segments.length===0&&l.hasChildren()?this.processChildren(r,i,l,a):this.processSegment(r,i,l,l.segments,d,!0,a).pipe(En(E=>E instanceof wa?[E]:[]))}processChildren(r,i,l,d){let a=[];for(let E of Object.keys(l.children))E==="primary"?a.unshift(E):a.push(E);return ai(a).pipe(Tp(E=>{let L=l.children[E],N=t$(i,E);return this.processSegmentGroup(r,N,L,E,d)}),Jb((E,L)=>(E.push(...L),E)),wd(null),Xb(),Do(E=>{if(E===null)return tm(l);let L=wR(E);return V$(L),Sn(L)}))}processSegment(r,i,l,d,a,E,L){return ai(i).pipe(Tp(N=>this.processSegmentAgainstRoute(N._injector??r,i,N,l,d,a,E,L).pipe(bd(Z=>{if(Z instanceof Cy)return Sn(null);throw Z}))),au(N=>!!N),bd(N=>{if(vR(N))return z$(l,d,a)?Sn(new lS):tm(l);throw N}))}processSegmentAgainstRoute(r,i,l,d,a,E,L,N){return kl(l)!==E&&(E===Vn||!Q_(d,a,l))?tm(d):l.redirectTo===void 0?this.matchSegmentAgainstRoute(r,d,l,a,E,N):this.allowRedirects&&L?this.expandSegmentAgainstRouteUsingRedirect(r,d,i,l,a,E,N):tm(d)}expandSegmentAgainstRouteUsingRedirect(r,i,l,d,a,E,L){let{matched:N,parameters:Z,consumedSegments:ee,positionalParamSegments:X,remainingSegments:re}=bR(i,d,a);if(!N)return tm(i);typeof d.redirectTo=="string"&&d.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>j$&&(this.allowRedirects=!1));let Q=new hf(a,Z,Object.freeze(zt({},this.urlTree.queryParams)),this.urlTree.fragment,Wk(d),kl(d),d.component??d._loadedComponent??null,d,Zk(d)),G=Z_(Q,L,this.paramsInheritanceStrategy);return Q.params=Object.freeze(G.params),Q.data=Object.freeze(G.data),this.applyRedirects.applyRedirectCommands(ee,d.redirectTo,X,Q,r).pipe(Yi(ue=>this.applyRedirects.lineralizeSegments(d,ue)),Do(ue=>this.processSegment(r,l,i,ue.concat(re),E,!1,L)))}matchSegmentAgainstRoute(r,i,l,d,a,E){let L=k$(i,l,d,r,this.urlSerializer);return l.path==="**"&&(i.children={}),L.pipe(Yi(N=>N.matched?(r=l._injector??r,this.getChildConfig(r,l,d).pipe(Yi(({routes:Z})=>{let ee=l._loadedInjector??r,{parameters:X,consumedSegments:re,remainingSegments:Q}=N,G=new hf(re,X,Object.freeze(zt({},this.urlTree.queryParams)),this.urlTree.fragment,Wk(l),kl(l),l.component??l._loadedComponent??null,l,Zk(l)),oe=Z_(G,E,this.paramsInheritanceStrategy);G.params=Object.freeze(oe.params),G.data=Object.freeze(oe.data);let{segmentGroup:ue,slicedSegments:U}=qk(i,re,Q,Z);if(U.length===0&&ue.hasChildren())return this.processChildren(ee,Z,ue,G).pipe(En(_e=>new wa(G,_e)));if(Z.length===0&&U.length===0)return Sn(new wa(G,[]));let le=kl(l)===a;return this.processSegment(ee,Z,ue,U,le?Vn:a,!0,G).pipe(En(_e=>new wa(G,_e instanceof wa?[_e]:[])))}))):tm(i)))}getChildConfig(r,i,l){return i.children?Sn({routes:i.children,injector:r}):i.loadChildren?i._loadedRoutes!==void 0?Sn({routes:i._loadedRoutes,injector:i._loadedInjector}):D$(r,i,l,this.urlSerializer).pipe(Do(d=>d?this.configLoader.loadChildren(r,i).pipe(Ki(a=>{i._loadedRoutes=a.routes,i._loadedInjector=a.injector})):P$(i))):Sn({routes:[],injector:r})}};function V$(n){n.sort((r,i)=>r.value.outlet===Vn?-1:i.value.outlet===Vn?1:r.value.outlet.localeCompare(i.value.outlet))}function U$(n){let r=n.value.routeConfig;return r&&r.path===""}function wR(n){let r=[],i=new Set;for(let l of n){if(!U$(l)){r.push(l);continue}let d=r.find(a=>l.value.routeConfig===a.value.routeConfig);d!==void 0?(d.children.push(...l.children),i.add(d)):r.push(l)}for(let l of i){let d=wR(l.children);r.push(new wa(l.value,d))}return r.filter(l=>!i.has(l))}function Wk(n){return n.data||{}}function Zk(n){return n.resolve||{}}function $$(n,r,i,l,d,a){return Do(E=>B$(n,r,i,l,E.extractedUrl,d,a).pipe(En(({state:L,tree:N})=>or(zt({},E),{targetSnapshot:L,urlAfterRedirects:N}))))}function G$(n,r){return Do(i=>{let{targetSnapshot:l,guards:{canActivateChecks:d}}=i;if(!d.length)return Sn(i);let a=new Set(d.map(N=>N.route)),E=new Set;for(let N of a)if(!E.has(N))for(let Z of xR(N))E.add(Z);let L=0;return ai(E).pipe(Tp(N=>a.has(N)?H$(N,l,n,r):(N.data=Z_(N,N.parent,n).resolve,Sn(void 0))),Ki(()=>L++),Mp(1),Do(N=>L===E.size?Sn(i):ys))})}function xR(n){let r=n.children.map(i=>xR(i)).flat();return[n,...r]}function H$(n,r,i,l){let d=n.routeConfig,a=n._resolve;return d?.title!==void 0&&!fR(d)&&(a[Ey]=d.title),tg(()=>(n.data=Z_(n,n.parent,i).resolve,q$(a,n,r,l).pipe(En(E=>(n._resolvedData=E,n.data=zt(zt({},n.data),E),null)))))}function q$(n,r,i,l){let d=XC(n);if(d.length===0)return Sn({});let a={};return ai(d).pipe(Do(E=>W$(n[E],r,i,l).pipe(au(),Ki(L=>{if(L instanceof lm)throw Y_(new pf,L);a[E]=L}))),Mp(1),En(()=>a),bd(E=>vR(E)?ys:Ip(E)))}function W$(n,r,i,l){let d=um(r)??l,a=hm(n,d),E=a.resolve?a.resolve(r,i):Ns(d,()=>a(r,i));return Pu(E)}function YC(n){return Yi(r=>{let i=n(r);return i?ai(i).pipe(En(()=>r)):Sn(r)})}var fS=(()=>{class n{buildTitle(i){let l,d=i.root;for(;d!==void 0;)l=this.getResolvedTitleForRoute(d)??l,d=d.children.find(a=>a.outlet===Vn);return l}getResolvedTitleForRoute(i){return i.data[Ey]}static \u0275fac=function(l){return new(l||n)};static \u0275prov=Vt({token:n,factory:()=>Re(CR),providedIn:"root"})}return n})(),CR=(()=>{class n extends fS{title;constructor(i){super(),this.title=i}updateTitle(i){let l=this.buildTitle(i);l!==void 0&&this.title.setTitle(l)}static \u0275fac=function(l){return new(l||n)(Wn(_P))};static \u0275prov=Vt({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Ty=new bn("",{providedIn:"root",factory:()=>({})}),My=new bn(""),SR=(()=>{class n{componentLoaders=new WeakMap;childrenLoaders=new WeakMap;onLoadStartListener;onLoadEndListener;compiler=Re(Tx);loadComponent(i,l){if(this.componentLoaders.get(l))return this.componentLoaders.get(l);if(l._loadedComponent)return Sn(l._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(l);let d=Pu(Ns(i,()=>l.loadComponent())).pipe(En(IR),Yi(DR),Ki(E=>{this.onLoadEndListener&&this.onLoadEndListener(l),l._loadedComponent=E}),ng(()=>{this.componentLoaders.delete(l)})),a=new Sp(d,()=>new _r).pipe(Cp());return this.componentLoaders.set(l,a),a}loadChildren(i,l){if(this.childrenLoaders.get(l))return this.childrenLoaders.get(l);if(l._loadedRoutes)return Sn({routes:l._loadedRoutes,injector:l._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(l);let a=ER(l,this.compiler,i,this.onLoadEndListener).pipe(ng(()=>{this.childrenLoaders.delete(l)})),E=new Sp(a,()=>new _r).pipe(Cp());return this.childrenLoaders.set(l,E),E}static \u0275fac=function(l){return new(l||n)};static \u0275prov=Vt({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function ER(n,r,i,l){return Pu(Ns(i,()=>n.loadChildren())).pipe(En(IR),Yi(DR),Do(d=>d instanceof W0||Array.isArray(d)?Sn(d):ai(r.compileModuleAsync(d))),En(d=>{l&&l(n);let a,E,L=!1;return Array.isArray(d)?(E=d,L=!0):(a=d.create(i).injector,E=a.get(My,[],{optional:!0,self:!0}).flat()),{routes:E.map(hS),injector:a}}))}function Z$(n){return n&&typeof n=="object"&&"default"in n}function IR(n){return Z$(n)?n.default:n}function DR(n){return Sn(n)}var e1=(()=>{class n{static \u0275fac=function(l){return new(l||n)};static \u0275prov=Vt({token:n,factory:()=>Re(Y$),providedIn:"root"})}return n})(),Y$=(()=>{class n{shouldProcessUrl(i){return!0}extract(i){return i}merge(i,l){return i}static \u0275fac=function(l){return new(l||n)};static \u0275prov=Vt({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),TR=new bn("");var MR=new bn(""),PR=(()=>{class n{currentNavigation=ln(null,{equal:()=>!1});currentTransition=null;lastSuccessfulNavigation=null;events=new _r;transitionAbortWithErrorSubject=new _r;configLoader=Re(SR);environmentInjector=Re(as);destroyRef=Re(ea);urlSerializer=Re(Iy);rootContexts=Re(dm);location=Re(Yp);inputBindingEnabled=Re(J_,{optional:!0})!==null;titleStrategy=Re(fS);options=Re(Ty,{optional:!0})||{};paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly";urlHandlingStrategy=Re(e1);createViewTransition=Re(TR,{optional:!0});navigationErrorHandler=Re(MR,{optional:!0});navigationId=0;get hasRequestedNavigation(){return this.navigationId!==0}transitions;afterPreactivation=()=>Sn(void 0);rootComponentType=null;destroyed=!1;constructor(){let i=d=>this.events.next(new j_(d)),l=d=>this.events.next(new V_(d));this.configLoader.onLoadEndListener=l,this.configLoader.onLoadStartListener=i,this.destroyRef.onDestroy(()=>{this.destroyed=!0})}complete(){this.transitions?.complete()}handleNavigationRequest(i){let l=++this.navigationId;qo(()=>{this.transitions?.next(or(zt({},i),{extractedUrl:this.urlHandlingStrategy.extract(i.rawUrl),targetSnapshot:null,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null,abortController:new AbortController,id:l}))})}setupNavigations(i){return this.transitions=new Hr(null),this.transitions.pipe(_i(l=>l!==null),Yi(l=>{let d=!1;return Sn(l).pipe(Yi(a=>{if(this.navigationId>l.id)return this.cancelNavigationTransition(l,"",Us.SupersededByNewNavigation),ys;this.currentTransition=l,this.currentNavigation.set({id:a.id,initialUrl:a.rawUrl,extractedUrl:a.extractedUrl,targetBrowserUrl:typeof a.extras.browserUrl=="string"?this.urlSerializer.parse(a.extras.browserUrl):a.extras.browserUrl,trigger:a.source,extras:a.extras,previousNavigation:this.lastSuccessfulNavigation?or(zt({},this.lastSuccessfulNavigation),{previousNavigation:null}):null,abort:()=>a.abortController.abort()});let E=!i.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),L=a.extras.onSameUrlNavigation??i.onSameUrlNavigation;if(!E&&L!=="reload")return this.events.next(new Mu(a.id,this.urlSerializer.serialize(a.rawUrl),"",yy.IgnoredSameUrlNavigation)),a.resolve(!1),ys;if(this.urlHandlingStrategy.shouldProcessUrl(a.rawUrl))return Sn(a).pipe(Yi(N=>(this.events.next(new mf(N.id,this.urlSerializer.serialize(N.extractedUrl),N.source,N.restoredState)),N.id!==this.navigationId?ys:Promise.resolve(N))),$$(this.environmentInjector,this.configLoader,this.rootComponentType,i.config,this.urlSerializer,this.paramsInheritanceStrategy),Ki(N=>{l.targetSnapshot=N.targetSnapshot,l.urlAfterRedirects=N.urlAfterRedirects,this.currentNavigation.update(ee=>(ee.finalUrl=N.urlAfterRedirects,ee));let Z=new vy(N.id,this.urlSerializer.serialize(N.extractedUrl),this.urlSerializer.serialize(N.urlAfterRedirects),N.targetSnapshot);this.events.next(Z)}));if(E&&this.urlHandlingStrategy.shouldProcessUrl(a.currentRawUrl)){let{id:N,extractedUrl:Z,source:ee,restoredState:X,extras:re}=a,Q=new mf(N,this.urlSerializer.serialize(Z),ee,X);this.events.next(Q);let G=dR(this.rootComponentType).snapshot;return this.currentTransition=l=or(zt({},a),{targetSnapshot:G,urlAfterRedirects:Z,extras:or(zt({},re),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.update(oe=>(oe.finalUrl=Z,oe)),Sn(l)}else return this.events.next(new Mu(a.id,this.urlSerializer.serialize(a.extractedUrl),"",yy.IgnoredByUrlHandlingStrategy)),a.resolve(!1),ys}),Ki(a=>{let E=new F_(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(E)}),En(a=>(this.currentTransition=l=or(zt({},a),{guards:l$(a.targetSnapshot,a.currentSnapshot,this.rootContexts)}),l)),_$(this.environmentInjector,a=>this.events.next(a)),Ki(a=>{if(l.guardsResult=a.guardsResult,a.guardsResult&&typeof a.guardsResult!="boolean")throw Y_(this.urlSerializer,a.guardsResult);let E=new N_(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot,!!a.guardsResult);this.events.next(E)}),_i(a=>a.guardsResult?!0:(this.cancelNavigationTransition(a,"",Us.GuardRejected),!1)),YC(a=>{if(a.guards.canActivateChecks.length!==0)return Sn(a).pipe(Ki(E=>{let L=new z_(E.id,this.urlSerializer.serialize(E.extractedUrl),this.urlSerializer.serialize(E.urlAfterRedirects),E.targetSnapshot);this.events.next(L)}),Yi(E=>{let L=!1;return Sn(E).pipe(G$(this.paramsInheritanceStrategy,this.environmentInjector),Ki({next:()=>L=!0,complete:()=>{L||this.cancelNavigationTransition(E,"",Us.NoDataFromResolver)}}))}),Ki(E=>{let L=new B_(E.id,this.urlSerializer.serialize(E.extractedUrl),this.urlSerializer.serialize(E.urlAfterRedirects),E.targetSnapshot);this.events.next(L)}))}),YC(a=>{let E=L=>{let N=[];if(L.routeConfig?.loadComponent){let Z=um(L)??this.environmentInjector;N.push(this.configLoader.loadComponent(Z,L.routeConfig).pipe(Ki(ee=>{L.component=ee}),En(()=>{})))}for(let Z of L.children)N.push(...E(Z));return N};return Xs(E(a.targetSnapshot.root)).pipe(wd(null),Ls(1))}),YC(()=>this.afterPreactivation()),Yi(()=>{let{currentSnapshot:a,targetSnapshot:E}=l,L=this.createViewTransition?.(this.environmentInjector,a.root,E.root);return L?ai(L).pipe(En(()=>l)):Sn(l)}),En(a=>{let E=r$(i.routeReuseStrategy,a.targetSnapshot,a.currentRouterState);return this.currentTransition=l=or(zt({},a),{targetRouterState:E}),this.currentNavigation.update(L=>(L.targetRouterState=E,L)),l}),Ki(()=>{this.events.next(new _y)}),a$(this.rootContexts,i.routeReuseStrategy,a=>this.events.next(a),this.inputBindingEnabled),Ls(1),os(new fr(a=>{let E=l.abortController.signal,L=()=>a.next();return E.addEventListener("abort",L),()=>E.removeEventListener("abort",L)}).pipe(_i(()=>!d&&!l.targetRouterState),Ki(()=>{this.cancelNavigationTransition(l,l.abortController.signal.reason+"",Us.Aborted)}))),Ki({next:a=>{d=!0,this.lastSuccessfulNavigation=qo(this.currentNavigation),this.events.next(new Tu(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects))),this.titleStrategy?.updateTitle(a.targetRouterState.snapshot),a.resolve(!0)},complete:()=>{d=!0}}),os(this.transitionAbortWithErrorSubject.pipe(Ki(a=>{throw a}))),ng(()=>{d||this.cancelNavigationTransition(l,"",Us.SupersededByNewNavigation),this.currentTransition?.id===l.id&&(this.currentNavigation.set(null),this.currentTransition=null)}),bd(a=>{if(this.destroyed)return l.resolve(!1),ys;if(d=!0,yR(a))this.events.next(new yc(l.id,this.urlSerializer.serialize(l.extractedUrl),a.message,a.cancellationCode)),s$(a)?this.events.next(new am(a.url,a.navigationBehaviorOptions)):l.resolve(!1);else{let E=new sm(l.id,this.urlSerializer.serialize(l.extractedUrl),a,l.targetSnapshot??void 0);try{let L=Ns(this.environmentInjector,()=>this.navigationErrorHandler?.(E));if(L instanceof lm){let{message:N,cancellationCode:Z}=Y_(this.urlSerializer,L);this.events.next(new yc(l.id,this.urlSerializer.serialize(l.extractedUrl),N,Z)),this.events.next(new am(L.redirectTo,L.navigationBehaviorOptions))}else throw this.events.next(E),a}catch(L){this.options.resolveNavigationPromiseOnError?l.resolve(!1):l.reject(L)}}return ys}))}))}cancelNavigationTransition(i,l,d){let a=new yc(i.id,this.urlSerializer.serialize(i.extractedUrl),l,d);this.events.next(a),i.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){let i=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),l=qo(this.currentNavigation),d=l?.targetBrowserUrl??l?.extractedUrl;return i.toString()!==d?.toString()&&!l?.extras.skipLocationChange}static \u0275fac=function(l){return new(l||n)};static \u0275prov=Vt({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function K$(n){return n!==py}var AR=(()=>{class n{static \u0275fac=function(l){return new(l||n)};static \u0275prov=Vt({token:n,factory:()=>Re(X$),providedIn:"root"})}return n})(),X_=class{shouldDetach(r){return!1}store(r,i){}shouldAttach(r){return!1}retrieve(r){return null}shouldReuseRoute(r,i){return r.routeConfig===i.routeConfig}},X$=(()=>{class n extends X_{static \u0275fac=(()=>{let i;return function(d){return(i||(i=qp(n)))(d||n)}})();static \u0275prov=Vt({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),kR=(()=>{class n{urlSerializer=Re(Iy);options=Re(Ty,{optional:!0})||{};canceledNavigationResolution=this.options.canceledNavigationResolution||"replace";location=Re(Yp);urlHandlingStrategy=Re(e1);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";currentUrlTree=new vc;getCurrentUrlTree(){return this.currentUrlTree}rawUrlTree=this.currentUrlTree;getRawUrlTree(){return this.rawUrlTree}createBrowserPath({finalUrl:i,initialUrl:l,targetBrowserUrl:d}){let a=i!==void 0?this.urlHandlingStrategy.merge(i,l):l,E=d??a;return E instanceof vc?this.urlSerializer.serialize(E):E}commitTransition({targetRouterState:i,finalUrl:l,initialUrl:d}){l&&i?(this.currentUrlTree=l,this.rawUrlTree=this.urlHandlingStrategy.merge(l,d),this.routerState=i):this.rawUrlTree=d}routerState=dR(null);getRouterState(){return this.routerState}stateMemento=this.createStateMemento();updateStateMemento(){this.stateMemento=this.createStateMemento()}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}resetInternalState({finalUrl:i}){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,i??this.rawUrlTree)}static \u0275fac=function(l){return new(l||n)};static \u0275prov=Vt({token:n,factory:()=>Re(J$),providedIn:"root"})}return n})(),J$=(()=>{class n extends kR{currentPageId=0;lastSuccessfulId=-1;restoredState(){return this.location.getState()}get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}registerNonRouterCurrentEntryChangeListener(i){return this.location.subscribe(l=>{l.type==="popstate"&&setTimeout(()=>{i(l.url,l.state,"popstate")})})}handleRouterEvent(i,l){i instanceof mf?this.updateStateMemento():i instanceof Mu?this.commitTransition(l):i instanceof vy?this.urlUpdateStrategy==="eager"&&(l.extras.skipLocationChange||this.setBrowserUrl(this.createBrowserPath(l),l)):i instanceof _y?(this.commitTransition(l),this.urlUpdateStrategy==="deferred"&&!l.extras.skipLocationChange&&this.setBrowserUrl(this.createBrowserPath(l),l)):i instanceof yc&&i.code!==Us.SupersededByNewNavigation&&i.code!==Us.Redirect?this.restoreHistory(l):i instanceof sm?this.restoreHistory(l,!0):i instanceof Tu&&(this.lastSuccessfulId=i.id,this.currentPageId=this.browserPageId)}setBrowserUrl(i,{extras:l,id:d}){let{replaceUrl:a,state:E}=l;if(this.location.isCurrentPathEqualTo(i)||a){let L=this.browserPageId,N=zt(zt({},E),this.generateNgRouterState(d,L));this.location.replaceState(i,"",N)}else{let L=zt(zt({},E),this.generateNgRouterState(d,this.browserPageId+1));this.location.go(i,"",L)}}restoreHistory(i,l=!1){if(this.canceledNavigationResolution==="computed"){let d=this.browserPageId,a=this.currentPageId-d;a!==0?this.location.historyGo(a):this.getCurrentUrlTree()===i.finalUrl&&a===0&&(this.resetInternalState(i),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(l&&this.resetInternalState(i),this.resetUrlToCurrentUrlTree())}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.getRawUrlTree()),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(i,l){return this.canceledNavigationResolution==="computed"?{navigationId:i,\u0275routerPageId:l}:{navigationId:i}}static \u0275fac=(()=>{let i;return function(d){return(i||(i=qp(n)))(d||n)}})();static \u0275prov=Vt({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function pS(n,r){n.events.pipe(_i(i=>i instanceof Tu||i instanceof yc||i instanceof sm||i instanceof Mu),En(i=>i instanceof Tu||i instanceof Mu?0:(i instanceof yc?i.code===Us.Redirect||i.code===Us.SupersededByNewNavigation:!1)?2:1),_i(i=>i!==2),Ls(1)).subscribe(()=>{r()})}var Q$={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},eG={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},Gd=(()=>{class n{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}disposed=!1;nonRouterCurrentEntryChangeSubscription;console=Re(Z0);stateManager=Re(kR);options=Re(Ty,{optional:!0})||{};pendingTasks=Re(pu);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";navigationTransitions=Re(PR);urlSerializer=Re(Iy);location=Re(Yp);urlHandlingStrategy=Re(e1);injector=Re(as);_events=new _r;get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}navigated=!1;routeReuseStrategy=Re(AR);onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore";config=Re(My,{optional:!0})?.flat()??[];componentInputBindingEnabled=!!Re(J_,{optional:!0});currentNavigation=this.navigationTransitions.currentNavigation.asReadonly();constructor(){this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this).subscribe({error:i=>{this.console.warn(i)}}),this.subscribeToNavigationEvents()}eventsSubscription=new Fi;subscribeToNavigationEvents(){let i=this.navigationTransitions.events.subscribe(l=>{try{let d=this.navigationTransitions.currentTransition,a=qo(this.navigationTransitions.currentNavigation);if(d!==null&&a!==null){if(this.stateManager.handleRouterEvent(l,a),l instanceof yc&&l.code!==Us.Redirect&&l.code!==Us.SupersededByNewNavigation)this.navigated=!0;else if(l instanceof Tu)this.navigated=!0;else if(l instanceof am){let E=l.navigationBehaviorOptions,L=this.urlHandlingStrategy.merge(l.url,d.currentRawUrl),N=zt({browserUrl:d.extras.browserUrl,info:d.extras.info,skipLocationChange:d.extras.skipLocationChange,replaceUrl:d.extras.replaceUrl||this.urlUpdateStrategy==="eager"||K$(d.source)},E);this.scheduleNavigation(L,py,null,N,{resolve:d.resolve,reject:d.reject,promise:d.promise})}}QU(l)&&this._events.next(l)}catch(d){this.navigationTransitions.transitionAbortWithErrorSubject.next(d)}});this.eventsSubscription.add(i)}resetRootComponentType(i){this.routerState.root.component=i,this.navigationTransitions.rootComponentType=i}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),py,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((i,l,d)=>{this.navigateToSyncWithBrowser(i,d,l)})}navigateToSyncWithBrowser(i,l,d){let a={replaceUrl:!0},E=d?.navigationId?d:null;if(d){let N=zt({},d);delete N.navigationId,delete N.\u0275routerPageId,Object.keys(N).length!==0&&(a.state=N)}let L=this.parseUrl(i);this.scheduleNavigation(L,l,E,a).catch(N=>{this.disposed||this.injector.get(Ga)(N)})}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return qo(this.navigationTransitions.currentNavigation)}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(i){this.config=i.map(hS),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this._events.unsubscribe(),this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(i,l={}){let{relativeTo:d,queryParams:a,fragment:E,queryParamsHandling:L,preserveFragment:N}=l,Z=N?this.currentUrlTree.fragment:E,ee=null;switch(L??this.options.defaultQueryParamsHandling){case"merge":ee=zt(zt({},this.currentUrlTree.queryParams),a);break;case"preserve":ee=this.currentUrlTree.queryParams;break;default:ee=a||null}ee!==null&&(ee=this.removeEmptyProps(ee));let X;try{let re=d?d.snapshot:this.routerState.snapshot.root;X=aR(re)}catch{(typeof i[0]!="string"||i[0][0]!=="/")&&(i=[]),X=this.currentUrlTree.root}return lR(X,i,ee,Z??null)}navigateByUrl(i,l={skipLocationChange:!1}){let d=om(i)?i:this.parseUrl(i),a=this.urlHandlingStrategy.merge(d,this.rawUrlTree);return this.scheduleNavigation(a,py,null,l)}navigate(i,l={skipLocationChange:!1}){return tG(i),this.navigateByUrl(this.createUrlTree(i,l),l)}serializeUrl(i){return this.urlSerializer.serialize(i)}parseUrl(i){try{return this.urlSerializer.parse(i)}catch{return this.console.warn(uu(4018,!1)),this.urlSerializer.parse("/")}}isActive(i,l){let d;if(l===!0?d=zt({},Q$):l===!1?d=zt({},eG):d=l,om(i))return Uk(this.currentUrlTree,i,d);let a=this.parseUrl(i);return Uk(this.currentUrlTree,a,d)}removeEmptyProps(i){return Object.entries(i).reduce((l,[d,a])=>(a!=null&&(l[d]=a),l),{})}scheduleNavigation(i,l,d,a,E){if(this.disposed)return Promise.resolve(!1);let L,N,Z;E?(L=E.resolve,N=E.reject,Z=E.promise):Z=new Promise((X,re)=>{L=X,N=re});let ee=this.pendingTasks.add();return pS(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(ee))}),this.navigationTransitions.handleNavigationRequest({source:l,restoredState:d,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:i,extras:a,resolve:L,reject:N,promise:Z,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),Z.catch(X=>Promise.reject(X))}static \u0275fac=function(l){return new(l||n)};static \u0275prov=Vt({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function tG(n){for(let r=0;r<n.length;r++)if(n[r]==null)throw new Zt(4008,!1)}var iG=new bn("");function mS(n,...r){return kp([{provide:My,multi:!0,useValue:n},[],{provide:Ha,useFactory:oG,deps:[Gd]},{provide:Y0,multi:!0,useFactory:sG},r.map(i=>i.\u0275providers)])}function oG(n){return n.routerState.root}function sG(){let n=Re(Ho);return r=>{let i=n.get(Ml);if(r!==i.components[0])return;let l=n.get(Gd),d=n.get(aG);n.get(lG)===1&&l.initialNavigation(),n.get(cG,null,{optional:!0})?.setUpPreloading(),n.get(iG,null,{optional:!0})?.init(),l.resetRootComponentType(i.componentTypes[0]),d.closed||(d.next(),d.complete(),d.unsubscribe())}}var aG=new bn("",{factory:()=>new _r}),lG=new bn("",{providedIn:"root",factory:()=>1});var cG=new bn("");var Po=class n{logger=Re(jn);router=Re(Gd);platformId=Re(Il);history=[["/"]];resetHistory(){this.history=[["/"]],this.router.navigate(["/"])}getCurrentPath(){return this.history.at(-1)?.join("")??"/"}navigateToHome(){this.router.navigate(["/"]),this.history.push(["/"])}navigateToListView(){this.router.navigate(["/list"]),this.history.push(["/list"])}navigateToSearchView(){this.router.navigate(["/search"]),this.history.push(["/search"])}navigateToProfile(r){this.scrollToTop(),this.router.navigate(["/profile",r]),this.history.push(["/profile",r])}navigateToRoute(r){this.router.navigate(["/route",r]),this.history.push(["/route",r])}goBack(){if(this.history.length>1){this.history.pop();let r=this.history.pop();if(!r){this.logger.log("No previous path found");return}this.router.navigate(r),this.history.push(r);return}this.logger.log("Only current path in history")}scrollToTop(){if(pc(this.platformId))try{let r=document.querySelector("mapvx-website");if(r){r.scrollIntoView({behavior:"smooth",block:"start"});return}window.scrollTo({top:0,behavior:"smooth"})}catch(r){this.logger.log("Error scrolling to top:",r),window.scrollTo(0,0)}}static \u0275fac=function(i){return new(i||n)};static \u0275prov=Vt({token:n,factory:n.\u0275fac})};function gS(n){return D_(n)}var dG={"Yoga Studio":["fak","beauty"],"Salon / Barbershop":["fak","services"],"Event Space":["fak","events"],"Comedy Club":["fak","events"],"Women's Store":["fak","shopping"],Gym:["fak","beauty"],Spa:["fak","beauty"],"Men's Store":["fak","shopping"],"Clothing Store":["fak","shopping"],"Shoe Store":["fak","shopping"],"Gift Shop":["fak","shopping"],Winery:["fak","food-and-beverage"],"Perfume Shop":["fak","shopping"],"Sporting Goods Shop":["fak","shopping"],"Jewelry Store":["fak","shopping"],"Flower Shop":["fak","shopping"],"Watch Shop":["fak","shopping"],"Health & Beauty Service":["fak","beauty"],"Furniture / Home Store":["fak","shopping"],"Optical Shop":["fak","beauty"],"Salad Place":["fak","food-and-beverage"],"Italian Restaurant":["fak","food-and-beverage"],Cafeteria:["fak","food-and-beverage"],Restaurant:["fak","food-and-beverage"],Caf\u00E9:["fak","food-and-beverage"],"American Restaurant":["fak","food-and-beverage"],"Fast Food Restaurant":["fak","food-and-beverage"],"Cocktail Bar":["fak","food-and-beverage"],Delicatessen:["fak","food-and-beverage"],"Japanese Restaurant":["fak","food-and-beverage"],"Middle Eastern Restaurant":["fak","food-and-beverage"],"Mediterranean Restaurant":["fak","food-and-beverage"],"Brazilian Restaurant":["fak","food-and-beverage"],Pub:["fak","food-and-beverage"],"Beer Bar":["fak","food-and-beverage"],Bar:["fak","food-and-beverage"],Lounge:["fak","food-and-beverage"],Nightclub:["fak","food-and-beverage"],"Chocolate Shop":["fak","food-and-beverage"],"Ice Cream Shop":["fak","food-and-beverage"],"Donut Shop":["fak","food-and-beverage"],"Coffee Shop":["fak","food-and-beverage"],"Grocery Store":["fak","shopping"],Pharmacy:["fak","health"],"Convenience Store":["fak","shopping"],"Dentist's Office":["fak","health"],Bank:["fak","services"],"Travel Agency":["fak","airport"],"Shipping Store":["fak","services"],"Mobile Phone Shop":["fak","shopping"],Parking:["fak","parking"],"Public Restrooms":["fak","user"],"Public Bathroom":["fak","user"],"Transport Service":["fak","user"],Hotel:["fak","hotels"],"Coming soon":["fak","user"],"Roller Rink":["fak","beauty"],"Music Venue":["fak","events"],"Football Shop":["fak","shopping"],Stage:["fak","events"],Tavern:["fak","food-and-beverage"],"Point of interest":["fak","user"],Entrance:["fak","user"],Exit:["fak","user"],"Music Festival":["fak","events"]};function t1(n){let r=dG[n];return r||["fak","shopping"]}var vS={};DI(vS,{faAirport:()=>hG,faArrowTopRight:()=>fG,faBackground:()=>yS,faBeauty:()=>pG,faCenter:()=>mG,faCompass:()=>gG,faCompassNorth:()=>yG,faDeals:()=>vG,faEvents:()=>_G,faFoodAndBeverage:()=>bG,faHealth:()=>wG,faHotels:()=>xG,faParking:()=>CG,faRoute:()=>SG,faServices:()=>EG,faShopping:()=>IG,faUser:()=>DG});var hG={prefix:"fak",iconName:"airport",icon:[448,512,[],"e009","M431.4 140.8c-.2-.7-.6-1.3-1.1-1.9-14.7-18.5-41.3-23.7-61.9-11.8l-84.5 48.8-49.6-32.1 4.1-2.4c3.6-2 4.8-6.6 2.8-10.2s-6.6-4.8-10.2-2.8l-10.7 6.3-28-18.2 4.1-2.4c3.6-2 4.8-6.6 2.8-10.2s-6.6-4.8-10.2-2.8l-10.7 6.3-66.7-43.2-44.9 25.9 133.4 134.5-54.3 31.4c-10.7 6.1-27.7 21.2-41 36.2L33.3 254.2c-2.3-1.2-5.1-1.2-7.2 .1L4.2 266.9C2.3 268 1 270.1 .6 272.2s.4 4.5 1.9 6.1l65.4 70.9 28.8 92.1c.7 2.2 2.3 3.9 4.5 4.7 .8 .4 1.8 .5 2.8 .5 1.3 0 2.5-.4 3.7-1l21.9-12.6c2.3-1.3 3.6-3.6 3.7-6.1l2.9-80.6c19.7-4.1 41.3-11.3 51.9-17.5l54.3-31.4 49.8 182.7 44.9-25.9-4.1-79.3 10.7-6.3c3.6-2 4.8-6.6 2.8-10.2s-6.6-4.8-10.2-2.8l-4.1 2.4-1.7-33.5 10.7-6.3c3.6-2 4.8-6.6 2.8-10.2s-6.6-4.8-10.2-2.8l-4.1 2.4-3-59.1 84.5-48.7c20.6-11.8 29.4-37.4 20.7-59.5l-.4 .5z"]},fG={prefix:"fak",iconName:"arrow-top-right",icon:[427,512,[],"e010","M41 490.7l0-320 275.1 0-88.6-95.3 35.1-38 147.7 160-148.3 160.7-34.5-38 88.6-96-225.8 0 0 266.7-49.2 0z"]},yS={prefix:"fak",iconName:"background",icon:[388,512,[],"e00a","M387.9 193.9C387.9 86.9 301 0 193.9 0S0 86.9 0 193.9 84.7 385.6 190.1 387.7l0 67.8c-11.6 1.9-20.5 11.9-20.5 24 0 13.5 11 24.4 24.4 24.4s24.4-11 24.4-24.4c0-12.1-8.8-22.2-20.5-24l0-67.8c105.3-2 190.1-88 190.1-193.8zM210.5 479.4c0 9.2-7.4 16.6-16.6 16.6s-16.6-7.4-16.6-16.6 7.4-16.6 16.6-16.6 16.6 7.4 16.6 16.6z"]},pG={prefix:"fak",iconName:"beauty",icon:[576,512,[],"e000","M190.8 234.2c-21.8-10.6-45.1-16.3-66.9-18.6-.6-35.8 5.4-66.6 8.6-78.7 1-3.2 4.2-5.1 7.4-4.5 11.8 3.5 40 13.1 69.4 31.7-9 21.1-16 45.1-18.2 70.4l0 0zm176.6-70.4c29.1-18.6 57.6-28.2 69.4-31.7 3.2-.6 6.4 1 7.4 4.5 3.2 12.5 9.3 42.9 8.6 78.7-22.1 2.2-45.1 8-66.9 18.6-2.2-25.3-9-49-18.2-70.4l0 0zM260.9 417.6c-33.9 6.1-94.1 10.2-143.7-19.8-63-38.4-89-120-95-142.7-.6-3.2 1-6.7 4.2-7.7 21.8-5.8 101.1-23 163.8 14.4 5.1 71 49.6 131.2 70.4 155.5l0 0zM385.7 262.1c63-37.4 142.4-20.2 163.8-14.4 3.2 1 5.1 4.2 4.2 7.7-6.1 22.7-32 104.3-95 142.7-49.6 30.1-109.4 25.9-143.7 19.8 5.1-5.8 11.2-13.4 18.2-23 17.3-24 37.4-58.6 47-98.6 2.6-10.9 4.5-22.1 5.4-33.6l0 0zm-23.4-12.8c0 89.3-74.2 161.9-74.2 161.9s-74.2-72.6-74.2-161.9c0-76.8 54.4-140.8 70.1-157.8 2.2-2.2 6.1-2.2 8.3 0 15.7 17 70.1 81 70.1 157.8l0 0z"]},mG={prefix:"fak",iconName:"center",icon:[576,512,[],"e00f","M545.2 238.7l-50.9 0C486 138.2 406 57.9 305.5 49.9l0-50.9c0-9.6-8-17.3-17.3-17.3S271-10.6 271-1l0 50.9C170.5 58.2 90.5 138.2 82.2 238.7l-50.9 0c-9.6 0-17.3 8-17.3 17.3s7.7 17.3 17.3 17.3l50.9 0C90.5 373.4 170.5 454.1 271 462.1l0 50.9c0 9.6 8 17.3 17.3 17.3s17.3-7.7 17.3-17.3l0-50.9c100.2-8.3 180.8-88.6 188.8-188.8l50.9 0c9.6 0 17.3-7.7 17.3-17.3s-7.7-17.3-17.3-17.3zM459.1 256c0 5.8-.3 11.5-1 17.3-8 80.3-72.3 144.6-152.6 153-11.5 1.3-23 1.3-34.6 0-80.6-8.3-144.6-72.6-152.6-153l0 0c-.6-5.4-1-11.2-1-17.3s.3-11.5 1-17.3l0 0c8.3-80.6 72.3-144.6 152.6-152.6 11.5-1.3 23-1.3 34.6 0 80.3 8.3 144.6 72.3 152.6 152.6 .6 5.8 1 11.5 1 17.3zm-271.2 0a100.1 100.1 0 1 1 200.2 0 100.1 100.1 0 1 1 -200.2 0z"]},gG={prefix:"fak",iconName:"compass",icon:[256,512,[],"e00d","M238.9 263.4l0 257.6-47 0-118.4-163.2 0 163.2-55.7 0 0-257.6 47 0 118.4 161.6 0-161.6 55.7 0zM26.8 203.5c-3.2 0-5.8-1.3-7.7-3.5-1.6-2.2-1.9-4.8-.6-7L119.9-4.2C121.2-7 124.7-9 128.2-9s7 1.9 8.3 4.8L238 193c1.6 3.2 .6 6.7-2.6 9s-7.7 2.2-10.9 .6l-96.3-53.4-96.3 53.4s-3.2 1.3-5.1 1.3l0 0z"]},yG={prefix:"fak",iconName:"compass-north",icon:[382,512,[],"e00b","M202.8 6.9c-6.5-6.5-17-6.5-23.6 0L112.5 73.6c-4.8 4.8-6.2 11.9-3.6 18.2 2.6 6.2 8.7 10.4 15.4 10.4l133.4 0c6.7 0 12.9-4 15.4-10.4 2.6-6.2 1.2-13.3-3.6-18.2L202.8 6.9zM191 133a190.5 190.5 0 1 0 0 381 190.5 190.5 0 1 0 0-381zm38.9 278.1l-74.7-107.9 0 97.6c0 9.9-8 17.9-17.9 17.9s-17.9-8-17.9-17.9l0-154.7c0-7.9 5.1-14.8 12.5-17s15.6 .5 20 6.9l74.7 107.9 0-97.6c0-9.9 8-17.9 17.9-17.9s17.9 8 17.9 17.9l0 154.7c0 7.9-5 14.8-12.5 17-7.4 2.3-15.6-.5-20-6.9z"]},vG={prefix:"fak",iconName:"deals",icon:[512,512,[],"e007","M256 0a256 256 0 1 0 0 512 256 256 0 1 0 0-512zm0 30.1a225.9 225.9 0 1 1 0 451.8 225.9 225.9 0 1 1 0-451.8zM288 232l-10.2-2.2 0-66.9c19.5 6.1 30.7 23 36.8 41.6l46.7-18.6c-9.3-32-34.2-63.7-83.2-70.7l0-33.6-35.5 0 0 33.3c-53.4 5.8-81.3 41.6-81.3 80.6 0 51.5 30.1 73.3 73 81.3l8 1.6 0 72.3c-26.9-7.4-40.6-31-44.8-53.8l-49 18.6 .3 0c9.3 39.7 38.7 75.8 93.8 82.2l0 33.6 35.5 0 0-33.3c58.9-5.8 86.1-42.2 86.1-83.8 0-50.9-37.4-73-75.8-82.2zm-45.8-70.7l0 61.8c-17.6-4.8-27.5-13.8-27.5-31 0-12.5 7.7-26.2 27.5-30.7l0 0zM277.8 351l0-66.9c19.8 4.8 32 16 32 32.6s-9.6 30.1-32 34.2z"]},_G={prefix:"fak",iconName:"events",icon:[576,512,[],"e003","M421.4 122.6c-24.3-24.3-27.2-62.1-8.6-89.6 1.6-2.2 1.3-5.4-.6-7.4L370.2-16.3c-2.2-2.2-5.8-2.2-8 0L132.8 213.1c-2.2 2.2-2.2 5.8 0 8l11.5 11.5c3.5 3.5 3.5 9.3 0 12.8s-9.3 3.5-12.8 0L120 233.9c-2.2-2.2-5.8-2.2-8 0L15.7 330.2c-2.2 2.2-2.2 5.8 0 8l41.9 41.9c1.9 1.9 5.1 2.2 7.4 .6 27.5-18.6 65.3-15.7 89.6 8.6s27.2 62.1 8.6 89.6c-1.6 2.2-1.3 5.4 .6 7.4l41.9 41.9c2.2 2.2 5.8 2.2 8 0L310.1 432c2.2-2.2 2.2-5.8 0-8l-11.5-11.5c-3.5-3.5-3.5-9.3 0-12.5 3.5-3.5 9.3-3.5 12.5 0l11.5 11.5c2.2 2.2 5.8 2.2 8 0L560 182.1c2.2-2.2 2.2-5.8 0-8l-41.9-41.9c-1.9-1.9-5.1-2.2-7.4-.6-27.5 18.6-65.3 15.7-89.6-8.6zm-225 174.7c-4.5 4.5-11.8 4.5-16.3 0L152 269.1c-4.5-4.5-4.5-11.8 0-16.3s11.8-4.5 16.3 0L196.5 281c4.5 4.5 4.5 11.8 0 16.3zM247 344.6c-4.5 4.5-11.8 4.5-16.3 0l-28.2-28.2c-4.5-4.5-4.5-11.8 0-16.3s11.8-4.5 16.3 0L247 328.3c4.5 4.5 4.5 11.8 0 16.3zm48.3 48c-4.5 4.5-11.8 4.5-16.3 0l-28.2-28.2c-4.5-4.5-4.5-11.8 0-16.3s11.8-4.5 16.3 0l28.2 28.2c4.5 4.5 4.5 11.8 0 16.3zM421.4 229.1c-.3 2.9-2.6 5.4-5.1 6.7l-43.2 18.9c-1.9 1-3.5 2.2-4.2 4.2l-18.9 43.2s-1 1.9-1.9 2.6c-1.3 1.3-2.9 2.2-4.8 2.6-2.9 .3-6.1-.6-8-2.9l-31-35.2c-1.3-1.6-3.5-2.6-5.4-2.9l-46.7-4.5c-2.9 0-5.8-2.2-7-4.8s-1.3-6.1 0-8.3l23.7-40.3c1-1.9 1.6-4.2 1-6.1l-10.2-45.8c-.6-2.9 0-6.1 2.2-8.3s5.1-2.9 8.3-2.2l45.8 10.2c2.2 .3 4.2 0 6.1-1l40.3-23.7c2.6-1.6 5.8-1.6 8.3 0 2.6 1.3 4.5 4.2 4.8 7l4.5 46.7c0 2.2 1.3 4.2 2.9 5.4l35.2 31c2.2 1.9 3.2 5.1 2.9 8l0 0z"]},bG={prefix:"fak",iconName:"food-and-beverage",icon:[512,512,[],"e001","M497.9 145.9l-127 0 0-114.6-24 0 0 114.6-127.4 0c-8 0-14.4 6.4-14.4 14.4l0 17.3c0 8 6.4 14.4 14.4 14.4l19.2 0 3.5 53.8c-61.1-30.1-140.5-23.4-192.6 18.2-29.1 23-47.4 55-48.6 90.6 0 5.1 3.8 9.3 9 9.3l301.4 0c5.1 0 9.3-4.2 9-9.3-1.6-43.5-28.8-80.6-66.6-103l-3.8-59.5 218.9 0-17 259.2c-.6 10.9-11.8 18.2-23 18.2l-116.2 0c5.1-4.5 8.6-10.9 8.6-18.2l0-19.5c0-4.8-4.2-8.3-9-8.3l-303 0c-4.8 0-9 3.5-9 8.3l0 19.5c0 17.9 19.2 29.4 37.4 29.4l390.4 0c17-.3 32.6-11.8 33.6-28.8L479 192 498.2 192c8 0 14.4-6.4 14.4-14.4l0-17.3c0-8-6.4-14.4-14.4-14.4zm3.8 31.7c0 1.9-1.6 3.8-3.8 3.8l-278.4 0c-1.9 0-3.8-1.6-3.8-3.8l0-17.3c0-1.9 1.6-3.8 3.8-3.8l278.4 0c1.9 0 3.8 1.6 3.8 3.8l0 17.3zM9.3 402.9l301.8 0c4.8 0 8.6-3.8 8.6-8.6s-3.8-8.6-8.6-8.6l-301.8 0c-4.8 0-8.6 3.8-8.6 8.6s3.8 8.6 8.6 8.6z"]},wG={prefix:"fak",iconName:"health",icon:[512,512,[],"e002","M256 0a256 256 0 1 0 0 512 256 256 0 1 0 0-512zm0 30.1a225.9 225.9 0 1 1 0 451.8 225.9 225.9 0 1 1 0-451.8zM393.9 212.5l-94.4 0 0-94.4c0-5.1-4.2-9.3-9.3-9.3l-68.5 0c-5.1 0-9.3 4.2-9.3 9.3l0 94.4-94.4 0c-5.1 0-9.3 4.2-9.3 9.3l0 68.5c0 5.1 4.2 9.3 9.3 9.3l94.4 0 0 94.4c0 5.1 4.2 9.3 9.3 9.3l68.5 0c5.1 0 9.3-4.2 9.3-9.3l0-94.4 94.4 0c5.1 0 9.3-4.2 9.3-9.3l0-68.5c0-5.1-4.2-9.3-9.3-9.3z"]},xG={prefix:"fak",iconName:"hotels",icon:[512,512,[],"e00c","M50.1 357.8l8.1-18.1 80.6 36.1-8.1 18.1zm462.7 78.7L428 207.7c14.4-8.6 26.2-21.4 33.9-36.8 10.9-22.4 11.8-48 3.2-72.3-17.9-48.3-71.7-74.9-119.7-59.2-17 5.4-31.4 15.7-42.2 29.4-7.7-2.2-15.7-3.5-23.7-4.5-3.5-.3-6.7 0-10.2-.3-1.6-4.5-3.5-8.3-5.8-11.2-2.2-3.2-5.4-6.4-9.3-9.9-14.4-12.8-32.3-21.1-51.2-22.7-5.1-.3-9.6-.6-13.4 0-4.8 .3-10.2 2.2-16 5.1-10.9 5.4-20.5 13.4-28.8 23.7L46.2 171.8c-8.3 10.9-15 23-19.8 35.5-5.4 12.5-9.3 25.9-10.9 40.3L-.5 407c-1.3 13.1 0 25.9 3.5 37.8 1.9 6.4 4.5 11.2 7.4 15.4 2.2 3.2 5.4 6.4 9.3 9.9 14.4 12.8 32.3 21.1 51.2 22.7 2.9 .3 5.4 .3 8 .3l0 0c1.9 0 3.8 0 5.4-.3 4.8-.3 10.2-2.2 16-5.1 10.9-5.4 20.5-13.4 28.8-23.7l98.6-122.9c8.3-10.9 15-23 19.8-35.5 5.4-12.5 9.3-25.9 10.9-40l13.8-136.3 1.9 0c3.5 .3 6.7 .3 10.2 .3 .6 9.3 1.9 18.6 5.4 27.8 14.4 39 52.2 63.7 91.2 63.7 3.2 0 6.4-.3 9.6-.6l42.9 116.5-44.5 14.4 12.2 37.8 46.1-15 6.4 17-59.5 19.5 12.2 37.8 61.1-19.8 8.3 22.1 37.1-13.8zM237.6 92.5c2.9-1.6 9-3.5 17.3-4.5 .3 4.2 0 8.3 0 12.8-8.6-2.9-14.7-6.1-17.3-8.3zm1.3 170.2c-1.3 11.8-4.5 23.7-9.6 34.9-4.2 10.9-9.9 21.4-17 30.7L114 450.9c-6.4 8-13.8 14.1-22.1 18.2-4.5 2.2-7.7 2.9-9.3 3.2l-9.3 0c-14.7-1.3-28.5-7.7-40-17.9-2.9-2.6-5.1-4.8-6.7-7-1-1.3-2.6-4.2-4.2-9.6-2.6-9.3-3.8-19.2-2.6-29.8L36 248.6c1.6-11.8 4.8-23.7 9.6-34.9 4.2-10.9 9.9-21.4 17-30.7L161.1 60.5c6.4-8 13.8-14.1 22.1-18.2 4.5-2.2 7.7-2.9 9.3-3.2l9.3 0c14.7 1.3 28.5 7.7 40 17.9 2.6 2.6 5.1 5.1 6.4 7l.3 .6c-8 1.3-14.7 3.2-20.5 6.1-2.6-3.2-5.8-6.1-9.6-8-6.4-2.9-13.8-3.2-20.5-.3s-12.2 8.3-15 15c-5.8 14.1 .6 30.4 14.1 36.2 3.5 1.6 7 2.2 10.9 2.2 3.2 0 6.7-.6 9.9-1.9 1.9-1 3.5-2.2 5.1-3.5 7.4 6.1 17.9 10.9 30.1 14.1L239.2 262.1zM212.9 93.1s-1.6 2.2-2.9 2.9c-1 .6-2.9 1-5.1 0-3.8-1.6-5.4-6.4-3.8-10.6 .6-1.9 2.2-3.2 4.2-4.2 1-.6 2.9-1 5.1 0 1.9 .6 3.2 2.2 3.8 4.2-.6 1.9-1.3 3.5-1.3 5.1l0 2.6zM274.4 105c.6-5.8 .6-11.5 0-17.3l2.9 0c5.1 .6 9.6 1.3 13.4 2.2-2.2 5.1-3.8 10.2-5.1 15.7-3.2 0-6.1 0-9.6-.3l-1.9 0zm52.5 38.4c-2.6-6.7-3.5-13.4-3.5-20.2 3.5-1.6 6.7-3.2 9-5.4 6.4-5.1 8-11.2 8.3-15.4 .3-4.5-1-8.6-3.2-12.5 5.4-5.8 12.2-10.9 20.2-13.4 28.2-9.3 59.5 6.7 70.1 35.2 5.1 13.8 4.5 28.5-1.6 41.3-5.8 12.2-16.3 21.1-29.1 25.3-28.2 9.3-59.5-6.7-70.1-35.2z"]},CG={prefix:"fak",iconName:"parking",icon:[448,512,[],"e006","M16 0L246.4 0C356.5 0 432 63.7 432 165.4S356.5 332.2 247 332.2l-119.7 0 0 179.8-111.4 0 0-512zM315.8 165.4c0-45.1-36.5-73.3-89.3-73.3l-98.9 0 0 147.8 98.9 0c52.8 0 89.3-26.9 89.3-74.6z"]},SG={prefix:"fak",iconName:"route",icon:[384,512,[],"e00e","M22.7 206.4c-3.2-3.2-5.1-7.7-4.5-11.8 .3-4.2 3.2-7.4 7-8.6L347.8 82.6c4.8-1.6 10.2 0 14.1 4.2 3.8 3.8 5.8 9.6 4.2 14.1L262.7 423c-1.6 5.1-6.7 7.7-12.2 6.7-5.8-1-10.6-5.8-12.2-11.2L192.3 257 30.4 210.6c-2.6-.6-4.8-2.2-6.7-4.2l-.3 0z"]},EG={prefix:"fak",iconName:"services",icon:[512,512,[],"e005","M89.6 51.2l102.4 0c7 0 12.8-5.8 12.8-12.8S199 25.6 192 25.6l-140.8 0C22.7 25.6 0 48.6 0 76.8l0 384C0 489.3 23 512 51.2 512L192 512c7 0 12.8-5.8 12.8-12.8S199 486.4 192 486.4l-102.4 0c-7 0-12.8-5.8-12.8-12.8s5.8-12.8 12.8-12.8l102.4 0c7 0 12.8-5.8 12.8-12.8S199 435.2 192 435.2l-102.4 0c-7 0-12.8-5.8-12.8-12.8s5.8-12.8 12.8-12.8l102.4 0c7 0 12.8-5.8 12.8-12.8S199 384 192 384L89.6 384c-7 0-12.8-5.8-12.8-12.8s5.8-12.8 12.8-12.8l102.4 0c7 0 12.8-5.8 12.8-12.8S199 332.8 192 332.8l-102.4 0c-7 0-12.8-5.8-12.8-12.8s5.8-12.8 12.8-12.8l102.4 0c7 0 12.8-5.8 12.8-12.8S199 281.6 192 281.6l-102.4 0c-7 0-12.8-5.8-12.8-12.8S82.6 256 89.6 256L192 256c7 0 12.8-5.8 12.8-12.8S199 230.4 192 230.4l-102.4 0c-7 0-12.8-5.8-12.8-12.8s5.8-12.8 12.8-12.8l102.4 0c7 0 12.8-5.8 12.8-12.8S199 179.2 192 179.2l-102.4 0c-7 0-12.8-5.8-12.8-12.8s5.8-12.8 12.8-12.8l102.4 0c7 0 12.8-5.8 12.8-12.8S199 128 192 128L89.6 128c-7 0-12.8-5.8-12.8-12.8s5.8-12.8 12.8-12.8l102.4 0c7 0 12.8-5.8 12.8-12.8S199 76.8 192 76.8l-102.4 0c-7 0-12.8-5.8-12.8-12.8s5.8-12.8 12.8-12.8l0 0zM460.8 385.3l0-1.3c0-33.6-28.8-63.4-72.6-81.9 21.4-26.9 21.4-73.3 21.4-97.3 0-25.6-17.3-204.8-38.4-204.8s-38.4 179.2-38.4 204.8c0 20.2 .3 70.1 21.8 97.3-44.2 18.6-73 48.3-73 81.9l0 1.3c-29.1 6.1-51.2 31.7-51.2 62.7 0 35.5 28.8 64 64 64s64-28.8 64-64c0-31-22.1-57-51.2-62.7l0-1.3c0-23.4 25.3-46.7 64-61.4 39 14.7 64 38.1 64 61.4l0 1.3c-29.4 6.1-51.2 31.7-51.2 62.7 0 35.5 28.8 64 64 64s64-28.8 64-64c0-31-22.1-57-51.2-62.7l0 0zM256 448a38.4 38.4 0 1 1 76.8 0 38.4 38.4 0 1 1 -76.8 0zM371.2 256a12.8 12.8 0 1 1 0 25.6 12.8 12.8 0 1 1 0-25.6zM448 409.6a38.4 38.4 0 1 1 0 76.8 38.4 38.4 0 1 1 0-76.8z"]},IG={prefix:"fak",iconName:"shopping",icon:[512,512,[],"e004","M498.1 501.1L446.6 107.8c-.6-4.8-4.8-8.6-9.6-8.6l-76.5 0 0-22.4c0-42.6-34.6-77.1-77.1-77.1-9.3 0-17.9 1.6-26.2 4.8-8.3-2.9-17-4.8-26.2-4.8-42.6 0-77.1 34.6-77.1 77.1l0 22.4-77.8 0c-4.8 0-9 3.5-9.6 8.6L14.9 501.1c0 2.9 .3 5.4 2.2 7.7s4.5 3.2 7.4 3.2l464.3 0c2.9 0 5.4-1.3 7.4-3.2s2.6-5.1 2.2-7.7l0 0zM354.4 481.3l47.7-362.6 26.6 0 47.7 364.2zM283.1 19.5c32 0 57.6 25.9 57.6 57.6l0 22.4-33 0 0-22.4c0-23-10.2-43.5-25.9-57.6l1.3 0zm-25.9 6.4c18.6 9.6 31.4 28.8 31.4 51.2l0 22.4-63 0 0-22.4c0-22.4 12.8-41.9 31.4-51.2l0 0zM173 77.1c0-32 25.9-57.6 57.6-57.6l1.3 0c-16 14.1-25.9 34.9-25.9 57.6l0 22.4-33 0 0-22.4z"]},DG={prefix:"fak",iconName:"user",icon:[320,512,[],"e008","M190.7 104l0 0c28.8 0 52.2-23.4 52.2-52.2S219.5-.3 190.7-.3l0 0c-28.8 0-52.2 23.7-52.2 52.2s23.7 51.8 52.2 51.8zM75.8 381.1l0 0c-.6 1.6-1.6 3.2-2.9 4.8-11.5 13.8-22.7 27.2-34.2 41L12.1 458.6c-5.4 6.4-4.5 16 1.9 21.4l20.5 17.3c2.9 2.2 6.1 3.5 9.9 3.5 4.5 0 8.6-1.9 11.5-5.4 12.2-14.4 38.1-45.1 51.8-61.4 1.6-1.9 3.5-4.2 5.4-6.1 4.8-5.1 9.3-10.6 12.8-16.6 4.8-9 9.3-18.2 13.1-27.5L88.6 345.6c-4.2 11.8-8 23.7-12.2 35.2zM312 223.7l-1.3 0c-6.7-1-13.1-2.2-19.5-3.8-39.4-11.8-62.1-33-71.7-65.9-1.9-6.7-5.1-12.8-9-18.6-10.2-15.4-26.2-25.6-44.2-28.2-16.3-2.9-32.6 1.6-45.4 11.8-17.3 14.1-35.8 26.9-53.8 39.4L63 161.3c-10.2 7-19.5 16.3-26.6 26.9-9.9 14.1-20.2 28.2-30.7 42.2l-7 9.6c-4.8 6.7-3.5 16.3 3.2 21.1l21.8 15.7c6.7 4.8 16.3 3.5 21.1-3.5l7-9.6c11.8-16.3 23-32 34.9-47.4 2.2-2.6 4.5-5.1 7.4-7l-9.6 54.4c-3.5 19.2 3.5 38.4 18.2 50.9 11.8 9.9 24 20.2 35.8 30.1 13.4 11.2 26.9 22.4 40.3 33.9 1.6 1.3 2.9 3.2 3.8 5.4 7.7 20.5 15 41 22.4 61.4l20.5 56.3c2.2 6.1 8 9.9 14.1 9.9 1.6 0 3.5 0 5.1-1l25-9c7.7-2.9 11.8-11.5 9-19.2-9-25.3-33.9-94.1-47.7-131.2-1.3-2.9-2.9-5.4-5.4-7.7-13.8-11.8-27.5-23.7-41.6-34.9-1.6-1.3-2.2-1.6-1.3-5.4 2.9-11.2 5.1-22.4 6.7-33.6 2.2-16.3 4.2-28.8 7-42.9 29.4 31.7 69.8 50.6 112.6 53.4 4.2 0 8-1.3 11.2-3.8 3.2-2.9 4.8-7 4.8-11.2l0-26.9c0-7.7-5.8-14.1-13.1-15z"]};var Zo=class n{onDestroy=new _r;logger=Re(jn);mapService=Re(xi);navigatorService=Re(Po);loadedDataService=Re(ci);iconLibraryService=Re(Yn);document=Re(wi);markers=new Set;_hasCurrentLocationMarker=!1;ngOnDestroy(){this.onDestroy.next(),this.onDestroy.complete()}getIconFromPlace(r){this.logger.log("getIconFromPlace",r);let[i,l]=t1(r.localizedCategory||"");return this.iconLibraryService.getIconDefinition(i,l)}toSVGString(r){return GC(i=>{i(gS(yS)),i(gS(r))}).html.join("")}createPlaceMarkerElement(r){let i=this.getIconFromPlace(r);return this.createElement(r.lazarilloId,i)}createOriginMarkerElement(){let r=this.iconLibraryService.getIconDefinition("fak","user");return this.createElement("origin",r,["route-marker","origin-marker"])}createElement(r,i,l=[]){let d=this.document.createElement("div");return d.className="marker",d.classList.add(...l),d.id=`${r}-marker`,d.innerHTML=this.toSVGString(i),d}addMarker(r){if(this.markers.has(r.lazarilloId)){this.logger.log("Marker already exists for place",r.lazarilloId);return}let i={element:this.createPlaceMarkerElement(r),id:r.lazarilloId,coordinate:r.position,floorId:r.inFloors?.[0],onClick:()=>{this.logger.log("Marker clicked for place",r.lazarilloId),this.navigatorService.navigateToProfile(r.lazarilloId)},anchor:"bottom"};this.mapService.addMarker(i),this.markers.add(r.lazarilloId),this.logger.log("Marker added for place",r.lazarilloId)}addInitialMarkers(){this.loadedDataService.getAvailablePlaces().pipe(Ls(1),os(this.onDestroy)).subscribe({next:r=>{for(let i of r)this.addMarker(i)},error:r=>{this.logger.logWarning("Error adding initial markers",r)}})}addMarkers(r){this.mapService.mapReady.pipe(_i(i=>i),Ls(1),os(this.onDestroy)).subscribe({next:()=>{this.removeAllMarkers();for(let i of r)this.addMarker(i)},error:i=>{this.logger.logWarning("Error adding markers",i)}})}removeAllMarkers(){for(let r of this.markers)this.mapService.removeMarker(r);this.markers.clear()}hasMarker(r){return this.markers.has(r)}selectMarker(r){if(!this.markers.has(r)){this.logger.logWarning("Marker not found",r);return}let i=this.document.getElementById(`${r}-marker`);if(!i){this.logger.logWarning("Marker not found",r);return}i.classList.add("selected")}deselectMarker(r){if(!this.markers.has(r)){this.logger.logWarning("Marker not found",r);return}let i=this.document.getElementById(`${r}-marker`);if(!i){this.logger.logWarning("Marker not found",r);return}i.classList.remove("selected")}deselectMarkers(){let r=this.document.querySelectorAll(".marker.selected");for(let i of r)i.classList.remove("selected")}addOriginMarker(r){let i={element:this.createOriginMarkerElement(),id:"origin",coordinate:r,anchor:"bottom"};this.mapService.addMarker(i),this.markers.add("origin")}addDestinationMarker(r){let i={element:this.createElement(r.lazarilloId,this.getIconFromPlace(r),["route-marker","destination-marker"]),id:r.lazarilloId,coordinate:r.position,anchor:"bottom"};this.mapService.addMarker(i),this.markers.add(r.lazarilloId)}addRouteMarker(r){let i={element:this.createElement(r.lazarilloId,this.getIconFromPlace(r),["route-marker"]),id:r.lazarilloId,coordinate:r.position,anchor:"bottom"};this.mapService.addMarker(i),this.markers.add(r.lazarilloId)}addRouteMarkers(r){for(let i of r)this.addRouteMarker(i)}createCurrentLocationMarkerElement(){let r=this.document.createElement("div");return r.className="current-location-marker",r.id="current-location-marker",r.innerHTML=bP,r}addCurrentLocationMarker(r){let i={element:this.createCurrentLocationMarkerElement(),id:"current-location",coordinate:r,anchor:"bottom"};this.mapService.addMarker(i),this._hasCurrentLocationMarker=!0}updateCurrentLocationMarker(r){this.mapService.updateMarkerPosition("current-location",r)}getCurrentLocationMarkerElement(){return this.document.getElementById("current-location-marker")}get hasCurrentLocationMarker(){return this._hasCurrentLocationMarker}removeCurrentLocationMarker(){this.mapService.removeMarker("current-location"),this._hasCurrentLocationMarker=!1}prepareToMapReuse(){this.removeAllMarkers()}static \u0275fac=function(i){return new(i||n)};static \u0275prov=Vt({token:n,factory:n.\u0275fac})};var Hd=class n{sdkService=Re(na);logger=Re(jn);markerService=Re(Zo);currentlyWatchingLocation=ln(!1);currentLocation=new Hr(null);currentBearing=new Hr(null);hasBearingPermission=!1;watchId;async checkLocationPermission(){return"permissions"in navigator?navigator.permissions.query({name:"geolocation"}).then(async r=>r.state).catch(r=>(this.logger.logWarning(r),"denied")):(this.logger.log("Permissions API not supported"),"denied")}async requestLocationPermission(){return new Promise(r=>{navigator.geolocation.getCurrentPosition(()=>{console.log("requestLocationPermission granted"),r("granted")},i=>{console.log("requestLocationPermission denied",i),i.code===3?r("prompt"):r("denied")},{enableHighAccuracy:!0,timeout:5e3})})}async getCurrentLocation(){return this.currentlyWatchingLocation()&&this.currentLocation.value!=null?this.currentLocation.value:new Promise((r,i)=>{navigator.geolocation.getCurrentPosition(l=>{r(u_(l))},l=>{i(new Error("Error getting current location",{cause:l}))},{enableHighAccuracy:!0})})}checkBearingLocation(){typeof DeviceOrientationEvent<"u"&&"requestPermission"in DeviceOrientationEvent&&DeviceOrientationEvent.requestPermission().then(i=>{this.hasBearingPermission=i==="granted"}).catch(i=>{this.logger.logWarning(i),this.hasBearingPermission=!1}),this.hasBearingPermission=!0}startWatching(){this.checkBearingLocation(),console.log("startWatching"),console.log("hasBearingPermission",this.hasBearingPermission),this.currentlyWatchingLocation.set(!0),!this.watchId&&(this.watchId=this.sdkService.watchUserLocation(r=>{this.currentLocation.next(r)},r=>{this.logger.logWarning("Error watching user location",r)}),this.hasBearingPermission&&this.sdkService.watchUserHeading(r=>{this.currentBearing.next(r)},r=>{this.logger.logWarning("Error watching user bearing",r)}))}stopWatching(){this.watchId&&this.sdkService.stopWatchingUserLocation(this.watchId),this.hasBearingPermission&&this.sdkService.stopWatchingUserHeading(),this.watchId=void 0,this.markerService.removeCurrentLocationMarker(),this.currentlyWatchingLocation.set(!1)}temporalStopWatching(){this.watchId&&this.sdkService.stopWatchingUserLocation(this.watchId),this.hasBearingPermission&&this.sdkService.stopWatchingUserHeading(),this.watchId=void 0}static \u0275fac=function(i){return new(i||n)};static \u0275prov=Vt({token:n,factory:n.\u0275fac})};var n1=(d=>(d[d.NotStarted=0]="NotStarted",d[d.Playing=1]="Playing",d[d.Paused=2]="Paused",d[d.Finished=3]="Finished",d))(n1||{});var _c=class n{logger=Re(jn);mapService=Re(xi);sdkService=Re(na);platformId=Re(Il);document=Re(wi);animationStatusSubject=new Hr(0);activeRouteSubject=new Hr(null);currentStepSubject=new Hr(null);getRoute(r,i){return this.sdkService.getRoute(r,i)}getSecondaryOrangeColor(){if(!pc(this.platformId))return"#EE5845";try{return getComputedStyle(this.document.documentElement).getPropertyValue("--definitions-colors-secondary-orange").trim()}catch(r){return this.logger.logWarning("Error getting --definitions-colors-secondary-orange:",r),"#EE5845"}}startAnimatingRoute(r){let i=this.getSecondaryOrangeColor(),l={behindPathStyle:{type:"Solid",color:i},aheadPathStyle:{type:"Solid",color:"#000000"},routeIcon:this.getRouteIcon(i)},d={callBack:({isFinished:a,step:E})=>{a?(this.animationStatusSubject.next(3),this.currentStepSubject.next(null)):(this.animationStatusSubject.next(1),this.currentStepSubject.next(E))}};this.animationStatusSubject.next(1),this.activeRouteSubject.next(r),this.mapService.startAnimatingRoute(r,l,d)}getRouteIcon(r){let i=this.document.createElement("div");return i.className="route-icon",i.id="route-icon",i.innerHTML=`<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
1510
1510
  <circle cx="15" cy="15" r="15" fill="${r}"/>
1511
1511
  <path d="M10.0788 19.6042L14.5476 8.6442C14.7061 8.25536 15.0835 8 15.5013 8C15.9191 8 16.2965 8.25536 16.455 8.6442L20.9238 19.6042C21.1946 20.2717 20.7106 21 19.9932 21C19.7684 21 19.5523 20.9246 19.3766 20.7882L15.5013 17.75L11.6232 20.7882C11.4474 20.9246 11.2313 21 11.0066 21C10.292 21 9.80512 20.2687 10.076 19.6042H10.0788Z" fill="white"/>
1512
- </svg>`,i}pauseRouteAnimation(){this.animationStatusSubject.next(2),this.mapService.pauseAnimatingRoute()}resumeRouteAnimation(){this.animationStatusSubject.next(1),this.mapService.resumeAnimatingRoute()}restartRouteAnimation(){this.animationStatusSubject.next(1),this.mapService.restartAnimatingRoute()}removeRoute(){this.animationStatusSubject.next(0),this.activeRouteSubject.next(null),this.currentStepSubject.next(null),this.mapService.removeRoute()}static \u0275fac=function(i){return new(i||n)};static \u0275prov=Vt({token:n,factory:n.\u0275fac})};var r1={term:"",results:[]};function i1(n,r){let i=r?.injector??Re(Ho),l=new Ba(1),d=Gn(()=>{let a;try{a=n()}catch(E){qo(()=>l.error(E));return}qo(()=>l.next(a))},{injector:i,manualCleanup:!0});return i.get(ea).onDestroy(()=>{d.destroy(),l.complete()}),l.asObservable()}function vo(n,r){let l=!r?.manualCleanup?r?.injector?.get(ea)??Re(ea):null,d=TG(r?.equal),a;r?.requireSync?a=ln({kind:0},{equal:d}):a=ln({kind:1,value:r?.initialValue},{equal:d});let E,L=n.subscribe({next:N=>a.set({kind:1,value:N}),error:N=>{a.set({kind:2,error:N}),E?.()},complete:()=>{E?.()}});if(r?.requireSync&&a().kind===0)throw new Zt(601,!1);return E=l?.onDestroy(L.unsubscribe.bind(L)),Qt(()=>{let N=a();switch(N.kind){case 1:return N.value;case 2:throw N.error;case 0:throw new Zt(601,!1)}},{equal:r?.equal})}function TG(n=Object.is){return(r,i)=>r.kind===1&&i.kind===1&&n(r.value,i.value)}var gi=class n{loadedDataService=Re(ci);homePlaces=ln([]);showCategoryFilters=ln(!0);showCityFilter=ln(!0);defaultToMap=ln(!1);activeView=ls(()=>this.defaultToMap()?"map":"grid");inputValue=ln("");selectedInstitution=ln("");hideDeals=ln(!1);cardWidth=ln(void 0);rowsPerPage=ln(2);initialInstitutionId=ln("");showDealLabels=ln(!1);lastListedPlaces=ln([]);categoryFiltersData=vo(this.loadedDataService.getInstitution().pipe(En(r=>{let i=r.properties;if(i){let l=i.filter(d=>"childPlaces"in d&&d.childPlaces!==void 0).map(d=>({placeData:"childPlaces"in d?d.childPlaces:[],name:d.title}));return l.splice(1,0,{name:"All",placeData:[]}),l}return[]})),{initialValue:[]});selectedFilter=ls({source:this.categoryFiltersData,computation:(r,i)=>{let l=r.map(a=>a.name),d=i?.value;return d&&l.includes(d)?d:r[0]?.name??""}});selectedCity=ls(()=>{let r=this.selectedInstitution(),i=this.loadedDataService.cityFilterOptions();return i.find(d=>d.institutionId===r)||i.length>0?i[0]:void 0});filterId=Qt(()=>{let r=this.selectedCity();return r?r.filterId:this.initialInstitutionId()});currentPageIndex=ls({source:this.selectedFilter,computation:(r,i)=>r!==i?.source?1:i?.value??1});lastCardSelected=new _r;userAction=new _r;lastSearchData=ln(r1);static \u0275fac=function(i){return new(i||n)};static \u0275prov=Vt({token:n,factory:n.\u0275fac})};var RR={fas:{},fak:{}},_S=[];function OR(n){Object.keys(n).forEach(function(r){if(r!=="prefix"){var i=n[r],l=i.icon[2];l.forEach(function(d){typeof d=="string"&&(RR[i.prefix][d]=i)}),RR[i.prefix][i.iconName]=i,_S.push(i)}})}OR(dC);OR(vS);var Py=TI(aC());var o1=class n{destroy$=new _r;apiKey=dr("");institutionId=dr("");initialData=dr("");showCategoryFilters=dr(!0,{transform:r=>typeof r=="string"?r==="true":r});showCityFilter=dr(!0,{transform:r=>typeof r=="string"?r==="true":r});defaultToMap=dr(!1,{transform:r=>typeof r=="string"?r==="true":r});inheritFontFamily=dr(!1,{transform:r=>typeof r=="string"?r==="true":r});hideDeals=dr(!1,{transform:this.transformToBoolean});showDealLabels=dr(!1,{transform:this.transformToBoolean});cardWidth=dr(void 0,{transform:r=>{if(!(r==null||r==="")){if(typeof r=="string"){let i=Number.parseInt(r,10);return Number.isNaN(i)||i<=0?void 0:i}return typeof r=="number"&&r<=0?void 0:r}}});rowsPerPage=dr(2,{transform:r=>{if(typeof r=="string"){let i=Number.parseInt(r,10);return Number.isNaN(i)||i<=0?2:Math.min(Math.max(i,1),10)}return r<=0?2:Math.min(Math.max(r,1),10)}});cardSelected=_s();userAction=_s();router=Re(Gd);navigatorService=Re(Po);locationStrategy=Re(fc);platformId=Re(Il);logger=Re(jn);sdkService=Re(na);loadedDataService=Re(ci);homeStateService=Re(gi);iconLibrary=Re(uy);isInitialized=!1;isConnected=!1;static instanceCount=0;static hasBeenConnected=!1;constructor(){this.loadIcons(),Gn(()=>{let r=this.apiKey();r&&r.trim()!==""&&!this.sdkService.isInitialized()&&(this.logger.log("\u{1F511} Initializing SDK with provided API key"),this.sdkService.initialize(r.trim()),this.loadData())}),Gn(()=>{this.homeStateService.initialInstitutionId.set(this.institutionId())}),Gn(()=>{let r=this.showDealLabels();this.homeStateService.showDealLabels.set(r)}),Gn(()=>{this.homeStateService.hideDeals.set(this.hideDeals())}),Gn(()=>{this.homeStateService.cardWidth.set(this.cardWidth())}),Gn(()=>{this.homeStateService.rowsPerPage.set(this.rowsPerPage())}),Gn(()=>{let r=this.initialData();r&&r.trim()!==""&&this.processInitialData(r)}),Gn(()=>{this.homeStateService.showCategoryFilters.set(this.showCategoryFilters())}),Gn(()=>{this.homeStateService.showCityFilter.set(this.showCityFilter())}),Gn(()=>{let r=this.defaultToMap();this.logger.log("====> defaultToMap input",r),this.homeStateService.defaultToMap.set(r)}),Gn(()=>{let r=this.institutionId();r&&r.trim()!==""&&this.updateInstitution(r)}),this.homeStateService.lastCardSelected.pipe(os(this.destroy$)).subscribe(r=>{this.cardSelected.emit(r),this.logger.log("====> cardSelected",r)}),this.homeStateService.userAction.pipe(os(this.destroy$)).subscribe(r=>{this.userAction.emit(r),this.logger.log("====> userAction",r)})}ngOnInit(){pc(this.platformId)?this.handleInstanceTracking():this.logger.log("\u{1F5A5}\uFE0F Componente inicializado en servidor (SSR)")}loadIcons(){this.iconLibrary.addIcons(..._S)}loadData(){this.loadPlaces(),this.loadConfiguration(),this.loadInstitution()}async loadCityFilterOptions(r){this.loadedDataService.cityFilterOptions.set(r);let i=r[0];i&&this.homeStateService.selectedInstitution.set(i.institutionId);let l=r.filter(d=>d.type==="parent-place");Promise.all(l.map(async d=>{let a=async()=>{let L=await this.sdkService.getPlaceDetail(d.parentPlaceId);this.loadedDataService.updatePotentialParentPlaces(L)},E=async()=>{let L=await this.sdkService.getSubPlaces(d.parentPlaceId);this.loadedDataService.updateAvailablePlaces(L)};await Promise.all([a(),E()])}))}transformToBoolean(r){return typeof r=="string"?r==="true":r}processInitialData(r){try{let i=JSON.parse(r);if(i.availablePlaces){let d=i.availablePlaces.map(a=>new Py.LzPlace(a)).filter(a=>a.generalCategory!=="transport"&&!a.hidePlace);this.loadedDataService.updateAvailablePlaces(d),this.logger.log(`\u2705 Successfully loaded ${d.length} places from initial data`)}if(i.institutions){let d=i.institutions.map(a=>new Py.Institution(a)).find(a=>a.lazarilloId===this.institutionId());d?this.loadedDataService.setInstitution(d):this.logger.log(`\u274C Institution not found for id ${this.institutionId()}`)}}catch(i){this.logger.log("\u274C Error processing initial data",i),this.logger.log(`\u274C Data: ${r}`)}}async loadPlaces(){let r=pc(this.platformId)?"Browser":"Server";try{this.logger.log(`\u{1F4CD} Loading initial places data on ${r}...`);let i=await this.sdkService.getAvailablePlaces(),l=i.filter(d=>d.generalCategory!=="transport"&&!d.hidePlace);this.loadedDataService.updateAvailablePlaces(l),this.logger.log(`\u2705 Successfully loaded ${i.length} places on ${r}`)}catch(i){this.logger.log(`\u274C Error loading initial places data on ${r}:`,i)}}async loadConfiguration(){try{let r=await this.sdkService.getConfiguration();this.loadedDataService.setConfiguration(r);let i=r.cityOptions||[];this.loadCityFilterOptions(i),this.logger.log("\u2705 Successfully loaded configuration",r)}catch(r){this.logger.log("\u274C Error loading initial configuration",r)}}async loadInstitution(){try{let r=await this.sdkService.getInstitutions(),i=r.find(l=>l.lazarilloId===this.institutionId());this.loadedDataService.setInstitutions(r),i?(this.loadedDataService.setInstitution(i),this.logger.log("\u2705 Successfully loaded institution",i)):this.logger.log("\u274C Institution not found")}catch(r){this.logger.log("\u274C Error loading institution data",r)}}updateInstitution(r){let i=this.initialData();if(i&&i.trim()!==""){let l=JSON.parse(i);if(l.institutions){let d=l.institutions.map(E=>{try{return new Py.Institution(E)}catch(L){this.logger.logWarning("\u274C Error parsing institution",L);return}}).filter(E=>E!==void 0),a=d.find(E=>E.lazarilloId===r);if(this.loadedDataService.setInstitutions(d),a){this.loadedDataService.setInstitution(a),this.logger.log("\u2705 Successfully updated institution",a);return}}}this.loadInstitution()}handleInstanceTracking(){n.instanceCount++;let r=this.checkForExistingRouterContent(),i=this.router.url;n.hasBeenConnected||r||i!=="/"&&n.instanceCount===1?(this.logger.log("\u{1F504} Detectada reconexi\xF3n del web component"),this.logger.log(` - Instancia #${n.instanceCount}`),this.logger.log(` - URL del router: ${i}`),this.logger.log(` - Contenido en router outlet: ${r}`),this.handleReconnection()):this.logger.log(`\u{1F680} Primera conexi\xF3n del web component (instancia #${n.instanceCount})`),n.hasBeenConnected=!0}checkForExistingRouterContent(){try{let r=document.querySelector("router-outlet");return r?r.children.length>0:!1}catch{return!1}}ngAfterViewInit(){this.isConnected=!0,this.scheduleRouterInitialization()}ngOnDestroy(){this.isConnected=!1,this.destroy$.next(),this.destroy$.complete()}scheduleRouterInitialization(){pc(this.platformId)?requestAnimationFrame(()=>{this.initializeRouter()}):setTimeout(()=>{this.initializeRouter()},0)}initializeRouter(){if(this.isInitialized&&this.isConnected)return;this.locationStrategy.setInitialPath("/");let r=this.router.url,i=this.router.routerState.root.firstChild;r==="/"&&!i?this.router.navigateByUrl("/").then(()=>{this.isInitialized=!0}).catch(l=>{console.error("Error en navegaci\xF3n inicial:",l),this.isInitialized=!0}):this.isInitialized=!0}handleReconnection(){this.logger.log("\u{1F504} Procesando reconexi\xF3n del web component");let r=pc(this.platformId)?10:50;setTimeout(()=>{this.checkAndFixRouterSync()},r)}checkAndFixRouterSync(){if(!pc(this.platformId)){this.logger.log("\u2139\uFE0F Saltando verificaci\xF3n de sincronizaci\xF3n en servidor");return}let r=this.locationStrategy.getCurrentPath()||"/",i=this.router.url,l=this.router.routerState.root.firstChild,d=this.checkForExistingRouterContent();this.logger.log("\u{1F50D} Verificando sincronizaci\xF3n del router:"),this.logger.log(` - Path interno: "${r}"`),this.logger.log(` - Router URL: "${i}"`),this.logger.log(` - Tiene ruta activa: ${!!l}`),this.logger.log(` - Contenido en router outlet: ${d}`),r==="/"&&i!=="/"||r==="/"&&!l&&d||r==="/"&&i==="/"&&d&&!l?(this.logger.log("\u26A0\uFE0F Desincronizaci\xF3n detectada - aplicando correcci\xF3n"),this.performGentleReset()):this.logger.log("\u2705 Router sincronizado correctamente")}performGentleReset(){this.logger.log("\u{1F504} Realizando reset suave del router"),this.router.navigateByUrl("/",{replaceUrl:!0}).then(()=>{this.logger.log("\u2705 Navegaci\xF3n correctiva completada")}).catch(r=>{console.error("\u274C Error en navegaci\xF3n correctiva:",r)})}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-root"]],inputs:{apiKey:[1,"apiKey"],institutionId:[1,"institutionId"],initialData:[1,"initialData"],showCategoryFilters:[1,"showCategoryFilters"],showCityFilter:[1,"showCityFilter"],defaultToMap:[1,"defaultToMap"],inheritFontFamily:[1,"inheritFontFamily"],hideDeals:[1,"hideDeals"],showDealLabels:[1,"showDealLabels"],cardWidth:[1,"cardWidth"],rowsPerPage:[1,"rowsPerPage"]},outputs:{cardSelected:"cardSelected",userAction:"userAction"},features:[Q0([Po,gi,Zo,Yn,_c,Hd])],decls:4,vars:2,consts:[[1,"named-container"],[1,"app-container"],[1,"app-content"]],template:function(i,l){i&1&&(it(0,"div",0)(1,"div",1)(2,"div",2),Mt(3,"router-outlet"),lt()()()),i&2&&(at(),li("inherit-font-family",l.inheritFontFamily()))},dependencies:[T_,gf],styles:["*[_ngcontent-%COMP%]{margin:0;padding:0}.named-container[_ngcontent-%COMP%]{container-name:mapvx-container;container-type:inline-size;width:100%}.app-container[_ngcontent-%COMP%]{display:flex;padding:0;flex-direction:column;justify-content:center;align-items:flex-start;gap:22px;background:var(--definitions-colors-background-50);font-family:Open Sans,sans-serif}.app-container.inherit-font-family[_ngcontent-%COMP%]{font-family:inherit}.app-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:19px}.app-header[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{color:var(--definitions-colors-text-900);font:var(--definitions-textFonts-desktop-h1);font-family:inherit}.app-header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--definitions-colors-text-800);font:var(--definitions-textFonts-desktop-sub-1);font-family:inherit}.main-navigation[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:center;flex-wrap:wrap}.nav-button[_ngcontent-%COMP%]{background:#fff3;border:1px solid rgba(255,255,255,.3);color:#fff;padding:.5rem 1rem;border-radius:4px;cursor:pointer;font-size:.9rem;transition:all .2s ease}.nav-button[_ngcontent-%COMP%]:hover{background:#ffffff4d;transform:translateY(-1px)}.nav-button[_ngcontent-%COMP%]:active{transform:translateY(0)}.route-debug[_ngcontent-%COMP%]{margin-top:.5rem;text-align:center}.route-debug[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{color:#fffc;font-size:.8rem;font-family:Courier New,monospace;background:#0000001a;padding:.25rem .5rem;border-radius:4px}.app-content[_ngcontent-%COMP%]{width:100%}"]})};var s1=class n extends fc{_path="";_baseHref;_popStateListeners=[];constructor(){super(),this._baseHref=this.getBaseHref()}path(){return this._path}prepareExternalUrl(r){return this._baseHref+"#"+r}pushState(r,i,l,d){this._updatePath(r,l,d)}replaceState(r,i,l,d){this._updatePath(r,l,d)}forward(){}back(){}getState(){return null}historyGo(r){}onPopState(r){this._popStateListeners.push(r)}getBaseHref(){return typeof document<"u"?document.querySelector("base")?.href??"/":"/"}_updatePath(r,i,l){this._path=i+(l?"?"+l:""),this._notifyPopState(r,i)}_notifyPopState(r,i){let l={type:"popstate",state:r,url:i,pop:!0};this._popStateListeners.forEach(d=>{try{d(l)}catch(a){console.error("Error in popstate listener:",a)}})}getCurrentPath(){return this._path}setInitialPath(r){this._path=r}static \u0275fac=function(i){return new(i||n)};static \u0275prov=Vt({token:n,factory:n.\u0275fac,providedIn:"root"})};var MG=["categoryFilters"];function PG(n,r){if(n&1){let i=Vr();it(0,"button",14),an("click",function(){br(i);let d=Yt();return wr(d.onClearInput())}),Mt(1,"fa-icon",6),lt()}if(n&2){let i=Yt();at(),Ft("icon",i.faXmark)}}function AG(n,r){if(n&1&&Mt(0,"fa-icon",6),n&2){let i=Yt(2);Ft("icon",i.faCaretUp)}}function kG(n,r){if(n&1&&Mt(0,"fa-icon",6),n&2){let i=Yt(2);Ft("icon",i.faCaretDown)}}function RG(n,r){if(n&1){let i=Vr();it(0,"button",21),an("click",function(){let d=br(i).$implicit,a=Yt(3);return wr(a.onCitySelect(d))}),on(1),lt()}if(n&2){let i=r.$implicit;at(),eo(" ",i.name," ")}}function OG(n,r){if(n&1&&(it(0,"div",19),Ji(1,RG,2,1,"button",20,af),lt()),n&2){let i=Yt(2);at(),Qi(i.citiesOptions())}}function LG(n,r){if(n&1){let i=Vr();it(0,"div",9)(1,"button",15),an("click",function(){br(i);let d=Yt();return wr(d.onCityFilterClick())}),Mt(2,"fa-icon",6),lt(),it(3,"button",16),an("click",function(){br(i);let d=Yt();return wr(d.onCityFilterClick())}),it(4,"span",17),on(5),lt(),it(6,"div",18),Fn(7,AG,1,1,"fa-icon",6)(8,kG,1,1,"fa-icon",6),lt()(),Fn(9,OG,3,0,"div",19),lt()}if(n&2){let i,l=Yt();at(),li("active",l.isCityDropdownOpen()),at(),Ft("icon",l.faFilter),at(3),Mo((i=l.selectedCity())==null?null:i.name),at(2),Nn(l.isCityDropdownOpen()?7:8),at(2),Nn(l.isCityDropdownOpen()?9:-1)}}var a1=class n{logger=Re(jn);stateService=Re(gi);mapService=Re(xi);navigatorService=Re(Po);loadedDataService=Re(ci);iconLibrary=Re(Yn);categoryFilters;activeView=Qt(()=>this.stateService.activeView());showCityFilter=Qt(()=>this.stateService.showCityFilter()&&this.citiesOptions().length>0);inputValue=Qt(()=>this.stateService.inputValue());citiesOptions=Qt(()=>this.loadedDataService.cityFilterOptions());selectedCity=Qt(()=>this.stateService.selectedCity());isCityDropdownOpen=ln(!1);mapReady=vo(this.mapService.mapReady,{initialValue:!1});faGrid2=this.iconLibrary.getIconDefinition("fas","grid-2");faMagnifyingGlass=this.iconLibrary.getIconDefinition("fas","magnifying-glass");faMapLocationDot=this.iconLibrary.getIconDefinition("fas","map-location-dot");faXmark=this.iconLibrary.getIconDefinition("fas","xmark");faCaretDown=this.iconLibrary.getIconDefinition("fas","caret-down");faCaretUp=this.iconLibrary.getIconDefinition("fas","caret-up");faFilter=this.iconLibrary.getIconDefinition("fas","filter");constructor(){Gn(()=>{if(this.stateService.activeView()==="map"&&this.mapReady()){let r=this.stateService.lastListedPlaces(),i=r.map(d=>d.inFloors?.[0]),l=this.getMostFrequentValue(i);l!==void 0&&this.mapService.updateFloor(l),setTimeout(()=>{this.mapService.fitCoordinates(r.map(d=>d.position),{padding:{top:100,left:100,right:100,bottom:100}})},100)}})}ngOnInit(){this.stateService.inputValue()!==""&&this.navigatorService.navigateToSearchView()}ngAfterViewInit(){this.readUrlParams()}readUrlParams(){let r=new URLSearchParams(location.search),i=r.get("search");if(i){this.stateService.inputValue.set(i),setTimeout(()=>{this.navigatorService.navigateToSearchView()},100);return}let l=r.get("tenant");if(l){this.navigatorService.navigateToProfile(l);return}let d=r.get("destination");d&&this.navigatorService.navigateToRoute(d)}onGridClick(){this.stateService.activeView.set("grid")}onMapClick(){this.stateService.activeView.set("map")}onInputChange(r){let i=r.target;this.stateService.inputValue.set(i.value),this.navigatorService.navigateToSearchView()}onClearInput(){this.stateService.inputValue.set(""),this.stateService.userAction.next({type:"return-to-home",data:{filter:this.stateService.selectedFilter()}}),this.navigatorService.navigateToHome()}onCityFilterClick(){this.isCityDropdownOpen.update(r=>!r)}onCitySelect(r){if(this.stateService.selectedInstitution.set(r.institutionId),this.stateService.selectedCity.set(r),this.isCityDropdownOpen.set(!1),this.loadedDataService.updateInstitution(r.institutionId),r.type==="institution")this.mapService.removeParentPlace(),this.loadedDataService.parentPlace.set(void 0);else{let l=this.loadedDataService.potentialParentPlaces().find(d=>d.lazarilloId===r.parentPlaceId);l?(this.mapService.setParentPlace(l),this.loadedDataService.parentPlace.set(l)):this.mapService.removeParentPlace()}}getMostFrequentValue(r){if(r.length===0)return;let i=new Map,l=0,d;for(let a of r){if(a==null)continue;let E=(i.get(a)||0)+1;i.set(a,E),E>l&&(l=E,d=a)}return d}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-home-screen"]],viewQuery:function(i,l){if(i&1&&Bg(MG,5),i&2){let d;jg(d=Vg())&&(l.categoryFilters=d.first)}},decls:23,vars:12,consts:[[1,"home-screen"],[1,"sub-navigation"],[1,"sub-nav-top"],[1,"search-section"],[1,"search-bar"],[1,"search-icon"],[3,"icon"],["name","search input","type","text","placeholder","Search...",1,"search-input",3,"input","value"],[1,"search-clear"],[1,"city-filter-container"],[1,"view-toggle"],[1,"view-btn",3,"click"],[1,"view-icon"],[1,"sub-content"],[1,"search-clear",3,"click"],[1,"mobile-city-filter",3,"click"],[1,"desktop-city-filter",3,"click"],[1,"city-text"],[1,"dropdown-icon"],[1,"city-dropdown"],[1,"city-option"],[1,"city-option",3,"click"]],template:function(i,l){i&1&&(it(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5),Mt(6,"fa-icon",6),lt(),it(7,"input",7),an("input",function(a){return l.onInputChange(a)}),lt(),Fn(8,PG,2,1,"button",8),lt(),Fn(9,LG,10,6,"div",9),lt(),it(10,"div",10)(11,"button",11),an("click",function(){return l.onGridClick()}),it(12,"div",12),Mt(13,"fa-icon",6),lt(),it(14,"span"),on(15,"Grid View"),lt()(),it(16,"button",11),an("click",function(){return l.onMapClick()}),it(17,"div",12),Mt(18,"fa-icon",6),lt(),it(19,"span"),on(20,"Map View"),lt()()()()(),it(21,"div",13),Mt(22,"router-outlet"),lt()()),i&2&&(at(4),li("active",l.inputValue()!==""),at(2),Ft("icon",l.faMagnifyingGlass),at(),Ft("value",l.inputValue()),at(),Nn(l.inputValue()!==""?8:-1),at(),Nn(l.showCityFilter()?9:-1),at(2),li("active",l.activeView()==="grid"),at(2),Ft("icon",l.faGrid2),at(3),li("active",l.activeView()==="map"),at(2),Ft("icon",l.faMapLocationDot))},dependencies:[Dr,gf],styles:["*[_ngcontent-%COMP%]{margin:0;padding:0;border:0}.home-screen[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:36px}.sub-navigation[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2.25rem;margin-bottom:1.5rem}.sub-nav-top[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:40px}@container mapvx-container (width <= 640px){.sub-nav-top[_ngcontent-%COMP%]{gap:13px}}.search-section[_ngcontent-%COMP%]{display:flex;gap:24px;align-items:center}@container mapvx-container (width <= 640px){.search-section[_ngcontent-%COMP%]{gap:11px}}.search-bar[_ngcontent-%COMP%]{background:var(--definitions-colors-background-white);border-bottom:1px solid var(--definitions-colors-primary-black);display:flex;width:342px;padding:12px 20px;align-items:center;gap:10px}@container mapvx-container (width <= 960px){.search-bar[_ngcontent-%COMP%]{width:150px}}@container mapvx-container (width <= 640px){.search-bar[_ngcontent-%COMP%]{width:110px}}.search-bar.active[_ngcontent-%COMP%]{border-bottom:1px solid var(--definitions-colors-secondary-orange)}.search-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-text-800);display:flex;align-items:center;font-size:20px}.search-bar.active[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-secondary-orange)}.search-clear[_ngcontent-%COMP%]{color:var(--definitions-colors-secondary-orange);display:flex;align-items:center;font-size:20px;border:none;background:none}.search-clear[_ngcontent-%COMP%]:hover{cursor:pointer}.search-input[_ngcontent-%COMP%]{border:none;outline:none;background:transparent;font:var(--definitions-textFonts-desktop-button-4);font-family:inherit;color:var(--definitions-colors-text-800);width:100%}.search-input[_ngcontent-%COMP%]::placeholder{color:var(--definitions-colors-text-800)}.city-filter-container[_ngcontent-%COMP%]{position:relative}.desktop-city-filter[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.875rem 1rem;height:45px;box-sizing:border-box;cursor:pointer;border:none;background:none}@container mapvx-container (width <= 640px){.desktop-city-filter[_ngcontent-%COMP%]{display:none}}.city-text[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-button-5);font-family:inherit;color:var(--definitions-colors-text-900);white-space:nowrap}.dropdown-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-text-900);display:flex;align-items:center;font-size:12px}.mobile-city-filter[_ngcontent-%COMP%]{display:none}@container mapvx-container (width <= 640px){.mobile-city-filter[_ngcontent-%COMP%]{display:flex;height:45px;width:52px;padding:0;justify-content:center;align-items:center;gap:10px;cursor:pointer;border:none;background:var(--definitions-colors-background-white);color:var(--definitions-colors-primary-black);font-size:20px}.mobile-city-filter.active[_ngcontent-%COMP%]{background:var(--definitions-colors-primary-black);color:var(--definitions-colors-black_white-50)}}.city-dropdown[_ngcontent-%COMP%]{position:absolute;top:100%;left:0;right:0;background:var(--definitions-colors-background-white);border:1px solid var(--definitions-colors-primary-300);z-index:1;padding:8px 0;min-width:111px}.city-option[_ngcontent-%COMP%]{display:block;width:100%;padding:12px 16px;border:none;background:none;text-align:center;cursor:pointer;font:var(--definitions-textFonts-desktop-input-2);font-family:inherit;color:var(--definitions-colors-text-900);transition:background-color .2s ease}.city-option[_ngcontent-%COMP%]:not(:last-child){border-bottom:1px solid var(--definitions-colors-primary-100)}.city-option[_ngcontent-%COMP%]:hover{background:var(--definitions-colors-background-50)}.view-toggle[_ngcontent-%COMP%]{display:flex;align-items:center}.view-btn[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.625rem;padding:10px 28px;border:none;background:var(--definitions-colors-background-50);cursor:pointer;font:var(--definitions-textFonts-desktop-button-2);font-family:inherit;color:var(--definitions-colors-text-900);white-space:nowrap;transition:all .2s ease;position:relative;border-bottom:1px solid var(--definitions-colors-text-900)}.view-btn.active[_ngcontent-%COMP%]{background:var(--definitions-colors-text-900);color:var(--definitions-colors-text-50)}.view-btn[_ngcontent-%COMP%] .view-icon[_ngcontent-%COMP%]{display:flex;align-items:center;color:currentcolor}@container mapvx-container (width <= 770px){.view-btn[_ngcontent-%COMP%]{padding:10px 0;width:52px;justify-content:center}.view-btn[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:none}}@container mapvx-container (width <= 640px){.view-btn[_ngcontent-%COMP%]{padding:10px 0;width:52px;justify-content:center}.view-btn[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:none}}"],changeDetection:0})};var l1="https://images.ctfassets.net/37yx0l0lf3yk/6eJ4fYG9hQxJ8ayujcebhe/8cf968e7d66df9a8bc75b72b7e7d6432/00002167_BedrockWebsite_TenantCOmingSoon_PlaceholderImage_3840x3840_V2-web.jpg?q=80&fm=webp&w=1920";function c1(n){return n.tags?.includes("deals")||n.tags?.includes("events")}var FG=()=>({rotate:42});function NG(n,r){if(n&1&&Mt(0,"fa-icon",3),n&2){let i=Yt();Ft("icon",i.faCircleNotch)("transform",Cu(2,FG))}}function zG(n,r){n&1&&(it(0,"div",4),on(1,"Deals + Events"),lt())}var u1=class n{iconLibrary=Re(Yn);navigatorService=Re(Po);homeStateService=Re(gi);place=dr.required();hasDealsOrEvents=Qt(()=>this.place().banners.some(c1));hideDeals=Qt(()=>this.homeStateService.hideDeals());showDealLabels=Qt(()=>this.homeStateService.showDealLabels());imageSrc=Qt(()=>this.place().images[0]||l1);isImageLoading=ln(!0);faCircleNotch=this.iconLibrary.getIconDefinition("fas","circle-notch");constructor(){Gn(()=>{this.imageSrc()&&this.startImageLoading()})}navigateToProfile(){let r=this.place().lazarilloId;this.homeStateService.lastCardSelected.next(r),this.navigatorService.navigateToProfile(r)}startImageLoading(){this.isImageLoading.set(!0)}endImageLoading(){this.isImageLoading.set(!1)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-location-card"]],inputs:{place:[1,"place"]},decls:12,vars:8,consts:[[1,"location-card",3,"click"],[1,"card-image"],[3,"load","error","src","alt"],[1,"loading-icon",3,"icon","transform"],[1,"card-deals-or-events"],[1,"card-content"],[1,"location-name"],[1,"location-address"],[1,"location-category"]],template:function(i,l){i&1&&(it(0,"button",0),an("click",function(){return l.navigateToProfile()}),it(1,"div",1)(2,"img",2),an("load",function(){return l.endImageLoading()})("error",function(){return l.endImageLoading()}),lt(),Fn(3,NG,1,3,"fa-icon",3)(4,zG,2,0,"div",4),lt(),it(5,"div",5)(6,"h3",6),on(7),lt(),it(8,"p",7),on(9),lt(),it(10,"span",8),on(11),lt()()()),i&2&&(at(),li("loading",l.isImageLoading()),at(),Ft("src",l.imageSrc(),rf)("alt",l.place().title),at(),Nn(l.isImageLoading()?3:l.hasDealsOrEvents()&&!l.hideDeals()&&l.showDealLabels()?4:-1),at(4),Mo(l.place().title),at(2),Mo(l.place().address),at(2),Mo(l.place().localizedCategory))},dependencies:[Dr],styles:["*[_ngcontent-%COMP%]{margin:0;padding:0}.location-card[_ngcontent-%COMP%]{display:flex;padding:5px 5px 10px;flex-direction:column;align-items:flex-start;gap:12px;background:var(--definitions-colors-background-50);border:none;width:100%}.location-card[_ngcontent-%COMP%]:hover{cursor:pointer}.card-image[_ngcontent-%COMP%]{width:100%;overflow:hidden;position:relative;aspect-ratio:1/1}@container mapvx-container (width <= 640px){.card-image[_ngcontent-%COMP%]{min-width:160px;min-height:160px}}.card-image[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover;display:block;transition:transform .4s ease}.card-image[_ngcontent-%COMP%] img[_ngcontent-%COMP%]:hover{transform:scale(1.2)}.card-image[_ngcontent-%COMP%] .card-deals-or-events[_ngcontent-%COMP%]{position:absolute;bottom:0;left:0;width:100%;background-color:var(--definitions-colors-secondary-orange);color:var(--definitions-colors-text-white);display:flex;padding:5px;justify-content:center;align-items:center;gap:8.462px;flex-shrink:0;font:var(--definitions-textFonts-desktop-body-4);font-family:inherit}.card-image.loading[_ngcontent-%COMP%]{background-color:var(--definitions-colors-primary-300);display:flex;justify-content:center;align-items:center}.card-image.loading[_ngcontent-%COMP%] .loading-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-primary-600);font-size:100px}.card-image.loading[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{display:none}.card-content[_ngcontent-%COMP%]{display:flex;width:100%;flex-direction:column;align-items:flex-start;gap:8px}@container mapvx-container (width <= 640px){.card-content[_ngcontent-%COMP%]{min-width:160px}}.location-name[_ngcontent-%COMP%]{color:var(--definitions-colors-text-black);font:var(--definitions-textFonts-desktop-body-3);font-family:inherit;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;text-align:start}.location-address[_ngcontent-%COMP%]{color:var(--definitions-colors-text-grey);font:var(--definitions-textFonts-desktop-body-5);font-family:inherit;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;text-align:start}.location-category[_ngcontent-%COMP%]{color:var(--definitions-colors-text-light-grey);font:var(--definitions-textFonts-desktop-body-5);font-family:inherit;display:none}"],changeDetection:0})};var BG=["cardContainer"],jG=["*"];function VG(n,r){if(n&1&&Mt(0,"app-location-card",3),n&2){let i=r.$implicit;Ft("place",i)}}function UG(n,r){n&1&&xu(0)}function $G(n,r){if(n&1){let i=Vr();it(0,"button",7),an("click",function(){br(i);let d=Yt(3);return wr(d.previousPage())}),Mt(1,"fa-icon",8),lt()}if(n&2){let i=Yt(3);at(),Ft("icon",i.faChevronLeft)}}function GG(n,r){if(n&1&&Fn(0,$G,2,1,"button",6),n&2){let i=Yt().$implicit,l=Yt();Nn(i<l.currentPageIndex()?0:-1)}}function HG(n,r){n&1&&(it(0,"button",9),on(1,"..."),lt())}function qG(n,r){if(n&1){let i=Vr();it(0,"button",11),an("click",function(){br(i);let d=Yt(3);return wr(d.nextPage())}),Mt(1,"fa-icon",8),lt()}if(n&2){let i=Yt(3);at(),Ft("icon",i.faChevronRight)}}function WG(n,r){if(n&1&&(Fn(0,HG,2,0,"button",9),Fn(1,qG,2,1,"button",10)),n&2){let i=Yt().$implicit,l=Yt();Nn(i<l.totalPages()?0:-1),at(),Nn(i>l.currentPageIndex()?1:-1)}}function ZG(n,r){if(n&1){let i=Vr();Fn(0,GG,1,1),it(1,"button",5),an("click",function(){let d=br(i).$implicit,a=Yt();return wr(a.goToPage(d))}),on(2),lt(),Fn(3,WG,2,2)}if(n&2){let i=r.$implicit,l=r.$index,d=r.$count,a=Yt();Nn(l===0?0:-1),at(),li("active",a.currentPageIndex()===i),at(),eo(" ",i," "),at(),Nn(l===d-1?3:-1)}}var fm=class n{logger=Re(jn);stateService=Re(gi);iconLibrary=Re(Yn);cardContainer=r_("cardContainer");faChevronLeft=this.iconLibrary.getIconDefinition("fas","chevron-left");faChevronRight=this.iconLibrary.getIconDefinition("fas","chevron-right");places=dr.required();itemsPerPage=Qt(()=>this.calculateItemsPerPage(this.showMap(),this.cardContainer(),this.stateService.cardWidth(),this.stateService.rowsPerPage()));currentPageIndex=Qt(()=>this.stateService.currentPageIndex());totalPages=Qt(()=>Math.ceil(this.places().length/this.itemsPerPage()));cardContainerStyles=Qt(()=>{let r=this.stateService.cardWidth();return r?{"--card-width":`${r}`}:{}});pages=Qt(()=>{let r=this.totalPages();switch(r){case 0:return[];case 1:return[1];case 2:return[1,2];default:{let l=this.currentPageIndex()-1;return l<1&&(l=1),l+2>r&&(l=r-2),Array.from({length:3},(d,a)=>a+l)}}});currentPagePlaces=Qt(()=>{let r=this.places(),i=this.itemsPerPage(),l=this.currentPageIndex();return r.slice((l-1)*i,l*i)});showMap=Qt(()=>this.stateService.activeView()==="map");calculateItemsPerPage(r,i,l,d=2){try{if(i){let a=globalThis.getComputedStyle(i.nativeElement),E=l??Number.parseInt(a.getPropertyValue("--card-width")||"0"),L=Number.parseInt(a.getPropertyValue("--card-gap")||"0"),N=E+L;if(N<=0)return d*5;let Z=i.nativeElement.clientWidth,X=Math.floor((Z+L)/N)*d;return Number.isFinite(X)&&X>0?X:d*5}return d*5}catch(a){return this.logger.logError("Error calculating items per page",a),d*5}}nextPage(){let r=this.currentPageIndex(),i=this.totalPages();r<i&&this.stateService.currentPageIndex.set(r+1)}previousPage(){let r=this.currentPageIndex();r>1&&this.stateService.currentPageIndex.set(r-1)}goToPage(r){this.stateService.currentPageIndex.set(r)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-paginator"]],viewQuery:function(i,l){i&1&&Ug(l.cardContainer,BG,5),i&2&&$g()},inputs:{places:[1,"places"]},ngContentSelectors:jG,decls:9,vars:6,consts:[["cardContainer",""],[1,"paginator"],[1,"paginator-places",3,"ngStyle"],[3,"place"],[1,"paginator-buttons"],[1,"paginator-button",3,"click"],[1,"previous-button"],[1,"previous-button",3,"click"],[3,"icon"],[1,"paginator-button","ellipsis"],[1,"next-button"],[1,"next-button",3,"click"]],template:function(i,l){i&1&&(wu(),it(0,"div",1)(1,"div",2,0),Ji(3,VG,1,1,"app-location-card",3,ta,!1,UG,1,0),lt(),it(6,"div",4),Ji(7,ZG,4,5,null,null,af),lt()()),i&2&&(li("with-map",l.showMap()),at(),li("with-map",l.showMap()),Ft("ngStyle",l.cardContainerStyles()),at(2),Qi(l.currentPagePlaces()),at(4),Qi(l.pages()))},dependencies:[zd,Gx,u1,Dr],styles:['.paginator[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:36px}.paginator.with-map[_ngcontent-%COMP%]{min-height:730px}@container mapvx-container (width <= 1024px){.paginator.with-map[_ngcontent-%COMP%]{min-height:unset}}.paginator-places[_ngcontent-%COMP%]{--card-width: 237;--card-gap: 13;display:grid;grid-template-columns:repeat(auto-fill,minmax(calc(var(--card-width) * 1px),1fr));align-items:flex-start;place-content:flex-start space-around;gap:24px 13px;align-self:stretch}@container mapvx-container (width <= 640px){.paginator-places[_ngcontent-%COMP%]{--card-width: 170}}.paginator-places.with-map[_ngcontent-%COMP%]{gap:16px 8px;flex-shrink:0}@container mapvx-container (width <= 640px){.paginator-places.with-map[_ngcontent-%COMP%]{display:flex;overflow-x:auto}}.paginator-buttons[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;gap:8px;flex-wrap:wrap}.paginator-button[_ngcontent-%COMP%]{color:var(--definitions-colors-text-900);text-align:center;font:var(--definitions-textFonts-desktop-button-1);font-family:inherit;font-feature-settings:"liga" off,"clig" off;letter-spacing:-1px;border:none;background:none}.paginator-button[_ngcontent-%COMP%]:hover{cursor:pointer}.paginator-button.active[_ngcontent-%COMP%]{color:var(--definitions-colors-secondary-orange)}.paginator-button.ellipsis[_ngcontent-%COMP%]:hover{cursor:default}.previous-button[_ngcontent-%COMP%], .next-button[_ngcontent-%COMP%]{color:var(--definitions-colors-text-900);background:none;border:none;font-size:21px}.previous-button[_ngcontent-%COMP%]:hover, .next-button[_ngcontent-%COMP%]:hover{cursor:pointer}'],changeDetection:0})};var d1=class n{onDestroy=new _r;iconLibrary=Re(Yn);mapService=Re(xi);logger=Re(jn);loadedDataService=Re(ci);faCenter=this.iconLibrary.getIconDefinition("fak","center");ngOnDestroy(){this.onDestroy.next(),this.onDestroy.complete()}onClick(){let r=this.mapService.rotation.getValue();this.loadedDataService.getConfiguration().pipe(Ls(1),os(this.onDestroy)).subscribe({next:i=>{this.mapService.updateCamera({center:i.initialCenter,zoom:i.initialZoom,pitch:i.initialPitch??0,bearing:r})},error:i=>{this.logger.logWarning("Error centering map",i)}})}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-center-map-button"]],decls:2,vars:1,consts:[[1,"button",3,"click"],[3,"icon"]],template:function(i,l){i&1&&(it(0,"button",0),an("click",function(){return l.onClick()}),Mt(1,"fa-icon",1),lt()),i&2&&(at(),Ft("icon",l.faCenter))},dependencies:[Dr],styles:[".button[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:40px;border:1px solid var(--definitions-colors-primary-900);background-color:var(--definitions-colors-background-white);box-shadow:var(--definitions-shadows-general)}.button[_ngcontent-%COMP%]:hover{cursor:pointer}.button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:20px;color:var(--definitions-colors-text-black)}"],changeDetection:0})};var YG=n=>({rotate:n}),h1=class n{mapService=Re(xi);iconLibrary=Re(Yn);rotation=vo(this.mapService.rotation.asObservable().pipe(En(r=>360-r)),{initialValue:0});faCompass=this.iconLibrary.getIconDefinition("fak","compass");static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-compass-button"]],decls:2,vars:4,consts:[[1,"button"],[3,"icon","transform"]],template:function(i,l){i&1&&(it(0,"button",0),Mt(1,"fa-icon",1),lt()),i&2&&(at(),Ft("icon",l.faCompass)("transform",Dx(2,YG,l.rotation())))},dependencies:[Dr],styles:[".button[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:40px;border:1px solid var(--definitions-colors-primary-900);background-color:var(--definitions-colors-background-white);box-shadow:var(--definitions-shadows-general)}.button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:20px;color:var(--definitions-colors-text-black)}"],changeDetection:0})};var f1=class n{iconLibrary=Re(Yn);locationService=Re(Hd);logger=Re(jn);markerService=Re(Zo);mapService=Re(xi);locationPermission=ln("prompt");active=Qt(()=>this.locationService.currentlyWatchingLocation());mapReady=vo(this.mapService.mapReady.asObservable(),{initialValue:!1});positionSubscription;bearingSubscription;faLocation=this.iconLibrary.getIconDefinition("fas","location-arrow");constructor(){this.checkLocationPermission(),Gn(()=>{this.mapReady()?this.active()?(this.positionSubscription=this.locationService.currentLocation.asObservable().subscribe({next:r=>{this.logger.log("location",r),r!=null&&(this.markerService.hasCurrentLocationMarker?this.markerService.updateCurrentLocationMarker(r.position):this.markerService.addCurrentLocationMarker(r.position))},error:r=>{this.logger.logWarning("Error updating current location marker position",r)}}),this.bearingSubscription=Xs([this.locationService.currentBearing.asObservable(),this.mapService.rotation.asObservable()]).subscribe({next:([r,i])=>{this.logger.log("bearing",r),this.logger.log("maprotation",i);let d=(r??0)-i;if(this.logger.log("markerRotation",d),this.markerService.hasCurrentLocationMarker){let a=this.markerService.getCurrentLocationMarkerElement();a!=null&&(a.style.transform=`rotate(${d}deg)`)}},error:r=>{this.logger.logWarning("Error updating current location marker rotation",r)}})):(this.positionSubscription?.unsubscribe(),this.bearingSubscription?.unsubscribe(),this.markerService.removeCurrentLocationMarker(),this.positionSubscription=void 0,this.bearingSubscription=void 0):(this.positionSubscription?.unsubscribe(),this.bearingSubscription?.unsubscribe(),this.positionSubscription=void 0,this.bearingSubscription=void 0)})}ngOnDestroy(){this.locationService.temporalStopWatching(),this.positionSubscription?.unsubscribe(),this.bearingSubscription?.unsubscribe(),this.markerService.removeCurrentLocationMarker()}checkLocationPermission(){this.locationService.checkLocationPermission().then(r=>{this.locationPermission.set(r),r==="granted"&&this.active()&&this.locationService.startWatching()}).catch(r=>{this.logger.logWarning("Error checking location permission",r),this.locationPermission.set("denied")})}async onClick(){if(this.active())this.locationService.stopWatching();else switch(this.locationPermission()){case"granted":this.locationService.startWatching();break;case"prompt":await this.requestPermissions();break;case"denied":this.logger.logWarning("Location permission denied");break}}async requestPermissions(){await this.locationService.requestLocationPermission()==="granted"?(this.locationPermission.set("granted"),this.locationService.startWatching()):this.locationPermission.set("denied")}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-location-button"]],decls:2,vars:3,consts:[[1,"button",3,"click"],[3,"icon"]],template:function(i,l){i&1&&(it(0,"button",0),an("click",function(){return l.onClick()}),Mt(1,"fa-icon",1),lt()),i&2&&(li("active",l.active()),at(),Ft("icon",l.faLocation))},dependencies:[Dr],styles:[".button[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:40px;border:1px solid var(--definitions-colors-primary-900);background-color:var(--definitions-colors-background-white);color:var(--definitions-colors-text-black);box-shadow:var(--definitions-shadows-general)}.button[_ngcontent-%COMP%]:hover{cursor:pointer}.button.active[_ngcontent-%COMP%]{background-color:var(--definitions-colors-secondary-blue);color:var(--definitions-colors-text-white);border-color:var(--definitions-colors-secondary-blue)}.button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:18px}"],changeDetection:0})};var p1=class n{mapService=Re(xi);iconLibrary=Re(Yn);faPlus=this.iconLibrary.getIconDefinition("fas","plus");faMinus=this.iconLibrary.getIconDefinition("fas","minus");onZoomIn(){this.mapService.updateZoomLevelOn(1)}onZoomOut(){this.mapService.updateZoomLevelOn(-1)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-zoom-buttons"]],decls:5,vars:2,consts:[[1,"zoom-buttons-container"],[1,"zoom-button","zoom-in",3,"click"],[3,"icon"],[1,"zoom-button","zoom-out",3,"click"]],template:function(i,l){i&1&&(it(0,"div",0)(1,"button",1),an("click",function(){return l.onZoomIn()}),Mt(2,"fa-icon",2),lt(),it(3,"button",3),an("click",function(){return l.onZoomOut()}),Mt(4,"fa-icon",2),lt()()),i&2&&(at(2),Ft("icon",l.faPlus),at(2),Ft("icon",l.faMinus))},dependencies:[Dr],styles:[".zoom-buttons-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;border-radius:40px;border:1px solid var(--definitions-colors-primary-900);background-color:var(--definitions-colors-background-white);box-shadow:var(--definitions-shadows-general)}.zoom-button[_ngcontent-%COMP%]{width:40px;height:40px;border:none;background-color:transparent}.zoom-button[_ngcontent-%COMP%]:hover{cursor:pointer}.zoom-button.zoom-in[_ngcontent-%COMP%]{border-radius:40px 40px 0 0}.zoom-button.zoom-out[_ngcontent-%COMP%]{border-radius:0 0 40px 40px}.zoom-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:20px;color:var(--definitions-colors-text-black)}"],changeDetection:0})};var m1=class n{static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-buttons-container"]],decls:5,vars:0,consts:[[1,"buttons-container-wrapper"]],template:function(i,l){i&1&&(it(0,"div",0),Mt(1,"app-location-button")(2,"app-compass-button")(3,"app-center-map-button")(4,"app-zoom-buttons"),lt())},dependencies:[h1,d1,p1,f1],styles:[".buttons-container-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:20px}"],changeDetection:0})};function KG(n,r){if(n&1){let i=Vr();it(0,"button",4),an("click",function(){let d=br(i).$implicit,a=Yt(3);return wr(a.selectFloor(d))}),on(1),lt()}if(n&2){let i=r.$implicit;at(),eo(" ",i.name," ")}}function XG(n,r){if(n&1&&(it(0,"div",2),Ji(1,KG,2,1,"button",3,ta),lt()),n&2){let i=Yt(2);at(),Qi(i.floors())}}function JG(n,r){if(n&1){let i=Vr();it(0,"button",0),an("click",function(){br(i);let d=Yt();return wr(d.toggleFloorSelector())}),it(1,"span"),on(2),lt(),Mt(3,"fa-icon",1),lt(),Fn(4,XG,3,0,"div",2)}if(n&2){let i=Yt();at(2),Mo(i.selectedFloor().name),at(),Ft("icon",i.showFloorOptions()?i.caretUp:i.caretDown),at(),Nn(i.showFloorOptions()?4:-1)}}var g1=class n{loadedDataService=Re(ci);mapService=Re(xi);iconLibrary=Re(Yn);parentPlace=Qt(()=>this.loadedDataService.parentPlace());floors=Qt(()=>this.parentPlace()?.innerFloors??[]);currentFloorId=Qt(()=>this.mapService.currentFloorId());selectedFloor=Qt(()=>this.floors().find(r=>r.key===this.currentFloorId())??this.floors()[0]);showFloorOptions=ln(!1);caretDown=this.iconLibrary.getIconDefinition("fas","caret-down");caretUp=this.iconLibrary.getIconDefinition("fas","caret-up");toggleFloorSelector(){this.showFloorOptions.update(r=>!r)}selectFloor(r){this.showFloorOptions.set(!1),this.mapService.updateFloor(r.key)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-floor-selector"]],decls:1,vars:1,consts:[[1,"floor-selector-button",3,"click"],[3,"icon"],[1,"floor-options"],[1,"floor-option"],[1,"floor-option",3,"click"]],template:function(i,l){i&1&&Fn(0,JG,5,3),i&2&&Nn(l.floors().length>0?0:-1)},dependencies:[Dr],styles:[".floor-selector-button[_ngcontent-%COMP%]{padding:10px;border:0;border-radius:16px;background-color:var(--definitions-colors-background-white);box-shadow:var(--definitions-shadows-general)}.floor-options[_ngcontent-%COMP%]{position:absolute;top:100%;left:0;right:0;background-color:var(--definitions-colors-background-white);border-radius:16px;box-shadow:var(--definitions-shadows-general);display:flex;flex-direction:column}.floor-option[_ngcontent-%COMP%]{padding:10px;border:0;background-color:transparent}.floor-option[_ngcontent-%COMP%]:not(:last-child){border-bottom:1px solid var(--definitions-colors-gray-200)}"]})};var QG=["map"],eH=["*"];function tH(n,r){n&1&&Mt(0,"app-floor-selector",3)}var qd=class n{mapRef;logger=Re(jn);mapService=Re(xi);markerService=Re(Zo);routingService=Re(_c);loadedDataService=Re(ci);showFloorSelector=Qt(()=>this.loadedDataService.parentPlace()!==void 0);ngAfterViewInit(){this.mapService.createMap(this.mapRef.nativeElement)}ngOnDestroy(){this.logger.log("Destroying map and preparing to reuse"),this.markerService.prepareToMapReuse(),this.routingService.removeRoute(),this.mapService.prepareToReuse()}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-map"]],viewQuery:function(i,l){if(i&1&&Bg(QG,5),i&2){let d;jg(d=Vg())&&(l.mapRef=d.first)}},ngContentSelectors:eH,decls:6,vars:1,consts:[["map",""],[1,"map-wrapper"],["id","map"],[1,"floor-selector"],[1,"buttons-container"]],template:function(i,l){i&1&&(wu(),it(0,"div",1),Mt(1,"div",2,0),Fn(3,tH,1,0,"app-floor-selector",3),Mt(4,"app-buttons-container",4),xu(5),lt()),i&2&&(at(3),Nn(l.showFloorSelector()?3:-1))},dependencies:[m1,g1],styles:[".map-wrapper[_ngcontent-%COMP%]{height:100%;width:100%;position:relative}#map[_ngcontent-%COMP%]{height:100%;min-width:10px;min-height:10px}.buttons-container[_ngcontent-%COMP%]{position:absolute;bottom:18px;right:17px}.floor-selector[_ngcontent-%COMP%]{position:absolute;top:18px;right:17px}"],changeDetection:0})};var nH=["*"];function rH(n,r){n&1&&(it(0,"div",2),Mt(1,"app-map"),lt())}var pm=class n{stateService=Re(gi);showMap=Qt(()=>this.stateService.activeView()==="map");static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-view-container"]],ngContentSelectors:nH,decls:4,vars:3,consts:[[1,"view-container"],[1,"view-content"],[1,"map-container"]],template:function(i,l){i&1&&(wu(),it(0,"div",0)(1,"div",1),xu(2),lt(),Fn(3,rH,2,0,"div",2),lt()),i&2&&(at(),li("with-map",l.showMap()),at(2),Nn(l.showMap()?3:-1))},dependencies:[qd],styles:[".view-container[_ngcontent-%COMP%]{display:flex;align-items:stretch;gap:8px}@container mapvx-container (width <= 1024px){.view-container[_ngcontent-%COMP%]{flex-direction:column-reverse;align-items:flex-start}}@container mapvx-container (width <= 640px){.view-container[_ngcontent-%COMP%]{flex-direction:column-reverse;align-items:flex-start}}.view-content[_ngcontent-%COMP%]{width:100%}.view-content.with-map[_ngcontent-%COMP%]{width:50%;min-width:482px;flex-shrink:0}@container mapvx-container (width <= 1024px){.view-content.with-map[_ngcontent-%COMP%]{width:100%;min-width:unset}}.map-container[_ngcontent-%COMP%]{width:100%;min-height:730px}@container mapvx-container (width <= 1024px){.map-container[_ngcontent-%COMP%]{width:100%;height:730px}}@container mapvx-container (width <= 640px){.map-container[_ngcontent-%COMP%]{width:100%;height:400px;min-height:unset}}"],changeDetection:0})};var iH=["categoryFilters"],oH=(n,r)=>r.name;function sH(n,r){if(n&1){let i=Vr();it(0,"button",11),an("click",function(){let d=br(i).$implicit,a=Yt(2);return wr(a.updateSelectedFilter(d.name))}),on(1),lt()}if(n&2){let i=r.$implicit,l=Yt(2);li("active",l.selectedFilter()===i.name),at(),eo(" ",i.name," ")}}function aH(n,r){if(n&1&&(it(0,"div",2)(1,"div",5,0)(3,"div",6),Ji(4,sH,2,3,"button",7,oH),lt(),it(6,"div",8),Mt(7,"div",9)(8,"div",10),lt()()()),n&2){let i=Yt();at(4),Qi(i.categoryFiltersData()),at(4),X0("left",i.indicatorPosition(),"px")}}var y1=class n{logger=Re(jn);stateService=Re(gi);loadedDataService=Re(ci);markerService=Re(Zo);categoryFilters=r_("categoryFilters");activeView=Qt(()=>this.stateService.activeView());loadedPlaces=vo(this.loadedDataService.getAvailablePlaces(),{initialValue:[]});categoryFiltersData=Qt(()=>this.stateService.categoryFiltersData());places=ls(()=>this.loadedPlaces());selectedFilter=Qt(()=>this.stateService.selectedFilter());selectedInstitution=Qt(()=>this.stateService.selectedInstitution());selectedCity=Qt(()=>this.stateService.selectedCity());showCategoryFilters=Qt(()=>this.stateService.showCategoryFilters());showCityFilter=Qt(()=>this.stateService.showCityFilter());indicatorPosition=ln(0);constructor(){Gn(()=>{let r=this.categoryFiltersData();if(this.logger.log("====> loadedCategoryFiltersData",r),r.length>0){let i=r.map(l=>l.name);this.readFilterFromUrl(i)}}),Gn(()=>{if(this.activeView()==="map"){let r=this.places();this.logger.log("====> addMarkers ",r),this.markerService.addMarkers(r)}}),Gn(()=>{let r=this.loadedPlaces(),i=this.showCategoryFilters(),l=r;if(this.showCityFilter()){let E=this.selectedCity()?.filterId??"";E!==""&&(l=l.filter(L=>L.parentInstitutionId===E))}if(i){let a=this.selectedFilter(),E=this.categoryFiltersData();if(a!=="All"){let L=E.find(N=>N.name===a)?.placeData||[];l=r.filter(N=>L.includes(N.lazarilloId))}}l.sort((a,E)=>a.title.trim().localeCompare(E.title.trim())),this.logger.log("====> filteredPlaces",l),this.places.set(l)}),Gn(()=>{let r=this.places();this.stateService.lastListedPlaces.set(r)}),Gn(()=>{let r=this.selectedFilter(),i=this.categoryFiltersData(),l=this.categoryFilters();this.showCategoryFilters()&&l?requestAnimationFrame(()=>{let a=this.getIndicatorPosition(r,i,l);this.indicatorPosition.set(a)}):this.indicatorPosition.set(0)})}readFilterFromUrl(r){let l=new URLSearchParams(location.search).get("tab");l&&r.includes(l)&&this.stateService.selectedFilter.set(l)}getIndicatorPosition(r,i,l){if(l==null)return 0;let d=l.nativeElement.querySelectorAll(".category-btn");if(d.length===0)return 0;let a=i.findIndex(Q=>Q.name===r);if(a===-1||a>=d.length)return 0;let E=d[a];if(!E)return 0;let L=l.nativeElement.getBoundingClientRect(),N=E.getBoundingClientRect(),Z=N.width,ee=N.left-L.left,X=80,re=ee+Z/2-X/2;return Math.min(Math.max(0,re),L.width-X)}updateSelectedFilter(r){this.stateService.selectedFilter.set(r),this.stateService.userAction.next({type:"select-filter",data:{filter:r}})}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-list-view"]],viewQuery:function(i,l){i&1&&Ug(l.categoryFilters,iH,5),i&2&&$g()},decls:5,vars:2,consts:[["categoryFilters",""],[1,"list-view"],[1,"category-filters-overflow"],[1,"list-container"],[3,"places"],[1,"category-filters-container"],[1,"category-filters"],[1,"category-btn",3,"active"],[1,"active-indicator"],[1,"background-line"],[1,"active-line"],[1,"category-btn",3,"click"]],template:function(i,l){i&1&&(it(0,"div",1),Fn(1,aH,9,2,"div",2),it(2,"app-view-container")(3,"div",3),Mt(4,"app-paginator",4),lt()()()),i&2&&(at(),Nn(l.showCategoryFilters()?1:-1),at(3),Ft("places",l.places()))},dependencies:[pm,fm],styles:[".list-view[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:36px}.category-filters-overflow[_ngcontent-%COMP%]{width:100%;overflow-x:auto}.category-filters-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:16px;width:100%;min-width:max-content}.category-filters[_ngcontent-%COMP%]{display:flex;gap:2.4375rem;align-items:center}.category-btn[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;font:var(--definitions-textFonts-desktop-button-5);font-family:inherit;font-weight:400;color:var(--definitions-colors-text-900);white-space:nowrap;padding:0;transition:color .2s ease}.category-btn.active[_ngcontent-%COMP%], .category-btn[_ngcontent-%COMP%]:hover{color:var(--definitions-colors-secondary-orange)}.active-indicator[_ngcontent-%COMP%]{position:relative;width:100%;height:3px;display:flex;align-items:center}.background-line[_ngcontent-%COMP%]{height:.5px;background:var(--definitions-colors-primary-black);border-radius:2px;width:100%}.active-line[_ngcontent-%COMP%]{position:absolute;top:0;height:100%;width:80px;background:var(--definitions-colors-secondary-orange);border-radius:2px;transition:left .3s ease}.list-container[_ngcontent-%COMP%]{width:100%}"],changeDetection:0})};var lH=()=>({rotate:42}),v1=class n{iconLibrary=Re(Yn);faCircleNotch=this.iconLibrary.getIconDefinition("fas","circle-notch");static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-loading-location-card"]],decls:7,vars:3,consts:[[1,"loading-location-card"],[1,"loading-card-image"],[3,"icon","transform"],[1,"loading-card-content"],[1,"loading-location-name"],[1,"loading-location-address"],[1,"loading-location-category"]],template:function(i,l){i&1&&(it(0,"div",0)(1,"div",1),Mt(2,"fa-icon",2),lt(),it(3,"div",3),Mt(4,"div",4)(5,"div",5)(6,"div",6),lt()()),i&2&&(at(2),Ft("icon",l.faCircleNotch)("transform",Cu(2,lH)))},dependencies:[Dr],styles:[".loading-location-card[_ngcontent-%COMP%]{display:flex;padding:5px 5px 10px;flex-direction:column;align-items:flex-start;gap:12px}.loading-card-image[_ngcontent-%COMP%]{display:flex;width:227px;height:227px;justify-content:center;align-items:center;background-color:var(--definitions-colors-primary-300)}@container mapvx-container (width <= 640px){.loading-card-image[_ngcontent-%COMP%]{width:160px;height:160px}}.loading-card-image[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-primary-600);font-size:95px}.loading-card-content[_ngcontent-%COMP%]{display:flex;width:227px;flex-direction:column;align-items:flex-start;gap:8px}@container mapvx-container (width <= 640px){.loading-card-content[_ngcontent-%COMP%]{width:160px}}.loading-location-name[_ngcontent-%COMP%]{display:flex;width:85%;height:24px;padding:7.253px 0;flex-direction:column;justify-content:center;align-items:center;border-radius:28.09px;background:var(--definitions-colors-primary-300)}.loading-location-address[_ngcontent-%COMP%]{display:flex;width:70%;height:11px;align-items:center;gap:18px;flex-shrink:0;align-self:stretch;border-radius:28.09px;background:var(--definitions-colors-primary-200)}.loading-location-category[_ngcontent-%COMP%]{display:flex;width:45%;height:11px;justify-content:space-between;align-items:center;border-radius:24px;background:var(--definitions-colors-primary-200)}"]})};var cH=()=>[1,2,3,4,5,6,7,8,9,10];function uH(n,r){n&1&&Mt(0,"app-loading-location-card")}var _1=class n{homeStateService=Re(gi);showMap=Qt(()=>this.homeStateService.activeView()==="map");static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-loading-card-list"]],decls:3,vars:3,consts:[[1,"loading-container"]],template:function(i,l){i&1&&(it(0,"div",0),Ji(1,uH,1,0,"app-loading-location-card",null,af),lt()),i&2&&(li("with-map",l.showMap()),at(),Qi(Cu(2,cH)))},dependencies:[v1],styles:[".loading-container[_ngcontent-%COMP%]{display:flex;place-content:flex-start;align-items:flex-start;gap:24px 13px;align-self:stretch;flex-wrap:wrap}.loading-container.with-map[_ngcontent-%COMP%]{gap:16px 8px;height:730px}"]})};function dH(n,r){n&1&&(it(0,"p"),on(1,"Looking for your results..."),lt())}function hH(n,r){if(n&1&&(it(0,"p"),on(1),lt()),n&2){let i=Yt(3);at(),eo('Showing 1 result for "',i.searchTerm(),'"')}}function fH(n,r){if(n&1&&(it(0,"p"),on(1),lt()),n&2){let i=Yt(3);at(),J0("Showing ",i.places().length,' results for "',i.searchTerm(),'"')}}function pH(n,r){if(n&1&&Fn(0,hH,2,1,"p")(1,fH,2,2,"p"),n&2){let i=Yt(2);Nn(i.places().length===1?0:1)}}function mH(n,r){if(n&1&&(it(0,"p"),on(1),lt()),n&2){let i=Yt(2);at(),eo('No results found for "',i.searchTerm(),'"')}}function gH(n,r){if(n&1&&Fn(0,pH,2,1)(1,mH,2,1,"p"),n&2){let i=Yt();Nn(i.places().length>0?0:1)}}function yH(n,r){n&1&&Mt(0,"app-loading-card-list")}function vH(n,r){if(n&1&&(it(0,"div",6)(1,"app-paginator",7)(2,"div",8),Mt(3,"fa-icon",4),it(4,"h2"),on(5,"No results found"),lt(),it(6,"div",9)(7,"p"),on(8,"Sorry, we can\u2019t find any places that match your search. Please try again."),lt()()()()()),n&2){let i=Yt();at(),Ft("places",i.places()),at(2),Ft("icon",i.faBuildingMagnifyingGlass)}}var b1=class n{logger=Re(jn);loadedDataService=Re(ci);sdkService=Re(na);stateService=Re(gi);navigatorService=Re(Po);markerService=Re(Zo);iconLibrary=Re(Yn);searching=ls(()=>this.stateService.lastSearchData().term==="");inputValue$=i1(this.stateService.inputValue).pipe(Yb(500),En(r=>r.trim()),_i(r=>r!==""),Kb());searchTerm=vo(this.inputValue$,{initialValue:this.stateService.lastSearchData().term});places=vo(Xs([i1(this.stateService.filterId),this.inputValue$,i1(this.stateService.lastSearchData)]).pipe(Yi(([r,i,l])=>l.term===i?(this.logger.log("====> lastSearchData",l),this.searching.set(!1),Sn(l.results)):(this.searching.set(!0),this.logger.log("====> searchTerm",i),this.logger.log("====> institutionId",r),ai(this.sdkService.searchPlaces(i,r)))),Ki(()=>this.searching.set(!1))),{initialValue:this.stateService.lastSearchData().results});faArrowLeft=this.iconLibrary.getIconDefinition("fas","arrow-left");faBuildingMagnifyingGlass=this.iconLibrary.getIconDefinition("fas","building-magnifying-glass");constructor(){Gn(()=>{let r=this.places();this.markerService.addMarkers(r)}),Gn(()=>{let r=this.places();this.stateService.lastListedPlaces.set(r)}),Gn(()=>{let r=this.searching();this.logger.log("====> searching",r)}),Gn(()=>{let r=this.searchTerm();r&&this.stateService.userAction.next({type:"search",data:{searchTerm:r}})})}ngOnDestroy(){this.stateService.inputValue()===""?(this.logger.log("====> EMPTY_SEARCH_DATA"),this.stateService.lastSearchData.set(r1)):(this.logger.log("====> SETTING LAST SEARCH DATA"),this.stateService.lastSearchData.set({term:this.stateService.inputValue(),results:this.places()}))}onBackClick(){this.stateService.inputValue.set(""),this.stateService.userAction.next({type:"return-to-home",data:{filter:this.stateService.selectedFilter()}}),this.navigatorService.navigateToHome()}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-search-view"]],decls:13,vars:3,consts:[[1,"search-view"],[1,"search-view-header"],[1,"back-button"],[1,"back-btn",3,"click"],[3,"icon"],[1,"search-view-info"],[1,"results-container"],[3,"places"],[1,"no-results"],[1,"no-results-description"]],template:function(i,l){i&1&&(it(0,"div",0)(1,"div",1)(2,"div",2)(3,"button",3),an("click",function(){return l.onBackClick()}),Mt(4,"fa-icon",4),it(5,"span"),on(6,"Back"),lt()()(),it(7,"div",5),Fn(8,dH,2,0,"p")(9,gH,2,1),lt()(),it(10,"app-view-container"),Fn(11,yH,1,0,"app-loading-card-list")(12,vH,9,2,"div",6),lt()()),i&2&&(at(4),Ft("icon",l.faArrowLeft),at(4),Nn(l.searching()?8:9),at(3),Nn(l.searching()?11:12))},dependencies:[pm,fm,T_,Dr,_1],styles:['*[_ngcontent-%COMP%]{margin:0;padding:0}.search-view[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:36px}.search-view-header[_ngcontent-%COMP%]{display:flex;width:100%;flex-direction:column;justify-content:center;align-items:flex-start;gap:23px}.search-view-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--definitions-colors-text-800);font:var(--definitions-textFonts-desktop-sub-2);font-family:inherit;letter-spacing:-.9px}.results-container[_ngcontent-%COMP%]{width:100%}.back-button[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;align-items:center;gap:16px}.back-btn[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;gap:12px;color:var(--definitions-colors-secondary-blue);border:none;background:none}.back-btn[_ngcontent-%COMP%]:hover{cursor:pointer}.back-btn[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:24px}.back-btn[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--definitions-colors-secondary-blue);font:var(--definitions-textFonts-desktop-button-1);font-family:inherit;font-feature-settings:"liga" off,"clig" off;letter-spacing:-1px}.no-results[_ngcontent-%COMP%]{display:flex;width:100%;height:100%;flex-direction:column;justify-content:center;align-items:center;gap:31px}.no-results[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:160px;color:var(--definitions-colors-text-light-grey)}.no-results[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{color:var(--definitions-colors-text-grey);font:var(--definitions-textFonts-desktop-h2);font-family:inherit}.no-results[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--definitions-colors-text-grey);font:var(--definitions-textFonts-desktop-sub-1);font-family:inherit;text-align:center}'],changeDetection:0})};function w1(n){switch(n){case"su":return"Sunday";case"mo":return"Monday";case"tu":return"Tuesday";case"we":return"Wednesday";case"th":return"Thursday";case"fr":return"Friday";case"sa":return"Saturday"}}function C1(n){switch(n.getDay()){case 0:return"su";case 1:return"mo";case 2:return"tu";case 3:return"we";case 4:return"th";case 5:return"fr";case 6:return"sa";default:return"mo"}}function _H(n){switch(n){case 0:return"su";case 1:return"mo";case 2:return"tu";case 3:return"we";case 4:return"th";case 5:return"fr";case 6:return"sa";default:return"mo"}}function x1(n){let[r,i]=n.split(":"),l=parseInt(r)%24,d=parseInt(i),a;return l<12?(a="AM",l===0&&(l=12)):(a="PM",l!==12&&(l-=12)),`${l}:${d<10?"0":""}${d}&nbsp;${a}`}function NR(n){let r=x1(n.open),i=x1(n.close);return`${r}&nbsp;-&nbsp;${i}`}function bH(n){let r=x1(n.open),i=x1(n.close);return`${r}&nbsp;to&nbsp;${i}`}function wH(n){let r=new Date,i=new Date(r);zR(i);let l=C1(i),d=n[l];if(d&&d.length>0){for(let a of d)if(LR(a.open)&&LR(a.close)){let E=FR(a.open,i),L=FR(a.close,i);if(E>L&&xH(L),r>=E&&r<=L)return!0}}return!1}function zR(n){let r=n.getDate();n.setDate(r-1)}function xH(n){let r=n.getDate();n.setDate(r+1)}function CH(n){let i=C1(new Date),l=n[i];return l&&l.length>0}function LR(n){return/^([0-9]|0[0-9]|1[0-9]|2[0-4]):[0-5][0-9]$/.test(n)}function FR(n,r){let[i,l]=n.split(":").map(Number),d=r?new Date(r):new Date;return new Date(d.getFullYear(),d.getMonth(),d.getDate(),i,l,0,0)}function SH(n){return n.sort((r,i)=>r.open.localeCompare(i.open))}function EH(n){let i=C1(new Date),l=n[i];return l&&l.length>0?BR(l):""}function IH(n){let r=new Date;zR(r);let i=C1(r),l=n[i];return l&&l.length>0?BR(l):""}function DH(n){let r=TH(n);return`Open on ${w1(r)}`}function BR(n){return n.length===1?NR(n[0]):(SH(n),n.map(bH).join(" - "))}function TH(n){let i=new Date().getDay();for(let l=0;l<7;l++){let d=(i+l)%7,a=_H(d),E=n[a];if(E&&E.length>0)return a}return"mo"}function jR(n){return wH(n)?IH(n):CH(n)?EH(n):DH(n)}function VR(n){let r=["mo","tu","we","th","fr","sa","su"],i=L=>{let N=n[L];return!N||N.length===0?["Closed"]:N.map(Z=>NR(Z))},l=(L,N)=>L.length!==N.length?!1:L.every((Z,ee)=>Z===N[ee]),d=(L,N)=>L===N?w1(L):`${w1(L)} - ${w1(N)}`,a=[],E=0;for(;E<r.length;){let L=r[E],N=i(L),Z=E+1;for(;Z<r.length&&l(N,i(r[Z]));)Z++;let ee=d(L,r[Z-1]);a.push({day:ee,schedule:N}),E=Z}if(a.length>1){let L=a[0],N=a[a.length-1];if(l(L.schedule,N.schedule)){let Z=L.day.split(" - "),X=N.day.split(" - ")[0],re=Z.length>1?Z[1]:Z[0],Q=`${X} - ${re}`;a[0]={day:Q,schedule:L.schedule},a.pop()}}return a}function MH(n,r){if(n&1&&Mt(0,"div",9),n&2){let i=r.$implicit;Ft("innerHTML",i,Od)}}function PH(n,r){if(n&1&&(it(0,"div",6)(1,"div",7),on(2),lt(),it(3,"div",8),Ji(4,MH,1,1,"div",9,ta),lt()()),n&2){let i=r.$implicit;at(2),Mo(i.day),at(2),Qi(i.schedule)}}var S1=class n{iconLibrary=Re(Yn);schedules=dr.required({transform:r=>r?VR(r):[]});closeClicked=_s();faClockThree=this.iconLibrary.getIconDefinition("fas","clock-three");faXmark=this.iconLibrary.getIconDefinition("fas","xmark");hideModal(){this.closeClicked.emit()}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-other-schedules"]],inputs:{schedules:[1,"schedules"]},outputs:{closeClicked:"closeClicked"},decls:11,vars:2,consts:[[1,"other-schedules-container"],[1,"other-schedules-header"],[1,"other-schedules-title"],[3,"icon"],[1,"close-button",3,"click"],[1,"schedules"],[1,"schedule"],[1,"schedule-day"],[1,"schedule-time"],[1,"schedule-time-item",3,"innerHTML"]],template:function(i,l){i&1&&(it(0,"div",0)(1,"div",1)(2,"div",2),Mt(3,"fa-icon",3),it(4,"h2"),on(5,"Other Schedules"),lt()(),it(6,"button",4),an("click",function(){return l.hideModal()}),Mt(7,"fa-icon",3),lt()(),it(8,"div",5),Ji(9,PH,6,1,"div",6,ta),lt()()),i&2&&(at(3),Ft("icon",l.faClockThree),at(4),Ft("icon",l.faXmark),at(2),Qi(l.schedules()))},dependencies:[Dr],styles:[".other-schedules-container[_ngcontent-%COMP%]{padding:16px;background-color:var(--definitions-colors-background-50);box-shadow:var(--definitions-shadows-general)}.other-schedules-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.other-schedules-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.other-schedules-title[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;color:var(--definitions-colors-text-900);font:var(--definitions-textFonts-desktop-sub-2);font-family:inherit}@container mapvx-container (width <= 640px){.other-schedules-title[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:16px}}.other-schedules-title[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-primary-600);font-size:32px}@container mapvx-container (width <= 640px){.other-schedules-title[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:20px}}.close-button[_ngcontent-%COMP%]{padding:0;background:none;border:none;cursor:pointer}.close-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:20px}.schedules[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px;background-color:#fff}.schedule[_ngcontent-%COMP%]{display:flex;gap:40px;align-items:center;justify-content:space-between}.schedule-times[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.schedule-time[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:end}.schedule-time-item[_ngcontent-%COMP%]{color:var(--definitions-colors-text-800);font:var(--definitions-textFonts-desktop-sub-5);font-family:inherit}@container mapvx-container (width <= 640px){.schedule-time-item[_ngcontent-%COMP%]{font-size:12px;font-weight:400}}"]})};var AH=()=>({rotate:42});function kH(n,r){if(n&1&&Mt(0,"fa-icon",3),n&2){let i=Yt();Ft("icon",i.faCircleNotch)("transform",Cu(2,AH))}}function RH(n,r){if(n&1){let i=Vr();it(0,"div",10),Mt(1,"fa-icon",9),it(2,"div",24)(3,"button",25),an("click",function(){br(i);let d=Yt();return wr(d.showOtherSchedulesModal())}),lt(),it(4,"div",26),on(5,"*Hours may vary"),lt()()()}if(n&2){let i=Yt();at(),Ft("icon",i.faClockThree),at(2),Ft("innerHTML",i.schedule(),Od)}}function OH(n,r){if(n&1){let i=Vr();it(0,"div",11)(1,"app-other-schedules",27),an("closeClicked",function(){br(i);let d=Yt();return wr(d.hideOtherSchedulesModal())}),lt()()}if(n&2){let i=Yt();at(),Ft("schedules",i.place().openingHours)}}function LH(n,r){if(n&1&&Mt(0,"div",31),n&2){let i=r.$implicit;Ft("innerHTML",i,Od)}}function FH(n,r){if(n&1&&(it(0,"div",12)(1,"div",28),Mt(2,"fa-icon",9),it(3,"div",29),on(4,"Deals + Events"),lt()(),it(5,"div",30),Ji(6,LH,1,1,"div",31,ta),lt()()),n&2){let i=Yt();at(2),Ft("icon",i.faBadgeDollar),at(4),Qi(i.banners())}}function NH(n,r){if(n&1&&(it(0,"div",21),on(1),lt()),n&2){let i=Yt();at(),eo(" ",i.address()," ")}}function zH(n,r){if(n&1&&(it(0,"div",22),on(1),lt()),n&2){let i=r.$implicit;at(),eo(" ",i," ")}}function BH(n,r){if(n&1&&(it(0,"div",23)(1,"a",18),on(2),lt()()),n&2){let i=r.$implicit;at(),Ft("href",i.url,rf),at(),Mo(i.title)}}var E1=class n{iconLibrary=Re(Yn);sanitizer=Re(ey);logger=Re(jn);navigatorService=Re(Po);stateService=Re(gi);place=dr.required();hideDeals=dr(!1);imageSrc=Qt(()=>this.place().images[0]||l1);isImageLoading=ln(!0);schedule=Qt(()=>{let r=this.place().openingHours;return r?jR(r):""});banners=Qt(()=>this.place().banners.filter(c1).filter(r=>r.description!==void 0).map(r=>this.sanitizer.bypassSecurityTrustHtml(r.description||"")));address=Qt(()=>this.place().address||"");phones=Qt(()=>this.place().properties?.filter(r=>r.type==="phone").map(r=>this.formatPhoneNumber(r.subtitle))||[]);websites=Qt(()=>this.place().properties?.filter(r=>r.type==="url").map(this.prepareUrl)||[]);drivingDirectionsUrl=Qt(()=>{let r=this.place();return`https://www.google.com/maps/dir/?api=1&destination=${r.position.lat},${r.position.lng}&travelmode=driving`});otherSchedulesModal=ln(!1);faCircleNotch=this.iconLibrary.getIconDefinition("fas","circle-notch");faBadgeDollar=this.iconLibrary.getIconDefinition("fas","badge-dollar");faClockThree=this.iconLibrary.getIconDefinition("fas","clock-three");faArrowTopRight=this.iconLibrary.getIconDefinition("fak","arrow-top-right");iconCategory=Qt(()=>{let[r,i]=t1(this.place().localizedCategory||"");return this.iconLibrary.getIconDefinition(r,i)});constructor(){Gn(()=>{this.imageSrc()&&this.startImageLoading()})}prepareUrl(r){return or(zt({},r),{url:r.url?.startsWith("http")?r.url:`https://${r.url}`})}startImageLoading(){this.isImageLoading.set(!0)}endImageLoading(){this.isImageLoading.set(!1)}showOtherSchedulesModal(){this.otherSchedulesModal.set(!0)}hideOtherSchedulesModal(){this.otherSchedulesModal.set(!1)}formatPhoneNumber(r){let i=r.replace(/^\+1/,"");return i=i.replaceAll(/\D/g,""),i.length<10?(this.logger.logWarning(`Phone number '${i}' is to short for format`),i):`${i.slice(0,3)}.${i.slice(3,6)}.${i.slice(6)}`}navigateToRoute(){this.stateService.userAction.next({type:"select-destination",data:{destinationId:this.place().lazarilloId,alias:this.place().clientId}}),this.navigatorService.navigateToRoute(this.place().lazarilloId)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-profile-view"]],inputs:{place:[1,"place"],hideDeals:[1,"hideDeals"]},decls:34,vars:15,consts:[[1,"profile-view-content"],[1,"image"],[3,"load","error","src","alt"],[1,"loading-icon",3,"icon","transform"],[1,"info"],[1,"basic-info"],[1,"title"],[1,"category-schedule"],[1,"category"],[3,"icon"],[1,"schedule"],[1,"other-schedules-modal"],[1,"deals-or-events"],[1,"description"],[1,"direction-buttons"],[1,"route-button-container"],[1,"route-button",3,"click"],[1,"driving-link"],["target","_blank",3,"href"],[1,"properties"],[1,"separator"],[1,"address"],[1,"phone"],[1,"website"],[1,"schedule-time"],[1,"schedule-button",3,"click","innerHTML"],[1,"schedule-warning"],[3,"closeClicked","schedules"],[1,"deals-or-events-header"],[1,"deals-or-events-content-title"],[1,"deals-or-events-content"],[1,"banner-content",3,"innerHTML"]],template:function(i,l){i&1&&(it(0,"div",0)(1,"div",1)(2,"img",2),an("load",function(){return l.endImageLoading()})("error",function(){return l.endImageLoading()}),lt(),Fn(3,kH,1,3,"fa-icon",3),lt(),it(4,"div",4)(5,"div",5)(6,"h1",6),on(7),lt(),it(8,"div",7)(9,"div",8),Mt(10,"fa-icon",9),it(11,"span"),on(12),lt()(),Fn(13,RH,6,2,"div",10),Fn(14,OH,2,1,"div",11),lt(),Fn(15,FH,8,1,"div",12),it(16,"div",13),on(17),lt()(),it(18,"div",14)(19,"div",15)(20,"button",16),an("click",function(){return l.navigateToRoute()}),Mt(21,"fa-icon",9),it(22,"span"),on(23,"Pedestrian-friendly directions"),lt()()(),it(24,"div",17)(25,"a",18),on(26,"Driving directions"),lt()()(),it(27,"div",19),Mt(28,"div",20),Fn(29,NH,2,1,"div",21),Ji(30,zH,2,1,"div",22,ta),Ji(32,BH,3,2,"div",23,ta),lt()()()),i&2&&(at(),li("loading",l.isImageLoading()),at(),Ft("src",l.imageSrc(),rf)("alt",l.place().title),at(),Nn(l.isImageLoading()?3:-1),at(4),Mo(l.place().title),at(3),Ft("icon",l.iconCategory()),at(2),Mo(l.place().localizedCategory),at(),Nn(l.schedule()!==""?13:-1),at(),Nn(l.otherSchedulesModal()?14:-1),at(),Nn(l.banners().length>0&&!l.hideDeals()?15:-1),at(2),eo(" ",l.place().description," "),at(4),Ft("icon",l.faArrowTopRight),at(4),Ft("href",l.drivingDirectionsUrl(),rf),at(4),Nn(l.address()!==""?29:-1),at(),Qi(l.phones()),at(2),Qi(l.websites()))},dependencies:[Dr,S1],styles:['.profile-view-content[_ngcontent-%COMP%]{display:flex;padding:0 16px;flex-direction:column;align-items:center;gap:16px}@container mapvx-container (width <= 1024px){.profile-view-content[_ngcontent-%COMP%]{padding:22px 0 0}}@container mapvx-container (width <= 640px){.profile-view-content[_ngcontent-%COMP%]{padding:22px 0 0}}.image[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{display:block;width:100%;object-fit:cover;aspect-ratio:1/1}.image.loading[_ngcontent-%COMP%]{background-color:var(--definitions-colors-primary-300);height:200px;width:100%;display:flex;justify-content:center;align-items:center}.image.loading[_ngcontent-%COMP%] .loading-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-primary-600);font-size:100px}.image.loading[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{display:none}.info[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:24px;width:100%}.basic-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:16px;width:100%}.title[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-h6);font-family:inherit;margin:0;color:var(--definitions-colors-text-black)}.category-schedule[_ngcontent-%COMP%]{display:flex;width:100%;justify-content:space-between;flex-wrap:wrap;position:relative}.category[_ngcontent-%COMP%]{display:flex;gap:18px;color:var(--definitions-colors-text-grey);align-items:center}.category[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:20px}.category[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-body-3);font-family:inherit;font-size:16px}.schedule[_ngcontent-%COMP%]{display:flex;gap:18px;align-items:center}.schedule[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-primary-600);font-size:20px}.schedule[_ngcontent-%COMP%] .schedule-time[_ngcontent-%COMP%]{position:relative}.schedule[_ngcontent-%COMP%] .schedule-time[_ngcontent-%COMP%] .schedule-button[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-button-3);font-family:inherit;font-size:16px;color:var(--definitions-colors-secondary-blue);border:none;background:none;cursor:pointer}.schedule[_ngcontent-%COMP%] .schedule-time[_ngcontent-%COMP%] .schedule-warning[_ngcontent-%COMP%]{position:absolute;top:20px;left:0;font:var(--definitions-textFonts-desktop-sub-5);font-family:inherit;font-size:16px;color:var(--definitions-colors-text-black)}.other-schedules-modal[_ngcontent-%COMP%]{position:absolute;width:max-content;bottom:0;right:50%;transform:translate(50%) translateY(100%)}.deals-or-events[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:8px;width:100%}.deals-or-events-header[_ngcontent-%COMP%]{display:flex;width:100%;align-items:flex-start;gap:18px;color:var(--definitions-colors-secondary-orange)}.deals-or-events-header[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:20px}.deals-or-events-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:8px}.deals-or-events-content-title[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-sub-4);font-family:inherit;font-size:16px}.banner-content[_ngcontent-%COMP%]{color:var(--definitions-colors-secondary-orange);padding:5px;font:var(--definitions-textFonts-desktop-body-3);font-family:inherit;font-size:16px;white-space:pre-wrap;border:1px solid var(--definitions-colors-secondary-orange);border-radius:8px;box-shadow:var(--definitions-shadows-general)}.description[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-body-2);font-family:inherit;color:var(--definitions-colors-text-black)}.direction-buttons[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:16px;align-self:stretch;width:100%}.route-button-container[_ngcontent-%COMP%]{width:100%}.route-button[_ngcontent-%COMP%]{display:flex;padding:8px 16px;justify-content:center;align-items:center;gap:10px;align-self:stretch;background:var(--definitions-colors-primary-black);color:var(--definitions-colors-text-white);border:none;cursor:pointer;width:100%}.route-button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-button-2);font-family:inherit;font-size:16px;font-feature-settings:"liga" off,"clig" off}.driving-link[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--definitions-colors-secondary-blue);text-decoration:none;font:var(--definitions-textFonts-desktop-button-2);font-family:inherit;font-size:16px;font-feature-settings:"liga" off,"clig" off}.properties[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:16px;width:100%}.separator[_ngcontent-%COMP%]{width:100%;height:1px;background:var(--definitions-colors-primary-100)}.address[_ngcontent-%COMP%], .phone[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-sub-1);font-family:inherit;font-size:16px;color:var(--definitions-colors-text-black)}.website[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-button-1);font-family:inherit;font-size:16px;font-feature-settings:"liga" off,"clig" off}.website[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--definitions-colors-secondary-blue);text-decoration:none}']})};var jH=["backButton",""],mm=class n{iconLibraryService=Re(Yn);faArrowLeft=this.iconLibraryService.getIconDefinition("fas","arrow-left");static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["button","backButton",""]],attrs:jH,decls:3,vars:1,consts:[[3,"icon"]],template:function(i,l){i&1&&(Mt(0,"fa-icon",0),it(1,"span"),on(2,"Back"),lt()),i&2&&Ft("icon",l.faArrowLeft)},dependencies:[Dr],styles:['[_nghost-%COMP%]{display:flex;justify-content:center;align-items:center;gap:12px;color:var(--definitions-colors-secondary-blue);border:none;background:none}[_nghost-%COMP%]:hover{cursor:pointer}[_nghost-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:24px}[_nghost-%COMP%] span[_ngcontent-%COMP%]{color:var(--definitions-colors-secondary-blue);font:var(--definitions-textFonts-desktop-button-1);font-family:inherit;font-feature-settings:"liga" off,"clig" off;letter-spacing:-1px}']})};function VH(n,r){if(n&1&&Mt(0,"app-profile-view",5),n&2){let i=Yt(),l=Hg(6);Ft("place",l)("hideDeals",i.hideDeals())}}var I1=class n{onDestroy=new _r;route=Re(Ha);logger=Re(jn);loadedDataService=Re(ci);sdkService=Re(na);mapService=Re(xi);markerService=Re(Zo);navigatorService=Re(Po);homeStateService=Re(gi);iconLibraryService=Re(Yn);_profileId="";place=ln(null);mapReady=vo(this.mapService.mapReady,{requireSync:!0});hideDeals=Qt(()=>this.homeStateService.hideDeals());faArrowLeft=this.iconLibraryService.getIconDefinition("fas","arrow-left");constructor(){Gn(()=>{let r=this.place();if(r&&this.mapReady()){if(r.parentType==="Place")if(this.loadedDataService.parentPlace()===void 0){let a=this.loadedDataService.potentialParentPlaces().find(E=>E.lazarilloId===r.parentId);if(a){this.loadedDataService.parentPlace.set(a),this.mapService.setParentPlace(a);let E=r.inFloors?.[0];E&&this.mapService.updateFloor(E)}}else{let d=r.inFloors?.[0];d&&this.mapService.updateFloor(d)}if(!this.markerService.hasMarker(r.lazarilloId)){let l=qo(this.homeStateService.lastListedPlaces);l.length>0?this.markerService.addMarkers(l):this.markerService.addMarker(r)}this.markerService.selectMarker(r.lazarilloId),setTimeout(()=>{this.mapService.updateCamera({center:r.position})},100)}})}ngOnInit(){this.addBackListener();let r=this.route.paramMap.pipe(En(i=>i.get("id")),_i(i=>i!==null),_i(i=>i!==this._profileId),e2(1));Xs([r,this.loadedDataService.getAvailablePlaces()]).pipe(os(this.onDestroy),Yi(([i,l])=>{let d=l.find(a=>a.lazarilloId===i||a.clientId===i);return d?Sn(d):ai(this.sdkService.getPlaceDetail(i))})).subscribe({next:i=>{this._profileId!==i.lazarilloId&&this.cleanOldProfile(),this._profileId=i.lazarilloId,this.place.set(i),this.loadedDataService.updateInstitution(i.parentInstitutionId),this.homeStateService.selectedInstitution.set(i.parentInstitutionId),this.homeStateService.userAction.next({type:"show-place",data:{placeId:i.lazarilloId,alias:i.clientId}})},error:i=>{this.logger.log("Error getting profile id",i)},complete:()=>{this.logger.log("Profile id complete")}})}ngOnDestroy(){this.removeBackListener(),this.cleanOldProfile(),this.onDestroy.next(),this.onDestroy.complete()}cleanOldProfile(){this._profileId!==""&&this.markerService.deselectMarker(this._profileId)}returnToHome(){this.homeStateService.userAction.next({type:"return-to-home",data:{filter:this.homeStateService.selectedFilter()}}),this.navigatorService.navigateToHome()}backListener(r){this.logger.log("Back listener",r),this.returnToHome()}listener=r=>this.backListener(r);addBackListener(){globalThis.addEventListener("popstate",this.listener)}removeBackListener(){globalThis.removeEventListener("popstate",this.listener)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-profile-screen"]],decls:10,vars:2,consts:[[1,"screen"],[1,"back-button"],["backButton","",3,"click"],[1,"profile-screen-content"],[1,"profile-info"],[3,"place","hideDeals"],[1,"map"]],template:function(i,l){if(i&1){let d=Vr();it(0,"div",0)(1,"div",1)(2,"button",2),an("click",function(){return br(d),wr(l.returnToHome())}),on(3,"Back"),lt()(),it(4,"div",3)(5,"div",4),Zp(6),Fn(7,VH,1,2,"app-profile-view",5),lt(),it(8,"div",6),Mt(9,"app-map"),lt()()()}if(i&2){at(6);let d=Gg(l.place());at(),Nn(d!==null?7:-1)}},dependencies:[qd,mm,E1],styles:[".screen[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:18px}.profile-screen-content[_ngcontent-%COMP%]{display:flex;width:100%}@container mapvx-container (width <= 1024px){.profile-screen-content[_ngcontent-%COMP%]{flex-direction:column-reverse}}@container mapvx-container (width <= 640px){.profile-screen-content[_ngcontent-%COMP%]{flex-direction:column-reverse}}.profile-info[_ngcontent-%COMP%]{display:flex;width:432px;flex-shrink:0}.profile-info[_ngcontent-%COMP%] app-profile-view[_ngcontent-%COMP%]{width:100%}@container mapvx-container (width <= 1024px){.profile-info[_ngcontent-%COMP%]{width:100%}}.map[_ngcontent-%COMP%]{width:100%;min-height:730px}@container mapvx-container (width <= 1024px){.map[_ngcontent-%COMP%]{height:730px}}@container mapvx-container (width <= 640px){.map[_ngcontent-%COMP%]{width:100%;min-height:unset;height:400px}}"],changeDetection:0})};function UH(n,r){if(n&1){let i=Vr();it(0,"button",1),an("click",function(){br(i);let d=Yt();return wr(d.pauseRoute())}),Mt(1,"fa-icon",2),it(2,"span"),on(3,"Pause route"),lt()()}if(n&2){let i=Yt();at(),Ft("icon",i.faPause)}}function $H(n,r){if(n&1){let i=Vr();it(0,"button",1),an("click",function(){br(i);let d=Yt();return wr(d.resumeRoute())}),Mt(1,"fa-icon",2),it(2,"span"),on(3,"Resume route"),lt()()}if(n&2){let i=Yt();at(),Ft("icon",i.faPlay)}}function GH(n,r){if(n&1){let i=Vr();it(0,"button",1),an("click",function(){br(i);let d=Yt();return wr(d.restartRoute())}),Mt(1,"fa-icon",2),it(2,"span"),on(3,"Restart route"),lt()()}if(n&2){let i=Yt();at(),Ft("icon",i.faRestart)}}function HH(n,r){}var D1=class n{iconLibrary=Re(Yn);routingService=Re(_c);restartRouteCallback=_s();AnimationState=n1;animationStatus=vo(this.routingService.animationStatusSubject,{initialValue:0});faPlay=this.iconLibrary.getIconDefinition("fas","play");faPause=this.iconLibrary.getIconDefinition("fas","pause");faRestart=this.iconLibrary.getIconDefinition("fas","rotate-right");pauseRoute(){this.routingService.pauseRouteAnimation()}resumeRoute(){this.routingService.resumeRouteAnimation()}restartRoute(){this.routingService.restartRouteAnimation(),this.restartRouteCallback.emit()}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-route-control-button"]],outputs:{restartRouteCallback:"restartRouteCallback"},decls:4,vars:1,consts:[[1,"route-control-button"],[1,"route-control-button",3,"click"],[3,"icon"]],template:function(i,l){if(i&1&&Fn(0,UH,4,1,"button",0)(1,$H,4,1,"button",0)(2,GH,4,1,"button",0)(3,HH,0,0),i&2){let d;Nn((d=l.animationStatus())===l.AnimationState.Playing?0:d===l.AnimationState.Paused?1:d===l.AnimationState.Finished?2:3)}},dependencies:[Dr],styles:["[_nghost-%COMP%]{position:absolute;top:20px;left:500px}@container mapvx-container (width <= 1024px){[_nghost-%COMP%]{top:90px;left:unset;right:20px}}.route-control-button[_ngcontent-%COMP%]{display:flex;width:180px;height:45px;justify-content:center;align-items:center;gap:10px;background:var(--definitions-colors-background-white);color:var(--definitions-colors-text-black);box-shadow:var(--definitions-shadows-general);border:none;cursor:pointer}@container mapvx-container (width <= 1024px){.route-control-button[_ngcontent-%COMP%]{width:45px}}.route-control-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:16px}.route-control-button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-button-5);font-family:inherit}@container mapvx-container (width <= 1024px){.route-control-button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:none}}"]})};var T1=class n{iconLibrary=Re(Yn);currentRoute=dr.required();startRouteClick=_s();faCircleSmall=this.iconLibrary.getIconDefinition("fas","circle-small");faArrowTopRight=this.iconLibrary.getIconDefinition("fak","arrow-top-right");time=Qt(()=>{let r=this.currentRoute();return this.toMinutes(r.duration)});distance=Qt(()=>{let r=this.currentRoute();return Math.ceil(r.length*3.28084)});toMinutes(r){return Math.ceil(r/60)}onStartRouteClick(){this.startRouteClick.emit()}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-route-info"]],inputs:{currentRoute:[1,"currentRoute"]},outputs:{startRouteClick:"startRouteClick"},decls:17,vars:5,consts:[[1,"route-info"],[1,"route-info-item"],[1,"route-info-item-label"],[3,"icon"],[1,"route-info-item-value"],[1,"start-route-button",3,"click"]],template:function(i,l){i&1&&(it(0,"div",0)(1,"div",1)(2,"span",2),on(3,"Time"),lt(),Mt(4,"fa-icon",3),it(5,"span",4),on(6),lt()(),it(7,"div",1)(8,"span",2),on(9,"Distance"),lt(),Mt(10,"fa-icon",3),it(11,"span",4),on(12),lt()()(),it(13,"button",5),an("click",function(){return l.onStartRouteClick()}),Mt(14,"fa-icon",3),it(15,"span"),on(16,"Start Route"),lt()()),i&2&&(at(4),Ft("icon",l.faCircleSmall),at(2),eo("",l.time()," min"),at(4),Ft("icon",l.faCircleSmall),at(2),eo("",l.distance()," ft"),at(2),Ft("icon",l.faArrowTopRight))},dependencies:[Dr],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;gap:40px}.route-info[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap}.route-info-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;color:var(--definitions-colors-text-black)}.start-route-button[_ngcontent-%COMP%]{display:flex;padding:8px 16px;justify-content:center;align-items:center;gap:10px;background-color:var(--definitions-colors-primary-900);color:var(--definitions-colors-text-50);border:none;cursor:pointer;width:100%}.start-route-button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-button-2);font-family:inherit;font-feature-settings:"liga" off,"clig" off;line-height:15px}.start-route-button[_ngcontent-%COMP%]{display:none}']})};var qH={"[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"},mye=or(zt({},qH),{"[class.ng-submitted]":"isSubmitted"});var WH=new bn("",{providedIn:"root",factory:()=>UR}),UR="always";var ZH=(()=>{class n{static \u0275fac=function(l){return new(l||n)};static \u0275mod=hc({type:n});static \u0275inj=yl({})}return n})();var $R=(()=>{class n{static withConfig(i){return{ngModule:n,providers:[{provide:WH,useValue:i.callSetDisabledState??UR}]}}static \u0275fac=function(l){return new(l||n)};static \u0275mod=hc({type:n});static \u0275inj=yl({imports:[ZH]})}return n})();function YH(n,r){if(n&1){let i=Vr();it(0,"button",5),an("click",function(){br(i);let d=Yt();return wr(d.clearSelectedPlace())}),Mt(1,"fa-icon",6),lt()}if(n&2){let i=Yt();at(),Ft("icon",i.faXmark)}}function KH(n,r){if(n&1){let i=Vr();it(0,"button",10),an("click",function(){br(i);let d=Yt(2);return wr(d.useCurrentLocation())}),it(1,"div",11),Mt(2,"fa-icon",6),lt(),it(3,"div",12)(4,"div",13),on(5,"Use current location"),lt()()()}if(n&2){let i=Yt(2);at(2),Ft("icon",i.faLocationArrow)}}function XH(n,r){if(n&1){let i=Vr();it(0,"button",10),an("click",function(){let d=br(i).$implicit,a=Yt(2);return wr(a.selectPlace(d))}),it(1,"div",11),Mt(2,"fa-icon",6),lt(),it(3,"div",12)(4,"div",13),on(5),lt(),it(6,"div",14),on(7),lt()()()}if(n&2){let i=r.$implicit,l=Yt(2);at(2),Ft("icon",l.faLocationDot),at(3),Mo(i.title),at(2),Mo(i.address)}}function JH(n,r){n&1&&(it(0,"div",9),on(1,"No results found"),lt())}function QH(n,r){if(n&1&&(it(0,"div",4)(1,"div",7),Fn(2,KH,6,1,"button",8),Ji(3,XH,8,3,"button",8,ta),Fn(5,JH,2,0,"div",9),lt()()),n&2){let i=Yt();at(2),Nn(i.allowCurrentLocation()&&i.locationPermission()!=="denied"?2:-1),at(),Qi(i.filteredPlaces()),at(2),Nn(i.filteredPlaces().length===0&&i.filterText().trim()?5:-1)}}var M1=class n{logger=Re(jn);locationService=Re(Hd);iconLibrary=Re(Yn);places=dr.required();initialSelectedPlace=dr(null);allowCurrentLocation=dr(!1);placeholder=dr("Set a starting point");selectedPlace=ls(()=>this.initialSelectedPlace());selectedPlaceChange=_s();isDropdownOpen=ln(!1);filterText=ls(()=>this.selectedPlace()?.title||"");filteredPlaces=Qt(()=>{let r=this.places(),i=this.filterText().toLowerCase().trim();return i?r.filter(l=>l.title?.toLowerCase().includes(i)||l.address?.toLowerCase().includes(i)):r});locationPermission=ln("prompt");faLocationDot=this.iconLibrary.getIconDefinition("fas","location-dot");faLocationArrow=this.iconLibrary.getIconDefinition("fas","location-arrow");faXmark=this.iconLibrary.getIconDefinition("fas","xmark");constructor(){this.checkLocationPermission()}checkLocationPermission(){this.locationService.checkLocationPermission().then(r=>{this.locationPermission.set(r)}).catch(r=>{this.logger.logWarning("Error checking location permission",r),this.locationPermission.set("denied")})}requestLocationPermission(){this.locationService.requestLocationPermission().then(r=>{this.locationPermission.set(r),r==="granted"&&this.getCurrentLocation()}).catch(r=>{this.logger.logWarning("Error requesting location permission",r),this.locationPermission.set("denied")})}getCurrentLocation(){this.locationService.getCurrentLocation().then(r=>{this.selectedPlace.set(r),this.selectedPlaceChange.emit(r)}).catch(r=>{this.logger.logWarning("Error getting current location",r)})}useCurrentLocation(){switch(this.locationPermission()){case"granted":this.getCurrentLocation();break;case"prompt":this.requestLocationPermission();break}}selectPlace(r){this.selectedPlace.set(r),this.isDropdownOpen.set(!1),this.selectedPlaceChange.emit(r)}clearSelectedPlace(){this.selectedPlace.set(null),this.filterText.set(""),this.selectedPlaceChange.emit(null)}onInputFocus(){this.isDropdownOpen.set(!0)}onInputBlur(){setTimeout(()=>{this.isDropdownOpen.set(!1)},150)}onInputChange(r){let i=r.target;this.filterText.set(i.value),this.isDropdownOpen.set(!0)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-place-selector"]],inputs:{places:[1,"places"],initialSelectedPlace:[1,"initialSelectedPlace"],allowCurrentLocation:[1,"allowCurrentLocation"],placeholder:[1,"placeholder"]},outputs:{selectedPlaceChange:"selectedPlaceChange"},decls:5,vars:4,consts:[[1,"place-selector"],[1,"input-container"],["type","text","name","place-input",1,"place-input",3,"input","focus","blur","value","placeholder"],[1,"clear-button"],[1,"dropdown-container"],[1,"clear-button",3,"click"],[3,"icon"],[1,"dropdown-list"],["type","button",1,"place-option"],[1,"no-results"],["type","button",1,"place-option",3,"click"],[1,"place-icon"],[1,"place-info"],[1,"place-title"],[1,"place-address"]],template:function(i,l){i&1&&(it(0,"div",0)(1,"div",1)(2,"input",2),an("input",function(a){return l.onInputChange(a)})("focus",function(){return l.onInputFocus()})("blur",function(){return l.onInputBlur()}),lt(),Fn(3,YH,2,1,"button",3),lt(),Fn(4,QH,6,2,"div",4),lt()),i&2&&(at(2),Ft("value",l.filterText())("placeholder",l.placeholder()),at(),Nn(l.selectedPlace()?3:-1),at(),Nn(l.isDropdownOpen()?4:-1))},dependencies:[zd,$R,Dr],styles:['[_nghost-%COMP%]{width:100%}.place-selector[_ngcontent-%COMP%]{position:relative;width:100%}.input-container[_ngcontent-%COMP%]{width:100%;display:flex}.place-input[_ngcontent-%COMP%]{width:100%;border:none;font:var(--definitions-textFonts-desktop-button-1);font-family:inherit;font-feature-settings:"liga" off,"clig" off;letter-spacing:-1px;text-overflow:ellipsis;outline:none;color:var(--definitions-colors-text-black)}.place-input[_ngcontent-%COMP%]::placeholder{color:var(--definitions-colors-primary-300)}.clear-button[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:16px;color:var(--definitions-colors-text-900)}.dropdown-container[_ngcontent-%COMP%]{position:absolute;top:100%;left:0;right:0;z-index:10;margin-top:4px}.dropdown-list[_ngcontent-%COMP%]{background:var(--definitions-colors-background-50);border-radius:8px;box-shadow:var(--definitions-shadows-general);max-height:300px;overflow-y:auto;border:1px solid var(--definitions-colors-gray-200)}.place-option[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:4px;padding:15px 24px;cursor:pointer;transition:background-color .2s ease;border-bottom:1px solid #f5f5f5;background:none;border:none;width:100%;text-align:left}.place-option[_ngcontent-%COMP%]:last-child{border-bottom:none}.place-option[_ngcontent-%COMP%]:hover{background-color:#f8f9fa}.place-option[_ngcontent-%COMP%]:active{background-color:#e9ecef}.place-option[_ngcontent-%COMP%]:focus{outline:2px solid #5D5D5D;outline-offset:-2px}.place-icon[_ngcontent-%COMP%]{flex-shrink:0;width:19.341px;height:19.341px;margin-top:2px;color:var(--definitions-colors-primary-600)}.place-info[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:4px;min-width:0}.place-title[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-button-3);font-family:inherit;color:var(--definitions-colors-text-900);word-wrap:break-word}.place-address[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-body-3);font-family:inherit;color:var(--definitions-colors-text-800);word-wrap:break-word}.no-results[_ngcontent-%COMP%]{padding:20px 24px;text-align:center;font:var(--definitions-textFonts-desktop-body-3);font-family:inherit;color:var(--definitions-colors-text-800)}@media (width <= 768px){.place-option[_ngcontent-%COMP%]{padding:12px 20px}.place-title[_ngcontent-%COMP%]{font-size:15px}.place-address[_ngcontent-%COMP%]{font-size:13px}}']})};var P1=class n{logger=Re(jn);iconLibrary=Re(Yn);places=dr.required();initialDestination=dr(null);originPlace=ln(null);destinationPlace=ls(()=>this.initialDestination());originSelected=_s();destinationSelected=_s();swapPlaces=_s();clearDestination=_s();locationPermission=ln("prompt");faLocationDot=this.iconLibrary.getIconDefinition("fas","location-dot");faEllipsisVertical=this.iconLibrary.getIconDefinition("fas","ellipsis-vertical");faArrowsRetweet=this.iconLibrary.getIconDefinition("fas","arrows-retweet");canSwapPlaces=Qt(()=>nC(this.originPlace())&&nC(this.destinationPlace()));onOriginSelected(r){this.originSelected.emit(r),this.originPlace.set(r)}onDestinationSelected(r){if(Kp(r)){this.logger.logWarning("Current location is not allowed as destination");return}this.destinationSelected.emit(r),this.destinationPlace.set(r)}onSwapPlaces(){let r=this.originPlace(),i=this.destinationPlace();if(Kp(r)){this.logger.logWarning("Should not be possible to swap places with current location as origin");return}this.originPlace.set(i),this.originSelected.emit(i),this.destinationPlace.set(r),this.destinationSelected.emit(r)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-route-selector"]],inputs:{places:[1,"places"],initialDestination:[1,"initialDestination"]},outputs:{originSelected:"originSelected",destinationSelected:"destinationSelected",swapPlaces:"swapPlaces",clearDestination:"clearDestination"},decls:20,vars:10,consts:[[1,"route-selector"],[1,"routing-option","origin"],[1,"place-info"],[1,"place-icon"],["xmlns","http://www.w3.org/2000/svg","width","36","height","36","viewBox","0 0 36 36","fill","none"],["width","36","height","36","rx","18","fill","#8DC8FF"],["d","M29.2517 17.7595C29.1117 23.9741 23.9602 28.8986 17.7456 28.7586C11.5309 28.6185 6.60648 23.4671 6.74649 17.2524C6.8865 11.0378 12.038 6.11332 18.2526 6.25333C24.4673 6.39334 29.3917 11.5448 29.2517 17.7595Z","fill","#2C57A0"],["d","M13.5364 22.4764C13.4259 22.5279 13.3135 22.5415 13.199 22.5173C13.0847 22.4932 12.9902 22.4373 12.9155 22.3496C12.8298 22.2721 12.7772 22.1766 12.7577 22.0629C12.7384 21.9495 12.7519 21.8395 12.7982 21.7327L17.6404 11.5662C17.7437 11.3532 17.9102 11.2493 18.1399 11.2545C18.3697 11.2597 18.5313 11.371 18.6249 11.5884L23.0044 21.9626C23.0458 22.0714 23.0543 22.182 23.03 22.2944C23.0054 22.407 22.9485 22.5001 22.8594 22.5736C22.7808 22.6579 22.6839 22.7095 22.5687 22.7283C22.4532 22.7475 22.3415 22.7288 22.2335 22.6723L17.9278 20.6691L13.5364 22.4764ZM14.4251 20.9295L17.954 19.5064L21.4153 21.087L18.0981 13.1117L14.4251 20.9295Z","fill","white"],[3,"selectedPlaceChange","places","initialSelectedPlace","allowCurrentLocation"],[1,"connector-line"],[1,"connector-dots"],[3,"icon"],[1,"connector-line-element"],["type","button",1,"swap-button",3,"click","disabled"],[1,"routing-option","destination"],[3,"selectedPlaceChange","places","initialSelectedPlace","placeholder"]],template:function(i,l){i&1&&(it(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),a0(),it(4,"svg",4),Mt(5,"rect",5)(6,"path",6)(7,"path",7),lt()(),l0(),it(8,"app-place-selector",8),an("selectedPlaceChange",function(a){return l.onOriginSelected(a)}),lt()()(),it(9,"div",9)(10,"div",10),Mt(11,"fa-icon",11),lt(),Mt(12,"div",12),it(13,"button",13),an("click",function(){return l.onSwapPlaces()}),Mt(14,"fa-icon",11),lt()(),it(15,"div",14)(16,"div",2)(17,"div",3),Mt(18,"fa-icon",11),lt(),it(19,"app-place-selector",15),an("selectedPlaceChange",function(a){return l.onDestinationSelected(a)}),lt()()()()),i&2&&(at(8),Ft("places",l.places())("initialSelectedPlace",l.originPlace())("allowCurrentLocation",!0),at(3),Ft("icon",l.faEllipsisVertical),at(2),Ft("disabled",!l.canSwapPlaces()),at(),Ft("icon",l.faArrowsRetweet),at(4),Ft("icon",l.faLocationDot),at(),Ft("places",l.places())("initialSelectedPlace",l.destinationPlace())("placeholder","Select a destination"))},dependencies:[zd,M1,Dr],styles:['.route-selector[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:5px;position:relative;width:100%;box-sizing:border-box}.routing-option[_ngcontent-%COMP%]{display:flex;gap:10px;align-items:center;padding:0 40px 0 0;box-sizing:border-box;width:100%}.place-info[_ngcontent-%COMP%]{display:flex;gap:10px;align-items:center;flex:1;min-width:0}.place-icon[_ngcontent-%COMP%]{flex-shrink:0;width:36px;height:36px;display:flex;align-items:center;justify-content:center}.destination[_ngcontent-%COMP%] .place-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-text-black)}.connector-line[_ngcontent-%COMP%]{display:flex;gap:8px;align-items:center;width:100%;position:relative}.connector-dots[_ngcontent-%COMP%]{flex-shrink:0;width:36px;height:36px;display:flex;align-items:center;justify-content:center}.connector-dots[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:20px;color:#5d5d5d}.connector-line-element[_ngcontent-%COMP%]{flex:1;height:1px;background:#e0e0e0;position:relative}.connector-line-element[_ngcontent-%COMP%]:before{content:"";position:absolute;top:50%;left:0;right:0;height:1px;background:repeating-linear-gradient(to right,#e0e0e0 0,#e0e0e0 4px,transparent 4px,transparent 8px);transform:translateY(-50%)}.swap-button[_ngcontent-%COMP%]{flex-shrink:0;width:32px;height:25px;background:none;border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;border-radius:4px;transition:background-color .2s ease}.swap-button[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.swap-button[_ngcontent-%COMP%]:hover:not(:disabled){background-color:#f5f5f5}.swap-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:16px;color:#5d5d5d}.clear-button[_ngcontent-%COMP%]{flex-shrink:0;width:20px;height:20px;background:none;border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;border-radius:50%;transition:background-color .2s ease}.clear-button[_ngcontent-%COMP%]:hover{background-color:#f5f5f5}.clear-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:12px;color:#666}.select-destination-button[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;padding:8px 12px;border-radius:6px;transition:background-color .2s ease;flex:1;text-align:left}.select-destination-button[_ngcontent-%COMP%]:hover{background-color:#f8f9fa}.select-destination-button[_ngcontent-%COMP%] .place-label[_ngcontent-%COMP%]{font-family:Open Sans,sans-serif;font-weight:600;font-size:20px;line-height:1;color:#cbcbcb;font-variation-settings:"wdth" 100;letter-spacing:-1px}.destination-selector[_ngcontent-%COMP%]{position:absolute;top:81px;left:84.5px;width:310px;z-index:1000;background:#fff;box-shadow:0 4px 4px #00000040;border-radius:8px;overflow:hidden}@media (width <= 768px){.route-selector[_ngcontent-%COMP%]{padding:20px 16px}.place-text[_ngcontent-%COMP%]{font-size:18px}.place-icon[_ngcontent-%COMP%]{width:32px;height:32px}.place-icon[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:18px}.destination-selector[_ngcontent-%COMP%]{left:16px;right:16px;width:auto}}']})};function eq(n,r){if(n&1){let i=Vr();it(0,"div",6)(1,"app-route-info",9),an("startRouteClick",function(){br(i);let d=Yt();return wr(d.startStepAnimation())}),lt()()}if(n&2){Yt();let i=Hg(7);at(),Ft("currentRoute",i)}}var A1=class n{routeId="";route=Re(Ha);logger=Re(jn);navigatorService=Re(Po);loadedDataService=Re(ci);mapService=Re(xi);markerService=Re(Zo);homeStateService=Re(gi);routingService=Re(_c);mapReady=vo(this.mapService.mapReady,{requireSync:!0});places=vo(Xs([this.loadedDataService.getAvailablePlaces(),this.loadedDataService.getInstitutionId()]).pipe(En(([r,i])=>r.filter(l=>l.parentInstitutionId===i))),{initialValue:[]});originPoint=ln(null);destinationPlace=ls(()=>this.initialDestination());initialDestination=ln(null);currentRoute=ln(null);constructor(){this.routeId=this.route.snapshot.params.id||"unknown",Gn(()=>{let r=this.places();if(r.length>0){let i=r.find(l=>l.lazarilloId===this.routeId||l.clientId===this.routeId);i&&this.initialDestination.set(i)}}),Gn(()=>{if(this.mapReady()){let i=qo(this.homeStateService.lastListedPlaces);this.markerService.addRouteMarkers(i)}}),Gn(()=>{let r=this.destinationPlace();r&&this.mapReady()&&(this.markerService.deselectMarkers(),this.markerService.hasMarker(r.lazarilloId)||this.markerService.addRouteMarker(r),this.markerService.selectMarker(r.lazarilloId),qo(this.originPoint)===null&&setTimeout(()=>{this.mapService.updateCamera({center:r.position})},100))}),Gn(()=>{let r=this.originPoint(),i=this.destinationPlace();r&&i?this.mapReady()&&(this.markerService.removeAllMarkers(),this.markerService.addOriginMarker(r.position),this.markerService.addDestinationMarker(i),this.routingService.getRoute(r,i).then(l=>{this.currentRoute.set(l),this.routingService.startAnimatingRoute(l),this.fitMapToRoute(r,i,l)}).catch(l=>{this.logger.logWarning("Error getting route",l)})):this.currentRoute.set(null)})}returnToProfile(){this.navigatorService.navigateToProfile(this.routeId)}onDestinationSelected(r){this.destinationPlace.set(r)}onOriginSelected(r){this.originPoint.set(r)}startStepAnimation(){this.currentRoute()&&this.logger.log("Starting step animation")}fitMapToRoute(r,i,l){let d=r?.position??this.originPoint()?.position,a=i?.position??this.destinationPlace()?.position,E=l??this.currentRoute(),L=document.querySelector(".route-related-components");if(d&&a&&E&&L&&this.mapReady()){let N=getComputedStyle(L),Z=Number.parseInt(N.getPropertyValue("--padding-top")),ee=Number.parseInt(N.getPropertyValue("--padding-left"));setTimeout(()=>{this.mapService.fitRoute(d,a,E,{padding:{top:Z,left:ee,right:70,bottom:50}})},100)}}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-route-screen"]],decls:12,vars:4,consts:[[1,"route-screen"],[1,"back-button"],["backButton","",3,"click"],[1,"route-screen-content"],[1,"route-related-components"],[3,"originSelected","destinationSelected","places","initialDestination"],[1,"route-info"],[1,"map"],[3,"restartRouteCallback"],[3,"startRouteClick","currentRoute"]],template:function(i,l){if(i&1){let d=Vr();it(0,"div",0)(1,"div",1)(2,"button",2),an("click",function(){return br(d),wr(l.returnToProfile())}),on(3,"Back"),lt()(),it(4,"div",3)(5,"div",4)(6,"app-route-selector",5),an("originSelected",function(E){return br(d),wr(l.onOriginSelected(E))})("destinationSelected",function(E){return br(d),wr(l.onDestinationSelected(E))}),lt(),Zp(7),Fn(8,eq,2,1,"div",6),lt(),it(9,"div",7)(10,"app-map")(11,"app-route-control-button",8),an("restartRouteCallback",function(){return br(d),wr(l.fitMapToRoute())}),lt()()()()()}if(i&2){at(6),Ft("places",l.places())("initialDestination",l.initialDestination()),at();let d=Gg(l.currentRoute());at(),Nn(d!==null?8:-1)}},dependencies:[mm,qd,P1,T1,D1],styles:[".route-screen-content[_ngcontent-%COMP%]{position:relative}.route-related-components[_ngcontent-%COMP%]{--padding-top: 130;--padding-left: 450;position:absolute;top:0;left:0;width:450px;box-sizing:border-box;z-index:1;display:flex;flex-direction:column;gap:40px;padding:40px 38px;background-color:var(--definitions-colors-background-white)}@container mapvx-container (width <= 1024px){.route-related-components[_ngcontent-%COMP%]{--padding-top: 70;--padding-left: 50;position:unset;width:100%}}.map[_ngcontent-%COMP%]{width:100%;height:820px}"],changeDetection:0})};var GR=[{path:"",component:a1,children:[{path:"list",redirectTo:"",pathMatch:"full"},{path:"",component:y1},{path:"search",component:b1}]},{path:"profile/:id",component:I1},{path:"route/:id",component:A1},{path:"**",redirectTo:""}];var k1=class{handleError(r){console.error("CustomErrorHandler",r)}};var HR={providers:[{provide:Js,useClass:k1},Px(),mS(GR),{provide:fc,useClass:s1},jn]};tC(HR).then(n=>{let r=iP(o1,{injector:n.injector});customElements.define("mapvx-website",r)}).catch(n=>console.error(n));
1512
+ </svg>`,i}pauseRouteAnimation(){this.animationStatusSubject.next(2),this.mapService.pauseAnimatingRoute()}resumeRouteAnimation(){this.animationStatusSubject.next(1),this.mapService.resumeAnimatingRoute()}restartRouteAnimation(){this.animationStatusSubject.next(1),this.mapService.restartAnimatingRoute()}removeRoute(){this.animationStatusSubject.next(0),this.activeRouteSubject.next(null),this.currentStepSubject.next(null),this.mapService.removeRoute()}static \u0275fac=function(i){return new(i||n)};static \u0275prov=Vt({token:n,factory:n.\u0275fac})};var r1={term:"",results:[]};function i1(n,r){let i=r?.injector??Re(Ho),l=new Ba(1),d=Gn(()=>{let a;try{a=n()}catch(E){qo(()=>l.error(E));return}qo(()=>l.next(a))},{injector:i,manualCleanup:!0});return i.get(ea).onDestroy(()=>{d.destroy(),l.complete()}),l.asObservable()}function vo(n,r){let l=!r?.manualCleanup?r?.injector?.get(ea)??Re(ea):null,d=TG(r?.equal),a;r?.requireSync?a=ln({kind:0},{equal:d}):a=ln({kind:1,value:r?.initialValue},{equal:d});let E,L=n.subscribe({next:N=>a.set({kind:1,value:N}),error:N=>{a.set({kind:2,error:N}),E?.()},complete:()=>{E?.()}});if(r?.requireSync&&a().kind===0)throw new Zt(601,!1);return E=l?.onDestroy(L.unsubscribe.bind(L)),Qt(()=>{let N=a();switch(N.kind){case 1:return N.value;case 2:throw N.error;case 0:throw new Zt(601,!1)}},{equal:r?.equal})}function TG(n=Object.is){return(r,i)=>r.kind===1&&i.kind===1&&n(r.value,i.value)}var gi=class n{loadedDataService=Re(ci);homePlaces=ln([]);showCategoryFilters=ln(!0);showCityFilter=ln(!0);defaultToMap=ln(!1);activeView=ls(()=>this.defaultToMap()?"map":"grid");inputValue=ln("");selectedInstitution=ln("");hideDeals=ln(!1);cardWidth=ln(void 0);rowsPerPage=ln(2);initialInstitutionId=ln("");showDealLabels=ln(!1);lastListedPlaces=ln([]);categoryFiltersData=vo(this.loadedDataService.getInstitution().pipe(En(r=>{let i=r.properties;if(i){let l=i.filter(d=>"childPlaces"in d&&d.childPlaces!==void 0).map(d=>({placeData:"childPlaces"in d?d.childPlaces:[],name:d.title}));return l.splice(1,0,{name:"All",placeData:[]}),l}return[]})),{initialValue:[]});selectedFilter=ls({source:this.categoryFiltersData,computation:(r,i)=>{let l=r.map(a=>a.name),d=i?.value;return d&&l.includes(d)?d:r[0]?.name??""}});selectedCity=ls(()=>{let r=this.selectedInstitution(),i=this.loadedDataService.cityFilterOptions();return i.find(d=>d.institutionId===r)||i.length>0?i[0]:void 0});filterId=Qt(()=>{let r=this.selectedCity();return r?r.filterId:this.initialInstitutionId()});currentPageIndex=ls({source:this.selectedFilter,computation:(r,i)=>r!==i?.source?1:i?.value??1});lastCardSelected=new _r;userAction=new _r;lastSearchData=ln(r1);static \u0275fac=function(i){return new(i||n)};static \u0275prov=Vt({token:n,factory:n.\u0275fac})};var RR={fas:{},fak:{}},_S=[];function OR(n){Object.keys(n).forEach(function(r){if(r!=="prefix"){var i=n[r],l=i.icon[2];l.forEach(function(d){typeof d=="string"&&(RR[i.prefix][d]=i)}),RR[i.prefix][i.iconName]=i,_S.push(i)}})}OR(dC);OR(vS);var Py=TI(aC());var o1=class n{destroy$=new _r;apiKey=dr("");institutionId=dr("");initialData=dr("");showCategoryFilters=dr(!0,{transform:r=>typeof r=="string"?r==="true":r});showCityFilter=dr(!0,{transform:r=>typeof r=="string"?r==="true":r});defaultToMap=dr(!1,{transform:r=>typeof r=="string"?r==="true":r});inheritFontFamily=dr(!1,{transform:r=>typeof r=="string"?r==="true":r});hideDeals=dr(!1,{transform:this.transformToBoolean});showDealLabels=dr(!1,{transform:this.transformToBoolean});cardWidth=dr(void 0,{transform:r=>{if(!(r==null||r==="")){if(typeof r=="string"){let i=Number.parseInt(r,10);return Number.isNaN(i)||i<=0?void 0:i}return typeof r=="number"&&r<=0?void 0:r}}});rowsPerPage=dr(2,{transform:r=>{if(typeof r=="string"){let i=Number.parseInt(r,10);return Number.isNaN(i)||i<=0?2:Math.min(Math.max(i,1),10)}return r<=0?2:Math.min(Math.max(r,1),10)}});cardSelected=_s();userAction=_s();router=Re(Gd);navigatorService=Re(Po);locationStrategy=Re(fc);platformId=Re(Il);logger=Re(jn);sdkService=Re(na);loadedDataService=Re(ci);homeStateService=Re(gi);iconLibrary=Re(uy);isInitialized=!1;isConnected=!1;static instanceCount=0;static hasBeenConnected=!1;constructor(){this.loadIcons(),Gn(()=>{let r=this.apiKey();r&&r.trim()!==""&&!this.sdkService.isInitialized()&&(this.logger.log("\u{1F511} Initializing SDK with provided API key"),this.sdkService.initialize(r.trim()),this.loadData())}),Gn(()=>{this.homeStateService.initialInstitutionId.set(this.institutionId())}),Gn(()=>{let r=this.showDealLabels();this.homeStateService.showDealLabels.set(r)}),Gn(()=>{this.homeStateService.hideDeals.set(this.hideDeals())}),Gn(()=>{this.homeStateService.cardWidth.set(this.cardWidth())}),Gn(()=>{this.homeStateService.rowsPerPage.set(this.rowsPerPage())}),Gn(()=>{let r=this.initialData();r&&r.trim()!==""&&this.processInitialData(r)}),Gn(()=>{this.homeStateService.showCategoryFilters.set(this.showCategoryFilters())}),Gn(()=>{this.homeStateService.showCityFilter.set(this.showCityFilter())}),Gn(()=>{let r=this.defaultToMap();this.logger.log("====> defaultToMap input",r),this.homeStateService.defaultToMap.set(r)}),Gn(()=>{let r=this.institutionId();r&&r.trim()!==""&&this.updateInstitution(r)}),this.homeStateService.lastCardSelected.pipe(os(this.destroy$)).subscribe(r=>{this.cardSelected.emit(r),this.logger.log("====> cardSelected",r)}),this.homeStateService.userAction.pipe(os(this.destroy$)).subscribe(r=>{this.userAction.emit(r),this.logger.log("====> userAction",r)})}ngOnInit(){pc(this.platformId)?this.handleInstanceTracking():this.logger.log("\u{1F5A5}\uFE0F Componente inicializado en servidor (SSR)")}loadIcons(){this.iconLibrary.addIcons(..._S)}loadData(){this.loadPlaces(),this.loadConfiguration(),this.loadInstitution()}async loadCityFilterOptions(r){this.loadedDataService.cityFilterOptions.set(r);let i=r[0];i&&this.homeStateService.selectedInstitution.set(i.institutionId);let l=r.filter(d=>d.type==="parent-place");Promise.all(l.map(async d=>{let a=async()=>{let L=await this.sdkService.getPlaceDetail(d.parentPlaceId);this.loadedDataService.updatePotentialParentPlaces(L)},E=async()=>{let L=await this.sdkService.getSubPlaces(d.parentPlaceId);this.loadedDataService.updateAvailablePlaces(L)};await Promise.all([a(),E()])}))}transformToBoolean(r){return typeof r=="string"?r==="true":r}processInitialData(r){try{let i=JSON.parse(r);if(i.availablePlaces){let d=i.availablePlaces.map(a=>new Py.LzPlace(a)).filter(a=>a.generalCategory!=="transport"&&!a.hidePlace);this.loadedDataService.updateAvailablePlaces(d),this.logger.log(`\u2705 Successfully loaded ${d.length} places from initial data`)}if(i.institutions){let d=i.institutions.map(a=>new Py.Institution(a)).find(a=>a.lazarilloId===this.institutionId());d?this.loadedDataService.setInstitution(d):this.logger.log(`\u274C Institution not found for id ${this.institutionId()}`)}}catch(i){this.logger.log("\u274C Error processing initial data",i),this.logger.log(`\u274C Data: ${r}`)}}async loadPlaces(){let r=pc(this.platformId)?"Browser":"Server";try{this.logger.log(`\u{1F4CD} Loading initial places data on ${r}...`);let i=await this.sdkService.getAvailablePlaces(),l=i.filter(d=>d.generalCategory!=="transport"&&!d.hidePlace);this.loadedDataService.updateAvailablePlaces(l),this.logger.log(`\u2705 Successfully loaded ${i.length} places on ${r}`)}catch(i){this.logger.log(`\u274C Error loading initial places data on ${r}:`,i)}}async loadConfiguration(){try{let r=await this.sdkService.getConfiguration();this.loadedDataService.setConfiguration(r);let i=r.cityOptions||[];this.loadCityFilterOptions(i),this.logger.log("\u2705 Successfully loaded configuration",r)}catch(r){this.logger.log("\u274C Error loading initial configuration",r)}}async loadInstitution(){try{let r=await this.sdkService.getInstitutions(),i=r.find(l=>l.lazarilloId===this.institutionId());this.loadedDataService.setInstitutions(r),i?(this.loadedDataService.setInstitution(i),this.logger.log("\u2705 Successfully loaded institution",i)):this.logger.log("\u274C Institution not found")}catch(r){this.logger.log("\u274C Error loading institution data",r)}}updateInstitution(r){let i=this.initialData();if(i&&i.trim()!==""){let l=JSON.parse(i);if(l.institutions){let d=l.institutions.map(E=>{try{return new Py.Institution(E)}catch(L){this.logger.logWarning("\u274C Error parsing institution",L);return}}).filter(E=>E!==void 0),a=d.find(E=>E.lazarilloId===r);if(this.loadedDataService.setInstitutions(d),a){this.loadedDataService.setInstitution(a),this.logger.log("\u2705 Successfully updated institution",a);return}}}this.loadInstitution()}handleInstanceTracking(){n.instanceCount++;let r=this.checkForExistingRouterContent(),i=this.router.url;n.hasBeenConnected||r||i!=="/"&&n.instanceCount===1?(this.logger.log("\u{1F504} Detectada reconexi\xF3n del web component"),this.logger.log(` - Instancia #${n.instanceCount}`),this.logger.log(` - URL del router: ${i}`),this.logger.log(` - Contenido en router outlet: ${r}`),this.handleReconnection()):this.logger.log(`\u{1F680} Primera conexi\xF3n del web component (instancia #${n.instanceCount})`),n.hasBeenConnected=!0}checkForExistingRouterContent(){try{let r=document.querySelector("router-outlet");return r?r.children.length>0:!1}catch{return!1}}ngAfterViewInit(){this.isConnected=!0,this.scheduleRouterInitialization()}ngOnDestroy(){this.isConnected=!1,this.destroy$.next(),this.destroy$.complete()}scheduleRouterInitialization(){pc(this.platformId)?requestAnimationFrame(()=>{this.initializeRouter()}):setTimeout(()=>{this.initializeRouter()},0)}initializeRouter(){if(this.isInitialized&&this.isConnected)return;this.locationStrategy.setInitialPath("/");let r=this.router.url,i=this.router.routerState.root.firstChild;r==="/"&&!i?this.router.navigateByUrl("/").then(()=>{this.isInitialized=!0}).catch(l=>{console.error("Error en navegaci\xF3n inicial:",l),this.isInitialized=!0}):this.isInitialized=!0}handleReconnection(){this.logger.log("\u{1F504} Procesando reconexi\xF3n del web component");let r=pc(this.platformId)?10:50;setTimeout(()=>{this.checkAndFixRouterSync()},r)}checkAndFixRouterSync(){if(!pc(this.platformId)){this.logger.log("\u2139\uFE0F Saltando verificaci\xF3n de sincronizaci\xF3n en servidor");return}let r=this.locationStrategy.getCurrentPath()||"/",i=this.router.url,l=this.router.routerState.root.firstChild,d=this.checkForExistingRouterContent();this.logger.log("\u{1F50D} Verificando sincronizaci\xF3n del router:"),this.logger.log(` - Path interno: "${r}"`),this.logger.log(` - Router URL: "${i}"`),this.logger.log(` - Tiene ruta activa: ${!!l}`),this.logger.log(` - Contenido en router outlet: ${d}`),r==="/"&&i!=="/"||r==="/"&&!l&&d||r==="/"&&i==="/"&&d&&!l?(this.logger.log("\u26A0\uFE0F Desincronizaci\xF3n detectada - aplicando correcci\xF3n"),this.performGentleReset()):this.logger.log("\u2705 Router sincronizado correctamente")}performGentleReset(){this.logger.log("\u{1F504} Realizando reset suave del router"),this.router.navigateByUrl("/",{replaceUrl:!0}).then(()=>{this.logger.log("\u2705 Navegaci\xF3n correctiva completada")}).catch(r=>{console.error("\u274C Error en navegaci\xF3n correctiva:",r)})}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-root"]],inputs:{apiKey:[1,"apiKey"],institutionId:[1,"institutionId"],initialData:[1,"initialData"],showCategoryFilters:[1,"showCategoryFilters"],showCityFilter:[1,"showCityFilter"],defaultToMap:[1,"defaultToMap"],inheritFontFamily:[1,"inheritFontFamily"],hideDeals:[1,"hideDeals"],showDealLabels:[1,"showDealLabels"],cardWidth:[1,"cardWidth"],rowsPerPage:[1,"rowsPerPage"]},outputs:{cardSelected:"cardSelected",userAction:"userAction"},features:[Q0([Po,gi,Zo,Yn,_c,Hd])],decls:4,vars:2,consts:[[1,"named-container"],[1,"app-container"],[1,"app-content"]],template:function(i,l){i&1&&(it(0,"div",0)(1,"div",1)(2,"div",2),Mt(3,"router-outlet"),lt()()()),i&2&&(at(),li("inherit-font-family",l.inheritFontFamily()))},dependencies:[T_,gf],styles:["*[_ngcontent-%COMP%]{margin:0;padding:0}.named-container[_ngcontent-%COMP%]{container-name:mapvx-container;container-type:inline-size;width:100%}.app-container[_ngcontent-%COMP%]{display:flex;padding:0;flex-direction:column;justify-content:center;align-items:flex-start;gap:22px;background:var(--definitions-colors-background-50);font-family:Open Sans,sans-serif}.app-container.inherit-font-family[_ngcontent-%COMP%]{font-family:inherit}.app-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:19px}.app-header[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{color:var(--definitions-colors-text-900);font:var(--definitions-textFonts-desktop-h1);font-family:inherit}.app-header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--definitions-colors-text-800);font:var(--definitions-textFonts-desktop-sub-1);font-family:inherit}.main-navigation[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:center;flex-wrap:wrap}.nav-button[_ngcontent-%COMP%]{background:#fff3;border:1px solid rgba(255,255,255,.3);color:#fff;padding:.5rem 1rem;border-radius:4px;cursor:pointer;font-size:.9rem;transition:all .2s ease}.nav-button[_ngcontent-%COMP%]:hover{background:#ffffff4d;transform:translateY(-1px)}.nav-button[_ngcontent-%COMP%]:active{transform:translateY(0)}.route-debug[_ngcontent-%COMP%]{margin-top:.5rem;text-align:center}.route-debug[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{color:#fffc;font-size:.8rem;font-family:Courier New,monospace;background:#0000001a;padding:.25rem .5rem;border-radius:4px}.app-content[_ngcontent-%COMP%]{width:100%}"]})};var s1=class n extends fc{_path="";_baseHref;_popStateListeners=[];constructor(){super(),this._baseHref=this.getBaseHref()}path(){return this._path}prepareExternalUrl(r){return this._baseHref+"#"+r}pushState(r,i,l,d){this._updatePath(r,l,d)}replaceState(r,i,l,d){this._updatePath(r,l,d)}forward(){}back(){}getState(){return null}historyGo(r){}onPopState(r){this._popStateListeners.push(r)}getBaseHref(){return typeof document<"u"?document.querySelector("base")?.href??"/":"/"}_updatePath(r,i,l){this._path=i+(l?"?"+l:""),this._notifyPopState(r,i)}_notifyPopState(r,i){let l={type:"popstate",state:r,url:i,pop:!0};this._popStateListeners.forEach(d=>{try{d(l)}catch(a){console.error("Error in popstate listener:",a)}})}getCurrentPath(){return this._path}setInitialPath(r){this._path=r}static \u0275fac=function(i){return new(i||n)};static \u0275prov=Vt({token:n,factory:n.\u0275fac,providedIn:"root"})};var MG=["categoryFilters"];function PG(n,r){if(n&1){let i=Vr();it(0,"button",14),an("click",function(){br(i);let d=Yt();return wr(d.onClearInput())}),Mt(1,"fa-icon",6),lt()}if(n&2){let i=Yt();at(),Ft("icon",i.faXmark)}}function AG(n,r){if(n&1&&Mt(0,"fa-icon",6),n&2){let i=Yt(2);Ft("icon",i.faCaretUp)}}function kG(n,r){if(n&1&&Mt(0,"fa-icon",6),n&2){let i=Yt(2);Ft("icon",i.faCaretDown)}}function RG(n,r){if(n&1){let i=Vr();it(0,"button",21),an("click",function(){let d=br(i).$implicit,a=Yt(3);return wr(a.onCitySelect(d))}),on(1),lt()}if(n&2){let i=r.$implicit;at(),eo(" ",i.name," ")}}function OG(n,r){if(n&1&&(it(0,"div",19),Ji(1,RG,2,1,"button",20,af),lt()),n&2){let i=Yt(2);at(),Qi(i.citiesOptions())}}function LG(n,r){if(n&1){let i=Vr();it(0,"div",9)(1,"button",15),an("click",function(){br(i);let d=Yt();return wr(d.onCityFilterClick())}),Mt(2,"fa-icon",6),lt(),it(3,"button",16),an("click",function(){br(i);let d=Yt();return wr(d.onCityFilterClick())}),it(4,"span",17),on(5),lt(),it(6,"div",18),Fn(7,AG,1,1,"fa-icon",6)(8,kG,1,1,"fa-icon",6),lt()(),Fn(9,OG,3,0,"div",19),lt()}if(n&2){let i,l=Yt();at(),li("active",l.isCityDropdownOpen()),at(),Ft("icon",l.faFilter),at(3),Mo((i=l.selectedCity())==null?null:i.name),at(2),Nn(l.isCityDropdownOpen()?7:8),at(2),Nn(l.isCityDropdownOpen()?9:-1)}}var a1=class n{logger=Re(jn);stateService=Re(gi);mapService=Re(xi);navigatorService=Re(Po);loadedDataService=Re(ci);iconLibrary=Re(Yn);categoryFilters;activeView=Qt(()=>this.stateService.activeView());showCityFilter=Qt(()=>this.stateService.showCityFilter()&&this.citiesOptions().length>0);inputValue=Qt(()=>this.stateService.inputValue());citiesOptions=Qt(()=>this.loadedDataService.cityFilterOptions());selectedCity=Qt(()=>this.stateService.selectedCity());isCityDropdownOpen=ln(!1);mapReady=vo(this.mapService.mapReady,{initialValue:!1});faGrid2=this.iconLibrary.getIconDefinition("fas","grid-2");faMagnifyingGlass=this.iconLibrary.getIconDefinition("fas","magnifying-glass");faMapLocationDot=this.iconLibrary.getIconDefinition("fas","map-location-dot");faXmark=this.iconLibrary.getIconDefinition("fas","xmark");faCaretDown=this.iconLibrary.getIconDefinition("fas","caret-down");faCaretUp=this.iconLibrary.getIconDefinition("fas","caret-up");faFilter=this.iconLibrary.getIconDefinition("fas","filter");constructor(){Gn(()=>{if(this.stateService.activeView()==="map"&&this.mapReady()){let r=this.stateService.lastListedPlaces(),i=r.map(d=>d.inFloors?.[0]),l=this.getMostFrequentValue(i);l!==void 0&&this.mapService.updateFloor(l),setTimeout(()=>{this.mapService.fitCoordinates(r.map(d=>d.position),{padding:{top:100,left:100,right:100,bottom:100}})},100)}})}ngOnInit(){this.stateService.inputValue()!==""&&this.navigatorService.navigateToSearchView()}ngAfterViewInit(){this.readUrlParams()}readUrlParams(){let r=new URLSearchParams(location.search),i=r.get("search");if(i){this.stateService.inputValue.set(i),setTimeout(()=>{this.navigatorService.navigateToSearchView()},100);return}let l=r.get("tenant");if(l){this.navigatorService.navigateToProfile(l);return}let d=r.get("destination");d&&this.navigatorService.navigateToRoute(d)}onGridClick(){this.stateService.activeView.set("grid")}onMapClick(){this.stateService.activeView.set("map")}onInputChange(r){let i=r.target;this.stateService.inputValue.set(i.value),this.navigatorService.navigateToSearchView()}onClearInput(){this.stateService.inputValue.set(""),this.stateService.userAction.next({type:"return-to-home",data:{filter:this.stateService.selectedFilter()}}),this.navigatorService.navigateToHome()}onCityFilterClick(){this.isCityDropdownOpen.update(r=>!r)}onCitySelect(r){if(this.stateService.selectedInstitution.set(r.institutionId),this.stateService.selectedCity.set(r),this.isCityDropdownOpen.set(!1),this.loadedDataService.updateInstitution(r.institutionId),r.type==="institution")this.mapService.removeParentPlace(),this.loadedDataService.parentPlace.set(void 0);else{let l=this.loadedDataService.potentialParentPlaces().find(d=>d.lazarilloId===r.parentPlaceId);l?(this.mapService.setParentPlace(l),this.loadedDataService.parentPlace.set(l)):this.mapService.removeParentPlace()}}getMostFrequentValue(r){if(r.length===0)return;let i=new Map,l=0,d;for(let a of r){if(a==null)continue;let E=(i.get(a)||0)+1;i.set(a,E),E>l&&(l=E,d=a)}return d}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-home-screen"]],viewQuery:function(i,l){if(i&1&&Bg(MG,5),i&2){let d;jg(d=Vg())&&(l.categoryFilters=d.first)}},decls:23,vars:12,consts:[[1,"home-screen"],[1,"sub-navigation"],[1,"sub-nav-top"],[1,"search-section"],[1,"search-bar"],[1,"search-icon"],[3,"icon"],["name","search input","type","text","placeholder","Search...",1,"search-input",3,"input","value"],[1,"search-clear"],[1,"city-filter-container"],[1,"view-toggle"],[1,"view-btn",3,"click"],[1,"view-icon"],[1,"sub-content"],[1,"search-clear",3,"click"],[1,"mobile-city-filter",3,"click"],[1,"desktop-city-filter",3,"click"],[1,"city-text"],[1,"dropdown-icon"],[1,"city-dropdown"],[1,"city-option"],[1,"city-option",3,"click"]],template:function(i,l){i&1&&(it(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5),Mt(6,"fa-icon",6),lt(),it(7,"input",7),an("input",function(a){return l.onInputChange(a)}),lt(),Fn(8,PG,2,1,"button",8),lt(),Fn(9,LG,10,6,"div",9),lt(),it(10,"div",10)(11,"button",11),an("click",function(){return l.onGridClick()}),it(12,"div",12),Mt(13,"fa-icon",6),lt(),it(14,"span"),on(15,"Grid View"),lt()(),it(16,"button",11),an("click",function(){return l.onMapClick()}),it(17,"div",12),Mt(18,"fa-icon",6),lt(),it(19,"span"),on(20,"Map View"),lt()()()()(),it(21,"div",13),Mt(22,"router-outlet"),lt()()),i&2&&(at(4),li("active",l.inputValue()!==""),at(2),Ft("icon",l.faMagnifyingGlass),at(),Ft("value",l.inputValue()),at(),Nn(l.inputValue()!==""?8:-1),at(),Nn(l.showCityFilter()?9:-1),at(2),li("active",l.activeView()==="grid"),at(2),Ft("icon",l.faGrid2),at(3),li("active",l.activeView()==="map"),at(2),Ft("icon",l.faMapLocationDot))},dependencies:[Dr,gf],styles:["*[_ngcontent-%COMP%]{margin:0;padding:0;border:0}.home-screen[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:36px}.sub-navigation[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2.25rem;margin-bottom:1.5rem}.sub-nav-top[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:40px}@container mapvx-container (width <= 640px){.sub-nav-top[_ngcontent-%COMP%]{gap:13px}}.search-section[_ngcontent-%COMP%]{display:flex;gap:24px;align-items:center}@container mapvx-container (width <= 640px){.search-section[_ngcontent-%COMP%]{gap:11px}}.search-bar[_ngcontent-%COMP%]{background:var(--definitions-colors-background-white);border-bottom:1px solid var(--definitions-colors-primary-black);display:flex;width:342px;padding:12px 20px;align-items:center;gap:10px}@container mapvx-container (width <= 960px){.search-bar[_ngcontent-%COMP%]{width:150px}}@container mapvx-container (width <= 640px){.search-bar[_ngcontent-%COMP%]{width:110px}}.search-bar.active[_ngcontent-%COMP%]{border-bottom:1px solid var(--definitions-colors-secondary-orange)}.search-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-text-800);display:flex;align-items:center;font-size:20px}.search-bar.active[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-secondary-orange)}.search-clear[_ngcontent-%COMP%]{color:var(--definitions-colors-secondary-orange);display:flex;align-items:center;font-size:20px;border:none;background:none}.search-clear[_ngcontent-%COMP%]:hover{cursor:pointer}.search-input[_ngcontent-%COMP%]{border:none;outline:none;background:transparent;font:var(--definitions-textFonts-desktop-button-4);font-family:inherit;color:var(--definitions-colors-text-800);width:100%}.search-input[_ngcontent-%COMP%]::placeholder{color:var(--definitions-colors-text-800)}.city-filter-container[_ngcontent-%COMP%]{position:relative}.desktop-city-filter[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.875rem 1rem;height:45px;box-sizing:border-box;cursor:pointer;border:none;background:none}@container mapvx-container (width <= 640px){.desktop-city-filter[_ngcontent-%COMP%]{display:none}}.city-text[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-button-5);font-family:inherit;color:var(--definitions-colors-text-900);white-space:nowrap}.dropdown-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-text-900);display:flex;align-items:center;font-size:12px}.mobile-city-filter[_ngcontent-%COMP%]{display:none}@container mapvx-container (width <= 640px){.mobile-city-filter[_ngcontent-%COMP%]{display:flex;height:45px;width:52px;padding:0;justify-content:center;align-items:center;gap:10px;cursor:pointer;border:none;background:var(--definitions-colors-background-white);color:var(--definitions-colors-primary-black);font-size:20px}.mobile-city-filter.active[_ngcontent-%COMP%]{background:var(--definitions-colors-primary-black);color:var(--definitions-colors-black_white-50)}}.city-dropdown[_ngcontent-%COMP%]{position:absolute;top:100%;left:0;right:0;background:var(--definitions-colors-background-white);border:1px solid var(--definitions-colors-primary-300);z-index:1;padding:8px 0;min-width:111px}.city-option[_ngcontent-%COMP%]{display:block;width:100%;padding:12px 16px;border:none;background:none;text-align:center;cursor:pointer;font:var(--definitions-textFonts-desktop-input-2);font-family:inherit;color:var(--definitions-colors-text-900);transition:background-color .2s ease}.city-option[_ngcontent-%COMP%]:not(:last-child){border-bottom:1px solid var(--definitions-colors-primary-100)}.city-option[_ngcontent-%COMP%]:hover{background:var(--definitions-colors-background-50)}.view-toggle[_ngcontent-%COMP%]{display:flex;align-items:center}.view-btn[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.625rem;padding:10px 28px;border:none;background:var(--definitions-colors-background-50);cursor:pointer;font:var(--definitions-textFonts-desktop-button-2);font-family:inherit;color:var(--definitions-colors-text-900);white-space:nowrap;transition:all .2s ease;position:relative;border-bottom:1px solid var(--definitions-colors-text-900)}.view-btn.active[_ngcontent-%COMP%]{background:var(--definitions-colors-text-900);color:var(--definitions-colors-text-50)}.view-btn[_ngcontent-%COMP%] .view-icon[_ngcontent-%COMP%]{display:flex;align-items:center;color:currentcolor}@container mapvx-container (width <= 770px){.view-btn[_ngcontent-%COMP%]{padding:10px 0;width:52px;justify-content:center}.view-btn[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:none}}@container mapvx-container (width <= 640px){.view-btn[_ngcontent-%COMP%]{padding:10px 0;width:52px;justify-content:center}.view-btn[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:none}}"],changeDetection:0})};var l1="https://images.ctfassets.net/37yx0l0lf3yk/6eJ4fYG9hQxJ8ayujcebhe/8cf968e7d66df9a8bc75b72b7e7d6432/00002167_BedrockWebsite_TenantCOmingSoon_PlaceholderImage_3840x3840_V2-web.jpg?q=80&fm=webp&w=1920";function c1(n){return n.tags?.includes("deals")||n.tags?.includes("events")}var FG=()=>({rotate:42});function NG(n,r){if(n&1&&Mt(0,"fa-icon",3),n&2){let i=Yt();Ft("icon",i.faCircleNotch)("transform",Cu(2,FG))}}function zG(n,r){n&1&&(it(0,"div",4),on(1,"Deals + Events"),lt())}var u1=class n{iconLibrary=Re(Yn);navigatorService=Re(Po);homeStateService=Re(gi);place=dr.required();hasDealsOrEvents=Qt(()=>this.place().banners.some(c1));hideDeals=Qt(()=>this.homeStateService.hideDeals());showDealLabels=Qt(()=>this.homeStateService.showDealLabels());imageSrc=Qt(()=>this.place().images[0]||l1);isImageLoading=ln(!0);faCircleNotch=this.iconLibrary.getIconDefinition("fas","circle-notch");constructor(){Gn(()=>{this.imageSrc()&&this.startImageLoading()})}navigateToProfile(){let r=this.place().lazarilloId;this.homeStateService.lastCardSelected.next(r),this.navigatorService.navigateToProfile(r)}startImageLoading(){this.isImageLoading.set(!0)}endImageLoading(){this.isImageLoading.set(!1)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-location-card"]],inputs:{place:[1,"place"]},decls:12,vars:8,consts:[[1,"location-card",3,"click"],[1,"card-image"],[3,"load","error","src","alt"],[1,"loading-icon",3,"icon","transform"],[1,"card-deals-or-events"],[1,"card-content"],[1,"location-name"],[1,"location-address"],[1,"location-category"]],template:function(i,l){i&1&&(it(0,"button",0),an("click",function(){return l.navigateToProfile()}),it(1,"div",1)(2,"img",2),an("load",function(){return l.endImageLoading()})("error",function(){return l.endImageLoading()}),lt(),Fn(3,NG,1,3,"fa-icon",3)(4,zG,2,0,"div",4),lt(),it(5,"div",5)(6,"h3",6),on(7),lt(),it(8,"p",7),on(9),lt(),it(10,"span",8),on(11),lt()()()),i&2&&(at(),li("loading",l.isImageLoading()),at(),Ft("src",l.imageSrc(),rf)("alt",l.place().title),at(),Nn(l.isImageLoading()?3:l.hasDealsOrEvents()&&!l.hideDeals()&&l.showDealLabels()?4:-1),at(4),Mo(l.place().title),at(2),Mo(l.place().address),at(2),Mo(l.place().localizedCategory))},dependencies:[Dr],styles:["*[_ngcontent-%COMP%]{margin:0;padding:0}.location-card[_ngcontent-%COMP%]{display:flex;padding:5px 5px 10px;flex-direction:column;align-items:flex-start;gap:12px;background:var(--definitions-colors-background-50);border:none;width:100%}.location-card[_ngcontent-%COMP%]:hover{cursor:pointer}.card-image[_ngcontent-%COMP%]{width:100%;overflow:hidden;position:relative;aspect-ratio:1/1}@container mapvx-container (width <= 640px){.card-image[_ngcontent-%COMP%]{min-width:160px;min-height:160px}}.card-image[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover;display:block;transition:transform .4s ease}.card-image[_ngcontent-%COMP%] img[_ngcontent-%COMP%]:hover{transform:scale(1.2)}.card-image[_ngcontent-%COMP%] .card-deals-or-events[_ngcontent-%COMP%]{position:absolute;bottom:0;left:0;width:100%;background-color:var(--definitions-colors-secondary-orange);color:var(--definitions-colors-text-white);display:flex;padding:5px;justify-content:center;align-items:center;gap:8.462px;flex-shrink:0;font:var(--definitions-textFonts-desktop-body-4);font-family:inherit}.card-image.loading[_ngcontent-%COMP%]{background-color:var(--definitions-colors-primary-300);display:flex;justify-content:center;align-items:center}.card-image.loading[_ngcontent-%COMP%] .loading-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-primary-600);font-size:100px}.card-image.loading[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{display:none}.card-content[_ngcontent-%COMP%]{display:flex;width:100%;flex-direction:column;align-items:flex-start;gap:8px}@container mapvx-container (width <= 640px){.card-content[_ngcontent-%COMP%]{min-width:160px}}.location-name[_ngcontent-%COMP%]{color:var(--definitions-colors-text-black);font:var(--definitions-textFonts-desktop-body-3);font-family:inherit;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;text-align:start}.location-address[_ngcontent-%COMP%]{color:var(--definitions-colors-text-grey);font:var(--definitions-textFonts-desktop-body-5);font-family:inherit;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;text-align:start}.location-category[_ngcontent-%COMP%]{color:var(--definitions-colors-text-light-grey);font:var(--definitions-textFonts-desktop-body-5);font-family:inherit;display:none}"],changeDetection:0})};var BG=["cardContainer"],jG=["*"];function VG(n,r){if(n&1&&Mt(0,"app-location-card",3),n&2){let i=r.$implicit;Ft("place",i)}}function UG(n,r){n&1&&xu(0)}function $G(n,r){if(n&1){let i=Vr();it(0,"button",7),an("click",function(){br(i);let d=Yt(3);return wr(d.previousPage())}),Mt(1,"fa-icon",8),lt()}if(n&2){let i=Yt(3);at(),Ft("icon",i.faChevronLeft)}}function GG(n,r){if(n&1&&Fn(0,$G,2,1,"button",6),n&2){let i=Yt().$implicit,l=Yt();Nn(i<l.currentPageIndex()?0:-1)}}function HG(n,r){n&1&&(it(0,"button",9),on(1,"..."),lt())}function qG(n,r){if(n&1){let i=Vr();it(0,"button",11),an("click",function(){br(i);let d=Yt(3);return wr(d.nextPage())}),Mt(1,"fa-icon",8),lt()}if(n&2){let i=Yt(3);at(),Ft("icon",i.faChevronRight)}}function WG(n,r){if(n&1&&(Fn(0,HG,2,0,"button",9),Fn(1,qG,2,1,"button",10)),n&2){let i=Yt().$implicit,l=Yt();Nn(i<l.totalPages()?0:-1),at(),Nn(i>l.currentPageIndex()?1:-1)}}function ZG(n,r){if(n&1){let i=Vr();Fn(0,GG,1,1),it(1,"button",5),an("click",function(){let d=br(i).$implicit,a=Yt();return wr(a.goToPage(d))}),on(2),lt(),Fn(3,WG,2,2)}if(n&2){let i=r.$implicit,l=r.$index,d=r.$count,a=Yt();Nn(l===0?0:-1),at(),li("active",a.currentPageIndex()===i),at(),eo(" ",i," "),at(),Nn(l===d-1?3:-1)}}var fm=class n{logger=Re(jn);stateService=Re(gi);iconLibrary=Re(Yn);cardContainer=r_("cardContainer");faChevronLeft=this.iconLibrary.getIconDefinition("fas","chevron-left");faChevronRight=this.iconLibrary.getIconDefinition("fas","chevron-right");places=dr.required();itemsPerPage=Qt(()=>this.calculateItemsPerPage(this.showMap(),this.cardContainer(),this.stateService.cardWidth(),this.stateService.rowsPerPage()));currentPageIndex=Qt(()=>this.stateService.currentPageIndex());totalPages=Qt(()=>Math.ceil(this.places().length/this.itemsPerPage()));cardContainerStyles=Qt(()=>{let r=this.stateService.cardWidth();return r?{"--card-width":`${r}`}:{}});pages=Qt(()=>{let r=this.totalPages();switch(r){case 0:return[];case 1:return[1];case 2:return[1,2];default:{let l=this.currentPageIndex()-1;return l<1&&(l=1),l+2>r&&(l=r-2),Array.from({length:3},(d,a)=>a+l)}}});currentPagePlaces=Qt(()=>{let r=this.places(),i=this.itemsPerPage(),l=this.currentPageIndex();return r.slice((l-1)*i,l*i)});showMap=Qt(()=>this.stateService.activeView()==="map");calculateItemsPerPage(r,i,l,d=2){try{if(i){let a=globalThis.getComputedStyle(i.nativeElement),E=l??Number.parseInt(a.getPropertyValue("--card-width")||"0"),L=Number.parseInt(a.getPropertyValue("--card-gap")||"0"),N=E+L;if(N<=0)return d*5;let Z=i.nativeElement.clientWidth,X=Math.floor((Z+L)/N)*d;return Number.isFinite(X)&&X>0?X:d*5}return d*5}catch(a){return this.logger.logError("Error calculating items per page",a),d*5}}nextPage(){let r=this.currentPageIndex(),i=this.totalPages();r<i&&this.stateService.currentPageIndex.set(r+1)}previousPage(){let r=this.currentPageIndex();r>1&&this.stateService.currentPageIndex.set(r-1)}goToPage(r){this.stateService.currentPageIndex.set(r)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-paginator"]],viewQuery:function(i,l){i&1&&Ug(l.cardContainer,BG,5),i&2&&$g()},inputs:{places:[1,"places"]},ngContentSelectors:jG,decls:9,vars:6,consts:[["cardContainer",""],[1,"paginator"],[1,"paginator-places",3,"ngStyle"],[3,"place"],[1,"paginator-buttons"],[1,"paginator-button",3,"click"],[1,"previous-button"],[1,"previous-button",3,"click"],[3,"icon"],[1,"paginator-button","ellipsis"],[1,"next-button"],[1,"next-button",3,"click"]],template:function(i,l){i&1&&(wu(),it(0,"div",1)(1,"div",2,0),Ji(3,VG,1,1,"app-location-card",3,ta,!1,UG,1,0),lt(),it(6,"div",4),Ji(7,ZG,4,5,null,null,af),lt()()),i&2&&(li("with-map",l.showMap()),at(),li("with-map",l.showMap()),Ft("ngStyle",l.cardContainerStyles()),at(2),Qi(l.currentPagePlaces()),at(4),Qi(l.pages()))},dependencies:[zd,Gx,u1,Dr],styles:['.paginator[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:36px}.paginator.with-map[_ngcontent-%COMP%]{min-height:730px}@container mapvx-container (width <= 1024px){.paginator.with-map[_ngcontent-%COMP%]{min-height:unset}}.paginator-places[_ngcontent-%COMP%]{--card-width: 237;--card-gap: 13;display:grid;grid-template-columns:repeat(auto-fill,minmax(calc(var(--card-width) * 1px),1fr));align-items:flex-start;place-content:flex-start space-around;gap:24px 13px;align-self:stretch}@container mapvx-container (width <= 640px){.paginator-places[_ngcontent-%COMP%]{--card-width: 170}}.paginator-places.with-map[_ngcontent-%COMP%]{gap:16px 8px;flex-shrink:0}@container mapvx-container (width <= 640px){.paginator-places.with-map[_ngcontent-%COMP%]{display:flex;overflow-x:auto}}.paginator-buttons[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;gap:8px;flex-wrap:wrap}.paginator-button[_ngcontent-%COMP%]{color:var(--definitions-colors-text-900);text-align:center;font:var(--definitions-textFonts-desktop-button-1);font-family:inherit;font-feature-settings:"liga" off,"clig" off;letter-spacing:-1px;border:none;background:none}.paginator-button[_ngcontent-%COMP%]:hover{cursor:pointer}.paginator-button.active[_ngcontent-%COMP%]{color:var(--definitions-colors-secondary-orange)}.paginator-button.ellipsis[_ngcontent-%COMP%]:hover{cursor:default}.previous-button[_ngcontent-%COMP%], .next-button[_ngcontent-%COMP%]{color:var(--definitions-colors-text-900);background:none;border:none;font-size:21px}.previous-button[_ngcontent-%COMP%]:hover, .next-button[_ngcontent-%COMP%]:hover{cursor:pointer}'],changeDetection:0})};var d1=class n{onDestroy=new _r;iconLibrary=Re(Yn);mapService=Re(xi);logger=Re(jn);loadedDataService=Re(ci);faCenter=this.iconLibrary.getIconDefinition("fak","center");ngOnDestroy(){this.onDestroy.next(),this.onDestroy.complete()}onClick(){let r=this.mapService.rotation.getValue();this.loadedDataService.getConfiguration().pipe(Ls(1),os(this.onDestroy)).subscribe({next:i=>{this.mapService.updateCamera({center:i.initialCenter,zoom:i.initialZoom,pitch:i.initialPitch??0,bearing:r})},error:i=>{this.logger.logWarning("Error centering map",i)}})}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-center-map-button"]],decls:2,vars:1,consts:[[1,"button",3,"click"],[3,"icon"]],template:function(i,l){i&1&&(it(0,"button",0),an("click",function(){return l.onClick()}),Mt(1,"fa-icon",1),lt()),i&2&&(at(),Ft("icon",l.faCenter))},dependencies:[Dr],styles:[".button[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:40px;border:1px solid var(--definitions-colors-primary-900);background-color:var(--definitions-colors-background-white);box-shadow:var(--definitions-shadows-general)}.button[_ngcontent-%COMP%]:hover{cursor:pointer}.button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:20px;color:var(--definitions-colors-text-black)}"],changeDetection:0})};var YG=n=>({rotate:n}),h1=class n{mapService=Re(xi);iconLibrary=Re(Yn);rotation=vo(this.mapService.rotation.asObservable().pipe(En(r=>360-r)),{initialValue:0});faCompass=this.iconLibrary.getIconDefinition("fak","compass");static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-compass-button"]],decls:2,vars:4,consts:[[1,"button"],[3,"icon","transform"]],template:function(i,l){i&1&&(it(0,"button",0),Mt(1,"fa-icon",1),lt()),i&2&&(at(),Ft("icon",l.faCompass)("transform",Dx(2,YG,l.rotation())))},dependencies:[Dr],styles:[".button[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:40px;border:1px solid var(--definitions-colors-primary-900);background-color:var(--definitions-colors-background-white);box-shadow:var(--definitions-shadows-general)}.button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:20px;color:var(--definitions-colors-text-black)}"],changeDetection:0})};var f1=class n{iconLibrary=Re(Yn);locationService=Re(Hd);logger=Re(jn);markerService=Re(Zo);mapService=Re(xi);locationPermission=ln("prompt");active=Qt(()=>this.locationService.currentlyWatchingLocation());mapReady=vo(this.mapService.mapReady.asObservable(),{initialValue:!1});positionSubscription;bearingSubscription;faLocation=this.iconLibrary.getIconDefinition("fas","location-arrow");constructor(){this.checkLocationPermission(),Gn(()=>{this.mapReady()?this.active()?(this.positionSubscription=this.locationService.currentLocation.asObservable().subscribe({next:r=>{this.logger.log("location",r),r!=null&&(this.markerService.hasCurrentLocationMarker?this.markerService.updateCurrentLocationMarker(r.position):this.markerService.addCurrentLocationMarker(r.position))},error:r=>{this.logger.logWarning("Error updating current location marker position",r)}}),this.bearingSubscription=Xs([this.locationService.currentBearing.asObservable(),this.mapService.rotation.asObservable()]).subscribe({next:([r,i])=>{this.logger.log("bearing",r),this.logger.log("maprotation",i);let d=(r??0)-i;if(this.logger.log("markerRotation",d),this.markerService.hasCurrentLocationMarker){let a=this.markerService.getCurrentLocationMarkerElement();a!=null&&(a.style.transform=`rotate(${d}deg)`)}},error:r=>{this.logger.logWarning("Error updating current location marker rotation",r)}})):(this.positionSubscription?.unsubscribe(),this.bearingSubscription?.unsubscribe(),this.markerService.removeCurrentLocationMarker(),this.positionSubscription=void 0,this.bearingSubscription=void 0):(this.positionSubscription?.unsubscribe(),this.bearingSubscription?.unsubscribe(),this.positionSubscription=void 0,this.bearingSubscription=void 0)})}ngOnDestroy(){this.locationService.temporalStopWatching(),this.positionSubscription?.unsubscribe(),this.bearingSubscription?.unsubscribe(),this.markerService.removeCurrentLocationMarker()}checkLocationPermission(){this.locationService.checkLocationPermission().then(r=>{this.locationPermission.set(r),r==="granted"&&this.active()&&this.locationService.startWatching()}).catch(r=>{this.logger.logWarning("Error checking location permission",r),this.locationPermission.set("denied")})}async onClick(){if(this.active())this.locationService.stopWatching();else switch(this.locationPermission()){case"granted":this.locationService.startWatching();break;case"prompt":await this.requestPermissions();break;case"denied":this.logger.logWarning("Location permission denied");break}}async requestPermissions(){await this.locationService.requestLocationPermission()==="granted"?(this.locationPermission.set("granted"),this.locationService.startWatching()):this.locationPermission.set("denied")}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-location-button"]],decls:2,vars:3,consts:[[1,"button",3,"click"],[3,"icon"]],template:function(i,l){i&1&&(it(0,"button",0),an("click",function(){return l.onClick()}),Mt(1,"fa-icon",1),lt()),i&2&&(li("active",l.active()),at(),Ft("icon",l.faLocation))},dependencies:[Dr],styles:[".button[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:40px;border:1px solid var(--definitions-colors-primary-900);background-color:var(--definitions-colors-background-white);color:var(--definitions-colors-text-black);box-shadow:var(--definitions-shadows-general)}.button[_ngcontent-%COMP%]:hover{cursor:pointer}.button.active[_ngcontent-%COMP%]{background-color:var(--definitions-colors-secondary-blue);color:var(--definitions-colors-text-white);border-color:var(--definitions-colors-secondary-blue)}.button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:18px}"],changeDetection:0})};var p1=class n{mapService=Re(xi);iconLibrary=Re(Yn);faPlus=this.iconLibrary.getIconDefinition("fas","plus");faMinus=this.iconLibrary.getIconDefinition("fas","minus");onZoomIn(){this.mapService.updateZoomLevelOn(1)}onZoomOut(){this.mapService.updateZoomLevelOn(-1)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-zoom-buttons"]],decls:5,vars:2,consts:[[1,"zoom-buttons-container"],[1,"zoom-button","zoom-in",3,"click"],[3,"icon"],[1,"zoom-button","zoom-out",3,"click"]],template:function(i,l){i&1&&(it(0,"div",0)(1,"button",1),an("click",function(){return l.onZoomIn()}),Mt(2,"fa-icon",2),lt(),it(3,"button",3),an("click",function(){return l.onZoomOut()}),Mt(4,"fa-icon",2),lt()()),i&2&&(at(2),Ft("icon",l.faPlus),at(2),Ft("icon",l.faMinus))},dependencies:[Dr],styles:[".zoom-buttons-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;border-radius:40px;border:1px solid var(--definitions-colors-primary-900);background-color:var(--definitions-colors-background-white);box-shadow:var(--definitions-shadows-general)}.zoom-button[_ngcontent-%COMP%]{width:40px;height:40px;border:none;background-color:transparent}.zoom-button[_ngcontent-%COMP%]:hover{cursor:pointer}.zoom-button.zoom-in[_ngcontent-%COMP%]{border-radius:40px 40px 0 0}.zoom-button.zoom-out[_ngcontent-%COMP%]{border-radius:0 0 40px 40px}.zoom-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:20px;color:var(--definitions-colors-text-black)}"],changeDetection:0})};var m1=class n{static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-buttons-container"]],decls:5,vars:0,consts:[[1,"buttons-container-wrapper"]],template:function(i,l){i&1&&(it(0,"div",0),Mt(1,"app-location-button")(2,"app-compass-button")(3,"app-center-map-button")(4,"app-zoom-buttons"),lt())},dependencies:[h1,d1,p1,f1],styles:[".buttons-container-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:20px}"],changeDetection:0})};function KG(n,r){if(n&1){let i=Vr();it(0,"button",4),an("click",function(){let d=br(i).$implicit,a=Yt(3);return wr(a.selectFloor(d))}),on(1),lt()}if(n&2){let i=r.$implicit;at(),eo(" ",i.name," ")}}function XG(n,r){if(n&1&&(it(0,"div",2),Ji(1,KG,2,1,"button",3,ta),lt()),n&2){let i=Yt(2);at(),Qi(i.floors())}}function JG(n,r){if(n&1){let i=Vr();it(0,"button",0),an("click",function(){br(i);let d=Yt();return wr(d.toggleFloorSelector())}),it(1,"span"),on(2),lt(),Mt(3,"fa-icon",1),lt(),Fn(4,XG,3,0,"div",2)}if(n&2){let i=Yt();at(2),Mo(i.selectedFloor().name),at(),Ft("icon",i.showFloorOptions()?i.caretUp:i.caretDown),at(),Nn(i.showFloorOptions()?4:-1)}}var g1=class n{loadedDataService=Re(ci);mapService=Re(xi);iconLibrary=Re(Yn);parentPlace=Qt(()=>this.loadedDataService.parentPlace());floors=Qt(()=>this.parentPlace()?.innerFloors??[]);currentFloorId=Qt(()=>this.mapService.currentFloorId());selectedFloor=Qt(()=>this.floors().find(r=>r.key===this.currentFloorId())??this.floors()[0]);showFloorOptions=ln(!1);caretDown=this.iconLibrary.getIconDefinition("fas","caret-down");caretUp=this.iconLibrary.getIconDefinition("fas","caret-up");toggleFloorSelector(){this.showFloorOptions.update(r=>!r)}selectFloor(r){this.showFloorOptions.set(!1),this.mapService.updateFloor(r.key)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-floor-selector"]],decls:1,vars:1,consts:[[1,"floor-selector-button",3,"click"],[3,"icon"],[1,"floor-options"],[1,"floor-option"],[1,"floor-option",3,"click"]],template:function(i,l){i&1&&Fn(0,JG,5,3),i&2&&Nn(l.floors().length>0?0:-1)},dependencies:[Dr],styles:[".floor-selector-button[_ngcontent-%COMP%]{padding:10px;border:0;border-radius:16px;background-color:var(--definitions-colors-background-white);box-shadow:var(--definitions-shadows-general)}.floor-options[_ngcontent-%COMP%]{position:absolute;top:100%;left:0;right:0;background-color:var(--definitions-colors-background-white);border-radius:16px;box-shadow:var(--definitions-shadows-general);display:flex;flex-direction:column}.floor-option[_ngcontent-%COMP%]{padding:10px;border:0;background-color:transparent}.floor-option[_ngcontent-%COMP%]:not(:last-child){border-bottom:1px solid var(--definitions-colors-gray-200)}"]})};var QG=["map"],eH=["*"];function tH(n,r){n&1&&Mt(0,"app-floor-selector",3)}var qd=class n{mapRef;logger=Re(jn);mapService=Re(xi);markerService=Re(Zo);routingService=Re(_c);loadedDataService=Re(ci);showFloorSelector=Qt(()=>this.loadedDataService.parentPlace()!==void 0);ngAfterViewInit(){this.mapService.createMap(this.mapRef.nativeElement)}ngOnDestroy(){this.logger.log("Destroying map and preparing to reuse"),this.markerService.prepareToMapReuse(),this.routingService.removeRoute(),this.mapService.prepareToReuse()}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-map"]],viewQuery:function(i,l){if(i&1&&Bg(QG,5),i&2){let d;jg(d=Vg())&&(l.mapRef=d.first)}},ngContentSelectors:eH,decls:6,vars:1,consts:[["map",""],[1,"map-wrapper"],["id","map"],[1,"floor-selector"],[1,"buttons-container"]],template:function(i,l){i&1&&(wu(),it(0,"div",1),Mt(1,"div",2,0),Fn(3,tH,1,0,"app-floor-selector",3),Mt(4,"app-buttons-container",4),xu(5),lt()),i&2&&(at(3),Nn(l.showFloorSelector()?3:-1))},dependencies:[m1,g1],styles:[".map-wrapper[_ngcontent-%COMP%]{height:100%;width:100%;position:relative}#map[_ngcontent-%COMP%]{height:100%;min-width:10px;min-height:10px}.buttons-container[_ngcontent-%COMP%]{position:absolute;bottom:18px;right:17px}.floor-selector[_ngcontent-%COMP%]{position:absolute;top:18px;right:17px}"],changeDetection:0})};var nH=["*"];function rH(n,r){n&1&&(it(0,"div",2),Mt(1,"app-map"),lt())}var pm=class n{stateService=Re(gi);showMap=Qt(()=>this.stateService.activeView()==="map");static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-view-container"]],ngContentSelectors:nH,decls:4,vars:3,consts:[[1,"view-container"],[1,"view-content"],[1,"map-container"]],template:function(i,l){i&1&&(wu(),it(0,"div",0)(1,"div",1),xu(2),lt(),Fn(3,rH,2,0,"div",2),lt()),i&2&&(at(),li("with-map",l.showMap()),at(2),Nn(l.showMap()?3:-1))},dependencies:[qd],styles:[".view-container[_ngcontent-%COMP%]{display:flex;align-items:stretch;gap:8px}@container mapvx-container (width <= 1024px){.view-container[_ngcontent-%COMP%]{flex-direction:column-reverse;align-items:flex-start}}@container mapvx-container (width <= 640px){.view-container[_ngcontent-%COMP%]{flex-direction:column-reverse;align-items:flex-start}}.view-content[_ngcontent-%COMP%]{width:100%}.view-content.with-map[_ngcontent-%COMP%]{width:50%;min-width:482px;flex-shrink:0}@container mapvx-container (width <= 1024px){.view-content.with-map[_ngcontent-%COMP%]{width:100%;min-width:unset}}.map-container[_ngcontent-%COMP%]{width:100%;min-height:730px}@container mapvx-container (width <= 1024px){.map-container[_ngcontent-%COMP%]{width:100%;height:730px}}@container mapvx-container (width <= 640px){.map-container[_ngcontent-%COMP%]{width:100%;height:400px;min-height:unset}}"],changeDetection:0})};var iH=["categoryFilters"],oH=(n,r)=>r.name;function sH(n,r){if(n&1){let i=Vr();it(0,"button",11),an("click",function(){let d=br(i).$implicit,a=Yt(2);return wr(a.updateSelectedFilter(d.name))}),on(1),lt()}if(n&2){let i=r.$implicit,l=Yt(2);li("active",l.selectedFilter()===i.name),at(),eo(" ",i.name," ")}}function aH(n,r){if(n&1&&(it(0,"div",2)(1,"div",5,0)(3,"div",6),Ji(4,sH,2,3,"button",7,oH),lt(),it(6,"div",8),Mt(7,"div",9)(8,"div",10),lt()()()),n&2){let i=Yt();at(4),Qi(i.categoryFiltersData()),at(4),X0("left",i.indicatorPosition(),"px")}}var y1=class n{logger=Re(jn);stateService=Re(gi);loadedDataService=Re(ci);markerService=Re(Zo);categoryFilters=r_("categoryFilters");activeView=Qt(()=>this.stateService.activeView());loadedPlaces=vo(this.loadedDataService.getAvailablePlaces(),{initialValue:[]});categoryFiltersData=Qt(()=>this.stateService.categoryFiltersData());places=ls(()=>this.loadedPlaces());selectedFilter=Qt(()=>this.stateService.selectedFilter());selectedInstitution=Qt(()=>this.stateService.selectedInstitution());selectedCity=Qt(()=>this.stateService.selectedCity());showCategoryFilters=Qt(()=>this.stateService.showCategoryFilters());showCityFilter=Qt(()=>this.stateService.showCityFilter());indicatorPosition=ln(0);constructor(){Gn(()=>{let r=this.categoryFiltersData();if(this.logger.log("====> loadedCategoryFiltersData",r),r.length>0){let i=r.map(l=>l.name);this.readFilterFromUrl(i)}}),Gn(()=>{if(this.activeView()==="map"){let r=this.places();this.logger.log("====> addMarkers ",r),this.markerService.addMarkers(r)}}),Gn(()=>{let r=this.loadedPlaces(),i=this.showCategoryFilters(),l=r;if(this.showCityFilter()){let E=this.selectedCity()?.filterId??"";E!==""&&(l=l.filter(L=>L.parentInstitutionId===E))}if(i){let a=this.selectedFilter(),E=this.categoryFiltersData();if(a!=="All"){let L=E.find(N=>N.name===a)?.placeData||[];l=r.filter(N=>L.includes(N.lazarilloId))}}l.sort((a,E)=>a.title.trim().localeCompare(E.title.trim())),this.logger.log("====> filteredPlaces",l),this.places.set(l)}),Gn(()=>{let r=this.places();this.stateService.lastListedPlaces.set(r)}),Gn(()=>{let r=this.selectedFilter(),i=this.categoryFiltersData(),l=this.categoryFilters();this.showCategoryFilters()&&l?requestAnimationFrame(()=>{let a=this.getIndicatorPosition(r,i,l);this.indicatorPosition.set(a)}):this.indicatorPosition.set(0)})}readFilterFromUrl(r){let l=new URLSearchParams(location.search).get("tab");l&&r.includes(l)&&this.stateService.selectedFilter.set(l)}getIndicatorPosition(r,i,l){if(l==null)return 0;let d=l.nativeElement.querySelectorAll(".category-btn");if(d.length===0)return 0;let a=i.findIndex(Q=>Q.name===r);if(a===-1||a>=d.length)return 0;let E=d[a];if(!E)return 0;let L=l.nativeElement.getBoundingClientRect(),N=E.getBoundingClientRect(),Z=N.width,ee=N.left-L.left,X=80,re=ee+Z/2-X/2;return Math.min(Math.max(0,re),L.width-X)}updateSelectedFilter(r){this.stateService.selectedFilter.set(r),this.stateService.userAction.next({type:"select-filter",data:{filter:r}})}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-list-view"]],viewQuery:function(i,l){i&1&&Ug(l.categoryFilters,iH,5),i&2&&$g()},decls:5,vars:2,consts:[["categoryFilters",""],[1,"list-view"],[1,"category-filters-overflow"],[1,"list-container"],[3,"places"],[1,"category-filters-container"],[1,"category-filters"],[1,"category-btn",3,"active"],[1,"active-indicator"],[1,"background-line"],[1,"active-line"],[1,"category-btn",3,"click"]],template:function(i,l){i&1&&(it(0,"div",1),Fn(1,aH,9,2,"div",2),it(2,"app-view-container")(3,"div",3),Mt(4,"app-paginator",4),lt()()()),i&2&&(at(),Nn(l.showCategoryFilters()?1:-1),at(3),Ft("places",l.places()))},dependencies:[pm,fm],styles:[".list-view[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:36px}.category-filters-overflow[_ngcontent-%COMP%]{width:100%;overflow-x:auto}.category-filters-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:16px;width:100%;min-width:max-content}.category-filters[_ngcontent-%COMP%]{display:flex;gap:2.4375rem;align-items:center}.category-btn[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;font:var(--definitions-textFonts-desktop-button-5);font-family:inherit;font-weight:400;color:var(--definitions-colors-text-900);white-space:nowrap;padding:0;transition:color .2s ease}.category-btn.active[_ngcontent-%COMP%], .category-btn[_ngcontent-%COMP%]:hover{color:var(--definitions-colors-secondary-orange)}.active-indicator[_ngcontent-%COMP%]{position:relative;width:100%;height:3px;display:flex;align-items:center}.background-line[_ngcontent-%COMP%]{height:.5px;background:var(--definitions-colors-primary-black);border-radius:2px;width:100%}.active-line[_ngcontent-%COMP%]{position:absolute;top:0;height:100%;width:80px;background:var(--definitions-colors-secondary-orange);border-radius:2px;transition:left .3s ease}.list-container[_ngcontent-%COMP%]{width:100%}"],changeDetection:0})};var lH=()=>({rotate:42}),v1=class n{iconLibrary=Re(Yn);faCircleNotch=this.iconLibrary.getIconDefinition("fas","circle-notch");static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-loading-location-card"]],decls:7,vars:3,consts:[[1,"loading-location-card"],[1,"loading-card-image"],[3,"icon","transform"],[1,"loading-card-content"],[1,"loading-location-name"],[1,"loading-location-address"],[1,"loading-location-category"]],template:function(i,l){i&1&&(it(0,"div",0)(1,"div",1),Mt(2,"fa-icon",2),lt(),it(3,"div",3),Mt(4,"div",4)(5,"div",5)(6,"div",6),lt()()),i&2&&(at(2),Ft("icon",l.faCircleNotch)("transform",Cu(2,lH)))},dependencies:[Dr],styles:[".loading-location-card[_ngcontent-%COMP%]{display:flex;padding:5px 5px 10px;flex-direction:column;align-items:flex-start;gap:12px}.loading-card-image[_ngcontent-%COMP%]{display:flex;width:227px;height:227px;justify-content:center;align-items:center;background-color:var(--definitions-colors-primary-300)}@container mapvx-container (width <= 640px){.loading-card-image[_ngcontent-%COMP%]{width:160px;height:160px}}.loading-card-image[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-primary-600);font-size:95px}.loading-card-content[_ngcontent-%COMP%]{display:flex;width:227px;flex-direction:column;align-items:flex-start;gap:8px}@container mapvx-container (width <= 640px){.loading-card-content[_ngcontent-%COMP%]{width:160px}}.loading-location-name[_ngcontent-%COMP%]{display:flex;width:85%;height:24px;padding:7.253px 0;flex-direction:column;justify-content:center;align-items:center;border-radius:28.09px;background:var(--definitions-colors-primary-300)}.loading-location-address[_ngcontent-%COMP%]{display:flex;width:70%;height:11px;align-items:center;gap:18px;flex-shrink:0;align-self:stretch;border-radius:28.09px;background:var(--definitions-colors-primary-200)}.loading-location-category[_ngcontent-%COMP%]{display:flex;width:45%;height:11px;justify-content:space-between;align-items:center;border-radius:24px;background:var(--definitions-colors-primary-200)}"]})};var cH=()=>[1,2,3,4,5,6,7,8,9,10];function uH(n,r){n&1&&Mt(0,"app-loading-location-card")}var _1=class n{homeStateService=Re(gi);showMap=Qt(()=>this.homeStateService.activeView()==="map");static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-loading-card-list"]],decls:3,vars:3,consts:[[1,"loading-container"]],template:function(i,l){i&1&&(it(0,"div",0),Ji(1,uH,1,0,"app-loading-location-card",null,af),lt()),i&2&&(li("with-map",l.showMap()),at(),Qi(Cu(2,cH)))},dependencies:[v1],styles:[".loading-container[_ngcontent-%COMP%]{display:flex;place-content:flex-start;align-items:flex-start;gap:24px 13px;align-self:stretch;flex-wrap:wrap}.loading-container.with-map[_ngcontent-%COMP%]{gap:16px 8px;height:730px}"]})};function dH(n,r){n&1&&(it(0,"p"),on(1,"Looking for your results..."),lt())}function hH(n,r){if(n&1&&(it(0,"p"),on(1),lt()),n&2){let i=Yt(3);at(),eo('Showing 1 result for "',i.searchTerm(),'"')}}function fH(n,r){if(n&1&&(it(0,"p"),on(1),lt()),n&2){let i=Yt(3);at(),J0("Showing ",i.places().length,' results for "',i.searchTerm(),'"')}}function pH(n,r){if(n&1&&Fn(0,hH,2,1,"p")(1,fH,2,2,"p"),n&2){let i=Yt(2);Nn(i.places().length===1?0:1)}}function mH(n,r){if(n&1&&(it(0,"p"),on(1),lt()),n&2){let i=Yt(2);at(),eo('No results found for "',i.searchTerm(),'"')}}function gH(n,r){if(n&1&&Fn(0,pH,2,1)(1,mH,2,1,"p"),n&2){let i=Yt();Nn(i.places().length>0?0:1)}}function yH(n,r){n&1&&Mt(0,"app-loading-card-list")}function vH(n,r){if(n&1&&(it(0,"div",6)(1,"app-paginator",7)(2,"div",8),Mt(3,"fa-icon",4),it(4,"h2"),on(5,"No results found"),lt(),it(6,"div",9)(7,"p"),on(8,"Sorry, we can\u2019t find any places that match your search. Please try again."),lt()()()()()),n&2){let i=Yt();at(),Ft("places",i.places()),at(2),Ft("icon",i.faBuildingMagnifyingGlass)}}var b1=class n{logger=Re(jn);loadedDataService=Re(ci);sdkService=Re(na);stateService=Re(gi);navigatorService=Re(Po);markerService=Re(Zo);iconLibrary=Re(Yn);searching=ls(()=>this.stateService.lastSearchData().term==="");inputValue$=i1(this.stateService.inputValue).pipe(Yb(500),En(r=>r.trim()),_i(r=>r!==""),Kb());searchTerm=vo(this.inputValue$,{initialValue:this.stateService.lastSearchData().term});places=vo(Xs([i1(this.stateService.filterId),this.inputValue$,i1(this.stateService.lastSearchData)]).pipe(Yi(([r,i,l])=>l.term===i?(this.logger.log("====> lastSearchData",l),this.searching.set(!1),Sn(l.results)):(this.searching.set(!0),this.logger.log("====> searchTerm",i),this.logger.log("====> institutionId",r),ai(this.sdkService.searchPlaces(i,r)))),Ki(()=>this.searching.set(!1))),{initialValue:this.stateService.lastSearchData().results});faArrowLeft=this.iconLibrary.getIconDefinition("fas","arrow-left");faBuildingMagnifyingGlass=this.iconLibrary.getIconDefinition("fas","building-magnifying-glass");constructor(){Gn(()=>{let r=this.places();this.markerService.addMarkers(r)}),Gn(()=>{let r=this.places();this.stateService.lastListedPlaces.set(r)}),Gn(()=>{let r=this.searching();this.logger.log("====> searching",r)}),Gn(()=>{let r=this.searchTerm();r&&this.stateService.userAction.next({type:"search",data:{searchTerm:r}})})}ngOnDestroy(){this.stateService.inputValue()===""?(this.logger.log("====> EMPTY_SEARCH_DATA"),this.stateService.lastSearchData.set(r1)):(this.logger.log("====> SETTING LAST SEARCH DATA"),this.stateService.lastSearchData.set({term:this.stateService.inputValue(),results:this.places()}))}onBackClick(){this.stateService.inputValue.set(""),this.stateService.userAction.next({type:"return-to-home",data:{filter:this.stateService.selectedFilter()}}),this.navigatorService.navigateToHome()}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-search-view"]],decls:13,vars:3,consts:[[1,"search-view"],[1,"search-view-header"],[1,"back-button"],[1,"back-btn",3,"click"],[3,"icon"],[1,"search-view-info"],[1,"results-container"],[3,"places"],[1,"no-results"],[1,"no-results-description"]],template:function(i,l){i&1&&(it(0,"div",0)(1,"div",1)(2,"div",2)(3,"button",3),an("click",function(){return l.onBackClick()}),Mt(4,"fa-icon",4),it(5,"span"),on(6,"Back"),lt()()(),it(7,"div",5),Fn(8,dH,2,0,"p")(9,gH,2,1),lt()(),it(10,"app-view-container"),Fn(11,yH,1,0,"app-loading-card-list")(12,vH,9,2,"div",6),lt()()),i&2&&(at(4),Ft("icon",l.faArrowLeft),at(4),Nn(l.searching()?8:9),at(3),Nn(l.searching()?11:12))},dependencies:[pm,fm,T_,Dr,_1],styles:['*[_ngcontent-%COMP%]{margin:0;padding:0}.search-view[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:36px}.search-view-header[_ngcontent-%COMP%]{display:flex;width:100%;flex-direction:column;justify-content:center;align-items:flex-start;gap:23px}.search-view-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--definitions-colors-text-800);font:var(--definitions-textFonts-desktop-sub-2);font-family:inherit;letter-spacing:-.9px}.results-container[_ngcontent-%COMP%]{width:100%}.back-button[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;align-items:center;gap:16px}.back-btn[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;gap:12px;color:var(--definitions-colors-secondary-blue);border:none;background:none}.back-btn[_ngcontent-%COMP%]:hover{cursor:pointer}.back-btn[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:24px}.back-btn[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--definitions-colors-secondary-blue);font:var(--definitions-textFonts-desktop-button-1);font-family:inherit;font-feature-settings:"liga" off,"clig" off;letter-spacing:-1px}.no-results[_ngcontent-%COMP%]{display:flex;width:100%;height:100%;flex-direction:column;justify-content:center;align-items:center;gap:31px}.no-results[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:160px;color:var(--definitions-colors-text-light-grey)}.no-results[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{color:var(--definitions-colors-text-grey);font:var(--definitions-textFonts-desktop-h2);font-family:inherit}.no-results[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--definitions-colors-text-grey);font:var(--definitions-textFonts-desktop-sub-1);font-family:inherit;text-align:center}'],changeDetection:0})};function w1(n){switch(n){case"su":return"Sunday";case"mo":return"Monday";case"tu":return"Tuesday";case"we":return"Wednesday";case"th":return"Thursday";case"fr":return"Friday";case"sa":return"Saturday"}}function C1(n){switch(n.getDay()){case 0:return"su";case 1:return"mo";case 2:return"tu";case 3:return"we";case 4:return"th";case 5:return"fr";case 6:return"sa";default:return"mo"}}function _H(n){switch(n){case 0:return"su";case 1:return"mo";case 2:return"tu";case 3:return"we";case 4:return"th";case 5:return"fr";case 6:return"sa";default:return"mo"}}function x1(n){let[r,i]=n.split(":"),l=parseInt(r)%24,d=parseInt(i),a;return l<12?(a="AM",l===0&&(l=12)):(a="PM",l!==12&&(l-=12)),`${l}:${d<10?"0":""}${d}&nbsp;${a}`}function NR(n){let r=x1(n.open),i=x1(n.close);return`${r}&nbsp;-&nbsp;${i}`}function bH(n){let r=x1(n.open),i=x1(n.close);return`${r}&nbsp;to&nbsp;${i}`}function wH(n){let r=new Date,i=new Date(r);zR(i);let l=C1(i),d=n[l];if(d&&d.length>0){for(let a of d)if(LR(a.open)&&LR(a.close)){let E=FR(a.open,i),L=FR(a.close,i);if(E>L&&xH(L),r>=E&&r<=L)return!0}}return!1}function zR(n){let r=n.getDate();n.setDate(r-1)}function xH(n){let r=n.getDate();n.setDate(r+1)}function CH(n){let i=C1(new Date),l=n[i];return l&&l.length>0}function LR(n){return/^([0-9]|0[0-9]|1[0-9]|2[0-4]):[0-5][0-9]$/.test(n)}function FR(n,r){let[i,l]=n.split(":").map(Number),d=r?new Date(r):new Date;return new Date(d.getFullYear(),d.getMonth(),d.getDate(),i,l,0,0)}function SH(n){return n.sort((r,i)=>r.open.localeCompare(i.open))}function EH(n){let i=C1(new Date),l=n[i];return l&&l.length>0?BR(l):""}function IH(n){let r=new Date;zR(r);let i=C1(r),l=n[i];return l&&l.length>0?BR(l):""}function DH(n){let r=TH(n);return`Open on ${w1(r)}`}function BR(n){return n.length===1?NR(n[0]):(SH(n),n.map(bH).join(" - "))}function TH(n){let i=new Date().getDay();for(let l=0;l<7;l++){let d=(i+l)%7,a=_H(d),E=n[a];if(E&&E.length>0)return a}return"mo"}function jR(n){return wH(n)?IH(n):CH(n)?EH(n):DH(n)}function VR(n){let r=["mo","tu","we","th","fr","sa","su"],i=L=>{let N=n[L];return!N||N.length===0?["Closed"]:N.map(Z=>NR(Z))},l=(L,N)=>L.length!==N.length?!1:L.every((Z,ee)=>Z===N[ee]),d=(L,N)=>L===N?w1(L):`${w1(L)} - ${w1(N)}`,a=[],E=0;for(;E<r.length;){let L=r[E],N=i(L),Z=E+1;for(;Z<r.length&&l(N,i(r[Z]));)Z++;let ee=d(L,r[Z-1]);a.push({day:ee,schedule:N}),E=Z}if(a.length>1){let L=a[0],N=a[a.length-1];if(l(L.schedule,N.schedule)){let Z=L.day.split(" - "),X=N.day.split(" - ")[0],re=Z.length>1?Z[1]:Z[0],Q=`${X} - ${re}`;a[0]={day:Q,schedule:L.schedule},a.pop()}}return a}function MH(n,r){if(n&1&&Mt(0,"div",9),n&2){let i=r.$implicit;Ft("innerHTML",i,Od)}}function PH(n,r){if(n&1&&(it(0,"div",6)(1,"div",7),on(2),lt(),it(3,"div",8),Ji(4,MH,1,1,"div",9,ta),lt()()),n&2){let i=r.$implicit;at(2),Mo(i.day),at(2),Qi(i.schedule)}}var S1=class n{iconLibrary=Re(Yn);schedules=dr.required({transform:r=>r?VR(r):[]});closeClicked=_s();faClockThree=this.iconLibrary.getIconDefinition("fas","clock-three");faXmark=this.iconLibrary.getIconDefinition("fas","xmark");hideModal(){this.closeClicked.emit()}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-other-schedules"]],inputs:{schedules:[1,"schedules"]},outputs:{closeClicked:"closeClicked"},decls:11,vars:2,consts:[[1,"other-schedules-container"],[1,"other-schedules-header"],[1,"other-schedules-title"],[3,"icon"],[1,"close-button",3,"click"],[1,"schedules"],[1,"schedule"],[1,"schedule-day"],[1,"schedule-time"],[1,"schedule-time-item",3,"innerHTML"]],template:function(i,l){i&1&&(it(0,"div",0)(1,"div",1)(2,"div",2),Mt(3,"fa-icon",3),it(4,"h2"),on(5,"Other Schedules"),lt()(),it(6,"button",4),an("click",function(){return l.hideModal()}),Mt(7,"fa-icon",3),lt()(),it(8,"div",5),Ji(9,PH,6,1,"div",6,ta),lt()()),i&2&&(at(3),Ft("icon",l.faClockThree),at(4),Ft("icon",l.faXmark),at(2),Qi(l.schedules()))},dependencies:[Dr],styles:[".other-schedules-container[_ngcontent-%COMP%]{padding:16px;background-color:var(--definitions-colors-background-50);box-shadow:var(--definitions-shadows-general)}.other-schedules-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.other-schedules-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.other-schedules-title[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;color:var(--definitions-colors-text-900);font:var(--definitions-textFonts-desktop-sub-2);font-family:inherit}@container mapvx-container (width <= 640px){.other-schedules-title[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:16px}}.other-schedules-title[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-primary-600);font-size:32px}@container mapvx-container (width <= 640px){.other-schedules-title[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:20px}}.close-button[_ngcontent-%COMP%]{padding:0;background:none;border:none;cursor:pointer}.close-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:20px}.schedules[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px;background-color:#fff}.schedule[_ngcontent-%COMP%]{display:flex;gap:40px;align-items:center;justify-content:space-between}.schedule-times[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.schedule-time[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:end}.schedule-time-item[_ngcontent-%COMP%]{color:var(--definitions-colors-text-800);font:var(--definitions-textFonts-desktop-sub-5);font-family:inherit}@container mapvx-container (width <= 640px){.schedule-time-item[_ngcontent-%COMP%]{font-size:12px;font-weight:400}}"]})};var AH=()=>({rotate:42});function kH(n,r){if(n&1&&Mt(0,"fa-icon",3),n&2){let i=Yt();Ft("icon",i.faCircleNotch)("transform",Cu(2,AH))}}function RH(n,r){if(n&1){let i=Vr();it(0,"div",10),Mt(1,"fa-icon",9),it(2,"div",24)(3,"button",25),an("click",function(){br(i);let d=Yt();return wr(d.showOtherSchedulesModal())}),lt(),it(4,"div",26),on(5,"*Hours may vary"),lt()()()}if(n&2){let i=Yt();at(),Ft("icon",i.faClockThree),at(2),Ft("innerHTML",i.schedule(),Od)}}function OH(n,r){if(n&1){let i=Vr();it(0,"div",11)(1,"app-other-schedules",27),an("closeClicked",function(){br(i);let d=Yt();return wr(d.hideOtherSchedulesModal())}),lt()()}if(n&2){let i=Yt();at(),Ft("schedules",i.place().openingHours)}}function LH(n,r){if(n&1&&Mt(0,"div",31),n&2){let i=r.$implicit;Ft("innerHTML",i,Od)}}function FH(n,r){if(n&1&&(it(0,"div",12)(1,"div",28),Mt(2,"fa-icon",9),it(3,"div",29),on(4,"Deals + Events"),lt()(),it(5,"div",30),Ji(6,LH,1,1,"div",31,ta),lt()()),n&2){let i=Yt();at(2),Ft("icon",i.faBadgeDollar),at(4),Qi(i.banners())}}function NH(n,r){if(n&1&&(it(0,"div",21),on(1),lt()),n&2){let i=Yt();at(),eo(" ",i.address()," ")}}function zH(n,r){if(n&1&&(it(0,"div",22),on(1),lt()),n&2){let i=r.$implicit;at(),eo(" ",i," ")}}function BH(n,r){if(n&1&&(it(0,"div",23)(1,"a",18),on(2),lt()()),n&2){let i=r.$implicit;at(),Ft("href",i.url,rf),at(),Mo(i.title)}}var E1=class n{iconLibrary=Re(Yn);sanitizer=Re(ey);logger=Re(jn);navigatorService=Re(Po);stateService=Re(gi);place=dr.required();hideDeals=dr(!1);imageSrc=Qt(()=>this.place().images[0]||l1);isImageLoading=ln(!0);schedule=Qt(()=>{let r=this.place().openingHours;return r?jR(r):""});banners=Qt(()=>this.place().banners.filter(c1).filter(r=>r.description!==void 0).map(r=>this.sanitizer.bypassSecurityTrustHtml(r.description||"")));address=Qt(()=>this.place().address||"");phones=Qt(()=>this.place().properties?.filter(r=>r.type==="phone").map(r=>this.formatPhoneNumber(r.subtitle))||[]);websites=Qt(()=>this.place().properties?.filter(r=>r.type==="url").map(this.prepareUrl)||[]);drivingDirectionsUrl=Qt(()=>{let r=this.place();return`https://www.google.com/maps/dir/?api=1&destination=${r.position.lat},${r.position.lng}&travelmode=driving`});otherSchedulesModal=ln(!1);faCircleNotch=this.iconLibrary.getIconDefinition("fas","circle-notch");faBadgeDollar=this.iconLibrary.getIconDefinition("fas","badge-dollar");faClockThree=this.iconLibrary.getIconDefinition("fas","clock-three");faArrowTopRight=this.iconLibrary.getIconDefinition("fak","arrow-top-right");iconCategory=Qt(()=>{let[r,i]=t1(this.place().localizedCategory||"");return this.iconLibrary.getIconDefinition(r,i)});constructor(){Gn(()=>{this.imageSrc()&&this.startImageLoading()})}prepareUrl(r){return or(zt({},r),{url:r.url?.startsWith("http")?r.url:`https://${r.url}`})}startImageLoading(){this.isImageLoading.set(!0)}endImageLoading(){this.isImageLoading.set(!1)}showOtherSchedulesModal(){this.otherSchedulesModal.set(!0)}hideOtherSchedulesModal(){this.otherSchedulesModal.set(!1)}formatPhoneNumber(r){let i=r.replace(/^\+1/,"");return i=i.replaceAll(/\D/g,""),i.length<10?(this.logger.logWarning(`Phone number '${i}' is to short for format`),i):`${i.slice(0,3)}.${i.slice(3,6)}.${i.slice(6)}`}navigateToRoute(){this.stateService.userAction.next({type:"select-destination",data:{destinationId:this.place().lazarilloId,alias:this.place().clientId}}),this.navigatorService.navigateToRoute(this.place().lazarilloId)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-profile-view"]],inputs:{place:[1,"place"],hideDeals:[1,"hideDeals"]},decls:34,vars:15,consts:[[1,"profile-view-content"],[1,"image"],[3,"load","error","src","alt"],[1,"loading-icon",3,"icon","transform"],[1,"info"],[1,"basic-info"],[1,"title"],[1,"category-schedule"],[1,"category"],[3,"icon"],[1,"schedule"],[1,"other-schedules-modal"],[1,"deals-or-events"],[1,"description"],[1,"direction-buttons"],[1,"route-button-container"],[1,"route-button",3,"click"],[1,"driving-link"],["target","_blank",3,"href"],[1,"properties"],[1,"separator"],[1,"address"],[1,"phone"],[1,"website"],[1,"schedule-time"],[1,"schedule-button",3,"click","innerHTML"],[1,"schedule-warning"],[3,"closeClicked","schedules"],[1,"deals-or-events-header"],[1,"deals-or-events-content-title"],[1,"deals-or-events-content"],[1,"banner-content",3,"innerHTML"]],template:function(i,l){i&1&&(it(0,"div",0)(1,"div",1)(2,"img",2),an("load",function(){return l.endImageLoading()})("error",function(){return l.endImageLoading()}),lt(),Fn(3,kH,1,3,"fa-icon",3),lt(),it(4,"div",4)(5,"div",5)(6,"h1",6),on(7),lt(),it(8,"div",7)(9,"div",8),Mt(10,"fa-icon",9),it(11,"span"),on(12),lt()(),Fn(13,RH,6,2,"div",10),Fn(14,OH,2,1,"div",11),lt(),Fn(15,FH,8,1,"div",12),it(16,"div",13),on(17),lt()(),it(18,"div",14)(19,"div",15)(20,"button",16),an("click",function(){return l.navigateToRoute()}),Mt(21,"fa-icon",9),it(22,"span"),on(23,"Pedestrian-friendly directions"),lt()()(),it(24,"div",17)(25,"a",18),on(26,"Driving directions"),lt()()(),it(27,"div",19),Mt(28,"div",20),Fn(29,NH,2,1,"div",21),Ji(30,zH,2,1,"div",22,ta),Ji(32,BH,3,2,"div",23,ta),lt()()()),i&2&&(at(),li("loading",l.isImageLoading()),at(),Ft("src",l.imageSrc(),rf)("alt",l.place().title),at(),Nn(l.isImageLoading()?3:-1),at(4),Mo(l.place().title),at(3),Ft("icon",l.iconCategory()),at(2),Mo(l.place().localizedCategory),at(),Nn(l.schedule()!==""?13:-1),at(),Nn(l.otherSchedulesModal()?14:-1),at(),Nn(l.banners().length>0&&!l.hideDeals()?15:-1),at(2),eo(" ",l.place().description," "),at(4),Ft("icon",l.faArrowTopRight),at(4),Ft("href",l.drivingDirectionsUrl(),rf),at(4),Nn(l.address()!==""?29:-1),at(),Qi(l.phones()),at(2),Qi(l.websites()))},dependencies:[Dr,S1],styles:['.profile-view-content[_ngcontent-%COMP%]{display:flex;padding:0 16px;flex-direction:column;align-items:center;gap:16px}@container mapvx-container (width <= 1024px){.profile-view-content[_ngcontent-%COMP%]{padding:22px 0 0}}@container mapvx-container (width <= 640px){.profile-view-content[_ngcontent-%COMP%]{padding:22px 0 0}}.image[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{display:block;width:100%;object-fit:cover;aspect-ratio:1/1}.image.loading[_ngcontent-%COMP%]{background-color:var(--definitions-colors-primary-300);height:200px;width:100%;display:flex;justify-content:center;align-items:center}.image.loading[_ngcontent-%COMP%] .loading-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-primary-600);font-size:100px}.image.loading[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{display:none}.info[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:24px;width:100%}.basic-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:16px;width:100%}.title[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-h6);font-family:inherit;margin:0;color:var(--definitions-colors-text-black)}.category-schedule[_ngcontent-%COMP%]{display:flex;width:100%;justify-content:space-between;flex-wrap:wrap;position:relative}.category[_ngcontent-%COMP%]{display:flex;gap:18px;color:var(--definitions-colors-text-grey);align-items:center}.category[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:20px}.category[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-body-3);font-family:inherit;font-size:16px}.schedule[_ngcontent-%COMP%]{display:flex;gap:18px;align-items:center}.schedule[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-primary-600);font-size:20px}.schedule[_ngcontent-%COMP%] .schedule-time[_ngcontent-%COMP%]{position:relative}.schedule[_ngcontent-%COMP%] .schedule-time[_ngcontent-%COMP%] .schedule-button[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-button-3);font-family:inherit;font-size:16px;color:var(--definitions-colors-secondary-blue);border:none;background:none;cursor:pointer;text-align:start}.schedule[_ngcontent-%COMP%] .schedule-time[_ngcontent-%COMP%] .schedule-warning[_ngcontent-%COMP%]{position:absolute;top:100%;margin-top:-5px;left:0;font:var(--definitions-textFonts-desktop-sub-5);font-family:inherit;font-size:16px;color:var(--definitions-colors-text-black)}.other-schedules-modal[_ngcontent-%COMP%]{position:absolute;width:max-content;bottom:0;right:50%;transform:translate(50%) translateY(100%)}.deals-or-events[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:8px;width:100%}.deals-or-events-header[_ngcontent-%COMP%]{display:flex;width:100%;align-items:flex-start;gap:18px;color:var(--definitions-colors-secondary-orange)}.deals-or-events-header[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:20px}.deals-or-events-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:8px}.deals-or-events-content-title[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-sub-4);font-family:inherit;font-size:16px}.banner-content[_ngcontent-%COMP%]{color:var(--definitions-colors-secondary-orange);padding:5px;font:var(--definitions-textFonts-desktop-body-3);font-family:inherit;font-size:16px;white-space:pre-wrap;border:1px solid var(--definitions-colors-secondary-orange);border-radius:8px;box-shadow:var(--definitions-shadows-general)}.description[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-body-2);font-family:inherit;color:var(--definitions-colors-text-black)}.direction-buttons[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:16px;align-self:stretch;width:100%}.route-button-container[_ngcontent-%COMP%]{width:100%}.route-button[_ngcontent-%COMP%]{display:flex;padding:8px 16px;justify-content:center;align-items:center;gap:10px;align-self:stretch;background:var(--definitions-colors-primary-black);color:var(--definitions-colors-text-white);border:none;cursor:pointer;width:100%}.route-button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-button-2);font-family:inherit;font-size:16px;font-feature-settings:"liga" off,"clig" off}.driving-link[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--definitions-colors-secondary-blue);text-decoration:none;font:var(--definitions-textFonts-desktop-button-2);font-family:inherit;font-size:16px;font-feature-settings:"liga" off,"clig" off}.properties[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:16px;width:100%}.separator[_ngcontent-%COMP%]{width:100%;height:1px;background:var(--definitions-colors-primary-100)}.address[_ngcontent-%COMP%], .phone[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-sub-1);font-family:inherit;font-size:16px;color:var(--definitions-colors-text-black)}.website[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-button-1);font-family:inherit;font-size:16px;font-feature-settings:"liga" off,"clig" off}.website[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--definitions-colors-secondary-blue);text-decoration:none}']})};var jH=["backButton",""],mm=class n{iconLibraryService=Re(Yn);faArrowLeft=this.iconLibraryService.getIconDefinition("fas","arrow-left");static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["button","backButton",""]],attrs:jH,decls:3,vars:1,consts:[[3,"icon"]],template:function(i,l){i&1&&(Mt(0,"fa-icon",0),it(1,"span"),on(2,"Back"),lt()),i&2&&Ft("icon",l.faArrowLeft)},dependencies:[Dr],styles:['[_nghost-%COMP%]{display:flex;justify-content:center;align-items:center;gap:12px;color:var(--definitions-colors-secondary-blue);border:none;background:none}[_nghost-%COMP%]:hover{cursor:pointer}[_nghost-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:24px}[_nghost-%COMP%] span[_ngcontent-%COMP%]{color:var(--definitions-colors-secondary-blue);font:var(--definitions-textFonts-desktop-button-1);font-family:inherit;font-feature-settings:"liga" off,"clig" off;letter-spacing:-1px}']})};function VH(n,r){if(n&1&&Mt(0,"app-profile-view",5),n&2){let i=Yt(),l=Hg(6);Ft("place",l)("hideDeals",i.hideDeals())}}var I1=class n{onDestroy=new _r;route=Re(Ha);logger=Re(jn);loadedDataService=Re(ci);sdkService=Re(na);mapService=Re(xi);markerService=Re(Zo);navigatorService=Re(Po);homeStateService=Re(gi);iconLibraryService=Re(Yn);_profileId="";place=ln(null);mapReady=vo(this.mapService.mapReady,{requireSync:!0});hideDeals=Qt(()=>this.homeStateService.hideDeals());faArrowLeft=this.iconLibraryService.getIconDefinition("fas","arrow-left");constructor(){Gn(()=>{let r=this.place();if(r&&this.mapReady()){if(r.parentType==="Place")if(this.loadedDataService.parentPlace()===void 0){let a=this.loadedDataService.potentialParentPlaces().find(E=>E.lazarilloId===r.parentId);if(a){this.loadedDataService.parentPlace.set(a),this.mapService.setParentPlace(a);let E=r.inFloors?.[0];E&&this.mapService.updateFloor(E)}}else{let d=r.inFloors?.[0];d&&this.mapService.updateFloor(d)}if(!this.markerService.hasMarker(r.lazarilloId)){let l=qo(this.homeStateService.lastListedPlaces);l.length>0?this.markerService.addMarkers(l):this.markerService.addMarker(r)}this.markerService.selectMarker(r.lazarilloId),setTimeout(()=>{this.mapService.updateCamera({center:r.position})},100)}})}ngOnInit(){this.addBackListener();let r=this.route.paramMap.pipe(En(i=>i.get("id")),_i(i=>i!==null),_i(i=>i!==this._profileId),e2(1));Xs([r,this.loadedDataService.getAvailablePlaces()]).pipe(os(this.onDestroy),Yi(([i,l])=>{let d=l.find(a=>a.lazarilloId===i||a.clientId===i);return d?Sn(d):ai(this.sdkService.getPlaceDetail(i))})).subscribe({next:i=>{this._profileId!==i.lazarilloId&&this.cleanOldProfile(),this._profileId=i.lazarilloId,this.place.set(i),this.loadedDataService.updateInstitution(i.parentInstitutionId),this.homeStateService.selectedInstitution.set(i.parentInstitutionId),this.homeStateService.userAction.next({type:"show-place",data:{placeId:i.lazarilloId,alias:i.clientId}})},error:i=>{this.logger.log("Error getting profile id",i)},complete:()=>{this.logger.log("Profile id complete")}})}ngOnDestroy(){this.removeBackListener(),this.cleanOldProfile(),this.onDestroy.next(),this.onDestroy.complete()}cleanOldProfile(){this._profileId!==""&&this.markerService.deselectMarker(this._profileId)}returnToHome(){this.homeStateService.userAction.next({type:"return-to-home",data:{filter:this.homeStateService.selectedFilter()}}),this.navigatorService.navigateToHome()}backListener(r){this.logger.log("Back listener",r),this.returnToHome()}listener=r=>this.backListener(r);addBackListener(){globalThis.addEventListener("popstate",this.listener)}removeBackListener(){globalThis.removeEventListener("popstate",this.listener)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-profile-screen"]],decls:10,vars:2,consts:[[1,"screen"],[1,"back-button"],["backButton","",3,"click"],[1,"profile-screen-content"],[1,"profile-info"],[3,"place","hideDeals"],[1,"map"]],template:function(i,l){if(i&1){let d=Vr();it(0,"div",0)(1,"div",1)(2,"button",2),an("click",function(){return br(d),wr(l.returnToHome())}),on(3,"Back"),lt()(),it(4,"div",3)(5,"div",4),Zp(6),Fn(7,VH,1,2,"app-profile-view",5),lt(),it(8,"div",6),Mt(9,"app-map"),lt()()()}if(i&2){at(6);let d=Gg(l.place());at(),Nn(d!==null?7:-1)}},dependencies:[qd,mm,E1],styles:[".screen[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:18px}.profile-screen-content[_ngcontent-%COMP%]{display:flex;width:100%}@container mapvx-container (width <= 1024px){.profile-screen-content[_ngcontent-%COMP%]{flex-direction:column-reverse}}@container mapvx-container (width <= 640px){.profile-screen-content[_ngcontent-%COMP%]{flex-direction:column-reverse}}.profile-info[_ngcontent-%COMP%]{display:flex;width:432px;flex-shrink:0}.profile-info[_ngcontent-%COMP%] app-profile-view[_ngcontent-%COMP%]{width:100%}@container mapvx-container (width <= 1024px){.profile-info[_ngcontent-%COMP%]{width:100%}}.map[_ngcontent-%COMP%]{width:100%;min-height:730px}@container mapvx-container (width <= 1024px){.map[_ngcontent-%COMP%]{height:730px}}@container mapvx-container (width <= 640px){.map[_ngcontent-%COMP%]{width:100%;min-height:unset;height:400px}}"],changeDetection:0})};function UH(n,r){if(n&1){let i=Vr();it(0,"button",1),an("click",function(){br(i);let d=Yt();return wr(d.pauseRoute())}),Mt(1,"fa-icon",2),it(2,"span"),on(3,"Pause route"),lt()()}if(n&2){let i=Yt();at(),Ft("icon",i.faPause)}}function $H(n,r){if(n&1){let i=Vr();it(0,"button",1),an("click",function(){br(i);let d=Yt();return wr(d.resumeRoute())}),Mt(1,"fa-icon",2),it(2,"span"),on(3,"Resume route"),lt()()}if(n&2){let i=Yt();at(),Ft("icon",i.faPlay)}}function GH(n,r){if(n&1){let i=Vr();it(0,"button",1),an("click",function(){br(i);let d=Yt();return wr(d.restartRoute())}),Mt(1,"fa-icon",2),it(2,"span"),on(3,"Restart route"),lt()()}if(n&2){let i=Yt();at(),Ft("icon",i.faRestart)}}function HH(n,r){}var D1=class n{iconLibrary=Re(Yn);routingService=Re(_c);restartRouteCallback=_s();AnimationState=n1;animationStatus=vo(this.routingService.animationStatusSubject,{initialValue:0});faPlay=this.iconLibrary.getIconDefinition("fas","play");faPause=this.iconLibrary.getIconDefinition("fas","pause");faRestart=this.iconLibrary.getIconDefinition("fas","rotate-right");pauseRoute(){this.routingService.pauseRouteAnimation()}resumeRoute(){this.routingService.resumeRouteAnimation()}restartRoute(){this.routingService.restartRouteAnimation(),this.restartRouteCallback.emit()}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-route-control-button"]],outputs:{restartRouteCallback:"restartRouteCallback"},decls:4,vars:1,consts:[[1,"route-control-button"],[1,"route-control-button",3,"click"],[3,"icon"]],template:function(i,l){if(i&1&&Fn(0,UH,4,1,"button",0)(1,$H,4,1,"button",0)(2,GH,4,1,"button",0)(3,HH,0,0),i&2){let d;Nn((d=l.animationStatus())===l.AnimationState.Playing?0:d===l.AnimationState.Paused?1:d===l.AnimationState.Finished?2:3)}},dependencies:[Dr],styles:["[_nghost-%COMP%]{position:absolute;top:20px;left:500px}@container mapvx-container (width <= 1024px){[_nghost-%COMP%]{top:90px;left:unset;right:20px}}.route-control-button[_ngcontent-%COMP%]{display:flex;width:180px;height:45px;justify-content:center;align-items:center;gap:10px;background:var(--definitions-colors-background-white);color:var(--definitions-colors-text-black);box-shadow:var(--definitions-shadows-general);border:none;cursor:pointer}@container mapvx-container (width <= 1024px){.route-control-button[_ngcontent-%COMP%]{width:45px}}.route-control-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:16px}.route-control-button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-button-5);font-family:inherit}@container mapvx-container (width <= 1024px){.route-control-button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:none}}"]})};var T1=class n{iconLibrary=Re(Yn);currentRoute=dr.required();startRouteClick=_s();faCircleSmall=this.iconLibrary.getIconDefinition("fas","circle-small");faArrowTopRight=this.iconLibrary.getIconDefinition("fak","arrow-top-right");time=Qt(()=>{let r=this.currentRoute();return this.toMinutes(r.duration)});distance=Qt(()=>{let r=this.currentRoute();return Math.ceil(r.length*3.28084)});toMinutes(r){return Math.ceil(r/60)}onStartRouteClick(){this.startRouteClick.emit()}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-route-info"]],inputs:{currentRoute:[1,"currentRoute"]},outputs:{startRouteClick:"startRouteClick"},decls:17,vars:5,consts:[[1,"route-info"],[1,"route-info-item"],[1,"route-info-item-label"],[3,"icon"],[1,"route-info-item-value"],[1,"start-route-button",3,"click"]],template:function(i,l){i&1&&(it(0,"div",0)(1,"div",1)(2,"span",2),on(3,"Time"),lt(),Mt(4,"fa-icon",3),it(5,"span",4),on(6),lt()(),it(7,"div",1)(8,"span",2),on(9,"Distance"),lt(),Mt(10,"fa-icon",3),it(11,"span",4),on(12),lt()()(),it(13,"button",5),an("click",function(){return l.onStartRouteClick()}),Mt(14,"fa-icon",3),it(15,"span"),on(16,"Start Route"),lt()()),i&2&&(at(4),Ft("icon",l.faCircleSmall),at(2),eo("",l.time()," min"),at(4),Ft("icon",l.faCircleSmall),at(2),eo("",l.distance()," ft"),at(2),Ft("icon",l.faArrowTopRight))},dependencies:[Dr],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;gap:40px}.route-info[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap}.route-info-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;color:var(--definitions-colors-text-black)}.start-route-button[_ngcontent-%COMP%]{display:flex;padding:8px 16px;justify-content:center;align-items:center;gap:10px;background-color:var(--definitions-colors-primary-900);color:var(--definitions-colors-text-50);border:none;cursor:pointer;width:100%}.start-route-button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-button-2);font-family:inherit;font-feature-settings:"liga" off,"clig" off;line-height:15px}.start-route-button[_ngcontent-%COMP%]{display:none}']})};var qH={"[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"},mye=or(zt({},qH),{"[class.ng-submitted]":"isSubmitted"});var WH=new bn("",{providedIn:"root",factory:()=>UR}),UR="always";var ZH=(()=>{class n{static \u0275fac=function(l){return new(l||n)};static \u0275mod=hc({type:n});static \u0275inj=yl({})}return n})();var $R=(()=>{class n{static withConfig(i){return{ngModule:n,providers:[{provide:WH,useValue:i.callSetDisabledState??UR}]}}static \u0275fac=function(l){return new(l||n)};static \u0275mod=hc({type:n});static \u0275inj=yl({imports:[ZH]})}return n})();function YH(n,r){if(n&1){let i=Vr();it(0,"button",5),an("click",function(){br(i);let d=Yt();return wr(d.clearSelectedPlace())}),Mt(1,"fa-icon",6),lt()}if(n&2){let i=Yt();at(),Ft("icon",i.faXmark)}}function KH(n,r){if(n&1){let i=Vr();it(0,"button",10),an("click",function(){br(i);let d=Yt(2);return wr(d.useCurrentLocation())}),it(1,"div",11),Mt(2,"fa-icon",6),lt(),it(3,"div",12)(4,"div",13),on(5,"Use current location"),lt()()()}if(n&2){let i=Yt(2);at(2),Ft("icon",i.faLocationArrow)}}function XH(n,r){if(n&1){let i=Vr();it(0,"button",10),an("click",function(){let d=br(i).$implicit,a=Yt(2);return wr(a.selectPlace(d))}),it(1,"div",11),Mt(2,"fa-icon",6),lt(),it(3,"div",12)(4,"div",13),on(5),lt(),it(6,"div",14),on(7),lt()()()}if(n&2){let i=r.$implicit,l=Yt(2);at(2),Ft("icon",l.faLocationDot),at(3),Mo(i.title),at(2),Mo(i.address)}}function JH(n,r){n&1&&(it(0,"div",9),on(1,"No results found"),lt())}function QH(n,r){if(n&1&&(it(0,"div",4)(1,"div",7),Fn(2,KH,6,1,"button",8),Ji(3,XH,8,3,"button",8,ta),Fn(5,JH,2,0,"div",9),lt()()),n&2){let i=Yt();at(2),Nn(i.allowCurrentLocation()&&i.locationPermission()!=="denied"?2:-1),at(),Qi(i.filteredPlaces()),at(2),Nn(i.filteredPlaces().length===0&&i.filterText().trim()?5:-1)}}var M1=class n{logger=Re(jn);locationService=Re(Hd);iconLibrary=Re(Yn);places=dr.required();initialSelectedPlace=dr(null);allowCurrentLocation=dr(!1);placeholder=dr("Set a starting point");selectedPlace=ls(()=>this.initialSelectedPlace());selectedPlaceChange=_s();isDropdownOpen=ln(!1);filterText=ls(()=>this.selectedPlace()?.title||"");filteredPlaces=Qt(()=>{let r=this.places(),i=this.filterText().toLowerCase().trim();return i?r.filter(l=>l.title?.toLowerCase().includes(i)||l.address?.toLowerCase().includes(i)):r});locationPermission=ln("prompt");faLocationDot=this.iconLibrary.getIconDefinition("fas","location-dot");faLocationArrow=this.iconLibrary.getIconDefinition("fas","location-arrow");faXmark=this.iconLibrary.getIconDefinition("fas","xmark");constructor(){this.checkLocationPermission()}checkLocationPermission(){this.locationService.checkLocationPermission().then(r=>{this.locationPermission.set(r)}).catch(r=>{this.logger.logWarning("Error checking location permission",r),this.locationPermission.set("denied")})}requestLocationPermission(){this.locationService.requestLocationPermission().then(r=>{this.locationPermission.set(r),r==="granted"&&this.getCurrentLocation()}).catch(r=>{this.logger.logWarning("Error requesting location permission",r),this.locationPermission.set("denied")})}getCurrentLocation(){this.locationService.getCurrentLocation().then(r=>{this.selectedPlace.set(r),this.selectedPlaceChange.emit(r)}).catch(r=>{this.logger.logWarning("Error getting current location",r)})}useCurrentLocation(){switch(this.locationPermission()){case"granted":this.getCurrentLocation();break;case"prompt":this.requestLocationPermission();break}}selectPlace(r){this.selectedPlace.set(r),this.isDropdownOpen.set(!1),this.selectedPlaceChange.emit(r)}clearSelectedPlace(){this.selectedPlace.set(null),this.filterText.set(""),this.selectedPlaceChange.emit(null)}onInputFocus(){this.isDropdownOpen.set(!0)}onInputBlur(){setTimeout(()=>{this.isDropdownOpen.set(!1)},150)}onInputChange(r){let i=r.target;this.filterText.set(i.value),this.isDropdownOpen.set(!0)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-place-selector"]],inputs:{places:[1,"places"],initialSelectedPlace:[1,"initialSelectedPlace"],allowCurrentLocation:[1,"allowCurrentLocation"],placeholder:[1,"placeholder"]},outputs:{selectedPlaceChange:"selectedPlaceChange"},decls:5,vars:4,consts:[[1,"place-selector"],[1,"input-container"],["type","text","name","place-input",1,"place-input",3,"input","focus","blur","value","placeholder"],[1,"clear-button"],[1,"dropdown-container"],[1,"clear-button",3,"click"],[3,"icon"],[1,"dropdown-list"],["type","button",1,"place-option"],[1,"no-results"],["type","button",1,"place-option",3,"click"],[1,"place-icon"],[1,"place-info"],[1,"place-title"],[1,"place-address"]],template:function(i,l){i&1&&(it(0,"div",0)(1,"div",1)(2,"input",2),an("input",function(a){return l.onInputChange(a)})("focus",function(){return l.onInputFocus()})("blur",function(){return l.onInputBlur()}),lt(),Fn(3,YH,2,1,"button",3),lt(),Fn(4,QH,6,2,"div",4),lt()),i&2&&(at(2),Ft("value",l.filterText())("placeholder",l.placeholder()),at(),Nn(l.selectedPlace()?3:-1),at(),Nn(l.isDropdownOpen()?4:-1))},dependencies:[zd,$R,Dr],styles:['[_nghost-%COMP%]{width:100%}.place-selector[_ngcontent-%COMP%]{position:relative;width:100%}.input-container[_ngcontent-%COMP%]{width:100%;display:flex}.place-input[_ngcontent-%COMP%]{width:100%;border:none;font:var(--definitions-textFonts-desktop-button-1);font-family:inherit;font-feature-settings:"liga" off,"clig" off;letter-spacing:-1px;text-overflow:ellipsis;outline:none;color:var(--definitions-colors-text-black)}.place-input[_ngcontent-%COMP%]::placeholder{color:var(--definitions-colors-primary-300)}.clear-button[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:16px;color:var(--definitions-colors-text-900)}.dropdown-container[_ngcontent-%COMP%]{position:absolute;top:100%;left:0;right:0;z-index:10;margin-top:4px}.dropdown-list[_ngcontent-%COMP%]{background:var(--definitions-colors-background-50);border-radius:8px;box-shadow:var(--definitions-shadows-general);max-height:300px;overflow-y:auto;border:1px solid var(--definitions-colors-gray-200)}.place-option[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:4px;padding:15px 24px;cursor:pointer;transition:background-color .2s ease;border-bottom:1px solid #f5f5f5;background:none;border:none;width:100%;text-align:left}.place-option[_ngcontent-%COMP%]:last-child{border-bottom:none}.place-option[_ngcontent-%COMP%]:hover{background-color:#f8f9fa}.place-option[_ngcontent-%COMP%]:active{background-color:#e9ecef}.place-option[_ngcontent-%COMP%]:focus{outline:2px solid #5D5D5D;outline-offset:-2px}.place-icon[_ngcontent-%COMP%]{flex-shrink:0;width:19.341px;height:19.341px;margin-top:2px;color:var(--definitions-colors-primary-600)}.place-info[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:4px;min-width:0}.place-title[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-button-3);font-family:inherit;color:var(--definitions-colors-text-900);word-wrap:break-word}.place-address[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-body-3);font-family:inherit;color:var(--definitions-colors-text-800);word-wrap:break-word}.no-results[_ngcontent-%COMP%]{padding:20px 24px;text-align:center;font:var(--definitions-textFonts-desktop-body-3);font-family:inherit;color:var(--definitions-colors-text-800)}@media (width <= 768px){.place-option[_ngcontent-%COMP%]{padding:12px 20px}.place-title[_ngcontent-%COMP%]{font-size:15px}.place-address[_ngcontent-%COMP%]{font-size:13px}}']})};var P1=class n{logger=Re(jn);iconLibrary=Re(Yn);places=dr.required();initialDestination=dr(null);originPlace=ln(null);destinationPlace=ls(()=>this.initialDestination());originSelected=_s();destinationSelected=_s();swapPlaces=_s();clearDestination=_s();locationPermission=ln("prompt");faLocationDot=this.iconLibrary.getIconDefinition("fas","location-dot");faEllipsisVertical=this.iconLibrary.getIconDefinition("fas","ellipsis-vertical");faArrowsRetweet=this.iconLibrary.getIconDefinition("fas","arrows-retweet");canSwapPlaces=Qt(()=>nC(this.originPlace())&&nC(this.destinationPlace()));onOriginSelected(r){this.originSelected.emit(r),this.originPlace.set(r)}onDestinationSelected(r){if(Kp(r)){this.logger.logWarning("Current location is not allowed as destination");return}this.destinationSelected.emit(r),this.destinationPlace.set(r)}onSwapPlaces(){let r=this.originPlace(),i=this.destinationPlace();if(Kp(r)){this.logger.logWarning("Should not be possible to swap places with current location as origin");return}this.originPlace.set(i),this.originSelected.emit(i),this.destinationPlace.set(r),this.destinationSelected.emit(r)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-route-selector"]],inputs:{places:[1,"places"],initialDestination:[1,"initialDestination"]},outputs:{originSelected:"originSelected",destinationSelected:"destinationSelected",swapPlaces:"swapPlaces",clearDestination:"clearDestination"},decls:20,vars:10,consts:[[1,"route-selector"],[1,"routing-option","origin"],[1,"place-info"],[1,"place-icon"],["xmlns","http://www.w3.org/2000/svg","width","36","height","36","viewBox","0 0 36 36","fill","none"],["width","36","height","36","rx","18","fill","#8DC8FF"],["d","M29.2517 17.7595C29.1117 23.9741 23.9602 28.8986 17.7456 28.7586C11.5309 28.6185 6.60648 23.4671 6.74649 17.2524C6.8865 11.0378 12.038 6.11332 18.2526 6.25333C24.4673 6.39334 29.3917 11.5448 29.2517 17.7595Z","fill","#2C57A0"],["d","M13.5364 22.4764C13.4259 22.5279 13.3135 22.5415 13.199 22.5173C13.0847 22.4932 12.9902 22.4373 12.9155 22.3496C12.8298 22.2721 12.7772 22.1766 12.7577 22.0629C12.7384 21.9495 12.7519 21.8395 12.7982 21.7327L17.6404 11.5662C17.7437 11.3532 17.9102 11.2493 18.1399 11.2545C18.3697 11.2597 18.5313 11.371 18.6249 11.5884L23.0044 21.9626C23.0458 22.0714 23.0543 22.182 23.03 22.2944C23.0054 22.407 22.9485 22.5001 22.8594 22.5736C22.7808 22.6579 22.6839 22.7095 22.5687 22.7283C22.4532 22.7475 22.3415 22.7288 22.2335 22.6723L17.9278 20.6691L13.5364 22.4764ZM14.4251 20.9295L17.954 19.5064L21.4153 21.087L18.0981 13.1117L14.4251 20.9295Z","fill","white"],[3,"selectedPlaceChange","places","initialSelectedPlace","allowCurrentLocation"],[1,"connector-line"],[1,"connector-dots"],[3,"icon"],[1,"connector-line-element"],["type","button",1,"swap-button",3,"click","disabled"],[1,"routing-option","destination"],[3,"selectedPlaceChange","places","initialSelectedPlace","placeholder"]],template:function(i,l){i&1&&(it(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),a0(),it(4,"svg",4),Mt(5,"rect",5)(6,"path",6)(7,"path",7),lt()(),l0(),it(8,"app-place-selector",8),an("selectedPlaceChange",function(a){return l.onOriginSelected(a)}),lt()()(),it(9,"div",9)(10,"div",10),Mt(11,"fa-icon",11),lt(),Mt(12,"div",12),it(13,"button",13),an("click",function(){return l.onSwapPlaces()}),Mt(14,"fa-icon",11),lt()(),it(15,"div",14)(16,"div",2)(17,"div",3),Mt(18,"fa-icon",11),lt(),it(19,"app-place-selector",15),an("selectedPlaceChange",function(a){return l.onDestinationSelected(a)}),lt()()()()),i&2&&(at(8),Ft("places",l.places())("initialSelectedPlace",l.originPlace())("allowCurrentLocation",!0),at(3),Ft("icon",l.faEllipsisVertical),at(2),Ft("disabled",!l.canSwapPlaces()),at(),Ft("icon",l.faArrowsRetweet),at(4),Ft("icon",l.faLocationDot),at(),Ft("places",l.places())("initialSelectedPlace",l.destinationPlace())("placeholder","Select a destination"))},dependencies:[zd,M1,Dr],styles:['.route-selector[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:5px;position:relative;width:100%;box-sizing:border-box}.routing-option[_ngcontent-%COMP%]{display:flex;gap:10px;align-items:center;padding:0 40px 0 0;box-sizing:border-box;width:100%}.place-info[_ngcontent-%COMP%]{display:flex;gap:10px;align-items:center;flex:1;min-width:0}.place-icon[_ngcontent-%COMP%]{flex-shrink:0;width:36px;height:36px;display:flex;align-items:center;justify-content:center}.destination[_ngcontent-%COMP%] .place-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-text-black)}.connector-line[_ngcontent-%COMP%]{display:flex;gap:8px;align-items:center;width:100%;position:relative}.connector-dots[_ngcontent-%COMP%]{flex-shrink:0;width:36px;height:36px;display:flex;align-items:center;justify-content:center}.connector-dots[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:20px;color:#5d5d5d}.connector-line-element[_ngcontent-%COMP%]{flex:1;height:1px;background:#e0e0e0;position:relative}.connector-line-element[_ngcontent-%COMP%]:before{content:"";position:absolute;top:50%;left:0;right:0;height:1px;background:repeating-linear-gradient(to right,#e0e0e0 0,#e0e0e0 4px,transparent 4px,transparent 8px);transform:translateY(-50%)}.swap-button[_ngcontent-%COMP%]{flex-shrink:0;width:32px;height:25px;background:none;border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;border-radius:4px;transition:background-color .2s ease}.swap-button[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.swap-button[_ngcontent-%COMP%]:hover:not(:disabled){background-color:#f5f5f5}.swap-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:16px;color:#5d5d5d}.clear-button[_ngcontent-%COMP%]{flex-shrink:0;width:20px;height:20px;background:none;border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;border-radius:50%;transition:background-color .2s ease}.clear-button[_ngcontent-%COMP%]:hover{background-color:#f5f5f5}.clear-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:12px;color:#666}.select-destination-button[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;padding:8px 12px;border-radius:6px;transition:background-color .2s ease;flex:1;text-align:left}.select-destination-button[_ngcontent-%COMP%]:hover{background-color:#f8f9fa}.select-destination-button[_ngcontent-%COMP%] .place-label[_ngcontent-%COMP%]{font-family:Open Sans,sans-serif;font-weight:600;font-size:20px;line-height:1;color:#cbcbcb;font-variation-settings:"wdth" 100;letter-spacing:-1px}.destination-selector[_ngcontent-%COMP%]{position:absolute;top:81px;left:84.5px;width:310px;z-index:1000;background:#fff;box-shadow:0 4px 4px #00000040;border-radius:8px;overflow:hidden}@media (width <= 768px){.route-selector[_ngcontent-%COMP%]{padding:20px 16px}.place-text[_ngcontent-%COMP%]{font-size:18px}.place-icon[_ngcontent-%COMP%]{width:32px;height:32px}.place-icon[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:18px}.destination-selector[_ngcontent-%COMP%]{left:16px;right:16px;width:auto}}']})};function eq(n,r){if(n&1){let i=Vr();it(0,"div",6)(1,"app-route-info",9),an("startRouteClick",function(){br(i);let d=Yt();return wr(d.startStepAnimation())}),lt()()}if(n&2){Yt();let i=Hg(7);at(),Ft("currentRoute",i)}}var A1=class n{routeId="";route=Re(Ha);logger=Re(jn);navigatorService=Re(Po);loadedDataService=Re(ci);mapService=Re(xi);markerService=Re(Zo);homeStateService=Re(gi);routingService=Re(_c);mapReady=vo(this.mapService.mapReady,{requireSync:!0});places=vo(Xs([this.loadedDataService.getAvailablePlaces(),this.loadedDataService.getInstitutionId()]).pipe(En(([r,i])=>r.filter(l=>l.parentInstitutionId===i))),{initialValue:[]});originPoint=ln(null);destinationPlace=ls(()=>this.initialDestination());initialDestination=ln(null);currentRoute=ln(null);constructor(){this.routeId=this.route.snapshot.params.id||"unknown",Gn(()=>{let r=this.places();if(r.length>0){let i=r.find(l=>l.lazarilloId===this.routeId||l.clientId===this.routeId);i&&this.initialDestination.set(i)}}),Gn(()=>{if(this.mapReady()){let i=qo(this.homeStateService.lastListedPlaces);this.markerService.addRouteMarkers(i)}}),Gn(()=>{let r=this.destinationPlace();r&&this.mapReady()&&(this.markerService.deselectMarkers(),this.markerService.hasMarker(r.lazarilloId)||this.markerService.addRouteMarker(r),this.markerService.selectMarker(r.lazarilloId),qo(this.originPoint)===null&&setTimeout(()=>{this.mapService.updateCamera({center:r.position})},100))}),Gn(()=>{let r=this.originPoint(),i=this.destinationPlace();r&&i?this.mapReady()&&(this.markerService.removeAllMarkers(),this.markerService.addOriginMarker(r.position),this.markerService.addDestinationMarker(i),this.routingService.getRoute(r,i).then(l=>{this.currentRoute.set(l),this.routingService.startAnimatingRoute(l),this.fitMapToRoute(r,i,l)}).catch(l=>{this.logger.logWarning("Error getting route",l)})):this.currentRoute.set(null)})}returnToProfile(){this.navigatorService.navigateToProfile(this.routeId)}onDestinationSelected(r){this.destinationPlace.set(r)}onOriginSelected(r){this.originPoint.set(r)}startStepAnimation(){this.currentRoute()&&this.logger.log("Starting step animation")}fitMapToRoute(r,i,l){let d=r?.position??this.originPoint()?.position,a=i?.position??this.destinationPlace()?.position,E=l??this.currentRoute(),L=document.querySelector(".route-related-components");if(d&&a&&E&&L&&this.mapReady()){let N=getComputedStyle(L),Z=Number.parseInt(N.getPropertyValue("--padding-top")),ee=Number.parseInt(N.getPropertyValue("--padding-left"));setTimeout(()=>{this.mapService.fitRoute(d,a,E,{padding:{top:Z,left:ee,right:70,bottom:50}})},100)}}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-route-screen"]],decls:12,vars:4,consts:[[1,"route-screen"],[1,"back-button"],["backButton","",3,"click"],[1,"route-screen-content"],[1,"route-related-components"],[3,"originSelected","destinationSelected","places","initialDestination"],[1,"route-info"],[1,"map"],[3,"restartRouteCallback"],[3,"startRouteClick","currentRoute"]],template:function(i,l){if(i&1){let d=Vr();it(0,"div",0)(1,"div",1)(2,"button",2),an("click",function(){return br(d),wr(l.returnToProfile())}),on(3,"Back"),lt()(),it(4,"div",3)(5,"div",4)(6,"app-route-selector",5),an("originSelected",function(E){return br(d),wr(l.onOriginSelected(E))})("destinationSelected",function(E){return br(d),wr(l.onDestinationSelected(E))}),lt(),Zp(7),Fn(8,eq,2,1,"div",6),lt(),it(9,"div",7)(10,"app-map")(11,"app-route-control-button",8),an("restartRouteCallback",function(){return br(d),wr(l.fitMapToRoute())}),lt()()()()()}if(i&2){at(6),Ft("places",l.places())("initialDestination",l.initialDestination()),at();let d=Gg(l.currentRoute());at(),Nn(d!==null?8:-1)}},dependencies:[mm,qd,P1,T1,D1],styles:[".route-screen-content[_ngcontent-%COMP%]{position:relative}.route-related-components[_ngcontent-%COMP%]{--padding-top: 130;--padding-left: 450;position:absolute;top:0;left:0;width:450px;box-sizing:border-box;z-index:1;display:flex;flex-direction:column;gap:40px;padding:40px 38px;background-color:var(--definitions-colors-background-white)}@container mapvx-container (width <= 1024px){.route-related-components[_ngcontent-%COMP%]{--padding-top: 70;--padding-left: 50;position:unset;width:100%}}.map[_ngcontent-%COMP%]{width:100%;height:820px}"],changeDetection:0})};var GR=[{path:"",component:a1,children:[{path:"list",redirectTo:"",pathMatch:"full"},{path:"",component:y1},{path:"search",component:b1}]},{path:"profile/:id",component:I1},{path:"route/:id",component:A1},{path:"**",redirectTo:""}];var k1=class{handleError(r){console.error("CustomErrorHandler",r)}};var HR={providers:[{provide:Js,useClass:k1},Px(),mS(GR),{provide:fc,useClass:s1},jn]};tC(HR).then(n=>{let r=iP(o1,{injector:n.injector});customElements.define("mapvx-website",r)}).catch(n=>console.error(n));
1513
1513
  /*! Bundled license information:
1514
1514
 
1515
1515
  maplibre-gl/dist/maplibre-gl.js:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mapvx/website-component",
3
- "version": "0.14.0",
3
+ "version": "0.14.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },