1import{a as qe,b as Ue}from"./chunk-MEYSDSA7.js";import"./chunk-DGHWYJDW.js";import"./chunk-3HPQAB42.js";import"./chunk-2ITU7562.js";import"./chunk-IR6E334L.js";import"./chunk-ETNVXSJZ.js";import"./chunk-UTK4KZA3.js";import"./chunk-Z3HRNYT2.js";import"./chunk-BJ6I4SQM.js";import"./chunk-Q6Z5PMGJ.js";import"./chunk-Y4UEUGBK.js";import{a as Ne}from"./chunk-UJYMJQZB.js";import{a as je}from"./chunk-IWAWM5X7.js";import"./chunk-YDXYDHVT.js";import"./chunk-57BBKKDM.js";import{la as Ge}from"./chunk-BDBNNF5F.js";import"./chunk-BMNDREH6.js";import"./chunk-IQLQCF3X.js";import"./chunk-HU7SHZ2P.js";import"./chunk-WKTS323O.js";import"./chunk-G5C4E5SZ.js";import"./chunk-JFOVODTQ.js";import"./chunk-HHMUAAKH.js";import"./chunk-KX3MZ4HX.js";import"./chunk-CPVTU5XS.js";import"./chunk-EUZLHDMR.js";import"./chunk-LSHSIR26.js";import{b as Be}from"./chunk-BTO3RYRP.js";import"./chunk-OYMZJ57R.js";import"./chunk-3W7VWIDZ.js";import{Fa as Fe,ua as Ze}from"./chunk-OOUYCANI.js";import{Bb as be,C as _e,Ca as ke,Kc as Q,N as fe,Qb as Ie,Rb as Ee,Sb as Le,W as ye,Wb as De,_ as w,_c as J,c as pe,ca as Me,dc as Oe,dd as L,e as me,ed as Te,gc as xe,hc as Pe,ma as H,mc as Ae,na as $,nb as B,nc as Se,ob as Ce,pd as Re,ra as K,ta as ve,ua as ze,xa as we}from"./chunk-WXYLEQT5.js";import{a as de,b as ue}from"./chunk-C6Q5SG76.js";var gt=["*"],Y=class{_ngZone;_pending=[];_listeners=[];_targetStream=new me(void 0);_clearListeners(){for(let e of this._listeners)e.remove();this._listeners=[]}constructor(e){this._ngZone=e}getLazyEmitter(e,t){return this._targetStream.pipe(fe(i=>{let n=new pe(s=>{if(!i){this._pending.push({observable:n,observer:s});return}let o,l=a=>{this._ngZone.run(()=>s.next(a))};if(t==="native"?(i.addEventListener(e,l),o={remove:()=>i.removeEventListener(e,l)}):o=i.addListener(e,l),!o){s.complete();return}return this._listeners.push(o),()=>o.remove()});return n}))}setTarget(e){let t=this._targetStream.value;e!==t&&(t&&(this._clearListeners(),this._pending=[]),this._targetStream.next(e),this._pending.forEach(i=>i.observable.subscribe(i.observer)),this._pending=[])}destroy(){this._clearListeners(),this._pending=[],this._targetStream.complete()}},A={center:{lat:37.421995,lng:-122.084092},zoom:17,mapTypeId:"roadmap"},We="500px",Ve="500px",S=(()=>{class r{_elementRef=w(we);_ngZone=w($);_eventManager=new Y(w($));_mapEl;_existingAuthFailureCallback;googleMap;_isBrowser;height=We;width=Ve;mapId;mapTypeId;set center(t){this._center=t}_center;set zoom(t){this._zoom=t}_zoom;set options(t){this._options=t||A}_options=A;mapInitialized=new H;authFailure=new H;boundsChanged=this._eventManager.getLazyEmitter("bounds_changed");centerChanged=this._eventManager.getLazyEmitter("center_changed");mapClick=this._eventManager.getLazyEmitter("click");mapDblclick=this._eventManager.getLazyEmitter("dblclick");mapDrag=this._eventManager.getLazyEmitter("drag");mapDragend=this._eventManager.getLazyEmitter("dragend");mapDragstart=this._eventManager.getLazyEmitter("dragstart");headingChanged=this._eventManager.getLazyEmitter("heading_changed");idle=this._eventManager.getLazyEmitter("idle");maptypeidChanged=this._eventManager.getLazyEmitter("maptypeid_changed");mapMousemove=this._eventManager.getLazyEmitter("mousemove");mapMouseout=this._eventManager.getLazyEmitter("mouseout");mapMouseover=this._eventManager.getLazyEmitter("mouseover");projectionChanged=this._eventManager.getLazyEmitter("projection_changed");mapRightclick=this._eventManager.getLazyEmitter("rightclick");tilesloaded=this._eventManager.getLazyEmitter("tilesloaded");tiltChanged=this._eventManager.getLazyEmitter("tilt_changed");zoomChanged=this._eventManager.getLazyEmitter("zoom_changed");constructor(){let t=w(ke);if(this._isBrowser=Fe(t),this._isBrowser){let i=window;i.google,this._existingAuthFailureCallback=i.gm_authFailure,i.gm_authFailure=()=>{this._existingAuthFailureCallback&&this._existingAuthFailureCallback(),this.authFailure.emit()}}}ngOnChanges(t){(t.height||t.width)&&this._setSize();let i=this.googleMap;i&&(t.options&&i.setOptions(this._combineOptions()),t.center&&this._center&&i.setCenter(this._center),t.zoom&&this._zoom!=null&&i.setZoom(this._zoom),t.mapTypeId&&this.mapTypeId&&i.setMapTypeId(this.mapTypeId)
1)}ngOnInit(){this._isBrowser&&(this._mapEl=this._elementRef.nativeElement.querySelector(".map-container"),this._setSize(),google.maps.Map?this._initialize(google.maps.Map):this._ngZone.runOutsideAngular(()=>{google.maps.importLibrary("maps").then(t=>this._initialize(t.Map))}))}_initialize(t){this._ngZone.runOutsideAngular(()=>{this.googleMap=new t(this._mapEl,this._combineOptions()),this._eventManager.setTarget(this.googleMap),this.mapInitialized.emit(this.googleMap)})}ngOnDestroy(){if(this.mapInitialized.complete(),this._eventManager.destroy(),this._isBrowser){let t=window;t.gm_authFailure=this._existingAuthFailureCallback}}fitBounds(t,i){this._assertInitialized(),this.googleMap.fitBounds(t,i)}panBy(t,i){this._assertInitialized(),this.googleMap.panBy(t,i)}panTo(t){this._assertInitialized(),this.googleMap.panTo(t)}panToBounds(t,i){this._assertInitialized(),this.googleMap.panToBounds(t,i)}getBounds(){return this._assertInitialized(),this.googleMap.getBounds()||null}getCenter(){return this._assertInitialized(),this.googleMap.getCenter()}getClickableIcons(){return this._assertInitialized(),this.googleMap.getClickableIcons()}getHeading(){return this._assertInitialized(),this.googleMap.getHeading()}getMapTypeId(){return this._assertInitialized(),this.googleMap.getMapTypeId()}getProjection(){return this._assertInitialized(),this.googleMap.getProjection()||null}getStreetView(){return this._assertInitialized(),this.googleMap.getStreetView()}getTilt(){return this._assertInitialized(),this.googleMap.getTilt()}getZoom(){return this._assertInitialized(),this.googleMap.getZoom()}get controls(){return this._assertInitialized(),this.googleMap.controls}get data(){return this._assertInitialized(),this.googleMap.data}get mapTypes(){return this._assertInitialized(),this.googleMap.mapTypes}get overlayMapTypes(){return this._assertInitialized(),this.googleMap.overlayMapTypes}_resolveMap(){return this.googleMap?Promise.resolve(this.googleMap):this.mapInitialized.pipe(_e(1)).toPromise()}_setSize(){if(this._mapEl){let t=this._mapEl.style;t.height=this.height===null?"":He(this.height)||We,t.width=this.width===null?"":He(this.width)||Ve}}_combineOptions(){let t=this._options||{};return ue(de({},t),{center:this._center||t.center||A.center,zoom:this._zoom??t.zoom??A.zoom,mapTypeId:this.mapTypeId||t.mapTypeId||A.mapTypeId,mapId:this.mapId||t.mapId})}_assertInitialized(){this.googleMap}static \u0275fac=function(i){return new(i||r)};static \u0275cmp=B({type:r,selectors:[["google-map"]],inputs:{height:"height",width:"width",mapId:"mapId",mapTypeId:"mapTypeId",center:"center",zoom:"zoom",options:"options"},outputs:{mapInitialized:"mapInitialized",authFailure:"authFailure",boundsChanged:"boundsChanged",centerChanged:"centerChanged",mapClick:"mapClick",mapDblclick:"mapDblclick",mapDrag:"mapDrag",mapDragend:"mapDragend",mapDragstart:"mapDragstart",headingChanged:"headingChanged",idle:"idle",maptypeidChanged:"maptypeidChanged",mapMousemove:"mapMousemove",mapMouseout:"mapMouseout",mapMouseover:"mapMouseover",projectionChanged:"projectionChanged",mapRightclick:"mapRightclick",tilesloaded:"tilesloaded",tiltChanged:"tiltChanged",zoomChanged:"zoomChanged"},exportAs:["googleMap"],features:[ze],ngContentSelectors:gt,decls:2,vars:0,consts:[[1,"map-container"]],template:function(i,n){i&1&&(xe(),De(0,"div",0),Pe(1))},encapsulation:2,changeDetection:0})}return r})(),ht=/([A-Za-z%]+)$/;function He(r){return r==null?"":ht.test(r)?r:`${r}px`}var $e=(()=>{class r{static \u0275fac=function(i){return new(i||r)};static \u0275mod=Ce({type:r});static \u0275inj=ye({})}return r})();var{getOwnPropertyNames:ut,getOwnPropertySymbols:pt}=Object,{hasOwnProperty:mt}=Object.prototype;function X(r,e){return function(i,n,s){return r(i,n,s)&&e(i,n,s)}}function j(r){return function(t,i,n){if(!t||!i||typeof t!="object"||typeof i!="object")return r(t,i,n);let{cache:s}=n,o=s.get(t),l=s.get(i);if(o&&l)return o===i&&l===t;s.set(t,i),s.set(i,t);let a=r(t,i,n);return s.delete(t),s.delete(i),a}}function _t(r){return r?.[Symbol.toStringTag]}function Ke(r){return ut(r).concat(pt(r))}var ft=Object.hasOwn||((r,e)=>mt.call(r,e));function D(r,e){return r===e||!r&&!e&&r!==r&&e!==e}var yt="__v",Mt="__o",vt="_owner",{getOwnPropertyDescriptor:Qe,keys:Je}=Object;function zt(r,e){return r.byteLength===e.byteLength&&G(new Uint8Array(r),new Uint8Array(e))}function wt(r,e,t){let i=r.length;if(e.length!==i)return!1;for(;i-- >0;)if(!t.equals(r[i],e[i],i,i,r,e,t))return!1;return!0}function kt(r,e){return r.byteLength===e.byteLength&&G(new Uint8Array(r.buffer,r.byteOffset,r.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}function Ct(r,e){return D(r.getTime(),e.getTime())}function bt(r,e){return r.name===e.name&&r.message===e.message&&r.cause===e.cause&&r.stack===e.stack}function It(r,e){return r===e}function Ye(r,e,t){let i=r.size;if(i!==e.size)return!1;if(!i)return!0;let n=new Array(i),s=r.entries(),o,l,a=0;for(;(o=s.next())&&!o.done;){let h=e.entries(),d=!1,c=0;for(;(l=h.next())&&!l.done;){if(n[c]){c++;continue}let p=o.value,_=l.value;if(t.equals(p[0],_[0],a,c,r,e,t)&&t.equals(p[1],_[1],p[0],_[0],r,e,t)){d=n[c]=!0;break}c++}if(!d)return!1;a++}return!0}var Et=D;function Lt(r,e,t){let i=Je(r),n=i.length;if(Je(e).length!==n)return!1;for(;n-- >0;)if(!et(r,e,t,i[n]))return!1;return!0}function T(r,e,t){let i=Ke(r),n=i.length;if(Ke(e).length!==n)return!1;let s,o,l;for(;n-- >0;)if(s=i[n],!et(r,e,t,s)||(o=Qe(r,s),l=Qe(e,s),(o||l)&&(!o||!l||o.configurable!==l.configurable||o.enumerable!==l.enumerable||o.writable!==l.writable)))return!1;return!0}function Dt(r,e){return D(r.valueOf(),e.valueOf())}function Ot(r,e){return r.source===e.source&&r.flags===e.flags}function Xe(r,e,t){let i=r.size;if(i!==e.size)return!1;if(!i)return!0;let n=new Array(i),s=r.values(),o,l;for(;(o=s.next())&&!o.done;){let a=e.values(),h=!1,d=0;for(;(l=a.next())&&!l.done;){if(!n[d]&&t.equals(o.value,l.value,o.value,l.value,r,e,t)){h=n[d]=!0;break}d++}if(!h)return!1}return!0}function G(r,e){let t=r.byteLength;if(e.byteLength!==t||r.byteOffset!==e.byteOffset)return!1;for(;t-- >0;)if(r[t]!==e[t])return!1;return!0}function xt(r,e){return r.hostname===e.hostname&&r.pathname===e.pathname&&r.protocol===e.protocol&&r.port===e.port&&r.hash===e.hash&&r.username===e.username&&r.password===e.password}function et(r,e,t,i){return(i===vt||i===Mt||i===yt)&&(r.$$typeof||e.$$typeof)?!0:ft(e,i)&&t.equals(r[i],e[i],i,i,r,e,t)}var Pt="[object ArrayBuffer]",At="[object Arguments]",St="[object Boolean]",Tt="[object DataView]",Rt="[object Date]",Zt="[object Error]",Ft="[object Map]",Bt="[object Number]",jt="[object Object]",Gt="[object RegExp]",Nt="[object Set]",qt="[object String]",Ut={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array
1]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},Wt="[object URL]",Vt=Object.prototype.toString;function Ht({areArrayBuffersEqual:r,areArraysEqual:e,areDataViewsEqual:t,areDatesEqual:i,areErrorsEqual:n,areFunctionsEqual:s,areMapsEqual:o,areNumbersEqual:l,areObjectsEqual:a,arePrimitiveWrappersEqual:h,areRegExpsEqual:d,areSetsEqual:c,areTypedArraysEqual:p,areUrlsEqual:_,unknownTagComparators:f}){return function(g,u,m){if(g===u)return!0;if(g==null||u==null)return!1;let z=typeof g;if(z!==typeof u)return!1;if(z!=="object")return z==="number"?l(g,u,m):z==="function"?s(g,u,m):!1;let C=g.constructor;if(C!==u.constructor)return!1;if(C===Object)return a(g,u,m);if(Array.isArray(g))return e(g,u,m);if(C===Date)return i(g,u,m);if(C===RegExp)return d(g,u,m);if(C===Map)return o(g,u,m);if(C===Set)return c(g,u,m);let M=Vt.call(g);if(M===Rt)return i(g,u,m);if(M===Gt)return d(g,u,m);if(M===Ft)return o(g,u,m);if(M===Nt)return c(g,u,m);if(M===jt)return typeof g.then!="function"&&typeof u.then!="function"&&a(g,u,m);if(M===Wt)return _(g,u,m);if(M===Zt)return n(g,u,m);if(M===At)return a(g,u,m);if(Ut[M])return p(g,u,m);if(M===Pt)return r(g,u,m);if(M===Tt)return t(g,u,m);if(M===St||M===Bt||M===qt)return h(g,u,m);if(f){let x=f[M];if(!x){let k=_t(g);k&&(x=f[k])}if(x)return x(g,u,m)}return!1}}function $t({circular:r,createCustomConfig:e,strict:t}){let i={areArrayBuffersEqual:zt,areArraysEqual:t?T:wt,areDataViewsEqual:kt,areDatesEqual:Ct,areErrorsEqual:bt,areFunctionsEqual:It,areMapsEqual:t?X(Ye,T):Ye,areNumbersEqual:Et,areObjectsEqual:t?T:Lt,arePrimitiveWrappersEqual:Dt,areRegExpsEqual:Ot,areSetsEqual:t?X(Xe,T):Xe,areTypedArraysEqual:t?X(G,T):G,areUrlsEqual:xt,unknownTagComparators:void 0};if(e&&(i=Object.assign({},i,e(i))),r){let n=j(i.areArraysEqual),s=j(i.areMapsEqual),o=j(i.areObjectsEqual),l=j(i.areSetsEqual);i=Object.assign({},i,{areArraysEqual:n,areMapsEqual:s,areObjectsEqual:o,areSetsEqual:l})}return i}function Kt(r){return function(e,t,i,n,s,o,l){return r(e,t,l)}}function Qt({circular:r,comparator:e,createState:t,equals:i,strict:n}){if(t)return function(l,a){let{cache:h=r?new WeakMap:void 0,meta:d}=t();return e(l,a,{cache:h,equals:i,meta:d,strict:n})};if(r)return function(l,a){return e(l,a,{cache:new WeakMap,equals:i,meta:void 0,strict:n})};let s={cache:void 0,equals:i,meta:void 0,strict:n};return function(l,a){return e(l,a,s)}}var ee=b(),Di=b({strict:!0}),Oi=b({circular:!0}),xi=b({circular:!0,strict:!0}),Pi=b({createInternalComparator:()=>D}),Ai=b({strict:!0,createInternalComparator:()=>D}),Si=b({circular:!0,createInternalComparator:()=>D}),Ti=b({circular:!0,createInternalComparator:()=>D,strict:!0});function b(r={}){let{circular:e=!1,createInternalComparator:t,createState:i,strict:n=!1}=r,s=$t(r),o=Ht(s),l=t?t(o):Kt(o);return Qt({circular:e,comparator:o,createState:i,equals:l,strict:n})}var tt=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],te=1,R=8,N=class r{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");let[t,i]=new Uint8Array(e,0,2);if(t!==219)throw new Error("Data does not appear to be in a KDBush format.");let n=i>>4;if(n!==te)throw new Error(`Got v${n} data when expected v${te}.`);let s=tt[i&15];if(!s)throw new Error("Unrecognized array type.");let[o]=new Uint16Array(e,2,1),[l]=new Uint32Array(e,4,1);return new r(l,o,s,e)}constructor(e,t=64,i=Float64Array,n){if(isNaN(e)||e<0)throw new Error(`Unpexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+t,2),65535),this.ArrayType=i,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;let s=tt.indexOf(this.ArrayType),o=e*2*this.ArrayType.BYTES_PER_ELEMENT,l=e*this.IndexArrayType.BYTES_PER_ELEMENT,a=(8-l%8)%8;if(s<0)throw new Error(`Unexpected typed array class: ${i}.`);n&&n instanceof ArrayBuffer?(this.data=n,this.ids=new this.IndexArrayType(this.data,R,e),this.coords=new this.ArrayType(this.data,R+l+a,e*2),this._pos=e*2,this._finished=!0):(this.data=new ArrayBuffer(R+o+l+a),this.ids=new this.IndexArrayType(this.data,R,e),this.coords=new this.ArrayType(this.data,R+l+a,e*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(te<<4)+s]),new Uint16Array(this.data,2,1)[0]=t,new Uint32Array(this.data,4,1)[0]=e)}add(e,t){let i=this._pos>>1;return this.ids[i]=i,this.coords[this._pos++]=e,this.coords[this._pos++]=t,i}finish(){let e=this._pos>>1;if(e!==this.numItems)throw new Error(`Added ${e} items when expected ${this.numItems}.`);return re(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,t,i,n){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:s,coords:o,nodeSize:l}=this,a=[0,s.length-1,0],h=[];for(;a.length;){let d=a.pop()||0,c=a.pop()||0,p=a.pop()||0;if(c-p<=l){for(let g=p;g<=c;g++){let u=o[2*g],m=o[2*g+1];u>=e&&u<=i&&m>=t&&m<=n&&h.push(s[g])}continue}let _=p+c>>1,f=o[2*_],y=o[2*_+1];f>=e&&f<=i&&y>=t&&y<=n&&h.push(s[_]),(d===0?e<=f:t<=y)&&(a.push(p),a.push(_-1),a.push(1-d)),(d===0?i>=f:n>=y)&&(a.push(_+1),a.push(c),a.push(1-d))}return h}within(e,t,i){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:n,coords:s,nodeSize:o}=this,l=[0,n.length-1,0],a=[],h=i*i;for(;l.length;){let d=l.pop()||0,c=l.pop()||0,p=l.pop()||0;if(c-p<=o){for(let g=p;g<=c;g++)it(s[2*g],s[2*g+1],e,t)<=h&&a.push(n[g]);continue}let _=p+c>>1,f=s[2*_],y=s[2*_+1];it(f,y,e,t)<=h&&a.push(n[_]),(d===0?e-i<=f:t-i<=y)&&(l.push(p),l.push(_-1),l.push(1-d)),(d===0?e+i>=f:t+i>=y)&&(l.push(_+1),l.push(c),l.push(1-d))}return a}};function re(r,e,t,i,n,s){if(n-i<=t)return;let o=i+n>>1;
1rt(r,e,o,i,n,s),re(r,e,t,i,o-1,1-s),re(r,e,t,o+1,n,1-s)}function rt(r,e,t,i,n,s){for(;n>i;){if(n-i>600){let h=n-i+1,d=t-i+1,c=Math.log(h),p=.5*Math.exp(2*c/3),_=.5*Math.sqrt(c*p*(h-p)/h)*(d-h/2<0?-1:1),f=Math.max(i,Math.floor(t-d*p/h+_)),y=Math.min(n,Math.floor(t+(h-d)*p/h+_));rt(r,e,t,f,y,s)}let o=e[2*t+s],l=i,a=n;for(Z(r,e,i,t),e[2*n+s]>o&&Z(r,e,i,n);l<a;){for(Z(r,e,l,a),l++,a--;e[2*l+s]<o;)l++;for(;e[2*a+s]>o;)a--}e[2*i+s]===o?Z(r,e,i,a):(a++,Z(r,e,a,n)),a<=t&&(i=a+1),t<=a&&(n=a-1)}}function Z(r,e,t,i){ie(r,t,i),ie(e,2*t,2*i),ie(e,2*t+1,2*i+1)}function ie(r,e,t){let i=r[e];r[e]=r[t],r[t]=i}function it(r,e,t,i){let n=r-t,s=e-i;return n*n+s*s}var Jt={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:r=>r},nt=Math.fround||(r=>e=>(r[0]=+e,r[0]))(new Float32Array(1)),O=2,E=3,ne=4,I=5,at=6,W=class{constructor(e){this.options=Object.assign(Object.create(Jt),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){let{log:t,minZoom:i,maxZoom:n}=this.options;t&&console.time("total time");let s=`prepare ${e.length} points`;t&&console.time(s),this.points=e;let o=[];for(let a=0;a<e.length;a++){let h=e[a];if(!h.geometry)continue;let[d,c]=h.geometry.coordinates,p=nt(q(d)),_=nt(U(c));o.push(p,_,1/0,a,-1,1),this.options.reduce&&o.push(0)}let l=this.trees[n+1]=this._createTree(o);t&&console.timeEnd(s);for(let a=n;a>=i;a--){let h=+Date.now();l=this.trees[a]=this._createTree(this._cluster(l,a)),t&&console.log("z%d: %d clusters in %dms",a,l.numItems,+Date.now()-h)}return t&&console.timeEnd("total time"),this}getClusters(e,t){let i=((e[0]+180)%360+360)%360-180,n=Math.max(-90,Math.min(90,e[1])),s=e[2]===180?180:((e[2]+180)%360+360)%360-180,o=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)i=-180,s=180;else if(i>s){let c=this.getClusters([i,n,180,o],t),p=this.getClusters([-180,n,s,o],t);return c.concat(p)}let l=this.trees[this._limitZoom(t)],a=l.range(q(i),U(o),q(s),U(n)),h=l.data,d=[];for(let c of a){let p=this.stride*c;d.push(h[p+I]>1?st(h,p,this.clusterProps):this.points[h[p+E]])}return d}getChildren(e){let t=this._getOriginId(e),i=this._getOriginZoom(e),n="No cluster with the specified id.",s=this.trees[i];if(!s)throw new Error(n);let o=s.data;if(t*this.stride>=o.length)throw new Error(n);let l=this.options.radius/(this.options.extent*Math.pow(2,i-1)),a=o[t*this.stride],h=o[t*this.stride+1],d=s.within(a,h,l),c=[];for(let p of d){let _=p*this.stride;o[_+ne]===e&&c.push(o[_+I]>1?st(o,_,this.clusterProps):this.points[o[_+E]])}if(c.length===0)throw new Error(n);return c}getLeaves(e,t,i){t=t||10,i=i||0;let n=[];return this._appendLeaves(n,e,t,i,0),n}getTile(e,t,i){let n=this.trees[this._limitZoom(e)],s=Math.pow(2,e),{extent:o,radius:l}=this.options,a=l/o,h=(i-a)/s,d=(i+1+a)/s,c={features:[]};return this._addTileFeatures(n.range((t-a)/s,h,(t+1+a)/s,d),n.data,t,i,s,c),t===0&&this._addTileFeatures(n.range(1-a/s,h,1,d),n.data,s,i,s,c),t===s-1&&this._addTileFeatures(n.range(0,h,a/s,d),n.data,-1,i,s,c),c.features.length?c:null}getClusterExpansionZoom(e){let t=this._getOriginZoom(e)-1;for(;t<=this.options.maxZoom;){let i=this.getChildren(e);if(t++,i.length!==1)break;e=i[0].properties.cluster_id}return t}_appendLeaves(e,t,i,n,s){let o=this.getChildren(t);for(let l of o){let a=l.properties;if(a&&a.cluster?s+a.point_count<=n?s+=a.point_count:s=this._appendLeaves(e,a.cluster_id,i,n,s):s<n?s++:e.push(l),e.length===i)break}return s}_createTree(e){let t=new N(e.length/this.stride|0,this.options.nodeSize,Float32Array);for(let i=0;i<e.length;i+=this.stride)t.add(e[i],e[i+1]);return t.finish(),t.data=e,t}_addTileFeatures(e,t,i,n,s,o){for(let l of e){let a=l*this.stride,h=t[a+I]>1,d,c,p;if(h)d=ot(t,a,this.clusterProps),c=t[a],p=t[a+1];else{let y=this.points[t[a+E]];d=y.properties;let[g,u]=y.geometry.coordinates;c=q(g),p=U(u)}let _={type:1,geometry:[[Math.round(this.options.extent*(c*s-i)),Math.round(this.options.extent*(p*s-n))]],tags:d},f;h||this.options.generateId?f=t[a+E]:f=this.points[t[a+E]].id,f!==void 0&&(_.id=f),o.features.push(_)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,t){let{radius:i,extent:n,reduce:s,minPoints:o}=this.options,l=i/(n*Math.pow(2,t)),a=e.data,h=[],d=this.stride;for(let c=0;c<a.length;c+=d){if(a[c+O]<=t)continue;a[c+O]=t;let p=a[c],_=a[c+1],f=e.within(a[c],a[c+1],l),y=a[c+I],g=y;for(let u of f){let m=u*d;a[m+O]>t&&(g+=a[m+I])}if(g>y&&g>=o){let u=p*y,m=_*y,z,C=-1,M=((c/d|0)<<5)+(t+1)+this.points.length;for(let x of f){let k=x*d;if(a[k+O]<=t)continue;a[k+O]=t;let he=a[k+I];u+=a[k]*he,m+=a[k+1]*he,a[k+ne]=M,s&&(z||(z=this._map(a,c,!0),C=this.clusterProps.length,this.clusterProps.push(z)),s(z,this._map(a,k)))}a[c+ne]=M,h.push(u/g,m/g,1/0,M,-1,g),s&&h.push(C)}else{for(let u=0;u<d;u++)h.push(a[c+u]);if(g>1)for(let u of f){let m=u*d;if(!(a[m+O]<=t)){a[m+O]=t;for(let z=0;z<d;z++)h.push(a[m+z])}}}}return h}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,t,i){if(e[t+I]>1){let o=this.clusterProps[e[t+at]];return i?Object.assign({},o):o}let n=this.points[e[t+E]].properties,s=this.options.map(n);return i&&s===n?Object.assign({},s):s}};function st(r,e,t){return{type:"Feature",id:r[e+E],properties:ot(r,e,t),geometry:{type:"Point",coordinates:[Yt(r[e]),Xt(r[e+1])]}}}function ot(r,e,t){let i=r[e+I],n=i>=1e4?`${Math.round(i/1e3)}
1k`:i>=1e3?`${Math.round(i/100)/10}k`:i,s=r[e+at],o=s===-1?{}:Object.assign({},t[s]);return Object.assign(o,{cluster:!0,cluster_id:r[e+E],point_count:i,point_count_abbreviated:n})}function q(r){return r/360+.5}function U(r){let e=Math.sin(r*Math.PI/180),t=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return t<0?0:t>1?1:t}function Yt(r){return(r-.5)*360}function Xt(r){let e=(180-r*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function ei(r,e){var t={};for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&e.indexOf(i)<0&&(t[i]=r[i]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,i=Object.getOwnPropertySymbols(r);n<i.length;n++)e.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(r,i[n])&&(t[i[n]]=r[i[n]]);return t}var v=class{static isAdvancedMarkerAvailable(e){return google.maps.marker&&e.getMapCapabilities().isAdvancedMarkersAvailable===!0}static isAdvancedMarker(e){return google.maps.marker&&e instanceof google.maps.marker.AdvancedMarkerElement}static setMap(e,t){this.isAdvancedMarker(e)?e.map=t:e.setMap(t)}static getPosition(e){if(this.isAdvancedMarker(e)){if(e.position){if(e.position instanceof google.maps.LatLng)return e.position;if(Number.isFinite(e.position.lat)&&Number.isFinite(e.position.lng))return new google.maps.LatLng(e.position.lat,e.position.lng)}return new google.maps.LatLng(null)}return e.getPosition()}static getVisible(e){return this.isAdvancedMarker(e)?!0:e.getVisible()}},F=class{constructor({markers:e,position:t}){this.markers=[],e&&(this.markers=e),t&&(t instanceof google.maps.LatLng?this._position=t:this._position=new google.maps.LatLng(t))}get bounds(){if(this.markers.length===0&&!this._position)return;let e=new google.maps.LatLngBounds(this._position,this._position);for(let t of this.markers)e.extend(v.getPosition(t));return e}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter(e=>v.getVisible(e)).length}push(e){this.markers.push(e)}delete(){this.marker&&(v.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}};function se(r,e="assertion failed"){if(r==null)throw Error(e)}var ae=class{constructor({maxZoom:e=16}){this.maxZoom=e}noop({markers:e}){return ti(e)}};var ti=r=>r.map(t=>new F({position:v.getPosition(t),markers:[t]}));var oe=class extends ae{constructor(e){var{maxZoom:t,radius:i=60}=e,n=ei(e,["maxZoom","radius"]);super({maxZoom:t}),this.markers=[],this.clusters=[],this.state={zoom:-1},this.superCluster=new W(Object.assign({maxZoom:this.maxZoom,radius:i},n))}calculate(e){let t=!1,i=e.map.getZoom();se(i),i=Math.round(i);let n={zoom:i};if(!ee(e.markers,this.markers)){t=!0,this.markers=[...e.markers];let s=this.markers.map(o=>{let l=v.getPosition(o);return{type:"Feature",geometry:{type:"Point",coordinates:[l.lng(),l.lat()]},properties:{marker:o}}});this.superCluster.load(s)}return t||(this.state.zoom<=this.maxZoom||n.zoom<=this.maxZoom)&&(t=!ee(this.state,n)),this.state=n,e.markers.length===0?(this.cluster
1s=[],{clusters:this.clusters,changed:t}):(t&&(this.clusters=this.cluster(e)),{clusters:this.clusters,changed:t})}cluster({map:e}){let t=e.getZoom();return se(t),this.superCluster.getClusters([-180,-90,180,90],Math.round(t)).map(i=>this.transformCluster(i))}transformCluster({geometry:{coordinates:[e,t]},properties:i}){if(i.cluster)return new F({markers:this.superCluster.getLeaves(i.cluster_id,1/0).map(s=>s.properties.marker),position:{lat:t,lng:e}});let n=i.marker;return new F({markers:[n],position:v.getPosition(n)})}};var le=class{constructor(e,t){this.markers={sum:e.length};let i=t.map(s=>s.count),n=i.reduce((s,o)=>s+o,0);this.clusters={count:t.length,markers:{mean:n/t.length,sum:n,min:Math.min(...i),max:Math.max(...i)}}}},ce=class{render({count:e,position:t},i,n){let o=`<svg fill="${e>Math.max(10,i.clusters.markers.mean)?"#ff0000":"#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50"> 2<circle cx="120" cy="120" opacity=".6" r="70" /> 3<circle cx="120" cy="120" opacity=".3" r="90" /> 4<circle cx="120" cy="120" opacity=".2" r="110" /> 5<text x="50%" y="50%" style="fill:#fff" text-anchor="middle" font-size="50" dominant-baseline="middle" font-family="roboto,arial,sans-serif">${e}</text> 6</svg>`,l=`Cluster of ${e} markers`,a=Number(google.maps.Marker.MAX_ZINDEX)+e;if(v.isAdvancedMarkerAvailable(n)){let c=new DOMParser().parseFromString(o,"image/svg+xml").documentElement;c.setAttribute("transform","translate(0 25)");let p={map:n,position:t,zIndex:a,title:l,content:c};return new google.maps.marker.AdvancedMarkerElement(p)}let h={position:t,zIndex:a,title:l,icon:{url:`data:image/svg+xml;base64,${btoa(o)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(h)}};function ii(r,e){for(let t in e.prototype)r.prototype[t]=e.prototype[t]}
6var ge=class r{constructor(){ii(r,google.maps.OverlayView)}},P=(function(r){return r.CLUSTERING_BEGIN="clusteringbegin",r.CLUSTERING_END="clusteringend",r.CLUSTER_CLICK="click",r.GMP_CLICK="gmp-click",r})(P||{}),ri=(r,e,t)=>{e.bounds&&t.fitBounds(e.bounds)},V=class extends ge{constructor({map:e,markers:t=[],algorithmOptions:i={},algorithm:n=new oe(i),renderer:s=new ce,onClusterClick:o=ri}){super(),this.map=null,this.idleListener=null,this.markers=[...t],this.clusters=[],this.algorithm=n,this.renderer=s,this.onClusterClick=o,e&&this.setMap(e)}addMarker(e,t){this.markers.includes(e)||(this.markers.push(e),t||this.render())}addMarkers(e,t){e.forEach(i=>{this.addMarker(i,!0)}),t||this.render()}removeMarker(e,t){let i=this.markers.indexOf(e);return i===-1?!1:(v.setMap(e,null),this.markers.splice(i,1),t||this.render(),!0)}removeMarkers(e,t){let i=!1;return e.forEach(n=>{i=this.removeMarker(n,!0)||i}),i&&!t&&this.render(),i}clearMarkers(e){this.markers.length=0,e||this.render()}render(){let e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,P.CLUSTERING_BEGIN,this);let{clusters:t,changed:i}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(i||i==null){let n=new Set;for(let o of t)o.markers.length==1&&n.add(o.markers[0]);let s=[];for(let o of this.clusters)o.marker!=null&&(o.markers.length==1?n.has(o.marker)||v.setMap(o.marker,null):s.push(o.marker));this.clusters=t,this.renderClusters(),requestAnimationFrame(()=>s.forEach(o=>v.setMap(o,null)))}google.maps.event.trigger(this,P.CLUSTERING_END,this)}}onAdd(){let e=this.getMap();se(e),this.idleListener=e.addListener("idle",this.render.bind(this)),this.render()}onRemove(){this.idleListener&&google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach(e=>v.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){let e=new le(this.markers,this.clusters),t=this.getMap();this.clusters.forEach(i=>{if(i.markers.length===1)i.marker=i.markers[0];else if(i.marker=this.renderer.render(i,e,t),i.markers.forEach(n=>v.setMap(n,null)),this.onClusterClick){let n=v.isAdvancedMarker(i.marker)?P.GMP_CLICK:P.CLUSTER_CLICK;i.marker.addListener(n,s=>{google.maps.event.trigger(this,P.CLUSTER_CLICK,i),this.onClusterClick(s,i,t)})}v.setMap(i.marker,t)})}};var lt=class r{_appService=w(Be);_homeService=w(Ne);_environmentInjector=w(Me);_appRef=w(be);_propertyService=w(je);markers=L.required();center=L.required();isMobile=L.required();parameters=L.required();buildings=L(!1);zoom=L.required();googleMap=Te.required(S);selectProperty=K(null);mapLoad=K(!1);markerClusterer;colorPrimary=J(()=>this._homeService.getSiteConfiguration()()?.theme?.primary_color??"#2F5AA8");prevInfoWindow;isProgrammaticZoom=!1;constructor(){ve(()=>{let e=this.markers(),t="#000",i=this.colorPrimary()||"#2F5AA8";if(Ge(this.colorPrimary())&&(t="#fff"),this.mapLoad()&&e.length>0){this.markerClusterer?this.markerClusterer.clearMarkers():this.markerClusterer=new V({map:this.googleMap().googleMap,renderer:{render(s,o,l){return new google.maps.Marker({position:s.position,label:{text:s.count.toString(),color:t},map:l,icon:{path:google.maps.SymbolPath.CIRCLE,fillColor:i,fillOpacity:1,scale:18,strokeWeight:0}})}}});let n=e.map(s=>this.createMapMarker(s));this.markerClusterer.addMarkers(n)}})}options=J(()=>{this.isProgrammaticZoom=!0;let e={disableDefaultUI:!0,zoomControl:!0,zoomControlOptions:{position:this.isMobile()?google?.maps?.ControlPosition?.RIGHT_BOTTOM:google?.maps?.ControlPosition?.RIGHT_TOP},scrollwheel:!0,maxZoom:this.parameters().site_show_address_options=="full_address_site"?void 0:16},t=this.googleMap();return this.mapLoad()&&(e.center=t?.googleMap?.getCenter()),e.zoom=t?.googleMap?.getZoom()||this.zoom(),this.markers().length>0&&this.center()&&(e.center={lat:this.center().lat,lng:this.center().lon}),setTimeout(()=>this.isProgrammaticZoom=!1,100),e});onChangeMap(){this.isProgrammaticZoom||(this._propertyService.setMapZoom(this.googleMap().getZoom()),this._propertyService.setMapCenter({lat:this.googleMap().getCenter().lat(),lon:this.googleMap().getCenter().lng()}
6))}createMapMarker(e){let t=new google.maps.Marker({position:e.positions,clickable:!0}),i=new google.maps.InfoWindow({content:this.createInfoWindowContent(e)});return this.googleMap().googleMap.addListener("click",()=>{i.close()}),t.addListener("click",()=>{this.prevInfoWindow&&this.prevInfoWindow.close(),i.open(this.googleMap().googleMap,t),this.prevInfoWindow=i}),t}createInfoWindowContent(e){let t=this.buildings()?Ue:qe,i=Re(t,{environmentInjector:this._environmentInjector});i.setInput("marker",e),i.setInput("layoutBucketPath",this._appService.layoutBucketPath()),i.setInput("parameters",this.parameters),this._appRef.attachView(i.hostView);let n=document.createElement("div");return n.appendChild(i.hostView.rootNodes[0]),n}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=B({type:r,selectors:[["imobzi-google-maps"]],viewQuery:function(t,i){t&1&&Ae(i.googleMap,S,5),t&2&&Se()},inputs:{markers:[1,"markers"],center:[1,"center"],isMobile:[1,"isMobile"],parameters:[1,"parameters"],buildings:[1,"buildings"],zoom:[1,"zoom"]},features:[Q([Ze])],decls:1,vars:1,consts:[["height","100%","width","100%",3,"mapDragend","zoomChanged","mapClick","mapInitialized","options"]],template:function(t,i){t&1&&(Ee(0,"google-map",0),Oe("mapDragend",function(){return i.onChangeMap()})("zoomChanged",function(){return i.onChangeMap()})("mapClick",function(){return i.onChangeMap()})("mapInitialized",function(){return i.mapLoad.set(!0)}),Le()),t&2&&Ie("options",i.options())},dependencies:[$e,S],styles:['.gm-ui-hover-effect{width:24px!important;height:24px!important;border-radius:12px!important;opacity:1!important;background-color:var(--primary-background)!important} .gm-ui-hover-effect:after{content:"X";display:flex;width:100%;height:100%;justify-content:center;align-items:center;font-size:18px;color:#fff!important} .gm-ui-hover-effect span{display:none!important} .gm-style-iw-d{overflow:auto!important} .gm-style-iw{border-radius:12px!important;padding:0!important} .gm-style-iw .gm-style-iw-chr{position:absolute;z-index:1;right:12px;top:12px}']})};export{lt as GoogleComponent};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.