PageSourceSearch

https://www.cchsnb.ca/wp-content/themes/HighendWP/assets/js/map.js?ver=4.2.7

js cchsnb.ca collected 2026-10-03 00:54:45 UTC 12,121 bytes, 451 lines download raw bytes

1(Object.keys =
2	Object.keys ||
3	function (e) {
4		var o = [];
5		for (var t in e) e.hasOwnProperty(t) && o.push(t);
6		return o;
7	}),
8	jQuery(document).ready(function (e) {
9		function o() {
10			var e = parseFloat(n.attr('data-map-level')),
11				o = parseFloat(n.attr('data-map-lat')),
12				t = parseFloat(n.attr('data-map-lng')),
13				q = n.attr('data-api-key'),
14				a = (n.attr('data-map-img'), n.attr('data-overlay-color')),
15				k = n.attr('data-map-buttons'),
16				i = 0;
17			if (k != 1) {
18				k = 0;
19			}
20			isNaN(e) && (e = 15),
21				isNaN(o) && (o = 51.47),
22				isNaN(t) && (t = -0.268199),
23				'' == a && (a = 'none'),
24				jQuery(window).width() > 690 ? ((i = 150), (enableAnimation = google.maps.Animation.BOUNCE)) : (enableAnimation = null);
25			var l = new google.maps.LatLng(o, t),
26				s = [
27					{
28						stylers: [
29							{
30								hue: a,
31							},
32							{
33								saturation: -30,
34							},
35						],
36					},
37					{
38						featureType: 'road',
39						elementType: 'geometry',
40						stylers: [
41							{
42								lightness: 100,
43							},
44							{
45								visibility: 'simplified',
46							},
47						],
48					},
49					{
50						featureType: 'road',
51						elementType: 'labels',
52						stylers: [
53							{
54								visibility: 'on',
55							},
56						],
57					},
58				],
59				r = {
60					center: l,
61					zoom: e,
62					mapTypeId: google.maps.MapTypeId.ROADMAP,
63					scrollwheel: !1,
64					panControl: k,
65					zoomControl: k,
66					zoomControlOptions: {
67						style: google.maps.ZoomControlStyle.LARGE,
68					},
69					mapTypeControl: !1,
70					scaleControl: !1,
71					streetViewControl: !1,
72					disableDoubleClickZoom: !k,
73				};
74			(window.map = new google.maps.Map(document.getElementById('contact-map'), r)),
75				'none' != a &&
76					window.map.setOptions({
77						styles: s,
78					}),
79				(window.infoWindows = []),
80				google.maps.event.addListenerOnce(window.map, 'tilesloaded', function () {});
81		}
82
83		function t(e) {
84			for (
85				var o = (parseFloat(n.attr('data-map-level')), parseFloat(n.attr('data-map-lat')), parseFloat(n.attr('data-map-lng')), n.attr('data-map-img')),
86					t = (n.attr('data-overlay-color'), 0),
87					a = 1;
88				a <= Object.keys(hb_gmap).length;
89				a++
90			)
91				!(function (a) {
92					setTimeout(function () {
93						var t = new google.maps.Marker({
94							position: new google.maps.LatLng(hb_gmap[a].lat, hb_gmap[a].lng),
95							map: e,
96							infoWindowIndex: a - 1,
97							animation: enableAnimation,
98							icon: o,
99							optimized: !1,
100						});
101						setTimeout(function () {
102							t.setAnimation(null);
103						}, 200);
104						var n = new google.maps.InfoWindow({
105							content: hb_gmap[a].ibx,
106							maxWidth: 300,
107						});
108						window.infoWindows.push(n),
109							google.maps.event.addListener(
110								t,
111								'click',
112								(function () {
113									return function () {
114										window.infoWindows[this.infoWindowIndex].open(e, this);
115									};
116								})(t, a)
117							);
118					}, a * t);
119				})(a);
120		}
121		var a = jQuery('.hb-gmap-map');
122		a.length &&
123			('object' == typeof google && 'object' == typeof google.maps
124				? a.each(function () {
125						function o(e) {
126							var o = new google.maps.Marker({
127								position: new google.maps.LatLng(i, l),
128								map: e,
129								infoWindowIndex: 0,
130								animation: enableAnimation,
131								icon: s,
132								optimized: !1,
133							});
134							setTimeout(function () {
135								o.setAnimation(null);
136							}, 200);
137						}
138
139						function t(e) {
140							if (jQuery(window).width() > 690) var o = google.maps.Animation.BOUNCE;
141							else var o = null;
142							for (var t = 1; t <= Object.keys(hb_gmap).length; t++)
143								!(function (t) {
144									setTimeout(function () {
145										var a = new google.maps.Marker({
146												position: new google.maps.LatLng(hb_gmap[t].lat, hb_gmap[t].lng),
147												map: e,
148												infoWindowIndex: t - 1,
149												animation: o,
150												icon: s,
151												optimized: !1,
152											}),
153											n = new google.maps.InfoWindow({
154												content: hb_gmap[t].ibx,
155												maxWidth: 300,
156											});
157										w.push(n),
158											google.maps.event.addListener(
159												a,
160												'click',
161												(function () {
162													return function () {
163														w[this.infoWindowIndex].open(e, this);
164													};
165												})(a, t)
166											);
167									}, 200 * t);
168								})(t);
169						}
170						var a = jQuery(this),
171							n = parseFloat(a.attr('data-map-level')),
172							i = parseFloat(a.attr('data-map-lat')),
173							l = parseFloat(a.attr('data-map-lng')),
174							s = a.attr('data-map-img'),
175							r = a.attr('data-overlay-color'),
176							p = 0,
177							m = a.attr('data-show-location'),
178							g = a.attr('data-pan-control'),
179							d = a.attr('data-zoom-control');
180						(d = 'undefined' == typeof d ? !0 : 'true' == d ? !0 : !1),
181							(g = 'undefined' == typeof g ? !0 : 'true' == g ? !0 : !1),
182							isNaN(n) && (n = 15),
183							isNaN(i) && (i = 51.47),
184							isNaN(l) && (l = -0.268199),
185							'' == r && (r = 'none'),
186							jQuery(window).width() >
186 690 ? ((p = 150), (enableAnimation = google.maps.Animation.BOUNCE)) : (enableAnimation = null);
187						var u = new google.maps.LatLng(i, l),
188							c = [
189								{
190									stylers: [
191										{
192											hue: r,
193										},
194										{
195											saturation: -30,
196										},
197									],
198								},
199								{
200									featureType: 'road',
201									elementType: 'geometry',
202									stylers: [
203										{
204											lightness: 100,
205										},
206										{
207											visibility: 'simplified',
208										},
209									],
210								},
211								{
212									featureType: 'road',
213									elementType: 'labels',
214									stylers: [
215										{
216											visibility: 'on',
217										},
218									],
219								},
220							],
221							y = {
222								center: u,
223								zoom: n,
224								mapTypeId: google.maps.MapTypeId.ROADMAP,
225								scrollwheel: !1,
226								panControl: g,
227								zoomControl: d,
228								disableDoubleClickZoom: !d,
229								zoomControlOptions: {
230									style: google.maps.ZoomControlStyle.LARGE,
231								},
232								mapTypeControl: !1,
233								scaleControl: !1,
234								streetViewControl: !1,
235							},
236							f = new google.maps.Map(a.get(0), y);
237						'none' != r &&
238							f.setOptions({
239								styles: c,
240							});
241						var w = [];
242						google.maps.event.addListenerOnce(f, 'tilesloaded', function () {
243							if (s.length > 0) {
244								var a = new Image();
245								(a.src = s),
246									e(a).load(function () {
247										'-1' == m ? t(f) : '0' == m && o(f);
248									});
249							} else '-1' == m ? t(f) : '0' == m && o(f);
250						});
251				  })
252				: google.load('maps', '3', {
253						other_params: 'key=' + a.attr('data-api-key'),
254						callback: function () {
255							a.each(function () {
256								function o(e) {
257									var o = new google.maps.Marker({
258										position: new google.maps.LatLng(i, l),
259										map: e,
260										infoWindowIndex: 0,
261										animation: enableAnimation,
262										icon: s,
263										optimized: !1,
264									});
265									setTimeout(function () {
266										o.setAnimation(null);
267									}, 200);
268								}
269
270								function t(e) {
271									for (var o = 1; o <= Object.keys(hb_gmap).length; o++)
272										!(function (o) {
273											setTimeout(function () {
274												var t = new google.maps.Marker({
275													position: new google.maps.LatLng(hb_gmap[o].lat, hb_gmap[o].lng),
276													map: e,
277													infoWindowIndex: o - 1,
278													animation: enableAnimation,
279													icon: s,
280													optimized: !1,
281												});
282												setTimeout(function () {
283													t.setAnimation(null);
284												}, 200);
285												var a = new google.maps.InfoWindow({
286													content: hb_gmap[o].ibx,
287													maxWidth: 300,
288												});
289												w.push(a),
290													google.maps.event.addListener(
291														t,
292														'click',
293														(function () {
294															return function () {
295																w[this.infoWindowIndex].open(e, this);
296															};
297														})(t, o)
298													);
299											}, o * p);
300										})(o);
301								}
302								var a = jQuery(this),
303									n = parseFloat(a.attr('data-map-level')),
304									i = parseFloat(a.attr('data-map-lat')),
305									l = parseFloat(a.attr('data-map-lng')),
306									s = a.attr('data-map-img'),
307									r = a.attr('data-overlay-color'),
308									p = 0,
309									m = a.attr('data-show-location'),
310									g = a.attr('data-pan-control'),
311									d = a.attr('data-zoom-control');
312								(d = 'undefined' == typeof d ? !0 : 'true' == d ? !0 : !1),
313									(g = 'undefined' == typeof g ? !0 : 'true' == g ? !0 : !1),
314									isNaN(n) && (n = 15),
315									isNaN(i) && (i = 51.47),
316									isNaN(l) && (l = -0.268199),
317									'' == r && (r = 'none'),
318									jQuery(window).width() > 690 ? ((p = 150), (enableAnimation = google.maps.Animation.BOUNCE)) : (enableAnimation = null);
319								var u = new google.maps.LatLng(i, l),
320									c = [
321										{
322											stylers: [
323												{
324													hue: r,
325												},
326												{
327													saturation: -30,
328												},
329											],
330										},
331										{
332											featureType: 'road',
333											elementType: 'geometry',
334											stylers: [
335												{
336													lightness: 100,
337												},
338												{
339													visibility: 'simplified',
340												},
341											],
342										},
343										{
344											featureType: 'road',
345											elementType: 'labels',
346											stylers: [
347												{
348													visibility: 'on',
349												},
350											],
351										},
352									],
353									y = {
354										center: u,
355										zoom: n,
356										mapTypeId: google.maps.MapTypeId.ROADMAP,
357										scrollwheel: !1,
358										panControl: 1,
359										zoomControl: d,
360										disableDoubleClickZoom: !d,
361										zoomControlOptions: {
362											style: google.maps.ZoomControlStyle.LARGE,
363										},
364										mapTypeControl: !1,
365										scaleControl: !1,
366										streetViewControl: !1,
367									},
368									f = new google.maps.Map(a.get(0), y);
369								'none' != r &&
370									f.setOptions({
371										styles: c,
372									});
373								var w = [];
374								google.maps.event.addListenerOnce(f, 'tilesloaded', function () {
375									if (s.length > 0) {
376										var a = new Image();
377										(a.src = s),
378											e(a).load(function () {
379												'-1' == m ? t(f) : '0' == m && o(f);
380											});
381									} else '-1' == m ? t(f) : '0' == m && o(f);
382								});
383							});
384						},
385				  }));
386		var n = jQuery('#contact-map');
387		if (n.length) {
388			var i = jQuery('#header-dropdown'),
389				l = 0;
390			jQuery('#show-map-button').click(function (e) {
391				jQuery(this).hasClass('close-map')
392					? (jQuery(i)
393							.stop(!0, !1)
394							.animate(
395								{
396									height: '0px',
397								},
398								250,
399								'easeInOutQuad',
400								function () {
401									jQuery(i).css('opacity', 0);
402								}
403							),
404					  jQuery('#show-map-button').removeClass('close-map active'))
405					: (e.preventDefault(),
406					  jQuery(this).addClass('close-map active'),
407					  jQuery(i)
408							.stop(!0, !1)
409							.animate(
410								{
411									height: '380px',
412									opacity: 1,
413								},
414								250,
415								'easeInOutQuad',
416								function () {
417									0 == l
418										? google.load('maps', '3', {
419												other_params: 'key=' + n.attr('data-api-key'),
420												callback: function () {
421													o(),
422														(l = 1),
423														setTimeout(function () {
424															jQuery('#contact-map').addClass('visible-map'), t(window.map);
425														}, 500);
426												},
427										  })
428										: (google.maps.event.trigger(window.map, 'resize'),
429										  setTimeout(function () {
430												jQuery('#contact-map').addClass('visible-map');
431										  }, 400));
432								}
433							));
434			}),
435				jQuery('.close-map').click(function () {
436					jQuery(i)
437						.stop(!0, !1)
438						.animate(
439							{
440								height: '0px',
441							},
442							400,
443							'easeInOutQuad',
444							function () {
445								jQuery(i).css('opacity', 0);
446							}
447						),
448						jQuery('#show-map-button').removeClass('close-map active');
449				});
450		}
451	});

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.